@dxos/plugin-debug 0.11.0 → 0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d

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 (130) hide show
  1. package/dist/lib/Debug.mjs +22 -0
  2. package/dist/lib/Debug.mjs.map +1 -0
  3. package/dist/lib/DebugEvents.mjs +15 -0
  4. package/dist/lib/DebugEvents.mjs.map +1 -0
  5. package/dist/lib/DebugNodes.mjs +19 -0
  6. package/dist/lib/DebugNodes.mjs.map +1 -0
  7. package/dist/lib/DebugPlugin.mjs +4 -16
  8. package/dist/lib/DebugPlugin.mjs.map +1 -1
  9. package/dist/lib/DebugPlugin.node.mjs +2 -3
  10. package/dist/lib/DebugPlugin.node.mjs.map +1 -1
  11. package/dist/lib/DebugPlugin.workerd.mjs +1 -1
  12. package/dist/lib/DebugPlugin.workerd.mjs.map +1 -1
  13. package/dist/lib/DebugSurface.mjs +15 -0
  14. package/dist/lib/DebugSurface.mjs.map +1 -0
  15. package/dist/lib/Settings.mjs +12 -0
  16. package/dist/lib/Settings.mjs.map +1 -0
  17. package/dist/lib/capabilities.mjs +38 -6
  18. package/dist/lib/capabilities.mjs.map +1 -1
  19. package/dist/lib/chunk-DebugObjectPanel.mjs +1 -1
  20. package/dist/lib/chunk-DebugSettings.mjs +95 -15
  21. package/dist/lib/chunk-DebugSettings.mjs.map +1 -1
  22. package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs +1 -1
  23. package/dist/lib/chunk-SpaceGenerator.mjs +52 -10
  24. package/dist/lib/chunk-SpaceGenerator.mjs.map +1 -1
  25. package/dist/lib/chunk-StatsPanel.mjs +2 -2
  26. package/dist/lib/chunk-StatsPanel.mjs.map +1 -1
  27. package/dist/lib/chunk-Wireframe.mjs +1 -1
  28. package/dist/lib/chunk-app-graph-builder.mjs +13 -10
  29. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
  30. package/dist/lib/chunk-log-recording.mjs +3 -2
  31. package/dist/lib/chunk-log-recording.mjs.map +1 -1
  32. package/dist/lib/chunk-meta.mjs +1 -1
  33. package/dist/lib/chunk-meta.mjs.map +1 -1
  34. package/dist/lib/chunk-react-surface.mjs +20 -14
  35. package/dist/lib/chunk-react-surface.mjs.map +1 -1
  36. package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
  37. package/dist/lib/chunk-settings.mjs +7 -6
  38. package/dist/lib/chunk-settings.mjs.map +1 -1
  39. package/dist/lib/chunk-stats-panel.mjs +5 -4
  40. package/dist/lib/chunk-stats-panel.mjs.map +1 -1
  41. package/dist/lib/components.mjs +41 -35
  42. package/dist/lib/components.mjs.map +1 -1
  43. package/dist/lib/index.mjs +6 -2
  44. package/dist/lib/plugin.mjs +1 -1
  45. package/dist/lib/plugin.mjs.map +1 -1
  46. package/dist/lib/translations.mjs +10 -1
  47. package/dist/lib/translations.mjs.map +1 -1
  48. package/dist/types/src/DebugPlugin.d.ts +3 -3
  49. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  50. package/dist/types/src/DebugPlugin.node.d.ts +3 -3
  51. package/dist/types/src/DebugPlugin.node.d.ts.map +1 -1
  52. package/dist/types/src/DebugPlugin.workerd.d.ts +3 -3
  53. package/dist/types/src/DebugPlugin.workerd.d.ts.map +1 -1
  54. package/dist/types/src/capabilities/DebugSurfaces.d.ts +1 -1
  55. package/dist/types/src/capabilities/DebugSurfaces.d.ts.map +1 -1
  56. package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -2
  57. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  58. package/dist/types/src/capabilities/index.d.ts +7 -10
  59. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  60. package/dist/types/src/capabilities/log-recording.d.ts +1 -2
  61. package/dist/types/src/capabilities/log-recording.d.ts.map +1 -1
  62. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  63. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  64. package/dist/types/src/capabilities/settings.d.ts +2 -2
  65. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  66. package/dist/types/src/capabilities/stats-panel.d.ts +2 -2
  67. package/dist/types/src/capabilities/stats-panel.d.ts.map +1 -1
  68. package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -1
  69. package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
  70. package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.d.ts +13 -0
  71. package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.d.ts.map +1 -0
  72. package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts +93 -0
  73. package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts.map +1 -0
  74. package/dist/types/src/containers/DebugPortSettings/index.d.ts +2 -0
  75. package/dist/types/src/containers/DebugPortSettings/index.d.ts.map +1 -0
  76. package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts +2 -2
  77. package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +1 -1
  78. package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts +10 -1
  79. package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts.map +1 -1
  80. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
  81. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts +87 -0
  82. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -0
  83. package/dist/types/src/index.d.ts +5 -1
  84. package/dist/types/src/index.d.ts.map +1 -1
  85. package/dist/types/src/plugin.d.ts +3 -3
  86. package/dist/types/src/plugin.d.ts.map +1 -1
  87. package/dist/types/src/translations.d.ts +9 -0
  88. package/dist/types/src/translations.d.ts.map +1 -1
  89. package/dist/types/src/types/{debug.d.ts → Debug.d.ts} +3 -3
  90. package/dist/types/src/types/Debug.d.ts.map +1 -0
  91. package/dist/types/src/types/DebugEvents.d.ts +8 -0
  92. package/dist/types/src/types/DebugEvents.d.ts.map +1 -0
  93. package/dist/types/tsconfig.tsbuildinfo +1 -1
  94. package/package.json +93 -54
  95. package/src/DebugPlugin.node.ts +6 -6
  96. package/src/DebugPlugin.tsx +18 -25
  97. package/src/DebugPlugin.workerd.ts +4 -3
  98. package/src/capabilities/DebugSurfaces.tsx +9 -4
  99. package/src/capabilities/app-graph-builder.ts +8 -4
  100. package/src/capabilities/index.ts +40 -6
  101. package/src/capabilities/log-recording.ts +3 -2
  102. package/src/capabilities/react-surface.ts +10 -8
  103. package/src/capabilities/settings.ts +7 -5
  104. package/src/capabilities/stats-panel.ts +5 -4
  105. package/src/components/SchemaTable/SchemaTable.tsx +19 -13
  106. package/src/components/SpaceGenerator/ObjectGenerator.tsx +5 -5
  107. package/src/components/SpaceGenerator/presets.ts +6 -4
  108. package/src/containers/DebugPortSettings/DebugPortSettings.stories.tsx +144 -0
  109. package/src/containers/DebugPortSettings/DebugPortSettings.tsx +112 -0
  110. package/src/containers/DebugPortSettings/index.ts +5 -0
  111. package/src/containers/DebugSettings/DebugSettings.tsx +11 -6
  112. package/src/containers/SpaceGenerator/SpaceGenerator.stories.tsx +93 -0
  113. package/src/containers/SpaceGenerator/SpaceGenerator.tsx +44 -6
  114. package/src/containers/StatsPanel/StatsPanel.tsx +2 -2
  115. package/src/index.ts +5 -1
  116. package/src/meta.ts +1 -1
  117. package/src/plugin.ts +2 -2
  118. package/src/translations.ts +13 -0
  119. package/src/types/{debug.ts → Debug.ts} +4 -2
  120. package/src/types/DebugEvents.ts +16 -0
  121. package/dist/lib/chunk-types.mjs +0 -60
  122. package/dist/lib/chunk-types.mjs.map +0 -1
  123. package/dist/lib/types.mjs +0 -2
  124. package/dist/types/src/components/SpaceGenerator/draw-util.d.ts +0 -8
  125. package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +0 -1
  126. package/dist/types/src/types/debug.d.ts.map +0 -1
  127. package/dist/types/src/types/index.d.ts +0 -5
  128. package/dist/types/src/types/index.d.ts.map +0 -1
  129. package/src/components/SpaceGenerator/draw-util.ts +0 -191
  130. package/src/types/index.ts +0 -8
