mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-06 14:02:36 +01:00
Add the pinned Kimi Code runtime, native instruction and model admission, scoped credentials, and pending-candidate recovery contracts. Retain current master release attestations and provider-pack compatibility. Co-Authored-By: Paperclip <noreply@paperclip.ing>
53 lines
1.9 KiB
JavaScript
53 lines
1.9 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import { stat } from "node:fs/promises";
|
|
import test from "node:test";
|
|
|
|
import {
|
|
bundleVerifiedProviderEntrypoints,
|
|
verifiedProviderEntrypoints,
|
|
} from "./build-verified-provider-entrypoints.mjs";
|
|
|
|
test("provider entrypoints include self-contained ESM and descriptor-safe CommonJS bundles", async () => {
|
|
const bundles = await bundleVerifiedProviderEntrypoints({ write: false });
|
|
assert.equal(bundles.length, verifiedProviderEntrypoints.length);
|
|
for (const { entrypoint, result, verifiedResult } of bundles) {
|
|
for (const bundle of [result, verifiedResult]) {
|
|
assert.equal(bundle.outputFiles?.length, 1, entrypoint.name);
|
|
const source = bundle.outputFiles[0].text;
|
|
assert.match(source, /^#!\/usr\/bin\/env node\n/);
|
|
}
|
|
assert.doesNotMatch(
|
|
verifiedResult.outputFiles[0].text,
|
|
/\bimport\.meta\b/,
|
|
entrypoint.name,
|
|
);
|
|
}
|
|
});
|
|
|
|
test("written provider entrypoints satisfy qualified launch permissions", async (t) => {
|
|
if (process.platform === "win32") {
|
|
t.skip("POSIX launch permissions do not apply on Windows");
|
|
return;
|
|
}
|
|
await bundleVerifiedProviderEntrypoints();
|
|
for (const entrypoint of verifiedProviderEntrypoints) {
|
|
for (const output of [entrypoint.output, entrypoint.verifiedOutput]) {
|
|
const mode = (await stat(output)).mode;
|
|
assert.equal(mode & 0o022, 0, entrypoint.name);
|
|
assert.notEqual(mode & 0o100, 0, entrypoint.name);
|
|
}
|
|
}
|
|
});
|
|
|
|
// Package-layout regression runs in the existing verified-entrypoint test lane.
|
|
import "./provision-pi-package.test.mjs";
|
|
|
|
import "./materialize-kimi-distribution.test.mjs";
|
|
import "./provision-kimi-package.test.mjs";
|
|
import "./patch-kimi-runtime.test.mjs";
|
|
import "./kimi-metadata-probe.test.mjs";
|
|
import "./antigravity-provisioner-layout.test.mjs";
|
|
import "./materialize-antigravity-distribution.test.mjs";
|
|
import "./probe-antigravity-metadata.test.mjs";
|
|
import "./patch-antigravity-runtime.test.mjs";
|