@dxos/plugin-debug 0.9.0 → 0.9.1-staging.ee54ba693a

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 (118) hide show
  1. package/dist/lib/neutral/{DebugObjectPanel-OS65NC4M.mjs → DebugObjectPanel-QSGQJ3LM.mjs} +5 -3
  2. package/dist/lib/neutral/DebugObjectPanel-QSGQJ3LM.mjs.map +7 -0
  3. package/dist/lib/neutral/DebugPlugin.mjs +2 -2
  4. package/dist/lib/neutral/DebugPlugin.mjs.map +4 -4
  5. package/dist/lib/neutral/{DebugSettings-RKYNQIKH.mjs → DebugSettings-Q3WUL6YQ.mjs} +37 -31
  6. package/dist/lib/neutral/DebugSettings-Q3WUL6YQ.mjs.map +7 -0
  7. package/dist/lib/neutral/{DebugSpaceObjectsPanel-BHOCFWDJ.mjs → DebugSpaceObjectsPanel-AXFZWEIM.mjs} +5 -3
  8. package/dist/lib/neutral/DebugSpaceObjectsPanel-AXFZWEIM.mjs.map +7 -0
  9. package/dist/lib/neutral/{DevtoolsOverviewContainer-YX7Z3D2H.mjs → DevtoolsOverviewContainer-DWQHTK7D.mjs} +3 -2
  10. package/dist/lib/neutral/DevtoolsOverviewContainer-DWQHTK7D.mjs.map +7 -0
  11. package/dist/lib/neutral/{GithubPanel-QJKDJRVQ.mjs → GithubPanel-4CSJRVKE.mjs} +3 -3
  12. package/dist/lib/neutral/GithubPanel-4CSJRVKE.mjs.map +7 -0
  13. package/dist/lib/neutral/{app-graph-builder-4OJQQLSH.mjs → app-graph-builder-UKG4WVYK.mjs} +124 -131
  14. package/dist/lib/neutral/app-graph-builder-UKG4WVYK.mjs.map +7 -0
  15. package/dist/lib/neutral/capabilities/index.mjs +4 -4
  16. package/dist/lib/neutral/chunk-72QXLYMI.mjs +118 -0
  17. package/dist/lib/neutral/chunk-72QXLYMI.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-R5C4CKOF.mjs +54 -0
  19. package/dist/lib/neutral/chunk-R5C4CKOF.mjs.map +7 -0
  20. package/dist/lib/neutral/components/index.mjs +13 -24
  21. package/dist/lib/neutral/components/index.mjs.map +4 -4
  22. package/dist/lib/neutral/containers/index.mjs +6 -4
  23. package/dist/lib/neutral/containers/index.mjs.map +3 -3
  24. package/dist/lib/neutral/index.mjs +6 -4
  25. package/dist/lib/neutral/meta.json +1 -1
  26. package/dist/lib/neutral/meta.mjs +1 -1
  27. package/dist/lib/neutral/plugin.mjs +1 -1
  28. package/dist/lib/neutral/{react-context-MUZ3KVLU.mjs → react-context-UJURDOO6.mjs} +2 -2
  29. package/dist/lib/neutral/{react-context-MUZ3KVLU.mjs.map → react-context-UJURDOO6.mjs.map} +3 -3
  30. package/dist/lib/neutral/{react-surface-YBC4HK7I.mjs → react-surface-URESE7J4.mjs} +89 -35
  31. package/dist/lib/neutral/react-surface-URESE7J4.mjs.map +7 -0
  32. package/dist/lib/neutral/{settings-MPM6YUP4.mjs → settings-5I2674B6.mjs} +3 -3
  33. package/dist/lib/neutral/{settings-MPM6YUP4.mjs.map → settings-5I2674B6.mjs.map} +3 -3
  34. package/dist/lib/neutral/translations.mjs +1 -2
  35. package/dist/lib/neutral/translations.mjs.map +3 -3
  36. package/dist/lib/neutral/types/index.mjs +5 -3
  37. package/dist/types/dx.config.d.ts +28 -0
  38. package/dist/types/dx.config.d.ts.map +1 -0
  39. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -2
  40. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  41. package/dist/types/src/capabilities/index.d.ts +4 -8
  42. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  43. package/dist/types/src/capabilities/react-context.d.ts +1 -6
  44. package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
  45. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  46. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  47. package/dist/types/src/capabilities/settings.d.ts +1 -3
  48. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  49. package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
  50. package/dist/types/src/components/index.d.ts +0 -2
  51. package/dist/types/src/components/index.d.ts.map +1 -1
  52. package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +6 -3
  53. package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -1
  54. package/dist/types/src/{components → containers}/DebugSettings/DebugSettings.d.ts +2 -2
  55. package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +1 -0
  56. package/dist/types/src/{components → containers}/DebugSettings/DebugSettings.stories.d.ts +0 -1
  57. package/dist/types/src/{components → containers}/DebugSettings/DebugSettings.stories.d.ts.map +1 -1
  58. package/dist/types/src/{components → containers}/DebugSettings/index.d.ts.map +1 -1
  59. package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +6 -2
  60. package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -1
  61. package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -1
  62. package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +0 -1
  63. package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -1
  64. package/dist/types/src/containers/RegistryPanel/index.d.ts +1 -1
  65. package/dist/types/src/containers/RegistryPanel/index.d.ts.map +1 -1
  66. package/dist/types/src/containers/index.d.ts +1 -0
  67. package/dist/types/src/containers/index.d.ts.map +1 -1
  68. package/dist/types/src/meta.d.ts +32 -2
  69. package/dist/types/src/meta.d.ts.map +1 -1
  70. package/dist/types/src/translations.d.ts +0 -1
  71. package/dist/types/src/translations.d.ts.map +1 -1
  72. package/dist/types/src/types/Devtools.d.ts +57 -0
  73. package/dist/types/src/types/Devtools.d.ts.map +1 -0
  74. package/dist/types/src/types/debug.d.ts +20 -0
  75. package/dist/types/src/types/debug.d.ts.map +1 -0
  76. package/dist/types/src/types/index.d.ts +3 -69
  77. package/dist/types/src/types/index.d.ts.map +1 -1
  78. package/dist/types/src/types/surface.d.ts +4 -0
  79. package/dist/types/src/types/surface.d.ts.map +1 -0
  80. package/dist/types/tsconfig.tsbuildinfo +1 -1
  81. package/dx.config.ts +39 -0
  82. package/package.json +59 -58
  83. package/src/DebugPlugin.test.ts +1 -1
  84. package/src/DebugPlugin.tsx +1 -1
  85. package/src/capabilities/app-graph-builder.ts +123 -131
  86. package/src/capabilities/react-context.tsx +1 -1
  87. package/src/capabilities/react-surface.tsx +85 -33
  88. package/src/capabilities/settings.ts +2 -2
  89. package/src/components/SpaceGenerator/presets.ts +10 -13
  90. package/src/components/index.ts +0 -4
  91. package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +13 -4
  92. package/src/{components → containers}/DebugSettings/DebugSettings.stories.tsx +1 -1
  93. package/src/{components → containers}/DebugSettings/DebugSettings.tsx +100 -98
  94. package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +12 -4
  95. package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +3 -1
  96. package/src/containers/GithubPanel/GithubComponent.tsx +2 -2
  97. package/src/containers/RegistryPanel/index.ts +1 -1
  98. package/src/containers/index.ts +1 -0
  99. package/src/meta.ts +2 -31
  100. package/src/translations.ts +1 -2
  101. package/src/types/Devtools.ts +73 -0
  102. package/src/types/debug.ts +35 -0
  103. package/src/types/index.ts +3 -90
  104. package/src/types/surface.ts +10 -0
  105. package/dist/lib/neutral/DebugObjectPanel-OS65NC4M.mjs.map +0 -7
  106. package/dist/lib/neutral/DebugSettings-RKYNQIKH.mjs.map +0 -7
  107. package/dist/lib/neutral/DebugSpaceObjectsPanel-BHOCFWDJ.mjs.map +0 -7
  108. package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs.map +0 -7
  109. package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs.map +0 -7
  110. package/dist/lib/neutral/app-graph-builder-4OJQQLSH.mjs.map +0 -7
  111. package/dist/lib/neutral/chunk-HOV6MV5B.mjs +0 -43
  112. package/dist/lib/neutral/chunk-HOV6MV5B.mjs.map +0 -7
  113. package/dist/lib/neutral/chunk-TAST3Y2C.mjs +0 -91
  114. package/dist/lib/neutral/chunk-TAST3Y2C.mjs.map +0 -7
  115. package/dist/lib/neutral/react-surface-YBC4HK7I.mjs.map +0 -7
  116. package/dist/types/src/components/DebugSettings/DebugSettings.d.ts.map +0 -1
  117. /package/dist/types/src/{components → containers}/DebugSettings/index.d.ts +0 -0
  118. /package/src/{components → containers}/DebugSettings/index.ts +0 -0
@@ -8,7 +8,7 @@ import { useQuery } from "@dxos/react-client/echo";
8
8
  import { Clipboard, Input, Panel, ScrollArea, Toolbar } from "@dxos/react-ui";
9
9
  import { Syntax } from "@dxos/react-ui-syntax-highlighter";
10
10
  import { mx } from "@dxos/ui-theme";
