Skip to content

feat: convert to composer-plugins pnpm+moon monorepo with Changesets and SDK upgrade train#8

Open
wittjosiah wants to merge 7 commits into
mainfrom
dx-yml-meta-migration
Open

feat: convert to composer-plugins pnpm+moon monorepo with Changesets and SDK upgrade train#8
wittjosiah wants to merge 7 commits into
mainfrom
dx-yml-meta-migration

Conversation

@wittjosiah

Copy link
Copy Markdown
Member

Summary

  • Monorepo structure: packages/* workspace; excalidraw plugin moved to packages/excalidraw/; root package.json, tsconfig.base.json
  • catalogs.dxos named catalog: all @dxos/* pinned in lockstep via catalog:dxos in pnpm-workspace.yaml; scripts/set-sdk.mjs rewrites the whole catalog in one command
  • Toolchain: .prototools pins node/pnpm/moon/proto matching the dxos monorepo; .moon/ with workspace.yml, toolchains.yml, tasks/node.yml (shared typecheck/build/dev/preview tasks)
  • Changesets (independent mode): .changeset/config.json; scripts/changeset-all.mjs for coordinated SDK-bump releases; write changeset files directly (deterministic, no interactive TUI)
  • Workflows:
    • ci.ymlmoonrepo/setup-toolchain + moon run :build on PR/push
    • sdk-nightly.yml — nightly: resolve latest dxos main SHA, set-sdk.mjs pkg-pr-new, open/update SDK upgrade PR
    • sdk-npm-release.yml — manual dispatch: pin catalog to npm version + release-together changeset → PR
    • release.yml — push to release branch → Changesets version + dx registry publish per plugin; guarded against pkg.pr.new pins
  • Docs: RELEASING.md (full operational process + SDK upgrade-train); AGENTS.md (canonical agent guide ported from dxos CLAUDE.md); CLAUDE.mdAGENTS.md symlink

Test plan

  • proto install then pnpm install — lockfile resolves catalog:dxos correctly
  • moon run :build — typecheck + vite build + manifest all pass
  • moon run excalidraw:dev — dev server starts
  • node scripts/set-sdk.mjs npm 0.9.0 — rewrites pnpm-workspace.yaml dxos catalog, pnpm install resolves new versions

🤖 Generated with Claude Code

wittjosiah and others added 7 commits June 9, 2026 20:50
- Plugin metadata now lives in dx.yml (package.plugins[0]); `#meta` is synthesized
  from it at build time by the composer vite plugin, typed via
  @dxos/app-framework/meta. Removes src/meta.ts; vite.config no longer passes meta.
- Port source to the current @dxos API: echo schema (Type.makeObject + DXN,
  HiddenAnnotation, Type.InstanceType, Type.getTypename), Operation key as DXN +
  Ref output, composable/composableProps from @dxos/react-ui.
- Pin effect to 3.21.3 to match @dxos/echo (dedupes the Schema type identity).
- Add missing deps: @dxos/context, @storybook/react-vite.

NOTE: @dxos/* deps pinned to pkg.pr.new build 9586e449a7 for out-of-band
end-to-end validation; re-pin to a released main build before landing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Track the latest pkg.pr.new build in lockstep (echo-db -> echo-client) and align affected imports.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…and SDK upgrade-train workflows

- restructure: packages/* workspace (excalidraw → packages/excalidraw); root package.json,
  tsconfig.base.json, pnpm-workspace.yaml with catalogs.dxos named catalog (all @dxos/* pinned
  in lockstep via catalog:dxos)
- toolchain: .prototools pins node/pnpm/moon/proto matching dxos monorepo conventions;
  .moon/workspace.yml, toolchains.yml, tasks/node.yml (shared typecheck/build/dev/preview tasks)
- changesets: independent mode (.changeset/config.json); scripts/changeset-all.mjs for
  coordinated SDK-bump releases; scripts/set-sdk.mjs to rewrite the dxos catalog
- workflows: ci.yml (moonrepo/setup-toolchain + moon run :build); sdk-nightly.yml (nightly
  pkg.pr.new upgrade PR); sdk-npm-release.yml (dispatch → pin npm version + release-together PR);
  release.yml (push to release branch → Changesets version + dx registry publish, guarded
  against pkg.pr.new pins)
- docs: RELEASING.md (full SDK upgrade-train and release process); AGENTS.md (canonical agent
  guide ported from dxos CLAUDE.md); CLAUDE.md symlink → AGENTS.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Picks up Config2 schema changes: PluginMeta icon/screenshot shapes are
now object-only ({key, hue?} and {light?, dark?}).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the dx.yml-driven virtual #meta approach with Config2:
- dx.config.ts: defineConfig with icon/screenshot as object shapes
- src/meta.ts: Plugin.getMetaFromConfig(config) — real source module
- package.json: add `source` condition to #meta imports entry
- tsconfig.json: add #meta → src/meta.ts path mapping
- .moon/tasks/node.yml: swap dx.yml input for dx.config.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…/Plugin.Meta

- dx.config.ts: defineConfig → Config2.make, plugin.id → plugin.key, publish.outdir → outputDirectory
- migrate meta.id → meta.profile.key across source (Plugin.Meta unification)
- react-surface: replace custom predicate + role array with AppSurface.oneOf(AppSurface.object(...)) (typed role tokens)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant