@immediately-run/sandbox-protocol 0.1.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/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # @immediately-run/sandbox-protocol
2
+
3
+ The **sandbox↔SDK wire protocol**: one descriptor set, projected into the wire-name
4
+ constants, the payload types, and the per-side snapshots each repo gates against.
5
+
6
+ `PLATFORM_LAYERING_SPEC` §2 (S1) target 1 — *"one protocol module, sandbox-owned,
7
+ defined in one place and generated into the SDK"*. Built by **R3-274b** inside the
8
+ sandbox repo; moved here by **R3-274b1** so both sides *consume* it instead of one
9
+ side copying a file to the other.
10
+
11
+ ## Why a package, rather than a file in the sandbox repo
12
+
13
+ The SDK does not depend on the sandbox — the build order is SDK → sandpack fork →
14
+ sandbox → site-main — and reading a sibling checkout at build time is precisely the
15
+ coupling **R3-274d** removed. So the generated SDK-side module was, briefly, a file
16
+ copied by hand between repos, with a `descriptorsHash` stamp as the only way to tell a
17
+ stale copy from a current one.
18
+
19
+ A copied artifact drifts *silently*: the failure is a wrong wire string at runtime, not
20
+ a build error. Publishing it makes staleness a version number, and updating it a
21
+ dependency bump.
22
+
23
+ ## What is published
24
+
25
+ | Entry point | What it is |
26
+ |---|---|
27
+ | `@immediately-run/sandbox-protocol/sandbox` | the frame's wire-name constants + payload types |
28
+ | `@immediately-run/sandbox-protocol/sdk` | the SDK's wire-name constants + payload types |
29
+ | `@immediately-run/sandbox-protocol/snapshots/sandbox` | the frame's snapshot, for that repo's gate |
30
+ | `@immediately-run/sandbox-protocol/snapshots/sdk` | the SDK's snapshot, for that repo's gate |
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
+
33
+ **Two modules, not a union.** The sides speak overlapping but different subsets — 34
34
+ wire names in the frame, 57 in the SDK, 18 shared. 39 are SDK-only because the frame
35
+ merely *relays* them and the host is the other end (the R3-274a cross-repo audit). Each
36
+ repo's own gate asserts its module covers *exactly* its extracted wire surface, so a
37
+ union module would fail there, far from its cause.
38
+
39
+ ## Changing the wire
40
+
41
+ Edit **`src/descriptors.protocol.mjs`** — never a generated file — then:
42
+
43
+ ```sh
44
+ npm run generate # descriptors → the four projections
45
+ npm run verify # build + tests + lint + drift + dependency-free
46
+ ```
47
+
48
+ `npm run check:drift` regenerates into a scratch tree and compares **bytes**, then
49
+ proves the snapshots transcribe *back* to the committed descriptors. Generation and
50
+ transcription are inverses; if they stop being, the descriptors are no longer the
51
+ source of truth but a second copy that happens to agree today.
52
+
53
+ The wire is **additive-only** (`SDK_PACKAGING_SPEC` §9): an app pins its SDK version
54
+ and rides it for as long as it likes, so a renamed or reshaped name breaks apps that
55
+ are already published. Add; never rename in place.
56
+
57
+ ## Divergences
58
+
59
+ A few names still mean different things on the two sides — recorded, not hidden. Each
60
+ carries `divergent: true` and a note explaining the disagreement; the tests here fail a
61
+ marker without a note, and fail a divergence marked on only one side. **R3-274e**
62
+ resolves them and clears the markers, so *zero* markers is the goal state rather than
63
+ the normal one.
64
+
65
+ ## Publishing
66
+
67
+ `main` publishes via npm **trusted publishing** (OIDC — no token). Bump `version` in
68
+ `package.json` *and* the lockfile; an unbumped version silently skips the publish and
69
+ the registry keeps serving the old bytes. Verify a release by unpacking the published
70
+ tarball, not by trusting `npm view … version`: a concurrent PR taking the same version
71
+ number is a known silent-skip mode in this org.
72
+
73
+ ## No dependencies, ever
74
+
75
+ Both sides of the seam depend on this package and it depends on neither — that is what
76
+ makes it a safe home for the contract. A runtime dependency here is inherited by every
77
+ consumer, including the browser bundle. `npm run check:dependency-free` asserts it in
78
+ CI rather than trusting anyone to remember.
@@ -0,0 +1,70 @@
1
+ /** The snapshot format both sides' `protocol-snapshot.json` files are written in. */
2
+ export declare const PROTOCOL_FORMAT_VERSION = 1;
3
+ /** Which side of the wire a projection describes. */
4
+ export type ProtocolSide = 'sandbox' | 'sdk';
5
+ /**
6
+ * How a wire name is used.
7
+ *
8
+ * `message` one-way; `push` a host→app state channel; `poll` its `request-*` twin;
9
+ * `request` a `protocol-<scheme>` request/reply; `stream` a streamed reply. A name
10
+ * used two ways carries both, joined — `request+stream`.
11
+ */
12
+ export type WireKind = 'message' | 'push' | 'poll' | 'request' | 'stream' | string;
13
+ /** Direction, written from the FRAME's point of view on both sides. */
14
+ export type WireDirection = 'app->host' | 'host->app' | 'both';
15
+ /** One field of a payload: name, optionality, and its shape. */
16
+ export interface WireField {
17
+ name: string;
18
+ optional: boolean;
19
+ type?: string;
20
+ union?: WireShape[];
21
+ array?: WireShape;
22
+ tuple?: WireShape[];
23
+ fields?: WireField[];
24
+ }
25
+ /** A payload shape: expanded fields, a union, an array/tuple, or a type text. */
26
+ export interface WireShape {
27
+ fields?: WireField[];
28
+ union?: WireShape[];
29
+ array?: WireShape;
30
+ tuple?: WireShape[];
31
+ type?: string;
32
+ /** Field names the side actually reads off the message, when it declares no type. */
33
+ reads?: string[];
34
+ }
35
+ /** One wire name's entry in a snapshot. */
36
+ export interface WireChannel {
37
+ kind: WireKind;
38
+ direction: WireDirection;
39
+ /** Push channels: the `request-*` name that polls them. */
40
+ poll?: string;
41
+ /** Request/stream names: one payload per method — same name, different params. */
42
+ methods?: Record<string, {
43
+ payload: WireShape;
44
+ }>;
45
+ payload?: WireShape;
46
+ /** Push channels: the VALUE the channel carries, distinct from the message. */
47
+ value?: WireShape;
48
+ sites: string[];
49
+ /**
50
+ * Set when the two sides disagree about this name's shape. Phase 1 recorded them;
51
+ * R3-274e resolves each and clears the marker, so a snapshot with none is the goal
52
+ * state rather than the normal one.
53
+ */
54
+ divergent?: boolean;
55
+ divergentNote?: string;
56
+ }
57
+ /** One side's snapshot, as published under `./snapshots/<side>.json`. */
58
+ export interface ProtocolSnapshot {
59
+ formatVersion: typeof PROTOCOL_FORMAT_VERSION;
60
+ /** The package name of the side this describes. */
61
+ repo: string;
62
+ channels: Record<string, WireChannel>;
63
+ /** Names minted from a template at runtime: the scheme LIST, never a wildcard. */
64
+ dynamicFamilies: Record<string, {
65
+ schemes: string[];
66
+ sites: string[];
67
+ }>;
68
+ /** The framing every message on this side rides. */
69
+ envelopes: Record<string, unknown>;
70
+ }
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ // @immediately-run/sandbox-protocol — the sandbox↔SDK wire protocol.
3
+ //
4
+ // ONE definition (`src/descriptors.protocol.mjs`), projected into four artifacts and
5
+ // published so BOTH sides consume the same version instead of one side copying a file
6
+ // to the other (PLATFORM_LAYERING_SPEC §2 / S1; built by R3-274b in the sandbox repo,
7
+ // moved here by R3-274b1).
8
+ //
9
+ // @immediately-run/sandbox-protocol/sandbox the frame's constants + payload types
10
+ // @immediately-run/sandbox-protocol/sdk the SDK's constants + payload types
11
+ // …/snapshots/sandbox.json, …/snapshots/sdk.json the per-side snapshots each
12
+ // repo's own gate compares against
13
+ //
14
+ // The two sides speak overlapping but DIFFERENT subsets — 34 wire names in the frame,
15
+ // 57 in the SDK, 18 shared; 39 are SDK-only because the frame merely relays them and
16
+ // the host is the other end. Hence a module per side: a union module would hand each
17
+ // repo constants it does not speak, and each repo's gate asserts its module covers
18
+ // EXACTLY its own wire surface.
19
+ //
20
+ // This entry point deliberately exports no constants. Importing it must not be a way
21
+ // to reach the other side's vocabulary, and it must not drag either module into a
22
+ // bundle graph that only wanted the version.
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.PROTOCOL_FORMAT_VERSION = void 0;
25
+ /** The snapshot format both sides' `protocol-snapshot.json` files are written in. */
26
+ exports.PROTOCOL_FORMAT_VERSION = 1;
@@ -0,0 +1,188 @@
1
+ /** Every wire name this side speaks, as a union. */
2
+ export type WireName = 'action' | 'api-catalog' | 'artifact-distrust' | 'auth-state' | 'console' | 'done' | 'editor-context' | 'evaluate' | 'form-factor' | 'fs-change' | 'initialized' | 'ir-marker' | 'mount-add' | 'mount-remove' | 'refresh' | 'register-frame' | 'repo-mount' | 'request-api-catalog' | 'request-auth-state' | 'request-editor-context' | 'request-form-factor' | 'request-handshake' | 'request-mounts' | 'request-repo-mount' | 'request-theme' | 'request-vcs-state' | 'resize' | 'sdk-handshake' | 'start' | 'state' | 'status' | 'success' | 'theme' | 'vcs-state';
3
+ /** `action` — message · app->host. */
4
+ export declare const ACTION = "action";
5
+ export interface ActionPayload {
6
+ action: string;
7
+ column: null | number;
8
+ line: null | number;
9
+ message: string;
10
+ path: any;
11
+ payload: {
12
+ frames: Array<unknown>;
13
+ };
14
+ title: string;
15
+ }
16
+ /** `api-catalog` — push · host->app. polled with `request-api-catalog`. */
17
+ export declare const API_CATALOG = "api-catalog";
18
+ export interface ApiCatalogPayload {
19
+ methods: Array<{
20
+ capability: string;
21
+ name: string;
22
+ stream?: boolean | undefined;
23
+ }>;
24
+ }
25
+ /** `artifact-distrust` — message · app->host. */
26
+ export declare const ARTIFACT_DISTRUST = "artifact-distrust";
27
+ export interface ArtifactDistrustPayload {
28
+ commitSha: null | string;
29
+ reason: string;
30
+ }
31
+ /** `auth-state` — push · host->app. polled with `request-auth-state`. */
32
+ export declare const AUTH_STATE = "auth-state";
33
+ /** Read off this message today: `state`. */
34
+ /** `console` — message · app->host. */
35
+ export declare const CONSOLE = "console";
36
+ export interface ConsolePayload {
37
+ log: any;
38
+ }
39
+ /** `done` — message · app->host. */
40
+ export declare const DONE = "done";
41
+ export interface DonePayload {
42
+ compilatonError: boolean;
43
+ }
44
+ /** `editor-context` — push · host->app. polled with `request-editor-context`. DIVERGENT (R3-274e): declared-incomplete — the host (site-main channelBridge.ts) sends {dirtyPaths, openFiles, activeFile, viewedFile}; this side declares only {dirtyPaths, activeFile?} while the SDK reads all four. `viewedFile` (R3-268) and `openFiles` never entered this declaration. R3-274e picks one shape for both sides.. */
45
+ export declare const EDITOR_CONTEXT = "editor-context";
46
+ export interface EditorContextPayload {
47
+ activeFile?: null | string | undefined;
48
+ dirtyPaths: Array<string>;
49
+ }
50
+ /** `evaluate` — message · host->app. */
51
+ export declare const EVALUATE = "evaluate";
52
+ /** Read off this message today: `command`. */
53
+ /** `form-factor` — push · host->app. polled with `request-form-factor`. */
54
+ export declare const FORM_FACTOR = "form-factor";
55
+ /** Read off this message today: `formFactor`. */
56
+ /** `fs-change` — message · host->app. DIVERGENT (R3-274e): subset-reads with no declared owner on either side — the host sends {paths, epoch}; this side reads only `paths`, the SDK reads both. Nothing forces the two to agree, which is the divergence PLATFORM_LAYERING_SPEC §2 names as the exemplar. The `kind` also differs (message here, push channel in the SDK). R3-274e decides: keep `epoch` or drop it.. */
57
+ export declare const FS_CHANGE = "fs-change";
58
+ /** Read off this message today: `paths`. */
59
+ /** `initialized` — message · app->host. */
60
+ export declare const INITIALIZED = "initialized";
61
+ /** `ir-marker` — message · app->host. */
62
+ export declare const IR_MARKER = "ir-marker";
63
+ export interface IrMarkerPayload {
64
+ at: number;
65
+ attrs?: Record<string, unknown> | undefined;
66
+ name: string;
67
+ }
68
+ /** `mount-add` — message · host->app. */
69
+ export declare const MOUNT_ADD = "mount-add";
70
+ /** Read off this message today: `mount`, `ports`. */
71
+ /** `mount-remove` — message · host->app. */
72
+ export declare const MOUNT_REMOVE = "mount-remove";
73
+ /** Read off this message today: `id`, `path`, `reason`. */
74
+ /** `refresh` — message · both. */
75
+ export declare const REFRESH = "refresh";
76
+ /** `register-frame` — message · host->app. */
77
+ export declare const REGISTER_FRAME = "register-frame";
78
+ /** Read off this message today: `dirtyPaths`, `distrustArtifacts`, `fsSnapshot`, `id`, `logLevel`, `region`, `sdkIntegrity`, `template`. */
79
+ /** `repo-mount` — push · host->app. polled with `request-repo-mount`. */
80
+ export declare const REPO_MOUNT = "repo-mount";
81
+ /** Read off this message today: `path`, `uri`. */
82
+ /** `request-api-catalog` — poll · app->host. */
83
+ export declare const REQUEST_API_CATALOG = "request-api-catalog";
84
+ /** `request-auth-state` — poll · app->host. */
85
+ export declare const REQUEST_AUTH_STATE = "request-auth-state";
86
+ /** `request-editor-context` — poll · app->host. */
87
+ export declare const REQUEST_EDITOR_CONTEXT = "request-editor-context";
88
+ /** `request-form-factor` — poll · app->host. */
89
+ export declare const REQUEST_FORM_FACTOR = "request-form-factor";
90
+ /** `request-handshake` — message · host->app. */
91
+ export declare const REQUEST_HANDSHAKE = "request-handshake";
92
+ /** `request-mounts` — message · app->host. */
93
+ export declare const REQUEST_MOUNTS = "request-mounts";
94
+ /** `request-repo-mount` — poll · app->host. */
95
+ export declare const REQUEST_REPO_MOUNT = "request-repo-mount";
96
+ /** `request-theme` — poll · app->host. */
97
+ export declare const REQUEST_THEME = "request-theme";
98
+ /** `request-vcs-state` — poll · app->host. */
99
+ export declare const REQUEST_VCS_STATE = "request-vcs-state";
100
+ /** `resize` — message · app->host. */
101
+ export declare const RESIZE = "resize";
102
+ export interface ResizePayload {
103
+ height: number;
104
+ }
105
+ /** `sdk-handshake` — message · app->host. DIVERGENT (R3-274e): divergent-declared — TWO producers of one name with different payloads: this frame announces {protocolVersion, sandboxProtocolVersion}, the SDK announces {protocolVersion, sdkVersion}. R3-274d gave the frame its own SANDBOX_PROTOCOL_VERSION (announced additively; the host logs it, fail-open) and retired the sibling-checkout read that used to source `protocolVersion`. R3-274e picks one shape.. */
106
+ export declare const SDK_HANDSHAKE = "sdk-handshake";
107
+ export interface SdkHandshakePayload {
108
+ protocolVersion: string;
109
+ sandboxProtocolVersion: string;
110
+ }
111
+ /** `start` — message · app->host. */
112
+ export declare const START = "start";
113
+ export interface StartPayload {
114
+ firstLoad: boolean;
115
+ }
116
+ /** `state` — message · app->host. */
117
+ export declare const STATE = "state";
118
+ export interface StatePayload {
119
+ state: {
120
+ transpiledModules: unknown;
121
+ };
122
+ }
123
+ /** `status` — message · app->host. */
124
+ export declare const STATUS = "status";
125
+ export interface StatusPayload {
126
+ status: "evaluating" | "idle" | "initializing" | "installing-dependencies" | "running-tests" | "transpiling";
127
+ }
128
+ /** `success` — message · app->host. */
129
+ export declare const SUCCESS = "success";
130
+ /** `theme` — push · host->app. polled with `request-theme`. */
131
+ export declare const THEME = "theme";
132
+ export interface ThemePayload {
133
+ theme: "dark" | "light";
134
+ }
135
+ /** `vcs-state` — push · host->app. polled with `request-vcs-state`. */
136
+ export declare const VCS_STATE = "vcs-state";
137
+ export interface VcsStatePayload {
138
+ branch?: {
139
+ name: string;
140
+ parentCommitSha: string;
141
+ parentRef: string;
142
+ parentRepo: string;
143
+ upstreamPushable: boolean | null;
144
+ } | null | undefined;
145
+ changes: Array<{
146
+ path: string;
147
+ status: "created" | "modified" | "deleted";
148
+ }>;
149
+ diffLoading?: false | true | undefined;
150
+ prs?: Array<unknown> | undefined;
151
+ }
152
+ /** Every wire name this side speaks, keyed by its constant. */
153
+ export declare const WIRE_NAMES: {
154
+ readonly ACTION: "action";
155
+ readonly API_CATALOG: "api-catalog";
156
+ readonly ARTIFACT_DISTRUST: "artifact-distrust";
157
+ readonly AUTH_STATE: "auth-state";
158
+ readonly CONSOLE: "console";
159
+ readonly DONE: "done";
160
+ readonly EDITOR_CONTEXT: "editor-context";
161
+ readonly EVALUATE: "evaluate";
162
+ readonly FORM_FACTOR: "form-factor";
163
+ readonly FS_CHANGE: "fs-change";
164
+ readonly INITIALIZED: "initialized";
165
+ readonly IR_MARKER: "ir-marker";
166
+ readonly MOUNT_ADD: "mount-add";
167
+ readonly MOUNT_REMOVE: "mount-remove";
168
+ readonly REFRESH: "refresh";
169
+ readonly REGISTER_FRAME: "register-frame";
170
+ readonly REPO_MOUNT: "repo-mount";
171
+ readonly REQUEST_API_CATALOG: "request-api-catalog";
172
+ readonly REQUEST_AUTH_STATE: "request-auth-state";
173
+ readonly REQUEST_EDITOR_CONTEXT: "request-editor-context";
174
+ readonly REQUEST_FORM_FACTOR: "request-form-factor";
175
+ readonly REQUEST_HANDSHAKE: "request-handshake";
176
+ readonly REQUEST_MOUNTS: "request-mounts";
177
+ readonly REQUEST_REPO_MOUNT: "request-repo-mount";
178
+ readonly REQUEST_THEME: "request-theme";
179
+ readonly REQUEST_VCS_STATE: "request-vcs-state";
180
+ readonly RESIZE: "resize";
181
+ readonly SDK_HANDSHAKE: "sdk-handshake";
182
+ readonly START: "start";
183
+ readonly STATE: "state";
184
+ readonly STATUS: "status";
185
+ readonly SUCCESS: "success";
186
+ readonly THEME: "theme";
187
+ readonly VCS_STATE: "vcs-state";
188
+ };
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ // GENERATED by scripts/generate.mjs — DO NOT EDIT.
3
+ // Source of truth: src/descriptors.protocol.mjs (@immediately-run/sandbox-protocol)
4
+ // descriptorsHash: fbd9b76f9e8edc71
5
+ //
6
+ // The sandbox↔SDK wire vocabulary (PLATFORM_LAYERING_SPEC §2 / S1). Import the
7
+ // constants instead of writing the string: a rename then has ONE edit site and
8
+ // the protocol snapshot gate sees it. Payload types are emitted for every name
9
+ // that has a declared shape; a name handled as `any` today gets its read field
10
+ // list in the doc comment instead (R3-274e is where those grow real types).
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.WIRE_NAMES = exports.VCS_STATE = exports.THEME = exports.SUCCESS = exports.STATUS = exports.STATE = exports.START = exports.SDK_HANDSHAKE = exports.RESIZE = exports.REQUEST_VCS_STATE = exports.REQUEST_THEME = exports.REQUEST_REPO_MOUNT = exports.REQUEST_MOUNTS = exports.REQUEST_HANDSHAKE = exports.REQUEST_FORM_FACTOR = exports.REQUEST_EDITOR_CONTEXT = exports.REQUEST_AUTH_STATE = exports.REQUEST_API_CATALOG = exports.REPO_MOUNT = exports.REGISTER_FRAME = exports.REFRESH = exports.MOUNT_REMOVE = exports.MOUNT_ADD = exports.IR_MARKER = exports.INITIALIZED = exports.FS_CHANGE = exports.FORM_FACTOR = exports.EVALUATE = exports.EDITOR_CONTEXT = exports.DONE = exports.CONSOLE = exports.AUTH_STATE = exports.ARTIFACT_DISTRUST = exports.API_CATALOG = exports.ACTION = void 0;
13
+ /** `action` — message · app->host. */
14
+ exports.ACTION = 'action';
15
+ /** `api-catalog` — push · host->app. polled with `request-api-catalog`. */
16
+ exports.API_CATALOG = 'api-catalog';
17
+ /** `artifact-distrust` — message · app->host. */
18
+ exports.ARTIFACT_DISTRUST = 'artifact-distrust';
19
+ /** `auth-state` — push · host->app. polled with `request-auth-state`. */
20
+ exports.AUTH_STATE = 'auth-state';
21
+ /** Read off this message today: `state`. */
22
+ /** `console` — message · app->host. */
23
+ exports.CONSOLE = 'console';
24
+ /** `done` — message · app->host. */
25
+ exports.DONE = 'done';
26
+ /** `editor-context` — push · host->app. polled with `request-editor-context`. DIVERGENT (R3-274e): declared-incomplete — the host (site-main channelBridge.ts) sends {dirtyPaths, openFiles, activeFile, viewedFile}; this side declares only {dirtyPaths, activeFile?} while the SDK reads all four. `viewedFile` (R3-268) and `openFiles` never entered this declaration. R3-274e picks one shape for both sides.. */
27
+ exports.EDITOR_CONTEXT = 'editor-context';
28
+ /** `evaluate` — message · host->app. */
29
+ exports.EVALUATE = 'evaluate';
30
+ /** Read off this message today: `command`. */
31
+ /** `form-factor` — push · host->app. polled with `request-form-factor`. */
32
+ exports.FORM_FACTOR = 'form-factor';
33
+ /** Read off this message today: `formFactor`. */
34
+ /** `fs-change` — message · host->app. DIVERGENT (R3-274e): subset-reads with no declared owner on either side — the host sends {paths, epoch}; this side reads only `paths`, the SDK reads both. Nothing forces the two to agree, which is the divergence PLATFORM_LAYERING_SPEC §2 names as the exemplar. The `kind` also differs (message here, push channel in the SDK). R3-274e decides: keep `epoch` or drop it.. */
35
+ exports.FS_CHANGE = 'fs-change';
36
+ /** Read off this message today: `paths`. */
37
+ /** `initialized` — message · app->host. */
38
+ exports.INITIALIZED = 'initialized';
39
+ /** `ir-marker` — message · app->host. */
40
+ exports.IR_MARKER = 'ir-marker';
41
+ /** `mount-add` — message · host->app. */
42
+ exports.MOUNT_ADD = 'mount-add';
43
+ /** Read off this message today: `mount`, `ports`. */
44
+ /** `mount-remove` — message · host->app. */
45
+ exports.MOUNT_REMOVE = 'mount-remove';
46
+ /** Read off this message today: `id`, `path`, `reason`. */
47
+ /** `refresh` — message · both. */
48
+ exports.REFRESH = 'refresh';
49
+ /** `register-frame` — message · host->app. */
50
+ exports.REGISTER_FRAME = 'register-frame';
51
+ /** Read off this message today: `dirtyPaths`, `distrustArtifacts`, `fsSnapshot`, `id`, `logLevel`, `region`, `sdkIntegrity`, `template`. */
52
+ /** `repo-mount` — push · host->app. polled with `request-repo-mount`. */
53
+ exports.REPO_MOUNT = 'repo-mount';
54
+ /** Read off this message today: `path`, `uri`. */
55
+ /** `request-api-catalog` — poll · app->host. */
56
+ exports.REQUEST_API_CATALOG = 'request-api-catalog';
57
+ /** `request-auth-state` — poll · app->host. */
58
+ exports.REQUEST_AUTH_STATE = 'request-auth-state';
59
+ /** `request-editor-context` — poll · app->host. */
60
+ exports.REQUEST_EDITOR_CONTEXT = 'request-editor-context';
61
+ /** `request-form-factor` — poll · app->host. */
62
+ exports.REQUEST_FORM_FACTOR = 'request-form-factor';
63
+ /** `request-handshake` — message · host->app. */
64
+ exports.REQUEST_HANDSHAKE = 'request-handshake';
65
+ /** `request-mounts` — message · app->host. */
66
+ exports.REQUEST_MOUNTS = 'request-mounts';
67
+ /** `request-repo-mount` — poll · app->host. */
68
+ exports.REQUEST_REPO_MOUNT = 'request-repo-mount';
69
+ /** `request-theme` — poll · app->host. */
70
+ exports.REQUEST_THEME = 'request-theme';
71
+ /** `request-vcs-state` — poll · app->host. */
72
+ exports.REQUEST_VCS_STATE = 'request-vcs-state';
73
+ /** `resize` — message · app->host. */
74
+ exports.RESIZE = 'resize';
75
+ /** `sdk-handshake` — message · app->host. DIVERGENT (R3-274e): divergent-declared — TWO producers of one name with different payloads: this frame announces {protocolVersion, sandboxProtocolVersion}, the SDK announces {protocolVersion, sdkVersion}. R3-274d gave the frame its own SANDBOX_PROTOCOL_VERSION (announced additively; the host logs it, fail-open) and retired the sibling-checkout read that used to source `protocolVersion`. R3-274e picks one shape.. */
76
+ exports.SDK_HANDSHAKE = 'sdk-handshake';
77
+ /** `start` — message · app->host. */
78
+ exports.START = 'start';
79
+ /** `state` — message · app->host. */
80
+ exports.STATE = 'state';
81
+ /** `status` — message · app->host. */
82
+ exports.STATUS = 'status';
83
+ /** `success` — message · app->host. */
84
+ exports.SUCCESS = 'success';
85
+ /** `theme` — push · host->app. polled with `request-theme`. */
86
+ exports.THEME = 'theme';
87
+ /** `vcs-state` — push · host->app. polled with `request-vcs-state`. */
88
+ exports.VCS_STATE = 'vcs-state';
89
+ /** Every wire name this side speaks, keyed by its constant. */
90
+ exports.WIRE_NAMES = {
91
+ ACTION: exports.ACTION,
92
+ API_CATALOG: exports.API_CATALOG,
93
+ ARTIFACT_DISTRUST: exports.ARTIFACT_DISTRUST,
94
+ AUTH_STATE: exports.AUTH_STATE,
95
+ CONSOLE: exports.CONSOLE,
96
+ DONE: exports.DONE,
97
+ EDITOR_CONTEXT: exports.EDITOR_CONTEXT,
98
+ EVALUATE: exports.EVALUATE,
99
+ FORM_FACTOR: exports.FORM_FACTOR,
100
+ FS_CHANGE: exports.FS_CHANGE,
101
+ INITIALIZED: exports.INITIALIZED,
102
+ IR_MARKER: exports.IR_MARKER,
103
+ MOUNT_ADD: exports.MOUNT_ADD,
104
+ MOUNT_REMOVE: exports.MOUNT_REMOVE,
105
+ REFRESH: exports.REFRESH,
106
+ REGISTER_FRAME: exports.REGISTER_FRAME,
107
+ REPO_MOUNT: exports.REPO_MOUNT,
108
+ REQUEST_API_CATALOG: exports.REQUEST_API_CATALOG,
109
+ REQUEST_AUTH_STATE: exports.REQUEST_AUTH_STATE,
110
+ REQUEST_EDITOR_CONTEXT: exports.REQUEST_EDITOR_CONTEXT,
111
+ REQUEST_FORM_FACTOR: exports.REQUEST_FORM_FACTOR,
112
+ REQUEST_HANDSHAKE: exports.REQUEST_HANDSHAKE,
113
+ REQUEST_MOUNTS: exports.REQUEST_MOUNTS,
114
+ REQUEST_REPO_MOUNT: exports.REQUEST_REPO_MOUNT,
115
+ REQUEST_THEME: exports.REQUEST_THEME,
116
+ REQUEST_VCS_STATE: exports.REQUEST_VCS_STATE,
117
+ RESIZE: exports.RESIZE,
118
+ SDK_HANDSHAKE: exports.SDK_HANDSHAKE,
119
+ START: exports.START,
120
+ STATE: exports.STATE,
121
+ STATUS: exports.STATUS,
122
+ SUCCESS: exports.SUCCESS,
123
+ THEME: exports.THEME,
124
+ VCS_STATE: exports.VCS_STATE,
125
+ };