plugnz 0.0.25 → 0.0.27
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 +138 -20
- package/package.json +1 -1
package/dist/plugnz.mjs
CHANGED
|
@@ -7852,7 +7852,12 @@ function homeRoot() {
|
|
|
7852
7852
|
return process.env["HOME"] ?? ".";
|
|
7853
7853
|
}
|
|
7854
7854
|
function claudeCodeRoot() {
|
|
7855
|
-
|
|
7855
|
+
const explicitRoot = process.env["OPEN_PLUGIN_CLAUDE_CODE_ROOT"];
|
|
7856
|
+
if (explicitRoot !== undefined)
|
|
7857
|
+
return explicitRoot;
|
|
7858
|
+
if (process.env["OPEN_PLUGIN_HOME"])
|
|
7859
|
+
return join(homeRoot(), ".claude");
|
|
7860
|
+
return process.env["CLAUDE_CONFIG_DIR"] || join(homeRoot(), ".claude");
|
|
7856
7861
|
}
|
|
7857
7862
|
function codexHome() {
|
|
7858
7863
|
return process.env["OPEN_PLUGIN_CODEX_HOME"] ?? join(homeRoot(), ".codex");
|
|
@@ -14532,7 +14537,7 @@ function parseComponentDefinition(absolute, path, kind, dialect, filenameIdentit
|
|
|
14532
14537
|
declarations
|
|
14533
14538
|
};
|
|
14534
14539
|
return {
|
|
14535
|
-
definition: { kind, dialect, identity, path },
|
|
14540
|
+
definition: { kind, dialect, identity, path, ...kind === "agent" ? { metadataKeys: Object.keys(record).sort() } : {} },
|
|
14536
14541
|
policy,
|
|
14537
14542
|
hasPermissionsPreprocessing: hasAny(record, PERMISSION_FIELDS) || /!`[\s\S]*?`/u.test(body)
|
|
14538
14543
|
};
|
|
@@ -14689,9 +14694,11 @@ function admitPackageSemanticsFromProfiles(request, profiles) {
|
|
|
14689
14694
|
const version = normalizedDetectedVersion(request.detectedVersion);
|
|
14690
14695
|
const candidates = version === undefined ? [] : profiles.filter((candidate) => candidate.host === request.host && candidate.detectedVersion === version && candidate.sourceTypes.includes(request.sourceType) && candidate.operations.includes(request.operation) && candidate.route === request.route);
|
|
14691
14696
|
const portable = (request.operation === "install" || request.operation === "update") && request.inventory.hookDeclarations.some((declaration) => declaration.form === "portable-hooks");
|
|
14692
|
-
const
|
|
14697
|
+
const claudeNative = (request.operation === "install" || request.operation === "update") && !portable && request.inventory.hookDeclarations.some((declaration) => declaration.form !== "portable-hooks");
|
|
14698
|
+
const portableSpecialized = candidates.filter((candidate) => candidate.packageFormat === "portable-hooks");
|
|
14699
|
+
const claudeNativeSpecialized = candidates.filter((candidate) => candidate.packageFormat === "claude-native-hooks");
|
|
14693
14700
|
const ordinary = candidates.filter((candidate) => candidate.packageFormat === undefined);
|
|
14694
|
-
const matching = portable &&
|
|
14701
|
+
const matching = portable && portableSpecialized.length > 0 ? portableSpecialized : claudeNative && claudeNativeSpecialized.length > 0 ? claudeNativeSpecialized : request.operation === "install" || request.operation === "update" ? ordinary : ordinary.length > 0 ? ordinary : portableSpecialized.length > 0 ? portableSpecialized : claudeNativeSpecialized;
|
|
14695
14702
|
if (matching.length > 1) {
|
|
14696
14703
|
throw new Error(`ambiguous capability evidence for ${request.host} ${version} ${request.sourceType} ${request.route} ${request.operation}`);
|
|
14697
14704
|
}
|
|
@@ -14717,7 +14724,7 @@ function admitPackageSemanticsFromProfiles(request, profiles) {
|
|
|
14717
14724
|
}
|
|
14718
14725
|
const gaps = requirements.flatMap((semantic) => {
|
|
14719
14726
|
const sourceOperation = request.operation === "install" || request.operation === "update";
|
|
14720
|
-
const hookProblem = semantic === "hooks" && sourceOperation ? unsupportedHookDeclaration(request.inventory, profile.hookPolicy) : semantic === "auto-update-control" && sourceOperation && profile.packageFormat === "portable-hooks" && request.inventory.autoUpdate.length > 0 ? unsupportedHookProblem("portable hook installation does not project authored native auto-update directives") : null;
|
|
14727
|
+
const hookProblem = semantic === "agents" && sourceOperation && profile.agentPolicy === "prompt-resources" ? unsupportedPromptPersona(request.inventory) : semantic === "hooks" && sourceOperation ? unsupportedHookDeclaration(request.inventory, profile.hookPolicy) : semantic === "auto-update-control" && sourceOperation && profile.packageFormat === "portable-hooks" && request.inventory.autoUpdate.length > 0 ? unsupportedHookProblem("portable hook installation does not project authored native auto-update directives") : null;
|
|
14721
14728
|
const status = profile.semantics[semantic] === "supported" && hookProblem !== null ? hookProblem.status : profile.semantics[semantic];
|
|
14722
14729
|
return status === "supported" ? [] : [capabilityReason(status, semantic, profile, profile.semantics[semantic] === "supported" && hookProblem !== null ? hookProblem.diagnostic : `target '${request.host}' ${profile.detectedVersion} ${profile.route} ${request.operation} is ${status} for ${semantic}`)];
|
|
14723
14730
|
});
|
|
@@ -14768,6 +14775,7 @@ function createCapabilityEvidenceProfile(input) {
|
|
|
14768
14775
|
operationStatus: input.operationStatus,
|
|
14769
14776
|
semantics: PACKAGE_SEMANTICS.map((semantic) => [semantic, input.semantics[semantic]]),
|
|
14770
14777
|
hookPolicy,
|
|
14778
|
+
...input.agentPolicy === undefined ? {} : { agentPolicy: input.agentPolicy },
|
|
14771
14779
|
evidence
|
|
14772
14780
|
};
|
|
14773
14781
|
const hash = new CryptoHasher("sha256");
|
|
@@ -14785,9 +14793,25 @@ function createCapabilityEvidenceProfile(input) {
|
|
|
14785
14793
|
operationStatus: input.operationStatus,
|
|
14786
14794
|
semantics: Object.freeze({ ...input.semantics }),
|
|
14787
14795
|
hookPolicy,
|
|
14796
|
+
...input.agentPolicy === undefined ? {} : { agentPolicy: input.agentPolicy },
|
|
14788
14797
|
evidence: Object.freeze(evidence)
|
|
14789
14798
|
});
|
|
14790
14799
|
}
|
|
14800
|
+
function unsupportedPromptPersona(inventory) {
|
|
14801
|
+
for (const path of inventory.components.agents) {
|
|
14802
|
+
const agent = inventory.componentDefinitions.find((item) => item.kind === "agent" && item.path === path);
|
|
14803
|
+
if (agent?.root !== "agents" || agent.dialect !== "markdown" || agent.metadataKeys === undefined) {
|
|
14804
|
+
return unsupportedHookProblem(`prompt-resource agent adaptation cannot prove '${path}' as a canonical Markdown persona`);
|
|
14805
|
+
}
|
|
14806
|
+
const field = agent.metadataKeys.find((key) => key !== "name" && key !== "description");
|
|
14807
|
+
if (field !== undefined)
|
|
14808
|
+
return unsupportedHookProblem(`prompt-resource agent adaptation cannot preserve '${path}' metadata '${field}'; native agent registration is unsupported`);
|
|
14809
|
+
}
|
|
14810
|
+
if (inventory.components.agents.length > 0 && inventory.components.commands.length === 0) {
|
|
14811
|
+
return unsupportedHookProblem("prompt-resource agent adaptation requires a projected command with persona loading instructions");
|
|
14812
|
+
}
|
|
14813
|
+
return null;
|
|
14814
|
+
}
|
|
14791
14815
|
function unsupportedHookDeclaration(inventory, policy) {
|
|
14792
14816
|
if (policy === null)
|
|
14793
14817
|
return unverifiedHookProblem("target profile has no evidence for authored hook declaration dialects");
|
|
@@ -15868,7 +15892,7 @@ function writeCommandSkill(stage, command, namespace, commandNames) {
|
|
|
15868
15892
|
`;
|
|
15869
15893
|
const preface = `Use the user's text after the skill invocation as command arguments; no text means empty arguments. Load referenced skills from sibling directories (../<skill>/SKILL.md). Plugin personas live at ../../agents/<persona>.md and shared references at ../../references/, relative to this file.
|
|
15870
15894
|
|
|
15871
|
-
For persona work, read the persona file and use the current harness's available delegation facility with those instructions. Persona names are not assumed to be registered tools or agent types. If delegation is unavailable, perform the passes sequentially and report that limitation.
|
|
15895
|
+
For persona work, read the persona file and use the current harness's available delegation facility with those instructions. Persona names are not assumed to be registered tools or agent types. These adaptation instructions override any native-agent registration assumptions in the command body below. If delegation is unavailable, perform the passes sequentially and report that limitation.
|
|
15872
15896
|
|
|
15873
15897
|
`;
|
|
15874
15898
|
mkdirSync5(join25(skillDir, "agents"), { recursive: true });
|
|
@@ -16471,7 +16495,7 @@ function selectLifecycleRoute(adapterId, profiles, request) {
|
|
|
16471
16495
|
return selectedDecision(adapterId, target, request, detectedVersion, "managed", managedAdmission);
|
|
16472
16496
|
}
|
|
16473
16497
|
const versionDiagnostic = request.version.kind === "detected" ? undefined : request.version.diagnostic;
|
|
16474
|
-
const gaps = dedupeGaps([...nativeGaps, ...managedAdmission.gaps].map((gap) => versionDiagnostic === undefined ? gap : { ...gap, diagnostic: `${gap.diagnostic}. ${versionDiagnostic}` }));
|
|
16498
|
+
const gaps = dedupeGaps([...nativeGaps, ...managedAdmission.gaps].map((gap) => versionDiagnostic === undefined ? gap : { ...gap, diagnostic: `${gap.diagnostic}. ${versionDiagnostic}` })).sort((left, right) => Number(left.capabilityId === "profile") - Number(right.capabilityId === "profile"));
|
|
16475
16499
|
if (gaps.length === 0)
|
|
16476
16500
|
invariant("a refused route decision must retain at least one capability gap");
|
|
16477
16501
|
return deepFreeze({
|
|
@@ -18575,6 +18599,12 @@ function createClaudeCodeLifecycleHost(input) {
|
|
|
18575
18599
|
return decision;
|
|
18576
18600
|
if (request.operation !== "install" && request.operation !== "update")
|
|
18577
18601
|
return decision;
|
|
18602
|
+
if (request.snapshot.inventory.hookDeclarations.some((declaration) => declaration.form === "portable-hooks") && !claudeReflectionPermissionsSupported(request.snapshot.inventory, request.snapshot.packageRoot)) {
|
|
18603
|
+
return selectLifecycleRoute(definition.id, definition.evidenceProfiles.map((profile) => ({
|
|
18604
|
+
...profile,
|
|
18605
|
+
semantics: { ...profile.semantics, "ordinary-skills": "unsupported", agents: "unsupported", "permissions-preprocessing": "unsupported" }
|
|
18606
|
+
})), request);
|
|
18607
|
+
}
|
|
18578
18608
|
if (request.snapshot.inventory.componentDefinitions.some((component) => component.kind === "agent" && (component.root !== "agents" || component.dialect !== "markdown"))) {
|
|
18579
18609
|
return selectLifecycleRoute(definition.id, definition.evidenceProfiles.map((profile) => ({
|
|
18580
18610
|
...profile,
|
|
@@ -18618,12 +18648,95 @@ function claudeRouteEvidence(contracts, facts) {
|
|
|
18618
18648
|
return { route: "managed", hold: "same-version-bytes" };
|
|
18619
18649
|
return { route: "native", proofId: `claude-native-update-${contract.version}-git` };
|
|
18620
18650
|
}
|
|
18651
|
+
function claudeReflectionPermissionsSupported(inventory, root) {
|
|
18652
|
+
const agents = inventory.componentDefinitions.filter((component) => component.kind === "agent");
|
|
18653
|
+
const agentPaths = new Set(agents.map((component) => component.path));
|
|
18654
|
+
if (inventory.components.permissionsPreprocessing.some((path) => !agentPaths.has(path)))
|
|
18655
|
+
return false;
|
|
18656
|
+
if (!inventory.components.skills.every((path) => {
|
|
18657
|
+
try {
|
|
18658
|
+
const raw = readFileSync21(join27(root, path), "utf8");
|
|
18659
|
+
const match = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)([\s\S]*)$/u.exec(raw);
|
|
18660
|
+
if (!match || /!`[\s\S]*?`/u.test(raw))
|
|
18661
|
+
return false;
|
|
18662
|
+
const header = yamlParse(match[1] ?? "");
|
|
18663
|
+
return !PERMISSION_FIELDS.some((field) => Object.hasOwn(header, field));
|
|
18664
|
+
} catch {
|
|
18665
|
+
return false;
|
|
18666
|
+
}
|
|
18667
|
+
}))
|
|
18668
|
+
return false;
|
|
18669
|
+
return agents.every((component) => {
|
|
18670
|
+
if (component.root !== "agents" || component.dialect !== "markdown")
|
|
18671
|
+
return false;
|
|
18672
|
+
try {
|
|
18673
|
+
const raw = readFileSync21(join27(root, component.path), "utf8");
|
|
18674
|
+
const match = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)([\s\S]*)$/u.exec(raw);
|
|
18675
|
+
if (!match || /!`[\s\S]*?`/u.test(raw))
|
|
18676
|
+
return false;
|
|
18677
|
+
const header = yamlParse(match[1] ?? "");
|
|
18678
|
+
if (Object.keys(header).some((key) => !["name", "description", "model", "tools"].includes(key)) || header["model"] !== "inherit")
|
|
18679
|
+
return false;
|
|
18680
|
+
const tools = typeof header["tools"] === "string" ? header["tools"].split(",").map((tool) => tool.trim()).sort() : [];
|
|
18681
|
+
return tools.length === 2 && tools[0] === "Read" && tools[1] === "Write";
|
|
18682
|
+
} catch {
|
|
18683
|
+
return false;
|
|
18684
|
+
}
|
|
18685
|
+
});
|
|
18686
|
+
}
|
|
18687
|
+
function claudeReflectionHookProfile() {
|
|
18688
|
+
const hooks = portableHookProfile(hookAdapter, "managed", ["install", "update", "disable", "retire"]);
|
|
18689
|
+
return createCapabilityEvidenceProfile({
|
|
18690
|
+
...hooks,
|
|
18691
|
+
semantics: { ...hooks.semantics, "ordinary-skills": "supported", agents: "supported", "permissions-preprocessing": "supported" },
|
|
18692
|
+
evidence: [...hooks.evidence, "docs/evidence/claude-code-2.1.285-reflection-20261016.json"]
|
|
18693
|
+
});
|
|
18694
|
+
}
|
|
18695
|
+
function claudeAdvisorCandidateHookProfile() {
|
|
18696
|
+
return createCapabilityEvidenceProfile({
|
|
18697
|
+
host: "claude-code",
|
|
18698
|
+
detectedVersion: "2.1.285",
|
|
18699
|
+
packageFormat: "claude-native-hooks",
|
|
18700
|
+
sourceTypes: ["local", "git"],
|
|
18701
|
+
operations: ["install", "update", "retire"],
|
|
18702
|
+
route: "managed",
|
|
18703
|
+
operationStatus: "supported",
|
|
18704
|
+
semantics: Object.fromEntries(PACKAGE_SEMANTICS.map((semantic) => [
|
|
18705
|
+
semantic,
|
|
18706
|
+
["hooks", "auto-update-control", "readback", "rollback", "activation-reload", "retirement", "retention-safety"].includes(semantic) ? "supported" : "unsupported"
|
|
18707
|
+
])),
|
|
18708
|
+
hookPolicy: {
|
|
18709
|
+
manifestPrecedence: [".claude-plugin/plugin.json", "plugin.json"],
|
|
18710
|
+
supportedForms: ["manifest-file"],
|
|
18711
|
+
supportedEvents: ["UserPromptSubmit", "PostToolUse", "PostToolUseFailure", "Stop"],
|
|
18712
|
+
supportedHandlerTypes: ["command"],
|
|
18713
|
+
matcherlessEvents: ["UserPromptSubmit", "Stop", "PostToolUse", "PostToolUseFailure"],
|
|
18714
|
+
supportedMatcherKinds: ["all"],
|
|
18715
|
+
unsupportedHandlerFacets: [
|
|
18716
|
+
"async-enabled",
|
|
18717
|
+
"async-non-boolean",
|
|
18718
|
+
"argv-invalid",
|
|
18719
|
+
"timeout-invalid",
|
|
18720
|
+
"status-message-invalid"
|
|
18721
|
+
]
|
|
18722
|
+
},
|
|
18723
|
+
evidence: [
|
|
18724
|
+
"docs/hosts/claude-code.md",
|
|
18725
|
+
"docs/research/native-plugin-update-capabilities-2026-10-09.md",
|
|
18726
|
+
"docs/evidence/claude-code-2.1.285-advisor-candidate-20261019.json"
|
|
18727
|
+
]
|
|
18728
|
+
});
|
|
18729
|
+
}
|
|
18621
18730
|
function claudeCodeLifecycleDefinition(contracts) {
|
|
18622
18731
|
const version = claudeVersionObservation(observeClaudeCodeVersion());
|
|
18623
18732
|
const detectedVersion = version.kind === "detected" ? version.version : undefined;
|
|
18624
18733
|
return {
|
|
18625
18734
|
id: "claude-code",
|
|
18626
|
-
evidenceProfiles: [
|
|
18735
|
+
evidenceProfiles: [
|
|
18736
|
+
...claudeEvidenceProfiles(detectedVersion, contracts),
|
|
18737
|
+
claudeReflectionHookProfile(),
|
|
18738
|
+
...detectedVersion === "2.1.285" ? [claudeAdvisorCandidateHookProfile()] : []
|
|
18739
|
+
],
|
|
18627
18740
|
probeVersion: async () => version,
|
|
18628
18741
|
observeTarget: async (target) => ({ target, installations: observeClaudeInstallations(target, detectedVersion) }),
|
|
18629
18742
|
observeNativeMutationScope: async (request) => ({
|
|
@@ -19643,7 +19756,7 @@ function disableMarketplaceAutoUpdate(nativeId) {
|
|
|
19643
19756
|
|
|
19644
19757
|
// src/hosts/codex-writer.ts
|
|
19645
19758
|
init_codex_hooks();
|
|
19646
|
-
import { chmodSync, cpSync as cpSync6, existsSync as existsSync22, lstatSync as lstatSync15, mkdirSync as mkdirSync7, mkdtempSync as mkdtempSync6, readFileSync as readFileSync23, readdirSync as readdirSync14, renameSync as renameSync4, rmSync as rmSync7, statSync as statSync10, writeFileSync as writeFileSync7 } from "node:fs";
|
|
19759
|
+
import { chmodSync, cpSync as cpSync6, existsSync as existsSync22, lstatSync as lstatSync15, mkdirSync as mkdirSync7, mkdtempSync as mkdtempSync6, readFileSync as readFileSync23, readdirSync as readdirSync14, readlinkSync as readlinkSync2, renameSync as renameSync4, rmSync as rmSync7, statSync as statSync10, writeFileSync as writeFileSync7 } from "node:fs";
|
|
19647
19760
|
import { dirname as dirname9, join as join29, resolve as resolve16 } from "node:path";
|
|
19648
19761
|
import { tmpdir as tmpdir3 } from "node:os";
|
|
19649
19762
|
|
|
@@ -20165,13 +20278,14 @@ function nativeUpgradeTimeout() {
|
|
|
20165
20278
|
}
|
|
20166
20279
|
var RELOAD_EFFECTIVE = { requirement: "reload", status: "effective" };
|
|
20167
20280
|
var UPDATE_SEMANTICS = ["ordinary-skills", "resources", "auto-update-control", "readback", "rollback", "activation-reload"];
|
|
20168
|
-
var MANAGED_SEMANTICS = [...UPDATE_SEMANTICS, "retirement", "retention-safety", "model-invocation-control", "commands", "mcp"];
|
|
20281
|
+
var MANAGED_SEMANTICS = [...UPDATE_SEMANTICS, "retirement", "retention-safety", "model-invocation-control", "commands", "mcp", "agents"];
|
|
20169
20282
|
var OH_MY_AI_INSTALL_SEMANTICS2 = ["ordinary-skills", "mcp", "resources", "auto-update-control", "readback", "rollback", "activation-reload"];
|
|
20170
20283
|
var codexEvidenceProfiles = [
|
|
20171
20284
|
portableHookProfile(hookAdapter2, "managed", ["install", "update", "retire"]),
|
|
20172
20285
|
codexRouteProfile(CODEX_NATIVE_ROUTE_VERSION, "native", ["update"], UPDATE_SEMANTICS, ["docs/research/native-plugin-update-capabilities-2026-10-09.md", "docs/evidence/codex-native-released-20261011.md"]),
|
|
20173
|
-
...CODEX_MANAGED_ROUTE_VERSIONS.map((version) => codexRouteProfile(version, "managed", ["install", "update", "retire"], version === "0.161.0" ? [...OH_MY_AI_INSTALL_SEMANTICS2, "retirement", "retention-safety"] : MANAGED_SEMANTICS, [
|
|
20286
|
+
...CODEX_MANAGED_ROUTE_VERSIONS.map((version) => codexRouteProfile(version, "managed", ["install", "update", "retire"], version === "0.161.0" ? [...OH_MY_AI_INSTALL_SEMANTICS2, "retirement", "retention-safety", "commands", "model-invocation-control", "agents"] : MANAGED_SEMANTICS, [
|
|
20174
20287
|
"docs/hosts/codex.md",
|
|
20288
|
+
...["0.161.0", "0.162.0"].includes(version) ? ["docs/evidence/codex-addy-20261019.json"] : [],
|
|
20175
20289
|
"docs/adr/0004-retain-plugin-state-on-removal.md",
|
|
20176
20290
|
"docs/evidence/codex-policy-mcp-20261013.json",
|
|
20177
20291
|
"docs/evidence/codex-native-released-20261011.md",
|
|
@@ -20222,6 +20336,8 @@ function codexRouteProfile(detectedVersion, route, operations, supportedSemantic
|
|
|
20222
20336
|
throw new Error("codex marketplace checkout rollback must stay unverified");
|
|
20223
20337
|
}
|
|
20224
20338
|
const supported = new Set(supportedSemantics);
|
|
20339
|
+
if (!["0.161.0", "0.162.0"].includes(detectedVersion))
|
|
20340
|
+
supported.delete("agents");
|
|
20225
20341
|
const semantics = {};
|
|
20226
20342
|
for (const semantic of PACKAGE_SEMANTICS)
|
|
20227
20343
|
semantics[semantic] = supported.has(semantic) ? "supported" : "unsupported";
|
|
@@ -20233,6 +20349,7 @@ function codexRouteProfile(detectedVersion, route, operations, supportedSemantic
|
|
|
20233
20349
|
route,
|
|
20234
20350
|
operationStatus: "supported",
|
|
20235
20351
|
semantics,
|
|
20352
|
+
...supported.has("agents") ? { agentPolicy: "prompt-resources" } : {},
|
|
20236
20353
|
evidence
|
|
20237
20354
|
});
|
|
20238
20355
|
}
|
|
@@ -21140,7 +21257,8 @@ function parseRollbackVersions(value) {
|
|
|
21140
21257
|
return value;
|
|
21141
21258
|
}
|
|
21142
21259
|
function installationRecord(plugin) {
|
|
21143
|
-
const
|
|
21260
|
+
const linked = plugin.path !== undefined && lstatSync15(plugin.path).isSymbolicLink();
|
|
21261
|
+
const owned = plugin.path === undefined || linked ? null : readOwnership2(plugin.path);
|
|
21144
21262
|
const ownership = owned?.pluginId === plugin.id ? { kind: "owned", proof: "created", scopeId: owned.scopeId ?? `codex:${plugin.id}`, proofId: `marker:${plugin.id}` } : { kind: "unmanaged" };
|
|
21145
21263
|
if (plugin.path === undefined) {
|
|
21146
21264
|
return {
|
|
@@ -21156,7 +21274,7 @@ function installationRecord(plugin) {
|
|
|
21156
21274
|
contentRoots: []
|
|
21157
21275
|
};
|
|
21158
21276
|
}
|
|
21159
|
-
const installedFingerprint = fingerprintTree(plugin.path);
|
|
21277
|
+
const installedFingerprint = linked ? new CryptoHasher("sha256").update(`codex-unmanaged-symlink\x00${readlinkSync2(plugin.path)}`).digest("hex") : fingerprintTree(plugin.path);
|
|
21160
21278
|
return {
|
|
21161
21279
|
nativeId: plugin.id,
|
|
21162
21280
|
packageName: plugin.name,
|
|
@@ -23450,7 +23568,7 @@ function receipt(kind, handle) {
|
|
|
23450
23568
|
|
|
23451
23569
|
// src/hosts/omp-writer.ts
|
|
23452
23570
|
init_omp_hooks();
|
|
23453
|
-
import { cpSync as cpSync9, existsSync as existsSync25, lstatSync as lstatSync19, mkdirSync as mkdirSync10, mkdtempSync as mkdtempSync9, readFileSync as readFileSync27, readdirSync as readdirSync18, readlinkSync as
|
|
23571
|
+
import { cpSync as cpSync9, existsSync as existsSync25, lstatSync as lstatSync19, mkdirSync as mkdirSync10, mkdtempSync as mkdtempSync9, readFileSync as readFileSync27, readdirSync as readdirSync18, readlinkSync as readlinkSync3, renameSync as renameSync7, rmSync as rmSync10, symlinkSync, writeFileSync as writeFileSync10 } from "node:fs";
|
|
23454
23572
|
import { dirname as dirname12, join as join33, resolve as resolve20 } from "node:path";
|
|
23455
23573
|
import { tmpdir as tmpdir6 } from "node:os";
|
|
23456
23574
|
var MARKER6 = ".plgnz-install.json";
|
|
@@ -23666,7 +23784,7 @@ function lstatExists(path) {
|
|
|
23666
23784
|
}
|
|
23667
23785
|
function linkPointsTo(path, target) {
|
|
23668
23786
|
try {
|
|
23669
|
-
return lstatSync19(path).isSymbolicLink() && resolve20(dirname12(path),
|
|
23787
|
+
return lstatSync19(path).isSymbolicLink() && resolve20(dirname12(path), readlinkSync3(path)) === resolve20(target);
|
|
23670
23788
|
} catch {
|
|
23671
23789
|
return false;
|
|
23672
23790
|
}
|
|
@@ -24237,7 +24355,7 @@ function restoreLockRow(saved) {
|
|
|
24237
24355
|
}
|
|
24238
24356
|
function currentLinkTarget(path) {
|
|
24239
24357
|
try {
|
|
24240
|
-
return lstatSync19(path).isSymbolicLink() ? resolve20(dirname12(path),
|
|
24358
|
+
return lstatSync19(path).isSymbolicLink() ? resolve20(dirname12(path), readlinkSync3(path)) : null;
|
|
24241
24359
|
} catch {
|
|
24242
24360
|
return null;
|
|
24243
24361
|
}
|
|
@@ -26225,7 +26343,7 @@ var opencodeHookWriter = createNativeHookWriter({
|
|
|
26225
26343
|
|
|
26226
26344
|
// src/hosts/grok-writer.ts
|
|
26227
26345
|
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
26228
|
-
import { cpSync as cpSync13, existsSync as existsSync30, lstatSync as lstatSync24, mkdirSync as mkdirSync15, mkdtempSync as mkdtempSync14, readFileSync as readFileSync32, readdirSync as readdirSync22, readlinkSync as
|
|
26346
|
+
import { cpSync as cpSync13, existsSync as existsSync30, lstatSync as lstatSync24, mkdirSync as mkdirSync15, mkdtempSync as mkdtempSync14, readFileSync as readFileSync32, readdirSync as readdirSync22, readlinkSync as readlinkSync4, renameSync as renameSync12, rmSync as rmSync15, symlinkSync as symlinkSync2, writeFileSync as writeFileSync15 } from "node:fs";
|
|
26229
26347
|
import { dirname as dirname17, join as join38, resolve as resolve24 } from "node:path";
|
|
26230
26348
|
import { tmpdir as tmpdir11 } from "node:os";
|
|
26231
26349
|
var stableId = (plugin) => plugin.marketplace === undefined ? plugin.name : `${plugin.name}@${plugin.marketplace}`;
|
|
@@ -26653,7 +26771,7 @@ function legacyCandidate(plugin, adopt, prior) {
|
|
|
26653
26771
|
throw new Error(`Grok ${plugin.name}: legacy source, version, and native bytes must match before adoption`);
|
|
26654
26772
|
const link = join38(grokRoot(), "plugins", plugin.name);
|
|
26655
26773
|
if (existsSync30(link) || lstatExists2(link)) {
|
|
26656
|
-
if (!lstatSync24(link).isSymbolicLink() || canonical(resolve24(dirname17(link),
|
|
26774
|
+
if (!lstatSync24(link).isSymbolicLink() || canonical(resolve24(dirname17(link), readlinkSync4(link))) !== installed)
|
|
26657
26775
|
throw new Error(`Grok ${plugin.name}: unmanaged same-name plugin link blocks adoption`);
|
|
26658
26776
|
}
|
|
26659
26777
|
return { source, fingerprint: fingerprintTree(installed), ...lstatExists2(link) ? { link } : {} };
|
|
@@ -27034,7 +27152,7 @@ function captureHostSnapshot(directory, nativeId, packageName, attemptId, operat
|
|
|
27034
27152
|
writeFileSync15(join38(directory, "registry-repo.json"), JSON.stringify(matched === undefined ? { key: null } : { key: matched[0], repo: matched[1] }));
|
|
27035
27153
|
const link = join38(grokRoot(), "plugins", packageName);
|
|
27036
27154
|
if (lstatExists2(link) && lstatSync24(link).isSymbolicLink())
|
|
27037
|
-
writeFileSync15(join38(directory, "link.txt"),
|
|
27155
|
+
writeFileSync15(join38(directory, "link.txt"), readlinkSync4(link));
|
|
27038
27156
|
}
|
|
27039
27157
|
function freshNativePaths(directory, marketplacePath) {
|
|
27040
27158
|
const paths = new Set;
|
|
@@ -34128,7 +34246,7 @@ function legacyCommandAction(command) {
|
|
|
34128
34246
|
// package.json
|
|
34129
34247
|
var package_default = {
|
|
34130
34248
|
name: "plugnz",
|
|
34131
|
-
version: "0.0.
|
|
34249
|
+
version: "0.0.27",
|
|
34132
34250
|
description: "Install, diagnose and update agent plugins (Agent Plugins spec) and MCP configs across Claude Code, Codex, Cursor, Kimi and more",
|
|
34133
34251
|
license: "MIT",
|
|
34134
34252
|
type: "module",
|
package/package.json
CHANGED