create-agdf 0.14.1 → 0.14.3

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 (128) hide show
  1. package/README.md +13 -3
  2. package/generated/.opencode/contracts/control-scaffold.md +17 -2
  3. package/generated/.opencode/skills/agdf-delivery-path-search/SKILL.md +16 -4
  4. package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
  5. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  6. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +6 -1
  7. package/generated/plugins/agdf/meta/contracts/control-scaffold.md +17 -2
  8. package/generated/plugins/agdf/meta/copilot-payload-baseline.json +7 -0
  9. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +6 -1
  10. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/delivery-path-search-command.js +51 -19
  11. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/contracts.js +37 -0
  12. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/persistence.js +14 -2
  13. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/search-engine.js +126 -36
  14. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/state-adapter.js +40 -92
  15. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/local-validator.js +29 -17
  16. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +50 -1
  17. package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
  18. package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
  19. package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +2 -1
  20. package/generated/plugins/agdf/skills/delivery-path-search/SKILL.md +16 -4
  21. package/generated/plugins/agdf/submission/openai/availability.md +1 -1
  22. package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
  23. package/generated/plugins/agdf/submission/openai/release-notes.md +7 -1
  24. package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
  25. package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +771 -0
  26. package/generated/plugins/copilot/agdf/LICENSE +201 -0
  27. package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-delivery-path-search/SKILL.md +16 -4
  28. package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/contracts/control-scaffold.md +17 -2
  29. package/generated/plugins/copilot/agdf/meta/agdf-agent-router.md +129 -0
  30. package/generated/plugins/copilot/agdf/meta/agdf-constitution.md +329 -0
  31. package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +331 -0
  32. package/generated/plugins/copilot/agdf/meta/agdf-runtime-contract.md +16 -0
  33. package/generated/plugins/{agdf → copilot/agdf}/plugin.json +1 -1
  34. package/generated/plugins/copilot/agdf/runtime/agdf-local.js +18 -0
  35. package/generated/plugins/copilot/agdf/runtime/agdf-session-check.js +97 -0
  36. package/generated/plugins/copilot/agdf/runtime/create-agdf/NOTICE +10 -0
  37. package/generated/plugins/copilot/agdf/runtime/create-agdf/bin/agdf-validator.js +11 -0
  38. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +512 -0
  39. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +331 -0
  40. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +144 -0
  41. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/delivery-path-search-command.js +171 -0
  42. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +173 -0
  43. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/runtime-context.js +83 -0
  44. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +46 -0
  45. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/delivery-map.js +301 -0
  46. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/doctor.js +272 -0
  47. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +455 -0
  48. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/gate-policy.js +305 -0
  49. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/parent-reconciliation.js +284 -0
  50. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/required-files.js +9 -0
  51. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/run-state.js +217 -0
  52. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/shared.js +345 -0
  53. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/verified-change.js +156 -0
  54. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/aggregate.js +18 -0
  55. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/gate-approval-validator.js +49 -0
  56. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/index.js +7 -0
  57. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/legacy-migration.js +95 -0
  58. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-parser.js +265 -0
  59. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-repository.js +68 -0
  60. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-resolver.js +45 -0
  61. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-writer.js +97 -0
  62. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/candidate-policy.js +99 -0
  63. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/contracts.js +274 -0
  64. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/claude.js +35 -0
  65. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/codex.js +44 -0
  66. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/opencode.js +234 -0
  67. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/prompt.js +13 -0
  68. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/protocol.js +13 -0
  69. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/claude.js +40 -0
  70. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/codex.js +38 -0
  71. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/protocol.js +12 -0
  72. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/persistence.js +51 -0
  73. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/scoring.js +21 -0
  74. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/search-engine.js +245 -0
  75. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/state-adapter.js +109 -0
  76. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/surfaces/capabilities.js +27 -0
  77. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/transports/read-only-guard.js +43 -0
  78. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/interaction-presentation.js +842 -0
  79. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/local-validator.js +239 -0
  80. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +255 -0
  81. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +40 -0
  82. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime-check-consent/contract.js +73 -0
  83. package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +6 -0
  84. package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +8 -0
  85. package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
  86. package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +6 -1
  87. package/generated/submissions/openai/agdf/meta/contracts/control-scaffold.md +17 -2
  88. package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +7 -0
  89. package/generated/submissions/openai/agdf/skills/delivery-path-search/SKILL.md +16 -4
  90. package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
  91. package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
  92. package/generated/submissions/openai/agdf/submission/openai/inventory.json +15 -11
  93. package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
  94. package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
  95. package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
  96. package/generated/submissions/openai/agdf/submission/openai/release-notes.md +7 -1
  97. package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
  98. package/lib/cli/delivery-path-search-command.js +51 -19
  99. package/lib/delivery-path-search/contracts.js +37 -0
  100. package/lib/delivery-path-search/persistence.js +14 -2
  101. package/lib/delivery-path-search/search-engine.js +126 -36
  102. package/lib/delivery-path-search/state-adapter.js +40 -92
  103. package/lib/installers/local-marketplace.js +112 -30
  104. package/lib/installers/plugin-installers.js +45 -9
  105. package/lib/public-plugin/copilot-profile.js +126 -0
  106. package/lib/release/version-coherence.js +4 -1
  107. package/lib/runtime/local-validator.js +29 -17
  108. package/lib/runtime/plugin-provenance.js +50 -1
  109. package/package.json +3 -2
  110. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-brownfield-analysis/SKILL.md +0 -0
  111. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-clean-implementation-review/SKILL.md +0 -0
  112. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-code-review/SKILL.md +0 -0
  113. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-delivery-closeout/SKILL.md +0 -0
  114. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-gate-check/SKILL.md +0 -0
  115. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-interaction-locales.json +0 -0
  116. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-qa-gate/SKILL.md +0 -0
  117. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-release-or/SKILL.md +0 -0
  118. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-runtime-contract.md +0 -0
  119. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-task-plan-review/SKILL.md +0 -0
  120. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/agdf-ux-intent-definition/SKILL.md +0 -0
  121. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/contracts/closeout.md +0 -0
  122. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/contracts/context-graph.md +0 -0
  123. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/contracts/gate-transition.md +0 -0
  124. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/contracts/interaction.md +0 -0
  125. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/contracts/modes.md +0 -0
  126. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/contracts/quality.md +0 -0
  127. /package/generated/plugins/{agdf → copilot/agdf}/copilot-skills/contracts/task-target-resolution.md +0 -0
  128. /package/generated/plugins/{agdf → copilot/agdf}/hooks/copilot-hooks.json +0 -0
