@immediately-run/sdk 0.52.0 → 0.53.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 CHANGED
@@ -73,6 +73,36 @@ check against the committed snapshot). Run it before pushing; it is the same set
73
73
  checks CI enforces, so a local green equals a green CI. (Ways of working §4: the local
74
74
  verify gate must equal the deploy gate — one `npm run verify` per repo.)
75
75
 
76
+ ### The API-stability gate (`api:check`)
77
+
78
+ A pinned or forked app rides one SDK version forever, so the public API is
79
+ **additive-only** (SDK_PACKAGING_SPEC §9). `api-snapshot.json` records the **shape**
80
+ of every export — not just its name — and `npm run api:check` fails when that shape
81
+ shrinks:
82
+
83
+ | Recorded as | Example |
84
+ |---|---|
85
+ | `interface(a, b?, c(1..2))` | members, sorted; `?` = optional; `(required..total)` = a callable member's arity |
86
+ | `object(…)` / `class(…)` / `enum(…)` | same member vocabulary |
87
+ | `union(a\|b\|c)` | a type alias's union members, normalised + sorted |
88
+ | `fn(1..2)` | a function's `required..total` parameter arity |
89
+ | `const(T)` / `alias(T)` | the normalised type text |
90
+
91
+ So removing an export, dropping an interface field, flipping a field's optionality,
92
+ dropping a union member, or dropping a function parameter all fail — each of them
93
+ breaks a pinned consumer at compile time, and each of them passed the pre-R3-261
94
+ names-only check. Member and parameter **types** are deliberately not compared; see
95
+ the "Deliberate limit" note in [`scripts/lib/dts-shape.mjs`](./scripts/lib/dts-shape.mjs).
96
+
97
+ - **Additive change** (a new export, a new optional field): run `npm run api:update`
98
+ and commit the snapshot, so every API change lands in a reviewed diff.
99
+ - **Deliberate removal**: add an entry to [`api-removals.json`](./api-removals.json)
100
+ with a **reason**, then `npm run api:update`. Without an entry the updater refuses
101
+ to write, so re-running it is not a way past the gate.
102
+ - `npm run api:selftest` proves the gate can fail — it drives the real extractor over
103
+ crafted `.d.ts` fixtures for each break above, checks that additive changes are
104
+ *not* reported as breaking, and pins the two documented blind spots.
105
+
76
106
  ## License
77
107
 
