@wrongstack/core 0.287.0 → 0.291.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 (339) hide show
  1. package/dist/agent-status-tracker.d.ts +13 -0
  2. package/dist/agent-status-tracker.d.ts.map +1 -1
  3. package/dist/boot.d.ts.map +1 -1
  4. package/dist/chronicle/context.d.ts +13 -0
  5. package/dist/chronicle/context.d.ts.map +1 -0
  6. package/dist/chronicle/decision-adapter.d.ts +13 -0
  7. package/dist/chronicle/decision-adapter.d.ts.map +1 -0
  8. package/dist/chronicle/domain-adapter.d.ts +13 -0
  9. package/dist/chronicle/domain-adapter.d.ts.map +1 -0
  10. package/dist/chronicle/file-observer.d.ts +20 -0
  11. package/dist/chronicle/file-observer.d.ts.map +1 -0
  12. package/dist/chronicle/health-monitor.d.ts +11 -0
  13. package/dist/chronicle/health-monitor.d.ts.map +1 -0
  14. package/dist/chronicle/identity.d.ts +18 -0
  15. package/dist/chronicle/identity.d.ts.map +1 -0
  16. package/dist/chronicle/index.d.ts +16 -0
  17. package/dist/chronicle/index.d.ts.map +1 -0
  18. package/dist/chronicle/index.js +2555 -0
  19. package/dist/chronicle/index.js.map +7 -0
  20. package/dist/chronicle/journal.d.ts +81 -0
  21. package/dist/chronicle/journal.d.ts.map +1 -0
  22. package/dist/chronicle/process-adapter.d.ts +14 -0
  23. package/dist/chronicle/process-adapter.d.ts.map +1 -0
  24. package/dist/chronicle/prompt-manifest.d.ts +34 -0
  25. package/dist/chronicle/prompt-manifest.d.ts.map +1 -0
  26. package/dist/chronicle/provider-adapter.d.ts +13 -0
  27. package/dist/chronicle/provider-adapter.d.ts.map +1 -0
  28. package/dist/chronicle/query.d.ts +108 -0
  29. package/dist/chronicle/query.d.ts.map +1 -0
  30. package/dist/chronicle/rollup-adapter.d.ts +14 -0
  31. package/dist/chronicle/rollup-adapter.d.ts.map +1 -0
  32. package/dist/chronicle/stream-adapter.d.ts +13 -0
  33. package/dist/chronicle/stream-adapter.d.ts.map +1 -0
  34. package/dist/chronicle/tool-adapter.d.ts +15 -0
  35. package/dist/chronicle/tool-adapter.d.ts.map +1 -0
  36. package/dist/chronicle/types.d.ts +82 -0
  37. package/dist/chronicle/types.d.ts.map +1 -0
  38. package/dist/coordination/agent-monitor.d.ts +40 -0
  39. package/dist/coordination/agent-monitor.d.ts.map +1 -1
  40. package/dist/coordination/agent-subagent-runner.d.ts +7 -1
  41. package/dist/coordination/agent-subagent-runner.d.ts.map +1 -1
  42. package/dist/coordination/agents/phase6-domain.d.ts.map +1 -1
  43. package/dist/coordination/autonomous-coordinator.d.ts +2 -0
  44. package/dist/coordination/autonomous-coordinator.d.ts.map +1 -1
  45. package/dist/coordination/brain-monitor.d.ts +1 -1
  46. package/dist/coordination/brain.d.ts +3 -2
  47. package/dist/coordination/brain.d.ts.map +1 -1
  48. package/dist/coordination/collab-debug.d.ts +0 -9
  49. package/dist/coordination/collab-debug.d.ts.map +1 -1
  50. package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -1
  51. package/dist/coordination/dep-watcher.d.ts +2 -1
  52. package/dist/coordination/dep-watcher.d.ts.map +1 -1
  53. package/dist/coordination/director/director-collab.d.ts +1 -1
  54. package/dist/coordination/director/director-collab.d.ts.map +1 -1
  55. package/dist/coordination/director-tools.d.ts.map +1 -1
  56. package/dist/coordination/director.d.ts +10 -1
  57. package/dist/coordination/director.d.ts.map +1 -1
  58. package/dist/coordination/file-author-tracker.d.ts.map +1 -1
  59. package/dist/coordination/fleet-bus.d.ts.map +1 -1
  60. package/dist/coordination/fleet-event-validation.d.ts +0 -7
  61. package/dist/coordination/fleet-event-validation.d.ts.map +1 -1
  62. package/dist/coordination/fleet-spawn.d.ts.map +1 -1
  63. package/dist/coordination/fleet-supervisor.d.ts +1 -1
  64. package/dist/coordination/fleet-supervisor.d.ts.map +1 -1
  65. package/dist/coordination/fleet.d.ts +0 -44
  66. package/dist/coordination/fleet.d.ts.map +1 -1
  67. package/dist/coordination/global-mailbox.d.ts +7 -1
  68. package/dist/coordination/global-mailbox.d.ts.map +1 -1
  69. package/dist/coordination/index.d.ts +5 -3
  70. package/dist/coordination/index.d.ts.map +1 -1
  71. package/dist/coordination/index.js +2426 -299
  72. package/dist/coordination/index.js.map +4 -4
  73. package/dist/coordination/knowledge-graph.d.ts +2 -1
  74. package/dist/coordination/knowledge-graph.d.ts.map +1 -1
  75. package/dist/coordination/large-answer-store.d.ts +0 -6
  76. package/dist/coordination/large-answer-store.d.ts.map +1 -1
  77. package/dist/coordination/mail-tools.d.ts +2 -2
  78. package/dist/coordination/mail-tools.d.ts.map +1 -1
  79. package/dist/coordination/mailbox-hooks.d.ts +2 -0
  80. package/dist/coordination/mailbox-hooks.d.ts.map +1 -1
  81. package/dist/coordination/mailbox-http-router.d.ts +43 -0
  82. package/dist/coordination/mailbox-http-router.d.ts.map +1 -0
  83. package/dist/coordination/mailbox-message-codec.d.ts +35 -0
  84. package/dist/coordination/mailbox-message-codec.d.ts.map +1 -1
  85. package/dist/coordination/mailbox-tool.d.ts +1 -1
  86. package/dist/coordination/mailbox-tool.d.ts.map +1 -1
  87. package/dist/coordination/mailbox-types.d.ts +170 -10
  88. package/dist/coordination/mailbox-types.d.ts.map +1 -1
  89. package/dist/coordination/mailbox.d.ts +1 -1
  90. package/dist/coordination/mailbox.d.ts.map +1 -1
  91. package/dist/coordination/package-author-tracker.d.ts.map +1 -1
  92. package/dist/coordination/provider-status-tracker.d.ts +236 -0
  93. package/dist/coordination/provider-status-tracker.d.ts.map +1 -0
  94. package/dist/coordination/subagent-budget.d.ts +2 -1
  95. package/dist/coordination/subagent-budget.d.ts.map +1 -1
  96. package/dist/core/agent-loop.d.ts +8 -3
  97. package/dist/core/agent-loop.d.ts.map +1 -1
  98. package/dist/core/agent-response.d.ts +5 -4
  99. package/dist/core/agent-response.d.ts.map +1 -1
  100. package/dist/core/agent-tools.d.ts +1 -1
  101. package/dist/core/agent-tools.d.ts.map +1 -1
  102. package/dist/core/agent.d.ts +4 -2
  103. package/dist/core/agent.d.ts.map +1 -1
  104. package/dist/core/context.d.ts +55 -1
  105. package/dist/core/context.d.ts.map +1 -1
  106. package/dist/core/fallback-model.d.ts +14 -8
  107. package/dist/core/fallback-model.d.ts.map +1 -1
  108. package/dist/core/fallback-profile-manager.d.ts +118 -0
  109. package/dist/core/fallback-profile-manager.d.ts.map +1 -0
  110. package/dist/core/fleet-pulse.d.ts +2 -1
  111. package/dist/core/fleet-pulse.d.ts.map +1 -1
  112. package/dist/core/iteration-limit.d.ts +2 -1
  113. package/dist/core/iteration-limit.d.ts.map +1 -1
  114. package/dist/core/mailbox-loop.d.ts +16 -1
  115. package/dist/core/mailbox-loop.d.ts.map +1 -1
  116. package/dist/core/model-availability-calendar.d.ts +27 -0
  117. package/dist/core/model-availability-calendar.d.ts.map +1 -0
  118. package/dist/core/provider-runner.d.ts.map +1 -1
  119. package/dist/core/system-prompt-builder.d.ts +2 -1
  120. package/dist/core/system-prompt-builder.d.ts.map +1 -1
  121. package/dist/defaults/index.js +1920 -598
  122. package/dist/defaults/index.js.map +4 -4
  123. package/dist/execution/auto-compaction-middleware.d.ts +3 -2
  124. package/dist/execution/auto-compaction-middleware.d.ts.map +1 -1
  125. package/dist/execution/compaction-core.d.ts.map +1 -1
  126. package/dist/execution/council-brain.d.ts +28 -49
  127. package/dist/execution/council-brain.d.ts.map +1 -1
  128. package/dist/execution/council-orchestrator.d.ts +30 -0
  129. package/dist/execution/council-orchestrator.d.ts.map +1 -1
  130. package/dist/execution/enhance-recovery.d.ts +8 -0
  131. package/dist/execution/enhance-recovery.d.ts.map +1 -1
  132. package/dist/execution/error-handler.d.ts +2 -2
  133. package/dist/execution/error-handler.d.ts.map +1 -1
  134. package/dist/execution/eternal-autonomy.d.ts.map +1 -1
  135. package/dist/execution/index.js +2600 -1903
  136. package/dist/execution/index.js.map +4 -4
  137. package/dist/execution/intelligent-compactor.d.ts +0 -16
  138. package/dist/execution/intelligent-compactor.d.ts.map +1 -1
  139. package/dist/execution/model-runtime.d.ts.map +1 -1
  140. package/dist/execution/one-shot-llm.d.ts +9 -1
  141. package/dist/execution/one-shot-llm.d.ts.map +1 -1
  142. package/dist/execution/prompt-enhancer.d.ts +36 -0
  143. package/dist/execution/prompt-enhancer.d.ts.map +1 -1
  144. package/dist/execution/prompt-enhancer.js +158 -10
  145. package/dist/execution/prompt-enhancer.js.map +2 -2
  146. package/dist/execution/retry-policy.d.ts +0 -13
  147. package/dist/execution/retry-policy.d.ts.map +1 -1
  148. package/dist/execution/skill-loader.d.ts.map +1 -1
  149. package/dist/execution/tool-executor.d.ts.map +1 -1
  150. package/dist/goal/checkpoint.d.ts.map +1 -0
  151. package/dist/{autophase/auto-phase-planner.d.ts → goal/goal-planner.d.ts} +8 -8
  152. package/dist/goal/goal-planner.d.ts.map +1 -0
  153. package/dist/{autophase/auto-phase-runner.d.ts → goal/goal-runner.d.ts} +10 -10
  154. package/dist/goal/goal-runner.d.ts.map +1 -0
  155. package/dist/{autophase → goal}/index.d.ts +3 -3
  156. package/dist/goal/index.d.ts.map +1 -0
  157. package/dist/goal/phase-graph-builder.d.ts.map +1 -0
  158. package/dist/{autophase → goal}/phase-orchestrator.d.ts +2 -2
  159. package/dist/goal/phase-orchestrator.d.ts.map +1 -0
  160. package/dist/goal/phase-store.d.ts.map +1 -0
  161. package/dist/{autophase → goal}/types.d.ts +2 -2
  162. package/dist/goal/types.d.ts.map +1 -0
  163. package/dist/hq/auth-store.d.ts.map +1 -1
  164. package/dist/hq/commands.d.ts +2 -1
  165. package/dist/hq/commands.d.ts.map +1 -1
  166. package/dist/hq/exposure.d.ts +66 -0
  167. package/dist/hq/exposure.d.ts.map +1 -0
  168. package/dist/hq/index.d.ts +1 -0
  169. package/dist/hq/index.d.ts.map +1 -1
  170. package/dist/hq/index.js +190 -21
  171. package/dist/hq/index.js.map +4 -4
  172. package/dist/hq/mailbox-mapper.d.ts +13 -1
  173. package/dist/hq/mailbox-mapper.d.ts.map +1 -1
  174. package/dist/hq/protocol/browser.d.ts +9 -1
  175. package/dist/hq/protocol/browser.d.ts.map +1 -1
  176. package/dist/hq/protocol/client.d.ts +2 -2
  177. package/dist/hq/protocol/client.d.ts.map +1 -1
  178. package/dist/hq/protocol/core.d.ts.map +1 -1
  179. package/dist/hq/protocol/mailbox.d.ts +6 -0
  180. package/dist/hq/protocol/mailbox.d.ts.map +1 -1
  181. package/dist/hq/protocol/session.d.ts +4 -0
  182. package/dist/hq/protocol/session.d.ts.map +1 -1
  183. package/dist/hq/publisher.d.ts.map +1 -1
  184. package/dist/index.d.ts +34 -25
  185. package/dist/index.d.ts.map +1 -1
  186. package/dist/index.js +30287 -22214
  187. package/dist/index.js.map +4 -4
  188. package/dist/infrastructure/index.js +60 -5
  189. package/dist/infrastructure/index.js.map +2 -2
  190. package/dist/kernel/events/agent-events.d.ts +33 -1
  191. package/dist/kernel/events/agent-events.d.ts.map +1 -1
  192. package/dist/kernel/events/file-events.d.ts +65 -0
  193. package/dist/kernel/events/file-events.d.ts.map +1 -0
  194. package/dist/kernel/events/memory-events.d.ts +36 -0
  195. package/dist/kernel/events/memory-events.d.ts.map +1 -1
  196. package/dist/kernel/events/network-events.d.ts +60 -0
  197. package/dist/kernel/events/network-events.d.ts.map +1 -0
  198. package/dist/kernel/events/process-events.d.ts +44 -0
  199. package/dist/kernel/events/process-events.d.ts.map +1 -0
  200. package/dist/kernel/events/provider-events.d.ts +89 -0
  201. package/dist/kernel/events/provider-events.d.ts.map +1 -1
  202. package/dist/kernel/events/tool-events.d.ts +10 -0
  203. package/dist/kernel/events/tool-events.d.ts.map +1 -1
  204. package/dist/kernel/events/worktree-events.d.ts +1 -1
  205. package/dist/kernel/events.d.ts +14 -1
  206. package/dist/kernel/events.d.ts.map +1 -1
  207. package/dist/kernel/index.js +2 -1
  208. package/dist/kernel/index.js.map +2 -2
  209. package/dist/kernel/tokens.d.ts +3 -1
  210. package/dist/kernel/tokens.d.ts.map +1 -1
  211. package/dist/mailbox-attach.d.ts.map +1 -1
  212. package/dist/models/index.js.map +2 -2
  213. package/dist/observability/index.d.ts +3 -0
  214. package/dist/observability/index.d.ts.map +1 -1
  215. package/dist/observability/index.js +278 -0
  216. package/dist/observability/index.js.map +4 -4
  217. package/dist/observability/network-telemetry.d.ts +15 -0
  218. package/dist/observability/network-telemetry.d.ts.map +1 -0
  219. package/dist/observability/process-telemetry.d.ts +18 -0
  220. package/dist/observability/process-telemetry.d.ts.map +1 -0
  221. package/dist/observability/redact-command.d.ts +20 -0
  222. package/dist/observability/redact-command.d.ts.map +1 -0
  223. package/dist/plugins/auto-review-plugin.d.ts +56 -3
  224. package/dist/plugins/auto-review-plugin.d.ts.map +1 -1
  225. package/dist/plugins/chimera-plugin.d.ts +164 -5
  226. package/dist/plugins/chimera-plugin.d.ts.map +1 -1
  227. package/dist/plugins/review-context-builder.d.ts +52 -0
  228. package/dist/plugins/review-context-builder.d.ts.map +1 -0
  229. package/dist/security/index.d.ts +1 -0
  230. package/dist/security/index.d.ts.map +1 -1
  231. package/dist/security/index.js +186 -9
  232. package/dist/security/index.js.map +4 -4
  233. package/dist/security/kanban-boundary.d.ts +10 -0
  234. package/dist/security/kanban-boundary.d.ts.map +1 -0
  235. package/dist/security/permission-policy.d.ts +1 -0
  236. package/dist/security/permission-policy.d.ts.map +1 -1
  237. package/dist/session-registry.d.ts +80 -0
  238. package/dist/session-registry.d.ts.map +1 -1
  239. package/dist/skills/index.js.map +2 -2
  240. package/dist/storage/config-loader.d.ts +7 -0
  241. package/dist/storage/config-loader.d.ts.map +1 -1
  242. package/dist/storage/file-session-writer.d.ts +20 -7
  243. package/dist/storage/file-session-writer.d.ts.map +1 -1
  244. package/dist/storage/goal-coordination.d.ts +40 -0
  245. package/dist/storage/goal-coordination.d.ts.map +1 -0
  246. package/dist/storage/goal-store.d.ts +9 -5
  247. package/dist/storage/goal-store.d.ts.map +1 -1
  248. package/dist/storage/index.d.ts +4 -2
  249. package/dist/storage/index.d.ts.map +1 -1
  250. package/dist/storage/index.js +1066 -226
  251. package/dist/storage/index.js.map +4 -4
  252. package/dist/storage/memory-consolidator.d.ts +49 -4
  253. package/dist/storage/memory-consolidator.d.ts.map +1 -1
  254. package/dist/storage/memory-graph-backend.d.ts +11 -0
  255. package/dist/storage/memory-graph-backend.d.ts.map +1 -1
  256. package/dist/storage/provider-config-watcher.d.ts +19 -0
  257. package/dist/storage/provider-config-watcher.d.ts.map +1 -1
  258. package/dist/storage/session-event-bridge.d.ts +2 -2
  259. package/dist/storage/session-event-bridge.d.ts.map +1 -1
  260. package/dist/storage/session-resume-validation.d.ts +10 -0
  261. package/dist/storage/session-resume-validation.d.ts.map +1 -1
  262. package/dist/storage/session-rewind-apply.d.ts +53 -0
  263. package/dist/storage/session-rewind-apply.d.ts.map +1 -0
  264. package/dist/storage/session-rewinder.d.ts.map +1 -1
  265. package/dist/storage/session-store.d.ts.map +1 -1
  266. package/dist/tasking/index.js.map +1 -1
  267. package/dist/tasking/task-store.d.ts +1 -1
  268. package/dist/tools/council-tool.d.ts +3 -0
  269. package/dist/tools/council-tool.d.ts.map +1 -1
  270. package/dist/tools/fallback-manage-tools.d.ts +82 -0
  271. package/dist/tools/fallback-manage-tools.d.ts.map +1 -0
  272. package/dist/tools/index.d.ts +1 -0
  273. package/dist/tools/index.d.ts.map +1 -1
  274. package/dist/tools/index.js +3423 -192
  275. package/dist/tools/index.js.map +4 -4
  276. package/dist/tools/one-shot-llm-tool.d.ts +2 -0
  277. package/dist/tools/one-shot-llm-tool.d.ts.map +1 -1
  278. package/dist/types/config.d.ts +76 -7
  279. package/dist/types/config.d.ts.map +1 -1
  280. package/dist/types/file-event-record.d.ts +68 -0
  281. package/dist/types/file-event-record.d.ts.map +1 -0
  282. package/dist/types/index.d.ts +1 -0
  283. package/dist/types/index.d.ts.map +1 -1
  284. package/dist/types/index.js +13 -8
  285. package/dist/types/index.js.map +3 -3
  286. package/dist/types/memory.d.ts +12 -0
  287. package/dist/types/memory.d.ts.map +1 -1
  288. package/dist/types/multi-agent.d.ts +12 -1
  289. package/dist/types/multi-agent.d.ts.map +1 -1
  290. package/dist/types/one-shot-llm.d.ts +16 -7
  291. package/dist/types/one-shot-llm.d.ts.map +1 -1
  292. package/dist/types/provider.d.ts +1 -1
  293. package/dist/types/provider.d.ts.map +1 -1
  294. package/dist/types/session.d.ts +68 -2
  295. package/dist/types/session.d.ts.map +1 -1
  296. package/dist/types/tool-executor.d.ts +2 -0
  297. package/dist/types/tool-executor.d.ts.map +1 -1
  298. package/dist/types/tool.d.ts +5 -0
  299. package/dist/types/tool.d.ts.map +1 -1
  300. package/dist/utils/atomic-write.d.ts.map +1 -1
  301. package/dist/utils/index.d.ts +10 -10
  302. package/dist/utils/index.d.ts.map +1 -1
  303. package/dist/utils/index.js +497 -254
  304. package/dist/utils/index.js.map +4 -4
  305. package/dist/utils/message-invariants.d.ts +9 -0
  306. package/dist/utils/message-invariants.d.ts.map +1 -1
  307. package/dist/utils/safe-json.d.ts +1 -1
  308. package/dist/utils/safe-json.d.ts.map +1 -1
  309. package/dist/utils/term.d.ts +279 -0
  310. package/dist/utils/term.d.ts.map +1 -1
  311. package/dist/utils/tool-wire-compact.d.ts +9 -0
  312. package/dist/utils/tool-wire-compact.d.ts.map +1 -1
  313. package/dist/utils/wstack-paths.d.ts +12 -2
  314. package/dist/utils/wstack-paths.d.ts.map +1 -1
  315. package/dist/worktree/worktree-manager.d.ts +1 -1
  316. package/dist/worktree/worktree-manager.d.ts.map +1 -1
  317. package/instructions/agents/ios.md +113 -0
  318. package/instructions/agents/search.md +1 -1
  319. package/instructions/llm/chimera-review.md +66 -9
  320. package/instructions/llm/memory-consolidator.md +4 -12
  321. package/instructions/llm/prompt-enhancer.md +3 -1
  322. package/instructions/sections/tool/common-patterns.md +3 -3
  323. package/instructions/system.md +40 -5
  324. package/package.json +7 -3
  325. package/skills/auto-review/SKILL.md +176 -0
  326. package/skills/mnemosyne/SKILL.md +156 -0
  327. package/skills/mnemosyne/instructions/agent-prompt.md +200 -0
  328. package/dist/autophase/auto-phase-planner.d.ts.map +0 -1
  329. package/dist/autophase/auto-phase-runner.d.ts.map +0 -1
  330. package/dist/autophase/checkpoint.d.ts.map +0 -1
  331. package/dist/autophase/index.d.ts.map +0 -1
  332. package/dist/autophase/phase-graph-builder.d.ts.map +0 -1
  333. package/dist/autophase/phase-orchestrator.d.ts.map +0 -1
  334. package/dist/autophase/phase-store.d.ts.map +0 -1
  335. package/dist/autophase/types.d.ts.map +0 -1
  336. /package/dist/{autophase → goal}/checkpoint.d.ts +0 -0
  337. /package/dist/{autophase → goal}/phase-graph-builder.d.ts +0 -0
  338. /package/dist/{autophase → goal}/phase-store.d.ts +0 -0
  339. /package/instructions/{autophase → goal}/phase-planner.md +0 -0
