@immediately-run/sandbox-protocol 0.5.0 → 0.7.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: d2bfa9f03bb31ceb
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-feed' | '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`. */
@@ -154,6 +157,13 @@ export interface ProtocolDndStartDragParams {
154
157
  }
155
158
  /** `protocol-editor` — request · app->host. */
156
159
  export declare const PROTOCOL_EDITOR = "protocol-editor";
160
+ /** `protocol-feed` — request · app->host. */
161
+ export declare const PROTOCOL_FEED = "protocol-feed";
162
+ /** Params of `protocol-feed` method `fetch`. */
163
+ export interface ProtocolFeedFetchParams {
164
+ instanceId: string;
165
+ params?: Record<string, string | number>;
166
+ }
157
167
  /** `protocol-fetch` — request+stream · app->host. */
158
168
  export declare const PROTOCOL_FETCH = "protocol-fetch";
159
169
  /** Params of `protocol-fetch` method `fetch`. */
@@ -273,6 +283,8 @@ export interface RegionMessagePayload {
273
283
  export declare const REQUEST_API_CATALOG = "request-api-catalog";
274
284
  /** `request-auth-state` — poll · app->host. */
275
285
  export declare const REQUEST_AUTH_STATE = "request-auth-state";
286
+ /** `request-chrome-state` — poll · app->host. */
287
+ export declare const REQUEST_CHROME_STATE = "request-chrome-state";
276
288
  /** `request-debug-enabled` — poll · app->host. */
277
289
  export declare const REQUEST_DEBUG_ENABLED = "request-debug-enabled";
278
290
  /** `request-diagnostics` — poll · app->host. */
@@ -337,6 +349,7 @@ export declare const VCS_STATE = "vcs-state";
337
349
  export declare const WIRE_NAMES: {
338
350
  readonly API_CATALOG: "api-catalog";
339
351
  readonly AUTH_STATE: "auth-state";
352
+ readonly CHROME_STATE: "chrome-state";
340
353
  readonly COMPILE: "compile";
341
354
  readonly DEBUG_ENABLED: "debug-enabled";
342
355
  readonly DEBUG_LOG: "debug-log";
@@ -360,6 +373,7 @@ export declare const WIRE_NAMES: {
360
373
  readonly PROTOCOL_CONTRIBUTE: "protocol-contribute";
361
374
  readonly PROTOCOL_DND: "protocol-dnd";
362
375
  readonly PROTOCOL_EDITOR: "protocol-editor";
376
+ readonly PROTOCOL_FEED: "protocol-feed";
363
377
  readonly PROTOCOL_FETCH: "protocol-fetch";
364
378
  readonly PROTOCOL_IPC: "protocol-ipc";
365
379
  readonly PROTOCOL_LAUNCH: "protocol-launch";
@@ -373,6 +387,7 @@ export declare const WIRE_NAMES: {
373
387
  readonly REGION_MESSAGE: "region-message";
374
388
  readonly REQUEST_API_CATALOG: "request-api-catalog";
375
389
  readonly REQUEST_AUTH_STATE: "request-auth-state";
390
+ readonly REQUEST_CHROME_STATE: "request-chrome-state";
376
391
  readonly REQUEST_DEBUG_ENABLED: "request-debug-enabled";
377
392
  readonly REQUEST_DIAGNOSTICS: "request-diagnostics";
378
393
  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: d2bfa9f03bb31ceb
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_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_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.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 = exports.REQUEST_SECRETS_METADATA = 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`. */
@@ -73,6 +76,8 @@ exports.PROTOCOL_CONTRIBUTE = 'protocol-contribute';
73
76
  exports.PROTOCOL_DND = 'protocol-dnd';
74
77
  /** `protocol-editor` — request · app->host. */
75
78
  exports.PROTOCOL_EDITOR = 'protocol-editor';
79
+ /** `protocol-feed` — request · app->host. */
80
+ exports.PROTOCOL_FEED = 'protocol-feed';
76
81
  /** `protocol-fetch` — request+stream · app->host. */
77
82
  exports.PROTOCOL_FETCH = 'protocol-fetch';
78
83
  /** `protocol-ipc` — request · app->host. */