@@ -0,0 +1,22 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import { createContext } from "react";
3
+ import * as Capability from "@dxos/app-framework/Capability";
4
+ import { meta } from "#meta";
5
+ //#region src/types/Debug.ts
6
+ var Debug_exports = /* @__PURE__ */ __exportAll({
7
+ DebugCapabilities: () => DebugCapabilities,
8
+ DebugContext: () => DebugContext
9
+ });
10
+ var DebugContext = createContext({
11
+ running: false,
12
+ start: () => {},
13
+ stop: () => {}
14
+ });
15
+ var DebugCapabilities;
16
+ (function(_DebugCapabilities) {
17
+ _DebugCapabilities.Settings = Capability.makeSingleton()(`${meta.profile.key}.capability.settings`);
18
+ })(DebugCapabilities || (DebugCapabilities = {}));
19
+ //#endregion
20
+ export { DebugCapabilities, DebugContext, Debug_exports as t };
21
+
22
+ //# sourceMappingURL=Debug.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Debug.mjs","names":[],"sources":["../../src/types/Debug.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom';\nimport { type Context, createContext } from 'react';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport type { TimerCallback, TimerOptions } from '@dxos/async';\nimport { type IdbLogStore } from '@dxos/log-store-idb';\n\nimport { meta } from '#meta';\n\nimport * as Settings from './Settings';\n\nexport type DebugPluginOptions = {\n /** Shared persistent log store for capturing and downloading logs. */\n logStore?: IdbLogStore;\n /** Persist the stats-panel store to localStorage so it survives a reload. Defaults to `true`. */\n persistStats?: boolean;\n};\n\nexport type DebugContextType = {\n running: boolean;\n start: (cb: TimerCallback, options: TimerOptions) => void;\n stop: () => void;\n};\n\nexport const DebugContext: Context<DebugContextType> = createContext<DebugContextType>({\n running: false,\n start: () => {},\n stop: () => {},\n});\n\nexport namespace DebugCapabilities {\n export const Settings = Capability.makeSingleton<Atom.Writable<Settings.Settings>>()(\n `${meta.profile.key}.capability.settings`,\n );\n}\n"],"mappings":";;;;;;;;;AA4BA,IAAa,eAA0C,cAAgC;CACrF,SAAS;CACT,aAAa,CAAC;CACd,YAAY,CAAC;AACf,CAAC;AAEM,IAAA;;CACQ,mBAAA,WAAW,WAAW,cAAgD,CAAC,CAClF,GAAG,KAAK,QAAQ,IAAI,qBACtB;GACF,sBAAA,oBAAA,CAAA,EAAA"}
@@ -0,0 +1,15 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import { meta } from "#meta";
3
+ import * as ActivationEvent from "@dxos/app-framework/ActivationEvent";
4
+ //#region src/types/DebugEvents.ts
5
+ var DebugEvents_exports = /* @__PURE__ */ __exportAll({ Start: () => Start });
6
+ /**
7
+ * The feature's start event: the plugin's start-gated modules (and cross-plugin
8
+ * contributions consumed by this feature) activate here. Fired on demand and by the
9
+ * host's idle trickle.
10
+ */
11
+ var Start = ActivationEvent.pluginStart(meta.profile.key);
12
+ //#endregion
13
+ export { Start, DebugEvents_exports as t };
14
+
15
+ //# sourceMappingURL=DebugEvents.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugEvents.mjs","names":[],"sources":["../../src/types/DebugEvents.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as ActivationEvent from '@dxos/app-framework/ActivationEvent';\n\nimport { meta } from '#meta';\n\n/**\n * The feature's start event: the plugin's start-gated modules (and cross-plugin\n * contributions consumed by this feature) activate here. Fired on demand and by the\n * host's idle trickle.\n */\nexport const Start = ActivationEvent.pluginStart(meta.profile.key);\n"],"mappings":";;;;;;;;;;AAeA,IAAa,QAAQ,gBAAgB,YAAY,KAAK,QAAQ,GAAG"}
@@ -0,0 +1,19 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import { meta } from "#meta";
3
+ //#region src/types/DebugNodes.ts
4
+ var DebugNodes_exports = /* @__PURE__ */ __exportAll({
5
+ SpaceType: () => SpaceType,
6
+ id: () => id,
7
+ nodeId: () => nodeId
8
+ });
9
+ /** Extracts the last dot-separated segment of a namespaced ID string for use as a node segment id. */
10
+ var nodeId = (fullId) => fullId.split(".").at(-1) ?? "";
11
+ var debugId = meta.profile.key;
12
+ /** Top-level Debug node (sibling of DevTools under the SYSTEM navtree group). */
13
+ var id = `${debugId}.debug`;
14
+ /** Discriminator for the space-generator article surface (`node.data.type`). */
15
+ var SpaceType = `${debugId}.space`;
16
+ //#endregion
17
+ export { SpaceType, id, nodeId, DebugNodes_exports as t };
18
+
19
+ //# sourceMappingURL=DebugNodes.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugNodes.mjs","names":[],"sources":["../../src/types/DebugNodes.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { meta } from '#meta';\n\n/** Extracts the last dot-separated segment of a namespaced ID string for use as a node segment id. */\nexport const nodeId = (fullId: string): string => fullId.split('.').at(-1) ?? '';\n\nconst debugId = meta.profile.key;\n\n/** Top-level Debug node (sibling of DevTools under the SYSTEM navtree group). */\nexport const id = `${debugId}.debug`;\n\n/** Discriminator for the space-generator article surface (`node.data.type`). */\nexport const SpaceType = `${debugId}.space`;\n"],"mappings":";;;;;;;;;AASA,IAAa,UAAU,WAA2B,OAAO,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK;AAE9E,IAAM,UAAU,KAAK,QAAQ;;AAG7B,IAAa,KAAK,GAAG,QAAQ;;AAG7B,IAAa,YAAY,GAAG,QAAQ"}
@@ -1,28 +1,16 @@
1
- import { ActivationEvents, Capability, Plugin } from "@dxos/app-framework";
2
1
  import { meta } from "#meta";
3
- import { AppPlugin } from "@dxos/app-toolkit";
2
+ import * as Plugin from "@dxos/app-framework/Plugin";
3
+ import * as AppCapability from "@dxos/app-toolkit/AppCapability";
4
4
  import { AppGraphBuilder, DebugSettings, LogRecording, ReactSurface, StatsPanel } from "#capabilities";
5
5
  import { translations } from "#translations";
6
6
  //#endregion
7
7
  //#region src/DebugPlugin.tsx
8
- var DebugPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }), AppPlugin.addSettingsModule({ activate: DebugSettings }), Plugin.addModule(({ logStore }) => ({
9
- id: Capability.getModuleTag(ReactSurface) ?? "surfaces",
10
- activatesOn: ActivationEvents.SetupReactSurface,
11
- activate: () => ReactSurface({ logStore })
12
- })), Plugin.addModule({
13
- id: "log-recording",
14
- activatesOn: ActivationEvents.Startup,
15
- activate: LogRecording
16
- }), AppPlugin.addTranslationsModule({ translations }), Plugin.addModule(({ persistStats }) => ({
17
- id: "stats-panel",
18
- activatesOn: ActivationEvents.Startup,
19
- activate: () => StatsPanel({ persist: persistStats ?? true })
20
- })), AppPlugin.addPluginAssetModule({ asset: {
8
+ var DebugPlugin = Plugin.define(meta).pipe(Plugin.addModule(AppGraphBuilder), Plugin.addModule(DebugSettings), Plugin.addModule(ReactSurface), Plugin.addModule(LogRecording), Plugin.addModule(AppCapability.translations(translations)), Plugin.addModule(StatsPanel), Plugin.addModule(AppCapability.pluginAsset({
21
9
  pluginId: meta.profile.key,
22
10
  path: "PLUGIN.mdl",
23
11
  content: "---\nid: org.dxos.plugin.debug\nname: DebugPlugin\nversion: 0.1.0\n---\n\nDeveloper debugging utilities for `DXOS` Composer — synthetic-object generation, a per-object Debug companion, a space-objects browser, a wireframe overlay, and a transient-stats panel. Rendered under a Debug node in the SYSTEM navigation group, a sibling of the Devtools inspector (`org.dxos.plugin.devtools`).\n\n## Extensions\n\nThe following extension dialects are used in this document.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n\n## Types\n\n```mdl\ntype Settings\n fields:\n wireframe?: boolean # overlay every article/section surface with a labelled border\n traceAll?: boolean # enable verbose operation tracing across all plugins\n```\n\n```mdl\ntype DebugPluginOptions\n fields:\n logStore?: IdbLogStore # shared persistent log store for capturing and downloading logs\n persistStats?: boolean # persist the stats-panel store to localStorage (default true)\n```\n\n## Features\n\n```mdl\nfeat GenerateObjects\n desc: Create configurable batches of synthetic ECHO objects into a space collection.\n```\n\n```mdl\nfeat ObjectDebugCompanion\n desc: A Debug companion tab on every ECHO object exposing raw field values and DXNs.\n```\n\n```mdl\nfeat SpaceObjectsBrowser\n desc: A deck companion listing all objects in the active space with live reactive updates.\n```\n\n```mdl\nfeat Wireframe\n desc: Overlay labelled borders around every article and section surface.\n```\n\n```mdl\nfeat StatsPanel\n desc: A transient-stats panel rendering the shared telemetry store.\n```\n",
24
12
  mimeType: "application/x-mdl"
25
- } }), Plugin.make);
13
+ })), Plugin.make);
26
14
  //#endregion
