@dxos/plugin-registry 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6

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 (136) hide show
  1. package/dist/lib/browser/cli/index.mjs +15 -19
  2. package/dist/lib/browser/cli/index.mjs.map +3 -3
  3. package/dist/lib/browser/index.mjs +50 -41
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/node-esm/cli/index.mjs +15 -18
  7. package/dist/lib/node-esm/cli/index.mjs.map +3 -3
  8. package/dist/lib/node-esm/index.mjs +51 -41
  9. package/dist/lib/node-esm/index.mjs.map +4 -4
  10. package/dist/lib/node-esm/meta.json +1 -1
  11. package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
  12. package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
  13. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  14. package/dist/types/src/capabilities/index.d.ts +5 -3
  15. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  16. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  17. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  18. package/dist/types/src/capabilities/react-surface.d.ts +5 -0
  19. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  20. package/dist/types/src/cli/commands/disable.d.ts +2 -2
  21. package/dist/types/src/cli/commands/enable.d.ts +2 -2
  22. package/dist/types/src/cli/plugin.d.ts.map +1 -1
  23. package/dist/types/src/cli/storage.d.ts +4 -4
  24. package/dist/types/src/cli/storage.d.ts.map +1 -1
  25. package/dist/types/src/components/PluginDetail/PluginDetail.d.ts +15 -0
  26. package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -0
  27. package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +43 -0
  28. package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts.map +1 -0
  29. package/dist/types/src/components/PluginDetail/index.d.ts +2 -0
  30. package/dist/types/src/components/PluginDetail/index.d.ts.map +1 -0
  31. package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -0
  32. package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -0
  33. package/dist/types/src/components/PluginList/PluginList.stories.d.ts +38 -0
  34. package/dist/types/src/components/PluginList/PluginList.stories.d.ts.map +1 -0
  35. package/dist/types/src/components/PluginList/index.d.ts +2 -0
  36. package/dist/types/src/components/PluginList/index.d.ts.map +1 -0
  37. package/dist/types/src/components/index.d.ts +0 -1
  38. package/dist/types/src/components/index.d.ts.map +1 -1
  39. package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts +4 -0
  40. package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts.map +1 -0
  41. package/dist/types/src/containers/LoadPluginDialog/index.d.ts +3 -0
  42. package/dist/types/src/containers/LoadPluginDialog/index.d.ts.map +1 -0
  43. package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts +7 -0
  44. package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts.map +1 -0
  45. package/dist/types/src/containers/PluginArticle/index.d.ts +3 -0
  46. package/dist/types/src/containers/PluginArticle/index.d.ts.map +1 -0
  47. package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts +14 -0
  48. package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts.map +1 -0
  49. package/dist/types/src/containers/PluginRegistry/index.d.ts +3 -0
  50. package/dist/types/src/containers/PluginRegistry/index.d.ts.map +1 -0
  51. package/dist/types/src/containers/index.d.ts +6 -0
  52. package/dist/types/src/containers/index.d.ts.map +1 -0
  53. package/dist/types/src/meta.d.ts +5 -1
  54. package/dist/types/src/meta.d.ts.map +1 -1
  55. package/dist/types/src/operations/index.d.ts +3 -0
  56. package/dist/types/src/operations/index.d.ts.map +1 -0
  57. package/dist/types/src/operations/open-plugin-registry.d.ts +5 -0
  58. package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -0
  59. package/dist/types/src/translations.d.ts +19 -15
  60. package/dist/types/src/translations.d.ts.map +1 -1
  61. package/dist/types/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +41 -31
  63. package/src/RegistryPlugin.tsx +9 -7
  64. package/src/capabilities/app-graph-builder.ts +148 -0
  65. package/src/capabilities/index.ts +9 -3
  66. package/src/capabilities/operation-handler.ts +16 -0
  67. package/src/capabilities/react-surface.tsx +94 -0
  68. package/src/cli/plugin.ts +4 -3
  69. package/src/cli/storage.ts +14 -21
  70. package/src/components/{PluginDetail.stories.tsx → PluginDetail/PluginDetail.stories.tsx} +4 -3
  71. package/src/components/PluginDetail/PluginDetail.tsx +84 -0
  72. package/src/components/PluginDetail/index.ts +5 -0
  73. package/src/components/{PluginItem.tsx → PluginList/PluginItem.tsx} +16 -12
  74. package/src/components/{PluginList.stories.tsx → PluginList/PluginList.stories.tsx} +17 -7
  75. package/src/components/PluginList/index.ts +5 -0
  76. package/src/components/index.ts +0 -1
  77. package/src/containers/LoadPluginDialog/LoadPluginDialog.tsx +84 -0
  78. package/src/containers/LoadPluginDialog/index.ts +7 -0
  79. package/src/containers/PluginArticle/PluginArticle.tsx +28 -0
  80. package/src/containers/PluginArticle/index.ts +7 -0
  81. package/src/containers/PluginRegistry/PluginRegistry.tsx +94 -0
  82. package/src/containers/PluginRegistry/index.ts +7 -0
  83. package/src/containers/index.ts +10 -0
  84. package/src/meta.ts +12 -5
  85. package/src/operations/index.ts +7 -0
  86. package/src/operations/open-plugin-registry.ts +21 -0
  87. package/src/translations.ts +19 -15
  88. package/dist/lib/browser/app-graph-builder-P3ZGGFAR.mjs +0 -166
  89. package/dist/lib/browser/app-graph-builder-P3ZGGFAR.mjs.map +0 -7
  90. package/dist/lib/browser/chunk-VOAOTNGS.mjs +0 -19
  91. package/dist/lib/browser/chunk-VOAOTNGS.mjs.map +0 -7
  92. package/dist/lib/browser/operation-resolver-P5PKLPRT.mjs +0 -24
  93. package/dist/lib/browser/operation-resolver-P5PKLPRT.mjs.map +0 -7
  94. package/dist/lib/browser/react-surface-IIM6T7IA.mjs +0 -337
  95. package/dist/lib/browser/react-surface-IIM6T7IA.mjs.map +0 -7
  96. package/dist/lib/node-esm/app-graph-builder-56JXLOGZ.mjs +0 -167
  97. package/dist/lib/node-esm/app-graph-builder-56JXLOGZ.mjs.map +0 -7
  98. package/dist/lib/node-esm/chunk-SALMIZ2W.mjs +0 -21
  99. package/dist/lib/node-esm/chunk-SALMIZ2W.mjs.map +0 -7
  100. package/dist/lib/node-esm/operation-resolver-3ZB5W3T3.mjs +0 -25
  101. package/dist/lib/node-esm/operation-resolver-3ZB5W3T3.mjs.map +0 -7
  102. package/dist/lib/node-esm/react-surface-F67P7RC3.mjs +0 -338
  103. package/dist/lib/node-esm/react-surface-F67P7RC3.mjs.map +0 -7
  104. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
  105. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  106. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  107. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  108. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  109. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  110. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  111. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  112. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  113. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  114. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
  115. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  116. package/dist/types/src/components/PluginDetail.d.ts +0 -9
  117. package/dist/types/src/components/PluginDetail.d.ts.map +0 -1
  118. package/dist/types/src/components/PluginDetail.stories.d.ts +0 -32
  119. package/dist/types/src/components/PluginDetail.stories.d.ts.map +0 -1
  120. package/dist/types/src/components/PluginItem.d.ts.map +0 -1
  121. package/dist/types/src/components/PluginList.d.ts.map +0 -1
  122. package/dist/types/src/components/PluginList.stories.d.ts +0 -34
  123. package/dist/types/src/components/PluginList.stories.d.ts.map +0 -1
  124. package/dist/types/src/components/RegistryContainer.d.ts +0 -8
  125. package/dist/types/src/components/RegistryContainer.d.ts.map +0 -1
  126. package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -136
  127. package/src/capabilities/app-graph-builder/index.ts +0 -7
  128. package/src/capabilities/operation-resolver/index.ts +0 -7
  129. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -23
  130. package/src/capabilities/react-surface/index.ts +0 -7
  131. package/src/capabilities/react-surface/react-surface.tsx +0 -99
  132. package/src/components/PluginDetail.tsx +0 -79
  133. package/src/components/RegistryContainer.tsx +0 -83
  134. /package/dist/types/src/components/{PluginItem.d.ts → PluginList/PluginItem.d.ts} +0 -0
  135. /package/dist/types/src/components/{PluginList.d.ts → PluginList/PluginList.d.ts} +0 -0
  136. /package/src/components/{PluginList.tsx → PluginList/PluginList.tsx} +0 -0
