@jmanuelcorral/openteam 0.18.1 → 0.20.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/openteam.example.json +23 -14
- package/AGENTS.md +16 -2
- package/README.es.md +300 -209
- package/README.md +300 -139
- package/dist/capabilities/classify.d.ts.map +1 -1
- package/dist/capabilities/normalize.d.ts.map +1 -1
- package/dist/certificates/graph-release-certificate.json +2 -2
- package/dist/certificates/graph-shadow-certificate.json +2 -2
- package/dist/cli/consoleServe.d.ts +16 -0
- package/dist/cli/consoleServe.d.ts.map +1 -1
- package/dist/cli/graphOperator.d.ts +10 -1
- package/dist/cli/graphOperator.d.ts.map +1 -1
- package/dist/cli/lifecycleHistoryProvider.d.ts +21 -0
- package/dist/cli/lifecycleHistoryProvider.d.ts.map +1 -0
- package/dist/cli.d.ts +3 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6841 -1555
- package/dist/commands/agents.d.ts +16 -4
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/dispatch.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/local.d.ts +4 -5
- package/dist/commands/local.d.ts.map +1 -1
- package/dist/commands/report.d.ts +6 -6
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/rolesInit.d.ts +10 -12
- package/dist/commands/rolesInit.d.ts.map +1 -1
- package/dist/commands/setup.d.ts +5 -13
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/yolo.d.ts +2 -4
- package/dist/commands/yolo.d.ts.map +1 -1
- package/dist/config/errors.d.ts.map +1 -1
- package/dist/config/executionPolicyDomains.d.ts +18 -0
- package/dist/config/executionPolicyDomains.d.ts.map +1 -0
- package/dist/config/migrations.d.ts +9 -2
- package/dist/config/migrations.d.ts.map +1 -1
- package/dist/config/persist.d.ts.map +1 -1
- package/dist/config/runtime.d.ts +2 -0
- package/dist/config/runtime.d.ts.map +1 -1
- package/dist/config/schema.d.ts +128 -13
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/console/assets.d.ts +22 -1
- package/dist/console/assets.d.ts.map +1 -1
- package/dist/console/configView.d.ts +2 -7
- package/dist/console/configView.d.ts.map +1 -1
- package/dist/console/render.d.ts +12 -0
- package/dist/console/render.d.ts.map +1 -1
- package/dist/console/types.d.ts +2 -2
- package/dist/console/types.d.ts.map +1 -1
- package/dist/context/schema.d.ts +13 -7
- package/dist/context/schema.d.ts.map +1 -1
- package/dist/graph/certificate.d.ts.map +1 -1
- package/dist/graph/langgraph/adapter.d.ts +7 -8
- package/dist/graph/langgraph/adapter.d.ts.map +1 -1
- package/dist/graph/langgraph/certification.d.ts +5 -0
- package/dist/graph/langgraph/certification.d.ts.map +1 -1
- package/dist/graph/langgraph/checkpointReplay.d.ts.map +1 -1
- package/dist/graph/langgraph/engine.d.ts +2 -2
- package/dist/graph/langgraph/engine.d.ts.map +1 -1
- package/dist/graph/langgraph/types.d.ts +11 -6
- package/dist/graph/langgraph/types.d.ts.map +1 -1
- package/dist/graph/privacyPolicy.d.ts +6 -30
- package/dist/graph/privacyPolicy.d.ts.map +1 -1
- package/dist/index.d.ts +1 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5992 -1390
- package/dist/lifecycle/contracts.d.ts +618 -0
- package/dist/lifecycle/contracts.d.ts.map +1 -0
- package/dist/lifecycle/historyReader.d.ts +11 -0
- package/dist/lifecycle/historyReader.d.ts.map +1 -0
- package/dist/lifecycle/historySourceError.d.ts +7 -0
- package/dist/lifecycle/historySourceError.d.ts.map +1 -0
- package/dist/lifecycle/project.d.ts +3 -0
- package/dist/lifecycle/project.d.ts.map +1 -0
- package/dist/lifecycle/root.d.ts +3 -0
- package/dist/lifecycle/root.d.ts.map +1 -0
- package/dist/lifecycle/runtimeRecorder.d.ts +6 -0
- package/dist/lifecycle/runtimeRecorder.d.ts.map +1 -0
- package/dist/lifecycle/schema.d.ts +487 -0
- package/dist/lifecycle/schema.d.ts.map +1 -0
- package/dist/mcp/teamMemory.d.ts +2 -2
- package/dist/mcp/teamMemory.d.ts.map +1 -1
- package/dist/messages/commands.d.ts +22 -35
- package/dist/messages/commands.d.ts.map +1 -1
- package/dist/messages/executionSetup.d.ts +116 -0
- package/dist/messages/executionSetup.d.ts.map +1 -0
- package/dist/messages/index.d.ts +2 -0
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/messages/lifecycle.d.ts +95 -0
- package/dist/messages/lifecycle.d.ts.map +1 -0
- package/dist/messages/lifecycleRuntime.d.ts +4 -0
- package/dist/messages/lifecycleRuntime.d.ts.map +1 -0
- package/dist/messages/lifecycleStorage.d.ts +4 -0
- package/dist/messages/lifecycleStorage.d.ts.map +1 -0
- package/dist/messages/memoryTool.d.ts +17 -0
- package/dist/messages/memoryTool.d.ts.map +1 -0
- package/dist/messages/orchestration.d.ts +16 -0
- package/dist/messages/orchestration.d.ts.map +1 -0
- package/dist/messages/routing.d.ts +9 -0
- package/dist/messages/routing.d.ts.map +1 -0
- package/dist/opencodeArtifacts/orchestratorAgent.d.ts +3 -5
- package/dist/opencodeArtifacts/orchestratorAgent.d.ts.map +1 -1
- package/dist/orchestrator/coordinator.d.ts +30 -13
- package/dist/orchestrator/coordinator.d.ts.map +1 -1
- package/dist/orchestrator/graphEffects.d.ts +10 -11
- package/dist/orchestrator/graphEffects.d.ts.map +1 -1
- package/dist/orchestrator/graphIngress.d.ts +5 -0
- package/dist/orchestrator/graphIngress.d.ts.map +1 -1
- package/dist/orchestrator/graphRuntime.d.ts +13 -1
- package/dist/orchestrator/graphRuntime.d.ts.map +1 -1
- package/dist/orchestrator/outputContract.d.ts +5 -6
- package/dist/orchestrator/outputContract.d.ts.map +1 -1
- package/dist/orchestrator/roles.d.ts +25 -2
- package/dist/orchestrator/roles.d.ts.map +1 -1
- package/dist/orchestrator/runtimeSelection.d.ts.map +1 -1
- package/dist/orchestrator/subsessions.d.ts +52 -1
- package/dist/orchestrator/subsessions.d.ts.map +1 -1
- package/dist/plugin/availability.d.ts +15 -2
- package/dist/plugin/availability.d.ts.map +1 -1
- package/dist/plugin/diagnostics.d.ts +1 -0
- package/dist/plugin/diagnostics.d.ts.map +1 -1
- package/dist/plugin/hooks.d.ts +21 -2
- package/dist/plugin/hooks.d.ts.map +1 -1
- package/dist/plugin/memoryTool.d.ts +3 -3
- package/dist/plugin/memoryTool.d.ts.map +1 -1
- package/dist/plugin/modelOwnership.d.ts +15 -0
- package/dist/plugin/modelOwnership.d.ts.map +1 -0
- package/dist/plugin/orchestrateTool.d.ts +53 -3
- package/dist/plugin/orchestrateTool.d.ts.map +1 -1
- package/dist/router/chooseModel.d.ts.map +1 -1
- package/dist/router/cost.d.ts +1 -1
- package/dist/router/cost.d.ts.map +1 -1
- package/dist/router/executionPolicy.d.ts +44 -0
- package/dist/router/executionPolicy.d.ts.map +1 -0
- package/dist/router/frontierBaseline.d.ts.map +1 -1
- package/dist/router/types.d.ts +10 -4
- package/dist/router/types.d.ts.map +1 -1
- package/dist/storage/lifecycle/codec.d.ts +19 -0
- package/dist/storage/lifecycle/codec.d.ts.map +1 -0
- package/dist/storage/lifecycle/fsLifecycleJournal.d.ts +3 -0
- package/dist/storage/lifecycle/fsLifecycleJournal.d.ts.map +1 -0
- package/dist/storage/lifecycle/fsLifecycleSupport.d.ts +17 -0
- package/dist/storage/lifecycle/fsLifecycleSupport.d.ts.map +1 -0
- package/dist/storage/lifecycle/fsLifecycleWriterLivenessProbe.d.ts +3 -0
- package/dist/storage/lifecycle/fsLifecycleWriterLivenessProbe.d.ts.map +1 -0
- package/dist/telemetry/aggregate.d.ts +4 -4
- package/dist/telemetry/aggregate.d.ts.map +1 -1
- package/dist/telemetry/diagnostics.d.ts.map +1 -1
- package/dist/telemetry/events.d.ts +6 -6
- package/dist/telemetry/otel.d.ts.map +1 -1
- package/dist/telemetry/types.d.ts +3 -3
- package/dist/web/configApi.d.ts +3 -1
- package/dist/web/configApi.d.ts.map +1 -1
- package/dist/web/graphRoute.d.ts +39 -1
- package/dist/web/graphRoute.d.ts.map +1 -1
- package/dist/web/server.d.ts +19 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/start.d.ts +11 -0
- package/dist/web/start.d.ts.map +1 -1
- package/dist/web/watch.d.ts +17 -2
- package/dist/web/watch.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { GraphSpecV1 } from "../graph/schema";
|
|
2
2
|
import type { RunStatus } from "../graph/types";
|
|
3
|
-
import type {
|
|
3
|
+
import type { LifecycleOperationObservationExpectation, LifecycleRunRecorder } from "../lifecycle/contracts";
|
|
4
|
+
import type { GraphJournal, LoadedJournal } from "../storage/graph/provider";
|
|
4
5
|
import type { WorkspaceLease } from "../storage/graph/workspaceLease";
|
|
5
6
|
import type { GraphEffectExecutor } from "./graphEffects";
|
|
6
7
|
/**
|
|
@@ -54,6 +55,7 @@ export type GraphRuntimeDeps = {
|
|
|
54
55
|
readonly lease: WorkspaceLease;
|
|
55
56
|
readonly effects: GraphEffectExecutor;
|
|
56
57
|
readonly holder: string;
|
|
58
|
+
readonly lifecycle?: LifecycleRunRecorder;
|
|
57
59
|
/** Attempt limit per retryable node; defaults to `DEFAULT_RETRY_LIMIT`. */
|
|
58
60
|
readonly retryLimit?: number;
|
|
59
61
|
};
|
|
@@ -66,5 +68,15 @@ export interface GraphRuntime {
|
|
|
66
68
|
/** Repeats `step` until a non-dispatching state (terminal, completed, etc.). */
|
|
67
69
|
runToCompletion(): Promise<RuntimeStepOutcome>;
|
|
68
70
|
}
|
|
71
|
+
export type GraphLifecycleExpectationOptions = {
|
|
72
|
+
readonly closingStatus?: Exclude<RunStatus, "running">;
|
|
73
|
+
readonly cancelledNodeIDs?: readonly string[];
|
|
74
|
+
readonly retryLimit?: number;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Translates authoritative Graph progress into observations that must already
|
|
78
|
+
* exist in the lifecycle prefix. It never creates lifecycle history.
|
|
79
|
+
*/
|
|
80
|
+
export declare function graphLifecycleExpectations(loaded: LoadedJournal, options?: GraphLifecycleExpectationOptions): readonly LifecycleOperationObservationExpectation[];
|
|
69
81
|
export declare function createGraphRuntime(deps: GraphRuntimeDeps): GraphRuntime;
|
|
70
82
|
//# sourceMappingURL=graphRuntime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphRuntime.d.ts","sourceRoot":"","sources":["../../src/orchestrator/graphRuntime.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"graphRuntime.d.ts","sourceRoot":"","sources":["../../src/orchestrator/graphRuntime.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAIV,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAKV,wCAAwC,EACxC,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,YAAY,EAEZ,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAEV,cAAc,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,oCAAoC;AACpC,MAAM,MAAM,kBAAkB,GAC1B;IACE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;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E,gCAAqC,GAC7C,SAAS,wCAAwC,EAAE,CA4FrD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY,CAyTvE"}
|
|
@@ -80,12 +80,10 @@ export declare const MIN_REPORT_BODY_CHARS = 40;
|
|
|
80
80
|
*
|
|
81
81
|
* The done-signal (`parseReportStatus(text) === "done"`) is necessary but not
|
|
82
82
|
* sufficient: a role that writes ONLY `openteam-status: done` has proven
|
|
83
|
-
* nothing. This predicate
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* with `parseReportStatus` at the call site — never folded into it — so the
|
|
88
|
-
* parser's own semantics and tests are untouched.
|
|
83
|
+
* nothing. This predicate uses the same report analysis as the parser, removes
|
|
84
|
+
* every real status-declaration line (including invalid declarations), and
|
|
85
|
+
* reports whether at least `MIN_REPORT_BODY_CHARS` characters of body survive.
|
|
86
|
+
* Quoted and fenced examples remain body text but can never declare completion.
|
|
89
87
|
*/
|
|
90
88
|
export declare function reportHasSubstance(text: string | undefined): boolean;
|
|
91
89
|
/**
|
|
@@ -113,5 +111,6 @@ export declare function composeSubsessionPrompt(input: {
|
|
|
113
111
|
readonly prompt: string;
|
|
114
112
|
readonly roleID: string;
|
|
115
113
|
readonly batchID: string;
|
|
114
|
+
readonly handoff?: boolean;
|
|
116
115
|
}): SubsessionPromptComposition;
|
|
117
116
|
//# sourceMappingURL=outputContract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputContract.d.ts","sourceRoot":"","sources":["../../src/orchestrator/outputContract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outputContract.d.ts","sourceRoot":"","sources":["../../src/orchestrator/outputContract.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AAEpE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AAkFtD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAGxE;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAyCxC;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAGpE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,yEAAyE;AACzE,MAAM,MAAM,2BAA2B,GAAG;IACxC,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;AA2CF;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B,GAAG,2BAA2B,CAgB9B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { CapabilityRequirement, ComplexityTier } from "../capabilities/types";
|
|
3
3
|
import type { LocalRuntimeId } from "../local/types";
|
|
4
|
+
import type { AgentExecutionPolicy, ExecutionMode } from "../router/executionPolicy";
|
|
4
5
|
import type { ModelSelection, TaskSignals } from "../router/types";
|
|
5
6
|
export type AgentRoleProfile = {
|
|
6
7
|
roleID: string;
|
|
@@ -18,8 +19,8 @@ export type AgentRoleProfile = {
|
|
|
18
19
|
* only tilts routing toward local and still falls through to frontier when no
|
|
19
20
|
* local runtime is reachable (2026-08-26 ruling). `requiresLocalRuntime` refuses
|
|
20
21
|
* the request before dispatch when no local runtime is reachable — it never
|
|
21
|
-
* falls through to a frontier provider.
|
|
22
|
-
*
|
|
22
|
+
* falls through to a frontier provider. This legacy operator constraint is
|
|
23
|
+
* optional; no built-in role requires local execution solely because of its name.
|
|
23
24
|
*/
|
|
24
25
|
requiresLocalRuntime?: boolean;
|
|
25
26
|
/**
|
|
@@ -67,6 +68,9 @@ export type AgentRoleProfile = {
|
|
|
67
68
|
* today's behaviour exactly.
|
|
68
69
|
*/
|
|
69
70
|
localModelClass?: LocalModelClass;
|
|
71
|
+
executionMode?: ExecutionMode;
|
|
72
|
+
model?: ModelSelection | "auto";
|
|
73
|
+
fallbacks?: ModelSelection[];
|
|
70
74
|
};
|
|
71
75
|
/**
|
|
72
76
|
* Class of local model a role draws off a runtime (#210 follow-up).
|
|
@@ -100,6 +104,19 @@ export declare const AgentRoleProfileSchema: z.ZodObject<{
|
|
|
100
104
|
coder: "coder";
|
|
101
105
|
thinking: "thinking";
|
|
102
106
|
}>>;
|
|
107
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
108
|
+
frontier: "frontier";
|
|
109
|
+
local: "local";
|
|
110
|
+
mixed: "mixed";
|
|
111
|
+
}>>;
|
|
112
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
113
|
+
providerID: z.ZodString;
|
|
114
|
+
modelID: z.ZodString;
|
|
115
|
+
}, z.core.$strict>, z.ZodLiteral<"auto">]>>;
|
|
116
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
117
|
+
providerID: z.ZodString;
|
|
118
|
+
modelID: z.ZodString;
|
|
119
|
+
}, z.core.$strict>>>;
|
|
103
120
|
}, z.core.$strict>;
|
|
104
121
|
export declare const TEAM_ROLES: Record<string, AgentRoleProfile>;
|
|
105
122
|
export declare function isKnownNonWorkerRole(roleID: string): boolean;
|
|
@@ -135,5 +152,11 @@ export declare function getRoleProfile(roleID: string, configuredRoles?: Readonl
|
|
|
135
152
|
* while unknown roles are never silently starved of frontier access.
|
|
136
153
|
*/
|
|
137
154
|
export declare function synthesiseFallbackProfile(roleID: string): AgentRoleProfile;
|
|
155
|
+
export declare function agentExecutionPolicyForRole(role: AgentRoleProfile): AgentExecutionPolicy | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* Classifies ordinary task complexity while treating the configured role tier
|
|
158
|
+
* as a floor. Permission elevation and execution policy remain caller-owned.
|
|
159
|
+
*/
|
|
160
|
+
export declare function classifyRoleTaskTier(role: AgentRoleProfile, task: TaskSignals): ComplexityTier;
|
|
138
161
|
export declare function roleToRequirement(role: AgentRoleProfile, task: TaskSignals, tier?: ComplexityTier): CapabilityRequirement;
|
|
139
162
|
//# sourceMappingURL=roles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/orchestrator/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/orchestrator/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,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AgB,qBAAqB,CACnC,IAAI,EAAE,gBAAgB,EACtB,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,GAAG,SAAS,EAClD,MAAM,EAAE,cAAc,GACrB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"runtimeSelection.d.ts","sourceRoot":"","sources":["../../src/orchestrator/runtimeSelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAC;AAEjE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;CACpC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,cAAc,GACrB,YAAY,GAAG,SAAS,CAE1B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,cAAc,GACrB,cAAc,GAAG,SAAS,CAI5B;AAsDD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,gBAAgB,EACtB,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,GAAG,SAAS,EAClD,MAAM,EAAE,cAAc,GACrB,wBAAwB,CA0E1B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BoundedNormalizedSessionFailure } from "../lifecycle/contracts";
|
|
1
2
|
import type { ModelSelection } from "../router/types";
|
|
2
3
|
export type OpencodeSessionCreateArgs = {
|
|
3
4
|
body?: {
|
|
@@ -12,6 +13,10 @@ export type OpencodeSessionPromptArgs = {
|
|
|
12
13
|
path: {
|
|
13
14
|
id: string;
|
|
14
15
|
};
|
|
16
|
+
query?: {
|
|
17
|
+
directory?: string;
|
|
18
|
+
};
|
|
19
|
+
signal?: AbortSignal;
|
|
15
20
|
body: {
|
|
16
21
|
model?: ModelSelection;
|
|
17
22
|
agent?: string;
|
|
@@ -22,6 +27,31 @@ export type OpencodeSessionPromptArgs = {
|
|
|
22
27
|
}>;
|
|
23
28
|
};
|
|
24
29
|
};
|
|
30
|
+
export type OpencodeSessionAbortArgs = {
|
|
31
|
+
path: {
|
|
32
|
+
id: string;
|
|
33
|
+
};
|
|
34
|
+
query?: {
|
|
35
|
+
directory?: string;
|
|
36
|
+
};
|
|
37
|
+
signal?: AbortSignal;
|
|
38
|
+
};
|
|
39
|
+
export type OpencodeSessionStatusArgs = {
|
|
40
|
+
query?: {
|
|
41
|
+
directory?: string;
|
|
42
|
+
};
|
|
43
|
+
signal?: AbortSignal;
|
|
44
|
+
};
|
|
45
|
+
export type OpencodeSessionStatus = {
|
|
46
|
+
readonly type: "idle";
|
|
47
|
+
} | {
|
|
48
|
+
readonly type: "retry";
|
|
49
|
+
readonly attempt: number;
|
|
50
|
+
readonly message: string;
|
|
51
|
+
readonly next: number;
|
|
52
|
+
} | {
|
|
53
|
+
readonly type: "busy";
|
|
54
|
+
};
|
|
25
55
|
export type OpencodeSessionClient = {
|
|
26
56
|
session: {
|
|
27
57
|
create: (args: OpencodeSessionCreateArgs) => Promise<{
|
|
@@ -34,6 +64,14 @@ export type OpencodeSessionClient = {
|
|
|
34
64
|
data?: unknown;
|
|
35
65
|
error?: unknown;
|
|
36
66
|
}>;
|
|
67
|
+
abort?: (args: OpencodeSessionAbortArgs) => Promise<{
|
|
68
|
+
data?: boolean;
|
|
69
|
+
error?: unknown;
|
|
70
|
+
}>;
|
|
71
|
+
status?: (args?: OpencodeSessionStatusArgs) => Promise<{
|
|
72
|
+
data?: Readonly<Record<string, OpencodeSessionStatus>>;
|
|
73
|
+
error?: unknown;
|
|
74
|
+
}>;
|
|
37
75
|
};
|
|
38
76
|
};
|
|
39
77
|
export type SubsessionRequest = {
|
|
@@ -54,9 +92,22 @@ export type SubsessionResult = {
|
|
|
54
92
|
response?: unknown;
|
|
55
93
|
failureReason?: string;
|
|
56
94
|
failureStage?: "create" | "prompt" | "report";
|
|
95
|
+
/**
|
|
96
|
+
* Whether another pass/model may be dispatched without overlapping an
|
|
97
|
+
* uncertain prior generation. Present only on failures.
|
|
98
|
+
*/
|
|
99
|
+
retrySafe?: boolean;
|
|
100
|
+
normalizedFailure?: BoundedNormalizedSessionFailure;
|
|
57
101
|
};
|
|
58
102
|
export type SubsessionDeps = {
|
|
59
103
|
timeoutMs?: number;
|
|
104
|
+
abortGraceMs: number;
|
|
105
|
+
statusPollMs: number;
|
|
106
|
+
now: () => number;
|
|
107
|
+
delay: (ms: number) => Promise<void>;
|
|
108
|
+
onSessionCreated?: (sessionID: string) => Promise<void>;
|
|
60
109
|
};
|
|
61
|
-
export declare
|
|
110
|
+
export declare const DEFAULT_ABORT_GRACE_MS = 2000;
|
|
111
|
+
export declare const DEFAULT_STATUS_POLL_MS = 100;
|
|
112
|
+
export declare function runSubsession(client: OpencodeSessionClient, req: SubsessionRequest, deps: SubsessionDeps): Promise<SubsessionResult>;
|
|
62
113
|
//# sourceMappingURL=subsessions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subsessions.d.ts","sourceRoot":"","sources":["../../src/orchestrator/subsessions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,C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CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC9C;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,+BAA+B,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,sBAAsB,OAAQ,CAAC;AAC5C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AA+f1C,wBAAsB,aAAa,CACjC,MAAM,EAAE,qBAAqB,EAC7B,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAkJ3B"}
|
|
@@ -1,20 +1,33 @@
|
|
|
1
|
+
import type { ModelCapabilityProfile } from "../capabilities/types";
|
|
1
2
|
import type { OpenTeamConfig } from "../config/schema";
|
|
2
3
|
import type { LocalRuntimeSnapshot } from "../local/types";
|
|
3
|
-
import type { AvailableModel } from "../router/types";
|
|
4
|
+
import type { AvailableModel, ModelSelection } from "../router/types";
|
|
4
5
|
export type AvailabilityProvider = () => AvailableModel[];
|
|
6
|
+
export type ConfiguredModel = ModelSelection & {
|
|
7
|
+
supportsTools?: boolean;
|
|
8
|
+
contextWindow?: number;
|
|
9
|
+
};
|
|
10
|
+
export type ConfiguredModelInventory = {
|
|
11
|
+
models: ConfiguredModel[];
|
|
12
|
+
profiles: ModelCapabilityProfile[];
|
|
13
|
+
};
|
|
5
14
|
type ProbeRegistry = {
|
|
6
15
|
probe(runtimes: OpenTeamConfig["local"]["runtimes"]): Promise<LocalRuntimeSnapshot[]>;
|
|
7
16
|
};
|
|
8
17
|
export type AvailabilityCache = {
|
|
9
18
|
get(): AvailableModel[];
|
|
19
|
+
getProfiles(): ModelCapabilityProfile[];
|
|
10
20
|
refresh(): Promise<void>;
|
|
11
21
|
};
|
|
12
22
|
export type AvailabilityCacheOptions = {
|
|
13
23
|
config: OpenTeamConfig;
|
|
14
24
|
registry: ProbeRegistry;
|
|
25
|
+
initialConfiguredModels?: readonly ConfiguredModel[];
|
|
26
|
+
initialConfiguredProfiles?: readonly ModelCapabilityProfile[];
|
|
27
|
+
listConfiguredInventory?: () => Promise<ConfiguredModelInventory>;
|
|
15
28
|
onRefreshError?: (error: unknown) => void;
|
|
16
29
|
};
|
|
17
|
-
export declare function toAvailableModels(snapshots: LocalRuntimeSnapshot[], config: OpenTeamConfig): AvailableModel[];
|
|
30
|
+
export declare function toAvailableModels(snapshots: LocalRuntimeSnapshot[], config: OpenTeamConfig, configuredModels?: readonly ConfiguredModel[]): AvailableModel[];
|
|
18
31
|
export declare function createAvailabilityCache(options: AvailabilityCacheOptions): AvailabilityCache;
|
|
19
32
|
export {};
|
|
20
33
|
//# sourceMappingURL=availability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../src/plugin/availability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../src/plugin/availability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACv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,cAAc,EAAE,CA0DlB;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,wBAAwB,GAChC,iBAAiB,CAoDnB"}
|
|
@@ -17,6 +17,7 @@ export type PluginDiagnosticChannel = {
|
|
|
17
17
|
readonly emit: (diagnostic: DiagnosticInput, options?: DiagnosticSinkOptions) => void;
|
|
18
18
|
readonly sink: (level: DiagnosticLevel, code: DiagnosticCode, options?: DiagnosticSinkOptions) => (message?: unknown) => void;
|
|
19
19
|
readonly warn: (code: DiagnosticCode, options?: DiagnosticSinkOptions) => (message?: unknown) => void;
|
|
20
|
+
readonly warnUserMessage: (code: DiagnosticCode, message: string, options?: DiagnosticSinkOptions) => void;
|
|
20
21
|
readonly info: (code: DiagnosticCode, options?: DiagnosticSinkOptions) => (message?: unknown) => void;
|
|
21
22
|
};
|
|
22
23
|
export type PluginDiagnosticChannelDeps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/plugin/diagnostics.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,4BAA4B,WAAW,CAAC;AAErD,KAAK,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;AAChD,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;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QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAmEF,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,2BAA2B,GAChC,uBAAuB,CA0EzB"}
|
package/dist/plugin/hooks.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { Hooks } from "@opencode-ai/plugin";
|
|
2
|
+
import type { ModelCapabilityProfile } from "../capabilities/types";
|
|
2
3
|
import type { OpenTeamConfig } from "../config/schema";
|
|
4
|
+
import { type AgentRoleProfile } from "../orchestrator/roles";
|
|
3
5
|
import type { TaskSignals } from "../router/types";
|
|
4
6
|
import { type EventSink } from "../telemetry/eventLog";
|
|
5
7
|
import type { AvailabilityProvider } from "./availability";
|
|
8
|
+
import type { OrchestratedModelOwnership } from "./modelOwnership";
|
|
6
9
|
export type ChatMessageHook = NonNullable<Hooks["chat.message"]>;
|
|
7
10
|
export type ChatMessageHookOptions = {
|
|
8
11
|
sink?: EventSink;
|
|
@@ -10,8 +13,8 @@ export type ChatMessageHookOptions = {
|
|
|
10
13
|
/**
|
|
11
14
|
* M6 memory injection (opt-in). Given the prompt text, returns a context
|
|
12
15
|
* block to **prepend** to the first text part, or `null` to skip injection.
|
|
13
|
-
* It is invoked **after**
|
|
14
|
-
*
|
|
16
|
+
* It is invoked **after** model ownership/routing resolution, so it does not
|
|
17
|
+
* alter router determinism or the prompt hash.
|
|
15
18
|
*/
|
|
16
19
|
injectMemory?: (queryText: string) => Promise<string | null>;
|
|
17
20
|
/**
|
|
@@ -20,6 +23,22 @@ export type ChatMessageHookOptions = {
|
|
|
20
23
|
* cross-verify the agent's self-reported fields in `report-run`.
|
|
21
24
|
*/
|
|
22
25
|
onRoute?: (sessionID: string, model: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Per-plugin authorization boundary for models already selected by the
|
|
28
|
+
* coordinator before it calls the public SDK. The SDK re-enters
|
|
29
|
+
* `chat.message`; a matching one-shot claim preserves that authorized worker
|
|
30
|
+
* model instead of routing the worker through the primary policy again.
|
|
31
|
+
*/
|
|
32
|
+
orchestratedModelOwnership?: OrchestratedModelOwnership;
|
|
33
|
+
/**
|
|
34
|
+
* Resolves a project roster alias to its stable configured or built-in role.
|
|
35
|
+
* Direct configured/built-in agent names are resolved without this callback.
|
|
36
|
+
*/
|
|
37
|
+
resolveAgentRole?: (agentName: string) => AgentRoleProfile | undefined | Promise<AgentRoleProfile | undefined>;
|
|
38
|
+
/** Waits for the initial authoritative provider/runtime inventory. */
|
|
39
|
+
beforeRoute?: () => Promise<void>;
|
|
40
|
+
/** Supplies capability and pricing profiles from the same inventory. */
|
|
41
|
+
capabilityProfiles?: () => ModelCapabilityProfile[];
|
|
23
42
|
};
|
|
24
43
|
export declare function deriveTaskSignals(input: Parameters<ChatMessageHook>[0], output: Parameters<ChatMessageHook>[1]): TaskSignals;
|
|
25
44
|
/**
|
|
@@ -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;
|
|
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,sBAAsB,EAAE,MAAM,uB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,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GACrC,WAAW,CAkBb;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EACtC,KAAK,EAAE,MAAM,GACZ,OAAO,CAQT;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,oBAAoB,EAClC,OAAO,GAAE,sBAA2B,GACnC,eAAe,CAkHjB;AAED,wBAAgB,WAAW,CACzB,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,oBAAoB,EAClC,OAAO,GAAE,sBAA2B,GACnC,KAAK,CAIP"}
|
|
@@ -8,7 +8,7 @@ export type MemoryToolDeps = {
|
|
|
8
8
|
storage: StorageProvider;
|
|
9
9
|
/** Injected clock (epoch ms). Keeps this module free of ambient time. */
|
|
10
10
|
now: () => number;
|
|
11
|
-
/**
|
|
11
|
+
/** Reachability probe for the local extraction transport. */
|
|
12
12
|
localRuntimeReachable: () => Promise<boolean>;
|
|
13
13
|
/** Local runtime HTTP transport; injected I/O port. */
|
|
14
14
|
fetch: FetchLike;
|
|
@@ -29,8 +29,8 @@ export declare const MemoryWritePayloadSchema: z.ZodObject<{
|
|
|
29
29
|
/**
|
|
30
30
|
* Builds the `openteam-memory` tool. All I/O is injected; the tool itself only
|
|
31
31
|
* orchestrates: gate → local extraction → redaction (inside `extractMemory`) →
|
|
32
|
-
* append-only write.
|
|
33
|
-
*
|
|
32
|
+
* append-only write. Expected validation, availability, and extraction failures
|
|
33
|
+
* return an actionable message without modifying the log.
|
|
34
34
|
*/
|
|
35
35
|
export declare function createMemoryTool(deps: MemoryToolDeps): ToolDefinition;
|
|
36
36
|
//# sourceMappingURL=memoryTool.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAKhD,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,6DAA6D;IAC7D,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;AAeF,sDAAsD;AACtD,eAAO,MAAM,wBAAwB;;;;;;;;;;kBAY1B,CAAC;AAEZ;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,CA4GrE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ModelSelection } from "../router/types";
|
|
2
|
+
export type OrchestratedModelAuthorization = {
|
|
3
|
+
readonly sessionID: string;
|
|
4
|
+
readonly agent?: string | undefined;
|
|
5
|
+
readonly model: ModelSelection;
|
|
6
|
+
};
|
|
7
|
+
export type OrchestratedModelLease = {
|
|
8
|
+
release(): void;
|
|
9
|
+
};
|
|
10
|
+
export type OrchestratedModelOwnership = {
|
|
11
|
+
authorize(authorization: OrchestratedModelAuthorization): OrchestratedModelLease;
|
|
12
|
+
claim(authorization: OrchestratedModelAuthorization): ModelSelection | undefined;
|
|
13
|
+
};
|
|
14
|
+
export declare function createOrchestratedModelOwnership(): OrchestratedModelOwnership;
|
|
15
|
+
//# sourceMappingURL=modelOwnership.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelOwnership.d.ts","sourceRoot":"","sources":["../../src/plugin/modelOwnership.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,CACP,aAAa,EAAE,8BAA8B,GAC5C,sBAAsB,CAAC;IAC1B,KAAK,CACH,aAAa,EAAE,8BAA8B,GAC5C,cAAc,GAAG,SAAS,CAAC;CAC/B,CAAC;AAUF,wBAAgB,gCAAgC,IAAI,0BAA0B,CA+C7E"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import type { ModelCapabilityProfile } from "../capabilities/types";
|
|
3
4
|
import type { GraphMode, OpenTeamConfig } from "../config/schema";
|
|
4
5
|
import type { GraphEventV1, GraphSpecV1 } from "../graph/schema";
|
|
6
|
+
import type { BoundedNormalizedSessionFailure, RuntimeLifecycleRecorder } from "../lifecycle/contracts";
|
|
5
7
|
import type { RuntimeConcurrencyLimiter } from "../local/concurrency";
|
|
6
8
|
import type { LocalRuntimeId } from "../local/types";
|
|
7
9
|
import { type CoordinatorDeps, type RoleTaskResult } from "../orchestrator/coordinator";
|
|
8
10
|
import { type ReportArtifactProbe } from "../orchestrator/reportDurability";
|
|
9
|
-
import type {
|
|
11
|
+
import type { RosterEntry } from "../orchestrator/roster";
|
|
12
|
+
import type { OpencodeSessionClient, OpencodeSessionStatus } from "../orchestrator/subsessions";
|
|
13
|
+
import type { AvailableModel } from "../router/types";
|
|
10
14
|
import type { GraphJournal } from "../storage/graph/provider";
|
|
11
15
|
import type { EventSink } from "../telemetry/eventLog";
|
|
16
|
+
import type { OrchestratedModelOwnership } from "./modelOwnership";
|
|
12
17
|
import type { ShadowObserver, ShadowPipelineResult } from "./shadowPipeline";
|
|
13
18
|
/**
|
|
14
19
|
* Schema for the `openteam-orchestrate` tool boundary.
|
|
@@ -99,6 +104,7 @@ export type SdkClientPort = {
|
|
|
99
104
|
path: {
|
|
100
105
|
id: string;
|
|
101
106
|
};
|
|
107
|
+
signal?: AbortSignal;
|
|
102
108
|
body: {
|
|
103
109
|
model?: {
|
|
104
110
|
providerID: string;
|
|
@@ -115,8 +121,37 @@ export type SdkClientPort = {
|
|
|
115
121
|
data: unknown;
|
|
116
122
|
error: unknown;
|
|
117
123
|
}>;
|
|
124
|
+
abort(args: {
|
|
125
|
+
path: {
|
|
126
|
+
id: string;
|
|
127
|
+
};
|
|
128
|
+
}): Promise<{
|
|
129
|
+
data: boolean | undefined;
|
|
130
|
+
error: unknown;
|
|
131
|
+
}>;
|
|
132
|
+
status(args?: {
|
|
133
|
+
query?: {
|
|
134
|
+
directory?: string;
|
|
135
|
+
};
|
|
136
|
+
}): Promise<{
|
|
137
|
+
data: Readonly<Record<string, OpencodeSessionStatus>> | undefined;
|
|
138
|
+
error: unknown;
|
|
139
|
+
}>;
|
|
140
|
+
};
|
|
141
|
+
app: {
|
|
142
|
+
agents(args?: {
|
|
143
|
+
query?: {
|
|
144
|
+
directory?: string;
|
|
145
|
+
};
|
|
146
|
+
}): Promise<{
|
|
147
|
+
data: readonly {
|
|
148
|
+
readonly name: string;
|
|
149
|
+
}[] | undefined;
|
|
150
|
+
error: unknown;
|
|
151
|
+
}>;
|
|
118
152
|
};
|
|
119
153
|
};
|
|
154
|
+
export declare function normalizeSdkSessionFailure(error: unknown, stage: "create" | "prompt"): BoundedNormalizedSessionFailure;
|
|
120
155
|
/**
|
|
121
156
|
* Adapts the opencode SDK client to `OpencodeSessionClient`.
|
|
122
157
|
*
|
|
@@ -127,7 +162,8 @@ export type SdkClientPort = {
|
|
|
127
162
|
* type would compile but add an unused abstraction layer. This adapter
|
|
128
163
|
* bridges the SDK client directly to the type the coordinator consumes.
|
|
129
164
|
*/
|
|
130
|
-
export declare function adaptSdkClient(sdk: SdkClientPort): OpencodeSessionClient;
|
|
165
|
+
export declare function adaptSdkClient(sdk: SdkClientPort, orchestratedModelOwnership?: OrchestratedModelOwnership): OpencodeSessionClient;
|
|
166
|
+
export declare function sdkAgentNames(sdk: SdkClientPort, directory?: string): Promise<ReadonlySet<string>>;
|
|
131
167
|
/**
|
|
132
168
|
* Projects `RoleTaskResult[]` into a reference-only `OrchestrateResult`.
|
|
133
169
|
*
|
|
@@ -145,6 +181,10 @@ export type OrchestrateDeps = {
|
|
|
145
181
|
readonly config: OpenTeamConfig;
|
|
146
182
|
readonly now: () => number;
|
|
147
183
|
readonly newDecisionID: () => string;
|
|
184
|
+
readonly timeoutMs?: number;
|
|
185
|
+
readonly abortGraceMs: number;
|
|
186
|
+
readonly statusPollMs: number;
|
|
187
|
+
readonly delay: (ms: number) => Promise<void>;
|
|
148
188
|
/** TUI-safe warning sink; plugin tools must never fall back to console.warn. */
|
|
149
189
|
readonly warn: NonNullable<CoordinatorDeps["warn"]>;
|
|
150
190
|
/** Graph mode resolved from config. `off` disables shadow journaling. */
|
|
@@ -203,7 +243,16 @@ export type OrchestrateDeps = {
|
|
|
203
243
|
* fail-safe: on a missing or unparseable roster it returns an empty set, and it
|
|
204
244
|
* must never throw.
|
|
205
245
|
*/
|
|
206
|
-
readonly
|
|
246
|
+
readonly rosterEntries: () => Promise<readonly RosterEntry[]>;
|
|
247
|
+
readonly availableAgentNames: (directory?: string) => Promise<ReadonlySet<string>>;
|
|
248
|
+
readonly availableModels: () => readonly AvailableModel[];
|
|
249
|
+
readonly capabilityProfiles: () => readonly ModelCapabilityProfile[];
|
|
250
|
+
/**
|
|
251
|
+
* Initial authoritative provider/runtime inventory barrier. Required so the
|
|
252
|
+
* first tool dispatch cannot route against startup placeholders while plugin
|
|
253
|
+
* initialization itself remains free of the host's provider-list cycle.
|
|
254
|
+
*/
|
|
255
|
+
readonly ensureAvailability: () => Promise<void>;
|
|
207
256
|
/**
|
|
208
257
|
* Durability probe (#report-durability). A REQUIRED injected I/O port that
|
|
209
258
|
* answers, in code, whether a role's promised report artifact was actually
|
|
@@ -236,6 +285,7 @@ export type OrchestrateDeps = {
|
|
|
236
285
|
* `undefined` and must never throw.
|
|
237
286
|
*/
|
|
238
287
|
readonly readReportArtifact: (reportPath: string) => Promise<string | undefined>;
|
|
288
|
+
readonly lifecycleRecorder?: RuntimeLifecycleRecorder;
|
|
239
289
|
};
|
|
240
290
|
/**
|
|
241
291
|
* Builds a `GraphSpecV1` from orchestrate payload assignments. Each assignment
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"orchestrateTool.d.ts","sourceRoot":"","sources":["../../src/plugin/orchestrateTool.ts"],"names":[],"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AAE,CAAC;AA+H9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,EAAE,CASlE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAezE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,MAAM,GACtB,MAAM,GAAG,SAAS,CAUpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,SAAS,kBAAkB,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,EACjE,MAAM,EAAE,cAAc,EACtB,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,GACjC,MAAM,EAAE,CAiBV;AAqBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAyM3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chooseModel.d.ts","sourceRoot":"","sources":["../../src/router/chooseModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chooseModel.d.ts","sourceRoot":"","sources":["../../src/router/chooseModel.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAIV,eAAe,EACf,YAAY,EACb,MAAM,SAAS,CAAC;AA4zBjB,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,eAAe,CAkLhE"}
|
package/dist/router/cost.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ModelSelection, RoutingInput } from "./types";
|
|
2
|
-
export declare function estimatedCostUSD(input: RoutingInput, model: ModelSelection): number;
|
|
2
|
+
export declare function estimatedCostUSD(input: RoutingInput, model: ModelSelection): number | null;
|
|
3
3
|
export declare function roundUSD(value: number): number;
|
|
4
4
|
//# sourceMappingURL=cost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/router/cost.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAW5D,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,cAAc,GACpB,MAAM,
|
|
1
|
+
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/router/cost.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAW5D,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,cAAc,GACpB,MAAM,GAAG,IAAI,CAcf;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9C"}
|