@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
@@ -1,107 +0,0 @@
1
- import { readdirSync, readFileSync, statSync } from "node:fs";
2
- import { relative, resolve, sep } from "node:path";
3
- import { openStore } from "./ace-packed-store.js";
4
- import { getWorkspaceStorePath, toVirtualStorePath } from "./store-snapshot.js";
5
- import { withStoreWriteQueue } from "./write-queue.js";
6
- function normalizeRelPath(path) {
7
- return path.split(sep).join("/");
8
- }
9
- function workspaceSnapshotPrefix(sessionId) {
10
- return `state/runtime/executor/sessions/${sessionId}/workspace`;
11
- }
12
- function workspaceSnapshotFileKey(sessionId, relPath) {
13
- return `${workspaceSnapshotPrefix(sessionId)}/files/${normalizeRelPath(relPath)}`;
14
- }
15
- function workspaceSnapshotManifestKey(sessionId) {
16
- return `${workspaceSnapshotPrefix(sessionId)}/manifest.json`;
17
- }
18
- function encodeBuffer(content) {
19
- const utf8 = content.toString("utf8");
20
- if (Buffer.from(utf8, "utf8").equals(content)) {
21
- return { encoding: "utf8", body: utf8 };
22
- }
23
- return { encoding: "base64", body: content.toString("base64") };
24
- }
25
- function collectWorkspaceFiles(rootPath, currentPath, output, skipped) {
26
- const entries = readdirSync(currentPath, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
27
- for (const entry of entries) {
28
- const absPath = resolve(currentPath, entry.name);
29
- const relPath = normalizeRelPath(relative(rootPath, absPath));
30
- if (entry.isSymbolicLink()) {
31
- skipped.push({ path: relPath, reason: "symlink" });
32
- continue;
33
- }
34
- if (entry.isDirectory()) {
35
- collectWorkspaceFiles(rootPath, absPath, output, skipped);
36
- continue;
37
- }
38
- if (entry.isFile()) {
39
- output.push({ absPath, relPath });
40
- continue;
41
- }
42
- skipped.push({ path: relPath, reason: "unsupported_entry_type" });
43
- }
44
- }
45
- export function workspaceSnapshotVirtualRoot(workspaceRoot, sessionId) {
46
- return toVirtualStorePath(getWorkspaceStorePath(workspaceRoot), workspaceSnapshotPrefix(sessionId));
47
- }
48
- export async function persistWorkspaceSnapshot(workspaceRoot, sessionId, sourceWorkspacePath) {
49
- const files = [];
50
- const skipped = [];
51
- collectWorkspaceFiles(sourceWorkspacePath, sourceWorkspacePath, files, skipped);
52
- const storePath = getWorkspaceStorePath(workspaceRoot);
53
- const manifestKey = workspaceSnapshotManifestKey(sessionId);
54
- const virtualRoot = workspaceSnapshotVirtualRoot(workspaceRoot, sessionId);
55
- const capturedAt = new Date().toISOString();
56
- const manifestFiles = [];
57
- await withStoreWriteQueue(storePath, async () => {
58
- const store = await openStore(storePath);
59
- try {
60
- for (const file of files) {
61
- const content = readFileSync(file.absPath);
62
- const stats = statSync(file.absPath);
63
- const encoded = encodeBuffer(content);
64
- const key = workspaceSnapshotFileKey(sessionId, file.relPath);
65
- await store.setBlob(key, encoded.body);
66
- manifestFiles.push({
67
- path: file.relPath,
68
- size: stats.size,
69
- mtime_ms: stats.mtimeMs,
70
- encoding: encoded.encoding,
71
- key,
72
- virtual_path: toVirtualStorePath(storePath, key),
73
- });
74
- }
75
- const manifest = {
76
- version: 1,
77
- captured_at: capturedAt,
78
- session_id: sessionId,
79
- source_workspace_path: sourceWorkspacePath,
80
- virtual_root: virtualRoot,
81
- manifest_key: manifestKey,
82
- manifest_path: toVirtualStorePath(storePath, manifestKey),
83
- file_count: manifestFiles.length,
84
- files: manifestFiles,
85
- skipped_paths: skipped,
86
- };
87
- await store.setJSON(manifestKey, manifest);
88
- await store.commit();
89
- }
90
- finally {
91
- await store.close();
92
- }
93
- });
94
- return {
95
- version: 1,
96
- captured_at: capturedAt,
97
- session_id: sessionId,
98
- source_workspace_path: sourceWorkspacePath,
99
- virtual_root: virtualRoot,
100
- manifest_key: manifestKey,
101
- manifest_path: toVirtualStorePath(storePath, manifestKey),
102
- file_count: manifestFiles.length,
103
- files: manifestFiles,
104
- skipped_paths: skipped,
105
- };
106
- }
107
- //# sourceMappingURL=workspace-snapshot.js.map