11
- var DebugObjectPanel = ({ role, companionTo }) => {
11
+ var DebugObjectPanel = ({ role, companionTo, onOpen, canOpen }) => {
12
12
  const db = Obj.getDatabase(companionTo);
13
13
  const [selectedId, setSelectedId] = useState(null);
14
14
  const [depth, setDepth] = useState(0);
@@ -33,7 +33,9 @@ var DebugObjectPanel = ({ role, companionTo }) => {
33
33
  }, db && /* @__PURE__ */ React.createElement(ScrollArea.Root, null, /* @__PURE__ */ React.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React.createElement(ObjectsTree, {
34
34
  db,
35
35
  root: companionTo,
36
- onSelect: (entity) => setSelectedId(entity.id)
36
+ onSelect: (entity) => setSelectedId(entity.id),
37
+ onOpen,
38
+ canOpen
37
39
  }))), /* @__PURE__ */ React.createElement(Syntax.Root, {
38
40
  data: selectedObject,
39
41
  replacer: refReplacer
@@ -56,4 +58,4 @@ var DebugObjectPanel = ({ role, companionTo }) => {
56
58
  export {
57
59
  DebugObjectPanel as default
58
60
  };
59
- //# sourceMappingURL=DebugObjectPanel-OS65NC4M.mjs.map
61
+ //# sourceMappingURL=DebugObjectPanel-QSGQJ3LM.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/DebugObjectPanel/DebugObjectPanel.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { ObjectsTree } from '@dxos/devtools';\nimport { type Entity, Filter, Json, Obj, Query } from '@dxos/echo';\nimport type { EntityId } from '@dxos/keys';\nimport { useQuery } from '@dxos/react-client/echo';\nimport { Clipboard, Input, Panel, ScrollArea, Toolbar } from '@dxos/react-ui';\nimport { Syntax } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/ui-theme';\n\nexport type DebugObjectPanelProps = Pick<\n AppSurface.ObjectArticleProps<Obj.Unknown, {}, Obj.Unknown>,\n 'role' | 'companionTo'\n> & {\n onOpen?: (object: Obj.Unknown) => void;\n canOpen?: (entity: Entity.Snapshot) => boolean;\n};\n\nexport const DebugObjectPanel = ({ role, companionTo, onOpen, canOpen }: DebugObjectPanelProps) => {\n const db = Obj.getDatabase(companionTo);\n const [selectedId, setSelectedId] = useState<EntityId | null>(null);\n const [depth, setDepth] = useState(0);\n const [selectedObject] = useQuery(\n db,\n Query.select(Filter.id(selectedId ?? companionTo.id)).options({ deleted: 'include' }),\n );\n const refReplacer = useMemo(() => (db ? Json.createRefReplacer({ db, depth }) : undefined), [db, depth]);\n\n return (\n <Clipboard.Provider>\n <Panel.Root role={role}>\n <Panel.Toolbar asChild>\n <Toolbar.Root />\n </Panel.Toolbar>\n <Panel.Content asChild>\n <div className={mx('grid divide-y divide-separator', db && 'grid-rows-[1fr_2fr]')}>\n {db && (\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n <ObjectsTree\n db={db}\n root={companionTo}\n onSelect={(entity) => setSelectedId(entity.id)}\n onOpen={onOpen}\n canOpen={canOpen}\n />\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n )}\n <Syntax.Root data={selectedObject} replacer={refReplacer}>\n <Panel.Root>\n <Panel.Toolbar asChild>\n <Toolbar.Root classNames='grid grid-cols-[1fr_3rem]'>\n <Syntax.Filter />\n <Input.Root>\n <Input.TextInput\n variant='subdued'\n type='number'\n min={0}\n step={1}\n aria-label='Ref depth'\n value={depth}\n onChange={(event) => setDepth(Math.max(0, Number(event.target.value) || 0))}\n />\n </Input.Root>\n </Toolbar.Root>\n </Panel.Toolbar>\n <Panel.Content asChild>\n <Syntax.Viewport>\n <Syntax.Code />\n </Syntax.Viewport>\n </Panel.Content>\n </Panel.Root>\n </Syntax.Root>\n </div>\n </Panel.Content>\n </Panel.Root>\n </Clipboard.Provider>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,SAASC,SAASC,gBAAgB;AAGzC,SAASC,mBAAmB;AAC5B,SAAsBC,QAAQC,MAAMC,KAAKC,aAAa;AAEtD,SAASC,gBAAgB;AACzB,SAASC,WAAWC,OAAOC,OAAOC,YAAYC,eAAe;AAC7D,SAASC,cAAc;AACvB,SAASC,UAAU;AAUZ,IAAMC,mBAAmB,CAAC,EAAEC,MAAMC,aAAaC,QAAQC,QAAO,MAAyB;AAC5F,QAAMC,KAAKf,IAAIgB,YAAYJ,WAAAA;AAC3B,QAAM,CAACK,YAAYC,aAAAA,IAAiBtB,SAA0B,IAAA;AAC9D,QAAM,CAACuB,OAAOC,QAAAA,IAAYxB,SAAS,CAAA;AACnC,QAAM,CAACyB,cAAAA,IAAkBnB,SACvBa,IACAd,MAAMqB,OAAOxB,OAAOyB,GAAGN,cAAcL,YAAYW,EAAE,CAAA,EAAGC,QAAQ;IAAEC,SAAS;EAAU,CAAA,CAAA;AAErF,QAAMC,cAAc/B,QAAQ,MAAOoB,KAAKhB,KAAK4B,kBAAkB;IAAEZ;IAAII;EAAM,CAAA,IAAKS,QAAY;IAACb;IAAII;GAAM;AAEvG,SACE,sBAAA,cAAChB,UAAU0B,UAAQ,MACjB,sBAAA,cAACxB,MAAMyB,MAAI;IAACnB;KACV,sBAAA,cAACN,MAAME,SAAO;IAACwB,SAAAA;KACb,sBAAA,cAACxB,QAAQuB,MAAI,IAAA,CAAA,GAEf,sBAAA,cAACzB,MAAM2B,SAAO;IAACD,SAAAA;KACb,sBAAA,cAACE,OAAAA;IAAIC,WAAWzB,GAAG,kCAAkCM,MAAM,qBAAA;KACxDA,MACC,sBAAA,cAACT,WAAWwB,MAAI,MACd,sBAAA,cAACxB,WAAW6B,UAAQ,MAClB,sBAAA,cAACtC,aAAAA;IACCkB;IACAqB,MAAMxB;IACNyB,UAAU,CAACC,WAAWpB,cAAcoB,OAAOf,EAAE;IAC7CV;IACAC;QAKR,sBAAA,cAACN,OAAOsB,MAAI;IAACS,MAAMlB;IAAgBmB,UAAUd;KAC3C,sBAAA,cAACrB,MAAMyB,MAAI,MACT,sBAAA,cAACzB,MAAME,SAAO;IAACwB,SAAAA;KACb,sBAAA,cAACxB,QAAQuB,MAAI;IAACW,YAAW;KACvB,sBAAA,cAACjC,OAAOV,QAAM,IAAA,GACd,sBAAA,cAACM,MAAM0B,MAAI,MACT,sBAAA,cAAC1B,MAAMsC,WAAS;IACdC,SAAQ;IACRC,MAAK;IACLC,KAAK;IACLC,MAAM;IACNC,cAAW;IACXC,OAAO7B;IACP8B,UAAU,CAACC,UAAU9B,SAAS+B,KAAKC,IAAI,GAAGC,OAAOH,MAAMI,OAAON,KAAK,KAAK,CAAA,CAAA;SAKhF,sBAAA,cAAC3C,MAAM2B,SAAO;IAACD,SAAAA;KACb,sBAAA,cAACvB,OAAO2B,UAAQ,MACd,sBAAA,cAAC3B,OAAO+C,MAAI,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAUhC;",
6
+ "names": ["React", "useMemo", "useState", "ObjectsTree", "Filter", "Json", "Obj", "Query", "useQuery", "Clipboard", "Input", "Panel", "ScrollArea", "Toolbar", "Syntax", "mx", "DebugObjectPanel", "role", "companionTo", "onOpen", "canOpen", "db", "getDatabase", "selectedId", "setSelectedId", "depth", "setDepth", "selectedObject", "select", "id", "options", "deleted", "refReplacer", "createRefReplacer", "undefined", "Provider", "Root", "asChild", "Content", "div", "className", "Viewport", "root", "onSelect", "entity", "data", "replacer", "classNames", "TextInput", "variant", "type", "min", "step", "aria-label", "value", "onChange", "event", "Math", "max", "Number", "target", "Code"]
7
+ }
@@ -8,7 +8,7 @@ import { AppGraphBuilder, DebugSettings, ReactContext, ReactSurface } from "#cap
8
8
  import { meta } from "#meta";
9
9
  import { translations } from "#translations";
10
10
 
11
- // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-debug/PLUGIN.mdl?raw
11
+ // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-debug/PLUGIN.mdl
12
12
  var PLUGIN_default = '---\nid: org.dxos.plugin.debug\nname: DebugPlugin\nversion: 0.1.0\n---\n\nDeveloper toolkit plugin for `DXOS` Composer \u2014 real-time object inspection, structured devtools panels for Client/HALO/ECHO/Mesh/EDGE subsystems, space data generation, wireframe overlays, a tools explorer, and downloadable log capture.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@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```\n\n```mdl\ntype DebugContextType\n fields:\n running: boolean\n start(cb: TimerCallback, options: TimerOptions): void\n stop(): void\n```\n\n## Components\n\n```mdl\ncomponent DebugSettings\n desc: Settings panel rendered in the plugin-settings article slot; controls wireframe and traceAll toggles and exposes log download.\n props:\n settings: Settings\n logStore?: IdbLogStore\n actions:\n updateSettings(patch: Partial<Settings>)\n downloadLogs()\n```\n\n```mdl\ncomponent DebugStatus\n desc: Status-indicator surface shown in the main toolbar; reflects the generator timer running state.\n state:\n running: boolean\n```\n\n```mdl\ncomponent DevtoolsOverviewContainer\n desc: Deck-companion panel that provides quick access to all devtools sections via a categorised link list.\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 Client \u25B8 Config / Storage \u2502\n \u2502 Logs / Diag \u2502\n \u2502 HALO \u25B8 Identity / Keys \u2502\n \u2502 ECHO \u25B8 Spaces / Feeds \u2502\n \u2502 Objects / Schema \u2502\n \u2502 Mesh \u25B8 Signal / Swarm \u2502\n \u2502 EDGE \u25B8 Dashboard / \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent DebugObjectPanel\n desc: Companion panel for any ECHO object that shows raw field values, type info, and DXN.\n props:\n companionTo: string # DXN of the object being inspected\n```\n\n```mdl\ncomponent DebugSpaceObjectsPanel\n desc: Deck-companion panel listing all objects in the active space with their type, ID, and field count.\n props:\n space: Space\n```\n\n```mdl\ncomponent DebugGraph\n desc: Visual representation of the Composer app-graph as a collapsible JSON tree.\n props:\n graph: Graph.Graph\n root: string # node ID used as the traversal root\n```\n\n```mdl\ncomponent SpaceGenerator\n desc: Article view for generating synthetic ECHO objects into a space; controls count, type mix, and relation density.\n props:\n space: Space\n actions:\n generateObjects(count: number, types: string[])\n clear()\n emits:\n onCreateObjects(objects: Obj.Unknown[])\n```\n\n```mdl\ncomponent Wireframe\n desc: Transparent overlay that wraps any article or section surface and renders a labelled border for layout debugging.\n props:\n label: string # "role:name" descriptor shown in the corner badge\n object: Obj.Unknown\n classNames?: string\n```\n\n```mdl\ncomponent SchemaTable\n desc: Tabular display of all registered ECHO schemas with typename, fields, and version.\n```\n\n```mdl\ncomponent GithubPanel\n desc: Developer panel linking to open GitHub issues and CI run status for the current build.\n```\n```\n\n## Components (Devtools Panels)\n\nThe following components are thin wrappers around `@dxos/devtools` panel components, each bound to a specific `Devtools.*` node:\n\n| Component | Devtools node | Displays |\n|------------------------|----------------------------|-----------------------------------------|\n| ConfigPanel | Client.Config | Vault config JSON viewer |\n| StoragePanel | Client.Storage | Local storage browser |\n| LoggingPanel | Client.Logs | Live log stream; download via logStore |\n| DiagnosticsPanel | Client.Diagnostics | Client health / metric charts |\n| IdentityPanel | Halo.Identity | Local identity key + device list |\n| DeviceListPanel | Halo.Devices | All devices paired with this identity |\n| KeyringPanel | Halo.Keyring | Raw keyring entries |\n| CredentialsPanel | Halo.Credentials | Credentials held in the active space |\n| SpaceListPanel | Echo.Spaces | All spaces with state + select action |\n| SpaceInfoPanel | Echo.Space | Selected space feeds / pipelines |\n| FeedsPanel | Echo.Feeds | Feed entries for the active space |\n| ObjectsPanel | Echo.Objects | All objects in the active space |\n| SchemaPanel | Echo.Schema | Schemas registered in the active space |\n| AutomergePanel | Echo.Automerge | Automerge document internals |\n| QueuesPanel | Echo.Queues | Pending queue items |\n| MembersPanel | Echo.Members | Space members with last-seen |\n| MetadataPanel | Echo.Metadata | Space/feed metadata blobs |\n| SignalPanel | Mesh.Signal | Signal-server connection state |\n| SwarmPanel | Mesh.Swarm | Active swarm peers |\n| NetworkPanel | Mesh.Network | Full network topology for active space |\n| EdgeDashboardPanel | Edge.Dashboard | EDGE node health / worker stats |\n| WorkflowPanel | Edge.Workflows | Workflow definitions in active space |\n| InvocationTraceContainer | Edge.Traces | Invocation trace timeline from feed |\n| TestingPanel | Edge.Testing | Integration test harness for EDGE |\n| ToolsExplorer | ToolsExplorer | MCP-backed tools explorer |\n\n## Operations\n\nNo first-party operations are defined by DebugPlugin. The plugin invokes `SpaceOperation.AddObject`, `SpaceOperation.Migrate`, `LayoutOperation.Open`, and `ScriptOperation.CreateScript` from other plugins via `useOperationInvoker` inside its surfaces.\n\n## Features\n\n```mdl\nfeat F-1: Devtools Graph Node\n\n req F-1.1:\n when: DebugPlugin is loaded\n then: a "Devtools" node appears pinned at the end of each root and space in the nav graph\n\n req F-1.2: The Devtools node contains sub-trees for Client, HALO, ECHO, Mesh, and EDGE categories.\n req F-1.3: An app-graph sub-node renders DebugGraph rooted at the current space or root.\n req F-1.4: A tools-explorer sub-node renders ToolsExplorer connected to the MCP introspect service.\n```\n\n```mdl\nfeat F-2: Object Debug Companion\n\n req F-2.1:\n when: any ECHO object is open in the deck\n then: a "Debug" companion tab is injected at the last position\n\n req F-2.2: DebugObjectPanel shows raw object fields, DXN, and typename for the companion target.\n```\n\n```mdl\nfeat F-3: Space Object Explorer\n\n req F-3.1:\n when: user opens the "Space Objects" deck companion\n then: DebugSpaceObjectsPanel lists all ECHO objects in the active space\n\n req F-3.2: List updates reactively as objects are added or removed.\n```\n\n```mdl\nfeat F-4: Devtools Overview Companion\n\n req F-4.1:\n when: user opens the "Devtools" deck companion\n then: DevtoolsOverviewContainer renders a categorised link list to all devtools panels\n\n req F-4.2: Clicking a category link navigates the deck to the corresponding devtools article.\n```\n\n```mdl\nfeat F-5: Space Data Generator\n\n req F-5.1:\n when: user navigates to the debug node under a space\n then: SpaceGenerator is rendered as the article\n\n req F-5.2:\n when: user triggers object generation\n then: synthetic ECHO objects are created via op:SpaceOperation.AddObject in the active collection\n\n req F-5.3: DebugStatus indicator in the toolbar shows a running state while generation is active.\n```\n\n```mdl\nfeat F-6: Wireframe Overlay\n\n req F-6.1:\n when: settings.wireframe is true\n then: Wireframe wraps every article and section surface with a labelled border\n\n req F-6.2:\n when: settings.wireframe is false or unset\n then: no overlay is injected; the Wireframe surface filter returns false immediately\n```\n\n```mdl\nfeat F-7: Log Capture and Download\n\n req F-7.1:\n when: logStore is provided in DebugPluginOptions\n then: LoggingPanel can stream and display captured log entries\n\n req F-7.2:\n when: user clicks download in DebugSettings\n then: captured logs are serialised and offered as a file download via the file uploader capability\n```\n\n```mdl\nfeat F-8: Global Dev Utilities\n\n req F-8.1:\n when: DebugPlugin activates\n then: globalThis.composer.changeStorageVersionInMetadata is registered for manual storage-migration testing\n\n req F-8.2: The function destroys the client, rewrites the storage version metadata, and reloads the page.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Devtools node appears in nav graph\n given: Composer loaded with DebugPlugin enabled\n when: user opens the navigation tree\n then:\n - "Devtools" node is visible pinned at the end of the root\n - sub-nodes Client, HALO, ECHO, Mesh, EDGE are present\n```\n\n```mdl\ntest T-2: Debug companion on ECHO object\n given: a Document is open in the deck\n when: user clicks the "Debug" companion tab\n then:\n - DebugObjectPanel renders with the object\'s DXN and field map\n```\n\n```mdl\ntest T-3: Wireframe overlay toggle\n given: DebugPlugin settings panel is open\n when: user enables the wireframe toggle\n then:\n - every article and section surface shows a labelled border\n when: user disables the wireframe toggle\n then:\n - borders are removed immediately\n```\n\n```mdl\ntest T-4: Space object generation\n given: a space with an empty collection is active\n when: user opens the debug space node and generates 10 objects\n then:\n - 10 new objects appear in the active collection\n - DebugStatus shows "running" while generation is in progress\n```\n\n```mdl\ntest T-5: Log download\n given: logStore is configured and some log entries have been captured\n when: user clicks "Download Logs" in DebugSettings\n then:\n - a file download is triggered containing the serialised log entries\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n';
13
13
 
14
14
  // src/DebugPlugin.tsx
@@ -32,7 +32,7 @@ var DebugPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
32
32
  activate: () => Effect.sync(() => setupDevtools())
33
33
  }), AppPlugin.addPluginAssetModule({
34
34
  asset: {
35
- pluginId: meta.id,
35
+ pluginId: meta.profile.key,
36
36
  path: "PLUGIN.mdl",
37
37
  content: PLUGIN_default,
38
38
  mimeType: "application/x-mdl"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/DebugPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-debug/PLUGIN.mdl?raw"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { type Client } from '@dxos/react-client';\n\nimport { AppGraphBuilder, DebugSettings, ReactContext, ReactSurface } 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\n// TODO(wittjosiah): Factor out DevtoolsPlugin?\n\nexport const DebugPlugin = Plugin.define<DebugPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addReactContextModule({ activate: ReactContext }),\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 AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'setup-devtools',\n activatesOn: ActivationEvents.Startup,\n activate: () => Effect.sync(() => setupDevtools()),\n }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nconst setupDevtools = () => {\n (globalThis as any).composer ??= {};\n\n // Used to test how composer handles breaking protocol changes.\n (globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {\n const { changeStorageVersionInMetadata } = await import('@dxos/echo-host/testing');\n const { createStorageObjects } = await import('@dxos/client-services');\n const client: Client = (window as any).dxos.client;\n const config = client.config;\n await client.destroy();\n const { storage } = createStorageObjects(config.values?.runtime?.client?.storage ?? {});\n await changeStorageVersionInMetadata(storage, version);\n location.pathname = '/';\n };\n};\n\nexport default DebugPlugin;\n", "---\nid: org.dxos.plugin.debug\nname: DebugPlugin\nversion: 0.1.0\n---\n\nDeveloper toolkit plugin for `DXOS` Composer \u2014 real-time object inspection, structured devtools panels for Client/HALO/ECHO/Mesh/EDGE subsystems, space data generation, wireframe overlays, a tools explorer, and downloadable log capture.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@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```\n\n```mdl\ntype DebugContextType\n fields:\n running: boolean\n start(cb: TimerCallback, options: TimerOptions): void\n stop(): void\n```\n\n## Components\n\n```mdl\ncomponent DebugSettings\n desc: Settings panel rendered in the plugin-settings article slot; controls wireframe and traceAll toggles and exposes log download.\n props:\n settings: Settings\n logStore?: IdbLogStore\n actions:\n updateSettings(patch: Partial<Settings>)\n downloadLogs()\n```\n\n```mdl\ncomponent DebugStatus\n desc: Status-indicator surface shown in the main toolbar; reflects the generator timer running state.\n state:\n running: boolean\n```\n\n```mdl\ncomponent DevtoolsOverviewContainer\n desc: Deck-companion panel that provides quick access to all devtools sections via a categorised link list.\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 Client \u25B8 Config / Storage \u2502\n \u2502 Logs / Diag \u2502\n \u2502 HALO \u25B8 Identity / Keys \u2502\n \u2502 ECHO \u25B8 Spaces / Feeds \u2502\n \u2502 Objects / Schema \u2502\n \u2502 Mesh \u25B8 Signal / Swarm \u2502\n \u2502 EDGE \u25B8 Dashboard / \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent DebugObjectPanel\n desc: Companion panel for any ECHO object that shows raw field values, type info, and DXN.\n props:\n companionTo: string # DXN of the object being inspected\n```\n\n```mdl\ncomponent DebugSpaceObjectsPanel\n desc: Deck-companion panel listing all objects in the active space with their type, ID, and field count.\n props:\n space: Space\n```\n\n```mdl\ncomponent DebugGraph\n desc: Visual representation of the Composer app-graph as a collapsible JSON tree.\n props:\n graph: Graph.Graph\n root: string # node ID used as the traversal root\n```\n\n```mdl\ncomponent SpaceGenerator\n desc: Article view for generating synthetic ECHO objects into a space; controls count, type mix, and relation density.\n props:\n space: Space\n actions:\n generateObjects(count: number, types: string[])\n clear()\n emits:\n onCreateObjects(objects: Obj.Unknown[])\n```\n\n```mdl\ncomponent Wireframe\n desc: Transparent overlay that wraps any article or section surface and renders a labelled border for layout debugging.\n props:\n label: string # \"role:name\" descriptor shown in the corner badge\n object: Obj.Unknown\n classNames?: string\n```\n\n```mdl\ncomponent SchemaTable\n desc: Tabular display of all registered ECHO schemas with typename, fields, and version.\n```\n\n```mdl\ncomponent GithubPanel\n desc: Developer panel linking to open GitHub issues and CI run status for the current build.\n```\n```\n\n## Components (Devtools Panels)\n\nThe following components are thin wrappers around `@dxos/devtools` panel components, each bound to a specific `Devtools.*` node:\n\n| Component | Devtools node | Displays |\n|------------------------|----------------------------|-----------------------------------------|\n| ConfigPanel | Client.Config | Vault config JSON viewer |\n| StoragePanel | Client.Storage | Local storage browser |\n| LoggingPanel | Client.Logs | Live log stream; download via logStore |\n| DiagnosticsPanel | Client.Diagnostics | Client health / metric charts |\n| IdentityPanel | Halo.Identity | Local identity key + device list |\n| DeviceListPanel | Halo.Devices | All devices paired with this identity |\n| KeyringPanel | Halo.Keyring | Raw keyring entries |\n| CredentialsPanel | Halo.Credentials | Credentials held in the active space |\n| SpaceListPanel | Echo.Spaces | All spaces with state + select action |\n| SpaceInfoPanel | Echo.Space | Selected space feeds / pipelines |\n| FeedsPanel | Echo.Feeds | Feed entries for the active space |\n| ObjectsPanel | Echo.Objects | All objects in the active space |\n| SchemaPanel | Echo.Schema | Schemas registered in the active space |\n| AutomergePanel | Echo.Automerge | Automerge document internals |\n| QueuesPanel | Echo.Queues | Pending queue items |\n| MembersPanel | Echo.Members | Space members with last-seen |\n| MetadataPanel | Echo.Metadata | Space/feed metadata blobs |\n| SignalPanel | Mesh.Signal | Signal-server connection state |\n| SwarmPanel | Mesh.Swarm | Active swarm peers |\n| NetworkPanel | Mesh.Network | Full network topology for active space |\n| EdgeDashboardPanel | Edge.Dashboard | EDGE node health / worker stats |\n| WorkflowPanel | Edge.Workflows | Workflow definitions in active space |\n| InvocationTraceContainer | Edge.Traces | Invocation trace timeline from feed |\n| TestingPanel | Edge.Testing | Integration test harness for EDGE |\n| ToolsExplorer | ToolsExplorer | MCP-backed tools explorer |\n\n## Operations\n\nNo first-party operations are defined by DebugPlugin. The plugin invokes `SpaceOperation.AddObject`, `SpaceOperation.Migrate`, `LayoutOperation.Open`, and `ScriptOperation.CreateScript` from other plugins via `useOperationInvoker` inside its surfaces.\n\n## Features\n\n```mdl\nfeat F-1: Devtools Graph Node\n\n req F-1.1:\n when: DebugPlugin is loaded\n then: a \"Devtools\" node appears pinned at the end of each root and space in the nav graph\n\n req F-1.2: The Devtools node contains sub-trees for Client, HALO, ECHO, Mesh, and EDGE categories.\n req F-1.3: An app-graph sub-node renders DebugGraph rooted at the current space or root.\n req F-1.4: A tools-explorer sub-node renders ToolsExplorer connected to the MCP introspect service.\n```\n\n```mdl\nfeat F-2: Object Debug Companion\n\n req F-2.1:\n when: any ECHO object is open in the deck\n then: a \"Debug\" companion tab is injected at the last position\n\n req F-2.2: DebugObjectPanel shows raw object fields, DXN, and typename for the companion target.\n```\n\n```mdl\nfeat F-3: Space Object Explorer\n\n req F-3.1:\n when: user opens the \"Space Objects\" deck companion\n then: DebugSpaceObjectsPanel lists all ECHO objects in the active space\n\n req F-3.2: List updates reactively as objects are added or removed.\n```\n\n```mdl\nfeat F-4: Devtools Overview Companion\n\n req F-4.1:\n when: user opens the \"Devtools\" deck companion\n then: DevtoolsOverviewContainer renders a categorised link list to all devtools panels\n\n req F-4.2: Clicking a category link navigates the deck to the corresponding devtools article.\n```\n\n```mdl\nfeat F-5: Space Data Generator\n\n req F-5.1:\n when: user navigates to the debug node under a space\n then: SpaceGenerator is rendered as the article\n\n req F-5.2:\n when: user triggers object generation\n then: synthetic ECHO objects are created via op:SpaceOperation.AddObject in the active collection\n\n req F-5.3: DebugStatus indicator in the toolbar shows a running state while generation is active.\n```\n\n```mdl\nfeat F-6: Wireframe Overlay\n\n req F-6.1:\n when: settings.wireframe is true\n then: Wireframe wraps every article and section surface with a labelled border\n\n req F-6.2:\n when: settings.wireframe is false or unset\n then: no overlay is injected; the Wireframe surface filter returns false immediately\n```\n\n```mdl\nfeat F-7: Log Capture and Download\n\n req F-7.1:\n when: logStore is provided in DebugPluginOptions\n then: LoggingPanel can stream and display captured log entries\n\n req F-7.2:\n when: user clicks download in DebugSettings\n then: captured logs are serialised and offered as a file download via the file uploader capability\n```\n\n```mdl\nfeat F-8: Global Dev Utilities\n\n req F-8.1:\n when: DebugPlugin activates\n then: globalThis.composer.changeStorageVersionInMetadata is registered for manual storage-migration testing\n\n req F-8.2: The function destroys the client, rewrites the storage version metadata, and reloads the page.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Devtools node appears in nav graph\n given: Composer loaded with DebugPlugin enabled\n when: user opens the navigation tree\n then:\n - \"Devtools\" node is visible pinned at the end of the root\n - sub-nodes Client, HALO, ECHO, Mesh, EDGE are present\n```\n\n```mdl\ntest T-2: Debug companion on ECHO object\n given: a Document is open in the deck\n when: user clicks the \"Debug\" companion tab\n then:\n - DebugObjectPanel renders with the object's DXN and field map\n```\n\n```mdl\ntest T-3: Wireframe overlay toggle\n given: DebugPlugin settings panel is open\n when: user enables the wireframe toggle\n then:\n - every article and section surface shows a labelled border\n when: user disables the wireframe toggle\n then:\n - borders are removed immediately\n```\n\n```mdl\ntest T-4: Space object generation\n given: a space with an empty collection is active\n when: user opens the debug space node and generates 10 objects\n then:\n - 10 new objects appear in the active collection\n - DebugStatus shows \"running\" while generation is in progress\n```\n\n```mdl\ntest T-5: Log download\n given: logStore is configured and some log entries have been captured\n when: user clicks \"Download Logs\" in DebugSettings\n then:\n - a file download is triggered containing the serialised log entries\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkBC,YAAYC,cAAc;AACrD,SAASC,iBAAiB;AAG1B,SAASC,iBAAiBC,eAAeC,cAAcC,oBAAoB;AAC3E,SAASC,YAAY;AACrB,SAASC,oBAAoB;;;ACZ7B;;;ADoBO,IAAMC,cAAcC,OAAOC,OAA2BC,IAAAA,EAAMC,KACjEC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,sBAAsB;EAAEF,UAAUG;AAAa,CAAA,GACzDL,UAAUM,kBAAkB;EAAEJ,UAAUK;AAAc,CAAA,GACtDX,OAAOY,UAAU,CAAC,EAAEC,SAAQ,OAAQ;EAClCC,IAAIC,WAAWC,aAAaC,YAAAA,KAAiB;EAC7CC,aAAaC,iBAAiBC;EAC9Bd,UAAU,MAAMW,aAAa;IAAEJ;EAAS,CAAA;AAC1C,EAAA,GACAT,UAAUiB,sBAAsB;EAAEC;AAAa,CAAA,GAC/CtB,OAAOY,UAAU;EACfE,IAAI;EACJI,aAAaC,iBAAiBI;EAC9BjB,UAAU,MAAakB,YAAK,MAAMC,cAAAA,CAAAA;AACpC,CAAA,GACArB,UAAUsB,qBAAqB;EAC7BC,OAAO;IAAEC,UAAU1B,KAAKY;IAAIe,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AACrG,CAAA,GACAhC,OAAOiC,IAAI;AAGb,IAAMR,gBAAgB,MAAA;AACnBS,aAAmBC,aAAa,CAAC;AAGjCD,aAAmBC,SAASC,iCAAiC,OAAOC,YAAAA;AACnE,UAAM,EAAED,+BAA8B,IAAK,MAAM,OAAO,yBAAA;AACxD,UAAM,EAAEE,qBAAoB,IAAK,MAAM,OAAO,uBAAA;AAC9C,UAAMC,SAAkBC,OAAeC,KAAKF;AAC5C,UAAMG,SAASH,OAAOG;AACtB,UAAMH,OAAOI,QAAO;AACpB,UAAM,EAAEC,QAAO,IAAKN,qBAAqBI,OAAOG,QAAQC,SAASP,QAAQK,WAAW,CAAC,CAAA;AACrF,UAAMR,+BAA+BQ,SAASP,OAAAA;AAC9CU,aAASC,WAAW;EACtB;AACF;AAEA,IAAA,sBAAejD;",
6
- "names": ["Effect", "ActivationEvents", "Capability", "Plugin", "AppPlugin", "AppGraphBuilder", "DebugSettings", "ReactContext", "ReactSurface", "meta", "translations", "DebugPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addReactContextModule", "ReactContext", "addSettingsModule", "DebugSettings", "addModule", "logStore", "id", "Capability", "getModuleTag", "ReactSurface", "activatesOn", "ActivationEvents", "SetupReactSurface", "addTranslationsModule", "translations", "Startup", "sync", "setupDevtools", "addPluginAssetModule", "asset", "pluginId", "path", "content", "pluginSpec", "mimeType", "make", "globalThis", "composer", "changeStorageVersionInMetadata", "version", "createStorageObjects", "client", "window", "dxos", "config", "destroy", "storage", "values", "runtime", "location", "pathname"]
3
+ "sources": ["../../../src/DebugPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-debug/PLUGIN.mdl"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { type Client } from '@dxos/react-client';\n\nimport { AppGraphBuilder, DebugSettings, ReactContext, ReactSurface } 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\n// TODO(wittjosiah): Factor out DevtoolsPlugin?\n\nexport const DebugPlugin = Plugin.define<DebugPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addReactContextModule({ activate: ReactContext }),\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 AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'setup-devtools',\n activatesOn: ActivationEvents.Startup,\n activate: () => Effect.sync(() => setupDevtools()),\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\nconst setupDevtools = () => {\n (globalThis as any).composer ??= {};\n\n // Used to test how composer handles breaking protocol changes.\n (globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {\n const { changeStorageVersionInMetadata } = await import('@dxos/echo-host/testing');\n const { createStorageObjects } = await import('@dxos/client-services');\n const client: Client = (window as any).dxos.client;\n const config = client.config;\n await client.destroy();\n const { storage } = createStorageObjects(config.values?.runtime?.client?.storage ?? {});\n await changeStorageVersionInMetadata(storage, version);\n location.pathname = '/';\n };\n};\n\nexport default DebugPlugin;\n", "---\nid: org.dxos.plugin.debug\nname: DebugPlugin\nversion: 0.1.0\n---\n\nDeveloper toolkit plugin for `DXOS` Composer \u2014 real-time object inspection, structured devtools panels for Client/HALO/ECHO/Mesh/EDGE subsystems, space data generation, wireframe overlays, a tools explorer, and downloadable log capture.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@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```\n\n```mdl\ntype DebugContextType\n fields:\n running: boolean\n start(cb: TimerCallback, options: TimerOptions): void\n stop(): void\n```\n\n## Components\n\n```mdl\ncomponent DebugSettings\n desc: Settings panel rendered in the plugin-settings article slot; controls wireframe and traceAll toggles and exposes log download.\n props:\n settings: Settings\n logStore?: IdbLogStore\n actions:\n updateSettings(patch: Partial<Settings>)\n downloadLogs()\n```\n\n```mdl\ncomponent DebugStatus\n desc: Status-indicator surface shown in the main toolbar; reflects the generator timer running state.\n state:\n running: boolean\n```\n\n```mdl\ncomponent DevtoolsOverviewContainer\n desc: Deck-companion panel that provides quick access to all devtools sections via a categorised link list.\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 Client \u25B8 Config / Storage \u2502\n \u2502 Logs / Diag \u2502\n \u2502 HALO \u25B8 Identity / Keys \u2502\n \u2502 ECHO \u25B8 Spaces / Feeds \u2502\n \u2502 Objects / Schema \u2502\n \u2502 Mesh \u25B8 Signal / Swarm \u2502\n \u2502 EDGE \u25B8 Dashboard / \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent DebugObjectPanel\n desc: Companion panel for any ECHO object that shows raw field values, type info, and DXN.\n props:\n companionTo: string # DXN of the object being inspected\n```\n\n```mdl\ncomponent DebugSpaceObjectsPanel\n desc: Deck-companion panel listing all objects in the active space with their type, ID, and field count.\n props:\n space: Space\n```\n\n```mdl\ncomponent DebugGraph\n desc: Visual representation of the Composer app-graph as a collapsible JSON tree.\n props:\n graph: Graph.Graph\n root: string # node ID used as the traversal root\n```\n\n```mdl\ncomponent SpaceGenerator\n desc: Article view for generating synthetic ECHO objects into a space; controls count, type mix, and relation density.\n props:\n space: Space\n actions:\n generateObjects(count: number, types: string[])\n clear()\n emits:\n onCreateObjects(objects: Obj.Unknown[])\n```\n\n```mdl\ncomponent Wireframe\n desc: Transparent overlay that wraps any article or section surface and renders a labelled border for layout debugging.\n props:\n label: string # \"role:name\" descriptor shown in the corner badge\n object: Obj.Unknown\n classNames?: string\n```\n\n```mdl\ncomponent SchemaTable\n desc: Tabular display of all registered ECHO schemas with typename, fields, and version.\n```\n\n```mdl\ncomponent GithubPanel\n desc: Developer panel linking to open GitHub issues and CI run status for the current build.\n```\n```\n\n## Components (Devtools Panels)\n\nThe following components are thin wrappers around `@dxos/devtools` panel components, each bound to a specific `Devtools.*` node:\n\n| Component | Devtools node | Displays |\n|------------------------|----------------------------|-----------------------------------------|\n| ConfigPanel | Client.Config | Vault config JSON viewer |\n| StoragePanel | Client.Storage | Local storage browser |\n| LoggingPanel | Client.Logs | Live log stream; download via logStore |\n| DiagnosticsPanel | Client.Diagnostics | Client health / metric charts |\n| IdentityPanel | Halo.Identity | Local identity key + device list |\n| DeviceListPanel | Halo.Devices | All devices paired with this identity |\n| KeyringPanel | Halo.Keyring | Raw keyring entries |\n| CredentialsPanel | Halo.Credentials | Credentials held in the active space |\n| SpaceListPanel | Echo.Spaces | All spaces with state + select action |\n| SpaceInfoPanel | Echo.Space | Selected space feeds / pipelines |\n| FeedsPanel | Echo.Feeds | Feed entries for the active space |\n| ObjectsPanel | Echo.Objects | All objects in the active space |\n| SchemaPanel | Echo.Schema | Schemas registered in the active space |\n| AutomergePanel | Echo.Automerge | Automerge document internals |\n| QueuesPanel | Echo.Queues | Pending queue items |\n| MembersPanel | Echo.Members | Space members with last-seen |\n| MetadataPanel | Echo.Metadata | Space/feed metadata blobs |\n| SignalPanel | Mesh.Signal | Signal-server connection state |\n| SwarmPanel | Mesh.Swarm | Active swarm peers |\n| NetworkPanel | Mesh.Network | Full network topology for active space |\n| EdgeDashboardPanel | Edge.Dashboard | EDGE node health / worker stats |\n| WorkflowPanel | Edge.Workflows | Workflow definitions in active space |\n| InvocationTraceContainer | Edge.Traces | Invocation trace timeline from feed |\n| TestingPanel | Edge.Testing | Integration test harness for EDGE |\n| ToolsExplorer | ToolsExplorer | MCP-backed tools explorer |\n\n## Operations\n\nNo first-party operations are defined by DebugPlugin. The plugin invokes `SpaceOperation.AddObject`, `SpaceOperation.Migrate`, `LayoutOperation.Open`, and `ScriptOperation.CreateScript` from other plugins via `useOperationInvoker` inside its surfaces.\n\n## Features\n\n```mdl\nfeat F-1: Devtools Graph Node\n\n req F-1.1:\n when: DebugPlugin is loaded\n then: a \"Devtools\" node appears pinned at the end of each root and space in the nav graph\n\n req F-1.2: The Devtools node contains sub-trees for Client, HALO, ECHO, Mesh, and EDGE categories.\n req F-1.3: An app-graph sub-node renders DebugGraph rooted at the current space or root.\n req F-1.4: A tools-explorer sub-node renders ToolsExplorer connected to the MCP introspect service.\n```\n\n```mdl\nfeat F-2: Object Debug Companion\n\n req F-2.1:\n when: any ECHO object is open in the deck\n then: a \"Debug\" companion tab is injected at the last position\n\n req F-2.2: DebugObjectPanel shows raw object fields, DXN, and typename for the companion target.\n```\n\n```mdl\nfeat F-3: Space Object Explorer\n\n req F-3.1:\n when: user opens the \"Space Objects\" deck companion\n then: DebugSpaceObjectsPanel lists all ECHO objects in the active space\n\n req F-3.2: List updates reactively as objects are added or removed.\n```\n\n```mdl\nfeat F-4: Devtools Overview Companion\n\n req F-4.1:\n when: user opens the \"Devtools\" deck companion\n then: DevtoolsOverviewContainer renders a categorised link list to all devtools panels\n\n req F-4.2: Clicking a category link navigates the deck to the corresponding devtools article.\n```\n\n```mdl\nfeat F-5: Space Data Generator\n\n req F-5.1:\n when: user navigates to the debug node under a space\n then: SpaceGenerator is rendered as the article\n\n req F-5.2:\n when: user triggers object generation\n then: synthetic ECHO objects are created via op:SpaceOperation.AddObject in the active collection\n\n req F-5.3: DebugStatus indicator in the toolbar shows a running state while generation is active.\n```\n\n```mdl\nfeat F-6: Wireframe Overlay\n\n req F-6.1:\n when: settings.wireframe is true\n then: Wireframe wraps every article and section surface with a labelled border\n\n req F-6.2:\n when: settings.wireframe is false or unset\n then: no overlay is injected; the Wireframe surface filter returns false immediately\n```\n\n```mdl\nfeat F-7: Log Capture and Download\n\n req F-7.1:\n when: logStore is provided in DebugPluginOptions\n then: LoggingPanel can stream and display captured log entries\n\n req F-7.2:\n when: user clicks download in DebugSettings\n then: captured logs are serialised and offered as a file download via the file uploader capability\n```\n\n```mdl\nfeat F-8: Global Dev Utilities\n\n req F-8.1:\n when: DebugPlugin activates\n then: globalThis.composer.changeStorageVersionInMetadata is registered for manual storage-migration testing\n\n req F-8.2: The function destroys the client, rewrites the storage version metadata, and reloads the page.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Devtools node appears in nav graph\n given: Composer loaded with DebugPlugin enabled\n when: user opens the navigation tree\n then:\n - \"Devtools\" node is visible pinned at the end of the root\n - sub-nodes Client, HALO, ECHO, Mesh, EDGE are present\n```\n\n```mdl\ntest T-2: Debug companion on ECHO object\n given: a Document is open in the deck\n when: user clicks the \"Debug\" companion tab\n then:\n - DebugObjectPanel renders with the object's DXN and field map\n```\n\n```mdl\ntest T-3: Wireframe overlay toggle\n given: DebugPlugin settings panel is open\n when: user enables the wireframe toggle\n then:\n - every article and section surface shows a labelled border\n when: user disables the wireframe toggle\n then:\n - borders are removed immediately\n```\n\n```mdl\ntest T-4: Space object generation\n given: a space with an empty collection is active\n when: user opens the debug space node and generates 10 objects\n then:\n - 10 new objects appear in the active collection\n - DebugStatus shows \"running\" while generation is in progress\n```\n\n```mdl\ntest T-5: Log download\n given: logStore is configured and some log entries have been captured\n when: user clicks \"Download Logs\" in DebugSettings\n then:\n - a file download is triggered containing the serialised log entries\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkBC,YAAYC,cAAc;AACrD,SAASC,iBAAiB;AAG1B,SAASC,iBAAiBC,eAAeC,cAAcC,oBAAoB;AAC3E,SAASC,YAAY;AACrB,SAASC,oBAAoB;;;ACZ7B;;;ADoBO,IAAMC,cAAcC,OAAOC,OAA2BC,IAAAA,EAAMC,KACjEC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,sBAAsB;EAAEF,UAAUG;AAAa,CAAA,GACzDL,UAAUM,kBAAkB;EAAEJ,UAAUK;AAAc,CAAA,GACtDX,OAAOY,UAAU,CAAC,EAAEC,SAAQ,OAAQ;EAClCC,IAAIC,WAAWC,aAAaC,YAAAA,KAAiB;EAC7CC,aAAaC,iBAAiBC;EAC9Bd,UAAU,MAAMW,aAAa;IAAEJ;EAAS,CAAA;AAC1C,EAAA,GACAT,UAAUiB,sBAAsB;EAAEC;AAAa,CAAA,GAC/CtB,OAAOY,UAAU;EACfE,IAAI;EACJI,aAAaC,iBAAiBI;EAC9BjB,UAAU,MAAakB,YAAK,MAAMC,cAAAA,CAAAA;AACpC,CAAA,GACArB,UAAUsB,qBAAqB;EAC7BC,OAAO;IAAEC,UAAU1B,KAAK2B,QAAQC;IAAKC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AAC9G,CAAA,GACAlC,OAAOmC,IAAI;AAGb,IAAMV,gBAAgB,MAAA;AACnBW,aAAmBC,aAAa,CAAC;AAGjCD,aAAmBC,SAASC,iCAAiC,OAAOC,YAAAA;AACnE,UAAM,EAAED,+BAA8B,IAAK,MAAM,OAAO,yBAAA;AACxD,UAAM,EAAEE,qBAAoB,IAAK,MAAM,OAAO,uBAAA;AAC9C,UAAMC,SAAkBC,OAAeC,KAAKF;AAC5C,UAAMG,SAASH,OAAOG;AACtB,UAAMH,OAAOI,QAAO;AACpB,UAAM,EAAEC,QAAO,IAAKN,qBAAqBI,OAAOG,QAAQC,SAASP,QAAQK,WAAW,CAAC,CAAA;AACrF,UAAMR,+BAA+BQ,SAASP,OAAAA;AAC9CU,aAASC,WAAW;EACtB;AACF;AAEA,IAAA,sBAAenD;",
6
+ "names": ["Effect", "ActivationEvents", "Capability", "Plugin", "AppPlugin", "AppGraphBuilder", "DebugSettings", "ReactContext", "ReactSurface", "meta", "translations", "DebugPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addReactContextModule", "ReactContext", "addSettingsModule", "DebugSettings", "addModule", "logStore", "id", "Capability", "getModuleTag", "ReactSurface", "activatesOn", "ActivationEvents", "SetupReactSurface", "addTranslationsModule", "translations", "Startup", "sync", "setupDevtools", "addPluginAssetModule", "asset", "pluginId", "profile", "key", "path", "content", "pluginSpec", "mimeType", "make", "globalThis", "composer", "changeStorageVersionInMetadata", "version", "createStorageObjects", "client", "window", "dxos", "config", "destroy", "storage", "values", "runtime", "location", "pathname"]
7
7
  }
@@ -1,23 +1,24 @@
1
1
  import "./chunk-J5LGTIGS.mjs";
2
2
 
3
- // src/components/DebugSettings/DebugSettings.tsx
3
+ // src/containers/DebugSettings/DebugSettings.tsx
4
4
  import React, { useCallback, useEffect, useMemo, useState } from "react";
5
- import { getPersonalSpace } from "@dxos/app-toolkit";
5
+ import { AppSpace } from "@dxos/app-toolkit";
6
6
  import { SaveConfig, Storage, defs } from "@dxos/config";
7
7
  import { log } from "@dxos/log";
8
8
  import { useClient } from "@dxos/react-client";
9
9
  import { IconButton, Input, Select, Toast, useFileDownload, useTranslation } from "@dxos/react-ui";
10
- import { Settings as SettingsForm } from "@dxos/react-ui-form";
10
+ import { Form } from "@dxos/react-ui-form";
11
11
  import { TRACE_ALL_KEY } from "@dxos/tracing";
12
12
  import { setDeep } from "@dxos/util";
13
13
  import { meta } from "#meta";
14
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-debug/src/components/DebugSettings/DebugSettings.tsx";
14
+ import { Settings } from "#types";
15
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-debug/src/containers/DebugSettings/DebugSettings.tsx";
15
16
  var StorageAdapters = {
16
17
  opfs: defs.Runtime.Client.Storage.StorageDriver.WEBFS,
17
18
  idb: defs.Runtime.Client.Storage.StorageDriver.IDB
18
19
  };
19
20
  var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
20
- const { t } = useTranslation(meta.id);
21
+ const { t } = useTranslation(meta.profile.key);
21
22
  const [toast, setToast] = useState();
22
23
  const download = useFileDownload();
23
24
  const [storageConfig, setStorageConfig] = useState({});
@@ -42,16 +43,16 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
42
43
  const fileName = `composer-${(/* @__PURE__ */ new Date()).toISOString().replace(/\W/g, "-")}.json`;
43
44
  download(file, fileName);
44
45
  if (onUpload) {
45
- const personalSpace = getPersonalSpace(client);
46
+ const personalSpace = AppSpace.getPersonalSpace(client);
46
47
  if (!personalSpace) {
47
- log.error("no personal space available for upload", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 46, S: void 0 });
48
+ log.error("no personal space available for upload", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 47, S: void 0 });
48
49
  return;
49
50
  }
50
51
  const info = await onUpload(personalSpace.db, new File([
51
52
  file
52
53
  ], fileName));
53
54
  if (!info) {
54
- log.error("diagnostics failed to upload to IPFS", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 53, S: void 0 });
55
+ log.error("diagnostics failed to upload to IPFS", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 54, S: void 0 });
55
56
  return;
56
57
  }
57
58
  handleToast({
@@ -66,7 +67,7 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
66
67
  });
67
68
  log.info("diagnostics", {
68
69
  url
69
- }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 67, S: void 0 });
70
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 68, S: void 0 });
70
71
  }
