mirror of
https://github.com/morluto/rea
synced 2026-10-27 22:45:19 -04:00
0cd7ef456b
Ship Claude Code and Codex from one release-pinned npm artifact with bundled runtime dependencies, extraction-only MCP qualification, plugin-aware recovery, and synchronized release metadata. Integrates #2815 and the original proposal #1977. The original commits remain available on the PR branch; retain their author and assistant credit in this squash. Validation: required CI passed, real Codex/Claude loading verified, and reviewed packaging/recovery findings addressed. Co-authored-by: GamerDubz <themastergamerplays24.7@gmail.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> Co-authored-by: OpenAI Codex <openai-codex@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
961 B
TypeScript
36 lines
961 B
TypeScript
interface PackageManifest {
|
|
name: string;
|
|
version: string;
|
|
devDependencies?: Record<string, string>;
|
|
dependencies?: Record<string, string>;
|
|
overrides?: Record<string, unknown>;
|
|
// npm manifests are extensible; preserve metadata outside this projection.
|
|
[key: string]: unknown;
|
|
}
|
|
|
|
interface LockedPackage {
|
|
version?: string;
|
|
dev?: boolean;
|
|
// Keep unmodified integrity, resolution, platform, and other lock-entry facts.
|
|
[key: string]: unknown;
|
|
}
|
|
|
|
interface PackageLock {
|
|
name: string;
|
|
version: string;
|
|
lockfileVersion: number;
|
|
packages: Record<string, LockedPackage>;
|
|
// Preserve other npm lock metadata rather than dropping unfamiliar fields.
|
|
[key: string]: unknown;
|
|
}
|
|
|
|
export function pluginPackageMetadata<Manifest extends PackageManifest>(
|
|
manifest: Manifest,
|
|
lock: PackageLock,
|
|
): {
|
|
packageJson: Omit<Manifest, "devDependencies" | "overrides"> & {
|
|
bundleDependencies: string[];
|
|
};
|
|
shrinkwrap: PackageLock;
|
|
};
|