@immediately-run/sandbox-protocol 0.5.0 → 0.6.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/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: 02b97d7ee61b5716
4
+ // descriptorsHash: 82fbfbaeb58cdadd
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,11 +1,14 @@
1
1
  /** Every wire name this side speaks, as a union. */
2
- export type WireName = 'api-catalog' | 'auth-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-fetch' | 'protocol-ipc' | 'protocol-launch' | 'protocol-llm' | 'protocol-secrets' | 'protocol-settings' | 'protocol-spaces' | 'protocol-task' | 'protocol-theme' | 'protocol-vcs' | 'region-message' | 'request-api-catalog' | 'request-auth-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-secrets-metadata' | 'request-session-mounts' | 'request-theme' | 'request-vcs-state' | 'sdk-handshake' | 'secrets-metadata' | 'session-mounts' | 'task-cancel' | 'task-complete' | 'task-input' | 'theme' | 'urlchange' | 'vcs-state';
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-fetch' | 'protocol-ipc' | 'protocol-launch' | 'protocol-llm' | 'protocol-secrets' | 'protocol-settings' | 'protocol-spaces' | 'protocol-task' | 'protocol-theme' | 'protocol-vcs' | 'region-message' | '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-secrets-metadata' | 'request-session-mounts' | 'request-theme' | 'request-vcs-state' | 'sdk-handshake' | 'secrets-metadata' | 'session-mounts' | 'task-cancel' | 'task-complete' | 'task-input' | 'theme' | 'urlchange' | 'vcs-state';
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`. */
6
6
  /** `auth-state` — push · host->app. polled with `request-auth-state`. */
7
7
  export declare const AUTH_STATE = "auth-state";
8
8
  /** Read off this message today: `state`. */
9
+ /** `chrome-state` — push · host->app. polled with `request-chrome-state`. */
10
+ export declare const CHROME_STATE = "chrome-state";
11
+ /** Read off this message today: `chromeState`. */
9
12
  /** `compile` — message · host->app. */
10
13
  export declare const COMPILE = "compile";
11
14
  /** `debug-enabled` — push · host->app. polled with `request-debug-enabled`. */
@@ -273,6 +276,8 @@ export interface RegionMessagePayload {
273
276
  export declare const REQUEST_API_CATALOG = "request-api-catalog";
274
277
  /** `request-auth-state` — poll · app->host. */
275
278
  export declare const REQUEST_AUTH_STATE = "request-auth-state";
279
+ /** `request-chrome-state` — poll · app->host. */
280
+ export declare const REQUEST_CHROME_STATE = "request-chrome-state";
276
281
  /** `request-debug-enabled` — poll · app->host. */
277
282
  export declare const REQUEST_DEBUG_ENABLED = "request-debug-enabled";
278
283
  /** `request-diagnostics` — poll · app->host. */
@@ -337,6 +342,7 @@ export declare const VCS_STATE = "vcs-state";
337
342
  export declare const WIRE_NAMES: {
338
343
  readonly API_CATALOG: "api-catalog";
339
344
  readonly AUTH_STATE: "auth-state";
345
+ readonly CHROME_STATE: "chrome-state";
340
346
  readonly COMPILE: "compile";
341
347
  readonly DEBUG_ENABLED: "debug-enabled";
342
348
  readonly DEBUG_LOG: "debug-log";
@@ -373,6 +379,7 @@ export declare const WIRE_NAMES: {
373
379
  readonly REGION_MESSAGE: "region-message";
374
380
  readonly REQUEST_API_CATALOG: "request-api-catalog";
375
381
  readonly REQUEST_AUTH_STATE: "request-auth-state";
382
+ readonly REQUEST_CHROME_STATE: "request-chrome-state";
376
383
  readonly REQUEST_DEBUG_ENABLED: "request-debug-enabled";
377
384
  readonly REQUEST_DIAGNOSTICS: "request-diagnostics";
378
385
  readonly REQUEST_EDITOR_CONTEXT: "request-editor-context";
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: 02b97d7ee61b5716
4
+ // descriptorsHash: 82fbfbaeb58cdadd
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,14 +9,17 @@
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_THEME = exports.REQUEST_SESSION_MOUNTS = exports.REQUEST_SECRETS_METADATA = exports.REQUEST_MOUNTS = exports.REQUEST_LLM_PROVIDER = exports.REQUEST_INVITATIONS = exports.REQUEST_HOST_ATTENTION = exports.REQUEST_HANDSHAKE = exports.REQUEST_FORM_FACTOR = exports.REQUEST_EDITOR_CONTEXT = exports.REQUEST_DIAGNOSTICS = exports.REQUEST_DEBUG_ENABLED = exports.REQUEST_AUTH_STATE = exports.REQUEST_API_CATALOG = exports.REGION_MESSAGE = exports.PROTOCOL_VCS = exports.PROTOCOL_THEME = exports.PROTOCOL_TASK = exports.PROTOCOL_SPACES = exports.PROTOCOL_SETTINGS = exports.PROTOCOL_SECRETS = exports.PROTOCOL_LLM = exports.PROTOCOL_LAUNCH = exports.PROTOCOL_IPC = exports.PROTOCOL_FETCH = 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.AUTH_STATE = exports.API_CATALOG = void 0;
13
- exports.WIRE_NAMES = exports.VCS_STATE = exports.URLCHANGE = exports.THEME = exports.TASK_INPUT = exports.TASK_COMPLETE = exports.TASK_CANCEL = exports.SESSION_MOUNTS = exports.SECRETS_METADATA = exports.SDK_HANDSHAKE = exports.REQUEST_VCS_STATE = void 0;
12
+ exports.REQUEST_SECRETS_METADATA = exports.REQUEST_MOUNTS = exports.REQUEST_LLM_PROVIDER = exports.REQUEST_INVITATIONS = exports.REQUEST_HOST_ATTENTION = 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_MESSAGE = exports.PROTOCOL_VCS = exports.PROTOCOL_THEME = exports.PROTOCOL_TASK = exports.PROTOCOL_SPACES = exports.PROTOCOL_SETTINGS = exports.PROTOCOL_SECRETS = exports.PROTOCOL_LLM = exports.PROTOCOL_LAUNCH = exports.PROTOCOL_IPC = exports.PROTOCOL_FETCH = 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.VCS_STATE = exports.URLCHANGE = exports.THEME = exports.TASK_INPUT = exports.TASK_COMPLETE = exports.TASK_CANCEL = exports.SESSION_MOUNTS = exports.SECRETS_METADATA = exports.SDK_HANDSHAKE = exports.REQUEST_VCS_STATE = exports.REQUEST_THEME = exports.REQUEST_SESSION_MOUNTS = 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`. */
17
17
  /** `auth-state` — push · host->app. polled with `request-auth-state`. */
