@anyswarm/core 0.5.1 → 0.6.0
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/AGENTS.md +20 -5
- package/README.md +69 -55
- package/dist/examples/README.md +138 -77
- package/dist/examples/authoring/README.md +4 -4
- package/dist/examples/autoresearch/README.md +108 -16
- package/dist/examples/autoresearch/REQUIREMENTS.zh.md +13 -12
- package/dist/examples/autoresearch/config.d.ts +48 -5
- package/dist/examples/autoresearch/config.js +57 -23
- package/dist/examples/autoresearch/demo.d.ts +12 -4
- package/dist/examples/autoresearch/demo.js +65 -22
- package/dist/examples/autoresearch/eject.json +2 -0
- package/dist/examples/autoresearch/frontiercs2-config.d.ts +2 -0
- package/dist/examples/autoresearch/frontiercs2-config.js +14 -0
- package/dist/examples/autoresearch/frontiercs2.d.ts +18 -1
- package/dist/examples/autoresearch/frontiercs2.js +71 -14
- package/dist/examples/autoresearch/prepare-demo.d.ts +1 -0
- package/dist/examples/autoresearch/prepare-demo.js +46 -0
- package/dist/examples/autoresearch/prepare.d.ts +105 -53
- package/dist/examples/autoresearch/prepare.js +126 -57
- package/dist/examples/autoresearch/project.d.ts +6 -95
- package/dist/examples/autoresearch/project.js +131 -45
- package/dist/examples/autoresearch/research-service.d.ts +16 -1
- package/dist/examples/autoresearch/research-service.js +84 -44
- package/dist/examples/code/README.md +25 -17
- package/dist/examples/code/REQUIREMENTS.zh.md +3 -3
- package/dist/examples/code/config.d.ts +1 -0
- package/dist/examples/first-harness/AGENTS.md +25 -0
- package/dist/examples/first-harness/README.md +136 -0
- package/dist/examples/first-harness/config.d.ts +9 -8
- package/dist/examples/first-harness/config.js +33 -26
- package/dist/examples/first-harness/eject.json +14 -0
- package/dist/examples/first-harness/handoff.js +3 -3
- package/dist/examples/first-harness/harness.d.ts +14 -18
- package/dist/examples/first-harness/harness.js +102 -77
- package/dist/examples/first-harness/input/README.md +7 -0
- package/dist/examples/first-harness/session.js +2 -1
- package/dist/examples/first-harness/tsconfig.json +2 -1
- package/dist/examples/harness-session/README.md +4 -4
- package/dist/examples/lead-worker/README.md +1 -1
- package/dist/examples/lead-worker/project-config.d.ts +1 -0
- package/dist/examples/messages/README.md +2 -2
- package/dist/examples/notes/README.md +5 -5
- package/dist/examples/notes/config.d.ts +1 -0
- package/dist/examples/parallel-swarm/AGENTS.md +32 -0
- package/dist/examples/parallel-swarm/README.md +136 -0
- package/dist/examples/parallel-swarm/board-service.js +25 -8
- package/dist/examples/parallel-swarm/board.d.ts +31 -1
- package/dist/examples/parallel-swarm/board.js +98 -13
- package/dist/examples/parallel-swarm/config.d.ts +11 -0
- package/dist/examples/parallel-swarm/config.js +39 -0
- package/dist/examples/parallel-swarm/eject.json +5 -0
- package/dist/examples/parallel-swarm/harness.d.ts +26 -20
- package/dist/examples/parallel-swarm/harness.js +77 -76
- package/dist/examples/parallel-swarm/report.d.ts +12 -0
- package/dist/examples/parallel-swarm/report.js +30 -0
- package/dist/examples/peermesh/README.md +1 -1
- package/dist/examples/peermesh/project-config.d.ts +1 -0
- package/dist/examples/services/agent-control/README.md +1 -1
- package/dist/examples/services/mathlib-search/README.md +1 -1
- package/dist/examples/services/mcp-managed/README.md +1 -1
- package/dist/examples/services/persistent-board/README.md +6 -3
- package/dist/examples/subagents/AGENTS.md +35 -0
- package/dist/examples/subagents/README.md +129 -93
- package/dist/examples/subagents/config.d.ts +2 -10
- package/dist/examples/subagents/config.js +9 -16
- package/dist/examples/subagents/eject.json +17 -0
- package/dist/examples/subagents/handoff-config.d.ts +41 -0
- package/dist/examples/subagents/handoff-config.js +13 -0
- package/dist/examples/subagents/model.d.ts +3 -0
- package/dist/examples/subagents/model.js +19 -0
- package/dist/examples/substrate/README.md +12 -6
- package/dist/examples/substrate/config.d.ts +1 -0
- package/dist/examples/substrate/project-config.d.ts +1 -0
- package/dist/examples/super/README.md +34 -22
- package/dist/examples/super/actions.d.ts +1 -1
- package/dist/examples/super/actions.js +11 -11
- package/dist/examples/super/config.js +3 -3
- package/dist/examples/super/eject.json +1 -1
- package/dist/examples/super/location.js +1 -1
- package/dist/examples/super/operator.d.ts +1 -0
- package/dist/examples/super/operator.js +31 -0
- package/dist/examples/super/project.d.ts +0 -107
- package/dist/examples/super/project.js +1 -3
- package/dist/examples/taskpool/README.md +1 -1
- package/dist/examples/taskpool/config.d.ts +1 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-authority-snapshot.d.ts +4 -4
- package/dist/scripts/anyswarm-arguments.d.ts +7 -25
- package/dist/scripts/anyswarm-arguments.js +69 -97
- package/dist/scripts/anyswarm-eject.js +1 -1
- package/dist/scripts/anyswarm-harnesses.d.ts +0 -1
- package/dist/scripts/anyswarm-harnesses.js +1 -22
- package/dist/scripts/anyswarm-installation.d.ts +7 -40
- package/dist/scripts/anyswarm-installation.js +17 -291
- package/dist/scripts/anyswarm-launch.d.ts +6 -36
- package/dist/scripts/anyswarm-launch.js +32 -81
- package/dist/scripts/anyswarm-progress.d.ts +6 -0
- package/dist/scripts/anyswarm-progress.js +133 -0
- package/dist/scripts/anyswarm-project.d.ts +1 -9
- package/dist/scripts/anyswarm-project.js +40 -127
- package/dist/scripts/anyswarm-source-runner.js +9 -41
- package/dist/scripts/anyswarm.js +6 -26
- package/dist/scripts/build-provenance.json +1 -1
- package/dist/scripts/generate-architecture-coverage.js +1 -1
- package/dist/scripts/generate-architecture-prompts.js +18 -10
- package/dist/scripts/local-environment.d.ts +13 -7
- package/dist/scripts/local-environment.js +73 -21
- package/dist/scripts/local-setup.d.ts +3 -0
- package/dist/scripts/local-setup.js +153 -118
- package/dist/scripts/pack-release.js +31 -4
- package/dist/src/core/index.js +1 -1
- package/dist/src/core/sandbox/opensandbox-backend.js +10 -4
- package/dist/src/core/sandbox/sandbox-connection.d.ts +9 -2
- package/dist/src/core/sandbox/sandbox-connection.js +22 -7
- package/dist/src/core/worker-image.js +1 -1
- package/dist/src/harness/project-harness.d.ts +1 -0
- package/dist/src/harness/project-harness.js +5 -4
- package/dist/src/harness/project-rpc-client.js +19 -0
- package/dist/src/harness/project-runtime.js +3 -1
- package/dist/src/harness/typescript-loader.d.ts +2 -0
- package/dist/src/harness/typescript-loader.js +26 -8
- package/dist/src/trace-viewer/command.mjs +6 -3
- package/dist/src/trace-viewer/public/app.js +239 -59
- package/dist/src/trace-viewer/public/index.html +5 -0
- package/dist/src/trace-viewer/public/style.css +22 -0
- package/dist/src/trace-viewer/reader.mjs +242 -26
- package/dist/src/trace-viewer/run-root.d.mts +1 -0
- package/dist/src/trace-viewer/run-root.mjs +7 -0
- package/dist/src/trace-viewer/server.mjs +3 -1
- package/docs/INDEX.md +11 -9
- package/docs/architecture/04-services.md +1 -1
- package/docs/architecture/06-observability-experiments.md +21 -7
- package/docs/architecture/07-run-configuration.md +118 -19
- package/docs/architecture/08-prompts.md +21 -2
- package/docs/architecture/10-service-api-reference.md +12 -5
- package/docs/architecture/12-code-coverage.md +157 -115
- package/docs/architecture/15-core-runtime.md +1 -1
- package/docs/architecture/16-pi-opensandbox-backend.md +2 -0
- package/docs/architecture/17-harness-reporting.md +79 -1
- package/docs/architecture/22-website.md +52 -20
- package/docs/architecture/23-project-harness.md +109 -37
- package/docs/architecture/26-code.md +20 -5
- package/docs/architecture/27-personal.md +23 -8
- package/docs/architecture/28-autoresearch.md +18 -12
- package/docs/architecture/INDEX.md +1 -2
- package/docs/architecture/prompts/11-first-sdk-harness.md +9 -9
- package/docs/architecture/prompts/16-parallel-swarm.md +46 -13
- package/docs/architecture/prompts/22-autoresearch.md +9 -2
- package/docs/architecture/prompts/source-manifest.json +76 -52
- package/docs/architecture/source-map.json +445 -105
- package/docs/designs/core-harness/01-core.md +2 -2
- package/docs/designs/core-harness/06-project-harness.md +3 -3
- package/docs/designs/core-harness/README.md +2 -2
- package/docs/en/agents.md +1 -1
- package/docs/en/autoresearch.md +41 -0
- package/docs/en/blog/100b-tokens.md +157 -0
- package/docs/en/build-your-harness.md +47 -22
- package/docs/en/changelog.md +29 -1
- package/docs/en/first-harness.md +40 -32
- package/docs/en/harnesses/index.md +23 -23
- package/docs/en/harnesses/lead-worker.md +1 -1
- package/docs/en/harnesses/peermesh.md +2 -2
- package/docs/en/harnesses/subagents.md +10 -31
- package/docs/en/harnesses/substrate.md +4 -4
- package/docs/en/harnesses/taskpool.md +2 -2
- package/docs/en/latest.md +30 -5
- package/docs/en/overview.md +22 -22
- package/docs/en/quickstart.md +69 -56
- package/docs/en/reference/api.md +1 -1
- package/docs/en/reference/cli.md +47 -85
- package/docs/en/sandbox.md +3 -3
- package/docs/en/trace-viewer.md +32 -12
- package/docs/operations/trace-viewer.md +26 -11
- package/docs/third-party-notices.md +0 -1
- package/docs/workflows/development.md +160 -118
- package/docs/workflows/release-and-docs-versioning.md +207 -54
- package/docs/workflows/release-cli-acceptance.md +162 -0
- package/docs/zh/agents.md +1 -1
- package/docs/zh/autoresearch.md +41 -0
- package/docs/zh/blog/100b-tokens.md +102 -0
- package/docs/zh/build-your-harness.md +48 -23
- package/docs/zh/changelog.md +29 -1
- package/docs/zh/first-harness.md +43 -35
- package/docs/zh/harnesses/index.md +23 -23
- package/docs/zh/harnesses/lead-worker.md +1 -1
- package/docs/zh/harnesses/peermesh.md +2 -2
- package/docs/zh/harnesses/subagents.md +10 -31
- package/docs/zh/harnesses/substrate.md +4 -4
- package/docs/zh/harnesses/taskpool.md +2 -2
- package/docs/zh/latest.md +30 -5
- package/docs/zh/overview.md +23 -23
- package/docs/zh/quickstart.md +66 -57
- package/docs/zh/reference/api.md +1 -1
- package/docs/zh/reference/cli.md +19 -79
- package/docs/zh/sandbox.md +3 -3
- package/docs/zh/trace-viewer.md +32 -12
- package/examples/README.md +138 -77
- package/examples/authoring/README.md +4 -4
- package/examples/autoresearch/README.md +108 -16
- package/examples/autoresearch/REQUIREMENTS.zh.md +13 -12
- package/examples/autoresearch/config.ts +64 -25
- package/examples/autoresearch/demo.ts +75 -22
- package/examples/autoresearch/eject.json +2 -0
- package/examples/autoresearch/frontiercs2-config.ts +15 -0
- package/examples/autoresearch/frontiercs2.ts +64 -11
- package/examples/autoresearch/prepare-demo.ts +44 -0
- package/examples/autoresearch/prepare.ts +134 -60
- package/examples/autoresearch/project.ts +120 -44
- package/examples/autoresearch/research-service.ts +91 -41
- package/examples/code/README.md +25 -17
- package/examples/code/REQUIREMENTS.zh.md +3 -3
- package/examples/first-harness/AGENTS.md +25 -0
- package/examples/first-harness/README.md +136 -0
- package/examples/first-harness/config.ts +41 -27
- package/examples/first-harness/eject.json +14 -0
- package/examples/first-harness/handoff.ts +3 -3
- package/examples/first-harness/harness.ts +104 -72
- package/examples/first-harness/input/README.md +7 -0
- package/examples/first-harness/session.ts +2 -1
- package/examples/first-harness/tsconfig.json +2 -1
- package/examples/harness-session/README.md +4 -4
- package/examples/lead-worker/README.md +1 -1
- package/examples/messages/README.md +2 -2
- package/examples/notes/README.md +5 -5
- package/examples/parallel-swarm/AGENTS.md +32 -0
- package/examples/parallel-swarm/README.md +136 -0
- package/examples/parallel-swarm/board-service.ts +28 -9
- package/examples/parallel-swarm/board.ts +107 -13
- package/examples/parallel-swarm/config.ts +47 -0
- package/examples/parallel-swarm/eject.json +5 -0
- package/examples/parallel-swarm/harness.ts +83 -71
- package/examples/parallel-swarm/report.ts +33 -0
- package/examples/peermesh/README.md +1 -1
- package/examples/services/agent-control/README.md +1 -1
- package/examples/services/mathlib-search/README.md +1 -1
- package/examples/services/mcp-managed/README.md +1 -1
- package/examples/services/persistent-board/README.md +6 -3
- package/examples/subagents/AGENTS.md +35 -0
- package/examples/subagents/README.md +129 -93
- package/examples/subagents/config.ts +9 -15
- package/examples/subagents/eject.json +17 -0
- package/examples/subagents/handoff-config.ts +14 -0
- package/examples/subagents/model.ts +20 -0
- package/examples/substrate/README.md +12 -6
- package/examples/super/README.md +34 -22
- package/examples/super/actions.ts +11 -11
- package/examples/super/config.ts +3 -3
- package/examples/super/eject.json +1 -1
- package/examples/super/location.ts +1 -1
- package/examples/super/operator.ts +28 -0
- package/examples/super/project.ts +1 -3
- package/examples/taskpool/README.md +1 -1
- package/npm-shrinkwrap.development.json +46 -1538
- package/npm-shrinkwrap.json +10 -43
- package/package.development.json +3 -6
- package/package.json +3 -5
- package/scripts/anyswarm-arguments.ts +67 -96
- package/scripts/anyswarm-eject.ts +1 -1
- package/scripts/anyswarm-harnesses.ts +1 -18
- package/scripts/anyswarm-installation.ts +18 -294
- package/scripts/anyswarm-launch.ts +30 -102
- package/scripts/anyswarm-progress.ts +125 -0
- package/scripts/anyswarm-project.ts +31 -123
- package/scripts/anyswarm-source-runner.ts +9 -36
- package/scripts/anyswarm.ts +4 -24
- package/scripts/generate-architecture-coverage.ts +1 -1
- package/scripts/generate-architecture-prompts.ts +21 -10
- package/scripts/local-environment.ts +79 -21
- package/scripts/local-setup.ts +150 -105
- package/scripts/pack-release.ts +28 -4
- package/src/core/index.ts +1 -1
- package/src/core/sandbox/opensandbox-backend.ts +10 -4
- package/src/core/sandbox/sandbox-connection.ts +22 -7
- package/src/core/worker-image.ts +1 -1
- package/src/harness/project-harness.ts +5 -4
- package/src/harness/project-rpc-client.ts +23 -0
- package/src/harness/project-runtime.ts +2 -1
- package/src/harness/typescript-loader.ts +28 -8
- package/src/trace-viewer/command.mjs +6 -3
- package/src/trace-viewer/public/app.js +239 -59
- package/src/trace-viewer/public/index.html +5 -0
- package/src/trace-viewer/public/style.css +22 -0
- package/src/trace-viewer/reader.mjs +242 -26
- package/src/trace-viewer/run-root.d.mts +1 -0
- package/src/trace-viewer/run-root.mjs +7 -0
- package/src/trace-viewer/server.mjs +3 -1
- package/dist/scripts/anyswarm-applications.d.ts +0 -19
- package/dist/scripts/anyswarm-applications.js +0 -19
- package/dist/scripts/anyswarm-tui-config.d.ts +0 -36
- package/dist/scripts/anyswarm-tui-config.js +0 -189
- package/dist/scripts/anyswarm-tui-session.d.ts +0 -66
- package/dist/scripts/anyswarm-tui-session.js +0 -304
- package/dist/scripts/anyswarm-tui-terminal.d.ts +0 -41
- package/dist/scripts/anyswarm-tui-terminal.js +0 -154
- package/dist/scripts/anyswarm-tui.d.ts +0 -2
- package/dist/scripts/anyswarm-tui.js +0 -1012
- package/docs/architecture/25-foreground-tui.md +0 -51
- package/scripts/anyswarm-applications.ts +0 -39
- package/scripts/anyswarm-tui-config.ts +0 -174
- package/scripts/anyswarm-tui-session.ts +0 -295
- package/scripts/anyswarm-tui-terminal.ts +0 -147
- package/scripts/anyswarm-tui.ts +0 -912
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
import { resolve } from 'node:path';
|
|
2
1
|
import { frameworkErrorFields } from '../src/core/error-diagnostics.js';
|
|
3
|
-
import { captureHarnessSnapshot,
|
|
2
|
+
import { captureHarnessSnapshot, failureCode, getHarnessExitCode, stopHarnessTransport } from '../src/harness/project-harness.js';
|
|
4
3
|
import { resolveHarnessInput } from '../src/harness/project-input.js';
|
|
5
4
|
import { runProjectRpc } from '../src/harness/project-rpc.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { actionReport, actionRun, configuredStopTimeout, harnessLifetime, loadHarness, requestedTraceRoot, splitInput } from './anyswarm-launch.js';
|
|
9
|
-
import { LauncherConfiguration } from './anyswarm-tui-config.js';
|
|
5
|
+
import { prepareProjectLaunch } from './anyswarm-launch.js';
|
|
6
|
+
import { foregroundProgress } from './anyswarm-progress.js';
|
|
10
7
|
const MAX_QUEUED_OUTPUT_BYTES = 1_048_576;
|
|
11
8
|
const MAX_OUTPUT_RECORD_BYTES = 8 * 1024 * 1024;
|
|
12
9
|
const OUTPUT_FLUSH_TIMEOUT_MS = 5_000;
|
|
13
10
|
export async function runProjectCommand(command, launchDirectory, options = {}) {
|
|
11
|
+
const human = command.mode === 'foreground' && process.stdout.isTTY;
|
|
14
12
|
const stdout = process.stdout.write;
|
|
15
13
|
const transport = stdout.bind(process.stdout);
|
|
16
14
|
const startup = new AbortController();
|
|
17
15
|
let session;
|
|
18
16
|
let signalCode;
|
|
19
17
|
let outputFailed = false;
|
|
20
|
-
let
|
|
21
|
-
let trace;
|
|
22
|
-
let unsubscribeTrace;
|
|
18
|
+
let progress;
|
|
23
19
|
let lastWrite;
|
|
24
20
|
const outputQueue = [];
|
|
25
21
|
let queuedBytes = 0;
|
|
@@ -70,18 +66,9 @@ export async function runProjectCommand(command, launchDirectory, options = {})
|
|
|
70
66
|
flushing = false;
|
|
71
67
|
}
|
|
72
68
|
}
|
|
73
|
-
const
|
|
69
|
+
const enqueue = (data, replaceableState = false) => {
|
|
74
70
|
if (outputFailed)
|
|
75
71
|
return Promise.resolve();
|
|
76
|
-
let encoded;
|
|
77
|
-
try {
|
|
78
|
-
encoded = JSON.stringify(record);
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
pipeFailed();
|
|
82
|
-
return Promise.resolve();
|
|
83
|
-
}
|
|
84
|
-
const data = encoded + '\n';
|
|
85
72
|
const bytes = Buffer.byteLength(data);
|
|
86
73
|
const last = outputQueue.at(-1);
|
|
87
74
|
const replace = replaceableState && last?.replaceableState ? last : undefined;
|
|
@@ -103,6 +90,15 @@ export async function runProjectCommand(command, launchDirectory, options = {})
|
|
|
103
90
|
void flushOutput();
|
|
104
91
|
return lastWrite;
|
|
105
92
|
};
|
|
93
|
+
const write = (record, replaceableState = false) => {
|
|
94
|
+
try {
|
|
95
|
+
return enqueue(JSON.stringify(record) + '\n', replaceableState);
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
pipeFailed();
|
|
99
|
+
return Promise.resolve();
|
|
100
|
+
}
|
|
101
|
+
};
|
|
106
102
|
const ignoreDiagnosticError = () => { };
|
|
107
103
|
process.on('SIGINT', signal);
|
|
108
104
|
process.on('SIGTERM', signal);
|
|
@@ -114,64 +110,27 @@ export async function runProjectCommand(command, launchDirectory, options = {})
|
|
|
114
110
|
const stopped = Promise.withResolvers();
|
|
115
111
|
const abortStartup = () => stopped.reject(startup.signal.reason);
|
|
116
112
|
startup.signal.addEventListener('abort', abortStartup, { once: true });
|
|
117
|
-
|
|
118
|
-
const loaded = options.action?.loaded ?? (command.defaults
|
|
119
|
-
? await loadHarness(launchDirectory, command.harness, options) : undefined);
|
|
120
|
-
const definition = loaded?.definition ?? await loadProjectHarness(launchDirectory, command.harness, builtins, options);
|
|
121
|
-
const config = { launchDirectory, configPath: command.configPath, outputRoot: command.outputRoot,
|
|
122
|
-
lifetime: command.lifetime, clientCapabilities: { questions: command.mode !== 'headless' && command.interaction === 'questions' } };
|
|
123
|
-
if (!command.defaults)
|
|
124
|
-
return createHarnessSession(definition, config);
|
|
125
|
-
const launcher = new LauncherConfiguration(command.harness, command.harness, launchDirectory, 'cwd' in command ? command.cwd : undefined, command.configPath);
|
|
126
|
-
let configuration = options.action?.run.configuration;
|
|
127
|
-
if (!options.action) {
|
|
128
|
-
await launcher.refresh();
|
|
129
|
-
if (launcher.error)
|
|
130
|
-
throw new Error(launcher.error);
|
|
131
|
-
configuration = launcher.configuration;
|
|
132
|
-
if (!workspace && loaded?.workspace && command.mode !== 'rpc') {
|
|
133
|
-
workspace = loaded.workspace({ cwd: launcher.workspace, configuration });
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
const lifetime = harnessLifetime(definition, command.lifetime, findApplication(command.harness)?.lifetime);
|
|
137
|
-
return createHarnessSession(definition, { ...config, configPath: undefined, configuration, lifetime,
|
|
138
|
-
stopTimeoutMs: configuredStopTimeout(configuration) });
|
|
139
|
-
};
|
|
113
|
+
let launch;
|
|
140
114
|
try {
|
|
141
|
-
|
|
115
|
+
launch = await Promise.race([prepareProjectLaunch(command, launchDirectory, options, startup.signal), stopped.promise]);
|
|
116
|
+
session = launch.session;
|
|
142
117
|
startup.signal.throwIfAborted();
|
|
143
118
|
}
|
|
144
119
|
finally {
|
|
145
120
|
startup.signal.removeEventListener('abort', abortStartup);
|
|
146
121
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
return;
|
|
150
|
-
const root = requestedTraceRoot(event.event, event.runId);
|
|
151
|
-
if (!root)
|
|
152
|
-
return;
|
|
153
|
-
const modulePath = '../src/trace-viewer/server.mjs';
|
|
154
|
-
trace = import(modulePath).then(async ({ startTraceServer }) => {
|
|
155
|
-
const viewer = await startTraceServer({ root, port: 0 });
|
|
156
|
-
console.error('Live Trace URL ' + viewer.url);
|
|
157
|
-
return { root, close: () => viewer.close() };
|
|
158
|
-
}).catch(() => {
|
|
159
|
-
console.error('Could not open the live Trace Viewer. Replay this Run from its records.');
|
|
160
|
-
return undefined;
|
|
161
|
-
});
|
|
162
|
-
}, { initialSnapshot: false });
|
|
163
|
-
const input = command.mode !== 'rpc'
|
|
164
|
-
? resolveHarnessInput({ cwd: workspace, prompt: command.prompt }, launchDirectory)
|
|
165
|
-
: undefined;
|
|
166
|
-
if (command.mode === 'rpc' || (command.mode === 'foreground' && (command.lifetime === 'interactive' || command.interaction === 'questions'))) {
|
|
167
|
-
const code = await runProjectRpc(session, process.stdin, write, launchDirectory, input);
|
|
122
|
+
if (command.mode === 'rpc') {
|
|
123
|
+
const code = await runProjectRpc(session, process.stdin, write, launchDirectory);
|
|
168
124
|
await lastWrite;
|
|
169
125
|
return signalCode ?? (outputFailed ? 1 : code);
|
|
170
126
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
127
|
+
if (human)
|
|
128
|
+
progress = foregroundProgress(session, launch.harnessId, launchDirectory, command.outputRoot, message => enqueue(message + '\n'));
|
|
129
|
+
const input = resolveHarnessInput({ cwd: launch.cwd, prompt: command.prompt }, launchDirectory);
|
|
130
|
+
const unsubscribe = progress && session.onEvent(progress.observe, {
|
|
131
|
+
initialSnapshot: false,
|
|
132
|
+
onError: () => { void enqueue('Live progress unavailable. Follow the Run in Trace.\n'); },
|
|
133
|
+
});
|
|
175
134
|
let result;
|
|
176
135
|
try {
|
|
177
136
|
await session.start(input, { requestId: 'foreground-start' });
|
|
@@ -180,23 +139,28 @@ export async function runProjectCommand(command, launchDirectory, options = {})
|
|
|
180
139
|
finally {
|
|
181
140
|
unsubscribe?.();
|
|
182
141
|
}
|
|
183
|
-
|
|
142
|
+
if (progress)
|
|
143
|
+
await progress.finish(result);
|
|
144
|
+
else
|
|
145
|
+
await write({ type: 'result', runId: result.runId, result });
|
|
184
146
|
return signalCode ?? (outputFailed ? 1 : getHarnessExitCode(session));
|
|
185
147
|
}
|
|
186
148
|
catch (error) {
|
|
187
149
|
if (!startup.signal.aborted) {
|
|
188
150
|
const code = failureCode(error, 'HARNESS_COMMAND_FAILED');
|
|
189
|
-
|
|
151
|
+
const message = error instanceof Error ? error.message : undefined;
|
|
152
|
+
if (human) {
|
|
153
|
+
if (progress)
|
|
154
|
+
await progress.fail(code, message);
|
|
155
|
+
else
|
|
156
|
+
console.error(code + (message ? ' ' + message : ''));
|
|
157
|
+
}
|
|
158
|
+
else
|
|
159
|
+
await write({ type: 'error', code, ...(message ? { message } : {}), ...frameworkErrorFields(error) });
|
|
190
160
|
}
|
|
191
161
|
return signalCode ?? (outputFailed ? 1 : 2);
|
|
192
162
|
}
|
|
193
163
|
finally {
|
|
194
|
-
unsubscribeTrace?.();
|
|
195
|
-
const viewer = await trace;
|
|
196
|
-
if (viewer) {
|
|
197
|
-
await viewer.close().catch(() => { });
|
|
198
|
-
console.error('Replay with anys trace --root ' + JSON.stringify(viewer.root));
|
|
199
|
-
}
|
|
200
164
|
process.stdout.write = stdout;
|
|
201
165
|
process.off('SIGINT', signal);
|
|
202
166
|
process.off('SIGTERM', signal);
|
|
@@ -204,54 +168,3 @@ export async function runProjectCommand(command, launchDirectory, options = {})
|
|
|
204
168
|
process.stderr.off('error', ignoreDiagnosticError);
|
|
205
169
|
}
|
|
206
170
|
}
|
|
207
|
-
export async function runHarnessAction(command, launchDirectory, options) {
|
|
208
|
-
const controller = new AbortController();
|
|
209
|
-
let exitCode = 0;
|
|
210
|
-
let start;
|
|
211
|
-
const cancel = (signal) => {
|
|
212
|
-
exitCode ||= signal === 'SIGINT' ? 130 : 143;
|
|
213
|
-
controller.abort();
|
|
214
|
-
};
|
|
215
|
-
const stdout = process.stdout.write;
|
|
216
|
-
process.stdout.write = process.stderr.write.bind(process.stderr);
|
|
217
|
-
process.on('SIGINT', cancel).on('SIGTERM', cancel);
|
|
218
|
-
try {
|
|
219
|
-
const loaded = await loadHarness(launchDirectory, command.harness, options);
|
|
220
|
-
const [name, args] = splitInput(command.slash.slice(1));
|
|
221
|
-
const handler = loaded.actions.get(name);
|
|
222
|
-
if (!handler)
|
|
223
|
-
throw new Error('Harness has no standalone /' + name + ' action.');
|
|
224
|
-
const launcher = new LauncherConfiguration(command.harness, command.harness, launchDirectory, command.cwd, command.configPath);
|
|
225
|
-
await launcher.refresh();
|
|
226
|
-
if (launcher.error && launcher.path)
|
|
227
|
-
throw new Error(launcher.error);
|
|
228
|
-
controller.signal.throwIfAborted();
|
|
229
|
-
const result = await handler({ cwd: launcher.workspace, configuration: launcher.configuration,
|
|
230
|
-
signal: controller.signal, outputRoot: command.outputRoot && resolve(launchDirectory, command.outputRoot), args });
|
|
231
|
-
controller.signal.throwIfAborted();
|
|
232
|
-
const run = actionRun(result);
|
|
233
|
-
if (run)
|
|
234
|
-
start = { run: { ...run, configuration: run.configuration ?? launcher.configuration }, loaded };
|
|
235
|
-
else if (result !== undefined) {
|
|
236
|
-
const report = actionReport(result);
|
|
237
|
-
const output = report ? report.result : result;
|
|
238
|
-
await new Promise((done, reject) => {
|
|
239
|
-
stdout.call(process.stdout, JSON.stringify(output) + '\n', undefined, error => error ? reject(error) : done());
|
|
240
|
-
});
|
|
241
|
-
exitCode ||= report?.exitCode ?? 0;
|
|
242
|
-
}
|
|
243
|
-
if (!start)
|
|
244
|
-
return exitCode;
|
|
245
|
-
}
|
|
246
|
-
catch (error) {
|
|
247
|
-
if (!exitCode)
|
|
248
|
-
console.error(error instanceof Error ? error.message : 'Harness action failed.');
|
|
249
|
-
return exitCode || 1;
|
|
250
|
-
}
|
|
251
|
-
finally {
|
|
252
|
-
process.stdout.write = stdout;
|
|
253
|
-
process.off('SIGINT', cancel).off('SIGTERM', cancel);
|
|
254
|
-
}
|
|
255
|
-
return runProjectCommand({ ...command, defaults: true, command: 'harness', mode: 'headless',
|
|
256
|
-
cwd: start.run.cwd, prompt: start.run.prompt }, launchDirectory, { ...options, action: start });
|
|
257
|
-
}
|
|
@@ -5,7 +5,7 @@ import { closeSync, mkdtempSync, openSync, readSync, rmdirSync, unlinkSync, writ
|
|
|
5
5
|
import { tmpdir } from 'node:os';
|
|
6
6
|
import { verifyExportedSdk } from './anyswarm-eject.js';
|
|
7
7
|
import { installSourceLoader } from '../src/harness/typescript-loader.js';
|
|
8
|
-
import {
|
|
8
|
+
import { parseSourceHarnessCommand } from './anyswarm-arguments.js';
|
|
9
9
|
const [, , entry, ...args] = process.argv;
|
|
10
10
|
if (!entry)
|
|
11
11
|
throw new TypeError('A TypeScript or JavaScript entry file is required');
|
|
@@ -13,14 +13,9 @@ const filename = resolve(entry);
|
|
|
13
13
|
const entryUrl = pathToFileURL(filename).href;
|
|
14
14
|
process.argv = [process.execPath, filename, ...args];
|
|
15
15
|
installSourceLoader();
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const modernFlags = args.some(arg => /^--(?:headless|rpc|cmd)(?:=|$)/.test(arg));
|
|
19
|
-
const hasPrompt = args.some(arg => arg === '--prompt' || arg.startsWith('--prompt='));
|
|
20
|
-
const outputsRecords = !hasOption('--mode', 'tui') &&
|
|
21
|
-
(hasPrompt || hasOption('--mode', 'foreground') || hasOption('--mode', 'rpc'));
|
|
16
|
+
const hasPrompt = args.some(arg => /^--prompt(?:=|$)/.test(arg));
|
|
17
|
+
const hasMode = args.some(arg => /^--mode(?:=|$)/.test(arg));
|
|
22
18
|
const isHarness = (source) => source.default?.apiVersion === 1 && typeof source.default.run === 'function';
|
|
23
|
-
const isInteractiveOnly = (harness) => harness.lifetimes?.includes('interactive') && !harness.lifetimes.includes('task');
|
|
24
19
|
async function importWithDiagnostics(load, useStderr = true) {
|
|
25
20
|
if (!useStderr)
|
|
26
21
|
return load();
|
|
@@ -144,7 +139,7 @@ async function importImplicitSource(load) {
|
|
|
144
139
|
let destination = process.stderr;
|
|
145
140
|
try {
|
|
146
141
|
const source = await load();
|
|
147
|
-
if (!isHarness(source)
|
|
142
|
+
if (!isHarness(source))
|
|
148
143
|
destination = process.stdout;
|
|
149
144
|
else if (interactiveOutput) {
|
|
150
145
|
throw new Error('Use an explicit --prompt for a task Harness that writes to stdout while reading stdin during import.');
|
|
@@ -190,40 +185,13 @@ try {
|
|
|
190
185
|
}
|
|
191
186
|
}
|
|
192
187
|
const load = () => import(entryUrl);
|
|
193
|
-
const
|
|
194
|
-
const probeSourceOutput = modernFlags || (args.length === 0 && /\.(?:ts|mts)$/.test(filename)) ||
|
|
195
|
-
(!interactive && !outputsRecords && args.length > 0);
|
|
196
|
-
const source = await (probeSourceOutput ? importImplicitSource(load) : importWithDiagnostics(load, outputsRecords));
|
|
188
|
+
const source = await (hasPrompt || hasMode ? importWithDiagnostics(load) : importImplicitSource(load));
|
|
197
189
|
if (isHarness(source)) {
|
|
190
|
+
const command = parseSourceHarnessCommand(args, filename);
|
|
198
191
|
const diagnostics = { onSourceError(error) { console.error(error instanceof Error ? error.stack : String(error)); } };
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
const code = await runHarnessSelection(parseHarnessSelection(args, filename), process.cwd(), diagnostics);
|
|
203
|
-
process.stdout.write('', () => process.exit(code));
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
const command = parseAnySwarmCommand(['--harness', filename,
|
|
207
|
-
...(args.length || isInteractiveOnly(source.default) ? args : ['--prompt', 'Run this Harness.'])]);
|
|
208
|
-
if ('help' in command) {
|
|
209
|
-
console.log(command.help);
|
|
210
|
-
}
|
|
211
|
-
else if (command.command === 'tui') {
|
|
212
|
-
const { runAnySwarmTui } = await import('./anyswarm-tui.js');
|
|
213
|
-
process.exit(await runAnySwarmTui(command, process.cwd()));
|
|
214
|
-
}
|
|
215
|
-
else if (command.command === 'harness') {
|
|
216
|
-
if (command.configPath) {
|
|
217
|
-
const configPath = resolve(command.configPath);
|
|
218
|
-
const { loadAnySwarmConfig } = await import('../src/core/sandbox/sandbox-connection.js');
|
|
219
|
-
await importWithDiagnostics(() => loadAnySwarmConfig(configPath));
|
|
220
|
-
}
|
|
221
|
-
const { runProjectCommand } = await import('./anyswarm-project.js');
|
|
222
|
-
process.exitCode = await runProjectCommand(command, process.cwd(), diagnostics);
|
|
223
|
-
}
|
|
224
|
-
else
|
|
225
|
-
throw new TypeError('Harness arguments must use TUI, foreground or RPC options');
|
|
226
|
-
}
|
|
192
|
+
const { runProjectCommand } = await import('./anyswarm-project.js');
|
|
193
|
+
const code = await runProjectCommand(command, process.cwd(), diagnostics);
|
|
194
|
+
process.stdout.write('', () => process.exit(code));
|
|
227
195
|
}
|
|
228
196
|
}
|
|
229
197
|
catch (error) {
|
package/dist/scripts/anyswarm.js
CHANGED
|
@@ -3,7 +3,6 @@ import { readFile, realpath } from 'node:fs/promises';
|
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
4
|
import { pathToFileURL } from 'node:url';
|
|
5
5
|
import { parseAnySwarmCommand } from './anyswarm-arguments.js';
|
|
6
|
-
import { builtins } from './anyswarm-harnesses.js';
|
|
7
6
|
const args = process.argv.slice(2);
|
|
8
7
|
if (args.length === 1 && args[0] === '--version') {
|
|
9
8
|
const manifest = JSON.parse(await readFile(new URL('../../package.json', import.meta.url), 'utf8'));
|
|
@@ -28,7 +27,7 @@ else if (args[0] === 'trace') {
|
|
|
28
27
|
else {
|
|
29
28
|
let command;
|
|
30
29
|
try {
|
|
31
|
-
command = parseAnySwarmCommand(args
|
|
30
|
+
command = parseAnySwarmCommand(args);
|
|
32
31
|
}
|
|
33
32
|
catch (error) {
|
|
34
33
|
console.error(error.message);
|
|
@@ -36,28 +35,6 @@ else {
|
|
|
36
35
|
}
|
|
37
36
|
if (command && 'help' in command)
|
|
38
37
|
console.log(command.help);
|
|
39
|
-
if (command && 'command' in command && command.command === 'tui') {
|
|
40
|
-
let code = 2;
|
|
41
|
-
try {
|
|
42
|
-
const { runAnySwarmTui } = await import('./anyswarm-tui.js');
|
|
43
|
-
code = await runAnySwarmTui(command, process.cwd());
|
|
44
|
-
}
|
|
45
|
-
catch {
|
|
46
|
-
console.error('Could not load the TUI. Reinstall @anyswarm/core or use explicit foreground or RPC mode.');
|
|
47
|
-
}
|
|
48
|
-
process.exit(code);
|
|
49
|
-
}
|
|
50
|
-
if (command && 'command' in command && command.command === 'use') {
|
|
51
|
-
try {
|
|
52
|
-
const { runHarnessSelection } = await import('./anyswarm-launch.js');
|
|
53
|
-
const code = await runHarnessSelection(command, process.cwd());
|
|
54
|
-
process.stdout.write('', () => process.exit(code));
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
console.error(error instanceof Error ? error.message : 'Could not launch the requested Harness.');
|
|
58
|
-
process.exitCode = 1;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
38
|
if (command && 'command' in command && command.command === 'run') {
|
|
62
39
|
try {
|
|
63
40
|
const { runSourceCommand } = await import('./anyswarm-author.js');
|
|
@@ -117,9 +94,12 @@ else {
|
|
|
117
94
|
process.on('SIGTERM', interrupt);
|
|
118
95
|
try {
|
|
119
96
|
const report = command.command === 'update'
|
|
120
|
-
? await (await import('./anyswarm-installation.js')).updateAnySwarm(
|
|
97
|
+
? await (await import('./anyswarm-installation.js')).updateAnySwarm(controller.signal)
|
|
121
98
|
: await (await import('./local-setup.js')).runLocalCommand(command, controller.signal, command.command === 'setup' || process.stderr.isTTY ? message => console.error(message) : undefined);
|
|
122
|
-
|
|
99
|
+
if (command.command === 'update' && process.stdout.isTTY)
|
|
100
|
+
console.log(report.detail);
|
|
101
|
+
else
|
|
102
|
+
console.log(JSON.stringify(report, null, 2));
|
|
123
103
|
process.exitCode = signalCode ?? (report.ok ? 0 : 1);
|
|
124
104
|
}
|
|
125
105
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"commit":"
|
|
1
|
+
{"commit":"15e26a33422cec62f67d038eeb10a418df484522","dirty":false}
|
|
@@ -16,7 +16,7 @@ const safe = (path) => typeof path === 'string' && path !== '' && !path.startsWi
|
|
|
16
16
|
// runtime inputs. They can contain dependency symlinks and must never affect
|
|
17
17
|
// the tracked source inventory.
|
|
18
18
|
const skipRoots = new Set(['.git', '.worktree', '.worktrees', '.claude', 'node_modules', 'dist', '.codex', 'docs', 'test', 'test-support', 'experiments', 'reports']);
|
|
19
|
-
const skipPaths = new Set(['third_party/agensh', 'website/.astro', 'website/dist', 'website/node_modules']);
|
|
19
|
+
const skipPaths = new Set(['third_party/agensh', 'website/.astro', 'website/.generated', 'website/dist', 'website/node_modules']);
|
|
20
20
|
async function walk(directory, prefix = '') {
|
|
21
21
|
const files = [];
|
|
22
22
|
for (const entry of await readdir(directory, { withFileTypes: true })) {
|
|
@@ -94,10 +94,11 @@ function header(title, description) {
|
|
|
94
94
|
const outputs = new Map();
|
|
95
95
|
function output(file, text) { outputs.set(`${outputDir}/${file}`, `${text.trimEnd()}\n`); }
|
|
96
96
|
const researchSource = 'examples/autoresearch/project.ts';
|
|
97
|
-
let researchDoc = header('AutoResearch peer instructions', 'All peers receive the same Profile instructions. Their first native input uses the peer label, trusted configuration goal and the Run input.
|
|
97
|
+
let researchDoc = header('AutoResearch peer instructions', 'All peers receive the same Profile instructions. Their first native input uses the peer label, trusted configuration goal and the Run input. Later native inputs choose a fixed nudge based on the shared train allowance. An immutable patch can trigger a review notice by active steer or appended to the next regular input. The demo objective is also the default Run input.');
|
|
98
98
|
researchDoc += block('Shared Profile instruction', evaluate('`' + between(researchSource, 'const instructions = `', '`;') + '`', { candidatePath: '.anyswarm-candidate.patch' }));
|
|
99
99
|
researchDoc += block('Initial peer input', evaluate('`' + between(researchSource, '? `', '`\n', 'const prompt = turn === 0') + '`', { label: '<PEER_LABEL>', config: { goal: '<RESEARCH_GOAL>' }, context: { input: { prompt: '<RUN_INPUT>' } } }));
|
|
100
|
-
researchDoc += block('Follow-up peer input', between(researchSource, ": '", "';",
|
|
100
|
+
researchDoc += block('Follow-up peer input while train is available', between(researchSource, ": '", "';", 'const remainingWork = trainExhausted'));
|
|
101
|
+
researchDoc += block('Follow-up peer input after the train budget is used', between(researchSource, "? '", "'\n", 'const remainingWork = trainExhausted'));
|
|
101
102
|
researchDoc += block('Candidate review notice', evaluate('`' + between(researchSource, 'return `', '`;', 'function reviewNotice') + '`', { candidate: '<CANDIDATE_ID>', sha256: '<CANDIDATE_SHA256>' }));
|
|
102
103
|
researchDoc += block('FrontierCS-2 demo objective', between('examples/autoresearch/config.ts', "export const demoGoal = '", "';"));
|
|
103
104
|
output('22-autoresearch.md', researchDoc);
|
|
@@ -343,16 +344,23 @@ output('11-first-sdk-harness.md', '# First SDK Harness prompts\n\n'
|
|
|
343
344
|
].join('\n'), 'Startup discovery includes the purpose and the description for the operation granted to that Agent.'));
|
|
344
345
|
const parallelHost = 'examples/parallel-swarm/harness.ts';
|
|
345
346
|
const parallelService = 'examples/parallel-swarm/board-service.ts';
|
|
347
|
+
const parallelLiteral = (name) => evaluate(between(parallelHost, `const ${name} = `, ';\n'));
|
|
348
|
+
const researchFocuses = parallelLiteral('researchFocuses');
|
|
349
|
+
const researchTemplate = between(parallelHost, 'runInput(runtime, peer.id,\n `', '`,');
|
|
350
|
+
const synthesisTemplate = between(parallelHost, 'runInput(runtime, synth.id, `', '`,');
|
|
351
|
+
const parallelInput = { input: { prompt: '<ORIGINAL_USER_PROMPT>' } };
|
|
346
352
|
output('16-parallel-swarm.md', '# Parallel Swarm prompts\n\n'
|
|
347
|
-
+ block('Researcher Profile',
|
|
348
|
-
+ block('Synthesizer Profile',
|
|
349
|
-
+ block(
|
|
350
|
-
+ block('Peer review round',
|
|
351
|
-
+ block('Synthesis round',
|
|
353
|
+
+ block('Researcher Profile', parallelLiteral('researcherPrompt'))
|
|
354
|
+
+ block('Synthesizer Profile', parallelLiteral('synthesizerPrompt'))
|
|
355
|
+
+ researchFocuses.map((_, index) => block(`First research round: researcher ${index + 1}`, evaluate('`' + researchTemplate + '`', { context: parallelInput, researchFocuses, index }), 'The user question comes from context.input.prompt; the focus is selected by this researcher’s host-assigned index.')).join('\n')
|
|
356
|
+
+ block('Peer review round', parallelLiteral('reviewInput'), 'The host sends this to all three original researchers only after every first-round contribution passes.')
|
|
357
|
+
+ block('Synthesis round', evaluate('`' + synthesisTemplate + '`', {
|
|
358
|
+
synthesisInput: parallelLiteral('synthesisInput'), context: parallelInput,
|
|
359
|
+
}))
|
|
352
360
|
+ block('Board discovery', [
|
|
353
|
-
between(parallelService,
|
|
354
|
-
between(parallelService,
|
|
355
|
-
between(parallelService,
|
|
361
|
+
evaluate(between(parallelService, 'purpose: ', ',\n')),
|
|
362
|
+
evaluate(between(parallelService, 'description: ', ',\n', "operation: 'publish',")),
|
|
363
|
+
evaluate(between(parallelService, 'description: ', ',\n', "operation: 'search',")),
|
|
356
364
|
].join('\n'), 'Each Profile receives guidance for the admitted operations. The shared board stores the actual authenticated caller.'));
|
|
357
365
|
const durableBoardPath = 'examples/services/persistent-board/run.ts';
|
|
358
366
|
output('17-persistent-board.md', header('Persistent Board Service example prompts', 'The standalone Board example uses the regular startup prompt with distinct grants. It sends publication, independent reading, and reading after publisher replacement through runInput and Runtime.send. Direct and code select an empty local tool set. CLI selects Bash.')
|
|
@@ -80,27 +80,33 @@ export declare function resolveSubagentsEnvironment(config?: Partial<LocalEnviro
|
|
|
80
80
|
};
|
|
81
81
|
mode: "existing" | "local";
|
|
82
82
|
}>;
|
|
83
|
-
export declare function checkSetupHost(
|
|
84
|
-
|
|
85
|
-
}): DiagnosticCheck[];
|
|
83
|
+
export declare function checkSetupHost(): DiagnosticCheck[];
|
|
84
|
+
export declare function checkHostTools(signal: AbortSignal): Promise<DiagnosticCheck[]>;
|
|
86
85
|
export declare function resolveLocalDocker(): Promise<{
|
|
87
86
|
socket: string;
|
|
88
87
|
advertiseHost: string | undefined;
|
|
89
88
|
rootless: boolean;
|
|
89
|
+
clientVersion: string | undefined;
|
|
90
|
+
context: string | undefined;
|
|
91
|
+
engineVersion: string | undefined;
|
|
90
92
|
}>;
|
|
91
93
|
export declare function checkLocalDocker(): Promise<{
|
|
94
|
+
diagnostic: DiagnosticCheck;
|
|
95
|
+
docker?: undefined;
|
|
96
|
+
} | {
|
|
92
97
|
docker: {
|
|
93
98
|
socket: string;
|
|
94
99
|
advertiseHost: string | undefined;
|
|
95
100
|
rootless: boolean;
|
|
101
|
+
clientVersion: string | undefined;
|
|
102
|
+
context: string | undefined;
|
|
103
|
+
engineVersion: string | undefined;
|
|
96
104
|
};
|
|
97
105
|
diagnostic: DiagnosticCheck;
|
|
98
|
-
} | {
|
|
99
|
-
docker?: undefined;
|
|
100
|
-
diagnostic: DiagnosticCheck;
|
|
101
106
|
}>;
|
|
102
107
|
export declare function discoverMacCallback(image: string, signal?: AbortSignal): Promise<string>;
|
|
103
|
-
export declare function checkLocalProvider(config: LocalEnvironmentConfig, { requireAuth }?: {
|
|
108
|
+
export declare function checkLocalProvider(config: LocalEnvironmentConfig, { requireAuth, managed }?: {
|
|
109
|
+
managed?: boolean | undefined;
|
|
104
110
|
requireAuth?: boolean | undefined;
|
|
105
111
|
}): Promise<DiagnosticCheck[]>;
|
|
106
112
|
export declare function ensureLocalProvider(config: LocalEnvironmentConfig, { signal }?: {
|