@dxos/plugin-devtools 0.10.0 → 0.11.1

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 (99) hide show
  1. package/README.md +3 -3
  2. package/dist/lib/DevtoolsPlugin.mjs +39 -0
  3. package/dist/lib/DevtoolsPlugin.mjs.map +1 -0
  4. package/dist/lib/DevtoolsPlugin.node.mjs +10 -0
  5. package/dist/lib/DevtoolsPlugin.node.mjs.map +1 -0
  6. package/dist/lib/DevtoolsPlugin.workerd.mjs +8 -0
  7. package/dist/lib/DevtoolsPlugin.workerd.mjs.map +1 -0
  8. package/dist/lib/capabilities.mjs +9 -0
  9. package/dist/lib/capabilities.mjs.map +1 -0
  10. package/dist/lib/chunk-DebugGraph.mjs +20 -0
  11. package/dist/lib/chunk-DebugGraph.mjs.map +1 -0
  12. package/dist/lib/chunk-DevtoolsOverviewContainer.mjs +40 -0
  13. package/dist/lib/chunk-DevtoolsOverviewContainer.mjs.map +1 -0
  14. package/dist/lib/chunk-GithubPanel.mjs +158 -0
  15. package/dist/lib/chunk-GithubPanel.mjs.map +1 -0
  16. package/dist/lib/chunk-RegistryPanel.mjs +124 -0
  17. package/dist/lib/chunk-RegistryPanel.mjs.map +1 -0
  18. package/dist/lib/chunk-app-graph-builder.mjs +371 -0
  19. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
  20. package/dist/lib/{neutral/chunk-QCL4JV4T.mjs → chunk-meta.mjs} +16 -25
  21. package/dist/lib/chunk-meta.mjs.map +1 -0
  22. package/dist/lib/chunk-react-context.mjs +16 -0
  23. package/dist/lib/chunk-react-context.mjs.map +1 -0
  24. package/dist/lib/chunk-react-surface.mjs +252 -0
  25. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  26. package/dist/lib/chunk-types.mjs +92 -0
  27. package/dist/lib/chunk-types.mjs.map +1 -0
  28. package/dist/lib/containers.mjs +10 -0
  29. package/dist/lib/containers.mjs.map +1 -0
  30. package/dist/lib/index.mjs +3 -0
  31. package/dist/lib/meta.mjs +2 -0
  32. package/dist/lib/plugin.mjs +8 -0
  33. package/dist/lib/plugin.mjs.map +1 -0
  34. package/dist/lib/translations.mjs +55 -0
  35. package/dist/lib/translations.mjs.map +1 -0
  36. package/dist/lib/types.mjs +2 -0
  37. package/dist/types/src/capabilities/DevtoolsSurfaces.d.ts +18 -0
  38. package/dist/types/src/capabilities/DevtoolsSurfaces.d.ts.map +1 -0
  39. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  40. package/dist/types/src/capabilities/react-context.d.ts +1 -1
  41. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  42. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  43. package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -1
  44. package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +1 -1
  45. package/dist/types/src/translations.d.ts +1 -1
  46. package/dist/types/src/translations.d.ts.map +1 -1
  47. package/dist/types/tsconfig.tsbuildinfo +1 -1
  48. package/package.json +77 -79
  49. package/src/DevtoolsPlugin.tsx +1 -1
  50. package/src/capabilities/DevtoolsSurfaces.tsx +100 -0
  51. package/src/capabilities/app-graph-builder.ts +3 -3
  52. package/src/capabilities/react-surface.ts +236 -0
  53. package/src/containers/DebugGraph/DebugGraph.tsx +12 -1
  54. package/src/containers/GithubPanel/GithubComponent.stories.tsx +1 -1
  55. package/src/containers/GithubPanel/GithubComponent.tsx +1 -1
  56. package/src/containers/GithubPanel/GithubPanel.tsx +1 -1
  57. package/src/containers/RegistryPanel/RegistryPanel.tsx +15 -14
  58. package/src/translations.ts +1 -1
  59. package/dist/lib/neutral/DebugGraph-F7AMZXKW.mjs +0 -16
  60. package/dist/lib/neutral/DebugGraph-F7AMZXKW.mjs.map +0 -7
  61. package/dist/lib/neutral/DevtoolsOverviewContainer-DCNZFKK5.mjs +0 -51
  62. package/dist/lib/neutral/DevtoolsOverviewContainer-DCNZFKK5.mjs.map +0 -7
  63. package/dist/lib/neutral/DevtoolsPlugin.mjs +0 -55
  64. package/dist/lib/neutral/DevtoolsPlugin.mjs.map +0 -7
  65. package/dist/lib/neutral/DevtoolsPlugin.node.mjs +0 -16
  66. package/dist/lib/neutral/DevtoolsPlugin.node.mjs.map +0 -7
  67. package/dist/lib/neutral/DevtoolsPlugin.workerd.mjs +0 -12
  68. package/dist/lib/neutral/DevtoolsPlugin.workerd.mjs.map +0 -7
  69. package/dist/lib/neutral/GithubPanel-DWFZXZUK.mjs +0 -178
  70. package/dist/lib/neutral/GithubPanel-DWFZXZUK.mjs.map +0 -7
  71. package/dist/lib/neutral/RegistryPanel-CVETZUZV.mjs +0 -162
  72. package/dist/lib/neutral/RegistryPanel-CVETZUZV.mjs.map +0 -7
  73. package/dist/lib/neutral/app-graph-builder-KHZ65O2Q.mjs +0 -560
  74. package/dist/lib/neutral/app-graph-builder-KHZ65O2Q.mjs.map +0 -7
  75. package/dist/lib/neutral/capabilities/index.mjs +0 -13
  76. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  77. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  78. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  79. package/dist/lib/neutral/chunk-PJNVAE7D.mjs +0 -81
  80. package/dist/lib/neutral/chunk-PJNVAE7D.mjs.map +0 -7
  81. package/dist/lib/neutral/chunk-QCL4JV4T.mjs.map +0 -7
  82. package/dist/lib/neutral/containers/index.mjs +0 -15
  83. package/dist/lib/neutral/containers/index.mjs.map +0 -7
  84. package/dist/lib/neutral/index.mjs +0 -12
  85. package/dist/lib/neutral/index.mjs.map +0 -7
  86. package/dist/lib/neutral/meta.json +0 -1
  87. package/dist/lib/neutral/meta.mjs +0 -8
  88. package/dist/lib/neutral/meta.mjs.map +0 -7
  89. package/dist/lib/neutral/plugin.mjs +0 -12
  90. package/dist/lib/neutral/plugin.mjs.map +0 -7
  91. package/dist/lib/neutral/react-context-UJURDOO6.mjs +0 -17
  92. package/dist/lib/neutral/react-context-UJURDOO6.mjs.map +0 -7
  93. package/dist/lib/neutral/react-surface-XILLHGRR.mjs +0 -332
  94. package/dist/lib/neutral/react-surface-XILLHGRR.mjs.map +0 -7
  95. package/dist/lib/neutral/translations.mjs +0 -65
  96. package/dist/lib/neutral/translations.mjs.map +0 -7
  97. package/dist/lib/neutral/types/index.mjs +0 -8
  98. package/dist/lib/neutral/types/index.mjs.map +0 -7
  99. package/src/capabilities/react-surface.tsx +0 -331
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # @dxos/plugin-kanban
1
+ # @dxos/plugin-devtools
2
2
 
