@planu/cli 5.3.26 → 5.3.28
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/CHANGELOG.md +16 -0
- package/dist/cli/commands/doctor.d.ts +4 -10
- package/dist/cli/commands/doctor.js +5 -31
- package/dist/cli/commands/inspect.js +2 -14
- package/dist/cli/commands/offline.d.ts +1 -2
- package/dist/cli/commands/offline.js +24 -41
- package/dist/config/release-policy.json +1 -79
- package/dist/engine/auto-updater/release-verifier.js +17 -35
- package/dist/engine/core-bridge.d.ts +6 -23
- package/dist/engine/core-bridge.js +35 -376
- package/dist/engine/execution/job-runtime.d.ts +0 -11
- package/dist/engine/execution/job-runtime.js +0 -23
- package/dist/engine/handoff-artifacts/io.js +1 -0
- package/dist/engine/handoff-artifacts/schemas.d.ts +46 -0
- package/dist/engine/handoff-artifacts/schemas.js +15 -0
- package/dist/engine/lifecycle-reconciliation.js +6 -5
- package/dist/engine/living-spec/annotation-parser.js +0 -14
- package/dist/engine/project-graph/native.js +2 -2
- package/dist/engine/sandbox/profiles/macos.sb +33 -0
- package/dist/engine/scan-project/module-discoverer.js +10 -53
- package/dist/engine/scope-boundaries/contradiction-checker.js +1 -1
- package/dist/engine/validation/validation-receipt.d.ts +5 -0
- package/dist/engine/validation/validation-receipt.js +9 -1
- package/dist/engine/validator/deep-code-checker.js +19 -26
- package/dist/engine/validator/validation-report-writer.d.ts +1 -0
- package/dist/engine/validator/validation-report-writer.js +3 -2
- package/dist/security/adapters/macos-keychain.d.ts +5 -3
- package/dist/security/adapters/macos-keychain.js +46 -20
- package/dist/tools/create-spec/autopilot-analyzer.d.ts +1 -1
- package/dist/tools/create-spec/autopilot-analyzer.js +2 -2
- package/dist/tools/create-spec/relevance-scorer.d.ts +1 -1
- package/dist/tools/create-spec/relevance-scorer.js +1 -17
- package/dist/tools/create-spec.js +1 -1
- package/dist/tools/update-status/dod-gates.d.ts +1 -0
- package/dist/tools/update-status/dod-gates.js +123 -4
- package/dist/types/atomic-upgrade.d.ts +0 -2
- package/dist/types/core-bridge.d.ts +0 -108
- package/dist/types/core-bridge.js +1 -1
- package/dist/types/durable-job.d.ts +0 -40
- package/dist/types/handoff-artifacts.d.ts +17 -1
- package/dist/types/security.d.ts +0 -5
- package/dist/types/transition-log.d.ts +1 -1
- package/package.json +7 -43
- package/planu-plugin.json +1 -1
- package/dist/config/native-release-public-key.pem +0 -3
- package/dist/config/native-targets.json +0 -87
- package/dist/engine/execution/job-executor.d.ts +0 -16
- package/dist/engine/execution/job-executor.js +0 -140
- package/dist/engine/execution/native-relevance-scorer.d.ts +0 -6
- package/dist/engine/execution/native-relevance-scorer.js +0 -64
- package/dist/engine/execution/native-worker-dispatch.d.ts +0 -3
- package/dist/engine/execution/native-worker-dispatch.js +0 -46
- package/dist/engine/execution/native-worker-protocol.d.ts +0 -6
- package/dist/engine/execution/native-worker-protocol.js +0 -33
- package/dist/engine/execution/native-worker-runtime.d.ts +0 -4
- package/dist/engine/execution/native-worker-runtime.js +0 -177
- package/dist/engine/execution/native-worker-thread.d.ts +0 -2
- package/dist/engine/execution/native-worker-thread.js +0 -66
- package/dist/engine/macos-keychain-native-port.d.ts +0 -10
- package/dist/engine/macos-keychain-native-port.js +0 -64
- package/dist/engine/native-capability-policy.d.ts +0 -4
- package/dist/engine/native-capability-policy.js +0 -24
- package/dist/engine/native-platform.d.ts +0 -3
- package/dist/engine/native-platform.js +0 -44
- package/dist/engine/native-runtime-handshake.d.ts +0 -20
- package/dist/engine/native-runtime-handshake.js +0 -230
- package/dist/engine/planu-core.darwin-arm64.node.manifest.json +0 -39
- package/dist/engine/planu-core.darwin-arm64.node.sbom.json +0 -1310
- package/dist/engine/planu-core.darwin-x64.node.manifest.json +0 -39
- package/dist/engine/planu-core.darwin-x64.node.sbom.json +0 -1310
- package/dist/engine/planu-core.linux-arm64-gnu.node.manifest.json +0 -38
- package/dist/engine/planu-core.linux-arm64-gnu.node.sbom.json +0 -1310
- package/dist/engine/planu-core.linux-arm64-musl.node.manifest.json +0 -38
- package/dist/engine/planu-core.linux-arm64-musl.node.sbom.json +0 -1310
- package/dist/engine/planu-core.linux-x64-gnu.node.manifest.json +0 -38
- package/dist/engine/planu-core.linux-x64-gnu.node.sbom.json +0 -1310
- package/dist/engine/planu-core.linux-x64-musl.node.manifest.json +0 -38
- package/dist/engine/planu-core.linux-x64-musl.node.sbom.json +0 -1310
- package/dist/engine/planu-core.win32-arm64-msvc.node.manifest.json +0 -38
- package/dist/engine/planu-core.win32-arm64-msvc.node.sbom.json +0 -1310
- package/dist/engine/planu-core.win32-x64-msvc.node.manifest.json +0 -38
- package/dist/engine/planu-core.win32-x64-msvc.node.sbom.json +0 -1310
- package/dist/types/native-worker.d.ts +0 -48
- package/dist/types/native-worker.js +0 -2
- package/planu-native.json +0 -82
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export const NATIVE_CAPABILITY_POLICIES = [
|
|
2
|
-
{
|
|
3
|
-
capability: 'core-acceleration-v1',
|
|
4
|
-
classification: 'optimization',
|
|
5
|
-
fallback: 'typescript-visible-degradation',
|
|
6
|
-
parityContract: 'tests/integration/native-platform-matrix.test.ts',
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
capability: 'project-graph-v1',
|
|
10
|
-
classification: 'optimization',
|
|
11
|
-
fallback: 'typescript-visible-degradation',
|
|
12
|
-
parityContract: 'tests/integration/native-project-graph-e2e.test.ts',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
capability: 'macos-keychain-v1',
|
|
16
|
-
classification: 'correctness-critical',
|
|
17
|
-
fallback: 'fail-closed',
|
|
18
|
-
parityContract: 'tests/security/macos-keychain.integration.test.ts',
|
|
19
|
-
},
|
|
20
|
-
];
|
|
21
|
-
export function nativeFallbackMode(capability) {
|
|
22
|
-
return (NATIVE_CAPABILITY_POLICIES.find((policy) => policy.capability === capability)?.fallback ?? null);
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=native-capability-policy.js.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
2
|
-
import { reportClassifiedDegradation } from '../errors/classified-degradation.js';
|
|
3
|
-
let cachedMusl;
|
|
4
|
-
function probeMuslSignal(code, probe) {
|
|
5
|
-
try {
|
|
6
|
-
return probe();
|
|
7
|
-
}
|
|
8
|
-
catch (error) {
|
|
9
|
-
void error;
|
|
10
|
-
/* reliability-optional: NATIVE_LIBC_PROBE_FAILED */
|
|
11
|
-
reportClassifiedDegradation(code, new Error('Native libc probe unavailable'));
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
/** Detects musl through independent local signals and reports failed probes. */
|
|
16
|
-
export function detectMusl() {
|
|
17
|
-
if (cachedMusl !== undefined) {
|
|
18
|
-
return cachedMusl;
|
|
19
|
-
}
|
|
20
|
-
if (process.platform !== 'linux') {
|
|
21
|
-
cachedMusl = false;
|
|
22
|
-
return cachedMusl;
|
|
23
|
-
}
|
|
24
|
-
if (probeMuslSignal('NATIVE_LIBC_ALPINE_PROBE_FAILED', () => existsSync('/etc/alpine-release'))) {
|
|
25
|
-
cachedMusl = true;
|
|
26
|
-
return cachedMusl;
|
|
27
|
-
}
|
|
28
|
-
if (probeMuslSignal('NATIVE_LIBC_REPORT_PROBE_FAILED', () => {
|
|
29
|
-
const reportApi = process.report;
|
|
30
|
-
const report = reportApi?.getReport();
|
|
31
|
-
return (report !== undefined &&
|
|
32
|
-
/musl/iu.test(typeof report === 'string' ? report : JSON.stringify(report)));
|
|
33
|
-
})) {
|
|
34
|
-
cachedMusl = true;
|
|
35
|
-
return cachedMusl;
|
|
36
|
-
}
|
|
37
|
-
if (probeMuslSignal('NATIVE_LIBC_LDD_PROBE_FAILED', () => existsSync('/usr/bin/ldd') && /musl/iu.test(readFileSync('/usr/bin/ldd', 'utf8')))) {
|
|
38
|
-
cachedMusl = true;
|
|
39
|
-
return cachedMusl;
|
|
40
|
-
}
|
|
41
|
-
cachedMusl = probeMuslSignal('NATIVE_LIBC_LINKER_PROBE_FAILED', () => readdirSync('/lib').some((entry) => entry.startsWith('ld-musl-')));
|
|
42
|
-
return cachedMusl;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=native-platform.js.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { NativeArtifactManifest, NativeRuntimeCompatibility, NativeRuntimeHandshake } from '../types/core-bridge.js';
|
|
2
|
-
export declare const NATIVE_PROTOCOL_ABI = 1;
|
|
3
|
-
export declare const NATIVE_CAPABILITY_ABI = 2;
|
|
4
|
-
export declare const NATIVE_NODE_API_ABI = 4;
|
|
5
|
-
/** Must match RuntimeDatabase.schemaVersion and the Rust/native release contract. */
|
|
6
|
-
export declare const RUNTIME_STORAGE_SCHEMA = 4;
|
|
7
|
-
export declare function inspectNativeArtifact(artifactPath: string, trustedPublicKeyInput?: string | Buffer): {
|
|
8
|
-
artifactSha256: string;
|
|
9
|
-
manifest: NativeArtifactManifest | null;
|
|
10
|
-
};
|
|
11
|
-
export declare function negotiateNativeRuntime(handshake: NativeRuntimeHandshake | null, manifest: NativeArtifactManifest | null, expected: {
|
|
12
|
-
cliVersion: string;
|
|
13
|
-
target: string;
|
|
14
|
-
artifactSha256: string;
|
|
15
|
-
protocolAbi?: number;
|
|
16
|
-
capabilityAbi?: number;
|
|
17
|
-
nodeApiAbi?: number;
|
|
18
|
-
storageSchema?: number;
|
|
19
|
-
}): NativeRuntimeCompatibility;
|
|
20
|
-
//# sourceMappingURL=native-runtime-handshake.d.ts.map
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
/* eslint-disable complexity -- the fail-closed manifest boundary validates every signed field */
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition -- Partial models untrusted JSON at runtime */
|
|
3
|
-
import { createHash, createPublicKey, verify as verifySignature } from 'node:crypto';
|
|
4
|
-
import { lstatSync, readFileSync } from 'node:fs';
|
|
5
|
-
import { basename, dirname, join } from 'node:path';
|
|
6
|
-
import { reportClassifiedDegradation } from '../errors/classified-degradation.js';
|
|
7
|
-
export const NATIVE_PROTOCOL_ABI = 1;
|
|
8
|
-
export const NATIVE_CAPABILITY_ABI = 2;
|
|
9
|
-
export const NATIVE_NODE_API_ABI = 4;
|
|
10
|
-
/** Must match RuntimeDatabase.schemaVersion and the Rust/native release contract. */
|
|
11
|
-
export const RUNTIME_STORAGE_SCHEMA = 4;
|
|
12
|
-
export function inspectNativeArtifact(artifactPath, trustedPublicKeyInput) {
|
|
13
|
-
const hash = (value) => createHash('sha256').update(value).digest('hex');
|
|
14
|
-
let artifactSha256 = '';
|
|
15
|
-
const manifestPath = `${artifactPath}.manifest.json`;
|
|
16
|
-
try {
|
|
17
|
-
const currentUid = process.getuid?.();
|
|
18
|
-
for (const path of [artifactPath, manifestPath]) {
|
|
19
|
-
const stat = lstatSync(path);
|
|
20
|
-
if (stat.isSymbolicLink() ||
|
|
21
|
-
(process.platform !== 'win32' &&
|
|
22
|
-
((currentUid !== undefined && stat.uid !== currentUid) || (stat.mode & 0o022) !== 0))) {
|
|
23
|
-
return { artifactSha256, manifest: null };
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
artifactSha256 = hash(readFileSync(artifactPath));
|
|
27
|
-
const parsed = JSON.parse(readFileSync(manifestPath, 'utf8'));
|
|
28
|
-
if (typeof parsed !== 'object' ||
|
|
29
|
-
parsed === null ||
|
|
30
|
-
!('schemaVersion' in parsed) ||
|
|
31
|
-
parsed.schemaVersion !== 2 ||
|
|
32
|
-
!('artifactSha256' in parsed) ||
|
|
33
|
-
typeof parsed.artifactSha256 !== 'string' ||
|
|
34
|
-
!('capabilities' in parsed) ||
|
|
35
|
-
!Array.isArray(parsed.capabilities) ||
|
|
36
|
-
!parsed.capabilities.every((capability) => typeof capability === 'string')) {
|
|
37
|
-
return { artifactSha256, manifest: null };
|
|
38
|
-
}
|
|
39
|
-
const candidate = parsed;
|
|
40
|
-
const expectedSbomName = `${basename(artifactPath)}.sbom.json`;
|
|
41
|
-
const exactSemver = /^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/u;
|
|
42
|
-
const expectedCapabilities = [
|
|
43
|
-
'core-acceleration-v1',
|
|
44
|
-
'project-graph-v1',
|
|
45
|
-
...(candidate.platform === 'darwin' ? ['macos-keychain-v1'] : []),
|
|
46
|
-
];
|
|
47
|
-
if (!exactSemver.test(candidate.cliVersion ?? '') ||
|
|
48
|
-
!exactSemver.test(candidate.engineVersion ?? '') ||
|
|
49
|
-
!/^[A-Za-z0-9._:-]{1,200}$/u.test(candidate.buildId ?? '') ||
|
|
50
|
-
candidate.protocolAbi !== NATIVE_PROTOCOL_ABI ||
|
|
51
|
-
candidate.capabilityAbi !== NATIVE_CAPABILITY_ABI ||
|
|
52
|
-
candidate.nodeApiAbi !== NATIVE_NODE_API_ABI ||
|
|
53
|
-
!Number.isSafeInteger(candidate.storageSchemaMin) ||
|
|
54
|
-
!Number.isSafeInteger(candidate.storageSchemaMax) ||
|
|
55
|
-
(candidate.storageSchemaMin ?? 0) < 1 ||
|
|
56
|
-
(candidate.storageSchemaMax ?? 0) < (candidate.storageSchemaMin ?? 0) ||
|
|
57
|
-
!['darwin', 'linux', 'win32'].includes(candidate.platform ?? '') ||
|
|
58
|
-
!['arm64', 'x64'].includes(candidate.arch ?? '') ||
|
|
59
|
-
(candidate.platform === 'linux'
|
|
60
|
-
? !['glibc', 'musl'].includes(candidate.libc ?? '')
|
|
61
|
-
: candidate.libc !== null) ||
|
|
62
|
-
candidate.target !==
|
|
63
|
-
[candidate.platform, candidate.arch, candidate.libc].filter(Boolean).join('-') ||
|
|
64
|
-
JSON.stringify(candidate.capabilities) !== JSON.stringify(expectedCapabilities) ||
|
|
65
|
-
!/^[a-f0-9]{64}$/u.test(candidate.artifactSha256 ?? '') ||
|
|
66
|
-
candidate.sbom?.format !== 'CycloneDX-1.5' ||
|
|
67
|
-
candidate.sbom.path !== expectedSbomName ||
|
|
68
|
-
!/^[a-f0-9]{64}$/u.test(candidate.sbom.sha256 ?? '') ||
|
|
69
|
-
!/^[a-f0-9]{40}$/u.test(candidate.provenance?.sourceCommit ?? '') ||
|
|
70
|
-
typeof candidate.provenance?.sourceTreeDirty !== 'boolean' ||
|
|
71
|
-
!Number.isSafeInteger(candidate.provenance?.sourceDateEpoch) ||
|
|
72
|
-
(candidate.provenance?.sourceDateEpoch ?? -1) < 0 ||
|
|
73
|
-
!candidate.provenance?.builder ||
|
|
74
|
-
candidate.provenance.builder.length > 256 ||
|
|
75
|
-
!candidate.provenance.rustToolchain ||
|
|
76
|
-
(candidate.provenance.zigVersion !== null &&
|
|
77
|
-
typeof candidate.provenance.zigVersion !== 'string') ||
|
|
78
|
-
candidate.signature?.algorithm !== 'Ed25519' ||
|
|
79
|
-
!/^[a-f0-9]{64}$/u.test(candidate.signature.keyId ?? '') ||
|
|
80
|
-
!/^[A-Za-z0-9+/]{86}==$/u.test(candidate.signature.value ?? '')) {
|
|
81
|
-
return { artifactSha256, manifest: null };
|
|
82
|
-
}
|
|
83
|
-
const sbomPath = join(dirname(artifactPath), expectedSbomName);
|
|
84
|
-
const sbomStat = lstatSync(sbomPath);
|
|
85
|
-
if (sbomStat.isSymbolicLink() ||
|
|
86
|
-
(process.platform !== 'win32' &&
|
|
87
|
-
((process.getuid?.() !== undefined && sbomStat.uid !== process.getuid?.()) ||
|
|
88
|
-
(sbomStat.mode & 0o022) !== 0)) ||
|
|
89
|
-
hash(readFileSync(sbomPath)) !== candidate.sbom.sha256) {
|
|
90
|
-
return { artifactSha256, manifest: null };
|
|
91
|
-
}
|
|
92
|
-
const sbomValue = JSON.parse(readFileSync(sbomPath, 'utf8'));
|
|
93
|
-
if (!isValidSbom(sbomValue, candidate.engineVersion, artifactSha256)) {
|
|
94
|
-
return { artifactSha256, manifest: null };
|
|
95
|
-
}
|
|
96
|
-
const { signature, ...unsigned } = candidate;
|
|
97
|
-
const publicKey = createPublicKey(trustedPublicKeyInput ??
|
|
98
|
-
readFileSync(join(import.meta.dirname, '..', 'config', 'native-release-public-key.pem')));
|
|
99
|
-
const publicDer = publicKey.export({ type: 'spki', format: 'der' });
|
|
100
|
-
if (hash(publicDer) !== signature.keyId ||
|
|
101
|
-
!verifySignature(null, Buffer.from(JSON.stringify(unsigned)), publicKey, Buffer.from(signature.value, 'base64'))) {
|
|
102
|
-
return { artifactSha256, manifest: null };
|
|
103
|
-
}
|
|
104
|
-
return { artifactSha256, manifest: candidate };
|
|
105
|
-
}
|
|
106
|
-
catch (error) {
|
|
107
|
-
void error;
|
|
108
|
-
/* reliability-optional: NATIVE_ARTIFACT_INSPECTION_FAILED */
|
|
109
|
-
reportClassifiedDegradation('NATIVE_ARTIFACT_INSPECTION_FAILED', new Error('Native artifact inspection failed closed'));
|
|
110
|
-
return { artifactSha256, manifest: null };
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
function isValidSbom(value, engineVersion, artifactSha256) {
|
|
114
|
-
if (typeof value !== 'object' || value === null) {
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
const sbom = value;
|
|
118
|
-
const componentsValid = Array.isArray(sbom.components) &&
|
|
119
|
-
sbom.components.length > 0 &&
|
|
120
|
-
sbom.components.every((component) => typeof component === 'object' &&
|
|
121
|
-
component !== null &&
|
|
122
|
-
typeof component['bom-ref'] === 'string' &&
|
|
123
|
-
typeof component.name === 'string' &&
|
|
124
|
-
typeof component.version === 'string');
|
|
125
|
-
const dependenciesValid = Array.isArray(sbom.dependencies) &&
|
|
126
|
-
sbom.dependencies.some((dependency) => typeof dependency === 'object' &&
|
|
127
|
-
dependency !== null &&
|
|
128
|
-
Array.isArray(dependency.dependsOn));
|
|
129
|
-
const hashes = sbom.metadata?.component?.hashes;
|
|
130
|
-
const artifactBound = Array.isArray(hashes) &&
|
|
131
|
-
hashes.some((entry) => typeof entry === 'object' &&
|
|
132
|
-
entry !== null &&
|
|
133
|
-
entry.alg === 'SHA-256' &&
|
|
134
|
-
entry.content === artifactSha256);
|
|
135
|
-
return (sbom.bomFormat === 'CycloneDX' &&
|
|
136
|
-
sbom.specVersion === '1.5' &&
|
|
137
|
-
sbom.version === 1 &&
|
|
138
|
-
sbom.metadata?.component?.name === 'planu-core' &&
|
|
139
|
-
sbom.metadata.component.version === engineVersion &&
|
|
140
|
-
componentsValid &&
|
|
141
|
-
dependenciesValid &&
|
|
142
|
-
artifactBound);
|
|
143
|
-
}
|
|
144
|
-
export function negotiateNativeRuntime(handshake, manifest, expected) {
|
|
145
|
-
if (!handshake) {
|
|
146
|
-
return {
|
|
147
|
-
compatible: false,
|
|
148
|
-
reasons: ['native runtime does not expose planuRuntimeHandshake'],
|
|
149
|
-
handshake: null,
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
if (!manifest) {
|
|
153
|
-
return {
|
|
154
|
-
compatible: false,
|
|
155
|
-
reasons: ['native artifact manifest is missing, unsafe or invalid'],
|
|
156
|
-
handshake,
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
const reasons = [];
|
|
160
|
-
const protocolAbi = expected.protocolAbi ?? NATIVE_PROTOCOL_ABI;
|
|
161
|
-
const capabilityAbi = expected.capabilityAbi ?? NATIVE_CAPABILITY_ABI;
|
|
162
|
-
const nodeApiAbi = expected.nodeApiAbi ?? NATIVE_NODE_API_ABI;
|
|
163
|
-
const storageSchema = expected.storageSchema ?? RUNTIME_STORAGE_SCHEMA;
|
|
164
|
-
const handshakeCapabilitiesValid = Array.isArray(handshake.capabilities) &&
|
|
165
|
-
handshake.capabilities.every((capability) => typeof capability === 'string');
|
|
166
|
-
const manifestCapabilitiesValid = Array.isArray(manifest.capabilities) &&
|
|
167
|
-
manifest.capabilities.every((capability) => typeof capability === 'string');
|
|
168
|
-
if (manifest.cliVersion !== expected.cliVersion) {
|
|
169
|
-
reasons.push(`CLI version mismatch: expected ${expected.cliVersion}, got ${manifest.cliVersion}`);
|
|
170
|
-
}
|
|
171
|
-
if (handshake.engineVersion !== expected.cliVersion) {
|
|
172
|
-
reasons.push(`engine version mismatch: expected ${expected.cliVersion}, got ${handshake.engineVersion}`);
|
|
173
|
-
}
|
|
174
|
-
if (handshake.engineVersion !== manifest.engineVersion) {
|
|
175
|
-
reasons.push('native engine version does not match artifact manifest');
|
|
176
|
-
}
|
|
177
|
-
if (handshake.buildId !== manifest.buildId) {
|
|
178
|
-
reasons.push('native build identity does not match artifact manifest');
|
|
179
|
-
}
|
|
180
|
-
if (handshake.protocolAbi !== protocolAbi) {
|
|
181
|
-
reasons.push(`protocol ABI mismatch: expected ${protocolAbi}, got ${handshake.protocolAbi}`);
|
|
182
|
-
}
|
|
183
|
-
if (handshake.protocolAbi !== manifest.protocolAbi) {
|
|
184
|
-
reasons.push('native protocol ABI does not match artifact manifest');
|
|
185
|
-
}
|
|
186
|
-
if (handshake.capabilityAbi !== capabilityAbi) {
|
|
187
|
-
reasons.push(`capability ABI mismatch: expected ${capabilityAbi}, got ${handshake.capabilityAbi}`);
|
|
188
|
-
}
|
|
189
|
-
if (handshake.capabilityAbi !== manifest.capabilityAbi) {
|
|
190
|
-
reasons.push('native capability ABI does not match artifact manifest');
|
|
191
|
-
}
|
|
192
|
-
if (handshake.nodeApiAbi !== nodeApiAbi) {
|
|
193
|
-
reasons.push(`Node-API ABI mismatch: expected ${nodeApiAbi}, got ${handshake.nodeApiAbi}`);
|
|
194
|
-
}
|
|
195
|
-
if (handshake.nodeApiAbi !== manifest.nodeApiAbi) {
|
|
196
|
-
reasons.push('native Node-API ABI does not match artifact manifest');
|
|
197
|
-
}
|
|
198
|
-
if (!handshakeCapabilitiesValid) {
|
|
199
|
-
reasons.push('native runtime capabilities are malformed');
|
|
200
|
-
}
|
|
201
|
-
if (!manifestCapabilitiesValid) {
|
|
202
|
-
reasons.push('native artifact manifest capabilities are malformed');
|
|
203
|
-
}
|
|
204
|
-
if (handshakeCapabilitiesValid &&
|
|
205
|
-
manifestCapabilitiesValid &&
|
|
206
|
-
JSON.stringify(handshake.capabilities) !== JSON.stringify(manifest.capabilities)) {
|
|
207
|
-
reasons.push('native capabilities do not match artifact manifest');
|
|
208
|
-
}
|
|
209
|
-
if (storageSchema < handshake.storageSchemaMin || storageSchema > handshake.storageSchemaMax) {
|
|
210
|
-
reasons.push(`storage schema ${storageSchema} is outside native range ${handshake.storageSchemaMin}-${handshake.storageSchemaMax}`);
|
|
211
|
-
}
|
|
212
|
-
if (handshake.storageSchemaMin !== manifest.storageSchemaMin ||
|
|
213
|
-
handshake.storageSchemaMax !== manifest.storageSchemaMax) {
|
|
214
|
-
reasons.push('native storage schema range does not match artifact manifest');
|
|
215
|
-
}
|
|
216
|
-
if (handshake.target !== expected.target) {
|
|
217
|
-
reasons.push(`target mismatch: expected ${expected.target}, got ${handshake.target}`);
|
|
218
|
-
}
|
|
219
|
-
if (handshake.target !== manifest.target) {
|
|
220
|
-
reasons.push('native target does not match artifact manifest');
|
|
221
|
-
}
|
|
222
|
-
if (manifest.target !== [manifest.platform, manifest.arch, manifest.libc].filter(Boolean).join('-')) {
|
|
223
|
-
reasons.push('native manifest target does not match platform/arch/libc dimensions');
|
|
224
|
-
}
|
|
225
|
-
if (manifest.artifactSha256 !== expected.artifactSha256) {
|
|
226
|
-
reasons.push('native artifact SHA-256 mismatch');
|
|
227
|
-
}
|
|
228
|
-
return { compatible: reasons.length === 0, reasons, handshake };
|
|
229
|
-
}
|
|
230
|
-
//# sourceMappingURL=native-runtime-handshake.js.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 2,
|
|
3
|
-
"cliVersion": "5.3.26",
|
|
4
|
-
"engineVersion": "5.3.26",
|
|
5
|
-
"buildId": "1-5.3.26-aarch64-apple-darwin",
|
|
6
|
-
"protocolAbi": 1,
|
|
7
|
-
"capabilityAbi": 2,
|
|
8
|
-
"nodeApiAbi": 4,
|
|
9
|
-
"capabilities": [
|
|
10
|
-
"core-acceleration-v1",
|
|
11
|
-
"project-graph-v1",
|
|
12
|
-
"macos-keychain-v1"
|
|
13
|
-
],
|
|
14
|
-
"storageSchemaMin": 4,
|
|
15
|
-
"storageSchemaMax": 4,
|
|
16
|
-
"target": "darwin-arm64",
|
|
17
|
-
"platform": "darwin",
|
|
18
|
-
"arch": "arm64",
|
|
19
|
-
"libc": null,
|
|
20
|
-
"artifactSha256": "b2d852dc52754af4bb30c62703566f1904ef5d36905a500ee93dd659d2a5e1e2",
|
|
21
|
-
"sbom": {
|
|
22
|
-
"format": "CycloneDX-1.5",
|
|
23
|
-
"path": "planu-core.darwin-arm64.node.sbom.json",
|
|
24
|
-
"sha256": "f40d46dc1cafb9791a5abb6b22715025ed1a46ebbece82949b770e92009a33d0"
|
|
25
|
-
},
|
|
26
|
-
"provenance": {
|
|
27
|
-
"builder": "scripts/build-rust-local.sh",
|
|
28
|
-
"sourceCommit": "2419aedc35345da335c3469eaf80b19f428fd53b",
|
|
29
|
-
"sourceTreeDirty": false,
|
|
30
|
-
"sourceDateEpoch": 1,
|
|
31
|
-
"rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
|
|
32
|
-
"zigVersion": "0.16.0"
|
|
33
|
-
},
|
|
34
|
-
"signature": {
|
|
35
|
-
"algorithm": "Ed25519",
|
|
36
|
-
"keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
|
|
37
|
-
"value": "chGhyQXfG6qVz8U+TCAugdrFAW9pvbketCjVF0BESmKZlIMKyzq15V3r8QSuBOGqCs3OtuORM0R6VRJEreHlAA=="
|
|
38
|
-
}
|
|
39
|
-
}
|