@immediately-run/sandbox-protocol 0.8.2 → 0.9.1
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 +6 -1
- package/dist/index.js +5 -2
- package/dist/sandbox.js +1 -1
- package/dist/sdk.d.ts +8 -1
- package/dist/sdk.js +10 -3
- package/package.json +1 -1
- package/snapshots/sdk.json +41 -0
package/README.md
CHANGED
|
@@ -31,11 +31,16 @@ 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,
|
|
34
|
+
wire names in the frame, 70 in the SDK, 18 shared. 52 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.
|
|
38
38
|
|
|
39
|
+
*(Those four numbers are asserted against the descriptors by `test/protocol.test.ts`, in
|
|
40
|
+
this file and in `src/index.ts`. They had drifted — the SDK counts above were wrong —
|
|
41
|
+
because prose counts in a comment are believed by the next reader and checked by
|
|
42
|
+
nobody.)*
|
|
43
|
+
|
|
39
44
|
## Changing the wire
|
|
40
45
|
|
|
41
46
|
Edit **`src/descriptors.protocol.mjs`** — never a generated file — then:
|
package/dist/index.js
CHANGED
|
@@ -12,8 +12,11 @@
|
|
|
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
|
-
//
|
|
16
|
-
// the host is the other end.
|
|
15
|
+
// 70 in the SDK, 18 shared; 52 are SDK-only because the frame merely relays them and
|
|
16
|
+
// the host is the other end. (These four counts are ASSERTED against the descriptors by
|
|
17
|
+
// `test/protocol.test.ts` — they are shipped in `dist/index.d.ts`, so a reader downloads
|
|
18
|
+
// them, and they had drifted to 57/39 because nothing checked.) Hence a module per side:
|
|
19
|
+
// a union module would hand each
|
|
17
20
|
// repo constants it does not speak, and each repo's gate asserts its module covers
|
|
18
21
|
// EXACTLY its own wire surface.
|
|
19
22
|
//
|
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:
|
|
4
|
+
// descriptorsHash: bae10b25b5d76525
|
|
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-recents' | '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-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-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`. */
|
|
@@ -286,6 +286,9 @@ export interface RegionMessagePayload {
|
|
|
286
286
|
data: unknown;
|
|
287
287
|
from: string;
|
|
288
288
|
}
|
|
289
|
+
/** `region-visibility` — push · host->app. polled with `request-region-visibility`. */
|
|
290
|
+
export declare const REGION_VISIBILITY = "region-visibility";
|
|
291
|
+
/** Read off this message today: `hidden`. */
|
|
289
292
|
/** `request-api-catalog` — poll · app->host. */
|
|
290
293
|
export declare const REQUEST_API_CATALOG = "request-api-catalog";
|
|
291
294
|
/** `request-auth-state` — poll · app->host. */
|
|
@@ -310,6 +313,8 @@ export declare const REQUEST_INVITATIONS = "request-invitations";
|
|
|
310
313
|
export declare const REQUEST_LLM_PROVIDER = "request-llm-provider";
|
|
311
314
|
/** `request-mounts` — message · app->host. */
|
|
312
315
|
export declare const REQUEST_MOUNTS = "request-mounts";
|
|
316
|
+
/** `request-region-visibility` — poll · app->host. */
|
|
317
|
+
export declare const REQUEST_REGION_VISIBILITY = "request-region-visibility";
|
|
313
318
|
/** `request-secrets-metadata` — poll · app->host. */
|
|
314
319
|
export declare const REQUEST_SECRETS_METADATA = "request-secrets-metadata";
|
|
315
320
|
/** `request-session-mounts` — poll · app->host. */
|
|
@@ -403,6 +408,7 @@ export declare const WIRE_NAMES: {
|
|
|
403
408
|
readonly PROTOCOL_THEME: "protocol-theme";
|
|
404
409
|
readonly PROTOCOL_VCS: "protocol-vcs";
|
|
405
410
|
readonly REGION_MESSAGE: "region-message";
|
|
411
|
+
readonly REGION_VISIBILITY: "region-visibility";
|
|
406
412
|
readonly REQUEST_API_CATALOG: "request-api-catalog";
|
|
407
413
|
readonly REQUEST_AUTH_STATE: "request-auth-state";
|
|
408
414
|
readonly REQUEST_CHROME_STATE: "request-chrome-state";
|
|
@@ -415,6 +421,7 @@ export declare const WIRE_NAMES: {
|
|
|
415
421
|
readonly REQUEST_INVITATIONS: "request-invitations";
|
|
416
422
|
readonly REQUEST_LLM_PROVIDER: "request-llm-provider";
|
|
417
423
|
readonly REQUEST_MOUNTS: "request-mounts";
|
|
424
|
+
readonly REQUEST_REGION_VISIBILITY: "request-region-visibility";
|
|
418
425
|
readonly REQUEST_SECRETS_METADATA: "request-secrets-metadata";
|
|
419
426
|
readonly REQUEST_SESSION_MOUNTS: "request-session-mounts";
|
|
420
427
|
readonly REQUEST_THEME: "request-theme";
|
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:
|
|
4
|
+
// descriptorsHash: bae10b25b5d76525
|
|
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.
|
|
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_MOUNTS = void 0;
|
|
12
|
+
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_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_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 = 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`. */
|
|
@@ -102,6 +102,9 @@ exports.PROTOCOL_THEME = 'protocol-theme';
|
|
|
102
102
|
exports.PROTOCOL_VCS = 'protocol-vcs';
|
|
103
103
|
/** `region-message` — message · host->app. */
|
|
104
104
|
exports.REGION_MESSAGE = 'region-message';
|
|
105
|
+
/** `region-visibility` — push · host->app. polled with `request-region-visibility`. */
|
|
106
|
+
exports.REGION_VISIBILITY = 'region-visibility';
|
|
107
|
+
/** Read off this message today: `hidden`. */
|
|
105
108
|
/** `request-api-catalog` — poll · app->host. */
|
|
106
109
|
exports.REQUEST_API_CATALOG = 'request-api-catalog';
|
|
107
110
|
/** `request-auth-state` — poll · app->host. */
|
|
@@ -126,6 +129,8 @@ exports.REQUEST_INVITATIONS = 'request-invitations';
|
|
|
126
129
|
exports.REQUEST_LLM_PROVIDER = 'request-llm-provider';
|
|
127
130
|
/** `request-mounts` — message · app->host. */
|
|
128
131
|
exports.REQUEST_MOUNTS = 'request-mounts';
|
|
132
|
+
/** `request-region-visibility` — poll · app->host. */
|
|
133
|
+
exports.REQUEST_REGION_VISIBILITY = 'request-region-visibility';
|
|
129
134
|
/** `request-secrets-metadata` — poll · app->host. */
|
|
130
135
|
exports.REQUEST_SECRETS_METADATA = 'request-secrets-metadata';
|
|
131
136
|
/** `request-session-mounts` — poll · app->host. */
|
|
@@ -207,6 +212,7 @@ exports.WIRE_NAMES = {
|
|
|
207
212
|
PROTOCOL_THEME: exports.PROTOCOL_THEME,
|
|
208
213
|
PROTOCOL_VCS: exports.PROTOCOL_VCS,
|
|
209
214
|
REGION_MESSAGE: exports.REGION_MESSAGE,
|
|
215
|
+
REGION_VISIBILITY: exports.REGION_VISIBILITY,
|
|
210
216
|
REQUEST_API_CATALOG: exports.REQUEST_API_CATALOG,
|
|
211
217
|
REQUEST_AUTH_STATE: exports.REQUEST_AUTH_STATE,
|
|
212
218
|
REQUEST_CHROME_STATE: exports.REQUEST_CHROME_STATE,
|
|
@@ -219,6 +225,7 @@ exports.WIRE_NAMES = {
|
|
|
219
225
|
REQUEST_INVITATIONS: exports.REQUEST_INVITATIONS,
|
|
220
226
|
REQUEST_LLM_PROVIDER: exports.REQUEST_LLM_PROVIDER,
|
|
221
227
|
REQUEST_MOUNTS: exports.REQUEST_MOUNTS,
|
|
228
|
+
REQUEST_REGION_VISIBILITY: exports.REQUEST_REGION_VISIBILITY,
|
|
222
229
|
REQUEST_SECRETS_METADATA: exports.REQUEST_SECRETS_METADATA,
|
|
223
230
|
REQUEST_SESSION_MOUNTS: exports.REQUEST_SESSION_MOUNTS,
|
|
224
231
|
REQUEST_THEME: exports.REQUEST_THEME,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@immediately-run/sandbox-protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
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": {
|
package/snapshots/sdk.json
CHANGED
|
@@ -742,6 +742,16 @@
|
|
|
742
742
|
"union": [
|
|
743
743
|
{
|
|
744
744
|
"fields": [
|
|
745
|
+
{
|
|
746
|
+
"name": "displayName",
|
|
747
|
+
"optional": true,
|
|
748
|
+
"type": "string | undefined"
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"name": "executor",
|
|
752
|
+
"optional": true,
|
|
753
|
+
"type": "ChatExecutor | undefined"
|
|
754
|
+
},
|
|
745
755
|
{
|
|
746
756
|
"name": "features",
|
|
747
757
|
"optional": false,
|
|
@@ -752,6 +762,11 @@
|
|
|
752
762
|
"optional": false,
|
|
753
763
|
"type": "boolean"
|
|
754
764
|
},
|
|
765
|
+
{
|
|
766
|
+
"name": "models",
|
|
767
|
+
"optional": true,
|
|
768
|
+
"type": "ChatTierModels | undefined"
|
|
769
|
+
},
|
|
755
770
|
{
|
|
756
771
|
"name": "providerId",
|
|
757
772
|
"optional": false,
|
|
@@ -1843,6 +1858,22 @@
|
|
|
1843
1858
|
"src/ipc.ts"
|
|
1844
1859
|
]
|
|
1845
1860
|
},
|
|
1861
|
+
"region-visibility": {
|
|
1862
|
+
"kind": "push",
|
|
1863
|
+
"direction": "host->app",
|
|
1864
|
+
"poll": "request-region-visibility",
|
|
1865
|
+
"payload": {
|
|
1866
|
+
"reads": [
|
|
1867
|
+
"hidden"
|
|
1868
|
+
]
|
|
1869
|
+
},
|
|
1870
|
+
"value": {
|
|
1871
|
+
"type": "boolean"
|
|
1872
|
+
},
|
|
1873
|
+
"sites": [
|
|
1874
|
+
"src/region.ts"
|
|
1875
|
+
]
|
|
1876
|
+
},
|
|
1846
1877
|
"request-api-catalog": {
|
|
1847
1878
|
"kind": "poll",
|
|
1848
1879
|
"direction": "app->host",
|
|
@@ -1963,6 +1994,16 @@
|
|
|
1963
1994
|
"src/mounts.ts"
|
|
1964
1995
|
]
|
|
1965
1996
|
},
|
|
1997
|
+
"request-region-visibility": {
|
|
1998
|
+
"kind": "poll",
|
|
1999
|
+
"direction": "app->host",
|
|
2000
|
+
"payload": {
|
|
2001
|
+
"fields": []
|
|
2002
|
+
},
|
|
2003
|
+
"sites": [
|
|
2004
|
+
"src/region.ts"
|
|
2005
|
+
]
|
|
2006
|
+
},
|
|
1966
2007
|
"request-secrets-metadata": {
|
|
1967
2008
|
"kind": "poll",
|
|
1968
2009
|
"direction": "app->host",
|