@llamaventures/cli 1.25.0 → 2.0.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 +125 -336
- package/CHANGELOG.md +32 -0
- package/README.md +116 -213
- package/README.zh-CN.md +112 -205
- package/bin/llama-mcp.mjs +209 -1992
- package/bin/llama.mjs +388 -3609
- package/contracts/core-api.json +4 -4
- package/contracts/required-operations.json +27 -356
- package/lib/build-manifest.json +4 -4
- package/lib/client.mjs +12 -5
- package/lib/deal-actions.mjs +102 -0
- package/package.json +3 -3
- package/contracts/investment-workflow-v2.md +0 -19
- package/lib/workflow-audit.mjs +0 -13
- package/lib/workflow-remediation.mjs +0 -45
package/AGENT_BRIEFING.md
CHANGED
|
@@ -1,371 +1,160 @@
|
|
|
1
|
-
# Llama
|
|
1
|
+
# Llama Command Agent Contract — CLI 2
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package is the authenticated tool boundary for Llama Command. For Deal
|
|
4
|
+
work, the interface is intentionally small: search, read, create, and write.
|
|
5
|
+
Do not bypass it with SQL, Google APIs, or retired HTTP routes.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
## The Deal model
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Each company has five business resources:
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- **Critical when thinking, helpful when executing.** Push back on weak logic, then ship the work cleanly.
|
|
11
|
+
1. Live Deal Page — the one current page humans see.
|
|
12
|
+
2. Deal Information — structured, labelled, provenance-linked working memory.
|
|
13
|
+
3. Artifacts — immutable user-uploaded memo, HTML, and source files.
|
|
14
|
+
4. Chat Records — append-only human/group/agent conversation, owned by Core.
|
|
15
|
+
5. Deal Events — append-only history, generated by Core for every input and mutation.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
Archive, trash, status, founder, opinion, fact, memo section, and artifact kind
|
|
18
|
+
are data or labels inside these resources. They are not separate tools.
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
## Exactly four Deal actions
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## Runtime skill library
|
|
26
|
-
|
|
27
|
-
This npm package is public, but Llama OS skills are private. Do not assume the skill text is bundled locally. For team-token sessions, discover the live runtime library through Llama Command:
|
|
28
|
-
|
|
29
|
-
- Start with `llama agent bootstrap` or MCP `agent_bootstrap` when you need the current Command + Llama OS contract.
|
|
30
|
-
- Use `llama agent-onboard` or MCP `agent_briefing` for the server-owned Agent Runtime Contract. The npm-bundled text is fallback only.
|
|
31
|
-
- Use `llama skills search "<task>"` or MCP `skills_search` before choosing a Llama workflow.
|
|
32
|
-
- Use `llama skills show <slug>` or MCP `skills_read` only for the relevant skill.
|
|
33
|
-
- Use `llama activity new-deals|updated-deals` or MCP `activity_query` before scanning raw deal timelines for recent portfolio movement.
|
|
34
|
-
- Use `llama explain <command-url-or-object>` or MCP `object_inspect` for 404s, deleted wiki pages, notifier links, deal URLs, and unknown Command objects before telling the user "the system is broken."
|
|
35
|
-
|
|
36
|
-
The boundary matters: public CLI/MCP discovers skills, but authenticated Command decides which skill content the token may read.
|
|
37
|
-
|
|
38
|
-
## Pipeline First (hard rule)
|
|
39
|
-
|
|
40
|
-
Any time the user mentions a company name or founder name:
|
|
41
|
-
|
|
42
|
-
1. **Run `llama deal search "<name>"` BEFORE web search.** Always. No exceptions.
|
|
43
|
-
2. If pipeline has it → pull the data, integrate into your reply silently.
|
|
44
|
-
3. If pipeline doesn't have it → ask once: "New name. Add to pipeline? (Y/n)". On yes, `llama deal create`.
|
|
45
|
-
- Use `--status Interested` when Llama wants to record/track the company before any outreach, intro, response, deck submission, or meeting.
|
|
46
|
-
- Use `--status Outreached` when we only contacted/logged the company and have no response or effective relationship yet.
|
|
47
|
-
- Use `--status Sourced` only once there is a response, intro, meeting, or another real relationship signal.
|
|
48
|
-
- Also set `--source-direction Inbound` if the deal came into the firm; set `--source-direction Outbound` if Llama found/listed/reached out first.
|
|
49
|
-
- If assigning an owner at create time, use `--deal-owner` with an exact `/api/field-options` value, email, or user id. Do not guess from a first name.
|
|
50
|
-
4. If user gives you new facts (status / valuation / founder note) → `llama deal update` immediately, tell the user **one line** afterward.
|
|
51
|
-
|
|
52
|
-
Don't:
|
|
53
|
-
|
|
54
|
-
- Web-search a company before checking pipeline.
|
|
55
|
-
- `curl` against `command.llamaventures.vc/api/*`. Use the CLI. The CLI handles auth, error format, and schema compatibility — `curl` doesn't.
|
|
56
|
-
|
|
57
|
-
## Content capture (core responsibility)
|
|
58
|
-
|
|
59
|
-
Conversation produces value → that value flows somewhere. This is not optional.
|
|
60
|
-
|
|
61
|
-
### When someone gives you info about a deal (the most common case)
|
|
62
|
-
|
|
63
|
-
A teammate says "I just met them and heard…" or pastes a chunk of notes. Your job: get it into the right deal, in the right layer, and confirm it's right. Three steps:
|
|
64
|
-
|
|
65
|
-
1. **Find the deal** — `llama deal search "<name>"` (Pipeline First). New name → offer to create it.
|
|
66
|
-
2. **Split what they gave you into two kinds** — this is the whole data model:
|
|
67
|
-
- **A source packet with 2+ facts, or facts + a note → ingest once.** Build a JSON object with `source`, `facts`, and optional `note`, then run `llama deal ingest <dealId> --file <packet.json>`. This is the preferred agent path: one atomic, deduplicated, retry-safe commit. Reuse an explicit `idempotencyKey` when retrying the same material. The matching MCP tool is `deal_ingest` and uses the same packet shape.
|
|
68
|
-
- **Verifiable claims → facts.** `llama deal fact add <dealId> --category <cat> --claim "…" --source "<where it came from>" --source-url <url>`. A claim someone *relayed* ("their ARR is $3M", "raised from a16z") is a fact at **unverified** trust — it's hearsay until checked. Pass `--attested` ONLY if you actually verified it against a source yourself. In raw API terms, the fact text field is `claim` (`value` is only a compatibility alias), `source` is the human-readable provenance label, and `sourceUrl` is the canonical URL.
|
|
69
|
-
- **Trust and contest are separate axes.** A *contested* fact is excluded from what the Deal Agent treats as current, whatever its trust rung — so a fact can read as both `human-vouched` and suppressed. `fact verify --status confirmed` does **not** lift a contest; the response tells you when one is still standing. To lift one: `llama deal fact uncontest <dealId> <factId> --reason "…"`. The lifted contest is kept in the fact's history, not erased.
|
|
70
|
-
- **Their judgment / impression → a note.** `llama post <dealId> "…"`. "Founder seemed evasive", "I'd lean pass", "worth a second meeting" — opinion, not fact. Attributed, never "verified".
|
|
71
|
-
- A pasted blob → pull the verifiable claims out as facts, capture their take as a note.
|
|
72
|
-
3. **Read it back before you claim it's saved.** A generic tool call returning `{ok:true}` is NOT proof the content is where the user will look for it. `deal ingest` is the exception because its response is built from the rows and note block read back after commit: confirm `createdFacts`, `skippedFacts`, `note`, and `summary` in that receipt. For every other write, run `llama deal feed <dealId>` and confirm your fact/note actually appears. Never say "记好了 / saved" from a request acknowledgment alone — the #1 failure is an agent writing to the wrong surface (e.g. the brief, which is the Memo and does NOT appear in the feed) and reporting success anyway. If the authoritative ingest receipt or the feed read-back does not contain the material, fix it before reporting success.
|
|
73
|
-
- **Authorship is automatic, don't fake it.** Everything you write via CLI/MCP is recorded as "via assistant" (you're the accountable human's assistant). You can't and shouldn't make it read as human-typed — that honesty is the feature. Facts you add stay **unverified** until a human confirms them; if you pass `--attested` (only when you actually checked the source) your ceiling is **agent-verified**, never human-vouched. Only a person, signed in at the browser, can vouch. The confirmation IS the trust step — never silently mark something verified.
|
|
74
|
-
|
|
75
|
-
Why split it: facts and opinions live in different layers so the deal keeps one clean **source of truth** (facts, sourced + trust-rated) separate from people's **takes** (notes). The four layers — facts / notes / brief (AI's synthesis) / timeline — are documented in Llama Command's `docs/SCHEMA.md`.
|
|
76
|
-
|
|
77
|
-
### Where does this HTML / thesis / artifact go? (decision tree)
|
|
78
|
-
|
|
79
|
-
When the user hands you an HTML page, thesis write-up, market map, dashboard, IC memo, sector landscape — anything that isn't a one-off note — pick the destination in this order. **Llama Command native (the workbench) outranks Netlify for everything internal.** Only escape to Netlify when the page is truly going to a public / founder-facing URL.
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
HTML / thesis / artifact in hand
|
|
83
|
-
│
|
|
84
|
-
▼
|
|
85
|
-
┌─────────────────────────────────────────────────┐
|
|
86
|
-
│ Is it about ONE specific company or deal? │
|
|
87
|
-
│ (deal IC memo · dashboard for X · X 的 thesis │
|
|
88
|
-
│ · founder briefing for X · X 的 2×2 …) │
|
|
89
|
-
└──────────────┬──────────────────────────────────┘
|
|
90
|
-
│
|
|
91
|
-
yes ────►│ → Llama Command DEAL page
|
|
92
|
-
│ `llama html publish <deal-id-or-name> --file <path> --title "..."`
|
|
93
|
-
│ Renders at /deals/<id>/browse/<slug>.
|
|
94
|
-
│ Use --doc <slug> or --update when updating an existing one.
|
|
95
|
-
│
|
|
96
|
-
no ────►│ Is it cross-deal / institutional knowledge?
|
|
97
|
-
│ (sector landscape · market map · framework · firm-level
|
|
98
|
-
│ thesis · methodology · "AI infra in 2026" …)
|
|
99
|
-
│
|
|
100
|
-
│ yes ──► → Llama Command WIKI entry
|
|
101
|
-
│ Markdown body:
|
|
102
|
-
│ `llama wiki save <slug> --title "..." \`
|
|
103
|
-
│ ` --content "..." --sources "..."`
|
|
104
|
-
│ Standalone HTML page (full-viewport iframe):
|
|
105
|
-
│ `llama wiki save <slug> --title "..." \`
|
|
106
|
-
│ ` --file <path>.html --sources "..."`
|
|
107
|
-
│ Renders at /wiki/<slug>. Sources mandatory.
|
|
108
|
-
│
|
|
109
|
-
│ no ──► Likely doesn't need to live anywhere
|
|
110
|
-
│ durable — confirm with the user before
|
|
111
|
-
│ inventing a destination.
|
|
112
|
-
▼
|
|
113
|
-
┌─────────────────────────────────────────────────┐
|
|
114
|
-
│ Does the user EXPLICITLY say "share with │
|
|
115
|
-
│ founder" / "public share link" / "give it to │
|
|
116
|
-
│ <external person>" / "publish publicly"? │
|
|
117
|
-
└──────────────┬──────────────────────────────────┘
|
|
118
|
-
│
|
|
119
|
-
no ────►│ → STAY on Llama Command. Don't reach for Netlify.
|
|
120
|
-
│
|
|
121
|
-
yes ────►│ → Netlify (only this case).
|
|
122
|
-
│ Use the `netlify-access-guard` workflow:
|
|
123
|
-
│ server-side password + edge 401 verification.
|
|
124
|
-
│ Verify enforcement is at the Netlify edge, not a
|
|
125
|
-
│ browser-side JS fake.
|
|
22
|
+
```bash
|
|
23
|
+
llama deal search "Acme" --limit 10
|
|
24
|
+
llama deal read <dealId> --detail overview
|
|
25
|
+
llama deal create --json create.json
|
|
26
|
+
llama deal write --json write.json
|
|
126
27
|
```
|
|
127
28
|
|
|
128
|
-
|
|
29
|
+
- `search` returns compact Live Page candidates.
|
|
30
|
+
- `read` always returns the Live Page. Expand only when needed with `memory`,
|
|
31
|
+
`files`, `conversation`, `history`, or `all`.
|
|
32
|
+
- `create` submits one intent. Core owns synchronous Drive-folder creation,
|
|
33
|
+
the initial Page and Information, and all Events.
|
|
34
|
+
- `write` accepts only `input.submit`, `information.put`, `page.patch`, or
|
|
35
|
+
`artifact.put`.
|
|
129
36
|
|
|
130
|
-
|
|
37
|
+
Chat and Event are system-owned. Never invent a Chat author, Event type,
|
|
38
|
+
sequence, actor, or timestamp. A raw input belongs in `input.submit`; Core will
|
|
39
|
+
record `input.received` even if no Page or Information update follows.
|
|
131
40
|
|
|
132
|
-
|
|
41
|
+
## Pipeline first
|
|
133
42
|
|
|
134
|
-
|
|
135
|
-
|---|---|---|
|
|
136
|
-
| File a **source packet** with multiple facts and/or one note | `llama deal ingest <dealId> --file packet.json` | Facts + optional note → deal **Feed**, atomically and retry-safe |
|
|
137
|
-
| Record a **sourced, verifiable fact** | `llama deal fact add <dealId> --category <cat> --claim "…" --source "deck p3" --source-url <url>` | Facts → deal **Feed** (FACT card) + citable in the **Memo** |
|
|
138
|
-
| Leave a **comment / opinion / question / reaction** for the team | `llama post <dealId> "…"`; add `--cue` only after explicit permission | Posts → deal **Feed** (POST card); authorized cues create email + UI badge |
|
|
139
|
-
| Write **narrative that belongs in the IC memo** | `llama brief add-text <dealId> --heading "…" --body "…"` | Brief blocks → **Memo tab only — NOT in the Feed** |
|
|
43
|
+
Before researching or creating a company:
|
|
140
44
|
|
|
141
|
-
|
|
45
|
+
1. `llama deal search "<company or founder>"`.
|
|
46
|
+
2. Read the best candidate with `--detail overview`.
|
|
47
|
+
3. Expand only the resource needed for the task.
|
|
48
|
+
4. Create only when no existing company matches.
|
|
142
49
|
|
|
143
|
-
|
|
50
|
+
Do not turn an intake stage, automated enrichment, or another person's opinion
|
|
51
|
+
into investment conviction. Keep source claims, verified evidence, human views,
|
|
52
|
+
and agent inference distinct through `type`, `labels`, `subject`, `value`, and
|
|
53
|
+
provenance.
|
|
144
54
|
|
|
145
|
-
|
|
146
|
-
|---|---|---|
|
|
147
|
-
| Deal metadata (status, stage, valuation, founders, notes, etc.) | Pipeline (Postgres) | `llama deal create` / `llama deal update` |
|
|
148
|
-
| Brief blocks (text / link / embed / callout) | Pipeline | `llama brief add-text` / `add-link` / `add-callout` |
|
|
149
|
-
| **HTML artifact, internal — IC report, dashboard, market map, 2×2, any hand-authored page** | **Llama Command native** (Postgres + sandboxed iframe at `/deals/<id>/browse/<slug>`) | Default path when the user says "deploy to llama", "deploy to llama command", "部署到 llama command", "put this HTML on the deal page", "在 deal 里看这个". **Preferred agent-safe path:** `llama html publish <deal-id-or-name> --file <path> --title "<artifact name>" [--doc <slug>]`. It resolves deal names, avoids silent overwrite, auto-detects sibling asset folders, uploads, then verifies by reading the version back.<br><br>Low-level explicit path remains available: new artifact `llama html upload <dealId> --new --title "<artifact name>" --file <path>`; update existing `llama html upload <dealId> --doc <slug> --file <path>`.<br><br>Never paste large HTML into chat or MCP tool arguments. Use file paths. Do NOT default to Netlify for internal pages. |
|
|
150
|
-
| HTML artifact, external — founder-facing share link | Netlify | Only when the user explicitly says "share link", "give it to the founder", "publish publicly". Use the `netlify-access-guard` workflow (server-side password + edge 401 verification). |
|
|
151
|
-
| Insights, decisions, framework improvements | Wiki (markdown) | `llama wiki save <slug> --content "..."` (with attribution — see below) |
|
|
152
|
-
| **HTML wiki entry — standalone HTML page hosted at `/wiki/<slug>`** (sector landscape, market map, dashboard, hand-styled thesis page) | **Wiki (HTML)** | `llama wiki save <slug> --title "..." --file <path.html> --sources "..."`. Auto-detects content_type=html from extension. Public page is full-viewport sandboxed iframe takeover (no wiki chrome). Sources/status/title still required; appears in `wiki search` + backlinks. Use when the user says "deploy this HTML to wiki", "wiki 词条", "make this page a wiki entry". HTML must be self-contained (inline CSS/JS, image data URIs or external URLs) — asset bundles aren't supported on wiki yet. **Native comments + working in-page (#) anchor links are injected automatically** — readers discuss inline and the table of contents scrolls; you don't wire anything up (pages that already embed the comment widget are left as-is). |
|
|
153
|
-
| Large files (deck / PDF / transcript) | Drive deal folder | the deal's `folder_url` (from `llama deal show`) → upload via your filesystem / Drive tool |
|
|
154
|
-
| Cross-team cues | Inbox + email | `llama post <dealId> "@<teammate> ..." --cue` — use `--cue` only after the user explicitly authorized that recipient |
|
|
55
|
+
## Preserve the user's words
|
|
155
56
|
|
|
156
|
-
|
|
57
|
+
Every user-originated mutation must contain either the exact original wording
|
|
58
|
+
or the canonical Chat Record that contains it:
|
|
157
59
|
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"origin": {
|
|
63
|
+
"kind": "user",
|
|
64
|
+
"originalUserUtterance": "the user's exact words"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
158
67
|
```
|
|
159
|
-
**[Name · YYYY-MM-DD · source context · fact|opinion]**
|
|
160
|
-
Content. One block, one attribution. Don't mix fact and opinion in a single block.
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
- `fact` carries a verification tag (✅ verified, ⚠️ partial, ❌ disputed, 🔲 untagged).
|
|
164
|
-
- `opinion` doesn't need a verification tag.
|
|
165
|
-
- AI-generated content: tag as `**[AI · YYYY-MM-DD · source · analysis]**`. **Never impersonate a human's opinion.**
|
|
166
|
-
|
|
167
|
-
## Autonomy levels
|
|
168
|
-
|
|
169
|
-
| Level | Type | Behaviour |
|
|
170
|
-
|---|---|---|
|
|
171
|
-
| **L0** | Reads (`search`, `show`, `list`) | Just do it. Don't announce. Integrate the result into your reply. |
|
|
172
|
-
| **L1** | Low-risk writes (cue-free timeline post, wiki append, add fact, add tag) | Do it, then tell the user **one line** afterward. |
|
|
173
|
-
| **L2** | Medium-risk writes (new deal, change stage, change owner, new wiki page) | Ask once: "Y/n — I'm about to do X". On yes, execute and report. Don't re-ask details. |
|
|
174
|
-
| **L2-cue** | Any assistant-authored write that resolves to a teammate cue | Require explicit permission for the resolved people and inbox/email channels. Retry the exact write with `--cue` only after yes. If the user already explicitly asked to cue them, do not ask twice. |
|
|
175
|
-
| **L3** | High-risk (delete deal, bulk change, overwrite someone else's wiki, force-push, regulatory-relevant) | Detailed explanation + explicit confirmation. Provide a dry-run / undo path when possible. |
|
|
176
|
-
|
|
177
|
-
When in doubt, lean to a higher level (more confirmation), not lower.
|
|
178
|
-
|
|
179
|
-
## Communication style
|
|
180
|
-
|
|
181
|
-
| Good | Bad |
|
|
182
|
-
|---|---|
|
|
183
|
-
| "I checked X — found Y" | "Should I check X?" |
|
|
184
|
-
| "Done. Renamed Z to Q." | "Should I rename Z?" |
|
|
185
|
-
| "X isn't in pipeline. Add? (Y/n)" | "X seems missing. What do you want to do?" |
|
|
186
|
-
| "Updated stage to 'Diligence'." | "I think we should update the stage." |
|
|
187
|
-
|
|
188
|
-
Default to action. Ask only for genuine judgment.
|
|
189
|
-
|
|
190
|
-
**Prompts you give the user should have three properties**: specific, single decision, default value. Bad: "What do you want to do?" Good: "Add to pipeline? (Y/n, default Y)".
|
|
191
68
|
|
|
192
|
-
|
|
69
|
+
Never replace the original words with an agent summary. The summary may be
|
|
70
|
+
stored separately in Information or the Live Page.
|
|
193
71
|
|
|
194
|
-
|
|
195
|
-
|---|---|
|
|
196
|
-
| `Error[NO_AUTH]` | Tell user: run `llama auth login` (browser sign-in via Google, OAuth tokens stored in OS Keychain). For unattended/CI: mint a long-lived PAT at `command.llamaventures.vc/settings/tokens` and `llama token set <llc_...>`. |
|
|
197
|
-
| `Error[UNAUTHORIZED]` | Credentials rejected (revoked / expired / wrong account). If using OAuth: `llama auth login` again. If using PAT: re-mint. |
|
|
198
|
-
| HTTP 5xx | Wait 5s, retry once. Two failures → tell the user "Command unavailable, will retry later." |
|
|
199
|
-
| `Too many failed authentication attempts` (HTTP 429) | IP rate-limit. Wait until next UTC hour, OR switch network (e.g. tether to phone). |
|
|
72
|
+
## Create
|
|
200
73
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
llama deal fact uncontest <dealId> <factId> --reason "..." # lift a wrong contest; verify does NOT
|
|
222
|
-
# writable: status theirStage stage notes dealOwner source sourceDirection description website
|
|
223
|
-
# location founders proposedAmount roundSize valuation sector subsector
|
|
224
|
-
# foundedYear leadInvestor investors (each write logs a deal_events row)
|
|
225
|
-
|
|
226
|
-
# Our Stage vocabulary starts with:
|
|
227
|
-
# Interested → Outreached → Sourced → First Meeting → Diligence → Partner Meeting → Term Sheet → Invested
|
|
228
|
-
# `Interested` is pre-contact intent to track. Do not use `manualTags=Interested`
|
|
229
|
-
# for new writes.
|
|
230
|
-
# `Outreached` is relationship memory only. Do not inflate it to `Sourced`
|
|
231
|
-
# unless a real relationship signal exists.
|
|
232
|
-
# `sourceDirection` is separate: Inbound = came into the firm; Outbound =
|
|
233
|
-
# we found/listed/reached out first.
|
|
234
|
-
|
|
235
|
-
# Brief blocks
|
|
236
|
-
llama brief blocks <dealId>
|
|
237
|
-
llama brief add-text <dealId> --heading "..." --body "..."
|
|
238
|
-
llama brief add-link <dealId> --url "..." --label "..."
|
|
239
|
-
llama brief add-callout <dealId> --tone insight|warning|info|success --heading "..." --body "..."
|
|
240
|
-
|
|
241
|
-
# Deal HTML — native deploy to /deals/<id>/browse/<slug>
|
|
242
|
-
# Default path when user says "deploy to llama / 部署到 llama command / put this HTML on the deal page".
|
|
243
|
-
# Each deal can host many slug-scoped artifacts. ALWAYS declare intent: new vs update.
|
|
244
|
-
|
|
245
|
-
# Agent-safe default: pass a file path, not inline HTML.
|
|
246
|
-
llama html publish "<deal name or id>" --file ./report.html --title "Consumer-Facing Thesis"
|
|
247
|
-
llama html publish "<deal name or id>" --file ./report.html --doc thesis --update
|
|
248
|
-
|
|
249
|
-
llama html docs <dealId> # list slugs currently on this deal
|
|
250
|
-
llama html docs create <dealId> <slug> [--title "..."] # pre-create a slot (optional; upload --new also creates)
|
|
251
|
-
llama html docs archive <dealId> <slug> # soft-archive a doc
|
|
252
|
-
|
|
253
|
-
# Add a NEW artifact (slug must NOT already exist):
|
|
254
|
-
llama html upload <dealId> --new --title "Consumer-Facing Thesis" --file ./thesis.html
|
|
255
|
-
llama html upload <dealId> --new --doc thesis --title "Consumer-Facing Thesis" --file ./thesis.html
|
|
256
|
-
|
|
257
|
-
# Update an EXISTING artifact (slug must already exist):
|
|
258
|
-
llama html upload <dealId> --doc <slug> --file ./report.html [--assets ./assets]
|
|
259
|
-
|
|
260
|
-
# Common helpers (all accept --doc <slug>; default 'main'):
|
|
261
|
-
llama html show <dealId> [--doc <slug>] [--out path] [--json] # current HTML → stdout
|
|
262
|
-
llama html versions <dealId> [--doc <slug>] # version history (incl. soft-deleted)
|
|
263
|
-
llama html restore <dealId> <version> [--doc <slug>] # promote old version to latest
|
|
264
|
-
llama html reset <dealId> [--doc <slug>] # soft-delete latest (browse reverts to empty)
|
|
265
|
-
|
|
266
|
-
# Safety contract (since 1.5.0):
|
|
267
|
-
# - Coding agents should use `llama html publish ... --file <path>` for memos/reports.
|
|
268
|
-
# Do not move large HTML through chat text or MCP `html_upload` string args.
|
|
269
|
-
# - Successful uploads return `sha256` and `client_upload_id`; verification
|
|
270
|
-
# reads the server copy back and compares version/bytes/sha256 when available.
|
|
271
|
-
# If a network retry is needed for the same attempt, reuse `--upload-id`.
|
|
272
|
-
# - Bare `llama html upload <id> --file X` REFUSES if 'main' already has content.
|
|
273
|
-
# The error names the existing artifact and suggests --doc main / --new --title "...".
|
|
274
|
-
# - --slug is silently accepted as an alias for --doc (agent-confusion mitigation).
|
|
275
|
-
# - Unknown flags print a warning to stderr suggesting a likely match.
|
|
276
|
-
# - JSON output gains `mode: 'created' | 'updated'` so callers can branch.
|
|
277
|
-
|
|
278
|
-
# Wiki (knowledge base)
|
|
279
|
-
llama wiki search "<query>"
|
|
280
|
-
llama wiki read <slug> [--lang en|zh]
|
|
281
|
-
|
|
282
|
-
# Markdown entry (default):
|
|
283
|
-
llama wiki save <slug> --title "..." --content "..." --sources "url1;url2"
|
|
284
|
-
|
|
285
|
-
# HTML entry — standalone page at /wiki/<slug>, full-viewport sandboxed iframe:
|
|
286
|
-
llama wiki save <slug> --title "..." --file path.html --sources "..." [--content-type html]
|
|
287
|
-
# .html / .htm extension auto-implies content_type=html.
|
|
288
|
-
# --content-type html (or markdown) overrides the inference.
|
|
289
|
-
# Refuses to switch content_type on an existing slug; delete + re-create
|
|
290
|
-
# if you really mean to change format.
|
|
291
|
-
# Delete / restore (soft, reversible — CONSTITUTION §8):
|
|
292
|
-
llama wiki delete <slug> [--lang en|zh]
|
|
293
|
-
llama wiki restore <slug> [--lang en|zh]
|
|
294
|
-
|
|
295
|
-
# Timeline + posts
|
|
296
|
-
llama timeline <dealId>
|
|
297
|
-
llama post <dealId> "message" # cue-free note
|
|
298
|
-
llama post <dealId> "@name respond" --cue # only after explicit user approval
|
|
299
|
-
|
|
300
|
-
# Mentions inbox
|
|
301
|
-
llama mentions
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"companyName": "Acme",
|
|
77
|
+
"page": {
|
|
78
|
+
"website": "https://example.com",
|
|
79
|
+
"stage": "Diligence"
|
|
80
|
+
},
|
|
81
|
+
"information": [
|
|
82
|
+
{
|
|
83
|
+
"type": "traction.claim",
|
|
84
|
+
"labels": ["founder_reported", "unverified"],
|
|
85
|
+
"subject": {"company": "Acme"},
|
|
86
|
+
"value": {"arrUsd": 320000}
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"origin": {
|
|
90
|
+
"kind": "user",
|
|
91
|
+
"originalUserUtterance": "Acme says ARR is about $320k."
|
|
92
|
+
}
|
|
93
|
+
}
|
|
302
94
|
```
|
|
303
95
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
## MCP-native agents
|
|
96
|
+
Core adds `operation: deal.create` and a stable idempotency key. Callers cannot
|
|
97
|
+
supply a Drive folder identity.
|
|
307
98
|
|
|
308
|
-
|
|
99
|
+
## Write
|
|
309
100
|
|
|
310
|
-
|
|
101
|
+
Always submit raw user information first when losing it would be unacceptable:
|
|
311
102
|
|
|
312
103
|
```json
|
|
313
|
-
{
|
|
104
|
+
{
|
|
105
|
+
"operation": "input.submit",
|
|
106
|
+
"dealId": "<uuid>",
|
|
107
|
+
"format": "text",
|
|
108
|
+
"content": "the complete input",
|
|
109
|
+
"source": {"kind": "meeting_note"},
|
|
110
|
+
"origin": {
|
|
111
|
+
"kind": "user",
|
|
112
|
+
"originalUserUtterance": "the complete input"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
314
115
|
```
|
|
315
116
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
- `auth_status` — verify creds + identity (call first if anything 401s)
|
|
319
|
-
- `agent_bootstrap` — fetch the live Command + Llama OS runtime manifest
|
|
320
|
-
- `skills_search` / `skills_read` — discover and read authenticated runtime skills
|
|
321
|
-
- `activity_query` — query new deals and meaningful updates without scanning raw timelines
|
|
322
|
-
- `object_inspect` — explain Command URLs, 404s, deleted objects, and lifecycle trail
|
|
323
|
-
- `deal_search` / `deal_show` / `deal_create` / `deal_update`
|
|
324
|
-
- `brief_blocks` / `brief_add_text` / `brief_add_link` / `brief_add_callout`
|
|
325
|
-
- `wiki_search` / `wiki_save` (accepts `content_type: 'markdown' | 'html'` — HTML entries render as full-viewport sandboxed iframe at `/wiki/<slug>`) / `wiki_delete` / `wiki_restore` (soft-delete, reversible)
|
|
326
|
-
- `timeline` / `post`
|
|
327
|
-
- `mentions_list`
|
|
328
|
-
- `pitch_start` / `pitch_send_message` / `pitch_upload_file` / `pitch_status` / `pitch_finalize` — public intake (no Llama token needed; for founders / EAs / external agents)
|
|
329
|
-
|
|
330
|
-
You can also fetch this exact briefing as an MCP prompt named `agent_briefing`.
|
|
117
|
+
Then, when useful, write a structured Information unit:
|
|
331
118
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
write access to the pipeline). Instead:
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"operation": "information.put",
|
|
122
|
+
"dealId": "<uuid>",
|
|
123
|
+
"type": "founder.opinion",
|
|
124
|
+
"labels": ["human_view"],
|
|
125
|
+
"subject": {"person": "Founder name"},
|
|
126
|
+
"value": {"speaker": "user", "view": "strong product taste"},
|
|
127
|
+
"origin": {
|
|
128
|
+
"kind": "user",
|
|
129
|
+
"originalUserUtterance": "I think the founder has strong product taste."
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
347
133
|
|
|
348
|
-
|
|
349
|
-
Ventures' public intake agent. The conversation flows through
|
|
350
|
-
`/api/external/*` (PoW + cookie auth, no token needed).
|
|
351
|
-
- Tools: `pitch_start({name, email})`, `pitch_send_message({message})`,
|
|
352
|
-
`pitch_upload_file({path})`, `pitch_status()`, `pitch_finalize()`.
|
|
353
|
-
- The intake agent is the one with structured-extraction tools
|
|
354
|
-
(`record_intake_field`, `finalize_intake` with 12-dim verdict) — your
|
|
355
|
-
job is to relay the founder's pitch faithfully, ask clarifying questions
|
|
356
|
-
on their behalf if useful, and pass the verdict back when finalized.
|
|
357
|
-
- Caps you'll hit (server-side): 5 sessions/IP/day, 3 sessions/email/day,
|
|
358
|
-
30min idle timeout, 100 messages/session, 1M tokens/session.
|
|
134
|
+
Update the human-facing state only when you know the intended field:
|
|
359
135
|
|
|
360
|
-
|
|
361
|
-
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"operation": "page.patch",
|
|
139
|
+
"dealId": "<uuid>",
|
|
140
|
+
"patch": {"location": "San Francisco, CA"},
|
|
141
|
+
"origin": {
|
|
142
|
+
"kind": "user",
|
|
143
|
+
"originalUserUtterance": "The company is in SF, CA."
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
```
|
|
362
147
|
|
|
363
|
-
|
|
148
|
+
Artifacts use `artifact.put`. Treat them as immutable source material. Read the
|
|
149
|
+
artifact, then decide whether its content deserves Information or a Page patch.
|
|
364
150
|
|
|
365
|
-
|
|
366
|
-
- Runtime home screen: `GET /api/agent/manifest` via `llama agent bootstrap` or MCP `agent_bootstrap`
|
|
367
|
-
- Fallback copy: `AGENT_BRIEFING.md` in the `@llamaventures/cli` npm package
|
|
368
|
-
- Public source: <https://github.com/Llama-Ventures/llama-cli/blob/main/AGENT_BRIEFING.md>
|
|
151
|
+
## Verification and safety
|
|
369
152
|
|
|
370
|
-
|
|
371
|
-
|
|
153
|
+
- Read back the affected resource before saying it was saved.
|
|
154
|
+
- Stable retries are safe; the CLI derives an idempotency key when absent.
|
|
155
|
+
- Never write directly to PostgreSQL in ordinary product work.
|
|
156
|
+
- Never fall back when Core returns `CLI_VERSION_UNSUPPORTED` or
|
|
157
|
+
`DEAL_COMMAND_RETIRED`. Upgrade the CLI and retry the intended four-action
|
|
158
|
+
command.
|
|
159
|
+
- Wiki, admin audit, external pitch, authentication, and skill discovery are
|
|
160
|
+
separate domains. They do not expand the Deal action space.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.0] - 2026-08-30
|
|
4
|
+
|
|
5
|
+
- Replace the split Deal command surface with exactly four actions: `search`,
|
|
6
|
+
`read`, `create`, and `write`.
|
|
7
|
+
- Make Live Deal Page, Deal Information, Artifact, Chat Record, and Deal Event
|
|
8
|
+
the only Deal business resources exposed in the agent contract.
|
|
9
|
+
- Retire legacy Deal CLI/MCP verbs with deterministic upgrade guidance instead
|
|
10
|
+
of falling back to old APIs.
|
|
11
|
+
- Preserve exact user wording for user-originated writes and make Event/Chat
|
|
12
|
+
system-owned.
|
|
13
|
+
- Keep Wiki, admin audit, external pitch, authentication, preferences, and
|
|
14
|
+
progressive skill discovery as separate non-Deal domains.
|
|
15
|
+
|
|
3
16
|
All notable changes to `@llamaventures/cli` are documented here.
|
|
4
17
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
|
|
5
18
|
this project adheres to [Semantic Versioning](https://semver.org).
|
|
6
19
|
|
|
7
20
|
## [Unreleased]
|
|
8
21
|
|
|
22
|
+
## [1.26.0] - 2026-08-11
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- `llama wiki save <slug> --file <path>.{pdf,docx,xlsx}` uploads the document
|
|
26
|
+
itself as the wiki entry, so readers open it at `/wiki/<slug>` instead of an
|
|
27
|
+
article describing it. A PDF opens in the browser's own viewer; DOCX and XLSX
|
|
28
|
+
are converted for reading with the original still downloadable.
|
|
29
|
+
- `wiki_save_file` MCP tool — the same publish from a local file path, for
|
|
30
|
+
MCP-native agents, mirroring `html_upload_file`.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- Pin the Core API consumer contract to 3.33.0. The wiki document upload calls
|
|
34
|
+
an operation that does not exist on older Llama Command.
|
|
35
|
+
|
|
36
|
+
### Removed
|
|
37
|
+
- Retire every CLI/MCP Memo mutation path. `llama memo` and MCP now expose the
|
|
38
|
+
current Memo read-only; generation runs only from Llama Command's durable
|
|
39
|
+
Memo Agent. Deal enrichment no longer accepts `--memo` / `generateMemo`.
|
|
40
|
+
|
|
9
41
|
## [1.25.0] - 2026-08-05
|
|
10
42
|
|
|
11
43
|
### Added
|