@stigmer/runner 3.0.8-dev.20260612100207 → 3.0.8-dev.20260613041848

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 (31) hide show
  1. package/dist/.build-fingerprint +1 -1
  2. package/dist/activities/execute-cursor/approval-state.d.ts +25 -13
  3. package/dist/activities/execute-cursor/approval-state.js +33 -24
  4. package/dist/activities/execute-cursor/approval-state.js.map +1 -1
  5. package/dist/activities/execute-cursor/hook-script.d.ts +16 -1
  6. package/dist/activities/execute-cursor/hook-script.js +50 -1
  7. package/dist/activities/execute-cursor/hook-script.js.map +1 -1
  8. package/dist/activities/execute-cursor/index.js +60 -12
  9. package/dist/activities/execute-cursor/index.js.map +1 -1
  10. package/dist/activities/execute-cursor/session-lifecycle.js +6 -0
  11. package/dist/activities/execute-cursor/session-lifecycle.js.map +1 -1
  12. package/dist/activities/execute-cursor/skill-resolver.d.ts +9 -0
  13. package/dist/activities/execute-cursor/skill-resolver.js +24 -1
  14. package/dist/activities/execute-cursor/skill-resolver.js.map +1 -1
  15. package/dist/activities/execute-cursor/workspace-setup.d.ts +79 -21
  16. package/dist/activities/execute-cursor/workspace-setup.js +171 -51
  17. package/dist/activities/execute-cursor/workspace-setup.js.map +1 -1
  18. package/dist/shared/workspace/platform-dir.d.ts +26 -5
  19. package/dist/shared/workspace/platform-dir.js +38 -7
  20. package/dist/shared/workspace/platform-dir.js.map +1 -1
  21. package/package.json +2 -2
  22. package/src/activities/execute-cursor/__tests__/hitl-ledger.test.ts +4 -3
  23. package/src/activities/execute-cursor/__tests__/hook-script.test.ts +51 -2
  24. package/src/activities/execute-cursor/__tests__/workspace-setup.test.ts +204 -0
  25. package/src/activities/execute-cursor/approval-state.ts +33 -24
  26. package/src/activities/execute-cursor/hook-script.ts +54 -1
  27. package/src/activities/execute-cursor/index.ts +65 -16
  28. package/src/activities/execute-cursor/session-lifecycle.ts +6 -0
  29. package/src/activities/execute-cursor/skill-resolver.ts +26 -1
  30. package/src/activities/execute-cursor/workspace-setup.ts +228 -51
  31. package/src/shared/workspace/platform-dir.ts +41 -7
@@ -54,6 +54,12 @@ const CURSOR_SDK_STATE_DIR = ".stigmer/cursor-sdk-state";
54
54
  * silently drops the hook and disables the entire approval gate. We must opt
55
55
  * in to "project" so the hook loads and tool calls are actually gated.
56
56
  *
57
+ * The hooks.json is the only file written into the workspace — kept minimal,
58
+ * merged with any user hooks.json, and restored when the turn ends; the gate's
59
+ * own artifacts live outside the repo and the hook is scoped to this runner's
60
+ * process, so the user's interactive IDE sharing the repo is never gated (see
61
+ * workspace-setup.ts / hook-script.ts and issue #173).
62
+ *
57
63
  * Side effect: this also loads other workspace `.cursor/*` config (rules,
58
64
  * mcp.json, commands). For runner-provisioned workspaces that is inert; for
59
65
  * sessions running on a user's own repo their project config is now honored.
