@stigmer/runner 3.15.2 → 3.15.3-dev.20260914121148

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.
Files changed (56) hide show
  1. package/dist/.build-fingerprint +1 -1
  2. package/dist/activities/execute-cursor/__test-utils__/contract-subject.js +12 -9
  3. package/dist/activities/execute-cursor/__test-utils__/contract-subject.js.map +1 -1
  4. package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.d.ts +5 -2
  5. package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.js +5 -2
  6. package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.js.map +1 -1
  7. package/dist/activities/execute-cursor/__test-utils__/scripted-agent.d.ts +11 -27
  8. package/dist/activities/execute-cursor/__test-utils__/scripted-agent.js +13 -10
  9. package/dist/activities/execute-cursor/__test-utils__/scripted-agent.js.map +1 -1
  10. package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.d.ts +70 -26
  11. package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.js +82 -32
  12. package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.js.map +1 -1
  13. package/dist/activities/execute-cursor/adapter.d.ts +4 -3
  14. package/dist/activities/execute-cursor/adapter.js +9 -5
  15. package/dist/activities/execute-cursor/adapter.js.map +1 -1
  16. package/dist/activities/execute-cursor/sdk-warmup.d.ts +15 -6
  17. package/dist/activities/execute-cursor/sdk-warmup.js +15 -6
  18. package/dist/activities/execute-cursor/sdk-warmup.js.map +1 -1
  19. package/dist/activities/execute-cursor/session-lifecycle.d.ts +38 -59
  20. package/dist/activities/execute-cursor/session-lifecycle.js +59 -96
  21. package/dist/activities/execute-cursor/session-lifecycle.js.map +1 -1
  22. package/dist/activities/execute-cursor/session-store.d.ts +100 -0
  23. package/dist/activities/execute-cursor/session-store.js +157 -0
  24. package/dist/activities/execute-cursor/session-store.js.map +1 -0
  25. package/dist/shared/attachment-vision.d.ts +2 -1
  26. package/dist/shared/attachment-vision.js.map +1 -1
  27. package/package.json +5 -5
  28. package/src/activities/execute-cursor/__test-utils__/__tests__/scripted-double.test.ts +31 -7
  29. package/src/activities/execute-cursor/__test-utils__/contract-subject.ts +10 -8
  30. package/src/activities/execute-cursor/__test-utils__/hermetic-cursor.ts +5 -2
  31. package/src/activities/execute-cursor/__test-utils__/scripted-agent.ts +20 -28
  32. package/src/activities/execute-cursor/__test-utils__/scripted-sdk.ts +94 -38
  33. package/src/activities/execute-cursor/__tests__/cursor-baseurl-routing.test.ts +10 -8
  34. package/src/activities/execute-cursor/__tests__/cursor-fetch-interceptor-bypass.test.ts +5 -4
  35. package/src/activities/execute-cursor/__tests__/cursor-generate-image-live.test.ts +7 -2
  36. package/src/activities/execute-cursor/__tests__/cursor-hook-protocol-live.test.ts +163 -0
  37. package/src/activities/execute-cursor/__tests__/cursor-sdk-auth-smoke.test.ts +13 -12
  38. package/src/activities/execute-cursor/__tests__/hermetic/deny-and-retry.test.ts +4 -1
  39. package/src/activities/execute-cursor/__tests__/hermetic/file-review-capture.test.ts +4 -1
  40. package/src/activities/execute-cursor/__tests__/hermetic/harness-contract.test.ts +3 -0
  41. package/src/activities/execute-cursor/__tests__/hermetic/pause-vs-shutdown.test.ts +3 -0
  42. package/src/activities/execute-cursor/__tests__/hermetic/plain-turn.test.ts +4 -1
  43. package/src/activities/execute-cursor/__tests__/hermetic/recovery-fresh-agent.test.ts +4 -1
  44. package/src/activities/execute-cursor/__tests__/hermetic/run-wait-arms.test.ts +4 -1
  45. package/src/activities/execute-cursor/__tests__/hermetic/stream-self-stop-arms.test.ts +4 -1
  46. package/src/activities/execute-cursor/__tests__/hermetic/thrown-error-arms.test.ts +3 -0
  47. package/src/activities/execute-cursor/__tests__/hermetic/tool-call.test.ts +4 -1
  48. package/src/activities/execute-cursor/__tests__/hermetic/unattributed-hook-block.test.ts +4 -1
  49. package/src/activities/execute-cursor/__tests__/hermetic/workspace-lock-timeout.test.ts +3 -0
  50. package/src/activities/execute-cursor/__tests__/session-lifecycle.test.ts +86 -58
  51. package/src/activities/execute-cursor/__tests__/session-store.test.ts +220 -0
  52. package/src/activities/execute-cursor/adapter.ts +9 -5
  53. package/src/activities/execute-cursor/sdk-warmup.ts +15 -6
  54. package/src/activities/execute-cursor/session-lifecycle.ts +63 -109
  55. package/src/activities/execute-cursor/session-store.ts +187 -0
  56. package/src/shared/attachment-vision.ts +2 -1
