@smartdoc/cli 0.4.1 → 0.5.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 +1 -1
- package/lib/server.json +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SmartDoc
|
|
2
2
|
|
|
3
|
-
Review your documents with your own AI. SmartDoc is a desktop app that shows your document (a PDF); your AI reads it, marks up the text and writes findings, and you decide on each one in the app. The AI then writes the next draft from your decisions.
|
|
3
|
+
Review your documents with your own AI. SmartDoc is a desktop app that shows your document (a PDF); your AI reads it, marks up the text and writes findings, and you decide on each one in the app. The AI then writes a preview of the next draft from your decisions, which becomes a draft once you accept it.
|
|
4
4
|
|
|
5
5
|
This package is the `smartdoc` command.
|
|
6
6
|
|
package/lib/server.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"listChanged": true
|
|
15
15
|
}
|
|
16
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.",
|
|
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. Wait for the user's decisions first: call it only when they ask you to, or when get_decisions shows nothing pending. The app draws it to PDF as a preview of the next draft, which the user accepts or discards in the app: only they can make it a draft, so tell them to look at it there. If they want it changed, call apply_review again and the new preview replaces it. 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
18
|
"tools": [
|
|
19
19
|
{
|
|
20
20
|
"name": "list_documents",
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
},
|
|
680
680
|
{
|
|
681
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).",
|
|
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). preview is the preview waiting for the user, if any; outdated means they changed their decisions since it was written.",
|
|
683
683
|
"inputSchema": {
|
|
684
684
|
"type": "object",
|
|
685
685
|
"properties": {},
|
|
@@ -696,7 +696,7 @@
|
|
|
696
696
|
},
|
|
697
697
|
{
|
|
698
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
|
|
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 a preview of the next draft, replacing any earlier preview: not a draft until the user accepts it in the app, so tell them to look at it there. If the current draft isn't the newest, accepting it sets later drafts aside.",
|
|
700
700
|
"inputSchema": {
|
|
701
701
|
"type": "object",
|
|
702
702
|
"properties": {
|
|
@@ -705,7 +705,7 @@
|
|
|
705
705
|
"minLength": 1
|
|
706
706
|
},
|
|
707
707
|
"summary": {
|
|
708
|
-
"description": "What changed, shown with the draft",
|
|
708
|
+
"description": "What changed, shown with the preview and the draft",
|
|
709
709
|
"type": "string"
|
|
710
710
|
},
|
|
711
711
|
"applied_item_ids": {
|
|
@@ -723,7 +723,7 @@
|
|
|
723
723
|
},
|
|
724
724
|
"annotations": {
|
|
725
725
|
"readOnlyHint": false,
|
|
726
|
-
"destructiveHint":
|
|
726
|
+
"destructiveHint": false,
|
|
727
727
|
"openWorldHint": false
|
|
728
728
|
},
|
|
729
729
|
"execution": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartdoc/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "The smartdoc command: sets up Claude Desktop and Claude Code to use the SmartDoc app, checks the connection, and runs SmartDoc's MCP connection for agents set up with npx.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|