@smartdoc/cli 0.0.0-stage → 0.4.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/README.md +43 -2
- package/cli.js +32 -0
- package/lib/agents.js +98 -0
- package/lib/apps.js +41 -0
- package/lib/bridge.js +107 -0
- package/lib/claude-code.js +35 -0
- package/lib/commands.js +183 -0
- package/lib/install.js +118 -0
- package/lib/launch.js +96 -0
- package/lib/platform.js +42 -0
- package/lib/server.json +770 -0
- package/mcp.js +20 -0
- package/package.json +29 -4
package/lib/server.json
ADDED
|
@@ -0,0 +1,770 @@
|
|
|
1
|
+
{
|
|
2
|
+
"protocolVersions": [
|
|
3
|
+
"2025-11-25",
|
|
4
|
+
"2025-06-18",
|
|
5
|
+
"2025-03-26",
|
|
6
|
+
"2024-11-05",
|
|
7
|
+
"2024-10-07"
|
|
8
|
+
],
|
|
9
|
+
"capabilities": {
|
|
10
|
+
"prompts": {
|
|
11
|
+
"listChanged": true
|
|
12
|
+
},
|
|
13
|
+
"tools": {
|
|
14
|
+
"listChanged": true
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"instructions": "This server is SmartDoc: a desktop app showing the user's document (a PDF). You review it with the user, in one of two kinds of review, and the app shows the current review beside the document. The app has a tool for each kind: \"Review and draft\" (improve) and \"Review and highlight\" (highlights). Only the active tool's review shows, and get_review returns it; start_review switches to its kind's tool, and switch_tool switches without starting one (for example to show the user an earlier review of the other kind). A draft can have several highlights reviews, one per goal, called focuses (e.g. \"Recruiter skim\", \"The career gap\"): list_focuses shows them, with earlier drafts' goals not yet run on this draft, and switch_focus shows one. A new draft starts with none. An improvement review can have a focus too: a goal, and a short name for it (title); the user may send one from the app (\"…suggest improvements, focusing on: …\"). Without one it's a general review. A document can have variations, one per purpose (such as a CV tailored to a job): \"Original\" is its own line of drafts, and each variation has its own drafts from the draft it started at. Reviews and drafts belong to the variation showing (get_document_info names it, with its purpose, which every review in it should serve); list_variations, switch_variation and create_variation manage them.\nOpen: get_document_info and get_document read the document open in the app. If none is open, or the user means a different one (the user may name it with its document id), open it with open_document: by document_id from list_documents (documents the user has opened before), by path (a PDF on the user's computer, which the user confirms in the app), or with neither so the user picks the file in the app. When open_document reports waiting_for_user, tell the user straight away to switch to the SmartDoc app and answer there, then call get_document_info, which waits for them.\nRead: start with get_document_info to see the document's size and outline. A small document can be read whole with get_document. A large one is read a range of pages at a time (get_document with pages), using the outline, each page's first line and find_text to go to what matters; for a highlights review, read what the goal needs rather than everything.\nSettle the goal first: read the document, get_review and get_history, then decide with the user what the review is for before calling start_review. Either they want the document improved (type \"improve\"), or they want to understand it: the key information in it for their purpose (type \"highlights\"). If it isn't clear which, or what they're after, ask. Pass the agreed goal to start_review in their terms.\nAn improvement review, in rounds:\n1. Review: the current review may already hold the user's requests: text they marked to rewrite, comment on, keep, remove, add to, or ask about. The history shows what earlier reviews raised and what the user decided. Don't raise again anything the user rejected or chose to keep, unless that text has changed since or you have a new reason (say so in the finding), and don't ask questions they've already answered: use their answers. Changes they accepted that are still not in the document can be raised again. If the user asks for a fresh review, ignore the history. Decorate text with add_annotation and add findings with add_finding. Every finding offers the user a decision: a proposed change, a choice of options, a question, a structural move, a design change, or a flag to acknowledge. Respond to each user request with a finding that has in_response_to set. Finish with commit_review; the user then decides in the app.\n2. Decide: the user works through the findings, and may write changes of their own. Read their choices with get_decisions.\n3. Apply: carry out what was accepted and the user's own changes (and use the user's answers and comments) by writing the complete updated document as HTML and calling apply_review. The app draws it to PDF as the next draft. Never apply anything the user rejected, and leave text marked \"keep\" unchanged.\nA highlights review: you decide what's key, for the user's goal. Before starting, having read the document, ask the user what they're looking for and anything about the document that changes what matters (for example which party they are in a contract, or what decision they're making); keep it to the few questions that count. Check list_focuses first: if a focus already has this goal, carry it on or switch to it rather than starting a near-duplicate; if the user wants an earlier draft's focus run again, reuse its goal and name. Start the review with the goal, a short name for it as a focus (title, a few words in the user's terms), and what you learned (context). Then add_highlight for each piece of key information: quote its text, put it in a category you choose for this document (a handful, named in the user's terms, such as \"Payment\", \"Deadlines\", \"Your obligations\", \"Risks\"), say in the note why it matters for their goal, and rate its importance. Also add what the user would expect but the document doesn't say, as a highlight without quotes. Be selective: what matters for the goal, not a summary of everything. Finish with commit_review, with a summary that answers their goal in a few sentences. get_history shows earlier focuses, so a later review can build on them. Nothing is decided or applied, and the document doesn't change.\nText is referenced by quoting it exactly from get_document or find_text (whitespace-insensitive), with the page number.",
|
|
18
|
+
"tools": [
|
|
19
|
+
{
|
|
20
|
+
"name": "list_documents",
|
|
21
|
+
"description": "Documents the user has opened in the app before, newest first, with the one that is open now marked. Open one with open_document and its id.",
|
|
22
|
+
"inputSchema": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {},
|
|
25
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
26
|
+
},
|
|
27
|
+
"annotations": {
|
|
28
|
+
"readOnlyHint": true,
|
|
29
|
+
"destructiveHint": false,
|
|
30
|
+
"openWorldHint": false
|
|
31
|
+
},
|
|
32
|
+
"execution": {
|
|
33
|
+
"taskSupport": "forbidden"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "open_document",
|
|
38
|
+
"description": "Opens a document in the app. With document_id: one from list_documents, opened straight away. With path: a PDF on the user's computer, which the user must confirm in the app first. With neither: the app asks the user to pick a file. The last two return waiting_for_user: tell the user to switch to the SmartDoc app and answer, then call get_document_info, which waits for them.",
|
|
39
|
+
"inputSchema": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"document_id": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"path": {
|
|
46
|
+
"description": "Absolute path to a PDF (~ is allowed)",
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
51
|
+
},
|
|
52
|
+
"annotations": {
|
|
53
|
+
"readOnlyHint": false,
|
|
54
|
+
"destructiveHint": false,
|
|
55
|
+
"openWorldHint": false
|
|
56
|
+
},
|
|
57
|
+
"execution": {
|
|
58
|
+
"taskSupport": "forbidden"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "list_variations",
|
|
63
|
+
"description": "The open document's variations, the one showing marked: \"Original\", the document's own drafts, and one per purpose (such as a job a CV is tailored to), each with its purpose and number of drafts.",
|
|
64
|
+
"inputSchema": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {},
|
|
67
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
68
|
+
},
|
|
69
|
+
"annotations": {
|
|
70
|
+
"readOnlyHint": true,
|
|
71
|
+
"destructiveHint": false,
|
|
72
|
+
"openWorldHint": false
|
|
73
|
+
},
|
|
74
|
+
"execution": {
|
|
75
|
+
"taskSupport": "forbidden"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "switch_variation",
|
|
80
|
+
"description": "Shows one of the open document's variations (from list_variations), on its current draft.",
|
|
81
|
+
"inputSchema": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"variation_id": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": [
|
|
89
|
+
"variation_id"
|
|
90
|
+
],
|
|
91
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
92
|
+
},
|
|
93
|
+
"annotations": {
|
|
94
|
+
"readOnlyHint": false,
|
|
95
|
+
"destructiveHint": false,
|
|
96
|
+
"openWorldHint": false
|
|
97
|
+
},
|
|
98
|
+
"execution": {
|
|
99
|
+
"taskSupport": "forbidden"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "create_variation",
|
|
104
|
+
"description": "Makes a variation of the open document for a purpose of its own, such as a CV tailored to one job or a version for another audience, starting from one of a variation's drafts, and shows it on that draft. Its drafts follow on from there; the other variations are left as they are. Make one when the user asks. Then, unless they say otherwise, start an improvement review of it with the purpose as its goal (start_review, with a short title).",
|
|
105
|
+
"inputSchema": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"properties": {
|
|
108
|
+
"purpose": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"minLength": 1,
|
|
111
|
+
"description": "What the variation is for, in the user's words (e.g. the job and its spec)"
|
|
112
|
+
},
|
|
113
|
+
"name": {
|
|
114
|
+
"description": "A short name for it, e.g. \"Acme product lead\"",
|
|
115
|
+
"type": "string"
|
|
116
|
+
},
|
|
117
|
+
"variation": {
|
|
118
|
+
"description": "The variation to start from, by id (default: the one showing)",
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"draft": {
|
|
122
|
+
"description": "Its draft to start from: the number, 0 for the original (default: its current draft)",
|
|
123
|
+
"type": "integer",
|
|
124
|
+
"minimum": 0,
|
|
125
|
+
"maximum": 9007199254740991
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"purpose"
|
|
130
|
+
],
|
|
131
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
132
|
+
},
|
|
133
|
+
"annotations": {
|
|
134
|
+
"readOnlyHint": false,
|
|
135
|
+
"destructiveHint": false,
|
|
136
|
+
"openWorldHint": false
|
|
137
|
+
},
|
|
138
|
+
"execution": {
|
|
139
|
+
"taskSupport": "forbidden"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "get_document_info",
|
|
144
|
+
"description": "The open document's size and shape, to plan how to read it: page count; word, character, line and (estimated) paragraph counts; estimated tokens and whether it can be read whole; the PDF's own details (title, author, dates); its outline (bookmarks) with page numbers; and the same counts for each page, with its first line. If the user is still answering an open_document request, this waits for them first.",
|
|
145
|
+
"inputSchema": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"properties": {},
|
|
148
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
149
|
+
},
|
|
150
|
+
"annotations": {
|
|
151
|
+
"readOnlyHint": true,
|
|
152
|
+
"destructiveHint": false,
|
|
153
|
+
"openWorldHint": false
|
|
154
|
+
},
|
|
155
|
+
"execution": {
|
|
156
|
+
"taskSupport": "forbidden"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "get_document",
|
|
161
|
+
"description": "The text of the open document (its id, name and which draft is showing), whole or the pages asked for. Quote from this when referencing text. A document too large to read at once must be read a range of pages at a time. If the user is still answering an open_document request, this waits for them first.",
|
|
162
|
+
"inputSchema": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"properties": {
|
|
165
|
+
"pages": {
|
|
166
|
+
"description": "Pages to read, e.g. \"3\", \"5-9\" or \"1-3, 12\". Leave out to read the whole document.",
|
|
167
|
+
"type": "string"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
171
|
+
},
|
|
172
|
+
"annotations": {
|
|
173
|
+
"readOnlyHint": true,
|
|
174
|
+
"destructiveHint": false,
|
|
175
|
+
"openWorldHint": false
|
|
176
|
+
},
|
|
177
|
+
"execution": {
|
|
178
|
+
"taskSupport": "forbidden"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "find_text",
|
|
183
|
+
"description": "Finds a word or phrase in the open document (case and spacing ignored): each match with its page, the exact text matched (quotable as it is) and the text around it.",
|
|
184
|
+
"inputSchema": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"properties": {
|
|
187
|
+
"query": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"minLength": 1
|
|
190
|
+
},
|
|
191
|
+
"limit": {
|
|
192
|
+
"description": "Most matches to return (default and maximum 50)",
|
|
193
|
+
"type": "integer",
|
|
194
|
+
"minimum": 1,
|
|
195
|
+
"maximum": 50
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"required": [
|
|
199
|
+
"query"
|
|
200
|
+
],
|
|
201
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
202
|
+
},
|
|
203
|
+
"annotations": {
|
|
204
|
+
"readOnlyHint": true,
|
|
205
|
+
"destructiveHint": false,
|
|
206
|
+
"openWorldHint": false
|
|
207
|
+
},
|
|
208
|
+
"execution": {
|
|
209
|
+
"taskSupport": "forbidden"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "list_focuses",
|
|
214
|
+
"description": "The highlight tool's focuses on the current draft (one highlights review per goal), newest first, with the one showing marked; and the goals of earlier drafts' focuses not yet run on this draft.",
|
|
215
|
+
"inputSchema": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"properties": {},
|
|
218
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
219
|
+
},
|
|
220
|
+
"annotations": {
|
|
221
|
+
"readOnlyHint": true,
|
|
222
|
+
"destructiveHint": false,
|
|
223
|
+
"openWorldHint": false
|
|
224
|
+
},
|
|
225
|
+
"execution": {
|
|
226
|
+
"taskSupport": "forbidden"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "switch_focus",
|
|
231
|
+
"description": "Shows one of the current draft's highlights reviews (a focus from list_focuses), switching the app to the highlight tool.",
|
|
232
|
+
"inputSchema": {
|
|
233
|
+
"type": "object",
|
|
234
|
+
"properties": {
|
|
235
|
+
"review_id": {
|
|
236
|
+
"type": "string"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"required": [
|
|
240
|
+
"review_id"
|
|
241
|
+
],
|
|
242
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
243
|
+
},
|
|
244
|
+
"annotations": {
|
|
245
|
+
"readOnlyHint": false,
|
|
246
|
+
"destructiveHint": false,
|
|
247
|
+
"openWorldHint": false
|
|
248
|
+
},
|
|
249
|
+
"execution": {
|
|
250
|
+
"taskSupport": "forbidden"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "switch_tool",
|
|
255
|
+
"description": "Switches the app to one of its two tools, showing the current draft's newest review of that kind (or none): \"improve\" (Review and draft) or \"highlights\" (Review and highlight). start_review switches by itself.",
|
|
256
|
+
"inputSchema": {
|
|
257
|
+
"type": "object",
|
|
258
|
+
"properties": {
|
|
259
|
+
"tool": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"enum": [
|
|
262
|
+
"improve",
|
|
263
|
+
"highlights"
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"required": [
|
|
268
|
+
"tool"
|
|
269
|
+
],
|
|
270
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
271
|
+
},
|
|
272
|
+
"annotations": {
|
|
273
|
+
"readOnlyHint": false,
|
|
274
|
+
"destructiveHint": false,
|
|
275
|
+
"openWorldHint": false
|
|
276
|
+
},
|
|
277
|
+
"execution": {
|
|
278
|
+
"taskSupport": "forbidden"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "get_review",
|
|
283
|
+
"description": "The current draft's review in the active tool: its type (improve or highlights), goal and status (open or committed), then for an improvement review the user's requests, findings with their decisions and annotations, or for a highlights review the highlights. Null if there is none yet.",
|
|
284
|
+
"inputSchema": {
|
|
285
|
+
"type": "object",
|
|
286
|
+
"properties": {},
|
|
287
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
288
|
+
},
|
|
289
|
+
"annotations": {
|
|
290
|
+
"readOnlyHint": true,
|
|
291
|
+
"destructiveHint": false,
|
|
292
|
+
"openWorldHint": false
|
|
293
|
+
},
|
|
294
|
+
"execution": {
|
|
295
|
+
"taskSupport": "forbidden"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "get_history",
|
|
300
|
+
"description": "Earlier reviews of this document, across all its drafts, oldest first, of both types: for highlights reviews, the goal and each highlight; for improvement reviews, each finding with what the user decided (status, chosen option, answer, edit, comment), their requests and their own changes, and what became of each review (applied as which draft, decided but not applied, or never committed). Leaves out the current review.",
|
|
301
|
+
"inputSchema": {
|
|
302
|
+
"type": "object",
|
|
303
|
+
"properties": {},
|
|
304
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
305
|
+
},
|
|
306
|
+
"annotations": {
|
|
307
|
+
"readOnlyHint": true,
|
|
308
|
+
"destructiveHint": false,
|
|
309
|
+
"openWorldHint": false
|
|
310
|
+
},
|
|
311
|
+
"execution": {
|
|
312
|
+
"taskSupport": "forbidden"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"name": "start_review",
|
|
317
|
+
"description": "Starts a review of the current draft, once you and the user have agreed what it's for. type \"improve\" suggests changes for the user to decide on; \"highlights\" picks out the key information for the user's goal (goal required). An open review of the same type carries on (taking any new goal); one of the other type is left unfinished.",
|
|
318
|
+
"inputSchema": {
|
|
319
|
+
"type": "object",
|
|
320
|
+
"properties": {
|
|
321
|
+
"type": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"enum": [
|
|
324
|
+
"improve",
|
|
325
|
+
"highlights"
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
"goal": {
|
|
329
|
+
"description": "What the user wants from the review, in their terms. Required for highlights, where a new goal starts a new focus.",
|
|
330
|
+
"type": "string"
|
|
331
|
+
},
|
|
332
|
+
"title": {
|
|
333
|
+
"description": "The focus's short name, a few words (e.g. \"Recruiter skim\"); give one whenever there's a goal",
|
|
334
|
+
"type": "string"
|
|
335
|
+
},
|
|
336
|
+
"context": {
|
|
337
|
+
"description": "What you learned about the document from the user, e.g. which party they are (highlights)",
|
|
338
|
+
"type": "string"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"required": [
|
|
342
|
+
"type"
|
|
343
|
+
],
|
|
344
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
345
|
+
},
|
|
346
|
+
"annotations": {
|
|
347
|
+
"readOnlyHint": false,
|
|
348
|
+
"destructiveHint": false,
|
|
349
|
+
"openWorldHint": false
|
|
350
|
+
},
|
|
351
|
+
"execution": {
|
|
352
|
+
"taskSupport": "forbidden"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "add_annotation",
|
|
357
|
+
"description": "Decorates text in the document (shown on the page; hovering it in the report highlights it).",
|
|
358
|
+
"inputSchema": {
|
|
359
|
+
"type": "object",
|
|
360
|
+
"properties": {
|
|
361
|
+
"quotes": {
|
|
362
|
+
"minItems": 1,
|
|
363
|
+
"type": "array",
|
|
364
|
+
"items": {
|
|
365
|
+
"type": "object",
|
|
366
|
+
"properties": {
|
|
367
|
+
"page": {
|
|
368
|
+
"type": "integer",
|
|
369
|
+
"minimum": 1,
|
|
370
|
+
"maximum": 9007199254740991,
|
|
371
|
+
"description": "Page number, from 1"
|
|
372
|
+
},
|
|
373
|
+
"quote": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"minLength": 1,
|
|
376
|
+
"description": "Exact text from that page (whitespace-insensitive)"
|
|
377
|
+
},
|
|
378
|
+
"occurrence": {
|
|
379
|
+
"description": "Which match, if the text appears more than once (default 1)",
|
|
380
|
+
"type": "integer",
|
|
381
|
+
"minimum": 1,
|
|
382
|
+
"maximum": 9007199254740991
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"required": [
|
|
386
|
+
"page",
|
|
387
|
+
"quote"
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"style": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"enum": [
|
|
394
|
+
"highlight",
|
|
395
|
+
"underline",
|
|
396
|
+
"strike"
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
"note": {
|
|
400
|
+
"type": "string"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"required": [
|
|
404
|
+
"quotes"
|
|
405
|
+
],
|
|
406
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
407
|
+
},
|
|
408
|
+
"annotations": {
|
|
409
|
+
"readOnlyHint": false,
|
|
410
|
+
"destructiveHint": false,
|
|
411
|
+
"openWorldHint": false
|
|
412
|
+
},
|
|
413
|
+
"execution": {
|
|
414
|
+
"taskSupport": "forbidden"
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "add_finding",
|
|
419
|
+
"description": "Adds a finding to the open review. Each finding gives the user a decision. kind: change (proposal.before/after), options (2+ options), question (question), move or design (proposal.description), flag (no action, just to acknowledge).",
|
|
420
|
+
"inputSchema": {
|
|
421
|
+
"type": "object",
|
|
422
|
+
"properties": {
|
|
423
|
+
"kind": {
|
|
424
|
+
"type": "string",
|
|
425
|
+
"enum": [
|
|
426
|
+
"change",
|
|
427
|
+
"options",
|
|
428
|
+
"question",
|
|
429
|
+
"move",
|
|
430
|
+
"design",
|
|
431
|
+
"flag"
|
|
432
|
+
]
|
|
433
|
+
},
|
|
434
|
+
"title": {
|
|
435
|
+
"type": "string",
|
|
436
|
+
"minLength": 1
|
|
437
|
+
},
|
|
438
|
+
"body": {
|
|
439
|
+
"description": "Why it matters",
|
|
440
|
+
"type": "string"
|
|
441
|
+
},
|
|
442
|
+
"severity": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"enum": [
|
|
445
|
+
"high",
|
|
446
|
+
"medium",
|
|
447
|
+
"low"
|
|
448
|
+
]
|
|
449
|
+
},
|
|
450
|
+
"quotes": {
|
|
451
|
+
"description": "The text this finding is about",
|
|
452
|
+
"type": "array",
|
|
453
|
+
"items": {
|
|
454
|
+
"type": "object",
|
|
455
|
+
"properties": {
|
|
456
|
+
"page": {
|
|
457
|
+
"type": "integer",
|
|
458
|
+
"minimum": 1,
|
|
459
|
+
"maximum": 9007199254740991,
|
|
460
|
+
"description": "Page number, from 1"
|
|
461
|
+
},
|
|
462
|
+
"quote": {
|
|
463
|
+
"type": "string",
|
|
464
|
+
"minLength": 1,
|
|
465
|
+
"description": "Exact text from that page (whitespace-insensitive)"
|
|
466
|
+
},
|
|
467
|
+
"occurrence": {
|
|
468
|
+
"description": "Which match, if the text appears more than once (default 1)",
|
|
469
|
+
"type": "integer",
|
|
470
|
+
"minimum": 1,
|
|
471
|
+
"maximum": 9007199254740991
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"required": [
|
|
475
|
+
"page",
|
|
476
|
+
"quote"
|
|
477
|
+
]
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
"in_response_to": {
|
|
481
|
+
"description": "The id of the user request this answers",
|
|
482
|
+
"type": "string"
|
|
483
|
+
},
|
|
484
|
+
"proposal": {
|
|
485
|
+
"type": "object",
|
|
486
|
+
"properties": {
|
|
487
|
+
"before": {
|
|
488
|
+
"type": "string"
|
|
489
|
+
},
|
|
490
|
+
"after": {
|
|
491
|
+
"type": "string"
|
|
492
|
+
},
|
|
493
|
+
"description": {
|
|
494
|
+
"type": "string"
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
"options": {
|
|
499
|
+
"minItems": 2,
|
|
500
|
+
"type": "array",
|
|
501
|
+
"items": {
|
|
502
|
+
"type": "object",
|
|
503
|
+
"properties": {
|
|
504
|
+
"label": {
|
|
505
|
+
"type": "string"
|
|
506
|
+
},
|
|
507
|
+
"text": {
|
|
508
|
+
"type": "string"
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
"required": [
|
|
512
|
+
"label",
|
|
513
|
+
"text"
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
"question": {
|
|
518
|
+
"type": "string"
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"required": [
|
|
522
|
+
"kind",
|
|
523
|
+
"title"
|
|
524
|
+
],
|
|
525
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
526
|
+
},
|
|
527
|
+
"annotations": {
|
|
528
|
+
"readOnlyHint": false,
|
|
529
|
+
"destructiveHint": false,
|
|
530
|
+
"openWorldHint": false
|
|
531
|
+
},
|
|
532
|
+
"execution": {
|
|
533
|
+
"taskSupport": "forbidden"
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "remove_finding",
|
|
538
|
+
"description": "Removes a finding from the open review.",
|
|
539
|
+
"inputSchema": {
|
|
540
|
+
"type": "object",
|
|
541
|
+
"properties": {
|
|
542
|
+
"id": {
|
|
543
|
+
"type": "string"
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
"required": [
|
|
547
|
+
"id"
|
|
548
|
+
],
|
|
549
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
550
|
+
},
|
|
551
|
+
"annotations": {
|
|
552
|
+
"readOnlyHint": false,
|
|
553
|
+
"destructiveHint": true,
|
|
554
|
+
"openWorldHint": false
|
|
555
|
+
},
|
|
556
|
+
"execution": {
|
|
557
|
+
"taskSupport": "forbidden"
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"name": "add_highlight",
|
|
562
|
+
"description": "Adds a piece of key information to the open highlights review. Quote the text it's in; leave quotes out for something the user would expect that the document doesn't have.",
|
|
563
|
+
"inputSchema": {
|
|
564
|
+
"type": "object",
|
|
565
|
+
"properties": {
|
|
566
|
+
"category": {
|
|
567
|
+
"type": "string",
|
|
568
|
+
"minLength": 1,
|
|
569
|
+
"description": "A category you choose for this document, in the user's terms; reuse the same few"
|
|
570
|
+
},
|
|
571
|
+
"title": {
|
|
572
|
+
"type": "string",
|
|
573
|
+
"minLength": 1,
|
|
574
|
+
"description": "The key information in a few words, e.g. \"Payment due 30 days after invoice\""
|
|
575
|
+
},
|
|
576
|
+
"note": {
|
|
577
|
+
"description": "Why it matters for the user's goal",
|
|
578
|
+
"type": "string"
|
|
579
|
+
},
|
|
580
|
+
"importance": {
|
|
581
|
+
"type": "string",
|
|
582
|
+
"enum": [
|
|
583
|
+
"high",
|
|
584
|
+
"medium",
|
|
585
|
+
"low"
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
"quotes": {
|
|
589
|
+
"description": "The text it's in",
|
|
590
|
+
"type": "array",
|
|
591
|
+
"items": {
|
|
592
|
+
"type": "object",
|
|
593
|
+
"properties": {
|
|
594
|
+
"page": {
|
|
595
|
+
"type": "integer",
|
|
596
|
+
"minimum": 1,
|
|
597
|
+
"maximum": 9007199254740991,
|
|
598
|
+
"description": "Page number, from 1"
|
|
599
|
+
},
|
|
600
|
+
"quote": {
|
|
601
|
+
"type": "string",
|
|
602
|
+
"minLength": 1,
|
|
603
|
+
"description": "Exact text from that page (whitespace-insensitive)"
|
|
604
|
+
},
|
|
605
|
+
"occurrence": {
|
|
606
|
+
"description": "Which match, if the text appears more than once (default 1)",
|
|
607
|
+
"type": "integer",
|
|
608
|
+
"minimum": 1,
|
|
609
|
+
"maximum": 9007199254740991
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"required": [
|
|
613
|
+
"page",
|
|
614
|
+
"quote"
|
|
615
|
+
]
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
"required": [
|
|
620
|
+
"category",
|
|
621
|
+
"title"
|
|
622
|
+
],
|
|
623
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
624
|
+
},
|
|
625
|
+
"annotations": {
|
|
626
|
+
"readOnlyHint": false,
|
|
627
|
+
"destructiveHint": false,
|
|
628
|
+
"openWorldHint": false
|
|
629
|
+
},
|
|
630
|
+
"execution": {
|
|
631
|
+
"taskSupport": "forbidden"
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"name": "remove_highlight",
|
|
636
|
+
"description": "Removes a highlight from the open highlights review.",
|
|
637
|
+
"inputSchema": {
|
|
638
|
+
"type": "object",
|
|
639
|
+
"properties": {
|
|
640
|
+
"id": {
|
|
641
|
+
"type": "string"
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
"required": [
|
|
645
|
+
"id"
|
|
646
|
+
],
|
|
647
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
648
|
+
},
|
|
649
|
+
"annotations": {
|
|
650
|
+
"readOnlyHint": false,
|
|
651
|
+
"destructiveHint": true,
|
|
652
|
+
"openWorldHint": false
|
|
653
|
+
},
|
|
654
|
+
"execution": {
|
|
655
|
+
"taskSupport": "forbidden"
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"name": "commit_review",
|
|
660
|
+
"description": "Finishes the review: nothing more can be added. For an improvement review the user can now make their decisions in the app; for a highlights review, the summary should answer their goal.",
|
|
661
|
+
"inputSchema": {
|
|
662
|
+
"type": "object",
|
|
663
|
+
"properties": {
|
|
664
|
+
"summary": {
|
|
665
|
+
"description": "A short overview shown at the top of the review",
|
|
666
|
+
"type": "string"
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
670
|
+
},
|
|
671
|
+
"annotations": {
|
|
672
|
+
"readOnlyHint": false,
|
|
673
|
+
"destructiveHint": false,
|
|
674
|
+
"openWorldHint": false
|
|
675
|
+
},
|
|
676
|
+
"execution": {
|
|
677
|
+
"taskSupport": "forbidden"
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"name": "get_decisions",
|
|
682
|
+
"description": "The user's decisions on the current review: each finding's status (pending, accepted, rejected, answered, acknowledged), chosen option, answers, edited wording and comments, plus their requests and the changes they wrote themselves (changes: carry these out too).",
|
|
683
|
+
"inputSchema": {
|
|
684
|
+
"type": "object",
|
|
685
|
+
"properties": {},
|
|
686
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
687
|
+
},
|
|
688
|
+
"annotations": {
|
|
689
|
+
"readOnlyHint": true,
|
|
690
|
+
"destructiveHint": false,
|
|
691
|
+
"openWorldHint": false
|
|
692
|
+
},
|
|
693
|
+
"execution": {
|
|
694
|
+
"taskSupport": "forbidden"
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"name": "apply_review",
|
|
699
|
+
"description": "Applies the committed review: supply the complete updated document as self-contained HTML (inline CSS, no scripts or external resources). Keep the current draft's look, and lay the content out in reading order without absolute positioning, so the PDF's text reads in the right order. It becomes the next draft. If the current draft isn't the newest, later drafts are set aside.",
|
|
700
|
+
"inputSchema": {
|
|
701
|
+
"type": "object",
|
|
702
|
+
"properties": {
|
|
703
|
+
"html": {
|
|
704
|
+
"type": "string",
|
|
705
|
+
"minLength": 1
|
|
706
|
+
},
|
|
707
|
+
"summary": {
|
|
708
|
+
"description": "What changed, shown with the draft",
|
|
709
|
+
"type": "string"
|
|
710
|
+
},
|
|
711
|
+
"applied_item_ids": {
|
|
712
|
+
"description": "The findings this draft carries out",
|
|
713
|
+
"type": "array",
|
|
714
|
+
"items": {
|
|
715
|
+
"type": "string"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
"required": [
|
|
720
|
+
"html"
|
|
721
|
+
],
|
|
722
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
723
|
+
},
|
|
724
|
+
"annotations": {
|
|
725
|
+
"readOnlyHint": false,
|
|
726
|
+
"destructiveHint": true,
|
|
727
|
+
"openWorldHint": false
|
|
728
|
+
},
|
|
729
|
+
"execution": {
|
|
730
|
+
"taskSupport": "forbidden"
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
],
|
|
734
|
+
"prompts": [
|
|
735
|
+
{
|
|
736
|
+
"name": "improve",
|
|
737
|
+
"title": "Improve a document",
|
|
738
|
+
"description": "Review a document in SmartDoc and suggest changes for you to decide on.",
|
|
739
|
+
"arguments": [
|
|
740
|
+
{
|
|
741
|
+
"name": "file",
|
|
742
|
+
"description": "Path to the PDF to open (leave out to use the open document)",
|
|
743
|
+
"required": false
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"name": "goal",
|
|
747
|
+
"description": "What you want from the review",
|
|
748
|
+
"required": false
|
|
749
|
+
}
|
|
750
|
+
]
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"name": "highlights",
|
|
754
|
+
"title": "Find the key information",
|
|
755
|
+
"description": "Have the AI pick out the key information in a document for what you need.",
|
|
756
|
+
"arguments": [
|
|
757
|
+
{
|
|
758
|
+
"name": "file",
|
|
759
|
+
"description": "Path to the PDF to open (leave out to use the open document)",
|
|
760
|
+
"required": false
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"name": "goal",
|
|
764
|
+
"description": "What you want from the review",
|
|
765
|
+
"required": false
|
|
766
|
+
}
|
|
767
|
+
]
|
|
768
|
+
}
|
|
769
|
+
]
|
|
770
|
+
}
|