@jmanuelcorral/openteam 0.2.2 → 0.9.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 (306) hide show
  1. package/.opencode/command/openteam.md +2 -1
  2. package/.opencode/openteam.example.json +27 -8
  3. package/AGENTS.md +5 -2
  4. package/README.es.md +155 -59
  5. package/README.md +418 -62
  6. package/dist/capabilities/types.d.ts +3 -3
  7. package/dist/capabilities/types.d.ts.map +1 -1
  8. package/dist/classifier/localClassifier.d.ts +0 -2
  9. package/dist/classifier/localClassifier.d.ts.map +1 -1
  10. package/dist/cli/consoleServe.d.ts +21 -1
  11. package/dist/cli/consoleServe.d.ts.map +1 -1
  12. package/dist/cli/graphOperator.d.ts +22 -0
  13. package/dist/cli/graphOperator.d.ts.map +1 -0
  14. package/dist/cli/graphStatusSnapshot.d.ts +16 -0
  15. package/dist/cli/graphStatusSnapshot.d.ts.map +1 -0
  16. package/dist/cli/migrateAdapter.d.ts +12 -0
  17. package/dist/cli/migrateAdapter.d.ts.map +1 -0
  18. package/dist/cli/purgeAdapter.d.ts +10 -0
  19. package/dist/cli/purgeAdapter.d.ts.map +1 -0
  20. package/dist/cli/setupAdapters.d.ts.map +1 -1
  21. package/dist/cli.js +13394 -6121
  22. package/dist/commands/agents.d.ts +102 -2
  23. package/dist/commands/agents.d.ts.map +1 -1
  24. package/dist/commands/baseline.d.ts.map +1 -1
  25. package/dist/commands/clearCache.d.ts +23 -0
  26. package/dist/commands/clearCache.d.ts.map +1 -0
  27. package/dist/commands/dispatch.d.ts +196 -4
  28. package/dist/commands/dispatch.d.ts.map +1 -1
  29. package/dist/commands/doctor.d.ts +40 -0
  30. package/dist/commands/doctor.d.ts.map +1 -1
  31. package/dist/commands/frontierCatalog.d.ts +8 -14
  32. package/dist/commands/frontierCatalog.d.ts.map +1 -1
  33. package/dist/commands/graph.d.ts +0 -27
  34. package/dist/commands/graph.d.ts.map +1 -1
  35. package/dist/commands/local.d.ts.map +1 -1
  36. package/dist/commands/migrate.d.ts +11 -0
  37. package/dist/commands/migrate.d.ts.map +1 -0
  38. package/dist/commands/purge.d.ts +132 -0
  39. package/dist/commands/purge.d.ts.map +1 -0
  40. package/dist/commands/report.d.ts +1 -0
  41. package/dist/commands/report.d.ts.map +1 -1
  42. package/dist/commands/setup.d.ts +62 -5
  43. package/dist/commands/setup.d.ts.map +1 -1
  44. package/dist/config/errors.d.ts +10 -0
  45. package/dist/config/errors.d.ts.map +1 -0
  46. package/dist/config/legacyMigration.d.ts +82 -0
  47. package/dist/config/legacyMigration.d.ts.map +1 -0
  48. package/dist/config/legacyPaths.d.ts +105 -0
  49. package/dist/config/legacyPaths.d.ts.map +1 -0
  50. package/dist/config/load.d.ts.map +1 -1
  51. package/dist/config/opencode.d.ts +63 -0
  52. package/dist/config/opencode.d.ts.map +1 -0
  53. package/dist/config/persist.d.ts +8 -0
  54. package/dist/config/persist.d.ts.map +1 -1
  55. package/dist/config/resolve.d.ts +1 -1
  56. package/dist/config/resolve.d.ts.map +1 -1
  57. package/dist/config/runtime.d.ts +62 -0
  58. package/dist/config/runtime.d.ts.map +1 -0
  59. package/dist/config/schema.d.ts +142 -79
  60. package/dist/config/schema.d.ts.map +1 -1
  61. package/dist/console/assets.d.ts +2 -2
  62. package/dist/console/assets.d.ts.map +1 -1
  63. package/dist/console/configView.d.ts +74 -0
  64. package/dist/console/configView.d.ts.map +1 -0
  65. package/dist/console/opencodeClient.d.ts +8 -6
  66. package/dist/console/opencodeClient.d.ts.map +1 -1
  67. package/dist/console/protocol.d.ts +30 -6
  68. package/dist/console/protocol.d.ts.map +1 -1
  69. package/dist/console/render.d.ts +30 -1
  70. package/dist/console/render.d.ts.map +1 -1
  71. package/dist/console/types.d.ts +1 -1
  72. package/dist/console/types.d.ts.map +1 -1
  73. package/dist/context/redaction.d.ts +19 -19
  74. package/dist/context/redaction.d.ts.map +1 -1
  75. package/dist/context/schema.d.ts +26 -26
  76. package/dist/context/schema.d.ts.map +1 -1
  77. package/dist/context/types.d.ts +3 -3
  78. package/dist/contract/opencode.d.ts +39 -23
  79. package/dist/contract/opencode.d.ts.map +1 -1
  80. package/dist/graph/certificate.d.ts +37 -16
  81. package/dist/graph/certificate.d.ts.map +1 -1
  82. package/dist/graph/langgraph/adapter.d.ts +56 -0
  83. package/dist/graph/langgraph/adapter.d.ts.map +1 -0
  84. package/dist/graph/langgraph/certification.d.ts +64 -0
  85. package/dist/graph/langgraph/certification.d.ts.map +1 -0
  86. package/dist/graph/langgraph/checkpointReplay.d.ts +49 -0
  87. package/dist/graph/langgraph/checkpointReplay.d.ts.map +1 -0
  88. package/dist/graph/langgraph/checkpointer.d.ts +49 -0
  89. package/dist/graph/langgraph/checkpointer.d.ts.map +1 -0
  90. package/dist/graph/langgraph/engine.d.ts +34 -0
  91. package/dist/graph/langgraph/engine.d.ts.map +1 -0
  92. package/dist/graph/langgraph/graphModel.d.ts +37 -0
  93. package/dist/graph/langgraph/graphModel.d.ts.map +1 -0
  94. package/dist/graph/langgraph/reducer.d.ts +18 -0
  95. package/dist/graph/langgraph/reducer.d.ts.map +1 -0
  96. package/dist/graph/langgraph/retirement.d.ts +59 -0
  97. package/dist/graph/langgraph/retirement.d.ts.map +1 -0
  98. package/dist/graph/langgraph/types.d.ts +65 -0
  99. package/dist/graph/langgraph/types.d.ts.map +1 -0
  100. package/dist/graph/privacyPolicy.d.ts +7 -0
  101. package/dist/graph/privacyPolicy.d.ts.map +1 -1
  102. package/dist/graph/soakLedger.d.ts.map +1 -1
  103. package/dist/graph/types.d.ts +0 -2
  104. package/dist/graph/types.d.ts.map +1 -1
  105. package/dist/index.d.ts +46 -15
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +11083 -5009
  108. package/dist/local/cacheAdapter.d.ts +7 -0
  109. package/dist/local/cacheAdapter.d.ts.map +1 -0
  110. package/dist/local/concurrency.d.ts +52 -0
  111. package/dist/local/concurrency.d.ts.map +1 -0
  112. package/dist/local/embeddings.d.ts +10 -10
  113. package/dist/local/embeddings.d.ts.map +1 -1
  114. package/dist/local/extractClient.d.ts +13 -10
  115. package/dist/local/extractClient.d.ts.map +1 -1
  116. package/dist/local/lemonade.d.ts +4 -0
  117. package/dist/local/lemonade.d.ts.map +1 -0
  118. package/dist/local/registry.d.ts +16 -0
  119. package/dist/local/registry.d.ts.map +1 -1
  120. package/dist/local/types.d.ts +1 -1
  121. package/dist/local/types.d.ts.map +1 -1
  122. package/dist/mcp/semanticRecall.d.ts +18 -1
  123. package/dist/mcp/semanticRecall.d.ts.map +1 -1
  124. package/dist/mcp/server.d.ts +41 -1
  125. package/dist/mcp/server.d.ts.map +1 -1
  126. package/dist/memory/embedText.d.ts +4 -0
  127. package/dist/memory/embedText.d.ts.map +1 -0
  128. package/dist/memory/extract.d.ts +33 -18
  129. package/dist/memory/extract.d.ts.map +1 -1
  130. package/dist/memory/fold.d.ts +3 -2
  131. package/dist/memory/fold.d.ts.map +1 -1
  132. package/dist/memory/index.d.ts +1 -0
  133. package/dist/memory/index.d.ts.map +1 -1
  134. package/dist/memory/inject.d.ts.map +1 -1
  135. package/dist/memory/log.d.ts +15 -4
  136. package/dist/memory/log.d.ts.map +1 -1
  137. package/dist/memory/merge.d.ts +18 -1
  138. package/dist/memory/merge.d.ts.map +1 -1
  139. package/dist/memory/traverse.d.ts +80 -0
  140. package/dist/memory/traverse.d.ts.map +1 -0
  141. package/dist/memory/types.d.ts +53 -7
  142. package/dist/memory/types.d.ts.map +1 -1
  143. package/dist/messages/commands.d.ts +84 -0
  144. package/dist/messages/commands.d.ts.map +1 -0
  145. package/dist/messages/index.d.ts +46 -0
  146. package/dist/messages/index.d.ts.map +1 -0
  147. package/dist/opencodeArtifacts/index.d.ts +33 -0
  148. package/dist/opencodeArtifacts/index.d.ts.map +1 -0
  149. package/dist/opencodeArtifacts/orchestratorAgent.d.ts +29 -0
  150. package/dist/opencodeArtifacts/orchestratorAgent.d.ts.map +1 -0
  151. package/dist/opencodeArtifacts/slashCommand.d.ts +31 -0
  152. package/dist/opencodeArtifacts/slashCommand.d.ts.map +1 -0
  153. package/dist/orchestrator/coordinator.d.ts +152 -1
  154. package/dist/orchestrator/coordinator.d.ts.map +1 -1
  155. package/dist/orchestrator/graphCancellation.d.ts +40 -37
  156. package/dist/orchestrator/graphCancellation.d.ts.map +1 -1
  157. package/dist/orchestrator/graphEffects.d.ts +24 -24
  158. package/dist/orchestrator/graphEffects.d.ts.map +1 -1
  159. package/dist/orchestrator/graphFacade.d.ts +16 -16
  160. package/dist/orchestrator/graphFacade.d.ts.map +1 -1
  161. package/dist/orchestrator/graphIngress.d.ts +49 -45
  162. package/dist/orchestrator/graphIngress.d.ts.map +1 -1
  163. package/dist/orchestrator/graphReview.d.ts +24 -23
  164. package/dist/orchestrator/graphReview.d.ts.map +1 -1
  165. package/dist/orchestrator/graphRuntime.d.ts +27 -26
  166. package/dist/orchestrator/graphRuntime.d.ts.map +1 -1
  167. package/dist/orchestrator/graphShadow.d.ts +70 -69
  168. package/dist/orchestrator/graphShadow.d.ts.map +1 -1
  169. package/dist/orchestrator/opencodeSessionAdapter.d.ts +25 -25
  170. package/dist/orchestrator/opencodeSessionAdapter.d.ts.map +1 -1
  171. package/dist/orchestrator/permissions.d.ts.map +1 -1
  172. package/dist/orchestrator/ralphLoop.d.ts +57 -0
  173. package/dist/orchestrator/ralphLoop.d.ts.map +1 -0
  174. package/dist/orchestrator/roles.d.ts +50 -8
  175. package/dist/orchestrator/roles.d.ts.map +1 -1
  176. package/dist/orchestrator/roster.d.ts +103 -0
  177. package/dist/orchestrator/roster.d.ts.map +1 -0
  178. package/dist/orchestrator/rosterPersistence.d.ts +22 -0
  179. package/dist/orchestrator/rosterPersistence.d.ts.map +1 -0
  180. package/dist/orchestrator/runtimeSelection.d.ts +46 -0
  181. package/dist/orchestrator/runtimeSelection.d.ts.map +1 -0
  182. package/dist/orchestrator/sddCompiler.d.ts +34 -34
  183. package/dist/orchestrator/sddCompiler.d.ts.map +1 -1
  184. package/dist/orchestrator/sessionReconciler.d.ts +31 -29
  185. package/dist/orchestrator/sessionReconciler.d.ts.map +1 -1
  186. package/dist/orchestrator/shadowComparator.d.ts +23 -23
  187. package/dist/orchestrator/shadowComparator.d.ts.map +1 -1
  188. package/dist/orchestrator/subsessions.d.ts.map +1 -1
  189. package/dist/orchestrator/worktreeAdapter.d.ts +12 -12
  190. package/dist/orchestrator/worktreeAdapter.d.ts.map +1 -1
  191. package/dist/orchestrator/worktreeDispatch.d.ts +34 -34
  192. package/dist/orchestrator/worktreeDispatch.d.ts.map +1 -1
  193. package/dist/orchestrator/worktreeReconciler.d.ts +37 -36
  194. package/dist/orchestrator/worktreeReconciler.d.ts.map +1 -1
  195. package/dist/plugin/availability.d.ts.map +1 -1
  196. package/dist/plugin/capture.d.ts +12 -12
  197. package/dist/plugin/capture.d.ts.map +1 -1
  198. package/dist/plugin/commandTool.d.ts +1 -1
  199. package/dist/plugin/commandTool.d.ts.map +1 -1
  200. package/dist/plugin/graphShadowIngress.d.ts +50 -48
  201. package/dist/plugin/graphShadowIngress.d.ts.map +1 -1
  202. package/dist/plugin/graphTool.d.ts +25 -23
  203. package/dist/plugin/graphTool.d.ts.map +1 -1
  204. package/dist/plugin/hooks.d.ts +10 -10
  205. package/dist/plugin/hooks.d.ts.map +1 -1
  206. package/dist/plugin/legacyRunProducer.d.ts +22 -22
  207. package/dist/plugin/legacyRunProducer.d.ts.map +1 -1
  208. package/dist/plugin/memoryInject.d.ts +6 -6
  209. package/dist/plugin/memoryInject.d.ts.map +1 -1
  210. package/dist/plugin/memoryTool.d.ts +36 -0
  211. package/dist/plugin/memoryTool.d.ts.map +1 -0
  212. package/dist/plugin/orchestrateTool.d.ts +35 -2
  213. package/dist/plugin/orchestrateTool.d.ts.map +1 -1
  214. package/dist/plugin/reportRunSchema.d.ts +8 -8
  215. package/dist/plugin/reportRunSchema.d.ts.map +1 -1
  216. package/dist/plugin/sessionTracker.d.ts +15 -15
  217. package/dist/plugin/sessionTracker.d.ts.map +1 -1
  218. package/dist/plugin/shadowPipeline.d.ts +2 -1
  219. package/dist/plugin/shadowPipeline.d.ts.map +1 -1
  220. package/dist/plugin/soakObserver.d.ts +18 -11
  221. package/dist/plugin/soakObserver.d.ts.map +1 -1
  222. package/dist/plugin/toolcalls.d.ts +3 -3
  223. package/dist/router/chooseModel.d.ts.map +1 -1
  224. package/dist/router/frontierBaseline.d.ts +3 -3
  225. package/dist/router/modelSelection.d.ts +12 -4
  226. package/dist/router/modelSelection.d.ts.map +1 -1
  227. package/dist/router/types.d.ts +6 -1
  228. package/dist/router/types.d.ts.map +1 -1
  229. package/dist/storage/graph/snapshot.d.ts.map +1 -1
  230. package/dist/storage/graph/soakRecorder.d.ts +14 -1
  231. package/dist/storage/graph/soakRecorder.d.ts.map +1 -1
  232. package/dist/storage/graph/workspaceLease.d.ts +1 -1
  233. package/dist/storage/graph/workspaceLease.d.ts.map +1 -1
  234. package/dist/storage/graph/worktreeRegistry.d.ts +1 -1
  235. package/dist/storage/graph/worktreeRegistry.d.ts.map +1 -1
  236. package/dist/storage/httpStorageProvider.d.ts +2 -2
  237. package/dist/storage/index/bunSqlite.d.ts +1 -0
  238. package/dist/storage/index/bunSqlite.d.ts.map +1 -1
  239. package/dist/storage/index/memoryConsolidate.d.ts +2 -0
  240. package/dist/storage/index/memoryConsolidate.d.ts.map +1 -1
  241. package/dist/storage/index/memoryEmbeddings.d.ts +51 -0
  242. package/dist/storage/index/memoryEmbeddings.d.ts.map +1 -0
  243. package/dist/storage/index/memoryIndex.d.ts +36 -4
  244. package/dist/storage/index/memoryIndex.d.ts.map +1 -1
  245. package/dist/storage/index/memoryRecall.d.ts +1 -1
  246. package/dist/storage/index/memoryRecall.d.ts.map +1 -1
  247. package/dist/storage/index/memoryRuntime.d.ts +2 -0
  248. package/dist/storage/index/memoryRuntime.d.ts.map +1 -1
  249. package/dist/storage/index/sqliteIndex.d.ts +18 -1
  250. package/dist/storage/index/sqliteIndex.d.ts.map +1 -1
  251. package/dist/storage/path.d.ts.map +1 -1
  252. package/dist/telemetry/aggregate.d.ts +12 -12
  253. package/dist/telemetry/aggregate.d.ts.map +1 -1
  254. package/dist/telemetry/cost.d.ts.map +1 -1
  255. package/dist/telemetry/decisions.d.ts +11 -11
  256. package/dist/telemetry/decisions.d.ts.map +1 -1
  257. package/dist/telemetry/eventLog.d.ts +41 -25
  258. package/dist/telemetry/eventLog.d.ts.map +1 -1
  259. package/dist/telemetry/events.d.ts +44 -36
  260. package/dist/telemetry/events.d.ts.map +1 -1
  261. package/dist/telemetry/fanout.d.ts +18 -0
  262. package/dist/telemetry/fanout.d.ts.map +1 -0
  263. package/dist/telemetry/graphProjection.d.ts +12 -12
  264. package/dist/telemetry/graphProjection.d.ts.map +1 -1
  265. package/dist/telemetry/graphRuntimeHealth.d.ts +26 -26
  266. package/dist/telemetry/graphRuntimeHealth.d.ts.map +1 -1
  267. package/dist/telemetry/graphView.d.ts +20 -20
  268. package/dist/telemetry/graphView.d.ts.map +1 -1
  269. package/dist/telemetry/otel.d.ts +86 -0
  270. package/dist/telemetry/otel.d.ts.map +1 -0
  271. package/dist/telemetry/otelConfig.d.ts +128 -0
  272. package/dist/telemetry/otelConfig.d.ts.map +1 -0
  273. package/dist/telemetry/otelExporter.d.ts +7 -0
  274. package/dist/telemetry/otelExporter.d.ts.map +1 -0
  275. package/dist/telemetry/read.d.ts +18 -4
  276. package/dist/telemetry/read.d.ts.map +1 -1
  277. package/dist/telemetry/types.d.ts +3 -2
  278. package/dist/telemetry/types.d.ts.map +1 -1
  279. package/dist/web/configApi.d.ts +154 -0
  280. package/dist/web/configApi.d.ts.map +1 -0
  281. package/dist/web/configRoute.d.ts +57 -0
  282. package/dist/web/configRoute.d.ts.map +1 -0
  283. package/dist/web/console.d.ts +8 -0
  284. package/dist/web/console.d.ts.map +1 -1
  285. package/dist/web/paths.d.ts +4 -3
  286. package/dist/web/paths.d.ts.map +1 -1
  287. package/dist/web/server.d.ts +30 -1
  288. package/dist/web/server.d.ts.map +1 -1
  289. package/dist/web/start.d.ts +15 -0
  290. package/dist/web/start.d.ts.map +1 -1
  291. package/dist/web/storageRoute.d.ts +2 -2
  292. package/package.json +13 -7
  293. package/dist/cli/tunnel.d.ts +0 -89
  294. package/dist/cli/tunnel.d.ts.map +0 -1
  295. package/dist/commands/orchestratorAgent.d.ts +0 -30
  296. package/dist/commands/orchestratorAgent.d.ts.map +0 -1
  297. package/dist/commands/slashCommand.d.ts +0 -39
  298. package/dist/commands/slashCommand.d.ts.map +0 -1
  299. package/dist/orchestrator/ledger.d.ts +0 -28
  300. package/dist/orchestrator/ledger.d.ts.map +0 -1
  301. package/dist/storage/graph/importLegacy.d.ts +0 -62
  302. package/dist/storage/graph/importLegacy.d.ts.map +0 -1
  303. package/dist/storage/graph/migration.d.ts +0 -91
  304. package/dist/storage/graph/migration.d.ts.map +0 -1
  305. package/dist/storage/graph/projections.d.ts +0 -31
  306. package/dist/storage/graph/projections.d.ts.map +0 -1
