@llamaventures/cli 2.1.3 → 2.2.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 +15 -4
- package/CHANGELOG.md +11 -0
- package/bin/llama-mcp.mjs +1 -1
- package/bin/llama.mjs +7 -0
- package/lib/build-manifest.json +2 -2
- package/lib/deal-actions.mjs +71 -0
- package/package.json +1 -1
package/AGENT_BRIEFING.md
CHANGED
|
@@ -162,16 +162,27 @@ Always submit raw user information first when losing it would be unacceptable:
|
|
|
162
162
|
}
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
Then, when useful, write a structured Information unit
|
|
165
|
+
Then, when useful, write a structured Information unit. Before each one, ask a
|
|
166
|
+
single question: is this a Llama user's own subjective judgment? Subjective
|
|
167
|
+
means the truth depends on who judges: a value or comparative word with no
|
|
168
|
+
stated benchmark, or a claim about someone's future behavior or inner state. If
|
|
169
|
+
yes, the type is `human_subjective_view.people` (founders or team) or
|
|
170
|
+
`human_subjective_view.business` (company, product, market or deal),
|
|
171
|
+
`value.speaker` names that user, and `value.rawText` quotes the user verbatim
|
|
172
|
+
from `origin.originalUserUtterance`. CLI and Core reject anything else. If no,
|
|
173
|
+
choose any type that fits; founder words are `founder_claim`.
|
|
166
174
|
|
|
167
175
|
```json
|
|
168
176
|
{
|
|
169
177
|
"operation": "information.put",
|
|
170
178
|
"dealId": "<uuid>",
|
|
171
|
-
"type": "
|
|
172
|
-
"labels": ["human_view"],
|
|
179
|
+
"type": "human_subjective_view.people",
|
|
173
180
|
"subject": {"person": "Founder name"},
|
|
174
|
-
"value": {
|
|
181
|
+
"value": {
|
|
182
|
+
"speaker": "<Llama user>",
|
|
183
|
+
"rawText": "I think the founder has strong product taste.",
|
|
184
|
+
"summary": "Strong product taste, per the user."
|
|
185
|
+
},
|
|
175
186
|
"origin": {
|
|
176
187
|
"kind": "user",
|
|
177
188
|
"originalUserUtterance": "I think the founder has strong product taste."
|
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.2.0] - 2026-09-04
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- Define `human_subjective_view.people` and `human_subjective_view.business`
|
|
13
|
+
as the only Information types for a Llama user's own judgment. CLI and MCP
|
|
14
|
+
reject them locally unless `value.speaker` is set and `value.rawText`
|
|
15
|
+
appears verbatim inside `origin.originalUserUtterance`; retired aliases
|
|
16
|
+
(`human_view`, `human_statement`, `human_opinion`, `human_judgment`,
|
|
17
|
+
`partner_view`) are refused with the replacement named. Core enforces the
|
|
18
|
+
same rule server-side.
|
|
19
|
+
|
|
9
20
|
## [2.1.3] - 2026-09-03
|
|
10
21
|
|
|
11
22
|
### Added
|
package/bin/llama-mcp.mjs
CHANGED
|
@@ -152,7 +152,7 @@ server.registerTool(
|
|
|
152
152
|
server.registerTool(
|
|
153
153
|
"write_deal",
|
|
154
154
|
{
|
|
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
|
+
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. A Llama user's own judgment is human_subjective_view.people or human_subjective_view.business and must carry value.speaker plus value.rawText quoted verbatim from origin.originalUserUtterance; it is rejected otherwise.",
|
|
156
156
|
// MCP SDK 1.30 only publishes object schemas at the tool root. Nesting one
|
|
157
157
|
// command preserves the real discriminated union instead of flattening four
|
|
158
158
|
// incompatible operations into false affordances.
|
package/bin/llama.mjs
CHANGED
|
@@ -103,6 +103,7 @@ create JSON:
|
|
|
103
103
|
write JSON (CLI derives idempotencyKey when omitted):
|
|
104
104
|
input.submit: {"operation":"input.submit","dealId":"<uuid>","content":"<original input>","format":"text","source":{},"origin":{"kind":"user","originalUserUtterance":"..."}}
|
|
105
105
|
information.put:{"operation":"information.put","dealId":"<uuid>","type":"founder_claim","labels":["founder-stated"],"subject":{"topic":"traction"},"value":{"content":"...","source":{"kind":"first_meeting_transcript"}},"origin":{"kind":"user","originalUserUtterance":"..."}}
|
|
106
|
+
human judgment: {"operation":"information.put","dealId":"<uuid>","type":"human_subjective_view.people","subject":{"topic":"founder_execution"},"value":{"speaker":"<Llama user>","rawText":"<the user's verbatim words>","summary":"<optional agent summary>"},"origin":{"kind":"user","originalUserUtterance":"<complete user input; must contain rawText>"}}
|
|
106
107
|
page.patch: {"operation":"page.patch","dealId":"<uuid>","patch":{"description":{"en":"...","zh":"..."}},"origin":{"kind":"agent"}}
|
|
107
108
|
artifact.put: {"operation":"artifact.put","dealId":"<uuid>","kind":"deck","title":"deck.pdf","mimeType":"application/pdf","contentBase64":"<file bytes, base64>","origin":{"kind":"user","originalUserUtterance":"..."}}
|
|
108
109
|
|
|
@@ -115,6 +116,12 @@ with storageKey (+ optional storageUrl) plus byteSize and sha256 instead.
|
|
|
115
116
|
For Information, origin records who caused the write and preserves user words;
|
|
116
117
|
value.source records where the evidence came from.
|
|
117
118
|
|
|
119
|
+
human_subjective_view.people|business is a Llama user's own judgment about the
|
|
120
|
+
team or the deal. Subjective = the truth depends on who judges: a value or
|
|
121
|
+
comparative word with no benchmark, or a claim about someone's future behavior
|
|
122
|
+
or inner state. It requires value.speaker and value.rawText quoted verbatim from
|
|
123
|
+
origin.originalUserUtterance; CLI and Core reject anything else. Other types are free.
|
|
124
|
+
|
|
118
125
|
Core owns Chat Records, append-only Deal Events, Drive provisioning, audit,
|
|
119
126
|
and idempotency. User-originated work must preserve exact wording in
|
|
120
127
|
origin.originalUserUtterance or reference origin.originatingChatRecordId.`;
|
package/lib/build-manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "llama.cli-build.v1",
|
|
3
3
|
"packageName": "@llamaventures/cli",
|
|
4
|
-
"packageVersion": "2.
|
|
5
|
-
"sourceSha": "
|
|
4
|
+
"packageVersion": "2.2.0",
|
|
5
|
+
"sourceSha": "2f4c73310ed6c5d36a47a275490ff1082321ca27",
|
|
6
6
|
"sourceKind": "github",
|
|
7
7
|
"sourceDirty": false,
|
|
8
8
|
"coreApiContract": {
|
package/lib/deal-actions.mjs
CHANGED
|
@@ -9,6 +9,72 @@ export const DEAL_WRITE_OPERATIONS = Object.freeze([
|
|
|
9
9
|
"artifact.put",
|
|
10
10
|
]);
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* A Llama user's own subjective judgment about the team (.people) or the deal
|
|
14
|
+
* (.business). An agent may record it, but the record must name the user and
|
|
15
|
+
* quote them verbatim from their own input, so the type alone stays a reliable
|
|
16
|
+
* filter. Core enforces the same rule; this check only fails faster.
|
|
17
|
+
*/
|
|
18
|
+
export const HUMAN_SUBJECTIVE_VIEW_TYPES = Object.freeze([
|
|
19
|
+
"human_subjective_view.people",
|
|
20
|
+
"human_subjective_view.business",
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
const RETIRED_HUMAN_VIEW_TYPES = Object.freeze([
|
|
24
|
+
"human_view",
|
|
25
|
+
"human_statement",
|
|
26
|
+
"human_opinion",
|
|
27
|
+
"human_judgment",
|
|
28
|
+
"partner_view",
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
function normalizeWhitespace(text) {
|
|
32
|
+
return String(text).replace(/\s+/g, " ").trim();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function stringField(object, key) {
|
|
36
|
+
const value = object && typeof object === "object" && !Array.isArray(object) ? object[key] : undefined;
|
|
37
|
+
return typeof value === "string" ? value.trim() : "";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function validateHumanSubjectiveView(information, origin) {
|
|
41
|
+
const type = stringField(information, "type");
|
|
42
|
+
const lower = type.toLowerCase();
|
|
43
|
+
if (RETIRED_HUMAN_VIEW_TYPES.includes(lower) || lower.startsWith("human_view.")) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
`Information type "${type}" is retired: a Llama user's own judgment is human_subjective_view.people or human_subjective_view.business`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
if (lower !== "human_subjective_view" && !lower.startsWith("human_subjective_view.")) {
|
|
49
|
+
return information;
|
|
50
|
+
}
|
|
51
|
+
if (!HUMAN_SUBJECTIVE_VIEW_TYPES.includes(type)) {
|
|
52
|
+
throw new Error(
|
|
53
|
+
"human_subjective_view must be exactly human_subjective_view.people (team) or human_subjective_view.business (deal)",
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
const utterance = origin?.kind === "user" ? stringField(origin, "originalUserUtterance") : "";
|
|
57
|
+
if (!utterance) {
|
|
58
|
+
throw new Error(
|
|
59
|
+
"human_subjective_view.* must originate from a user and carry the user's words in origin.originalUserUtterance",
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
const speaker = stringField(information.value, "speaker");
|
|
63
|
+
const rawText = stringField(information.value, "rawText");
|
|
64
|
+
if (!speaker) {
|
|
65
|
+
throw new Error("human_subjective_view.* requires value.speaker: the Llama user whose judgment this is");
|
|
66
|
+
}
|
|
67
|
+
if (!rawText) {
|
|
68
|
+
throw new Error("human_subjective_view.* requires value.rawText: the user's verbatim words");
|
|
69
|
+
}
|
|
70
|
+
if (!normalizeWhitespace(utterance).includes(normalizeWhitespace(rawText))) {
|
|
71
|
+
throw new Error(
|
|
72
|
+
"human_subjective_view.* value.rawText must appear verbatim inside origin.originalUserUtterance; do not paraphrase",
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
return information;
|
|
76
|
+
}
|
|
77
|
+
|
|
12
78
|
function canonicalJson(value) {
|
|
13
79
|
if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
|
|
14
80
|
if (value && typeof value === "object") {
|
|
@@ -153,9 +219,14 @@ export function prepareDealCommand(action, input) {
|
|
|
153
219
|
}
|
|
154
220
|
if (action === "create") {
|
|
155
221
|
validateLocalizedTextPairs(command.page ?? {});
|
|
222
|
+
const information = Array.isArray(command.information) ? command.information : [];
|
|
223
|
+
for (const item of information) validateHumanSubjectiveView(item, command.origin);
|
|
156
224
|
}
|
|
157
225
|
if (action === "write" && command.operation === "page.patch") {
|
|
158
226
|
validateLocalizedTextPairs(command.patch ?? {});
|
|
159
227
|
}
|
|
228
|
+
if (action === "write" && command.operation === "information.put") {
|
|
229
|
+
validateHumanSubjectiveView(command, command.origin);
|
|
230
|
+
}
|
|
160
231
|
return ensureIdempotencyKey(validateCommandOrigin(command));
|
|
161
232
|
}
|