@immediately-run/sandbox-protocol 0.10.1 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,7 +31,7 @@ dependency bump.
31
31
  | `@immediately-run/sandbox-protocol` | the format version + the snapshot types. **No constants** — importing the root must not be a way to reach the other side's vocabulary |
32
32
 
33
33
  **Two modules, not a union.** The sides speak overlapping but different subsets — 34
34
- wire names in the frame, 72 in the SDK, 18 shared. 54 are SDK-only because the frame
34
+ wire names in the frame, 73 in the SDK, 18 shared. 55 are SDK-only because the frame
35
35
  merely *relays* them and the host is the other end (the R3-274a cross-repo audit). Each
36
36
  repo's own gate asserts its module covers *exactly* its extracted wire surface, so a
37
37
  union module would fail there, far from its cause.
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@
12
12
  // repo's own gate compares against
13
13
  //
14
14
  // The two sides speak overlapping but DIFFERENT subsets — 34 wire names in the frame,
15
- // 72 in the SDK, 18 shared; 54 are SDK-only because the frame merely relays them and
15
+ // 73 in the SDK, 18 shared; 55 are SDK-only because the frame merely relays them and
16
16
  // the host is the other end. (These four counts are ASSERTED against the descriptors by
17
17
  // `test/protocol.test.ts` — they are shipped in `dist/index.d.ts`, so a reader downloads
18
18
  // them, and they had drifted to 57/39 because nothing checked.) Hence a module per side:
package/dist/sandbox.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // GENERATED by scripts/generate.mjs — DO NOT EDIT.
3
3
  // Source of truth: src/descriptors.protocol.mjs (@immediately-run/sandbox-protocol)
4
- // descriptorsHash: 819db5a587c96c0e
4
+ // descriptorsHash: 033af346a4ad67fb
5
5
  //
6
6
  // The sandbox↔SDK wire vocabulary (PLATFORM_LAYERING_SPEC §2 / S1). Import the
7
7
  // constants instead of writing the string: a rename then has ONE edit site and
package/dist/sdk.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Every wire name this side speaks, as a union. */
2
- export type WireName = 'api-catalog' | 'auth-state' | 'chrome-state' | 'compile' | 'debug-enabled' | 'debug-log' | 'debug-query' | 'debug-query-result' | 'diagnostics' | 'dnd-cancel' | 'dropped-item' | 'editor-context' | 'form-factor' | 'fs-change' | 'host-attention' | 'invitations' | 'launch-dismiss' | 'launch-ended' | 'llm-provider' | 'metadata-update' | 'mount-add' | 'mount-remove' | 'protocol-analytics' | 'protocol-contribute' | 'protocol-dnd' | 'protocol-editor' | 'protocol-feed' | 'protocol-fetch' | 'protocol-ipc' | 'protocol-launch' | 'protocol-llm' | 'protocol-localstore' | 'protocol-openrepo' | 'protocol-recents' | 'protocol-secrets' | 'protocol-settings' | 'protocol-spaces' | 'protocol-task' | 'protocol-theme' | 'protocol-vcs' | 'region-message' | 'region-visibility' | 'request-api-catalog' | 'request-auth-state' | 'request-chrome-state' | 'request-debug-enabled' | 'request-diagnostics' | 'request-editor-context' | 'request-form-factor' | 'request-handshake' | 'request-host-attention' | 'request-invitations' | 'request-llm-provider' | 'request-mounts' | 'request-region-visibility' | 'request-secrets-metadata' | 'request-session-mounts' | 'request-theme' | 'request-theme-catalog' | 'request-vcs-state' | 'request-workspace' | 'sdk-handshake' | 'secrets-metadata' | 'session-mounts' | 'task-cancel' | 'task-complete' | 'task-input' | 'theme' | 'theme-catalog' | 'urlchange' | 'vcs-state' | 'workspace';
2
+ export type WireName = 'api-catalog' | 'auth-state' | 'chrome-state' | 'compile' | 'debug-enabled' | 'debug-log' | 'debug-query' | 'debug-query-result' | 'diagnostics' | 'dnd-cancel' | 'dropped-item' | 'editor-context' | 'form-factor' | 'fs-change' | 'host-attention' | 'invitations' | 'launch-dismiss' | 'launch-ended' | 'llm-provider' | 'metadata-update' | 'mount-add' | 'mount-remove' | 'protocol-analytics' | 'protocol-contribute' | 'protocol-dnd' | 'protocol-editor' | 'protocol-feed' | 'protocol-fetch' | 'protocol-ipc' | 'protocol-launch' | 'protocol-llm' | 'protocol-localstore' | 'protocol-openlink' | 'protocol-openrepo' | 'protocol-recents' | 'protocol-secrets' | 'protocol-settings' | 'protocol-spaces' | 'protocol-task' | 'protocol-theme' | 'protocol-vcs' | 'region-message' | 'region-visibility' | 'request-api-catalog' | 'request-auth-state' | 'request-chrome-state' | 'request-debug-enabled' | 'request-diagnostics' | 'request-editor-context' | 'request-form-factor' | 'request-handshake' | 'request-host-attention' | 'request-invitations' | 'request-llm-provider' | 'request-mounts' | 'request-region-visibility' | 'request-secrets-metadata' | 'request-session-mounts' | 'request-theme' | 'request-theme-catalog' | 'request-vcs-state' | 'request-workspace' | 'sdk-handshake' | 'secrets-metadata' | 'session-mounts' | 'task-cancel' | 'task-complete' | 'task-input' | 'theme' | 'theme-catalog' | 'urlchange' | 'vcs-state' | 'workspace';
3
3
  /** `api-catalog` — push · host->app. polled with `request-api-catalog`. */