@@ -1,9 +1,7 @@
1
- import {
2
- meta
3
- } from "../chunk-VOAOTNGS.mjs";
4
-
5
1
  // src/cli/plugin.ts
6
- import { Common, Plugin as Plugin4 } from "@dxos/app-framework";
2
+ import { Plugin as Plugin4 } from "@dxos/app-framework";
3
+ import { AppPlugin } from "@dxos/app-toolkit";
4
+ import { meta } from "#meta";
7
5
 
8
6
  // src/cli/commands/index.ts
9
7
  import * as Command4 from "@effect/cli/Command";
@@ -22,29 +20,27 @@ import * as FileSystem from "@effect/platform/FileSystem";
22
20
  import * as Path from "@effect/platform/Path";
23
21
  import * as Effect from "effect/Effect";
24
22
  import * as Schema from "effect/Schema";
25
- import { DX_CONFIG, getProfilePath } from "@dxos/client-protocol";
26
- var PLUGINS_FILE = "plugins.json";
23
+ import * as Yaml from "yaml";
24
+ import { DX_CONFIG } from "@dxos/client-protocol";
27
25
  var PluginsSchema = Schema.Array(Schema.String);
28
- var getPluginsPath = (profile) => Effect.gen(function* () {
29
- const path = yield* Path.Path;
30
- return path.join(getProfilePath(DX_CONFIG, profile), PLUGINS_FILE);
31
- });
26
+ var getPluginsConfigPath = (profile) => `${DX_CONFIG}/plugins/${profile}.yml`;
32
27
  var loadEnabledPlugins = Effect.fn(function* ({ profile }) {
33
28
  const fs = yield* FileSystem.FileSystem;
34
- const pluginsPath = yield* getPluginsPath(profile);
29
+ const pluginsPath = getPluginsConfigPath(profile);
35
30
  const content = yield* fs.readFileString(pluginsPath).pipe(Effect.catchTag("SystemError", () => Effect.succeed("[]")));
36
- const parsed = yield* Schema.decodeUnknown(Schema.parseJson(PluginsSchema))(content).pipe(Effect.catchAll(() => Effect.succeed([])));
31
+ const raw = Yaml.parse(content);
32
+ const parsed = yield* Schema.decodeUnknown(PluginsSchema)(raw ?? []).pipe(Effect.catchAll(() => Effect.succeed([])));
37
33
  return parsed;
38
34
  });
39
35
  var saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }) {
40
36
  const fs = yield* FileSystem.FileSystem;
41
- const pluginsPath = yield* getPluginsPath(profile);
42
- const profileDir = getProfilePath(DX_CONFIG, profile);
43
- yield* fs.makeDirectory(profileDir, {
37
+ const path = yield* Path.Path;
38
+ const pluginsPath = getPluginsConfigPath(profile);
39
+ yield* fs.makeDirectory(path.dirname(pluginsPath), {
44
40
  recursive: true
45
41
  });
46
- const encoded = Schema.encodeSync(Schema.parseJson(PluginsSchema))(enabled);
47
- yield* fs.writeFileString(pluginsPath, encoded + "\n");
42
+ const encoded = Yaml.stringify(enabled);
43
+ yield* fs.writeFileString(pluginsPath, encoded);
48
44
  });
49
45
 
50
46
  // src/cli/commands/disable.ts
@@ -210,7 +206,7 @@ var plugin = Command4.make("plugin").pipe(Command4.withDescription("Manage plugi
210
206
  ]));
211
207
 
212
208
  // src/cli/plugin.ts