@@ -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,MAAM,aAAa,CAAC;AAIpC,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,oBAAoB,GAAG,2BAA2B,CAAC;AAEzD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,qBAAqB,GAAG,CAAC,SAAS,CAAU,CAAC;AAwGnD,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,sBAAsB,CACpC,SAAiB,EACjB,gBAAwB;IAExB,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,8EAA8E;YAC9E,kFAAkF;YAClF,gFAAgF,C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,CAAC,OAAO,IAAI;gBAC7D,aAAa,OAAO,CAAC,SAAS,EAAE,CACjC,CAAC;YAEF,OAAO;gBACL,KAAK;gBACL,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,KAAK,EAAE,IAAI;gBACX,OAAO,EAAE,KAAK;gBACd,IAAI;gBACJ,MAAM,EAAE,8BAA8B;gBACtC,mBAAmB,EAAE,MAAM;aAC5B,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,KAAK,OAAO;QAC5B,CAAC,CAAC,MAAM,gBAAgB,CAAC,OAAkC,CAAC;QAC5D,CAAC,CAAC,MAAM,WAAW,CAAC,OAA6B,CAAC,CAAC;IAErD,OAAO;QACL,KAAK;QACL,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,KAAK;QACd,IAAI;QACJ,MAAM,EAAE,yBAAyB;KAClC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAe,EAAE,MAAc;IAChE,IAAI,CAAC;QACH,MAAM,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CACV,kCAAkC,OAAO,GAAG,EAC5C,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CACzC,CAAC;IACJ,CAAC;AACH,CAAC"}
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,OA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C;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CACV,kCAAkC,OAAO,GAAG,EAC5C,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CACzC,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -23,6 +23,15 @@ export interface SkillResolverOptions {
23
23
  * with a symlink from {workspace}/.stigmer -> the platform dir.
24
24
  */
25
25
  export declare function resolveSkills(client: StigmerClient, skillRefs: ApiResourceReference[], options: SkillResolverOptions): Promise<SkillMetadata[]>;
26
+ /**
27
+ * Remove the workspace `.stigmer` symlink created by {@link resolveSkills}.
28
+ *
29
+ * Called in the activity's finally so attaching a real repo leaves no Stigmer
30
+ * symlink behind once the turn ends (issue #173); a multi-turn session recreates
31
+ * it on the next turn. Only ever removes a SYMLINK — a real `.stigmer` directory
32
+ * (which would be the user's own, not ours) is left untouched. Best-effort.
33
+ */
34
+ export declare function removeStigmerSymlink(workspaceDir: string): Promise<void>;
26
35
  /**
27
36
  * Clean up platform-managed skill directory for a session.
28
37
  */
@@ -8,7 +8,7 @@
8
8
  * - Creates a symlink from the workspace to the platform dir
9
9
  * - Returns metadata for prompt injection
10
10
  */
11
- import { mkdir, writeFile, symlink, readlink, unlink, rm } from "node:fs/promises";
11
+ import { mkdir, writeFile, symlink, readlink, unlink, rm, lstat } from "node:fs/promises";
12
12
  import { join, dirname } from "node:path";
13
13
  import { getPlatformDir } from "../../shared/workspace/platform-dir.js";
14
14
  import { extractZipFileEntries } from "../../shared/zip-extract.js";
@@ -119,6 +119,29 @@ async function ensureStigmerSymlink(workspaceDir, platformDir) {
119
119
  }
120
120
  await symlink(platformDir, linkPath, "dir");
121
121
  }
122
+ /**
123
+ * Remove the workspace `.stigmer` symlink created by {@link resolveSkills}.
124
+ *
125
+ * Called in the activity's finally so attaching a real repo leaves no Stigmer
126
+ * symlink behind once the turn ends (issue #173); a multi-turn session recreates
127
+ * it on the next turn. Only ever removes a SYMLINK — a real `.stigmer` directory
128
+ * (which would be the user's own, not ours) is left untouched. Best-effort.
129
+ */
130
+ export async function removeStigmerSymlink(workspaceDir) {
131
+ const linkPath = join(workspaceDir, STIGMER_LOCAL_STATE_DIR);
132
+ try {
133
+ const stat = await lstat(linkPath);
134
+ if (stat.isSymbolicLink()) {
135
+ await unlink(linkPath);
136
+ }
137
+ }
138
+ catch (err) {
139
+ if (err?.code !== "ENOENT") {
140
+ console.warn(`removeStigmerSymlink: failed to remove ${linkPath} (non-fatal): ` +
141
+ `${err instanceof Error ? err.message : err}`);
142
+ }
143
+ }
144
+ }
122
145
  /**
123
146
  * Clean up platform-managed skill directory for a session.
124
147
  */
