plugnz 0.0.21 → 0.0.22

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.
Files changed (2) hide show
  1. package/dist/plugnz.mjs +82 -19
  2. package/package.json +1 -1
package/dist/plugnz.mjs CHANGED
@@ -11108,7 +11108,8 @@ function yamlStringify(value) {
11108
11108
  // src/hosts/hermes.ts
11109
11109
  var hermesProvenManagedRevisions = [
11110
11110
  "c0d7294769a38c17ceae51d8f7995e66e1dcae27",
11111
- "dce1e9b37581dd62e480a9064dc04a709c2940d3"
11111
+ "dce1e9b37581dd62e480a9064dc04a709c2940d3",
11112
+ "6e7b83a2f1c093e992a8d838ed77ea320fbd8e51"
11112
11113
  ];
11113
11114
  var hermesTargetProfile = {
11114
11115
  kind: "hermes",
@@ -15001,7 +15002,7 @@ function sourceBindingForArgument(source) {
15001
15002
  }
15002
15003
  function parseSource(source) {
15003
15004
  if (source.startsWith("./") || source.startsWith("../") || isAbsolute9(source)) {
15004
- const locator = resolve12(source);
15005
+ const locator = canonicalLocalArgument(source);
15005
15006
  const binding = { kind: "local", locator };
15006
15007
  validateSourceBinding(binding);
15007
15008
  return { binding, sourceUri: locator };
@@ -15026,11 +15027,19 @@ function parseSource(source) {
15026
15027
  validateSourceBinding(binding);
15027
15028
  return { binding, sourceUri: formatSourceBinding(binding), fetchLocator: locator };
15028
15029
  }
15029
- const locator = resolve12(source);
15030
+ const locator = canonicalLocalArgument(source);
15030
15031
  const binding = { kind: "local", locator };
15031
15032
  validateSourceBinding(binding);
15032
15033
  return { binding, sourceUri: locator };
15033
15034
  }
15035
+ function canonicalLocalArgument(source) {
15036
+ const path = resolve12(source);
15037
+ if (!existsSync20(path))
15038
+ return path;
15039
+ if (lstatSync10(path).isSymbolicLink())
15040
+ throw new Error(`Symlink resources are not supported: ${path}`);
15041
+ return realpath(path);
15042
+ }
15034
15043
  function formatSourceBinding(binding) {
15035
15044
  return binding.kind === "git" && binding.ref !== "HEAD" ? `${binding.locator}#${binding.ref}` : binding.locator;
15036
15045
  }
@@ -18387,6 +18396,19 @@ function createClaudeCodeLifecycleHost(input) {
18387
18396
  return decision;
18388
18397
  if (request.operation !== "install" && request.operation !== "update")
18389
18398
  return decision;
18399
+ if (request.snapshot.inventory.componentDefinitions.some((component) => component.kind === "agent" && (component.root !== "agents" || component.dialect !== "markdown"))) {
18400
+ return selectLifecycleRoute(definition.id, definition.evidenceProfiles.map((profile) => ({
18401
+ ...profile,
18402
+ semantics: { ...profile.semantics, agents: "unsupported" }
18403
+ })), request);
18404
+ }
18405
+ const policies = [...request.snapshot.inventory.invocationPolicies, ...request.snapshot.inventory.componentInvocationPolicies];
18406
+ if (policies.some((policy) => !policy.modelInvocable && !policy.declarations.some((declaration) => declaration.dialect === "claude-frontmatter" && declaration.field === "disable-model-invocation" && declaration.direction === "model" && declaration.allowed === false))) {
18407
+ return selectLifecycleRoute(definition.id, definition.evidenceProfiles.map((profile) => ({
18408
+ ...profile,
18409
+ semantics: { ...profile.semantics, "model-invocation-control": "unsupported" }
18410
+ })), request);
18411
+ }
18390
18412
  if (!autoUpdateControlBlocked(request.nativeId))
18391
18413
  return decision;
18392
18414
  return selectLifecycleRoute(definition.id, profilesWithoutAutoUpdate(definition.evidenceProfiles), request);
@@ -18596,7 +18618,7 @@ function claudeVersionObservation(observed) {
18596
18618
  return { kind: "detected", version: observed.version, probeId: observed.probeId };
18597
18619
  return { kind: observed.kind };
18598
18620
  }
18599
- var CLAUDE_MANAGED_RELEASES = new Set(["2.1.275", "2.1.295"]);
18621
+ var CLAUDE_MANAGED_RELEASES = new Set(["2.1.275", "2.1.295", "2.1.296"]);
18600
18622
  function claudeEvidenceProfiles(version, contracts) {
18601
18623
  if (version === undefined)
18602
18624
  return [];
@@ -18617,10 +18639,15 @@ function claudeProfile(version, route, sourceTypes, operations) {
18617
18639
  operations,
18618
18640
  route,
18619
18641
  operationStatus: "supported",
18620
- semantics: claudeSemantics(),
18642
+ semantics: claudeSemantics(version),
18621
18643
  evidence: [
18622
18644
  "docs/hosts/claude-code.md",
18623
- "docs/research/native-plugin-update-capabilities-2026-10-09.md"
18645
+ "docs/research/native-plugin-update-capabilities-2026-10-09.md",
18646
+ ...version === "2.1.296" ? [
18647
+ "docs/evidence/claude-code-2.1.296-native-20261013.json",
18648
+ "docs/evidence/claude-code-2.1.296-invocation-20261013.json",
18649
+ "docs/evidence/claude-code-2.1.296-agents-20261013.json"
18650
+ ] : []
18624
18651
  ]
18625
18652
  });
18626
18653
  }
@@ -18637,10 +18664,10 @@ var CLAUDE_PROJECTED_SEMANTICS = new Set([
18637
18664
  "activation-reload",
18638
18665
  "reversible-disable"
18639
18666
  ]);
18640
- function claudeSemantics() {
18667
+ function claudeSemantics(version) {
18641
18668
  return Object.fromEntries(PACKAGE_SEMANTICS.map((semantic) => [
18642
18669
  semantic,
18643
- CLAUDE_PROJECTED_SEMANTICS.has(semantic) ? "supported" : "unsupported"
18670
+ CLAUDE_PROJECTED_SEMANTICS.has(semantic) || version === "2.1.296" && (semantic === "model-invocation-control" || semantic === "agents") ? "supported" : "unsupported"
18644
18671
  ]));
18645
18672
  }
18646
18673
  function observeClaudeInstallations(target, version) {
@@ -19736,6 +19763,12 @@ function ensureNativeManifest(stage, fallbackName, fallbackVersion) {
19736
19763
  const sourceManifest = readPluginManifest(stage);
19737
19764
  if (sourceManifest === undefined)
19738
19765
  throw new Error("Codex stage has no Agent Plugins manifest");
19766
+ for (const path of ["plugin.json", ".plugin/plugin.json", ".claude-plugin/plugin.json"]) {
19767
+ const file = join29(stage, path);
19768
+ if (existsSync23(file) && JSON.parse(readFileSync23(file, "utf8")).mcpServers !== undefined) {
19769
+ throw new Error("Codex inline manifest MCP projection is unverified; use mcp.json or .mcp.json");
19770
+ }
19771
+ }
19739
19772
  const name = sourceManifest.name ?? fallbackName;
19740
19773
  const version = sourceManifest.version ?? fallbackVersion;
19741
19774
  const description = sourceManifest.description ?? `Plugin ${name}`;
@@ -19753,8 +19786,36 @@ function ensureNativeManifest(stage, fallbackName, fallbackVersion) {
19753
19786
  throw new Error(`unsupported Codex native skills pointer: ${String(overlay["skills"])}`);
19754
19787
  }
19755
19788
  }
19789
+ const pointer = overlay["mcpServers"];
19790
+ if (pointer !== undefined && (typeof pointer !== "string" || !pointer.startsWith("./") || pointer.includes("\\") || pointer.split("/").includes("..") || !existsSync23(join29(stage, pointer)))) {
19791
+ throw new Error("Codex native MCP pointer must name an existing plugin-local file");
19792
+ }
19793
+ const mcpFiles = ["mcp.json", ".mcp.json", ...typeof pointer === "string" ? [pointer] : []].map((path) => join29(stage, path)).filter(existsSync23);
19794
+ const declarations = mcpFiles.map((file) => {
19795
+ const value = JSON.parse(readFileSync23(file, "utf8"));
19796
+ if (value === null || typeof value !== "object" || Array.isArray(value) || !("mcpServers" in value) || value.mcpServers === null || typeof value.mcpServers !== "object" || Array.isArray(value.mcpServers)) {
19797
+ throw new Error("Codex MCP declaration must contain a server object");
19798
+ }
19799
+ return mcpDeclarationIdentity(value.mcpServers);
19800
+ });
19801
+ if (declarations.some((value) => value !== declarations[0]))
19802
+ throw new Error("conflicting Codex canonical and native MCP declarations");
19756
19803
  mkdirSync7(dirname9(native), { recursive: true });
19757
- writeFileSync7(native, JSON.stringify({ ...overlay, name, version, description, skills: overlay["skills"] ?? "./skills/" }));
19804
+ writeFileSync7(native, JSON.stringify({
19805
+ ...overlay,
19806
+ name,
19807
+ version,
19808
+ description,
19809
+ skills: overlay["skills"] ?? "./skills/",
19810
+ ...overlay["mcpServers"] === undefined && existsSync23(join29(stage, "mcp.json")) && !existsSync23(join29(stage, ".mcp.json")) ? { mcpServers: "./mcp.json" } : {}
19811
+ }));
19812
+ }
19813
+ function mcpDeclarationIdentity(value) {
19814
+ if (Array.isArray(value))
19815
+ return JSON.stringify(value.map(mcpDeclarationIdentity));
19816
+ if (value !== null && typeof value === "object")
19817
+ return JSON.stringify(Object.entries(value).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0).map(([key, item]) => [key, mcpDeclarationIdentity(item)]));
19818
+ return JSON.stringify(value) ?? "null";
19758
19819
  }
19759
19820
  function assertManagedPath2(root, target) {
19760
19821
  if (target !== root && !target.startsWith(`${root}/`))
@@ -19907,13 +19968,14 @@ function nativeUpgradeTimeout() {
19907
19968
  }
19908
19969
  var RELOAD_EFFECTIVE = { requirement: "reload", status: "effective" };
19909
19970
  var UPDATE_SEMANTICS = ["ordinary-skills", "resources", "auto-update-control", "readback", "rollback", "activation-reload"];
19910
- var MANAGED_SEMANTICS = [...UPDATE_SEMANTICS, "retirement", "retention-safety"];
19971
+ var MANAGED_SEMANTICS = [...UPDATE_SEMANTICS, "retirement", "retention-safety", "model-invocation-control", "commands", "mcp"];
19911
19972
  var codexEvidenceProfiles = [
19912
19973
  portableHookProfile(hookAdapter2, "managed", ["install", "update", "retire"]),
19913
19974
  codexRouteProfile("native", ["update"], UPDATE_SEMANTICS, ["docs/research/native-plugin-update-capabilities-2026-10-09.md", "docs/evidence/codex-native-released-20261011.md"]),
19914
19975
  codexRouteProfile("managed", ["install", "update", "retire"], MANAGED_SEMANTICS, [
19915
19976
  "docs/hosts/codex.md",
19916
19977
  "docs/adr/0004-retain-plugin-state-on-removal.md",
19978
+ "docs/evidence/codex-policy-mcp-20261013.json",
19917
19979
  "docs/evidence/codex-native-released-20261011.md"
19918
19980
  ])
19919
19981
  ];
@@ -20501,6 +20563,7 @@ function captureNativeCacheSnapshots(projection) {
20501
20563
  const parentIdentity = nativeCacheParentIdentity(path);
20502
20564
  const parentMode = statSync10(dirname9(path)).mode & 4095;
20503
20565
  cpSync6(path, snapshot, { recursive: true });
20566
+ chmodSync(snapshot, statSync10(path).mode & 4095);
20504
20567
  if (nativeCacheFingerprint(snapshot) !== fingerprint || nativeCacheFingerprint(path) !== fingerprint)
20505
20568
  throw new Error("Codex complete native cache changed during capture");
20506
20569
  const slot = { nativeId, path, saved, fingerprint, parentIdentity, parentMode };
@@ -23614,23 +23677,23 @@ var supportedSemantics = new Set([
23614
23677
  "activation-reload",
23615
23678
  "reversible-disable"
23616
23679
  ]);
23617
- var ompManagedProfile = createCapabilityEvidenceProfile({
23680
+ var ompManagedProfiles = ["18.1.4", "18.10.3"].map((detectedVersion) => createCapabilityEvidenceProfile({
23618
23681
  host: "omp",
23619
- detectedVersion: "18.1.4",
23682
+ detectedVersion,
23620
23683
  sourceTypes: ["local", "git"],
23621
23684
  operations: ["install", "update", "disable", "retire"],
23622
23685
  route: "managed",
23623
23686
  operationStatus: "supported",
23624
23687
  semantics: Object.fromEntries(PACKAGE_SEMANTICS.map((semantic) => [semantic, supportedSemantics.has(semantic) ? "supported" : "unsupported"])),
23625
23688
  evidence: [
23626
- "docs/evidence/omp-native-extension-package-20260923.json",
23689
+ detectedVersion === "18.10.3" ? "docs/evidence/omp-native-extension-package-20261013.json" : "docs/evidence/omp-native-extension-package-20260923.json",
23627
23690
  "docs/hosts/omp.md",
23628
23691
  "docs/research/native-plugin-update-capabilities-2026-10-09.md"
23629
23692
  ]
23630
- });
23693
+ }));
23631
23694
  var ompLifecycleDefinition = {
23632
23695
  id: "omp",
23633
- evidenceProfiles: [ompManagedProfile, portableHookProfile(hookAdapter3, "managed", ["install", "update", "disable", "retire"])],
23696
+ evidenceProfiles: [...ompManagedProfiles, portableHookProfile(hookAdapter3, "managed", ["install", "update", "disable", "retire"])],
23634
23697
  probeVersion: (target) => probeOmpVersion(target),
23635
23698
  observeTarget: (target) => observeInventory(target),
23636
23699
  observeNativeMutationScope: (request) => Promise.resolve(ompUpgradeMutationScope(unprovenCandidate(request.nativeId), request.nativeId)),
@@ -29078,7 +29141,7 @@ function verifiedSourceImportClosure(root) {
29078
29141
  if (hasImportShadow(directory, modules, allowed))
29079
29142
  return false;
29080
29143
  for (const entry of entries) {
29081
- if (entry.startsWith(".") || entry === "__pycache__")
29144
+ if (entry.startsWith(".") || entry === "__pycache__" || entry === "node_modules")
29082
29145
  continue;
29083
29146
  const path = join41(directory, entry);
29084
29147
  const stat = lstatSync26(path);
@@ -29250,7 +29313,7 @@ var hermesManagedProfiles = hermesProvenManagedRevisions.map((detectedVersion) =
29250
29313
  operationStatus: "supported",
29251
29314
  semantics: Object.fromEntries(PACKAGE_SEMANTICS.map((semantic) => [semantic, HERMES_SUPPORTED.has(semantic) ? "supported" : "unsupported"])),
29252
29315
  evidence: [
29253
- detectedVersion === "c0d7294769a38c17ceae51d8f7995e66e1dcae27" ? "docs/evidence/hermes-native-loader-c0d7294-20260923.json" : "docs/evidence/hermes-native-loader-dce1e9b-20261011.json",
29316
+ detectedVersion === "c0d7294769a38c17ceae51d8f7995e66e1dcae27" ? "docs/evidence/hermes-native-loader-c0d7294-20260923.json" : detectedVersion === "6e7b83a2f1c093e992a8d838ed77ea320fbd8e51" ? "docs/evidence/hermes-native-loader-6e7b83a-20261013.json" : "docs/evidence/hermes-native-loader-dce1e9b-20261011.json",
29254
29317
  "docs/hosts/hermes.md",
29255
29318
  "docs/research/native-plugin-update-capabilities-2026-10-09.md"
29256
29319
  ]
@@ -30077,7 +30140,7 @@ function parseSourceBinding(value, label) {
30077
30140
  invalidArgument2(`${label} local locator must be a string`);
30078
30141
  const source = { kind: "local", locator: binding["locator"] };
30079
30142
  validateBinding(source, label);
30080
- return source;
30143
+ return sourceBindingForArgument(source.locator);
30081
30144
  }
30082
30145
  if (binding["kind"] === "git") {
30083
30146
  exactFields5(binding, ["kind", "locator", "ref"], label);
@@ -33840,7 +33903,7 @@ function legacyCommandAction(command) {
33840
33903
  // package.json
33841
33904
  var package_default = {
33842
33905
  name: "plugnz",
33843
- version: "0.0.21",
33906
+ version: "0.0.22",
33844
33907
  description: "Install, diagnose and update agent plugins (Agent Plugins spec) and MCP configs across Claude Code, Codex, Cursor, Kimi and more",
33845
33908
  license: "MIT",
33846
33909
  type: "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plugnz",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Install, diagnose and update agent plugins (Agent Plugins spec) and MCP configs across Claude Code, Codex, Cursor, Kimi and more",
5
5
  "license": "MIT",
6
6
  "type": "module",