drafted 1.19.8 → 1.19.9
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 +9 -2
- package/cli/drafted.mjs +26 -4
- package/install-mcp.sh +4 -3
- package/mcp/server.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,10 +18,17 @@ Drafted is a native producer and consumer of the **Open Knowledge Format (OKF) v
|
|
|
18
18
|
**Claude Code, Codex, or any MCP client** — installs the MCP server, the Drafted skill, *and* the eight slash commands (into `~/.claude/commands/drafted/` and `~/.codex/prompts/drafted/`):
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
# macOS / Linux — download, then run the local file:
|
|
22
|
+
curl -fsSL https://drafted.live/install.sh -o /tmp/install-drafted.sh
|
|
23
|
+
bash /tmp/install-drafted.sh
|
|
24
|
+
|
|
25
|
+
# Windows (PowerShell) — download, then run the local file:
|
|
26
|
+
Invoke-WebRequest https://drafted.live/install.ps1 -OutFile $env:TEMP\drafted-install.ps1
|
|
27
|
+
powershell -NoProfile -ExecutionPolicy Bypass -File $env:TEMP\drafted-install.ps1
|
|
23
28
|
```
|
|
24
29
|
|
|
30
|
+
> **Why not `curl | bash` / `irm | iex`?** Heuristic antivirus (Norton IDP, SmartScreen) flags the pipe-to-shell pattern as download-and-execute malware. Downloading the installer to a local file and running it avoids the false-positive block.
|
|
31
|
+
|
|
25
32
|
> Adding the MCP server on its own (e.g. `claude mcp add`) gives you the tools without the skill or the commands.
|
|
26
33
|
|
|
27
34
|
**Claude on the web (claude.ai) and Cowork** — install the plugin, not the bare connector. The plugin bundles the Drafted connector *plus* the Drafted skill and the eight slash commands (`/drafted:onboard-drafted`, `/drafted:create-project`, `/drafted:create-skill`, `/drafted:ingest`, `/drafted:extract`, `/drafted:improve-wiki`, `/drafted:improve-skill`, `/drafted:improve-project-harness`); adding the connector URL on its own gives you the tools with none of the guidance.
|
package/cli/drafted.mjs
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { program } from 'commander';
|
|
11
11
|
import { spawn, execSync, execFileSync } from 'child_process';
|
|
12
12
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, statSync, unlinkSync, chmodSync } from 'fs';
|
|
13
|
+
import { writeFile } from 'fs/promises';
|
|
13
14
|
import { join, dirname, basename, resolve } from 'path';
|
|
14
15
|
import { homedir, tmpdir, platform } from 'os';
|
|
15
16
|
import { fileURLToPath } from 'url';
|
|
@@ -176,11 +177,18 @@ function getServerUrl() {
|
|
|
176
177
|
function buildUpdateCommand() {
|
|
177
178
|
const server = getServerUrl().replace(/\/$/, '');
|
|
178
179
|
if (platform() === 'win32') {
|
|
179
|
-
|
|
180
|
+
// Download the installer with Node, then spawn powershell -File on the LOCAL
|
|
181
|
+
// copy. Never `powershell -Command "Invoke-WebRequest ...; powershell -File
|
|
182
|
+
// ..."` — a fetch-and-execute trampoline on the command line is exactly what
|
|
183
|
+
// heuristic AV (Norton IDP.HEUR) flags as malware.
|
|
184
|
+
const tmp = path.join(os.tmpdir(), 'drafted-install.ps1');
|
|
185
|
+
const src = `${server}/install.ps1`;
|
|
180
186
|
return {
|
|
181
187
|
shell: 'powershell.exe',
|
|
182
|
-
args: ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-
|
|
183
|
-
manualCommand:
|
|
188
|
+
args: ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', tmp],
|
|
189
|
+
manualCommand: `Invoke-WebRequest -UseBasicParsing "${src}" -OutFile "${tmp}"
|
|
190
|
+
powershell -NoProfile -ExecutionPolicy Bypass -File "${tmp}"`,
|
|
191
|
+
fetch: { url: src, dest: tmp },
|
|
184
192
|
};
|
|
185
193
|
}
|
|
186
194
|
const script = `tmp=$(mktemp); curl -fsSL ${server}/install.sh -o "$tmp" && bash "$tmp"`;
|
|
@@ -505,7 +513,7 @@ program
|
|
|
505
513
|
.description('Update the npm-installed Drafted MCP daemon')
|
|
506
514
|
.option('--dry-run', 'Print update instructions without starting the updater')
|
|
507
515
|
.option('--yes', 'Start the updater out-of-process')
|
|
508
|
-
.action((options) => {
|
|
516
|
+
.action(async (options) => {
|
|
509
517
|
const update = buildUpdateCommand();
|
|
510
518
|
const data = {
|
|
511
519
|
started: false,
|
|
@@ -517,6 +525,20 @@ program
|
|
|
517
525
|
};
|
|
518
526
|
|
|
519
527
|
if (options.yes && !options.dryRun) {
|
|
528
|
+
if (update.fetch) {
|
|
529
|
+
const { url, dest } = update.fetch;
|
|
530
|
+
try {
|
|
531
|
+
const resp = await fetch(url);
|
|
532
|
+
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
|
|
533
|
+
await writeFile(dest, Buffer.from(await resp.arrayBuffer()));
|
|
534
|
+
} catch (err) {
|
|
535
|
+
console.error(`Could not download the installer: ${err.message}. Run the manual command below instead.`);
|
|
536
|
+
jsonOut(true, 'update', { ...data, started: false, error: String(err.message || err) });
|
|
537
|
+
console.log('No automatic update was started. Run the manual updater command:');
|
|
538
|
+
console.log(` ${update.manualCommand}`);
|
|
539
|
+
process.exit(1);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
520
542
|
const child = spawn(update.shell, update.args, {
|
|
521
543
|
detached: true,
|
|
522
544
|
stdio: 'ignore',
|
package/install-mcp.sh
CHANGED
|
@@ -5,8 +5,9 @@ set -e
|
|
|
5
5
|
# This script installs the Drafted MCP server and CLI globally via npm,
|
|
6
6
|
# then registers it with Claude Desktop, Claude Code, Codex, and Cursor.
|
|
7
7
|
#
|
|
8
|
-
# Run with:
|
|
9
|
-
# curl -fsSL https://drafted.live/install.sh
|
|
8
|
+
# Run with (download first, then run the local file):
|
|
9
|
+
# curl -fsSL https://drafted.live/install.sh -o ~/Downloads/install-drafted.sh
|
|
10
|
+
# bash ~/Downloads/install-drafted.sh
|
|
10
11
|
|
|
11
12
|
SERVER="https://drafted.live"
|
|
12
13
|
INSTALLER_VERSION="1"
|
|
@@ -1254,7 +1255,7 @@ echo -e "${GREEN}${BOLD}You're all set!${RESET}"
|
|
|
1254
1255
|
echo ""
|
|
1255
1256
|
echo -e " ${DIM}MCP name:${RESET} ${BOLD}$INSTALL_NAME${RESET}"
|
|
1256
1257
|
echo -e " ${DIM}Server:${RESET} ${BOLD}$INSTALL_SERVER${RESET}"
|
|
1257
|
-
echo -e " ${DIM}To update production:${RESET} rerun curl -fsSL https://drafted.live/install.sh
|
|
1258
|
+
echo -e " ${DIM}To update production:${RESET} rerun the installer from drafted.live/install (curl -fsSL https://drafted.live/install.sh -o /tmp/install-drafted.sh && bash /tmp/install-drafted.sh)"
|
|
1258
1259
|
echo -e " ${DIM}To uninstall:${RESET} npm uninstall -g drafted --prefix ~/.drafted/npm-global && rm -rf ~/.drafted"
|
|
1259
1260
|
echo ""
|
|
1260
1261
|
echo -e "${YELLOW}${BOLD}"
|
package/mcp/server.mjs
CHANGED
|
@@ -3808,7 +3808,7 @@ function buildInstalledMcpUpdateInstructions(updateMetadata = null) {
|
|
|
3808
3808
|
|
|
3809
3809
|
const server = getServerUrl().replace(/\/$/, '');
|
|
3810
3810
|
const manualCommand = platform() === 'win32'
|
|
3811
|
-
?
|
|
3811
|
+
? `Invoke-WebRequest -UseBasicParsing "${server}/install.ps1" -OutFile "$env:TEMP\drafted-install.ps1"\npowershell -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\drafted-install.ps1"`
|
|
3812
3812
|
: `tmp=$(mktemp); curl -fsSL ${server}/install.sh -o "$tmp" && bash "$tmp"`;
|
|
3813
3813
|
|
|
3814
3814
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drafted",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.9",
|
|
4
4
|
"description": "Drafted — visual thinking surface for humans and AI agents. Renders HTML, markdown, images, and code as frames on a zoomable canvas, with MCP tools for AI agents and real-time sync for humans.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|