@zswarm/core 0.2.6 → 0.2.7
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/dist/harness.d.ts +27 -2
- package/dist/harness.js +68 -2
- package/dist/host/cli.js +5 -2
- package/dist/host/relay.d.ts +2 -0
- package/dist/host/relay.js +60 -9
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/ops/dispatch.d.ts +9 -0
- package/dist/ops/dispatch.js +25 -3
- package/dist/ops/restart.d.ts +57 -0
- package/dist/ops/restart.js +416 -0
- package/dist/ops/serve-install.d.ts +8 -1
- package/dist/ops/serve-install.js +160 -73
- package/dist/ops/serve.d.ts +28 -0
- package/dist/ops/serve.js +35 -0
- package/dist/policy.js +1 -0
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +31 -7
- package/package.json +1 -1
package/dist/schema.js
CHANGED
|
@@ -15,6 +15,7 @@ export const OP_NAMES = [
|
|
|
15
15
|
"keys",
|
|
16
16
|
"interrupt",
|
|
17
17
|
"spawn",
|
|
18
|
+
"restart",
|
|
18
19
|
"close",
|
|
19
20
|
"worktrees",
|
|
20
21
|
"unworktree",
|
|
@@ -42,6 +43,7 @@ export const TARGET_OPS = [
|
|
|
42
43
|
"status",
|
|
43
44
|
"keys",
|
|
44
45
|
"interrupt",
|
|
46
|
+
"restart",
|
|
45
47
|
"close",
|
|
46
48
|
"rename",
|
|
47
49
|
"focus",
|
|
@@ -245,6 +247,28 @@ export const PARAMS = [
|
|
|
245
247
|
cliOnly: true,
|
|
246
248
|
description: "send: read UTF-8 on the caller from PATH, or - for stdin; cannot combine with --body/--text",
|
|
247
249
|
},
|
|
250
|
+
{
|
|
251
|
+
name: "handoff",
|
|
252
|
+
type: "string",
|
|
253
|
+
flags: [],
|
|
254
|
+
ops: ["restart"],
|
|
255
|
+
description: "restart: handoff text to deliver to the relaunched agent (MCP inline form; the CLI fills this from --handoff-file)",
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: "handoffFile",
|
|
259
|
+
type: "string",
|
|
260
|
+
flags: ["--handoff-file"],
|
|
261
|
+
ops: ["restart"],
|
|
262
|
+
cliOnly: true,
|
|
263
|
+
description: "restart: read the handoff UTF-8 on the caller from PATH, or - for stdin; a short handoff is pasted, a long one becomes a pointer line, and --handoff-self writes the agent's handoff to this path",
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: "handoffSelf",
|
|
267
|
+
type: "boolean",
|
|
268
|
+
flags: ["--handoff-self"],
|
|
269
|
+
ops: ["restart"],
|
|
270
|
+
description: "restart: before exiting, ask the running agent to write its handoff to the file and print a marker, then deliver it after relaunch",
|
|
271
|
+
},
|
|
248
272
|
{
|
|
249
273
|
name: "text",
|
|
250
274
|
type: "string",
|
|
@@ -333,8 +357,8 @@ export const PARAMS = [
|
|
|
333
357
|
name: "timeoutMs",
|
|
334
358
|
type: "number",
|
|
335
359
|
flags: ["--timeout-ms"],
|
|
336
|
-
ops: ["wait", "status", "spawn", "doctor", "serve", "send", "dump", "tail", "keys", "interrupt", "close", "await"],
|
|
337
|
-
description: "wait: timeout (default 60000); status/spawn: overall deadline (default 30000); doctor: overall deadline (default 10000), including Tailscale/SSH/hello/host checks; serve --install: overall install/readiness deadline (default 30000)",
|
|
360
|
+
ops: ["wait", "status", "spawn", "restart", "doctor", "serve", "send", "dump", "tail", "keys", "interrupt", "close", "await"],
|
|
361
|
+
description: "wait: timeout (default 60000); status/spawn/restart: overall deadline (default 30000); doctor: overall deadline (default 10000), including Tailscale/SSH/hello/host checks; serve --install: overall install/readiness deadline (default 30000)",
|
|
338
362
|
},
|
|
339
363
|
{
|
|
340
364
|
name: "keys",
|
|
@@ -369,8 +393,8 @@ export const PARAMS = [
|
|
|
369
393
|
name: "command",
|
|
370
394
|
type: "stringOrArray",
|
|
371
395
|
flags: ["--command", "--cmd", "-c"],
|
|
372
|
-
ops: ["spawn"],
|
|
373
|
-
description: "spawn: program to run in the new pane, argv-style (no shell). Empty starts a plain shell.",
|
|
396
|
+
ops: ["spawn", "restart"],
|
|
397
|
+
description: "spawn: program to run in the new pane, argv-style (no shell). Empty starts a plain shell. restart: command to type in a shell pane instead of the profile's launch command",
|
|
374
398
|
},
|
|
375
399
|
{
|
|
376
400
|
name: "cwd",
|
|
@@ -546,8 +570,8 @@ export const PARAMS = [
|
|
|
546
570
|
name: "force",
|
|
547
571
|
type: "boolean",
|
|
548
572
|
flags: ["--force"],
|
|
549
|
-
ops: ["send", "keys", "unworktree", "bus", "interrupt", "broadcast"],
|
|
550
|
-
description: "send/keys: write to a pane whose command has exited; unworktree: remove a busy or dirty worktree; bus: close orphan bus panes and reload this session's plugin",
|
|
573
|
+
ops: ["send", "keys", "unworktree", "bus", "interrupt", "broadcast", "restart"],
|
|
574
|
+
description: "send/keys: write to a pane whose command has exited; restart: restart a pane that a relay has leased; unworktree: remove a busy or dirty worktree; bus: close orphan bus panes and reload this session's plugin",
|
|
551
575
|
},
|
|
552
576
|
{
|
|
553
577
|
name: "listen",
|
|
@@ -600,7 +624,7 @@ export function mcpInputSchema() {
|
|
|
600
624
|
}
|
|
601
625
|
export const MCP_TOOL_DESCRIPTION = `zSwarm Zellij pane coordination (op=${OP_NAMES.join("|")}). ` +
|
|
602
626
|
"List panes, send text into a CLI pane (paste+Enter), block until a pane goes idle or prints a match, " +
|
|
603
|
-
"send raw keys, open or close panes, and give a peer its own git worktree. " +
|
|
627
|
+
"send raw keys, open or close panes, restart an agent in its pane with an optional handoff, and give a peer its own git worktree. " +
|
|
604
628
|
"Same host as Zellij, or ZSWARM_SSH / ZSWARM_SERVE for a remote crew.";
|
|
605
629
|
const FLAG_INDEX = new Map(PARAMS.flatMap((p) => p.flags.map((flag) => [flag, p])));
|
|
606
630
|
export function cliUsage() {
|