71
72
  }, [
72
73
  client,
@@ -142,50 +143,55 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
142
143
  storageConfig,
143
144
  t
144
145
  ]);
145
- return /* @__PURE__ */ React.createElement(SettingsForm.Viewport, null, /* @__PURE__ */ React.createElement(SettingsForm.Section, {
146
- title: t("settings.title", {
147
- ns: meta.id
148
- })
149
- }, /* @__PURE__ */ React.createElement(SettingsForm.Item, {
150
- title: t("settings.wireframe.label"),
146
+ return /* @__PURE__ */ React.createElement(Form.Root, {
147
+ schema: Settings.Settings,
148
+ values: settings,
149
+ variant: "settings",
150
+ readonly: !onSettingsChange
151
+ }, /* @__PURE__ */ React.createElement(Form.Viewport, {
152
+ scroll: true
153
+ }, /* @__PURE__ */ React.createElement(Form.Content, null, /* @__PURE__ */ React.createElement(Form.Section, {
154
+ title: meta.profile.name ?? meta.profile.key
155
+ }, /* @__PURE__ */ React.createElement(Form.Row, {
156
+ label: t("settings.wireframe.label"),
151
157
  description: t("settings.wireframe.description")
152
- }, /* @__PURE__ */ React.createElement(Input.Switch, {
158
+ }, /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Switch, {
153
159
  disabled: !onSettingsChange,
154
160
  checked: settings.wireframe,
155
161
  onCheckedChange: handleWireframeChange
156
- })), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
157
- title: t("settings.trace-all.label"),
162
+ }))), /* @__PURE__ */ React.createElement(Form.Row, {
163
+ label: t("settings.trace-all.label"),
158
164
  description: t("settings.trace-all.description")
159
- }, /* @__PURE__ */ React.createElement(Input.Switch, {
165
+ }, /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Switch, {
160
166
  disabled: !onSettingsChange,
161
167
  checked: traceAll,
162
168
  onCheckedChange: handleTraceAllChange
163
- })), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
164
- title: t("settings.tracing-panel.label"),
169
+ }))), /* @__PURE__ */ React.createElement(Form.Row, {
170
+ label: t("settings.tracing-panel.label"),
165
171
  description: t("settings.tracing-panel.description")
166
172
  }, /* @__PURE__ */ React.createElement(IconButton, {
167
173
  icon: "ph--arrow-square-out--regular",
168
174
  iconOnly: true,
169
175
  label: t("settings.tracing-panel.label"),
170
176
  onClick: handleOpenTracingPanel
171
- })), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
172
- title: t("settings.download-diagnostics.label"),
177
+ })), /* @__PURE__ */ React.createElement(Form.Row, {
178
+ label: t("settings.download-diagnostics.label"),
173
179
  description: t("settings.download-diagnostics.description")
174
180
  }, /* @__PURE__ */ React.createElement(IconButton, {
175
181
  icon: "ph--download-simple--regular",
176
182
  iconOnly: true,
177
183
  label: t("settings.download-diagnostics.label"),
178
184
  onClick: handleDownload
179
- })), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
180
- title: t("settings.download-logs.label"),
185
+ })), /* @__PURE__ */ React.createElement(Form.Row, {
186
+ label: t("settings.download-logs.label"),
181
187
  description: t("settings.download-logs.description")
182
188
  }, /* @__PURE__ */ React.createElement(IconButton, {
183
189
  icon: "ph--download-simple--regular",
184
190
  iconOnly: true,
185
191
  label: t("settings.download-logs.label"),
186
192
  onClick: handleDownloadLogs
187
- })), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
188
- title: t("settings.repair.label"),
193
+ })), /* @__PURE__ */ React.createElement(Form.Row, {
194
+ label: t("settings.repair.label"),
189
195
  description: t("settings.repair.description")
190
196
  }, /* @__PURE__ */ React.createElement(IconButton, {
191
197
  icon: "ph--first-aid-kit--regular",
@@ -194,8 +200,8 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
194
200
  onClick: handleRepair
195
201
  })), toast && /* @__PURE__ */ React.createElement(Toast.Root, null, /* @__PURE__ */ React.createElement(Toast.Title, {
196
202
  icon: "ph--gift--duotone"
197
- }, /* @__PURE__ */ React.createElement("span", null, toast.title)), toast.description && /* @__PURE__ */ React.createElement(Toast.Description, null, toast.description)), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
198
- title: t("settings.choose-storage-adaptor.label"),
203
+ }, /* @__PURE__ */ React.createElement("span", null, toast.title)), toast.description && /* @__PURE__ */ React.createElement(Toast.Description, null, toast.description)), /* @__PURE__ */ React.createElement(Form.Row, {
204
+ label: t("settings.choose-storage-adaptor.label"),
199
205
  description: t("settings.choose-storage-adaptor.description")
200
206
  }, /* @__PURE__ */ React.createElement(Select.Root, {
201
207
  disabled: !onSettingsChange,
@@ -207,7 +213,7 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
207
213
  }), /* @__PURE__ */ React.createElement(Select.Portal, null, /* @__PURE__ */ React.createElement(Select.Content, null, /* @__PURE__ */ React.createElement(Select.Viewport, null, Object.keys(StorageAdapters).map((key) => /* @__PURE__ */ React.createElement(Select.Option, {
208
214
  key,
209
215
  value: key
210
- }, t(`settings.storage-adaptor.${key}.label`)))), /* @__PURE__ */ React.createElement(Select.Arrow, null)))))));
216
+ }, t(`settings.storage-adaptor.${key}.label`)))), /* @__PURE__ */ React.createElement(Select.Arrow, null)))))))));
211
217
  };
