@claudexor/schema 1.0.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/LICENSE +21 -0
- package/README.md +16 -0
- package/dist/agent-capabilities.d.ts +366 -0
- package/dist/agent-capabilities.d.ts.map +1 -0
- package/dist/agent-capabilities.js +125 -0
- package/dist/agent-capabilities.js.map +1 -0
- package/dist/apply-eligibility.d.ts +76 -0
- package/dist/apply-eligibility.d.ts.map +1 -0
- package/dist/apply-eligibility.js +37 -0
- package/dist/apply-eligibility.js.map +1 -0
- package/dist/attachment.d.ts +69 -0
- package/dist/attachment.d.ts.map +1 -0
- package/dist/attachment.js +54 -0
- package/dist/attachment.js.map +1 -0
- package/dist/budget.d.ts +75 -0
- package/dist/budget.d.ts.map +1 -0
- package/dist/budget.js +54 -0
- package/dist/budget.js.map +1 -0
- package/dist/config.d.ts +743 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +194 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +222 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +70 -0
- package/dist/context.js.map +1 -0
- package/dist/control-run-detail.d.ts +1686 -0
- package/dist/control-run-detail.d.ts.map +1 -0
- package/dist/control-run-detail.js +107 -0
- package/dist/control-run-detail.js.map +1 -0
- package/dist/control-trust.d.ts +79 -0
- package/dist/control-trust.d.ts.map +1 -0
- package/dist/control-trust.js +39 -0
- package/dist/control-trust.js.map +1 -0
- package/dist/control.d.ts +4226 -0
- package/dist/control.d.ts.map +1 -0
- package/dist/control.js +1022 -0
- package/dist/control.js.map +1 -0
- package/dist/decision.d.ts +208 -0
- package/dist/decision.d.ts.map +1 -0
- package/dist/decision.js +98 -0
- package/dist/decision.js.map +1 -0
- package/dist/events.d.ts +70 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +105 -0
- package/dist/events.js.map +1 -0
- package/dist/gate.d.ts +37 -0
- package/dist/gate.d.ts.map +1 -0
- package/dist/gate.js +20 -0
- package/dist/gate.js.map +1 -0
- package/dist/harness.d.ts +1418 -0
- package/dist/harness.d.ts.map +1 -0
- package/dist/harness.js +552 -0
- package/dist/harness.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/orchestrate.d.ts +428 -0
- package/dist/orchestrate.d.ts.map +1 -0
- package/dist/orchestrate.js +246 -0
- package/dist/orchestrate.js.map +1 -0
- package/dist/primitives.d.ts +71 -0
- package/dist/primitives.d.ts.map +1 -0
- package/dist/primitives.js +114 -0
- package/dist/primitives.js.map +1 -0
- package/dist/review.d.ts +220 -0
- package/dist/review.d.ts.map +1 -0
- package/dist/review.js +91 -0
- package/dist/review.js.map +1 -0
- package/dist/route.d.ts +67 -0
- package/dist/route.d.ts.map +1 -0
- package/dist/route.js +33 -0
- package/dist/route.js.map +1 -0
- package/dist/spec.d.ts +561 -0
- package/dist/spec.d.ts.map +1 -0
- package/dist/spec.js +133 -0
- package/dist/spec.js.map +1 -0
- package/dist/surface-run-controls.d.ts +14 -0
- package/dist/surface-run-controls.d.ts.map +1 -0
- package/dist/surface-run-controls.js +142 -0
- package/dist/surface-run-controls.js.map +1 -0
- package/dist/task.d.ts +565 -0
- package/dist/task.d.ts.map +1 -0
- package/dist/task.js +186 -0
- package/dist/task.js.map +1 -0
- package/dist/telemetry.d.ts +660 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +140 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/thread.d.ts +348 -0
- package/dist/thread.d.ts.map +1 -0
- package/dist/thread.js +194 -0
- package/dist/thread.js.map +1 -0
- package/dist/workproduct.d.ts +31 -0
- package/dist/workproduct.d.ts.map +1 -0
- package/dist/workproduct.js +25 -0
- package/dist/workproduct.js.map +1 -0
- package/dist/workspace.d.ts +53 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +30 -0
- package/dist/workspace.js.map +1 -0
- package/generated/AgentCapabilityCatalog.schema.json +389 -0
- package/generated/ApplyEligibility.schema.json +44 -0
- package/generated/BudgetLease.schema.json +95 -0
- package/generated/BudgetObservation.schema.json +76 -0
- package/generated/ConformanceReport.schema.json +107 -0
- package/generated/ContextPack.schema.json +186 -0
- package/generated/ControlApplyCheckRequest.schema.json +54 -0
- package/generated/ControlApplyRequest.schema.json +74 -0
- package/generated/ControlHarnessListResponse.schema.json +498 -0
- package/generated/ControlHarnessModelsResponse.schema.json +78 -0
- package/generated/ControlHarnessSettingsPatch.schema.json +130 -0
- package/generated/ControlInteractionAnswerRequest.schema.json +48 -0
- package/generated/ControlInteractionAnswerResponse.schema.json +35 -0
- package/generated/ControlPendingInteraction.schema.json +129 -0
- package/generated/ControlQueuedRunInfo.schema.json +44 -0
- package/generated/ControlRunControlRequest.schema.json +61 -0
- package/generated/ControlRunControlResponse.schema.json +40 -0
- package/generated/ControlRunDecisionRequest.schema.json +98 -0
- package/generated/ControlRunDecisionResponse.schema.json +40 -0
- package/generated/ControlRunDetail.schema.json +1925 -0
- package/generated/ControlRunStartInfo.schema.json +33 -0
- package/generated/ControlRunStartRequest.schema.json +429 -0
- package/generated/ControlRunSummary.schema.json +666 -0
- package/generated/ControlSecretListResponse.schema.json +57 -0
- package/generated/ControlSettingsSnapshot.schema.json +281 -0
- package/generated/ControlSettingsUpdateRequest.schema.json +212 -0
- package/generated/ControlSetupJob.schema.json +148 -0
- package/generated/ControlSetupJobConfirmRequest.schema.json +18 -0
- package/generated/ControlSetupJobCreateRequest.schema.json +38 -0
- package/generated/ControlSetupJobEvent.schema.json +58 -0
- package/generated/ControlSetupJobListResponse.schema.json +162 -0
- package/generated/ControlSpecFreezeRequest.schema.json +83 -0
- package/generated/ControlSpecQuestionsRequest.schema.json +80 -0
- package/generated/ControlThread.schema.json +129 -0
- package/generated/ControlThreadApplyRequest.schema.json +32 -0
- package/generated/ControlThreadApplyResponse.schema.json +47 -0
- package/generated/ControlThreadCreateRequest.schema.json +107 -0
- package/generated/ControlThreadDetail.schema.json +515 -0
- package/generated/ControlThreadListResponse.schema.json +141 -0
- package/generated/ControlThreadUpdateRequest.schema.json +46 -0
- package/generated/ControlTrustListResponse.schema.json +59 -0
- package/generated/ControlTrustState.schema.json +45 -0
- package/generated/ControlTrustUpdateRequest.schema.json +26 -0
- package/generated/DecisionRecord.schema.json +232 -0
- package/generated/GateResult.schema.json +81 -0
- package/generated/GlobalConfig.schema.json +313 -0
- package/generated/HarnessEvent.schema.json +360 -0
- package/generated/HarnessManifest.schema.json +350 -0
- package/generated/HarnessModel.schema.json +41 -0
- package/generated/HarnessStatusDto.schema.json +486 -0
- package/generated/McpRunToolResult.schema.json +91 -0
- package/generated/OrchestrateContract.schema.json +93 -0
- package/generated/OrchestratePlan.schema.json +244 -0
- package/generated/OrchestratePlanProgress.schema.json +103 -0
- package/generated/ProjectConfig.schema.json +95 -0
- package/generated/ReviewFinding.schema.json +226 -0
- package/generated/RouteFallbackPayload.schema.json +79 -0
- package/generated/RouteProof.schema.json +111 -0
- package/generated/RunControl.schema.json +51 -0
- package/generated/RunEvent.schema.json +103 -0
- package/generated/RunFailure.schema.json +98 -0
- package/generated/RunTelemetry.schema.json +433 -0
- package/generated/SecretMetadata.schema.json +34 -0
- package/generated/Session.schema.json +80 -0
- package/generated/SessionReboundLineage.schema.json +73 -0
- package/generated/SpecPack.schema.json +372 -0
- package/generated/TaskContract.schema.json +501 -0
- package/generated/Thread.schema.json +176 -0
- package/generated/ThreadTurn.schema.json +172 -0
- package/generated/TrustConfig.schema.json +44 -0
- package/generated/WorkProduct.schema.json +60 -0
- package/generated/WorkspaceEnvelope.schema.json +94 -0
- package/package.json +43 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @claudexor/schema — single source of truth for all Claudexor data shapes.
|
|
3
|
+
*
|
|
4
|
+
* Every other package imports types and validators from here. Do not define
|
|
5
|
+
* competing shapes elsewhere. JSON Schema is generated from these Zod schemas
|
|
6
|
+
* (see scripts/gen-jsonschema.ts).
|
|
7
|
+
*/
|
|
8
|
+
export * from "./primitives.js";
|
|
9
|
+
export * from "./surface-run-controls.js";
|
|
10
|
+
export * from "./attachment.js";
|
|
11
|
+
export * from "./task.js";
|
|
12
|
+
export * from "./spec.js";
|
|
13
|
+
export * from "./context.js";
|
|
14
|
+
export * from "./harness.js";
|
|
15
|
+
export * from "./review.js";
|
|
16
|
+
export * from "./workproduct.js";
|
|
17
|
+
export * from "./budget.js";
|
|
18
|
+
export * from "./route.js";
|
|
19
|
+
export * from "./decision.js";
|
|
20
|
+
export * from "./control-run-detail.js";
|
|
21
|
+
export * from "./gate.js";
|
|
22
|
+
export * from "./events.js";
|
|
23
|
+
export * from "./telemetry.js";
|
|
24
|
+
export * from "./config.js";
|
|
25
|
+
export * from "./workspace.js";
|
|
26
|
+
export * from "./thread.js";
|
|
27
|
+
export * from "./orchestrate.js";
|
|
28
|
+
export * from "./control.js";
|
|
29
|
+
export * from "./control-trust.js";
|
|
30
|
+
export * from "./agent-capabilities.js";
|
|
31
|
+
export * from "./apply-eligibility.js";
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* The autonomous `orchestrate` planner. It is NOT a privileged harness: it is
|
|
4
|
+
* an intent routed like reviewers (doctor-ok + capability + quota headroom),
|
|
5
|
+
* sticky per thread, overridable. Its tool belt maps 1:1 onto existing engine
|
|
6
|
+
* entry points; it never grows its own business logic.
|
|
7
|
+
*
|
|
8
|
+
* Detailed per-tool input/output schemas are introduced alongside their wiring
|
|
9
|
+
* (staged-field discipline); this module fixes the tool vocabulary + contract.
|
|
10
|
+
*/
|
|
11
|
+
export declare const OrchestrateToolName: z.ZodEnum<["start_run", "race", "status", "answer_question", "apply", "review"]>;
|
|
12
|
+
export type OrchestrateToolName = z.infer<typeof OrchestrateToolName>;
|
|
13
|
+
/** How much the planner may act without confirmation. */
|
|
14
|
+
export declare const OrchestrateAutonomy: z.ZodEnum<["suggest", "auto_safe", "auto_full"]>;
|
|
15
|
+
export type OrchestrateAutonomy = z.infer<typeof OrchestrateAutonomy>;
|
|
16
|
+
export declare const DEFAULT_ORCHESTRATE_TOOL_BELT: OrchestrateToolName[];
|
|
17
|
+
export declare const OrchestrateContract: z.ZodObject<{
|
|
18
|
+
thread_id: z.ZodString;
|
|
19
|
+
goal: z.ZodString;
|
|
20
|
+
tool_belt: z.ZodDefault<z.ZodArray<z.ZodEnum<["start_run", "race", "status", "answer_question", "apply", "review"]>, "many">>;
|
|
21
|
+
budget: z.ZodDefault<z.ZodObject<{
|
|
22
|
+
max_usd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
23
|
+
max_tool_calls: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
max_usd: number | null;
|
|
26
|
+
max_tool_calls: number | null;
|
|
27
|
+
}, {
|
|
28
|
+
max_usd?: number | null | undefined;
|
|
29
|
+
max_tool_calls?: number | null | undefined;
|
|
30
|
+
}>>;
|
|
31
|
+
autonomy: z.ZodDefault<z.ZodEnum<["suggest", "auto_safe", "auto_full"]>>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
thread_id: string;
|
|
34
|
+
budget: {
|
|
35
|
+
max_usd: number | null;
|
|
36
|
+
max_tool_calls: number | null;
|
|
37
|
+
};
|
|
38
|
+
goal: string;
|
|
39
|
+
tool_belt: ("status" | "review" | "apply" | "start_run" | "race" | "answer_question")[];
|
|
40
|
+
autonomy: "suggest" | "auto_safe" | "auto_full";
|
|
41
|
+
}, {
|
|
42
|
+
thread_id: string;
|
|
43
|
+
goal: string;
|
|
44
|
+
budget?: {
|
|
45
|
+
max_usd?: number | null | undefined;
|
|
46
|
+
max_tool_calls?: number | null | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
tool_belt?: ("status" | "review" | "apply" | "start_run" | "race" | "answer_question")[] | undefined;
|
|
49
|
+
autonomy?: "suggest" | "auto_safe" | "auto_full" | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
export type OrchestrateContract = z.infer<typeof OrchestrateContract>;
|
|
52
|
+
/**
|
|
53
|
+
* Data-driven tool-risk classification. SAFE = provably no live-tree mutation
|
|
54
|
+
* (isolated envelope sub-runs or pure reads); RISKY = mutates the live tree.
|
|
55
|
+
* This is the SSOT the executor classifies against — never a hardcoded
|
|
56
|
+
* enum-in-logic switch. `apply` is the only mutating tool.
|
|
57
|
+
*/
|
|
58
|
+
export declare const TOOL_RISK: Record<OrchestrateToolName, "safe" | "risky">;
|
|
59
|
+
/**
|
|
60
|
+
* Classify a tool's risk, FAIL-CLOSED: any unknown/undeclared tool is risky.
|
|
61
|
+
* The executor must never auto-run a tool it cannot prove is safe.
|
|
62
|
+
*/
|
|
63
|
+
export declare function toolRisk(tool: string): "safe" | "risky";
|
|
64
|
+
/**
|
|
65
|
+
* One concrete tool invocation in a planner plan, with PER-TOOL TYPED args via a
|
|
66
|
+
* discriminated union on `tool`. The executor (auto_safe/auto_full) runs these
|
|
67
|
+
* in order; under `suggest` the user executes them. Args are validated by the
|
|
68
|
+
* variant — never an open `z.record` bag — so a malformed plan fails loudly.
|
|
69
|
+
*/
|
|
70
|
+
export declare const OrchestratePlanCall: z.ZodDiscriminatedUnion<"tool", [z.ZodObject<{
|
|
71
|
+
tool: z.ZodLiteral<"start_run">;
|
|
72
|
+
prompt: z.ZodString;
|
|
73
|
+
mode: z.ZodDefault<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
|
|
74
|
+
harness: z.ZodOptional<z.ZodString>;
|
|
75
|
+
why: z.ZodDefault<z.ZodString>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
prompt: string;
|
|
78
|
+
tool: "start_run";
|
|
79
|
+
mode: "ask" | "plan" | "audit" | "agent" | "orchestrate";
|
|
80
|
+
why: string;
|
|
81
|
+
harness?: string | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
prompt: string;
|
|
84
|
+
tool: "start_run";
|
|
85
|
+
mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
|
|
86
|
+
harness?: string | undefined;
|
|
87
|
+
why?: string | undefined;
|
|
88
|
+
}>, z.ZodObject<{
|
|
89
|
+
tool: z.ZodLiteral<"race">;
|
|
90
|
+
prompt: z.ZodString;
|
|
91
|
+
n: z.ZodDefault<z.ZodNumber>;
|
|
92
|
+
why: z.ZodDefault<z.ZodString>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
prompt: string;
|
|
95
|
+
tool: "race";
|
|
96
|
+
why: string;
|
|
97
|
+
n: number;
|
|
98
|
+
}, {
|
|
99
|
+
prompt: string;
|
|
100
|
+
tool: "race";
|
|
101
|
+
why?: string | undefined;
|
|
102
|
+
n?: number | undefined;
|
|
103
|
+
}>, z.ZodObject<{
|
|
104
|
+
tool: z.ZodLiteral<"review">;
|
|
105
|
+
run_id: z.ZodString;
|
|
106
|
+
why: z.ZodDefault<z.ZodString>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
tool: "review";
|
|
109
|
+
run_id: string;
|
|
110
|
+
why: string;
|
|
111
|
+
}, {
|
|
112
|
+
tool: "review";
|
|
113
|
+
run_id: string;
|
|
114
|
+
why?: string | undefined;
|
|
115
|
+
}>, z.ZodObject<{
|
|
116
|
+
tool: z.ZodLiteral<"status">;
|
|
117
|
+
run_id: z.ZodString;
|
|
118
|
+
why: z.ZodDefault<z.ZodString>;
|
|
119
|
+
}, "strip", z.ZodTypeAny, {
|
|
120
|
+
tool: "status";
|
|
121
|
+
run_id: string;
|
|
122
|
+
why: string;
|
|
123
|
+
}, {
|
|
124
|
+
tool: "status";
|
|
125
|
+
run_id: string;
|
|
126
|
+
why?: string | undefined;
|
|
127
|
+
}>, z.ZodObject<{
|
|
128
|
+
tool: z.ZodLiteral<"answer_question">;
|
|
129
|
+
interaction_id: z.ZodString;
|
|
130
|
+
answers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
131
|
+
question_id: z.ZodString;
|
|
132
|
+
selected_labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
133
|
+
free_text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
question_id: string;
|
|
136
|
+
selected_labels: string[];
|
|
137
|
+
free_text: string | null;
|
|
138
|
+
}, {
|
|
139
|
+
question_id: string;
|
|
140
|
+
selected_labels?: string[] | undefined;
|
|
141
|
+
free_text?: string | null | undefined;
|
|
142
|
+
}>, "many">>;
|
|
143
|
+
why: z.ZodDefault<z.ZodString>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
interaction_id: string;
|
|
146
|
+
answers: {
|
|
147
|
+
question_id: string;
|
|
148
|
+
selected_labels: string[];
|
|
149
|
+
free_text: string | null;
|
|
150
|
+
}[];
|
|
151
|
+
tool: "answer_question";
|
|
152
|
+
why: string;
|
|
153
|
+
}, {
|
|
154
|
+
interaction_id: string;
|
|
155
|
+
tool: "answer_question";
|
|
156
|
+
answers?: {
|
|
157
|
+
question_id: string;
|
|
158
|
+
selected_labels?: string[] | undefined;
|
|
159
|
+
free_text?: string | null | undefined;
|
|
160
|
+
}[] | undefined;
|
|
161
|
+
why?: string | undefined;
|
|
162
|
+
}>, z.ZodObject<{
|
|
163
|
+
tool: z.ZodLiteral<"apply">;
|
|
164
|
+
run_id: z.ZodString;
|
|
165
|
+
mode: z.ZodDefault<z.ZodEnum<["apply", "branch", "commit", "pr"]>>;
|
|
166
|
+
why: z.ZodDefault<z.ZodString>;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
tool: "apply";
|
|
169
|
+
mode: "apply" | "commit" | "branch" | "pr";
|
|
170
|
+
run_id: string;
|
|
171
|
+
why: string;
|
|
172
|
+
}, {
|
|
173
|
+
tool: "apply";
|
|
174
|
+
run_id: string;
|
|
175
|
+
mode?: "apply" | "commit" | "branch" | "pr" | undefined;
|
|
176
|
+
why?: string | undefined;
|
|
177
|
+
}>]>;
|
|
178
|
+
export type OrchestratePlanCall = z.infer<typeof OrchestratePlanCall>;
|
|
179
|
+
/**
|
|
180
|
+
* The TYPED orchestration plan extracted from the planner's report (the fenced
|
|
181
|
+
* JSON block the orchestrate prompt requires). Persisted as
|
|
182
|
+
* `final/orchestration.yaml`; a missing/invalid block is disclosed in the
|
|
183
|
+
* summary, never silently dropped.
|
|
184
|
+
*/
|
|
185
|
+
export declare const OrchestratePlan: z.ZodObject<{
|
|
186
|
+
tool_calls: z.ZodArray<z.ZodDiscriminatedUnion<"tool", [z.ZodObject<{
|
|
187
|
+
tool: z.ZodLiteral<"start_run">;
|
|
188
|
+
prompt: z.ZodString;
|
|
189
|
+
mode: z.ZodDefault<z.ZodEnum<["ask", "plan", "audit", "agent", "orchestrate"]>>;
|
|
190
|
+
harness: z.ZodOptional<z.ZodString>;
|
|
191
|
+
why: z.ZodDefault<z.ZodString>;
|
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
|
193
|
+
prompt: string;
|
|
194
|
+
tool: "start_run";
|
|
195
|
+
mode: "ask" | "plan" | "audit" | "agent" | "orchestrate";
|
|
196
|
+
why: string;
|
|
197
|
+
harness?: string | undefined;
|
|
198
|
+
}, {
|
|
199
|
+
prompt: string;
|
|
200
|
+
tool: "start_run";
|
|
201
|
+
mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
|
|
202
|
+
harness?: string | undefined;
|
|
203
|
+
why?: string | undefined;
|
|
204
|
+
}>, z.ZodObject<{
|
|
205
|
+
tool: z.ZodLiteral<"race">;
|
|
206
|
+
prompt: z.ZodString;
|
|
207
|
+
n: z.ZodDefault<z.ZodNumber>;
|
|
208
|
+
why: z.ZodDefault<z.ZodString>;
|
|
209
|
+
}, "strip", z.ZodTypeAny, {
|
|
210
|
+
prompt: string;
|
|
211
|
+
tool: "race";
|
|
212
|
+
why: string;
|
|
213
|
+
n: number;
|
|
214
|
+
}, {
|
|
215
|
+
prompt: string;
|
|
216
|
+
tool: "race";
|
|
217
|
+
why?: string | undefined;
|
|
218
|
+
n?: number | undefined;
|
|
219
|
+
}>, z.ZodObject<{
|
|
220
|
+
tool: z.ZodLiteral<"review">;
|
|
221
|
+
run_id: z.ZodString;
|
|
222
|
+
why: z.ZodDefault<z.ZodString>;
|
|
223
|
+
}, "strip", z.ZodTypeAny, {
|
|
224
|
+
tool: "review";
|
|
225
|
+
run_id: string;
|
|
226
|
+
why: string;
|
|
227
|
+
}, {
|
|
228
|
+
tool: "review";
|
|
229
|
+
run_id: string;
|
|
230
|
+
why?: string | undefined;
|
|
231
|
+
}>, z.ZodObject<{
|
|
232
|
+
tool: z.ZodLiteral<"status">;
|
|
233
|
+
run_id: z.ZodString;
|
|
234
|
+
why: z.ZodDefault<z.ZodString>;
|
|
235
|
+
}, "strip", z.ZodTypeAny, {
|
|
236
|
+
tool: "status";
|
|
237
|
+
run_id: string;
|
|
238
|
+
why: string;
|
|
239
|
+
}, {
|
|
240
|
+
tool: "status";
|
|
241
|
+
run_id: string;
|
|
242
|
+
why?: string | undefined;
|
|
243
|
+
}>, z.ZodObject<{
|
|
244
|
+
tool: z.ZodLiteral<"answer_question">;
|
|
245
|
+
interaction_id: z.ZodString;
|
|
246
|
+
answers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
247
|
+
question_id: z.ZodString;
|
|
248
|
+
selected_labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
249
|
+
free_text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
250
|
+
}, "strip", z.ZodTypeAny, {
|
|
251
|
+
question_id: string;
|
|
252
|
+
selected_labels: string[];
|
|
253
|
+
free_text: string | null;
|
|
254
|
+
}, {
|
|
255
|
+
question_id: string;
|
|
256
|
+
selected_labels?: string[] | undefined;
|
|
257
|
+
free_text?: string | null | undefined;
|
|
258
|
+
}>, "many">>;
|
|
259
|
+
why: z.ZodDefault<z.ZodString>;
|
|
260
|
+
}, "strip", z.ZodTypeAny, {
|
|
261
|
+
interaction_id: string;
|
|
262
|
+
answers: {
|
|
263
|
+
question_id: string;
|
|
264
|
+
selected_labels: string[];
|
|
265
|
+
free_text: string | null;
|
|
266
|
+
}[];
|
|
267
|
+
tool: "answer_question";
|
|
268
|
+
why: string;
|
|
269
|
+
}, {
|
|
270
|
+
interaction_id: string;
|
|
271
|
+
tool: "answer_question";
|
|
272
|
+
answers?: {
|
|
273
|
+
question_id: string;
|
|
274
|
+
selected_labels?: string[] | undefined;
|
|
275
|
+
free_text?: string | null | undefined;
|
|
276
|
+
}[] | undefined;
|
|
277
|
+
why?: string | undefined;
|
|
278
|
+
}>, z.ZodObject<{
|
|
279
|
+
tool: z.ZodLiteral<"apply">;
|
|
280
|
+
run_id: z.ZodString;
|
|
281
|
+
mode: z.ZodDefault<z.ZodEnum<["apply", "branch", "commit", "pr"]>>;
|
|
282
|
+
why: z.ZodDefault<z.ZodString>;
|
|
283
|
+
}, "strip", z.ZodTypeAny, {
|
|
284
|
+
tool: "apply";
|
|
285
|
+
mode: "apply" | "commit" | "branch" | "pr";
|
|
286
|
+
run_id: string;
|
|
287
|
+
why: string;
|
|
288
|
+
}, {
|
|
289
|
+
tool: "apply";
|
|
290
|
+
run_id: string;
|
|
291
|
+
mode?: "apply" | "commit" | "branch" | "pr" | undefined;
|
|
292
|
+
why?: string | undefined;
|
|
293
|
+
}>]>, "many">;
|
|
294
|
+
}, "strip", z.ZodTypeAny, {
|
|
295
|
+
tool_calls: ({
|
|
296
|
+
prompt: string;
|
|
297
|
+
tool: "start_run";
|
|
298
|
+
mode: "ask" | "plan" | "audit" | "agent" | "orchestrate";
|
|
299
|
+
why: string;
|
|
300
|
+
harness?: string | undefined;
|
|
301
|
+
} | {
|
|
302
|
+
prompt: string;
|
|
303
|
+
tool: "race";
|
|
304
|
+
why: string;
|
|
305
|
+
n: number;
|
|
306
|
+
} | {
|
|
307
|
+
tool: "review";
|
|
308
|
+
run_id: string;
|
|
309
|
+
why: string;
|
|
310
|
+
} | {
|
|
311
|
+
tool: "status";
|
|
312
|
+
run_id: string;
|
|
313
|
+
why: string;
|
|
314
|
+
} | {
|
|
315
|
+
interaction_id: string;
|
|
316
|
+
answers: {
|
|
317
|
+
question_id: string;
|
|
318
|
+
selected_labels: string[];
|
|
319
|
+
free_text: string | null;
|
|
320
|
+
}[];
|
|
321
|
+
tool: "answer_question";
|
|
322
|
+
why: string;
|
|
323
|
+
} | {
|
|
324
|
+
tool: "apply";
|
|
325
|
+
mode: "apply" | "commit" | "branch" | "pr";
|
|
326
|
+
run_id: string;
|
|
327
|
+
why: string;
|
|
328
|
+
})[];
|
|
329
|
+
}, {
|
|
330
|
+
tool_calls: ({
|
|
331
|
+
prompt: string;
|
|
332
|
+
tool: "start_run";
|
|
333
|
+
mode?: "ask" | "plan" | "audit" | "agent" | "orchestrate" | undefined;
|
|
334
|
+
harness?: string | undefined;
|
|
335
|
+
why?: string | undefined;
|
|
336
|
+
} | {
|
|
337
|
+
prompt: string;
|
|
338
|
+
tool: "race";
|
|
339
|
+
why?: string | undefined;
|
|
340
|
+
n?: number | undefined;
|
|
341
|
+
} | {
|
|
342
|
+
tool: "review";
|
|
343
|
+
run_id: string;
|
|
344
|
+
why?: string | undefined;
|
|
345
|
+
} | {
|
|
346
|
+
tool: "status";
|
|
347
|
+
run_id: string;
|
|
348
|
+
why?: string | undefined;
|
|
349
|
+
} | {
|
|
350
|
+
interaction_id: string;
|
|
351
|
+
tool: "answer_question";
|
|
352
|
+
answers?: {
|
|
353
|
+
question_id: string;
|
|
354
|
+
selected_labels?: string[] | undefined;
|
|
355
|
+
free_text?: string | null | undefined;
|
|
356
|
+
}[] | undefined;
|
|
357
|
+
why?: string | undefined;
|
|
358
|
+
} | {
|
|
359
|
+
tool: "apply";
|
|
360
|
+
run_id: string;
|
|
361
|
+
mode?: "apply" | "commit" | "branch" | "pr" | undefined;
|
|
362
|
+
why?: string | undefined;
|
|
363
|
+
})[];
|
|
364
|
+
}>;
|
|
365
|
+
export type OrchestratePlan = z.infer<typeof OrchestratePlan>;
|
|
366
|
+
/** Per-step executor status (auto_safe/auto_full). */
|
|
367
|
+
export declare const OrchestrateStepStatus: z.ZodEnum<["pending", "running", "done", "skipped", "blocked", "failed"]>;
|
|
368
|
+
export type OrchestrateStepStatus = z.infer<typeof OrchestrateStepStatus>;
|
|
369
|
+
/**
|
|
370
|
+
* Typed executor progress over a plan's tool_calls. Persisted as
|
|
371
|
+
* `final/orchestration_progress.yaml` and projected into the run detail so a
|
|
372
|
+
* surface renders honest per-step outcomes (which safe steps ran, where a risky
|
|
373
|
+
* step blocked, why it stopped). Producer: the orchestrator executor; consumer:
|
|
374
|
+
* the control-api run-detail projection.
|
|
375
|
+
*/
|
|
376
|
+
export declare const OrchestratePlanProgress: z.ZodObject<{
|
|
377
|
+
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
378
|
+
index: z.ZodNumber;
|
|
379
|
+
tool: z.ZodEnum<["start_run", "race", "status", "answer_question", "apply", "review"]>;
|
|
380
|
+
risk: z.ZodEnum<["safe", "risky"]>;
|
|
381
|
+
status: z.ZodEnum<["pending", "running", "done", "skipped", "blocked", "failed"]>;
|
|
382
|
+
/** Sub-run id this step started/targeted (start_run/race/review/status/apply), when known. */
|
|
383
|
+
run_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
384
|
+
detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
385
|
+
}, "strip", z.ZodTypeAny, {
|
|
386
|
+
status: "pending" | "blocked" | "failed" | "running" | "done" | "skipped";
|
|
387
|
+
detail: string | null;
|
|
388
|
+
tool: "status" | "review" | "apply" | "start_run" | "race" | "answer_question";
|
|
389
|
+
run_id: string | null;
|
|
390
|
+
index: number;
|
|
391
|
+
risk: "safe" | "risky";
|
|
392
|
+
}, {
|
|
393
|
+
status: "pending" | "blocked" | "failed" | "running" | "done" | "skipped";
|
|
394
|
+
tool: "status" | "review" | "apply" | "start_run" | "race" | "answer_question";
|
|
395
|
+
index: number;
|
|
396
|
+
risk: "safe" | "risky";
|
|
397
|
+
detail?: string | null | undefined;
|
|
398
|
+
run_id?: string | null | undefined;
|
|
399
|
+
}>, "many">>;
|
|
400
|
+
autonomy: z.ZodEnum<["suggest", "auto_safe", "auto_full"]>;
|
|
401
|
+
/** Set when the executor stopped early (first risky step under auto_safe, budget, abort). */
|
|
402
|
+
stopped_reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
403
|
+
}, "strip", z.ZodTypeAny, {
|
|
404
|
+
autonomy: "suggest" | "auto_safe" | "auto_full";
|
|
405
|
+
steps: {
|
|
406
|
+
status: "pending" | "blocked" | "failed" | "running" | "done" | "skipped";
|
|
407
|
+
detail: string | null;
|
|
408
|
+
tool: "status" | "review" | "apply" | "start_run" | "race" | "answer_question";
|
|
409
|
+
run_id: string | null;
|
|
410
|
+
index: number;
|
|
411
|
+
risk: "safe" | "risky";
|
|
412
|
+
}[];
|
|
413
|
+
stopped_reason: string | null;
|
|
414
|
+
}, {
|
|
415
|
+
autonomy: "suggest" | "auto_safe" | "auto_full";
|
|
416
|
+
steps?: {
|
|
417
|
+
status: "pending" | "blocked" | "failed" | "running" | "done" | "skipped";
|
|
418
|
+
tool: "status" | "review" | "apply" | "start_run" | "race" | "answer_question";
|
|
419
|
+
index: number;
|
|
420
|
+
risk: "safe" | "risky";
|
|
421
|
+
detail?: string | null | undefined;
|
|
422
|
+
run_id?: string | null | undefined;
|
|
423
|
+
}[] | undefined;
|
|
424
|
+
stopped_reason?: string | null | undefined;
|
|
425
|
+
}>;
|
|
426
|
+
export type OrchestratePlanProgress = z.infer<typeof OrchestratePlanProgress>;
|
|
427
|
+
export declare function orchestratePlanJsonSchema(): Record<string, unknown>;
|
|
428
|
+
//# sourceMappingURL=orchestrate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrate.d.ts","sourceRoot":"","sources":["../src/orchestrate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;GAQG;AAEH,eAAO,MAAM,mBAAmB,kFAI7B,CAAC;AACJ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,yDAAyD;AACzD,eAAO,MAAM,mBAAmB,kDAI7B,CAAC;AACJ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,6BAA6B,EAAE,mBAAmB,EAU9D,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBqE,CAAC;AACtG,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAOnE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAEvD;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8DgF,CAAC;AACjH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI2F,CAAC;AACxH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,sDAAsD;AACtD,eAAO,MAAM,qBAAqB,2EAEiG,CAAC;AACpI,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;;QAS1B,8FAA8F;;;;;;;;;;;;;;;;;;;IAQpG,6FAA6F;;;;;;;;;;;;;;;;;;;;;;;;EAO6C,CAAC;AAC/I,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAQ9E,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQnE"}
|