4
4
  export declare const API_CATALOG = "api-catalog";
5
5
  /** Read off this message today: `methods`. */
@@ -214,12 +214,22 @@ export interface ProtocolLlmChatParams {
214
214
  content: unknown;
215
215
  role: unknown;
216
216
  }>;
217
+ model?: {
218
+ model: string;
219
+ providerId: string;
220
+ } | undefined;
217
221
  modelHint?: "fast" | "smart" | undefined;
218
222
  responseFormat?: "json" | "text" | undefined;
219
223
  tools?: Array<unknown> | undefined;
220
224
  }
221
225
  /** `protocol-localstore` — request · app->host. */
222
226
  export declare const PROTOCOL_LOCALSTORE = "protocol-localstore";
227
+ /** `protocol-openlink` — request · app->host. */
228
+ export declare const PROTOCOL_OPENLINK = "protocol-openlink";
229
+ /** Params of `protocol-openlink` method `open`. */
230
+ export interface ProtocolOpenlinkOpenParams {
231
+ url: string;
232
+ }
223
233
  /** `protocol-openrepo` — request · app->host. */
224
234
  export declare const PROTOCOL_OPENREPO = "protocol-openrepo";
225
235
  /** Params of `protocol-openrepo` method `open`. */
@@ -411,6 +421,7 @@ export declare const WIRE_NAMES: {
411
421
  readonly PROTOCOL_LAUNCH: "protocol-launch";
412
422
  readonly PROTOCOL_LLM: "protocol-llm";
413
423
  readonly PROTOCOL_LOCALSTORE: "protocol-localstore";
424
+ readonly PROTOCOL_OPENLINK: "protocol-openlink";
414
425
  readonly PROTOCOL_OPENREPO: "protocol-openrepo";
415
426
  readonly PROTOCOL_RECENTS: "protocol-recents";
416
427
  readonly PROTOCOL_SECRETS: "protocol-secrets";
package/dist/sdk.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // GENERATED by scripts/generate.mjs — DO NOT EDIT.
3
3
  // Source of truth: src/descriptors.protocol.mjs (@immediately-run/sandbox-protocol)
4
- // descriptorsHash: 819db5a587c96c0e
4
+ // descriptorsHash: 033af346a4ad67fb
5
5
  //
6
6
  // The sandbox↔SDK wire vocabulary (PLATFORM_LAYERING_SPEC §2 / S1). Import the
7
7
  // constants instead of writing the string: a rename then has ONE edit site and
@@ -9,8 +9,8 @@
9
9
  // that has a declared shape; a name handled as `any` today gets its read field
10
10
  // list in the doc comment instead (R3-274e is where those grow real types).
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.REQUEST_HANDSHAKE = exports.REQUEST_FORM_FACTOR = exports.REQUEST_EDITOR_CONTEXT = exports.REQUEST_DIAGNOSTICS = exports.REQUEST_DEBUG_ENABLED = exports.REQUEST_CHROME_STATE = exports.REQUEST_AUTH_STATE = exports.REQUEST_API_CATALOG = exports.REGION_VISIBILITY = exports.REGION_MESSAGE = exports.PROTOCOL_VCS = exports.PROTOCOL_THEME = exports.PROTOCOL_TASK = exports.PROTOCOL_SPACES = exports.PROTOCOL_SETTINGS = exports.PROTOCOL_SECRETS = exports.PROTOCOL_RECENTS = exports.PROTOCOL_OPENREPO = exports.PROTOCOL_LOCALSTORE = exports.PROTOCOL_LLM = exports.PROTOCOL_LAUNCH = exports.PROTOCOL_IPC = exports.PROTOCOL_FETCH = exports.PROTOCOL_FEED = exports.PROTOCOL_EDITOR = exports.PROTOCOL_DND = exports.PROTOCOL_CONTRIBUTE = exports.PROTOCOL_ANALYTICS = exports.MOUNT_REMOVE = exports.MOUNT_ADD = exports.METADATA_UPDATE = exports.LLM_PROVIDER = exports.LAUNCH_ENDED = exports.LAUNCH_DISMISS = exports.INVITATIONS = exports.HOST_ATTENTION = exports.FS_CHANGE = exports.FORM_FACTOR = exports.EDITOR_CONTEXT = exports.DROPPED_ITEM = exports.DND_CANCEL = exports.DIAGNOSTICS = exports.DEBUG_QUERY_RESULT = exports.DEBUG_QUERY = exports.DEBUG_LOG = exports.DEBUG_ENABLED = exports.COMPILE = exports.CHROME_STATE = exports.AUTH_STATE = exports.API_CATALOG = void 0;
13
- exports.WIRE_NAMES = exports.WORKSPACE = exports.VCS_STATE = exports.URLCHANGE = exports.THEME_CATALOG = exports.THEME = exports.TASK_INPUT = exports.TASK_COMPLETE = exports.TASK_CANCEL = exports.SESSION_MOUNTS = exports.SECRETS_METADATA = exports.SDK_HANDSHAKE = exports.REQUEST_WORKSPACE = exports.REQUEST_VCS_STATE = exports.REQUEST_THEME_CATALOG = exports.REQUEST_THEME = exports.REQUEST_SESSION_MOUNTS = exports.REQUEST_SECRETS_METADATA = exports.REQUEST_REGION_VISIBILITY = exports.REQUEST_MOUNTS = exports.REQUEST_LLM_PROVIDER = exports.REQUEST_INVITATIONS = exports.REQUEST_HOST_ATTENTION = void 0;
12
+ exports.REQUEST_FORM_FACTOR = exports.REQUEST_EDITOR_CONTEXT = exports.REQUEST_DIAGNOSTICS = exports.REQUEST_DEBUG_ENABLED = exports.REQUEST_CHROME_STATE = exports.REQUEST_AUTH_STATE = exports.REQUEST_API_CATALOG = exports.REGION_VISIBILITY = exports.REGION_MESSAGE = exports.PROTOCOL_VCS = exports.PROTOCOL_THEME = exports.PROTOCOL_TASK = exports.PROTOCOL_SPACES = exports.PROTOCOL_SETTINGS = exports.PROTOCOL_SECRETS = exports.PROTOCOL_RECENTS = exports.PROTOCOL_OPENREPO = exports.PROTOCOL_OPENLINK = exports.PROTOCOL_LOCALSTORE = exports.PROTOCOL_LLM = exports.PROTOCOL_LAUNCH = exports.PROTOCOL_IPC = exports.PROTOCOL_FETCH = exports.PROTOCOL_FEED = exports.PROTOCOL_EDITOR = exports.PROTOCOL_DND = exports.PROTOCOL_CONTRIBUTE = exports.PROTOCOL_ANALYTICS = exports.MOUNT_REMOVE = exports.MOUNT_ADD = exports.METADATA_UPDATE = exports.LLM_PROVIDER = exports.LAUNCH_ENDED = exports.LAUNCH_DISMISS = exports.INVITATIONS = exports.HOST_ATTENTION = exports.FS_CHANGE = exports.FORM_FACTOR = exports.EDITOR_CONTEXT = exports.DROPPED_ITEM = exports.DND_CANCEL = exports.DIAGNOSTICS = exports.DEBUG_QUERY_RESULT = exports.DEBUG_QUERY = exports.DEBUG_LOG = exports.DEBUG_ENABLED = exports.COMPILE = exports.CHROME_STATE = exports.AUTH_STATE = exports.API_CATALOG = void 0;
13
+ exports.WIRE_NAMES = exports.WORKSPACE = exports.VCS_STATE = exports.URLCHANGE = exports.THEME_CATALOG = exports.THEME = exports.TASK_INPUT = exports.TASK_COMPLETE = exports.TASK_CANCEL = exports.SESSION_MOUNTS = exports.SECRETS_METADATA = exports.SDK_HANDSHAKE = exports.REQUEST_WORKSPACE = exports.REQUEST_VCS_STATE = exports.REQUEST_THEME_CATALOG = exports.REQUEST_THEME = exports.REQUEST_SESSION_MOUNTS = exports.REQUEST_SECRETS_METADATA = exports.REQUEST_REGION_VISIBILITY = exports.REQUEST_MOUNTS = exports.REQUEST_LLM_PROVIDER = exports.REQUEST_INVITATIONS = exports.REQUEST_HOST_ATTENTION = exports.REQUEST_HANDSHAKE = void 0;
14
14
  /** `api-catalog` — push · host->app. polled with `request-api-catalog`. */
15
15
  exports.API_CATALOG = 'api-catalog';
16
16
  /** Read off this message today: `methods`. */
@@ -88,6 +88,8 @@ exports.PROTOCOL_LAUNCH = 'protocol-launch';
88
88
  exports.PROTOCOL_LLM = 'protocol-llm';
89
89
  /** `protocol-localstore` — request · app->host. */
90
90
  exports.PROTOCOL_LOCALSTORE = 'protocol-localstore';
91
+ /** `protocol-openlink` — request · app->host. */
92
+ exports.PROTOCOL_OPENLINK = 'protocol-openlink';
91
93
  /** `protocol-openrepo` — request · app->host. */
92
94
  exports.PROTOCOL_OPENREPO = 'protocol-openrepo';
93
95
  /** `protocol-recents` — request · app->host. */
@@ -209,6 +211,7 @@ exports.WIRE_NAMES = {
209
211
  PROTOCOL_LAUNCH: exports.PROTOCOL_LAUNCH,
210
212
  PROTOCOL_LLM: exports.PROTOCOL_LLM,
211
213
  PROTOCOL_LOCALSTORE: exports.PROTOCOL_LOCALSTORE,
214
+ PROTOCOL_OPENLINK: exports.PROTOCOL_OPENLINK,
212
215
  PROTOCOL_OPENREPO: exports.PROTOCOL_OPENREPO,
213
216
  PROTOCOL_RECENTS: exports.PROTOCOL_RECENTS,
214
217
  PROTOCOL_SECRETS: exports.PROTOCOL_SECRETS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immediately-run/sandbox-protocol",
3
- "version": "0.10.1",
3
+ "version": "0.10.3",
4
4
  "description": "The sandbox<->SDK wire protocol: ONE descriptor set, projected into the wire-name constants, the payload types, and the per-side snapshots both repos gate against (PLATFORM_LAYERING_SPEC S1). Consumed by sandbox and immediately-run-sdk so a wire change is a version bump, not a hand-copied file.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -1424,6 +1424,29 @@
1424
1424
  ]
1425
1425
  }
