@gajae-code/coding-agent 0.14.2 → 0.15.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 (345) hide show
  1. package/CHANGELOG.md +120 -1
  2. package/dist/types/async/job-manager.d.ts +4 -1
  3. package/dist/types/autoresearch/dashboard.d.ts +29 -4
  4. package/dist/types/autoresearch/data-context.d.ts +25 -0
  5. package/dist/types/autoresearch/git.d.ts +65 -7
  6. package/dist/types/autoresearch/harness.d.ts +58 -0
  7. package/dist/types/autoresearch/prompts.d.ts +51 -0
  8. package/dist/types/autoresearch/runs.d.ts +173 -0
  9. package/dist/types/autoresearch/types.d.ts +9 -139
  10. package/dist/types/capability/types.d.ts +20 -0
  11. package/dist/types/cli/accounts-cli.d.ts +1 -0
  12. package/dist/types/commands/{rlm.d.ts → autoresearch.d.ts} +2 -4
  13. package/dist/types/config/autorouting-contract.d.ts +146 -0
  14. package/dist/types/config/autorouting-generator.d.ts +40 -0
  15. package/dist/types/config/autorouting-tier-map.d.ts +16844 -0
  16. package/dist/types/config/autorouting.d.ts +35 -0
  17. package/dist/types/config/model-discovery-manager.d.ts +8 -1
  18. package/dist/types/config/model-registry.d.ts +30 -1
  19. package/dist/types/config/provider-selection-policy.d.ts +23 -0
  20. package/dist/types/config/settings-schema.d.ts +61 -3
  21. package/dist/types/config/settings.d.ts +3 -0
  22. package/dist/types/coordinator/contract.d.ts +1 -1
  23. package/dist/types/coordinator-mcp/durability.d.ts +29 -0
  24. package/dist/types/coordinator-mcp/event-webhook.d.ts +50 -0
  25. package/dist/types/coordinator-mcp/question-state.d.ts +1 -1
  26. package/dist/types/coordinator-mcp/server.d.ts +14 -0
  27. package/dist/types/crash/index-store.d.ts +3 -0
  28. package/dist/types/crash/record-loader.d.ts +2 -0
  29. package/dist/types/crash/upstream/relay.d.ts +5 -3
  30. package/dist/types/cursor.d.ts +12 -0
  31. package/dist/types/defaults/gjc-defaults.d.ts +35 -1
  32. package/dist/types/defaults/gjc-skills.generated.d.ts +1 -1
  33. package/dist/types/discovery/helpers.d.ts +1 -1
  34. package/dist/types/edit/index.d.ts +2 -1
  35. package/dist/types/eval/py/executor.d.ts +2 -0
  36. package/dist/types/extensibility/extensions/loader.d.ts +32 -0
  37. package/dist/types/extensibility/gjc-plugins/types.d.ts +1 -1
  38. package/dist/types/extensibility/skills.d.ts +2 -0
  39. package/dist/types/gjc-runtime/autoresearch-runtime.d.ts +194 -0
  40. package/dist/types/gjc-runtime/gc-runtime.d.ts +1 -1
  41. package/dist/types/gjc-runtime/psmux-detect.d.ts +1 -1
  42. package/dist/types/gjc-runtime/python-transcript.d.ts +19 -0
  43. package/dist/types/gjc-runtime/ralplan-runtime.d.ts +2 -8
  44. package/dist/types/gjc-runtime/session-layout.d.ts +6 -3
  45. package/dist/types/gjc-runtime/state-renderer.d.ts +0 -22
  46. package/dist/types/gjc-runtime/state-schema.d.ts +7 -7
  47. package/dist/types/gjc-runtime/tmux-common.d.ts +2 -2
  48. package/dist/types/gjc-runtime/ultragoal-change-set.d.ts +38 -1
  49. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +2 -24
  50. package/dist/types/gjc-runtime/ultragoal-validation-policy.d.ts +73 -0
  51. package/dist/types/gjc-runtime/workflow-recovery-projection.d.ts +100 -0
  52. package/dist/types/hooks/skill-keywords.d.ts +1 -1
  53. package/dist/types/main.d.ts +0 -10
  54. package/dist/types/modes/acp/acp-agent.d.ts +13 -6
  55. package/dist/types/modes/components/model-selector.d.ts +14 -0
  56. package/dist/types/modes/components/skill-hud/render.d.ts +6 -1
  57. package/dist/types/modes/components/smart-routing-panel.d.ts +82 -0
  58. package/dist/types/modes/controllers/selector-controller.d.ts +14 -0
  59. package/dist/types/modes/interactive-mode.d.ts +3 -0
  60. package/dist/types/modes/types.d.ts +9 -0
  61. package/dist/types/rlm/artifacts.d.ts +4 -4
  62. package/dist/types/runtime/optional-runtime-services.d.ts +2 -1
  63. package/dist/types/runtime/workspace-tree-service.d.ts +5 -1
  64. package/dist/types/runtime-mcp/config.d.ts +6 -0
  65. package/dist/types/runtime-mcp/manager.d.ts +10 -0
  66. package/dist/types/sdk/acp/adapter.d.ts +0 -4
  67. package/dist/types/sdk/broker/broker.d.ts +1 -1
  68. package/dist/types/sdk/broker/lifecycle.d.ts +57 -2
  69. package/dist/types/sdk/broker/session-index.d.ts +15 -0
  70. package/dist/types/sdk/bus/chat-daemon-control.d.ts +6 -0
  71. package/dist/types/sdk/bus/chat-daemon-runtime.d.ts +4 -0
  72. package/dist/types/sdk/bus/index.d.ts +8 -0
  73. package/dist/types/sdk/bus/kind-aware-reconciliation.d.ts +2 -0
  74. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +12 -2
  75. package/dist/types/sdk/client/client.d.ts +39 -4
  76. package/dist/types/sdk/host/host.d.ts +1 -0
  77. package/dist/types/sdk/host/internal-autorouting-state.d.ts +3 -0
  78. package/dist/types/sdk/host/model-pin.d.ts +29 -0
  79. package/dist/types/sdk/host/session-runtime.d.ts +2 -1
  80. package/dist/types/sdk/lifecycle-session.d.ts +13 -0
  81. package/dist/types/sdk/router/session-router.d.ts +27 -1
  82. package/dist/types/sdk/session.d.ts +11 -1
  83. package/dist/types/session/agent-session.d.ts +36 -6
  84. package/dist/types/session/artifacts.d.ts +16 -1
  85. package/dist/types/session/internal/managed-session-storage.d.ts +7 -0
  86. package/dist/types/session/session-manager.d.ts +84 -2
  87. package/dist/types/session/session-staging-paths.d.ts +3 -0
  88. package/dist/types/skill-state/canonical-skills.d.ts +1 -1
  89. package/dist/types/skill-state/workflow-hud.d.ts +12 -21
  90. package/dist/types/skill-state/workflow-mutation-guard.d.ts +1 -0
  91. package/dist/types/slash-commands/helpers/autorouting-status.d.ts +8 -0
  92. package/dist/types/system-prompt.d.ts +23 -0
  93. package/dist/types/task/executor.d.ts +35 -4
  94. package/dist/types/task/index.d.ts +17 -3
  95. package/dist/types/task/receipt.d.ts +3 -1
  96. package/dist/types/task/types.d.ts +144 -0
  97. package/dist/types/tools/atomic-file-write.d.ts +72 -0
  98. package/dist/types/tools/descriptors.d.ts +1 -0
  99. package/dist/types/tools/index.d.ts +36 -1
  100. package/dist/types/tools/move-session.d.ts +40 -0
  101. package/dist/types/tools/python.d.ts +12 -0
  102. package/dist/types/tools/resource-gc.d.ts +0 -3
  103. package/dist/types/tools/search.d.ts +8 -1
  104. package/dist/types/tools/skill.d.ts +9 -4
  105. package/dist/types/tools/subagent.d.ts +33 -3
  106. package/dist/types/utils/xml-escape.d.ts +2 -0
  107. package/dist/types/workflow/workflow-intent-diff.d.ts +2 -2
  108. package/dist/types/workflow/workflow-intent-report-consumer.d.ts +1 -1
  109. package/package.json +11 -12
  110. package/scripts/build-sdk-package-smoke.ts +7 -5
  111. package/scripts/check-autorouting-tier-map.ts +183 -0
  112. package/scripts/generate-sdk-operation-inventory.ts +12 -0
  113. package/scripts/generate-tool-catalog.ts +40 -5
  114. package/src/async/job-manager.ts +5 -2
  115. package/src/autoresearch/dashboard.ts +134 -314
  116. package/src/autoresearch/data-context.ts +35 -0
  117. package/src/autoresearch/git.ts +186 -26
  118. package/src/autoresearch/{helpers.ts → harness.ts} +65 -40
  119. package/src/autoresearch/{prompt-setup.md → prompts/prompt-setup.md} +7 -7
  120. package/src/autoresearch/prompts/prompt.md +103 -0
  121. package/src/autoresearch/prompts.ts +126 -0
  122. package/src/autoresearch/runs.ts +708 -0
  123. package/src/autoresearch/types.ts +9 -150
  124. package/src/capability/index.ts +4 -4
  125. package/src/capability/types.ts +20 -0
  126. package/src/cli/accounts-cli.ts +21 -5
  127. package/src/cli/config-cli.ts +25 -1
  128. package/src/cli/fast-help.ts +1 -2
  129. package/src/cli/list-models.ts +5 -8
  130. package/src/cli/setup-cli.ts +8 -0
  131. package/src/cli.ts +2 -21
  132. package/src/commands/autoresearch.ts +33 -0
  133. package/src/commands/coordinator.ts +15 -0
  134. package/src/commands/launch.ts +2 -4
  135. package/src/commands/quick-lane.ts +1 -1
  136. package/src/commands/sdk.ts +24 -0
  137. package/src/commands/state.ts +1 -1
  138. package/src/config/autorouting-contract.ts +474 -0
  139. package/src/config/autorouting-generator.ts +238 -0
  140. package/src/config/autorouting-tier-map.ts +6108 -0
  141. package/src/config/autorouting.ts +120 -0
  142. package/src/config/model-discovery-manager.ts +42 -11
  143. package/src/config/model-registry.ts +348 -68
  144. package/src/config/provider-selection-policy.ts +60 -9
  145. package/src/config/settings-schema.ts +195 -6
  146. package/src/config/settings.ts +62 -1
  147. package/src/config.ts +2 -3
  148. package/src/coordinator/contract.ts +0 -1
  149. package/src/coordinator-mcp/codex-handoff.ts +68 -42
  150. package/src/coordinator-mcp/durability.ts +200 -0
  151. package/src/coordinator-mcp/event-webhook.ts +278 -0
  152. package/src/coordinator-mcp/question-state.ts +109 -46
  153. package/src/coordinator-mcp/server.ts +932 -504
  154. package/src/crash/index-store.ts +126 -22
  155. package/src/crash/record-loader.ts +7 -0
  156. package/src/crash/upstream/relay.ts +82 -34
  157. package/src/cursor.ts +84 -1
  158. package/src/debug/index.ts +26 -0
  159. package/src/defaults/gjc/skills/autoresearch/SKILL.md +116 -0
  160. package/src/defaults/gjc/skills/autoresearch/auto-critic.md +46 -0
  161. package/src/defaults/gjc/skills/autoresearch/auto-iterate.md +42 -0
  162. package/src/defaults/gjc/skills/deep-interview/SKILL.md +17 -37
  163. package/src/defaults/gjc/skills/ralplan/SKILL.md +21 -18
  164. package/src/defaults/gjc/skills/ultragoal/SKILL.md +6 -17
  165. package/src/defaults/gjc/skills/ultragoal/ai-slop-cleaner.md +2 -2
  166. package/src/defaults/gjc-defaults.ts +89 -2
  167. package/src/defaults/gjc-skills.generated.ts +24 -17
  168. package/src/discovery/builtin.ts +18 -5
  169. package/src/discovery/helpers.ts +6 -6
  170. package/src/edit/index.ts +5 -2
  171. package/src/eval/py/executor.ts +8 -0
  172. package/src/extensibility/extensions/loader.ts +135 -13
  173. package/src/extensibility/extensions/wrapper.ts +1 -2
  174. package/src/extensibility/gjc-plugins/schema.ts +1 -1
  175. package/src/extensibility/runtime-skill-discovery.ts +2 -2
  176. package/src/extensibility/skill-management.ts +2 -3
  177. package/src/extensibility/skills.ts +16 -8
  178. package/src/gjc-runtime/autoresearch-runtime.ts +1509 -0
  179. package/src/gjc-runtime/gc-render.ts +0 -1
  180. package/src/gjc-runtime/gc-runtime.ts +1 -11
  181. package/src/gjc-runtime/launch-tmux.ts +3 -3
  182. package/src/gjc-runtime/psmux-detect.ts +2 -2
  183. package/src/gjc-runtime/python-transcript.ts +58 -0
  184. package/src/gjc-runtime/ralplan-runtime.ts +6 -18
  185. package/src/gjc-runtime/session-layout.ts +18 -7
  186. package/src/gjc-runtime/session-state-sidecar.ts +58 -9
  187. package/src/gjc-runtime/state-renderer.ts +0 -38
  188. package/src/gjc-runtime/state-runtime.ts +43 -22
  189. package/src/gjc-runtime/state-schema.ts +1 -1
  190. package/src/gjc-runtime/tmux-common.ts +7 -7
  191. package/src/gjc-runtime/ultragoal-change-set.ts +232 -11
  192. package/src/gjc-runtime/ultragoal-runtime.ts +309 -114
  193. package/src/gjc-runtime/ultragoal-validation-policy.ts +247 -0
  194. package/src/gjc-runtime/workflow-command-ref.ts +15 -11
  195. package/src/gjc-runtime/workflow-manifest.generated.json +413 -532
  196. package/src/gjc-runtime/workflow-manifest.ts +43 -83
  197. package/src/gjc-runtime/workflow-recovery-projection.ts +616 -0
  198. package/src/hooks/skill-keywords.ts +3 -3
  199. package/src/hooks/skill-state.ts +2 -2
  200. package/src/internal-urls/docs-index.generated.ts +26 -24
  201. package/src/lsp/index.ts +25 -5
  202. package/src/main.ts +2 -27
  203. package/src/modes/acp/acp-agent.ts +200 -75
  204. package/src/modes/components/model-selector.ts +216 -13
  205. package/src/modes/components/oauth-selector.ts +5 -5
  206. package/src/modes/components/skill-hud/render.ts +173 -35
  207. package/src/modes/components/smart-routing-panel.ts +531 -0
  208. package/src/modes/components/tool-status-header.ts +6 -3
  209. package/src/modes/controllers/command-controller.ts +17 -7
  210. package/src/modes/controllers/input-controller.ts +44 -9
  211. package/src/modes/controllers/runtime-mcp-command-controller.ts +4 -0
  212. package/src/modes/controllers/selector-controller.ts +298 -65
  213. package/src/modes/interactive-mode.ts +8 -1
  214. package/src/modes/shared/agent-wire/workflow-gate-types.ts +1 -1
  215. package/src/modes/types.ts +9 -1
  216. package/src/prompts/agents/planner.md +1 -1
  217. package/src/prompts/system/system-prompt.md +1 -1
  218. package/src/prompts/system/volatile-project-context.md +2 -1
  219. package/src/prompts/tools/move-session.md +15 -0
  220. package/src/prompts/tools/python.md +12 -0
  221. package/src/prompts/tools/skill-discovery.md +1 -1
  222. package/src/prompts/tools/skill.md +2 -2
  223. package/src/prompts/tools/task-summary.md +1 -0
  224. package/src/prompts/tools/task.md +6 -0
  225. package/src/rlm/artifacts.ts +12 -10
  226. package/src/runtime/optional-runtime-services.ts +3 -2
  227. package/src/runtime/workspace-tree-service.ts +11 -3
  228. package/src/runtime-mcp/config.ts +8 -1
  229. package/src/runtime-mcp/manager.ts +33 -0
  230. package/src/sdk/acp/adapter.ts +48 -1
  231. package/src/sdk/broker/broker.ts +30 -2
  232. package/src/sdk/broker/discovery.ts +217 -2
  233. package/src/sdk/broker/lifecycle.ts +385 -59
  234. package/src/sdk/broker/session-index.ts +243 -48
  235. package/src/sdk/broker/transport.ts +1 -0
  236. package/src/sdk/bus/chat-daemon-control.ts +8 -2
  237. package/src/sdk/bus/chat-daemon-runtime.ts +5 -0
  238. package/src/sdk/bus/index.ts +208 -11
  239. package/src/sdk/bus/kind-aware-reconciliation.ts +16 -0
  240. package/src/sdk/bus/reconciliation-store.ts +27 -5
  241. package/src/sdk/bus/telegram-daemon-contract.ts +12 -2
  242. package/src/sdk/client/client.ts +204 -22
  243. package/src/sdk/host/host.ts +16 -0
  244. package/src/sdk/host/internal-autorouting-state.ts +13 -0
  245. package/src/sdk/host/model-pin.ts +101 -0
  246. package/src/sdk/host/reverse-leases.ts +2 -1
  247. package/src/sdk/host/session-runtime.test.ts +224 -1
  248. package/src/sdk/host/session-runtime.ts +125 -37
  249. package/src/sdk/lifecycle/service.ts +3 -1
  250. package/src/sdk/lifecycle-session.ts +42 -1
  251. package/src/sdk/protocol/operation-inventory.generated.json +66 -0
  252. package/src/sdk/router/session-router.ts +375 -36
  253. package/src/sdk/session.ts +547 -47
  254. package/src/session/account-inventory.ts +1 -1
  255. package/src/session/agent-session.ts +765 -189
  256. package/src/session/artifacts.ts +234 -4
  257. package/src/session/internal/managed-session-storage.ts +91 -4
  258. package/src/session/provider-safety-stop-hint.ts +3 -2
  259. package/src/session/session-manager.ts +775 -16
  260. package/src/session/session-staging-paths.ts +8 -0
  261. package/src/setup/hermes/templates/operator-instructions.v1.md +0 -1
  262. package/src/setup/host-plugin-setup.ts +2 -2
  263. package/src/skill-state/active-state.ts +2 -2
  264. package/src/skill-state/canonical-skills.ts +1 -1
  265. package/src/skill-state/initial-phase.ts +1 -1
  266. package/src/skill-state/workflow-hud.ts +41 -41
  267. package/src/skill-state/workflow-mutation-guard.ts +26 -7
  268. package/src/slash-commands/builtin-registry.ts +77 -0
  269. package/src/slash-commands/helpers/autorouting-status.ts +55 -0
  270. package/src/system-prompt.ts +102 -5
  271. package/src/task/discovery.ts +2 -3
  272. package/src/task/executor.ts +617 -43
  273. package/src/task/index.ts +262 -15
  274. package/src/task/receipt.ts +30 -0
  275. package/src/task/render.ts +11 -1
  276. package/src/task/types.ts +316 -0
  277. package/src/tools/atomic-file-write.ts +594 -0
  278. package/src/tools/bisect.ts +3 -2
  279. package/src/tools/descriptors.test.ts +3 -0
  280. package/src/tools/descriptors.ts +24 -0
  281. package/src/tools/image-gen.ts +5 -1
  282. package/src/tools/index.ts +62 -5
  283. package/src/tools/move-session.ts +107 -0
  284. package/src/tools/python.ts +205 -0
  285. package/src/tools/read.ts +88 -15
  286. package/src/tools/renderers.ts +2 -0
  287. package/src/tools/resource-gc.ts +8 -177
  288. package/src/tools/search.ts +30 -6
  289. package/src/tools/skill-discovery.ts +1 -0
  290. package/src/tools/skill.ts +37 -7
  291. package/src/tools/subagent-render.ts +119 -13
  292. package/src/tools/subagent.ts +91 -74
  293. package/src/tools/tool-catalog.generated.ts +64 -2
  294. package/src/tools/write.ts +16 -12
  295. package/src/utils/xml-escape.ts +14 -0
  296. package/src/web/search/providers/codex.ts +2 -2
  297. package/src/workflow/workflow-intent-diff.ts +13 -12
  298. package/src/workflow/workflow-intent-report-consumer.ts +6 -6
  299. package/dist/types/autoresearch/helpers.d.ts +0 -24
  300. package/dist/types/autoresearch/index.d.ts +0 -2
  301. package/dist/types/autoresearch/state.d.ts +0 -17
  302. package/dist/types/autoresearch/storage.d.ts +0 -142
  303. package/dist/types/autoresearch/tools/init-experiment.d.ts +0 -31
  304. package/dist/types/autoresearch/tools/log-experiment.d.ts +0 -23
  305. package/dist/types/autoresearch/tools/run-experiment.d.ts +0 -8
  306. package/dist/types/autoresearch/tools/update-notes.d.ts +0 -12
  307. package/dist/types/commands/team.d.ts +0 -24
  308. package/dist/types/gjc-runtime/team-gc.d.ts +0 -7
  309. package/dist/types/gjc-runtime/team-launch.d.ts +0 -61
  310. package/dist/types/gjc-runtime/team-notify.d.ts +0 -45
  311. package/dist/types/gjc-runtime/team-runtime.d.ts +0 -336
  312. package/dist/types/gjc-runtime/team-store.d.ts +0 -168
  313. package/dist/types/gjc-runtime/team-worker-heartbeat.d.ts +0 -43
  314. package/dist/types/gjc-runtime/team-worker-memory-guard.d.ts +0 -92
  315. package/dist/types/gjc-runtime/team-workers.d.ts +0 -83
  316. package/dist/types/rlm/index.d.ts +0 -47
  317. package/dist/types/rlm/preset.d.ts +0 -23
  318. package/dist/types/rlm/python-tool.d.ts +0 -16
  319. package/src/autoresearch/command-resume.md +0 -14
  320. package/src/autoresearch/index.ts +0 -536
  321. package/src/autoresearch/prompt.md +0 -103
  322. package/src/autoresearch/resume-message.md +0 -10
  323. package/src/autoresearch/state.ts +0 -273
  324. package/src/autoresearch/storage.ts +0 -699
  325. package/src/autoresearch/tools/init-experiment.ts +0 -272
  326. package/src/autoresearch/tools/log-experiment.ts +0 -524
  327. package/src/autoresearch/tools/run-experiment.ts +0 -475
  328. package/src/autoresearch/tools/update-notes.ts +0 -109
  329. package/src/commands/rlm.ts +0 -19
  330. package/src/commands/team.ts +0 -238
  331. package/src/defaults/gjc/skills/deep-interview/auto-research-greenfield.md +0 -42
  332. package/src/defaults/gjc/skills/team/SKILL.md +0 -467
  333. package/src/gjc-runtime/team-gc.ts +0 -49
  334. package/src/gjc-runtime/team-launch.ts +0 -404
  335. package/src/gjc-runtime/team-notify.ts +0 -326
  336. package/src/gjc-runtime/team-runtime.ts +0 -5923
  337. package/src/gjc-runtime/team-store.ts +0 -878
  338. package/src/gjc-runtime/team-worker-heartbeat.ts +0 -149
  339. package/src/gjc-runtime/team-worker-memory-guard.ts +0 -363
  340. package/src/gjc-runtime/team-workers.ts +0 -1123
  341. package/src/prompts/system/rlm-report-command.md +0 -1
  342. package/src/prompts/system/rlm-research.md +0 -23
  343. package/src/rlm/index.ts +0 -365
  344. package/src/rlm/preset.ts +0 -76
  345. package/src/rlm/python-tool.ts +0 -68