@@ -1 +1 @@
1
- {"version":3,"file":"skill-resolver.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/skill-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAK1C,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAC3C,MAAM,aAAa,GAAG,QAAQ,CAAC;AAO/B;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAAqB,EACrB,SAAiC,EACjC,OAA6B;IAE7B,OAAO,CAAC,GAAG,CACT,6BAA6B,OAAO,CAAC,SAAS,IAAI;QAClD,uBAAuB,OAAO,CAAC,mBAAmB,IAAI,aAAa,IAAI;QACvE,iBAAiB,SAAS,CAAC,MAAM,IAAI;QACrC,SAAS,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,C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,MAAM,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,IAAI,GAAG,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC3B,OAAO,CAAC,IAAI,CACV,0CAA0C,QAAQ,gBAAgB;gBAClE,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAC9C,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,SAAiB;IACnD,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC9C,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1D,CAAC;IAAC,MAAM,CAAC;QACP,cAAc;IAChB,CAAC;AACH,CAAC"}
@@ -1,27 +1,85 @@
1
1
  /**
2
- * Writes Cursor hooks configuration and scripts to the workspace.
3
- *
4
- * Before creating or resuming a Cursor Agent, the cursor-runner writes:
5
- * 1. .cursor/hooks.json — declares the preToolUse hook
6
- * 2. .cursor/hooks/stigmer-approval.sh — the hook script
7
- * 3. .cursor/hooks/stigmer-approval-state.json — approval state for the hook
8
- * 4. .cursor/hooks/stigmer-denials.jsonl — per-turn denial ledger (reset here,
9
- * appended by the hook on each deny, read back by the activity)
10
- *
11
- * This setup enables the durable HITL model: the hook denies tools that need
12
- * approval and records each denial to the ledger; the activity reads the ledger,
13
- * marks the gated tool calls WAITING_APPROVAL (the backend then projects
14
- * pending_approvals from that status), and returns to the workflow. On
15
- * reinvocation the state file is updated with the approved tools so the hook
16
- * allows them.
2
+ * Installs and tears down the Cursor HITL approval gate around an agent turn.
3
+ *
4
+ * The gate has two surfaces, kept deliberately separate (issue #173):
5
+ *
6
+ * 1. Runner-owned artifacts — the hook script, approval-state file, and denial
7
+ * ledger — live in the session's HITL directory OUTSIDE the user's workspace
8
+ * (`~/.stigmer/sessions/{id}/hitl/`). They never touch the attached repo.
9
+ *
10
+ * 2. Workspace surface — a single `.cursor/hooks.json` written into the
11
+ * workspace, because the Cursor SDK only loads project hooks from that
12
+ * hard-coded path. It is kept minimal, MERGED with any pre-existing user
13
+ * hooks.json, points at the hook script by ABSOLUTE path (so multi-root IDE
14
+ * windows can always find it instead of failing closed), and is RESTORED to
15
+ * its original content when the turn ends.
16
+ *
17
+ * Why this shape. The previous design wrote all four files into the workspace
18
+ * with a repo-relative hook command and never cleaned up. For a local-folder
19
+ * workspace (the user's real repo, often open in their Cursor IDE) that gated
20
+ * the user's own IDE, ingested the IDE's tool calls into the denial ledger,
21
+ * failed closed in multi-root windows (relative path → exit 127), and left the
22
+ * gate behind after the session. Relocating the artifacts, scoping the hook to
23
+ * the runner's own process (see hook-script.ts), and restoring hooks.json after
24
+ * every turn together leave the user's repo and tooling untouched.
25
+ *
26
+ * Durability model: the install runs before every agent create/resume (and on
27
+ * every HITL reinvocation / Temporal activity retry); the teardown runs in the
28
+ * activity's finally. Each turn snapshots and restores independently, so the
29
+ * repo is byte-identical between turns. If a crash skips teardown, the leftover
30
+ * hooks.json is inert: the scope guard allows every invocation once the runner
31
+ * PID is gone, and the relocated artifacts are not in the repo.
17
32
  */
18
33
  import { type ApprovalStateFile } from "./approval-state.js";
19
34
  /**
20
- * Write the complete hooks setup to the workspace directory.
35
+ * Handle returned by {@link installHitlGate}, consumed by {@link removeHitlGate}
36
+ * to restore the workspace to its pre-turn state.
37
+ */
38
+ export interface HitlGateHandle {
39
+ /** Absolute path of the workspace hooks.json this turn manages. */
40
+ hooksJsonPath: string;
41
+ /**
42
+ * Content to restore on teardown: the workspace's original hooks.json bytes
43
+ * (with any stale Stigmer entry stripped), or null when no hooks.json existed
44
+ * before this turn (in which case teardown deletes the file).
45
+ */
46
+ restoreTo: string | null;
47
+ }
48
+ /**
49
+ * Install the HITL approval gate for one agent turn.
50
+ *
51
+ * Writes the runner-owned artifacts into {@link hitlDir} and installs the merged
52
+ * `.cursor/hooks.json` into {@link workspaceRoot}, returning a handle that
53
+ * {@link removeHitlGate} uses to restore the workspace afterward.
54
+ */
55
+ export declare function installHitlGate(params: {
56
+ workspaceRoot: string;
57
+ hitlDir: string;
58
+ approvalState: ApprovalStateFile;
59
+ runnerPid: number;
60
+ }): Promise<HitlGateHandle>;
61
+ /**
62
+ * Restore the workspace to its pre-turn state.
63
+ *
64
+ * Best-effort and never throws: a teardown failure must not fail the execution,
65
+ * and a leftover hooks.json is inert anyway (see the module doc).
66
+ */
67
+ export declare function removeHitlGate(handle: HitlGateHandle): Promise<void>;
68
+ /**
69
+ * Compute the merged hooks.json to write for this turn and the content to
70
+ * restore afterward.
71
+ *
72
+ * - No existing file → write our standalone config; restore by deleting (null).
73
+ * - Existing, parseable file → append our entry to `hooks.preToolUse`,
74
+ * preserving every other hook type and field; restore the user's original
75
+ * bytes. Any stale Stigmer entry from a prior crashed turn is stripped from
76
+ * BOTH the merged config (no duplicate) and the restore target (self-healing).
77
+ * - Existing, unparseable file → replace for the turn with our standalone
78
+ * config; restore the user's exact original bytes (we never "fix" their file).
21
79
  *
22
- * Creates or overwrites:
23
- * - .cursor/hooks.json (hooks configuration)
24
- * - .cursor/hooks/stigmer-approval.sh (hook script, executable)
25
- * - .cursor/hooks/stigmer-approval-state.json (approval state)
80
+ * Exported for unit testing — this is the load-bearing data transformation.
26
81
  */