@@ -3,46 +3,51 @@
3
3
  *
4
4
  * SessionSpec.harness_state_id stores the Cursor agentId. This module handles
5
5
  * creating new agents (first execution), resuming existing agents
6
- * (subsequent executions), graceful fallback on resume failure, and
7
- * cleaning up agents (session deletion).
6
+ * (subsequent executions) and graceful fallback on resume failure.
8
7
  *
9
8
  * Two execution modes:
10
9
  *
11
- * - Local mode: Agent.create({ local: { cwd } }) with explicit
12
- * platform.workspaceRef/stateRoot for deterministic store keying.
13
- * Produces agent- prefixed IDs.
10
+ * - Local mode: Agent.create({ local: { cwd, dirs, store, ... } }) over the
11
+ * session's own SQLite store (`session-store.ts`). Produces agent- prefixed
12
+ * IDs.
14
13
  *
15
14
  * - Cloud mode (feature-flagged): Agent.create({ cloud: { repos } })
16
- * for git-backed workspaces. Produces bc- prefixed IDs. No platform
17
- * options — cloud state lives on Cursor's servers, not local SQLite.
15
+ * for git-backed workspaces. Produces bc- prefixed IDs. No store — cloud
16
+ * state lives on Cursor's servers, not local SQLite.
18
17
  *
19
- * Key SDK limitation: mcpServers are NOT persisted across Agent.resume().
20
- * They must be passed again on every resume call.
18
+ * Nothing under `local` survives Agent.resume(): `cwd`, `dirs`,
19
+ * `settingSources`, `store` and `enableAgentRetries` are re-supplied on every
20
+ * resume, exactly like `mcpServers`, `agents` and the model params. Omitting
21
+ * `cwd` re-roots the resumed agent at process.cwd() and loads the "project"
22
+ * setting source (the .cursor/hooks.json carrying the HITL approval hook) from
23
+ * the wrong directory, silently disabling the gate on every resumed turn;
24
+ * omitting `store` would make the SDK look the agent up in a default store
25
+ * derived from `cwd`, not the one the session's records are in.
21
26
  *
22
- * Platform store keying (local only): The Cursor SDK defaults to
23
- * process.cwd() for its internal state root lookup. In cloud sandboxes,
24
- * process.cwd() is the runner's app directory, not the workspace — causing
25
- * Agent.resume() to fail with "Agent not found". We pass explicit
26
- * platform.workspaceRef and platform.stateRoot derived from the Stigmer
27
- * sessionId to ensure deterministic store lookup regardless of process.cwd().
27
+ * Durability model: the session's SQLite store (agent records, runs,
28
+ * checkpoints) is the source of truth for conversation continuation. It lives
29
+ * under the durable workspace volume (`session-store.ts`) so Agent.resume()
30
+ * survives pod restart, reschedule, and snapshot restore. When resume
31
+ * nonetheless fails (store lost, corrupted, or agent unknown), this module
32
+ * creates a fresh agent and the caller starts a new turn from the user message
33
+ * plus re-injected instructions — there is no separate continuation store.
28
34
  *
29
- * Durability model: the SDK's local SQLite store (agent records, runs,
30
- * checkpoints) is the source of truth for conversation continuation. It is
31
- * persisted under the durable workspace volume (see resolvePlatformOptions)
32
- * so Agent.resume() survives pod restart, reschedule, and snapshot restore.
33
- * When resume nonetheless fails (store lost, corrupted, or agent unknown),
34
- * this module creates a fresh agent and the caller starts a new turn from
35
- * the user message plus re-injected instructions there is no separate
36
- * continuation store.
35
+ * Retries are the runner's, not the SDK's. `@cursor/sdk` 1.0.31 defaults
36
+ * `enableAgentRetries` to true for headless embedders (1.0.13 defaulted it to
37
+ * false); the runner already owns recovery from a dead or stalled transport —
38
+ * `withTimeout` around agent resolution, `resolveAgentWithTransportRecovery`
39
+ * (reset the transport, retry once), the two recovery spines in
40
+ * `turn-settle.ts`, and the stall detector so the SDK's layer is pinned OFF
41
+ * to keep one retry authority and the 1.0.13 timing of every provider fault.
42
+ * Whether to adopt the SDK's retries and delete ours is an open design
43
+ * question for the harness program, recorded there; it is not decided here.
37
44
  */
38
- import { mkdirSync } from "node:fs";
39
- import { join } from "node:path";
40
45
  import { Agent } from "@cursor/sdk";
41
46
  import { withTimeout, TimeoutError } from "../../shared/with-timeout.js";
47
+ import { sessionStore } from "./session-store.js";
42
48
  // ---------------------------------------------------------------------------
43
49
  // Constants
44
50
  // ---------------------------------------------------------------------------