@@ -8,7 +8,6 @@ import { GC_STORES } from "./gc-runtime";
8
8
 
9
9
  const STORE_HEADINGS: Record<GcStore, string> = {
10
10
  harness_leases: "Harness owner leases",
11
- team_workers: "Team workers",
12
11
  file_locks: "Config file-locks",
13
12
  tmux_sessions: "Tmux sessions",
14
13
  registry_entries: "Harness-root registry entries",
@@ -35,17 +35,10 @@ import { FileSessionStorage, probeSessionRetirement, retireSessionTranscript } f
35
35
  import { buildGcReportText } from "./gc-render";
36
36
  import { collectSessionScopeUsage, type GcSessionScopeUsage, shouldReportSessionScope } from "./gc-session-scope";
37
37
 
38
- export type GcStore =
39
- | "harness_leases"
40
- | "team_workers"
41
- | "file_locks"
42
- | "tmux_sessions"
43
- | "registry_entries"
44
- | "local_roots";
38
+ export type GcStore = "harness_leases" | "file_locks" | "tmux_sessions" | "registry_entries" | "local_roots";
45
39
 
46
40
  export const GC_STORES: readonly GcStore[] = [
47
41
  "harness_leases",
48
- "team_workers",
49
42
  "file_locks",
50
43
  "tmux_sessions",
51
44
  "registry_entries",
@@ -547,19 +540,16 @@ export async function defaultGcAdapters(): Promise<GcStoreAdapter[]> {
547
540
  const [
548
541
  { harnessLeasesGcAdapter, registryEntriesGcAdapter },
549
542
  { fileLocksGcAdapter },
550
- { teamWorkersGcAdapter },
551
543
  { tmuxSessionsGcAdapter },
552
544
  { localRootsGcAdapter },
553
545
  ] = await Promise.all([
554
546
  import("../harness-control-plane/gc-adapter"),
555
547
  import("../config/file-lock-gc"),
556
- import("./team-gc"),
557
548
  import("./tmux-gc"),
558
549
  import("../internal-urls/local-root-gc"),
559
550
  ]);
560
551
  return [
561
552
  harnessLeasesGcAdapter,
562
- teamWorkersGcAdapter,
563
553
  fileLocksGcAdapter,
564
554
  tmuxSessionsGcAdapter,
565
555
  registryEntriesGcAdapter,
@@ -402,7 +402,7 @@ export function applyGjcTmuxProfile(context: GjcTmuxProfileContext): GjcTmuxProf
402
402
  const branchSlug = context.branch ? buildGjcTmuxSessionSlug(context.branch) : (context.branchSlug ?? null);
403
403
  // The psmux UX filter (mouse / set-clipboard / mode-style /
404
404
  // set-window-option) now lives in buildGjcTmuxProfileCommands so every
405
- // caller — gjc --tmux planning, gjc session create, gjc team bootstrap —
405
+ // caller — gjc --tmux planning, gjc session create —
406
406
  // applies the same drop set when the active multiplexer is psmux. We pass
407
407
  // the resolved tmuxCommand through the new opts seam so the filter
408
408
  // engages for this exact command, not whatever the resolver returns at
@@ -1027,8 +1027,8 @@ export function buildDefaultTmuxLaunchPlan(context: TmuxLaunchContext): TmuxLaun
1027
1027
  extraEnv: {
1028
1028
  [GJC_COORDINATOR_SESSION_ID_ENV]: sessionId,
1029
1029
  [GJC_COORDINATOR_SESSION_STATE_FILE_ENV]: sessionStateFile,
1030
- // Carry the GJC-managed session name into the child so `gjc team`
1031
- // can target the correct leader session by name. Under psmux on
1030
+ // Carry the GJC-managed session name into the child so tmux-backed
1031
+ // flows can target the correct leader session by name. Under psmux on
1032
1032
  // Windows the inherited TMUX_PANE can resolve to the wrong/default
1033
1033
  // session, which would split/send workers into the wrong session.
1034
1034
  [GJC_TMUX_ACTIVE_SESSION_ENV]: sessionName,
@@ -307,7 +307,7 @@ export interface ResolvedTmuxBinary {
307
307
 
308
308
  /**
309
309
  * Resolve the tmux command GJC should invoke. Honors the existing
310
- * GJC_TMUX_COMMAND / GJC_TEAM_TMUX_COMMAND overrides; on Windows when no
310
+ * GJC_TMUX_COMMAND override; on Windows when no
311
311
  * override is set, psmux (installed as psmux, pmux, or tmux) is picked
312
312
  * automatically so the default gjc --tmux flow lands on a real multiplexer.
313
313
  */
@@ -315,7 +315,7 @@ export function resolveGjcTmuxBinary(options: ResolveGjcTmuxBinaryOptions = {}):
315
315
  const env = options.env ?? process.env;
316
316
  const platform = options.platform ?? process.platform;
317
317
  const runner = options.runner ?? readSpawnRunner();
318
- const explicit = env.GJC_TMUX_COMMAND?.trim() || env.GJC_TEAM_TMUX_COMMAND?.trim();
318
+ const explicit = env.GJC_TMUX_COMMAND?.trim();
319
319
  if (explicit) {
320
320
  const isPsmux =
321
321
  platform === "win32"
@@ -0,0 +1,58 @@
1
+ import { pythonKernelTranscriptPath } from "./session-layout";
2
+ import { writeLogJsonl } from "./state-writer";
3
+
4
+ export interface PythonTranscriptRecord {
5
+ timestamp: string;
6
+ code: string;
7
+ output: string;
8
+ exitCode: number | null;
9
+ cancelled: boolean;
10
+ truncated: boolean;
11
+ }
12
+
13
+ export interface PythonKernelTranscript {
14
+ readonly dir: string;
15
+ readonly kernelInstanceId: string;
16
+ append(record: PythonTranscriptRecord): Promise<void>;
17
+ }
18
+
19
+ function transcriptDirectoryName(now: Date, kernelInstanceId: string): string {
20
+ const yyyy = now.getUTCFullYear().toString().padStart(4, "0");
21
+ const mm = (now.getUTCMonth() + 1).toString().padStart(2, "0");
22
+ const dd = now.getUTCDate().toString().padStart(2, "0");
23
+ const hh = now.getUTCHours().toString().padStart(2, "0");
24
+ const min = now.getUTCMinutes().toString().padStart(2, "0");
25
+ const ss = now.getUTCSeconds().toString().padStart(2, "0");
26
+ return `${yyyy}${mm}${dd}T${hh}${min}${ss}Z-${kernelInstanceId}`;
27
+ }
28
+
29
+ export function openPythonKernelTranscript(input: {
30
+ cwd: string;
31
+ sessionId: string;
32
+ kernelInstanceId: string;
33
+ now?: Date;
34
+ }): PythonKernelTranscript {
35
+ const dir = transcriptDirectoryName(input.now ?? new Date(), input.kernelInstanceId);
36
+ const transcriptPath = pythonKernelTranscriptPath(input.cwd, input.sessionId, dir);
37
+ let queue: Promise<void> = Promise.resolve();
38
+
39
+ return {
40
+ dir,
41
+ kernelInstanceId: input.kernelInstanceId,
42
+ append(record: PythonTranscriptRecord): Promise<void> {
43
+ const write = queue.then(async () => {
44
+ await writeLogJsonl(transcriptPath, record, {
45
+ cwd: input.cwd,
46
+ audit: {
47
+ category: "log",
48
+ verb: "append",
49
+ owner: "gjc-runtime",
50
+ sessionId: input.sessionId,
51
+ },
52
+ });
53
+ });
54
+ queue = write.catch(() => undefined);
55
+ return write;
56
+ },
57
+ };
58
+ }
@@ -42,7 +42,6 @@ import {
42
42
  writeArtifact,
43
43
  writeWorkflowEnvelopeAtomic,
44
44
  } from "./state-writer";
45
- import { probeGjcTeamAvailability } from "./team-runtime";
46
45
  import { assertSafePathComponent, CommandError, flagValue, hasFlag } from "./workflow-cli-common";
47
46
  import { getSkillManifest } from "./workflow-manifest";
48
47
  import {
@@ -66,7 +65,7 @@ import {
66
65
  * 2. **Artifact write**: `gjc ralplan --write --stage <type> --stage_n <N>
67
66
  * (--artifact <path-or-string> | --artifact-env GJC_RALPLAN_ARTIFACT)
68
67
  * [--run-id <id>] [--session-id <id>] [--lane-verdict <token>] [--json]` persists Planner / Architect
69
- * / Critic / disposition / revision / post-interview / ADR / final artifacts under
68
+ * / Critic / intent / disposition / revision / post-interview / ADR / final artifacts under
70
69
  * `.gjc/plans/ralplan/<run-id>/`, maintains an `index.jsonl` audit log, copies `final`
71
70
  * stages to `pending-approval.md`, and advances the HUD chip to reflect the latest
72
71
  * persisted stage. Disposition stage artifacts are fail-closed JSON documents that
@@ -81,6 +80,7 @@ export interface RalplanCommandResult {
81
80
 
82
81
  const KNOWN_STAGES = [
83
82
  "planner",
83
+ "intent",
84
84
  "architect",
85
85
  "critic",
86
86
  "disposition",
@@ -100,7 +100,7 @@ export const PLANNING_STUCK_MARKER = "PLANNING-STUCK";
100
100
  export const RALPLAN_DEFAULT_MAX_REVIEW_PASSES_PER_LANE = 1;
101
101
  /** Inclusive upper bound for `gjc.ralplan.maxReviewPassesPerLane` settings overrides. */
102
102
  export const RALPLAN_MAX_REVIEW_PASSES_PER_LANE_LIMIT = 10;
103
- export type RalplanAutoHandoffTarget = "off" | "ultragoal" | "team";
103
+ export type RalplanAutoHandoffTarget = "off" | "ultragoal" | "autoresearch";
104
104
 
105
105
  export interface RalplanAutoHandoffResolution {
106
106
  configuredTarget: RalplanAutoHandoffTarget;
@@ -109,7 +109,7 @@ export interface RalplanAutoHandoffResolution {
109
109
  source: string;
110
110
  }
111
111
 
112
- const RALPLAN_AUTO_HANDOFF_TARGETS = new Set<RalplanAutoHandoffTarget>(["off", "ultragoal", "team"]);
112
+ const RALPLAN_AUTO_HANDOFF_TARGETS = new Set<RalplanAutoHandoffTarget>(["off", "ultragoal", "autoresearch"]);
113
113
 
114
114
  const RALPLAN_ITERATION_OPENER_STAGES = new Set<RalplanStage>(["planner", "revision"]);
115
115
 
@@ -466,7 +466,6 @@ function parseRalplanAutoHandoffTarget(value: unknown): RalplanAutoHandoffTarget
466
466
 
467
467
  type RalplanAutoHandoffOptions = {
468
468
  planningStuck?: boolean;
469
- teamAvailabilityProbe?: () => { available: true } | { available: false; reason: string };
470
469
  /** The session's effective agent directory (see resolveWorkflowSetting). */
471
470
  agentDir?: string;
472
471
  };
@@ -474,7 +473,7 @@ type RalplanAutoHandoffOptions = {
474
473
  function parsePresentRalplanAutoHandoff(value: unknown): WorkflowSettingParseResult<RalplanAutoHandoffTarget> {
475
474
  const target = parseRalplanAutoHandoffTarget(value);
476
475
  return target === undefined
477
- ? { kind: "invalid", reason: "expected gjc.ralplan.autoHandoff to be one of off, ultragoal, team" }
476
+ ? { kind: "invalid", reason: "expected gjc.ralplan.autoHandoff to be one of off, ultragoal, autoresearch" }
478
477
  : { kind: "valid", value: target };
479
478
  }
480
479
 
@@ -500,18 +499,7 @@ function resolveRalplanAutoHandoffTarget(
500
499
  if (options.planningStuck) {
501
500
  return { configuredTarget, effectiveTarget: "off", degradationReason: "planning_stuck", source };
502
501
  }
503
- if (configuredTarget !== "team")
504
- return { configuredTarget, effectiveTarget: configuredTarget, degradationReason: null, source };
505
-
506
- const availability = (options.teamAvailabilityProbe ?? probeGjcTeamAvailability)();
507
- return availability.available
508
- ? { configuredTarget, effectiveTarget: "team", degradationReason: null, source }
509
- : {
510
- configuredTarget,
511
- effectiveTarget: "off",
512
- degradationReason: `team_unavailable:${availability.reason}`,
513
- source,
514
- };
502
+ return { configuredTarget, effectiveTarget: configuredTarget, degradationReason: null, source };
515
503
  }
516
504
 
517
505
  function parseMaxReviewPassesPerLaneValue(value: unknown): number | null {
@@ -125,8 +125,22 @@ export function sessionLogsDir(cwd: string, gjcSessionId: string): string {
125
125
  export function sessionRuntimeDir(cwd: string, gjcSessionId: string): string {
126
126
  return path.join(sessionRoot(cwd, gjcSessionId), "runtime");
127
127
  }
128
- export function sessionRlmDir(cwd: string, gjcSessionId: string): string {
129
- return path.join(sessionRoot(cwd, gjcSessionId), "rlm");
128
+ export function sessionIpykernelsDir(cwd: string, gjcSessionId: string): string {
129
+ return path.join(sessionRoot(cwd, gjcSessionId), "ipykernels");
130
+ }
131
+ export function sessionIpykernelsArtifactsDir(cwd: string, gjcSessionId: string): string {
132
+ return path.join(sessionIpykernelsDir(cwd, gjcSessionId), "artifacts");
133
+ }
134
+ export function pythonKernelTranscriptPath(cwd: string, gjcSessionId: string, dirName: string): string {
135
+ const normalized = dirName.trim();
136
+ assertSafePathComponent(normalized, "python kernel transcript dirName");
137
+ return path.join(sessionIpykernelsDir(cwd, gjcSessionId), normalized, "transcript.jsonl");
138
+ }
139
+ export function sessionAutoresearchDir(cwd: string, gjcSessionId: string): string {
140
+ return path.join(sessionRoot(cwd, gjcSessionId), "autoresearch");
141
+ }
142
+ export function sessionAutoresearchRunsDir(cwd: string, gjcSessionId: string): string {
143
+ return path.join(sessionAutoresearchDir(cwd, gjcSessionId), "runs");
130
144
  }
131
145
 
132
146
  // ---- Nested resolvers under <sessionRoot>/state ----
@@ -153,9 +167,6 @@ export function auditPath(cwd: string, gjcSessionId: string): string {
153
167
  export function transactionJournalPath(cwd: string, gjcSessionId: string, mutationId: string): string {
154
168
  return path.join(sessionStateDir(cwd, gjcSessionId), "transactions", `${encodeSessionSegment(mutationId)}.json`);
155
169
  }
156
- export function teamStateRoot(cwd: string, gjcSessionId: string): string {
157
- return path.join(sessionStateDir(cwd, gjcSessionId), "team");
158
- }
159
170
  export function workflowGatePath(cwd: string, gjcSessionId: string, gateId: string): string {
160
171
  return path.join(sessionStateDir(cwd, gjcSessionId), "workflow-gates", `${encodeSessionSegment(gateId)}.json`);
161
172
  }
@@ -173,8 +184,8 @@ export function tmuxRuntimeSessionPath(cwd: string, gjcSessionId: string, slug:
173
184
  assertSafePathComponent(normalized, "slug");
174
185
  return path.join(sessionRuntimeDir(cwd, gjcSessionId), "tmux-sessions", `${normalized}.json`);
175
186
  }
176
- export function rlmArtifactRoot(cwd: string, gjcSessionId: string, rlmSessionId: string): string {
187
+ export function autoresearchRlmArtifactRoot(cwd: string, gjcSessionId: string, rlmSessionId: string): string {
177
188
  const normalized = rlmSessionId.trim();
178
189
  if (normalized === "") throw new Error("rlmSessionId is required");
179
- return path.join(sessionRlmDir(cwd, gjcSessionId), encodeSessionSegment(normalized));
190
+ return path.join(sessionAutoresearchRunsDir(cwd, gjcSessionId), encodeSessionSegment(normalized));
180
191
  }
@@ -5,6 +5,12 @@ import * as path from "node:path";
5
5
  import type { AssistantMessage } from "@gajae-code/ai/core";
6
6
  import { normalizePathForComparison, postmortem } from "@gajae-code/utils";
7
7
  import { withFileLock } from "../config/file-lock";
8
+ import {
9
+ ensureCoordinatorDirectory,
10
+ syncCoordinatorDirectory,
11
+ syncCoordinatorFile,
12
+ writeCoordinatorAtomic,
13
+ } from "../coordinator-mcp/durability";
8
14
  import { reduceTerminalReceiptState } from "../sdk/receipt-state";
9
15
  import { TOOL_CATALOG } from "../tools/tool-catalog.generated";
10
16
  import { sessionRoot, sessionRuntimeDir } from "./session-layout";
@@ -648,6 +654,7 @@ export async function persistCoordinatorRuntimeInputReady(): Promise<RuntimeInpu
648
654
  if (existing.session_id !== expected.sessionId || existing.launch_id !== expected.launchId) {
649
655
  throw runtimeReadinessMarkerConflict();
650
656
  }
657
+ await syncCoordinatorDirectory(path.dirname(readinessFile));
651
658
  return existing;
652
659
  }
653
660
 
@@ -665,21 +672,64 @@ export async function persistCoordinatorRuntimeInputReady(): Promise<RuntimeInpu
665
672
  path.dirname(readinessFile),
666
673
  `.${path.basename(readinessFile)}.${process.pid}.${randomUUID()}.tmp`,
667
674
  );
675
+ let result: RuntimeInputReadyMarker | null = null;
676
+ let primaryError: unknown;
668
677
  try {
669
- await fs.mkdir(path.dirname(readinessFile), { recursive: true });
670
- await fs.writeFile(tempFile, `${JSON.stringify(marker)}\n`, { flag: "wx" });
678
+ await ensureCoordinatorDirectory(path.dirname(readinessFile));
679
+ const handle = await fs.open(tempFile, "wx", 0o600);
680
+ let writeError: unknown;
681
+ try {
682
+ await handle.writeFile(`${JSON.stringify(marker)}\n`);
683
+ await syncCoordinatorFile(handle);
684
+ } catch (error) {
685
+ writeError = error;
686
+ }
687
+ try {
688
+ await handle.close();
689
+ } catch (closeError) {
690
+ if (writeError) throw new AggregateError([writeError, closeError], "readiness write and close failed");
691
+ throw closeError;
692
+ }
693
+ if (writeError) throw writeError;
671
694
  try {
672
695
  await fs.link(tempFile, readinessFile);
673
696
  } catch (error) {
674
- if ((error as { code?: unknown }).code !== "EEXIST") throw runtimeReadinessMarkerConflict();
697
+ if ((error as { code?: unknown }).code !== "EEXIST") throw error;
675
698
  const raced = await readRuntimeInputReadyMarker(readinessFile);
676
- if (raced && raced.session_id === expected.sessionId && raced.launch_id === expected.launchId) return raced;
677
- throw runtimeReadinessMarkerConflict();
699
+ if (raced && raced.session_id === expected.sessionId && raced.launch_id === expected.launchId) {
700
+ await syncCoordinatorDirectory(path.dirname(readinessFile));
701
+ result = raced;
702
+ } else {
703
+ throw runtimeReadinessMarkerConflict();
704
+ }
678
705
  }
679
- return marker;
680
- } finally {
706
+ if (result === null) {
707
+ await syncCoordinatorDirectory(path.dirname(readinessFile));
708
+ result = marker;
709
+ }
710
+ } catch (error) {
711
+ primaryError = error;
712
+ }
713
+ let cleanupError: unknown;
714
+ try {
681
715
  await fs.rm(tempFile, { force: true });
716
+ } catch (error) {
717
+ cleanupError = error;
682
718
  }
719
+ let cleanupBarrierError: unknown;
720
+ if (!cleanupError) {
721
+ try {
722
+ await syncCoordinatorDirectory(path.dirname(readinessFile));
723
+ } catch (error) {
724
+ cleanupBarrierError = error;
725
+ }
726
+ }
727
+ const failures = [primaryError, cleanupError, cleanupBarrierError].filter(
728
+ (error): error is unknown => error !== undefined,
729
+ );
730
+ if (failures.length > 1) throw new AggregateError(failures, "readiness publication and cleanup failed");
731
+ if (failures.length === 1) throw failures[0];
732
+ return result;
683
733
  }
684
734
 
685
735
  function sameResolvedPath(left: string, right: string, platform: NodeJS.Platform = process.platform): boolean {
@@ -1268,8 +1318,7 @@ async function withCoordinatorTransactionLock<T>(stateFile: string, operation: (
1268
1318
  }
1269
1319
 
1270
1320
  async function writeStateFile(stateFile: string, payload: Record<string, unknown>): Promise<void> {
1271
- await fs.mkdir(path.dirname(stateFile), { recursive: true });
1272
- await Bun.write(stateFile, `${JSON.stringify(payload)}\n`);
1321
+ await writeCoordinatorAtomic(stateFile, `${JSON.stringify(payload)}\n`);
1273
1322
  }
1274
1323
 
1275
1324
  function contextWithManagedOwnerGeneration(context: RuntimeStateContext): RuntimeStateContext {
@@ -288,44 +288,6 @@ export function renderUltragoalStatusMarkdown(summary: {
288
288
  return `${lines.join("\n")}\n`;
289
289
  }
290
290
 
291
- export function renderTeamStatusMarkdown(snapshot: {
292
- team_name: string;
293
- phase: string;
294
- tmux_target?: string;
295
- tmux_session?: string;
296
- state_dir: string;
297
- task_total: number;
298
- task_counts: Record<string, number>;
299
- workers: Array<{ id: string; status: string }>;
300
- notification_summary?: { total: number; replay_eligible: number; by_state: Record<string, number> };
301
- integration_by_worker?: Record<string, { status?: string; conflict_files?: string[] }>;
302
- }): string {
303
- const counts = Object.entries(snapshot.task_counts)
304
- .map(([key, value]) => `${key}=${value}`)
305
- .join(" ");
306
- const lines = [
307
- "# team status",
308
- "",
309
- `- team: ${snapshot.team_name}`,
310
- `- phase: ${snapshot.phase}`,
311
- `- tmux: ${snapshot.tmux_target || snapshot.tmux_session || "none"}`,
312
- `- state: ${snapshot.state_dir}`,
313
- `- tasks: ${snapshot.task_total} (${counts})`,
314
- `- workers: ${snapshot.workers.length} (${snapshot.workers.map(worker => `${worker.id}:${worker.status}`).join(" ")})`,
315
- ];
316
- if (snapshot.notification_summary) {
317
- lines.push(
318
- `- notifications: total=${snapshot.notification_summary.total} replay_eligible=${snapshot.notification_summary.replay_eligible}`,
319
- );
320
- }
321
- const integrations = Object.entries(snapshot.integration_by_worker ?? {});
322
- if (integrations.length)
323
- lines.push(
324
- `- integrations: ${integrations.map(([worker, state]) => `${worker}:${state.status ?? "unknown"}`).join(" ")}`,
325
- );
326
- return `${lines.join("\n")}\n`;
327
- }
328
-
329
291
  export function renderStateMarkdown(
330
292
  skill: CanonicalGjcWorkflowSkill,
331
293
  stateJson: Record<string, unknown>,
@@ -15,11 +15,12 @@ import {
15
15
  } from "../skill-state/active-state";
16
16
  import { initialPhaseForSkill } from "../skill-state/initial-phase";
17
17
  import {
18
+ buildAutoresearchHudSummary,
18
19
  buildRalplanHudSummary,
19
- buildTeamHudSummary,
20
20
  buildUltragoalHudSummary,
21
21
  deriveDeepInterviewHud,
22
22
  } from "../skill-state/workflow-hud";
23
+
23
24
  import {
24
25
  type AuditEntry,
25
26
  buildWorkflowStateReceipt,
@@ -923,27 +924,47 @@ function buildHudForMode(
923
924
  updatedAt,
924
925
  });
925
926
  }
926
- case "team": {
927
- const teamPhase = typeof payload.phase === "string" ? (payload.phase as string) : (phase ?? "running");
928
- const taskCounts =
929
- typeof payload.task_counts === "object" && payload.task_counts && !Array.isArray(payload.task_counts)
930
- ? (payload.task_counts as Record<string, number>)
931
- : {};
932
- const taskTotal = typeof payload.task_total === "number" ? (payload.task_total as number) : 0;
933
- const workers = Array.isArray(payload.workers)
934
- ? (payload.workers as Array<{ id?: string; status?: string }>)
935
- .filter(w => w && typeof w.id === "string")
936
- .map(w => ({
937
- id: w.id as string,
938
- status: typeof w.status === "string" ? (w.status as string) : undefined,
939
- }))
940
- : [];
941
- return buildTeamHudSummary({
942
- phase: teamPhase,
943
- task_total: taskTotal,
944
- task_counts: taskCounts,
945
- workers,
946
- updated_at: updatedAt,
927
+ case "autoresearch": {
928
+ const missionPhase = typeof payload.current_phase === "string" ? payload.current_phase : (phase ?? "intake");
929
+ const mode = typeof payload.mode === "string" ? payload.mode : undefined;
930
+ const intake = typeof payload.intake === "string" ? payload.intake : undefined;
931
+ const slug = typeof payload.slug === "string" ? payload.slug : undefined;
932
+ const specPath =
933
+ typeof payload.spec_path === "string"
934
+ ? payload.spec_path
935
+ : typeof payload.specPath === "string"
936
+ ? payload.specPath
937
+ : undefined;
938
+
939
+ const verdict =
940
+ payload.verdict && typeof payload.verdict === "object" && !Array.isArray(payload.verdict)
941
+ ? (payload.verdict as Record<string, unknown>)
942
+ : undefined;
943
+ const verdictValue = verdict
944
+ ? typeof verdict.status === "string"
945
+ ? verdict.status
946
+ : verdict.status && typeof verdict.status === "object"
947
+ ? JSON.stringify(verdict.status).slice(0, 40)
948
+ : undefined
949
+ : undefined;
950
+ const rawExperiments = Array.isArray(payload.experiments) ? payload.experiments : [];
951
+ const experimentStatuses = rawExperiments
952
+ .map(item =>
953
+ item && typeof item === "object" && typeof (item as Record<string, unknown>).status === "string"
954
+ ? ((item as Record<string, unknown>).status as string)
955
+ : undefined,
956
+ )
957
+ .filter((status): status is string => Boolean(status));
958
+ return buildAutoresearchHudSummary({
959
+ phase: missionPhase,
960
+ mode,
961
+ intake,
962
+ slug,
963
+ verdict: verdictValue,
964
+ specPath,
965
+ experimentCount: experimentStatuses.length,
966
+ experimentStatuses,
967
+ updatedAt,
947
968
  });
948
969
  }
949
970
  default:
@@ -12,9 +12,9 @@
12
12
  */
13
13
  import * as fs from "node:fs/promises";
14
14
  import { z } from "zod";
15
+ import { CANONICAL_GJC_WORKFLOW_SKILLS } from "../skill-state/canonical-skills";
15
16
  import { WORKFLOW_STATE_VERSION } from "../skill-state/workflow-state-version";
16
17
 
17
- const CANONICAL_GJC_WORKFLOW_SKILLS = ["deep-interview", "ralplan", "ultragoal", "team"] as const;
18
18
  const skillEnum = z.enum([...CANONICAL_GJC_WORKFLOW_SKILLS]);
19
19
  const ownerEnum = z.enum(["gjc-state-cli", "gjc-runtime", "gjc-hook"]);
20
20
  const receiptStatusEnum = z.enum(["fresh", "stale"]);
@@ -56,14 +56,14 @@ export function envDisabled(value: string | undefined): boolean {
56
56
  * Resolve the tmux (or tmux-compatible multiplexer) command GJC should invoke.
57
57
  *
58
58
  * This is the shared entry point used by every GJC code path that needs to talk
59
- * to a multiplexer: `gjc --tmux` planning, `gjc session ...`, `gjc team ...`,
59
+ * to a multiplexer: `gjc --tmux` planning and `gjc session ...`,
60
60
  * the lifecycle controller, and the harness resident owner. Routing all of
61
61
  * them through the same resolver means a single `GJC_TMUX_COMMAND` override or
62
62
  * a single Windows psmux / pmux detection wins for the whole process — the
63
63
  * failure mode where `gjc --tmux` creates a psmux-backed session and then
64
64
  * `gjc session status` fails because it queries literal `tmux` is closed off.
65
65
  *
66
- * Explicit `GJC_TMUX_COMMAND` / `GJC_TEAM_TMUX_COMMAND` overrides are honored on
66
+ * Explicit `GJC_TMUX_COMMAND` overrides are honored on
67
67
  * every platform. On native Windows without an override the resolver walks
68
68
  * `psmux`, then `pmux`, then `tmux` and uses the first binary present on PATH.
69
69
  * On POSIX the resolver returns `tmux` (the historical default) and only
@@ -124,10 +124,10 @@ export const GJC_TMUX_UNTAGGED_REASON = "gjc_tmux_session_untagged";
124
124
  export function buildGjcTmuxUntaggedSessionHint(tmuxCommand: string): string {
125
125
  return (
126
126
  `the active multiplexer "${tmuxCommand}" lists this session but did not return GJC's ${GJC_TMUX_PROFILE_OPTION} ownership tag; ` +
127
- "GJC-managed sessions and `gjc team` require a tmux provider that round-trips tmux user options. " +
127
+ "GJC-managed sessions require a tmux provider that round-trips tmux user options. " +
128
128
  "On Windows psmux, GJC persists a ProviderAuthority that binds the exact executable identity and an isolated `-L <namespace>` server namespace for the owner generation. " +
129
129
  "Recover through GJC so it reuses that persisted authority; do not retry against ambient tmux/psmux or a raw `-L` namespace. " +
130
- "GJC_TMUX_COMMAND and GJC_TEAM_TMUX_COMMAND are binary overrides, not shell command lines."
130
+ "GJC_TMUX_COMMAND is a binary override, not a shell command line."
131
131
  );
132
132
  }
133
133
 
@@ -233,7 +233,7 @@ export function buildGjcTmuxRequiredProfileCommands(
233
233
  * 3.3.0. psmux does not support the tmux `set-window-option` command at all
234
234
  * (it reports "unknown command: set-window-option") and silently drops several
235
235
  * `set-option` keys. The list lives here so every code path that tags a tmux
236
- * session (gjc --tmux planning, gjc session create, gjc team bootstrap)
236
+ * session (gjc --tmux planning, gjc session create)
237
237
  * applies the same filter.
238
238
  */
239
239
  const PSMUX_UNSUPPORTED_PROFILE_KEYS = new Set(["mouse", "set-clipboard", "mode-style"]);
@@ -270,11 +270,11 @@ export function buildGjcTmuxProfileCommands(
270
270
  // psmux does not implement set-window-option and historically drops
271
271
  // mouse / set-clipboard / mode-style. Filter the UX profile commands
272
272
  // centrally so every code path that tags a session (gjc --tmux planning,
273
- // gjc session create, gjc team bootstrap) drops the same set. The
273
+ // gjc session create) drops the same set. The
274
274
  // GJC_PSMUX_PROFILE_FORCE override lets the operator opt back in when
275
275
  // running on a psmux build that has caught up. The ownership-tag
276
276
  // round-trip (set-option @gjc-*) is never filtered, since gjc session /
277
- // gjc team rely on it.
277
+ // tmux-backed sessions rely on it.
278
278
  // The filter is opt-in: callers that explicitly pass `opts.tmuxCommand`
279
279
  // name a psmux-class multiplexer (psmux / pmux) when they want the UX
280
280
  // profile filtered. Auto-detect on Windows hosts where psmux happens