@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.
Files changed (301) hide show
  1. package/AGENTS.md +20 -5
  2. package/README.md +69 -55
  3. package/dist/examples/README.md +138 -77
  4. package/dist/examples/authoring/README.md +4 -4
  5. package/dist/examples/autoresearch/README.md +108 -16
  6. package/dist/examples/autoresearch/REQUIREMENTS.zh.md +13 -12
  7. package/dist/examples/autoresearch/config.d.ts +48 -5
  8. package/dist/examples/autoresearch/config.js +57 -23
  9. package/dist/examples/autoresearch/demo.d.ts +12 -4
  10. package/dist/examples/autoresearch/demo.js +65 -22
  11. package/dist/examples/autoresearch/eject.json +2 -0
  12. package/dist/examples/autoresearch/frontiercs2-config.d.ts +2 -0
  13. package/dist/examples/autoresearch/frontiercs2-config.js +14 -0
  14. package/dist/examples/autoresearch/frontiercs2.d.ts +18 -1
  15. package/dist/examples/autoresearch/frontiercs2.js +71 -14
  16. package/dist/examples/autoresearch/prepare-demo.d.ts +1 -0
  17. package/dist/examples/autoresearch/prepare-demo.js +46 -0
  18. package/dist/examples/autoresearch/prepare.d.ts +105 -53
  19. package/dist/examples/autoresearch/prepare.js +126 -57
  20. package/dist/examples/autoresearch/project.d.ts +6 -95
  21. package/dist/examples/autoresearch/project.js +131 -45
  22. package/dist/examples/autoresearch/research-service.d.ts +16 -1
  23. package/dist/examples/autoresearch/research-service.js +84 -44
  24. package/dist/examples/code/README.md +25 -17
  25. package/dist/examples/code/REQUIREMENTS.zh.md +3 -3
  26. package/dist/examples/code/config.d.ts +1 -0
  27. package/dist/examples/first-harness/AGENTS.md +25 -0
  28. package/dist/examples/first-harness/README.md +136 -0
  29. package/dist/examples/first-harness/config.d.ts +9 -8
  30. package/dist/examples/first-harness/config.js +33 -26
  31. package/dist/examples/first-harness/eject.json +14 -0
  32. package/dist/examples/first-harness/handoff.js +3 -3
  33. package/dist/examples/first-harness/harness.d.ts +14 -18
  34. package/dist/examples/first-harness/harness.js +102 -77
  35. package/dist/examples/first-harness/input/README.md +7 -0
  36. package/dist/examples/first-harness/session.js +2 -1
  37. package/dist/examples/first-harness/tsconfig.json +2 -1
  38. package/dist/examples/harness-session/README.md +4 -4
  39. package/dist/examples/lead-worker/README.md +1 -1
  40. package/dist/examples/lead-worker/project-config.d.ts +1 -0
  41. package/dist/examples/messages/README.md +2 -2
  42. package/dist/examples/notes/README.md +5 -5
  43. package/dist/examples/notes/config.d.ts +1 -0
  44. package/dist/examples/parallel-swarm/AGENTS.md +32 -0
  45. package/dist/examples/parallel-swarm/README.md +136 -0
  46. package/dist/examples/parallel-swarm/board-service.js +25 -8
  47. package/dist/examples/parallel-swarm/board.d.ts +31 -1
  48. package/dist/examples/parallel-swarm/board.js +98 -13
  49. package/dist/examples/parallel-swarm/config.d.ts +11 -0
  50. package/dist/examples/parallel-swarm/config.js +39 -0
  51. package/dist/examples/parallel-swarm/eject.json +5 -0
  52. package/dist/examples/parallel-swarm/harness.d.ts +26 -20
  53. package/dist/examples/parallel-swarm/harness.js +77 -76
  54. package/dist/examples/parallel-swarm/report.d.ts +12 -0
  55. package/dist/examples/parallel-swarm/report.js +30 -0
  56. package/dist/examples/peermesh/README.md +1 -1
  57. package/dist/examples/peermesh/project-config.d.ts +1 -0
  58. package/dist/examples/services/agent-control/README.md +1 -1
  59. package/dist/examples/services/mathlib-search/README.md +1 -1
  60. package/dist/examples/services/mcp-managed/README.md +1 -1
  61. package/dist/examples/services/persistent-board/README.md +6 -3
  62. package/dist/examples/subagents/AGENTS.md +35 -0
  63. package/dist/examples/subagents/README.md +129 -93
  64. package/dist/examples/subagents/config.d.ts +2 -10
  65. package/dist/examples/subagents/config.js +9 -16
  66. package/dist/examples/subagents/eject.json +17 -0
  67. package/dist/examples/subagents/handoff-config.d.ts +41 -0
  68. package/dist/examples/subagents/handoff-config.js +13 -0
  69. package/dist/examples/subagents/model.d.ts +3 -0
  70. package/dist/examples/subagents/model.js +19 -0
  71. package/dist/examples/substrate/README.md +12 -6
  72. package/dist/examples/substrate/config.d.ts +1 -0
  73. package/dist/examples/substrate/project-config.d.ts +1 -0
  74. package/dist/examples/super/README.md +34 -22
  75. package/dist/examples/super/actions.d.ts +1 -1
  76. package/dist/examples/super/actions.js +11 -11
  77. package/dist/examples/super/config.js +3 -3
  78. package/dist/examples/super/eject.json +1 -1
  79. package/dist/examples/super/location.js +1 -1
  80. package/dist/examples/super/operator.d.ts +1 -0
  81. package/dist/examples/super/operator.js +31 -0
  82. package/dist/examples/super/project.d.ts +0 -107
  83. package/dist/examples/super/project.js +1 -3
  84. package/dist/examples/taskpool/README.md +1 -1
  85. package/dist/examples/taskpool/config.d.ts +1 -0
  86. package/dist/examples/taskpool/deploy/service-hosts/service-authority-snapshot.d.ts +4 -4
  87. package/dist/scripts/anyswarm-arguments.d.ts +7 -25
  88. package/dist/scripts/anyswarm-arguments.js +69 -97
  89. package/dist/scripts/anyswarm-eject.js +1 -1
  90. package/dist/scripts/anyswarm-harnesses.d.ts +0 -1
  91. package/dist/scripts/anyswarm-harnesses.js +1 -22
  92. package/dist/scripts/anyswarm-installation.d.ts +7 -40
  93. package/dist/scripts/anyswarm-installation.js +17 -291
  94. package/dist/scripts/anyswarm-launch.d.ts +6 -36
  95. package/dist/scripts/anyswarm-launch.js +32 -81
  96. package/dist/scripts/anyswarm-progress.d.ts +6 -0
  97. package/dist/scripts/anyswarm-progress.js +133 -0
  98. package/dist/scripts/anyswarm-project.d.ts +1 -9
  99. package/dist/scripts/anyswarm-project.js +40 -127
  100. package/dist/scripts/anyswarm-source-runner.js +9 -41
  101. package/dist/scripts/anyswarm.js +6 -26
  102. package/dist/scripts/build-provenance.json +1 -1
  103. package/dist/scripts/generate-architecture-coverage.js +1 -1
  104. package/dist/scripts/generate-architecture-prompts.js +18 -10
  105. package/dist/scripts/local-environment.d.ts +13 -7
  106. package/dist/scripts/local-environment.js +73 -21
  107. package/dist/scripts/local-setup.d.ts +3 -0
  108. package/dist/scripts/local-setup.js +153 -118
  109. package/dist/scripts/pack-release.js +31 -4
  110. package/dist/src/core/index.js +1 -1
  111. package/dist/src/core/sandbox/opensandbox-backend.js +10 -4
  112. package/dist/src/core/sandbox/sandbox-connection.d.ts +9 -2
  113. package/dist/src/core/sandbox/sandbox-connection.js +22 -7
  114. package/dist/src/core/worker-image.js +1 -1
  115. package/dist/src/harness/project-harness.d.ts +1 -0
  116. package/dist/src/harness/project-harness.js +5 -4
  117. package/dist/src/harness/project-rpc-client.js +19 -0
  118. package/dist/src/harness/project-runtime.js +3 -1
  119. package/dist/src/harness/typescript-loader.d.ts +2 -0
  120. package/dist/src/harness/typescript-loader.js +26 -8
  121. package/dist/src/trace-viewer/command.mjs +6 -3
  122. package/dist/src/trace-viewer/public/app.js +239 -59
  123. package/dist/src/trace-viewer/public/index.html +5 -0
  124. package/dist/src/trace-viewer/public/style.css +22 -0
  125. package/dist/src/trace-viewer/reader.mjs +242 -26
  126. package/dist/src/trace-viewer/run-root.d.mts +1 -0
  127. package/dist/src/trace-viewer/run-root.mjs +7 -0
  128. package/dist/src/trace-viewer/server.mjs +3 -1
  129. package/docs/INDEX.md +11 -9
  130. package/docs/architecture/04-services.md +1 -1
  131. package/docs/architecture/06-observability-experiments.md +21 -7
  132. package/docs/architecture/07-run-configuration.md +118 -19
  133. package/docs/architecture/08-prompts.md +21 -2
  134. package/docs/architecture/10-service-api-reference.md +12 -5
  135. package/docs/architecture/12-code-coverage.md +157 -115
  136. package/docs/architecture/15-core-runtime.md +1 -1
  137. package/docs/architecture/16-pi-opensandbox-backend.md +2 -0
  138. package/docs/architecture/17-harness-reporting.md +79 -1
  139. package/docs/architecture/22-website.md +52 -20
  140. package/docs/architecture/23-project-harness.md +109 -37
  141. package/docs/architecture/26-code.md +20 -5
  142. package/docs/architecture/27-personal.md +23 -8
  143. package/docs/architecture/28-autoresearch.md +18 -12
  144. package/docs/architecture/INDEX.md +1 -2
  145. package/docs/architecture/prompts/11-first-sdk-harness.md +9 -9
  146. package/docs/architecture/prompts/16-parallel-swarm.md +46 -13
  147. package/docs/architecture/prompts/22-autoresearch.md +9 -2
  148. package/docs/architecture/prompts/source-manifest.json +76 -52
  149. package/docs/architecture/source-map.json +445 -105
  150. package/docs/designs/core-harness/01-core.md +2 -2
  151. package/docs/designs/core-harness/06-project-harness.md +3 -3
  152. package/docs/designs/core-harness/README.md +2 -2
  153. package/docs/en/agents.md +1 -1
  154. package/docs/en/autoresearch.md +41 -0
  155. package/docs/en/blog/100b-tokens.md +157 -0
  156. package/docs/en/build-your-harness.md +47 -22
  157. package/docs/en/changelog.md +29 -1
  158. package/docs/en/first-harness.md +40 -32
  159. package/docs/en/harnesses/index.md +23 -23
  160. package/docs/en/harnesses/lead-worker.md +1 -1
  161. package/docs/en/harnesses/peermesh.md +2 -2
  162. package/docs/en/harnesses/subagents.md +10 -31
  163. package/docs/en/harnesses/substrate.md +4 -4
  164. package/docs/en/harnesses/taskpool.md +2 -2
  165. package/docs/en/latest.md +30 -5
  166. package/docs/en/overview.md +22 -22
  167. package/docs/en/quickstart.md +69 -56
  168. package/docs/en/reference/api.md +1 -1
  169. package/docs/en/reference/cli.md +47 -85
  170. package/docs/en/sandbox.md +3 -3
  171. package/docs/en/trace-viewer.md +32 -12
  172. package/docs/operations/trace-viewer.md +26 -11
  173. package/docs/third-party-notices.md +0 -1
  174. package/docs/workflows/development.md +160 -118
  175. package/docs/workflows/release-and-docs-versioning.md +207 -54
  176. package/docs/workflows/release-cli-acceptance.md +162 -0
  177. package/docs/zh/agents.md +1 -1
  178. package/docs/zh/autoresearch.md +41 -0
  179. package/docs/zh/blog/100b-tokens.md +102 -0
  180. package/docs/zh/build-your-harness.md +48 -23
  181. package/docs/zh/changelog.md +29 -1
  182. package/docs/zh/first-harness.md +43 -35
  183. package/docs/zh/harnesses/index.md +23 -23
  184. package/docs/zh/harnesses/lead-worker.md +1 -1
  185. package/docs/zh/harnesses/peermesh.md +2 -2
  186. package/docs/zh/harnesses/subagents.md +10 -31
  187. package/docs/zh/harnesses/substrate.md +4 -4
  188. package/docs/zh/harnesses/taskpool.md +2 -2
  189. package/docs/zh/latest.md +30 -5
  190. package/docs/zh/overview.md +23 -23
  191. package/docs/zh/quickstart.md +66 -57
  192. package/docs/zh/reference/api.md +1 -1
  193. package/docs/zh/reference/cli.md +19 -79
  194. package/docs/zh/sandbox.md +3 -3
  195. package/docs/zh/trace-viewer.md +32 -12
  196. package/examples/README.md +138 -77
  197. package/examples/authoring/README.md +4 -4
  198. package/examples/autoresearch/README.md +108 -16
  199. package/examples/autoresearch/REQUIREMENTS.zh.md +13 -12
  200. package/examples/autoresearch/config.ts +64 -25
  201. package/examples/autoresearch/demo.ts +75 -22
  202. package/examples/autoresearch/eject.json +2 -0
  203. package/examples/autoresearch/frontiercs2-config.ts +15 -0
  204. package/examples/autoresearch/frontiercs2.ts +64 -11
  205. package/examples/autoresearch/prepare-demo.ts +44 -0
  206. package/examples/autoresearch/prepare.ts +134 -60
  207. package/examples/autoresearch/project.ts +120 -44
  208. package/examples/autoresearch/research-service.ts +91 -41
  209. package/examples/code/README.md +25 -17
  210. package/examples/code/REQUIREMENTS.zh.md +3 -3
  211. package/examples/first-harness/AGENTS.md +25 -0
  212. package/examples/first-harness/README.md +136 -0
  213. package/examples/first-harness/config.ts +41 -27
  214. package/examples/first-harness/eject.json +14 -0
  215. package/examples/first-harness/handoff.ts +3 -3
  216. package/examples/first-harness/harness.ts +104 -72
  217. package/examples/first-harness/input/README.md +7 -0
  218. package/examples/first-harness/session.ts +2 -1
  219. package/examples/first-harness/tsconfig.json +2 -1
  220. package/examples/harness-session/README.md +4 -4
  221. package/examples/lead-worker/README.md +1 -1
  222. package/examples/messages/README.md +2 -2
  223. package/examples/notes/README.md +5 -5
  224. package/examples/parallel-swarm/AGENTS.md +32 -0
  225. package/examples/parallel-swarm/README.md +136 -0
  226. package/examples/parallel-swarm/board-service.ts +28 -9
  227. package/examples/parallel-swarm/board.ts +107 -13
  228. package/examples/parallel-swarm/config.ts +47 -0
  229. package/examples/parallel-swarm/eject.json +5 -0
  230. package/examples/parallel-swarm/harness.ts +83 -71
  231. package/examples/parallel-swarm/report.ts +33 -0
  232. package/examples/peermesh/README.md +1 -1
  233. package/examples/services/agent-control/README.md +1 -1
  234. package/examples/services/mathlib-search/README.md +1 -1
  235. package/examples/services/mcp-managed/README.md +1 -1
  236. package/examples/services/persistent-board/README.md +6 -3
  237. package/examples/subagents/AGENTS.md +35 -0
  238. package/examples/subagents/README.md +129 -93
  239. package/examples/subagents/config.ts +9 -15
  240. package/examples/subagents/eject.json +17 -0
  241. package/examples/subagents/handoff-config.ts +14 -0
  242. package/examples/subagents/model.ts +20 -0
  243. package/examples/substrate/README.md +12 -6
  244. package/examples/super/README.md +34 -22
  245. package/examples/super/actions.ts +11 -11
  246. package/examples/super/config.ts +3 -3
  247. package/examples/super/eject.json +1 -1
  248. package/examples/super/location.ts +1 -1
  249. package/examples/super/operator.ts +28 -0
  250. package/examples/super/project.ts +1 -3
  251. package/examples/taskpool/README.md +1 -1
  252. package/npm-shrinkwrap.development.json +46 -1538
  253. package/npm-shrinkwrap.json +10 -43
  254. package/package.development.json +3 -6
  255. package/package.json +3 -5
  256. package/scripts/anyswarm-arguments.ts +67 -96
  257. package/scripts/anyswarm-eject.ts +1 -1
  258. package/scripts/anyswarm-harnesses.ts +1 -18
  259. package/scripts/anyswarm-installation.ts +18 -294
  260. package/scripts/anyswarm-launch.ts +30 -102
  261. package/scripts/anyswarm-progress.ts +125 -0
  262. package/scripts/anyswarm-project.ts +31 -123
  263. package/scripts/anyswarm-source-runner.ts +9 -36
  264. package/scripts/anyswarm.ts +4 -24
  265. package/scripts/generate-architecture-coverage.ts +1 -1
  266. package/scripts/generate-architecture-prompts.ts +21 -10
  267. package/scripts/local-environment.ts +79 -21
  268. package/scripts/local-setup.ts +150 -105
  269. package/scripts/pack-release.ts +28 -4
  270. package/src/core/index.ts +1 -1
  271. package/src/core/sandbox/opensandbox-backend.ts +10 -4
  272. package/src/core/sandbox/sandbox-connection.ts +22 -7
  273. package/src/core/worker-image.ts +1 -1
  274. package/src/harness/project-harness.ts +5 -4
  275. package/src/harness/project-rpc-client.ts +23 -0
  276. package/src/harness/project-runtime.ts +2 -1
  277. package/src/harness/typescript-loader.ts +28 -8
  278. package/src/trace-viewer/command.mjs +6 -3
  279. package/src/trace-viewer/public/app.js +239 -59
  280. package/src/trace-viewer/public/index.html +5 -0
  281. package/src/trace-viewer/public/style.css +22 -0
  282. package/src/trace-viewer/reader.mjs +242 -26
  283. package/src/trace-viewer/run-root.d.mts +1 -0
  284. package/src/trace-viewer/run-root.mjs +7 -0
  285. package/src/trace-viewer/server.mjs +3 -1
  286. package/dist/scripts/anyswarm-applications.d.ts +0 -19
  287. package/dist/scripts/anyswarm-applications.js +0 -19
  288. package/dist/scripts/anyswarm-tui-config.d.ts +0 -36
  289. package/dist/scripts/anyswarm-tui-config.js +0 -189
  290. package/dist/scripts/anyswarm-tui-session.d.ts +0 -66
  291. package/dist/scripts/anyswarm-tui-session.js +0 -304
  292. package/dist/scripts/anyswarm-tui-terminal.d.ts +0 -41
  293. package/dist/scripts/anyswarm-tui-terminal.js +0 -154
  294. package/dist/scripts/anyswarm-tui.d.ts +0 -2
  295. package/dist/scripts/anyswarm-tui.js +0 -1012
  296. package/docs/architecture/25-foreground-tui.md +0 -51
  297. package/scripts/anyswarm-applications.ts +0 -39
  298. package/scripts/anyswarm-tui-config.ts +0 -174
  299. package/scripts/anyswarm-tui-session.ts +0 -295
  300. package/scripts/anyswarm-tui-terminal.ts +0 -147
  301. package/scripts/anyswarm-tui.ts +0 -912
