@stigmer/runner 3.1.4 → 3.1.5

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 (41) hide show
  1. package/dist/.build-fingerprint +1 -1
  2. package/dist/activities/execute-cursor/attachment-resolver.js +1 -1
  3. package/dist/activities/execute-cursor/attachment-resolver.js.map +1 -1
  4. package/dist/activities/execute-cursor/index.js +1 -1
  5. package/dist/activities/execute-cursor/index.js.map +1 -1
  6. package/dist/activities/execute-cursor/skill-resolver.js +1 -1
  7. package/dist/activities/execute-cursor/skill-resolver.js.map +1 -1
  8. package/dist/activities/execute-deep-agent/index.js +31 -5
  9. package/dist/activities/execute-deep-agent/index.js.map +1 -1
  10. package/dist/activities/execute-deep-agent/writeback-coordinator.js +5 -1
  11. package/dist/activities/execute-deep-agent/writeback-coordinator.js.map +1 -1
  12. package/dist/shared/filereview/git-substrate.js +4 -0
  13. package/dist/shared/filereview/git-substrate.js.map +1 -1
  14. package/dist/shared/workspace/git-identity.d.ts +36 -0
  15. package/dist/shared/workspace/git-identity.js +39 -0
  16. package/dist/shared/workspace/git-identity.js.map +1 -0
  17. package/dist/shared/workspace/local-backend.d.ts +6 -2
  18. package/dist/shared/workspace/local-backend.js +6 -2
  19. package/dist/shared/workspace/local-backend.js.map +1 -1
  20. package/dist/shared/workspace/stigmer-link.d.ts +54 -0
  21. package/dist/shared/workspace/stigmer-link.js +92 -0
  22. package/dist/shared/workspace/stigmer-link.js.map +1 -0
  23. package/dist/shared/workspace/types.d.ts +6 -4
  24. package/package.json +2 -2
  25. package/src/activities/execute-cursor/attachment-resolver.ts +1 -1
  26. package/src/activities/execute-cursor/index.ts +1 -1
  27. package/src/activities/execute-cursor/skill-resolver.ts +1 -1
  28. package/src/activities/execute-deep-agent/__tests__/writeback-coordinator.test.ts +30 -3
  29. package/src/activities/execute-deep-agent/index.ts +36 -5
  30. package/src/activities/execute-deep-agent/writeback-coordinator.ts +5 -1
  31. package/src/shared/filereview/git-substrate.ts +4 -0
  32. package/src/shared/workspace/__tests__/git-identity.test.ts +124 -0
  33. package/src/shared/workspace/__tests__/stigmer-link.test.ts +173 -0
  34. package/src/shared/workspace/git-identity.ts +41 -0
  35. package/src/shared/workspace/local-backend.ts +6 -2
  36. package/src/shared/workspace/stigmer-link.ts +97 -0
  37. package/src/shared/workspace/types.ts +6 -4
  38. package/dist/activities/execute-cursor/stigmer-link.d.ts +0 -35
  39. package/dist/activities/execute-cursor/stigmer-link.js +0 -73
  40. package/dist/activities/execute-cursor/stigmer-link.js.map +0 -1
  41. package/src/activities/execute-cursor/stigmer-link.ts +0 -78
