@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,59 @@
1
+ import type { CertificateStatus } from "../../config/graphFeatureGate";
2
+ /**
3
+ * Kernel retirement guard and single-engine invariant (W4-S06, #180).
4
+ *
5
+ * Retiring the in-house graph kernel (`src/graph/**` outside this `langgraph/`
6
+ * subtree) is only safe once the LangGraph engine is certifiable in its place.
7
+ * This module enforces two properties, both pure (no I/O, clock or randomness):
8
+ *
9
+ * 1. **Retirement is refused until LangGraph passes.** Without a valid
10
+ * LangGraph release certificate, `assertKernelRetirementAllowed` returns a
11
+ * refusal carrying the reason `"langgraph-certificate-missing"`.
12
+ * 2. **No module imports both engines.** `classifyEngineImports` labels a
13
+ * module's imports as legacy-kernel and/or LangGraph from its import
14
+ * specifiers; `findDualEngineModules` reports any module that imports both.
15
+ * This invariant holds while both engines physically coexist (the shippable
16
+ * state), and the eventual `no-legacy-graph-engine` contract test drives it
17
+ * over the real tree.
18
+ */
19
+ /** Reason a retirement request is refused when the new engine is uncertified. */
20
+ export declare const KERNEL_RETIREMENT_MISSING_REASON: "langgraph-certificate-missing";
21
+ /** Outcome of a retirement request. */
22
+ export type RetirementDecision = {
23
+ readonly allowed: true;
24
+ } | {
25
+ readonly allowed: false;
26
+ readonly reason: typeof KERNEL_RETIREMENT_MISSING_REASON;
27
+ };
28
+ /**
29
+ * #180 acceptance: the in-house kernel may be retired only once the LangGraph
30
+ * engine holds a valid release certificate. Any other certificate status
31
+ * (absent or invalid) refuses retirement with `langgraph-certificate-missing`.
32
+ */
33
+ export declare function assertKernelRetirementAllowed(releaseStatus: CertificateStatus): RetirementDecision;
34
+ /** Which engine a single import specifier belongs to, if any. */
35
+ export type EngineImport = "legacy-kernel" | "langgraph";
36
+ /** A module's classified engine imports. */
37
+ export type ModuleEngineImports = {
38
+ readonly path: string;
39
+ readonly imports: readonly EngineImport[];
40
+ };
41
+ /**
42
+ * Classifies one import specifier. A specifier that resolves under
43
+ * `graph/langgraph/` is the new engine; a specifier that resolves to a legacy
44
+ * kernel module directly under `graph/` is the retired engine; anything else is
45
+ * unrelated (`undefined`).
46
+ */
47
+ export declare function classifySpecifier(specifier: string): EngineImport | undefined;
48
+ /**
49
+ * Extracts a module's import specifiers from its source text and classifies
50
+ * them by engine. Pure and order-stable; deduplicates the engine labels.
51
+ */
52
+ export declare function classifyEngineImports(path: string, content: string): ModuleEngineImports;
53
+ /**
54
+ * #180 single-engine invariant: reports the paths of modules that import BOTH
55
+ * the legacy kernel and the LangGraph engine. An empty result means no module
56
+ * mixes the two engines.
57
+ */
58
+ export declare function findDualEngineModules(modules: readonly ModuleEngineImports[]): string[];
59
+ //# sourceMappingURL=retirement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retirement.d.ts","sourceRoot":"","sources":["../../../src/graph/langgraph/retirement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;;;;;;;;;;;;;;;GAgBG;AAEH,iFAAiF;AACjF,eAAO,MAAM,gCAAgC,EAC3C,+BAAwC,CAAC;AAE3C,uCAAuC;AACvC,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAA;CAAE,GAC1B;IACE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,OAAO,gCAAgC,CAAC;CAC1D,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,iBAAiB,GAC/B,kBAAkB,CAKpB;AAED,iEAAiE;AACjE,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,WAAW,CAAC;AAEzD,4CAA4C;AAC5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;CAC3C,CAAC;AAmBF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAU7E;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,mBAAmB,CAWrB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,mBAAmB,EAAE,GACtC,MAAM,EAAE,CAQV"}
@@ -0,0 +1,65 @@
1
+ import type { PrivacyClass } from "../../context/schema";
2
+ import type { PrivacyMode, RouteKind } from "../privacyPolicy";
3
+ /**
4
+ * Engine-agnostic type surface for the LangGraph runtime adapter (W4-S03, #177).
5
+ *
6
+ * These types describe the channels, node functions and injected ports that a
7
+ * LangGraph `StateGraph`/`Annotation.Root` will be bound to once
8
+ * `@langchain/langgraph` is installed (W4-S01/W4-S02). They carry only
9
+ * references — node ids, a resolved route and an artifact digest — never raw
10
+ * prompt/brief/output content, so a checkpoint of this state stays reference-only.
11
+ *
12
+ * Type-only module: no runtime value is declared here.
13
+ */
14
+ export type { RouteKind };
15
+ /** Bounded input for a single adapter run: which node, its privacy class, the
16
+ * effective privacy mode and the route the router would prefer. */
17
+ export type AdapterInput = {
18
+ readonly nodeID: string;
19
+ readonly privacyClass: PrivacyClass;
20
+ readonly mode: PrivacyMode;
21
+ readonly preferredRoute: RouteKind;
22
+ };
23
+ /** Reference-only receipt of a dispatched node: identifiers and a digest only. */
24
+ export type AdapterReceipt = {
25
+ readonly nodeID: string;
26
+ readonly route: RouteKind;
27
+ readonly artifactSha256: string;
28
+ };
29
+ /** Reduced adapter state. `route` and `receipt` are absent until their node
30
+ * runs; `visited` records node order (an accumulating channel). */
31
+ export type AdapterState = {
32
+ readonly input: AdapterInput;
33
+ readonly route?: RouteKind;
34
+ readonly receipt?: AdapterReceipt;
35
+ readonly visited: readonly string[];
36
+ };
37
+ /** The two graph nodes: a pure route node and an effectful dispatch node. */
38
+ export type NodeName = "route" | "dispatch";
39
+ /** Request handed to the injected node executor at dispatch. */
40
+ export type DispatchRequest = {
41
+ readonly nodeID: string;
42
+ readonly route: RouteKind;
43
+ readonly privacyClass: PrivacyClass;
44
+ readonly mode: PrivacyMode;
45
+ };
46
+ /** Injected effect port. In production the opencode session adapter implements
47
+ * it; in tests a deterministic fake does. It must be reference-only. */
48
+ export interface NodeExecutor {
49
+ execute(request: DispatchRequest): AdapterReceipt | Promise<AdapterReceipt>;
50
+ }
51
+ /** Dependencies injected into a graph invocation. */
52
+ export type AdapterDeps = {
53
+ readonly executor: NodeExecutor;
54
+ };
55
+ /** Partial channel update returned by a node and merged by the reducer. */
56
+ export type StateUpdate = {
57
+ readonly input?: AdapterInput;
58
+ readonly route?: RouteKind;
59
+ readonly receipt?: AdapterReceipt;
60
+ readonly visited?: readonly string[];
61
+ };
62
+ /** A graph node: pure with respect to time/randomness; effects go through the
63
+ * injected executor in `deps`. */
64
+ export type NodeFn = (state: AdapterState, deps: AdapterDeps) => StateUpdate | Promise<StateUpdate>;
65
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@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AC5B,CAAC;AAEF;wEACwE;AACxE,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC7E;AAED,qDAAqD;AACrD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;CACjC,CAAC;AAEF,2EAA2E;AAC3E,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC,CAAC;AAEF;kCACkC;AAClC,MAAM,MAAM,MAAM,GAAG,CACnB,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,WAAW,KACd,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC"}
@@ -11,6 +11,13 @@ export type PrivacyMode = "forceLocalOnSensitive" | "consentBeforeFrontier" | "o
11
11
  export type RouteKind = "local" | "frontier";
