@llamaventures/cli 2.1.1 → 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 +7 -4
- package/CHANGELOG.md +19 -0
- package/README.md +22 -10
- package/README.zh-CN.md +19 -7
- package/bin/llama-mcp.mjs +27 -5
- package/bin/llama.mjs +68 -9
- package/contracts/core-api.json +4 -4
- package/contracts/required-operations.json +1 -0
- package/lib/build-manifest.json +4 -4
- package/lib/page-schema.mjs +24 -0
- package/package.json +2 -2
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
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
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,25 @@ 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
|
+
|
|
20
|
+
## [2.1.2] - 2026-09-03
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- Publish the minimal Deal Memory writing contract through CLI and MCP help:
|
|
24
|
+
coherent whole-file rewrites, required frontmatter, read-before-write
|
|
25
|
+
versioning (including placeholders), the no-material-improvement rule, and
|
|
26
|
+
the distinction from structured Deal Information.
|
|
27
|
+
|
|
9
28
|
## [2.1.1] - 2026-09-03
|
|
10
29
|
|
|
11
30
|
### Changed
|
package/README.md
CHANGED
|
@@ -134,11 +134,19 @@ llama memory write <dealId> --markdown deal-story.md
|
|
|
134
134
|
llama memory write <dealId> --markdown deal-story.md --expected-version '"etag-from-read"'
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
Always read before writing. If `read` returns any Story, including an empty
|
|
138
|
+
placeholder, pass its opaque `version`; only a `404` means creation may omit
|
|
139
|
+
`--expected-version`. A stale value fails instead of losing a concurrent edit.
|
|
140
|
+
Rewrite the complete document as one coherent current understanding rather than
|
|
141
|
+
appending an update log. Do not restate Live Deal Page or Deal Information
|
|
142
|
+
fields, and do not write when the understanding would not materially improve.
|
|
143
|
+
|
|
144
|
+
The Markdown needs a non-empty body and YAML frontmatter with `deal_id`, `uuid`,
|
|
145
|
+
`created`, and `updated`. The first three values never change; `updated` must be
|
|
146
|
+
an ISO 8601 timestamp with an offset and strictly advance on every write. This
|
|
147
|
+
uses the same `llama auth login` identity. CLI calls the authenticated Command
|
|
148
|
+
Core adapter only—it has no sidecar URL, service token, S3 credentials, or
|
|
149
|
+
direct database access.
|
|
142
150
|
|
|
143
151
|
`llama deal read --detail memory` still means structured Deal Information.
|
|
144
152
|
`llama memory read` means the separate accumulated Markdown Deal Story.
|
|
@@ -172,7 +180,9 @@ Its Deal surface is also exactly four tools:
|
|
|
172
180
|
Authentication, skill discovery, Wiki, admin audit, preferences, and external
|
|
173
181
|
pitch remain separate non-Deal domains. Deal Memory likewise has two separate
|
|
174
182
|
MCP tools, `get_deal_memory` and `update_deal_memory`; it does not add a fifth
|
|
175
|
-
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.
|
|
176
186
|
|
|
177
187
|
## Agent bootstrap
|
|
178
188
|
|
|
@@ -184,10 +194,12 @@ llama skills show <slug>
|
|
|
184
194
|
|
|
185
195
|
Agents should run `llama agent bootstrap` before Deal work. The command loads
|
|
186
196
|
the authenticated, server-owned private Brain: Investment Framework V3 for
|
|
187
|
-
thinking plus the Llama Command operating skill for working. It also loads
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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.
|
|
191
203
|
|
|
192
204
|
The live server briefing is authoritative. The bundled
|
|
193
205
|
`AGENT_BRIEFING.md` is an offline fallback with the same four-action contract.
|
package/README.zh-CN.md
CHANGED
|
@@ -128,10 +128,17 @@ llama memory write <dealId> --markdown deal-story.md
|
|
|
128
128
|
llama memory write <dealId> --markdown deal-story.md --expected-version '"read 返回的 etag"'
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
每次写入前都先读取。如果 `read` 返回任何 Story(包括空 placeholder),写入时
|
|
132
|
+
必须传回其不透明 `version`;只有 `404` 才表示创建时可以省略
|
|
133
|
+
`--expected-version`。旧版本会安全失败,不会覆盖他人的新内容。每次写入都要
|
|
134
|
+
重写一份连贯的当前理解,不要追加更新日志,不要重复 Live Deal Page 或 Deal
|
|
135
|
+
Information 字段;如果理解没有实质改善,就不要写。
|
|
136
|
+
|
|
137
|
+
Markdown 必须有非空正文和 YAML frontmatter,其中包含 `deal_id`、`uuid`、
|
|
138
|
+
`created`、`updated`。前三项不可更改;`updated` 必须是带时区偏移的 ISO 8601
|
|
139
|
+
时间,并在每次写入时严格递增。它复用同一个 `llama auth login` 身份。CLI
|
|
140
|
+
只调用经过认证的 Command Core adapter,不持有 sidecar URL、service token、
|
|
141
|
+
S3 凭证,也不直接访问数据库。
|
|
135
142
|
|
|
136
143
|
`llama deal read --detail memory` 仍表示结构化 Deal Information;
|
|
137
144
|
`llama memory read` 表示独立的 Markdown Deal Story。
|
|
@@ -163,12 +170,15 @@ MCP 的 Deal 工具同样恰好四个:
|
|
|
163
170
|
认证、skill discovery、Wiki、admin audit、preferences 和 external pitch
|
|
164
171
|
属于其他独立领域,不会扩大 Deal action space。Deal Memory 同样是独立领域,
|
|
165
172
|
对应 `get_deal_memory` 和 `update_deal_memory` 两个 MCP 工具,并不增加第五个
|
|
166
|
-
Occam Deal
|
|
173
|
+
Occam Deal 工具。`get_live_deal_page_schema` 以渐进方式读取 Page schema 的
|
|
174
|
+
索引、精确字段或一个 section;它是只读上下文,也不是第五个 Deal action。
|
|
167
175
|
|
|
168
176
|
## Agent 启动
|
|
169
177
|
|
|
170
178
|
```bash
|
|
171
179
|
llama agent bootstrap
|
|
180
|
+
llama page-schema list
|
|
181
|
+
llama page-schema read <field> [field...]
|
|
172
182
|
llama skills search "<任务>"
|
|
173
183
|
llama skills show <slug>
|
|
174
184
|
```
|
|
@@ -176,8 +186,10 @@ llama skills show <slug>
|
|
|
176
186
|
Agent 在处理 Deal 前应先运行 `llama agent bootstrap`。该命令会从鉴权后的
|
|
177
187
|
Llama Command 服务端加载两部分私有 Brain:负责投资思考的 Investment
|
|
178
188
|
Framework V3,以及负责如何在 Command 工作的 Llama Command operating skill;
|
|
179
|
-
|
|
180
|
-
|
|
189
|
+
同时加载实时 Live Deal Page 字段的精简索引。执行 `page.patch` 前,通过
|
|
190
|
+
`llama page-schema read <field> [field...]` 只加载本次修改所需的字段契约;
|
|
191
|
+
只有当写入确实跨越一个 section 时才加载整个 section。所有私有内容都不会进入
|
|
192
|
+
公开 npm 包;CLI 只是 Agent 的工具和鉴权运输层。
|
|
181
193
|
|
|
182
194
|
服务端实时 briefing 是权威合同;包内 `AGENT_BRIEFING.md` 是相同四动作
|
|
183
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.
|
|
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.
|
|
@@ -170,7 +171,7 @@ server.registerTool(
|
|
|
170
171
|
server.registerTool(
|
|
171
172
|
"get_deal_memory",
|
|
172
173
|
{
|
|
173
|
-
description: "Read the complete canonical Markdown Deal Story and its opaque concurrency version.",
|
|
174
|
+
description: "Read the complete canonical Markdown Deal Story and its opaque concurrency version. A returned placeholder is an existing Story whose version is required for a write; only 404 means no Story exists.",
|
|
174
175
|
inputSchema: { dealId: z.string().uuid() },
|
|
175
176
|
},
|
|
176
177
|
// @core-api-operation GET /api/deal-memory/{dealId}/story
|
|
@@ -180,7 +181,7 @@ server.registerTool(
|
|
|
180
181
|
server.registerTool(
|
|
181
182
|
"update_deal_memory",
|
|
182
183
|
{
|
|
183
|
-
description: "
|
|
184
|
+
description: "Replace the complete Markdown Deal Story with one coherent current understanding; never append an update log, restate Live Deal Page/Deal Information fields, or write when understanding would not materially improve. Frontmatter must contain matching deal_id plus stable uuid and created timestamps; updated must strictly advance. Pass the version from get_deal_memory for every returned Story, including a placeholder; only 404 permits creation without expected_version.",
|
|
184
185
|
inputSchema: {
|
|
185
186
|
dealId: z.string().uuid(),
|
|
186
187
|
markdown: z.string().min(1).max(1_048_576),
|
|
@@ -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),
|
|
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,
|
|
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");
|
|
@@ -55,6 +56,8 @@ Deal has exactly four actions:
|
|
|
55
56
|
llama deal create --json <file|->
|
|
56
57
|
llama deal write --json <file|->
|
|
57
58
|
|
|
59
|
+
Here --detail memory means structured Deal Information, not Deal Memory.
|
|
60
|
+
|
|
58
61
|
Deal Memory is a separate sidecar domain through the same login:
|
|
59
62
|
llama memory read <dealId> [--raw]
|
|
60
63
|
llama memory write <dealId> --markdown <file|-> [--expected-version <version>]
|
|
@@ -63,6 +66,7 @@ Separate preserved domains:
|
|
|
63
66
|
llama auth status|login|logout
|
|
64
67
|
llama token set|show
|
|
65
68
|
llama agent bootstrap
|
|
69
|
+
llama page-schema list|read|section
|
|
66
70
|
llama skills list|search|show
|
|
67
71
|
llama pref list|add|approve|retire
|
|
68
72
|
llama explain <url-or-object>
|
|
@@ -82,14 +86,16 @@ Exactly four actions:
|
|
|
82
86
|
|
|
83
87
|
Before any Page write:
|
|
84
88
|
llama agent bootstrap
|
|
89
|
+
llama page-schema read <field> [field...]
|
|
85
90
|
|
|
86
91
|
The authenticated bootstrap contains the two-part private Llama Brain:
|
|
87
92
|
Investment Framework V3 plus the Llama Command operating skill. It also
|
|
88
|
-
contains
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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.
|
|
93
99
|
|
|
94
100
|
create JSON:
|
|
95
101
|
{"companyName":"Acme","page":{},"information":[],"origin":{"kind":"user","originalUserUtterance":"..."}}
|
|
@@ -119,13 +125,37 @@ const HELP_MEMORY = `Llama Deal Memory — one canonical Markdown Deal Story
|
|
|
119
125
|
llama memory write <dealId> --markdown <file|-> [--expected-version <version>]
|
|
120
126
|
|
|
121
127
|
Read returns the full JSON record, including its opaque version. --raw prints
|
|
122
|
-
only the exact Markdown.
|
|
123
|
-
|
|
124
|
-
|
|
128
|
+
only the exact Markdown. Always read before writing. If read returns a Story,
|
|
129
|
+
including an empty placeholder, pass its version with --expected-version. Only
|
|
130
|
+
a 404 means creation may omit the version; stale writes fail safely.
|
|
131
|
+
|
|
132
|
+
Write one coherent current Story: replace the complete document instead of
|
|
133
|
+
appending an update log. Do not restate Live Deal Page or Deal Information
|
|
134
|
+
fields. If the understanding would not materially improve, do not write.
|
|
135
|
+
|
|
136
|
+
The Markdown must have a non-empty body and YAML frontmatter containing:
|
|
137
|
+
deal_id: the route Deal UUID; never changes
|
|
138
|
+
uuid: the Story UUID; never changes
|
|
139
|
+
created: ISO 8601 with offset; never changes
|
|
140
|
+
updated: ISO 8601 with offset; must strictly advance on every write
|
|
141
|
+
|
|
142
|
+
Use authorized evidence, preserve uncertainty, and never invent information.
|
|
143
|
+
llama deal read --detail memory reads structured Deal Information; it does not
|
|
144
|
+
read this Story.
|
|
125
145
|
|
|
126
146
|
This uses your existing Llama authentication. The CLI talks only to Command
|
|
127
147
|
Core and never receives Deal Memory service credentials or AWS access.`;
|
|
128
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
|
+
|
|
129
159
|
function parseFlags(args, allowed = null) {
|
|
130
160
|
const flags = {};
|
|
131
161
|
const positional = [];
|
|
@@ -152,7 +182,12 @@ function parseFlags(args, allowed = null) {
|
|
|
152
182
|
}
|
|
153
183
|
|
|
154
184
|
function usage(area) {
|
|
155
|
-
console.log(
|
|
185
|
+
console.log(
|
|
186
|
+
area === "deal" ? HELP_DEAL :
|
|
187
|
+
area === "memory" ? HELP_MEMORY :
|
|
188
|
+
area === "page-schema" ? HELP_PAGE_SCHEMA :
|
|
189
|
+
HELP_ROOT,
|
|
190
|
+
);
|
|
156
191
|
}
|
|
157
192
|
|
|
158
193
|
function assertDealAction(area, action) {
|
|
@@ -486,6 +521,7 @@ async function main() {
|
|
|
486
521
|
}
|
|
487
522
|
try {
|
|
488
523
|
const params = new URLSearchParams({ clientVersion: PKG_VERSION });
|
|
524
|
+
params.set("page_schema", "progressive");
|
|
489
525
|
const response = await request("GET", `/api/agent/briefing?${params}`);
|
|
490
526
|
process.stdout.write(response?.briefing || readBriefing());
|
|
491
527
|
} catch (error) {
|
|
@@ -498,6 +534,7 @@ async function main() {
|
|
|
498
534
|
if (area === "agent" && action === "bootstrap") {
|
|
499
535
|
const { flags } = parseFlags(rest, ["json", "limit"]);
|
|
500
536
|
const params = new URLSearchParams({ clientVersion: PKG_VERSION });
|
|
537
|
+
params.set("page_schema", "progressive");
|
|
501
538
|
if (flags.limit && flags.limit !== true) params.set("limit", String(flags.limit));
|
|
502
539
|
const manifest = await request("GET", `/api/agent/manifest?${params}`);
|
|
503
540
|
if (flags.json) print(structuredBootstrapManifest(manifest));
|
|
@@ -505,6 +542,28 @@ async function main() {
|
|
|
505
542
|
return;
|
|
506
543
|
}
|
|
507
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
|
+
|
|
508
567
|
if (area === "skills" || (area === "agent" && action === "skills")) {
|
|
509
568
|
const sub = area === "skills" ? action : rest[0];
|
|
510
569
|
const args = area === "skills" ? rest : rest.slice(1);
|
package/contracts/core-api.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "llama.core-api-contract.v1",
|
|
3
3
|
"name": "llama-core-api",
|
|
4
|
-
"apiVersion": "5.
|
|
4
|
+
"apiVersion": "5.3.0",
|
|
5
5
|
"openapiVersion": "3.0.3",
|
|
6
|
-
"sha256": "
|
|
7
|
-
"pathCount":
|
|
8
|
-
"operationCount":
|
|
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}" },
|
package/lib/build-manifest.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "llama.cli-build.v1",
|
|
3
3
|
"packageName": "@llamaventures/cli",
|
|
4
|
-
"packageVersion": "2.1.
|
|
5
|
-
"sourceSha": "
|
|
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.
|
|
11
|
+
"apiVersion": "5.3.0",
|
|
12
12
|
"openapiVersion": "3.0.3",
|
|
13
|
-
"sha256": "
|
|
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.
|
|
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",
|