voratiq 0.1.0-beta.21 → 0.1.0-beta.23
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 +19 -23
- package/dist/agents/launch/chat.d.ts +3 -1
- package/dist/agents/launch/chat.js +2 -0
- package/dist/agents/runtime/policy.js +2 -1
- package/dist/auth/providers/utils.js +1 -1
- package/dist/bin.js +28 -7
- package/dist/cli/auto.js +4 -16
- package/dist/cli/contract.d.ts +26 -17
- package/dist/cli/contract.js +3 -1
- package/dist/cli/doctor.d.ts +12 -0
- package/dist/cli/doctor.js +115 -0
- package/dist/cli/list.js +5 -1
- package/dist/cli/message.js +16 -11
- package/dist/cli/operator-envelope.d.ts +27 -7
- package/dist/cli/operator-envelope.js +95 -3
- package/dist/cli/option-parsers.d.ts +2 -0
- package/dist/cli/option-parsers.js +7 -0
- package/dist/cli/output.d.ts +1 -5
- package/dist/cli/reduce.js +5 -13
- package/dist/cli/run.js +5 -12
- package/dist/cli/spec.js +4 -10
- package/dist/cli/verify.d.ts +1 -1
- package/dist/cli/verify.js +51 -22
- package/dist/commands/auto/command.d.ts +1 -0
- package/dist/commands/auto/command.js +22 -15
- package/dist/commands/auto/errors.js +1 -1
- package/dist/commands/auto/validation.js +3 -1
- package/dist/commands/doctor/agents.d.ts +5 -0
- package/dist/commands/{init → doctor}/agents.js +40 -20
- package/dist/commands/doctor/command.d.ts +22 -0
- package/dist/commands/doctor/command.js +100 -0
- package/dist/commands/doctor/environment.d.ts +2 -0
- package/dist/commands/{init → doctor}/environment.js +41 -7
- package/dist/commands/{init/types.d.ts → doctor/fix-types.d.ts} +30 -9
- package/dist/commands/doctor/fix.d.ts +2 -0
- package/dist/commands/{init/command.js → doctor/fix.js} +109 -11
- package/dist/commands/doctor/reconcile.d.ts +2 -0
- package/dist/commands/doctor/reconcile.js +103 -0
- package/dist/commands/interactive/lifecycle.d.ts +2 -0
- package/dist/commands/interactive/lifecycle.js +16 -0
- package/dist/commands/list/command.d.ts +1 -0
- package/dist/commands/list/command.js +241 -361
- package/dist/commands/list/normalization.d.ts +51 -0
- package/dist/commands/list/normalization.js +309 -0
- package/dist/commands/list/records.d.ts +9 -0
- package/dist/commands/list/records.js +6 -0
- package/dist/commands/message/command.d.ts +2 -2
- package/dist/commands/message/command.js +29 -16
- package/dist/commands/message/errors.d.ts +12 -3
- package/dist/commands/message/errors.js +19 -3
- package/dist/commands/prune/command.js +4 -1
- package/dist/commands/reduce/command.js +16 -17
- package/dist/commands/reduce/errors.d.ts +2 -2
- package/dist/commands/reduce/errors.js +3 -3
- package/dist/commands/reduce/targets.js +12 -3
- package/dist/commands/root-launcher/command.js +12 -6
- package/dist/commands/run/command.d.ts +1 -0
- package/dist/commands/run/command.js +4 -1
- package/dist/commands/run/record-init.d.ts +2 -0
- package/dist/commands/run/record-init.js +8 -1
- package/dist/commands/run/spec-provenance.d.ts +37 -0
- package/dist/commands/run/spec-provenance.js +384 -0
- package/dist/commands/run/validation.d.ts +4 -0
- package/dist/commands/run/validation.js +25 -62
- package/dist/commands/shared/resolve-stage-competitors.js +2 -1
- package/dist/commands/spec/command.js +64 -138
- package/dist/commands/spec/errors.d.ts +5 -0
- package/dist/commands/spec/errors.js +9 -0
- package/dist/commands/verify/agents.d.ts +4 -2
- package/dist/commands/verify/agents.js +4 -11
- package/dist/commands/verify/command.js +23 -6
- package/dist/commands/verify/errors.d.ts +12 -0
- package/dist/commands/verify/errors.js +22 -0
- package/dist/commands/verify/lifecycle.js +1 -1
- package/dist/commands/verify/targets.js +108 -12
- package/dist/competition/shared/preflight.d.ts +1 -1
- package/dist/competition/shared/preflight.js +15 -2
- package/dist/competition/shared/teardown.d.ts +7 -0
- package/dist/competition/shared/teardown.js +6 -0
- package/dist/configs/agents/defaults.js +13 -44
- package/dist/configs/agents/loader.js +1 -1
- package/dist/configs/environment/loader.js +2 -1
- package/dist/configs/orchestration/loader.js +2 -1
- package/dist/configs/sandbox/loader.js +2 -1
- package/dist/configs/settings/loader.js +1 -1
- package/dist/configs/verification/loader.js +2 -1
- package/dist/contracts/list.d.ts +129 -149
- package/dist/contracts/list.js +47 -99
- package/dist/domain/interactive/model/types.d.ts +2 -0
- package/dist/domain/interactive/model/types.js +16 -1
- package/dist/domain/interactive/persistence/adapter.d.ts +23 -0
- package/dist/domain/interactive/persistence/adapter.js +67 -5
- package/dist/domain/interactive/prompt.d.ts +1 -1
- package/dist/domain/interactive/prompt.js +1 -1
- package/dist/domain/interactive/session-env.d.ts +10 -0
- package/dist/domain/interactive/session-env.js +25 -0
- package/dist/domain/message/competition/adapter.js +3 -9
- package/dist/domain/message/model/types.d.ts +32 -1
- package/dist/domain/message/model/types.js +25 -1
- package/dist/domain/reduce/competition/adapter.js +30 -16
- package/dist/domain/reduce/competition/finalize.d.ts +7 -0
- package/dist/domain/reduce/competition/finalize.js +19 -0
- package/dist/domain/reduce/model/types.d.ts +3 -3
- package/dist/domain/run/competition/agents/artifacts.js +4 -2
- package/dist/domain/run/competition/agents/lifecycle.js +1 -1
- package/dist/domain/run/competition/agents/workspace.js +2 -1
- package/dist/domain/run/competition/errors.d.ts +1 -1
- package/dist/domain/run/competition/errors.js +4 -7
- package/dist/domain/run/competition/reports.js +2 -1
- package/dist/domain/run/model/enhanced.d.ts +1 -1
- package/dist/domain/run/model/enhanced.js +2 -1
- package/dist/domain/run/model/types.d.ts +384 -0
- package/dist/domain/run/model/types.js +87 -0
- package/dist/domain/spec/competition/adapter.d.ts +1 -0
- package/dist/domain/spec/competition/adapter.js +9 -10
- package/dist/domain/spec/model/mutators.d.ts +20 -0
- package/dist/domain/spec/model/mutators.js +146 -0
- package/dist/domain/spec/model/types.d.ts +3 -0
- package/dist/domain/spec/model/types.js +5 -0
- package/dist/domain/spec/persistence/adapter.d.ts +1 -0
- package/dist/domain/spec/persistence/adapter.js +7 -2
- package/dist/domain/verify/competition/adapter.d.ts +1 -1
- package/dist/domain/verify/competition/adapter.js +4 -9
- package/dist/domain/verify/competition/finalize.d.ts +9 -0
- package/dist/domain/verify/competition/finalize.js +22 -3
- package/dist/domain/verify/competition/programmatic.js +2 -1
- package/dist/domain/verify/competition/prompt.js +1 -1
- package/dist/domain/verify/competition/shared-layout.js +1 -1
- package/dist/domain/verify/model/types.d.ts +2 -2
- package/dist/interactive/providers/launch.d.ts +2 -0
- package/dist/interactive/providers/launch.js +19 -2
- package/dist/interactive/providers/mcp.d.ts +1 -0
- package/dist/interactive/providers/mcp.js +45 -7
- package/dist/interactive/substrate.js +32 -5
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +337 -44
- package/dist/policy/auto.d.ts +0 -1
- package/dist/policy/auto.js +3 -14
- package/dist/policy/verification.js +18 -1
- package/dist/preflight/agents.d.ts +24 -0
- package/dist/preflight/agents.js +71 -0
- package/dist/preflight/environment.d.ts +6 -0
- package/dist/preflight/environment.js +17 -0
- package/dist/preflight/formatting.d.ts +5 -0
- package/dist/preflight/formatting.js +20 -0
- package/dist/preflight/index.d.ts +2 -0
- package/dist/preflight/index.js +6 -9
- package/dist/preflight/operator.d.ts +32 -0
- package/dist/preflight/operator.js +40 -0
- package/dist/preflight/settings.d.ts +2 -0
- package/dist/preflight/settings.js +17 -0
- package/dist/render/transcripts/apply.js +2 -1
- package/dist/render/transcripts/interactive.d.ts +16 -0
- package/dist/render/transcripts/interactive.js +42 -0
- package/dist/render/transcripts/list.d.ts +41 -0
- package/dist/render/transcripts/list.js +152 -3
- package/dist/render/transcripts/message.d.ts +3 -5
- package/dist/render/transcripts/message.js +29 -74
- package/dist/render/transcripts/reduce.d.ts +2 -4
- package/dist/render/transcripts/reduce.js +31 -75
- package/dist/render/transcripts/root-launcher.js +2 -12
- package/dist/render/transcripts/run.d.ts +4 -4
- package/dist/render/transcripts/run.js +36 -47
- package/dist/render/transcripts/spec.d.ts +1 -4
- package/dist/render/transcripts/spec.js +15 -62
- package/dist/render/transcripts/verify.d.ts +6 -7
- package/dist/render/transcripts/verify.js +54 -85
- package/dist/render/utils/cli-writer.d.ts +4 -0
- package/dist/render/utils/cli-writer.js +1 -0
- package/dist/render/utils/duration.d.ts +5 -0
- package/dist/render/utils/duration.js +6 -0
- package/dist/render/utils/progressive-render.d.ts +3 -0
- package/dist/render/utils/progressive-render.js +44 -0
- package/dist/render/utils/runs.d.ts +1 -0
- package/dist/render/utils/runs.js +1 -0
- package/dist/render/utils/transcript-shell.d.ts +2 -1
- package/dist/render/utils/transcript-shell.js +19 -6
- package/dist/utils/diff.d.ts +2 -0
- package/dist/utils/diff.js +1 -0
- package/dist/utils/errors.d.ts +2 -1
- package/dist/utils/errors.js +3 -1
- package/dist/utils/git.d.ts +1 -1
- package/dist/utils/git.js +25 -2
- package/dist/utils/list-target.d.ts +4 -0
- package/dist/utils/list-target.js +35 -0
- package/dist/utils/swarm-session-ack.d.ts +9 -0
- package/dist/utils/swarm-session-ack.js +17 -0
- package/dist/utils/terminal.d.ts +1 -0
- package/dist/utils/terminal.js +11 -0
- package/dist/workspace/artifact-paths.d.ts +55 -0
- package/dist/workspace/artifact-paths.js +106 -0
- package/dist/workspace/chat/artifacts.d.ts +7 -0
- package/dist/workspace/chat/artifacts.js +95 -4
- package/dist/workspace/chat/native-usage.js +1 -1
- package/dist/workspace/chat/sources.d.ts +2 -5
- package/dist/workspace/chat/sources.js +4 -4
- package/dist/workspace/constants.d.ts +47 -0
- package/dist/workspace/constants.js +47 -0
- package/dist/workspace/errors.js +2 -2
- package/dist/workspace/layout.js +3 -1
- package/dist/workspace/managed-state.d.ts +32 -0
- package/dist/workspace/managed-state.js +104 -0
- package/dist/workspace/path-formatters.d.ts +9 -0
- package/dist/workspace/path-formatters.js +46 -0
- package/dist/workspace/path-resolvers.d.ts +1 -0
- package/dist/workspace/path-resolvers.js +5 -0
- package/dist/workspace/session-paths.d.ts +16 -0
- package/dist/workspace/session-paths.js +59 -0
- package/dist/workspace/setup.js +67 -2
- package/dist/workspace/shim.d.ts +1 -0
- package/dist/workspace/shim.js +3 -3
- package/package.json +2 -2
- package/dist/cli/init.d.ts +0 -15
- package/dist/cli/init.js +0 -70
- package/dist/commands/init/agents.d.ts +0 -4
- package/dist/commands/init/command.d.ts +0 -2
- package/dist/commands/init/environment.d.ts +0 -2
- package/dist/render/transcripts/init.d.ts +0 -7
- package/dist/render/transcripts/init.js +0 -83
- package/dist/workspace/structure.d.ts +0 -143
- package/dist/workspace/structure.js +0 -319
- /package/dist/commands/{init/types.js → doctor/fix-types.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { basename } from "node:path";
|
|
1
|
+
import { basename, join } from "node:path";
|
|
2
2
|
import { CliError, RunNotFoundCliError } from "../../cli/errors.js";
|
|
3
3
|
import { TERMINAL_MESSAGE_STATUSES } from "../../domain/message/model/types.js";
|
|
4
4
|
import { readMessageRecords } from "../../domain/message/persistence/adapter.js";
|
|
@@ -10,7 +10,10 @@ import { TERMINAL_SPEC_STATUSES } from "../../domain/spec/model/types.js";
|
|
|
10
10
|
import { readSpecRecords } from "../../domain/spec/persistence/adapter.js";
|
|
11
11
|
import { readVerificationRecords } from "../../domain/verify/persistence/adapter.js";
|
|
12
12
|
import { TERMINAL_RUN_STATUSES } from "../../status/index.js";
|
|
13
|
-
import {
|
|
13
|
+
import { pathExists } from "../../utils/fs.js";
|
|
14
|
+
import { normalizePathForDisplay, resolvePath } from "../../utils/path.js";
|
|
15
|
+
import { DIFF_FILENAME, MESSAGE_RESPONSE_FILENAME, } from "../../workspace/constants.js";
|
|
16
|
+
import { buildAgentWorkspacePaths } from "../../workspace/layout.js";
|
|
14
17
|
export async function resolveVerifyTarget(input) {
|
|
15
18
|
const { target } = input;
|
|
16
19
|
switch (target.kind) {
|
|
@@ -40,14 +43,31 @@ async function resolveSpecVerifyTarget(input) {
|
|
|
40
43
|
if (!TERMINAL_SPEC_STATUSES.includes(record.status)) {
|
|
41
44
|
throw new CliError(`Spec session \`${target.sessionId}\` is not complete.`, [`Status: \`${record.status}\`.`], ["Wait for the spec to finish before running `voratiq verify`."]);
|
|
42
45
|
}
|
|
46
|
+
const competitiveCandidates = record.agents
|
|
47
|
+
.filter((agent) => agent.status === "succeeded" && agent.outputPath)
|
|
48
|
+
.map((agent) => ({
|
|
49
|
+
canonicalId: agent.agentId,
|
|
50
|
+
forbiddenIdentityTokens: [agent.agentId],
|
|
51
|
+
}));
|
|
52
|
+
if (competitiveCandidates.length === 0) {
|
|
53
|
+
throw new CliError(`Spec session \`${target.sessionId}\` has no verifiable drafts.`, [], [
|
|
54
|
+
"Re-run `voratiq spec` to generate at least one succeeded draft before running `voratiq verify`.",
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
const missingSpecArtifacts = await collectMissingSpecVerificationArtifacts({
|
|
58
|
+
root,
|
|
59
|
+
outputPaths: record.agents
|
|
60
|
+
.filter((agent) => agent.status === "succeeded" && typeof agent.outputPath === "string")
|
|
61
|
+
.map((agent) => agent.outputPath),
|
|
62
|
+
});
|
|
63
|
+
if (missingSpecArtifacts.length > 0) {
|
|
64
|
+
throw new CliError(`Spec session \`${target.sessionId}\` is missing required verification artifacts.`, missingSpecArtifacts.map((artifact) => `Missing: \`${artifact}\`.`), [
|
|
65
|
+
"Re-run `voratiq spec` to regenerate the retained artifacts before running `voratiq verify`.",
|
|
66
|
+
]);
|
|
67
|
+
}
|
|
43
68
|
return {
|
|
44
69
|
baseRevisionSha: resolveSpecBaseRevisionSha(record),
|
|
45
|
-
competitiveCandidates
|
|
46
|
-
.filter((agent) => agent.status === "succeeded" && agent.outputPath)
|
|
47
|
-
.map((agent) => ({
|
|
48
|
-
canonicalId: agent.agentId,
|
|
49
|
-
forbiddenIdentityTokens: [agent.agentId],
|
|
50
|
-
})),
|
|
70
|
+
competitiveCandidates,
|
|
51
71
|
target: {
|
|
52
72
|
kind: "spec",
|
|
53
73
|
sessionId: record.sessionId,
|
|
@@ -81,6 +101,16 @@ async function resolveRunVerifyTarget(input) {
|
|
|
81
101
|
if (candidateIds.length === 0) {
|
|
82
102
|
throw new CliError(`Run \`${target.sessionId}\` has no candidate agents to verify.`, [], ["Re-run `voratiq run` to generate verifiable candidates."]);
|
|
83
103
|
}
|
|
104
|
+
const missingRequiredArtifacts = await collectMissingRunVerificationArtifacts({
|
|
105
|
+
root,
|
|
106
|
+
record,
|
|
107
|
+
candidateIds,
|
|
108
|
+
});
|
|
109
|
+
if (missingRequiredArtifacts.length > 0) {
|
|
110
|
+
throw new CliError(`Run \`${target.sessionId}\` is missing required verification artifacts.`, missingRequiredArtifacts.map((artifact) => `Missing: \`${artifact}\`.`), [
|
|
111
|
+
"Re-run `voratiq run` to regenerate the retained artifacts before running `voratiq verify`.",
|
|
112
|
+
]);
|
|
113
|
+
}
|
|
84
114
|
return {
|
|
85
115
|
baseRevisionSha: record.baseRevisionSha,
|
|
86
116
|
competitiveCandidates: candidateIds.map((candidateId) => ({
|
|
@@ -117,16 +147,33 @@ async function resolveReductionVerifyTarget(input) {
|
|
|
117
147
|
if (!TERMINAL_REDUCTION_STATUSES.includes(record.status)) {
|
|
118
148
|
throw new CliError(`Reduction session \`${target.sessionId}\` is not complete.`, [`Status: \`${record.status}\`.`], ["Wait for the reduction to finish before running `voratiq verify`."]);
|
|
119
149
|
}
|
|
120
|
-
const referenceRepo = await resolveReductionReferenceRepo({
|
|
121
|
-
...input,
|
|
122
|
-
reductionRecord: record,
|
|
123
|
-
});
|
|
124
150
|
const competitiveCandidates = record.reducers
|
|
125
151
|
.filter((reducer) => reducer.status === "succeeded" && reducer.outputPath)
|
|
126
152
|
.map((reducer) => ({
|
|
127
153
|
canonicalId: reducer.agentId,
|
|
128
154
|
forbiddenIdentityTokens: [reducer.agentId],
|
|
129
155
|
}));
|
|
156
|
+
if (competitiveCandidates.length === 0) {
|
|
157
|
+
throw new CliError(`Reduction session \`${target.sessionId}\` has no verifiable reductions.`, [], [
|
|
158
|
+
"Re-run `voratiq reduce` to produce at least one succeeded reduction before running `voratiq verify`.",
|
|
159
|
+
]);
|
|
160
|
+
}
|
|
161
|
+
const missingReductionArtifacts = await collectMissingRetainedVerificationArtifacts({
|
|
162
|
+
root,
|
|
163
|
+
relativePaths: record.reducers
|
|
164
|
+
.filter((reducer) => reducer.status === "succeeded" &&
|
|
165
|
+
typeof reducer.outputPath === "string")
|
|
166
|
+
.map((reducer) => reducer.outputPath),
|
|
167
|
+
});
|
|
168
|
+
if (missingReductionArtifacts.length > 0) {
|
|
169
|
+
throw new CliError(`Reduction session \`${target.sessionId}\` is missing required verification artifacts.`, missingReductionArtifacts.map((artifact) => `Missing: \`${artifact}\`.`), [
|
|
170
|
+
"Re-run `voratiq reduce` to regenerate the retained artifacts before running `voratiq verify`.",
|
|
171
|
+
]);
|
|
172
|
+
}
|
|
173
|
+
const referenceRepo = await resolveReductionReferenceRepo({
|
|
174
|
+
...input,
|
|
175
|
+
reductionRecord: record,
|
|
176
|
+
});
|
|
130
177
|
if (referenceRepo.kind === "git") {
|
|
131
178
|
return {
|
|
132
179
|
baseRevisionSha: referenceRepo.baseRevisionSha,
|
|
@@ -177,6 +224,15 @@ async function resolveMessageVerifyTarget(input) {
|
|
|
177
224
|
"Re-run `voratiq message` to capture at least one succeeded response before running `voratiq verify`.",
|
|
178
225
|
]);
|
|
179
226
|
}
|
|
227
|
+
const missingMessageArtifacts = await collectMissingRetainedVerificationArtifacts({
|
|
228
|
+
root,
|
|
229
|
+
relativePaths: recipients.map((recipient) => recipient.outputPath),
|
|
230
|
+
});
|
|
231
|
+
if (missingMessageArtifacts.length > 0) {
|
|
232
|
+
throw new CliError(`Message session \`${target.sessionId}\` is missing required verification artifacts.`, missingMessageArtifacts.map((artifact) => `Missing: \`${artifact}\`.`), [
|
|
233
|
+
"Re-run `voratiq message` to regenerate the retained artifacts before running `voratiq verify`.",
|
|
234
|
+
]);
|
|
235
|
+
}
|
|
180
236
|
return {
|
|
181
237
|
competitiveCandidates: recipients.map((recipient) => ({
|
|
182
238
|
canonicalId: recipient.agentId,
|
|
@@ -189,6 +245,46 @@ async function resolveMessageVerifyTarget(input) {
|
|
|
189
245
|
messageRecord: record,
|
|
190
246
|
};
|
|
191
247
|
}
|
|
248
|
+
async function collectMissingSpecVerificationArtifacts(options) {
|
|
249
|
+
return collectMissingRetainedVerificationArtifacts({
|
|
250
|
+
root: options.root,
|
|
251
|
+
relativePaths: options.outputPaths,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
async function collectMissingRunVerificationArtifacts(options) {
|
|
255
|
+
const { root, record, candidateIds } = options;
|
|
256
|
+
const missing = new Set();
|
|
257
|
+
const specAbsolute = resolvePath(root, record.spec.path);
|
|
258
|
+
if (!(await pathExists(specAbsolute))) {
|
|
259
|
+
missing.add(normalizePathForDisplay(record.spec.path));
|
|
260
|
+
}
|
|
261
|
+
for (const candidateId of candidateIds) {
|
|
262
|
+
const runAgentRecord = record.agents.find((agent) => agent.agentId === candidateId);
|
|
263
|
+
if (runAgentRecord?.artifacts?.diffCaptured !== true) {
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
const paths = buildAgentWorkspacePaths({
|
|
267
|
+
root,
|
|
268
|
+
runId: record.runId,
|
|
269
|
+
agentId: candidateId,
|
|
270
|
+
});
|
|
271
|
+
const diffAbsolute = join(paths.artifactsPath, DIFF_FILENAME);
|
|
272
|
+
if (!(await pathExists(diffAbsolute))) {
|
|
273
|
+
missing.add(normalizePathForDisplay(join(".voratiq", "run", "sessions", record.runId, candidateId, "artifacts", DIFF_FILENAME)));
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return Array.from(missing).sort((left, right) => left.localeCompare(right));
|
|
277
|
+
}
|
|
278
|
+
async function collectMissingRetainedVerificationArtifacts(options) {
|
|
279
|
+
const { root, relativePaths } = options;
|
|
280
|
+
const missing = new Set();
|
|
281
|
+
for (const relativePath of relativePaths) {
|
|
282
|
+
if (!(await pathExists(resolvePath(root, relativePath)))) {
|
|
283
|
+
missing.add(normalizePathForDisplay(relativePath));
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return Array.from(missing).sort((left, right) => left.localeCompare(right));
|
|
287
|
+
}
|
|
192
288
|
function collectRunCandidateIdentityTokens(options) {
|
|
193
289
|
const { runRecord, candidateId } = options;
|
|
194
290
|
const tokens = new Set();
|
|
@@ -7,5 +7,5 @@ export interface FormatPreflightIssueLinesOptions {
|
|
|
7
7
|
readonly unlabeledAgentIds?: readonly string[];
|
|
8
8
|
}
|
|
9
9
|
export declare const PREFLIGHT_SUMMARY_MAX_CHARS: 120;
|
|
10
|
-
export declare const PREFLIGHT_HINT: "Run `voratiq
|
|
10
|
+
export declare const PREFLIGHT_HINT: "Run `voratiq doctor --fix` to repair workspace setup.";
|
|
11
11
|
export declare function formatPreflightIssueLines(issues: readonly PreflightIssue[], options?: FormatPreflightIssueLinesOptions): string[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const PREFLIGHT_SUMMARY_MAX_CHARS = 120;
|
|
2
|
-
export const PREFLIGHT_HINT = "Run `voratiq
|
|
2
|
+
export const PREFLIGHT_HINT = "Run `voratiq doctor --fix` to repair workspace setup.";
|
|
3
|
+
const SETTINGS_FILE_MESSAGE_PATTERN = /^Invalid settings file at (?:(?:.+\/)?(?:\.voratiq\/)?)settings\.yaml(?::\s*(.+))?$/u;
|
|
3
4
|
export function formatPreflightIssueLines(issues, options = {}) {
|
|
4
5
|
const { maxChars = PREFLIGHT_SUMMARY_MAX_CHARS, unlabeledAgentIds = [] } = options;
|
|
5
6
|
const unlabeled = new Set(unlabeledAgentIds);
|
|
@@ -17,15 +18,27 @@ function formatIssueLine(agentId, message, unlabeledAgentIds) {
|
|
|
17
18
|
if (unlabeledAgentIds.has(agentId)) {
|
|
18
19
|
return `- ${message}`;
|
|
19
20
|
}
|
|
20
|
-
return `-
|
|
21
|
+
return `- \`${agentId}\`: ${message}`;
|
|
21
22
|
}
|
|
22
23
|
function normalizeIssueMessage(message) {
|
|
23
24
|
const split = message
|
|
24
25
|
.split(/\r?\n/u)
|
|
25
26
|
.map((line) => line.replace(/\s+/gu, " ").trim())
|
|
27
|
+
.map(normalizeIssueText)
|
|
26
28
|
.filter((line) => line.length > 0);
|
|
27
29
|
return split.length > 0 ? split : ["unknown error"];
|
|
28
30
|
}
|
|
31
|
+
function normalizeIssueText(line) {
|
|
32
|
+
const settingsMatch = SETTINGS_FILE_MESSAGE_PATTERN.exec(line);
|
|
33
|
+
if (!settingsMatch) {
|
|
34
|
+
return line;
|
|
35
|
+
}
|
|
36
|
+
const detail = settingsMatch[1]?.trim();
|
|
37
|
+
if (!detail) {
|
|
38
|
+
return "Invalid `settings.yaml`.";
|
|
39
|
+
}
|
|
40
|
+
return `Invalid \`settings.yaml\`: ${detail}`;
|
|
41
|
+
}
|
|
29
42
|
function truncateLine(value, maxChars) {
|
|
30
43
|
if (value.length <= maxChars) {
|
|
31
44
|
return value;
|
|
@@ -32,5 +32,12 @@ export interface TeardownController {
|
|
|
32
32
|
}): void;
|
|
33
33
|
listResources(): readonly TeardownResource[];
|
|
34
34
|
}
|
|
35
|
+
export interface ScratchWorkspaceTeardownPaths {
|
|
36
|
+
readonly workspacePath: string;
|
|
37
|
+
readonly contextPath: string;
|
|
38
|
+
readonly runtimePath: string;
|
|
39
|
+
readonly sandboxPath: string;
|
|
40
|
+
}
|
|
35
41
|
export declare function createTeardownController(label: string): TeardownController;
|
|
42
|
+
export declare function registerScratchWorkspaceTeardownPaths(teardown: TeardownController, workspacePaths: ScratchWorkspaceTeardownPaths, labelPrefix: string): void;
|
|
36
43
|
export declare function runTeardown(controller: TeardownController | undefined): Promise<readonly TeardownDiagnostic[]>;
|
|
@@ -34,6 +34,12 @@ export function createTeardownController(label) {
|
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
+
export function registerScratchWorkspaceTeardownPaths(teardown, workspacePaths, labelPrefix) {
|
|
38
|
+
teardown.addPath(workspacePaths.workspacePath, `${labelPrefix} workspace`);
|
|
39
|
+
teardown.addPath(workspacePaths.contextPath, `${labelPrefix} context`);
|
|
40
|
+
teardown.addPath(workspacePaths.runtimePath, `${labelPrefix} runtime`);
|
|
41
|
+
teardown.addPath(workspacePaths.sandboxPath, `${labelPrefix} sandbox`);
|
|
42
|
+
}
|
|
37
43
|
export async function runTeardown(controller) {
|
|
38
44
|
if (!controller) {
|
|
39
45
|
return [];
|
|
@@ -87,30 +87,16 @@ const DEFAULT_AGENT_CATALOG_ENTRIES = [
|
|
|
87
87
|
extraArgs: ["--effort", "high"],
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
id: "
|
|
91
|
-
provider: "
|
|
92
|
-
model: "
|
|
93
|
-
|
|
94
|
-
{
|
|
95
|
-
id: "gpt-5-1-codex-mini",
|
|
96
|
-
provider: "codex",
|
|
97
|
-
model: "gpt-5.1-codex-mini",
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
id: "gpt-5-1-codex",
|
|
101
|
-
provider: "codex",
|
|
102
|
-
model: "gpt-5.1-codex",
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
id: "gpt-5-1-codex-max",
|
|
106
|
-
provider: "codex",
|
|
107
|
-
model: "gpt-5.1-codex-max",
|
|
90
|
+
id: "claude-opus-4-7-high",
|
|
91
|
+
provider: "claude",
|
|
92
|
+
model: "claude-opus-4-7",
|
|
93
|
+
extraArgs: ["--effort", "high"],
|
|
108
94
|
},
|
|
109
95
|
{
|
|
110
|
-
id: "
|
|
111
|
-
provider: "
|
|
112
|
-
model: "
|
|
113
|
-
extraArgs: ["--
|
|
96
|
+
id: "claude-opus-4-7-xhigh",
|
|
97
|
+
provider: "claude",
|
|
98
|
+
model: "claude-opus-4-7",
|
|
99
|
+
extraArgs: ["--effort", "xhigh"],
|
|
114
100
|
},
|
|
115
101
|
{
|
|
116
102
|
id: "gpt-5-2",
|
|
@@ -129,23 +115,6 @@ const DEFAULT_AGENT_CATALOG_ENTRIES = [
|
|
|
129
115
|
model: "gpt-5.2",
|
|
130
116
|
extraArgs: ["--config", "model_reasoning_effort=xhigh"],
|
|
131
117
|
},
|
|
132
|
-
{
|
|
133
|
-
id: "gpt-5-2-codex",
|
|
134
|
-
provider: "codex",
|
|
135
|
-
model: "gpt-5.2-codex",
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
id: "gpt-5-2-codex-high",
|
|
139
|
-
provider: "codex",
|
|
140
|
-
model: "gpt-5.2-codex",
|
|
141
|
-
extraArgs: ["--config", "model_reasoning_effort=high"],
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
id: "gpt-5-2-codex-xhigh",
|
|
145
|
-
provider: "codex",
|
|
146
|
-
model: "gpt-5.2-codex",
|
|
147
|
-
extraArgs: ["--config", "model_reasoning_effort=xhigh"],
|
|
148
|
-
},
|
|
149
118
|
{
|
|
150
119
|
id: "gpt-5-3-codex-spark",
|
|
151
120
|
provider: "codex",
|
|
@@ -218,10 +187,10 @@ const DEFAULT_AGENT_CATALOG_ENTRIES = [
|
|
|
218
187
|
];
|
|
219
188
|
const PRO_AGENT_PRESET_ENTRIES = [
|
|
220
189
|
{
|
|
221
|
-
id: "claude-opus-4-
|
|
190
|
+
id: "claude-opus-4-7-xhigh",
|
|
222
191
|
provider: "claude",
|
|
223
|
-
model: "claude-opus-4-
|
|
224
|
-
extraArgs: ["--effort", "
|
|
192
|
+
model: "claude-opus-4-7",
|
|
193
|
+
extraArgs: ["--effort", "xhigh"],
|
|
225
194
|
},
|
|
226
195
|
{
|
|
227
196
|
id: "gpt-5-4-high",
|
|
@@ -244,9 +213,9 @@ const LITE_AGENT_PRESET_ENTRIES = [
|
|
|
244
213
|
extraArgs: ["--effort", "high"],
|
|
245
214
|
},
|
|
246
215
|
{
|
|
247
|
-
id: "gpt-5-
|
|
216
|
+
id: "gpt-5-4-mini",
|
|
248
217
|
provider: "codex",
|
|
249
|
-
model: "gpt-5.
|
|
218
|
+
model: "gpt-5.4-mini",
|
|
250
219
|
},
|
|
251
220
|
{
|
|
252
221
|
id: "gemini-3-flash-preview",
|
|
@@ -3,7 +3,7 @@ import { basename } from "node:path";
|
|
|
3
3
|
import { toErrorMessage } from "../../utils/errors.js";
|
|
4
4
|
import { isFileSystemError } from "../../utils/fs.js";
|
|
5
5
|
import { parseYamlDocument, } from "../../utils/yaml-reader.js";
|
|
6
|
-
import { resolveWorkspacePath } from "../../workspace/
|
|
6
|
+
import { resolveWorkspacePath } from "../../workspace/path-resolvers.js";
|
|
7
7
|
import { createConfigLoader } from "../shared/loader-factory.js";
|
|
8
8
|
import { formatYamlErrorMessage } from "../shared/yaml-error-formatter.js";
|
|
9
9
|
import { getAgentDefault, MODEL_PLACEHOLDER, } from "./defaults.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { parseYamlDocument, } from "../../utils/yaml-reader.js";
|
|
2
|
-
import {
|
|
2
|
+
import { VORATIQ_ENVIRONMENT_FILE } from "../../workspace/constants.js";
|
|
3
|
+
import { resolveWorkspacePath } from "../../workspace/path-resolvers.js";
|
|
3
4
|
import { createConfigLoader } from "../shared/loader-factory.js";
|
|
4
5
|
import { formatYamlErrorDetail } from "../shared/yaml-error-formatter.js";
|
|
5
6
|
import { EnvironmentConfigParseError, MissingEnvironmentConfigError, } from "./errors.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { readAgentsConfig } from "../../configs/agents/loader.js";
|
|
2
2
|
import { isMissing, readUtf8File } from "../../utils/fs.js";
|
|
3
3
|
import { parseYamlDocument, } from "../../utils/yaml-reader.js";
|
|
4
|
-
import {
|
|
4
|
+
import { VORATIQ_AGENTS_FILE, VORATIQ_ORCHESTRATION_FILE, } from "../../workspace/constants.js";
|
|
5
|
+
import { resolveWorkspacePath } from "../../workspace/path-resolvers.js";
|
|
5
6
|
import { createConfigLoader } from "../shared/loader-factory.js";
|
|
6
7
|
import { DEFAULT_ORCHESTRATION_ERROR_CONTEXT, MissingOrchestrationConfigError, OrchestrationSchemaValidationError, OrchestrationYamlParseError, } from "./errors.js";
|
|
7
8
|
import { ORCHESTRATION_STAGE_IDS, orchestrationConfigSchema, } from "./types.js";
|
|
@@ -3,7 +3,8 @@ import process from "node:process";
|
|
|
3
3
|
import { assertTestHookRegistrationEnabled } from "../../testing/test-hooks.js";
|
|
4
4
|
import { relativeToRoot } from "../../utils/path.js";
|
|
5
5
|
import { parseYamlDocument, } from "../../utils/yaml-reader.js";
|
|
6
|
-
import {
|
|
6
|
+
import { VORATIQ_SANDBOX_FILE } from "../../workspace/constants.js";
|
|
7
|
+
import { resolveWorkspacePath } from "../../workspace/path-resolvers.js";
|
|
7
8
|
import { createConfigLoader } from "../shared/loader-factory.js";
|
|
8
9
|
import { formatYamlErrorMessage } from "../shared/yaml-error-formatter.js";
|
|
9
10
|
import { listSandboxProviderDefaults, listSandboxProviderIds, } from "./defaults.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
2
|
import { parseYamlDocument } from "../../utils/yaml-reader.js";
|
|
3
|
-
import { resolveWorkspacePath } from "../../workspace/
|
|
3
|
+
import { resolveWorkspacePath } from "../../workspace/path-resolvers.js";
|
|
4
4
|
import { createConfigLoader } from "../shared/loader-factory.js";
|
|
5
5
|
import { repoSettingsSchema } from "./types.js";
|
|
6
6
|
const SETTINGS_CONFIG_FILENAME = "settings.yaml";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ZodError } from "zod";
|
|
2
2
|
import { parseYamlDocument, } from "../../utils/yaml-reader.js";
|
|
3
|
-
import {
|
|
3
|
+
import { VORATIQ_VERIFICATION_CONFIG_FILE } from "../../workspace/constants.js";
|
|
4
|
+
import { resolveWorkspacePath } from "../../workspace/path-resolvers.js";
|
|
4
5
|
import { createConfigLoader } from "../shared/loader-factory.js";
|
|
5
6
|
import { formatYamlErrorMessage } from "../shared/yaml-error-formatter.js";
|
|
6
7
|
import { DEFAULT_VERIFICATION_ERROR_CONTEXT, MissingVerificationConfigError, VerificationConfigError, VerificationYamlParseError, } from "./errors.js";
|