@llamaventures/cli 1.15.1 → 1.17.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_BRIEFING.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Llama Ventures Agent Briefing
2
2
 
3
- You've been onboarded as a teammate of [Llama Ventures](https://llamaventures.vc) via the `@llamaventures/cli` package. This briefing is your behavioural contract read it once, internalise it, and operate accordingly. The user shouldn't have to explain any of this to you again.
3
+ You've been onboarded as a teammate of [Llama Ventures](https://llamaventures.vc) via the `@llamaventures/cli` package. This bundled briefing is a fallback copy of the behavioural contract. When authenticated, prefer the server-owned contract from `llama agent-onboard`, `llama agent bootstrap`, or MCP `agent_briefing`; read it once, internalise it, and operate accordingly. The user shouldn't have to explain any of this to you again.
4
4
 
5
5
  You are not just an AI assistant. You're an **extension of a team member** — with CLI access to the Llama Command pipeline, write permission on shared data, and audit-log responsibility. Treat the status seriously.
6
6
 
@@ -25,6 +25,7 @@ Most teammates don't know everything this CLI can do. Part of your job is to sur
25
25
  This npm package is public, but Llama OS skills are private. Do not assume the skill text is bundled locally. For team-token sessions, discover the live runtime library through Llama Command:
26
26
 
27
27
  - Start with `llama agent bootstrap` or MCP `agent_bootstrap` when you need the current Command + Llama OS contract.
28
+ - Use `llama agent-onboard` or MCP `agent_briefing` for the server-owned Agent Runtime Contract. The npm-bundled text is fallback only.
28
29
  - Use `llama skills search "<task>"` or MCP `skills_search` before choosing a Llama workflow.
29
30
  - Use `llama skills show <slug>` or MCP `skills_read` only for the relevant skill.
30
31
  - Use `llama explain <command-url-or-object>` or MCP `object_inspect` for 404s, deleted wiki pages, notifier links, deal URLs, and unknown Command objects before telling the user "the system is broken."
@@ -81,9 +82,9 @@ HTML / thesis / artifact in hand
81
82
  └──────────────┬──────────────────────────────────┘
82
83
 
83
84
  yes ────►│ → Llama Command DEAL page
84
- │ `llama html upload <dealId> --new --title "..." --file <path>`
85
+ │ `llama html publish <deal-id-or-name> --file <path> --title "..."`
85
86
  │ Renders at /deals/<id>/browse/<slug>.
86
- │ Use --doc <slug> + --file to update an existing one.
87
+ │ Use --doc <slug> or --update when updating an existing one.
87
88
 
88
89
  no ────►│ Is it cross-deal / institutional knowledge?