78
108
  [MIT](./LICENSE)
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var chromeState_exports = {};
20
+ __export(chromeState_exports, {
21
+ getChromeState: () => getChromeState,
22
+ onChromeStateChange: () => onChromeStateChange,
23
+ useChromeState: () => useChromeState
24
+ });
25
+ module.exports = __toCommonJS(chromeState_exports);
26
+ var import_pushChannel = require("./pushChannel");
27
+ var import_protocol = require("./generated/protocol");
28
+ const DEFAULT_CHROME_STATE = { overlay: "none", tab: { edge: "top-right" } };
29
+ const isChromeState = (v) => {
30
+ const c = v;
31
+ return !!c && (c.overlay === "none" || c.overlay === "menu") && !!c.tab && typeof c.tab === "object" && c.tab.edge === "top-right";
32
+ };
33
+ const channel = (0, import_pushChannel.createPushChannel)({
34
+ pushType: import_protocol.CHROME_STATE,
35
+ requestType: import_protocol.REQUEST_CHROME_STATE,
36
+ initial: DEFAULT_CHROME_STATE,
37
+ parse: (msg) => isChromeState(msg.chromeState) ? msg.chromeState : void 0
38
+ });
39
+ const getChromeState = () => channel.get();
40
+ const onChromeStateChange = (listener) => channel.onChange(listener);
41
+ const useChromeState = () => channel.use();
42
+ // Annotate the CommonJS export names for ESM import in node:
43
+ 0 && (module.exports = {
44
+ getChromeState,
45
+ onChromeStateChange,
46
+ useChromeState
47
+ });
48
+ //# sourceMappingURL=chromeState.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/chromeState.ts"],"sourcesContent":["import { createPushChannel } from './pushChannel';\nimport { CHROME_STATE, REQUEST_CHROME_STATE } from './generated/protocol';\n\n/**\n * What the immediately.run host's own chrome is currently doing over your app\n * (PRESENT_MODE_CHROME_SPEC §6). In run (\"present\") mode the platform shows a\n * single pull-down tab in one corner; activating it opens the platform menu —\n * an anchored panel on desktop, a bottom sheet on mobile — and the host dims\n * and slightly insets your app behind it.\n *\n * Reading this is **entirely optional**. No platform behavior depends on your\n * app consuming it, and an app that never reads it behaves identically\n * (R-PMC-18) — the platform never requires immediately.run knowledge of an app\n * (product value 3). It exists for the two things a cooperative app can do\n * better with it than without:\n *\n * - **Pause while dimmed.** `overlay === 'menu'` means the user is looking at\n * platform chrome, not at you: a good moment to pause a video, an animation,\n * or a polling loop.\n * - **Keep the corner clear.** `tab.edge` says where the platform's tab sits, so\n * a floating control of your own can avoid overlapping it.\n *\n * Baseline capability `chrome:read` — every app may read it. It is a read of the\n * host's own UI state and discloses nothing app-foreign; there is deliberately no\n * counterpart that lets an app *operate* platform chrome.\n *\n * ```ts\n * import { onChromeStateChange } from '@immediately-run/sdk';\n *\n * onChromeStateChange(({ overlay }) => {\n * if (overlay === 'menu') video.pause();\n * });\n * ```\n */\nexport interface ChromeState {\n /**\n * `'menu'` while the platform menu / bottom sheet (and its scrim) is open over\n * your app; `'none'` at rest. Edit mode reports `'none'` — the workbench chrome\n * is beside your app, not over it.\n */\n overlay: 'none' | 'menu';\n /** Where the platform's pull-down tab sits. Only one edge exists today. */\n tab: { edge: 'top-right' };\n}\n\n/**\n * Assumed before the host reports — and the value that stands forever on a host\n * that never pushes this channel (an older host, or one that does not paint\n * present-mode chrome at all). \"Nothing is over you\" is the safe default: an app\n * that gates a pause on it simply never pauses.\n */\nconst DEFAULT_CHROME_STATE: ChromeState = { overlay: 'none', tab: { edge: 'top-right' } };\n\nconst isChromeState = (v: unknown): v is ChromeState => {\n const c = v as Partial<ChromeState> | null;\n return (\n !!c &&\n (c.overlay === 'none' || c.overlay === 'menu') &&\n !!c.tab &&\n typeof c.tab === 'object' &&\n (c.tab as ChromeState['tab']).edge === 'top-right'\n );\n};\n\n// Read over the transport (SDK_PACKAGING_SPEC §4): the host pushes `chrome-state`\n// and answers `request-chrome-state` (wire format: site-main channelBridge.ts).\nconst channel = createPushChannel<ChromeState>({\n pushType: CHROME_STATE,\n requestType: REQUEST_CHROME_STATE,\n initial: DEFAULT_CHROME_STATE,\n parse: (msg) => (isChromeState(msg.chromeState) ? (msg.chromeState as ChromeState) : undefined),\n});\n\n/** Returns the current chrome state. Poll for a one-off read. */\nexport const getChromeState = (): ChromeState => channel.get();\n\n/**\n * Subscribe to chrome-state changes. The listener is invoked immediately with the\n * current value, then again on every change. Returns an unsubscribe fn.\n */\nexport const onChromeStateChange = (listener: (chromeState: ChromeState) => void): (() => void) =>\n channel.onChange(listener);\n\n/** React hook returning the current chrome state, re-rendering on change. */\nexport const useChromeState = (): ChromeState => channel.use();\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAkC;AAClC,sBAAmD;AAkDnD,MAAM,uBAAoC,EAAE,SAAS,QAAQ,KAAK,EAAE,MAAM,YAAY,EAAE;AAExF,MAAM,gBAAgB,CAAC,MAAiC;AACtD,QAAM,IAAI;AACV,SACE,CAAC,CAAC,MACD,EAAE,YAAY,UAAU,EAAE,YAAY,WACvC,CAAC,CAAC,EAAE,OACJ,OAAO,EAAE,QAAQ,YAChB,EAAE,IAA2B,SAAS;AAE3C;AAIA,MAAM,cAAU,sCAA+B;AAAA,EAC7C,UAAU;AAAA,EACV,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO,CAAC,QAAS,cAAc,IAAI,WAAW,IAAK,IAAI,cAA8B;AACvF,CAAC;AAGM,MAAM,iBAAiB,MAAmB,QAAQ,IAAI;AAMtD,MAAM,sBAAsB,CAAC,aAClC,QAAQ,SAAS,QAAQ;AAGpB,MAAM,iBAAiB,MAAmB,QAAQ,IAAI;","names":[]}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * What the immediately.run host's own chrome is currently doing over your app
3
+ * (PRESENT_MODE_CHROME_SPEC §6). In run ("present") mode the platform shows a
4
+ * single pull-down tab in one corner; activating it opens the platform menu —
5
+ * an anchored panel on desktop, a bottom sheet on mobile — and the host dims
6
+ * and slightly insets your app behind it.
7
+ *
8
+ * Reading this is **entirely optional**. No platform behavior depends on your
9
+ * app consuming it, and an app that never reads it behaves identically
10
+ * (R-PMC-18) — the platform never requires immediately.run knowledge of an app
11
+ * (product value 3). It exists for the two things a cooperative app can do
12
+ * better with it than without:
13
+ *
14
+ * - **Pause while dimmed.** `overlay === 'menu'` means the user is looking at
15
+ * platform chrome, not at you: a good moment to pause a video, an animation,
16
+ * or a polling loop.
17
+ * - **Keep the corner clear.** `tab.edge` says where the platform's tab sits, so
18
+ * a floating control of your own can avoid overlapping it.
19
+ *
20
+ * Baseline capability `chrome:read` — every app may read it. It is a read of the
21
+ * host's own UI state and discloses nothing app-foreign; there is deliberately no
22
+ * counterpart that lets an app *operate* platform chrome.
23
+ *
24
+ * ```ts
25
+ * import { onChromeStateChange } from '@immediately-run/sdk';
26
+ *
27
+ * onChromeStateChange(({ overlay }) => {
28
+ * if (overlay === 'menu') video.pause();
29
+ * });
30
+ * ```
31
+ */
32
+ interface ChromeState {
33
+ /**
34
+ * `'menu'` while the platform menu / bottom sheet (and its scrim) is open over
35
+ * your app; `'none'` at rest. Edit mode reports `'none'` — the workbench chrome
36
+ * is beside your app, not over it.
37
+ */
38
+ overlay: 'none' | 'menu';
39
+ /** Where the platform's pull-down tab sits. Only one edge exists today. */
40
+ tab: {
41
+ edge: 'top-right';
42
+ };
43
+ }
44
+ /** Returns the current chrome state. Poll for a one-off read. */
45
+ declare const getChromeState: () => ChromeState;
46
+ /**
47
+ * Subscribe to chrome-state changes. The listener is invoked immediately with the
48
+ * current value, then again on every change. Returns an unsubscribe fn.
49
+ */
50
+ declare const onChromeStateChange: (listener: (chromeState: ChromeState) => void) => (() => void);
51
+ /** React hook returning the current chrome state, re-rendering on change. */
52
+ declare const useChromeState: () => ChromeState;
53
+
54
+ export { type ChromeState, getChromeState, onChromeStateChange, useChromeState };
@@ -0,0 +1,54 @@
1
+ /**
2
+ * What the immediately.run host's own chrome is currently doing over your app
3
+ * (PRESENT_MODE_CHROME_SPEC §6). In run ("present") mode the platform shows a
4
+ * single pull-down tab in one corner; activating it opens the platform menu —
5
+ * an anchored panel on desktop, a bottom sheet on mobile — and the host dims
6
+ * and slightly insets your app behind it.
7
+ *
8
+ * Reading this is **entirely optional**. No platform behavior depends on your
9
+ * app consuming it, and an app that never reads it behaves identically
10
+ * (R-PMC-18) — the platform never requires immediately.run knowledge of an app
11
+ * (product value 3). It exists for the two things a cooperative app can do
12
+ * better with it than without:
13
+ *
14
+ * - **Pause while dimmed.** `overlay === 'menu'` means the user is looking at
15
+ * platform chrome, not at you: a good moment to pause a video, an animation,
16
+ * or a polling loop.
17
+ * - **Keep the corner clear.** `tab.edge` says where the platform's tab sits, so
18
+ * a floating control of your own can avoid overlapping it.
19
+ *
20
+ * Baseline capability `chrome:read` — every app may read it. It is a read of the
21
+ * host's own UI state and discloses nothing app-foreign; there is deliberately no
22
+ * counterpart that lets an app *operate* platform chrome.
23
+ *
24
+ * ```ts
25
+ * import { onChromeStateChange } from '@immediately-run/sdk';
26
+ *
27
+ * onChromeStateChange(({ overlay }) => {
28
+ * if (overlay === 'menu') video.pause();
29
+ * });
30
+ * ```
31
+ */
32
+ interface ChromeState {
33
+ /**
34
+ * `'menu'` while the platform menu / bottom sheet (and its scrim) is open over
35
+ * your app; `'none'` at rest. Edit mode reports `'none'` — the workbench chrome
36
+ * is beside your app, not over it.
37
+ */
38
+ overlay: 'none' | 'menu';
39
+ /** Where the platform's pull-down tab sits. Only one edge exists today. */
40
+ tab: {
41
+ edge: 'top-right';
42
+ };
43
+ }
44
+ /** Returns the current chrome state. Poll for a one-off read. */
45
+ declare const getChromeState: () => ChromeState;
46
+ /**
47
+ * Subscribe to chrome-state changes. The listener is invoked immediately with the
48
+ * current value, then again on every change. Returns an unsubscribe fn.
49
+ */
50
+ declare const onChromeStateChange: (listener: (chromeState: ChromeState) => void) => (() => void);
51
+ /** React hook returning the current chrome state, re-rendering on change. */
52
+ declare const useChromeState: () => ChromeState;
53
+
54
+ export { type ChromeState, getChromeState, onChromeStateChange, useChromeState };
@@ -0,0 +1,23 @@
1
+ import "./chunk-VHAA22YE.js";
2
+ import { createPushChannel } from "./pushChannel";
3
+ import { CHROME_STATE, REQUEST_CHROME_STATE } from "./generated/protocol";
4
+ const DEFAULT_CHROME_STATE = { overlay: "none", tab: { edge: "top-right" } };
5
+ const isChromeState = (v) => {
6
+ const c = v;
7
+ return !!c && (c.overlay === "none" || c.overlay === "menu") && !!c.tab && typeof c.tab === "object" && c.tab.edge === "top-right";
8
+ };
9
+ const channel = createPushChannel({
10
+ pushType: CHROME_STATE,
11
+ requestType: REQUEST_CHROME_STATE,
12
+ initial: DEFAULT_CHROME_STATE,
13
+ parse: (msg) => isChromeState(msg.chromeState) ? msg.chromeState : void 0
14
+ });
15
+ const getChromeState = () => channel.get();
16
+ const onChromeStateChange = (listener) => channel.onChange(listener);
17
+ const useChromeState = () => channel.use();
18
+ export {
19
+ getChromeState,
20
+ onChromeStateChange,
21
+ useChromeState
22
+ };
23
+ //# sourceMappingURL=chromeState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/chromeState.ts"],"sourcesContent":["import { createPushChannel } from './pushChannel';\nimport { CHROME_STATE, REQUEST_CHROME_STATE } from './generated/protocol';\n\n/**\n * What the immediately.run host's own chrome is currently doing over your app\n * (PRESENT_MODE_CHROME_SPEC §6). In run (\"present\") mode the platform shows a\n * single pull-down tab in one corner; activating it opens the platform menu —\n * an anchored panel on desktop, a bottom sheet on mobile — and the host dims\n * and slightly insets your app behind it.\n *\n * Reading this is **entirely optional**. No platform behavior depends on your\n * app consuming it, and an app that never reads it behaves identically\n * (R-PMC-18) — the platform never requires immediately.run knowledge of an app\n * (product value 3). It exists for the two things a cooperative app can do\n * better with it than without:\n *\n * - **Pause while dimmed.** `overlay === 'menu'` means the user is looking at\n * platform chrome, not at you: a good moment to pause a video, an animation,\n * or a polling loop.\n * - **Keep the corner clear.** `tab.edge` says where the platform's tab sits, so\n * a floating control of your own can avoid overlapping it.\n *\n * Baseline capability `chrome:read` — every app may read it. It is a read of the\n * host's own UI state and discloses nothing app-foreign; there is deliberately no\n * counterpart that lets an app *operate* platform chrome.\n *\n * ```ts\n * import { onChromeStateChange } from '@immediately-run/sdk';\n *\n * onChromeStateChange(({ overlay }) => {\n * if (overlay === 'menu') video.pause();\n * });\n * ```\n */\nexport interface ChromeState {\n /**\n * `'menu'` while the platform menu / bottom sheet (and its scrim) is open over\n * your app; `'none'` at rest. Edit mode reports `'none'` — the workbench chrome\n * is beside your app, not over it.\n */\n overlay: 'none' | 'menu';\n /** Where the platform's pull-down tab sits. Only one edge exists today. */\n tab: { edge: 'top-right' };\n}\n\n/**\n * Assumed before the host reports — and the value that stands forever on a host\n * that never pushes this channel (an older host, or one that does not paint\n * present-mode chrome at all). \"Nothing is over you\" is the safe default: an app\n * that gates a pause on it simply never pauses.\n */\nconst DEFAULT_CHROME_STATE: ChromeState = { overlay: 'none', tab: { edge: 'top-right' } };\n\nconst isChromeState = (v: unknown): v is ChromeState => {\n const c = v as Partial<ChromeState> | null;\n return (\n !!c &&\n (c.overlay === 'none' || c.overlay === 'menu') &&\n !!c.tab &&\n typeof c.tab === 'object' &&\n (c.tab as ChromeState['tab']).edge === 'top-right'\n );\n};\n\n// Read over the transport (SDK_PACKAGING_SPEC §4): the host pushes `chrome-state`\n// and answers `request-chrome-state` (wire format: site-main channelBridge.ts).\nconst channel = createPushChannel<ChromeState>({\n pushType: CHROME_STATE,\n requestType: REQUEST_CHROME_STATE,\n initial: DEFAULT_CHROME_STATE,\n parse: (msg) => (isChromeState(msg.chromeState) ? (msg.chromeState as ChromeState) : undefined),\n});\n\n/** Returns the current chrome state. Poll for a one-off read. */\nexport const getChromeState = (): ChromeState => channel.get();\n\n/**\n * Subscribe to chrome-state changes. The listener is invoked immediately with the\n * current value, then again on every change. Returns an unsubscribe fn.\n */\nexport const onChromeStateChange = (listener: (chromeState: ChromeState) => void): (() => void) =>\n channel.onChange(listener);\n\n/** React hook returning the current chrome state, re-rendering on change. */\nexport const useChromeState = (): ChromeState => channel.use();\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,cAAc,4BAA4B;AAkDnD,MAAM,uBAAoC,EAAE,SAAS,QAAQ,KAAK,EAAE,MAAM,YAAY,EAAE;AAExF,MAAM,gBAAgB,CAAC,MAAiC;AACtD,QAAM,IAAI;AACV,SACE,CAAC,CAAC,MACD,EAAE,YAAY,UAAU,EAAE,YAAY,WACvC,CAAC,CAAC,EAAE,OACJ,OAAO,EAAE,QAAQ,YAChB,EAAE,IAA2B,SAAS;AAE3C;AAIA,MAAM,UAAU,kBAA+B;AAAA,EAC7C,UAAU;AAAA,EACV,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO,CAAC,QAAS,cAAc,IAAI,WAAW,IAAK,IAAI,cAA8B;AACvF,CAAC;AAGM,MAAM,iBAAiB,MAAmB,QAAQ,IAAI;AAMtD,MAAM,sBAAsB,CAAC,aAClC,QAAQ,SAAS,QAAQ;AAGpB,MAAM,iBAAiB,MAAmB,QAAQ,IAAI;","names":[]}
package/dist/index.cjs CHANGED
@@ -43,6 +43,7 @@ __reExport(index_exports, require("./theme"), module.exports);
43
43
  __reExport(index_exports, require("./editorContext"), module.exports);