27
- export declare function writeHooksToWorkspace(workspaceRoot: string, approvalState: ApprovalStateFile): Promise<void>;
82
+ export declare function buildMergedConfig(originalRaw: string | null, scriptPath: string): {
83
+ merged: string;
84
+ restoreTo: string | null;
85
+ };
@@ -1,61 +1,181 @@
1
1
  /**
2
- * Writes Cursor hooks configuration and scripts to the workspace.
3
- *
4
- * Before creating or resuming a Cursor Agent, the cursor-runner writes:
5
- * 1. .cursor/hooks.json — declares the preToolUse hook
6
- * 2. .cursor/hooks/stigmer-approval.sh — the hook script
7
- * 3. .cursor/hooks/stigmer-approval-state.json — approval state for the hook
8
- * 4. .cursor/hooks/stigmer-denials.jsonl — per-turn denial ledger (reset here,
9
- * appended by the hook on each deny, read back by the activity)
10
- *
11
- * This setup enables the durable HITL model: the hook denies tools that need
12
- * approval and records each denial to the ledger; the activity reads the ledger,
13
- * marks the gated tool calls WAITING_APPROVAL (the backend then projects
14
- * pending_approvals from that status), and returns to the workflow. On
15
- * reinvocation the state file is updated with the approved tools so the hook
16
- * allows them.
17
- */
18
- import { writeFile, mkdir, chmod } from "node:fs/promises";
2
+ * Installs and tears down the Cursor HITL approval gate around an agent turn.
3
+ *
4
+ * The gate has two surfaces, kept deliberately separate (issue #173):
5
+ *
6
+ * 1. Runner-owned artifacts — the hook script, approval-state file, and denial
7
+ * ledger — live in the session's HITL directory OUTSIDE the user's workspace
8
+ * (`~/.stigmer/sessions/{id}/hitl/`). They never touch the attached repo.
9
+ *
10
+ * 2. Workspace surface — a single `.cursor/hooks.json` written into the
11
+ * workspace, because the Cursor SDK only loads project hooks from that
12
+ * hard-coded path. It is kept minimal, MERGED with any pre-existing user
13
+ * hooks.json, points at the hook script by ABSOLUTE path (so multi-root IDE
14
+ * windows can always find it instead of failing closed), and is RESTORED to
15
+ * its original content when the turn ends.
16
+ *
17
+ * Why this shape. The previous design wrote all four files into the workspace
18
+ * with a repo-relative hook command and never cleaned up. For a local-folder
19
+ * workspace (the user's real repo, often open in their Cursor IDE) that gated
20
+ * the user's own IDE, ingested the IDE's tool calls into the denial ledger,
21
+ * failed closed in multi-root windows (relative path → exit 127), and left the
22
+ * gate behind after the session. Relocating the artifacts, scoping the hook to
23
+ * the runner's own process (see hook-script.ts), and restoring hooks.json after
24
+ * every turn together leave the user's repo and tooling untouched.
25
+ *
26
+ * Durability model: the install runs before every agent create/resume (and on
27
+ * every HITL reinvocation / Temporal activity retry); the teardown runs in the
28
+ * activity's finally. Each turn snapshots and restores independently, so the
29
+ * repo is byte-identical between turns. If a crash skips teardown, the leftover
30
+ * hooks.json is inert: the scope guard allows every invocation once the runner
31
+ * PID is gone, and the relocated artifacts are not in the repo.
32
+ */
33
+ import { writeFile, readFile, mkdir, chmod, rm } from "node:fs/promises";
19
34
  import { join } from "node:path";
20
35
  import { generateHookScript } from "./hook-script.js";
21
36
  import { writeApprovalStateFile, resetDenialLedger } from "./approval-state.js";
22
- const HOOKS_DIR = ".cursor";
23
- const HOOKS_SCRIPTS_DIR = ".cursor/hooks";
37
+ const CURSOR_DIR = ".cursor";
24
38
  const HOOKS_CONFIG_FILE = "hooks.json";
25
39
  const HOOK_SCRIPT_FILE = "stigmer-approval.sh";
40
+ /** preToolUse hook timeout (seconds) — the script is a quick local decision. */
41
+ const HOOK_TIMEOUT_SECONDS = 10;
26
42
  /**
27
- * Write the complete hooks setup to the workspace directory.
28
- *
29
- * Creates or overwrites:
30
- * - .cursor/hooks.json (hooks configuration)
31
- * - .cursor/hooks/stigmer-approval.sh (hook script, executable)
32
- * - .cursor/hooks/stigmer-approval-state.json (approval state)
33
- */
34
- export async function writeHooksToWorkspace(workspaceRoot, approvalState) {
35
- const hooksDir = join(workspaceRoot, HOOKS_DIR);
36
- const scriptsDir = join(workspaceRoot, HOOKS_SCRIPTS_DIR);
37
- await mkdir(hooksDir, { recursive: true });
38
- await mkdir(scriptsDir, { recursive: true });
39
- const stateFilePath = await writeApprovalStateFile(workspaceRoot, approvalState);
40
- // Reset the denial ledger for this turn (co-located with the state-file write
41
- // so the runner only reads denials produced by the current run, even across
42
- // HITL reinvocations on the durable workspace and Temporal activity retries).
43
- const ledgerFilePath = await resetDenialLedger(workspaceRoot);
44
- const hookScriptPath = join(scriptsDir, HOOK_SCRIPT_FILE);
45
- await writeFile(hookScriptPath, generateHookScript(stateFilePath, ledgerFilePath), "utf-8");
43
+ * Install the HITL approval gate for one agent turn.
44
+ *
45
+ * Writes the runner-owned artifacts into {@link hitlDir} and installs the merged
46
+ * `.cursor/hooks.json` into {@link workspaceRoot}, returning a handle that
47
+ * {@link removeHitlGate} uses to restore the workspace afterward.
48
+ */
49
+ export async function installHitlGate(params) {
50
+ const { workspaceRoot, hitlDir, approvalState, runnerPid } = params;
51
+ const scriptPath = await writeHitlArtifacts(hitlDir, approvalState, runnerPid);
52
+ return installWorkspaceHook(workspaceRoot, scriptPath);
53
+ }
54
+ /**
55
+ * Restore the workspace to its pre-turn state.
56
+ *
57
+ * Best-effort and never throws: a teardown failure must not fail the execution,
58
+ * and a leftover hooks.json is inert anyway (see the module doc).
59
+ */
60
+ export async function removeHitlGate(handle) {
61
+ try {
62
+ if (handle.restoreTo === null) {
63
+ await rm(handle.hooksJsonPath, { force: true });
64
+ }
65
+ else {
66
+ await writeFile(handle.hooksJsonPath, handle.restoreTo, "utf-8");
67
+ }
68
+ }
69
+ catch (err) {
70
+ console.warn(`removeHitlGate: failed to restore ${handle.hooksJsonPath} (non-fatal): ` +
71
+ `${err instanceof Error ? err.message : err}`);
72
+ }
73
+ }
74
+ /**
75
+ * Write the runner-owned gate artifacts (approval-state file, fresh denial
76
+ * ledger, hook script) into the session HITL directory and return the absolute
77
+ * hook-script path. The script is regenerated every turn so the current runner
78
+ * PID and the current state-file/ledger paths are always baked in.
79
+ */
80
+ async function writeHitlArtifacts(hitlDir, approvalState, runnerPid) {
81
+ await mkdir(hitlDir, { recursive: true });
82
+ const stateFilePath = await writeApprovalStateFile(hitlDir, approvalState);
83
+ // Reset the denial ledger for this turn so the runner only reads denials
84
+ // produced by the current run, even across HITL reinvocations on the durable
85
+ // HITL directory and Temporal activity retries.
86
+ const ledgerFilePath = await resetDenialLedger(hitlDir);
87
+ const hookScriptPath = join(hitlDir, HOOK_SCRIPT_FILE);
88
+ await writeFile(hookScriptPath, generateHookScript(stateFilePath, ledgerFilePath, runnerPid), "utf-8");
46
89
  await chmod(hookScriptPath, 0o755);
47
- const hooksConfig = {
48
- version: 1,
49
- hooks: {
50
- preToolUse: [
51
- {
52
- command: `.cursor/hooks/${HOOK_SCRIPT_FILE}`,
53
- timeout: 10,
54
- failClosed: true,
55
- },
56
- ],
57
- },
58
- };
59
- await writeFile(join(hooksDir, HOOKS_CONFIG_FILE), JSON.stringify(hooksConfig, null, 2), "utf-8");
90
+ return hookScriptPath;
91
+ }
92
+ /**
93
+ * Snapshot the workspace's existing `.cursor/hooks.json`, write a merged config
94
+ * that adds our preToolUse entry (absolute script path) while preserving the
95
+ * user's own hooks, and return the handle for restoration.
96
+ */
97
+ async function installWorkspaceHook(workspaceRoot, scriptPath) {
98
+ const cursorDir = join(workspaceRoot, CURSOR_DIR);
99
+ const hooksJsonPath = join(cursorDir, HOOKS_CONFIG_FILE);
100
+ let originalRaw = null;
101
+ try {
102
+ originalRaw = await readFile(hooksJsonPath, "utf-8");
103
+ }
104
+ catch {
105
+ originalRaw = null;
106
+ }
107
+ const { merged, restoreTo } = buildMergedConfig(originalRaw, scriptPath);
108
+ await mkdir(cursorDir, { recursive: true });
109
+ await writeFile(hooksJsonPath, merged, "utf-8");
110
+ return { hooksJsonPath, restoreTo };
111
+ }
112
+ /**
113
+ * The preToolUse entry the gate installs. Absolute `command` so the hook is
114
+ * found regardless of which workspace root a multi-root IDE resolves against.
115
+ */
116
+ function buildHookEntry(scriptPath) {
117
+ return { command: scriptPath, timeout: HOOK_TIMEOUT_SECONDS, failClosed: true };
118
+ }
119
+ /**
120
+ * Identify a preToolUse entry the gate itself wrote (in this or a prior,
121
+ * crash-leftover turn) so a re-install never duplicates it and a restore strips
122
+ * it. Matched by the unmistakable HITL script path, never by a user's own hook.
123
+ */
124
+ function isStigmerHookEntry(entry) {
125
+ if (!entry || typeof entry !== "object")
126
+ return false;
127
+ const command = entry.command;
128
+ return (typeof command === "string" &&
129
+ command.includes("/.stigmer/sessions/") &&
130
+ command.endsWith(`/${HOOK_SCRIPT_FILE}`));
131
+ }
132
+ const STANDALONE_CONFIG = (scriptPath) => JSON.stringify({ version: 1, hooks: { preToolUse: [buildHookEntry(scriptPath)] } }, null, 2);
133
+ /**
134
+ * Compute the merged hooks.json to write for this turn and the content to
135
+ * restore afterward.
136
+ *
137
+ * - No existing file → write our standalone config; restore by deleting (null).
138
+ * - Existing, parseable file → append our entry to `hooks.preToolUse`,
139
+ * preserving every other hook type and field; restore the user's original
140
+ * bytes. Any stale Stigmer entry from a prior crashed turn is stripped from
141
+ * BOTH the merged config (no duplicate) and the restore target (self-healing).
142
+ * - Existing, unparseable file → replace for the turn with our standalone
143
+ * config; restore the user's exact original bytes (we never "fix" their file).
144
+ *
145
+ * Exported for unit testing — this is the load-bearing data transformation.
146
+ */
147
+ export function buildMergedConfig(originalRaw, scriptPath) {
148
+ if (originalRaw === null) {
149
+ return { merged: STANDALONE_CONFIG(scriptPath), restoreTo: null };
150
+ }
151
+ let parsed;
152
+ try {
153
+ parsed = JSON.parse(originalRaw);
154
+ }
155
+ catch {
156
+ return { merged: STANDALONE_CONFIG(scriptPath), restoreTo: originalRaw };
157
+ }
158
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
159
+ return { merged: STANDALONE_CONFIG(scriptPath), restoreTo: originalRaw };
160
+ }
161
+ const root = parsed;
162
+ const hooks = root.hooks && typeof root.hooks === "object" && !Array.isArray(root.hooks)
163
+ ? root.hooks
164
+ : {};
165
+ const existingPreToolUse = Array.isArray(hooks.preToolUse) ? hooks.preToolUse : [];
166
+ const userEntries = existingPreToolUse.filter((e) => !isStigmerHookEntry(e));
167
+ const strippedStale = userEntries.length !== existingPreToolUse.length;
168
+ const version = typeof root.version === "number" ? root.version : 1;
169
+ const merged = JSON.stringify({
170
+ ...root,
171
+ version,
172
+ hooks: { ...hooks, preToolUse: [...userEntries, buildHookEntry(scriptPath)] },
173
+ }, null, 2);
174
+ // Restore the user's exact original bytes — unless we stripped a stale Stigmer
175
+ // entry, in which case restore the cleaned form so our leftover never lingers.
176
+ const restoreTo = strippedStale
177
+ ? JSON.stringify({ ...root, version, hooks: { ...hooks, preToolUse: userEntries } }, null, 2)
178
+ : originalRaw;
179
+ return { merged, restoreTo };
60
180
  }
61
181
  //# sourceMappingURL=workspace-setup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-setup.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/workspace-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAA0B,MAAM,qBAAqB,CAAC;AAExG,MAAM,SAAS,GAAG,SAAS,CAAC;AAC5B,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAC1C,MAAM,iBAAiB,GAAG,YAAY,CAAC;AACvC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,aAAqB,EACrB,aAAgC;IAEhC,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;IAC1D,MAAM,KAAK,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,MAAM,KAAK,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7C,MAAM,aAAa,GAAG,MAAM,sBAAsB,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IAEjF,8EAA8E;IAC9E,4EAA4E;IAC5E,8EAA8E;IAC9E,MAAM,cAAc,GAAG,MAAM,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAE9D,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;IAC1D,MAAM,SAAS,CAAC,cAAc,EAAE,kBAAkB,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;IAC5F,MAAM,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAEnC,MAAM,WAAW,GAAG;QAClB,OAAO,EAAE,CAAC;QACV,KAAK,EAAE;YACL,UAAU,EAAE;gBACV;oBACE,OAAO,EAAE,iBAAiB,gBAAgB,EAAE;oBAC5C,OAAO,EAAE,EAAE;oBACX,UAAU,EAAE,IAAI;iBACjB;aACF;SACF;KACF,CAAC;IAEF,MAAM,SAAS,CACb,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,EACjC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,EACpC,OAAO,CACR,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"workspace-setup.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/workspace-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAA0B,MAAM,qBAAqB,CAAC;AAExG,MAAM,UAAU,GAAG,SAAS,CAAC;AAC7B,MAAM,iBAAiB,GAAG,YAAY,CAAC;AACvC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AAE/C,gFAAgF;AAChF,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAiBhC;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAKrC;IACC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,SA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QACzC,CAAC,CAAC,EAAE,CAAC;IACT,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IACnF,MAAM,WAAW,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7E,MAAM,aAAa,GAAG,WAAW,CAAC,MAAM,KAAK,kBAAkB,CAAC,MAAM,CAAC;IAEvE,MAAM,OAAO,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAEpE,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAC3B;QACE,GAAG,IAAI;QACP,OAAO;QACP,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,CAAC,GAAG,WAAW,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,EAAE;KAC9E,EACD,IAAI,EACJ,CAAC,CACF,CAAC;IAEF,+EAA+E;IAC/E,+EAA+E;IAC/E,MAAM,SAAS,GAAG,aAAa;QAC7B,CAAC,CAAC,IAAI,CAAC,SAAS,CACZ,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,EAClE,IAAI,EACJ,CAAC,CACF;QACH,CAAC,CAAC,WAAW,CAAC;IAEhB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC/B,CAAC"}
@@ -1,11 +1,15 @@
1
1
  /**
2
2
  * Session-scoped platform directory management.
3
3
  *
4
- * Each agent execution session gets a dedicated platform directory at
5
- * `~/.stigmer/sessions/{sessionId}/platform/` for storing skills,
6
- * attachments, and other platform-managed files. This directory is
7
- * separate from the user's workspace — the agent sees it via the
8
- * `.stigmer/` virtual namespace through WorkspaceBackend routing.
4
+ * Each agent execution session gets a dedicated directory tree under
5
+ * `~/.stigmer/sessions/{sessionId}/`:
6
+ * - `platform/` — skills, attachments, and other platform-managed files the
7
+ * agent sees via the `.stigmer/` virtual namespace (WorkspaceBackend routing).
8
+ * - `hitl/` — the HITL approval gate's runtime artifacts (hook script, approval
9
+ * state, denial ledger). These live OUTSIDE the user's workspace so attaching
10
+ * a real repo never leaves Stigmer files behind in it (see issue #173); only
11
+ * a minimal, transient `.cursor/hooks.json` referencing the absolute script
12
+ * path is written into the workspace itself.
9
13
  *
10
14
  * This module replaces the duplicated `getPlatformDir` helpers in
11
15
  * execute-cursor/skill-resolver.ts and execute-cursor/attachment-resolver.ts.
@@ -23,3 +27,20 @@ export declare function getPlatformDir(sessionId: string): string;
23
27
  * safe to call multiple times for the same session.
24
28
  */
25
29
  export declare function ensurePlatformDir(sessionId: string): Promise<string>;
30
+ /**
31
+ * Compute the HITL directory path for a session — the runner-owned home for the
32
+ * approval gate's hook script, approval-state file, and denial ledger.
33
+ *
34
+ * Kept separate from the workspace so the gate's machinery never pollutes the
35
+ * user's repo: the workspace only ever holds a transient `.cursor/hooks.json`
36
+ * that points here by absolute path. Pure function — performs no I/O.
37
+ */
38
+ export declare function getHitlDir(sessionId: string): string;
39
+ /**
40
+ * Ensure the HITL directory exists and return its path.
41
+ *
42
+ * Creates the full directory tree if it does not exist. Idempotent —
43
+ * safe to call multiple times for the same session (including across HITL
44
+ * reinvocations and Temporal activity retries).
45
+ */
46
+ export declare function ensureHitlDir(sessionId: string): Promise<string>;
@@ -1,11 +1,15 @@
1
1
  /**
2
2
  * Session-scoped platform directory management.
3
3
  *
4
- * Each agent execution session gets a dedicated platform directory at
5
- * `~/.stigmer/sessions/{sessionId}/platform/` for storing skills,
6
- * attachments, and other platform-managed files. This directory is
7
- * separate from the user's workspace — the agent sees it via the
8
- * `.stigmer/` virtual namespace through WorkspaceBackend routing.
4
+ * Each agent execution session gets a dedicated directory tree under
5
+ * `~/.stigmer/sessions/{sessionId}/`:
6
+ * - `platform/` — skills, attachments, and other platform-managed files the
7
+ * agent sees via the `.stigmer/` virtual namespace (WorkspaceBackend routing).
8
+ * - `hitl/` — the HITL approval gate's runtime artifacts (hook script, approval
9
+ * state, denial ledger). These live OUTSIDE the user's workspace so attaching
10
+ * a real repo never leaves Stigmer files behind in it (see issue #173); only
11
+ * a minimal, transient `.cursor/hooks.json` referencing the absolute script
12
+ * path is written into the workspace itself.
9
13
  *
10
14
  * This module replaces the duplicated `getPlatformDir` helpers in
11
15
  * execute-cursor/skill-resolver.ts and execute-cursor/attachment-resolver.ts.
@@ -13,14 +17,18 @@
13
17
  import { join } from "node:path";
14
18
  import { mkdir } from "node:fs/promises";
15
19
  import { homedir } from "node:os";
20
+ /** Root of a session's runner-owned directory tree (outside the workspace). */
21
+ function getSessionDir(sessionId) {
22
+ const home = process.env.HOME || process.env.USERPROFILE || homedir();
23
+ return join(home, ".stigmer", "sessions", sessionId);
24
+ }
16
25
  /**
17
26
  * Compute the platform directory path for a session.
18
27
  *
19
28
  * Pure function — does not create the directory or perform I/O.
20
29
  */
21
30
  export function getPlatformDir(sessionId) {
22
- const home = process.env.HOME || process.env.USERPROFILE || homedir();
23
- return join(home, ".stigmer", "sessions", sessionId, "platform");
31
+ return join(getSessionDir(sessionId), "platform");
24
32
  }
25
33
  /**
26
34
  * Ensure the platform directory exists and return its path.
@@ -33,4 +41,27 @@ export async function ensurePlatformDir(sessionId) {
33
41
  await mkdir(dir, { recursive: true });
34
42
  return dir;
35
43
  }
44
+ /**
45
+ * Compute the HITL directory path for a session — the runner-owned home for the
46
+ * approval gate's hook script, approval-state file, and denial ledger.
47
+ *
48
+ * Kept separate from the workspace so the gate's machinery never pollutes the
49
+ * user's repo: the workspace only ever holds a transient `.cursor/hooks.json`
50
+ * that points here by absolute path. Pure function — performs no I/O.
51
+ */
52
+ export function getHitlDir(sessionId) {
53
+ return join(getSessionDir(sessionId), "hitl");
54
+ }
55
+ /**
56
+ * Ensure the HITL directory exists and return its path.
57
+ *
58
+ * Creates the full directory tree if it does not exist. Idempotent —
59
+ * safe to call multiple times for the same session (including across HITL
60
+ * reinvocations and Temporal activity retries).
61
+ */
62
+ export async function ensureHitlDir(sessionId) {
63
+ const dir = getHitlDir(sessionId);
64
+ await mkdir(dir, { recursive: true });
65
+ return dir;
66
+ }
36
67
  //# sourceMappingURL=platform-dir.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-dir.js","sourceRoot":"","sources":["../../../src/shared/workspace/platform-dir.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,EAAE,CAAC;IACtE,OAAO,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACnE,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,SAAiB;IACvD,MAAM,GAAG,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACtC,OAAO,GAAG,CAAC;AACb,CAAC"}
1
+ {"version":3,"file":"platform-dir.js","sourceRoot":"","sources":["../../../src/shared/workspace/platform-dir.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,+EAA+E;AAC/E,SAAS,aAAa,CAAC,SAAiB;IACtC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,EAAE,CAAC;IACtE,OAAO,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC9C,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;AACpD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,SAAiB;IACvD,MAAM,GAAG,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACtC,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,SAAiB;IAC1C,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,SAAiB;IACnD,MAAM,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;IAClC,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACtC,OAAO,GAAG,CAAC;AACb,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigmer/runner",
3
- "version": "3.0.8-dev.20260612100207",
3
+ "version": "3.0.8-dev.20260613041848",
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",
@@ -86,7 +86,7 @@
86
86
  "@opentelemetry/resources": "^2.0.0",
87
87
  "@opentelemetry/sdk-trace-base": "^2.0.0",
88
88
  "@opentelemetry/sdk-trace-node": "^2.0.0",
89
- "@stigmer/protos": "3.0.8-dev.20260612100207",
89
+ "@stigmer/protos": "3.0.8-dev.20260613041848",
90
90
  "@temporalio/activity": "^1.11.0",
91
91
  "@temporalio/client": "^1.11.0",
92
92
  "@temporalio/common": "^1.11.0",