|
|
@@ -1,26 +1,51 @@
|
|
|
/**
|
|
|
- * Shared declarations for `package.json.dsh`.
|
|
|
+ * Shared declarations for the package.json fields used by DSH plugin authors.
|
|
|
* Each reader owns JSON validation and resolved defaults.
|
|
|
* @module @deepseek-ai/dsh-package-manifest/types
|
|
|
*/
|
|
|
|
|
|
-/** The `dsh` property of an npm manifest; a package may declare several roles. */
|
|
|
+/** Package identity and metadata; local profile readers may accept a partial declaration. */
|
|
|
+export interface DshPackageManifest {
|
|
|
+ /** Published npm package name. */
|
|
|
+ name: string
|
|
|
+ /** Published npm package version. */
|
|
|
+ version: string
|
|
|
+ /** Package summary for discovery and display. */
|
|
|
+ description?: string
|
|
|
+ /** Prevent npm publication, for example for local profile projects. */
|
|
|
+ private?: boolean
|
|
|
+ /** Packages installed alongside this package. */
|
|
|
+ dependencies?: Record<string, string>
|
|
|
+ /** Compatible versions of packages supplied by the consuming project. */
|
|
|
+ peerDependencies?: Record<string, string>
|
|
|
+ /** Runtime requirements; DSH compatibility is declarative until a reader enforces it. */
|
|
|
+ engines?: DshEnginesManifest
|
|
|
+ /** DSH-specific author declarations. */
|
|
|
+ dsh?: DshManifest
|
|
|
+}
|
|
|
+
|
|
|
+/** Public author fields under `package.json.dsh`; a package may declare several roles. */
|
|
|
export interface DshManifest {
|
|
|
+ /** Manifest format version, independent of the npm package and Session format versions. */
|
|
|
+ manifestVersion?: 1
|
|
|
/** Bundle metadata consumed by the profile launcher. */
|
|
|
bundle?: DshBundleManifest
|
|
|
/** Profile metadata consumed by the profile launcher. */
|
|
|
profile?: DshProfileManifest
|
|
|
/** Client module loading and build metadata. */
|
|
|
client?: DshClientManifest
|
|
|
- /** Config directories consumed by the experimental deployment-image packer. */
|
|
|
- configTrees?: DshConfigTreeDeclaration[]
|
|
|
- /** Adjacent Session migration metadata consumed by the workspace catalog generator. */
|
|
|
- sessionFormatMigration?: DshSessionFormatMigrationManifest
|
|
|
- /**
|
|
|
- * Launcher-generated module proxy metadata, not an author configuration entry.
|
|
|
- * @internal
|
|
|
- */
|
|
|
- moduleFallback?: DshModuleFallbackManifest
|
|
|
+}
|
|
|
+
|
|
|
+/** Runtime version requirements under `package.json.engines`. */
|
|
|
+export interface DshEnginesManifest {
|
|
|
+ /** Compatible DSH versions as a SemVer range, including an exact version. */
|
|
|
+ dsh?: string
|
|
|
+ /** Compatible Node.js versions. */
|
|
|
+ node?: string
|
|
|
+ /** Compatible npm versions. */
|
|
|
+ npm?: string
|
|
|
+ /** Requirements for additional runtimes or package managers. */
|
|
|
+ [engine: string]: string | undefined
|
|
|
}
|
|
|
|
|
|
/** The configuration layer exported by a bundle package. */
|
|
|
@@ -55,45 +80,3 @@ export interface DshClientManifest {
|
|
|
*/
|
|
|
external?: string[]
|
|
|
}
|
|
|
-
|
|
|
-/** One config directory read from the CLI package by the experimental image packer. */
|
|
|
-export interface DshConfigTreeDeclaration {
|
|
|
- /** Non-empty destination path in the image; mount values must be unique. */
|
|
|
- mount: string
|
|
|
- /** Non-empty source directory path relative to the declaring package root. */
|
|
|
- path: string
|
|
|
- /** Include the directory's YAML plugin rows in the package roster; absent means false. */
|
|
|
- scanRoster?: boolean
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * Adjacent Session migration metadata declared on disk. The catalog generator
|
|
|
- * discovers only packages/session/session-format-vN-to-vN+1, not external plugins.
|
|
|
- */
|
|
|
-export interface DshSessionFormatMigrationManifest {
|
|
|
- /** Non-negative safe integer source version; negative zero is rejected. */
|
|
|
- from: number
|
|
|
- /** Non-negative safe integer target version, exactly from + 1. */
|
|
|
- to: number
|
|
|
- /** Non-empty package export path, such as `.` or `./migration`. */
|
|
|
- export: string
|
|
|
- /** Non-empty named export of the migration implementation. */
|
|
|
- migration: string
|
|
|
- /** Non-empty named export of the source version codec. */
|
|
|
- sourceCodec: string
|
|
|
- /** Non-empty named export of the target version codec. */
|
|
|
- targetCodec: string
|
|
|
- /** Non-empty named export of the target header validator. */
|
|
|
- targetHeaderValidator: string
|
|
|
- /** Non-empty named export of the target version restorer. */
|
|
|
- targetRestorer: string
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * Metadata generated and read by the launcher's module fallback proxies.
|
|
|
- * @internal
|
|
|
- */
|
|
|
-export interface DshModuleFallbackManifest {
|
|
|
- /** Package export subpaths mapped to resolved target file URLs. */
|
|
|
- targets: Record<string, string>
|
|
|
-}
|