212
218
  var updateConfig = (config, setConfig, path, value) => {
213
219
  const storageConfigCopy = JSON.parse(JSON.stringify(config ?? {}));
@@ -220,4 +226,4 @@ var updateConfig = (config, setConfig, path, value) => {
220
226
  export {
221
227
  DebugSettings as default
222
228
  };
223
- //# sourceMappingURL=DebugSettings-RKYNQIKH.mjs.map
229
+ //# sourceMappingURL=DebugSettings-Q3WUL6YQ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/DebugSettings/DebugSettings.tsx"],
4
+ "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 } 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 ndjson = await logStore.export();\n const file = new Blob([ndjson], { type: 'application/x-ndjson' });\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"],
5
+ "mappings": ";;;AAIA,OAAOA,SAASC,aAAaC,WAAWC,SAASC,gBAAgB;AAEjE,SAA0BC,gBAAgB;AAE1C,SAA2BC,YAAYC,SAASC,YAAY;AAC5D,SAASC,WAAW;AAEpB,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,OAAOC,QAAQC,OAAOC,iBAAiBC,sBAAsB;AAClF,SAASC,YAAY;AACrB,SAASC,qBAAqB;AAC9B,SAASC,eAAe;AAExB,SAASC,YAAY;AACrB,SAASC,gBAAgB;AAOzB,IAAA,eAAMC;IAEJC,kBAAkBC;EACpB,MAAA,KAAA,QAAA,OAAA,QAAA,cAAA;EAUA,KAAO,K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CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;;IAEtGtC,eAAQmE,CAAAA,QAAAA,WAAyB7B,MAAAA,UAAAA;AACjC8B,QAAAA,oBAAUD,KAAAA,MAAAA,KAAAA,UAAAA,UAAAA,CAAAA,CAAAA,CAAAA;AACVE,UAAAA,mBAAe,MAAA,KAAA;YACPlF,iBAAWgF;AACnB,iBAAA,YAAA;AACF,UAAA,WAAA,iBAAA;;;",
6
+ "names": ["React", "useCallback", "useEffect", "useMemo", "useState", "AppSpace", "SaveConfig", "Storage", "defs", "log", "useClient", "IconButton", "Input", "Select", "Toast", "useFileDownload", "useTranslation", "Form", "TRACE_ALL_KEY", "setDeep", "meta", "Settings", "StorageAdapters", "idb", "Client", "DebugSettings", "settings", "onSettingsChange", "toast", "download", "storageConfig", "setStorageConfig", "client", "config", "handleToast", "setToast", "setTimeout", "clearTimeout", "Blob", "JSON", "stringify", "data", "undefined", "type", "fileName", "onUpload", "personalSpace", "error", "description", "title", "info", "t", "ndjson", "checked", "handleTraceAllChange", "localStorage", "String", "value", "handleStorageAdapterChange", "variant", "readonly", "scroll", "Content", "Row", "label", "disabled", "wireframe", "onCheckedChange", "traceAll", "icon", "iconOnly", "onClick", "handleOpenTracingPanel", "handleDownload", "handleDownloadLogs", "handleRepair", "span", "Object", "entries", "find", "_name", "onValueChange", "TriggerButton", "key", "updateConfig", "path", "storageConfigCopy", "setConfig", "queueMicrotask"]
7
+ }
@@ -7,7 +7,7 @@ import { Filter, Query } from "@dxos/echo";
7
7
  import { useQuery } from "@dxos/react-client/echo";
