@llamaventures/cli 2.1.2 → 2.1.3

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
@@ -15,9 +15,12 @@ llama agent bootstrap
15
15
  The authenticated response contains the current private Llama Brain with
16
16
  exactly two components: the approved Investment Framework V3 Markdown (how to
17
17
  think) and the Llama Command operating skill (how to work). Beside Brain it
18
- contains the separate current Live Deal Page field contract (what every visible
19
- slot means and how to verify a good write). The public CLI intentionally bundles
20
- none of this private content; it only fetches it after authentication.
18
+ contains a compact index of the current Live Deal Page fields. Before
19
+ `page.patch`, progressively load only the exact fields being changed with
20
+ `llama page-schema read <field> [field...]` or `get_live_deal_page_schema`.
21
+ Load one section only when the write genuinely spans that section. The public
22
+ CLI intentionally bundles none of this private content; it only fetches it
23
+ after authentication.
21
24
 
22
25
  CLI is the Agent's tool, not Brain. Do not substitute a private skill wrapper
23
26
  for either canonical Brain component.
@@ -60,7 +63,7 @@ judgment with its author; otherwise label the value as an Agent proposal / 待
60
63
  replace the entire array. Before changing one `whatTheyDo`, `peopleSteps`,
61
64
  `foundersJson`, or `industryMaps` item, read the current Page, preserve every
62
65
  sibling item, and submit the complete updated array. The live field contract
63
- includes the exact payload path and write mode for all 61 semantic fields.
66
+ read for those exact fields includes their payload paths and write modes.
64
67
 
65
68
  ## Exactly four Deal actions
66
69
 