1426
1426
  },
1427
+ {
1428
+ "name": "model",
1429
+ "optional": true,
1430
+ "union": [
1431
+ {
1432
+ "fields": [
1433
+ {
1434
+ "name": "model",
1435
+ "optional": false,
1436
+ "type": "string"
1437
+ },
1438
+ {
1439
+ "name": "providerId",
1440
+ "optional": false,
1441
+ "type": "string"
1442
+ }
1443
+ ]
1444
+ },
1445
+ {
1446
+ "type": "undefined"
1447
+ }
1448
+ ]
1449
+ },
1427
1450
  {
1428
1451
  "name": "modelHint",
1429
1452
  "optional": true,
@@ -1490,6 +1513,26 @@
1490
1513
  "src/mounts.ts"
1491
1514
  ]
1492
1515
  },
1516
+ "protocol-openlink": {
1517
+ "kind": "request",
1518
+ "direction": "app->host",
1519
+ "methods": {
1520
+ "open": {
1521
+ "payload": {
1522
+ "fields": [
1523
+ {
1524
+ "name": "url",
1525
+ "optional": false,
1526
+ "type": "string"
1527
+ }
1528
+ ]
1529
+ }
1530
+ }
1531
+ },
1532
+ "sites": [
1533
+ "src/openExternal.ts"
1534
+ ]
1535
+ },
1493
1536
  "protocol-openrepo": {
1494
1537
  "kind": "request",
1495
1538
  "direction": "app->host",
@@ -2511,6 +2554,7 @@
2511
2554
  "launch",
2512
2555
  "llm",
2513
2556
  "localstore",
2557
+ "openlink",
2514
2558
  "openrepo",
2515
2559
  "recents",
2516
2560
  "secrets",