27
15
  export { DebugPlugin, DebugPlugin as default };
28
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"DebugPlugin.mjs","names":[],"sources":["../../src/DebugPlugin.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder, DebugSettings, LogRecording, ReactSurface, StatsPanel } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { type DebugPluginOptions } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const DebugPlugin = Plugin.define<DebugPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addSettingsModule({ activate: DebugSettings }),\n Plugin.addModule(({ logStore }) => ({\n id: Capability.getModuleTag(ReactSurface) ?? 'surfaces',\n activatesOn: ActivationEvents.SetupReactSurface,\n activate: () => ReactSurface({ logStore }),\n })),\n Plugin.addModule({\n id: 'log-recording',\n activatesOn: ActivationEvents.Startup,\n activate: LogRecording,\n }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule(({ persistStats }) => ({\n id: 'stats-panel',\n activatesOn: ActivationEvents.Startup,\n activate: () => StatsPanel({ persist: persistStats ?? true }),\n })),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default DebugPlugin;\n"],"mappings":";;;;;;;AAeA,IAAa,cAAc,OAAO,OAA2B,IAAI,CAAC,CAAC,KACjE,UAAU,kBAAkB,EAAE,UAAU,gBAAgB,CAAC,GACzD,UAAU,kBAAkB,EAAE,UAAU,cAAc,CAAC,GACvD,OAAO,WAAW,EAAE,gBAAgB;CAClC,IAAI,WAAW,aAAa,YAAY,KAAK;CAC7C,aAAa,iBAAiB;CAC9B,gBAAgB,aAAa,EAAE,SAAS,CAAC;AAC3C,EAAE,GACF,OAAO,UAAU;CACf,IAAI;CACJ,aAAa,iBAAiB;CAC9B,UAAU;AACZ,CAAC,GACD,UAAU,sBAAsB,EAAE,aAAa,CAAC,GAChD,OAAO,WAAW,EAAE,oBAAoB;CACtC,IAAI;CACJ,aAAa,iBAAiB;CAC9B,gBAAgB,WAAW,EAAE,SAAS,gBAAgB,KAAK,CAAC;AAC9D,EAAE,GACF,UAAU,qBAAqB,EAC7B,OAAO;CAAE,UAAU,KAAK,QAAQ;CAAK,MAAM;CAAc,SAAS;CAAY,UAAU;AAAoB,EAC9G,CAAC,GACD,OAAO,IACT"}
1
+ {"version":3,"file":"DebugPlugin.mjs","names":[],"sources":["../../src/DebugPlugin.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport { AppGraphBuilder, DebugSettings, LogRecording, ReactSurface, StatsPanel } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\nimport * as Debug from './types/Debug';\n\nexport const DebugPlugin = Plugin.define<Debug.DebugPluginOptions>(meta).pipe(\n Plugin.addModule(AppGraphBuilder),\n Plugin.addModule(DebugSettings),\n Plugin.addModule(ReactSurface),\n Plugin.addModule(LogRecording),\n Plugin.addModule(AppCapability.translations(translations)),\n Plugin.addModule(StatsPanel),\n Plugin.addModule(\n AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n }),\n ),\n Plugin.make,\n);\n\nexport default DebugPlugin;\n"],"mappings":";;;;;;;AAeA,IAAa,cAAc,OAAO,OAAiC,IAAI,CAAC,CAAC,KACvE,OAAO,UAAU,eAAe,GAChC,OAAO,UAAU,aAAa,GAC9B,OAAO,UAAU,YAAY,GAC7B,OAAO,UAAU,YAAY,GAC7B,OAAO,UAAU,cAAc,aAAa,YAAY,CAAC,GACzD,OAAO,UAAU,UAAU,GAC3B,OAAO,UACL,cAAc,YAAY;CACxB,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC,CACH,GACA,OAAO,IACT"}
@@ -1,9 +1,8 @@
1
- import { Plugin } from "@dxos/app-framework";
2
1
  import { meta } from "#meta";
3
- import { AppPlugin } from "@dxos/app-toolkit";
2
+ import * as Plugin from "@dxos/app-framework/Plugin";
4
3
  import { AppGraphBuilder, DebugSettings } from "#capabilities";
5
4
  //#region src/DebugPlugin.node.ts
6
- var DebugPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }), AppPlugin.addSettingsModule({ activate: DebugSettings }), Plugin.make);
5
+ var DebugPlugin = Plugin.define(meta).pipe(Plugin.addModule(AppGraphBuilder), Plugin.addModule(DebugSettings), Plugin.make);
7
6
  //#endregion
8
7
  export { DebugPlugin, DebugPlugin as default };
9
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"DebugPlugin.node.mjs","names":[],"sources":["../../src/DebugPlugin.node.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder, DebugSettings } from '#capabilities';\nimport { meta } from '#meta';\nimport { type DebugPluginOptions } from '#types';\n\nexport const DebugPlugin = Plugin.define<DebugPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addSettingsModule({ activate: DebugSettings }),\n Plugin.make,\n);\n\nexport default DebugPlugin;\n"],"mappings":";;;;;AAWA,IAAa,cAAc,OAAO,OAA2B,IAAI,CAAC,CAAC,KACjE,UAAU,kBAAkB,EAAE,UAAU,gBAAgB,CAAC,GACzD,UAAU,kBAAkB,EAAE,UAAU,cAAc,CAAC,GACvD,OAAO,IACT"}
1
+ {"version":3,"file":"DebugPlugin.node.mjs","names":[],"sources":["../../src/DebugPlugin.node.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\n\nimport { AppGraphBuilder, DebugSettings } from '#capabilities';\nimport { meta } from '#meta';\n\nimport * as Debug from './types/Debug';\n\nexport const DebugPlugin = Plugin.define<Debug.DebugPluginOptions>(meta).pipe(\n Plugin.addModule(AppGraphBuilder),\n Plugin.addModule(DebugSettings),\n Plugin.make,\n);\n\nexport default DebugPlugin;\n"],"mappings":";;;;AAWA,IAAa,cAAc,OAAO,OAAiC,IAAI,CAAC,CAAC,KACvE,OAAO,UAAU,eAAe,GAChC,OAAO,UAAU,aAAa,GAC9B,OAAO,IACT"}
@@ -1,5 +1,5 @@
1
- import { Plugin } from "@dxos/app-framework";
2
1
  import { meta } from "#meta";
2
+ import * as Plugin from "@dxos/app-framework/Plugin";
3
3
  //#region src/DebugPlugin.workerd.ts
4
4
  var DebugPlugin = Plugin.define(meta).pipe(Plugin.make);
