@voybio/ace-swarm 0.2.5 → 2.4.1

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 (144) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/README.md +21 -13
  3. package/assets/.agents/ACE/agent-qa/instructions.md +11 -0
  4. package/assets/agent-state/EVIDENCE_LOG.md +1 -1
  5. package/assets/agent-state/MODULES/roles/capability-framework.json +41 -0
  6. package/assets/agent-state/MODULES/roles/capability-git.json +33 -0
  7. package/assets/agent-state/MODULES/roles/capability-safety.json +37 -0
  8. package/assets/agent-state/MODULES/schemas/ACE_RUNTIME_PROFILE.schema.json +21 -0
  9. package/assets/agent-state/MODULES/schemas/RUNTIME_EXECUTOR_SESSION_REGISTRY.schema.json +43 -0
  10. package/assets/agent-state/MODULES/schemas/RUNTIME_TOOL_SPEC_REGISTRY.schema.json +43 -0
  11. package/assets/agent-state/MODULES/schemas/WORKSPACE_SESSION_REGISTRY.schema.json +11 -0
  12. package/assets/agent-state/STATUS.md +2 -2
  13. package/assets/agent-state/runtime-tool-specs.json +70 -2
  14. package/assets/instructions/ACE_Coder.instructions.md +13 -0
  15. package/assets/instructions/ACE_UI.instructions.md +11 -0
  16. package/assets/scripts/ace-hook-dispatch.mjs +70 -6
  17. package/assets/scripts/render-mcp-configs.sh +19 -5
  18. package/dist/ace-context.js +91 -11
  19. package/dist/ace-internal-tools.d.ts +3 -1
  20. package/dist/ace-internal-tools.js +10 -2
  21. package/dist/ace-server-instructions.js +3 -3
  22. package/dist/ace-state-resolver.js +5 -3
  23. package/dist/agent-runtime/role-adapters.d.ts +18 -1
  24. package/dist/agent-runtime/role-adapters.js +49 -5
  25. package/dist/astgrep-index.d.ts +57 -1
  26. package/dist/astgrep-index.js +140 -4
  27. package/dist/cli.js +232 -35
  28. package/dist/discovery-runtime-wrappers.d.ts +108 -0
  29. package/dist/discovery-runtime-wrappers.js +615 -0
  30. package/dist/handoff-registry.js +5 -5
  31. package/dist/helpers/artifacts.d.ts +19 -0
  32. package/dist/helpers/artifacts.js +152 -0
  33. package/dist/helpers/bootstrap.d.ts +24 -0
  34. package/dist/helpers/bootstrap.js +894 -0
  35. package/dist/helpers/constants.d.ts +53 -0
  36. package/dist/helpers/constants.js +295 -0
  37. package/dist/helpers/drift.d.ts +13 -0
  38. package/dist/helpers/drift.js +45 -0
  39. package/dist/helpers/path-utils.d.ts +24 -0
  40. package/dist/helpers/path-utils.js +123 -0
  41. package/dist/helpers/store-resolution.d.ts +19 -0
  42. package/dist/helpers/store-resolution.js +305 -0
  43. package/dist/helpers/workspace-root.d.ts +3 -0
  44. package/dist/helpers/workspace-root.js +80 -0
  45. package/dist/helpers.d.ts +8 -125
  46. package/dist/helpers.js +8 -1768
  47. package/dist/job-scheduler.js +33 -7
  48. package/dist/json-sanitizer.d.ts +16 -0
  49. package/dist/json-sanitizer.js +26 -0
  50. package/dist/local-model-policy.d.ts +27 -0
  51. package/dist/local-model-policy.js +84 -0
  52. package/dist/local-model-runtime.d.ts +6 -0
  53. package/dist/local-model-runtime.js +33 -21
  54. package/dist/model-bridge.d.ts +13 -1
  55. package/dist/model-bridge.js +410 -23
  56. package/dist/orchestrator-supervisor.d.ts +56 -0
  57. package/dist/orchestrator-supervisor.js +179 -1
  58. package/dist/plan-proposal.d.ts +115 -0
  59. package/dist/plan-proposal.js +1073 -0
  60. package/dist/run-ledger.js +3 -3
  61. package/dist/runtime-command.d.ts +8 -0
  62. package/dist/runtime-command.js +38 -6
  63. package/dist/runtime-executor.d.ts +20 -1
  64. package/dist/runtime-executor.js +737 -172
  65. package/dist/runtime-profile.d.ts +32 -0
  66. package/dist/runtime-profile.js +89 -13
  67. package/dist/runtime-tool-specs.d.ts +39 -0
  68. package/dist/runtime-tool-specs.js +144 -28
  69. package/dist/safe-edit.d.ts +7 -0
  70. package/dist/safe-edit.js +163 -37
  71. package/dist/schemas.js +48 -1
  72. package/dist/server.js +51 -0
  73. package/dist/shared.d.ts +3 -2
  74. package/dist/shared.js +2 -0
  75. package/dist/status-events.js +9 -6
  76. package/dist/store/ace-packed-store.d.ts +3 -2
  77. package/dist/store/ace-packed-store.js +188 -110
  78. package/dist/store/bootstrap-store.d.ts +2 -1
  79. package/dist/store/bootstrap-store.js +102 -83
  80. package/dist/store/cache-workspace.js +11 -5
  81. package/dist/store/materializers/context-snapshot-materializer.js +6 -2
  82. package/dist/store/materializers/hook-context-materializer.d.ts +6 -9
  83. package/dist/store/materializers/hook-context-materializer.js +11 -21
  84. package/dist/store/materializers/host-file-materializer.js +6 -0
  85. package/dist/store/materializers/projection-manager.d.ts +0 -1
  86. package/dist/store/materializers/projection-manager.js +5 -13
  87. package/dist/store/materializers/scheduler-projection-materializer.js +1 -1
  88. package/dist/store/materializers/vericify-projector.d.ts +7 -7
  89. package/dist/store/materializers/vericify-projector.js +11 -11
  90. package/dist/store/repositories/local-model-runtime-repository.d.ts +120 -3
  91. package/dist/store/repositories/local-model-runtime-repository.js +242 -6
  92. package/dist/store/repositories/vericify-repository.d.ts +1 -1
  93. package/dist/store/skills-install.d.ts +4 -0
  94. package/dist/store/skills-install.js +21 -12
  95. package/dist/store/state-reader.d.ts +2 -0
  96. package/dist/store/state-reader.js +20 -0
  97. package/dist/store/store-artifacts.d.ts +7 -0
  98. package/dist/store/store-artifacts.js +27 -1
  99. package/dist/store/store-authority-audit.d.ts +18 -1
  100. package/dist/store/store-authority-audit.js +115 -5
  101. package/dist/store/store-snapshot.d.ts +3 -0
  102. package/dist/store/store-snapshot.js +22 -2
  103. package/dist/store/workspace-store-paths.d.ts +39 -0
  104. package/dist/store/workspace-store-paths.js +94 -0
  105. package/dist/store/write-coordinator.d.ts +65 -0
  106. package/dist/store/write-coordinator.js +386 -0
  107. package/dist/todo-state.js +5 -5
  108. package/dist/tools-agent.d.ts +20 -0
  109. package/dist/tools-agent.js +789 -25
  110. package/dist/tools-discovery.js +136 -1
  111. package/dist/tools-files.d.ts +7 -0
  112. package/dist/tools-files.js +1002 -11
  113. package/dist/tools-framework.js +105 -66
  114. package/dist/tools-handoff.js +2 -2
  115. package/dist/tools-lifecycle.js +4 -4
  116. package/dist/tools-memory.js +6 -6
  117. package/dist/tools-todo.js +2 -2
  118. package/dist/tracker-adapters.d.ts +1 -1
  119. package/dist/tracker-adapters.js +13 -18
  120. package/dist/tracker-sync.js +5 -3
  121. package/dist/tui/agent-runner.js +3 -1
  122. package/dist/tui/chat.js +103 -7
  123. package/dist/tui/dashboard.d.ts +1 -0
  124. package/dist/tui/dashboard.js +43 -0
  125. package/dist/tui/index.js +10 -1
  126. package/dist/tui/layout.d.ts +20 -0
  127. package/dist/tui/layout.js +31 -1
  128. package/dist/tui/local-model-contract.d.ts +6 -2
  129. package/dist/tui/local-model-contract.js +16 -3
  130. package/dist/tui/ollama.d.ts +8 -1
  131. package/dist/tui/ollama.js +53 -12
  132. package/dist/tui/openai-compatible.d.ts +13 -0
  133. package/dist/tui/openai-compatible.js +305 -5
  134. package/dist/tui/provider-discovery.d.ts +1 -0
  135. package/dist/tui/provider-discovery.js +35 -11
  136. package/dist/vericify-bridge.d.ts +6 -1
  137. package/dist/vericify-bridge.js +27 -3
  138. package/dist/workspace-manager.d.ts +30 -3
  139. package/dist/workspace-manager.js +257 -27
  140. package/package.json +1 -2
  141. package/dist/internal-tool-runtime.d.ts +0 -21
  142. package/dist/internal-tool-runtime.js +0 -136
  143. package/dist/store/workspace-snapshot.d.ts +0 -26
  144. package/dist/store/workspace-snapshot.js +0 -107
