cc-codeconductor 1.7.1 → 1.7.2
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/README.md +5 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2689 -528
- package/dist/library.js +859 -715
- package/dist/validation/schemas.d.ts +784 -138
- package/dist/validation/scoped-context-schemas.d.ts +1074 -0
- package/package.json +3 -2
- package/presets/agy/skills/database-migrations/SKILL.md +64 -0
- package/presets/agy/skills/rust-async/SKILL.md +64 -0
- package/presets/agy/skills/rust-engineering/SKILL.md +69 -0
- package/presets/agy/skills/rust-sqlx/SKILL.md +64 -0
- package/presets/claude/settings.json +1 -8
- package/presets/claude/skills/database-migrations/SKILL.md +64 -0
- package/presets/claude/skills/rust-async/SKILL.md +64 -0
- package/presets/claude/skills/rust-engineering/SKILL.md +69 -0
- package/presets/claude/skills/rust-sqlx/SKILL.md +64 -0
- package/presets/codex/skills/database-migrations/SKILL.md +64 -0
- package/presets/codex/skills/rust-async/SKILL.md +64 -0
- package/presets/codex/skills/rust-engineering/SKILL.md +69 -0
- package/presets/codex/skills/rust-sqlx/SKILL.md +64 -0
- package/presets/cursor/skills/database-migrations/SKILL.md +64 -0
- package/presets/cursor/skills/rust-async/SKILL.md +64 -0
- package/presets/cursor/skills/rust-engineering/SKILL.md +69 -0
- package/presets/cursor/skills/rust-sqlx/SKILL.md +64 -0
- package/presets/opencode/skills/database-migrations/SKILL.md +64 -0
- package/presets/opencode/skills/rust-async/SKILL.md +64 -0
- package/presets/opencode/skills/rust-engineering/SKILL.md +69 -0
- package/presets/opencode/skills/rust-sqlx/SKILL.md +64 -0
- package/src/presets/shared-skills.yml +8 -0
package/dist/library.js
CHANGED
|
@@ -31,9 +31,136 @@ var init_runner_target = __esm(() => {
|
|
|
31
31
|
INDIVIDUAL_TARGETS = ["opencode", "claude", "codex", "gemini", "cursor", "agy", "pi", "muse"];
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
+
// src/validation/scoped-context-schemas.ts
|
|
35
|
+
import { z } from "zod";
|
|
36
|
+
var ContainedRelPath, Sha256, NonEmpty, RuleKindSchema, OriginClassSchema, ScopedRuleSchema, ScopedRuleFileSchema, RecipeStatusSchema, RecipeStepSchema, VerificationRecipeSchema, ContextManifestSchema, RuleViewSchema, ScopedContextSchema, DetectionStatusSchema, DependencyEvidenceSchema, ProjectScopeProfileSchema;
|
|
37
|
+
var init_scoped_context_schemas = __esm(() => {
|
|
38
|
+
ContainedRelPath = z.string().min(1).refine((p) => !p.startsWith("/") && !/^[A-Za-z]:/.test(p) && !p.includes("\\") && !p.includes("\x00") && !p.split("/").includes(".."), "path must be relative and contained in the authorized root");
|
|
39
|
+
Sha256 = z.string().regex(/^[0-9a-f]{64}$/);
|
|
40
|
+
NonEmpty = z.string().trim().min(1);
|
|
41
|
+
RuleKindSchema = z.enum(["default", "invariant"]);
|
|
42
|
+
OriginClassSchema = z.enum(["engine", "stack", "repository", "task"]);
|
|
43
|
+
ScopedRuleSchema = z.object({
|
|
44
|
+
id: z.string().regex(/^[a-z0-9]+(\.[a-z0-9-]+)+$/),
|
|
45
|
+
kind: RuleKindSchema,
|
|
46
|
+
scopeRoot: z.union([z.literal("."), ContainedRelPath]),
|
|
47
|
+
paths: z.object({
|
|
48
|
+
files: z.array(ContainedRelPath).default([]),
|
|
49
|
+
subtrees: z.array(ContainedRelPath).default([])
|
|
50
|
+
}).strict().default({ files: [], subtrees: [] }),
|
|
51
|
+
when: z.object({
|
|
52
|
+
languages: z.array(NonEmpty).optional(),
|
|
53
|
+
roles: z.array(NonEmpty).optional()
|
|
54
|
+
}).strict().default({}),
|
|
55
|
+
trigger: NonEmpty,
|
|
56
|
+
action: NonEmpty,
|
|
57
|
+
reason: NonEmpty,
|
|
58
|
+
exceptions: NonEmpty,
|
|
59
|
+
verification: z.object({ recipeIds: z.array(NonEmpty).min(1) }).strict(),
|
|
60
|
+
references: z.array(NonEmpty).default([])
|
|
61
|
+
}).strict();
|
|
62
|
+
ScopedRuleFileSchema = z.object({
|
|
63
|
+
schemaVersion: z.literal(1),
|
|
64
|
+
rules: z.array(ScopedRuleSchema).min(1)
|
|
65
|
+
}).strict();
|
|
66
|
+
RecipeStatusSchema = z.enum(["PASS", "FAIL", "BLOCKED", "SKIPPED"]);
|
|
67
|
+
RecipeStepSchema = z.object({
|
|
68
|
+
executable: z.string().regex(/^[A-Za-z0-9_-]+$/),
|
|
69
|
+
argv: z.array(z.string().refine((a) => !a.includes("\x00"))),
|
|
70
|
+
cwd: z.union([z.literal("."), ContainedRelPath]),
|
|
71
|
+
timeoutSeconds: z.number().int().min(1).max(3600),
|
|
72
|
+
expectedExitCodes: z.array(z.number().int()).min(1),
|
|
73
|
+
environment: z.record(z.string()).default({})
|
|
74
|
+
}).strict();
|
|
75
|
+
VerificationRecipeSchema = z.object({
|
|
76
|
+
schemaVersion: z.literal(1),
|
|
77
|
+
id: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
|
|
78
|
+
version: z.number().int().min(1),
|
|
79
|
+
scope: z.object({
|
|
80
|
+
workspaceRoot: z.union([z.literal("."), ContainedRelPath]),
|
|
81
|
+
manifest: ContainedRelPath,
|
|
82
|
+
package: NonEmpty.optional()
|
|
83
|
+
}).strict(),
|
|
84
|
+
prerequisites: z.object({
|
|
85
|
+
tools: z.array(NonEmpty),
|
|
86
|
+
lockfileRequired: z.boolean(),
|
|
87
|
+
dependencyCacheRequired: z.boolean()
|
|
88
|
+
}).strict(),
|
|
89
|
+
steps: z.array(RecipeStepSchema).min(1),
|
|
90
|
+
evidence: z.object({
|
|
91
|
+
requireObservedExecution: z.literal(true),
|
|
92
|
+
requireCandidateUnchanged: z.boolean()
|
|
93
|
+
}).strict()
|
|
94
|
+
}).strict();
|
|
95
|
+
ContextManifestSchema = z.object({
|
|
96
|
+
schemaVersion: z.literal(1),
|
|
97
|
+
scope: z.object({ files: z.array(ContainedRelPath), role: NonEmpty }).strict(),
|
|
98
|
+
profiles: z.array(z.unknown()),
|
|
99
|
+
skills: z.array(z.object({ id: NonEmpty, version: NonEmpty }).strict()),
|
|
100
|
+
rules: z.array(z.object({
|
|
101
|
+
id: NonEmpty,
|
|
102
|
+
kind: RuleKindSchema,
|
|
103
|
+
originClass: OriginClassSchema,
|
|
104
|
+
scopeRoot: z.string(),
|
|
105
|
+
depth: z.number().int().min(0),
|
|
106
|
+
sourcePath: NonEmpty,
|
|
107
|
+
contentHash: Sha256,
|
|
108
|
+
appliesTo: z.array(ContainedRelPath).min(1)
|
|
109
|
+
}).strict()),
|
|
110
|
+
overrides: z.array(z.object({ id: NonEmpty, winner: NonEmpty, loser: NonEmpty }).strict()),
|
|
111
|
+
omittedReferences: z.array(z.object({ ref: NonEmpty, reason: NonEmpty }).strict()),
|
|
112
|
+
diagnostics: z.array(z.object({
|
|
113
|
+
code: NonEmpty,
|
|
114
|
+
severity: z.enum(["info", "warning", "blocking"]),
|
|
115
|
+
message: NonEmpty
|
|
116
|
+
}).strict()),
|
|
117
|
+
budget: z.object({ maxBytes: z.number().int().min(0), usedBytes: z.number().int().min(0) }).strict(),
|
|
118
|
+
hash: Sha256
|
|
119
|
+
}).strict();
|
|
120
|
+
RuleViewSchema = z.object({
|
|
121
|
+
id: NonEmpty,
|
|
122
|
+
kind: RuleKindSchema,
|
|
123
|
+
trigger: NonEmpty,
|
|
124
|
+
action: NonEmpty,
|
|
125
|
+
exceptions: NonEmpty,
|
|
126
|
+
verify: z.array(NonEmpty),
|
|
127
|
+
appliesTo: z.array(ContainedRelPath).min(1),
|
|
128
|
+
source: NonEmpty
|
|
129
|
+
}).strict();
|
|
130
|
+
ScopedContextSchema = z.object({
|
|
131
|
+
manifest: ContextManifestSchema,
|
|
132
|
+
view: z.object({ hash: Sha256, rules: z.array(RuleViewSchema) }).strict()
|
|
133
|
+
}).strict();
|
|
134
|
+
DetectionStatusSchema = z.enum(["confirmed", "indicative", "inconclusive", "absent"]);
|
|
135
|
+
DependencyEvidenceSchema = z.object({
|
|
136
|
+
file: NonEmpty,
|
|
137
|
+
section: NonEmpty,
|
|
138
|
+
key: NonEmpty,
|
|
139
|
+
name: NonEmpty,
|
|
140
|
+
alias: NonEmpty.optional(),
|
|
141
|
+
category: z.enum(["normal", "dev", "build"]),
|
|
142
|
+
optional: z.boolean(),
|
|
143
|
+
features: z.array(z.string()),
|
|
144
|
+
defaultFeatures: z.boolean(),
|
|
145
|
+
target: z.string().optional(),
|
|
146
|
+
owner: NonEmpty,
|
|
147
|
+
resolution: z.enum(["declared", "workspace-inherited", "unresolved"])
|
|
148
|
+
}).strict();
|
|
149
|
+
ProjectScopeProfileSchema = z.object({
|
|
150
|
+
root: z.string(),
|
|
151
|
+
language: NonEmpty,
|
|
152
|
+
status: DetectionStatusSchema,
|
|
153
|
+
packages: z.array(z.object({ name: NonEmpty, manifest: NonEmpty, workspaceRoot: z.string().optional() }).strict()),
|
|
154
|
+
capabilities: z.array(z.string()),
|
|
155
|
+
declaredDatabaseBackends: z.array(z.string()),
|
|
156
|
+
dependencyEvidence: z.array(DependencyEvidenceSchema),
|
|
157
|
+
diagnostics: z.array(z.object({ code: NonEmpty, message: NonEmpty }).strict())
|
|
158
|
+
}).strict();
|
|
159
|
+
});
|
|
160
|
+
|
|
34
161
|
// src/validation/schemas.ts
|
|
35
162
|
import { isAbsolute } from "node:path";
|
|
36
|
-
import { z } from "zod";
|
|
163
|
+
import { z as z2 } from "zod";
|
|
37
164
|
function isContainedRelativePath(value) {
|
|
38
165
|
if (value === "" || isAbsolute(value))
|
|
39
166
|
return false;
|
|
@@ -159,11 +286,12 @@ function validateSkillsRegistry(data) {
|
|
|
159
286
|
var CouncilAgentSpecSchema, CouncilSpecSchema, ProjectProfileSchema, CompileCheckConfigSchema, LoopConfigSchema, CodeConductorConfigSchema, RunnerTargetSchema, InstallStrategySchema, ContainedRelativePathSchema, ManifestEntrySchema, InstallManifestSchema, ToolProviderNamesSchema, PermissionProviderNamesSchema, ModelConfigSchema, SkillFrontmatterSchema, CommandFrontmatterSchema, TargetCapabilitiesSchema, ContractTargetSchema, ContractFormatSchema, AgentContractSchema, CouncilFindingSchema, CouncilVerdictInputSchema, ConsensusConfigSchema, CouncilVerdictSchema, ClaudeAgentFileSchema, OpenCodeAgentFileSchema, SentryStackFrameSchema, SentryWebhookSchema, MemoryPointerSchema, MemoryIndexSchema, GoalTaskSchema, GoalGraphSchema, ConfidenceLevelSchema, ProductNodeTypeSchema, GraphRelationSchema, KnowledgeEntitySchema, DecisionSchema, EvidenceSchema, TddValidationRecordSchema, CanonicalTaskCardStatusSchema, CanonicalTaskCardSchema, ProductGraphNodeSchema, ProductGraphEdgeSchema, ProductGraphSchema, ProductMetaSchema, ProductEventTypeSchema, ProductEventSchema, OperationalStateSchema, StrategicMemorySchema, ImpactReportSchema, BusinessReviewOutputSchema, VerificationReportSchema, BacklogStatusSchema, BacklogTypeSchema, BacklogPrioritySchema, BacklogGlobalSchema, BacklogItemSchema, BacklogDocumentSchema, OpenspecTaskCardPhaseSchema, OpenspecTaskCardStatusSchema, OpenspecTaskCardSchema, OpenspecStateSchema, SpecAnalyzeFindingSchema, SpecAnalyzeReportSchema, WorkflowCommandSchema, CcepOutputFormatSchema, CommandEnvelopeSchema, WorkflowPhaseSchema, WorkflowRiskRuleSchema, WorkflowProfileSchema, ExecutionContextSchema, PlannerOutputSchema, AgentArtifactSchema, AgentOutputSchema, ImplementerTestsSchema, ImplementerOutputSchema, ReviewAxisSchema, ReviewFindingSchema, ReviewerOutputSchema, TechnicalPlanOutputSchema, FixIntakeOutputSchema, ScorecardVerdictSchema, ScorecardCriterionIdSchema, ScorecardCriterionSchema, ScorecardRecordSchema, TaskOutcomeSourceSchema, TaskOutcomeStatusSchema, DeliveryRouteSchema, TokenUsageSchema, DeliveryTelemetrySchema, DeliveryLedgerTaskSchema, DeliveryLedgerSchema, HandoffEnvelopeSchema, RepoRelativePathSchema, DeliveryLedgerRequestSchema, TaskOutcomeSchema, HarnessComponentIdSchema, HarnessComponentLayerSchema, HarnessToggleKindSchema, HarnessCatalogEntrySchema, HarnessCatalogSchema, HarnessOverlaySchema, HarnessExperimentSchema, HarnessSuiteTaskSchema, HarnessSuiteSchema, EvaluationIndexSchema, ExecutionProfileNameSchema, ExecutionProfileSchema, SkillsRegistrySchema;
|
|
160
287
|
var init_schemas = __esm(() => {
|
|
161
288
|
init_runner_target();
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
289
|
+
init_scoped_context_schemas();
|
|
290
|
+
CouncilAgentSpecSchema = z2.object({
|
|
291
|
+
id: z2.string(),
|
|
292
|
+
role: z2.string(),
|
|
293
|
+
context: z2.enum(["repo-readonly", "prompt-only"]),
|
|
294
|
+
modelHint: z2.enum([
|
|
167
295
|
"strong-reasoning",
|
|
168
296
|
"security-reasoning",
|
|
169
297
|
"balanced",
|
|
@@ -171,64 +299,65 @@ var init_schemas = __esm(() => {
|
|
|
171
299
|
"analytical",
|
|
172
300
|
"adversarial"
|
|
173
301
|
]),
|
|
174
|
-
focus:
|
|
175
|
-
});
|
|
176
|
-
CouncilSpecSchema =
|
|
177
|
-
name:
|
|
178
|
-
version:
|
|
179
|
-
description:
|
|
180
|
-
outputContract:
|
|
181
|
-
agents:
|
|
182
|
-
});
|
|
183
|
-
ProjectProfileSchema =
|
|
184
|
-
rootDir:
|
|
185
|
-
languages:
|
|
186
|
-
runtimes:
|
|
187
|
-
packageManagers:
|
|
188
|
-
frameworks:
|
|
189
|
-
signals:
|
|
190
|
-
confidence:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
302
|
+
focus: z2.array(z2.string())
|
|
303
|
+
});
|
|
304
|
+
CouncilSpecSchema = z2.object({
|
|
305
|
+
name: z2.string(),
|
|
306
|
+
version: z2.string(),
|
|
307
|
+
description: z2.string(),
|
|
308
|
+
outputContract: z2.string(),
|
|
309
|
+
agents: z2.array(CouncilAgentSpecSchema).min(1).refine((agents) => new Set(agents.map((a) => a.id.trim().toLowerCase())).size === agents.length, { message: "council agent ids must be unique" })
|
|
310
|
+
});
|
|
311
|
+
ProjectProfileSchema = z2.object({
|
|
312
|
+
rootDir: z2.string(),
|
|
313
|
+
languages: z2.array(z2.string()),
|
|
314
|
+
runtimes: z2.array(z2.string()),
|
|
315
|
+
packageManagers: z2.array(z2.string()),
|
|
316
|
+
frameworks: z2.array(z2.string()),
|
|
317
|
+
signals: z2.array(z2.string()),
|
|
318
|
+
confidence: z2.enum(["low", "medium", "high"]),
|
|
319
|
+
scopes: z2.array(ProjectScopeProfileSchema).optional()
|
|
320
|
+
});
|
|
321
|
+
CompileCheckConfigSchema = z2.object({
|
|
322
|
+
enabled: z2.boolean(),
|
|
323
|
+
command: z2.string().optional(),
|
|
324
|
+
timeoutMs: z2.number().positive().optional()
|
|
325
|
+
});
|
|
326
|
+
LoopConfigSchema = z2.object({
|
|
327
|
+
enabled: z2.boolean().optional().default(true),
|
|
328
|
+
maxIterations: z2.number().int().positive().optional().default(3),
|
|
329
|
+
maxTokenBudget: z2.number().nonnegative().optional().default(0),
|
|
330
|
+
compaction: z2.object({
|
|
331
|
+
enabled: z2.boolean().optional().default(true),
|
|
332
|
+
historyFile: z2.string().optional()
|
|
204
333
|
}).optional()
|
|
205
334
|
});
|
|
206
|
-
CodeConductorConfigSchema =
|
|
207
|
-
version:
|
|
208
|
-
project:
|
|
209
|
-
name:
|
|
210
|
-
profile:
|
|
335
|
+
CodeConductorConfigSchema = z2.object({
|
|
336
|
+
version: z2.string(),
|
|
337
|
+
project: z2.object({
|
|
338
|
+
name: z2.string(),
|
|
339
|
+
profile: z2.string().optional()
|
|
211
340
|
}),
|
|
212
|
-
defaults:
|
|
213
|
-
target:
|
|
214
|
-
overwrite:
|
|
215
|
-
locale:
|
|
341
|
+
defaults: z2.object({
|
|
342
|
+
target: z2.enum(INDIVIDUAL_TARGETS),
|
|
343
|
+
overwrite: z2.boolean(),
|
|
344
|
+
locale: z2.enum(["en", "es"]).optional().default("en")
|
|
216
345
|
}),
|
|
217
|
-
presets:
|
|
218
|
-
council:
|
|
219
|
-
enabled:
|
|
220
|
-
version:
|
|
346
|
+
presets: z2.object({
|
|
347
|
+
council: z2.object({
|
|
348
|
+
enabled: z2.boolean(),
|
|
349
|
+
version: z2.string()
|
|
221
350
|
})
|
|
222
351
|
}),
|
|
223
|
-
safety:
|
|
224
|
-
destructiveCommands:
|
|
225
|
-
secretPatterns:
|
|
352
|
+
safety: z2.object({
|
|
353
|
+
destructiveCommands: z2.array(z2.string()),
|
|
354
|
+
secretPatterns: z2.array(z2.string()),
|
|
226
355
|
compileCheck: CompileCheckConfigSchema.optional()
|
|
227
356
|
}),
|
|
228
357
|
loop: LoopConfigSchema.optional()
|
|
229
358
|
});
|
|
230
|
-
RunnerTargetSchema =
|
|
231
|
-
InstallStrategySchema =
|
|
359
|
+
RunnerTargetSchema = z2.enum(RUNNER_TARGETS);
|
|
360
|
+
InstallStrategySchema = z2.enum([
|
|
232
361
|
"overwrite",
|
|
233
362
|
"append",
|
|
234
363
|
"merge-json",
|
|
@@ -236,64 +365,64 @@ var init_schemas = __esm(() => {
|
|
|
236
365
|
"create-only",
|
|
237
366
|
"skip"
|
|
238
367
|
]);
|
|
239
|
-
ContainedRelativePathSchema =
|
|
368
|
+
ContainedRelativePathSchema = z2.string().refine(isContainedRelativePath, (value) => ({
|
|
240
369
|
message: `Path must be relative without ".." segments: ${value}`
|
|
241
370
|
}));
|
|
242
|
-
ManifestEntrySchema =
|
|
371
|
+
ManifestEntrySchema = z2.object({
|
|
243
372
|
src: ContainedRelativePathSchema,
|
|
244
373
|
dest: ContainedRelativePathSchema,
|
|
245
374
|
strategy: InstallStrategySchema,
|
|
246
375
|
globalStrategy: InstallStrategySchema.optional(),
|
|
247
|
-
template:
|
|
248
|
-
});
|
|
249
|
-
InstallManifestSchema =
|
|
250
|
-
target:
|
|
251
|
-
entries:
|
|
252
|
-
});
|
|
253
|
-
ToolProviderNamesSchema =
|
|
254
|
-
PermissionProviderNamesSchema =
|
|
255
|
-
ModelConfigSchema =
|
|
256
|
-
target:
|
|
257
|
-
agents:
|
|
258
|
-
claude:
|
|
259
|
-
opencode:
|
|
260
|
-
codex:
|
|
261
|
-
gemini:
|
|
262
|
-
cursor:
|
|
263
|
-
agy:
|
|
264
|
-
pi:
|
|
265
|
-
grok:
|
|
266
|
-
muse:
|
|
376
|
+
template: z2.boolean().optional()
|
|
377
|
+
});
|
|
378
|
+
InstallManifestSchema = z2.object({
|
|
379
|
+
target: z2.enum(INDIVIDUAL_TARGETS),
|
|
380
|
+
entries: z2.array(ManifestEntrySchema)
|
|
381
|
+
});
|
|
382
|
+
ToolProviderNamesSchema = z2.record(z2.string(), z2.string());
|
|
383
|
+
PermissionProviderNamesSchema = z2.record(z2.string(), z2.string());
|
|
384
|
+
ModelConfigSchema = z2.object({
|
|
385
|
+
target: z2.enum(INDIVIDUAL_TARGETS),
|
|
386
|
+
agents: z2.record(z2.string(), z2.object({
|
|
387
|
+
claude: z2.string().optional(),
|
|
388
|
+
opencode: z2.string().optional(),
|
|
389
|
+
codex: z2.string().optional(),
|
|
390
|
+
gemini: z2.string().optional(),
|
|
391
|
+
cursor: z2.string().optional(),
|
|
392
|
+
agy: z2.string().optional(),
|
|
393
|
+
pi: z2.string().optional(),
|
|
394
|
+
grok: z2.string().optional(),
|
|
395
|
+
muse: z2.string().optional()
|
|
267
396
|
})),
|
|
268
|
-
tools:
|
|
397
|
+
tools: z2.record(z2.string(), ToolProviderNamesSchema).optional(),
|
|
269
398
|
permissions: PermissionProviderNamesSchema.optional()
|
|
270
399
|
});
|
|
271
|
-
SkillFrontmatterSchema =
|
|
272
|
-
name:
|
|
273
|
-
description:
|
|
274
|
-
id:
|
|
400
|
+
SkillFrontmatterSchema = z2.object({
|
|
401
|
+
name: z2.string().trim().min(1, "name must not be empty"),
|
|
402
|
+
description: z2.string().trim().min(1, "description must not be empty").max(1024, "description must be 1024 characters or fewer"),
|
|
403
|
+
id: z2.string().trim().min(1).optional()
|
|
275
404
|
}).passthrough();
|
|
276
|
-
CommandFrontmatterSchema =
|
|
277
|
-
description:
|
|
278
|
-
"argument-hint":
|
|
279
|
-
"allowed-tools":
|
|
280
|
-
model:
|
|
281
|
-
"disable-model-invocation":
|
|
405
|
+
CommandFrontmatterSchema = z2.object({
|
|
406
|
+
description: z2.string().trim().min(1, "description must not be empty").max(1024, "description must be 1024 characters or fewer"),
|
|
407
|
+
"argument-hint": z2.string().trim().min(1).optional(),
|
|
408
|
+
"allowed-tools": z2.string().trim().min(1).optional(),
|
|
409
|
+
model: z2.string().trim().min(1).optional(),
|
|
410
|
+
"disable-model-invocation": z2.boolean().optional()
|
|
282
411
|
}).passthrough();
|
|
283
|
-
TargetCapabilitiesSchema =
|
|
284
|
-
target:
|
|
285
|
-
invocation:
|
|
286
|
-
commandFormat:
|
|
287
|
-
contextFile:
|
|
288
|
-
subagentInvocationStyle:
|
|
289
|
-
capabilities:
|
|
290
|
-
subagents:
|
|
291
|
-
hooks:
|
|
292
|
-
mcp:
|
|
293
|
-
council:
|
|
412
|
+
TargetCapabilitiesSchema = z2.object({
|
|
413
|
+
target: z2.enum(INDIVIDUAL_TARGETS),
|
|
414
|
+
invocation: z2.enum(["colon", "hyphen", "dollar"]),
|
|
415
|
+
commandFormat: z2.enum(["markdown", "toml", "skill"]),
|
|
416
|
+
contextFile: z2.string().trim().min(1),
|
|
417
|
+
subagentInvocationStyle: z2.enum(["task-tool", "adopt-role", "invoke-with-context"]).optional(),
|
|
418
|
+
capabilities: z2.object({
|
|
419
|
+
subagents: z2.boolean(),
|
|
420
|
+
hooks: z2.boolean(),
|
|
421
|
+
mcp: z2.boolean(),
|
|
422
|
+
council: z2.boolean()
|
|
294
423
|
})
|
|
295
424
|
});
|
|
296
|
-
ContractTargetSchema =
|
|
425
|
+
ContractTargetSchema = z2.enum([
|
|
297
426
|
"claude",
|
|
298
427
|
"opencode",
|
|
299
428
|
"codex",
|
|
@@ -301,41 +430,41 @@ var init_schemas = __esm(() => {
|
|
|
301
430
|
"cursor",
|
|
302
431
|
"agy"
|
|
303
432
|
]);
|
|
304
|
-
ContractFormatSchema =
|
|
433
|
+
ContractFormatSchema = z2.object({
|
|
305
434
|
target: ContractTargetSchema,
|
|
306
|
-
options:
|
|
435
|
+
options: z2.record(z2.unknown()).optional()
|
|
307
436
|
});
|
|
308
|
-
AgentContractSchema =
|
|
437
|
+
AgentContractSchema = z2.object({
|
|
309
438
|
council: CouncilSpecSchema,
|
|
310
|
-
targets:
|
|
311
|
-
contractVersion:
|
|
312
|
-
renderHints:
|
|
313
|
-
});
|
|
314
|
-
CouncilFindingSchema =
|
|
315
|
-
category:
|
|
316
|
-
severity:
|
|
317
|
-
message:
|
|
318
|
-
agentId:
|
|
319
|
-
});
|
|
320
|
-
CouncilVerdictInputSchema =
|
|
321
|
-
agentId:
|
|
322
|
-
agentRole:
|
|
323
|
-
status:
|
|
324
|
-
securityVeto:
|
|
325
|
-
complianceVeto:
|
|
326
|
-
confidence:
|
|
327
|
-
findings:
|
|
328
|
-
summary:
|
|
329
|
-
candidateHash:
|
|
330
|
-
});
|
|
331
|
-
ConsensusConfigSchema =
|
|
332
|
-
algorithm:
|
|
333
|
-
allowSecurityVeto:
|
|
334
|
-
allowComplianceVeto:
|
|
335
|
-
expectedAgentIds:
|
|
336
|
-
quorum:
|
|
337
|
-
criticalFindingsPolicy:
|
|
338
|
-
candidateHash:
|
|
439
|
+
targets: z2.array(ContractFormatSchema),
|
|
440
|
+
contractVersion: z2.string(),
|
|
441
|
+
renderHints: z2.record(ContractTargetSchema, z2.record(z2.unknown())).optional()
|
|
442
|
+
});
|
|
443
|
+
CouncilFindingSchema = z2.object({
|
|
444
|
+
category: z2.string(),
|
|
445
|
+
severity: z2.enum(["info", "warning", "critical"]),
|
|
446
|
+
message: z2.string(),
|
|
447
|
+
agentId: z2.string()
|
|
448
|
+
});
|
|
449
|
+
CouncilVerdictInputSchema = z2.object({
|
|
450
|
+
agentId: z2.string().min(1).refine((id) => id.trim().length > 0),
|
|
451
|
+
agentRole: z2.string(),
|
|
452
|
+
status: z2.enum(["APPROVED", "REJECTED", "ABSTAIN"]),
|
|
453
|
+
securityVeto: z2.boolean(),
|
|
454
|
+
complianceVeto: z2.boolean().optional(),
|
|
455
|
+
confidence: z2.number().min(0).max(1),
|
|
456
|
+
findings: z2.array(CouncilFindingSchema),
|
|
457
|
+
summary: z2.string(),
|
|
458
|
+
candidateHash: z2.string().min(1).optional()
|
|
459
|
+
});
|
|
460
|
+
ConsensusConfigSchema = z2.object({
|
|
461
|
+
algorithm: z2.enum(["majority", "unanimous"]),
|
|
462
|
+
allowSecurityVeto: z2.boolean(),
|
|
463
|
+
allowComplianceVeto: z2.boolean().optional(),
|
|
464
|
+
expectedAgentIds: z2.array(z2.string().min(1).refine((id) => id.trim().length > 0)).min(1).refine((ids) => new Set(ids.map((id) => id.trim().toLowerCase())).size === ids.length).optional(),
|
|
465
|
+
quorum: z2.number().int().positive().optional(),
|
|
466
|
+
criticalFindingsPolicy: z2.enum(["escalate", "reject", "ignore"]).optional(),
|
|
467
|
+
candidateHash: z2.string().min(1).optional()
|
|
339
468
|
}).refine((config) => config.algorithm !== "unanimous" || config.expectedAgentIds !== undefined, {
|
|
340
469
|
message: "unanimous consensus requires a non-empty expectedAgentIds roster",
|
|
341
470
|
path: ["expectedAgentIds"]
|
|
@@ -343,77 +472,77 @@ var init_schemas = __esm(() => {
|
|
|
343
472
|
message: "allowSecurityVeto requires at least one security agent in expectedAgentIds",
|
|
344
473
|
path: ["expectedAgentIds"]
|
|
345
474
|
});
|
|
346
|
-
CouncilVerdictSchema =
|
|
347
|
-
status:
|
|
348
|
-
totalAgents:
|
|
349
|
-
approvedCount:
|
|
350
|
-
rejectedCount:
|
|
351
|
-
abstainedCount:
|
|
352
|
-
vetoApplied:
|
|
353
|
-
complianceVetoApplied:
|
|
354
|
-
vetoByAgentId:
|
|
355
|
-
averageConfidence:
|
|
356
|
-
findings:
|
|
357
|
-
summary:
|
|
358
|
-
individualVerdicts:
|
|
359
|
-
});
|
|
360
|
-
ClaudeAgentFileSchema =
|
|
361
|
-
path:
|
|
362
|
-
content:
|
|
363
|
-
overwrite:
|
|
364
|
-
});
|
|
365
|
-
OpenCodeAgentFileSchema =
|
|
366
|
-
path:
|
|
367
|
-
content:
|
|
368
|
-
overwrite:
|
|
369
|
-
});
|
|
370
|
-
SentryStackFrameSchema =
|
|
371
|
-
filename:
|
|
372
|
-
function:
|
|
373
|
-
lineNo:
|
|
374
|
-
colNo:
|
|
375
|
-
context:
|
|
376
|
-
});
|
|
377
|
-
SentryWebhookSchema =
|
|
378
|
-
issueId:
|
|
379
|
-
title:
|
|
380
|
-
culprit:
|
|
381
|
-
filename:
|
|
382
|
-
stackTrace:
|
|
383
|
-
environment:
|
|
384
|
-
release:
|
|
385
|
-
});
|
|
386
|
-
MemoryPointerSchema =
|
|
387
|
-
topic_key:
|
|
388
|
-
id:
|
|
389
|
-
file:
|
|
390
|
-
summary:
|
|
391
|
-
timestamp:
|
|
392
|
-
tags:
|
|
393
|
-
});
|
|
394
|
-
MemoryIndexSchema =
|
|
395
|
-
version:
|
|
396
|
-
pointers:
|
|
397
|
-
});
|
|
398
|
-
GoalTaskSchema =
|
|
399
|
-
id:
|
|
400
|
-
title:
|
|
401
|
-
type:
|
|
402
|
-
risk:
|
|
403
|
-
priority:
|
|
404
|
-
status:
|
|
405
|
-
depends_on:
|
|
406
|
-
acceptance_criteria:
|
|
407
|
-
blocked_reason:
|
|
408
|
-
context_scope:
|
|
409
|
-
});
|
|
410
|
-
GoalGraphSchema =
|
|
411
|
-
objective:
|
|
412
|
-
tasks:
|
|
413
|
-
created_at:
|
|
414
|
-
});
|
|
415
|
-
ConfidenceLevelSchema =
|
|
416
|
-
ProductNodeTypeSchema =
|
|
475
|
+
CouncilVerdictSchema = z2.object({
|
|
476
|
+
status: z2.enum(["APPROVED", "REJECTED", "ESCALATED"]),
|
|
477
|
+
totalAgents: z2.number(),
|
|
478
|
+
approvedCount: z2.number(),
|
|
479
|
+
rejectedCount: z2.number(),
|
|
480
|
+
abstainedCount: z2.number(),
|
|
481
|
+
vetoApplied: z2.boolean(),
|
|
482
|
+
complianceVetoApplied: z2.boolean().optional(),
|
|
483
|
+
vetoByAgentId: z2.string().optional(),
|
|
484
|
+
averageConfidence: z2.number().min(0).max(1).optional(),
|
|
485
|
+
findings: z2.array(CouncilFindingSchema),
|
|
486
|
+
summary: z2.string(),
|
|
487
|
+
individualVerdicts: z2.array(CouncilVerdictInputSchema)
|
|
488
|
+
});
|
|
489
|
+
ClaudeAgentFileSchema = z2.object({
|
|
490
|
+
path: z2.string().startsWith(".claude/"),
|
|
491
|
+
content: z2.string(),
|
|
492
|
+
overwrite: z2.boolean()
|
|
493
|
+
});
|
|
494
|
+
OpenCodeAgentFileSchema = z2.object({
|
|
495
|
+
path: z2.string().startsWith(".opencode/"),
|
|
496
|
+
content: z2.string(),
|
|
497
|
+
overwrite: z2.boolean()
|
|
498
|
+
});
|
|
499
|
+
SentryStackFrameSchema = z2.object({
|
|
500
|
+
filename: z2.string(),
|
|
501
|
+
function: z2.string(),
|
|
502
|
+
lineNo: z2.number(),
|
|
503
|
+
colNo: z2.number().optional(),
|
|
504
|
+
context: z2.array(z2.string())
|
|
505
|
+
});
|
|
506
|
+
SentryWebhookSchema = z2.object({
|
|
507
|
+
issueId: z2.string(),
|
|
508
|
+
title: z2.string(),
|
|
509
|
+
culprit: z2.string(),
|
|
510
|
+
filename: z2.string().optional(),
|
|
511
|
+
stackTrace: z2.array(SentryStackFrameSchema),
|
|
512
|
+
environment: z2.string().optional(),
|
|
513
|
+
release: z2.string().optional()
|
|
514
|
+
});
|
|
515
|
+
MemoryPointerSchema = z2.object({
|
|
516
|
+
topic_key: z2.string().min(1).max(128),
|
|
517
|
+
id: z2.number().int().positive(),
|
|
518
|
+
file: z2.string().min(1),
|
|
519
|
+
summary: z2.string().min(1).max(200),
|
|
520
|
+
timestamp: z2.string().datetime(),
|
|
521
|
+
tags: z2.array(z2.string().max(64)).max(10).optional().default([])
|
|
522
|
+
});
|
|
523
|
+
MemoryIndexSchema = z2.object({
|
|
524
|
+
version: z2.literal(1),
|
|
525
|
+
pointers: z2.array(MemoryPointerSchema)
|
|
526
|
+
});
|
|
527
|
+
GoalTaskSchema = z2.object({
|
|
528
|
+
id: z2.string(),
|
|
529
|
+
title: z2.string(),
|
|
530
|
+
type: z2.enum(["feature", "fix", "refactor", "test", "docs"]),
|
|
531
|
+
risk: z2.enum(["low", "medium", "high"]),
|
|
532
|
+
priority: z2.enum(["P0", "P1", "P2", "P3"]).optional(),
|
|
533
|
+
status: z2.enum(["pending", "in-progress", "done", "blocked"]),
|
|
534
|
+
depends_on: z2.array(z2.string()).optional().default([]),
|
|
535
|
+
acceptance_criteria: z2.array(z2.string()),
|
|
536
|
+
blocked_reason: z2.string().optional(),
|
|
537
|
+
context_scope: z2.enum(["isolated", "continuation", "full"]).optional().default("isolated")
|
|
538
|
+
});
|
|
539
|
+
GoalGraphSchema = z2.object({
|
|
540
|
+
objective: z2.string(),
|
|
541
|
+
tasks: z2.array(GoalTaskSchema),
|
|
542
|
+
created_at: z2.string()
|
|
543
|
+
});
|
|
544
|
+
ConfidenceLevelSchema = z2.enum(["low", "medium", "high"]);
|
|
545
|
+
ProductNodeTypeSchema = z2.enum([
|
|
417
546
|
"product",
|
|
418
547
|
"domain",
|
|
419
548
|
"capability",
|
|
@@ -427,7 +556,7 @@ var init_schemas = __esm(() => {
|
|
|
427
556
|
"task",
|
|
428
557
|
"evidence"
|
|
429
558
|
]);
|
|
430
|
-
GraphRelationSchema =
|
|
559
|
+
GraphRelationSchema = z2.enum([
|
|
431
560
|
"implements",
|
|
432
561
|
"depends_on",
|
|
433
562
|
"documents",
|
|
@@ -436,51 +565,51 @@ var init_schemas = __esm(() => {
|
|
|
436
565
|
"blocks",
|
|
437
566
|
"contains"
|
|
438
567
|
]);
|
|
439
|
-
KnowledgeEntitySchema =
|
|
568
|
+
KnowledgeEntitySchema = z2.object({
|
|
440
569
|
type: ProductNodeTypeSchema,
|
|
441
|
-
id:
|
|
442
|
-
name:
|
|
443
|
-
source:
|
|
444
|
-
version:
|
|
570
|
+
id: z2.string(),
|
|
571
|
+
name: z2.string(),
|
|
572
|
+
source: z2.string(),
|
|
573
|
+
version: z2.string().optional(),
|
|
445
574
|
confidence: ConfidenceLevelSchema,
|
|
446
|
-
relations:
|
|
447
|
-
targetId:
|
|
575
|
+
relations: z2.array(z2.object({
|
|
576
|
+
targetId: z2.string(),
|
|
448
577
|
relation: GraphRelationSchema
|
|
449
578
|
})).default([]),
|
|
450
|
-
data:
|
|
451
|
-
});
|
|
452
|
-
DecisionSchema =
|
|
453
|
-
id:
|
|
454
|
-
context:
|
|
455
|
-
alternatives:
|
|
456
|
-
chosenOption:
|
|
457
|
-
rationale:
|
|
458
|
-
consequences:
|
|
459
|
-
date:
|
|
460
|
-
linkedTasks:
|
|
461
|
-
linkedComponents:
|
|
462
|
-
source:
|
|
463
|
-
});
|
|
464
|
-
EvidenceSchema =
|
|
465
|
-
id:
|
|
466
|
-
source:
|
|
467
|
-
type:
|
|
468
|
-
timestamp:
|
|
469
|
-
relatedTask:
|
|
470
|
-
relatedDecision:
|
|
471
|
-
confidence:
|
|
472
|
-
checksum:
|
|
473
|
-
summary:
|
|
474
|
-
data:
|
|
475
|
-
});
|
|
476
|
-
TddValidationRecordSchema =
|
|
477
|
-
taskId:
|
|
478
|
-
evidenceId:
|
|
479
|
-
receiptNonce:
|
|
480
|
-
manifestHash:
|
|
481
|
-
validatedAt:
|
|
579
|
+
data: z2.record(z2.string(), z2.unknown()).optional().default({})
|
|
580
|
+
});
|
|
581
|
+
DecisionSchema = z2.object({
|
|
582
|
+
id: z2.string(),
|
|
583
|
+
context: z2.string(),
|
|
584
|
+
alternatives: z2.array(z2.string()).default([]),
|
|
585
|
+
chosenOption: z2.string(),
|
|
586
|
+
rationale: z2.string(),
|
|
587
|
+
consequences: z2.array(z2.string()).default([]),
|
|
588
|
+
date: z2.string(),
|
|
589
|
+
linkedTasks: z2.array(z2.string()).default([]),
|
|
590
|
+
linkedComponents: z2.array(z2.string()).default([]),
|
|
591
|
+
source: z2.string().optional()
|
|
592
|
+
});
|
|
593
|
+
EvidenceSchema = z2.object({
|
|
594
|
+
id: z2.string(),
|
|
595
|
+
source: z2.string(),
|
|
596
|
+
type: z2.string(),
|
|
597
|
+
timestamp: z2.string(),
|
|
598
|
+
relatedTask: z2.string().optional(),
|
|
599
|
+
relatedDecision: z2.string().optional(),
|
|
600
|
+
confidence: z2.number().min(0).max(1),
|
|
601
|
+
checksum: z2.string().optional(),
|
|
602
|
+
summary: z2.string().optional(),
|
|
603
|
+
data: z2.record(z2.string(), z2.unknown()).optional()
|
|
604
|
+
});
|
|
605
|
+
TddValidationRecordSchema = z2.object({
|
|
606
|
+
taskId: z2.string().min(1),
|
|
607
|
+
evidenceId: z2.string().min(1),
|
|
608
|
+
receiptNonce: z2.string().regex(/^[0-9a-f]{32}$/),
|
|
609
|
+
manifestHash: z2.string().regex(/^[0-9a-f]{64}$/),
|
|
610
|
+
validatedAt: z2.string().datetime()
|
|
482
611
|
}).strict();
|
|
483
|
-
CanonicalTaskCardStatusSchema =
|
|
612
|
+
CanonicalTaskCardStatusSchema = z2.enum([
|
|
484
613
|
"draft",
|
|
485
614
|
"ready",
|
|
486
615
|
"in-progress",
|
|
@@ -488,60 +617,60 @@ var init_schemas = __esm(() => {
|
|
|
488
617
|
"done",
|
|
489
618
|
"blocked"
|
|
490
619
|
]);
|
|
491
|
-
CanonicalTaskCardSchema =
|
|
492
|
-
id:
|
|
493
|
-
title:
|
|
494
|
-
objective:
|
|
495
|
-
context:
|
|
496
|
-
acceptanceCriteria:
|
|
497
|
-
dependencies:
|
|
498
|
-
constraints:
|
|
499
|
-
risk:
|
|
500
|
-
targetFiles:
|
|
501
|
-
agentType:
|
|
502
|
-
evidenceRequired:
|
|
620
|
+
CanonicalTaskCardSchema = z2.object({
|
|
621
|
+
id: z2.string(),
|
|
622
|
+
title: z2.string(),
|
|
623
|
+
objective: z2.string(),
|
|
624
|
+
context: z2.string(),
|
|
625
|
+
acceptanceCriteria: z2.array(z2.string()),
|
|
626
|
+
dependencies: z2.array(z2.string()).default([]),
|
|
627
|
+
constraints: z2.array(z2.string()).default([]),
|
|
628
|
+
risk: z2.enum(["low", "medium", "high"]),
|
|
629
|
+
targetFiles: z2.array(z2.string()).default([]),
|
|
630
|
+
agentType: z2.string(),
|
|
631
|
+
evidenceRequired: z2.array(z2.string()).default([]),
|
|
503
632
|
status: CanonicalTaskCardStatusSchema,
|
|
504
|
-
type:
|
|
505
|
-
linkedCapabilities:
|
|
506
|
-
boundaries:
|
|
507
|
-
requiresHumanReview:
|
|
508
|
-
requiresTests:
|
|
509
|
-
contextScope:
|
|
510
|
-
actualBehavior:
|
|
511
|
-
expectedBehavior:
|
|
512
|
-
reproductionSteps:
|
|
513
|
-
domain:
|
|
514
|
-
authorization:
|
|
515
|
-
});
|
|
516
|
-
ProductGraphNodeSchema =
|
|
517
|
-
id:
|
|
633
|
+
type: z2.enum(["feature", "fix", "refactor", "review", "docs", "test"]),
|
|
634
|
+
linkedCapabilities: z2.array(z2.string()).default([]),
|
|
635
|
+
boundaries: z2.array(z2.string()).default([]),
|
|
636
|
+
requiresHumanReview: z2.boolean().optional(),
|
|
637
|
+
requiresTests: z2.boolean().optional(),
|
|
638
|
+
contextScope: z2.enum(["isolated", "continuation", "full"]).optional(),
|
|
639
|
+
actualBehavior: z2.string().optional(),
|
|
640
|
+
expectedBehavior: z2.string().optional(),
|
|
641
|
+
reproductionSteps: z2.array(z2.string()).optional(),
|
|
642
|
+
domain: z2.string().optional(),
|
|
643
|
+
authorization: z2.string().optional()
|
|
644
|
+
});
|
|
645
|
+
ProductGraphNodeSchema = z2.object({
|
|
646
|
+
id: z2.string(),
|
|
518
647
|
type: ProductNodeTypeSchema,
|
|
519
|
-
name:
|
|
520
|
-
data:
|
|
521
|
-
source:
|
|
648
|
+
name: z2.string(),
|
|
649
|
+
data: z2.record(z2.string(), z2.unknown()).default({}),
|
|
650
|
+
source: z2.string().optional(),
|
|
522
651
|
confidence: ConfidenceLevelSchema.optional(),
|
|
523
|
-
version:
|
|
652
|
+
version: z2.string().optional()
|
|
524
653
|
});
|
|
525
|
-
ProductGraphEdgeSchema =
|
|
526
|
-
from:
|
|
527
|
-
to:
|
|
654
|
+
ProductGraphEdgeSchema = z2.object({
|
|
655
|
+
from: z2.string(),
|
|
656
|
+
to: z2.string(),
|
|
528
657
|
relation: GraphRelationSchema
|
|
529
658
|
});
|
|
530
|
-
ProductGraphSchema =
|
|
531
|
-
version:
|
|
532
|
-
productId:
|
|
533
|
-
productName:
|
|
534
|
-
nodes:
|
|
535
|
-
edges:
|
|
536
|
-
updatedAt:
|
|
537
|
-
});
|
|
538
|
-
ProductMetaSchema =
|
|
539
|
-
version:
|
|
540
|
-
graphVersion:
|
|
541
|
-
lastIngestAt:
|
|
542
|
-
sourceHashes:
|
|
543
|
-
});
|
|
544
|
-
ProductEventTypeSchema =
|
|
659
|
+
ProductGraphSchema = z2.object({
|
|
660
|
+
version: z2.literal(1),
|
|
661
|
+
productId: z2.string(),
|
|
662
|
+
productName: z2.string(),
|
|
663
|
+
nodes: z2.array(ProductGraphNodeSchema),
|
|
664
|
+
edges: z2.array(ProductGraphEdgeSchema),
|
|
665
|
+
updatedAt: z2.string()
|
|
666
|
+
});
|
|
667
|
+
ProductMetaSchema = z2.object({
|
|
668
|
+
version: z2.literal(1),
|
|
669
|
+
graphVersion: z2.string(),
|
|
670
|
+
lastIngestAt: z2.string().optional(),
|
|
671
|
+
sourceHashes: z2.record(z2.string(), z2.string()).default({})
|
|
672
|
+
});
|
|
673
|
+
ProductEventTypeSchema = z2.enum([
|
|
545
674
|
"task.started",
|
|
546
675
|
"task.completed",
|
|
547
676
|
"lock.recovered",
|
|
@@ -554,64 +683,64 @@ var init_schemas = __esm(() => {
|
|
|
554
683
|
"feedback.processed",
|
|
555
684
|
"context.compiled"
|
|
556
685
|
]);
|
|
557
|
-
ProductEventSchema =
|
|
558
|
-
id:
|
|
686
|
+
ProductEventSchema = z2.object({
|
|
687
|
+
id: z2.string(),
|
|
559
688
|
type: ProductEventTypeSchema,
|
|
560
|
-
timestamp:
|
|
561
|
-
payload:
|
|
562
|
-
});
|
|
563
|
-
OperationalStateSchema =
|
|
564
|
-
version:
|
|
565
|
-
activeAgents:
|
|
566
|
-
activeTaskIds:
|
|
567
|
-
blockers:
|
|
568
|
-
taskId:
|
|
569
|
-
reason:
|
|
570
|
-
since:
|
|
689
|
+
timestamp: z2.string(),
|
|
690
|
+
payload: z2.record(z2.string(), z2.unknown()).default({})
|
|
691
|
+
});
|
|
692
|
+
OperationalStateSchema = z2.object({
|
|
693
|
+
version: z2.literal(1),
|
|
694
|
+
activeAgents: z2.array(z2.string()).default([]),
|
|
695
|
+
activeTaskIds: z2.array(z2.string()).default([]),
|
|
696
|
+
blockers: z2.array(z2.object({
|
|
697
|
+
taskId: z2.string(),
|
|
698
|
+
reason: z2.string(),
|
|
699
|
+
since: z2.string()
|
|
571
700
|
})).default([]),
|
|
572
|
-
sprintFocus:
|
|
573
|
-
updatedAt:
|
|
574
|
-
});
|
|
575
|
-
StrategicMemorySchema =
|
|
576
|
-
version:
|
|
577
|
-
kpis:
|
|
578
|
-
name:
|
|
579
|
-
target:
|
|
580
|
-
current:
|
|
701
|
+
sprintFocus: z2.string().optional(),
|
|
702
|
+
updatedAt: z2.string()
|
|
703
|
+
});
|
|
704
|
+
StrategicMemorySchema = z2.object({
|
|
705
|
+
version: z2.literal(1),
|
|
706
|
+
kpis: z2.array(z2.object({
|
|
707
|
+
name: z2.string(),
|
|
708
|
+
target: z2.string(),
|
|
709
|
+
current: z2.string().optional()
|
|
581
710
|
})).default([]),
|
|
582
|
-
quarterlyFocus:
|
|
583
|
-
tradeoffs:
|
|
584
|
-
updatedAt:
|
|
585
|
-
});
|
|
586
|
-
ImpactReportSchema =
|
|
587
|
-
target:
|
|
588
|
-
brokenEndpoints:
|
|
589
|
-
brokenContracts:
|
|
590
|
-
affectedTests:
|
|
591
|
-
affectedFlows:
|
|
592
|
-
affectedComponents:
|
|
593
|
-
summary:
|
|
594
|
-
});
|
|
595
|
-
BusinessReviewOutputSchema =
|
|
596
|
-
status:
|
|
597
|
-
roiEstimate:
|
|
598
|
-
userImpact:
|
|
599
|
-
eliminationRisk:
|
|
600
|
-
questions:
|
|
601
|
-
confidence:
|
|
602
|
-
});
|
|
603
|
-
VerificationReportSchema =
|
|
604
|
-
taskId:
|
|
605
|
-
passed:
|
|
606
|
-
checks:
|
|
607
|
-
name:
|
|
608
|
-
passed:
|
|
609
|
-
message:
|
|
711
|
+
quarterlyFocus: z2.string().optional(),
|
|
712
|
+
tradeoffs: z2.array(z2.string()).default([]),
|
|
713
|
+
updatedAt: z2.string()
|
|
714
|
+
});
|
|
715
|
+
ImpactReportSchema = z2.object({
|
|
716
|
+
target: z2.string(),
|
|
717
|
+
brokenEndpoints: z2.array(z2.string()).default([]),
|
|
718
|
+
brokenContracts: z2.array(z2.string()).default([]),
|
|
719
|
+
affectedTests: z2.array(z2.string()).default([]),
|
|
720
|
+
affectedFlows: z2.array(z2.string()).default([]),
|
|
721
|
+
affectedComponents: z2.array(z2.string()).default([]),
|
|
722
|
+
summary: z2.string()
|
|
723
|
+
});
|
|
724
|
+
BusinessReviewOutputSchema = z2.object({
|
|
725
|
+
status: z2.enum(["proceed", "defer", "reject"]),
|
|
726
|
+
roiEstimate: z2.string().optional(),
|
|
727
|
+
userImpact: z2.string().optional(),
|
|
728
|
+
eliminationRisk: z2.string().optional(),
|
|
729
|
+
questions: z2.array(z2.string()).default([]),
|
|
730
|
+
confidence: z2.number().min(0).max(1)
|
|
731
|
+
});
|
|
732
|
+
VerificationReportSchema = z2.object({
|
|
733
|
+
taskId: z2.string(),
|
|
734
|
+
passed: z2.boolean(),
|
|
735
|
+
checks: z2.array(z2.object({
|
|
736
|
+
name: z2.string(),
|
|
737
|
+
passed: z2.boolean(),
|
|
738
|
+
message: z2.string()
|
|
610
739
|
})),
|
|
611
|
-
evidenceIds:
|
|
612
|
-
confidence:
|
|
740
|
+
evidenceIds: z2.array(z2.string()).default([]),
|
|
741
|
+
confidence: z2.number().min(0).max(1)
|
|
613
742
|
});
|
|
614
|
-
BacklogStatusSchema =
|
|
743
|
+
BacklogStatusSchema = z2.enum([
|
|
615
744
|
"TODO",
|
|
616
745
|
"READY",
|
|
617
746
|
"PLANNED",
|
|
@@ -620,89 +749,89 @@ var init_schemas = __esm(() => {
|
|
|
620
749
|
"REVIEW",
|
|
621
750
|
"DONE"
|
|
622
751
|
]);
|
|
623
|
-
BacklogTypeSchema =
|
|
624
|
-
BacklogPrioritySchema =
|
|
625
|
-
BacklogGlobalSchema =
|
|
626
|
-
product:
|
|
627
|
-
strategy:
|
|
628
|
-
policy:
|
|
629
|
-
reviewRequired:
|
|
630
|
-
tddRequired:
|
|
631
|
-
});
|
|
632
|
-
BacklogItemSchema =
|
|
633
|
-
id:
|
|
634
|
-
title:
|
|
752
|
+
BacklogTypeSchema = z2.enum(["feature", "bug", "refactor", "tech-debt"]);
|
|
753
|
+
BacklogPrioritySchema = z2.enum(["P0", "P1", "P2", "P3"]);
|
|
754
|
+
BacklogGlobalSchema = z2.object({
|
|
755
|
+
product: z2.string().min(1),
|
|
756
|
+
strategy: z2.string().min(1),
|
|
757
|
+
policy: z2.string().min(1),
|
|
758
|
+
reviewRequired: z2.boolean(),
|
|
759
|
+
tddRequired: z2.boolean()
|
|
760
|
+
});
|
|
761
|
+
BacklogItemSchema = z2.object({
|
|
762
|
+
id: z2.string().regex(/^BC-\d{3,}$/),
|
|
763
|
+
title: z2.string().min(1),
|
|
635
764
|
priority: BacklogPrioritySchema,
|
|
636
765
|
status: BacklogStatusSchema,
|
|
637
766
|
type: BacklogTypeSchema,
|
|
638
|
-
owner:
|
|
639
|
-
dependencies:
|
|
640
|
-
description:
|
|
641
|
-
scope:
|
|
642
|
-
outOfScope:
|
|
643
|
-
businessValue:
|
|
644
|
-
acceptanceCriteria:
|
|
645
|
-
risks:
|
|
646
|
-
progress:
|
|
647
|
-
branch:
|
|
648
|
-
reviewer:
|
|
649
|
-
lastUpdate:
|
|
650
|
-
});
|
|
651
|
-
BacklogDocumentSchema =
|
|
767
|
+
owner: z2.string().optional(),
|
|
768
|
+
dependencies: z2.array(z2.string()).default([]),
|
|
769
|
+
description: z2.string().min(1),
|
|
770
|
+
scope: z2.string().min(1),
|
|
771
|
+
outOfScope: z2.string().default(""),
|
|
772
|
+
businessValue: z2.string().optional(),
|
|
773
|
+
acceptanceCriteria: z2.array(z2.string().min(1)).min(1),
|
|
774
|
+
risks: z2.string().optional(),
|
|
775
|
+
progress: z2.number().int().min(0).max(100),
|
|
776
|
+
branch: z2.string().optional(),
|
|
777
|
+
reviewer: z2.string().optional(),
|
|
778
|
+
lastUpdate: z2.string().optional()
|
|
779
|
+
});
|
|
780
|
+
BacklogDocumentSchema = z2.object({
|
|
652
781
|
global: BacklogGlobalSchema,
|
|
653
|
-
items:
|
|
654
|
-
archive:
|
|
782
|
+
items: z2.array(BacklogItemSchema),
|
|
783
|
+
archive: z2.array(BacklogItemSchema).default([])
|
|
655
784
|
});
|
|
656
|
-
OpenspecTaskCardPhaseSchema =
|
|
785
|
+
OpenspecTaskCardPhaseSchema = z2.enum([
|
|
657
786
|
"discover",
|
|
658
787
|
"design",
|
|
659
788
|
"implement",
|
|
660
789
|
"test",
|
|
661
790
|
"review"
|
|
662
791
|
]);
|
|
663
|
-
OpenspecTaskCardStatusSchema =
|
|
664
|
-
OpenspecTaskCardSchema =
|
|
665
|
-
id:
|
|
666
|
-
backlogId:
|
|
792
|
+
OpenspecTaskCardStatusSchema = z2.enum(["pending", "doing", "blocked", "done"]);
|
|
793
|
+
OpenspecTaskCardSchema = z2.object({
|
|
794
|
+
id: z2.string(),
|
|
795
|
+
backlogId: z2.string(),
|
|
667
796
|
phase: OpenspecTaskCardPhaseSchema,
|
|
668
|
-
title:
|
|
669
|
-
prompt:
|
|
670
|
-
agent:
|
|
671
|
-
modelHint:
|
|
672
|
-
dependsOn:
|
|
673
|
-
acceptanceCriteria:
|
|
797
|
+
title: z2.string(),
|
|
798
|
+
prompt: z2.string(),
|
|
799
|
+
agent: z2.string(),
|
|
800
|
+
modelHint: z2.string().optional(),
|
|
801
|
+
dependsOn: z2.array(z2.string()).default([]),
|
|
802
|
+
acceptanceCriteria: z2.array(z2.string()),
|
|
674
803
|
status: OpenspecTaskCardStatusSchema,
|
|
675
|
-
itemHash:
|
|
676
|
-
});
|
|
677
|
-
OpenspecStateSchema =
|
|
678
|
-
version:
|
|
679
|
-
activeItemId:
|
|
680
|
-
taskCards:
|
|
681
|
-
lastScanHash:
|
|
682
|
-
lastScanAt:
|
|
683
|
-
changePaths:
|
|
684
|
-
itemSnapshots:
|
|
685
|
-
itemBaseCommits:
|
|
686
|
-
});
|
|
687
|
-
SpecAnalyzeFindingSchema =
|
|
688
|
-
severity:
|
|
689
|
-
code:
|
|
690
|
-
message:
|
|
691
|
-
});
|
|
692
|
-
SpecAnalyzeReportSchema =
|
|
693
|
-
changePath:
|
|
694
|
-
frIds:
|
|
695
|
-
scIds:
|
|
696
|
-
mappedFr:
|
|
697
|
-
mappedSc:
|
|
698
|
-
mappedToTests:
|
|
699
|
-
frCoveragePct:
|
|
700
|
-
scCoveragePct:
|
|
701
|
-
testCoveragePct:
|
|
702
|
-
findings:
|
|
703
|
-
stop:
|
|
704
|
-
});
|
|
705
|
-
WorkflowCommandSchema =
|
|
804
|
+
itemHash: z2.string().optional()
|
|
805
|
+
});
|
|
806
|
+
OpenspecStateSchema = z2.object({
|
|
807
|
+
version: z2.literal(1),
|
|
808
|
+
activeItemId: z2.string().optional(),
|
|
809
|
+
taskCards: z2.array(OpenspecTaskCardSchema).default([]),
|
|
810
|
+
lastScanHash: z2.string().optional(),
|
|
811
|
+
lastScanAt: z2.string().optional(),
|
|
812
|
+
changePaths: z2.record(z2.string(), z2.string()).optional().default({}),
|
|
813
|
+
itemSnapshots: z2.record(z2.string(), z2.string()).optional().default({}),
|
|
814
|
+
itemBaseCommits: z2.record(z2.string(), z2.string()).optional()
|
|
815
|
+
});
|
|
816
|
+
SpecAnalyzeFindingSchema = z2.object({
|
|
817
|
+
severity: z2.enum(["CRITICAL", "HIGH", "MEDIUM", "LOW"]),
|
|
818
|
+
code: z2.string(),
|
|
819
|
+
message: z2.string()
|
|
820
|
+
});
|
|
821
|
+
SpecAnalyzeReportSchema = z2.object({
|
|
822
|
+
changePath: z2.string(),
|
|
823
|
+
frIds: z2.array(z2.string()),
|
|
824
|
+
scIds: z2.array(z2.string()),
|
|
825
|
+
mappedFr: z2.array(z2.string()),
|
|
826
|
+
mappedSc: z2.array(z2.string()),
|
|
827
|
+
mappedToTests: z2.array(z2.string()),
|
|
828
|
+
frCoveragePct: z2.number(),
|
|
829
|
+
scCoveragePct: z2.number(),
|
|
830
|
+
testCoveragePct: z2.number(),
|
|
831
|
+
findings: z2.array(SpecAnalyzeFindingSchema),
|
|
832
|
+
stop: z2.boolean()
|
|
833
|
+
});
|
|
834
|
+
WorkflowCommandSchema = z2.enum([
|
|
706
835
|
"feature",
|
|
707
836
|
"fix",
|
|
708
837
|
"refactor",
|
|
@@ -726,148 +855,149 @@ var init_schemas = __esm(() => {
|
|
|
726
855
|
"security",
|
|
727
856
|
"odd"
|
|
728
857
|
]);
|
|
729
|
-
CcepOutputFormatSchema =
|
|
730
|
-
CommandEnvelopeSchema =
|
|
731
|
-
protocolVersion:
|
|
858
|
+
CcepOutputFormatSchema = z2.enum(["taskcard", "plan", "verdict"]);
|
|
859
|
+
CommandEnvelopeSchema = z2.object({
|
|
860
|
+
protocolVersion: z2.literal("ccep-1"),
|
|
732
861
|
command: WorkflowCommandSchema,
|
|
733
|
-
userRequest:
|
|
734
|
-
projectId:
|
|
735
|
-
repoContext:
|
|
736
|
-
domain:
|
|
737
|
-
stack:
|
|
738
|
-
existingModules:
|
|
739
|
-
architecture:
|
|
862
|
+
userRequest: z2.string(),
|
|
863
|
+
projectId: z2.string(),
|
|
864
|
+
repoContext: z2.object({
|
|
865
|
+
domain: z2.string().optional(),
|
|
866
|
+
stack: z2.array(z2.string()),
|
|
867
|
+
existingModules: z2.array(z2.string()).default([]),
|
|
868
|
+
architecture: z2.string().optional()
|
|
740
869
|
}),
|
|
741
|
-
constraints:
|
|
870
|
+
constraints: z2.object({
|
|
742
871
|
outputFormat: CcepOutputFormatSchema,
|
|
743
|
-
needConfirmation:
|
|
744
|
-
riskThreshold:
|
|
872
|
+
needConfirmation: z2.boolean(),
|
|
873
|
+
riskThreshold: z2.enum(["low", "medium", "high"])
|
|
745
874
|
}),
|
|
746
|
-
executionPolicy:
|
|
747
|
-
modelMode:
|
|
748
|
-
maxVariance:
|
|
875
|
+
executionPolicy: z2.object({
|
|
876
|
+
modelMode: z2.literal("structured"),
|
|
877
|
+
maxVariance: z2.literal("low")
|
|
749
878
|
})
|
|
750
879
|
});
|
|
751
|
-
WorkflowPhaseSchema =
|
|
752
|
-
id:
|
|
753
|
-
agent:
|
|
754
|
-
agents:
|
|
755
|
-
skill:
|
|
756
|
-
type:
|
|
757
|
-
outputSchema:
|
|
758
|
-
stopGate:
|
|
759
|
-
dependsOn:
|
|
760
|
-
requires:
|
|
761
|
-
parallelWith:
|
|
762
|
-
});
|
|
763
|
-
WorkflowRiskRuleSchema =
|
|
764
|
-
when:
|
|
765
|
-
risk:
|
|
766
|
-
|
|
767
|
-
|
|
880
|
+
WorkflowPhaseSchema = z2.object({
|
|
881
|
+
id: z2.string(),
|
|
882
|
+
agent: z2.string().optional(),
|
|
883
|
+
agents: z2.array(z2.string()).optional(),
|
|
884
|
+
skill: z2.string().optional(),
|
|
885
|
+
type: z2.string().optional(),
|
|
886
|
+
outputSchema: z2.string().optional(),
|
|
887
|
+
stopGate: z2.string().optional(),
|
|
888
|
+
dependsOn: z2.array(z2.string()).optional(),
|
|
889
|
+
requires: z2.string().optional(),
|
|
890
|
+
parallelWith: z2.array(z2.string()).optional()
|
|
891
|
+
});
|
|
892
|
+
WorkflowRiskRuleSchema = z2.object({
|
|
893
|
+
when: z2.object({
|
|
894
|
+
risk: z2.union([
|
|
895
|
+
z2.enum(["low", "medium", "high"]),
|
|
896
|
+
z2.array(z2.enum(["low", "medium", "high"]))
|
|
768
897
|
])
|
|
769
898
|
}),
|
|
770
|
-
then:
|
|
899
|
+
then: z2.array(z2.string())
|
|
771
900
|
});
|
|
772
|
-
WorkflowProfileSchema =
|
|
773
|
-
id:
|
|
774
|
-
version:
|
|
901
|
+
WorkflowProfileSchema = z2.object({
|
|
902
|
+
id: z2.string(),
|
|
903
|
+
version: z2.number().int().positive(),
|
|
775
904
|
command: WorkflowCommandSchema,
|
|
776
|
-
taskCard:
|
|
777
|
-
type:
|
|
778
|
-
requiredFields:
|
|
779
|
-
optionalFields:
|
|
905
|
+
taskCard: z2.object({
|
|
906
|
+
type: z2.string(),
|
|
907
|
+
requiredFields: z2.array(z2.string()),
|
|
908
|
+
optionalFields: z2.array(z2.string()).optional()
|
|
780
909
|
}).optional(),
|
|
781
|
-
intakeSchema:
|
|
782
|
-
phases:
|
|
783
|
-
routing:
|
|
784
|
-
default:
|
|
785
|
-
riskRules:
|
|
910
|
+
intakeSchema: z2.string().optional(),
|
|
911
|
+
phases: z2.array(WorkflowPhaseSchema),
|
|
912
|
+
routing: z2.object({
|
|
913
|
+
default: z2.array(z2.string()),
|
|
914
|
+
riskRules: z2.array(WorkflowRiskRuleSchema).optional()
|
|
786
915
|
}),
|
|
787
|
-
confirmationGate:
|
|
788
|
-
stopOnHighRisk:
|
|
789
|
-
stopOnQuestions:
|
|
916
|
+
confirmationGate: z2.object({
|
|
917
|
+
stopOnHighRisk: z2.boolean(),
|
|
918
|
+
stopOnQuestions: z2.boolean()
|
|
790
919
|
})
|
|
791
920
|
}).refine((profile) => profile.id === profile.command, {
|
|
792
921
|
message: "Workflow profile id must match command"
|
|
793
922
|
});
|
|
794
|
-
ExecutionContextSchema =
|
|
923
|
+
ExecutionContextSchema = z2.object({
|
|
795
924
|
envelope: CommandEnvelopeSchema,
|
|
796
925
|
profile: WorkflowProfileSchema,
|
|
797
|
-
intent:
|
|
926
|
+
intent: z2.object({
|
|
798
927
|
type: WorkflowCommandSchema,
|
|
799
|
-
goal:
|
|
800
|
-
domain:
|
|
801
|
-
entity:
|
|
802
|
-
operation:
|
|
928
|
+
goal: z2.string(),
|
|
929
|
+
domain: z2.string().optional(),
|
|
930
|
+
entity: z2.string().optional(),
|
|
931
|
+
operation: z2.string().optional()
|
|
803
932
|
}),
|
|
804
|
-
project:
|
|
805
|
-
name:
|
|
806
|
-
rootDir:
|
|
807
|
-
stack:
|
|
933
|
+
project: z2.object({
|
|
934
|
+
name: z2.string(),
|
|
935
|
+
rootDir: z2.string(),
|
|
936
|
+
stack: z2.array(z2.string()).optional()
|
|
808
937
|
}),
|
|
809
|
-
knowledge:
|
|
810
|
-
ast:
|
|
811
|
-
source:
|
|
812
|
-
confidence:
|
|
813
|
-
domains:
|
|
814
|
-
rules:
|
|
938
|
+
knowledge: z2.record(z2.string(), z2.unknown()).default({}),
|
|
939
|
+
ast: z2.object({
|
|
940
|
+
source: z2.enum(["detect", "graphify", "manual", "product-graph"]),
|
|
941
|
+
confidence: z2.enum(["low", "medium", "high"]),
|
|
942
|
+
domains: z2.array(z2.unknown()).optional(),
|
|
943
|
+
rules: z2.array(z2.string()).optional()
|
|
815
944
|
}),
|
|
816
|
-
policies:
|
|
817
|
-
architecture:
|
|
818
|
-
testing:
|
|
819
|
-
documentation:
|
|
820
|
-
breakingChanges:
|
|
945
|
+
policies: z2.object({
|
|
946
|
+
architecture: z2.string(),
|
|
947
|
+
testing: z2.string(),
|
|
948
|
+
documentation: z2.string(),
|
|
949
|
+
breakingChanges: z2.string()
|
|
821
950
|
}),
|
|
822
|
-
currentPhase:
|
|
823
|
-
outputSchema:
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
951
|
+
currentPhase: z2.string().optional(),
|
|
952
|
+
outputSchema: z2.string(),
|
|
953
|
+
scopedContext: ScopedContextSchema.optional()
|
|
954
|
+
});
|
|
955
|
+
PlannerOutputSchema = z2.object({
|
|
956
|
+
status: z2.enum(["success", "needs_clarification"]),
|
|
957
|
+
confidence: z2.number().min(0).max(1),
|
|
958
|
+
goal: z2.string(),
|
|
959
|
+
assumptions: z2.array(z2.string()),
|
|
960
|
+
risks: z2.array(z2.object({
|
|
961
|
+
type: z2.string(),
|
|
962
|
+
description: z2.string(),
|
|
963
|
+
severity: z2.enum(["low", "medium", "high"])
|
|
834
964
|
})),
|
|
835
|
-
tasks:
|
|
836
|
-
id:
|
|
837
|
-
title:
|
|
838
|
-
priority:
|
|
839
|
-
estimate:
|
|
840
|
-
dependencies:
|
|
965
|
+
tasks: z2.array(z2.object({
|
|
966
|
+
id: z2.string(),
|
|
967
|
+
title: z2.string(),
|
|
968
|
+
priority: z2.string(),
|
|
969
|
+
estimate: z2.string(),
|
|
970
|
+
dependencies: z2.array(z2.string())
|
|
841
971
|
})),
|
|
842
|
-
questionsForUser:
|
|
843
|
-
needsConfirmation:
|
|
844
|
-
});
|
|
845
|
-
AgentArtifactSchema =
|
|
846
|
-
type:
|
|
847
|
-
path:
|
|
848
|
-
content:
|
|
849
|
-
});
|
|
850
|
-
AgentOutputSchema =
|
|
851
|
-
status:
|
|
852
|
-
confidence:
|
|
853
|
-
warnings:
|
|
854
|
-
artifacts:
|
|
855
|
-
next_actions:
|
|
856
|
-
});
|
|
857
|
-
ImplementerTestsSchema =
|
|
858
|
-
runner:
|
|
859
|
-
result:
|
|
860
|
-
failedTests:
|
|
972
|
+
questionsForUser: z2.array(z2.string()),
|
|
973
|
+
needsConfirmation: z2.boolean()
|
|
974
|
+
});
|
|
975
|
+
AgentArtifactSchema = z2.object({
|
|
976
|
+
type: z2.string(),
|
|
977
|
+
path: z2.string().optional(),
|
|
978
|
+
content: z2.string().optional()
|
|
979
|
+
});
|
|
980
|
+
AgentOutputSchema = z2.object({
|
|
981
|
+
status: z2.enum(["success", "failure", "blocked", "needs_clarification"]),
|
|
982
|
+
confidence: z2.number().min(0).max(1),
|
|
983
|
+
warnings: z2.array(z2.string()).default([]),
|
|
984
|
+
artifacts: z2.array(AgentArtifactSchema).default([]),
|
|
985
|
+
next_actions: z2.array(z2.string()).default([])
|
|
986
|
+
});
|
|
987
|
+
ImplementerTestsSchema = z2.object({
|
|
988
|
+
runner: z2.string(),
|
|
989
|
+
result: z2.enum(["passed", "failed"]),
|
|
990
|
+
failedTests: z2.array(z2.string()).optional()
|
|
861
991
|
});
|
|
862
992
|
ImplementerOutputSchema = AgentOutputSchema.extend({
|
|
863
|
-
status:
|
|
864
|
-
filesChanged:
|
|
865
|
-
path:
|
|
866
|
-
summary:
|
|
993
|
+
status: z2.enum(["success", "failure", "blocked"]),
|
|
994
|
+
filesChanged: z2.array(z2.object({
|
|
995
|
+
path: z2.string(),
|
|
996
|
+
summary: z2.string()
|
|
867
997
|
})).default([]),
|
|
868
998
|
tests: ImplementerTestsSchema.optional()
|
|
869
999
|
});
|
|
870
|
-
ReviewAxisSchema =
|
|
1000
|
+
ReviewAxisSchema = z2.enum([
|
|
871
1001
|
"complexity",
|
|
872
1002
|
"cost",
|
|
873
1003
|
"performance",
|
|
@@ -876,35 +1006,35 @@ var init_schemas = __esm(() => {
|
|
|
876
1006
|
"scalability",
|
|
877
1007
|
"style"
|
|
878
1008
|
]);
|
|
879
|
-
ReviewFindingSchema =
|
|
880
|
-
severity:
|
|
881
|
-
message:
|
|
882
|
-
axis:
|
|
883
|
-
path:
|
|
884
|
-
line:
|
|
885
|
-
});
|
|
886
|
-
ReviewerOutputSchema =
|
|
887
|
-
status:
|
|
888
|
-
confidence:
|
|
889
|
-
verdict:
|
|
890
|
-
warnings:
|
|
891
|
-
findings:
|
|
892
|
-
artifacts:
|
|
893
|
-
next_actions:
|
|
894
|
-
});
|
|
895
|
-
TechnicalPlanOutputSchema =
|
|
896
|
-
approach:
|
|
897
|
-
filesAffected:
|
|
898
|
-
risks:
|
|
899
|
-
openQuestions:
|
|
900
|
-
});
|
|
901
|
-
FixIntakeOutputSchema =
|
|
902
|
-
actualBehavior:
|
|
903
|
-
expectedBehavior:
|
|
904
|
-
reproductionSteps:
|
|
905
|
-
});
|
|
906
|
-
ScorecardVerdictSchema =
|
|
907
|
-
ScorecardCriterionIdSchema =
|
|
1009
|
+
ReviewFindingSchema = z2.object({
|
|
1010
|
+
severity: z2.enum(["CRITICAL", "WARNING", "SUGGESTION"]),
|
|
1011
|
+
message: z2.string(),
|
|
1012
|
+
axis: z2.union([ReviewAxisSchema, z2.string()]),
|
|
1013
|
+
path: z2.string().optional(),
|
|
1014
|
+
line: z2.number().int().optional()
|
|
1015
|
+
});
|
|
1016
|
+
ReviewerOutputSchema = z2.object({
|
|
1017
|
+
status: z2.enum(["pass", "fail"]),
|
|
1018
|
+
confidence: z2.number().min(0).max(1),
|
|
1019
|
+
verdict: z2.enum(["approved", "approved_with_warnings", "blocked"]),
|
|
1020
|
+
warnings: z2.array(z2.string()).default([]),
|
|
1021
|
+
findings: z2.array(ReviewFindingSchema).default([]),
|
|
1022
|
+
artifacts: z2.array(AgentArtifactSchema).default([]),
|
|
1023
|
+
next_actions: z2.array(z2.string()).default([])
|
|
1024
|
+
});
|
|
1025
|
+
TechnicalPlanOutputSchema = z2.object({
|
|
1026
|
+
approach: z2.string(),
|
|
1027
|
+
filesAffected: z2.array(z2.string()).default([]),
|
|
1028
|
+
risks: z2.array(z2.string()).default([]),
|
|
1029
|
+
openQuestions: z2.array(z2.string()).optional()
|
|
1030
|
+
});
|
|
1031
|
+
FixIntakeOutputSchema = z2.object({
|
|
1032
|
+
actualBehavior: z2.string(),
|
|
1033
|
+
expectedBehavior: z2.string(),
|
|
1034
|
+
reproductionSteps: z2.array(z2.string())
|
|
1035
|
+
});
|
|
1036
|
+
ScorecardVerdictSchema = z2.enum(["PASS", "REVISE", "REJECT"]);
|
|
1037
|
+
ScorecardCriterionIdSchema = z2.enum([
|
|
908
1038
|
"acceptance",
|
|
909
1039
|
"minimal_diff",
|
|
910
1040
|
"tests",
|
|
@@ -914,140 +1044,140 @@ var init_schemas = __esm(() => {
|
|
|
914
1044
|
"context_discipline",
|
|
915
1045
|
"cc_gain"
|
|
916
1046
|
]);
|
|
917
|
-
ScorecardCriterionSchema =
|
|
1047
|
+
ScorecardCriterionSchema = z2.object({
|
|
918
1048
|
id: ScorecardCriterionIdSchema,
|
|
919
|
-
label:
|
|
920
|
-
weight:
|
|
921
|
-
score:
|
|
922
|
-
unmeasured:
|
|
923
|
-
notes:
|
|
924
|
-
autoSuggested:
|
|
925
|
-
});
|
|
926
|
-
ScorecardRecordSchema =
|
|
927
|
-
id:
|
|
928
|
-
taskId:
|
|
929
|
-
agent:
|
|
930
|
-
model:
|
|
931
|
-
contractVersion:
|
|
932
|
-
evaluator:
|
|
933
|
-
criteria:
|
|
934
|
-
weightedScore:
|
|
1049
|
+
label: z2.string(),
|
|
1050
|
+
weight: z2.number().min(0).max(1),
|
|
1051
|
+
score: z2.number().int().min(0).max(3).nullable(),
|
|
1052
|
+
unmeasured: z2.boolean().optional(),
|
|
1053
|
+
notes: z2.string().optional(),
|
|
1054
|
+
autoSuggested: z2.boolean().optional()
|
|
1055
|
+
});
|
|
1056
|
+
ScorecardRecordSchema = z2.object({
|
|
1057
|
+
id: z2.string(),
|
|
1058
|
+
taskId: z2.string(),
|
|
1059
|
+
agent: z2.string(),
|
|
1060
|
+
model: z2.string().optional(),
|
|
1061
|
+
contractVersion: z2.string(),
|
|
1062
|
+
evaluator: z2.string().optional(),
|
|
1063
|
+
criteria: z2.array(ScorecardCriterionSchema),
|
|
1064
|
+
weightedScore: z2.number(),
|
|
935
1065
|
verdict: ScorecardVerdictSchema,
|
|
936
|
-
findings:
|
|
937
|
-
createdAt:
|
|
938
|
-
backlogId:
|
|
939
|
-
source:
|
|
1066
|
+
findings: z2.array(z2.string()).optional().default([]),
|
|
1067
|
+
createdAt: z2.string(),
|
|
1068
|
+
backlogId: z2.string().optional(),
|
|
1069
|
+
source: z2.enum(["openspec", "review", "manual", "pipeline"]).optional()
|
|
940
1070
|
});
|
|
941
|
-
TaskOutcomeSourceSchema =
|
|
942
|
-
TaskOutcomeStatusSchema =
|
|
1071
|
+
TaskOutcomeSourceSchema = z2.enum(["openspec", "review", "manual", "pipeline"]);
|
|
1072
|
+
TaskOutcomeStatusSchema = z2.enum([
|
|
943
1073
|
"phase_done",
|
|
944
1074
|
"phase_failed",
|
|
945
1075
|
"pass",
|
|
946
1076
|
"revise",
|
|
947
1077
|
"reject"
|
|
948
1078
|
]);
|
|
949
|
-
DeliveryRouteSchema =
|
|
950
|
-
TokenUsageSchema =
|
|
951
|
-
|
|
952
|
-
status:
|
|
953
|
-
total:
|
|
1079
|
+
DeliveryRouteSchema = z2.enum(["read-only", "small", "tracked", "openspec"]);
|
|
1080
|
+
TokenUsageSchema = z2.union([
|
|
1081
|
+
z2.object({
|
|
1082
|
+
status: z2.literal("known"),
|
|
1083
|
+
total: z2.number().nonnegative()
|
|
954
1084
|
}),
|
|
955
|
-
|
|
1085
|
+
z2.object({ status: z2.literal("unknown") })
|
|
956
1086
|
]);
|
|
957
|
-
DeliveryTelemetrySchema =
|
|
1087
|
+
DeliveryTelemetrySchema = z2.object({
|
|
958
1088
|
route: DeliveryRouteSchema,
|
|
959
|
-
contextBytes:
|
|
960
|
-
handoffs:
|
|
961
|
-
checks:
|
|
1089
|
+
contextBytes: z2.number().int().nonnegative().optional(),
|
|
1090
|
+
handoffs: z2.number().int().nonnegative().optional(),
|
|
1091
|
+
checks: z2.array(z2.string().min(1)).optional(),
|
|
962
1092
|
tokenUsage: TokenUsageSchema
|
|
963
1093
|
});
|
|
964
|
-
DeliveryLedgerTaskSchema =
|
|
965
|
-
id:
|
|
966
|
-
title:
|
|
967
|
-
status:
|
|
1094
|
+
DeliveryLedgerTaskSchema = z2.object({
|
|
1095
|
+
id: z2.string().min(1),
|
|
1096
|
+
title: z2.string().min(1),
|
|
1097
|
+
status: z2.enum(["pending", "done", "blocked"])
|
|
968
1098
|
});
|
|
969
|
-
DeliveryLedgerSchema =
|
|
970
|
-
version:
|
|
971
|
-
id:
|
|
1099
|
+
DeliveryLedgerSchema = z2.object({
|
|
1100
|
+
version: z2.literal(1),
|
|
1101
|
+
id: z2.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/),
|
|
972
1102
|
taskCard: CanonicalTaskCardSchema,
|
|
973
|
-
tasks:
|
|
974
|
-
evidence:
|
|
975
|
-
nextStep:
|
|
976
|
-
memoryTopicKey:
|
|
977
|
-
workspace:
|
|
978
|
-
technicalPlanPath:
|
|
979
|
-
createdAt:
|
|
980
|
-
updatedAt:
|
|
981
|
-
});
|
|
982
|
-
HandoffEnvelopeSchema =
|
|
983
|
-
version:
|
|
984
|
-
task:
|
|
985
|
-
id:
|
|
986
|
-
objective:
|
|
987
|
-
acceptanceCriteria:
|
|
1103
|
+
tasks: z2.array(DeliveryLedgerTaskSchema).min(1),
|
|
1104
|
+
evidence: z2.array(z2.string().min(1)),
|
|
1105
|
+
nextStep: z2.string().min(1),
|
|
1106
|
+
memoryTopicKey: z2.string().min(1),
|
|
1107
|
+
workspace: z2.record(z2.string(), z2.string()),
|
|
1108
|
+
technicalPlanPath: z2.string().min(1).optional(),
|
|
1109
|
+
createdAt: z2.string().datetime(),
|
|
1110
|
+
updatedAt: z2.string().datetime()
|
|
1111
|
+
});
|
|
1112
|
+
HandoffEnvelopeSchema = z2.object({
|
|
1113
|
+
version: z2.literal(1),
|
|
1114
|
+
task: z2.object({
|
|
1115
|
+
id: z2.string().min(1),
|
|
1116
|
+
objective: z2.string().min(1),
|
|
1117
|
+
acceptanceCriteria: z2.array(z2.string().min(1)),
|
|
988
1118
|
status: CanonicalTaskCardStatusSchema
|
|
989
1119
|
}),
|
|
990
|
-
decisions:
|
|
991
|
-
constraints:
|
|
992
|
-
unresolved:
|
|
1120
|
+
decisions: z2.object({
|
|
1121
|
+
constraints: z2.array(z2.string()),
|
|
1122
|
+
unresolved: z2.array(z2.string())
|
|
993
1123
|
}),
|
|
994
|
-
scope:
|
|
995
|
-
relevantFiles:
|
|
996
|
-
boundaries:
|
|
1124
|
+
scope: z2.object({
|
|
1125
|
+
relevantFiles: z2.array(z2.string()),
|
|
1126
|
+
boundaries: z2.array(z2.string())
|
|
997
1127
|
}),
|
|
998
|
-
verification:
|
|
999
|
-
evidence:
|
|
1128
|
+
verification: z2.object({
|
|
1129
|
+
evidence: z2.array(z2.string())
|
|
1000
1130
|
}),
|
|
1001
|
-
change:
|
|
1002
|
-
touchedFiles:
|
|
1131
|
+
change: z2.object({
|
|
1132
|
+
touchedFiles: z2.array(z2.string())
|
|
1003
1133
|
}),
|
|
1004
|
-
next:
|
|
1005
|
-
role:
|
|
1006
|
-
objective:
|
|
1134
|
+
next: z2.object({
|
|
1135
|
+
role: z2.string().min(1),
|
|
1136
|
+
objective: z2.string().min(1)
|
|
1007
1137
|
}),
|
|
1008
|
-
sources:
|
|
1009
|
-
deliveryLedger:
|
|
1010
|
-
memoryTopicKey:
|
|
1011
|
-
technicalPlanPath:
|
|
1138
|
+
sources: z2.object({
|
|
1139
|
+
deliveryLedger: z2.string().min(1),
|
|
1140
|
+
memoryTopicKey: z2.string().min(1),
|
|
1141
|
+
technicalPlanPath: z2.string().min(1).optional()
|
|
1012
1142
|
})
|
|
1013
1143
|
});
|
|
1014
|
-
RepoRelativePathSchema =
|
|
1015
|
-
DeliveryLedgerRequestSchema =
|
|
1016
|
-
id:
|
|
1017
|
-
authorized:
|
|
1144
|
+
RepoRelativePathSchema = z2.string().min(1).refine((path) => !/^([/\\]|[A-Za-z]:)/.test(path) && !path.split(/[/\\]/).includes(".."), 'Path must be relative to the repository and must not contain ".." segments');
|
|
1145
|
+
DeliveryLedgerRequestSchema = z2.object({
|
|
1146
|
+
id: z2.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/),
|
|
1147
|
+
authorized: z2.boolean(),
|
|
1018
1148
|
route: DeliveryRouteSchema,
|
|
1019
1149
|
taskCard: CanonicalTaskCardSchema,
|
|
1020
|
-
tasks:
|
|
1021
|
-
nextStep:
|
|
1150
|
+
tasks: z2.array(DeliveryLedgerTaskSchema).min(1),
|
|
1151
|
+
nextStep: z2.string().min(1),
|
|
1022
1152
|
technicalPlanPath: RepoRelativePathSchema.optional()
|
|
1023
1153
|
});
|
|
1024
|
-
TaskOutcomeSchema =
|
|
1025
|
-
id:
|
|
1026
|
-
taskId:
|
|
1154
|
+
TaskOutcomeSchema = z2.object({
|
|
1155
|
+
id: z2.string(),
|
|
1156
|
+
taskId: z2.string(),
|
|
1027
1157
|
source: TaskOutcomeSourceSchema,
|
|
1028
|
-
agent:
|
|
1029
|
-
model:
|
|
1030
|
-
contractVersion:
|
|
1031
|
-
timestamp:
|
|
1158
|
+
agent: z2.string(),
|
|
1159
|
+
model: z2.string(),
|
|
1160
|
+
contractVersion: z2.string(),
|
|
1161
|
+
timestamp: z2.string(),
|
|
1032
1162
|
status: TaskOutcomeStatusSchema.optional(),
|
|
1033
1163
|
verdict: ScorecardVerdictSchema.optional(),
|
|
1034
|
-
weightedScore:
|
|
1035
|
-
taskCardId:
|
|
1036
|
-
backlogId:
|
|
1037
|
-
phase:
|
|
1038
|
-
scorecardId:
|
|
1039
|
-
tokensIn:
|
|
1040
|
-
tokensOut:
|
|
1041
|
-
costUsd:
|
|
1042
|
-
durationMs:
|
|
1043
|
-
experimentId:
|
|
1044
|
-
variantId:
|
|
1045
|
-
suiteTaskId:
|
|
1046
|
-
harnessFingerprint:
|
|
1047
|
-
disabledComponents:
|
|
1164
|
+
weightedScore: z2.number().optional(),
|
|
1165
|
+
taskCardId: z2.string().optional(),
|
|
1166
|
+
backlogId: z2.string().optional(),
|
|
1167
|
+
phase: z2.string().optional(),
|
|
1168
|
+
scorecardId: z2.string().optional(),
|
|
1169
|
+
tokensIn: z2.number().optional(),
|
|
1170
|
+
tokensOut: z2.number().optional(),
|
|
1171
|
+
costUsd: z2.number().optional(),
|
|
1172
|
+
durationMs: z2.number().optional(),
|
|
1173
|
+
experimentId: z2.string().optional(),
|
|
1174
|
+
variantId: z2.string().optional(),
|
|
1175
|
+
suiteTaskId: z2.string().optional(),
|
|
1176
|
+
harnessFingerprint: z2.string().optional(),
|
|
1177
|
+
disabledComponents: z2.array(z2.string()).optional(),
|
|
1048
1178
|
delivery: DeliveryTelemetrySchema.optional()
|
|
1049
1179
|
});
|
|
1050
|
-
HarnessComponentIdSchema =
|
|
1180
|
+
HarnessComponentIdSchema = z2.enum([
|
|
1051
1181
|
"wayfinding",
|
|
1052
1182
|
"intake",
|
|
1053
1183
|
"design",
|
|
@@ -1059,86 +1189,86 @@ var init_schemas = __esm(() => {
|
|
|
1059
1189
|
"council",
|
|
1060
1190
|
"product_graph"
|
|
1061
1191
|
]);
|
|
1062
|
-
HarnessComponentLayerSchema =
|
|
1192
|
+
HarnessComponentLayerSchema = z2.enum([
|
|
1063
1193
|
"phase",
|
|
1064
1194
|
"gate",
|
|
1065
1195
|
"loop",
|
|
1066
1196
|
"knowledge",
|
|
1067
1197
|
"council"
|
|
1068
1198
|
]);
|
|
1069
|
-
HarnessToggleKindSchema =
|
|
1199
|
+
HarnessToggleKindSchema = z2.enum([
|
|
1070
1200
|
"ccep_phase",
|
|
1071
1201
|
"ccep_gates",
|
|
1072
1202
|
"config_loop",
|
|
1073
1203
|
"config_council",
|
|
1074
1204
|
"product_graph"
|
|
1075
1205
|
]);
|
|
1076
|
-
HarnessCatalogEntrySchema =
|
|
1206
|
+
HarnessCatalogEntrySchema = z2.object({
|
|
1077
1207
|
id: HarnessComponentIdSchema,
|
|
1078
1208
|
layer: HarnessComponentLayerSchema,
|
|
1079
|
-
label:
|
|
1080
|
-
defaultOn:
|
|
1081
|
-
toggle:
|
|
1209
|
+
label: z2.string(),
|
|
1210
|
+
defaultOn: z2.boolean().default(true),
|
|
1211
|
+
toggle: z2.object({
|
|
1082
1212
|
kind: HarnessToggleKindSchema,
|
|
1083
|
-
phaseId:
|
|
1213
|
+
phaseId: z2.string().optional()
|
|
1084
1214
|
})
|
|
1085
1215
|
});
|
|
1086
|
-
HarnessCatalogSchema =
|
|
1087
|
-
version:
|
|
1088
|
-
components:
|
|
1089
|
-
});
|
|
1090
|
-
HarnessOverlaySchema =
|
|
1091
|
-
experimentId:
|
|
1092
|
-
variantId:
|
|
1093
|
-
disabledComponents:
|
|
1094
|
-
disableProductGraph:
|
|
1095
|
-
contractVersion:
|
|
1096
|
-
ccepProfile:
|
|
1097
|
-
});
|
|
1098
|
-
HarnessExperimentSchema =
|
|
1099
|
-
id:
|
|
1100
|
-
suiteId:
|
|
1101
|
-
createdAt:
|
|
1102
|
-
contractVersion:
|
|
1103
|
-
components:
|
|
1104
|
-
variants:
|
|
1105
|
-
suiteTaskIds:
|
|
1106
|
-
suitePath:
|
|
1107
|
-
});
|
|
1108
|
-
HarnessSuiteTaskSchema =
|
|
1109
|
-
id:
|
|
1110
|
-
title:
|
|
1111
|
-
type:
|
|
1112
|
-
risk:
|
|
1113
|
-
prompt:
|
|
1114
|
-
scope:
|
|
1115
|
-
acceptanceCriteria:
|
|
1116
|
-
testCommand:
|
|
1117
|
-
});
|
|
1118
|
-
HarnessSuiteSchema =
|
|
1119
|
-
id:
|
|
1120
|
-
version:
|
|
1121
|
-
fixtureDir:
|
|
1122
|
-
tasks:
|
|
1123
|
-
});
|
|
1124
|
-
EvaluationIndexSchema =
|
|
1125
|
-
version:
|
|
1126
|
-
lastOutcomeId:
|
|
1127
|
-
});
|
|
1128
|
-
ExecutionProfileNameSchema =
|
|
1129
|
-
ExecutionProfileSchema =
|
|
1216
|
+
HarnessCatalogSchema = z2.object({
|
|
1217
|
+
version: z2.literal(1),
|
|
1218
|
+
components: z2.array(HarnessCatalogEntrySchema).min(1)
|
|
1219
|
+
});
|
|
1220
|
+
HarnessOverlaySchema = z2.object({
|
|
1221
|
+
experimentId: z2.string().optional(),
|
|
1222
|
+
variantId: z2.string(),
|
|
1223
|
+
disabledComponents: z2.array(HarnessComponentIdSchema),
|
|
1224
|
+
disableProductGraph: z2.boolean().optional().default(false),
|
|
1225
|
+
contractVersion: z2.string().optional(),
|
|
1226
|
+
ccepProfile: z2.string().optional().default("feature")
|
|
1227
|
+
});
|
|
1228
|
+
HarnessExperimentSchema = z2.object({
|
|
1229
|
+
id: z2.string(),
|
|
1230
|
+
suiteId: z2.string(),
|
|
1231
|
+
createdAt: z2.string(),
|
|
1232
|
+
contractVersion: z2.string(),
|
|
1233
|
+
components: z2.array(HarnessComponentIdSchema),
|
|
1234
|
+
variants: z2.array(z2.string()).min(1),
|
|
1235
|
+
suiteTaskIds: z2.array(z2.string()),
|
|
1236
|
+
suitePath: z2.string().optional()
|
|
1237
|
+
});
|
|
1238
|
+
HarnessSuiteTaskSchema = z2.object({
|
|
1239
|
+
id: z2.string(),
|
|
1240
|
+
title: z2.string(),
|
|
1241
|
+
type: z2.enum(["feature", "fix", "refactor"]),
|
|
1242
|
+
risk: z2.enum(["low", "medium", "high"]).default("low"),
|
|
1243
|
+
prompt: z2.string(),
|
|
1244
|
+
scope: z2.string(),
|
|
1245
|
+
acceptanceCriteria: z2.array(z2.string()).min(1),
|
|
1246
|
+
testCommand: z2.string().optional()
|
|
1247
|
+
});
|
|
1248
|
+
HarnessSuiteSchema = z2.object({
|
|
1249
|
+
id: z2.string(),
|
|
1250
|
+
version: z2.number().int().positive(),
|
|
1251
|
+
fixtureDir: z2.string().optional(),
|
|
1252
|
+
tasks: z2.array(HarnessSuiteTaskSchema).min(1)
|
|
1253
|
+
});
|
|
1254
|
+
EvaluationIndexSchema = z2.object({
|
|
1255
|
+
version: z2.literal(1),
|
|
1256
|
+
lastOutcomeId: z2.string().optional()
|
|
1257
|
+
});
|
|
1258
|
+
ExecutionProfileNameSchema = z2.enum(["balanced", "quality", "economical"]);
|
|
1259
|
+
ExecutionProfileSchema = z2.object({
|
|
1130
1260
|
profile: ExecutionProfileNameSchema.default("balanced"),
|
|
1131
|
-
target:
|
|
1132
|
-
overrides:
|
|
1133
|
-
subagentPolicy:
|
|
1134
|
-
orchestrator:
|
|
1135
|
-
testerReviewer:
|
|
1261
|
+
target: z2.enum(INDIVIDUAL_TARGETS).optional(),
|
|
1262
|
+
overrides: z2.record(z2.string(), z2.string()).optional().default({}),
|
|
1263
|
+
subagentPolicy: z2.object({
|
|
1264
|
+
orchestrator: z2.enum(["primary", "delegate"]).optional(),
|
|
1265
|
+
testerReviewer: z2.enum(["primary", "delegate"]).optional()
|
|
1136
1266
|
}).optional()
|
|
1137
1267
|
});
|
|
1138
|
-
SkillsRegistrySchema =
|
|
1139
|
-
version:
|
|
1140
|
-
skills:
|
|
1141
|
-
version:
|
|
1268
|
+
SkillsRegistrySchema = z2.object({
|
|
1269
|
+
version: z2.literal(1),
|
|
1270
|
+
skills: z2.record(z2.string().min(1).regex(/^[a-z0-9\-]+$/), z2.object({
|
|
1271
|
+
version: z2.string().min(1)
|
|
1142
1272
|
}))
|
|
1143
1273
|
});
|
|
1144
1274
|
});
|
|
@@ -3261,6 +3391,7 @@ async function runLoopForProject(projectRoot, options) {
|
|
|
3261
3391
|
|
|
3262
3392
|
// src/index.ts
|
|
3263
3393
|
init_schemas();
|
|
3394
|
+
init_scoped_context_schemas();
|
|
3264
3395
|
export {
|
|
3265
3396
|
AgentArtifactSchema,
|
|
3266
3397
|
AgentContractSchema,
|
|
@@ -3282,6 +3413,7 @@ export {
|
|
|
3282
3413
|
CompileCheckConfigSchema,
|
|
3283
3414
|
ConfidenceLevelSchema,
|
|
3284
3415
|
ConsensusConfigSchema,
|
|
3416
|
+
ContextManifestSchema,
|
|
3285
3417
|
ContractFormatSchema,
|
|
3286
3418
|
ContractTargetSchema,
|
|
3287
3419
|
CouncilAgentSpecSchema,
|
|
@@ -3295,6 +3427,8 @@ export {
|
|
|
3295
3427
|
DeliveryLedgerTaskSchema,
|
|
3296
3428
|
DeliveryRouteSchema,
|
|
3297
3429
|
DeliveryTelemetrySchema,
|
|
3430
|
+
DependencyEvidenceSchema,
|
|
3431
|
+
DetectionStatusSchema,
|
|
3298
3432
|
EvaluationIndexSchema,
|
|
3299
3433
|
EvidenceSchema,
|
|
3300
3434
|
ExecutionContextSchema,
|
|
@@ -3332,6 +3466,7 @@ export {
|
|
|
3332
3466
|
OpenspecTaskCardSchema,
|
|
3333
3467
|
OpenspecTaskCardStatusSchema,
|
|
3334
3468
|
OperationalStateSchema,
|
|
3469
|
+
OriginClassSchema,
|
|
3335
3470
|
PermissionProviderNamesSchema,
|
|
3336
3471
|
PlannerOutputSchema,
|
|
3337
3472
|
ProductEventSchema,
|
|
@@ -3342,10 +3477,18 @@ export {
|
|
|
3342
3477
|
ProductMetaSchema,
|
|
3343
3478
|
ProductNodeTypeSchema,
|
|
3344
3479
|
ProjectProfileSchema,
|
|
3480
|
+
ProjectScopeProfileSchema,
|
|
3481
|
+
RecipeStatusSchema,
|
|
3482
|
+
RecipeStepSchema,
|
|
3345
3483
|
ReviewAxisSchema,
|
|
3346
3484
|
ReviewFindingSchema,
|
|
3347
3485
|
ReviewerOutputSchema,
|
|
3486
|
+
RuleKindSchema,
|
|
3487
|
+
RuleViewSchema,
|
|
3348
3488
|
RunnerTargetSchema,
|
|
3489
|
+
ScopedContextSchema,
|
|
3490
|
+
ScopedRuleFileSchema,
|
|
3491
|
+
ScopedRuleSchema,
|
|
3349
3492
|
ScorecardCriterionIdSchema,
|
|
3350
3493
|
ScorecardCriterionSchema,
|
|
3351
3494
|
ScorecardRecordSchema,
|
|
@@ -3365,6 +3508,7 @@ export {
|
|
|
3365
3508
|
TechnicalPlanOutputSchema,
|
|
3366
3509
|
TokenUsageSchema,
|
|
3367
3510
|
ToolProviderNamesSchema,
|
|
3511
|
+
VerificationRecipeSchema,
|
|
3368
3512
|
VerificationReportSchema,
|
|
3369
3513
|
WorkflowCommandSchema,
|
|
3370
3514
|
WorkflowPhaseSchema,
|