@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,aAAa,gCAEoF,CAAC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;;YAWH;;;;;;;;;eASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA4BC,4EAA4E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBd,CAAC;AAC3E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AccessProfile, AuthPreference, ExternalContextPolicy, ProviderFamily } from "./primitives.js";
|
|
3
|
+
import { EffortHint } from "./harness.js";
|
|
4
|
+
import { Portfolio } from "./budget.js";
|
|
5
|
+
// The former "portfolio" value was deleted as a fake knob (it behaved
|
|
6
|
+
// identically to "auto"); the config loader migrates it to "auto".
|
|
7
|
+
export const RoutingPolicy = z
|
|
8
|
+
.enum(["auto", "primary"])
|
|
9
|
+
.describe("Default routing policy: auto (engine picks) or primary (prefer the configured primary harness).");
|
|
10
|
+
/**
|
|
11
|
+
* Project config — safe, versioned settings. This shape may NOT carry sensitive
|
|
12
|
+
* settings (full access, secrets, budget-above-cap, plugin auto-install, etc.);
|
|
13
|
+
* those live only in global/user-local/trust configs and are modeled separately.
|
|
14
|
+
*/
|
|
15
|
+
export const ProjectConfig = z
|
|
16
|
+
.object({
|
|
17
|
+
version: z.literal(1).default(1).describe("Config format version."),
|
|
18
|
+
context: z
|
|
19
|
+
.object({
|
|
20
|
+
mandatory_files: z.array(z.string()).default([]).describe("Files every context pack must include."),
|
|
21
|
+
include: z.array(z.string()).default([]).describe("Globs to include in context building."),
|
|
22
|
+
exclude: z.array(z.string()).default([]).describe("Globs to exclude from context building."),
|
|
23
|
+
})
|
|
24
|
+
.strict()
|
|
25
|
+
.default({})
|
|
26
|
+
.describe("Context-building preferences for the project."),
|
|
27
|
+
tests: z
|
|
28
|
+
.object({ commands: z.array(z.string()).default([]).describe("Test commands run as deterministic gates.") })
|
|
29
|
+
.strict()
|
|
30
|
+
.default({ commands: [] })
|
|
31
|
+
.describe("Project-configured deterministic test gates."),
|
|
32
|
+
budget: z
|
|
33
|
+
.object({ portfolio: Portfolio.default("subscription-first") })
|
|
34
|
+
.strict()
|
|
35
|
+
.default({ portfolio: "subscription-first" })
|
|
36
|
+
.describe("Project budget preferences."),
|
|
37
|
+
})
|
|
38
|
+
.strict()
|
|
39
|
+
.describe("Project config (.claudexor/config.yaml) — safe, versioned settings only; sensitive settings live in global/user-local/trust configs.");
|
|
40
|
+
/** Sensitive trust settings — only valid in global/user-local/trust files. */
|
|
41
|
+
export const TrustConfig = z
|
|
42
|
+
.object({
|
|
43
|
+
version: z.literal(1).default(1).describe("Config format version."),
|
|
44
|
+
access_default: AccessProfile.default("workspace_write").describe("Default access profile for runs in this repo."),
|
|
45
|
+
allow_full_access: z.boolean().default(false).describe("Per-repo allow required before any run may use the full access profile."),
|
|
46
|
+
/**
|
|
47
|
+
* Provenance ONLY: which repo root this file was written for. The file's
|
|
48
|
+
* key stays the repo-root HASH in its filename — this field never gates
|
|
49
|
+
* anything; it exists so trust state is enumerable (Settings lists the
|
|
50
|
+
* projects with full access). Legacy files (written before this field)
|
|
51
|
+
* carry null and surfaces disclose them as revocable only via CLI.
|
|
52
|
+
*/
|
|
53
|
+
repo_root: z
|
|
54
|
+
.string()
|
|
55
|
+
.nullable()
|
|
56
|
+
.default(null)
|
|
57
|
+
.describe("Provenance only: repo root this trust file was written for; never gates anything. Null on legacy files written before this field."),
|
|
58
|
+
})
|
|
59
|
+
.strict()
|
|
60
|
+
.describe("Sensitive per-repo trust settings — only valid in global/user-local trust files, never in the versioned repo config.");
|
|
61
|
+
/** Global user config (~/.claudexor/config.yaml). */
|
|
62
|
+
export const GlobalConfig = z
|
|
63
|
+
.object({
|
|
64
|
+
version: z.literal(1).default(1).describe("Config format version."),
|
|
65
|
+
default_portfolio: Portfolio.default("subscription-first").describe("Budget portfolio used when a run does not specify one."),
|
|
66
|
+
/**
|
|
67
|
+
* How long an interactive run waits for the user's answer to a harness
|
|
68
|
+
* question (interaction.requested) before delivering a benign decline and
|
|
69
|
+
* letting the model continue with assumptions.
|
|
70
|
+
*/
|
|
71
|
+
interaction_timeout_ms: z
|
|
72
|
+
.number()
|
|
73
|
+
.int()
|
|
74
|
+
.positive()
|
|
75
|
+
.default(900_000)
|
|
76
|
+
.describe("How long an interactive run waits for the user's answer to a harness question before delivering a benign decline and letting the model continue."),
|
|
77
|
+
routing: z
|
|
78
|
+
.object({
|
|
79
|
+
default_policy: RoutingPolicy.default("auto"),
|
|
80
|
+
primary_harness: z.string().nullable().default(null).describe("Global default primary harness; null = engine decides."),
|
|
81
|
+
eligible_harnesses: z.array(z.string()).default([]).describe("Harness pool eligible for routing/races; empty = all available."),
|
|
82
|
+
/**
|
|
83
|
+
* How the child harness env is built: `mirror_native` inherits the user's
|
|
84
|
+
* shell env (default, matches how the native CLIs run); `clean` spawns from
|
|
85
|
+
* a minimal allowlist (agent env isolation).
|
|
86
|
+
*/
|
|
87
|
+
env_inheritance: z
|
|
88
|
+
.enum(["mirror_native", "clean"])
|
|
89
|
+
.default("mirror_native")
|
|
90
|
+
.describe("How the child harness env is built: mirror_native inherits the user's shell env; clean spawns from a minimal allowlist."),
|
|
91
|
+
/** Default auth route preference (subscription/api_key/auto). */
|
|
92
|
+
auth_preference: AuthPreference.default("auto"),
|
|
93
|
+
/**
|
|
94
|
+
* Operator-tunable per-provider-family quality priors (0..1) feeding
|
|
95
|
+
* RouterCandidate.qualityForIntent. A DECLARED prior, not
|
|
96
|
+
* invented magic: unset families ride the router's neutral 0.5.
|
|
97
|
+
*/
|
|
98
|
+
quality_priors: z
|
|
99
|
+
.record(ProviderFamily, z.number().min(0).max(1))
|
|
100
|
+
.default({})
|
|
101
|
+
.describe("Operator-tunable per-provider-family quality priors (0..1) feeding the router; unset families ride the neutral 0.5."),
|
|
102
|
+
})
|
|
103
|
+
.strict()
|
|
104
|
+
.default({})
|
|
105
|
+
.describe("Global routing defaults."),
|
|
106
|
+
budget: z
|
|
107
|
+
.object({
|
|
108
|
+
max_usd_per_run: z.number().nonnegative().nullable().default(null).describe("Global USD cap per run; null = no cap."),
|
|
109
|
+
/**
|
|
110
|
+
* Per-candidate reservation floor (USD) held against the run cap for
|
|
111
|
+
* every race-wave slot AFTER the first, BEFORE any usage streams.
|
|
112
|
+
* Makes concurrent in-flight candidates visible to the budget breaker
|
|
113
|
+
* so a parallel wave cannot blow past `max_usd_per_run` between
|
|
114
|
+
* settlements. The first slot never holds it: a cap smaller than the
|
|
115
|
+
* floor still runs one candidate and stops on real usage.
|
|
116
|
+
*/
|
|
117
|
+
estimate_usd_floor: z
|
|
118
|
+
.number()
|
|
119
|
+
.nonnegative()
|
|
120
|
+
.default(0.05)
|
|
121
|
+
.describe("Per-candidate USD reservation floor held against the run cap for every race-wave slot after the first, so a parallel wave cannot blow past the cap between settlements."),
|
|
122
|
+
})
|
|
123
|
+
.strict()
|
|
124
|
+
.default({})
|
|
125
|
+
.describe("Global budget limits."),
|
|
126
|
+
runtime: z
|
|
127
|
+
.object({
|
|
128
|
+
/**
|
|
129
|
+
* Bounded retry policy for adapter-declared transient failures. User-global
|
|
130
|
+
* only: a versioned repo must not silently increase operator runtime costs.
|
|
131
|
+
*/
|
|
132
|
+
transient_retry: z
|
|
133
|
+
.object({
|
|
134
|
+
max_retries: z.number().int().min(0).max(5).default(2).describe("Maximum retries for a transient failure."),
|
|
135
|
+
initial_delay_ms: z.number().int().nonnegative().default(1_000).describe("Initial retry delay in milliseconds."),
|
|
136
|
+
max_delay_ms: z.number().int().nonnegative().default(10_000).describe("Maximum retry delay in milliseconds."),
|
|
137
|
+
})
|
|
138
|
+
.strict()
|
|
139
|
+
.default({})
|
|
140
|
+
.describe("Bounded retry policy for adapter-declared transient failures; user-global only."),
|
|
141
|
+
reviewer_timeout_ms: z.number().int().positive().default(600_000).describe("Wall-clock timeout for a reviewer run, in milliseconds."),
|
|
142
|
+
/**
|
|
143
|
+
* Inactivity watchdog for candidate/planner/read-only harness streams:
|
|
144
|
+
* NO events for this window means the CLI is wedged — the stream is
|
|
145
|
+
* aborted (process-group kill) and the attempt fails with a typed
|
|
146
|
+
* timeout instead of parking the run in `running` forever. Distinct
|
|
147
|
+
* from the reviewer wall-clock timeout: long runs are fine as long as
|
|
148
|
+
* they keep emitting. Note the timer resets on HARNESS events — a tool
|
|
149
|
+
* call that streams nothing for the whole window is indistinguishable
|
|
150
|
+
* from a hang and will be killed.
|
|
151
|
+
*/
|
|
152
|
+
harness_inactivity_timeout_ms: z
|
|
153
|
+
.number()
|
|
154
|
+
.int()
|
|
155
|
+
.positive()
|
|
156
|
+
.default(1_200_000)
|
|
157
|
+
.describe("Inactivity watchdog for harness streams: no events for this window aborts the stream and fails the attempt with a typed timeout."),
|
|
158
|
+
})
|
|
159
|
+
.strict()
|
|
160
|
+
.default({})
|
|
161
|
+
.describe("Global runtime timeouts and retry policy."),
|
|
162
|
+
harnesses: z
|
|
163
|
+
.record(z.string(), z
|
|
164
|
+
.object({
|
|
165
|
+
enabled: z.boolean().default(true).describe("Whether the harness participates in routing."),
|
|
166
|
+
default_model: z.string().nullable().default(null).describe("Per-harness default model; null = the harness's own default."),
|
|
167
|
+
effort: EffortHint.nullable().default(null).describe("Default reasoning effort for the harness; null = harness default."),
|
|
168
|
+
max_turns: z.number().int().positive().nullable().default(null).describe("Default max agent turns; null = no limit."),
|
|
169
|
+
max_rounds: z.number().int().positive().nullable().default(null).describe("Default max convergence rounds; null = engine default."),
|
|
170
|
+
max_usd: z.number().nonnegative().nullable().default(null).describe("Per-harness USD cap; null = no cap."),
|
|
171
|
+
tools_allow: z.array(z.string()).default([]).describe("Tool names allowed for this harness."),
|
|
172
|
+
tools_deny: z.array(z.string()).default([]).describe("Tool names denied for this harness."),
|
|
173
|
+
fallback_model: z.string().nullable().default(null).describe("Model to fall back to on typed fallback signals; null = none."),
|
|
174
|
+
web: ExternalContextPolicy.default("auto").describe("Default web policy for this harness."),
|
|
175
|
+
/** Per-harness auth route preference; overrides routing.auth_preference. */
|
|
176
|
+
auth_preference: AuthPreference.default("auto"),
|
|
177
|
+
})
|
|
178
|
+
.strict()
|
|
179
|
+
.describe("Per-harness settings."))
|
|
180
|
+
.default({})
|
|
181
|
+
.describe("Per-harness settings keyed by harness id."),
|
|
182
|
+
})
|
|
183
|
+
.strict()
|
|
184
|
+
.describe("Global user config (~/.claudexor/config.yaml): portfolio, routing, budget, runtime, and per-harness settings.");
|
|
185
|
+
/** The fully-resolved effective config after precedence merge. */
|
|
186
|
+
export const ResolvedConfig = z
|
|
187
|
+
.object({
|
|
188
|
+
project: ProjectConfig,
|
|
189
|
+
trust: TrustConfig,
|
|
190
|
+
global: GlobalConfig,
|
|
191
|
+
sources: z.array(z.string()).default([]).describe("Config file paths that contributed to the merge."),
|
|
192
|
+
})
|
|
193
|
+
.describe("The fully-resolved effective config after precedence merge.");
|
|
194
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACvG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,sEAAsE;AACtE,mEAAmE;AACnE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,IAAI,CAAC,CAAC,MAAM,EAAE,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AsC,CAAC;QAC3F,4EAA4E;QAC5E,eAAe,EAAE,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC;KAChD,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,CAAC,uBAAuB,CAAC,CACrC;SACA,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,2CAA2C,CAAC;CACzD,CAAC;KACD,MAAM,EAAE;KACR,QAAQ,CAAC,+GAA+G,CAAC,CAAC;AAG7H,kEAAkE;AAClE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,CAAC;IACN,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,kDAAkD,CAAC;CACtG,CAAC;KACD,QAAQ,CAAC,6DAA6D,CAAC,CAAC"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** How a tracked path was accounted for in the Scope Atlas. No path is ever silently dropped. */
|
|
3
|
+
export declare const PathDisposition: z.ZodEnum<["full", "included", "manifest_only", "excluded", "sensitive", "binary", "vendored", "oversized", "read_error", "omitted"]>;
|
|
4
|
+
export type PathDisposition = z.infer<typeof PathDisposition>;
|
|
5
|
+
export declare const ScopeAtlasEntry: z.ZodObject<{
|
|
6
|
+
path: z.ZodString;
|
|
7
|
+
disposition: z.ZodEnum<["full", "included", "manifest_only", "excluded", "sensitive", "binary", "vendored", "oversized", "read_error", "omitted"]>;
|
|
8
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
9
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
path: string;
|
|
13
|
+
disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
|
|
14
|
+
reason?: string | undefined;
|
|
15
|
+
hash?: string | undefined;
|
|
16
|
+
bytes?: number | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
path: string;
|
|
19
|
+
disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
|
|
20
|
+
reason?: string | undefined;
|
|
21
|
+
hash?: string | undefined;
|
|
22
|
+
bytes?: number | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export type ScopeAtlasEntry = z.infer<typeof ScopeAtlasEntry>;
|
|
25
|
+
export declare const OmissionEntry: z.ZodObject<{
|
|
26
|
+
path: z.ZodString;
|
|
27
|
+
reason: z.ZodString;
|
|
28
|
+
replacement: z.ZodDefault<z.ZodEnum<["summary", "map", "index", "none"]>>;
|
|
29
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
path: string;
|
|
32
|
+
reason: string;
|
|
33
|
+
replacement: "map" | "none" | "summary" | "index";
|
|
34
|
+
hash?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
path: string;
|
|
37
|
+
reason: string;
|
|
38
|
+
hash?: string | undefined;
|
|
39
|
+
replacement?: "map" | "none" | "summary" | "index" | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export type OmissionEntry = z.infer<typeof OmissionEntry>;
|
|
42
|
+
export declare const ContextFileRef: z.ZodObject<{
|
|
43
|
+
path: z.ZodString;
|
|
44
|
+
hash: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
path: string;
|
|
47
|
+
hash: string;
|
|
48
|
+
}, {
|
|
49
|
+
path: string;
|
|
50
|
+
hash: string;
|
|
51
|
+
}>;
|
|
52
|
+
export type ContextFileRef = z.infer<typeof ContextFileRef>;
|
|
53
|
+
/**
|
|
54
|
+
* The deterministic, hashable bundle every harness receives. Built from the
|
|
55
|
+
* TaskContract + repo state. Omissions are explicit; nothing is silently cut.
|
|
56
|
+
*/
|
|
57
|
+
export declare const ContextPack: z.ZodObject<{
|
|
58
|
+
task_contract_hash: z.ZodString;
|
|
59
|
+
hash: z.ZodString;
|
|
60
|
+
files: z.ZodObject<{
|
|
61
|
+
mandatory: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
62
|
+
path: z.ZodString;
|
|
63
|
+
hash: z.ZodString;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
path: string;
|
|
66
|
+
hash: string;
|
|
67
|
+
}, {
|
|
68
|
+
path: string;
|
|
69
|
+
hash: string;
|
|
70
|
+
}>, "many">>;
|
|
71
|
+
included: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
72
|
+
path: z.ZodString;
|
|
73
|
+
hash: z.ZodString;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
path: string;
|
|
76
|
+
hash: string;
|
|
77
|
+
}, {
|
|
78
|
+
path: string;
|
|
79
|
+
hash: string;
|
|
80
|
+
}>, "many">>;
|
|
81
|
+
omitted: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
82
|
+
path: z.ZodString;
|
|
83
|
+
reason: z.ZodString;
|
|
84
|
+
replacement: z.ZodDefault<z.ZodEnum<["summary", "map", "index", "none"]>>;
|
|
85
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
path: string;
|
|
88
|
+
reason: string;
|
|
89
|
+
replacement: "map" | "none" | "summary" | "index";
|
|
90
|
+
hash?: string | undefined;
|
|
91
|
+
}, {
|
|
92
|
+
path: string;
|
|
93
|
+
reason: string;
|
|
94
|
+
hash?: string | undefined;
|
|
95
|
+
replacement?: "map" | "none" | "summary" | "index" | undefined;
|
|
96
|
+
}>, "many">>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
included: {
|
|
99
|
+
path: string;
|
|
100
|
+
hash: string;
|
|
101
|
+
}[];
|
|
102
|
+
omitted: {
|
|
103
|
+
path: string;
|
|
104
|
+
reason: string;
|
|
105
|
+
replacement: "map" | "none" | "summary" | "index";
|
|
106
|
+
hash?: string | undefined;
|
|
107
|
+
}[];
|
|
108
|
+
mandatory: {
|
|
109
|
+
path: string;
|
|
110
|
+
hash: string;
|
|
111
|
+
}[];
|
|
112
|
+
}, {
|
|
113
|
+
included?: {
|
|
114
|
+
path: string;
|
|
115
|
+
hash: string;
|
|
116
|
+
}[] | undefined;
|
|
117
|
+
omitted?: {
|
|
118
|
+
path: string;
|
|
119
|
+
reason: string;
|
|
120
|
+
hash?: string | undefined;
|
|
121
|
+
replacement?: "map" | "none" | "summary" | "index" | undefined;
|
|
122
|
+
}[] | undefined;
|
|
123
|
+
mandatory?: {
|
|
124
|
+
path: string;
|
|
125
|
+
hash: string;
|
|
126
|
+
}[] | undefined;
|
|
127
|
+
}>;
|
|
128
|
+
atlas: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
129
|
+
path: z.ZodString;
|
|
130
|
+
disposition: z.ZodEnum<["full", "included", "manifest_only", "excluded", "sensitive", "binary", "vendored", "oversized", "read_error", "omitted"]>;
|
|
131
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
132
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
path: string;
|
|
136
|
+
disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
|
|
137
|
+
reason?: string | undefined;
|
|
138
|
+
hash?: string | undefined;
|
|
139
|
+
bytes?: number | undefined;
|
|
140
|
+
}, {
|
|
141
|
+
path: string;
|
|
142
|
+
disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
|
|
143
|
+
reason?: string | undefined;
|
|
144
|
+
hash?: string | undefined;
|
|
145
|
+
bytes?: number | undefined;
|
|
146
|
+
}>, "many">>;
|
|
147
|
+
instructions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
148
|
+
token_budget: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
limit: z.ZodNumber;
|
|
150
|
+
estimated_used: z.ZodNumber;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
limit: number;
|
|
153
|
+
estimated_used: number;
|
|
154
|
+
}, {
|
|
155
|
+
limit: number;
|
|
156
|
+
estimated_used: number;
|
|
157
|
+
}>>;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
hash: string;
|
|
160
|
+
task_contract_hash: string;
|
|
161
|
+
files: {
|
|
162
|
+
included: {
|
|
163
|
+
path: string;
|
|
164
|
+
hash: string;
|
|
165
|
+
}[];
|
|
166
|
+
omitted: {
|
|
167
|
+
path: string;
|
|
168
|
+
reason: string;
|
|
169
|
+
replacement: "map" | "none" | "summary" | "index";
|
|
170
|
+
hash?: string | undefined;
|
|
171
|
+
}[];
|
|
172
|
+
mandatory: {
|
|
173
|
+
path: string;
|
|
174
|
+
hash: string;
|
|
175
|
+
}[];
|
|
176
|
+
};
|
|
177
|
+
atlas: {
|
|
178
|
+
path: string;
|
|
179
|
+
disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
|
|
180
|
+
reason?: string | undefined;
|
|
181
|
+
hash?: string | undefined;
|
|
182
|
+
bytes?: number | undefined;
|
|
183
|
+
}[];
|
|
184
|
+
instructions: string[];
|
|
185
|
+
token_budget?: {
|
|
186
|
+
limit: number;
|
|
187
|
+
estimated_used: number;
|
|
188
|
+
} | undefined;
|
|
189
|
+
}, {
|
|
190
|
+
hash: string;
|
|
191
|
+
task_contract_hash: string;
|
|
192
|
+
files: {
|
|
193
|
+
included?: {
|
|
194
|
+
path: string;
|
|
195
|
+
hash: string;
|
|
196
|
+
}[] | undefined;
|
|
197
|
+
omitted?: {
|
|
198
|
+
path: string;
|
|
199
|
+
reason: string;
|
|
200
|
+
hash?: string | undefined;
|
|
201
|
+
replacement?: "map" | "none" | "summary" | "index" | undefined;
|
|
202
|
+
}[] | undefined;
|
|
203
|
+
mandatory?: {
|
|
204
|
+
path: string;
|
|
205
|
+
hash: string;
|
|
206
|
+
}[] | undefined;
|
|
207
|
+
};
|
|
208
|
+
atlas?: {
|
|
209
|
+
path: string;
|
|
210
|
+
disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
|
|
211
|
+
reason?: string | undefined;
|
|
212
|
+
hash?: string | undefined;
|
|
213
|
+
bytes?: number | undefined;
|
|
214
|
+
}[] | undefined;
|
|
215
|
+
instructions?: string[] | undefined;
|
|
216
|
+
token_budget?: {
|
|
217
|
+
limit: number;
|
|
218
|
+
estimated_used: number;
|
|
219
|
+
} | undefined;
|
|
220
|
+
}>;
|
|
221
|
+
export type ContextPack = z.infer<typeof ContextPack>;
|
|
222
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,iGAAiG;AACjG,eAAO,MAAM,eAAe,uIAezB,CAAC;AACJ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;EAQ4C,CAAC;AACzE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;EAUiE,CAAC;AAC5F,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;EAKqC,CAAC;AACjE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBrB,CAAC;AACJ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/context.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ContentHash } from "./primitives.js";
|
|
3
|
+
/** How a tracked path was accounted for in the Scope Atlas. No path is ever silently dropped. */
|
|
4
|
+
export const PathDisposition = z
|
|
5
|
+
.enum([
|
|
6
|
+
"full",
|
|
7
|
+
"included",
|
|
8
|
+
"manifest_only",
|
|
9
|
+
"excluded",
|
|
10
|
+
"sensitive",
|
|
11
|
+
"binary",
|
|
12
|
+
"vendored",
|
|
13
|
+
"oversized",
|
|
14
|
+
"read_error",
|
|
15
|
+
"omitted",
|
|
16
|
+
])
|
|
17
|
+
.describe("How a tracked path was accounted for in the Scope Atlas (full/included content, manifest_only, or excluded/sensitive/binary/vendored/oversized/read_error/omitted); no path is ever silently dropped.");
|
|
18
|
+
export const ScopeAtlasEntry = z
|
|
19
|
+
.object({
|
|
20
|
+
path: z.string().describe("Repo-relative path."),
|
|
21
|
+
disposition: PathDisposition,
|
|
22
|
+
hash: ContentHash.optional().describe("Content hash of the path, when read."),
|
|
23
|
+
bytes: z.number().int().nonnegative().optional().describe("Size of the path in bytes, when known."),
|
|
24
|
+
reason: z.string().optional().describe("Why the path got this disposition."),
|
|
25
|
+
})
|
|
26
|
+
.describe("Accounting entry for one tracked path in the Scope Atlas.");
|
|
27
|
+
export const OmissionEntry = z
|
|
28
|
+
.object({
|
|
29
|
+
path: z.string().describe("Repo-relative path that was omitted."),
|
|
30
|
+
reason: z.string().describe("Why the path was omitted."),
|
|
31
|
+
replacement: z
|
|
32
|
+
.enum(["summary", "map", "index", "none"])
|
|
33
|
+
.default("none")
|
|
34
|
+
.describe("What stands in for the omitted content: a summary, a map, an index, or nothing."),
|
|
35
|
+
hash: ContentHash.optional().describe("Content hash of the omitted file, when known."),
|
|
36
|
+
})
|
|
37
|
+
.describe("Explicit record of a file omitted from the context; nothing is silently cut.");
|
|
38
|
+
export const ContextFileRef = z
|
|
39
|
+
.object({
|
|
40
|
+
path: z.string().describe("Repo-relative path of the included file."),
|
|
41
|
+
hash: ContentHash.describe("Content hash of the file as included."),
|
|
42
|
+
})
|
|
43
|
+
.describe("Reference to a file included in the context pack.");
|
|
44
|
+
/**
|
|
45
|
+
* The deterministic, hashable bundle every harness receives. Built from the
|
|
46
|
+
* TaskContract + repo state. Omissions are explicit; nothing is silently cut.
|
|
47
|
+
*/
|
|
48
|
+
export const ContextPack = z
|
|
49
|
+
.object({
|
|
50
|
+
task_contract_hash: ContentHash.describe("Hash of the TaskContract this pack was built from."),
|
|
51
|
+
hash: ContentHash.describe("Content hash of the pack itself."),
|
|
52
|
+
files: z
|
|
53
|
+
.object({
|
|
54
|
+
mandatory: z.array(ContextFileRef).default([]).describe("Files every harness must receive."),
|
|
55
|
+
included: z.array(ContextFileRef).default([]).describe("Additional files included in the pack."),
|
|
56
|
+
omitted: z.array(OmissionEntry).default([]).describe("Files explicitly omitted, with reasons."),
|
|
57
|
+
})
|
|
58
|
+
.describe("Files included in or explicitly omitted from the pack."),
|
|
59
|
+
atlas: z.array(ScopeAtlasEntry).default([]).describe("Scope Atlas: per-path accounting of the whole tracked tree."),
|
|
60
|
+
instructions: z.array(z.string()).default([]).describe("Instruction strings passed alongside the files."),
|
|
61
|
+
token_budget: z
|
|
62
|
+
.object({
|
|
63
|
+
limit: z.number().int().positive().describe("Token budget limit for the pack."),
|
|
64
|
+
estimated_used: z.number().int().nonnegative().describe("Estimated tokens consumed by the pack."),
|
|
65
|
+
})
|
|
66
|
+
.optional()
|
|
67
|
+
.describe("Token budget accounting for the pack, when computed."),
|
|
68
|
+
})
|
|
69
|
+
.describe("The deterministic, hashable context bundle every harness receives, built from the TaskContract plus repo state; omissions are explicit.");
|
|
70
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,iGAAiG;AACjG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,IAAI,CAAC;IACJ,MAAM;IACN,UAAU;IACV,eAAe;IACf,UAAU;IACV,WAAW;IACX,QAAQ;IACR,UAAU;IACV,WAAW;IACX,YAAY;IACZ,SAAS;CACV,CAAC;KACD,QAAQ,CACP,uMAAuM,CACxM,CAAC;AAGJ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IAChD,WAAW,EAAE,eAAe;IAC5B,IAAI,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAC7E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;IACnG,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;CAC7E,CAA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