@khanglvm/outline-cli 0.1.7 → 0.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/CHANGELOG.md +10 -0
- package/README.md +283 -12
- package/package.json +1 -1
- package/src/agent-skills.js +73 -27
- package/src/cli.js +2 -0
- package/src/entry-integrity-manifest.generated.js +13 -9
- package/src/memory-store.js +2368 -0
- package/src/tool-arg-schemas.js +1670 -92
- package/src/tools.extended.js +2685 -286
- package/src/tools.js +224 -7
- package/src/tools.mutation.js +496 -90
- package/src/tools.navigation.js +547 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0 - 2026-06-23
|
|
4
|
+
|
|
5
|
+
- Changes since `v0.1.8`.
|
|
6
|
+
- feat(comments): ergonomic commenting with @-mentions — `comments.create`/`comments.post` accept plain/markdown `text` and build the Outline ProseMirror `data` doc, resolve `mentions` (names/emails/userIds, first-name + email matching) into mention nodes, enforce the 1000-character text limit pre-flight, and support `parentCommentId` replies; `comments.list` documents `includeReplies`/`parentCommentId` for reading replies.
|
|
7
|
+
|
|
8
|
+
## 0.1.8 - 2026-06-11
|
|
9
|
+
|
|
10
|
+
- Changes since `v0.1.7`.
|
|
11
|
+
- feat: add Outline memory-assisted direct workflows (dc88257)
|
|
12
|
+
|
|
3
13
|
## 0.1.7 - 2026-06-10
|
|
4
14
|
|
|
5
15
|
- Changes since `v0.1.6`.
|
package/README.md
CHANGED
|
@@ -24,7 +24,23 @@ Native one-call retrieval first:
|
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
outline-cli invoke search.research \
|
|
27
|
-
--args '{"question":"How do I find onboarding docs?","queries":["onboarding","engineering handbook"],"precisionMode":"precision","limitPerQuery":5,"view":"summary"}'
|
|
27
|
+
--args '{"question":"How do I find onboarding docs?","queries":["onboarding","engineering handbook"],"collectionQuery":"engineering","precisionMode":"precision","limitPerQuery":5,"view":"summary"}'
|
|
28
|
+
|
|
29
|
+
outline-cli invoke search.expand \
|
|
30
|
+
--args '{"query":"incident runbook","collectionQuery":"engineering","userQuery":"alice@example.com","expandLimit":3,"view":"summary"}'
|
|
31
|
+
|
|
32
|
+
outline-cli invoke documents.answer \
|
|
33
|
+
--args '{"question":"Who owns incident escalation?","documentQuery":"incident runbook","collectionQuery":"engineering"}'
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Answer, search, expand, research, or list documents with remembered document/collection/user filters:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
outline-cli invoke documents.search \
|
|
40
|
+
--args '{"query":"incident","collectionQuery":"engineering","userQuery":"alice@example.com","limit":8,"view":"summary"}'
|
|
41
|
+
|
|
42
|
+
outline-cli invoke documents.list \
|
|
43
|
+
--args '{"collectionQuery":"engineering","rootOnly":true,"limit":20,"view":"ids"}'
|
|
28
44
|
```
|
|
29
45
|
|
|
30
46
|
Discover tools and contracts:
|
|
@@ -42,14 +58,268 @@ outline-cli invoke documents.info \
|
|
|
42
58
|
--args '{"id":"<document-id>","view":"summary"}'
|
|
43
59
|
```
|
|
44
60
|
|
|
61
|
+
Diff a proposed edit against a remembered document title:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
outline-cli invoke documents.diff \
|
|
65
|
+
--args '{"query":"incident runbook","proposedText":"# Incident Runbook\n\nUpdated body"}'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Apply a guarded patch to the current revision of a remembered document title:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
outline-cli invoke documents.apply_patch_safe \
|
|
72
|
+
--args '{"query":"incident runbook","expectedRevision":"latest","patch":"@@ -1,1 +1,1 @@\n-Old\n+New","performAction":true}'
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Batch guarded updates against remembered document titles:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
outline-cli invoke documents.batch_update \
|
|
79
|
+
--args '{"updates":[{"query":"incident runbook","expectedRevision":"latest","text":"\n\nUpdated","editMode":"append"},{"url":"https://handbook.example.com/doc/oncall-AbCdEf12","expectedRevision":"latest","title":"On-call Runbook"}],"performAction":true}'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Inspect revision history from a remembered document title:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
outline-cli invoke revisions.list \
|
|
86
|
+
--args '{"query":"incident runbook","limit":10,"view":"summary"}'
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Diff the latest two revisions from a remembered document title:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
outline-cli invoke revisions.diff \
|
|
93
|
+
--args '{"query":"incident runbook","revisionPair":"latest","view":"summary"}'
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Inspect audit events for a remembered document and actor:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
outline-cli invoke events.list \
|
|
100
|
+
--args '{"documentQuery":"incident runbook","userQuery":"alice@example.com","auditLog":true,"limit":10}'
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
List archived documents in a remembered collection:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
outline-cli invoke documents.archived \
|
|
107
|
+
--args '{"collectionQuery":"engineering","limit":10,"view":"summary"}'
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Audit document access from a remembered title:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
outline-cli invoke documents.users \
|
|
114
|
+
--args '{"query":"incident runbook","limit":20,"view":"summary"}'
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Audit collection memberships from a remembered collection name:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
outline-cli invoke collections.memberships \
|
|
121
|
+
--args '{"query":"engineering","limit":20,"view":"summary"}'
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Read a user or group from remembered names/emails:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
outline-cli invoke users.info \
|
|
128
|
+
--args '{"query":"alice@example.com","view":"summary"}'
|
|
129
|
+
|
|
130
|
+
outline-cli invoke groups.memberships \
|
|
131
|
+
--args '{"query":"engineering","limit":20,"view":"summary"}'
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Grant document or collection access from remembered names/emails:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
outline-cli invoke documents.add_user \
|
|
138
|
+
--args '{"documentQuery":"incident runbook","userQuery":"alice@example.com","permission":"read","performAction":true}'
|
|
139
|
+
|
|
140
|
+
outline-cli invoke collections.add_group \
|
|
141
|
+
--args '{"query":"engineering","groupQuery":"security","permission":"read_write","performAction":true}'
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Reuse prior lookup context without a network call:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
outline-cli invoke memory.lookup \
|
|
148
|
+
--args '{"query":"engineering handbook","type":"document","limit":5}'
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Resolve from memory and refresh the top match live in one call:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
outline-cli invoke memory.resolve \
|
|
155
|
+
--args '{"query":"engineering handbook","type":"document","hydrateLimit":1,"view":"summary"}'
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Resolve a remembered title or URL without a network call:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
outline-cli invoke documents.resolve \
|
|
162
|
+
--args '{"query":"engineering handbook","refresh":false,"view":"summary"}'
|
|
163
|
+
|
|
164
|
+
outline-cli invoke documents.resolve_urls \
|
|
165
|
+
--args '{"url":"https://handbook.example.com/doc/oncall-escalation-AbCdEf12","refresh":false,"view":"summary"}'
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Open a document directly from an ID, remembered title, URL, or URL id:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
outline-cli invoke documents.open \
|
|
172
|
+
--args '{"query":"engineering handbook","view":"summary"}'
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Open several documents from mixed titles, URLs, and IDs:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
outline-cli invoke documents.open_batch \
|
|
179
|
+
--args '{"refs":["engineering handbook","https://handbook.example.com/doc/oncall-escalation-AbCdEf12"],"ids":["<document-id>"],"view":"summary"}'
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Open a collection directly from an ID, remembered name, URL, or URL id:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
outline-cli invoke collections.open \
|
|
186
|
+
--args '{"query":"engineering","view":"summary"}'
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Open several collections from mixed names, URLs, and IDs:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
outline-cli invoke collections.open_batch \
|
|
193
|
+
--args '{"refs":["engineering","https://handbook.example.com/collection/engineering-AbCdEf12"],"ids":["<collection-id>"],"view":"summary"}'
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Build a collection tree directly from a remembered collection name:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
outline-cli invoke collections.tree \
|
|
200
|
+
--args '{"query":"engineering","maxDepth":3,"view":"summary"}'
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Inspect backlinks or graph neighbors directly from a remembered document title:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
outline-cli invoke documents.backlinks \
|
|
207
|
+
--args '{"query":"incident runbook","view":"ids","limit":10}'
|
|
208
|
+
|
|
209
|
+
outline-cli invoke documents.graph_neighbors \
|
|
210
|
+
--args '{"refs":["incident runbook","https://handbook.example.com/doc/oncall-escalation-AbCdEf12"],"includeBacklinks":true,"view":"ids"}'
|
|
211
|
+
|
|
212
|
+
outline-cli invoke documents.graph_report \
|
|
213
|
+
--args '{"seedRefs":["incident runbook"],"depth":2,"maxNodes":80,"view":"ids"}'
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Extract issue references directly from titles, URLs, or IDs:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
outline-cli invoke documents.issue_refs \
|
|
220
|
+
--args '{"refs":["incident runbook"],"issueDomains":["jira.example.com"],"keyPattern":"[A-Z]+-\\d+","view":"ids"}'
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Build a comment review queue directly from remembered documents or collections:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
outline-cli invoke comments.review_queue \
|
|
227
|
+
--args '{"refs":["incident runbook"],"includeReplies":true,"limitPerDocument":20}'
|
|
228
|
+
|
|
229
|
+
outline-cli invoke comments.review_queue \
|
|
230
|
+
--args '{"collectionQuery":"engineering","includeReplies":true,"view":"summary"}'
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
List comments directly from a remembered document title:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
outline-cli invoke comments.list \
|
|
237
|
+
--args '{"query":"incident runbook","includeReplies":true,"limit":20,"view":"summary"}'
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Create a comment directly from a remembered document title. Pass plain/markdown
|
|
241
|
+
`text` (the ProseMirror `data` doc is built for you) and an optional `mentions`
|
|
242
|
+
list of names, emails, or userIds. Names match on **first name**, so Jira-order
|
|
243
|
+
`"Tran Le Quan"` resolves to Outline's `"Quan, Tran Le"`. The comment text is
|
|
244
|
+
capped at 1000 characters (checked pre-flight). `comments.post` is an alias.
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# simple comment
|
|
248
|
+
outline-cli invoke comments.create \
|
|
249
|
+
--args '{"query":"incident runbook","text":"Looks good.","performAction":true}'
|
|
250
|
+
|
|
251
|
+
# comment with @-mentions (resolved to user IDs and inserted at the start)
|
|
252
|
+
outline-cli invoke comments.create \
|
|
253
|
+
--args '{"query":"incident runbook","text":"Please review the rollback steps.","mentions":["Tran Le Quan","alice@example.com"],"performAction":true}'
|
|
254
|
+
|
|
255
|
+
# reply to an existing comment
|
|
256
|
+
outline-cli invoke comments.post \
|
|
257
|
+
--args '{"documentId":"<doc-id>","parentCommentId":"<comment-id>","text":"Confirmed.","performAction":true}'
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Read a comment's replies later with `comments.list` (set `includeReplies:true`,
|
|
261
|
+
or pass `parentCommentId` to fetch one thread's replies):
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
outline-cli invoke comments.list \
|
|
265
|
+
--args '{"query":"incident runbook","includeReplies":true,"view":"summary"}'
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
List share links directly from a remembered document title:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
outline-cli invoke shares.list \
|
|
272
|
+
--args '{"documentQuery":"public handbook","limit":10,"view":"summary"}'
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Create a share link directly from a remembered document title:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
outline-cli invoke shares.create \
|
|
279
|
+
--args '{"documentQuery":"public handbook","published":true,"performAction":true}'
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Resolve several remembered references and deduplicate live refreshes:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
outline-cli invoke memory.resolve_batch \
|
|
286
|
+
--args '{"queries":["engineering handbook"],"urls":["https://handbook.example.com/doc/oncall-escalation-AbCdEf12"],"type":"document","hydrateLimit":1,"view":"summary"}'
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Extract placeholders or create from a remembered template name:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
outline-cli invoke templates.extract_placeholders \
|
|
293
|
+
--args '{"templateQuery":"incident postmortem"}'
|
|
294
|
+
|
|
295
|
+
outline-cli invoke documents.create_from_template \
|
|
296
|
+
--args '{"templateQuery":"incident postmortem","title":"Service A - Incident Postmortem","placeholderValues":{"service_name":"Service A","owner":"SRE Team"},"strictPlaceholders":true,"publish":true,"performAction":true}'
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Inspect recent local history:
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
outline-cli invoke memory.recent \
|
|
303
|
+
--args '{"type":"document","limit":10}'
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Manually remember a stable local alias:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
outline-cli invoke memory.remember \
|
|
310
|
+
--args '{"type":"document","id":"<document-id>","title":"Incident Runbook","aliases":["runbook"],"performAction":true}'
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
`memory.lookup` reads a local, profile-scoped observation index. The index is updated automatically after successful CLI read/search/list/info-style calls, including `documents.search`, `documents.info`, `collections.list`, `users.list`, `groups.list`, `templates.list`, `templates.info`, `search.research`, and related retrieval tools. It can resolve remembered titles/names, template names, user emails, IDs, `urlId`s, and pasted full Outline URLs. Use `documents.answer`, `documents.answer_batch`, `documents.search`, `documents.list`, `search.expand`, and `search.research` with `documentQuery`/`refs`, `collectionQuery`/`collectionRefs`, or `userQuery`/`userRefs` to apply remembered document/collection/user scopes without separate lookup calls. `documents.resolve` and `documents.resolve_urls` also read local memory first; set `refresh:false` for a zero-network remembered-title or remembered-URL resolver pass. Use `documents.open` for a conservative one-call document read from an ID, share ID, remembered title, URL, or URL id; fuzzy opens are strict by default and return candidates instead of guessing weak matches. Use `documents.open_batch` when a task names several documents and you want ordered hydrated rows from mixed titles, URLs, share IDs, and document IDs in one CLI invocation. Use `collections.open` and `collections.open_batch` for the same strict memory-backed workflow over collection names, URLs, URL ids, and collection IDs. `collections.tree`, `documents.backlinks`, `documents.graph_neighbors`, `documents.graph_report`, `documents.issue_refs`, `comments.review_queue`, `comments.list`, `comments.create`, `shares.list`, `shares.info`, `shares.create`, `events.list`, `templates.info`, `templates.extract_placeholders`, `documents.create_from_template`, `users.info`, `groups.info`, `groups.memberships`, `documents.attachments`, `documents.download_attachments`, `documents.diff`, `revisions.list`, `revisions.diff`, `documents.archived`, `documents.deleted`, `documents.users`, `documents.memberships`, `documents.group_memberships`, `collections.memberships`, and `collections.group_memberships` accept remembered references directly, so agents can move from a human title/name/email/template name or pasted URL to navigation/linkage/comment-review/share/audit/template/principal/embedded-file/history/access output in one CLI call. Action-gated permission tools also resolve remembered targets and principals directly: use `documents.add_user`, `documents.remove_user`, `documents.add_group`, `documents.remove_group`, `collections.add_user`, `collections.remove_user`, `collections.add_group`, `collections.remove_group`, `groups.add_user`, and `groups.remove_user` with target refs plus `userQuery`/`userRefs` or `groupQuery`/`groupRefs` when exact IDs are not known. Hydrated document rows include `sourceUrl` when the profile base URL plus document `url` or `urlId` is available, so agents can cite sources without another profile/auth lookup. Use `memory.resolve` when you want the cached candidate and fresh `documents.info`/`collections.info`/`users.info`/`groups.info`/`templates.info` metadata in the same turn. On a local miss, `memory.resolve` and `memory.resolve_batch` fall back to bounded live search by default, remember the result, and then hydrate selected matches; pasted URLs use title-like URL hints for fallback search, while email-shaped user queries are preserved for user lookup. Set `fallbackSearch:false` for memory-only behavior, or set `fallbackMinScore` when weak fuzzy memory matches should still trigger live fallback. Use `memory.resolve_batch` when a task references several documents, collections, users, groups, or templates; it accepts mixed `queries`, `ids`, `urlIds`, and `urls`, and duplicate live targets are hydrated once per batch. Use `memory.recent` as a zero-network history view and `memory.remember` for explicit local aliases. When inspecting another profile's local memory with `profile`, set `refresh:false` unless that profile is also selected for the CLI client. Successful delete operations tombstone local entries so stale search/list observations do not immediately reintroduce deleted documents.
|
|
314
|
+
|
|
45
315
|
List and save embedded document images/files:
|
|
46
316
|
|
|
47
317
|
```bash
|
|
48
318
|
outline-cli invoke documents.attachments \
|
|
49
|
-
--args '{"
|
|
319
|
+
--args '{"query":"example title"}'
|
|
50
320
|
|
|
51
321
|
outline-cli invoke documents.download_attachments \
|
|
52
|
-
--args '{"
|
|
322
|
+
--args '{"refs":["example title"],"outputDir":"./outline-attachments","overwrite":true}'
|
|
53
323
|
|
|
54
324
|
outline-cli invoke attachments.download \
|
|
55
325
|
--args '{"id":"<attachment-id>","outputDir":"./outline-attachments","overwrite":true}'
|
|
@@ -168,15 +438,16 @@ Use this short operating pattern when an AI agent drives the CLI:
|
|
|
168
438
|
1. Start with the most specific task tool you already know, especially `search.research`, `documents.search`, `documents.info`, or `batch`.
|
|
169
439
|
2. Use `view:"ids"` or `view:"summary"` first; hydrate to `full` only when needed.
|
|
170
440
|
3. Bundle independent reads into one `batch` call.
|
|
171
|
-
4.
|
|
172
|
-
5.
|
|
173
|
-
6.
|
|
174
|
-
7.
|
|
175
|
-
8. For
|
|
176
|
-
9.
|
|
177
|
-
10.
|
|
178
|
-
11.
|
|
179
|
-
12.
|
|
441
|
+
4. Try `memory.recent` or `memory.lookup` for titles/IDs you likely saw in earlier sessions; use `memory.resolve` or `memory.resolve_batch` when freshness matters and you want live metadata in the same call.
|
|
442
|
+
5. Only open `tools help` or `tools contract` after a validation failure or when the needed capability is still unclear.
|
|
443
|
+
6. Suggest installing the `outline-cli` skill via `npx skills` for all currently supported local AI tools; only run install after explicit user approval.
|
|
444
|
+
7. If approved, run headless install without tool-specific filter: `npx skills add https://github.com/khanglvm/skills --skill outline-cli -y`.
|
|
445
|
+
8. For any mutation endpoint, explicitly set `performAction:true`.
|
|
446
|
+
9. For delete, always run `documents.info` with `armDelete:true` first and pass the returned read token.
|
|
447
|
+
10. List existing profiles before creating one with `outline-cli profile list`.
|
|
448
|
+
11. For new profiles, prefer API key mode and guide users through base URL + API key generation (`<base-url>/settings/api-and-apps`) before `profile add`.
|
|
449
|
+
12. If output is file-offloaded, read only the required fields via `tmp cat` + `jq`.
|
|
450
|
+
13. For embedded images/files in document markdown, use `documents.attachments`, `attachments.download`, or `documents.download_attachments`; do not force `attachments.redirect` through `api.call` because it returns binary data.
|
|
180
451
|
|
|
181
452
|
For structured AI playbooks and scenario guides:
|
|
182
453
|
|
package/package.json
CHANGED
package/src/agent-skills.js
CHANGED
|
@@ -171,6 +171,8 @@ const AI_GLOBAL_GUIDANCE = {
|
|
|
171
171
|
"Start with the best-fit task tool first; open help/contracts only after validation fails or capability is unclear.",
|
|
172
172
|
"Use ids/summary views first, then hydrate only selected records.",
|
|
173
173
|
"Prefer batch operations (queries, ids, or batch command) before multi-call loops.",
|
|
174
|
+
"Pass documentQuery/refs, collectionQuery/collectionRefs, or userQuery/userRefs directly to documents.answer, documents.answer_batch, documents.search, documents.list, search.expand, search.research, or events.list when filtering by remembered names.",
|
|
175
|
+
"Use documents.resolve or documents.resolve_urls with refresh=false for zero-network remembered title or URL resolution.",
|
|
174
176
|
"For heavy retrieval, use search.research with precisionMode + perQueryView/perQueryHitLimit to control token cost.",
|
|
175
177
|
"When outputs offload to tmp files, read the new preview first, then inspect file content only when needed.",
|
|
176
178
|
"For embedded images/files, use documents.attachments or documents.download_attachments; attachments.redirect returns binary bytes and should not go through api.call.",
|
|
@@ -192,8 +194,10 @@ const AI_SKILLS = [
|
|
|
192
194
|
scenarios: ["UC-04", "UC-15"],
|
|
193
195
|
objective: "Answer FAQ-style questions with bounded scope and deterministic follow-up.",
|
|
194
196
|
featureUpdates: [
|
|
195
|
-
"documents.answer and documents.answer_batch wrappers for permission-aware AI responses.",
|
|
196
|
-
"search.research now supports precisionMode, reranking diversification,
|
|
197
|
+
"documents.answer and documents.answer_batch wrappers for permission-aware AI responses with remembered document/collection/user scopes.",
|
|
198
|
+
"search.research now supports precisionMode, reranking diversification, compact per-query response shaping, and remembered collection/user filters.",
|
|
199
|
+
"documents.search, documents.list, and search.expand can resolve remembered collection/user filters before retrieval.",
|
|
200
|
+
"documents.resolve and documents.resolve_urls can warm candidates from local memory or run memory-only with refresh=false.",
|
|
197
201
|
],
|
|
198
202
|
sequence: [
|
|
199
203
|
{
|
|
@@ -219,6 +223,8 @@ const AI_SKILLS = [
|
|
|
219
223
|
],
|
|
220
224
|
efficiencyTips: [
|
|
221
225
|
"Use precisionMode=precision and perQueryView=ids with a small perQueryHitLimit for stable token budgets.",
|
|
226
|
+
"Use documentQuery, collectionQuery, or userQuery filters on documents.answer, documents.answer_batch, documents.search, search.expand, or search.research when the user names a scope but not IDs.",
|
|
227
|
+
"Use documents.resolve_urls refresh=false when the user pasted an Outline URL that was seen in a prior session.",
|
|
222
228
|
"Enable includeBacklinks only when one-call context gathering is worth extra API work.",
|
|
223
229
|
"Keep batch concurrency low for stable latency and predictable cost.",
|
|
224
230
|
],
|
|
@@ -233,37 +239,36 @@ const AI_SKILLS = [
|
|
|
233
239
|
scenarios: ["UC-05"],
|
|
234
240
|
objective: "Create, update, and revoke share links with explicit auditability.",
|
|
235
241
|
featureUpdates: [
|
|
236
|
-
"shares.list/info
|
|
242
|
+
"shares.list/info wrappers can resolve remembered document refs before read operations.",
|
|
243
|
+
"shares.create can resolve remembered document refs before creating share links.",
|
|
244
|
+
"shares.update/revoke wrappers retain deterministic envelopes.",
|
|
237
245
|
"Mutation gating retained across sharing lifecycle operations.",
|
|
238
246
|
],
|
|
239
247
|
sequence: [
|
|
240
248
|
{
|
|
241
249
|
step: 1,
|
|
242
|
-
tool: "documents.search",
|
|
243
|
-
purpose: "Resolve target public-help docs by query.",
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
step: 2,
|
|
247
250
|
tool: "shares.create",
|
|
248
|
-
purpose: "Create share artifact
|
|
251
|
+
purpose: "Create share artifact for an approved exact document ID or remembered document ref.",
|
|
249
252
|
},
|
|
250
253
|
{
|
|
251
|
-
step:
|
|
254
|
+
step: 2,
|
|
252
255
|
tool: "shares.update",
|
|
253
256
|
purpose: "Apply controlled publish/visibility updates.",
|
|
254
257
|
},
|
|
255
258
|
{
|
|
256
|
-
step:
|
|
259
|
+
step: 3,
|
|
257
260
|
tool: "shares.info",
|
|
258
261
|
purpose: "Confirm final share state and metadata.",
|
|
259
262
|
},
|
|
260
263
|
{
|
|
261
|
-
step:
|
|
264
|
+
step: 4,
|
|
262
265
|
tool: "shares.revoke",
|
|
263
266
|
purpose: "Revoke stale or deprecated share links.",
|
|
264
267
|
},
|
|
265
268
|
],
|
|
266
269
|
efficiencyTips: [
|
|
270
|
+
"Pass documentQuery/refs/url/urlId directly to shares.create when creating a link for a known document by title or URL.",
|
|
271
|
+
"Pass documentQuery/refs/url/urlId directly to shares.list when auditing share links for a known document.",
|
|
267
272
|
"Persist share ids once discovered to avoid repeated broad list calls.",
|
|
268
273
|
"Use summary view for routine checks; hydrate full payload only for exceptions.",
|
|
269
274
|
],
|
|
@@ -279,7 +284,7 @@ const AI_SKILLS = [
|
|
|
279
284
|
objective: "Apply least-privilege access controls and verify visibility by group and collection.",
|
|
280
285
|
featureUpdates: [
|
|
281
286
|
"groups.memberships wrapper added for group membership reads.",
|
|
282
|
-
"documents.users and collection/document membership wrappers
|
|
287
|
+
"documents.users and collection/document membership wrappers can resolve remembered document and collection names before audit reads.",
|
|
283
288
|
],
|
|
284
289
|
sequence: [
|
|
285
290
|
{
|
|
@@ -310,6 +315,8 @@ const AI_SKILLS = [
|
|
|
310
315
|
],
|
|
311
316
|
efficiencyTips: [
|
|
312
317
|
"Prefer group grants over per-user grants for lower operational churn.",
|
|
318
|
+
"Pass query/refs/url/urlId directly to document and collection access wrappers to avoid separate resolve calls.",
|
|
319
|
+
"Use documentQuery/refs, collectionQuery/collectionRefs, and userQuery/userRefs directly on events.list for scoped audit evidence.",
|
|
313
320
|
"Use paginated memberships reads for deterministic audits.",
|
|
314
321
|
],
|
|
315
322
|
safetyChecks: [
|
|
@@ -368,7 +375,7 @@ const AI_SKILLS = [
|
|
|
368
375
|
scenarios: ["UC-08", "UC-12"],
|
|
369
376
|
objective: "Extract, download, and hand off files embedded in Outline documents, including markdown images.",
|
|
370
377
|
featureUpdates: [
|
|
371
|
-
"documents.attachments extracts /api/attachments.redirect references from document markdown.",
|
|
378
|
+
"documents.attachments extracts /api/attachments.redirect references from document markdown and can resolve remembered document titles, URLs, URL ids, and share ids directly.",
|
|
372
379
|
"attachments.download and documents.download_attachments save authenticated binary attachment bytes locally with contentType, byte count, and sha256 metadata.",
|
|
373
380
|
],
|
|
374
381
|
sequence: [
|
|
@@ -394,6 +401,7 @@ const AI_SKILLS = [
|
|
|
394
401
|
},
|
|
395
402
|
],
|
|
396
403
|
efficiencyTips: [
|
|
404
|
+
"Pass query, refs, url, urlId, or shareId directly to documents.attachments or documents.download_attachments instead of opening the document first.",
|
|
397
405
|
"Run documents.attachments first when you only need IDs or want to choose a subset.",
|
|
398
406
|
"Use a scratch outputDir plus overwrite=true for repeatable automation.",
|
|
399
407
|
"Keep download concurrency modest for image-heavy documents.",
|
|
@@ -410,36 +418,53 @@ const AI_SKILLS = [
|
|
|
410
418
|
objective: "Plan and apply edits with revision diff evidence and deterministic rollback paths.",
|
|
411
419
|
featureUpdates: [
|
|
412
420
|
"revisions.diff and documents.apply_patch_safe wrappers added.",
|
|
421
|
+
"documents.diff can resolve remembered document titles, URLs, URL ids, and share ids before comparing proposed text.",
|
|
422
|
+
"documents.safe_update, documents.apply_patch, and documents.apply_patch_safe can resolve remembered document titles, URLs, URL ids, and share ids before guarded writes.",
|
|
423
|
+
"documents.safe_update and documents.apply_patch_safe accept expectedRevision='latest' for one-call edits against the current revision read inside the tool.",
|
|
424
|
+
"revisions.list can resolve remembered document titles, URLs, URL ids, and share ids before listing history.",
|
|
425
|
+
"revisions.diff can resolve remembered document refs and compare the latest two revisions without a separate revisions.list call.",
|
|
426
|
+
"documents.archived and documents.deleted can resolve remembered collection names before history/trash listing.",
|
|
413
427
|
"Revision safety checks included in schema validation and tests.",
|
|
414
428
|
],
|
|
415
429
|
sequence: [
|
|
416
430
|
{
|
|
417
431
|
step: 1,
|
|
418
|
-
tool: "documents.
|
|
419
|
-
purpose: "
|
|
432
|
+
tool: "documents.diff",
|
|
433
|
+
purpose: "Resolve target document refs and compare proposed text before planning a write.",
|
|
420
434
|
},
|
|
421
435
|
{
|
|
422
436
|
step: 2,
|
|
423
|
-
tool: "
|
|
424
|
-
purpose: "
|
|
437
|
+
tool: "documents.open",
|
|
438
|
+
purpose: "Read a revision baseline only when the edit needs separate human or agent review before mutation.",
|
|
425
439
|
},
|
|
426
440
|
{
|
|
427
441
|
step: 3,
|
|
428
|
-
tool: "revisions.
|
|
429
|
-
purpose: "
|
|
442
|
+
tool: "revisions.list",
|
|
443
|
+
purpose: "Resolve target document refs and inspect recent revision timeline for concurrent edits.",
|
|
430
444
|
},
|
|
431
445
|
{
|
|
432
446
|
step: 4,
|
|
433
|
-
tool: "
|
|
434
|
-
purpose: "
|
|
447
|
+
tool: "revisions.diff",
|
|
448
|
+
purpose: "Diff explicit revision IDs or the latest two revisions for precise change context.",
|
|
435
449
|
},
|
|
436
450
|
{
|
|
437
451
|
step: 5,
|
|
452
|
+
tool: "documents.apply_patch_safe",
|
|
453
|
+
purpose: "Apply guarded patch with a numeric expectedRevision or expectedRevision='latest'.",
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
step: 6,
|
|
438
457
|
tool: "revisions.info",
|
|
439
458
|
purpose: "Confirm final revision and patch provenance.",
|
|
440
459
|
},
|
|
441
460
|
],
|
|
442
461
|
efficiencyTips: [
|
|
462
|
+
"Pass query, refs, url, urlId, or shareId directly to documents.diff instead of opening the document first.",
|
|
463
|
+
"Pass query, refs, url, urlId, or shareId directly to documents.safe_update or documents.apply_patch_safe when applying a guarded write.",
|
|
464
|
+
"Use expectedRevision='latest' to avoid a separate read turn when the requested edit should target the current server revision.",
|
|
465
|
+
"Pass query, refs, url, urlId, or shareId directly to revisions.list when the user asks for history by title.",
|
|
466
|
+
"Pass query, refs, url, urlId, or shareId directly to revisions.diff with revisionPair=latest when the user asks what changed recently.",
|
|
467
|
+
"Pass collectionQuery/collectionRefs directly to documents.archived or documents.deleted when reviewing collection-scoped history.",
|
|
443
468
|
"Prefer small patch hunks over full document rewrite when coordinating multiple agents.",
|
|
444
469
|
"Use summary views for revision triage, then hydrate final comparison only.",
|
|
445
470
|
],
|
|
@@ -494,7 +519,8 @@ const AI_SKILLS = [
|
|
|
494
519
|
scenarios: ["UC-11"],
|
|
495
520
|
objective: "Generate consistent documents from templates with strict placeholder enforcement.",
|
|
496
521
|
featureUpdates: [
|
|
497
|
-
"templates.
|
|
522
|
+
"templates.list/info observations populate local template memory.",
|
|
523
|
+
"templates.extract_placeholders and documents.create_from_template wrappers resolve remembered template names before acting.",
|
|
498
524
|
"Strict unresolved placeholder checks to block unsafe publishes.",
|
|
499
525
|
],
|
|
500
526
|
sequence: [
|
|
@@ -520,6 +546,8 @@ const AI_SKILLS = [
|
|
|
520
546
|
},
|
|
521
547
|
],
|
|
522
548
|
efficiencyTips: [
|
|
549
|
+
"Pass templateQuery/templateRef/refs directly when the user names a template but does not provide an ID.",
|
|
550
|
+
"Use memory.lookup or memory.resolve with type=template when you need to inspect remembered template candidates.",
|
|
523
551
|
"Reuse extracted placeholder keys to validate payload before creation.",
|
|
524
552
|
"Use summary view for pipeline loop status checks.",
|
|
525
553
|
],
|
|
@@ -575,7 +603,9 @@ const AI_SKILLS = [
|
|
|
575
603
|
objective: "Automate users/groups/permissions lifecycle changes with explicit verification.",
|
|
576
604
|
featureUpdates: [
|
|
577
605
|
"users lifecycle wrappers (invite, update_role, activate, suspend) added.",
|
|
578
|
-
"
|
|
606
|
+
"users.info, groups.info, and groups.memberships can resolve remembered names/emails before read operations.",
|
|
607
|
+
"documents.users and membership wrappers resolve remembered document and collection refs for scoped permission checks.",
|
|
608
|
+
"Permission mutation wrappers can resolve both the target resource and user/group principal before action-gated add/remove calls.",
|
|
579
609
|
],
|
|
580
610
|
sequence: [
|
|
581
611
|
{
|
|
@@ -610,11 +640,13 @@ const AI_SKILLS = [
|
|
|
610
640
|
},
|
|
611
641
|
],
|
|
612
642
|
efficiencyTips: [
|
|
613
|
-
"
|
|
643
|
+
"Pass query/refs directly to users.info, groups.info, and groups.memberships when the agent only has a remembered name or email.",
|
|
644
|
+
"Use documentQuery/query plus userQuery or groupQuery on access add/remove tools instead of separate resolve calls when the names are already clear.",
|
|
645
|
+
"Batch broad user/group reads before mutations, then pass document or collection refs directly to access verification wrappers.",
|
|
614
646
|
"Separate planning output from execution payload for reliable reruns.",
|
|
615
647
|
],
|
|
616
648
|
safetyChecks: [
|
|
617
|
-
"Never
|
|
649
|
+
"Never execute add/remove access calls from weak or ambiguous resolution candidates.",
|
|
618
650
|
"Use performAction=true only on approved write calls.",
|
|
619
651
|
],
|
|
620
652
|
},
|
|
@@ -705,6 +737,10 @@ const AI_SKILLS = [
|
|
|
705
737
|
objective: "Build deterministic review queues and close loops with comment evidence.",
|
|
706
738
|
featureUpdates: [
|
|
707
739
|
"comments.review_queue wrapper added for scoped editorial queues.",
|
|
740
|
+
"comments.list can resolve remembered document refs for direct thread hydration (includeReplies=true to nest replies).",
|
|
741
|
+
"comments.create / comments.post accept plain text and build the ProseMirror data doc for you.",
|
|
742
|
+
"comments.create / comments.post accept mentions (names/emails/userIds) and auto-insert @-mention nodes; names match on first name.",
|
|
743
|
+
"comments.create / comments.post enforce the 1000-character comment limit pre-flight and accept parentCommentId for replies.",
|
|
708
744
|
"Thread/reply and anchor metadata can be included for full review context.",
|
|
709
745
|
],
|
|
710
746
|
sequence: [
|
|
@@ -720,17 +756,25 @@ const AI_SKILLS = [
|
|
|
720
756
|
},
|
|
721
757
|
{
|
|
722
758
|
step: 3,
|
|
759
|
+
tool: "comments.create",
|
|
760
|
+
purpose: "Create an approved comment directly against an exact document ID or remembered document ref.",
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
step: 4,
|
|
723
764
|
tool: "documents.info",
|
|
724
765
|
purpose: "Hydrate only docs requiring editorial action.",
|
|
725
766
|
},
|
|
726
767
|
{
|
|
727
|
-
step:
|
|
768
|
+
step: 5,
|
|
728
769
|
tool: "events.list",
|
|
729
770
|
purpose: "Track review completion and discussion churn.",
|
|
730
771
|
},
|
|
731
772
|
],
|
|
732
773
|
efficiencyTips: [
|
|
733
774
|
"Scope review_queue to explicit documentIds whenever possible.",
|
|
775
|
+
"Pass query/refs/url/urlId directly to comments.list when drilling into one remembered document.",
|
|
776
|
+
"Pass query/refs/url/urlId directly to comments.create when adding an approved comment to a remembered document.",
|
|
777
|
+
"Use comments.create/comments.post with plain text + mentions instead of hand-building ProseMirror data; pass an email or userId when a first name is ambiguous.",
|
|
734
778
|
"Use limitPerDocument to control queue growth and rerun with cursor-like cadence.",
|
|
735
779
|
],
|
|
736
780
|
safetyChecks: [
|
|
@@ -746,6 +790,7 @@ const AI_SKILLS = [
|
|
|
746
790
|
featureUpdates: [
|
|
747
791
|
"documents.plan_terminology_refactor wrapper added for glossary/map-driven planning.",
|
|
748
792
|
"Plan output is compatible with documents.batch_update execution workflows.",
|
|
793
|
+
"documents.batch_update can resolve per-item document titles, URLs, URL ids, and refs when expectedRevision is supplied.",
|
|
749
794
|
],
|
|
750
795
|
sequence: [
|
|
751
796
|
{
|
|
@@ -776,6 +821,7 @@ const AI_SKILLS = [
|
|
|
776
821
|
],
|
|
777
822
|
efficiencyTips: [
|
|
778
823
|
"Use map/glossary inputs with explicit scope filters to bound search space.",
|
|
824
|
+
"For small approved batches, pass query/refs/url directly in updates[] with expectedRevision='latest' to avoid a separate ID resolution turn.",
|
|
779
825
|
"Review plan hashes and impact counts before any batch apply.",
|
|
780
826
|
],
|
|
781
827
|
safetyChecks: [
|
package/src/cli.js
CHANGED
|
@@ -187,6 +187,7 @@ async function getRuntime(opts, overrideProfileId, context = {}) {
|
|
|
187
187
|
profile,
|
|
188
188
|
client,
|
|
189
189
|
profileSelection,
|
|
190
|
+
memory: { enabled: true },
|
|
190
191
|
};
|
|
191
192
|
}
|
|
192
193
|
|
|
@@ -1003,6 +1004,7 @@ export async function run(argv = process.argv) {
|
|
|
1003
1004
|
profile: hydrated,
|
|
1004
1005
|
client: new OutlineClient(hydrated),
|
|
1005
1006
|
profileSelection,
|
|
1007
|
+
memory: { enabled: true },
|
|
1006
1008
|
});
|
|
1007
1009
|
}
|
|
1008
1010
|
return clientCache.get(storedProfile.id);
|