openwriter 0.36.2 → 0.36.3
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/dist/bin/pad.js +4 -1
- package/package.json +1 -1
- package/skill/SKILL.md +3 -3
- package/skill/docs/setup.md +2 -2
package/dist/bin/pad.js
CHANGED
|
@@ -52,7 +52,10 @@ import { createConnection } from 'net';
|
|
|
52
52
|
import { readConfig, saveConfig } from '../server/helpers.js';
|
|
53
53
|
const args = process.argv.slice(2);
|
|
54
54
|
// Subcommands (run and exit, don't start server)
|
|
55
|
-
|
|
55
|
+
// `setup` is the canonical one-time bootstrap verb (installs the package,
|
|
56
|
+
// wires MCP, drops the skill). `install-skill` is kept as a hidden alias for
|
|
57
|
+
// backwards compatibility with existing links/docs.
|
|
58
|
+
if (args[0] === 'setup' || args[0] === 'install-skill') {
|
|
56
59
|
import('../server/install-skill.js').then(m => m.installSkill());
|
|
57
60
|
}
|
|
58
61
|
else if (args[0] === 'plugin') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openwriter",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.3",
|
|
4
4
|
"description": "The open-source writing surface for AI agents. Markdown-native editor with pending change review — your agent writes, you accept or reject.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/skill/SKILL.md
CHANGED
|
@@ -40,7 +40,7 @@ You are a writing collaborator. You read documents and make edits **exclusively
|
|
|
40
40
|
- **First time in a session, large batch (N > 20):** give the user a heads-up BEFORE dispatching: "OpenWriter detected 47 docs that haven't been summarized yet — first-time setup. Refreshing them in the background; this'll take ~30 seconds and a few cents of Haiku usage." Then dispatch and report when done.
|
|
41
41
|
- **Very large batch (N > 30):** one minion can't get through that many in reasonable wall time. Switch to **chunked parallel dispatch** — multiple minions, each given an explicit docId list, all dispatched in a single message with `run_in_background: true`. Full procedure (chunking strategy, explicit-list prompt format, failure modes) lives in this skill's `docs/enrichment.md`. Read that doc before dispatching anything over 30 docs.
|
|
42
42
|
|
|
43
|
-
**If the subagent isn't installed** (older openwriter, or the user skipped
|
|
43
|
+
**If the subagent isn't installed** (older openwriter, or the user skipped setup): the Agent call returns `Agent type 'openwriter-enrichment-minion' not found`. Tell the user once: "OpenWriter has stale docs but the enrichment minion isn't installed yet — run `npx openwriter setup` and restart Claude Code." Then proceed with their original request without enriching; don't loop on the failure.
|
|
44
44
|
|
|
45
45
|
**If the user opts out** ("stop nagging me about enrichment for X workspace"): call `update_workspace_context` with `enrichmentDisabled: true` for that workspace. The footer + ENRICHMENT_STATUS will drop those docs from their counts immediately.
|
|
46
46
|
6. **Dispatch the sort minion when openwriter says so.** The user marks docs in the sidebar with "Request sort" when they don't know where a doc belongs and want you to file it — the mark *is* them delegating the placement decision. OpenWriter surfaces pending sorts two ways: (a) `SORT_STATUS: N docs awaiting sort` in the MCP server's session-start instructions; (b) a `⚠ N docs awaiting sort. Dispatch:` footer on `list_documents` / `list_workspaces` / `get_workspace_structure`. Both signals include the **complete dispatch call inline** — copy it verbatim and fire the Agent tool with those exact field values. When you see either signal, dispatch the minion immediately, before responding to the user's request. The minion self-discovers via `list_pending_sorts`, reads each doc, picks the best workspace + container from purpose hints, files it (`move_item`), retires the request (`mark_sorted`), and returns a one-line "what moved" summary.
|
|
@@ -60,7 +60,7 @@ You are a writing collaborator. You read documents and make edits **exclusively
|
|
|
60
60
|
|
|
61
61
|
**Manual path still exists.** Users who want to approve each move can use the sidebar: `propose_sort({ proposals: [...] })` writes a proposal per doc, the badge flips to "proposal ready," and accept/reject in the popover triggers the move. The minion doesn't use this — it's for when the user explicitly wants a gate. To turn auto-sort off for a workspace, call `update_workspace_context({ workspaceFile, context: { autoSortDisabled: true } })` — its docs drop from `list_pending_sorts` and fall back to manual handling.
|
|
62
62
|
|
|
63
|
-
**If the subagent isn't installed** (older openwriter, or the user skipped
|
|
63
|
+
**If the subagent isn't installed** (older openwriter, or the user skipped setup): the Agent call returns `Agent type 'openwriter-sort-minion' not found`. Tell the user once: "OpenWriter has docs awaiting sort but the sort minion isn't installed yet — run `npx openwriter setup` and restart Claude Code." Then proceed with their original request; don't loop on the failure.
|
|
64
64
|
7. **Emit deep links whenever you cite a docId.** Any time you reference a specific document in chat — naming it, summarizing it, pointing the user at a beat or paragraph inside it — call `get_doc_link` and render the result using this exact presentation pattern:
|
|
65
65
|
|
|
66
66
|
**Doc level** (one link, header bold):
|
|
@@ -650,7 +650,7 @@ The plugin ships with the Author's Voice skill built in (`plugins/authors-voice/
|
|
|
650
650
|
|
|
651
651
|
```bash
|
|
652
652
|
npm install -g openwriter@latest
|
|
653
|
-
npx openwriter
|
|
653
|
+
npx openwriter setup
|
|
654
654
|
```
|
|
655
655
|
|
|
656
656
|
Then restart your Claude Code session (`/mcp` to reconnect).
|
package/skill/docs/setup.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Quick install
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npx openwriter
|
|
6
|
+
npx openwriter setup
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
This installs openwriter globally, configures the MCP server for Claude Code, and copies this skill — all in one step. After it finishes, the user just needs to restart their Claude Code session.
|
|
@@ -54,7 +54,7 @@ The enrichment minion is NOT auto-discovered. Place it at one of:
|
|
|
54
54
|
- `~/.config/opencode/agents/openwriter-enrichment-minion.md` (global, all projects)
|
|
55
55
|
- `.opencode/agents/openwriter-enrichment-minion.md` (this project only, repo root)
|
|
56
56
|
|
|
57
|
-
Source file lives at `~/.claude/skills/openwriter/agents/openwriter-enrichment-minion.md` after `npx openwriter
|
|
57
|
+
Source file lives at `~/.claude/skills/openwriter/agents/openwriter-enrichment-minion.md` after `npx openwriter setup`. Copy it to one of the paths above and restart OpenCode. The filename becomes the agent name OpenCode resolves when the parent dispatches it.
|
|
58
58
|
|
|
59
59
|
## After setup
|
|
60
60
|
|