@gajae-code/coding-agent 0.6.4 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/types/async/job-manager.d.ts +3 -1
  3. package/dist/types/cli/daemon-cli.d.ts +25 -0
  4. package/dist/types/cli/migrate-cli.d.ts +20 -0
  5. package/dist/types/cli/notify-cli.d.ts +23 -0
  6. package/dist/types/cli/setup-cli.d.ts +20 -1
  7. package/dist/types/commands/daemon.d.ts +41 -0
  8. package/dist/types/commands/migrate.d.ts +33 -0
  9. package/dist/types/commands/notify.d.ts +41 -0
  10. package/dist/types/config/keybindings.d.ts +4 -0
  11. package/dist/types/config/model-profile-activation.d.ts +12 -0
  12. package/dist/types/config/model-profiles.d.ts +2 -1
  13. package/dist/types/config/model-registry.d.ts +3 -3
  14. package/dist/types/config/models-config-schema.d.ts +5 -0
  15. package/dist/types/config/settings-schema.d.ts +38 -0
  16. package/dist/types/coordinator/contract.d.ts +1 -1
  17. package/dist/types/daemon/builtin.d.ts +20 -0
  18. package/dist/types/daemon/control-types.d.ts +57 -0
  19. package/dist/types/daemon/runtime.d.ts +25 -0
  20. package/dist/types/extensibility/extensions/types.d.ts +8 -0
  21. package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +2 -0
  22. package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +2 -2
  23. package/dist/types/gjc-runtime/goal-mode-request.d.ts +1 -1
  24. package/dist/types/gjc-runtime/session-layout.d.ts +59 -0
  25. package/dist/types/gjc-runtime/session-resolution.d.ts +47 -0
  26. package/dist/types/gjc-runtime/state-graph.d.ts +1 -1
  27. package/dist/types/gjc-runtime/state-runtime.d.ts +5 -4
  28. package/dist/types/gjc-runtime/state-schema.d.ts +2 -0
  29. package/dist/types/gjc-runtime/state-writer.d.ts +38 -7
  30. package/dist/types/gjc-runtime/ultragoal-guard.d.ts +15 -0
  31. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +21 -4
  32. package/dist/types/gjc-runtime/workflow-command-ref.d.ts +1 -1
  33. package/dist/types/gjc-runtime/workflow-manifest.d.ts +1 -1
  34. package/dist/types/harness-control-plane/storage.d.ts +2 -1
  35. package/dist/types/hooks/skill-state.d.ts +12 -4
  36. package/dist/types/migrate/action-planner.d.ts +11 -0
  37. package/dist/types/migrate/adapters/claude-code.d.ts +2 -0
  38. package/dist/types/migrate/adapters/codex.d.ts +5 -0
  39. package/dist/types/migrate/adapters/index.d.ts +45 -0
  40. package/dist/types/migrate/adapters/opencode.d.ts +2 -0
  41. package/dist/types/migrate/executor.d.ts +2 -0
  42. package/dist/types/migrate/mcp-mapper.d.ts +20 -0
  43. package/dist/types/migrate/report.d.ts +18 -0
  44. package/dist/types/migrate/skill-normalizer.d.ts +27 -0
  45. package/dist/types/migrate/types.d.ts +126 -0
  46. package/dist/types/modes/components/custom-editor.d.ts +1 -1
  47. package/dist/types/modes/components/oauth-selector.d.ts +2 -0
  48. package/dist/types/modes/controllers/selector-controller.d.ts +2 -2
  49. package/dist/types/modes/interactive-mode.d.ts +1 -1
  50. package/dist/types/modes/shared/agent-wire/unattended-audit.d.ts +1 -1
  51. package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +10 -0
  52. package/dist/types/modes/types.d.ts +7 -1
  53. package/dist/types/notifications/config-commands.d.ts +26 -0
  54. package/dist/types/notifications/config.d.ts +61 -0
  55. package/dist/types/notifications/helpers.d.ts +55 -0
  56. package/dist/types/notifications/html-format.d.ts +62 -0
  57. package/dist/types/notifications/index.d.ts +28 -0
  58. package/dist/types/notifications/rate-limit-pool.d.ts +93 -0
  59. package/dist/types/notifications/telegram-cli.d.ts +19 -0
  60. package/dist/types/notifications/telegram-daemon-cli.d.ts +11 -0
  61. package/dist/types/notifications/telegram-daemon-control.d.ts +56 -0
  62. package/dist/types/notifications/telegram-daemon.d.ts +276 -0
  63. package/dist/types/notifications/telegram-reference.d.ts +111 -0
  64. package/dist/types/notifications/threaded-inbound.d.ts +58 -0
  65. package/dist/types/notifications/threaded-render.d.ts +66 -0
  66. package/dist/types/notifications/topic-registry.d.ts +67 -0
  67. package/dist/types/research-plan/index.d.ts +1 -0
  68. package/dist/types/research-plan/ledger.d.ts +33 -0
  69. package/dist/types/rlm/artifacts.d.ts +1 -1
  70. package/dist/types/rlm/index.d.ts +12 -0
  71. package/dist/types/runtime-mcp/config-writer.d.ts +26 -0
  72. package/dist/types/session/agent-session.d.ts +39 -2
  73. package/dist/types/session/auth-storage.d.ts +1 -1
  74. package/dist/types/setup/credential-auto-import.d.ts +63 -0
  75. package/dist/types/setup/credential-import.d.ts +3 -0
  76. package/dist/types/setup/host-plugin-setup.d.ts +39 -0
  77. package/dist/types/skill-state/active-state.d.ts +6 -11
  78. package/dist/types/skill-state/canonical-skills.d.ts +3 -0
  79. package/dist/types/skill-state/workflow-hud.d.ts +2 -0
  80. package/dist/types/task/spawn-gate.d.ts +1 -10
  81. package/dist/types/tools/ask-answer-registry.d.ts +13 -0
  82. package/dist/types/tools/index.d.ts +18 -0
  83. package/dist/types/tools/subagent.d.ts +3 -0
  84. package/package.json +7 -7
  85. package/scripts/build-binary.ts +3 -0
  86. package/src/async/job-manager.ts +5 -1
  87. package/src/cli/daemon-cli.ts +122 -0
  88. package/src/cli/migrate-cli.ts +106 -0
  89. package/src/cli/notify-cli.ts +274 -0
  90. package/src/cli/setup-cli.ts +173 -84
  91. package/src/cli.ts +3 -0
  92. package/src/commands/daemon.ts +47 -0
  93. package/src/commands/deep-interview.ts +2 -2
  94. package/src/commands/migrate.ts +46 -0
  95. package/src/commands/notify.ts +61 -0
  96. package/src/commands/setup.ts +11 -1
  97. package/src/commands/state.ts +2 -1
  98. package/src/commands/team.ts +7 -3
  99. package/src/config/model-profile-activation.ts +74 -5
  100. package/src/config/model-profiles.ts +7 -4
  101. package/src/config/model-registry.ts +6 -3
  102. package/src/config/models-config-schema.ts +1 -1
  103. package/src/config/settings-schema.ts +29 -0
  104. package/src/coordinator/contract.ts +3 -0
  105. package/src/coordinator-mcp/policy.ts +10 -2
  106. package/src/coordinator-mcp/server.ts +270 -1
  107. package/src/daemon/builtin.ts +46 -0
  108. package/src/daemon/control-types.ts +65 -0
  109. package/src/daemon/runtime.ts +51 -0
  110. package/src/defaults/gjc/extensions/grok-cli-vendor/biome.json +0 -1
  111. package/src/defaults/gjc/skills/deep-interview/SKILL.md +28 -24
  112. package/src/defaults/gjc/skills/ralplan/SKILL.md +8 -4
  113. package/src/defaults/gjc/skills/team/SKILL.md +51 -47
  114. package/src/defaults/gjc/skills/ultragoal/SKILL.md +33 -13
  115. package/src/extensibility/custom-commands/loader.ts +0 -7
  116. package/src/extensibility/extensions/runner.ts +4 -0
  117. package/src/extensibility/extensions/types.ts +8 -0
  118. package/src/extensibility/gjc-plugins/injection.ts +23 -4
  119. package/src/extensibility/gjc-plugins/state.ts +16 -1
  120. package/src/gjc-runtime/deep-interview-recorder.ts +51 -18
  121. package/src/gjc-runtime/deep-interview-runtime.ts +49 -23
  122. package/src/gjc-runtime/goal-mode-request.ts +26 -11
  123. package/src/gjc-runtime/launch-tmux.ts +6 -1
  124. package/src/gjc-runtime/ralplan-runtime.ts +79 -50
  125. package/src/gjc-runtime/session-layout.ts +180 -0
  126. package/src/gjc-runtime/session-resolution.ts +217 -0
  127. package/src/gjc-runtime/state-graph.ts +1 -2
  128. package/src/gjc-runtime/state-migrations.ts +1 -0
  129. package/src/gjc-runtime/state-runtime.ts +247 -124
  130. package/src/gjc-runtime/state-schema.ts +2 -0
  131. package/src/gjc-runtime/state-writer.ts +289 -41
  132. package/src/gjc-runtime/team-runtime.ts +43 -19
  133. package/src/gjc-runtime/tmux-sessions.ts +7 -1
  134. package/src/gjc-runtime/ultragoal-guard.ts +102 -4
  135. package/src/gjc-runtime/ultragoal-runtime.ts +226 -60
  136. package/src/gjc-runtime/workflow-command-ref.ts +1 -2
  137. package/src/gjc-runtime/workflow-manifest.generated.json +27 -2
  138. package/src/gjc-runtime/workflow-manifest.ts +12 -3
  139. package/src/goals/tools/goal-tool.ts +11 -2
  140. package/src/harness-control-plane/storage.ts +14 -4
  141. package/src/hooks/native-skill-hook.ts +38 -12
  142. package/src/hooks/skill-state.ts +178 -83
  143. package/src/internal-urls/docs-index.generated.ts +9 -6
  144. package/src/main.ts +30 -0
  145. package/src/migrate/action-planner.ts +318 -0
  146. package/src/migrate/adapters/claude-code.ts +39 -0
  147. package/src/migrate/adapters/codex.ts +70 -0
  148. package/src/migrate/adapters/index.ts +277 -0
  149. package/src/migrate/adapters/opencode.ts +52 -0
  150. package/src/migrate/executor.ts +81 -0
  151. package/src/migrate/mcp-mapper.ts +152 -0
  152. package/src/migrate/report.ts +104 -0
  153. package/src/migrate/skill-normalizer.ts +80 -0
  154. package/src/migrate/types.ts +163 -0
  155. package/src/modes/acp/acp-event-mapper.ts +1 -0
  156. package/src/modes/bridge/bridge-mode.ts +2 -2
  157. package/src/modes/components/custom-editor.ts +30 -20
  158. package/src/modes/components/hook-editor.ts +7 -2
  159. package/src/modes/components/oauth-selector.ts +19 -0
  160. package/src/modes/controllers/event-controller.ts +20 -0
  161. package/src/modes/controllers/selector-controller.ts +80 -17
  162. package/src/modes/interactive-mode.ts +6 -2
  163. package/src/modes/rpc/rpc-mode.ts +2 -2
  164. package/src/modes/runtime-init.ts +1 -0
  165. package/src/modes/shared/agent-wire/event-contract.ts +1 -0
  166. package/src/modes/shared/agent-wire/event-envelope.ts +1 -0
  167. package/src/modes/shared/agent-wire/event-observation.ts +16 -0
  168. package/src/modes/shared/agent-wire/unattended-audit.ts +3 -2
  169. package/src/modes/shared/agent-wire/unattended-session.ts +22 -0
  170. package/src/modes/types.ts +7 -1
  171. package/src/modes/utils/ui-helpers.ts +23 -0
  172. package/src/notifications/config-commands.ts +50 -0
  173. package/src/notifications/config.ts +107 -0
  174. package/src/notifications/helpers.ts +135 -0
  175. package/src/notifications/html-format.ts +389 -0
  176. package/src/notifications/index.ts +663 -0
  177. package/src/notifications/rate-limit-pool.ts +179 -0
  178. package/src/notifications/telegram-cli.ts +194 -0
  179. package/src/notifications/telegram-daemon-cli.ts +74 -0
  180. package/src/notifications/telegram-daemon-control.ts +370 -0
  181. package/src/notifications/telegram-daemon.ts +1370 -0
  182. package/src/notifications/telegram-reference.ts +335 -0
  183. package/src/notifications/threaded-inbound.ts +80 -0
  184. package/src/notifications/threaded-render.ts +155 -0
  185. package/src/notifications/topic-registry.ts +133 -0
  186. package/src/prompts/agents/init.md +1 -1
  187. package/src/prompts/system/plan-mode-active.md +1 -1
  188. package/src/prompts/tools/ast-grep.md +1 -1
  189. package/src/prompts/tools/search.md +1 -1
  190. package/src/prompts/tools/task.md +1 -2
  191. package/src/research-plan/index.ts +1 -0
  192. package/src/research-plan/ledger.ts +177 -0
  193. package/src/rlm/artifacts.ts +12 -3
  194. package/src/rlm/index.ts +26 -0
  195. package/src/runtime-mcp/config-writer.ts +46 -0
  196. package/src/sdk.ts +16 -0
  197. package/src/session/agent-session.ts +128 -24
  198. package/src/session/auth-storage.ts +3 -0
  199. package/src/session/session-dump-format.ts +43 -2
  200. package/src/session/session-manager.ts +39 -5
  201. package/src/setup/credential-auto-import.ts +258 -0
  202. package/src/setup/credential-import.ts +17 -0
  203. package/src/setup/hermes/templates/operator-instructions.v1.md +10 -0
  204. package/src/setup/hermes-setup.ts +1 -1
  205. package/src/setup/host-plugin-setup.ts +142 -0
  206. package/src/skill-state/active-state.ts +72 -108
  207. package/src/skill-state/canonical-skills.ts +4 -0
  208. package/src/skill-state/deep-interview-mutation-guard.ts +28 -109
  209. package/src/skill-state/workflow-hud.ts +4 -2
  210. package/src/skill-state/workflow-state-contract.ts +3 -3
  211. package/src/slash-commands/builtin-registry.ts +4 -1
  212. package/src/task/agents.ts +1 -22
  213. package/src/task/executor.ts +5 -1
  214. package/src/task/index.ts +1 -41
  215. package/src/task/spawn-gate.ts +1 -38
  216. package/src/task/types.ts +1 -1
  217. package/src/tools/ask-answer-registry.ts +25 -0
  218. package/src/tools/ask.ts +108 -16
  219. package/src/tools/computer.ts +58 -4
  220. package/src/tools/image-gen.ts +5 -8
  221. package/src/tools/index.ts +19 -0
  222. package/src/tools/inspect-image.ts +16 -11
  223. package/src/tools/subagent-render.ts +7 -0
  224. package/src/tools/subagent.ts +38 -7
  225. package/dist/types/extensibility/custom-commands/bundled/review/index.d.ts +0 -10
  226. package/src/extensibility/custom-commands/bundled/review/index.ts +0 -456
  227. package/src/prompts/agents/explore.md +0 -58
  228. package/src/prompts/agents/plan.md +0 -49
  229. package/src/prompts/agents/reviewer.md +0 -141
  230. package/src/prompts/agents/task.md +0 -16
  231. package/src/prompts/review-request.md +0 -70