@@ -1,18 +1,13 @@
1
- import { workerImageFor, resolveSandboxConnection } from '@anyswarm/core';
2
- function required(...names) {
3
- for (const name of names) {
4
- const value = process.env[name];
5
- if (value)
6
- return value;
7
- }
8
- throw new Error(`Set ${names.join(' or ')} before running the Subagents Harness`);
9
- }
1
+ import { workerImageFor, resolveSandboxConnection, ProjectPreflightError } from '@anyswarm/core';
2
+ import { readSubagentsModel } from './model.js';
10
3
  const { image, advertiseHost, publicUrl, endpointSource: _endpointSource, executor: setupExecutor, ...sandbox } = resolveSandboxConnection({}, 'SUBAGENTS');
11
- const upstream = required('ANYSWARM_MODEL_URL', 'ANYSWARM_SUBAGENTS_MODEL_URL');
12
- const token = process.env.ANYSWARM_MODEL_TOKEN ?? process.env.ANYSWARM_SUBAGENTS_MODEL_TOKEN;
13
4
  const executor = process.env.ANYSWARM_EXECUTOR ?? process.env.ANYSWARM_SUBAGENTS_EXECUTOR ?? setupExecutor ?? 'pi';
14
- const provider = process.env.ANYSWARM_MODEL_PROVIDER ?? process.env.ANYSWARM_SUBAGENTS_MODEL_PROVIDER ?? 'openai';
15
- const model = process.env.ANYSWARM_MODEL_ID ?? process.env.ANYSWARM_SUBAGENTS_MODEL_ID ?? (executor === 'codex' ? required('ANYSWARM_SUBAGENTS_MODEL_ID', 'ANYSWARM_MODEL_ID') : 'gpt-5.4');
5
+ const route = readSubagentsModel(executor);
6
+ if (!route) {
7
+ throw new ProjectPreflightError('INVALID_RUN_CONFIGURATION', executor === 'codex'
8
+ ? 'Set ANYSWARM_MODEL_URL and ANYSWARM_MODEL_ID (or their ANYSWARM_SUBAGENTS_ equivalents) before running the Subagents Harness with Codex.'
9
+ : 'Set ANYSWARM_MODEL_URL or ANYSWARM_SUBAGENTS_MODEL_URL before running the Subagents Harness.');
10
+ }
16
11
  export default {
17
12
  model: 'default',
18
13
  maxAgents: Number(process.env.ANYSWARM_SUBAGENTS_MAX_AGENTS ?? 4),
@@ -30,7 +25,5 @@ export default {
30
25
  connection: { publicUrl, advertiseHost,
31
26
  modelGateway: { requestTimeoutMs: 25_000, maxOutputTokens: executor === 'codex' ? null : 2048 },
32
27
  },
33
- models: { default: { provider, model, upstream: {
34
- url: upstream, headers: token ? { authorization: `Bearer ${token}` } : {},
35
- } } },
28
+ models: { default: route },
36
29
  };
@@ -0,0 +1,17 @@
1
+ {
2
+ "apiVersion": 1,
3
+ "entry": "project.ts",
4
+ "files": [
5
+ "project.ts",
6
+ "business.ts",
7
+ "config.ts",
8
+ "model.ts",
9
+ "handoff-config.ts",
10
+ "main.ts",
11
+ "harness/controller.ts",
12
+ "services/collaboration-service.ts",
13
+ "prompts/prompts.ts",
14
+ "README.md",
15
+ "AGENTS.md"
16
+ ]
17
+ }
@@ -0,0 +1,41 @@
1
+ declare const _default: {
2
+ model: string;
3
+ image: string;
4
+ outputDir: string;
5
+ executor: string;
6
+ sandbox: {
7
+ lifecycleBaseUrl: string;
8
+ apiKey: string | undefined;
9
+ useServerProxy: boolean | undefined;
10
+ egressMode: "dns+nft" | undefined;
11
+ endpointHost: undefined;
12
+ preparedImage?: string | undefined;
13
+ resourceLimits: {
14
+ cpu: string;
15
+ memory: string;
16
+ };
17
+ commandTimeoutMs: number;
18
+ };
19
+ models: {
20
+ default: import("@anyswarm/core").ModelConfig;
21
+ };
22
+ maxAgents: number;
23
+ maxDepth: number;
24
+ workTimeoutMs: number;
25
+ closeTimeoutMs: number;
26
+ connection: {
27
+ publicUrl: string | undefined;
28
+ advertiseHost: string | undefined;
29
+ modelGateway: {
30
+ maxOutputTokens: number | null;
31
+ requestTimeoutMs: number;
32
+ };
33
+ };
34
+ collect: {
35
+ paths: string[];
36
+ includeGit: boolean;
37
+ maxBytes: number;
38
+ required: boolean;
39
+ };
40
+ };
41
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import defaults from './config.js';
2
+ export default {
3
+ ...defaults,
4
+ maxAgents: 3,
5
+ maxDepth: 1,
6
+ workTimeoutMs: 360_000,
7
+ closeTimeoutMs: 60_000,
8
+ connection: {
9
+ ...defaults.connection,
10
+ modelGateway: { ...defaults.connection.modelGateway, requestTimeoutMs: 70_000 },
11
+ },
12
+ collect: { paths: ['report.md'], includeGit: false, maxBytes: 1024 * 1024, required: true },
13
+ };
@@ -0,0 +1,3 @@
1
+ import { type ModelConfig } from '@anyswarm/core';
2
+ /** Read the built-in Subagents route without reading Sandbox state or contacting a provider. */
3
+ export declare function readSubagentsModel(executor: string): ModelConfig | undefined;
@@ -0,0 +1,19 @@
1
+ import { ProjectPreflightError } from '@anyswarm/core';
2
+ /** Read the built-in Subagents route without reading Sandbox state or contacting a provider. */
3
+ export function readSubagentsModel(executor) {
4
+ const env = process.env;
5
+ const setting = (name) => env[`ANYSWARM_${name}`] ?? env[`ANYSWARM_SUBAGENTS_${name}`];
6
+ const url = env.ANYSWARM_MODEL_URL || env.ANYSWARM_SUBAGENTS_MODEL_URL;
7
+ const model = env.ANYSWARM_MODEL_ID || env.ANYSWARM_SUBAGENTS_MODEL_ID || (executor === 'codex' ? undefined : 'gpt-5.4');
8
+ if (!url || !model)
9
+ return undefined;
10
+ const protocol = setting('MODEL_PROTOCOL') ?? 'responses';
11
+ if (protocol !== 'responses' && protocol !== 'chat-completions') {
12
+ throw new ProjectPreflightError('INVALID_RUN_CONFIGURATION', 'Set ANYSWARM_MODEL_PROTOCOL or ANYSWARM_SUBAGENTS_MODEL_PROTOCOL to responses or chat-completions.');
13
+ }
14
+ const token = setting('MODEL_TOKEN');
15
+ return {
16
+ provider: setting('MODEL_PROVIDER') ?? 'openai', model, protocol,
17
+ upstream: { url, headers: token ? { authorization: `Bearer ${token}` } : {} },
18
+ };
19
+ }
@@ -21,7 +21,7 @@ repository sources.
21
21
 
22
22
  ```sh
23
23
  npm init -y
24
- npm install --ignore-scripts "${ANYSWARM_SDK_ARCHIVE:-@anyswarm/core@0.5.0}"
24
+ npm install --ignore-scripts "${ANYSWARM_SDK_ARCHIVE:-@anyswarm/core@0.5.2}"
25
25
  npm install --save-dev typescript @types/node
26
26
  sdk=node_modules/@anyswarm/core
27
27
  cp -R "$sdk"/examples/substrate demo
@@ -62,15 +62,21 @@ substrate Service owns publication permissions, ranking and persistence. See the
62
62
  `main.ts` remains the entry for fixed-question fixtures, saved-result inspection
63
63
  for ordinary Substrate. `config.ts` is its fixed-question configuration and
64
64
  requires `ANYSWARM_SUBSTRATE_RUN`; it is not the input to the normal project command.
65
- From this directory after building:
65
+ From `examples/substrate` in the source checkout after building the root:
66
66
 
67
67
  ```sh
68
- ../../node_modules/.bin/anys run ./main.ts --help
69
- ../../node_modules/.bin/anys run ./main.ts ./config.ts
68
+ node ../../dist/scripts/anyswarm.js run ./main.ts --help
69
+ node ../../dist/scripts/anyswarm.js run ./main.ts ./config.ts
70
+ ```
71
+
72
+ For an installed package, run its CLI from the consumer project and use the
73
+ matching source files in that package:
74
+
75
+ ```sh
76
+ node_modules/.bin/anyswarm run node_modules/@anyswarm/core/examples/substrate/main.ts \
77
+ node_modules/@anyswarm/core/examples/substrate/config.ts
70
78
  ```
71
79
 
72
- For an installed package, replace `../../dist/examples/substrate` with
73
- the `dist/examples/substrate` directory inside the SDK you installed.
74
80
  Keep the shipped modules in their installed location because their relative
75
81
  imports are part of the package. `--result <run-directory> --runtime-id <id>`
76
82
  reads saved reports without loading model credentials.
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  useServerProxy: boolean | undefined;
14
14
  egressMode: "dns+nft" | undefined;
15
15
  endpointHost: undefined;
16
+ preparedImage?: string | undefined;
16
17
  resourceLimits: {
17
18
  cpu: string;
18
19
  memory: string;
@@ -13,6 +13,7 @@ export declare function substrateConfiguration(): {
13
13
  useServerProxy: boolean | undefined;
14
14
  egressMode: "dns+nft" | undefined;
15
15
  endpointHost: undefined;
16
+ preparedImage?: string | undefined;
16
17
  resourceLimits: {
17
18
  cpu: string;
18
19
  memory: string;
@@ -4,37 +4,49 @@ Personal receives GitHub Issue and linked PR requests in the background. The use
4
4
 
5
5
  ## Connect and start
6
6
 
7
- Use Node.js 22.19 or later, Git and an existing Pi/OpenSandbox connection. Run `anys setup --backend pi` for host setup. This candidate's end-to-end acceptance uses Linux. Set `ANYSWARM_MODEL_URL` to the full Responses endpoint and `ANYSWARM_MODEL_ID` to the model ID. Optional `ANYSWARM_MODEL_PROVIDER`, `ANYSWARM_MODEL_TOKEN` and `ANYSWARM_MODEL_HEADERS_JSON` follow the model provider. For a reasoning model outside the built-in model catalog, set `ANYSWARM_MODEL_REASONING=true`. Keep credentials in the host environment or credential manager.
7
+ Use Node.js 22.19 or later, Git and an existing Pi/OpenSandbox connection. Run `anyswarm setup --backend pi` for host setup. This candidate's end-to-end acceptance uses Linux. Set `ANYSWARM_MODEL_URL` to the full Responses endpoint and `ANYSWARM_MODEL_ID` to the model ID. Optional `ANYSWARM_MODEL_PROVIDER`, `ANYSWARM_MODEL_TOKEN` and `ANYSWARM_MODEL_HEADERS_JSON` follow the model provider. For a reasoning model outside the built-in model catalog, set `ANYSWARM_MODEL_REASONING=true`. Keep credentials in the host environment or credential manager.
8
8
 
9
- Open `anys`, enter `/super`, then use the composer:
9
+ Export the SDK example and install its pinned dependencies. Run the operator
10
+ from the same launch directory for each command.
10
11
 
11
- ```text
12
- /setup --repo owner/project --path README.md
13
- /start
14
- /jobs
12
+ ```sh
13
+ anyswarm eject super --dir ./personal-src
14
+ cd ./personal-src
15
+ npm install
16
+ npm exec -- anyswarm run ./operator.ts setup --repo owner/project --path README.md
17
+ npm exec -- anyswarm run ./operator.ts start
18
+ npm exec -- anyswarm run ./operator.ts jobs
15
19
  ```
16
20
 
17
- For scripts, use the same actions through `anys -u super --cmd`, for example `anys -u super --cmd '/jobs #123'`. `/setup` infers the repository from a GitHub `origin` when available and defaults to the authenticated GitHub login and `README.md`. Use repeated `--user` or `--path` to allow other logins or up to eight existing UTF-8 files. Set `ANYSWARM_SUPER_GITHUB_TOKEN` or use an existing GitHub CLI login. Allow Issues and Pull requests read/write for conversations and Contents read for files. Creating or updating a Draft PR also needs Contents and Pull requests write.
18
-
19
- `/setup` reports the verified GitHub identity, repository, comments and requested files. It validates the local Pi and model configuration and gives the fix for an invalid setting. GitHub reply and PR writes stay unverified until the corresponding operations succeed. `/start` initializes the Runtime. A real work item verifies Worker and model connectivity. `/jobs` and `/logs` show the most recent background failure stage and its repair hint.
21
+ Setup can infer the repository from a GitHub `origin`. It defaults to the
22
+ authenticated GitHub login and `README.md`. Use repeated `--user` or `--path` to
23
+ allow other logins or up to eight existing UTF-8 files. Set
24
+ `ANYSWARM_SUPER_GITHUB_TOKEN` or use an existing GitHub CLI login. Allow Issues
25
+ and Pull requests read/write and Contents read. Draft PR publication also
26
+ needs Contents and Pull requests write. Setup verifies identity, reads, Pi and
27
+ local model configuration. The first real work item verifies Worker and model
28
+ connectivity. `jobs` and `logs` show the last background failure and its repair hint.
20
29
 
21
30
  ## Work with the Router
22
31
 
23
- Post `/super Update the installation instructions` on an Issue in scope or enter `/ask #123 Update the installation instructions` in the composer. GitHub follows the original Issue or its bound Draft PR. In the terminal, `@router #123 Add a Linux example` sends a follow-up through the same inbox. Use `#<issue>` or an unambiguous work ID prefix in place of `#123` for an existing work item.
24
-
25
- When the Router asks a question, use `/answer #123 <text>` or answer its decision card. Personal sends the verified patch and Reviewer findings to the local approval card. Use `/approve #123` to let the host publish this patch and post a follow-up receipt. `/reject #123 [reason]` records the rejection locally. Use `--publish` at setup if you want automatic publication for the configured repository. `/jobs [work]` shows the artifact, decisions and reply receipts. `/stop-work <work>` stops a single work item.
32
+ Post `/super Update the installation instructions` on an Issue in scope, or run
33
+ `npm exec -- anyswarm run ./operator.ts ask '#123' Update the installation instructions`.
34
+ GitHub follows the original Issue or its bound Draft PR. Use the same operator
35
+ with `jobs '#123'` to view status, artifacts and decisions, `answer '#123' <text>`
36
+ to respond, `approve '#123'` to publish, or `reject '#123' [reason]` to decline.
37
+ An unambiguous work ID prefix also works. Setup's `--publish` opts into automatic
38
+ publication.
26
39
 
27
- Type `q` or `/quit` to detach. Use `/stop` to stop the daemon and `/logs` for its log path. `/trace` opens the Trace Viewer at the attached Personal instance's Runtime records. Every Runtime has a bounded model request budget.
40
+ Use `stop-work <work>` to stop one item, `logs` for the daemon log path, and
41
+ `npm exec -- anyswarm run ./operator.ts stop` to stop the daemon and wait for
42
+ its cleanup receipt. Use `anyswarm trace --root <state-directory>/runs` to
43
+ inspect Runtime records. The daemon keeps running between operator commands.
28
44
 
29
45
  State is keyed by the launch directory and lives under `$XDG_STATE_HOME/anyswarm/personal` or `~/.local/state/anyswarm/personal`. To reuse state across launch directories, set `ANYSWARM_SUPER_STATE_DIR` to the same absolute, private path. Stop an older candidate before starting a new version against its state. A restart retains tasks, verified artifacts, decisions and pending replies. Unknown GitHub mutations are reconciled by identity. Personal reads a newly linked PR's comments even if it has already advanced the repository cursor during recovery. The original Sandbox can require cleanup after a crash. Same-host recovery uses the original Worker-reachable address and `ANYSWARM_SUPER_CALLBACK_PORT` when set.
30
46
 
31
- ## Edit your copy
32
-
33
- ```sh
34
- anys eject super --dir ./personal-src
35
- cd ./personal-src
36
- npm install
37
- npm run start
38
- ```
47
+ ## SDK clients
39
48
 
40
- The SDK-bound export includes the TypeScript Harness, Slash Actions and GitHub adapter. `npm run start` opens the shared terminal with the exported module. The same module can run in a foreground process with `anys run ./project.ts --prompt 'Run Personal GitHub inbox'`. The exported and installed daemons use the same state lock. The export contains the application sources and SDK provenance.
49
+ Import the exported `project.ts` into an application or use `observe` from
50
+ `daemon.ts` to connect to a running Personal daemon via `HarnessRpcClient`.
51
+ The SDK client can receive live questions and send answers by ID. The
52
+ operator commands and SDK use the same persisted Inbox and ownership lock.
@@ -44,7 +44,7 @@ declare function jobs({ args, cwd, signal }: ActionContext): Promise<{
44
44
  log: string;
45
45
  }>;
46
46
  export declare function personalActions(definition: Harness): {
47
- setup: ({ args, cwd, signal }: ActionContext) => Promise<"Configure GitHub with /setup --repo owner/repo [--path README.md] [--user login] [--publish]." | {
47
+ setup: ({ args, cwd, signal }: ActionContext) => Promise<"Configure GitHub with operator.ts setup --repo owner/repo [--path README.md] [--user login] [--publish]." | {
48
48
  configured: boolean;
49
49
  source: string;
50
50
  account: string;
@@ -27,7 +27,7 @@ async function setup(args, cwd, directory, shutdown) {
27
27
  catch { /* A local Git checkout is optional. */ }
28
28
  const repository = values.repo ?? guessed;
29
29
  if (!repository)
30
- return 'Configure GitHub with /setup --repo owner/repo [--path README.md] [--user login] [--publish].';
30
+ return 'Configure GitHub with operator.ts setup --repo owner/repo [--path README.md] [--user login] [--publish].';
31
31
  const paths = values.path?.length ? [...new Set(values.path)] : ['README.md'];
32
32
  const publish = values.publish ?? false;
33
33
  if (paths.length > 8 || paths.some(path => !safePath(path) || path === 'personal-output.patch')) {
@@ -87,7 +87,7 @@ async function setup(args, cwd, directory, shutdown) {
87
87
  publicationWrite: repo.permissions?.push === false ? 'repository-push-denied' : 'unverified' },
88
88
  requiredPermissions: publish ? 'Issues and Pull requests: read/write; Contents: read/write'
89
89
  : 'Issues and Pull requests: read/write; Contents: read',
90
- verification: 'After the backend configuration is valid, /start initializes the Runtime. A real work item verifies Worker, model and reply connectivity. An approved publication verifies PR write access.' };
90
+ verification: 'After the backend configuration is valid, start initializes the Runtime. A real work item verifies Worker, model and reply connectivity. An approved publication verifies PR write access.' };
91
91
  }
92
92
  function directoryFor(cwd) {
93
93
  const directory = stateDirectory(cwd);
@@ -121,9 +121,9 @@ async function start(cwd, directory, signal) {
121
121
  let exited = false;
122
122
  try {
123
123
  const cli = fileURLToPath(new URL('../../scripts/anyswarm.js', import.meta.resolve('@anyswarm/core')));
124
- const project = fileURLToPath(new URL('./project.js', import.meta.url));
125
- const entry = existsSync(project) ? project : fileURLToPath(new URL('./project.ts', import.meta.url));
126
- const child = spawn(process.execPath, [cli, '-u', entry, '--cmd', '/serve'], {
124
+ const project = fileURLToPath(new URL('./operator.js', import.meta.url));
125
+ const entry = existsSync(project) ? project : fileURLToPath(new URL('./operator.ts', import.meta.url));
126
+ const child = spawn(process.execPath, [cli, 'run', entry, 'serve'], {
127
127
  cwd, detached: true, stdio: ['ignore', log, log],
128
128
  env: { ...process.env, ANYSWARM_PERSONAL_DAEMON: '1', ANYSWARM_SUPER_STATE_DIR: directory, ANYSWARM_PERSONAL_LAUNCH: launchId },
129
129
  });
@@ -159,8 +159,8 @@ async function start(cwd, directory, signal) {
159
159
  if (diagnostic?.launchId === launchId)
160
160
  throw new Error(`${diagnostic.phase}: ${diagnostic.hint}`);
161
161
  if (failure)
162
- throw new Error('Personal could not launch its background process. Check the Node installation and /logs.');
163
- throw new Error('Personal did not become ready. Use /jobs and /logs for diagnostics.');
162
+ throw new Error('Personal could not launch its background process. Check the Node installation and operator.ts logs.');
163
+ throw new Error('Personal did not become ready. Use operator.ts jobs and logs for diagnostics.');
164
164
  }
165
165
  async function jobs({ args, cwd, signal }) {
166
166
  const directory = directoryFor(cwd);
@@ -190,14 +190,14 @@ async function send(command, { args, cwd, signal }) {
190
190
  if (!client) {
191
191
  signal.throwIfAborted();
192
192
  if (command === 'stop')
193
- return { state: 'stopped', verification: 'Use /jobs for the last cleanup receipt.' };
194
- throw new Error('Start Personal with /start first.');
193
+ return { state: 'stopped', verification: 'Use operator.ts jobs for the last cleanup receipt.' };
194
+ throw new Error('Start Personal with operator.ts start first.');
195
195
  }
196
196
  try {
197
197
  const request = { requestId: randomUUID() };
198
198
  if (command === 'stop') {
199
199
  if (args)
200
- throw new Error('Use /stop to stop Personal or /stop-work <work> to stop one work item.');
200
+ throw new Error('Use stop to stop Personal or stop-work <work> to stop one work item.');
201
201
  const completion = client.session.completion;
202
202
  const receipt = await client.session.stop({ ...request, reason: 'owner_stop' });
203
203
  const result = await completion;
@@ -216,7 +216,7 @@ export function personalActions(definition) {
216
216
  setup: ({ args, cwd, signal }) => setup(args, cwd, directoryFor(cwd), signal),
217
217
  start: ({ args, cwd, signal }) => {
218
218
  if (args)
219
- throw new Error('Use /start without arguments.');
219
+ throw new Error('Use start without arguments.');
220
220
  return start(cwd, directoryFor(cwd), signal);
221
221
  },
222
222
  jobs,
@@ -10,16 +10,16 @@ export class PersonalConfigurationError extends Error {
10
10
  export function backendDiagnostic(error) {
11
11
  if (error instanceof PersonalConfigurationError)
12
12
  return { code: error.code, hint: error.message };
13
- return { code: 'PERSONAL_BACKEND_CONFIG_INVALID', hint: 'Review the Pi and OpenSandbox configuration with anys doctor. Select Pi with anys setup --backend pi.' };
13
+ return { code: 'PERSONAL_BACKEND_CONFIG_INVALID', hint: 'Review the Pi and OpenSandbox configuration with anyswarm doctor. Select Pi with anyswarm setup --backend pi.' };
14
14
  }
15
15
  export function runtimeOptions(outputDir) {
16
16
  if (process.env.ANYSWARM_EXECUTOR && process.env.ANYSWARM_EXECUTOR !== 'pi') {
17
- throw new PersonalConfigurationError('PERSONAL_PI_REQUIRED', 'Personal requires Pi. Run anys setup --backend pi and select Pi in ANYSWARM_EXECUTOR.');
17
+ throw new PersonalConfigurationError('PERSONAL_PI_REQUIRED', 'Personal requires Pi. Run anyswarm setup --backend pi and select Pi in ANYSWARM_EXECUTOR.');
18
18
  }
19
19
  const { image, executor: configured, advertiseHost, publicUrl, endpointSource: _source, ...sandbox } = resolveSandboxConnection({}, 'SUPER');
20
20
  const executor = process.env.ANYSWARM_EXECUTOR ?? configured ?? 'pi';
21
21
  if (executor !== 'pi')
22
- throw new PersonalConfigurationError('PERSONAL_PI_REQUIRED', 'Personal requires Pi. Run anys setup --backend pi.');
22
+ throw new PersonalConfigurationError('PERSONAL_PI_REQUIRED', 'Personal requires Pi. Run anyswarm setup --backend pi.');
23
23
  const url = process.env.ANYSWARM_MODEL_URL;
24
24
  const model = process.env.ANYSWARM_MODEL_ID;
25
25
  if (!url || !model)
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "apiVersion": 1,
3
3
  "entry": "project.ts",
4
- "files": ["project.ts", "config.ts", "prompts.ts", "inbox.ts", "outbox.ts", "github.ts", "artifact.ts", "coordinator.ts", "execution.ts", "location.ts", "actions.ts", "daemon.ts", "decisions.ts", "README.md"]
4
+ "files": ["project.ts", "config.ts", "prompts.ts", "inbox.ts", "outbox.ts", "github.ts", "artifact.ts", "coordinator.ts", "execution.ts", "location.ts", "actions.ts", "operator.ts", "daemon.ts", "decisions.ts", "README.md"]
5
5
  }
@@ -35,7 +35,7 @@ export function loadSettings(root) {
35
35
  }
36
36
  }
37
37
  catch {
38
- throw new Error('Run /setup in Personal or anys -u super --cmd "/setup --repo owner/repo".');
38
+ throw new Error('Run anyswarm run ./operator.ts setup --repo owner/repo.');
39
39
  }
40
40
  }
41
41
  // Keep ownership in a separate rollback-journal database so Inbox readers and writes remain independent.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ import { personalActions } from './actions.js';
2
+ import personal from './project.js';
3
+ const actions = personalActions(personal);
4
+ const [command, ...args] = process.argv.slice(2);
5
+ if (!command || !Object.hasOwn(actions, command)) {
6
+ console.error('Usage: anyswarm run ./operator.ts setup|start|jobs|logs|ask|answer|approve|reject|stop-work|stop [arguments]');
7
+ process.exitCode = 2;
8
+ }
9
+ else {
10
+ const controller = new AbortController();
11
+ const interrupt = (signal) => {
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];
18
+ const result = await action({ args: args.join(' '), cwd: process.cwd(), signal: controller.signal });
19
+ if (result !== undefined)
20
+ console.log(JSON.stringify(result));
21
+ }
22
+ catch (error) {
23
+ if (!controller.signal.aborted) {
24
+ console.error(error instanceof Error ? error.message : 'Personal command failed.');
25
+ process.exitCode = 1;
26
+ }
27
+ }
28
+ finally {
29
+ process.off('SIGINT', interrupt).off('SIGTERM', interrupt);
30
+ }
31
+ }
@@ -1,111 +1,4 @@
1
1
  import { type Harness } from '@anyswarm/core';
2
- import { type PersonalStartupFailure } from './config.js';
3
2
  export { observe } from './daemon.js';
4
3
  declare const personal: Harness;
5
- export declare const slashActions: {
6
- setup: ({ args, cwd, signal }: {
7
- args: string;
8
- cwd: string;
9
- signal: AbortSignal;
10
- }) => Promise<"Configure GitHub with /setup --repo owner/repo [--path README.md] [--user login] [--publish]." | {
11
- configured: boolean;
12
- source: string;
13
- account: string;
14
- repository: string;
15
- users: string[];
16
- paths: string[];
17
- publish: boolean;
18
- backend: {
19
- readonly configuration: 'valid';
20
- readonly executor: 'pi';
21
- readonly connectivity: 'unverified';
22
- } | {
23
- readonly code: string;
24
- readonly hint: string;
25
- readonly executor?: undefined;
26
- readonly configuration: 'invalid';
27
- readonly connectivity: 'unverified';
28
- };
29
- connection: string;
30
- github: {
31
- repositoryRead: string;
32
- commentRead: string;
33
- contentRead: string;
34
- replyWrite: string;
35
- publicationWrite: string;
36
- };
37
- requiredPermissions: string;
38
- verification: string;
39
- }>;
40
- start: ({ args, cwd, signal }: {
41
- args: string;
42
- cwd: string;
43
- signal: AbortSignal;
44
- }) => Promise<{
45
- state: string;
46
- repository: string;
47
- account?: undefined;
48
- runId?: undefined;
49
- } | {
50
- state: string;
51
- repository: string;
52
- account: string;
53
- runId: string | null;
54
- }>;
55
- jobs: ({ args, cwd, signal }: {
56
- args: string;
57
- cwd: string;
58
- signal: AbortSignal;
59
- }) => Promise<{
60
- jobs?: {
61
- id: string;
62
- issue: number;
63
- pull: number | undefined;
64
- branch: string | undefined;
65
- waiting: string | undefined;
66
- artifact: {
67
- patch: string;
68
- sha256: string;
69
- checks: string[];
70
- summary: string | undefined;
71
- review: string | undefined;
72
- } | undefined;
73
- }[] | undefined;
74
- events?: {
75
- id: string;
76
- job: string;
77
- thread: number;
78
- state: "delivered" | "failed" | "prepared" | "queued" | "stopped" | "unknown" | "working";
79
- problem: string | undefined;
80
- result: "completed" | "failed" | "waiting" | undefined;
81
- publish: "approval" | "confirmed" | "queued" | "rejected" | "sending" | "unknown" | undefined;
82
- reply: "confirmed" | "queued" | "sending" | "unknown" | undefined;
83
- comment: string | undefined;
84
- originalComment: string | undefined;
85
- url: string | undefined;
86
- rejectionReason: string | undefined;
87
- }[] | undefined;
88
- conflicts?: Record<string, import("node:sqlite").SQLOutputValue>[] | undefined;
89
- state: string;
90
- settings: import("./config.js").PersonalSettings;
91
- runId: string | null | undefined;
92
- live: import("@anyswarm/core").HarnessJson | undefined;
93
- cleanup: unknown;
94
- startupFailure: {} | undefined;
95
- log: string;
96
- }>;
97
- logs: ({ cwd }: {
98
- args: string;
99
- cwd: string;
100
- signal: AbortSignal;
101
- }) => {
102
- log: string;
103
- startupFailure: PersonalStartupFailure | undefined;
104
- };
105
- serve?: (({ cwd, signal }: {
106
- args: string;
107
- cwd: string;
108
- signal: AbortSignal;
109
- }) => Promise<void>) | undefined;
110
- };
111
4
  export default personal;
@@ -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
  const json = (value) => JSON.parse(JSON.stringify(value));
@@ -25,7 +24,7 @@ function diagnoseFailure(phase, error) {
25
24
  }
26
25
  if (phase === 'runtime-initialization')
27
26
  return { code: 'PERSONAL_RUNTIME_INIT_FAILED',
28
- hint: 'Run anys doctor --smoke. Check the OpenSandbox endpoint and whether the configured callback port is available.' };
27
+ hint: 'Run anyswarm doctor --smoke. Check the OpenSandbox endpoint and whether the configured callback port is available.' };
29
28
  return { code: 'PERSONAL_PROCESSING_FAILED', hint: 'Check /jobs for work and cleanup receipts, then restart Personal with /start.' };
30
29
  }
31
30
  const personal = {
@@ -249,5 +248,4 @@ const personal = {
249
248
  }
250
249
  },
251
250
  };
252
- export const slashActions = personalActions(personal);
253
251
  export default personal;
@@ -10,7 +10,7 @@ repository sources.
10
10
 
11
11
  ```sh
12
12
  npm init -y
13
- npm install --ignore-scripts "${ANYSWARM_SDK_ARCHIVE:-@anyswarm/core@0.5.0}"
13
+ npm install --ignore-scripts "${ANYSWARM_SDK_ARCHIVE:-@anyswarm/core@0.5.2}"
14
14
  npm install --save-dev typescript @types/node
15
15
  sdk=node_modules/@anyswarm/core
16
16
  cp -R "$sdk"/examples/taskpool demo
@@ -11,6 +11,7 @@ declare const _default: {
11
11
  useServerProxy: boolean | undefined;
12
12
  egressMode: "dns+nft" | undefined;
13
13
  endpointHost: undefined;
14
+ preparedImage?: string | undefined;
14
15
  resourceLimits: {
15
16
  cpu: string;
16
17
  memory: string;
@@ -24,8 +24,8 @@ export declare function captureServiceAuthority(tasks: any, envelope?: any, { mi
24
24
  };
25
25
  links: any;
26
26
  scope: {
27
- error?: undefined;
28
27
  value: any;
28
+ error?: undefined;
29
29
  } | {
30
30
  value?: undefined;
31
31
  error: {
@@ -34,8 +34,8 @@ export declare function captureServiceAuthority(tasks: any, envelope?: any, { mi
34
34
  };
35
35
  } | null;
36
36
  write_scope: {
37
- error?: undefined;
38
37
  value: any;
38
+ error?: undefined;
39
39
  } | {
40
40
  value?: undefined;
41
41
  error: {
@@ -44,8 +44,8 @@ export declare function captureServiceAuthority(tasks: any, envelope?: any, { mi
44
44
  };
45
45
  } | null;
46
46
  mission_open: {
47
- error?: undefined;
48
47
  value: any;
48
+ error?: undefined;
49
49
  } | {
50
50
  value?: undefined;
51
51
  error: {
@@ -54,8 +54,8 @@ export declare function captureServiceAuthority(tasks: any, envelope?: any, { mi
54
54
  };
55
55
  } | null;
56
56
  correction_scope: {
57
- error?: undefined;
58
57
  value: any;
58
+ error?: undefined;
59
59
  } | {
60
60
  value?: undefined;
61
61
  error: {