@@ -1 +1 @@
1
- {"version":3,"file":"git-substrate.js","sourceRoot":"","sources":["../../../src/shared/filereview/git-substrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,mFAAmF;AACnF,SAAS,gBAAgB,CAAC,YAA+B;IACvD,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7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,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACvD,IAAI,MAAM,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAClE,OAAO;QACL,IAAI;QACJ,UAAU,EAAE,cAAc,CAAC,MAAM;QACjC,MAAM,EAAE,MAAM,IAAI,YAAY;QAC9B,KAAK,EAAE,KAAK,IAAI,YAAY;KAC7B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The public git identity for commits the agent authors on the user's behalf.
3
+ *
4
+ * Write-back commits (branch/commit/push/PR — see WriteBackCoordinator) land
5
+ * on real branches in the user's repository, so they carry a dedicated,
6
+ * recognizable agent identity in every mode — local and cloud alike. This is
7
+ * deliberate: a commit authored by the agent should never be silently
8
+ * attributed to whatever identity happens to live in the host's `~/.gitconfig`
9
+ * (local), and the cloud sandbox has no identity at all, which makes a bare
10
+ * `git commit` fail with "Author identity unknown".
11
+ *
12
+ * Distinct from the *internal* snapshot identity in
13
+ * `../filereview/git-substrate.ts` (`stigmer-runner <runner@stigmer.local>`):
14
+ * those commit objects are never on a branch and never pushed — they exist
15
+ * only to pin trees against GC. This identity is the public-facing one that
16
+ * appears in `git log`, on GitHub, and in pull requests.
17
+ */
18
+ export declare const AGENT_GIT_AUTHOR_NAME = "Stigmer Agent";
19
+ export declare const AGENT_GIT_AUTHOR_EMAIL = "noreply@stigmer.ai";
20
+ /**
21
+ * `git -c` config flags that pin the agent identity for a single command.
22
+ *
23
+ * Per-command `-c` flags (rather than repo-local or global `git config`) keep
24
+ * the identity deterministic in every environment without mutating the user's
25
+ * repository config — the same never-mutate reasoning documented on
26
+ * `SNAPSHOT_IDENTITY_ENV` in `git-substrate.ts`. Env-var injection is not an
27
+ * option here: `WorkspaceBackend.execute()` takes no env parameter, and
28
+ * widening that contract for one caller would be a larger change than the
29
+ * problem deserves.
30
+ */
31
+ export declare const AGENT_GIT_IDENTITY_FLAGS = "-c user.name='Stigmer Agent' -c user.email='noreply@stigmer.ai'";
32
+ /**
33
+ * Build a `git commit` command that is always authored by the agent identity,
34
+ * regardless of what identity (if any) the surrounding environment provides.
35
+ */
36
+ export declare function gitCommitAsAgent(commitMsg: string): string;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The public git identity for commits the agent authors on the user's behalf.
3
+ *
4
+ * Write-back commits (branch/commit/push/PR — see WriteBackCoordinator) land
5
+ * on real branches in the user's repository, so they carry a dedicated,
6
+ * recognizable agent identity in every mode — local and cloud alike. This is
7
+ * deliberate: a commit authored by the agent should never be silently
8
+ * attributed to whatever identity happens to live in the host's `~/.gitconfig`
9
+ * (local), and the cloud sandbox has no identity at all, which makes a bare
10
+ * `git commit` fail with "Author identity unknown".
11
+ *
12
+ * Distinct from the *internal* snapshot identity in
13
+ * `../filereview/git-substrate.ts` (`stigmer-runner <runner@stigmer.local>`):
14
+ * those commit objects are never on a branch and never pushed — they exist
15
+ * only to pin trees against GC. This identity is the public-facing one that
16
+ * appears in `git log`, on GitHub, and in pull requests.
17
+ */
18
+ export const AGENT_GIT_AUTHOR_NAME = "Stigmer Agent";
19
+ export const AGENT_GIT_AUTHOR_EMAIL = "noreply@stigmer.ai";
20
+ /**
21
+ * `git -c` config flags that pin the agent identity for a single command.
22
+ *
23
+ * Per-command `-c` flags (rather than repo-local or global `git config`) keep
24
+ * the identity deterministic in every environment without mutating the user's
25
+ * repository config — the same never-mutate reasoning documented on
26
+ * `SNAPSHOT_IDENTITY_ENV` in `git-substrate.ts`. Env-var injection is not an
27
+ * option here: `WorkspaceBackend.execute()` takes no env parameter, and
28
+ * widening that contract for one caller would be a larger change than the
29
+ * problem deserves.
30
+ */
31
+ export const AGENT_GIT_IDENTITY_FLAGS = `-c user.name='${AGENT_GIT_AUTHOR_NAME}' -c user.email='${AGENT_GIT_AUTHOR_EMAIL}'`;
32
+ /**
33
+ * Build a `git commit` command that is always authored by the agent identity,
34
+ * regardless of what identity (if any) the surrounding environment provides.
35
+ */
36
+ export function gitCommitAsAgent(commitMsg) {
37
+ return `git ${AGENT_GIT_IDENTITY_FLAGS} commit -m "${commitMsg}"`;
38
+ }
39
+ //# sourceMappingURL=git-identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-identity.js","sourceRoot":"","sources":["../../../src/shared/workspace/git-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACrD,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,wBAAwB,GACnC,iBAAiB,qBAAqB,oBAAoB,sBAAsB,GAAG,CAAC;AAEtF;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IAChD,OAAO,OAAO,wBAAwB,eAAe,SAAS,GAAG,CAAC;AACpE,CAAC"}
@@ -6,8 +6,12 @@
6
6
  * sandbox) backend will be added in Phase 3.
7
7
  *
8
8
  * When `platformDir` is provided, paths under `.stigmer/` are
9
- * transparently routed to the platform directory. The agent sees a
10
- * unified namespace; the workspace directory is never polluted.
9
+ * transparently routed to the platform directory, keeping platform files
10
+ * out of the workspace tree. This routing serves the RUNNER's own I/O
11
+ * (skill/attachment materialization, `execute` command rewriting) — the
12
+ * agent's file tools do not go through this backend. Agent-visible reads
13
+ * of `.stigmer/…` reach the same physical files through the per-turn
14
+ * workspace symlink instead (see shared/workspace/stigmer-link.ts).
11
15
  */
12
16
  import type { WorkspaceBackend } from "./types.js";
13
17
  export declare class LocalWorkspaceBackend implements WorkspaceBackend {
@@ -6,8 +6,12 @@
6
6
  * sandbox) backend will be added in Phase 3.
7
7
  *
8
8
  * When `platformDir` is provided, paths under `.stigmer/` are
9
- * transparently routed to the platform directory. The agent sees a
10
- * unified namespace; the workspace directory is never polluted.
9
+ * transparently routed to the platform directory, keeping platform files
10
+ * out of the workspace tree. This routing serves the RUNNER's own I/O
11
+ * (skill/attachment materialization, `execute` command rewriting) — the
12
+ * agent's file tools do not go through this backend. Agent-visible reads
13
+ * of `.stigmer/…` reach the same physical files through the per-turn
14
+ * workspace symlink instead (see shared/workspace/stigmer-link.ts).
11
15
  */
12
16
  import { execFile } from "node:child_process";
13
17
  import { readFile, writeFile, access, mkdir } from "node:fs/promises";
@@ -1 +1 @@
1
- {"version":3,"file":"local-backend.js","sourceRoot":"","sources":["../../../src/shared/workspace/local-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAY,MAAM,WAAW,CAAC;AAEhE,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,qBAAqB;IACvB,OAAO,CAAS;IAChB,WAAW,CAAU;IAE9B,YAAY,OAAe,EAAE,WAAoB;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,OAA0B;QACvD,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG;YACtB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;YAC3E,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QAEjB,IAAI,eAAe,GAAG,OAAO,CAAC;QAC9B,MAAM,GAAG,GAAuC,IAAI,CAAC,WAAW;YAC9D,CAAC,CAAC,E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AC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED;;;;;;;;;OASG;IACK,WAAW,CAAC,IAAY;QAC9B,IAAI,UAAU,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAElC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;YAC7D,IAAI,UAAU,EAAE,CAAC;gBACf,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;gBACtD,MAAM,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBACrD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,kBAAkB,GAAG,GAAG,CAAC,IAAI,QAAQ,KAAK,kBAAkB,EAAE,CAAC;oBACtF,MAAM,IAAI,KAAK,CACb,6BAA6B,IAAI,uCAAuC,CACzE,CAAC;gBACJ,CAAC;gBACD,OAAO,QAAQ,CAAC;YAClB,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,OAAe,EACf,WAAoB;IAEpB,MAAM,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1C,OAAO,IAAI,qBAAqB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The workspace `.stigmer` symlink — the bridge from the session's workspace
3
+ * to its platform-managed directory (~/.stigmer/sessions/{id}/platform/, see
4
+ * platform-dir.ts), shared by BOTH harnesses.
5
+ *
6
+ * Platform-injected content (skills, attachment inputs, the approved plan)
7
+ * physically lives in the platform dir, outside the workspace, so a real repo
8
+ * is never polluted with Stigmer files (issue #173). But the agent reads from
9
+ * the workspace: the Cursor SDK resolves paths against the workspace CWD, and
10
+ * the native (deepagents) harness's file tools resolve against a
11
+ * `FilesystemBackend` rooted at the workspace. The symlink is what makes the
12
+ * `.stigmer/…` paths those agents are prompted with (skill locations,
13
+ * `.stigmer/inputs/…` attachments) actually resolve.
14
+ *
15
+ * Lifecycle contract (same for both harnesses):
16
+ * - Created per turn, under the workspace turn lock — the link is a
17
+ * working-tree mutation, and re-pointing it while another session's turn is
18
+ * running on a shared tree would redirect that turn's reads mid-flight.
19
+ * Cursor creates it in its skill/attachment resolvers (which run after lock
20
+ * acquisition); the native harness creates it right after acquiring the
21
+ * lock (execute-deep-agent/index.ts).
22
+ * - Removed at turn end ({@link removeStigmerSymlink} in the activity's
23
+ * cleanup), so a real repo is left untouched once the turn ends; a
24
+ * multi-turn session recreates the link on the next turn.
25
+ * - {@link ensureStigmerSymlink} is idempotent, so multiple populaters may
26
+ * run in any order within a turn.
27
+ *
28
+ * OWNERSHIP SHARP EDGE: the platform owns the `.stigmer` name inside a
29
+ * workspace. {@link ensureStigmerSymlink} REPLACES a real (non-symlink)
30
+ * `.stigmer` directory it finds there — deliberate, so a directory left
31
+ * behind by an older runner can never shadow the platform mount. (A user's
32
+ * own `.stigmer` content is unreachable anyway: the runner's
33
+ * `LocalWorkspaceBackend` routes every `.stigmer/…` path to the platform
34
+ * dir.) Turn-end removal is the conservative half: it only ever removes a
35
+ * SYMLINK.
36
+ */
37
+ /** The workspace-visible name of the platform namespace. */
38
+ export declare const STIGMER_LOCAL_STATE_DIR = ".stigmer";
39
+ /**
40
+ * Ensure the workspace `.stigmer` symlink points to the platform dir.
41
+ * Idempotent: an existing correct link is kept; a stale link (or a non-link
42
+ * left behind by an older runner) is replaced.
43
+ */
44
+ export declare function ensureStigmerSymlink(workspaceDir: string, platformDir: string): Promise<void>;
45
+ /**
46
+ * Remove the workspace `.stigmer` symlink created by
47
+ * {@link ensureStigmerSymlink}.
48
+ *
49
+ * Called in the activity's cleanup so attaching a real repo leaves no Stigmer
50
+ * symlink behind once the turn ends (issue #173). Only ever removes a
51
+ * SYMLINK — a real `.stigmer` directory (which would be the user's own, not
52
+ * ours) is left untouched. Best-effort.
53
+ */
54
+ export declare function removeStigmerSymlink(workspaceDir: string): Promise<void>;
@@ -0,0 +1,92 @@
1
+ /**
2
+ * The workspace `.stigmer` symlink — the bridge from the session's workspace
3
+ * to its platform-managed directory (~/.stigmer/sessions/{id}/platform/, see
4
+ * platform-dir.ts), shared by BOTH harnesses.
5
+ *
6
+ * Platform-injected content (skills, attachment inputs, the approved plan)
7
+ * physically lives in the platform dir, outside the workspace, so a real repo
8
+ * is never polluted with Stigmer files (issue #173). But the agent reads from
9
+ * the workspace: the Cursor SDK resolves paths against the workspace CWD, and
10
+ * the native (deepagents) harness's file tools resolve against a
11
+ * `FilesystemBackend` rooted at the workspace. The symlink is what makes the
12
+ * `.stigmer/…` paths those agents are prompted with (skill locations,
13
+ * `.stigmer/inputs/…` attachments) actually resolve.
14
+ *
15
+ * Lifecycle contract (same for both harnesses):
16
+ * - Created per turn, under the workspace turn lock — the link is a
17
+ * working-tree mutation, and re-pointing it while another session's turn is
18
+ * running on a shared tree would redirect that turn's reads mid-flight.
19
+ * Cursor creates it in its skill/attachment resolvers (which run after lock
20
+ * acquisition); the native harness creates it right after acquiring the
21
+ * lock (execute-deep-agent/index.ts).
22
+ * - Removed at turn end ({@link removeStigmerSymlink} in the activity's
23
+ * cleanup), so a real repo is left untouched once the turn ends; a
24
+ * multi-turn session recreates the link on the next turn.
25
+ * - {@link ensureStigmerSymlink} is idempotent, so multiple populaters may
26
+ * run in any order within a turn.
27
+ *
28
+ * OWNERSHIP SHARP EDGE: the platform owns the `.stigmer` name inside a
29
+ * workspace. {@link ensureStigmerSymlink} REPLACES a real (non-symlink)
30
+ * `.stigmer` directory it finds there — deliberate, so a directory left
31
+ * behind by an older runner can never shadow the platform mount. (A user's
32
+ * own `.stigmer` content is unreachable anyway: the runner's
33
+ * `LocalWorkspaceBackend` routes every `.stigmer/…` path to the platform
34
+ * dir.) Turn-end removal is the conservative half: it only ever removes a
35
+ * SYMLINK.
36
+ */
37
+ import { symlink, readlink, unlink, rm, lstat } from "node:fs/promises";
38
+ import { join } from "node:path";
39
+ /** The workspace-visible name of the platform namespace. */
40
+ export const STIGMER_LOCAL_STATE_DIR = ".stigmer";
41
+ /**
42
+ * Ensure the workspace `.stigmer` symlink points to the platform dir.
43
+ * Idempotent: an existing correct link is kept; a stale link (or a non-link
44
+ * left behind by an older runner) is replaced.
45
+ */
46
+ export async function ensureStigmerSymlink(workspaceDir, platformDir) {
47
+ const linkPath = join(workspaceDir, STIGMER_LOCAL_STATE_DIR);
48
+ try {
49
+ const existing = await readlink(linkPath);
50
+ if (existing === platformDir)
51
+ return;
52
+ await unlink(linkPath);
53
+ }
54
+ catch (err) {
55
+ if (err.code === "ENOENT") {
56
+ // No existing symlink
57
+ }
58
+ else if (err.code === "EINVAL") {
59
+ // Exists but is not a symlink — remove the directory
60
+ await rm(linkPath, { recursive: true, force: true });
61
+ }
62
+ else {
63
+ throw err;
64
+ }
65
+ }
66
+ await symlink(platformDir, linkPath, "dir");
67
+ }
68
+ /**
69
+ * Remove the workspace `.stigmer` symlink created by
70
+ * {@link ensureStigmerSymlink}.
71
+ *
72
+ * Called in the activity's cleanup so attaching a real repo leaves no Stigmer
73
+ * symlink behind once the turn ends (issue #173). Only ever removes a
74
+ * SYMLINK — a real `.stigmer` directory (which would be the user's own, not
75
+ * ours) is left untouched. Best-effort.
76
+ */
77
+ export async function removeStigmerSymlink(workspaceDir) {
78
+ const linkPath = join(workspaceDir, STIGMER_LOCAL_STATE_DIR);
79
+ try {
80
+ const stat = await lstat(linkPath);
81
+ if (stat.isSymbolicLink()) {
82
+ await unlink(linkPath);
83
+ }
84
+ }
85
+ catch (err) {
86
+ if (err?.code !== "ENOENT") {
87
+ console.warn(`removeStigmerSymlink: failed to remove ${linkPath} (non-fatal): ` +
88
+ `${err instanceof Error ? err.message : err}`);
89
+ }
90
+ }
91
+ }
92
+ //# sourceMappingURL=stigmer-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stigmer-link.js","sourceRoot":"","sources":["../../../src/shared/workspace/stigmer-link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,4DAA4D;AAC5D,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAElD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,YAAoB,EACpB,WAAmB;IAEnB,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAC;IAE7D,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1C,IAAI,QAAQ,KAAK,WAAW;YAAE,OAAO;QACrC,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC1B,sBAAsB;QACxB,CAAC;aAAM,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACjC,qDAAqD;YACrD,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;IAED,MAAM,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,YAAoB;IAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAC;IAC7D,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;QACnC,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;YAC1B,MAAM,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"}
@@ -40,10 +40,12 @@ export declare class WorkspaceProvisionError extends Error {
40
40
  * commands route through the Daytona sandbox proxy.
41
41
  *
42
42
  * When `platformDir` is set, paths under `.stigmer/` are transparently
43
- * routed to the platform directory instead of the workspace root. This
44
- * keeps platform files (skills, inputs) physically separate from the
45
- * user's workspace while presenting a unified `.stigmer/` namespace to
46
- * the agent.
43
+ * routed to the platform directory instead of the workspace root, keeping
44
+ * platform files (skills, inputs) physically separate from the user's
45
+ * workspace. The routing covers the RUNNER's own reads/writes through
46
+ * this interface; the agent's file tools resolve against the workspace
47
+ * root and see the same files through the per-turn `.stigmer` symlink
48
+ * (see stigmer-link.ts).
47
49
  */
48
50
  export interface WorkspaceBackend {
49
51
  readonly rootDir: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigmer/runner",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
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",
@@ -85,7 +85,7 @@
85
85
  "@opentelemetry/sdk-metrics": "^2.0.0",
86
86
  "@opentelemetry/sdk-trace-base": "^2.0.0",
87
87
  "@opentelemetry/sdk-trace-node": "^2.0.0",
88
- "@stigmer/protos": "3.1.4",
88
+ "@stigmer/protos": "3.1.5",
89
89
  "@temporalio/activity": "^1.11.0",
90
90
  "@temporalio/client": "^1.11.0",
91
91
  "@temporalio/common": "^1.11.0",
@@ -34,7 +34,7 @@ import { join, basename } from "node:path";
34
34
  import type { Attachment } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/spec_pb";
35
35
  import type { ArtifactStorage } from "../../shared/artifact-storage.js";
36
36
  import { getPlatformDir } from "../../shared/workspace/platform-dir.js";
37
- import { ensureStigmerSymlink, STIGMER_LOCAL_STATE_DIR } from "./stigmer-link.js";
37
+ import { ensureStigmerSymlink, STIGMER_LOCAL_STATE_DIR } from "../../shared/workspace/stigmer-link.js";
38
38
 
39
39
  const INPUTS_SUBDIR = "inputs";
40
40
 
@@ -61,7 +61,7 @@ import { resolveExecutionEnv } from "./env-resolver.js";
61
61
  import { resolveBlueprint } from "./blueprint-resolver.js";
62
62
  import { buildCursorSubAgentDefinitions } from "./subagent-config.js";
63
63
  import { resolveSkills } from "./skill-resolver.js";
64
- import { removeStigmerSymlink } from "./stigmer-link.js";
64
+ import { removeStigmerSymlink } from "../../shared/workspace/stigmer-link.js";
65
65
  import { resolveAttachments } from "./attachment-resolver.js";
66
66
  import { buildEnhancedPrompt, buildReinvocationPrompt, formatInteractionModePrefix, formatImplementPlanSection } from "./prompt-builder.js";
67
67
  import { installHitlGate, removeHitlGate } from "./workspace-setup.js";
@@ -17,7 +17,7 @@ import type { ApiResourceReference } from "@stigmer/protos/ai/stigmer/commons/ap
17
17
  import type { SkillMetadata } from "./prompt-builder.js";
18
18
  import { getPlatformDir } from "../../shared/workspace/platform-dir.js";
19
19
  import { extractZipFileEntries } from "../../shared/zip-extract.js";
20
- import { ensureStigmerSymlink, STIGMER_LOCAL_STATE_DIR } from "./stigmer-link.js";
20
+ import { ensureStigmerSymlink, STIGMER_LOCAL_STATE_DIR } from "../../shared/workspace/stigmer-link.js";
21
21
 
22
22
  const SKILLS_SUBDIR = "skills";
23
23
 
@@ -11,6 +11,10 @@ import {
11
11
  } from "../writeback-coordinator.js";
12
12
  import type { WorkspaceBackend, ProvisionResult } from "../../../shared/workspace/types.js";
13
13
  import { SourceType } from "../../../shared/workspace/types.js";
14
+ import {
15
+ AGENT_GIT_AUTHOR_NAME,
16
+ AGENT_GIT_AUTHOR_EMAIL,
17
+ } from "../../../shared/workspace/git-identity.js";
14
18
 
15
19
  function makeStatusBuilder(): StatusBuilder {
16
20
  return new StatusBuilder("exec-wb-test", create(AgentExecutionStatusSchema, {}));
@@ -53,7 +57,7 @@ function mockWorkspaceBackend(responses: Record<string, string> = {}): Workspace
53
57
  "git ls-files --others --exclude-standard": "",
54
58
  "git checkout -b": "",
55
59
  "git add -A": "",
56
- "git commit -m": "",
60
+ "commit -m": "",
57
61
  "git rev-parse HEAD": "abc123def456",
58
62
  "git push -u origin": "",
59
63
  "git push": "",
@@ -163,10 +167,33 @@ describe("WriteBackCoordinator", () => {
163
167
  const commands = executeCalls.map((c: any) => c[0] as string);
164
168
  expect(commands.some((c: string) => c.includes("git checkout -b stigmer/exec-123"))).toBe(true);
165
169
  expect(commands.some((c: string) => c.includes("git add -A"))).toBe(true);
166
- expect(commands.some((c: string) => c.includes("git commit"))).toBe(true);
170
+ expect(commands.some((c: string) => c.includes("commit -m"))).toBe(true);
167
171
  expect(commands.some((c: string) => c.includes("git push -u origin"))).toBe(true);
168
172
  });
169
173
 
174
+ it("commits with the agent identity pinned via -c flags", async () => {
175
+ const backend = mockWorkspaceBackend();
176
+ const coord = new WriteBackCoordinator({
177
+ statusWriter: sb,
178
+ executionId: "exec-12345678rest",
179
+ provisionResults: [makeProvisionResult()],
180
+ workspaceEntries: [makeWorkspaceEntry("my-app")],
181
+ workspaceBackend: backend,
182
+ });
183
+
184
+ await coord.onFileModified("src/main.ts");
185
+
186
+ const executeCalls = (backend.execute as ReturnType<typeof vi.fn>).mock.calls;
187
+ const commands = executeCalls.map((c: any) => c[0] as string);
188
+ const commitCommand = commands.find((c: string) => c.includes("git") && c.includes("commit -m"));
189
+ expect(commitCommand,
190
+ "commit must not depend on ambient git identity — the cloud sandbox has none",
191
+ ).toBeDefined();
192
+ expect(commitCommand).toContain(`-c user.name='${AGENT_GIT_AUTHOR_NAME}'`);
193
+ expect(commitCommand).toContain(`-c user.email='${AGENT_GIT_AUTHOR_EMAIL}'`);
194
+ expect(commitCommand).toContain('commit -m "agent changes (1)"');
195
+ });
196
+
170
197
  it("skips when there are no changes", async () => {
171
198
  const backend = mockWorkspaceBackend({
172
199
  "git diff --stat": "",
@@ -218,7 +245,7 @@ describe("WriteBackCoordinator", () => {
218
245
  if (cmd.includes("git diff --cached")) return "";
219
246
  if (cmd.includes("git checkout -b")) return "";
220
247
  if (cmd.includes("git add")) return "";
221
- if (cmd.includes("git commit")) throw new Error("commit failed: lock");
248
+ if (cmd.includes("commit -m")) throw new Error("commit failed: lock");
222
249
  return "";
223
250
  });
224
251
 
@@ -26,6 +26,10 @@ import {
26
26
  WorkspaceLockTimeoutError,
27
27
  type ReleaseWorkspaceLock,
28
28
  } from "../../shared/workspace/workspace-lock.js";
29
+ import {
30
+ ensureStigmerSymlink,
31
+ removeStigmerSymlink,
32
+ } from "../../shared/workspace/stigmer-link.js";
29
33
  import type { ToolOutputOffloadContext } from "../../shared/status-offload.js";
30
34
  import { publishPlanArtifact } from "../../shared/plan-artifact.js";
31
35
  import { classifyTool } from "../../shared/tool-kind.js";
@@ -229,6 +233,22 @@ export function createDeepAgentActivities(config: Config) {
229
233
  throw lockErr;
230
234
  }
231
235
 
236
+ // Bridge the workspace to the session's platform dir so the agent's
237
+ // file tools can read platform-mounted content (`.stigmer/inputs/…`
238
+ // attachments incl. the approved plan, `.stigmer/skills/…`) — the
239
+ // deepagents FilesystemBackend resolves paths against the workspace
240
+ // root and knows nothing of the LocalWorkspaceBackend's `.stigmer`
241
+ // routing. Two ordering invariants (see shared/workspace/stigmer-link.ts):
242
+ // - AFTER the lock: the link is a tree mutation; sessions sharing one
243
+ // attached directory must not re-point it under a running turn.
244
+ // - BEFORE the baseline capture below: present in both the baseline
245
+ // and candidate trees, the link cancels out of the file-review diff
246
+ // even when the workspace's git excludes do not list `.stigmer`.
247
+ // Removed in cleanup() (the finally below), before the lock releases.
248
+ if (setup.workspaceBackend.platformDir) {
249
+ await ensureStigmerSymlink(gitRoot, setup.workspaceBackend.platformDir);
250
+ }
251
+
232
252
  // (1) Capture-mode resume — reconcile any DECIDED change set FIRST (this
233
253
  // drops the per-execution refs), before the next baseline re-pins them
234
254
  // (refs are executionId-keyed). Then (2) short-circuit a pure file-review
@@ -315,8 +335,10 @@ export function createDeepAgentActivities(config: Config) {
315
335
  }
316
336
 
317
337
  // Turn start (capture mode): pin the pre-turn tree + author BASELINE. Taken
318
- // AFTER any reconcile above and AFTER performSetup's workspace writes, so
319
- // the baseline absorbs the reconciled state and the runner-owned files.
338
+ // AFTER any reconcile above and AFTER performSetup's workspace writes and
339
+ // the `.stigmer` symlink above, so the baseline absorbs the reconciled
340
+ // state and the runner-owned files (the symlink then cancels out of the
341
+ // baseline→candidate diff).
320
342
  let captureBaselineTree = "";
321
343
  // Snapshot the sub-agent tool-call ids that exist BEFORE this turn's
322
344
  // stream, so the turn-boundary stamp scopes itself to sub-agent rows
@@ -398,9 +420,11 @@ export function createDeepAgentActivities(config: Config) {
398
420
  // Mid-run live capture (DD-32 / DD-33): attach file_change_progress
399
421
  // before each scheduled persist, throttled by the floor inside
400
422
  // captureFileChangeProgress. The substrate (git / non-git CAS / hybrid)
401
- // was chosen for this turn above; deep-agent writes no runner-owned gate
402
- // files into the tree, so the git slice needs no excludePaths — matching
403
- // its turn-boundary candidate capture.
423
+ // was chosen for this turn above; the deep-agent's only runner-owned
424
+ // tree entry is the `.stigmer` symlink, created before the baseline
425
+ // so it appears identically in every capture and cancels out of the
426
+ // diff — the git slice therefore needs no excludePaths, matching its
427
+ // turn-boundary candidate capture.
404
428
  beforePersist: async (status) => {
405
429
  if (!progressSubstrate) return;
406
430
  await captureFileChangeProgress({
@@ -928,5 +952,12 @@ async function cleanup(setup: SetupResult | null): Promise<void> {
928
952
  console.warn("[ExecuteDeepAgent] MCP connection cleanup failed:", err);
929
953
  }
930
954
  }
955
+
956
+ // Drop the workspace→platform `.stigmer` symlink so an attached repo is
957
+ // left untouched between turns (issue #173 semantics; a multi-turn session
958
+ // recreates it next turn). Runs in the activity finally, BEFORE the
959
+ // workspace lock releases, so the next queued turn baselines a clean tree.
960
+ // Best-effort and symlink-only: a real `.stigmer` directory is never removed.
961
+ await removeStigmerSymlink(setup.workspaceBackend.rootDir);
931
962
  }
932
963
 
@@ -27,6 +27,7 @@ import { GitWriteBackMode } from "@stigmer/protos/ai/stigmer/agentic/session/v1/
27
27
  import type { WorkspaceEntry } from "@stigmer/protos/ai/stigmer/agentic/session/v1/workspace_pb";
28
28
  import type { WorkspaceBackend, ProvisionResult } from "../../shared/workspace/types.js";
29
29
  import { SourceType } from "../../shared/workspace/types.js";
30
+ import { gitCommitAsAgent } from "../../shared/workspace/git-identity.js";
30
31
  import type { ExecutionStatusWriter } from "./execution-status-writer.js";
31
32
 
32
33
  const WRITE_BACK_ENABLED_MODES = new Set([
@@ -273,7 +274,10 @@ export class WriteBackCoordinator {
273
274
  commitMsg: string,
274
275
  ): Promise<void> {
275
276
  await exec("git add -A");
276
- await exec(`git commit -m "${commitMsg}"`);
277
+ // Committed as the agent identity: the cloud sandbox has no git identity
278
+ // configured (a bare commit fails with "Author identity unknown"), and in
279
+ // local mode the agent's work should not be attributed to the host user.
280
+ await exec(gitCommitAsAgent(commitMsg));
277
281
 
278
282
  entryState.commitCount++;
279
283
  const shaOutput = await exec("git rev-parse HEAD");
@@ -97,6 +97,10 @@ export function captureRef(executionId: string): string {
97
97
  * garbage collection — but `git commit-tree` still requires an author/committer,
98
98
  * and the repo may have no user.name/email configured. Supplied via env so we
99
99
  * never mutate the repo's config.
100
+ *
101
+ * Deliberately distinct from the public agent identity in
102
+ * `../workspace/git-identity.ts`, which authors the write-back commits that
103
+ * land on real branches and pull requests.
100
104
  */
101
105
  const SNAPSHOT_IDENTITY_ENV: Record<string, string> = {
102
106
  GIT_AUTHOR_NAME: "stigmer-runner",