@@ -0,0 +1,217 @@
1
+ /**
2
+ * Boundary session resolution for GJC workflow state.
3
+ *
4
+ * This is the impure companion to the pure `session-layout.ts`. Only CLI /
5
+ * runtime entrypoints call these resolvers; low-level readers and writers
6
+ * receive an explicit `gjcSessionId` (or a path produced by the pure helper) so
7
+ * no module silently picks a session.
8
+ *
9
+ * Resolution order:
10
+ * 1. explicit `--session-id` flag (blank is invalid, never suppressed)
11
+ * 2. payload `session_id`
12
+ * 3. `GJC_SESSION_ID` env var
13
+ * 4. latest-activity-marker auto-detect (READ/STATUS/CLEAR only)
14
+ *
15
+ * Writes require one of (1)-(3). Auto-detect fails closed on zero candidates or
16
+ * ambiguous ties.
17
+ */
18
+ import * as fs from "node:fs/promises";
19
+ import * as path from "node:path";
20
+ import {
21
+ GJC_SESSION_ACTIVITY_FILE,
22
+ type GjcSessionContext,
23
+ type GjcSessionSource,
24
+ gjcRoot,
25
+ sessionIdFromDirName,
26
+ sessionRoot,
27
+ } from "./session-layout";
28
+
29
+ /** Window within which two activity timestamps are treated as an ambiguous tie. */
30
+ export const LATEST_SESSION_TIE_WINDOW_MS = 1000;
31
+
32
+ export interface SessionIdSources {
33
+ /** Raw `--session-id` value: `undefined` = flag absent; `""` = present-but-blank (invalid). */
34
+ flagValue?: string | undefined;
35
+ payloadSessionId?: unknown;
36
+ envSessionId?: string | undefined;
37
+ }
38
+
39
+ export class SessionResolutionError extends Error {
40
+ constructor(
41
+ message: string,
42
+ readonly code: "blank_flag" | "no_session" | "ambiguous" | "missing_for_write",
43
+ ) {
44
+ super(message);
45
+ this.name = "SessionResolutionError";
46
+ }
47
+ }
48
+
49
+ interface ResolvedFromSources {
50
+ gjcSessionId: string;
51
+ source: GjcSessionSource;
52
+ }
53
+
54
+ /**
55
+ * Resolve a session id from explicit sources only (flag -> payload -> env).
56
+ * Returns `undefined` when none is present. A blank explicit flag throws.
57
+ */
58
+ export function resolveSessionIdFromSources(sources: SessionIdSources): ResolvedFromSources | undefined {
59
+ const { flagValue, payloadSessionId, envSessionId } = sources;
60
+ if (flagValue !== undefined) {
61
+ const trimmed = flagValue.trim();
62
+ if (trimmed === "") {
63
+ throw new SessionResolutionError(
64
+ "--session-id was provided but blank; pass a non-empty session id or omit the flag",
65
+ "blank_flag",
66
+ );
67
+ }
68
+ return { gjcSessionId: trimmed, source: "flag" };
69
+ }
70
+ if (typeof payloadSessionId === "string" && payloadSessionId.trim() !== "") {
71
+ return { gjcSessionId: payloadSessionId.trim(), source: "payload" };
72
+ }
73
+ if (typeof envSessionId === "string" && envSessionId.trim() !== "") {
74
+ return { gjcSessionId: envSessionId.trim(), source: "env" };
75
+ }
76
+ return undefined;
77
+ }
78
+
79
+ /** Resolve session context for a WRITE command. Errors when no explicit id is present. */
80
+ export function resolveGjcSessionForWrite(cwd: string, sources: SessionIdSources): GjcSessionContext {
81
+ const resolved = resolveSessionIdFromSources(sources);
82
+ if (!resolved) {
83
+ throw new SessionResolutionError(
84
+ "a session id is required to write state: pass --session-id, payload session_id, or set GJC_SESSION_ID",
85
+ "missing_for_write",
86
+ );
87
+ }
88
+ return {
89
+ gjcSessionId: resolved.gjcSessionId,
90
+ sessionRoot: sessionRoot(cwd, resolved.gjcSessionId),
91
+ source: resolved.source,
92
+ };
93
+ }
94
+
95
+ /**
96
+ * Resolve session context for a READ/STATUS/CLEAR command. Falls back to the
97
+ * latest active session by activity marker when no explicit id is present.
98
+ */
99
+ export async function resolveGjcSessionForRead(cwd: string, sources: SessionIdSources): Promise<GjcSessionContext> {
100
+ const resolved = resolveSessionIdFromSources(sources);
101
+ if (resolved) {
102
+ return {
103
+ gjcSessionId: resolved.gjcSessionId,
104
+ sessionRoot: sessionRoot(cwd, resolved.gjcSessionId),
105
+ source: resolved.source,
106
+ };
107
+ }
108
+ const latest = await detectLatestSession(cwd);
109
+ return { gjcSessionId: latest.gjcSessionId, sessionRoot: latest.sessionRoot, source: "latest" };
110
+ }
111
+
112
+ interface SessionCandidate {
113
+ gjcSessionId: string;
114
+ sessionRoot: string;
115
+ activityMs: number;
116
+ }
117
+
118
+ /**
119
+ * Scan `.gjc/_session-*` directories and select the most-recently-active one by
120
+ * its activity marker. Never uses raw directory mtime. Throws on zero candidates
121
+ * or an ambiguous tie.
122
+ */
123
+ export async function detectLatestSession(cwd: string): Promise<GjcSessionContext> {
124
+ const candidates = await collectActiveSessionCandidates(cwd);
125
+ if (candidates.length === 0) {
126
+ throw new SessionResolutionError(
127
+ "no active GJC session found: pass --session-id or set GJC_SESSION_ID",
128
+ "no_session",
129
+ );
130
+ }
131
+ candidates.sort((a, b) => b.activityMs - a.activityMs);
132
+ const [first, second] = candidates;
133
+ if (second && first.activityMs - second.activityMs <= LATEST_SESSION_TIE_WINDOW_MS) {
134
+ const tied = candidates
135
+ .filter(c => first.activityMs - c.activityMs <= LATEST_SESSION_TIE_WINDOW_MS)
136
+ .map(c => c.gjcSessionId);
137
+ throw new SessionResolutionError(
138
+ `ambiguous latest session among [${tied.join(", ")}]: pass --session-id or set GJC_SESSION_ID`,
139
+ "ambiguous",
140
+ );
141
+ }
142
+ return { gjcSessionId: first.gjcSessionId, sessionRoot: first.sessionRoot, source: "latest" };
143
+ }
144
+
145
+ async function collectActiveSessionCandidates(cwd: string): Promise<SessionCandidate[]> {
146
+ const root = gjcRoot(cwd);
147
+ let entries: import("node:fs").Dirent[];
148
+ try {
149
+ entries = await fs.readdir(root, { withFileTypes: true });
150
+ } catch {
151
+ return [];
152
+ }
153
+ const candidates: SessionCandidate[] = [];
154
+ for (const entry of entries) {
155
+ if (!entry.isDirectory()) continue;
156
+ const gjcSessionId = sessionIdFromDirName(entry.name);
157
+ if (!gjcSessionId) continue;
158
+ const dir = path.join(root, entry.name);
159
+ const activityMs = await readActivityMs(path.join(dir, GJC_SESSION_ACTIVITY_FILE));
160
+ // Sessions with no readable activity marker are considered inactive and
161
+ // are not selected for auto-detect.
162
+ if (activityMs === undefined) continue;
163
+ candidates.push({ gjcSessionId, sessionRoot: dir, activityMs });
164
+ }
165
+ return candidates;
166
+ }
167
+
168
+ async function readActivityMs(markerPath: string): Promise<number | undefined> {
169
+ let raw: string;
170
+ try {
171
+ raw = await fs.readFile(markerPath, "utf-8");
172
+ } catch {
173
+ return undefined;
174
+ }
175
+ try {
176
+ const parsed = JSON.parse(raw) as { updated_at?: unknown };
177
+ if (typeof parsed.updated_at === "string") {
178
+ const ms = Date.parse(parsed.updated_at);
179
+ if (!Number.isNaN(ms)) return ms;
180
+ }
181
+ } catch {
182
+ // fall through to mtime
183
+ }
184
+ try {
185
+ const stat = await fs.stat(markerPath);
186
+ return stat.mtimeMs;
187
+ } catch {
188
+ return undefined;
189
+ }
190
+ }
191
+
192
+ export interface ActivityMarkerInfo {
193
+ writer: string;
194
+ /** Relative generated path that was just written, for diagnostics. */
195
+ path?: string;
196
+ }
197
+
198
+ /**
199
+ * Best-effort write of the per-session activity marker. State-command callers
200
+ * MUST treat a thrown error as a command failure (auto-detect depends on it);
201
+ * non-critical writers may swallow it.
202
+ */
203
+ export async function writeSessionActivityMarker(
204
+ cwd: string,
205
+ gjcSessionId: string,
206
+ info: ActivityMarkerInfo,
207
+ ): Promise<void> {
208
+ const markerPath = path.join(sessionRoot(cwd, gjcSessionId), GJC_SESSION_ACTIVITY_FILE);
209
+ await fs.mkdir(path.dirname(markerPath), { recursive: true });
210
+ const payload = {
211
+ session_id: gjcSessionId,
212
+ updated_at: new Date().toISOString(),
213
+ writer: info.writer,
214
+ ...(info.path ? { path: info.path } : {}),
215
+ };
216
+ await fs.writeFile(markerPath, `${JSON.stringify(payload, null, 2)}\n`, "utf-8");
217
+ }
@@ -1,5 +1,4 @@
1
- import type { CanonicalGjcWorkflowSkill } from "../skill-state/active-state";
2
- import { CANONICAL_GJC_WORKFLOW_SKILLS } from "../skill-state/active-state";
1
+ import { CANONICAL_GJC_WORKFLOW_SKILLS, type CanonicalGjcWorkflowSkill } from "../skill-state/canonical-skills";
3
2
  import { getSkillManifest } from "./workflow-manifest";
4
3
 
5
4
  export type StateGraphSkill = CanonicalGjcWorkflowSkill | "all";
@@ -173,6 +173,7 @@ export async function migrateAndPersistLegacyState(
173
173
  verb: "migrate",
174
174
  owner: "gjc-state-cli",
175
175
  category: "state",
176
+ sessionId: args.sessionId,
176
177
  },
177
178
  });
178
179
  return { migrated: true, path: persistedPath };