8
8
  import { Clipboard, Grid, Input, Panel, ScrollArea, Toolbar } from "@dxos/react-ui";
9
9
  import { JsonHighlighter } from "@dxos/react-ui-syntax-highlighter";
10
- var DebugSpaceObjectsPanel = ({ space }) => {
10
+ var DebugSpaceObjectsPanel = ({ space, onOpen, canOpen }) => {
11
11
  const [selectedId, setSelectedId] = useState(null);
12
12
  const [selectedObject] = useQuery(space.db, selectedId ? Query.select(Filter.id(selectedId)) : Query.select(Filter.nothing()));
13
13
  return /* @__PURE__ */ React.createElement(Clipboard.Provider, null, /* @__PURE__ */ React.createElement(Panel.Root, null, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
@@ -22,7 +22,9 @@ var DebugSpaceObjectsPanel = ({ space }) => {
22
22
  classNames: "divide-y divide-separator"
23
23
  }, /* @__PURE__ */ React.createElement(ScrollArea.Root, null, /* @__PURE__ */ React.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React.createElement(ObjectsTree, {
24
24
  db: space.db,
25
- onSelect: (entity) => setSelectedId(entity.id)
25
+ onSelect: (entity) => setSelectedId(entity.id),
26
+ onOpen,
27
+ canOpen
26
28
  }))), selectedObject && /* @__PURE__ */ React.createElement(JsonHighlighter, {
27
29
  classNames: "p-1",
28
30
  data: selectedObject
@@ -31,4 +33,4 @@ var DebugSpaceObjectsPanel = ({ space }) => {
31
33
  export {
32
34
  DebugSpaceObjectsPanel as default
33
35
  };
34
- //# sourceMappingURL=DebugSpaceObjectsPanel-BHOCFWDJ.mjs.map
36
+ //# sourceMappingURL=DebugSpaceObjectsPanel-AXFZWEIM.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { ObjectsTree } from '@dxos/devtools';\nimport { type Entity, Filter, Obj, Query } from '@dxos/echo';\nimport { type EntityId } from '@dxos/keys';\nimport { useQuery } from '@dxos/react-client/echo';\nimport { Clipboard, Grid, Input, Panel, ScrollArea, Toolbar } from '@dxos/react-ui';\nimport { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';\n\nexport type DebugSpaceObjectsPanelProps = AppSurface.SpaceArticleProps & {\n onOpen?: (object: Obj.Unknown) => void;\n canOpen?: (entity: Entity.Snapshot) => boolean;\n};\n\nexport const DebugSpaceObjectsPanel = ({ space, onOpen, canOpen }: DebugSpaceObjectsPanelProps) => {\n const [selectedId, setSelectedId] = useState<EntityId | null>(null);\n const [selectedObject] = useQuery(\n space.db,\n selectedId ? Query.select(Filter.id(selectedId)) : Query.select(Filter.nothing()),\n );\n\n return (\n <Clipboard.Provider>\n <Panel.Root>\n <Panel.Toolbar asChild>\n <Toolbar.Root>\n <Input.Root>\n <Input.TextInput disabled placeholder='Search...' />\n </Input.Root>\n </Toolbar.Root>\n </Panel.Toolbar>\n <Panel.Content asChild>\n <Grid rows={2} classNames='divide-y divide-separator'>\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n <ObjectsTree\n db={space.db}\n onSelect={(entity) => setSelectedId(entity.id)}\n onOpen={onOpen}\n canOpen={canOpen}\n />\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n {selectedObject && <JsonHighlighter classNames='p-1' data={selectedObject} />}\n </Grid>\n </Panel.Content>\n </Panel.Root>\n </Clipboard.Provider>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,SAASC,gBAAgB;AAGhC,SAASC,mBAAmB;AAC5B,SAAsBC,QAAaC,aAAa;AAEhD,SAASC,gBAAgB;AACzB,SAASC,WAAWC,MAAMC,OAAOC,OAAOC,YAAYC,eAAe;AACnE,SAASC,uBAAuB;AAOzB,IAAMC,yBAAyB,CAAC,EAAEC,OAAOC,QAAQC,QAAO,MAA+B;AAC5F,QAAM,CAACC,YAAYC,aAAAA,IAAiBjB,SAA0B,IAAA;AAC9D,QAAM,CAACkB,cAAAA,IAAkBd,SACvBS,MAAMM,IACNH,aAAab,MAAMiB,OAAOlB,OAAOmB,GAAGL,UAAAA,CAAAA,IAAeb,MAAMiB,OAAOlB,OAAOoB,QAAO,CAAA,CAAA;AAGhF,SACE,sBAAA,cAACjB,UAAUkB,UAAQ,MACjB,sBAAA,cAACf,MAAMgB,MAAI,MACT,sBAAA,cAAChB,MAAME,SAAO;IAACe,SAAAA;KACb,sBAAA,cAACf,QAAQc,MAAI,MACX,sBAAA,cAACjB,MAAMiB,MAAI,MACT,sBAAA,cAACjB,MAAMmB,WAAS;IAACC,UAAAA;IAASC,aAAY;SAI5C,sBAAA,cAACpB,MAAMqB,SAAO;IAACJ,SAAAA;KACb,sBAAA,cAACnB,MAAAA;IAAKwB,MAAM;IAAGC,YAAW;KACxB,sBAAA,cAACtB,WAAWe,MAAI,MACd,sBAAA,cAACf,WAAWuB,UAAQ,MAClB,sBAAA,cAAC/B,aAAAA;IACCkB,IAAIN,MAAMM;IACVc,UAAU,CAACC,WAAWjB,cAAciB,OAAOb,EAAE;IAC7CP;IACAC;QAILG,kBAAkB,sBAAA,cAACP,iBAAAA;IAAgBoB,YAAW;IAAMI,MAAMjB;;AAMvE;",
6
+ "names": ["React", "useState", "ObjectsTree", "Filter", "Query", "useQuery", "Clipboard", "Grid", "Input", "Panel", "ScrollArea", "Toolbar", "JsonHighlighter", "DebugSpaceObjectsPanel", "space", "onOpen", "canOpen", "selectedId", "setSelectedId", "selectedObject", "db", "select", "id", "nothing", "Provider", "Root", "asChild", "TextInput", "disabled", "placeholder", "Content", "rows", "classNames", "Viewport", "onSelect", "entity", "data"]
7
+ }
@@ -4,6 +4,7 @@ import "./chunk-J5LGTIGS.mjs";
4
4
  import React from "react";
5
5
  import { Surface } from "@dxos/app-framework/ui";
6
6
  import { StatsPanel, useStats } from "@dxos/devtools";
7
+ import { DevtoolsOverview } from "#types";
7
8
  var DevtoolsOverviewContainer = () => {
8
9
  const [stats, refreshStats] = useStats();
9
10
  const surfaceProfilerStats = Surface.useProfilerStats();
@@ -14,10 +15,10 @@ var DevtoolsOverviewContainer = () => {
14
15
  onRefresh: refreshStats,
15
16
  onClearSurfaceProfiler: clearSurfaceProfiler
16
17
  }, /* @__PURE__ */ React.createElement(Surface.Surface, {
17
- role: "devtools-overview"
18
+ type: DevtoolsOverview
18
19
  }));
19
20
  };
20
21
  export {
21
22
  DevtoolsOverviewContainer as default
22
23
  };
23
- //# sourceMappingURL=DevtoolsOverviewContainer-YX7Z3D2H.mjs.map
24
+ //# sourceMappingURL=DevtoolsOverviewContainer-DWQHTK7D.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { StatsPanel, useStats } from '@dxos/devtools';\n\nimport { DevtoolsOverview } from '#types';\n\nexport const DevtoolsOverviewContainer = () => {\n const [stats, refreshStats] = useStats();\n const surfaceProfilerStats = Surface.useProfilerStats();\n const clearSurfaceProfiler = Surface.useProfilerClear();\n\n return (\n <StatsPanel\n stats={stats}\n surfaceProfilerStats={surfaceProfilerStats}\n onRefresh={refreshStats}\n onClearSurfaceProfiler={clearSurfaceProfiler}\n >\n <Surface.Surface type={DevtoolsOverview} />\n </StatsPanel>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,WAAW;AAElB,SAASC,eAAe;AACxB,SAASC,YAAYC,gBAAgB;AAErC,SAASC,wBAAwB;AAE1B,IAAMC,4BAA4B,MAAA;AACvC,QAAM,CAACC,OAAOC,YAAAA,IAAgBJ,SAAAA;AAC9B,QAAMK,uBAAuBP,QAAQQ,iBAAgB;AACrD,QAAMC,uBAAuBT,QAAQU,iBAAgB;AAErD,SACE,sBAAA,cAACT,YAAAA;IACCI;IACAE;IACAI,WAAWL;IACXM,wBAAwBH;KAExB,sBAAA,cAACT,QAAQA,SAAO;IAACa,MAAMV;;AAG7B;",
6
+ "names": ["React", "Surface", "StatsPanel", "useStats", "DevtoolsOverview", "DevtoolsOverviewContainer", "stats", "refreshStats", "surfaceProfilerStats", "useProfilerStats", "clearSurfaceProfiler", "useProfilerClear", "onRefresh", "onClearSurfaceProfiler", "type"]
7
+ }
@@ -66,7 +66,7 @@ var Root = ({ repo = DEFAULT_REPO, limit = DEFAULT_LIMIT, children }) => {
66
66
  }, children);
67
67
  };
68
68
  var Header = () => {
69
- const { t } = useTranslation(meta.id);
69
+ const { t } = useTranslation(meta.profile.key);
70
70
  const { repo, pulls, unavailable } = useComponentContext();
71
71
  return /* @__PURE__ */ React.createElement("header", {
72
72
  className: "flex items-center justify-between gap-1 px-4 py-3 bg-modal-surface border-b border-subdued-separator"
@@ -148,7 +148,7 @@ var Content = () => {
148
148
  })))));
