@anyswarm/core 0.5.1 → 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 +13 -6
- package/dist/examples/README.md +16 -5
- package/dist/examples/authoring/README.md +4 -4
- package/dist/examples/autoresearch/README.md +15 -8
- package/dist/examples/autoresearch/REQUIREMENTS.zh.md +3 -10
- package/dist/examples/autoresearch/demo.js +1 -1
- 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 +3 -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.js +3 -3
- package/dist/examples/autoresearch/project.d.ts +0 -94
- package/dist/examples/autoresearch/project.js +2 -20
- package/dist/examples/code/README.md +25 -17
- package/dist/examples/code/REQUIREMENTS.zh.md +3 -3
- package/dist/examples/harness-session/README.md +3 -3
- package/dist/examples/messages/README.md +1 -1
- package/dist/examples/notes/README.md +3 -3
- package/dist/examples/services/mathlib-search/README.md +1 -1
- package/dist/examples/services/persistent-board/README.md +5 -2
- package/dist/examples/subagents/README.md +2 -2
- package/dist/examples/subagents/config.js +3 -3
- package/dist/examples/substrate/README.md +2 -2
- 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/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 +102 -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/local-environment.d.ts +10 -4
- package/dist/scripts/local-environment.js +67 -20
- package/dist/scripts/local-setup.d.ts +3 -0
- package/dist/scripts/local-setup.js +135 -107
- package/dist/scripts/pack-release.js +4 -1
- 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 +2 -2
- package/dist/src/harness/project-runtime.js +3 -1
- package/docs/INDEX.md +2 -1
- package/docs/architecture/04-services.md +1 -1
- package/docs/architecture/07-run-configuration.md +28 -14
- package/docs/architecture/12-code-coverage.md +56 -57
- package/docs/architecture/17-harness-reporting.md +1 -1
- package/docs/architecture/22-website.md +4 -7
- package/docs/architecture/23-project-harness.md +48 -23
- package/docs/architecture/26-code.md +20 -5
- package/docs/architecture/27-personal.md +23 -8
- package/docs/architecture/28-autoresearch.md +18 -6
- package/docs/architecture/INDEX.md +1 -2
- package/docs/architecture/prompts/source-manifest.json +5 -5
- package/docs/architecture/source-map.json +51 -71
- 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/build-your-harness.md +1 -1
- package/docs/en/changelog.md +7 -0
- package/docs/en/first-harness.md +6 -6
- 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 +9 -5
- package/docs/en/quickstart.md +20 -41
- 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/operations/trace-viewer.md +1 -1
- package/docs/third-party-notices.md +0 -1
- package/docs/workflows/development.md +14 -12
- package/docs/workflows/release-and-docs-versioning.md +13 -12
- package/docs/workflows/release-cli-acceptance.md +85 -0
- package/docs/zh/agents.md +1 -1
- package/docs/zh/build-your-harness.md +1 -1
- package/docs/zh/changelog.md +8 -1
- package/docs/zh/first-harness.md +7 -7
- 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 +9 -5
- package/docs/zh/quickstart.md +20 -41
- package/docs/zh/reference/api.md +1 -1
- package/docs/zh/reference/cli.md +19 -79
- package/docs/zh/sandbox.md +3 -3
- package/examples/README.md +16 -5
- package/examples/authoring/README.md +4 -4
- package/examples/autoresearch/README.md +15 -8
- package/examples/autoresearch/REQUIREMENTS.zh.md +3 -10
- package/examples/autoresearch/demo.ts +1 -1
- package/examples/autoresearch/eject.json +2 -0
- package/examples/autoresearch/frontiercs2-config.ts +4 -0
- package/examples/autoresearch/prepare-demo.ts +15 -0
- package/examples/autoresearch/prepare.ts +3 -3
- package/examples/autoresearch/project.ts +2 -19
- package/examples/code/README.md +25 -17
- package/examples/code/REQUIREMENTS.zh.md +3 -3
- package/examples/harness-session/README.md +3 -3
- package/examples/messages/README.md +1 -1
- package/examples/notes/README.md +3 -3
- package/examples/services/mathlib-search/README.md +1 -1
- package/examples/services/persistent-board/README.md +5 -2
- package/examples/subagents/README.md +2 -2
- package/examples/subagents/config.ts +4 -3
- package/examples/substrate/README.md +2 -2
- 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/npm-shrinkwrap.development.json +42 -1541
- package/npm-shrinkwrap.json +3 -43
- package/package.development.json +2 -6
- package/package.json +2 -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 +95 -0
- package/scripts/anyswarm-project.ts +31 -123
- package/scripts/anyswarm-source-runner.ts +9 -36
- package/scripts/anyswarm.ts +4 -24
- package/scripts/local-environment.ts +71 -20
- package/scripts/local-setup.ts +134 -94
- package/scripts/pack-release.ts +4 -1
- package/src/core/worker-image.ts +1 -1
- package/src/harness/project-harness.ts +2 -2
- package/src/harness/project-runtime.ts +2 -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
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { personalActions } from './actions.js';
|
|
2
|
+
import personal from './project.js';
|
|
3
|
+
|
|
4
|
+
const actions = personalActions(personal);
|
|
5
|
+
const [command, ...args] = process.argv.slice(2);
|
|
6
|
+
if (!command || !Object.hasOwn(actions, command)) {
|
|
7
|
+
console.error('Usage: anyswarm run ./operator.ts setup|start|jobs|logs|ask|answer|approve|reject|stop-work|stop [arguments]');
|
|
8
|
+
process.exitCode = 2;
|
|
9
|
+
} else {
|
|
10
|
+
const controller = new AbortController();
|
|
11
|
+
const interrupt = (signal: NodeJS.Signals) => {
|
|
12
|
+
process.exitCode = signal === 'SIGINT' ? 130 : 143;
|
|
13
|
+
controller.abort();
|
|
14
|
+
};
|
|
15
|
+
process.on('SIGINT', interrupt).on('SIGTERM', interrupt);
|
|
16
|
+
try {
|
|
17
|
+
const action = actions[command as keyof typeof actions]!;
|
|
18
|
+
const result = await action({ args: args.join(' '), cwd: process.cwd(), signal: controller.signal });
|
|
19
|
+
if (result !== undefined) console.log(JSON.stringify(result));
|
|
20
|
+
} catch (error) {
|
|
21
|
+
if (!controller.signal.aborted) {
|
|
22
|
+
console.error(error instanceof Error ? error.message : 'Personal command failed.');
|
|
23
|
+
process.exitCode = 1;
|
|
24
|
+
}
|
|
25
|
+
} finally {
|
|
26
|
+
process.off('SIGINT', interrupt).off('SIGTERM', interrupt);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -9,7 +9,6 @@ import { memberBackend, personalRuntime } from './execution.js';
|
|
|
9
9
|
import { GitHub, GitHubApiError, githubToken } from './github.js';
|
|
10
10
|
import { openInbox } from './inbox.js';
|
|
11
11
|
import { loadSettings, lockPersonalState, privateDirectory, stateDirectory } from './location.js';
|
|
12
|
-
import { personalActions } from './actions.js';
|
|
13
12
|
import { personalDecisions } from './decisions.js';
|
|
14
13
|
import { outbox } from './outbox.js';
|
|
15
14
|
|
|
@@ -26,7 +25,7 @@ function diagnoseFailure(phase: PersonalStartupFailure['phase'], error: unknown)
|
|
|
26
25
|
return { code: 'PERSONAL_GITHUB_UNAVAILABLE', hint: 'Check connectivity to api.github.com and rerun /setup.' };
|
|
27
26
|
}
|
|
28
27
|
if (phase === 'runtime-initialization') return { code: 'PERSONAL_RUNTIME_INIT_FAILED',
|
|
29
|
-
hint: 'Run
|
|
28
|
+
hint: 'Run anyswarm doctor --smoke. Check the OpenSandbox endpoint and whether the configured callback port is available.' };
|
|
30
29
|
return { code: 'PERSONAL_PROCESSING_FAILED', hint: 'Check /jobs for work and cleanup receipts, then restart Personal with /start.' };
|
|
31
30
|
}
|
|
32
31
|
|
|
@@ -223,5 +222,4 @@ const personal: Harness = {
|
|
|
223
222
|
}
|
|
224
223
|
},
|
|
225
224
|
};
|
|
226
|
-
export const slashActions = personalActions(personal);
|
|
227
225
|
export default personal;
|