@powerhousedao/host-core 6.2.3-dev.70 → 6.2.3-dev.71
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/compound-B6RZMA0Y.mjs +2804 -0
- package/dist/compound-B6RZMA0Y.mjs.map +1 -0
- package/dist/compound-PhoVeqe1.d.mts +2401 -0
- package/dist/compound-PhoVeqe1.d.mts.map +1 -0
- package/dist/env-substitution-C_fVirPh.d.mts +17 -0
- package/dist/env-substitution-C_fVirPh.d.mts.map +1 -0
- package/dist/env-substitution-Dj3pdsut.mjs +330 -0
- package/dist/env-substitution-Dj3pdsut.mjs.map +1 -0
- package/dist/host-schemas-mqOYNGot.d.mts +2153 -0
- package/dist/host-schemas-mqOYNGot.d.mts.map +1 -0
- package/dist/index.d.mts +908 -691
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +335 -109
- package/dist/index.mjs.map +1 -1
- package/dist/plugins-XL6WsvTL.d.mts +182 -0
- package/dist/plugins-XL6WsvTL.d.mts.map +1 -0
- package/dist/plugins.d.mts +2 -120
- package/dist/plugins.mjs.map +1 -1
- package/dist/projection.d.mts +586 -0
- package/dist/projection.d.mts.map +1 -0
- package/dist/projection.mjs +1505 -0
- package/dist/projection.mjs.map +1 -0
- package/dist/runners/compound.d.mts +157 -12
- package/dist/runners/compound.d.mts.map +1 -1
- package/dist/runners/compound.mjs +5 -13
- package/dist/runners/compound.mjs.map +1 -1
- package/dist/schema.d.mts +105 -0
- package/dist/schema.d.mts.map +1 -0
- package/dist/schema.mjs +35 -0
- package/dist/schema.mjs.map +1 -0
- package/package.json +16 -4
- package/dist/compound-C8P0kvPJ.d.mts +0 -157
- package/dist/compound-C8P0kvPJ.d.mts.map +0 -1
- package/dist/host-schemas-CtPNRr5v.mjs +0 -720
- package/dist/host-schemas-CtPNRr5v.mjs.map +0 -1
- package/dist/plugins.d.mts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"host-schemas-CtPNRr5v.mjs","names":[],"sources":["../src/connect-projection.ts","../src/host-loader.ts","../src/runner-resolver.ts","../src/run-record.ts","../src/placeholders.ts","../src/compound.ts","../src/drives.ts","../src/host-schemas.ts"],"sourcesContent":["import type {\n PHConnectDefaultDrive,\n PHConnectRuntimeConfig,\n} from \"@powerhousedao/shared/clis\";\n\n/**\n * Instance-fact projection for compound hosts: the drives a compound's\n * reactor member created, projected into the Connect member's runtime-config\n * override. Pure functions, moved from ph-cli's vetra service so the generic\n * compound and the classic path share one implementation.\n */\n\nfunction isLocalDrive(\n drive: PHConnectDefaultDrive,\n): drive is Extract<PHConnectDefaultDrive, { local: true }> {\n return \"local\" in drive;\n}\n\n// Identity key for de-duplication: remote entries are keyed by URL; local\n// entries are keyed by `local:<id>` so a local drive id can never collide\n// with a remote URL that happens to be the same string.\nconst driveKey = (drive: PHConnectDefaultDrive): string =>\n isLocalDrive(drive) ? `local:${drive.id}` : drive.url;\n\n/**\n * Concatenate groups of `connect.drives.defaultDrives` in the order given,\n * de-duplicating by drive identity (URL for remote entries, id for local\n * ones). The first occurrence of a drive wins, so earlier groups keep their\n * position and metadata — e.g. the Vetra drive `ph vetra` starts stays first\n * even when the project's `powerhouse.config.json` lists the same drive.\n */\nexport function mergeDefaultDrives(\n ...groups: PHConnectDefaultDrive[][]\n): PHConnectDefaultDrive[] {\n const seen = new Set<string>();\n const out: PHConnectDefaultDrive[] = [];\n for (const group of groups) {\n for (const drive of group) {\n const key = driveKey(drive);\n if (seen.has(key)) continue;\n seen.add(key);\n out.push(drive);\n }\n }\n return out;\n}\n\n/**\n * Rebase a local drive URL onto a public base: keeps the /d/<slug> path,\n * swaps the loopback origin for the public base. Browser clients behind a\n * reverse proxy can't reach http://localhost:<port>. Non-loopback URLs\n * (e.g. a remote drive) are already public and pass through unchanged, as do\n * unparseable ones.\n */\nexport function rebaseDriveUrl(driveUrl: string, publicBase: string): string {\n let url: URL;\n try {\n url = new URL(driveUrl);\n } catch {\n return driveUrl;\n }\n if (![\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(url.hostname)) {\n return driveUrl;\n }\n return `${publicBase.replace(/\\/+$/, \"\")}${url.pathname}`;\n}\n\nexport interface DriveProjectionInput {\n /** Drive URLs the compound's reactor member created, in display order\n * (e.g. vetra, preview, workflows). Null/undefined entries are skipped. */\n createdDriveUrls: (string | null | undefined)[];\n /** The project's configured `connect.drives.defaultDrives`. */\n configuredDefaultDrives?: PHConnectDefaultDrive[];\n /** `--drives-public-base`: advertise proxy-reachable URLs to the browser. */\n publicBase?: string | null;\n}\n\n/**\n * The compound's drives projection: created drives first (rebased onto the\n * public base when given), then the project's configured drives, de-duplicated\n * — and `preserve-all`, because compound-injected drive lists change per\n * launch context and must never detach drives the user added by hand.\n */\nexport function projectDrivesIntoConnect(\n input: DriveProjectionInput,\n): Pick<PHConnectRuntimeConfig, \"drives\"> {\n const created: PHConnectDefaultDrive[] = input.createdDriveUrls\n .filter((url): url is string => typeof url === \"string\" && url.length > 0)\n .map((url) => ({\n url: input.publicBase ? rebaseDriveUrl(url, input.publicBase) : url,\n name: null,\n icon: null,\n }));\n return {\n drives: {\n defaultDrives: mergeDefaultDrives(\n created,\n input.configuredDefaultDrives ?? [],\n ),\n preserveStrategy: \"preserve-all\",\n },\n };\n}\n","import { existsSync, readdirSync, readFileSync, statSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\n\n/**\n * Loads and pre-validates a `hosts/<name>/host.js` definition.\n *\n * A host file is a static PROJECTION of powerhouse.config.json: plain ESM,\n * default-exporting a data object. Three gates run before any runner sees it:\n * 1. import lint — the only legal import is the project's\n * powerhouse.config.json (host files are data, not programs);\n * 2. static check — the exported object must survive a JSON round trip\n * (functions, undefined, class instances, Dates etc. are rejected,\n * reporting the offending path);\n * 3. shape pre-check — `name`, `runner.module`, and the reactor XOR children\n * rule. Full validation is the runner's `hostSchema` (phase 2).\n *\n * This module never exits the process — callers own error presentation.\n */\n\nconst HOST_FILE = \"host.js\";\nconst CONFIG_IMPORT_SUFFIX = \"powerhouse.config.json\";\n\nexport class HostLoadError extends Error {\n constructor(message: string, hint?: string) {\n super(hint ? `${message}\\n Hint: ${hint}` : message);\n this.name = \"HostLoadError\";\n }\n}\n\nexport type HostsFolderStatus =\n | { kind: \"absent\" }\n | { kind: \"empty\"; dir: string }\n | { kind: \"present\"; dir: string; hosts: string[] };\n\n/** A `hosts/` folder with no `<name>/host.js` inside is \"empty\" — the guard\n * state: callers warn loudly and fall back to legacy rather than activating\n * the new architecture off a stray `mkdir hosts`. */\nexport function probeHostsFolder(projectRoot: string): HostsFolderStatus {\n const dir = path.join(projectRoot, \"hosts\");\n if (!existsSync(dir) || !statSync(dir).isDirectory()) {\n return { kind: \"absent\" };\n }\n const hosts = readdirSync(dir, { withFileTypes: true })\n .filter(\n (entry) =>\n entry.isDirectory() &&\n existsSync(path.join(dir, entry.name, HOST_FILE)),\n )\n .map((entry) => entry.name)\n .sort();\n return hosts.length === 0\n ? { kind: \"empty\", dir }\n : { kind: \"present\", dir, hosts };\n}\n\n/** Sibling host imports: `../<host>/host.js` — source material for derived\n * compositions (full-inclusion wrappers compute over them with plain JS). */\nconst SIBLING_IMPORT = /^\\.\\.\\/([A-Za-z0-9_-]+)\\/host\\.js$/;\n\n/** Rejects every import except the project's powerhouse.config.json and\n * SIBLING host files (R1: derived compositions), plus any dynamic\n * `import(...)` or `require(...)`. Source-level enforcement: the JSON round\n * trip below is the hard gate; this one produces the better error. Returns\n * the sibling host names the file imports, for cycle detection. */\nexport function lintHostImports(source: string, file: string): string[] {\n const siblings: string[] = [];\n for (const match of source.matchAll(\n /^\\s*import\\b[^;'\"]*?from\\s+[\"']([^\"']+)[\"']/gm,\n )) {\n const specifier = match[1];\n if (specifier.endsWith(CONFIG_IMPORT_SUFFIX)) continue;\n const sibling = SIBLING_IMPORT.exec(specifier);\n if (sibling) {\n siblings.push(sibling[1]);\n continue;\n }\n throw new HostLoadError(\n `${file} imports \"${specifier}\" — a host file may only import the project's powerhouse.config.json or sibling hosts/<name>/host.js files.`,\n \"Host files are static projections; code belongs in plugins or the runner.\",\n );\n }\n if (/^\\s*import\\s+[\"']/m.test(source)) {\n throw new HostLoadError(\n `${file} contains a side-effect import — a host file may only import the project's powerhouse.config.json or sibling host files.`,\n );\n }\n if (/\\bimport\\s*\\(/.test(source) || /\\brequire\\s*\\(/.test(source)) {\n throw new HostLoadError(\n `${file} uses dynamic import()/require() — host files are static data.`,\n );\n }\n return siblings;\n}\n\n/** Walks the sibling-import graph from `hostName`, linting every visited file\n * and failing on a cycle (an ESM circular would otherwise surface as an\n * undefined default export with no useful message). */\nexport function lintHostImportGraph(hostsDir: string, hostName: string): void {\n const state = new Map<string, \"visiting\" | \"done\">();\n const visit = (name: string, chain: string[]): void => {\n const mark = state.get(name);\n if (mark === \"done\") return;\n if (mark === \"visiting\") {\n throw new HostLoadError(\n `Host import cycle: ${[...chain, name].map((n) => `hosts/${n}`).join(\" -> \")}.`,\n \"Hoist the shared data into one host (or powerhouse.config.json) instead of importing both ways.\",\n );\n }\n const file = path.join(hostsDir, name, HOST_FILE);\n if (!existsSync(file)) {\n throw new HostLoadError(\n `hosts/${chain[chain.length - 1] ?? name} imports sibling \"hosts/${name}/host.js\", which does not exist.`,\n );\n }\n state.set(name, \"visiting\");\n const siblings = lintHostImports(readFileSync(file, \"utf8\"), file);\n for (const sibling of siblings) visit(sibling, [...chain, name]);\n state.set(name, \"done\");\n };\n visit(hostName, []);\n}\n\n/** Returns the path of the first value that would not survive a JSON round\n * trip, or undefined when the object is fully static. */\nexport function findNonStaticValue(\n value: unknown,\n trail = \"\",\n): string | undefined {\n if (value === null) return undefined;\n const kind = typeof value;\n if (kind === \"string\" || kind === \"number\" || kind === \"boolean\") {\n return undefined;\n }\n if (kind !== \"object\") {\n return `${trail || \"<root>\"} (${kind})`;\n }\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const hit = findNonStaticValue(value[i], `${trail}[${i}]`);\n if (hit) return hit;\n }\n return undefined;\n }\n const proto: unknown = Object.getPrototypeOf(value);\n if (proto !== Object.prototype && proto !== null) {\n return `${trail || \"<root>\"} (non-plain object)`;\n }\n for (const [key, child] of Object.entries(value as Record<string, unknown>)) {\n const hit = findNonStaticValue(child, trail ? `${trail}.${key}` : key);\n if (hit) return hit;\n }\n return undefined;\n}\n\nexport interface HostDefinition {\n name: string;\n runner: { module: string } & Record<string, unknown>;\n config?: Record<string, unknown>;\n profile?: Record<string, unknown>;\n reactor?: Record<string, unknown>;\n children?: Record<string, unknown>;\n}\n\nexport interface LoadedHost {\n name: string;\n dir: string;\n file: string;\n host: HostDefinition;\n}\n\nfunction assertHostShape(\n host: Record<string, unknown>,\n file: string,\n): asserts host is HostDefinition & Record<string, unknown> {\n if (typeof host.name !== \"string\" || host.name.length === 0) {\n throw new HostLoadError(`${file}: \\`name\\` must be a non-empty string.`);\n }\n const runner = host.runner;\n if (\n runner === null ||\n typeof runner !== \"object\" ||\n typeof (runner as Record<string, unknown>).module !== \"string\"\n ) {\n throw new HostLoadError(\n `${file}: \\`runner\\` must be an object with a \\`module\\` specifier string.`,\n );\n }\n if (host.reactor !== undefined && host.children !== undefined) {\n throw new HostLoadError(\n `${file}: \\`reactor\\` and \\`children\\` are mutually exclusive — a host is a reactor runner or a compound runner, never both.`,\n );\n }\n}\n\nexport async function loadHost(\n projectRoot: string,\n hostName: string,\n): Promise<LoadedHost> {\n const probe = probeHostsFolder(projectRoot);\n if (probe.kind === \"absent\") {\n throw new HostLoadError(\n `No hosts/ folder found in ${projectRoot}.`,\n \"Scaffold one with `ph init --uniform-runners` (or create hosts/<name>/host.js).\",\n );\n }\n if (probe.kind === \"empty\") {\n throw new HostLoadError(\n `hosts/ exists at ${probe.dir} but contains no <name>/host.js.`,\n \"An empty hosts/ folder does not activate the uniform-runners architecture; add a host definition or remove the folder.\",\n );\n }\n if (!probe.hosts.includes(hostName)) {\n throw new HostLoadError(\n `Unknown host \"${hostName}\". Available hosts: ${probe.hosts.join(\", \")}.`,\n );\n }\n\n const file = path.join(probe.dir, hostName, HOST_FILE);\n lintHostImportGraph(probe.dir, hostName);\n\n const module = (await import(pathToFileURL(file).href)) as {\n default?: unknown;\n };\n const host = module.default;\n if (host === null || typeof host !== \"object\" || Array.isArray(host)) {\n throw new HostLoadError(\n `${file} must default-export the host object (\\`export default { name, runner, ... }\\`).`,\n );\n }\n\n const nonStatic = findNonStaticValue(host);\n if (nonStatic) {\n throw new HostLoadError(\n `${file} exports a non-static value at \\`${nonStatic}\\` — host files must survive a JSON round trip.`,\n \"Runtime behavior belongs in the runner; host files only carry data.\",\n );\n }\n\n assertHostShape(host as Record<string, unknown>, file);\n return {\n name: hostName,\n dir: path.dirname(file),\n file,\n host: host as HostDefinition,\n };\n}\n","import { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport type { HostDefinition } from \"./host-loader.js\";\n\n/**\n * Resolves a host's `runner.module` specifier from the PROJECT's dependency\n * tree (not ph-cli's), imports it, and checks the runner-module contract:\n * `{ run, hostSchema, kind, ...optionalVerbs }`. Phase-0 home is ph-cli; the\n * uniform-runners plan moves this into @powerhousedao/host-core with the\n * generic compound (phase 1).\n */\n\nexport class RunnerError extends Error {\n constructor(message: string, hint?: string) {\n super(hint ? `${message}\\n Hint: ${hint}` : message);\n this.name = \"RunnerError\";\n }\n}\n\nexport interface RunnerContext {\n projectRoot: string;\n verb: string;\n env: Record<string, string | undefined>;\n}\n\nexport type RunnerVerb = (\n host: HostDefinition,\n ctx: RunnerContext,\n) => Promise<unknown>;\n\n/** zod-shaped structurally, so this module needs no zod dependency. */\nexport interface HostSchemaLike {\n safeParse(host: unknown): {\n success: boolean;\n error?: { issues?: { path: (string | number)[]; message: string }[] };\n };\n}\n\nexport interface RunnerModule {\n run: RunnerVerb;\n hostSchema: HostSchemaLike;\n kind: string;\n [key: string]: unknown;\n}\n\n/** Exports that are part of the contract but are not verbs. */\nconst NON_VERB_EXPORTS = new Set([\"hostSchema\", \"kind\", \"default\"]);\n\nexport async function resolveRunnerModule(\n projectRoot: string,\n specifier: string,\n): Promise<RunnerModule> {\n const projectRequire = createRequire(\n pathToFileURL(path.join(projectRoot, \"package.json\")).href,\n );\n let resolved: string;\n try {\n resolved = projectRequire.resolve(specifier);\n } catch {\n throw new RunnerError(\n `Cannot resolve runner module \"${specifier}\" from ${projectRoot}.`,\n \"The runner must be a dependency of the project (install it, then retry).\",\n );\n }\n\n const module = (await import(pathToFileURL(resolved).href)) as Record<\n string,\n unknown\n >;\n\n if (typeof module.run !== \"function\") {\n throw new RunnerError(\n `Runner \"${specifier}\" does not export a \\`run\\` function (required verb).`,\n );\n }\n const hostSchema = module.hostSchema as HostSchemaLike | undefined;\n if (!hostSchema || typeof hostSchema.safeParse !== \"function\") {\n throw new RunnerError(\n `Runner \"${specifier}\" does not export a \\`hostSchema\\` — runners validate their own host shape.`,\n );\n }\n if (typeof module.kind !== \"string\") {\n throw new RunnerError(\n `Runner \"${specifier}\" does not export \\`kind\\` (e.g. \"reactor\" | \"compound\").`,\n );\n }\n return module as unknown as RunnerModule;\n}\n\nexport function listVerbs(runner: RunnerModule): string[] {\n return Object.entries(runner)\n .filter(\n ([name, value]) =>\n typeof value === \"function\" && !NON_VERB_EXPORTS.has(name),\n )\n .map(([name]) => name)\n .sort();\n}\n\nexport function getVerb(\n runner: RunnerModule,\n specifier: string,\n verb: string,\n): RunnerVerb {\n const candidate = runner[verb];\n if (typeof candidate !== \"function\" || NON_VERB_EXPORTS.has(verb)) {\n throw new RunnerError(\n `Runner \"${specifier}\" does not support the verb \"${verb}\". Supported verbs: ${listVerbs(\n runner,\n ).join(\", \")}.`,\n );\n }\n return candidate as RunnerVerb;\n}\n\nexport function validateHost(\n runner: RunnerModule,\n specifier: string,\n host: HostDefinition,\n file: string,\n): void {\n const result = runner.hostSchema.safeParse(host);\n if (!result.success) {\n const issues = (result.error?.issues ?? [])\n .map(\n (issue) => ` - ${issue.path.join(\".\") || \"<root>\"}: ${issue.message}`,\n )\n .join(\"\\n\");\n throw new RunnerError(\n `${file} failed validation against the hostSchema of \"${specifier}\":\\n${issues || \" (no details reported)\"}`,\n );\n }\n}\n","import { resolvePhDir } from \"@powerhousedao/shared/clis/ph-dir\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\n/**\n * A running host's `.ph/run/<host>.json` record: what is live for this\n * project, keyed by host name so N hosts (vetra, desktop, …) coexist. This is\n * the generic form of ph-cli's vetra-runtime record; the compound writes one\n * per supervised host and (for compatibility) keeps the legacy\n * vetra-runtime.json in step while agent tooling still reads it (D1.c).\n */\nexport interface RunRecordMember {\n port?: number;\n url?: string;\n}\n\nexport interface RunRecord {\n pid: number;\n hostName: string;\n projectName: string;\n startedAt: string;\n members: Record<string, RunRecordMember>;\n /** Host-specific extras (e.g. mcpUrl) a runner wants in the record. */\n extra?: Record<string, unknown>;\n}\n\nexport type RunProbe =\n | { status: \"none\" }\n | { status: \"stale\"; record: RunRecord }\n | { status: \"live\"; record: RunRecord }\n | { status: \"foreign\"; record: RunRecord };\n\n// Under the project's .ph tree — relocated with it by PH_USER_DATA_DIR.\nconst runDir = (projectDir: string) =>\n path.join(resolvePhDir(projectDir), \"run\");\nconst recordPath = (projectDir: string, hostName: string) =>\n path.join(runDir(projectDir), `${hostName}.json`);\n\nexport function readRunRecord(\n projectDir: string,\n hostName: string,\n): RunRecord | undefined {\n try {\n return JSON.parse(\n fs.readFileSync(recordPath(projectDir, hostName), \"utf8\"),\n ) as RunRecord;\n } catch {\n return undefined;\n }\n}\n\nexport function writeRunRecord(projectDir: string, record: RunRecord): void {\n const target = recordPath(projectDir, record.hostName);\n fs.mkdirSync(path.dirname(target), { recursive: true });\n fs.writeFileSync(target, `${JSON.stringify(record, null, 2)}\\n`);\n}\n\nexport function clearRunRecord(projectDir: string, hostName: string): void {\n try {\n fs.rmSync(recordPath(projectDir, hostName));\n } catch {\n // already gone\n }\n}\n\nexport function isPidAlive(pid: number): boolean {\n try {\n process.kill(pid, 0);\n return true;\n } catch (error) {\n // EPERM = the process exists but belongs to another user.\n return (error as NodeJS.ErrnoException).code === \"EPERM\";\n }\n}\n\n/**\n * Decide whether the recorded instance is this project's live host.\n *\n * pid liveness alone proves nothing (pids are reused), and the recorded\n * projectName is what separates \"my instance\" from \"a different project that\n * happens to hold this storage root\" — the confusion the vetra lock exists to\n * prevent. A stale record (dead pid) is reported so the caller can clear it; a\n * foreign one (live pid, different project) is left alone.\n */\nexport function probeRun(\n projectDir: string,\n hostName: string,\n projectName: string,\n): RunProbe {\n const record = readRunRecord(projectDir, hostName);\n if (!record) return { status: \"none\" };\n if (!isPidAlive(record.pid)) return { status: \"stale\", record };\n if (record.projectName !== projectName) return { status: \"foreign\", record };\n return { status: \"live\", record };\n}\n","import path from \"node:path\";\n\n/**\n * `${userData}` resolution for host files (desktop shape): storage paths in a\n * host must not derive from the instance name (renames must stay safe), so\n * the host file writes `${userData}/.ph/reactor-storage` and the RUNNER\n * resolves it at start. `${userData}` is a PROJECT-SHAPED root: its `.ph`\n * subtree carries the same names the classic commands use under\n * `<project>/.ph` (see `resolvePhDir`). In the CLI it IS the project root, so\n * `ph run desktop` in a project shares the one `.ph` tree `ph vetra` uses;\n * a shell (Tauri) points it at the OS profile via PH_USER_DATA_DIR, and the\n * whole `.ph` tree — stores, identity, run records — follows.\n */\nexport function defaultUserDataDir(\n projectRoot: string,\n env: Record<string, string | undefined> = process.env,\n): string {\n return env.PH_USER_DATA_DIR ?? path.resolve(projectRoot);\n}\n\nconst PLACEHOLDER = /\\$\\{userData\\}/g;\n\n/** Deep-substitute `${userData}` in every string of a JSON-shaped value.\n * Non-strings pass through; the input is never mutated. */\nexport function resolveUserDataPlaceholders<T>(value: T, userData: string): T {\n if (typeof value === \"string\") {\n return value.replace(PLACEHOLDER, userData) as unknown as T;\n }\n if (Array.isArray(value)) {\n return value.map((v) =>\n resolveUserDataPlaceholders<unknown>(v, userData),\n ) as T;\n }\n if (value !== null && typeof value === \"object\") {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) {\n out[k] = resolveUserDataPlaceholders(v, userData);\n }\n return out as T;\n }\n return value;\n}\n","import type { HostDefinition } from \"./host-loader.js\";\nimport { loadHost } from \"./host-loader.js\";\nimport { projectDrivesIntoConnect } from \"./connect-projection.js\";\nimport {\n defaultUserDataDir,\n resolveUserDataPlaceholders,\n} from \"./placeholders.js\";\nimport {\n clearRunRecord,\n probeRun,\n writeRunRecord,\n type RunRecordMember,\n} from \"./run-record.js\";\nimport {\n getVerb,\n resolveRunnerModule,\n validateHost,\n type RunnerContext,\n} from \"./runner-resolver.js\";\n\n/**\n * The generic compound runner: supervises the members a compound host\n * declares, each started via its OWN declared runner at the compound's member\n * verb. It projects a reactor member's created drives into a connect member's\n * config, writes a .ph/run/<host>.json record, holds a per-project lock, and\n * tears members down in reverse order on shutdown.\n *\n * Phase-1 model is ATTACHED and in-process: member runner verbs start their\n * servers (which hold the event loop) and return a handle of facts; the\n * compound stays alive as long as they do. Detached supervision is phase 5.\n */\n\n/** Facts a member runner verb returns so the compound can project and tear\n * down. All optional: a void-returning verb is treated as \"started, no facts,\n * self-sustaining\" (the phase-0 bridges). */\nexport interface RunnerHandle {\n /** Port the member bound. */\n port?: number;\n /** Drive URLs a reactor member created, in display order — projected into a\n * connect member's defaultDrives. */\n driveUrls?: (string | null | undefined)[];\n /** Named endpoints (graphql, mcp, …) for the run record / diagnostics. */\n endpoints?: Record<string, string>;\n /** Resolves when the member is serving; the compound awaits it before the\n * next member when ordering requires readiness. */\n ready?: Promise<void>;\n /** Reverse-order teardown. */\n shutdown?: () => void | Promise<void>;\n}\n\nexport interface CompoundMember {\n host: string;\n plugins?: string[];\n runner?: { port?: number } & Record<string, unknown>;\n config?: Record<string, unknown>;\n reactor?: Record<string, unknown>;\n}\n\nexport interface CompoundWiring {\n /** Project the reactor member's created drives into the connect member. */\n projectDrivesIntoConnect?: boolean;\n /** --drives-public-base equivalent. */\n drivesPublicBase?: string | null;\n /** Member start order; defaults to declaration order. */\n startOrder?: string[];\n /** Write .ph/run/<host>.json (default true). */\n runtimeRecord?: boolean;\n /** Patch the baked CSP for the runtime registry on a served connect member\n * (forwarded to the connect runner as a runner option). */\n cspRegistrySync?: boolean;\n}\n\ninterface StartedMember {\n name: string;\n handle: RunnerHandle;\n}\n\nfunction memberEntries(host: HostDefinition): [string, CompoundMember][] {\n const children = (host.children ?? {}) as Record<string, CompoundMember>;\n return Object.entries(children);\n}\n\nfunction orderedMembers(\n host: HostDefinition,\n wiring: CompoundWiring,\n): [string, CompoundMember][] {\n const entries = memberEntries(host);\n if (!wiring.startOrder) return entries;\n const byName = new Map(entries);\n const out: [string, CompoundMember][] = [];\n for (const name of wiring.startOrder) {\n const m = byName.get(name);\n if (m) {\n out.push([name, m]);\n byName.delete(name);\n }\n }\n // any not named in startOrder keep declaration order, after the named ones\n for (const [name, m] of entries) if (byName.has(name)) out.push([name, m]);\n return out;\n}\n\n/** Build the member host object the member runner sees: the member's own\n * host.js with the wrapper applied. R1 semantics (rewire plan): a wrapper\n * SECTION is a FULL STATEMENT — `reactor` and `config`, when present on the\n * wrapper, replace the member's wholesale (host files derive keeps explicitly\n * by spreading the sibling import: `{ ...switchboard.reactor, drives }`).\n * `runner` stays key-merged: wrappers never restate `module`/`defaultVerb`,\n * they override individual keys (port, host, plugins — the plugins LIST\n * itself is a full statement computed in the file). */\nasync function resolveMemberHost(\n projectRoot: string,\n member: CompoundMember,\n userData: string,\n configPatch?: Record<string, unknown>,\n): Promise<HostDefinition> {\n const loaded = await loadHost(projectRoot, member.host);\n const base = loaded.host;\n const merged: HostDefinition = {\n ...base,\n runner: { ...base.runner, ...(member.runner ?? {}) },\n config: {\n ...(member.config !== undefined ? member.config : (base.config ?? {})),\n ...(configPatch ?? {}),\n },\n reactor: (member.reactor !== undefined ? member.reactor : base.reactor) as\n | Record<string, unknown>\n | undefined,\n };\n // ${userData} in the merged host (storage dirs etc.) resolves here — at the\n // runner, never derived from the instance name, so renames stay safe.\n return resolveUserDataPlaceholders(merged, userData);\n}\n\nfunction isConnectMember(member: CompoundMember): boolean {\n return member.host === \"connect\";\n}\nfunction isReactorFactMember(member: CompoundMember): boolean {\n return member.host === \"switchboard\";\n}\n\nexport interface RunCompoundOptions {\n /** Project identity for the lock (defaults read from package.json by the CLI). */\n projectName: string;\n /** Extra record fields (e.g. mcpUrl). */\n recordExtra?: Record<string, unknown>;\n /** Registers signal handlers for teardown (default true; tests pass false). */\n installSignalHandlers?: boolean;\n}\n\nexport interface RunCompoundResult {\n started: StartedMember[];\n shutdown: () => Promise<void>;\n}\n\nexport async function runCompound(\n host: HostDefinition,\n ctx: RunnerContext,\n options: RunCompoundOptions,\n): Promise<RunCompoundResult> {\n const projectRoot = ctx.projectRoot;\n const wiring = (host.config ?? {}) as CompoundWiring;\n // The member verb is ctx.verb, resolved by the CALLING runner module (its\n // `run` maps to defaultVerb; its dev/build/serve forward themselves) — the\n // engine never consults defaultVerb, so an explicit verb always wins.\n const verb = ctx.verb;\n\n // Lock: one live instance per project per host (storage-root contention).\n const probe = probeRun(projectRoot, host.name, options.projectName);\n if (probe.status === \"live\") {\n throw new Error(\n `${host.name} is already running for this project (pid ${probe.record.pid}). ` +\n `Stop it before starting another.`,\n );\n }\n if (probe.status === \"foreign\") {\n throw new Error(\n `.ph/run/${host.name}.json describes a live \"${probe.record.projectName}\", ` +\n `but this project is \"${options.projectName}\". Refusing to start a second instance.`,\n );\n }\n // stale record: proceed (a dead pid does not hold the lock)\n\n const userData = defaultUserDataDir(projectRoot, ctx.env);\n const started: StartedMember[] = [];\n const reactorFacts: { driveUrls: (string | null | undefined)[] } = {\n driveUrls: [],\n };\n\n const shutdown = async () => {\n for (const m of [...started].reverse()) {\n try {\n await m.handle.shutdown?.();\n } catch {\n // best effort — keep tearing down the rest\n }\n }\n if (wiring.runtimeRecord !== false) {\n clearRunRecord(projectRoot, host.name);\n }\n };\n\n for (const [name, member] of orderedMembers(host, wiring)) {\n // Compute a config patch for the connect member from reactor facts.\n let configPatch: Record<string, unknown> | undefined;\n if (\n isConnectMember(member) &&\n wiring.projectDrivesIntoConnect &&\n reactorFacts.driveUrls.length > 0\n ) {\n const configuredDefaultDrives = (\n (member.config as { drives?: { defaultDrives?: unknown } } | undefined)\n ?.drives as { defaultDrives?: unknown } | undefined\n )?.defaultDrives as never;\n configPatch = projectDrivesIntoConnect({\n createdDriveUrls: reactorFacts.driveUrls,\n configuredDefaultDrives,\n publicBase: wiring.drivesPublicBase,\n });\n }\n\n const memberHost = await resolveMemberHost(\n projectRoot,\n member,\n userData,\n configPatch,\n );\n if (isConnectMember(member) && wiring.cspRegistrySync) {\n memberHost.runner = { ...memberHost.runner, cspRegistrySync: true };\n }\n const specifier = memberHost.runner.module;\n const runner = await resolveRunnerModule(projectRoot, specifier);\n validateHost(runner, specifier, memberHost, `hosts/${member.host}/host.js`);\n // At compound verb \"run\", each member runs its own (merged) defaultVerb —\n // \"each member's default mode\" — which is what lets a desktop compound\n // pair a switchboard at `run` with a connect at `serve`. An explicit\n // forwarded verb (dev/build/serve) stays uniform across members.\n const memberVerb =\n verb === \"run\"\n ? ((memberHost.runner.defaultVerb as string | undefined) ?? \"run\")\n : verb;\n const fn = getVerb(runner, specifier, memberVerb);\n const handle = ((await fn(memberHost, ctx)) ?? {}) as RunnerHandle;\n if (handle.ready) await handle.ready;\n started.push({ name, handle });\n\n if (isReactorFactMember(member) && handle.driveUrls) {\n reactorFacts.driveUrls.push(...handle.driveUrls);\n }\n }\n\n if (wiring.runtimeRecord !== false) {\n const members: Record<string, RunRecordMember> = {};\n for (const m of started) {\n members[m.name] = {\n port: m.handle.port,\n url: m.handle.endpoints?.graphql ?? m.handle.endpoints?.connect,\n };\n }\n writeRunRecord(projectRoot, {\n pid: process.pid,\n hostName: host.name,\n projectName: options.projectName,\n startedAt: new Date().toISOString(),\n members,\n extra: options.recordExtra,\n });\n }\n\n if (options.installSignalHandlers !== false) {\n const onSignal = (code: number) => {\n void shutdown().finally(() => process.exit(code));\n };\n process.on(\"exit\", () => {\n if (wiring.runtimeRecord !== false)\n clearRunRecord(projectRoot, host.name);\n });\n process.on(\"SIGINT\", () => onSignal(130));\n process.on(\"SIGTERM\", () => onSignal(143));\n }\n\n return { started, shutdown };\n}\n","import crypto from \"node:crypto\";\nimport { z } from \"zod\";\n\n/**\n * R1 — core drive declarations. A reactor without drives is not a running\n * reactor, so declaring + seeding them is HOST RUNTIME work (not a plugin):\n * onReactorReady → idempotent slug-keyed seeding → onDrivesReady. Plugins\n * CONTRIBUTE declarations into the same merged list (Contributions.drives);\n * `--explain drives` prints the merged set with provenance.\n *\n * Field semantics (union of the three existing creation sites — vetra,\n * preview, workflows — plus Connect's PHConnectDefaultDrive):\n * - slug: the SEEDING KEY (idempotence); id optional (stable identity),\n * projectHash derives both from the project path (generateProjectDriveId\n * semantics: `${slug}-${sha256(projectPath).slice(0, 8)}`).\n * - preferredEditor: binds the drive to its drive app — stored at\n * header.meta.preferredEditor; Connect config's `app` is the legacy alias.\n * - remote.url: an attachment to a drive served elsewhere (Connect default\n * drives, switchboard remoteDrives); local fields are ignored for remotes.\n */\n\nexport const driveDeclarationSchema = z.strictObject({\n slug: z.string().min(1),\n id: z.string().min(1).optional(),\n /** Derive id (and the served slug) from the project path, like\n * generateProjectDriveId — same ids classic `ph vetra` produces. */\n projectHash: z.boolean().optional(),\n name: z.string().min(1).optional(),\n icon: z.string().optional(),\n preferredEditor: z.string().optional(),\n sharingType: z.enum([\"public\", \"private\", \"shared\"]).optional(),\n availableOffline: z.boolean().optional(),\n remote: z.strictObject({ url: z.string().min(1) }).optional(),\n});\n\nexport type DriveDeclaration = z.infer<typeof driveDeclarationSchema>;\n\nexport const drivesSchema = z.array(driveDeclarationSchema);\n\nexport function projectDriveId(projectRoot: string, slug: string): string {\n const hash = crypto\n .createHash(\"sha256\")\n .update(projectRoot)\n .digest(\"hex\")\n .substring(0, 8);\n return `${slug}-${hash}`;\n}\n\nexport interface ResolvedDrive {\n kind: \"local\" | \"remote\";\n id: string;\n slug: string;\n name: string;\n icon?: string;\n preferredEditor?: string;\n sharingType: \"public\" | \"private\" | \"shared\";\n availableOffline: boolean;\n remoteUrl?: string;\n}\n\nexport function resolveDriveDeclaration(\n projectRoot: string,\n decl: DriveDeclaration,\n): ResolvedDrive {\n const id = decl.projectHash\n ? projectDriveId(projectRoot, decl.slug)\n : (decl.id ?? decl.slug);\n // Hash-derived drives serve under the hashed slug too (classic parity:\n // the vetra drive's slug IS its hashed id).\n const slug = decl.projectHash ? id : decl.slug;\n if (decl.remote) {\n return {\n kind: \"remote\",\n id,\n slug,\n name: decl.name ?? decl.slug,\n remoteUrl: decl.remote.url,\n sharingType: decl.sharingType ?? \"public\",\n availableOffline: decl.availableOffline ?? true,\n };\n }\n return {\n kind: \"local\",\n id,\n slug,\n name: decl.name ?? decl.slug,\n icon: decl.icon,\n preferredEditor: decl.preferredEditor,\n sharingType: decl.sharingType ?? \"public\",\n availableOffline: decl.availableOffline ?? true,\n };\n}\n\n/* ------------------------------------------------------------------ seeding */\n\n/** The minimal client surface the seeder needs — runners adapt their reactor\n * clients (IReactorClient, addDefaultDrive-style helpers) onto it. */\nexport interface DriveSeederClient {\n /** Return the existing drive's id for a slug, or undefined. */\n findDriveBySlug(slug: string): Promise<string | undefined>;\n /** Create a local drive; preferredEditor lands on header.meta. */\n createDrive(drive: ResolvedDrive): Promise<void>;\n /** Attach a remote drive by URL (idempotent on the client side). */\n attachRemoteDrive(url: string): Promise<void>;\n}\n\nexport interface SeedResult {\n created: string[];\n existing: string[];\n attached: string[];\n}\n\n/** Idempotent, slug-keyed: an existing slug is left untouched (never\n * recreated, never mutated — preserveStrategy refinements live here later). */\nexport async function seedDrives(\n client: DriveSeederClient,\n drives: readonly ResolvedDrive[],\n): Promise<SeedResult> {\n const result: SeedResult = { created: [], existing: [], attached: [] };\n for (const drive of drives) {\n if (drive.kind === \"remote\") {\n await client.attachRemoteDrive(drive.remoteUrl!);\n result.attached.push(drive.slug);\n continue;\n }\n const existing = await client.findDriveBySlug(drive.slug);\n if (existing !== undefined) {\n result.existing.push(drive.slug);\n continue;\n }\n await client.createDrive(drive);\n result.created.push(drive.slug);\n }\n return result;\n}\n\n/* ------------------------------------------------------------------ explain */\n\nexport interface DrivePlanEntry {\n drive: ResolvedDrive;\n /** \"host\" for host.js declarations; a plugin name for contributions. */\n source: string;\n}\n\n/** Merge host-declared drives with plugin contributions, slug-keyed — the\n * host file wins on conflicts (it is the most explicit source). */\nexport function mergeDrivePlan(\n projectRoot: string,\n hostDeclared: readonly DriveDeclaration[],\n contributed: readonly { declaration: DriveDeclaration; source: string }[],\n): DrivePlanEntry[] {\n const plan = new Map<string, DrivePlanEntry>();\n for (const { declaration, source } of contributed) {\n const drive = resolveDriveDeclaration(projectRoot, declaration);\n plan.set(drive.slug, { drive, source });\n }\n for (const declaration of hostDeclared) {\n const drive = resolveDriveDeclaration(projectRoot, declaration);\n plan.set(drive.slug, { drive, source: \"host\" });\n }\n return [...plan.values()];\n}\n\nexport function explainDrivePlan(plan: readonly DrivePlanEntry[]): string {\n if (plan.length === 0) return \"(no drives declared)\";\n const lines = plan.map(({ drive, source }) => {\n const kind =\n drive.kind === \"remote\" ? `remote ${drive.remoteUrl}` : \"local\";\n const editor = drive.preferredEditor\n ? ` editor=${drive.preferredEditor}`\n : \"\";\n return ` ${drive.slug} (${kind}, id=${drive.id}${editor}) [${source}]`;\n });\n return [\"drives:\", ...lines].join(\"\\n\");\n}\n","import { z } from \"zod\";\nimport { drivesSchema } from \"./drives.js\";\nimport { pluginEntrySchema } from \"./plugins.js\";\n\n/**\n * The shared zod schemas for host.js blocks (D2.a). The `reactor` block\n * validates STRICTLY (D2.d — phase 0's tolerated-unknown-keys notice ends\n * here): a typo'd protocol key must fail, not silently not-apply, because\n * these are fleet-consensus settings. `config` stays loose — it is\n * runner-defined by design.\n */\n\nexport const profileSchema = z\n .strictObject({\n appId: z.string().min(1).optional(),\n name: z.string().min(1).optional(),\n description: z.string().optional(),\n icon: z.string().optional(),\n })\n .optional();\n\nexport const reactorProtocolSchema = z.strictObject({\n featureFlags: z\n .strictObject({\n documentDecisions: z.boolean().optional(),\n authEnforcement: z.boolean().optional(),\n authGroups: z.boolean().optional(),\n authConditions: z.boolean().optional(),\n })\n .optional(),\n createSignaturePolicy: z.enum([\"legacy\", \"v2-required\"]).optional(),\n unsupportedStoredDocuments: z.enum([\"refuse\", \"read-only\"]).optional(),\n});\n\n// Path-equality for the one-dir guard: pure string normalisation (the host\n// core stays Node-free); the server repeats the check with path.resolve.\nconst samePath = (a: string, b: string): boolean => {\n const norm = (p: string) =>\n p.replace(/\\\\/g, \"/\").replace(/\\/+$/, \"\").replace(/^\\.\\//, \"\");\n return norm(a) === norm(b);\n};\n\nexport const reactorBackendSchema = z\n .strictObject({\n kind: z.enum([\"in-process\", \"worker\", \"remote\"]).optional(),\n storage: z\n .strictObject({\n kind: z.enum([\"idb\", \"memory\", \"path\", \"postgres\"]),\n dataDir: z.string().optional(),\n url: z.string().optional(),\n })\n .optional(),\n readModel: z.strictObject({ url: z.string().optional() }).optional(),\n packages: z\n .strictObject({\n cdnUrl: z.string().optional(),\n specs: z.array(z.string()).optional(),\n dynamic: z.boolean().optional(),\n })\n .optional(),\n remote: z\n .strictObject({\n host: z.string().optional(),\n url: z.string().optional(),\n })\n .optional(),\n // Deployment topology (R1): where reactor work runs — same family as the\n // retired reactorWorker/multiReactor flags. Field names match the real\n // switchboard options (projectionWorker / workerPool).\n projection: z\n .strictObject({\n enabled: z.boolean().optional(),\n dbPoolSize: z.number().int().positive().optional(),\n })\n .optional(),\n executors: z\n .strictObject({\n numWorkers: z\n .union([z.number().int().positive(), z.literal(\"auto\")])\n .optional(),\n })\n .optional(),\n })\n // Two PGlite instances on one data dir corrupt it: the reactor store\n // (storage.dataDir) and the read-model store (readModel.url) must differ.\n // Absent readModel.url the server derives the read model next to the\n // reactor under the same .ph root — the classic layout.\n .superRefine((backend, ctx) => {\n // Postgres is exempt: one database legitimately serves both stores\n // (two pools, one server). The hazard is a PGlite data DIRECTORY.\n const store = backend.storage;\n const storeDir = store?.kind === \"path\" ? store.dataDir : undefined;\n const readModel = backend.readModel?.url;\n if (storeDir && readModel && samePath(storeDir, readModel)) {\n ctx.addIssue({\n code: \"custom\",\n path: [\"readModel\", \"url\"],\n message:\n `readModel.url must not be the reactor's storage dir (${readModel}): ` +\n \"two PGlite instances on one data dir corrupt it. Omit readModel.url \" +\n \"to get the classic <root>/.ph/read-storage next to the reactor store.\",\n });\n }\n });\n\nexport const reactorSchema = z.strictObject({\n backends: z.record(z.string(), reactorBackendSchema).optional(),\n placement: z\n .strictObject({\n primary: z.string().optional(),\n default: z.looseObject({}).optional(),\n })\n .optional(),\n protocol: reactorProtocolSchema.optional(),\n /** DEPRECATED (dies in R2): workflows become a listed plugin — presence is\n * activation. Kept parsing until the switchboard rewire lands. */\n workflows: z.boolean().optional(),\n // R1 core keys (rewire plan): identity/signing, package registry, storage\n // namespace, access control — capabilities and intrinsics of the reactor.\n renown: z\n .strictObject({\n url: z.string().optional(),\n networkId: z.string().optional(),\n chainId: z.number().int().optional(),\n })\n .optional(),\n packages: z.strictObject({ registryUrl: z.string().optional() }).optional(),\n namespace: z.string().min(1).optional(),\n auth: z\n .strictObject({\n enabled: z.boolean().optional(),\n admins: z.array(z.string()).optional(),\n renown: z.looseObject({}).optional(),\n })\n .optional(),\n // A reactor without drives is not a running reactor: core-declared,\n // seeded by the host runtime (onReactorReady -> seed -> onDrivesReady).\n drives: drivesSchema.optional(),\n});\n\n/** Common runner options every host.runner carries; runner modules extend it\n * loosely with their own process options. */\nexport const runnerBaseSchema = z.looseObject({\n module: z.string().min(1),\n defaultVerb: z.string().optional(),\n port: z.number().int().positive().optional(),\n /** Bind address; each runner documents its default (0.0.0.0 for servers,\n * localhost for vite dev, 127.0.0.1 for serve). */\n host: z.string().min(1).optional(),\n /** THE COMPOSITION: the plugin entries this host boots with. Presence is\n * activation; see plugins.ts for entry semantics. */\n plugins: z.array(pluginEntrySchema).optional(),\n});\n\n/** A compound's children map (mutually exclusive with `reactor` — the XOR is\n * structural, enforced by the loader; schemas validate each side's shape). */\nexport const childrenSchema = z.record(\n z.string(),\n z.strictObject({\n host: z.string().min(1),\n // Wrapper sections are FULL STATEMENTS (the member host file is source\n // material via sibling imports, not an implicit base). Plugins live\n // inside the wrapper's runner section, same as on a standalone host.\n runner: z.looseObject({}).optional(),\n config: z.looseObject({}).optional(),\n reactor: reactorSchema.optional(),\n }),\n);\n\n/** Composed generic host shapes — the basis for the emitted editor schemas\n * (D2.a). Runner packages extend these with their own runner options; `config`\n * stays loose by design. */\nexport const reactorHostSchema = z.looseObject({\n name: z.string().min(1),\n runner: runnerBaseSchema,\n config: z.looseObject({}).optional(),\n profile: profileSchema,\n reactor: reactorSchema.optional(),\n});\n\nexport const compoundHostSchema = z.looseObject({\n name: z.string().min(1),\n runner: runnerBaseSchema,\n children: childrenSchema,\n config: z.looseObject({}).optional(),\n profile: profileSchema,\n});\n\nconst SCHEMA_BASE = \"https://powerhouse.inc/schemas\";\n\n/** The emitted-schema set, keyed by published filename. Pure — the\n * emit-schemas script writes these to disk and the drift test re-derives\n * them, per the runtime-config-schema pattern. */\nexport function emittedHostSchemas(): Record<string, unknown> {\n const emit = (name: string, schema: z.ZodType) => ({\n $id: `${SCHEMA_BASE}/${name}.schema.json`,\n ...z.toJSONSchema(schema, { io: \"input\" }),\n });\n return {\n \"host-reactor.schema.json\": emit(\"host-reactor\", reactorHostSchema),\n \"host-compound.schema.json\": emit(\"host-compound\", compoundHostSchema),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAYA,SAAS,aACP,OAC0D;CAC1D,OAAO,WAAW;AACpB;AAKA,MAAM,YAAY,UAChB,aAAa,KAAK,IAAI,SAAS,MAAM,OAAO,MAAM;;;;;;;;AASpD,SAAgB,mBACd,GAAG,QACsB;CACzB,MAAM,uBAAO,IAAI,IAAY;CAC7B,MAAM,MAA+B,CAAC;C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