plugnz 0.0.27 → 0.0.29

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 +83 -9
  2. package/package.json +1 -1
package/dist/plugnz.mjs CHANGED
@@ -14225,7 +14225,8 @@ function readSemanticManifests(root) {
14225
14225
  "plugin.json",
14226
14226
  ".plugin/plugin.json",
14227
14227
  ".claude-plugin/plugin.json",
14228
- ".codex-plugin/plugin.json"
14228
+ ".codex-plugin/plugin.json",
14229
+ ".zcode-plugin/plugin.json"
14229
14230
  ].filter((path) => existsSync16(join21(root, path))).map((path) => ({
14230
14231
  ...parseJsonObject(join21(root, path), `plugin manifest ${path}`),
14231
14232
  path
@@ -14694,11 +14695,11 @@ function admitPackageSemanticsFromProfiles(request, profiles) {
14694
14695
  const version = normalizedDetectedVersion(request.detectedVersion);
14695
14696
  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);
14696
14697
  const portable = (request.operation === "install" || request.operation === "update") && request.inventory.hookDeclarations.some((declaration) => declaration.form === "portable-hooks");
14697
- const claudeNative = (request.operation === "install" || request.operation === "update") && !portable && request.inventory.hookDeclarations.some((declaration) => declaration.form !== "portable-hooks");
14698
+ const native = (request.operation === "install" || request.operation === "update") && !portable && request.inventory.hookDeclarations.some((declaration) => declaration.form !== "portable-hooks");
14698
14699
  const portableSpecialized = candidates.filter((candidate) => candidate.packageFormat === "portable-hooks");
14699
- const claudeNativeSpecialized = candidates.filter((candidate) => candidate.packageFormat === "claude-native-hooks");
14700
+ const nativeSpecialized = candidates.filter((candidate) => candidate.packageFormat === "native-hooks");
14700
14701
  const ordinary = candidates.filter((candidate) => candidate.packageFormat === undefined);
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;
14702
+ const matching = portable && portableSpecialized.length > 0 ? portableSpecialized : native && nativeSpecialized.length > 0 ? nativeSpecialized : request.operation === "install" || request.operation === "update" ? ordinary : ordinary.length > 0 ? ordinary : portableSpecialized.length > 0 ? portableSpecialized : nativeSpecialized;
14702
14703
  if (matching.length > 1) {
14703
14704
  throw new Error(`ambiguous capability evidence for ${request.host} ${version} ${request.sourceType} ${request.route} ${request.operation}`);
14704
14705
  }
@@ -18696,7 +18697,7 @@ function claudeAdvisorCandidateHookProfile() {
18696
18697
  return createCapabilityEvidenceProfile({
18697
18698
  host: "claude-code",
18698
18699
  detectedVersion: "2.1.285",
18699
- packageFormat: "claude-native-hooks",
18700
+ packageFormat: "native-hooks",
18700
18701
  sourceTypes: ["local", "git"],
18701
18702
  operations: ["install", "update", "retire"],
18702
18703
  route: "managed",
@@ -27521,6 +27522,48 @@ function projectZcodePayload(source, resourceLinks, nativeVersion) {
27521
27522
  for (const key of ["hooks", "mcpServers", "agents", "agent", "executables"])
27522
27523
  if (Object.hasOwn(manifest, key))
27523
27524
  throw new Error(`ZCode root plugin semantic is unsupported: ${key}`);
27525
+ if (payload.has(".zcode-plugin/plugin.json")) {
27526
+ const native = JSON.parse(text3(payload, ".zcode-plugin/plugin.json"));
27527
+ if (!object10(native) || native.name !== name)
27528
+ throw new Error("ZCode native manifest identity differs from plugin.json");
27529
+ const metadata = new Set(["name", "version", "description", "author", "license", "homepage", "repository", "keywords"]);
27530
+ const conventional = { skills: "skills", commands: "commands", hooks: "hooks/hooks.json" };
27531
+ for (const [key, value] of Object.entries(native)) {
27532
+ if (metadata.has(key))
27533
+ continue;
27534
+ const path = conventional[key];
27535
+ if (path !== undefined && (value === path || value === `./${path}`) && payload.has(path))
27536
+ continue;
27537
+ throw new Error(`ZCode projection cannot preserve native manifest field: ${key}`);
27538
+ }
27539
+ }
27540
+ if (payload.has("hooks/hooks.json")) {
27541
+ const document = JSON.parse(text3(payload, "hooks/hooks.json"));
27542
+ if (!object10(document) || !object10(document.hooks))
27543
+ throw new Error("ZCode hook document must contain hooks");
27544
+ for (const groups of Object.values(document.hooks)) {
27545
+ if (!Array.isArray(groups))
27546
+ throw new Error("ZCode hook groups must be an array");
27547
+ for (const group of groups) {
27548
+ if (!object10(group) || !Array.isArray(group.hooks))
27549
+ throw new Error("ZCode hook group must contain hooks");
27550
+ for (const handler of group.hooks) {
27551
+ if (!object10(handler) || handler.type !== "command" || typeof handler.command !== "string" || !handler.command.trim()) {
27552
+ throw new Error("ZCode projection requires command hooks");
27553
+ }
27554
+ for (const key of Object.keys(handler)) {
27555
+ if (!["type", "command", "timeout", "async"].includes(key))
27556
+ throw new Error(`ZCode hook option is unqualified: ${key}`);
27557
+ }
27558
+ if (handler.async !== undefined && handler.async !== false)
27559
+ throw new Error("ZCode asynchronous hook is unqualified");
27560
+ if (handler.timeout !== undefined && (typeof handler.timeout !== "number" || !Number.isFinite(handler.timeout) || handler.timeout <= 0)) {
27561
+ throw new Error("ZCode command timeout must be positive seconds");
27562
+ }
27563
+ }
27564
+ }
27565
+ }
27566
+ }
27524
27567
  if (payload.has("commands")) {
27525
27568
  if (payload.get("commands")?.kind !== "directory")
27526
27569
  throw new Error("ZCode commands path is not a directory");
@@ -27990,10 +28033,41 @@ function zcodeInstallProfile() {
27990
28033
  evidence: [...ZCODE_EVIDENCE]
27991
28034
  });
27992
28035
  }
28036
+ function zcodeNativeHookProfile() {
28037
+ return createCapabilityEvidenceProfile({
28038
+ host: "zcode-cli",
28039
+ detectedVersion: ZCODE_PROVEN_VERSION,
28040
+ packageFormat: "native-hooks",
28041
+ sourceTypes: ["local", "git"],
28042
+ operations: ["install", "update"],
28043
+ route: "native",
28044
+ operationStatus: "supported",
28045
+ semantics: zcodeSemantics({
28046
+ hooks: "supported",
28047
+ resources: "supported",
28048
+ "auto-update-control": "supported",
28049
+ "retention-safety": "supported",
28050
+ readback: "supported",
28051
+ rollback: "supported",
28052
+ "activation-reload": "supported"
28053
+ }),
28054
+ hookPolicy: {
28055
+ manifestPrecedence: [".zcode-plugin/plugin.json", ".claude-plugin/plugin.json", "plugin.json"],
28056
+ supportedForms: ["default-file"],
28057
+ supportedEvents: ["UserPromptSubmit", "PostToolUse", "PostToolUseFailure", "Stop"],
28058
+ supportedHandlerTypes: ["command"],
28059
+ matcherlessEvents: ["UserPromptSubmit", "PostToolUse", "PostToolUseFailure", "Stop"],
28060
+ supportedMatcherKinds: ["all"],
28061
+ unsupportedHandlerFacets: ["async-enabled", "async-non-boolean", "argv-invalid", "timeout-invalid", "status-message-invalid"]
28062
+ },
28063
+ evidence: [...ZCODE_EVIDENCE, "docs/evidence/zcode-native-advisor-hooks-20261021.json"]
28064
+ });
28065
+ }
27993
28066
  var zcodeCliEvidenceProfiles = Object.freeze([
27994
28067
  zcodeRetireProfile("native", "unsupported", "unsupported", "unsupported"),
27995
28068
  zcodeRetireProfile("managed", "supported", "supported", "supported"),
27996
28069
  zcodeInstallProfile(),
28070
+ zcodeNativeHookProfile(),
27997
28071
  portableHookProfile(hookAdapter6, "native", ["install", "update"])
27998
28072
  ]);
27999
28073
  function assertZcodeTarget(target) {
@@ -28461,7 +28535,8 @@ var ZCODE_INSTALL_SEMANTICS = new Set([
28461
28535
  "ordinary-skills",
28462
28536
  "commands",
28463
28537
  "model-invocation-control",
28464
- "resources"
28538
+ "resources",
28539
+ "hooks"
28465
28540
  ]);
28466
28541
  function installProjection(request) {
28467
28542
  if (request.operation !== "install" && request.operation !== "update")
@@ -28469,8 +28544,7 @@ function installProjection(request) {
28469
28544
  if (!("snapshot" in request) || request.pins.length > 0)
28470
28545
  return { kind: "unverified", reasonId: "zcode-native-projection-unverified" };
28471
28546
  const inventory = request.snapshot.inventory;
28472
- const portableHooks = inventory.hookDeclarations.length > 0 && inventory.hookDeclarations.every((declaration) => declaration.form === "portable-hooks");
28473
- const unsupported = inventory.requiredSemantics.find((semantic) => !ZCODE_INSTALL_SEMANTICS.has(semantic) && !(semantic === "hooks" && portableHooks));
28547
+ const unsupported = inventory.requiredSemantics.find((semantic) => !ZCODE_INSTALL_SEMANTICS.has(semantic));
28474
28548
  if (unsupported !== undefined)
28475
28549
  return { kind: "unverified", reasonId: `zcode-semantic-unverified:${unsupported}` };
28476
28550
  return { kind: "equivalent", proofId: "zcode-marketplace-projection" };
@@ -34246,7 +34320,7 @@ function legacyCommandAction(command) {
34246
34320
  // package.json
34247
34321
  var package_default = {
34248
34322
  name: "plugnz",
34249
- version: "0.0.27",
34323
+ version: "0.0.29",
34250
34324
  description: "Install, diagnose and update agent plugins (Agent Plugins spec) and MCP configs across Claude Code, Codex, Cursor, Kimi and more",
34251
34325
  license: "MIT",
34252
34326
  type: "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plugnz",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
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",