@@ -9,6 +9,15 @@ export interface MessageRepairResult {
9
9
  messages: Message[];
10
10
  report: MessageRepairReport;
11
11
  }
12
+ /**
13
+ * Whether message content carries anything that must survive in conversation
14
+ * state and session replay.
15
+ *
16
+ * Empty text blocks are common when a stream is interrupted before producing
17
+ * output. Tool calls, images, tool results, and signed thinking blocks remain
18
+ * meaningful even when they do not contain visible assistant text.
19
+ */
20
+ export declare function hasMeaningfulContent(content: Message['content']): boolean;
12
21
  /**
13
22
  * Repair provider-level tool-call adjacency invariants.
14
23
  *
@@ -1 +1 @@
1
- {"version":3,"file":"message-invariants.d.ts","sourceRoot":"","sources":["../../src/utils/message-invariants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,mBAAmB,CAyD/E"}
1
+ {"version":3,"file":"message-invariants.d.ts","sourceRoot":"","sources":["../../src/utils/message-invariants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAUzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,mBAAmB,CAyD/E"}
@@ -7,7 +7,7 @@ export declare function safeParse<T = unknown>(input: string, maxBytes?: number)
7
7
  export declare function safeStringify(value: unknown, pretty?: boolean): string;
8
8
  /**
9
9
  * Attempt to parse JSON5-style input and return a valid JSON string.
10
- * Handles trailing commas, single-line comments, and unquoted keys
10
+ * Handles trailing commas, line/block comments, and unquoted keys
11
11
  * that are common in provider output.
12
12
  *
13
13
  * Returns the sanitized string if it parses successfully as JSON,
@@ -1 +1 @@
1
- {"version":3,"file":"safe-json.d.ts","sourceRoot":"","sources":["../../src/utils/safe-json.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,wBAAgB,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAY,GAAG,eAAe,CAAC,CAAC,CAAC,CAY9F;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,UAAQ,GAAG,MAAM,CAoBpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA0B3D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYxD"}
1
+ {"version":3,"file":"safe-json.d.ts","sourceRoot":"","sources":["../../src/utils/safe-json.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,wBAAgB,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAY,GAAG,eAAe,CAAC,CAAC,CAAC,CAY9F;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,UAAQ,GAAG,MAAM,CAoBpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAuB3D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYxD"}
@@ -130,4 +130,283 @@ export declare function writeOut(s: string, stream?: NodeJS.WriteStream): boolea
130
130
  * swap the destination for the entire process in one place.
131
131
  */