213
- var RegistryPlugin = Plugin4.define(meta).pipe(Common.Plugin.addCommandModule({
209
+ var RegistryPlugin = Plugin4.define(meta).pipe(AppPlugin.addCommandModule({
214
210
  commands: [
215
211
  plugin
216
212
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/plugin.ts", "../../../../src/cli/commands/index.ts", "../../../../src/cli/commands/disable.ts", "../../../../src/cli/storage.ts", "../../../../src/cli/commands/enable.ts", "../../../../src/cli/commands/list.ts", "../../../../src/cli/commands/util.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Common, Plugin } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nimport { plugin } from './commands';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n Common.Plugin.addCommandModule({\n commands: [plugin],\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { disable } from './disable';\nimport { enable } from './enable';\nimport { list } from './list';\n\nexport const plugin: Command.Command<any, any, any, any> = Command.make('plugin').pipe(\n Command.withDescription('Manage plugins.'),\n Command.withSubcommands([enable, disable, list]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const core = manager.getCore();\n invariant(!core.includes(id), `Cannot disable core plugin: ${id}`);\n\n const disabled = yield* manager.disable(id);\n invariant(disabled, `Failed to disable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: false }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" disabled.`);\n }\n});\n\nexport const disable = Command.make(\n 'disable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to disable.')),\n },\n handler,\n).pipe(Command.withDescription('Disable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { DX_CONFIG, getProfilePath } from '@dxos/client-protocol';\n\n// TODO(wittjosiah): Factor out to app-framework?\n\nconst PLUGINS_FILE = 'plugins.json';\n\nconst PluginsSchema = Schema.Array(Schema.String);\n\n/**\n * Get the path to the plugins configuration file for a profile.\n */\nconst getPluginsPath = (profile: string): Effect.Effect<string, never, Path.Path> =>\n Effect.gen(function* () {\n const path = yield* Path.Path;\n return path.join(getProfilePath(DX_CONFIG, profile), PLUGINS_FILE);\n });\n\n/**\n * Load enabled plugins from profile storage.\n * Returns the list of enabled plugin IDs, or an empty array if the file doesn't exist.\n */\nexport const loadEnabledPlugins = Effect.fn(function* ({ profile }: { profile: string }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = yield* getPluginsPath(profile);\n\n const content = yield* fs\n .readFileString(pluginsPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('[]')));\n\n const parsed = yield* Schema.decodeUnknown(Schema.parseJson(PluginsSchema))(content).pipe(\n Effect.catchAll(() => Effect.succeed([] as string[])),\n );\n\n return parsed;\n});\n\n/**\n * Save enabled plugins to profile storage.\n */\nexport const saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }: { profile: string; enabled: string[] }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = yield* getPluginsPath(profile);\n const profileDir = getProfilePath(DX_CONFIG, profile);\n\n yield* fs.makeDirectory(profileDir, { recursive: true });\n const encoded = Schema.encodeSync(Schema.parseJson(PluginsSchema))(enabled);\n yield* fs.writeFileString(pluginsPath, encoded + '\\n');\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const enabled = yield* manager.enable(id);\n invariant(enabled, `Failed to enable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: true }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" enabled.`);\n }\n});\n\nexport const enable = Command.make(\n 'enable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to enable.')),\n },\n handler,\n).pipe(Command.withDescription('Enable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig, printList } from '@dxos/cli-util';\n\nimport { type FormattedPlugin, printPlugin } from './util';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const enabled = manager.getEnabled();\n const core = manager.getCore();\n\n const formattedPlugins: FormattedPlugin[] = plugins.map((plugin: Plugin.Plugin) => {\n const isEnabled = enabled.includes(plugin.meta.id);\n const isCore = core.includes(plugin.meta.id);\n return {\n id: plugin.meta.id,\n name: plugin.meta.name ?? plugin.meta.id,\n enabled: isEnabled,\n core: isCore,\n };\n });\n\n if (json) {\n yield* Console.log(JSON.stringify(formattedPlugins, null, 2));\n } else {\n const formatted = formattedPlugins.map(printPlugin);\n yield* Console.log(printList(formatted));\n }\n});\n\nexport const list = Command.make('list', {}, handler).pipe(Command.withDescription('List all available plugins.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FormBuilder } from '@dxos/cli-util';\n\nexport type FormattedPlugin = {\n id: string;\n name: string;\n enabled: boolean;\n core: boolean;\n};\n\n/**\n * Pretty prints a plugin with ANSI colors.\n */\nexport const printPlugin = (plugin: FormattedPlugin) => {\n const status = plugin.core ? 'core' : plugin.enabled ? 'enabled' : 'disabled';\n return FormBuilder.make({ title: plugin.name }).pipe(\n FormBuilder.set('id', plugin.id),\n FormBuilder.set('status', status),\n FormBuilder.build,\n );\n};\n"],
5
- "mappings": ";;;;;AAIA,SAASA,QAAQC,UAAAA,eAAc;;;ACA/B,YAAYC,cAAa;;;ACAzB,YAAYC,UAAU;AACtB,YAAYC,aAAa;AACzB,YAAYC,aAAa;AACzB,YAAYC,aAAY;AAExB,SAASC,cAAc;AACvB,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;;;ACP1B,YAAYC,gBAAgB;AAC5B,YAAYC,UAAU;AACtB,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,WAAWC,sBAAsB;AAI1C,IAAMC,eAAe;AAErB,IAAMC,gBAAuBC,aAAaC,aAAM;AAKhD,IAAMC,iBAAiB,CAACC,YACfC,WAAI,aAAA;AACT,QAAMC,OAAO,OAAYC;AACzB,SAAOD,KAAKE,KAAKC,eAAeC,WAAWN,OAAAA,GAAUL,YAAA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KAAKG,QAAQN,QAAOG,KAAKC;MACtCV,SAASO;MACTL,MAAMS;IACR;EACF,CAAA;AAEA,MAAIlB,MAAM;AACR,WAAeoB,aAAIC,KAAKC,UAAUX,kBAAkB,MAAM,CAAA,CAAA;EAC5D,OAAO;AACL,UAAMY,YAAYZ,iBAAiBC,IAAIY,WAAAA;AACvC,WAAeJ,aAAIK,UAAUF,SAAAA,CAAAA;EAC/B;AACF,CAAA;AAEO,IAAMG,OAAeC,cAAK,QAAQ,CAAC,GAAG7B,QAAAA,EAAS8B,KAAaC,yBAAgB,6BAAA,CAAA;;;AJ9B5E,IAAMC,SAAsDC,cAAK,QAAA,EAAUC,KACxEC,yBAAgB,iBAAA,GAChBC,yBAAgB;EAACC;EAAQC;EAASC;CAAK,CAAA;;;ADF1C,IAAMC,iBAAiBC,QAAOC,OAAOC,IAAAA,EAAMC,KAChDC,OAAOJ,OAAOK,iBAAiB;EAC7BC,UAAU;IAACC;;AACb,CAAA,GACAP,QAAOQ,IAAI;",
6
- "names": ["Common", "Plugin", "Command", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "FileSystem", "Path", "Effect", "Schema", "DX_CONFIG", "getProfilePath", "PLUGINS_FILE", "PluginsSchema", "Array", "String", "getPluginsPath", "profile", "gen", "path", "Path", "join", "getProfilePath", "DX_CONFIG", "loadEnabledPlugins", "fn", "fs", "FileSystem", "pluginsPath", "content", "readFileString", "pipe", "catchTag", "succeed", "parsed", "decodeUnknown", "parseJson", "catchAll", "saveEnabledPlugins", "enabled", "profileDir", "makeDirectory", "recursive", "encoded", "encodeSync", "writeFileString", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "core", "getCore", "includes", "disabled", "disable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "enabled", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "enabled", "enable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Command", "Console", "Effect", "Plugin", "CommandConfig", "printList", "FormBuilder", "printPlugin", "plugin", "status", "core", "enabled", "FormBuilder", "make", "title", "name", "pipe", "set", "id", "build", "handler", "fn", "json", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "enabled", "getEnabled", "core", "getCore", "formattedPlugins", "map", "plugin", "isEnabled", "includes", "meta", "id", "isCore", "name", "log", "JSON", "stringify", "formatted", "printPlugin", "printList", "list", "make", "pipe", "withDescription", "plugin", "make", "pipe", "withDescription", "withSubcommands", "enable", "disable", "list", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "Common", "addCommandModule", "commands", "plugin", "make"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nimport { plugin } from './commands';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCommandModule({\n commands: [plugin],\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { disable } from './disable';\nimport { enable } from './enable';\nimport { list } from './list';\n\nexport const plugin: Command.Command<any, any, any, any> = Command.make('plugin').pipe(\n Command.withDescription('Manage plugins.'),\n Command.withSubcommands([enable, disable, list]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const core = manager.getCore();\n invariant(!core.includes(id), `Cannot disable core plugin: ${id}`);\n\n const disabled = yield* manager.disable(id);\n invariant(disabled, `Failed to disable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: false }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" disabled.`);\n }\n});\n\nexport const disable = Command.make(\n 'disable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to disable.')),\n },\n handler,\n).pipe(Command.withDescription('Disable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\nimport * as Yaml from 'yaml';\n\nimport { DX_CONFIG } from '@dxos/client-protocol';\n\n// TODO(wittjosiah): Factor out to app-framework?\n\nconst PluginsSchema = Schema.Array(Schema.String);\n\n/** CLI-only: path to plugins/<profile>.yml (sibling to profile/). */\nconst getPluginsConfigPath = (profile: string) => `${DX_CONFIG}/plugins/${profile}.yml`;\n\n/**\n * Load enabled plugins from plugins/<profile>.yml (sibling to profile/).\n * Returns the list of enabled plugin IDs, or an empty array if the file doesn't exist.\n */\nexport const loadEnabledPlugins = Effect.fn(function* ({ profile }: { profile: string }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = getPluginsConfigPath(profile);\n\n const content = yield* fs\n .readFileString(pluginsPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('[]')));\n\n const raw = Yaml.parse(content);\n const parsed = yield* Schema.decodeUnknown(PluginsSchema)(raw ?? []).pipe(\n Effect.catchAll(() => Effect.succeed([] as string[])),\n );\n\n return parsed;\n});\n\n/**\n * Save enabled plugins to plugins/<profile>.yml.\n */\nexport const saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }: { profile: string; enabled: string[] }) {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const pluginsPath = getPluginsConfigPath(profile);\n yield* fs.makeDirectory(path.dirname(pluginsPath), { recursive: true });\n const encoded = Yaml.stringify(enabled);\n yield* fs.writeFileString(pluginsPath, encoded);\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const enabled = yield* manager.enable(id);\n invariant(enabled, `Failed to enable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: true }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" enabled.`);\n }\n});\n\nexport const enable = Command.make(\n 'enable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to enable.')),\n },\n handler,\n).pipe(Command.withDescription('Enable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig, printList } from '@dxos/cli-util';\n\nimport { type FormattedPlugin, printPlugin } from './util';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const enabled = manager.getEnabled();\n const core = manager.getCore();\n\n const formattedPlugins: FormattedPlugin[] = plugins.map((plugin: Plugin.Plugin) => {\n const isEnabled = enabled.includes(plugin.meta.id);\n const isCore = core.includes(plugin.meta.id);\n return {\n id: plugin.meta.id,\n name: plugin.meta.name ?? plugin.meta.id,\n enabled: isEnabled,\n core: isCore,\n };\n });\n\n if (json) {\n yield* Console.log(JSON.stringify(formattedPlugins, null, 2));\n } else {\n const formatted = formattedPlugins.map(printPlugin);\n yield* Console.log(printList(formatted));\n }\n});\n\nexport const list = Command.make('list', {}, handler).pipe(Command.withDescription('List all available plugins.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FormBuilder } from '@dxos/cli-util';\n\nexport type FormattedPlugin = {\n id: string;\n name: string;\n enabled: boolean;\n core: boolean;\n};\n\n/**\n * Pretty prints a plugin with ANSI colors.\n */\nexport const printPlugin = (plugin: FormattedPlugin) => {\n const status = plugin.core ? 'core' : plugin.enabled ? 'enabled' : 'disabled';\n return FormBuilder.make({ title: plugin.name }).pipe(\n FormBuilder.set('id', plugin.id),\n FormBuilder.set('status', status),\n FormBuilder.build,\n );\n};\n"],
5
+ "mappings": ";AAIA,SAASA,UAAAA,eAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,YAAY;;;ACHrB,YAAYC,cAAa;;;ACAzB,YAAYC,UAAU;AACtB,YAAYC,aAAa;AACzB,YAAYC,aAAa;AACzB,YAAYC,aAAY;AAExB,SAASC,cAAc;AACvB,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;;;ACP1B,YAAYC,gBAAgB;AAC5B,YA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AAMC,YAAYP,QAAQQ,SAASF,QAAOG,KAAKC,EAAE;AACjD,UAAMC,SAAST,KAAKM,SAASF,QAAOG,KAAKC,EAAE;AAC3C,WAAO;MACLA,IAAIJ,QAAOG,KAAKC;MAChBE,MAAMN,QAAOG,KAAKG,QAAQN,QAAOG,KAAKC;MACtCV,SAASO;MACTL,MAAMS;IACR;EACF,CAAA;AAEA,MAAIlB,MAAM;AACR,WAAeoB,aAAIC,KAAKC,UAAUX,kBAAkB,MAAM,CAAA,CAAA;EAC5D,OAAO;AACL,UAAMY,YAAYZ,iBAAiBC,IAAIY,WAAAA;AACvC,WAAeJ,aAAIK,UAAUF,SAAAA,CAAAA;EAC/B;AACF,CAAA;AAEO,IAAMG,OAAeC,cAAK,QAAQ,CAAC,GAAG7B,QAAAA,EAAS8B,KAAaC,yBAAgB,6BAAA,CAAA;;;AJ9B5E,IAAMC,SAAsDC,cAAK,QAAA,EAAUC,KACxEC,yBAAgB,iBAAA,GAChBC,yBAAgB;EAACC;EAAQC;EAASC;CAAK,CAAA;;;ADD1C,IAAMC,iBAAiBC,QAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,iBAAiB;EACzBC,UAAU;IAACC;;AACb,CAAA,GACAP,QAAOQ,IAAI;",
6
+ "names": ["Plugin", "AppPlugin", "meta", "Command", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "FileSystem", "Path", "Effect", "Schema", "Yaml", "DX_CONFIG", "PluginsSchema", "Array", "String", "getPluginsConfigPath", "profile", "DX_CONFIG", "loadEnabledPlugins", "fn", "fs", "FileSystem", "pluginsPath", "content", "readFileString", "pipe", "catchTag", "succeed", "raw", "parse", "parsed", "decodeUnknown", "catchAll", "saveEnabledPlugins", "enabled", "path", "Path", "makeDirectory", "dirname", "recursive", "encoded", "stringify", "writeFileString", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "core", "getCore", "includes", "disabled", "disable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "enabled", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "enabled", "enable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Command", "Console", "Effect", "Plugin", "CommandConfig", "printList", "FormBuilder", "printPlugin", "plugin", "status", "core", "enabled", "FormBuilder", "make", "title", "name", "pipe", "set", "id", "build", "handler", "fn", "json", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "enabled", "getEnabled", "core", "getCore", "formattedPlugins", "map", "plugin", "isEnabled", "includes", "meta", "id", "isCore", "name", "log", "JSON", "stringify", "formatted", "printPlugin", "printList", "list", "make", "pipe", "withDescription", "plugin", "make", "pipe", "withDescription", "withSubcommands", "enable", "disable", "list", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addCommandModule", "commands", "plugin", "make"]
7
7
  }
