@anyswarm/core 0.5.0 → 0.5.2
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 +1 -1
- package/README.md +21 -13
- package/deploy/worker/Dockerfile +12 -4
- package/dist/deploy/worker/Dockerfile +12 -4
- package/dist/examples/README.md +35 -12
- package/dist/examples/authoring/README.md +24 -0
- package/dist/examples/authoring/business.d.ts +2 -0
- package/dist/examples/authoring/business.js +4 -0
- package/dist/examples/authoring/config.d.ts +5 -0
- package/dist/examples/authoring/config.js +2 -0
- package/dist/examples/authoring/eject.json +5 -0
- package/dist/examples/authoring/harness.d.ts +4 -0
- package/dist/examples/authoring/harness.js +19 -0
- package/dist/examples/autoresearch/README.md +40 -0
- package/dist/examples/autoresearch/REQUIREMENTS.zh.md +11 -0
- package/dist/examples/autoresearch/config.d.ts +51 -0
- package/dist/examples/autoresearch/config.js +57 -0
- package/dist/examples/autoresearch/demo.d.ts +11 -0
- package/dist/examples/autoresearch/demo.js +52 -0
- package/dist/examples/autoresearch/eject.json +17 -0
- package/dist/examples/autoresearch/frontiercs2-config.d.ts +2 -0
- package/dist/examples/autoresearch/frontiercs2-config.js +3 -0
- package/dist/examples/autoresearch/frontiercs2.d.ts +87 -0
- package/dist/examples/autoresearch/frontiercs2.js +211 -0
- package/dist/examples/autoresearch/prepare-demo.d.ts +1 -0
- package/dist/examples/autoresearch/prepare-demo.js +15 -0
- package/dist/examples/autoresearch/prepare.d.ts +95 -0
- package/dist/examples/autoresearch/prepare.js +257 -0
- package/dist/examples/autoresearch/process.d.ts +13 -0
- package/dist/examples/autoresearch/process.js +48 -0
- package/dist/examples/autoresearch/project.d.ts +21 -0
- package/dist/examples/autoresearch/project.js +392 -0
- package/dist/examples/autoresearch/research-service.d.ts +106 -0
- package/dist/examples/autoresearch/research-service.js +255 -0
- package/dist/examples/code/README.md +33 -0
- package/dist/examples/code/REQUIREMENTS.zh.md +11 -0
- package/dist/examples/code/candidate.d.ts +19 -0
- package/dist/examples/code/candidate.js +80 -0
- package/dist/examples/code/config.d.ts +32 -0
- package/dist/examples/code/config.js +18 -0
- package/dist/examples/code/eject.json +5 -0
- package/dist/examples/code/project.d.ts +3 -0
- package/dist/examples/code/project.js +605 -0
- package/dist/examples/code/prompts.d.ts +5 -0
- package/dist/examples/code/prompts.js +12 -0
- package/dist/examples/code/verification.d.ts +19 -0
- package/dist/examples/code/verification.js +268 -0
- package/dist/examples/code/worktree.d.ts +17 -0
- package/dist/examples/code/worktree.js +233 -0
- package/dist/examples/harness-session/README.md +3 -6
- package/dist/examples/lead-worker/harness/dynamic-scheduler.d.ts +2 -1
- package/dist/examples/lead-worker/harness/dynamic-scheduler.js +5 -2
- package/dist/examples/lead-worker/harness/index.d.ts +60 -0
- package/dist/examples/lead-worker/harness/index.js +77 -6
- package/dist/examples/lead-worker/project.js +2 -2
- package/dist/examples/lead-worker/services/board.d.ts +5 -0
- package/dist/examples/lead-worker/services/board.js +19 -1
- package/dist/examples/messages/README.md +5 -5
- package/dist/examples/messages/handoff.d.ts +2 -0
- package/dist/examples/messages/handoff.js +5 -1
- package/dist/examples/messages/project.js +52 -2
- package/dist/examples/notes/README.md +13 -18
- package/dist/examples/notes/project.js +67 -6
- package/dist/examples/peermesh/harness/router.js +3 -1
- package/dist/examples/peermesh/harness/team.d.ts +8 -0
- package/dist/examples/peermesh/harness/team.js +13 -0
- package/dist/examples/peermesh/project.js +22 -4
- package/dist/examples/services/agent-control/README.md +3 -3
- package/dist/examples/services/mathlib-search/Dockerfile +4 -2
- package/dist/examples/services/mathlib-search/README.md +1 -1
- package/dist/examples/services/mcp-managed/README.md +2 -2
- package/dist/examples/services/persistent-board/README.md +16 -3
- package/dist/examples/services/persistent-board/business.d.ts +7 -0
- package/dist/examples/services/persistent-board/business.js +7 -0
- package/dist/examples/services/persistent-board/index.js +10 -0
- package/dist/examples/services/persistent-board/live.d.ts +3 -0
- package/dist/examples/services/persistent-board/live.js +58 -0
- package/dist/examples/subagents/README.md +5 -5
- package/dist/examples/subagents/business.js +3 -1
- package/dist/examples/subagents/config.js +3 -3
- package/dist/examples/subagents/harness/controller.d.ts +15 -0
- package/dist/examples/subagents/harness/controller.js +181 -32
- package/dist/examples/subagents/project.d.ts +2 -0
- package/dist/examples/subagents/project.js +43 -34
- package/dist/examples/subagents/prompts/prompts.d.ts +1 -0
- package/dist/examples/subagents/prompts/prompts.js +3 -0
- package/dist/examples/subagents/services/collaboration-service.d.ts +3 -2
- package/dist/examples/subagents/services/collaboration-service.js +14 -2
- package/dist/examples/substrate/README.md +2 -2
- package/dist/examples/substrate/harness/index.d.ts +1 -1
- package/dist/examples/substrate/harness/index.js +77 -12
- package/dist/examples/substrate/project.js +4 -1
- package/dist/examples/super/README.md +52 -0
- package/dist/examples/super/actions.d.ts +95 -0
- package/dist/examples/super/actions.js +230 -0
- package/dist/examples/super/artifact.d.ts +4 -0
- package/dist/examples/super/artifact.js +51 -0
- package/dist/examples/super/config.d.ts +80 -0
- package/dist/examples/super/config.js +83 -0
- package/dist/examples/super/coordinator.d.ts +33 -0
- package/dist/examples/super/coordinator.js +151 -0
- package/dist/examples/super/daemon.d.ts +11 -0
- package/dist/examples/super/daemon.js +109 -0
- package/dist/examples/super/decisions.d.ts +8 -0
- package/dist/examples/super/decisions.js +52 -0
- package/dist/examples/super/eject.json +5 -0
- package/dist/examples/super/execution.d.ts +11 -0
- package/dist/examples/super/execution.js +136 -0
- package/dist/examples/super/github.d.ts +62 -0
- package/dist/examples/super/github.js +269 -0
- package/dist/examples/super/inbox.d.ts +162 -0
- package/dist/examples/super/inbox.js +284 -0
- package/dist/examples/super/location.d.ts +5 -0
- package/dist/examples/super/location.js +64 -0
- package/dist/examples/super/operator.d.ts +1 -0
- package/dist/examples/super/operator.js +31 -0
- package/dist/examples/super/outbox.d.ts +5 -0
- package/dist/examples/super/outbox.js +103 -0
- package/dist/examples/super/project.d.ts +4 -0
- package/dist/examples/super/project.js +251 -0
- package/dist/examples/super/prompts.d.ts +3 -0
- package/dist/examples/super/prompts.js +25 -0
- package/dist/examples/taskpool/deploy/service-hosts/Dockerfile +4 -2
- package/dist/examples/taskpool/harness/controller.d.ts +35 -6
- package/dist/examples/taskpool/harness/controller.js +73 -7
- package/dist/examples/taskpool/project.js +18 -2
- package/dist/scripts/anyswarm-arguments.d.ts +18 -6
- package/dist/scripts/anyswarm-arguments.js +88 -52
- package/dist/scripts/anyswarm-author.d.ts +5 -0
- package/dist/scripts/anyswarm-author.js +24 -0
- package/dist/scripts/anyswarm-eject.d.ts +11 -0
- package/dist/scripts/anyswarm-eject.js +164 -0
- package/dist/scripts/anyswarm-harnesses.d.ts +1 -0
- package/dist/scripts/anyswarm-harnesses.js +10 -0
- package/dist/scripts/anyswarm-installation.d.ts +7 -40
- package/dist/scripts/anyswarm-installation.js +17 -285
- package/dist/scripts/anyswarm-launch.d.ts +7 -0
- package/dist/scripts/anyswarm-launch.js +37 -0
- package/dist/scripts/anyswarm-progress.d.ts +6 -0
- package/dist/scripts/anyswarm-progress.js +102 -0
- package/dist/scripts/anyswarm-project.d.ts +3 -1
- package/dist/scripts/anyswarm-project.js +49 -35
- package/dist/scripts/anyswarm-source-runner.d.ts +1 -0
- package/dist/scripts/anyswarm-source-runner.js +200 -0
- package/dist/scripts/anyswarm.js +28 -3
- package/dist/scripts/build-provenance.json +1 -0
- package/dist/scripts/build.js +7 -1
- package/dist/scripts/generate-architecture-api.js +2 -0
- package/dist/scripts/generate-architecture-prompts.js +24 -2
- package/dist/scripts/local-environment.d.ts +13 -2
- package/dist/scripts/local-environment.js +111 -28
- package/dist/scripts/local-setup-smoke.js +3 -2
- package/dist/scripts/local-setup-worker.d.ts +1 -1
- package/dist/scripts/local-setup-worker.js +15 -6
- package/dist/scripts/local-setup.d.ts +5 -2
- package/dist/scripts/local-setup.js +167 -79
- package/dist/scripts/opensandbox-agent-worker.js +2 -2
- package/dist/scripts/pack-release.d.ts +1 -0
- package/dist/scripts/pack-release.js +66 -0
- package/dist/scripts/pi-session-bridge.js +11 -3
- package/dist/scripts/run-harness.js +3 -1
- package/dist/scripts/setup-bootstrap.js +43 -6
- package/dist/src/core/allocation-ledger.js +4 -3
- package/dist/src/core/host-identity.d.ts +2 -0
- package/dist/src/core/host-identity.js +11 -0
- package/dist/src/core/index.d.ts +4 -2
- package/dist/src/core/index.js +12 -4
- package/dist/src/core/mcp-service.js +2 -2
- package/dist/src/core/runtime-management.d.ts +6 -0
- package/dist/src/core/runtime-management.js +24 -0
- package/dist/src/core/sandbox/executor-driver.d.ts +4 -2
- package/dist/src/core/sandbox/executor-driver.js +12 -14
- package/dist/src/core/sandbox/local-executor.d.ts +13 -1
- package/dist/src/core/sandbox/local-executor.js +69 -19
- package/dist/src/core/sandbox/local-worker.js +32 -21
- package/dist/src/core/sandbox/opensandbox-backend.d.ts +2 -0
- package/dist/src/core/sandbox/opensandbox-backend.js +36 -11
- package/dist/src/core/sandbox/sandbox-connection.d.ts +2 -0
- package/dist/src/core/sandbox/sandbox-connection.js +14 -6
- package/dist/src/core/service-live-state.d.ts +14 -0
- package/dist/src/core/service-live-state.js +161 -0
- package/dist/src/core/service-observation-types.d.ts +21 -1
- package/dist/src/core/service-process.d.ts +1 -1
- package/dist/src/core/service-process.js +45 -4
- package/dist/src/core/service-types.d.ts +5 -1
- package/dist/src/core/services.d.ts +1 -1
- package/dist/src/core/services.js +8 -3
- package/dist/src/core/types.d.ts +3 -0
- package/dist/src/core/worker-image.js +3 -3
- package/dist/src/harness/harness-session-types.d.ts +10 -0
- package/dist/src/harness/harness-session.js +42 -5
- package/dist/src/harness/project-harness.d.ts +14 -1
- package/dist/src/harness/project-harness.js +38 -12
- package/dist/src/harness/project-input.js +81 -15
- package/dist/src/harness/project-rpc-client.d.ts +1 -0
- package/dist/src/harness/project-rpc-client.js +5 -0
- package/dist/src/harness/project-rpc.d.ts +8 -2
- package/dist/src/harness/project-rpc.js +31 -7
- package/dist/src/harness/project-runtime.js +6 -2
- package/dist/src/harness/typescript-loader.d.ts +2 -0
- package/dist/src/harness/typescript-loader.js +41 -0
- package/dist/src/trace-viewer/public/app.js +6 -5
- package/dist/src/trace-viewer/reader.mjs +42 -2
- package/docs/INDEX.md +5 -2
- package/docs/architecture/00-overview.md +1 -1
- package/docs/architecture/01-agent-core.md +1 -1
- package/docs/architecture/04-services.md +1 -1
- package/docs/architecture/06-observability-experiments.md +1 -1
- package/docs/architecture/07-run-configuration.md +38 -18
- package/docs/architecture/08-prompts.md +22 -0
- package/docs/architecture/10-service-api-reference.md +53 -18
- package/docs/architecture/11-storage-reference.md +18 -1
- package/docs/architecture/12-code-coverage.md +152 -89
- package/docs/architecture/15-core-runtime.md +8 -0
- package/docs/architecture/16-pi-opensandbox-backend.md +5 -5
- package/docs/architecture/17-harness-reporting.md +1 -1
- package/docs/architecture/19-substrate-harness.md +28 -1
- package/docs/architecture/20-lead-worker-harness.md +34 -1
- package/docs/architecture/22-website.md +5 -6
- package/docs/architecture/23-project-harness.md +152 -8
- package/docs/architecture/24-runtime-recovery.md +10 -3
- package/docs/architecture/26-code.md +54 -0
- package/docs/architecture/27-personal.md +58 -0
- package/docs/architecture/28-autoresearch.md +43 -0
- package/docs/architecture/INDEX.md +3 -0
- package/docs/architecture/prompts/08-lead-worker-harness.md +4 -2
- package/docs/architecture/prompts/08-subagents-harness.md +21 -0
- package/docs/architecture/prompts/21-personal.md +44 -0
- package/docs/architecture/prompts/22-autoresearch.md +63 -0
- package/docs/architecture/prompts/26-code.md +55 -0
- package/docs/architecture/prompts/source-manifest.json +152 -33
- package/docs/architecture/source-map.json +473 -25
- package/docs/designs/core-harness/01-core.md +2 -2
- package/docs/designs/core-harness/06-project-harness.md +13 -2
- package/docs/designs/core-harness/README.md +7 -2
- package/docs/en/agents.md +1 -1
- package/docs/en/build-your-harness.md +3 -5
- package/docs/en/changelog.md +20 -4
- package/docs/en/first-harness.md +9 -12
- package/docs/en/harnesses/lead-worker.md +1 -1
- package/docs/en/harnesses/peermesh.md +2 -2
- package/docs/en/harnesses/subagents.md +2 -2
- package/docs/en/harnesses/substrate.md +4 -4
- package/docs/en/harnesses/taskpool.md +2 -2
- package/docs/en/latest.md +14 -121
- package/docs/en/overview.md +1 -1
- package/docs/en/quickstart.md +42 -39
- package/docs/en/reference/api.md +14 -4
- package/docs/en/reference/cli.md +53 -47
- package/docs/en/runtime.md +2 -2
- package/docs/en/sandbox.md +3 -3
- package/docs/en/services.md +4 -0
- package/docs/operations/trace-viewer.md +1 -1
- package/docs/workflows/development.md +28 -21
- package/docs/workflows/release-and-docs-versioning.md +77 -0
- package/docs/workflows/release-cli-acceptance.md +85 -0
- package/docs/zh/agents.md +1 -1
- package/docs/zh/build-your-harness.md +3 -5
- package/docs/zh/changelog.md +20 -4
- package/docs/zh/first-harness.md +9 -12
- package/docs/zh/harnesses/lead-worker.md +1 -1
- package/docs/zh/harnesses/peermesh.md +2 -2
- package/docs/zh/harnesses/subagents.md +2 -2
- package/docs/zh/harnesses/substrate.md +4 -4
- package/docs/zh/harnesses/taskpool.md +2 -2
- package/docs/zh/latest.md +15 -122
- package/docs/zh/overview.md +1 -1
- package/docs/zh/quickstart.md +42 -39
- package/docs/zh/reference/api.md +14 -4
- package/docs/zh/reference/cli.md +24 -40
- package/docs/zh/runtime.md +2 -2
- package/docs/zh/sandbox.md +3 -3
- package/docs/zh/services.md +4 -0
- package/examples/README.md +35 -12
- package/examples/authoring/README.md +24 -0
- package/examples/authoring/business.ts +4 -0
- package/examples/authoring/config.ts +2 -0
- package/examples/authoring/eject.json +5 -0
- package/examples/authoring/harness.ts +21 -0
- package/examples/autoresearch/README.md +40 -0
- package/examples/autoresearch/REQUIREMENTS.zh.md +11 -0
- package/examples/autoresearch/config.ts +90 -0
- package/examples/autoresearch/demo.ts +55 -0
- package/examples/autoresearch/eject.json +17 -0
- package/examples/autoresearch/frontiercs2-config.ts +4 -0
- package/examples/autoresearch/frontiercs2.ts +237 -0
- package/examples/autoresearch/prepare-demo.ts +15 -0
- package/examples/autoresearch/prepare.ts +267 -0
- package/examples/autoresearch/process.ts +50 -0
- package/examples/autoresearch/project.ts +380 -0
- package/examples/autoresearch/research-service.ts +302 -0
- package/examples/code/README.md +33 -0
- package/examples/code/REQUIREMENTS.zh.md +11 -0
- package/examples/code/candidate.ts +89 -0
- package/examples/code/config.ts +19 -0
- package/examples/code/eject.json +5 -0
- package/examples/code/project.ts +581 -0
- package/examples/code/prompts.ts +16 -0
- package/examples/code/verification.ts +239 -0
- package/examples/code/worktree.ts +188 -0
- package/examples/harness-session/README.md +3 -6
- package/examples/lead-worker/harness/dynamic-scheduler.ts +6 -3
- package/examples/lead-worker/harness/index.ts +61 -6
- package/examples/lead-worker/project.ts +2 -2
- package/examples/lead-worker/services/board.ts +14 -1
- package/examples/messages/README.md +5 -5
- package/examples/messages/handoff.ts +6 -2
- package/examples/messages/project.ts +47 -2
- package/examples/notes/README.md +13 -18
- package/examples/notes/project.ts +57 -9
- package/examples/peermesh/harness/router.ts +2 -2
- package/examples/peermesh/harness/team.ts +11 -0
- package/examples/peermesh/project.ts +19 -4
- package/examples/services/agent-control/README.md +3 -3
- package/examples/services/mathlib-search/Dockerfile +4 -2
- package/examples/services/mathlib-search/README.md +1 -1
- package/examples/services/mcp-managed/README.md +2 -2
- package/examples/services/persistent-board/README.md +16 -3
- package/examples/services/persistent-board/business.ts +10 -0
- package/examples/services/persistent-board/index.ts +10 -0
- package/examples/services/persistent-board/live.ts +54 -0
- package/examples/subagents/README.md +5 -5
- package/examples/subagents/business.ts +3 -1
- package/examples/subagents/config.ts +4 -3
- package/examples/subagents/harness/controller.ts +161 -29
- package/examples/subagents/project.ts +47 -33
- package/examples/subagents/prompts/prompts.ts +4 -0
- package/examples/subagents/services/collaboration-service.ts +14 -2
- package/examples/substrate/README.md +2 -2
- package/examples/substrate/harness/index.ts +67 -11
- package/examples/substrate/project.ts +5 -1
- package/examples/super/README.md +52 -0
- package/examples/super/actions.ts +196 -0
- package/examples/super/artifact.ts +56 -0
- package/examples/super/config.ts +95 -0
- package/examples/super/coordinator.ts +158 -0
- package/examples/super/daemon.ts +84 -0
- package/examples/super/decisions.ts +46 -0
- package/examples/super/eject.json +5 -0
- package/examples/super/execution.ts +131 -0
- package/examples/super/github.ts +242 -0
- package/examples/super/inbox.ts +306 -0
- package/examples/super/location.ts +54 -0
- package/examples/super/operator.ts +28 -0
- package/examples/super/outbox.ts +97 -0
- package/examples/super/project.ts +225 -0
- package/examples/super/prompts.ts +27 -0
- package/examples/taskpool/deploy/service-hosts/Dockerfile +4 -2
- package/examples/taskpool/harness/controller.ts +59 -7
- package/examples/taskpool/project.ts +18 -2
- package/npm-shrinkwrap.development.json +700 -0
- package/npm-shrinkwrap.json +95 -1969
- package/package.development.json +88 -0
- package/package.json +11 -8
- package/scripts/anyswarm-arguments.ts +91 -54
- package/scripts/anyswarm-author.ts +25 -0
- package/scripts/anyswarm-eject.ts +145 -0
- package/scripts/anyswarm-harnesses.ts +10 -0
- package/scripts/anyswarm-installation.ts +18 -288
- package/scripts/anyswarm-launch.ts +36 -0
- package/scripts/anyswarm-progress.ts +95 -0
- package/scripts/anyswarm-project.ts +35 -34
- package/scripts/anyswarm-source-runner.ts +176 -0
- package/scripts/anyswarm.ts +24 -3
- package/scripts/build.ts +8 -1
- package/scripts/generate-architecture-api.ts +2 -0
- package/scripts/generate-architecture-prompts.ts +35 -2
- package/scripts/local-environment.ts +117 -28
- package/scripts/local-setup-smoke.ts +3 -2
- package/scripts/local-setup-worker.ts +17 -7
- package/scripts/local-setup.ts +166 -73
- package/scripts/opensandbox-agent-worker.ts +2 -2
- package/scripts/pack-release.ts +70 -0
- package/scripts/pi-session-bridge.ts +10 -2
- package/scripts/run-harness.ts +3 -1
- package/scripts/setup-bootstrap.ts +41 -6
- package/src/core/allocation-ledger.ts +5 -3
- package/src/core/host-identity.ts +11 -0
- package/src/core/index.ts +12 -6
- package/src/core/mcp-service.ts +2 -2
- package/src/core/runtime-management.ts +22 -0
- package/src/core/sandbox/executor-driver.ts +15 -18
- package/src/core/sandbox/local-executor.ts +65 -19
- package/src/core/sandbox/local-worker.ts +29 -21
- package/src/core/sandbox/opensandbox-backend.ts +36 -11
- package/src/core/sandbox/sandbox-connection.ts +14 -5
- package/src/core/service-live-state.ts +156 -0
- package/src/core/service-observation-types.ts +23 -1
- package/src/core/service-process.ts +36 -3
- package/src/core/service-types.ts +3 -1
- package/src/core/services.ts +8 -3
- package/src/core/types.ts +3 -0
- package/src/core/worker-image.ts +3 -3
- package/src/harness/harness-session-types.ts +13 -1
- package/src/harness/harness-session.ts +40 -7
- package/src/harness/project-harness.ts +38 -12
- package/src/harness/project-input.ts +73 -15
- package/src/harness/project-rpc-client.ts +5 -0
- package/src/harness/project-rpc.ts +29 -8
- package/src/harness/project-runtime.ts +4 -2
- package/src/harness/typescript-loader.ts +37 -0
- package/src/trace-viewer/public/app.js +6 -5
- package/src/trace-viewer/reader.mjs +42 -2
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { availableParallelism, freemem } from 'node:os';
|
|
2
|
+
import { cp, lstat, mkdir, mkdtemp, readFile, readdir, rename, rm, statfs, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { defaultResearchConnection, frontierBudget, frontierHome, kimiModel } from './config.js';
|
|
5
|
+
import { bridgeDockerfile, bridgeWorkflow, digest, FrontierRun, frontierRevision, frontierTask, installBridge, judgeImages, pumpkinPin } from './frontiercs2.js';
|
|
6
|
+
import { command, requireSuccess } from './process.js';
|
|
7
|
+
const upstream = 'https://github.com/FrontierCS/FrontierCS-2.git';
|
|
8
|
+
const taskPackage = 'tasks/binary_fuse_filter';
|
|
9
|
+
const shared = ['fetch', 'lib', 'shared', taskPackage];
|
|
10
|
+
const GiB = 1024 ** 3;
|
|
11
|
+
const prepareTimeout = 2_700_000;
|
|
12
|
+
const pinFiles = ['.pumpkinversion', 'PUMPKIN.star', 'pumpkin', ...shared];
|
|
13
|
+
export function resourcePlan(budget) {
|
|
14
|
+
const roles = [
|
|
15
|
+
{ role: 'AnySwarm Workers', count: budget.workers, cpu: 2, memoryGiB: 4 },
|
|
16
|
+
{ role: 'Pumpkin submission role', count: 1, cpu: 2, memoryGiB: 4 },
|
|
17
|
+
{ role: 'Active judge', count: 1, cpu: 2, memoryGiB: 4 },
|
|
18
|
+
{ role: 'Host and services headroom', count: 1, cpu: 2, memoryGiB: 2 },
|
|
19
|
+
{ role: 'Image build headroom', count: 1, cpu: 2, memoryGiB: 4 },
|
|
20
|
+
];
|
|
21
|
+
return {
|
|
22
|
+
roles, cpu: roles.reduce((n, role) => n + role.count * role.cpu, 0),
|
|
23
|
+
memoryGiB: roles.reduce((n, role) => n + role.count * role.memoryGiB, 0), diskGiB: 12, gpu: 0,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export async function checkKimiRoute(signal) {
|
|
27
|
+
let model;
|
|
28
|
+
try {
|
|
29
|
+
model = kimiModel();
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
return [{ name: 'kimi-k3-config', ok: false, detail: error.message }];
|
|
33
|
+
}
|
|
34
|
+
const config = { name: 'kimi-k3-config', ok: true, detail: 'Configured provider, model ID and fixed Responses URL.' };
|
|
35
|
+
const name = 'kimi-k3-route';
|
|
36
|
+
try {
|
|
37
|
+
const response = await fetch(model.upstream.url, {
|
|
38
|
+
method: 'HEAD', headers: model.upstream.headers, redirect: 'manual',
|
|
39
|
+
signal: AbortSignal.any([signal, AbortSignal.timeout(5000)]),
|
|
40
|
+
});
|
|
41
|
+
const ok = response.ok || response.status === 405;
|
|
42
|
+
const detail = ok ? `Endpoint responded to HEAD (HTTP ${response.status}).`
|
|
43
|
+
: [401, 403].includes(response.status) ? `HEAD denied (HTTP ${response.status}). Check the proxy's access policy and token.`
|
|
44
|
+
: `Unexpected response to HEAD (HTTP ${response.status}). Check the configured Responses route.`;
|
|
45
|
+
return [config, { name, ok, detail }];
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
signal.throwIfAborted();
|
|
49
|
+
return [config, { name, ok: false, detail: 'Could not reach the Responses route within 5 seconds. Check the endpoint and connectivity.' }];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function paths(home, dockerContext) {
|
|
53
|
+
return { source: join(home, 'bridge'), config: join(home, 'pumpkin.toml'), dockerContext, cache: join(home, 'cache') };
|
|
54
|
+
}
|
|
55
|
+
export async function loadPrepared(home = frontierHome()) {
|
|
56
|
+
const saved = JSON.parse(await readFile(join(home, 'prepared.json'), 'utf8'));
|
|
57
|
+
if (saved.version !== 2 || saved.revision !== frontierRevision || saved.pumpkin !== pumpkinPin ||
|
|
58
|
+
!/^[a-zA-Z0-9._-]+$/.test(saved.dockerContext))
|
|
59
|
+
throw new Error('Run anyswarm autoresearch demo frontiercs2 --prepare to refresh this demo.');
|
|
60
|
+
const locations = paths(home, saved.dockerContext);
|
|
61
|
+
const reference = join(home, 'reference');
|
|
62
|
+
const [bridgeDigest, sourceDigest] = await Promise.all([treeDigest(locations.source), treeDigest(reference)]);
|
|
63
|
+
const activeWorkflow = await readFile(join(locations.source, 'lib', 'fcs.star'), 'utf8');
|
|
64
|
+
const officialWorkflow = await readFile(join(reference, 'lib', 'fcs.star'), 'utf8');
|
|
65
|
+
const roleDockerfile = await readFile(join(locations.source, 'lib', 'anyswarm-bridge', 'Dockerfile'), 'utf8');
|
|
66
|
+
const activeConfig = await readFile(locations.config, 'utf8');
|
|
67
|
+
if (saved.bridgeDigest !== bridgeDigest || saved.sourceDigest !== sourceDigest || activeWorkflow !== bridgeWorkflow(officialWorkflow) ||
|
|
68
|
+
roleDockerfile !== bridgeDockerfile || activeConfig !== pumpkinConfig(saved.dockerContext))
|
|
69
|
+
throw new Error('Prepared FrontierCS-2 materials changed. Refresh with --prepare.');
|
|
70
|
+
const budget = frontierBudget(saved.budget);
|
|
71
|
+
const starter = join(reference, taskPackage, 'repo');
|
|
72
|
+
const tracked = requireSuccess(await command('git', ['ls-files', '--', 'README.md', 'include/binaryfusefilter.h'], { cwd: starter, timeoutMs: 5000 }), 'Validate tracked FrontierCS-2 starter');
|
|
73
|
+
if (!tracked.split('\n').includes('README.md') || !tracked.split('\n').includes('include/binaryfusefilter.h')) {
|
|
74
|
+
throw new Error('The pinned Git starter is missing required tracked files. Refresh with --prepare.');
|
|
75
|
+
}
|
|
76
|
+
return { saved: { ...saved, budget }, paths: locations, budget, starter };
|
|
77
|
+
}
|
|
78
|
+
async function treeDigest(root) {
|
|
79
|
+
const hashes = [];
|
|
80
|
+
async function visit(relative) {
|
|
81
|
+
const absolute = join(root, relative);
|
|
82
|
+
const metadata = await lstat(absolute);
|
|
83
|
+
if (metadata.isDirectory()) {
|
|
84
|
+
for (const item of (await readdir(absolute)).sort())
|
|
85
|
+
await visit(join(relative, item));
|
|
86
|
+
}
|
|
87
|
+
else if (metadata.isFile()) {
|
|
88
|
+
hashes.push({ relative, digest: digest(await readFile(absolute)) });
|
|
89
|
+
}
|
|
90
|
+
else
|
|
91
|
+
throw new Error('Unexpected link or special file in pinned task materials');
|
|
92
|
+
}
|
|
93
|
+
for (const relative of pinFiles)
|
|
94
|
+
await visit(relative);
|
|
95
|
+
return digest(JSON.stringify(hashes));
|
|
96
|
+
}
|
|
97
|
+
async function sourceAt(home, signal) {
|
|
98
|
+
const cached = join(home, 'reference');
|
|
99
|
+
if (await readFile(join(cached, '.pumpkinversion'), 'utf8').catch(() => '') === pumpkinPin + '\n') {
|
|
100
|
+
const head = await command('git', ['rev-parse', 'HEAD'], { cwd: cached, timeoutMs: 5000, signal });
|
|
101
|
+
const status = await command('git', ['status', '--porcelain', '--untracked-files=no'], { cwd: cached, timeoutMs: 10_000, signal });
|
|
102
|
+
if (head.stdout.trim() === frontierRevision && status.code === 0 && !status.stdout.trim())
|
|
103
|
+
return cached;
|
|
104
|
+
throw new Error('Prepared reference source has local changes. Move it aside and re-run --prepare.');
|
|
105
|
+
}
|
|
106
|
+
const temp = await mkdtemp(join(home, 'source-'));
|
|
107
|
+
const git = async (args, timeoutMs) => requireSuccess(await command('git', args, { cwd: temp, timeoutMs, env: { ...process.env, GIT_LFS_SKIP_SMUDGE: '1' }, signal }), 'Prepare pinned FrontierCS-2 source');
|
|
108
|
+
try {
|
|
109
|
+
await git(['init', '--quiet'], 5000);
|
|
110
|
+
await git(['remote', 'add', 'origin', upstream], 5000);
|
|
111
|
+
await git(['fetch', '--quiet', '--filter=blob:none', '--depth=1', 'origin', frontierRevision], 240_000);
|
|
112
|
+
await git(['sparse-checkout', 'set', '--cone', ...shared], 30_000);
|
|
113
|
+
await git(['checkout', '--quiet', '--detach', frontierRevision], 240_000);
|
|
114
|
+
await git(['lfs', 'pull', '--include', shared.map(item => item + '/**').join(',')], 240_000);
|
|
115
|
+
if ((await readFile(join(temp, '.pumpkinversion'), 'utf8')).trim() !== pumpkinPin)
|
|
116
|
+
throw new Error('Unexpected Pumpkin release pin');
|
|
117
|
+
await rename(temp, cached);
|
|
118
|
+
return cached;
|
|
119
|
+
}
|
|
120
|
+
finally {
|
|
121
|
+
await rm(temp, { recursive: true, force: true });
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const pumpkinConfig = (context) => `[docker]\ncontext = ${JSON.stringify(context)}\n\n[providers.local.docker]\n`;
|
|
125
|
+
async function verifyReference(record) {
|
|
126
|
+
const outcome = JSON.parse(await readFile(join(record, 'outcome.json'), 'utf8'));
|
|
127
|
+
const events = (await readFile(join(record, 'log.jsonl'), 'utf8')).trim().split('\n').map(line => JSON.parse(line));
|
|
128
|
+
const actions = events.flatMap(entry => entry.actions ?? []);
|
|
129
|
+
const train = actions.find(action => action.kind === 'start_call' && action.grant === 'train');
|
|
130
|
+
const final = actions.find(action => action.kind === 'start_final_call');
|
|
131
|
+
const submission = outcome.agents?.find((agent) => agent.role === 'agent')?.submission;
|
|
132
|
+
const returned = (job) => events.some(({ event }) => event?.job === job && event.kind === 'call_returned');
|
|
133
|
+
if (outcome.state !== 'finished' || outcome.verdict?.kind !== 'returned' || outcome.usage?.model_requests !== 0 ||
|
|
134
|
+
!submission?.finalized || !train || !final || !returned(train.job) || !returned(final.job) ||
|
|
135
|
+
!final.selections?.some((item) => item.role === 'agent' && item.selection?.digest === submission.payload?.digest)) {
|
|
136
|
+
throw new Error(`The reference record does not establish completed no-model train and final: ${record}`);
|
|
137
|
+
}
|
|
138
|
+
return await judgeImages(record);
|
|
139
|
+
}
|
|
140
|
+
async function referenceRecord(source, state, home, signal) {
|
|
141
|
+
const runs = await mkdtemp(join(home, 'reference-'));
|
|
142
|
+
const reference = new FrontierRun({ ...state, source }, runs);
|
|
143
|
+
try {
|
|
144
|
+
const result = await command('./pumpkin', ['run', frontierTask, '--arg', 'agent=reference', '--arg', 'deadline_seconds=360',
|
|
145
|
+
'--config', state.config, '--runs', runs, '--wait', '--outcome'], {
|
|
146
|
+
cwd: source, signal, timeoutMs: prepareTimeout, env: { ...process.env, XDG_CACHE_HOME: state.cache },
|
|
147
|
+
});
|
|
148
|
+
await writeFile(join(runs, 'launcher.log'), result.stdout + '\n' + result.stderr, { mode: 0o600 });
|
|
149
|
+
requireSuccess(result, 'Official no-model reference self-check');
|
|
150
|
+
for (const entry of await readdir(runs, { withFileTypes: true })) {
|
|
151
|
+
if (!entry.isDirectory())
|
|
152
|
+
continue;
|
|
153
|
+
const record = join(runs, entry.name);
|
|
154
|
+
const judges = await verifyReference(record);
|
|
155
|
+
return { record, judges };
|
|
156
|
+
}
|
|
157
|
+
throw new Error(`The reference record does not establish completed train and final: ${runs}`);
|
|
158
|
+
}
|
|
159
|
+
finally {
|
|
160
|
+
if (await reference.close() !== 'complete')
|
|
161
|
+
throw new Error(`Pumpkin reference cleanup is pending: ${runs}`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export async function prepareFrontier({ signal, progress, home = frontierHome() }) {
|
|
165
|
+
const budget = frontierBudget();
|
|
166
|
+
const resources = resourcePlan(budget);
|
|
167
|
+
const checks = [];
|
|
168
|
+
const check = (name, ok, detail) => checks.push({ name, ok, detail });
|
|
169
|
+
await mkdir(home, { recursive: true, mode: 0o700 });
|
|
170
|
+
check('linux-x86-64', process.platform === 'linux' && process.arch === 'x64', 'FrontierCS-2 requires Linux x86-64.');
|
|
171
|
+
await Promise.all([
|
|
172
|
+
['git', ['--version'], 'Install Git.'], ['git-lfs', ['version'], 'Install Git LFS and expose git-lfs on PATH.'],
|
|
173
|
+
['python3', ['--version'], 'Install Python 3.'],
|
|
174
|
+
].map(async ([tool, args, remedy]) => {
|
|
175
|
+
const result = await command(tool, args, { timeoutMs: 5000, signal }).catch(() => undefined);
|
|
176
|
+
check(tool, result?.code === 0, result?.stdout.trim() || remedy);
|
|
177
|
+
}));
|
|
178
|
+
const local = await command('docker', ['context', 'show'], { timeoutMs: 5000, signal }).catch(() => undefined);
|
|
179
|
+
const dockerContext = local?.code === 0 ? local.stdout.trim() : '';
|
|
180
|
+
const validContext = /^[a-zA-Z0-9._-]+$/.test(dockerContext);
|
|
181
|
+
check('docker-cli', validContext, validContext ? dockerContext : 'Install Docker CLI and select a local context.');
|
|
182
|
+
const info = validContext ? await command('docker', ['--context', dockerContext, 'info', '--format',
|
|
183
|
+
'{{.OSType}} {{.Architecture}} {{.NCPU}} {{.MemTotal}}'], { timeoutMs: 8000, signal }).catch(() => undefined) : undefined;
|
|
184
|
+
const [os, arch, cpu, memory] = info?.stdout.trim().split(/\s+/) ?? [];
|
|
185
|
+
check('docker-daemon', info?.code === 0 && os === 'linux' && ['x86_64', 'amd64'].includes(arch), info?.code === 0 ? `${os}/${arch}, ${cpu} CPUs, ${Math.floor(Number(memory) / GiB)} GiB` : 'Start Docker and verify daemon access with docker info.');
|
|
186
|
+
const disk = await statfs(home);
|
|
187
|
+
const diskGiB = disk.bavail * disk.bsize / GiB;
|
|
188
|
+
check('resources', Math.min(availableParallelism(), Number(cpu)) >= resources.cpu &&
|
|
189
|
+
Math.min(freemem(), Number(memory)) >= resources.memoryGiB * GiB && diskGiB >= resources.diskGiB && disk.ffree >= 25_000, `Plan: ${resources.cpu} CPUs, ${resources.memoryGiB} GiB RAM, ${resources.diskGiB} GiB disk and 25000 free inodes for the four-worker demo. Available disk: ${Math.floor(diskGiB)} GiB, ${disk.ffree} inodes.`);
|
|
190
|
+
checks.push(...await checkKimiRoute(signal));
|
|
191
|
+
try {
|
|
192
|
+
const { sandbox, image } = defaultResearchConnection();
|
|
193
|
+
const url = sandbox.lifecycleBaseUrl.replace(/\/$/, '') + '/sandboxes?page=1&pageSize=1';
|
|
194
|
+
const deadline = AbortSignal.any([signal, AbortSignal.timeout(8000)]);
|
|
195
|
+
const [authenticated, anonymous] = await Promise.all([
|
|
196
|
+
fetch(url, { redirect: 'error', signal: deadline, headers: { 'OPEN-SANDBOX-API-KEY': sandbox.apiKey ?? '' } }),
|
|
197
|
+
fetch(url, { redirect: 'error', signal: deadline }),
|
|
198
|
+
]);
|
|
199
|
+
const ok = Boolean(sandbox.apiKey && authenticated.ok && [401, 403].includes(anonymous.status) && sandbox.egressMode === 'dns+nft');
|
|
200
|
+
await Promise.all([authenticated.body?.cancel(), anonymous.body?.cancel()]);
|
|
201
|
+
check('opensandbox', ok, ok ? 'Authenticated Lifecycle endpoint.' : 'Configure an authenticated OpenSandbox with dns+nft egress and run anyswarm doctor.');
|
|
202
|
+
const worker = validContext && await command('docker', ['--context', dockerContext, 'image', 'inspect', '--format', '{{.Id}}', image], { timeoutMs: 8000, signal }).catch(() => undefined);
|
|
203
|
+
check('worker-image', !!worker && worker.code === 0, worker && worker.code === 0 ? worker.stdout.trim() : 'Select the prepared AnySwarm Worker image for this Docker daemon.');
|
|
204
|
+
}
|
|
205
|
+
catch (error) {
|
|
206
|
+
check('opensandbox', false, `Check the existing endpoint with anyswarm doctor. ${error.name}`);
|
|
207
|
+
}
|
|
208
|
+
const report = { ok: false, benchmark: frontierRevision, pumpkin: pumpkinPin, budget, resources, checks, home, modelInference: 'not-attempted' };
|
|
209
|
+
if (checks.some(row => !row.ok))
|
|
210
|
+
return report;
|
|
211
|
+
signal.throwIfAborted();
|
|
212
|
+
const state = paths(home, dockerContext);
|
|
213
|
+
const lock = join(home, 'preparing');
|
|
214
|
+
await mkdir(lock, { mode: 0o700 }).catch(() => { throw new Error('FrontierCS-2 preparation is already active. Inspect the preparing directory before retrying.'); });
|
|
215
|
+
try {
|
|
216
|
+
const source = await sourceAt(home, signal);
|
|
217
|
+
const sourceDigest = await treeDigest(source);
|
|
218
|
+
const current = await loadPrepared(home).catch(() => undefined);
|
|
219
|
+
if (current?.saved.sourceDigest === sourceDigest && current.saved.dockerContext === dockerContext &&
|
|
220
|
+
await readFile(join(current.saved.referenceRecord, 'outcome.json'), 'utf8').catch(() => '')) {
|
|
221
|
+
const judges = await verifyReference(current.saved.referenceRecord);
|
|
222
|
+
if (JSON.stringify(judges) !== JSON.stringify(current.saved.judges))
|
|
223
|
+
throw new Error('Prepared judge identity changed.');
|
|
224
|
+
const cachedImage = await command('docker', ['--context', dockerContext, 'image', 'inspect', current.saved.bridgeImage, ...Object.values(judges)], { timeoutMs: 8000, signal });
|
|
225
|
+
if (cachedImage.code === 0)
|
|
226
|
+
return { ...report, ok: true, reused: true, prepared: current.saved };
|
|
227
|
+
}
|
|
228
|
+
await writeFile(state.config, pumpkinConfig(dockerContext), { mode: 0o600 });
|
|
229
|
+
progress('Validating official FrontierCS-2 reference and building pinned judge images.');
|
|
230
|
+
const reference = await referenceRecord(source, state, home, signal);
|
|
231
|
+
await mkdir(state.source, { recursive: true, mode: 0o700 });
|
|
232
|
+
for (const relative of pinFiles)
|
|
233
|
+
await cp(join(source, relative), join(state.source, relative), { recursive: true });
|
|
234
|
+
await installBridge(state.source);
|
|
235
|
+
progress('Preparing the authorized AnySwarm submission role and checking its grants.');
|
|
236
|
+
const bridgeRuns = await mkdtemp(join(home, 'bridge-check-'));
|
|
237
|
+
const bridge = new FrontierRun(state, bridgeRuns);
|
|
238
|
+
try {
|
|
239
|
+
await bridge.start(120, signal, prepareTimeout);
|
|
240
|
+
if (JSON.stringify(bridge.judges) !== JSON.stringify(reference.judges))
|
|
241
|
+
throw new Error('Submission bridge changed the official judge images');
|
|
242
|
+
}
|
|
243
|
+
finally {
|
|
244
|
+
if (await bridge.close() !== 'complete')
|
|
245
|
+
throw new Error(`Pumpkin submission role cleanup is pending: ${bridge.record}`);
|
|
246
|
+
}
|
|
247
|
+
const manifest = { version: 2, revision: frontierRevision, pumpkin: pumpkinPin, sourceDigest,
|
|
248
|
+
bridgeDigest: await treeDigest(state.source), bridgeImage: bridge.imageId, dockerContext, budget, referenceRecord: reference.record, judges: reference.judges };
|
|
249
|
+
const pending = join(lock, 'prepared.json');
|
|
250
|
+
await writeFile(pending, JSON.stringify(manifest, null, 2) + '\n', { mode: 0o600 });
|
|
251
|
+
await rename(pending, join(home, 'prepared.json'));
|
|
252
|
+
return { ...report, ok: true, reused: false, prepared: manifest };
|
|
253
|
+
}
|
|
254
|
+
finally {
|
|
255
|
+
await rm(lock, { recursive: true, force: true });
|
|
256
|
+
}
|
|
257
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ProcessResult {
|
|
2
|
+
code: number | null;
|
|
3
|
+
stdout: string;
|
|
4
|
+
stderr: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function command(executable: string, args: readonly string[], options: {
|
|
7
|
+
cwd?: string;
|
|
8
|
+
env?: NodeJS.ProcessEnv;
|
|
9
|
+
signal?: AbortSignal;
|
|
10
|
+
timeoutMs: number;
|
|
11
|
+
input?: Uint8Array;
|
|
12
|
+
}): Promise<ProcessResult>;
|
|
13
|
+
export declare function requireSuccess(result: ProcessResult, description: string): string;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
export function command(executable, args, options) {
|
|
3
|
+
const { cwd, env, input } = options;
|
|
4
|
+
const timer = AbortSignal.timeout(options.timeoutMs);
|
|
5
|
+
const signal = options.signal ? AbortSignal.any([options.signal, timer]) : timer;
|
|
6
|
+
signal.throwIfAborted();
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
const child = spawn(executable, args, { cwd, env, signal, detached: true, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
9
|
+
const stdout = [], stderr = [];
|
|
10
|
+
let bytes = 0;
|
|
11
|
+
let failure;
|
|
12
|
+
const kill = () => {
|
|
13
|
+
if (!child.pid)
|
|
14
|
+
return;
|
|
15
|
+
try {
|
|
16
|
+
process.kill(-child.pid, 'SIGKILL');
|
|
17
|
+
}
|
|
18
|
+
catch { /* Already exited. */ }
|
|
19
|
+
};
|
|
20
|
+
const capture = (target) => (chunk) => {
|
|
21
|
+
bytes += chunk.length;
|
|
22
|
+
if (bytes <= 1024 * 1024)
|
|
23
|
+
target.push(chunk);
|
|
24
|
+
else {
|
|
25
|
+
failure ??= new Error(`${executable} exceeded its output limit`);
|
|
26
|
+
kill();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
child.stdout.on('data', capture(stdout));
|
|
30
|
+
child.stderr.on('data', capture(stderr));
|
|
31
|
+
child.stdin.on('error', () => { });
|
|
32
|
+
child.once('error', error => { failure ??= error; });
|
|
33
|
+
signal.addEventListener('abort', kill, { once: true });
|
|
34
|
+
child.once('close', code => {
|
|
35
|
+
signal.removeEventListener('abort', kill);
|
|
36
|
+
if (failure || signal.aborted)
|
|
37
|
+
reject(failure ?? signal.reason);
|
|
38
|
+
else
|
|
39
|
+
resolve({ code, stdout: Buffer.concat(stdout).toString(), stderr: Buffer.concat(stderr).toString() });
|
|
40
|
+
});
|
|
41
|
+
child.stdin.end(input);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export function requireSuccess(result, description) {
|
|
45
|
+
if (result.code !== 0)
|
|
46
|
+
throw new Error(`${description}: ${result.stderr.trim().slice(-2000) || `exit ${result.code}`}`);
|
|
47
|
+
return result.stdout.trim();
|
|
48
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type HarnessContext, type HarnessJson } from '@anyswarm/core';
|
|
2
|
+
export declare function resolveWorkspace({ cwd, configuration }: {
|
|
3
|
+
cwd: string;
|
|
4
|
+
configuration?: unknown;
|
|
5
|
+
}): string;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
apiVersion: 1;
|
|
8
|
+
id: string;
|
|
9
|
+
run(context: HarnessContext): Promise<{
|
|
10
|
+
outcome: "cancelled" | "completed" | "failed";
|
|
11
|
+
reason: string;
|
|
12
|
+
result: HarnessJson;
|
|
13
|
+
acceptance: HarnessJson;
|
|
14
|
+
artifacts: HarnessJson[];
|
|
15
|
+
cleanup: {
|
|
16
|
+
status: "complete" | "pending";
|
|
17
|
+
pending?: HarnessJson | undefined;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|