5
5
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"DebugPlugin.workerd.mjs","names":[],"sources":["../../src/DebugPlugin.workerd.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\nimport { type DebugPluginOptions } from '#types';\n\nexport const DebugPlugin = Plugin.define<DebugPluginOptions>(meta).pipe(Plugin.make);\n\nexport default DebugPlugin;\n"],"mappings":";;;AASA,IAAa,cAAc,OAAO,OAA2B,IAAI,CAAC,CAAC,KAAK,OAAO,IAAI"}
1
+ {"version":3,"file":"DebugPlugin.workerd.mjs","names":[],"sources":["../../src/DebugPlugin.workerd.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\n\nimport { meta } from '#meta';\n\nimport * as Debug from './types/Debug';\n\nexport const DebugPlugin = Plugin.define<Debug.DebugPluginOptions>(meta).pipe(Plugin.make);\n\nexport default DebugPlugin;\n"],"mappings":";;;AAUA,IAAa,cAAc,OAAO,OAAiC,IAAI,CAAC,CAAC,KAAK,OAAO,IAAI"}
@@ -0,0 +1,15 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import { meta } from "#meta";
3
+ import { Role } from "@dxos/app-framework";
4
+ //#region src/types/DebugSurface.ts
5
+ var DebugSurface_exports = /* @__PURE__ */ __exportAll({ Stats: () => Stats });
6
+ /**
7
+ * Role token for the transient-stats panel — renders the {@link AppCapabilities.StatsPanel} store
8
+ * (arbitrary reactive telemetry keyed by owner id). A layout targets this role (role-only dispatch);
9
+ * the surface reads the store directly, so it needs no subject.
10
+ */
11
+ var Stats = Role.make(`${meta.profile.key}.surface.stats`);
12
+ //#endregion
13
+ export { Stats, DebugSurface_exports as t };
14
+
15
+ //# sourceMappingURL=DebugSurface.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugSurface.mjs","names":[],"sources":["../../src/types/DebugSurface.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { Role } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\n/**\n * Role token for the transient-stats panel — renders the {@link AppCapabilities.StatsPanel} store\n * (arbitrary reactive telemetry keyed by owner id). A layout targets this role (role-only dispatch);\n * the surface reads the store directly, so it needs no subject.\n */\nexport const Stats = Role.make<Record<string, unknown>>(`${meta.profile.key}.surface.stats`);\n"],"mappings":";;;;;;;;;;AAeA,IAAa,QAAQ,KAAK,KAA8B,GAAG,KAAK,QAAQ,IAAI,eAAe"}
@@ -0,0 +1,12 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import * as Schema from "effect/Schema";
3
+ //#region src/types/Settings.ts
4
+ var Settings_exports = /* @__PURE__ */ __exportAll({ Settings: () => Settings });
5
+ var Settings = Schema.mutable(Schema.Struct({
6
+ wireframe: Schema.optional(Schema.Boolean),
7
+ traceAll: Schema.optional(Schema.Boolean)
8
+ }));
9
+ //#endregion
10
+ export { Settings, Settings_exports as t };
11
+
12
+ //# sourceMappingURL=Settings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Settings.mjs","names":[],"sources":["../../src/types/Settings.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nexport const Settings = Schema.mutable(\n Schema.Struct({\n wireframe: Schema.optional(Schema.Boolean),\n traceAll: Schema.optional(Schema.Boolean),\n }),\n);\n\nexport interface Settings extends Schema.Schema.Type<typeof Settings> {}\n"],"mappings":";;;;AAQA,IAAa,WAAW,OAAO,QAC7B,OAAO,OAAO;CACZ,WAAW,OAAO,SAAS,OAAO,OAAO;CACzC,UAAU,OAAO,SAAS,OAAO,OAAO;AAC1C,CAAC,CACH"}
@@ -1,10 +1,42 @@
1
- import { Capability } from "@dxos/app-framework";
1
+ import { DebugCapabilities } from "./Debug.mjs";
2
+ import { Start } from "./DebugEvents.mjs";
3
+ import * as Capability from "@dxos/app-framework/Capability";
4
+ import * as AppCapability from "@dxos/app-toolkit/AppCapability";
5
+ import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
6
+ import * as Capabilities from "@dxos/app-framework/Capabilities";
7
+ import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
2
8
  //#region src/capabilities/index.ts
3
- var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("./chunk-app-graph-builder.mjs"));
4
- var ReactSurface = Capability.lazy("ReactSurface", () => import("./chunk-react-surface.mjs"));
5
- var DebugSettings = Capability.lazy("DebugSettings", () => import("./chunk-settings.mjs"));
6
- var StatsPanel = Capability.lazy("StatsPanel", () => import("./chunk-stats-panel.mjs"));
7
- var LogRecording = Capability.lazy("LogRecording", () => import("./chunk-log-recording.mjs"));
9
+ var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"));
10
+ var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), {
11
+ roles: [
12
+ "org.dxos.plugin.debug.surface.stats",
13
+ "org.dxos.role.article",
14
+ "org.dxos.role.deckCompanion.logs",
15
+ "org.dxos.role.deckCompanion.spaceObjects",
16
+ "org.dxos.role.section",
17
+ "org.dxos.role.statusIndicator"
18
+ ],
19
+ requires: [
20
+ Capabilities.AtomRegistry,
21
+ DebugCapabilities.Settings,
22
+ AppCapabilities.FileUploader
23
+ ],
24
+ props: ({ logStore }) => ({ logStore })
25
+ });
26
+ var DebugSettings = AppCapability.settings(() => import("./chunk-settings.mjs"), {
27
+ activatesOn: ActivationEvents.Idle,
28
+ provides: [DebugCapabilities.Settings]
29
+ });
30
+ var StatsPanel = Capability.lazyModule("StatsPanel", {
31
+ requires: [Capabilities.AtomRegistry],
32
+ provides: [AppCapabilities.StatsPanel],
33
+ props: ({ persistStats }) => ({ persist: persistStats ?? true }),
34
+ activatesOn: Start
35
+ }, () => import("./chunk-stats-panel.mjs"));
36
+ var LogRecording = Capability.lazyModule("LogRecording", {
37
+ provides: [],
38
+ activatesOn: Start
39
+ }, () => import("./chunk-log-recording.mjs"));
8
40
  //#endregion
9
41
  export { AppGraphBuilder, DebugSettings, LogRecording, ReactSurface, StatsPanel };
10
42
 
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const DebugSettings = Capability.lazy('DebugSettings', () => import('./settings'));\nexport const StatsPanel = Capability.lazy('StatsPanel', () => import('./stats-panel'));\nexport const LogRecording = Capability.lazy('LogRecording', () => import('./log-recording'));\n"],"mappings":";;AAMA,IAAa,kBAAkB,WAAW,KAAK,yBAAyB,OAAO,gCAAsB;AACrG,IAAa,eAAe,WAAW,KAAK,sBAAsB,OAAO,4BAAkB;AAC3F,IAAa,gBAAgB,WAAW,KAAK,uBAAuB,OAAO,uBAAa;AACxF,IAAa,aAAa,WAAW,KAAK,oBAAoB,OAAO,0BAAgB;AACrF,IAAa,eAAe,WAAW,KAAK,sBAAsB,OAAO,4BAAkB"}
1
+ {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport * as Debug from '../types/Debug';\nimport * as DebugEvents from '../types/DebugEvents';\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder'));\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface'), {\n roles: [\n 'org.dxos.plugin.debug.surface.stats',\n 'org.dxos.role.article',\n 'org.dxos.role.deckCompanion.logs',\n 'org.dxos.role.deckCompanion.spaceObjects',\n 'org.dxos.role.section',\n 'org.dxos.role.statusIndicator',\n ],\n requires: [Capabilities.AtomRegistry, Debug.DebugCapabilities.Settings, AppCapabilities.FileUploader],\n props: ({ logStore }: Debug.DebugPluginOptions) => ({ logStore }),\n});\nexport const DebugSettings = AppCapability.settings(() => import('./settings'), {\n activatesOn: ActivationEvents.Idle,\n provides: [Debug.DebugCapabilities.Settings],\n});\nexport const StatsPanel = Capability.lazyModule(\n 'StatsPanel',\n {\n requires: [Capabilities.AtomRegistry],\n provides: [AppCapabilities.StatsPanel],\n props: ({ persistStats }: Debug.DebugPluginOptions) => ({ persist: persistStats ?? true }),\n activatesOn: DebugEvents.Start,\n },\n () => import('./stats-panel'),\n);\nexport const LogRecording = Capability.lazyModule(\n 'LogRecording',\n { provides: [], activatesOn: DebugEvents.Start },\n () => import('./log-recording'),\n);\n"],"mappings":";;;;;;;;AAaA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,gCAAsB;AAChG,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAoB;CACjF,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EAAC,aAAa;oBAAsC;EAAU,gBAAgB;CAAY;CACpG,QAAQ,EAAE,gBAA0C,EAAE,SAAS;AACjE,CAAC;AACD,IAAa,gBAAgB,cAAc,eAAe,OAAO,yBAAe;CAC9E,aAAa,iBAAiB;CAC9B,UAAU,CAAA,kBAAyB,QAAQ;AAC7C,CAAC;AACD,IAAa,aAAa,WAAW,WACnC,cACA;CACE,UAAU,CAAC,aAAa,YAAY;CACpC,UAAU,CAAC,gBAAgB,UAAU;CACrC,QAAQ,EAAE,oBAA8C,EAAE,SAAS,gBAAgB,KAAK;CACxF,aAAa;AACf,SACM,OAAO,0BACf;AACA,IAAa,eAAe,WAAW,WACrC,gBACA;CAAE,UAAU,CAAC;CAAG,aAAa;AAAkB,SACzC,OAAO,4BACf"}
@@ -1,8 +1,8 @@
1
1
  import { useMemo, useState } from "react";
2
+ import { Filter, Json, Obj, Query } from "@dxos/echo";
2
3
  import { Clipboard, Panel, ScrollArea, Toolbar } from "@dxos/react-ui";
3
4
  import { mx } from "@dxos/ui-theme";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