18
18
  exports.AUTH_STATE = 'auth-state';
19
19
  /** Read off this message today: `state`. */
20
+ /** `chrome-state` — push · host->app. polled with `request-chrome-state`. */
21
+ exports.CHROME_STATE = 'chrome-state';
22
+ /** Read off this message today: `chromeState`. */
20
23
  /** `compile` — message · host->app. */
21
24
  exports.COMPILE = 'compile';
22
25
  /** `debug-enabled` — push · host->app. polled with `request-debug-enabled`. */
@@ -99,6 +102,8 @@ exports.REGION_MESSAGE = 'region-message';
99
102
  exports.REQUEST_API_CATALOG = 'request-api-catalog';
100
103
  /** `request-auth-state` — poll · app->host. */
101
104
  exports.REQUEST_AUTH_STATE = 'request-auth-state';
105
+ /** `request-chrome-state` — poll · app->host. */
106
+ exports.REQUEST_CHROME_STATE = 'request-chrome-state';
102
107
  /** `request-debug-enabled` — poll · app->host. */
103
108
  exports.REQUEST_DEBUG_ENABLED = 'request-debug-enabled';
104
109
  /** `request-diagnostics` — poll · app->host. */
@@ -151,6 +156,7 @@ exports.VCS_STATE = 'vcs-state';
151
156
  exports.WIRE_NAMES = {
152
157
  API_CATALOG: exports.API_CATALOG,
153
158
  AUTH_STATE: exports.AUTH_STATE,
159
+ CHROME_STATE: exports.CHROME_STATE,
154
160
  COMPILE: exports.COMPILE,
155
161
  DEBUG_ENABLED: exports.DEBUG_ENABLED,
156
162
  DEBUG_LOG: exports.DEBUG_LOG,
@@ -187,6 +193,7 @@ exports.WIRE_NAMES = {
187
193
  REGION_MESSAGE: exports.REGION_MESSAGE,
188
194
  REQUEST_API_CATALOG: exports.REQUEST_API_CATALOG,
189
195
  REQUEST_AUTH_STATE: exports.REQUEST_AUTH_STATE,
196
+ REQUEST_CHROME_STATE: exports.REQUEST_CHROME_STATE,
190
197
  REQUEST_DEBUG_ENABLED: exports.REQUEST_DEBUG_ENABLED,
191
198
  REQUEST_DIAGNOSTICS: exports.REQUEST_DIAGNOSTICS,
192
199
  REQUEST_EDITOR_CONTEXT: exports.REQUEST_EDITOR_CONTEXT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immediately-run/sandbox-protocol",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
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": {
@@ -55,7 +55,8 @@
55
55
  "lint": "eslint src test",
56
56
  "check:drift": "node scripts/verify-drift.mjs --self-test && node scripts/verify-drift.mjs",
57
57
  "check:dependency-free": "node scripts/check-dependency-free.mjs --self-test && node scripts/check-dependency-free.mjs",
58
- "verify": "npm run build && npm test && npm run lint && npm run check:drift && npm run check:dependency-free",
58
+ "check:publish-version": "node scripts/check-publish-version.mjs --self-test && node scripts/check-publish-version.mjs",
59
+ "verify": "npm run check:publish-version && npm run build && npm test && npm run lint && npm run check:drift && npm run check:dependency-free",
59
60
  "prepare": "npm run build"
60
61
  },
61
62
  "devDependencies": {
@@ -87,6 +87,47 @@
87
87
  "src/auth.ts"
88
88
  ]
89
89
  },
