@event4u/agent-config 1.37.0 → 1.39.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/.agent-src/commands/onboard.md +131 -50
- package/.agent-src/templates/agents/agent-project-settings.example.yml +9 -2
- package/.agent-src/templates/scripts/work_engine/_lib/__init__.py +7 -0
- package/.agent-src/templates/scripts/work_engine/_lib/agent_settings.py +168 -0
- package/.agent-src/templates/scripts/work_engine/hooks/settings.py +18 -19
- package/.claude-plugin/marketplace.json +1 -1
- package/AGENTS.md +4 -4
- package/CHANGELOG.md +64 -0
- package/README.md +36 -1
- package/docs/contracts/mcp-cloud-scope.md +182 -0
- package/docs/contracts/mcp-phase-1-scope.md +8 -3
- package/docs/customization.md +45 -0
- package/docs/guidelines/agent-infra/layered-settings.md +54 -17
- package/docs/guidelines/agent-infra/mcp-request-signing.md +4 -0
- package/docs/mcp-server.md +11 -3
- package/docs/setup/mcp-client-config.md +152 -0
- package/docs/setup/mcp-cloud-endpoints.md +109 -0
- package/docs/setup/mcp-cloud-registry-listing.md +99 -0
- package/docs/setup/mcp-cloud-setup.md +152 -0
- package/docs/setup/mcp-r2-bootstrap.md +82 -0
- package/package.json +1 -1
- package/scripts/_lib/agent_settings.py +168 -0
- package/scripts/mcp_parity_smoke.py +146 -0
- package/scripts/pack_mcp_content.py +274 -0
- package/scripts/readme_linter.py +1 -1
package/README.md
CHANGED
|
@@ -90,6 +90,41 @@ Install directly in your agent for global, cross-project use:
|
|
|
90
90
|
→ [Full getting started guide](docs/getting-started.md) ·
|
|
91
91
|
[More examples & expected behavior](docs/showcase.md)
|
|
92
92
|
|
|
93
|
+
### Remote MCP — zero install
|
|
94
|
+
|
|
95
|
+
Skills, commands, rules, and guidelines are also served as a hosted MCP
|
|
96
|
+
endpoint. No clone, no `task mcp:setup`, no Python venv — point any
|
|
97
|
+
MCP-capable client (Claude Desktop, Cursor, Zed, Continue, hosted agents)
|
|
98
|
+
at:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
https://agent-config-mcp.event4u.workers.dev
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Verify it's live:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
curl https://agent-config-mcp.event4u.workers.dev
|
|
108
|
+
# → { "ok": true, "name": "agent-config-mcp", "release_key": "v…", … }
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Read-only, identity-stable per release. Per-client setup snippets
|
|
112
|
+
(Claude Desktop, Claude Code, Cursor, Zed, Continue) —
|
|
113
|
+
[`docs/setup/mcp-client-config.md`](docs/setup/mcp-client-config.md).
|
|
114
|
+
URL shapes (latest vs. pinned `/v<X.Y.Z>`) —
|
|
115
|
+
[`docs/setup/mcp-cloud-endpoints.md`](docs/setup/mcp-cloud-endpoints.md).
|
|
116
|
+
Operator setup (account, R2, secrets) — [`docs/setup/mcp-cloud-setup.md`](docs/setup/mcp-cloud-setup.md).
|
|
117
|
+
Experimental — A0-cloud contract lives at `docs/contracts/mcp-cloud-scope.md` (internal reference only per `STABILITY.md`).
|
|
118
|
+
|
|
119
|
+
> **Scope — Lite, not Full.** The hosted MCP endpoint serves the
|
|
120
|
+
> read-only governance surface (skills · commands · rules · guidelines
|
|
121
|
+
> · contexts) as MCP prompts and resources. It does **not** execute any
|
|
122
|
+
> of the ~112 Python scripts that ship with the package (linters,
|
|
123
|
+
> audits, `task ci`, work-engine hooks, …). Those require the full
|
|
124
|
+
> local install per [Quickstart](#quickstart). See
|
|
125
|
+
> [`docs/contracts/mcp-cloud-scope.md`](docs/contracts/mcp-cloud-scope.md)
|
|
126
|
+
> for the execution-safety boundary.
|
|
127
|
+
|
|
93
128
|
### Optional: persistent agent memory
|
|
94
129
|
|
|
95
130
|
`agent-config` integrates with [`@event4u/agent-memory`](https://www.npmjs.com/package/@event4u/agent-memory)
|
|
@@ -109,7 +144,7 @@ Install in the same project (dev-only):
|
|
|
109
144
|
npm install --save-dev @event4u/agent-memory
|
|
110
145
|
```
|
|
111
146
|
|
|
112
|
-
→ [Memory contract & retrieval API](docs/contracts/agent-memory-contract.md) (beta) · [Built-in MCP server](docs/mcp-server.md) (experimental —
|
|
147
|
+
→ [Memory contract & retrieval API](docs/contracts/agent-memory-contract.md) (beta) · [Built-in MCP server](docs/mcp-server.md) (experimental — local stdio access from Claude Desktop / Cursor / Zed / Continue, install with `task mcp:setup`)
|
|
113
148
|
|
|
114
149
|
---
|
|
115
150
|
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
stability: experimental
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# MCP Server — Cloud Scope (A0-cloud Hard Contract)
|
|
6
|
+
|
|
7
|
+
> **Status:** Active · covers `workers/mcp/` (TypeScript Cloudflare
|
|
8
|
+
> Worker bridge), MVP-1 surface. Extends — does **not** supersede —
|
|
9
|
+
> [`mcp-phase-1-scope.md`](mcp-phase-1-scope.md), which retains
|
|
10
|
+
> exclusive ownership of `scripts/mcp_server/` (local stdio).
|
|
11
|
+
> **Stability:** experimental — not linked from README, AGENTS.md, or
|
|
12
|
+
> `docs/architecture.md`. Internal index reference only per `STABILITY.md`.
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
Locks the **execution-safety boundary** for the hosted MCP Worker. Any
|
|
17
|
+
code under `workers/mcp/` must satisfy this contract verbatim. The
|
|
18
|
+
local stdio kernel and the hosted Worker are two distinct surfaces; a
|
|
19
|
+
deviation in one is **not** authorized by a precedent in the other.
|
|
20
|
+
|
|
21
|
+
The Worker IS the bridge described in
|
|
22
|
+
[`mcp-request-signing § Appendix`](../guidelines/agent-infra/mcp-request-signing.md#appendix--http-bridge-stdio-kernel-pattern-reference)
|
|
23
|
+
— but with two material differences from the appendix pattern: (1) no
|
|
24
|
+
spawned stdio child (content is read from a release-pinned R2 blob,
|
|
25
|
+
not a sub-process), and (2) no HMAC for MVP-1 (content is OSS and
|
|
26
|
+
read-only; the appendix pattern's `verifyRequest` is deferred to MVP-2
|
|
27
|
+
alongside auth).
|
|
28
|
+
|
|
29
|
+
## In-scope (MVP-1)
|
|
30
|
+
|
|
31
|
+
- **Transport:** HTTP + SSE (Cloudflare Worker `fetch` handler). The
|
|
32
|
+
local stdio kernel is out-of-scope for this contract and stays
|
|
33
|
+
governed by `mcp-phase-1-scope.md`.
|
|
34
|
+
- **MCP primitives:** `prompts/list` + `prompts/get` + `resources/list`
|
|
35
|
+
+ `resources/read` — read-only, parity with the local stdio surface.
|
|
36
|
+
- **Source data:** release-pinned content blob in R2 under the key
|
|
37
|
+
shape `releases/v<X.Y.Z>-<sha>/` (immutable per release). The blob
|
|
38
|
+
bundles `.agent-src/skills/<name>/SKILL.md`,
|
|
39
|
+
`.agent-src/commands/**/*.md`, and `docs/guidelines/` (the same
|
|
40
|
+
projection the local kernel reads). Never reads `.agent-src.uncompressed/`.
|
|
41
|
+
- **Identity surface:** `serverInfo.version` reads from a Worker-
|
|
42
|
+
bundled constant, `_meta.packageVersion` reads from a
|
|
43
|
+
`wrangler.toml` env var, `_meta.skillSetSignature` reads from a
|
|
44
|
+
**prebaked manifest JSON** shipped with the content blob. The
|
|
45
|
+
Worker never computes the signature at runtime.
|
|
46
|
+
- **URL shape:** two pinned shapes only —
|
|
47
|
+
`mcp.<host>/v<X.Y.Z>/sse` (immutable, cache TTL 1 h) and
|
|
48
|
+
`mcp.<host>/latest/sse` (pointer, cache TTL 5 min). The `latest`
|
|
49
|
+
pointer is repointed atomically by the release pipeline after a
|
|
50
|
+
green smoke run; pre-smoke failures leave it on the previous
|
|
51
|
+
release.
|
|
52
|
+
- **Pagination + hot-reload parity:** `prompts/list` paginates with
|
|
53
|
+
`nextCursor` the same way the stdio kernel does; the Worker has no
|
|
54
|
+
hot-reload because the content blob is immutable per release —
|
|
55
|
+
the **release** is the cache-bust event.
|
|
56
|
+
- **Deprecated tool stubs:** `tools/list` returns exactly two entries,
|
|
57
|
+
`lint_skills` and `chat_history_append`, both with
|
|
58
|
+
`deprecated: true` and a description pointing to the local stdio
|
|
59
|
+
server. `tools/call` against either returns `isError=true` with a
|
|
60
|
+
message naming the local-stdio successor. No other tool name is
|
|
61
|
+
reachable.
|
|
62
|
+
|
|
63
|
+
## Out-of-scope (MVP-1)
|
|
64
|
+
|
|
65
|
+
- **Tool execution.** `lint_skills` and `chat_history_append` are
|
|
66
|
+
exposed as deprecated stubs only — no TS port, no FS access, no
|
|
67
|
+
shell, no Python runtime in the Worker. Restoration is the
|
|
68
|
+
Phase-7-DEFERRED block of the roadmap, gated on a real consumer ask
|
|
69
|
+
plus a multi-tenant security review.
|
|
70
|
+
- **`.agent-settings.yml` exposure.** Consumer-machine config, never
|
|
71
|
+
surfaced as a resource. The Worker has no access to consumer FS at
|
|
72
|
+
any layer.
|
|
73
|
+
- **Agent memory** — separate MCP server, different roadmap.
|
|
74
|
+
- **Chat history persistence** — the local kernel writes to
|
|
75
|
+
`agents/.agent-chat-history`; the Worker has no equivalent. Listed
|
|
76
|
+
as a deprecated stub per above.
|
|
77
|
+
- **Authentication / multi-tenancy.** MVP-1 is open (OSS content,
|
|
78
|
+
read-only). Bearer / CF Access / HMAC moves to MVP-2 alongside
|
|
79
|
+
tool restoration.
|
|
80
|
+
- **Network egress from the Worker** beyond an **explicit subrequest
|
|
81
|
+
allowlist** — see invariants below.
|
|
82
|
+
|
|
83
|
+
## A0-cloud invariants
|
|
84
|
+
|
|
85
|
+
The Worker code must satisfy all of:
|
|
86
|
+
|
|
87
|
+
1. **Origin allowlist** — `fetch()` calls from the Worker are limited
|
|
88
|
+
to R2 (content read) and an explicit observability sink (optional).
|
|
89
|
+
No calls to consumer infrastructure, no calls to upstream LLM
|
|
90
|
+
APIs, no calls to `api.github.com`, no DNS-based egress. Enforced
|
|
91
|
+
in `wrangler.toml` via Worker-level network policies.
|
|
92
|
+
2. **R2 write boundary** — the Worker never writes to R2. The release
|
|
93
|
+
pipeline writes under `releases/v<X.Y.Z>-<sha>/` and atomically
|
|
94
|
+
repoints `releases/latest.txt`; the Worker only reads.
|
|
95
|
+
3. **Per-versioned-URL immutability** — for any
|
|
96
|
+
`mcp.<host>/v<X.Y.Z>/sse`, the response body is deterministic for
|
|
97
|
+
the lifetime of the deployment. Patch fixes ship a new version key;
|
|
98
|
+
the existing key is never rewritten. R2 eventual consistency is
|
|
99
|
+
handled by the unique-key-per-release shape.
|
|
100
|
+
4. **Cache-TTL policy** — pinned URLs cache at the edge for 1 h
|
|
101
|
+
(safe because immutable); `latest` caches for 5 min (bounded
|
|
102
|
+
staleness window after a repoint). No client may rely on `latest`
|
|
103
|
+
for reproducibility — that is what the pinned URL is for.
|
|
104
|
+
5. **Prebaked signature** — `skillSetSignature` is computed once by
|
|
105
|
+
the release pipeline against the worktree at the tag and stored in
|
|
106
|
+
`releases/v<X.Y.Z>-<sha>/manifest.json`. The Worker reads, never
|
|
107
|
+
computes. Any signature drift at runtime is a contract violation.
|
|
108
|
+
6. **No consumer code execution.** No `eval`, no dynamic import of
|
|
109
|
+
content, no shelling out, no spawning a runtime. The Worker is a
|
|
110
|
+
read-and-route function.
|
|
111
|
+
7. **Single deployment per release.** One `wrangler deploy` per tag.
|
|
112
|
+
Concurrent deployments are not supported; the release pipeline
|
|
113
|
+
serializes through `release: published` + `workflow_dispatch`
|
|
114
|
+
hotfix paths.
|
|
115
|
+
8. **Ingress protection = edge cache + platform rate limit.** MVP-1
|
|
116
|
+
is auth-less by design; the public surface is shielded by two
|
|
117
|
+
layers Cloudflare provides without code: (a) edge caching per
|
|
118
|
+
invariant 4 (1 h on pinned URLs, 5 min on `latest`) absorbs
|
|
119
|
+
read-loop traffic before it reaches the Worker, and (b)
|
|
120
|
+
Cloudflare's account-level anti-abuse + DDoS shielding caps
|
|
121
|
+
per-IP burst on `*.workers.dev`. These two together **are** the
|
|
122
|
+
MVP-1 auth surrogate. **Promotion triggers** — any of these
|
|
123
|
+
flips HMAC (currently MVP-2 §Out-of-scope) from deferred to
|
|
124
|
+
active before the wake-up triggers below would otherwise fire:
|
|
125
|
+
sustained 429 spikes from origin (cache miss storm), Workers
|
|
126
|
+
request-cost line item exceeding the free-tier budget for two
|
|
127
|
+
consecutive billing periods, or a CVE-class abuse report
|
|
128
|
+
against the endpoint. A per-Worker `[[unsafe.bindings]]`
|
|
129
|
+
rate-limiter in `wrangler.toml` is **not** configured in MVP-1
|
|
130
|
+
— adding one is a contract amendment, not a free hand.
|
|
131
|
+
|
|
132
|
+
## Deprecated tool stub contract
|
|
133
|
+
|
|
134
|
+
`tools/list` returns:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
[
|
|
138
|
+
{
|
|
139
|
+
"name": "lint_skills",
|
|
140
|
+
"description": "Deprecated on hosted MCP — use the local stdio server (scripts/mcp_server/) which retains this tool. See road-to-cloudflare-mcp-hosting Phase 7 for restoration triggers.",
|
|
141
|
+
"deprecated": true
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "chat_history_append",
|
|
145
|
+
"description": "Deprecated on hosted MCP — filesystem-bound, local-only. Use the local stdio server.",
|
|
146
|
+
"deprecated": true
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`tools/call` against either name returns `isError=true` with the same
|
|
152
|
+
deprecation message. No other tool name is reachable.
|
|
153
|
+
|
|
154
|
+
## MVP-2 wake-up triggers
|
|
155
|
+
|
|
156
|
+
The Phase-7 deferred items in the roadmap (tool restoration, history
|
|
157
|
+
persistence, auth) wake up only when **all** of these fire:
|
|
158
|
+
|
|
159
|
+
- A named consumer (internal or external) requests hosted lint or
|
|
160
|
+
history.
|
|
161
|
+
- A security review has approved the validation layer for
|
|
162
|
+
`lint_skills` (URI regex allowlist, size limits, timeout,
|
|
163
|
+
concurrency cap).
|
|
164
|
+
- An auth model has been selected (bearer vs. CF Access vs. HMAC).
|
|
165
|
+
- The server stability label has been promoted from *experimental*
|
|
166
|
+
to *beta*.
|
|
167
|
+
|
|
168
|
+
## Revision policy
|
|
169
|
+
|
|
170
|
+
This contract is **experimental** — breaking changes are allowed in
|
|
171
|
+
any release with a CHANGELOG note. Promotion to `beta` requires at
|
|
172
|
+
least one shipped client connecting to the hosted endpoint end-to-end
|
|
173
|
+
without a contract amendment.
|
|
174
|
+
|
|
175
|
+
## See also
|
|
176
|
+
|
|
177
|
+
- [`mcp-phase-1-scope.md`](mcp-phase-1-scope.md) — local-stdio kernel
|
|
178
|
+
contract (sibling, not parent).
|
|
179
|
+
- [`STABILITY.md`](../../STABILITY.md) — stability policy for
|
|
180
|
+
`docs/contracts/`.
|
|
181
|
+
- [`mcp-request-signing § Appendix`](../guidelines/agent-infra/mcp-request-signing.md#appendix--http-bridge-stdio-kernel-pattern-reference)
|
|
182
|
+
— bridge pattern reference (the Worker is a flavor of this).
|
|
@@ -6,9 +6,10 @@ stability: experimental
|
|
|
6
6
|
|
|
7
7
|
> **Status:** Active · covers Phase 1 (A1–A7) + Phase 2 (B1–B5) +
|
|
8
8
|
> Phase 3 (C1–C4) + Phase 4 (D1–D4) + Phase 6 F1/F3 of
|
|
9
|
-
> `road-to-mcp-server.md`. Phase 6 F2 (SSE transport) is
|
|
10
|
-
> [`
|
|
11
|
-
> and remains out of scope here.
|
|
9
|
+
> `road-to-mcp-server.md`. Phase 6 F2 (SSE transport) is owned by
|
|
10
|
+
> [`mcp-cloud-scope.md`](mcp-cloud-scope.md) — the hosted Cloudflare
|
|
11
|
+
> Worker bridge — and remains out of scope here. This contract retains
|
|
12
|
+
> exclusive ownership of `scripts/mcp_server/` (local stdio).
|
|
12
13
|
> **Stability:** experimental — not linked from README, AGENTS.md, or
|
|
13
14
|
> `docs/architecture.md`. Internal index reference only per `STABILITY.md`.
|
|
14
15
|
|
|
@@ -187,4 +188,8 @@ prompts end-to-end without a contract amendment.
|
|
|
187
188
|
|
|
188
189
|
## See also
|
|
189
190
|
|
|
191
|
+
- [`mcp-cloud-scope.md`](mcp-cloud-scope.md) — hosted Worker contract
|
|
192
|
+
(sibling, not child). Extends the bridge pattern from
|
|
193
|
+
[`mcp-request-signing § Appendix`](../guidelines/agent-infra/mcp-request-signing.md#appendix--http-bridge-stdio-kernel-pattern-reference)
|
|
194
|
+
for multi-tenant SSE.
|
|
190
195
|
- [`STABILITY.md`](STABILITY.md) — stability policy for `docs/contracts/`.
|
package/docs/customization.md
CHANGED
|
@@ -42,6 +42,51 @@ The `.agent-settings.yml` file in the consumer project configures agent behavior
|
|
|
42
42
|
It is written as YAML with section-level grouping; dotted keys below reference
|
|
43
43
|
those sections.
|
|
44
44
|
|
|
45
|
+
### User-global DX-comfort defaults (cross-project)
|
|
46
|
+
|
|
47
|
+
Six **DX-comfort** keys can be carried across every project that uses
|
|
48
|
+
`event4u/agent-config` by storing them once in a user-global file at:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
~/.config/agent-config/agent-settings.yml
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The path is XDG-style and matches the existing
|
|
55
|
+
`~/.config/agent-config/` directory used for `anthropic.key`,
|
|
56
|
+
`openai.key`, and `council-spend.jsonl`.
|
|
57
|
+
|
|
58
|
+
**Whitelist (locked, exact dotted paths)** — only these six keys are
|
|
59
|
+
mergeable from the user-global file; every other key is silently ignored:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
name
|
|
63
|
+
ide
|
|
64
|
+
cost_profile
|
|
65
|
+
personal.bot_icon
|
|
66
|
+
personal.autonomy
|
|
67
|
+
caveman.speak_scope
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Merge order** (lowest → highest precedence):
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
1. Package defaults (shipped by event4u/agent-config)
|
|
74
|
+
2. ~/.config/agent-config/agent-settings.yml (user-global · whitelist-filtered)
|
|
75
|
+
3. <project>/.agent-settings.yml (project-local · always wins)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Project-local values **always win**. The user-global file is a
|
|
79
|
+
fallback, never a lock. Non-whitelisted keys in the user-global file
|
|
80
|
+
are dropped without error — adding `personal.theme` there has no
|
|
81
|
+
effect.
|
|
82
|
+
|
|
83
|
+
The file is created **only on explicit opt-in via `/onboard`**. The
|
|
84
|
+
loader at [`scripts/_lib/agent_settings.py`](../scripts/_lib/agent_settings.py)
|
|
85
|
+
is **read-only** — no script can create or mutate it without an
|
|
86
|
+
explicit `/onboard` confirmation. Edit the file by hand for mid-life
|
|
87
|
+
changes; `/sync-agent-settings` stays project-scoped and never touches
|
|
88
|
+
user-global state.
|
|
89
|
+
|
|
45
90
|
### Available settings
|
|
46
91
|
|
|
47
92
|
| Setting | Default | Description |
|
|
@@ -1,37 +1,74 @@
|
|
|
1
1
|
# Layered Settings
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
**
|
|
5
|
-
|
|
3
|
+
Three-file settings model: **team defaults** (committed),
|
|
4
|
+
**user-global DX-comfort defaults** (per-developer, cross-project), and
|
|
5
|
+
**developer overrides** (per-project, git-ignored). Lets a project pin
|
|
6
|
+
decisions, a developer carry DX preferences across every project, and
|
|
7
|
+
project-local choices always win.
|
|
6
8
|
|
|
7
|
-
Referenced by `road-to-project-memory.md` Phase 0
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
Referenced by `road-to-project-memory.md` Phase 0 and
|
|
10
|
+
`road-to-portable-dev-preferences.md`. Consumed by the centralized
|
|
11
|
+
settings loader at
|
|
12
|
+
[`scripts/_lib/agent_settings.py`](../../../scripts/_lib/agent_settings.py),
|
|
13
|
+
the `/onboard` command, and any agent that edits `.agent-settings.yml`
|
|
14
|
+
on user request.
|
|
10
15
|
|
|
11
|
-
## The
|
|
16
|
+
## The three files
|
|
12
17
|
|
|
13
18
|
| File | Git | Scope | Owner | Example values |
|
|
14
19
|
|---|---|---|---|---|
|
|
15
20
|
| `.agent-project-settings.yml` | **committed** | team / repo | lead maintainer | `project.stack`, `quality.php.tools`, `memory.dogfood` |
|
|
16
|
-
|
|
|
21
|
+
| `~/.config/agent-config/agent-settings.yml` | **n/a** (outside repo) | individual developer · cross-project | individual | `name`, `ide`, `cost_profile`, `personal.bot_icon`, `personal.autonomy`, `caveman.speak_scope` |
|
|
22
|
+
| `.agent-settings.yml` | **gitignored** | individual developer · this project | individual | `personal.ide`, `personal.user_name`, `subagents.max_parallel`, `onboarding.onboarded` |
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
(
|
|
24
|
+
All three are YAML. Schemas:
|
|
25
|
+
|
|
26
|
+
- Developer (project-local): [`agent-settings.md`](../../templates/agent-settings.md).
|
|
27
|
+
- Team: [`agent-project-settings.example.yml`](../../templates/agents/agent-project-settings.example.yml).
|
|
28
|
+
- User-global: six exact dotted paths — whitelist in
|
|
29
|
+
[`scripts/_lib/agent_settings.py`](../../../scripts/_lib/agent_settings.py).
|
|
22
30
|
|
|
23
31
|
## Merge order
|
|
24
32
|
|
|
25
33
|
Lowest priority → highest priority:
|
|
26
34
|
|
|
27
35
|
```
|
|
28
|
-
1. Package defaults
|
|
29
|
-
2.
|
|
30
|
-
3. .agent-settings.yml
|
|
36
|
+
1. Package defaults (shipped by event4u/agent-config)
|
|
37
|
+
2. ~/.config/agent-config/agent-settings.yml (user-global · whitelist-filtered)
|
|
38
|
+
3. .agent-project-settings.yml (team file, committed)
|
|
39
|
+
4. .agent-settings.yml (developer file, gitignored)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Keys from higher layers win unless a lower layer marks them
|
|
43
|
+
`locked` (team file only). The user-global file does **not** support
|
|
44
|
+
`locked` — its purpose is cross-project comfort, never policy.
|
|
45
|
+
|
|
46
|
+
## User-global whitelist
|
|
47
|
+
|
|
48
|
+
Only these exact dotted paths are mergeable from the user-global file;
|
|
49
|
+
every other key is silently dropped by the loader. The whitelist is
|
|
50
|
+
intentionally tiny — adding a key requires an ADR.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
name
|
|
54
|
+
ide
|
|
55
|
+
cost_profile
|
|
56
|
+
personal.bot_icon
|
|
57
|
+
personal.autonomy
|
|
58
|
+
caveman.speak_scope
|
|
31
59
|
```
|
|
32
60
|
|
|
33
|
-
|
|
34
|
-
|
|
61
|
+
Loader contract:
|
|
62
|
+
|
|
63
|
+
- **Read-only.** The loader never creates, modifies, or deletes the
|
|
64
|
+
user-global file. Writes are the exclusive responsibility of the
|
|
65
|
+
`/onboard` command on explicit user opt-in.
|
|
66
|
+
- **Tolerant.** Missing file, malformed YAML, empty file — all fall
|
|
67
|
+
back to the next tier without raising.
|
|
68
|
+
- **Silent on out-of-whitelist keys.** `verbose=True` logs which keys
|
|
69
|
+
were dropped for debugging; default mode is silent.
|
|
70
|
+
- **Never auto-creates `~/.config/agent-config/`.** That directory
|
|
71
|
+
pre-exists from key installation; `/onboard` `mkdir -p`s on opt-in.
|
|
35
72
|
|
|
36
73
|
## Lock semantics
|
|
37
74
|
|
|
@@ -194,3 +194,7 @@ out-of-scope until a consumer surfaces a tenancy requirement.
|
|
|
194
194
|
starts here; the upstream link is the authoritative source.
|
|
195
195
|
- `road-to-ruflo-adoption.md` **P2.1** — landed this appendix; full
|
|
196
196
|
bridge fork stays out-of-scope unless the dual trigger fires.
|
|
197
|
+
- [`mcp-cloud-scope.md`](../../contracts/mcp-cloud-scope.md) —
|
|
198
|
+
operationalizes this pattern as a TypeScript Cloudflare Worker (no
|
|
199
|
+
spawned stdio child; R2 blob replaces the child process). HMAC
|
|
200
|
+
`verifyRequest` is deferred to MVP-2 alongside auth.
|
package/docs/mcp-server.md
CHANGED
|
@@ -4,13 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
`agent-config` ships a built-in [Model Context Protocol](https://modelcontextprotocol.io)
|
|
6
6
|
server that exposes the package's read-only governance surface to MCP-aware
|
|
7
|
-
clients (Claude Desktop, Cursor, Zed, Continue, Codex via MCP).
|
|
7
|
+
clients (Claude Desktop, Cursor, Zed, Continue, Codex via MCP). Three channels
|
|
8
8
|
coexist:
|
|
9
9
|
|
|
10
10
|
- **File projection** — `task generate-tools` writes `.claude/`, `.cursor/`,
|
|
11
11
|
`.clinerules/`, `.windsurfrules`. Used by Aider, Cline, Windsurf, Gemini CLI.
|
|
12
|
-
- **MCP server** — `scripts/mcp_server/` exposes the same content
|
|
13
|
-
JSON-RPC. Used by clients that speak MCP natively.
|
|
12
|
+
- **Local stdio MCP server** — `scripts/mcp_server/` exposes the same content
|
|
13
|
+
over JSON-RPC. Used by clients that speak MCP natively. Default for personal
|
|
14
|
+
installs.
|
|
15
|
+
- **Remote MCP** *(experimental, opt-in)* — a Cloudflare-hosted TypeScript
|
|
16
|
+
Worker (`workers/mcp/`) serves the same wire surface over HTTP/SSE for
|
|
17
|
+
hosted-agent platforms. URL shapes pinned in
|
|
18
|
+
[`docs/setup/mcp-cloud-endpoints.md`](setup/mcp-cloud-endpoints.md);
|
|
19
|
+
safety contract in
|
|
20
|
+
[`docs/contracts/mcp-cloud-scope.md`](contracts/mcp-cloud-scope.md).
|
|
21
|
+
Wire-parity-checked against the local stdio kernel on every release.
|
|
14
22
|
|
|
15
23
|
The MCP server **never executes engine code, never writes files, never spawns
|
|
16
24
|
shells**. It is a read-only instructional surface — see
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# MCP Client Config — Remote agent-config
|
|
2
|
+
|
|
3
|
+
Connect any MCP-capable client to the hosted `agent-config-mcp` Worker
|
|
4
|
+
at `https://agent-config-mcp.event4u.workers.dev`. Read-only,
|
|
5
|
+
identity-stable per release, no auth.
|
|
6
|
+
|
|
7
|
+
For URL shapes (latest vs. pinned `/v<X.Y.Z>`) see
|
|
8
|
+
[`mcp-cloud-endpoints.md`](mcp-cloud-endpoints.md). For operator
|
|
9
|
+
setup of your own deployment see [`mcp-cloud-setup.md`](mcp-cloud-setup.md).
|
|
10
|
+
|
|
11
|
+
## Transport note
|
|
12
|
+
|
|
13
|
+
The Worker speaks JSON-RPC over HTTP POST. Clients that support
|
|
14
|
+
HTTP transport natively (Claude Code, Cursor) talk to it directly.
|
|
15
|
+
Clients that only support stdio (Claude Desktop, Zed) need the
|
|
16
|
+
[`mcp-remote`](https://www.npmjs.com/package/mcp-remote) bridge from
|
|
17
|
+
npm — invoked via `npx`, no install required.
|
|
18
|
+
|
|
19
|
+
## Where settings live — `.agent-settings.yml` vs. MCP config
|
|
20
|
+
|
|
21
|
+
These are **two different files** for two different layers. Don't
|
|
22
|
+
look for MCP server config inside `.agent-settings.yml`.
|
|
23
|
+
|
|
24
|
+
| File | Where | Who reads it | Purpose |
|
|
25
|
+
|---|---|---|---|
|
|
26
|
+
| MCP client config (this page) | client-specific path per section above | the MCP client at startup | which MCP servers to talk to (name + URL / command) |
|
|
27
|
+
| `.agent-settings.yml` | consumer project root (`<repo>/.agent-settings.yml`) | the agent at runtime (Claude / Cursor / …) | per-developer preferences: `name`, `ide`, `cost_profile`, `personal.autonomy`, `pipelines.skill_improvement`, `caveman.speak_scope`, … |
|
|
28
|
+
|
|
29
|
+
The hosted MCP is **stateless** and **project-agnostic** — it serves
|
|
30
|
+
the same skill / rule / command catalog to every client. Personalization
|
|
31
|
+
happens agent-side after the MCP delivers its content blob; the Worker
|
|
32
|
+
itself does not read `.agent-settings.yml`.
|
|
33
|
+
|
|
34
|
+
First-time setup of `.agent-settings.yml` runs through `/onboard`;
|
|
35
|
+
template drift is handled by `/sync-agent-settings`.
|
|
36
|
+
|
|
37
|
+
## Claude Desktop
|
|
38
|
+
|
|
39
|
+
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
40
|
+
(macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"agent-config": {
|
|
46
|
+
"command": "npx",
|
|
47
|
+
"args": ["-y", "mcp-remote", "https://agent-config-mcp.event4u.workers.dev"]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Restart Claude Desktop. The connector appears in the dropdown.
|
|
54
|
+
|
|
55
|
+
Newer builds also support **Settings → Connectors → Add Custom
|
|
56
|
+
Connector** with the URL directly — no `mcp-remote` wrapper needed.
|
|
57
|
+
|
|
58
|
+
## Claude Code
|
|
59
|
+
|
|
60
|
+
Native HTTP transport — one command:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
claude mcp add --transport http agent-config https://agent-config-mcp.event4u.workers.dev
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Verify:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
claude mcp list
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Cursor
|
|
73
|
+
|
|
74
|
+
`~/.cursor/mcp.json` (global) or `<repo>/.cursor/mcp.json`
|
|
75
|
+
(project-local):
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"mcpServers": {
|
|
80
|
+
"agent-config": {
|
|
81
|
+
"url": "https://agent-config-mcp.event4u.workers.dev"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Reload Cursor (`Cmd+Shift+P → Reload Window`).
|
|
88
|
+
|
|
89
|
+
## Zed
|
|
90
|
+
|
|
91
|
+
`~/.config/zed/settings.json`:
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"context_servers": {
|
|
96
|
+
"agent-config": {
|
|
97
|
+
"source": "custom",
|
|
98
|
+
"command": "npx",
|
|
99
|
+
"args": ["-y", "mcp-remote", "https://agent-config-mcp.event4u.workers.dev"]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Zed has no native remote-MCP transport yet, so the `mcp-remote`
|
|
106
|
+
bridge is required.
|
|
107
|
+
|
|
108
|
+
## Continue
|
|
109
|
+
|
|
110
|
+
`~/.continue/config.yaml` (or `<repo>/.continue/config.yaml`):
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
mcpServers:
|
|
114
|
+
- name: agent-config
|
|
115
|
+
command: npx
|
|
116
|
+
args: ["-y", "mcp-remote", "https://agent-config-mcp.event4u.workers.dev"]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Verify
|
|
120
|
+
|
|
121
|
+
After reload, every client should:
|
|
122
|
+
|
|
123
|
+
1. List `agent-config` under connectors / tools with a release-key
|
|
124
|
+
matching the live deploy. Probe the endpoint to see the current
|
|
125
|
+
release:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
curl https://agent-config-mcp.event4u.workers.dev
|
|
129
|
+
# → { "ok": true, "release_key": "v…", "signature": "…", … }
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
2. Expose skill + command prompts under URIs like `skill://…` and
|
|
133
|
+
`command://…`.
|
|
134
|
+
3. Expose rule + guideline + context resources under `rule://…`,
|
|
135
|
+
`guideline://…`, `context://…`.
|
|
136
|
+
|
|
137
|
+
If the client shows the connector but no prompts / resources,
|
|
138
|
+
re-probe the URL — a 5xx from the Worker indicates the deploy is
|
|
139
|
+
mid-roll, retry after a minute.
|
|
140
|
+
|
|
141
|
+
## Local stdio alternative
|
|
142
|
+
|
|
143
|
+
If you have the repo cloned and prefer running the MCP server
|
|
144
|
+
locally (faster startup, no network), the stdio kernel under
|
|
145
|
+
`scripts/mcp_server/` is the same wire surface. Setup:
|
|
146
|
+
`task mcp:setup`, run details in [`../mcp-server.md`](../mcp-server.md).
|
|
147
|
+
|
|
148
|
+
## See also
|
|
149
|
+
|
|
150
|
+
- URL shapes & DNS — [`mcp-cloud-endpoints.md`](mcp-cloud-endpoints.md)
|
|
151
|
+
- Operator setup (your own deploy) — [`mcp-cloud-setup.md`](mcp-cloud-setup.md)
|
|
152
|
+
- A0-cloud contract — [`../contracts/mcp-cloud-scope.md`](../contracts/mcp-cloud-scope.md)
|