@llamaventures/cli 1.17.3 → 1.18.1
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 +8 -5
- package/CHANGELOG.md +21 -1
- package/README.md +11 -3
- package/README.zh-CN.md +10 -3
- package/bin/llama-mcp.mjs +47 -5
- package/bin/llama.mjs +90 -11
- package/package.json +1 -1
package/AGENT_BRIEFING.md
CHANGED
|
@@ -29,6 +29,7 @@ This npm package is public, but Llama OS skills are private. Do not assume the s
|
|
|
29
29
|
- Use `llama agent-onboard` or MCP `agent_briefing` for the server-owned Agent Runtime Contract. The npm-bundled text is fallback only.
|
|
30
30
|
- Use `llama skills search "<task>"` or MCP `skills_search` before choosing a Llama workflow.
|
|
31
31
|
- Use `llama skills show <slug>` or MCP `skills_read` only for the relevant skill.
|
|
32
|
+
- Use `llama activity new-deals|updated-deals` or MCP `activity_query` before scanning raw deal timelines for recent portfolio movement.
|
|
32
33
|
- 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."
|
|
33
34
|
|
|
34
35
|
The boundary matters: public CLI/MCP discovers skills, but authenticated Command decides which skill content the token may read.
|
|
@@ -44,6 +45,7 @@ Any time the user mentions a company name or founder name:
|
|
|
44
45
|
- Use `--status Outreached` when we only contacted/logged the company and have no response or effective relationship yet.
|
|
45
46
|
- Use `--status Sourced` only once there is a response, intro, meeting, or another real relationship signal.
|
|
46
47
|
- Also set `--source-direction Inbound` if the deal came into the firm; set `--source-direction Outbound` if Llama found/listed/reached out first.
|
|
48
|
+
- 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.
|
|
47
49
|
4. If user gives you new facts (status / valuation / founder note) → `llama deal update` immediately, tell the user **one line** afterward.
|
|
48
50
|
|
|
49
51
|
Don't:
|
|
@@ -61,7 +63,7 @@ A teammate says "I just met them and heard…" or pastes a chunk of notes. Your
|
|
|
61
63
|
|
|
62
64
|
1. **Find the deal** — `llama deal search "<name>"` (Pipeline First). New name → offer to create it.
|
|
63
65
|
2. **Split what they gave you into two kinds** — this is the whole data model:
|
|
64
|
-
- **Verifiable claims → facts.** `llama deal fact add <dealId> --category <cat> --claim "…" --source "<where it came from>"
|
|
66
|
+
- **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.
|
|
65
67
|
- **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".
|
|
66
68
|
- A pasted blob → pull the verifiable claims out as facts, capture their take as a note.
|
|
67
69
|
3. **Read it back before you claim it's saved.** A tool call returning `{ok:true}` is NOT proof the content is where the user will look for it. After filing, run `llama deal feed <dealId>` and confirm your fact/note actually appears, THEN tell the user in plain language what you recorded and where. Never say "记好了 / saved" from the return value 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 it's not in the feed, you routed it wrong — fix it.
|
|
@@ -128,7 +130,7 @@ These three look similar but land in different surfaces. Don't infer from the co
|
|
|
128
130
|
|
|
129
131
|
| You want to… | Command | Lands in |
|
|
130
132
|
|---|---|---|
|
|
131
|
-
| Record a **sourced, verifiable fact** | `llama deal fact add <dealId> --category <cat> --claim "…" --source <url>` | Facts → deal **Feed** (FACT card) + citable in the **Memo** |
|
|
133
|
+
| 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** |
|
|
132
134
|
| Leave a **comment / opinion / question / reaction** for the team | `llama post <dealId> "…"` (`@name` to notify) | Posts → deal **Feed** (POST card); `@mention` fires email + UI badge |
|
|
133
135
|
| Write **narrative that belongs in the IC memo** | `llama brief add-text <dealId> --heading "…" --body "…"` | Brief blocks → **Memo tab only — NOT in the Feed** |
|
|
134
136
|
|
|
@@ -208,8 +210,8 @@ llama deal list [--owner ...] [--status ...]
|
|
|
208
210
|
|
|
209
211
|
# Pipeline — write
|
|
210
212
|
llama deal create "Company" --description "..." --source-direction Outbound --status Interested
|
|
211
|
-
llama deal create "Company" --description "..." --source-direction Outbound --status Outreached
|
|
212
|
-
llama deal create "Company" --description "..." --source-direction Inbound --status Sourced
|
|
213
|
+
llama deal create "Company" --description "..." --source-direction Outbound --status Outreached --deal-owner "owner@llamaventures.vc"
|
|
214
|
+
llama deal create "Company" --description "..." --source-direction Inbound --status Sourced --deal-owner "Exact Name"
|
|
213
215
|
llama deal update <dealId> <field> <value>
|
|
214
216
|
# writable: status theirStage stage notes dealOwner source sourceDirection description website
|
|
215
217
|
# location founders proposedAmount roundSize valuation sector subsector
|
|
@@ -296,7 +298,7 @@ Run `llama --help` for the full surface (~40 commands).
|
|
|
296
298
|
|
|
297
299
|
## MCP-native agents
|
|
298
300
|
|
|
299
|
-
If you support [MCP](https://modelcontextprotocol.io), **prefer the MCP server over parsing CLI output.** The same package ships `llama-mcp` (
|
|
301
|
+
If you support [MCP](https://modelcontextprotocol.io), **prefer the MCP server over parsing CLI output.** The same package ships `llama-mcp` (59 typed tools, identical auth chain).
|
|
300
302
|
|
|
301
303
|
Add to your MCP client config (Claude Desktop / Claude Code / Cursor / OpenClaw / Codex / etc.):
|
|
302
304
|
|
|
@@ -309,6 +311,7 @@ Tools available:
|
|
|
309
311
|
- `auth_status` — verify creds + identity (call first if anything 401s)
|
|
310
312
|
- `agent_bootstrap` — fetch the live Command + Llama OS runtime manifest
|
|
311
313
|
- `skills_search` / `skills_read` — discover and read authenticated runtime skills
|
|
314
|
+
- `activity_query` — query new deals and meaningful updates without scanning raw timelines
|
|
312
315
|
- `object_inspect` — explain Command URLs, 404s, deleted objects, and lifecycle trail
|
|
313
316
|
- `deal_search` / `deal_show` / `deal_create` / `deal_update`
|
|
314
317
|
- `brief_blocks` / `brief_add_text` / `brief_add_link` / `brief_add_callout`
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,22 @@ this project adheres to [Semantic Versioning](https://semver.org).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.18.1] - 2026-07-09
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- Clarified the Command facts write contract across CLI, MCP, and agent docs:
|
|
13
|
+
`claim` is canonical, `value` remains a compatibility alias, `sourceUrl`
|
|
14
|
+
round-trips as provenance, and categories are free text. `deal create` now
|
|
15
|
+
forwards `--deal-owner` using name, email, or user id.
|
|
16
|
+
|
|
17
|
+
## [1.18.0] - 2026-07-06
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- `llama activity new-deals|updated-deals|events` plus MCP `activity_query`
|
|
21
|
+
for agent-friendly reads over Command's curated activity projection. Agents
|
|
22
|
+
can ask for recent deal creations or meaningful deal updates without scanning
|
|
23
|
+
raw timelines or event-bus payloads.
|
|
24
|
+
|
|
9
25
|
## [1.17.3] - 2026-07-01
|
|
10
26
|
|
|
11
27
|
### Changed
|
|
@@ -492,7 +508,11 @@ assistant-drafted (🤖) and enforces the AI trust ceiling.
|
|
|
492
508
|
|
|
493
509
|
---
|
|
494
510
|
|
|
495
|
-
[Unreleased]: https://github.com/Llama-Ventures/llama-cli/compare/v1.
|
|
511
|
+
[Unreleased]: https://github.com/Llama-Ventures/llama-cli/compare/v1.18.1...HEAD
|
|
512
|
+
[1.18.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.18.0...v1.18.1
|
|
513
|
+
[1.18.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.17.3...v1.18.0
|
|
514
|
+
[1.17.3]: https://github.com/Llama-Ventures/llama-cli/compare/v1.17.2...v1.17.3
|
|
515
|
+
[1.17.2]: https://github.com/Llama-Ventures/llama-cli/compare/v1.17.1...v1.17.2
|
|
496
516
|
[1.17.1]: https://github.com/Llama-Ventures/llama-cli/compare/v1.17.0...v1.17.1
|
|
497
517
|
[1.17.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.16.0...v1.17.0
|
|
498
518
|
[1.16.0]: https://github.com/Llama-Ventures/llama-cli/compare/v1.15.1...v1.16.0
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<strong>The Llama Ventures CLI & MCP server.</strong><br/>
|
|
9
9
|
One package, two binaries: <code>llama</code> — the CLI for humans and scripts —
|
|
10
|
-
and <code>llama-mcp</code> — a stdio MCP server with
|
|
10
|
+
and <code>llama-mcp</code> — a stdio MCP server with 59 typed tools for any
|
|
11
11
|
MCP-native agent. Both share the same auth chain, HTTP client, and error
|
|
12
12
|
format, and talk to <a href="https://command.llamaventures.vc">command.llamaventures.vc</a>.
|
|
13
13
|
</p>
|
|
@@ -94,7 +94,10 @@ schema forward-compatibility. Prefer it even from scripts.
|
|
|
94
94
|
llama deal search "acme ai" # find deals (deal list takes the same filters)
|
|
95
95
|
llama deal show <dealId>
|
|
96
96
|
llama deal feed <dealId> # every contribution, newest first
|
|
97
|
-
llama
|
|
97
|
+
llama activity new-deals --since 24h # recent deal creations
|
|
98
|
+
llama activity updated-deals --since 7d # meaningful updates grouped by deal
|
|
99
|
+
llama deal create "Acme AI" --source alex --deal-owner owner@llamaventures.vc --source-direction Outbound --status Interested
|
|
100
|
+
llama deal fact add <dealId> --category funding --claim "Raised a seed round" --source "deck p3" --source-url https://...
|
|
98
101
|
llama deal update <dealId> status Diligence
|
|
99
102
|
llama post <dealId> "note body"
|
|
100
103
|
llama brief add-text <dealId> --heading "..." --body "..."
|
|
@@ -109,6 +112,11 @@ Status vocabulary — `Interested`: tracked before any contact ·
|
|
|
109
112
|
signal exists. `sourceDirection` is separate: `Inbound` came to the firm,
|
|
110
113
|
`Outbound` we reached out first.
|
|
111
114
|
|
|
115
|
+
Facts use `claim` for the fact text. `source` is a readable provenance label
|
|
116
|
+
and `sourceUrl` is the canonical evidence URL; both round-trip from the API.
|
|
117
|
+
For deal owners, use an exact `/api/field-options` `dealOwner` value, a user
|
|
118
|
+
email, or a numeric user id.
|
|
119
|
+
|
|
112
120
|
Run `llama --help` for the group index, `llama help all` for the full
|
|
113
121
|
reference (100+ commands). Deletes are soft and audit-logged everywhere.
|
|
114
122
|
|
|
@@ -125,7 +133,7 @@ Authenticated calls send bounded, content-redacted telemetry to Command;
|
|
|
125
133
|
|
|
126
134
|
## MCP server
|
|
127
135
|
|
|
128
|
-
`llama-mcp` is a stdio Model Context Protocol server exposing
|
|
136
|
+
`llama-mcp` is a stdio Model Context Protocol server exposing 59 typed tools
|
|
129
137
|
that mirror the most-used CLI surface. Every tool is named and scoped — there
|
|
130
138
|
is deliberately no generic API passthrough. Auth is identical to the CLI's
|
|
131
139
|
chain. For the exact live list, pipe `tools/list` through it:
|
package/README.zh-CN.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<strong>Llama Ventures 的 CLI 与 MCP server。</strong><br/>
|
|
9
9
|
一个包、两个可执行文件:<code>llama</code>——给人和脚本用的 CLI;
|
|
10
|
-
<code>llama-mcp</code>——带
|
|
10
|
+
<code>llama-mcp</code>——带 59 个类型化工具的 stdio MCP server,任何
|
|
11
11
|
MCP 原生 agent 都能接。两者共享同一认证链、同一 HTTP 客户端、同一错误格式,
|
|
12
12
|
连接 <a href="https://command.llamaventures.vc">command.llamaventures.vc</a>。
|
|
13
13
|
</p>
|
|
@@ -116,7 +116,10 @@ CLI 是 canonical 接口——认证、错误格式、schema 前向兼容都由
|
|
|
116
116
|
llama deal search "acme ai" # 找 deal(deal list 用同一套过滤参数)
|
|
117
117
|
llama deal show <dealId>
|
|
118
118
|
llama deal feed <dealId> # 该 deal 的全部贡献,最新在前
|
|
119
|
-
llama
|
|
119
|
+
llama activity new-deals --since 24h # 最近新建的 deal
|
|
120
|
+
llama activity updated-deals --since 7d # 按 deal 聚合的实质更新
|
|
121
|
+
llama deal create "Acme AI" --source alex --deal-owner owner@llamaventures.vc --source-direction Outbound --status Interested
|
|
122
|
+
llama deal fact add <dealId> --category funding --claim "Raised a seed round" --source "deck p3" --source-url https://...
|
|
120
123
|
llama deal update <dealId> status Diligence
|
|
121
124
|
llama post <dealId> "备注内容"
|
|
122
125
|
llama brief add-text <dealId> --heading "..." --body "..."
|
|
@@ -130,6 +133,10 @@ Status 语义——`Interested`:接触前先记录关注 · `Outreached`:已
|
|
|
130
133
|
尚无回应 · `Sourced`:已有真实关系信号。`sourceDirection` 是独立维度:
|
|
131
134
|
`Inbound` 流入,`Outbound` 我们主动。
|
|
132
135
|
|
|
136
|
+
Facts 的正文用 `claim`。`source` 是人可读来源标签,`sourceUrl` 是 canonical
|
|
137
|
+
证据 URL;两者都会从 API 回显。`dealOwner` 请用 `/api/field-options`
|
|
138
|
+
里的精确 `dealOwner` 值、用户邮箱,或数字 user id。
|
|
139
|
+
|
|
133
140
|
`llama --help` 看分组索引,`llama help all` 看全部 100+ 命令。
|
|
134
141
|
所有删除默认软删除、有审计记录。
|
|
135
142
|
|
|
@@ -145,7 +152,7 @@ MCP server 在 `isError: true` 内容里返回相同前缀。认证请求会向
|
|
|
145
152
|
|
|
146
153
|
## MCP server
|
|
147
154
|
|
|
148
|
-
`llama-mcp` 是 stdio MCP server,
|
|
155
|
+
`llama-mcp` 是 stdio MCP server,59 个类型化工具镜像 CLI 最常用的命令面。
|
|
149
156
|
每个工具具名、有边界——**故意不提供**通用 API passthrough。认证链与 CLI
|
|
150
157
|
完全一致。精确工具清单以 `tools/list` 为准:
|
|
151
158
|
|
package/bin/llama-mcp.mjs
CHANGED
|
@@ -349,6 +349,41 @@ server.registerTool(
|
|
|
349
349
|
}
|
|
350
350
|
);
|
|
351
351
|
|
|
352
|
+
server.registerTool(
|
|
353
|
+
"activity_query",
|
|
354
|
+
{
|
|
355
|
+
description:
|
|
356
|
+
"Read Command's curated agent activity projection. Use this before " +
|
|
357
|
+
"scanning raw timelines or event-bus payloads. Examples: new deals in " +
|
|
358
|
+
"the past 24h, deals with meaningful updates in the past 7d, or recent " +
|
|
359
|
+
"fact/memo/brief events. Returns source ids so callers can drill down.",
|
|
360
|
+
inputSchema: {
|
|
361
|
+
kind: z
|
|
362
|
+
.enum(["events", "new_deals", "updated_deals"])
|
|
363
|
+
.default("events")
|
|
364
|
+
.describe("events = raw curated rows; new_deals = deal.created; updated_deals = grouped meaningful deal updates"),
|
|
365
|
+
since: z.string().optional().describe("24h, 7d, 30d, or ISO timestamp; default 24h"),
|
|
366
|
+
limit: z.number().optional().describe("default 50, cap 100"),
|
|
367
|
+
dealId: z.string().optional().describe("optional single deal UUID"),
|
|
368
|
+
entity: z.enum(["deal", "wiki", "all"]).optional().describe("default deal"),
|
|
369
|
+
verb: z.string().optional().describe("comma-separated activity verbs, e.g. fact.added,brief.revised"),
|
|
370
|
+
cursor: z.number().optional().describe("pagination cursor from next_cursor"),
|
|
371
|
+
minSignificance: z.number().optional().describe("1..3; default 2, new_deals default 3"),
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
async ({ kind, since, limit, dealId, entity, verb, cursor, minSignificance } = {}) => {
|
|
375
|
+
const params = new URLSearchParams({ kind: kind || "events" });
|
|
376
|
+
if (since) params.set("since", since);
|
|
377
|
+
if (limit) params.set("limit", String(limit));
|
|
378
|
+
if (dealId) params.set("deal_id", dealId);
|
|
379
|
+
if (entity) params.set("entity", entity);
|
|
380
|
+
if (verb) params.set("verb", verb);
|
|
381
|
+
if (cursor) params.set("cursor", String(cursor));
|
|
382
|
+
if (minSignificance) params.set("min_sig", String(minSignificance));
|
|
383
|
+
return callApi("GET", `/api/agent/activity?${params}`);
|
|
384
|
+
}
|
|
385
|
+
);
|
|
386
|
+
|
|
352
387
|
// ============================================================
|
|
353
388
|
// Deals — read
|
|
354
389
|
// ============================================================
|
|
@@ -436,7 +471,11 @@ server.registerTool(
|
|
|
436
471
|
.describe(
|
|
437
472
|
"Our Stage workflow position. Use Interested when we want to record/track before contact; use Outreached when we contacted/logged them and have no response/effective relationship; use Sourced only once there is a response, intro, meeting, or other real relationship signal."
|
|
438
473
|
),
|
|
439
|
-
source: z.string().optional().describe("free-form sourced-by;
|
|
474
|
+
source: z.string().optional().describe("free-form sourced-by; exact team-member names also attach source_user_id"),
|
|
475
|
+
dealOwner: z
|
|
476
|
+
.string()
|
|
477
|
+
.optional()
|
|
478
|
+
.describe("owner override. Use an exact /api/field-options dealOwner value, a user email, or numeric user id."),
|
|
440
479
|
sourceDirection: z
|
|
441
480
|
.string()
|
|
442
481
|
.optional()
|
|
@@ -475,7 +514,7 @@ server.registerTool(
|
|
|
475
514
|
{
|
|
476
515
|
description:
|
|
477
516
|
"List a deal's recorded facts (the research substrate). Each fact carries a " +
|
|
478
|
-
"category, a claim, a source, a confidence, and a trust rung (unverified → " +
|
|
517
|
+
"category, a claim, a source/sourceUrl, a confidence, and a trust rung (unverified → " +
|
|
479
518
|
"agent-verified → human-vouched → endorsed) plus who/what recorded it.",
|
|
480
519
|
inputSchema: {
|
|
481
520
|
dealId: z.string(),
|
|
@@ -495,13 +534,15 @@ server.registerTool(
|
|
|
495
534
|
"something unconfirmed (stored 'unverified', which is the honest default). You CANNOT " +
|
|
496
535
|
"mark a fact as human-confirmed — only a person can raise it to 'human-vouched'. " +
|
|
497
536
|
"`confidence` is how certain the claim is; `attested` is whether YOU take responsibility " +
|
|
498
|
-
"for having checked it.
|
|
499
|
-
"
|
|
537
|
+
"for having checked it. `source` is a human-readable provenance label; `sourceUrl` is a " +
|
|
538
|
+
"canonical URL that round-trips as sourceUrl/source_url. Category is free text; common " +
|
|
539
|
+
"values include founders | financials | product | market | team | company_basics | risk | fundraise | milestone | meta.",
|
|
500
540
|
inputSchema: {
|
|
501
541
|
dealId: z.string(),
|
|
502
542
|
category: z.string(),
|
|
503
543
|
claim: z.string(),
|
|
504
544
|
source: z.string().optional().describe("where you found this (URL, 'deck p3', 'LinkedIn')"),
|
|
545
|
+
sourceUrl: z.string().optional().describe("canonical URL for the evidence, if separate from source"),
|
|
505
546
|
confidence: z.enum(["high", "medium", "low"]).optional(),
|
|
506
547
|
attested: z
|
|
507
548
|
.boolean()
|
|
@@ -509,11 +550,12 @@ server.registerTool(
|
|
|
509
550
|
.describe("true → stored 'agent-verified'; false/omitted → 'unverified'. Answer honestly."),
|
|
510
551
|
},
|
|
511
552
|
},
|
|
512
|
-
async ({ dealId, category, claim, source, confidence, attested }) =>
|
|
553
|
+
async ({ dealId, category, claim, source, sourceUrl, confidence, attested }) =>
|
|
513
554
|
callApi("POST", `/api/deals/${encodeURIComponent(dealId)}/facts`, {
|
|
514
555
|
category,
|
|
515
556
|
claim,
|
|
516
557
|
source: source ?? "",
|
|
558
|
+
...(sourceUrl ? { sourceUrl } : {}),
|
|
517
559
|
confidence: confidence ?? "medium",
|
|
518
560
|
attested: attested === true,
|
|
519
561
|
})
|
package/bin/llama.mjs
CHANGED
|
@@ -291,6 +291,38 @@ async function searchDeals(q, flags) {
|
|
|
291
291
|
return result;
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
+
function buildActivityQuery(kind, flags) {
|
|
295
|
+
const params = new URLSearchParams({ kind });
|
|
296
|
+
const mappings = [
|
|
297
|
+
["since", "since"],
|
|
298
|
+
["limit", "limit"],
|
|
299
|
+
["cursor", "cursor"],
|
|
300
|
+
["before-id", "before_id"],
|
|
301
|
+
["before_id", "before_id"],
|
|
302
|
+
["deal", "deal"],
|
|
303
|
+
["deal-id", "deal_id"],
|
|
304
|
+
["deal_id", "deal_id"],
|
|
305
|
+
["entity", "entity"],
|
|
306
|
+
["min-sig", "min_sig"],
|
|
307
|
+
["min_sig", "min_sig"],
|
|
308
|
+
["min-significance", "min_sig"],
|
|
309
|
+
];
|
|
310
|
+
for (const [flag, param] of mappings) {
|
|
311
|
+
if (flags[flag] !== undefined && flags[flag] !== true) {
|
|
312
|
+
params.set(param, String(flags[flag]));
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
for (const verb of splitCsvFlag(flags.verb) ?? []) {
|
|
316
|
+
params.append("verb", verb);
|
|
317
|
+
}
|
|
318
|
+
return params;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
async function fetchActivity(kind, flags) {
|
|
322
|
+
const params = buildActivityQuery(kind, flags);
|
|
323
|
+
return request("GET", `/api/agent/activity?${params}`);
|
|
324
|
+
}
|
|
325
|
+
|
|
294
326
|
function splitCsvFlag(value) {
|
|
295
327
|
if (!value || value === true) return undefined;
|
|
296
328
|
return String(value)
|
|
@@ -367,6 +399,8 @@ Agent onboarding (run once on first install):
|
|
|
367
399
|
llama agent bootstrap # fetch live Command + Llama OS skill manifest
|
|
368
400
|
llama skills search "pipeline update" # discover relevant runtime skills
|
|
369
401
|
llama skills show llama-pipeline # read a skill from Command
|
|
402
|
+
llama activity new-deals --since 24h # recent deal creations for agents
|
|
403
|
+
llama activity updated-deals --since 7d # meaningful deal updates, grouped
|
|
370
404
|
llama explain <url-or-object> # explain Command URL/object status + lifecycle
|
|
371
405
|
llama eval good|bad --last # mark the latest CLI/MCP result for eval
|
|
372
406
|
llama eval add "<query>" --expect wiki:<slug>|deal:<uuid>
|
|
@@ -390,7 +424,7 @@ auto-detects \`gcloud auth print-identity-token\` and uses Bearer auth.
|
|
|
390
424
|
Manually-set \`llc_\` tokens are used as a fallback.
|
|
391
425
|
|
|
392
426
|
Deals:
|
|
393
|
-
llama deal create "Company" --source <name> --source-direction Inbound|Outbound --description "..." --status Interested|Outreached|Sourced --website https://...
|
|
427
|
+
llama deal create "Company" --source <name> --deal-owner <name|email|userId> --source-direction Inbound|Outbound --description "..." --status Interested|Outreached|Sourced --website https://...
|
|
394
428
|
llama deal show <dealId>
|
|
395
429
|
llama deal feed <dealId> # every contribution (facts + notes), human-typed or assistant-drafted, newest first
|
|
396
430
|
llama deal update <dealId> <field> <value>
|
|
@@ -418,6 +452,13 @@ Deals:
|
|
|
418
452
|
[--limit 200] [--offset 0]
|
|
419
453
|
llama deal list [--owner ...] [--status ...] [...same flags as search]
|
|
420
454
|
|
|
455
|
+
Agent activity (read-only, cheap read model over append-only activity):
|
|
456
|
+
llama activity new-deals [--since 24h|7d|<ISO>] [--limit 50]
|
|
457
|
+
llama activity updated-deals [--since 24h|7d|<ISO>] [--limit 50] [--deal <uuid>]
|
|
458
|
+
llama activity events [--since 24h] [--verb fact.added,brief.revised] [--entity deal|wiki|all]
|
|
459
|
+
Use this before scanning raw timelines or event-bus payloads. It returns
|
|
460
|
+
JSON from Command's curated activity_events projection: source ids included.
|
|
461
|
+
|
|
421
462
|
Collaborators (besides owner — attribution candidates, no approval):
|
|
422
463
|
llama deal collab list <dealId>
|
|
423
464
|
llama deal collab add <dealId> --user <userId|email>
|
|
@@ -493,8 +534,8 @@ Deal soft-delete / restore / trash list:
|
|
|
493
534
|
llama deal trash # list deleted deals
|
|
494
535
|
|
|
495
536
|
Deal facts (AI-extracted or human-asserted, with verification):
|
|
496
|
-
llama deal fact list <dealId>
|
|
497
|
-
llama deal fact add <dealId> --category <cat> --claim "<text>" [--source <url>] [--confidence high|medium|low] [--attested]
|
|
537
|
+
llama deal fact list <dealId>
|
|
538
|
+
llama deal fact add <dealId> --category <cat> --claim "<text>" [--source "..."] [--source-url <url>] [--confidence high|medium|low] [--attested]
|
|
498
539
|
llama deal fact verify <dealId> <factId> --status confirmed|disputed [--corrected-value "..."]
|
|
499
540
|
|
|
500
541
|
Skill corrections (persona-owner pushback — read by persona-watcher):
|
|
@@ -614,6 +655,8 @@ Common:
|
|
|
614
655
|
llama deal show <dealId> full deal record
|
|
615
656
|
llama deal feed <dealId> every contribution (facts + notes), newest first
|
|
616
657
|
llama post <dealId> "..." add a note to a deal
|
|
658
|
+
llama activity new-deals --since 24h recent deal creations
|
|
659
|
+
llama activity updated-deals --since 7d meaningful deal updates
|
|
617
660
|
llama agent-onboard print the AI-agent workflow contract
|
|
618
661
|
llama agent bootstrap live Llama OS skill manifest from Command
|
|
619
662
|
llama skills search "<query>" discover which skill to read
|
|
@@ -622,6 +665,7 @@ Common:
|
|
|
622
665
|
|
|
623
666
|
Command groups — run \`llama help <group>\` for that group's commands:
|
|
624
667
|
deal create · show · feed · update · enrich · search · collaborators · links · delete
|
|
668
|
+
activity new-deals · updated-deals · events for agent read models
|
|
625
669
|
brief brief blocks: list · add · edit · history · refresh
|
|
626
670
|
facts deal facts + skill corrections (the sourced, trust-rated layer)
|
|
627
671
|
timeline timeline · posts · mentions
|
|
@@ -644,6 +688,7 @@ the CLI auto-detects it — no token needed (\`llc_\` tokens are a fallback).`;
|
|
|
644
688
|
// Area → which top-level sections of HELP_FULL belong to it.
|
|
645
689
|
const HELP_AREA_MATCH = {
|
|
646
690
|
deal: [/^Deals/, /^Collaborators/, /^Soft-delete/, /^Deal links/, /^Deal soft-delete/],
|
|
691
|
+
activity: [/^Agent activity/],
|
|
647
692
|
brief: [/^Brief blocks/, /^Brief \/ persona/],
|
|
648
693
|
facts: [/^Deal facts/, /^Skill corrections/],
|
|
649
694
|
timeline: [/^Timeline/, /^Mentions/],
|
|
@@ -1043,6 +1088,40 @@ async function main() {
|
|
|
1043
1088
|
return;
|
|
1044
1089
|
}
|
|
1045
1090
|
|
|
1091
|
+
if (area === "activity") {
|
|
1092
|
+
const sub = action || "events";
|
|
1093
|
+
const normalized = sub.replace(/-/g, "_");
|
|
1094
|
+
const kind =
|
|
1095
|
+
normalized === "new" || normalized === "new_deal" || normalized === "new_deals"
|
|
1096
|
+
? "new_deals"
|
|
1097
|
+
: normalized === "updated" || normalized === "updates" || normalized === "updated_deal" || normalized === "updated_deals"
|
|
1098
|
+
? "updated_deals"
|
|
1099
|
+
: normalized === "event" || normalized === "events" || normalized === "feed" || normalized === "all"
|
|
1100
|
+
? "events"
|
|
1101
|
+
: null;
|
|
1102
|
+
if (!kind) {
|
|
1103
|
+
throw new Error("Usage: llama activity new-deals|updated-deals|events [--since 24h] [--limit 50]");
|
|
1104
|
+
}
|
|
1105
|
+
const { flags } = parseFlags(rest, [
|
|
1106
|
+
"json",
|
|
1107
|
+
"since",
|
|
1108
|
+
"limit",
|
|
1109
|
+
"cursor",
|
|
1110
|
+
"before-id",
|
|
1111
|
+
"before_id",
|
|
1112
|
+
"deal",
|
|
1113
|
+
"deal-id",
|
|
1114
|
+
"deal_id",
|
|
1115
|
+
"entity",
|
|
1116
|
+
"verb",
|
|
1117
|
+
"min-sig",
|
|
1118
|
+
"min_sig",
|
|
1119
|
+
"min-significance",
|
|
1120
|
+
]);
|
|
1121
|
+
print(await fetchActivity(kind, flags));
|
|
1122
|
+
return;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1046
1125
|
if (area === "skills" || (area === "agent" && action === "skills")) {
|
|
1047
1126
|
const sub = area === "skills" ? action : rest[0];
|
|
1048
1127
|
const args = area === "skills" ? rest : rest.slice(1);
|
|
@@ -1361,10 +1440,11 @@ async function main() {
|
|
|
1361
1440
|
if (area === "deal" && action === "create") {
|
|
1362
1441
|
const { flags, positional } = parseFlags(rest);
|
|
1363
1442
|
const companyName = positional.join(" ").trim();
|
|
1364
|
-
if (!companyName) throw new Error("Usage: llama deal create \"Company\" [--source Name]");
|
|
1443
|
+
if (!companyName) throw new Error("Usage: llama deal create \"Company\" [--source Name] [--deal-owner name|email|userId]");
|
|
1365
1444
|
const body = {
|
|
1366
1445
|
companyName,
|
|
1367
1446
|
source: flags.source,
|
|
1447
|
+
dealOwner: flags.dealOwner || flags["deal-owner"],
|
|
1368
1448
|
sourceDirection: flags.sourceDirection || flags["source-direction"],
|
|
1369
1449
|
description: flags.description,
|
|
1370
1450
|
website: flags.website,
|
|
@@ -1656,10 +1736,6 @@ async function main() {
|
|
|
1656
1736
|
}
|
|
1657
1737
|
|
|
1658
1738
|
// ----- Deal facts (AI-extracted or human-asserted, with verification) -----
|
|
1659
|
-
// NOTE: server routes currently use session-only auth() — token-only
|
|
1660
|
-
// callers will get 401 until /api/deals/:id/facts and
|
|
1661
|
-
// /api/deals/:id/facts/:factId switch to authenticate(). CLI surface
|
|
1662
|
-
// is forward-compatible.
|
|
1663
1739
|
if (area === "deal" && action === "fact") {
|
|
1664
1740
|
const sub = rest[0];
|
|
1665
1741
|
const dealId = rest[1];
|
|
@@ -1675,10 +1751,12 @@ async function main() {
|
|
|
1675
1751
|
}
|
|
1676
1752
|
|
|
1677
1753
|
if (sub === "add") {
|
|
1678
|
-
|
|
1754
|
+
const claim = flags.claim ?? flags.value;
|
|
1755
|
+
const sourceUrl = flags["source-url"] ?? flags.sourceUrl;
|
|
1756
|
+
if (!flags.category || !claim) {
|
|
1679
1757
|
throw new Error(
|
|
1680
1758
|
`Usage: llama deal fact add <dealId> --category <cat> --claim "<text>" ` +
|
|
1681
|
-
`[--source <url>] [--confidence high|medium|low] [--attested]`
|
|
1759
|
+
`[--source "..."] [--source-url <url>] [--confidence high|medium|low] [--attested]`
|
|
1682
1760
|
);
|
|
1683
1761
|
}
|
|
1684
1762
|
// --attested: the caller takes responsibility that this is accurate
|
|
@@ -1686,8 +1764,9 @@ async function main() {
|
|
|
1686
1764
|
// vouched; without it, it stays unverified. Declare honestly.
|
|
1687
1765
|
print(await request("POST", `/api/deals/${encodeURIComponent(dealId)}/facts`, {
|
|
1688
1766
|
category: String(flags.category),
|
|
1689
|
-
claim: String(
|
|
1767
|
+
claim: String(claim),
|
|
1690
1768
|
source: flags.source ? String(flags.source) : "",
|
|
1769
|
+
...(sourceUrl ? { sourceUrl: String(sourceUrl) } : {}),
|
|
1691
1770
|
confidence: flags.confidence ? String(flags.confidence) : "medium",
|
|
1692
1771
|
attested: flags.attested === true,
|
|
1693
1772
|
}));
|