@voybio/ace-swarm 0.2.4 → 2.4.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.
- package/CHANGELOG.md +11 -1
- package/README.md +20 -13
- package/assets/.agents/skills/eval-harness/SKILL.md +14 -0
- package/assets/.agents/skills/handoff-lint/SKILL.md +14 -0
- package/assets/.agents/skills/incident-commander/SKILL.md +14 -0
- package/assets/.agents/skills/memory-curator/SKILL.md +14 -0
- package/assets/.agents/skills/release-sentry/SKILL.md +14 -0
- package/assets/.agents/skills/risk-quant/SKILL.md +14 -0
- package/assets/.agents/skills/schema-forge/SKILL.md +14 -0
- package/assets/.agents/skills/state-auditor/SKILL.md +14 -0
- package/assets/agent-state/EVIDENCE_LOG.md +1 -1
- package/assets/agent-state/MODULES/gates/gate-correctness.json +1 -1
- package/assets/agent-state/MODULES/roles/capability-framework.json +41 -0
- package/assets/agent-state/MODULES/roles/capability-git.json +33 -0
- package/assets/agent-state/MODULES/roles/capability-safety.json +37 -0
- package/assets/agent-state/MODULES/schemas/ACE_RUNTIME_PROFILE.schema.json +21 -0
- package/assets/agent-state/MODULES/schemas/RUNTIME_EXECUTOR_SESSION_REGISTRY.schema.json +43 -0
- package/assets/agent-state/MODULES/schemas/WORKSPACE_SESSION_REGISTRY.schema.json +11 -0
- package/assets/agent-state/STATUS.md +2 -2
- package/assets/scripts/ace-hook-dispatch.mjs +70 -6
- package/assets/scripts/render-mcp-configs.sh +19 -5
- package/dist/ace-context.js +22 -1
- package/dist/ace-server-instructions.js +3 -3
- package/dist/ace-state-resolver.js +5 -3
- package/dist/astgrep-index.d.ts +9 -1
- package/dist/astgrep-index.js +14 -3
- package/dist/cli.js +52 -20
- package/dist/handoff-registry.js +5 -5
- package/dist/helpers/artifacts.d.ts +19 -0
- package/dist/helpers/artifacts.js +152 -0
- package/dist/helpers/bootstrap.d.ts +24 -0
- package/dist/helpers/bootstrap.js +894 -0
- package/dist/helpers/constants.d.ts +53 -0
- package/dist/helpers/constants.js +288 -0
- package/dist/helpers/drift.d.ts +13 -0
- package/dist/helpers/drift.js +45 -0
- package/dist/helpers/path-utils.d.ts +17 -0
- package/dist/helpers/path-utils.js +104 -0
- package/dist/helpers/store-resolution.d.ts +19 -0
- package/dist/helpers/store-resolution.js +301 -0
- package/dist/helpers/workspace-root.d.ts +3 -0
- package/dist/helpers/workspace-root.js +80 -0
- package/dist/helpers.d.ts +8 -123
- package/dist/helpers.js +8 -1747
- package/dist/job-scheduler.js +3 -3
- package/dist/local-model-runtime.js +12 -1
- package/dist/model-bridge.d.ts +7 -0
- package/dist/model-bridge.js +75 -5
- package/dist/orchestrator-supervisor.d.ts +14 -0
- package/dist/orchestrator-supervisor.js +72 -1
- package/dist/run-ledger.js +3 -3
- package/dist/runtime-command.d.ts +8 -0
- package/dist/runtime-command.js +38 -6
- package/dist/runtime-executor.d.ts +14 -0
- package/dist/runtime-executor.js +669 -171
- package/dist/runtime-profile.d.ts +32 -0
- package/dist/runtime-profile.js +89 -13
- package/dist/runtime-tool-specs.d.ts +21 -0
- package/dist/runtime-tool-specs.js +78 -3
- package/dist/safe-edit.d.ts +7 -0
- package/dist/safe-edit.js +163 -37
- package/dist/schemas.js +19 -0
- package/dist/shared.d.ts +2 -2
- package/dist/status-events.js +9 -6
- package/dist/store/ace-packed-store.d.ts +3 -2
- package/dist/store/ace-packed-store.js +188 -110
- package/dist/store/bootstrap-store.d.ts +1 -1
- package/dist/store/bootstrap-store.js +94 -81
- package/dist/store/cache-workspace.d.ts +22 -0
- package/dist/store/cache-workspace.js +149 -0
- package/dist/store/materializers/context-snapshot-materializer.js +6 -7
- package/dist/store/materializers/hook-context-materializer.d.ts +6 -9
- package/dist/store/materializers/hook-context-materializer.js +11 -21
- package/dist/store/materializers/host-file-materializer.js +6 -0
- package/dist/store/materializers/projection-manager.d.ts +0 -1
- package/dist/store/materializers/projection-manager.js +5 -13
- package/dist/store/materializers/scheduler-projection-materializer.js +1 -1
- package/dist/store/materializers/vericify-projector.d.ts +7 -7
- package/dist/store/materializers/vericify-projector.js +11 -11
- package/dist/store/repositories/local-model-runtime-repository.d.ts +120 -3
- package/dist/store/repositories/local-model-runtime-repository.js +242 -6
- package/dist/store/skills-install.d.ts +4 -0
- package/dist/store/skills-install.js +21 -12
- package/dist/store/state-reader.d.ts +2 -0
- package/dist/store/state-reader.js +20 -0
- package/dist/store/store-artifacts.d.ts +7 -0
- package/dist/store/store-artifacts.js +27 -1
- package/dist/store/store-authority-audit.d.ts +18 -1
- package/dist/store/store-authority-audit.js +115 -5
- package/dist/store/store-snapshot.d.ts +3 -0
- package/dist/store/store-snapshot.js +22 -2
- package/dist/store/workspace-store-paths.d.ts +39 -0
- package/dist/store/workspace-store-paths.js +94 -0
- package/dist/store/write-coordinator.d.ts +65 -0
- package/dist/store/write-coordinator.js +386 -0
- package/dist/todo-state.js +5 -5
- package/dist/tools-agent.js +319 -34
- package/dist/tools-discovery.js +1 -1
- package/dist/tools-files.d.ts +7 -0
- package/dist/tools-files.js +299 -10
- package/dist/tools-framework.js +107 -27
- package/dist/tools-handoff.js +2 -2
- package/dist/tools-lifecycle.js +4 -4
- package/dist/tools-memory.js +6 -6
- package/dist/tools-todo.js +2 -2
- package/dist/tracker-adapters.d.ts +1 -1
- package/dist/tracker-adapters.js +13 -18
- package/dist/tracker-sync.js +5 -3
- package/dist/tui/agent-runner.js +3 -1
- package/dist/tui/chat.js +103 -7
- package/dist/tui/dashboard.d.ts +1 -0
- package/dist/tui/dashboard.js +43 -0
- package/dist/tui/layout.d.ts +20 -0
- package/dist/tui/layout.js +31 -1
- package/dist/tui/local-model-contract.d.ts +6 -2
- package/dist/tui/local-model-contract.js +16 -3
- package/dist/vericify-bridge.d.ts +5 -0
- package/dist/vericify-bridge.js +27 -3
- package/dist/workspace-manager.d.ts +30 -3
- package/dist/workspace-manager.js +257 -27
- package/package.json +1 -2
- package/dist/internal-tool-runtime.d.ts +0 -21
- package/dist/internal-tool-runtime.js +0 -136
- package/dist/store/workspace-snapshot.d.ts +0 -26
- package/dist/store/workspace-snapshot.js +0 -107
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { existsSync, readdirSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { AGENT_FILES, AGENT_MANIFEST_FILES, DEFAULT_AGENT_INSTRUCTION_FILES, DEFAULT_AGENT_MANIFEST_FILES, DEFAULT_KERNEL_FILES, DEFAULTS_SKILLS_ROOT, DEFAULT_TASK_FILES, KERNEL_FILES, STORE_AGENT_FILES, STORE_KERNEL_FILES, STORE_TASK_FILES, TASK_FILES, } from "./constants.js";
|
|
4
|
+
import { acePath, currentWorkspaceRoot, firstExistingPath, readText, resolveWorkspaceWritePath, toAbsoluteWorkspaceCandidates, } from "./path-utils.js";
|
|
5
|
+
import { listStoreSkillReferences, readStoreText } from "./store-resolution.js";
|
|
6
|
+
function shouldPreferWorkspaceTaskFile(key) {
|
|
7
|
+
return key === "todo" || key === "lessons";
|
|
8
|
+
}
|
|
9
|
+
function readFirstAvailable(paths) {
|
|
10
|
+
const found = firstExistingPath(paths);
|
|
11
|
+
if (!found) {
|
|
12
|
+
return {
|
|
13
|
+
text: `[FILE NOT FOUND]\nTried:\n${paths.map((p) => `- ${p}`).join("\n")}`,
|
|
14
|
+
path: undefined,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return { text: readText(found), path: found };
|
|
18
|
+
}
|
|
19
|
+
export function getAgentInstructionPath(role) {
|
|
20
|
+
const store = readStoreText(STORE_AGENT_FILES[role].instructions.map((file) => `knowledge/agents/${STORE_AGENT_FILES[role].agent}/${file}`));
|
|
21
|
+
if (store)
|
|
22
|
+
return store.path;
|
|
23
|
+
const workspaceCandidates = toAbsoluteWorkspaceCandidates(AGENT_FILES[role]);
|
|
24
|
+
return firstExistingPath([...workspaceCandidates, DEFAULT_AGENT_INSTRUCTION_FILES[role]]);
|
|
25
|
+
}
|
|
26
|
+
export function getAgentManifestPath(role) {
|
|
27
|
+
const store = readStoreText(STORE_AGENT_FILES[role].manifests.map((file) => `knowledge/agents/${STORE_AGENT_FILES[role].agent}/${file}`));
|
|
28
|
+
if (store)
|
|
29
|
+
return store.path;
|
|
30
|
+
const workspaceCandidates = toAbsoluteWorkspaceCandidates(AGENT_MANIFEST_FILES[role]);
|
|
31
|
+
return firstExistingPath([...workspaceCandidates, DEFAULT_AGENT_MANIFEST_FILES[role]]);
|
|
32
|
+
}
|
|
33
|
+
export function readAgentInstructions(role) {
|
|
34
|
+
const store = readStoreText(STORE_AGENT_FILES[role].instructions.map((file) => `knowledge/agents/${STORE_AGENT_FILES[role].agent}/${file}`));
|
|
35
|
+
if (store)
|
|
36
|
+
return store.text;
|
|
37
|
+
const workspaceCandidates = toAbsoluteWorkspaceCandidates(AGENT_FILES[role]);
|
|
38
|
+
return readFirstAvailable([...workspaceCandidates, DEFAULT_AGENT_INSTRUCTION_FILES[role]]).text;
|
|
39
|
+
}
|
|
40
|
+
export function readAgentManifest(role) {
|
|
41
|
+
const store = readStoreText(STORE_AGENT_FILES[role].manifests.map((file) => `knowledge/agents/${STORE_AGENT_FILES[role].agent}/${file}`));
|
|
42
|
+
if (store)
|
|
43
|
+
return store.text;
|
|
44
|
+
const workspaceCandidates = toAbsoluteWorkspaceCandidates(AGENT_MANIFEST_FILES[role]);
|
|
45
|
+
return readFirstAvailable([...workspaceCandidates, DEFAULT_AGENT_MANIFEST_FILES[role]]).text;
|
|
46
|
+
}
|
|
47
|
+
export function getTaskArtifactPath(key) {
|
|
48
|
+
const workspaceCandidates = toAbsoluteWorkspaceCandidates(TASK_FILES[key]);
|
|
49
|
+
const workspaceFirst = shouldPreferWorkspaceTaskFile(key);
|
|
50
|
+
if (workspaceFirst) {
|
|
51
|
+
const workspace = firstExistingPath(workspaceCandidates);
|
|
52
|
+
if (workspace)
|
|
53
|
+
return workspace;
|
|
54
|
+
}
|
|
55
|
+
const store = readStoreText([STORE_TASK_FILES[key]]);
|
|
56
|
+
if (store)
|
|
57
|
+
return store.path;
|
|
58
|
+
return firstExistingPath([
|
|
59
|
+
...workspaceCandidates,
|
|
60
|
+
DEFAULT_TASK_FILES[key],
|
|
61
|
+
]);
|
|
62
|
+
}
|
|
63
|
+
export function readTaskArtifact(key) {
|
|
64
|
+
if (shouldPreferWorkspaceTaskFile(key)) {
|
|
65
|
+
const workspaceCandidates = toAbsoluteWorkspaceCandidates(TASK_FILES[key]);
|
|
66
|
+
const workspacePath = firstExistingPath(workspaceCandidates);
|
|
67
|
+
if (workspacePath)
|
|
68
|
+
return readText(workspacePath);
|
|
69
|
+
}
|
|
70
|
+
const store = readStoreText([STORE_TASK_FILES[key]]);
|
|
71
|
+
if (store)
|
|
72
|
+
return store.text;
|
|
73
|
+
const workspaceCandidates = toAbsoluteWorkspaceCandidates(TASK_FILES[key]);
|
|
74
|
+
return readFirstAvailable([...workspaceCandidates, DEFAULT_TASK_FILES[key]]).text;
|
|
75
|
+
}
|
|
76
|
+
export function getKernelArtifactPath(key) {
|
|
77
|
+
const store = readStoreText(STORE_KERNEL_FILES[key]);
|
|
78
|
+
if (store)
|
|
79
|
+
return store.path;
|
|
80
|
+
const workspaceCandidates = toAbsoluteWorkspaceCandidates(KERNEL_FILES[key]);
|
|
81
|
+
return firstExistingPath([...workspaceCandidates, DEFAULT_KERNEL_FILES[key]]);
|
|
82
|
+
}
|
|
83
|
+
export function readKernelArtifact(key) {
|
|
84
|
+
const store = readStoreText(STORE_KERNEL_FILES[key]);
|
|
85
|
+
if (store)
|
|
86
|
+
return store.text;
|
|
87
|
+
const workspaceCandidates = toAbsoluteWorkspaceCandidates(KERNEL_FILES[key]);
|
|
88
|
+
return readFirstAvailable([...workspaceCandidates, DEFAULT_KERNEL_FILES[key]]).text;
|
|
89
|
+
}
|
|
90
|
+
export function resolveWritableTaskPath(key) {
|
|
91
|
+
const workspaceCandidates = toAbsoluteWorkspaceCandidates(TASK_FILES[key]);
|
|
92
|
+
const existingWorkspacePath = workspaceCandidates.find((candidate) => existsSync(candidate));
|
|
93
|
+
if (existingWorkspacePath)
|
|
94
|
+
return existingWorkspacePath;
|
|
95
|
+
return resolveWorkspaceWritePath(TASK_FILES[key][0]);
|
|
96
|
+
}
|
|
97
|
+
function listSkillDirs() {
|
|
98
|
+
const root = currentWorkspaceRoot();
|
|
99
|
+
return [
|
|
100
|
+
{ root: acePath("skills"), source: "workspace" },
|
|
101
|
+
{ root: resolve(root, ".agents", "skills"), source: "workspace" },
|
|
102
|
+
{ root: DEFAULTS_SKILLS_ROOT, source: "package-defaults" },
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
export function listAvailableSkills() {
|
|
106
|
+
const dedup = new Map();
|
|
107
|
+
for (const skill of listStoreSkillReferences()) {
|
|
108
|
+
dedup.set(skill.name, skill);
|
|
109
|
+
}
|
|
110
|
+
for (const { root, source } of listSkillDirs()) {
|
|
111
|
+
if (!existsSync(root))
|
|
112
|
+
continue;
|
|
113
|
+
const entries = readdirSync(root, { withFileTypes: true });
|
|
114
|
+
for (const entry of entries) {
|
|
115
|
+
if (!entry.isDirectory())
|
|
116
|
+
continue;
|
|
117
|
+
const skillName = entry.name;
|
|
118
|
+
const skillPath = resolve(root, skillName, "SKILL.md");
|
|
119
|
+
if (!existsSync(skillPath))
|
|
120
|
+
continue;
|
|
121
|
+
if (source === "package-defaults" && dedup.has(skillName)) {
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
dedup.set(skillName, {
|
|
125
|
+
name: skillName,
|
|
126
|
+
path: skillPath,
|
|
127
|
+
source,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return [...dedup.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
132
|
+
}
|
|
133
|
+
export function getSkillPath(name) {
|
|
134
|
+
const target = name.trim().toLowerCase();
|
|
135
|
+
const skills = listAvailableSkills();
|
|
136
|
+
const exact = skills.find((skill) => skill.name.toLowerCase() === target);
|
|
137
|
+
return exact?.path;
|
|
138
|
+
}
|
|
139
|
+
export function readSkillInstructions(name) {
|
|
140
|
+
const target = name.trim().toLowerCase();
|
|
141
|
+
const match = listAvailableSkills().find((skill) => skill.name.toLowerCase() === target);
|
|
142
|
+
if (!match) {
|
|
143
|
+
return `Skill not found: ${name}\nAvailable: ${listAvailableSkills()
|
|
144
|
+
.map((s) => s.name)
|
|
145
|
+
.join(", ")}`;
|
|
146
|
+
}
|
|
147
|
+
if (match.source === "store") {
|
|
148
|
+
return readStoreText([`knowledge/skills/${match.name}/SKILL.md`])?.text ?? "";
|
|
149
|
+
}
|
|
150
|
+
return readText(match.path);
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=artifacts.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type LlmProvider, type McpClient } from "./constants.js";
|
|
2
|
+
export interface BootstrapOptions {
|
|
3
|
+
projectName?: string;
|
|
4
|
+
force?: boolean;
|
|
5
|
+
includeMcpConfig?: boolean;
|
|
6
|
+
includeClientConfigBundle?: boolean;
|
|
7
|
+
llmProvider?: LlmProvider;
|
|
8
|
+
llmModel?: string;
|
|
9
|
+
llmBaseUrl?: string;
|
|
10
|
+
ollamaModel?: string;
|
|
11
|
+
ollamaBaseUrl?: string;
|
|
12
|
+
skipStoreManaged?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface BootstrapResult {
|
|
15
|
+
created: string[];
|
|
16
|
+
updated: string[];
|
|
17
|
+
skipped: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare function getMcpClientBundlePath(client: McpClient): string;
|
|
20
|
+
export declare function getMcpClientInstallHint(client: McpClient): string;
|
|
21
|
+
export declare function getMcpServerConfigSnippet(client?: McpClient): string;
|
|
22
|
+
export declare function getAllMcpServerConfigSnippets(): Record<McpClient, string>;
|
|
23
|
+
export declare function bootstrapAceWorkspace(options?: BootstrapOptions): BootstrapResult;
|
|
24
|
+
//# sourceMappingURL=bootstrap.d.ts.map
|