@llamaventures/cli 1.17.1 → 1.17.2

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
@@ -8,6 +8,7 @@ You are not just an AI assistant. You're an **extension of a team member** — w
8
8
 
9
9
  - **Your access scope is whatever your token allows.** Run `llama auth status` first; the response shows your role, identity, and active token source.
10
10
  - **All your writes are logged.** `auth_events` and `deal_events` capture everything. Pipeline data can always be traced back to who/what changed it.
11
+ - **Public surfaces stay clean.** Anything that leaves the workspace — public repos, npm packages, external artifacts, shared links — must not leak internal people, deals, private URLs, or workflow nuance.
11
12
  - **Be direct, terse, action-oriented.** Save your words for the genuine judgment calls.
12
13
  - **Critical when thinking, helpful when executing.** Push back on weak logic, then ship the work cleanly.
13
14
 
package/CHANGELOG.md CHANGED
@@ -6,6 +6,21 @@ this project adheres to [Semantic Versioning](https://semver.org).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.17.2] - 2026-07-01
10
+
11
+ ### Changed
12
+ - README (en + zh): new "Integrate your AI system" section — the recommended
13
+ path for wiring external agents/LLM apps through the CLI/MCP layer instead
14
+ of the raw HTTP API; corrected tool count (58) and command count (100+);
15
+ de-duplicated the CLI tour examples; removed an obsolete migration note;
16
+ the zh auth section now documents `llama auth login` (OAuth) as the
17
+ recommended method, matching en.
18
+ - MCP tool descriptions now defer server-configured option lists to runtime
19
+ discovery via `agent_bootstrap` instead of hardcoding them in tool text.
20
+ - Agent briefing: added a public-surfaces hygiene rule from the server-owned
21
+ contract.
22
+ - CI/publish pipeline: additional automated release-gate checks.
23
+
9
24
  ## [1.17.1] - 2026-06-29
10
25
 
11
26
  ### Changed
package/README.md CHANGED
@@ -27,6 +27,7 @@
27
27
  <p align="center">
28
28
  <a href="#install">Install</a> ·
29
29
  <a href="#authenticate">Authenticate</a> ·
30
+ <a href="#integrate-your-ai-system">Integrate your AI</a> ·
30
31
  <a href="#cli-tour">CLI</a> ·
31
32
  <a href="#mcp-server">MCP</a> ·
32
33
  <a href="#external-pitch-no-llama-account-required">External pitch</a> ·
@@ -48,7 +49,7 @@
48
49
  ```
49
50
  @llamaventures/cli
50
51
  ├── bin/llama interactive CLI for humans + bash
51
- └── bin/llama-mcp stdio MCP server, 56 typed tools — for any MCP-native agent
52
+ └── bin/llama-mcp stdio MCP server, 58 typed tools — for any MCP-native agent
52
53
  ```
53
54
 
54
55
  Both binaries share `lib/client.mjs` — the **same** auth chain, **same** HTTP
@@ -89,12 +90,6 @@ llama auth status # round-trips against /api/me
89
90
 
90
91
  The same install puts `llama-mcp` on your `PATH` for the MCP server — no second package.
91
92
 
92
- > **Upgrading from `npm link`?** The CLI used to live in the `llama-os/cli/`
93
- > directory and was distributed via `npm link`. As of CLI v1.x it ships as
94
- > `@llamaventures/cli`. Run `npm i -g @llamaventures/cli@latest`; the legacy
95
- > directory keeps working during the soak window but is no longer the source
96
- > of truth. See [`llama-os/cli/DEPRECATED.md`](https://github.com/SoujiOkita98/llama-os/blob/main/cli/DEPRECATED.md).
97
-
98
93
  ---
99
94
 
100
95
  ## Authenticate
@@ -166,6 +161,39 @@ llama deal search acme-ai # ready
166
161
 
167
162
  ---
168
163
 
164
+ ## Integrate your AI system
165
+
166
+ This package is the **supported integration surface** for Llama Command. If
167
+ you're wiring an in-house agent, a coding assistant, or any LLM app into the
168
+ workbench, come through here — **not the raw HTTP API**. The CLI/MCP layer owns
169
+ the auth chain, the stable `Error[…]` contract, and forward-compatibility
170
+ across server schema changes ([SemVer](#stability)); raw API routes carry no
171
+ such promise and can change without notice.
172
+
173
+ The five-minute path:
174
+
175
+ 1. **Get credentials** — a team account signs in with `llama auth login`; for
176
+ headless systems, have the admin mint a PAT at
177
+ [`/settings/tokens`](https://command.llamaventures.vc/settings/tokens) and
178
+ set it via `llama token set` or `$LLAMA_TOKEN`.
179
+ 2. **Install** — `npm i -g @llamaventures/cli` (Node 18+).
180
+ 3. **Wire it in:**
181
+ - **MCP-native agent** (Claude, Cursor, any stdio client) → point it at
182
+ `llama-mcp`: 58 typed tools, no generic passthrough.
183
+ See [MCP server](#mcp-server) for per-client config.
184
+ - **Anything else** → shell out to `llama …`. Output is agent-friendly
185
+ plain text; failures use the stable
186
+ [`Error[…]` prefixes](#error-codes--for-agents).
187
+ 4. **Onboard the agent** — have it run `llama agent-onboard` (or fetch the MCP
188
+ `agent_briefing` prompt) at session start. It returns the **server-owned
189
+ Agent Runtime Contract** — current workflow rules, attribution grammar,
190
+ error recovery — always in sync with the live server, so this README never
191
+ becomes your integration bottleneck.
192
+ 5. **Verify** — `llama auth status` round-trips the resolved identity;
193
+ `llama deal search "<anything>"` proves read access.
194
+
195
+ ---
196
+
169
197
  ## CLI tour
170
198
 
171
199
  The CLI is the canonical interface. The HTTP API beneath it is stable, but the
@@ -180,16 +208,12 @@ llama token show
180
208
 
181
209
  # Pipeline — read
182
210
  llama deal search "acme ai"
183
- llama deal list --owner alex --status Interested
184
- llama deal list --owner alex --status Outreached
185
- llama deal list --source-direction Outbound --status Outreached
186
- llama deal list --owner alex --status Diligence
211
+ llama deal list --owner alex --status Diligence # same filters as search
187
212
  llama deal show <dealId>
213
+ llama deal feed <dealId> # every contribution, newest first
188
214
 
189
215
  # Pipeline — write
190
- llama deal create "Acme AI" --description "..." --source Gavin --source-direction Outbound --status Interested
191
- llama deal create "Acme AI" --description "..." --source Gavin --source-direction Outbound --status Outreached
192
- llama deal create "Acme AI" --description "..." --source Gavin --source-direction Inbound --status Sourced
216
+ llama deal create "Acme AI" --description "..." --source alex --source-direction Outbound --status Interested
193
217
  llama deal update <dealId> status Diligence
194
218
  llama deal enrich <dealId> --dry-run
195
219
  llama deal enrich <dealId> --apply --executor server_agent
@@ -248,10 +272,11 @@ llama mentions
248
272
  llama mentions resolve <mentionId>
249
273
  ```
250
274
 
251
- Run `llama --help` for the full surface (50+ commands across deals, briefs,
252
- ownership, timeline, facts, wiki, mentions, skill corrections, and admin event
253
- feeds). Soft-delete is the default everywhere every removal is reversible
254
- and audit-logged via `deal_events`.
275
+ Run `llama --help` for the group index, or `llama help all` for the full
276
+ reference — 100+ commands across deals, briefs, facts, ownership, timeline,
277
+ wiki, memos, deal-scoped HTML artifacts, mentions, skill corrections, evals,
278
+ and admin event feeds. Soft-delete is the default everywhere — every removal
279
+ is reversible and audit-logged via `deal_events`.
255
280
 
256
281
  ### Error codes — for agents
257
282
 
@@ -419,9 +444,9 @@ intake agent extracts the structured fields and produces the verdict.
419
444
  the `Error[…]` prefixes are part of the public contract and won't change
420
445
  inside a major version.
421
446
  - **Server schema drift:** When the API gains an endpoint, the CLI / MCP gain
422
- a typed wrapper in the next minor release. While you wait, the `llama` CLI
423
- itself ships the full `llama` command surface (40+ commands) use it for
424
- ad-hoc HTTP work that the MCP doesn't yet wrap.
447
+ a typed wrapper in the next minor release. There is deliberately no raw-API
448
+ passthrough if a wrapper you need hasn't landed yet, open an issue rather
449
+ than calling the HTTP API directly.
425
450
 
426
451
  See [`CHANGELOG.md`](CHANGELOG.md) for the per-version log.
427
452
 
package/README.zh-CN.md CHANGED
@@ -26,6 +26,7 @@
26
26
 
27
27
  <p align="center">
28
28
  <a href="#给华人创业者-向-llama-pitch">🚀 向 Llama pitch(无需账号)</a> ·
29
+ <a href="#接入你的-ai-系统">接入你的 AI</a> ·
29
30
  <a href="#安装">安装</a> ·
30
31
  <a href="#认证">认证</a> ·
31
32
  <a href="#cli-速览">CLI</a> ·
@@ -48,7 +49,7 @@
48
49
  ```
49
50
  @llamaventures/cli
50
51
  ├── bin/llama 给人 + bash 用的交互式 CLI
51
- └── bin/llama-mcp 给 MCP 原生 agent 用的 stdio MCP server,56 个工具
52
+ └── bin/llama-mcp 给 MCP 原生 agent 用的 stdio MCP server,58 个类型化工具
52
53
  ```
53
54
 
54
55
  两个 binary 共享 `lib/client.mjs`——**同一**认证链、**同一** HTTP 客户端、
@@ -133,12 +134,6 @@ llama auth status # 会跑一次 /api/me 验证
133
134
 
134
135
  同一次安装会把 `llama-mcp` 也放到 `PATH` 上——MCP server 不用单独装包。
135
136
 
136
- > **从 `npm link` 升级过来?** CLI 以前住在 `llama-os/cli/` 目录,靠 `npm link`
137
- > 分发。从 v1.x 起改名 `@llamaventures/cli` 走 npm。
138
- > 跑一次 `npm i -g @llamaventures/cli@latest` 就完事;旧目录在 soak 期间
139
- > 还能用,但已经不是 source of truth。详见
140
- > [`llama-os/cli/DEPRECATED.md`](https://github.com/SoujiOkita98/llama-os/blob/main/cli/DEPRECATED.md)。
141
-
142
137
  ---
143
138
 
144
139
  ## 认证
@@ -147,16 +142,29 @@ llama auth status # 会跑一次 /api/me 验证
147
142
 
148
143
  | # | 来源 | 发送的 header | 适合谁 |
149
144
  |---|------|--------------|--------|
150
- | 1 | `gcloud auth print-identity-token` | `Authorization: Bearer …` | Llama 团队成员(零配置) |
151
- | 2 | `$LLAMA_TOKEN` 环境变量 | `X-Llama-Token` | CI runner、云上 sandbox agent |
152
- | 3 | `~/.llama/token`(mode `0600`) | `X-Llama-Token` | 本地常驻安装 |
153
- | 4 | `~/.llama-command/config.json` | `X-Llama-Token` | CLI v0.1 老路径——首次读取自动迁移到 `~/.llama/token` |
145
+ | 1 | `llama auth login`(OAuth 2.1,存 OS Keychain) | `Authorization: Bearer …` | **所有人的推荐方式。** 浏览器一次登录,token 自动刷新、重启不丢 |
146
+ | 2 | `gcloud auth print-identity-token` | `Authorization: Bearer …` | 已经配好 gcloud 的工作机(零配置) |
147
+ | 3 | `$LLAMA_TOKEN` 环境变量 | `X-Llama-Token` | CI runner、云上 sandbox agent |
148
+ | 4 | `~/.llama/token`(mode `0600`) | `X-Llama-Token` | 本地常驻安装(长期 PAT) |
149
+ | 5 | `~/.llama-command/config.json` | `X-Llama-Token` | CLI v0.1 老路径——首次读取自动迁移到 `~/.llama/token` |
154
150
 
155
151
  如果 Bearer 和 X-Llama-Token 同时存在,两个一起发。服务器先验 Bearer,
156
152
  失败后回退到 X-Llama-Token。任何时候都可以用 `llama auth status`
157
153
  看当前认证身份。
158
154
 
159
- ### 零配置 —— 团队成员推荐
155
+ ### 浏览器登录 —— 推荐
156
+
157
+ ```bash
158
+ llama auth login # 打开浏览器 → Google 登录 → 授权 → 完成
159
+ llama auth status # → activeMethod=oauth,显示身份与 scope
160
+ llama deal search acme-ai # 直接用
161
+ ```
162
+
163
+ OAuth 2.1 PKCE 流程,token 存 OS Keychain(macOS Keychain / Windows
164
+ Credential Manager / Linux Secret Service),自动刷新。
165
+ `llama auth logout` 会在服务端吊销并清空本地存储。
166
+
167
+ ### gcloud —— 已配好 gcloud 的机器
160
168
 
161
169
  ```bash
162
170
  gcloud auth login # 一次性,选你的 @llamaventures.vc 账号
@@ -188,6 +196,34 @@ llama deal search acme-ai # 直接用
188
196
 
189
197
  ---
190
198
 
199
+ ## 接入你的 AI 系统
200
+
201
+ 这个包是 Llama Command 的**官方集成面**。要把自研 agent、编程助手或任何
202
+ LLM 应用接进工作台,请从这里走——**不要直接调 HTTP API**。CLI/MCP 层
203
+ 负责认证链、稳定的 `Error[…]` 错误契约、以及服务端 schema 变化时的
204
+ 前向兼容([SemVer](#稳定性));裸 API 路由没有这些承诺,随时可能变。
205
+
206
+ 五分钟接入路径:
207
+
208
+ 1. **拿凭证** —— 团队账号直接 `llama auth login`;无人值守系统请管理员在
209
+ [`/settings/tokens`](https://command.llamaventures.vc/settings/tokens)
210
+ mint 一个 PAT,再用 `llama token set` 或 `$LLAMA_TOKEN` 配置。
211
+ 2. **安装** —— `npm i -g @llamaventures/cli`(Node 18+)。
212
+ 3. **接线:**
213
+ - **MCP 原生 agent**(Claude、Cursor、任何 stdio 客户端)→ 指向
214
+ `llama-mcp`:58 个类型化工具,无通用 passthrough。
215
+ 各客户端配置见 [MCP server](#mcp-server)。
216
+ - **其它形态** → 子进程调用 `llama …`。输出是 agent 友好的纯文本;
217
+ 失败带稳定的 `Error[…]` 前缀。
218
+ 4. **让 agent 自我入职** —— 会话开始时跑一次 `llama agent-onboard`
219
+ (或取 MCP 的 `agent_briefing` prompt),拿到**服务端下发的 Agent
220
+ Runtime Contract**——最新的工作流规则、署名规范、错误恢复——
221
+ 与线上服务器永远同步,README 永远不会成为集成瓶颈。
222
+ 5. **验证** —— `llama auth status` 回环确认身份;
223
+ `llama deal search "<随便什么>"` 证明读权限通了。
224
+
225
+ ---
226
+
191
227
  ## CLI 速览
192
228
 
193
229
  CLI 是 canonical 接口。底下的 HTTP API 也稳定,但 CLI 帮你处理了认证、错误格式、
@@ -201,16 +237,12 @@ llama token show
201
237
 
202
238
  # Pipeline——读
203
239
  llama deal search "acme ai"
204
- llama deal list --owner alex --status Interested
205
- llama deal list --owner alex --status Outreached
206
- llama deal list --source-direction Outbound --status Outreached
207
- llama deal list --owner alex --status Diligence
240
+ llama deal list --owner alex --status Diligence # 与 search 同一套过滤参数
208
241
  llama deal show <dealId>
242
+ llama deal feed <dealId> # 该 deal 的全部贡献,最新在前
209
243
 
210
244
  # Pipeline——写
211
- llama deal create "Acme AI" --description "..." --source Gavin --source-direction Outbound --status Interested
212
- llama deal create "Acme AI" --description "..." --source Gavin --source-direction Outbound --status Outreached
213
- llama deal create "Acme AI" --description "..." --source Gavin --source-direction Inbound --status Sourced
245
+ llama deal create "Acme AI" --description "..." --source alex --source-direction Outbound --status Interested
214
246
  llama deal update <dealId> status Diligence
215
247
  llama deal enrich <dealId> --dry-run
216
248
  llama deal enrich <dealId> --apply --executor server_agent
@@ -260,8 +292,9 @@ llama mentions
260
292
  llama mentions resolve <mentionId>
261
293
  ```
262
294
 
263
- 跑 `llama --help` 看完整命令清单(50+ 个命令,覆盖 deals、briefs、ownership、
264
- timeline、facts、wiki、mentionsskill corrections、admin event feeds)。
295
+ 跑 `llama --help` 看分组索引,`llama help all` 看完整命令参考——100+ 个命令,
296
+ 覆盖 dealsbriefs、facts、ownership、timeline、wiki、memodeal HTML
297
+ artifacts、mentions、skill corrections、evals、admin event feeds。
265
298
  所有删除默认软删除——可恢复,且通过 `deal_events` 留下审计痕迹。
266
299
 
267
300
  ### 错误码(给 agent 用)
@@ -375,8 +408,8 @@ claude mcp add llama -- llama-mcp
375
408
  - **向后兼容:** wire format(Bearer / X-Llama-Token)和 `Error[…]` 前缀
376
409
  是公开契约,major 版本内不会变。
377
410
  - **服务端 schema 漂移:** 当 API 多了一个端点,下一个 minor 版本会带
378
- typed wrapper。在那之前,可以用 `llama` CLI 本身——它自带 40+ 命令
379
- 覆盖整个 API 表面,足够顶住 MCP 还没包到的端点。
411
+ typed wrapper。这个包**故意不提供**裸 API passthrough——如果你需要的
412
+ wrapper 还没落地,开 issue,不要直接调 HTTP API。
380
413
 
381
414
  详见 [`CHANGELOG.md`](CHANGELOG.md)。
382
415
 
package/bin/llama-mcp.mjs CHANGED
@@ -1032,8 +1032,9 @@ server.registerTool(
1032
1032
  "deal_refresh_persona",
1033
1033
  {
1034
1034
  description:
1035
- "Regenerate one persona's analysis section for a deal. persona gavin | kyle | jack | " +
1036
- "david | bryan | herman | hongjiang | liuyi | kevin. Returns a runId (or null if debounced).",
1035
+ "Regenerate one persona's analysis section for a deal. persona = a server-configured " +
1036
+ "persona key (unknown keys are rejected; discover the roster via agent_bootstrap). " +
1037
+ "Returns a runId (or null if debounced).",
1037
1038
  inputSchema: {
1038
1039
  dealId: z.string(),
1039
1040
  persona: z.string(),
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@llamaventures/cli",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "description": "CLI + MCP server for the Llama Ventures investment workbench (command.llamaventures.vc).",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "test": "npm run test:agent-routing",
8
8
  "test:agent-routing": "node scripts/verify-agent-routing.mjs",
9
- "verify:release": "npm test && npm pack --dry-run"
9
+ "verify:release": "npm test && node scripts/verify-tarball-clean.mjs && npm pack --dry-run"
10
10
  },
11
11
  "bin": {
12
12
  "llama": "bin/llama.mjs",
@@ -14,8 +14,8 @@ const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."
14
14
  const packageJson = JSON.parse(readFileSync(path.join(repoRoot, "package.json"), "utf8"));
15
15
  assert.equal(
16
16
  packageJson.scripts?.["verify:release"],
17
- "npm test && npm pack --dry-run",
18
- "CLI release gate must run agent routing tests and npm pack dry-run",
17
+ "npm test && node scripts/verify-tarball-clean.mjs && npm pack --dry-run",
18
+ "CLI release gate must run agent routing tests, the publish-surface hygiene scan, and npm pack dry-run",
19
19
  );
20
20
  assert.equal(
21
21
  existsSync(path.join(repoRoot, "docs/agent-skills.bundle.json")),
@@ -201,13 +201,13 @@ const server = createServer(async (req, res) => {
201
201
  objectId: "missing-page",
202
202
  status: "deleted",
203
203
  title: "Missing Page",
204
- detail: "Deleted by Kevin Yu",
204
+ detail: "Deleted by Alex Chen",
205
205
  url: "https://command.llamaventures.vc/wiki/missing-page",
206
206
  },
207
207
  lifecycle: [
208
208
  {
209
209
  action: "deleted",
210
- actor_label: "Kevin Yu",
210
+ actor_label: "Alex Chen",
211
211
  created_at: "2026-06-15T19:02:00Z",
212
212
  reason: "user_deleted",
213
213
  },
@@ -543,7 +543,7 @@ try {
543
543
  resetCalls();
544
544
  const explainRun = await runCli(["explain", "https://command.llamaventures.vc/wiki/missing-page"], baseUrl, homeDir);
545
545
  assert.match(explainRun.stdout, /Status: deleted/);
546
- assert.match(explainRun.stdout, /Deleted by Kevin Yu/);
546
+ assert.match(explainRun.stdout, /Deleted by Alex Chen/);
547
547
  assert.deepEqual(paths(), ["GET /api/agent/explain"]);
548
548
  assert.equal(businessCalls()[0].query.q, "https://command.llamaventures.vc/wiki/missing-page");
549
549