@rynfar/meridian 1.62.7 → 1.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/bin/meridian-launchd.sh +128 -0
- package/dist/{cli-21w6xm0d.js → cli-4ghkaajs.js} +27332 -12903
- package/dist/{cli-xmweegb1.js → cli-8yp89fan.js} +52 -0
- package/dist/cli-pbvm9kc2.js +760 -0
- package/dist/cli.js +71 -12
- package/dist/meridian-v2.js +139 -0
- package/dist/{pluginPage-03q5j753.js → pluginPage-n3gdtbmj.js} +1 -1
- package/dist/{profileCli-39vshwdn.js → profileCli-ap7eg985.js} +2 -2
- package/dist/{profilePage-gtazq15d.js → profilePage-vfj2dbhn.js} +1 -1
- package/dist/proxy/adapter.d.ts +13 -0
- package/dist/proxy/adapter.d.ts.map +1 -1
- package/dist/proxy/adapters/opencode.d.ts +7 -0
- package/dist/proxy/adapters/opencode.d.ts.map +1 -1
- package/dist/proxy/buildInfo.d.ts +94 -0
- package/dist/proxy/buildInfo.d.ts.map +1 -0
- package/dist/proxy/cwd.d.ts.map +1 -1
- package/dist/proxy/errors.d.ts.map +1 -1
- package/dist/proxy/passthroughDenial.d.ts +17 -0
- package/dist/proxy/passthroughDenial.d.ts.map +1 -0
- package/dist/proxy/passthroughEarlyStop.d.ts +52 -7
- package/dist/proxy/passthroughEarlyStop.d.ts.map +1 -1
- package/dist/proxy/passthroughTools.d.ts.map +1 -1
- package/dist/proxy/query.d.ts +8 -0
- package/dist/proxy/query.d.ts.map +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/session/cache.d.ts +11 -2
- package/dist/proxy/session/cache.d.ts.map +1 -1
- package/dist/proxy/session/crossProcessTurnCoordinator.d.ts +40 -0
- package/dist/proxy/session/crossProcessTurnCoordinator.d.ts.map +1 -0
- package/dist/proxy/session/durableFileSystem.d.ts +21 -0
- package/dist/proxy/session/durableFileSystem.d.ts.map +1 -0
- package/dist/proxy/session/lineage.d.ts +20 -0
- package/dist/proxy/session/lineage.d.ts.map +1 -1
- package/dist/proxy/session/processIncarnation.d.ts +46 -0
- package/dist/proxy/session/processIncarnation.d.ts.map +1 -0
- package/dist/proxy/session/recoveryClaim.d.ts +19 -0
- package/dist/proxy/session/recoveryClaim.d.ts.map +1 -0
- package/dist/proxy/session/sdkProcessGate.d.ts +19 -0
- package/dist/proxy/session/sdkProcessGate.d.ts.map +1 -0
- package/dist/proxy/sessionLifecycle.d.ts +105 -0
- package/dist/proxy/sessionLifecycle.d.ts.map +1 -0
- package/dist/proxy/sessionStore.d.ts +53 -7
- package/dist/proxy/sessionStore.d.ts.map +1 -1
- package/dist/proxy/setup.d.ts +35 -10
- package/dist/proxy/setup.d.ts.map +1 -1
- package/dist/proxy/types.d.ts +4 -0
- package/dist/proxy/types.d.ts.map +1 -1
- package/dist/proxy/updateCheck.d.ts +31 -0
- package/dist/proxy/updateCheck.d.ts.map +1 -0
- package/dist/server.js +5 -5
- package/dist/setup-4v3zg3c0.js +33 -0
- package/dist/telemetry/profileBar.d.ts +3 -3
- package/dist/telemetry/profileBar.d.ts.map +1 -1
- package/dist/telemetry/settingsPage.d.ts +1 -1
- package/dist/telemetry/settingsPage.d.ts.map +1 -1
- package/package.json +10 -5
- package/plugin/meridian-v2.ts +190 -0
- package/dist/cli-pc0mtjjv.js +0 -167
- package/dist/setup-0x573t61.js +0 -19
- package/dist/{cli-xfbhn15a.js → cli-0ed6j0vk.js} +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/proxy/query.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/proxy/query.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAW,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAEnG,OAAO,EAAE,0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MAAM,aAAa,CAAA;AAKpB,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/proxy/server.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,CAAA;AAGvD,YAAY,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAA;AAKpB,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAuDnG,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EAIpB,KAAK,aAAa,EAGnB,MAAM,mBAAmB,CAAA;AAI1B,OAAO,EAA+B,iBAAiB,EAAE,mBAAmB,EAA4D,MAAM,iBAAiB,CAAA;AAsC/J,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA;AACjD,YAAY,EAAE,aAAa,EAAE,CAAA;AAiY7B,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CAywMhF;AAWD,wBAAgB,gCAAgC,IAAI,IAAI,CAavD;AAED,wBAAsB,gBAAgB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAuLhG"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Manages in-memory LRU caches for session and fingerprint lookups,
|
|
5
5
|
* coordinates with the shared file store for cross-proxy session resume.
|
|
6
6
|
*/
|
|
7
|
+
import { type StoredSessionGeneration } from "../sessionStore";
|
|
7
8
|
import { type SessionState, type TokenUsage, type LineageResult } from "./lineage";
|
|
8
9
|
export declare function getMaxSessionsLimit(): number;
|
|
9
10
|
/** Clear all session caches (used in tests).
|
|
@@ -14,7 +15,7 @@ export declare function clearSessionCache(): void;
|
|
|
14
15
|
export declare function evictSession(sessionId: string | undefined, workingDirectory?: string, messages?: Array<{
|
|
15
16
|
role: string;
|
|
16
17
|
content: any;
|
|
17
|
-
}
|
|
18
|
+
}>, expectedGeneration?: StoredSessionGeneration): boolean;
|
|
18
19
|
/** Look up a cached session by header or fingerprint.
|
|
19
20
|
* Returns a LineageResult that classifies the mutation and includes the
|
|
20
21
|
* session state needed for the correct SDK action. */
|
|
@@ -33,5 +34,13 @@ export declare function getSessionByClaudeId(claudeSessionId: string): SessionSt
|
|
|
33
34
|
export declare function storeSession(sessionId: string | undefined, messages: Array<{
|
|
34
35
|
role: string;
|
|
35
36
|
content: unknown;
|
|
36
|
-
}>, claudeSessionId: string, workingDirectory?: string, sdkMessageUuids?: Array<string | null>, contextUsage?: TokenUsage, passthroughToolCallAssistantUuid?: string | null, passthroughToolCallIds?: string[] | null
|
|
37
|
+
}>, claudeSessionId: string, workingDirectory?: string, sdkMessageUuids?: Array<string | null>, contextUsage?: TokenUsage, passthroughToolCallAssistantUuid?: string | null, passthroughToolCallIds?: string[] | null, currentTranscript?: {
|
|
38
|
+
sessionId: string;
|
|
39
|
+
configDir: string;
|
|
40
|
+
projectDir?: string;
|
|
41
|
+
}, sourceTranscript?: {
|
|
42
|
+
sessionId: string;
|
|
43
|
+
configDir: string;
|
|
44
|
+
projectDir?: string;
|
|
45
|
+
}, expectedGeneration?: StoredSessionGeneration | null): StoredSessionGeneration | false;
|
|
37
46
|
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/proxy/session/cache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/proxy/session/cache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAOL,KAAK,uBAAuB,EAC7B,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,WAAW,CAAA;AAMlB,wBAAgB,mBAAmB,IAAI,MAAM,CAW5C;AAqCD;kGACkG;AAClG,wBAAgB,iBAAiB,SAYhC;AAED;iFACiF;AACjF,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,gBAAgB,CAAC,EAAE,MAAM,EACzB,QAAQ,CAAC,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAE,CAAC,EAChD,kBAAkB,CAAC,EAAE,uBAAuB,GAC3C,OAAO,CA0BT;AA6DD;;uDAEuD;AACvD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,QAAQ,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAE,CAAC,EAC/C,gBAAgB,CAAC,EAAE,MAAM,GACxB,aAAa,CA+Cf;AAED;;uFAEuF;AACvF,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAWtF;AAED;;;yFAGyF;AACzF,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,QAAQ,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,EACnD,eAAe,EAAE,MAAM,EACvB,gBAAgB,CAAC,EAAE,MAAM,EACzB,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,EACtC,YAAY,CAAC,EAAE,UAAU,EACzB,gCAAgC,CAAC,EAAE,MAAM,GAAG,IAAI,EAChD,sBAAsB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EACxC,iBAAiB,CAAC,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EACjF,gBAAgB,CAAC,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EAChF,kBAAkB,CAAC,EAAE,uBAAuB,GAAG,IAAI,GAClD,uBAAuB,GAAG,KAAK,CA4CjC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface CrossProcessTurnCoordinatorOptions {
|
|
2
|
+
/** Maximum time an acquire may wait. Acquires always have a finite bound. */
|
|
3
|
+
acquireTimeoutMs?: number;
|
|
4
|
+
/** A lock with no fresh heartbeat for this long may be recovered. */
|
|
5
|
+
staleAfterMs?: number;
|
|
6
|
+
/** Defaults to one third of `staleAfterMs`. Must be shorter than it. */
|
|
7
|
+
heartbeatIntervalMs?: number;
|
|
8
|
+
/** Delay between attempts while another process owns the turn. */
|
|
9
|
+
retryDelayMs?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface CrossProcessTurnLease {
|
|
12
|
+
readonly waitedMs: number;
|
|
13
|
+
/** Stop the heartbeat and release the lock if this lease still owns it. */
|
|
14
|
+
release(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export declare class CrossProcessTurnAcquireTimeoutError extends Error {
|
|
17
|
+
constructor(timeoutMs: number);
|
|
18
|
+
}
|
|
19
|
+
export declare class CrossProcessTurnOwnershipError extends Error {
|
|
20
|
+
constructor(message?: string);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Serializes one logical turn key across processes using atomic filesystem
|
|
24
|
+
* directory operations. Lock errors never cause an unlocked turn to proceed.
|
|
25
|
+
*/
|
|
26
|
+
export declare class CrossProcessTurnCoordinator {
|
|
27
|
+
private readonly root;
|
|
28
|
+
private readonly acquireTimeoutMs;
|
|
29
|
+
private readonly staleAfterMs;
|
|
30
|
+
private readonly heartbeatIntervalMs;
|
|
31
|
+
private readonly retryDelayMs;
|
|
32
|
+
constructor(root: string, options?: CrossProcessTurnCoordinatorOptions);
|
|
33
|
+
acquire(key: string, signal?: AbortSignal): Promise<CrossProcessTurnLease>;
|
|
34
|
+
private tryAcquire;
|
|
35
|
+
private createLease;
|
|
36
|
+
private recover;
|
|
37
|
+
private releaseOwned;
|
|
38
|
+
private wait;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=crossProcessTurnCoordinator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crossProcessTurnCoordinator.d.ts","sourceRoot":"","sources":["../../../src/proxy/session/crossProcessTurnCoordinator.ts"],"names":[],"mappings":"AAwCA,MAAM,WAAW,kCAAkC;IACjD,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,wEAAwE;IACxE,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,2EAA2E;IAC3E,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB;AAkBD,qBAAa,mCAAoC,SAAQ,KAAK;gBAChD,SAAS,EAAE,MAAM;CAI9B;AAED,qBAAa,8BAA+B,SAAQ,KAAK;gBAC3C,OAAO,SAAqD;CAIzE;AAmRD;;;GAGG;AACH,qBAAa,2BAA2B;IACtC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAQ;IAC7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAQ;IACzC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAQ;IACrC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAQ;IAC5C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAQ;gBAEzB,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,kCAAuC;IAwBpE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;YA2ClE,UAAU;IA2CxB,OAAO,CAAC,WAAW;YA0CL,OAAO;YA2CP,YAAY;IAgC1B,OAAO,CAAC,IAAI;CAsBb"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persist directory metadata where the runtime exposes a directory handle.
|
|
3
|
+
*
|
|
4
|
+
* Node on Windows does not support opening directories for fsync. Windows has
|
|
5
|
+
* no equivalent API here, so preserve the fsynced-file + atomic-rename order
|
|
6
|
+
* and skip only this unsupported metadata flush. On supported platforms every
|
|
7
|
+
* open, sync, and close error remains fail-closed.
|
|
8
|
+
*/
|
|
9
|
+
export declare function syncDirectoryDurably(path: string): Promise<void>;
|
|
10
|
+
/** Synchronous form for the session store's synchronous lock protocol. */
|
|
11
|
+
export declare function syncDirectoryDurablySync(path: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Classify an atomic directory publication collision without masking a real
|
|
14
|
+
* Windows permission or filesystem error. Windows reports EPERM/EACCES rather
|
|
15
|
+
* than EEXIST when the destination directory is already present, so accept
|
|
16
|
+
* those codes only after proving that the destination currently exists.
|
|
17
|
+
*/
|
|
18
|
+
export declare function directoryRenameWasBlocked(error: unknown, destination: string): Promise<boolean>;
|
|
19
|
+
/** Synchronous form for the session store's recovery-claim protocol. */
|
|
20
|
+
export declare function directoryRenameWasBlockedSync(error: unknown, destination: string): boolean;
|
|
21
|
+
//# sourceMappingURL=durableFileSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"durableFileSystem.d.ts","sourceRoot":"","sources":["../../../src/proxy/session/durableFileSystem.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQtE;AAED,0EAA0E;AAC1E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAQ3D;AAWD;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,OAAO,CAAC,CAalB;AAED,wEAAwE;AACxE,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAa1F"}
|
|
@@ -50,6 +50,17 @@ export interface SessionState {
|
|
|
50
50
|
passthroughToolCallIds?: string[];
|
|
51
51
|
/** Last observed token usage for this session (from SDK message_start / message_delta events) */
|
|
52
52
|
contextUsage?: TokenUsage;
|
|
53
|
+
/** Exact SDK transcript roots for cross-process lifecycle retention. */
|
|
54
|
+
currentTranscript?: {
|
|
55
|
+
sessionId: string;
|
|
56
|
+
configDir: string;
|
|
57
|
+
projectDir?: string;
|
|
58
|
+
};
|
|
59
|
+
previousTranscript?: {
|
|
60
|
+
sessionId: string;
|
|
61
|
+
configDir: string;
|
|
62
|
+
projectDir?: string;
|
|
63
|
+
};
|
|
53
64
|
}
|
|
54
65
|
/**
|
|
55
66
|
* Associate SDK assistant events from the current upstream run with the single
|
|
@@ -58,6 +69,15 @@ export interface SessionState {
|
|
|
58
69
|
* assistant UUID as the undo checkpoint for the consolidated client turn.
|
|
59
70
|
*/
|
|
60
71
|
export declare function withClientAssistantUuid(existing: Array<string | null>, clientMessageCount: number, uuid: unknown): Array<string | null>;
|
|
72
|
+
/**
|
|
73
|
+
* Reconcile rollback UUIDs with the session the SDK actually returned.
|
|
74
|
+
*
|
|
75
|
+
* A fork remaps every copied transcript UUID, so UUIDs inherited from the
|
|
76
|
+
* resumed session are invalid in the returned session. The one UUID observed
|
|
77
|
+
* for this request's new client-visible assistant remains valid and occupies
|
|
78
|
+
* its future client message slot.
|
|
79
|
+
*/
|
|
80
|
+
export declare function reconcileReturnedSessionUuids(existing: Array<string | null>, clientMessageCount: number, currentAssistantUuid: string | null, resumeSessionId: string | undefined, returnedSessionId: string | undefined): Array<string | null>;
|
|
61
81
|
/**
|
|
62
82
|
* Result of lineage verification — classifies the mutation and provides
|
|
63
83
|
* the information needed to take the correct SDK action.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineage.d.ts","sourceRoot":"","sources":["../../../src/proxy/session/lineage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,4EAA4E;AAC5E,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,2BAA2B,CAAC,EAAE,MAAM,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,kFAAkF;AAClF,MAAM,WAAW,UAAW,SAAQ,mBAAmB;IACrD,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAA;CACnC;AAED;;6DAE6D;AAC7D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,mBAAmB,CAG5E;AAED;0EAC0E;AAC1E,eAAO,MAAM,yBAAyB,IAAI,CAAA;AAE1C,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB;;qDAEiD;IACjD,WAAW,EAAE,MAAM,CAAA;IACnB;;kCAE8B;IAC9B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB;;iDA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
|
|
2
|
+
export type ProcessStartIdKind = "linux-proc-start-ticks" | "darwin-ps-lstart" | "windows-start-ticks";
|
|
3
|
+
/**
|
|
4
|
+
* OS-backed identity for one process incarnation.
|
|
5
|
+
*
|
|
6
|
+
* `hostId` identifies the machine (and Linux PID namespace), `bootId`
|
|
7
|
+
* identifies one boot of that machine, and `startId` distinguishes PID reuse
|
|
8
|
+
* within the boot. Raw machine IDs are hashed before they are persisted.
|
|
9
|
+
*/
|
|
10
|
+
export interface ProcessIncarnation {
|
|
11
|
+
version: typeof PROCESS_INCARNATION_VERSION;
|
|
12
|
+
pid: number;
|
|
13
|
+
hostId: string;
|
|
14
|
+
bootId: string;
|
|
15
|
+
startId: string;
|
|
16
|
+
startIdKind: ProcessStartIdKind;
|
|
17
|
+
}
|
|
18
|
+
export type ProcessIncarnationProbe = "alive" | "dead" | "indeterminate";
|
|
19
|
+
export interface LocalBootIdentity {
|
|
20
|
+
hostId: string;
|
|
21
|
+
bootId: string;
|
|
22
|
+
}
|
|
23
|
+
export type ProcessStartObservation = {
|
|
24
|
+
status: "found";
|
|
25
|
+
startId: string;
|
|
26
|
+
startIdKind: ProcessStartIdKind;
|
|
27
|
+
} | {
|
|
28
|
+
status: "missing";
|
|
29
|
+
} | {
|
|
30
|
+
status: "indeterminate";
|
|
31
|
+
};
|
|
32
|
+
export declare function parseProcessIncarnation(value: unknown): ProcessIncarnation | undefined;
|
|
33
|
+
export declare function parseProcessIncarnationJson(raw: string): ProcessIncarnation | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Pure recovery decision. Only `dead` is permission to retire an owner's lock.
|
|
36
|
+
* Unknown hosts and every unavailable or malformed observation fail closed.
|
|
37
|
+
*/
|
|
38
|
+
export declare function evaluateProcessIncarnation(owner: ProcessIncarnation, localBoot: LocalBootIdentity | undefined, observedStart: ProcessStartObservation | undefined): ProcessIncarnationProbe;
|
|
39
|
+
/** Parse field 22 (`starttime`) without assuming that comm contains no `)`. */
|
|
40
|
+
export declare function parseLinuxProcStatStartId(raw: string, expectedPid: number): string | undefined;
|
|
41
|
+
/** Capture metadata for a lock created by `pid` (normally the current process). */
|
|
42
|
+
export declare function captureProcessIncarnation(pid?: number): ProcessIncarnation | undefined;
|
|
43
|
+
/** Probe one stored owner. Recovery callers must act only on `dead`. */
|
|
44
|
+
export declare function probeProcessIncarnation(owner: ProcessIncarnation): ProcessIncarnationProbe;
|
|
45
|
+
export declare function processIncarnationIsDead(owner: ProcessIncarnation): boolean;
|
|
46
|
+
//# sourceMappingURL=processIncarnation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processIncarnation.d.ts","sourceRoot":"","sources":["../../../src/proxy/session/processIncarnation.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,2BAA2B,IAAI,CAAA;AAE5C,MAAM,MAAM,kBAAkB,GAC1B,wBAAwB,GACxB,kBAAkB,GAClB,qBAAqB,CAAA;AAEzB;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,2BAA2B,CAAA;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,kBAAkB,CAAA;CAChC;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,MAAM,GAAG,eAAe,CAAA;AAExE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,uBAAuB,GAC/B;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,kBAAkB,CAAA;CAAE,GACrE;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,CAAA;AAkC/B,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAqBtF;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAMvF;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,kBAAkB,EACzB,SAAS,EAAE,iBAAiB,GAAG,SAAS,EACxC,aAAa,EAAE,uBAAuB,GAAG,SAAS,GACjD,uBAAuB,CAsBzB;AA6HD,+EAA+E;AAC/E,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ9F;AAsDD,mFAAmF;AACnF,wBAAgB,yBAAyB,CAAC,GAAG,SAAc,GAAG,kBAAkB,GAAG,SAAS,CAkB3F;AAED,wEAAwE;AACxE,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,kBAAkB,GAAG,uBAAuB,CAS1F;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAE3E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ProcessIncarnation } from "./processIncarnation";
|
|
2
|
+
export declare const RECOVERY_CLAIM_VERSION = 2;
|
|
3
|
+
export interface RecoveryClaimOwner {
|
|
4
|
+
version: typeof RECOVERY_CLAIM_VERSION;
|
|
5
|
+
generation: string;
|
|
6
|
+
token: string;
|
|
7
|
+
pid: number;
|
|
8
|
+
hostname: string;
|
|
9
|
+
createdAt: number;
|
|
10
|
+
incarnation: ProcessIncarnation;
|
|
11
|
+
}
|
|
12
|
+
export declare function createRecoveryClaimOwner(generation: string): RecoveryClaimOwner;
|
|
13
|
+
export declare function parseRecoveryClaimOwner(value: unknown): RecoveryClaimOwner | undefined;
|
|
14
|
+
export declare function parseRecoveryClaimOwnerJson(raw: string): RecoveryClaimOwner | undefined;
|
|
15
|
+
/** Only an authoritative OS incarnation mismatch proves that an owner is dead. */
|
|
16
|
+
export declare function recoveryClaimOwnerIsDead(owner: RecoveryClaimOwner, probe?: (incarnation: ProcessIncarnation) => boolean): boolean;
|
|
17
|
+
export declare function getRecoveryClaimPath(lockPath: string, generation: string): string;
|
|
18
|
+
export declare function getRecoveryClaimTombstonePath(claimPath: string, claimToken: string): string;
|
|
19
|
+
//# sourceMappingURL=recoveryClaim.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recoveryClaim.d.ts","sourceRoot":"","sources":["../../../src/proxy/session/recoveryClaim.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAA;AAE7B,eAAO,MAAM,sBAAsB,IAAI,CAAA;AAEvC,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,sBAAsB,CAAA;IACtC,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,kBAAkB,CAAA;CAChC;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,CAa/E;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CA4BtF;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAMvF;AAED,kFAAkF;AAClF,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,kBAAkB,EACzB,KAAK,GAAE,CAAC,WAAW,EAAE,kBAAkB,KAAK,OAAkC,GAC7E,OAAO,CAET;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAGjF;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAG3F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SpawnedProcess, SpawnOptions } from "@anthropic-ai/claude-agent-sdk";
|
|
2
|
+
import { type ProcessIncarnation } from "./processIncarnation";
|
|
3
|
+
export interface SdkProcessGate {
|
|
4
|
+
readonly executor: ProcessIncarnation;
|
|
5
|
+
/** False means a crashed proxy's lease must remain fail-closed forever. */
|
|
6
|
+
readonly recoverableAfterCrash: boolean;
|
|
7
|
+
readonly spawnClaudeCodeProcess: (options: SpawnOptions) => SpawnedProcess;
|
|
8
|
+
/** True only after the exact wrapper/CLI process has exited safely. */
|
|
9
|
+
closeAndJoin(timeoutMs?: number): Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Start a harmless gated wrapper and capture its exact incarnation before the
|
|
13
|
+
* SDK can execute Claude Code. POSIX wrappers `exec` the CLI in the same PID.
|
|
14
|
+
* Windows keeps a PowerShell parent for the complete CLI lifetime; crash
|
|
15
|
+
* recovery of that lease is deliberately disabled because Windows has no
|
|
16
|
+
* built-in, authoritative descendant-group incarnation.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createSdkProcessGate(root: string, attachExecutor: (executor: ProcessIncarnation, recoverableAfterCrash: boolean) => Promise<void>, onStderr?: (data: string) => void): Promise<SdkProcessGate>;
|
|
19
|
+
//# sourceMappingURL=sdkProcessGate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdkProcessGate.d.ts","sourceRoot":"","sources":["../../../src/proxy/session/sdkProcessGate.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACb,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAA;IACrC,2EAA2E;IAC3E,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAA;IACvC,QAAQ,CAAC,sBAAsB,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,cAAc,CAAA;IAC1E,uEAAuE;IACvE,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CACnD;AAuJD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,CAAC,QAAQ,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,EAC/F,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAChC,OAAO,CAAC,cAAc,CAAC,CAmGzB"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { type ProcessIncarnation } from "./session/processIncarnation";
|
|
2
|
+
export interface TranscriptLocator {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
/** The absolute CLAUDE_CONFIG_DIR which owns this transcript. */
|
|
5
|
+
configDir: string;
|
|
6
|
+
/** SDK project directory, passed as deleteSession(..., { dir }). */
|
|
7
|
+
projectDir?: string;
|
|
8
|
+
/** Opaque physical-ownership fence. Omitted only on legacy store locators. */
|
|
9
|
+
lifecycleGeneration?: string;
|
|
10
|
+
}
|
|
11
|
+
export type TranscriptResourceState = "prepared" | "live" | "retired" | "deleting" | "deleted";
|
|
12
|
+
export type SessionDeleter = (locator: TranscriptLocator) => Promise<void>;
|
|
13
|
+
export interface SessionLifecycleOptions {
|
|
14
|
+
/** Test seam. Production callers should use getSessionStoreDir(). */
|
|
15
|
+
storeDir?: string;
|
|
16
|
+
deleter?: SessionDeleter;
|
|
17
|
+
now?: () => number;
|
|
18
|
+
/** Maximum non-live ownership backlog (prepared/retired/deleting). */
|
|
19
|
+
maxPending?: number;
|
|
20
|
+
/** Hard ceiling across every non-deleted owned transcript. */
|
|
21
|
+
maxOwned?: number;
|
|
22
|
+
maxTombstones?: number;
|
|
23
|
+
maxDeletesPerRun?: number;
|
|
24
|
+
lockWaitMs?: number;
|
|
25
|
+
lockRetryMs?: number;
|
|
26
|
+
lockStaleMs?: number;
|
|
27
|
+
preparedGraceMs?: number;
|
|
28
|
+
deletingLeaseMs?: number;
|
|
29
|
+
/** Quarantine after retirement so old readers and rolling upgrades can drain. */
|
|
30
|
+
retiredGraceMs?: number;
|
|
31
|
+
retryBaseMs?: number;
|
|
32
|
+
retryMaxMs?: number;
|
|
33
|
+
deletionTimeoutMs?: number;
|
|
34
|
+
/** Refresh durable mapping pins before each destructive claim. */
|
|
35
|
+
pinProvider?: () => readonly TranscriptLocator[];
|
|
36
|
+
/** Bound one complete sweep, including all child deletions. */
|
|
37
|
+
runTimeoutMs?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface ActiveTranscriptLease {
|
|
40
|
+
token: string;
|
|
41
|
+
resourceKeys: string[];
|
|
42
|
+
}
|
|
43
|
+
export interface ReconcileResult {
|
|
44
|
+
preparedRetired: number;
|
|
45
|
+
liveRetired: number;
|
|
46
|
+
resourcesPinned: number;
|
|
47
|
+
deletingRecovered: number;
|
|
48
|
+
}
|
|
49
|
+
export interface GcResult {
|
|
50
|
+
deleted: number;
|
|
51
|
+
notFound: number;
|
|
52
|
+
failed: number;
|
|
53
|
+
deferred: number;
|
|
54
|
+
}
|
|
55
|
+
export declare class SessionLifecycleError extends Error {
|
|
56
|
+
}
|
|
57
|
+
export declare class SessionLifecycleLockError extends SessionLifecycleError {
|
|
58
|
+
}
|
|
59
|
+
export declare class SessionLifecycleCorruptError extends SessionLifecycleError {
|
|
60
|
+
}
|
|
61
|
+
export declare class SessionLifecycleBacklogError extends SessionLifecycleError {
|
|
62
|
+
}
|
|
63
|
+
/** Stable ownership key. The separator prevents ambiguous concatenation. */
|
|
64
|
+
export declare function getTranscriptResourceKey(locator: TranscriptLocator): string;
|
|
65
|
+
/** Persist a cross-process writer lease before an SDK child can touch transcripts. */
|
|
66
|
+
export declare function acquireActiveTranscriptLease(locators: readonly TranscriptLocator[], options?: SessionLifecycleOptions): Promise<ActiveTranscriptLease>;
|
|
67
|
+
/** Arm a writer lease with the exact gated shell/CLI process incarnation. */
|
|
68
|
+
export declare function attachActiveTranscriptExecutor(lease: ActiveTranscriptLease, executor: ProcessIncarnation, options?: SessionLifecycleOptions, executorRecoverable?: boolean): Promise<void>;
|
|
69
|
+
/** Release only this exact writer lease after its child has been joined. */
|
|
70
|
+
export declare function releaseActiveTranscriptLease(lease: ActiveTranscriptLease, options?: SessionLifecycleOptions): Promise<void>;
|
|
71
|
+
/** Persist ownership before the SDK process which can create the transcript starts. */
|
|
72
|
+
export declare function prepareFork(locator: TranscriptLocator, options?: SessionLifecycleOptions): Promise<TranscriptLocator>;
|
|
73
|
+
/** Ensure a legacy/direct-resume locator is journaled without promoting a prepared target. */
|
|
74
|
+
export declare function ensureTranscriptJournaled(locator: TranscriptLocator, options?: SessionLifecycleOptions): Promise<TranscriptLocator>;
|
|
75
|
+
/** Register an existing SDK transcript as Meridian-owned without a fork intent. */
|
|
76
|
+
export declare function registerLiveTranscript(locator: TranscriptLocator, options?: SessionLifecycleOptions): Promise<TranscriptLocator>;
|
|
77
|
+
/** Mark a successfully spawned, Meridian-owned fork as live. */
|
|
78
|
+
export declare function commitFork(locator: TranscriptLocator, options?: SessionLifecycleOptions): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Fence durable mapping publication against GC's final claim transaction.
|
|
81
|
+
* The callback must be synchronous and must perform the session-store CAS.
|
|
82
|
+
* A normal publisher must refer to an already journaled resource. This makes
|
|
83
|
+
* tombstone pruning safe: a delayed old publisher cannot recreate a locator
|
|
84
|
+
* that GC already deleted.
|
|
85
|
+
*/
|
|
86
|
+
export declare function publishPinnedTranscript<T extends boolean | string>(locator: TranscriptLocator, publish: () => T, options?: SessionLifecycleOptions): Promise<T>;
|
|
87
|
+
/**
|
|
88
|
+
* Atomically attach a legacy mapping whose source predates lifecycle metadata.
|
|
89
|
+
* Missing-resource creation is allowed only inside the same lifecycle critical
|
|
90
|
+
* section as the exact session-store CAS, so there is no stale publish gap.
|
|
91
|
+
*/
|
|
92
|
+
export declare function attachPinnedTranscript<T extends boolean | string>(locator: TranscriptLocator, publish: () => T, options?: SessionLifecycleOptions): Promise<T>;
|
|
93
|
+
/** Retire an intent when spawn fails. It remains tracked until SDK deletion succeeds. */
|
|
94
|
+
export declare function abandonFork(locator: TranscriptLocator, options?: SessionLifecycleOptions): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Reconcile durable ownership with caller-provided current and previous pins.
|
|
97
|
+
* Pins are the retention authority. Callers should pass both generations.
|
|
98
|
+
*/
|
|
99
|
+
export declare function reconcile(pins: readonly TranscriptLocator[], options?: SessionLifecycleOptions): Promise<ReconcileResult>;
|
|
100
|
+
/** Delete a bounded batch of unpinned retired transcripts through the supported SDK API. */
|
|
101
|
+
export declare function runGc(pins: readonly TranscriptLocator[], options?: SessionLifecycleOptions): Promise<GcResult>;
|
|
102
|
+
export declare function canonicalizeTranscriptLocator(locator: TranscriptLocator): TranscriptLocator;
|
|
103
|
+
/** Resolve a real Node runtime even when Meridian itself is bundled under Bun. */
|
|
104
|
+
export declare function getSessionGcNodeExecutable(): string;
|
|
105
|
+
//# sourceMappingURL=sessionLifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionLifecycle.d.ts","sourceRoot":"","sources":["../../src/proxy/sessionLifecycle.ts"],"names":[],"mappings":"AA+BA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,8BAA8B,CAAA;AAiBrC,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAA;IACjB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8EAA8E;IAC9E,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,MAAM,GAAG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AAsB,UAAU,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,IAAI,CAAC,CAqBf;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,SAAS,OAAO,GAAG,MAAM,EACtE,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,MAAM,CAAC,EAChB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,CAAC,SAAS,OAAO,GAAG,MAAM,EACrE,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,MAAM,CAAC,EAChB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,CAAC,CAAC,CAEZ;AAuED,yFAAyF;AACzF,wBAAsB,WAAW,CAC/B,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,IAAI,CAAC,CAmBf;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAClC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,eAAe,CAAC,CA4F1B;AAED,4FAA4F;AAC5F,wBAAsB,KAAK,CACzB,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAClC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,QAAQ,CAAC,CAwEnB;AA02BD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,iBAAiB,GAAG,iBAAiB,CAQ3F;AAoDD,kFAAkF;AAClF,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD"}
|
|
@@ -10,8 +10,19 @@
|
|
|
10
10
|
* Keys are either OpenCode session IDs or conversation fingerprints.
|
|
11
11
|
*/
|
|
12
12
|
import type { TokenUsage } from "./session/lineage";
|
|
13
|
+
export interface TranscriptLocator {
|
|
14
|
+
sessionId: string;
|
|
15
|
+
configDir: string;
|
|
16
|
+
projectDir?: string;
|
|
17
|
+
/** Opaque lifecycle ownership fence; absent only on legacy mappings. */
|
|
18
|
+
lifecycleGeneration?: string;
|
|
19
|
+
}
|
|
13
20
|
export interface StoredSession {
|
|
14
21
|
claudeSessionId: string;
|
|
22
|
+
/** Monotonic per-entry revision retained for diagnostics and upgrades. */
|
|
23
|
+
revision?: number;
|
|
24
|
+
/** Unique publication token. Replaced on every durable mapping mutation. */
|
|
25
|
+
generationId?: string;
|
|
15
26
|
createdAt: number;
|
|
16
27
|
lastUsedAt: number;
|
|
17
28
|
messageCount: number;
|
|
@@ -34,19 +45,54 @@ export interface StoredSession {
|
|
|
34
45
|
* Enables recovery when a lineage bug (e.g. false compaction) causes the
|
|
35
46
|
* original session to be abandoned and a new one started. */
|
|
36
47
|
previousClaudeSessionId?: string;
|
|
48
|
+
/** Exact transcript location for the current Claude session. */
|
|
49
|
+
currentTranscript?: TranscriptLocator;
|
|
50
|
+
/** Transcript location retained when the session mapping is replaced. */
|
|
51
|
+
previousTranscript?: TranscriptLocator;
|
|
37
52
|
}
|
|
53
|
+
export type StoredSessionGeneration = string;
|
|
54
|
+
/** Exact, key-bound durable generation used for compare-and-swap fencing. */
|
|
55
|
+
export declare function getStoredSessionGeneration(session: StoredSession, key: string): StoredSessionGeneration;
|
|
56
|
+
export declare function getMaxStoredSessionsLimit(): number;
|
|
38
57
|
/** Set an explicit session store directory. Takes priority over env var.
|
|
39
|
-
* Pass null to clear. For testing only.
|
|
40
|
-
*
|
|
41
|
-
export declare function setSessionStoreDir(dir: string | null,
|
|
58
|
+
* Pass null to clear. For testing only. The legacy options parameter remains
|
|
59
|
+
* accepted for compatibility, but transactions are always locked. */
|
|
60
|
+
export declare function setSessionStoreDir(dir: string | null, _opts?: {
|
|
42
61
|
skipLocking?: boolean;
|
|
43
62
|
}): void;
|
|
63
|
+
/** Return the directory containing the cross-process session store. */
|
|
64
|
+
export declare function getSessionStoreDir(): string;
|
|
65
|
+
/** Read a strict, coherent snapshot for maintenance tasks such as session GC.
|
|
66
|
+
* Unlike lookup helpers, malformed JSON and I/O errors are propagated. */
|
|
67
|
+
export declare function readSessionStoreSnapshot(): Record<string, StoredSession>;
|
|
68
|
+
/** Capture exact durable generations for one adapter session across profile keys. */
|
|
69
|
+
export declare function readSessionStoreGenerationSnapshot(adapterSessionId: string, profileIds?: readonly string[]): Record<string, StoredSessionGeneration>;
|
|
70
|
+
export type SharedSessionLookupResult = {
|
|
71
|
+
status: "found";
|
|
72
|
+
session: StoredSession;
|
|
73
|
+
generation?: StoredSessionGeneration;
|
|
74
|
+
} | {
|
|
75
|
+
status: "missing";
|
|
76
|
+
existing?: StoredSession;
|
|
77
|
+
generation?: StoredSessionGeneration;
|
|
78
|
+
} | {
|
|
79
|
+
status: "error";
|
|
80
|
+
error: Error;
|
|
81
|
+
};
|
|
82
|
+
/** Distinguish an authoritative absence from a transient/corrupt read. */
|
|
83
|
+
export declare function lookupSharedSessionResult(key: string): SharedSessionLookupResult;
|
|
44
84
|
export declare function lookupSharedSession(key: string): StoredSession | undefined;
|
|
85
|
+
export declare function lookupSharedSessionByClaudeIdResult(claudeSessionId: string): SharedSessionLookupResult;
|
|
45
86
|
export declare function lookupSharedSessionByClaudeId(claudeSessionId: string): StoredSession | undefined;
|
|
46
|
-
export declare function storeSharedSession(key: string, claudeSessionId: string, messageCount?: number, lineageHash?: string, messageHashes?: string[], sdkMessageUuids?: Array<string | null>, contextUsage?: TokenUsage, messageBlockHashes?: string[][], passthroughToolCallAssistantUuid?: string | null, passthroughToolCallIds?: string[] | null):
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
export declare function
|
|
87
|
+
export declare function storeSharedSession(key: string, claudeSessionId: string, messageCount?: number, lineageHash?: string, messageHashes?: string[], sdkMessageUuids?: Array<string | null>, contextUsage?: TokenUsage, messageBlockHashes?: string[][], passthroughToolCallAssistantUuid?: string | null, passthroughToolCallIds?: string[] | null, currentTranscript?: TranscriptLocator, sourceTranscript?: TranscriptLocator, expectedGeneration?: StoredSessionGeneration | null): StoredSessionGeneration | false;
|
|
88
|
+
/** Attach an exact transcript locator without changing lineage or SDK identity.
|
|
89
|
+
* The durable revision advances so concurrent readers cannot miss the mutation. */
|
|
90
|
+
export declare function attachSharedTranscriptLocator(key: string, expectedClaudeSessionId: string, locator: TranscriptLocator, expectedGeneration?: StoredSessionGeneration): StoredSessionGeneration | false;
|
|
91
|
+
/** Ensure a single session is absent from the shared file store.
|
|
92
|
+
* Used when a session is detected as stale (e.g. expired upstream).
|
|
93
|
+
* Absence is an idempotent success; false is reserved for a present mapping
|
|
94
|
+
* whose exact expected generation no longer matches. */
|
|
95
|
+
export declare function evictSharedSession(key: string, expectedGeneration?: StoredSessionGeneration): boolean;
|
|
50
96
|
/** Look up recovery information for a session key.
|
|
51
97
|
* Returns the current and previous Claude session IDs, plus derived
|
|
52
98
|
* file paths and CLI commands for conversation recovery. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionStore.d.ts","sourceRoot":"","sources":["../../src/proxy/sessionStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"sessionStore.d.ts","sourceRoot":"","sources":["../../src/proxy/sessionStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA2BH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAgBnD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wEAAwE;IACxE,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,MAAM,CAAA;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA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AAuB,GAAG,KAAK,CAiFjC;AASD;mFACmF;AACnF,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,MAAM,EACX,uBAAuB,EAAE,MAAM,EAC/B,OAAO,EAAE,iBAAiB,EAC1B,kBAAkB,CAAC,EAAE,uBAAuB,GAC3C,uBAAuB,GAAG,KAAK,CAiBjC;AAED;;;yDAGyD;AACzD,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,kBAAkB,CAAC,EAAE,uBAAuB,GAC3C,OAAO,CAeT;AAED;;6DAE6D;AAC7D,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG;IAClD,eAAe,EAAE,MAAM,CAAA;IACvB,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;CACrB,GAAG,SAAS,CAWZ;AAED;uEACuE;AACvE,wBAAgB,kBAAkB,IAAI,KAAK,CAAC;IAC1C,GAAG,EAAE,MAAM,CAAA;IACX,eAAe,EAAE,MAAM,CAAA;IACvB,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAC,CAUD;AAED,wBAAgB,mBAAmB,IAAI,IAAI,CAQ1C"}
|
package/dist/proxy/setup.d.ts
CHANGED
|
@@ -18,22 +18,46 @@ export declare class UnparseableConfigError extends Error {
|
|
|
18
18
|
readonly configPath: string;
|
|
19
19
|
constructor(configPath: string);
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
export declare class MissingV2PluginError extends Error {
|
|
22
|
+
readonly expectedPath: string;
|
|
23
|
+
constructor(expectedPath: string);
|
|
24
|
+
}
|
|
25
|
+
export declare class DuplicateMeridianConfigError extends Error {
|
|
26
|
+
readonly configPath: string;
|
|
27
|
+
readonly siblingPath: string;
|
|
28
|
+
constructor(configPath: string, siblingPath: string);
|
|
29
|
+
}
|
|
25
30
|
export declare function findOpencodeConfigPath(): string;
|
|
26
31
|
/**
|
|
27
32
|
* Resolve the absolute path to plugin/meridian.ts from any entry point.
|
|
28
33
|
* Works whether called from bin/cli.ts (dev) or dist/cli.js (installed).
|
|
29
34
|
*/
|
|
30
35
|
export declare function findPluginPath(fromUrl: string): string;
|
|
36
|
+
export type OpenCodeGeneration = "v1" | "v2";
|
|
37
|
+
export interface OpenCodeDetection {
|
|
38
|
+
generation: OpenCodeGeneration;
|
|
39
|
+
version?: string;
|
|
40
|
+
command?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare const SUPPORTED_OPENCODE_V2_VERSION = "0.0.0-beta-18314";
|
|
43
|
+
/** Resolve the V2 plugin without selecting stale or incomplete artifacts. */
|
|
44
|
+
export declare function findV2PluginPath(fromUrl: string): string;
|
|
45
|
+
/** Parse the public V1 and beta V2 version formats without guessing. */
|
|
46
|
+
export declare function classifyOpenCodeVersion(output: string): OpenCodeDetection | undefined;
|
|
47
|
+
type VersionProbe = (command: string) => string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Detect the installed OpenCode generation with bounded probes. `opencode`
|
|
50
|
+
* remains first so an existing V1 installation keeps its current behavior;
|
|
51
|
+
* side-by-side beta users can select `opencode2` explicitly.
|
|
52
|
+
*/
|
|
53
|
+
export declare function detectOpenCodeGeneration(commands?: readonly string[], probe?: VersionProbe): OpenCodeDetection;
|
|
54
|
+
export declare function pluginPathForGeneration(fromUrl: string, generation: OpenCodeGeneration): string;
|
|
31
55
|
/**
|
|
32
56
|
* Returns true if the meridian plugin is already configured in the
|
|
33
57
|
* OpenCode global config. Returns false if config doesn't exist or
|
|
34
58
|
* plugin is missing.
|
|
35
59
|
*/
|
|
36
|
-
export declare function checkPluginConfigured(configPath?: string): boolean;
|
|
60
|
+
export declare function checkPluginConfigured(configPath?: string, expectedPluginPath?: string): boolean;
|
|
37
61
|
/** Reset the warned-session memory. Used by tests. */
|
|
38
62
|
export declare function clearPluginlessWarnings(): void;
|
|
39
63
|
/**
|
|
@@ -83,12 +107,13 @@ export interface SetupResult {
|
|
|
83
107
|
created: boolean;
|
|
84
108
|
}
|
|
85
109
|
/**
|
|
86
|
-
* Configure the
|
|
110
|
+
* Configure the Meridian plugin in ~/.config/opencode/opencode.json.
|
|
87
111
|
*
|
|
88
|
-
* -
|
|
89
|
-
* - Removes
|
|
112
|
+
* - Uses `plugin` for V1 and canonical `plugins` for V2
|
|
113
|
+
* - Removes Meridian entries from both fields to prevent duplicate plugin IDs
|
|
90
114
|
* - Adds the current plugin path
|
|
91
|
-
* - Leaves all
|
|
115
|
+
* - Leaves all unrelated plugins and settings untouched
|
|
92
116
|
*/
|
|
93
|
-
export declare function runSetup(pluginPath: string, configPath?: string): SetupResult;
|
|
117
|
+
export declare function runSetup(pluginPath: string, configPath?: string, generation?: OpenCodeGeneration): SetupResult;
|
|
118
|
+
export {};
|
|
94
119
|
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/proxy/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/proxy/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;aACnB,UAAU,EAAE,MAAM;gBAAlB,UAAU,EAAE,MAAM;CAI/C;AAED,qBAAa,oBAAqB,SAAQ,KAAK;aACjB,YAAY,EAAE,MAAM;gBAApB,YAAY,EAAE,MAAM;CAIjD;AAED,qBAAa,4BAA6B,SAAQ,KAAK;aAEnC,UAAU,EAAE,MAAM;aAClB,WAAW,EAAE,MAAM;gBADnB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM;CA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AG,SAAS,CAAA;CAC9B,GAAG,MAAM,GAAG,SAAS,CAkBrB;AAMD,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,EACnB,UAAU,GAAE,kBAAyB,GACpC,WAAW,CA2Eb"}
|
package/dist/proxy/types.d.ts
CHANGED
|
@@ -57,8 +57,12 @@ export interface ProxyServer {
|
|
|
57
57
|
* to drain in-flight requests before the HTTP server actually shuts down.
|
|
58
58
|
*/
|
|
59
59
|
beginDrain?(): void;
|
|
60
|
+
/** Revoke durable writes and abort work that outlived the shutdown grace. */
|
|
61
|
+
forceAbortInFlight?(): void;
|
|
60
62
|
/** Count of requests admitted past the draining gate that haven't finished yet. */
|
|
61
63
|
getInFlightCount?(): number;
|
|
64
|
+
/** Run one fail-closed transcript maintenance sweep. */
|
|
65
|
+
sweepSessionGc?(): Promise<void>;
|
|
62
66
|
}
|
|
63
67
|
export declare const DEFAULT_PROXY_CONFIG: ProxyConfig;
|
|
64
68
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/proxy/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,kBAAkB,EAAE,MAAM,CAAA;IAC1B,MAAM,EA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