@@ -1,62 +1,71 @@
1
- import {
2
- REGISTRY_ID,
3
- REGISTRY_KEY,
4
- meta
5
- } from "./chunk-VOAOTNGS.mjs";
1
+ // src/meta.ts
2
+ import { pinnedWorkspaceId } from "@dxos/app-toolkit";
3
+ import { trim } from "@dxos/util";
4
+ var REGISTRY_ID = pinnedWorkspaceId("dxos:plugin-registry");
5
+ var REGISTRY_KEY = "plugin-registry";
6
+ var CATEGORY_SEPARATOR = ">";
7
+ var registryCategoryId = (category) => `${REGISTRY_KEY}${CATEGORY_SEPARATOR}${category}`;
8
+ var getPluginPath = (pluginId) => `root/${REGISTRY_ID}/${pluginId}`;
9
+ var meta = {
10
+ id: "org.dxos.plugin.registry",
11
+ name: "Plugins",
12
+ description: trim`
13
+ Plugin management system for discovering, installing, and configuring workspace extensions.
14
+ Browse available plugins and customize your workspace capabilities.
15
+ `
16
+ };
6
17
 
7
18
  // src/RegistryPlugin.tsx
8
- import { Common, Plugin } from "@dxos/app-framework";
9
-
10
- // src/capabilities/app-graph-builder/index.ts
11
- import { Capability } from "@dxos/app-framework";
12
- var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("./app-graph-builder-P3ZGGFAR.mjs"));
13
-
14
- // src/capabilities/operation-resolver/index.ts
15
- import { Capability as Capability2 } from "@dxos/app-framework";
16
- var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-P5PKLPRT.mjs"));
17
-
18
- // src/capabilities/react-surface/index.ts
19
- import { Capability as Capability3 } from "@dxos/app-framework";
20
- var ReactSurface = Capability3.lazy("ReactSurface", () => import("./react-surface-IIM6T7IA.mjs"));
19
+ import { Plugin } from "@dxos/app-framework";
20
+ import { AppPlugin } from "@dxos/app-toolkit";
21
+ import { meta as meta3 } from "#meta";
21
22
 
22
23
  // src/translations.ts
