@jmanuelcorral/openteam 0.2.2 → 0.9.1
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 +21 -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/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 +13534 -6124
- 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 +202 -4
- package/dist/commands/dispatch.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts +53 -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 +142 -79
- 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 +19 -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 +52 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11334 -5016
- 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 +155 -1
- 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 +69 -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/diagnostics.d.ts +30 -0
- package/dist/plugin/diagnostics.d.ts.map +1 -0
- 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 +38 -3
- package/dist/plugin/orchestrateTool.d.ts.map +1 -1
- 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 +37 -5
- 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/diagnostics.d.ts +10 -0
- package/dist/telemetry/diagnostics.d.ts.map +1 -0
- package/dist/telemetry/eventLog.d.ts +44 -26
- package/dist/telemetry/eventLog.d.ts.map +1 -1
- package/dist/telemetry/events.d.ts +121 -36
- 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/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/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,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,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.$
|
|
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,64 @@ 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.$
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
/**
|
|
164
|
+
* Runtime diagnostic recorded by plugin-safe channels instead of stdout/stderr.
|
|
165
|
+
* It stores only a bounded code, never free-form strings derived from prompts,
|
|
166
|
+
* tool arguments, SDK errors, filesystem paths, or user-provided role names.
|
|
167
|
+
*/
|
|
168
|
+
export declare const DiagnosticLevelSchema: z.ZodEnum<{
|
|
169
|
+
debug: "debug";
|
|
170
|
+
error: "error";
|
|
171
|
+
info: "info";
|
|
172
|
+
warn: "warn";
|
|
173
|
+
}>;
|
|
174
|
+
export declare const DiagnosticCodeSchema: z.ZodEnum<{
|
|
175
|
+
"availability-refresh-failed": "availability-refresh-failed";
|
|
176
|
+
"config-missing": "config-missing";
|
|
177
|
+
"graph-gate-denied": "graph-gate-denied";
|
|
178
|
+
"memory-extraction-warning": "memory-extraction-warning";
|
|
179
|
+
"memory-runtime-warning": "memory-runtime-warning";
|
|
180
|
+
"opencode-server-url": "opencode-server-url";
|
|
181
|
+
"opencode-version-read-failed": "opencode-version-read-failed";
|
|
182
|
+
"privacy-inert": "privacy-inert";
|
|
183
|
+
"soak-evidence-rejected": "soak-evidence-rejected";
|
|
184
|
+
"telemetry-warning": "telemetry-warning";
|
|
185
|
+
"telemetry-write-failed": "telemetry-write-failed";
|
|
186
|
+
"unknown-role": "unknown-role";
|
|
187
|
+
}>;
|
|
188
|
+
export declare const DiagnosticEventSchema: z.ZodObject<{
|
|
189
|
+
v: z.ZodLiteral<1>;
|
|
190
|
+
ts: z.ZodNumber;
|
|
191
|
+
sessionID: z.ZodString;
|
|
192
|
+
type: z.ZodLiteral<"diagnostic">;
|
|
193
|
+
level: z.ZodEnum<{
|
|
194
|
+
debug: "debug";
|
|
195
|
+
error: "error";
|
|
196
|
+
info: "info";
|
|
197
|
+
warn: "warn";
|
|
198
|
+
}>;
|
|
199
|
+
code: z.ZodEnum<{
|
|
200
|
+
"availability-refresh-failed": "availability-refresh-failed";
|
|
201
|
+
"config-missing": "config-missing";
|
|
202
|
+
"graph-gate-denied": "graph-gate-denied";
|
|
203
|
+
"memory-extraction-warning": "memory-extraction-warning";
|
|
204
|
+
"memory-runtime-warning": "memory-runtime-warning";
|
|
205
|
+
"opencode-server-url": "opencode-server-url";
|
|
206
|
+
"opencode-version-read-failed": "opencode-version-read-failed";
|
|
207
|
+
"privacy-inert": "privacy-inert";
|
|
208
|
+
"soak-evidence-rejected": "soak-evidence-rejected";
|
|
209
|
+
"telemetry-warning": "telemetry-warning";
|
|
210
|
+
"telemetry-write-failed": "telemetry-write-failed";
|
|
211
|
+
"unknown-role": "unknown-role";
|
|
212
|
+
}>;
|
|
213
|
+
}, z.core.$strict>;
|
|
159
214
|
export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
160
215
|
v: z.ZodLiteral<1>;
|
|
161
216
|
ts: z.ZodNumber;
|
|
@@ -170,13 +225,14 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
170
225
|
trivial: "trivial";
|
|
171
226
|
}>;
|
|
172
227
|
routeKind: z.ZodEnum<{
|
|
228
|
+
blocked: "blocked";
|
|
173
229
|
frontier: "frontier";
|
|
174
230
|
local: "local";
|
|
175
231
|
}>;
|
|
176
232
|
selected: z.ZodObject<{
|
|
177
233
|
providerID: z.ZodString;
|
|
178
234
|
modelID: z.ZodString;
|
|
179
|
-
}, z.core.$
|
|
235
|
+
}, z.core.$strict>;
|
|
180
236
|
rationale: z.ZodString;
|
|
181
237
|
estimatedCostUSD: z.ZodNumber;
|
|
182
238
|
baselineCostUSD: z.ZodNumber;
|
|
@@ -191,7 +247,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
191
247
|
taskID: z.ZodOptional<z.ZodString>;
|
|
192
248
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
193
249
|
failureStage: z.ZodOptional<z.ZodString>;
|
|
194
|
-
}, z.core.$
|
|
250
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
195
251
|
v: z.ZodLiteral<1>;
|
|
196
252
|
ts: z.ZodNumber;
|
|
197
253
|
sessionID: z.ZodString;
|
|
@@ -208,7 +264,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
208
264
|
tokensCacheRead: z.ZodNumber;
|
|
209
265
|
tokensCacheWrite: z.ZodNumber;
|
|
210
266
|
durationMs: z.ZodNumber;
|
|
211
|
-
}, z.core.$
|
|
267
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
212
268
|
v: z.ZodLiteral<1>;
|
|
213
269
|
ts: z.ZodNumber;
|
|
214
270
|
sessionID: z.ZodString;
|
|
@@ -219,7 +275,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
219
275
|
durationMs: z.ZodNumber;
|
|
220
276
|
ok: z.ZodBoolean;
|
|
221
277
|
title: z.ZodOptional<z.ZodString>;
|
|
222
|
-
}, z.core.$
|
|
278
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
223
279
|
v: z.ZodLiteral<1>;
|
|
224
280
|
ts: z.ZodNumber;
|
|
225
281
|
sessionID: z.ZodString;
|
|
@@ -228,7 +284,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
228
284
|
purpose: z.ZodOptional<z.ZodString>;
|
|
229
285
|
roles: z.ZodArray<z.ZodString>;
|
|
230
286
|
decisionIDs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
231
|
-
}, z.core.$
|
|
287
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
232
288
|
v: z.ZodLiteral<1>;
|
|
233
289
|
ts: z.ZodNumber;
|
|
234
290
|
sessionID: z.ZodString;
|
|
@@ -236,7 +292,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
236
292
|
agent: z.ZodOptional<z.ZodString>;
|
|
237
293
|
summary: z.ZodString;
|
|
238
294
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
239
|
-
}, z.core.$
|
|
295
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
240
296
|
v: z.ZodLiteral<1>;
|
|
241
297
|
ts: z.ZodNumber;
|
|
242
298
|
sessionID: z.ZodString;
|
|
@@ -249,7 +305,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
249
305
|
}>;
|
|
250
306
|
agent: z.ZodOptional<z.ZodString>;
|
|
251
307
|
summary: z.ZodString;
|
|
252
|
-
}, z.core.$
|
|
308
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
253
309
|
v: z.ZodLiteral<1>;
|
|
254
310
|
ts: z.ZodNumber;
|
|
255
311
|
sessionID: z.ZodString;
|
|
@@ -258,7 +314,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
258
314
|
directory: z.ZodOptional<z.ZodString>;
|
|
259
315
|
worktree: z.ZodOptional<z.ZodString>;
|
|
260
316
|
title: z.ZodOptional<z.ZodString>;
|
|
261
|
-
}, z.core.$
|
|
317
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
262
318
|
v: z.ZodLiteral<1>;
|
|
263
319
|
ts: z.ZodNumber;
|
|
264
320
|
sessionID: z.ZodString;
|
|
@@ -268,10 +324,38 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
268
324
|
"invalid-node-id": "invalid-node-id";
|
|
269
325
|
"journal-append-failed": "journal-append-failed";
|
|
270
326
|
"journal-create-failed": "journal-create-failed";
|
|
327
|
+
"observation-contained-failure": "observation-contained-failure";
|
|
271
328
|
"observation-failed": "observation-failed";
|
|
329
|
+
"observation-ineligible": "observation-ineligible";
|
|
330
|
+
"observation-rejected": "observation-rejected";
|
|
272
331
|
unknown: "unknown";
|
|
273
332
|
}>;
|
|
274
|
-
}, z.core.$
|
|
333
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
334
|
+
v: z.ZodLiteral<1>;
|
|
335
|
+
ts: z.ZodNumber;
|
|
336
|
+
sessionID: z.ZodString;
|
|
337
|
+
type: z.ZodLiteral<"diagnostic">;
|
|
338
|
+
level: z.ZodEnum<{
|
|
339
|
+
debug: "debug";
|
|
340
|
+
error: "error";
|
|
341
|
+
info: "info";
|
|
342
|
+
warn: "warn";
|
|
343
|
+
}>;
|
|
344
|
+
code: z.ZodEnum<{
|
|
345
|
+
"availability-refresh-failed": "availability-refresh-failed";
|
|
346
|
+
"config-missing": "config-missing";
|
|
347
|
+
"graph-gate-denied": "graph-gate-denied";
|
|
348
|
+
"memory-extraction-warning": "memory-extraction-warning";
|
|
349
|
+
"memory-runtime-warning": "memory-runtime-warning";
|
|
350
|
+
"opencode-server-url": "opencode-server-url";
|
|
351
|
+
"opencode-version-read-failed": "opencode-version-read-failed";
|
|
352
|
+
"privacy-inert": "privacy-inert";
|
|
353
|
+
"soak-evidence-rejected": "soak-evidence-rejected";
|
|
354
|
+
"telemetry-warning": "telemetry-warning";
|
|
355
|
+
"telemetry-write-failed": "telemetry-write-failed";
|
|
356
|
+
"unknown-role": "unknown-role";
|
|
357
|
+
}>;
|
|
358
|
+
}, z.core.$strict>], "type">;
|
|
275
359
|
export type OpenTeamEvent = z.infer<typeof OpenTeamEventSchema>;
|
|
276
360
|
export type RouteEvent = z.infer<typeof RouteEventSchema>;
|
|
277
361
|
export type MessageEvent = z.infer<typeof MessageEventSchema>;
|
|
@@ -281,5 +365,6 @@ export type DecisionEvent = z.infer<typeof DecisionEventSchema>;
|
|
|
281
365
|
export type ActivityEvent = z.infer<typeof ActivityEventSchema>;
|
|
282
366
|
export type SessionEndpointEvent = z.infer<typeof SessionEndpointEventSchema>;
|
|
283
367
|
export type ShadowDiagnosticEvent = z.infer<typeof ShadowDiagnosticEventSchema>;
|
|
368
|
+
export type DiagnosticEvent = z.infer<typeof DiagnosticEventSchema>;
|
|
284
369
|
export type OpenTeamEventType = OpenTeamEvent["type"];
|
|
285
370
|
//# 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;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/telemetry/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;;;;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;;;;;;;;;;;kBA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AAC;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,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,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"}
|
|
@@ -4,33 +4,33 @@ import type { WorktreeReconcileReport } from "../orchestrator/worktreeReconciler
|
|
|
4
4
|
import type { LeaseRecord } from "../storage/graph/workspaceLease";
|
|
5
5
|
import type { GraphViewHealth } from "./graphView";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Pure producer of graph runtime-health metrics (GE-052).
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Folds a list of journal events, the journal state, the lease, the worktree
|
|
10
|
+
* report, and the kill switch into a `GraphViewHealth` that the web viewer
|
|
11
|
+
* already consumes (GE-084) but that until now lacked a real producer.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
* - `unknownEffects`: `node.dispatched`
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* - `staleCompletions`:
|
|
18
|
-
*
|
|
19
|
-
*
|
|
13
|
+
* Semantics of each metric:
|
|
14
|
+
* - `unknownEffects`: `node.dispatched` whose `attemptID` has no terminal event
|
|
15
|
+
* (`node.succeeded`/`node.failed`/`node.cancelled`) with the same `attemptID`.
|
|
16
|
+
* Deduplicated: repeating the same event does not duplicate the count.
|
|
17
|
+
* - `staleCompletions`: node terminal event whose `attemptID` appears *after*
|
|
18
|
+
* the run terminal event (`run.completed`/`run.failed`/`run.cancelled`).
|
|
19
|
+
* Bounded as a counter for operator utility.
|
|
20
20
|
* - `recoveryRequired`: `journal === "corrupt" || unknownEffects > 0`.
|
|
21
|
-
* - `conflicts`: lease
|
|
21
|
+
* - `conflicts`: active lease not owned by self (holder ≠ input.holder) +
|
|
22
22
|
* `worktrees.blocked`.
|
|
23
|
-
* - `killSwitch`: passthrough
|
|
23
|
+
* - `killSwitch`: passthrough from config.
|
|
24
24
|
*
|
|
25
|
-
*
|
|
26
|
-
* - **
|
|
27
|
-
* - **
|
|
28
|
-
*
|
|
29
|
-
* - **Reference-only**:
|
|
30
|
-
* `assertReferenceOnly`
|
|
31
|
-
* - **
|
|
25
|
+
* Invariants:
|
|
26
|
+
* - **Pure and deterministic**: no I/O, clock, random, env, or logs.
|
|
27
|
+
* - **Idempotent**: folding the same list with duplicates produces the same
|
|
28
|
+
* output.
|
|
29
|
+
* - **Reference-only**: only booleans and bounded counters; the
|
|
30
|
+
* `assertReferenceOnly` guard rejects any raw field.
|
|
31
|
+
* - **No authority**: does not decide, grant, or mutate anything.
|
|
32
32
|
*/
|
|
33
|
-
/**
|
|
33
|
+
/** Inputs for runtime-health computation. */
|
|
34
34
|
export type GraphRuntimeHealthInput = {
|
|
35
35
|
readonly events: readonly GraphEventV1[];
|
|
36
36
|
readonly journal: GraphJournalHealth;
|
|
@@ -40,14 +40,14 @@ export type GraphRuntimeHealthInput = {
|
|
|
40
40
|
readonly killSwitch: boolean;
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
43
|
+
* Shared predicate: determines whether recovery is required.
|
|
44
|
+
* Extracted so that the CLI (`renderGraphStatus`) and the web health banner
|
|
45
|
+
* share the same logic without duplication.
|
|
46
46
|
*/
|
|
47
47
|
export declare function isRecoveryRequired(journal: GraphJournalHealth, unknownEffects: number): boolean;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
49
|
+
* Computes runtime-health metrics from allow-listed sources. Idempotent and
|
|
50
|
+
* reference-only; the final guard guarantees it.
|
|
51
51
|
*/
|
|
52
52
|
export declare function computeGraphRuntimeHealth(input: GraphRuntimeHealthInput): GraphViewHealth;
|
|
53
53
|
//# sourceMappingURL=graphRuntimeHealth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphRuntimeHealth.d.ts","sourceRoot":"","sources":["../../src/telemetry/graphRuntimeHealth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACp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GAC7B,eAAe,CAwDjB"}
|
|
@@ -2,28 +2,28 @@ import type { ErrorClass, GraphSpecV1 } from "../graph/schema";
|
|
|
2
2
|
import type { GraphState } from "../graph/types";
|
|
3
3
|
import type { GraphTelemetryRecord } from "./graphProjection";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* **Pure and reference-only** projection of the graph view (GE-081).
|
|
6
6
|
*
|
|
7
|
-
* `buildGraphView`
|
|
8
|
-
*
|
|
9
|
-
* (`errorClass`,
|
|
10
|
-
* `GraphViewProjectionV1`.
|
|
11
|
-
* `docs/adr/graph-observability-web.md`;
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
7
|
+
* `buildGraphView` folds the static spec (topology), the reduced journal state
|
|
8
|
+
* (state/attempts/artifact per node), the reference-only telemetry
|
|
9
|
+
* (`errorClass`, artifact), and runtime-health metrics into a
|
|
10
|
+
* `GraphViewProjectionV1`. Each field maps to the allow-listed source frozen by
|
|
11
|
+
* `docs/adr/graph-observability-web.md`; reviewer verdicts are **derived** from
|
|
12
|
+
* the terminal state of the reviewer node plus its `reviews` link, never stored
|
|
13
|
+
* as content. Pure and deterministic: no clock, I/O, or random. A final guard
|
|
14
|
+
* rejects any raw-content field.
|
|
15
15
|
*/
|
|
16
|
-
/**
|
|
16
|
+
/** Node state in the view: adds `ready`/`active` on top of the reduced state. */
|
|
17
17
|
export type GraphViewNodeState = "pending" | "ready" | "active" | "succeeded" | "failed" | "cancelled";
|
|
18
|
-
/**
|
|
18
|
+
/** Verdict derived from a review. */
|
|
19
19
|
export type ReviewVerdict = "approved" | "rejected" | "inconclusive";
|
|
20
|
-
/**
|
|
20
|
+
/** Reference-only artifact reference (without content). */
|
|
21
21
|
export type GraphArtifactRef = {
|
|
22
22
|
readonly uri: string;
|
|
23
23
|
readonly sha256: string;
|
|
24
24
|
readonly bytes: number;
|
|
25
25
|
};
|
|
26
|
-
/**
|
|
26
|
+
/** View of a graph node: only allow-listed and reference-only fields. */
|
|
27
27
|
export type GraphNodeView = {
|
|
28
28
|
readonly nodeID: string;
|
|
29
29
|
readonly role: string;
|
|
@@ -38,12 +38,12 @@ export type GraphNodeView = {
|
|
|
38
38
|
readonly artifact?: GraphArtifactRef;
|
|
39
39
|
readonly sessionRef?: string;
|
|
40
40
|
};
|
|
41
|
-
/**
|
|
41
|
+
/** DAG edge (dependency `from` -> `to`). */
|
|
42
42
|
export type GraphViewEdge = {
|
|
43
43
|
readonly from: string;
|
|
44
44
|
readonly to: string;
|
|
45
45
|
};
|
|
46
|
-
/**
|
|
46
|
+
/** Runtime-health metrics for the view (GE-052), bounded and without content. */
|
|
47
47
|
export type GraphViewHealth = {
|
|
48
48
|
readonly recoveryRequired: boolean;
|
|
49
49
|
readonly unknownEffects: number;
|
|
@@ -51,7 +51,7 @@ export type GraphViewHealth = {
|
|
|
51
51
|
readonly conflicts: number;
|
|
52
52
|
readonly killSwitch: boolean;
|
|
53
53
|
};
|
|
54
|
-
/**
|
|
54
|
+
/** Versioned and reference-only projection of the complete graph view. */
|
|
55
55
|
export type GraphViewProjectionV1 = {
|
|
56
56
|
readonly version: 1;
|
|
57
57
|
readonly runID: string;
|
|
@@ -59,7 +59,7 @@ export type GraphViewProjectionV1 = {
|
|
|
59
59
|
readonly edges: readonly GraphViewEdge[];
|
|
60
60
|
readonly health: GraphViewHealth;
|
|
61
61
|
};
|
|
62
|
-
/**
|
|
62
|
+
/** Reference-only inputs to the projector: topology, state, telemetry, health. */
|
|
63
63
|
export type GraphViewInput = {
|
|
64
64
|
readonly spec: GraphSpecV1;
|
|
65
65
|
readonly state: GraphState;
|
|
@@ -68,9 +68,9 @@ export type GraphViewInput = {
|
|
|
68
68
|
readonly sessions?: Readonly<Record<string, string>>;
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
71
|
+
* Builds the reference-only projection of the graph view from its allow-listed
|
|
72
|
+
* sources. Deterministic: same inputs -> same output. The final guard ensures
|
|
73
|
+
* that no field carries raw content.
|
|
74
74
|
*/
|
|
75
75
|
export declare function buildGraphView(input: GraphViewInput): GraphViewProjectionV1;
|
|
76
76
|
//# sourceMappingURL=graphView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphView.d.ts","sourceRoot":"","sources":["../../src/telemetry/graphView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAa,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D;;;;;;;;;;;GAWG;AAEH,
|
|
1
|
+
{"version":3,"file":"graphView.d.ts","sourceRoot":"","sources":["../../src/telemetry/graphView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAa,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D;;;;;;;;;;;GAWG;AAEH,iFAAiF;AACjF,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,OAAO,GACP,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,WAAW,CAAC;AAEhB,qCAAqC;AACrC,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,CAAC;AAErE,2DAA2D;AAC3D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC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