- import { Filter, Json, Obj, Query } from "@dxos/echo";
6
6
  import { ObjectsTree } from "@dxos/devtools";
7
7
  import { useQuery } from "@dxos/echo-react";
8
8
  import { Syntax } from "@dxos/react-ui-syntax-highlighter";
@@ -1,16 +1,96 @@
1
- import { setDeep } from "@dxos/util";
2
- import { useCallback, useEffect, useMemo, useState } from "react";
1
+ import { Settings } from "./Settings.mjs";
2
+ import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
3
3
  import { meta } from "#meta";
4
- import { AppSpace } from "@dxos/app-toolkit";
4
+ import { setDeep } from "@dxos/util";
5
5
  import { IconButton, Input, Select, Toast, useFileDownload, useTranslation } from "@dxos/react-ui";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- import { Settings } from "#types";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
+ import { Logger } from "@dxos/react-ui-debug";
8
8
  import { useClient } from "@dxos/react-client";
9
+ import * as AppSpace from "@dxos/app-toolkit/AppSpace";
9
10
  import { SaveConfig, Storage, defs } from "@dxos/config";
10
11
  import { log } from "@dxos/log";
11
12
  import { MANUAL_LOG_EXPORT_MAX_BYTES } from "@dxos/log-store-idb";
12
13
  import { Form } from "@dxos/react-ui-form";
13
14
  import { TRACE_ALL_KEY } from "@dxos/tracing";
15
+ import { getDebugPortController } from "@dxos/react-client/devtools";
16
+ //#region src/containers/DebugPortSettings/DebugPortSettings.tsx
17
+ /**
18
+ * Scopes the panel to the controller's own entries.
19
+ *
20
+ * A display filter, not `initialFilter`: that one narrows what the process-wide buffer captures,
21
+ * which would starve the main log companion reading the same buffer.
22
+ */
23
+ var isDebugPortRow = (row) => (row.entry.meta?.F ?? "").includes(CONTROLLER_FILE);
24
+ var CONTROLLER_FILE = "devtools/debug-port-controller";
25
+ /**
26
+ * Start/stop the agent debug port and surface the session id an agent needs.
27
+ *
28
+ * The port evaluates agent-supplied code against the live client, so it is off until this switch is
29
+ * flipped, the session id is regenerated on every activation, and nothing survives a reload.
30
+ */
31
+ var DebugPortSettings = ({ controller = getDebugPortController(), disabled }) => {
32
+ const { t } = useTranslation(meta.profile.key);
33
+ const status = useSyncExternalStore(useCallback((listener) => controller.subscribe(listener), [controller]), useCallback(() => controller.getStatus(), [controller]));
34
+ const handleToggle = useCallback((checked) => checked ? controller.start({ persist: true }) : controller.stop(), [controller]);
35
+ const handleCopy = useCallback(() => {
36
+ if (status.session) navigator.clipboard.writeText(status.session);
37
+ }, [status.session]);
38
+ return /* @__PURE__ */ jsxs(Form.Section, {
39
+ title: t("settings.debug-port.section.label"),
40
+ description: t("settings.debug-port.section.description"),
41
+ children: [/* @__PURE__ */ jsx(Form.Row, {
42
+ label: t("settings.debug-port.label"),
43
+ description: t("settings.debug-port.description"),
44
+ children: /* @__PURE__ */ jsxs("div", {
45
+ className: "flex items-center gap-3",
46
+ children: [status.running && /* @__PURE__ */ jsxs("span", {
47
+ className: "text-sm text-description",
48
+ children: [
49
+ t("settings.debug-port.running.label"),
50
+ " ",
51
+ /* @__PURE__ */ jsx("span", {
52
+ className: "font-mono",
53
+ children: status.origin
54
+ })
55
+ ]
56
+ }), /* @__PURE__ */ jsx(Input.Root, { children: /* @__PURE__ */ jsx(Input.Switch, {
57
+ checked: status.running,
58
+ disabled,
59
+ onCheckedChange: handleToggle
60
+ }) })]
61
+ })
62
+ }), status.running && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Form.Row, {
63
+ standalone: true,
64
+ label: t("settings.debug-port.session.label"),
65
+ description: t("settings.debug-port.session.description"),
66
+ children: /* @__PURE__ */ jsxs("div", {
67
+ className: "flex items-center gap-2",
68
+ children: [/* @__PURE__ */ jsx("span", {
69
+ className: "grow truncate font-mono text-sm",
70
+ children: status.session
71
+ }), /* @__PURE__ */ jsx(IconButton, {
72
+ icon: "ph--copy--regular",
73
+ iconOnly: true,
74
+ label: t("settings.debug-port.copy-session.label"),
75
+ onClick: handleCopy
76
+ })]
77
+ })
78
+ }), /* @__PURE__ */ jsx(Form.Row, {
79
+ standalone: true,
80
+ label: t("settings.debug-port.log.label"),
81
+ classNames: "md:grid-cols-1 md:[grid-template-areas:\"header\"\"description\"\"control\"\"validation\"]",
82
+ children: /* @__PURE__ */ jsx(Logger.Root, {
83
+ rowFilter: isDebugPortRow,
84
+ children: /* @__PURE__ */ jsx(Logger.Content, {
85
+ classNames: "max-h-[16lh]",
86
+ children: /* @__PURE__ */ jsx(Logger.List, {})
87
+ })
88
+ })
89
+ })] })]
90
+ });
91
+ };
92
+ DebugPortSettings.displayName = "DebugPortSettings";
93
+ //#endregion
14
94
  //#region src/containers/DebugSettings/DebugSettings.tsx
15
95
  var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-debug/src/containers/DebugSettings/DebugSettings.tsx";
16
96
  var StorageAdapters = {
@@ -37,22 +117,22 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
37
117
  const fileName = `composer-${(/* @__PURE__ */ new Date()).toISOString().replace(/\W/g, "-")}.json`;
38
118
  download(file, fileName);
39
119
  if (onUpload) {
40
- const personalSpace = AppSpace.getPersonalSpace(client);
41
- if (!personalSpace) {
42
- log.error("no personal space available for upload", void 0, {
120
+ const defaultSpace = AppSpace.getDefaultSpace(client);
121
+ if (!defaultSpace) {
122
+ log.error("no default space available for upload", void 0, {
43
123
  "~LogMeta": "~LogMeta",
44
124
  F: __dxlog_file,
45
- L: 70,
125
+ L: 73,
46
126
  S: void 0
47
127
  });
48
128
  return;
49
129
  }
50
- const info = await onUpload(personalSpace.db, new File([file], fileName));
130
+ const info = await onUpload(defaultSpace.db, new File([file], fileName));
51
131
  if (!info) {
52
132
  log.error("diagnostics failed to upload to IPFS", void 0, {
53
133
  "~LogMeta": "~LogMeta",
54
134
  F: __dxlog_file,
55
- L: 75,
135
+ L: 78,
56
136
  S: void 0
57
137
  });
58
138
  return;
@@ -70,7 +150,7 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
70
150
  log.info("diagnostics", { url }, {
71
151
  "~LogMeta": "~LogMeta",
72
152
  F: __dxlog_file,
73
- L: 90,
153
+ L: 93,
74
154
  S: void 0
75
155
  });
76
156
  }
@@ -130,13 +210,13 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
130
210
  ], StorageAdapters[value]);
131
211
  }, [storageConfig, t]);
132
212
  return /* @__PURE__ */ jsx(Form.Root, {
133
- schema: Settings.Settings,
213
+ schema: Settings,
134
214
  values: settings,
135
215
  variant: "settings",
136
216
  readonly: !onSettingsChange,
137
217
  children: /* @__PURE__ */ jsx(Form.Viewport, {
138
218
  scroll: true,
139
- children: /* @__PURE__ */ jsx(Form.Content, { children: /* @__PURE__ */ jsxs(Form.Section, {
219
+ children: /* @__PURE__ */ jsxs(Form.Content, { children: [/* @__PURE__ */ jsxs(Form.Section, {
140
220
  title: meta.profile.name ?? meta.profile.key,
141
221
  children: [
142
222
  /* @__PURE__ */ jsx(Form.Row, {
@@ -218,7 +298,7 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
218
298
  })
219
299
  })
220
300
  ]
221
- }) })
301
+ }), /* @__PURE__ */ jsx(DebugPortSettings, { disabled: !onSettingsChange })] })
222
302
  })
223
303
  });