24
+ import { meta as meta2 } from "#meta";
23
25
  var translations = [
24
26
  {
25
27
  "en-US": {
26
- [meta.id]: {
27
- "plugin name": "Registry",
28
- "details label": "Details",
29
- "home page label": "Website",
30
- "source label": "Source",
31
- "plugin registry label": "Plugin Registry",
32
- "all plugins label": "All",
33
- "installed plugins label": "Enabled",
34
- "recommended plugins label": "Recommended",
35
- "labs plugins label": "Labs",
36
- "community plugins label": "Community",
37
- "load by url label": "Load by URL (soon)",
38
- "coming soon label": "Coming soon!",
39
- "open plugin registry label": "Open plugin registry",
40
- "settings label": "Settings"
28
+ [meta2.id]: {
29
+ "plugin.name": "Registry",
30
+ "details.label": "Details",
31
+ "home-page.label": "Website",
32
+ "source.label": "Source",
33
+ "plugin-registry.label": "Plugin Registry",
34
+ "all-plugins.label": "All",
35
+ "installed-plugins.label": "Enabled",
36
+ "recommended-plugins.label": "Recommended",
37
+ "labs-plugins.label": "Labs",
38
+ "community-plugins.label": "Community",
39
+ "load-by-url.label": "Load from URL",
40
+ "load-by-url-dialog.title": "Load Plugin from URL",
41
+ "plugin-url.label": "Plugin URL",
42
+ "load-plugin.label": "Load Plugin",
43
+ "loading.label": "Loading...",
44
+ "coming-soon.label": "Coming soon!",
45
+ "open-plugin-registry.label": "Open plugin registry",
46
+ "settings.label": "Settings"
41
47
  }
42
48
  }
43
49
  }
44
50
  ];
45
51
 
46
52
  // src/RegistryPlugin.tsx
47
- var RegistryPlugin = Plugin.define(meta).pipe(Common.Plugin.addTranslationsModule({
48
- translations
49
- }), Common.Plugin.addSurfaceModule({
50
- activate: ReactSurface
51
- }), Common.Plugin.addOperationResolverModule({
52
- activate: OperationResolver
53
- }), Common.Plugin.addAppGraphModule({
53
+ import { AppGraphBuilder, OperationHandler, ReactSurface } from "#capabilities";
54
+ var RegistryPlugin = Plugin.define(meta3).pipe(AppPlugin.addAppGraphModule({
54
55
  activate: AppGraphBuilder
56
+ }), AppPlugin.addOperationHandlerModule({
57
+ activate: OperationHandler
58
+ }), AppPlugin.addSurfaceModule({
59
+ activate: ReactSurface
60
+ }), AppPlugin.addTranslationsModule({
61
+ translations
55
62
  }), Plugin.make);
56
63
  export {
57
64
  REGISTRY_ID,
58
65
  REGISTRY_KEY,
59
66
  RegistryPlugin,
60
- meta
67
+ getPluginPath,
68
+ meta,
69
+ registryCategoryId
61
70
  };
62
71
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/RegistryPlugin.tsx", "../../../src/capabilities/app-graph-builder/index.ts", "../../../src/capabilities/operation-resolver/index.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Common, Plugin } from '@dxos/app-framework';\n\nimport { AppGraphBuilder, OperationResolver, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n Common.Plugin.addTranslationsModule({ translations }),\n Common.Plugin.addSurfaceModule({ activate: ReactSurface }),\n Common.Plugin.addOperationResolverModule({ activate: OperationResolver }),\n Common.Plugin.addAppGraphModule({ activate: AppGraphBuilder }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const OperationResolver = Capability.lazy('OperationResolver', () => import('./operation-resolver'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Registry',\n 'details label': 'Details',\n 'home page label': 'Website',\n 'source label': 'Source',\n 'plugin registry label': 'Plugin Registry',\n 'all plugins label': 'All',\n 'installed plugins label': 'Enabled',\n 'recommended plugins label': 'Recommended',\n 'labs plugins label': 'Labs',\n 'community plugins label': 'Community',\n 'load by url label': 'Load by URL (soon)',\n 'coming soon label': 'Coming soon!',\n 'open plugin registry label': 'Open plugin registry',\n 'settings label': 'Settings',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,QAAQC,cAAc;;;ACA/B,SAASC,kBAAkB;AAEpB,IAAMC,kBAAkBC,WAAWC,KAAK,mBAAmB,MAAM,OAAO,kCAAA,CAAA;;;ACF/E,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,oBAAoBC,YAAWC,KAAK,qBAAqB,MAAM,OAAO,mCAAA,CAAA;;;ACFnF,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,eAAeC,YAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACElE,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,iBAAiB;QACjB,mBAAmB;QACnB,gBAAgB;QAChB,yBAAyB;QACzB,qBAAqB;QACrB,2BAA2B;QAC3B,6BAA6B;QAC7B,sBAAsB;QACtB,2BAA2B;QAC3B,qBAAqB;QACrB,qBAAqB;QACrB,8BAA8B;QAC9B,kBAAkB;MACpB;IACF;EACF;;;;AJlBK,IAAMC,iBAAiBC,OAAOC,OAAOC,IAAAA,EAAMC,KAChDC,OAAOJ,OAAOK,sBAAsB;EAAEC;AAAa,CAAA,GACnDF,OAAOJ,OAAOO,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACxDL,OAAOJ,OAAOU,2BAA2B;EAAEF,UAAUG;AAAkB,CAAA,GACvEP,OAAOJ,OAAOY,kBAAkB;EAAEJ,UAAUK;AAAgB,CAAA,GAC5Db,OAAOc,IAAI;",
6
- "names": ["Common", "Plugin", "Capability", "AppGraphBuilder", "Capability", "lazy", "Capability", "OperationResolver", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "translations", "meta", "id", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "Common", "addTranslationsModule", "translations", "addSurfaceModule", "activate", "ReactSurface", "addOperationResolverModule", "OperationResolver", "addAppGraphModule", "AppGraphBuilder", "make"]
3
+ "sources": ["../../../src/meta.ts", "../../../src/RegistryPlugin.tsx", "../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { pinnedWorkspaceId } from '@dxos/app-toolkit';\nimport { trim } from '@dxos/util';\n\nexport const REGISTRY_ID = pinnedWorkspaceId('dxos:plugin-registry');\nexport const REGISTRY_KEY = 'plugin-registry';\n\n// TODO(wittjosiah): Should this be a special separator or use the standard path separator?\nconst CATEGORY_SEPARATOR = '>';\n\n/** Build a registry category node ID. */\nexport const registryCategoryId = (category: string): string => `${REGISTRY_KEY}${CATEGORY_SEPARATOR}${category}`;\n\n/** Qualified graph path to a specific plugin node. */\nexport const getPluginPath = (pluginId: string): string => `root/${REGISTRY_ID}/${pluginId}`;\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.registry',\n name: 'Plugins',\n description: trim`\n Plugin management system for discovering, installing, and configuring workspace extensions.\n Browse available plugins and customize your workspace capabilities.\n `,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\nimport { translations } from './translations';\n\nimport { AppGraphBuilder, OperationHandler, ReactSurface } from '#capabilities';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Registry',\n 'details.label': 'Details',\n 'home-page.label': 'Website',\n 'source.label': 'Source',\n 'plugin-registry.label': 'Plugin Registry',\n 'all-plugins.label': 'All',\n 'installed-plugins.label': 'Enabled',\n 'recommended-plugins.label': 'Recommended',\n 'labs-plugins.label': 'Labs',\n 'community-plugins.label': 'Community',\n 'load-by-url.label': 'Load from URL',\n 'load-by-url-dialog.title': 'Load Plugin from URL',\n 'plugin-url.label': 'Plugin URL',\n 'load-plugin.label': 'Load Plugin',\n 'loading.label': 'Loading...',\n 'coming-soon.label': 'Coming soon!',\n 'open-plugin-registry.label': 'Open plugin registry',\n 'settings.label': 'Settings',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";AAKA,SAASA,yBAAyB;AAClC,SAASC,YAAY;AAEd,IAAMC,cAAcC,kBAAkB,sBAAA;AACtC,IAAMC,eAAe;AAG5B,IAAMC,qBAAqB;AAGpB,IAAMC,qBAAqB,CAACC,aAA6B,GAAGH,YAAAA,GAAeC,kBAAAA,GAAqBE,QAAAA;AAGhG,IAAMC,gBAAgB,CAACC,aAA6B,QAAQP,WAAAA,IAAeO,QAAAA;AAE3E,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;AAIf;;;ACvBA,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,QAAAA,aAAY;;;ACDrB,SAASC,QAAAA,aAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,MAAKC,EAAE,GAAG;QACT,eAAe;QACf,iBAAiB;QACjB,mBAAmB;QACnB,gBAAgB;QAChB,yBAAyB;QACzB,qBAAqB;QACrB,2BAA2B;QAC3B,6BAA6B;QAC7B,sBAAsB;QACtB,2BAA2B;QAC3B,qBAAqB;QACrB,4BAA4B;QAC5B,oBAAoB;QACpB,qBAAqB;QACrB,iBAAiB;QACjB,qBAAqB;QACrB,8BAA8B;QAC9B,kBAAkB;MACpB;IACF;EACF;;;;ADtBF,SAASC,iBAAiBC,kBAAkBC,oBAAoB;AAEzD,IAAMC,iBAAiBC,OAAOC,OAAOC,KAAAA,EAAMC,KAChDC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,0BAA0B;EAAEF,UAAUG;AAAiB,CAAA,GACjEL,UAAUM,iBAAiB;EAAEJ,UAAUK;AAAa,CAAA,GACpDP,UAAUQ,sBAAsB;EAAEC;AAAa,CAAA,GAC/Cb,OAAOc,IAAI;",
6
+ "names": ["pinnedWorkspaceId", "trim", "REGISTRY_ID", "pinnedWorkspaceId", "REGISTRY_KEY", "CATEGORY_SEPARATOR", "registryCategoryId", "category", "getPluginPath", "pluginId", "meta", "id", "name", "description", "trim", "Plugin", "AppPlugin", "meta", "meta", "translations", "meta", "id", "AppGraphBuilder", "OperationHandler", "ReactSurface", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addOperationHandlerModule", "OperationHandler", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "make"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":2360,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytes":17933,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/app-graph-builder/index.ts":{"bytes":946,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/app-graph-builder/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"}],"format":"esm"},"src/capabilities/operation-resolver/operation-resolver.ts":{"bytes":2923,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/operation-resolver/index.ts":{"bytes":964,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/operation-resolver/operation-resolver.ts","kind":"dynamic-import","original":"./operation-resolver"}],"format":"esm"},"src/components/PluginDetail.tsx":{"bytes":9779,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginItem.tsx":{"bytes":13174,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginList.tsx":{"bytes":2281,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/components/PluginItem.tsx","kind":"import-statement","original":"./PluginItem"}],"format":"esm"},"src/components/RegistryContainer.tsx":{"bytes":9572,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"src/components/PluginList.tsx","kind":"import-statement","original":"./PluginList"}],"format":"esm"},"src/components/index.ts":{"bytes":689,"imports":[{"path":"src/components/PluginDetail.tsx","kind":"import-statement","original":"./PluginDetail"},{"path":"src/components/PluginList.tsx","kind":"import-statement","original":"./PluginList"},{"path":"src/components/RegistryContainer.tsx","kind":"import-statement","original":"./RegistryContainer"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":13293,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":912,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":712,"imports":[{"path":"src/capabilities/app-graph-builder/index.ts","kind":"import-statement","original":"./app-graph-builder"},{"path":"src/capabilities/operation-resolver/index.ts","kind":"import-statement","original":"./operation-resolver"},{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":2832,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/RegistryPlugin.tsx":{"bytes":2595,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":557,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/RegistryPlugin.tsx","kind":"import-statement","original":"./RegistryPlugin"}],"format":"esm"},"src/cli/storage.ts":{"bytes":6743,"imports":[{"path":"@effect/platform/FileSystem","kind":"import-statement","external":true},{"path":"@effect/platform/Path","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true}],"format":"esm"},"src/cli/commands/disable.ts":{"bytes":6472,"imports":[{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/cli/storage.ts","kind":"import-statement","original":"../storage"}],"format":"esm"},"src/cli/commands/enable.ts":{"bytes":5826,"imports":[{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/cli/storage.ts","kind":"import-statement","original":"../storage"}],"format":"esm"},"src/cli/commands/util.ts":{"bytes":2004,"imports":[{"path":"@dxos/cli-util","kind":"import-statement","external":true}],"format":"esm"},"src/cli/commands/list.ts":{"bytes":4966,"imports":[{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"src/cli/commands/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"src/cli/commands/index.ts":{"bytes":1598,"imports":[{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"src/cli/commands/disable.ts","kind":"import-statement","original":"./disable"},{"path":"src/cli/commands/enable.ts","kind":"import-statement","original":"./enable"},{"path":"src/cli/commands/list.ts","kind":"import-statement","original":"./list"}],"format":"esm"},"src/cli/plugin.ts":{"bytes":1462,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/cli/commands/index.ts","kind":"import-statement","original":"./commands"}],"format":"esm"},"src/cli/index.ts":{"bytes":544,"imports":[{"path":"src/cli/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"src/cli/storage.ts","kind":"import-statement","original":"./storage"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3658},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/app-graph-builder-P3ZGGFAR.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/operation-resolver-P5PKLPRT.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-IIM6T7IA.mjs","kind":"dynamic-import"}],"exports":["REGISTRY_ID","REGISTRY_KEY","RegistryPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/RegistryPlugin.tsx":{"bytesInOutput":376},"src/capabilities/app-graph-builder/index.ts":{"bytesInOutput":158},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/operation-resolver/index.ts":{"bytesInOutput":179},"src/capabilities/react-surface/index.ts":{"bytesInOutput":164},"src/translations.ts":{"bytesInOutput":690}},"bytes":1967},"dist/lib/browser/cli/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14108},"dist/lib/browser/cli/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@effect/platform/FileSystem","kind":"import-statement","external":true},{"path":"@effect/platform/Path","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true},{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true}],"exports":["RegistryPlugin","loadEnabledPlugins","saveEnabledPlugins"],"entryPoint":"src/cli/index.ts","inputs":{"src/cli/plugin.ts":{"bytesInOutput":193},"src/cli/commands/index.ts":{"bytesInOutput":196},"src/cli/commands/disable.ts":{"bytesInOutput":1828},"src/cli/storage.ts":{"bytesInOutput":1374},"src/cli/commands/enable.ts":{"bytesInOutput":1633},"src/cli/commands/list.ts":{"bytesInOutput":1133},"src/cli/commands/util.ts":{"bytesInOutput":317},"src/cli/index.ts":{"bytesInOutput":0}},"bytes":7139},"dist/lib/browser/app-graph-builder-P3ZGGFAR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7727},"dist/lib/browser/app-graph-builder-P3ZGGFAR.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/app-graph-builder/app-graph-builder.ts","inputs":{"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytesInOutput":4647}},"bytes":4892},"dist/lib/browser/operation-resolver-P5PKLPRT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1544},"dist/lib/browser/operation-resolver-P5PKLPRT.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/operation-resolver/operation-resolver.ts","inputs":{"src/capabilities/operation-resolver/operation-resolver.ts":{"bytesInOutput":617}},"bytes":842},"dist/lib/browser/react-surface-IIM6T7IA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":25150},"dist/lib/browser/react-surface-IIM6T7IA.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":3311},"src/components/PluginDetail.tsx":{"bytesInOutput":2974},"src/components/index.ts":{"bytesInOutput":0},"src/components/PluginList.tsx":{"bytesInOutput":418},"src/components/PluginItem.tsx":{"bytesInOutput":3716},"src/components/RegistryContainer.tsx":{"bytesInOutput":2250}},"bytes":13116},"dist/lib/browser/chunk-VOAOTNGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1072},"dist/lib/browser/chunk-VOAOTNGS.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["REGISTRY_ID","REGISTRY_KEY","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":378}},"bytes":488}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":3364,"imports":[{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/translations.ts":{"bytes":3359,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/RegistryPlugin.tsx":{"bytes":2609,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"#capabilities","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":557,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/RegistryPlugin.tsx","kind":"import-statement","original":"./RegistryPlugin"}],"format":"esm"},"src/cli/storage.ts":{"bytes":6251,"imports":[{"path":"@effect/platform/FileSystem","kind":"import-statement","external":true},{"path":"@effect/platform/Path","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"yaml","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true}],"format":"esm"},"src/cli/commands/disable.ts":{"bytes":6472,"imports":[{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/cli/storage.ts","kind":"import-statement","original":"../storage"}],"format":"esm"},"src/cli/commands/enable.ts":{"bytes":5826,"imports":[{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/cli/storage.ts","kind":"import-statement","original":"../storage"}],"format":"esm"},"src/cli/commands/util.ts":{"bytes":2004,"imports":[{"path":"@dxos/cli-util","kind":"import-statement","external":true}],"format":"esm"},"src/cli/commands/list.ts":{"bytes":4966,"imports":[{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"src/cli/commands/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"src/cli/commands/index.ts":{"bytes":1598,"imports":[{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"src/cli/commands/disable.ts","kind":"import-statement","original":"./disable"},{"path":"src/cli/commands/enable.ts","kind":"import-statement","original":"./enable"},{"path":"src/cli/commands/list.ts","kind":"import-statement","original":"./list"}],"format":"esm"},"src/cli/plugin.ts":{"bytes":1555,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/cli/commands/index.ts","kind":"import-statement","original":"./commands"}],"format":"esm"},"src/cli/index.ts":{"bytes":544,"imports":[{"path":"src/cli/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"src/cli/storage.ts","kind":"import-statement","original":"./storage"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4446},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true}],"exports":["REGISTRY_ID","REGISTRY_KEY","RegistryPlugin","getPluginPath","meta","registryCategoryId"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":640},"src/index.ts":{"bytesInOutput":0},"src/RegistryPlugin.tsx":{"bytesInOutput":518},"src/translations.ts":{"bytesInOutput":910}},"bytes":2303},"dist/lib/browser/cli/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13861},"dist/lib/browser/cli/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@effect/platform/FileSystem","kind":"import-statement","external":true},{"path":"@effect/platform/Path","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"yaml","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true},{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true}],"exports":["RegistryPlugin","loadEnabledPlugins","saveEnabledPlugins"],"entryPoint":"src/cli/index.ts","inputs":{"src/cli/plugin.ts":{"bytesInOutput":258},"src/cli/commands/index.ts":{"bytesInOutput":196},"src/cli/commands/disable.ts":{"bytesInOutput":1828},"src/cli/storage.ts":{"bytesInOutput":1230},"src/cli/commands/enable.ts":{"bytesInOutput":1633},"src/cli/commands/list.ts":{"bytesInOutput":1133},"src/cli/commands/util.ts":{"bytesInOutput":317},"src/cli/index.ts":{"bytesInOutput":0}},"bytes":7011}}}
@@ -1,10 +1,9 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- meta
4
- } from "../chunk-SALMIZ2W.mjs";
5
2
 