package/CHANGELOG.md CHANGED
@@ -6,6 +6,17 @@ this project adheres to [Semantic Versioning](https://semver.org).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.1.3] - 2026-09-03
10
+
11
+ ### Added
12
+ - Add `llama page-schema list|read|section` and the matching
13
+ `get_live_deal_page_schema` MCP tool so Agents progressively load only the
14
+ exact Live Deal Page field contracts needed for a write.
15
+
16
+ ### Changed
17
+ - Make Agent bootstrap and briefing request the compact Live Deal Page schema
18
+ index instead of downloading and repeating the complete field contract.
19
+
9
20
  ## [2.1.2] - 2026-09-03
10
21
 
11
22
  ### Fixed
package/README.md CHANGED
@@ -180,7 +180,9 @@ Its Deal surface is also exactly four tools:
180
180
  Authentication, skill discovery, Wiki, admin audit, preferences, and external
181
181
  pitch remain separate non-Deal domains. Deal Memory likewise has two separate
182
182
  MCP tools, `get_deal_memory` and `update_deal_memory`; it does not add a fifth
183
- Occam Deal tool.
183
+ Occam Deal tool. `get_live_deal_page_schema` progressively reads the Page
184
+ schema index, exact fields, or one section; it is read-only context rather than
185
+ a fifth Deal action.
184
186
 
185
187
  ## Agent bootstrap
186
188
 
@@ -192,10 +194,12 @@ llama skills show <slug>
192
194
 
193
195
  Agents should run `llama agent bootstrap` before Deal work. The command loads
194
196
  the authenticated, server-owned private Brain: Investment Framework V3 for
195
- thinking plus the Llama Command operating skill for working. It also loads the
196
- separate current Live Deal Page field contract for writing. None of that private
197
- content is shipped in this public package; CLI is only the tool and authenticated
198
- transport.
197
+ thinking plus the Llama Command operating skill for working. It also loads a
198
+ compact index of the current Live Deal Page fields. Before `page.patch`, use
199
+ `llama page-schema read <field> [field...]` to load only the exact field
200
+ contracts being changed, or `llama page-schema section <section>` when the
201
+ write genuinely spans a section. None of that private content is shipped in
202
+ this public package; CLI is only the tool and authenticated transport.
199
203
 
200
204
  The live server briefing is authoritative. The bundled
201
205
  `AGENT_BRIEFING.md` is an offline fallback with the same four-action contract.
package/README.zh-CN.md CHANGED
@@ -170,12 +170,15 @@ MCP 的 Deal 工具同样恰好四个:
170
170
  认证、skill discovery、Wiki、admin audit、preferences 和 external pitch
171
171
  属于其他独立领域,不会扩大 Deal action space。Deal Memory 同样是独立领域,
172
172
  对应 `get_deal_memory` 和 `update_deal_memory` 两个 MCP 工具,并不增加第五个
173
- Occam Deal 工具。
173
+ Occam Deal 工具。`get_live_deal_page_schema` 以渐进方式读取 Page schema 的
174
+ 索引、精确字段或一个 section;它是只读上下文,也不是第五个 Deal action。
174
175
 
175
176
  ## Agent 启动
176
177
 
177
178
  ```bash
178
179
  llama agent bootstrap
180
+ llama page-schema list
181
+ llama page-schema read <field> [field...]
179
182
  llama skills search "<任务>"
180
183
  llama skills show <slug>
181
184
  ```
@@ -183,8 +186,10 @@ llama skills show <slug>
183
186
  Agent 在处理 Deal 前应先运行 `llama agent bootstrap`。该命令会从鉴权后的
184
187
  Llama Command 服务端加载两部分私有 Brain:负责投资思考的 Investment
185
188
  Framework V3,以及负责如何在 Command 工作的 Llama Command operating skill;
186
- 同时加载独立的、实时的 Live Deal Page 字段契约。所有私有内容都不会进入公开
187
- npm 包;CLI 只是 Agent 的工具和鉴权运输层。
189
+ 同时加载实时 Live Deal Page 字段的精简索引。执行 `page.patch` 前,通过
190
+ `llama page-schema read <field> [field...]` 只加载本次修改所需的字段契约;
191
+ 只有当写入确实跨越一个 section 时才加载整个 section。所有私有内容都不会进入
192
+ 公开 npm 包;CLI 只是 Agent 的工具和鉴权运输层。
188
193
 
189
194
  服务端实时 briefing 是权威合同;包内 `AGENT_BRIEFING.md` 是相同四动作
190
195
  合同的离线兜底。
package/bin/llama-mcp.mjs CHANGED
@@ -26,6 +26,7 @@ import {
26
26
  prepareDealCommand,
27
27
  } from "../lib/deal-actions.mjs";
28
28
  import { buildDealMemoryPath } from "../lib/deal-memory-actions.mjs";
29
+ import { buildPageSchemaPath, MAX_PAGE_SCHEMA_FIELDS } from "../lib/page-schema.mjs";
29
30
 
30
31
  const requireFromHere = createRequire(import.meta.url);
31
32
  const { version: PKG_VERSION } = requireFromHere("../package.json");
@@ -151,7 +152,7 @@ server.registerTool(
151
152
  server.registerTool(
152
153
  "write_deal",
153
154
  {
154
- description: "The only Deal mutation tool. Pass one command: input.submit, information.put, page.patch, or artifact.put. All Page content fields are Agent-writable; author controls attribution, not permission. Use the bootstrap field contract and bilingual Page prose. page.patch is JSON Merge Patch: arrays replace whole arrays, so read-modify-write and preserve sibling slots.",
155
+ description: "The only Deal mutation tool. Pass one command: input.submit, information.put, page.patch, or artifact.put. All Page content fields are Agent-writable; author controls attribution, not permission. Before page.patch, use get_live_deal_page_schema for the exact fields being changed and write bilingual Page prose. page.patch is JSON Merge Patch: arrays replace whole arrays, so read-modify-write and preserve sibling slots.",
155
156
  // MCP SDK 1.30 only publishes object schemas at the tool root. Nesting one
156
157
  // command preserves the real discriminated union instead of flattening four
157
158
  // incompatible operations into false affordances.
@@ -216,11 +217,12 @@ server.registerTool(
216
217
  server.registerTool(
217
218
  "agent_bootstrap",
218
219
  {
219
- description: "Mandatory before Llama work: fetch the authenticated two-part private Brain (Investment Framework V3 + Llama Command operating skill), the separate current Live Deal Page field contract, runtime contract, and visible Llama OS skills.",
220
+ description: "Mandatory before Llama work: fetch the authenticated two-part private Brain (Investment Framework V3 + Llama Command operating skill), a compact Live Deal Page schema index, runtime contract, and visible Llama OS skills. Read exact Page fields separately with get_live_deal_page_schema.",
220
221
  inputSchema: { limit: z.number().int().min(1).max(100).optional() },
221
222
  },
222
223
  async ({ limit } = {}) => {
223
224
  const params = new URLSearchParams({ clientVersion: PKG_VERSION });
225
+ params.set("page_schema", "progressive");
224
226
  if (limit) params.set("limit", String(limit));
225
227
  try {
226
228
  const result = await request("GET", `/api/agent/manifest?${params}`);
@@ -231,6 +233,25 @@ server.registerTool(
231
233
  },
232
234
  );
233
235
 
236
+ server.registerTool(
237
+ "get_live_deal_page_schema",
238
+ {
239
+ description: "Read the Live Deal Page schema progressively. Call with no selector for the compact index; before page.patch, request only exact fields or one section. This is read-only context, not a fifth Deal action.",
240
+ inputSchema: {
241
+ fields: z.array(z.string().min(1)).min(1).max(MAX_PAGE_SCHEMA_FIELDS).optional(),
242
+ section: z.string().min(1).optional(),
243
+ },
244
+ },
245
+ async ({ fields, section } = {}) => {
246
+ try {
247
+ // @core-api-operation GET /api/agent/page-schema
248
+ return await callApi("GET", buildPageSchemaPath({ fields, section }));
249
+ } catch (error) {
250
+ return textResult(formatErrorForDisplay(error), true);
251
+ }
252
+ },
253
+ );
254
+
234
255
  server.registerTool(
235
256
  "skills_search",
236
257
  {
@@ -430,7 +451,7 @@ server.registerTool(
430
451
  server.registerPrompt(
431
452
  "agent_briefing",
432
453
  {
433
- description: "Mandatory before Llama work: fetch the authenticated two-part private Brain, the separate current Live Deal Page field contract, and runtime contract; bundled text is only an offline fallback.",
454
+ description: "Mandatory before Llama work: fetch the authenticated two-part private Brain, compact Live Deal Page schema index, and runtime contract; read exact fields separately with get_live_deal_page_schema. Bundled text is only an offline fallback.",
434
455
  },
435
456
  async () => {
436
457
  const headers = await getAuthHeaders();
@@ -440,6 +461,7 @@ server.registerPrompt(
440
461
  } else {
441
462
  try {
442
463
  const params = new URLSearchParams({ clientVersion: PKG_VERSION });
464
+ params.set("page_schema", "progressive");
443
465
  const response = await request("GET", `/api/agent/briefing?${params}`);
444
466
  text = response?.briefing || readBriefing();
445
467
  } catch (error) {
package/bin/llama.mjs CHANGED
@@ -43,6 +43,7 @@ import {
43
43
  buildDealMemoryPath,
44
44
  readMarkdownInput,
45
45
  } from "../lib/deal-memory-actions.mjs";
46
+ import { buildPageSchemaPath } from "../lib/page-schema.mjs";
46
47
 
47
48
  const requireFromHere = createRequire(import.meta.url);
48
49
  const { version: PKG_VERSION } = requireFromHere("../package.json");
@@ -65,6 +66,7 @@ Separate preserved domains:
65
66
  llama auth status|login|logout
66
67
  llama token set|show
67
68
  llama agent bootstrap
69
+ llama page-schema list|read|section
68
70
  llama skills list|search|show
69
71
  llama pref list|add|approve|retire
70
72
  llama explain <url-or-object>
@@ -84,14 +86,16 @@ Exactly four actions:
84
86
 
85
87
  Before any Page write:
86
88
  llama agent bootstrap
89
+ llama page-schema read <field> [field...]
87
90
 
88
91
  The authenticated bootstrap contains the two-part private Llama Brain:
89
92
  Investment Framework V3 plus the Llama Command operating skill. It also
90
- contains the separate current Page field contract; its field count is live,
91
- so read it there. CLI is the tool, not Brain. Information never updates
92
- Page automatically. page.patch is JSON
93
- Merge Patch: objects merge, null deletes, and arrays replace whole arrays, so
94
- read-modify-write complete Page arrays and preserve sibling slots.
93
+ contains a compact index of the current Page fields. Before page.patch, use
94
+ the separate page-schema command to read only the exact fields being changed,
95
+ or one section when necessary. CLI is the tool, not Brain. Information never
96
+ updates Page automatically. page.patch is JSON Merge Patch: objects merge,
97
+ null deletes, and arrays replace whole arrays, so read-modify-write complete
98
+ Page arrays and preserve sibling slots.
95
99
 
96
100
  create JSON:
97
101
  {"companyName":"Acme","page":{},"information":[],"origin":{"kind":"user","originalUserUtterance":"..."}}
@@ -142,6 +146,16 @@ read this Story.
142
146
  This uses your existing Llama authentication. The CLI talks only to Command
143
147
  Core and never receives Deal Memory service credentials or AWS access.`;
144
148
 
149
+ const HELP_PAGE_SCHEMA = `Llama Live Deal Page schema — progressive, read-only context
150
+
151
+ llama page-schema list
152
+ llama page-schema read <field> [field...]
153
+ llama page-schema section <section>
154
+
155
+ Start with list. Before page.patch, read only the exact fields being changed;
156
+ use a section read only when the write genuinely spans that section. This is a
157
+ schema/field-prompt surface, not a fifth Deal action and not Page data.`;
158
+
145
159
  function parseFlags(args, allowed = null) {
146
160
  const flags = {};
147
161
  const positional = [];
@@ -168,7 +182,12 @@ function parseFlags(args, allowed = null) {
168
182
  }
169
183
 
170
184
  function usage(area) {
171
- console.log(area === "deal" ? HELP_DEAL : area === "memory" ? HELP_MEMORY : HELP_ROOT);
185
+ console.log(
186
+ area === "deal" ? HELP_DEAL :
187
+ area === "memory" ? HELP_MEMORY :
188
+ area === "page-schema" ? HELP_PAGE_SCHEMA :
189
+ HELP_ROOT,
190
+ );
172
191
  }
173
192
 
174
193
  function assertDealAction(area, action) {
@@ -502,6 +521,7 @@ async function main() {
502
521
  }
503
522
  try {
504
523
  const params = new URLSearchParams({ clientVersion: PKG_VERSION });
524
+ params.set("page_schema", "progressive");
505
525
  const response = await request("GET", `/api/agent/briefing?${params}`);
506
526
  process.stdout.write(response?.briefing || readBriefing());
507
527
  } catch (error) {
@@ -514,6 +534,7 @@ async function main() {
514
534
  if (area === "agent" && action === "bootstrap") {
515
535
  const { flags } = parseFlags(rest, ["json", "limit"]);
516
536
  const params = new URLSearchParams({ clientVersion: PKG_VERSION });
537
+ params.set("page_schema", "progressive");
517
538
  if (flags.limit && flags.limit !== true) params.set("limit", String(flags.limit));
518
539
  const manifest = await request("GET", `/api/agent/manifest?${params}`);
519
540
  if (flags.json) print(structuredBootstrapManifest(manifest));
@@ -521,6 +542,28 @@ async function main() {
521
542
  return;
522
543
  }
523
544
 
545
+ if (area === "page-schema") {
546
+ if (!action || action === "list") {
547
+ if (rest.length) throw new Error("Usage: llama page-schema list");
548
+ // @core-api-operation GET /api/agent/page-schema
549
+ print(await request("GET", buildPageSchemaPath()));
550
+ return;
551
+ }
552
+ if (action === "read") {
553
+ if (!rest.length) throw new Error("Usage: llama page-schema read <field> [field...]");
554
+ // @core-api-operation GET /api/agent/page-schema
555
+ print(await request("GET", buildPageSchemaPath({ fields: rest })));
556
+ return;
557
+ }
558
+ if (action === "section") {
559
+ if (rest.length !== 1) throw new Error("Usage: llama page-schema section <section>");
560
+ // @core-api-operation GET /api/agent/page-schema
561
+ print(await request("GET", buildPageSchemaPath({ section: rest[0] })));
562
+ return;
563
+ }
564
+ throw new Error("Page schema actions: list, read, section.");
565
+ }
566
+
524
567
  if (area === "skills" || (area === "agent" && action === "skills")) {
525
568
  const sub = area === "skills" ? action : rest[0];
526
569
  const args = area === "skills" ? rest : rest.slice(1);
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "format": "llama.core-api-contract.v1",
3
3
  "name": "llama-core-api",
4
- "apiVersion": "5.1.0",
4
+ "apiVersion": "5.3.0",
5
5
  "openapiVersion": "3.0.3",
6
- "sha256": "948a8d02ae833e8cfa2302bc3c615fc1d3c792ae774ebc25b16be81fd1b85fee",
7
- "pathCount": 111,
8
- "operationCount": 138
6
+ "sha256": "b793f67038b48cdfbfcc9141153132689c40e84adfbe087b0dbef3a409f5e5d5",
7
+ "pathCount": 113,
8
+ "operationCount": 140
9
9
  }
@@ -9,6 +9,7 @@
9
9
  { "method": "GET", "path": "/api/agent/briefing" },
10
10
  { "method": "GET", "path": "/api/agent/explain" },
11
11
  { "method": "GET", "path": "/api/agent/manifest" },
12
+ { "method": "GET", "path": "/api/agent/page-schema" },
12
13
  { "method": "GET", "path": "/api/agent/preferences" },
13
14
  { "method": "GET", "path": "/api/agent/skills" },
14
15
  { "method": "GET", "path": "/api/agent/skills/{slug}" },
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "format": "llama.cli-build.v1",
3
3
  "packageName": "@llamaventures/cli",
4
- "packageVersion": "2.1.2",
5
- "sourceSha": "bc642686f5c52df26bd927f7829303e5b10d3ce7",
4
+ "packageVersion": "2.1.3",
5
+ "sourceSha": "e349368d3de4fd4dcf181399b0c1f93c9f38dbf3",
6
6
  "sourceKind": "github",
7
7
  "sourceDirty": false,
8
8
  "coreApiContract": {
9
9
  "format": "llama.core-api-contract.v1",
10
10
  "name": "llama-core-api",
11
- "apiVersion": "5.1.0",
11
+ "apiVersion": "5.3.0",
12
12
  "openapiVersion": "3.0.3",
13
- "sha256": "948a8d02ae833e8cfa2302bc3c615fc1d3c792ae774ebc25b16be81fd1b85fee"
13
+ "sha256": "b793f67038b48cdfbfcc9141153132689c40e84adfbe087b0dbef3a409f5e5d5"
14
14
  }
15
15
  }
@@ -0,0 +1,24 @@
1
+ export const LIVE_DEAL_PAGE_SCHEMA_PATH = "/api/agent/page-schema";
2
+ export const MAX_PAGE_SCHEMA_FIELDS = 20;
3
+
4
+ export function buildPageSchemaPath({ fields = [], section } = {}) {
5
+ const normalizedFields = [...new Set(
6
+ fields.map((field) => String(field).trim()).filter(Boolean),
7
+ )];
8
+ const normalizedSection = section === undefined ? "" : String(section).trim();
9
+
10
+ if (normalizedFields.length && normalizedSection) {
11
+ throw new Error("Choose exact fields or one section, not both.");
12
+ }
13
+ if (normalizedFields.length > MAX_PAGE_SCHEMA_FIELDS) {
14
+ throw new Error(`Choose at most ${MAX_PAGE_SCHEMA_FIELDS} exact fields per request.`);
15
+ }
16
+ if (section !== undefined && !normalizedSection) {
17
+ throw new Error("Page schema section cannot be empty.");
18
+ }
19
+
20
+ const params = new URLSearchParams();
21
+ for (const field of normalizedFields) params.append("field", field);
22
+ if (normalizedSection) params.set("section", normalizedSection);
23
+ return `${LIVE_DEAL_PAGE_SCHEMA_PATH}${params.size ? `?${params}` : ""}`;
24
+ }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@llamaventures/cli",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
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 && npm run test:contract",
8
8
  "test:agent-routing": "node scripts/verify-agent-routing.mjs",
9
- "test:contract": "node --test scripts/build-manifest.test.mjs scripts/core-api-call-sites.test.mjs scripts/deal-actions-cli.test.mjs scripts/deal-actions.test.mjs scripts/deal-memory-actions-cli.test.mjs scripts/deal-memory-actions.test.mjs scripts/mcp-four-action-surface.test.mjs scripts/server-compatibility.test.mjs scripts/verify-core-api-contract.test.mjs && node scripts/verify-core-api-contract.mjs",
9
+ "test:contract": "node --test scripts/build-manifest.test.mjs scripts/core-api-call-sites.test.mjs scripts/deal-actions-cli.test.mjs scripts/deal-actions.test.mjs scripts/deal-memory-actions-cli.test.mjs scripts/deal-memory-actions.test.mjs scripts/mcp-four-action-surface.test.mjs scripts/page-schema-cli.test.mjs scripts/page-schema.test.mjs scripts/server-compatibility.test.mjs scripts/verify-core-api-contract.test.mjs && node scripts/verify-core-api-contract.mjs",
10
10
  "verify:artifact": "node scripts/verify-release-artifact.mjs",
11
11
  "verify:release": "npm test && npm run verify:artifact && node scripts/verify-tarball-clean.mjs",
12
12
  "prepack": "node scripts/prepare-build-manifest.mjs",