Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
f056583
feat(kin): add memory git writer (LEAD-3)
GLDRoger Nov 7, 2026
df0e0e8
fix(kin): anchor memory writes in SQLite and isolate git execution
GLDRoger Nov 7, 2026
42f9011
Merge remote-tracking branch 'origin/kin' into HEAD
GLDRoger Nov 7, 2026
5b4250c
fix(kin): verify object integrity in an isolated reference database
GLDRoger Nov 7, 2026
23529fe
merge: integrate kin TRIG-12 freshness defaults
GLDRoger Nov 7, 2026
95f0a21
fix(kin): verify memory reads and recover anchored writers
GLDRoger Nov 7, 2026
c7d9dbf
fix(kin): keep snapshot reads outside ref reconciliation
GLDRoger Nov 7, 2026
9d00407
fix(kin): merge verified memory bytes and distrust recovery refs
GLDRoger Nov 7, 2026
dbe0bcc
fix(kin): harden memory merges and verified tree writes
GLDRoger Nov 7, 2026
27851a2
fix(kin): integrate chat RPCs before memory heads migration
GLDRoger Nov 7, 2026
fc30b00
test(kin): cover private upload-pack and ordered migration replay
GLDRoger Nov 7, 2026
6c45cf3
fix(kin): runnable recovery runbook, reuse conflict branches, strict …
GLDRoger Nov 7, 2026
4ca36c8
fix(auth): revoke renewed sessions by proof key
GLDRoger Nov 8, 2026
fbd8185
fix(kin): isolate proof-key revocation and guard renewal exchanges
GLDRoger Nov 8, 2026
8c87d79
merge: sync kin and reserve K011 for auth session keys
GLDRoger Nov 8, 2026
c0b40c4
fix(kin): make proof-key revocation opt-in and race-safe
GLDRoger Nov 8, 2026
bff6258
fix(kin): capture exchange hooks and commit revocation before publishing
GLDRoger Nov 8, 2026
53c8fb6
fix(kin): honor persisted proof-key revocations in CLI runtimes
GLDRoger Nov 8, 2026
131c024
docs(kin): note managed-policy blocks, race error and Kin-off repair
GLDRoger Nov 8, 2026
9e16280
fix(kin): merge kin into memory writer and assign K011
GLDRoger Nov 8, 2026
7aeaf02
Merge kin prerequisites into TRIG-9 stack
GLDRoger Nov 8, 2026
768c397
feat(kin): block secrets in memory writes (TRIG-16)
GLDRoger Nov 8, 2026
e7aba15
test(kin): harden scanner bounds and wrapped-token coverage
GLDRoger Nov 8, 2026
8e87b4a
fix(kin): validate the writer on pinned writer operations; quiet supe…
GLDRoger Nov 8, 2026
3954bbd
feat(kin): schedule brief, summary and owner-check routines
GLDRoger Nov 8, 2026
52d873e
Merge updated LEAD-3 writer prerequisite
GLDRoger Nov 8, 2026
ae165f4
test(kin): retain writer base pinned-read assertion
GLDRoger Nov 8, 2026
493c228
test(kin): compose dormant routine dependencies in one layer
GLDRoger Nov 8, 2026
ca96d8c
fix(kin): refuse repository-dependent memory git without .git
GLDRoger Nov 8, 2026
9c7fa43
Merge remote-tracking branch 'origin/kin-lead-3-writer' into HEAD
GLDRoger Nov 8, 2026
0dabb06
feat(kin): add lead memory and journal toolkit (LEAD-7)
GLDRoger Nov 8, 2026
05c2c37
fix(kin): memory git requires a real .git directory; report it as che…
GLDRoger Nov 8, 2026
cb8f2ff
fix(kin): bound secret scanning and scan only merged changes
GLDRoger Nov 8, 2026
db4e149
Merge remote-tracking branch 'origin/kin-lead-3-writer' into HEAD
GLDRoger Nov 8, 2026
47f2625
fix(kin): gate owner review and harden routine delivery
GLDRoger Nov 8, 2026
fe4c679
Merge remote-tracking branch 'origin/kin-lead-3-writer' into HEAD
GLDRoger Nov 8, 2026
c1d35aa
Merge remote-tracking branch 'origin/kin-lead-3-writer' into HEAD
GLDRoger Nov 8, 2026
0a5f36d
fix(kin): bound secret scan work and preserve token boundaries
GLDRoger Nov 8, 2026
a8aa4f4
fix(kin): harden lead memory authority and wake-up recovery
GLDRoger Nov 8, 2026
1e11dc3
fix(kin): avoid routine deadlocks and retain transient fires
GLDRoger Nov 8, 2026
ec5bf6d
fix(kin): scan realistic journals and wrapped secret prefixes
GLDRoger Nov 8, 2026
195491d
fix(kin): treat nested decode errors as permanent; warn once per retr…
GLDRoger Nov 8, 2026
33baed6
merge: stack lead memory tools on routines
GLDRoger Nov 8, 2026
03db261
fix(kin): preserve deferral lifecycle and recovery retries
GLDRoger Nov 8, 2026
3039381
fix(kin): skip short anchorless wrapped runs; yield in the line loop
GLDRoger Nov 8, 2026
a8b5dff
fix(kin): bounded decode-cause walk; retries log at debug, drops warn
GLDRoger Nov 8, 2026
300ab57
Merge remote-tracking branch 'origin/kin-trig-9-routines' into HEAD
GLDRoger Nov 8, 2026
7df9d3f
docs(kin): correct JWT header limit; note path-list work limit
GLDRoger Nov 8, 2026
bb4f367
fix(kin): bind agent credentials to Kin MCP endpoint
GLDRoger Nov 8, 2026
a294fa8
chore(kin): merge kin into kin-lead-3-writer
GLDRoger Nov 8, 2026
30c2c6d
chore(kin): merge kin-lead-3-writer into kin-trig-16-secret-scan
GLDRoger Nov 8, 2026
a42eee2
chore(kin): merge kin-lead-3-writer into kin-trig-9-routines
GLDRoger Nov 8, 2026
78b6dc1
chore(kin): merge kin-trig-16-secret-scan into kin-trig-9-routines
GLDRoger Nov 8, 2026
a993df1
test(kin): provide JudgeShadow.layerOff in routines testkit
GLDRoger Nov 8, 2026
fc4384d
chore(kin): merge kin-trig-9-routines into kin-lead-7-toolkit
GLDRoger Nov 8, 2026
11fb127
fix(kin): wire the real secret scanner into the lead toolkit
GLDRoger Nov 8, 2026
e048b9c
chore(auth): merge kin into kin-auth-thumbprint-revoke
GLDRoger Nov 8, 2026
936f817
fix(auth): renumber the auth session keys migration to K015
GLDRoger Nov 8, 2026
34f9830
chore(auth): merge kin-lead-7-toolkit into kin-auth-thumbprint-revoke
GLDRoger Nov 8, 2026
0ef4595
docs(kin): point approvals spec at K015_AuthSessionKeys
GLDRoger Nov 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/server/src/auth/EnvironmentAuth.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { authHooks } from "../kin/auth/authHooks.ts";
import {
AuthAccessTokenType,
AuthAccessWriteScope,
Expand Down Expand Up @@ -710,6 +711,7 @@ function isBrowserOriginAllowed(

/** @public */
export const make = Effect.gen(function* () {
const kinHooks = yield* authHooks;
const policy = yield* EnvironmentAuthPolicy.EnvironmentAuthPolicy;
const bootstrapCredentials = yield* PairingGrantStore.PairingGrantStore;
const sessions = yield* SessionStore.SessionStore;
Expand Down Expand Up @@ -961,6 +963,7 @@ export const make = Effect.gen(function* () {
}).pipe(
Effect.flatMap((grant) =>
Effect.gen(function* () {
yield* kinHooks.checkExchange(input?.proofKeyThumbprint, grant);
const grantedScopes =
requestedScopes === undefined
? grant.scopes
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/auth/PairingGrantStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import * as ServerConfig from "../config.ts";
import * as AuthPairingLinks from "../persistence/AuthPairingLinks.ts";

export interface BootstrapGrant {
readonly pairingLinkId?: string;
readonly method: ServerAuthBootstrapMethod;
readonly scopes: ReadonlyArray<AuthEnvironmentScope>;
readonly subject: string;
Expand Down Expand Up @@ -568,6 +569,7 @@ const make = Effect.gen(function* () {
if (Option.isSome(consumed)) {
yield* emitRemoved(consumed.value.id);
return {
pairingLinkId: consumed.value.id,
method: consumed.value.method,
scopes: consumed.value.scopes,
subject: consumed.value.subject,
Expand Down
3 changes: 2 additions & 1 deletion apps/server/src/auth/SessionStore.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SessionHooks } from "../kin/auth/sessionHooks.ts";
import {
AuthSessionId,
AuthStandardClientScopes,
Expand Down Expand Up @@ -1098,7 +1099,7 @@ const make = Effect.gen(function* () {
);
});

return SessionStore.of({
return (yield* SessionHooks).wrap({ connectedSessionsRef, emitRemoved })({
cookieName,
legacyCookieName,
issue,
Expand Down
5 changes: 3 additions & 2 deletions apps/server/src/cli/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as References from "effect/References";
import * as Schema from "effect/Schema";
import { Argument, Command, Flag, GlobalFlag } from "effect/cli";

import * as EnvironmentAuth from "../auth/EnvironmentAuth.ts";
import * as EnvironmentAuth from "../kin/auth/EnvironmentAuthRuntime.ts";

import {
formatIssuedPairingCredential,
Expand Down Expand Up @@ -88,6 +88,7 @@ const tokenOnlyFlag = Flag.Boolean("token-only").pipe(
);

const pairingCreateCommand = Command.make("create", {
...EnvironmentAuth.repairFlags,
...authLocationFlags,
scopes: authScopesFlag(AuthStandardClientScopes),
ttl: ttlFlag,
Expand All @@ -101,7 +102,7 @@ const pairingCreateCommand = Command.make("create", {
flags,
(environmentAuth) =>
Effect.gen(function* () {
const issued = yield* environmentAuth.createPairingLink({
const issued = yield* EnvironmentAuth.createRepairPairing(environmentAuth, flags, {
scopes: flags.scopes,
subject: "one-time-token",
...(Option.isSome(flags.ttl) ? { ttl: flags.ttl.value } : {}),
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/cli/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { Command, Flag, GlobalFlag, Prompt } from "effect/cli";
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http";
import * as HttpApiClient from "effect/http-api/HttpApiClient";

import * as EnvironmentAuth from "../auth/EnvironmentAuth.ts";
import * as EnvironmentAuth from "../kin/auth/EnvironmentAuthRuntime.ts";
import * as ManagedLimits from "../policy/managedLimits.ts";
import * as ManagedPolicy from "../policy/ManagedPolicy.ts";
import * as ServerSecretStore from "../auth/ServerSecretStore.ts";
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/cli/pair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import * as Schema from "effect/Schema";
import { Command, Flag, GlobalFlag } from "effect/cli";
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http";

import * as EnvironmentAuth from "../auth/EnvironmentAuth.ts";
import * as EnvironmentAuth from "../kin/auth/EnvironmentAuthRuntime.ts";
import * as ServerConfig from "../config.ts";
import * as ManagedLimits from "../policy/managedLimits.ts";
import * as ManagedPolicy from "../policy/ManagedPolicy.ts";
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/cli/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Argument, Command, Flag, GlobalFlag } from "effect/cli";
import { FetchHttpClient, HttpClient, HttpClientError } from "effect/http";
import * as HttpApiClient from "effect/http-api/HttpApiClient";

import * as EnvironmentAuth from "../auth/EnvironmentAuth.ts";
import * as EnvironmentAuth from "../kin/auth/EnvironmentAuthRuntime.ts";
import * as ServerSecretStore from "../auth/ServerSecretStore.ts";

import * as ServerConfig from "../config.ts";
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/cli/thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import * as Stdio from "effect/Stdio";
import * as Stream from "effect/Stream";
import { Argument, Command, Flag, GlobalFlag } from "effect/cli";

import * as EnvironmentAuth from "../auth/EnvironmentAuth.ts";
import * as EnvironmentAuth from "../kin/auth/EnvironmentAuthRuntime.ts";
import * as ServerConfig from "../config.ts";
import { mcpToolSession, type McpToolSession } from "../mcp/AcpMcpStdioBridge.ts";
import { expandHomePath } from "../os-jank.ts";
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/kin/KinServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { KinChatHub } from "./chat/KinChatHub.ts";
import { KinBudget } from "./lead/KinBudget.ts";
import { KinEventQueue } from "./lead/KinEventQueue.ts";

export type Services = KinIdentity | KinChatService | KinBudget | KinEventQueue;
export type Services = KinIdentity | KinChatService | KinBudget | KinEventQueue | KinChatHub;

export class KinServer extends Context.Service<
KinServer,
Expand Down
17 changes: 17 additions & 0 deletions apps/server/src/kin/auth/EnvironmentAuthRuntime.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export * from "../../auth/EnvironmentAuth.ts";
import * as EnvironmentAuth from "../../auth/EnvironmentAuth.ts";
import * as Layer from "effect/Layer";
import * as ProofKeySessions from "./ProofKeySessions.ts";
import * as ManagedPolicy from "../../policy/ManagedPolicy.ts";
import * as ServerSecretStore from "../../auth/ServerSecretStore.ts";
import * as SqlitePersistence from "../../persistence/Sqlite.ts";
import * as ServerEnvironment from "../../environment/ServerEnvironment.ts";

export const layerRuntime = EnvironmentAuth.layer.pipe(
Layer.provideMerge(ProofKeySessions.layerCli),
Layer.provideMerge(ManagedPolicy.layer),
Layer.provideMerge(Layer.mergeAll(ServerSecretStore.layer, SqlitePersistence.layerConfig)),
Layer.provideMerge(ServerEnvironment.layerIdentity),
);

export { flags as repairFlags, create as createRepairPairing } from "./repairPairing.ts";
Loading