132
132
  export declare function writeErr(s: string, stream?: NodeJS.WriteStream): boolean;
133
+ /**
134
+ * Color depth the terminal can render.
135
+ *
136
+ * 0 = no color (dumb, redirected, `TERM=dumb`)
137
+ * 1 = 16 colors (basic ANSI)
138
+ * 2 = 256 colors (ANSI 256 + bright variants)
139
+ * 3 = 16.7M / 24-bit truecolor
140
+ */
141
+ export type ColorDepth = 0 | 1 | 2 | 3;
142
+ /**
143
+ * Mouse tracking protocol the terminal speaks.
144
+ *
145
+ * 'none' — no mouse reporting
146
+ * 'x10' — basic button press/release, capped at 223 columns
147
+ * 'urxvt'— URXVT extension, supports >223 cols
148
+ * 'sgr' — SGR extended mode, modern standard, no column cap
149
+ */
150
+ export type MouseProtocol = 'none' | 'x10' | 'urxvt' | 'sgr';
151
+ /**
152
+ * A snapshot of the terminal's capabilities and identity, computed once at
153
+ * startup. Call {@link detectTerminal} once and pass the result through your
154
+ * app — never re-detect mid-session.
155
+ *
156
+ * Query once → adapt once. Re-querying on every render is wrong because
157
+ * `$TERM` is static for the process lifetime and stdout.isTTY can only go
158
+ * from true→false (never the reverse), so a mid-session change means the
159
+ * process was started in a terminal and then something went wrong.
160
+ */
161
+ export interface TerminalCapability {
162
+ /** True when both stdin and stdout are attached to a terminal. */
163
+ isRealTTY: boolean;
164
+ /**
165
+ * Whether the terminal speaks color.
166
+ *
167
+ * Uses the industry-standard precedence:
168
+ * `FORCE_COLOR=0` → 0 (disabled)
169
+ * `FORCE_COLOR` → 3 (force truecolor)
170
+ * `NO_COLOR=…` → 0 (opted out)
171
+ * `COLORTERM=truecolor|24bit` → 3
172
+ * `TERM=…truecolor|24bit` → 3 (some emulators advertise it)
173
+ * `TERM=…256color` → 2
174
+ * fallback → 1
175
+ *
176
+ * Note: `TERM=dumb` always produces 0 even if `COLORTERM=truecolor` is set —
177
+ * `dumb` terminals are non-interactive by definition.
178
+ */
179
+ colorDepth: ColorDepth;
180
+ /**
181
+ * Whether `stdout` can be written to. Determined once at startup from
182
+ * `stdout?.isTTY ?? false`. Even when `isRealTTY` is true, `stdout` may be
183
+ * writable=false (e.g. the terminal was closed mid-session).
184
+ */
185
+ stdoutWritable: boolean;
186
+ /**
187
+ * Best mouse protocol the terminal speaks. Progressive enhancement:
188
+ * attempt SGR first, fall back to URXVT, then X10, then 'none'.
189
+ *
190
+ * The caller (typically the App component) decides whether to enable
191
+ * tracking at all — this only reports what the terminal CAN understand.
192
+ */
193
+ mouseProtocol: MouseProtocol;
194
+ /**
195
+ * Whether the terminal title can be set via OSC 0 / OSC 2.
196
+ * True when stdout is a TTY and `$TERM` is not `dumb`.
197
+ */
198
+ canSetTitle: boolean;
199
+ /**
200
+ * Whether the terminal understands the tmux DCS passthrough prefix.
201
+ * Detected by seeing `$TERM=tmux*`. When true, escape sequences should be
202
+ * wrapped: `\x1bPtmux;\x1b${seq}\x1b\\`.
203
+ */
204
+ isTmux: boolean;
205
+ /**
206
+ * Whether the terminal is on Windows using the legacy conhost backend
207
+ * (cmd.exe, PowerShell non-ConPTY) rather than ConPTY (Windows Terminal,
208
+ * VS Code Integrated Terminal). Used to apply Windows-specific raw-mode
209
+ * handoff logic.
210
+ *
211
+ * Detected by: platform === 'win32' AND `!process.stdout.getColorDepth?.()`
212
+ * (ConPTY exposes color depth; conhost does not). Also false on non-Windows.
213
+ */
214
+ isWindowsConhost: boolean;
215
+ }
216
+ /**
217
+ * Detect the terminal's capabilities and identity at startup.
218
+ *
219
+ * Call once, early in process boot, before any event-loop async has had a
220
+ * chance to corrupt the read of `process.stdout.isTTY`. Store the result and
221
+ * pass it through the app — do NOT call this on every render.
222
+ *
223
+ * All `env` lookups default gracefully to safe values when the env var is
224
+ * absent or empty, so the return value is deterministic regardless of what
225
+ * the host's environment looks like.
226
+ */
227
+ export declare function detectTerminal(opts?: {
228
+ stdin?: NodeJS.ReadStream | null;
229
+ stdout?: NodeJS.WriteStream | null;
230
+ env?: typeof process.env;
231
+ }): TerminalCapability;
232
+ /**
233
+ * Lifecycle owner for the TTY stdin raw-mode state machine.
234
+ *
235
+ * Raw mode is the most dangerous primitive in TUI code. Getting it wrong leaves
236
+ * the user's terminal in a broken state (line-buffered, no echo) that requires
237
+ * closing and reopening the terminal to recover. This class enforces a strict
238
+ * acquire → hold → release lifecycle:
239
+ *
240
+ * - `acquire()` may be called only once (idempotent — subsequent calls no-op).
241
+ * - `release()` restores the previous mode exactly once.
242
+ * - `release()` is called automatically on process `exit` and `beforeExit`.
243
+ * - Any signal handler (SIGINT, SIGTERM, SIGHUP) that calls `release()` clears
244
+ * its own registration so double-signals don't double-restore.
245
+ *
246
+ * Use this instead of calling `setRawMode()` directly at every call site. The
247
+ * single instance lives at module scope in `run-tui.ts`; components that need
248
+ * to signal "TUI is shutting down" call `terminalLifecycle.requestExit()` rather
249
+ * than calling `release()` directly.
250
+ */
251
+ export declare class TerminalLifecycle {
252
+ private _active;
253
+ /**
254
+ * The stdin stream we took raw mode on. Set by `acquire()`; undefined before
255
+ * first call. Used by `release()` and by the ConPTY race-closer in
256
+ * `acquire()`.
257
+ */
258
+ private _stdin;
259
+ /**
260
+ * The `isRaw` snapshot captured before the first `acquire()` call, so
261
+ * `release()` restores to the pre-TUI state rather than blindly disabling
262
+ * raw mode. Null when `acquire()` has never been called.
263
+ */
264
+ private _wasRaw;
265
+ /**
266
+ * Request the process to exit. Set the flag, trigger any registered
267
+ * `onRequestExit` callback (typically Ink's `unmount()`), and arm a
268
+ * deadline timer. When the timer fires the process is hard-exited.
269
+ *
270
+ * Safe to call multiple times: subsequent calls no-op after the first.
271
+ */
272
+ requestExit: (exitCode?: number) => void;
273
+ /**
274
+ * Callback invoked when `requestExit` is called. Registered by the Ink
275
+ * mount point so unmount() runs before the deadline timer fires.
276
+ */
277
+ onRequestExit: (() => void | Promise<void>) | null;
278
+ constructor();
279
+ /** True while raw mode is held. */
280
+ get active(): boolean;
281
+ /**
282
+ * Acquire raw mode on `stdin`. Idempotent — calling twice is safe; only the
283
+ * first call has any effect.
284
+ *
285
+ * On Windows ConPTY, calls `setRawMode` twice: once immediately, then again
286
+ * after the next event-loop tick. This closes the ConPTY race where
287
+ * `readline`'s cleanup (registered before this class is constructed) can
288
+ * restore the original cooked mode after we set raw mode but before Ink's
289
+ * render loop takes over the stdin fd. The double-call ensures the last
290
+ * writer wins.
291
+ *
292
+ * @param stdin - The stdin stream (defaults to `process.stdin`).
293
+ * @returns `true` if raw mode was acquired; `false` if stdin is not a TTY
294
+ * or already shut down.
295
+ */
296
+ acquire(stdin?: NodeJS.ReadStream): boolean;
297
+ /**
298
+ * Release raw mode and restore the terminal to the state it was in before
299
+ * `acquire()` was called. Idempotent — subsequent calls are no-ops.
300
+ *
301
+ * Call this on: SIGINT, SIGTERM, SIGHUP, SIGBREAK, and `process.exit`.
302
+ *
303
+ * ⚠ **Windows caveat**: `setRawMode(false)` on ConPTY restores the original
304
+ * console mode captured when the process started — not the mode captured by
305
+ * `acquire()`. On ConPTY, the original mode was already raw (ConPTY starts
306
+ * raw), so this call is typically a no-op on Windows Terminal. On conhost.exe
307
+ * it may restore cooked mode, which is correct for that backend.
308
+ */
309
+ release(): void;
310
+ /**
311
+ * Synchronously reset all terminal state written by the TUI layer:
312
+ * raw mode, SGR attributes, cursor visibility, and mouse tracking.
313
+ *
314
+ * Intended for the final `process.on('exit')` handler where async is
315
+ * impossible. Uses `\x1b[0m` (SGR reset), `\x1b[?25h` (cursor show),
316
+ * and `\x1b[?9l` (mouse off) — all safe to emit even if the terminal does
317
+ * not understand them (unknown CSI sequences are silently ignored).
318
+ *
319
+ * Safe to call multiple times from multiple exit paths because each write
320
+ * is a constant-time synchronous stream write.
321
+ *
322
+ * @param stdout - Stream to reset (defaults to `process.stdout`).
323
+ */
324
+ reset(stdout?: NodeJS.WriteStream): void;
325
+ }
326
+ /**
327
+ * Result of emitting an escape sequence. Distinguishes the three distinct
328
+ * failure modes so callers can degrade gracefully.
329
+ */
330
+ export interface EscapeEmitResult {
331
+ /** `true` when the sequence was written to the stream. */
332
+ ok: boolean;
333
+ /**
334
+ * Human-readable reason when `ok` is `false`. One of:
335
+ * `'not_a_tty'` — stdout is not a terminal (pipe / redirect / CI)
336
+ * `'unwritable'` — stdout.write is missing or threw
337
+ * `'empty'` — `sequence` was the empty string
338
+ */
339
+ reason: 'not_a_tty' | 'unwritable' | 'empty';
340
+ }
341
+ /**
342
+ * A terminal escape sequence with its optional string terminator.
343
+ *
344
+ * OSC (title, color palette) sequences MUST be terminated with `BEL (\x07)`
345
+ * or `ST (\x1b\\)` or the terminal stays in command mode and corrupts
346
+ * subsequent output. CSI sequences (colors, cursor movement) are
347
+ * self-terminating and do not need a terminator byte.
348
+ */
349
+ export interface EscapeSequence {
350
+ /** The raw sequence, e.g. `\x1b[38;2;255;0;0m`. */
351
+ raw: string;
352
+ /**
353
+ * Optional terminator byte required by OSC/DCS families.
354
+ * `undefined` for CSI sequences; `\x07` (BEL) for OSC; `\x1b\\` (ST) for DCS.
355
+ */
356
+ terminator?: string;
357
+ }
358
+ /**
359
+ * Shared OSC/DCS terminator bytes.
360
+ *
361
+ * BEL (`\x07`) is understood by iTerm2, Konsole, mintty, foot, and
362
+ * Windows Terminal. ST (`\x1b\\`) is the strict DEC standard equivalent.
363
+ * Prefer BEL for compatibility; fall back to ST if the terminal's response
364
+ * to BEL is observed to be garbled.
365
+ */
366
+ export declare const ESCAPE_TERMINATOR: Readonly<{
367
+ BEL: "\u0007";
368
+ ST: "\u001B\\";
369
+ }>;
370
+ /**
371
+ * Emit a terminal escape sequence safely.
372
+ *
373
+ * Rules enforced:
374
+ * 1. Empty string → returns `ok: false, reason: 'empty'`, no write.
375
+ * 2. Not a TTY → returns `ok: false, reason: 'not_a_tty'`, no write.
376
+ * 3. Stream write throws → returns `ok: false, reason: 'unwritable'`.
377
+ * 4. OSC/DCS sequences MUST have a terminator byte (guarded assertion).
378
+ * A missing terminator on an OSC sequence corrupts output on terminals
379
+ * that don't understand the sequence — this function refuses to emit it.
380
+ *
381
+ * @param sequence - The sequence to emit. CSI sequences need no terminator.
382
+ * OSC/DCS sequences must carry `terminator: '\x07'` or `'\x1b\\'`.
383
+ * @param stdout - Stream to write to (defaults to `process.stdout`).
384
+ * @returns Result indicating success or the specific failure mode.
385
+ */
386
+ export declare function safeEmit(sequence: EscapeSequence | string, stdout?: NodeJS.WriteStream): EscapeEmitResult;
387
+ /**
388
+ * Build an OSC 0 / OSC 2 (window/tab title) sequence with a safe terminator.
389
+ *
390
+ * The terminator defaults to `BEL (\x07)` for broad terminal compatibility.
391
+ * Use `terminator: ESCAPE_TERMINATOR.ST` for stricter terminals that interpret
392
+ * BEL as a beep.
393
+ *
394
+ * @param title - The title string. Embedded BEL bytes are stripped.
395
+ * @param terminator - Defaults to `ESCAPE_TERMINATOR.BEL`.
396
+ */
397
+ export declare function buildTitleSequence(title: string, terminator?: string): EscapeSequence;
398
+ /**
399
+ * Build an SGR (Select Graphic Rendition) color/style sequence.
400
+ *
401
+ * @param codes - SGR parameter list, e.g. `[31]` (red foreground),
402
+ * `[1;32]` (bold green), `[38;2;255;128;0]` (truecolor orange).
403
+ */
404
+ export declare function buildSgrSequence(...codes: number[]): EscapeSequence;
405
+ /**
406
+ * Emit a title sequence. Convenience wrapper around `safeEmit` + `buildTitleSequence`.
407
+ *
408
+ * @param title - The title string.
409
+ * @param stdout - Target stream.
410
+ */
411
+ export declare function setTitle(title: string, stdout?: NodeJS.WriteStream): boolean;
133
412
  //# sourceMappingURL=term.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"term.d.ts","sourceRoot":"","sources":["../../src/utils/term.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,8EAA8E;AAC9E,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED,6EAA6E;AAC7E,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAM5D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CACtB,EAAE,EAAE,CAAC,IAAI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;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;EAG5B,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,cAAc,GAAG,MAAM,EACjC,MAAM,GAAE,MAAM,CAAC,WAA4B,GAC1C,gBAAgB,CA+ClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,UAAU,GAAE,MAA8B,GACzC,cAAc,CAKhB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,cAAc,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,MAAM,CAAC,WAA4B,GAC1C,OAAO,CAET"}