@@ -99,6 +104,8 @@ exports.REGION_MESSAGE = 'region-message';
99
104
  exports.REQUEST_API_CATALOG = 'request-api-catalog';
100
105
  /** `request-auth-state` — poll · app->host. */
101
106
  exports.REQUEST_AUTH_STATE = 'request-auth-state';
107
+ /** `request-chrome-state` — poll · app->host. */
108
+ exports.REQUEST_CHROME_STATE = 'request-chrome-state';
102
109
  /** `request-debug-enabled` — poll · app->host. */
103
110
  exports.REQUEST_DEBUG_ENABLED = 'request-debug-enabled';
104
111
  /** `request-diagnostics` — poll · app->host. */
@@ -151,6 +158,7 @@ exports.VCS_STATE = 'vcs-state';
151
158
  exports.WIRE_NAMES = {
152
159
  API_CATALOG: exports.API_CATALOG,
153
160
  AUTH_STATE: exports.AUTH_STATE,
161
+ CHROME_STATE: exports.CHROME_STATE,
154
162
  COMPILE: exports.COMPILE,
155
163
  DEBUG_ENABLED: exports.DEBUG_ENABLED,
156
164
  DEBUG_LOG: exports.DEBUG_LOG,
@@ -174,6 +182,7 @@ exports.WIRE_NAMES = {
174
182
  PROTOCOL_CONTRIBUTE: exports.PROTOCOL_CONTRIBUTE,
175
183
  PROTOCOL_DND: exports.PROTOCOL_DND,
176
184
  PROTOCOL_EDITOR: exports.PROTOCOL_EDITOR,
185
+ PROTOCOL_FEED: exports.PROTOCOL_FEED,
177
186
  PROTOCOL_FETCH: exports.PROTOCOL_FETCH,
178
187
  PROTOCOL_IPC: exports.PROTOCOL_IPC,
179
188
  PROTOCOL_LAUNCH: exports.PROTOCOL_LAUNCH,
@@ -187,6 +196,7 @@ exports.WIRE_NAMES = {
187
196
  REGION_MESSAGE: exports.REGION_MESSAGE,
188
197
  REQUEST_API_CATALOG: exports.REQUEST_API_CATALOG,
189
198
  REQUEST_AUTH_STATE: exports.REQUEST_AUTH_STATE,
199
+ REQUEST_CHROME_STATE: exports.REQUEST_CHROME_STATE,
190
200
  REQUEST_DEBUG_ENABLED: exports.REQUEST_DEBUG_ENABLED,
191
201
  REQUEST_DIAGNOSTICS: exports.REQUEST_DIAGNOSTICS,
192
202
  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.7.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",
@@ -1067,6 +1108,31 @@
1067
1108
  "src/editor.ts"
1068
1109
  ]
1069
1110
  },
1111
+ "protocol-feed": {
1112
+ "kind": "request",
1113
+ "direction": "app->host",
1114
+ "methods": {
1115
+ "fetch": {
1116
+ "payload": {
1117
+ "fields": [
1118
+ {
1119
+ "name": "instanceId",
1120
+ "optional": false,
1121
+ "type": "string"
1122
+ },
1123
+ {
1124
+ "name": "params",
1125
+ "optional": true,
1126
+ "type": "Record<string, string | number>"
1127
+ }
1128
+ ]
1129
+ }
1130
+ }
1131
+ },
1132
+ "sites": [
1133
+ "src/feed.ts"
1134
+ ]
1135
+ },
1070
1136
  "protocol-fetch": {
1071
1137
  "kind": "request+stream",
1072
1138
  "direction": "app->host",
@@ -1683,6 +1749,16 @@
1683
1749
  "src/auth.ts"
1684
1750
  ]
1685
1751
  },
1752
+ "request-chrome-state": {
1753
+ "kind": "poll",
1754
+ "direction": "app->host",
1755
+ "payload": {
1756
+ "fields": []
1757
+ },
1758
+ "sites": [
1759
+ "src/chromeState.ts"
1760
+ ]
1761
+ },
1686
1762
  "request-debug-enabled": {
1687
1763
  "kind": "poll",
1688
1764
  "direction": "app->host",