i-plane 1.1.2 → 1.2.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.
@@ -100,11 +100,20 @@ API endpoints; the diagnostic points to `issueId` from an earlier JSON response.
100
100
  - This is an inventory of the implemented surface, not a claim to cover every
101
101
  endpoint in every edition of Plane.
102
102
 
103
+ ## Project pages
104
+
105
+ `pages` and `page show` use the internal session API. `page outline`, `page read`,
106
+ `page stamp`, `page create`, `page set`, `page insert` and block removal use the
107
+ live document protocol. Whole-page deletion uses the session API. See the
108
+ [page workflow](pages.md) for credentials, fingerprints, formatting losses and
109
+ asynchronous persistence. This internal API can change independently of Plane's
110
+ public API; compatibility is covered by converter fixtures and live acceptance.
111
+
103
112
  ## Adding a command
104
113
 
105
114
  1. Add the command and all options to `src/registry.ts`. The parser gets value
106
115
  flags from the registry, including those of multiword commands.
107
- 2. Add an online handler to `src/dispatch.ts`. Both missing handlers and handlers
116
+ 2. Add an online handler to `src/dispatch.ts` or a session handler to `src/page-dispatch.ts`. Both missing handlers and handlers
108
117
  absent from the registry fail the command-set test.
109
118
  3. Add a fixture invocation and valid option values to the registry suite. Test
110
119
  the requested method, path and body, and assert observable output. Merely
@@ -141,6 +150,7 @@ For live acceptance, build first and use the normal Plane credentials:
141
150
  bun run build
142
151
  node scripts/acceptance.mjs --live
143
152
  node scripts/planning-acceptance.mjs --live
