@immediately-run/sdk 0.68.0 → 0.68.2

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.
Files changed (87) hide show
  1. package/dist/agentChatClient.js +1 -1
  2. package/dist/agentContext.js +4 -4
  3. package/dist/agentLoop.js +1 -1
  4. package/dist/analytics.js +3 -3
  5. package/dist/auth.js +2 -2
  6. package/dist/boot.js +16 -16
  7. package/dist/bundle.js +1 -1
  8. package/dist/catalog.js +4 -4
  9. package/dist/chromeState.js +2 -2
  10. package/dist/components/FileRouter.js +4 -4
  11. package/dist/components/HeadingAnchor.js +4 -4
  12. package/dist/components/Include.js +5 -5
  13. package/dist/components/Link.js +5 -5
  14. package/dist/components/MDXComponents.cjs +4 -3
  15. package/dist/components/MDXComponents.cjs.map +1 -1
  16. package/dist/components/MDXComponents.js +14 -13
  17. package/dist/components/MDXComponents.js.map +1 -1
  18. package/dist/components/MainContent.js +4 -4
  19. package/dist/components/MountImage.js +1 -1
  20. package/dist/components/Routes.js +3 -3
  21. package/dist/components/SafeInclude.js +7 -7
  22. package/dist/components/ScrollAfterNavigation.js +2 -2
  23. package/dist/components/ScrollRestoration.js +4 -4
  24. package/dist/components/WikiLink.cjs +4 -3
  25. package/dist/components/WikiLink.cjs.map +1 -1
  26. package/dist/components/WikiLink.js +9 -8
  27. package/dist/components/WikiLink.js.map +1 -1
  28. package/dist/components/defaults.js +1 -1
  29. package/dist/components/errors.js +1 -1
  30. package/dist/contextUtils.js +3 -3
  31. package/dist/contribute.js +2 -2
  32. package/dist/corpus.js +2 -2
  33. package/dist/debug.js +3 -3
  34. package/dist/diagnostics.js +2 -2
  35. package/dist/dnd.js +3 -3
  36. package/dist/editor.js +3 -3
  37. package/dist/editorContext.js +2 -2
  38. package/dist/feed.js +3 -3
  39. package/dist/formFactor.js +2 -2
  40. package/dist/fs.js +2 -2
  41. package/dist/generated/spaces.js +1 -1
  42. package/dist/hooks.js +2 -2
  43. package/dist/hostAttention.js +2 -2
  44. package/dist/hostTransport.js +1 -1
  45. package/dist/index.js +65 -65
  46. package/dist/ipc.js +3 -3
  47. package/dist/launch.js +3 -3
  48. package/dist/linkSpace.cjs +1 -1
  49. package/dist/linkSpace.cjs.map +1 -1
  50. package/dist/linkSpace.d.cts +8 -3
  51. package/dist/linkSpace.d.ts +8 -3
  52. package/dist/linkSpace.js +1 -1
  53. package/dist/linkSpace.js.map +1 -1
  54. package/dist/llm.js +3 -3
  55. package/dist/markers.js +2 -2
  56. package/dist/metadataQueryTool.js +1 -1
  57. package/dist/metadataSource.js +1 -1
  58. package/dist/moduleCache.js +2 -2
  59. package/dist/mounts.js +7 -7
  60. package/dist/netFetch.js +4 -4
  61. package/dist/onFsChange.js +2 -2
  62. package/dist/openExternal.js +3 -3
  63. package/dist/openRepository.js +3 -3
  64. package/dist/platformLink.js +4 -4
  65. package/dist/protocolSchemes.js +1 -1
  66. package/dist/protocolStream.js +2 -2
  67. package/dist/pushChannel.js +1 -1
  68. package/dist/ready.js +1 -1
  69. package/dist/recents.js +3 -3
  70. package/dist/region.js +3 -3
  71. package/dist/routing.js +7 -7
  72. package/dist/runtime.js +4 -4
  73. package/dist/sandboxUtils.js +4 -4
  74. package/dist/secrets.js +4 -4
  75. package/dist/tasks.js +4 -4
  76. package/dist/theme.js +4 -4
  77. package/dist/urlUtils.js +1 -1
  78. package/dist/useEntryState.js +1 -1
  79. package/dist/vcs.js +4 -4
  80. package/dist/version.cjs +1 -1
  81. package/dist/version.cjs.map +1 -1
  82. package/dist/version.d.cts +1 -1
  83. package/dist/version.d.ts +1 -1
  84. package/dist/version.js +1 -1
  85. package/dist/version.js.map +1 -1
  86. package/dist/workspace.js +2 -2
  87. package/package.json +4 -3
@@ -1,6 +1,6 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { protocolStream } from "./protocolStream";
3
- import { PROTOCOL_CONTRIBUTE } from "./generated/protocol";
2
+ import { protocolStream } from "./protocolStream.js";
3
+ import { PROTOCOL_CONTRIBUTE } from "./generated/protocol.js";
4
4
  function contribute(opts) {
5
5
  return protocolStream(PROTOCOL_CONTRIBUTE, "run", [opts]);
6
6
  }
