@aviaratech/ai-delivery 0.3.45 → 0.3.46
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/CONTRIBUTING.md +8 -8
- package/README.md +1 -1
- package/dist/agentReadiness.test.js +7 -0
- package/dist/agentReadiness.test.js.map +2 -2
- package/dist/config/deliveryConfig.d.ts +0 -30
- package/dist/config/deliveryConfig.js +0 -2
- package/dist/config/deliveryConfig.js.map +2 -2
- package/dist/delivery/common.d.ts +0 -2
- package/dist/delivery/common.js +0 -14
- package/dist/delivery/common.js.map +2 -2
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +5 -8
- package/dist/errors.js.map +2 -2
- package/dist/github/client.js +1 -5
- package/dist/github/client.js.map +2 -2
- package/dist/github/nativeIssueMetadata.d.ts +0 -1
- package/dist/github/nativeIssueMetadata.js.map +2 -2
- package/dist/issue.js +2 -2
- package/dist/issue.js.map +2 -2
- package/dist/issueContract.d.ts +2 -1
- package/dist/issueContract.js +15 -7
- package/dist/issueContract.js.map +2 -2
- package/dist/issueContract.test.js +10 -7
- package/dist/issueContract.test.js.map +2 -2
- package/dist/pluginDoctor.test.js +1 -1
- package/dist/pluginDoctor.test.js.map +2 -2
- package/dist/pluginInstaller.js +7 -4
- package/dist/pluginInstaller.js.map +2 -2
- package/dist/pluginInstaller.test.js +38 -13
- package/dist/pluginInstaller.test.js.map +2 -2
- package/dist/pluginPackaging.test.js +1 -1
- package/dist/pluginPackaging.test.js.map +2 -2
- package/dist/pr.js +5 -1
- package/dist/pr.js.map +2 -2
- package/dist/pr.test.js +55 -0
- package/dist/pr.test.js.map +2 -2
- package/package.json +1 -1
- package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
- package/plugins/ai-delivery/plugin.json +1 -1
- package/plugins/ai-delivery/runtime/dist/cli.js +112 -112
- package/plugins/ai-delivery/runtime/package.json +1 -1
- package/plugins/ai-delivery/skills/ticket-design/SKILL.md +9 -9
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
mkdtempSync,
|
|
11
11
|
readFileSync,
|
|
12
12
|
readdirSync,
|
|
13
|
+
realpathSync,
|
|
13
14
|
rmSync,
|
|
14
15
|
symlinkSync,
|
|
15
16
|
writeFileSync
|
|
@@ -384,7 +385,7 @@ beforeEach(() => {
|
|
|
384
385
|
"fetch",
|
|
385
386
|
vi.fn(() => Promise.resolve(new Response('{"latest":"0.3.35"}')))
|
|
386
387
|
);
|
|
387
|
-
fixture.home = mkdtempSync(join(tmpdir(), "ai-delivery-installer-"));
|
|
388
|
+
fixture.home = realpathSync(mkdtempSync(join(tmpdir(), "ai-delivery-installer-")));
|
|
388
389
|
vi.stubEnv("CODEX_HOME", join(fixture.home, ".codex"));
|
|
389
390
|
vi.stubEnv("CLAUDE_CONFIG_DIR", join(fixture.home, ".claude"));
|
|
390
391
|
fixture.commands = [];
|
|
@@ -733,17 +734,17 @@ test("an exact same-version owned selection is reused without invoking native ad
|
|
|
733
734
|
assert.equal(native.selectionCalls, 0);
|
|
734
735
|
});
|
|
735
736
|
test.each([
|
|
736
|
-
"disabled",
|
|
737
|
-
"missing selection",
|
|
738
|
-
"unregistered catalog",
|
|
739
|
-
"foreign source",
|
|
740
|
-
"changed cache",
|
|
741
|
-
"changed catalog",
|
|
742
|
-
"catalog symlink",
|
|
743
|
-
"read-only catalog",
|
|
744
|
-
"unqualified native",
|
|
745
|
-
"unqualified newer native"
|
|
746
|
-
])("replacement refuses %s before preparing a new version", async (fault) => {
|
|
737
|
+
["disabled", /selection is disabled/],
|
|
738
|
+
["missing selection", /native selection changed/],
|
|
739
|
+
["unregistered catalog", /unmanaged source/],
|
|
740
|
+
["foreign source", /source differs from the managed version/],
|
|
741
|
+
["changed cache", /bytes differ from the verified archive/],
|
|
742
|
+
["changed catalog", /Selected policy stage command failed/],
|
|
743
|
+
["catalog symlink", /Selected policy stage command failed/],
|
|
744
|
+
["read-only catalog", /Managed catalog is unsafe/],
|
|
745
|
+
["unqualified native", /codex-cli 0\.153\.0\) has no qualified/],
|
|
746
|
+
["unqualified newer native", /codex-cli 0\.162\.2\) has no qualified/]
|
|
747
|
+
])("replacement refuses %s before preparing a new version", async (fault, expected) => {
|
|
747
748
|
const { native, catalog, policy, before } = replacementFixture();
|
|
748
749
|
if (fault === "disabled") native.selected[0].enabled = false;
|
|
749
750
|
if (fault === "missing selection") native.selected = [];
|
|
@@ -774,12 +775,36 @@ test.each([
|
|
|
774
775
|
if (fault === "read-only catalog") chmodSync(join(catalog, ".agents/plugins/marketplace.json"), 256);
|
|
775
776
|
if (fault === "unqualified native") native.version = "codex-cli 0.153.0";
|
|
776
777
|
if (fault === "unqualified newer native") native.version = "codex-cli 0.162.2";
|
|
777
|
-
await assert.rejects(managePlugin({ ...input(), action: "update", version: "0.3.22" }));
|
|
778
|
+
await assert.rejects(managePlugin({ ...input(), action: "update", version: "0.3.22" }), expected);
|
|
778
779
|
assert.equal(native.selectionCalls, 0);
|
|
779
780
|
assert.equal(existsSync(join(catalog, "versions/0.3.22")), false);
|
|
780
781
|
assert.deepEqual(policy, before);
|
|
781
782
|
if (fault === "catalog symlink") assert.equal(readFileSync(unrelatedCatalog, "utf8"), "unrelated catalog sentinel");
|
|
782
783
|
});
|
|
784
|
+
test.each([
|
|
785
|
+
["codex-cli 0.133.0", false],
|
|
786
|
+
["codex-cli 0.162.1", true]
|
|
787
|
+
])("Codex update with native %s keeps state.json nativeVersion consistent", async (found, qualified) => {
|
|
788
|
+
const { native, catalog } = replacementFixture();
|
|
789
|
+
const statePath = join(dirname(catalog), "state.json");
|
|
790
|
+
const state = JSON.parse(readFileSync(statePath, "utf8"));
|
|
791
|
+
atomicJson.writePrivateJsonFileAtomically(statePath, { ...state, nativeVersion: "codex-cli 0.162.1" });
|
|
792
|
+
const before = readFileSync(statePath);
|
|
793
|
+
native.version = found;
|
|
794
|
+
const update = managePlugin({ ...input(), action: "update", version: "0.3.22" });
|
|
795
|
+
if (qualified) {
|
|
796
|
+
await update;
|
|
797
|
+
const after = JSON.parse(readFileSync(statePath, "utf8"));
|
|
798
|
+
assert.equal(after.nativeVersion, found);
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
const refusal = await update.then(
|
|
802
|
+
() => void 0,
|
|
803
|
+
(error) => error
|
|
804
|
+
);
|
|
805
|
+
assert.deepEqual(readFileSync(statePath), before);
|
|
806
|
+
assert.ok(refusal instanceof Error && refusal.message.includes(`(${found})`));
|
|
807
|
+
});
|
|
783
808
|
test.each(["update", "install", "rollback"])(
|
|
784
809
|
"Claude owned %s refuses an unqualified native version before catalog or selection changes",
|
|
785
810
|
async (action) => {
|