149
149
  };
150
150
  var StatusBar = () => {
151
- const { t } = useTranslation(meta.id);
151
+ const { t } = useTranslation(meta.profile.key);
152
152
  const { repo } = useComponentContext();
153
153
  return /* @__PURE__ */ React.createElement(IconButton, {
154
154
  icon: "ph--github-logo--regular",
@@ -174,4 +174,4 @@ var GithubPanel = () => /* @__PURE__ */ React2.createElement(GithubComponent.Roo
174
174
  export {
175
175
  GithubPanel as default
176
176
  };
177
- //# sourceMappingURL=GithubPanel-QJKDJRVQ.mjs.map
177
+ //# sourceMappingURL=GithubPanel-4CSJRVKE.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/GithubPanel/GithubPanel.tsx", "../../../src/containers/GithubPanel/GithubComponent.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport React from 'react';\n\nimport { GithubComponent } from './GithubComponent';\n\nexport const GithubPanel = () => (\n <GithubComponent.Root>\n <div className='h-full grid grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden h-full is-full'>\n <GithubComponent.Header />\n <GithubComponent.Content />\n <GithubComponent.StatusBar />\n </div>\n </GithubComponent.Root>\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { type ReactNode, createContext, useContext, useEffect, useState } from 'react';\n\nimport { IconButton, ScrollArea, useTranslation } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nconst DEFAULT_REPO = 'dxos/dxos';\nconst DEFAULT_LIMIT = 20;\n\ntype GithubUser = {\n login: string;\n avatar_url: string;\n html_url: string;\n};\n\ntype GithubPullRequest = {\n number: number;\n title: string;\n html_url: string;\n merged_at: string | null;\n user: GithubUser;\n};\n\ntype ComponentContextValue = {\n repo: string;\n pulls: GithubPullRequest[];\n unavailable: boolean;\n};\n\nconst ComponentContext = createContext<ComponentContextValue | null>(null);\n\nconst useComponentContext = () => {\n const ctx = useContext(ComponentContext);\n if (!ctx) {\n throw new Error('GithubComponent.* parts must be rendered inside GithubComponent.Root.');\n }\n return ctx;\n};\n\nexport type GithubComponentRootProps = {\n /** `<owner>/<name>`. Defaults to `dxos/dxos`. */\n repo?: string;\n /** Maximum number of merged PRs to fetch. */\n limit?: number;\n children?: ReactNode;\n};\n\nconst Root = ({ repo = DEFAULT_REPO, limit = DEFAULT_LIMIT, children }: GithubComponentRootProps) => {\n const [pulls, setPulls] = useState<GithubPullRequest[]>([]);\n const [unavailable, setUnavailable] = useState(false);\n\n useEffect(() => {\n const controller = new AbortController();\n setPulls([]);\n setUnavailable(false);\n void (async () => {\n try {\n const url = new URL(`https://api.github.com/repos/${repo}/pulls`);\n url.searchParams.set('state', 'closed');\n url.searchParams.set('sort', 'updated');\n url.searchParams.set('direction', 'desc');\n url.searchParams.set('per_page', String(limit * 2));\n const response = await fetch(url.toString(), {\n signal: controller.signal,\n headers: { Accept: 'application/vnd.github+json' },\n });\n if (!response.ok) {\n setUnavailable(true);\n return;\n }\n const items = (await response.json()) as GithubPullRequest[];\n setPulls(items.filter((pull) => pull.merged_at !== null).slice(0, limit));\n setUnavailable(false);\n } catch {\n if (controller.signal.aborted) {\n return;\n }\n setPulls([]);\n setUnavailable(true);\n }\n })();\n return () => controller.abort();\n }, [repo, limit]);\n\n return <ComponentContext.Provider value={{ repo, pulls, unavailable }}>{children}</ComponentContext.Provider>;\n};\n\nconst Header = () => {\n const { t } = useTranslation(meta.profile.key);\n const { repo, pulls, unavailable } = useComponentContext();\n return (\n <header className='flex items-center justify-between gap-1 px-4 py-3 bg-modal-surface border-b border-subdued-separator'>\n <a\n href={`https://github.com/${repo}`}\n target='_blank'\n rel='noopener noreferrer'\n className='text-sm font-medium truncate'\n >\n @{repo}\n </a>\n <div className='text-xs text-description'>\n {unavailable\n ? t('github-unavailable.message')\n : pulls.length > 0\n ? t('recent-prs.label', { count: pulls.length })\n : t('github-loading.message')}\n </div>\n </header>\n );\n};\n\nconst RELATIVE_UNITS: Array<[Intl.RelativeTimeFormatUnit, number]> = [\n ['year', 60 * 60 * 24 * 365],\n ['month', 60 * 60 * 24 * 30],\n ['week', 60 * 60 * 24 * 7],\n ['day', 60 * 60 * 24],\n ['hour', 60 * 60],\n ['minute', 60],\n];\n\nconst formatRelative = (iso: string): string => {\n const formatter = new Intl.RelativeTimeFormat(undefined, { numeric: 'auto' });\n const diffSeconds = (Date.parse(iso) - Date.now()) / 1000;\n const absDiff = Math.abs(diffSeconds);\n for (const [unit, secondsInUnit] of RELATIVE_UNITS) {\n if (absDiff >= secondsInUnit) {\n return formatter.format(Math.round(diffSeconds / secondsInUnit), unit);\n }\n }\n return formatter.format(Math.round(diffSeconds), 'second');\n};\n\nconst PullRow = ({ pull }: { pull: GithubPullRequest }) => (\n <li>\n <a\n href={pull.html_url}\n target='_blank'\n rel='noopener noreferrer'\n className='flex items-start gap-2 px-2 py-1 rounded-sm hover:bg-hover-surface'\n >\n <img src={pull.user.avatar_url} alt='' className='w-6 h-6 rounded-full shrink-0 mt-0.5' />\n <div className='flex flex-col min-w-0 flex-1'>\n <span className='text-sm truncate'>{pull.title}</span>\n <span className='text-xs text-description truncate'>\n #{pull.number} · {pull.user.login} · {pull.merged_at ? formatRelative(pull.merged_at) : ''}\n </span>\n </div>\n </a>\n </li>\n);\n\nconst Content = () => {\n const { pulls } = useComponentContext();\n return (\n <ScrollArea.Root orientation='vertical'>\n <ScrollArea.Viewport>\n <ul className='flex flex-col p-1'>\n {pulls.map((pull) => (\n <PullRow key={pull.number} pull={pull} />\n ))}\n </ul>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n );\n};\n\nconst StatusBar = () => {\n const { t } = useTranslation(meta.profile.key);\n const { repo } = useComponentContext();\n return (\n <IconButton\n icon='ph--github-logo--regular'\n label={t('view-on-github.button')}\n variant='primary'\n classNames='w-full'\n onClick={() => {\n window.open(`https://github.com/${repo}`, '_blank', 'noopener,noreferrer');\n }}\n />\n );\n};\n\nexport const GithubComponent = {\n Root,\n Header,\n Content,\n StatusBar,\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,YAAW;;;ACAlB,OAAOC,SAAyBC,eAAeC,YAAYC,WAAWC,gBAAgB;AAEtF,SAASC,YAAYC,YAAYC,sBAAsB;AAEvD,SAASC,YAAY;AAErB,IAAMC,eAAe;AACrB,IAAMC,gBAAgB;AAsBtB,IAAMC,mBAAmBV,8BAA4C,IAAA;AAErE,IAAMW,sBAAsB,MAAA;AAC1B,QAAMC,MAAMX,WAAWS,gBAAAA;AACvB,MAAI,CAACE,KAAK;AACR,UAAM,IAAIC,MAAM,uEAAA;EAClB;AACA,SAAOD;AACT;AAUA,IAAME,OAAO,CAAC,EAAEC,OAAOP,cAAcQ,QAAQP,eAAeQ,SAAQ,MAA4B;AAC9F,QAAM,CAACC,OAAOC,QAAAA,IAAYhB,SAA8B,CAAA,CAAE;AAC1D,QAAM,CAACiB,aAAaC,cAAAA,IAAkBlB,SAAS,KAAA;AAE/CD,YAAU,MAAA;AACR,UAAMoB,aAAa,IAAIC,gBAAAA;AACvBJ,aAAS,CAAA,CAAE;AACXE,mBAAe,KAAA;AACf,UAAM,YAAA;AACJ,UAAI;AACF,cAAMG,MAAM,IAAIC,IAAI,gCAAgCV,IAAAA,QAAY;AAChES,YAAIE,aAAaC,IAAI,SAAS,QAAA;AAC9BH,YAAIE,aAAaC,IAAI,QAAQ,SAAA;AAC7BH,YAAIE,aAAaC,IAAI,aAAa,MAAA;AAClCH,YAAIE,aAAaC,IAAI,YAAYC,OAAOZ,QAAQ,CAAA,CAAA;AAChD,cAAMa,W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ClB,sBAAA,cAACC,MAAAA;IAAG1C,WAAU;KACXjC,MAAM4E,IAAI,CAACvD,SACV,sBAAA,cAACuC,SAAAA;IAAQ7B,KAAKV,KAAKiD;IAAQjD;;AAMvC;AAEA,IAAMwD,YAAY,MAAA;AAChB,QAAM,EAAEhD,EAAC,IAAKzC,eAAeC,KAAKyC,QAAQC,GAAG;AAC7C,QAAM,EAAElC,KAAI,IAAKJ,oBAAAA;AACjB,SACE,sBAAA,cAACP,YAAAA;IACC4F,MAAK;IACLC,OAAOlD,EAAE,uBAAA;IACTmD,SAAQ;IACRC,YAAW;IACXC,SAAS,MAAA;AACPC,aAAOC,KAAK,sBAAsBvF,IAAAA,IAAQ,UAAU,qBAAA;IACtD;;AAGN;AAEO,IAAMwF,kBAAkB;EAC7BzF;EACAgC;EACA4C;EACAK;AACF;;;ADvLO,IAAMS,cAAc,MACzB,gBAAAC,OAAA,cAACC,gBAAgBC,MAAI,MACnB,gBAAAF,OAAA,cAACG,OAAAA;EAAIC,WAAU;GACb,gBAAAJ,OAAA,cAACC,gBAAgBI,QAAM,IAAA,GACvB,gBAAAL,OAAA,cAACC,gBAAgBK,SAAO,IAAA,GACxB,gBAAAN,OAAA,cAACC,gBAAgBM,WAAS,IAAA,CAAA,CAAA;",
6
+ "names": ["React", "React", "createContext", "useContext", "useEffect", "useState", "IconButton", "ScrollArea", "useTranslation", "meta", "DEFAULT_REPO", "DEFAULT_LIMIT", "ComponentContext", "useComponentContext", "ctx", "Error", "Root", "repo", "limit", "children", "pulls", "setPulls", "unavailable", "setUnavailable", "controller", "AbortController", "url", "URL", "searchParams", "set", "String", "response", "fetch", "toString", "signal", "headers", "Accept", "ok", "items", "json", "filter", "pull", "merged_at", "slice", "aborted", "abort", "Provider", "value", "Header", "t", "profile", "key", "header", "className", "a", "href", "target", "rel", "div", "length", "count", "RELATIVE_UNITS", "formatRelative", "iso", "formatter", "Intl", "RelativeTimeFormat", "undefined", "numeric", "diffSeconds", "Date", "parse", "now", "absDiff", "Math", "abs", "unit", "secondsInUnit", "format", "round", "PullRow", "li", "html_url", "img", "src", "user", "avatar_url", "alt", "span", "title", "number", "login", "Content", "orientation", "Viewport", "ul", "map", "StatusBar", "icon", "label", "variant", "classNames", "onClick", "window", "open", "GithubComponent", "GithubPanel", "React", "GithubComponent", "Root", "div", "className", "Header", "Content", "StatusBar"]
7
+ }