pi-maestro-teammate 2.2.0 → 2.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/README.md +11 -1
- package/package.json +221 -209
- package/src/backends/acp-cli-catalog.ts +6 -0
- package/src/backends/acp-cli.ts +24 -8
- package/src/cli-tools/cli-tools-config.ts +86 -26
- package/src/cli-tools/local-acp.ts +8 -4
- package/src/completion-outbox/coordinator.ts +7 -12
- package/src/completion-outbox/file-store.ts +195 -123
- package/src/completion-outbox/types.ts +2 -0
- package/src/extension/herdr-window-provider.ts +794 -0
- package/src/extension/index.ts +1387 -286
- package/src/extension/mailbox/file-store.ts +25 -8
- package/src/extension/mailbox/host.ts +2 -0
- package/src/extension/mailbox/rollout.ts +12 -2
- package/src/extension/mailbox/router.ts +77 -33
- package/src/extension/mailbox/service.ts +4 -0
- package/src/extension/mailbox/types.ts +8 -1
- package/src/extension/monitor-window-lifecycle.ts +278 -0
- package/src/extension/monitor-window-state.ts +514 -0
- package/src/extension/monitor.ts +616 -15
- package/src/extension/remote-window-monitor.ts +357 -0
- package/src/extension/remote-window-session.ts +50 -0
- package/src/extension/runtime-actor-host.ts +113 -2
- package/src/extension/schemas.ts +112 -6
- package/src/extension/session-endpoints.ts +168 -20
- package/src/extension/teammate-helpers.ts +6 -0
- package/src/extension/teammate-proxy.ts +37 -0
- package/src/extension/tool-error-signal.ts +42 -0
- package/src/extension/workspace-peers.ts +8 -2848
- package/src/extension/workspace-turns-observation.ts +8 -5
- package/src/models/cli-add.ts +8 -2
- package/src/models/model-routing.ts +92 -0
- package/src/public/v1/index.ts +3 -0
- package/src/public/v1/monitor-window-state.ts +525 -0
- package/src/public/v1/session-history.ts +2 -0
- package/src/public/v1/ssh-hosts.ts +209 -0
- package/src/public/v2/runtime-broker.ts +6 -0
- package/src/public/v2/runtime.ts +3 -0
- package/src/remote/child-security.ts +30 -4
- package/src/remote/cli.ts +3 -1
- package/src/remote/config.ts +131 -17
- package/src/remote/driver.ts +15 -0
- package/src/remote/process-tree.ts +12 -28
- package/src/remote/protocol.ts +164 -1
- package/src/remote/server.ts +93 -1
- package/src/remote/ssh-exec.ts +17 -1
- package/src/remote/ssh.ts +162 -17
- package/src/remote/types.ts +29 -2
- package/src/remote/window-protocol.ts +501 -0
- package/src/remote/window-service.ts +566 -0
- package/src/runs/execution-infra.ts +61 -6
- package/src/runs/execution.ts +2 -0
- package/src/runs/pi-subprocess-attempt.ts +246 -99
- package/src/runtime-broker/client.ts +59 -11
- package/src/runtime-broker/mailbox-commit.ts +4 -3
- package/src/runtime-broker/session-commit.ts +121 -0
- package/src/runtime-v2/session-broker-read-model.ts +101 -0
- package/src/runtime-v2/session-domain.ts +397 -0
- package/src/runtime-v2/session-rollout.ts +90 -0
- package/src/sessions/session-core.ts +152 -19
- package/src/sessions/workspace-peer-core.ts +2997 -0
- package/src/shared/agent-status.ts +4 -1
- package/src/shared/types.ts +6 -3
- package/src/transcript/session-history.ts +788 -0
- package/src/tui/connection-wizards.ts +177 -16
- package/src/tui/locale-catalog-model.ts +36 -0
- package/src/tui/model-mapping-overlay.ts +60 -3
- package/src/tui/remote-config-pane.ts +114 -16
- package/src/tui/render.ts +504 -25
- package/types/cli-tools/cli-tools-config.d.ts +8 -3
- package/types/completion-outbox/file-store.d.ts +3 -5
- package/types/completion-outbox/types.d.ts +2 -0
- package/types/extension/herdr-window-provider.d.ts +165 -0
- package/types/extension/mailbox/host.d.ts +1 -0
- package/types/extension/mailbox/rollout.d.ts +6 -0
- package/types/extension/mailbox/router.d.ts +4 -0
- package/types/extension/mailbox/service.d.ts +4 -0
- package/types/extension/mailbox/types.d.ts +7 -0
- package/types/extension/monitor-window-lifecycle.d.ts +96 -0
- package/types/extension/monitor-window-state.d.ts +45 -0
- package/types/extension/monitor.d.ts +105 -0
- package/types/extension/remote-window-monitor.d.ts +52 -0
- package/types/extension/remote-window-session.d.ts +12 -0
- package/types/extension/runtime-actor-host.d.ts +3 -0
- package/types/extension/schemas.d.ts +19 -8
- package/types/extension/session-endpoints.d.ts +27 -3
- package/types/extension/teammate-helpers.d.ts +2 -0
- package/types/extension/tool-error-signal.d.ts +7 -0
- package/types/extension/workspace-peers.d.ts +4 -558
- package/types/models/model-routing.d.ts +17 -0
- package/types/public/v1/index.d.ts +3 -0
- package/types/public/v1/monitor-window-state.d.ts +183 -0
- package/types/public/v1/session-history.d.ts +2 -0
- package/types/public/v1/ssh-hosts.d.ts +24 -0
- package/types/public/v2/runtime-broker.d.ts +1 -0
- package/types/public/v2/runtime.d.ts +3 -0
- package/types/remote/child-security.d.ts +1 -0
- package/types/remote/config.d.ts +12 -4
- package/types/remote/driver.d.ts +8 -2
- package/types/remote/process-tree.d.ts +4 -4
- package/types/remote/protocol.d.ts +40 -4
- package/types/remote/server.d.ts +9 -1
- package/types/remote/ssh-exec.d.ts +3 -0
- package/types/remote/ssh.d.ts +9 -1
- package/types/remote/types.d.ts +22 -2
- package/types/remote/window-protocol.d.ts +127 -0
- package/types/remote/window-service.d.ts +21 -0
- package/types/runs/execution-infra.d.ts +3 -0
- package/types/runtime-broker/client.d.ts +2 -0
- package/types/runtime-broker/mailbox-commit.d.ts +2 -1
- package/types/runtime-broker/session-commit.d.ts +33 -0
- package/types/runtime-v2/session-broker-read-model.d.ts +16 -0
- package/types/runtime-v2/session-domain.d.ts +84 -0
- package/types/runtime-v2/session-rollout.d.ts +24 -0
- package/types/sessions/session-core.d.ts +47 -7
- package/types/sessions/workspace-peer-core.d.ts +603 -0
- package/types/shared/types.d.ts +4 -2
- package/types/transcript/session-history.d.ts +180 -0
- package/types/tui/connection-wizards.d.ts +13 -2
- package/types/tui/locale-catalog-model.d.ts +36 -0
- package/types/tui/model-mapping-overlay.d.ts +2 -0
- package/types/tui/remote-config-pane.d.ts +20 -0
- package/types/tui/render.d.ts +32 -1
package/README.md
CHANGED
|
@@ -187,7 +187,17 @@ project .pi/agents > project .agents > ~/.agents > legacy user directory > bundl
|
|
|
187
187
|
|
|
188
188
|
## Model Routing Profiles
|
|
189
189
|
|
|
190
|
-
Configure task-type defaults with `Alt+M` or `/teammate-models`. The Control Center's **Profiles** tab manages named routing Profiles shared by every project. Its **Routing** tab edits the active global Profile and combines built-in task types, discovered agent types, and types already present in that Profile.
|
|
190
|
+
Configure task-type defaults with `Alt+M` or `/teammate-models`. The Control Center's **Profiles** tab is the saved-template system: it manages multiple named routing Profiles shared by every project. Its **Routing** tab edits the active global Profile and combines built-in task types, discovered agent types, and types already present in that Profile.
|
|
191
|
+
|
|
192
|
+
Switch the current project's template directly by stable Profile ID or display name. With no argument, the command opens the Control Center on **Profiles**:
|
|
193
|
+
|
|
194
|
+
```text
|
|
195
|
+
/teammate-model fast-lane
|
|
196
|
+
/teammate-model Fast Lane
|
|
197
|
+
/teammate-model
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Command completion lists every saved template and marks the project-active and global-default entries. If display names are duplicated, use the stable ID. Direct switching disables but preserves project overrides, matching the Profiles UI.
|
|
191
201
|
|
|
192
202
|
The **Roles** tab lists discovered roles and their effective durable route. Role-scoped settings can be edited through the unified Settings surface as `role.<role-name>.model`, `role.<role-name>.fallbacks`, and `role.<role-name>.thinking`. These settings are stored in the same global Profile or project override file; package updates never rewrite role definitions or user routing data.
|
|
193
203
|
|
package/package.json
CHANGED
|
@@ -1,209 +1,221 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-maestro-teammate",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Pi extension — teammate agent dispatch with DAG task graphs, RPC messaging, and compact TUI",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"engines": {
|
|
7
|
-
"node": ">=22.19.0"
|
|
8
|
-
},
|
|
9
|
-
"bin": {
|
|
10
|
-
"pi-teammate-broker": "./bin/pi-teammate-broker.mjs",
|
|
11
|
-
"pi-teammate-models": "./bin/pi-teammate-models.mjs",
|
|
12
|
-
"pi-teammate-outbox": "./bin/pi-teammate-outbox.mjs",
|
|
13
|
-
"pi-teammate-remote": "./bin/pi-teammate-remote.mjs"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"pi-package",
|
|
17
|
-
"pi-extension",
|
|
18
|
-
"pi",
|
|
19
|
-
"teammate",
|
|
20
|
-
"agents"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"test": "node --experimental-transform-types --import ./test/setup.ts --test --test-concurrency=2 \"test/*.test.ts\"",
|
|
24
|
-
"typecheck": "tsc -p tsconfig.build.json",
|
|
25
|
-
"build:declarations": "tsc -p tsconfig.declarations.json",
|
|
26
|
-
"check:declarations": "node scripts/check-declarations.mjs",
|
|
27
|
-
"prepack": "npm run build:declarations && node ../../scripts/bundle-settings-core.mjs",
|
|
28
|
-
"postpack": "node ../../scripts/bundle-settings-core.mjs --clean",
|
|
29
|
-
"test:e2e": "node --experimental-transform-types --import ./test/setup.ts --test --test-timeout=300000 test/backend-registry-dsh.e2e.test.ts",
|
|
30
|
-
"refresh:acp-registry": "node scripts/refresh-acp-registry.mjs",
|
|
31
|
-
"check:acp-registry": "node scripts/refresh-acp-registry.mjs --check"
|
|
32
|
-
},
|
|
33
|
-
"main": "./src/index.ts",
|
|
34
|
-
"types": "./types/index.d.ts",
|
|
35
|
-
"exports": {
|
|
36
|
-
".": {
|
|
37
|
-
"types": "./types/index.d.ts",
|
|
38
|
-
"default": "./src/index.ts"
|
|
39
|
-
},
|
|
40
|
-
"./v1": {
|
|
41
|
-
"types": "./types/public/v1/index.d.ts",
|
|
42
|
-
"default": "./src/public/v1/index.ts"
|
|
43
|
-
},
|
|
44
|
-
"./v1/acp-cli": {
|
|
45
|
-
"types": "./types/backends/acp-cli.d.ts",
|
|
46
|
-
"default": "./src/backends/acp-cli.ts"
|
|
47
|
-
},
|
|
48
|
-
"./v1/agents": {
|
|
49
|
-
"types": "./types/public/v1/agents.d.ts",
|
|
50
|
-
"default": "./src/public/v1/agents.ts"
|
|
51
|
-
},
|
|
52
|
-
"./v1/backends": {
|
|
53
|
-
"types": "./types/public/v1/backends.d.ts",
|
|
54
|
-
"default": "./src/public/v1/backends.ts"
|
|
55
|
-
},
|
|
56
|
-
"./v1/child-extensions": {
|
|
57
|
-
"types": "./types/public/v1/child-extensions.d.ts",
|
|
58
|
-
"default": "./src/public/v1/child-extensions.ts"
|
|
59
|
-
},
|
|
60
|
-
"./v1/events": {
|
|
61
|
-
"types": "./types/public/v1/events.d.ts",
|
|
62
|
-
"default": "./src/public/v1/events.ts"
|
|
63
|
-
},
|
|
64
|
-
"./v1/execution": {
|
|
65
|
-
"types": "./types/public/v1/execution.d.ts",
|
|
66
|
-
"default": "./src/public/v1/execution.ts"
|
|
67
|
-
},
|
|
68
|
-
"./v1/extension": {
|
|
69
|
-
"types": "./types/public/v1/extension.d.ts",
|
|
70
|
-
"default": "./src/public/v1/extension.ts"
|
|
71
|
-
},
|
|
72
|
-
"./v1/model-routing": {
|
|
73
|
-
"types": "./types/public/v1/model-routing.d.ts",
|
|
74
|
-
"default": "./src/public/v1/model-routing.ts"
|
|
75
|
-
},
|
|
76
|
-
"./v1/
|
|
77
|
-
"types": "./types/public/v1/
|
|
78
|
-
"default": "./src/public/v1/
|
|
79
|
-
},
|
|
80
|
-
"./v1/
|
|
81
|
-
"types": "./types/public/v1/
|
|
82
|
-
"default": "./src/public/v1/
|
|
83
|
-
},
|
|
84
|
-
"./v1/
|
|
85
|
-
"types": "./types/public/v1/
|
|
86
|
-
"default": "./src/public/v1/
|
|
87
|
-
},
|
|
88
|
-
"./v1/
|
|
89
|
-
"types": "./types/public/v1/
|
|
90
|
-
"default": "./src/public/v1/
|
|
91
|
-
},
|
|
92
|
-
"./v1/
|
|
93
|
-
"types": "./types/public/v1/
|
|
94
|
-
"default": "./src/public/v1/
|
|
95
|
-
},
|
|
96
|
-
"./v1/
|
|
97
|
-
"types": "./types/public/v1/
|
|
98
|
-
"default": "./src/public/v1/
|
|
99
|
-
},
|
|
100
|
-
"./v1/
|
|
101
|
-
"types": "./types/public/v1/
|
|
102
|
-
"default": "./src/public/v1/
|
|
103
|
-
},
|
|
104
|
-
"./v1/
|
|
105
|
-
"types": "./types/public/v1/
|
|
106
|
-
"default": "./src/public/v1/
|
|
107
|
-
},
|
|
108
|
-
"./v1/
|
|
109
|
-
"types": "./types/public/v1/
|
|
110
|
-
"default": "./src/public/v1/
|
|
111
|
-
},
|
|
112
|
-
"./v1/
|
|
113
|
-
"types": "./types/public/v1/
|
|
114
|
-
"default": "./src/public/v1/
|
|
115
|
-
},
|
|
116
|
-
"./v1/
|
|
117
|
-
"types": "./types/public/v1/
|
|
118
|
-
"default": "./src/public/v1/
|
|
119
|
-
},
|
|
120
|
-
"./v1/
|
|
121
|
-
"types": "./types/public/v1/
|
|
122
|
-
"default": "./src/public/v1/
|
|
123
|
-
},
|
|
124
|
-
"./v1/
|
|
125
|
-
"types": "./types/public/v1/
|
|
126
|
-
"default": "./src/public/v1/
|
|
127
|
-
},
|
|
128
|
-
"./v1/
|
|
129
|
-
"types": "./types/public/v1/
|
|
130
|
-
"default": "./src/public/v1/
|
|
131
|
-
},
|
|
132
|
-
"./
|
|
133
|
-
"types": "./types/public/
|
|
134
|
-
"default": "./src/public/
|
|
135
|
-
},
|
|
136
|
-
"./
|
|
137
|
-
"types": "./types/public/
|
|
138
|
-
"default": "./src/public/
|
|
139
|
-
},
|
|
140
|
-
"./
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
},
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"@earendil-works/pi-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
"
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
"
|
|
178
|
-
"optional": true
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
"pi-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
"
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
"
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
},
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
|
|
207
|
-
"
|
|
208
|
-
|
|
209
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-maestro-teammate",
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "Pi extension — teammate agent dispatch with DAG task graphs, RPC messaging, and compact TUI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22.19.0"
|
|
8
|
+
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"pi-teammate-broker": "./bin/pi-teammate-broker.mjs",
|
|
11
|
+
"pi-teammate-models": "./bin/pi-teammate-models.mjs",
|
|
12
|
+
"pi-teammate-outbox": "./bin/pi-teammate-outbox.mjs",
|
|
13
|
+
"pi-teammate-remote": "./bin/pi-teammate-remote.mjs"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"pi-package",
|
|
17
|
+
"pi-extension",
|
|
18
|
+
"pi",
|
|
19
|
+
"teammate",
|
|
20
|
+
"agents"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "node --experimental-transform-types --import ./test/setup.ts --test --test-concurrency=2 \"test/*.test.ts\"",
|
|
24
|
+
"typecheck": "tsc -p tsconfig.build.json",
|
|
25
|
+
"build:declarations": "tsc -p tsconfig.declarations.json",
|
|
26
|
+
"check:declarations": "node scripts/check-declarations.mjs",
|
|
27
|
+
"prepack": "npm run build:declarations && node ../../scripts/bundle-settings-core.mjs",
|
|
28
|
+
"postpack": "node ../../scripts/bundle-settings-core.mjs --clean",
|
|
29
|
+
"test:e2e": "node --experimental-transform-types --import ./test/setup.ts --test --test-timeout=300000 test/backend-registry-dsh.e2e.test.ts",
|
|
30
|
+
"refresh:acp-registry": "node scripts/refresh-acp-registry.mjs",
|
|
31
|
+
"check:acp-registry": "node scripts/refresh-acp-registry.mjs --check"
|
|
32
|
+
},
|
|
33
|
+
"main": "./src/index.ts",
|
|
34
|
+
"types": "./types/index.d.ts",
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./types/index.d.ts",
|
|
38
|
+
"default": "./src/index.ts"
|
|
39
|
+
},
|
|
40
|
+
"./v1": {
|
|
41
|
+
"types": "./types/public/v1/index.d.ts",
|
|
42
|
+
"default": "./src/public/v1/index.ts"
|
|
43
|
+
},
|
|
44
|
+
"./v1/acp-cli": {
|
|
45
|
+
"types": "./types/backends/acp-cli.d.ts",
|
|
46
|
+
"default": "./src/backends/acp-cli.ts"
|
|
47
|
+
},
|
|
48
|
+
"./v1/agents": {
|
|
49
|
+
"types": "./types/public/v1/agents.d.ts",
|
|
50
|
+
"default": "./src/public/v1/agents.ts"
|
|
51
|
+
},
|
|
52
|
+
"./v1/backends": {
|
|
53
|
+
"types": "./types/public/v1/backends.d.ts",
|
|
54
|
+
"default": "./src/public/v1/backends.ts"
|
|
55
|
+
},
|
|
56
|
+
"./v1/child-extensions": {
|
|
57
|
+
"types": "./types/public/v1/child-extensions.d.ts",
|
|
58
|
+
"default": "./src/public/v1/child-extensions.ts"
|
|
59
|
+
},
|
|
60
|
+
"./v1/events": {
|
|
61
|
+
"types": "./types/public/v1/events.d.ts",
|
|
62
|
+
"default": "./src/public/v1/events.ts"
|
|
63
|
+
},
|
|
64
|
+
"./v1/execution": {
|
|
65
|
+
"types": "./types/public/v1/execution.d.ts",
|
|
66
|
+
"default": "./src/public/v1/execution.ts"
|
|
67
|
+
},
|
|
68
|
+
"./v1/extension": {
|
|
69
|
+
"types": "./types/public/v1/extension.d.ts",
|
|
70
|
+
"default": "./src/public/v1/extension.ts"
|
|
71
|
+
},
|
|
72
|
+
"./v1/model-routing": {
|
|
73
|
+
"types": "./types/public/v1/model-routing.d.ts",
|
|
74
|
+
"default": "./src/public/v1/model-routing.ts"
|
|
75
|
+
},
|
|
76
|
+
"./v1/monitor-window-state": {
|
|
77
|
+
"types": "./types/public/v1/monitor-window-state.d.ts",
|
|
78
|
+
"default": "./src/public/v1/monitor-window-state.ts"
|
|
79
|
+
},
|
|
80
|
+
"./v1/cli-tools": {
|
|
81
|
+
"types": "./types/public/v1/cli-tools.d.ts",
|
|
82
|
+
"default": "./src/public/v1/cli-tools.ts"
|
|
83
|
+
},
|
|
84
|
+
"./v1/completion-durability": {
|
|
85
|
+
"types": "./types/public/v1/completion-durability.d.ts",
|
|
86
|
+
"default": "./src/public/v1/completion-durability.ts"
|
|
87
|
+
},
|
|
88
|
+
"./v1/mailbox": {
|
|
89
|
+
"types": "./types/public/v1/mailbox.d.ts",
|
|
90
|
+
"default": "./src/public/v1/mailbox.ts"
|
|
91
|
+
},
|
|
92
|
+
"./v1/observation": {
|
|
93
|
+
"types": "./types/public/v1/observation.d.ts",
|
|
94
|
+
"default": "./src/public/v1/observation.ts"
|
|
95
|
+
},
|
|
96
|
+
"./v1/progress-tree": {
|
|
97
|
+
"types": "./types/public/v1/progress-tree.d.ts",
|
|
98
|
+
"default": "./src/public/v1/progress-tree.ts"
|
|
99
|
+
},
|
|
100
|
+
"./v1/remote": {
|
|
101
|
+
"types": "./types/public/v1/remote.d.ts",
|
|
102
|
+
"default": "./src/public/v1/remote.ts"
|
|
103
|
+
},
|
|
104
|
+
"./v1/retry": {
|
|
105
|
+
"types": "./types/public/v1/retry.d.ts",
|
|
106
|
+
"default": "./src/public/v1/retry.ts"
|
|
107
|
+
},
|
|
108
|
+
"./v1/session-history": {
|
|
109
|
+
"types": "./types/public/v1/session-history.d.ts",
|
|
110
|
+
"default": "./src/public/v1/session-history.ts"
|
|
111
|
+
},
|
|
112
|
+
"./v1/scheduler": {
|
|
113
|
+
"types": "./types/public/v1/scheduler.d.ts",
|
|
114
|
+
"default": "./src/public/v1/scheduler.ts"
|
|
115
|
+
},
|
|
116
|
+
"./v1/sessions": {
|
|
117
|
+
"types": "./types/public/v1/sessions.d.ts",
|
|
118
|
+
"default": "./src/public/v1/sessions.ts"
|
|
119
|
+
},
|
|
120
|
+
"./v1/supervision": {
|
|
121
|
+
"types": "./types/public/v1/supervision.d.ts",
|
|
122
|
+
"default": "./src/public/v1/supervision.ts"
|
|
123
|
+
},
|
|
124
|
+
"./v1/ssh-hosts": {
|
|
125
|
+
"types": "./types/public/v1/ssh-hosts.d.ts",
|
|
126
|
+
"default": "./src/public/v1/ssh-hosts.ts"
|
|
127
|
+
},
|
|
128
|
+
"./v1/workspace-projections": {
|
|
129
|
+
"types": "./types/public/v1/workspace-projections.d.ts",
|
|
130
|
+
"default": "./src/public/v1/workspace-projections.ts"
|
|
131
|
+
},
|
|
132
|
+
"./v1/workspace-completion": {
|
|
133
|
+
"types": "./types/public/v1/workspace-completion.d.ts",
|
|
134
|
+
"default": "./src/public/v1/workspace-completion.ts"
|
|
135
|
+
},
|
|
136
|
+
"./v1/todo-context": {
|
|
137
|
+
"types": "./types/public/v1/todo-context.d.ts",
|
|
138
|
+
"default": "./src/public/v1/todo-context.ts"
|
|
139
|
+
},
|
|
140
|
+
"./v1/types": {
|
|
141
|
+
"types": "./types/public/v1/types.d.ts",
|
|
142
|
+
"default": "./src/public/v1/types.ts"
|
|
143
|
+
},
|
|
144
|
+
"./v2/runtime": {
|
|
145
|
+
"types": "./types/public/v2/runtime.d.ts",
|
|
146
|
+
"default": "./src/public/v2/runtime.ts"
|
|
147
|
+
},
|
|
148
|
+
"./v2/runtime-broker": {
|
|
149
|
+
"types": "./types/public/v2/runtime-broker.d.ts",
|
|
150
|
+
"default": "./src/public/v2/runtime-broker.ts"
|
|
151
|
+
},
|
|
152
|
+
"./src/*": "./src/*"
|
|
153
|
+
},
|
|
154
|
+
"deprecatedSubpaths": {
|
|
155
|
+
"./src/*": "Compatibility only; use the versioned ./v1/* public API."
|
|
156
|
+
},
|
|
157
|
+
"files": [
|
|
158
|
+
"bin/*.mjs",
|
|
159
|
+
"src/**/*.{ts,json}",
|
|
160
|
+
"types/**/*.d.ts",
|
|
161
|
+
"agents/",
|
|
162
|
+
"README.md"
|
|
163
|
+
],
|
|
164
|
+
"pi": {
|
|
165
|
+
"extensions": [
|
|
166
|
+
"./src/extension/index.ts"
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"peerDependencies": {
|
|
170
|
+
"@earendil-works/pi-agent-core": "*",
|
|
171
|
+
"@earendil-works/pi-ai": "*",
|
|
172
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
173
|
+
"@earendil-works/pi-tui": "*",
|
|
174
|
+
"typebox": "*"
|
|
175
|
+
},
|
|
176
|
+
"peerDependenciesMeta": {
|
|
177
|
+
"@earendil-works/pi-agent-core": {
|
|
178
|
+
"optional": true
|
|
179
|
+
},
|
|
180
|
+
"@earendil-works/pi-ai": {
|
|
181
|
+
"optional": true
|
|
182
|
+
},
|
|
183
|
+
"@earendil-works/pi-coding-agent": {
|
|
184
|
+
"optional": true
|
|
185
|
+
},
|
|
186
|
+
"@earendil-works/pi-tui": {
|
|
187
|
+
"optional": true
|
|
188
|
+
},
|
|
189
|
+
"typebox": {
|
|
190
|
+
"optional": true
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"dependencies": {
|
|
194
|
+
"@agentclientprotocol/sdk": "1.3.0",
|
|
195
|
+
"cross-spawn": "7.0.6",
|
|
196
|
+
"jiti": "2.7.0",
|
|
197
|
+
"pi-maestro-settings-core": "0.2.1",
|
|
198
|
+
"pi-maestro-backend-core": "*",
|
|
199
|
+
"pi-maestro-backends": "*",
|
|
200
|
+
"proper-lockfile": "4.1.2",
|
|
201
|
+
"ssh2": "1.17.0",
|
|
202
|
+
"zod": "4.4.3"
|
|
203
|
+
},
|
|
204
|
+
"bundledDependencies": [
|
|
205
|
+
"pi-maestro-settings-core"
|
|
206
|
+
],
|
|
207
|
+
"devDependencies": {
|
|
208
|
+
"@earendil-works/pi-agent-core": "0.84.4",
|
|
209
|
+
"@types/cross-spawn": "6.0.6",
|
|
210
|
+
"@earendil-works/pi-ai": "0.84.4",
|
|
211
|
+
"@earendil-works/pi-coding-agent": "0.84.4",
|
|
212
|
+
"@earendil-works/pi-tui": "0.84.4",
|
|
213
|
+
"@types/ssh2": "1.15.5",
|
|
214
|
+
"typebox": "1.3.7"
|
|
215
|
+
},
|
|
216
|
+
"directories": {
|
|
217
|
+
"test": "test"
|
|
218
|
+
},
|
|
219
|
+
"author": "",
|
|
220
|
+
"license": "ISC"
|
|
221
|
+
}
|
|
@@ -43,6 +43,9 @@ export const ACP_CLI_SETTINGS_CATALOGS: TranslationCatalogs = {
|
|
|
43
43
|
"acpCli.mode": "Launch mode",
|
|
44
44
|
"acpCli.mode.local": "Local process",
|
|
45
45
|
"acpCli.mode.ssh": "Remote over SSH",
|
|
46
|
+
"acpCli.sshHostRef": "/ssh host reference",
|
|
47
|
+
"acpCli.sshHostRef.description":
|
|
48
|
+
"Host id from the unlocked encrypted /ssh manager. Use it instead of every embedded SSH connection field; the host is resolved again for each run.",
|
|
46
49
|
"acpCli.host": "SSH host",
|
|
47
50
|
"acpCli.user": "SSH user",
|
|
48
51
|
"acpCli.port": "SSH port",
|
|
@@ -92,6 +95,9 @@ export const ACP_CLI_SETTINGS_CATALOGS: TranslationCatalogs = {
|
|
|
92
95
|
"acpCli.mode": "启动方式",
|
|
93
96
|
"acpCli.mode.local": "本地进程",
|
|
94
97
|
"acpCli.mode.ssh": "经 SSH 远程",
|
|
98
|
+
"acpCli.sshHostRef": "/ssh 主机引用",
|
|
99
|
+
"acpCli.sshHostRef.description":
|
|
100
|
+
"已解锁加密 /ssh 管理器中的主机 id。它必须替代全部内嵌 SSH 连接字段,并在每次运行时重新解析。",
|
|
95
101
|
"acpCli.host": "SSH 主机",
|
|
96
102
|
"acpCli.user": "SSH 用户",
|
|
97
103
|
"acpCli.port": "SSH 端口",
|
package/src/backends/acp-cli.ts
CHANGED
|
@@ -52,6 +52,7 @@ import type {
|
|
|
52
52
|
import {
|
|
53
53
|
cliToolArgv,
|
|
54
54
|
probeCliToolCommand,
|
|
55
|
+
sshHostConfigIssue,
|
|
55
56
|
type CliToolConfig,
|
|
56
57
|
} from "../cli-tools/cli-tools-config.ts";
|
|
57
58
|
import {
|
|
@@ -282,9 +283,18 @@ export const ACP_CLI_CONFIG_FIELDS: readonly BackendConfigField[] = [
|
|
|
282
283
|
labelKey: "acpCli.mode",
|
|
283
284
|
default: "local",
|
|
284
285
|
},
|
|
286
|
+
{
|
|
287
|
+
key: "sshHostRef",
|
|
288
|
+
kind: "text",
|
|
289
|
+
labelKey: "acpCli.sshHostRef",
|
|
290
|
+
descriptionKey: "acpCli.sshHostRef.description",
|
|
291
|
+
},
|
|
285
292
|
{ key: "host", kind: "text", labelKey: "acpCli.host" },
|
|
286
293
|
{ key: "user", kind: "text", labelKey: "acpCli.user" },
|
|
287
|
-
|
|
294
|
+
// Applied only to embedded SSH below. Leaving this declaration without a
|
|
295
|
+
// generic default lets validation distinguish an explicit override from a
|
|
296
|
+
// reference that must take its port exclusively from `/ssh`.
|
|
297
|
+
{ key: "port", kind: "integer", labelKey: "acpCli.port" },
|
|
288
298
|
{ key: "hostKeySha256", kind: "text", labelKey: "acpCli.hostKeySha256" },
|
|
289
299
|
{ key: "identityFile", kind: "path", labelKey: "acpCli.identityFile" },
|
|
290
300
|
{
|
|
@@ -420,6 +430,7 @@ async function installedLaunchConfig(
|
|
|
420
430
|
function launchConfigOf(config: Record<string, ConfigValue>): CliToolConfig {
|
|
421
431
|
const command = text(config, "command");
|
|
422
432
|
const cwd = text(config, "cwd");
|
|
433
|
+
const sshHostRef = text(config, "sshHostRef");
|
|
423
434
|
const host = text(config, "host");
|
|
424
435
|
const user = text(config, "user");
|
|
425
436
|
const port = count(config, "port");
|
|
@@ -432,6 +443,7 @@ function launchConfigOf(config: Record<string, ConfigValue>): CliToolConfig {
|
|
|
432
443
|
args: list(config, "args"),
|
|
433
444
|
...(cwd === undefined ? {} : { cwd }),
|
|
434
445
|
env: list(config, "env"),
|
|
446
|
+
...(sshHostRef === undefined ? {} : { sshHostRef }),
|
|
435
447
|
...(host === undefined ? {} : { host }),
|
|
436
448
|
...(user === undefined ? {} : { user }),
|
|
437
449
|
...(port === undefined ? {} : { port }),
|
|
@@ -605,14 +617,18 @@ export function createAcpCliBackend(
|
|
|
605
617
|
+ "parent process forwards by name; a name=value entry puts the value in the registration document",
|
|
606
618
|
);
|
|
607
619
|
}
|
|
608
|
-
// Checked at load rather than at launch:
|
|
609
|
-
//
|
|
610
|
-
//
|
|
620
|
+
// Checked at load rather than at launch: one SSH source must be complete
|
|
621
|
+
// and authoritative. A reference cannot be paired with even a seemingly
|
|
622
|
+
// harmless port override, because that would recreate two sources of
|
|
623
|
+
// truth for the connection.
|
|
611
624
|
if (mode === "ssh") {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
625
|
+
const issue = sshHostConfigIssue(launchConfigOf(values));
|
|
626
|
+
if (issue !== undefined) errors.push(issue);
|
|
627
|
+
else if ((text(values, "sshHostRef") ?? "").trim().length === 0 && count(values, "port") === undefined) {
|
|
628
|
+
values.port = 22;
|
|
615
629
|
}
|
|
630
|
+
} else if ((text(values, "sshHostRef") ?? "").trim().length > 0) {
|
|
631
|
+
errors.push('"sshHostRef" requires "mode" to be "ssh"');
|
|
616
632
|
}
|
|
617
633
|
return { values, errors };
|
|
618
634
|
},
|
|
@@ -638,7 +654,7 @@ export function createAcpCliBackend(
|
|
|
638
654
|
// beats returning the local machine's answer for a remote target.
|
|
639
655
|
throw new Error(
|
|
640
656
|
`teammate backend "acp-cli" cannot list "${field}" for an "ssh" registration: `
|
|
641
|
-
+ "
|
|
657
|
+
+ "whether embedded or selected by sshHostRef, the target host's catalogue is not reachable by the local probe",
|
|
642
658
|
);
|
|
643
659
|
}
|
|
644
660
|
const route = routeOf(config);
|