@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
@@ -1 +1 @@
1
- {"version":3,"file":"memoryRuntime.d.ts","sourceRoot":"","sources":["../../../src/storage/index/memoryRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEhF,OAAO,EAAE,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,oBAAoB,CAAC;C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,GAAG;IACnC,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,OAAO,uBAAuB,CAAC;IAC9C,+DAA+D;IAC/D,cAAc,CAAC,EAAE,OAAO,mBAAmB,CAAC;IAC5C,6DAA6D;IAC7D,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,4EAA4E;IAC5E,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAqDpC"}
@@ -39,13 +39,29 @@ export type SessionRollup = {
39
39
  firstTs: number;
40
40
  lastTs: number;
41
41
  };
42
+ /** Rejection detail for a malformed row stored in the derived `events` index. */
43
+ export type SqliteEventIndexRowRejection = {
44
+ readonly rowId: string;
45
+ readonly detail: string;
46
+ };
47
+ /** Result of reading events from the derived SQLite event index. */
48
+ export type ReadSqliteIndexEventsResult = {
49
+ readonly events: OpenTeamEvent[];
50
+ readonly rejectedRows: number;
51
+ readonly rejections: readonly SqliteEventIndexRowRejection[];
52
+ };
42
53
  export type SqliteEventIndex = {
43
54
  /** Vacía el índice y lo repuebla con `events` (reconstrucción total). */
44
55
  rebuild: (events: readonly OpenTeamEvent[]) => void;
45
56
  /** Añade eventos sin vaciar el índice. */
46
57
  append: (events: readonly OpenTeamEvent[]) => void;
47
- /** Lee todos los eventos ordenados por `ts` ascendente. */
58
+ /**
59
+ * Reads all events ordered by ascending `ts`.
60
+ * Warns if corrupt rows from the derived index are omitted.
61
+ */
48
62
  allEvents: () => OpenTeamEvent[];
63
+ /** Diagnostic variant: returns valid events plus rejected rows. */
64
+ allEventsWithDiagnostics: () => ReadSqliteIndexEventsResult;
49
65
  /** Rollups escalares por sesión calculados en SQL. */
50
66
  sessionRollups: () => SessionRollup[];
51
67
  /** Agregación completa (reutiliza `aggregateEvents`, puro). */
@@ -53,6 +69,7 @@ export type SqliteEventIndex = {
53
69
  /** Cierra la conexión subyacente. */
54
70
  close: () => void;
55
71
  };
72
+ export declare function warnSqliteEventIndexRejections(result: ReadSqliteIndexEventsResult): void;
56
73
  /** Crea el índice sobre una base de datos ya abierta y asegura el esquema. */
57
74
  export declare function createSqliteEventIndex(db: SqliteDatabase): SqliteEventIndex;
58
75
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sqliteIndex.d.ts","sourceRoot":"","sources":["../../../src/storage/index/sqliteIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;GAYG;AAEH,oDAAoD;AACpD,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,CAAC;IACzC,GAAG,EAAE,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;CACxC,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IACpD,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,eAAe,CAAC;IACxC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/B,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BAAgB,eAAe,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAE7D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,oFAAoF;AACpF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvD"}
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/storage/path.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,2EAA2E;AAC3E,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgB1D;AAED,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAE7D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,oFAAoF;AACpF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvD"}
@@ -1,8 +1,8 @@
1
1
  import type { ActivityEvent, OpenTeamEvent } from "./events";
2
2
  /**
3
- * Agregación **pura y determinista** de eventos de openteam para el console.
4
- * Reconstruye resúmenes por sesión y rollups globales sin depender del orden de
5
- * entrada. Sin I/O, red, reloj, random ni env vars.
3
+ * **Pure and deterministic** aggregation of openteam events for the console.
4
+ * Reconstructs per-session summaries and global rollups without depending on
5
+ * input order. No I/O, network, clock, random, or env vars.
6
6
  */
7
7
  export type ToolUsage = {
8
8
  count: number;
@@ -14,15 +14,15 @@ export type ToolcallStats = ToolUsage & {
14
14
  byTool: Record<string, ToolUsage>;
15
15
  };
16
16
  /**
17
- * Endpoint del servidor opencode de una sesión (loopback). Lo aporta el evento
18
- * `session-endpoint`; la Console lo usa para conectarse a la terminal/SSE.
17
+ * Endpoint of a session's opencode server (loopback). Provided by the
18
+ * `session-endpoint` event; the Console uses it to connect to the terminal/SSE.
19
19
  */
20
20
  export type SessionEndpointView = {
21
21
  url: string;
22
22
  directory?: string;
23
23
  worktree?: string;
24
24
  title?: string;
25
- /** `ts` del último `session-endpoint` visto (para quedarse con el más reciente). */
25
+ /** `ts` of the last `session-endpoint` seen (to keep the most recent one). */
26
26
  lastSeenTs: number;
27
27
  };
28
28
  export type SessionSummary = {
@@ -42,11 +42,11 @@ export type SessionSummary = {
42
42
  tokensCacheRead: number;
43
43
  tokensCacheWrite: number;
44
44
  toolcalls: ToolcallStats;
45
- /** Modelos usados: "providerID/modelID", orden estable. */
45
+ /** Models used: "providerID/modelID", stable order. */
46
46
  models: string[];
47
- /** Agentes vistos, orden estable. */
47
+ /** Agents seen, stable order. */
48
48
  agents: string[];
49
- /** Endpoint del servidor opencode, si la sesión lo anunció. */
49
+ /** Endpoint of the opencode server, if the session announced it. */
50
50
  endpoint?: SessionEndpointView;
51
51
  };
52
52
  export type DecisionView = {
@@ -95,9 +95,9 @@ export type EventsAggregate = {
95
95
  activity: ActivityView[];
96
96
  };
97
97
  /**
98
- * Compone la agregación completa a partir de la lista de eventos (en cualquier
99
- * orden). Sesiones ordenadas por actividad más reciente; decisiones, reuniones y
100
- * actividad, más nuevas primero.
98
+ * Builds the complete aggregate from the event list (in any order). Sessions
99
+ * are sorted by most recent activity; decisions, meetings, and activity, newest
100
+ * first.
101
101
  */
102
102
  export declare function aggregateEvents(events: readonly OpenTeamEvent[]): EventsAggregate;
103
103
  //# sourceMappingURL=aggregate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../src/telemetry/aggregate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAIb,aAAa,EAId,MAAM,UAAU,CAAC;AAElB;;;;GAIG;AAEH,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,M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C;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B,CAAC;AAoMF;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,eAAe,CA2EjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/telemetry/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAcF,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,iBAAiB,GACzB,UAAU,CA4BZ"}
1
+ {"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/telemetry/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAgBF,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,iBAAiB,GACzB,UAAU,CA4BZ"}
@@ -1,25 +1,25 @@
1
1
  import { type DecisionEvent } from "./events";
2
2
  /**
3
- * Parser **puro** del log de decisiones del scribe (`openteam-decisions.md`).
3
+ * **Pure** parser for the scribe's decision log (`openteam-decisions.md`).
4
4
  *
5
- * El scribe escribe cada decisión/aprendizaje como un item de lista Markdown ya
6
- * **redactado** (nunca prompts ni datos sensibles). Este parser lo convierte a
7
- * `decision` events para que el console los agregue junto al resto.
5
+ * The scribe writes each decision/learning as an already-**redacted** Markdown
6
+ * list item (never prompts or sensitive data). This parser converts it to
7
+ * `decision` events so the console can aggregate them with the rest.
8
8
  *
9
- * Sin I/O, red, reloj (`now`), random ni env vars. `Date.parse` sobre una fecha
10
- * literal es determinista.
9
+ * No I/O, network, clock (`now`), random, or env vars. `Date.parse` on a
10
+ * literal date is deterministic.
11
11
  */
12
- /** Sesión sintética a la que se atribuyen las decisiones del log compartido. */
12
+ /** Synthetic session to which decisions from the shared log are attributed. */
13
13
  export declare const DECISIONS_SESSION_ID = "decisions";
14
14
  export type ParseDecisionsOptions = {
15
- /** Sesión a la que atribuir las decisiones. Por defecto `DECISIONS_SESSION_ID`. */
15
+ /** Session to which decisions are attributed. Defaults to `DECISIONS_SESSION_ID`. */
16
16
  sessionID?: string;
17
- /** Base de tiempo para items sin fecha (se les suma su índice). Por defecto 0. */
17
+ /** Time base for items without a date (their index is added to it). Defaults to 0. */
18
18
  baseTs?: number;
19
19
  };
20
20
  /**
21
- * Convierte el texto del log de decisiones en `decision` events. Ignora líneas
22
- * que no sean items de lista y descarta items sin resumen. Nunca lanza.
21
+ * Converts the text of the decision log into `decision` events. Ignores lines
22
+ * that are not list items and discards items without a summary. Never throws.
23
23
  */
24
24
  export declare function parseDecisionsMarkdown(text: string, options?: ParseDecisionsOptions): DecisionEvent[];
25
25
  //# sourceMappingURL=decisions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decisions.d.ts","sourceRoot":"","sources":["../../src/telemetry/decisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAwB,MAAM,UAAU,CAAC;AAEpE;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAEhD,MAAM,MAAM,qBAAqB,GAAG;IAClC,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAYF;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,aAAa,EAAE,CA+DjB"}
1
+ {"version":3,"file":"decisions.d.ts","sourceRoot":"","sources":["../../src/telemetry/decisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAwB,MAAM,UAAU,CAAC;AAEpE;;;;;;;;;GASG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAEhD,MAAM,MAAM,qBAAqB,GAAG;IAClC,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAYF;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,aAAa,EAAE,CA+DjB"}
@@ -1,59 +1,75 @@
1
1
  import type { StorageProvider } from "../storage/provider";
2
2
  import { type OpenTeamEvent, type RouteEvent } from "./events";
3
3
  import type { CostRecord } from "./types";
4
- /** Directorio por defecto de los logs de sesión que alimentan el console. */
5
- export declare const DEFAULT_SESSIONS_DIR = ".opencode/openteam/sessions";
6
- /** Sesión sintética para registros del telemetry legacy sin `sessionID`. */
4
+ /** Default directory for session logs that feed the console.
5
+ * Machine-local runtime output (P15b): lives under `.opencode/openteam-local/`. */
6
+ export declare const DEFAULT_SESSIONS_DIR = ".opencode/openteam-local/sessions";
7
+ /** Synthetic session for legacy telemetry records without `sessionID`. */
7
8
  export declare const LEGACY_SESSION_ID = "legacy";
8
- /** Sink que persiste eventos redactados; `emit` nunca debe lanzar. */
9
+ /** Sink that persists redacted events; `emit` must never throw. */
9
10
  export type EventSink = {
10
11
  emit: (event: OpenTeamEvent) => Promise<void> | void;
11
12
  };
12
- /** Sanea un `sessionID` para usarlo como nombre de fichero seguro. */
13
+ /** Sanitizes a `sessionID` for use as a safe file name. */
13
14
  export declare function sessionFileName(sessionID: string): string;
14
15
  export type EventLogSinkDeps = {
15
- /** Directorio destino (`sessions/`). */
16
+ /** Destination directory (`sessions/`). */
16
17
  dir: string;
17
- /** Backend de persistencia (escribe con `append`). */
18
+ /** Persistence backend (writes with `append`). */
18
19
  storage: StorageProvider;
19
20
  onError?: (error: unknown) => void;
20
21
  };
21
22
  /**
22
- * Crea un sink que enruta cada evento a `<dir>/<sessionID>.jsonl`. Valida con Zod
23
- * antes de escribir y captura cualquier error (la telemetría nunca rompe el flujo).
23
+ * Creates a sink that routes each event to `<dir>/<sessionID>.jsonl`. Validates
24
+ * with Zod before writing and captures any error (telemetry never breaks the flow).
24
25
  */
25
26
  export declare function createEventLogSink(deps: EventLogSinkDeps): EventSink;
26
27
  export declare function createNullEventSink(): EventSink;
27
28
  /**
28
- * Parsea JSONL de eventos, saltando líneas en blanco o inválidas (nunca lanza).
29
- * Puro.
29
+ * Rejection detail for a single session event JSONL line.
30
30
  */
31
- export declare function parseEventsJsonl(text: string): OpenTeamEvent[];
32
- /** Mapea un `CostRecord` legacy a un `route` event (para no perder histórico). Puro. */
31
+ export type EventLogLineRejection = {
32
+ readonly lineNumber: number;
33
+ readonly detail: string;
34
+ };
35
+ /** Result of parsing session event JSONL. */
36
+ export type ParseEventsJsonlResult = {
37
+ readonly events: OpenTeamEvent[];
38
+ readonly rejectedLines: number;
39
+ readonly rejections: readonly EventLogLineRejection[];
40
+ };
41
+ /**
42
+ * Parses session event JSONL. Pure: skips blank lines, counts malformed or
43
+ * schema-invalid nonblank lines, and never throws for bad records so callers can
44
+ * warn without breaking runtime.
45
+ */
46
+ export declare function parseEventsJsonl(text: string): ParseEventsJsonlResult;
47
+ export declare function warnEventLogRejections(result: ParseEventsJsonlResult, source: string): void;
48
+ /** Maps a legacy `CostRecord` to a `route` event (to avoid losing history). Pure. */
33
49
  export declare function costRecordToRouteEvent(record: CostRecord): RouteEvent;
34
50
  /**
35
- * Mapea un `route` event de vuelta a un `CostRecord` para reutilizar
36
- * `summarizeCostRecords`/vistas de routing existentes. Descarta la correlación
37
- * (decisionID/agent/…), que no forma parte del `CostRecord`. Puro.
51
+ * Maps a `route` event back to a `CostRecord` to reuse existing
52
+ * `summarizeCostRecords`/routing views. Discards the correlation
53
+ * (decisionID/agent/…), which is not part of `CostRecord`. Pure.
38
54
  */
39
55
  export declare function routeEventToCostRecord(event: RouteEvent): CostRecord;
40
56
  /**
41
- * Lee los `route` events de todas las sesiones (más el telemetry legacy como
42
- * fallback) y los mapea a `CostRecord[]`. Es la fuente de `openteam report` y
43
- * `openteam doctor` ahora que el plugin escribe eventos por sesión en vez del
44
- * JSONL legacy de `CostRecord`.
57
+ * Reads the `route` events from all sessions (plus legacy telemetry as a
58
+ * fallback) and maps them to `CostRecord[]`. It is the source for
59
+ * `openteam report` and `openteam doctor` now that the plugin writes per-session
60
+ * events instead of the legacy `CostRecord` JSONL.
45
61
  */
46
62
  export declare function readRouteCostRecords(dir: string, deps: ReadSessionEventsDeps): Promise<CostRecord[]>;
47
63
  export type ReadSessionEventsDeps = {
48
- /** Backend de persistencia (lista con `list`, lee con `read`). */
64
+ /** Persistence backend (lists with `list`, reads with `read`). */
49
65
  storage: StorageProvider;
50
- /** Telemetry legacy a fusionar como `route` events. Opcional. */
66
+ /** Legacy telemetry to merge as `route` events. Optional. */
51
67
  legacyTelemetryPath?: string;
52
68
  };
53
69
  /**
54
- * Lee y fusiona los eventos de **todas** las sesiones bajo `dir` (glob `*.jsonl`)
55
- * más, opcionalmente, el telemetry legacy mapeado a `route` events. Orden
56
- * cronológico ascendente por `ts`. No lanza si el directorio no existe.
70
+ * Reads and merges events from **all** sessions under `dir` (glob `*.jsonl`)
71
+ * plus, optionally, legacy telemetry mapped to `route` events. Chronological
72
+ * ascending order by `ts`. Does not throw if the directory does not exist.
57
73
  */
58
74
  export declare function readSessionEvents(dir: string, deps: ReadSessionEventsDeps): Promise<OpenTeamEvent[]>;
59
75
  //# sourceMappingURL=eventLog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventLog.d.ts","sourceRoot":"","sources":["../../src/telemetry/eventLog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,UAAU,EAChB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAElE,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAE1C,sEAAsE;AACtE,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACtD,CAAC;AAEF,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAA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AgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAwBrE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAsBpE;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,UAAU,EAAE,CAAC,CASvB;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,kEAAkE;IAClE,OAAO,EAAE,eAAe,CAAC;IACzB,6DAA6D;IAC7D,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,aAAa,EAAE,CAAC,CAgC1B"}
@@ -1,17 +1,17 @@
1
1
  import { z } from "zod";
2
2
  /**
3
- * Modelo de eventos de openteam. Cada sesión de opencode escribe una secuencia
4
- * de estos eventos (JSONL) que el console agrega. Discriminados por `type`.
3
+ * openteam event model. Each opencode session writes a sequence of these events
4
+ * (JSONL) that the console aggregates. Discriminated by `type`.
5
5
  *
6
- * Privacidad: **nunca** contienen texto de prompt, argumentos de tool ni salida
7
- * en claro; solo `promptHash`, contadores y resúmenes ya redactados. La garantía
8
- * es el **no-almacenamiento** del prompt crudo; `promptHash` es solo un id de
9
- * correlación no-criptográfico (ver `telemetry/hash.ts`), no una ofuscación.
6
+ * Privacy: they **never** contain prompt text, tool arguments, or cleartext
7
+ * output; only `promptHash`, counters, and already-redacted summaries. The
8
+ * guarantee is the **non-storage** of the raw prompt; `promptHash` is only a
9
+ * non-cryptographic correlation id (see `telemetry/hash.ts`), not an obfuscation.
10
10
  *
11
- * Módulo puro: sin I/O, red, reloj, random ni env vars.
11
+ * Pure module: no I/O, network, clock, random, or env vars.
12
12
  */
13
13
  export declare const EVENT_SCHEMA_VERSION: 1;
14
- /** Decisión de routing (superconjunto de `CostRecord` + correlación). */
14
+ /** Routing decision (superset of `CostRecord` + correlation). */
15
15
  export declare const RouteEventSchema: z.ZodObject<{
16
16
  v: z.ZodLiteral<1>;
17
17
  ts: z.ZodNumber;
@@ -26,13 +26,14 @@ export declare const RouteEventSchema: z.ZodObject<{
26
26
  trivial: "trivial";
27
27
  }>;
28
28
  routeKind: z.ZodEnum<{
29
+ blocked: "blocked";
29
30
  frontier: "frontier";
30
31
  local: "local";
31
32
  }>;
32
33
  selected: z.ZodObject<{
33
34
  providerID: z.ZodString;
34
35
  modelID: z.ZodString;
35
- }, z.core.$strip>;
36
+ }, z.core.$strict>;
36
37
  rationale: z.ZodString;
37
38
  estimatedCostUSD: z.ZodNumber;
38
39
  baselineCostUSD: z.ZodNumber;
@@ -47,8 +48,8 @@ export declare const RouteEventSchema: z.ZodObject<{
47
48
  taskID: z.ZodOptional<z.ZodString>;
48
49
  failureReason: z.ZodOptional<z.ZodString>;
49
50
  failureStage: z.ZodOptional<z.ZodString>;
50
- }, z.core.$strip>;
51
- /** Mensaje del asistente completado: coste y tokens **reales** de opencode. */
51
+ }, z.core.$strict>;
52
+ /** Completed assistant message: **actual** opencode cost and tokens. */
52
53
  export declare const MessageEventSchema: z.ZodObject<{
53
54
  v: z.ZodLiteral<1>;
54
55
  ts: z.ZodNumber;
@@ -66,8 +67,8 @@ export declare const MessageEventSchema: z.ZodObject<{
66
67
  tokensCacheRead: z.ZodNumber;
67
68
  tokensCacheWrite: z.ZodNumber;
68
69
  durationMs: z.ZodNumber;
69
- }, z.core.$strip>;
70
- /** Ejecución de una tool con su duración (correlada por `callID`). */
70
+ }, z.core.$strict>;
71
+ /** Execution of a tool with its duration (correlated by `callID`). */
71
72
  export declare const ToolcallEventSchema: z.ZodObject<{
72
73
  v: z.ZodLiteral<1>;
73
74
  ts: z.ZodNumber;
@@ -79,8 +80,8 @@ export declare const ToolcallEventSchema: z.ZodObject<{
79
80
  durationMs: z.ZodNumber;
80
81
  ok: z.ZodBoolean;
81
82
  title: z.ZodOptional<z.ZodString>;
82
- }, z.core.$strip>;
83
- /** Reunión: un batch multi-agente lanzado por el orquestador. */
83
+ }, z.core.$strict>;
84
+ /** Meeting: a multi-agent batch launched by the orchestrator. */
84
85
  export declare const MeetingEventSchema: z.ZodObject<{
85
86
  v: z.ZodLiteral<1>;
86
87
  ts: z.ZodNumber;
@@ -90,8 +91,8 @@ export declare const MeetingEventSchema: z.ZodObject<{
90
91
  purpose: z.ZodOptional<z.ZodString>;
91
92
  roles: z.ZodArray<z.ZodString>;
92
93
  decisionIDs: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
- }, z.core.$strip>;
94
- /** Decisión/aprendizaje registrado (scribe u orquestador), redactado. */
94
+ }, z.core.$strict>;
95
+ /** Recorded decision/learning (scribe or orchestrator), redacted. */
95
96
  export declare const DecisionEventSchema: z.ZodObject<{
96
97
  v: z.ZodLiteral<1>;
97
98
  ts: z.ZodNumber;
@@ -100,8 +101,8 @@ export declare const DecisionEventSchema: z.ZodObject<{
100
101
  agent: z.ZodOptional<z.ZodString>;
101
102
  summary: z.ZodString;
102
103
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
- }, z.core.$strip>;
104
- /** Actividad de ciclo de vida de sesión, ya redactada. */
104
+ }, z.core.$strict>;
105
+ /** Session lifecycle activity, already redacted. */
105
106
  export declare const ActivityEventSchema: z.ZodObject<{
106
107
  v: z.ZodLiteral<1>;
107
108
  ts: z.ZodNumber;
@@ -115,13 +116,13 @@ export declare const ActivityEventSchema: z.ZodObject<{
115
116
  }>;
116
117
  agent: z.ZodOptional<z.ZodString>;
117
118
  summary: z.ZodString;
118
- }, z.core.$strip>;
119
+ }, z.core.$strict>;
119
120
  /**
120
- * Endpoint del servidor opencode de una sesión. Lo emite el plugin al arrancar
121
- * usando `PluginInput.serverUrl`, para que la Console sepa cómo conectarse a la
122
- * sesión (terminal/SSE). `url` es solo el origen loopback (`http://host:port`);
123
- * nunca incluye rutas, query ni credenciales. `directory`/`worktree`/`title` son
124
- * metadatos no sensibles del workspace.
121
+ * Endpoint of the opencode server for a session. The plugin emits it at startup
122
+ * using `PluginInput.serverUrl`, so the Console knows how to connect to the
123
+ * session (terminal/SSE). `url` is only the loopback origin
124
+ * (`http://host:port`); it never includes paths, query, or credentials.
125
+ * `directory`/`worktree`/`title` are non-sensitive workspace metadata.
125
126
  */
126
127
  export declare const SessionEndpointEventSchema: z.ZodObject<{
127
128
  v: z.ZodLiteral<1>;
@@ -132,7 +133,7 @@ export declare const SessionEndpointEventSchema: z.ZodObject<{
132
133
  directory: z.ZodOptional<z.ZodString>;
133
134
  worktree: z.ZodOptional<z.ZodString>;
134
135
  title: z.ZodOptional<z.ZodString>;
135
- }, z.core.$strip>;
136
+ }, z.core.$strict>;
136
137
  /**
137
138
  * Diagnostic event for the shadow producer. Emitted when the shadow pipeline
138
139
  * was attempted but failed — making the failure observable rather than silent.
@@ -152,10 +153,13 @@ export declare const ShadowDiagnosticEventSchema: z.ZodObject<{
152
153
  "invalid-node-id": "invalid-node-id";
153
154
  "journal-append-failed": "journal-append-failed";
154
155
  "journal-create-failed": "journal-create-failed";
156
+ "observation-contained-failure": "observation-contained-failure";
155
157
  "observation-failed": "observation-failed";
158
+ "observation-ineligible": "observation-ineligible";
159
+ "observation-rejected": "observation-rejected";
156
160
  unknown: "unknown";
157
161
  }>;
158
- }, z.core.$strip>;
162
+ }, z.core.$strict>;
159
163
  export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
160
164
  v: z.ZodLiteral<1>;
161
165
  ts: z.ZodNumber;
@@ -170,13 +174,14 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
170
174
  trivial: "trivial";
171
175
  }>;
172
176
  routeKind: z.ZodEnum<{
177
+ blocked: "blocked";
173
178
  frontier: "frontier";
174
179
  local: "local";
175
180
  }>;
176
181
  selected: z.ZodObject<{
177
182
  providerID: z.ZodString;
178
183
  modelID: z.ZodString;
179
- }, z.core.$strip>;
184
+ }, z.core.$strict>;
180
185
  rationale: z.ZodString;
181
186
  estimatedCostUSD: z.ZodNumber;
182
187
  baselineCostUSD: z.ZodNumber;
@@ -191,7 +196,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
191
196
  taskID: z.ZodOptional<z.ZodString>;
192
197
  failureReason: z.ZodOptional<z.ZodString>;
193
198
  failureStage: z.ZodOptional<z.ZodString>;
194
- }, z.core.$strip>, z.ZodObject<{
199
+ }, z.core.$strict>, z.ZodObject<{
195
200
  v: z.ZodLiteral<1>;
196
201
  ts: z.ZodNumber;
197
202
  sessionID: z.ZodString;
@@ -208,7 +213,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
208
213
  tokensCacheRead: z.ZodNumber;
209
214
  tokensCacheWrite: z.ZodNumber;
210
215
  durationMs: z.ZodNumber;
211
- }, z.core.$strip>, z.ZodObject<{
216
+ }, z.core.$strict>, z.ZodObject<{
212
217
  v: z.ZodLiteral<1>;
213
218
  ts: z.ZodNumber;
214
219
  sessionID: z.ZodString;
@@ -219,7 +224,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
219
224
  durationMs: z.ZodNumber;
220
225
  ok: z.ZodBoolean;
221
226
  title: z.ZodOptional<z.ZodString>;
222
- }, z.core.$strip>, z.ZodObject<{
227
+ }, z.core.$strict>, z.ZodObject<{
223
228
  v: z.ZodLiteral<1>;
224
229
  ts: z.ZodNumber;
225
230
  sessionID: z.ZodString;
@@ -228,7 +233,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
228
233
  purpose: z.ZodOptional<z.ZodString>;
229
234
  roles: z.ZodArray<z.ZodString>;
230
235
  decisionIDs: z.ZodOptional<z.ZodArray<z.ZodString>>;
231
- }, z.core.$strip>, z.ZodObject<{
236
+ }, z.core.$strict>, z.ZodObject<{
232
237
  v: z.ZodLiteral<1>;
233
238
  ts: z.ZodNumber;
234
239
  sessionID: z.ZodString;
@@ -236,7 +241,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
236
241
  agent: z.ZodOptional<z.ZodString>;
237
242
  summary: z.ZodString;
238
243
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
239
- }, z.core.$strip>, z.ZodObject<{
244
+ }, z.core.$strict>, z.ZodObject<{
240
245
  v: z.ZodLiteral<1>;
241
246
  ts: z.ZodNumber;
242
247
  sessionID: z.ZodString;
@@ -249,7 +254,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
249
254
  }>;
250
255
  agent: z.ZodOptional<z.ZodString>;
251
256
  summary: z.ZodString;
252
- }, z.core.$strip>, z.ZodObject<{
257
+ }, z.core.$strict>, z.ZodObject<{
253
258
  v: z.ZodLiteral<1>;
254
259
  ts: z.ZodNumber;
255
260
  sessionID: z.ZodString;
@@ -258,7 +263,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
258
263
  directory: z.ZodOptional<z.ZodString>;
259
264
  worktree: z.ZodOptional<z.ZodString>;
260
265
  title: z.ZodOptional<z.ZodString>;
261
- }, z.core.$strip>, z.ZodObject<{
266
+ }, z.core.$strict>, z.ZodObject<{
262
267
  v: z.ZodLiteral<1>;
263
268
  ts: z.ZodNumber;
264
269
  sessionID: z.ZodString;
@@ -268,10 +273,13 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
268
273
  "invalid-node-id": "invalid-node-id";
269
274
  "journal-append-failed": "journal-append-failed";
270
275
  "journal-create-failed": "journal-create-failed";
276
+ "observation-contained-failure": "observation-contained-failure";
271
277
  "observation-failed": "observation-failed";
278
+ "observation-ineligible": "observation-ineligible";
279
+ "observation-rejected": "observation-rejected";
272
280
  unknown: "unknown";
273
281
  }>;
274
- }, z.core.$strip>], "type">;
282
+ }, z.core.$strict>], "type">;
275
283
  export type OpenTeamEvent = z.infer<typeof OpenTeamEventSchema>;
276
284
  export type RouteEvent = z.infer<typeof RouteEventSchema>;
277
285
  export type MessageEvent = z.infer<typeof MessageEventSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/telemetry/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,EAAG,CAAU,CAAC;AAW/C,yEAAyE;AACzE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqB3B,CAAC;AAEH,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;iBAc7B,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,mBAAmB;;;;;;;;;;;iBAS9B,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,kBAAkB;;;;;;;;;iBAM7B,CAAC;AAEH,yEAAyE;AACzE,eAAO,MAAM,mBAAmB;;;;;;;;iBAK9B,CAAC;AAEH,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAK9B,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;iBAMrC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;iBAWtC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAS9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,O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
+ /**
3
+ * Fan-out `EventSink` (W1-S02, see #161). Composes several sinks so that
4
+ * enabling a cloud backend *augments* rather than replaces the local JSONL
5
+ * event log.
6
+ *
7
+ * Every child sink's `emit` is isolated: a throw or rejection from one sink is
8
+ * routed to `onError` and never blocks the others, and the fan-out `emit` itself
9
+ * never throws — preserving the `EventSink` contract at the new boundary. The
10
+ * children run concurrently so a slow sink does not serialize the fast ones.
11
+ */
12
+ export type FanOutSinkDeps = {
13
+ readonly sinks: readonly EventSink[];
14
+ readonly onError?: (error: unknown) => void;
15
+ };
16
+ /** Creates a sink that emits every event to all composed sinks, fault-isolated. */
17
+ export declare function createFanOutSink(deps: FanOutSinkDeps): EventSink;
18
+ //# sourceMappingURL=fanout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fanout.d.ts","sourceRoot":"","sources":["../../src/telemetry/fanout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,CAchE"}
@@ -1,15 +1,15 @@
1
1
  import type { ErrorClass, GraphEventType, GraphEventV1 } from "../graph/schema";
2
2
  /**
3
- * Proyección de telemetría **reference-only** de eventos de Graph (GE-037).
3
+ * **Reference-only** telemetry projection for Graph events (GE-037).
4
4
  *
5
- * `projectGraphEvent` mapea un evento validado a un registro de telemetría con
6
- * un conjunto de campos **allow-listed y acotados**: envoltura (`v`, `seq`,
7
- * `runID`, `type`) más identificadores/digests concretos según el tipo. Nunca
8
- * copia el evento entero ni transporta contenido crudo; el artefacto se reduce
9
- * a su referencia (`uri`, `sha256`, `bytes`). Un guard final rechaza cualquier
10
- * campo de contenido crudo. Puro y determinista: sin I/O, reloj ni random.
5
+ * `projectGraphEvent` maps a validated event to a telemetry record with a set
6
+ * of **allow-listed and bounded** fields: wrapper (`v`, `seq`, `runID`, `type`)
7
+ * plus concrete identifiers/digests depending on the type. It never copies the
8
+ * entire event or transports raw content; the artifact is reduced to its
9
+ * reference (`uri`, `sha256`, `bytes`). A final guard rejects any raw-content
10
+ * field. Pure and deterministic: no I/O, clock, or random.
11
11
  */
12
- /** Registro de telemetría de un evento Graph: solo campos allow-listed. */
12
+ /** Telemetry record for a Graph event: only allow-listed fields. */
13
13
  export type GraphTelemetryRecord = {
14
14
  readonly v: number;
15
15
  readonly seq: number;
@@ -27,10 +27,10 @@ export type GraphTelemetryRecord = {
27
27
  };
28
28
  };
29
29
  /**
30
- * Proyecta un evento Graph a un registro de telemetría reference-only. Solo
31
- * emite los campos allow-listed presentes en el evento y reduce el artefacto a
32
- * su referencia; el guard reference-only asegura que ningún derivado futuro
33
- * introduzca contenido crudo.
30
+ * Projects a Graph event to a reference-only telemetry record. It only emits
31
+ * the allow-listed fields present on the event and reduces the artifact to its
32
+ * reference; the reference-only guard ensures that no future derivative
33
+ * introduces raw content.
34
34
  */
35
35
  export declare function projectGraphEvent(event: GraphEventV1): GraphTelemetryRecord;
36
36
  //# sourceMappingURL=graphProjection.d.ts.map