voratiq 0.1.0-beta.20 → 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/agents/runtime/policy.d.ts +1 -1
- package/dist/bin.js +78 -26
- package/dist/cli/auto.js +1 -0
- package/dist/cli/contract.d.ts +58 -19
- package/dist/cli/contract.js +44 -5
- package/dist/cli/doctor.d.ts +12 -0
- package/dist/cli/doctor.js +115 -0
- package/dist/cli/list.js +7 -1
- package/dist/cli/message.d.ts +28 -0
- package/dist/cli/message.js +147 -0
- package/dist/cli/operator-envelope.d.ts +37 -3
- package/dist/cli/operator-envelope.js +109 -4
- package/dist/cli/reduce.js +5 -2
- package/dist/cli/run.js +2 -0
- package/dist/cli/verify.d.ts +1 -1
- package/dist/cli/verify.js +54 -11
- 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 +2 -0
- package/dist/commands/list/command.js +241 -272
- package/dist/commands/list/normalization.d.ts +56 -0
- package/dist/commands/list/normalization.js +317 -0
- package/dist/commands/message/command.d.ts +24 -0
- package/dist/commands/message/command.js +236 -0
- package/dist/commands/message/errors.d.ts +18 -0
- package/dist/commands/message/errors.js +36 -0
- package/dist/commands/message/lifecycle.d.ts +14 -0
- package/dist/commands/message/lifecycle.js +128 -0
- package/dist/commands/reduce/command.d.ts +1 -0
- package/dist/commands/reduce/command.js +19 -18
- package/dist/commands/reduce/errors.d.ts +2 -2
- package/dist/commands/reduce/errors.js +3 -3
- package/dist/commands/reduce/targets.d.ts +1 -0
- package/dist/commands/reduce/targets.js +59 -4
- 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/shared/resolve-stage-competitors.js +4 -1
- 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.d.ts +1 -0
- package/dist/commands/verify/command.js +17 -6
- package/dist/commands/verify/errors.d.ts +12 -0
- package/dist/commands/verify/errors.js +22 -0
- package/dist/commands/verify/max-parallel.d.ts +1 -1
- package/dist/commands/verify/max-parallel.js +3 -1
- package/dist/commands/verify/targets.d.ts +2 -1
- package/dist/commands/verify/targets.js +256 -28
- package/dist/competition/shared/preflight.d.ts +1 -1
- package/dist/competition/shared/preflight.js +15 -2
- package/dist/configs/agents/defaults.js +25 -25
- package/dist/configs/orchestration/bootstrap.d.ts +6 -1
- package/dist/configs/orchestration/bootstrap.js +27 -6
- package/dist/configs/orchestration/types.d.ts +25 -10
- package/dist/configs/orchestration/types.js +10 -6
- package/dist/configs/verification/types.d.ts +5 -0
- package/dist/configs/verification/types.js +3 -0
- package/dist/contracts/list.d.ts +130 -116
- package/dist/contracts/list.js +54 -77
- package/dist/domain/interactive/persistence/adapter.d.ts +23 -0
- package/dist/domain/interactive/persistence/adapter.js +42 -0
- package/dist/domain/message/competition/adapter.d.ts +36 -0
- package/dist/domain/message/competition/adapter.js +197 -0
- package/dist/domain/message/competition/prompt.d.ts +8 -0
- package/dist/domain/message/competition/prompt.js +29 -0
- package/dist/domain/message/model/mutators.d.ts +17 -0
- package/dist/domain/message/model/mutators.js +107 -0
- package/dist/domain/message/model/types.d.ts +132 -0
- package/dist/domain/message/model/types.js +112 -0
- package/dist/domain/message/persistence/adapter.d.ts +43 -0
- package/dist/domain/message/persistence/adapter.js +124 -0
- package/dist/domain/reduce/competition/adapter.d.ts +1 -0
- package/dist/domain/reduce/competition/adapter.js +78 -11
- package/dist/domain/reduce/competition/finalize.d.ts +7 -0
- package/dist/domain/reduce/competition/finalize.js +19 -0
- package/dist/domain/reduce/competition/prompt.d.ts +1 -1
- package/dist/domain/reduce/model/types.d.ts +6 -3
- package/dist/domain/reduce/model/types.js +2 -1
- 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/adapter.js +8 -5
- 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 +3 -0
- package/dist/domain/verify/competition/prompt.js +6 -0
- package/dist/domain/verify/competition/rubric.js +7 -1
- package/dist/domain/verify/competition/shared-layout.d.ts +42 -2
- package/dist/domain/verify/competition/shared-layout.js +92 -21
- package/dist/domain/verify/competition/target.d.ts +17 -0
- package/dist/domain/verify/model/types.d.ts +22 -4
- package/dist/domain/verify/model/types.js +15 -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.d.ts +2 -2
- package/dist/mcp/server.js +51 -17
- package/dist/policy/verification.js +20 -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 +4 -0
- package/dist/preflight/index.js +7 -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 +43 -0
- package/dist/render/transcripts/list.js +173 -0
- package/dist/render/transcripts/message.d.ts +73 -0
- package/dist/render/transcripts/message.js +361 -0
- 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/stage-progress.d.ts +1 -1
- package/dist/render/transcripts/verify.d.ts +9 -3
- package/dist/render/transcripts/verify.js +44 -25
- 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 +24 -5
- package/dist/status/index.d.ts +21 -0
- package/dist/status/index.js +30 -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/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 +78 -8
- package/dist/workspace/shim.d.ts +1 -0
- package/dist/workspace/shim.js +3 -3
- package/dist/workspace/structure.d.ts +15 -6
- package/dist/workspace/structure.js +26 -9
- package/dist/workspace/verification-defaults.d.ts +1 -1
- package/dist/workspace/verification-defaults.js +255 -0
- package/package.json +16 -17
- 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/README.md
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
# Voratiq
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Run workflows, delegate to swarms, and verify outputs before you apply them.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
No single model wins every task. Run several, keep the best result. [Here's why that works](https://voratiq.com/blog/selection-rather-than-prediction/).
|
|
5
|
+
Voratiq provides composable operators for structured multi-agent workflows, with durable artifacts and session history that keep each step inspectable as work unfolds.
|
|
8
6
|
|
|
9
7
|
## Installation
|
|
10
8
|
|
|
11
|
-
Install via npm:
|
|
12
|
-
|
|
13
9
|
```bash
|
|
14
10
|
npm install -g voratiq
|
|
15
11
|
```
|
|
@@ -23,7 +19,7 @@ npm install -g voratiq
|
|
|
23
19
|
- macOS: `ripgrep`
|
|
24
20
|
- Linux (Debian/Ubuntu): `bubblewrap`, `socat`, `ripgrep`
|
|
25
21
|
|
|
26
|
-
See the [sandbox runtime docs](https://github.com/anthropic-experimental/sandbox-runtime/blob/1bafa66a2c3ebc52569fc0c1a868e85e778f66a0/README.md#platform-specific-dependencies) for
|
|
22
|
+
See the [sandbox runtime docs](https://github.com/anthropic-experimental/sandbox-runtime/blob/1bafa66a2c3ebc52569fc0c1a868e85e778f66a0/README.md#platform-specific-dependencies) for platform-specific dependencies.
|
|
27
23
|
|
|
28
24
|
Windows is not currently supported.
|
|
29
25
|
|
|
@@ -31,40 +27,40 @@ Windows is not currently supported.
|
|
|
31
27
|
|
|
32
28
|
## Quick Start
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
From a git repo root, run:
|
|
35
31
|
|
|
36
32
|
```bash
|
|
37
33
|
voratiq
|
|
38
34
|
```
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
That agent gets access to Voratiq tools for orchestration and verification.
|
|
36
|
+
That opens an interactive agent session with access to Voratiq's operators.
|
|
43
37
|
|
|
44
|
-
|
|
38
|
+
From there, the agent can:
|
|
45
39
|
|
|
46
|
-
-
|
|
47
|
-
- delegate work to
|
|
48
|
-
- verify outputs
|
|
49
|
-
-
|
|
40
|
+
- run multi-step workflows with explicit stages
|
|
41
|
+
- delegate work to swarms of agents
|
|
42
|
+
- verify outputs before applying them
|
|
43
|
+
- use different workflow architectures for different tasks
|
|
44
|
+
- inspect session history and artifacts
|
|
50
45
|
|
|
51
|
-
|
|
46
|
+
For more information, see the [getting started](https://github.com/voratiq/voratiq/blob/main/docs/getting-started.md) guide.
|
|
52
47
|
|
|
53
48
|
## Documentation
|
|
54
49
|
|
|
55
50
|
Start here:
|
|
56
51
|
|
|
57
|
-
- [
|
|
52
|
+
- [Getting Started](https://github.com/voratiq/voratiq/blob/main/docs/getting-started.md) - Which workflow to use and how to run it
|
|
53
|
+
- [How It Works](https://github.com/voratiq/voratiq/blob/main/docs/how-it-works.md) - Operators, verification, and artifacts
|
|
58
54
|
- [CLI Reference](https://github.com/voratiq/voratiq/blob/main/docs/cli-reference.md) - Commands and options
|
|
59
|
-
- [
|
|
55
|
+
- [Troubleshooting](https://github.com/voratiq/voratiq/blob/main/docs/troubleshooting.md) - Common setup and runtime issues
|
|
60
56
|
|
|
61
57
|
Configuration:
|
|
62
58
|
|
|
63
59
|
- [Agents](https://github.com/voratiq/voratiq/blob/main/docs/configs/agents.md) - Agent catalog and invocation details
|
|
64
|
-
- [
|
|
65
|
-
- [Verification](https://github.com/voratiq/voratiq/blob/main/docs/configs/verification.md) - How agent outputs are checked and scored before selection
|
|
66
|
-
- [Environment](https://github.com/voratiq/voratiq/blob/main/docs/configs/environment.md) - Runtime dependencies for agents
|
|
60
|
+
- [Environment](https://github.com/voratiq/voratiq/blob/main/docs/configs/environment.md) - Runtime dependencies for agent execution
|
|
67
61
|
- [Sandbox](https://github.com/voratiq/voratiq/blob/main/docs/configs/sandbox.md) - Network and filesystem restrictions
|
|
62
|
+
- [Orchestration](https://github.com/voratiq/voratiq/blob/main/docs/configs/orchestration.md) - Which agents participate at each workflow stage
|
|
63
|
+
- [Verification](https://github.com/voratiq/voratiq/blob/main/docs/configs/verification.md) - How verification is configured across stages
|
|
68
64
|
|
|
69
65
|
## License
|
|
70
66
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ProviderTranscriptBaseline } from "../../workspace/chat/artifacts.js";
|
|
1
|
+
import { type ProviderTranscriptBaseline, type ProviderTranscriptSelectionHint } from "../../workspace/chat/artifacts.js";
|
|
2
2
|
import type { ChatArtifactFormat } from "../../workspace/chat/types.js";
|
|
3
3
|
export interface LaunchArtifactCaptureResult {
|
|
4
4
|
readonly captured: boolean;
|
|
@@ -10,11 +10,13 @@ export interface LaunchArtifactCaptureResult {
|
|
|
10
10
|
export interface LaunchArtifactCaptureContext {
|
|
11
11
|
readonly searchEnv?: NodeJS.ProcessEnv;
|
|
12
12
|
readonly baseline?: ProviderTranscriptBaseline;
|
|
13
|
+
readonly selectionHint?: ProviderTranscriptSelectionHint;
|
|
13
14
|
}
|
|
14
15
|
export declare function prepareProviderArtifactCaptureContext(options: {
|
|
15
16
|
providerId: string | undefined;
|
|
16
17
|
sessionRoot: string;
|
|
17
18
|
searchEnv?: NodeJS.ProcessEnv;
|
|
19
|
+
selectionHint?: ProviderTranscriptSelectionHint;
|
|
18
20
|
}): Promise<LaunchArtifactCaptureContext | undefined>;
|
|
19
21
|
export declare function collectProviderArtifacts(options: {
|
|
20
22
|
providerId: string | undefined;
|
|
@@ -11,6 +11,7 @@ export async function prepareProviderArtifactCaptureContext(options) {
|
|
|
11
11
|
agentRoot: options.sessionRoot,
|
|
12
12
|
searchEnv: options.searchEnv,
|
|
13
13
|
}),
|
|
14
|
+
selectionHint: options.selectionHint,
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
export async function collectProviderArtifacts(options) {
|
|
@@ -23,6 +24,7 @@ export async function collectProviderArtifacts(options) {
|
|
|
23
24
|
agentRoot: options.sessionRoot,
|
|
24
25
|
searchEnv: options.captureContext?.searchEnv,
|
|
25
26
|
baseline: options.captureContext?.baseline,
|
|
27
|
+
selectionHint: options.captureContext?.selectionHint,
|
|
26
28
|
});
|
|
27
29
|
const format = result.format;
|
|
28
30
|
if ((result.status === "captured" || result.status === "already-exists") &&
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SandboxFilesystemConfig, SandboxNetworkConfig } from "../../configs/sandbox/types.js";
|
|
2
2
|
import type { SandboxPolicyOverrides } from "./types.js";
|
|
3
|
-
export type SandboxStageId = "run" | "
|
|
3
|
+
export type SandboxStageId = "spec" | "run" | "reduce" | "verify" | "message";
|
|
4
4
|
export interface BuildSandboxPolicyInput {
|
|
5
5
|
stageId: SandboxStageId;
|
|
6
6
|
root: string;
|
package/dist/bin.js
CHANGED
|
@@ -65,6 +65,13 @@ async function handleSignal(signal) {
|
|
|
65
65
|
process.exit(exitCode);
|
|
66
66
|
}
|
|
67
67
|
async function flushPendingHistory() {
|
|
68
|
+
try {
|
|
69
|
+
const { flushAllSpecRecordBuffers } = await import("./domain/spec/persistence/adapter.js");
|
|
70
|
+
await flushAllSpecRecordBuffers();
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
console.warn(`[voratiq] Failed to flush spec history buffers: ${error.message}`);
|
|
74
|
+
}
|
|
68
75
|
try {
|
|
69
76
|
const { flushAllRunRecordBuffers } = await import("./domain/run/persistence/adapter.js");
|
|
70
77
|
await flushAllRunRecordBuffers();
|
|
@@ -73,32 +80,32 @@ async function flushPendingHistory() {
|
|
|
73
80
|
console.warn(`[voratiq] Failed to flush run history buffers: ${error.message}`);
|
|
74
81
|
}
|
|
75
82
|
try {
|
|
76
|
-
const {
|
|
77
|
-
await
|
|
83
|
+
const { flushAllReductionRecordBuffers } = await import("./domain/reduce/persistence/adapter.js");
|
|
84
|
+
await flushAllReductionRecordBuffers();
|
|
78
85
|
}
|
|
79
86
|
catch (error) {
|
|
80
|
-
console.warn(`[voratiq] Failed to flush
|
|
87
|
+
console.warn(`[voratiq] Failed to flush reduction history buffers: ${error.message}`);
|
|
81
88
|
}
|
|
82
89
|
try {
|
|
83
|
-
const {
|
|
84
|
-
await
|
|
90
|
+
const { flushAllVerificationRecordBuffers } = await import("./domain/verify/persistence/adapter.js");
|
|
91
|
+
await flushAllVerificationRecordBuffers();
|
|
85
92
|
}
|
|
86
93
|
catch (error) {
|
|
87
|
-
console.warn(`[voratiq] Failed to flush
|
|
94
|
+
console.warn(`[voratiq] Failed to flush verification history buffers: ${error.message}`);
|
|
88
95
|
}
|
|
89
96
|
try {
|
|
90
|
-
const {
|
|
91
|
-
await
|
|
97
|
+
const { flushAllMessageRecordBuffers } = await import("./domain/message/persistence/adapter.js");
|
|
98
|
+
await flushAllMessageRecordBuffers();
|
|
92
99
|
}
|
|
93
100
|
catch (error) {
|
|
94
|
-
console.warn(`[voratiq] Failed to flush
|
|
101
|
+
console.warn(`[voratiq] Failed to flush message history buffers: ${error.message}`);
|
|
95
102
|
}
|
|
96
103
|
try {
|
|
97
|
-
const {
|
|
98
|
-
await
|
|
104
|
+
const { flushAllInteractiveSessionBuffers } = await import("./domain/interactive/persistence/adapter.js");
|
|
105
|
+
await flushAllInteractiveSessionBuffers();
|
|
99
106
|
}
|
|
100
107
|
catch (error) {
|
|
101
|
-
console.warn(`[voratiq] Failed to flush
|
|
108
|
+
console.warn(`[voratiq] Failed to flush interactive history buffers: ${error.message}`);
|
|
102
109
|
}
|
|
103
110
|
}
|
|
104
111
|
async function terminateActiveRunSafe(status, context) {
|
|
@@ -140,16 +147,50 @@ async function terminateActiveInteractiveSafe(status, context) {
|
|
|
140
147
|
return normalizedError;
|
|
141
148
|
}
|
|
142
149
|
}
|
|
150
|
+
async function terminateActiveMessageSafe(status, context) {
|
|
151
|
+
try {
|
|
152
|
+
const { terminateActiveMessage } = await import("./commands/message/lifecycle.js");
|
|
153
|
+
await terminateActiveMessage(status);
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
const { toErrorMessage } = await import("./utils/errors.js");
|
|
158
|
+
const normalizedError = error instanceof Error ? error : new Error(toErrorMessage(error));
|
|
159
|
+
console.error(`[voratiq] Failed to teardown message after ${context}: ${toErrorMessage(error)}`);
|
|
160
|
+
return normalizedError;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
143
163
|
async function terminateActiveSessionsSafe(status, context) {
|
|
144
164
|
const runError = await terminateActiveRunSafe(status, context);
|
|
145
165
|
const verificationError = await terminateActiveVerificationSafe(status, context);
|
|
146
166
|
const interactiveError = await terminateActiveInteractiveSafe(status, context);
|
|
147
|
-
const
|
|
167
|
+
const messageError = await terminateActiveMessageSafe(status, context);
|
|
168
|
+
const errors = [
|
|
169
|
+
runError,
|
|
170
|
+
verificationError,
|
|
171
|
+
interactiveError,
|
|
172
|
+
messageError,
|
|
173
|
+
].filter((error) => error instanceof Error);
|
|
148
174
|
if (errors.length > 1) {
|
|
149
175
|
return new AggregateError(errors, `Failed to teardown active sessions after ${context}`);
|
|
150
176
|
}
|
|
151
177
|
return errors[0] ?? null;
|
|
152
178
|
}
|
|
179
|
+
function renderRootLauncherGitGuidance(options) {
|
|
180
|
+
const lines = [];
|
|
181
|
+
if (options.reason === "not_repository_root") {
|
|
182
|
+
lines.push("Bare `voratiq` launches an interactive session from a repository root.", "", `Current directory: ${options.cwd}`);
|
|
183
|
+
if (options.repositoryRoot) {
|
|
184
|
+
lines.push(`Repository root: ${options.repositoryRoot}`);
|
|
185
|
+
}
|
|
186
|
+
lines.push("", "Next step:", options.repositoryRoot
|
|
187
|
+
? ` cd ${options.repositoryRoot} && voratiq`
|
|
188
|
+
: " Switch to the repository root and rerun `voratiq`.");
|
|
189
|
+
return lines.join("\n");
|
|
190
|
+
}
|
|
191
|
+
lines.push("Bare `voratiq` launches an interactive session from a git repository root.", "", `Current directory: ${options.cwd}`, "", "Next steps:", " git init", " voratiq", "", "Or switch to an existing repository root and rerun `voratiq`.");
|
|
192
|
+
return lines.join("\n");
|
|
193
|
+
}
|
|
153
194
|
export async function runCli(argv = process.argv) {
|
|
154
195
|
installProcessGuards();
|
|
155
196
|
const { Command, CommanderError } = await import("commander");
|
|
@@ -162,7 +203,7 @@ export async function runCli(argv = process.argv) {
|
|
|
162
203
|
const localVersion = (await import("./utils/version.js")).getVoratiqVersion();
|
|
163
204
|
program
|
|
164
205
|
.name("voratiq")
|
|
165
|
-
.description("
|
|
206
|
+
.description("Run workflows, delegate to swarms, and verify outputs before you apply them.")
|
|
166
207
|
.enablePositionalOptions()
|
|
167
208
|
.version(localVersion, "-v, --version", "print the Voratiq version")
|
|
168
209
|
.exitOverride()
|
|
@@ -228,7 +269,13 @@ export async function runCli(argv = process.argv) {
|
|
|
228
269
|
(error.reason === "no_repository" ||
|
|
229
270
|
error.reason === "not_repository_root")) {
|
|
230
271
|
const { writeCommandOutput } = await import("./cli/output.js");
|
|
231
|
-
writeCommandOutput({
|
|
272
|
+
writeCommandOutput({
|
|
273
|
+
body: renderRootLauncherGitGuidance({
|
|
274
|
+
cwd: process.cwd(),
|
|
275
|
+
reason: error.reason,
|
|
276
|
+
repositoryRoot: error.repositoryRoot,
|
|
277
|
+
}),
|
|
278
|
+
});
|
|
232
279
|
return;
|
|
233
280
|
}
|
|
234
281
|
const { toCliError } = await import("./cli/errors.js");
|
|
@@ -304,15 +351,16 @@ async function registerCommands(program, argv) {
|
|
|
304
351
|
const wantsHelp = argv.includes("--help") || argv.includes("-h");
|
|
305
352
|
const wantsVersion = argv.includes("--version") || argv.includes("-v");
|
|
306
353
|
const knownCommandNames = new Set([
|
|
307
|
-
"auto",
|
|
308
|
-
"init",
|
|
309
354
|
"spec",
|
|
310
355
|
"run",
|
|
311
|
-
"verify",
|
|
312
356
|
"reduce",
|
|
357
|
+
"verify",
|
|
358
|
+
"message",
|
|
359
|
+
"auto",
|
|
313
360
|
"apply",
|
|
314
361
|
"list",
|
|
315
362
|
"prune",
|
|
363
|
+
"doctor",
|
|
316
364
|
"mcp",
|
|
317
365
|
]);
|
|
318
366
|
const loadAll = commandName === undefined ||
|
|
@@ -322,25 +370,20 @@ async function registerCommands(program, argv) {
|
|
|
322
370
|
return;
|
|
323
371
|
}
|
|
324
372
|
if (loadAll) {
|
|
325
|
-
program.addCommand((await import("./cli/auto.js")).createAutoCommand());
|
|
326
|
-
program.addCommand((await import("./cli/init.js")).createInitCommand());
|
|
327
373
|
program.addCommand((await import("./cli/spec.js")).createSpecCommand());
|
|
328
374
|
program.addCommand((await import("./cli/run.js")).createRunCommand());
|
|
329
375
|
program.addCommand((await import("./cli/reduce.js")).createReduceCommand());
|
|
330
376
|
program.addCommand((await import("./cli/verify.js")).createVerifyCommand());
|
|
377
|
+
program.addCommand((await import("./cli/message.js")).createMessageCommand());
|
|
378
|
+
program.addCommand((await import("./cli/auto.js")).createAutoCommand());
|
|
331
379
|
program.addCommand((await import("./cli/apply.js")).createApplyCommand());
|
|
332
380
|
program.addCommand((await import("./cli/list.js")).createListCommand());
|
|
333
381
|
program.addCommand((await import("./cli/prune.js")).createPruneCommand());
|
|
382
|
+
program.addCommand((await import("./cli/doctor.js")).createDoctorCommand());
|
|
334
383
|
program.addCommand((await import("./cli/mcp.js")).createMcpCommand());
|
|
335
384
|
return;
|
|
336
385
|
}
|
|
337
386
|
switch (commandName) {
|
|
338
|
-
case "init":
|
|
339
|
-
program.addCommand((await import("./cli/init.js")).createInitCommand());
|
|
340
|
-
break;
|
|
341
|
-
case "list":
|
|
342
|
-
program.addCommand((await import("./cli/list.js")).createListCommand());
|
|
343
|
-
break;
|
|
344
387
|
case "spec":
|
|
345
388
|
program.addCommand((await import("./cli/spec.js")).createSpecCommand());
|
|
346
389
|
break;
|
|
@@ -353,15 +396,24 @@ async function registerCommands(program, argv) {
|
|
|
353
396
|
case "verify":
|
|
354
397
|
program.addCommand((await import("./cli/verify.js")).createVerifyCommand());
|
|
355
398
|
break;
|
|
399
|
+
case "message":
|
|
400
|
+
program.addCommand((await import("./cli/message.js")).createMessageCommand());
|
|
401
|
+
break;
|
|
356
402
|
case "auto":
|
|
357
403
|
program.addCommand((await import("./cli/auto.js")).createAutoCommand());
|
|
358
404
|
break;
|
|
359
405
|
case "apply":
|
|
360
406
|
program.addCommand((await import("./cli/apply.js")).createApplyCommand());
|
|
361
407
|
break;
|
|
408
|
+
case "list":
|
|
409
|
+
program.addCommand((await import("./cli/list.js")).createListCommand());
|
|
410
|
+
break;
|
|
362
411
|
case "prune":
|
|
363
412
|
program.addCommand((await import("./cli/prune.js")).createPruneCommand());
|
|
364
413
|
break;
|
|
414
|
+
case "doctor":
|
|
415
|
+
program.addCommand((await import("./cli/doctor.js")).createDoctorCommand());
|
|
416
|
+
break;
|
|
365
417
|
case "mcp":
|
|
366
418
|
program.addCommand((await import("./cli/mcp.js")).createMcpCommand());
|
|
367
419
|
break;
|
package/dist/cli/auto.js
CHANGED
|
@@ -157,6 +157,7 @@ export async function runAutoCommand(options, runtime = {}) {
|
|
|
157
157
|
selectedSpecPath: result.selectedSpecPath,
|
|
158
158
|
selection: result.selection?.decision,
|
|
159
159
|
selectionWarnings: result.selection?.warnings,
|
|
160
|
+
warningMessage: result.warningMessage,
|
|
160
161
|
})),
|
|
161
162
|
runApplyStage: async (input) => runApplyCommand({
|
|
162
163
|
runId: input.runId,
|
package/dist/cli/contract.d.ts
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import { type Command } from "commander";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { type ListMode, type ListOperator } from "../contracts/list.js";
|
|
4
|
-
export declare const externalExecutionOperators: readonly ["spec", "run", "reduce", "verify", "apply", "prune"];
|
|
5
|
-
export declare const externalInspectionOperators: readonly ["spec", "run", "reduce", "verify"];
|
|
4
|
+
export declare const externalExecutionOperators: readonly ["spec", "run", "reduce", "verify", "message", "apply", "prune"];
|
|
5
|
+
export declare const externalInspectionOperators: readonly ["spec", "run", "reduce", "verify", "message", "interactive"];
|
|
6
6
|
export declare const externalInspectionModes: readonly ["table", "detail"];
|
|
7
7
|
export type ExternalExecutionOperator = (typeof externalExecutionOperators)[number];
|
|
8
8
|
export type ExternalInspectionOperator = ListOperator;
|
|
9
9
|
export type ExternalInspectionMode = ListMode;
|
|
10
10
|
export declare const externalExecutionOperatorSchema: z.ZodEnum<{
|
|
11
|
+
message: "message";
|
|
12
|
+
spec: "spec";
|
|
11
13
|
reduce: "reduce";
|
|
12
14
|
apply: "apply";
|
|
13
|
-
spec: "spec";
|
|
14
15
|
run: "run";
|
|
15
16
|
verify: "verify";
|
|
16
17
|
prune: "prune";
|
|
17
18
|
}>;
|
|
18
19
|
export declare const externalInspectionOperatorSchema: z.ZodEnum<{
|
|
19
|
-
|
|
20
|
+
message: "message";
|
|
20
21
|
spec: "spec";
|
|
22
|
+
reduce: "reduce";
|
|
21
23
|
run: "run";
|
|
22
24
|
verify: "verify";
|
|
25
|
+
interactive: "interactive";
|
|
23
26
|
}>;
|
|
24
27
|
export declare const externalInspectionModeSchema: z.ZodEnum<{
|
|
25
28
|
detail: "detail";
|
|
@@ -44,8 +47,9 @@ export declare const externalRunExecutionInputSchema: z.ZodObject<{
|
|
|
44
47
|
export declare const externalReduceExecutionInputSchema: z.ZodObject<{
|
|
45
48
|
target: z.ZodObject<{
|
|
46
49
|
type: z.ZodEnum<{
|
|
47
|
-
|
|
50
|
+
message: "message";
|
|
48
51
|
spec: "spec";
|
|
52
|
+
reduce: "reduce";
|
|
49
53
|
run: "run";
|
|
50
54
|
verify: "verify";
|
|
51
55
|
}>;
|
|
@@ -56,11 +60,19 @@ export declare const externalReduceExecutionInputSchema: z.ZodObject<{
|
|
|
56
60
|
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
57
61
|
extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
58
62
|
}, z.core.$strict>;
|
|
63
|
+
export declare const externalMessageExecutionInputSchema: z.ZodObject<{
|
|
64
|
+
prompt: z.ZodString;
|
|
65
|
+
agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
67
|
+
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
69
|
+
}, z.core.$strict>;
|
|
59
70
|
export declare const externalVerifyExecutionInputSchema: z.ZodObject<{
|
|
60
71
|
target: z.ZodObject<{
|
|
61
72
|
kind: z.ZodEnum<{
|
|
62
|
-
|
|
73
|
+
message: "message";
|
|
63
74
|
spec: "spec";
|
|
75
|
+
reduce: "reduce";
|
|
64
76
|
run: "run";
|
|
65
77
|
}>;
|
|
66
78
|
sessionId: z.ZodString;
|
|
@@ -88,10 +100,12 @@ export declare const externalPruneExecutionInputSchema: z.ZodDiscriminatedUnion<
|
|
|
88
100
|
}, z.core.$strict>], "scope">;
|
|
89
101
|
export declare const externalListTableInputSchema: z.ZodObject<{
|
|
90
102
|
operator: z.ZodEnum<{
|
|
91
|
-
|
|
103
|
+
message: "message";
|
|
92
104
|
spec: "spec";
|
|
105
|
+
reduce: "reduce";
|
|
93
106
|
run: "run";
|
|
94
107
|
verify: "verify";
|
|
108
|
+
interactive: "interactive";
|
|
95
109
|
}>;
|
|
96
110
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
97
111
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -99,10 +113,12 @@ export declare const externalListTableInputSchema: z.ZodObject<{
|
|
|
99
113
|
}, z.core.$strict>;
|
|
100
114
|
export declare const externalListDetailInputSchema: z.ZodObject<{
|
|
101
115
|
operator: z.ZodEnum<{
|
|
102
|
-
|
|
116
|
+
message: "message";
|
|
103
117
|
spec: "spec";
|
|
118
|
+
reduce: "reduce";
|
|
104
119
|
run: "run";
|
|
105
120
|
verify: "verify";
|
|
121
|
+
interactive: "interactive";
|
|
106
122
|
}>;
|
|
107
123
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
108
124
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -111,20 +127,24 @@ export declare const externalListDetailInputSchema: z.ZodObject<{
|
|
|
111
127
|
}, z.core.$strict>;
|
|
112
128
|
export declare const externalListInspectionInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
113
129
|
operator: z.ZodEnum<{
|
|
114
|
-
|
|
130
|
+
message: "message";
|
|
115
131
|
spec: "spec";
|
|
132
|
+
reduce: "reduce";
|
|
116
133
|
run: "run";
|
|
117
134
|
verify: "verify";
|
|
135
|
+
interactive: "interactive";
|
|
118
136
|
}>;
|
|
119
137
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
120
138
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
121
139
|
mode: z.ZodLiteral<"table">;
|
|
122
140
|
}, z.core.$strict>, z.ZodObject<{
|
|
123
141
|
operator: z.ZodEnum<{
|
|
124
|
-
|
|
142
|
+
message: "message";
|
|
125
143
|
spec: "spec";
|
|
144
|
+
reduce: "reduce";
|
|
126
145
|
run: "run";
|
|
127
146
|
verify: "verify";
|
|
147
|
+
interactive: "interactive";
|
|
128
148
|
}>;
|
|
129
149
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
130
150
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -151,8 +171,9 @@ export declare const externalExecutionInputSchemas: {
|
|
|
151
171
|
readonly reduce: z.ZodObject<{
|
|
152
172
|
target: z.ZodObject<{
|
|
153
173
|
type: z.ZodEnum<{
|
|
154
|
-
|
|
174
|
+
message: "message";
|
|
155
175
|
spec: "spec";
|
|
176
|
+
reduce: "reduce";
|
|
156
177
|
run: "run";
|
|
157
178
|
verify: "verify";
|
|
158
179
|
}>;
|
|
@@ -166,8 +187,9 @@ export declare const externalExecutionInputSchemas: {
|
|
|
166
187
|
readonly verify: z.ZodObject<{
|
|
167
188
|
target: z.ZodObject<{
|
|
168
189
|
kind: z.ZodEnum<{
|
|
169
|
-
|
|
190
|
+
message: "message";
|
|
170
191
|
spec: "spec";
|
|
192
|
+
reduce: "reduce";
|
|
171
193
|
run: "run";
|
|
172
194
|
}>;
|
|
173
195
|
sessionId: z.ZodString;
|
|
@@ -177,6 +199,13 @@ export declare const externalExecutionInputSchemas: {
|
|
|
177
199
|
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
178
200
|
extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
179
201
|
}, z.core.$strict>;
|
|
202
|
+
readonly message: z.ZodObject<{
|
|
203
|
+
prompt: z.ZodString;
|
|
204
|
+
agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
205
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
206
|
+
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
208
|
+
}, z.core.$strict>;
|
|
180
209
|
readonly apply: z.ZodObject<{
|
|
181
210
|
runId: z.ZodString;
|
|
182
211
|
agentId: z.ZodString;
|
|
@@ -198,10 +227,12 @@ export declare const externalInspectionInputSchemas: {
|
|
|
198
227
|
readonly list: {
|
|
199
228
|
readonly table: z.ZodObject<{
|
|
200
229
|
operator: z.ZodEnum<{
|
|
201
|
-
|
|
230
|
+
message: "message";
|
|
202
231
|
spec: "spec";
|
|
232
|
+
reduce: "reduce";
|
|
203
233
|
run: "run";
|
|
204
234
|
verify: "verify";
|
|
235
|
+
interactive: "interactive";
|
|
205
236
|
}>;
|
|
206
237
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
207
238
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -209,10 +240,12 @@ export declare const externalInspectionInputSchemas: {
|
|
|
209
240
|
}, z.core.$strict>;
|
|
210
241
|
readonly detail: z.ZodObject<{
|
|
211
242
|
operator: z.ZodEnum<{
|
|
212
|
-
|
|
243
|
+
message: "message";
|
|
213
244
|
spec: "spec";
|
|
245
|
+
reduce: "reduce";
|
|
214
246
|
run: "run";
|
|
215
247
|
verify: "verify";
|
|
248
|
+
interactive: "interactive";
|
|
216
249
|
}>;
|
|
217
250
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
218
251
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -221,20 +254,24 @@ export declare const externalInspectionInputSchemas: {
|
|
|
221
254
|
}, z.core.$strict>;
|
|
222
255
|
readonly union: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
223
256
|
operator: z.ZodEnum<{
|
|
224
|
-
|
|
257
|
+
message: "message";
|
|
225
258
|
spec: "spec";
|
|
259
|
+
reduce: "reduce";
|
|
226
260
|
run: "run";
|
|
227
261
|
verify: "verify";
|
|
262
|
+
interactive: "interactive";
|
|
228
263
|
}>;
|
|
229
264
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
230
265
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
231
266
|
mode: z.ZodLiteral<"table">;
|
|
232
267
|
}, z.core.$strict>, z.ZodObject<{
|
|
233
268
|
operator: z.ZodEnum<{
|
|
234
|
-
|
|
269
|
+
message: "message";
|
|
235
270
|
spec: "spec";
|
|
271
|
+
reduce: "reduce";
|
|
236
272
|
run: "run";
|
|
237
273
|
verify: "verify";
|
|
274
|
+
interactive: "interactive";
|
|
238
275
|
}>;
|
|
239
276
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
240
277
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -246,13 +283,14 @@ export declare const externalInspectionInputSchemas: {
|
|
|
246
283
|
export type ExternalSpecExecutionInput = z.infer<typeof externalSpecExecutionInputSchema>;
|
|
247
284
|
export type ExternalRunExecutionInput = z.infer<typeof externalRunExecutionInputSchema>;
|
|
248
285
|
export type ExternalReduceExecutionInput = z.infer<typeof externalReduceExecutionInputSchema>;
|
|
286
|
+
export type ExternalMessageExecutionInput = z.infer<typeof externalMessageExecutionInputSchema>;
|
|
249
287
|
export type ExternalVerifyExecutionInput = z.infer<typeof externalVerifyExecutionInputSchema>;
|
|
250
288
|
export type ExternalApplyExecutionInput = z.infer<typeof externalApplyExecutionInputSchema>;
|
|
251
289
|
export type ExternalPruneExecutionInput = z.infer<typeof externalPruneExecutionInputSchema>;
|
|
252
290
|
export type ExternalListInspectionInput = z.infer<typeof externalListInspectionInputSchema>;
|
|
253
291
|
export declare const externalAdapterContractReference: {
|
|
254
292
|
readonly execution: {
|
|
255
|
-
readonly operators: readonly ["spec", "run", "reduce", "verify", "apply", "prune"];
|
|
293
|
+
readonly operators: readonly ["spec", "run", "reduce", "verify", "message", "apply", "prune"];
|
|
256
294
|
readonly envelope: {
|
|
257
295
|
readonly authoritativeType: "OperatorResultEnvelope";
|
|
258
296
|
readonly versioned: true;
|
|
@@ -262,12 +300,12 @@ export declare const externalAdapterContractReference: {
|
|
|
262
300
|
readonly inspection: {
|
|
263
301
|
readonly command: "list";
|
|
264
302
|
readonly jsonOnly: true;
|
|
265
|
-
readonly operators: readonly ["spec", "run", "reduce", "verify"];
|
|
303
|
+
readonly operators: readonly ["spec", "run", "reduce", "verify", "message", "interactive"];
|
|
266
304
|
readonly modes: readonly ["table", "detail"];
|
|
267
305
|
readonly authoritativeType: "ListJsonOutput";
|
|
268
306
|
readonly versioned: false;
|
|
269
307
|
};
|
|
270
|
-
readonly excludedCommands: readonly ["auto", "
|
|
308
|
+
readonly excludedCommands: readonly ["auto", "doctor"];
|
|
271
309
|
readonly compatibility: {
|
|
272
310
|
readonly additiveChangesAreNonBreaking: true;
|
|
273
311
|
readonly breakingChangesRequireExecutionEnvelopeVersionBump: true;
|
|
@@ -291,6 +329,7 @@ export interface PruneCommandSelection {
|
|
|
291
329
|
export declare function parseSpecExecutionCommandOptions(options: unknown, command: Command): ExternalSpecExecutionInput;
|
|
292
330
|
export declare function parseRunExecutionCommandOptions(options: unknown, command: Command): ExternalRunExecutionInput;
|
|
293
331
|
export declare function parseReduceExecutionCommandOptions(options: unknown, command: Command): ExternalReduceExecutionInput;
|
|
332
|
+
export declare function parseMessageExecutionCommandOptions(options: unknown, command: Command): ExternalMessageExecutionInput;
|
|
294
333
|
export declare function parseVerifyExecutionCommandOptions(options: unknown, command: Command): ExternalVerifyExecutionInput;
|
|
295
334
|
export declare function parseApplyExecutionCommandOptions(options: unknown, command: Command): ExternalApplyExecutionInput;
|
|
296
335
|
export declare function parseExternalPruneExecutionInput(input: unknown): ExternalPruneExecutionInput;
|