@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/mcp.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ // SmartDoc's MCP server, as AI apps start it: the copy inside the SmartDoc app (run by the app's
3
+ // own executable as Node), or `npx @smartdoc/cli mcp` (see cli.js). It opens the installed SmartDoc app when the
4
+ // AI first uses it, and passes the AI's messages to it. Only MCP messages go to stdout; progress
5
+ // and errors go to stderr.
6
+ import { readFileSync } from 'node:fs';
7
+ import { runBridge } from './lib/bridge.js';
8
+ import { ensureRunning, readToken } from './lib/launch.js';
9
+ import { VERSION } from './lib/platform.js';
10
+
11
+ const log = (message) => process.stderr.write(`[smartdoc] ${message}\n`);
12
+ const offline = JSON.parse(readFileSync(new URL('./lib/server.json', import.meta.url), 'utf8'));
13
+
14
+ await runBridge({
15
+ ensure: () => ensureRunning({ log }),
16
+ token: () => readToken(),
17
+ log,
18
+ offline,
19
+ version: VERSION,
20
+ });
package/package.json CHANGED
@@ -1,6 +1,31 @@
1
1
  {
2
2
  "name": "@smartdoc/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.0",
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
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "smartdoc": "cli.js"
9
+ },
10
+ "files": [
11
+ "cli.js",
12
+ "mcp.js",
13
+ "lib/"
14
+ ],
15
+ "engines": {
16
+ "node": ">=18"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/tw050x/smartdoc.git",
21
+ "directory": "packages/cli"
22
+ },
23
+ "homepage": "https://tw050x.github.io/smartdoc/",
24
+ "keywords": [
25
+ "mcp",
26
+ "document",
27
+ "review",
28
+ "pdf",
29
+ "claude"
30
+ ]
31
+ }