plugnz 0.0.19 → 0.0.21
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/plugnz.mjs +48 -33
- package/package.json +1 -1
package/dist/plugnz.mjs
CHANGED
|
@@ -11074,7 +11074,9 @@ function renderNumber(value) {
|
|
|
11074
11074
|
return String(value);
|
|
11075
11075
|
}
|
|
11076
11076
|
function yamlStringify(value) {
|
|
11077
|
-
if (value ===
|
|
11077
|
+
if (value === undefined || typeof value === "function" || typeof value === "symbol")
|
|
11078
|
+
return;
|
|
11079
|
+
if (value === null)
|
|
11078
11080
|
return "null";
|
|
11079
11081
|
if (typeof value === "boolean")
|
|
11080
11082
|
return value ? "true" : "false";
|
|
@@ -11085,18 +11087,18 @@ function yamlStringify(value) {
|
|
|
11085
11087
|
if (Array.isArray(value)) {
|
|
11086
11088
|
const entries = [];
|
|
11087
11089
|
for (const entry of value) {
|
|
11088
|
-
|
|
11089
|
-
|
|
11090
|
-
|
|
11090
|
+
const rendered = yamlStringify(entry);
|
|
11091
|
+
if (rendered !== undefined)
|
|
11092
|
+
entries.push(rendered);
|
|
11091
11093
|
}
|
|
11092
11094
|
return `[${entries.join(",")}]`;
|
|
11093
11095
|
}
|
|
11094
11096
|
if (typeof value === "object") {
|
|
11095
11097
|
const entries = [];
|
|
11096
11098
|
for (const [key, entry] of Object.entries(value)) {
|
|
11097
|
-
|
|
11098
|
-
|
|
11099
|
-
|
|
11099
|
+
const rendered = yamlStringify(entry);
|
|
11100
|
+
if (rendered !== undefined)
|
|
11101
|
+
entries.push(`${renderScalar(key)}: ${rendered}`);
|
|
11100
11102
|
}
|
|
11101
11103
|
return `{${entries.join(",")}}`;
|
|
11102
11104
|
}
|
|
@@ -12918,6 +12920,8 @@ function originLabel(entry) {
|
|
|
12918
12920
|
function shortSha(sha) {
|
|
12919
12921
|
return sha.slice(0, 8);
|
|
12920
12922
|
}
|
|
12923
|
+
var MIN_SHA_PREFIX_LENGTH = 7;
|
|
12924
|
+
var FULL_SHA_LENGTH = 40;
|
|
12921
12925
|
function sameSha(installed, head) {
|
|
12922
12926
|
const a = installed.toLowerCase();
|
|
12923
12927
|
const b = head.toLowerCase();
|
|
@@ -12925,7 +12929,7 @@ function sameSha(installed, head) {
|
|
|
12925
12929
|
return true;
|
|
12926
12930
|
const short = a.length < b.length ? a : b;
|
|
12927
12931
|
const full = a.length < b.length ? b : a;
|
|
12928
|
-
if (short.length <
|
|
12932
|
+
if (short.length < MIN_SHA_PREFIX_LENGTH || full.length < FULL_SHA_LENGTH)
|
|
12929
12933
|
return false;
|
|
12930
12934
|
return full.startsWith(short);
|
|
12931
12935
|
}
|
|
@@ -33036,6 +33040,41 @@ async function runFrozenLifecycle(command) {
|
|
|
33036
33040
|
return { report, exitCode: exitCodeForLifecycleReport(report) };
|
|
33037
33041
|
}
|
|
33038
33042
|
|
|
33043
|
+
// src/add-report.ts
|
|
33044
|
+
function mergeAddReports(reports) {
|
|
33045
|
+
const snapshots = new Map;
|
|
33046
|
+
for (const report of reports) {
|
|
33047
|
+
for (const snapshot of report.command.sourceSnapshots)
|
|
33048
|
+
snapshots.set(snapshot.id, snapshot);
|
|
33049
|
+
}
|
|
33050
|
+
const failure = reports.find((report) => report.summary.result !== "converged") ?? null;
|
|
33051
|
+
const mutationStarted = reports.some((report) => report.summary.mutationStarted);
|
|
33052
|
+
const changed = reports.some((report) => report.summary.changed);
|
|
33053
|
+
const terminalPhase = failure === null ? "complete" : mutationStarted && ["parse", "resolve", "freeze", "preflight"].includes(failure.summary.terminalPhase) ? "apply" : failure.summary.terminalPhase;
|
|
33054
|
+
return parseLifecycleReport({
|
|
33055
|
+
schemaVersion: 1,
|
|
33056
|
+
command: { name: "add", dryRun: reports.some((report) => report.command.dryRun), sourceSnapshots: [...snapshots.values()] },
|
|
33057
|
+
plan: reports.flatMap((report) => report.plan),
|
|
33058
|
+
outcomes: reports.flatMap((report) => report.outcomes),
|
|
33059
|
+
...reports.some((report) => report.recovery !== undefined) ? {
|
|
33060
|
+
recovery: { schemaVersion: 1, receipts: reports.flatMap((report) => report.recovery?.receipts ?? []) }
|
|
33061
|
+
} : {},
|
|
33062
|
+
...reports.some((report) => report.adoptions !== undefined) ? {
|
|
33063
|
+
adoptions: { schemaVersion: 1, receipts: reports.flatMap((report) => report.adoptions?.receipts ?? []) }
|
|
33064
|
+
} : {},
|
|
33065
|
+
summary: {
|
|
33066
|
+
result: failure?.summary.result ?? "converged",
|
|
33067
|
+
terminalPhase,
|
|
33068
|
+
mutationStarted,
|
|
33069
|
+
changed,
|
|
33070
|
+
failureCategory: failure?.summary.failureCategory ?? null,
|
|
33071
|
+
reason: failure?.summary.reason ?? null,
|
|
33072
|
+
recoveryId: reports.find((report) => report.summary.recoveryId !== null)?.summary.recoveryId ?? null,
|
|
33073
|
+
readbackId: reports.find((report) => report.summary.readbackId !== null)?.summary.readbackId ?? null
|
|
33074
|
+
}
|
|
33075
|
+
});
|
|
33076
|
+
}
|
|
33077
|
+
|
|
33039
33078
|
// src/lifecycle-hosts.ts
|
|
33040
33079
|
function plannerHost(kind, adapter, plannedNativeId, announceDryRun) {
|
|
33041
33080
|
return {
|
|
@@ -33801,7 +33840,7 @@ function legacyCommandAction(command) {
|
|
|
33801
33840
|
// package.json
|
|
33802
33841
|
var package_default = {
|
|
33803
33842
|
name: "plugnz",
|
|
33804
|
-
version: "0.0.
|
|
33843
|
+
version: "0.0.21",
|
|
33805
33844
|
description: "Install, diagnose and update agent plugins (Agent Plugins spec) and MCP configs across Claude Code, Codex, Cursor, Kimi and more",
|
|
33806
33845
|
license: "MIT",
|
|
33807
33846
|
type: "module",
|
|
@@ -34789,30 +34828,6 @@ async function runWriterAdd(source, selectedWriters, flags, mode) {
|
|
|
34789
34828
|
sourceSnapshots
|
|
34790
34829
|
});
|
|
34791
34830
|
}
|
|
34792
|
-
function mergeAddReports(reports) {
|
|
34793
|
-
const snapshots = new Map;
|
|
34794
|
-
for (const report of reports) {
|
|
34795
|
-
for (const snapshot of report.command.sourceSnapshots)
|
|
34796
|
-
snapshots.set(snapshot.id, snapshot);
|
|
34797
|
-
}
|
|
34798
|
-
const failure = reports.find((report) => report.summary.result !== "converged") ?? null;
|
|
34799
|
-
return parseLifecycleReport({
|
|
34800
|
-
schemaVersion: 1,
|
|
34801
|
-
command: { name: "add", dryRun: reports.some((report) => report.command.dryRun), sourceSnapshots: [...snapshots.values()] },
|
|
34802
|
-
plan: reports.flatMap((report) => report.plan),
|
|
34803
|
-
outcomes: reports.flatMap((report) => report.outcomes),
|
|
34804
|
-
summary: failure === null ? {
|
|
34805
|
-
result: "converged",
|
|
34806
|
-
terminalPhase: "complete",
|
|
34807
|
-
mutationStarted: reports.some((report) => report.summary.mutationStarted),
|
|
34808
|
-
changed: reports.some((report) => report.summary.changed),
|
|
34809
|
-
failureCategory: null,
|
|
34810
|
-
reason: null,
|
|
34811
|
-
recoveryId: null,
|
|
34812
|
-
readbackId: null
|
|
34813
|
-
} : failure.summary
|
|
34814
|
-
});
|
|
34815
|
-
}
|
|
34816
34831
|
async function runRecordedLifecycleRemove(flags, target, state, selected) {
|
|
34817
34832
|
const kinds = new Set(selected.map((writer) => writer.id));
|
|
34818
34833
|
const scopes = new Map(state.scopes.map((scope) => [scope.id, scope]));
|
package/package.json
CHANGED