@@ -0,0 +1,57 @@
1
+ import type { OpenTeamConfig } from "../config/schema";
2
+ import type { RoutingDecision, TaskSignals } from "../router/types";
3
+ import { type CoordinatorDeps, type RoleTaskResult } from "./coordinator";
4
+ /**
5
+ * W3 ralph loop (#174).
6
+ *
7
+ * Makes the guaranteed `ralph` role a real behaviour rather than an unreachable
8
+ * profile: a bounded iterate-until-done cycle. Each pass dispatches the `ralph`
9
+ * role through the real coordinator ({@link runRoleTask}), so the loop inherits
10
+ * two guarantees for free — the mandatory-local gate (#143), which refuses to run
11
+ * BEFORE the first iteration when no local runtime is reachable and never falls
12
+ * through to a frontier provider, and local-first routing, which keeps every
13
+ * iteration on a local runtime.
14
+ *
15
+ * This module is only loop CONTROL: model/runtime work is the injected coordinator
16
+ * deps, and the done-signal is an injected predicate. Deterministic given its
17
+ * ports — no clock, randomness or direct I/O.
18
+ */
19
+ /** Canonical roleID of the guaranteed ralph role. */
20
+ export declare const RALPH_ROLE_ID = "ralph";
21
+ /** Default iteration cap so the loop can never spin unbounded. */
22
+ export declare const DEFAULT_RALPH_MAX_ITERATIONS = 10;
23
+ export type RalphLoopInput = {
24
+ readonly task: TaskSignals;
25
+ readonly prompt: string;
26
+ readonly config: OpenTeamConfig;
27
+ readonly parentSessionID?: string;
28
+ /** Iteration cap; defaults to {@link DEFAULT_RALPH_MAX_ITERATIONS}. */
29
+ readonly maxIterations?: number;
30
+ };
31
+ /** Why the loop stopped: the done-signal fired, or the iteration cap was hit. */
32
+ export type RalphLoopTermination = "done" | "cap";
33
+ export type RalphLoopResult = {
34
+ readonly iterations: number;
35
+ readonly termination: RalphLoopTermination;
36
+ readonly decision: RoutingDecision | undefined;
37
+ readonly results: readonly RoleTaskResult[];
38
+ };
39
+ export type RalphLoopDeps = CoordinatorDeps & {
40
+ /**
41
+ * The done-signal predicate (#174). Reads the iteration's subsession result and
42
+ * decides whether the task is finished. Injected so the "fake runtime" that
43
+ * reports done/not-done stays outside the loop control under test.
44
+ */
45
+ readonly isDone: (result: RoleTaskResult) => boolean;
46
+ };
47
+ /**
48
+ * Runs the ralph loop (#174): dispatches the `ralph` role repeatedly until the
49
+ * injected done-signal fires or the iteration cap is reached.
50
+ *
51
+ * On the first pass, {@link runRoleTask} enforces the mandatory-local gate: when
52
+ * no local runtime is reachable it throws before any dispatch, so the loop fails
53
+ * before the first iteration and no model is contacted — the caller sees the
54
+ * thrown, actionable error.
55
+ */
56
+ export declare function runRalphLoop(input: RalphLoopInput, deps: RalphLoopDeps): Promise<RalphLoopResult>;
57
+ //# sourceMappingURL=ralphLoop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ralphLoop.d.ts","sourceRoot":"","sources":["../../src/orchestrator/ralphLoop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,cAAc,EAEpB,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;GAcG;AAEH,qDAAqD;AACrD,eAAO,MAAM,aAAa,UAAU,CAAC;AAErC,kEAAkE;AAClE,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,uEAAuE;IACvE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,KAAK,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC;CACtD,CAAC;AAeF;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,eAAe,CAAC,CA+B1B"}
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import type { CapabilityRequirement, ComplexityTier } from "../capabilities/types";
3
+ import type { LocalRuntimeId } from "../local/types";
3
4
  import type { ModelSelection, TaskSignals } from "../router/types";