@@ -6,6 +6,7 @@ import { normalizePathForValidation } from "./helpers.js";
6
6
  import { refreshAstgrepIndex } from "./astgrep-index.js";
7
7
  import { scanWorkspaceDelta } from "./index-store.js";
8
8
  import { appendRunLedgerEntrySafe } from "./run-ledger.js";
9
+ import { createCodemunchIndex, createCodemunchSnapshot, createMcpIngestionProbe, createWebResearchPacket, } from "./discovery-runtime-wrappers.js";
9
10
  export function registerDiscoveryTools(server) {
10
11
  server.tool("refresh_astgrep_index", "Run deterministic AST discovery indexing and persist AST_GREP_INDEX artifacts", {
11
12
  scope: z
@@ -25,7 +26,7 @@ export function registerDiscoveryTools(server) {
25
26
  .optional()
26
27
  .describe("Include rep_astgrep.cxml corpus mining when available (default: true)"),
27
28
  }, async ({ scope, append_evidence, emit_event, include_rep_corpus }) => {
28
- const result = refreshAstgrepIndex({
29
+ const result = await refreshAstgrepIndex({
29
30
  scope,
30
31
  append_evidence,
31
32
  emit_event,
@@ -174,5 +175,139 @@ export function registerDiscoveryTools(server) {
174
175
  ],
175
176
  };
176
177
  });
178
+ server.tool("web_research_packet", "Execute configured web research tooling and persist bounded research artifacts", {
179
+ query: z.string().min(1).describe("Research query to execute"),
180
+ sources_required: z
181
+ .number()
182
+ .int()
183
+ .min(1)
184
+ .max(20)
185
+ .describe("Minimum number of sources/citations required"),
186
+ fetch_urls: z
187
+ .array(z.string())
188
+ .max(20)
189
+ .optional()
190
+ .describe("Optional URLs that should be fetched into the packet"),
191
+ workspace_path: z
192
+ .string()
193
+ .optional()
194
+ .describe("Optional workspace/session path used as the execution root"),
195
+ session_id: z
196
+ .string()
197
+ .optional()
198
+ .describe("Optional unattended session id for provenance"),
199
+ turn_number: z
200
+ .number()
201
+ .int()
202
+ .positive()
203
+ .optional()
204
+ .describe("Optional unattended session turn number for provenance"),
205
+ }, async ({ query, sources_required, fetch_urls, workspace_path, session_id, turn_number }) => ({
206
+ content: [
207
+ {
208
+ type: "text",
209
+ text: JSON.stringify(await createWebResearchPacket({
210
+ query,
211
+ sources_required,
212
+ fetch_urls,
213
+ workspace_path,
214
+ session_id,
215
+ turn_number,
216
+ }), null, 2),
217
+ },
218
+ ],
219
+ }));
220
+ server.tool("mcp_ingestion_probe", "Validate an external MCP server configuration, persist request/response artifacts, and expose bounded declared tool metadata without leaking shell env", {
221
+ name: z.string().min(1).describe("Logical MCP server name"),
222
+ transport: z.enum(["stdio", "http"]).describe("MCP transport class"),
223
+ command: z.string().optional().describe("Command for stdio MCP servers"),
224
+ args: z.array(z.string()).optional().describe("Command args for stdio MCP servers"),
225
+ url: z.string().optional().describe("HTTP MCP server URL"),
226
+ env: z.record(z.string(), z.string()).optional().describe("Explicit env allowlist for the MCP server"),
227
+ declared_tools: z
228
+ .array(z.object({
229
+ name: z.string(),
230
+ description: z.string().optional(),
231
+ input_schema: z.unknown().optional(),
232
+ }))
233
+ .optional()
234
+ .describe("Optional declared tool metadata discovered or provided by the server class"),
235
+ }, async ({ name, transport, command, args, url, env, declared_tools }) => ({
236
+ content: [
237
+ {
238
+ type: "text",
239
+ text: JSON.stringify(await createMcpIngestionProbe({
240
+ name,
241
+ transport,
242
+ command,
243
+ args,
244
+ url,
245
+ env,
246
+ declared_tools,
247
+ }), null, 2),
248
+ },
249
+ ],
250
+ }));
251
+ server.tool("codemunch_snapshot", "Persist a codemunch CXML snapshot via runtime tool specs or the external CLI contract", {
252
+ repo_url: z.string().min(1).describe("Repository URL to snapshot"),
253
+ branch: z.string().optional().describe("Optional branch or ref to snapshot"),
254
+ max_bytes: z
255
+ .number()
256
+ .int()
257
+ .positive()
258
+ .max(100_000_000)
259
+ .optional()
260
+ .describe("Optional codemunch max-bytes cap"),
261
+ workspace_path: z
262
+ .string()
263
+ .optional()
264
+ .describe("Optional workspace/session path used as the execution root"),
265
+ session_id: z
266
+ .string()
267
+ .optional()
268
+ .describe("Optional unattended session id for provenance"),
269
+ turn_number: z
270
+ .number()
271
+ .int()
272
+ .positive()
273
+ .optional()
274
+ .describe("Optional unattended session turn number for provenance"),
275
+ }, async ({ repo_url, branch, max_bytes, workspace_path, session_id, turn_number }) => ({
276
+ content: [
277
+ {
278
+ type: "text",
279
+ text: JSON.stringify(await createCodemunchSnapshot({
280
+ repo_url,
281
+ branch,
282
+ max_bytes,
283
+ workspace_path,
284
+ session_id,
285
+ turn_number,
286
+ }), null, 2),
287
+ },
288
+ ],
289
+ }));
290
+ server.tool("codemunch_index", "Route a persisted codemunch snapshot through the discovery/indexing flow", {
291
+ cxml_path: z.string().min(1).describe("Workspace-relative or absolute path to the CXML snapshot"),
292
+ append_evidence: z
293
+ .boolean()
294
+ .optional()
295
+ .describe("Append discovery evidence while indexing (default: false)"),
296
+ emit_event: z
297
+ .boolean()
298
+ .optional()
299
+ .describe("Emit discovery status events while indexing (default: false)"),
300
+ }, async ({ cxml_path, append_evidence, emit_event }) => ({
301
+ content: [
302
+ {
303
+ type: "text",
304
+ text: JSON.stringify(await createCodemunchIndex({
305
+ cxml_path,
306
+ append_evidence,
307
+ emit_event,
308
+ }), null, 2),
309
+ },
310
+ ],
311
+ }));
177
312
  }
178
313
  //# sourceMappingURL=tools-discovery.js.map
@@ -2,5 +2,12 @@
2
2
  * File operation tool registrations + new safe-edit and diff tools.
3
3
  */
4
4
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ export interface AstgrepRewriteTargetPlan {
6
+ ok: boolean;
7
+ affected_files: string[];
8
+ target_file?: string;
9
+ error?: string;
10
+ }
11
+ export declare function planAstgrepRewriteTargets(files: string[]): AstgrepRewriteTargetPlan;
5
12
  export declare function registerFileTools(server: McpServer): void;
6
13
  //# sourceMappingURL=tools-files.d.ts.map