6
3
  // src/cli/plugin.ts
7
- import { Common, Plugin as Plugin4 } from "@dxos/app-framework";
4
+ import { Plugin as Plugin4 } from "@dxos/app-framework";
5
+ import { AppPlugin } from "@dxos/app-toolkit";
6
+ import { meta } from "#meta";
8
7
 
9
8
  // src/cli/commands/index.ts
10
9
  import * as Command4 from "@effect/cli/Command";
@@ -23,29 +22,27 @@ import * as FileSystem from "@effect/platform/FileSystem";
23
22
  import * as Path from "@effect/platform/Path";
24
23
  import * as Effect from "effect/Effect";
25
24
  import * as Schema from "effect/Schema";
26
- import { DX_CONFIG, getProfilePath } from "@dxos/client-protocol";
27
- var PLUGINS_FILE = "plugins.json";
25
+ import * as Yaml from "yaml";
26
+ import { DX_CONFIG } from "@dxos/client-protocol";
28
27
  var PluginsSchema = Schema.Array(Schema.String);
29
- var getPluginsPath = (profile) => Effect.gen(function* () {
30
- const path = yield* Path.Path;
31
- return path.join(getProfilePath(DX_CONFIG, profile), PLUGINS_FILE);
32
- });
28
+ var getPluginsConfigPath = (profile) => `${DX_CONFIG}/plugins/${profile}.yml`;
33
29
  var loadEnabledPlugins = Effect.fn(function* ({ profile }) {
34
30
  const fs = yield* FileSystem.FileSystem;
35
- const pluginsPath = yield* getPluginsPath(profile);
31
+ const pluginsPath = getPluginsConfigPath(profile);
36
32
  const content = yield* fs.readFileString(pluginsPath).pipe(Effect.catchTag("SystemError", () => Effect.succeed("[]")));
37
- const parsed = yield* Schema.decodeUnknown(Schema.parseJson(PluginsSchema))(content).pipe(Effect.catchAll(() => Effect.succeed([])));
33
+ const raw = Yaml.parse(content);
34
+ const parsed = yield* Schema.decodeUnknown(PluginsSchema)(raw ?? []).pipe(Effect.catchAll(() => Effect.succeed([])));
38
35
  return parsed;
39
36
  });