3
- Surface plugin for kanban entities.
3
+ Developer inspector plugin for DXOS.
4
4
 
5
5
  ## DXOS Resources
6
6
 
@@ -12,4 +12,4 @@ Surface plugin for kanban entities.
12
12
 
13
13
  Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
14
14
 
15
- License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
15
+ License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2026 © DXOS
@@ -0,0 +1,39 @@
1
+ import { ActivationEvents, Capability, Plugin } from "@dxos/app-framework";
2
+ import { meta } from "#meta";
3
+ import * as Effect from "effect/Effect";
4
+ import { AppPlugin } from "@dxos/app-toolkit";
5
+ import { AppGraphBuilder, ReactContext, ReactSurface } from "#capabilities";
6
+ import { translations } from "#translations";
7
+ //#endregion
8
+ //#region src/DevtoolsPlugin.tsx
9
+ var DevtoolsPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }), AppPlugin.addReactContextModule({ activate: ReactContext }), Plugin.addModule({
10
+ id: Capability.getModuleTag(ReactSurface) ?? "surfaces",
11
+ activatesOn: ActivationEvents.SetupReactSurface,
12
+ activate: () => ReactSurface()
13
+ }), AppPlugin.addTranslationsModule({ translations }), Plugin.addModule({
14
+ id: "setup-devtools",
15
+ activatesOn: ActivationEvents.Startup,
16
+ activate: () => Effect.sync(() => setupDevtools())
17
+ }), AppPlugin.addPluginAssetModule({ asset: {
18
+ pluginId: meta.profile.key,
19
+ path: "PLUGIN.mdl",
20
+ content: "---\nid: org.dxos.plugin.devtools\nname: DevtoolsPlugin\nversion: 0.1.0\n---\n\nDeveloper inspector plugin for `DXOS` Composer — structured devtools panels for Client/HALO/ECHO/Mesh/EDGE subsystems, an app-graph inspector, and a tools explorer. Debugging utilities (object generation, wireframe overlays, per-object inspection, stats) live in the sibling `@dxos/plugin-debug`.\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 ┌─────────────────────────────┐\n │ Client ▸ Config / Storage │\n │ Logs / Diag │\n │ HALO ▸ Identity / Keys │\n │ ECHO ▸ Spaces / Feeds │\n │ Objects / Schema │\n │ Mesh ▸ Signal / Swarm │\n │ EDGE ▸ Dashboard / … │\n └─────────────────────────────┘\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",
21
+ mimeType: "application/x-mdl"
22
+ } }), Plugin.make);
23
+ var setupDevtools = () => {
24
+ globalThis.composer ??= {};
25
+ globalThis.composer.changeStorageVersionInMetadata = async (version) => {
26
+ const { changeStorageVersionInMetadata } = await import("@dxos/client-services/testing");
27
+ const { createStorageObjects } = await import("@dxos/client-services");
28
+ const client = window.dxos.client;
29
+ const config = client.config;
30
+ await client.destroy();
31
+ const { storage } = createStorageObjects(config.values?.runtime?.client?.storage ?? {});
32
+ await changeStorageVersionInMetadata(storage, version);
33
+ location.pathname = "/";
34
+ };
35
+ };
36
+ //#endregion
37
+ export { DevtoolsPlugin, DevtoolsPlugin as default };
38
+
39
+ //# sourceMappingURL=DevtoolsPlugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevtoolsPlugin.mjs","names":[],"sources":["../../src/DevtoolsPlugin.tsx"],"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, ReactContext, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const DevtoolsPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addReactContextModule({ activate: ReactContext }),\n Plugin.addModule({\n id: Capability.getModuleTag(ReactSurface) ?? 'surfaces',\n activatesOn: ActivationEvents.SetupReactSurface,\n activate: () => ReactSurface(),\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/client-services/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 DevtoolsPlugin;\n"],"mappings":";;;;;;;;AAiBA,IAAa,iBAAiB,OAAO,OAAO,IAAI,CAAC,CAAC,KAChD,UAAU,kBAAkB,EAAE,UAAU,gBAAgB,CAAC,GACzD,UAAU,sBAAsB,EAAE,UAAU,aAAa,CAAC,GAC1D,OAAO,UAAU;CACf,IAAI,WAAW,aAAa,YAAY,KAAK;CAC7C,aAAa,iBAAiB;CAC9B,gBAAgB,aAAa;AAC/B,CAAC,GACD,UAAU,sBAAsB,EAAE,aAAa,CAAC,GAChD,OAAO,UAAU;CACf,IAAI;CACJ,aAAa,iBAAiB;CAC9B,gBAAgB,OAAO,WAAW,cAAc,CAAC;AACnD,CAAC,GACD,UAAU,qBAAqB,EAC7B,OAAO;CAAE,UAAU,KAAK,QAAQ;CAAK,MAAM;CAAc,SAAS;CAAY,UAAU;AAAoB,EAC9G,CAAC,GACD,OAAO,IACT;AAEA,IAAM,sBAAsB;CAC1B,WAAoB,aAAa,CAAC;CAGlC,WAAoB,SAAS,iCAAiC,OAAO,YAAoB;EACvF,MAAM,EAAE,mCAAmC,MAAM,OAAO;EACxD,MAAM,EAAE,yBAAyB,MAAM,OAAO;EAC9C,MAAM,SAAkB,OAAe,KAAK;EAC5C,MAAM,SAAS,OAAO;EACtB,MAAM,OAAO,QAAQ;EACrB,MAAM,EAAE,YAAY,qBAAqB,OAAO,QAAQ,SAAS,QAAQ,WAAW,CAAC,CAAC;EACtF,MAAM,+BAA+B,SAAS,OAAO;EACrD,SAAS,WAAW;CACtB;AACF"}
@@ -0,0 +1,10 @@
1
+ import { Plugin } from "@dxos/app-framework";
2
+ import { meta } from "#meta";
3
+ import { AppPlugin } from "@dxos/app-toolkit";
4
+ import { AppGraphBuilder } from "#capabilities";
5
+ //#region src/DevtoolsPlugin.node.ts
6
+ var DevtoolsPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }), Plugin.make);
7
+ //#endregion
8
+ export { DevtoolsPlugin, DevtoolsPlugin as default };
9
+
10
+ //# sourceMappingURL=DevtoolsPlugin.node.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevtoolsPlugin.node.mjs","names":[],"sources":["../../src/DevtoolsPlugin.node.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const DevtoolsPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n Plugin.make,\n);\n\nexport default DevtoolsPlugin;\n"],"mappings":";;;;;AAUA,IAAa,iBAAiB,OAAO,OAAO,IAAI,CAAC,CAAC,KAChD,UAAU,kBAAkB,EAAE,UAAU,gBAAgB,CAAC,GACzD,OAAO,IACT"}
@@ -0,0 +1,8 @@
1
+ import { Plugin } from "@dxos/app-framework";
2
+ import { meta } from "#meta";
3
+ //#region src/DevtoolsPlugin.workerd.ts
4
+ var DevtoolsPlugin = Plugin.define(meta).pipe(Plugin.make);
5
+ //#endregion
6
+ export { DevtoolsPlugin, DevtoolsPlugin as default };
7
+
8
+ //# sourceMappingURL=DevtoolsPlugin.workerd.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevtoolsPlugin.workerd.mjs","names":[],"sources":["../../src/DevtoolsPlugin.workerd.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport const DevtoolsPlugin = Plugin.define(meta).pipe(Plugin.make);\n\nexport default DevtoolsPlugin;\n"],"mappings":";;;AAQA,IAAa,iBAAiB,OAAO,OAAO,IAAI,CAAC,CAAC,KAAK,OAAO,IAAI"}
@@ -0,0 +1,9 @@
1
+ import { Capability } from "@dxos/app-framework";
2
+ //#region src/capabilities/index.ts
3
+ var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("./chunk-app-graph-builder.mjs"));
4
+ var ReactContext = Capability.lazy("ReactContext", () => import("./chunk-react-context.mjs"));
5
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("./chunk-react-surface.mjs"));
6
+ //#endregion
7
+ export { AppGraphBuilder, ReactContext, ReactSurface };
8
+
9
+ //# sourceMappingURL=capabilities.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const ReactContext = Capability.lazy('ReactContext', () => import('./react-context'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n"],"mappings":";;AAMA,IAAa,kBAAkB,WAAW,KAAK,yBAAyB,OAAO,gCAAsB;AACrG,IAAa,eAAe,WAAW,KAAK,sBAAsB,OAAO,4BAAkB;AAC3F,IAAa,eAAe,WAAW,KAAK,sBAAsB,OAAO,4BAAkB"}
@@ -0,0 +1,20 @@
1
+ import "react";
2
+ import { Graph } from "@dxos/plugin-graph";
3
+ import { Tree } from "@dxos/devtools";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { Panel, ScrollArea } from "@dxos/react-ui";
6
+ //#region src/containers/DebugGraph/DebugGraph.tsx
7
+ var DebugGraph = ({ graph, root }) => {
8
+ return /* @__PURE__ */ jsx(Panel.Root, { children: /* @__PURE__ */ jsx(Panel.Content, {
9
+ asChild: true,
10
+ children: /* @__PURE__ */ jsx(ScrollArea.Root, {
11
+ orientation: "all",
12
+ children: /* @__PURE__ */ jsx(ScrollArea.Viewport, { children: /* @__PURE__ */ jsx(Tree, { data: Graph.toJSON(graph, root) }) })
13
+ })
14
+ }) });
15
+ };
16
+ DebugGraph.displayName = "DebugGraph";
17
+ //#endregion
18
+ export { DebugGraph as default };
19
+
20
+ //# sourceMappingURL=chunk-DebugGraph.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-DebugGraph.mjs","names":[],"sources":["../../src/containers/DebugGraph/DebugGraph.tsx"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Tree } from '@dxos/devtools';\nimport { Graph } from '@dxos/plugin-graph';\nimport { Panel, ScrollArea } from '@dxos/react-ui';\n\nexport type DebugGraphProps = { graph: Graph.Graph; root: string };\n\nexport const DebugGraph = ({ graph, root }: DebugGraphProps) => {\n return (\n <Panel.Root>\n <Panel.Content asChild>\n <ScrollArea.Root orientation='all'>\n <ScrollArea.Viewport>\n <Tree data={Graph.toJSON(graph, root)} />\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n </Panel.Content>\n </Panel.Root>\n );\n};\n\nDebugGraph.displayName = 'DebugGraph';\n"],"mappings":";;;;;;AAYA,IAAa,cAAc,EAAE,OAAO,WAA4B;CAC9D,OACE,oBAAC,MAAM,MAAP,EAAA,UACE,oBAAC,MAAM,SAAP;EAAe,SAAA;YACb,oBAAC,WAAW,MAAZ;GAAiB,aAAY;aAC3B,oBAAC,WAAW,UAAZ,EAAA,UACE,oBAAC,MAAD,EAAM,MAAM,MAAM,OAAO,OAAO,IAAI,EAAI,CAAA,EACrB,CAAA;EACN,CAAA;CACJ,CAAA,EACL,CAAA;AAEhB;AAEA,WAAW,cAAc"}
@@ -0,0 +1,40 @@
1
+ import { useCallback, useMemo } from "react";
2
+ import { Surface } from "@dxos/app-framework/ui";
3
+ import { StatsPanel, useStats } from "@dxos/devtools";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { AppSurface } from "@dxos/app-toolkit/ui";
6
+ //#region src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx
7
+ var DevtoolsOverviewContainer = () => {
8
+ const [stats, refreshStats] = useStats();
9
+ const surfaceProfilerStats = Surface.useProfilerStats();
10
+ const surfaceMetrics = Surface.useMetrics();
11
+ const clearSurfaceProfiler = Surface.useProfilerClear();
12
+ const handleClearSurfaceProfiler = useCallback(() => {
13
+ clearSurfaceProfiler?.();
14
+ Surface.clearMetrics();
15
+ }, [clearSurfaceProfiler]);
16
+ return /* @__PURE__ */ jsx(StatsPanel, {
17
+ stats,
18
+ surfaceProfilerStats: useMemo(() => {
19
+ const byId = new Map(surfaceMetrics.map((metric) => [metric.id, metric]));
20
+ return surfaceProfilerStats.map((stat) => {
21
+ const metric = byId.get(stat.id);
22
+ return metric ? {
23
+ ...stat,
24
+ candidates: metric.candidates,
25
+ truncated: metric.truncated,
26
+ errors: metric.errors,
27
+ dataUnstable: metric.dataUnstable
28
+ } : stat;
29
+ });
30
+ }, [surfaceProfilerStats, surfaceMetrics]),
31
+ onRefresh: refreshStats,
32
+ onClearSurfaceProfiler: handleClearSurfaceProfiler,
33
+ children: /* @__PURE__ */ jsx(Surface.Surface, { type: AppSurface.DevtoolsOverview })
34
+ });
35
+ };
36
+ DevtoolsOverviewContainer.displayName = "DevtoolsOverviewContainer";
37
+ //#endregion
38
+ export { DevtoolsOverviewContainer as default };
39
+
40
+ //# sourceMappingURL=chunk-DevtoolsOverviewContainer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-DevtoolsOverviewContainer.mjs","names":[],"sources":["../../src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { StatsPanel, useStats } from '@dxos/devtools';\n\nexport const DevtoolsOverviewContainer = () => {\n const [stats, refreshStats] = useStats();\n const surfaceProfilerStats = Surface.useProfilerStats();\n const surfaceMetrics = Surface.useMetrics();\n const clearSurfaceProfiler = Surface.useProfilerClear();\n\n // The panel joins profiler stats with dispatch metrics, so reset must clear both.\n const handleClearSurfaceProfiler = useCallback(() => {\n clearSurfaceProfiler?.();\n Surface.clearMetrics();\n }, [clearSurfaceProfiler]);\n\n // Join dispatch metrics onto the render-timing stats (both keyed by `surface/<id>/<role>`).\n const enrichedStats = useMemo(() => {\n const byId = new Map(surfaceMetrics.map((metric) => [metric.id, metric]));\n return surfaceProfilerStats.map((stat) => {\n const metric = byId.get(stat.id);\n return metric\n ? {\n ...stat,\n candidates: metric.candidates,\n truncated: metric.truncated,\n errors: metric.errors,\n dataUnstable: metric.dataUnstable,\n }\n : stat;\n });\n }, [surfaceProfilerStats, surfaceMetrics]);\n\n return (\n <StatsPanel\n stats={stats}\n surfaceProfilerStats={enrichedStats}\n onRefresh={refreshStats}\n onClearSurfaceProfiler={handleClearSurfaceProfiler}\n >\n <Surface.Surface type={AppSurface.DevtoolsOverview} />\n </StatsPanel>\n );\n};\n\nDevtoolsOverviewContainer.displayName = 'DevtoolsOverviewContainer';\n"],"mappings":";;;;;;AAUA,IAAa,kCAAkC;CAC7C,MAAM,CAAC,OAAO,gBAAgB,SAAS;CACvC,MAAM,uBAAuB,QAAQ,iBAAiB;CACtD,MAAM,iBAAiB,QAAQ,WAAW;CAC1C,MAAM,uBAAuB,QAAQ,iBAAiB;CAGtD,MAAM,6BAA6B,kBAAkB;EACnD,uBAAuB;EACvB,QAAQ,aAAa;CACvB,GAAG,CAAC,oBAAoB,CAAC;CAmBzB,OACE,oBAAC,YAAD;EACS;EACP,sBAnBkB,cAAc;GAClC,MAAM,OAAO,IAAI,IAAI,eAAe,KAAK,WAAW,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC;GACxE,OAAO,qBAAqB,KAAK,SAAS;IACxC,MAAM,SAAS,KAAK,IAAI,KAAK,EAAE;IAC/B,OAAO,SACH;KACE,GAAG;KACH,YAAY,OAAO;KACnB,WAAW,OAAO;KAClB,QAAQ,OAAO;KACf,cAAc,OAAO;IACvB,IACA;GACN,CAAC;EACH,GAAG,CAAC,sBAAsB,cAAc,CAKd;EACtB,WAAW;EACX,wBAAwB;YAExB,oBAAC,QAAQ,SAAT,EAAiB,MAAM,WAAW,iBAAmB,CAAA;CAC3C,CAAA;AAEhB;AAEA,0BAA0B,cAAc"}
@@ -0,0 +1,158 @@
1
+ import { meta } from "#meta";
2
+ import { createContext, useContext, useEffect, useState } from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { IconButton, ScrollArea, useTranslation } from "@dxos/react-ui";
5
+ //#region src/containers/GithubPanel/GithubComponent.tsx
6
+ var DEFAULT_REPO = "dxos/dxos";
7
+ var DEFAULT_LIMIT = 20;
8
+ var ComponentContext = createContext(null);
9
+ var useComponentContext = () => {
10
+ const ctx = useContext(ComponentContext);
11
+ if (!ctx) throw new Error("GithubComponent.* parts must be rendered inside GithubComponent.Root.");
12
+ return ctx;
13
+ };
14
+ var Root = ({ repo = DEFAULT_REPO, limit = DEFAULT_LIMIT, children }) => {
15
+ const [pulls, setPulls] = useState([]);
16
+ const [unavailable, setUnavailable] = useState(false);
17
+ useEffect(() => {
18
+ const controller = new AbortController();
19
+ setPulls([]);
20
+ setUnavailable(false);
21
+ (async () => {
22
+ try {
23
+ const url = new URL(`https://api.github.com/repos/${repo}/pulls`);
24
+ url.searchParams.set("state", "closed");
25
+ url.searchParams.set("sort", "updated");
26
+ url.searchParams.set("direction", "desc");
27
+ url.searchParams.set("per_page", String(limit * 2));
28
+ const response = await fetch(url.toString(), {
29
+ signal: controller.signal,
30
+ headers: { Accept: "application/vnd.github+json" }
31
+ });
32
+ if (!response.ok) {
33
+ setUnavailable(true);
34
+ return;
35
+ }
36
+ const items = await response.json();
37
+ setPulls(items.filter((pull) => pull.merged_at !== null).slice(0, limit));
38
+ setUnavailable(false);
39
+ } catch {
40
+ if (controller.signal.aborted) return;
41
+ setPulls([]);
42
+ setUnavailable(true);
43
+ }
44
+ })();
45
+ return () => controller.abort();
46
+ }, [repo, limit]);
47
+ return /* @__PURE__ */ jsx(ComponentContext.Provider, {
48
+ value: {
49
+ repo,
50
+ pulls,
51
+ unavailable
52
+ },
53
+ children
54
+ });
55
+ };
56
+ var Header = () => {
57
+ const { t } = useTranslation(meta.profile.key);
58
+ const { repo, pulls, unavailable } = useComponentContext();
59
+ return /* @__PURE__ */ jsxs("header", {
60
+ className: "flex items-center justify-between gap-1 px-4 py-3 dx-modal-surface border-b border-subdued-separator",
61
+ children: [/* @__PURE__ */ jsxs("a", {
62
+ href: `https://github.com/${repo}`,
63
+ target: "_blank",
64
+ rel: "noopener noreferrer",
65
+ className: "text-sm font-medium truncate",
66
+ children: ["@", repo]
67
+ }), /* @__PURE__ */ jsx("div", {
68
+ className: "text-xs text-description",
69
+ children: unavailable ? t("github-unavailable.message") : pulls.length > 0 ? t("recent-prs.label", { count: pulls.length }) : t("github-loading.message")
70
+ })]
71
+ });
72
+ };
73
+ var RELATIVE_UNITS = [
74
+ ["year", 3600 * 24 * 365],
75
+ ["month", 3600 * 24 * 30],
76
+ ["week", 3600 * 24 * 7],
77
+ ["day", 3600 * 24],
78
+ ["hour", 3600],
79
+ ["minute", 60]
80
+ ];
81
+ var formatRelative = (iso) => {
82
+ const formatter = new Intl.RelativeTimeFormat(void 0, { numeric: "auto" });
83
+ const diffSeconds = (Date.parse(iso) - Date.now()) / 1e3;
84
+ const absDiff = Math.abs(diffSeconds);
85
+ for (const [unit, secondsInUnit] of RELATIVE_UNITS) if (absDiff >= secondsInUnit) return formatter.format(Math.round(diffSeconds / secondsInUnit), unit);
86
+ return formatter.format(Math.round(diffSeconds), "second");
87
+ };
88
+ var PullRow = ({ pull }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("a", {
89
+ href: pull.html_url,
90
+ target: "_blank",
91
+ rel: "noopener noreferrer",
92
+ className: "flex items-start gap-2 px-2 py-1 rounded-sm hover:bg-hover-surface",
93
+ children: [/* @__PURE__ */ jsx("img", {
94
+ src: pull.user.avatar_url,
95
+ alt: "",
96
+ className: "w-6 h-6 rounded-full shrink-0 mt-0.5"
97
+ }), /* @__PURE__ */ jsxs("div", {
98
+ className: "flex flex-col min-w-0 flex-1",
99
+ children: [/* @__PURE__ */ jsx("span", {
100
+ className: "text-sm truncate",
101
+ children: pull.title
102
+ }), /* @__PURE__ */ jsxs("span", {
103
+ className: "text-xs text-description truncate",
104
+ children: [
105
+ "#",
106
+ pull.number,
107
+ " · ",
108
+ pull.user.login,
109
+ " · ",
110
+ pull.merged_at ? formatRelative(pull.merged_at) : ""
111
+ ]
112
+ })]
113
+ })]
114
+ }) });
115
+ var Content = () => {
116
+ const { pulls } = useComponentContext();
117
+ return /* @__PURE__ */ jsx(ScrollArea.Root, {
118
+ orientation: "vertical",
119
+ children: /* @__PURE__ */ jsx(ScrollArea.Viewport, { children: /* @__PURE__ */ jsx("ul", {
120
+ className: "flex flex-col p-1",
121
+ children: pulls.map((pull) => /* @__PURE__ */ jsx(PullRow, { pull }, pull.number))
122
+ }) })
123
+ });
124
+ };
125
+ var StatusBar = () => {
126
+ const { t } = useTranslation(meta.profile.key);
127
+ const { repo } = useComponentContext();
128
+ return /* @__PURE__ */ jsx(IconButton, {
129
+ icon: "ph--github-logo--regular",
130
+ label: t("view-on-github.button"),
131
+ variant: "primary",
132
+ classNames: "w-full",
133
+ onClick: () => {
134
+ window.open(`https://github.com/${repo}`, "_blank", "noopener,noreferrer");
135
+ }
136
+ });
137
+ };
138
+ var GithubComponent = {
139
+ Root,
140
+ Header,
141
+ Content,
142
+ StatusBar
143
+ };
144
+ //#endregion
145
+ //#region src/containers/GithubPanel/GithubPanel.tsx
146
+ var GithubPanel = () => /* @__PURE__ */ jsx(GithubComponent.Root, { children: /* @__PURE__ */ jsxs("div", {
147
+ className: "h-full grid grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden h-full w-full",
148
+ children: [
149
+ /* @__PURE__ */ jsx(GithubComponent.Header, {}),
150
+ /* @__PURE__ */ jsx(GithubComponent.Content, {}),
151
+ /* @__PURE__ */ jsx(GithubComponent.StatusBar, {})
152
+ ]
153
+ }) });
154
+ GithubPanel.displayName = "GithubPanel";
155
+ //#endregion
156
+ export { GithubPanel as default };
157
+
158
+ //# sourceMappingURL=chunk-GithubPanel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-GithubPanel.mjs","names":[],"sources":["../../src/containers/GithubPanel/GithubComponent.tsx","../../src/containers/GithubPanel/GithubPanel.tsx"],"sourcesContent":["//\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 dx-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","//\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 w-full'>\n <GithubComponent.Header />\n <GithubComponent.Content />\n <GithubComponent.StatusBar />\n </div>\n </GithubComponent.Root>\n);\n\nGithubP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chbar } from "@dxos/devtools";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Entity, Format, Obj, Type } from "@dxos/echo";
5
+ import { Panel, Toolbar } from "@dxos/react-ui";
6
+ import { Operation } from "@dxos/compute";
7
+ import { useClient } from "@dxos/react-client";
8
+ import { DynamicTable } from "@dxos/react-ui-table";
9
+ import { mx } from "@dxos/ui-theme";
10
+ //#region src/containers/RegistryPanel/RegistryPanel.tsx
11
+ var textFilter = (text) => {
12
+ if (!text) return () => true;
13
+ const matcher = new RegExp(text, "i");
14
+ return (entity) => {
15
+ return [
16
+ Entity.getTypename(entity) ?? "",
17
+ Obj.isObject(entity) ? Obj.getMeta(entity).key ?? "" : "",
18
+ Type.isType(entity) ? Type.getURI(entity)?.toString() ?? "" : "",
19
+ Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity) ? Operation.getKey(entity) ?? "" : "",
20
+ Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity) ? entity.name : "",
21
+ getEntityId(entity)
22
+ ].some((value) => value.match(matcher));
23
+ };
24
+ };
25
+ var getEntityId = (entity) => {
26
+ if (entity.id) return entity.id;
27
+ if (Type.isType(entity)) return Type.getURI(entity)?.toString() ?? Type.getTypename(entity) ?? "unknown-type";
28
+ return Entity.getTypename(entity) ?? "unknown";
29
+ };
30
+ var getKind = (entity) => {
31
+ if (Type.isType(entity)) return "type";
32
+ if (Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity)) return "operation";
33
+ return "other";
34
+ };
35
+ var getLabel = (entity) => {
36
+ if (Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity)) return entity.name || Operation.getKey(entity) || getEntityId(entity);
37
+ if (Type.isType(entity)) return Type.getTypename(entity) ?? getEntityId(entity);
38
+ return getEntityId(entity);
39
+ };
40
+ var toDetailJson = (entity) => {
41
+ if (Type.isType(entity)) return {
42
+ id: getEntityId(entity),
43
+ typename: Type.getTypename(entity),
44
+ uri: Type.getURI(entity)?.toString(),
45
+ version: Type.getVersion(entity),
46
+ jsonSchema: entity.jsonSchema
47
+ };
48
+ if (Obj.isObject(entity)) return Obj.toJSON(entity);
49
+ return {
50
+ id: getEntityId(entity),
51
+ typename: Entity.getTypename(entity)
52
+ };
53
+ };
54
+ var RegistryPanel = () => {
55
+ const client = useClient();
56
+ const [entities, setEntities] = useState([]);
57
+ const [filter, setFilter] = useState("");
58
+ const [selected, setSelected] = useState();
59
+ useEffect(() => {
60
+ const registry = client.graph.registry;
61
+ const refresh = () => setEntities([...registry.list()]);
62
+ refresh();
63
+ return registry.changed.on(refresh);
64
+ }, [client]);
65
+ const properties = useMemo(() => [
66
+ {
67
+ name: "kind",
68
+ format: Format.TypeFormat.String,
69
+ size: 100
70
+ },
71
+ {
72
+ name: "label",
73
+ format: Format.TypeFormat.String
74
+ },
75
+ {
76
+ name: "id",
77
+ format: Format.TypeFormat.String,
78
+ size: 280
79
+ }
80
+ ], []);
81
+ const rows = useMemo(() => {
82
+ return entities.filter(textFilter(filter)).map((entity) => ({
83
+ id: getEntityId(entity),
84
+ kind: getKind(entity),
85
+ label: getLabel(entity),
86
+ _entity: entity
87
+ })).toSorted((left, right) => left.label.localeCompare(right.label));
88
+ }, [entities, filter]);
89
+ const handleRowClicked = useCallback((row) => {
90
+ if (!row?._entity) return;
91
+ setSelected(row._entity);
92
+ }, []);
93
+ const detailJson = useMemo(() => selected ? toDetailJson(selected) : void 0, [selected]);
94
+ const features = useMemo(() => ({ selection: {
95
+ enabled: true,
96
+ mode: "single"
97
+ } }), []);
98
+ return /* @__PURE__ */ jsxs(Panel.Root, { children: [/* @__PURE__ */ jsx(Panel.Toolbar, {
99
+ asChild: true,
100
+ children: /* @__PURE__ */ jsx(Toolbar.Root, { children: /* @__PURE__ */ jsx(Searchbar, {
101
+ placeholder: "Filter...",
102
+ onChange: setFilter
103
+ }) })
104
+ }), /* @__PURE__ */ jsx(Panel.Content, { children: /* @__PURE__ */ jsxs("div", {
105
+ className: mx("h-full grid grid-cols-[2fr_1fr] overflow-hidden"),
106
+ children: [/* @__PURE__ */ jsx("div", {
107
+ className: mx("flex flex-col min-h-0 overflow-hidden"),
108
+ children: /* @__PURE__ */ jsx(DynamicTable, {
109
+ properties,
110
+ rows,
111
+ features,
112
+ onRowClick: handleRowClicked
113
+ })
114
+ }), /* @__PURE__ */ jsx("div", {
115
+ className: mx("min-h-0 h-full overflow-auto border-s border-separator text-sm"),
116
+ children: detailJson ? /* @__PURE__ */ jsx(JsonView, { data: detailJson }) : /* @__PURE__ */ jsx(Placeholder, { label: "Details" })
117
+ })]
118
+ }) })] });
119
+ };
120
+ RegistryPanel.displayName = "RegistryPanel";
121
+ //#endregion
122
+ export { RegistryPanel, RegistryPanel as default };
123
+
124
+ //# sourceMappingURL=chunk-RegistryPanel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-RegistryPanel.mjs","names":[],"sources":["../../src/containers/RegistryPanel/RegistryPanel.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { Operation } from '@dxos/compute';\nimport { JsonView, Placeholder, Searchbar } from '@dxos/devtools';\nimport { Entity, Format, Obj, Type } from '@dxos/echo';\nimport { useClient } from '@dxos/react-client';\nimport { Panel, Toolbar } from '@dxos/react-ui';\nimport { DynamicTable, type TableFeatures } from '@dxos/react-ui-table';\nimport { mx } from '@dxos/ui-theme';\n\ntype RegistryRow = {\n id: string;\n kind: string;\n label: string;\n _entity: Entity.Unknown;\n};\n\nconst textFilter = (text?: string) => {\n if (!text) {\n return () => true;\n }\n\n const matcher = new RegExp(text, 'i');\n return (entity: Entity.Unknown) => {\n const typename = Entity.getTypename(entity) ?? '';\n const metaKey = Obj.isObject(entity) ? (Obj.getMeta(entity).key ?? '') : '';\n const uri = Type.isType(entity) ? (Type.getURI(entity)?.toString() ?? '') : '';\n const operationKey =\n Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity)\n ? (Operation.getKey(entity) ?? '')\n : '';\n const name = Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity) ? entity.name : '';\n return [typename, metaKey, uri, operationKey, name, getEntityId(entity)].some((value) => value.match(matcher));\n };\n};\n\nconst getEntityId = (entity: Entity.Unknown): string => {\n if (entity.id) {\n return entity.id;\n }\n if (Type.isType(entity)) {\n return Type.getURI(entity)?.toString() ?? Type.getTypename(entity) ?? 'unknown-type';\n }\n return Entity.getTypename(entity) ?? 'unknown';\n};\n\nconst getKind = (entity: Entity.Unknown): string => {\n if (Type.isType(entity)) {\n return 'type';\n }\n if (Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity)) {\n return 'operation';\n }\n return 'other';\n};\n\nconst getLabel = (entity: Entity.Unknown): string => {\n if (Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity)) {\n return entity.name || Operation.getKey(entity) || getEntityId(entity);\n }\n if (Type.isType(entity)) {\n return Type.getTypename(entity) ?? getEntityId(entity);\n }\n return getEntityId(entity);\n};\n\nconst toDetailJson = (entity: Entity.Unknown): object => {\n if (Type.isType(entity)) {\n return {\n id: getEntityId(entity),\n typename: Type.getTypename(entity),\n uri: Type.getURI(entity)?.toString(),\n version: Type.getVersion(entity),\n jsonSchema: entity.jsonSchema,\n };\n }\n if (Obj.isObject(entity)) {\n return Obj.toJSON(entity);\n }\n return { id: getEntityId(entity), typename: Entity.getTypename(entity) };\n};\n\nexport const RegistryPanel = () => {\n const client = useClient();\n const [entities, setEntities] = useState<Entity.Unknown[]>([]);\n const [filter, setFilter] = useState('');\n const [selected, setSelected] = useState<Entity.Unknown>();\n\n useEffect(() => {\n const registry = client.graph.registry;\n const refresh = () => setEntities([...registry.list()]);\n refresh();\n return registry.changed.on(refresh);\n }, [client]);\n\n const properties = useMemo(\n () => [\n { name: 'kind', format: Format.TypeFormat.String, size: 100 },\n { name: 'label', format: Format.TypeFormat.String },\n { name: 'id', format: Format.TypeFormat.String, size: 280 },\n ],\n [],\n );\n\n const rows = useMemo((): RegistryRow[] => {\n return entities\n .filter(textFilter(filter))\n .map((entity) => ({\n id: getEntityId(entity),\n kind: getKind(entity),\n label: getLabel(entity),\n _entity: entity,\n }))\n .toSorted((left, right) => left.label.localeCompare(right.label));\n }, [entities, filter]);\n\n const handleRowClicked = useCallback((row: RegistryRow | undefined) => {\n if (!row?._entity) {\n return;\n }\n setSelected(row._entity);\n }, []);\n\n const detailJson = useMemo(() => (selected ? toDetailJson(selected) : undefined), [selected]);\n\n const features: Partial<TableFeatures> = useMemo(() => ({ selection: { enabled: true, mode: 'single' } }), []);\n\n return (\n <Panel.Root>\n <Panel.Toolbar asChild>\n <Toolbar.Root>\n <Searchbar placeholder='Filter...' onChange={setFilter} />\n </Toolbar.Root>\n </Panel.Toolbar>\n <Panel.Content>\n <div className={mx('h-full grid grid-cols-[2fr_1fr] overflow-hidden')}>\n <div className={mx('flex flex-col min-h-0 overflow-hidden')}>\n <DynamicTable properties={properties} rows={rows} features={features} onRowClick={handleRowClicked} />\n </div>\n <div className={mx('min-h-0 h-full overflow-auto border-s border-separator text-sm')}>\n {detailJson ? <JsonView data={detailJson} /> : <Placeholder label='Details' />}\n </div>\n </div>\n </Panel.Content>\n </Panel.Root>\n );\n};\n\nRegistryPanel.displayName = 'RegistryPanel';\n"],"mappings":";;;;;;;;;;AAqBA,IAAM,cAAc,SAAkB;CACpC,IAAI,CAAC,MACH,aAAa;CAGf,MAAM,UAAU,IAAI,OAAO,MAAM,GAAG;CACpC,QAAQ,WAA2B;EASjC,OAAO;GARU,OAAO,YAAY,MAAM,KAAK;GAC/B,IAAI,SAAS,MAAM,IAAK,IAAI,QAAQ,MAAM,CAAC,CAAC,OAAO,KAAM;GAC7D,KAAK,OAAO,MAAM,IAAK,KAAK,OAAO,MAAM,CAAC,EAAE,SAAS,KAAK,KAAM;GAE1E,IAAI,SAAS,MAAM,KAAK,IAAI,WAAW,UAAU,qBAAqB,MAAM,IACvE,UAAU,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