@kdonev/termscape 0.1.3 → 0.1.4
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 +32 -3
- package/dist/agents/polling.d.ts +31 -0
- package/dist/agents/polling.d.ts.map +1 -0
- package/dist/agents/polling.js +65 -0
- package/dist/agents/polling.js.map +1 -0
- package/dist/agents/profiles.d.ts +18 -3
- package/dist/agents/profiles.d.ts.map +1 -1
- package/dist/agents/profiles.js +86 -0
- package/dist/agents/profiles.js.map +1 -1
- package/dist/agents/shares.d.ts +32 -0
- package/dist/agents/shares.d.ts.map +1 -0
- package/dist/agents/shares.js +46 -0
- package/dist/agents/shares.js.map +1 -0
- package/dist/agents/wiring.d.ts +8 -0
- package/dist/agents/wiring.d.ts.map +1 -1
- package/dist/agents/wiring.js +61 -6
- package/dist/agents/wiring.js.map +1 -1
- package/dist/cli-args.d.ts +61 -0
- package/dist/cli-args.d.ts.map +1 -0
- package/dist/cli-args.js +35 -0
- package/dist/cli-args.js.map +1 -0
- package/dist/cli.js +10 -17
- package/dist/cli.js.map +1 -1
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/migrations.js +48 -0
- package/dist/db/migrations.js.map +1 -1
- package/dist/db/store.d.ts +14 -1
- package/dist/db/store.d.ts.map +1 -1
- package/dist/db/store.js +61 -0
- package/dist/db/store.js.map +1 -1
- package/dist/debug.d.ts +11 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/debug.js +45 -0
- package/dist/debug.js.map +1 -0
- package/dist/folders.d.ts +33 -0
- package/dist/folders.d.ts.map +1 -0
- package/dist/folders.js +88 -0
- package/dist/folders.js.map +1 -0
- package/dist/hub.d.ts +128 -3
- package/dist/hub.d.ts.map +1 -1
- package/dist/hub.js +495 -41
- package/dist/hub.js.map +1 -1
- package/dist/hub.tgz +0 -0
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +38 -5
- package/dist/mcp/server.js.map +1 -1
- package/dist/protocol/domain.d.ts +74 -0
- package/dist/protocol/domain.d.ts.map +1 -1
- package/dist/protocol/domain.js +58 -0
- package/dist/protocol/domain.js.map +1 -1
- package/dist/protocol/index.d.ts +1 -0
- package/dist/protocol/index.d.ts.map +1 -1
- package/dist/protocol/index.js +1 -0
- package/dist/protocol/index.js.map +1 -1
- package/dist/protocol/mcp-tools.d.ts +4 -0
- package/dist/protocol/mcp-tools.d.ts.map +1 -1
- package/dist/protocol/mcp-tools.js +16 -2
- package/dist/protocol/mcp-tools.js.map +1 -1
- package/dist/protocol/mouse.d.ts +54 -0
- package/dist/protocol/mouse.d.ts.map +1 -0
- package/dist/protocol/mouse.js +187 -0
- package/dist/protocol/mouse.js.map +1 -0
- package/dist/protocol/peer.d.ts +42 -1
- package/dist/protocol/peer.d.ts.map +1 -1
- package/dist/protocol/peer.js +57 -2
- package/dist/protocol/peer.js.map +1 -1
- package/dist/protocol/ws.d.ts +115 -2
- package/dist/protocol/ws.d.ts.map +1 -1
- package/dist/protocol/ws.js +71 -1
- package/dist/protocol/ws.js.map +1 -1
- package/dist/remote/deployer.d.ts.map +1 -1
- package/dist/remote/deployer.js +5 -1
- package/dist/remote/deployer.js.map +1 -1
- package/dist/remote/join-script.d.ts.map +1 -1
- package/dist/remote/join-script.js +156 -31
- package/dist/remote/join-script.js.map +1 -1
- package/dist/remote/peer-serve.d.ts +19 -2
- package/dist/remote/peer-serve.d.ts.map +1 -1
- package/dist/remote/peer-serve.js +87 -6
- package/dist/remote/peer-serve.js.map +1 -1
- package/dist/remote/registry.d.ts +10 -0
- package/dist/remote/registry.d.ts.map +1 -1
- package/dist/remote/registry.js +31 -5
- package/dist/remote/registry.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +251 -7
- package/dist/server.js.map +1 -1
- package/dist/session/manager.d.ts +9 -0
- package/dist/session/manager.d.ts.map +1 -1
- package/dist/session/manager.js +14 -0
- package/dist/session/manager.js.map +1 -1
- package/dist/session/pty.d.ts +1 -1
- package/dist/session/pty.d.ts.map +1 -1
- package/dist/session/pty.js +14 -0
- package/dist/session/pty.js.map +1 -1
- package/package.json +1 -1
- package/web/assets/index-Z03Ta4g3.js +111 -0
- package/web/assets/index-u_uCiaPD.css +1 -0
- package/web/index.html +2 -2
- package/web/assets/index-CHlXyCCd.css +0 -1
- package/web/assets/index-DTl8am-O.js +0 -111
|
@@ -30,20 +30,34 @@ export const SendMessageInput = z.object({
|
|
|
30
30
|
to: z
|
|
31
31
|
.string()
|
|
32
32
|
.describe('Target agent address, "workspace/name". Use list_agents to discover.'),
|
|
33
|
-
text: z
|
|
33
|
+
text: z
|
|
34
|
+
.string()
|
|
35
|
+
.min(1)
|
|
36
|
+
.max(8000)
|
|
37
|
+
.describe('Message body, injected into the target terminal. If you need an answer, ask for ' +
|
|
38
|
+
'one here — say to reply with send_message — then end your turn and let it arrive.'),
|
|
34
39
|
});
|
|
35
40
|
export const SpawnAgentInput = z.object({
|
|
36
41
|
profile: z.string().optional().describe('Agent profile id. Defaults to your own profile.'),
|
|
37
42
|
name: z.string().optional().describe('Name for the new agent. Auto-generated if omitted.'),
|
|
43
|
+
host: z
|
|
44
|
+
.string()
|
|
45
|
+
.optional()
|
|
46
|
+
.describe('Machine to start it on, by the label list_hosts gives. The machine that ' +
|
|
47
|
+
'owns the canvas is called "canvas"; "local" always means your own. ' +
|
|
48
|
+
'Defaults to your own machine.'),
|
|
38
49
|
workspace: z
|
|
39
50
|
.string()
|
|
40
51
|
.optional()
|
|
41
|
-
.describe('Workspace to spawn into. Defaults to your own workspace
|
|
52
|
+
.describe('Workspace to spawn into. Defaults to your own workspace if it exists on the ' +
|
|
53
|
+
'target machine, else the only workspace there.'),
|
|
42
54
|
prompt: z
|
|
43
55
|
.string()
|
|
44
56
|
.optional()
|
|
45
57
|
.describe('First instruction, injected once the new agent is ready.'),
|
|
46
58
|
});
|
|
59
|
+
/** No input: list_hosts always reports the whole canvas from wherever it is called. */
|
|
60
|
+
export const ListHostsInput = z.object({});
|
|
47
61
|
export const ReadScreenInput = z.object({
|
|
48
62
|
address: z.string().describe('Agent address to inspect.'),
|
|
49
63
|
lines: z.number().int().positive().max(200).optional().describe('Trailing lines to return (default 40).'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-tools.js","sourceRoot":"","sources":["../src/mcp-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,kEAAkE,CAAC;CAChF,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,CAAC;SACF,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,yDAAyD,CAAC;CACvE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC;SACF,MAAM,EAAE;SACR,QAAQ,CAAC,sEAAsE,CAAC;IACnF,IAAI,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"mcp-tools.js","sourceRoot":"","sources":["../src/mcp-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,SAAS,EAAE,CAAC;SACT,M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C;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gEAAgE,CAAC;IAC7E,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,IAAI,CAAC;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,mDAAmD,CAAC;CACjE,CAAC,CAAC;AAaH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AACtC,0DAA0D;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAW,CAAC;AACzE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading terminal input and output back as what it is, for tracing.
|
|
3
|
+
*
|
|
4
|
+
* Nothing here is on a hot path by itself — every caller is behind a debug
|
|
5
|
+
* switch — but it lives in the protocol package because the interesting
|
|
6
|
+
* question spans four processes. A wheel over a remote terminal is encoded in
|
|
7
|
+
* the browser, framed by the canvas hub, forwarded over the peer link, and
|
|
8
|
+
* written to a pty on another machine; each hop logs separately, and a trace
|
|
9
|
+
* is only worth reading if all four spell the same event the same way.
|
|
10
|
+
*
|
|
11
|
+
* The decoders are deliberately lenient. A log that says "6 bytes" for
|
|
12
|
+
* something it half-recognises is worse than one that says what it saw and
|
|
13
|
+
* lets the reader disagree.
|
|
14
|
+
*/
|
|
15
|
+
/** A byte burst as hex, capped so a paste cannot fill the log. */
|
|
16
|
+
export declare function hexBytes(bytes: Uint8Array, limit?: number): string;
|
|
17
|
+
/**
|
|
18
|
+
* One line describing a burst of terminal input.
|
|
19
|
+
*
|
|
20
|
+
* Mouse reports are named because they are what a scroll trace is looking
|
|
21
|
+
* for; everything else is shown as text plus hex, because the failure this
|
|
22
|
+
* exists to catch is a report arriving as the wrong bytes rather than not
|
|
23
|
+
* arriving at all.
|
|
24
|
+
*/
|
|
25
|
+
export declare function describeInput(bytes: Uint8Array): string;
|
|
26
|
+
/** The same, for input a caller is holding as one-byte-per-code-unit text. */
|
|
27
|
+
export declare function describeLatin1(data: string): string;
|
|
28
|
+
export interface ModeChange {
|
|
29
|
+
mode: string;
|
|
30
|
+
name: string;
|
|
31
|
+
set: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Every mouse or screen mode the program flipped in this chunk of output.
|
|
35
|
+
*
|
|
36
|
+
* Read off the stream rather than off a terminal, because the interesting
|
|
37
|
+
* moment is often before any terminal exists to ask: the hub sees a session's
|
|
38
|
+
* whole life, a freshly mounted window sees only what arrives after it
|
|
39
|
+
* attached. Both ends log through this so the two views can be compared.
|
|
40
|
+
*/
|
|
41
|
+
export declare function modeChanges(text: string): ModeChange[];
|
|
42
|
+
/** Those changes as one loggable phrase, or null when there were none. */
|
|
43
|
+
export declare function describeModeChanges(text: string): string | null;
|
|
44
|
+
/**
|
|
45
|
+
* What a serialized screen would restore, as far as scrolling is concerned.
|
|
46
|
+
*
|
|
47
|
+
* `@xterm/addon-serialize` replays the tracking mode but not the *encoding*
|
|
48
|
+
* one, so a snapshot can restore `?1003h` without `?1006h` and leave a
|
|
49
|
+
* reattached window sending X10 reports to a program that had been getting
|
|
50
|
+
* SGR ones. Worth being able to see in a trace, because the two ends of a
|
|
51
|
+
* remote session deliver their snapshots by different routes.
|
|
52
|
+
*/
|
|
53
|
+
export declare function describeSnapshotModes(serialized: string): string;
|
|
54
|
+
//# sourceMappingURL=mouse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mouse.d.ts","sourceRoot":"","sources":["../src/mouse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,kEAAkE;AAClE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,SAAK,GAAG,MAAM,CAK9D;AAqED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAIvD;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAInD;AA4BD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;CACd;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CAUtD;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAIhE"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading terminal input and output back as what it is, for tracing.
|
|
3
|
+
*
|
|
4
|
+
* Nothing here is on a hot path by itself — every caller is behind a debug
|
|
5
|
+
* switch — but it lives in the protocol package because the interesting
|
|
6
|
+
* question spans four processes. A wheel over a remote terminal is encoded in
|
|
7
|
+
* the browser, framed by the canvas hub, forwarded over the peer link, and
|
|
8
|
+
* written to a pty on another machine; each hop logs separately, and a trace
|
|
9
|
+
* is only worth reading if all four spell the same event the same way.
|
|
10
|
+
*
|
|
11
|
+
* The decoders are deliberately lenient. A log that says "6 bytes" for
|
|
12
|
+
* something it half-recognises is worse than one that says what it saw and
|
|
13
|
+
* lets the reader disagree.
|
|
14
|
+
*/
|
|
15
|
+
/** A byte burst as hex, capped so a paste cannot fill the log. */
|
|
16
|
+
export function hexBytes(bytes, limit = 32) {
|
|
17
|
+
const shown = Array.from(bytes.subarray(0, limit))
|
|
18
|
+
.map((b) => b.toString(16).padStart(2, '0'))
|
|
19
|
+
.join(' ');
|
|
20
|
+
return bytes.length > limit ? `${shown} … (${bytes.length}B)` : shown;
|
|
21
|
+
}
|
|
22
|
+
/** Printable rendering of an input burst, with escapes made visible. */
|
|
23
|
+
function asText(bytes) {
|
|
24
|
+
let out = '';
|
|
25
|
+
for (const b of bytes) {
|
|
26
|
+
if (b === 0x1b)
|
|
27
|
+
out += '\\e';
|
|
28
|
+
else if (b === 0x0d)
|
|
29
|
+
out += '\\r';
|
|
30
|
+
else if (b === 0x0a)
|
|
31
|
+
out += '\\n';
|
|
32
|
+
else if (b === 0x09)
|
|
33
|
+
out += '\\t';
|
|
34
|
+
else if (b < 0x20 || b === 0x7f)
|
|
35
|
+
out += `\\x${b.toString(16).padStart(2, '0')}`;
|
|
36
|
+
else if (b < 0x7f)
|
|
37
|
+
out += String.fromCharCode(b);
|
|
38
|
+
else
|
|
39
|
+
out += `\\x${b.toString(16).padStart(2, '0')}`;
|
|
40
|
+
}
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* What one mouse button field means.
|
|
45
|
+
*
|
|
46
|
+
* The wheel is the reason this exists: it is not a button in the low two bits
|
|
47
|
+
* but bit 6, so a wheel report and a left-click differ by 64 and read
|
|
48
|
+
* identically to anyone counting buttons. Bits 2-4 are the modifiers.
|
|
49
|
+
*/
|
|
50
|
+
function describeButton(b) {
|
|
51
|
+
const motion = (b & 32) !== 0;
|
|
52
|
+
const wheel = (b & 64) !== 0;
|
|
53
|
+
const low = b & 3;
|
|
54
|
+
const mods = [
|
|
55
|
+
b & 4 ? 'shift' : '',
|
|
56
|
+
b & 8 ? 'meta' : '',
|
|
57
|
+
b & 16 ? 'ctrl' : '',
|
|
58
|
+
].filter(Boolean);
|
|
59
|
+
let name;
|
|
60
|
+
if (wheel)
|
|
61
|
+
name = low === 0 ? 'wheel-up' : low === 1 ? 'wheel-down' : `wheel-${low}`;
|
|
62
|
+
else if (low === 3)
|
|
63
|
+
name = 'release';
|
|
64
|
+
else
|
|
65
|
+
name = ['left', 'middle', 'right'][low];
|
|
66
|
+
if (motion && !wheel)
|
|
67
|
+
name += '-motion';
|
|
68
|
+
return mods.length ? `${name}+${mods.join('+')}` : name;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* An X10 mouse report: `ESC [ M b x y`, each of the last three offset by 32.
|
|
72
|
+
*
|
|
73
|
+
* This is the encoding a program gets when it enables tracking without also
|
|
74
|
+
* asking for SGR, and it is the one that cannot survive being treated as
|
|
75
|
+
* text: past column or row 95 the coordinate byte is above 0x7f, which is not
|
|
76
|
+
* UTF-8 at all. A trace that shows a two-byte coordinate where this expects
|
|
77
|
+
* one is looking at exactly that corruption.
|
|
78
|
+
*/
|
|
79
|
+
function decodeX10(bytes) {
|
|
80
|
+
if (bytes.length < 6)
|
|
81
|
+
return null;
|
|
82
|
+
if (bytes[0] !== 0x1b || bytes[1] !== 0x5b || bytes[2] !== 0x4d)
|
|
83
|
+
return null;
|
|
84
|
+
const b = bytes[3] - 32;
|
|
85
|
+
const col = bytes[4] - 32;
|
|
86
|
+
const row = bytes[5] - 32;
|
|
87
|
+
const tail = bytes.length > 6 ? ` +${bytes.length - 6}B` : '';
|
|
88
|
+
return `X10 ${describeButton(b)} col=${col} row=${row}${tail}`;
|
|
89
|
+
}
|
|
90
|
+
/** An SGR mouse report: `ESC [ < b ; col ; row M|m`, all in decimal. */
|
|
91
|
+
function decodeSgr(bytes) {
|
|
92
|
+
const s = asText(bytes);
|
|
93
|
+
const m = /^\\e\[<(\d+);(\d+);(\d+)([Mm])/.exec(s);
|
|
94
|
+
if (!m)
|
|
95
|
+
return null;
|
|
96
|
+
const press = m[4] === 'M' ? 'press' : 'release';
|
|
97
|
+
return `SGR ${describeButton(Number(m[1]))} col=${m[2]} row=${m[3]} ${press}`;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One line describing a burst of terminal input.
|
|
101
|
+
*
|
|
102
|
+
* Mouse reports are named because they are what a scroll trace is looking
|
|
103
|
+
* for; everything else is shown as text plus hex, because the failure this
|
|
104
|
+
* exists to catch is a report arriving as the wrong bytes rather than not
|
|
105
|
+
* arriving at all.
|
|
106
|
+
*/
|
|
107
|
+
export function describeInput(bytes) {
|
|
108
|
+
const mouse = decodeX10(bytes) ?? decodeSgr(bytes);
|
|
109
|
+
if (mouse)
|
|
110
|
+
return `${mouse} [${hexBytes(bytes)}]`;
|
|
111
|
+
return `"${asText(bytes)}" [${hexBytes(bytes)}]`;
|
|
112
|
+
}
|
|
113
|
+
/** The same, for input a caller is holding as one-byte-per-code-unit text. */
|
|
114
|
+
export function describeLatin1(data) {
|
|
115
|
+
const bytes = new Uint8Array(data.length);
|
|
116
|
+
for (let i = 0; i < data.length; i++)
|
|
117
|
+
bytes[i] = data.charCodeAt(i) & 0xff;
|
|
118
|
+
return describeInput(bytes);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The modes that decide whether a wheel is the program's business or the
|
|
122
|
+
* terminal's, named by what they do rather than by number.
|
|
123
|
+
*
|
|
124
|
+
* `?1049` is here because it is the one that explains a terminal with no
|
|
125
|
+
* scrollback at all: on the alternate screen there is nothing to scroll to,
|
|
126
|
+
* so a program that has not also asked for mouse reports cannot be scrolled
|
|
127
|
+
* by any means. That combination — alternate screen, no tracking — is the
|
|
128
|
+
* shape a stale CLI leaves behind, and it is worth being able to see it
|
|
129
|
+
* rather than infer it.
|
|
130
|
+
*/
|
|
131
|
+
const MODE_NAMES = {
|
|
132
|
+
'9': 'x10-mouse',
|
|
133
|
+
'1000': 'vt200-mouse',
|
|
134
|
+
'1002': 'drag-mouse',
|
|
135
|
+
'1003': 'any-motion-mouse',
|
|
136
|
+
'1004': 'focus-events',
|
|
137
|
+
'1005': 'utf8-mouse-encoding',
|
|
138
|
+
'1006': 'sgr-mouse-encoding',
|
|
139
|
+
'1015': 'urxvt-mouse-encoding',
|
|
140
|
+
'1016': 'sgr-pixel-encoding',
|
|
141
|
+
'1047': 'alt-screen',
|
|
142
|
+
'1049': 'alt-screen+cursor',
|
|
143
|
+
'47': 'alt-screen-legacy',
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Every mouse or screen mode the program flipped in this chunk of output.
|
|
147
|
+
*
|
|
148
|
+
* Read off the stream rather than off a terminal, because the interesting
|
|
149
|
+
* moment is often before any terminal exists to ask: the hub sees a session's
|
|
150
|
+
* whole life, a freshly mounted window sees only what arrives after it
|
|
151
|
+
* attached. Both ends log through this so the two views can be compared.
|
|
152
|
+
*/
|
|
153
|
+
export function modeChanges(text) {
|
|
154
|
+
const out = [];
|
|
155
|
+
// A single DECSET/DECRST can carry several modes, e.g. `ESC [ ? 1002;1006 h`.
|
|
156
|
+
for (const m of text.matchAll(/\x1b\[\?([\d;]+)([hl])/g)) {
|
|
157
|
+
for (const mode of m[1].split(';')) {
|
|
158
|
+
const name = MODE_NAMES[mode];
|
|
159
|
+
if (name)
|
|
160
|
+
out.push({ mode, name, set: m[2] === 'h' });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return out;
|
|
164
|
+
}
|
|
165
|
+
/** Those changes as one loggable phrase, or null when there were none. */
|
|
166
|
+
export function describeModeChanges(text) {
|
|
167
|
+
const changes = modeChanges(text);
|
|
168
|
+
if (changes.length === 0)
|
|
169
|
+
return null;
|
|
170
|
+
return changes.map((c) => `${c.set ? '+' : '-'}${c.name}(?${c.mode})`).join(' ');
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* What a serialized screen would restore, as far as scrolling is concerned.
|
|
174
|
+
*
|
|
175
|
+
* `@xterm/addon-serialize` replays the tracking mode but not the *encoding*
|
|
176
|
+
* one, so a snapshot can restore `?1003h` without `?1006h` and leave a
|
|
177
|
+
* reattached window sending X10 reports to a program that had been getting
|
|
178
|
+
* SGR ones. Worth being able to see in a trace, because the two ends of a
|
|
179
|
+
* remote session deliver their snapshots by different routes.
|
|
180
|
+
*/
|
|
181
|
+
export function describeSnapshotModes(serialized) {
|
|
182
|
+
const changes = modeChanges(serialized);
|
|
183
|
+
if (changes.length === 0)
|
|
184
|
+
return 'no mouse/screen modes';
|
|
185
|
+
return changes.map((c) => `${c.set ? '+' : '-'}${c.name}`).join(' ');
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=mouse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mouse.js","sourceRoot":"","sources":["../src/mouse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,kEAAkE;AAClE,MAAM,UAAU,QAAQ,CAAC,KAAiB,EAAE,KAAK,GAAG,EAAE;IACpD,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;SAC/C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;SAC3C,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,OAAO,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AACxE,CAAC;AAED,wEAAwE;AACxE,SAAS,MAAM,CAAC,KAAiB;IAC/B,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,IAAI;YAAE,GAAG,IAAI,KAAK,CAAC;aACxB,IAAI,CAAC,KAAK,IAAI;YAAE,GAAG,IAAI,KAAK,CAAC;aAC7B,IAAI,CAAC,KAAK,IAAI;YAAE,GAAG,IAAI,KAAK,CAAC;aAC7B,IAAI,CAAC,KAAK,IAAI;YAAE,GAAG,IAAI,KAAK,CAAC;aAC7B,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,IAAI;YAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAA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CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvE,CAAC"}
|
package/dist/protocol/peer.d.ts
CHANGED
|
@@ -65,6 +65,21 @@ export declare const PeerRelayAsk: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
65
65
|
t: z.ZodLiteral<"readScreen">;
|
|
66
66
|
address: z.ZodString;
|
|
67
67
|
lines: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
t: z.ZodLiteral<"listHosts">;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
t: z.ZodLiteral<"spawn">;
|
|
72
|
+
from: z.ZodString;
|
|
73
|
+
host: z.ZodString;
|
|
74
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
75
|
+
name: z.ZodOptional<z.ZodString>;
|
|
76
|
+
agent: z.ZodString;
|
|
77
|
+
template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
+
model: z.ZodOptional<z.ZodString>;
|
|
79
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
80
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
81
|
+
opening: z.ZodOptional<z.ZodString>;
|
|
82
|
+
promptGiven: z.ZodBoolean;
|
|
68
83
|
}, z.core.$strip>], "t">;
|
|
69
84
|
export type PeerRelayAsk = z.infer<typeof PeerRelayAsk>;
|
|
70
85
|
export declare const PeerHello: z.ZodObject<{
|
|
@@ -149,6 +164,7 @@ export declare const PeerRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
149
164
|
statusText: z.ZodNullable<z.ZodString>;
|
|
150
165
|
host: z.ZodString;
|
|
151
166
|
}, z.core.$strip>>;
|
|
167
|
+
youAre: z.ZodOptional<z.ZodString>;
|
|
152
168
|
}, z.core.$strip>, z.ZodObject<{
|
|
153
169
|
t: z.ZodLiteral<"relayResult">;
|
|
154
170
|
id: z.ZodString;
|
|
@@ -190,6 +206,10 @@ export declare const PeerRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
190
206
|
address: z.ZodString;
|
|
191
207
|
cols: z.ZodNumber;
|
|
192
208
|
rows: z.ZodNumber;
|
|
209
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
210
|
+
t: z.ZodLiteral<"checkFolder">;
|
|
211
|
+
id: z.ZodString;
|
|
212
|
+
path: z.ZodString;
|
|
193
213
|
}, z.core.$strip>], "t">;
|
|
194
214
|
export type PeerRequest = z.infer<typeof PeerRequest>;
|
|
195
215
|
export declare const PeerResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -341,12 +361,33 @@ export declare const PeerResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
341
361
|
t: z.ZodLiteral<"readScreen">;
|
|
342
362
|
address: z.ZodString;
|
|
343
363
|
lines: z.ZodOptional<z.ZodNumber>;
|
|
364
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
365
|
+
t: z.ZodLiteral<"listHosts">;
|
|
366
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
367
|
+
t: z.ZodLiteral<"spawn">;
|
|
368
|
+
from: z.ZodString;
|
|
369
|
+
host: z.ZodString;
|
|
370
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
371
|
+
name: z.ZodOptional<z.ZodString>;
|
|
372
|
+
agent: z.ZodString;
|
|
373
|
+
template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
374
|
+
model: z.ZodOptional<z.ZodString>;
|
|
375
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
376
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
377
|
+
opening: z.ZodOptional<z.ZodString>;
|
|
378
|
+
promptGiven: z.ZodBoolean;
|
|
344
379
|
}, z.core.$strip>], "t">;
|
|
345
380
|
}, z.core.$strip>], "t">;
|
|
346
381
|
export type PeerResponse = z.infer<typeof PeerResponse>;
|
|
347
382
|
/**
|
|
348
383
|
* Bumped whenever the peer protocol or the DB schema changes shape. Hubs
|
|
349
384
|
* refuse to connect across a mismatch rather than corrupting each other.
|
|
385
|
+
*
|
|
386
|
+
* 9: added `checkFolder`. Required, not cosmetic — `peer-serve.ts` drops a
|
|
387
|
+
* frame it cannot parse silently, so a peer older than this would leave a
|
|
388
|
+
* `checkFolder` request hanging forever instead of refusing it; the version
|
|
389
|
+
* gate is what turns that into an honest refusal at the handshake instead.
|
|
390
|
+
* Consequence: every already-joined machine has to re-run the installer.
|
|
350
391
|
*/
|
|
351
|
-
export declare const PEER_SCHEMA_VERSION =
|
|
392
|
+
export declare const PEER_SCHEMA_VERSION = 9;
|
|
352
393
|
//# sourceMappingURL=peer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer.d.ts","sourceRoot":"","sources":["../src/peer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;iBASpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD;;;;;;;;GAQG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"peer.d.ts","sourceRoot":"","sources":["../src/peer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;iBASpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD;;;;;;;;GAQG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;wBA2CvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,SAAS;;;;;;;;;;;;iBA+BpB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuItB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAyCvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC"}
|
package/dist/protocol/peer.js
CHANGED
|
@@ -61,6 +61,35 @@ export const PeerRelayAsk = z.discriminatedUnion('t', [
|
|
|
61
61
|
address: z.string(),
|
|
62
62
|
lines: z.number().int().positive().optional(),
|
|
63
63
|
}),
|
|
64
|
+
z.object({ t: z.literal('listHosts') }),
|
|
65
|
+
// A spawn_agent naming a `host`, from a hub with no local knowledge of one
|
|
66
|
+
// (the canvas machine itself, or a third machine). Everything here arrives
|
|
67
|
+
// already resolved, for the reason startSession's own peer request does
|
|
68
|
+
// (peer.ts, startSession req below): a template is config, the two hubs do
|
|
69
|
+
// not share config, and the asking hub is the only one that knows what its
|
|
70
|
+
// caller's template meant — `agent` is the CLI id it resolved to, `opening`
|
|
71
|
+
// is the template's prompt and the caller's own instruction already merged
|
|
72
|
+
// into one injection, and `template` travels only so the child's window can
|
|
73
|
+
// say which one was picked.
|
|
74
|
+
z.object({
|
|
75
|
+
t: z.literal('spawn'),
|
|
76
|
+
// Authenticated by the asking hub from the sender's own bearer token,
|
|
77
|
+
// exactly as `deliver`'s `from` is.
|
|
78
|
+
from: z.string(),
|
|
79
|
+
// Never omitted: a spawn_agent with no `host`, or one naming the asking
|
|
80
|
+
// hub's own machine, is handled entirely on that hub and never relays.
|
|
81
|
+
host: z.string(),
|
|
82
|
+
workspace: z.string().optional(),
|
|
83
|
+
name: z.string().optional(),
|
|
84
|
+
agent: z.string(),
|
|
85
|
+
template: z.string().nullable().optional(),
|
|
86
|
+
model: z.string().optional(),
|
|
87
|
+
effort: z.string().optional(),
|
|
88
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
89
|
+
opening: z.string().optional(),
|
|
90
|
+
/** Whether the caller passed a `prompt`, for the reply's `promptQueued`. */
|
|
91
|
+
promptGiven: z.boolean(),
|
|
92
|
+
}),
|
|
64
93
|
]);
|
|
65
94
|
export const PeerHello = z.object({
|
|
66
95
|
t: z.literal('hello'),
|
|
@@ -156,7 +185,19 @@ export const PeerRequest = z.discriminatedUnion('t', [
|
|
|
156
185
|
// The canvas telling a host who else is on it. Sent whenever that set
|
|
157
186
|
// changes, and it is the whole set minus the receiving host's own agents,
|
|
158
187
|
// which it already knows about and would otherwise list twice.
|
|
159
|
-
z.object({
|
|
188
|
+
z.object({
|
|
189
|
+
t: z.literal('directory'),
|
|
190
|
+
id: z.string(),
|
|
191
|
+
agents: z.array(PeerAgent),
|
|
192
|
+
/**
|
|
193
|
+
* What the canvas calls this host, so it can answer `list_hosts` and
|
|
194
|
+
* `host: 'local'`/`'self'` for its own agents without a row for itself —
|
|
195
|
+
* it has none, the same way the canvas has none for its own machine. A
|
|
196
|
+
* label edited from the canvas panel after enrollment is not something
|
|
197
|
+
* this host would otherwise ever learn.
|
|
198
|
+
*/
|
|
199
|
+
youAre: z.string().optional(),
|
|
200
|
+
}),
|
|
160
201
|
// The answer to a `relay`, matched by the id the host chose for it. A
|
|
161
202
|
// separate frame rather than an `ok`, because the two ends do not share a
|
|
162
203
|
// request channel: the canvas asks, the host answers, and this is the canvas
|
|
@@ -209,6 +250,14 @@ export const PeerRequest = z.discriminatedUnion('t', [
|
|
|
209
250
|
cols: z.number().int().positive(),
|
|
210
251
|
rows: z.number().int().positive(),
|
|
211
252
|
}),
|
|
253
|
+
/**
|
|
254
|
+
* Whether a workspace folder makes sense there at all. Asked rather than
|
|
255
|
+
* assumed, for the same reason `listAgents` is: only that machine can
|
|
256
|
+
* resolve a path in its own platform's flavour and stat the result, so the
|
|
257
|
+
* Add/Edit-workspace dialog asks before a workspace pointing at it is even
|
|
258
|
+
* created, instead of an agent finding out at its first start.
|
|
259
|
+
*/
|
|
260
|
+
z.object({ t: z.literal('checkFolder'), id: z.string(), path: z.string() }),
|
|
212
261
|
]);
|
|
213
262
|
export const PeerResponse = z.discriminatedUnion('t', [
|
|
214
263
|
z.object({
|
|
@@ -255,6 +304,12 @@ export const PeerResponse = z.discriminatedUnion('t', [
|
|
|
255
304
|
/**
|
|
256
305
|
* Bumped whenever the peer protocol or the DB schema changes shape. Hubs
|
|
257
306
|
* refuse to connect across a mismatch rather than corrupting each other.
|
|
307
|
+
*
|
|
308
|
+
* 9: added `checkFolder`. Required, not cosmetic — `peer-serve.ts` drops a
|
|
309
|
+
* frame it cannot parse silently, so a peer older than this would leave a
|
|
310
|
+
* `checkFolder` request hanging forever instead of refusing it; the version
|
|
311
|
+
* gate is what turns that into an honest refusal at the handshake instead.
|
|
312
|
+
* Consequence: every already-joined machine has to re-run the installer.
|
|
258
313
|
*/
|
|
259
|
-
export const PEER_SCHEMA_VERSION =
|
|
314
|
+
export const PEER_SCHEMA_VERSION = 9;
|
|
260
315
|
//# sourceMappingURL=peer.js.map
|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