@modootoday/pmcp 0.12.0 → 0.13.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/NOTICE +4 -2
- package/README.md +20 -0
- package/dist/cli.js +8519 -6900
- package/dist/harness-worker.js +32 -1
- package/dist/http.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/stdio.js +1 -1
- package/dist/tui-worker.d.ts +2 -0
- package/dist/tui-worker.js +5973 -0
- package/docs/terminal-harness.md +2 -2
- package/docs/terminal-workspace.md +118 -0
- package/package.json +7 -3
package/docs/terminal-harness.md
CHANGED
|
@@ -389,5 +389,5 @@ A at 120 columns and 32 rows or larger: a main pane, worker dock and bottom
|
|
|
389
389
|
coordination pane. Smaller terminals retain a full-width main. The minimum is
|
|
390
390
|
40 columns by 12 rows; the maximum is 1000 in either dimension.
|
|
391
391
|
|
|
392
|
-
|
|
393
|
-
|
|
392
|
+
Use the [terminal workspace](terminal-workspace.md) to render this layout over
|
|
393
|
+
an existing owned group. All control operations remain available through the CLI.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Terminal workspace
|
|
2
|
+
|
|
3
|
+
Use `pmcp tui` to view an existing main runtime and its workers in one terminal.
|
|
4
|
+
The main conversation stays in its native interface. PMCP adds a worker dock,
|
|
5
|
+
coordination panel and explicit control switching. Provider login, folder trust
|
|
6
|
+
and tool approvals stay in their native screens.
|
|
7
|
+
|
|
8
|
+
This feature requires PMCP 0.13.0 or later. The host requires Linux, tmux,
|
|
9
|
+
util-linux flock, Node.js 22 or later and a working
|
|
10
|
+
user systemd manager. The PMCP CLI supports Node or Bun; pane helpers use Node.
|
|
11
|
+
The presentation gets its own 512 MiB, 128-task, one-CPU scope. Native sessions
|
|
12
|
+
retain their existing group budgets and execution profile.
|
|
13
|
+
|
|
14
|
+
## Open a workspace
|
|
15
|
+
|
|
16
|
+
First [create a harness group and its sessions](terminal-harness.md). Set GROUP_FILE
|
|
17
|
+
to that group's private state path, then check prerequisites and create a view:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pmcp --version
|
|
21
|
+
pmcp tui doctor
|
|
22
|
+
pmcp tui create --group-file "$GROUP_FILE" --columns 160 --rows 48
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Set VIEW_FILE to viewFile from the JSON receipt:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
pmcp tui inspect --view "$VIEW_FILE"
|
|
29
|
+
pmcp tui open --view "$VIEW_FILE"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Only open requires an interactive terminal. Create can take its dimensions from
|
|
33
|
+
the current terminal; give both dimensions explicitly when calling from a script.
|
|
34
|
+
At 120 columns by 32 rows or larger, main fills the left, workers appear on the
|
|
35
|
+
right, and coordination occupies four bottom rows. Smaller terminals keep a
|
|
36
|
+
full-width main and a separate management window. The minimum is 40 by 12.
|
|
37
|
+
Views refer to an existing owned group and do not start a provider.
|
|
38
|
+
|
|
39
|
+
## Observe and control
|
|
40
|
+
|
|
41
|
+
Press Ctrl-g, release it, then press a key:
|
|
42
|
+
|
|
43
|
+
| Key | Action | CLI operation |
|
|
44
|
+
| -------- | -------------------------------------------- | ----------------------- |
|
|
45
|
+
| m | Return to main and release worker control | main |
|
|
46
|
+
| w or 1–4 | Observe a worker | observe --index 1 |
|
|
47
|
+
| c | Request control of the current native target | control |
|
|
48
|
+
| r | Release control | release |
|
|
49
|
+
| h | Read owned native history | history |
|
|
50
|
+
| b | Show configured inbox metadata | mailbox |
|
|
51
|
+
| g | Open compact management window | management |
|
|
52
|
+
| d | Detach the view, preserving runtimes | detach |
|
|
53
|
+
| ! | Dismiss the last visible error | dismiss |
|
|
54
|
+
| ? | Show key help | Help in the status line |
|
|
55
|
+
|
|
56
|
+
CLI operations use pmcp tui OPERATION --view "$VIEW_FILE". Worker indices follow
|
|
57
|
+
the dock; CLI observe supports all available indices. Press Ctrl-g twice to
|
|
58
|
+
forward Ctrl-g to the native interface. Native Ctrl-b remains available when
|
|
59
|
+
you hold control. A surrounding tmux may consume its own prefix first.
|
|
60
|
+
|
|
61
|
+
The default is read only. Control progresses through REQUESTING CONTROL and
|
|
62
|
+
CONNECTING WRITER to CONTROL READY. A lease alone does not enable typing: PMCP
|
|
63
|
+
checks that the writable native client is attached to the selected pane's TTY.
|
|
64
|
+
Input stays blocked during acquisition and release. A control lease identifies
|
|
65
|
+
the writer, not which native prompt or approval menu is active.
|
|
66
|
+
|
|
67
|
+
Another writer causes a visible error with a next step. Failures remain in the
|
|
68
|
+
status line, coordination panel and inspect receipt until explicitly dismissed.
|
|
69
|
+
Resize does not clear them. CONTROL UNKNOWN blocks input and requires inspection.
|
|
70
|
+
PMCP never replays uncertain input. An input receipt or mailbox ACK does not
|
|
71
|
+
establish model completion. Provider state remains unknown.
|
|
72
|
+
|
|
73
|
+
## History and mailbox
|
|
74
|
+
|
|
75
|
+
History reads only the owned runtime pane, bounded to 2000 lines and 64 KiB.
|
|
76
|
+
It does not include shell history from before the runtime. The history panel
|
|
77
|
+
supports tmux copy mode; returning to main preserves its native draft. Closing
|
|
78
|
+
the view removes its private history cache.
|
|
79
|
+
|
|
80
|
+
To observe inbox metadata, supply an explicitly chosen mailbox observer actor:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
pmcp tui create --group-file "$GROUP_FILE" --columns 160 --rows 48 --config ./pmcp.toml --actor-file "$OBSERVER_ACTOR_FILE"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The actor must have no live attachment. PMCP uses the existing mailbox service
|
|
87
|
+
and refuses a conflicting attachment. The panel shows message, thread and reply
|
|
88
|
+
IDs. It never reads bodies, marks messages read, acknowledges them, submits input
|
|
89
|
+
or wakes a runtime. Use the [mailbox CLI](mailbox.md) for those explicit actions.
|
|
90
|
+
The view stores the private credential file reference, not its contents.
|
|
91
|
+
|
|
92
|
+
## Detach, close and stop
|
|
93
|
+
|
|
94
|
+
Detach preserves processes and drafts. Reopening returns to read-only main
|
|
95
|
+
observation after releasing this view's control. A lost outer terminal also
|
|
96
|
+
requests release; a crash or unreachable manager may prevent confirmation.
|
|
97
|
+
Inspect before retrying, without replaying input:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
pmcp harness recovery inspect --group-file "$GROUP_FILE"
|
|
101
|
+
pmcp harness attach inspect --group-file "$GROUP_FILE" --session "$SESSION"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Close ends the presentation and preserves all native runtimes:
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
pmcp tui close --view "$VIEW_FILE"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Stop names the exact current native target and requires confirmation:
|
|
111
|
+
|
|
112
|
+
```sh
|
|
113
|
+
pmcp tui stop --view "$VIEW_FILE" --confirm-session "$SESSION"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
There is no stop keyboard shortcut. Group replacement invalidates a view's
|
|
117
|
+
generation: create a fresh view instead of transferring old authority. These
|
|
118
|
+
controls are CLI-only and cannot be invoked through the MCP server.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modootoday/pmcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"author": "modootoday",
|
|
6
6
|
"description": "Use the skills your packages already ship, and keep your AI tools' project configuration in one place.",
|
|
@@ -71,9 +71,10 @@
|
|
|
71
71
|
"clean": "rimraf dist",
|
|
72
72
|
"catalog:refresh": "node scripts/refresh-catalog.mjs",
|
|
73
73
|
"observations:refresh": "node scripts/refresh-observations.mjs",
|
|
74
|
-
"site:build": "node scripts/build-catalog-pages.mjs && node scripts/build-observation-pages.mjs && node scripts/build-sitemap.mjs",
|
|
74
|
+
"site:build": "node scripts/build-site-assets.mjs && node scripts/build-catalog-pages.mjs && node scripts/build-observation-pages.mjs && node scripts/build-guide-pages.mjs && node scripts/build-sitemap.mjs",
|
|
75
|
+
"docs:check": "prettier --check --ignore-path /dev/null README.md docs/*.md && node scripts/build-guide-pages.mjs --check && node scripts/build-site-assets.mjs --check",
|
|
75
76
|
"site:deployed": "node scripts/check-deployed.mjs",
|
|
76
|
-
"prepack": "npm run build && npm run typecheck && npm test",
|
|
77
|
+
"prepack": "npm run docs:check && npm run build && npm run typecheck && npm test",
|
|
77
78
|
"format": "prettier --write .",
|
|
78
79
|
"format:check": "prettier --check ."
|
|
79
80
|
},
|
|
@@ -96,8 +97,11 @@
|
|
|
96
97
|
"@types/node": "^22.15.21",
|
|
97
98
|
"@types/semver": "7.8.0",
|
|
98
99
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
100
|
+
"esbuild": "0.27.4",
|
|
101
|
+
"marked": "18.1.0",
|
|
99
102
|
"prettier": "^3.6.2",
|
|
100
103
|
"rimraf": "^6.0.1",
|
|
104
|
+
"three": "0.186.1",
|
|
101
105
|
"tsup": "^8.5.1",
|
|
102
106
|
"typescript": "^5.9.3",
|
|
103
107
|
"vitest": "^4.0.18"
|