paper-mono 0.62.0 → 0.62.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release notes
2
2
 
3
+ ## 0.62.1 — 2026-08-28
4
+
5
+ - Made bare `paper` and `npx paper-mono` the canonical specialist launch paths across help, workflow metadata, clean-room release proof, and public documentation.
6
+ - Kept `paper mono` as a compatibility-only route without exposing it in primary onboarding or help.
7
+ - Let Pi load project instructions, skills, cwd, and generic tool guidance exactly once, while preserving repository-relative provider metadata for Pi-loaded context.
8
+
3
9
  ## 0.62.0 — 2026-08-28
4
10
 
5
11
  - Added equivalent public `paper` and `paper-mono` binaries with deterministic Paper reads, screenshots, diagnostics, and the guarded specialist.
package/DEPENDENCIES.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": "paper-mono-dependencies.v1",
3
- "package": "paper-mono@0.62.0",
3
+ "package": "paper-mono@0.62.1",
4
4
  "external": [
5
5
  {
6
6
  "name": "@earendil-works/pi-agent-core",
package/README.md CHANGED
@@ -12,11 +12,10 @@ Open a terminal in the destination repository root before starting the specialis
12
12
 
13
13
  ```bash
14
14
  npm install -g paper-mono
15
- paper doctor
16
- paper mono
15
+ paper
17
16
  ```
18
17
 
19
- On first use, enter `/login` inside `paper mono` and choose a supported model provider. Then tell Paper Mono which reference and destination surface to inspect.
18
+ On first use, enter `/login` inside `paper` and choose a supported model provider. Then tell Paper Mono which reference and destination surface to inspect.
20
19
 
21
20
  The default workflow is deliberately gated:
22
21
 
@@ -40,19 +39,19 @@ It is not a hosted design service, a Paper replacement, a Chrome automation tool
40
39
  Reference-to-code is the default. Two explicit alternatives are available:
41
40
 
42
41
  ```bash
43
- paper mono --audit-only
44
- paper mono --copilot
42
+ paper --audit-only
43
+ paper --copilot
45
44
  ```
46
45
 
47
46
  - `--audit-only` is permanently read-only and can never unlock mutation.
48
47
  - `--copilot` can propose guarded work inside Paper, but the same brief approval boundary still applies.
49
48
 
50
- `paper mono --list-models` is a model-inventory helper, not a fourth workflow.
49
+ `paper --list-models` is a model-inventory helper, not a fourth workflow.
51
50
 
52
51
  For a one-command trial without a global install, use:
53
52
 
54
53
  ```bash
55
- npx paper-mono mono
54
+ npx paper-mono
56
55
  ```
57
56
 
58
57
  `npx` uses npm-managed cache and Paper Mono may create normal local state under `~/.paper/agent`; it only avoids a global package install. The package exposes equivalent `paper` and `paper-mono` binaries. Documentation uses `paper` as the canonical command.
@@ -75,33 +74,32 @@ paper selection --json
75
74
  paper tree --json
76
75
  paper node "replace-with-node-id" --json
77
76
  paper screenshot --out reference --json
78
- paper mono --help
79
77
  ```
80
78
 
81
- Machine-readable commands emit JSON without decorative stdout. Screenshot exports require an explicit `--node` or exactly one current selection, append the verified image extension when needed, and refuse to overwrite an existing path. Deterministic owner commands reject unknown subcommands, and the specialist rejects unsupported flags, invalid option values, path-like `--session` values, and conflicting session actions with a nonzero exit and an actionable error. Bare positional text on `paper mono` is prompt input. Use `paper mono -- --version` or the same `--` terminator for prompt text that looks like an option. The short `paper` specialist form reserves the owner command words `show`, `info`, `selection`, `tree`, `node`, `screenshot`, `doctor`, `page`, and `help`; use `paper mono` when prompt text could be mistaken for one of them.
79
+ Machine-readable commands emit JSON without decorative stdout. Screenshot exports require an explicit `--node` or exactly one current selection, append the verified image extension when needed, and refuse to overwrite an existing path. Deterministic owner commands reject unknown subcommands, and the specialist rejects unsupported flags, invalid option values, path-like `--session` values, and conflicting session actions with a nonzero exit and an actionable error. Positional text on `paper` is prompt input unless its first word is a reserved owner command: `show`, `info`, `selection`, `tree`, `node`, `screenshot`, `doctor`, `page`, or `help`. Put `--` before option-shaped or reserved-word prompt text; for example, `paper -- --version` or `paper -- info about this layout`.
82
80
 
83
81
  ## Model authentication
84
82
 
85
- Run `paper mono`, enter `/login`, and choose a provider. You may instead use that provider's documented environment variable. `paper mono --list-models` shows available model IDs; Paper Mono never prints credential values in diagnostics.
83
+ Run `paper`, enter `/login`, and choose a provider. You may instead use that provider's documented environment variable. `paper --list-models` shows available model IDs; Paper Mono never prints credential values in diagnostics.
86
84
 
87
85
  Credentials, settings, and sessions stay under `~/.paper/agent` by default. Set `PAPER_CODING_AGENT_DIR` before the first run to use another local directory. `--session <id>` accepts a verified session ID only; public v1 rejects path-like values before session activation. Use `--fork <path-or-id>` when you explicitly intend to import a transcript into a new session scoped to the current project. `--session-dir <dir>` overrides session storage and lookup only; it may place transcripts outside the agent home and uses the runtime's explicit-directory lookup instead of Paper Mono's hardened implicit-session verification path. Use only a directory you trust. A resumed session is mutation-locked again until the current brief is reconfirmed.
88
86
 
89
87
  Resume a previous interactive session with:
90
88
 
91
89
  ```bash
92
- paper mono -r
90
+ paper -r
93
91
  ```
94
92
 
95
93
  ## Privacy and network boundaries
96
94
 
97
95
  Paper document reads travel over the loopback MCP endpoint at `127.0.0.1`. Paper Mono disables the inherited install ping, automatic version polling, provider-attribution telemetry, and executable downloader before startup; it adds no product telemetry or hidden backend and does not silently phone home. The public TUI also disables inherited `/debug`, `/export`, `/import`, and `/share` commands, so a locked session cannot write a raw debug log or export, replace itself from a file, or send a transcript to an external sharing service. Generated provider metadata names the current project as `<repository-root>` and uses repository-relative labels for attached and context files; Paper Mono does not add the absolute local project path to the model request. User-authored prompts, attached file contents, imported instructions, tool results, or approved commands can still contain paths. Prompts, relevant code/reference context, and tool results needed for reasoning are sent to the model provider you select, so that provider's privacy and retention terms apply.
98
96
 
99
- Use `PAPER_OFFLINE=1` or `paper mono --offline` to disable startup network operations. Local deterministic Paper reads remain available, but model work still requires a reachable configured provider unless you use a local one.
97
+ Use `PAPER_OFFLINE=1` or `paper --offline` to disable startup network operations. Local deterministic Paper reads remain available, but model work still requires a reachable configured provider unless you use a local one.
100
98
 
101
99
  ## Compatibility and current limits
102
100
 
103
101
  - Node.js 22.19.0 or newer is required.
104
- - `fd` (or `fdfind`) and `rg` must already be executable on `PATH` before `paper mono` starts. Missing tools fail with install guidance in both default and offline modes; Paper Mono does not acquire them.
102
+ - `fd` (or `fdfind`) and `rg` must already be executable on `PATH` before `paper` starts. Missing tools fail with install guidance in both default and offline modes; Paper Mono does not acquire them.
105
103
  - Paper Desktop must be running with a document open for live MCP reads.
106
104
  - Clean-room installation and offline CLI behavior are exercised on Apple-silicon macOS with Node.js 22.23.1. That receipt does not claim live Paper Desktop integration on any operating system. The package declares no OS restriction, but Linux and Windows live integration remain unproven.
107
105
  - A static Snapshot cannot prove original motion, hidden application state, backend behavior, or inaccessible assets. The brief labels those details as unknown instead of inventing them.
@@ -112,7 +110,7 @@ Use `PAPER_OFFLINE=1` or `paper mono --offline` to disable startup network opera
112
110
 
113
111
  - **Paper is closed or no file is open:** open Paper Desktop and a document, then rerun `paper doctor --json`. Reinstallation is unnecessary.
114
112
  - **MCP is unreachable:** confirm the document is open and that another process is not interfering with `127.0.0.1:29979`, then rerun doctor. Restart Paper only if the local endpoint still does not recover.
115
- - **Model authentication is missing:** start `paper mono`, enter `/login`, or configure the selected provider's documented environment variable. A missing key should produce guidance, not a stack trace.
113
+ - **Model authentication is missing:** start `paper`, enter `/login`, or configure the selected provider's documented environment variable. A missing key should produce guidance, not a stack trace.
116
114
  - **The Snapshot is too large:** select or name one artboard, rerun bounded inspection, use scale 1, and request JSX/styles for a smaller subtree. Paper Mono suppresses over-budget rich parts whole; it never returns partial JSON, JSX, or base64.
117
115
  - **The wrong file, page, or artboard is active:** run `paper info --json` and `paper selection --json`, switch to the intended target in Paper, and request a fresh brief. Existing approval does not carry across target drift.
118
116
  - **The imported structure is malformed or incomplete:** provide a narrower node or screenshot and let the brief record unsupported details explicitly.
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  APP_NAME,
3
- OWNER_COMMAND,
4
3
  PUBLIC_PROMISE
5
- } from "./chunk-BGKLQ5Y6.js";
4
+ } from "./chunk-E2KMZMUC.js";
6
5
 
7
6
  // src/workflow-contract.ts
8
7
  var PAPER_IMPLEMENTATION_BRIEF_SCHEMA_VERSION = "paper-implementation-brief.v1";
@@ -93,13 +92,13 @@ var PAPER_TOOL_IDS = Object.freeze([
93
92
  // src/owner-help.ts
94
93
  var STANDARD_TOOL_IDS = ["read", "bash", "edit", "write", "grep", "find", "ls"];
95
94
  function printHelp() {
96
- process.stdout.write(`${OWNER_COMMAND} - Paper Desktop design-to-code specialist
95
+ process.stdout.write(`${APP_NAME} - Paper Desktop design-to-code specialist
97
96
 
98
97
  ${PUBLIC_PROMISE}
99
98
 
100
99
  Usage:
101
- ${OWNER_COMMAND} [options] [@files...] [messages...]
102
100
  ${APP_NAME} [options] [@files...] [messages...]
101
+ ${APP_NAME} <command> [options]
103
102
 
104
103
  Arguments:
105
104
  @file Attach a regular file contained by the current repository
@@ -113,7 +112,6 @@ Commands:
113
112
  ${APP_NAME} node <id> [options] Inspect node info, children, or JSX
114
113
  ${APP_NAME} screenshot --out <file> Save a node or single-selection screenshot
115
114
  ${APP_NAME} doctor [--json] Check all 27 Paper tools and reachability
116
- ${OWNER_COMMAND} [options] Start the guarded design-to-code specialist
117
115
 
118
116
  Options:
119
117
  --about-json Print identity, privacy, lock, workflow, and provenance receipts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getAgentDir,
3
3
  getPackageDir
4
- } from "./chunk-BGKLQ5Y6.js";
4
+ } from "./chunk-E2KMZMUC.js";
5
5
 
6
6
  // src/tool-contract.ts
7
7
  import { createHash as createHash2 } from "node:crypto";
@@ -3237,7 +3237,7 @@ function assertPaperContractFixturesExist() {
3237
3237
  assertMonoContractFixturesExist(paperLoadedToolContract);
3238
3238
  }
3239
3239
  function assertPaperContractIdentity(contract) {
3240
- if (contract.specialist !== "paper" || contract.ownerCommand !== "paper mono" || contract.agentHome !== "~/.paper/agent") {
3240
+ if (contract.specialist !== "paper" || contract.ownerCommand !== "paper" || contract.agentHome !== "~/.paper/agent") {
3241
3241
  throw new Error("Paper tools.contract.json identity does not match the owner runtime.");
3242
3242
  }
3243
3243
  }
@@ -18,7 +18,6 @@ function getPackageDir() {
18
18
  }
19
19
  var manifest = JSON.parse(readFileSync(join(getPackageDir(), "package.json"), "utf8"));
20
20
  var APP_NAME = manifest.piConfig?.name ?? "paper";
21
- var OWNER_COMMAND = "paper mono";
22
21
  var PUBLIC_PROMISE = "Turn a Paper reference into a sharp implementation brief, get explicit approval, then carry it faithfully into production code.";
23
22
  var IDENTITY_DOMAIN = "Paper Desktop design-to-code workflows";
24
23
  var CONFIG_DIR_NAME = manifest.piConfig?.configDir ?? ".paper";
@@ -43,7 +42,6 @@ function getAgentDir() {
43
42
  export {
44
43
  getPackageDir,
45
44
  APP_NAME,
46
- OWNER_COMMAND,
47
45
  PUBLIC_PROMISE,
48
46
  IDENTITY_DOMAIN,
49
47
  CONFIG_DIR_NAME,
@@ -7,12 +7,12 @@ import {
7
7
  resolveMonoAgentHome,
8
8
  resolveMonoContractRef,
9
9
  resolvePaperAgentHome
10
- } from "./chunk-UHVY2TIH.js";
10
+ } from "./chunk-ADX5NGJT.js";
11
11
  import {
12
12
  PACKAGE_DISTRIBUTION,
13
13
  VERSION,
14
14
  getPackageDir
15
- } from "./chunk-BGKLQ5Y6.js";
15
+ } from "./chunk-E2KMZMUC.js";
16
16
  import "./chunk-ZX4GFXSY.js";
17
17
 
18
18
  // src/doctor.ts
@@ -315,7 +315,7 @@ async function createPaperToolDoctorReport(options = {}) {
315
315
  };
316
316
  }
317
317
  if (kind === "cli") {
318
- if (name === "paper mono" && reachable.endpointReachable && !reachable.ok) {
318
+ if (name === paperLoadedToolContract.contract.ownerCommand && reachable.endpointReachable && !reachable.ok) {
319
319
  return {
320
320
  ok: false,
321
321
  detail: `live Paper Desktop tool contract failed: ${reachable.detail}`
@@ -5,13 +5,13 @@ import {
5
5
  PAPER_TOOL_SAFETY_CLASSIFICATIONS,
6
6
  printHelp,
7
7
  resolvePaperWorkflowMode
8
- } from "./chunk-I4P43IZS.js";
8
+ } from "./chunk-2LMM23SZ.js";
9
9
  import {
10
10
  assertPaperToolContractHandshake,
11
11
  paperTools,
12
12
  renderPaperToolInventoryXml,
13
13
  resolvePaperAgentHome
14
- } from "./chunk-UHVY2TIH.js";
14
+ } from "./chunk-ADX5NGJT.js";
15
15
  import {
16
16
  APP_NAME,
17
17
  CONFIG_DIR_NAME,
@@ -19,7 +19,7 @@ import {
19
19
  VERSION,
20
20
  applyPaperPrivacyDefaults,
21
21
  getAgentDir
22
- } from "./chunk-BGKLQ5Y6.js";
22
+ } from "./chunk-E2KMZMUC.js";
23
23
  import {
24
24
  invalidPaperArgument,
25
25
  safeArgumentForDiagnostic
@@ -20508,7 +20508,7 @@ var toolDescriptions = {
20508
20508
  find: "Find files by glob pattern (respects .gitignore)",
20509
20509
  ls: "List directory contents"
20510
20510
  };
20511
- function buildSystemPrompt2(options = {}) {
20511
+ function composePaperSystemPrompt(options, composition) {
20512
20512
  const {
20513
20513
  customPrompt,
20514
20514
  selectedTools,
@@ -20521,6 +20521,7 @@ function buildSystemPrompt2(options = {}) {
20521
20521
  toolInventoryXml
20522
20522
  } = options;
20523
20523
  const projectRoot = resolve5(cwd ?? process.cwd());
20524
+ const includeHarnessScaffolding = composition === "standalone";
20524
20525
  const now = /* @__PURE__ */ new Date();
20525
20526
  const dateTime = now.toLocaleString("en-US", {
20526
20527
  weekday: "long",
@@ -20542,7 +20543,7 @@ ${appendSystemPrompt}` : "";
20542
20543
  if (appendSection) {
20543
20544
  prompt2 += appendSection;
20544
20545
  }
20545
- if (contextFiles.length > 0) {
20546
+ if (includeHarnessScaffolding && contextFiles.length > 0) {
20546
20547
  prompt2 += "\n\n# Project Context\n\n";
20547
20548
  prompt2 += "Project-specific instructions and guidelines:\n\n";
20548
20549
  for (const { path: filePath, content } of contextFiles) {
@@ -20553,13 +20554,15 @@ ${content}
20553
20554
  `;
20554
20555
  }
20555
20556
  }
20556
- const customPromptHasRead = !selectedTools || selectedTools.includes("read");
20557
+ const customPromptHasRead = includeHarnessScaffolding && (!selectedTools || selectedTools.includes("read"));
20557
20558
  if (customPromptHasRead && skills.length > 0) {
20558
20559
  prompt2 += formatPromptSkills(skills);
20559
20560
  }
20560
20561
  prompt2 += `
20561
20562
  Current date and time: ${dateTime}`;
20562
- prompt2 += "\nCurrent working directory: repository root (use repository-relative paths)";
20563
+ if (includeHarnessScaffolding) {
20564
+ prompt2 += "\nCurrent working directory: repository root (use repository-relative paths)";
20565
+ }
20563
20566
  return prompt2;
20564
20567
  }
20565
20568
  const tools = selectedTools ?? ["read", "bash", "edit", "write"];
@@ -20572,6 +20575,10 @@ Current date and time: ${dateTime}`;
20572
20575
  return description ? `- ${toolName}: ${description}` : void 0;
20573
20576
  }).filter((line) => line !== void 0).join("\n");
20574
20577
  const availableTools = toolsList.length > 0 ? toolsList : "(none)";
20578
+ const availableToolsSection = includeHarnessScaffolding ? `
20579
+
20580
+ Available tools:
20581
+ ${availableTools}` : "";
20575
20582
  const guidelinesList = [];
20576
20583
  const hasBash = tools.includes("bash");
20577
20584
  const hasEdit = tools.includes("edit");
@@ -20608,6 +20615,10 @@ Current date and time: ${dateTime}`;
20608
20615
  guidelinesList.push(...normalizedGuidelines);
20609
20616
  }
20610
20617
  const guidelines = guidelinesList.map((g) => `- ${g}`).join("\n");
20618
+ const guidelinesSection = includeHarnessScaffolding ? `Guidelines:
20619
+ ${guidelines}
20620
+
20621
+ ` : "";
20611
20622
  let prompt = `You are Paper, a design-to-code agent that bridges design files with production codebases.
20612
20623
 
20613
20624
  ${PUBLIC_PROMISE}
@@ -20615,9 +20626,7 @@ ${PUBLIC_PROMISE}
20615
20626
  You operate inside the Paper agent harness, which connects to the Paper Desktop app via its MCP server. Paper Desktop is a web-technology-based design tool \u2014 its designs are DOM-based, which means you can read and understand their structure natively.
20616
20627
 
20617
20628
  Your primary job is to translate between design and code: reading designs to inform implementation, building code that matches designs precisely, and writing back to design files when needed.
20618
-
20619
- Available tools:
20620
- ${availableTools}
20629
+ ${availableToolsSection}
20621
20630
 
20622
20631
  ## CRITICAL: Paper operator mutation rules (MUST follow)
20623
20632
 
@@ -20662,10 +20671,7 @@ ${toolInventoryXml}
20662
20671
  ` : ""}
20663
20672
  Note: start_working_on_nodes does NOT exist \u2014 do not call it.
20664
20673
 
20665
- Guidelines:
20666
- ${guidelines}
20667
-
20668
- ## Workflows
20674
+ ${guidelinesSection}## Workflows
20669
20675
 
20670
20676
  Snapshot/reference \u2192 Code:
20671
20677
  1. resolve the exact fileId, call paper_get_basic_info to confirm file identity and artboard IDs, and pass that fileId to every following Paper call
@@ -20708,7 +20714,7 @@ Paper Desktop documentation:
20708
20714
  if (appendSection) {
20709
20715
  prompt += appendSection;
20710
20716
  }
20711
- if (contextFiles.length > 0) {
20717
+ if (includeHarnessScaffolding && contextFiles.length > 0) {
20712
20718
  prompt += "\n\n# Project Context\n\n";
20713
20719
  prompt += "Project-specific instructions and guidelines:\n\n";
20714
20720
  for (const { path: filePath, content } of contextFiles) {
@@ -20719,14 +20725,19 @@ ${content}
20719
20725
  `;
20720
20726
  }
20721
20727
  }
20722
- if (hasRead && skills.length > 0) {
20728
+ if (includeHarnessScaffolding && hasRead && skills.length > 0) {
20723
20729
  prompt += formatPromptSkills(skills);
20724
20730
  }
20725
20731
  prompt += `
20726
20732
  Current date and time: ${dateTime}`;
20727
- prompt += "\nCurrent working directory: repository root (use repository-relative paths)";
20733
+ if (includeHarnessScaffolding) {
20734
+ prompt += "\nCurrent working directory: repository root (use repository-relative paths)";
20735
+ }
20728
20736
  return prompt;
20729
20737
  }
20738
+ function buildPaperRuntimePrompt(options = {}) {
20739
+ return composePaperSystemPrompt(options, "runtime");
20740
+ }
20730
20741
 
20731
20742
  // src/runtime.ts
20732
20743
  var paperCliConfig = {
@@ -20819,9 +20830,9 @@ function providerSafePaperSystemPrompt(prompt, projectRoot) {
20819
20830
  }).replace(/<location>([^<]+)<\/location>/g, (element, path6) => {
20820
20831
  const relativeLabel = providerSafeProjectPathLabel(path6, projectRoot);
20821
20832
  return relativeLabel ? `<location>${relativeLabel}</location>` : element;
20822
- }).replace(/ location="([^"]+)"/g, (attribute, path6) => {
20833
+ }).replace(/ (location|path)="([^"]+)"/g, (attribute, name, path6) => {
20823
20834
  const relativeLabel = providerSafeProjectPathLabel(path6, projectRoot);
