@ai-dev-orchestrator/schemas 0.1.1
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 +51 -0
- package/dist/artifacts/agreement-artifacts.d.ts +311 -0
- package/dist/artifacts/agreement-artifacts.js +48 -0
- package/dist/artifacts/artifact-dependency-graph.d.ts +775 -0
- package/dist/artifacts/artifact-dependency-graph.js +57 -0
- package/dist/artifacts/artifact-system.d.ts +657 -0
- package/dist/artifacts/artifact-system.js +124 -0
- package/dist/artifacts/index.d.ts +3 -0
- package/dist/artifacts/index.js +3 -0
- package/dist/config/configuration.d.ts +324 -0
- package/dist/config/configuration.js +93 -0
- package/dist/config/event-bus-config.d.ts +153 -0
- package/dist/config/event-bus-config.js +27 -0
- package/dist/config/event-payloads.d.ts +919 -0
- package/dist/config/event-payloads.js +304 -0
- package/dist/config/event-system.d.ts +3231 -0
- package/dist/config/event-system.js +428 -0
- package/dist/config/event-types.d.ts +62 -0
- package/dist/config/event-types.js +66 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.js +5 -0
- package/dist/dashboard/dashboard-api.d.ts +149 -0
- package/dist/dashboard/dashboard-api.js +80 -0
- package/dist/dashboard/dashboard-domain.d.ts +1076 -0
- package/dist/dashboard/dashboard-domain.js +305 -0
- package/dist/dashboard/index.d.ts +3 -0
- package/dist/dashboard/index.js +3 -0
- package/dist/dashboard/run-creation-params.d.ts +111 -0
- package/dist/dashboard/run-creation-params.js +14 -0
- package/dist/governance/governance.d.ts +1119 -0
- package/dist/governance/governance.js +111 -0
- package/dist/governance/index.d.ts +3 -0
- package/dist/governance/index.js +3 -0
- package/dist/governance/policy-engine.d.ts +634 -0
- package/dist/governance/policy-engine.js +214 -0
- package/dist/governance/review-resolution.d.ts +1053 -0
- package/dist/governance/review-resolution.js +67 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/observability/diagnostics.d.ts +185 -0
- package/dist/observability/diagnostics.js +63 -0
- package/dist/observability/index.d.ts +2 -0
- package/dist/observability/index.js +2 -0
- package/dist/observability/metrics.d.ts +187 -0
- package/dist/observability/metrics.js +67 -0
- package/dist/persistence/execution-analytics.d.ts +173 -0
- package/dist/persistence/execution-analytics.js +71 -0
- package/dist/persistence/index.d.ts +5 -0
- package/dist/persistence/index.js +5 -0
- package/dist/persistence/project-context.d.ts +164 -0
- package/dist/persistence/project-context.js +88 -0
- package/dist/persistence/repository-model.d.ts +27 -0
- package/dist/persistence/repository-model.js +16 -0
- package/dist/persistence/run-manifest.d.ts +422 -0
- package/dist/persistence/run-manifest.js +118 -0
- package/dist/persistence/state-persistence.d.ts +276 -0
- package/dist/persistence/state-persistence.js +83 -0
- package/dist/runner/built-in-runner-ids.d.ts +8 -0
- package/dist/runner/built-in-runner-ids.js +11 -0
- package/dist/runner/collaboration-model.d.ts +100 -0
- package/dist/runner/collaboration-model.js +19 -0
- package/dist/runner/confidence.d.ts +17 -0
- package/dist/runner/confidence.js +11 -0
- package/dist/runner/index.d.ts +8 -0
- package/dist/runner/index.js +8 -0
- package/dist/runner/permission-approval.d.ts +38 -0
- package/dist/runner/permission-approval.js +14 -0
- package/dist/runner/prompt-engine.d.ts +1467 -0
- package/dist/runner/prompt-engine.js +193 -0
- package/dist/runner/role-system.d.ts +458 -0
- package/dist/runner/role-system.js +94 -0
- package/dist/runner/runner-system.d.ts +1721 -0
- package/dist/runner/runner-system.js +268 -0
- package/dist/runner/task-brief.d.ts +18 -0
- package/dist/runner/task-brief.js +12 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/shared.d.ts +30 -0
- package/dist/shared/shared.js +27 -0
- package/dist/shared/string-enums.d.ts +59 -0
- package/dist/shared/string-enums.js +24 -0
- package/dist/shared/utils.d.ts +25 -0
- package/dist/shared/utils.js +22 -0
- package/dist/specification/canonical-specification.d.ts +475 -0
- package/dist/specification/canonical-specification.js +151 -0
- package/dist/specification/index.d.ts +3 -0
- package/dist/specification/index.js +3 -0
- package/dist/specification/intake.d.ts +419 -0
- package/dist/specification/intake.js +70 -0
- package/dist/specification/iteration-contracts.d.ts +421 -0
- package/dist/specification/iteration-contracts.js +61 -0
- package/dist/workflow/index.d.ts +4 -0
- package/dist/workflow/index.js +4 -0
- package/dist/workflow/workflow-dsl.d.ts +81 -0
- package/dist/workflow/workflow-dsl.js +38 -0
- package/dist/workflow/workflow-engine.d.ts +5788 -0
- package/dist/workflow/workflow-engine.js +414 -0
- package/dist/workflow/workflow-file.d.ts +331 -0
- package/dist/workflow/workflow-file.js +41 -0
- package/dist/workflow/workflow-journal.d.ts +520 -0
- package/dist/workflow/workflow-journal.js +151 -0
- package/package.json +39 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { approvalStatusSchema } from '../artifacts/agreement-artifacts';
|
|
3
|
+
import { artifactRefSchema, artifactTypeSchema } from '../artifacts/artifact-system';
|
|
4
|
+
import { qualityGateConfigSchema } from '../config/configuration';
|
|
5
|
+
import { healthStatusSchema } from '../observability/metrics';
|
|
6
|
+
import { budgetExhaustionContextSchema } from '../persistence/state-persistence';
|
|
7
|
+
import { liveRequestKindSchema, permissionDecisionActionSchema, roleTrustLevelSchema, sessionTransportSchema, } from '../shared/string-enums';
|
|
8
|
+
export const runStatusSchema = z.enum([
|
|
9
|
+
'running',
|
|
10
|
+
'paused',
|
|
11
|
+
'waiting',
|
|
12
|
+
'completed',
|
|
13
|
+
'aborted',
|
|
14
|
+
'failed',
|
|
15
|
+
'interrupted',
|
|
16
|
+
]);
|
|
17
|
+
export const dashboardWaitingContextSchema = z.object({
|
|
18
|
+
reason: z.string(),
|
|
19
|
+
requiredInput: z.string(),
|
|
20
|
+
requestingState: z.string(),
|
|
21
|
+
autoResumeSafe: z.boolean(),
|
|
22
|
+
presentedArtifacts: z.array(artifactRefSchema).readonly(),
|
|
23
|
+
waitingSince: z.string(),
|
|
24
|
+
budgetExhaustion: budgetExhaustionContextSchema.optional(),
|
|
25
|
+
liveSessionId: z.string().optional(),
|
|
26
|
+
pendingRequestId: z.string().optional(),
|
|
27
|
+
liveRequestType: liveRequestKindSchema.optional(),
|
|
28
|
+
sessionTransport: sessionTransportSchema.optional(),
|
|
29
|
+
});
|
|
30
|
+
export const dashboardSessionViewSchema = z.object({
|
|
31
|
+
sessionId: z.string(),
|
|
32
|
+
runId: z.string(),
|
|
33
|
+
role: z.string(),
|
|
34
|
+
stateId: z.string(),
|
|
35
|
+
transport: sessionTransportSchema,
|
|
36
|
+
state: z.string(),
|
|
37
|
+
pendingRequestKind: liveRequestKindSchema.optional(),
|
|
38
|
+
pendingRequestId: z.string().optional(),
|
|
39
|
+
createdAt: z.string(),
|
|
40
|
+
updatedAt: z.string(),
|
|
41
|
+
expiresAt: z.string().optional(),
|
|
42
|
+
error: z.string().optional(),
|
|
43
|
+
});
|
|
44
|
+
export const runStateViewSchema = z.object({
|
|
45
|
+
runId: z.string(),
|
|
46
|
+
status: runStatusSchema,
|
|
47
|
+
currentState: z.string(),
|
|
48
|
+
previousState: z.string().nullable(),
|
|
49
|
+
startedAt: z.string(),
|
|
50
|
+
stateEnteredAt: z.string(),
|
|
51
|
+
elapsedMs: z.number(),
|
|
52
|
+
transitionCount: z.number(),
|
|
53
|
+
isWaitingForHuman: z.boolean(),
|
|
54
|
+
waitingReason: z.string().optional(),
|
|
55
|
+
waitingContext: dashboardWaitingContextSchema.optional(),
|
|
56
|
+
repoRoot: z.string().optional(),
|
|
57
|
+
processAlive: z.boolean().optional(),
|
|
58
|
+
});
|
|
59
|
+
export const parallelInfoSchema = z.object({
|
|
60
|
+
type: z.enum(['fork', 'join']),
|
|
61
|
+
parallelRoles: z.array(z.string()).readonly().optional(),
|
|
62
|
+
roleDurations: z.record(z.string(), z.number()).optional(),
|
|
63
|
+
dynamicRole: z.string().optional(),
|
|
64
|
+
dynamicWorkerCount: z.number().optional(),
|
|
65
|
+
});
|
|
66
|
+
export const stateNodeSchema = z.object({
|
|
67
|
+
id: z.string(),
|
|
68
|
+
type: z.string(),
|
|
69
|
+
label: z.string(),
|
|
70
|
+
visited: z.boolean(),
|
|
71
|
+
current: z.boolean(),
|
|
72
|
+
timeSpentMs: z.number(),
|
|
73
|
+
visitCount: z.number(),
|
|
74
|
+
parallelInfo: parallelInfoSchema.optional(),
|
|
75
|
+
roles: z.array(z.string()).readonly().optional(),
|
|
76
|
+
/** Script names from `run_script` entry actions. */
|
|
77
|
+
scripts: z.array(z.string()).readonly().optional(),
|
|
78
|
+
});
|
|
79
|
+
export const transitionEdgeSchema = z.object({
|
|
80
|
+
from: z.string(),
|
|
81
|
+
to: z.string(),
|
|
82
|
+
trigger: z.string(),
|
|
83
|
+
traversed: z.boolean(),
|
|
84
|
+
traversalCount: z.number(),
|
|
85
|
+
});
|
|
86
|
+
export const workflowStateViewSchema = z.object({
|
|
87
|
+
runId: z.string(),
|
|
88
|
+
states: z.array(stateNodeSchema).readonly(),
|
|
89
|
+
transitions: z.array(transitionEdgeSchema).readonly(),
|
|
90
|
+
currentState: z.string(),
|
|
91
|
+
visitedStates: z.array(z.string()).readonly(),
|
|
92
|
+
stateHistory: z.array(z.string()).readonly(),
|
|
93
|
+
abortReason: z.string().optional(),
|
|
94
|
+
});
|
|
95
|
+
export const artifactEntryViewSchema = z.object({
|
|
96
|
+
ref: artifactRefSchema,
|
|
97
|
+
type: artifactTypeSchema,
|
|
98
|
+
name: z.string(),
|
|
99
|
+
version: z.number(),
|
|
100
|
+
producedBy: z.string(),
|
|
101
|
+
createdAt: z.string(),
|
|
102
|
+
sizeBytes: z.number(),
|
|
103
|
+
verdict: approvalStatusSchema.optional(),
|
|
104
|
+
});
|
|
105
|
+
export const artifactInventoryViewSchema = z.object({
|
|
106
|
+
runId: z.string(),
|
|
107
|
+
artifacts: z.array(artifactEntryViewSchema).readonly(),
|
|
108
|
+
totalCount: z.number(),
|
|
109
|
+
totalSizeBytes: z.number(),
|
|
110
|
+
byType: z.record(z.string(), z.number()),
|
|
111
|
+
});
|
|
112
|
+
export const artifactVersionViewSchema = z.object({
|
|
113
|
+
ref: artifactRefSchema,
|
|
114
|
+
version: z.number(),
|
|
115
|
+
checksum: z.string(),
|
|
116
|
+
createdAt: z.string(),
|
|
117
|
+
});
|
|
118
|
+
export const artifactDetailViewSchema = z.object({
|
|
119
|
+
ref: artifactRefSchema,
|
|
120
|
+
type: artifactTypeSchema,
|
|
121
|
+
name: z.string(),
|
|
122
|
+
currentVersion: z.number(),
|
|
123
|
+
producedBy: z.string(),
|
|
124
|
+
createdAt: z.string(),
|
|
125
|
+
sizeBytes: z.number(),
|
|
126
|
+
versions: z.array(artifactVersionViewSchema).readonly(),
|
|
127
|
+
dependsOn: z.array(artifactRefSchema).readonly(),
|
|
128
|
+
dependedOnBy: z.array(artifactRefSchema).readonly(),
|
|
129
|
+
});
|
|
130
|
+
export const artifactContentViewSchema = z.object({
|
|
131
|
+
content: z.string(),
|
|
132
|
+
contentType: z.enum(['markdown', 'json', 'text', 'diff']),
|
|
133
|
+
sizeBytes: z.number(),
|
|
134
|
+
});
|
|
135
|
+
export const contractProgressViewSchema = z.object({
|
|
136
|
+
contractId: z.string(),
|
|
137
|
+
currentIteration: z.number(),
|
|
138
|
+
maxIterations: z.number(),
|
|
139
|
+
status: z.string(),
|
|
140
|
+
findingsTotal: z.number(),
|
|
141
|
+
findingsResolved: z.number(),
|
|
142
|
+
judgeArbitrations: z.number(),
|
|
143
|
+
});
|
|
144
|
+
export const iterationProgressViewSchema = z.object({
|
|
145
|
+
runId: z.string(),
|
|
146
|
+
contracts: z.array(contractProgressViewSchema).readonly(),
|
|
147
|
+
totalIterations: z.number(),
|
|
148
|
+
totalFindings: z.number(),
|
|
149
|
+
resolvedFindings: z.number(),
|
|
150
|
+
});
|
|
151
|
+
export const findingEntryViewSchema = z.object({
|
|
152
|
+
id: z.string(),
|
|
153
|
+
severity: z.string(),
|
|
154
|
+
status: z.string(),
|
|
155
|
+
category: z.string(),
|
|
156
|
+
description: z.string(),
|
|
157
|
+
source: z.string(),
|
|
158
|
+
iteration: z.number(),
|
|
159
|
+
});
|
|
160
|
+
export const findingsViewSchema = z.object({
|
|
161
|
+
runId: z.string(),
|
|
162
|
+
findings: z.array(findingEntryViewSchema).readonly(),
|
|
163
|
+
totalCount: z.number(),
|
|
164
|
+
bySeverity: z.record(z.string(), z.number()),
|
|
165
|
+
byStatus: z.record(z.string(), z.number()),
|
|
166
|
+
});
|
|
167
|
+
export const roleUsageViewSchema = z.object({
|
|
168
|
+
role: z.string(),
|
|
169
|
+
inputTokens: z.number(),
|
|
170
|
+
outputTokens: z.number(),
|
|
171
|
+
dispatches: z.number(),
|
|
172
|
+
totalDurationMs: z.number(),
|
|
173
|
+
});
|
|
174
|
+
export const usageBreakdownViewSchema = z.object({
|
|
175
|
+
runId: z.string(),
|
|
176
|
+
totalInputTokens: z.number(),
|
|
177
|
+
totalOutputTokens: z.number(),
|
|
178
|
+
totalTokens: z.number(),
|
|
179
|
+
byRole: z.array(roleUsageViewSchema).readonly(),
|
|
180
|
+
budgetSummary: z
|
|
181
|
+
.object({
|
|
182
|
+
configuredMaxTokens: z.number().nullable(),
|
|
183
|
+
budgetExceeded: z.boolean(),
|
|
184
|
+
alertThresholds: z.array(z.number()).readonly().optional(),
|
|
185
|
+
crossedThresholds: z.array(z.number()).readonly().optional(),
|
|
186
|
+
})
|
|
187
|
+
.optional(),
|
|
188
|
+
});
|
|
189
|
+
export const runSummaryViewSchema = z.object({
|
|
190
|
+
runId: z.string(),
|
|
191
|
+
repository: z.string(),
|
|
192
|
+
repoRoot: z.string().optional(),
|
|
193
|
+
workflow: z.string(),
|
|
194
|
+
status: z.string(),
|
|
195
|
+
startedAt: z.string(),
|
|
196
|
+
completedAt: z.string(),
|
|
197
|
+
durationMs: z.number(),
|
|
198
|
+
totalArtifacts: z.number(),
|
|
199
|
+
totalTokens: z.number(),
|
|
200
|
+
totalInputTokens: z.number(),
|
|
201
|
+
totalOutputTokens: z.number(),
|
|
202
|
+
finalState: z.string(),
|
|
203
|
+
sources: z.array(z.string()).readonly().optional(),
|
|
204
|
+
});
|
|
205
|
+
export const roleAssignmentViewSchema = z.object({
|
|
206
|
+
role: z.string(),
|
|
207
|
+
model: z.string().optional(),
|
|
208
|
+
dispatchType: z.string().optional(),
|
|
209
|
+
runner: z.string().optional(),
|
|
210
|
+
maxTokens: z.number().nullable().optional(),
|
|
211
|
+
timeoutMs: z.number().optional(),
|
|
212
|
+
maxTurns: z.number().optional(),
|
|
213
|
+
});
|
|
214
|
+
export const runConfigViewSchema = z.object({
|
|
215
|
+
roles: z.array(roleAssignmentViewSchema).readonly(),
|
|
216
|
+
iterationLimits: z.record(z.string(), z.number()),
|
|
217
|
+
qualityGates: qualityGateConfigSchema,
|
|
218
|
+
budget: z.object({
|
|
219
|
+
maxTokensPerRun: z.number().nullable(),
|
|
220
|
+
}),
|
|
221
|
+
sources: z.array(z.string()).readonly().optional(),
|
|
222
|
+
workflow: z.string().optional(),
|
|
223
|
+
});
|
|
224
|
+
export const dashboardEventTypeSchema = z.enum([
|
|
225
|
+
'state_changed',
|
|
226
|
+
'artifact_produced',
|
|
227
|
+
'finding_added',
|
|
228
|
+
'finding_resolved',
|
|
229
|
+
'iteration_completed',
|
|
230
|
+
'worker_dispatched',
|
|
231
|
+
'worker_completed',
|
|
232
|
+
'script_started',
|
|
233
|
+
'script_completed',
|
|
234
|
+
'health_changed',
|
|
235
|
+
'run_started',
|
|
236
|
+
'run_completed',
|
|
237
|
+
'run_failed',
|
|
238
|
+
'run_aborted',
|
|
239
|
+
'permission_requested',
|
|
240
|
+
'permission_resolved',
|
|
241
|
+
'clarification_requested',
|
|
242
|
+
'clarification_resolved',
|
|
243
|
+
]);
|
|
244
|
+
export const dashboardEventSchema = z.object({
|
|
245
|
+
type: dashboardEventTypeSchema,
|
|
246
|
+
timestamp: z.string(),
|
|
247
|
+
runId: z.string().optional(),
|
|
248
|
+
data: z.record(z.string(), z.unknown()).optional(),
|
|
249
|
+
});
|
|
250
|
+
export const subsystemHealthViewSchema = z.object({
|
|
251
|
+
name: z.string(),
|
|
252
|
+
status: healthStatusSchema,
|
|
253
|
+
lastCheckedAt: z.string(),
|
|
254
|
+
consecutiveFailures: z.number(),
|
|
255
|
+
message: z.string(),
|
|
256
|
+
version: z.string().optional(),
|
|
257
|
+
});
|
|
258
|
+
export const systemHealthViewSchema = z.object({
|
|
259
|
+
timestamp: z.string(),
|
|
260
|
+
overallStatus: healthStatusSchema,
|
|
261
|
+
subsystems: z.array(subsystemHealthViewSchema).readonly(),
|
|
262
|
+
});
|
|
263
|
+
export const runnerDefinitionSchema = z.object({
|
|
264
|
+
id: z.string(),
|
|
265
|
+
name: z.string(),
|
|
266
|
+
models: z.array(z.string()).readonly(),
|
|
267
|
+
});
|
|
268
|
+
export const settingsRoleAssignmentSchema = z.object({
|
|
269
|
+
model: z.string(),
|
|
270
|
+
dispatchType: z.string().optional(),
|
|
271
|
+
runner: z.string().optional(),
|
|
272
|
+
});
|
|
273
|
+
export const settingsPermissionRuleSchema = z.object({
|
|
274
|
+
action: z.string(),
|
|
275
|
+
decision: z.enum(['grant', 'deny']),
|
|
276
|
+
scope: z.string().optional(),
|
|
277
|
+
pattern: z.string().optional(),
|
|
278
|
+
});
|
|
279
|
+
export const settingsPermissionPolicySchema = z.object({
|
|
280
|
+
defaultAction: permissionDecisionActionSchema,
|
|
281
|
+
rules: z.array(settingsPermissionRuleSchema).readonly().optional(),
|
|
282
|
+
roleTrust: z.record(z.string(), roleTrustLevelSchema).optional(),
|
|
283
|
+
safeCommands: z.array(z.string()).readonly().optional(),
|
|
284
|
+
});
|
|
285
|
+
export const settingsGovernanceSchema = z.object({
|
|
286
|
+
iterationLimits: z.object({
|
|
287
|
+
defaults: z.record(z.string(), z.number()),
|
|
288
|
+
}),
|
|
289
|
+
qualityGates: qualityGateConfigSchema,
|
|
290
|
+
budget: z
|
|
291
|
+
.object({
|
|
292
|
+
maxTokensPerRun: z.number().optional(),
|
|
293
|
+
})
|
|
294
|
+
.optional(),
|
|
295
|
+
permissionPolicy: settingsPermissionPolicySchema.optional(),
|
|
296
|
+
});
|
|
297
|
+
export const projectSettingsViewSchema = z.object({
|
|
298
|
+
roles: z.object({
|
|
299
|
+
assignments: z.record(z.string(), settingsRoleAssignmentSchema),
|
|
300
|
+
}),
|
|
301
|
+
governance: settingsGovernanceSchema,
|
|
302
|
+
runtime: z.object({ logLevel: z.string() }),
|
|
303
|
+
availableRunners: z.array(z.string()).readonly(),
|
|
304
|
+
modelsByRunner: z.record(z.string(), z.array(z.string()).readonly()),
|
|
305
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/** Persistable run configuration from the New Run page (roles, governance, runtime). */
|
|
3
|
+
export declare const runSettingsSchema: z.ZodObject<{
|
|
4
|
+
roles: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
assignments: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
6
|
+
model: z.ZodString;
|
|
7
|
+
dispatchType: z.ZodOptional<z.ZodString>;
|
|
8
|
+
runner: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>>;
|
|
11
|
+
governance: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
iterationLimits: z.ZodObject<{
|
|
13
|
+
defaults: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
qualityGates: z.ZodObject<{
|
|
16
|
+
specificationReadiness: z.ZodObject<{
|
|
17
|
+
minCompletenessScore: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
implementationReview: z.ZodObject<{
|
|
20
|
+
maxHighSeverityFindings: z.ZodNumber;
|
|
21
|
+
maxMediumSeverityFindings: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
budget: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
maxTokensPerRun: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
permissionPolicy: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
defaultAction: z.ZodEnum<{
|
|
29
|
+
grant: "grant";
|
|
30
|
+
deny: "deny";
|
|
31
|
+
ask_human: "ask_human";
|
|
32
|
+
}>;
|
|
33
|
+
rules: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
34
|
+
action: z.ZodString;
|
|
35
|
+
decision: z.ZodEnum<{
|
|
36
|
+
grant: "grant";
|
|
37
|
+
deny: "deny";
|
|
38
|
+
}>;
|
|
39
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
40
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>>>>;
|
|
42
|
+
roleTrust: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
43
|
+
high: "high";
|
|
44
|
+
medium: "medium";
|
|
45
|
+
none: "none";
|
|
46
|
+
}>>>;
|
|
47
|
+
safeCommands: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
runtime: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
logLevel: z.ZodString;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type RunSettings = z.infer<typeof runSettingsSchema>;
|
|
55
|
+
export declare const runCreationParamsSchema: z.ZodObject<{
|
|
56
|
+
prompt: z.ZodString;
|
|
57
|
+
workflow: z.ZodOptional<z.ZodString>;
|
|
58
|
+
repoRoot: z.ZodOptional<z.ZodString>;
|
|
59
|
+
runSettings: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
roles: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
assignments: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
62
|
+
model: z.ZodString;
|
|
63
|
+
dispatchType: z.ZodOptional<z.ZodString>;
|
|
64
|
+
runner: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
governance: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
iterationLimits: z.ZodObject<{
|
|
69
|
+
defaults: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
qualityGates: z.ZodObject<{
|
|
72
|
+
specificationReadiness: z.ZodObject<{
|
|
73
|
+
minCompletenessScore: z.ZodNumber;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
implementationReview: z.ZodObject<{
|
|
76
|
+
maxHighSeverityFindings: z.ZodNumber;
|
|
77
|
+
maxMediumSeverityFindings: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
budget: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
maxTokensPerRun: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
permissionPolicy: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
defaultAction: z.ZodEnum<{
|
|
85
|
+
grant: "grant";
|
|
86
|
+
deny: "deny";
|
|
87
|
+
ask_human: "ask_human";
|
|
88
|
+
}>;
|
|
89
|
+
rules: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
90
|
+
action: z.ZodString;
|
|
91
|
+
decision: z.ZodEnum<{
|
|
92
|
+
grant: "grant";
|
|
93
|
+
deny: "deny";
|
|
94
|
+
}>;
|
|
95
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
96
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>>>>;
|
|
98
|
+
roleTrust: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
99
|
+
high: "high";
|
|
100
|
+
medium: "medium";
|
|
101
|
+
none: "none";
|
|
102
|
+
}>>>;
|
|
103
|
+
safeCommands: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
runtime: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
logLevel: z.ZodString;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
export type RunCreationParams = z.infer<typeof runCreationParamsSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { projectSettingsViewSchema, settingsGovernanceSchema } from './dashboard-domain';
|
|
3
|
+
/** Persistable run configuration from the New Run page (roles, governance, runtime). */
|
|
4
|
+
export const runSettingsSchema = z.object({
|
|
5
|
+
roles: projectSettingsViewSchema.shape.roles.optional(),
|
|
6
|
+
governance: settingsGovernanceSchema.optional(),
|
|
7
|
+
runtime: projectSettingsViewSchema.shape.runtime.optional(),
|
|
8
|
+
});
|
|
9
|
+
export const runCreationParamsSchema = z.object({
|
|
10
|
+
prompt: z.string().min(1),
|
|
11
|
+
workflow: z.string().optional(),
|
|
12
|
+
repoRoot: z.string().optional(),
|
|
13
|
+
runSettings: runSettingsSchema.optional(),
|
|
14
|
+
});
|