@@ -23,6 +23,15 @@ export interface CompactWireToolDefinition {
23
23
  * largest repeated cost in provider tool declarations.
24
24
  */
25
25
  export declare function compactToolDefinitionForWire(tool: ToolWireDefinitionLike, opts?: CompactToolDefinitionForWireOptions): CompactWireToolDefinition;
26
+ /**
27
+ * Tool inputs are always JSON objects, but dynamically supplied MCP/plugin
28
+ * schemas sometimes express that object as a top-level oneOf/anyOf/allOf.
29
+ * Anthropic-family endpoints reject those combinators at the input_schema
30
+ * root (including when reached through an OpenAI-compatible gateway such as
31
+ * OmniRoute). Keep nested combinators intact and flatten only the root.
32
+ * Runtime validation still uses the tool's original schema.
33
+ */
34
+ export declare function normalizeTopLevelToolSchema(schema: Record<string, unknown>): Record<string, unknown>;
26
35
  export declare function compactSchemaDescriptions(schema: unknown, maxDescriptionChars?: number): Record<string, unknown>;
27
36
  export declare function compactDescription(text: string, maxChars: number): string;
28
37
  export declare function findSemanticBoundary(text: string, limit: number): number;
@@ -1 +1 @@
1
- {"version":3,"file":"tool-wire-compact.d.ts","sourceRoot":"","sources":["../../src/utils/tool-wire-compact.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,mCAAmC;IAClD,yCAAyC;IACzC,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,uDAAuD;IACvD,yBAAyB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAOD;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,sBAAsB,EAC5B,IAAI,GAAE,mCAAwC,GAC7C,yBAAyB,CAwB3B;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,mBAAmB,SAA+B,GACjD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGzB;AAmBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CASzE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAaxE"}
1
+ {"version":3,"file":"tool-wire-compact.d.ts","sourceRoot":"","sources":["../../src/utils/tool-wire-compact.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,mCAAmC;IAClD,yCAAyC;IACzC,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,uDAAuD;IACvD,yBAAyB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAOD;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,sBAAsB,EAC5B,IAAI,GAAE,mCAAwC,GAC7C,yBAAyB,CA0B3B;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyCzB;AAQD,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,mBAAmB,SAA+B,GACjD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGzB;AAmBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CASzE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAaxE"}
@@ -21,8 +21,18 @@ export interface WstackPaths {
21
21
  * without rewriting callers.
22
22
  */
23
23
  configDir: string;
24
- /** ~/.wrongstack/config.json */
24
+ /** ~/.wrongstack/config.json — bootstrap config (activeProfile + version). */
25
25
  globalConfig: string;
26
+ /**
27
+ * ~/.wrongstack/profiles — directory containing per-profile configs.
28
+ * Each profile has its own subdirectory with a config.json.
29
+ */
30
+ profilesDir: string;
31
+ /**
32
+ * Resolve the config path for a named profile.
33
+ * Returns ~/.wrongstack/profiles/<name>/config.json.
34
+ */
35
+ profileConfig: (name: string) => string;
26
36
  /** ~/.wrongstack/.key — 32 random bytes, mode 0600, AES-GCM key for the secret vault. */
27
37
  secretsKey: string;
28
38
  /** ~/.wrongstack/memory.md — user-global memory. */
@@ -100,7 +110,7 @@ export interface WstackPaths {
100
110
  projectSddSession: string;
101
111
  /** ~/.wrongstack/projects/<hash>/plan.json — plan persistence */
102
112
  projectPlan: string;
103
- /** ~/.wrongstack/projects/<hash>/autophase — AutoPhase phase-graph JSON files */
113
+ /** ~/.wrongstack/projects/<hash>/autophase — Goal phase-graph JSON files (dir name kept for backward compat) */
104
114
  projectAutophase: string;
105
115
  /** ~/.wrongstack/projects/<hash>/sdd-boards — live SDD board snapshots + JSONL event logs */
106
116
  projectSddBoards: string;
@@ -1 +1 @@
1
- {"version":3,"file":"wstack-paths.d.ts","sourceRoot":"","sources":["../../src/utils/wstack-paths.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAEH,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,yFAAyF;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,2GAA2G;IAC3G,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kEAAkE;IAClE,gBAAgB,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,WAAW,EAAE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' | 'active' | 'committing' | 'merging'
10
10
  export interface WorktreeHandle {
11
11
  /** Stable id (== slug). Used as the event `handleId`. */
12
12
  id: string;
13
- /** Caller-supplied owner (a phase id in AutoPhase). */
13
+ /** Caller-supplied owner (a phase id in Goal). */
14
14
  ownerId: string;
15
15
  /** Human label for the owner (phase name). */
16
16
  ownerLabel: string;
@@ -1 +1 @@
1
- {"version":3,"file":"worktree-manager.d.ts","sourceRoot":"","sources":["../../src/worktree/worktree-manager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAIpD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,QAAQ,GACR,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,cAAc,GACd,QAAQ,CAAC;AAEb,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,WAAW,YAAY;IAC3B,gEAAgE;IAChE,QAAQ,CAA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AAQ;YAgBF,YAAY;IAkB1B;;;;;;;OAOG;YACW,YAAY;YAYZ,aAAa;IAQ3B,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,IAAI;IAWZ,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,IAAI;IAaZ,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,UAAU;CAyBnB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAO3D;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAMrE"}
@@ -0,0 +1,113 @@
1
+ You are the iOS assistant. Your job is Apple-platform app development:
2
+ design and ship Swift code that compiles against the latest Apple SDKs,
3
+ runs correctly on iOS/iPadOS/tvOS/watchOS/visionOS/macOS, and meets
4
+ App Store and privacy requirements.
5
+
6
+ Anchor toolchain (baseline, verified against Apple's Xcode 26 release
7
+ notes — consult your installed Xcode for exact patch versions such as
8
+ 26.6 / Swift 6.3 / 26.5 SDKs):
9
+ - Xcode 26 with Swift 6.2 and the iOS 26, iPadOS 26, tvOS 26, watchOS 26,
10
+ macOS Tahoe 26, and visionOS 26 SDKs as the major line this persona
11
+ is written against.
12
+ - Requires a Mac running macOS Sequoia 15.6 or later.
13
+ - Swift 6.2's "Approachable Concurrency" changes default isolation
14
+ rather than weakening safety: top-level code runs on the main actor
15
+ by default, `async` functions inherit the caller's isolation unless
16
+ explicitly marked `@concurrent`, and most `Sendable` annotations can
17
+ be inferred. Compile-time data-race safety is preserved. Use it when
18
+ the new defaults fit your design; don't assume it in code that must
19
+ build with Swift 6.0/6.1 toolchains.
20
+
21
+ Talking to Xcode (use the current major-line versions of these tools;
22
+ consult `xcodebuild -version` and `xcrun --find` to confirm what's
23
+ installed before pinning specific CLI flags):
24
+ - `xcodebuild` for build / test / archive / clean / `-showBuildSettings`
25
+ / `-list` / scheme + destination selection; prefer `-resultBundlePath`
26
+ for machine-readable results and pair with `xcrun xcresulttool get ...
27
+ --legacy` or the modern JSON API for CI parsing
28
+ - `xcrun simctl` for the Simulator: `list`, `boot`, `shutdown`, `install`,
29
+ `launch`, `terminate`, `io`, `screenshot`, `log`, `privacy`, `push`,
30
+ `erase`; run on every supported OS for the project's deployment target
31
+ - `xcrun devicectl` for physical-device management (modern replacement
32
+ for `ios-deploy`): `list devices`, `device process launch`, `device
33
+ process terminate`, log streaming, and on-device debugging attach
34
+ - `xcrun xctrace` / `xcrun instruments` for profiling (Time Profiler,
35
+ Allocations, Leaks, SwiftUI template, Animation Hitches); prefer
36
+ `xctrace record --template ...` for CI-friendly `.trace` bundles
37
+ - `xcrun preview` and Xcode Previews for SwiftUI iteration; treat
38
+ previews as a development tool, not a substitute for unit/UI tests
39
+ - `xcrun notarytool` and `xcrun stapler` for `Developer ID` /
40
+ `notary-service` workflows when distributing outside the App Store
41
+ - Swift Package Manager (`swift build`, `swift test`, `swift package`)
42
+ for packages and mixed Xcode+SPM projects; keep `Package.swift` tools
43
+ version aligned with the project's Swift compiler version
44
+ - Readability wrappers (`xcbeautify`, `xcpretty`) when you need
45
+ human-friendly CI logs; never let them hide build failures — always
46
+ inspect the underlying `xcodebuild` exit code
47
+ - Pin a single source of truth for toolchain versions: a `.xcode-version`
48
+ file (Xcode 26+) or `bundler`-style lockfile; document the minimum
49
+ Xcode and macOS required to build in the README, not in prose that
50
+ can drift out of sync with the toolchain
51
+
52
+ Scope:
53
+ - Build Swift features across UIKit, SwiftUI, AppKit, and platform
54
+ frameworks (Foundation, SwiftData, Core Data, Combine, AVFoundation,
55
+ CoreLocation, MapKit, WidgetKit, ActivityKit, StoreKit, etc.)
56
+ - Wire persistence, networking, concurrency, and platform integrations
57
+ (push, Sign in with Apple, in-app purchase, App Intents, Share/Activity)
58
+ - Implement accessibility, localization, and privacy-correct behaviors
59
+ by default — not as a later polish pass
60
+ - Handle deployment targets, capability entitlements, and App Store /
61
+ TestFlight submission requirements
62
+
63
+ Input format you accept:
64
+ { "task": "view | feature | persistence | integration | build | ship",
65
+ "platform": "ios | ipados | tvos | watchos | visionos | macos",
66
+ "minDeploymentTarget": "<e.g. iOS 17.0>",
67
+ "framework": "swiftui | uikit | appkit | mixed",
68
+ "feature": "<what to build or change>" }
69
+
70
+ Output: Markdown iOS report:
71
+ - ## Implementation (types/Views/ViewModels + responsibilities)
72
+ - ## Platform/SDK notes (deployment target, entitlements, capabilities)
73
+ - ## Concurrency/State (isolation, actor boundaries, observation model)
74
+ - ## Privacy/Accessibility (purpose strings, ATT, VoiceOver, Dynamic Type)
75
+ - ## Verification (build with Xcode 26, tests run on simulator/device)
76
+
77
+ Working rules:
78
+ - Default to Swift 6 language mode with strict concurrency; isolate
79
+ mutable shared state in actors, never in globals
80
+ - Use `async`/`await` and structured concurrency (TaskGroup,
81
+ AsyncSequence); cancel long-running work and propagate cancellation
82
+ - Prefer SwiftUI's `@Observable` macro on focused reference-type view
83
+ models; reach for plain structs only when observation and identity
84
+ are not needed, and fall back to `ObservableObject` only when
85
+ targeting pre-iOS-17 deployment
86
+ - Keep View bodies pure and side-effect-free; do I/O in the model layer
87
+ or in explicit `.task` / `.onChange` modifiers
88
+ - Match the deployment target honestly — don't call iOS 26 APIs on an
89
+ iOS 17 target; use `if #available(iOS 26, *)` or `@available`
90
+ attributes for newer features
91
+ - Use SwiftData for new persistence unless the project is on Core Data;
92
+ `@Model` types are reference-type classes — design them for controlled
93
+ mutation, stable identity, and explicit relationship semantics, and
94
+ isolate the `ModelContainer`/`ModelContext` per actor or per scene
95
+ - Write tests with Swift Testing (`@Test`, parameterized tests, traits)
96
+ alongside existing XCTest; do not mix assertion styles in one file
97
+ - Accessibility is not optional: provide VoiceOver labels, support
98
+ Dynamic Type (avoid fixed font sizes), honor Reduce Motion and
99
+ Increase Contrast, and verify focus order on real devices
100
+ - Privacy: declare Info.plist purpose strings for every sensitive API,
101
+ respect App Tracking Transparency, ship a Privacy Manifest
102
+ (`PrivacyInfo.xcprivacy`), and minimize on-device data collection
103
+ - For App Intents, App Shortcuts, and widgets, follow the
104
+ process-isolated extension model and avoid sharing state via globals
105
+ - Don't disable concurrency warnings to make code compile — fix the
106
+ isolation. Under Swift 6.2's Approachable Concurrency, prefer the
107
+ inferred defaults (main-actor top-level code, caller-context `async`)
108
+ and reach for explicit `@concurrent` only for work that genuinely
109
+ needs to run off the current isolation. Safety checks stay on;
110
+ "Approachable" means less annotation, not looser guarantees
111
+ - Build with Xcode 26 and run the test suite on a real simulator
112
+ before claiming a change is done; a green `xcodebuild` is the
113
+ minimum bar, not the goal
@@ -17,7 +17,7 @@ Output: Markdown result set:
17
17
  - ## Not Found (terms searched with zero hits, so the caller can rephrase)
18
18
 
19
19
  Working rules:
20
- - Read-only; rely on grep/glob/search, never edit
20
+ - Read-only; prefer live `codebase-search` before broad grep/glob/tree exploration. If it reports no index, tell the caller to run `codebase-index`, then use the best read-only fallback; never edit or build the index yourself
21
21
  - Always rank by relevance and explain the ranking in one clause
22
22
  - Distinguish definition sites from usage sites explicitly
23
23
  - Report search terms that returned nothing so the caller can refine