20824
- return relativeLabel ? ` location="${relativeLabel}"` : attribute;
20835
+ return relativeLabel ? ` ${name}="${relativeLabel}"` : attribute;
20825
20836
  });
20826
20837
  }
20827
20838
  function stableJsonValue(value) {
@@ -22800,11 +22811,8 @@ function buildPaperPromptBody(options = {}) {
22800
22811
  "ls",
22801
22812
  ...paperTools.map((tool) => tool.name)
22802
22813
  ];
22803
- return buildSystemPrompt2({
22804
- cwd: options.cwd,
22814
+ return buildPaperRuntimePrompt({
22805
22815
  selectedTools: [...selectedTools],
22806
- contextFiles: options.contextFiles ?? [],
22807
- skills: options.skills ?? [],
22808
22816
  toolInventoryXml: renderPaperToolInventoryXml()
22809
22817
  });
22810
22818
  }
@@ -23255,7 +23263,7 @@ async function main(args) {
23255
23263
  applyPaperPrivacyDefaults();
23256
23264
  if (args[0] === "page") {
23257
23265
  throw new TypeError(
23258
- "Direct page control is disabled. Start `paper mono --copilot`, inspect the target, approve its exact brief, and use the gated Paper page tools."
23266
+ "Direct page control is disabled. Start `paper --copilot`, inspect the target, approve its exact brief, and use the gated Paper page tools."
23259
23267
  );
23260
23268
  }
23261
23269
  const firstPass = parseArgs(args);
@@ -12,8 +12,8 @@ import {
12
12
  renderPaperToolInventoryXml,
13
13
  resolvePaperAgentHome,
14
14
  resolvePaperContractRef
15
- } from "./chunk-UHVY2TIH.js";
16
- import "./chunk-BGKLQ5Y6.js";
15
+ } from "./chunk-ADX5NGJT.js";
16
+ import "./chunk-E2KMZMUC.js";
17
17
  import "./chunk-ZX4GFXSY.js";
18
18
  export {
19
19
  PAPER_DOMAIN_TOOL_NAMES,
package/bin/paper.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  STANDARD_TOOL_IDS,
8
8
  printHelp,
9
9
  resolvePaperWorkflowMode
10
- } from "./chunks/chunk-I4P43IZS.js";
10
+ } from "./chunks/chunk-2LMM23SZ.js";
11
11
  import {
12
12
  APP_NAME,
13
13
  BUNDLED_PACKAGE_VERSIONS,
@@ -16,7 +16,7 @@ import {
16
16
  VERSION,
17
17
  applyPaperPrivacyDefaults,
18
18
  getAgentDir
19
- } from "./chunks/chunk-BGKLQ5Y6.js";
19
+ } from "./chunks/chunk-E2KMZMUC.js";
20
20
  import {
21
21
  invalidPaperArgument,
22
22
  safeArgumentForDiagnostic
@@ -70,7 +70,7 @@ async function createAboutJson(options = {}) {
70
70
  PAPER_TOOL_SCHEMA_HASHES,
71
71
  paperToolContract,
72
72
  resolvePaperAgentHome
73
- } = await import("./chunks/tool-contract-ZWFZSYL4.js");
73
+ } = await import("./chunks/tool-contract-YVICOYA2.js");
74
74
  const packageLoadErrors = [];
75
75
  const paperEntry = fileURLToPath(import.meta.url);
76
76
  const monoForkRuntime = resolveReportedModule("@creative-int/mono/fork-runtime", paperEntry, packageLoadErrors);
@@ -185,15 +185,15 @@ function argumentsBeforeOptionTerminator(args) {
185
185
  async function runSpecialist(args) {
186
186
  const [{ EnvHttpProxyAgent, setGlobalDispatcher }, { main: runSpecialistMain }] = await Promise.all([
187
187
  import("undici"),
188
- import("./chunks/main-NQIGPQXK.js")
188
+ import("./chunks/main-ZALCRUBF.js")
189
189
  ]);
190
190
  setGlobalDispatcher(new EnvHttpProxyAgent());
191
191
  await runSpecialistMain(args);
192
192
  }
193
193
  async function main(args) {
194
194
  applyPaperPrivacyDefaults();
195
- const isMonoRoute = args[0] === "mono";
196
- const normalizedArgs = isMonoRoute ? args.slice(1) : [...args];
195
+ const isCompatibilityMonoRoute = args[0] === "mono";
196
+ const normalizedArgs = isCompatibilityMonoRoute ? args.slice(1) : [...args];
197
197
  if (normalizedArgs[0] === "help") normalizedArgs[0] = "--help";
198
198
  const optionArgs = argumentsBeforeOptionTerminator(normalizedArgs);
199
199
  if (normalizedArgs[0] === "--help" || normalizedArgs[0] === "-h") {
@@ -202,9 +202,7 @@ async function main(args) {
202
202
  return;
203
203
  }
204
204
  if (optionArgs.includes("--about-json")) {
205
- let aboutOptions = {};
206
- if (isMonoRoute) aboutOptions = specialistAboutOptions(normalizedArgs);
207
- else assertOnly(normalizedArgs, ["--about-json"], "--about-json");
205
+ const aboutOptions = specialistAboutOptions(normalizedArgs);
208
206
  process.stdout.write(`${JSON.stringify(await createAboutJson(aboutOptions))}
209
207
  `);
210
208
  return;
@@ -226,7 +224,7 @@ async function main(args) {
226
224
  const rejected = normalizedArgs[1] ?? normalizedArgs[2] ?? "extra arguments";
227
225
  invalidPaperArgument(`doctor does not accept '${safeArgumentForDiagnostic(rejected)}'.`);
228
226
  }
229
- const { createPaperToolDoctorReport, paperDoctorExitCode, renderPaperToolDoctorReport } = await import("./chunks/doctor-7DE4ASQO.js");
227
+ const { createPaperToolDoctorReport, paperDoctorExitCode, renderPaperToolDoctorReport } = await import("./chunks/doctor-67I6GAUY.js");
230
228
  const report = await createPaperToolDoctorReport();
231
229
  process.stdout.write(
232
230
  normalizedArgs[1] === "--json" ? `${JSON.stringify(report, null, 2)}
@@ -235,13 +233,13 @@ async function main(args) {
235
233
  process.exitCode = paperDoctorExitCode(report);
236
234
  return;
237
235
  }
238
- if (!isMonoRoute && OWNER_READ_COMMANDS.has(normalizedArgs[0] ?? "")) {
236
+ if (!isCompatibilityMonoRoute && OWNER_READ_COMMANDS.has(normalizedArgs[0] ?? "")) {
239
237
  const { handleOwnerReadCommand } = await import("./chunks/owner-commands-MWXW2KMM.js");
240
238
  if (await handleOwnerReadCommand(normalizedArgs)) return;
241
239
  }
242
240
  if (normalizedArgs[0] === "page") {
243
241
  throw new TypeError(
244
- "Direct page control is disabled. Start `paper mono --copilot`, inspect the target, approve its exact brief, and use the gated Paper page tools."
242
+ "Direct page control is disabled. Start `paper --copilot`, inspect the target, approve its exact brief, and use the gated Paper page tools."
245
243
  );
246
244
  }
247
245
  await runSpecialist(normalizedArgs);
package/docs/cli.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  - Node.js 22.19.0 or newer
6
6
  - Paper Desktop with an open document for live reads and Paper workflows
7
- - A supported model-provider login for `paper mono`
8
- - User-installed `fd` (or `fdfind`) and `rg` on `PATH` for `paper mono`
7
+ - A supported model-provider login for `paper`
8
+ - User-installed `fd` (or `fdfind`) and `rg` on `PATH` for `paper`
9
9
 
10
10
  Install the search tools before starting the specialist: `brew install fd ripgrep` on macOS, or `apt install fd-find ripgrep` on Debian or Ubuntu. Missing tools produce the same actionable failure in default and offline modes. Paper Mono never downloads executable dependencies automatically.
11
11
 
@@ -52,23 +52,23 @@ paper doctor --json
52
52
 
53
53
  ## Specialist
54
54
 
55
- `paper mono` starts the interactive design-to-code specialist. It supports persisted sessions, print/text/JSON modes, model selection, and the guarded reference-to-code, audit-only, and Paper-copilot workflows.
55
+ `paper` starts the interactive design-to-code specialist. It supports persisted sessions, print/text/JSON modes, model selection, and the guarded reference-to-code, audit-only, and Paper-copilot workflows.
56
56
 
57
57
  Run it from the destination repository root. The current working directory is recorded locally as the brief's project boundary, constrains approved edit/write paths, and is where approved commands launch. Generated model-request metadata renders that boundary as `<repository-root>` and labels context files relative to it instead of adding the absolute local project path. `@file` arguments accept only regular files contained by that repository after symlink resolution; attached contents become provider-bound prompt context under a repository-relative label. User-authored prompts, attached contents, imported instructions, tool results, and approved commands can still contain paths. Shell approval is an exact command-string gate, not an operating-system sandbox; review absolute paths, parent traversal, redirection, subprocesses, and package lifecycle scripts before approval.
58
58
 
59
59
  ```bash
60
- paper mono --help
61
- paper mono --audit-only
62
- paper mono --copilot
63
- paper mono --continue
64
- paper mono --resume
65
- paper mono --list-models
66
- paper mono --audit-only --about-json
60
+ paper --help
61
+ paper --audit-only
62
+ paper --copilot
63
+ paper --continue
64
+ paper --resume
65
+ paper --list-models
66
+ paper --audit-only --about-json
67
67
  ```
68
68
 
69
- `paper mono --about-json` is a non-mutating argument and configuration metadata receipt; it does not initialize a runtime session. Combine it with `--audit-only`, `--copilot`, `--continue`, or `--resume` to inspect the selected workflow, requested session action, default lock contract, privacy defaults, and provenance without opening an interactive session.
69
+ `paper --about-json` is a non-mutating argument and configuration metadata receipt; it does not initialize a runtime session. Combine it with `--audit-only`, `--copilot`, `--continue`, or `--resume` to inspect the selected workflow, requested session action, default lock contract, privacy defaults, and provenance without opening an interactive session.
70
70
 
71
- Bare positional text after `paper mono` is prompt input, not a subcommand. Use `--` when prompt text itself begins with a hyphen: `paper mono -- --version` sends `--version` as prompt text rather than printing package metadata. The shorter `paper [options] [messages...]` form shares the specialist route only when it does not match an owner command. Its reserved owner words are `show`, `info`, `selection`, `tree`, `node`, `screenshot`, `doctor`, `page`, and `help`; use `paper mono` for unambiguous prompt text.
71
+ Positional text after `paper` is prompt input unless its first word is a reserved owner command. Use `--` to send option-shaped or reserved-word prompt text: `paper -- --version` sends `--version` as prompt text rather than printing package metadata, and `paper -- info about this layout` sends the whole phrase to the specialist. The reserved owner words are `show`, `info`, `selection`, `tree`, `node`, `screenshot`, `doctor`, `page`, and `help`.
72
72
 
73
73
  The public interactive runtime deliberately disables inherited `/debug`, `/export`, `/import`, and `/share` commands. They are absent from command autocomplete and are intercepted before upstream debug-log, file-writing, session-replacement, or network-sharing handlers can run. The global Shift+Ctrl+D debug shortcut is intercepted by the same boundary. Use the documented local session directory for your own backup process; Paper Mono does not provide a raw transcript debug, export, import, or share path in public v1.
74
74
 
@@ -83,6 +83,8 @@ The default agent home is `~/.paper/agent`. Override it with `PAPER_CODING_AGENT
83
83
  - Unknown deterministic subcommands and unsupported specialist flags identify the rejected input and point back to `paper --help`. Invalid option values and conflicting `--continue` / `--resume` actions fail the same way.
84
84
  - Interactive startup remains available for `/login`; headless or non-interactive model execution with a missing provider key exits nonzero with login/environment guidance and no runtime stack trace.
85
85
 
86
+ The historical `paper mono` owner-router spelling remains accepted for compatibility, but bare `paper` is the public and documented specialist entry point.
87
+
86
88
  ## Troubleshooting
87
89
 
88
90
  ### Paper closed or no file open
@@ -95,7 +97,7 @@ Paper Mono expects Paper's local MCP endpoint at `http://127.0.0.1:29979/mcp`. C
95
97
 
96
98
  ### Missing model authentication
97
99
 
98
- Start `paper mono`, enter `/login`, and choose a provider, or configure that provider's documented environment variable. Use `paper mono --list-models` to confirm the model ID. Do not paste keys into prompts, issue reports, or `paper doctor` output.
100
+ Start `paper`, enter `/login`, and choose a provider, or configure that provider's documented environment variable. Use `paper --list-models` to confirm the model ID. Do not paste keys into prompts, issue reports, or `paper doctor` output.
99
101
 
100
102
  ### Missing fd or rg
101
103
 
package/docs/runtime.md CHANGED
@@ -22,6 +22,7 @@ The approval gate is runtime enforcement, not a prompt convention: unapproved pr
22
22
  - Paper reads use Paper Desktop's loopback MCP server at `127.0.0.1`; Paper Mono does not upload a document to its own backend.
23
23
  - Credentials, settings, and sessions live under `~/.paper/agent` by default. `PAPER_CODING_AGENT_DIR` selects another local directory. `--session <id>` accepts a verified session ID only; path-like values are rejected before activation. `--fork <path-or-id>` explicitly imports a transcript into a new session scoped to the current project. `--session-dir <dir>` overrides session storage and lookup, may place transcripts outside the agent home, and uses the runtime's explicit-directory lookup instead of Paper Mono's hardened implicit-session verification path. Use only a trusted directory; package uninstall does not remove it.
24
24
  - Explicit `@file` inputs are limited to regular files contained by the destination repository after symlink resolution. Their contents, or processed image data, are added to the prompt context sent to the selected model provider under repository-relative labels. Generated system, context, and approval metadata renders the local project as `<repository-root>` instead of adding its absolute path. User-authored prompts, attached contents, imported instructions, tool results, or approved commands can still contain paths.
25
+ - Prompt composition follows one ownership chain: Paper supplies Paper-specific doctrine, the shared Mono/Pi chassis supplies active-tool guidance, and Pi's resource loader supplies project instructions, skills, and cwd once. Generated path metadata from every layer is normalized before provider requests.
25
26
  - Prompts, relevant project/reference context, and tool results needed for reasoning are sent to the model provider selected by the user. That provider's privacy, retention, and billing terms apply.
26
27
  - Paper Mono does not print credential values in diagnostics. It forces inherited install telemetry, automatic version polling, and provider-attribution telemetry off before specialist startup, and adds no product telemetry or silent phone-home service.
27
28
  - Inherited `/debug`, `/export`, `/import`, and `/share` TUI commands are removed from autocomplete and intercepted before dispatch. The global Shift+Ctrl+D debug shortcut is intercepted as well. A public Paper Mono session cannot use those paths to write or replace a transcript or upload it to Radius or GitHub Gist.
@@ -30,7 +31,7 @@ The approval gate is runtime enforcement, not a prompt convention: unapproved pr
30
31
 
31
32
  ## Authentication
32
33
 
33
- Run `paper mono`, enter `/login`, and choose a supported provider. Provider environment variables are also accepted where supported by the runtime. `paper mono --list-models` displays available model IDs. Interactive startup remains available so you can enter `/login`; headless or non-interactive model execution without credentials exits nonzero with guided instructions instead of a stack trace.
34
+ Run `paper`, enter `/login`, and choose a supported provider. Provider environment variables are also accepted where supported by the runtime. `paper --list-models` displays available model IDs. Interactive startup remains available so you can enter `/login`; headless or non-interactive model execution without credentials exits nonzero with guided instructions instead of a stack trace.
34
35
 
35
36
  Never share `~/.paper/agent/auth.json`, provider keys, or unredacted session transcripts in support reports.
36
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paper-mono",
3
- "version": "0.62.0",
3
+ "version": "0.62.1",
4
4
  "description": "Local-first Paper Desktop design-to-code specialist for agents and humans",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schemaVersion": "mono-safety-card.v1",
3
- "cardId": "paper:sha256:763820199b4f59b9673bfa24a94661ef8c10020f157a1987faf0fc5a018d0c9a",
3
+ "cardId": "paper:sha256:b53fab419474899ca25a0b84546025fbe758920be3dcddc5dd1e6fd97bf242b8",
4
4
  "specialist": "paper",
5
- "contractHash": "sha256:763820199b4f59b9673bfa24a94661ef8c10020f157a1987faf0fc5a018d0c9a",
5
+ "contractHash": "sha256:b53fab419474899ca25a0b84546025fbe758920be3dcddc5dd1e6fd97bf242b8",
6
6
  "status": "pass",
7
7
  "conjunctive": true,
8
- "verifiedAt": "2026-08-26T17:36:42.243Z",
8
+ "verifiedAt": "2026-08-28T22:55:46.054Z",
9
9
  "verificationSource": "pnpm -C packages/mono safety:verify (L1 engine over executable tool-walk fixtures)",
10
10
  "summary": {
11
11
  "tools": 27,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "mono-tools.v1",
3
3
  "specialist": "paper",
4
- "ownerCommand": "paper mono",
4
+ "ownerCommand": "paper",
5
5
  "agentHome": "~/.paper/agent",
6
6
  "domain": {
7
7
  "comment": "REQ: Paper Desktop design-to-code agent CLI powered by the Paper MCP bridge at http://127.0.0.1:29979/mcp.",
@@ -54,7 +54,7 @@
54
54
  ],
55
55
  "anyOf": [],
56
56
  "cli": [
57
- "paper mono"
57
+ "paper"
58
58
  ],
59
59
  "endpoint": [],
60
60
  "optional": false
@@ -114,7 +114,7 @@
114
114
  ],
115
115
  "anyOf": [],
116
116
  "cli": [
117
- "paper mono"
117
+ "paper"
118
118
  ],
119
119
  "endpoint": [],
120
120
  "optional": false
@@ -174,7 +174,7 @@
174
174
  ],
175
175
  "anyOf": [],
176
176
  "cli": [
177
- "paper mono"
177
+ "paper"
178
178
  ],
179
179
  "endpoint": [],
180
180
  "optional": false
@@ -234,7 +234,7 @@
234
234
  ],
235
235
  "anyOf": [],
236
236
  "cli": [
237
- "paper mono"
237
+ "paper"
238
238
  ],
239
239
  "endpoint": [],
240
240
  "optional": false
@@ -294,7 +294,7 @@
294
294
  ],
295
295
  "anyOf": [],
296
296
  "cli": [
297
- "paper mono"
297
+ "paper"
298
298
  ],
299
299
  "endpoint": [],
300
300
  "optional": false
@@ -354,7 +354,7 @@
354
354
  ],
355
355
  "anyOf": [],
356
356
  "cli": [
357
- "paper mono"
357
+ "paper"
358
358
  ],
359
359
  "endpoint": [],
360
360
  "optional": false
@@ -414,7 +414,7 @@
414
414
  ],
415
415
  "anyOf": [],
416
416
  "cli": [
417
- "paper mono"
417
+ "paper"
418
418
  ],
419
419
  "endpoint": [],
420
420
  "optional": false
@@ -474,7 +474,7 @@
474
474
  ],
