@llamaventures/cli 1.13.0 → 1.14.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/CHANGELOG.md ADDED
@@ -0,0 +1,370 @@
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.0] — 2026-06-15
10
+
11
+ ### Added
12
+ - **`llama deal enrich <dealId>`** — fetch the Llama Command deal-enrichment
13
+ harness for one deal. Defaults to dry-run and returns the evidence plan,
14
+ source plan, Monid budget/config status, write contract, memo boundary, and
15
+ agent handoff prompt without changing facts/links/memo.
16
+ - **`deal_enrich` MCP tool** — same contract for MCP-native agents. External
17
+ agents can request `executor: "external_agent"` to receive guardrails and a
18
+ handoff prompt; private Monid credentials stay on the Llama Command server.
19
+ - `--prompt` / `--handoff` on the CLI prints only the external-agent prompt.
20
+
21
+ ### Notes
22
+ - Requires a Llama Command backend with `/api/deals/:dealId/enrich`.
23
+ - Memo generation never defaults on; pass `--memo` / `generateMemo: true` only
24
+ when the user explicitly asks for post-enrichment Memo generation.
25
+
26
+ ## [1.13.0] — 2026-06-11
27
+
28
+ ### Added
29
+ - **`llama deal extra set <dealId> <key> <value>`** — patch one top-level key
30
+ in `deals.extra` JSONB. System-admin only (server-gated, 403 otherwise).
31
+ Value is parsed as JSON when possible, else stored as a string. Audited to
32
+ `deal_events` as `field_change` with field `extra.<key>` — same
33
+ from→to trail as any column write. First use case: correcting stale
34
+ backfill provenance (`source_urls`, `identity_confidence`,
35
+ `enrichment_holds`) left by a mismatched-company import.
36
+ - **`llama deal extra unset <dealId> <key>`** — delete the key (admin,
37
+ audited the same way).
38
+ - Requires a Llama Command backend with the `extraKey` patch support on
39
+ `POST /api/deals/update`.
40
+
41
+ ### Fixed
42
+ - Help text: `deal update` writable-fields list now matches the server's
43
+ `FIELD_TO_COLUMN` whitelist — added the missing `founderInfo`, `deckLink`,
44
+ `folderUrl`, `agentActive`.
45
+
46
+ ## [1.12.0] — 2026-06-09
47
+
48
+ ### Added
49
+ - **`llama html link <dealId> --wiki <slug> [--lang en|zh] [--title "..."]`** —
50
+ turn a deal's HTML document card into a live, read-only pointer to a wiki
51
+ HTML article. One file, multiple entrances: the wiki stays the canonical
52
+ home and the card renders the wiki's HTML. The deal-side slug defaults to
53
+ the wiki slug and the title defaults to the wiki article's title. Uploads,
54
+ restores, and resets against a linked card are refused by the backend (409)
55
+ — edit the wiki source instead.
56
+ - **`llama html unlink <dealId> <slug>`** — revert a linked card back to a
57
+ normal self-hosted document.
58
+ - **`llama html docs <dealId>`** now surfaces a `linked_wiki` field on linked
59
+ cards (`{ slug, lang }`).
60
+ - All of the above require a Llama Command backend with wiki-linked document
61
+ support.
62
+
63
+ ## [1.11.0] — 2026-06-02
64
+
65
+ ### Changed
66
+ - **`deal_feed` (MCP) description corrected.** It previously claimed to
67
+ "exclude AI-generated content" — false, and it misled agents into telling
68
+ users the feed filtered their AI's work. The feed shows *every* contribution
69
+ (from a teammate, their AI assistant, or a system agent); each item now
70
+ carries `who` (the accountable person) and `agent` (the assistant/system
71
+ label, `null` when a human typed it), so human-typed and assistant-drafted
72
+ are distinguishable. The AI's regenerable brief/persona synthesis stays in
73
+ the Memo, not the feed.
74
+ - **Agent contract (`AGENT_BRIEFING`): read it back before claiming "saved".**
75
+ A tool returning `ok` is not proof the content landed where the user looks —
76
+ agents must run `llama deal feed <id>` and confirm the item appears before
77
+ reporting success (the #1 failure is writing to the brief, which is
78
+ Memo-only and not in the feed, then reporting success anyway). Authorship is
79
+ automatic — CLI/MCP writes are recorded "via assistant" and can't be faked
80
+ human; an agent's `--attested` caps at `agent-verified`, only a signed-in
81
+ human vouches.
82
+
83
+ Pairs with the Llama Command server-side contribution-authorship change
84
+ (deployed 2026-06-02): the feed badges every item human-typed (✍️) vs
85
+ assistant-drafted (🤖) and enforces the AI trust ceiling.
86
+
87
+ ## [1.10.0] — 2026-05-29
88
+
89
+ ### Added
90
+ - **`llama memo regenerate --instructions "..."`** — steer a single memo
91
+ regeneration (e.g. "focus on team risk", "frame as a follow-on"). The
92
+ instruction is applied across the memo's narrative panels; it never
93
+ overrides verified facts or the GREEN/YELLOW/RED verdict. Mirrored on the
94
+ `memo_regenerate` MCP tool via a new optional `instructions` field.
95
+ Requires a Llama Command backend with memo-steering support.
96
+
97
+ ## [1.7.0] — 2026-05-23
98
+
99
+ ### Added
100
+ - **`llama deal fact add --attested`** — the caller declares whether they
101
+ verified the claim against its source. With `--attested` the fact is recorded
102
+ as vouched; without it, it stays unverified (the honest default). You can't
103
+ mark a fact as human-confirmed on someone's behalf — only a person can.
104
+ - **MCP parity with the CLI.** MCP-native agents now have the same surface as
105
+ CLI users (35 → 49 tools): `deal_fact_list` / `deal_fact_add` (carries the
106
+ same `attested` contract) / `deal_fact_verify`; `brief_edit` / `brief_delete`
107
+ / `brief_restore` / `brief_history` / `brief_restore_version`;
108
+ `mentions_resolve`; `skill_correction_list` / `add` / `delete`;
109
+ `deal_refresh_brief` / `deal_refresh_persona`.
110
+
111
+ ### Changed
112
+ - `AGENT_BRIEFING.md`: new boundary — don't vouch for facts you haven't checked.
113
+
114
+ > Note: the 1.6.0 / 1.6.1 changelog entries were never committed to `main`
115
+ > (the releases are tagged); reconcile from the pending docs edit when convenient.
116
+
117
+ ## [1.5.0] — 2026-05-19
118
+
119
+ ### Changed
120
+ - **`llama html upload` now requires explicit intent — no more silent
121
+ overwrites.** Before: `llama html upload <dealId> --file <path>`
122
+ silently appended a new version to slug `main`, even when the deal
123
+ already had a different HTML artifact under that slug. After: the
124
+ same bare command **refuses** if `main` already has content, naming
125
+ the existing artifact and printing a two-line instruction
126
+ (`--doc main` to update it, `--new --title "..."` to add alongside).
127
+ The slug `main` still works as an auto-init default when the deal
128
+ has no documents yet — only the silent-overwrite path is gone.
129
+
130
+ ### Added
131
+ - **`--new` and `--title` flags on `llama html upload`.** Explicit
132
+ "create a new artifact" intent.
133
+ - `--new --doc <slug> --title "..."` — caller picks the slug.
134
+ - `--new --title "Investment Thesis"` — CLI slugifies the title
135
+ (`investment-thesis`). Collisions auto-resolve with `-2` / `-3`
136
+ suffix and a stderr note.
137
+ - Refuses (`--new --doc <slug>`) if the named slug already exists.
138
+ - **`--slug` as an alias for `--doc`.** When agents guess the wrong
139
+ flag name (the DB column is `document_slug`, so `--slug` is a
140
+ natural guess), the CLI now accepts it and prints a one-line
141
+ `note: --slug accepted as alias for --doc.` This eliminates the
142
+ exact silent-fall-through that caused the 1.4.4 incident.
143
+ - **Unknown-flag stderr warnings on `llama html *` handlers.**
144
+ Mistyped `--out` / `--asssets` / `--doc-slug` etc. now print
145
+ `warning: unknown flag --X (did you mean --Y?)` (Levenshtein-1
146
+ matcher) to stderr. The command still proceeds — no breaking
147
+ change for callers wrapping legacy flags.
148
+ - **`mode: 'created' | 'updated'`** field in `llama html upload`
149
+ JSON output, so scripts can branch on whether the call created a
150
+ new doc or appended a version.
151
+
152
+ ### Hardened
153
+ - `llama html upload` pre-flights `GET /api/deals/<id>/documents` and
154
+ uses the response to (a) detect existing slugs (b) refuse on the
155
+ bare-default overwrite (c) auto-resolve title-slug collisions.
156
+ Adds one extra round-trip per upload; cheap insurance.
157
+
158
+ ### Migration notes
159
+ - `llama html upload <id> --file X` callers targeting an empty
160
+ deal: **no change**, still works.
161
+ - `llama html upload <id> --file X` callers updating an existing
162
+ `main` artifact: **must add `--doc main`**.
163
+ - Agents using the natural-language flow ("deploy to llama / 部署到
164
+ llama command") via the deal agent or MCP tools: see the updated
165
+ `AGENT_BRIEFING.md` and llama-os routing tables — the agent path
166
+ now teaches "new vs update" upfront.
167
+
168
+ ## [1.4.4] — 2026-05-19
169
+
170
+ ### Changed
171
+ - **`AGENT_BRIEFING.md` — document native HTML deploy as the default.**
172
+ After llama-command PR #81 shipped per-deal hand-authored HTML pages at
173
+ `/deals/<id>/browse/<slug>` (sandboxed iframe, Postgres-backed), the
174
+ agent briefing now teaches `llama html upload` as the default route
175
+ when a user says "deploy to llama", "deploy to llama command",
176
+ "部署到 llama command", or "put this HTML on the deal page". The
177
+ Netlify path (`netlify-access-guard`) is preserved but explicitly
178
+ narrowed to founder-facing / external share-link scenarios. Quick
179
+ reference section now lists the full `llama html` surface
180
+ (`upload`, `show`, `versions`, `restore`, `reset`).
181
+
182
+ ## [1.4.0] — 2026-05-12
183
+
184
+ ### Added
185
+ - **`llama memo` subcommands.** Closes the CLI/MCP gap on the Memo tab —
186
+ long-form HTML investment memos previously only accessible through the
187
+ web UI. Four verbs:
188
+ - `llama memo show <dealId>` — fetch the current memo; default writes
189
+ HTML to stdout (pipeable to a file or `open`), `--out <path>` writes
190
+ to disk, `--json` returns the full envelope (memo + mode + inflight).
191
+ - `llama memo regenerate <dealId> [--opus]` — trigger server-side
192
+ regeneration; streams panel progress to stderr, prints final summary
193
+ JSON to stdout.
194
+ - `llama memo save <dealId> --file <path>` — upload hand-written HTML
195
+ as a manual override.
196
+ - `llama memo reset <dealId> [--all]` — drop the manual override
197
+ (default) or every version (`--all`).
198
+ - **MCP `memo_*` tools.** Same surface as the CLI: `memo_show`,
199
+ `memo_regenerate`, `memo_save`, `memo_reset`. `memo_regenerate` is
200
+ synchronous (non-streaming) so the call returns the final result
201
+ directly to the calling agent.
202
+
203
+ ## [1.3.1] — 2026-05-12
204
+
205
+ ### Changed
206
+ - **Documentation hygiene.** CHANGELOG backfilled for 1.2.3 and 1.2.4. Help text
207
+ and READMEs now describe server-enforced rate limits generically instead of
208
+ restating specific numbers. `package.json` description clarified.
209
+
210
+ ### Added
211
+ - **Pre-publish identifier guard in CI.** Shape-based regex blocks `npm publish`
212
+ if any internal-style slug accidentally slips into shipped files (`bin/`,
213
+ `lib/`, root `.md`). Extend the pattern as new shapes surface.
214
+
215
+ ## [1.3.0] — 2026-05-11
216
+
217
+ ### Added
218
+ - **`llama auth login` — browser-based OAuth 2.1 sign-in.** PKCE + loopback
219
+ flow against the Llama Command authorization server. Opens your browser,
220
+ routes through Google sign-in (`@llamaventures.vc` only) + consent screen,
221
+ redirects to a one-shot ephemeral `127.0.0.1:<port>/callback`, exchanges
222
+ the code for an access + refresh token pair. Replaces the 4-step
223
+ "mint at /settings/tokens → copy → paste → `llama token set`" path with a
224
+ single command. Existing `llc_...` PATs and gcloud Bearer auth continue
225
+ to work unchanged (priority order: OAuth → gcloud → `$LLAMA_TOKEN` →
226
+ `~/.llama/token` → legacy).
227
+ - **`llama auth logout`** — RFC 7009 revoke at the AS + clear local
228
+ storage. Falls back to gcloud / PAT cleanly afterward.
229
+ - **OS Keychain credential storage** via `@napi-rs/keyring` (macOS Keychain,
230
+ Windows Credential Manager, Linux Secret Service). File backend at
231
+ `~/.llama/oauth.json` (mode 0600) when no Keychain backend is available
232
+ (Linux containers without libsecret, CI runners) — same posture
233
+ `gcloud`/`gh`/`aws` ship with on Linux servers.
234
+ - **Auto-refresh on 401.** When an OAuth-bearing call returns 401, the CLI
235
+ forces a refresh-token rotation under a cross-process file lock and
236
+ retries once. Two shells refreshing simultaneously can't burn each other's
237
+ refresh token.
238
+ - **`llama auth status` extended.** New `activeMethod` field (`oauth` /
239
+ `gcloud-bearer` / `llama-token` / `none`) and `oauth` block showing
240
+ storage backend, client_id, scope, expiry. Existing fields preserved.
241
+
242
+ ### Changed
243
+ - Bearer header on outbound requests now prefers OAuth access token over
244
+ gcloud identity token. Unchanged when no OAuth bundle exists.
245
+
246
+ ### Notes
247
+ - Requires the Llama Command server to have `OAUTH_PROVIDER_ENABLED=true`
248
+ set on Render. Until that flag flips, `llama auth login` will fail with
249
+ a 404 on the OAuth endpoints — fall back to PATs in the meantime.
250
+ - Phase 2.5 (RFC 8628 device authorization grant for SSH/headless
251
+ environments) lands in a follow-up; today's `auth login` requires a
252
+ browser.
253
+
254
+ ## [1.2.4] — 2026-05-08
255
+
256
+ ### Added
257
+ - **`llama pitch finalize`** — founder-initiated wrap-up. Sends a sentinel
258
+ that the intake agent recognizes as "call `finalize_intake` on this turn."
259
+ Closes the gap where the founder is done but the agent keeps asking.
260
+
261
+ ### Changed
262
+ - **Fetch timeouts on all three external API calls** — 60s on
263
+ `/start-session`, 180s on `/chat`, 180s on `/upload`. Without these, a
264
+ network hang froze the CLI indefinitely.
265
+ - **Help polish** — `pitch help` now mentions `pitch finalize` and the
266
+ `LLAMA_API_URL` env override.
267
+
268
+ ## [1.2.3] — 2026-05-08
269
+
270
+ ### Security
271
+ - **Removed a generic MCP tool that proxied arbitrary internal API paths.**
272
+ An unrestricted internal-API tool reachable from a prompt-injection-prone
273
+ agent context is the wrong shape for a public package. Power users keep
274
+ the `llama` CLI (40+ commands) for raw HTTP.
275
+
276
+ ### Changed
277
+ - Scrubbed example identifiers from deal-list snippets (both READMEs).
278
+ - `zod` is now a direct dependency (was resolving via transitive hoist;
279
+ would have broken under pnpm/yarn strict).
280
+ - MCP server reports the real package version in `serverInfo` (was
281
+ hardcoded `"1.0.0"`).
282
+
283
+ ### Fixed
284
+ - Operator-precedence bug in `bin/llama.mjs` token-set verify path that
285
+ could TypeError on rare error paths.
286
+ - `llama --version` / `-v` / `version` now print the package version
287
+ cleanly (exit 0).
288
+
289
+ ## [1.2.2] — 2026-05-07
290
+
291
+ ### Changed
292
+ - `llama pitch`: friendlier output for the upload + send paths (clearer quoting
293
+ hint, cleaner error surface).
294
+
295
+ ## [1.2.1] — 2026-05-07
296
+
297
+ ### Fixed
298
+ - CI publish: bump runner Node 20 → 24 so npm 11.5+ is available — the older
299
+ npm silently fails the OIDC handshake against npm Trusted Publishers and the
300
+ registry treats the request as anonymous (404 on `PUT`).
301
+
302
+ ## [1.2.0] — 2026-05-06
303
+
304
+ ### Added
305
+ - **External pitch family.** `llama pitch start | say | upload | status | end`
306
+ CLI commands plus 5 matching MCP tools (`pitch_start`, `pitch_send_message`,
307
+ `pitch_upload_file`, `pitch_status`, `pitch_finalize`). Talks to
308
+ `command.llamaventures.vc/external-agent` — no Llama token required, founder
309
+ / EA / external use.
310
+
311
+ ### Changed
312
+ - `agent_briefing` MCP prompt + `llama agent-onboard` CLI command now gate on
313
+ `/api/me`; unauthenticated callers see a short bootstrap stub instead of
314
+ the full workflow contract.
315
+
316
+ ## [1.1.0] — 2026-05-04
317
+
318
+ ### Added
319
+ - **`llama-mcp` stdio MCP server**, distributed in the same npm package.
320
+ Mirrors the most-used CLI surface as a set of named, typed tools.
321
+ Same auth chain, same error prefixes — CLI and MCP cannot drift.
322
+ - `llama agent-onboard` — re-prints the bundled `AGENT_BRIEFING.md` so any
323
+ agent that just installed the package can self-onboard.
324
+
325
+ ### Changed
326
+ - HTTP / auth / token helpers extracted into `lib/client.mjs` so CLI and MCP
327
+ share one implementation.
328
+
329
+ ## [1.0.1] — 2026-05-03
330
+
331
+ ### Fixed
332
+ - `package.json`: stripped the `./` prefix from `bin` paths — npm 10 was
333
+ silently dropping the binaries on global install for some setups.
334
+
335
+ ## [1.0.0] — 2026-05-03
336
+
337
+ ### Added
338
+ - Initial public release as `@llamaventures/cli` on npm.
339
+ - CLI surface: deals (CRUD + soft-delete + restore + trash), brief blocks
340
+ (text / link / embed / callout, edit, history, restore-version), ownership
341
+ (claim / nominate / approvals), timeline + posts, deal links, deal facts,
342
+ collaborators, mentions inbox, skill corrections, wiki search/save, admin
343
+ event feeds.
344
+ - Auth chain: `gcloud auth print-identity-token` → `$LLAMA_TOKEN` →
345
+ `~/.llama/token` → legacy `~/.llama-command/config.json` (auto-migrates
346
+ forward).
347
+ - Stable `Error[NO_AUTH]` and `Error[UNAUTHORIZED]` prefixes for agent pattern
348
+ matching.
349
+ - Supply chain: published via npm Trusted Publishers (OIDC), every release
350
+ signed with `--provenance`, CI matrix on Node 18 / 20 / 22.
351
+
352
+ ### Migrated from
353
+ - The previous `llama-os/cli/` directory distributed via `npm link`. Existing
354
+ team installs auto-upgrade on the next `bin/update-check` run; the legacy
355
+ directory is kept as a soft fallback for the soak window and will be removed
356
+ in a follow-up.
357
+
358
+ ---
359
+
360
+ [Unreleased]: https://github.com/Llama-Ventures/llama-cli/compare/v1.3.1...HEAD
361
+ [1.3.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.3.0...v1.3.1
362
+ [1.3.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.4...v1.3.0
363
+ [1.2.4]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.3...v1.2.4
364
+ [1.2.3]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.2...v1.2.3
365
+ [1.2.2]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.1...v1.2.2
366
+ [1.2.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.0...v1.2.1
367
+ [1.2.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.1.0...v1.2.0
368
+ [1.1.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.0.1...v1.1.0
369
+ [1.0.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.0.0...v1.0.1
370
+ [1.0.0]: https://github.com/Llama-Ventures/llama-cli/releases/tag/v1.0.0
@@ -0,0 +1,99 @@
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
+ ```
17
+
18
+ To test the CLI end-to-end against your own credentials, point it at the
19
+ in-source binary instead of the globally installed one:
20
+
21
+ ```bash
22
+ alias llama-dev="node $(pwd)/bin/llama.mjs"
23
+ llama-dev auth status
24
+ ```
25
+
26
+ To smoke-test the MCP server (no client needed):
27
+
28
+ ```bash
29
+ printf '%s\n' \
30
+ '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"dev","version":"1"}}}' \
31
+ '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
32
+ '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
33
+ | node bin/llama-mcp.mjs | head -200
34
+ ```
35
+
36
+ You should see 51 named tools, including `deal_enrich`, the 5 `pitch_*`, and
37
+ no generic API passthrough tool.
38
+
39
+ ## Conventions
40
+
41
+ - **Zero deps for the CLI.** `bin/llama.mjs` and `lib/client.mjs` use only Node
42
+ stdlib + native `fetch`. The MCP server may pull in
43
+ `@modelcontextprotocol/sdk`; nothing else.
44
+ - **One auth chain, one HTTP client.** Anything new that talks to
45
+ `command.llamaventures.vc` goes through `lib/client.mjs::request()`. Don't
46
+ spawn a parallel auth path; if you need a new credential type, add it to the
47
+ chain there.
48
+ - **Stable `Error[…]` prefixes.** `Error[NO_AUTH]` and `Error[UNAUTHORIZED]`
49
+ are part of the public contract — agents pattern-match on them. New error
50
+ classes need a new prefix; renaming an existing one is a major version bump.
51
+ - **CLI and MCP stay in lockstep.** Adding a new CLI command? Add the matching
52
+ MCP tool in the same PR. The MCP server exposes only named, typed tools — no
53
+ generic API passthrough — so every server endpoint that needs agent access
54
+ gets its own typed wrapper.
55
+ - **No bundler, no build step.** The CLI ships as `.mjs` files that npm copies
56
+ verbatim. `package.json::files` is the allowlist; CI re-verifies the tarball
57
+ contents on every PR.
58
+ - **`AGENT_BRIEFING.md` is content, not chrome.** It's the behavioural contract
59
+ for AI agents loading the package — terse, action-oriented, no fluff.
60
+ Changes to it are reviewed for substance, not formatting.
61
+
62
+ ## Submitting changes
63
+
64
+ 1. Branch off `main`. Branch names are casual; prefer `<type>/<short-slug>`
65
+ (e.g. `feat/pitch-rate-limit-message`, `fix/agent-onboard-redaction`).
66
+ 2. Run the smoke commands above. CI on PR runs the same matrix on Node
67
+ 18/20/22 plus a tarball-contents allowlist check.
68
+ 3. Open a PR. One commit per logical change is preferred but not enforced.
69
+ 4. Update [`CHANGELOG.md`](CHANGELOG.md) under `[Unreleased]` if the change
70
+ affects users (CLI / MCP surface, error format, auth, install).
71
+
72
+ ## Releasing
73
+
74
+ Releases are cut from `main` via a GitHub Release. The
75
+ `.github/workflows/publish.yml` workflow then publishes to npm via
76
+ [Trusted Publishers](https://docs.npmjs.com/trusted-publishers) — no
77
+ `NPM_TOKEN` exists in repo secrets.
78
+
79
+ To cut a release:
80
+
81
+ ```bash
82
+ # 1. Bump version + move CHANGELOG entries from [Unreleased] to the new tag
83
+ npm version <patch|minor|major> # commits + tags
84
+ git push origin main --tags
85
+
86
+ # 2. Open https://github.com/Llama-Ventures/llama-cli/releases/new
87
+ # Choose the tag, paste the CHANGELOG section, click "Publish release"
88
+ # → publish.yml fires, OIDC handshake → npm publish --provenance --access public
89
+ ```
90
+
91
+ The publish workflow asserts that `package.json::version` matches the release
92
+ tag (modulo a leading `v`). If they disagree, it fails fast — fix the
93
+ mismatch and re-cut the release.
94
+
95
+ ## Security
96
+
97
+ Don't file public issues for security bugs. Email
98
+ [gavin@llamaventures.vc](mailto:gavin@llamaventures.vc). Full policy:
99
+ [`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, 51 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,8 @@ 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> --executor external_agent --prompt
189
191
  llama deal delete <dealId> # soft (audit-logged)
190
192
  llama deal restore <dealId>
191
193
 
@@ -223,7 +225,7 @@ llama mentions
223
225
  llama mentions resolve <mentionId>
224
226
  ```
225
227
 
226
- Run `llama --help` for the full surface (~40 commands across deals, briefs,
228
+ Run `llama --help` for the full surface (50+ commands across deals, briefs,
227
229
  ownership, timeline, facts, wiki, mentions, skill corrections, and admin event
228
230
  feeds). Soft-delete is the default everywhere — every removal is reversible
229
231
  and audit-logged via `deal_events`.
@@ -245,30 +247,26 @@ agents can pattern-match without parsing prose.
245
247
  ## MCP server
246
248
 
247
249
  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
250
+ **51 typed tools** that mirror the most-used CLI surface. Every tool is named
249
251
  and scoped — there is no generic API passthrough, by design (a public-package
250
252
  escape hatch reachable from a prompt-injectable agent context is exactly the
251
253
  shape we want to avoid).
252
254
 
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
255
+ Coverage is grouped around the workflows agents actually need: auth
256
+ diagnostics; deal search/show/create/update/feed; deal enrichment harnesses;
257
+ trust-rated facts; brief blocks and version history; wiki read/write/delete/restore;
258
+ timeline posts and mentions; skill corrections; refresh triggers; external pitch intake;
259
+ memo show/regenerate/save/reset; and deal-scoped HTML docs, versions, bundles, and
260
+ restore/reset.
261
261
 
262
- timeline post
262
+ For the exact live list, smoke-test the server with `tools/list`:
263
263
 
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
264
+ ```bash
265
+ printf '%s\n' \
266
+ '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"dev","version":"1"}}}' \
267
+ '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
268
+ '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
269
+ | llama-mcp
272
270
  ```
273
271
 
274
272
  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,51 个工具
52
52
  ```
53
53
 
54
54
  两个 binary 共享 `lib/client.mjs`——**同一**认证链、**同一** HTTP 客户端、
@@ -207,6 +207,8 @@ 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> --executor external_agent --prompt
210
212
  llama deal delete <dealId> # 软删除(审计日志记录)
211
213
  llama deal restore <dealId>
212
214
 
@@ -237,7 +239,7 @@ llama mentions
237
239
  llama mentions resolve <mentionId>
238
240
  ```
239
241
 
240
- 跑 `llama --help` 看完整命令清单(约 40 个命令,覆盖 deals、briefs、ownership、
242
+ 跑 `llama --help` 看完整命令清单(50+ 个命令,覆盖 deals、briefs、ownership、
241
243
  timeline、facts、wiki、mentions、skill corrections、admin event feeds)。
242
244
  所有删除默认软删除——可恢复,且通过 `deal_events` 留下审计痕迹。
243
245
 
@@ -257,28 +259,24 @@ MCP server 在 `isError: true` 内容里返回相同的前缀,agent 不用解
257
259
  ## MCP server
258
260
 
259
261
  随包发布的 `llama-mcp` 是一个 **stdio Model Context Protocol** server,
260
- 暴露 **19 个 typed tools**——基本镜像 CLI 最常用的命令。每个 tool 都是
262
+ 暴露 **51 个 typed tools**——基本镜像 CLI 最常用的命令。每个 tool 都是
261
263
  具名、scoped 的;**没有**通用的 API passthrough,这是有意设计的(公开
262
264
  package 里一个能被 prompt-injection 触达的逃生通道,正是我们要避开的形状)。
263
265
 
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
266
+ 覆盖面按 agent 真正会用的工作流分组:auth 诊断;deal search/show/create/
267
+ update/feed;deal enrichment harness;带 trust ladder 的事实;brief blocks
268
+ 和版本历史;wiki 读写删恢复;timeline posts 和 mentions;skill corrections;
269
+ refresh triggers;外部 pitch intake;memo show/regenerate/save/reset;
270
+ 以及 deal-scoped HTML docs、versions、bundles、restore/reset。
272
271
 
273
- timeline post
272
+ 精确的 live list 以 `tools/list` 为准:
274
273
 
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
274
+ ```bash
275
+ printf '%s\n' \
276
+ '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"dev","version":"1"}}}' \
277
+ '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
278
+ '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
279
+ | llama-mcp
282
280
  ```
283
281
 
284
282
  认证链跟 CLI 完全一样(gcloud → `$LLAMA_TOKEN` → `~/.llama/token`)。
package/SECURITY.md ADDED
@@ -0,0 +1,62 @@
1
+ # Security Policy
2
+
3
+ ## Reporting security issues
4
+
5
+ **Do not file public GitHub issues for security bugs.** A public issue
6
+ gives an attacker a head-start before we can patch.
7
+
8
+ Instead, email [**gavin@llamaventures.vc**](mailto:gavin@llamaventures.vc)
9
+ with:
10
+
11
+ - A short description of the issue
12
+ - Steps to reproduce
13
+ - Expected vs. actual behavior
14
+ - The CLI version (`npm ls -g @llamaventures/cli`)
15
+ - Any other context that helps us reproduce
16
+
17
+ We aim to acknowledge within ~5 push cycles (best effort), patch
18
+ promptly, and credit the reporter (if desired) once the fix ships.
19
+ We do not run a public bug bounty program.
20
+
21
+ ## Scope
22
+
23
+ In scope:
24
+
25
+ - Authentication / authorization bypass in the CLI client
26
+ - Token handling vulnerabilities (logging, transmission, storage)
27
+ - Supply-chain attacks against the npm package or its dependencies
28
+ - Anything that lets an unauthorized party execute Llama Command
29
+ operations as another team member
30
+
31
+ Out of scope (still report; lower urgency):
32
+
33
+ - Bugs in third-party services we depend on (Google Cloud, npm,
34
+ Anthropic, etc.)
35
+ - Issues only reproducible against a fork or a modified version of
36
+ this CLI
37
+
38
+ Server-side bugs (`command.llamaventures.vc`) are governed separately;
39
+ report through the same channel.
40
+
41
+ ## Supply-chain posture
42
+
43
+ This package follows current best practice:
44
+
45
+ - **`@llamaventures/cli` is published via npm
46
+ [Trusted Publishers](https://docs.npmjs.com/trusted-publishers)** —
47
+ no `NPM_TOKEN` is stored in CI secrets; the GitHub Action exchanges
48
+ an OIDC token at publish time.
49
+ - **All releases ship with `--provenance`** (sigstore-signed). The
50
+ npm registry shows a "Provenance" badge on each version, traceable
51
+ to the exact commit + GitHub Action workflow that built it.
52
+ - **Minimal dependency tree.** The CLI itself is zero-deps; the
53
+ bundled MCP server depends only on
54
+ `@modelcontextprotocol/sdk` (Anthropic-maintained, pinned exact).
55
+ - **Branch protection** on `main` prevents force-push and deletion;
56
+ Dependabot, secret scanning, and push-protection are enabled.
57
+
58
+ ## Disclosure
59
+
60
+ We coordinate disclosure when a fix lands. Once a patched version
61
+ ships, we publish a security advisory on this repo and notify
62
+ affected users via the team's internal channels.
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 224 76.32">
3
+ <g>
4
+ <g>
5
+ <path d="M69.84,26.89h7.64v4.53h-13.48V7.33h5.84v19.56Z"/>
6
+ <path d="M86.13,7.33v24.04h-5.7V7.33h5.7Z"/>
7
+ <path d="M90.96,16.53c.74-1.5,1.76-2.65,3.04-3.45,1.28-.81,2.72-1.21,4.3-1.21,1.35,0,2.54.28,3.56.83s1.81,1.28,2.36,2.17v-2.73h5.88v19.26h-5.88v-2.73c-.57.9-1.37,1.62-2.39,2.17-1.02.55-2.21.83-3.56.83-1.56,0-2.98-.41-4.27-1.22-1.29-.82-2.3-1.98-3.04-3.49-.75-1.51-1.12-3.25-1.12-5.23s.37-3.72,1.12-5.21ZM103,18.29c-.81-.85-1.81-1.28-2.97-1.28s-2.16.42-2.98,1.26c-.81.84-1.22,2-1.22,3.47s.41,2.64,1.22,3.51c.81.86,1.81,1.29,2.98,1.29s2.16-.42,2.97-1.28c.81-.85,1.22-2.01,1.22-3.49s-.41-2.64-1.22-3.49Z"/>
8
+ <path d="M143.78,14.24c1.4,1.44,2.1,3.44,2.1,6v11.18h-5.82v-10.39c0-1.24-.32-2.19-.97-2.86-.65-.68-1.54-1.01-2.68-1.01s-2.04.34-2.68,1.01c-.65.67-.97,1.63-.97,2.86v10.39h-5.82v-10.39c0-1.24-.32-2.19-.97-2.86-.65-.68-1.54-1.01-2.68-1.01s-2.03.34-2.68,1.01c-.65.67-.98,1.63-.98,2.86v10.39h-5.85V12.28h5.85v2.4c.59-.8,1.37-1.43,2.33-1.9.96-.47,2.04-.7,3.25-.7,1.44,0,2.72.31,3.85.92,1.13.62,2.01,1.5,2.65,2.64.66-1.05,1.56-1.91,2.7-2.57,1.14-.66,2.38-.99,3.72-.99,2.37,0,4.26.72,5.66,2.16Z"/>
9
+ <path d="M149.87,16.6c.74-1.49,1.75-2.63,3.03-3.44s2.71-1.2,4.28-1.2c1.35,0,2.53.27,3.55.82,1.01.55,1.8,1.27,2.34,2.16v-2.72h5.86v19.17h-5.86v-2.72c-.57.89-1.36,1.62-2.38,2.16-1.01.55-2.2.82-3.54.82-1.56,0-2.97-.41-4.25-1.22s-2.29-1.97-3.03-3.47c-.74-1.5-1.11-3.24-1.11-5.21s.37-3.7,1.11-5.19ZM161.86,18.36c-.81-.85-1.8-1.27-2.96-1.27s-2.15.42-2.96,1.25c-.81.84-1.22,1.99-1.22,3.45s.41,2.63,1.22,3.49c.81.86,1.8,1.29,2.96,1.29s2.15-.42,2.96-1.27,1.22-2,1.22-3.47-.4-2.62-1.22-3.47Z"/>
10
+ </g>
11
+ <g>
12
+ <path d="M88.31,42.57l-8.62,24.05-7.19-.14-8.5-23.91h6.3l5.57,17.41,6.27-17.41h6.17Z"/>
13
+ <path d="M106.78,57.98l-13.12.07c.09,1.16.46,2.04,1.12,2.65.66.61,1.46.92,2.42.92,1.42,0,2.41-.6,2.97-1.8h6.17c-.31,1.21-.86,2.45-1.67,3.42-.81.98-1.87,1.77-3.09,2.33s-2.73.9-4.24.9c-1.82,0-3.79-.59-5.21-1.37-1.42-.78-2.42-2.01-3.22-3.45-.8-1.44-1.2-3.11-1.2-5.04s.58-4,1.37-5.45c.79-1.45,2.09-2.48,3.51-3.26,1.42-.78,3.21-1.15,5.06-1.15s3.43.55,4.83,1.31c1.4.75,2.56,2.1,3.35,3.5s1.07,2.89,1.07,4.76c0,.53-.03,1.09-.1,1.67ZM100.83,54.89c0-.98-.33-1.76-1-2.33-.67-.58-1.5-.87-2.5-.87s-1.76.28-2.42.84c-.66.56-1.06,1.34-1.22,2.37h7.13Z"/>
14
+ <path d="M126.7,49.22c1.3,1.41,2.3,3.49,2.3,5.96v11.44h-5.78s-.04-10.69-.04-10.69c0-1.25-.49-2.07-1.13-2.76-.65-.69-1.54-1.06-2.81-1-1.09.05-1.89.57-2.54,1.26s-.91,1.61-.91,2.86v10.32h-5.79v-19.13h5.79v2.47c.58-.82,1.17-1.47,2.15-1.95.98-.48,2.08-.72,3.3-.72,2.18,0,4.17.53,5.47,1.94Z"/>
15
+ <path d="M143.61,61.6v5.02h-2.9c-2.06,0-4.1-.8-5.25-1.81-1.16-1.01-1.43-3.02-1.43-5.31v-7.1s-2.39,0-2.39,0v-4.91h2.39v-4.66s5.79,0,5.79,0v4.66h3.79v4.91h-3.78v7.2c0,.56.15,1.41.41,1.65.27.24.71.37,1.33.37h2.03Z"/>
16
+ <path d="M165.77,47.34v19.01h-5.79l-.03-2.74c-.58.82-1.77,1.75-2.76,2.25-.99.5-2.08.75-3.28.75-1.42,0-2.68-.32-3.77-.95-1.09-.63-1.88-2.02-2.48-3.21-.6-1.2-.9-2.61-.9-4.24v-10.87h5.67v10.1c0,1.24.32,2.21.97,2.9.64.69,1.51,1.03,2.6,1.03s1.99-.34,2.63-1.03c.64-.69.97-1.66.97-2.9v-10.1h6.17Z"/>
17
+ <path d="M178.26,48.17c1-.59,2.41-.82,3.64-.82v6.17h-1.85c-1.42,0-2.38.33-3.09.94-.71.61-1.11,1.55-1.11,3.09v9.06h-5.79v-19.13h5.7v3.1c.67-1.02,1.5-1.83,2.5-2.42Z"/>
18
+ <path d="M202.59,58.03h-13.25c.09,1.19.47,2.09,1.15,2.71.67.63,1.5.94,2.48.94,1.46,0,2.47-.61,3.05-1.84h6.23c-.32,1.25-.9,2.38-1.73,3.38-.83,1-1.88,1.79-3.13,2.36-1.26.57-2.66.85-4.21.85-1.87,0-3.54-.4-5-1.19-1.46-.79-2.6-1.93-3.42-3.41-.82-1.48-1.23-3.21-1.23-5.19s.4-3.71,1.21-5.19c.81-1.48,1.95-2.62,3.41-3.41,1.46-.8,3.14-1.19,5.03-1.19s3.49.39,4.93,1.16c1.44.77,2.56,1.88,3.37,3.31s1.21,3.11,1.21,5.02c0,.55-.03,1.12-.1,1.71ZM196.7,54.79c0-1-.34-1.8-1.03-2.39-.68-.59-1.54-.89-2.57-.89s-1.81.29-2.48.86c-.67.57-1.09,1.37-1.25,2.42h7.33Z"/>
19
+ <path d="M106.77,58.03h-13.25c.09,1.19.47,2.09,1.15,2.71.67.63,1.5.94,2.48.94,1.46,0,2.47-.61,3.05-1.84h6.23c-.32,1.25-.9,2.38-1.73,3.38-.83,1-1.88,1.79-3.13,2.36-1.26.57-2.66.85-4.21.85-1.87,0-3.54-.4-5-1.19-1.46-.79-2.6-1.93-3.42-3.41-.82-1.48-1.23-3.21-1.23-5.19s.4-3.71,1.21-5.19c.81-1.48,1.95-2.62,3.41-3.41,1.46-.8,3.14-1.19,5.03-1.19s3.49.39,4.93,1.16c1.44.77,2.56,1.88,3.37,3.31s1.21,3.11,1.21,5.02c0,.55-.03,1.12-.1,1.71ZM100.88,54.79c0-1-.34-1.8-1.03-2.39-.68-.59-1.54-.89-2.57-.89s-1.81.29-2.48.86c-.67.57-1.09,1.37-1.25,2.42h7.33Z"/>
20
+ <path d="M209.1,65.57c-1.28-.57-2.29-1.35-3.03-2.35-.74-.99-1.15-2.11-1.24-3.34h5.68c.07.66.37,1.2.91,1.61.54.41,1.2.62,1.98.62.72,0,1.27-.14,1.66-.43.39-.28.59-.66.59-1.11,0-.55-.28-.95-.84-1.22-.56-.26-1.47-.56-2.72-.88-1.34-.32-2.47-.66-3.36-1.01-.9-.35-1.67-.92-2.32-1.68-.65-.76-.98-1.8-.98-3.1,0-1.1.3-2.1.89-3,.59-.9,1.47-1.62,2.62-2.14,1.15-.53,2.53-.79,4.12-.79,2.35,0,4.21.59,5.56,1.78,1.36,1.19,2.14,2.77,2.34,4.73h-5.31c-.09-.66-.37-1.19-.86-1.58-.48-.39-1.12-.58-1.9-.58-.67,0-1.19.13-1.55.39s-.54.62-.54,1.08c0,.55.29.96.86,1.23.57.28,1.46.55,2.67.82,1.39.37,2.52.73,3.4,1.08.87.35,1.64.93,2.3,1.72.66.79,1,1.84,1.02,3.17,0,1.12-.31,2.12-.92,3-.62.88-1.5,1.57-2.65,2.07-1.15.5-2.5.75-4.02.75-1.64,0-3.09-.28-4.37-.86Z"/>
21
+ </g>
22
+ </g>
23
+ <path d="M48.7,50.5c3.49.32,6.76,2.94,8.15,6.08,3.09,6.98-1.33,14.02-8.65,15.07-9.08-.47-18.69.74-27.71.12-6.65-.46-10.81-5.53-10.25-12.13l6.28-25.63c-2.05-.02-4.19-.55-6.11-1.26-2.04-.75-4.19-1.79-5.33-3.74-3.04-5.19,1.25-9.8,5.21-12.75-1.81-4.39,2.75-6.87,6.59-6.06.9-3.1,4.51-4.16,7.01-2.12.61.5,1.37,2.23,2.32,1.05.83-1.03,1.11-3.35,1.02-4.64-.06-.81-.79-2.28.57-2.34.91-.04,2.41,1.95,2.85,2.69,1.48,2.49,1.77,5.72.61,8.39,2.83-.4,5.16-1.93,6.73-4.29.48-.72.81-2.17,1.87-1.85.59.18.96,2.01,1.06,2.59.65,3.9-1.25,7.48-4.51,9.55.65,2.66,1.28,5.32,1.63,8.05.99,7.74.41,15.67-1.62,23.2h12.28v.02ZM26.67,18.33c-4.94-4.2-11.7-1.55-15.83,2.4-.27.26-1.14,1.11-1.26,1.39-.09.21.08.17.16.21.66.39,1.73.61,2.01,1.39.47,1.33-.45,2.61-1.85,2.49-.42-.04-1.91-.89-2.08-.76.18,1.93,1.71,2.95,3.37,3.62,3.11,1.24,6.67,1.29,9.98,1.09l.26.14-3.65,14.92c10.85-2.11,18.01-19.14,8.89-26.88h0Z"/>
24
+ <path d="M23.15,21.22c1.95,1.35-.13,4.72-2.34,3.28s-.04-4.95,2.34-3.28Z"/>
25
+ </svg>
package/bin/llama-mcp.mjs CHANGED
@@ -786,6 +786,52 @@ server.registerTool(
786
786
  callApi("POST", `/api/deals/${encodeURIComponent(dealId)}/refresh-persona`, { persona })
787
787
  );
788
788
 
789
+ server.registerTool(
790
+ "deal_enrich",
791
+ {
792
+ description:
793
+ "Run the Llama Command deal enrichment planner/trigger for one deal. " +
794
+ "Default is dry-run: returns evidence plan, source plan, Monid budget/config " +
795
+ "status, and planned writes without changing facts/links/memo. Set apply=true " +
796
+ "only when the user explicitly wants the enrichment run recorded/applied. " +
797
+ "generateMemo never defaults on; pass true only when the user explicitly asks " +
798
+ "for Memo generation after enrichment.",
799
+ inputSchema: {
800
+ dealId: z.string().describe("deal uuid"),
801
+ dryRun: z.boolean().optional().describe("default true unless apply=true"),
802
+ apply: z.boolean().optional().describe("record/apply the enrichment intent server-side"),
803
+ executor: z
804
+ .enum(["server_agent", "external_agent", "planner"])
805
+ .optional()
806
+ .describe("who will execute the harness; external_agent returns guardrails for a user-owned agent"),
807
+ sources: z
808
+ .array(z.enum(["website", "github", "linkedin", "yc", "launch", "web", "monid"]))
809
+ .optional()
810
+ .describe("source families to use; defaults to the standard enrichment set"),
811
+ budgetCents: z
812
+ .number()
813
+ .int()
814
+ .min(0)
815
+ .max(500)
816
+ .optional()
817
+ .describe("Monid spend cap for this run, in cents; default is 50 when Monid is requested"),
818
+ generateMemo: z
819
+ .boolean()
820
+ .optional()
821
+ .describe("explicitly request memo regeneration after enrichment; default false"),
822
+ },
823
+ },
824
+ async ({ dealId, dryRun, apply, executor, sources, budgetCents, generateMemo }) =>
825
+ callApi("POST", `/api/deals/${encodeURIComponent(dealId)}/enrich`, {
826
+ dryRun,
827
+ apply,
828
+ executor,
829
+ sources,
830
+ budgetCents,
831
+ generateMemo,
832
+ })
833
+ );
834
+
789
835
  // ============================================================
790
836
  // External pitch (founder intake) — no Llama Command token required
791
837
  // ============================================================
package/bin/llama.mjs CHANGED
@@ -235,6 +235,9 @@ Deals:
235
235
  llama deal update <dealId> sector "Developer Tools"
236
236
  llama deal update <dealId> foundedYear 2024
237
237
  llama deal update <dealId> leadInvestor "Acme Capital"
238
+ llama deal enrich <dealId> [--dry-run] [--apply] [--executor server_agent|external_agent|planner]
239
+ [--sources website,github,linkedin,yc,monid] [--budget-cents 50]
240
+ [--memo] [--prompt] # evidence harness + server-side enrichment trigger
238
241
  llama deal extra set <dealId> <key> <value> # system-admin only
239
242
  Patch one top-level key in deals.extra JSONB. Value is parsed as
240
243
  JSON when possible ('{"a":1}', 'true', '3'), else stored as a
@@ -439,7 +442,7 @@ Common:
439
442
  llama agent-onboard print the AI-agent workflow contract
440
443
 
441
444
  Command groups — run \`llama help <group>\` for that group's commands:
442
- deal create · show · feed · update · search · collaborators · links · delete
445
+ deal create · show · feed · update · enrich · search · collaborators · links · delete
443
446
  brief brief blocks: list · add · edit · history · refresh
444
447
  facts deal facts + skill corrections (the sourced, trust-rated layer)
445
448
  timeline timeline · posts · mentions
@@ -1157,6 +1160,62 @@ https://command.llamaventures.vc/settings/tokens, run
1157
1160
  return;
1158
1161
  }
1159
1162
 
1163
+ // ----- Deal enrichment: evidence plan + server-side enrichment trigger -----
1164
+ // The server owns Monid credentials and all write/audit behavior. CLI only
1165
+ // passes intent; default is dry-run so agents can inspect the harness before
1166
+ // creating facts/links or touching memo state.
1167
+ if (area === "deal" && action === "enrich") {
1168
+ const dealId = rest[0];
1169
+ if (!dealId) {
1170
+ throw new Error(
1171
+ "Usage: llama deal enrich <dealId> [--dry-run] [--apply] " +
1172
+ "[--executor server_agent|external_agent|planner] " +
1173
+ "[--sources website,github,linkedin,yc,monid] [--budget-cents 50] [--memo] [--prompt]"
1174
+ );
1175
+ }
1176
+ const { flags } = parseFlags(rest.slice(1), [
1177
+ "dry-run",
1178
+ "apply",
1179
+ "executor",
1180
+ "sources",
1181
+ "budget-cents",
1182
+ "memo",
1183
+ "generate-memo",
1184
+ "prompt",
1185
+ "handoff",
1186
+ ]);
1187
+ const sources =
1188
+ flags.sources && flags.sources !== true
1189
+ ? String(flags.sources)
1190
+ .split(",")
1191
+ .map((s) => s.trim())
1192
+ .filter(Boolean)
1193
+ : undefined;
1194
+ const budgetCents =
1195
+ flags["budget-cents"] !== undefined && flags["budget-cents"] !== true
1196
+ ? Number(flags["budget-cents"])
1197
+ : undefined;
1198
+
1199
+ const result = await request(
1200
+ "POST",
1201
+ `/api/deals/${encodeURIComponent(dealId)}/enrich`,
1202
+ {
1203
+ dryRun: flags.apply === true ? false : true,
1204
+ apply: flags.apply === true,
1205
+ executor: flags.executor && flags.executor !== true ? String(flags.executor) : undefined,
1206
+ sources,
1207
+ budgetCents,
1208
+ generateMemo: flags.memo === true || flags["generate-memo"] === true,
1209
+ }
1210
+ );
1211
+ if (flags.prompt === true || flags.handoff === true) {
1212
+ print(result?.agentHarness?.handoffPrompt || result?.agentHarness?.systemInjection || "");
1213
+ } else {
1214
+ print(result);
1215
+ }
1216
+ return;
1217
+ }
1218
+
1160
1219
  // ----- Collaborators (deal team — non-owner contributors) -----
1161
1220
  // Accepts --user as numeric id OR @llamaventures.vc email; emails are
1162
1221
  // resolved to id via /api/users so the CLI matches how the web picker
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llamaventures/cli",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "CLI + MCP server for the Llama Ventures investment workbench (command.llamaventures.vc).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,10 +8,15 @@
8
8
  "llama-mcp": "bin/llama-mcp.mjs"
9
9
  },
10
10
  "files": [
11
+ "assets/",
11
12
  "bin/",
12
13
  "lib/",
13
14
  "AGENT_BRIEFING.md",
15
+ "CHANGELOG.md",
16
+ "CONTRIBUTING.md",
14
17
  "README.md",
18
+ "README.zh-CN.md",
19
+ "SECURITY.md",
15
20
  "LICENSE"
16
21
  ],
17
22
  "engines": {