@skrr-ai/cli 0.1.88 → 0.1.89

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.
@@ -33,6 +33,22 @@ export declare const COMPUTER_EVENTS: {
33
33
  readonly attach: "computer:attach";
34
34
  /** client → API: leave. */
35
35
  readonly detach: "computer:detach";
36
+ /**
37
+ * client → API: read the whole manifest again ON THE SAME ATTACHMENT, after
38
+ * a missed delta or a `stale_epoch` (OSK-13815). The ack carries what an
39
+ * attach's does — the attachment id (unchanged), the manifest and the
40
+ * operations — or a typed refusal; `not_found` means the attachment is gone
41
+ * and only then does the client attach afresh. Re-reading state must never
42
+ * change who the reader is: a control lease is bound to the attachment
43
+ * (`holderAttachmentId`), and a resync that detached and attached again
44
+ * orphaned the hold the person had just taken. Answered by the API, which
45
+ * renews the binding with the daemon exactly as its periodic re-check does
46
+ * (a repeated `daemon:computer:attach` with the same id), so it has no
47
+ * daemon mirror and needs no daemon capability. An API that predates it
48
+ * never answers; the client bounds the wait and falls back to attaching
49
+ * afresh.
50
+ */
51
+ readonly resync: "computer:resync";
36
52
  /** API → client: this attachment was detached, with the reason (revoked, stale generation, …). */
37
53
  readonly detached: "computer:detached";
38
54
  /** API → client: a whole manifest, or a revisioned delta. */
@@ -162,6 +178,22 @@ export declare const DAEMON_COMPUTER_EVENT_NAMES: readonly DaemonComputerEventNa
162
178
  export declare const DAEMON_COMPUTER_REPORT_EVENT_KEYS: readonly ["ack", "manifest", "data", "activity", "detached", "filesChanged", "diagnostics"];
163
179
  /** The API → client events; every other `computer:*` event flows client → API. */
164
180
  export declare const COMPUTER_SERVER_EVENT_KEYS: readonly ["detached", "manifest", "data", "activity", "filesChanged"];
181
+ /**
182
+ * Client → API requests the API answers itself, with no `daemon:computer:*`
183
+ * mirror: every other client request is relayed to the daemon under the same
184
+ * key. `resync` renews the binding through the daemon's existing attach
185
+ * (OSK-13815).
186
+ */
187
+ export declare const COMPUTER_API_ANSWERED_EVENT_KEYS: readonly ["resync"];
188
+ /** How long the client waits for a `computer:resync` answer before attaching afresh (an API that predates it never answers). */
189
+ export declare const COMPUTER_RESYNC_TIMEOUT_MS = 12000;
190
+ /**
191
+ * How long a client holds a manifest delta that arrived AHEAD of its
192
+ * predecessor before reading the hole as a loss (OSK-13815). Deltas fan out
193
+ * through a relay of several replicas; a reorder is milliseconds, a loss is
194
+ * forever, and only a loss needs the whole manifest again.
195
+ */
196
+ export declare const COMPUTER_MANIFEST_REORDER_WAIT_MS = 300;
165
197
  /**
166
198
  * One capability per wire addition, each withheld positively at dispatch: the
167
199
  * API never sends a computer event to a daemon that did not announce the
@@ -263,6 +295,20 @@ export declare const COMPUTER_CAPABILITIES: {
263
295
  * browser; nothing is proxied to it. Announced by the relay that serves it.
264
296
  */
265
297
  readonly declaredServices: "computer_declared_services_v1";
298
+ /**
299
+ * The page follows the controlling window (§6.2 "a stable viewport", §7.1,
300
+ * OSK-13808): a browser `viewport` input, sent only by the attachment that
301
+ * holds the browser's lease at the current epoch, sizes the streamed page
302
+ * to that window's content box (`COMPUTER_BROWSER_VIEWPORT_LIMITS`). Only
303
+ * while a person holds control: handing back — or the hold lapsing, being
304
+ * revoked or moving to the agent any other way — restores the browser's own
305
+ * viewport before the agent can act, so an agent never inherits a person's
306
+ * size. Watchers keep seeing the page at whatever size it is, scaled to
307
+ * fit. Announced only where the browser driver can override and restore
308
+ * the page's metrics; without it the window scales the fixed page, as
309
+ * before, and never sends the input.
310
+ */
311
+ readonly browserViewport: "computer_browser_viewport_v1";
266
312
  };
267
313
  export type ComputerCapabilityKey = keyof typeof COMPUTER_CAPABILITIES;
268
314
  export type ComputerCapability = (typeof COMPUTER_CAPABILITIES)[ComputerCapabilityKey];