89
90
  │ (sector landscape · market map · framework · firm-level
@@ -137,7 +138,7 @@ The table below details the exact CLI for each destination.
137
138
  |---|---|---|
138
139
  | Deal metadata (status, stage, valuation, founders, notes, etc.) | Pipeline (Postgres) | `llama deal create` / `llama deal update` |
139
140
  | Brief blocks (text / link / embed / callout) | Pipeline | `llama brief add-text` / `add-link` / `add-callout` |
140
- | **HTML artifact, internal — IC report, dashboard, market map, 2×2, any hand-authored page** | **Llama Command native** (Postgres + sandboxed iframe at `/deals/<id>/browse/<slug>`) | Default path when the user says "deploy to llama", "deploy to llama command", "部署到 llama command", "put this HTML on the deal page", "在 deal 里看这个". **You MUST declare intent — "new artifact" vs "update existing":**<br><br>**New artifact:** `llama html upload <dealId> --new --title "<artifact name>" --file <path>` (CLI slugifies the title; pass `--doc <slug>` to override).<br>**Update existing:** `llama html upload <dealId> --doc <slug> --file <path>` (slug must already exist — run `llama html docs <dealId>` first to see what's there).<br><br>The bare form `llama html upload <id> --file <path>` REFUSES if `main` already has content. Do NOT default to Netlify for internal pages. |
141
+ | **HTML artifact, internal — IC report, dashboard, market map, 2×2, any hand-authored page** | **Llama Command native** (Postgres + sandboxed iframe at `/deals/<id>/browse/<slug>`) | Default path when the user says "deploy to llama", "deploy to llama command", "部署到 llama command", "put this HTML on the deal page", "在 deal 里看这个". **Preferred agent-safe path:** `llama html publish <deal-id-or-name> --file <path> --title "<artifact name>" [--doc <slug>]`. It resolves deal names, avoids silent overwrite, auto-detects sibling asset folders, uploads, then verifies by reading the version back.<br><br>Low-level explicit path remains available: new artifact `llama html upload <dealId> --new --title "<artifact name>" --file <path>`; update existing `llama html upload <dealId> --doc <slug> --file <path>`.<br><br>Never paste large HTML into chat or MCP tool arguments. Use file paths. Do NOT default to Netlify for internal pages. |
141
142
  | HTML artifact, external — founder-facing share link | Netlify | Only when the user explicitly says "share link", "give it to the founder", "publish publicly". Use the `netlify-access-guard` workflow (server-side password + edge 401 verification). |
142
143
  | Insights, decisions, framework improvements | Wiki (markdown) | `llama wiki save <slug> --content "..."` (with attribution — see below) |
143
144
  | **HTML wiki entry — standalone HTML page hosted at `/wiki/<slug>`** (sector landscape, market map, dashboard, hand-styled thesis page) | **Wiki (HTML)** | `llama wiki save <slug> --title "..." --file <path.html> --sources "..."`. Auto-detects content_type=html from extension. Public page is full-viewport sandboxed iframe takeover (no wiki chrome). Sources/status/title still required; appears in `wiki search` + backlinks. Use when the user says "deploy this HTML to wiki", "wiki 词条", "make this page a wiki entry". HTML must be self-contained (inline CSS/JS, image data URIs or external URLs) — asset bundles aren't supported on wiki yet. **Native comments + working in-page (#) anchor links are injected automatically** — readers discuss inline and the table of contents scrolls; you don't wire anything up (pages that already embed the comment widget are left as-is). |
@@ -228,6 +229,10 @@ llama brief add-callout <dealId> --tone insight|warning|info|success --heading "
228
229
  # Default path when user says "deploy to llama / 部署到 llama command / put this HTML on the deal page".
229
230
  # Each deal can host many slug-scoped artifacts. ALWAYS declare intent: new vs update.
230
231
 
232
+ # Agent-safe default: pass a file path, not inline HTML.
233
+ llama html publish "<deal name or id>" --file ./report.html --title "Consumer-Facing Thesis"
234
+ llama html publish "<deal name or id>" --file ./report.html --doc thesis --update
235
+
231
236
  llama html docs <dealId> # list slugs currently on this deal
232
237
  llama html docs create <dealId> <slug> [--title "..."] # pre-create a slot (optional; upload --new also creates)
233
238
  llama html docs archive <dealId> <slug> # soft-archive a doc
@@ -246,6 +251,11 @@ llama html restore <dealId> <version> [--doc <slug>] # promo
246
251
  llama html reset <dealId> [--doc <slug>] # soft-delete latest (browse reverts to empty)
247
252
 
248
253
  # Safety contract (since 1.5.0):
254
+ # - Coding agents should use `llama html publish ... --file <path>` for memos/reports.
255
+ # Do not move large HTML through chat text or MCP `html_upload` string args.
256
+ # - Successful uploads return `sha256` and `client_upload_id`; verification
257
+ # reads the server copy back and compares version/bytes/sha256 when available.
258
+ # If a network retry is needed for the same attempt, reuse `--upload-id`.
249
259
  # - Bare `llama html upload <id> --file X` REFUSES if 'main' already has content.
250
260
  # The error names the existing artifact and suggests --doc main / --new --title "...".
251
261
  # - --slug is silently accepted as an alias for --doc (agent-confusion mitigation).
@@ -337,9 +347,9 @@ the intake agent; relay the conversation, then surface the verdict.
337
347
 
338
348
  ## Where this content lives
339
349
 
340
- - This file: `AGENT_BRIEFING.md` in the `@llamaventures/cli` npm package
341
- - Re-printable any time: `llama agent-onboard`
342
- - MCP prompt: `agent_briefing` from the `llama-mcp` server
350
+ - Canonical when authenticated: `GET /api/agent/briefing` via `llama agent-onboard` or MCP `agent_briefing`
351
+ - Runtime home screen: `GET /api/agent/manifest` via `llama agent bootstrap` or MCP `agent_bootstrap`
352
+ - Fallback copy: `AGENT_BRIEFING.md` in the `@llamaventures/cli` npm package
343
353
  - Public source: <https://github.com/Llama-Ventures/llama-cli/blob/main/AGENT_BRIEFING.md>
344
354
 
345
355
  You're now a Llama Ventures teammate (or an external agent helping a
package/CHANGELOG.md CHANGED
@@ -6,6 +6,61 @@ this project adheres to [Semantic Versioning](https://semver.org).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.17.0] - 2026-06-23
10
+
11
+ ### Added
12
+ - **`llama html publish <deal-id-or-name> --file <path>`** — agent-safe
13
+ HTML artifact publishing for deal pages. It resolves deal names, preflights
14
+ file size/HTML shape, chooses a non-overwriting slug by default, auto-detects
15
+ sibling `*_files` asset folders, uploads, and performs read-after-write
16
+ verification before returning the viewer URL.
17
+ - **`html_upload_file` MCP tool** — file-path based HTML upload for MCP-native
18
+ agents, including preflight checks, optional asset-folder upload, and
19
+ read-after-write verification.
20
+
21
+ ### Changed
22
+ - HTML publishing now sends a per-attempt `client_upload_id` and verifies the
23
+ server copy by `sha256` when Command returns it. Retrying the same failed
24
+ attempt with `--upload-id` avoids duplicate versions. JSON and multipart
25
+ uploads also send the same id as `X-Llama-Upload-Id` so server logs and
26
+ retry/debug paths can correlate the attempt.
27
+ - MCP `html_upload` now refuses inline HTML bodies over 50KB and instructs
28
+ agents to use `html_upload_file` or `llama html publish --file`. This avoids
29
+ moving large memos through model/tool-call context, the main reliability
30
+ failure mode for long IC memos.
31
+ - MCP `html_upload_bundle` is now treated as a small inline fallback and refuses
32
+ tool-call payloads over 50KB. Agents should use `html_upload_file` with
33
+ `assetsDir` or `llama html publish --file --assets` for saved-page exports.
34
+ - `AGENT_BRIEFING.md` now teaches coding agents to use file-path based HTML
35
+ publishing as the default Llama Command route.
36
+ - Top-level CLI help now routes deal-specific HTML artifacts to `llama html
37
+ publish --file` instead of the lower-level upload command.
38
+ - Local-agent telemetry now redacts content payload fields such as `html`,
39
+ `body`, `content`, `markdown`, `message`, and `text`, keeping only
40
+ chars/bytes/sha256. Incident-sized memo uploads remain observable without
41
+ storing memo text in the telemetry stream.
42
+
43
+ ## [1.16.0] - 2026-06-22
44
+
45
+ ### Added
46
+ - CLI and MCP requests now send bounded local-agent telemetry metadata to
47
+ Llama Command: client kind/version, detected agent client, session id,
48
+ normalized command, latency, status, sanitized args, result ids, and bounded
49
+ result summaries.
50
+ - `llama eval good|bad --last` and `llama eval add "<query>" --expect ...`
51
+ let agents and humans turn real search usage into Golden Query Eval
52
+ feedback.
53
+ - MCP tool `record_eval_feedback` mirrors the CLI eval feedback path for
54
+ MCP-native agents.
55
+
56
+ ### Changed
57
+ - `llama agent-onboard` and MCP `agent_briefing` now prefer the authenticated
58
+ Llama Command `/api/agent/briefing` runtime contract, with bundled
59
+ `AGENT_BRIEFING.md` retained as fallback only.
60
+ - `llama agent bootstrap` and MCP `agent_bootstrap` now pass the local CLI
61
+ version to Command so the server can return stale/ok CLI guidance as part of
62
+ the agent contract.
63
+
9
64
  ## [1.15.1] — 2026-06-16
10
65
 
11
66
  ### Changed
@@ -402,7 +457,21 @@ assistant-drafted (🤖) and enforces the AI trust ceiling.
402
457
 
403
458
  ---
404
459
 
405
- [Unreleased]: https://github.com/Llama-Ventures/llama-cli/compare/v1.3.1...HEAD
460
+ [Unreleased]: https://github.com/Llama-Ventures/llama-cli/compare/v1.17.0...HEAD
461
+ [1.17.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.16.0...v1.17.0
462
+ [1.16.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.15.1...v1.16.0
463
+ [1.15.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.15.0...v1.15.1
464
+ [1.15.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.14.1...v1.15.0
465
+ [1.14.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.14.0...v1.14.1
466
+ [1.14.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.13.0...v1.14.0
467
+ [1.13.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.12.0...v1.13.0
468
+ [1.12.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.11.0...v1.12.0
469
+ [1.11.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.10.0...v1.11.0
470
+ [1.10.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.7.0...v1.10.0
471
+ [1.7.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.5.0...v1.7.0
472
+ [1.5.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.4.4...v1.5.0
473
+ [1.4.4]: https://github.com/Llama-Ventures/llama-cli/compare/v1.4.0...v1.4.4
474
+ [1.4.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.3.1...v1.4.0
406
475
  [1.3.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.3.0...v1.3.1
407
476
  [1.3.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.4...v1.3.0
408
477
  [1.2.4]: https://github.com/Llama-Ventures/llama-cli/compare/v1.2.3...v1.2.4
package/README.md CHANGED
@@ -226,6 +226,8 @@ llama agent bootstrap
226
226
  llama skills search "wiki delete tombstone"
227
227
  llama skills show llama-command
228
228
  llama explain https://command.llamaventures.vc/wiki/some-page
229
+ llama eval bad --last --reason "missed the llamaos weekly note"
230
+ llama eval add "last week llama dev weekly" --expect wiki:llamaos-weekly-2026-06-17
229
231
 
230
232
  # Wiki
231
233
  llama wiki search "<query>"
@@ -262,10 +264,31 @@ agents can pattern-match without parsing prose.
262
264
 
263
265
  ---
264
266
 
267
+ ### Golden Query Eval feedback
268
+
269
+ The CLI and MCP server send lightweight client telemetry to Command for each
270
+ authenticated request: client kind/version, detected agent client, local session
271
+ id, normalized command, sanitized args, canonical result ids, status, latency,
272
+ and bounded summaries. It records what Llama Command was asked to do, not the
273
+ user's private Claude Code/Codex/Cursor conversation or local files.
274
+
275
+ Search commands automatically become eval candidates. Agents can mark the latest
276
+ result explicitly:
277
+
278
+ ```bash
279
+ llama eval good --last
280
+ llama eval bad --last --reason "wrong top wiki"
281
+ llama eval add "AI陪伴" --surface deal --expect deal:<uuid>
282
+ ```
283
+
284
+ MCP-native agents use `record_eval_feedback` for the same flow.
285
+
286
+ ---
287
+
265
288
  ## MCP server
266
289
 
267
290
  The bundled `llama-mcp` is a **stdio Model Context Protocol** server exposing
268
- **56 typed tools** that mirror the most-used CLI surface. Every tool is named
291
+ typed tools that mirror the most-used CLI surface. Every tool is named
269
292
  and scoped — there is no generic API passthrough, by design (a public-package
270
293
  escape hatch reachable from a prompt-injectable agent context is exactly the
271
294
  shape we want to avoid).
@@ -290,9 +313,11 @@ printf '%s\n' \
290
313
  ```
291
314
 
292
315
  Auth is identical to the CLI's chain (gcloud → `$LLAMA_TOKEN` → `~/.llama/token`).
293
- The `agent_briefing` MCP **prompt** also returns
294
- [`AGENT_BRIEFING.md`](AGENT_BRIEFING.md) verbatim, so any new agent loading the
295
- server can self-onboard without leaving the protocol.
316
+ The `agent_briefing` MCP **prompt** returns the server-owned Agent Runtime
317
+ Contract when authenticated, so any new agent loading the server can
318
+ self-onboard without leaving the protocol. The bundled
319
+ [`AGENT_BRIEFING.md`](AGENT_BRIEFING.md) is only a fallback if the server
320
+ briefing route is temporarily unavailable.
296
321
 
297
322
  For current Llama OS skills, use the runtime tools instead of looking for a
298
323
  local private repo: `agent_bootstrap`, `skills_search`, `skills_read`, and
@@ -352,8 +377,8 @@ extensions, no transport flags.
352
377
 
353
378
  > If you're new and want the agent to onboard itself, run
354
379
  > `llama agent-onboard` from the CLI or fetch the `agent_briefing` prompt from
355
- > the MCP server. It's the workflow contract — autonomy levels, attribution
356
- > grammar, error recovery, anti-pollution rules.
380
+ > the MCP server. It pulls the Command-owned workflow contract — current CLI
381
+ > guidance, attribution grammar, error recovery, and anti-pollution rules.
357
382
 
358
383
  ---
359
384
 
package/README.zh-CN.md CHANGED
@@ -299,9 +299,10 @@ printf '%s\n' \
299
299
  ```
300
300
 
301
301
  认证链跟 CLI 完全一样(gcloud → `$LLAMA_TOKEN` → `~/.llama/token`)。
302
- `agent_briefing` 这个 MCP **prompt** 还会原样吐出
303
- [`AGENT_BRIEFING.md`](AGENT_BRIEFING.md)——刚装上 server 的 agent
304
- 不用离开协议就能给自己 onboard。
302
+ `agent_briefing` 这个 MCP **prompt** 会在认证后拉取 Command 服务端的
303
+ Agent Runtime Contract——刚装上 server 的 agent 不用离开协议就能给自己
304
+ onboard。包内 [`AGENT_BRIEFING.md`](AGENT_BRIEFING.md) 只是服务端 briefing
305
+ 临时不可用时的 fallback。
305
306
 
306
307
  要读当前 Llama OS skills,用 runtime tools:`agent_bootstrap`、
307
308
  `skills_search`、`skills_read`、`object_inspect`。公开 npm 包不打包私有
@@ -358,7 +359,7 @@ claude mcp add llama -- llama-mcp
358
359
  </details>
359
360
 
360
361
  > 想让 agent 自己 onboard?跑 `llama agent-onboard`,或者从 MCP server
361
- > 拉 `agent_briefing` prompt——那是 AI agent 的工作合约(autonomy 等级、
362
+ > 拉 `agent_briefing` prompt——它会拿 Command 服务端的工作合约(CLI 状态、
362
363
  > attribution 语法、错误恢复、anti-pollution 规则)。
363
364
 
364
365
  ---