@intentic/sandbox-contract 1.429.0 → 1.430.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/contracts/accounts.contract.d.ts +7 -0
- package/dist/contracts/accounts.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.d.ts +24 -0
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +84 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/bookmarks.contract.d.ts +101 -0
- package/dist/contracts/bookmarks.contract.d.ts.map +1 -0
- package/dist/contracts/bookmarks.contract.js +51 -0
- package/dist/contracts/bookmarks.contract.js.map +1 -0
- package/dist/contracts/browser.contract.d.ts +176 -0
- package/dist/contracts/browser.contract.d.ts.map +1 -0
- package/dist/contracts/browser.contract.js +150 -0
- package/dist/contracts/browser.contract.js.map +1 -0
- package/dist/contracts/capabilities.contract.d.ts +36 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.d.ts +60 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.js +4 -0
- package/dist/contracts/device.contract.js.map +1 -1
- package/dist/contracts/remote.contract.d.ts +120 -0
- package/dist/contracts/remote.contract.d.ts.map +1 -0
- package/dist/contracts/remote.contract.js +80 -0
- package/dist/contracts/remote.contract.js.map +1 -0
- package/dist/contracts/runner.contract.d.ts +14 -14
- package/dist/contracts/seal.contract.d.ts +20 -0
- package/dist/contracts/seal.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +26 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +150 -0
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +57 -1
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/translator.contract.d.ts +7 -0
- package/dist/contracts/translator.contract.d.ts.map +1 -1
- package/dist/events/failure-rows.d.ts +2 -2
- package/dist/events/failure-rows.d.ts.map +1 -1
- package/dist/events/failure-rows.js +13 -13
- package/dist/events/failure-rows.js.map +1 -1
- package/dist/events/resume.d.ts.map +1 -1
- package/dist/events/resume.js +12 -12
- package/dist/events/resume.js.map +1 -1
- package/dist/events/sandbox-notice.d.ts.map +1 -1
- package/dist/events/sandbox-notice.js.map +1 -1
- package/dist/events/system-events.d.ts +16 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/netd/browser-wire.d.ts +50 -1
- package/dist/netd/browser-wire.d.ts.map +1 -1
- package/dist/netd/browser-wire.js +22 -0
- package/dist/netd/browser-wire.js.map +1 -1
- package/dist/netd/generated/browser-wire.d.ts +135 -0
- package/dist/netd/generated/browser-wire.d.ts.map +1 -1
- package/dist/netd/generated/wire.d.ts +14 -0
- package/dist/netd/generated/wire.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.d.ts +6 -0
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.js +1 -0
- package/dist/protocol/raw/raw-json-routes.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +18 -0
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +4 -0
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/schemas/agent.d.ts +16 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +3 -4
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents-list.d.ts +8 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +12 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/bookmarks.d.ts +85 -0
- package/dist/schemas/bookmarks.d.ts.map +1 -0
- package/dist/schemas/bookmarks.js +56 -0
- package/dist/schemas/bookmarks.js.map +1 -0
- package/dist/schemas/browser-tools.d.ts +167 -0
- package/dist/schemas/browser-tools.d.ts.map +1 -0
- package/dist/schemas/browser-tools.js +121 -0
- package/dist/schemas/browser-tools.js.map +1 -0
- package/dist/schemas/browsing.d.ts +139 -0
- package/dist/schemas/browsing.d.ts.map +1 -0
- package/dist/schemas/browsing.js +83 -0
- package/dist/schemas/browsing.js.map +1 -0
- package/dist/schemas/capabilities.d.ts +36 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +3 -0
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/context-trim.js +3 -3
- package/dist/schemas/context-trim.js.map +1 -1
- package/dist/schemas/device-remote.d.ts +84 -0
- package/dist/schemas/device-remote.d.ts.map +1 -0
- package/dist/schemas/device-remote.js +54 -0
- package/dist/schemas/device-remote.js.map +1 -0
- package/dist/schemas/hosts.d.ts +6 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +6 -0
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/keep-warm.d.ts.map +1 -1
- package/dist/schemas/keep-warm.js +2 -3
- package/dist/schemas/keep-warm.js.map +1 -1
- package/dist/schemas/providers/handoff.d.ts.map +1 -1
- package/dist/schemas/providers/handoff.js +11 -11
- package/dist/schemas/providers/handoff.js.map +1 -1
- package/dist/schemas/providers/provider-oauth.d.ts +14 -0
- package/dist/schemas/providers/provider-oauth.d.ts.map +1 -1
- package/dist/schemas/providers/provider-oauth.js +6 -2
- package/dist/schemas/providers/provider-oauth.js.map +1 -1
- package/dist/schemas/providers/switched.js +1 -1
- package/dist/schemas/providers/switched.js.map +1 -1
- package/dist/schemas/queued-trial-retry.d.ts +7 -0
- package/dist/schemas/queued-trial-retry.d.ts.map +1 -0
- package/dist/schemas/queued-trial-retry.js +8 -0
- package/dist/schemas/queued-trial-retry.js.map +1 -0
- package/dist/schemas/remote-access.d.ts +137 -0
- package/dist/schemas/remote-access.d.ts.map +1 -0
- package/dist/schemas/remote-access.js +71 -0
- package/dist/schemas/remote-access.js.map +1 -0
- package/dist/schemas/seal.d.ts +1 -1
- package/dist/schemas/seal.d.ts.map +1 -1
- package/dist/schemas/seal.js +1 -1
- package/dist/schemas/seal.js.map +1 -1
- package/dist/schemas/settings.d.ts +26 -0
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +5 -0
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/terminal.d.ts +136 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +41 -1
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/state/auth-state.d.ts.map +1 -1
- package/dist/state/auth-state.js +1 -0
- package/dist/state/auth-state.js.map +1 -1
- package/dist/state/definition.d.ts +52 -0
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/runtime-state.d.ts +3 -0
- package/dist/state/runtime-state.d.ts.map +1 -1
- package/dist/state/runtime-state.js +1 -0
- package/dist/state/runtime-state.js.map +1 -1
- package/dist/text/land-rows.d.ts.map +1 -1
- package/dist/text/land-rows.js +13 -17
- package/dist/text/land-rows.js.map +1 -1
- package/dist/text/notice-rows.js +6 -6
- package/dist/text/notice-rows.js.map +1 -1
- package/package.json +5 -5
- package/src/contracts/bookmarks.contract.ts +66 -0
- package/src/contracts/browser.contract.ts +181 -0
- package/src/contracts/device.contract.ts +15 -0
- package/src/contracts/remote.contract.ts +104 -0
- package/src/contracts/system.contract.ts +78 -0
- package/src/events/failure-rows.ts +13 -14
- package/src/events/resume.test.ts +3 -3
- package/src/events/resume.ts +12 -18
- package/src/events/sandbox-notice.ts +2 -0
- package/src/index.ts +15 -6
- package/src/netd/browser-wire.ts +84 -0
- package/src/netd/generated/browser-wire.json +894 -0
- package/src/netd/generated/browser-wire.ts +62 -3
- package/src/netd/generated/netd-wire.json +75 -0
- package/src/netd/generated/wire.ts +11 -2
- package/src/netd/wire-manifests.test.ts +76 -1
- package/src/protocol/ingress-contract.fixture.json +4 -0
- package/src/protocol/raw/raw-json-routes.ts +3 -0
- package/src/protocol/raw/raw-routes.ts +11 -0
- package/src/schemas/agent.ts +3 -4
- package/src/schemas/bookmarks.ts +79 -0
- package/src/schemas/browser-tools.ts +164 -0
- package/src/schemas/browsing.ts +129 -0
- package/src/schemas/capabilities.ts +9 -0
- package/src/schemas/context-trim.test.ts +6 -6
- package/src/schemas/context-trim.ts +3 -3
- package/src/schemas/device-remote.ts +106 -0
- package/src/schemas/hosts.ts +13 -0
- package/src/schemas/keep-warm.test.ts +1 -1
- package/src/schemas/keep-warm.ts +2 -3
- package/src/schemas/providers/handoff.test.ts +8 -10
- package/src/schemas/providers/handoff.ts +11 -12
- package/src/schemas/providers/provider-oauth.ts +10 -2
- package/src/schemas/providers/switched.test.ts +6 -6
- package/src/schemas/providers/switched.ts +1 -1
- package/src/schemas/queued-trial-retry.ts +14 -0
- package/src/schemas/remote-access.ts +140 -0
- package/src/schemas/seal.ts +2 -1
- package/src/schemas/settings.ts +9 -0
- package/src/schemas/terminal.ts +59 -1
- package/src/state/auth-state.ts +3 -0
- package/src/state/runtime-state.ts +4 -0
- package/src/text/land-rows.ts +13 -18
- package/src/text/notice-rows.ts +6 -6
- package/src/text/transcript-fold.test.ts +37 -37
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* What the editor sends on a media socket, each a JSON text message. Coordinates are in the picture's own pixels, as
|
|
5
|
+
* on the browser view socket.
|
|
6
|
+
*/
|
|
7
|
+
export type BrowserMediaClientMessage = { "type": "mouse", action: PointerAction, x: number, y: number, button?: number, buttons?: number, clickCount?: number, ctrl?: boolean, shift?: boolean, alt?: boolean, } | { "type": "scroll", x: number, y: number, dx: number, dy: number, } | { "type": "key", key: string, code?: string, action?: KeyAction, ctrl?: boolean, shift?: boolean, alt?: boolean, } | { "type": "text", text: string, } | { "type": "clipboard", content: ClipboardContent, } | { "type": "releaseAll" } | { "type": "ack", id: number, decodeMs?: number, } | { "type": "keyframe" } | { "type": "resize", width: number, height: number, scale: number, hz?: number, } | { "type": "pause" } | { "type": "resume" } | { "type": "audio", on: boolean, } | { "type": "ping", t: number, } | { "type": "rtcOffer", sdp: string, } | { "type": "rtcCandidate", candidate: string, sdpMid?: string, } | { "type": "rtcClose" } | { "type": "token", token: string, };
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* What a media socket sends as JSON text; the pictures and sound travel as binary messages with the
|
|
11
|
+
* [`MEDIA_HEADER_LEN`]-byte header.
|
|
12
|
+
*/
|
|
13
|
+
export type BrowserMediaServerMessage = { "type": "hello", width: number, height: number, scale: number, codec: string, audio?: MediaAudio, readOnly: boolean,
|
|
14
|
+
/**
|
|
15
|
+
* castd takes a peer connection on this window (`rtcOffer`): it serves one on an address a viewer on its
|
|
16
|
+
* network may reach. Absent from a castd that serves none.
|
|
17
|
+
*/
|
|
18
|
+
rtc?: boolean,
|
|
19
|
+
/**
|
|
20
|
+
* This viewer reaches castd on the loopback of the computer the sandbox runs on (netd said so): while it
|
|
21
|
+
* drives, castd encodes at the quality a link that is no network allows, and, where it asked for
|
|
22
|
+
* [`MEDIA_LOSSLESS_QUERY`], sends it `clip`ped frames and `lossless` rectangles. Absent otherwise.
|
|
23
|
+
*/
|
|
24
|
+
local?: boolean,
|
|
25
|
+
/**
|
|
26
|
+
* The pictures after this hello ride the peer's video track as RTP (the offer had one and castd took it), not
|
|
27
|
+
* `media`: the browser's own jitter buffer and decoder show them, NACK and PLI repair them, and castd's
|
|
28
|
+
* bitrate follows the track's congestion control. Only in a hello on the peer; absent, video is on `media`.
|
|
29
|
+
*/
|
|
30
|
+
track?: boolean, } | { "type": "cursor", cursor: MediaCursor, } | { "type": "pointer", x: number, y: number, } | { "type": "clipboard", content: ClipboardContent, } | { "type": "stats", rttMs: number, targetKbps: number, fps: number, queueMs: number, } | { "type": "pong", t: number, } | { "type": "error", message: string, } | { "type": "rtcAnswer", sdp: string, } | { "type": "rtcClosed", reason: string, };
|
|
31
|
+
|
|
3
32
|
/**
|
|
4
33
|
* What the editor sends on a browser view socket, each a JSON text message. Nothing that drives the page is sent
|
|
5
34
|
* until the person takes control; watching sends only the view's own housekeeping (`resize`, `pause`, `ping`, …).
|
|
@@ -8,13 +37,23 @@ export type BrowserViewClientMessage = { "type": "mouse", action: PointerAction,
|
|
|
8
37
|
/**
|
|
9
38
|
* Which button changed, in DOM numbering (0 left, 1 middle, 2 right, 3 back, 4 forward).
|
|
10
39
|
*/
|
|
11
|
-
button?: number, buttons?: number, clickCount?: number, ctrl?: boolean, shift?: boolean, alt?: boolean, deltaX?: number, deltaY?: number, } | { "type": "text", text: string, raw?: boolean, } | { "type": "key", key: string, ctrl?: boolean, shift?: boolean, alt?: boolean, raw?: boolean, } | { "type": "selection" } | { "type": "selectOption", index: number, } | { "type": "bind", pageId: string, } | { "type": "navigate", url: string, pageId?: string, } | { "type": "back" } | { "type": "forward" } | { "type": "reload" } | { "type": "stop" } | { "type": "newTab", url?: string, } | { "type": "closeTab", pageId: string, } | { "type": "resize", width: number, height: number, } | { "type": "keyframe" } | { "type": "emulate", device?: EmulatedDevice, } | { "type": "dialog", accept: boolean, text?: string, } | { "type": "pause" } | { "type": "resume" } | { "type": "done" } | { "type": "ping" };
|
|
40
|
+
button?: number, buttons?: number, clickCount?: number, ctrl?: boolean, shift?: boolean, alt?: boolean, deltaX?: number, deltaY?: number, } | { "type": "text", text: string, raw?: boolean, } | { "type": "key", key: string, ctrl?: boolean, shift?: boolean, alt?: boolean, raw?: boolean, } | { "type": "selection" } | { "type": "selectOption", index: number, } | { "type": "bind", pageId: string, } | { "type": "navigate", url: string, pageId?: string, } | { "type": "back" } | { "type": "forward" } | { "type": "reload" } | { "type": "stop" } | { "type": "newTab", url?: string, } | { "type": "closeTab", pageId: string, } | { "type": "resize", width: number, height: number, } | { "type": "keyframe" } | { "type": "emulate", device?: EmulatedDevice, } | { "type": "dialog", accept: boolean, text?: string, } | { "type": "pause" } | { "type": "resume" } | { "type": "done" } | { "type": "ping" } | { "type": "media" };
|
|
12
41
|
|
|
13
42
|
/**
|
|
14
43
|
* What a browser view socket sends as JSON text; the pictures travel as binary messages, each starting with one of
|
|
15
44
|
* [`BROWSER_FRAME_TAGS`].
|
|
16
45
|
*/
|
|
17
|
-
export type BrowserViewServerMessage = { "type": "ready", kind: PictureKind, width: number, height: number, scale: number, codec?: string, } | { "type": "state", session: unknown, } | { "type": "cursor", cursor: string, } | { "type": "select", menu: SelectMenu | null, } | { "type": "selection", text: string, } | { "type": "gone", pageId: string, } | { "type": "pong" } | { "type": "error", message: string, } | { "type": "saved" }
|
|
46
|
+
export type BrowserViewServerMessage = { "type": "ready", kind: PictureKind, width: number, height: number, scale: number, codec?: string, } | { "type": "state", session: unknown, } | { "type": "cursor", cursor: string, } | { "type": "select", menu: SelectMenu | null, } | { "type": "selection", text: string, } | { "type": "gone", pageId: string, } | { "type": "pong" } | { "type": "error", message: string, } | { "type": "saved" } | { "type": "media", path: string, token: string,
|
|
47
|
+
/**
|
|
48
|
+
* When the token stops being accepted for a new connection, in milliseconds since the epoch. A socket already
|
|
49
|
+
* open is not closed by it. A JSON number: milliseconds since the epoch stay far inside a double's exact range.
|
|
50
|
+
*/
|
|
51
|
+
expiresAt: number, };
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* What a clipboard holds, either way across a media socket: plain text, HTML, and a PNG (base64), any of them absent.
|
|
55
|
+
*/
|
|
56
|
+
export type ClipboardContent = { text?: string, html?: string, png?: string, };
|
|
18
57
|
|
|
19
58
|
/**
|
|
20
59
|
* The edge's verdicts, the only values [`VERDICT_HEADER`] carries.
|
|
@@ -27,6 +66,26 @@ export type EdgeVerdict = "no-tunnel" | "unknown-sandbox" | "dropped";
|
|
|
27
66
|
*/
|
|
28
67
|
export type EmulatedDevice = { width: number, height: number, mobile: boolean, userAgent?: string, };
|
|
29
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Whether a key event presses, releases, or does both.
|
|
71
|
+
*/
|
|
72
|
+
export type KeyAction = "down" | "up" | "press";
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The sound a media socket carries, when it carries any.
|
|
76
|
+
*/
|
|
77
|
+
export type MediaAudio = {
|
|
78
|
+
/**
|
|
79
|
+
* The WebCodecs codec string, `opus`.
|
|
80
|
+
*/
|
|
81
|
+
codec: string, sampleRate: number, channels: number, };
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The pointer's look over the picture: a CSS keyword, or the X server's own cursor image (a native menu's, a resize
|
|
85
|
+
* edge's), a PNG in base64 with its hotspot, in picture pixels.
|
|
86
|
+
*/
|
|
87
|
+
export type MediaCursor = { css?: string, png?: string, hotX?: number, hotY?: number, };
|
|
88
|
+
|
|
30
89
|
/**
|
|
31
90
|
* Where netd's control link to Node stands.
|
|
32
91
|
*/
|
|
@@ -91,7 +150,7 @@ export type SelectMenu = { options: Array<SelectEntry>, selected: number, rect:
|
|
|
91
150
|
/**
|
|
92
151
|
* What the browser sends on a terminal socket, each a JSON text message.
|
|
93
152
|
*/
|
|
94
|
-
export type TerminalClientMessage = { "type": "input", data: string, } | { "type": "resize", cols: number, rows: number, } | { "type": "away" } | { "type": "ping" };
|
|
153
|
+
export type TerminalClientMessage = { "type": "input", data: string, } | { "type": "resize", cols: number, rows: number, } | { "type": "away" } | { "type": "ping" } | { "type": "token", token: string, };
|
|
95
154
|
|
|
96
155
|
/**
|
|
97
156
|
* What a terminal socket sends as JSON text; the pane's own bytes travel as binary messages.
|
|
@@ -693,6 +693,44 @@
|
|
|
693
693
|
"dir"
|
|
694
694
|
],
|
|
695
695
|
"type": "object"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"description": "Lets a connected computer's `intentic-remoted` hold an uplink (browser-wire's `DEVICE_UPLINK_PATH`) for\n`device`, presenting the token whose SHA-256 is `token_sha256` (lowercase hex of the token's UTF-8 bytes). A\nregistration replaces the device's earlier one, and an uplink that presented the earlier token is closed; the same\ntoken again changes nothing (2026-11-20). Send only to a netd that told `DeviceUplinks`: an older one closes the\nlink on a kind it does not know.",
|
|
699
|
+
"properties": {
|
|
700
|
+
"device": {
|
|
701
|
+
"type": "string"
|
|
702
|
+
},
|
|
703
|
+
"kind": {
|
|
704
|
+
"const": "deviceUplink",
|
|
705
|
+
"type": "string"
|
|
706
|
+
},
|
|
707
|
+
"tokenSha256": {
|
|
708
|
+
"type": "string"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"required": [
|
|
712
|
+
"kind",
|
|
713
|
+
"device",
|
|
714
|
+
"tokenSha256"
|
|
715
|
+
],
|
|
716
|
+
"type": "object"
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"description": "Withdraws `device`'s registration: its uplink is closed with browser-wire's `DEVICE_UPLINK_WITHDRAWN`, its socket\nfor the daemon removed, and a later dial refused.",
|
|
720
|
+
"properties": {
|
|
721
|
+
"device": {
|
|
722
|
+
"type": "string"
|
|
723
|
+
},
|
|
724
|
+
"kind": {
|
|
725
|
+
"const": "deviceWithdraw",
|
|
726
|
+
"type": "string"
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
"required": [
|
|
730
|
+
"kind",
|
|
731
|
+
"device"
|
|
732
|
+
],
|
|
733
|
+
"type": "object"
|
|
696
734
|
}
|
|
697
735
|
],
|
|
698
736
|
"title": "FromNode"
|
|
@@ -704,6 +742,23 @@
|
|
|
704
742
|
],
|
|
705
743
|
"toNode": {
|
|
706
744
|
"$defs": {
|
|
745
|
+
"DeviceUplinkState": {
|
|
746
|
+
"description": "A registered device's uplink as netd holds it.",
|
|
747
|
+
"properties": {
|
|
748
|
+
"connected": {
|
|
749
|
+
"description": "Its remoted's uplink is up, and the daemon's socket for it (`<DEVICE_SOCKET_DIR>/<device>.sock`) answers.",
|
|
750
|
+
"type": "boolean"
|
|
751
|
+
},
|
|
752
|
+
"device": {
|
|
753
|
+
"type": "string"
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
"required": [
|
|
757
|
+
"device",
|
|
758
|
+
"connected"
|
|
759
|
+
],
|
|
760
|
+
"type": "object"
|
|
761
|
+
},
|
|
707
762
|
"NetdAnswer": {
|
|
708
763
|
"oneOf": [
|
|
709
764
|
{
|
|
@@ -967,6 +1022,26 @@
|
|
|
967
1022
|
"value"
|
|
968
1023
|
],
|
|
969
1024
|
"type": "object"
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
"description": "Every device registered with `FromNode::DeviceUplink` and whether its uplink is up, told whole on every change\nand again to each Node that says hello (2026-11-20). Registrations outlive a Node restart, as terminals and media\nsockets do, so a Node hearing this after its hello learns what an earlier one left registered. It is also how a\nNode knows this netd carries device uplinks at all: an older netd never tells it, and a Node sends no\nregistration to a netd that has not. An older Node ignores it.",
|
|
1028
|
+
"properties": {
|
|
1029
|
+
"kind": {
|
|
1030
|
+
"const": "deviceUplinks",
|
|
1031
|
+
"type": "string"
|
|
1032
|
+
},
|
|
1033
|
+
"uplinks": {
|
|
1034
|
+
"items": {
|
|
1035
|
+
"$ref": "#/$defs/DeviceUplinkState"
|
|
1036
|
+
},
|
|
1037
|
+
"type": "array"
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
"required": [
|
|
1041
|
+
"kind",
|
|
1042
|
+
"uplinks"
|
|
1043
|
+
],
|
|
1044
|
+
"type": "object"
|
|
970
1045
|
}
|
|
971
1046
|
],
|
|
972
1047
|
"title": "ToNode"
|
|
@@ -11,6 +11,15 @@ member?: string, } | { "answer": "pong" };
|
|
|
11
11
|
*/
|
|
12
12
|
export type Certificate = { certificate: string, privateKey: string, };
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* A registered device's uplink as netd holds it.
|
|
16
|
+
*/
|
|
17
|
+
export type DeviceUplinkState = { device: string,
|
|
18
|
+
/**
|
|
19
|
+
* Its remoted's uplink is up, and the daemon's socket for it (`<DEVICE_SOCKET_DIR>/<device>.sock`) answers.
|
|
20
|
+
*/
|
|
21
|
+
connected: boolean, };
|
|
22
|
+
|
|
14
23
|
export type Endpoint = { host: string, port: number, };
|
|
15
24
|
|
|
16
25
|
/**
|
|
@@ -22,7 +31,7 @@ export type FromNode = { "kind": "hello", build: string, pid: number, generation
|
|
|
22
31
|
* run it (2026-11-11). netd dials nothing until Node sends a tunnel again, and tells Node `Superseded` rather than
|
|
23
32
|
* a plain "off". A netd older than it reads the frame as a bare stand-down, which stops dialling all the same.
|
|
24
33
|
*/
|
|
25
|
-
superseded?: string, } | { "kind": "ask", id: number, question: NetdQuestion, } | { "kind": "answer", id: number, answer: Answer, } | { "kind": "refused", id: number, message: string, } | { "kind": "revoke", member?: string, } | { "kind": "watch", checkout: WatchedCheckout, } | { "kind": "unwatch", dir: string, };
|
|
34
|
+
superseded?: string, } | { "kind": "ask", id: number, question: NetdQuestion, } | { "kind": "answer", id: number, answer: Answer, } | { "kind": "refused", id: number, message: string, } | { "kind": "revoke", member?: string, } | { "kind": "watch", checkout: WatchedCheckout, } | { "kind": "unwatch", dir: string, } | { "kind": "deviceUplink", device: string, tokenSha256: string, } | { "kind": "deviceWithdraw", device: string, };
|
|
26
35
|
|
|
27
36
|
/**
|
|
28
37
|
* Every port netd binds, as Node's config names them; an absent one is not bound.
|
|
@@ -114,7 +123,7 @@ export type TerminalPlan = { "plan": "session", name: string, createIn?: string,
|
|
|
114
123
|
/**
|
|
115
124
|
* Everything netd sends Node.
|
|
116
125
|
*/
|
|
117
|
-
export type ToNode = { "kind": "ask", id: number, question: Question, } | { "kind": "answer", id: number, answer: NetdAnswer, } | { "kind": "refused", id: number, message: string, } | { "kind": "tunnel", connected: boolean, reason?: string, refused?: TunnelRefusal, } | { "kind": "hiddenLine", session: string, prompt: string, value: string, };
|
|
126
|
+
export type ToNode = { "kind": "ask", id: number, question: Question, } | { "kind": "answer", id: number, answer: NetdAnswer, } | { "kind": "refused", id: number, message: string, } | { "kind": "tunnel", connected: boolean, reason?: string, refused?: TunnelRefusal, } | { "kind": "hiddenLine", session: string, prompt: string, value: string, } | { "kind": "deviceUplinks", uplinks: Array<DeviceUplinkState>, };
|
|
118
127
|
|
|
119
128
|
/**
|
|
120
129
|
* The ingress tunnel's door, the reachability grant it presents there, and the daemon's transfer routes it announces
|
|
@@ -2,7 +2,30 @@ import { readFileSync } from "node:fs";
|
|
|
2
2
|
import { EDGE_VERDICT_HEADER, edgeVerdictOf } from "../protocol/edge-verdict.js";
|
|
3
3
|
import { INGRESS_GRANT_HEADER, INGRESS_TUNNEL_PATH } from "../protocol/ingress-contract.js";
|
|
4
4
|
import { VITALS_FILE, VITALS_PATH } from "../protocol/vitals.js";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
BROWSER_FRAME_TAGS,
|
|
7
|
+
BROWSER_MEDIA_PATH,
|
|
8
|
+
BROWSER_MEDIA_SOCKET_DIR,
|
|
9
|
+
BROWSER_VIEW_PATH,
|
|
10
|
+
DEVICE_HEADER,
|
|
11
|
+
DEVICE_MEDIA_PATH,
|
|
12
|
+
DEVICE_SOCKET_DIR,
|
|
13
|
+
DEVICE_TERMINAL_PATH,
|
|
14
|
+
DEVICE_UPLINK_CLOSE_CODES,
|
|
15
|
+
DEVICE_UPLINK_PATH,
|
|
16
|
+
EDGE_TRANSPORTS,
|
|
17
|
+
MEDIA_CLIP_LEN,
|
|
18
|
+
MEDIA_CLOSE_CODES,
|
|
19
|
+
MEDIA_FLAGS,
|
|
20
|
+
MEDIA_HEADER_LEN,
|
|
21
|
+
MEDIA_KINDS,
|
|
22
|
+
MEDIA_LOSSLESS_QUERY,
|
|
23
|
+
MEDIA_TOKEN_GRACE_SECONDS,
|
|
24
|
+
RTC_CHANNELS,
|
|
25
|
+
RTC_MESSAGE_MAX,
|
|
26
|
+
TERMINAL_PATH,
|
|
27
|
+
WEBTRANSPORT_PATH,
|
|
28
|
+
} from "./browser-wire.js";
|
|
6
29
|
import {
|
|
7
30
|
ASK_PATIENCE_MS,
|
|
8
31
|
FRAME_LENGTH_BYTES,
|
|
@@ -31,6 +54,27 @@ const socket = manifest("netd-wire") as {
|
|
|
31
54
|
};
|
|
32
55
|
const browser = manifest("browser-wire") as {
|
|
33
56
|
browserView: { path: string; frameTags: Record<string, number> };
|
|
57
|
+
browserMedia: {
|
|
58
|
+
path: string;
|
|
59
|
+
socketDir: string;
|
|
60
|
+
headerLen: number;
|
|
61
|
+
kinds: Record<string, number>;
|
|
62
|
+
flags: Record<string, number>;
|
|
63
|
+
clipLen: number;
|
|
64
|
+
losslessQuery: string;
|
|
65
|
+
rtcChannels: Record<string, { ordered: boolean; maxRetransmits: number | null }>;
|
|
66
|
+
rtcMessageMax: number;
|
|
67
|
+
tokenGraceSeconds: number;
|
|
68
|
+
closeCodes: Record<string, number>;
|
|
69
|
+
};
|
|
70
|
+
device: {
|
|
71
|
+
mediaPath: string;
|
|
72
|
+
terminalPath: string;
|
|
73
|
+
uplinkPath: string;
|
|
74
|
+
header: string;
|
|
75
|
+
socketDir: string;
|
|
76
|
+
closeCodes: Record<string, number>;
|
|
77
|
+
};
|
|
34
78
|
edge: { verdictHeader: string; verdicts: { oneOf: { const: string }[] } };
|
|
35
79
|
terminal: { path: string; upgrade: string };
|
|
36
80
|
vitals: { path: string; file: string; body: { $defs: { NodeLink: { oneOf: { const: string }[] } } } };
|
|
@@ -86,6 +130,37 @@ describe("the wire outside oRPC, as the Rust crates define it", () => {
|
|
|
86
130
|
expect<Record<string, number>>(BROWSER_FRAME_TAGS).toEqual(browser.browserView.frameTags);
|
|
87
131
|
});
|
|
88
132
|
|
|
133
|
+
it("opens a window's media socket where browser-wire says, and reads its header as it lays it out", () => {
|
|
134
|
+
expect(BROWSER_MEDIA_PATH).toBe(browser.browserMedia.path);
|
|
135
|
+
expect(BROWSER_MEDIA_SOCKET_DIR).toBe(browser.browserMedia.socketDir);
|
|
136
|
+
expect(MEDIA_HEADER_LEN).toBe(browser.browserMedia.headerLen);
|
|
137
|
+
expect<Record<string, number>>(MEDIA_KINDS).toEqual(browser.browserMedia.kinds);
|
|
138
|
+
expect<Record<string, number>>(MEDIA_FLAGS).toEqual(browser.browserMedia.flags);
|
|
139
|
+
expect(MEDIA_CLIP_LEN).toBe(browser.browserMedia.clipLen);
|
|
140
|
+
expect(MEDIA_LOSSLESS_QUERY).toBe(browser.browserMedia.losslessQuery);
|
|
141
|
+
expect(MEDIA_TOKEN_GRACE_SECONDS).toBe(browser.browserMedia.tokenGraceSeconds);
|
|
142
|
+
expect<Record<string, number>>(MEDIA_CLOSE_CODES).toEqual(browser.browserMedia.closeCodes);
|
|
143
|
+
expect<Record<string, { ordered: boolean; maxRetransmits: number | null }>>(RTC_CHANNELS).toEqual(browser.browserMedia.rtcChannels);
|
|
144
|
+
expect(RTC_MESSAGE_MAX).toBe(browser.browserMedia.rtcMessageMax);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it("opens a connected computer's screen, terminal and uplink where browser-wire says", () => {
|
|
148
|
+
expect({
|
|
149
|
+
media: DEVICE_MEDIA_PATH,
|
|
150
|
+
terminal: DEVICE_TERMINAL_PATH,
|
|
151
|
+
uplink: DEVICE_UPLINK_PATH,
|
|
152
|
+
header: DEVICE_HEADER,
|
|
153
|
+
socketDir: DEVICE_SOCKET_DIR,
|
|
154
|
+
}).toEqual({
|
|
155
|
+
media: browser.device.mediaPath,
|
|
156
|
+
terminal: browser.device.terminalPath,
|
|
157
|
+
uplink: browser.device.uplinkPath,
|
|
158
|
+
header: browser.device.header,
|
|
159
|
+
socketDir: browser.device.socketDir,
|
|
160
|
+
});
|
|
161
|
+
expect<Record<string, number>>(DEVICE_UPLINK_CLOSE_CODES).toEqual(browser.device.closeCodes);
|
|
162
|
+
});
|
|
163
|
+
|
|
89
164
|
it("finds netd's vitals where browser-wire says it answers them, in the states it names", () => {
|
|
90
165
|
expect(VITALS_PATH).toBe(browser.vitals.path);
|
|
91
166
|
expect(VITALS_FILE).toBe(browser.vitals.file);
|
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
"POST /workspace/upload",
|
|
55
55
|
"POST /workspace/upload-archive",
|
|
56
56
|
"GET /system/sync/ssh",
|
|
57
|
+
"POST /browser/uploads",
|
|
58
|
+
"GET /browser/downloads/file",
|
|
57
59
|
"GET /bundles/download",
|
|
58
60
|
"GET /extensions/{id}/bundle",
|
|
59
61
|
"POST /system/webext/media",
|
|
@@ -67,6 +69,8 @@
|
|
|
67
69
|
{ "host": "sandbox-abcdef012345.sbx.example.test", "method": "GET", "path": "/workspace/download?ticket=t", "lane": "bulk" },
|
|
68
70
|
{ "host": "sandbox-abcdef012345.sbx.example.test", "method": "GET", "path": "/agents/c1/documents/raw?path=letter.odt", "lane": "bulk" },
|
|
69
71
|
{ "host": "sandbox-abcdef012345.sbx.example.test", "method": "POST", "path": "/workspace/upload?path=a", "lane": "bulk" },
|
|
72
|
+
{ "host": "sandbox-abcdef012345.sbx.example.test", "method": "POST", "path": "/browser/uploads", "lane": "bulk" },
|
|
73
|
+
{ "host": "sandbox-abcdef012345.sbx.example.test", "method": "GET", "path": "/browser/downloads/file?id=d1", "lane": "bulk" },
|
|
70
74
|
{ "host": "sandbox-abcdef012345.sbx.example.test:443", "method": "GET", "path": "/system/runners/git/app/info/refs?service=git-upload-pack", "lane": "bulk" },
|
|
71
75
|
{ "host": "sandbox-abcdef012345.sbx.example.test", "method": "POST", "path": "/system/runners/git/app/git-receive-pack", "lane": "bulk" },
|
|
72
76
|
{ "host": "sandbox-abcdef012345.sbx.example.test", "method": "GET", "path": "/system/sync/ssh", "lane": "bulk" },
|
|
@@ -249,6 +249,9 @@ export const RAW_JSON_ROUTES = {
|
|
|
249
249
|
// A dropped tree as one tar, extracted entry by entry.
|
|
250
250
|
"POST /workspace/upload-archive": { bytes: true, output: OkSchema },
|
|
251
251
|
"POST /workspace/upload-diff": { input: UploadManifestSchema, output: UploadSkipSchema },
|
|
252
|
+
// One file for a page's file chooser or a drop (`?id=` the uploader's, `&name=` the file's own), in parts like a
|
|
253
|
+
// workspace upload; answered by browser.answerFileChooser or browser.dropFiles naming the id.
|
|
254
|
+
"POST /browser/uploads": { bytes: true, output: OkSchema },
|
|
252
255
|
} as const satisfies Partial<Record<RawRouteKey, RawJsonRoute>>;
|
|
253
256
|
|
|
254
257
|
export type RawJsonRouteKey = keyof typeof RAW_JSON_ROUTES;
|
|
@@ -64,6 +64,17 @@ export const RAW_ROUTES = {
|
|
|
64
64
|
"GET /system/sync/ssh": { sync: "pipe", control: "never", lane: "bulk" },
|
|
65
65
|
"GET /system/browser-profile": { auth: "door", beforeBoot: true, control: "never" },
|
|
66
66
|
"GET /system/browser-view": { auth: "door", beforeBoot: true, control: "never" },
|
|
67
|
+
// A file the person picked for a page's file chooser, or dropped on one (browser/uploads): operating the window,
|
|
68
|
+
// like the view's own socket, so the maintainer's. Into a temp folder the daemon cleans, never the workspace.
|
|
69
|
+
"POST /browser/uploads": { floor: "maintainer", control: "never", lane: "bulk" },
|
|
70
|
+
// A finished browser download, saved by the person's own browser: navigated to, so no header, and its ticket
|
|
71
|
+
// (browser.downloadTicket, minted at maintainer) is checked in the handler.
|
|
72
|
+
"GET /browser/downloads/file": { auth: "door", control: "never", lane: "bulk" },
|
|
73
|
+
// Chromium's own DevTools for one page, framed by the editor: the frontend's files and the page's DevTools socket,
|
|
74
|
+
// proxied from the window's debugging port. A frame and its socket send no header, so the ticket is the path's first
|
|
75
|
+
// segment (browser.devtools, minted at maintainer), checked in the handler. The socket first: it is the narrower.
|
|
76
|
+
"GET /browser/devtools/{ticket}/ws/{kind}/{target}": { auth: "door", control: "never" },
|
|
77
|
+
"GET /browser/devtools/{ticket}/*": { auth: "door", control: "never" },
|
|
67
78
|
// The sandbox's own desktop, watched and driven by the owner (desktop/desktop-view.ts); the same query ticket.
|
|
68
79
|
"GET /system/desktop-view": { auth: "door", beforeBoot: true, control: "never" },
|
|
69
80
|
// An event automation's webhook, gated by the automation's own token.
|
package/src/schemas/agent.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { MENTION_LIMIT } from "../text/mentions.js";
|
|
|
9
9
|
import { entryId } from "./internal.js";
|
|
10
10
|
import { FRESH_OF_DESCRIPTION, FreshOfSchema, FROM_BRANCH_DESCRIPTION, freshOfIssues, fromBranchIssues } from "./conversation-links.js";
|
|
11
11
|
import { RepoBranchSchema } from "./shared.js";
|
|
12
|
+
import { QueuedTrialRetrySchema } from "./queued-trial-retry.js";
|
|
12
13
|
// Agent runtimes the daemon can serve: native providers have dedicated adapters, `endpoint/<id>` names an installed
|
|
13
14
|
// endpoint capability, anything else is an ACP agent capability id. A bare string, not an enum, so an unknown id is a
|
|
14
15
|
// clean error, not a contract change.
|
|
@@ -507,10 +508,7 @@ export type MessageVoice = z.infer<typeof MessageVoiceSchema>;
|
|
|
507
508
|
// cannot say once the chat has moved somewhere with room.
|
|
508
509
|
export const QueuedReopenSchema = z.object({
|
|
509
510
|
agent: AgentProviderSchema.describe("The provider whose allowance it waits out."),
|
|
510
|
-
account: z
|
|
511
|
-
.string()
|
|
512
|
-
.optional()
|
|
513
|
-
.describe("Which of its accounts. Absent when none was named, and every account of the provider read spent."),
|
|
511
|
+
account: z.string().optional().describe("Which of its accounts. Absent when none was named, and every account of the provider read spent."),
|
|
514
512
|
});
|
|
515
513
|
export type QueuedReopen = z.infer<typeof QueuedReopenSchema>;
|
|
516
514
|
// Who a person's waiting message goes on, as its request names it now.
|
|
@@ -550,6 +548,7 @@ export const QueuedMessageSchema = z.object({
|
|
|
550
548
|
reopenOf: QueuedReopenSchema.optional().describe(
|
|
551
549
|
"The allowance this message's `until` waits out: it was booked for that account's reopen, by the composer or by the sandbox holding words it would not send into a spent allowance, rather than for a time somebody chose. Absent on any other booking, and from sandboxes older than the field.",
|
|
552
550
|
),
|
|
551
|
+
trialRetry: QueuedTrialRetrySchema.optional(),
|
|
553
552
|
serves: QueuedServingSchema.optional().describe(
|
|
554
553
|
"Who serves the turn this message starts: the provider, loop, model, effort and account it was sent under, or was moved to since (`agent.queueReroute`, an account switch). Only on a person's words; the sandbox's and an agent's own go on wherever the conversation runs when they go. Absent from sandboxes older than the field.",
|
|
555
554
|
),
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// bookmarks: the pages a browser profile keeps on purpose, in folders, in the order the person put them. One tree per
|
|
2
|
+
// profile, like the history beside it (schemas/browsing.ts); the person's own window's is `_own`.
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { BrowsingProfileSchema } from "./browsing.js";
|
|
5
|
+
|
|
6
|
+
// The two folders every tree has and nobody removes: the bar under the toolbar, and everything else.
|
|
7
|
+
export const BOOKMARK_ROOTS = ["bar", "other"] as const;
|
|
8
|
+
export type BookmarkRoot = (typeof BOOKMARK_ROOTS)[number];
|
|
9
|
+
|
|
10
|
+
// A site's icon as a tab carried it: a small picture in a data: URL, never an address to fetch.
|
|
11
|
+
const FaviconSchema = z
|
|
12
|
+
.string()
|
|
13
|
+
.max(64 * 1024)
|
|
14
|
+
.regex(/^data:image\//)
|
|
15
|
+
.describe("The site's icon as a data: URL, as the tab carried it when the page was kept.");
|
|
16
|
+
|
|
17
|
+
export const BookmarkNodeSchema = z.object({
|
|
18
|
+
id: z.string().describe("The bookmark's or folder's id, stable for its life: what editing, moving and removing take."),
|
|
19
|
+
kind: z.enum(["url", "folder"]).describe("A page, or a folder of them."),
|
|
20
|
+
title: z.string().describe("What it is called: a page's title as kept or renamed, or the folder's name."),
|
|
21
|
+
url: z.string().optional().describe("Where a page bookmark goes. Absent for a folder."),
|
|
22
|
+
parent: z.string().optional().describe("The folder it is in. Absent only for the two roots, `bar` and `other`."),
|
|
23
|
+
added: z.number().describe("When it was added, in milliseconds."),
|
|
24
|
+
favicon: FaviconSchema.optional(),
|
|
25
|
+
});
|
|
26
|
+
export type BookmarkNode = z.infer<typeof BookmarkNodeSchema>;
|
|
27
|
+
|
|
28
|
+
export const BookmarksQuerySchema = z.object({ profile: BrowsingProfileSchema });
|
|
29
|
+
export type BookmarksQuery = z.infer<typeof BookmarksQuerySchema>;
|
|
30
|
+
|
|
31
|
+
export const BookmarksSchema = z.object({
|
|
32
|
+
profile: z.string().describe("Whose bookmarks these are."),
|
|
33
|
+
nodes: z
|
|
34
|
+
.array(BookmarkNodeSchema)
|
|
35
|
+
.describe("Every folder and bookmark, the two roots first, each folder's contents in their order after it (depth first)."),
|
|
36
|
+
});
|
|
37
|
+
export type Bookmarks = z.infer<typeof BookmarksSchema>;
|
|
38
|
+
|
|
39
|
+
const TitleSchema = z.string().max(500);
|
|
40
|
+
const UrlSchema = z.string().min(1).max(4096);
|
|
41
|
+
|
|
42
|
+
export const BookmarkAddSchema = z.object({
|
|
43
|
+
profile: BrowsingProfileSchema,
|
|
44
|
+
kind: z.enum(["url", "folder"]).describe("A page, or a new folder."),
|
|
45
|
+
title: TitleSchema.describe("Its name: the page's title for a page, or the new folder's."),
|
|
46
|
+
url: UrlSchema.optional().describe("The page's address; required for a page, ignored for a folder."),
|
|
47
|
+
parent: z.string().optional().describe("The folder to put it in. Absent puts it on the bookmarks bar."),
|
|
48
|
+
index: z.number().int().nonnegative().optional().describe("Where in that folder, counting from 0. Absent puts it last."),
|
|
49
|
+
favicon: FaviconSchema.optional(),
|
|
50
|
+
});
|
|
51
|
+
export type BookmarkAdd = z.infer<typeof BookmarkAddSchema>;
|
|
52
|
+
|
|
53
|
+
export const BookmarkEditSchema = z.object({
|
|
54
|
+
profile: BrowsingProfileSchema,
|
|
55
|
+
id: z.string().describe("Which bookmark or folder."),
|
|
56
|
+
title: TitleSchema.optional().describe("Its new name. Absent keeps it."),
|
|
57
|
+
url: UrlSchema.optional().describe("A page's new address. Absent keeps it; ignored for a folder."),
|
|
58
|
+
parent: z.string().optional().describe("A folder to move it into, at the end. Absent keeps it where it is."),
|
|
59
|
+
});
|
|
60
|
+
export type BookmarkEdit = z.infer<typeof BookmarkEditSchema>;
|
|
61
|
+
|
|
62
|
+
export const BookmarkMoveSchema = z.object({
|
|
63
|
+
profile: BrowsingProfileSchema,
|
|
64
|
+
id: z.string().describe("Which bookmark or folder."),
|
|
65
|
+
parent: z.string().describe("The folder it goes into, which may be the one it is in."),
|
|
66
|
+
index: z.number().int().nonnegative().describe("Its place there, counting from 0, among what the folder holds without it."),
|
|
67
|
+
});
|
|
68
|
+
export type BookmarkMove = z.infer<typeof BookmarkMoveSchema>;
|
|
69
|
+
|
|
70
|
+
export const BookmarkRemoveSchema = z.object({
|
|
71
|
+
profile: BrowsingProfileSchema,
|
|
72
|
+
id: z.string().describe("Which bookmark, or which folder: a folder goes with everything in it."),
|
|
73
|
+
});
|
|
74
|
+
export type BookmarkRemove = z.infer<typeof BookmarkRemoveSchema>;
|
|
75
|
+
|
|
76
|
+
export const BookmarkChangedSchema = z.object({
|
|
77
|
+
node: BookmarkNodeSchema.optional().describe("The bookmark or folder as it now stands. Absent after a removal."),
|
|
78
|
+
});
|
|
79
|
+
export type BookmarkChanged = z.infer<typeof BookmarkChangedSchema>;
|