@immediately-run/sandbox-protocol 0.4.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 +1 -1
- package/dist/sdk.d.ts +20 -1
- package/dist/sdk.js +13 -3
- package/package.json +3 -2
- package/snapshots/sdk.json +95 -0
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: 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-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`. */
|
|
@@ -91,6 +94,17 @@ export declare const MOUNT_ADD = "mount-add";
|
|
|
91
94
|
/** `mount-remove` — message · host->app. */
|
|
92
95
|
export declare const MOUNT_REMOVE = "mount-remove";
|
|
93
96
|
/** Read off this message today: `id`, `path`, `reason`. */
|
|
97
|
+
/** `protocol-analytics` — request · app->host. */
|
|
98
|
+
export declare const PROTOCOL_ANALYTICS = "protocol-analytics";
|
|
99
|
+
/** Params of `protocol-analytics` method `emit`. */
|
|
100
|
+
export interface ProtocolAnalyticsEmitParams {
|
|
101
|
+
name: string;
|
|
102
|
+
props?: unknown | undefined;
|
|
103
|
+
}
|
|
104
|
+
/** Params of `protocol-analytics` method `route`. */
|
|
105
|
+
export interface ProtocolAnalyticsRouteParams {
|
|
106
|
+
path: string;
|
|
107
|
+
}
|
|
94
108
|
/** `protocol-contribute` — stream · app->host. */
|
|
95
109
|
export declare const PROTOCOL_CONTRIBUTE = "protocol-contribute";
|
|
96
110
|
/** Params of `protocol-contribute` method `run`. */
|
|
@@ -262,6 +276,8 @@ export interface RegionMessagePayload {
|
|
|
262
276
|
export declare const REQUEST_API_CATALOG = "request-api-catalog";
|
|
263
277
|
/** `request-auth-state` — poll · app->host. */
|
|
264
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";
|
|
265
281
|
/** `request-debug-enabled` — poll · app->host. */
|
|
266
282
|
export declare const REQUEST_DEBUG_ENABLED = "request-debug-enabled";
|
|
267
283
|
/** `request-diagnostics` — poll · app->host. */
|
|
@@ -326,6 +342,7 @@ export declare const VCS_STATE = "vcs-state";
|
|
|
326
342
|
export declare const WIRE_NAMES: {
|
|
327
343
|
readonly API_CATALOG: "api-catalog";
|
|
328
344
|
readonly AUTH_STATE: "auth-state";
|
|
345
|
+
readonly CHROME_STATE: "chrome-state";
|
|
329
346
|
readonly COMPILE: "compile";
|
|
330
347
|
readonly DEBUG_ENABLED: "debug-enabled";
|
|
331
348
|
readonly DEBUG_LOG: "debug-log";
|
|
@@ -345,6 +362,7 @@ export declare const WIRE_NAMES: {
|
|
|
345
362
|
readonly METADATA_UPDATE: "metadata-update";
|
|
346
363
|
readonly MOUNT_ADD: "mount-add";
|
|
347
364
|
readonly MOUNT_REMOVE: "mount-remove";
|
|
365
|
+
readonly PROTOCOL_ANALYTICS: "protocol-analytics";
|
|
348
366
|
readonly PROTOCOL_CONTRIBUTE: "protocol-contribute";
|
|
349
367
|
readonly PROTOCOL_DND: "protocol-dnd";
|
|
350
368
|
readonly PROTOCOL_EDITOR: "protocol-editor";
|
|
@@ -361,6 +379,7 @@ export declare const WIRE_NAMES: {
|
|
|
361
379
|
readonly REGION_MESSAGE: "region-message";
|
|
362
380
|
readonly REQUEST_API_CATALOG: "request-api-catalog";
|
|
363
381
|
readonly REQUEST_AUTH_STATE: "request-auth-state";
|
|
382
|
+
readonly REQUEST_CHROME_STATE: "request-chrome-state";
|
|
364
383
|
readonly REQUEST_DEBUG_ENABLED: "request-debug-enabled";
|
|
365
384
|
readonly REQUEST_DIAGNOSTICS: "request-diagnostics";
|
|
366
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:
|
|
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.
|
|
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 = 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`. */
|
|
@@ -65,6 +68,8 @@ exports.MOUNT_ADD = 'mount-add';
|
|
|
65
68
|
/** `mount-remove` — message · host->app. */
|
|
66
69
|
exports.MOUNT_REMOVE = 'mount-remove';
|
|
67
70
|
/** Read off this message today: `id`, `path`, `reason`. */
|
|
71
|
+
/** `protocol-analytics` — request · app->host. */
|
|
72
|
+
exports.PROTOCOL_ANALYTICS = 'protocol-analytics';
|
|
68
73
|
/** `protocol-contribute` — stream · app->host. */
|
|
69
74
|
exports.PROTOCOL_CONTRIBUTE = 'protocol-contribute';
|
|
70
75
|
/** `protocol-dnd` — request · app->host. */
|
|
@@ -97,6 +102,8 @@ exports.REGION_MESSAGE = 'region-message';
|
|
|
97
102
|
exports.REQUEST_API_CATALOG = 'request-api-catalog';
|
|
98
103
|
/** `request-auth-state` — poll · app->host. */
|
|
99
104
|
exports.REQUEST_AUTH_STATE = 'request-auth-state';
|
|
105
|
+
/** `request-chrome-state` — poll · app->host. */
|
|
106
|
+
exports.REQUEST_CHROME_STATE = 'request-chrome-state';
|
|
100
107
|
/** `request-debug-enabled` — poll · app->host. */
|
|
101
108
|
exports.REQUEST_DEBUG_ENABLED = 'request-debug-enabled';
|
|
102
109
|
/** `request-diagnostics` — poll · app->host. */
|
|
@@ -149,6 +156,7 @@ exports.VCS_STATE = 'vcs-state';
|
|
|
149
156
|
exports.WIRE_NAMES = {
|
|
150
157
|
API_CATALOG: exports.API_CATALOG,
|
|
151
158
|
AUTH_STATE: exports.AUTH_STATE,
|
|
159
|
+
CHROME_STATE: exports.CHROME_STATE,
|
|
152
160
|
COMPILE: exports.COMPILE,
|
|
153
161
|
DEBUG_ENABLED: exports.DEBUG_ENABLED,
|
|
154
162
|
DEBUG_LOG: exports.DEBUG_LOG,
|
|
@@ -168,6 +176,7 @@ exports.WIRE_NAMES = {
|
|
|
168
176
|
METADATA_UPDATE: exports.METADATA_UPDATE,
|
|
169
177
|
MOUNT_ADD: exports.MOUNT_ADD,
|
|
170
178
|
MOUNT_REMOVE: exports.MOUNT_REMOVE,
|
|
179
|
+
PROTOCOL_ANALYTICS: exports.PROTOCOL_ANALYTICS,
|
|
171
180
|
PROTOCOL_CONTRIBUTE: exports.PROTOCOL_CONTRIBUTE,
|
|
172
181
|
PROTOCOL_DND: exports.PROTOCOL_DND,
|
|
173
182
|
PROTOCOL_EDITOR: exports.PROTOCOL_EDITOR,
|
|
@@ -184,6 +193,7 @@ exports.WIRE_NAMES = {
|
|
|
184
193
|
REGION_MESSAGE: exports.REGION_MESSAGE,
|
|
185
194
|
REQUEST_API_CATALOG: exports.REQUEST_API_CATALOG,
|
|
186
195
|
REQUEST_AUTH_STATE: exports.REQUEST_AUTH_STATE,
|
|
196
|
+
REQUEST_CHROME_STATE: exports.REQUEST_CHROME_STATE,
|
|
187
197
|
REQUEST_DEBUG_ENABLED: exports.REQUEST_DEBUG_ENABLED,
|
|
188
198
|
REQUEST_DIAGNOSTICS: exports.REQUEST_DIAGNOSTICS,
|
|
189
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.
|
|
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
|
-
"
|
|
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": {
|
package/snapshots/sdk.json
CHANGED
|
@@ -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",
|
|
@@ -753,6 +794,49 @@
|
|
|
753
794
|
"src/mounts.ts"
|
|
754
795
|
]
|
|
755
796
|
},
|
|
797
|
+
"protocol-analytics": {
|
|
798
|
+
"kind": "request",
|
|
799
|
+
"direction": "app->host",
|
|
800
|
+
"methods": {
|
|
801
|
+
"emit": {
|
|
802
|
+
"payload": {
|
|
803
|
+
"fields": [
|
|
804
|
+
{
|
|
805
|
+
"name": "name",
|
|
806
|
+
"optional": false,
|
|
807
|
+
"type": "string"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"name": "props",
|
|
811
|
+
"optional": true,
|
|
812
|
+
"union": [
|
|
813
|
+
{
|
|
814
|
+
"type": "Record<string, AnalyticsPropValue>"
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"type": "undefined"
|
|
818
|
+
}
|
|
819
|
+
]
|
|
820
|
+
}
|
|
821
|
+
]
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
"route": {
|
|
825
|
+
"payload": {
|
|
826
|
+
"fields": [
|
|
827
|
+
{
|
|
828
|
+
"name": "path",
|
|
829
|
+
"optional": false,
|
|
830
|
+
"type": "string"
|
|
831
|
+
}
|
|
832
|
+
]
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
"sites": [
|
|
837
|
+
"src/analytics.ts"
|
|
838
|
+
]
|
|
839
|
+
},
|
|
756
840
|
"protocol-contribute": {
|
|
757
841
|
"kind": "stream",
|
|
758
842
|
"direction": "app->host",
|
|
@@ -1640,6 +1724,16 @@
|
|
|
1640
1724
|
"src/auth.ts"
|
|
1641
1725
|
]
|
|
1642
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
|
+
},
|
|
1643
1737
|
"request-debug-enabled": {
|
|
1644
1738
|
"kind": "poll",
|
|
1645
1739
|
"direction": "app->host",
|
|
@@ -2071,6 +2165,7 @@
|
|
|
2071
2165
|
"dynamicFamilies": {
|
|
2072
2166
|
"protocol-<scheme>": {
|
|
2073
2167
|
"schemes": [
|
|
2168
|
+
"analytics",
|
|
2074
2169
|
"contribute",
|
|
2075
2170
|
"dnd",
|
|
2076
2171
|
"editor",
|