@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
|
@@ -123,8 +123,16 @@ export const LoginCompletedSchema = z.object({
|
|
|
123
123
|
});
|
|
124
124
|
// One attempt's standing, for a card to watch the attempt itself rather than the account list: a list that already
|
|
125
125
|
// held an account says nothing about whether this sign-in, adding another, has landed.
|
|
126
|
+
// Who is still watching for where the browser lands, re-read on every status: a device whose link dropped, or whose
|
|
127
|
+
// agent restarted, stops listening, and a card still promising "finishes by itself" would wait on nobody.
|
|
128
|
+
const LiveCatchersSchema = z
|
|
129
|
+
.array(SignInCatcherSchema)
|
|
130
|
+
.optional()
|
|
131
|
+
.describe(
|
|
132
|
+
"Who is still watching for where the browser lands, for an attempt that started with somebody watching. Empty means every watcher has gone (a device disconnected, a browser closed): the sign-in will not finish by itself any more, and the address the browser landed on has to be handed back. Absent for an attempt nobody watched.",
|
|
133
|
+
);
|
|
126
134
|
export const LoginStatusSchema = z.discriminatedUnion("status", [
|
|
127
|
-
z.object({ status: z.literal("wait") }),
|
|
135
|
+
z.object({ status: z.literal("wait"), catchers: LiveCatchersSchema }),
|
|
128
136
|
z.object({
|
|
129
137
|
status: z.literal("ok"),
|
|
130
138
|
account: OauthAccountSchema.optional().describe("The account it connected. Absent where the row lands in the account list a little later."),
|
|
@@ -154,7 +162,7 @@ export const TranslatorStartSchema = z.object({
|
|
|
154
162
|
),
|
|
155
163
|
});
|
|
156
164
|
export const TranslatorStatusSchema = z.discriminatedUnion("status", [
|
|
157
|
-
z.object({ status: z.literal("wait") }),
|
|
165
|
+
z.object({ status: z.literal("wait"), catchers: LiveCatchersSchema }),
|
|
158
166
|
z.object({ status: z.literal("ok") }),
|
|
159
167
|
z.object({ status: z.literal("error"), error: z.string().min(1) }),
|
|
160
168
|
]);
|
|
@@ -5,28 +5,28 @@ import { type Switched, switchedLine, switchedNotice } from "./switched.js";
|
|
|
5
5
|
describe("switchedLine", () => {
|
|
6
6
|
it("names the provider, account or loop a fresh session started on", () => {
|
|
7
7
|
expect(switchedLine({ segment: "provider", provider: "codex", model: "gpt-5-codex", fresh: true })).toBe(
|
|
8
|
-
"Switched to Codex:
|
|
8
|
+
"Switched to Codex: fresh session, conversation carried over.",
|
|
9
9
|
);
|
|
10
10
|
expect(switchedLine({ segment: "account", provider: "claude", account: "Work", fresh: true })).toBe(
|
|
11
|
-
"Switched to the Work account:
|
|
11
|
+
"Switched to the Work account: fresh session, conversation carried over.",
|
|
12
12
|
);
|
|
13
13
|
expect(switchedLine({ segment: "loop", provider: "kimi", loop: "Claude Code", fresh: true })).toBe(
|
|
14
|
-
"Switched to running through Claude Code:
|
|
14
|
+
"Switched to running through Claude Code: fresh session, conversation carried over.",
|
|
15
15
|
);
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
it("says an account it has no name for as another of the provider's, never as the provider it was already on", () => {
|
|
19
19
|
expect(switchedLine({ segment: "account", provider: "claude", fresh: true })).toBe(
|
|
20
|
-
"Switched to another Claude account:
|
|
20
|
+
"Switched to another Claude account: fresh session, conversation carried over.",
|
|
21
21
|
);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
it("says a model switch kept the session, or that it opened a fresh one where there was none to keep", () => {
|
|
25
25
|
expect(switchedLine({ segment: "model", provider: "claude", model: "claude-sonnet-5", fresh: false })).toBe(
|
|
26
|
-
"Switched to Claude Sonnet 5: same session,
|
|
26
|
+
"Switched to Claude Sonnet 5: same session, re-read once.",
|
|
27
27
|
);
|
|
28
28
|
expect(switchedLine({ segment: "model", provider: "claude", model: "claude-sonnet-5", fresh: true })).toBe(
|
|
29
|
-
"Switched to Claude Sonnet 5:
|
|
29
|
+
"Switched to Claude Sonnet 5: fresh session, conversation carried over.",
|
|
30
30
|
);
|
|
31
31
|
});
|
|
32
32
|
});
|
|
@@ -68,5 +68,5 @@ const switchedTo = (event: Switched): string => {
|
|
|
68
68
|
/** The transcript's line for a turn that switched what it runs on, in the English the record keeps. */
|
|
69
69
|
export const switchedLine = (event: Switched): string =>
|
|
70
70
|
`${switchedTo(event)}: ${
|
|
71
|
-
event.fresh ? "
|
|
71
|
+
event.fresh ? "fresh session, conversation carried over." : "same session, re-read once."
|
|
72
72
|
}`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// A message the free trial turned away as busy, which the sandbox sends again by itself on a short bounded backoff
|
|
4
|
+
// (the daemon's trial-retry.ts): which try its booking is, of how many. A booking a person re-times, a pick that moves
|
|
5
|
+
// the words, or a message sent after them takes it off, and the words go (or wait) as that person said.
|
|
6
|
+
export const QueuedTrialRetrySchema = z
|
|
7
|
+
.object({
|
|
8
|
+
made: z.number().int().min(1).describe("Which automatic try this booking is, counting from 1."),
|
|
9
|
+
max: z.number().int().min(1).describe("How many automatic tries the sandbox makes before it leaves the message for a press."),
|
|
10
|
+
})
|
|
11
|
+
.describe(
|
|
12
|
+
"Says `until` is the sandbox sending this message again by itself after the free trial turned it away as busy, not a time somebody chose. Absent on any other booking, and from sandboxes older than the field.",
|
|
13
|
+
);
|
|
14
|
+
export type QueuedTrialRetry = z.infer<typeof QueuedTrialRetrySchema>;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type RemoteServiceResult, RemoteServiceResultSchema } from "./device-remote.js";
|
|
3
|
+
|
|
4
|
+
// A PERSON'S REMOTE SCREEN AND TERMINALS ON A CONNECTED COMPUTER (2026-11-20), the editor's `remote.*` procedures. The
|
|
5
|
+
// computer's `intentic-remoted` serves both; it dials the sandbox's netd (browser-wire's DEVICE_UPLINK_PATH), and netd
|
|
6
|
+
// carries each viewer's socket down that uplink, so neither a picture nor a keystroke crosses the daemon. The daemon
|
|
7
|
+
// decides who may, starts remoted through the machine agent on the first open, and mints the token each socket opens
|
|
8
|
+
// with, castd's format with `s` naming `media/<session>` or `terminal/<session>`. A screen's socket speaks the media
|
|
9
|
+
// socket's protocol and a terminal's the sandbox terminal's, at the `path` handed back with `?token=<token>` after it.
|
|
10
|
+
|
|
11
|
+
// `[A-Za-z0-9_-]{1,64}`: what netd lets through as a device's or a session's name on the viewer's path.
|
|
12
|
+
const SessionNameSchema = z.string().regex(/^[A-Za-z0-9_-]{1,64}$/, "letters, digits, dash and underscore, at most 64");
|
|
13
|
+
|
|
14
|
+
// Which computer: the connection key the device list addresses it by (`rog`, `rog::wsl:archlinux`).
|
|
15
|
+
const DeviceKeySchema = z.string().min(1).max(200).describe("The device's connection, as the device list names it: `rog`, or `rog::wsl:archlinux`.");
|
|
16
|
+
|
|
17
|
+
export const RemoteDeviceInputSchema = z.object({ device: DeviceKeySchema });
|
|
18
|
+
|
|
19
|
+
// Which of the computer's switches allow what, as the computer itself says (or its card, before remoted has run).
|
|
20
|
+
export const RemoteAccessAllowSchema = z.object({
|
|
21
|
+
// Watch the screen.
|
|
22
|
+
view: z.boolean(),
|
|
23
|
+
// Drive the pointer and keys.
|
|
24
|
+
control: z.boolean(),
|
|
25
|
+
// Open terminals.
|
|
26
|
+
terminal: z.boolean(),
|
|
27
|
+
});
|
|
28
|
+
export type RemoteAccessAllow = z.infer<typeof RemoteAccessAllowSchema>;
|
|
29
|
+
|
|
30
|
+
// One monitor of the computer, in its own desktop's pixels.
|
|
31
|
+
export const RemoteAccessMonitorSchema = z.object({
|
|
32
|
+
id: z.string(),
|
|
33
|
+
name: z.string(),
|
|
34
|
+
x: z.number(),
|
|
35
|
+
y: z.number(),
|
|
36
|
+
width: z.number(),
|
|
37
|
+
height: z.number(),
|
|
38
|
+
scale: z.number(),
|
|
39
|
+
primary: z.boolean(),
|
|
40
|
+
});
|
|
41
|
+
export type RemoteAccessMonitor = z.infer<typeof RemoteAccessMonitorSchema>;
|
|
42
|
+
|
|
43
|
+
// One terminal remoted holds, which any entitled viewer can attach to again while remoted runs.
|
|
44
|
+
export const RemoteTerminalSchema = z.object({
|
|
45
|
+
session: z.string(),
|
|
46
|
+
title: z.string(),
|
|
47
|
+
// The environment it runs in (`native`, `wsl:archlinux`).
|
|
48
|
+
environment: z.string(),
|
|
49
|
+
// When it was opened, in ms since the epoch.
|
|
50
|
+
createdAt: z.number(),
|
|
51
|
+
// Sockets attached to it now.
|
|
52
|
+
viewers: z.number(),
|
|
53
|
+
});
|
|
54
|
+
export type RemoteTerminal = z.infer<typeof RemoteTerminalSchema>;
|
|
55
|
+
|
|
56
|
+
export const RemoteStatusSchema = z.object({
|
|
57
|
+
// Whether a screen or a terminal can be opened now; `reason` says why not, in words for the person.
|
|
58
|
+
available: z.boolean(),
|
|
59
|
+
reason: z.string().optional(),
|
|
60
|
+
allow: RemoteAccessAllowSchema,
|
|
61
|
+
// Empty until remoted has run once since the device connected.
|
|
62
|
+
monitors: z.array(RemoteAccessMonitorSchema),
|
|
63
|
+
// The environments a terminal can open in.
|
|
64
|
+
environments: z.array(z.string()),
|
|
65
|
+
terminals: z.array(RemoteTerminalSchema),
|
|
66
|
+
});
|
|
67
|
+
export type RemoteStatus = z.infer<typeof RemoteStatusSchema>;
|
|
68
|
+
|
|
69
|
+
// A STUN (or TURN) server both ends of a screen's peer connection use, as RTCPeerConnection takes it.
|
|
70
|
+
export const RemoteIceServerSchema = z.object({
|
|
71
|
+
urls: z.array(z.string().min(1)).min(1),
|
|
72
|
+
username: z.string().optional(),
|
|
73
|
+
credential: z.string().optional(),
|
|
74
|
+
});
|
|
75
|
+
export type RemoteIceServer = z.infer<typeof RemoteIceServerSchema>;
|
|
76
|
+
|
|
77
|
+
// Cloudflare's public STUN: reflexive candidates for a direct path when the network allows one.
|
|
78
|
+
export const DEFAULT_REMOTE_ICE_SERVERS: readonly RemoteIceServer[] = [{ urls: ["stun:stun.cloudflare.com:3478"] }];
|
|
79
|
+
|
|
80
|
+
// The sandbox setting (`remoteIceServers`, settings.ts) naming the servers both ends of a screen's peer connection gather
|
|
81
|
+
// candidates from: the editor's and the computer's remoted. An empty list leaves only host candidates, a direct path only
|
|
82
|
+
// where the two share a network.
|
|
83
|
+
export const remoteIceServersSetting = z
|
|
84
|
+
.array(RemoteIceServerSchema)
|
|
85
|
+
.max(8)
|
|
86
|
+
.default(() => DEFAULT_REMOTE_ICE_SERVERS.map((server) => ({ ...server, urls: [...server.urls] })))
|
|
87
|
+
.describe(
|
|
88
|
+
"The STUN servers a remote screen on one of your computers uses to find a direct path between your browser and that computer, as RTCPeerConnection takes them (`urls`, and `username` and `credential` for a TURN server). Cloudflare's public STUN by default. Empty finds a direct path only when both are on the same network; otherwise the picture goes through the sandbox.",
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
export const RemoteOpenScreenInputSchema = RemoteDeviceInputSchema.extend({
|
|
92
|
+
// A monitor's id from `status`; absent, the primary one.
|
|
93
|
+
monitor: z.string().max(64).optional(),
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// A socket's token: what it opens with (`?token=`), and when it stops opening anything, in ms since the epoch. An open
|
|
97
|
+
// socket outlives it by the media grace; `refresh` hands a fresher one for the socket's `{type: "token"}` message.
|
|
98
|
+
export const RemoteTokenSchema = z.object({ token: z.string(), expiresAt: z.number() });
|
|
99
|
+
export type RemoteToken = z.infer<typeof RemoteTokenSchema>;
|
|
100
|
+
|
|
101
|
+
export const RemoteScreenSchema = RemoteTokenSchema.extend({
|
|
102
|
+
// `screen-<monitor id>`.
|
|
103
|
+
session: z.string(),
|
|
104
|
+
// Where the media socket opens on the sandbox's address: `/system/device-media/<device>/<session>`.
|
|
105
|
+
path: z.string(),
|
|
106
|
+
// A viewer who may watch and not drive: remoted ignores its input.
|
|
107
|
+
readOnly: z.boolean(),
|
|
108
|
+
iceServers: z.array(RemoteIceServerSchema),
|
|
109
|
+
});
|
|
110
|
+
export type RemoteScreen = z.infer<typeof RemoteScreenSchema>;
|
|
111
|
+
|
|
112
|
+
export const RemoteOpenTerminalInputSchema = RemoteDeviceInputSchema.extend({
|
|
113
|
+
// `native` or a distro (`wsl:archlinux`) from `status`; absent, remoted's own.
|
|
114
|
+
environment: z.string().max(200).optional(),
|
|
115
|
+
shell: z.string().max(400).optional(),
|
|
116
|
+
cwd: z.string().max(4000).optional(),
|
|
117
|
+
cols: z.number().int().min(1).max(1000),
|
|
118
|
+
rows: z.number().int().min(1).max(1000),
|
|
119
|
+
});
|
|
120
|
+
export type RemoteOpenTerminalInput = z.infer<typeof RemoteOpenTerminalInputSchema>;
|
|
121
|
+
|
|
122
|
+
export const RemoteSessionInputSchema = RemoteDeviceInputSchema.extend({ session: SessionNameSchema });
|
|
123
|
+
|
|
124
|
+
export const RemoteTerminalOpenedSchema = RemoteTokenSchema.extend({
|
|
125
|
+
// `t-<random>`.
|
|
126
|
+
session: z.string(),
|
|
127
|
+
// Where the terminal socket opens on the sandbox's address: `/system/device-terminal/<device>/<session>`.
|
|
128
|
+
path: z.string(),
|
|
129
|
+
});
|
|
130
|
+
export type RemoteTerminalOpened = z.infer<typeof RemoteTerminalOpenedSchema>;
|
|
131
|
+
|
|
132
|
+
// Windows' lock screen and administrator prompts (schemas/device-remote.ts has what the service is): the computer's own
|
|
133
|
+
// answer, passed on as it came. `remote.service` reads it; `remote.changeService` installs (or updates) or removes it
|
|
134
|
+
// through one UAC prompt on that computer, and answers the status read after it, with `declined` or `error` saying why
|
|
135
|
+
// nothing changed.
|
|
136
|
+
export const RemoteServiceSchema = RemoteServiceResultSchema;
|
|
137
|
+
export type RemoteService = RemoteServiceResult;
|
|
138
|
+
|
|
139
|
+
export const RemoteServiceChangeInputSchema = RemoteDeviceInputSchema.extend({ action: z.enum(["install", "uninstall"]) });
|
|
140
|
+
export type RemoteServiceChangeInput = z.infer<typeof RemoteServiceChangeInputSchema>;
|
package/src/schemas/seal.ts
CHANGED
|
@@ -67,7 +67,8 @@ export const SealAskSchema = SealPersonSchema.extend({ at: z.number() });
|
|
|
67
67
|
export type SealAsk = z.infer<typeof SealAskSchema>;
|
|
68
68
|
|
|
69
69
|
export const SEAL_OPEN_HOURS = 24;
|
|
70
|
-
|
|
70
|
+
// Any reason the owner writes will do: a minimum length only disabled the press on a short, honest one ("Help").
|
|
71
|
+
export const SEAL_REASON_MIN = 1;
|
|
71
72
|
export const SEAL_REASON_MAX = 500;
|
|
72
73
|
|
|
73
74
|
// An opening without asking. Kept on the conversation for good; no route removes one. `approvedBy` is the second
|
package/src/schemas/settings.ts
CHANGED
|
@@ -15,8 +15,10 @@ import { LimitHandoffSchema } from "./providers/handoff.js";
|
|
|
15
15
|
import { SessionsPlacementSchema } from "./offload.js";
|
|
16
16
|
import { LimitPolicySchema, MemoryKillPolicySchema, RetryPolicySchema, RoomPolicySchema } from "./turn-break.js";
|
|
17
17
|
import { ZoneSchema } from "../time/zone.js";
|
|
18
|
+
import { DEFAULT_SEARCH_ENGINE, RecordAgentBrowsingSchema, SearchEngineSchema } from "./browsing.js";
|
|
18
19
|
import { DEFAULT_SANDBOX_MODE, SandboxModeSchema } from "./sandbox-mode.js";
|
|
19
20
|
import { VoiceSettingsSchema } from "./voice.js";
|
|
21
|
+
import { remoteIceServersSetting } from "./remote-access.js";
|
|
20
22
|
import {
|
|
21
23
|
AiNoticeSchema,
|
|
22
24
|
AuditSettingsSchema,
|
|
@@ -468,6 +470,7 @@ export const SandboxSettingsSchema = z.object({
|
|
|
468
470
|
outagePolicy: RetryPolicySchema.default("wait").describe(
|
|
469
471
|
"What happens to a turn the model provider's own failure killed. `wait` holds it for a press. `retry` re-runs it on the shared per-provider breaker, backing off between attempts. The sandbox-wide default; any one conversation can say otherwise. Worth `retry` for a sandbox whose work mostly happens with nobody in the room.",
|
|
470
472
|
),
|
|
473
|
+
remoteIceServers: remoteIceServersSetting,
|
|
471
474
|
// A vendor loop's hard cap on one turn; half an hour ended two Gemini children mid-work as failures (2026-10-17).
|
|
472
475
|
turnCapMinutes: z.number().int().min(5).max(1440).default(30).describe(
|
|
473
476
|
"The longest one turn may run on a loop the sandbox drives itself (OpenCode, an ACP agent, Pi, Muse) before it is ended, in minutes, however busy it keeps. A subagent's turn that reaches it is carried on in a fresh turn of the same session rather than ended as a failure. The Claude Code and Codex loops have no such cap.",
|
|
@@ -636,6 +639,12 @@ export const SandboxSettingsSchema = z.object({
|
|
|
636
639
|
.describe(
|
|
637
640
|
"Let Intentic's product analytics (usage events and session recordings in the editor, for people who agreed to them) run while this sandbox is open. Off sends nothing about any visit to this sandbox, whatever each person agreed to.",
|
|
638
641
|
),
|
|
642
|
+
// searchEngine is the editor's (its address bar's searches, handed to the suggestion route on each call), and
|
|
643
|
+
// recordAgentBrowsing the daemon's browser routers' (browser/media/recordings.ts); both in schemas/browsing.ts.
|
|
644
|
+
searchEngine: SearchEngineSchema.default(DEFAULT_SEARCH_ENGINE).describe(
|
|
645
|
+
"Where the sandbox's browser sends what is typed into its address bar when it is not an address, and whose suggestions it shows while typing.",
|
|
646
|
+
),
|
|
647
|
+
recordAgentBrowsing: RecordAgentBrowsingSchema,
|
|
639
648
|
aiNotice: AiNoticeSchema.prefault({}).describe(
|
|
640
649
|
"A notice members confirm once, telling them they are working with an AI and what to check before relying on it.",
|
|
641
650
|
),
|
package/src/schemas/terminal.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { BrowserDownloadSchema, BrowserFileChooserSchema, BrowserPermissionAskSchema, BrowserRecordingSchema } from "./browser-tools.js";
|
|
2
3
|
// Every live surface the sandbox's one global panel can show: tmux sessions, plus the agent's browser (not a terminal,
|
|
3
4
|
// but the same question, what is running and can I look at it).
|
|
4
5
|
// shell: a session the user opened.
|
|
@@ -101,7 +102,27 @@ export const BrowserPageSchema = z.object({
|
|
|
101
102
|
// and before the first arrival, when the buttons stay as they were.
|
|
102
103
|
canGoBack: z.boolean().optional().describe("Its history has a page before this one to go back to."),
|
|
103
104
|
canGoForward: z.boolean().optional().describe("Its history has a page after this one to go forward to."),
|
|
105
|
+
// The site's icon, fetched by the sandbox through the window itself and sent inline, so the editor draws it without
|
|
106
|
+
// the person's own browser ever asking the site for anything. Absent from an older daemon.
|
|
107
|
+
favicon: z
|
|
108
|
+
.string()
|
|
109
|
+
.optional()
|
|
110
|
+
.describe(
|
|
111
|
+
"The page's icon as a small data: URL, fetched inside the sandbox so drawing it asks nothing of the site. Absent when the page has none, it has not loaded yet, or its icon was too large to send.",
|
|
112
|
+
),
|
|
113
|
+
// Read off Chromium's own tab state where the window can ask it (the person's own window); absent elsewhere.
|
|
114
|
+
audible: z.boolean().optional().describe("It is playing sound now. Absent where the window cannot tell, and from an older daemon."),
|
|
115
|
+
muted: z.boolean().optional().describe("Its sound is muted. Absent where the window cannot tell, and from an older daemon."),
|
|
104
116
|
});
|
|
117
|
+
// A tab closed in a window that is still open: what Reopen closed tab brings back, at the place it had.
|
|
118
|
+
export const BrowserClosedTabSchema = z.object({
|
|
119
|
+
id: z.string().describe("What the reopen route takes to bring this one back rather than the newest."),
|
|
120
|
+
url: z.string().describe("Where it was when it closed."),
|
|
121
|
+
title: z.string().optional().describe("Its title when it closed. Absent when it had none."),
|
|
122
|
+
favicon: z.string().optional().describe("Its icon when it closed, as the open tab carried it."),
|
|
123
|
+
closedAt: z.number().describe("When it closed, in milliseconds."),
|
|
124
|
+
});
|
|
125
|
+
export type BrowserClosedTab = z.infer<typeof BrowserClosedTabSchema>;
|
|
105
126
|
export const BrowserSessionSchema = z.object({
|
|
106
127
|
name: z.string().describe("Its id, and what the close route takes."),
|
|
107
128
|
// Rises on every change to the window, across daemon restarts too. The same window arrives two ways, in this list
|
|
@@ -144,9 +165,26 @@ export const BrowserSessionSchema = z.object({
|
|
|
144
165
|
})
|
|
145
166
|
.optional()
|
|
146
167
|
.describe("A dialog a page has open and is waiting on. You or the agent answers it; present only while it is open."),
|
|
168
|
+
// What the browser's own chrome would show and the picture never does (schemas/browser-tools.ts): the downloads of
|
|
169
|
+
// the window's profile, a file a page asked for, and a permission a site asked for. Each absent when there is none,
|
|
170
|
+
// and from an older daemon.
|
|
171
|
+
downloads: z
|
|
172
|
+
.array(BrowserDownloadSchema)
|
|
173
|
+
.optional()
|
|
174
|
+
.describe("This window's profile's recent downloads, newest first. Absent for a window whose downloads this browser does not keep."),
|
|
175
|
+
fileChooser: BrowserFileChooserSchema.optional().describe("A page asked for files and is waiting; present only while it is."),
|
|
176
|
+
permissionAsk: BrowserPermissionAskSchema.optional().describe("A site asked for a permission and is waiting on the answer; present only while it is."),
|
|
177
|
+
recording: BrowserRecordingSchema.optional().describe("The window's picture is being recorded; present only while it is."),
|
|
147
178
|
pages: z
|
|
148
179
|
.array(BrowserPageSchema)
|
|
149
|
-
.describe(
|
|
180
|
+
.describe(
|
|
181
|
+
"Every page it has open, in the order its tab strip shows them. A browser holds several at once, which is the reason it is listed apart from the terminals.",
|
|
182
|
+
),
|
|
183
|
+
// Kept by the daemon per window while it runs, newest first and capped; absent when none, and from an older daemon.
|
|
184
|
+
closed: z
|
|
185
|
+
.array(BrowserClosedTabSchema)
|
|
186
|
+
.optional()
|
|
187
|
+
.describe("Tabs closed in this window while it ran, newest first: what Reopen closed tab brings back. Absent when there are none."),
|
|
150
188
|
// Opened from the browser view by the person, not by an agent's tool; absent on an agent's and from an older daemon.
|
|
151
189
|
own: z
|
|
152
190
|
.boolean()
|
|
@@ -180,6 +218,26 @@ export const OpenBrowserResultSchema = z.object({
|
|
|
180
218
|
pageId: z.string().optional().describe("The tab it opened, once the window has it. Absent when the tab had not appeared in time."),
|
|
181
219
|
});
|
|
182
220
|
export type OpenBrowserResult = z.infer<typeof OpenBrowserResultSchema>;
|
|
221
|
+
export const ReopenBrowserPageInputSchema = z.object({
|
|
222
|
+
name: z.string().describe("Which browser."),
|
|
223
|
+
closedId: z.string().optional().describe("Which closed tab, from the window's `closed` list. Absent brings back the one closed last."),
|
|
224
|
+
});
|
|
225
|
+
export type ReopenBrowserPageInput = z.infer<typeof ReopenBrowserPageInputSchema>;
|
|
226
|
+
export const MoveBrowserPageInputSchema = z.object({
|
|
227
|
+
name: z.string().describe("Which browser."),
|
|
228
|
+
pageId: z.string().describe("Which of its tabs."),
|
|
229
|
+
index: z.number().int().min(0).describe("Where it goes among the window's open tabs, counted from the first; past the end is the end."),
|
|
230
|
+
});
|
|
231
|
+
export type MoveBrowserPageInput = z.infer<typeof MoveBrowserPageInputSchema>;
|
|
232
|
+
// What a tab's own menu does to one tab, whichever window it is in and whether or not it is in front.
|
|
233
|
+
export const BrowserPageActionSchema = z.enum(["reload", "duplicate", "mute", "unmute"]);
|
|
234
|
+
export type BrowserPageAction = z.infer<typeof BrowserPageActionSchema>;
|
|
235
|
+
export const BrowserPageActionInputSchema = z.object({
|
|
236
|
+
name: z.string().describe("Which browser."),
|
|
237
|
+
pageId: z.string().describe("Which of its tabs."),
|
|
238
|
+
action: BrowserPageActionSchema.describe("Reload it, open a copy of it beside it, or silence or unsilence it."),
|
|
239
|
+
});
|
|
240
|
+
export type BrowserPageActionInput = z.infer<typeof BrowserPageActionInputSchema>;
|
|
183
241
|
// One window on the sandbox's desktop, as its window manager lists it. The id is what /system/desktop-view takes as
|
|
184
242
|
// `window` to stream that window alone, and what the agent's own desktop tools name it by.
|
|
185
243
|
export const DesktopWindowSchema = z.object({
|
package/src/state/auth-state.ts
CHANGED
|
@@ -91,6 +91,9 @@ export const AUTH_STATE_FILES: readonly StateFile[] = [
|
|
|
91
91
|
{ path: "gemini/models.json", portability: "derived" },
|
|
92
92
|
// Each custom endpoint's last discovered model list, fetched again from the endpoint.
|
|
93
93
|
{ path: "endpoints/", portability: "derived" },
|
|
94
|
+
// Models the provider refused on a translator credential as off its plan (agent/providers/translator-models.ts):
|
|
95
|
+
// a cache that expires in days, and the target learns its own from its first refusal.
|
|
96
|
+
{ path: "translator-refused-models.json", portability: "derived" },
|
|
94
97
|
// Values a computer released for one use each, for masking only; never outlive the process handed them.
|
|
95
98
|
{ path: "keyring-released.json", portability: "derived" },
|
|
96
99
|
// The shell script and socket OpenCode runs commands through, written at boot.
|
|
@@ -27,6 +27,10 @@ const RUNTIME_DOMAINS = [
|
|
|
27
27
|
// The agent's Chromiums and open pages, daemon-held, minted from its own browser tool-call hooks.
|
|
28
28
|
{ domain: "browsers", invalidates: [["browsers"]] },
|
|
29
29
|
|
|
30
|
+
// A browser profile's bookmarks: added, renamed, moved or removed from any window (browser/bookmarks/), which every
|
|
31
|
+
// address bar's star, bookmarks bar and manager reads.
|
|
32
|
+
{ domain: "bookmarks", invalidates: [["bookmarks"]] },
|
|
33
|
+
|
|
30
34
|
// The sandbox's own desktop: up, and how many windows are open on it, watched off its window manager's client list.
|
|
31
35
|
{ domain: "desktop", invalidates: [["desktop"]] },
|
|
32
36
|
|
package/src/text/land-rows.ts
CHANGED
|
@@ -13,10 +13,8 @@ const dependencyLine = (deps: { missing: number; started: string[]; deferred: bo
|
|
|
13
13
|
return ``;
|
|
14
14
|
}
|
|
15
15
|
// `missing` counts versions the turn bumped as well as names it added, so the sentence names both.
|
|
16
|
-
const what = `${deps.missing} ${deps.missing === 1 ? `dependency` : `dependencies`}
|
|
17
|
-
return deps.deferred
|
|
18
|
-
? ` ${what} ${deps.missing === 1 ? `is` : `are`} being installed in your tree: the install waits for any other install to finish, appears in Work terminals, and its outcome lands in Activity.`
|
|
19
|
-
: ` Installing ${what}; the project's checks run when that finishes, and the outcome lands in Activity.`;
|
|
16
|
+
const what = `${deps.missing} changed ${deps.missing === 1 ? `dependency` : `dependencies`}`;
|
|
17
|
+
return deps.deferred ? ` ${what} queued to install.` : ` Installing ${what}, then checks.`;
|
|
20
18
|
};
|
|
21
19
|
|
|
22
20
|
// Said as an agent's own install starts: where it writes and what outlasts it. Names up to three projects, the workspace
|
|
@@ -35,8 +33,8 @@ export const installRow = (event: { readonly reach: "own-copy" | "main-tree"; re
|
|
|
35
33
|
return {
|
|
36
34
|
role: "notice",
|
|
37
35
|
text: ownCopy
|
|
38
|
-
? `Installing packages${where} into this conversation's own copy
|
|
39
|
-
: `Installing packages${where} in the main tree
|
|
36
|
+
? `Installing packages${where} into this conversation's own copy.`
|
|
37
|
+
: `Installing packages${where} in the main tree.`,
|
|
40
38
|
noticeCode: noticeCode({
|
|
41
39
|
code: "installing",
|
|
42
40
|
params: {
|
|
@@ -61,17 +59,14 @@ export interface SyncFacts {
|
|
|
61
59
|
}
|
|
62
60
|
export const syncLine = (sync: SyncFacts, base?: string): string => {
|
|
63
61
|
const plural = sync.commits === 1 ? `` : `s`;
|
|
64
|
-
const onto = base === undefined || base === `` ? `` : `
|
|
62
|
+
const onto = base === undefined || base === `` ? `` : ` (base ${base})`;
|
|
65
63
|
const moved =
|
|
66
64
|
sync.commits === 0
|
|
67
65
|
? undefined
|
|
68
66
|
: sync.cause === `between-tools`
|
|
69
|
-
? `
|
|
70
|
-
: `
|
|
71
|
-
const blocked =
|
|
72
|
-
sync.blocked.length > 0
|
|
73
|
-
? `Couldn't rebase onto your workspace in ${sync.blocked.join(`, `)}: the turn is running from the older base, so its land may need a resolve.`
|
|
74
|
-
: undefined;
|
|
67
|
+
? `Rebased mid-turn onto ${sync.commits} new commit${plural}, none of its files touched${onto}.`
|
|
68
|
+
: `Rebased onto your latest ${sync.commits} commit${plural} while this agent waited.`;
|
|
69
|
+
const blocked = sync.blocked.length > 0 ? `Couldn't rebase in ${sync.blocked.join(`, `)}; its land may need a resolve.` : undefined;
|
|
75
70
|
return [moved, blocked].filter((line) => line !== undefined).join(` `);
|
|
76
71
|
};
|
|
77
72
|
|
|
@@ -80,14 +75,14 @@ const intoParentRow = (event: Extract<AgentEvent, { kind: "landed" }>): Transcri
|
|
|
80
75
|
if (event.landed) {
|
|
81
76
|
return {
|
|
82
77
|
role: "notice",
|
|
83
|
-
text: `Changes went into the parent agent's checkout
|
|
78
|
+
text: `Changes went into the parent agent's checkout; they land with it.`,
|
|
84
79
|
noticeCode: noticeCode({ code: "intoParent" }),
|
|
85
80
|
};
|
|
86
81
|
}
|
|
87
82
|
const files = (event.conflicts ?? []).flatMap((conflict) => conflict.paths).length;
|
|
88
83
|
return {
|
|
89
84
|
role: "notice",
|
|
90
|
-
text: `${files} file
|
|
85
|
+
text: `${files} ${files === 1 ? `file clashes` : `files clash`} with the parent agent's edits; the parent was told.`,
|
|
91
86
|
noticeCode: noticeCode({ code: "intoParentClash", params: { files } }),
|
|
92
87
|
};
|
|
93
88
|
};
|
|
@@ -99,7 +94,7 @@ export const landedRow = (event: Extract<AgentEvent, { kind: "landed" }>): Trans
|
|
|
99
94
|
return intoParentRow(event);
|
|
100
95
|
}
|
|
101
96
|
if (event.held === true) {
|
|
102
|
-
return { role: "notice", text: `Finished:
|
|
97
|
+
return { role: "notice", text: `Finished: ready to land from this agent's review.`, noticeCode: noticeCode({ code: "landHeld" }) };
|
|
103
98
|
}
|
|
104
99
|
if (!event.landed) {
|
|
105
100
|
// Per-file cause (your edits, a moved main line, a binary) is spelled out in the review, not named here.
|
|
@@ -108,7 +103,7 @@ export const landedRow = (event: Extract<AgentEvent, { kind: "landed" }>): Trans
|
|
|
108
103
|
const repos = conflicts.map((conflict) => conflict.repo).join(`, `);
|
|
109
104
|
return {
|
|
110
105
|
role: "notice",
|
|
111
|
-
text: `${files} file
|
|
106
|
+
text: `${files} ${files === 1 ? `file` : `files`} couldn't land in ${repos}: resolve in the agent's review.`,
|
|
112
107
|
noticeCode: noticeCode({ code: "landConflict", params: { files, repos } }),
|
|
113
108
|
};
|
|
114
109
|
}
|
|
@@ -117,7 +112,7 @@ export const landedRow = (event: Extract<AgentEvent, { kind: "landed" }>): Trans
|
|
|
117
112
|
const row: TranscriptRow = {
|
|
118
113
|
role: "notice",
|
|
119
114
|
// A home's land (the only one named) is committed too, by nobody pressing anything: said, not left to the Changes panel.
|
|
120
|
-
text: `${event.land === undefined ? "
|
|
115
|
+
text: `${event.land === undefined ? "Landed in your workspace." : "Landed and committed."}${dependencyLine(event.deps)}`,
|
|
121
116
|
noticeCode: noticeCode({
|
|
122
117
|
code: "landed",
|
|
123
118
|
params: deps === undefined && event.land === undefined ? undefined : { deps: deps?.missing, queued: deps?.deferred || undefined, land: event.land },
|
package/src/text/notice-rows.ts
CHANGED
|
@@ -14,8 +14,8 @@ const STARTING_KINDS: ReadonlySet<AgentEvent["kind"]> = new Set<StartingFrame["k
|
|
|
14
14
|
// The sandbox's one repair of a conversation's view of the workspace, made before the model was asked anything.
|
|
15
15
|
const repairedLine = (layers: number): string =>
|
|
16
16
|
layers === 0
|
|
17
|
-
? "This conversation's copy
|
|
18
|
-
: `
|
|
17
|
+
? "This conversation's workspace copy failed to start, so it was rebuilt."
|
|
18
|
+
: `Workspace copy rebuilt; ${String(layers)} dependency ${layers === 1 ? "layer" : "layers"} set aside, reinstall if needed.`;
|
|
19
19
|
|
|
20
20
|
/** Whether the frame is one of those notices. */
|
|
21
21
|
export const isStartingFrame = (event: AgentEvent): event is StartingFrame => STARTING_KINDS.has(event.kind);
|
|
@@ -41,11 +41,11 @@ export type AccountMoved = Extract<SandboxNotice, { code: "accountMoved" }>["par
|
|
|
41
41
|
|
|
42
42
|
// Each names both accounts, since "moved" alone leaves the reader to work out from where and to where.
|
|
43
43
|
const MOVED_LINES = {
|
|
44
|
-
refused: ({ from, to }) => `Ran on ${to}:
|
|
44
|
+
refused: ({ from, to }) => `Ran on ${to}: ${from}'s plan or organization doesn't allow it.`,
|
|
45
45
|
// Says how to overrule it: the records can be wrong (a limit reset, a plan upgraded), and a pick of the account wins.
|
|
46
|
-
spent: ({ from, to }) => `Ran on ${to}:
|
|
47
|
-
reach: ({ from, to }) => `Ran on ${to}:
|
|
48
|
-
cold: ({ from, to }) => `Moved from ${from} to ${to}
|
|
46
|
+
spent: ({ from, to }) => `Ran on ${to}: ${from} looks used up; pick it in the composer to override.`,
|
|
47
|
+
reach: ({ from, to }) => `Ran on ${to}: this conversation's people may not use ${from}.`,
|
|
48
|
+
cold: ({ from, to }) => `Moved from ${from} to ${to}: more room, and the cache had expired.`,
|
|
49
49
|
} as const satisfies Readonly<Record<AccountMoved["why"], (move: AccountMoved) => string>>;
|
|
50
50
|
|
|
51
51
|
/** The row a turn moved to another account opens with, so the reader learns where it ran and why without asking. */
|