40
37
  var saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }) {
41
38
  const fs = yield* FileSystem.FileSystem;
42
- const pluginsPath = yield* getPluginsPath(profile);
43
- const profileDir = getProfilePath(DX_CONFIG, profile);
44
- yield* fs.makeDirectory(profileDir, {
39
+ const path = yield* Path.Path;
40
+ const pluginsPath = getPluginsConfigPath(profile);
41
+ yield* fs.makeDirectory(path.dirname(pluginsPath), {
45
42
  recursive: true
46
43
  });
47
- const encoded = Schema.encodeSync(Schema.parseJson(PluginsSchema))(enabled);
48
- yield* fs.writeFileString(pluginsPath, encoded + "\n");
44
+ const encoded = Yaml.stringify(enabled);
45
+ yield* fs.writeFileString(pluginsPath, encoded);
49
46
  });
50
47
 
51
48
  // src/cli/commands/disable.ts
@@ -211,7 +208,7 @@ var plugin = Command4.make("plugin").pipe(Command4.withDescription("Manage plugi
211
208
  ]));
212
209
 
213
210
  // src/cli/plugin.ts
214
- var RegistryPlugin = Plugin4.define(meta).pipe(Common.Plugin.addCommandModule({
211
+ var RegistryPlugin = Plugin4.define(meta).pipe(AppPlugin.addCommandModule({
215
212
  commands: [
216
213
  plugin
217
214
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/plugin.ts", "../../../../src/cli/commands/index.ts", "../../../../src/cli/commands/disable.ts", "../../../../src/cli/storage.ts", "../../../../src/cli/commands/enable.ts", "../../../../src/cli/commands/list.ts", "../../../../src/cli/commands/util.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Common, Plugin } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nimport { plugin } from './commands';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n Common.Plugin.addCommandModule({\n commands: [plugin],\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { disable } from './disable';\nimport { enable } from './enable';\nimport { list } from './list';\n\nexport const plugin: Command.Command<any, any, any, any> = Command.make('plugin').pipe(\n Command.withDescription('Manage plugins.'),\n Command.withSubcommands([enable, disable, list]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const core = manager.getCore();\n invariant(!core.includes(id), `Cannot disable core plugin: ${id}`);\n\n const disabled = yield* manager.disable(id);\n invariant(disabled, `Failed to disable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: false }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" disabled.`);\n }\n});\n\nexport const disable = Command.make(\n 'disable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to disable.')),\n },\n handler,\n).pipe(Command.withDescription('Disable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { DX_CONFIG, getProfilePath } from '@dxos/client-protocol';\n\n// TODO(wittjosiah): Factor out to app-framework?\n\nconst PLUGINS_FILE = 'plugins.json';\n\nconst PluginsSchema = Schema.Array(Schema.String);\n\n/**\n * Get the path to the plugins configuration file for a profile.\n */\nconst getPluginsPath = (profile: string): Effect.Effect<string, never, Path.Path> =>\n Effect.gen(function* () {\n const path = yield* Path.Path;\n return path.join(getProfilePath(DX_CONFIG, profile), PLUGINS_FILE);\n });\n\n/**\n * Load enabled plugins from profile storage.\n * Returns the list of enabled plugin IDs, or an empty array if the file doesn't exist.\n */\nexport const loadEnabledPlugins = Effect.fn(function* ({ profile }: { profile: string }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = yield* getPluginsPath(profile);\n\n const content = yield* fs\n .readFileString(pluginsPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('[]')));\n\n const parsed = yield* Schema.decodeUnknown(Schema.parseJson(PluginsSchema))(content).pipe(\n Effect.catchAll(() => Effect.succeed([] as string[])),\n );\n\n return parsed;\n});\n\n/**\n * Save enabled plugins to profile storage.\n */\nexport const saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }: { profile: string; enabled: string[] }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = yield* getPluginsPath(profile);\n const profileDir = getProfilePath(DX_CONFIG, profile);\n\n yield* fs.makeDirectory(profileDir, { recursive: true });\n const encoded = Schema.encodeSync(Schema.parseJson(PluginsSchema))(enabled);\n yield* fs.writeFileString(pluginsPath, encoded + '\\n');\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const enabled = yield* manager.enable(id);\n invariant(enabled, `Failed to enable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: true }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" enabled.`);\n }\n});\n\nexport const enable = Command.make(\n 'enable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to enable.')),\n },\n handler,\n).pipe(Command.withDescription('Enable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig, printList } from '@dxos/cli-util';\n\nimport { type FormattedPlugin, printPlugin } from './util';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const enabled = manager.getEnabled();\n const core = manager.getCore();\n\n const formattedPlugins: FormattedPlugin[] = plugins.map((plugin: Plugin.Plugin) => {\n const isEnabled = enabled.includes(plugin.meta.id);\n const isCore = core.includes(plugin.meta.id);\n return {\n id: plugin.meta.id,\n name: plugin.meta.name ?? plugin.meta.id,\n enabled: isEnabled,\n core: isCore,\n };\n });\n\n if (json) {\n yield* Console.log(JSON.stringify(formattedPlugins, null, 2));\n } else {\n const formatted = formattedPlugins.map(printPlugin);\n yield* Console.log(printList(formatted));\n }\n});\n\nexport const list = Command.make('list', {}, handler).pipe(Command.withDescription('List all available plugins.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FormBuilder } from '@dxos/cli-util';\n\nexport type FormattedPlugin = {\n id: string;\n name: string;\n enabled: boolean;\n core: boolean;\n};\n\n/**\n * Pretty prints a plugin with ANSI colors.\n */\nexport const printPlugin = (plugin: FormattedPlugin) => {\n const status = plugin.core ? 'core' : plugin.enabled ? 'enabled' : 'disabled';\n return FormBuilder.make({ title: plugin.name }).pipe(\n FormBuilder.set('id', plugin.id),\n FormBuilder.set('status', status),\n FormBuilder.build,\n );\n};\n"],
5
- "mappings": ";;;;;;AAIA,SAASA,QAAQC,UAAAA,eAAc;;;ACA/B,YAAYC,cAAa;;;ACAzB,YAAYC,UAAU;AACtB,YAAYC,aAAa;AACzB,YAAYC,aAAa;AACzB,YAAYC,aAAY;AAExB,SAASC,cAAc;AACvB,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;;;ACP1B,YAAYC,gBAAgB;AAC5B,YAAYC,UAAU;AACtB,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,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MC,mBAAsCN,QAAQO,IAAI,CAACC,YAAAA;AACvD,UAAMC,YAAYP,QAAQQ,SAASF,QAAOG,KAAKC,EAAE;AACjD,UAAMC,SAAST,KAAKM,SAASF,QAAOG,KAAKC,EAAE;AAC3C,WAAO;MACLA,IAAIJ,QAAOG,KAAKC;MAChBE,MAAMN,QAAOG,KAAKG,QAAQN,QAAOG,KAAKC;MACtCV,SAASO;MACTL,MAAMS;IACR;EACF,CAAA;AAEA,MAAIlB,MAAM;AACR,WAAeoB,aAAIC,KAAKC,UAAUX,kBAAkB,MAAM,CAAA,CAAA;EAC5D,OAAO;AACL,UAAMY,YAAYZ,iBAAiBC,IAAIY,WAAAA;AACvC,WAAeJ,aAAIK,UAAUF,SAAAA,CAAAA;EAC/B;AACF,CAAA;AAEO,IAAMG,OAAeC,cAAK,QAAQ,CAAC,GAAG7B,QAAAA,EAAS8B,KAAaC,yBAAgB,6BAAA,CAAA;;;AJ9B5E,IAAMC,SAAsDC,cAAK,QAAA,EAAUC,KACxEC,yBAAgB,iBAAA,GAChBC,yBAAgB;EAACC;EAAQC;EAASC;CAAK,CAAA;;;ADF1C,IAAMC,iBAAiBC,QAAOC,OAAOC,IAAAA,EAAMC,KAChDC,OAAOJ,OAAOK,iBAAiB;EAC7BC,UAAU;IAACC;;AACb,CAAA,GACAP,QAAOQ,IAAI;",
6
- "names": ["Common", "Plugin", "Command", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "FileSystem", "Path", "Effect", "Schema", "DX_CONFIG", "getProfilePath", "PLUGINS_FILE", "PluginsSchema", "Array", "String", "getPluginsPath", "profile", "gen", "path", "Path", "join", "getProfilePath", "DX_CONFIG", "loadEnabledPlugins", "fn", "fs", "FileSystem", "pluginsPath", "content", "readFileString", "pipe", "catchTag", "succeed", "parsed", "decodeUnknown", "parseJson", "catchAll", "saveEnabledPlugins", "enabled", "profileDir", "makeDirectory", "recursive", "encoded", "encodeSync", "writeFileString", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "core", "getCore", "includes", "disabled", "disable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "enabled", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "enabled", "enable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Command", "Console", "Effect", "Plugin", "CommandConfig", "printList", "FormBuilder", "printPlugin", "plugin", "status", "core", "enabled", "FormBuilder", "make", "title", "name", "pipe", "set", "id", "build", "handler", "fn", "json", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "enabled", "getEnabled", "core", "getCore", "formattedPlugins", "map", "plugin", "isEnabled", "includes", "meta", "id", "isCore", "name", "log", "JSON", "stringify", "formatted", "printPlugin", "printList", "list", "make", "pipe", "withDescription", "plugin", "make", "pipe", "withDescription", "withSubcommands", "enable", "disable", "list", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "Common", "addCommandModule", "commands", "plugin", "make"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nimport { plugin } from './commands';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCommandModule({\n commands: [plugin],\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { disable } from './disable';\nimport { enable } from './enable';\nimport { list } from './list';\n\nexport const plugin: Command.Command<any, any, any, any> = Command.make('plugin').pipe(\n Command.withDescription('Manage plugins.'),\n Command.withSubcommands([enable, disable, list]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const core = manager.getCore();\n invariant(!core.includes(id), `Cannot disable core plugin: ${id}`);\n\n const disabled = yield* manager.disable(id);\n invariant(disabled, `Failed to disable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: false }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" disabled.`);\n }\n});\n\nexport const disable = Command.make(\n 'disable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to disable.')),\n },\n handler,\n).pipe(Command.withDescription('Disable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\nimport * as Yaml from 'yaml';\n\nimport { DX_CONFIG } from '@dxos/client-protocol';\n\n// TODO(wittjosiah): Factor out to app-framework?\n\nconst PluginsSchema = Schema.Array(Schema.String);\n\n/** CLI-only: path to plugins/<profile>.yml (sibling to profile/). */\nconst getPluginsConfigPath = (profile: string) => `${DX_CONFIG}/plugins/${profile}.yml`;\n\n/**\n * Load enabled plugins from plugins/<profile>.yml (sibling to profile/).\n * Returns the list of enabled plugin IDs, or an empty array if the file doesn't exist.\n */\nexport const loadEnabledPlugins = Effect.fn(function* ({ profile }: { profile: string }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = getPluginsConfigPath(profile);\n\n const content = yield* fs\n .readFileString(pluginsPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('[]')));\n\n const raw = Yaml.parse(content);\n const parsed = yield* Schema.decodeUnknown(PluginsSchema)(raw ?? []).pipe(\n Effect.catchAll(() => Effect.succeed([] as string[])),\n );\n\n return parsed;\n});\n\n/**\n * Save enabled plugins to plugins/<profile>.yml.\n */\nexport const saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }: { profile: string; enabled: string[] }) {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const pluginsPath = getPluginsConfigPath(profile);\n yield* fs.makeDirectory(path.dirname(pluginsPath), { recursive: true });\n const encoded = Yaml.stringify(enabled);\n yield* fs.writeFileString(pluginsPath, encoded);\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const enabled = yield* manager.enable(id);\n invariant(enabled, `Failed to enable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: true }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" enabled.`);\n }\n});\n\nexport const enable = Command.make(\n 'enable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to enable.')),\n },\n handler,\n).pipe(Command.withDescription('Enable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig, printList } from '@dxos/cli-util';\n\nimport { type FormattedPlugin, printPlugin } from './util';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const enabled = manager.getEnabled();\n const core = manager.getCore();\n\n const formattedPlugins: FormattedPlugin[] = plugins.map((plugin: Plugin.Plugin) => {\n const isEnabled = enabled.includes(plugin.meta.id);\n const isCore = core.includes(plugin.meta.id);\n return {\n id: plugin.meta.id,\n name: plugin.meta.name ?? plugin.meta.id,\n enabled: isEnabled,\n core: isCore,\n };\n });\n\n if (json) {\n yield* Console.log(JSON.stringify(formattedPlugins, null, 2));\n } else {\n const formatted = formattedPlugins.map(printPlugin);\n yield* Console.log(printList(formatted));\n }\n});\n\nexport const list = Command.make('list', {}, handler).pipe(Command.withDescription('List all available plugins.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FormBuilder } from '@dxos/cli-util';\n\nexport type FormattedPlugin = {\n id: string;\n name: string;\n enabled: boolean;\n core: boolean;\n};\n\n/**\n * Pretty prints a plugin with ANSI colors.\n */\nexport const printPlugin = (plugin: FormattedPlugin) => {\n const status = plugin.core ? 'core' : plugin.enabled ? 'enabled' : 'disabled';\n return FormBuilder.make({ title: plugin.name }).pipe(\n FormBuilder.set('id', plugin.id),\n FormBuilder.set('status', status),\n FormBuilder.build,\n );\n};\n"],
5
+ "mappings": ";;;AAIA,SAASA,UAAAA,eAAc;AACvB,SAASC,iBAAiB;AAE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KAAI,IAAK,OAAOC;AACxB,QAAMC,UAAU,OAAOC,QAAOC;AAE9B,QAAMC,UAAUH,QAAQI,WAAU;AAClC,QAAMC,UAAUL,QAAQM,WAAU;AAClC,QAAMC,OAAOP,QAAQQ,QAAO;AAE5B,QAAMC,mBAAsCN,QAAQO,IAAI,CAACC,YAAAA;AACvD,UAAMC,YAAYP,QAAQQ,SAASF,QAAOG,KAAKC,EAAE;AACjD,UAAMC,SAAST,KAAKM,SAASF,QAAOG,KAAKC,EAAE;AAC3C,WAAO;MACLA,IAAIJ,QAAOG,KAAKC;MAChBE,MAAMN,QAAOG,KAAKG,QAAQN,QAAOG,KAAKC;MACtCV,SAASO;MACTL,MAAMS;IACR;EACF,CAAA;AAEA,MAAIlB,MAAM;AACR,WAAeoB,aAAIC,KAAKC,UAAUX,kBAAkB,MAAM,CAAA,CAAA;EAC5D,OAAO;AACL,UAAMY,YAAYZ,iBAAiBC,IAAIY,WAAAA;AACvC,WAAeJ,aAAIK,UAAUF,SAAAA,CAAAA;EAC/B;AACF,CAAA;AAEO,IAAMG,OAAeC,cAAK,QAAQ,CAAC,GAAG7B,QAAAA,EAAS8B,KAAaC,yBAAgB,6BAAA,CAAA;;;AJ9B5E,IAAMC,SAAsDC,cAAK,QAAA,EAAUC,KACxEC,yBAAgB,iBAAA,GAChBC,yBAAgB;EAACC;EAAQC;EAASC;CAAK,CAAA;;;ADD1C,IAAMC,iBAAiBC,QAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,iBAAiB;EACzBC,UAAU;IAACC;;AACb,CAAA,GACAP,QAAOQ,IAAI;",
6
+ "names": ["Plugin", "AppPlugin", "meta", "Command", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "FileSystem", "Path", "Effect", "Schema", "Yaml", "DX_CONFIG", "PluginsSchema", "Array", "String", "getPluginsConfigPath", "profile", "DX_CONFIG", "loadEnabledPlugins", "fn", "fs", "FileSystem", "pluginsPath", "content", "readFileString", "pipe", "catchTag", "succeed", "raw", "parse", "parsed", "decodeUnknown", "catchAll", "saveEnabledPlugins", "enabled", "path", "Path", "makeDirectory", "dirname", "recursive", "encoded", "stringify", "writeFileString", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "core", "getCore", "includes", "disabled", "disable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "enabled", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "enabled", "enable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Command", "Console", "Effect", "Plugin", "CommandConfig", "printList", "FormBuilder", "printPlugin", "plugin", "status", "core", "enabled", "FormBuilder", "make", "title", "name", "pipe", "set", "id", "build", "handler", "fn", "json", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "enabled", "getEnabled", "core", "getCore", "formattedPlugins", "map", "plugin", "isEnabled", "includes", "meta", "id", "isCore", "name", "log", "JSON", "stringify", "formatted", "printPlugin", "printList", "list", "make", "pipe", "withDescription", "plugin", "make", "pipe", "withDescription", "withSubcommands", "enable", "disable", "list", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addCommandModule", "commands", "plugin", "make"]
7
7
  }