90
+ "chrome-state": {
91
+ "kind": "push",
92
+ "direction": "host->app",
93
+ "poll": "request-chrome-state",
94
+ "payload": {
95
+ "reads": [
96
+ "chromeState"
97
+ ]
98
+ },
99
+ "value": {
100
+ "fields": [
101
+ {
102
+ "name": "overlay",
103
+ "optional": false,
104
+ "union": [
105
+ {
106
+ "type": "\"menu\""
107
+ },
108
+ {
109
+ "type": "\"none\""
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "name": "tab",
115
+ "optional": false,
116
+ "fields": [
117
+ {
118
+ "name": "edge",
119
+ "optional": false,
120
+ "type": "\"top-right\""
121
+ }
122
+ ]
123
+ }
124
+ ],
125
+ "type": "ChromeState"
126
+ },
127
+ "sites": [
128
+ "src/chromeState.ts"
129
+ ]
130
+ },
90
131
  "compile": {
91
132
  "kind": "message",
92
133
  "direction": "host->app",
@@ -1683,6 +1724,16 @@
1683
1724
  "src/auth.ts"
1684
1725
  ]
1685
1726
  },
1727
+ "request-chrome-state": {
1728
+ "kind": "poll",
1729
+ "direction": "app->host",
1730
+ "payload": {
1731
+ "fields": []
1732
+ },
1733
+ "sites": [
1734
+ "src/chromeState.ts"
1735
+ ]
1736
+ },
1686
1737
  "request-debug-enabled": {
1687
1738
  "kind": "poll",
1688
1739
  "direction": "app->host",