@@ -5,6 +5,7 @@ import process from "node:process";
5
5
  import {
6
6
  INSTALLATION_PROVENANCE_FILE,
7
7
  digestDirectory,
8
+ inspectCopilotPayloadInventory,
8
9
  inspectGeneratedRepositoryMarketplace,
9
10
  inspectInstallationProvenance,
10
11
  validateDistributionProfiles,
@@ -83,41 +84,52 @@ export function resolveLocalValidator(options) {
83
84
  }
84
85
  const codexManifest = readJson(join(pluginRoot, ".codex-plugin", "plugin.json"));
85
86
  const claudeManifest = readJson(join(pluginRoot, ".claude-plugin", "plugin.json"));
86
- const pluginVersion = codexManifest?.version ?? null;
87
- if (!codexManifest || !claudeManifest || claudeManifest.version !== definition.version) {
88
- return { envelope: envelope("version_mismatch", options, { source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, distributionProfile: "runtime-plugin", provenanceStatus: "invalid", reason: "manifest_invalid" }) };
87
+ const copilotManifest = readJson(join(pluginRoot, "plugin.json"));
88
+ const copilotProfile = Boolean(copilotManifest && !codexManifest && !claudeManifest);
89
+ const distributionProfile = copilotProfile ? "copilot-runtime-plugin" : "runtime-plugin";
90
+ const pluginVersion = copilotProfile ? copilotManifest?.version ?? null : codexManifest?.version ?? null;
91
+ if (copilotProfile
92
+ ? copilotManifest.version !== definition.version
93
+ : (!codexManifest || !claudeManifest || claudeManifest.version !== definition.version)) {
94
+ return { envelope: envelope("version_mismatch", options, { source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, distributionProfile, provenanceStatus: "invalid", reason: "manifest_invalid" }) };
95
+ }
96
+ const copilotInventory = copilotProfile ? inspectCopilotPayloadInventory(pluginRoot, definition.version) : null;
97
+ if (copilotProfile && copilotInventory.status !== "matched") {
98
+ return { envelope: envelope("version_mismatch", options, { source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, distributionProfile, provenanceStatus: "invalid", reason: copilotInventory.reason }) };
89
99
  }
90
100
  const packageRoot = join(options.runtimeRoot, "create-agdf");
91
101
  if (!existsSync(packageRoot)) {
92
- return { envelope: envelope("unavailable", options, { source: "plugin_bundle", pluginRoot, pluginVersion, distributionProfile: "runtime-plugin", reason: "runtime_missing" }) };
102
+ return { envelope: envelope("unavailable", options, { source: "plugin_bundle", pluginRoot, pluginVersion, distributionProfile, reason: "runtime_missing" }) };
93
103
  }
94
104
  const packageManifest = readJson(join(packageRoot, "package.json"));
95
105
  const observedVersion = packageManifest?.version ?? manifest.version ?? null;
96
106
  if (observedVersion !== options.expectedVersion || manifest.version !== options.expectedVersion) {
97
- return { envelope: envelope("version_mismatch", options, { observedVersion, source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, distributionProfile: "runtime-plugin" }) };
107
+ return { envelope: envelope("version_mismatch", options, { observedVersion, source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, distributionProfile }) };
98
108
  }
99
109
  let observedDigest = null;
100
110
  try { observedDigest = digestDirectory(packageRoot); } catch {}
101
111
  if (!observedDigest || manifest.digest !== observedDigest) {
102
- return { envelope: envelope("version_mismatch", options, { observedVersion, source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, runtimeDigest: observedDigest, distributionProfile: "runtime-plugin", reason: "runtime_digest_mismatch" }) };
112
+ return { envelope: envelope("version_mismatch", options, { observedVersion, source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, runtimeDigest: observedDigest, distributionProfile, reason: "runtime_digest_mismatch" }) };
103
113
  }
104
114
  const entrypoint = resolve(options.runtimeRoot, manifest.entrypoint ?? "");
105
115
  const entrypointRelative = relative(options.runtimeRoot, entrypoint);
106
116
  if (!manifest.entrypoint || entrypointRelative === ".." || entrypointRelative.startsWith(`..${sep}`) || isAbsolute(entrypointRelative)) {
107
- return { envelope: envelope("version_mismatch", options, { observedVersion, source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, runtimeDigest: observedDigest, distributionProfile: "runtime-plugin", reason: "invalid_entrypoint" }) };
117
+ return { envelope: envelope("version_mismatch", options, { observedVersion, source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, runtimeDigest: observedDigest, distributionProfile, reason: "invalid_entrypoint" }) };
108
118
  }
109
119
  if (!existsSync(entrypoint)) {
110
- return { envelope: envelope("unavailable", options, { observedVersion, source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, runtimeDigest: observedDigest, distributionProfile: "runtime-plugin", reason: "entrypoint_missing" }) };
120
+ return { envelope: envelope("unavailable", options, { observedVersion, source: "plugin_bundle", pluginRoot, pluginVersion, canonicalVersion: definition.version, runtimeDigest: observedDigest, distributionProfile, reason: "entrypoint_missing" }) };
111
121
  }
112
122
  const installed = existsSync(join(pluginRoot, INSTALLATION_PROVENANCE_FILE));
113
123
  let provenanceStatus = "not_applicable";
114
124
  let sourceDigest = null;
115
- let evidencePlane = "loaded_session";
125
+ let evidencePlane = options.expectedPluginRoot ? "loaded_session" : "installed_plugin_root";
116
126
  if (installed) {
117
127
  const provenance = inspectInstallationProvenance(pluginRoot, {
118
128
  definition,
119
129
  runtimeManifest: manifest,
120
130
  pluginVersion,
131
+ profileId: distributionProfile,
132
+ inventoryDigest: copilotInventory?.inventoryDigest ?? null,
121
133
  });
122
134
  provenanceStatus = provenance.status;
123
135
  sourceDigest = provenance.marker?.source_digest ?? null;
@@ -130,8 +142,8 @@ export function resolveLocalValidator(options) {
130
142
  canonicalVersion: definition.version,
131
143
  runtimeDigest: observedDigest,
132
144
  sourceDigest,
133
- distributionProfile: "runtime-plugin",
134
- evidencePlane: "loaded_session",
145
+ distributionProfile,
146
+ evidencePlane,
135
147
  provenanceStatus,
136
148
  reason: provenance.reason,
137
149
  }) };
@@ -144,16 +156,16 @@ export function resolveLocalValidator(options) {
144
156
  pluginVersion,
145
157
  canonicalVersion: definition.version,
146
158
  runtimeDigest: observedDigest,
147
- distributionProfile: "runtime-plugin",
159
+ distributionProfile,
148
160
  evidencePlane: "loaded_session",
149
161
  provenanceStatus: "missing",
150
162
  reason: "installation_provenance_missing",
151
163
  }) };
