@llamaventures/cli 2.1.1 → 2.1.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/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ this project adheres to [Semantic Versioning](https://semver.org).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.1.2] - 2026-09-03
10
+
11
+ ### Fixed
12
+ - Publish the minimal Deal Memory writing contract through CLI and MCP help:
13
+ coherent whole-file rewrites, required frontmatter, read-before-write
14
+ versioning (including placeholders), the no-material-improvement rule, and
15
+ the distinction from structured Deal Information.
16
+
9
17
  ## [2.1.1] - 2026-09-03
10
18
 
11
19
  ### 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
- The first write omits `--expected-version`. Updating an existing story requires
138
- the opaque `version` returned by `read`; a stale value fails instead of losing a
139
- concurrent edit. This uses the same `llama auth login` identity. CLI calls the
140
- authenticated Command Core adapter only—it has no sidecar URL, service token,
141
- S3 credentials, or direct database access.
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.
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
- 第一次创建时不传 `--expected-version`;以后更新必须使用前一次 `read` 返回的
132
- 不透明 `version`,旧版本会安全失败,不会覆盖他人的新内容。它复用同一个
133
- `llama auth login` 身份。CLI 只调用经过认证的 Command Core adapter,不持有
134
- sidecar URL、service token、S3 凭证,也不直接访问数据库。
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。
package/bin/llama-mcp.mjs CHANGED
@@ -170,7 +170,7 @@ server.registerTool(
170
170
  server.registerTool(
171
171
  "get_deal_memory",
172
172
  {
173
- description: "Read the complete canonical Markdown Deal Story and its opaque concurrency version.",
173
+ 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
174
  inputSchema: { dealId: z.string().uuid() },
175
175
  },
176
176
  // @core-api-operation GET /api/deal-memory/{dealId}/story
@@ -180,7 +180,7 @@ server.registerTool(
180
180
  server.registerTool(
181
181
  "update_deal_memory",
182
182
  {
183
- description: "Create or replace the complete Markdown Deal Story. Existing stories require the version returned by get_deal_memory; stale writes fail safely.",
183
+ 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
184
  inputSchema: {
185
185
  dealId: z.string().uuid(),
186
186
  markdown: z.string().min(1).max(1_048_576),
package/bin/llama.mjs CHANGED
@@ -55,6 +55,8 @@ Deal has exactly four actions:
55
55
  llama deal create --json <file|->
56
56
  llama deal write --json <file|->
57
57
 
58
+ Here --detail memory means structured Deal Information, not Deal Memory.
59
+
58
60
  Deal Memory is a separate sidecar domain through the same login:
59
61
  llama memory read <dealId> [--raw]
60
62
  llama memory write <dealId> --markdown <file|-> [--expected-version <version>]
@@ -119,9 +121,23 @@ const HELP_MEMORY = `Llama Deal Memory — one canonical Markdown Deal Story
119
121
  llama memory write <dealId> --markdown <file|-> [--expected-version <version>]
120
122
 
121
123
  Read returns the full JSON record, including its opaque version. --raw prints
122
- only the exact Markdown. A first write creates the story without a version.
123
- Every later write must pass the version from the preceding read; stale writes
124
- fail instead of overwriting newer understanding.
124
+ only the exact Markdown. Always read before writing. If read returns a Story,
125
+ including an empty placeholder, pass its version with --expected-version. Only
126
+ a 404 means creation may omit the version; stale writes fail safely.
127
+
128
+ Write one coherent current Story: replace the complete document instead of
129
+ appending an update log. Do not restate Live Deal Page or Deal Information
130
+ fields. If the understanding would not materially improve, do not write.
131
+
132
+ The Markdown must have a non-empty body and YAML frontmatter containing:
133
+ deal_id: the route Deal UUID; never changes
134
+ uuid: the Story UUID; never changes
135
+ created: ISO 8601 with offset; never changes
136
+ updated: ISO 8601 with offset; must strictly advance on every write
137
+
138
+ Use authorized evidence, preserve uncertainty, and never invent information.
139
+ llama deal read --detail memory reads structured Deal Information; it does not
140
+ read this Story.
125
141
 
126
142
  This uses your existing Llama authentication. The CLI talks only to Command
127
143
  Core and never receives Deal Memory service credentials or AWS access.`;
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "format": "llama.cli-build.v1",
3
3
  "packageName": "@llamaventures/cli",
4
- "packageVersion": "2.1.1",
5
- "sourceSha": "335bf5d6c510d38616754100568a64f385d62607",
4
+ "packageVersion": "2.1.2",
5
+ "sourceSha": "bc642686f5c52df26bd927f7829303e5b10d3ce7",
6
6
  "sourceKind": "github",
7
7
  "sourceDirty": false,
8
8
  "coreApiContract": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llamaventures/cli",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "CLI + MCP server for the Llama Ventures investment workbench (command.llamaventures.vc).",
5
5
  "type": "module",
6
6
  "scripts": {