@@ -271,14 +317,13 @@ export declare const COMPUTER_CAPABILITY_VALUES: [ComputerCapability, ...Compute
271
317
  * Every refusal and limit the computer protocol can answer with. Callers branch
272
318
  * on the code; a message beside it is free text and may change.
273
319
  */
274
- export declare const COMPUTER_REFUSAL_CODES: readonly ["human_control", "stale_epoch", "stale_generation", "file_changed", "capability_missing", "unauthorized", "control_denied", "not_holder", "attachment_limit", "observer_limit", "watch_limit", "grant_limit", "browser_limit", "rate_limited", "not_found", "surface_ended", "machine_unavailable", "daemon_unreachable", "timeout", "invalid_request", "consent_missing", "path_withheld", "too_large", "service_limit"];
320
+ export declare const COMPUTER_REFUSAL_CODES: readonly ["human_control", "stale_epoch", "stale_generation", "file_changed", "capability_missing", "unauthorized", "control_denied", "not_holder", "attachment_limit", "observer_limit", "watch_limit", "grant_limit", "browser_limit", "rate_limited", "not_found", "surface_ended", "machine_unavailable", "daemon_unreachable", "relay_error", "timeout", "invalid_request", "consent_missing", "path_withheld", "too_large", "service_limit"];
275
321
  export type ComputerRefusalCode = (typeof COMPUTER_REFUSAL_CODES)[number];
276
322
  /**
277
- * Older spellings the daemon boundary accepts for one release (§5.2). After
278
- * that release this map is emptied, and nothing else names the old spelling.
323
+ * The code when it is a computer refusal, else `null`. There is one spelling
324
+ * per code: the browser's older spelling of `human_control` was accepted for
325
+ * one release and retired with the old browser events (§5.2, OSK-13509).
279
326
  */
280
- export declare const COMPUTER_LEGACY_REFUSAL_SPELLINGS: Readonly<Record<string, ComputerRefusalCode>>;
281
- /** The canonical code for a received spelling, or `null` when it is not a computer refusal. */
282
327
  export declare function normalizeComputerRefusalCode(code: unknown): ComputerRefusalCode | null;
283
328
  export declare const COMPUTER_ACTOR_KINDS: readonly ["agent", "human"];
284
329
  export type ComputerActorKind = (typeof COMPUTER_ACTOR_KINDS)[number];
@@ -291,6 +336,19 @@ export type ComputerActorKind = (typeof COMPUTER_ACTOR_KINDS)[number];
291
336
  */
292
337
  export declare const COMPUTER_ACTIVITY_ACTOR_KINDS: readonly ["agent", "human", "system"];
293
338
  export type ComputerActivityActorKind = (typeof COMPUTER_ACTIVITY_ACTOR_KINDS)[number];
339
+ /**
340
+ * The session ids the PLATFORM's own routes run daemon tools under — the web
341
+ * Files surface (`computer-files:` on a personal machine, `dedicated-runtime:`
342
+ * on a Dedicated Runtime) and the owner's `skrr machines dedicated` commands.
343
+ * No agent and no model is behind such a session: the person who asked is
344
+ * known to the API (which audits it), not to the daemon. So an activity event
345
+ * produced under one names no agent (OSK-13790: a person's upload used to read
346
+ * "agent created …"). Built by `ComputerFileService.runPersonalMachineTool`
347
+ * and `DedicatedRuntimeMachineAccess.runDedicatedRuntimeTool`.
348
+ */
349
+ export declare const COMPUTER_PLATFORM_ROUTE_SESSION_PREFIXES: readonly ["dedicated-runtime:", "computer-files:"];
350
+ /** Whether a tool call's session is one of the platform's own routes, not an agent's. */
351
+ export declare function isComputerPlatformRouteSession(sessionId: unknown): boolean;
294
352
  /** An agent session, as the wire names it. Same session = same `agentId` AND `sessionId`. */
295
353
  export interface ComputerWireAgentActor {
296
354
  kind: 'agent';
@@ -420,7 +478,11 @@ export type ComputerSurfaceState = (typeof COMPUTER_SURFACE_STATES)[number];
420
478
  */
421
479
  export declare const COMPUTER_SURFACE_END_REASONS: readonly ["machine_stopped", "closed_by_owner", "closed", "process_exited", "daemon_restarted", "browser_crashed", "expired", "browser_reset"];
422
480
  export type ComputerSurfaceEndReason = (typeof COMPUTER_SURFACE_END_REASONS)[number];
423
- /** The browser's fixed logical viewport, whoever is looking (§6.2). */
481
+ /**
482
+ * The browser's logical viewport whoever is looking (§6.2): what the agent
483
+ * always works at. A person holding control may size the page to their window
484
+ * (`computer_browser_viewport_v1`); handing back restores this.
485
+ */
424
486
  export declare const COMPUTER_BROWSER_VIEWPORT: Readonly<{
425
487
  width: 1280;
426
488
  height: 800;
@@ -492,8 +554,41 @@ export interface ComputerTerminalInfo {
492
554
  };
493
555
  caveats?: ComputerTerminalCaveat[];
494
556
  }
495
- /** Input a browser surface takes. `tab` needs `computer_browser_tabs_v1`. */
496
- export declare const COMPUTER_BROWSER_INPUT_TYPES: readonly ["pointer", "key", "text", "navigate", "history", "tab"];
557
+ /**
558
+ * Input a browser surface takes. `tab` needs `computer_browser_tabs_v1`;
559
+ * `viewport` needs `computer_browser_viewport_v1`.
560
+ */
561
+ export declare const COMPUTER_BROWSER_INPUT_TYPES: readonly ["pointer", "key", "text", "navigate", "history", "tab", "viewport"];
562
+ /**
563
+ * What a `viewport` input may ask of the page (OSK-13808), in CSS pixels: the
564
+ * controlling window's content box, bounded so no window can make the page
565
+ * absurd for the agent that gets it back, and aspect-clamped (`minAspect` and
566
+ * `maxAspect` are width ÷ height) so a sliver of a window cannot either.
567
+ * Device pixel ratio is not part of it: the page keeps the browser's own, so a
568
+ * high-density screen changes no layout and no picture size.
569
+ */
570
+ export declare const COMPUTER_BROWSER_VIEWPORT_LIMITS: Readonly<{
571
+ minWidth: 320;
572
+ maxWidth: 2560;
573
+ minHeight: 240;
574
+ maxHeight: 1600;
575
+ minAspect: 0.4;
576
+ maxAspect: 3.2;
577
+ }>;
578
+ /**
579
+ * The size a `viewport` input asks for, made legal: whole CSS pixels inside
580
+ * `COMPUTER_BROWSER_VIEWPORT_LIMITS`, its aspect inside the clamp. Total and
581
+ * idempotent: the window sends what this returns and the daemon applies what
582
+ * this returns, so both ends agree on the page a size produces. Null for a size
583
+ * with no area (a hidden or collapsed window asks for nothing).
584
+ */
585
+ export declare function clampComputerBrowserViewport(size: {
586
+ width: number;
587
+ height: number;
588
+ }): {
589
+ width: number;
590
+ height: number;
591
+ } | null;
497
592
  /**
498
593
  * The client OS a browser `key` input comes from. A person's shortcuts are
499
594
  * mapped onto the Linux page's by the daemon: on `mac`, Command is Control,
@@ -25,16 +25,18 @@
25
25
  * dropped every command event for a release (OSK-13605).
26
26
  */
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.COMPUTER_BROWSER_DIALOG_CREDENTIAL_MAX_LENGTH = exports.COMPUTER_BROWSER_DIALOG_PROMPT_MAX_LENGTH = exports.COMPUTER_BROWSER_DIALOG_MESSAGE_MAX_LENGTH = exports.COMPUTER_BROWSER_DIALOG_ANSWERERS = exports.COMPUTER_BROWSER_DIALOG_OUTCOMES = exports.COMPUTER_BROWSER_DIALOG_KINDS = exports.COMPUTER_INPUT_TEXT_MAX_LENGTH = exports.COMPUTER_BROWSER_INPUT_PLATFORMS = exports.COMPUTER_BROWSER_INPUT_TYPES = exports.COMPUTER_TERMINAL_CAVEATS = exports.COMPUTER_TERMINAL_HISTORY_CAUSES = exports.COMPUTER_TERMINAL_LIFETIMES = exports.COMPUTER_TERMINAL_INPUT_TYPES = exports.COMPUTER_TERMINAL_SIGNALS = exports.COMPUTER_DIAGNOSTICS_MAX_STREAMS = exports.COMPUTER_DIAGNOSTICS_INTERVAL_MS = exports.COMPUTER_DIAGNOSTIC_COUNTERS = exports.COMPUTER_FRAME_ACK_TIMEOUT_MS = exports.COMPUTER_FRAME_MAX_BYTES = exports.COMPUTER_BROWSER_VIEWPORT = exports.COMPUTER_SURFACE_END_REASONS = exports.COMPUTER_SURFACE_STATES = exports.COMPUTER_SURFACE_KINDS = exports.COMPUTER_CONTROL_ACTIVITY_CHANGES = exports.COMPUTER_CONTROL_CHANGE_REASONS = exports.COMPUTER_SURFACE_UNPIN_REASONS = exports.COMPUTER_SURFACE_PIN_ACTIONS = exports.COMPUTER_SHARE_MODES = exports.COMPUTER_SHARE_ACTIONS = exports.COMPUTER_CONTROL_ACTIONS = exports.COMPUTER_AGENT_WRITE_WAIT_MS = exports.COMPUTER_RECONNECT_GRACE_MS = exports.COMPUTER_RECLAIM_WARNING_MS = exports.COMPUTER_CONTROL_IDLE_MS = exports.COMPUTER_HANDBACK_NOTE_MAX_LENGTH = exports.COMPUTER_GRANT_TIERS = exports.COMPUTER_OPERATIONS = exports.COMPUTER_ACCESS_LEVELS = exports.COMPUTER_ACTIVITY_ACTOR_KINDS = exports.COMPUTER_ACTOR_KINDS = exports.COMPUTER_LEGACY_REFUSAL_SPELLINGS = exports.COMPUTER_REFUSAL_CODES = exports.COMPUTER_CAPABILITY_VALUES = exports.COMPUTER_CAPABILITIES = exports.COMPUTER_SERVER_EVENT_KEYS = exports.DAEMON_COMPUTER_REPORT_EVENT_KEYS = exports.DAEMON_COMPUTER_EVENT_NAMES = exports.COMPUTER_EVENT_NAMES = exports.DAEMON_COMPUTER_EVENTS = exports.COMPUTER_EVENTS = void 0;
29
- exports.COMPUTER_DECLARED_SERVICE_PROBLEMS = exports.COMPUTER_DECLARED_SERVICE_NAME_PATTERN = exports.COMPUTER_DECLARED_SERVICE_HOST = exports.COMPUTER_DECLARED_SERVICE_PATH_MAX_LENGTH = exports.COMPUTER_DECLARED_SERVICE_NAME_MAX_LENGTH = exports.COMPUTER_DECLARED_SERVICES_MAX = exports.COMPUTER_DECLARED_SERVICE_PROTOCOLS = exports.COMPUTER_SERVICES_TOOL_ERROR_PREFIX = exports.COMPUTER_SERVICES_TOOL_NAME = exports.COMPUTER_DECLARED_SERVICE_ACTIONS = exports.COMPUTER_COMMAND_OUTPUT_STREAMS = exports.COMPUTER_COMMAND_START_REFUSALS = exports.COMPUTER_COMMAND_UNKNOWN_END_SIGNAL = exports.COMPUTER_COMMAND_NOT_STARTED_SIGNAL = exports.COMPUTER_COMMAND_OUTCOMES = exports.COMPUTER_LIFECYCLE_EVENTS = exports.COMPUTER_COMMAND_PHASES = exports.COMPUTER_ACTIVITY_WITHHELD_PLACEHOLDER = exports.COMPUTER_ACTIVITY_OUTPUT_MAX_LENGTH = exports.COMPUTER_ACTIVITY_SUMMARY_MAX_LENGTH = exports.COMPUTER_ACTIVITY_KINDS = exports.COMPUTER_FILE_CONTENTS_TAG_PATTERN = exports.COMPUTER_FILE_CONTENTS_TAG_MAX_ENTRIES = exports.COMPUTER_FILE_CHANGES = exports.COMPUTER_FILES_CHANGED_MAX_CHANGES = exports.COMPUTER_FILES_WATCH_DEGRADED_REASONS = exports.COMPUTER_FILE_WITHHELD_REASONS = exports.COMPUTER_FILE_TYPES = exports.COMPUTER_FILE_GIT_STATUS_BUDGET_MS = exports.COMPUTER_FILE_SEARCH_MAX_QUERY_LENGTH = exports.COMPUTER_FILE_SEARCH_MAX_BUDGET_MS = exports.COMPUTER_FILE_SEARCH_DEFAULT_BUDGET_MS = exports.COMPUTER_FILE_SEARCH_MAX_LIMIT = exports.COMPUTER_FILE_SEARCH_DEFAULT_LIMIT = exports.COMPUTER_FILE_GIT_MARKS = exports.COMPUTER_FILE_SEARCH_STATES = exports.COMPUTER_FILE_SEARCH_OPERATIONS = exports.COMPUTER_FILE_OPERATIONS = exports.COMPUTER_BROWSER_URL_MAX_LENGTH = exports.COMPUTER_BROWSER_TAB_ACTIONS = exports.COMPUTER_BROWSER_HISTORY_ACTIONS = exports.COMPUTER_BROWSER_COPY_MAX_LENGTH = exports.COMPUTER_TERMINAL_CWD_MAX_LENGTH = exports.COMPUTER_BROWSER_FILE_CHOOSER_PATH_MAX_LENGTH = exports.COMPUTER_BROWSER_FILE_CHOOSER_ACCEPT_MAX_LENGTH = exports.COMPUTER_BROWSER_FILE_CHOOSER_MAX_FILES = exports.COMPUTER_BROWSER_FILE_CHOOSER_OUTCOMES = exports.COMPUTER_BROWSER_FILE_CHOOSER_MODES = exports.COMPUTER_BROWSER_DOWNLOADS_MAX = exports.COMPUTER_BROWSER_DOWNLOAD_STATES = void 0;
30
- exports.COMPUTER_LEASE_STATE_POWER_PHASE = exports.COMPUTER_START_REFUSALS = exports.COMPUTER_PERSONAL_SIGN_IN_REASONS = exports.COMPUTER_PERSONAL_POWER_PHASES = exports.COMPUTER_POWER_PHASES = exports.COMPUTER_MACHINE_KINDS = void 0;
28
+ exports.COMPUTER_BROWSER_DIALOG_OUTCOMES = exports.COMPUTER_BROWSER_DIALOG_KINDS = exports.COMPUTER_INPUT_TEXT_MAX_LENGTH = exports.COMPUTER_BROWSER_INPUT_PLATFORMS = exports.COMPUTER_BROWSER_VIEWPORT_LIMITS = exports.COMPUTER_BROWSER_INPUT_TYPES = exports.COMPUTER_TERMINAL_CAVEATS = exports.COMPUTER_TERMINAL_HISTORY_CAUSES = exports.COMPUTER_TERMINAL_LIFETIMES = exports.COMPUTER_TERMINAL_INPUT_TYPES = exports.COMPUTER_TERMINAL_SIGNALS = exports.COMPUTER_DIAGNOSTICS_MAX_STREAMS = exports.COMPUTER_DIAGNOSTICS_INTERVAL_MS = exports.COMPUTER_DIAGNOSTIC_COUNTERS = exports.COMPUTER_FRAME_ACK_TIMEOUT_MS = exports.COMPUTER_FRAME_MAX_BYTES = exports.COMPUTER_BROWSER_VIEWPORT = exports.COMPUTER_SURFACE_END_REASONS = exports.COMPUTER_SURFACE_STATES = exports.COMPUTER_SURFACE_KINDS = exports.COMPUTER_CONTROL_ACTIVITY_CHANGES = exports.COMPUTER_CONTROL_CHANGE_REASONS = exports.COMPUTER_SURFACE_UNPIN_REASONS = exports.COMPUTER_SURFACE_PIN_ACTIONS = exports.COMPUTER_SHARE_MODES = exports.COMPUTER_SHARE_ACTIONS = exports.COMPUTER_CONTROL_ACTIONS = exports.COMPUTER_AGENT_WRITE_WAIT_MS = exports.COMPUTER_RECONNECT_GRACE_MS = exports.COMPUTER_RECLAIM_WARNING_MS = exports.COMPUTER_CONTROL_IDLE_MS = exports.COMPUTER_HANDBACK_NOTE_MAX_LENGTH = exports.COMPUTER_GRANT_TIERS = exports.COMPUTER_OPERATIONS = exports.COMPUTER_ACCESS_LEVELS = exports.COMPUTER_PLATFORM_ROUTE_SESSION_PREFIXES = exports.COMPUTER_ACTIVITY_ACTOR_KINDS = exports.COMPUTER_ACTOR_KINDS = exports.COMPUTER_REFUSAL_CODES = exports.COMPUTER_CAPABILITY_VALUES = exports.COMPUTER_CAPABILITIES = exports.COMPUTER_MANIFEST_REORDER_WAIT_MS = exports.COMPUTER_RESYNC_TIMEOUT_MS = exports.COMPUTER_API_ANSWERED_EVENT_KEYS = exports.COMPUTER_SERVER_EVENT_KEYS = exports.DAEMON_COMPUTER_REPORT_EVENT_KEYS = exports.DAEMON_COMPUTER_EVENT_NAMES = exports.COMPUTER_EVENT_NAMES = exports.DAEMON_COMPUTER_EVENTS = exports.COMPUTER_EVENTS = void 0;
29
+ exports.COMPUTER_DECLARED_SERVICE_NAME_MAX_LENGTH = exports.COMPUTER_DECLARED_SERVICES_MAX = exports.COMPUTER_DECLARED_SERVICE_PROTOCOLS = exports.COMPUTER_SERVICES_TOOL_ERROR_PREFIX = exports.COMPUTER_SERVICES_TOOL_NAME = exports.COMPUTER_DECLARED_SERVICE_ACTIONS = exports.COMPUTER_COMMAND_OUTPUT_STREAMS = exports.COMPUTER_COMMAND_START_REFUSALS = exports.COMPUTER_COMMAND_UNKNOWN_END_SIGNAL = exports.COMPUTER_COMMAND_NOT_STARTED_SIGNAL = exports.COMPUTER_COMMAND_OUTCOMES = exports.COMPUTER_LIFECYCLE_EVENTS = exports.COMPUTER_COMMAND_PHASES = exports.COMPUTER_ACTIVITY_WITHHELD_PLACEHOLDER = exports.COMPUTER_ACTIVITY_OUTPUT_MAX_LENGTH = exports.COMPUTER_ACTIVITY_SUMMARY_MAX_LENGTH = exports.COMPUTER_ACTIVITY_KINDS = exports.COMPUTER_FILE_CONTENTS_TAG_PATTERN = exports.COMPUTER_FILE_CONTENTS_TAG_MAX_ENTRIES = exports.COMPUTER_FILE_CHANGES = exports.COMPUTER_FILES_CHANGED_MAX_CHANGES = exports.COMPUTER_FILES_WATCH_DEGRADED_REASONS = exports.COMPUTER_FILE_WITHHELD_REASONS = exports.COMPUTER_FILE_TYPES = exports.COMPUTER_FILE_GIT_STATUS_BUDGET_MS = exports.COMPUTER_FILE_SEARCH_MAX_QUERY_LENGTH = exports.COMPUTER_FILE_SEARCH_MAX_BUDGET_MS = exports.COMPUTER_FILE_SEARCH_DEFAULT_BUDGET_MS = exports.COMPUTER_FILE_SEARCH_MAX_LIMIT = exports.COMPUTER_FILE_SEARCH_DEFAULT_LIMIT = exports.COMPUTER_FILE_GIT_MARKS = exports.COMPUTER_FILE_SEARCH_STATES = exports.COMPUTER_FILE_SEARCH_OPERATIONS = exports.COMPUTER_FILE_OPERATIONS = exports.COMPUTER_BROWSER_URL_MAX_LENGTH = exports.COMPUTER_BROWSER_TAB_ACTIONS = exports.COMPUTER_BROWSER_HISTORY_ACTIONS = exports.COMPUTER_BROWSER_COPY_MAX_LENGTH = exports.COMPUTER_TERMINAL_CWD_MAX_LENGTH = exports.COMPUTER_BROWSER_FILE_CHOOSER_PATH_MAX_LENGTH = exports.COMPUTER_BROWSER_FILE_CHOOSER_ACCEPT_MAX_LENGTH = exports.COMPUTER_BROWSER_FILE_CHOOSER_MAX_FILES = exports.COMPUTER_BROWSER_FILE_CHOOSER_OUTCOMES = exports.COMPUTER_BROWSER_FILE_CHOOSER_MODES = exports.COMPUTER_BROWSER_DOWNLOADS_MAX = exports.COMPUTER_BROWSER_DOWNLOAD_STATES = exports.COMPUTER_BROWSER_DIALOG_CREDENTIAL_MAX_LENGTH = exports.COMPUTER_BROWSER_DIALOG_PROMPT_MAX_LENGTH = exports.COMPUTER_BROWSER_DIALOG_MESSAGE_MAX_LENGTH = exports.COMPUTER_BROWSER_DIALOG_ANSWERERS = void 0;
30
+ exports.COMPUTER_LEASE_STATE_POWER_PHASE = exports.COMPUTER_START_REFUSALS = exports.COMPUTER_PERSONAL_SIGN_IN_REASONS = exports.COMPUTER_PERSONAL_POWER_PHASES = exports.COMPUTER_POWER_PHASES = exports.COMPUTER_MACHINE_KINDS = exports.COMPUTER_DECLARED_SERVICE_PROBLEMS = exports.COMPUTER_DECLARED_SERVICE_NAME_PATTERN = exports.COMPUTER_DECLARED_SERVICE_HOST = exports.COMPUTER_DECLARED_SERVICE_PATH_MAX_LENGTH = void 0;
31
31
  exports.normalizeComputerRefusalCode = normalizeComputerRefusalCode;
32
+ exports.isComputerPlatformRouteSession = isComputerPlatformRouteSession;
32
33
  exports.computerTierOperations = computerTierOperations;
33
34
  exports.computerOperationAllowed = computerOperationAllowed;
34
35
  exports.computerAccessOperations = computerAccessOperations;
35
36
  exports.computerControlChangeIsHolderChange = computerControlChangeIsHolderChange;
36
37
  exports.computerLeaseInputRefusal = computerLeaseInputRefusal;
37
38
  exports.computerLeaseAcceptsInput = computerLeaseAcceptsInput;
39
+ exports.clampComputerBrowserViewport = clampComputerBrowserViewport;
38
40
  exports.computerFileEntityTagsEqual = computerFileEntityTagsEqual;
39
41
  exports.computerDeclaredServiceOperation = computerDeclaredServiceOperation;
40
42
  exports.computerDeclaredServiceSpec = computerDeclaredServiceSpec;
@@ -55,6 +57,22 @@ exports.COMPUTER_EVENTS = {
55
57
  attach: 'computer:attach',
56
58
  /** client → API: leave. */
57
59
  detach: 'computer:detach',
60
+ /**
61
+ * client → API: read the whole manifest again ON THE SAME ATTACHMENT, after
62
+ * a missed delta or a `stale_epoch` (OSK-13815). The ack carries what an
63
+ * attach's does — the attachment id (unchanged), the manifest and the
64
+ * operations — or a typed refusal; `not_found` means the attachment is gone
65
+ * and only then does the client attach afresh. Re-reading state must never
66
+ * change who the reader is: a control lease is bound to the attachment
67
+ * (`holderAttachmentId`), and a resync that detached and attached again
68
+ * orphaned the hold the person had just taken. Answered by the API, which
69
+ * renews the binding with the daemon exactly as its periodic re-check does
70
+ * (a repeated `daemon:computer:attach` with the same id), so it has no
71
+ * daemon mirror and needs no daemon capability. An API that predates it
72
+ * never answers; the client bounds the wait and falls back to attaching
73
+ * afresh.
74
+ */
75
+ resync: 'computer:resync',
58
76
  /** API → client: this attachment was detached, with the reason (revoked, stale generation, …). */
59
77
  detached: 'computer:detached',
60
78
  /** API → client: a whole manifest, or a revisioned delta. */
@@ -196,6 +214,24 @@ exports.COMPUTER_SERVER_EVENT_KEYS = [
196
214
  'activity',
197
215
  'filesChanged',
198
216
  ];
217
+ /**
218
+ * Client → API requests the API answers itself, with no `daemon:computer:*`
219
+ * mirror: every other client request is relayed to the daemon under the same
220
+ * key. `resync` renews the binding through the daemon's existing attach
221
+ * (OSK-13815).
222
+ */
223
+ exports.COMPUTER_API_ANSWERED_EVENT_KEYS = [
224
+ 'resync',
225
+ ];
226
+ /** How long the client waits for a `computer:resync` answer before attaching afresh (an API that predates it never answers). */
227
+ exports.COMPUTER_RESYNC_TIMEOUT_MS = 12_000;
228
+ /**
229
+ * How long a client holds a manifest delta that arrived AHEAD of its
230
+ * predecessor before reading the hole as a loss (OSK-13815). Deltas fan out
231
+ * through a relay of several replicas; a reorder is milliseconds, a loss is
232
+ * forever, and only a loss needs the whole manifest again.
233
+ */
234
+ exports.COMPUTER_MANIFEST_REORDER_WAIT_MS = 300;
199
235
  // ---------------------------------------------------------------------------
200
236
  // Capabilities (§7.1)
201
237
  // ---------------------------------------------------------------------------
@@ -300,6 +336,20 @@ exports.COMPUTER_CAPABILITIES = {
300
336
  * browser; nothing is proxied to it. Announced by the relay that serves it.
301
337
  */
302
338
  declaredServices: 'computer_declared_services_v1',
339
+ /**
340
+ * The page follows the controlling window (§6.2 "a stable viewport", §7.1,
341
+ * OSK-13808): a browser `viewport` input, sent only by the attachment that
342
+ * holds the browser's lease at the current epoch, sizes the streamed page
343
+ * to that window's content box (`COMPUTER_BROWSER_VIEWPORT_LIMITS`). Only
344
+ * while a person holds control: handing back — or the hold lapsing, being
345
+ * revoked or moving to the agent any other way — restores the browser's own
346
+ * viewport before the agent can act, so an agent never inherits a person's
347
+ * size. Watchers keep seeing the page at whatever size it is, scaled to
348
+ * fit. Announced only where the browser driver can override and restore
349
+ * the page's metrics; without it the window scales the fixed page, as
350
+ * before, and never sends the input.
351
+ */
352
+ browserViewport: 'computer_browser_viewport_v1',
303
353
  };
304
354
  exports.COMPUTER_CAPABILITY_VALUES = Object.values(exports.COMPUTER_CAPABILITIES);
305
355
  // ---------------------------------------------------------------------------
@@ -341,6 +391,12 @@ exports.COMPUTER_REFUSAL_CODES = [
341
391
  'machine_unavailable',
342
392
  /** The machine's daemon is not answering. */
343
393
  'daemon_unreachable',
394
+ /**
395
+ * The relay failed while answering — an exception, not a fact about the
396
+ * machine. Retryable; the API log carries the same `correlationId`
397
+ * (OSK-13823). Never `machine_unavailable`, which says the machine is down.
398
+ */
399
+ 'relay_error',
344
400
  /** A bounded wait ran out (§7.2 R4). */
345
401
  'timeout',
346
402
  'invalid_request',
@@ -354,22 +410,16 @@ exports.COMPUTER_REFUSAL_CODES = [
354
410
  'service_limit',
355
411
  ];
356
412
  /**
357
- * Older spellings the daemon boundary accepts for one release (§5.2). After
358
- * that release this map is emptied, and nothing else names the old spelling.
413
+ * The code when it is a computer refusal, else `null`. There is one spelling
414
+ * per code: the browser's older spelling of `human_control` was accepted for
415
+ * one release and retired with the old browser events (§5.2, OSK-13509).
359
416
  */
360
- exports.COMPUTER_LEGACY_REFUSAL_SPELLINGS = Object.freeze({
361
- live_view_active: 'human_control',
362
- });
363
- /** The canonical code for a received spelling, or `null` when it is not a computer refusal. */
364
417
  function normalizeComputerRefusalCode(code) {
365
418
  if (typeof code !== 'string') {
366
419
  return null;
367
420
  }
368
- if (exports.COMPUTER_REFUSAL_CODES.includes(code)) {
369
- return code;
370
- }
371
- return Object.prototype.hasOwnProperty.call(exports.COMPUTER_LEGACY_REFUSAL_SPELLINGS, code)
372
- ? exports.COMPUTER_LEGACY_REFUSAL_SPELLINGS[code]
421
+ return exports.COMPUTER_REFUSAL_CODES.includes(code)
422
+ ? code
373
423
  : null;
374
424
  }
375
425
  // ---------------------------------------------------------------------------
@@ -384,6 +434,25 @@ exports.COMPUTER_ACTOR_KINDS = ['agent', 'human'];
384
434
  * API and a client saw a `seq` hole no fill could close.
385
435
  */
386
436
  exports.COMPUTER_ACTIVITY_ACTOR_KINDS = [...exports.COMPUTER_ACTOR_KINDS, 'system'];
437
+ /**
438
+ * The session ids the PLATFORM's own routes run daemon tools under — the web
439
+ * Files surface (`computer-files:` on a personal machine, `dedicated-runtime:`
440
+ * on a Dedicated Runtime) and the owner's `skrr machines dedicated` commands.
441
+ * No agent and no model is behind such a session: the person who asked is
442
+ * known to the API (which audits it), not to the daemon. So an activity event
443
+ * produced under one names no agent (OSK-13790: a person's upload used to read
444
+ * "agent created …"). Built by `ComputerFileService.runPersonalMachineTool`
445
+ * and `DedicatedRuntimeMachineAccess.runDedicatedRuntimeTool`.
446
+ */
447
+ exports.COMPUTER_PLATFORM_ROUTE_SESSION_PREFIXES = [
448
+ 'dedicated-runtime:',
449
+ 'computer-files:',
450
+ ];
451
+ /** Whether a tool call's session is one of the platform's own routes, not an agent's. */
452
+ function isComputerPlatformRouteSession(sessionId) {
453
+ return (typeof sessionId === 'string' &&
454
+ exports.COMPUTER_PLATFORM_ROUTE_SESSION_PREFIXES.some((prefix) => sessionId.startsWith(prefix)));
455
+ }
387
456
  /**
388
457
  * How a person present on the machine reached it: as its owner, or through a
389
458
  * grant at one of the two tiers. Agents carry no access level — an agent
@@ -552,7 +621,11 @@ exports.COMPUTER_SURFACE_END_REASONS = [
552
621
  /** Someone signed the computer's browser out everywhere, which ends every browser window. */
553
622
  'browser_reset',
554
623
  ];
555
- /** The browser's fixed logical viewport, whoever is looking (§6.2). */
624
+ /**
625
+ * The browser's logical viewport whoever is looking (§6.2): what the agent
626
+ * always works at. A person holding control may size the page to their window
627
+ * (`computer_browser_viewport_v1`); handing back restores this.
628
+ */
556
629
  exports.COMPUTER_BROWSER_VIEWPORT = Object.freeze({ width: 1280, height: 800 });
557
630
  /** One frame never exceeds this, so it fits the SSE transport every guest uses (§7.2 R7). */
558
631
  exports.COMPUTER_FRAME_MAX_BYTES = 1024 * 1024;
@@ -626,7 +699,10 @@ exports.COMPUTER_TERMINAL_HISTORY_CAUSES = [
626
699
  * verified (OSK-13535).
627
700
  */
628
701
  exports.COMPUTER_TERMINAL_CAVEATS = ['windows_pty_unverified'];
629
- /** Input a browser surface takes. `tab` needs `computer_browser_tabs_v1`. */
702
+ /**
703
+ * Input a browser surface takes. `tab` needs `computer_browser_tabs_v1`;
704
+ * `viewport` needs `computer_browser_viewport_v1`.
705
+ */
630
706
  exports.COMPUTER_BROWSER_INPUT_TYPES = [
631
707
  'pointer',
632
708
  'key',
@@ -634,7 +710,57 @@ exports.COMPUTER_BROWSER_INPUT_TYPES = [
634
710
  'navigate',
635
711
  'history',
636
712
  'tab',
713
+ 'viewport',
637
714
  ];
715
+ /**
716
+ * What a `viewport` input may ask of the page (OSK-13808), in CSS pixels: the
717
+ * controlling window's content box, bounded so no window can make the page
718
+ * absurd for the agent that gets it back, and aspect-clamped (`minAspect` and
719
+ * `maxAspect` are width ÷ height) so a sliver of a window cannot either.
720
+ * Device pixel ratio is not part of it: the page keeps the browser's own, so a
721
+ * high-density screen changes no layout and no picture size.
722
+ */
723
+ exports.COMPUTER_BROWSER_VIEWPORT_LIMITS = Object.freeze({
724
+ minWidth: 320,
725
+ maxWidth: 2560,
726
+ minHeight: 240,
727
+ maxHeight: 1600,
728
+ minAspect: 0.4,
729
+ maxAspect: 3.2,
730
+ });
731
+ /**
732
+ * The size a `viewport` input asks for, made legal: whole CSS pixels inside
733
+ * `COMPUTER_BROWSER_VIEWPORT_LIMITS`, its aspect inside the clamp. Total and
734
+ * idempotent: the window sends what this returns and the daemon applies what
735
+ * this returns, so both ends agree on the page a size produces. Null for a size
736
+ * with no area (a hidden or collapsed window asks for nothing).
737
+ */
738
+ function clampComputerBrowserViewport(size) {
739
+ const { width: rawWidth, height: rawHeight } = size ?? {};
740
+ if (!Number.isFinite(rawWidth) || !Number.isFinite(rawHeight))
741
+ return null;
742
+ if (!(rawWidth > 0) || !(rawHeight > 0))
743
+ return null;
744
+ const limits = exports.COMPUTER_BROWSER_VIEWPORT_LIMITS;
745
+ const bound = (value, low, high) => Math.max(low, Math.min(high, Math.round(value)));
746
+ let width = bound(rawWidth, limits.minWidth, limits.maxWidth);
747
+ let height = bound(rawHeight, limits.minHeight, limits.maxHeight);
748
+ if (width / height > limits.maxAspect) {
749
+ // Too wide: narrow it first; a height already at its floor cannot grow the other way.
750
+ width = Math.max(limits.minWidth, Math.floor(height * limits.maxAspect));
751
+ if (width / height > limits.maxAspect) {
752
+ height = Math.min(limits.maxHeight, Math.ceil(width / limits.maxAspect));
753
+ }
754
+ }
755
+ else if (width / height < limits.minAspect) {
756
+ // Too tall: shorten it first, then widen if the width is at its floor.
757
+ height = Math.max(limits.minHeight, Math.floor(width / limits.minAspect));
758
+ if (width / height < limits.minAspect) {
759
+ width = Math.min(limits.maxWidth, Math.ceil(height * limits.minAspect));
760
+ }
761
+ }
762
+ return { width, height };
763
+ }
638
764
  /**
639
765
  * The client OS a browser `key` input comes from. A person's shortcuts are
640
766
  * mapped onto the Linux page's by the daemon: on `mac`, Command is Control,
@@ -33,6 +33,22 @@ export declare const COMPUTER_EVENTS: {
33
33
  readonly attach: "computer:attach";
34
34
  /** client → API: leave. */
35
35
  readonly detach: "computer:detach";
36
+ /**
37
+ * client → API: read the whole manifest again ON THE SAME ATTACHMENT, after
38
+ * a missed delta or a `stale_epoch` (OSK-13815). The ack carries what an
39
+ * attach's does — the attachment id (unchanged), the manifest and the
40
+ * operations — or a typed refusal; `not_found` means the attachment is gone
41
+ * and only then does the client attach afresh. Re-reading state must never
42
+ * change who the reader is: a control lease is bound to the attachment
43
+ * (`holderAttachmentId`), and a resync that detached and attached again
44
+ * orphaned the hold the person had just taken. Answered by the API, which
45
+ * renews the binding with the daemon exactly as its periodic re-check does
46
+ * (a repeated `daemon:computer:attach` with the same id), so it has no
47
+ * daemon mirror and needs no daemon capability. An API that predates it
48
+ * never answers; the client bounds the wait and falls back to attaching
49
+ * afresh.
50
+ */
51
+ readonly resync: "computer:resync";
36
52
  /** API → client: this attachment was detached, with the reason (revoked, stale generation, …). */
37
53
  readonly detached: "computer:detached";
38
54
  /** API → client: a whole manifest, or a revisioned delta. */
@@ -162,6 +178,22 @@ export declare const DAEMON_COMPUTER_EVENT_NAMES: readonly DaemonComputerEventNa
162
178
  export declare const DAEMON_COMPUTER_REPORT_EVENT_KEYS: readonly ["ack", "manifest", "data", "activity", "detached", "filesChanged", "diagnostics"];
163
179
  /** The API → client events; every other `computer:*` event flows client → API. */
164
180
  export declare const COMPUTER_SERVER_EVENT_KEYS: readonly ["detached", "manifest", "data", "activity", "filesChanged"];
181
+ /**
182
+ * Client → API requests the API answers itself, with no `daemon:computer:*`
183
+ * mirror: every other client request is relayed to the daemon under the same
184
+ * key. `resync` renews the binding through the daemon's existing attach
185
+ * (OSK-13815).
186
+ */
187
+ export declare const COMPUTER_API_ANSWERED_EVENT_KEYS: readonly ["resync"];
188
+ /** How long the client waits for a `computer:resync` answer before attaching afresh (an API that predates it never answers). */
189
+ export declare const COMPUTER_RESYNC_TIMEOUT_MS = 12000;
190
+ /**
191
+ * How long a client holds a manifest delta that arrived AHEAD of its
192
+ * predecessor before reading the hole as a loss (OSK-13815). Deltas fan out
193
+ * through a relay of several replicas; a reorder is milliseconds, a loss is
194
+ * forever, and only a loss needs the whole manifest again.
195
+ */
196
+ export declare const COMPUTER_MANIFEST_REORDER_WAIT_MS = 300;
165
197
  /**
166
198
  * One capability per wire addition, each withheld positively at dispatch: the
167
199
  * API never sends a computer event to a daemon that did not announce the
@@ -263,6 +295,20 @@ export declare const COMPUTER_CAPABILITIES: {
263
295
  * browser; nothing is proxied to it. Announced by the relay that serves it.
264
296
  */
265
297
  readonly declaredServices: "computer_declared_services_v1";
298
+ /**
299
+ * The page follows the controlling window (§6.2 "a stable viewport", §7.1,
300
+ * OSK-13808): a browser `viewport` input, sent only by the attachment that
301
+ * holds the browser's lease at the current epoch, sizes the streamed page
302
+ * to that window's content box (`COMPUTER_BROWSER_VIEWPORT_LIMITS`). Only
303
+ * while a person holds control: handing back — or the hold lapsing, being
304
+ * revoked or moving to the agent any other way — restores the browser's own
305
+ * viewport before the agent can act, so an agent never inherits a person's
306
+ * size. Watchers keep seeing the page at whatever size it is, scaled to
307
+ * fit. Announced only where the browser driver can override and restore
308
+ * the page's metrics; without it the window scales the fixed page, as
309
+ * before, and never sends the input.
310
+ */
311
+ readonly browserViewport: "computer_browser_viewport_v1";
266
312
  };
267
313
  export type ComputerCapabilityKey = keyof typeof COMPUTER_CAPABILITIES;
268
314
  export type ComputerCapability = (typeof COMPUTER_CAPABILITIES)[ComputerCapabilityKey];
@@ -271,14 +317,13 @@ export declare const COMPUTER_CAPABILITY_VALUES: [ComputerCapability, ...Compute
271
317
  * Every refusal and limit the computer protocol can answer with. Callers branch
272
318
  * on the code; a message beside it is free text and may change.
273
319
  */
274
- export declare const COMPUTER_REFUSAL_CODES: readonly ["human_control", "stale_epoch", "stale_generation", "file_changed", "capability_missing", "unauthorized", "control_denied", "not_holder", "attachment_limit", "observer_limit", "watch_limit", "grant_limit", "browser_limit", "rate_limited", "not_found", "surface_ended", "machine_unavailable", "daemon_unreachable", "timeout", "invalid_request", "consent_missing", "path_withheld", "too_large", "service_limit"];
320
+ export declare const COMPUTER_REFUSAL_CODES: readonly ["human_control", "stale_epoch", "stale_generation", "file_changed", "capability_missing", "unauthorized", "control_denied", "not_holder", "attachment_limit", "observer_limit", "watch_limit", "grant_limit", "browser_limit", "rate_limited", "not_found", "surface_ended", "machine_unavailable", "daemon_unreachable", "relay_error", "timeout", "invalid_request", "consent_missing", "path_withheld", "too_large", "service_limit"];
275
321
  export type ComputerRefusalCode = (typeof COMPUTER_REFUSAL_CODES)[number];
276
322
  /**
277
- * Older spellings the daemon boundary accepts for one release (§5.2). After
278
- * that release this map is emptied, and nothing else names the old spelling.
323
+ * The code when it is a computer refusal, else `null`. There is one spelling
324
+ * per code: the browser's older spelling of `human_control` was accepted for
325
+ * one release and retired with the old browser events (§5.2, OSK-13509).
279
326
  */
280
- export declare const COMPUTER_LEGACY_REFUSAL_SPELLINGS: Readonly<Record<string, ComputerRefusalCode>>;
281
- /** The canonical code for a received spelling, or `null` when it is not a computer refusal. */
282
327
  export declare function normalizeComputerRefusalCode(code: unknown): ComputerRefusalCode | null;
283
328
  export declare const COMPUTER_ACTOR_KINDS: readonly ["agent", "human"];
284
329
  export type ComputerActorKind = (typeof COMPUTER_ACTOR_KINDS)[number];
@@ -291,6 +336,19 @@ export type ComputerActorKind = (typeof COMPUTER_ACTOR_KINDS)[number];
291
336
  */
292
337
  export declare const COMPUTER_ACTIVITY_ACTOR_KINDS: readonly ["agent", "human", "system"];
293
338
  export type ComputerActivityActorKind = (typeof COMPUTER_ACTIVITY_ACTOR_KINDS)[number];
339
+ /**
340
+ * The session ids the PLATFORM's own routes run daemon tools under — the web
341
+ * Files surface (`computer-files:` on a personal machine, `dedicated-runtime:`
342
+ * on a Dedicated Runtime) and the owner's `skrr machines dedicated` commands.
343
+ * No agent and no model is behind such a session: the person who asked is
344
+ * known to the API (which audits it), not to the daemon. So an activity event
345
+ * produced under one names no agent (OSK-13790: a person's upload used to read
346
+ * "agent created …"). Built by `ComputerFileService.runPersonalMachineTool`
347
+ * and `DedicatedRuntimeMachineAccess.runDedicatedRuntimeTool`.
348
+ */
349
+ export declare const COMPUTER_PLATFORM_ROUTE_SESSION_PREFIXES: readonly ["dedicated-runtime:", "computer-files:"];
350
+ /** Whether a tool call's session is one of the platform's own routes, not an agent's. */
351
+ export declare function isComputerPlatformRouteSession(sessionId: unknown): boolean;
294
352
  /** An agent session, as the wire names it. Same session = same `agentId` AND `sessionId`. */
295
353
  export interface ComputerWireAgentActor {
296
354
  kind: 'agent';
@@ -420,7 +478,11 @@ export type ComputerSurfaceState = (typeof COMPUTER_SURFACE_STATES)[number];
420
478
  */
421
479
  export declare const COMPUTER_SURFACE_END_REASONS: readonly ["machine_stopped", "closed_by_owner", "closed", "process_exited", "daemon_restarted", "browser_crashed", "expired", "browser_reset"];
422
480
  export type ComputerSurfaceEndReason = (typeof COMPUTER_SURFACE_END_REASONS)[number];
423
- /** The browser's fixed logical viewport, whoever is looking (§6.2). */
481
+ /**
482
+ * The browser's logical viewport whoever is looking (§6.2): what the agent
483
+ * always works at. A person holding control may size the page to their window
484
+ * (`computer_browser_viewport_v1`); handing back restores this.
485
+ */
424
486
  export declare const COMPUTER_BROWSER_VIEWPORT: Readonly<{
425
487
  width: 1280;
426
488
  height: 800;
@@ -492,8 +554,41 @@ export interface ComputerTerminalInfo {
492
554
  };
493
555
  caveats?: ComputerTerminalCaveat[];
494
556
  }
495
- /** Input a browser surface takes. `tab` needs `computer_browser_tabs_v1`. */
496
- export declare const COMPUTER_BROWSER_INPUT_TYPES: readonly ["pointer", "key", "text", "navigate", "history", "tab"];
557
+ /**
558
+ * Input a browser surface takes. `tab` needs `computer_browser_tabs_v1`;
559
+ * `viewport` needs `computer_browser_viewport_v1`.
560
+ */
561
+ export declare const COMPUTER_BROWSER_INPUT_TYPES: readonly ["pointer", "key", "text", "navigate", "history", "tab", "viewport"];
562
+ /**
563
+ * What a `viewport` input may ask of the page (OSK-13808), in CSS pixels: the
564
+ * controlling window's content box, bounded so no window can make the page
565
+ * absurd for the agent that gets it back, and aspect-clamped (`minAspect` and
566
+ * `maxAspect` are width ÷ height) so a sliver of a window cannot either.
567
+ * Device pixel ratio is not part of it: the page keeps the browser's own, so a
568
+ * high-density screen changes no layout and no picture size.
569
+ */
570
+ export declare const COMPUTER_BROWSER_VIEWPORT_LIMITS: Readonly<{
571
+ minWidth: 320;
572
+ maxWidth: 2560;
573
+ minHeight: 240;
574
+ maxHeight: 1600;
575
+ minAspect: 0.4;
576
+ maxAspect: 3.2;
577
+ }>;
578
+ /**
579
+ * The size a `viewport` input asks for, made legal: whole CSS pixels inside
580
+ * `COMPUTER_BROWSER_VIEWPORT_LIMITS`, its aspect inside the clamp. Total and
581
+ * idempotent: the window sends what this returns and the daemon applies what
582
+ * this returns, so both ends agree on the page a size produces. Null for a size
583
+ * with no area (a hidden or collapsed window asks for nothing).
584
+ */
585
+ export declare function clampComputerBrowserViewport(size: {
586
+ width: number;
587
+ height: number;
588
+ }): {
589
+ width: number;
590
+ height: number;
591
+ } | null;
497
592
  /**
498
593
  * The client OS a browser `key` input comes from. A person's shortcuts are
499
594
  * mapped onto the Linux page's by the daemon: on `mac`, Command is Control,