4
5
  export type AgentRoleProfile = {
5
6
  roleID: string;
@@ -8,9 +9,34 @@ export type AgentRoleProfile = {
8
9
  minReasoningTier: 1 | 2 | 3 | 4 | 5;
9
10
  minCodeQualityTier: 1 | 2 | 3 | 4 | 5;
10
11
  needsToolCallingByDefault: boolean;
11
- preferredLocalModels: ModelSelection[];
12
12
  preferredFrontierModels: Array<ModelSelection | "auto">;
13
13
  localFirst: boolean;
14
+ /**
15
+ * Hard requirement that this role runs on a reachable LOCAL runtime (#143).
16
+ *
17
+ * This is a PROHIBITION, distinct from the `localFirst` PREFERENCE. `localFirst`
18
+ * only tilts routing toward local and still falls through to frontier when no
19
+ * local runtime is reachable (2026-08-26 ruling). `requiresLocalRuntime` refuses
20
+ * the request before dispatch when no local runtime is reachable — it never
21
+ * falls through to a frontier provider. Optional so existing roles keep today's
22
+ * behaviour; only bookkeeping/safety roles (scribe, ralph, guardian) set it `true`.
23
+ */
24
+ requiresLocalRuntime?: boolean;
25
+ /**
26
+ * Ordered preference list of LOCAL runtimes this role may draw on (#144).
27
+ *
28
+ * When set, dispatch walks the list in order and picks the FIRST runtime that
29
+ * is reachable; an unreachable runtime is skipped (failover). The chosen
30
+ * runtime is then honoured for the whole task — capacity is enforced on it and
31
+ * excess work queues rather than spilling to a less-preferred runtime. When
32
+ * `requiresLocalRuntime` is also set, the hard requirement is satisfied when
33
+ * ANY listed runtime is reachable; when none is, the role fails closed.
34
+ *
35
+ * Optional so existing roles keep today's behaviour: without a list, the role
36
+ * dispatches to whatever local model routing selected, with capacity enforced
37
+ * on that runtime.
38
+ */
39
+ localRuntimes?: LocalRuntimeId[];
14
40
  };
15
41
  export declare const AgentRoleProfileSchema: z.ZodObject<{
16
42
  roleID: z.ZodString;
@@ -24,17 +50,33 @@ export declare const AgentRoleProfileSchema: z.ZodObject<{
24
50
  minReasoningTier: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
25
51
  minCodeQualityTier: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
26
52
  needsToolCallingByDefault: z.ZodBoolean;
27
- preferredLocalModels: z.ZodArray<z.ZodObject<{
28
- providerID: z.ZodString;
29
- modelID: z.ZodString;
30
- }, z.core.$strip>>;
31
53
  preferredFrontierModels: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
32
54
  providerID: z.ZodString;
33
55
  modelID: z.ZodString;
34
- }, z.core.$strip>, z.ZodLiteral<"auto">]>>;
56
+ }, z.core.$strict>, z.ZodLiteral<"auto">]>>;
35
57
  localFirst: z.ZodBoolean;
