apps/cli/cordis.yml gains settings-local, credentials-local, and the bare
dormant llm-pi-ai row (manifest deps added for the resolver contract);
llm-deepseek drops its !!js apiKey inline for per-request credential
resolution. Both adapters tag apiKeyEnv role('credential-ref') so the
form mounts the credential control. The web e2e scaffold isolates a
harness home per run — an in-process boot must never touch the
developer's real ~/.dsh — and the new models-settings scenario pins the
whole loop through the shipped app: dormant directory as add vocabulary,
schema-driven editor apply landing in settings.yaml, the route
registering live (topology frame), and a write-only key landing in the
temp .env with the configured badge converging. A hermetic test-owned
reference name keeps a developer's real provider keys from flipping the
badge. schema-form joins the platform module table (seed + externals)
so client bundles share one instance.
40 lines
1.8 KiB
TypeScript
40 lines
1.8 KiB
TypeScript
/**
|
|
* Platform-singleton module-table. These are the ONLY entities the shell
|
|
* shares into the frozen module table — fetch bundles resolve their externals
|
|
* against exactly this set through the loader's require. Keys come from the
|
|
* platform constant module ({@link ./platform.ts}, contract C1: single source
|
|
* of truth with the tsdown client externals); values stay shell-static
|
|
* imports so every bundle sees the same instance.
|
|
*/
|
|
import * as React from 'react'
|
|
import * as ReactJsxRuntime from 'react/jsx-runtime'
|
|
import * as ReactDom from 'react-dom'
|
|
import * as ReactDomClient from 'react-dom/client'
|
|
import * as Cordis from 'cordis'
|
|
import * as UiSlots from '@deepseek-ai/dsh-client-ui-slots'
|
|
import * as WebReact from '@deepseek-ai/dsh-client-web-react'
|
|
import * as UiPrimitives from '@deepseek-ai/dsh-client-ui-primitives'
|
|
import * as SchemaForm from '@deepseek-ai/dsh-client-schema-form'
|
|
import type { PlatformModule } from './platform.ts'
|
|
|
|
/**
|
|
* Build the static table handed to the module loader at boot.
|
|
* @returns module specifier → export-surface entity (one entry per platform word).
|
|
*/
|
|
export function getStaticModules(): Record<string, unknown> {
|
|
// The satisfies pin is the projection contract: a word added to
|
|
// PLATFORM_MODULES without a static import here (or vice versa) fails to
|
|
// compile instead of drifting into a runtime require miss.
|
|
return {
|
|
'react': React,
|
|
'react/jsx-runtime': ReactJsxRuntime,
|
|
'react-dom': ReactDom,
|
|
'react-dom/client': ReactDomClient,
|
|
'cordis': Cordis,
|
|
'@deepseek-ai/dsh-client-ui-slots': UiSlots,
|
|
'@deepseek-ai/dsh-client-web-react': WebReact,
|
|
'@deepseek-ai/dsh-client-ui-primitives': UiPrimitives,
|
|
'@deepseek-ai/dsh-client-schema-form': SchemaForm,
|
|
} satisfies Record<PlatformModule, unknown>
|
|
}
|