@llamaventures/cli 1.13.0 → 1.14.1

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 ADDED
@@ -0,0 +1,385 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@llamaventures/cli` are documented here.
4
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
5
+ this project adheres to [Semantic Versioning](https://semver.org).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [1.14.1] — 2026-06-15
10
+
11
+ ### Added
12
+ - **`llama deal agent run <dealId> --message "..."`** — starts Llama
13
+ Command's server-side Deal Agent in a deal thread, so the service agent can
14
+ execute deal-scoped work instead of the local CLI user doing it.
15
+ - **`deal_agent_run` MCP tool** — the same narrow server-agent trigger for
16
+ MCP-native clients, without adding a generic API passthrough.
17
+
18
+ ### Changed
19
+ - **`llama deal enrich <dealId> --apply --executor server_agent`** now starts
20
+ the server-side Deal Agent unless `--harness-only` is supplied. Dry-runs and
21
+ external-agent handoff prompts still use the enrichment harness endpoint.
22
+ - **`deal_enrich` MCP tool** now mirrors the same behavior with `harnessOnly`.
23
+
24
+ ## [1.14.0] — 2026-06-15
25
+
26
+ ### Added
27
+ - **`llama deal enrich <dealId>`** — fetch the Llama Command deal-enrichment
28
+ harness for one deal. Defaults to dry-run and returns the evidence plan,
29
+ source plan, Monid budget/config status, write contract, memo boundary, and
30
+ agent handoff prompt without changing facts/links/memo.
31
+ - **`deal_enrich` MCP tool** — same contract for MCP-native agents. External
32
+ agents can request `executor: "external_agent"` to receive guardrails and a
33
+ handoff prompt; private Monid credentials stay on the Llama Command server.
34
+ - `--prompt` / `--handoff` on the CLI prints only the external-agent prompt.
35
+
36
+ ### Notes
37
+ - Requires a Llama Command backend with `/api/deals/:dealId/enrich`.
38
+ - Memo generation never defaults on; pass `--memo` / `generateMemo: true` only
39
+ when the user explicitly asks for post-enrichment Memo generation.
40
+
41
+ ## [1.13.0] — 2026-06-11
42
+
43
+ ### Added
44
+ - **`llama deal extra set <dealId> <key> <value>`** — patch one top-level key
45
+ in `deals.extra` JSONB. System-admin only (server-gated, 403 otherwise).
46
+ Value is parsed as JSON when possible, else stored as a string. Audited to
47
+ `deal_events` as `field_change` with field `extra.<key>` — same
48
+ from→to trail as any column write. First use case: correcting stale
49
+ backfill provenance (`source_urls`, `identity_confidence`,
50
+ `enrichment_holds`) left by a mismatched-company import.
51
+ - **`llama deal extra unset <dealId> <key>`** — delete the key (admin,
52
+ audited the same way).
53
+ - Requires a Llama Command backend with the `extraKey` patch support on
54
+ `POST /api/deals/update`.
55
+
56
+ ### Fixed
57
+ - Help text: `deal update` writable-fields list now matches the server's
58
+ `FIELD_TO_COLUMN` whitelist — added the missing `founderInfo`, `deckLink`,
59
+ `folderUrl`, `agentActive`.
60
+
61
+ ## [1.12.0] — 2026-06-09
62
+
63
+ ### Added
64
+ - **`llama html link <dealId> --wiki <slug> [--lang en|zh] [--title "..."]`** —
65
+ turn a deal's HTML document card into a live, read-only pointer to a wiki
66
+ HTML article. One file, multiple entrances: the wiki stays the canonical
67
+ home and the card renders the wiki's HTML. The deal-side slug defaults to
68
+ the wiki slug and the title defaults to the wiki article's title. Uploads,
69
+ restores, and resets against a linked card are refused by the backend (409)
70
+ — edit the wiki source instead.
71
+ - **`llama html unlink <dealId> <slug>`** — revert a linked card back to a
72
+ normal self-hosted document.
73
+ - **`llama html docs <dealId>`** now surfaces a `linked_wiki` field on linked
74
+ cards (`{ slug, lang }`).
75
+ - All of the above require a Llama Command backend with wiki-linked document
76
+ support.
77
+
78
+ ## [1.11.0] — 2026-06-02
79
+
80
+ ### Changed
81
+ - **`deal_feed` (MCP) description corrected.** It previously claimed to
82
+ "exclude AI-generated content" — false, and it misled agents into telling
83
+ users the feed filtered their AI's work. The feed shows *every* contribution
84
+ (from a teammate, their AI assistant, or a system agent); each item now
85
+ carries `who` (the accountable person) and `agent` (the assistant/system
86
+ label, `null` when a human typed it), so human-typed and assistant-drafted
87
+ are distinguishable. The AI's regenerable brief/persona synthesis stays in
88
+ the Memo, not the feed.
89
+ - **Agent contract (`AGENT_BRIEFING`): read it back before claiming "saved".**
90
+ A tool returning `ok` is not proof the content landed where the user looks —
91
+ agents must run `llama deal feed <id>` and confirm the item appears before
92
+ reporting success (the #1 failure is writing to the brief, which is
93
+ Memo-only and not in the feed, then reporting success anyway). Authorship is
94
+ automatic — CLI/MCP writes are recorded "via assistant" and can't be faked
95
+ human; an agent's `--attested` caps at `agent-verified`, only a signed-in
96
+ human vouches.
97
+
98
+ Pairs with the Llama Command server-side contribution-authorship change
99
+ (deployed 2026-06-02): the feed badges every item human-typed (✍️) vs
100
+ assistant-drafted (🤖) and enforces the AI trust ceiling.
101
+
102
+ ## [1.10.0] — 2026-05-29
103
+
104
+ ### Added
105
+ - **`llama memo regenerate --instructions "..."`** — steer a single memo
106
+ regeneration (e.g. "focus on team risk", "frame as a follow-on"). The
107
+ instruction is applied across the memo's narrative panels; it never
108
+ overrides verified facts or the GREEN/YELLOW/RED verdict. Mirrored on the
109
+ `memo_regenerate` MCP tool via a new optional `instructions` field.
110
+ Requires a Llama Command backend with memo-steering support.
111
+
112
+ ## [1.7.0] — 2026-05-23
113
+
114
+ ### Added
115
+ - **`llama deal fact add --attested`** — the caller declares whether they
116
+ verified the claim against its source. With `--attested` the fact is recorded
117
+ as vouched; without it, it stays unverified (the honest default). You can't
118
+ mark a fact as human-confirmed on someone's behalf — only a person can.
119
+ - **MCP parity with the CLI.** MCP-native agents now have the same surface as
120
+ CLI users (35 → 49 tools): `deal_fact_list` / `deal_fact_add` (carries the
121
+ same `attested` contract) / `deal_fact_verify`; `brief_edit` / `brief_delete`
122
+ / `brief_restore` / `brief_history` / `brief_restore_version`;
123
+ `mentions_resolve`; `skill_correction_list` / `add` / `delete`;
124
+ `deal_refresh_brief` / `deal_refresh_persona`.
125
+
126
+ ### Changed
127
+ - `AGENT_BRIEFING.md`: new boundary — don't vouch for facts you haven't checked.
128
+
129
+ > Note: the 1.6.0 / 1.6.1 changelog entries were never committed to `main`
130
+ > (the releases are tagged); reconcile from the pending docs edit when convenient.
131
+
132
+ ## [1.5.0] — 2026-05-19
133
+
134
+ ### Changed
135
+ - **`llama html upload` now requires explicit intent — no more silent
136
+ overwrites.** Before: `llama html upload <dealId> --file <path>`
137
+ silently appended a new version to slug `main`, even when the deal
138
+ already had a different HTML artifact under that slug. After: the
139
+ same bare command **refuses** if `main` already has content, naming
140
+ the existing artifact and printing a two-line instruction
141
+ (`--doc main` to update it, `--new --title "..."` to add alongside).
142
+ The slug `main` still works as an auto-init default when the deal
143
+ has no documents yet — only the silent-overwrite path is gone.
144
+
145
+ ### Added
146
+ - **`--new` and `--title` flags on `llama html upload`.** Explicit
147
+ "create a new artifact" intent.
148
+ - `--new --doc <slug> --title "..."` — caller picks the slug.
149
+ - `--new --title "Investment Thesis"` — CLI slugifies the title
150
+ (`investment-thesis`). Collisions auto-resolve with `-2` / `-3`
151
+ suffix and a stderr note.
152
+ - Refuses (`--new --doc <slug>`) if the named slug already exists.
153
+ - **`--slug` as an alias for `--doc`.** When agents guess the wrong
154
+ flag name (the DB column is `document_slug`, so `--slug` is a
155
+ natural guess), the CLI now accepts it and prints a one-line
156
+ `note: --slug accepted as alias for --doc.` This eliminates the
157
+ exact silent-fall-through that caused the 1.4.4 incident.
158
+ - **Unknown-flag stderr warnings on `llama html *` handlers.**
159
+ Mistyped `--out` / `--asssets` / `--doc-slug` etc. now print
160
+ `warning: unknown flag --X (did you mean --Y?)` (Levenshtein-1
161
+ matcher) to stderr. The command still proceeds — no breaking
162
+ change for callers wrapping legacy flags.
163
+ - **`mode: 'created' | 'updated'`** field in `llama html upload`
164
+ JSON output, so scripts can branch on whether the call created a
165
+ new doc or appended a version.
166
+
167
+ ### Hardened
168
+ - `llama html upload` pre-flights `GET /api/deals/<id>/documents` and
169
+ uses the response to (a) detect existing slugs (b) refuse on the
170
+ bare-default overwrite (c) auto-resolve title-slug collisions.
171
+ Adds one extra round-trip per upload; cheap insurance.
172
+
173
+ ### Migration notes
174
+ - `llama html upload <id> --file X` callers targeting an empty
175
+ deal: **no change**, still works.
176
+ - `llama html upload <id> --file X` callers updating an existing
177
+ `main` artifact: **must add `--doc main`**.
178
+ - Agents using the natural-language flow ("deploy to llama / 部署到
179
+ llama command") via the deal agent or MCP tools: see the updated
180
+ `AGENT_BRIEFING.md` and llama-os routing tables — the agent path
181
+ now teaches "new vs update" upfront.
182
+
183
+ ## [1.4.4] — 2026-05-19
184
+
185
+ ### Changed
186
+ - **`AGENT_BRIEFING.md` — document native HTML deploy as the default.**
187
+ After llama-command PR #81 shipped per-deal hand-authored HTML pages at
188
+ `/deals/<id>/browse/<slug>` (sandboxed iframe, Postgres-backed), the
189
+ agent briefing now teaches `llama html upload` as the default route
190
+ when a user says "deploy to llama", "deploy to llama command",
191
+ "部署到 llama command", or "put this HTML on the deal page". The
192
+ Netlify path (`netlify-access-guard`) is preserved but explicitly
193
+ narrowed to founder-facing / external share-link scenarios. Quick
194
+ reference section now lists the full `llama html` surface
195
+ (`upload`, `show`, `versions`, `restore`, `reset`).
196
+
197
+ ## [1.4.0] — 2026-05-12
198
+
199
+ ### Added
200
+ - **`llama memo` subcommands.** Closes the CLI/MCP gap on the Memo tab —
201
+ long-form HTML investment memos previously only accessible through the
202
+ web UI. Four verbs:
203
+ - `llama memo show <dealId>` — fetch the current memo; default writes
204
+ HTML to stdout (pipeable to a file or `open`), `--out <path>` writes
205
+ to disk, `--json` returns the full envelope (memo + mode + inflight).
206
+ - `llama memo regenerate <dealId> [--opus]` — trigger server-side
207
+ regeneration; streams panel progress to stderr, prints final summary
208
+ JSON to stdout.
209
+ - `llama memo save <dealId> --file <path>` — upload hand-written HTML
210
+ as a manual override.
211
+ - `llama memo reset <dealId> [--all]` — drop the manual override
212
+ (default) or every version (`--all`).
213
+ - **MCP `memo_*` tools.** Same surface as the CLI: `memo_show`,
214
+ `memo_regenerate`, `memo_save`, `memo_reset`. `memo_regenerate` is
215
+ synchronous (non-streaming) so the call returns the final result
216
+ directly to the calling agent.
217
+
218
+ ## [1.3.1] — 2026-05-12
219
+
220
+ ### Changed
221
+ - **Documentation hygiene.** CHANGELOG backfilled for 1.2.3 and 1.2.4. Help text
222
+ and READMEs now describe server-enforced rate limits generically instead of
223
+ restating specific numbers. `package.json` description clarified.
224
+
225
+ ### Added
226
+ - **Pre-publish identifier guard in CI.** Shape-based regex blocks `npm publish`
227
+ if any internal-style slug accidentally slips into shipped files (`bin/`,
228
+ `lib/`, root `.md`). Extend the pattern as new shapes surface.
229
+
230
+ ## [1.3.0] — 2026-05-11
231
+
232
+ ### Added
233
+ - **`llama auth login` — browser-based OAuth 2.1 sign-in.** PKCE + loopback
234
+ flow against the Llama Command authorization server. Opens your browser,
235
+ routes through Google sign-in (`@llamaventures.vc` only) + consent screen,
236
+ redirects to a one-shot ephemeral `127.0.0.1:<port>/callback`, exchanges
237
+ the code for an access + refresh token pair. Replaces the 4-step
238
+ "mint at /settings/tokens → copy → paste → `llama token set`" path with a
239
+ single command. Existing `llc_...` PATs and gcloud Bearer auth continue
240
+ to work unchanged (priority order: OAuth → gcloud → `$LLAMA_TOKEN` →
241
+ `~/.llama/token` → legacy).
242
+ - **`llama auth logout`** — RFC 7009 revoke at the AS + clear local
243
+ storage. Falls back to gcloud / PAT cleanly afterward.
244
+ - **OS Keychain credential storage** via `@napi-rs/keyring` (macOS Keychain,
245
+ Windows Credential Manager, Linux Secret Service). File backend at
246
+ `~/.llama/oauth.json` (mode 0600) when no Keychain backend is available
247
+ (Linux containers without libsecret, CI runners) — same posture
248
+ `gcloud`/`gh`/`aws` ship with on Linux servers.
249
+ - **Auto-refresh on 401.** When an OAuth-bearing call returns 401, the CLI
250
+ forces a refresh-token rotation under a cross-process file lock and
251
+ retries once. Two shells refreshing simultaneously can't burn each other's
252
+ refresh token.
253
+ - **`llama auth status` extended.** New `activeMethod` field (`oauth` /
254
+ `gcloud-bearer` / `llama-token` / `none`) and `oauth` block showing
255
+ storage backend, client_id, scope, expiry. Existing fields preserved.
256
+
257
+ ### Changed
258
+ - Bearer header on outbound requests now prefers OAuth access token over
259
+ gcloud identity token. Unchanged when no OAuth bundle exists.
260
+
261
+ ### Notes
262
+ - Requires the Llama Command server to have `OAUTH_PROVIDER_ENABLED=true`
263
+ set on Render. Until that flag flips, `llama auth login` will fail with
264
+ a 404 on the OAuth endpoints — fall back to PATs in the meantime.
265
+ - Phase 2.5 (RFC 8628 device authorization grant for SSH/headless
266
+ environments) lands in a follow-up; today's `auth login` requires a
267
+ browser.
268
+
269
+ ## [1.2.4] — 2026-05-08
270
+
271
+ ### Added
272
+ - **`llama pitch finalize`** — founder-initiated wrap-up. Sends a sentinel
273
+ that the intake agent recognizes as "call `finalize_intake` on this turn."
274
+ Closes the gap where the founder is done but the agent keeps asking.
275
+
276
+ ### Changed
277
+ - **Fetch timeouts on all three external API calls** — 60s on
278
+ `/start-session`, 180s on `/chat`, 180s on `/upload`. Without these, a
279
+ network hang froze the CLI indefinitely.
280
+ - **Help polish** — `pitch help` now mentions `pitch finalize` and the
281
+ `LLAMA_API_URL` env override.
282
+
283
+ ## [1.2.3] — 2026-05-08
284
+
285
+ ### Security
286
+ - **Removed a generic MCP tool that proxied arbitrary internal API paths.**
287
+ An unrestricted internal-API tool reachable from a prompt-injection-prone
288
+ agent context is the wrong shape for a public package. Power users keep
289
+ the `llama` CLI (40+ commands) for raw HTTP.
290
+
291
+ ### Changed
292
+ - Scrubbed example identifiers from deal-list snippets (both READMEs).
293
+ - `zod` is now a direct dependency (was resolving via transitive hoist;
294
+ would have broken under pnpm/yarn strict).
295
+ - MCP server reports the real package version in `serverInfo` (was
296
+ hardcoded `"1.0.0"`).
297
+
298
+ ### Fixed
299
+ - Operator-precedence bug in `bin/llama.mjs` token-set verify path that
300
+ could TypeError on rare error paths.
301
+ - `llama --version` / `-v` / `version` now print the package version
302
+ cleanly (exit 0).
303
+
304
+ ## [1.2.2] — 2026-05-07
305
+
306
+ ### Changed
307
+ - `llama pitch`: friendlier output for the upload + send paths (clearer quoting
308
+ hint, cleaner error surface).
309
+
310
+ ## [1.2.1] — 2026-05-07
311
+
312
+ ### Fixed
313
+ - CI publish: bump runner Node 20 → 24 so npm 11.5+ is available — the older
314
+ npm silently fails the OIDC handshake against npm Trusted Publishers and the
315
+ registry treats the request as anonymous (404 on `PUT`).
316
+
317
+ ## [1.2.0] — 2026-05-06
318
+
319
+ ### Added
320
+ - **External pitch family.** `llama pitch start | say | upload | status | end`
321
+ CLI commands plus 5 matching MCP tools (`pitch_start`, `pitch_send_message`,
322
+ `pitch_upload_file`, `pitch_status`, `pitch_finalize`). Talks to
323
+ `command.llamaventures.vc/external-agent` — no Llama token required, founder
324
+ / EA / external use.
325
+
326
+ ### Changed
327
+ - `agent_briefing` MCP prompt + `llama agent-onboard` CLI command now gate on
328
+ `/api/me`; unauthenticated callers see a short bootstrap stub instead of
329
+ the full workflow contract.
330
+
331
+ ## [1.1.0] — 2026-05-04
332
+
333
+ ### Added
334
+ - **`llama-mcp` stdio MCP server**, distributed in the same npm package.
335
+ Mirrors the most-used CLI surface as a set of named, typed tools.
336
+ Same auth chain, same error prefixes — CLI and MCP cannot drift.
337
+ - `llama agent-onboard` — re-prints the bundled `AGENT_BRIEFING.md` so any
338
+ agent that just installed the package can self-onboard.
339
+
340
+ ### Changed
341
+ - HTTP / auth / token helpers extracted into `lib/client.mjs` so CLI and MCP
342
+ share one implementation.
343
+
344
+ ## [1.0.1] — 2026-05-03
345
+
346
+ ### Fixed
347
+ - `package.json`: stripped the `./` prefix from `bin` paths — npm 10 was
348
+ silently dropping the binaries on global install for some setups.
349
+
350
+ ## [1.0.0] — 2026-05-03
351
+
352
+ ### Added
353
+ - Initial public release as `@llamaventures/cli` on npm.
354
+ - CLI surface: deals (CRUD + soft-delete + restore + trash), brief blocks
355
+ (text / link / embed / callout, edit, history, restore-version), ownership
356
+ (claim / nominate / approvals), timeline + posts, deal links, deal facts,
357
+ collaborators, mentions inbox, skill corrections, wiki search/save, admin
358
+ event feeds.
359
+ - Auth chain: `gcloud auth print-identity-token` → `$LLAMA_TOKEN` →
360
+ `~/.llama/token` → legacy `~/.llama-command/config.json` (auto-migrates
361
+ forward).
362
+ - Stable `Error[NO_AUTH]` and `Error[UNAUTHORIZED]` prefixes for agent pattern
363
+ matching.
364
+ - Supply chain: published via npm Trusted Publishers (OIDC), every release
365
+ signed with `--provenance`, CI matrix on Node 18 / 20 / 22.
366
+
367
+ ### Migrated from
368
+ - The previous `llama-os/cli/` directory distributed via `npm link`. Existing
369
+ team installs auto-upgrade on the next `bin/update-check` run; the legacy
370
+ directory is kept as a soft fallback for the soak window and will be removed
371
+ in a follow-up.
372
+
373
+ ---
374
+
375
+ [Unreleased]: https://github.com/Llama-Ventures/llama-cli/compare/v1.3.1...HEAD
376
+ [1.3.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.3.0...v1.3.1
377
+ [1.3.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.4...v1.3.0
378
+ [1.2.4]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.3...v1.2.4
379
+ [1.2.3]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.2...v1.2.3
380
+ [1.2.2]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.1...v1.2.2
381
+ [1.2.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.0...v1.2.1
382
+ [1.2.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.1.0...v1.2.0
383
+ [1.1.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.0.1...v1.1.0
384
+ [1.0.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.0.0...v1.0.1
385
+ [1.0.0]: https://github.com/Llama-Ventures/llama-cli/releases/tag/v1.0.0
@@ -0,0 +1,100 @@
1
+ # Contributing
2
+
3
+ Thanks for looking. This is an **internal tool** maintained by Llama Ventures
4
+ team members. Patches from teammates are welcome; outside contributions are
5
+ best limited to documentation fixes and broken-flow reports.
6
+
7
+ ## Local dev loop
8
+
9
+ ```bash
10
+ git clone https://github.com/Llama-Ventures/llama-cli.git
11
+ cd llama-cli
12
+ npm ci
13
+ node bin/llama.mjs --help # CLI is ESM, runs straight from source
14
+ node --check bin/llama.mjs # syntax check
15
+ node --check bin/llama-mcp.mjs # syntax check
16
+ npm test # mock-backed CLI/MCP agent routing checks
17
+ ```
18
+
19
+ To test the CLI end-to-end against your own credentials, point it at the
20
+ in-source binary instead of the globally installed one:
21
+
22
+ ```bash
23
+ alias llama-dev="node $(pwd)/bin/llama.mjs"
24
+ llama-dev auth status
25
+ ```
26
+
27
+ To smoke-test the MCP server (no client needed):
28
+
29
+ ```bash
30
+ printf '%s\n' \
31
+ '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"dev","version":"1"}}}' \
32
+ '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
33
+ '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
34
+ | node bin/llama-mcp.mjs | head -200
35
+ ```
36
+
37
+ You should see 52 named tools, including `deal_agent_run`, `deal_enrich`, the
38
+ 5 `pitch_*`, and no generic API passthrough tool.
39
+
40
+ ## Conventions
41
+
42
+ - **Zero deps for the CLI.** `bin/llama.mjs` and `lib/client.mjs` use only Node
43
+ stdlib + native `fetch`. The MCP server may pull in
44
+ `@modelcontextprotocol/sdk`; nothing else.
45
+ - **One auth chain, one HTTP client.** Anything new that talks to
46
+ `command.llamaventures.vc` goes through `lib/client.mjs::request()`. Don't
47
+ spawn a parallel auth path; if you need a new credential type, add it to the
48
+ chain there.
49
+ - **Stable `Error[…]` prefixes.** `Error[NO_AUTH]` and `Error[UNAUTHORIZED]`
50
+ are part of the public contract — agents pattern-match on them. New error
51
+ classes need a new prefix; renaming an existing one is a major version bump.
52
+ - **CLI and MCP stay in lockstep.** Adding a new CLI command? Add the matching
53
+ MCP tool in the same PR. The MCP server exposes only named, typed tools — no
54
+ generic API passthrough — so every server endpoint that needs agent access
55
+ gets its own typed wrapper.
56
+ - **No bundler, no build step.** The CLI ships as `.mjs` files that npm copies
57
+ verbatim. `package.json::files` is the allowlist; CI re-verifies the tarball
58
+ contents on every PR.
59
+ - **`AGENT_BRIEFING.md` is content, not chrome.** It's the behavioural contract
60
+ for AI agents loading the package — terse, action-oriented, no fluff.
61
+ Changes to it are reviewed for substance, not formatting.
62
+
63
+ ## Submitting changes
64
+
65
+ 1. Branch off `main`. Branch names are casual; prefer `<type>/<short-slug>`
66
+ (e.g. `feat/pitch-rate-limit-message`, `fix/agent-onboard-redaction`).
67
+ 2. Run the smoke commands above. CI on PR runs the same matrix on Node
68
+ 18/20/22 plus a tarball-contents allowlist check.
69
+ 3. Open a PR. One commit per logical change is preferred but not enforced.
70
+ 4. Update [`CHANGELOG.md`](CHANGELOG.md) under `[Unreleased]` if the change
71
+ affects users (CLI / MCP surface, error format, auth, install).
72
+
73
+ ## Releasing
74
+
75
+ Releases are cut from `main` via a GitHub Release. The
76
+ `.github/workflows/publish.yml` workflow then publishes to npm via
77
+ [Trusted Publishers](https://docs.npmjs.com/trusted-publishers) — no
78
+ `NPM_TOKEN` exists in repo secrets.
79
+
80
+ To cut a release:
81
+
82
+ ```bash
83
+ # 1. Bump version + move CHANGELOG entries from [Unreleased] to the new tag
84
+ npm version <patch|minor|major> # commits + tags
85
+ git push origin main --tags
86
+
87
+ # 2. Open https://github.com/Llama-Ventures/llama-cli/releases/new
88
+ # Choose the tag, paste the CHANGELOG section, click "Publish release"
89
+ # → publish.yml fires, OIDC handshake → npm publish --provenance --access public
90
+ ```
91
+
92
+ The publish workflow asserts that `package.json::version` matches the release
93
+ tag (modulo a leading `v`). If they disagree, it fails fast — fix the
94
+ mismatch and re-cut the release.
95
+
96
+ ## Security
97
+
98
+ Don't file public issues for security bugs. Email
99
+ [gavin@llamaventures.vc](mailto:gavin@llamaventures.vc). Full policy:
100
+ [`SECURITY.md`](SECURITY.md).
package/README.md CHANGED
@@ -48,7 +48,7 @@
48
48
  ```