475
475
  "anyOf": [],
476
476
  "cli": [
477
- "paper mono"
477
+ "paper"
478
478
  ],
479
479
  "endpoint": [],
480
480
  "optional": false
@@ -534,7 +534,7 @@
534
534
  ],
535
535
  "anyOf": [],
536
536
  "cli": [
537
- "paper mono"
537
+ "paper"
538
538
  ],
539
539
  "endpoint": [],
540
540
  "optional": false
@@ -594,7 +594,7 @@
594
594
  ],
595
595
  "anyOf": [],
596
596
  "cli": [
597
- "paper mono"
597
+ "paper"
598
598
  ],
599
599
  "endpoint": [],
600
600
  "optional": false
@@ -654,7 +654,7 @@
654
654
  ],
655
655
  "anyOf": [],
656
656
  "cli": [
657
- "paper mono"
657
+ "paper"
658
658
  ],
659
659
  "endpoint": [],
660
660
  "optional": false
@@ -714,7 +714,7 @@
714
714
  ],
715
715
  "anyOf": [],
716
716
  "cli": [
717
- "paper mono"
717
+ "paper"
718
718
  ],
719
719
  "endpoint": [],
720
720
  "optional": false
@@ -772,7 +772,7 @@
772
772
  "allOf": [],
773
773
  "anyOf": [],
