@jmanuelcorral/openteam 0.2.1 → 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.
- package/.opencode/command/openteam.md +2 -1
- package/.opencode/openteam.example.json +27 -8
- package/AGENTS.md +5 -2
- package/README.es.md +155 -59
- package/README.md +418 -62
- package/dist/capabilities/types.d.ts +3 -3
- package/dist/capabilities/types.d.ts.map +1 -1
- package/dist/classifier/localClassifier.d.ts +0 -2
- package/dist/classifier/localClassifier.d.ts.map +1 -1
- package/dist/cli/consoleServe.d.ts +30 -1
- package/dist/cli/consoleServe.d.ts.map +1 -1
- package/dist/cli/graphOperator.d.ts +22 -0
- package/dist/cli/graphOperator.d.ts.map +1 -0
- package/dist/cli/graphStatusSnapshot.d.ts +16 -0
- package/dist/cli/graphStatusSnapshot.d.ts.map +1 -0
- package/dist/cli/graphViewProvider.d.ts +30 -0
- package/dist/cli/graphViewProvider.d.ts.map +1 -0
- package/dist/cli/migrateAdapter.d.ts +12 -0
- package/dist/cli/migrateAdapter.d.ts.map +1 -0
- package/dist/cli/purgeAdapter.d.ts +10 -0
- package/dist/cli/purgeAdapter.d.ts.map +1 -0
- package/dist/cli/setupAdapters.d.ts.map +1 -1
- package/dist/cli.js +13480 -5176
- package/dist/commands/agents.d.ts +102 -2
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/baseline.d.ts.map +1 -1
- package/dist/commands/clearCache.d.ts +23 -0
- package/dist/commands/clearCache.d.ts.map +1 -0
- package/dist/commands/dispatch.d.ts +197 -4
- package/dist/commands/dispatch.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts +40 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/frontierCatalog.d.ts +8 -14
- package/dist/commands/frontierCatalog.d.ts.map +1 -1
- package/dist/commands/graph.d.ts +0 -27
- package/dist/commands/graph.d.ts.map +1 -1
- package/dist/commands/local.d.ts.map +1 -1
- package/dist/commands/migrate.d.ts +11 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/purge.d.ts +132 -0
- package/dist/commands/purge.d.ts.map +1 -0
- package/dist/commands/report.d.ts +1 -0
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/setup.d.ts +62 -5
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/config/errors.d.ts +10 -0
- package/dist/config/errors.d.ts.map +1 -0
- package/dist/config/legacyMigration.d.ts +82 -0
- package/dist/config/legacyMigration.d.ts.map +1 -0
- package/dist/config/legacyPaths.d.ts +105 -0
- package/dist/config/legacyPaths.d.ts.map +1 -0
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/opencode.d.ts +63 -0
- package/dist/config/opencode.d.ts.map +1 -0
- package/dist/config/persist.d.ts +8 -0
- package/dist/config/persist.d.ts.map +1 -1
- package/dist/config/resolve.d.ts +1 -1
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/runtime.d.ts +62 -0
- package/dist/config/runtime.d.ts.map +1 -0
- package/dist/config/schema.d.ts +145 -77
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/console/assets.d.ts +2 -2
- package/dist/console/assets.d.ts.map +1 -1
- package/dist/console/configView.d.ts +74 -0
- package/dist/console/configView.d.ts.map +1 -0
- package/dist/console/opencodeClient.d.ts +8 -6
- package/dist/console/opencodeClient.d.ts.map +1 -1
- package/dist/console/protocol.d.ts +30 -6
- package/dist/console/protocol.d.ts.map +1 -1
- package/dist/console/render.d.ts +30 -1
- package/dist/console/render.d.ts.map +1 -1
- package/dist/console/types.d.ts +1 -1
- package/dist/console/types.d.ts.map +1 -1
- package/dist/context/redaction.d.ts +27 -19
- package/dist/context/redaction.d.ts.map +1 -1
- package/dist/context/schema.d.ts +26 -26
- package/dist/context/schema.d.ts.map +1 -1
- package/dist/context/types.d.ts +3 -3
- package/dist/contract/opencode.d.ts +39 -23
- package/dist/contract/opencode.d.ts.map +1 -1
- package/dist/graph/certificate.d.ts +37 -16
- package/dist/graph/certificate.d.ts.map +1 -1
- package/dist/graph/langgraph/adapter.d.ts +56 -0
- package/dist/graph/langgraph/adapter.d.ts.map +1 -0
- package/dist/graph/langgraph/certification.d.ts +64 -0
- package/dist/graph/langgraph/certification.d.ts.map +1 -0
- package/dist/graph/langgraph/checkpointReplay.d.ts +49 -0
- package/dist/graph/langgraph/checkpointReplay.d.ts.map +1 -0
- package/dist/graph/langgraph/checkpointer.d.ts +49 -0
- package/dist/graph/langgraph/checkpointer.d.ts.map +1 -0
- package/dist/graph/langgraph/engine.d.ts +34 -0
- package/dist/graph/langgraph/engine.d.ts.map +1 -0
- package/dist/graph/langgraph/graphModel.d.ts +37 -0
- package/dist/graph/langgraph/graphModel.d.ts.map +1 -0
- package/dist/graph/langgraph/reducer.d.ts +18 -0
- package/dist/graph/langgraph/reducer.d.ts.map +1 -0
- package/dist/graph/langgraph/retirement.d.ts +59 -0
- package/dist/graph/langgraph/retirement.d.ts.map +1 -0
- package/dist/graph/langgraph/types.d.ts +65 -0
- package/dist/graph/langgraph/types.d.ts.map +1 -0
- package/dist/graph/privacyPolicy.d.ts +7 -0
- package/dist/graph/privacyPolicy.d.ts.map +1 -1
- package/dist/graph/soakLedger.d.ts.map +1 -1
- package/dist/graph/types.d.ts +0 -2
- package/dist/graph/types.d.ts.map +1 -1
- package/dist/index.d.ts +48 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11596 -4180
- package/dist/local/cacheAdapter.d.ts +7 -0
- package/dist/local/cacheAdapter.d.ts.map +1 -0
- package/dist/local/concurrency.d.ts +52 -0
- package/dist/local/concurrency.d.ts.map +1 -0
- package/dist/local/embeddings.d.ts +10 -10
- package/dist/local/embeddings.d.ts.map +1 -1
- package/dist/local/extractClient.d.ts +13 -10
- package/dist/local/extractClient.d.ts.map +1 -1
- package/dist/local/lemonade.d.ts +4 -0
- package/dist/local/lemonade.d.ts.map +1 -0
- package/dist/local/registry.d.ts +16 -0
- package/dist/local/registry.d.ts.map +1 -1
- package/dist/local/types.d.ts +1 -1
- package/dist/local/types.d.ts.map +1 -1
- package/dist/mcp/semanticRecall.d.ts +18 -1
- package/dist/mcp/semanticRecall.d.ts.map +1 -1
- package/dist/mcp/server.d.ts +41 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/memory/embedText.d.ts +4 -0
- package/dist/memory/embedText.d.ts.map +1 -0
- package/dist/memory/extract.d.ts +33 -18
- package/dist/memory/extract.d.ts.map +1 -1
- package/dist/memory/fold.d.ts +3 -2
- package/dist/memory/fold.d.ts.map +1 -1
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/inject.d.ts.map +1 -1
- package/dist/memory/log.d.ts +15 -4
- package/dist/memory/log.d.ts.map +1 -1
- package/dist/memory/merge.d.ts +18 -1
- package/dist/memory/merge.d.ts.map +1 -1
- package/dist/memory/traverse.d.ts +80 -0
- package/dist/memory/traverse.d.ts.map +1 -0
- package/dist/memory/types.d.ts +53 -7
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/messages/commands.d.ts +84 -0
- package/dist/messages/commands.d.ts.map +1 -0
- package/dist/messages/index.d.ts +46 -0
- package/dist/messages/index.d.ts.map +1 -0
- package/dist/opencodeArtifacts/index.d.ts +33 -0
- package/dist/opencodeArtifacts/index.d.ts.map +1 -0
- package/dist/opencodeArtifacts/orchestratorAgent.d.ts +29 -0
- package/dist/opencodeArtifacts/orchestratorAgent.d.ts.map +1 -0
- package/dist/opencodeArtifacts/slashCommand.d.ts +31 -0
- package/dist/opencodeArtifacts/slashCommand.d.ts.map +1 -0
- package/dist/orchestrator/coordinator.d.ts +188 -2
- package/dist/orchestrator/coordinator.d.ts.map +1 -1
- package/dist/orchestrator/graphCancellation.d.ts +40 -37
- package/dist/orchestrator/graphCancellation.d.ts.map +1 -1
- package/dist/orchestrator/graphEffects.d.ts +24 -24
- package/dist/orchestrator/graphEffects.d.ts.map +1 -1
- package/dist/orchestrator/graphFacade.d.ts +16 -16
- package/dist/orchestrator/graphFacade.d.ts.map +1 -1
- package/dist/orchestrator/graphIngress.d.ts +49 -45
- package/dist/orchestrator/graphIngress.d.ts.map +1 -1
- package/dist/orchestrator/graphReview.d.ts +24 -23
- package/dist/orchestrator/graphReview.d.ts.map +1 -1
- package/dist/orchestrator/graphRuntime.d.ts +27 -26
- package/dist/orchestrator/graphRuntime.d.ts.map +1 -1
- package/dist/orchestrator/graphShadow.d.ts +70 -69
- package/dist/orchestrator/graphShadow.d.ts.map +1 -1
- package/dist/orchestrator/opencodeSessionAdapter.d.ts +25 -25
- package/dist/orchestrator/opencodeSessionAdapter.d.ts.map +1 -1
- package/dist/orchestrator/permissions.d.ts.map +1 -1
- package/dist/orchestrator/ralphLoop.d.ts +57 -0
- package/dist/orchestrator/ralphLoop.d.ts.map +1 -0
- package/dist/orchestrator/roles.d.ts +50 -8
- package/dist/orchestrator/roles.d.ts.map +1 -1
- package/dist/orchestrator/roster.d.ts +103 -0
- package/dist/orchestrator/roster.d.ts.map +1 -0
- package/dist/orchestrator/rosterPersistence.d.ts +22 -0
- package/dist/orchestrator/rosterPersistence.d.ts.map +1 -0
- package/dist/orchestrator/runtimeSelection.d.ts +46 -0
- package/dist/orchestrator/runtimeSelection.d.ts.map +1 -0
- package/dist/orchestrator/sddCompiler.d.ts +34 -34
- package/dist/orchestrator/sddCompiler.d.ts.map +1 -1
- package/dist/orchestrator/sessionReconciler.d.ts +31 -29
- package/dist/orchestrator/sessionReconciler.d.ts.map +1 -1
- package/dist/orchestrator/shadowComparator.d.ts +23 -23
- package/dist/orchestrator/shadowComparator.d.ts.map +1 -1
- package/dist/orchestrator/subsessions.d.ts.map +1 -1
- package/dist/orchestrator/worktreeAdapter.d.ts +12 -12
- package/dist/orchestrator/worktreeAdapter.d.ts.map +1 -1
- package/dist/orchestrator/worktreeDispatch.d.ts +34 -34
- package/dist/orchestrator/worktreeDispatch.d.ts.map +1 -1
- package/dist/orchestrator/worktreeReconciler.d.ts +37 -36
- package/dist/orchestrator/worktreeReconciler.d.ts.map +1 -1
- package/dist/plugin/availability.d.ts.map +1 -1
- package/dist/plugin/capture.d.ts +12 -12
- package/dist/plugin/capture.d.ts.map +1 -1
- package/dist/plugin/commandTool.d.ts +1 -1
- package/dist/plugin/commandTool.d.ts.map +1 -1
- package/dist/plugin/graphShadowIngress.d.ts +50 -48
- package/dist/plugin/graphShadowIngress.d.ts.map +1 -1
- package/dist/plugin/graphTool.d.ts +25 -23
- package/dist/plugin/graphTool.d.ts.map +1 -1
- package/dist/plugin/hooks.d.ts +10 -10
- package/dist/plugin/hooks.d.ts.map +1 -1
- package/dist/plugin/legacyRunProducer.d.ts +22 -22
- package/dist/plugin/legacyRunProducer.d.ts.map +1 -1
- package/dist/plugin/memoryInject.d.ts +6 -6
- package/dist/plugin/memoryInject.d.ts.map +1 -1
- package/dist/plugin/memoryTool.d.ts +36 -0
- package/dist/plugin/memoryTool.d.ts.map +1 -0
- package/dist/plugin/orchestrateTool.d.ts +230 -0
- package/dist/plugin/orchestrateTool.d.ts.map +1 -0
- package/dist/plugin/reportRunSchema.d.ts +8 -8
- package/dist/plugin/reportRunSchema.d.ts.map +1 -1
- package/dist/plugin/sessionTracker.d.ts +15 -15
- package/dist/plugin/sessionTracker.d.ts.map +1 -1
- package/dist/plugin/shadowPipeline.d.ts +2 -1
- package/dist/plugin/shadowPipeline.d.ts.map +1 -1
- package/dist/plugin/soakObserver.d.ts +18 -11
- package/dist/plugin/soakObserver.d.ts.map +1 -1
- package/dist/plugin/toolcalls.d.ts +3 -3
- package/dist/router/chooseModel.d.ts.map +1 -1
- package/dist/router/frontierBaseline.d.ts +3 -3
- package/dist/router/modelSelection.d.ts +12 -4
- package/dist/router/modelSelection.d.ts.map +1 -1
- package/dist/router/types.d.ts +6 -1
- package/dist/router/types.d.ts.map +1 -1
- package/dist/storage/graph/snapshot.d.ts.map +1 -1
- package/dist/storage/graph/soakRecorder.d.ts +14 -1
- package/dist/storage/graph/soakRecorder.d.ts.map +1 -1
- package/dist/storage/graph/workspaceLease.d.ts +1 -1
- package/dist/storage/graph/workspaceLease.d.ts.map +1 -1
- package/dist/storage/graph/worktreeRegistry.d.ts +1 -1
- package/dist/storage/graph/worktreeRegistry.d.ts.map +1 -1
- package/dist/storage/httpStorageProvider.d.ts +2 -2
- package/dist/storage/index/bunSqlite.d.ts +1 -0
- package/dist/storage/index/bunSqlite.d.ts.map +1 -1
- package/dist/storage/index/memoryConsolidate.d.ts +2 -0
- package/dist/storage/index/memoryConsolidate.d.ts.map +1 -1
- package/dist/storage/index/memoryEmbeddings.d.ts +51 -0
- package/dist/storage/index/memoryEmbeddings.d.ts.map +1 -0
- package/dist/storage/index/memoryIndex.d.ts +36 -4
- package/dist/storage/index/memoryIndex.d.ts.map +1 -1
- package/dist/storage/index/memoryRecall.d.ts +1 -1
- package/dist/storage/index/memoryRecall.d.ts.map +1 -1
- package/dist/storage/index/memoryRuntime.d.ts +2 -0
- package/dist/storage/index/memoryRuntime.d.ts.map +1 -1
- package/dist/storage/index/sqliteIndex.d.ts +18 -1
- package/dist/storage/index/sqliteIndex.d.ts.map +1 -1
- package/dist/storage/path.d.ts.map +1 -1
- package/dist/telemetry/aggregate.d.ts +12 -12
- package/dist/telemetry/aggregate.d.ts.map +1 -1
- package/dist/telemetry/cost.d.ts.map +1 -1
- package/dist/telemetry/decisions.d.ts +11 -11
- package/dist/telemetry/decisions.d.ts.map +1 -1
- package/dist/telemetry/eventLog.d.ts +41 -25
- package/dist/telemetry/eventLog.d.ts.map +1 -1
- package/dist/telemetry/events.d.ts +79 -34
- package/dist/telemetry/events.d.ts.map +1 -1
- package/dist/telemetry/fanout.d.ts +18 -0
- package/dist/telemetry/fanout.d.ts.map +1 -0
- package/dist/telemetry/graphProjection.d.ts +12 -12
- package/dist/telemetry/graphProjection.d.ts.map +1 -1
- package/dist/telemetry/graphRuntimeHealth.d.ts +26 -26
- package/dist/telemetry/graphRuntimeHealth.d.ts.map +1 -1
- package/dist/telemetry/graphView.d.ts +20 -20
- package/dist/telemetry/graphView.d.ts.map +1 -1
- package/dist/telemetry/otel.d.ts +86 -0
- package/dist/telemetry/otel.d.ts.map +1 -0
- package/dist/telemetry/otelConfig.d.ts +128 -0
- package/dist/telemetry/otelConfig.d.ts.map +1 -0
- package/dist/telemetry/otelExporter.d.ts +7 -0
- package/dist/telemetry/otelExporter.d.ts.map +1 -0
- package/dist/telemetry/read.d.ts +18 -4
- package/dist/telemetry/read.d.ts.map +1 -1
- package/dist/telemetry/types.d.ts +3 -2
- package/dist/telemetry/types.d.ts.map +1 -1
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/web/configApi.d.ts +154 -0
- package/dist/web/configApi.d.ts.map +1 -0
- package/dist/web/configRoute.d.ts +57 -0
- package/dist/web/configRoute.d.ts.map +1 -0
- package/dist/web/console.d.ts +8 -0
- package/dist/web/console.d.ts.map +1 -1
- package/dist/web/paths.d.ts +4 -3
- package/dist/web/paths.d.ts.map +1 -1
- package/dist/web/server.d.ts +30 -1
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/start.d.ts +15 -0
- package/dist/web/start.d.ts.map +1 -1
- package/dist/web/storageRoute.d.ts +2 -2
- package/package.json +13 -7
- package/dist/cli/tunnel.d.ts +0 -89
- package/dist/cli/tunnel.d.ts.map +0 -1
- package/dist/commands/orchestratorAgent.d.ts +0 -30
- package/dist/commands/orchestratorAgent.d.ts.map +0 -1
- package/dist/commands/slashCommand.d.ts +0 -39
- package/dist/commands/slashCommand.d.ts.map +0 -1
- package/dist/orchestrator/ledger.d.ts +0 -28
- package/dist/orchestrator/ledger.d.ts.map +0 -1
- package/dist/storage/graph/importLegacy.d.ts +0 -62
- package/dist/storage/graph/importLegacy.d.ts.map +0 -1
- package/dist/storage/graph/migrateLegacyBriefs.d.ts +0 -32
- package/dist/storage/graph/migrateLegacyBriefs.d.ts.map +0 -1
- package/dist/storage/graph/migration.d.ts +0 -91
- package/dist/storage/graph/migration.d.ts.map +0 -1
- package/dist/storage/graph/projections.d.ts +0 -31
- package/dist/storage/graph/projections.d.ts.map +0 -1
|
@@ -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,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,0EAA0E;AAC1E,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CACh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vB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAIjB"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
|
18
|
-
* `session-endpoint
|
|
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`
|
|
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
|
-
/**
|
|
45
|
+
/** Models used: "providerID/modelID", stable order. */
|
|
46
46
|
models: string[];
|
|
47
|
-
/**
|
|
47
|
+
/** Agents seen, stable order. */
|
|
48
48
|
agents: string[];
|
|
49
|
-
/** Endpoint
|
|
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
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
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,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,
|
|
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,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC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AE1C,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;
|
|
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
|
-
*
|
|
3
|
+
* **Pure** parser for the scribe's decision log (`openteam-decisions.md`).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `decision` events
|
|
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
|
-
*
|
|
10
|
-
* literal
|
|
9
|
+
* No I/O, network, clock (`now`), random, or env vars. `Date.parse` on a
|
|
10
|
+
* literal date is deterministic.
|
|
11
11
|
*/
|
|
12
|
-
/**
|
|
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
|
-
/**
|
|
15
|
+
/** Session to which decisions are attributed. Defaults to `DECISIONS_SESSION_ID`. */
|
|
16
16
|
sessionID?: string;
|
|
17
|
-
/**
|
|
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
|
-
*
|
|
22
|
-
*
|
|
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
|
|
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
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
16
|
+
/** Destination directory (`sessions/`). */
|
|
16
17
|
dir: string;
|
|
17
|
-
/**
|
|
18
|
+
/** Persistence backend (writes with `append`). */
|
|
18
19
|
storage: StorageProvider;
|
|
19
20
|
onError?: (error: unknown) => void;
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
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
|
-
*
|
|
29
|
-
* Puro.
|
|
29
|
+
* Rejection detail for a single session event JSONL line.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
32
|
-
|
|
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
|
-
*
|
|
36
|
-
* `summarizeCostRecords`/
|
|
37
|
-
* (decisionID/agent/…),
|
|
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
|
-
*
|
|
42
|
-
* fallback)
|
|
43
|
-
* `openteam
|
|
44
|
-
*
|
|
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
|
-
/**
|
|
64
|
+
/** Persistence backend (lists with `list`, reads with `read`). */
|
|
49
65
|
storage: StorageProvider;
|
|
50
|
-
/**
|
|
66
|
+
/** Legacy telemetry to merge as `route` events. Optional. */
|
|
51
67
|
legacyTelemetryPath?: string;
|
|
52
68
|
};
|
|
53
69
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
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
|
|
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;mFACmF;AACnF,eAAO,MAAM,oBAAoB,sCAAsC,CAAC;AAExE,0EAA0E;AA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,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
|
-
*
|
|
4
|
-
*
|
|
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
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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
|
-
*
|
|
11
|
+
* Pure module: no I/O, network, clock, random, or env vars.
|
|
12
12
|
*/
|
|
13
13
|
export declare const EVENT_SCHEMA_VERSION: 1;
|
|
14
|
-
/**
|
|
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.$
|
|
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.$
|
|
51
|
-
/**
|
|
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.$
|
|
70
|
-
/**
|
|
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.$
|
|
83
|
-
/**
|
|
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.$
|
|
94
|
-
/**
|
|
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.$
|
|
104
|
-
/**
|
|
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.$
|
|
119
|
+
}, z.core.$strict>;
|
|
119
120
|
/**
|
|
120
|
-
* Endpoint
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
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,33 @@ 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.$
|
|
136
|
+
}, z.core.$strict>;
|
|
137
|
+
/**
|
|
138
|
+
* Diagnostic event for the shadow producer. Emitted when the shadow pipeline
|
|
139
|
+
* was attempted but failed — making the failure observable rather than silent.
|
|
140
|
+
* Without this, a broken journal root or invalid roleID would silently prevent
|
|
141
|
+
* soak observations from accumulating, and the only symptom would be an absence.
|
|
142
|
+
*
|
|
143
|
+
* `failureClass` is a bounded code — never a raw error string, which could
|
|
144
|
+
* contain filesystem paths or SDK error messages that echo request content.
|
|
145
|
+
*/
|
|
146
|
+
export declare const ShadowDiagnosticEventSchema: z.ZodObject<{
|
|
147
|
+
v: z.ZodLiteral<1>;
|
|
148
|
+
ts: z.ZodNumber;
|
|
149
|
+
sessionID: z.ZodString;
|
|
150
|
+
type: z.ZodLiteral<"shadow-diagnostic">;
|
|
151
|
+
batchID: z.ZodString;
|
|
152
|
+
failureClass: z.ZodEnum<{
|
|
153
|
+
"invalid-node-id": "invalid-node-id";
|
|
154
|
+
"journal-append-failed": "journal-append-failed";
|
|
155
|
+
"journal-create-failed": "journal-create-failed";
|
|
156
|
+
"observation-contained-failure": "observation-contained-failure";
|
|
157
|
+
"observation-failed": "observation-failed";
|
|
158
|
+
"observation-ineligible": "observation-ineligible";
|
|
159
|
+
"observation-rejected": "observation-rejected";
|
|
160
|
+
unknown: "unknown";
|
|
161
|
+
}>;
|
|
162
|
+
}, z.core.$strict>;
|
|
136
163
|
export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
137
164
|
v: z.ZodLiteral<1>;
|
|
138
165
|
ts: z.ZodNumber;
|
|
@@ -147,13 +174,14 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
147
174
|
trivial: "trivial";
|
|
148
175
|
}>;
|
|
149
176
|
routeKind: z.ZodEnum<{
|
|
177
|
+
blocked: "blocked";
|
|
150
178
|
frontier: "frontier";
|
|
151
179
|
local: "local";
|
|
152
180
|
}>;
|
|
153
181
|
selected: z.ZodObject<{
|
|
154
182
|
providerID: z.ZodString;
|
|
155
183
|
modelID: z.ZodString;
|
|
156
|
-
}, z.core.$
|
|
184
|
+
}, z.core.$strict>;
|
|
157
185
|
rationale: z.ZodString;
|
|
158
186
|
estimatedCostUSD: z.ZodNumber;
|
|
159
187
|
baselineCostUSD: z.ZodNumber;
|
|
@@ -168,7 +196,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
168
196
|
taskID: z.ZodOptional<z.ZodString>;
|
|
169
197
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
170
198
|
failureStage: z.ZodOptional<z.ZodString>;
|
|
171
|
-
}, z.core.$
|
|
199
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
172
200
|
v: z.ZodLiteral<1>;
|
|
173
201
|
ts: z.ZodNumber;
|
|
174
202
|
sessionID: z.ZodString;
|
|
@@ -185,7 +213,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
185
213
|
tokensCacheRead: z.ZodNumber;
|
|
186
214
|
tokensCacheWrite: z.ZodNumber;
|
|
187
215
|
durationMs: z.ZodNumber;
|
|
188
|
-
}, z.core.$
|
|
216
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
189
217
|
v: z.ZodLiteral<1>;
|
|
190
218
|
ts: z.ZodNumber;
|
|
191
219
|
sessionID: z.ZodString;
|
|
@@ -196,7 +224,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
196
224
|
durationMs: z.ZodNumber;
|
|
197
225
|
ok: z.ZodBoolean;
|
|
198
226
|
title: z.ZodOptional<z.ZodString>;
|
|
199
|
-
}, z.core.$
|
|
227
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
200
228
|
v: z.ZodLiteral<1>;
|
|
201
229
|
ts: z.ZodNumber;
|
|
202
230
|
sessionID: z.ZodString;
|
|
@@ -205,7 +233,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
205
233
|
purpose: z.ZodOptional<z.ZodString>;
|
|
206
234
|
roles: z.ZodArray<z.ZodString>;
|
|
207
235
|
decisionIDs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
208
|
-
}, z.core.$
|
|
236
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
209
237
|
v: z.ZodLiteral<1>;
|
|
210
238
|
ts: z.ZodNumber;
|
|
211
239
|
sessionID: z.ZodString;
|
|
@@ -213,7 +241,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
213
241
|
agent: z.ZodOptional<z.ZodString>;
|
|
214
242
|
summary: z.ZodString;
|
|
215
243
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
216
|
-
}, z.core.$
|
|
244
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
217
245
|
v: z.ZodLiteral<1>;
|
|
218
246
|
ts: z.ZodNumber;
|
|
219
247
|
sessionID: z.ZodString;
|
|
@@ -226,7 +254,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
226
254
|
}>;
|
|
227
255
|
agent: z.ZodOptional<z.ZodString>;
|
|
228
256
|
summary: z.ZodString;
|
|
229
|
-
}, z.core.$
|
|
257
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
230
258
|
v: z.ZodLiteral<1>;
|
|
231
259
|
ts: z.ZodNumber;
|
|
232
260
|
sessionID: z.ZodString;
|
|
@@ -235,7 +263,23 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
235
263
|
directory: z.ZodOptional<z.ZodString>;
|
|
236
264
|
worktree: z.ZodOptional<z.ZodString>;
|
|
237
265
|
title: z.ZodOptional<z.ZodString>;
|
|
238
|
-
}, z.core.$
|
|
266
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
267
|
+
v: z.ZodLiteral<1>;
|
|
268
|
+
ts: z.ZodNumber;
|
|
269
|
+
sessionID: z.ZodString;
|
|
270
|
+
type: z.ZodLiteral<"shadow-diagnostic">;
|
|
271
|
+
batchID: z.ZodString;
|
|
272
|
+
failureClass: z.ZodEnum<{
|
|
273
|
+
"invalid-node-id": "invalid-node-id";
|
|
274
|
+
"journal-append-failed": "journal-append-failed";
|
|
275
|
+
"journal-create-failed": "journal-create-failed";
|
|
276
|
+
"observation-contained-failure": "observation-contained-failure";
|
|
277
|
+
"observation-failed": "observation-failed";
|
|
278
|
+
"observation-ineligible": "observation-ineligible";
|
|
279
|
+
"observation-rejected": "observation-rejected";
|
|
280
|
+
unknown: "unknown";
|
|
281
|
+
}>;
|
|
282
|
+
}, z.core.$strict>], "type">;
|
|
239
283
|
export type OpenTeamEvent = z.infer<typeof OpenTeamEventSchema>;
|
|
240
284
|
export type RouteEvent = z.infer<typeof RouteEventSchema>;
|
|
241
285
|
export type MessageEvent = z.infer<typeof MessageEventSchema>;
|
|
@@ -244,5 +288,6 @@ export type MeetingEvent = z.infer<typeof MeetingEventSchema>;
|
|
|
244
288
|
export type DecisionEvent = z.infer<typeof DecisionEventSchema>;
|
|
245
289
|
export type ActivityEvent = z.infer<typeof ActivityEventSchema>;
|
|
246
290
|
export type SessionEndpointEvent = z.infer<typeof SessionEndpointEventSchema>;
|
|
291
|
+
export type ShadowDiagnosticEvent = z.infer<typeof ShadowDiagnosticEventSchema>;
|
|
247
292
|
export type OpenTeamEventType = OpenTeamEvent["type"];
|
|
248
293
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -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;
|
|
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;AAa/C,iEAAiE;AACjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAqB3B,CAAC;AAEH,wEAAwE;AACxE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;kBAc7B,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,mBAAmB;;;;;;;;;;;kBAS9B,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,kBAAkB;;;;;;;;;kBAM7B,CAAC;AAEH,qEAAqE;AACrE,eAAO,MAAM,mBAAmB;;;;;;;;kBAK9B,CAAC;AAEH,oDAAoD;AACpD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;kBAK9B,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;kBAMrC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;kBActC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAS9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EventSink } from "./eventLog";
|
|
2
|
+
/**
|
|
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
|
-
*
|
|
3
|
+
* **Reference-only** telemetry projection for Graph events (GE-037).
|
|
4
4
|
*
|
|
5
|
-
* `projectGraphEvent`
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphProjection.d.ts","sourceRoot":"","sources":["../../src/telemetry/graphProjection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEhF;;;;;;;;;GASG;AAEH,
|
|
1
|
+
{"version":3,"file":"graphProjection.d.ts","sourceRoot":"","sources":["../../src/telemetry/graphProjection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEhF;;;;;;;;;GASG;AAEH,oEAAoE;AACpE,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,GAAG,oBAAoB,CAe3E"}
|