152
164
  } else {
153
- const generatedRepository = inspectGeneratedRepositoryMarketplace(resolve(pluginRoot, "..", ".."));
165
+ const generatedRepository = copilotProfile ? null : inspectGeneratedRepositoryMarketplace(resolve(pluginRoot, "..", ".."));
154
166
  if (pluginVersion !== definition.version
155
- || generatedRepository.status !== "matched"
156
- || canonicalPath(generatedRepository.pluginRoot) !== pluginRoot) {
167
+ || (!copilotProfile && (generatedRepository.status !== "matched"
168
+ || canonicalPath(generatedRepository.pluginRoot) !== pluginRoot))) {
157
169
  return { envelope: envelope("unavailable", options, {
158
170
  observedVersion,
159
171
  source: "plugin_bundle",
@@ -161,7 +173,7 @@ export function resolveLocalValidator(options) {
161
173
  pluginVersion,
162
174
  canonicalVersion: definition.version,
163
175
  runtimeDigest: observedDigest,
164
- distributionProfile: "runtime-plugin",
176
+ distributionProfile,
165
177
  evidencePlane: "installed_plugin_root",
166
178
  provenanceStatus: "missing",
167
179
  reason: "installation_provenance_missing",
@@ -178,7 +190,7 @@ export function resolveLocalValidator(options) {
178
190
  canonicalVersion: definition.version,
179
191
  runtimeDigest: observedDigest,
180
192
  sourceDigest,
181
- distributionProfile: "runtime-plugin",
193
+ distributionProfile,
182
194
  evidencePlane,
183
195
  provenanceStatus,
184
196
  }),
@@ -4,10 +4,12 @@ import { isAbsolute, join, relative, resolve, sep } from "node:path";
4
4
 
5
5
  export const INSTALLATION_PROVENANCE_FILE = ".agdf-installation.json";
6
6
  export const LEGACY_LOCAL_INSTALL_FILE = ".agdf-local-install.json";
7
+ export const COPILOT_PAYLOAD_INVENTORY_FILE = ".agdf-payload-inventory.json";
7
8
 
8
9
  const EXPECTED_PROFILES = Object.freeze({
9
10
  "source-development": Object.freeze({ runtime: "absent", installable: false, machineValidation: "unavailable" }),
10
11
  "runtime-plugin": Object.freeze({ runtime: "required", installable: true, machineValidation: "local_exact_version_digest" }),
12
+ "copilot-runtime-plugin": Object.freeze({ runtime: "required", installable: true, machineValidation: "local_exact_version_digest_inventory" }),
11
13
  "opencode-config-local": Object.freeze({ runtime: "config_local_package", installable: true, machineValidation: "local_exact_version" }),
12
14
  "portable-skills": Object.freeze({ runtime: "absent", installable: true, machineValidation: "unavailable_or_external_required" }),
13
15
  });
@@ -41,6 +43,50 @@ export function digestDirectory(root) {
41
43
  return hash.digest("hex");
42
44
  }
43
45
 
46
+ export function digestFile(path) {
47
+ return createHash("sha256").update(readFileSync(path)).digest("hex");
48
+ }
49
+
50
+ export function inspectCopilotPayloadInventory(pluginRoot, expectedVersion) {
51
+ const inventoryPath = join(pluginRoot, COPILOT_PAYLOAD_INVENTORY_FILE);
52
+ const inventory = readJson(inventoryPath);
53
+ if (!inventory || inventory.schema_version !== 1 || inventory.profile_id !== "copilot-runtime-plugin"
54
+ || inventory.version !== expectedVersion || !Array.isArray(inventory.entries)) {
55
+ return { status: "invalid", reason: "copilot_payload_inventory_invalid" };
56
+ }
57
+ const destinations = inventory.entries.map((entry) => entry.destination);
58
+ if (new Set(destinations).size !== destinations.length) {
59
+ return { status: "invalid", reason: "copilot_payload_inventory_duplicate" };
60
+ }
61
+ const actual = [];
62
+ function visit(directory) {
63
+ for (const name of readdirSync(directory).sort()) {
64
+ const path = join(directory, name);
65
+ const stats = statSync(path);
66
+ if (stats.isDirectory()) visit(path);
67
+ else if (stats.isFile()) {
68
+ const normalized = relative(pluginRoot, path).replaceAll("\\", "/");
69
+ if (![COPILOT_PAYLOAD_INVENTORY_FILE, INSTALLATION_PROVENANCE_FILE, LEGACY_LOCAL_INSTALL_FILE].includes(normalized)) actual.push(normalized);
70
+ }
71
+ }
72
+ }
73
+ try { visit(pluginRoot); } catch { return { status: "invalid", reason: "copilot_payload_incomplete" }; }
74
+ if (JSON.stringify(actual.sort()) !== JSON.stringify([...destinations].sort())) {
75
+ return { status: "invalid", reason: "copilot_payload_inventory_mismatch" };
76
+ }
77
+ for (const entry of inventory.entries) {
78
+ const path = join(pluginRoot, entry.destination);
79
+ if (!existsSync(path) || digestFile(path) !== entry.digest || statSync(path).size !== entry.bytes) {
80
+ return { status: "invalid", reason: "copilot_payload_digest_mismatch", entry: entry.destination };
81
+ }
82
+ }
83
+ const excluded = actual.some((path) => path.startsWith("skills/") || path.startsWith(".codex-plugin/")
84
+ || path.startsWith(".claude-plugin/") || path.startsWith("submission/")
85
+ || path === "hooks/hooks.json" || path === "hooks/session-start.sh");
86
+ if (excluded) return { status: "invalid", reason: "copilot_payload_excluded_surface" };
87
+ return { status: "matched", inventory, inventoryDigest: digestFile(inventoryPath) };
88
+ }
89
+
44
90
  export function digestNormalizedPluginSource(root, canonicalVersion) {
45
91
  const files = [];
46
92
  function visit(directory) {
@@ -148,6 +194,8 @@ export function inspectInstallationProvenance(pluginRoot, {
148
194
  runtimeManifest,
149
195
  pluginVersion,
150
196
  allowLegacy = false,
197
+ profileId = "runtime-plugin",
198
+ inventoryDigest = null,
151
199
  } = {}) {
152
200
  const markerPath = join(pluginRoot, INSTALLATION_PROVENANCE_FILE);
153
201
  const legacyPath = join(pluginRoot, LEGACY_LOCAL_INSTALL_FILE);
@@ -181,11 +229,12 @@ export function inspectInstallationProvenance(pluginRoot, {
181
229
  if (!marker
182
230
  || marker.schema_version !== 1
183
231
  || marker.owner !== "create-agdf"
184
- || marker.profile_id !== "runtime-plugin"
232
+ || marker.profile_id !== profileId
185
233
  || marker.marketplace_id !== profile.contract.marketplaceIdentities.durable
186
234
  || marker.canonical_version !== definition.version
187
235
  || marker.codex_install_version !== pluginVersion
188
236
  || marker.runtime_digest !== runtimeManifest?.digest
237
+ || (profileId === "copilot-runtime-plugin" && marker.inventory_digest !== inventoryDigest)
189
238
  || !/^[a-f0-9]{64}$/.test(marker.source_digest ?? "")) {
190
239
  return { status: "invalid", reason: "installation_provenance_invalid", marker };
191
240
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agdf",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "Install AGDF plugins, bootstrap supported repository surfaces and validate durable governance state.",
5
5
  "type": "module",
6
6
  "files": [
@@ -37,6 +37,7 @@
37
37
  "test:cli-modularization": "node ./scripts/cli-modularization-test.js",
38
38
  "test:local-validator": "node ./scripts/local-validator-test.js",
39
39
  "test:local-marketplace": "node ./scripts/local-marketplace-test.js",
40
+ "test:copilot-profile": "node ./scripts/copilot-profile-test.js",
40
41
  "test:local-development-install": "npm run release:prepare && node ./scripts/local-development-install-test.js",
41
42
  "test:package-contents": "node ./scripts/package-contents-test.js",
42
43
  "test:package-build": "node ./scripts/package-build-test.js",
@@ -57,7 +58,7 @@
57
58
  "test:proportionality": "node ./scripts/proportionality-benchmark-test.js",
58
59
  "test:release-bootstrap": "node ./scripts/release-bootstrap-smoke-test.js",
59
60
  "test:routing": "npm run sync-package-assets && node ./scripts/test-routing.js",
60
- "smoke-test": "npm run release:prepare && npm run test:cli-modularization && npm run test:local-validator && npm run test:local-marketplace && npm run test:local-development-install && npm run test:package-build && npm run test:package-contents && npm run test:lifecycle && npm run test:copilot-repository-retention && npm run test:control-state && npm run test:parent-reconciliation && npm run test:interaction-presentation && npm run test:verified-change && npm run test:runtime-integrity-layout && npm run test:runtime-integrity-negative && npm run test:agent-skills-conformance && npm run test:skill-evals && npm run eval:skills && npm run test:proportionality && npm run test:delivery-path-search && npm run test:delivery-path-search-unit && npm run test:delivery-path-search-generator && npm run test:opencode-hardening && node ./scripts/smoke-test.js && node ./scripts/test-routing.js",
61
+ "smoke-test": "npm run release:prepare && npm run test:cli-modularization && npm run test:local-validator && npm run test:local-marketplace && npm run test:copilot-profile && npm run test:local-development-install && npm run test:package-build && npm run test:package-contents && npm run test:lifecycle && npm run test:copilot-repository-retention && npm run test:control-state && npm run test:parent-reconciliation && npm run test:interaction-presentation && npm run test:verified-change && npm run test:runtime-integrity-layout && npm run test:runtime-integrity-negative && npm run test:agent-skills-conformance && npm run test:skill-evals && npm run eval:skills && npm run test:proportionality && npm run test:delivery-path-search && npm run test:delivery-path-search-unit && npm run test:delivery-path-search-generator && npm run test:opencode-hardening && node ./scripts/smoke-test.js && node ./scripts/test-routing.js",
61
62
  "prepack": "npm run release:prepare"
62
63
  },
63
64
  "keywords": [