774
774
  "cli": [
775
- "paper mono"
775
+ "paper"
776
776
  ],
777
777
  "endpoint": [
778
778
  "http://127.0.0.1:29979/mcp"
@@ -834,7 +834,7 @@
834
834
  ],
835
835
  "anyOf": [],
836
836
  "cli": [
837
- "paper mono"
837
+ "paper"
838
838
  ],
839
839
  "endpoint": [],
840
840
  "optional": false
@@ -895,7 +895,7 @@
895
895
  ],
896
896
  "anyOf": [],
897
897
  "cli": [
898
- "paper mono"
898
+ "paper"
899
899
  ],
900
900
  "endpoint": [],
901
901
  "optional": false
@@ -966,7 +966,7 @@
966
966
  ],
967
967
  "anyOf": [],
968
968
  "cli": [
969
- "paper mono"
969
+ "paper"
970
970
  ],
971
971
  "endpoint": [],
972
972
  "optional": false
@@ -1028,7 +1028,7 @@
1028
1028
  ],
1029
1029
  "anyOf": [],
1030
1030
  "cli": [
1031
- "paper mono"
1031
+ "paper"
1032
1032
  ],
1033
1033
  "endpoint": [],
1034
1034
  "optional": false
@@ -1090,7 +1090,7 @@
1090
1090
  ],