45
- const CURSOR_SDK_STATE_DIR = ".stigmer/cursor-sdk-state";
46
51
  /**
47
52
  * Cursor SDK setting sources loaded for LOCAL agents.
48
53
  *
@@ -72,63 +77,43 @@ const LOCAL_SETTING_SOURCES = ["project"];
72
77
  // Local agent functions
73
78
  // ---------------------------------------------------------------------------
74
79
  /**
75
- * Compute deterministic platform options for a Stigmer session.
80
+ * The `local` options a session's agent is created AND resumed with — one
81
+ * builder so the two calls cannot drift (see the module header for why every
82
+ * field is re-supplied on resume).
76
83
  *
77
- * workspaceRef is a synthetic identifier (not a filesystem path) that
78
- * ensures the SDK's platform cache key is stable across activity
79
- * invocations regardless of process.cwd().
80
- *
81
- * stateRoot is a session-isolated directory under the durable workspace
82
- * volume ({workspaceRootDir}/.stigmer/cursor-sdk-state/{sessionId}) where
83
- * the SDK persists its SQLite stores (agent records, runs, checkpoints).
84
- * Placing it on the workspace volume (rather than $HOME) makes native
85
- * Agent.resume() survive pod restart/reschedule and snapshot restore, and
86
- * keys it by sessionId so sessions sharing one volume (e.g. the child agent
87
- * executions of a workflow sandbox) never collide. Created eagerly to
88
- * prevent ENOENT on first SDK write.
89
- *
90
- * Both inputs are required and must be non-empty: the stateRoot is keyed by
91
- * sessionId, so an empty sessionId would collapse every session sharing the
92
- * volume onto the same store and corrupt their conversation state.
84
+ * Workspaces: the SDK takes ONE primary `cwd` (the default shell's directory
85
+ * and the agent's store scoping) plus `dirs` for the other roots of a
86
+ * multi-root workspace, merged cwd-first with duplicates dropped, so rules,
87
+ * skills and hooks load from every root. The session's first workspace
88
+ * directory is the primary, as it was when the SDK took the whole array.
93
89
  */