package/dist/corpus.js CHANGED
@@ -6,8 +6,8 @@ import {
6
6
  useBundleEntry,
7
7
  toBundlePath,
8
8
  fromBundlePath
9
- } from "./bundle";
10
- import { useCurrentEntry } from "./bundle";
9
+ } from "./bundle.js";
10
+ import { useCurrentEntry } from "./bundle.js";
11
11
  export {
12
12
  BundleContext as CorpusContext,
13
13
  fromBundlePath as fromCorpusPath,
package/dist/debug.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { createPushChannel } from "./pushChannel";
3
- import { sendMessage, addListener } from "./sandboxUtils";
4
- import { DEBUG_ENABLED, DEBUG_LOG, DEBUG_QUERY, DEBUG_QUERY_RESULT, REQUEST_DEBUG_ENABLED } from "./generated/protocol";
2
+ import { createPushChannel } from "./pushChannel.js";
3
+ import { sendMessage, addListener } from "./sandboxUtils.js";
4
+ import { DEBUG_ENABLED, DEBUG_LOG, DEBUG_QUERY, DEBUG_QUERY_RESULT, REQUEST_DEBUG_ENABLED } from "./generated/protocol.js";
5
5
  const enabledChannel = createPushChannel({
6
6
  pushType: DEBUG_ENABLED,
7
7
  requestType: REQUEST_DEBUG_ENABLED,
@@ -1,6 +1,6 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { createPushChannel } from "./pushChannel";
3
- import { DIAGNOSTICS, REQUEST_DIAGNOSTICS } from "./generated/protocol";
2
+ import { createPushChannel } from "./pushChannel.js";
3
+ import { DIAGNOSTICS, REQUEST_DIAGNOSTICS } from "./generated/protocol.js";
4
4
  const EMPTY = { buildErrors: [], consoleEntries: [], provenance: null };
5
5
  const channel = createPushChannel({
6
6
  pushType: DIAGNOSTICS,
package/dist/dnd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import "./chunk-VHAA22YE.js";
2
2
  import { useEffect, useState } from "react";
3
- import { protocolRequest, sendMessage, addListener } from "./sandboxUtils";
4
- import { DND_CANCEL, DROPPED_ITEM, PROTOCOL_DND } from "./generated/protocol";
5
- import { SCHEMES } from "./protocolSchemes";
3
+ import { protocolRequest, sendMessage, addListener } from "./sandboxUtils.js";
4
+ import { DND_CANCEL, DROPPED_ITEM, PROTOCOL_DND } from "./generated/protocol.js";
5
+ import { SCHEMES } from "./protocolSchemes.js";
6
6
  const startItemDrag = async (item) => {
7
7
  const res = await protocolRequest(SCHEMES[PROTOCOL_DND], "startDrag", [item]);
8
8
  if (!res || res.ok !== true) {
package/dist/editor.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { protocolRequest } from "./sandboxUtils";
3
- import { SCHEMES } from "./protocolSchemes";
4
- import { PROTOCOL_EDITOR } from "./generated/protocol";
2
+ import { protocolRequest } from "./sandboxUtils.js";
3
+ import { SCHEMES } from "./protocolSchemes.js";
4
+ import { PROTOCOL_EDITOR } from "./generated/protocol.js";
5
5
  const editorRequest = async (method, arg) => {
6
6
  const res = await protocolRequest(SCHEMES[PROTOCOL_EDITOR], method, [arg]);
7
7
  if (!res || res.ok !== true) {
@@ -1,6 +1,6 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { createPushChannel } from "./pushChannel";
3
- import { EDITOR_CONTEXT, REQUEST_EDITOR_CONTEXT } from "./generated/protocol";
2
+ import { createPushChannel } from "./pushChannel.js";
3
+ import { EDITOR_CONTEXT, REQUEST_EDITOR_CONTEXT } from "./generated/protocol.js";
4
4
  const isStringArray = (v) => Array.isArray(v) && v.every((p) => typeof p === "string");
5
5
  const channel = createPushChannel({
6
6
  pushType: EDITOR_CONTEXT,
package/dist/feed.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { protocolRequest } from "./sandboxUtils";
3
- import { SCHEMES } from "./protocolSchemes";
4
- import { PROTOCOL_FEED } from "./generated/protocol";
2
+ import { protocolRequest } from "./sandboxUtils.js";
3
+ import { SCHEMES } from "./protocolSchemes.js";
4
+ import { PROTOCOL_FEED } from "./generated/protocol.js";
5
5
  const feedFetch = async (instanceId, params = {}) => {
6
6
  const res = await protocolRequest(SCHEMES[PROTOCOL_FEED], "fetch", [{ instanceId, params }]);
7
7
  if (!res || res.ok !== true) {
@@ -1,6 +1,6 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { createPushChannel } from "./pushChannel";
3
- import { FORM_FACTOR, REQUEST_FORM_FACTOR } from "./generated/protocol";
2
+ import { createPushChannel } from "./pushChannel.js";
3
+ import { FORM_FACTOR, REQUEST_FORM_FACTOR } from "./generated/protocol.js";
4
4
  const DEFAULT_FORM_FACTOR = {
5
5
  class: "desktop",
6
6
  orientation: "landscape",
package/dist/fs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { getAppMountPath } from "./mounts";
3
- import { onFsChange } from "./onFsChange";
2
+ import { getAppMountPath } from "./mounts.js";
3
+ import { onFsChange } from "./onFsChange.js";
4
4
  const hasFs = (fs) => typeof fs?.promises?.readFile === "function" || typeof fs?.readFile === "function";
5
5
  function sandboxFs() {
6
6
  try {
@@ -1,5 +1,5 @@
1
1
  import "../chunk-VHAA22YE.js";
2
- import { invoke } from "../catalog";
2
+ import { invoke } from "../catalog.js";
3
3
  const listSpaces = (opts = {}) => invoke("spaces:list", opts);
4
4
  const listAllSpaces = () => invoke("spaces:listAll", {});
5
5
  const getSpaceMembers = (spaceId) => invoke("spaces:members", { spaceId });
package/dist/hooks.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import "./chunk-VHAA22YE.js";
2
2
  import { APP_ROOT, underAppRoot } from "@immediately-run/platform-constants";
3
3
  import { useEffect, useMemo, useRef, useState } from "react";
4
- import { openFs } from "./fs";
5
- import { useMetadataStore } from "./metadataSource";
4
+ import { openFs } from "./fs.js";
5
+ import { useMetadataStore } from "./metadataSource.js";
6
6
  const entriesEqual = (a, b) => {
7
7
  if (a.length !== b.length) {
8
8
  return false;
@@ -1,6 +1,6 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { createPushChannel } from "./pushChannel";
3
- import { HOST_ATTENTION, REQUEST_HOST_ATTENTION } from "./generated/protocol";
2
+ import { createPushChannel } from "./pushChannel.js";
3
+ import { HOST_ATTENTION, REQUEST_HOST_ATTENTION } from "./generated/protocol.js";
4
4
  const NO_HOST_ATTENTION = { awaiting: false, kind: null, since: null };
5
5
  const KINDS = /* @__PURE__ */ new Set(["passkey", "consent", "picker", "confirmation"]);
6
6
  const parseHostAttention = (value) => {
@@ -1,5 +1,5 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { getHostRuntime } from "./hostRuntime";
2
+ import { getHostRuntime } from "./hostRuntime.js";
3
3
  function transport() {
4
4
  try {
5
5
  const injected = module?.evaluation?.module?.bundler?.messageBus;
package/dist/index.js CHANGED
@@ -1,69 +1,69 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- export * from "./MDXProvider";
3
- export * from "./routing";
4
- export * from "./boot";
5
- export * from "./components/Include";
6
- import { SafeInclude } from "./components/SafeInclude";
7
- export * from "./sourceCache";
8
- export * from "./components/MDXComponents";
9
- export * from "./linkSpace";
10
- export * from "./bundle";
11
- export * from "./corpus";
12
- export * from "./components/MountImage";
13
- export * from "./components/Routes";
14
- export * from "./hooks";
15
- export * from "./metadataSource";
16
- import { getInjectedMetadataEmitter, getInjectedMetadataSnapshot } from "./injectedBundler";
17
- export * from "./auth";
18
- export * from "./theme";
19
- export * from "./editorContext";
20
- export * from "./editor";
21
- export * from "./formFactor";
22
- export * from "./chromeState";
23
- export * from "./workspace";
24
- export * from "./hostAttention";
25
- export * from "./region";
26
- export * from "./mounts";
27
- export * from "./analytics";
28
- export * from "./contribute";
29
- export * from "./catalog";
30
- export * from "./ipc";
31
- export * from "./dnd";
32
- export * from "./netFetch";
33
- export * from "./feed";
34
- export * from "./secrets";
35
- export * from "./recents";
36
- export * from "./openRepository";
37
- export * from "./openExternal";
38
- export * from "./llm";
39
- export * from "./diagnostics";
40
- export * from "./vcs";
41
- export * from "./onFsChange";
42
- export * from "./fs";
43
- export * from "./debug";
44
- export * from "./tasks";
45
- export * from "./launch";
46
- export * from "./runtime";
47
- export * from "./irMarkers";
48
- export * from "./ready";
49
- export * from "./loading";
50
- export * from "./protocolStream";
51
- export * from "./protocolDeadline";
52
- export * from "./sandboxTypes";
53
- export * from "./safeContent";
54
- export * from "./agentLoop";
55
- export * from "./agentSteering";
56
- export * from "./agentPause";
57
- export * from "./agentChatClient";
58
- export * from "./metadataQueryTool";
59
- export * from "./collectHeadings";
60
- export * from "./agentContext";
61
- export * from "./fence";
62
- export * from "./platformLink";
63
- export * from "./entryState";
64
- export * from "./useEntryState";
65
- export * from "./scrollRestore";
66
- import { ScrollRestoration } from "./components/ScrollRestoration";
2
+ export * from "./MDXProvider.js";
3
+ export * from "./routing.js";
4
+ export * from "./boot.js";
5
+ export * from "./components/Include.js";
6
+ import { SafeInclude } from "./components/SafeInclude.js";
7
+ export * from "./sourceCache.js";
8
+ export * from "./components/MDXComponents.js";
9
+ export * from "./linkSpace.js";
10
+ export * from "./bundle.js";
11
+ export * from "./corpus.js";
12
+ export * from "./components/MountImage.js";
13
+ export * from "./components/Routes.js";
14
+ export * from "./hooks.js";
15
+ export * from "./metadataSource.js";
16
+ import { getInjectedMetadataEmitter, getInjectedMetadataSnapshot } from "./injectedBundler.js";
17
+ export * from "./auth.js";
18
+ export * from "./theme.js";
19
+ export * from "./editorContext.js";
20
+ export * from "./editor.js";
21
+ export * from "./formFactor.js";
22
+ export * from "./chromeState.js";
23
+ export * from "./workspace.js";
24
+ export * from "./hostAttention.js";
25
+ export * from "./region.js";
26
+ export * from "./mounts.js";
27
+ export * from "./analytics.js";
28
+ export * from "./contribute.js";
29
+ export * from "./catalog.js";
30
+ export * from "./ipc.js";
31
+ export * from "./dnd.js";
32
+ export * from "./netFetch.js";
33
+ export * from "./feed.js";
34
+ export * from "./secrets.js";
35
+ export * from "./recents.js";
36
+ export * from "./openRepository.js";
37
+ export * from "./openExternal.js";
38
+ export * from "./llm.js";
39
+ export * from "./diagnostics.js";
40
+ export * from "./vcs.js";
41
+ export * from "./onFsChange.js";
42
+ export * from "./fs.js";
43
+ export * from "./debug.js";
44
+ export * from "./tasks.js";
45
+ export * from "./launch.js";
46
+ export * from "./runtime.js";
47
+ export * from "./irMarkers.js";
48
+ export * from "./ready.js";
49
+ export * from "./loading.js";
50
+ export * from "./protocolStream.js";
51
+ export * from "./protocolDeadline.js";
52
+ export * from "./sandboxTypes.js";
53
+ export * from "./safeContent/index.js";
54
+ export * from "./agentLoop.js";
55
+ export * from "./agentSteering.js";
56
+ export * from "./agentPause.js";
57
+ export * from "./agentChatClient.js";
58
+ export * from "./metadataQueryTool.js";
59
+ export * from "./collectHeadings.js";
60
+ export * from "./agentContext.js";
61
+ export * from "./fence.js";
62
+ export * from "./platformLink.js";
63
+ export * from "./entryState.js";
64
+ export * from "./useEntryState.js";
65
+ export * from "./scrollRestore.js";
66
+ import { ScrollRestoration } from "./components/ScrollRestoration.js";
67
67
  export {
68
68
  SafeInclude,
69
69
  ScrollRestoration,
package/dist/ipc.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import "./chunk-VHAA22YE.js";
2
2
  import { useEffect, useState } from "react";
3
- import { protocolRequest, addListener } from "./sandboxUtils";
4
- import { PROTOCOL_IPC, REGION_MESSAGE } from "./generated/protocol";
5
- import { SCHEMES } from "./protocolSchemes";
3
+ import { protocolRequest, addListener } from "./sandboxUtils.js";
4
+ import { PROTOCOL_IPC, REGION_MESSAGE } from "./generated/protocol.js";
5
+ import { SCHEMES } from "./protocolSchemes.js";
6
6
  const postToRegion = async (region, data) => {
7
7
  const res = await protocolRequest(SCHEMES[PROTOCOL_IPC], "post", [{ to: region, msg: data }]);
8
8
  if (!res || res.ok !== true) {
package/dist/launch.js CHANGED
@@ -4,9 +4,9 @@ import {
4
4
  __privateSet
5
5
  } from "./chunk-VHAA22YE.js";
6
6
  var _status, _dismissListeners, _ended;
7
- import { protocolRequest, sendMessage, addListener } from "./sandboxUtils";
8
- import { LAUNCH_DISMISS, LAUNCH_ENDED, PROTOCOL_LAUNCH } from "./generated/protocol";
9
- import { SCHEMES } from "./protocolSchemes";
7
+ import { protocolRequest, sendMessage, addListener } from "./sandboxUtils.js";
8
+ import { LAUNCH_DISMISS, LAUNCH_ENDED, PROTOCOL_LAUNCH } from "./generated/protocol.js";
9
+ import { SCHEMES } from "./protocolSchemes.js";
10
10
  const liveHandles = /* @__PURE__ */ new Map();
11
11
  const pendingEnded = /* @__PURE__ */ new Map();
12
12
  const MAX_PENDING_ENDED = 16;
@@ -27,7 +27,7 @@ module.exports = __toCommonJS(linkSpace_exports);
27
27
  var import_react = require("react");
28
28
  var import_mdx_plugins = require("@immediately-run/mdx-plugins");
29
29
  const LinkSpaceContext = (0, import_react.createContext)({
30
- corpusRoot: null,
30
+ bundleRoot: null,
31
31
  bundleChrooted: false
32
32
  });
33
33
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/linkSpace.ts"],"sourcesContent":["// Link path spaces (R3-273; REPO_CONTENT_DISPATCH_SPEC §9 decision, 2026-08-17).\n// R3-279: the RESOLVER CORE (resolveLinkTarget / normalizeAbsolute / FS_PREFIX /\n// ResolvedLinkTarget) moved to `@immediately-run/mdx-plugins` — beside its parity\n// fixture — and is re-exported here unchanged (API-stable). This module keeps the\n// REACT surface (LinkSpaceContext): the provider a corpus-rendering app wraps its\n// document tree in. Consumers importing from '@immediately-run/sdk/linkSpace' see\n// exactly the same names.\n//\n// A document link's target resolves in one of two spaces:\n//\n// - DEFAULT — the enclosing corpus's virtual filesystem. RELATIVE targets resolve\n// against the authoring file (identical in both spaces); ABSOLUTE targets\n// (`/x/y.mdx`) resolve from the corpus root when an enclosing `LinkSpaceContext`\n// declares one, else from the filesystem root. A non-corpus app declares nothing\n// and keeps today's behavior bit-for-bit (its fs root IS its only root).\n//\n// - `$fs:` — the explicit filesystem space: `$fs:/content/x.mdx` resolves from the\n// root of the filesystem the app reads, escaping corpus-relative addressing.\n//\n// `$fs:` changes ADDRESSING, never REACH: resolution is pure path arithmetic and\n// existence is checked against the same in-mount metadata the default space uses —\n// nothing is fetched, and a link can never name what the app cannot already read.\n// A malformed `$fs:` target (anything not mount-absolute — which also catches\n// scheme smuggling like `$fs:javascript:…`) is INVALID and must render as a broken\n// link, never an anchor.\n//\n// Corpus nesting: `LinkSpaceContext` providers nest, and the NEAREST one wins —\n// which is exactly the innermost-enclosing-corpus rule (bundle encapsulation): a\n// document rendered inside a nested corpus resolves against the nested corpus.\n\nimport { createContext } from 'react';\n\nexport { FS_PREFIX, normalizeAbsolute, resolveLinkTarget } from '@immediately-run/mdx-plugins';\nexport type { ResolvedLinkTarget, LinkSpace } from '@immediately-run/mdx-plugins';\nimport type { LinkSpace as LinkSpaceShape } from '@immediately-run/mdx-plugins';\n\n/** Ambient link space. A corpus-rendering app wraps its document tree in\n * `<LinkSpaceContext value={{ corpusRoot }}>`; nesting a second provider inside a\n * rendered sub-corpus makes the innermost root win. */\nexport const LinkSpaceContext = createContext<LinkSpaceShape>({\n corpusRoot: null,\n bundleChrooted: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BA,mBAA8B;AAE9B,yBAAgE;AAOzD,MAAM,uBAAmB,4BAA8B;AAAA,EAC5D,YAAY;AAAA,EACZ,gBAAgB;AAClB,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/linkSpace.ts"],"sourcesContent":["// Link path spaces (R3-273; REPO_CONTENT_DISPATCH_SPEC §9 decision, 2026-08-17).\n// R3-279: the RESOLVER CORE (resolveLinkTarget / normalizeAbsolute / FS_PREFIX /\n// ResolvedLinkTarget) moved to `@immediately-run/mdx-plugins` — beside its parity\n// fixture — and is re-exported here unchanged (API-stable). This module keeps the\n// REACT surface (LinkSpaceContext): the provider a bundle-rendering app wraps its\n// document tree in. Consumers importing from '@immediately-run/sdk/linkSpace' see\n// exactly the same names.\n//\n// A document link's target resolves in one of two spaces:\n//\n// - DEFAULT — the enclosing bundle's virtual filesystem. RELATIVE targets resolve\n// against the authoring file (identical in both spaces); ABSOLUTE targets\n// (`/x/y.mdx`) resolve from the bundle root when an enclosing `LinkSpaceContext`\n// declares one, else from the filesystem root. A non-bundle app declares nothing\n// and keeps today's behavior bit-for-bit (its fs root IS its only root).\n//\n// - `$fs:` — the explicit filesystem space: `$fs:/content/x.mdx` resolves from the\n// root of the filesystem the app reads, escaping bundle-relative addressing.\n//\n// `$fs:` changes ADDRESSING, never REACH: resolution is pure path arithmetic and\n// existence is checked against the same in-mount metadata the default space uses —\n// nothing is fetched, and a link can never name what the app cannot already read.\n// A malformed `$fs:` target (anything not mount-absolute — which also catches\n// scheme smuggling like `$fs:javascript:…`) is INVALID and must render as a broken\n// link, never an anchor.\n//\n// Bundle nesting: `LinkSpaceContext` providers nest, and the NEAREST one wins —\n// which is exactly the innermost-enclosing-bundle rule (bundle encapsulation): a\n// document rendered inside a nested bundle resolves against the nested bundle.\n\nimport { createContext } from 'react';\n\nexport { FS_PREFIX, normalizeAbsolute, resolveLinkTarget } from '@immediately-run/mdx-plugins';\nexport type { ResolvedLinkTarget, LinkSpace } from '@immediately-run/mdx-plugins';\nimport type { LinkSpace as LinkSpaceShape } from '@immediately-run/mdx-plugins';\n\n/** Ambient link space. A bundle-rendering app wraps its document tree in\n * `<LinkSpaceContext value={{ bundleRoot }}>`; nesting a second provider inside a\n * rendered sub-bundle makes the innermost root win.\n *\n * R3-482: the root's canonical spelling is `bundleRoot`; the deprecated\n * `corpusRoot` field stays in the `LinkSpace` type (mdx-plugins §forever-compat)\n * and is read as the fallback — only when `bundleRoot` is ABSENT, since an\n * explicit `bundleRoot: null` is a value (\"no bundle root\"), not a miss. */\nexport const LinkSpaceContext = createContext<LinkSpaceShape>({\n bundleRoot: null,\n bundleChrooted: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BA,mBAA8B;AAE9B,yBAAgE;AAYzD,MAAM,uBAAmB,4BAA8B;AAAA,EAC5D,YAAY;AAAA,EACZ,gBAAgB;AAClB,CAAC;","names":[]}
@@ -2,9 +2,14 @@ import * as react from 'react';
2
2
  import { LinkSpace } from '@immediately-run/mdx-plugins';
3
3
  export { FS_PREFIX, LinkSpace, ResolvedLinkTarget, normalizeAbsolute, resolveLinkTarget } from '@immediately-run/mdx-plugins';
4
4
 
5
- /** Ambient link space. A corpus-rendering app wraps its document tree in
6
- * `<LinkSpaceContext value={{ corpusRoot }}>`; nesting a second provider inside a
7
- * rendered sub-corpus makes the innermost root win. */
5
+ /** Ambient link space. A bundle-rendering app wraps its document tree in
6
+ * `<LinkSpaceContext value={{ bundleRoot }}>`; nesting a second provider inside a
7
+ * rendered sub-bundle makes the innermost root win.
8
+ *
9
+ * R3-482: the root's canonical spelling is `bundleRoot`; the deprecated
10
+ * `corpusRoot` field stays in the `LinkSpace` type (mdx-plugins §forever-compat)
11
+ * and is read as the fallback — only when `bundleRoot` is ABSENT, since an
12
+ * explicit `bundleRoot: null` is a value ("no bundle root"), not a miss. */
8
13
  declare const LinkSpaceContext: react.Context<LinkSpace>;
9
14
 
10
15
  export { LinkSpaceContext };
@@ -2,9 +2,14 @@ import * as react from 'react';
2
2
  import { LinkSpace } from '@immediately-run/mdx-plugins';
3
3
  export { FS_PREFIX, LinkSpace, ResolvedLinkTarget, normalizeAbsolute, resolveLinkTarget } from '@immediately-run/mdx-plugins';
4
4
 
5
- /** Ambient link space. A corpus-rendering app wraps its document tree in
6
- * `<LinkSpaceContext value={{ corpusRoot }}>`; nesting a second provider inside a
7
- * rendered sub-corpus makes the innermost root win. */
5
+ /** Ambient link space. A bundle-rendering app wraps its document tree in
6
+ * `<LinkSpaceContext value={{ bundleRoot }}>`; nesting a second provider inside a
7
+ * rendered sub-bundle makes the innermost root win.
8
+ *
9
+ * R3-482: the root's canonical spelling is `bundleRoot`; the deprecated
10
+ * `corpusRoot` field stays in the `LinkSpace` type (mdx-plugins §forever-compat)
11
+ * and is read as the fallback — only when `bundleRoot` is ABSENT, since an
12
+ * explicit `bundleRoot: null` is a value ("no bundle root"), not a miss. */
8
13
  declare const LinkSpaceContext: react.Context<LinkSpace>;
9
14
 
10
15
  export { LinkSpaceContext };
package/dist/linkSpace.js CHANGED
@@ -2,7 +2,7 @@ import "./chunk-VHAA22YE.js";
2
2
  import { createContext } from "react";
3
3
  import { FS_PREFIX, normalizeAbsolute, resolveLinkTarget } from "@immediately-run/mdx-plugins";
4
4
  const LinkSpaceContext = createContext({
5
- corpusRoot: null,
5
+ bundleRoot: null,
6
6
  bundleChrooted: false
7
7
  });
8
8
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/linkSpace.ts"],"sourcesContent":["// Link path spaces (R3-273; REPO_CONTENT_DISPATCH_SPEC §9 decision, 2026-08-17).\n// R3-279: the RESOLVER CORE (resolveLinkTarget / normalizeAbsolute / FS_PREFIX /\n// ResolvedLinkTarget) moved to `@immediately-run/mdx-plugins` — beside its parity\n// fixture — and is re-exported here unchanged (API-stable). This module keeps the\n// REACT surface (LinkSpaceContext): the provider a corpus-rendering app wraps its\n// document tree in. Consumers importing from '@immediately-run/sdk/linkSpace' see\n// exactly the same names.\n//\n// A document link's target resolves in one of two spaces:\n//\n// - DEFAULT — the enclosing corpus's virtual filesystem. RELATIVE targets resolve\n// against the authoring file (identical in both spaces); ABSOLUTE targets\n// (`/x/y.mdx`) resolve from the corpus root when an enclosing `LinkSpaceContext`\n// declares one, else from the filesystem root. A non-corpus app declares nothing\n// and keeps today's behavior bit-for-bit (its fs root IS its only root).\n//\n// - `$fs:` — the explicit filesystem space: `$fs:/content/x.mdx` resolves from the\n// root of the filesystem the app reads, escaping corpus-relative addressing.\n//\n// `$fs:` changes ADDRESSING, never REACH: resolution is pure path arithmetic and\n// existence is checked against the same in-mount metadata the default space uses —\n// nothing is fetched, and a link can never name what the app cannot already read.\n// A malformed `$fs:` target (anything not mount-absolute — which also catches\n// scheme smuggling like `$fs:javascript:…`) is INVALID and must render as a broken\n// link, never an anchor.\n//\n// Corpus nesting: `LinkSpaceContext` providers nest, and the NEAREST one wins —\n// which is exactly the innermost-enclosing-corpus rule (bundle encapsulation): a\n// document rendered inside a nested corpus resolves against the nested corpus.\n\nimport { createContext } from 'react';\n\nexport { FS_PREFIX, normalizeAbsolute, resolveLinkTarget } from '@immediately-run/mdx-plugins';\nexport type { ResolvedLinkTarget, LinkSpace } from '@immediately-run/mdx-plugins';\nimport type { LinkSpace as LinkSpaceShape } from '@immediately-run/mdx-plugins';\n\n/** Ambient link space. A corpus-rendering app wraps its document tree in\n * `<LinkSpaceContext value={{ corpusRoot }}>`; nesting a second provider inside a\n * rendered sub-corpus makes the innermost root win. */\nexport const LinkSpaceContext = createContext<LinkSpaceShape>({\n corpusRoot: null,\n bundleChrooted: false,\n});\n"],"mappings":";AA8BA,SAAS,qBAAqB;AAE9B,SAAS,WAAW,mBAAmB,yBAAyB;AAOzD,MAAM,mBAAmB,cAA8B;AAAA,EAC5D,YAAY;AAAA,EACZ,gBAAgB;AAClB,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/linkSpace.ts"],"sourcesContent":["// Link path spaces (R3-273; REPO_CONTENT_DISPATCH_SPEC §9 decision, 2026-08-17).\n// R3-279: the RESOLVER CORE (resolveLinkTarget / normalizeAbsolute / FS_PREFIX /\n// ResolvedLinkTarget) moved to `@immediately-run/mdx-plugins` — beside its parity\n// fixture — and is re-exported here unchanged (API-stable). This module keeps the\n// REACT surface (LinkSpaceContext): the provider a bundle-rendering app wraps its\n// document tree in. Consumers importing from '@immediately-run/sdk/linkSpace' see\n// exactly the same names.\n//\n// A document link's target resolves in one of two spaces:\n//\n// - DEFAULT — the enclosing bundle's virtual filesystem. RELATIVE targets resolve\n// against the authoring file (identical in both spaces); ABSOLUTE targets\n// (`/x/y.mdx`) resolve from the bundle root when an enclosing `LinkSpaceContext`\n// declares one, else from the filesystem root. A non-bundle app declares nothing\n// and keeps today's behavior bit-for-bit (its fs root IS its only root).\n//\n// - `$fs:` — the explicit filesystem space: `$fs:/content/x.mdx` resolves from the\n// root of the filesystem the app reads, escaping bundle-relative addressing.\n//\n// `$fs:` changes ADDRESSING, never REACH: resolution is pure path arithmetic and\n// existence is checked against the same in-mount metadata the default space uses —\n// nothing is fetched, and a link can never name what the app cannot already read.\n// A malformed `$fs:` target (anything not mount-absolute — which also catches\n// scheme smuggling like `$fs:javascript:…`) is INVALID and must render as a broken\n// link, never an anchor.\n//\n// Bundle nesting: `LinkSpaceContext` providers nest, and the NEAREST one wins —\n// which is exactly the innermost-enclosing-bundle rule (bundle encapsulation): a\n// document rendered inside a nested bundle resolves against the nested bundle.\n\nimport { createContext } from 'react';\n\nexport { FS_PREFIX, normalizeAbsolute, resolveLinkTarget } from '@immediately-run/mdx-plugins';\nexport type { ResolvedLinkTarget, LinkSpace } from '@immediately-run/mdx-plugins';\nimport type { LinkSpace as LinkSpaceShape } from '@immediately-run/mdx-plugins';\n\n/** Ambient link space. A bundle-rendering app wraps its document tree in\n * `<LinkSpaceContext value={{ bundleRoot }}>`; nesting a second provider inside a\n * rendered sub-bundle makes the innermost root win.\n *\n * R3-482: the root's canonical spelling is `bundleRoot`; the deprecated\n * `corpusRoot` field stays in the `LinkSpace` type (mdx-plugins §forever-compat)\n * and is read as the fallback — only when `bundleRoot` is ABSENT, since an\n * explicit `bundleRoot: null` is a value (\"no bundle root\"), not a miss. */\nexport const LinkSpaceContext = createContext<LinkSpaceShape>({\n bundleRoot: null,\n bundleChrooted: false,\n});\n"],"mappings":";AA8BA,SAAS,qBAAqB;AAE9B,SAAS,WAAW,mBAAmB,yBAAyB;AAYzD,MAAM,mBAAmB,cAA8B;AAAA,EAC5D,YAAY;AAAA,EACZ,gBAAgB;AAClB,CAAC;","names":[]}
package/dist/llm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { invokeStream } from "./catalog";
3
- import { createPushChannel } from "./pushChannel";
4
- import { LLM_PROVIDER, REQUEST_LLM_PROVIDER } from "./generated/protocol";
2
+ import { invokeStream } from "./catalog.js";
3
+ import { createPushChannel } from "./pushChannel.js";
4
+ import { LLM_PROVIDER, REQUEST_LLM_PROVIDER } from "./generated/protocol.js";
5
5
  function chat(req) {
6
6
  const { signal, ...params } = req;
7
7
  return invokeStream("llm:chat", params, signal);
package/dist/markers.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { sendMessage as defaultSend } from "./sandboxUtils";
3
- import { isIrMarkerName } from "./irMarkers";
2
+ import { sendMessage as defaultSend } from "./sandboxUtils.js";
3
+ import { isIrMarkerName } from "./irMarkers.js";
4
4
  const realNow = () => typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
5
5
  const defaultDeps = { send: defaultSend, now: realNow };
6
6
  let deps = defaultDeps;
@@ -1,5 +1,5 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { fenceUntrusted } from "./fence";
2
+ import { fenceUntrusted } from "./fence.js";
3
3
  const METADATA_QUERY_TOOL_NAME = "metadata:query";
4
4
  const METADATA_QUERY_TOOL_DESCRIPTOR = {
5
5
  name: METADATA_QUERY_TOOL_NAME,
@@ -1,7 +1,7 @@
1
1
  import "./chunk-VHAA22YE.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { createContext, use, useMemo } from "react";
4
- import { TinkerableContext } from "./TinkerableContext";
4
+ import { TinkerableContext } from "./TinkerableContext.js";
5
5
  const MetadataSourceContext = createContext(void 0);
6
6
  const MetadataSource = ({ value, mode = "replace", children }) => {
7
7
  const outer = use(MetadataSourceContext);
@@ -1,8 +1,8 @@
1
1
  import "./chunk-VHAA22YE.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { createContext } from "react";
4
- import { addListener } from "./sandboxUtils";
5
- import { COMPILE } from "./generated/protocol";
4
+ import { addListener } from "./sandboxUtils.js";
5
+ import { COMPILE } from "./generated/protocol.js";
6
6
  class ModuleCache {
7
7
  constructor() {
8
8
  this.nameResolutionPromises = {};
package/dist/mounts.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import "./chunk-VHAA22YE.js";
2
2
  import { APP_ROOT } from "@immediately-run/platform-constants";
3
3
  import { useEffect, useState } from "react";
4
- import { protocolRequest, sendMessage, addListener } from "./sandboxUtils";
5
- import { createPushChannel } from "./pushChannel";
6
- import { getHostRuntime } from "./hostRuntime";
7
- import { mountMatches } from "./mountMatch";
4
+ import { protocolRequest, sendMessage, addListener } from "./sandboxUtils.js";
5
+ import { createPushChannel } from "./pushChannel.js";
6
+ import { getHostRuntime } from "./hostRuntime.js";
7
+ import { mountMatches } from "./mountMatch.js";
8
8
  import {
9
9
  listSpaces,
10
10
  listAllSpaces,
@@ -15,7 +15,7 @@ import {
15
15
  lookupUser,
16
16
  listGrants,
17
17
  revokeGrant
18
- } from "./generated/spaces";
18
+ } from "./generated/spaces.js";
19
19
  import {
20
20
  INVITATIONS,
21
21
  MOUNT_ADD,
@@ -27,8 +27,8 @@ import {
27
27
  REQUEST_MOUNTS,
28
28
  REQUEST_SESSION_MOUNTS,
29
29
  SESSION_MOUNTS
30
- } from "./generated/protocol";
31
- import { SCHEMES } from "./protocolSchemes";
30
+ } from "./generated/protocol.js";
31
+ import { SCHEMES } from "./protocolSchemes.js";
32
32
  const getAppMountPath = () => getHostRuntime()?.appMountPath ?? APP_ROOT;
33
33
  const mountKey = (m) => m.id ?? m.path;
34
34
  const MOUNT_REMOVE_REASONS = /* @__PURE__ */ new Set([
package/dist/netFetch.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { protocolRequest } from "./sandboxUtils";
3
- import { protocolStream } from "./protocolStream";
4
- import { SCHEMES } from "./protocolSchemes";
5
- import { PROTOCOL_FETCH } from "./generated/protocol";
2
+ import { protocolRequest } from "./sandboxUtils.js";
3
+ import { protocolStream } from "./protocolStream.js";
4
+ import { SCHEMES } from "./protocolSchemes.js";
5
+ import { PROTOCOL_FETCH } from "./generated/protocol.js";
6
6
  const hostFetch = async (url, init = {}) => {
7
7
  const res = await protocolRequest(SCHEMES[PROTOCOL_FETCH], "fetch", [
8
8
  { url, method: init.method, headers: init.headers, body: init.body }
@@ -1,6 +1,6 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { createPushChannel } from "./pushChannel";
3
- import { FS_CHANGE } from "./generated/protocol";
2
+ import { createPushChannel } from "./pushChannel.js";
3
+ import { FS_CHANGE } from "./generated/protocol.js";
4
4
  const isStringArray = (v) => Array.isArray(v) && v.every((p) => typeof p === "string");
5
5
  const isMountBatch = (v) => {
6
6
  if (typeof v !== "object" || v === null) return false;
@@ -1,7 +1,7 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { protocolRequest } from "./sandboxUtils";
3
- import { PROTOCOL_OPENLINK } from "./generated/protocol";
4
- import { SCHEMES } from "./protocolSchemes";
2
+ import { protocolRequest } from "./sandboxUtils.js";
3
+ import { PROTOCOL_OPENLINK } from "./generated/protocol.js";
4
+ import { SCHEMES } from "./protocolSchemes.js";
5
5
  async function openExternal(url) {
6
6
  const res = await protocolRequest(SCHEMES[PROTOCOL_OPENLINK], "open", [{ url }]);
7
7
  if (!res || res.ok !== true) {
@@ -1,7 +1,7 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { protocolRequest } from "./sandboxUtils";
3
- import { PROTOCOL_OPENREPO } from "./generated/protocol";
4
- import { SCHEMES } from "./protocolSchemes";
2
+ import { protocolRequest } from "./sandboxUtils.js";
3
+ import { PROTOCOL_OPENREPO } from "./generated/protocol.js";
4
+ import { SCHEMES } from "./protocolSchemes.js";
5
5
  async function openRepository(coordinates) {
6
6
  const { provider, namespace, repository } = coordinates;
7
7
  const res = await protocolRequest(SCHEMES[PROTOCOL_OPENREPO], "open", [
@@ -1,10 +1,10 @@
1
1
  import "./chunk-VHAA22YE.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { use } from "react";
4
- import { isBrowserGestureClick, useComposedAnchorClick } from "./anchorClick";
5
- import { navigate } from "./routing";
6
- import { TinkerableContext } from "./TinkerableContext";
7
- import { platformHref } from "./urlUtils";
4
+ import { isBrowserGestureClick, useComposedAnchorClick } from "./anchorClick.js";
5
+ import { navigate } from "./routing.js";
6
+ import { TinkerableContext } from "./TinkerableContext.js";
7
+ import { platformHref } from "./urlUtils.js";
8
8
  const usePlatformHref = () => {
9
9
  const { outerHref } = use(TinkerableContext);
10
10
  return (path) => platformHref(outerHref, path);
@@ -19,7 +19,7 @@ import {
19
19
  PROTOCOL_TASK,
20
20
  PROTOCOL_THEME,
21
21
  PROTOCOL_VCS
22
- } from "./generated/protocol";
22
+ } from "./generated/protocol.js";
23
23
  const PREFIX = "protocol-";
24
24
  const schemeOf = (name) => name.slice(PREFIX.length);
25
25
  const SCHEMES = {
@@ -1,5 +1,5 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { addListener, sendMessage } from "./sandboxUtils";
2
+ import { addListener, sendMessage } from "./sandboxUtils.js";
3
3
  import {
4
4
  attendanceOf,
5
5
  attendanceReason,
@@ -7,7 +7,7 @@ import {
7
7
  PENDING_NOTICE_MS,
8
8
  ProtocolTimeoutError,
9
9
  STREAM_IDLE_TIMEOUT_MS
10
- } from "./protocolDeadline";
10
+ } from "./protocolDeadline.js";
11
11
  class StreamError extends Error {
12
12
  constructor(code, message) {
13
13
  super(message);
@@ -1,6 +1,6 @@
1
1
  import "./chunk-VHAA22YE.js";
2
2
  import { useEffect, useState } from "react";
3
- import { sendMessage as defaultSend, addListener as defaultAddListener } from "./hostTransport";
3
+ import { sendMessage as defaultSend, addListener as defaultAddListener } from "./hostTransport.js";
4
4
  function createPushChannel(opts, transport = { sendMessage: defaultSend, addListener: defaultAddListener }) {
5
5
  let current = opts.initial;
6
6
  const listeners = /* @__PURE__ */ new Set();
package/dist/ready.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { sendMessage as defaultSend } from "./sandboxUtils";
2
+ import { sendMessage as defaultSend } from "./sandboxUtils.js";
3
3
  const realNow = () => typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
4
4
  const defaultDeps = { send: defaultSend, now: realNow };
5
5
  let deps = defaultDeps;
package/dist/recents.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./chunk-VHAA22YE.js";
2
- import { protocolRequest } from "./sandboxUtils";
3
- import { PROTOCOL_RECENTS } from "./generated/protocol";
4
- import { SCHEMES } from "./protocolSchemes";
2
+ import { protocolRequest } from "./sandboxUtils.js";
3
+ import { PROTOCOL_RECENTS } from "./generated/protocol.js";
4
+ import { SCHEMES } from "./protocolSchemes.js";
5
5
  const recentsRequest = async (params) => {
6
6
  const res = await protocolRequest(SCHEMES[PROTOCOL_RECENTS], "list", [params]);
7
7
  if (!res || res.ok !== true) {