36
- }, z.core.$strip>;
58
+ requiresLocalRuntime: z.ZodOptional<z.ZodBoolean>;
59
+ localRuntimes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
60
+ "foundry-local": "foundry-local";
61
+ lemonade: "lemonade";
62
+ lmstudio: "lmstudio";
63
+ ollama: "ollama";
64
+ }>>>;
65
+ }, z.core.$strict>;
37
66
  export declare const TEAM_ROLES: Record<string, AgentRoleProfile>;
38
- export declare function getRoleProfile(roleID: string): AgentRoleProfile | undefined;
67
+ export declare function getRoleProfile(roleID: string, configuredRoles?: Readonly<Record<string, AgentRoleProfile>>): AgentRoleProfile | undefined;
68
+ /**
69
+ * Synthesises a neutral, frontier-eligible fallback profile for a roleID that
70
+ * is not present in TEAM_ROLES. The roleID is passed through verbatim so the
71
+ * orchestrator dispatches the correct agent name to opencode, producing an
72
+ * accurate error ("agent Galadriel not found") rather than a misleading one
73
+ * ("agent scribe not found") when the agent does not exist in the workspace.
74
+ *
75
+ * Profile values mirror the majority of the team (yen/basher/reviewer):
76
+ * moderate tier with frontier escalation enabled and local-first routing, so
77
+ * the core local-first promise is preserved while unknown roles are never
78
+ * silently starved of frontier access.
79
+ */
80
+ export declare function synthesiseFallbackProfile(roleID: string): AgentRoleProfile;
39
81
  export declare function roleToRequirement(role: AgentRoleProfile, task: TaskSignals, tier?: ComplexityTier): CapabilityRequirement;
