agent-yes 1.290.7 → 1.291.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/dist/SUPPORTED_CLIS-BZP767UR.js +12 -0
- package/dist/{SUPPORTED_CLIS-hTRegnm5.js → SUPPORTED_CLIS-TiOdGi1h.js} +2 -2
- package/dist/{agentShare-C_LTEKEb.js → agentShare-D4N8StHO.js} +8 -8
- package/dist/{askCli-DR9vhdcV.js → askCli-DFsWcgpF.js} +3 -3
- package/dist/{browser-oqC3Ln2a.js → browser-wkzxw6lx.js} +3 -2
- package/dist/{callback-DAQ8wCtJ.js → callback-Bc2gnr_f.js} +3 -3
- package/dist/{callback-BEvLUUBR.js → callback-yCpK6Qpg.js} +7 -7
- package/dist/{channels-hOG3-R_3.js → channels-aYwLMbFV.js} +2 -2
- package/dist/cli.js +9 -9
- package/dist/{cmdPs-BAaLB4Pz.js → cmdPs-D5L3Eyh5.js} +7 -7
- package/dist/{cwdConflictWarn-BgXN56Jc.js → cwdConflictWarn-sQUONAye.js} +2 -2
- package/dist/{forkNested-CJ7lQQCe.js → forkNested-xtEeYpBQ.js} +3 -3
- package/dist/{globalPidIndex-DoaKEUkO.js → globalPidIndex-CRH9L9tn.js} +139 -12
- package/dist/globalPidIndex-DC93JhHQ.js +4 -0
- package/dist/index.js +5 -5
- package/dist/{messageLog-CVRSTLza.js → messageLog-Brx3w6zT.js} +2 -1
- package/dist/{notifyDaemon-Dnbe66Fl.js → notifyDaemon-CvUtRnAB.js} +7 -7
- package/dist/{parentLink-fdiuB13i.js → parentLink-BILJ32nA.js} +2 -2
- package/dist/{parentLink-bpDGuQi6.js → parentLink-CfbxykCv.js} +2 -2
- package/dist/{parentPingLoop-DWv-xJoi.js → parentPingLoop-CVOCiQp2.js} +4 -4
- package/dist/pidStore-Bpe8i_oU.js +6 -0
- package/dist/{pidStore-B73xnAeT.js → pidStore-DXWqzTSz.js} +2 -2
- package/dist/{remotes-DTXPW8U1.js → remotes-tmKwrr20.js} +3 -3
- package/dist/{remotes-C696AJzL.js → remotes-wPL0JtBs.js} +2 -2
- package/dist/{rustBinary-CZRPfa4y.js → rustBinary-C_EbyMTk.js} +2 -2
- package/dist/{rustBinary-jO6EN8LR.js → rustBinary-Clbk_K5c.js} +2 -2
- package/dist/{schedule-Hao0WqyJ.js → schedule-Ba_4wNVK.js} +7 -7
- package/dist/{serve-B2nisui8.js → serve-CJDQq_Jp.js} +46 -40
- package/dist/{setup-vCDTqyqR.js → setup-DwLAkbTC.js} +2 -2
- package/dist/share-Bmnd_qT0.js +4 -0
- package/dist/{share-DTlaFn6s.js → share-C9oGvjXT.js} +13 -4
- package/dist/spawnGate-BUEswFgo.js +5 -0
- package/dist/{spawnGate-B26UnzqP.js → spawnGate-YpHopveO.js} +2 -2
- package/dist/{subcommands-BpFdlCY0.js → subcommands-x8Pe7DrF.js} +6 -6
- package/dist/{subcommands-D6LBtVPM.js → subcommands-yWgVRM2r.js} +273 -45
- package/dist/{terminal-iGHEnc7Z.js → terminal-Dv73BTE-.js} +2 -2
- package/dist/terminal.js +1 -1
- package/dist/{todoCli-azqbjBtz.js → todoCli-DSQXAcwA.js} +3 -3
- package/dist/{todoIdentity-NEceTmEe.js → todoIdentity-CAmnkzzP.js} +2 -2
- package/dist/{trayApp-BdNlQCFx.js → trayApp-BRw8f0mT.js} +2 -2
- package/dist/trayApp-BjQ5V3WV.js +5 -0
- package/dist/{ts-oyuaLWWx.js → ts-C8PxhJZM.js} +7 -7
- package/dist/{versionChecker-CMjS88mL.js → versionChecker-CWPGASjD.js} +2 -2
- package/dist/webrtcLink-CnQf9pmu.js +73 -0
- package/dist/{webrtcRemote-L5NxhLLR.js → webrtcRemote-yvMYsij3.js} +2 -2
- package/dist/{widget-OvkqW2Z6.js → widget-DhBSNUey.js} +3 -3
- package/dist/widgets.js +1 -1
- package/dist/{ws-BeMouYAU.js → ws-CMX0pkti.js} +2 -2
- package/dist/{ws-qZy7Giub.js → ws-DZ9YAXlY.js} +7 -7
- package/lab/ui/console-logic.js +27 -4
- package/package.json +1 -1
- package/ts/crossTreeClaim.bun.spec.ts +76 -0
- package/ts/crossTreeClaim.spec.ts +76 -0
- package/ts/globalPidIndex.spec.ts +153 -0
- package/ts/globalPidIndex.ts +151 -10
- package/ts/messageLog.bun.spec.ts +33 -0
- package/ts/messageLog.spec.ts +33 -0
- package/ts/messageLog.ts +3 -0
- package/ts/rawInputDeclared.bun.spec.ts +68 -0
- package/ts/rawInputDeclared.spec.ts +68 -0
- package/ts/remoteHealth.bun.spec.ts +130 -0
- package/ts/remoteHealth.spec.ts +130 -0
- package/ts/remoteHealth.ts +149 -0
- package/ts/restartKillGuard.bun.spec.ts +40 -0
- package/ts/restartKillGuard.spec.ts +40 -0
- package/ts/senderAncestry.ts +45 -7
- package/ts/serve.ts +46 -20
- package/ts/share.bun.spec.ts +24 -2
- package/ts/share.spec.ts +24 -2
- package/ts/share.ts +37 -5
- package/ts/subcommands.ts +239 -19
- package/ts/terminal/browser.ts +5 -1
- package/ts/webrtcLink.bun.spec.ts +45 -1
- package/ts/webrtcLink.spec.ts +45 -1
- package/ts/webrtcLink.ts +63 -19
- package/dist/SUPPORTED_CLIS-CuvT3tKq.js +0 -12
- package/dist/globalPidIndex-yvWZXeWT.js +0 -4
- package/dist/pidStore-V51mbgZY.js +0 -6
- package/dist/share-BvU4I8BI.js +0 -4
- package/dist/spawnGate-C8MSRt7X.js +0 -5
- package/dist/trayApp-Br2T2Yrb.js +0 -5
- package/dist/webrtcLink-DLaJfTcB.js +0 -45
package/ts/webrtcLink.ts
CHANGED
|
@@ -13,30 +13,74 @@ export interface WebrtcLink {
|
|
|
13
13
|
host: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
/** room + RAW token (marker and all), before parseSecret strips the `e1.`. */
|
|
17
|
+
interface RawLink {
|
|
18
|
+
room: string;
|
|
19
|
+
token: string;
|
|
20
|
+
host: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// The fragment of a /room/ link is a key=value set, parsed with URLSearchParams:
|
|
24
|
+
//
|
|
25
|
+
// https://agent-yes.com/room/#room=<id>&s=e1.<64hex>[&sig=<host>]
|
|
26
|
+
//
|
|
27
|
+
// Positional (#<room>:<token>[@<sighost>]) is the older /w/ console form, kept
|
|
28
|
+
// working forever for saved links and PWA caches. New links use key=value
|
|
29
|
+
// because the fragment namespace is shared with #k=, #ch= and #launch=, and the
|
|
30
|
+
// positional grammar can only be told apart from those by a blocklist that has
|
|
31
|
+
// to be updated for every new key (see parseRoomHash in lab/ui/rtc.js). A leading
|
|
32
|
+
// "?" is tolerated (#?room=…) since that spelling is also in the wild.
|
|
33
|
+
//
|
|
34
|
+
// NOTE: URLSearchParams percent-decodes and reads "+" as a space. The secret is
|
|
35
|
+
// `e1.` + hex so it survives untouched, but any future value must be written
|
|
36
|
+
// with encodeURIComponent.
|
|
37
|
+
function parseFragment(frag: string): RawLink | null {
|
|
38
|
+
if (/^\??[A-Za-z_]+=/.test(frag)) {
|
|
39
|
+
const q = new URLSearchParams(frag.replace(/^\?/, ""));
|
|
40
|
+
const room = q.get("room");
|
|
41
|
+
const token = q.get("s");
|
|
42
|
+
if (!room || !token) return null;
|
|
43
|
+
return { room, token, host: q.get("sig") || DEFAULT_SIGHOST };
|
|
44
|
+
}
|
|
45
|
+
const at = frag.split("@");
|
|
46
|
+
const seg = at[0]!;
|
|
47
|
+
const i = seg.indexOf(":");
|
|
48
|
+
if (i < 0) return null;
|
|
49
|
+
return { room: seg.slice(0, i), token: seg.slice(i + 1), host: at[1] || DEFAULT_SIGHOST };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Parse a share link WITHOUT validating/stripping the secret's version marker. */
|
|
53
|
+
function parseRaw(link: string): RawLink | null {
|
|
54
|
+
const wr = /^webrtc:\/\/([^:]+):([^@]+)@(.+)$/.exec(link);
|
|
55
|
+
if (wr) return { room: wr[1]!, token: wr[2]!, host: wr[3]! };
|
|
56
|
+
if (/^https?:\/\//.test(link) && link.includes("#"))
|
|
57
|
+
return parseFragment(link.split("#")[1] ?? "");
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
|
|
16
61
|
/**
|
|
17
62
|
* Parse a share link into { room, secret, signaling-host }. Accepts:
|
|
18
|
-
* webrtc://<room>:<token>@<host>
|
|
19
|
-
* https://<anyhost>/
|
|
20
|
-
* https://<anyhost>/w/#<room>:<token
|
|
63
|
+
* webrtc://<room>:<token>@<host> (internal / legacy form)
|
|
64
|
+
* https://<anyhost>/room/#room=<id>&s=<token>[&sig=<host>]
|
|
65
|
+
* https://<anyhost>/w/#<room>:<token>[@<sighost>] (older positional form)
|
|
21
66
|
* Returns null if the string isn't a recognizable share link.
|
|
22
67
|
*/
|
|
23
68
|
export function parseWebrtcLink(link: string): WebrtcLink | null {
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
return null;
|
|
69
|
+
const raw = parseRaw(link);
|
|
70
|
+
if (!raw) return null;
|
|
71
|
+
const { s } = parseSecret(raw.token);
|
|
72
|
+
return { room: raw.room, s, host: raw.host };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Normalize any accepted share-link spelling to the internal
|
|
77
|
+
* `webrtc://<room>:<token>@<host>` form that startShare/parseShareUrl consume.
|
|
78
|
+
* Returns the RAW token, so a legacy markerless room round-trips unchanged
|
|
79
|
+
* instead of being handed a marker it never had.
|
|
80
|
+
*/
|
|
81
|
+
export function toWebrtcUrl(link: string): string | null {
|
|
82
|
+
const raw = parseRaw(link);
|
|
83
|
+
return raw ? `webrtc://${raw.room}:${raw.token}@${raw.host}` : null;
|
|
40
84
|
}
|
|
41
85
|
|
|
42
86
|
/** True if `spec` looks like a WebRTC share link (vs. an http remote or alias). */
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-CMjS88mL.js";
|
|
3
|
-
import "./ts-oyuaLWWx.js";
|
|
4
|
-
import "./todoAutomation-CbVVS4re.js";
|
|
5
|
-
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
|
-
import "./globalPidIndex-DoaKEUkO.js";
|
|
7
|
-
import "./pidStore-B73xnAeT.js";
|
|
8
|
-
import "./messageLog-CVRSTLza.js";
|
|
9
|
-
import "./todoStore-DF6vxHgV.js";
|
|
10
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-hTRegnm5.js";
|
|
11
|
-
|
|
12
|
-
export { SUPPORTED_CLIS };
|
package/dist/share-BvU4I8BI.js
DELETED
package/dist/trayApp-Br2T2Yrb.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { u as parseSecret } from "./e2e-z1xpwSAg.js";
|
|
2
|
-
|
|
3
|
-
//#region ts/webrtcLink.ts
|
|
4
|
-
const SIGNAL_SUBPROTOCOL = "ay-signal-1";
|
|
5
|
-
const DEFAULT_SIGHOST = "s.agent-yes.com";
|
|
6
|
-
/**
|
|
7
|
-
* Parse a share link into { room, secret, signaling-host }. Accepts:
|
|
8
|
-
* webrtc://<room>:<token>@<host>
|
|
9
|
-
* https://<anyhost>/w/#<room>:<token> (signaling host defaults to s.agent-yes.com)
|
|
10
|
-
* https://<anyhost>/w/#<room>:<token>@<sighost> (explicit signaling host)
|
|
11
|
-
* Returns null if the string isn't a recognizable share link.
|
|
12
|
-
*/
|
|
13
|
-
function parseWebrtcLink(link) {
|
|
14
|
-
const wr = /^webrtc:\/\/([^:]+):([^@]+)@(.+)$/.exec(link);
|
|
15
|
-
if (wr) {
|
|
16
|
-
const { s } = parseSecret(wr[2]);
|
|
17
|
-
return {
|
|
18
|
-
room: wr[1],
|
|
19
|
-
s,
|
|
20
|
-
host: wr[3]
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
if (/^https?:\/\//.test(link) && link.includes("#")) {
|
|
24
|
-
const at = (link.split("#")[1] ?? "").split("@");
|
|
25
|
-
const host = at[1] || DEFAULT_SIGHOST;
|
|
26
|
-
const seg = at[0];
|
|
27
|
-
const i = seg.indexOf(":");
|
|
28
|
-
if (i < 0) return null;
|
|
29
|
-
const { s } = parseSecret(seg.slice(i + 1));
|
|
30
|
-
return {
|
|
31
|
-
room: seg.slice(0, i),
|
|
32
|
-
s,
|
|
33
|
-
host
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
/** True if `spec` looks like a WebRTC share link (vs. an http remote or alias). */
|
|
39
|
-
function isWebrtcSpec(spec) {
|
|
40
|
-
return spec.startsWith("webrtc://") || /^https?:\/\//.test(spec) && spec.includes("#");
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
export { isWebrtcSpec as n, parseWebrtcLink as r, SIGNAL_SUBPROTOCOL as t };
|
|
45
|
-
//# sourceMappingURL=webrtcLink-DLaJfTcB.js.map
|