@dxos/plugin-registry 0.9.1-main.c7dcc2e112 → 0.9.1-staging.ee54ba693a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/RegistryPlugin.node.mjs +10 -10
- package/dist/lib/neutral/RegistryPlugin.node.mjs.map +3 -3
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/translations.mjs +5 -5
- package/dist/lib/neutral/translations.mjs.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -10
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/commands/registry/publish-package.d.ts +1 -1
- package/dist/types/src/commands/registry/publish.d.ts +2 -2
- package/dist/types/src/commands/registry/unpublish.d.ts +2 -2
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +6 -5
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts.map +1 -1
- package/dist/types/src/components/PluginFailureBadge/PluginFailureBadge.d.ts +1 -3
- package/dist/types/src/components/PluginFailureBadge/PluginFailureBadge.d.ts.map +1 -1
- package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -1
- package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -1
- package/dist/types/src/components/PluginList/PluginList.stories.d.ts +5 -5
- package/dist/types/src/components/RegistrySettings/RegistrySettings.d.ts +5 -1
- package/dist/types/src/components/RegistrySettings/RegistrySettings.d.ts.map +1 -1
- package/dist/types/src/components/RegistrySettings/RegistrySettings.stories.d.ts +78 -0
- package/dist/types/src/components/RegistrySettings/RegistrySettings.stories.d.ts.map +1 -0
- package/dist/types/src/containers/PublicRegistryArticle/index.d.ts +1 -1
- package/dist/types/src/containers/PublicRegistryArticle/index.d.ts.map +1 -1
- package/dist/types/src/containers/RegistryArticle/index.d.ts +1 -1
- package/dist/types/src/containers/RegistryArticle/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +5 -5
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -39
- package/src/capabilities/app-graph-builder.ts +3 -2
- package/src/commands/registry/publish-package.ts +5 -5
- package/src/commands/registry/publish.ts +5 -5
- package/src/commands/registry/records.ts +1 -1
- package/src/commands/registry/unpublish.ts +6 -6
- package/src/commands/registry/util.ts +1 -1
- package/src/components/PluginDetail/PluginDetail.stories.tsx +31 -17
- package/src/components/PluginFailureBadge/PluginFailureBadge.tsx +20 -23
- package/src/components/PluginList/PluginItem.tsx +11 -8
- package/src/components/PluginList/PluginList.tsx +18 -13
- package/src/components/RegistrySettings/RegistrySettings.stories.tsx +45 -0
- package/src/components/RegistrySettings/RegistrySettings.tsx +43 -32
- package/src/containers/PublicRegistryArticle/index.ts +1 -1
- package/src/containers/RegistryArticle/index.ts +1 -1
- package/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.tsx +1 -1
- package/src/translations.ts +5 -5
|
@@ -497,10 +497,10 @@ var publish = Command5.make("publish", {
|
|
|
497
497
|
if (manifest.spec !== void 0) {
|
|
498
498
|
profile.spec = manifest.spec;
|
|
499
499
|
}
|
|
500
|
-
const profileResult = yield* putRecord(session, NSID.
|
|
500
|
+
const profileResult = yield* putRecord(session, NSID.PluginProfile, key, profile);
|
|
501
501
|
yield* Console4.log(`Profile ${profileResult.uri}`);
|
|
502
|
-
const releaseResult = yield* putRecord(session, NSID.
|
|
503
|
-
|
|
502
|
+
const releaseResult = yield* putRecord(session, NSID.PluginRelease, `${key}:${version}`, {
|
|
503
|
+
pluginKey: key,
|
|
504
504
|
version,
|
|
505
505
|
moduleUrl,
|
|
506
506
|
manifestHash,
|
|
@@ -629,11 +629,11 @@ var publishPackage = Command6.make("publish-package", {
|
|
|
629
629
|
},
|
|
630
630
|
createdAt
|
|
631
631
|
};
|
|
632
|
-
const profileResult = yield* putRecord(session, NSID.
|
|
632
|
+
const profileResult = yield* putRecord(session, NSID.PluginProfile, options.key, profile);
|
|
633
633
|
yield* Console5.log(`Profile ${profileResult.uri}`);
|
|
634
634
|
const manifestHash = Option3.getOrUndefined(options.manifestHash);
|
|
635
635
|
const release = {
|
|
636
|
-
|
|
636
|
+
pluginKey: options.key,
|
|
637
637
|
version: options.version,
|
|
638
638
|
moduleUrl: options.moduleUrl,
|
|
639
639
|
createdAt,
|
|
@@ -641,7 +641,7 @@ var publishPackage = Command6.make("publish-package", {
|
|
|
641
641
|
manifestHash
|
|
642
642
|
}
|
|
643
643
|
};
|
|
644
|
-
const releaseResult = yield* putRecord(session, NSID.
|
|
644
|
+
const releaseResult = yield* putRecord(session, NSID.PluginRelease, `${options.key}:${options.version}`, release);
|
|
645
645
|
yield* Console5.log(`Release ${releaseResult.uri}`);
|
|
646
646
|
}), Effect6.provide(FetchHttpClient2.layer))).pipe(Command6.withDescription("Publish a package profile + release to the authenticated user's PDS."));
|
|
647
647
|
|
|
@@ -753,7 +753,7 @@ var rkeyOf = (uri) => uri.split("/").pop() ?? "";
|
|
|
753
753
|
var unpublish = Command9.make("unpublish", {
|
|
754
754
|
handle: Options5.text("handle").pipe(Options5.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options5.optional),
|
|
755
755
|
appPassword: Options5.text("app-password").pipe(Options5.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword), Options5.optional),
|
|
756
|
-
key: Options5.text("key").pipe(Options5.withDescription("
|
|
756
|
+
key: Options5.text("key").pipe(Options5.withDescription("Plugin key (the profile rkey). Removes its profile and all releases."))
|
|
757
757
|
}, (options) => Function5.pipe(Effect9.gen(function* () {
|
|
758
758
|
const client = yield* ClientService5;
|
|
759
759
|
const session = yield* resolveSession({
|
|
@@ -765,7 +765,7 @@ var unpublish = Command9.make("unpublish", {
|
|
|
765
765
|
let cursor;
|
|
766
766
|
let deletedReleases = 0;
|
|
767
767
|
do {
|
|
768
|
-
const releases = yield* listRecords(session, NSID.
|
|
768
|
+
const releases = yield* listRecords(session, NSID.PluginRelease, {
|
|
769
769
|
limit: 100,
|
|
770
770
|
cursor
|
|
771
771
|
});
|
|
@@ -773,13 +773,13 @@ var unpublish = Command9.make("unpublish", {
|
|
|
773
773
|
for (const record of releases.records) {
|
|
774
774
|
const rkey = rkeyOf(record.uri);
|
|
775
775
|
if (rkey.startsWith(`${key}:`)) {
|
|
776
|
-
yield* deleteRecord(session, NSID.
|
|
776
|
+
yield* deleteRecord(session, NSID.PluginRelease, rkey);
|
|
777
777
|
yield* Console8.log(`Deleted release ${rkey}`);
|
|
778
778
|
deletedReleases += 1;
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
781
|
} while (cursor !== void 0);
|
|
782
|
-
yield* deleteRecord(session, NSID.
|
|
782
|
+
yield* deleteRecord(session, NSID.PluginProfile, key);
|
|
783
783
|
yield* Console8.log(`Deleted profile ${key} (${deletedReleases} release(s) removed)`);
|
|
784
784
|
}), Effect9.provide(FetchHttpClient5.layer))).pipe(Command9.withDescription("Remove a package (profile + releases) from the authenticated user's PDS."));
|
|
785
785
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/RegistryPlugin.node.ts", "../../../src/commands/plugin/index.ts", "../../../src/commands/plugin/disable.ts", "../../../src/commands/plugin/enable.ts", "../../../src/commands/plugin/list.ts", "../../../src/commands/plugin/util.ts", "../../../src/commands/registry/index.ts", "../../../src/commands/registry/publish.ts", "../../../src/commands/registry/util.ts", "../../../src/commands/registry/publish-package.ts", "../../../src/commands/registry/publish-publisher.ts", "../../../src/commands/registry/records.ts", "../../../src/commands/registry/unpublish.ts", "../../../src/commands/registry/verify.ts"],
|
|
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, registry } from './commands';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCommandModule({\n commands: [plugin, registry],\n }),\n Plugin.make,\n);\n\nexport default RegistryPlugin;\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.profile.key === 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.profile.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 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.profile.key === 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.profile.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.profile.key);\n const isCore = core.includes(plugin.meta.profile.key);\n return {\n id: plugin.meta.profile.key,\n name: plugin.meta.profile.name ?? plugin.meta.profile.key,\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", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { publish } from './publish';\nimport { publishPackage } from './publish-package';\nimport { publishPublisher } from './publish-publisher';\nimport { records } from './records';\nimport { unpublish } from './unpublish';\nimport { verify } from './verify';\n\n/**\n * `dx registry *` — commands for publishing and inspecting records that the\n * DXOS plugin registry indexes from AT Protocol. Auth uses an App Password\n * (per-user secret minted at https://bsky.app/settings/app-passwords); OAuth\n * support is a follow-up.\n *\n * - `publish` — config-driven: build from dx.yml, host the bundle, write records.\n * - `publish-package` — low-level: write profile + release records from flags.\n * - `publish-publisher` — write the publisher's own profile record.\n * - `unpublish` — remove a package (profile + releases) from your PDS.\n * - `verify` — write a publisher.verification record (indexed only from the configured verifier).\n * - `records` — list everything the authenticated repo has published under `org.dxos.experimental.*`.\n */\nexport const registry: Command.Command<any, any, any, any> = Command.make('registry').pipe(\n Command.withDescription('Publish to and inspect the AT Protocol-backed DXOS plugin registry.'),\n Command.withSubcommands([publish, publishPackage, publishPublisher, unpublish, verify, records]),\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as PlatformCommand from '@effect/platform/Command';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\n\nimport { findDxConfigFile, loadDxConfig } from '@dxos/app-framework/vite-plugin';\nimport { type Client, ClientService } from '@dxos/client';\nimport { Context } from '@dxos/context';\nimport { EdgeHttpClient } from '@dxos/edge-client';\nimport { Config2 } from '@dxos/protocols';\n\nimport { AUTH_OPTION_DESCRIPTIONS, NSID, putRecord, resolveSession } from './util';\n\n/** Manifest emitted by the build (subset consumed here). Extends `Config2.Plugin` with build-time fields. */\nconst ManifestSchema = Schema.Struct({\n ...Config2.Plugin.fields,\n version: Schema.String.pipe(Schema.nonEmptyString()),\n dependencies: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.String })),\n});\ntype Manifest = Schema.Schema.Type<typeof ManifestSchema>;\n\nconst ensureTrailingSlash = (url: string): string => (url.endsWith('/') ? url : `${url}/`);\n\nconst sha256Base64 = async (bytes: Uint8Array): Promise<string> => {\n const digest = await globalThis.crypto.subtle.digest('SHA-256', bytes as BufferSource);\n return Buffer.from(new Uint8Array(digest)).toString('base64');\n};\n\n/**\n * `dx registry publish` — config-driven build + publish.\n *\n * Reads the build/publish orchestration from `dx.config.ts`, runs the declared build command,\n * reads the emitted `manifest.json`, hosts the bundle (default: upload the build\n * output to the DXOS edge registry; override with `publish.assetBaseUrl` to point\n * at your own already-hosted directory), then writes the `package.profile` and\n * `package.release` records to the authenticated publisher's PDS. Release\n * integrity is anchored by `manifestHash` (sha256 of `manifest.json`) in the\n * signed release record.\n */\nexport const publish = Command.make(\n 'publish',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n dir: Options.text('dir').pipe(\n Options.withDescription('Project directory containing dx.config.ts. Defaults to the current directory.'),\n Options.withDefault('.'),\n ),\n noBuild: Options.boolean('no-build').pipe(\n Options.withDescription('Skip running the build command (publish a pre-built dist).'),\n ),\n assetBaseUrl: Options.text('asset-base-url').pipe(\n Options.withDescription('Skip upload and point the release at an already-hosted bundle directory.'),\n Options.optional,\n ),\n edgeUrl: Options.text('edge-url').pipe(\n Options.withDescription(\n 'Edge base URL for bundle upload (e.g. http://localhost:8787). Bypasses profile config; auth is skipped (requires WORKER_ENV=dev on the server).',\n ),\n Options.optional,\n ),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const dir = path.resolve(options.dir);\n\n // Load + validate the build/publish orchestration from dx.config.ts.\n const configFile = findDxConfigFile(dir);\n if (!configFile) {\n return yield* Effect.fail(new Error(`No dx.config.ts found in ${dir}.`));\n }\n const config = yield* Effect.tryPromise({\n try: () => loadDxConfig(configFile),\n catch: (error) => new Error(`Failed to load dx.config.ts in ${dir}: ${error}`),\n });\n\n // Build (unless skipped). Prepend the project's `node_modules/.bin` to PATH so\n // locally-installed tools (e.g. `vite`) resolve like they do in an npm script.\n const buildCommand = config.publish?.buildCommand;\n if (!options.noBuild && buildCommand) {\n yield* Console.log(`Building: ${buildCommand}`);\n const binDir = path.join(dir, 'node_modules', '.bin');\n const exitCode = yield* PlatformCommand.make(\n 'sh',\n '-c',\n `export PATH=\"${binDir}:$PATH\"; ${buildCommand}`,\n ).pipe(\n PlatformCommand.workingDirectory(dir),\n PlatformCommand.stdout('inherit'),\n PlatformCommand.stderr('inherit'),\n PlatformCommand.exitCode,\n );\n if (exitCode !== 0) {\n return yield* Effect.fail(new Error(`Build failed (exit ${exitCode}): ${buildCommand}`));\n }\n }\n\n // Read the emitted manifest.\n const outdir = path.join(dir, config.publish?.outputDirectory ?? 'dist');\n const manifestPath = path.join(outdir, 'manifest.json');\n if (!(yield* fs.exists(manifestPath))) {\n return yield* Effect.fail(new Error(`manifest.json not found in ${outdir}. Did the build run?`));\n }\n const manifestRaw = yield* fs.readFileString(manifestPath);\n const manifest: Manifest = yield* Schema.decodeUnknown(ManifestSchema)(JSON.parse(manifestRaw));\n const key = manifest.key;\n const version = manifest.version;\n const manifestHash = `sha256-${yield* Effect.promise(() => sha256Base64(new TextEncoder().encode(manifestRaw)))}`;\n\n // Resolve hosting → moduleUrl.\n const assetBaseUrl = Option.getOrUndefined(options.assetBaseUrl) ?? config.publish?.assetBaseUrl;\n let moduleUrl: string;\n if (assetBaseUrl) {\n moduleUrl = new URL('manifest.json', ensureTrailingSlash(assetBaseUrl)).toString();\n yield* Console.log(`Self-hosted: ${moduleUrl}`);\n } else {\n // Upload to the edge registry via the authenticated edge client (hub-identity VP).\n // When --edge-url is provided we bypass the profile's edge config and post directly\n // with auth: false — relies on WORKER_ENV=dev skipAuth on the server (local dev only).\n const explicitEdgeUrl = Option.getOrUndefined(options.edgeUrl);\n if (explicitEdgeUrl) {\n const http = new EdgeHttpClient(explicitEdgeUrl);\n moduleUrl = yield* uploadBundleDirect({ http, key, version, outdir });\n } else {\n const client = yield* ClientService;\n const hasIdentity = !!client.halo.identity.get();\n moduleUrl = yield* uploadBundle({ client, key, version, outdir, auth: hasIdentity });\n }\n yield* Console.log(`Uploaded: ${moduleUrl}`);\n }\n\n // Authenticate and write records.\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n const createdAt = new Date().toISOString();\n\n const profile: Record<string, unknown> = { key, name: manifest.name, createdAt };\n if (manifest.description !== undefined) {\n profile.description = manifest.description;\n }\n if (manifest.homePage !== undefined) {\n profile.homePage = manifest.homePage;\n }\n if (manifest.source !== undefined) {\n profile.source = manifest.source;\n }\n if (manifest.icon !== undefined) {\n profile.icon = manifest.icon;\n }\n if (manifest.tags && manifest.tags.length > 0) {\n profile.tags = manifest.tags;\n }\n if (manifest.screenshots && manifest.screenshots.length > 0) {\n profile.screenshots = manifest.screenshots;\n }\n if (manifest.dependsOn?.length) {\n profile.dependsOn = manifest.dependsOn;\n }\n if (manifest.spec !== undefined) {\n profile.spec = manifest.spec;\n }\n\n const profileResult = yield* putRecord(session, NSID.PackageProfile, key, profile);\n yield* Console.log(`Profile ${profileResult.uri}`);\n\n const releaseResult = yield* putRecord(session, NSID.PackageRelease, `${key}:${version}`, {\n package: key,\n version,\n moduleUrl,\n manifestHash,\n createdAt,\n ...(manifest.dependencies ? { dependencies: manifest.dependencies } : {}),\n });\n yield* Console.log(`Release ${releaseResult.uri}`);\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(Command.withDescription('Build, host, and publish the plugin in the current directory to the registry.'));\n\n/**\n * Upload the build output to the edge registry via the authenticated edge client.\n * The edge gates `/registry/upload` on the caller's hub identity (verifiable\n * presentation; bypassed for local dev). Release integrity is anchored by the\n * signed record's `manifestHash`, not the transport. Returns the canonical\n * `moduleUrl` (the hosted `manifest.json`), targeting the client's configured edge.\n */\nconst uploadBundle = ({\n client,\n key,\n version,\n outdir,\n auth = true,\n}: {\n client: Client;\n key: string;\n version: string;\n outdir: string;\n auth?: boolean;\n}) =>\n Effect.gen(function* () {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n\n const entries = yield* fs.readDirectory(outdir, { recursive: true });\n const files: { path: string; content: string }[] = [];\n for (const entry of entries) {\n const full = path.join(outdir, entry);\n const info = yield* fs.stat(full);\n if (info.type !== 'File') {\n continue;\n }\n const bytes = yield* fs.readFile(full);\n files.push({ path: entry.split(path.sep).join('/'), content: Buffer.from(bytes).toString('base64') });\n }\n\n const { moduleUrl } = yield* Effect.tryPromise(() =>\n client.edge.http.uploadPluginBundle(Context.default(), { slug: key, version, files }, { auth }),\n );\n return moduleUrl;\n });\n\n/**\n * Upload using a standalone EdgeHttpClient (no DXOS profile required).\n * Auth is skipped — the server must have WORKER_ENV=dev to accept unauthenticated uploads.\n */\nconst uploadBundleDirect = ({\n http,\n key,\n version,\n outdir,\n}: {\n http: EdgeHttpClient;\n key: string;\n version: string;\n outdir: string;\n}) =>\n Effect.gen(function* () {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n\n const entries = yield* fs.readDirectory(outdir, { recursive: true });\n const files: { path: string; content: string }[] = [];\n for (const entry of entries) {\n const full = path.join(outdir, entry);\n const info = yield* fs.stat(full);\n if (info.type !== 'File') {\n continue;\n }\n const bytes = yield* fs.readFile(full);\n files.push({ path: entry.split(path.sep).join('/'), content: Buffer.from(bytes).toString('base64') });\n }\n\n const { moduleUrl } = yield* Effect.tryPromise(() =>\n http.uploadPluginBundle(Context.default(), { slug: key, version, files }, { auth: false }),\n );\n return moduleUrl;\n });\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as HttpClient from '@effect/platform/HttpClient';\nimport * as HttpClientRequest from '@effect/platform/HttpClientRequest';\nimport type * as HttpClientResponse from '@effect/platform/HttpClientResponse';\nimport * as Config from 'effect/Config';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\n\nimport { AppSpace } from '@dxos/app-toolkit';\nimport { type Client } from '@dxos/client';\nimport { Filter } from '@dxos/echo';\nimport { ALL_NSIDS, NSID } from '@dxos/protocols';\nimport { AccessToken } from '@dxos/types';\n\nexport { ALL_NSIDS, NSID };\n\n/**\n * Shared helpers for the `dx registry *` commands.\n *\n * These commands write `org.dxos.experimental.*` records to a publisher's PDS via AT Protocol\n * XRPC. Auth has two modes (see {@link resolveSession}):\n *\n * - **Personal-space (default):** when logged in (`dx account login`), the publisher's atproto\n * session lives in their personal space as the \"Atmosphere\" `AccessToken`. Record writes are\n * signed by Edge's DPoP proxy (`/atproto/proxy`) — no app password required.\n * - **App password (fallback):** explicit `--handle` / `--app-password` (or `$ATPROTO_HANDLE` /\n * `$ATPROTO_APP_PASSWORD`) authenticate directly against the PDS with a session token.\n */\n\n// `AccessToken.source` of the default atproto / login integration (\"Atmosphere\"). Mirrors\n// `ATMOSPHERE_SOURCE` in plugin-integration; inlined to avoid a plugin-registry -> plugin-integration\n// dependency.\nconst ATMOSPHERE_SOURCE = 'atproto.local';\n\n// Public read-only XRPC base used for identity resolution. Works for any\n// AT Protocol identity regardless of which PDS hosts it.\nconst BSKY_PUBLIC_API = 'https://public.api.bsky.app/xrpc';\nconst PLC_DIRECTORY = 'https://plc.directory';\n\n// ---------------------------------------------------------------------------\n// Schemas (subset of XRPC response shapes we consume)\n// ---------------------------------------------------------------------------\n\nconst CreateSessionResponseSchema = Schema.Struct({\n did: Schema.String,\n handle: Schema.String,\n accessJwt: Schema.String,\n refreshJwt: Schema.String,\n});\n\nconst ResolveHandleResponseSchema = Schema.Struct({ did: Schema.String });\n\nconst DidServiceSchema = Schema.Struct({\n id: Schema.String,\n type: Schema.optional(Schema.String),\n serviceEndpoint: Schema.Unknown,\n});\nconst DidDocumentSchema = Schema.Struct({\n service: Schema.optional(Schema.Array(DidServiceSchema)),\n});\n\nconst PutRecordResponseSchema = Schema.Struct({\n uri: Schema.String,\n cid: Schema.String,\n});\nexport type PutRecordResponse = Schema.Schema.Type<typeof PutRecordResponseSchema>;\n\nconst ListRecordsEntrySchema = Schema.Struct({\n uri: Schema.String,\n cid: Schema.String,\n value: Schema.Unknown,\n});\nconst ListRecordsResponseSchema = Schema.Struct({\n cursor: Schema.optional(Schema.String),\n records: Schema.Array(ListRecordsEntrySchema),\n});\nexport type ListRecordsEntry = Schema.Schema.Type<typeof ListRecordsEntrySchema>;\n\n// ---------------------------------------------------------------------------\n// XRPC primitives\n// ---------------------------------------------------------------------------\n\nconst decodeJson =\n <T>(schema: Schema.Schema<T>) =>\n (response: HttpClientResponse.HttpClientResponse) =>\n Effect.flatMap(response.json, Schema.decodeUnknown(schema));\n\n/** GET an XRPC endpoint and decode the JSON response. */\nconst xrpcGet = <T>(url: string, query: Record<string, string>, schema: Schema.Schema<T>) =>\n Effect.gen(function* () {\n const client = yield* HttpClient.HttpClient;\n return yield* HttpClientRequest.get(url).pipe(\n HttpClientRequest.setUrlParams(query),\n client.execute,\n Effect.flatMap(decodeJson(schema)),\n Effect.scoped,\n );\n });\n\n/** POST a JSON body to an XRPC endpoint and decode the JSON response. */\nconst xrpcPost = <T>(\n url: string,\n body: Record<string, unknown>,\n schema: Schema.Schema<T> | undefined,\n headers: Record<string, string> = {},\n) =>\n Effect.gen(function* () {\n const client = yield* HttpClient.HttpClient;\n const response = yield* HttpClientRequest.post(url).pipe(\n HttpClientRequest.setHeaders(headers),\n HttpClientRequest.bodyJson(body),\n Effect.flatMap((req) => client.execute(req)),\n Effect.scoped,\n );\n if (schema === undefined) {\n return undefined as T;\n }\n return yield* decodeJson(schema)(response);\n });\n\n/** Resolve a handle (e.g. `alice.bsky.social`) to a DID via the public XRPC. */\nexport const resolveHandle = (handle: string) =>\n xrpcGet(`${BSKY_PUBLIC_API}/com.atproto.identity.resolveHandle`, { handle }, ResolveHandleResponseSchema).pipe(\n Effect.map((response) => response.did),\n );\n\n/** Resolve a DID to its PDS service endpoint via the PLC directory (or did:web well-known). */\nexport const resolvePds = (did: string) =>\n Effect.gen(function* () {\n let doc: Schema.Schema.Type<typeof DidDocumentSchema>;\n if (did.startsWith('did:plc:')) {\n doc = yield* xrpcGet(`${PLC_DIRECTORY}/${did}`, {}, DidDocumentSchema);\n } else if (did.startsWith('did:web:')) {\n const rest = did.slice('did:web:'.length);\n const [host, ...segments] = rest.split(':').map((part) => decodeURIComponent(part));\n const path = segments.length > 0 ? `/${segments.join('/')}/did.json` : '/.well-known/did.json';\n doc = yield* xrpcGet(`https://${host}${path}`, {}, DidDocumentSchema);\n } else {\n return yield* Effect.fail(new Error(`Unsupported DID method: ${did}`));\n }\n const service = doc.service?.find(\n (entry) => entry.id === '#atproto_pds' || entry.type === 'AtprotoPersonalDataServer',\n );\n const endpoint = service?.serviceEndpoint;\n if (typeof endpoint !== 'string' || endpoint.length === 0) {\n return yield* Effect.fail(new Error(`PDS endpoint missing in DID document for ${did}`));\n }\n return endpoint;\n });\n\n/** Resolve a handle or DID to its `{ did, pdsBaseUrl }`. */\nconst resolveRepo = (handleOrDid: string) =>\n Effect.gen(function* () {\n const did = handleOrDid.startsWith('did:') ? handleOrDid : yield* resolveHandle(handleOrDid);\n const pdsBaseUrl = yield* resolvePds(did);\n return { did, pdsBaseUrl };\n });\n\n// ---------------------------------------------------------------------------\n// Session — an authenticated writer to a publisher's PDS repo.\n// ---------------------------------------------------------------------------\n\n/** Direct PDS auth via an app-password session token. */\ntype AppPasswordSession = {\n readonly mode: 'app-password';\n readonly did: string;\n readonly handle: string;\n readonly pdsBaseUrl: string;\n readonly accessJwt: string;\n};\n\n/** Indirect auth: writes are DPoP-signed by Edge's `/atproto/proxy` using a personal-space token. */\ntype DpopProxySession = {\n readonly mode: 'dpop-proxy';\n readonly did: string;\n readonly handle: string;\n readonly pdsBaseUrl: string;\n readonly edgeBaseUrl: string;\n readonly spaceId: string;\n readonly accessTokenId: string;\n readonly token: string;\n readonly authHeader: string | undefined;\n};\n\nexport type Session = AppPasswordSession | DpopProxySession;\n\n/**\n * App-password session — call `com.atproto.server.createSession` against the caller's resolved\n * PDS, then return the access JWT, DID, and PDS endpoint needed for subsequent writes.\n */\nexport const createSession = (handle: string, appPassword: string) =>\n Effect.gen(function* () {\n // Issue the session against the resolved PDS — bsky.social's monolithic host won't accept\n // logins for users that have been migrated to a shard.\n const { did, pdsBaseUrl } = yield* resolveRepo(handle);\n const response = yield* xrpcPost(\n `${pdsBaseUrl}/xrpc/com.atproto.server.createSession`,\n { identifier: handle, password: appPassword },\n CreateSessionResponseSchema,\n );\n return {\n mode: 'app-password',\n did: response.did,\n handle: response.handle,\n accessJwt: response.accessJwt,\n pdsBaseUrl,\n } satisfies AppPasswordSession;\n });\n\nexport type ResolveSessionOptions = {\n /** `--handle` flag value (if any). */\n handle: string | undefined;\n /** `--app-password` flag value (if any). */\n appPassword: string | undefined;\n /** The DXOS client, used to read default credentials from the personal space. */\n client: Client;\n};\n\n/**\n * Resolve an authenticated {@link Session} for the registry commands, in precedence order:\n *\n * 1. Explicit `--handle` + `--app-password` (or `$ATPROTO_HANDLE` / `$ATPROTO_APP_PASSWORD`) →\n * app-password session (works without a DXOS identity).\n * 2. The logged-in identity's personal-space \"Atmosphere\" `AccessToken` → DPoP-proxy session.\n * 3. A context-specific error guiding the user to log in / connect an integration / pass creds.\n */\nexport const resolveSession = (options: ResolveSessionOptions) =>\n Effect.gen(function* () {\n const handle = options.handle ?? Option.getOrUndefined(yield* Config.option(Config.string('ATPROTO_HANDLE')));\n const appPassword =\n options.appPassword ?? Option.getOrUndefined(yield* Config.option(Config.string('ATPROTO_APP_PASSWORD')));\n if (handle && appPassword) {\n return yield* createSession(handle, appPassword);\n }\n\n const fromPersonalSpace = yield* resolvePersonalSpaceSession(options.client);\n if (fromPersonalSpace) {\n return fromPersonalSpace;\n }\n\n if (options.client.halo.identity.get()) {\n return yield* Effect.fail(\n new Error(\n 'No atproto integration connected. Connect one with `dx integration add`, or pass --handle/--app-password. ' +\n '(`dx account login` cannot add an integration to an existing identity.)',\n ),\n );\n }\n return yield* Effect.fail(\n new Error('No DXOS identity. Run `dx account login` first, or pass --handle/--app-password.'),\n );\n });\n\n/**\n * Build a DPoP-proxy session from the personal space's \"Atmosphere\" `AccessToken`, or `undefined`\n * if the user isn't logged in or hasn't connected an atproto integration.\n */\nconst resolvePersonalSpaceSession = (client: Client) =>\n Effect.gen(function* () {\n const space = AppSpace.getPersonalSpace(client);\n if (!space) {\n return undefined;\n }\n const tokens = (yield* Effect.promise(() =>\n space.db.query(Filter.type(AccessToken.AccessToken)).run(),\n )) as AccessToken.AccessToken[];\n const token = tokens.find((object) => object.source === ATMOSPHERE_SOURCE && !!object.account && !!object.token);\n if (!token?.account) {\n return undefined;\n }\n const { did, pdsBaseUrl } = yield* resolveRepo(token.account);\n return {\n mode: 'dpop-proxy',\n did,\n handle: token.account,\n pdsBaseUrl,\n edgeBaseUrl: client.edge.http.baseUrl,\n spaceId: space.id,\n accessTokenId: token.id,\n token: token.token,\n // Best-effort VP auth header for the proxy. The `/atproto/proxy` route currently skips auth\n // in dev; production reads the caller's verifiable presentation when present.\n authHeader: (client.edge.http as unknown as { _authHeader?: string })._authHeader,\n } satisfies DpopProxySession;\n });\n\n// ---------------------------------------------------------------------------\n// Record operations — auth-mode agnostic; branch on the session.\n// ---------------------------------------------------------------------------\n\n/**\n * Proxy an XRPC call through Edge's `/atproto/proxy`, which attaches the DPoP proof signed with\n * the key Edge stored at OAuth time. The proxy forwards `request` verbatim and returns the\n * upstream PDS response body, so callers decode the same schema as the direct path.\n */\nconst proxyCall = <T>(\n session: DpopProxySession,\n params: {\n xrpcMethod: string;\n method: 'GET' | 'POST';\n query?: Record<string, string>;\n jsonBody?: Record<string, unknown>;\n },\n schema: Schema.Schema<T> | undefined,\n) => {\n const query = params.query ? `?${new URLSearchParams(params.query).toString()}` : '';\n const innerHeaders: Record<string, string> = { Accept: 'application/json', Authorization: `DPoP ${session.token}` };\n if (params.jsonBody) {\n innerHeaders['Content-Type'] = 'application/json';\n }\n const outerHeaders: Record<string, string> = {};\n if (session.authHeader) {\n outerHeaders.Authorization = session.authHeader;\n }\n return xrpcPost(\n `${session.edgeBaseUrl.replace(/\\/$/, '')}/atproto/proxy`,\n {\n spaceId: session.spaceId,\n accessTokenId: session.accessTokenId,\n request: {\n endpoint: `${session.pdsBaseUrl}/xrpc/${params.xrpcMethod}${query}`,\n method: params.method,\n headers: innerHeaders,\n // Edge's proxy forwards the body to `fetch` as-is, so it must be a pre-serialized string.\n body: params.jsonBody ? JSON.stringify(params.jsonBody) : null,\n },\n },\n schema,\n outerHeaders,\n );\n};\n\n/** Write a record at `com.atproto.repo.putRecord` (idempotent on rkey). */\nexport const putRecord = (session: Session, collection: string, rkey: string, record: Record<string, unknown>) => {\n const body = { repo: session.did, collection, rkey, record: { $type: collection, ...record } };\n return session.mode === 'app-password'\n ? xrpcPost(`${session.pdsBaseUrl}/xrpc/com.atproto.repo.putRecord`, body, PutRecordResponseSchema, {\n Authorization: `Bearer ${session.accessJwt}`,\n })\n : proxyCall(\n session,\n { xrpcMethod: 'com.atproto.repo.putRecord', method: 'POST', jsonBody: body },\n PutRecordResponseSchema,\n );\n};\n\n/** Delete a record at `com.atproto.repo.deleteRecord`. */\nexport const deleteRecord = (session: Session, collection: string, rkey: string) => {\n const body = { repo: session.did, collection, rkey };\n return session.mode === 'app-password'\n ? xrpcPost(`${session.pdsBaseUrl}/xrpc/com.atproto.repo.deleteRecord`, body, undefined, {\n Authorization: `Bearer ${session.accessJwt}`,\n })\n : proxyCall(session, { xrpcMethod: 'com.atproto.repo.deleteRecord', method: 'POST', jsonBody: body }, undefined);\n};\n\n/**\n * List records in a single collection on the authenticated repo. Paging is left to the caller (the\n * four registry collections are tiny in practice); the cursor is surfaced on the return.\n */\nexport const listRecords = (\n session: Session,\n collection: string,\n options: { limit?: number; cursor?: string } = {},\n) => {\n const query: Record<string, string> = {\n repo: session.did,\n collection,\n ...(options.limit !== undefined ? { limit: String(options.limit) } : {}),\n ...(options.cursor !== undefined ? { cursor: options.cursor } : {}),\n };\n return session.mode === 'app-password'\n ? xrpcGet(`${session.pdsBaseUrl}/xrpc/com.atproto.repo.listRecords`, query, ListRecordsResponseSchema)\n : proxyCall(\n session,\n { xrpcMethod: 'com.atproto.repo.listRecords', method: 'GET', query },\n ListRecordsResponseSchema,\n );\n};\n\n// ---------------------------------------------------------------------------\n// Shared CLI option fragment for auth flags.\n// ---------------------------------------------------------------------------\n\nexport const AUTH_OPTION_DESCRIPTIONS = {\n handle:\n 'AT Protocol handle (e.g. alice.bsky.social). Defaults to the logged-in identity; falls back to $ATPROTO_HANDLE.',\n appPassword:\n 'AT Protocol app password (https://bsky.app/settings/app-passwords). Falls back to $ATPROTO_APP_PASSWORD. ' +\n 'Not needed when logged in via `dx account login`.',\n} as const;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { ClientService } from '@dxos/client';\nimport { type PluginProfile, type PluginRelease } from '@dxos/protocols';\n\nimport { AUTH_OPTION_DESCRIPTIONS, NSID, putRecord, resolveSession } from './util';\n\n/**\n * `dx registry publish-package` — publishes both the mutable\n * `package.profile` (rkey = key) and a `package.release`\n * (rkey = `<key>:<version>`) record to the authenticated user's PDS.\n *\n * The two writes are independent `putRecord` (upsert) calls; if the second fails the\n * first is left in place (the indexer treats a profile with no releases as\n * present-but-unpublishable, so a half-success is benign). Releases are conceptually\n * single-write per version but not enforced — see docs/registry-spec.md (Integrity).\n */\nexport const publishPackage = Command.make(\n 'publish-package',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n key: Options.text('key').pipe(\n Options.withDescription(\n 'Plugin key — a reverse-domain NSID (e.g. org.dxos.plugin.excalidraw); also the profile record rkey.',\n ),\n ),\n name: Options.text('name').pipe(Options.withDescription('Human-readable package name.')),\n description: Options.text('description').pipe(\n Options.withDescription('Short description shown in the registry.'),\n Options.withDefault(''),\n ),\n version: Options.text('version').pipe(\n Options.withDescription('Semver version (no build metadata). The release rkey is `<key>:<version>`.'),\n ),\n moduleUrl: Options.text('module-url').pipe(\n Options.withDescription('HTTPS URL to the bundle or manifest for this release.'),\n ),\n homepage: Options.text('homepage').pipe(Options.withDescription('Homepage URL.'), Options.optional),\n source: Options.text('source').pipe(Options.withDescription('Source repository URL.'), Options.optional),\n tag: Options.text('tag').pipe(\n Options.withDescription('Tag (repeatable). Categorizes the package for discovery.'),\n Options.repeated,\n ),\n iconKey: Options.text('icon-key').pipe(\n Options.withDescription('Icon identifier (e.g. ph--sparkle--regular) resolvable by @ch-ui/icons.'),\n Options.optional,\n ),\n iconHue: Options.text('icon-hue').pipe(Options.withDescription('Icon palette hue (e.g. blue).'), Options.optional),\n manifestHash: Options.text('manifest-hash').pipe(\n Options.withDescription('Optional content hash for the bundle/manifest.'),\n Options.optional,\n ),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n const createdAt = new Date().toISOString();\n\n const homepage = Option.getOrUndefined(options.homepage);\n const source = Option.getOrUndefined(options.source);\n const iconKey = Option.getOrUndefined(options.iconKey);\n const iconHue = Option.getOrUndefined(options.iconHue);\n const icon =\n iconKey !== undefined ? { key: iconKey, ...(iconHue !== undefined && { hue: iconHue }) } : undefined;\n\n const profile: PluginProfile & { createdAt: string } = {\n key: options.key,\n name: options.name,\n ...(options.description.length > 0 && { description: options.description }),\n ...(homepage !== undefined && { homePage: homepage }),\n ...(source !== undefined && { source }),\n ...(options.tag.length > 0 && { tags: options.tag }),\n ...(icon !== undefined && { icon }),\n createdAt,\n };\n\n const profileResult = yield* putRecord(session, NSID.PackageProfile, options.key, profile);\n yield* Console.log(`Profile ${profileResult.uri}`);\n\n const manifestHash = Option.getOrUndefined(options.manifestHash);\n const release: PluginRelease & { package: string; createdAt: string } = {\n package: options.key,\n version: options.version,\n moduleUrl: options.moduleUrl,\n createdAt,\n ...(manifestHash !== undefined && { manifestHash }),\n };\n\n const releaseResult = yield* putRecord(\n session,\n NSID.PackageRelease,\n `${options.key}:${options.version}`,\n release,\n );\n yield* Console.log(`Release ${releaseResult.uri}`);\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(Command.withDescription(\"Publish a package profile + release to the authenticated user's PDS.\"));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { ClientService } from '@dxos/client';\n\nimport { AUTH_OPTION_DESCRIPTIONS, NSID, putRecord, resolveSession } from './util';\n\n/**\n * `dx registry publish-publisher` — publishes the authenticated user's own\n * `org.dxos.experimental.publisher.profile` record (rkey = `self`).\n *\n * This is metadata about the publisher (the human/org), shown alongside their\n * packages once a verifier has attested to their identity.\n */\nexport const publishPublisher = Command.make(\n 'publish-publisher',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n displayName: Options.text('display-name').pipe(\n Options.withDescription('Publisher display name (the human/org name shown in UIs).'),\n ),\n bio: Options.text('bio').pipe(Options.withDescription('Short bio.'), Options.optional),\n homepageUrl: Options.text('homepage-url').pipe(\n Options.withDescription('Publisher homepage URL.'),\n Options.optional,\n ),\n contact: Options.text('contact').pipe(Options.withDescription('Contact (email, handle, etc.).'), Options.optional),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n\n const record: Record<string, unknown> = {\n displayName: options.displayName,\n };\n const bio = Option.getOrUndefined(options.bio);\n if (bio !== undefined) {\n record.bio = bio;\n }\n const homepageUrl = Option.getOrUndefined(options.homepageUrl);\n if (homepageUrl !== undefined) {\n record.homepageUrl = homepageUrl;\n }\n const contact = Option.getOrUndefined(options.contact);\n if (contact !== undefined) {\n record.contact = contact;\n }\n\n const result = yield* putRecord(session, NSID.PublisherProfile, 'self', record);\n yield* Console.log(`Publisher ${result.uri}`);\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(Command.withDescription(\"Publish the authenticated user's publisher.profile record (rkey = self).\"));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\n\nimport { ALL_NSIDS, AUTH_OPTION_DESCRIPTIONS, listRecords, resolveSession, type ListRecordsEntry } from './util';\n\n/**\n * `dx registry records` — lists all `org.dxos.experimental.*` records on the\n * authenticated user's repo. Useful for double-checking what's been published\n * and what the registry indexer is about to ingest.\n */\nexport const records = Command.make(\n 'records',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n\n // Issue listRecords against each of the four registry collections in\n // parallel. The repo is tiny so the four-fan-out is fine.\n const results = yield* Effect.all(\n ALL_NSIDS.map((collection) =>\n listRecords(session, collection).pipe(\n Effect.map(({ records: entries }) => ({ collection, records: entries })),\n // Empty collections come back as a 200 with `records: []`; if the\n // PDS responds 400 because we've never written that collection we\n // still want the others to render.\n Effect.catchAll(() => Effect.succeed({ collection, records: [] as readonly ListRecordsEntry[] })),\n ),\n ),\n { concurrency: 'unbounded' },\n );\n\n if (json) {\n yield* Console.log(JSON.stringify({ did: session.did, results }, null, 2));\n return;\n }\n\n yield* Console.log(`Repo: ${session.did} (${session.handle})`);\n for (const { collection, records: entries } of results) {\n yield* Console.log(`\\n${collection} (${entries.length})`);\n for (const entry of entries) {\n yield* Console.log(` ${entry.uri}`);\n }\n }\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(Command.withDescription(\"List org.dxos.experimental.* records on the authenticated user's repo.\"));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { ClientService } from '@dxos/client';\n\nimport { AUTH_OPTION_DESCRIPTIONS, NSID, deleteRecord, listRecords, resolveSession } from './util';\n\nconst rkeyOf = (uri: string): string => uri.split('/').pop() ?? '';\n\n/**\n * `dx registry unpublish` — removes a package from the authenticated user's PDS:\n * deletes the `package.profile` (rkey = key) and every `package.release`\n * (rkey = `<key>:<version>`). The registry indexer unindexes on its next sweep.\n * Hosted bundles in edge R2 are immutable and are not removed.\n */\nexport const unpublish = Command.make(\n 'unpublish',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n key: Options.text('key').pipe(\n Options.withDescription('Package key (the profile rkey). Removes its profile and all releases.'),\n ),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n const key = options.key;\n\n // Delete every release whose rkey is `<key>:<version>`, paging until exhausted.\n let cursor: string | undefined;\n let deletedReleases = 0;\n do {\n const releases = yield* listRecords(session, NSID.PackageRelease, { limit: 100, cursor });\n cursor = releases.cursor;\n for (const record of releases.records) {\n const rkey = rkeyOf(record.uri);\n if (rkey.startsWith(`${key}:`)) {\n yield* deleteRecord(session, NSID.PackageRelease, rkey);\n yield* Console.log(`Deleted release ${rkey}`);\n deletedReleases += 1;\n }\n }\n } while (cursor !== undefined);\n\n // Delete the profile (rkey = key).\n yield* deleteRecord(session, NSID.PackageProfile, key);\n yield* Console.log(`Deleted profile ${key} (${deletedReleases} release(s) removed)`);\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(Command.withDescription(\"Remove a package (profile + releases) from the authenticated user's PDS.\"));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { ClientService } from '@dxos/client';\n\nimport { AUTH_OPTION_DESCRIPTIONS, NSID, putRecord, resolveHandle, resolveSession } from './util';\n\n/**\n * `dx registry verify` — publishes a `org.dxos.experimental.publisher.verification`\n * record on the authenticated repo, with rkey = subject DID. Subject is given as a\n * handle or DID; handles are resolved through the public XRPC.\n *\n * Verification records are public and anyone may author them. The registry indexer only\n * honors records authored by the configured verifier (`REGISTRY_CURATOR_DID`), so this\n * command only affects discovery when run with that verifier's credentials.\n */\nexport const verify = Command.make(\n 'verify',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n subject: Options.text('subject').pipe(Options.withDescription('Handle or DID of the publisher being verified.')),\n subjectHandle: Options.text('subject-handle').pipe(\n Options.withDescription(\n 'Optional human-readable handle to record for the verified subject (defaults to --subject if it is a handle).',\n ),\n Options.optional,\n ),\n displayName: Options.text('display-name').pipe(\n Options.withDescription('Display name to record for the verified subject.'),\n ),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n\n // Subject may be passed as either a handle or a DID; resolve to a DID so the rkey is stable.\n const subjectDid = options.subject.startsWith('did:') ? options.subject : yield* resolveHandle(options.subject);\n const subjectHandle =\n Option.getOrUndefined(options.subjectHandle) ?? (options.subject.startsWith('did:') ? '' : options.subject);\n\n const record = {\n subject: subjectDid,\n ...(subjectHandle ? { handle: subjectHandle } : {}),\n displayName: options.displayName,\n createdAt: new Date().toISOString(),\n };\n\n const result = yield* putRecord(session, NSID.PublisherVerification, subjectDid, record);\n yield* Console.log(`Verified ${subjectDid} -> ${result.uri}`);\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(\n Command.withDescription(\n 'Write a publisher.verification record (indexed only if authored by the configured verifier, REGISTRY_CURATOR_DID).',\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,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;AAI1B,IAAA,eAAaC;AAEX,IAAMC,UAAiBC,UAAAA,WAAc,EAAA,GAAA,GAAA;AAErC,QAAMC,EAAAA,MAAAA,QAAUF,IAAQG,OAAAA;AACxB,QAAMC,UAASF,OAAQG,OAAMC;AAC7BC,QAAAA,UAAUH,QAAS,WAAA;AA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,WAAW,MAAA,IAAU,KAAKR,QAAQH;AAErG,QAAMa,SAAS;IACbb,SAASU;IACT,GAAIT,gBAAgB;MAAER,QAAQQ;IAAc,IAAI,CAAC;IACjDC,aAAaC,QAAQD;IACrBY,YAAW,oBAAIC,KAAAA,GAAOC,YAAW;EACnC;AAEA,QAAMC,SAAS,OAAOC,UAAUX,SAASY,KAAKC,uBAAuBV,YAAYG,MAAAA;AACjF,SAAeQ,aAAI,YAAYX,UAAAA,OAAiBO,OAAOK,GAAG,EAAE;AAC9D,CAAA,GACOC,iBAAwBC,sBAAK,CAAA,CAAA,EAExC7B,KACQC,0BACN,oHAAA,CAAA;;;AP/CG,IAAM6B,WAAwDC,eAAK,UAAA,EAAYC,KAC5EC,0BAAgB,qEAAA,GAChBC,0BAAgB;EAACC;EAASC;EAAgBC;EAAkBC;EAAWC;EAAQC;CAAQ,CAAA;;;ANjB1F,IAAMC,iBAAiBC,QAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,iBAAiB;EACzBC,UAAU;IAACC;IAAQC;;AACrB,CAAA,GACAR,QAAOS,IAAI;AAGb,IAAA,8BAAeV;",
|
|
6
|
-
"names": ["Plugin", "AppPlugin", "meta", "Command", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "handler", "manager", "Plugin", "plugins", "getPlugins", "plugin", "find", "p", "invariant", "core", "getCore", "includes", "disabled", "enabledPlugins", "profile", "enabled", "json", "id", "Console", "name", "Args", "withDescription", "pipe", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "__dxlog_file", "handler", "manager", "Plugin", "plugins", "getPlugins", "plugin", "find", "p", "invariant", "enabled", "enable", "id", "enabledPlugins", "profile", "json", "Console", "name", "Args", "withDescription", "pipe", "Command", "Console", "Effect", "Plugin", "CommandConfig", "printList", "FormBuilder", "printPlugin", "plugin", "status", "core", "enabled", "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", "profile", "key", "isCore", "id", "name", "log", "JSON", "stringify", "formatted", "printPlugin", "printList", "list", "make", "pipe", "withDescription", "plugin", "make", "pipe", "withDescription", "withSubcommands", "enable", "disable", "list", "Command", "Command", "Options", "PlatformCommand", "FetchHttpClient", "FileSystem", "Path", "Console", "Effect", "Function", "Option", "Schema", "findDxConfigFile", "loadDxConfig", "ClientService", "Context", "EdgeHttpClient", "Config2", "HttpClient", "HttpClientRequest", "Config", "Effect", "Option", "Schema", "AppSpace", "Filter", "ALL_NSIDS", "NSID", "AccessToken", "ATMOSPHERE_SOURCE", "BSKY_PUBLIC_API", "PLC_DIRECTORY", "CreateSessionResponseSchema", "Struct", "did", "String", "handle", "accessJwt", "refreshJwt", "ResolveHandleResponseSchema", "DidServiceSchema", "id", "type", "optional", "serviceEndpoint", "Unknown", "DidDocumentSchema", "service", "Array", "PutRecordResponseSchema", "uri", "cid", "ListRecordsEntrySchema", "value", "ListRecordsResponseSchema", "cursor", "records", "decodeJson", "schema", "response", "flatMap", "json", "decodeUnknown", "xrpcGet", "url", "query", "gen", "client", "HttpClient", "get", "pipe", "setUrlParams", "execute", "scoped", "xrpcPost", "body", "headers", "post", "setHeaders", "bodyJson", "req", "undefined", "resolveHandle", "map", "resolvePds", "doc", "startsWith", "rest", "slice", "length", "host", "segments", "split", "part", "decodeURIComponent", "path", "join", "fail", "Error", "find", "entry", "endpoint", "resolveRepo", "handleOrDid", "pdsBaseUrl", "createSession", "appPassword", "identifier", "password", "mode", "resolveSession", "options", "getOrUndefined", "option", "string", "fromPersonalSpace", "resolvePersonalSpaceSession", "halo", "identity", "space", "AppSpace", "getPersonalSpace", "tokens", "promise", "db", "Filter", "AccessToken", "run", "token", "object", "source", "account", "edgeBaseUrl", "edge", "http", "baseUrl", "spaceId", "accessTokenId", "authHeader", "_authHeader", "proxyCall", "session", "params", "URLSearchParams", "toString", "innerHeaders", "Accept", "Authorization", "jsonBody", "outerHeaders", "replace", "request", "xrpcMethod", "method", "JSON", "stringify", "putRecord", "collection", "rkey", "record", "repo", "$type", "deleteRecord", "listRecords", "limit", "AUTH_OPTION_DESCRIPTIONS", "__dxlog_file", "dependencies", "Schema", "String", "ensureTrailingSlash", "globalThis", "crypto", "subtle", "digest", "from", "Uint8Array", "appPassword", "Options", "dir", "text", "withDescription", "noBuild", "boolean", "pipe", "assetBaseUrl", "optional", "edgeUrl", "options", "Effect", "FileSystem", "Path", "configFile", "findDxConfigFile", "Error", "config", "tryPromise", "catch", "error", "log", "buildCommand", "binDir", "join", "exitCode", "PlatformCommand", "fs", "exists", "manifestPath", "fail", "manifestRaw", "readFileString", "key", "manifest", "version", "manifestHash", "Option", "getOrUndefined", "moduleUrl", "Console", "EdgeHttpClient", "explicitEdgeUrl", "http", "outdir", "uploadBundle", "client", "auth", "handle", "name", "createdAt", "undefined", "screenshots", "length", "profileResult", "releaseResult", "putRecord", "session", "NSID", "
|
|
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, registry } from './commands';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCommandModule({\n commands: [plugin, registry],\n }),\n Plugin.make,\n);\n\nexport default RegistryPlugin;\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.profile.key === 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.profile.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 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.profile.key === 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.profile.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.profile.key);\n const isCore = core.includes(plugin.meta.profile.key);\n return {\n id: plugin.meta.profile.key,\n name: plugin.meta.profile.name ?? plugin.meta.profile.key,\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", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { publish } from './publish';\nimport { publishPackage } from './publish-package';\nimport { publishPublisher } from './publish-publisher';\nimport { records } from './records';\nimport { unpublish } from './unpublish';\nimport { verify } from './verify';\n\n/**\n * `dx registry *` — commands for publishing and inspecting records that the\n * DXOS plugin registry indexes from AT Protocol. Auth uses an App Password\n * (per-user secret minted at https://bsky.app/settings/app-passwords); OAuth\n * support is a follow-up.\n *\n * - `publish` — config-driven: build from dx.yml, host the bundle, write records.\n * - `publish-package` — low-level: write profile + release records from flags.\n * - `publish-publisher` — write the publisher's own profile record.\n * - `unpublish` — remove a package (profile + releases) from your PDS.\n * - `verify` — write a publisher.verification record (indexed only from the configured verifier).\n * - `records` — list everything the authenticated repo has published under `org.dxos.experimental.*`.\n */\nexport const registry: Command.Command<any, any, any, any> = Command.make('registry').pipe(\n Command.withDescription('Publish to and inspect the AT Protocol-backed DXOS plugin registry.'),\n Command.withSubcommands([publish, publishPackage, publishPublisher, unpublish, verify, records]),\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as PlatformCommand from '@effect/platform/Command';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\n\nimport { findDxConfigFile, loadDxConfig } from '@dxos/app-framework/vite-plugin';\nimport { type Client, ClientService } from '@dxos/client';\nimport { Context } from '@dxos/context';\nimport { EdgeHttpClient } from '@dxos/edge-client';\nimport { Config2 } from '@dxos/protocols';\n\nimport { AUTH_OPTION_DESCRIPTIONS, NSID, putRecord, resolveSession } from './util';\n\n/** Manifest emitted by the build (subset consumed here). Extends `Config2.Plugin` with build-time fields. */\nconst ManifestSchema = Schema.Struct({\n ...Config2.Plugin.fields,\n version: Schema.String.pipe(Schema.nonEmptyString()),\n dependencies: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.String })),\n});\ntype Manifest = Schema.Schema.Type<typeof ManifestSchema>;\n\nconst ensureTrailingSlash = (url: string): string => (url.endsWith('/') ? url : `${url}/`);\n\nconst sha256Base64 = async (bytes: Uint8Array): Promise<string> => {\n const digest = await globalThis.crypto.subtle.digest('SHA-256', bytes as BufferSource);\n return Buffer.from(new Uint8Array(digest)).toString('base64');\n};\n\n/**\n * `dx registry publish` — config-driven build + publish.\n *\n * Reads the build/publish orchestration from `dx.config.ts`, runs the declared build command,\n * reads the emitted `manifest.json`, hosts the bundle (default: upload the build\n * output to the DXOS edge registry; override with `publish.assetBaseUrl` to point\n * at your own already-hosted directory), then writes the `plugin.profile` and\n * `plugin.release` records to the authenticated publisher's PDS. Release\n * integrity is anchored by `manifestHash` (sha256 of `manifest.json`) in the\n * signed release record.\n */\nexport const publish = Command.make(\n 'publish',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n dir: Options.text('dir').pipe(\n Options.withDescription('Project directory containing dx.config.ts. Defaults to the current directory.'),\n Options.withDefault('.'),\n ),\n noBuild: Options.boolean('no-build').pipe(\n Options.withDescription('Skip running the build command (publish a pre-built dist).'),\n ),\n assetBaseUrl: Options.text('asset-base-url').pipe(\n Options.withDescription('Skip upload and point the release at an already-hosted bundle directory.'),\n Options.optional,\n ),\n edgeUrl: Options.text('edge-url').pipe(\n Options.withDescription(\n 'Edge base URL for bundle upload (e.g. http://localhost:8787). Bypasses profile config; auth is skipped (requires WORKER_ENV=dev on the server).',\n ),\n Options.optional,\n ),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const dir = path.resolve(options.dir);\n\n // Load + validate the build/publish orchestration from dx.config.ts.\n const configFile = findDxConfigFile(dir);\n if (!configFile) {\n return yield* Effect.fail(new Error(`No dx.config.ts found in ${dir}.`));\n }\n const config = yield* Effect.tryPromise({\n try: () => loadDxConfig(configFile),\n catch: (error) => new Error(`Failed to load dx.config.ts in ${dir}: ${error}`),\n });\n\n // Build (unless skipped). Prepend the project's `node_modules/.bin` to PATH so\n // locally-installed tools (e.g. `vite`) resolve like they do in an npm script.\n const buildCommand = config.publish?.buildCommand;\n if (!options.noBuild && buildCommand) {\n yield* Console.log(`Building: ${buildCommand}`);\n const binDir = path.join(dir, 'node_modules', '.bin');\n const exitCode = yield* PlatformCommand.make(\n 'sh',\n '-c',\n `export PATH=\"${binDir}:$PATH\"; ${buildCommand}`,\n ).pipe(\n PlatformCommand.workingDirectory(dir),\n PlatformCommand.stdout('inherit'),\n PlatformCommand.stderr('inherit'),\n PlatformCommand.exitCode,\n );\n if (exitCode !== 0) {\n return yield* Effect.fail(new Error(`Build failed (exit ${exitCode}): ${buildCommand}`));\n }\n }\n\n // Read the emitted manifest.\n const outdir = path.join(dir, config.publish?.outputDirectory ?? 'dist');\n const manifestPath = path.join(outdir, 'manifest.json');\n if (!(yield* fs.exists(manifestPath))) {\n return yield* Effect.fail(new Error(`manifest.json not found in ${outdir}. Did the build run?`));\n }\n const manifestRaw = yield* fs.readFileString(manifestPath);\n const manifest: Manifest = yield* Schema.decodeUnknown(ManifestSchema)(JSON.parse(manifestRaw));\n const key = manifest.key;\n const version = manifest.version;\n const manifestHash = `sha256-${yield* Effect.promise(() => sha256Base64(new TextEncoder().encode(manifestRaw)))}`;\n\n // Resolve hosting → moduleUrl.\n const assetBaseUrl = Option.getOrUndefined(options.assetBaseUrl) ?? config.publish?.assetBaseUrl;\n let moduleUrl: string;\n if (assetBaseUrl) {\n moduleUrl = new URL('manifest.json', ensureTrailingSlash(assetBaseUrl)).toString();\n yield* Console.log(`Self-hosted: ${moduleUrl}`);\n } else {\n // Upload to the edge registry via the authenticated edge client (hub-identity VP).\n // When --edge-url is provided we bypass the profile's edge config and post directly\n // with auth: false — relies on WORKER_ENV=dev skipAuth on the server (local dev only).\n const explicitEdgeUrl = Option.getOrUndefined(options.edgeUrl);\n if (explicitEdgeUrl) {\n const http = new EdgeHttpClient(explicitEdgeUrl);\n moduleUrl = yield* uploadBundleDirect({ http, key, version, outdir });\n } else {\n const client = yield* ClientService;\n const hasIdentity = !!client.halo.identity.get();\n moduleUrl = yield* uploadBundle({ client, key, version, outdir, auth: hasIdentity });\n }\n yield* Console.log(`Uploaded: ${moduleUrl}`);\n }\n\n // Authenticate and write records.\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n const createdAt = new Date().toISOString();\n\n const profile: Record<string, unknown> = { key, name: manifest.name, createdAt };\n if (manifest.description !== undefined) {\n profile.description = manifest.description;\n }\n if (manifest.homePage !== undefined) {\n profile.homePage = manifest.homePage;\n }\n if (manifest.source !== undefined) {\n profile.source = manifest.source;\n }\n if (manifest.icon !== undefined) {\n profile.icon = manifest.icon;\n }\n if (manifest.tags && manifest.tags.length > 0) {\n profile.tags = manifest.tags;\n }\n if (manifest.screenshots && manifest.screenshots.length > 0) {\n profile.screenshots = manifest.screenshots;\n }\n if (manifest.dependsOn?.length) {\n profile.dependsOn = manifest.dependsOn;\n }\n if (manifest.spec !== undefined) {\n profile.spec = manifest.spec;\n }\n\n const profileResult = yield* putRecord(session, NSID.PluginProfile, key, profile);\n yield* Console.log(`Profile ${profileResult.uri}`);\n\n const releaseResult = yield* putRecord(session, NSID.PluginRelease, `${key}:${version}`, {\n pluginKey: key,\n version,\n moduleUrl,\n manifestHash,\n createdAt,\n ...(manifest.dependencies ? { dependencies: manifest.dependencies } : {}),\n });\n yield* Console.log(`Release ${releaseResult.uri}`);\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(Command.withDescription('Build, host, and publish the plugin in the current directory to the registry.'));\n\n/**\n * Upload the build output to the edge registry via the authenticated edge client.\n * The edge gates `/registry/upload` on the caller's hub identity (verifiable\n * presentation; bypassed for local dev). Release integrity is anchored by the\n * signed record's `manifestHash`, not the transport. Returns the canonical\n * `moduleUrl` (the hosted `manifest.json`), targeting the client's configured edge.\n */\nconst uploadBundle = ({\n client,\n key,\n version,\n outdir,\n auth = true,\n}: {\n client: Client;\n key: string;\n version: string;\n outdir: string;\n auth?: boolean;\n}) =>\n Effect.gen(function* () {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n\n const entries = yield* fs.readDirectory(outdir, { recursive: true });\n const files: { path: string; content: string }[] = [];\n for (const entry of entries) {\n const full = path.join(outdir, entry);\n const info = yield* fs.stat(full);\n if (info.type !== 'File') {\n continue;\n }\n const bytes = yield* fs.readFile(full);\n files.push({ path: entry.split(path.sep).join('/'), content: Buffer.from(bytes).toString('base64') });\n }\n\n const { moduleUrl } = yield* Effect.tryPromise(() =>\n client.edge.http.uploadPluginBundle(Context.default(), { slug: key, version, files }, { auth }),\n );\n return moduleUrl;\n });\n\n/**\n * Upload using a standalone EdgeHttpClient (no DXOS profile required).\n * Auth is skipped — the server must have WORKER_ENV=dev to accept unauthenticated uploads.\n */\nconst uploadBundleDirect = ({\n http,\n key,\n version,\n outdir,\n}: {\n http: EdgeHttpClient;\n key: string;\n version: string;\n outdir: string;\n}) =>\n Effect.gen(function* () {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n\n const entries = yield* fs.readDirectory(outdir, { recursive: true });\n const files: { path: string; content: string }[] = [];\n for (const entry of entries) {\n const full = path.join(outdir, entry);\n const info = yield* fs.stat(full);\n if (info.type !== 'File') {\n continue;\n }\n const bytes = yield* fs.readFile(full);\n files.push({ path: entry.split(path.sep).join('/'), content: Buffer.from(bytes).toString('base64') });\n }\n\n const { moduleUrl } = yield* Effect.tryPromise(() =>\n http.uploadPluginBundle(Context.default(), { slug: key, version, files }, { auth: false }),\n );\n return moduleUrl;\n });\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as HttpClient from '@effect/platform/HttpClient';\nimport * as HttpClientRequest from '@effect/platform/HttpClientRequest';\nimport type * as HttpClientResponse from '@effect/platform/HttpClientResponse';\nimport * as Config from 'effect/Config';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\n\nimport { AppSpace } from '@dxos/app-toolkit';\nimport { type Client } from '@dxos/client';\nimport { Filter } from '@dxos/echo';\nimport { ALL_NSIDS, NSID } from '@dxos/protocols';\nimport { AccessToken } from '@dxos/types';\n\nexport { ALL_NSIDS, NSID };\n\n/**\n * Shared helpers for the `dx registry *` commands.\n *\n * These commands write `org.dxos.experimental.*` records to a publisher's PDS via AT Protocol\n * XRPC. Auth has two modes (see {@link resolveSession}):\n *\n * - **Personal-space (default):** when logged in (`dx account login`), the publisher's atproto\n * session lives in their personal space as the \"Atmosphere\" `AccessToken`. Record writes are\n * signed by Edge's DPoP proxy (`/atproto/proxy`) — no app password required.\n * - **App password (fallback):** explicit `--handle` / `--app-password` (or `$ATPROTO_HANDLE` /\n * `$ATPROTO_APP_PASSWORD`) authenticate directly against the PDS with a session token.\n */\n\n// `AccessToken.source` of the default atproto / login integration (\"Atmosphere\"). Mirrors\n// `ATMOSPHERE_SOURCE` in plugin-connector; inlined to avoid a plugin-registry -> plugin-connector\n// dependency.\nconst ATMOSPHERE_SOURCE = 'atproto.local';\n\n// Public read-only XRPC base used for identity resolution. Works for any\n// AT Protocol identity regardless of which PDS hosts it.\nconst BSKY_PUBLIC_API = 'https://public.api.bsky.app/xrpc';\nconst PLC_DIRECTORY = 'https://plc.directory';\n\n// ---------------------------------------------------------------------------\n// Schemas (subset of XRPC response shapes we consume)\n// ---------------------------------------------------------------------------\n\nconst CreateSessionResponseSchema = Schema.Struct({\n did: Schema.String,\n handle: Schema.String,\n accessJwt: Schema.String,\n refreshJwt: Schema.String,\n});\n\nconst ResolveHandleResponseSchema = Schema.Struct({ did: Schema.String });\n\nconst DidServiceSchema = Schema.Struct({\n id: Schema.String,\n type: Schema.optional(Schema.String),\n serviceEndpoint: Schema.Unknown,\n});\nconst DidDocumentSchema = Schema.Struct({\n service: Schema.optional(Schema.Array(DidServiceSchema)),\n});\n\nconst PutRecordResponseSchema = Schema.Struct({\n uri: Schema.String,\n cid: Schema.String,\n});\nexport type PutRecordResponse = Schema.Schema.Type<typeof PutRecordResponseSchema>;\n\nconst ListRecordsEntrySchema = Schema.Struct({\n uri: Schema.String,\n cid: Schema.String,\n value: Schema.Unknown,\n});\nconst ListRecordsResponseSchema = Schema.Struct({\n cursor: Schema.optional(Schema.String),\n records: Schema.Array(ListRecordsEntrySchema),\n});\nexport type ListRecordsEntry = Schema.Schema.Type<typeof ListRecordsEntrySchema>;\n\n// ---------------------------------------------------------------------------\n// XRPC primitives\n// ---------------------------------------------------------------------------\n\nconst decodeJson =\n <T>(schema: Schema.Schema<T>) =>\n (response: HttpClientResponse.HttpClientResponse) =>\n Effect.flatMap(response.json, Schema.decodeUnknown(schema));\n\n/** GET an XRPC endpoint and decode the JSON response. */\nconst xrpcGet = <T>(url: string, query: Record<string, string>, schema: Schema.Schema<T>) =>\n Effect.gen(function* () {\n const client = yield* HttpClient.HttpClient;\n return yield* HttpClientRequest.get(url).pipe(\n HttpClientRequest.setUrlParams(query),\n client.execute,\n Effect.flatMap(decodeJson(schema)),\n Effect.scoped,\n );\n });\n\n/** POST a JSON body to an XRPC endpoint and decode the JSON response. */\nconst xrpcPost = <T>(\n url: string,\n body: Record<string, unknown>,\n schema: Schema.Schema<T> | undefined,\n headers: Record<string, string> = {},\n) =>\n Effect.gen(function* () {\n const client = yield* HttpClient.HttpClient;\n const response = yield* HttpClientRequest.post(url).pipe(\n HttpClientRequest.setHeaders(headers),\n HttpClientRequest.bodyJson(body),\n Effect.flatMap((req) => client.execute(req)),\n Effect.scoped,\n );\n if (schema === undefined) {\n return undefined as T;\n }\n return yield* decodeJson(schema)(response);\n });\n\n/** Resolve a handle (e.g. `alice.bsky.social`) to a DID via the public XRPC. */\nexport const resolveHandle = (handle: string) =>\n xrpcGet(`${BSKY_PUBLIC_API}/com.atproto.identity.resolveHandle`, { handle }, ResolveHandleResponseSchema).pipe(\n Effect.map((response) => response.did),\n );\n\n/** Resolve a DID to its PDS service endpoint via the PLC directory (or did:web well-known). */\nexport const resolvePds = (did: string) =>\n Effect.gen(function* () {\n let doc: Schema.Schema.Type<typeof DidDocumentSchema>;\n if (did.startsWith('did:plc:')) {\n doc = yield* xrpcGet(`${PLC_DIRECTORY}/${did}`, {}, DidDocumentSchema);\n } else if (did.startsWith('did:web:')) {\n const rest = did.slice('did:web:'.length);\n const [host, ...segments] = rest.split(':').map((part) => decodeURIComponent(part));\n const path = segments.length > 0 ? `/${segments.join('/')}/did.json` : '/.well-known/did.json';\n doc = yield* xrpcGet(`https://${host}${path}`, {}, DidDocumentSchema);\n } else {\n return yield* Effect.fail(new Error(`Unsupported DID method: ${did}`));\n }\n const service = doc.service?.find(\n (entry) => entry.id === '#atproto_pds' || entry.type === 'AtprotoPersonalDataServer',\n );\n const endpoint = service?.serviceEndpoint;\n if (typeof endpoint !== 'string' || endpoint.length === 0) {\n return yield* Effect.fail(new Error(`PDS endpoint missing in DID document for ${did}`));\n }\n return endpoint;\n });\n\n/** Resolve a handle or DID to its `{ did, pdsBaseUrl }`. */\nconst resolveRepo = (handleOrDid: string) =>\n Effect.gen(function* () {\n const did = handleOrDid.startsWith('did:') ? handleOrDid : yield* resolveHandle(handleOrDid);\n const pdsBaseUrl = yield* resolvePds(did);\n return { did, pdsBaseUrl };\n });\n\n// ---------------------------------------------------------------------------\n// Session — an authenticated writer to a publisher's PDS repo.\n// ---------------------------------------------------------------------------\n\n/** Direct PDS auth via an app-password session token. */\ntype AppPasswordSession = {\n readonly mode: 'app-password';\n readonly did: string;\n readonly handle: string;\n readonly pdsBaseUrl: string;\n readonly accessJwt: string;\n};\n\n/** Indirect auth: writes are DPoP-signed by Edge's `/atproto/proxy` using a personal-space token. */\ntype DpopProxySession = {\n readonly mode: 'dpop-proxy';\n readonly did: string;\n readonly handle: string;\n readonly pdsBaseUrl: string;\n readonly edgeBaseUrl: string;\n readonly spaceId: string;\n readonly accessTokenId: string;\n readonly token: string;\n readonly authHeader: string | undefined;\n};\n\nexport type Session = AppPasswordSession | DpopProxySession;\n\n/**\n * App-password session — call `com.atproto.server.createSession` against the caller's resolved\n * PDS, then return the access JWT, DID, and PDS endpoint needed for subsequent writes.\n */\nexport const createSession = (handle: string, appPassword: string) =>\n Effect.gen(function* () {\n // Issue the session against the resolved PDS — bsky.social's monolithic host won't accept\n // logins for users that have been migrated to a shard.\n const { did, pdsBaseUrl } = yield* resolveRepo(handle);\n const response = yield* xrpcPost(\n `${pdsBaseUrl}/xrpc/com.atproto.server.createSession`,\n { identifier: handle, password: appPassword },\n CreateSessionResponseSchema,\n );\n return {\n mode: 'app-password',\n did: response.did,\n handle: response.handle,\n accessJwt: response.accessJwt,\n pdsBaseUrl,\n } satisfies AppPasswordSession;\n });\n\nexport type ResolveSessionOptions = {\n /** `--handle` flag value (if any). */\n handle: string | undefined;\n /** `--app-password` flag value (if any). */\n appPassword: string | undefined;\n /** The DXOS client, used to read default credentials from the personal space. */\n client: Client;\n};\n\n/**\n * Resolve an authenticated {@link Session} for the registry commands, in precedence order:\n *\n * 1. Explicit `--handle` + `--app-password` (or `$ATPROTO_HANDLE` / `$ATPROTO_APP_PASSWORD`) →\n * app-password session (works without a DXOS identity).\n * 2. The logged-in identity's personal-space \"Atmosphere\" `AccessToken` → DPoP-proxy session.\n * 3. A context-specific error guiding the user to log in / connect an integration / pass creds.\n */\nexport const resolveSession = (options: ResolveSessionOptions) =>\n Effect.gen(function* () {\n const handle = options.handle ?? Option.getOrUndefined(yield* Config.option(Config.string('ATPROTO_HANDLE')));\n const appPassword =\n options.appPassword ?? Option.getOrUndefined(yield* Config.option(Config.string('ATPROTO_APP_PASSWORD')));\n if (handle && appPassword) {\n return yield* createSession(handle, appPassword);\n }\n\n const fromPersonalSpace = yield* resolvePersonalSpaceSession(options.client);\n if (fromPersonalSpace) {\n return fromPersonalSpace;\n }\n\n if (options.client.halo.identity.get()) {\n return yield* Effect.fail(\n new Error(\n 'No atproto integration connected. Connect one with `dx integration add`, or pass --handle/--app-password. ' +\n '(`dx account login` cannot add an integration to an existing identity.)',\n ),\n );\n }\n return yield* Effect.fail(\n new Error('No DXOS identity. Run `dx account login` first, or pass --handle/--app-password.'),\n );\n });\n\n/**\n * Build a DPoP-proxy session from the personal space's \"Atmosphere\" `AccessToken`, or `undefined`\n * if the user isn't logged in or hasn't connected an atproto integration.\n */\nconst resolvePersonalSpaceSession = (client: Client) =>\n Effect.gen(function* () {\n const space = AppSpace.getPersonalSpace(client);\n if (!space) {\n return undefined;\n }\n const tokens = (yield* Effect.promise(() =>\n space.db.query(Filter.type(AccessToken.AccessToken)).run(),\n )) as AccessToken.AccessToken[];\n const token = tokens.find((object) => object.source === ATMOSPHERE_SOURCE && !!object.account && !!object.token);\n if (!token?.account) {\n return undefined;\n }\n const { did, pdsBaseUrl } = yield* resolveRepo(token.account);\n return {\n mode: 'dpop-proxy',\n did,\n handle: token.account,\n pdsBaseUrl,\n edgeBaseUrl: client.edge.http.baseUrl,\n spaceId: space.id,\n accessTokenId: token.id,\n token: token.token,\n // Best-effort VP auth header for the proxy. The `/atproto/proxy` route currently skips auth\n // in dev; production reads the caller's verifiable presentation when present.\n authHeader: (client.edge.http as unknown as { _authHeader?: string })._authHeader,\n } satisfies DpopProxySession;\n });\n\n// ---------------------------------------------------------------------------\n// Record operations — auth-mode agnostic; branch on the session.\n// ---------------------------------------------------------------------------\n\n/**\n * Proxy an XRPC call through Edge's `/atproto/proxy`, which attaches the DPoP proof signed with\n * the key Edge stored at OAuth time. The proxy forwards `request` verbatim and returns the\n * upstream PDS response body, so callers decode the same schema as the direct path.\n */\nconst proxyCall = <T>(\n session: DpopProxySession,\n params: {\n xrpcMethod: string;\n method: 'GET' | 'POST';\n query?: Record<string, string>;\n jsonBody?: Record<string, unknown>;\n },\n schema: Schema.Schema<T> | undefined,\n) => {\n const query = params.query ? `?${new URLSearchParams(params.query).toString()}` : '';\n const innerHeaders: Record<string, string> = { Accept: 'application/json', Authorization: `DPoP ${session.token}` };\n if (params.jsonBody) {\n innerHeaders['Content-Type'] = 'application/json';\n }\n const outerHeaders: Record<string, string> = {};\n if (session.authHeader) {\n outerHeaders.Authorization = session.authHeader;\n }\n return xrpcPost(\n `${session.edgeBaseUrl.replace(/\\/$/, '')}/atproto/proxy`,\n {\n spaceId: session.spaceId,\n accessTokenId: session.accessTokenId,\n request: {\n endpoint: `${session.pdsBaseUrl}/xrpc/${params.xrpcMethod}${query}`,\n method: params.method,\n headers: innerHeaders,\n // Edge's proxy forwards the body to `fetch` as-is, so it must be a pre-serialized string.\n body: params.jsonBody ? JSON.stringify(params.jsonBody) : null,\n },\n },\n schema,\n outerHeaders,\n );\n};\n\n/** Write a record at `com.atproto.repo.putRecord` (idempotent on rkey). */\nexport const putRecord = (session: Session, collection: string, rkey: string, record: Record<string, unknown>) => {\n const body = { repo: session.did, collection, rkey, record: { $type: collection, ...record } };\n return session.mode === 'app-password'\n ? xrpcPost(`${session.pdsBaseUrl}/xrpc/com.atproto.repo.putRecord`, body, PutRecordResponseSchema, {\n Authorization: `Bearer ${session.accessJwt}`,\n })\n : proxyCall(\n session,\n { xrpcMethod: 'com.atproto.repo.putRecord', method: 'POST', jsonBody: body },\n PutRecordResponseSchema,\n );\n};\n\n/** Delete a record at `com.atproto.repo.deleteRecord`. */\nexport const deleteRecord = (session: Session, collection: string, rkey: string) => {\n const body = { repo: session.did, collection, rkey };\n return session.mode === 'app-password'\n ? xrpcPost(`${session.pdsBaseUrl}/xrpc/com.atproto.repo.deleteRecord`, body, undefined, {\n Authorization: `Bearer ${session.accessJwt}`,\n })\n : proxyCall(session, { xrpcMethod: 'com.atproto.repo.deleteRecord', method: 'POST', jsonBody: body }, undefined);\n};\n\n/**\n * List records in a single collection on the authenticated repo. Paging is left to the caller (the\n * four registry collections are tiny in practice); the cursor is surfaced on the return.\n */\nexport const listRecords = (\n session: Session,\n collection: string,\n options: { limit?: number; cursor?: string } = {},\n) => {\n const query: Record<string, string> = {\n repo: session.did,\n collection,\n ...(options.limit !== undefined ? { limit: String(options.limit) } : {}),\n ...(options.cursor !== undefined ? { cursor: options.cursor } : {}),\n };\n return session.mode === 'app-password'\n ? xrpcGet(`${session.pdsBaseUrl}/xrpc/com.atproto.repo.listRecords`, query, ListRecordsResponseSchema)\n : proxyCall(\n session,\n { xrpcMethod: 'com.atproto.repo.listRecords', method: 'GET', query },\n ListRecordsResponseSchema,\n );\n};\n\n// ---------------------------------------------------------------------------\n// Shared CLI option fragment for auth flags.\n// ---------------------------------------------------------------------------\n\nexport const AUTH_OPTION_DESCRIPTIONS = {\n handle:\n 'AT Protocol handle (e.g. alice.bsky.social). Defaults to the logged-in identity; falls back to $ATPROTO_HANDLE.',\n appPassword:\n 'AT Protocol app password (https://bsky.app/settings/app-passwords). Falls back to $ATPROTO_APP_PASSWORD. ' +\n 'Not needed when logged in via `dx account login`.',\n} as const;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { ClientService } from '@dxos/client';\nimport { type PluginProfile, type PluginRelease } from '@dxos/protocols';\n\nimport { AUTH_OPTION_DESCRIPTIONS, NSID, putRecord, resolveSession } from './util';\n\n/**\n * `dx registry publish-package` — publishes both the mutable\n * `plugin.profile` (rkey = key) and a `plugin.release`\n * (rkey = `<key>:<version>`) record to the authenticated user's PDS.\n *\n * The two writes are independent `putRecord` (upsert) calls; if the second fails the\n * first is left in place (the indexer treats a profile with no releases as\n * present-but-unpublishable, so a half-success is benign). Releases are conceptually\n * single-write per version but not enforced — see docs/registry-spec.md (Integrity).\n */\nexport const publishPackage = Command.make(\n 'publish-package',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n key: Options.text('key').pipe(\n Options.withDescription(\n 'Plugin key — a reverse-domain NSID (e.g. org.dxos.plugin.excalidraw); also the profile record rkey.',\n ),\n ),\n name: Options.text('name').pipe(Options.withDescription('Human-readable package name.')),\n description: Options.text('description').pipe(\n Options.withDescription('Short description shown in the registry.'),\n Options.withDefault(''),\n ),\n version: Options.text('version').pipe(\n Options.withDescription('Semver version (no build metadata). The release rkey is `<key>:<version>`.'),\n ),\n moduleUrl: Options.text('module-url').pipe(\n Options.withDescription('HTTPS URL to the bundle or manifest for this release.'),\n ),\n homepage: Options.text('homepage').pipe(Options.withDescription('Homepage URL.'), Options.optional),\n source: Options.text('source').pipe(Options.withDescription('Source repository URL.'), Options.optional),\n tag: Options.text('tag').pipe(\n Options.withDescription('Tag (repeatable). Categorizes the package for discovery.'),\n Options.repeated,\n ),\n iconKey: Options.text('icon-key').pipe(\n Options.withDescription('Icon identifier (e.g. ph--sparkle--regular) resolvable by @ch-ui/icons.'),\n Options.optional,\n ),\n iconHue: Options.text('icon-hue').pipe(Options.withDescription('Icon palette hue (e.g. blue).'), Options.optional),\n manifestHash: Options.text('manifest-hash').pipe(\n Options.withDescription('Optional content hash for the bundle/manifest.'),\n Options.optional,\n ),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n const createdAt = new Date().toISOString();\n\n const homepage = Option.getOrUndefined(options.homepage);\n const source = Option.getOrUndefined(options.source);\n const iconKey = Option.getOrUndefined(options.iconKey);\n const iconHue = Option.getOrUndefined(options.iconHue);\n const icon =\n iconKey !== undefined ? { key: iconKey, ...(iconHue !== undefined && { hue: iconHue }) } : undefined;\n\n const profile: PluginProfile & { createdAt: string } = {\n key: options.key,\n name: options.name,\n ...(options.description.length > 0 && { description: options.description }),\n ...(homepage !== undefined && { homePage: homepage }),\n ...(source !== undefined && { source }),\n ...(options.tag.length > 0 && { tags: options.tag }),\n ...(icon !== undefined && { icon }),\n createdAt,\n };\n\n const profileResult = yield* putRecord(session, NSID.PluginProfile, options.key, profile);\n yield* Console.log(`Profile ${profileResult.uri}`);\n\n const manifestHash = Option.getOrUndefined(options.manifestHash);\n const release: PluginRelease & { pluginKey: string; manifestHash?: string; createdAt: string } = {\n pluginKey: options.key,\n version: options.version,\n moduleUrl: options.moduleUrl,\n createdAt,\n ...(manifestHash !== undefined && { manifestHash }),\n };\n\n const releaseResult = yield* putRecord(\n session,\n NSID.PluginRelease,\n `${options.key}:${options.version}`,\n release,\n );\n yield* Console.log(`Release ${releaseResult.uri}`);\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(Command.withDescription(\"Publish a package profile + release to the authenticated user's PDS.\"));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { ClientService } from '@dxos/client';\n\nimport { AUTH_OPTION_DESCRIPTIONS, NSID, putRecord, resolveSession } from './util';\n\n/**\n * `dx registry publish-publisher` — publishes the authenticated user's own\n * `org.dxos.experimental.publisher.profile` record (rkey = `self`).\n *\n * This is metadata about the publisher (the human/org), shown alongside their\n * packages once a verifier has attested to their identity.\n */\nexport const publishPublisher = Command.make(\n 'publish-publisher',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n displayName: Options.text('display-name').pipe(\n Options.withDescription('Publisher display name (the human/org name shown in UIs).'),\n ),\n bio: Options.text('bio').pipe(Options.withDescription('Short bio.'), Options.optional),\n homepageUrl: Options.text('homepage-url').pipe(\n Options.withDescription('Publisher homepage URL.'),\n Options.optional,\n ),\n contact: Options.text('contact').pipe(Options.withDescription('Contact (email, handle, etc.).'), Options.optional),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n\n const record: Record<string, unknown> = {\n displayName: options.displayName,\n };\n const bio = Option.getOrUndefined(options.bio);\n if (bio !== undefined) {\n record.bio = bio;\n }\n const homepageUrl = Option.getOrUndefined(options.homepageUrl);\n if (homepageUrl !== undefined) {\n record.homepageUrl = homepageUrl;\n }\n const contact = Option.getOrUndefined(options.contact);\n if (contact !== undefined) {\n record.contact = contact;\n }\n\n const result = yield* putRecord(session, NSID.PublisherProfile, 'self', record);\n yield* Console.log(`Publisher ${result.uri}`);\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(Command.withDescription(\"Publish the authenticated user's publisher.profile record (rkey = self).\"));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\n\nimport { ALL_NSIDS, AUTH_OPTION_DESCRIPTIONS, type ListRecordsEntry, listRecords, resolveSession } from './util';\n\n/**\n * `dx registry records` — lists all `org.dxos.experimental.*` records on the\n * authenticated user's repo. Useful for double-checking what's been published\n * and what the registry indexer is about to ingest.\n */\nexport const records = Command.make(\n 'records',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n\n // Issue listRecords against each of the four registry collections in\n // parallel. The repo is tiny so the four-fan-out is fine.\n const results = yield* Effect.all(\n ALL_NSIDS.map((collection) =>\n listRecords(session, collection).pipe(\n Effect.map(({ records: entries }) => ({ collection, records: entries })),\n // Empty collections come back as a 200 with `records: []`; if the\n // PDS responds 400 because we've never written that collection we\n // still want the others to render.\n Effect.catchAll(() => Effect.succeed({ collection, records: [] as readonly ListRecordsEntry[] })),\n ),\n ),\n { concurrency: 'unbounded' },\n );\n\n if (json) {\n yield* Console.log(JSON.stringify({ did: session.did, results }, null, 2));\n return;\n }\n\n yield* Console.log(`Repo: ${session.did} (${session.handle})`);\n for (const { collection, records: entries } of results) {\n yield* Console.log(`\\n${collection} (${entries.length})`);\n for (const entry of entries) {\n yield* Console.log(` ${entry.uri}`);\n }\n }\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(Command.withDescription(\"List org.dxos.experimental.* records on the authenticated user's repo.\"));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { ClientService } from '@dxos/client';\n\nimport { AUTH_OPTION_DESCRIPTIONS, NSID, deleteRecord, listRecords, resolveSession } from './util';\n\nconst rkeyOf = (uri: string): string => uri.split('/').pop() ?? '';\n\n/**\n * `dx registry unpublish` — removes a plugin from the authenticated user's PDS:\n * deletes the `plugin.profile` (rkey = key) and every `plugin.release`\n * (rkey = `<key>:<version>`). The registry indexer unindexes on its next sweep.\n * Hosted bundles in edge R2 are immutable and are not removed.\n */\nexport const unpublish = Command.make(\n 'unpublish',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n key: Options.text('key').pipe(\n Options.withDescription('Plugin key (the profile rkey). Removes its profile and all releases.'),\n ),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n const key = options.key;\n\n // Delete every release whose rkey is `<key>:<version>`, paging until exhausted.\n let cursor: string | undefined;\n let deletedReleases = 0;\n do {\n const releases = yield* listRecords(session, NSID.PluginRelease, { limit: 100, cursor });\n cursor = releases.cursor;\n for (const record of releases.records) {\n const rkey = rkeyOf(record.uri);\n if (rkey.startsWith(`${key}:`)) {\n yield* deleteRecord(session, NSID.PluginRelease, rkey);\n yield* Console.log(`Deleted release ${rkey}`);\n deletedReleases += 1;\n }\n }\n } while (cursor !== undefined);\n\n // Delete the profile (rkey = key).\n yield* deleteRecord(session, NSID.PluginProfile, key);\n yield* Console.log(`Deleted profile ${key} (${deletedReleases} release(s) removed)`);\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(Command.withDescription(\"Remove a package (profile + releases) from the authenticated user's PDS.\"));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { ClientService } from '@dxos/client';\n\nimport { AUTH_OPTION_DESCRIPTIONS, NSID, putRecord, resolveHandle, resolveSession } from './util';\n\n/**\n * `dx registry verify` — publishes a `org.dxos.experimental.publisher.verification`\n * record on the authenticated repo, with rkey = subject DID. Subject is given as a\n * handle or DID; handles are resolved through the public XRPC.\n *\n * Verification records are public and anyone may author them. The registry indexer only\n * honors records authored by the configured verifier (`REGISTRY_CURATOR_DID`), so this\n * command only affects discovery when run with that verifier's credentials.\n */\nexport const verify = Command.make(\n 'verify',\n {\n handle: Options.text('handle').pipe(Options.withDescription(AUTH_OPTION_DESCRIPTIONS.handle), Options.optional),\n appPassword: Options.text('app-password').pipe(\n Options.withDescription(AUTH_OPTION_DESCRIPTIONS.appPassword),\n Options.optional,\n ),\n subject: Options.text('subject').pipe(Options.withDescription('Handle or DID of the publisher being verified.')),\n subjectHandle: Options.text('subject-handle').pipe(\n Options.withDescription(\n 'Optional human-readable handle to record for the verified subject (defaults to --subject if it is a handle).',\n ),\n Options.optional,\n ),\n displayName: Options.text('display-name').pipe(\n Options.withDescription('Display name to record for the verified subject.'),\n ),\n },\n (options) =>\n Function.pipe(\n Effect.gen(function* () {\n const client = yield* ClientService;\n const session = yield* resolveSession({\n handle: Option.getOrUndefined(options.handle),\n appPassword: Option.getOrUndefined(options.appPassword),\n client,\n });\n\n // Subject may be passed as either a handle or a DID; resolve to a DID so the rkey is stable.\n const subjectDid = options.subject.startsWith('did:') ? options.subject : yield* resolveHandle(options.subject);\n const subjectHandle =\n Option.getOrUndefined(options.subjectHandle) ?? (options.subject.startsWith('did:') ? '' : options.subject);\n\n const record = {\n subject: subjectDid,\n ...(subjectHandle ? { handle: subjectHandle } : {}),\n displayName: options.displayName,\n createdAt: new Date().toISOString(),\n };\n\n const result = yield* putRecord(session, NSID.PublisherVerification, subjectDid, record);\n yield* Console.log(`Verified ${subjectDid} -> ${result.uri}`);\n }),\n Effect.provide(FetchHttpClient.layer),\n ),\n).pipe(\n Command.withDescription(\n 'Write a publisher.verification record (indexed only if authored by the configured verifier, REGISTRY_CURATOR_DID).',\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,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;AAI1B,IAAA,eAAaC;AAEX,IAAMC,UAAiBC,UAAAA,WAAc,EAAA,GAAA,GAAA;AAErC,QAAMC,EAAAA,MAAAA,QAAUF,IAAQG,OAAAA;AACxB,QAAMC,UAASF,OAAQG,OAAMC;AAC7BC,QAAAA,UAAUH,QAAS,WAAA;AAEnB,QAAMI,UAAOR,QAAQS,KAAO,CAAA,MAAA,EAAA,KAAA,QAAA,QAAA,EAAA;AAC5BF,YAAUH,SAAMM,qBAAe,EAAA,IAAA,EAAA,YAAA,YAAkC,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,UAAA,2BAAA,EAAA,CAAA;AAEjE,QAAMC,OAAAA,QAAW,QAAOX;AACxBO,YAAUI,CAAAA,KAAAA,SAAW,EAAA,GAAA,+BAAgC,EAAA,IAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,sBAAA,qCAAA,EAAA,CAAA;AAErD,QAAA,WAAA,OAAA,QAAA,QAAkC,EAAA;AAClC,YAAMC,UAAAA,6BAAmC,EAAA,IAAA,EAAA,YAAA,YAAA,GAAA,cA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C;CAAQ,CAAA;;;ANjB1F,IAAMC,iBAAiBC,QAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,iBAAiB;EACzBC,UAAU;IAACC;IAAQC;;AACrB,CAAA,GACAR,QAAOS,IAAI;AAGb,IAAA,8BAAeV;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "meta", "Command", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "handler", "manager", "Plugin", "plugins", "getPlugins", "plugin", "find", "p", "invariant", "core", "getCore", "includes", "disabled", "enabledPlugins", "profile", "enabled", "json", "id", "Console", "name", "Args", "withDescription", "pipe", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "__dxlog_file", "handler", "manager", "Plugin", "plugins", "getPlugins", "plugin", "find", "p", "invariant", "enabled", "enable", "id", "enabledPlugins", "profile", "json", "Console", "name", "Args", "withDescription", "pipe", "Command", "Console", "Effect", "Plugin", "CommandConfig", "printList", "FormBuilder", "printPlugin", "plugin", "status", "core", "enabled", "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", "profile", "key", "isCore", "id", "name", "log", "JSON", "stringify", "formatted", "printPlugin", "printList", "list", "make", "pipe", "withDescription", "plugin", "make", "pipe", "withDescription", "withSubcommands", "enable", "disable", "list", "Command", "Command", "Options", "PlatformCommand", "FetchHttpClient", "FileSystem", "Path", "Console", "Effect", "Function", "Option", "Schema", "findDxConfigFile", "loadDxConfig", "ClientService", "Context", "EdgeHttpClient", "Config2", "HttpClient", "HttpClientRequest", "Config", "Effect", "Option", "Schema", "AppSpace", "Filter", "ALL_NSIDS", "NSID", "AccessToken", "ATMOSPHERE_SOURCE", "BSKY_PUBLIC_API", "PLC_DIRECTORY", "CreateSessionResponseSchema", "Struct", "did", "String", "handle", "accessJwt", "refreshJwt", "ResolveHandleResponseSchema", "DidServiceSchema", "id", "type", "optional", "serviceEndpoint", "Unknown", "DidDocumentSchema", "service", "Array", "PutRecordResponseSchema", "uri", "cid", "ListRecordsEntrySchema", "value", "ListRecordsResponseSchema", "cursor", "records", "decodeJson", "schema", "response", "flatMap", "json", "decodeUnknown", "xrpcGet", "url", "query", "gen", "client", "HttpClient", "get", "pipe", "setUrlParams", "execute", "scoped", "xrpcPost", "body", "headers", "post", "setHeaders", "bodyJson", "req", "undefined", "resolveHandle", "map", "resolvePds", "doc", "startsWith", "rest", "slice", "length", "host", "segments", "split", "part", "decodeURIComponent", "path", "join", "fail", "Error", "find", "entry", "endpoint", "resolveRepo", "handleOrDid", "pdsBaseUrl", "createSession", "appPassword", "identifier", "password", "mode", "resolveSession", "options", "getOrUndefined", "option", "string", "fromPersonalSpace", "resolvePersonalSpaceSession", "halo", "identity", "space", "AppSpace", "getPersonalSpace", "tokens", "promise", "db", "Filter", "AccessToken", "run", "token", "object", "source", "account", "edgeBaseUrl", "edge", "http", "baseUrl", "spaceId", "accessTokenId", "authHeader", "_authHeader", "proxyCall", "session", "params", "URLSearchParams", "toString", "innerHeaders", "Accept", "Authorization", "jsonBody", "outerHeaders", "replace", "request", "xrpcMethod", "method", "JSON", "stringify", "putRecord", "collection", "rkey", "record", "repo", "$type", "deleteRecord", "listRecords", "limit", "AUTH_OPTION_DESCRIPTIONS", "__dxlog_file", "dependencies", "Schema", "String", "ensureTrailingSlash", "globalThis", "crypto", "subtle", "digest", "from", "Uint8Array", "appPassword", "Options", "dir", "text", "withDescription", "noBuild", "boolean", "pipe", "assetBaseUrl", "optional", "edgeUrl", "options", "Effect", "FileSystem", "Path", "configFile", "findDxConfigFile", "Error", "config", "tryPromise", "catch", "error", "log", "buildCommand", "binDir", "join", "exitCode", "PlatformCommand", "fs", "exists", "manifestPath", "fail", "manifestRaw", "readFileString", "key", "manifest", "version", "manifestHash", "Option", "getOrUndefined", "moduleUrl", "Console", "EdgeHttpClient", "explicitEdgeUrl", "http", "outdir", "uploadBundle", "client", "auth", "handle", "name", "createdAt", "undefined", "screenshots", "length", "profileResult", "releaseResult", "putRecord", "session", "NSID", "PluginRelease", "entries", "readDirectory", "recursive", "full", "info", "stat", "files", "path", "entry", "content", "Command", "Options", "FetchHttpClient", "Console", "Effect", "Function", "Option", "ClientService", "publishPackage", "make", "handle", "text", "pipe", "withDescription", "AUTH_OPTION_DESCRIPTIONS", "optional", "appPassword", "key", "name", "description", "withDefault", "version", "moduleUrl", "homepage", "source", "tag", "repeated", "iconKey", "iconHue", "manifestHash", "options", "gen", "client", "ClientService", "session", "resolveSession", "getOrUndefined", "createdAt", "Date", "toISOString", "icon", "undefined", "hue", "profile", "length", "homePage", "tags", "profileResult", "putRecord", "NSID", "PluginProfile", "log", "uri", "release", "pluginKey", "releaseResult", "PluginRelease", "provide", "layer", "Command", "Options", "FetchHttpClient", "Console", "Effect", "Function", "Option", "ClientService", "publishPublisher", "make", "handle", "text", "pipe", "withDescription", "AUTH_OPTION_DESCRIPTIONS", "optional", "appPassword", "displayName", "bio", "homepageUrl", "contact", "options", "gen", "client", "ClientService", "session", "resolveSession", "getOrUndefined", "record", "undefined", "result", "putRecord", "NSID", "PublisherProfile", "log", "uri", "provide", "layer", "Command", "Options", "FetchHttpClient", "Console", "Effect", "Function", "Option", "CommandConfig", "ClientService", "records", "make", "handle", "text", "pipe", "withDescription", "AUTH_OPTION_DESCRIPTIONS", "optional", "appPassword", "options", "gen", "json", "CommandConfig", "client", "ClientService", "session", "resolveSession", "getOrUndefined", "results", "all", "ALL_NSIDS", "map", "collection", "listRecords", "entries", "catchAll", "succeed", "concurrency", "log", "JSON", "stringify", "did", "length", "entry", "uri", "provide", "layer", "Command", "Options", "FetchHttpClient", "Console", "Effect", "Function", "Option", "ClientService", "rkeyOf", "uri", "split", "pop", "unpublish", "make", "handle", "text", "pipe", "withDescription", "AUTH_OPTION_DESCRIPTIONS", "optional", "appPassword", "key", "options", "gen", "client", "ClientService", "session", "resolveSession", "getOrUndefined", "cursor", "deletedReleases", "releases", "listRecords", "NSID", "PluginRelease", "limit", "record", "records", "rkey", "startsWith", "deleteRecord", "log", "undefined", "PluginProfile", "provide", "layer", "Command", "Options", "FetchHttpClient", "Console", "Effect", "Function", "Option", "ClientService", "verify", "make", "handle", "text", "pipe", "withDescription", "AUTH_OPTION_DESCRIPTIONS", "optional", "appPassword", "subject", "subjectHandle", "displayName", "options", "gen", "client", "ClientService", "session", "resolveSession", "getOrUndefined", "subjectDid", "startsWith", "resolveHandle", "record", "createdAt", "Date", "toISOString", "result", "putRecord", "NSID", "PublisherVerification", "log", "uri", "provide", "layer", "registry", "make", "pipe", "withDescription", "withSubcommands", "publish", "publishPackage", "publishPublisher", "unpublish", "verify", "records", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addCommandModule", "commands", "plugin", "registry", "make"]
|
|
7
7
|
}
|