153
+ node scripts/pages-acceptance.mjs --live --project APP
144
154
  ```
145
155
 
146
156
  The first script creates an epic and nine children, then checks labels,
@@ -150,3 +160,8 @@ CLI commands and delete their temporary projects in a `finally` block.
150
160
  They space calls to respect the API request budget and take several minutes;
151
161
  a forced termination can interrupt cleanup. For a focused change, prefer a
152
162
  small targeted live check to repeating both scenarios.
163
+
164
+ The page acceptance script creates and removes one page in the selected existing
165
+ project. It exercises all nine commands and observes saved HTML within a bounded
166
+ window; that window is a test limit, not a persistence guarantee. Run
167
+ `node scripts/page-mutations.mjs` for isolated mutation checks.
package/docs/pages.md ADDED
@@ -0,0 +1,98 @@
1
+ # Project pages
2
+
3
+ Read project knowledge as Markdown, then change a section without rewriting the
4
+ rest of the document. Pages use Plane's internal session API and live editor;
5
+ they are available on instances exposing project pages and the live service.
6
+
7
+ ## Connect
8
+
9
+ Add these to your private credentials file alongside `PLANE_URL` and
10
+ `PLANE_WORKSPACE`:
11
+
12
+ ```ini
13
+ PLANE_LOGIN=you@example.com
14
+ PLANE_PASSWORD=your-password
15
+ ```
16
+
17
+ An API token is optional for page commands and still required for work items.
18
+ `i-plane config` reports whether credentials are configured and where they came
19
+ from, without printing the login password or cookies. Sessions persist under
20
+ `$XDG_CACHE_HOME/i-plane/sessions` or `~/.cache/i-plane/sessions`; the directory
21
+ has mode 700 and files have mode 600. A restricted environment can select a
22
+ private writable directory with `PLANE_SESSION_CACHE` or `--session-cache`.
23
+ An expired session receives one refresh. HTTP and WebSocket connections honor
24
+ `HTTPS_PROXY`, `HTTP_PROXY` and `NO_PROXY`.
25
+
26
+ ## Read, inspect, edit
27
+
28
+ ```bash
29
+ i-plane pages APP
30
+ i-plane page show APP "Release notes"
31
+ i-plane page outline APP "Release notes"
32
+ ```
33
+
34
+ Pages accept a UUID, exact name or unique name prefix. Outline reads the live
35
+ document and shows top-level index, eight-character anchor prefix, node kind and
36
+ 40-character preview. Neither reading command writes anchors. When an existing
37
+ page has missing anchors, assign them explicitly:
38
+
39
+ ```bash
40
+ i-plane page stamp APP "Release notes"
41
+ i-plane page outline APP "Release notes"
42
+ i-plane page read APP "Release notes" --block a1b2c3d4 --json
43
+ ```
44
+
45
+ Use an actual anchor from outline. Copy the returned `fingerprint` into the next
46
+ command; it hashes block content, while the anchor remains stable across edits:
47
+
48
+ ```bash
49
+ i-plane page set APP "Release notes" --block a1b2c3d4 \
50
+ --if-match "$FINGERPRINT" --text "Updated paragraph"
51
+ i-plane page insert APP "Release notes" --after a1b2c3d4 --text "Another paragraph"
52
+ i-plane page insert APP "Release notes" --at-end --file appendix.md
53
+ i-plane page rm APP "Release notes" --block a1b2c3d4 --if-match "$FINGERPRINT" --yes
54
+ ```
55
+
56
+ Read a fresh fingerprint before each edit. A stale fingerprint refuses the
57
+ change. `--force` explicitly bypasses that check. Without `--if-match`, a block
58
+ edit uses the latest live content. A replacement's first block inherits the
59
+ anchor; any additional blocks get new anchors. Repeating a command can produce
60
+ additional changes: commands are never automatically replayed.
61
+
62
+ ## Create, replace, remove
63
+
64
+ ```bash
65
+ i-plane page create APP --name "Release notes" --file release.md
66
+ i-plane page set APP "Release notes" --file revised-release.md
67
+ i-plane page rm APP "Release notes" --yes
68
+ ```
69
+
70
+ `--file` and `--text` are mutually exclusive. Creation without either produces an
71
+ empty page. Creation with content uses two steps; an error after creation names
72
+ the new page UUID so you can recover without creating a duplicate. Empty content
73
+ clears a whole page, but empty block replacement or insertion is refused. Use
74
+ `page rm --block` for a block deletion. Page deletion always requires `--yes`. Plane requires archiving first; the CLI
75
+ archives and then deletes the page. If deletion fails, the error reports the
76
+ archived page UUID so you can inspect and recover it.
77
+ Nested pages and `--parent` are unsupported by the project-page API.
78
+
79
+ ## Delivery and formatting
80
+
81
+ Successful editing means **the live server acknowledged delivery**. It does not
82
+ confirm a database commit. `page show` reads saved HTML and can immediately show
83
+ the previous content: persistence usually takes about ten seconds, with no
84
+ guaranteed upper bound. Use `page outline` and `page read` to check the immediate
85
+ live result. An interrupted write without an acknowledgement reports uncertain
86
+ delivery; inspect the live document before deciding whether to retry.
87
+
88
+ Markdown supports headings, paragraphs, lists, code, links, images and tables.
89
+ Rich editor features such as mentions, callouts, colors, underline, multiple
90
+ paragraphs inside a table cell and layout
91
+ attributes may not survive Markdown conversion. Unsupported nodes remain visible
92
+ as XML text and the reader reports representation losses. Code-block languages
93
+ are restored locally because the server converter discards them.
94
+
95
+ Replacement checks the affected document and converted input. Reported losses
96
+ require `--allow-loss`; `--force` does not approve them. A block edit leaves other
97
+ blocks intact. None of these commands prompts for input, and every command
98
+ supports `--json`. Run `i-plane page set --help` for flags and examples.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "i-plane",
3
- "version": "1.1.2",
4
- "description": "Compact Plane CLI for coding agents: project management, issue tracking, cycles, modules and intake.",
3
+ "version": "1.2.0",
4
+ "description": "Compact Plane CLI for coding agents: tasks, projects, live pages, cycles, modules and intake.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "iiiokojiadbi <iiiokojiadbi@yandex.ru>",
@@ -15,6 +15,7 @@
15
15
  "files": [
16
16
  "dist",
17
17
  "docs/api-coverage.md",
18
+ "docs/pages.md",
18
19
  "AGENTS.md",
19
20
  "CLAUDE.md"
20
21
  ],
@@ -23,7 +24,7 @@
23
24
  },
24
25
  "packageManager": "bun@1.4.0",
25
26
  "scripts": {
26
- "build": "bun build src/cli.ts --target=node --outfile=dist/cli.js --minify --external undici",
27
+ "build": "bun build src/cli.ts --target=node --outdir=dist --splitting --entry-naming=[name].js --chunk-naming=chunks/[name]-[hash].js --minify --external undici --external yjs --external @hocuspocus/provider --external ws --external https-proxy-agent",
27
28
  "check": "tsc --noEmit",
28
29
  "lint": "biome check .",
29
30
  "format": "biome format --write .",
@@ -35,15 +36,23 @@
35
36
  "@types/markdown-it": "14.2.0",
36
37
  "@types/node": "24.13.4",
37
38
  "@types/turndown": "5.0.6",
39
+ "@types/ws": "8.18.1",
38
40
  "typescript": "7.0.2"
39
41
  },
40
42
  "optionalDependencies": {
41
43
  "undici": "8.10.2"
42
44
  },
43
45
  "dependencies": {
46
+ "@hocuspocus/provider": "4.7.0",
47
+ "@mixmark-io/domino": "2.2.0",
48
+ "https-proxy-agent": "9.1.0",
44
49
  "markdown-it": "15.0.1",
50
+ "markdown-it-task-lists": "2.1.1",
45
51
  "turndown": "7.2.4",
46
- "turndown-plugin-gfm": "1.0.2"
52
+ "turndown-plugin-gfm": "1.0.2",
53
+ "ws": "8.21.3",
54
+ "y-protocols": "1.0.7",
55
+ "yjs": "13.6.32"
47
56
  },
48
57
  "keywords": [
49
58
  "plane",
@@ -56,7 +65,9 @@
56
65
  "coding-agent",
57
66
  "agent-tools",
58
67
  "automation",
59
- "markdown"
68
+ "markdown",
69
+ "knowledge-base",
70
+ "collaborative-editing"
60
71
  ],
61
72
  "homepage": "https://github.com/iiiokojiadbi/i-plane#readme",
62
73
  "bugs": {