@event4u/agent-config 3.1.1 → 3.3.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/agent-status.md +1 -1
- package/.agent-src/commands/analytics/prune.md +78 -0
- package/.agent-src/commands/analytics/show.md +107 -0
- package/.agent-src/commands/analytics.md +64 -0
- package/.agent-src/commands/knowledge/forget.md +104 -0
- package/.agent-src/commands/knowledge/ingest.md +122 -0
- package/.agent-src/commands/knowledge/list.md +102 -0
- package/.agent-src/commands/knowledge.md +75 -0
- package/.agent-src/scripts/update_roadmap_progress.py +1 -1
- package/.agent-src/skills/compress-memory/SKILL.md +1 -1
- package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/.claude-plugin/marketplace.json +8 -1
- package/AGENTS.md +5 -4
- package/CHANGELOG.md +54 -222
- package/README.md +12 -2
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +164 -10
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +3 -3
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +12 -5
- package/dist/discovery/trust-report.md +2 -2
- package/dist/discovery/workspaces.json +11 -4
- package/dist/mcp/mcp-cloudflare-catalogue.json +2 -0
- package/dist/mcp/registry-manifest.json +5 -3
- package/docs/architecture.md +1 -1
- package/docs/archive/CHANGELOG-pre-3.2.0.md +268 -0
- package/docs/benchmarks.md +4 -4
- package/docs/catalog.md +9 -2
- package/docs/contracts/CHANGELOG-conventions.md +20 -1
- package/docs/contracts/adr-mcp-runtime.md +1 -1
- package/docs/contracts/at-rest-encryption.md +146 -0
- package/docs/contracts/benchmark-corpus-spec.md +3 -3
- package/docs/contracts/benchmark-report-schema.md +5 -5
- package/docs/contracts/caveman-telemetry.md +4 -4
- package/docs/contracts/compression-default-kill-criterion.md +5 -5
- package/docs/contracts/cost-enforcement.md +1 -1
- package/docs/contracts/daily-workspace.md +137 -0
- package/docs/contracts/explain-modes.md +146 -0
- package/docs/contracts/host-agent-protocol.md +88 -0
- package/docs/contracts/local-analytics.md +148 -0
- package/docs/contracts/local-knowledge-ingestion.md +96 -0
- package/docs/contracts/mcp-beta-criteria.md +1 -1
- package/docs/contracts/mcp-cloud-scope.md +4 -4
- package/docs/contracts/mcp-registry-manifest.schema.json +1 -1
- package/docs/contracts/mcp-tool-inventory.md +1 -1
- package/docs/contracts/mcp-tool-stub-envelope.md +1 -1
- package/docs/contracts/measurement-baseline.md +6 -6
- package/docs/contracts/role-experience.md +121 -0
- package/docs/contracts/workspace-documents.md +140 -0
- package/docs/decisions/ADR-022-daily-workspace-decomposition.md +140 -0
- package/docs/decisions/ADR-023-host-agent-protocol.md +129 -0
- package/docs/decisions/ADR-024-workspace-v0-feature-floor.md +126 -0
- package/docs/decisions/ADR-025-workspace-chrome.md +119 -0
- package/docs/decisions/ADR-026-explain-mode-translation.md +117 -0
- package/docs/decisions/ADR-027-changelog-machine-vs-manual.md +129 -0
- package/docs/decisions/ADR-028-root-layout.md +147 -0
- package/docs/decisions/ADR-029-multi-workspace-deferred.md +122 -0
- package/docs/decisions/INDEX.md +8 -0
- package/docs/deploy/small-team-recipe.md +148 -0
- package/docs/deploy/team-deployment-posture.md +91 -0
- package/docs/getting-started-by-role.md +27 -0
- package/docs/getting-started.md +1 -1
- package/docs/guides/local-analytics.md +125 -0
- package/docs/guides/local-knowledge.md +127 -0
- package/docs/mcp-server.md +1 -1
- package/docs/parity/bench-ruflo.json +3 -3
- package/docs/parity/ruflo.md +1 -1
- package/docs/setup/mcp-client-config.md +1 -1
- package/docs/setup/mcp-cloud-endpoints.md +1 -1
- package/docs/setup/mcp-cloud-setup.md +2 -2
- package/docs/setup/mcp-r2-bootstrap.md +1 -1
- package/package.json +4 -2
- package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
- package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
- package/scripts/_lib/bench_caveman.py +2 -2
- package/scripts/_lib/bench_caveman_report.py +1 -1
- package/scripts/_lib/bench_cost.py +2 -2
- package/scripts/_lib/bench_report.py +2 -2
- package/scripts/_lib/changelog_eras.py +330 -0
- package/scripts/audit_mcp_tools.py +1 -1
- package/scripts/bench_baseline_ready.py +3 -3
- package/scripts/bench_compress_memory.py +4 -4
- package/scripts/bench_drift_check.py +2 -2
- package/scripts/bench_per_tool.py +2 -2
- package/scripts/bench_run.py +4 -4
- package/scripts/build_mcp_registry_manifest.py +2 -2
- package/scripts/mcp_server/__init__.py +1 -1
- package/scripts/mcp_server/catalog.py +1 -1
- package/scripts/mcp_server/consumer_tool_catalog.json +1 -1
- package/scripts/mcp_server/tools.py +1 -1
- package/scripts/memory_lookup.py +78 -1
- package/scripts/pack_mcp_content.py +6 -6
- package/scripts/release.py +93 -3
- package/scripts/skill_trigger_eval.py +2 -2
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Local analytics — a 3-minute walkthrough
|
|
2
|
+
|
|
3
|
+
> Phase 7 of [`road-to-employee-product-and-external-proof`](../../agents/roadmaps/road-to-employee-product-and-external-proof.md).
|
|
4
|
+
> Contract: [`docs/contracts/local-analytics.md`](../contracts/local-analytics.md).
|
|
5
|
+
|
|
6
|
+
## What this is
|
|
7
|
+
|
|
8
|
+
A **local-only** event log of your workspace activity. The package never
|
|
9
|
+
POSTs these records anywhere. Storage is a single append-only JSONL file
|
|
10
|
+
under your home directory; pruning is a 90-day rolling window.
|
|
11
|
+
|
|
12
|
+
If you want to know *"which prompts do I actually run on Tuesday
|
|
13
|
+
mornings?"* — this is the file that knows. If you don't want that
|
|
14
|
+
question answered, flip one flag and the file never opens.
|
|
15
|
+
|
|
16
|
+
## Where it lives
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
~/.event4u/agent-config/workspace/analytics/
|
|
20
|
+
├── events.jsonl # one workspace_event/v0 record per line
|
|
21
|
+
└── retention.lock # presence = a prune pass is running
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
One event per line. Schema is `workspace_event/v0` (matches the
|
|
25
|
+
3.1.0 telemetry SDK vocabulary, but the transports never touch each
|
|
26
|
+
other — the SDK is the undeployed Worker surface, this is your disk).
|
|
27
|
+
|
|
28
|
+
## What's collected
|
|
29
|
+
|
|
30
|
+
Closed event set (rejected if not on the list):
|
|
31
|
+
|
|
32
|
+
| Event | When |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `launcher.opened` | Workspace tab opens. |
|
|
35
|
+
| `launcher.task_picked` | User clicks a task in the launcher. |
|
|
36
|
+
| `launcher.task_launched` | Host agent receives the rendered prompt. |
|
|
37
|
+
| `session.started` / `session.host_turn` / `session.completed` | Conversation lifecycle. |
|
|
38
|
+
| `document.created` / `document.edited` / `document.exported` | Phase 5 document workflows. |
|
|
39
|
+
| `explain.opened` / `explain.mode_toggled` / `why.invoked` | Phase 6 explain mode. |
|
|
40
|
+
| `knowledge.queried` / `knowledge.source_clicked` | Phase 2 knowledge pane interactions. |
|
|
41
|
+
|
|
42
|
+
Each record carries a UTC timestamp, the schema version, and a tiny
|
|
43
|
+
`data` dict (role, task, host_tier, duration_ms — never prompt or
|
|
44
|
+
response bodies).
|
|
45
|
+
|
|
46
|
+
## How to read it
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Render the last 30 days as markdown
|
|
50
|
+
python3 packages/core/installer/python/workspace_analytics.py show
|
|
51
|
+
|
|
52
|
+
# Last 24 h, JSON
|
|
53
|
+
python3 packages/core/installer/python/workspace_analytics.py show \
|
|
54
|
+
--window 24h --format json
|
|
55
|
+
|
|
56
|
+
# Filter to one role
|
|
57
|
+
python3 packages/core/installer/python/workspace_analytics.py show \
|
|
58
|
+
--role tradesperson --format csv
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Output shape (markdown):
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
# Workspace analytics — last 30d
|
|
65
|
+
|
|
66
|
+
## Top prompts
|
|
67
|
+
|
|
68
|
+
- `tradesperson` · `estimate` — 12
|
|
69
|
+
- `content-creator` · `script-video` — 7
|
|
70
|
+
- `consultant` · `weekly-memo` — 4
|
|
71
|
+
|
|
72
|
+
## Launcher → completion rate per role
|
|
73
|
+
|
|
74
|
+
- `tradesperson` — 83% (12 launched · 10 completed)
|
|
75
|
+
- `content-creator` — 71% (7 launched · 5 completed)
|
|
76
|
+
|
|
77
|
+
**Average session length:** 3m 41s
|
|
78
|
+
**Knowledge sources clicked:** 14
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## How to opt out
|
|
82
|
+
|
|
83
|
+
Two equivalent switches — either short-circuits before any file opens.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Env (per-shell)
|
|
87
|
+
export AGENT_CONFIG_NO_LOCAL_ANALYTICS=1
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
# .agent-settings.yml (per-project)
|
|
92
|
+
analytics:
|
|
93
|
+
local: off
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
After either is in effect, `emit()` returns `False` and the JSONL is
|
|
97
|
+
never appended. The `show` command still works against existing data,
|
|
98
|
+
so you can opt out without losing what you already have.
|
|
99
|
+
|
|
100
|
+
## How to delete it
|
|
101
|
+
|
|
102
|
+
The file is plain JSONL. Delete it:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
rm -rf ~/.event4u/agent-config/workspace/analytics/
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Or prune the rolling window manually:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
python3 packages/core/installer/python/workspace_analytics.py prune
|
|
112
|
+
# → pruned 47 event(s)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`prune` drops anything older than 90 days. The lock file prevents two
|
|
116
|
+
concurrent passes from racing each other.
|
|
117
|
+
|
|
118
|
+
## What this guide does not cover
|
|
119
|
+
|
|
120
|
+
- **Remote telemetry** — that's the Worker SDK (`packages/telemetry/`).
|
|
121
|
+
Deployment is out of v0 scope; kill-switch defaults to disabled.
|
|
122
|
+
- **Workspace UI** — Phase 4 builds the browser tab that emits these
|
|
123
|
+
events. See [`docs/contracts/daily-workspace.md`](../contracts/daily-workspace.md).
|
|
124
|
+
- **Encryption at rest** — Phase 8. Until then, the JSONL is plaintext
|
|
125
|
+
on your local disk.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
stability: beta
|
|
3
|
+
keep-beta-until: 2026-08-24
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Local knowledge — 5-minute walkthrough
|
|
7
|
+
|
|
8
|
+
Point the agent at a folder of local files (PDFs, Markdown, Word docs, spreadsheets). It chunks, redacts PII + secrets, and persists into the agent memory namespace — local-only, single-user, no OAuth, no remote fetch.
|
|
9
|
+
|
|
10
|
+
Contract: [`local-knowledge-ingestion`](../contracts/local-knowledge-ingestion.md).
|
|
11
|
+
Roadmap home: `agents/roadmaps/road-to-employee-product-and-external-proof.md` Phase 2.
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
- Python 3.10+ on the host.
|
|
16
|
+
- `markitdown` on `PATH` if the corpus contains PDF / DOCX / XLSX / EPUB / images. Pure markdown / text corpora work without it.
|
|
17
|
+
- An `agents/` directory in the project (created by the installer). The `agents/memory/knowledge/` subdirectory is created lazily on first ingest.
|
|
18
|
+
|
|
19
|
+
## Step 1 — Pick a folder
|
|
20
|
+
|
|
21
|
+
Anything local works: a customer folder, a project drop, a `.zip` archive, a single PDF. The walk skips hidden dirs (`.git`, `.venv`, `node_modules`) and does not follow symlinks.
|
|
22
|
+
|
|
23
|
+
For this walkthrough we use a folder with one PDF and three markdown notes:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
/Users/maintainer/clients/acme/
|
|
27
|
+
├── brief.pdf
|
|
28
|
+
├── kickoff-notes.md
|
|
29
|
+
├── meeting-2026-05-12.md
|
|
30
|
+
└── pricing-v3.md
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Step 2 — Ingest
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
/knowledge ingest /Users/maintainer/clients/acme/
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Realistic output (your ingest-id will differ — uuid7s are time-ordered):
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
✅ ingested 01927f4a-2b1c from /Users/maintainer/clients/acme/
|
|
43
|
+
documents: 4, chunks: 18, bytes_stored: 47312
|
|
44
|
+
PII redacted: EMAIL=3, PHONE=1, IBAN=0, CC=0, SSN=0
|
|
45
|
+
secrets redacted: 0
|
|
46
|
+
skipped: 0 unsupported MIME
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
What just happened:
|
|
50
|
+
|
|
51
|
+
- Each file routed through `markitdown` (PDF) or passthrough (Markdown).
|
|
52
|
+
- Chunks split at ~2 KB boundaries, written to `agents/memory/knowledge/<ingest-id>/chunks/<n>.md`.
|
|
53
|
+
- A `manifest.json` recorded the source path, doc count, redaction counters, and `created_at`.
|
|
54
|
+
- PII regex pass replaced 3 emails + 1 phone with `[EMAIL]` / `[PHONE]` placeholders **before** the chunk hit disk.
|
|
55
|
+
|
|
56
|
+
> Want the raw text in (no redaction)? `--no-redact`. The manifest captures the flag so the audit row names every bypass. Default is always redact.
|
|
57
|
+
|
|
58
|
+
## Step 3 — Ask the agent
|
|
59
|
+
|
|
60
|
+
Use the host model normally. The MCP tool `memory_retrieve` now returns knowledge chunks alongside curated and intake entries — same envelope, with an additional `body.source_kind: knowledge` tag so the model knows the source is user-supplied, not maintainer-curated.
|
|
61
|
+
|
|
62
|
+
Example prompt:
|
|
63
|
+
|
|
64
|
+
> *"What does the acme pricing-v3 note say about volume discounts?"*
|
|
65
|
+
|
|
66
|
+
The agent retrieves the matching chunks (pinned chunks rank slightly higher than unpinned; knowledge entries are discounted ~15 % vs curated so hand-reviewed content still wins on equal relevance) and answers with a citation back to the source path stored in the manifest.
|
|
67
|
+
|
|
68
|
+
If nothing matches, the model says so. The retrieval surface does not invent a citation.
|
|
69
|
+
|
|
70
|
+
## Step 4 — List + pin
|
|
71
|
+
|
|
72
|
+
See what's been ingested:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
/knowledge list
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
ID DOCS CHUNKS BYTES PINNED REDACTED CREATED SOURCE
|
|
80
|
+
01927f4a 4 18 47312 no yes 2026-05-25T08:14:02 /Users/maintainer/clients/acme
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Pin so it survives LRU eviction when the 500 MB namespace cap is crossed:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
/knowledge list --pin 01927f4a
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
✅ pinned 01927f4a
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Prefix must be unambiguous — if it matches > 1 ingest, the command rejects with a structured error and asks for a longer prefix.
|
|
94
|
+
|
|
95
|
+
## Step 5 — Forget
|
|
96
|
+
|
|
97
|
+
When the work is done, drop the ingest atomically:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
/knowledge forget 01927f4a
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
✅ forgot 01927f4a — removed 18 chunks, 47312 bytes
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Forget is atomic — no partial state. Pinned ingests are dropped the same as unpinned; pinning protects from LRU, not from explicit forget.
|
|
108
|
+
|
|
109
|
+
## What the guide does **not** cover
|
|
110
|
+
|
|
111
|
+
- Multi-user share — single-user by design. Multi-user lives behind ADR-024 workspace work and Phase 4 of the parent roadmap.
|
|
112
|
+
- Remote sources — every input must resolve to a local path. `http://`, `https://`, `s3://`, `gs://`, `azure://` are rejected at the input validator.
|
|
113
|
+
- Connector contracts (GitHub / Jira / Confluence) — those sit behind Hard-Floor OAuth and stay cancelled in `road-to-internal-ai-os-deployment.md` Phase 5.
|
|
114
|
+
|
|
115
|
+
## Troubleshooting
|
|
116
|
+
|
|
117
|
+
- **"Bound exceeded: total_ingest_size"** — the corpus is > 100 MB. Split it, or ingest a sub-folder.
|
|
118
|
+
- **"Bound exceeded: document_count"** — > 1000 files. Same fix.
|
|
119
|
+
- **"unsupported MIME"** — file skipped, counted in the summary, no chunk written. Add the file as `.md` if you need it indexed.
|
|
120
|
+
- **OCR confidence < 0.7** — the chunk is tagged `low_confidence`. The model still receives it but the citation surface flags the lower confidence.
|
|
121
|
+
- **markitdown not on PATH** — install it (`pip install 'markitdown[all]'`) or pass `--markitdown=<bin>`. Markdown-only corpora work without it.
|
|
122
|
+
|
|
123
|
+
## See also
|
|
124
|
+
|
|
125
|
+
- [`local-knowledge-ingestion`](../contracts/local-knowledge-ingestion.md) — contract (input shapes, bounds, storage, redaction).
|
|
126
|
+
- [`/knowledge ingest`](../../.agent-src/commands/knowledge/ingest.md) · [`/knowledge list`](../../.agent-src/commands/knowledge/list.md) · [`/knowledge forget`](../../.agent-src/commands/knowledge/forget.md)
|
|
127
|
+
- [`markitdown` skill](../../.agent-src/skills/markitdown/SKILL.md) — peer-side adapter for binary formats.
|
package/docs/mcp-server.md
CHANGED
|
@@ -13,7 +13,7 @@ coexist:
|
|
|
13
13
|
over JSON-RPC. Used by clients that speak MCP natively. Default for personal
|
|
14
14
|
installs.
|
|
15
15
|
- **Remote MCP** *(experimental, opt-in)* — a Cloudflare-hosted TypeScript
|
|
16
|
-
Worker (`workers/mcp/`) serves the same wire surface over HTTP/SSE for
|
|
16
|
+
Worker (`internal/workers/mcp/`) serves the same wire surface over HTTP/SSE for
|
|
17
17
|
hosted-agent platforms. URL shapes pinned in
|
|
18
18
|
[`docs/setup/mcp-cloud-endpoints.md`](setup/mcp-cloud-endpoints.md);
|
|
19
19
|
safety contract in
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"type": "claimed_upstream_not_verified_in_repo"
|
|
12
12
|
},
|
|
13
13
|
"measurement_protocol": {
|
|
14
|
-
"corpus": "bench/corpus/* (25-prompt corpus owned by step-4-measurement-and-benchmark.md)",
|
|
14
|
+
"corpus": "internal/bench/corpus/* (25-prompt corpus owned by step-4-measurement-and-benchmark.md)",
|
|
15
15
|
"tracker": "scripts/cost/track.mjs",
|
|
16
|
-
"pricing": "bench/pricing.yaml",
|
|
16
|
+
"pricing": "internal/bench/pricing.yaml",
|
|
17
17
|
"session_source": "~/.claude/projects/*/sessions/*.jsonl (Claude Code-native, no manual tracking)",
|
|
18
|
-
"tokens_to_dollars": "track.mjs multiplies input/output/cache-read/cache-write tokens by per-1M pricing from bench/pricing.yaml, separated by model id",
|
|
18
|
+
"tokens_to_dollars": "track.mjs multiplies input/output/cache-read/cache-write tokens by per-1M pricing from internal/bench/pricing.yaml, separated by model id",
|
|
19
19
|
"headline_output": "average dollar cost per 25-prompt run, with min / max / p50 / p90 across N reports"
|
|
20
20
|
},
|
|
21
21
|
"current_window": {
|
package/docs/parity/ruflo.md
CHANGED
|
@@ -23,7 +23,7 @@ soak in [`bench.json`](bench.json) flips from `warmup` to `baseline_ready`
|
|
|
23
23
|
|
|
24
24
|
| # | Ruflo pattern | Verdict | Evidence |
|
|
25
25
|
|---|---|---|---|
|
|
26
|
-
| 1 | **Cost-tracker plugin** — real model pricing, per-1M, separated input/output/cache | `[x] covered by` | [`scripts/cost/track.mjs`](../../scripts/cost/track.mjs) + [`bench/pricing.yaml`](../../bench/pricing.yaml) (Haiku/Sonnet/Opus per-1M, input/output/cache-read/cache-write split). Step-11 Phase 1. |
|
|
26
|
+
| 1 | **Cost-tracker plugin** — real model pricing, per-1M, separated input/output/cache | `[x] covered by` | [`scripts/cost/track.mjs`](../../scripts/cost/track.mjs) + [`internal/bench/pricing.yaml`](../../bench/pricing.yaml) (Haiku/Sonnet/Opus per-1M, input/output/cache-read/cache-write split). Step-11 Phase 1. |
|
|
27
27
|
| 2 | **Auto-capture from session jsonl** — reads Claude Code log, no manual tracking | `[x] covered by` | [`scripts/cost/track.mjs`](../../scripts/cost/track.mjs) reads `~/.claude/projects/*/sessions/*.jsonl` automatically. Step-11 Phase 1 Step 1. |
|
|
28
28
|
| 3 | **50/75/90/100 % budget ladder with hard stop** | `[x] covered by` | [`scripts/cost/budget.mjs`](../../scripts/cost/budget.mjs) — exit codes 0/1/2/3 per tier; opt-in fail-closed via `cost.enforcement` setting. Fixtures: `tests/fixtures/cost/budget/{under-50,at-100,over-100}/`. Step-11 Phase 2. |
|
|
29
29
|
| 4 | **Measured-vs-claimed disclaimer** — every percentage tagged "claimed upstream" | `[x] covered by` | One-line `**Measured-vs-claimed disclaimer:**` header block on all 9 active roadmaps in `agents/roadmaps/`. Verified 2026-05-16. Step-11 Phase 5 Step 4. |
|
|
@@ -5,7 +5,7 @@ Worker. Read-only, identity-stable per release. Optional Bearer-token
|
|
|
5
5
|
auth — see [§ Bearer auth](#bearer-auth) below.
|
|
6
6
|
|
|
7
7
|
> **No public endpoint.** This package ships the Worker source under
|
|
8
|
-
> `workers/mcp/`, but does **not** operate a shared hosted MCP server.
|
|
8
|
+
> `internal/workers/mcp/`, but does **not** operate a shared hosted MCP server.
|
|
9
9
|
> Deploy your own per [`mcp-cloud-setup.md`](mcp-cloud-setup.md) — your
|
|
10
10
|
> URL will be `https://agent-config-mcp.<your-account>.workers.dev`
|
|
11
11
|
> (or a custom domain you wire up in Step 7).
|
|
@@ -69,7 +69,7 @@ curl -s -X POST https://mcp.<your-domain>/ \
|
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
After DNS is live, uncomment the `routes` block in
|
|
72
|
-
`workers/mcp/wrangler.toml` and redeploy via `wrangler deploy` (or let
|
|
72
|
+
`internal/workers/mcp/wrangler.toml` and redeploy via `wrangler deploy` (or let
|
|
73
73
|
the GitHub Action pick it up on the next release).
|
|
74
74
|
|
|
75
75
|
The fallback `*.workers.dev` URL stays live for free; the custom
|
|
@@ -82,7 +82,7 @@ Dashboard → **My Profile → API Tokens → Create Token → Custom token**:
|
|
|
82
82
|
| Account · Workers R2 Storage | your account | Edit |
|
|
83
83
|
| User · User Details | — | Read |
|
|
84
84
|
|
|
85
|
-
If you uncomment the `routes` block in `workers/mcp/wrangler.toml`
|
|
85
|
+
If you uncomment the `routes` block in `internal/workers/mcp/wrangler.toml`
|
|
86
86
|
(custom domain cutover, Phase 5.2), add **Zone · DNS · Edit** on the
|
|
87
87
|
relevant zone.
|
|
88
88
|
|
|
@@ -180,4 +180,4 @@ setup. Until cutover, the Worker serves on the free
|
|
|
180
180
|
- [`docs/contracts/mcp-cloud-scope.md`](../contracts/mcp-cloud-scope.md) — A0-cloud contract
|
|
181
181
|
- [`docs/setup/mcp-r2-bootstrap.md`](mcp-r2-bootstrap.md) — R2 layout & break-glass
|
|
182
182
|
- [`docs/setup/mcp-cloud-endpoints.md`](mcp-cloud-endpoints.md) — URL shapes & DNS
|
|
183
|
-
- [`workers/mcp/README.md`](../../workers/mcp/README.md) — Worker source overview
|
|
183
|
+
- [`internal/workers/mcp/README.md`](../../internal/workers/mcp/README.md) — Worker source overview
|
|
@@ -44,7 +44,7 @@ npx wrangler r2 bucket create agent-config-mcp
|
|
|
44
44
|
npx wrangler r2 bucket list | grep agent-config-mcp
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
The Worker binding is declared in `workers/mcp/wrangler.toml` under
|
|
47
|
+
The Worker binding is declared in `internal/workers/mcp/wrangler.toml` under
|
|
48
48
|
`[[r2_buckets]]`. The pipeline reads/writes via the wrangler CLI in CI,
|
|
49
49
|
not via the Worker — A0-cloud invariant 2 forbids the Worker from
|
|
50
50
|
issuing R2 writes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@event4u/agent-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Universal AI Agent OS \u2014 audited skills, governance rules, commands, and templates for AI coding tools (Claude Code, Cursor, Windsurf, Copilot).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
"skills",
|
|
27
27
|
"prompt-engineering",
|
|
28
28
|
"typescript",
|
|
29
|
-
"python"
|
|
29
|
+
"python",
|
|
30
|
+
"agent-skills",
|
|
31
|
+
"cinematic-ai-video"
|
|
30
32
|
],
|
|
31
33
|
"files": [
|
|
32
34
|
".agent-src/",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Caveman compression bench — step-16 Phase 1 Step 4.
|
|
2
2
|
#
|
|
3
|
-
# Three-arm live bench against bench/corpora/caveman/prompts.yaml:
|
|
3
|
+
# Three-arm live bench against internal/bench/corpora/caveman/prompts.yaml:
|
|
4
4
|
# compressed — system prompt embeds caveman-speak rule (aggressive).
|
|
5
5
|
# terse_control — system prompt = "Answer concisely. …" (carve-out-free baseline).
|
|
6
6
|
# uncompressed — generic helpful-assistant system prompt.
|
|
@@ -131,7 +131,7 @@ class PromptResult:
|
|
|
131
131
|
# ── corpus + runner ────────────────────────────────────────────────────
|
|
132
132
|
|
|
133
133
|
def load_corpus(corpus_path: Path) -> list[dict[str, Any]]:
|
|
134
|
-
"""Read bench/corpora/caveman/prompts.yaml → list of prompt dicts."""
|
|
134
|
+
"""Read internal/bench/corpora/caveman/prompts.yaml → list of prompt dicts."""
|
|
135
135
|
data = yaml.safe_load(corpus_path.read_text(encoding="utf-8")) or {}
|
|
136
136
|
prompts = data.get("prompts") or []
|
|
137
137
|
if not prompts:
|
|
@@ -144,7 +144,7 @@ def render_caveman_markdown(report: dict[str, Any]) -> str:
|
|
|
144
144
|
"## Notes",
|
|
145
145
|
"",
|
|
146
146
|
f"- corpus: `{report['corpus']['path']}`",
|
|
147
|
-
f"- pricing: `bench/pricing.yaml` (sourced {cost.get('pricing_sourced_on') or '—'})",
|
|
147
|
+
f"- pricing: `internal/bench/pricing.yaml` (sourced {cost.get('pricing_sourced_on') or '—'})",
|
|
148
148
|
f"- schema: `caveman-v1` (see `docs/contracts/benchmark-report-schema.md`)",
|
|
149
149
|
f"- bench_run version: `{report['runner']['bench_run_version']}`",
|
|
150
150
|
"",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# Reads Claude Code session jsonl summaries (one summary line per session)
|
|
4
4
|
# from agents/cost-tracking/sessions.jsonl — produced by scripts/cost/track.mjs
|
|
5
|
-
# — and aggregates totals using model rates from bench/pricing.yaml.
|
|
5
|
+
# — and aggregates totals using model rates from internal/bench/pricing.yaml.
|
|
6
6
|
#
|
|
7
7
|
# Returns the dict shape declared in docs/contracts/benchmark-report-schema.md
|
|
8
8
|
# § JSON schema (v1) `cost`. When the source jsonl is missing, returns the
|
|
@@ -24,7 +24,7 @@ TIER_KEYS = ("haiku", "sonnet", "opus", UNKNOWN_TIER)
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
def load_pricing(pricing_path: Path) -> tuple[dict[str, dict[str, float]], str | None]:
|
|
27
|
-
"""Return ({tier: rates}, oldest_sourced_on) from bench/pricing.yaml."""
|
|
27
|
+
"""Return ({tier: rates}, oldest_sourced_on) from internal/bench/pricing.yaml."""
|
|
28
28
|
if yaml is None or not pricing_path.is_file():
|
|
29
29
|
return {}, None
|
|
30
30
|
data = yaml.safe_load(pricing_path.read_text(encoding="utf-8")) or {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# Serializes the unified report dict to JSON + Markdown per
|
|
4
4
|
# docs/contracts/benchmark-report-schema.md. Filename format:
|
|
5
|
-
# `bench/reports/<UTC ISO-8601 with : -> ->-<corpus_id>.{json,md}`.
|
|
5
|
+
# `internal/bench/reports/<UTC ISO-8601 with : -> ->-<corpus_id>.{json,md}`.
|
|
6
6
|
"""Report emitter for the bench runner."""
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
@@ -133,7 +133,7 @@ def render_markdown(report: dict[str, Any]) -> str:
|
|
|
133
133
|
notes = (
|
|
134
134
|
"## Notes\n\n"
|
|
135
135
|
f"- corpus path: `{corpus['path']}` · prompts: **{corpus['prompt_count']}**\n"
|
|
136
|
-
f"- pricing: `bench/pricing.yaml`\n"
|
|
136
|
+
f"- pricing: `internal/bench/pricing.yaml`\n"
|
|
137
137
|
f"- baseline collector: `{report['runner']['baseline_collector']}`\n"
|
|
138
138
|
)
|
|
139
139
|
return "\n\n".join([
|