44
44
  __reExport(index_exports, require("./editor"), module.exports);
45
45
  __reExport(index_exports, require("./formFactor"), module.exports);
46
+ __reExport(index_exports, require("./chromeState"), module.exports);
46
47
  __reExport(index_exports, require("./hostAttention"), module.exports);
47
48
  __reExport(index_exports, require("./region"), module.exports);
48
49
  __reExport(index_exports, require("./mounts"), module.exports);
@@ -91,6 +92,7 @@ __reExport(index_exports, require("./safeContent"), module.exports);
91
92
  ...require("./editorContext"),
92
93
  ...require("./editor"),
93
94
  ...require("./formFactor"),
95
+ ...require("./chromeState"),
94
96
  ...require("./hostAttention"),
95
97
  ...require("./region"),
96
98
  ...require("./mounts"),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './MDXProvider';\nexport * from './routing';\nexport * from './boot';\nexport * from './components/Include';\n// Only the component is public. `stripFrontmatter`/`appMountRelative` are module-level\n// exports so they can be unit-tested directly, NOT public API — the SDK's surface is\n// backwards-compatible forever, so an internal helper exported for a test's convenience is a\n// permanent commitment made for the wrong reason.\nexport { SafeInclude } from './components/SafeInclude';\nexport * from './sourceCache';\nexport * from './components/MDXComponents';\nexport * from './linkSpace';\nexport * from './corpus';\nexport * from './components/MountImage';\nexport * from './components/Routes';\nexport * from './hooks';\n// R3-276: the supported way for a viewer app to provide its own metadata store,\n// replacing a wholesale re-provision of `TinkerableContext` in app code.\nexport * from './metadataSource';\n// The deprecated injected-bundler adapters, re-exported so their deprecation notices\n// are visible in the published docs (R3-278; the window only narrows).\nexport { getInjectedMetadataEmitter, getInjectedMetadataSnapshot } from './injectedBundler';\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './hostAttention';\nexport * from './region';\nexport * from './mounts';\nexport * from './analytics';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './llm';\nexport * from './diagnostics';\nexport * from './vcs';\nexport * from './onFsChange';\nexport * from './fs';\nexport * from './debug';\nexport * from './tasks';\nexport * from './launch';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './loading';\nexport * from './protocolStream';\nexport * from './protocolDeadline';\nexport * from './sandboxTypes';\nexport * from './safeContent';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,0BAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,mBAFd;AAGA,0BAAc,iCAHd;AAQA,yBAA4B;AAC5B,0BAAc,0BATd;AAUA,0BAAc,uCAVd;AAWA,0BAAc,wBAXd;AAYA,0BAAc,qBAZd;AAaA,0BAAc,oCAbd;AAcA,0BAAc,gCAdd;AAeA,0BAAc,oBAfd;AAkBA,0BAAc,6BAlBd;AAqBA,6BAAwE;AACxE,0BAAc,mBAtBd;AAuBA,0BAAc,oBAvBd;AAwBA,0BAAc,4BAxBd;AAyBA,0BAAc,qBAzBd;AA0BA,0BAAc,yBA1Bd;AA2BA,0BAAc,4BA3Bd;AA4BA,0BAAc,qBA5Bd;AA6BA,0BAAc,qBA7Bd;AA8BA,0BAAc,wBA9Bd;AA+BA,0BAAc,yBA/Bd;AAgCA,0BAAc,sBAhCd;AAiCA,0BAAc,kBAjCd;AAkCA,0BAAc,kBAlCd;AAmCA,0BAAc,uBAnCd;AAoCA,0BAAc,sBApCd;AAqCA,0BAAc,kBArCd;AAsCA,0BAAc,0BAtCd;AAuCA,0BAAc,kBAvCd;AAwCA,0BAAc,yBAxCd;AAyCA,0BAAc,iBAzCd;AA0CA,0BAAc,oBA1Cd;AA2CA,0BAAc,oBA3Cd;AA4CA,0BAAc,qBA5Cd;AA6CA,0BAAc,sBA7Cd;AA8CA,0BAAc,wBA9Cd;AA+CA,0BAAc,oBA/Cd;AAgDA,0BAAc,sBAhDd;AAiDA,0BAAc,6BAjDd;AAkDA,0BAAc,+BAlDd;AAmDA,0BAAc,2BAnDd;AAoDA,0BAAc,0BApDd;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './MDXProvider';\nexport * from './routing';\nexport * from './boot';\nexport * from './components/Include';\n// Only the component is public. `stripFrontmatter`/`appMountRelative` are module-level\n// exports so they can be unit-tested directly, NOT public API — the SDK's surface is\n// backwards-compatible forever, so an internal helper exported for a test's convenience is a\n// permanent commitment made for the wrong reason.\nexport { SafeInclude } from './components/SafeInclude';\nexport * from './sourceCache';\nexport * from './components/MDXComponents';\nexport * from './linkSpace';\nexport * from './corpus';\nexport * from './components/MountImage';\nexport * from './components/Routes';\nexport * from './hooks';\n// R3-276: the supported way for a viewer app to provide its own metadata store,\n// replacing a wholesale re-provision of `TinkerableContext` in app code.\nexport * from './metadataSource';\n// The deprecated injected-bundler adapters, re-exported so their deprecation notices\n// are visible in the published docs (R3-278; the window only narrows).\nexport { getInjectedMetadataEmitter, getInjectedMetadataSnapshot } from './injectedBundler';\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './chromeState';\nexport * from './hostAttention';\nexport * from './region';\nexport * from './mounts';\nexport * from './analytics';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './llm';\nexport * from './diagnostics';\nexport * from './vcs';\nexport * from './onFsChange';\nexport * from './fs';\nexport * from './debug';\nexport * from './tasks';\nexport * from './launch';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './loading';\nexport * from './protocolStream';\nexport * from './protocolDeadline';\nexport * from './sandboxTypes';\nexport * from './safeContent';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,0BAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,mBAFd;AAGA,0BAAc,iCAHd;AAQA,yBAA4B;AAC5B,0BAAc,0BATd;AAUA,0BAAc,uCAVd;AAWA,0BAAc,wBAXd;AAYA,0BAAc,qBAZd;AAaA,0BAAc,oCAbd;AAcA,0BAAc,gCAdd;AAeA,0BAAc,oBAfd;AAkBA,0BAAc,6BAlBd;AAqBA,6BAAwE;AACxE,0BAAc,mBAtBd;AAuBA,0BAAc,oBAvBd;AAwBA,0BAAc,4BAxBd;AAyBA,0BAAc,qBAzBd;AA0BA,0BAAc,yBA1Bd;AA2BA,0BAAc,0BA3Bd;AA4BA,0BAAc,4BA5Bd;AA6BA,0BAAc,qBA7Bd;AA8BA,0BAAc,qBA9Bd;AA+BA,0BAAc,wBA/Bd;AAgCA,0BAAc,yBAhCd;AAiCA,0BAAc,sBAjCd;AAkCA,0BAAc,kBAlCd;AAmCA,0BAAc,kBAnCd;AAoCA,0BAAc,uBApCd;AAqCA,0BAAc,sBArCd;AAsCA,0BAAc,kBAtCd;AAuCA,0BAAc,0BAvCd;AAwCA,0BAAc,kBAxCd;AAyCA,0BAAc,yBAzCd;AA0CA,0BAAc,iBA1Cd;AA2CA,0BAAc,oBA3Cd;AA4CA,0BAAc,oBA5Cd;AA6CA,0BAAc,qBA7Cd;AA8CA,0BAAc,sBA9Cd;AA+CA,0BAAc,wBA/Cd;AAgDA,0BAAc,oBAhDd;AAiDA,0BAAc,sBAjDd;AAkDA,0BAAc,6BAlDd;AAmDA,0BAAc,+BAnDd;AAoDA,0BAAc,2BApDd;AAqDA,0BAAc,0BArDd;","names":[]}