1091
1091
  "anyOf": [],
1092
1092
  "cli": [
1093
- "paper mono"
1093
+ "paper"
1094
1094
  ],
1095
1095
  "endpoint": [],
1096
1096
  "optional": false
@@ -1161,7 +1161,7 @@
1161
1161
  ],
1162
1162
  "anyOf": [],
1163
1163
  "cli": [
1164
- "paper mono"
1164
+ "paper"
1165
1165
  ],
1166
1166
  "endpoint": [],
1167
1167
  "optional": false
@@ -1232,7 +1232,7 @@
1232
1232
  ],
1233
1233
  "anyOf": [],
1234
1234
  "cli": [
1235
- "paper mono"
1235
+ "paper"
1236
1236
  ],
1237
1237
  "endpoint": [],
1238
1238
  "optional": false
@@ -1302,7 +1302,7 @@
1302
1302
  ],
1303
1303
  "anyOf": [],
1304
1304
  "cli": [
1305
- "paper mono"
1305
+ "paper"
1306
1306
  ],
1307
1307
  "endpoint": [],
1308
1308
  "optional": false
@@ -1362,7 +1362,7 @@
1362
1362
  ],
1363
1363
  "anyOf": [],
1364
1364
  "cli": [
1365
- "paper mono"
1365
+ "paper"
1366
1366
  ],
