Reset core/viewer/editor/mcp packages and apps/editor from private-editor

Wholesale swap of packages/{core,viewer,editor,mcp} and apps/editor with the
versions from the private editor repo, which is the production source of truth.

Setup changes:
- packages/{core,viewer,editor} versions held at 0.7.0 baseline (matching
  the most recent published release) so a bump=minor publishes 0.8.0
- packages/mcp held at 0.1.1 (never published; first publish will go through
  the new release.yml flow)
- peerDependencies and devDependencies for inter-package @pascal-app/*
  references pinned to ^0.7.0 instead of '*' / 'workspace:*' so they are
  valid for npm consumers
- Root package.json: TypeScript bumped to 6.0.2, added overrides for
  @types/react, @types/react-dom, @types/three to prevent JSX namespace
  fragmentation across the workspace
- release.yml extended to also publish editor and mcp; 'both' option renamed
  to 'all'; added a sync step that updates inter-package peerDeps/devDeps to
  match the new versions on every bump (so viewer/editor/mcp tarballs always
  reference the version of core they were built against)
- Root scripts gained release:editor and release:mcp shortcuts

Verification:
- bun install --frozen-lockfile is consistent
- packages/{core,viewer,mcp} build cleanly, dist/index.d.ts emitted
- packages/editor check-types reports 21 pre-existing errors, identical to
  what private-editor currently reports

Open PRs against editor-v2 will need rebasing/conflict resolution.
This commit is contained in:
Wawa
2026-05-09 20:52:26 +00:00
parent 146f0a846f
commit e618175bba
196 changed files with 5899 additions and 3966 deletions
+4 -67
View File
@@ -3,25 +3,14 @@ import type { SceneBridge } from './bridge/scene-bridge'
import { createSceneOperations, type SceneOperations } from './operations'
import { registerPrompts } from './prompts'
import { registerResources } from './resources'
import { createSceneStore } from './storage'
import type {
SceneEvent,
SceneEventAppendOptions,
SceneEventListOptions,
SceneListOptions,
SceneMeta,
SceneMutateOptions,
SceneSaveOptions,
SceneStore,
SceneWithGraph,
} from './storage/types'
import type { SceneStore } from './storage/types'
import { registerTools } from './tools'
import { registerVisionTools } from './tools/vision'
export type CreatePascalMcpServerOptions = {
bridge: SceneBridge
operations?: SceneOperations
/** Injected `SceneStore`. When omitted, `createSceneStore()` is used lazily. */
/** Required for persistence tools. Hosted apps and CLIs inject their own store. */
store?: SceneStore
name?: string
version?: string
@@ -32,63 +21,11 @@ export function createPascalMcpServer(opts: CreatePascalMcpServerOptions): McpSe
name: opts.name ?? 'pascal-mcp',
version: opts.version ?? '0.1.0',
})
const store = opts.store ?? createLazySceneStore()
const operations = opts.operations ?? createSceneOperations({ bridge: opts.bridge, store })
const operations =
opts.operations ?? createSceneOperations({ bridge: opts.bridge, store: opts.store })
registerTools(server, operations)
registerVisionTools(server, operations)
registerResources(server, operations)
registerPrompts(server, operations)
return server
}
/**
* Wrap `createSceneStore()` (which is async) behind a synchronous `SceneStore`
* facade so that `createPascalMcpServer` can remain synchronous. Each method
* resolves the underlying store on first use and memoizes it afterwards.
*/
function createLazySceneStore(): SceneStore {
let cached: Promise<SceneStore> | null = null
const resolve = (): Promise<SceneStore> => {
if (!cached) cached = createSceneStore()
return cached
}
return {
get backend(): 'sqlite' {
return 'sqlite'
},
async save(options: SceneSaveOptions): Promise<SceneMeta> {
const real = await resolve()
return real.save(options)
},
async load(id: string): Promise<SceneWithGraph | null> {
const real = await resolve()
return real.load(id)
},
async list(options?: SceneListOptions): Promise<SceneMeta[]> {
const real = await resolve()
return real.list(options)
},
async delete(id: string, options?: SceneMutateOptions): Promise<boolean> {
const real = await resolve()
return real.delete(id, options)
},
async rename(id: string, newName: string, options?: SceneMutateOptions): Promise<SceneMeta> {
const real = await resolve()
return real.rename(id, newName, options)
},
async appendSceneEvent(options: SceneEventAppendOptions): Promise<SceneEvent> {
const real = await resolve()
if (!real.appendSceneEvent) {
throw new Error('scene_events_unavailable')
}
return real.appendSceneEvent(options)
},
async listSceneEvents(id: string, options?: SceneEventListOptions): Promise<SceneEvent[]> {
const real = await resolve()
if (!real.listSceneEvents) {
throw new Error('scene_events_unavailable')
}
return real.listSceneEvents(id, options)
},
}
}