40
82
  //# sourceMappingURL=roles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/orchestrator/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,cAAc,CAAC;IAC5B,gBAAgB,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC,kBAAkB,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACtC,yBAAyB,EAAE,OAAO,CAAC;IACnC,oBAAoB,EAAE,cAAc,EAAE,CAAC;IACvC,uBAAuB,EAAE,KAAK,CAAC,cAAc,GAAG,MAAM,CAAC,CAAC;IACxD,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAeF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;iBAYjC,CAAC;AAGH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAgFvD,CAAC;AAEF,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAE3E;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,gBAAgB,EACtB,IAAI,EAAE,WAAW,EACjB,IAAI,CAAC,EAAE,cAAc,GACpB,qBAAqB,CAevB"}
1
+ {"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/orchestrator/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EA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AI,EAAE,WAAW,EACjB,IAAI,CAAC,EAAE,cAAc,GACpB,qBAAqB,CAevB"}
@@ -0,0 +1,103 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * W3 roster model (#171, #172).
4
+ *
5
+ * The roster is a STRUCTURED artifact, never free LLM prose: a chosen `universe`
6
+ * plus a list of `roleID` → `agentName` entries. The split (decision P6(a)) keeps
7
+ * routing keyed to the stable `roleID` (which resolves to a capability profile via
8
+ * {@link getRoleProfile}) while the themed `agentName` is only the dispatch alias
9
+ * opencode sees. Validating the artifact with Zod removes the silent-no-op failure
10
+ * class of a prose parser.
11
+ *
12
+ * This module is pure: no I/O, clock, or randomness. Generation takes an injected
13
+ * {@link RosterSource} port so the model call stays outside the decision core, and
14
+ * persistence lives in `rosterPersistence.ts`.
15
+ */
16
+ /** One cast member: a stable routing `roleID` bound to a themed dispatch alias. */
17
+ export declare const RosterEntrySchema: z.ZodObject<{
18
+ roleID: z.ZodString;
19
+ agentName: z.ZodString;
20
+ }, z.core.$strict>;
21
+ /** A structured roster: one universe shared by every entry. */
22
+ export declare const RosterSchema: z.ZodObject<{
23
+ universe: z.ZodString;
24
+ entries: z.ZodArray<z.ZodObject<{
25
+ roleID: z.ZodString;
26
+ agentName: z.ZodString;
27
+ }, z.core.$strict>>;
28
+ }, z.core.$strict>;
29
+ export type RosterEntry = z.infer<typeof RosterEntrySchema>;
30
+ export type Roster = z.infer<typeof RosterSchema>;
31
+ /**
32
+ * The four roles every roster must contain (#171). `orchestrator` is the primary
33
+ * agent itself and has no TEAM_ROLES profile; `guardian`/`scribe`/`ralph` are the
34
+ * bookkeeping/safety roles that carry `requiresLocalRuntime`. Security review,
35
+ * decision capture and the ralph loop can never be silently omitted from a team.
36
+ */
37
+ export declare const GUARANTEED_ROLE_IDS: readonly ["orchestrator", "guardian", "scribe", "ralph"];
38
+ export type GuaranteedRoleID = (typeof GUARANTEED_ROLE_IDS)[number];
39
+ /** Guaranteed roleIDs absent from a roster, in canonical order. */
40
+ export declare function missingGuaranteedRoles(roster: Roster): GuaranteedRoleID[];
41
+ /** Whether every guaranteed roleID is present in the roster. */
42
+ export declare function hasAllGuaranteedRoles(roster: Roster): boolean;
43
+ /**
44
+ * Enforces the guaranteed-role invariant (#171): re-adds any missing guaranteed
45
+ * role, binding its `agentName` to the canonical roleID so it dispatches to the
46
+ * standard agent. Returns the roster unchanged when nothing is missing. Pure.
47
+ */
48
+ export declare function enforceGuaranteedRoles(roster: Roster): Roster;
49
+ /** Draft roster a generator source emits before Zod validation. */
50
+ export type RosterDraft = {
51
+ universe: string;
52
+ entries: Array<{
53
+ roleID: string;
54
+ agentName: string;
55
+ }>;
56
+ };
57
+ /**
58
+ * Injected generation port (#172). Turns an initial prompt into a draft roster.
59
+ * In production this wraps a model call; tests pass a deterministic fake, so the
60
+ * generator's decision core never contacts a live LLM.
61
+ */
62
+ export type RosterSource = (prompt: string) => RosterDraft | Promise<RosterDraft>;
63
+ /**
64
+ * Generates a roster from the initial prompt (#172): runs the injected source,
65
+ * validates the draft with Zod (fail-closed on a malformed roster), then enforces
66
+ * the guaranteed roles (#171). The result is always a valid, guaranteed roster.
67
+ */
68
+ export declare function generateRoster(prompt: string, source: RosterSource): Promise<Roster>;
69
+ /**
70
+ * The dispatch target for a roleID: the themed `agentName` opencode dispatches to.
71
+ * `undefined` when the roleID is not in the roster. This is the roleID/agentName
72
+ * split at the dispatch boundary — routing uses the roleID, opencode uses this.
73
+ */
74
+ export declare function rosterDispatchTarget(roster: Roster, roleID: string): string | undefined;
75
+ /**
76
+ * Resolves the universe an entry belongs to (#172). The universe is recorded ONCE
77
+ * for the whole roster, so every entry shares the single roster universe; this
78
+ * throws if the entry is not part of the roster, so the invariant is checked, not
79
+ * assumed. Pure.
80
+ */
81
+ export declare function resolveEntryUniverse(roster: Roster, entry: RosterEntry): string;
82
+ /**
83
+ * Actionable, English failure for a guaranteed role whose agent file was never
84
+ * written (#153, Defect B). `openteam setup` currently writes only the primary
85
+ * agent, so `scribe`/`ralph`/`guardian` have no agent file to dispatch to. Names
86
+ * the missing agent and points at `openteam setup` rather than surfacing an opaque
87
+ * "agent not found" from opencode.
88
+ */
89
+ export declare function missingAgentFileMessage(agentName: string): string;
90
+ /**
91
+ * Fails closed BEFORE dispatch when a guaranteed role's agent file is absent
92
+ * (#153, Defect B). `agentFileExists` is an injected I/O port — the filesystem
93
+ * probe lives at the composition root, so this stays pure of I/O.
94
+ */
95
+ export declare function assertAgentFileForRole(agentName: string, agentFileExists: (agentName: string) => boolean | Promise<boolean>): Promise<void>;
96
+ /**
97
+ * Dispatches a guaranteed role only after asserting its agent file exists (#153).
98
+ * The agent-file guard runs BEFORE the `dispatch` callback, so a missing file
99
+ * surfaces the actionable error without ever contacting a model. `dispatch` is the
100
+ * real coordinator call the caller supplies.
101
+ */
102
+ export declare function dispatchGuaranteedRole<T>(agentName: string, agentFileExists: (agentName: string) => boolean | Promise<boolean>, dispatch: () => Promise<T>): Promise<T>;
103
+ //# sourceMappingURL=roster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roster.d.ts","sourceRoot":"","sources":["../../src/orchestrator/roster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;GAaG;AAEH,mFAAmF;AACnF,eAAO,MAAM,iBAAiB;;;kBAKnB,CAAC;AAEZ,+DAA+D;AAC/D,eAAO,MAAM,YAAY;;;;;;kBAKd,CAAC;AAEZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,YAC9B,cAAc,EACd,UAAU,EACV,QAAQ,EACR,OAAO,CACC,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,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SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EAClE,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACzB,OAAO,CAAC,CAAC,CAAC,CAGZ"}
@@ -0,0 +1,22 @@
1
+ import type { StorageProvider } from "../storage/provider";
2
+ import { type Roster } from "./roster";
3
+ /** Serialises a roster to the Markdown-with-JSON roster document. Pure. */
4
+ export declare function serializeRoster(roster: Roster): string;
5
+ /** Parses a roster document back into a validated {@link Roster}. Pure. */
6
+ export declare function parseRoster(text: string): Roster;
7
+ /** Writes the roster to the portable path; returns the path written. */
8
+ export declare function persistRoster(storage: StorageProvider, roster: Roster, path?: string): Promise<string>;
9
+ /** Loads and parses the persisted roster; `undefined` when none exists. */
10
+ export declare function loadRoster(storage: StorageProvider, path?: string): Promise<Roster | undefined>;
11
+ /** Outcome of {@link loadOrGenerateRoster}: the roster and whether it was rebuilt. */
12
+ export type RosterLoadResult = {
13
+ readonly roster: Roster;
14
+ readonly regenerated: boolean;
15
+ };
16
+ /**
17
+ * Reuses the persisted cast when present, generating and persisting one only when
18
+ * absent (#173). A second session with a roster on disk therefore never triggers
19
+ * re-generation — the cast stays stable across sessions.
20
+ */
21
+ export declare function loadOrGenerateRoster(storage: StorageProvider, generate: () => Roster | Promise<Roster>, path?: string): Promise<RosterLoadResult>;
22
+ //# sourceMappingURL=rosterPersistence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rosterPersistence.d.ts","sourceRoot":"","sources":["../../src/orchestrator/rosterPersistence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,UAAU,CAAC;AAmBrD,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAchD;AAED,wEAAwE;AACxE,wBAAsB,aAAa,CACjC,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,MAA6B,GAClC,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED,2EAA2E;AAC3E,wBAAsB,UAAU,CAC9B,OAAO,EAAE,eAAe,EACxB,IAAI,GAAE,MAA6B,GAClC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAM7B;AAED,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EACxC,IAAI,GAAE,MAA6B,GAClC,OAAO,CAAC,gBAAgB,CAAC,CAQ3B"}
@@ -0,0 +1,46 @@
1
+ import type { OpenTeamConfig } from "../config/schema";
2
+ import type { LocalRuntimeId } from "../local/types";
3
+ import type { ModelSelection, RoutingDecision } from "../router/types";
4
+ import type { AgentRoleProfile } from "./roles";
5
+ /**
6
+ * Result of resolving which local runtime a role's task dispatches to (#144).
7
+ *
8
+ * `runtimeId` is the runtime the task is PINNED to for its whole duration —
9
+ * capacity is enforced on it and it never changes once chosen. It is `undefined`
10
+ * when the dispatch is not to a configured local runtime (a frontier route, or a
11
+ * local model that maps to no configured runtime), in which case no per-runtime
12
+ * cap applies. `decision` is the routing decision to record and dispatch, with
13
+ * `selected` overridden to the chosen runtime's model when a preference list
14
+ * redirected the task.
15
+ */
16
+ export type RuntimeDispatchSelection = {
17
+ readonly runtimeId: LocalRuntimeId | undefined;
18
+ readonly decision: RoutingDecision;
19
+ };
20
+ /**
21
+ * Maps a selected local model back to the configured runtime that serves it, by
22
+ * matching the model against each runtime's `defaultModel`. Returns `undefined`
23
+ * when no configured runtime serves the model (e.g. a bare `router.localDefault`
24
+ * with no matching runtime entry, or a frontier model). Pure.
25
+ */
26
+ export declare function runtimeIdOfModel(model: ModelSelection, config: OpenTeamConfig): LocalRuntimeId | undefined;
27
+ /**
28
+ * Resolves the local runtime a role's task dispatches to, honouring an ordered
29
+ * preference list when the role declares one (#144). Pure and deterministic: no
30
+ * I/O, clock, or randomness — reachability arrives as data in `reachable`.
31
+ *
32
+ * Rules:
33
+ * - A non-local route (frontier/blocked) is returned unchanged with no runtime
34
+ * pin — per-runtime caps apply only to local dispatch.
35
+ * - When the role lists runtimes and a reachable set is provided, the FIRST
36
+ * listed runtime that is both reachable AND configured wins; the decision's
37
+ * model is overridden to that runtime's `defaultModel` so the task actually
38
+ * runs on the chosen runtime (failover + pinning). An unreachable runtime is
39
+ * skipped; capacity is NOT a selection input, so a saturated-but-reachable
40
+ * runtime is still chosen and its excess work queues rather than spilling.
41
+ * - Without a usable list (no list, no reachable set, or none of the listed
42
+ * runtimes reachable/configured) the router's own local pick stands and its
43
+ * runtime is resolved via `runtimeIdOfModel` so capacity is still enforced.
44
+ */
45
+ export declare function selectDispatchRuntime(role: AgentRoleProfile, decision: RoutingDecision, reachable: ReadonlySet<LocalRuntimeId> | undefined, config: OpenTeamConfig): RuntimeDispatchSelection;
46
+ //# sourceMappingURL=runtimeSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeSelection.d.ts","sourceRoot":"","sources":["../../src/orchestrator/runtimeSelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;CACpC,CAAC;AASF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,cAAc,GACrB,cAAc,GAAG,SAAS,CAI5B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,gBAAgB,EACtB,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,GAAG,SAAS,EAClD,MAAM,EAAE,cAAc,GACrB,wBAAwB,CA2B1B"}
@@ -1,72 +1,72 @@
1
1
  import { type GraphSpecV1 } from "../graph/schema";
2
2
  import type { TaskSignals } from "../router/types";
3
- /** Rol reviewer por defecto de la compilación SDD → grafo. */
3
+ /** Default reviewer role for SDD → graph compilation. */
4
4
  export declare const DEFAULT_REVIEWER_ROLE_ID = "reviewer";
5
5
  /**
6
- * Descriptor de entrada del compilador SDD → grafo.
6
+ * Input descriptor for the SDD → graph compiler.
7
7
  *
8
- * Es el contrato que `compileSddTask` y el ingress activo (`graphIngress.ts`)
9
- * consumen: identifica la tarea, sus roles y su brief accionable, más las
10
- * señales de routing. El brief nunca se persiste en crudo; el compilador lo
11
- * ancla por digest (`assertReferenceOnly` rechaza cualquier campo crudo).
8
+ * It is the contract consumed by `compileSddTask` and the active ingress
9
+ * (`graphIngress.ts`): it identifies the task, its roles, and its actionable
10
+ * brief, plus the routing signals. The brief is never persisted raw; the
11
+ * compiler anchors it by digest (`assertReferenceOnly` rejects any raw field).
12
12
  */
13
13
  export type SddTask = {
14
- /** Id estable y sin `:` (kebab-case) usado para anclas y nodos. */
14
+ /** Stable id with no `:` (kebab-case) used for anchors and nodes. */
15
15
  id: string;
16
- /** Rol que implementa (y arregla) la tarea. */
16
+ /** Role that implements (and fixes) the task. */
17
17
  implementerRoleID: string;
18
- /** Título humano corto. */
18
+ /** Short human-readable title. */
19
19
  title: string;
20
- /** Brief accionable de la tarea (cuerpo del prompt del implementer). */
20
+ /** Actionable task brief (body of the implementer's prompt). */
21
21
  brief: string;
22
- /** Señales de routing para la tarea. */
22
+ /** Routing signals for the task. */
23
23
  task: TaskSignals;
24
- /** Rol reviewer específico (sobreescribe el reviewer por defecto). */
24
+ /** Specific reviewer role (overrides the default reviewer). */
25
25
  reviewerRoleID?: string;
26
26
  };
27
27
  /**
28
- * Compilador **puro** de una tarea SDD legacy a un `GraphSpecV1` estático
28
+ * **Pure** compiler from a legacy SDD task to a static `GraphSpecV1`
29
29
  * (GE-041).
30
30
  *
31
- * La cadena implement → review → revise → re-review se expande a un DAG
32
- * acíclico versionado: un nodo `implementer` inicial, su `reviewer`, y por cada
33
- * ronda de revisión un nuevo `implementer` (revise) con su `reviewer`
34
- * (re-review). El spec resultante:
31
+ * The implement → review → revise → re-review chain expands to a versioned
32
+ * acyclic DAG: an initial `implementer` node, its `reviewer`, and for each
33
+ * review round a new `implementer` (revise) with its `reviewer` (re-review).
34
+ * The resulting spec:
35
35
  *
36
- * - es **reference-only**: los nodos solo llevan ids, roles y un `anchor`
37
- * (taskID + digest), nunca el brief crudo;
38
- * - es **determinista**: la misma tarea produce el mismo spec y el mismo
36
+ * - is **reference-only**: nodes carry only ids, roles, and an `anchor`
37
+ * (taskID + digest), never the raw brief;
38
+ * - is **deterministic**: the same task produces the same spec and the same
39
39
  * digest (`graphSpecDigest`);
40
- * - **falla antes de dispatch** ante un rol inválido, un autor que también
41
- * revisa, o un id de tarea que no es un `NodeID` válido.
40
+ * - **fails before dispatch** on an invalid role, an author who also reviews,
41
+ * or a task id that is not a valid `NodeID`.
42
42
  *
43
- * Sin I/O, reloj ni random: solo cómputo de digest y validación estructural.
43
+ * Without I/O, clock, or random: only digest computation and structural validation.
44
44
  */
45
- /** Código de fallo de compilación (falla antes de cualquier dispatch). */
45
+ /** Compilation failure code (fails before any dispatch). */
46
46
  export type SddCompileErrorCode = "invalid-role" | "author-is-reviewer" | "invalid-spec";
47
- /** Error tipado de una compilación rechazada. */
47
+ /** Typed error for a rejected compilation. */
48
48
  export declare class SddCompileError extends Error {
49
49
  readonly code: SddCompileErrorCode;
50
50
  readonly detail: string;
51
51
  constructor(code: SddCompileErrorCode, detail: string);
52
52
  }
53
- /** Opciones de compilación. */
53
+ /** Compilation options. */
54
54
  export type SddCompileOptions = {
55
- /** Rol del reviewer (def: el de la tarea o `reviewer`). */
55
+ /** Reviewer role (default: the task's or `reviewer`). */
56
56
  reviewerRoleID?: string;
57
- /** Rondas de revisión revise/re-review a expandir (def: 1). */
57
+ /** revise/re-review review rounds to expand (default: 1). */
58
58
  revisionRounds?: number;
59
59
  };
60
60
  /**
61
- * Digest canónico del spec. Reexportado desde `graph/ids` para no romper a los
62
- * consumidores del compilador; la implementación vive en la capa de grafo
63
- * porque el espejo shadow la necesita sin alcanzar este módulo.
61
+ * Canonical digest of the spec. Re-exported from `graph/ids` to avoid breaking
62
+ * compiler consumers; the implementation lives in the graph layer because the
63
+ * shadow mirror needs it without reaching this module.
64
64
  */
65
65
  export { graphSpecDigest } from "../graph/ids";
66
66
  /**
67
- * Compila una tarea SDD legacy a un `GraphSpecV1` validado. Lanza
68
- * `SddCompileError` ante rol/autor/spec inválidos, siempre **antes** de
69
- * cualquier dispatch.
67
+ * Compiles a legacy SDD task to a validated `GraphSpecV1`. Throws
68
+ * `SddCompileError` for invalid role/author/spec, always **before** any
69
+ * dispatch.
70
70
  */
71
71
  export declare function compileSddTask(task: SddTask, options?: SddCompileOptions): GraphSpecV1;
72
72
  //# sourceMappingURL=sddCompiler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sddCompiler.d.ts","sourceRoot":"","sources":["../../src/orchestrator/sddCompiler.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,WAAW,EAEj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de crash de create/prompt (GE-032).
3
+ * Reconciler for create/prompt crash windows (GE-032).
4
4
  *
5
- * Tras un fallo a mitad de crear la sub-sesión hija o despachar el prompt, el
6
- * runtime no sabe si el efecto llegó a empezar. Este módulo clasifica la
7
- * ventana usando la **sesión hija correlacionada** de opencode y decide sin
8
- * reintentar a ciegas:
5
+ * After a failure halfway through creating the child sub-session or dispatching
6
+ * the prompt, the runtime does not know whether the effect started. This module
7
+ * classifies the window using the **correlated child session** from opencode and
8
+ * decides without retrying blindly:
9
9
  *
10
- * - `not-started`: no hay hija correlacionada; el efecto puede despacharse.
11
- * - `active`: existe una única hija correlacionada aún en curso; se **adopta**.
12
- * - `completed`: existe una única hija correlacionada terminada; se **adopta**.
13
- * - `unknown`: la evidencia es ambigua (varias hijas correlacionadas); se
14
- * **bloquea** el reintento ciego y se exige reconciliación segura.
10
+ * - `not-started`: there is no correlated child; the effect can be dispatched.
11
+ * - `active`: exactly one correlated child exists and is still in progress; it
12
+ * is **adopted**.
13
+ * - `completed`: exactly one correlated child exists and has finished; it is
14
+ * **adopted**.
15
+ * - `unknown`: the evidence is ambiguous (multiple correlated children); the
16
+ * blind retry is **blocked** and safe reconciliation is required.
15
17
  *
16
- * Un nodo con recibo ya escrito (terminal) hace que la reconciliación sea un
17
- * **no-op idempotente**. Puro y determinista: sin I/O, reloj ni random; el
18
- * runtime le pasa la evidencia ya observada a través de puertos inyectados.
18
+ * A node with a receipt already written (terminal) makes reconciliation an
19
+ * **idempotent no-op**. Pure and deterministic: no I/O, clock, or random; the
20
+ * runtime passes it the already observed evidence through injected ports.
19
21
  */
20
- /** Clasificación de la ventana de crash de un efecto. */
22
+ /** Classification of an effect's crash window. */
21
23
  export type CrashWindowClass = "not-started" | "active" | "completed" | "unknown";
22
- /** Decisión de reconciliación derivada de la ventana. */
24
+ /** Reconciliation decision derived from the window. */
23
25
  export type ReconcileDecision = "dispatch" | "adopt" | "block" | "noop";
24
- /** Estado observado de una sesión hija de opencode. */
26
+ /** Observed state of an opencode child session. */
25
27
  export type ObservedChildState = "active" | "completed";
26
- /** Sesión hija observada con su título de correlación y estado. */
28
+ /** Observed child session with its correlation title and state. */
27
29
  export type ObservedChild = {
28
30
  readonly sessionID: string;
29
31
  readonly title: string;
30
32
  readonly state: ObservedChildState;
31
33
  };
32
- /** Evidencia correlacionada sobre la hija de un intento concreto. */
34
+ /** Correlated evidence about the child of a concrete attempt. */
33
35
  export type ChildObservation = {
34
36
  readonly kind: "none";
35
37
  } | {
@@ -42,33 +44,33 @@ export type ChildObservation = {
42
44
  readonly kind: "ambiguous";
43
45
  readonly detail: string;
44
46
  };
45
- /** Entrada de la reconciliación de un nodo. */
47
+ /** Input for reconciling a node. */
46
48
  export type ReconcileInput = {
47
49
  readonly nodeStatus: NodeStatus;
48
50
  readonly observation: ChildObservation;
49
51
  };
50
- /** Resultado de la reconciliación: ventana, decisión y hija adoptada si aplica. */
52
+ /** Reconciliation result: window, decision, and adopted child if applicable. */
51
53
  export type ReconcileResult = {
52
54
  readonly window: CrashWindowClass;
53
55
  readonly decision: ReconcileDecision;
54
56
  readonly sessionID?: string;
55
57
  };
56
58
  /**
57
- * Título de correlación determinista de la hija del intento `(runID, op,
58
- * attempt)`. El runtime lo fija como título de la sub-sesión al crearla, de
59
- * modo que un reinicio pueda reencontrar exactamente la misma hija.
59
+ * Deterministic correlation title of the child for attempt `(runID, op,
60
+ * attempt)`. The runtime sets it as the sub-session title when creating it, so
61
+ * that a restart can find exactly the same child again.
60
62
  */
61
63
  export declare function correlationTitle(runID: string, operationID: string, attemptID: string): string;
62
64
  /**
63
- * Reduce las hijas observadas a la evidencia correlacionada del intento. Cero
64
- * coincidencias es `none`; exactamente una determina `active`/`completed`;
65
- * más de una es `ambiguous` (no se puede adoptar una sola con seguridad).
65
+ * Reduces the observed children to the correlated evidence for the attempt.
66
+ * Zero matches is `none`; exactly one determines `active`/`completed`; more
67
+ * than one is `ambiguous` (a single one cannot be adopted safely).
66
68
  */
67
69
  export declare function observeChild(expectedTitle: string, children: readonly ObservedChild[]): ChildObservation;
68
70
  /**
69
- * Clasifica la ventana de crash de un nodo y decide la acción segura. Un nodo
70
- * terminal (recibo ya escrito) es un no-op idempotente; un nodo `pending` no ha
71
- * empezado; un nodo `running` se clasifica por la evidencia correlacionada.
71
+ * Classifies a node's crash window and decides the safe action. A terminal node
72
+ * (receipt already written) is an idempotent no-op; a `pending` node has not
73
+ * started; a `running` node is classified by the correlated evidence.
72
74
  */
73
75
  export declare function reconcileSession(input: ReconcileInput): ReconcileResult;
74
76
  //# sourceMappingURL=sessionReconciler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sessionReconciler.d.ts","sourceRoot":"","sources":["../../src/orchestrator/sessionReconciler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;;;;;;;;;;;;;;;GAiBG;AAEH,yDAAyD;AACzD,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,QAAQ,GACR,WAAW,GACX,SAAS,CAAC;AAEd,yDAAyD;AACzD,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAExE,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,WAAW,CAAC;AAExD,mEAAmE;AACnE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;CACpC,CAAC;AAEF,qEAAqE;AACrE,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,QAAQ,CAAC,IA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