94
- export function resolvePlatformOptions(sessionId, workspaceRootDir) {
95
- if (!sessionId) {
96
- throw new Error("resolvePlatformOptions: sessionId is required but was empty. The Cursor SDK " +
97
- "state store is keyed by sessionId; an empty value would collide across sessions " +
98
- "sharing a workspace volume (e.g. a workflow sandbox's child agent executions).");
99
- }
100
- if (!workspaceRootDir) {
101
- throw new Error("resolvePlatformOptions: workspaceRootDir is required but was empty. The Cursor " +
102
- "SDK state store must live on the durable workspace volume to survive restarts.");
103
- }
104
- const stateRoot = join(workspaceRootDir, CURSOR_SDK_STATE_DIR, sessionId);
105
- mkdirSync(stateRoot, { recursive: true });
90
+ async function localAgentOptions(sessionId, workspaceRootDir, workspaceDirs) {
91
+ const [cwd, ...dirs] = workspaceDirs;
92
+ const store = await sessionStore(sessionId, workspaceRootDir);
106
93
  return {
107
- workspaceRef: `stigmer-session:${sessionId}`,
108
- stateRoot,
94
+ cwd,
95
+ ...(dirs.length > 0 ? { dirs } : {}),
96
+ settingSources: [...LOCAL_SETTING_SOURCES],
97
+ store,
98
+ // The runner is the one retry authority (module header).
99
+ enableAgentRetries: false,
109
100
  };
110
101
  }
111
102
  /**
112
103
  * Create a new local Cursor Agent for the first execution in a session.
113
- *
114
- * Supports multi-workspace: passes string[] when multiple dirs, string when single.
115
104
  */
116
105
  export async function createAgent(options) {
117
- const cwd = options.workspaceDirs.length === 1
118
- ? options.workspaceDirs[0]
119
- : options.workspaceDirs;
120
- const platform = resolvePlatformOptions(options.sessionId, options.workspaceRootDir);
121
- console.log(`createAgent: sessionId=${options.sessionId}, workspaceRef=${platform.workspaceRef}, ` +
122
- `stateRoot=${platform.stateRoot}, process.cwd=${process.cwd()}`);
106
+ const local = await localAgentOptions(options.sessionId, options.workspaceRootDir, options.workspaceDirs);
107
+ console.log(`createAgent: sessionId=${options.sessionId}, workspaceRef=${local.store.workspaceRef}, ` +
108
+ `stateRoot=${local.store.stateRoot}, process.cwd=${process.cwd()}`);
123
109
  return Agent.create({
124
110
  apiKey: options.apiKey,
125
111
  // Always a full selection — id AND params. A bare { id } would let the
126
112
  // catalog's default variant (account-influenced) pick the price (#357).
127
113
  model: { id: options.model, params: options.modelParams },
128
- local: { cwd, settingSources: [...LOCAL_SETTING_SOURCES] },
114
+ local,
129
115
  mcpServers: options.mcpServers,
130
116
  agents: options.agents,
131
- platform,
132
117
  });
133
118
  }
134
119
  /**
@@ -138,12 +123,9 @@ export async function createAgent(options) {
138
123
  * propagate or fall back to a fresh agent with continuation context.
139
124
  */
140
125
  export async function resumeAgent(options) {
141
- const cwd = options.workspaceDirs.length === 1
142
- ? options.workspaceDirs[0]
143
- : options.workspaceDirs;
144
- const platform = resolvePlatformOptions(options.sessionId, options.workspaceRootDir);
126
+ const local = await localAgentOptions(options.sessionId, options.workspaceRootDir, options.workspaceDirs);
145
127
  console.log(`resumeAgent: agentId=${options.agentId}, sessionId=${options.sessionId}, ` +
146
- `workspaceRef=${platform.workspaceRef}, stateRoot=${platform.stateRoot}, ` +
128
+ `workspaceRef=${local.store.workspaceRef}, stateRoot=${local.store.stateRoot}, ` +
147
129
  `process.cwd=${process.cwd()}`);
148
130
  return Agent.resume(options.agentId, {
149
131
  apiKey: options.apiKey,
@@ -152,16 +134,9 @@ export async function resumeAgent(options) {
152
134
  // ledger, #357), but an id-only resume would fall back to the catalog
153
135
  // default variant for the new turns.
154
136
  model: options.model ? { id: options.model, params: options.modelParams } : undefined,
155
- // Neither cwd nor settingSources survive Agent.resume(); both must be
156
- // re-supplied every turn. Omitting cwd makes the SDK fall back to
157
- // process.cwd(), which re-roots the agent in the runner's own working
158
- // directory and loads the "project" setting source — the .cursor/hooks.json
159
- // carrying the HITL approval hook — from that wrong directory, silently
160
- // disabling the approval gate on every resumed turn.
161
- local: { cwd, settingSources: [...LOCAL_SETTING_SOURCES] },
137
+ local,
162
138
  mcpServers: options.mcpServers,
163
139
  agents: options.agents,
164
- platform,
165
140
  });
166
141
  }
167
142
  // ---------------------------------------------------------------------------
@@ -171,7 +146,7 @@ export async function resumeAgent(options) {
171
146
  * Create a new cloud Cursor Agent for git-backed sessions.
172
147
  *
173
148
  * Cloud agents (bc- prefix) run on Cursor's servers with cloned repos.
174
- * No platform options — cloud state lives server-side, not in local SQLite.
149
+ * No store — cloud state lives server-side, not in local SQLite.
175
150
  * Model is optional — Cursor resolves the caller's configured default
176
151
  * when omitted.
177
152
  */
@@ -191,7 +166,7 @@ export async function createCloudAgent(options) {
191
166
  *
192
167
  * Throws on failure — the caller (resolveAgent) decides whether to
193
168
  * propagate or fall back to a fresh cloud agent with continuation context.
194
- * No platform options — cloud state lives server-side.
169
+ * No store — cloud state lives server-side.
195
170
  */
196
171
  export async function resumeCloudAgent(options) {
197
172
  console.log(`resumeCloudAgent: agentId=${options.agentId}`);
@@ -210,8 +185,8 @@ export async function resumeCloudAgent(options) {
210
185
  * graceful fallback if resume fails.
211
186
  *
212
187
  * The mode parameter determines which create/resume functions are used:
213
- * - "local": createAgent / resumeAgent (with platform options)
214
- * - "cloud": createCloudAgent / resumeCloudAgent (no platform options)
188
+ * - "local": createAgent / resumeAgent (over the session's store)
189
+ * - "cloud": createCloudAgent / resumeCloudAgent (no store)
215
190
  *
216
191
  * When harnessStateId is non-empty (subsequent execution):
217
192
  * 1. Attempt Agent.resume with mode-appropriate options.
@@ -333,16 +308,4 @@ export async function resolveAgentWithTransportRecovery(opts) {
333
308
  return attempt(true);
334
309
  }
335
310
  }
336
- /**
337
- * Dispose a Cursor Agent when a session is deleted.
338
- * Best-effort: logs and swallows errors.
339
- */
340
- export async function disposeAgent(agentId, apiKey) {
341
- try {
342
- await Agent.archive(agentId, { apiKey });
343
- }
344
- catch (err) {
345
- console.warn(`Failed to archive Cursor agent ${agentId}:`, err instanceof Error ? err.message : err);
346
- }
347
- }
348
311
  //# sourceMappingURL=session-lifecycle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-lifecycle.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/session-lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAE,MAA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H,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACrD,IAAyC;IAEzC,MAAM,OAAO,GAAG,CAAC,YAAqB,EAAE,EAAE,CACxC,WAAW,CACT,IAAI,CAAC,SAAS,EACd,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,EAC5C,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,CACvE,CAAC;IAEJ,IAAI,CAAC;QACH,OAAO,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,CAAC,GAAG,YAAY,YAAY,CAAC;YAAE,MAAM,GAAG,CAAC;QAE9C,OAAO,CAAC,IAAI,CACV,sEAAsE;YACtE,GAAG,IAAI,CAAC,SAAS,iBAAiB,IAAI,CAAC,aAAa,CAAC,SAAS,UAAU,IAAI,CAAC,IAAI,IAAI;YACrF,UAAU,CAAC,CAAC,IAAI,CAAC,cAAc,2CAA2C,CAC3E,CAAC;QACF,IAAI,CAAC,cAAc,EAAE,CAAC;QAEtB,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Session-keyed Cursor SDK store — the on-disk SQLite store a session's
3
+ * agent records, runs and checkpoints live in, opened once per session and
4
+ * handed to every `Agent.create` / `Agent.resume` of that session
5
+ * (stigmer/stigmer#1053).
6
+ *
7
+ * Why this exists: `@cursor/sdk` 1.0.31 removed the `platform` option the
8
+ * runner used to key the SDK's store (`platform.workspaceRef` /
9
+ * `platform.stateRoot`) and replaced it with a caller-owned
10
+ * `local.store: LocalAgentStore`. The SDK's own instruction is "open once per
11
+ * workspace / state root and reuse across `Agent.create` / `resume`". So the
12
+ * store has a lifetime the runner owns, and this module is where it lives.
13
+ *
14
+ * Where the store lives on disk is unchanged from the `platform` era:
15
+ * `{workspaceRootDir}/.stigmer/cursor-sdk-state/{sessionId}` — the durable
16
+ * workspace volume rather than `$HOME`, so native `Agent.resume()` survives
17
+ * pod restart, reschedule and snapshot restore; keyed by sessionId so sessions
18
+ * sharing one volume (a workflow sandbox's child agent executions) never
19
+ * collide. The `workspaceRef` is the same synthetic `stigmer-session:<id>`,
20
+ * deliberately not a filesystem path, so lookups are stable regardless of
21
+ * `process.cwd()` (in a cloud sandbox that is the runner's app directory, not
22
+ * the workspace).
23
+ *
24
+ * Lifetime — the session's, on the two hooks the adapter already has:
25
+ * - `sessionStore()` opens on first use and memoizes the OPEN PROMISE per
26
+ * session, so two activities racing on one session (the agent cache's
27
+ * documented race: the loser resolves its own agent) await the same open
28
+ * instead of racing two opens on one file. A failed open is not memoized;
29
+ * the next call retries.
30
+ * - `releaseSessionStore(sessionId)` is called from the adapter's
31
+ * `releaseSession` — the runtime saying the session is done on this host.
32
+ * - `releaseAllSessionStores()` is called from the adapter's `shutdown`.
33
+ * - A re-acquire under a DIFFERENT state root (the session moved volumes)
34
+ * releases the store it held and opens the new one — the same rule the agent
35
+ * cache applies to a fingerprint mismatch: a handle for the old binding can
36
+ * never serve the new one, and holding it would only pin a file.
37
+ * Nothing else disposes a store. In particular the store does NOT ride the
38
+ * agent handle's `close()` — the handle has five close sites and a second
39
+ * resource on each would be a parallel lifecycle — and it does not enter the
40
+ * agent cache, whose exclusive-checkout model is about one handle per turn.
41
+ *
42
+ * At 1.0.13 the SDK memoized its platform (with open SQLite handles) for the
43
+ * whole process; a per-session store released when the session is released is
44
+ * a tighter lifetime, not a looser one.
45
+ *
46
+ * `SessionStores` is the mechanism with the opener injected, so its rules are
47
+ * unit-tested without a SQLite file; the module-level instance binds the SDK's
48
+ * `SqliteLocalAgentStore.open` (`@cursor/sdk/sqlite`, the subpath entry that
49
+ * keeps the sqlite driver off the main package's import path). In a hermetic
50
+ * run that subpath is doubled beside `@cursor/sdk` itself (`scripted-sdk.ts`).
51
+ *
52
+ * THIS MODULE'S STATIC GRAPH IS SDK-FREE, like `agent-session-cache.ts`: the
53
+ * adapter imports both statically, and the adapter's own static graph must
54
+ * stay SDK-free so the composition roots can import it before `boot` installs
55
+ * the interceptors (`adapter.ts` header). The SDK's sqlite entry is loaded
56
+ * with a dynamic import at the first open — the runner's
57
+ * dynamic-import-for-order convention — and only its TYPE is imported here.
58
+ */
59
+ import type { SqliteLocalAgentStore } from "@cursor/sdk/sqlite";
60
+ /** Where a session's store lives and the ref the SDK scopes it under. */
61
+ export interface SessionStoreLocation {
62
+ /** Synthetic, stable across activity invocations: `stigmer-session:<sessionId>`. */
63
+ readonly workspaceRef: string;
64
+ /** `{workspaceRootDir}/.stigmer/cursor-sdk-state/{sessionId}`, created eagerly. */
65
+ readonly stateRoot: string;
66
+ }
67
+ /** The slice of the SDK store whose lifetime this module owns. */
68
+ export interface ReleasableStore {
69
+ readonly stateRoot: string;
70
+ dispose(): Promise<void>;
71
+ }
72
+ /**
73
+ * Compute a session's store location. Both inputs are required and must be
74
+ * non-empty: the state root is keyed by sessionId, so an empty sessionId would
75
+ * collapse every session sharing the volume onto one store and corrupt their
76
+ * conversation state; an empty root would put the store somewhere that does
77
+ * not survive a restart. The directory is created eagerly to prevent ENOENT on
78
+ * the SDK's first write.
79
+ */
80
+ export declare function resolveSessionStoreLocation(sessionId: string, workspaceRootDir: string): SessionStoreLocation;
81
+ /** One store per session, opened through `open`, held until released. */
82
+ export declare class SessionStores<S extends ReleasableStore> {
83
+ private readonly open;
84
+ private readonly held;
85
+ constructor(open: (location: SessionStoreLocation) => Promise<S>);
86
+ /** The session's store, opened on first use; the same instance on every later call. */
87
+ acquire(sessionId: string, workspaceRootDir: string): Promise<S>;
88
+ /** Disposes and forgets the session's store, if any. A later acquire reopens. */
89
+ release(sessionId: string): Promise<void>;
90
+ /** Worker shutdown: dispose every held store. */
91
+ releaseAll(): Promise<void>;
92
+ /** How many stores are held — for assertions. */
93
+ get size(): number;
94
+ }
95
+ /** The session's SDK store, opened on first use — pass as `local.store` on create AND resume. */
96
+ export declare function sessionStore(sessionId: string, workspaceRootDir: string): Promise<SqliteLocalAgentStore>;
97
+ /** The session is done on this host (the adapter's `releaseSession`). */
98
+ export declare function releaseSessionStore(sessionId: string): Promise<void>;
99
+ /** Worker shutdown (the adapter's `shutdown`). */
100
+ export declare function releaseAllSessionStores(): Promise<void>;
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Session-keyed Cursor SDK store — the on-disk SQLite store a session's
3
+ * agent records, runs and checkpoints live in, opened once per session and
4
+ * handed to every `Agent.create` / `Agent.resume` of that session
5
+ * (stigmer/stigmer#1053).
6
+ *
7
+ * Why this exists: `@cursor/sdk` 1.0.31 removed the `platform` option the
8
+ * runner used to key the SDK's store (`platform.workspaceRef` /
9
+ * `platform.stateRoot`) and replaced it with a caller-owned
10
+ * `local.store: LocalAgentStore`. The SDK's own instruction is "open once per
11
+ * workspace / state root and reuse across `Agent.create` / `resume`". So the
12
+ * store has a lifetime the runner owns, and this module is where it lives.
13
+ *
14
+ * Where the store lives on disk is unchanged from the `platform` era:
15
+ * `{workspaceRootDir}/.stigmer/cursor-sdk-state/{sessionId}` — the durable
16
+ * workspace volume rather than `$HOME`, so native `Agent.resume()` survives
17
+ * pod restart, reschedule and snapshot restore; keyed by sessionId so sessions
18
+ * sharing one volume (a workflow sandbox's child agent executions) never
19
+ * collide. The `workspaceRef` is the same synthetic `stigmer-session:<id>`,
20
+ * deliberately not a filesystem path, so lookups are stable regardless of
21
+ * `process.cwd()` (in a cloud sandbox that is the runner's app directory, not
22
+ * the workspace).
23
+ *
24
+ * Lifetime — the session's, on the two hooks the adapter already has:
25
+ * - `sessionStore()` opens on first use and memoizes the OPEN PROMISE per
26
+ * session, so two activities racing on one session (the agent cache's
27
+ * documented race: the loser resolves its own agent) await the same open
28
+ * instead of racing two opens on one file. A failed open is not memoized;
29
+ * the next call retries.
30
+ * - `releaseSessionStore(sessionId)` is called from the adapter's
31
+ * `releaseSession` — the runtime saying the session is done on this host.
32
+ * - `releaseAllSessionStores()` is called from the adapter's `shutdown`.
33
+ * - A re-acquire under a DIFFERENT state root (the session moved volumes)
34
+ * releases the store it held and opens the new one — the same rule the agent
35
+ * cache applies to a fingerprint mismatch: a handle for the old binding can
36
+ * never serve the new one, and holding it would only pin a file.
37
+ * Nothing else disposes a store. In particular the store does NOT ride the
38
+ * agent handle's `close()` — the handle has five close sites and a second
39
+ * resource on each would be a parallel lifecycle — and it does not enter the
40
+ * agent cache, whose exclusive-checkout model is about one handle per turn.
41
+ *
42
+ * At 1.0.13 the SDK memoized its platform (with open SQLite handles) for the
43
+ * whole process; a per-session store released when the session is released is
44
+ * a tighter lifetime, not a looser one.
45
+ *
46
+ * `SessionStores` is the mechanism with the opener injected, so its rules are
47
+ * unit-tested without a SQLite file; the module-level instance binds the SDK's
48
+ * `SqliteLocalAgentStore.open` (`@cursor/sdk/sqlite`, the subpath entry that
49
+ * keeps the sqlite driver off the main package's import path). In a hermetic
50
+ * run that subpath is doubled beside `@cursor/sdk` itself (`scripted-sdk.ts`).
51
+ *
52
+ * THIS MODULE'S STATIC GRAPH IS SDK-FREE, like `agent-session-cache.ts`: the
53
+ * adapter imports both statically, and the adapter's own static graph must
54
+ * stay SDK-free so the composition roots can import it before `boot` installs
55
+ * the interceptors (`adapter.ts` header). The SDK's sqlite entry is loaded
56
+ * with a dynamic import at the first open — the runner's
57
+ * dynamic-import-for-order convention — and only its TYPE is imported here.
58
+ */
59
+ import { mkdirSync } from "node:fs";
60
+ import { join } from "node:path";
61
+ const CURSOR_SDK_STATE_DIR = ".stigmer/cursor-sdk-state";
62
+ /**
63
+ * Compute a session's store location. Both inputs are required and must be
64
+ * non-empty: the state root is keyed by sessionId, so an empty sessionId would
65
+ * collapse every session sharing the volume onto one store and corrupt their
66
+ * conversation state; an empty root would put the store somewhere that does
67
+ * not survive a restart. The directory is created eagerly to prevent ENOENT on
68
+ * the SDK's first write.
69
+ */
70
+ export function resolveSessionStoreLocation(sessionId, workspaceRootDir) {
71
+ if (!sessionId) {
72
+ throw new Error("resolveSessionStoreLocation: sessionId is required but was empty. The Cursor SDK " +
73
+ "state store is keyed by sessionId; an empty value would collide across sessions " +
74
+ "sharing a workspace volume (e.g. a workflow sandbox's child agent executions).");
75
+ }
76
+ if (!workspaceRootDir) {
77
+ throw new Error("resolveSessionStoreLocation: workspaceRootDir is required but was empty. The Cursor " +
78
+ "SDK state store must live on the durable workspace volume to survive restarts.");
79
+ }
80
+ const stateRoot = join(workspaceRootDir, CURSOR_SDK_STATE_DIR, sessionId);
81
+ mkdirSync(stateRoot, { recursive: true });
82
+ return { workspaceRef: `stigmer-session:${sessionId}`, stateRoot };
83
+ }
84
+ /** One store per session, opened through `open`, held until released. */
85
+ export class SessionStores {
86
+ open;
87
+ held = new Map();
88
+ constructor(open) {
89
+ this.open = open;
90
+ }
91
+ /** The session's store, opened on first use; the same instance on every later call. */
92
+ acquire(sessionId, workspaceRootDir) {
93
+ const location = resolveSessionStoreLocation(sessionId, workspaceRootDir);
94
+ const existing = this.held.get(sessionId);
95
+ if (existing && existing.stateRoot === location.stateRoot)
96
+ return existing.store;
97
+ if (existing) {
98
+ console.log(`session-store: session=${sessionId} re-acquired under a different state root ` +
99
+ `(held=${existing.stateRoot}, requested=${location.stateRoot}) — releasing the held store`);
100
+ void this.release(sessionId);
101
+ }
102
+ const store = this.open(location);
103
+ this.held.set(sessionId, { stateRoot: location.stateRoot, store });
104
+ // A failed open must not be memoized: the next acquire retries. Only the
105
+ // entry THIS open created is removed (a later re-acquire may have replaced it).
106
+ store.catch(() => {
107
+ if (this.held.get(sessionId)?.store === store)
108
+ this.held.delete(sessionId);
109
+ });
110
+ return store;
111
+ }
112
+ /** Disposes and forgets the session's store, if any. A later acquire reopens. */
113
+ async release(sessionId) {
114
+ const entry = this.held.get(sessionId);
115
+ if (!entry)
116
+ return;
117
+ this.held.delete(sessionId);
118
+ await disposeQuietly(sessionId, entry.store);
119
+ }
120
+ /** Worker shutdown: dispose every held store. */
121
+ async releaseAll() {
122
+ const entries = [...this.held.entries()];
123
+ this.held.clear();
124
+ await Promise.all(entries.map(([sessionId, entry]) => disposeQuietly(sessionId, entry.store)));
125
+ }
126
+ /** How many stores are held — for assertions. */
127
+ get size() {
128
+ return this.held.size;
129
+ }
130
+ }
131
+ async function disposeQuietly(sessionId, store) {
132
+ try {
133
+ await (await store).dispose();
134
+ }
135
+ catch (err) {
136
+ // Best effort: a store whose open failed has nothing to dispose, and a
137
+ // dispose that fails on a dead handle changes nothing the session needs.
138
+ console.warn(`session-store: dispose failed for session=${sessionId}:`, err instanceof Error ? err.message : err);
139
+ }
140
+ }
141
+ const sessionStores = new SessionStores(async (location) => {
142
+ const { SqliteLocalAgentStore } = await import("@cursor/sdk/sqlite");
143
+ return SqliteLocalAgentStore.open(location);
144
+ });
145
+ /** The session's SDK store, opened on first use — pass as `local.store` on create AND resume. */
146
+ export function sessionStore(sessionId, workspaceRootDir) {
147
+ return sessionStores.acquire(sessionId, workspaceRootDir);
148
+ }
149
+ /** The session is done on this host (the adapter's `releaseSession`). */
150
+ export function releaseSessionStore(sessionId) {
151
+ return sessionStores.release(sessionId);
152
+ }
153
+ /** Worker shutdown (the adapter's `shutdown`). */
154
+ export function releaseAllSessionStores() {
155
+ return sessionStores.releaseAll();
156
+ }
157
+ //# sourceMappingURL=session-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-store.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/session-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,MAAM,oBAAoB,GAAG,2BAA2B,CAAC;AAgBzD;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CAAC,SAAiB,EAAE,gBAAwB;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AI,CAAC;QACH,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;IAChC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,uEAAuE;QACvE,yEAAyE;QACzE,OAAO,CAAC,IAAI,CACV,6CAA6C,SAAS,GAAG,EACzD,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CACzC,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,aAAa,GAAG,IAAI,aAAa,CAAwB,KAAK,EAAE,QAAQ,EAAE,EAAE;IAChF,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACrE,OAAO,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEH,iGAAiG;AACjG,MAAM,UAAU,YAAY,CAAC,SAAiB,EAAE,gBAAwB;IACtE,OAAO,aAAa,CAAC,OAAO,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;AAC5D,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACnD,OAAO,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAC1C,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,uBAAuB;IACrC,OAAO,aAAa,CAAC,UAAU,EAAE,CAAC;AACpC,CAAC"}
@@ -95,7 +95,8 @@ export type VisionOutcome = {
95
95
  /**
96
96
  * What a harness can actually display inline. The split exists because the
97
97
  * Cursor local transport re-sniffs magic bytes and recognizes ONLY PNG and
98
- * JPEG (verified against @cursor/sdk 1.0.13 dist the declared mimeType is
98
+ * JPEG (verified against the @cursor/sdk dist at 1.0.13 and again at 1.0.31:
99
+ * the attachment sniff map is exactly JPEG and PNG; the declared mimeType is
99
100
  * discarded), while the LangChain providers accept all four types.
100
101
  */
101
102
  export interface VisionProfile {
@@ -1 +1 @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CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,CACR,oEAAoE;gBAClE,oEAAoE;gBACpE,mEAAmE;gBACnE,QAAQ,CACX,CAAC;QACJ,CAAC;IACH,CAAC;IACD,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CACR,iEAAiE;YAC/D,sDAAsD,CACzD,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigmer/runner",
3
- "version": "3.15.2",
3
+ "version": "3.15.3-dev.20260914121148",
4
4
  "description": "Embeddable Temporal worker for the Stigmer AI agent platform — handles agent execution, workflow orchestration, and MCP server management",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -90,7 +90,7 @@
90
90
  "@bufbuild/protobuf": "2.12.0",
91
91
  "@connectrpc/connect": "^2.0.0",
92
92
  "@connectrpc/connect-node": "^2.0.0",
93
- "@cursor/sdk": "^1.0.13",
93
+ "@cursor/sdk": "1.0.31",
94
94
  "@langchain/anthropic": "^1.5.5",
95
95
  "@langchain/core": "^1.2.7",
96
96
  "@langchain/langgraph": "^1.3.0",
@@ -104,9 +104,9 @@
104
104
  "@opentelemetry/sdk-metrics": "^2.0.0",
105
105
  "@opentelemetry/sdk-trace-base": "^2.0.0",
106
106
  "@opentelemetry/sdk-trace-node": "^2.0.0",
107
- "@stigmer/protos": "3.15.2",
108
- "@stigmer/temporal-codecs": "3.15.2",
109
- "@stigmer/zip-structure": "3.15.2",
107
+ "@stigmer/protos": "3.15.3-dev.20260914121148",
108
+ "@stigmer/temporal-codecs": "3.15.3-dev.20260914121148",
109
+ "@stigmer/zip-structure": "3.15.3-dev.20260914121148",
110
110
  "@temporalio/activity": "1.16.2",
111
111
  "@temporalio/common": "1.16.2",
112
112
  "@temporalio/interceptors-opentelemetry": "1.16.2",