@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
|
@@ -3,26 +3,28 @@ import type { GraphIngress, IngressDecision, IngressOutcome, IngressPolicy } fro
|
|
|
3
3
|
import type { SessionTracker } from "./sessionTracker";
|
|
4
4
|
import { type ShadowObserver, type ShadowPipelineDeps } from "./shadowPipeline";
|
|
5
5
|
/**
|
|
6
|
-
* GE-050 —
|
|
6
|
+
* GE-050 — opencode surface for active SDD ingress.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* In R1 the tool is registered but the internal gate is closed, so it always
|
|
9
|
+
* responds "unavailable" and **explains the outermost block**. It is still
|
|
10
|
+
* registered because the entry point is exactly what was missing: without it,
|
|
11
|
+
* "activating the graph" would still mean nothing operationally and R2 would
|
|
12
|
+
* have nowhere to plug in the pilot.
|
|
13
13
|
*
|
|
14
|
-
* `ingress`
|
|
15
|
-
* (
|
|
16
|
-
*
|
|
14
|
+
* `ingress` is intentionally optional: R1 has no session effect executor
|
|
15
|
+
* (GE-030/GE-051 provides it), and fabricating a fake one in production would
|
|
16
|
+
* be worse than declaring the absence. Until it exists, no mutating action is
|
|
17
|
+
* possible.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
19
|
+
* This module does not name the internal grantor of the capability: the gate is
|
|
20
|
+
* opened only from the module that declares it, and that is verified
|
|
21
|
+
* structurally in g5.
|
|
20
22
|
*/
|
|
21
|
-
/**
|
|
23
|
+
/** Actions exposed by the `openteam-graph` tool. */
|
|
22
24
|
export type GraphToolAction = "status" | "start" | "cancel" | "report-run";
|
|
23
25
|
export type GraphToolDeps = {
|
|
24
26
|
readonly policy: IngressPolicy;
|
|
25
|
-
/**
|
|
27
|
+
/** Actual ingress; absent while the active runtime is not plugged in. */
|
|
26
28
|
readonly ingress?: GraphIngress;
|
|
27
29
|
/** Shadow pipeline deps; absent under mode "off" or when kill switch is active. */
|
|
28
30
|
readonly shadow?: ShadowPipelineDeps | undefined;
|
|
@@ -41,23 +43,23 @@ export type GraphToolSurface = {
|
|
|
41
43
|
*/
|
|
42
44
|
readonly observeLegacyExecution: ShadowObserver;
|
|
43
45
|
};
|
|
44
|
-
/**
|
|
46
|
+
/** Stable text for a routing decision. Pure and total. */
|
|
45
47
|
export declare function describeDecision(decision: IngressDecision): string;
|
|
46
|
-
/**
|
|
48
|
+
/** Stable text for the result of an operation. Pure and total. */
|
|
47
49
|
export declare function describeOutcome(outcome: IngressOutcome): string;
|
|
48
|
-
/**
|
|
50
|
+
/** Reason why a mutating action cannot run yet. */
|
|
49
51
|
export declare function unavailableReason(deps: GraphToolDeps, taskID: string): string;
|
|
50
52
|
export declare function createGraphTool(deps: GraphToolDeps): GraphToolSurface;
|
|
51
53
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
54
|
+
* Dispatches the `report-run` action: validates, cross-checks, and produces a
|
|
55
|
+
* shadow observation. Contained by try/catch: a failure here never propagates
|
|
56
|
+
* as an exception to the agent.
|
|
55
57
|
*
|
|
56
|
-
* `tracker`
|
|
57
|
-
*
|
|
58
|
-
*
|
|
58
|
+
* `tracker` is mandatory: without it there is no cross-verification capability
|
|
59
|
+
* and all nodes remain non-verifiable. The compiler catches the omission; the
|
|
60
|
+
* runtime guard handles the impossible dynamic case.
|
|
59
61
|
*
|
|
60
|
-
*
|
|
62
|
+
* Exported for direct testing of the outer containment layer.
|
|
61
63
|
*/
|
|
62
64
|
export declare function handleReportRun(args: Record<string, unknown>, observe: ShadowObserver, tracker: SessionTracker): Promise<string>;
|
|
63
65
|
//# sourceMappingURL=graphTool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphTool.d.ts","sourceRoot":"","sources":["../../src/plugin/graphTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK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MAAM,GAAG,MAAM,CAK7E;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,gBAAgB,CA2FrE;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,MAAM,CAAC,CAwDjB"}
|
package/dist/plugin/hooks.d.ts
CHANGED
|
@@ -8,24 +8,24 @@ export type ChatMessageHookOptions = {
|
|
|
8
8
|
sink?: EventSink;
|
|
9
9
|
now?: () => number;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* M6 memory injection (opt-in). Given the prompt text, returns a context
|
|
12
|
+
* block to **prepend** to the first text part, or `null` to skip injection.
|
|
13
|
+
* It is invoked **after** choosing the model and emitting telemetry, so it
|
|
14
|
+
* does not alter router determinism or the prompt hash.
|
|
15
15
|
*/
|
|
16
16
|
injectMemory?: (queryText: string) => Promise<string | null>;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* Routing callback (issue #53): notifies the session and the routed model
|
|
19
|
+
* after each `chat.message` decision. Used by the `SessionTracker` to
|
|
20
|
+
* cross-verify the agent's self-reported fields in `report-run`.
|
|
21
21
|
*/
|
|
22
22
|
onRoute?: (sessionID: string, model: string) => void;
|
|
23
23
|
};
|
|
24
24
|
export declare function deriveTaskSignals(input: Parameters<ChatMessageHook>[0], output: Parameters<ChatMessageHook>[1]): TaskSignals;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
* `true`
|
|
28
|
-
*
|
|
26
|
+
* Prepends the memory block to the first text part of the message. Returns
|
|
27
|
+
* `true` if injection occurred. Does not add new parts (bounded contract surface:
|
|
28
|
+
* mutating `text` of an existing part), and is a no-op if there is no text part.
|
|
29
29
|
*/
|
|
30
30
|
export declare function injectMemoryBlock(output: Parameters<ChatMessageHook>[1], block: string): boolean;
|
|
31
31
|
export declare function createChatMessageHook(config: OpenTeamConfig, getAvailable: AvailabilityProvider, options?: ChatMessageHookOptions): ChatMessageHook;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/plugin/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;AAEjE,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7D;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD,CAAC;AA8CF,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EACrC,MAAM,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GACrC,WAAW,CAqBb;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAA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AM,GACZ,OAAO,CAQT;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,oBAAoB,EAClC,OAAO,GAAE,sBAA2B,GACnC,eAAe,CA2EjB;AAED,wBAAgB,WAAW,CACzB,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,oBAAoB,EAClC,OAAO,GAAE,sBAA2B,GACnC,KAAK,CAIP"}
|
|
@@ -3,46 +3,46 @@ import type { ReportRunPayload } from "./reportRunSchema";
|
|
|
3
3
|
import type { SessionTracker } from "./sessionTracker";
|
|
4
4
|
import type { ShadowPipelineResult } from "./shadowPipeline";
|
|
5
5
|
/**
|
|
6
|
-
* **
|
|
6
|
+
* **`ObservedLegacyRun` producer** (issue #53, ADR Option D §3–4).
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* Receives a `ReportRunPayload` validated by Zod at the boundary, checks
|
|
9
|
+
* the `model` and `sessionRef` fields against the session/routing telemetry
|
|
10
|
+
* accumulated by the `SessionTracker`, builds an `ObservedLegacyRun`, and
|
|
11
|
+
* passes it to the shadow observer.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
* shadow pipeline;
|
|
13
|
+
* Pure module (no I/O, clock, or randomness). Failure containment is provided by the
|
|
14
|
+
* shadow pipeline; here we only build the observation.
|
|
15
15
|
*/
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* `ShadowPipelineResult`
|
|
17
|
+
* Result of producing the legacy observation. Extends the
|
|
18
|
+
* `ShadowPipelineResult` with cross-verification metadata.
|
|
19
19
|
*/
|
|
20
20
|
export type ProducerResult = {
|
|
21
|
-
/**
|
|
21
|
+
/** Shadow pipeline result. */
|
|
22
22
|
readonly pipeline: ShadowPipelineResult;
|
|
23
|
-
/**
|
|
23
|
+
/** Nodes with non-verifiable model (sessionRef absent or no routing). */
|
|
24
24
|
readonly unverifiedModels: readonly string[];
|
|
25
|
-
/**
|
|
25
|
+
/** Nodes with a verified model and a mismatch. */
|
|
26
26
|
readonly modelMismatches: readonly string[];
|
|
27
|
-
/**
|
|
27
|
+
/** Nodes with unknown sessionRef. */
|
|
28
28
|
readonly unknownSessions: readonly string[];
|
|
29
29
|
};
|
|
30
|
-
/**
|
|
30
|
+
/** Concise result returned to the tool as text. */
|
|
31
31
|
export type ReportRunResponse = {
|
|
32
32
|
readonly result: "observed" | "observation-rejected" | "ineligible" | "contained-failure";
|
|
33
33
|
readonly detail?: string;
|
|
34
|
-
/**
|
|
34
|
+
/** Cross-verification warnings, if any. */
|
|
35
35
|
readonly warnings?: readonly string[];
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* Produces an `ObservedLegacyRun` from a validated agent report.
|
|
39
|
+
* The run is marked as `executed: true` because the action is only invoked when
|
|
40
|
+
* a real execution completes.
|
|
41
41
|
*/
|
|
42
42
|
export declare function buildObservedRun(payload: ReportRunPayload): ObservedLegacyRun;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
44
|
+
* Checks the report fields against the accumulated telemetry.
|
|
45
|
+
* Returns cross-verification warnings, never blocks.
|
|
46
46
|
*/
|
|
47
47
|
export declare function crossVerify(payload: ReportRunPayload, tracker: SessionTracker): {
|
|
48
48
|
unverifiedModels: string[];
|
|
@@ -50,11 +50,11 @@ export declare function crossVerify(payload: ReportRunPayload, tracker: SessionT
|
|
|
50
50
|
unknownSessions: string[];
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Formats the cross-verification warnings for the response to the agent.
|
|
54
54
|
*/
|
|
55
55
|
export declare function formatWarnings(verification: ReturnType<typeof crossVerify>): string[];
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Builds the text response that the tool returns to the agent.
|
|
58
58
|
*/
|
|
59
59
|
export declare function formatResponse(response: ReportRunResponse): string;
|
|
60
60
|
//# sourceMappingURL=legacyRunProducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacyRunProducer.d.ts","sourceRoot":"","sources":["../../src/plugin/legacyRunProducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,
|
|
1
|
+
{"version":3,"file":"legacyRunProducer.d.ts","sourceRoot":"","sources":["../../src/plugin/legacyRunProducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,8BAA8B;IAC9B,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;IACxC,yEAAyE;IACzE,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,kDAAkD;IAClD,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,qCAAqC;IACrC,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C,CAAC;AAEF,mDAAmD;AACnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,MAAM,EACX,UAAU,GACV,sBAAsB,GACtB,YAAY,GACZ,mBAAmB,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC,CAAC;AAmBF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,iBAAiB,CAW7E;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,cAAc,GACtB;IACD,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CA8BA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,YAAY,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,GAC3C,MAAM,EAAE,CAkBV;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CASlE"}
|
|
@@ -2,16 +2,16 @@ import type { Embedder } from "../local/embeddings";
|
|
|
2
2
|
import { type MemoryInjectionParams } from "../memory/inject";
|
|
3
3
|
import type { MemoryIndex } from "../storage/index/memoryIndex";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Composes the M6 `injectMemory` callback (push to `chat.message`) from the
|
|
6
|
+
* memory index, a local `Embedder`, and the recall/injection policy.
|
|
7
|
+
* Isolates the wiring so `index.ts` remains a thin caller and this stays covered
|
|
8
|
+
* by tests. The only I/O is embedding the query (inside `recallMemory`);
|
|
9
|
+
* block formatting is pure (`buildMemoryBlock`).
|
|
10
10
|
*/
|
|
11
11
|
export type MemoryInjectorDeps = {
|
|
12
12
|
index: MemoryIndex;
|
|
13
13
|
embedder: Embedder;
|
|
14
|
-
/**
|
|
14
|
+
/** Injected clock (epoch ms) for the `asOf` "now". */
|
|
15
15
|
now: () => number;
|
|
16
16
|
};
|
|
17
17
|
export type MemoryInjectorPolicy = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memoryInject.d.ts","sourceRoot":"","sources":["../../src/plugin/memoryInject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE;;;;;;GAMG;AAEH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"memoryInject.d.ts","sourceRoot":"","sources":["../../src/plugin/memoryInject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE;;;;;;GAMG;AAEH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,sDAAsD;IACtD,GAAG,EAAE,MAAM,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,qBAAqB,CAAC;CAClC,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,oBAAoB,GAC3B,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAe/C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type OpenTeamConfig } from "../config/schema";
|
|
4
|
+
import type { FetchLike } from "../local/types";
|
|
5
|
+
import type { StorageProvider } from "../storage/provider";
|
|
6
|
+
export type MemoryToolDeps = {
|
|
7
|
+
config: OpenTeamConfig;
|
|
8
|
+
storage: StorageProvider;
|
|
9
|
+
/** Injected clock (epoch ms). Keeps this module free of ambient time. */
|
|
10
|
+
now: () => number;
|
|
11
|
+
/** #143 reachability probe; injected I/O port. */
|
|
12
|
+
localRuntimeReachable: () => Promise<boolean>;
|
|
13
|
+
/** Local runtime HTTP transport; injected I/O port. */
|
|
14
|
+
fetch: FetchLike;
|
|
15
|
+
warn?: (message?: unknown) => void;
|
|
16
|
+
};
|
|
17
|
+
/** Schema for the `openteam-memory` tool boundary. */
|
|
18
|
+
export declare const MemoryWritePayloadSchema: z.ZodObject<{
|
|
19
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
20
|
+
role: z.ZodEnum<{
|
|
21
|
+
assistant: "assistant";
|
|
22
|
+
system: "system";
|
|
23
|
+
user: "user";
|
|
24
|
+
}>;
|
|
25
|
+
content: z.ZodString;
|
|
26
|
+
}, z.core.$strict>>;
|
|
27
|
+
roleID: z.ZodDefault<z.ZodString>;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
/**
|
|
30
|
+
* Builds the `openteam-memory` tool. All I/O is injected; the tool itself only
|
|
31
|
+
* orchestrates: gate → local extraction → redaction (inside `extractMemory`) →
|
|
32
|
+
* append-only write. It never throws to the host: every failure path returns an
|
|
33
|
+
* actionable, English, single-line message and leaves the log untouched.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createMemoryTool(deps: MemoryToolDeps): ToolDefinition;
|
|
36
|
+
//# sourceMappingURL=memoryTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoryTool.d.ts","sourceRoot":"","sources":["../../src/plugin/memoryTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,kBAAkB,CAAC;AAG9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAQhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA0B3D,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,eAAe,CAAC;IACzB,yEAAyE;IACzE,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,kDAAkD;IAClD,qBAAqB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,uDAAuD;IACvD,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,CAAC;AAUF,sDAAsD;AACtD,eAAO,MAAM,wBAAwB;;;;;;;;;;kBAY1B,CAAC;AAEZ;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,CAuHrE"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { GraphMode, OpenTeamConfig } from "../config/schema";
|
|
4
|
+
import type { GraphEventV1, GraphSpecV1 } from "../graph/schema";
|
|
5
|
+
import type { RuntimeConcurrencyLimiter } from "../local/concurrency";
|
|
6
|
+
import type { LocalRuntimeId } from "../local/types";
|
|
7
|
+
import { type RoleTaskResult } from "../orchestrator/coordinator";
|
|
8
|
+
import type { OpencodeSessionClient } from "../orchestrator/subsessions";
|
|
9
|
+
import type { GraphJournal } from "../storage/graph/provider";
|
|
10
|
+
import type { EventSink } from "../telemetry/eventLog";
|
|
11
|
+
import type { ShadowObserver, ShadowPipelineResult } from "./shadowPipeline";
|
|
12
|
+
/**
|
|
13
|
+
* Schema for the `openteam-orchestrate` tool boundary.
|
|
14
|
+
*
|
|
15
|
+
* `.strict()` rejects unknown keys, consistent with `ReportRunPayloadSchema`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const OrchestratePayloadSchema: z.ZodObject<{
|
|
18
|
+
assignments: z.ZodArray<z.ZodObject<{
|
|
19
|
+
roleID: z.ZodString;
|
|
20
|
+
prompt: z.ZodString;
|
|
21
|
+
title: z.ZodOptional<z.ZodString>;
|
|
22
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
}, z.core.$strict>>;
|
|
24
|
+
parentSessionID: z.ZodOptional<z.ZodString>;
|
|
25
|
+
directory: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
export type OrchestratePayload = z.infer<typeof OrchestratePayloadSchema>;
|
|
28
|
+
export type DependencyValidationError = {
|
|
29
|
+
code: "dangling-reference";
|
|
30
|
+
detail: string;
|
|
31
|
+
} | {
|
|
32
|
+
code: "cycle";
|
|
33
|
+
detail: string;
|
|
34
|
+
} | {
|
|
35
|
+
code: "duplicate-role";
|
|
36
|
+
detail: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Validates the dependency graph encoded in assignments. Returns an error
|
|
40
|
+
* if any `dependsOn` reference is dangling (refers to a non-existent roleID),
|
|
41
|
+
* if the graph contains a cycle, or if roleIDs are duplicated.
|
|
42
|
+
*
|
|
43
|
+
* Pure: no I/O, clock, random, or env vars.
|
|
44
|
+
*/
|
|
45
|
+
export declare function validateAssignmentDependencies(assignments: readonly OrchestratePayload["assignments"][number][]): DependencyValidationError | undefined;
|
|
46
|
+
/** Per-role summary returned by the tool (reference-only — no prompt text). */
|
|
47
|
+
export type RoleResultSummary = {
|
|
48
|
+
roleID: string;
|
|
49
|
+
model: {
|
|
50
|
+
providerID: string;
|
|
51
|
+
modelID: string;
|
|
52
|
+
};
|
|
53
|
+
success: boolean;
|
|
54
|
+
sessionID?: string;
|
|
55
|
+
failureStage?: "create" | "prompt";
|
|
56
|
+
failureReason?: string;
|
|
57
|
+
};
|
|
58
|
+
export type OrchestrateResult = {
|
|
59
|
+
kind: "completed";
|
|
60
|
+
roles: readonly RoleResultSummary[];
|
|
61
|
+
cancelled?: readonly string[];
|
|
62
|
+
} | {
|
|
63
|
+
kind: "error";
|
|
64
|
+
reason: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Minimal port of the opencode SDK client surface used by this adapter.
|
|
68
|
+
*
|
|
69
|
+
* Structurally compatible with `ReturnType<typeof createOpencodeClient>` — the
|
|
70
|
+
* SDK client can be passed directly. Only the `session.create` and
|
|
71
|
+
* `session.prompt` methods are consumed; everything else is intentionally
|
|
72
|
+
* excluded so the adapter cannot reach surfaces the coordinator must not use.
|
|
73
|
+
*/
|
|
74
|
+
export type SdkClientPort = {
|
|
75
|
+
session: {
|
|
76
|
+
create(args: {
|
|
77
|
+
body?: {
|
|
78
|
+
parentID?: string;
|
|
79
|
+
title?: string;
|
|
80
|
+
};
|
|
81
|
+
query?: {
|
|
82
|
+
directory?: string;
|
|
83
|
+
};
|
|
84
|
+
}): Promise<{
|
|
85
|
+
data: {
|
|
86
|
+
id: string;
|
|
87
|
+
} | undefined;
|
|
88
|
+
error: unknown;
|
|
89
|
+
}>;
|
|
90
|
+
prompt(args: {
|
|
91
|
+
path: {
|
|
92
|
+
id: string;
|
|
93
|
+
};
|
|
94
|
+
body: {
|
|
95
|
+
model?: {
|
|
96
|
+
providerID: string;
|
|
97
|
+
modelID: string;
|
|
98
|
+
};
|
|
99
|
+
agent?: string;
|
|
100
|
+
system?: string;
|
|
101
|
+
parts: Array<{
|
|
102
|
+
type: "text";
|
|
103
|
+
text: string;
|
|
104
|
+
}>;
|
|
105
|
+
};
|
|
106
|
+
}): Promise<{
|
|
107
|
+
data: unknown;
|
|
108
|
+
error: unknown;
|
|
109
|
+
}>;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Adapts the opencode SDK client to `OpencodeSessionClient`.
|
|
114
|
+
*
|
|
115
|
+
* The brief asked to use `opencodeSessionAdapter.ts`, but that adapter
|
|
116
|
+
* produces `OpencodeSessionAdapter` (6-method lifecycle interface for the
|
|
117
|
+
* graph runtime), not `OpencodeSessionClient` (2-method create/prompt
|
|
118
|
+
* interface consumed by `runSubsession`/`runRoleTasks`). Using the wrong
|
|
119
|
+
* type would compile but add an unused abstraction layer. This adapter
|
|
120
|
+
* bridges the SDK client directly to the type the coordinator consumes.
|
|
121
|
+
*/
|
|
122
|
+
export declare function adaptSdkClient(sdk: SdkClientPort): OpencodeSessionClient;
|
|
123
|
+
/**
|
|
124
|
+
* Projects `RoleTaskResult[]` into a reference-only `OrchestrateResult`.
|
|
125
|
+
*
|
|
126
|
+
* `assertReferenceOnly` is the privacy guard: it rejects any structure
|
|
127
|
+
* carrying a key from `FORBIDDEN_RAW_KEYS` (e.g. "content", "text",
|
|
128
|
+
* "prompt", "message"). The current `RoleResultSummary` shape has no
|
|
129
|
+
* forbidden keys by design, but the guard is defense-in-depth against
|
|
130
|
+
* runtime contamination (e.g. `decision.selected` carrying extra
|
|
131
|
+
* properties from the SDK response). Exported for direct testing.
|
|
132
|
+
*/
|
|
133
|
+
export declare function projectResults(results: readonly RoleTaskResult[], cancelled?: readonly string[]): OrchestrateResult;
|
|
134
|
+
export type OrchestrateDeps = {
|
|
135
|
+
readonly client: OpencodeSessionClient;
|
|
136
|
+
readonly sink: EventSink;
|
|
137
|
+
readonly config: OpenTeamConfig;
|
|
138
|
+
readonly now: () => number;
|
|
139
|
+
readonly newDecisionID: () => string;
|
|
140
|
+
/** Graph mode resolved from config. `off` disables shadow journaling. */
|
|
141
|
+
readonly graphMode: GraphMode;
|
|
142
|
+
/** Journal for persisting shadow graph runs. Required when graphMode !== "off". */
|
|
143
|
+
readonly journal?: GraphJournal | undefined;
|
|
144
|
+
/** Shadow pipeline observer. Required when graphMode !== "off". */
|
|
145
|
+
readonly observeLegacyExecution?: ShadowObserver | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Reachability probe for local runtimes (#143). A REQUIRED injected I/O port —
|
|
148
|
+
* probing lives in the local runtime adapters. Passed through unconditionally
|
|
149
|
+
* to the coordinator, which consults it only for roles that require a local
|
|
150
|
+
* runtime (scribe, ralph, guardian) to refuse the request before dispatch when
|
|
151
|
+
* none is reachable. Required (not optional) so that dropping the injection at
|
|
152
|
+
* the composition root is a compile error rather than a silent fail-open.
|
|
153
|
+
*/
|
|
154
|
+
readonly localRuntimeReachable: () => Promise<boolean>;
|
|
155
|
+
/**
|
|
156
|
+
* Per-runtime reachability probe (#144). A REQUIRED injected I/O port, passed
|
|
157
|
+
* through to the coordinator so a role that declares an ordered `localRuntimes`
|
|
158
|
+
* list can fail over across it and pin to the chosen runtime. Required (not
|
|
159
|
+
* optional) so that dropping the injection at the composition root is a compile
|
|
160
|
+
* error rather than a silent loss of failover — the exact class of unreachable,
|
|
161
|
+
* fully-tested wiring this repo has been bitten by before.
|
|
162
|
+
*/
|
|
163
|
+
readonly reachableRuntimeIds: () => Promise<ReadonlySet<LocalRuntimeId>>;
|
|
164
|
+
/**
|
|
165
|
+
* Per-runtime concurrency limiter (#144). A REQUIRED injected dependency, one
|
|
166
|
+
* per plugin instance so caps are enforced across all orchestrate calls. Passed
|
|
167
|
+
* through to the coordinator, which caps concurrent generations per runtime and
|
|
168
|
+
* queues excess work. Required so dropping the wiring is a compile error.
|
|
169
|
+
*/
|
|
170
|
+
readonly runtimeLimiter: RuntimeConcurrencyLimiter;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Builds a `GraphSpecV1` from orchestrate payload assignments. Each assignment
|
|
174
|
+
* becomes a node; `dependsOn` on assignments maps to graph edges. All nodes
|
|
175
|
+
* are `implementer` role (the roster role is an orchestration concept, not a
|
|
176
|
+
* graph review relationship). Anchors use the batchID as taskID.
|
|
177
|
+
*
|
|
178
|
+
* Pure: no I/O, clock, random, or env vars.
|
|
179
|
+
*/
|
|
180
|
+
export declare function buildGraphSpecFromAssignments(assignments: readonly OrchestratePayload["assignments"][number][], batchID: string): GraphSpecV1;
|
|
181
|
+
/**
|
|
182
|
+
* Synthesizes the journal event sequence from legacy role task results.
|
|
183
|
+
* Follows the same pattern as `mirrorJournal` in `graphShadow.ts`:
|
|
184
|
+
* run.started → (node.dispatched + node.succeeded/failed) per node → terminal.
|
|
185
|
+
*
|
|
186
|
+
* **Privacy**: events carry only nodeID, operationID, attemptID, and synthetic
|
|
187
|
+
* artifacts (`shadow://` scheme). No prompt text reaches the journal.
|
|
188
|
+
*/
|
|
189
|
+
export declare function synthesizeJournalEvents(spec: GraphSpecV1, results: readonly RoleTaskResult[], cancelled?: readonly string[]): GraphEventV1[];
|
|
190
|
+
/**
|
|
191
|
+
* Bounded failure codes for shadow producer diagnostics. Never a raw error
|
|
192
|
+
* string — fs errors can carry full paths, SDK errors can echo request content.
|
|
193
|
+
* The same discipline applied at `coordinator.ts:328` for subsession failures.
|
|
194
|
+
*/
|
|
195
|
+
export type ShadowProducerFailureClass = "invalid-node-id" | "journal-create-failed" | "journal-append-failed" | "observation-ineligible" | "observation-rejected" | "observation-contained-failure" | "observation-failed" | "unknown";
|
|
196
|
+
/**
|
|
197
|
+
* Classifies a shadow producer error into a bounded code. Pure.
|
|
198
|
+
*/
|
|
199
|
+
export declare function classifyShadowFailure(_error: unknown, phase: "create" | "append" | "observe"): ShadowProducerFailureClass;
|
|
200
|
+
/**
|
|
201
|
+
* Maps the bounded shadow pipeline outcome to the bounded diagnostic taxonomy.
|
|
202
|
+
* Pure and exhaustive: adding a new `ShadowPipelineResult.kind` must update
|
|
203
|
+
* this function before typecheck can pass.
|
|
204
|
+
*/
|
|
205
|
+
export declare function classifyShadowPipelineResult(result: ShadowPipelineResult): ShadowProducerFailureClass | undefined;
|
|
206
|
+
/** Result of shadow producer attempt — success or classified failure. */
|
|
207
|
+
export type ShadowProducerResult = {
|
|
208
|
+
readonly ok: true;
|
|
209
|
+
} | {
|
|
210
|
+
readonly ok: false;
|
|
211
|
+
readonly failureClass: ShadowProducerFailureClass;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Creates the `openteam-orchestrate` tool.
|
|
215
|
+
*
|
|
216
|
+
* This is the production entry point for code-driven roster orchestration.
|
|
217
|
+
* When an agent calls this tool with role assignments, openteam distributes
|
|
218
|
+
* the work via `runRoleTasks` — model selection, subsession lifecycle, and
|
|
219
|
+
* telemetry are all handled by our code, not improvised by the LLM.
|
|
220
|
+
*
|
|
221
|
+
* **Failure containment**: follows the `createShadowPipeline` idiom — no
|
|
222
|
+
* error escapes the tool boundary. A failure returns a structured error
|
|
223
|
+
* result rather than crashing the plugin or corrupting the user's session.
|
|
224
|
+
*
|
|
225
|
+
* **Privacy**: the result projection uses `assertReferenceOnly` to ensure
|
|
226
|
+
* no raw prompt text reaches telemetry or the tool response. Only role IDs,
|
|
227
|
+
* model selections, session IDs, and failure metadata are surfaced.
|
|
228
|
+
*/
|
|
229
|
+
export declare function createOrchestrateTool(deps: OrchestrateDeps): ToolDefinition;
|
|
230
|
+
//# sourceMappingURL=orchestrateTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrateTool.d.ts","sourceRoot":"","sources":["../../src/plugin/orchestrateTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAA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AAO,EAAE,MAAM,GACd,WAAW,CAiBb;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,SAAS,GAAE,SAAS,MAAM,EAAO,GAChC,YAAY,EAAE,CAkFhB;AA0CD;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAClC,iBAAiB,GACjB,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,GACxB,sBAAsB,GACtB,+BAA+B,GAC/B,oBAAoB,GACpB,SAAS,CAAC;AAEd;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GACrC,0BAA0B,CAK5B;AAQD;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,oBAAoB,GAC3B,0BAA0B,GAAG,SAAS,CAaxC;AAED,yEAAyE;AACzE,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;CAAE,GACrB;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,0BAA0B,CAAA;CAAE,CAAC;AA+H9E;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAkF3E"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/**
|
|
3
|
-
* **
|
|
3
|
+
* **Zod schema for the `report-run` action** (issue #53, ADR Option D).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Validates the structural shape of the report that the orchestrator agent sends
|
|
6
|
+
* through the `openteam-graph` tool. Unknown keys are
|
|
7
|
+
* rejected (`.strict()`): the agent payload only carries documented
|
|
8
|
+
* fields.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Pure module: no I/O, clock, or randomness.
|
|
11
11
|
*/
|
|
12
|
-
/**
|
|
12
|
+
/** Node reported by the agent: identity + role + model + success. */
|
|
13
13
|
export declare const ReportRunNodeSchema: z.ZodObject<{
|
|
14
14
|
id: z.ZodString;
|
|
15
15
|
role: z.ZodEnum<{
|
|
@@ -28,7 +28,7 @@ export declare const ReportRunNodeSchema: z.ZodObject<{
|
|
|
28
28
|
}>>;
|
|
29
29
|
}, z.core.$strict>;
|
|
30
30
|
export type ReportRunNode = z.infer<typeof ReportRunNodeSchema>;
|
|
31
|
-
/**
|
|
31
|
+
/** Complete `report-run` payload. */
|
|
32
32
|
export declare const ReportRunPayloadSchema: z.ZodObject<{
|
|
33
33
|
runID: z.ZodString;
|
|
34
34
|
status: z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reportRunSchema.d.ts","sourceRoot":"","sources":["../../src/plugin/reportRunSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;;;;;;;;GASG;AAEH,
|
|
1
|
+
{"version":3,"file":"reportRunSchema.d.ts","sourceRoot":"","sources":["../../src/plugin/reportRunSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;;;;;;;;GASG;AAEH,qEAAqE;AACrE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;kBASrB,CAAC;AAEZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,qCAAqC;AACrC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQxB,CAAC;AAEZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|