@matt82198/aesop 0.1.0-beta.3 → 0.1.0-beta.5
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 +79 -95
- package/CLAUDE-TEMPLATE.md +115 -0
- package/README.md +126 -245
- package/aesop.config.example.json +34 -26
- package/bin/CLAUDE.md +67 -0
- package/bin/cli.js +593 -36
- package/daemons/CLAUDE.md +36 -0
- package/daemons/backup-fleet.sh +92 -21
- package/daemons/run-watchdog.sh +95 -12
- package/dash/CLAUDE.md +32 -0
- package/dash/dash-extra.mjs +194 -21
- package/dash/watchdog-gui.sh +23 -6
- package/docs/BEHAVIORAL-PR-REVIEW.md +86 -0
- package/docs/CHECKPOINTING.md +100 -0
- package/docs/DISPATCH-MODEL.md +11 -7
- package/docs/FORENSICS.md +204 -0
- package/docs/GOVERNANCE.md +4 -2
- package/docs/HOOK-INSTALL.md +307 -0
- package/docs/HOW-THE-LOOP-WORKS.md +175 -0
- package/docs/MEMORY-TEMPLATE.md +61 -0
- package/docs/README.md +44 -0
- package/docs/RELEASING.md +159 -0
- package/docs/RELIABILITY.md +61 -0
- package/docs/RESTORE.md +397 -0
- package/docs/SCRIPTS-POLICY.md +97 -0
- package/docs/archive/README.md +3 -0
- package/docs/archive/spikes/tiered-cognition/ACTIVATION.md +125 -0
- package/docs/archive/spikes/tiered-cognition/DESIGN.md +287 -0
- package/docs/archive/spikes/tiered-cognition/FINDINGS.md +113 -0
- package/docs/archive/spikes/tiered-cognition/README.md +27 -0
- package/docs/archive/spikes/tiered-cognition/aesop-cognition.example.md +32 -0
- package/docs/archive/spikes/tiered-cognition/force-model-policy.merged.mjs +673 -0
- package/docs/archive/spikes/tiered-cognition/strip-tools-hook.mjs +434 -0
- package/docs/case-study-portfolio.md +61 -0
- package/docs/self-stats-data.json +11 -0
- package/docs/templates/FLEET-OPS-ANALYSIS.example.md +27 -0
- package/docs/templates/FLEET-OPS-RECOMMENDATIONS.example.md +24 -0
- package/docs/templates/PROPOSALS-LOG.example.md +64 -0
- package/hooks/CLAUDE.md +61 -0
- package/hooks/claude/force-model-policy.mjs +159 -0
- package/hooks/pre-push-policy.sh +753 -0
- package/mcp/CLAUDE.md +213 -0
- package/mcp/package.json +26 -0
- package/mcp/server.mjs +543 -0
- package/monitor/.signal-state.json +3 -0
- package/monitor/ACTIONS.log +1 -0
- package/monitor/BRIEF.md +24 -0
- package/monitor/CHARTER.md +75 -88
- package/monitor/CLAUDE.md +40 -0
- package/monitor/SIGNALS.json +54 -0
- package/monitor/collect-signals.mjs +613 -61
- package/package.json +15 -3
- package/scan/fleet-scan.example.mjs +292 -0
- package/skills/CLAUDE.md +3 -0
- package/skills/healthcheck/SKILL.md +44 -0
- package/skills/power/SKILL.md +161 -0
- package/state_store/CLAUDE.md +39 -0
- package/state_store/__init__.py +24 -0
- package/state_store/__pycache__/__init__.cpython-314.pyc +0 -0
- package/state_store/__pycache__/api.cpython-314.pyc +0 -0
- package/state_store/__pycache__/export.cpython-314.pyc +0 -0
- package/state_store/__pycache__/ingest.cpython-314.pyc +0 -0
- package/state_store/__pycache__/projections.cpython-314.pyc +0 -0
- package/state_store/__pycache__/store.cpython-314.pyc +0 -0
- package/state_store/api.py +35 -0
- package/state_store/export.py +19 -0
- package/state_store/ingest.py +24 -0
- package/state_store/projections.py +52 -0
- package/state_store/store.py +102 -0
- package/tools/CLAUDE.md +72 -0
- package/tools/__pycache__/alert_bridge.cpython-314.pyc +0 -0
- package/tools/__pycache__/buildlog.cpython-314.pyc +0 -0
- package/tools/__pycache__/ci_merge_wait.cpython-314.pyc +0 -0
- package/tools/__pycache__/ensure_state.cpython-314.pyc +0 -0
- package/tools/__pycache__/eod_sweep.cpython-314.pyc +0 -0
- package/tools/__pycache__/fleet_ledger.cpython-314.pyc +0 -0
- package/tools/__pycache__/fleet_prompt_extractor.cpython-314.pyc +0 -0
- package/tools/__pycache__/healthcheck.cpython-314.pyc +0 -0
- package/tools/__pycache__/heartbeat.cpython-314.pyc +0 -0
- package/tools/__pycache__/inbox_drain.cpython-314.pyc +0 -0
- package/tools/__pycache__/launch_tui.cpython-314.pyc +0 -0
- package/tools/__pycache__/metrics_gate.cpython-314.pyc +0 -0
- package/tools/__pycache__/orchestrator_status.cpython-314.pyc +0 -0
- package/tools/__pycache__/power_selftest.cpython-314.pyc +0 -0
- package/tools/__pycache__/prepublish_scan.cpython-314.pyc +0 -0
- package/tools/__pycache__/rotate_logs.cpython-314.pyc +0 -0
- package/tools/__pycache__/scanner_selftest.cpython-314.pyc +0 -0
- package/tools/__pycache__/secret_scan.cpython-314.pyc +0 -0
- package/tools/__pycache__/self_stats.cpython-314.pyc +0 -0
- package/tools/__pycache__/session_usage_summary.cpython-314.pyc +0 -0
- package/tools/__pycache__/stall_check.cpython-314.pyc +0 -0
- package/tools/__pycache__/transcript_replay.cpython-314.pyc +0 -0
- package/tools/__pycache__/transcript_timeline.cpython-314.pyc +0 -0
- package/tools/__pycache__/verify_dash.cpython-314.pyc +0 -0
- package/tools/__pycache__/verify_submit_encoding.cpython-314.pyc +0 -0
- package/tools/agent-forensics.sh +186 -0
- package/tools/alert_bridge.py +449 -0
- package/tools/buildlog.py +182 -0
- package/tools/ci_merge_wait.py +317 -0
- package/tools/ensure_state.py +94 -0
- package/tools/eod_sweep.py +239 -0
- package/tools/fleet_ledger.py +272 -0
- package/tools/fleet_prompt_extractor.py +134 -0
- package/tools/healthcheck.py +296 -0
- package/tools/heartbeat.py +131 -0
- package/tools/inbox_drain.py +249 -0
- package/tools/launch_tui.py +51 -3
- package/tools/lock.mjs +211 -0
- package/tools/metrics_gate.py +205 -0
- package/tools/orchestrator_status.py +99 -0
- package/tools/power_selftest.py +386 -0
- package/tools/prepublish_scan.py +84 -0
- package/tools/proposals.mjs +248 -0
- package/tools/reconstitute.sh +467 -0
- package/tools/rotate_logs.py +228 -0
- package/tools/scanner_selftest.py +303 -0
- package/tools/secret_scan.py +138 -31
- package/tools/self_stats.py +509 -0
- package/tools/session_usage_summary.py +198 -0
- package/tools/stall_check.py +172 -0
- package/tools/svg_to_png.mjs +50 -0
- package/tools/transcript_replay.py +236 -0
- package/tools/transcript_timeline.py +184 -0
- package/tools/verify_dash.py +513 -0
- package/tools/verify_submit_encoding.py +202 -0
- package/ui/CLAUDE.md +125 -0
- package/ui/__pycache__/agents.cpython-314.pyc +0 -0
- package/ui/__pycache__/collectors.cpython-314.pyc +0 -0
- package/ui/__pycache__/config.cpython-314.pyc +0 -0
- package/ui/__pycache__/cost.cpython-314.pyc +0 -0
- package/ui/__pycache__/csrf.cpython-314.pyc +0 -0
- package/ui/__pycache__/handler.cpython-314.pyc +0 -0
- package/ui/__pycache__/render.cpython-314.pyc +0 -0
- package/ui/__pycache__/serve.cpython-314.pyc +0 -0
- package/ui/__pycache__/sse.cpython-314.pyc +0 -0
- package/ui/agents.py +183 -0
- package/ui/api/__init__.py +84 -0
- package/ui/api/__pycache__/__init__.cpython-314.pyc +0 -0
- package/ui/api/__pycache__/submit.cpython-314.pyc +0 -0
- package/ui/api/__pycache__/tracker.cpython-314.pyc +0 -0
- package/ui/api/submit.py +97 -0
- package/ui/api/tracker.py +116 -0
- package/ui/collectors.py +735 -0
- package/ui/config.py +123 -0
- package/ui/cost.py +260 -0
- package/ui/csrf.py +144 -0
- package/ui/handler.py +676 -0
- package/ui/render.py +49 -0
- package/ui/serve.py +68 -796
- package/ui/sse.py +183 -0
- package/ui/web/.gitattributes +13 -0
- package/ui/web/dist/assets/index-2LZDQirC.js +9 -0
- package/ui/web/dist/assets/index-D4M1qyOv.css +1 -0
- package/ui/web/dist/index.html +14 -0
- package/ui/web/index.html +13 -0
- package/ui/web/package-lock.json +2225 -0
- package/ui/web/package.json +26 -0
- package/ui/web/src/App.test.tsx +74 -0
- package/ui/web/src/App.tsx +142 -0
- package/ui/web/src/CONTRIBUTING-UI.md +49 -0
- package/ui/web/src/components/AgentRow.css +187 -0
- package/ui/web/src/components/AgentRow.test.tsx +209 -0
- package/ui/web/src/components/AgentRow.tsx +207 -0
- package/ui/web/src/components/AgentsPanel.css +108 -0
- package/ui/web/src/components/AgentsPanel.test.tsx +41 -0
- package/ui/web/src/components/AgentsPanel.tsx +58 -0
- package/ui/web/src/components/AlertsPanel.css +88 -0
- package/ui/web/src/components/AlertsPanel.test.tsx +51 -0
- package/ui/web/src/components/AlertsPanel.tsx +67 -0
- package/ui/web/src/components/BacklogPanel.test.tsx +126 -0
- package/ui/web/src/components/BacklogPanel.tsx +122 -0
- package/ui/web/src/components/CostChart.css +110 -0
- package/ui/web/src/components/CostChart.test.tsx +144 -0
- package/ui/web/src/components/CostChart.tsx +152 -0
- package/ui/web/src/components/CostTable.css +93 -0
- package/ui/web/src/components/CostTable.test.tsx +165 -0
- package/ui/web/src/components/CostTable.tsx +94 -0
- package/ui/web/src/components/EventsFeed.css +68 -0
- package/ui/web/src/components/EventsFeed.test.tsx +36 -0
- package/ui/web/src/components/EventsFeed.tsx +31 -0
- package/ui/web/src/components/HealthHeader.css +137 -0
- package/ui/web/src/components/HealthHeader.test.tsx +278 -0
- package/ui/web/src/components/HealthHeader.tsx +281 -0
- package/ui/web/src/components/InboxForm.css +135 -0
- package/ui/web/src/components/InboxForm.test.tsx +208 -0
- package/ui/web/src/components/InboxForm.tsx +116 -0
- package/ui/web/src/components/MessagesTail.module.css +144 -0
- package/ui/web/src/components/MessagesTail.test.tsx +176 -0
- package/ui/web/src/components/MessagesTail.tsx +94 -0
- package/ui/web/src/components/ReposPanel.css +90 -0
- package/ui/web/src/components/ReposPanel.test.tsx +45 -0
- package/ui/web/src/components/ReposPanel.tsx +67 -0
- package/ui/web/src/components/Scorecard.css +106 -0
- package/ui/web/src/components/Scorecard.test.tsx +117 -0
- package/ui/web/src/components/Scorecard.tsx +85 -0
- package/ui/web/src/components/Timeline.module.css +151 -0
- package/ui/web/src/components/Timeline.test.tsx +215 -0
- package/ui/web/src/components/Timeline.tsx +99 -0
- package/ui/web/src/components/TrackerBoard.test.tsx +121 -0
- package/ui/web/src/components/TrackerBoard.tsx +107 -0
- package/ui/web/src/components/TrackerCard.test.tsx +180 -0
- package/ui/web/src/components/TrackerCard.tsx +160 -0
- package/ui/web/src/components/TrackerForm.test.tsx +189 -0
- package/ui/web/src/components/TrackerForm.tsx +144 -0
- package/ui/web/src/lib/api.ts +218 -0
- package/ui/web/src/lib/format.test.ts +89 -0
- package/ui/web/src/lib/format.ts +103 -0
- package/ui/web/src/lib/sanitizeUrl.test.ts +84 -0
- package/ui/web/src/lib/sanitizeUrl.ts +38 -0
- package/ui/web/src/lib/types.ts +230 -0
- package/ui/web/src/lib/useHashRoute.test.ts +60 -0
- package/ui/web/src/lib/useHashRoute.ts +23 -0
- package/ui/web/src/lib/useSSE.ts +175 -0
- package/ui/web/src/main.tsx +10 -0
- package/ui/web/src/styles/global.css +179 -0
- package/ui/web/src/styles/theme.css +184 -0
- package/ui/web/src/styles/work.css +572 -0
- package/ui/web/src/test/fixtures.ts +385 -0
- package/ui/web/src/test/setup.ts +49 -0
- package/ui/web/src/views/Activity.module.css +43 -0
- package/ui/web/src/views/Activity.test.tsx +89 -0
- package/ui/web/src/views/Activity.tsx +31 -0
- package/ui/web/src/views/Cost.css +87 -0
- package/ui/web/src/views/Cost.test.tsx +142 -0
- package/ui/web/src/views/Cost.tsx +54 -0
- package/ui/web/src/views/Overview.css +51 -0
- package/ui/web/src/views/Overview.test.tsx +76 -0
- package/ui/web/src/views/Overview.tsx +46 -0
- package/ui/web/src/views/Work.test.tsx +82 -0
- package/ui/web/src/views/Work.tsx +79 -0
- package/ui/web/src/vite-env.d.ts +10 -0
- package/ui/web/tsconfig.json +22 -0
- package/ui/web/vite.config.ts +25 -0
- package/ui/web/vitest.config.ts +12 -0
package/mcp/CLAUDE.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# mcp/ — Read-Only Fleet State MCP Server
|
|
2
|
+
|
|
3
|
+
**Purpose**: Expose Aesop fleet operational status as a Model Context Protocol (MCP) server for Claude Code and other MCP clients.
|
|
4
|
+
|
|
5
|
+
## Server
|
|
6
|
+
|
|
7
|
+
**File**: `server.mjs` — Stdio-transport MCP server implementing the JSON-RPC 2.0 protocol.
|
|
8
|
+
|
|
9
|
+
**Configuration**:
|
|
10
|
+
- `AESOP_ROOT` environment variable or `--root <path>` command-line flag (no hardcoded paths)
|
|
11
|
+
- `AESOP_STATE_ROOT` environment variable for state directory override (default: `AESOP_ROOT/state`)
|
|
12
|
+
- `AESOP_TRANSCRIPTS_ROOT` environment variable for transcript directory override (default: `~/.claude/projects`)
|
|
13
|
+
- Reads `aesop.config.json` from AESOP_ROOT for optional config file overrides
|
|
14
|
+
|
|
15
|
+
**Launch**:
|
|
16
|
+
```bash
|
|
17
|
+
node mcp/server.mjs [--root /path/to/aesop]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The server reads from stdin, writes JSON-RPC responses to stdout. Suitable for direct MCP integration or debugging via manual JSON-RPC frames.
|
|
21
|
+
|
|
22
|
+
## Tools
|
|
23
|
+
|
|
24
|
+
All tools are **strictly read-only**: no state mutations, no file writes, no shell-outs except the minimal dash-extra.mjs passthrough for fleet_agents.
|
|
25
|
+
|
|
26
|
+
### fleet_status
|
|
27
|
+
|
|
28
|
+
**Description**: Get fleet operational status — daemon heartbeats, monitor heartbeat, orchestrator activity, alert count.
|
|
29
|
+
|
|
30
|
+
**Input**: No arguments.
|
|
31
|
+
|
|
32
|
+
**Output** (JSON):
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"watchdog": {
|
|
36
|
+
"alive": "ALIVE" | "STALE",
|
|
37
|
+
"age_seconds": <bucketed>,
|
|
38
|
+
"threshold_seconds": 300
|
|
39
|
+
},
|
|
40
|
+
"monitor": {
|
|
41
|
+
"alive": "ALIVE" | "STALE",
|
|
42
|
+
"age_seconds": <bucketed>,
|
|
43
|
+
"threshold_seconds": 3600
|
|
44
|
+
},
|
|
45
|
+
"orchestrator": <parsed orchestrator-status.json> or null,
|
|
46
|
+
"alerts": {
|
|
47
|
+
"count": <int>,
|
|
48
|
+
"sample_lines": [<last 3 unreviewed lines>]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Missing files**: If a file doesn't exist, the corresponding field is `null`. The response never crashes; missing state files are reported gracefully with `absent` markers where applicable.
|
|
54
|
+
|
|
55
|
+
### fleet_agents
|
|
56
|
+
|
|
57
|
+
**Description**: List active Claude agents from transcript directory. Invokes `dash-extra.mjs --json` with environment variables for path portability.
|
|
58
|
+
|
|
59
|
+
**Input**: No arguments.
|
|
60
|
+
|
|
61
|
+
**Output** (JSON):
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"absent": <bool>,
|
|
65
|
+
"agents": [
|
|
66
|
+
{
|
|
67
|
+
"project": <string>,
|
|
68
|
+
"taskLabel": <string>,
|
|
69
|
+
"promptFull": <string>,
|
|
70
|
+
"runtimeSeconds": <int>,
|
|
71
|
+
"tokensUsed": <int>,
|
|
72
|
+
"startedAt": <ISO string>,
|
|
73
|
+
"lastActivity": <ISO string>
|
|
74
|
+
},
|
|
75
|
+
...
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Design notes**:
|
|
81
|
+
- Passes through `dash-extra.mjs --json` output (no reimplementation).
|
|
82
|
+
- Timeout: 5 seconds. On timeout or error, returns empty agents list.
|
|
83
|
+
- Environment variables (`AESOP_ROOT`, `AESOP_STATE_ROOT`, `AESOP_TRANSCRIPTS_ROOT`) are set before invoking dash-extra to ensure portable transcript discovery.
|
|
84
|
+
|
|
85
|
+
### fleet_tracker
|
|
86
|
+
|
|
87
|
+
**Description**: Get fleet work items from `tracker.json`, grouped by lane.
|
|
88
|
+
|
|
89
|
+
**Input**: No arguments.
|
|
90
|
+
|
|
91
|
+
**Output** (JSON):
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"absent": <bool>,
|
|
95
|
+
"by_lane": {
|
|
96
|
+
"ranked": [
|
|
97
|
+
{
|
|
98
|
+
"id": <string>,
|
|
99
|
+
"title": <string>,
|
|
100
|
+
"priority": "P0" | "P1" | "P2",
|
|
101
|
+
"status": "todo" | "in-progress" | "done",
|
|
102
|
+
"tags": [<string>, ...]
|
|
103
|
+
},
|
|
104
|
+
...
|
|
105
|
+
],
|
|
106
|
+
"in-progress": [ ... ],
|
|
107
|
+
"done": [ ... ],
|
|
108
|
+
...
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Lanes**: Each lane is optional and present only if items exist in it. Common lanes: `ranked`, `proposed`, `in-progress`, `done`.
|
|
114
|
+
|
|
115
|
+
### fleet_cost
|
|
116
|
+
|
|
117
|
+
**Description**: Get per-model token usage totals from the fleet outcomes ledger (`state/ledger/OUTCOMES-LEDGER.md`).
|
|
118
|
+
|
|
119
|
+
**Input**: No arguments.
|
|
120
|
+
|
|
121
|
+
**Output** (JSON):
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"absent": <bool>,
|
|
125
|
+
"by_model": {
|
|
126
|
+
"claude-haiku-4": {
|
|
127
|
+
"tokens_in": <int>,
|
|
128
|
+
"tokens_out": <int>,
|
|
129
|
+
"total_tokens": <int>,
|
|
130
|
+
"count": <int>
|
|
131
|
+
},
|
|
132
|
+
"claude-opus": { ... },
|
|
133
|
+
...
|
|
134
|
+
},
|
|
135
|
+
"total_tokens_in": <int>,
|
|
136
|
+
"total_tokens_out": <int>
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Design notes**:
|
|
141
|
+
- Parses markdown table rows from the ledger file.
|
|
142
|
+
- Reports **token counts only** — no invented dollar figures.
|
|
143
|
+
- Gracefully handles missing or malformed lines (skips with no error).
|
|
144
|
+
|
|
145
|
+
## MCP Integration
|
|
146
|
+
|
|
147
|
+
### Claude Code (claude.json)
|
|
148
|
+
|
|
149
|
+
To register the server in Claude Code:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"mcp": {
|
|
154
|
+
"aesop-fleet": {
|
|
155
|
+
"command": "node",
|
|
156
|
+
"args": [
|
|
157
|
+
"/path/to/aesop/mcp/server.mjs",
|
|
158
|
+
"--root",
|
|
159
|
+
"/path/to/aesop"
|
|
160
|
+
],
|
|
161
|
+
"env": {
|
|
162
|
+
"AESOP_ROOT": "/path/to/aesop"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Portable Setup
|
|
170
|
+
|
|
171
|
+
For portable configuration (no hardcoded user paths), use environment variables:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
export AESOP_ROOT=/path/to/aesop
|
|
175
|
+
export AESOP_STATE_ROOT=/path/to/state # optional override
|
|
176
|
+
export AESOP_TRANSCRIPTS_ROOT=/path/to/transcripts # optional override
|
|
177
|
+
node /path/to/aesop/mcp/server.mjs
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Or use the `--root` flag:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
node /path/to/aesop/mcp/server.mjs --root /path/to/aesop
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Invariants & Guarantees
|
|
187
|
+
|
|
188
|
+
1. **Strictly read-only**: All tools are read-only. Zero state mutations, zero file writes.
|
|
189
|
+
2. **No shell execution** (except dash-extra.mjs invocation with timeout): Minimizes surface area for injection or performance issues.
|
|
190
|
+
3. **Graceful degradation**: Missing state files → empty results with `absent: true` markers, never a crash.
|
|
191
|
+
4. **No external dependencies**: Plain Node.js (no npm packages). Server.mjs uses only stdlib modules: `fs`, `path`, `os`, `child_process`, `readline`.
|
|
192
|
+
5. **JSON-RPC 2.0 compliant**: Standard request/response format with proper error codes.
|
|
193
|
+
6. **Portable paths**: All paths resolved from AESOP_ROOT, AESOP_STATE_ROOT, AESOP_TRANSCRIPTS_ROOT env vars or config file. No hardcoded paths like `/home/user/aesop`.
|
|
194
|
+
|
|
195
|
+
## Testing
|
|
196
|
+
|
|
197
|
+
See `tests/mcp-fleet.test.mjs` for end-to-end tests:
|
|
198
|
+
- Spawn server over stdio
|
|
199
|
+
- Drive JSON-RPC initialize + tools/list + tools/call round-trips
|
|
200
|
+
- Validate read-only behavior (no state mutations after calls)
|
|
201
|
+
- Verify fixture isolation (temp state root)
|
|
202
|
+
|
|
203
|
+
Run:
|
|
204
|
+
```bash
|
|
205
|
+
npm test # or
|
|
206
|
+
node tests/mcp-fleet.test.mjs
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Files
|
|
210
|
+
|
|
211
|
+
- **server.mjs** — Main MCP server implementation (stdio, JSON-RPC 2.0)
|
|
212
|
+
- **package.json** — Minimal metadata; no external dependencies
|
|
213
|
+
- **CLAUDE.md** — This file
|
package/mcp/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "aesop-fleet-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Read-only MCP server for Aesop fleet state (heartbeats, agents, tracker, costs)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "server.mjs",
|
|
7
|
+
"bin": {
|
|
8
|
+
"aesop-fleet": "server.mjs"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"start": "node server.mjs",
|
|
12
|
+
"start:root": "node server.mjs --root .."
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"mcp",
|
|
16
|
+
"model-context-protocol",
|
|
17
|
+
"orchestration",
|
|
18
|
+
"aesop"
|
|
19
|
+
],
|
|
20
|
+
"author": "Anthropic",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"dependencies": {},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18.0.0"
|
|
25
|
+
}
|
|
26
|
+
}
|