@sentropic/h2a-cli 0.1.26 → 0.1.27
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/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime/local-files/index.d.ts +1 -0
- package/dist/runtime/local-files/index.d.ts.map +1 -1
- package/dist/runtime/local-files/index.js +1 -0
- package/dist/runtime/local-files/index.js.map +1 -1
- package/dist/runtime/local-files/lease.d.ts +62 -0
- package/dist/runtime/local-files/lease.d.ts.map +1 -0
- package/dist/runtime/local-files/lease.js +249 -0
- package/dist/runtime/local-files/lease.js.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { H2A_CLI_MCP_TOOL_NAMES } from "./mcp.js";
|
|
|
6
6
|
export type { H2AConfigurableHostDescriptor, H2AHostDescriptor, H2AHostWave, McpHostConfigSnippet, RenderMcpConfigOptions } from "./hosts/codex.js";
|
|
7
7
|
export { H2A_CLAUDE_HOST, H2A_CODEX_HOST, H2A_GEMINI_HOST, H2A_CLI_MCP_TOOL_NAMES, renderCliHelp, runCli, runMcpServe };
|
|
8
8
|
export { H2A_CLI_VERB_CONTRACTS, H2A_CLI_VERB_CONTRACT_BY_VERB, type H2ACliExitCode, type H2ACliOutputShape, type H2ACliVerbContract } from "./cli-contract.js";
|
|
9
|
-
export { H2A_STORE_SCHEMA_FILE, H2A_STORE_SCHEMA_VERSION, LockTimeoutError, StoreSchemaMismatchError, createLocalStore, deletePresence, inboxDir, listPresence, localStorePaths, negotiationDir, negotiationJournalFile, outboxDir, presenceFile, readPresence, safePathSegment, sanitizeStorePaths, updatePresence, withLock, withLockSync, writePresence, type CreateLocalStoreOptions, type H2AStoreSchemaSentinel, type ListPresenceOptions, type LocalStore, type LocalStorePaths, type LockOwner, type PresenceWriteResult, type SanitizePathsResult, type SanitizeRenameEntry, type WithLockOptions } from "./runtime/local-files/index.js";
|
|
9
|
+
export { H2A_STORE_SCHEMA_FILE, H2A_STORE_SCHEMA_VERSION, LockTimeoutError, StoreSchemaMismatchError, createLocalStore, deletePresence, inboxDir, listPresence, localStorePaths, negotiationDir, negotiationJournalFile, outboxDir, presenceFile, readPresence, safePathSegment, sanitizeStorePaths, updatePresence, withLease, withLeaseSync, withLock, withLockSync, writePresence, type CreateLocalStoreOptions, type H2AStoreSchemaSentinel, type LeaseHandle, type LeaseRecord, type ListPresenceOptions, type LocalStore, type LocalStorePaths, type LockOwner, type PresenceWriteResult, type SanitizePathsResult, type SanitizeRenameEntry, type WithLeaseOptions, type WithLockOptions } from "./runtime/local-files/index.js";
|
|
10
10
|
export { H2A_CLI_MCP_TOOL_DESCRIPTORS, NotificationDispatcher, SessionRegistry, createMcpServer, runMcpStdio, type CreateMcpServerOptions, type McpErrorResult, type McpPushNotification, type McpServer, type McpToolDescriptor, type McpToolName, type McpToolResult, type NotificationSink, type OpenSessionRequest, type RunMcpStdioOptions, type SessionRegistryOptions } from "./runtime/mcp/index.js";
|
|
11
11
|
export { renderK8sSidecar, type K8sSidecarFragment, type K8sSidecarOptions } from "./runtime/deploy/k8s-sidecar.js";
|
|
12
12
|
export declare const H2A_CLI_HOSTS: readonly [import("./hosts/codex.js").H2AConfigurableHostDescriptor, import("./hosts/codex.js").H2AConfigurableHostDescriptor, import("./hosts/codex.js").H2AConfigurableHostDescriptor];
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAA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ACf,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,WAAW,EACX,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,aAAa,yLAIhB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;;CAMlB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { H2A_GEMINI_HOST } from "./hosts/gemini.js";
|
|
|
5
5
|
import { H2A_CLI_MCP_TOOL_NAMES } from "./mcp.js";
|
|
6
6
|
export { H2A_CLAUDE_HOST, H2A_CODEX_HOST, H2A_GEMINI_HOST, H2A_CLI_MCP_TOOL_NAMES, renderCliHelp, runCli, runMcpServe };
|
|
7
7
|
export { H2A_CLI_VERB_CONTRACTS, H2A_CLI_VERB_CONTRACT_BY_VERB } from "./cli-contract.js";
|
|
8
|
-
export { H2A_STORE_SCHEMA_FILE, H2A_STORE_SCHEMA_VERSION, LockTimeoutError, StoreSchemaMismatchError, createLocalStore, deletePresence, inboxDir, listPresence, localStorePaths, negotiationDir, negotiationJournalFile, outboxDir, presenceFile, readPresence, safePathSegment, sanitizeStorePaths, updatePresence, withLock, withLockSync, writePresence } from "./runtime/local-files/index.js";
|
|
8
|
+
export { H2A_STORE_SCHEMA_FILE, H2A_STORE_SCHEMA_VERSION, LockTimeoutError, StoreSchemaMismatchError, createLocalStore, deletePresence, inboxDir, listPresence, localStorePaths, negotiationDir, negotiationJournalFile, outboxDir, presenceFile, readPresence, safePathSegment, sanitizeStorePaths, updatePresence, withLease, withLeaseSync, withLock, withLockSync, writePresence } from "./runtime/local-files/index.js";
|
|
9
9
|
export { H2A_CLI_MCP_TOOL_DESCRIPTORS, NotificationDispatcher, SessionRegistry, createMcpServer, runMcpStdio } from "./runtime/mcp/index.js";
|
|
10
10
|
export { renderK8sSidecar } from "./runtime/deploy/k8s-sidecar.js";
|
|
11
11
|
export const H2A_CLI_HOSTS = [
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAUlD,OAAO,EACL,eAAe,EACf,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,MAAM,EACN,WAAW,EACZ,CAAC;AAEF,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAI9B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,Y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AY,EAAE,sBAAsB;CAC5B,CAAC"}
|
|
@@ -3,5 +3,6 @@ export { deletePresence, listPresence, readPresence, updatePresence, writePresen
|
|
|
3
3
|
export { sanitizeStorePaths, type SanitizePathsResult, type SanitizeRenameEntry } from "./migrate.js";
|
|
4
4
|
export { createLocalStore, type CreateLocalStoreOptions, type LocalStore } from "./store.js";
|
|
5
5
|
export { LockTimeoutError, withLock, withLockSync, type LockOwner, type WithLockOptions } from "./locks.js";
|
|
6
|
+
export { withLease, withLeaseSync, type LeaseHandle, type LeaseRecord, type WithLeaseOptions } from "./lease.js";
|
|
6
7
|
export { H2A_STORE_SCHEMA_FILE, H2A_STORE_SCHEMA_VERSION, StoreSchemaMismatchError, readCliPackageVersion, type H2AStoreSchemaSentinel } from "./schema.js";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/local-files/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,SAAS,EACT,YAAY,EACZ,eAAe,EACf,KAAK,eAAe,EACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,eAAe,EACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/local-files/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,SAAS,EACT,YAAY,EACZ,eAAe,EACf,KAAK,eAAe,EACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,eAAe,EACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,SAAS,EACT,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,aAAa,CAAC"}
|
|
@@ -3,5 +3,6 @@ export { deletePresence, listPresence, readPresence, updatePresence, writePresen
|
|
|
3
3
|
export { sanitizeStorePaths } from "./migrate.js";
|
|
4
4
|
export { createLocalStore } from "./store.js";
|
|
5
5
|
export { LockTimeoutError, withLock, withLockSync } from "./locks.js";
|
|
6
|
+
export { withLease, withLeaseSync } from "./lease.js";
|
|
6
7
|
export { H2A_STORE_SCHEMA_FILE, H2A_STORE_SCHEMA_VERSION, StoreSchemaMismatchError, readCliPackageVersion } from "./schema.js";
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/local-files/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,SAAS,EACT,YAAY,EACZ,eAAe,EAEhB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,aAAa,EAGd,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,kBAAkB,EAGnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,EAGb,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EAEtB,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/local-files/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,SAAS,EACT,YAAY,EACZ,eAAe,EAEhB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,aAAa,EAGd,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,kBAAkB,EAGnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,EAGb,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,SAAS,EACT,aAAa,EAId,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EAEtB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-host lease lock for the local-files store (DEC-065).
|
|
3
|
+
*
|
|
4
|
+
* The advisory lock in `locks.ts` (DEC-036) recovers stale locks via
|
|
5
|
+
* `process.kill(pid, 0)` — which only works **same-machine**. A store shared
|
|
6
|
+
* across Pods on a ReadWriteMany volume (Scenario B of DEC-056) has holders on
|
|
7
|
+
* different nodes that cannot probe each other's PIDs, so the PID model is
|
|
8
|
+
* unsafe there.
|
|
9
|
+
*
|
|
10
|
+
* This module replaces PID-liveness with a **time-based lease**:
|
|
11
|
+
*
|
|
12
|
+
* - The lock file carries `{ holder, nonce, acquiredAt, renewedAt, leaseMs,
|
|
13
|
+
* fencingToken }`.
|
|
14
|
+
* - A lease is *expired* when `now - renewedAt > leaseMs`. Any contender may
|
|
15
|
+
* then steal it. Staleness is decided purely by wall-clock time, so it works
|
|
16
|
+
* regardless of which host or Pod held it.
|
|
17
|
+
* - The atomic gate is `openSync(path, "wx")` (`O_CREAT | O_EXCL`): only one
|
|
18
|
+
* contender wins the create, even across hosts on a POSIX-compliant shared
|
|
19
|
+
* filesystem.
|
|
20
|
+
* - `nonce` is a random per-acquisition id; release only unlinks the file if
|
|
21
|
+
* the on-disk nonce still matches ours (so a holder that overran its lease
|
|
22
|
+
* and was stolen from does not delete the new holder's lease).
|
|
23
|
+
* - `fencingToken` is incremented on every steal (best-effort monotonic) and
|
|
24
|
+
* returned to the caller for observability / downstream fencing.
|
|
25
|
+
*
|
|
26
|
+
* Clock-skew caveat: `leaseMs` must comfortably exceed (a) the longest
|
|
27
|
+
* critical section plus (b) the maximum clock skew between hosts. The store's
|
|
28
|
+
* read-then-write sections are sub-second, so the default 30s lease leaves a
|
|
29
|
+
* wide margin. This is documented in DEC-065.
|
|
30
|
+
*/
|
|
31
|
+
import { type WithLockOptions } from "./locks.js";
|
|
32
|
+
export interface LeaseRecord {
|
|
33
|
+
readonly holder: string;
|
|
34
|
+
readonly nonce: string;
|
|
35
|
+
readonly acquiredAt: string;
|
|
36
|
+
readonly renewedAt: string;
|
|
37
|
+
readonly leaseMs: number;
|
|
38
|
+
readonly fencingToken: number;
|
|
39
|
+
}
|
|
40
|
+
export interface WithLeaseOptions extends WithLockOptions {
|
|
41
|
+
/** Lease duration in ms. A lease older than this is stealable. Default 30000. */
|
|
42
|
+
readonly leaseMs?: number;
|
|
43
|
+
/** Holder label (host + pid by default). Informational. */
|
|
44
|
+
readonly holder?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface LeaseHandle {
|
|
47
|
+
readonly nonce: string;
|
|
48
|
+
readonly fencingToken: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Synchronous lease-locked critical section. Mirrors `withLockSync` but uses
|
|
52
|
+
* the time-based lease above, so it is safe for cross-host (cross-Pod) shared
|
|
53
|
+
* stores. Returns `fn()`'s result. Throws `LockTimeoutError` if the lease
|
|
54
|
+
* cannot be acquired within `timeoutMs`.
|
|
55
|
+
*
|
|
56
|
+
* The handle (nonce + fencingToken) is exposed to `fn` so callers that need
|
|
57
|
+
* to fence a downstream side-effect can read the token.
|
|
58
|
+
*/
|
|
59
|
+
export declare function withLeaseSync<T>(lockPath: string, fn: (handle: LeaseHandle) => T, options?: WithLeaseOptions): T;
|
|
60
|
+
/** Async variant of {@link withLeaseSync}. */
|
|
61
|
+
export declare function withLease<T>(lockPath: string, fn: (handle: LeaseHandle) => T | Promise<T>, options?: WithLeaseOptions): Promise<T>;
|
|
62
|
+
//# sourceMappingURL=lease.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lease.d.ts","sourceRoot":"","sources":["../../../src/runtime/local-files/lease.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAYH,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAEpE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,iFAAiF;IACjF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AA2JD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,CAAC,EAC9B,OAAO,GAAE,gBAAqB,GAC7B,CAAC,CAqCH;AAED,8CAA8C;AAC9C,wBAAsB,SAAS,CAAC,CAAC,EAC/B,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAC3C,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,CAAC,CAAC,CAiCZ"}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-host lease lock for the local-files store (DEC-065).
|
|
3
|
+
*
|
|
4
|
+
* The advisory lock in `locks.ts` (DEC-036) recovers stale locks via
|
|
5
|
+
* `process.kill(pid, 0)` — which only works **same-machine**. A store shared
|
|
6
|
+
* across Pods on a ReadWriteMany volume (Scenario B of DEC-056) has holders on
|
|
7
|
+
* different nodes that cannot probe each other's PIDs, so the PID model is
|
|
8
|
+
* unsafe there.
|
|
9
|
+
*
|
|
10
|
+
* This module replaces PID-liveness with a **time-based lease**:
|
|
11
|
+
*
|
|
12
|
+
* - The lock file carries `{ holder, nonce, acquiredAt, renewedAt, leaseMs,
|
|
13
|
+
* fencingToken }`.
|
|
14
|
+
* - A lease is *expired* when `now - renewedAt > leaseMs`. Any contender may
|
|
15
|
+
* then steal it. Staleness is decided purely by wall-clock time, so it works
|
|
16
|
+
* regardless of which host or Pod held it.
|
|
17
|
+
* - The atomic gate is `openSync(path, "wx")` (`O_CREAT | O_EXCL`): only one
|
|
18
|
+
* contender wins the create, even across hosts on a POSIX-compliant shared
|
|
19
|
+
* filesystem.
|
|
20
|
+
* - `nonce` is a random per-acquisition id; release only unlinks the file if
|
|
21
|
+
* the on-disk nonce still matches ours (so a holder that overran its lease
|
|
22
|
+
* and was stolen from does not delete the new holder's lease).
|
|
23
|
+
* - `fencingToken` is incremented on every steal (best-effort monotonic) and
|
|
24
|
+
* returned to the caller for observability / downstream fencing.
|
|
25
|
+
*
|
|
26
|
+
* Clock-skew caveat: `leaseMs` must comfortably exceed (a) the longest
|
|
27
|
+
* critical section plus (b) the maximum clock skew between hosts. The store's
|
|
28
|
+
* read-then-write sections are sub-second, so the default 30s lease leaves a
|
|
29
|
+
* wide margin. This is documented in DEC-065.
|
|
30
|
+
*/
|
|
31
|
+
import { closeSync, openSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
32
|
+
import { hostname } from "node:os";
|
|
33
|
+
import { randomBytes } from "node:crypto";
|
|
34
|
+
import { LockTimeoutError } from "./locks.js";
|
|
35
|
+
const DEFAULT_LEASE_MS = 30000;
|
|
36
|
+
const DEFAULT_TIMEOUT_MS = 5000;
|
|
37
|
+
const DEFAULT_POLL_MS = 50;
|
|
38
|
+
function nowMs() {
|
|
39
|
+
return Date.now();
|
|
40
|
+
}
|
|
41
|
+
function parseLease(raw) {
|
|
42
|
+
try {
|
|
43
|
+
const p = JSON.parse(raw);
|
|
44
|
+
if (p &&
|
|
45
|
+
typeof p.holder === "string" &&
|
|
46
|
+
typeof p.nonce === "string" &&
|
|
47
|
+
typeof p.renewedAt === "string" &&
|
|
48
|
+
typeof p.leaseMs === "number" &&
|
|
49
|
+
typeof p.fencingToken === "number") {
|
|
50
|
+
return {
|
|
51
|
+
holder: p.holder,
|
|
52
|
+
nonce: p.nonce,
|
|
53
|
+
acquiredAt: typeof p.acquiredAt === "string" ? p.acquiredAt : p.renewedAt,
|
|
54
|
+
renewedAt: p.renewedAt,
|
|
55
|
+
leaseMs: p.leaseMs,
|
|
56
|
+
fencingToken: p.fencingToken
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
/* malformed — treat as absent */
|
|
62
|
+
}
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
function isExpired(lease, at) {
|
|
66
|
+
const renewed = Date.parse(lease.renewedAt);
|
|
67
|
+
if (Number.isNaN(renewed))
|
|
68
|
+
return true;
|
|
69
|
+
return at - renewed > lease.leaseMs;
|
|
70
|
+
}
|
|
71
|
+
function writeLease(lockPath, record) {
|
|
72
|
+
const fd = openSync(lockPath, "wx");
|
|
73
|
+
try {
|
|
74
|
+
writeFileSync(fd, JSON.stringify(record));
|
|
75
|
+
}
|
|
76
|
+
finally {
|
|
77
|
+
closeSync(fd);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function attemptAcquire(lockPath, holder, leaseMs) {
|
|
81
|
+
const at = nowMs();
|
|
82
|
+
const iso = new Date(at).toISOString();
|
|
83
|
+
const nonce = randomBytes(8).toString("hex");
|
|
84
|
+
// Fresh create path — token starts at 1.
|
|
85
|
+
const fresh = {
|
|
86
|
+
holder,
|
|
87
|
+
nonce,
|
|
88
|
+
acquiredAt: iso,
|
|
89
|
+
renewedAt: iso,
|
|
90
|
+
leaseMs,
|
|
91
|
+
fencingToken: 1
|
|
92
|
+
};
|
|
93
|
+
try {
|
|
94
|
+
writeLease(lockPath, fresh);
|
|
95
|
+
return { ok: true, handle: { nonce, fencingToken: 1 } };
|
|
96
|
+
}
|
|
97
|
+
catch (err) {
|
|
98
|
+
if (err.code !== "EEXIST")
|
|
99
|
+
throw err;
|
|
100
|
+
}
|
|
101
|
+
// Lock exists — read and decide.
|
|
102
|
+
let raw;
|
|
103
|
+
try {
|
|
104
|
+
raw = readFileSync(lockPath, "utf8");
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
// Released between EEXIST and read — caller retries.
|
|
108
|
+
return { ok: false };
|
|
109
|
+
}
|
|
110
|
+
const existing = parseLease(raw);
|
|
111
|
+
if (existing && !isExpired(existing, at)) {
|
|
112
|
+
return { ok: false, lastSeen: existing };
|
|
113
|
+
}
|
|
114
|
+
// Expired (or malformed) — steal it. Unlink then re-create via O_EXCL so the
|
|
115
|
+
// create remains the atomic gate; the create-winner writes oldToken+1.
|
|
116
|
+
const nextToken = (existing?.fencingToken ?? 0) + 1;
|
|
117
|
+
try {
|
|
118
|
+
unlinkSync(lockPath);
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
/* someone else reclaimed first — fall through to retry */
|
|
122
|
+
}
|
|
123
|
+
const stolen = {
|
|
124
|
+
holder,
|
|
125
|
+
nonce,
|
|
126
|
+
acquiredAt: iso,
|
|
127
|
+
renewedAt: iso,
|
|
128
|
+
leaseMs,
|
|
129
|
+
fencingToken: nextToken
|
|
130
|
+
};
|
|
131
|
+
try {
|
|
132
|
+
writeLease(lockPath, stolen);
|
|
133
|
+
return { ok: true, handle: { nonce, fencingToken: nextToken } };
|
|
134
|
+
}
|
|
135
|
+
catch (err) {
|
|
136
|
+
if (err.code === "EEXIST") {
|
|
137
|
+
// Another contender won the steal — retry from the top next loop.
|
|
138
|
+
return { ok: false, lastSeen: existing };
|
|
139
|
+
}
|
|
140
|
+
throw err;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function releaseLease(lockPath, handle) {
|
|
144
|
+
let raw;
|
|
145
|
+
try {
|
|
146
|
+
raw = readFileSync(lockPath, "utf8");
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
return; // already gone
|
|
150
|
+
}
|
|
151
|
+
const current = parseLease(raw);
|
|
152
|
+
// Only unlink if WE still hold it (nonce match). If a contender stole the
|
|
153
|
+
// lease after we overran it, leave their lease intact.
|
|
154
|
+
if (current && current.nonce === handle.nonce) {
|
|
155
|
+
try {
|
|
156
|
+
unlinkSync(lockPath);
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
/* concurrent release — fine */
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function busyWaitSync(ms) {
|
|
164
|
+
const end = Date.now() + ms;
|
|
165
|
+
const sab = new SharedArrayBuffer(4);
|
|
166
|
+
const view = new Int32Array(sab);
|
|
167
|
+
while (Date.now() < end) {
|
|
168
|
+
const remaining = end - Date.now();
|
|
169
|
+
if (remaining <= 0)
|
|
170
|
+
break;
|
|
171
|
+
Atomics.wait(view, 0, 0, Math.min(remaining, 25));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function defaultHolder() {
|
|
175
|
+
return `${hostname()}:${process.pid}`;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Synchronous lease-locked critical section. Mirrors `withLockSync` but uses
|
|
179
|
+
* the time-based lease above, so it is safe for cross-host (cross-Pod) shared
|
|
180
|
+
* stores. Returns `fn()`'s result. Throws `LockTimeoutError` if the lease
|
|
181
|
+
* cannot be acquired within `timeoutMs`.
|
|
182
|
+
*
|
|
183
|
+
* The handle (nonce + fencingToken) is exposed to `fn` so callers that need
|
|
184
|
+
* to fence a downstream side-effect can read the token.
|
|
185
|
+
*/
|
|
186
|
+
export function withLeaseSync(lockPath, fn, options = {}) {
|
|
187
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
188
|
+
const pollMs = options.pollMs ?? DEFAULT_POLL_MS;
|
|
189
|
+
const leaseMs = options.leaseMs ?? DEFAULT_LEASE_MS;
|
|
190
|
+
const holder = options.holder ?? defaultHolder();
|
|
191
|
+
const deadline = Date.now() + timeoutMs;
|
|
192
|
+
let lastSeen;
|
|
193
|
+
let handle;
|
|
194
|
+
while (true) {
|
|
195
|
+
const attempt = attemptAcquire(lockPath, holder, leaseMs);
|
|
196
|
+
if (attempt.ok) {
|
|
197
|
+
handle = attempt.handle;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
lastSeen = attempt.lastSeen ?? lastSeen;
|
|
201
|
+
if (Date.now() >= deadline) {
|
|
202
|
+
throw new LockTimeoutError(lockPath, lastSeen
|
|
203
|
+
? {
|
|
204
|
+
pid: 0,
|
|
205
|
+
hostname: lastSeen.holder,
|
|
206
|
+
startedAt: lastSeen.acquiredAt
|
|
207
|
+
}
|
|
208
|
+
: undefined, timeoutMs);
|
|
209
|
+
}
|
|
210
|
+
busyWaitSync(pollMs);
|
|
211
|
+
}
|
|
212
|
+
try {
|
|
213
|
+
return fn(handle);
|
|
214
|
+
}
|
|
215
|
+
finally {
|
|
216
|
+
releaseLease(lockPath, handle);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/** Async variant of {@link withLeaseSync}. */
|
|
220
|
+
export async function withLease(lockPath, fn, options = {}) {
|
|
221
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
222
|
+
const pollMs = options.pollMs ?? DEFAULT_POLL_MS;
|
|
223
|
+
const leaseMs = options.leaseMs ?? DEFAULT_LEASE_MS;
|
|
224
|
+
const holder = options.holder ?? defaultHolder();
|
|
225
|
+
const deadline = Date.now() + timeoutMs;
|
|
226
|
+
let lastSeen;
|
|
227
|
+
let handle;
|
|
228
|
+
while (true) {
|
|
229
|
+
const attempt = attemptAcquire(lockPath, holder, leaseMs);
|
|
230
|
+
if (attempt.ok) {
|
|
231
|
+
handle = attempt.handle;
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
lastSeen = attempt.lastSeen ?? lastSeen;
|
|
235
|
+
if (Date.now() >= deadline) {
|
|
236
|
+
throw new LockTimeoutError(lockPath, lastSeen
|
|
237
|
+
? { pid: 0, hostname: lastSeen.holder, startedAt: lastSeen.acquiredAt }
|
|
238
|
+
: undefined, timeoutMs);
|
|
239
|
+
}
|
|
240
|
+
await new Promise((r) => setTimeout(r, pollMs));
|
|
241
|
+
}
|
|
242
|
+
try {
|
|
243
|
+
return await fn(handle);
|
|
244
|
+
}
|
|
245
|
+
finally {
|
|
246
|
+
releaseLease(lockPath, handle);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
//# sourceMappingURL=lease.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lease.js","sourceRoot":"","sources":["../../../src/runtime/local-files/lease.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAwB,MAAM,YAAY,CAAC;AAuBpE,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,SAAS,KAAK;IACZ,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;AACpB,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAyB,CAAC;QAClD,IACE,CAAC;YACD,OAAO,CAAC,CAAC,MAAM,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AAC,MAAM,CAAC;YACxB,MAAM;QACR,CAAC;QACD,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC;QACxC,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,QAAQ,EAAE,CAAC;YAC3B,MAAM,IAAI,gBAAgB,CACxB,QAAQ,EACR,QAAQ;gBACN,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,UAAU,EAAE;gBACvE,CAAC,CAAC,SAAS,EACb,SAAS,CACV,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentropic/h2a-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "Unified CLI surface for h2a hosts and MCP-oriented coordination flows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"skills"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@sentropic/h2a": "^0.1.
|
|
43
|
+
"@sentropic/h2a": "^0.1.27"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|