1367
1367
  "endpoint": [],
1368
1368
  "optional": false
@@ -1420,7 +1420,7 @@
1420
1420
  "allOf": [],
1421
1421
  "anyOf": [],
1422
1422
  "cli": [
1423
- "paper mono"
1423
+ "paper"
1424
1424
  ],
1425
1425
  "endpoint": [],
1426
1426
  "optional": false
@@ -1481,7 +1481,7 @@
1481
1481
  ],
1482
1482
  "anyOf": [],
1483
1483
  "cli": [
1484
- "paper mono"
1484
+ "paper"
1485
1485
  ],
1486
1486
  "endpoint": [],
1487
1487
  "optional": false
@@ -1552,7 +1552,7 @@
1552
1552
  ],
1553
1553
  "anyOf": [],
1554
1554
  "cli": [
1555
- "paper mono"
1555
+ "paper"
1556
1556
  ],
1557
1557
  "endpoint": [],
1558
1558
  "optional": false
@@ -1622,7 +1622,7 @@
1622
1622
  ],
1623
1623
  "anyOf": [],
1624
1624
  "cli": [
1625
- "paper mono"
1625
+ "paper"
1626
1626
  ],
1627
1627
  "endpoint": [],
1628
1628
  "optional": false
@@ -1693,7 +1693,7 @@
1693
1693
  ],
1694
1694
  "anyOf": [],
1695
1695
  "cli": [
1696
- "paper mono"
1696
+ "paper"
1697
1697
  ],
1698
1698
  "endpoint": [],
1699
1699
  "optional": false