224
304
  };
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-DebugSettings.mjs","names":[],"sources":["../../src/containers/DebugSettings/DebugSettings.tsx"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { AppCapabilities, AppSpace } from '@dxos/app-toolkit';\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { type ConfigProto, SaveConfig, Storage, defs } from '@dxos/config';\nimport { log } from '@dxos/log';\nimport { type IdbLogStore, MANUAL_LOG_EXPORT_MAX_BYTES } from '@dxos/log-store-idb';\nimport { useClient } from '@dxos/react-client';\nimport { IconButton, Input, Select, Toast, useFileDownload, useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { TRACE_ALL_KEY } from '@dxos/tracing';\nimport { setDeep } from '@dxos/util';\n\nimport { meta } from '#meta';\nimport { Settings } from '#types';\n\ntype Toast = {\n title: string;\n description?: string;\n};\n\nconst StorageAdapters = {\n opfs: defs.Runtime.Client.Storage.StorageDriver.WEBFS,\n idb: defs.Runtime.Client.Storage.StorageDriver.IDB,\n} as const;\n\nexport type DebugSettingsProps = AppSurface.SettingsProps<\n Settings.Settings,\n {\n logStore: IdbLogStore;\n onUpload?: AppCapabilities.FileUploader;\n }\n>;\n\nexport const DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }: DebugSettingsProps) => {\n const { t } = useTranslation(meta.profile.key);\n const [toast, setToast] = useState<Toast>();\n const download = useFileDownload();\n const [storageConfig, setStorageConfig] = useState<ConfigProto>({});\n const client = useClient();\n\n useEffect(() => {\n void Storage().then((config) => setStorageConfig(config));\n }, []);\n\n const handleToast = useCallback(\n (toast: Toast) => {\n setToast(toast);\n const timer = setTimeout(() => setToast(undefined), 5_000);\n return () => clearTimeout(timer);\n },\n [setToast],\n );\n\n const handleDownload = useCallback(async () => {\n const data = await client.diagnostics();\n const file = new Blob([JSON.stringify(data, undefined, 2)], {\n type: 'text/plain',\n });\n const fileName = `composer-${new Date().toISOString().replace(/\\W/g, '-')}.json`;\n download(file, fileName);\n\n if (onUpload) {\n const personalSpace = AppSpace.getPersonalSpace(client);\n if (!personalSpace) {\n log.error('no personal space available for upload');\n return;\n }\n const info = await onUpload(personalSpace.db, new File([file], fileName));\n if (!info) {\n log.error('diagnostics failed to upload to IPFS');\n return;\n }\n handleToast({\n title: t('settings.uploaded.message'),\n description: t('settings.uploaded.description'),\n });\n\n // TODO(nf): move to IpfsPlugin?\n const url = client.config.values.runtime!.services!.ipfs!.gateway + '/' + info.cid;\n void navigator.clipboard.writeText(url);\n handleToast({\n title: t('settings.uploaded.message'),\n description: t('settings.uploaded.description'),\n });\n log.info('diagnostics', { url });\n }\n }, [client, download, handleToast, onUpload, t]);\n\n const handleDownloadLogs = useCallback(async () => {\n const file = await logStore.exportBlob({ maxSize: MANUAL_LOG_EXPORT_MAX_BYTES });\n const fileName = `composer-logs-${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.ndjson`;\n download(file, fileName);\n }, [download, logStore]);\n\n const handleRepair = useCallback(async () => {\n try {\n const info = await client.repair();\n setStorageConfig(await Storage());\n handleToast({\n title: t('settings.repair-success.message'),\n description: JSON.stringify(info, undefined, 2),\n });\n } catch (err: any) {\n handleToast({\n title: t('settings.repair-failed.message'),\n description: err.message,\n });\n }\n }, [client, handleToast, t]);\n\n const handleWireframeChange = useCallback(\n (checked: boolean) => onSettingsChange?.((s) => ({ ...s, wireframe: !!checked })),\n [onSettingsChange],\n );\n\n const traceAll = useMemo(\n () => settings.traceAll ?? (typeof localStorage !== 'undefined' && localStorage.getItem(TRACE_ALL_KEY) === 'true'),\n [settings.traceAll],\n );\n\n const handleTraceAllChange = useCallback(\n (checked: boolean) => {\n const value = !!checked;\n localStorage.setItem(TRACE_ALL_KEY, String(value));\n onSettingsChange?.((s) => ({ ...s, traceAll: value }));\n },\n [onSettingsChange],\n );\n\n const handleOpenTracingPanel = useCallback(() => {\n window.open('about:blank', '_blank');\n }, []);\n\n const handleStorageAdapterChange = useCallback(\n (value: string) => {\n if (confirm(t('settings.storage-adapter.changed-alert.message'))) {\n updateConfig(\n storageConfig,\n setStorageConfig,\n ['runtime', 'client', 'storage', 'dataStore'],\n StorageAdapters[value as keyof typeof StorageAdapters],\n );\n }\n },\n [storageConfig, t],\n );\n\n return (\n <Form.Root schema={Settings.Settings} values={settings} variant='settings' readonly={!onSettingsChange}>\n <Form.Viewport scroll>\n <Form.Content>\n <Form.Section title={meta.profile.name ?? meta.profile.key}>\n <Form.Row label={t('settings.wireframe.label')} description={t('settings.wireframe.description')}>\n <Input.Root>\n <Input.Switch\n disabled={!onSettingsChange}\n checked={settings.wireframe}\n onCheckedChange={handleWireframeChange}\n />\n </Input.Root>\n </Form.Row>\n <Form.Row label={t('settings.trace-all.label')} description={t('settings.trace-all.description')}>\n <Input.Root>\n <Input.Switch disabled={!onSettingsChange} checked={traceAll} onCheckedChange={handleTraceAllChange} />\n </Input.Root>\n </Form.Row>\n <Form.Row label={t('settings.tracing-panel.label')} description={t('settings.tracing-panel.description')}>\n <IconButton\n icon='ph--arrow-square-out--regular'\n iconOnly\n label={t('settings.tracing-panel.label')}\n onClick={handleOpenTracingPanel}\n />\n </Form.Row>\n <Form.Row\n label={t('settings.download-diagnostics.label')}\n description={t('settings.download-diagnostics.description')}\n >\n <IconButton\n icon='ph--download-simple--regular'\n iconOnly\n label={t('settings.download-diagnostics.label')}\n onClick={handleDownload}\n />\n </Form.Row>\n <Form.Row label={t('settings.download-logs.label')} description={t('settings.download-logs.description')}>\n <IconButton\n icon='ph--download-simple--regular'\n iconOnly\n label={t('settings.download-logs.label')}\n onClick={handleDownloadLogs}\n />\n </Form.Row>\n <Form.Row label={t('settings.repair.label')} description={t('settings.repair.description')}>\n <IconButton\n icon='ph--first-aid-kit--regular'\n iconOnly\n label={t('settings.repair.label')}\n onClick={handleRepair}\n />\n </Form.Row>\n\n {/* TODO(burdon): Move to layout? */}\n {toast && (\n <Toast.Root>\n <Toast.Title icon='ph--gift--duotone'>\n <span>{toast.title}</span>\n </Toast.Title>\n {toast.description && <Toast.Description>{toast.description}</Toast.Description>}\n </Toast.Root>\n )}\n\n <Form.Row\n label={t('settings.choose-storage-adaptor.label')}\n description={t('settings.choose-storage-adaptor.description')}\n >\n <Select.Root\n disabled={!onSettingsChange}\n value={\n Object.entries(StorageAdapters).find(\n ([_name, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore,\n )?.[0]\n }\n onValueChange={handleStorageAdapterChange}\n >\n <Select.TriggerButton disabled={!onSettingsChange} placeholder={t('settings.data-store.label')} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {Object.keys(StorageAdapters).map((key) => (\n <Select.Option key={key} value={key}>\n {t(`settings.storage-adaptor.${key}.label`)}\n </Select.Option>\n ))}\n </Select.Viewport>\n <Select.Arrow />\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </Form.Row>\n </Form.Section>\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n );\n};\n\nconst updateConfig = (config: ConfigProto, setConfig: (newConfig: ConfigProto) => void, path: string[], value: any) => {\n const storageConfigCopy = JSON.parse(JSON.stringify(config ?? {}));\n setDeep(storageConfigCopy, path, value);\n setConfig(storageConfigCopy);\n queueMicrotask(async () => {\n await SaveConfig(storageConfigCopy);\n });\n};\n\nDebugSettings.displayName = 'DebugSettings';\n"],"mappings":";;;;;;;;;;;;;;;AAyBA,IAAM,kBAAkB;CACtB,MAAM,KAAK,QAAQ,OAAO,QAAQ,cAAc;CAChD,KAAK,KAAK,QAAQ,OAAO,QAAQ,cAAc;AACjD;AAUA,IAAa,iBAAiB,EAAE,UAAU,kBAAkB,UAAU,eAAmC;CACvG,MAAM,EAAE,MAAM,eAAe,KAAK,QAAQ,GAAG;CAC7C,MAAM,CAAC,OAAO,YAAY,SAAgB;CAC1C,MAAM,WAAW,gBAAgB;CACjC,MAAM,CAAC,eAAe,oBAAoB,SAAsB,CAAC,CAAC;CAClE,MAAM,SAAS,UAAU;CAEzB,gBAAgB;EACd,QAAa,CAAC,CAAC,MAAM,WAAW,iBAAiB,MAAM,CAAC;CAC1D,GAAG,CAAC,CAAC;CAEL,MAAM,cAAc,aACjB,UAAiB;EAChB,SAAS,KAAK;EACd,MAAM,QAAQ,iBAAiB,SAAS,KAAA,CAAS,GAAG,GAAK;EACzD,aAAa,aAAa,KAAK;CACjC,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AAC,CAAC,CAAC;CACjE,QAAQ,mBAAmB,MAAM,KAAK;CACtC,UAAU,iBAAiB;CAC3B,eAAe,YAAY;EACzB,MAAM,WAAW,iBAAiB;CACpC,CAAC;AACH;AAEA,cAAc,cAAc"}
1
+ {"version":3,"file":"chunk-DebugSettings.mjs","names":[],"sources":["../../src/containers/DebugPortSettings/DebugPortSettings.tsx","../../src/containers/DebugSettings/DebugSettings.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useCallback, useSyncExternalStore } from 'react';\n\nimport { type DebugPortController, getDebugPortController } from '@dxos/react-client/devtools';\nimport { IconButton, Input, useTranslation } from '@dxos/react-ui';\nimport { Logger, type LogRow } from '@dxos/react-ui-debug';\nimport { Form } from '@dxos/react-ui-form';\n\nimport { meta } from '#meta';\n\n/**\n * Scopes the panel to the controller's own entries.\n *\n * A display filter, not `initialFilter`: that one narrows what the process-wide buffer captures,\n * which would starve the main log companion reading the same buffer.\n */\nconst isDebugPortRow = (row: LogRow): boolean => (row.entry.meta?.F ?? '').includes(CONTROLLER_FILE);\n\nconst CONTROLLER_FILE = 'devtools/debug-port-controller';\n\nexport type DebugPortSettingsProps = {\n /** Injectable for stories/tests; defaults to the page-wide controller. */\n controller?: DebugPortController;\n /** The switch starts arbitrary eval, so it follows the form's readonly state like every other control. */\n disabled?: boolean;\n};\n\n/**\n * Start/stop the agent debug port and surface the session id an agent needs.\n *\n * The port evaluates agent-supplied code against the live client, so it is off until this switch is\n * flipped, the session id is regenerated on every activation, and nothing survives a reload.\n */\nexport const DebugPortSettings = ({ controller = getDebugPortController(), disabled }: DebugPortSettingsProps) => {\n const { t } = useTranslation(meta.profile.key);\n const subscribe = useCallback((listener: () => void) => controller.subscribe(listener), [controller]);\n const getStatus = useCallback(() => controller.getStatus(), [controller]);\n const status = useSyncExternalStore(subscribe, getStatus);\n\n // `persist` keeps the session across reloads of this tab: an OAuth redirect or a HMR reload would\n // otherwise strand the agent mid-investigation with a dead session id.\n const handleToggle = useCallback(\n (checked: boolean) => (checked ? controller.start({ persist: true }) : controller.stop()),\n [controller],\n );\n\n const handleCopy = useCallback(() => {\n if (status.session) {\n void navigator.clipboard.writeText(status.session);\n }\n }, [status.session]);\n\n return (\n <Form.Section\n title={t('settings.debug-port.section.label')}\n description={t('settings.debug-port.section.description')}\n >\n <Form.Row label={t('settings.debug-port.label')} description={t('settings.debug-port.description')}>\n <div className='flex items-center gap-3'>\n {status.running && (\n <span className='text-sm text-description'>\n {t('settings.debug-port.running.label')} <span className='font-mono'>{status.origin}</span>\n </span>\n )}\n <Input.Root>\n <Input.Switch checked={status.running} disabled={disabled} onCheckedChange={handleToggle} />\n </Input.Root>\n </div>\n </Form.Row>\n\n {status.running && (\n <>\n <Form.Row\n standalone\n label={t('settings.debug-port.session.label')}\n description={t('settings.debug-port.session.description')}\n >\n <div className='flex items-center gap-2'>\n <span className='grow truncate font-mono text-sm'>{status.session}</span>\n <IconButton\n icon='ph--copy--regular'\n iconOnly\n label={t('settings.debug-port.copy-session.label')}\n onClick={handleCopy}\n />\n </div>\n </Form.Row>\n\n {/* The settings variant puts the control in a right-hand column; log rows need the full\n width, so this row collapses to a single column. */}\n <Form.Row\n standalone\n label={t('settings.debug-port.log.label')}\n classNames='md:grid-cols-1 md:[grid-template-areas:\"header\"\"description\"\"control\"\"validation\"]'\n >\n {/* Only the rows: a settings card has no room for the panel's toolbar, levels or filter. */}\n <Logger.Root rowFilter={isDebugPortRow}>\n <Logger.Content classNames='max-h-[16lh]'>\n <Logger.List />\n </Logger.Content>\n </Logger.Root>\n </Form.Row>\n </>\n )}\n </Form.Section>\n );\n};\n\nDebugPortSettings.displayName = 'DebugPortSettings';\n","//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppSpace from '@dxos/app-toolkit/AppSpace';\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { type ConfigProto, SaveConfig, Storage, defs } from '@dxos/config';\nimport { log } from '@dxos/log';\nimport { type IdbLogStore, MANUAL_LOG_EXPORT_MAX_BYTES } from '@dxos/log-store-idb';\nimport { useClient } from '@dxos/react-client';\nimport { IconButton, Input, Select, Toast, useFileDownload, useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { TRACE_ALL_KEY } from '@dxos/tracing';\nimport { setDeep } from '@dxos/util';\n\nimport { meta } from '#meta';\n\nimport * as Settings from '../../types/Settings';\nimport { DebugPortSettings } from '../DebugPortSettings';\n\ntype Toast = {\n title: string;\n description?: string;\n};\n\nconst StorageAdapters = {\n opfs: defs.Runtime.Client.Storage.StorageDriver.WEBFS,\n idb: defs.Runtime.Client.Storage.StorageDriver.IDB,\n} as const;\n\nexport type DebugSettingsProps = AppSurface.SettingsProps<\n Settings.Settings,\n {\n logStore: IdbLogStore;\n onUpload?: AppCapabilities.FileUploader;\n }\n>;\n\nexport const DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }: DebugSettingsProps) => {\n const { t } = useTranslation(meta.profile.key);\n const [toast, setToast] = useState<Toast>();\n const download = useFileDownload();\n const [storageConfig, setStorageConfig] = useState<ConfigProto>({});\n const client = useClient();\n\n useEffect(() => {\n void Storage().then((config) => setStorageConfig(config));\n }, []);\n\n const handleToast = useCallback(\n (toast: Toast) => {\n setToast(toast);\n const timer = setTimeout(() => setToast(undefined), 5_000);\n return () => clearTimeout(timer);\n },\n [setToast],\n );\n\n const handleDownload = useCallback(async () => {\n const data = await client.diagnostics();\n const file = new Blob([JSON.stringify(data, undefined, 2)], {\n type: 'text/plain',\n });\n const fileName = `composer-${new Date().toISOString().replace(/\\W/g, '-')}.json`;\n download(file, fileName);\n\n if (onUpload) {\n const defaultSpace = AppSpace.getDefaultSpace(client);\n if (!defaultSpace) {\n log.error('no default space available for upload');\n return;\n }\n const info = await onUpload(defaultSpace.db, new File([file], fileName));\n if (!info) {\n log.error('diagnostics failed to upload to IPFS');\n return;\n }\n handleToast({\n title: t('settings.uploaded.message'),\n description: t('settings.uploaded.description'),\n });\n\n // TODO(nf): move to IpfsPlugin?\n const url = client.config.values.runtime!.services!.ipfs!.gateway + '/' + info.cid;\n void navigator.clipboard.writeText(url);\n handleToast({\n title: t('settings.uploaded.message'),\n description: t('settings.uploaded.description'),\n });\n log.info('diagnostics', { url });\n }\n }, [client, download, handleToast, onUpload, t]);\n\n const handleDownloadLogs = useCallback(async () => {\n const file = await logStore.exportBlob({ maxSize: MANUAL_LOG_EXPORT_MAX_BYTES });\n const fileName = `composer-logs-${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.ndjson`;\n download(file, fileName);\n }, [download, logStore]);\n\n const handleRepair = useCallback(async () => {\n try {\n const info = await client.repair();\n setStorageConfig(await Storage());\n handleToast({\n title: t('settings.repair-success.message'),\n description: JSON.stringify(info, undefined, 2),\n });\n } catch (err: any) {\n handleToast({\n title: t('settings.repair-failed.message'),\n description: err.message,\n });\n }\n }, [client, handleToast, t]);\n\n const handleWireframeChange = useCallback(\n (checked: boolean) => onSettingsChange?.((s) => ({ ...s, wireframe: !!checked })),\n [onSettingsChange],\n );\n\n const traceAll = useMemo(\n () => settings.traceAll ?? (typeof localStorage !== 'undefined' && localStorage.getItem(TRACE_ALL_KEY) === 'true'),\n [settings.traceAll],\n );\n\n const handleTraceAllChange = useCallback(\n (checked: boolean) => {\n const value = !!checked;\n localStorage.setItem(TRACE_ALL_KEY, String(value));\n onSettingsChange?.((s) => ({ ...s, traceAll: value }));\n },\n [onSettingsChange],\n );\n\n const handleOpenTracingPanel = useCallback(() => {\n window.open('about:blank', '_blank');\n }, []);\n\n const handleStorageAdapterChange = useCallback(\n (value: string) => {\n if (confirm(t('settings.storage-adapter.changed-alert.message'))) {\n updateConfig(\n storageConfig,\n setStorageConfig,\n ['runtime', 'client', 'storage', 'dataStore'],\n StorageAdapters[value as keyof typeof StorageAdapters],\n );\n }\n },\n [storageConfig, t],\n );\n\n return (\n <Form.Root schema={Settings.Settings} values={settings} variant='settings' readonly={!onSettingsChange}>\n <Form.Viewport scroll>\n <Form.Content>\n <Form.Section title={meta.profile.name ?? meta.profile.key}>\n <Form.Row label={t('settings.wireframe.label')} description={t('settings.wireframe.description')}>\n <Input.Root>\n <Input.Switch\n disabled={!onSettingsChange}\n checked={settings.wireframe}\n onCheckedChange={handleWireframeChange}\n />\n </Input.Root>\n </Form.Row>\n <Form.Row label={t('settings.trace-all.label')} description={t('settings.trace-all.description')}>\n <Input.Root>\n <Input.Switch disabled={!onSettingsChange} checked={traceAll} onCheckedChange={handleTraceAllChange} />\n </Input.Root>\n </Form.Row>\n <Form.Row label={t('settings.tracing-panel.label')} description={t('settings.tracing-panel.description')}>\n <IconButton\n icon='ph--arrow-square-out--regular'\n iconOnly\n label={t('settings.tracing-panel.label')}\n onClick={handleOpenTracingPanel}\n />\n </Form.Row>\n <Form.Row\n label={t('settings.download-diagnostics.label')}\n description={t('settings.download-diagnostics.description')}\n >\n <IconButton\n icon='ph--download-simple--regular'\n iconOnly\n label={t('settings.download-diagnostics.label')}\n onClick={handleDownload}\n />\n </Form.Row>\n <Form.Row label={t('settings.download-logs.label')} description={t('settings.download-logs.description')}>\n <IconButton\n icon='ph--download-simple--regular'\n iconOnly\n label={t('settings.download-logs.label')}\n onClick={handleDownloadLogs}\n />\n </Form.Row>\n <Form.Row label={t('settings.repair.label')} description={t('settings.repair.description')}>\n <IconButton\n icon='ph--first-aid-kit--regular'\n iconOnly\n label={t('settings.repair.label')}\n onClick={handleRepair}\n />\n </Form.Row>\n\n {/* TODO(burdon): Move to layout? */}\n {toast && (\n <Toast.Root>\n <Toast.Title icon='ph--gift--duotone'>\n <span>{toast.title}</span>\n </Toast.Title>\n {toast.description && <Toast.Description>{toast.description}</Toast.Description>}\n </Toast.Root>\n )}\n\n <Form.Row\n label={t('settings.choose-storage-adaptor.label')}\n description={t('settings.choose-storage-adaptor.description')}\n >\n <Select.Root\n disabled={!onSettingsChange}\n value={\n Object.entries(StorageAdapters).find(\n ([_name, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore,\n )?.[0]\n }\n onValueChange={handleStorageAdapterChange}\n >\n <Select.TriggerButton disabled={!onSettingsChange} placeholder={t('settings.data-store.label')} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {Object.keys(StorageAdapters).map((key) => (\n <Select.Option key={key} value={key}>\n {t(`settings.storage-adaptor.${key}.label`)}\n </Select.Option>\n ))}\n </Select.Viewport>\n <Select.Arrow />\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </Form.Row>\n </Form.Section>\n\n <DebugPortSettings disabled={!onSettingsChange} />\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n );\n};\n\nconst updateConfig = (config: ConfigProto, setConfig: (newConfig: ConfigProto) => void, path: string[], value: any) => {\n const storageConfigCopy = JSON.parse(JSON.stringify(config ?? {}));\n setDeep(storageConfigCopy, path, value);\n setConfig(storageConfigCopy);\n queueMicrotask(async () => {\n await SaveConfig(storageConfigCopy);\n });\n};\n\nDebugSettings.displayName = 'DebugSettings';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAM,kBAAkB,SAA0B,IAAI,MAAM,MAAM,KAAK,GAAA,CAAI,SAAS,eAAe;AAEnG,IAAM,kBAAkB;;;;;;;AAexB,IAAa,qBAAqB,EAAE,aAAa,uBAAuB,GAAG,eAAuC;CAChH,MAAM,EAAE,MAAM,eAAe,KAAK,QAAQ,GAAG;CAG7C,MAAM,SAAS,qBAFG,aAAa,aAAyB,WAAW,UAAU,QAAQ,GAAG,CAAC,UAAU,CAE/D,GADlB,kBAAkB,WAAW,UAAU,GAAG,CAAC,UAAU,CACxB,CAAS;CAIxD,MAAM,eAAe,aAClB,YAAsB,UAAU,WAAW,MAAM,EAAE,SAAS,KAAK,CAAC,IAAI,WAAW,KAAK,GACvF,CAAC,UAAU,CACb;CAEA,MAAM,aAAa,kBAAkB;EACnC,IAAI,OAAO,SACT,UAAe,UAA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AAE,2BAA2B;OAAI,CAAA,GACjG,oBAAC,OAAO,QAAR,EAAA,UACE,qBAAC,OAAO,SAAR,EAAA,UAAA,CACE,oBAAC,OAAO,UAAR,EAAA,UACG,OAAO,KAAK,eAAe,CAAC,CAAC,KAAK,QACjC,oBAAC,OAAO,QAAR;QAAyB,OAAO;kBAC7B,EAAE,4BAA4B,IAAI,OAAO;OAC7B,GAFK,GAEL,CAChB,EACc,CAAA,GACjB,oBAAC,OAAO,OAAR,CAAe,CAAA,CACD,EAAA,CAAA,EACH,CAAA,CACJ;;KACL,CAAA;IACE;OAEd,oBAAC,mBAAD,EAAmB,UAAU,CAAC,iBAAmB,CAAA,CACrC,EAAA,CAAA;EACD,CAAA;CACN,CAAA;AAEf;AAEA,IAAM,gBAAgB,QAAqB,WAA6C,MAAgB,UAAe;CACrH,MAAM,oBAAoB,KAAK,MAAM,KAAK,UAAU,UAAU,CAAC,CAAC,CAAC;CACjE,QAAQ,mBAAmB,MAAM,KAAK;CACtC,UAAU,iBAAiB;CAC3B,eAAe,YAAY;EACzB,MAAM,WAAW,iBAAiB;CACpC,CAAC;AACH;AAEA,cAAc,cAAc"}
@@ -1,7 +1,7 @@
1
1
  import { useState } from "react";
2
+ import { Filter, Query } from "@dxos/echo";
2
3
  import { Clipboard, Grid, Input, Panel, ScrollArea, Toolbar } from "@dxos/react-ui";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import { Filter, Query } from "@dxos/echo";
5
5
  import { ObjectsTree } from "@dxos/devtools";
6
6
  import { useQuery } from "@dxos/echo-react";
7
7
  import { JsonHighlighter } from "@dxos/react-ui-syntax-highlighter";