49
49
  @llamaventures/cli
50
50
  ├── bin/llama interactive CLI for humans + bash
51
- └── bin/llama-mcp stdio MCP server, 20 tools — for any MCP-native agent
51
+ └── bin/llama-mcp stdio MCP server, 52 typed tools — for any MCP-native agent
52
52
  ```
53
53
 
54
54
  Both binaries share `lib/client.mjs` — the **same** auth chain, **same** HTTP
@@ -186,6 +186,10 @@ llama deal show <dealId>
186
186
  # Pipeline — write
187
187
  llama deal create "Acme AI" --description "..." --source Gavin
188
188
  llama deal update <dealId> status Diligence
189
+ llama deal enrich <dealId> --dry-run
190
+ llama deal enrich <dealId> --apply --executor server_agent
191
+ llama deal enrich <dealId> --executor external_agent --prompt
192
+ llama deal agent run <dealId> --message "collect founder evidence and update typed facts"
189
193
  llama deal delete <dealId> # soft (audit-logged)
190
194
  llama deal restore <dealId>
191
195
 
@@ -223,7 +227,7 @@ llama mentions
223
227
  llama mentions resolve <mentionId>
224
228
  ```
225
229
 
226
- Run `llama --help` for the full surface (~40 commands across deals, briefs,
230
+ Run `llama --help` for the full surface (50+ commands across deals, briefs,
227
231
  ownership, timeline, facts, wiki, mentions, skill corrections, and admin event
228
232
  feeds). Soft-delete is the default everywhere — every removal is reversible
229
233
  and audit-logged via `deal_events`.
@@ -245,30 +249,27 @@ agents can pattern-match without parsing prose.
245
249
  ## MCP server
246
250
 
247
251
  The bundled `llama-mcp` is a **stdio Model Context Protocol** server exposing
248
- **19 typed tools** that mirror the most-used CLI surface. Every tool is named
252
+ **52 typed tools** that mirror the most-used CLI surface. Every tool is named
249
253
  and scoped — there is no generic API passthrough, by design (a public-package
250
254
  escape hatch reachable from a prompt-injectable agent context is exactly the
251
255
  shape we want to avoid).
252
256
 
253
- ```
254
- auth_status
255
-
256
- deal_search deal_show
257
- deal_create deal_update
258
-
259
- brief_blocks brief_add_text
260
- brief_add_link brief_add_callout
257
+ Coverage is grouped around the workflows agents actually need: auth
258
+ diagnostics; deal search/show/create/update/feed; server-side deal agent runs;
259
+ deal enrichment harnesses;
260
+ trust-rated facts; brief blocks and version history; wiki read/write/delete/restore;
261
+ timeline posts and mentions; skill corrections; refresh triggers; external pitch intake;
262
+ memo show/regenerate/save/reset; and deal-scoped HTML docs, versions, bundles, and
263
+ restore/reset.
261
264
 
262
- timeline post
265
+ For the exact live list, smoke-test the server with `tools/list`:
263
266
 
264
- wiki_search wiki_save
265
- wiki_delete wiki_restore
266
-
267
- mentions_list
268
-
269
- pitch_start pitch_send_message
270
- pitch_upload_file pitch_status
271
- pitch_finalize
267
+ ```bash
268
+ printf '%s\n' \
269
+ '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"dev","version":"1"}}}' \
270
+ '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
271
+ '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
272
+ | llama-mcp
272
273
  ```
273
274
 
274
275
  Auth is identical to the CLI's chain (gcloud → `$LLAMA_TOKEN` → `~/.llama/token`).
package/README.zh-CN.md CHANGED
@@ -48,7 +48,7 @@
48
48
  ```
49
49
  @llamaventures/cli
50
50
  ├── bin/llama 给人 + bash 用的交互式 CLI
51
- └── bin/llama-mcp 给 MCP 原生 agent 用的 stdio MCP server,20 个工具
51
+ └── bin/llama-mcp 给 MCP 原生 agent 用的 stdio MCP server,52 个工具
52
52
  ```
53
53
 
54
54
  两个 binary 共享 `lib/client.mjs`——**同一**认证链、**同一** HTTP 客户端、
@@ -207,6 +207,10 @@ llama deal show <dealId>
207
207
  # Pipeline——写
208
208
  llama deal create "Acme AI" --description "..." --source Gavin
209
209
  llama deal update <dealId> status Diligence
210
+ llama deal enrich <dealId> --dry-run
211
+ llama deal enrich <dealId> --apply --executor server_agent
212
+ llama deal enrich <dealId> --executor external_agent --prompt
213
+ llama deal agent run <dealId> --message "collect founder evidence and update typed facts"
210
214
  llama deal delete <dealId> # 软删除(审计日志记录)
211
215
  llama deal restore <dealId>
212
216
 
@@ -237,7 +241,7 @@ llama mentions
237
241
  llama mentions resolve <mentionId>
238
242
  ```
239
243
 
240
- 跑 `llama --help` 看完整命令清单(约 40 个命令,覆盖 deals、briefs、ownership、
244
+ 跑 `llama --help` 看完整命令清单(50+ 个命令,覆盖 deals、briefs、ownership、
241
245
  timeline、facts、wiki、mentions、skill corrections、admin event feeds)。
242
246
  所有删除默认软删除——可恢复,且通过 `deal_events` 留下审计痕迹。
243
247
 
@@ -257,28 +261,24 @@ MCP server 在 `isError: true` 内容里返回相同的前缀,agent 不用解
257
261
  ## MCP server
258
262
 
259
263
  随包发布的 `llama-mcp` 是一个 **stdio Model Context Protocol** server,
260
- 暴露 **19 个 typed tools**——基本镜像 CLI 最常用的命令。每个 tool 都是
264
+ 暴露 **52 个 typed tools**——基本镜像 CLI 最常用的命令。每个 tool 都是
261
265
  具名、scoped 的;**没有**通用的 API passthrough,这是有意设计的(公开
262
266
  package 里一个能被 prompt-injection 触达的逃生通道,正是我们要避开的形状)。
263
267
 
264
- ```
265
- auth_status
266
-
267
- deal_search deal_show
268
- deal_create deal_update
269
-
270
- brief_blocks brief_add_text
271
- brief_add_link brief_add_callout
268
+ 覆盖面按 agent 真正会用的工作流分组:auth 诊断;deal search/show/create/
269
+ update/feed;服务端 deal agent run;deal enrichment harness;带 trust ladder 的事实;brief blocks
270
+ 和版本历史;wiki 读写删恢复;timeline posts 和 mentions;skill corrections;
271
+ refresh triggers;外部 pitch intake;memo show/regenerate/save/reset;
272
+ 以及 deal-scoped HTML docs、versions、bundles、restore/reset。
272
273
 
273
- timeline post
274
+ 精确的 live list 以 `tools/list` 为准:
274
275
 
275
- wiki_search wiki_save
276
-
277
- mentions_list
278
-
279
- pitch_start pitch_send_message
280
- pitch_upload_file pitch_status
281
- pitch_finalize
276
+ ```bash
277
+ printf '%s\n' \
278
+ '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"dev","version":"1"}}}' \
279
+ '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
280
+ '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
281
+ | llama-mcp
282
282
  ```
283
283
 
284
284
  认证链跟 CLI 完全一样(gcloud → `$LLAMA_TOKEN` → `~/.llama/token`)。