voratiq 0.1.0-beta.21 → 0.1.0-beta.22
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 +18 -22
- package/dist/agents/launch/chat.d.ts +3 -1
- package/dist/agents/launch/chat.js +2 -0
- package/dist/bin.js +28 -7
- package/dist/cli/auto.js +1 -0
- 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 +4 -1
- package/dist/cli/operator-envelope.d.ts +19 -6
- package/dist/cli/operator-envelope.js +61 -1
- package/dist/cli/run.js +2 -0
- package/dist/cli/verify.d.ts +1 -1
- package/dist/cli/verify.js +48 -9
- package/dist/commands/auto/command.d.ts +1 -0
- package/dist/commands/auto/command.js +22 -12
- package/dist/commands/auto/errors.js +1 -1
- package/dist/commands/doctor/agents.d.ts +5 -0
- package/dist/commands/{init → doctor}/agents.js +37 -19
- package/dist/commands/doctor/command.d.ts +22 -0
- package/dist/commands/doctor/command.js +99 -0
- package/dist/commands/doctor/environment.d.ts +2 -0
- package/dist/commands/{init → doctor}/environment.js +38 -6
- 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} +106 -10
- package/dist/commands/doctor/reconcile.d.ts +2 -0
- package/dist/commands/doctor/reconcile.js +101 -0
- package/dist/commands/interactive/lifecycle.d.ts +2 -0
- package/dist/commands/interactive/lifecycle.js +8 -0
- package/dist/commands/list/command.d.ts +1 -0
- package/dist/commands/list/command.js +211 -352
- package/dist/commands/list/normalization.d.ts +56 -0
- package/dist/commands/list/normalization.js +317 -0
- package/dist/commands/message/command.d.ts +2 -1
- package/dist/commands/message/command.js +35 -14
- package/dist/commands/message/errors.d.ts +12 -3
- package/dist/commands/message/errors.js +19 -3
- 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 +11 -2
- 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 +2 -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/spec/command.js +19 -6
- 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 +15 -5
- package/dist/commands/verify/errors.d.ts +12 -0
- package/dist/commands/verify/errors.js +22 -0
- 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/contracts/list.d.ts +129 -149
- package/dist/contracts/list.js +47 -99
- package/dist/domain/interactive/persistence/adapter.d.ts +23 -0
- package/dist/domain/interactive/persistence/adapter.js +42 -0
- package/dist/domain/message/model/types.d.ts +32 -0
- package/dist/domain/message/model/types.js +25 -0
- package/dist/domain/reduce/competition/adapter.js +21 -7
- 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/errors.d.ts +1 -1
- package/dist/domain/run/competition/errors.js +4 -7
- 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 +6 -1
- package/dist/domain/spec/model/types.d.ts +3 -0
- package/dist/domain/spec/model/types.js +5 -0
- package/dist/domain/verify/competition/finalize.d.ts +9 -0
- package/dist/domain/verify/competition/finalize.js +22 -3
- package/dist/domain/verify/model/types.d.ts +2 -2
- package/dist/interactive/providers/mcp.d.ts +1 -0
- package/dist/interactive/providers/mcp.js +45 -7
- package/dist/interactive/substrate.js +20 -3
- package/dist/mcp/server.js +26 -9
- 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 +5 -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/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 +2 -1
- package/dist/render/transcripts/message.js +19 -20
- package/dist/render/transcripts/reduce.d.ts +1 -0
- package/dist/render/transcripts/reduce.js +21 -21
- package/dist/render/transcripts/root-launcher.js +2 -12
- package/dist/render/transcripts/run.d.ts +3 -0
- package/dist/render/transcripts/run.js +30 -4
- package/dist/render/transcripts/spec.js +5 -8
- package/dist/render/transcripts/verify.d.ts +5 -3
- package/dist/render/transcripts/verify.js +44 -31
- package/dist/render/utils/duration.d.ts +5 -0
- package/dist/render/utils/duration.js +6 -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/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/terminal.d.ts +1 -0
- package/dist/utils/terminal.js +11 -0
- package/dist/workspace/chat/artifacts.d.ts +7 -0
- package/dist/workspace/chat/artifacts.js +94 -3
- package/dist/workspace/errors.js +2 -2
- package/dist/workspace/managed-state.d.ts +32 -0
- package/dist/workspace/managed-state.js +103 -0
- package/dist/workspace/setup.js +66 -2
- package/dist/workspace/shim.d.ts +1 -0
- package/dist/workspace/shim.js +3 -3
- package/dist/workspace/structure.d.ts +1 -0
- package/dist/workspace/structure.js +1 -0
- 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/commands/{init/types.js → doctor/fix-types.js} +0 -0
package/dist/cli/init.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Command, Option } from "commander";
|
|
2
|
-
import { executeInitCommand } from "../commands/init/command.js";
|
|
3
|
-
import { resolveCliContext } from "../preflight/index.js";
|
|
4
|
-
import { renderInitTranscript } from "../render/transcripts/init.js";
|
|
5
|
-
import { AGENT_PRESET_CHOICES } from "../workspace/templates.js";
|
|
6
|
-
import { createConfirmationWorkflow } from "./confirmation.js";
|
|
7
|
-
import { NonInteractiveShellError } from "./errors.js";
|
|
8
|
-
import { writeCommandOutput } from "./output.js";
|
|
9
|
-
export async function runInitCommand(options = {}) {
|
|
10
|
-
const { writeOutput = writeCommandOutput } = options;
|
|
11
|
-
writeOutput({
|
|
12
|
-
alerts: [{ severity: "info", message: "Initializing Voratiq…" }],
|
|
13
|
-
});
|
|
14
|
-
const { root } = await resolveCliContext({ requireWorkspace: false });
|
|
15
|
-
const assumeYes = Boolean(options.yes);
|
|
16
|
-
const preset = options.preset ?? "pro";
|
|
17
|
-
const presetProvided = Boolean(options.presetProvided);
|
|
18
|
-
const confirmation = createConfirmationWorkflow({
|
|
19
|
-
assumeYes,
|
|
20
|
-
onUnavailable: () => {
|
|
21
|
-
throw new NonInteractiveShellError();
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
let wroteConfiguringPreface = false;
|
|
25
|
-
try {
|
|
26
|
-
const initResult = await executeInitCommand({
|
|
27
|
-
root,
|
|
28
|
-
preset,
|
|
29
|
-
presetProvided,
|
|
30
|
-
onPresetResolved: () => {
|
|
31
|
-
writeOutput({
|
|
32
|
-
alerts: [{ severity: "info", message: "Configuring workspace…" }],
|
|
33
|
-
});
|
|
34
|
-
wroteConfiguringPreface = true;
|
|
35
|
-
},
|
|
36
|
-
assumeYes,
|
|
37
|
-
interactive: confirmation.interactive,
|
|
38
|
-
confirm: confirmation.confirm,
|
|
39
|
-
prompt: confirmation.prompt,
|
|
40
|
-
});
|
|
41
|
-
const body = renderInitTranscript(initResult, {
|
|
42
|
-
includeConfigurationHeading: !wroteConfiguringPreface,
|
|
43
|
-
});
|
|
44
|
-
return { ...initResult, body };
|
|
45
|
-
}
|
|
46
|
-
finally {
|
|
47
|
-
confirmation.close();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export function createInitCommand() {
|
|
51
|
-
const presetOption = new Option("--preset <preset>", "Select a preset")
|
|
52
|
-
.choices(AGENT_PRESET_CHOICES)
|
|
53
|
-
.default("pro");
|
|
54
|
-
return new Command("init")
|
|
55
|
-
.description("Initialize the Voratiq workspace")
|
|
56
|
-
.addOption(presetOption)
|
|
57
|
-
.option("-y, --yes", "Assume yes and accept defaults")
|
|
58
|
-
.allowExcessArguments(false)
|
|
59
|
-
.action(async (commandOptions, command) => {
|
|
60
|
-
const presetSource = command.getOptionValueSource("preset");
|
|
61
|
-
const presetProvided = typeof presetSource === "string" && presetSource !== "default";
|
|
62
|
-
const result = await runInitCommand({
|
|
63
|
-
...commandOptions,
|
|
64
|
-
presetProvided,
|
|
65
|
-
});
|
|
66
|
-
writeCommandOutput({
|
|
67
|
-
body: result.body,
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type AgentPreset } from "../../workspace/templates.js";
|
|
2
|
-
import type { AgentInitSummary, InitConfigureOptions } from "./types.js";
|
|
3
|
-
export declare const AGENTS_CONFIG_DISPLAY_PATH: string;
|
|
4
|
-
export declare function configureAgents(root: string, preset: AgentPreset, options: InitConfigureOptions): Promise<AgentInitSummary>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { InitCommandResult } from "../../commands/init/types.js";
|
|
2
|
-
export declare function renderPresetPromptPreface(firstPrompt: boolean): string[];
|
|
3
|
-
interface RenderInitTranscriptOptions {
|
|
4
|
-
includeConfigurationHeading?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare function renderInitTranscript({ preset, agentSummary, orchestrationSummary, environmentSummary, sandboxSummary, }: InitCommandResult, options?: RenderInitTranscriptOptions): string;
|
|
7
|
-
export {};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { getAgentDefaultsForPreset } from "../../configs/agents/defaults.js";
|
|
2
|
-
import { colorize } from "../../utils/colors.js";
|
|
3
|
-
import { formatWorkspacePath, VORATIQ_VERIFICATION_CONFIG_FILE, } from "../../workspace/structure.js";
|
|
4
|
-
import { renderTable } from "../utils/table.js";
|
|
5
|
-
import { renderBlocks, renderTranscript } from "../utils/transcript.js";
|
|
6
|
-
import { wrapWords } from "../utils/wrap.js";
|
|
7
|
-
const INIT_NOTE_MAX_WIDTH = 79;
|
|
8
|
-
export function renderPresetPromptPreface(firstPrompt) {
|
|
9
|
-
const sections = [
|
|
10
|
-
[
|
|
11
|
-
"Which workspace preset would you like?",
|
|
12
|
-
" [1] Pro (flagship)",
|
|
13
|
-
" [2] Lite (faster/cheaper)",
|
|
14
|
-
" [3] Manual (configure yourself)",
|
|
15
|
-
],
|
|
16
|
-
];
|
|
17
|
-
return renderBlocks({
|
|
18
|
-
sections,
|
|
19
|
-
leadingBlankLine: firstPrompt,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export function renderInitTranscript({ preset, agentSummary, orchestrationSummary, environmentSummary, sandboxSummary, }, options = {}) {
|
|
23
|
-
const { includeConfigurationHeading = true } = options;
|
|
24
|
-
const sections = [];
|
|
25
|
-
if (includeConfigurationHeading) {
|
|
26
|
-
sections.push(["Configuring workspace…"]);
|
|
27
|
-
}
|
|
28
|
-
sections.push(buildConfigurationSummaryTable({
|
|
29
|
-
orchestrationPath: orchestrationSummary.configPath,
|
|
30
|
-
agentsPath: agentSummary.configPath,
|
|
31
|
-
verificationPath: formatWorkspacePath(VORATIQ_VERIFICATION_CONFIG_FILE),
|
|
32
|
-
environmentPath: environmentSummary.configPath,
|
|
33
|
-
sandboxPath: sandboxSummary.configPath,
|
|
34
|
-
}));
|
|
35
|
-
const conditionalNote = resolveConditionalInitNote({
|
|
36
|
-
preset,
|
|
37
|
-
agentSummary,
|
|
38
|
-
});
|
|
39
|
-
if (conditionalNote) {
|
|
40
|
-
sections.push(wrapWords(conditionalNote, INIT_NOTE_MAX_WIDTH).map((line) => colorize(line, "yellow")));
|
|
41
|
-
}
|
|
42
|
-
sections.push([
|
|
43
|
-
"Configuration docs:",
|
|
44
|
-
" https://github.com/voratiq/voratiq/tree/main/docs/configs",
|
|
45
|
-
]);
|
|
46
|
-
sections.push([buildWorkspaceInitializedSection()]);
|
|
47
|
-
sections.push(["Run end-to-end:", ' voratiq auto --description "<task>"']);
|
|
48
|
-
return renderTranscript({ sections });
|
|
49
|
-
}
|
|
50
|
-
function buildConfigurationSummaryTable(paths) {
|
|
51
|
-
return renderTable({
|
|
52
|
-
columns: [
|
|
53
|
-
{ header: "CONFIGURATION", accessor: (row) => row.configuration },
|
|
54
|
-
{ header: "FILE", accessor: (row) => row.path },
|
|
55
|
-
],
|
|
56
|
-
rows: [
|
|
57
|
-
{ configuration: "agents", path: paths.agentsPath },
|
|
58
|
-
{ configuration: "orchestration", path: paths.orchestrationPath },
|
|
59
|
-
{ configuration: "verification", path: paths.verificationPath },
|
|
60
|
-
{ configuration: "environment", path: paths.environmentPath },
|
|
61
|
-
{ configuration: "sandbox", path: paths.sandboxPath },
|
|
62
|
-
],
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
function buildWorkspaceInitializedSection() {
|
|
66
|
-
return colorize("Voratiq initialized.", "green");
|
|
67
|
-
}
|
|
68
|
-
function resolveConditionalInitNote({ preset, agentSummary, }) {
|
|
69
|
-
if (agentSummary.zeroDetections) {
|
|
70
|
-
return "No agent CLIs detected on PATH. Install providers, then update `agents.yaml`.";
|
|
71
|
-
}
|
|
72
|
-
if (preset === "manual") {
|
|
73
|
-
return "Manual preset leaves stages empty. Add agents to `orchestration.yaml`.";
|
|
74
|
-
}
|
|
75
|
-
const presetProviders = new Set(getAgentDefaultsForPreset(preset).map((agentDefault) => agentDefault.provider));
|
|
76
|
-
const detectedProviders = new Set(agentSummary.detectedProviders.map((summary) => summary.provider));
|
|
77
|
-
for (const presetProvider of presetProviders) {
|
|
78
|
-
if (!detectedProviders.has(presetProvider)) {
|
|
79
|
-
return "Some providers not found on PATH. Only detected providers were configured. Install missing ones, then update `agents.yaml`.";
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return undefined;
|
|
83
|
-
}
|
|
File without changes
|