package/dist/index.d.cts CHANGED
@@ -17,6 +17,7 @@ export { HostTheme, getHostTheme, onHostThemeChange, setHostTheme, useHostTheme
17
17
  export { EditorContext, getEditorContext, onEditorContextChange, useEditorContext } from './editorContext.cjs';
18
18
  export { EditTarget, EditorOpenError, EditorSessionError, EditorWriteError, RequestEditError, closeFile, createFile, createFolder, deleteEntry, openInEditor, renameEntry, requestEdit, setActiveFile, uploadFile } from './editor.cjs';
19
19
  export { FormFactor, FormFactorClass, Orientation, getFormFactor, onFormFactorChange, useFormFactor } from './formFactor.cjs';
20
+ export { ChromeState, getChromeState, onChromeStateChange, useChromeState } from './chromeState.cjs';
20
21
  export { HostAttention, HostAttentionKind, NO_HOST_ATTENTION, getHostAttention, onHostAttentionChange, useHostAttention } from './hostAttention.cjs';
21
22
  export { getRegion, useRegion } from './region.cjs';
22
23
  export { Invite, MountQuery, MountRemoveReason, MountRule, RemovedMount, SandboxMount, SessionMount, SpaceError, acceptInvite, awaitMatchingMount, createSpace, declineInvite, findMount, getAppMountPath, getInvites, getMounts, getSessionMounts, importSettingsFromParent, listMyInvites, listPendingInvites, listSettingsApps, makeContentRef, mount, mountSpace, onInvitesChange, onMountsChange, onSessionMountsChange, openSettings, openSettingsOf, requestMount, requestSpace, resolveContentRef, resolveContentRefs, revokeInvite, unmountSpace, useInvites, useMounts, useSessionMounts, waitForMount } from './mounts.cjs';
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export { HostTheme, getHostTheme, onHostThemeChange, setHostTheme, useHostTheme
17
17
  export { EditorContext, getEditorContext, onEditorContextChange, useEditorContext } from './editorContext.js';
18
18
  export { EditTarget, EditorOpenError, EditorSessionError, EditorWriteError, RequestEditError, closeFile, createFile, createFolder, deleteEntry, openInEditor, renameEntry, requestEdit, setActiveFile, uploadFile } from './editor.js';
19
19
  export { FormFactor, FormFactorClass, Orientation, getFormFactor, onFormFactorChange, useFormFactor } from './formFactor.js';
20
+ export { ChromeState, getChromeState, onChromeStateChange, useChromeState } from './chromeState.js';
20
21
  export { HostAttention, HostAttentionKind, NO_HOST_ATTENTION, getHostAttention, onHostAttentionChange, useHostAttention } from './hostAttention.js';
21
22
  export { getRegion, useRegion } from './region.js';
22
23
  export { Invite, MountQuery, MountRemoveReason, MountRule, RemovedMount, SandboxMount, SessionMount, SpaceError, acceptInvite, awaitMatchingMount, createSpace, declineInvite, findMount, getAppMountPath, getInvites, getMounts, getSessionMounts, importSettingsFromParent, listMyInvites, listPendingInvites, listSettingsApps, makeContentRef, mount, mountSpace, onInvitesChange, onMountsChange, onSessionMountsChange, openSettings, openSettingsOf, requestMount, requestSpace, resolveContentRef, resolveContentRefs, revokeInvite, unmountSpace, useInvites, useMounts, useSessionMounts, waitForMount } from './mounts.js';
package/dist/index.js CHANGED
@@ -18,6 +18,7 @@ export * from "./theme";
18
18
  export * from "./editorContext";
19
19
  export * from "./editor";
20
20
  export * from "./formFactor";
21
+ export * from "./chromeState";
21
22
  export * from "./hostAttention";
22
23
  export * from "./region";
23
24
  export * from "./mounts";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './MDXProvider';\nexport * from './routing';\nexport * from './boot';\nexport * from './components/Include';\n// Only the component is public. `stripFrontmatter`/`appMountRelative` are module-level\n// exports so they can be unit-tested directly, NOT public API — the SDK's surface is\n// backwards-compatible forever, so an internal helper exported for a test's convenience is a\n// permanent commitment made for the wrong reason.\nexport { SafeInclude } from './components/SafeInclude';\nexport * from './sourceCache';\nexport * from './components/MDXComponents';\nexport * from './linkSpace';\nexport * from './corpus';\nexport * from './components/MountImage';\nexport * from './components/Routes';\nexport * from './hooks';\n// R3-276: the supported way for a viewer app to provide its own metadata store,\n// replacing a wholesale re-provision of `TinkerableContext` in app code.\nexport * from './metadataSource';\n// The deprecated injected-bundler adapters, re-exported so their deprecation notices\n// are visible in the published docs (R3-278; the window only narrows).\nexport { getInjectedMetadataEmitter, getInjectedMetadataSnapshot } from './injectedBundler';\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './hostAttention';\nexport * from './region';\nexport * from './mounts';\nexport * from './analytics';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './llm';\nexport * from './diagnostics';\nexport * from './vcs';\nexport * from './onFsChange';\nexport * from './fs';\nexport * from './debug';\nexport * from './tasks';\nexport * from './launch';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './loading';\nexport * from './protocolStream';\nexport * from './protocolDeadline';\nexport * from './sandboxTypes';\nexport * from './safeContent';\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAKd,SAAS,mBAAmB;AAC5B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AAGd,SAAS,4BAA4B,mCAAmC;AACxE,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './MDXProvider';\nexport * from './routing';\nexport * from './boot';\nexport * from './components/Include';\n// Only the component is public. `stripFrontmatter`/`appMountRelative` are module-level\n// exports so they can be unit-tested directly, NOT public API — the SDK's surface is\n// backwards-compatible forever, so an internal helper exported for a test's convenience is a\n// permanent commitment made for the wrong reason.\nexport { SafeInclude } from './components/SafeInclude';\nexport * from './sourceCache';\nexport * from './components/MDXComponents';\nexport * from './linkSpace';\nexport * from './corpus';\nexport * from './components/MountImage';\nexport * from './components/Routes';\nexport * from './hooks';\n// R3-276: the supported way for a viewer app to provide its own metadata store,\n// replacing a wholesale re-provision of `TinkerableContext` in app code.\nexport * from './metadataSource';\n// The deprecated injected-bundler adapters, re-exported so their deprecation notices\n// are visible in the published docs (R3-278; the window only narrows).\nexport { getInjectedMetadataEmitter, getInjectedMetadataSnapshot } from './injectedBundler';\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './chromeState';\nexport * from './hostAttention';\nexport * from './region';\nexport * from './mounts';\nexport * from './analytics';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './llm';\nexport * from './diagnostics';\nexport * from './vcs';\nexport * from './onFsChange';\nexport * from './fs';\nexport * from './debug';\nexport * from './tasks';\nexport * from './launch';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './loading';\nexport * from './protocolStream';\nexport * from './protocolDeadline';\nexport * from './sandboxTypes';\nexport * from './safeContent';\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAKd,SAAS,mBAAmB;AAC5B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AAGd,SAAS,4BAA4B,mCAAmC;AACxE,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
package/dist/version.cjs CHANGED
@@ -21,7 +21,7 @@ __export(version_exports, {
21
21
  SDK_VERSION: () => SDK_VERSION
22
22
  });
23
23
  module.exports = __toCommonJS(version_exports);
24
- const SDK_VERSION = "0.52.0";
24
+ const SDK_VERSION = "0.53.0";
25
25
  // Annotate the CommonJS export names for ESM import in node:
26
26
  0 && (module.exports = {
27
27
  SDK_VERSION
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.52.0';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.53.0';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,cAAc;","names":[]}
@@ -1,4 +1,4 @@
1
1
  /** This SDK's package version, baked from package.json at build (SP2-6). */
2
- declare const SDK_VERSION = "0.52.0";
2
+ declare const SDK_VERSION = "0.53.0";
3
3
 
4
4
  export { SDK_VERSION };
package/dist/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /** This SDK's package version, baked from package.json at build (SP2-6). */
2
- declare const SDK_VERSION = "0.52.0";
2
+ declare const SDK_VERSION = "0.53.0";
3
3
 
4
4
  export { SDK_VERSION };
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- const SDK_VERSION = "0.52.0";
2
+ const SDK_VERSION = "0.53.0";
3
3
  export {
4
4
  SDK_VERSION
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.52.0';\n"],"mappings":";AAIO,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.53.0';\n"],"mappings":";AAIO,MAAM,cAAc;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immediately-run/sdk",
3
- "version": "0.52.0",
3
+ "version": "0.53.0",
4
4
  "description": "Runtime SDK for code executing inside an immediately.run sandbox.",
5
5
  "license": "MIT",
6
6
  "repository": "github:immediately-run/immediately-run-sdk",
@@ -33,12 +33,15 @@
33
33
  "format:check": "prettier --check \"src/**/*.{ts,tsx,js,mjs,json}\" \"test/**/*.{ts,mjs}\" \"scripts/**/*.mjs\"",
34
34
  "check:circular": "node scripts/check-circular.mjs",
35
35
  "api:check": "node scripts/check-api-stability.mjs",
36
+ "api:selftest": "node scripts/check-api-stability.mjs --self-test",
36
37
  "protocol:check": "node scripts/check-protocol-snapshot.mjs",
37
38
  "verify:codegen-parity": "node scripts/codegen-prototype/verify-drift.mjs --self-test && node scripts/codegen-prototype/verify-drift.mjs && node scripts/codegen-prototype/verify.streams.mjs --self-test && node scripts/codegen-prototype/verify.streams.mjs",
38
39
  "api:update": "node scripts/check-api-stability.mjs --update",
39
- "verify": "npm run format:check && npm run check:circular && npm run check:bundler:selftest && npm run check:bundler && npm run build && npm test && npm run test:safe-content && npm run test:metadata-e2e && npm run api:check && npm run compat:selftest && npm run compat:previous && npm run protocol:check && npm run protocol:selftest && npm run check:ambient:selftest && npm run check:ambient && npm run check:selfhost:selftest && npm run check:selfhost && npm run verify:codegen-parity",
40
+ "check:pins": "node scripts/check-dependency-pins.mjs --self-test && node scripts/check-dependency-pins.mjs",
41
+ "check:publish-version": "node scripts/check-publish-version.mjs --self-test && node scripts/check-publish-version.mjs",
42
+ "verify": "npm run check:pins && npm run check:publish-version && npm run format:check && npm run check:circular && npm run check:bundler:selftest && npm run check:bundler && npm run build && npm test && npm run test:safe-content && npm run test:metadata-e2e && npm run api:selftest && npm run api:check && npm run compat:selftest && npm run compat:previous && npm run protocol:check && npm run protocol:selftest && npm run check:ambient:selftest && npm run check:ambient && npm run check:selfhost:selftest && npm run check:selfhost && npm run verify:codegen-parity",
40
43
  "docs": "typedoc --json docs/api.json && node scripts/gen-llms.mjs",
41
- "prepublishOnly": "npm run check:circular && npm run build && npm run api:check",
44
+ "prepublishOnly": "npm run check:circular && npm run build && npm run api:selftest && npm run api:check",
42
45
  "test:safe-content": "node scripts/build-safecontent-e2e.mjs && node --test test/safeContent.e2e.mjs",
43
46
  "test:metadata-e2e": "node --test test/metadataHooks.e2e.mjs",
44
47
  "protocol:selftest": "node scripts/check-protocol-snapshot.mjs --self-test",
@@ -58,7 +61,7 @@
58
61
  },
59
62
  "dependencies": {
60
63
  "@immediately-run/platform-constants": "0.2.0",
61
- "@immediately-run/sandbox-protocol": "0.5.0",
64
+ "@immediately-run/sandbox-protocol": "0.6.0",
62
65
  "react-error-boundary": "^6.0.0",
63
66
  "@immediately-run/safe-content": "0.1.0",
64
67
  "@immediately-run/mdx-plugins": "0.5.0"