12
12
  /** Error tipado de una violación de privacidad en el despacho. */
13
13
  export declare class PrivacyPolicyError extends Error {
14
+ /**
15
+ * Stable discriminator for callers. This error is thrown across the dispatch
16
+ * boundary (`orchestrator/graphEffects`), so a catcher should match on
17
+ * `code === "sensitive-forced-local"` (or `name === "PrivacyPolicyError"`)
18
+ * rather than `instanceof`, which is not reliable across module/realm
19
+ * boundaries or after the CLI bundle is tree-shaken.
20
+ */
14
21
  readonly code: "sensitive-forced-local";
15
22
  readonly detail: string;
16
23
  constructor(detail: string);
@@ -1 +1 @@
1
- {"version":3,"file":"privacyPolicy.d.ts","sourceRoot":"","sources":["../../src/graph/privacyPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA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F,QAAQ,CAAC,gBAAgB,EAAE;QACzB,eAAe,EAAE,MAAM,CAAC;QACxB,eAAe,EAAE,MAAM,CAAC;KACzB,GAAG,IAAI,CAAC;IACT,sFAAsF;IACtF,QAAQ,CAAC,iBAAiB,EAAE;QAC1B,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,IAAI,CAAC;IACT,QAAQ,CAAC,gBAAgB,EAAE,YAAY,EAAE,CAAC;IAC1C,QAAQ,CAAC,kBAAkB,EAAE,YAAY,EAAE,CAAC;IAC5C,QAAQ,CAAC,wBAAwB,EAAE,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,CAAC,EAAE,GAC9C;IAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAcxD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,CAAC,EAAE,EAC/C,yBAAyB,EAAE,SAAS,MAAM,EAAE,GAC3C,YAAY,CA+Hd;AAMD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,CAAC,EAAE,GAC9C,MAAM,CA0BR"}
@@ -10,8 +10,6 @@ export type GraphJournalHealth = "clean" | "recovered" | "corrupt";
10
10
  export type NodeStatus = "pending" | "running" | "succeeded" | "failed" | "cancelled";
11
11
  /** Estado del run completo. */
12
12
  export type RunStatus = "running" | "completed" | "failed" | "cancelled";
13
- /** Estados terminales (no admiten más transiciones). */
14
- export declare const TERMINAL_NODE_STATUSES: ReadonlySet<NodeStatus>;
15
13
  export declare const TERMINAL_RUN_STATUSES: ReadonlySet<RunStatus>;
16
14
  /** Estado runtime de un nodo dentro del estado reducido. */
17
15
  export type NodeRuntimeState = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/graph/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,WAAW,EACX,MAAM,EACN,QAAQ,EACT,MAAM,UAAU,CAAC;AAElB;;;;GAIG;AAEH,gFAAgF;AAChF,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;AAEnE,qEAAqE;AACrE,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,WAAW,CAAC;AAEhB,+BAA+B;AAC/B,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEzE,wDAAwD;AACxD,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,UAAU,CAGzD,CAAC;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,SAAS,CAIvD,CAAC;AAEH,4DAA4D;AAC5D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,gDAAgD;AAChD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,CAAC;IAClB,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CACzC,CAAC;AAEF,gDAA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ClB,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CACzC,CAAC;AAEF,gDAAgD;AAChD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,CAAC;AAE/E,yEAAyE;AACzE,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,YAAY,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,WAAW,EACX,MAAM,EACN,QAAQ,GACT,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,13 +1,33 @@
1
- import type { Plugin, PluginModule } from "@opencode-ai/plugin";
1
+ import { type Plugin, type PluginModule } from "@opencode-ai/plugin";
2
2
  import type { CliDeps } from "./commands/dispatch";
3
3
  import { type GraphGateInput } from "./config/graphFeatureGate";
4
+ import { type ConfigSource } from "./config/resolve";
4
5
  import { type OpenTeamConfig } from "./config/schema";
5
6
  import { RuntimeRegistry } from "./local/registry";
6
- import { type RecorderPorts } from "./storage/graph/soakRecorder";
7
+ import { type ReadAllChainsResult, type RecorderPorts } from "./storage/graph/soakRecorder";
7
8
  import type { StorageProvider } from "./storage/provider";
8
9
  import { type EventSink } from "./telemetry/eventLog";
9
10
  export declare function logAvailabilityRefreshError(error: unknown): void;
10
11
  export declare function logTelemetryError(error: unknown): void;
12
+ export declare function logTelemetryWarning(message: string): void;
13
+ export declare function logOpencodeServerUrl(serverUrl: URL): void;
14
+ export declare const MAX_LOGGED_OPENCODE_VERSION_FAILURE_CAUSES = 64;
15
+ export declare function createOpencodeVersionReadFailureLogger(maxCauses?: number, warn?: (message?: unknown) => void): (error: unknown) => void;
16
+ export declare const logOpencodeVersionReadFailure: (error: unknown) => void;
17
+ export declare function warnNoRuntimeConfigFound(paths: readonly string[], optionsOnly: boolean, localModel: {
18
+ providerID: string;
19
+ modelID: string;
20
+ } | null): void;
21
+ /**
22
+ * Fired once at startup when `privacyMode` is `"forceLocalOnSensitive"` but no
23
+ * local runtime is configured. In this state the privacy setting is inert:
24
+ * privacy-sensitive tasks will be forwarded to the frontier model (labelled
25
+ * `"frontier"` in telemetry, rationale `"privacy-force-local-none-configured"`).
26
+ * Hard blocking is still available via the `alwaysLocal` override per request or
27
+ * the budget `blockFrontier` action.
28
+ */
29
+ export declare function warnInertPrivacySetting(paths: readonly string[], warn?: (message?: unknown) => void): void;
30
+ export declare function warnSoakEvidenceRejections(result: ReadAllChainsResult): void;
11
31
  /**
12
32
  * Reads the opencode server version from the `/global/health` endpoint.
13
33
  *
@@ -31,36 +51,47 @@ export declare function logTelemetryError(error: unknown): void;
31
51
  * The brand prevents a compile-time constant (e.g.
32
52
  * `DEFAULT_SOAK_POLICY.supportedOpencodeVersions`) from being silently
33
53
  * substituted where a live-read version is expected — `buildGateInput`
34
- * requires the brand, so a plain `string` fails `tsc --noEmit`. Only
35
- * `readOpencodeVersion` produces this type in production code. Tests may
36
- * cast explicitly via `as LiveOpencodeVersion`, which is deliberate
37
- * opt-in; production wiring in this file must not the forge-kill
38
- * assertion in `graph-feature-gate.test.ts` rejects any such cast in the
39
- * `opencodeVersion` assignment.
54
+ * requires the brand, so a plain `string` fails `tsc --noEmit`. Production
55
+ * obtains the brand through the lazy reader backed by `/global/health`. Tests
56
+ * may cast explicitly via `as LiveOpencodeVersion`, which is deliberate
57
+ * opt-in; production wiring in this file must not source version values from
58
+ * constants. The reader prefers opencode's injected client transport and falls
59
+ * back to raw `fetch` against `/global/health` when a TCP server is available.
40
60
  *
41
61
  * See ADR section 8 (seam protection) and the GE-057 wiring tests.
42
62
  */
43
63
  export type LiveOpencodeVersion = string & {
44
64
  readonly __brand: "LiveOpencodeVersion";
45
65
  };
46
- export declare function readOpencodeVersion(serverUrl: URL): Promise<LiveOpencodeVersion>;
66
+ type FetchLike = (input: RequestInfo | URL) => Promise<Response>;
67
+ type OpencodeVersionReadOptions = {
68
+ readonly fetch?: FetchLike;
69
+ readonly client?: unknown;
70
+ readonly onFailure?: (error: unknown) => void;
71
+ };
72
+ export declare function readOpencodeVersion(serverUrl: URL, options?: OpencodeVersionReadOptions): Promise<LiveOpencodeVersion>;
73
+ type LazyOpencodeVersionReaderOptions = OpencodeVersionReadOptions & {
74
+ readonly sleep?: (ms: number) => Promise<void>;
75
+ readonly backoffMs?: readonly number[];
76
+ };
77
+ export declare function createLazyOpencodeVersionReader(serverUrl: URL, options?: LazyOpencodeVersionReaderOptions): () => Promise<LiveOpencodeVersion>;
47
78
  /**
48
79
  * Builds the gate input by reading certificates and determining migration
49
80
  * status. All I/O is isolated here; the gate itself is pure.
50
81
  *
51
82
  * `opencodeVersion` is the version of the opencode server actually running,
52
- * obtained at startup via `readOpencodeVersion`. The recomputing parsers
53
- * compare it against each certificate's stamped version — a mismatch
54
- * produces `opencode-mismatch` and closes the gate. When the version is
55
- * `"unknown"` (could not be determined), no certificate can match, so the
56
- * gate fails closed.
83
+ * obtained lazily by the composition root. The recomputing parsers compare it
84
+ * against each certificate's stamped version — a mismatch produces
85
+ * `opencode-mismatch` and closes the gate. When the version is `"unknown"`
86
+ * (could not be determined), no certificate can match, so the gate fails
87
+ * closed.
57
88
  */
58
89
  export declare function buildGateInput(config: OpenTeamConfig, storage: StorageProvider, opencodeVersion: LiveOpencodeVersion): Promise<GraphGateInput>;
59
90
  /** Adapts a StorageProvider to RecorderPorts for the soak recorder. */
60
91
  export declare function recorderPortsFromStorage(storage: StorageProvider): RecorderPorts;
61
92
  export declare function createEventSink(rawOptions: unknown, storage?: StorageProvider): EventSink;
62
93
  export declare function isMissingFile(error: unknown): boolean;
63
- export declare function createCliDeps(config: OpenTeamConfig, registry: RuntimeRegistry, telemetryPath: string, sessionsDir?: string, storage?: StorageProvider): CliDeps;
94
+ export declare function createCliDeps(config: OpenTeamConfig, registry: RuntimeRegistry, telemetryPath: string, sessionsDir?: string, storage?: StorageProvider, fallbackSource?: ConfigSource, rawOptions?: unknown): CliDeps;
64
95
  export declare const server: Plugin;
65
96
  declare const plugin: PluginModule;
66
97
  export { PACKAGE_VERSION } from "./version";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAGL,KAAK,cAAc,EAGpB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAYzB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAoBnD,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAIL,KAAK,SAAS,EAEf,MAAM,sBAAsB,CAAC;AAsB9B,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAGhE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAGtD;AA0CD;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG;IACzC,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;CACzC,CAAC;AAEF,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,GAAG,GACb,OAAO,CAAC,mBAAmB,CAAC,CAqB9B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,eAAe,EACxB,eAAe,EAAE,m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