@voybio/ace-swarm 2.4.4 → 2.4.7
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 +69 -0
- package/README.md +72 -532
- package/assets/eval-battery/battery.json +85 -0
- package/assets/eval-battery/fixtures/edit-target.js +3 -0
- package/assets/scripts/render-mcp-configs.sh +12 -0
- package/dist/ace-context.d.ts +18 -0
- package/dist/ace-context.js +161 -16
- package/dist/ace-server-instructions.js +41 -12
- package/dist/bridge-trace.d.ts +17 -0
- package/dist/bridge-trace.js +23 -0
- package/dist/cli.d.ts +9 -1
- package/dist/cli.js +623 -11
- package/dist/discovery-runtime-wrappers.d.ts +16 -1
- package/dist/discovery-runtime-wrappers.js +65 -9
- package/dist/eval-harness.d.ts +110 -0
- package/dist/eval-harness.js +254 -0
- package/dist/experience-reflector.d.ts +13 -0
- package/dist/experience-reflector.js +62 -0
- package/dist/goal-engine.d.ts +155 -0
- package/dist/goal-engine.js +795 -0
- package/dist/helpers/store-resolution.js +40 -39
- package/dist/hermes/session-manager.d.ts +10 -0
- package/dist/hermes/session-manager.js +130 -27
- package/dist/job-scheduler.d.ts +58 -0
- package/dist/job-scheduler.js +202 -2
- package/dist/job-worker.d.ts +87 -0
- package/dist/job-worker.js +182 -0
- package/dist/local-model-policy.d.ts +8 -2
- package/dist/local-model-policy.js +31 -17
- package/dist/local-model-runtime.d.ts +6 -0
- package/dist/local-model-runtime.js +130 -2
- package/dist/measured-classing.d.ts +66 -0
- package/dist/measured-classing.js +165 -0
- package/dist/model-bridge.d.ts +45 -0
- package/dist/model-bridge.js +502 -44
- package/dist/orchestrator-supervisor.js +1 -1
- package/dist/plan-proposal.d.ts +7 -0
- package/dist/plan-proposal.js +74 -4
- package/dist/playbook-adaptation.d.ts +37 -0
- package/dist/playbook-adaptation.js +159 -0
- package/dist/playbook-curator.d.ts +16 -0
- package/dist/playbook-curator.js +106 -0
- package/dist/playbook-llm-reflector.d.ts +26 -0
- package/dist/playbook-llm-reflector.js +157 -0
- package/dist/public-surface.d.ts +2 -0
- package/dist/public-surface.js +26 -14
- package/dist/safe-edit.d.ts +20 -0
- package/dist/safe-edit.js +355 -78
- package/dist/server.d.ts +11 -2
- package/dist/server.js +55 -5
- package/dist/shared.d.ts +12 -0
- package/dist/shared.js +13 -1
- package/dist/source-mutation-coordinator.d.ts +54 -0
- package/dist/source-mutation-coordinator.js +259 -0
- package/dist/status-events.d.ts +4 -1
- package/dist/status-events.js +41 -6
- package/dist/store/ace-packed-store.d.ts +28 -9
- package/dist/store/ace-packed-store.js +324 -57
- package/dist/store/bgzf.d.ts +4 -0
- package/dist/store/bgzf.js +94 -0
- package/dist/store/bootstrap-store.d.ts +4 -1
- package/dist/store/bootstrap-store.js +57 -3
- package/dist/store/cache-workspace.d.ts +8 -0
- package/dist/store/cache-workspace.js +67 -1
- package/dist/store/crc32.d.ts +2 -0
- package/dist/store/crc32.js +16 -0
- package/dist/store/fsck.d.ts +16 -0
- package/dist/store/fsck.js +240 -0
- package/dist/store/materializers/context-snapshot-materializer.d.ts +1 -0
- package/dist/store/materializers/context-snapshot-materializer.js +4 -1
- package/dist/store/materializers/projection-manager.d.ts +7 -0
- package/dist/store/materializers/projection-manager.js +37 -0
- package/dist/store/materializers/scheduler-projection-materializer.js +10 -3
- package/dist/store/repositories/goal-repository.d.ts +112 -0
- package/dist/store/repositories/goal-repository.js +157 -0
- package/dist/store/repositories/playbook-repository.d.ts +107 -0
- package/dist/store/repositories/playbook-repository.js +314 -0
- package/dist/store/store-artifacts.js +44 -2
- package/dist/store/store-authority-audit.js +1 -0
- package/dist/store/store-cli.d.ts +30 -0
- package/dist/store/store-cli.js +242 -0
- package/dist/store/store-snapshot.d.ts +12 -0
- package/dist/store/store-snapshot.js +74 -11
- package/dist/store/types.d.ts +1 -0
- package/dist/store/write-coordinator.d.ts +7 -0
- package/dist/store/write-coordinator.js +11 -0
- package/dist/todo-state.d.ts +21 -0
- package/dist/todo-state.js +150 -53
- package/dist/tools-agent.js +86 -22
- package/dist/tools-discovery.js +5 -3
- package/dist/tools-files.js +39 -18
- package/dist/tools-framework.js +31 -3
- package/dist/tools-goal.d.ts +11 -0
- package/dist/tools-goal.js +108 -0
- package/dist/tools-handoff.js +7 -11
- package/dist/tools-lifecycle.js +2 -0
- package/dist/tools-scheduler.js +44 -1
- package/dist/tools-skills.js +3 -2
- package/dist/tools-todo.js +64 -3
- package/dist/tools.js +2 -0
- package/dist/tui/chat.js +4 -0
- package/dist/tui/index.js +4 -1
- package/dist/tui/ollama.d.ts +2 -0
- package/dist/tui/openai-compatible.d.ts +14 -0
- package/dist/tui/openai-compatible.js +15 -2
- package/dist/tui/provider-discovery.d.ts +1 -0
- package/dist/tui/provider-discovery.js +2 -2
- package/docs/cli-reference.md +127 -0
- package/docs/development.md +46 -0
- package/docs/evaluation-safety.md +27 -0
- package/docs/experience-playbook.md +35 -0
- package/docs/hermes.md +129 -0
- package/docs/library-api.md +31 -0
- package/docs/mcp-tool-reference.md +290 -0
- package/docs/provider-security.md +85 -0
- package/docs/state-model.md +113 -0
- package/docs/troubleshooting.md +95 -0
- package/docs/tui-operator-guide.md +75 -0
- package/package.json +3 -1
- package/scripts/dev/run_hermes_crispr_live.mjs +212 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
> Companion to the [README](../README.md).
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
cd ace-mcp-server
|
|
7
|
+
npm install
|
|
8
|
+
npm run build
|
|
9
|
+
npm test
|
|
10
|
+
npm run start
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Run the Hermes live driver from a source checkout. The script is included in the npm package as of 2.4.6, but it imports the checkout/package `dist/` tree and is a diagnostic, not a supported production command. It exits nonzero if setup, protocol, or artifact checks fail.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm run build
|
|
17
|
+
# with a local llama.cpp or Ollama runtime running:
|
|
18
|
+
ACE_WORKSPACE_ROOT=$PWD \
|
|
19
|
+
ACE_HERMES_ROOT=/path/to/hermes-agent \
|
|
20
|
+
HERMES_PYTHON=/path/to/hermes-python \
|
|
21
|
+
ACE_LIVE_PROVIDERS=llama.cpp \
|
|
22
|
+
ACE_LIVE_LLAMA_CPP_BASE_URL=http://127.0.0.1:8080/v1 \
|
|
23
|
+
ACE_LIVE_LLAMA_CPP_MODEL=gemma-3-4b-it \
|
|
24
|
+
ACE_LIVE_HERMES_MAX_TURNS=3 \
|
|
25
|
+
node scripts/dev/run_hermes_crispr_live.mjs
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`ACE_LIVE_OUTPUT_ONLY=1` deliberately bypasses tool writing and is only for inspecting raw model output; it cannot satisfy the driver’s evidence-gated job check.
|
|
29
|
+
|
|
30
|
+
## Key source files
|
|
31
|
+
|
|
32
|
+
| File | Role |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `src/index.ts` | Package entry point |
|
|
35
|
+
| `src/cli.ts` | CLI command dispatch |
|
|
36
|
+
| `src/server.ts` | MCP server setup and stdio transport |
|
|
37
|
+
| `src/tools.ts` | Tool registration hub (delegates to domain modules) |
|
|
38
|
+
| `src/hermes/session-manager.ts` | `HermesSubprocessExecutor` — Hermes subprocess lifecycle |
|
|
39
|
+
| `src/hermes/bridge-protocol.ts` | Frame decoder for the Hermes bridge protocol |
|
|
40
|
+
| `src/model-bridge.ts` | Model bridge interface and process orchestration |
|
|
41
|
+
| `src/goal-engine.ts` | Goal engine — self-paced, evidence-gated objective loop |
|
|
42
|
+
| `src/job-worker.ts` | In-process job worker for the scheduler execution loop |
|
|
43
|
+
| `src/public-surface.ts` | Public surface audit and schema-bound entry map |
|
|
44
|
+
| `src/store/ace-packed-store.ts` | ACEPACK binary store read/write |
|
|
45
|
+
| `src/local-model-policy.ts` | Operator allow/block policy for local models |
|
|
46
|
+
| `scripts/hermes_bridge_worker.py` | Packaged Python worker for the Hermes bridge |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Evaluation Safety and Reproducibility
|
|
2
|
+
|
|
3
|
+
`ace eval` executes tasks that may create and modify files. Packaged battery runs are therefore isolated from the caller's checkout.
|
|
4
|
+
|
|
5
|
+
## Isolation contract
|
|
6
|
+
|
|
7
|
+
- Each model, epoch, and task receives a fresh temporary workspace.
|
|
8
|
+
- Battery fixtures are copied into that workspace before execution.
|
|
9
|
+
- A task cannot inherit artifacts from an earlier task or epoch.
|
|
10
|
+
- Temporary workspaces are removed after the result and artifact provenance have been recorded.
|
|
11
|
+
|
|
12
|
+
Do not treat an evaluation task as safe merely because its prompt sounds read-only. Review custom batteries before running them and never configure an evaluation workspace to point at a valuable checkout.
|
|
13
|
+
|
|
14
|
+
## Provenance
|
|
15
|
+
|
|
16
|
+
Evaluation results record the task identity, isolated workspace identity, and hashes for produced artifacts. Hashes establish what bytes were evaluated after the temporary workspace is removed; they do not prove that an artifact is semantically correct. Correctness remains the responsibility of the task verifier and its evidence requirements.
|
|
17
|
+
|
|
18
|
+
For reproducible comparisons, pin the battery, model identifier, provider configuration, ACE version, and relevant environment variables. A provider-backed result may still vary when the remote model or serving stack changes behind a stable name.
|
|
19
|
+
|
|
20
|
+
## Failure interpretation
|
|
21
|
+
|
|
22
|
+
- A missing required artifact is a failed task, not a zero-score success.
|
|
23
|
+
- An artifact left by a previous task must never satisfy a later task.
|
|
24
|
+
- Provider launch, timeout, and protocol failures are execution failures and must remain distinguishable from verifier failures.
|
|
25
|
+
- Preserve the result record when diagnosing a failure; do not rely on a temporary workspace surviving cleanup.
|
|
26
|
+
|
|
27
|
+
See [CLI Reference](cli-reference.md) for command syntax and [Troubleshooting](troubleshooting.md) for common failure paths.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Experience Playbook (experimental)
|
|
2
|
+
|
|
3
|
+
> Companion to the [README](../README.md). This feature is experimental and off by default for prompt injection.
|
|
4
|
+
|
|
5
|
+
The playbook is an evidence-gated lessons store under `agent-state/playbook/`. Evidence-free lessons from every producer are retained as `quarantined`; only active, scope-matched lessons can be reused across runs.
|
|
6
|
+
|
|
7
|
+
Prompt injection is off by default. Set `ACE_PLAYBOOK=1` to inject active, scope-matched lessons into the stable system prompt block. Deterministic reflection can run at direct-lane run end while injection is off; disable it with `ACE_PLAYBOOK_REFLECT=0`.
|
|
8
|
+
|
|
9
|
+
The playbook is conservative by design. Use `ace eval --adapt` to compare baseline and adapted scorecards for your own models before changing defaults. `agent-state/PLAYBOOK.md` is a derived projection and can be regenerated with `ace playbook list`, `add`, `tag`, or `gc`.
|
|
10
|
+
|
|
11
|
+
The legacy `get_lessons` / `add_lesson` MCP tools read and write playbook bullets.
|
|
12
|
+
`add_lesson` currently creates a quarantined note because its legacy schema has no evidence field.
|
|
13
|
+
|
|
14
|
+
## CLI
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# List and inspect lessons
|
|
18
|
+
ace playbook list
|
|
19
|
+
ace playbook show pb-1234abcd
|
|
20
|
+
ace playbook add --section verification --content "Require evidence refs before completion."
|
|
21
|
+
ace playbook tag pb-1234abcd helpful
|
|
22
|
+
ace playbook gc
|
|
23
|
+
|
|
24
|
+
# Run an eval adaptation cycle and compare scorecards
|
|
25
|
+
ace eval --adapt --model qwen3:8b
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The packaged battery ships at `assets/eval-battery/battery.json` and is used by
|
|
29
|
+
default; pass `--battery <path>` to run your own. Each task/model/epoch runs in a
|
|
30
|
+
fresh disposable workspace seeded from the `fixtures/` directory adjacent to
|
|
31
|
+
the battery. Scorecards hash the artifacts created in that run; the caller's
|
|
32
|
+
project and stale artifacts are never used for scoring.
|
|
33
|
+
|
|
34
|
+
The packaged fixture includes `fixtures/edit-target.js`, used by both
|
|
35
|
+
`edit-1-single` and `env-4-tool`.
|
package/docs/hermes.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Hermes Companion Engine
|
|
2
|
+
|
|
3
|
+
> Companion to the [Local Models & Hermes section in the README](../README.md#local-models--hermes). That section explains why the bridge exists; this document covers how to run and operate it.
|
|
4
|
+
|
|
5
|
+
Hermes is an optional, user-supplied companion execution substrate for local models. ACE does not install Hermes, clone it, or make it a package dependency. When the operator explicitly passes `--hermes` or `--engine hermes_local`, Hermes handles local provider quirks and tool-call framing. The local model provider is still Ollama or llama.cpp. ACE remains the system of record — state, evidence, verification, scheduler — and exports a **scoped shadow MCP tool surface** to Hermes so the local model only sees the tools it needs for a given task scope.
|
|
6
|
+
|
|
7
|
+
Hermes-local is opt-in. Without `--hermes` or `--engine hermes_local`, the TUI uses the direct provider path and does not require Python, uv, or Hermes.
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
ACE TUI (ace tui --hermes / --engine hermes_local)
|
|
13
|
+
│ user input → ChatSession.sendMessage();
|
|
14
|
+
│ ACE owns session identity, policy, state
|
|
15
|
+
▼
|
|
16
|
+
runLocalModelTask() ← src/local-model-runtime.ts
|
|
17
|
+
│ ACE dispatches, ACE controls the turn
|
|
18
|
+
▼
|
|
19
|
+
HermesSubprocessExecutor ← Node.js class, src/hermes/session-manager.ts
|
|
20
|
+
│ spawns Python worker; ACE controls lifecycle
|
|
21
|
+
├── writes hermesHome/config.yaml (provider, model, user-supplied Hermes path, shadow MCP entry)
|
|
22
|
+
├── pipes ace mcp-shadow --tools <csv> ← scoped tools-only shadow server (stdio)
|
|
23
|
+
│ (ACE-owned; local model sees only allowed tools, not public prompts/resources)
|
|
24
|
+
▼
|
|
25
|
+
hermes_bridge_worker.py ← Python subprocess
|
|
26
|
+
│ reads config.yaml; calls shadow MCP & local model
|
|
27
|
+
├── streams framed NDJSON events → HermesBridgeFrameDecoder
|
|
28
|
+
└── calls local model (ollama / llama.cpp)
|
|
29
|
+
│
|
|
30
|
+
▼ bridge frames validated and applied by ACE
|
|
31
|
+
ACE store (ace-state.ace) ← authoritative output; ACE-owned
|
|
32
|
+
evidence, continuity, run ledger persisted here
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Bridge protocol (one-shot)
|
|
36
|
+
|
|
37
|
+
Each turn starts one worker process. Node writes one JSON request to stdin and closes stdin; the worker emits newline-delimited JSON events on stdout and exits. This is not a persistent or bidirectional session protocol. Events are decoded as they arrive, but the current TUI displays the result after process exit rather than rendering token deltas live.
|
|
38
|
+
|
|
39
|
+
The request contains the session and turn IDs, task, role, provider, model, base URL, maximum turns, and system prompt. Worker events carry a `type` field:
|
|
40
|
+
|
|
41
|
+
| Frame type | Direction | Purpose |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `session_open` | H→N | worker opened the requested session |
|
|
44
|
+
| `turn_run` | H→N | worker began the task turn |
|
|
45
|
+
| `session_close` | H→N | worker closed the session |
|
|
46
|
+
| `status` | H→N | heartbeat / progress |
|
|
47
|
+
| `delta` | H→N | streaming token chunk |
|
|
48
|
+
| `reasoning` | H→N | chain-of-thought (optional) |
|
|
49
|
+
| `assistant_interim` | H→N | partial assistant message |
|
|
50
|
+
| `tool_start` | H→N | tool call initiated |
|
|
51
|
+
| `tool_progress` | H→N | tool call in flight |
|
|
52
|
+
| `tool_complete` | H→N | tool call result |
|
|
53
|
+
| `final` | H→N | complete assistant response |
|
|
54
|
+
| `error` | H→N | fatal bridge error |
|
|
55
|
+
|
|
56
|
+
Frame decoding is handled by `HermesBridgeFrameDecoder` in `src/hermes/bridge-protocol.ts`. The decoder strips control bytes, sanitizes the line, and validates against the event schema before handing frames to the session manager.
|
|
57
|
+
|
|
58
|
+
Exactly one `final` event is required. A missing or duplicate terminal event, malformed frame, child error/nonzero exit, timeout, or output-limit breach fails the turn. `final.completed=false` is preserved as a blocked result. The executor owns cancellation: TUI Ctrl+C sends `SIGTERM`, followed by `SIGKILL` if the worker does not stop. Default limits are 120 seconds and 4 MiB combined stdout/stderr per turn.
|
|
59
|
+
|
|
60
|
+
## Running with Hermes
|
|
61
|
+
|
|
62
|
+
The operator owns the Hermes and Python setup. ACE only discovers and launches it when asked.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Doctor check with user-supplied Hermes/Python
|
|
66
|
+
ACE_HERMES_ROOT=/path/to/hermes-agent \
|
|
67
|
+
HERMES_PYTHON=/path/to/python \
|
|
68
|
+
ace doctor --llm llama.cpp --base-url http://127.0.0.1:8080/v1 --model gemma-3-4b-it --hermes
|
|
69
|
+
|
|
70
|
+
# TUI session with Hermes
|
|
71
|
+
ACE_HERMES_ROOT=/path/to/hermes-agent \
|
|
72
|
+
HERMES_PYTHON=/path/to/python \
|
|
73
|
+
ace tui --provider llama.cpp --base-url http://127.0.0.1:8080/v1 --model gemma-3-4b-it --hermes
|
|
74
|
+
|
|
75
|
+
# Optional uv-managed Hermes project, still operator supplied
|
|
76
|
+
ACE_HERMES_ROOT=/path/to/hermes-agent \
|
|
77
|
+
ACE_HERMES_UV_PROJECT=/path/to/hermes-agent \
|
|
78
|
+
ace tui --provider llama.cpp --base-url http://127.0.0.1:8080/v1 --model gemma-3-4b-it --hermes
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Launch precedence is explicit CLI options, environment, the store-backed `state/runtime/hermes_launch_profile`, then development defaults. Supported environment configuration is:
|
|
82
|
+
|
|
83
|
+
- `ACE_HERMES_ROOT`: operator-supplied Hermes checkout.
|
|
84
|
+
- `HERMES_PYTHON`: Python executable containing Hermes dependencies. If omitted, launch resolution uses `python3`.
|
|
85
|
+
- `ACE_HERMES_UV_PROJECT`: run `uv run --project <path> python`.
|
|
86
|
+
- `ACE_HERMES_COMMAND_JSON`: advanced command override as a JSON string array, for example `["uv","run","python"]`; shell strings are rejected.
|
|
87
|
+
|
|
88
|
+
For llama.cpp, use its OpenAI-compatible API root ending in `/v1` (for example `http://127.0.0.1:8080/v1`). Ollama’s native root (for example `http://127.0.0.1:11434`) is normalized to `/v1` for Hermes.
|
|
89
|
+
|
|
90
|
+
Or select the engine explicitly:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
ace tui --provider llama.cpp --base-url http://localhost:8080 --engine hermes_local
|
|
94
|
+
# shorthand
|
|
95
|
+
ace tui --provider ollama --model qwen3:8b --hermes
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
When Hermes is selected, ACE launches the user-supplied Hermes/Python setup for that session and exposes only the scoped shadow MCP tool surface. Tool evidence, not model prose, determines executable mutation.
|
|
99
|
+
|
|
100
|
+
## Doctor checks
|
|
101
|
+
|
|
102
|
+
`ace doctor` surfaces Hermes-local readiness gates only when `--hermes` is passed:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
ACE_HERMES_ROOT=/path/to/hermes-agent HERMES_PYTHON=/path/to/python \
|
|
106
|
+
ace doctor --llm llama.cpp --model gemma-3-4b-it --base-url http://localhost:8080 --hermes
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Checks performed:
|
|
110
|
+
|
|
111
|
+
- Hermes bridge worker packaged (`scripts/hermes_bridge_worker.py` present)
|
|
112
|
+
- Hermes checkout supplied by the operator (`ACE_HERMES_ROOT` or `--hermes-root`)
|
|
113
|
+
- Python supplied by the operator (`HERMES_PYTHON` or `--hermes-python`)
|
|
114
|
+
- Optional uv project supplied by the operator (`ACE_HERMES_UV_PROJECT` or `--hermes-uv-project`)
|
|
115
|
+
- Shadow MCP command available for scoped tools-only transport
|
|
116
|
+
- Local runtime reachable and model available
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Auto-scan common Ollama + llama.cpp endpoints
|
|
120
|
+
ace doctor --scan
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Evidence model
|
|
124
|
+
|
|
125
|
+
ACE persists tool evidence when the model invokes `write_workspace_file` successfully through the shadow MCP surface. Completion is authorized by tool evidence, not model prose: Hermes results pass through the same forward-pacing verifier as direct results. A mutation-intent `completed` claim is demoted to `blocked` unless persisted evidence exists; callers may additionally supply declared artifacts and required evidence references.
|
|
126
|
+
|
|
127
|
+
The Hermes-final artifact materialization path (`materialized_from_hermes_final`) is provided only as a development diagnostic (`scripts/dev/run_hermes_crispr_live.mjs`); it is not part of the standard Hermes-local runtime.
|
|
128
|
+
|
|
129
|
+
Which local model runs is chosen by the operator at `ace connect` or through the runtime profile.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Package API Boundary
|
|
2
|
+
|
|
3
|
+
`@voybio/ace-swarm` is currently an executable MCP server and CLI package, not a supported JavaScript library SDK.
|
|
4
|
+
|
|
5
|
+
## Supported entrypoints
|
|
6
|
+
|
|
7
|
+
- Binaries: `ace`, `ace-swarm`, `ace-mcp-server`, and `ace-add`
|
|
8
|
+
- MCP transport: `ace mcp` or `ace serve`
|
|
9
|
+
- Operator CLI: commands documented in [CLI Reference](cli-reference.md)
|
|
10
|
+
- Programmatic protocol: MCP tools, resources, templates, and prompts documented in [MCP Tool Reference](mcp-tool-reference.md)
|
|
11
|
+
|
|
12
|
+
Importing the package root executes the MCP stdio server because `dist/index.js` calls `startStdioServer()` immediately. It does not expose a stable function/class API. Internal files under `dist/` are implementation details and are not package-exported subpaths.
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
// Do not use this as a library import: it starts the stdio server.
|
|
16
|
+
import "@voybio/ace-swarm";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Integration choices
|
|
20
|
+
|
|
21
|
+
Use one of these stable boundaries:
|
|
22
|
+
|
|
23
|
+
1. Configure the MCP server in a supported host with `ace mcp-config`.
|
|
24
|
+
2. Spawn the `ace` CLI and consume its documented stdout/exit contract.
|
|
25
|
+
3. Use an MCP client and the registered tool/resource schemas.
|
|
26
|
+
|
|
27
|
+
Do not import `dist/store/*`, `dist/tools-*`, or other internal modules from a consumer package. Their paths, types, and side effects may change without a semver API guarantee.
|
|
28
|
+
|
|
29
|
+
## Future SDK contract
|
|
30
|
+
|
|
31
|
+
A supported library API would require explicit side-effect-free exports, documented lifecycle ownership, stable error/result types, and package-level integration tests. Until such exports appear in `package.json`, the CLI and MCP protocol are the public APIs.
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
# MCP Tool Reference
|
|
2
|
+
|
|
3
|
+
> Companion to the [README](../README.md). The full MCP surface spans **119 registered tools** across 13 domain modules, plus resources and prompts. For premium hosts (Claude Code, Codex), the curated `ace mcp --profile host-min` exposes 22 high-value tools; the rest remain reachable via `run_orchestrator` delegation or `--profile full`.
|
|
4
|
+
|
|
5
|
+
ACE exposes tools through a domain-modular registration system (`src/tools.ts` delegates to 13 domain modules). Tools can be allow-listed at startup; `ace mcp-shadow` uses this to give Hermes a scoped tools-only subset. Public `ace mcp` always exposes the full prompts and resources surface; its visible tool schema depends on `--profile` (119 tools for `full`, 22 for `host-min`). `ace mcp-shadow` instead exposes only its explicitly allow-listed tools and omits prompts and resources.
|
|
6
|
+
|
|
7
|
+
## Agent & Runtime
|
|
8
|
+
|
|
9
|
+
| Tool | Purpose |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `get_agent_instructions` | Read instruction content for any ACE agent role |
|
|
12
|
+
| `get_agent_manifest` | Read the manifest for a given agent role |
|
|
13
|
+
| `get_all_agents_summary` | List all registered agents with role metadata |
|
|
14
|
+
| `get_kernel_artifact` | Read a named kernel artifact from the store |
|
|
15
|
+
| `get_runtime_profile` | Read the active runtime profile (provider, model, base URL) |
|
|
16
|
+
| `validate_runtime_profile` | Schema-validate the stored runtime profile |
|
|
17
|
+
| `get_transition_log` | Read recent agent state-transition history |
|
|
18
|
+
| `get_capability_snapshot` | Read one session/turn capability snapshot (`session_id`, `turn_number`) |
|
|
19
|
+
| `get_runtime_tool_specs` | Read the tool-spec registry for the active runtime |
|
|
20
|
+
| `validate_runtime_tool_specs` | Schema-validate the tool-spec registry |
|
|
21
|
+
| `list_runtime_tool_specs` | List all registered tool specs |
|
|
22
|
+
| `execute_runtime_tool` | Execute a named runtime tool by spec |
|
|
23
|
+
|
|
24
|
+
## Orchestration & Planning
|
|
25
|
+
|
|
26
|
+
| Tool | Purpose |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `propose_plan` | Generate a multi-step task plan proposal |
|
|
29
|
+
| `validate_plan` | Validate a plan proposal against acceptance contracts |
|
|
30
|
+
| `run_local_model` | Dispatch a task to the configured local model runtime |
|
|
31
|
+
| `run_orchestrator` | Run an ACE orchestrator session for a given task |
|
|
32
|
+
| `route_task` | Route an incoming task to the appropriate agent role |
|
|
33
|
+
| `bootstrap_state` | Seed or repair the ACE store for the current workspace |
|
|
34
|
+
| `get_framework_status` | Read aggregate framework health and readiness |
|
|
35
|
+
| `validate_framework` | Run the built-in framework self-checks (manifest gates are run by `execute_gates`) |
|
|
36
|
+
| `audit_public_surface` | Audit exact registered tools/resources/prompts, emitted-event registry parity, and parse every bound JSON schema |
|
|
37
|
+
| `audit_store_authority` | Verify store authority and projection consistency |
|
|
38
|
+
| `execute_gates` | Run explicit gate manifest IDs, or the active stage's gates when IDs are omitted. Shipped gates: `gate-autonomy`, `gate-completeness`, `gate-operability`, `gate-security` |
|
|
39
|
+
|
|
40
|
+
## Handoffs
|
|
41
|
+
|
|
42
|
+
| Tool | Purpose |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `create_handoff` | Create a typed, validated handoff record |
|
|
45
|
+
| `validate_handoff` | Validate a handoff payload against the schema |
|
|
46
|
+
| `get_handoff_template` | Retrieve the single canonical handoff template (no arguments) |
|
|
47
|
+
| `get_handoff_status` | Read the status of a specific handoff |
|
|
48
|
+
| `ack_handoff` | Acknowledge a handoff as received and accepted |
|
|
49
|
+
|
|
50
|
+
Example — creating a handoff from orchestrator to qa:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
# via any MCP client
|
|
54
|
+
create_handoff {
|
|
55
|
+
"from": "orchestrator",
|
|
56
|
+
"to": "qa",
|
|
57
|
+
"title": "Review auth module test coverage",
|
|
58
|
+
"task_type": "engineering",
|
|
59
|
+
"priority": "P1",
|
|
60
|
+
"directive": "Auth module implementation complete; review and extend test coverage",
|
|
61
|
+
"acceptance_criteria": ["All /api/auth endpoints covered by integration tests"],
|
|
62
|
+
"context_pointers": { "engineering_constraint": "src/auth.ts:1" }
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Scheduler
|
|
67
|
+
|
|
68
|
+
| Tool | Purpose |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `enqueue_job` | Add a job to the queue with priority, deps, and resource locks |
|
|
71
|
+
| `dispatch_jobs` | Tick the scheduler and dispatch ready jobs (runs the heartbeat watchdog) |
|
|
72
|
+
| `dispatch_job_now` | Immediately start a single ready job if deps and resources are clear |
|
|
73
|
+
| `ack_job` | Acknowledge or update job lifecycle (accept/reject/cancel/resume) |
|
|
74
|
+
| `complete_job` | Mark a job done or failed |
|
|
75
|
+
| `heartbeat_job` | Prove worker liveness for a running job so the watchdog does not reap it |
|
|
76
|
+
| `reap_stale_jobs` | Run the heartbeat watchdog once: recover stale running jobs, release locks |
|
|
77
|
+
| `list_jobs` | Read the current job queue and lock-table snapshot |
|
|
78
|
+
| `get_lock_table` | Read active resource locks |
|
|
79
|
+
| `get_scheduler_lease` | Read the current scheduler lease |
|
|
80
|
+
|
|
81
|
+
Example — queuing a blocked job:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
enqueue_job {
|
|
85
|
+
"kind": "handoff.lifecycle",
|
|
86
|
+
"priority": "P1",
|
|
87
|
+
"dependencies": [{ "kind": "handoff", "ref": "HND-20260710-abc12345", "expected": "accepted" }],
|
|
88
|
+
"resource_requirements": ["agent-state/handoff-registry.json"],
|
|
89
|
+
"run_after": "2030-05-08T18:00:00Z"
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Goals
|
|
94
|
+
|
|
95
|
+
| Tool | Purpose |
|
|
96
|
+
|---|---|
|
|
97
|
+
| `start_goal` | Compile an objective into a validated plan and open a goal record |
|
|
98
|
+
| `get_goal_status` | Read goal status, tick/replan counts, ready steps, and escalations |
|
|
99
|
+
| `resume_goal` | Resume a stopped or escalated goal from its persisted state |
|
|
100
|
+
| `stop_goal` | Operator stop for a running goal |
|
|
101
|
+
|
|
102
|
+
A goal reaches `done` only through evidence-gated success; it otherwise leaves `executing` through budget exhaustion, operator stop, or an escalated blocker. The same loop is available from the CLI as `ace goal start|status|run|resume|stop`.
|
|
103
|
+
|
|
104
|
+
## Files & Structural Editing
|
|
105
|
+
|
|
106
|
+
| Tool | Purpose |
|
|
107
|
+
|---|---|
|
|
108
|
+
| `read_workspace_file` | Read any file in the workspace |
|
|
109
|
+
| `write_workspace_file` | Write or overwrite a file (evidence-tracked) |
|
|
110
|
+
| `list_workspace` | List one workspace directory (`path`; no glob filtering) |
|
|
111
|
+
| `safe_edit_file` | Edit a file with collision-safe write semantics |
|
|
112
|
+
| `diff_files` | Produce a sequence-aware unified diff; set `mode` explicitly to `content` or `path` |
|
|
113
|
+
| `read_file_lines` | Read a line range from a file |
|
|
114
|
+
| `outline_file` | Extract code declarations using language-oriented declaration patterns (not Markdown headings) |
|
|
115
|
+
| `astgrep_query` | Execute ast-grep directly against a workspace directory |
|
|
116
|
+
| `astgrep_locate` | Locate a specific symbol or construct with ast-grep |
|
|
117
|
+
| `compile_structural_edit` | Compile an ast-grep rewrite to a patch |
|
|
118
|
+
| `preview_structural_edit` | Preview a structural edit without applying |
|
|
119
|
+
| `astgrep_rewrite` | Apply a rewrite to one promoted target; multi-file rewrites are refused |
|
|
120
|
+
| `apply_patch` | Apply a unified diff patch to the workspace |
|
|
121
|
+
|
|
122
|
+
## Change Intelligence & Drift
|
|
123
|
+
|
|
124
|
+
| Tool | Purpose |
|
|
125
|
+
|---|---|
|
|
126
|
+
| `snapshot_state` | Take a semantic snapshot of the current workspace state |
|
|
127
|
+
| `semantic_diff` | Diff two semantic snapshots |
|
|
128
|
+
| `drift_report` | Produce a drift report between baseline and current state |
|
|
129
|
+
| `list_snapshots` | List available workspace snapshots |
|
|
130
|
+
| `rewrite_targets` | Identify files that are candidates for rewrite based on drift |
|
|
131
|
+
|
|
132
|
+
## Discovery & Indexing
|
|
133
|
+
|
|
134
|
+
| Tool | Purpose |
|
|
135
|
+
|---|---|
|
|
136
|
+
| `refresh_astgrep_index` | Rebuild the ast-grep structural index |
|
|
137
|
+
| `scan_workspace_delta` | Scan for file changes since the last index pass |
|
|
138
|
+
| `web_research_packet` | Package a web research context for agent consumption |
|
|
139
|
+
| `mcp_ingestion_probe` | Perform a bounded MCP initialize over stdio/Streamable HTTP and list tools, resources, resource templates, and prompts |
|
|
140
|
+
| `codemunch_snapshot` | Take a full codemunch snapshot of the workspace |
|
|
141
|
+
| `codemunch_index` | Index a codemunch snapshot for search |
|
|
142
|
+
|
|
143
|
+
## Git
|
|
144
|
+
|
|
145
|
+
| Tool | Purpose |
|
|
146
|
+
|---|---|
|
|
147
|
+
| `git_status` | Read working-tree status |
|
|
148
|
+
| `git_commit` | Stage and commit changes with a message |
|
|
149
|
+
| `git_diff` | Diff staged or unstaged changes, optionally restricted by `path` |
|
|
150
|
+
| `git_log` | Read recent commit history |
|
|
151
|
+
|
|
152
|
+
## Memory & Continuity
|
|
153
|
+
|
|
154
|
+
| Tool | Purpose |
|
|
155
|
+
|---|---|
|
|
156
|
+
| `context_snapshot` | Capture a structured context snapshot for the current session |
|
|
157
|
+
| `build_continuity_packet` | Build a continuity packet for cross-session handoff |
|
|
158
|
+
| `recall_context` | Recall an exact snapshot name, or list all snapshots when no name is supplied |
|
|
159
|
+
|
|
160
|
+
Example — before switching models mid-task:
|
|
161
|
+
|
|
162
|
+
```text
|
|
163
|
+
build_continuity_packet {
|
|
164
|
+
"snapshot_name": "auth-module-pre-model-switch",
|
|
165
|
+
"source_paths": ["src/auth.ts", "src/auth.test.ts"],
|
|
166
|
+
"max_status_events": 20
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Lifecycle & Status Events
|
|
171
|
+
|
|
172
|
+
| Tool | Purpose |
|
|
173
|
+
|---|---|
|
|
174
|
+
| `emit_status_event` | Append a typed lifecycle event to `STATUS_EVENTS.ndjson` |
|
|
175
|
+
| `list_status_events` | Read recent lifecycle events with optional filters |
|
|
176
|
+
| `open_circuit_breaker` | Trip a named circuit breaker to halt a failing upstream path |
|
|
177
|
+
| `close_circuit_breaker` | Reset a tripped circuit breaker |
|
|
178
|
+
| `generate_kanban_ui` | Rebuild the kanban board from current state |
|
|
179
|
+
|
|
180
|
+
Example:
|
|
181
|
+
|
|
182
|
+
```text
|
|
183
|
+
emit_status_event {
|
|
184
|
+
"source_module": "capability-ops",
|
|
185
|
+
"event_type": "TASK_COMPLETE",
|
|
186
|
+
"status": "pass",
|
|
187
|
+
"summary": "Auth integration tests green across all providers"
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Todo & Run Ledger
|
|
192
|
+
|
|
193
|
+
| Tool | Purpose |
|
|
194
|
+
|---|---|
|
|
195
|
+
| `get_todo` | Read the current todo surface |
|
|
196
|
+
| `get_todo_state` | Read structured todo state from the store |
|
|
197
|
+
| `update_todo` | Update one or more todo items |
|
|
198
|
+
| `get_run_ledger` | Read the run ledger (history of major tool invocations) |
|
|
199
|
+
|
|
200
|
+
## Vericify (Verification)
|
|
201
|
+
|
|
202
|
+
| Tool | Purpose |
|
|
203
|
+
|---|---|
|
|
204
|
+
| `get_vericify_context` | Get the current verification context packet |
|
|
205
|
+
| `get_vericify_delta` | Get the incremental verification delta |
|
|
206
|
+
| `get_vericify_bridge` | Read the vericify bridge snapshot |
|
|
207
|
+
| `refresh_vericify_bridge` | Refresh the bridge snapshot from test runner output |
|
|
208
|
+
| `validate_vericify_bridge` | Schema-validate the bridge snapshot |
|
|
209
|
+
| `get_vericify_process_posts` | Read the vericify process post log |
|
|
210
|
+
| `append_vericify_process_post` | Append a test result post to the process log |
|
|
211
|
+
| `validate_vericify_process_post_log` | Schema-validate the process post log |
|
|
212
|
+
|
|
213
|
+
## Tracker Integration
|
|
214
|
+
|
|
215
|
+
| Tool | Purpose |
|
|
216
|
+
|---|---|
|
|
217
|
+
| `get_tracker_snapshot` | Read the cached tracker snapshot (GitHub Issues, Linear, etc.) |
|
|
218
|
+
| `validate_tracker_snapshot` | Schema-validate the tracker snapshot |
|
|
219
|
+
| `list_tracker_adapter_kinds` | List available tracker adapters |
|
|
220
|
+
| `get_tracker_adapter_health` | Check health of the active tracker adapter |
|
|
221
|
+
| `list_tracker_items` | List items from the tracker |
|
|
222
|
+
| `create_tracker_comment` | Post a comment to a tracker item |
|
|
223
|
+
| `update_tracker_item_state` | Update the state of a tracker item |
|
|
224
|
+
| `refresh_tracker_snapshot` | Pull fresh data from the tracker into the snapshot |
|
|
225
|
+
|
|
226
|
+
## Skills & Tasks
|
|
227
|
+
|
|
228
|
+
| Tool | Purpose |
|
|
229
|
+
|---|---|
|
|
230
|
+
| `skill_catalog_summary` | List all available skills with brief descriptions |
|
|
231
|
+
| `skill_audit` | Audit skill freshness and coverage |
|
|
232
|
+
| `problem_triage` | Triage a problem description against known skills |
|
|
233
|
+
| `list_skills` | List skills in the store |
|
|
234
|
+
| `get_skill_instructions` | Read full instructions for a named skill |
|
|
235
|
+
| `get_task_pack` | Read a named task pack |
|
|
236
|
+
| `get_lessons` | Read lessons (backed by the experience playbook store) |
|
|
237
|
+
| `add_lesson` | Append a lesson as a playbook bullet |
|
|
238
|
+
|
|
239
|
+
## Workspace Sessions
|
|
240
|
+
|
|
241
|
+
| Tool | Purpose |
|
|
242
|
+
|---|---|
|
|
243
|
+
| `list_workspace_sessions` | List managed workspace sessions |
|
|
244
|
+
| `create_workspace_session` | Create a new managed workspace session |
|
|
245
|
+
| `remove_workspace_session` | Remove a workspace session |
|
|
246
|
+
| `validate_managed_workspace_path` | Validate a workspace path against the session registry |
|
|
247
|
+
|
|
248
|
+
## Unattended Sessions
|
|
249
|
+
|
|
250
|
+
| Tool | Purpose |
|
|
251
|
+
|---|---|
|
|
252
|
+
| `list_unattended_sessions` | List registered unattended agent sessions |
|
|
253
|
+
| `get_unattended_session` | Read details of a specific unattended session |
|
|
254
|
+
| `start_unattended_session` | Launch an unattended agent session |
|
|
255
|
+
| `stop_unattended_session` | Stop a running unattended session |
|
|
256
|
+
| `wait_for_unattended_session` | Block until a session reaches a terminal state |
|
|
257
|
+
| `validate_unattended_session_registry` | Schema-validate the session registry |
|
|
258
|
+
|
|
259
|
+
## Framework & Config
|
|
260
|
+
|
|
261
|
+
| Tool | Purpose |
|
|
262
|
+
|---|---|
|
|
263
|
+
| `get_mcp_config` | Read the baked MCP config for a named client |
|
|
264
|
+
| `run_tests` | Auto-detect and run the consumer workspace test suite, or run the supplied command |
|
|
265
|
+
| `get_cli_split` | Read the CLI split configuration |
|
|
266
|
+
|
|
267
|
+
## Resource and Prompt Catalog
|
|
268
|
+
|
|
269
|
+
The release surface is audited from the compiled registrations: **70 fixed resources**, **2 resource templates**, and **19 prompts**. `audit_public_surface` writes the complete, description-bearing catalog to `agent-state/PUBLIC_SURFACE_REPORT.md` and fails on count drift, an empty production event scan, unregistered emitted events, duplicate registrations, or invalid bound JSON schemas.
|
|
270
|
+
|
|
271
|
+
Fixed resource families:
|
|
272
|
+
|
|
273
|
+
- `ace://agents/{astgrep,builder,coders,docs,eval,memory,observability,ops,orchestrator,planner,qa,release,research,security,skeptic,spec,ui,vos}/{instructions,manifest}` (36)
|
|
274
|
+
- Handoffs: `ace://handoffs/{handoff_example,handoff_example_ui_coders,handoff_example_vos_ui,handoff_template,status}`
|
|
275
|
+
- Discovery and UI: `ace://index`, `ace://index/fingerprints`, `ace://kanban`, `ace://kanban/html`
|
|
276
|
+
- Kernel and execution: `ace://kernel/{agent_registry,directive_kernel}`, `ace://run-ledger`, `ace://runtime/{continuity-packet,executor-sessions,profile,prompt-template,tool-specs,tracker-snapshot,vericify-bridge,vericify-process-posts,workspaces}`
|
|
277
|
+
- Scheduler and skills: `ace://scheduler/{lease,locks,queue}`, `ace://skills`
|
|
278
|
+
- Structural state: `ace://state/{astgrep-commands,astgrep-index/json,astgrep-index/md}`, `ace://status/events`
|
|
279
|
+
- Task state: `ace://tasks/{cli_work_split,lessons,readme,role_tasks,todo}`
|
|
280
|
+
|
|
281
|
+
Resource templates:
|
|
282
|
+
|
|
283
|
+
- `ace-skill-instructions` — read a skill's `SKILL.md` by skill name.
|
|
284
|
+
- `ace-workspace-file` — read a workspace-relative file.
|
|
285
|
+
|
|
286
|
+
Prompts:
|
|
287
|
+
|
|
288
|
+
`ace-astgrep`, `ace-codemunch`, `ace-coders`, `ace-codesnipe`, `ace-eval`, `ace-genesis`, `ace-handoff`, `ace-initiate`, `ace-lessons`, `ace-memory`, `ace-observability`, `ace-orchestrator`, `ace-release`, `ace-runtime-executor`, `ace-security`, `ace-skill`, `ace-skills-index`, `ace-ui`, and `ace-vos`.
|
|
289
|
+
|
|
290
|
+
For schema-exact tool inputs, use MCP `tools/list`; for the release-bound schema files and their surface mappings, run `audit_public_surface`. This avoids maintaining a second hand-copied schema that can silently diverge from the registered Zod contracts.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Provider, Credential, and Trust Boundaries
|
|
2
|
+
|
|
3
|
+
ACE supports local runtimes and hosted/OpenAI-compatible providers. A discovered provider is only a configuration hint; it is not proof of authentication, reachability, model availability, or permission to mutate the workspace.
|
|
4
|
+
|
|
5
|
+
## Provider configuration
|
|
6
|
+
|
|
7
|
+
Prefer explicit CLI flags for one-off diagnosis and the stored runtime profile for repeatable operation:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ace connect ollama --model qwen3:8b --base-url http://127.0.0.1:11434
|
|
11
|
+
ace doctor --llm ollama --model qwen3:8b --base-url http://127.0.0.1:11434
|
|
12
|
+
|
|
13
|
+
ace connect llama-server --model local-model --base-url http://127.0.0.1:8080/v1
|
|
14
|
+
ace doctor --llm llama.cpp --model local-model --base-url http://127.0.0.1:8080/v1
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Hosted/OpenAI-compatible providers conventionally use `<PROVIDER>_API_KEY` and `<PROVIDER>_BASE_URL`. Codex/OpenAI discovery also recognizes `OPENAI_API_KEY`; Copilot can use authenticated `gh` state or `GITHUB_TOKEN`. Run `ace doctor` rather than assuming an environment variable is sufficient.
|
|
18
|
+
|
|
19
|
+
### Hosted provider quick setup
|
|
20
|
+
|
|
21
|
+
Use provider-specific credentials so switching providers does not accidentally reuse a key. ACE supplies the standard OpenAI endpoint for Codex, the Anthropic OpenAI-compatible endpoint for Claude, and the GitHub Models endpoint for Copilot. Gemini requires its OpenAI-compatible endpoint explicitly.
|
|
22
|
+
|
|
23
|
+
| Provider | Default model | Credential and endpoint |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| Codex | `gpt-5` | `CODEX_API_KEY`; endpoint defaults to `https://api.openai.com/v1` |
|
|
26
|
+
| Claude | `claude-opus-4-8` | `CLAUDE_API_KEY`; endpoint defaults to `https://api.anthropic.com/v1/` |
|
|
27
|
+
| Gemini | `gemini-2.5-pro` | `GEMINI_API_KEY` and `GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/` |
|
|
28
|
+
| Copilot | `copilot/gpt-5-mini` | `GITHUB_TOKEN` or `GH_TOKEN` (or authenticated `gh`); endpoint is `https://models.github.com/v1` |
|
|
29
|
+
|
|
30
|
+
Preflight the exact model before opening the TUI:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
CODEX_API_KEY=... ace doctor --llm codex --model gpt-5
|
|
34
|
+
CODEX_API_KEY=... ace tui --provider codex --model gpt-5
|
|
35
|
+
|
|
36
|
+
CLAUDE_API_KEY=... ace doctor --llm claude --model claude-opus-4-8
|
|
37
|
+
CLAUDE_API_KEY=... ace tui --provider claude --model claude-opus-4-8
|
|
38
|
+
|
|
39
|
+
GEMINI_API_KEY=... GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/ \
|
|
40
|
+
ace doctor --llm gemini --model gemini-2.5-pro
|
|
41
|
+
GEMINI_API_KEY=... GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/ \
|
|
42
|
+
ace tui --provider gemini --model gemini-2.5-pro
|
|
43
|
+
|
|
44
|
+
GITHUB_TOKEN=... ace doctor --llm copilot --model copilot/gpt-5-mini
|
|
45
|
+
GITHUB_TOKEN=... ace tui --provider copilot --model copilot/gpt-5-mini
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Provider discovery and a successful credential check do not prove that the account can use the requested model. Treat the doctor's served-model result as the preflight gate and keep an explicit `--model` when provider aliases or catalogs can change.
|
|
49
|
+
|
|
50
|
+
## Secret handling
|
|
51
|
+
|
|
52
|
+
- Do not put API keys, bearer tokens, cookies, passwords, or credentials in `TASK.md`, prompts, handoffs, evidence logs, runtime tool arguments, or MCP configuration committed to a repository.
|
|
53
|
+
- Pass secrets through the provider's supported environment or operating-system credential store.
|
|
54
|
+
- `mcp_ingestion_probe` rejects secret-like environment keys and records only allowed configuration metadata.
|
|
55
|
+
- Treat `ace mcp-config` output as executable configuration. Review command paths, working directories, and environment forwarding before installing it globally.
|
|
56
|
+
- Store files and projections can contain task context, tool results, paths, and model output. Protect workspace backups accordingly.
|
|
57
|
+
|
|
58
|
+
## Local endpoint boundary
|
|
59
|
+
|
|
60
|
+
Ollama and llama.cpp commonly listen on loopback. Do not expose them on a public interface without an authenticated reverse proxy, request limits, and a reviewed model/tool policy. A local model connected to `mcp-shadow` can invoke only its allowed tool scope, but those tools may still read or mutate the workspace.
|
|
61
|
+
|
|
62
|
+
## MCP trust boundary
|
|
63
|
+
|
|
64
|
+
- `ace mcp --profile host-min` reduces the host-visible tool schema; `--profile full` exposes the complete tool surface.
|
|
65
|
+
- Hermes uses `mcp-shadow --tools <csv>` and refuses an empty scope.
|
|
66
|
+
- A successful configuration validation is not a successful MCP handshake. Use probe results that include protocol initialization plus tool/resource enumeration.
|
|
67
|
+
- External MCP servers are separate trust domains. Review their executable command, URL, arguments, and data-retention policy before connecting.
|
|
68
|
+
|
|
69
|
+
## Tracker boundary
|
|
70
|
+
|
|
71
|
+
Tracker tools may read items and can create comments or change item state. Keep adapters disabled unless configured intentionally, use least-privilege credentials, and test with read operations before enabling mutations.
|
|
72
|
+
|
|
73
|
+
## Model output and completion
|
|
74
|
+
|
|
75
|
+
Model prose does not authorize completion or mutation. Mutation-capable runs must be backed by successful tool results and any declared artifacts, evidence refs, and verification commands. A provider returning HTTP 200 or a process exiting 0 is transport evidence only.
|
|
76
|
+
|
|
77
|
+
## Incident response
|
|
78
|
+
|
|
79
|
+
If a credential may have entered an artifact or trace:
|
|
80
|
+
|
|
81
|
+
1. Stop active sessions.
|
|
82
|
+
2. Revoke or rotate the credential at the provider.
|
|
83
|
+
3. Inspect packed and loose artifacts before sharing or backing up the workspace.
|
|
84
|
+
4. Record sanitized evidence; do not copy the secret into the incident log.
|
|
85
|
+
5. Re-run provider doctor checks with the replacement credential.
|