create-agdf 0.14.3 → 0.14.4

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 (80) hide show
  1. package/README.md +34 -2
  2. package/generated/.opencode/contracts/interaction.md +2 -2
  3. package/generated/.opencode/skills/agdf-gate-check/SKILL.md +6 -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 +1 -1
  7. package/generated/plugins/agdf/meta/contracts/interaction.md +2 -2
  8. package/generated/plugins/agdf/meta/copilot-payload-baseline.json +3 -3
  9. package/generated/plugins/agdf/meta/distribution-profile-history.json +125 -0
  10. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
  11. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +8 -1
  12. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/parse-args.js +3 -0
  13. package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/doctor.js +13 -0
  14. package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +64 -13
  15. package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/run-state.js +6 -0
  16. package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-identity.js +9 -0
  17. package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-parser.js +4 -2
  18. package/generated/plugins/agdf/runtime/create-agdf/lib/interaction-presentation.js +57 -7
  19. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +46 -3
  20. package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
  21. package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
  22. package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +2 -0
  23. package/generated/plugins/agdf/skills/gate-check/SKILL.md +6 -4
  24. package/generated/plugins/agdf/submission/openai/availability.md +1 -1
  25. package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
  26. package/generated/plugins/agdf/submission/openai/release-notes.md +1 -1
  27. package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
  28. package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +55 -35
  29. package/generated/plugins/copilot/agdf/copilot-skills/agdf-gate-check/SKILL.md +6 -4
  30. package/generated/plugins/copilot/agdf/copilot-skills/contracts/interaction.md +2 -2
  31. package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +1 -1
  32. package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +125 -0
  33. package/generated/plugins/copilot/agdf/plugin.json +1 -1
  34. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
  35. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +8 -1
  36. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +3 -0
  37. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/doctor.js +13 -0
  38. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +64 -13
  39. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/run-state.js +6 -0
  40. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-identity.js +9 -0
  41. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-parser.js +4 -2
  42. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/interaction-presentation.js +57 -7
  43. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +46 -3
  44. package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +1 -1
  45. package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
  46. package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
  47. package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +1 -1
  48. package/generated/submissions/openai/agdf/meta/contracts/interaction.md +2 -2
  49. package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +3 -3
  50. package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +125 -0
  51. package/generated/submissions/openai/agdf/skills/gate-check/SKILL.md +6 -4
  52. package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
  53. package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
  54. package/generated/submissions/openai/agdf/submission/openai/inventory.json +16 -12
  55. package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
  56. package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
  57. package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
  58. package/generated/submissions/openai/agdf/submission/openai/release-notes.md +1 -1
  59. package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
  60. package/lib/cli/application.js +24 -6
  61. package/lib/cli/command-registry.js +8 -1
  62. package/lib/cli/parse-args.js +3 -0
  63. package/lib/control-evaluation/doctor.js +13 -0
  64. package/lib/control-evaluation/gate-check.js +64 -13
  65. package/lib/control-evaluation/run-state.js +6 -0
  66. package/lib/control-state/run-identity.js +9 -0
  67. package/lib/control-state/run-state-parser.js +4 -2
  68. package/lib/installers/claude-cache-recovery.js +76 -0
  69. package/lib/installers/copilot-settings.js +146 -16
  70. package/lib/installers/local-marketplace.js +169 -14
  71. package/lib/installers/plugin-installers.js +96 -9
  72. package/lib/interaction-presentation.js +57 -7
  73. package/lib/lifecycle/operations.js +28 -4
  74. package/lib/lifecycle/result.js +4 -4
  75. package/lib/release/profile-history.js +222 -0
  76. package/lib/release/version-bump.js +527 -0
  77. package/lib/release/version-coherence.js +92 -38
  78. package/lib/runtime/distribution-profile-history.js +173 -0
  79. package/lib/runtime/plugin-provenance.js +46 -3
  80. package/package.json +7 -3
@@ -0,0 +1,125 @@
1
+ {
2
+ "schema_version": 1,
3
+ "contracts": {
4
+ "five-profile-v1": {
5
+ "distribution_profiles": {
6
+ "schemaVersion": 1,
7
+ "marketplaceIdentities": {
8
+ "durable": "agdf",
9
+ "generatedRepository": "agdf-repo"
10
+ },
11
+ "profiles": {
12
+ "source-development": {
13
+ "runtime": "absent",
14
+ "installable": false,
15
+ "machineValidation": "unavailable"
16
+ },
17
+ "runtime-plugin": {
18
+ "runtime": "required",
19
+ "installable": true,
20
+ "machineValidation": "local_exact_version_digest"
21
+ },
22
+ "copilot-runtime-plugin": {
23
+ "runtime": "required",
24
+ "installable": true,
25
+ "machineValidation": "local_exact_version_digest_inventory"
26
+ },
27
+ "opencode-config-local": {
28
+ "runtime": "config_local_package",
29
+ "installable": true,
30
+ "machineValidation": "local_exact_version"
31
+ },
32
+ "portable-skills": {
33
+ "runtime": "absent",
34
+ "installable": true,
35
+ "machineValidation": "unavailable_or_external_required"
36
+ }
37
+ }
38
+ },
39
+ "contract_digest": "0211f4e6054a23f0a3ba302e57303adcb8f5903581e99643f803647dd156fe32"
40
+ },
41
+ "four-profile-v1": {
42
+ "distribution_profiles": {
43
+ "schemaVersion": 1,
44
+ "marketplaceIdentities": {
45
+ "durable": "agdf",
46
+ "generatedRepository": "agdf-repo"
47
+ },
48
+ "profiles": {
49
+ "source-development": {
50
+ "runtime": "absent",
51
+ "installable": false,
52
+ "machineValidation": "unavailable"
53
+ },
54
+ "runtime-plugin": {
55
+ "runtime": "required",
56
+ "installable": true,
57
+ "machineValidation": "local_exact_version_digest"
58
+ },
59
+ "opencode-config-local": {
60
+ "runtime": "config_local_package",
61
+ "installable": true,
62
+ "machineValidation": "local_exact_version"
63
+ },
64
+ "portable-skills": {
65
+ "runtime": "absent",
66
+ "installable": true,
67
+ "machineValidation": "unavailable_or_external_required"
68
+ }
69
+ }
70
+ },
71
+ "contract_digest": "9987baa4ea91e28a096cac2be8daa876f1c0593e7edbfe2e96b713814aa65ce8"
72
+ }
73
+ },
74
+ "releases": {
75
+ "0.13.6": {
76
+ "contract_id": "four-profile-v1",
77
+ "provenance_schema_version": 1,
78
+ "profile_id": "runtime-plugin",
79
+ "entry_digest": "1c21c3fa99cdd788994013f25cbe606ffdcea2cc91d53c679cf061567f652bf3",
80
+ "status": "supported"
81
+ },
82
+ "0.13.7": {
83
+ "contract_id": "four-profile-v1",
84
+ "provenance_schema_version": 1,
85
+ "profile_id": "runtime-plugin",
86
+ "entry_digest": "6d5383537d2640dc13773f2929dd94d0e7e219e82d08418464c77786b475c3ee",
87
+ "status": "supported"
88
+ },
89
+ "0.13.8": {
90
+ "contract_id": "four-profile-v1",
91
+ "provenance_schema_version": 1,
92
+ "profile_id": "runtime-plugin",
93
+ "entry_digest": "405e8cfa72ec2e469354dab52197675783b3723adb969a0692e56ba7c95c85c8",
94
+ "status": "supported"
95
+ },
96
+ "0.14.1": {
97
+ "contract_id": "four-profile-v1",
98
+ "provenance_schema_version": 1,
99
+ "profile_id": "runtime-plugin",
100
+ "entry_digest": "1a6fd6f6a411eddb29e82d7b7abc7d5f658312f555dcf39e160a709194a8b867",
101
+ "status": "supported"
102
+ },
103
+ "0.14.2": {
104
+ "contract_id": "five-profile-v1",
105
+ "provenance_schema_version": 1,
106
+ "profile_id": "runtime-plugin",
107
+ "entry_digest": "f71ee26df3d4a89ecc727a1c30b40221cf062fce9f716a83453bced9503be8fd",
108
+ "status": "supported"
109
+ },
110
+ "0.14.3": {
111
+ "contract_id": "five-profile-v1",
112
+ "provenance_schema_version": 1,
113
+ "profile_id": "runtime-plugin",
114
+ "entry_digest": "c5dbe4044d11a976cd4ccd6de6cf1405ebfcb4a26ce5c6308c34f10142db50c9",
115
+ "status": "supported"
116
+ },
117
+ "0.14.4": {
118
+ "contract_id": "five-profile-v1",
119
+ "provenance_schema_version": 1,
120
+ "profile_id": "runtime-plugin",
121
+ "entry_digest": "a441d633fe11ea402c3366cfac0cec659d32eae5eb4ae6b1d25a1e366a029813",
122
+ "status": "supported"
123
+ }
124
+ }
125
+ }
@@ -209,10 +209,12 @@ the primary chat card into an audit dump. Do not maintain or render a skill-loca
209
209
 
210
210
  This complete operational status table remains the status-reporting and detail
211
211
  surface. When the same response immediately requests a ready gate approval,
212
- render its five-field compact approval-time projection first, then the Gate
213
- Transition Card in the same immediately preceding assistant message, then
214
- invoke exactly one native question or exact-text fallback. Both cards derive
215
- from the same snapshot and are shown exactly once.
212
+ render its five-field compact approval-time projection first, then the complete
213
+ operational Run Status Card verbatim (or its localized failure line with
214
+ diagnostic codes when undeliverable), then the Gate Transition Card in the same
215
+ immediately preceding assistant message, then invoke exactly one native
216
+ question or exact-text fallback. The runtime contract owns this sequence; every
217
+ block is shown exactly once.
216
218
 
217
219
  If this skill creates or updates control artefacts, do not paste full file bodies into the chat.
218
220
  List paths, summarize the decision, name the blocker or approval needed, and keep the durable content in the files.
@@ -1,6 +1,6 @@
1
1
  # Availability Decision Record
2
2
 
3
- - release: `0.14.3`
3
+ - release: `0.14.4`
4
4
  - decision_state: `pending`
5
5
  - decision_owner: verified publisher
6
6
  - countries: not selected
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "releaseVersion": "0.14.3",
3
+ "releaseVersion": "0.14.4",
4
4
  "evidenceStates": [
5
5
  "common",
6
6
  "codex-specific",
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "releaseVersion": "0.14.3",
4
- "digest": "88a2d665f6b0a11cc7de1d0200979d58bc601164f0418faa66e200f7d8a6635c",
3
+ "releaseVersion": "0.14.4",
4
+ "digest": "594be5be291554c4567bcd711274498d9600a896d2e6b5f85ca941e1dff77d12",
5
5
  "files": [
6
6
  {
7
7
  "path": ".codex-plugin/plugin.json",
8
- "sha256": "1723041a1f54829e14dd90d95017fe403e72074e569ae64fca4fc62f9d74b318"
8
+ "sha256": "44c8561c912ed14a44849a23597e1786612d58596e745df691e6f343c0c595f8"
9
9
  },
10
10
  {
11
11
  "path": "assets/agdf-icon.svg",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  {
31
31
  "path": "meta/agdf-plugin.definition.json",
32
- "sha256": "16b69b796510bf4f6907fd986ad64dcf8e5ac4f3860d12e0e62381ea2582b012"
32
+ "sha256": "c0b249067a3fea29e551af28ccc855bfb4e9c7ef95f418d96d7e102c53650159"
33
33
  },
34
34
  {
35
35
  "path": "meta/agdf-runtime-contract.md",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  {
63
63
  "path": "meta/contracts/interaction.md",
64
- "sha256": "799ff1d27f16004844775f2802a94d6d336d9130b08a6484c5f325d7ea6b0df8"
64
+ "sha256": "45cb0bf83af21d46e55f6fbbc934f7bf1571d0d087a0a304b629297427078ce9"
65
65
  },
66
66
  {
67
67
  "path": "meta/contracts/modes.md",
@@ -77,7 +77,11 @@
77
77
  },
78
78
  {
79
79
  "path": "meta/copilot-payload-baseline.json",
80
- "sha256": "7f9d12592af01da501c2e5e2c4fc79cff86e7677384db3b2c72c6f8ec589aa4c"
80
+ "sha256": "c2d5f1fe5285898d90bc9a15972bc388b485b5d212b6952f01d07c2d71f41a17"
81
+ },
82
+ {
83
+ "path": "meta/distribution-profile-history.json",
84
+ "sha256": "63a78c2659fe6ece380883d10188e7dad7373866711aeca13005193b68be1ab2"
81
85
  },
82
86
  {
83
87
  "path": "skills/brownfield-analysis/SKILL.md",
@@ -121,7 +125,7 @@
121
125
  },
122
126
  {
123
127
  "path": "skills/gate-check/SKILL.md",
124
- "sha256": "84b83b23f18e24ebea94b5f24f1e438de2c93da7740fbc1bba95281e98b68ae0"
128
+ "sha256": "7f49c12942fc4312fe57f6be1c9844a9bf1ec5c7c9cce43b1c1d3e81d6c7adbb"
125
129
  },
126
130
  {
127
131
  "path": "skills/gate-check/help.md",
@@ -161,23 +165,23 @@
161
165
  },
162
166
  {
163
167
  "path": "submission/openai/availability.md",
164
- "sha256": "6e2a4d12acfd22a728841169ae5d68b57d303ec3632aba09b5aa6c64d033253b"
168
+ "sha256": "f92ddfc516a7ffa9abbb847118597bdcce52b0087adbe1c3066a7821a9ad22bc"
165
169
  },
166
170
  {
167
171
  "path": "submission/openai/capability-matrix.json",
168
- "sha256": "81425b79a427492d3e46e6f665ebc65e5a6ad47b8e897044180a8946e91c94b9"
172
+ "sha256": "0839d499972d89c7d173f3193a3e54a5b82aecd280192f80bff09733998e6cd6"
169
173
  },
170
174
  {
171
175
  "path": "submission/openai/listing.json",
172
- "sha256": "8302d3c25e7385767456b9ffa8a8939f9476cc28ce5a2357eb8b08cceb58fbb0"
176
+ "sha256": "c5a069a9047ded702678d928014434dc0b44ead7ecf2b7b84d3d45c1d842742b"
173
177
  },
174
178
  {
175
179
  "path": "submission/openai/release-notes.md",
176
- "sha256": "ece61208d4538e5fd9a239d3c6bca98e1e0a34a5204fae1d4666b0bbaabf54f4"
180
+ "sha256": "30e0057bd7e0538b25ca5bcf276fb418887f2e7d1806b431c013ba0d095dabb6"
177
181
  },
178
182
  {
179
183
  "path": "submission/openai/reviewer-cases.json",
180
- "sha256": "83b192f19d11e28ed16b33a81cadbcef8d6dd4b46bd2022841dc317ba6612b7a"
184
+ "sha256": "f145161287a42a891734e27f6c3b8c88fb873227d4d759c0867e60c17217e715"
181
185
  }
182
186
  ]
183
187
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "releaseVersion": "0.14.3",
3
+ "releaseVersion": "0.14.4",
4
4
  "submissionType": "skills",
5
5
  "identity": {
6
6
  "technicalId": "agdf",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "releaseVersion": "0.14.3",
3
+ "releaseVersion": "0.14.4",
4
4
  "candidateState": "repository_ready",
5
5
  "submissionReady": false,
6
6
  "submissionBlockers": [
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "bundle": {
18
18
  "state": "pass",
19
- "detail": "44 inventoried files; inventory digest 88a2d665f6b0a11cc7de1d0200979d58bc601164f0418faa66e200f7d8a6635c"
19
+ "detail": "45 inventoried files; inventory digest 594be5be291554c4567bcd711274498d9600a896d2e6b5f85ca941e1dff77d12"
20
20
  },
21
21
  "installed_host": {
22
22
  "state": "unverified",
@@ -1,6 +1,6 @@
1
1
  # AGDF Public Plugin Readiness
2
2
 
3
- - release: `0.14.3`
3
+ - release: `0.14.4`
4
4
  - candidate_state: `repository_ready`
5
5
  - submission_ready: `false`
6
6
 
@@ -9,7 +9,7 @@
9
9
  | Class | State | Detail |
10
10
  |---|---|---|
11
11
  | repository | pass | canonical contract and deterministic source checks |
12
- | bundle | pass | 44 inventoried files; inventory digest 88a2d665f6b0a11cc7de1d0200979d58bc601164f0418faa66e200f7d8a6635c |
12
+ | bundle | pass | 45 inventoried files; inventory digest 594be5be291554c4567bcd711274498d9600a896d2e6b5f85ca941e1dff77d12 |
13
13
  | installed_host | unverified | PPD-L02 and PPD-L03 not performed |
14
14
  | portal | unverified | unverified |
15
15
  | post_publication | unverified | not published |
@@ -1,4 +1,4 @@
1
- # AGDF 0.14.3 — Initial OpenAI Public Plugin Candidate
1
+ # AGDF 0.14.4 — Initial OpenAI Public Plugin Candidate
2
2
 
3
3
  This candidate packages the canonical AGDF workflow skills for public discovery in ChatGPT and
4
4
  Codex. It helps users assess delivery fit, preserve explicit human approvals, inspect existing-system
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "releaseVersion": "0.14.3",
3
+ "releaseVersion": "0.14.4",
4
4
  "cases": [
5
5
  {
6
6
  "id": "positive-proportional-fit",
@@ -279,10 +279,10 @@ function runLifecyclePhase(phase, operation) {
279
279
 
280
280
  function installNextAction(surface, runtimeChecks, fallback) {
281
281
  if (surface === "codex" && runtimeChecks.requested === "enabled" && runtimeChecks.effective === "decision_required") {
282
- return "Restart Codex, then approve the AGDF session hook when Codex asks.";
282
+ return `${fallback} Approve the AGDF session hook when the fresh Codex session asks.`;
283
283
  }
284
284
  if (surface === "copilot" && runtimeChecks.requested === "enabled" && runtimeChecks.effective === "decision_required") {
285
- return "Restart GitHub Copilot, then review the AGDF session hook when Copilot asks.";
285
+ return `${fallback} Review the AGDF session hook when the fresh Copilot session asks.`;
286
286
  }
287
287
  return fallback;
288
288
  }
@@ -430,9 +430,11 @@ function printInstallFailure(surface, error, options, io, command = surface) {
430
430
 
431
431
  function runDisable(options, { io, exec }) {
432
432
  try {
433
- const plan = planRepositoryDisable(options.dir, options.surface);
433
+ const plan = planRepositoryDisable(options.dir, options.surface, { shared: options.shared, exec });
434
434
  const applied = applyLifecyclePlan(plan, exec ? { exec } : {});
435
- const verified = applied.status === "success" ? verifyRepositoryDisabled(options.dir) : { status: "failed", evidence: [] };
435
+ const verified = applied.status === "success"
436
+ ? verifyRepositoryDisabled(options.dir, options.surface, { shared: options.shared })
437
+ : { status: "failed", evidence: [] };
436
438
  const result = applied.status === "success" && verified.status !== "healthy" ? "failed" : applied.status;
437
439
  const report = createLifecycleResult({
438
440
  operation: "disable",
@@ -440,9 +442,12 @@ function runDisable(options, { io, exec }) {
440
442
  surface: options.surface,
441
443
  scope: "repository",
442
444
  verification: { status: verified.status === "healthy" ? "healthy" : "degraded", evidence: [...applied.completed.map((item) => item.path || item.executable), ...verified.evidence] },
445
+ activation: { status: result === "success" ? "pending_restart" : "unknown" },
443
446
  restart: { required: result === "success", reason: result === "success" ? "host_reload" : "none" },
444
447
  next_action: result === "success"
445
- ? { kind: "restart", text: "Restart the host in this repository; global AGDF availability and .agdf/control are retained." }
448
+ ? options.surface === "copilot"
449
+ ? { kind: "restart", text: "Restart GitHub Copilot in this repository, then inspect /plugin list; independent instructions remain separate." }
450
+ : { kind: "restart", text: "Restart the host in this repository; global AGDF availability and .agdf/control are retained." }
446
451
  : { kind: "verify", text: "Inspect the reported repository configuration failure before retrying disable." },
447
452
  changes: applied.completed,
448
453
  retained: applied.retained,
@@ -453,7 +458,20 @@ function runDisable(options, { io, exec }) {
453
458
  printLifecycleResult(report, { json: options.json, io });
454
459
  return result === "success" ? 0 : 1;
455
460
  } catch (error) {
456
- io.error(error.message);
461
+ const report = lifecycleFailure({
462
+ operation: "disable",
463
+ surface: options.surface,
464
+ scope: "repository",
465
+ phase: "repository_preflight",
466
+ message: error.message,
467
+ evidence: [error.message],
468
+ nextAction: "Resolve the reported repository configuration or ignore precondition, then retry disable without changing unrelated files.",
469
+ });
470
+ if (options.json) printLifecycleResult(report, { json: true, io });
471
+ else {
472
+ io.error(error.message);
473
+ printLifecycleResult(report, { io });
474
+ }
457
475
  return 1;
458
476
  }
459
477
  }
@@ -18,7 +18,7 @@ export const commandRegistry = Object.freeze([
18
18
  command("opencode-status", { preferred: [""], scaffold: [""] }),
19
19
  command("status", { preferred: [" [--surface <surface>] [--run <run_id>] [--json]"] }),
20
20
  command("runtime-checks", { preferred: [" <status|enable|manual> --surface <codex|claude|copilot|opencode> [--json]"] }),
21
- command("disable", { preferred: [" --surface <surface> [--scope repository] [--dir <path>]"] }),
21
+ command("disable", { preferred: [" --surface <surface> [--scope repository] [--shared] [--dir <path>]"] }),
22
22
  command("uninstall", { preferred: [" --surface <surface> --scope global [--confirm]"] }),
23
23
  command("opencode-repo", { preferred: [""], scaffold: [""] }),
24
24
  command("init", { preferred: [""], scaffold: [""] }),
@@ -65,6 +65,12 @@ export function validateCommandOptions(options) {
65
65
  throw new Error("uninstall requires explicit --scope global");
66
66
  }
67
67
  if (options.confirm && options.target !== "uninstall") throw new Error("--confirm is supported only by uninstall");
68
+ if (options.shared && !(options.target === "disable" && options.surface === "copilot" && options.scope === "repository")) {
69
+ throw new Error("--shared is supported only by disable --surface copilot --scope repository");
70
+ }
71
+ if (options.target === "disable" && options.surface === "copilot" && options.scope !== "repository") {
72
+ throw new Error("Copilot disable requires explicit --scope repository");
73
+ }
68
74
  if (options.runtimeChecksDecision && !["codex", "claude", "copilot", "opencode"].includes(options.target)) {
69
75
  throw new Error("--runtime-checks is supported only by codex, claude, copilot and opencode installation commands");
70
76
  }
@@ -126,6 +132,7 @@ Options:
126
132
  --scope <repository|global>
127
133
  Select the lifecycle mutation scope
128
134
  --confirm Apply a previously previewed global uninstall plan
135
+ --shared Apply Copilot repository disable through shared .github/copilot/settings.json
129
136
  --runtime-checks <enable|manual|cancel>
130
137
  Make the installation-time automatic-check decision explicitly; no TTY defaults to manual
131
138
  --fixture <path>
@@ -45,6 +45,7 @@ export function parseArgs(argv, dependencies = {}) {
45
45
  let allActive = false;
46
46
  let scope;
47
47
  let confirm = false;
48
+ let shared = false;
48
49
  let runtimeChecksDecision;
49
50
  let runtimeChecksAction;
50
51
 
@@ -61,6 +62,7 @@ export function parseArgs(argv, dependencies = {}) {
61
62
  if (arg === "--generate-candidates") { generateCandidates = true; continue; }
62
63
  if (arg === "--all-active") { allActive = true; continue; }
63
64
  if (arg === "--confirm") { confirm = true; continue; }
65
+ if (arg === "--shared") { shared = true; continue; }
64
66
 
65
67
  if (arg === "--runtime-checks") {
66
68
  const next = requiredValue(args, i, arg);
@@ -162,6 +164,7 @@ export function parseArgs(argv, dependencies = {}) {
162
164
  allActive,
163
165
  scope,
164
166
  confirm,
167
+ shared,
165
168
  runtimeChecksDecision,
166
169
  runtimeChecksAction: runtimeChecksAction ?? "status",
167
170
  generatorModel,
@@ -130,6 +130,19 @@ export function evaluateDoctor(targetDir, selection = {}) {
130
130
  "Add at least one evidence row or explicitly document that no evidence exists yet.",
131
131
  );
132
132
  }
133
+
134
+ for (const identityFinding of selectedRunState.identity_findings ?? []) {
135
+ addFinding(
136
+ findings,
137
+ "revise",
138
+ identityFinding.code,
139
+ identityFinding.code === "AGDF_RUN_ID_INVALID"
140
+ ? "The selected run state has a missing or invalid run_id; interaction cards cannot be rendered for it."
141
+ : "The selected run state has a missing or invalid revision_id; approval interactions cannot be rendered for it.",
142
+ runPath,
143
+ "Run run-migrate to repair the run identity, or migrate the legacy state to a canonical run record.",
144
+ );
145
+ }
133
146
  }
134
147
 
135
148
  const backlogPath = join(".agdf", "control", "MASTER_BACKLOG.md");
@@ -1,4 +1,4 @@
1
- import { attachApprovalOrientationSnapshot, buildArtefactRefs, buildQualityReadiness, gateTitle, localePack, renderApprovalOrientationSnapshot, renderOperationalStatusCard, resolveHumanRunTitle } from '../interaction-presentation.js';
1
+ import { attachApprovalOrientationSnapshot, buildArtefactRefs, buildQualityReadiness, gateTitle, localePack, renderApprovalOrientationSnapshot, renderOperationalStatusCard, resolveHumanRunTitle, validateApprovalOrientationPreconditions, validateApprovalOrientationSnapshot, validateOperationalStatusCardPreconditions } from '../interaction-presentation.js';
2
2
  import { interactionLocales, resolveConfiguredChatLanguage } from '../cli/runtime-context.js';
3
3
  import { evaluateDoctor } from './doctor.js';
4
4
  import { analyzeDeliveryMap, deriveQualityOutlook } from './delivery-map.js';
@@ -300,8 +300,9 @@ export function evaluateGateCheck(targetDir, selection = {}) {
300
300
  humanPresentation,
301
301
  revisionId,
302
302
  });
303
+ const readyForApproval = isReadyUserGateApproval({ status, currentGate, missingApproval });
303
304
  const approvalOrientation = attachApprovalOrientationSnapshot(statusCard, {
304
- ready: isReadyUserGateApproval({ status, currentGate, missingApproval }),
305
+ ready: readyForApproval,
305
306
  humanPresentation,
306
307
  revisionId,
307
308
  registry: interactionLocales,
@@ -312,6 +313,50 @@ export function evaluateGateCheck(targetDir, selection = {}) {
312
313
  enumerable: false,
313
314
  });
314
315
 
316
+ const approvalPresentation = renderApprovalOrientationSnapshot(approvalOrientation, {
317
+ registry: interactionLocales,
318
+ expectedIdentity: {
319
+ run_id: statusCard.run_id,
320
+ revision_id: revisionId,
321
+ current_gate: currentGate,
322
+ presentation_language: statusCard.presentation_language,
323
+ },
324
+ });
325
+ const presentationDiagnostics = {};
326
+ if (!statusPresentation) {
327
+ presentationDiagnostics.status_presentation_errors = [
328
+ ...validateOperationalStatusCardPreconditions(statusCard, {
329
+ registry: interactionLocales,
330
+ humanPresentation,
331
+ }).errors,
332
+ ];
333
+ }
334
+ if (readyForApproval && !approvalPresentation) {
335
+ presentationDiagnostics.approval_presentation_errors = approvalOrientation
336
+ ? [
337
+ ...validateApprovalOrientationSnapshot(approvalOrientation, {
338
+ registry: interactionLocales,
339
+ expectedIdentity: {
340
+ run_id: statusCard.run_id,
341
+ revision_id: revisionId,
342
+ current_gate: currentGate,
343
+ presentation_language: statusCard.presentation_language,
344
+ },
345
+ }).errors,
346
+ ]
347
+ : [
348
+ ...validateApprovalOrientationPreconditions({
349
+ statusCard,
350
+ humanPresentation,
351
+ registry: interactionLocales,
352
+ requestedLocale: presentationLocale,
353
+ }).errors,
354
+ ];
355
+ if (!presentationDiagnostics.approval_presentation_errors.length) {
356
+ presentationDiagnostics.approval_presentation_errors = ["snapshot_unavailable"];
357
+ }
358
+ }
359
+
315
360
  return {
316
361
  schema_version: "1",
317
362
  status,
@@ -332,15 +377,8 @@ export function evaluateGateCheck(targetDir, selection = {}) {
332
377
  candidate_runs: runState.candidate_runs ?? [],
333
378
  status_card: statusCard,
334
379
  status_presentation: statusPresentation,
335
- approval_presentation: renderApprovalOrientationSnapshot(approvalOrientation, {
336
- registry: interactionLocales,
337
- expectedIdentity: {
338
- run_id: statusCard.run_id,
339
- revision_id: revisionId,
340
- current_gate: currentGate,
341
- presentation_language: statusCard.presentation_language,
342
- },
343
- }),
380
+ approval_presentation: approvalPresentation,
381
+ ...(Object.keys(presentationDiagnostics).length ? { presentation_diagnostics: presentationDiagnostics } : {}),
344
382
  delivery_map: {
345
383
  relationships: deliveryMap.relationships,
346
384
  mode_slice_decision: runState.mode_slice_decision,
@@ -368,6 +406,14 @@ export function printApprovalEnvelope(report, { io = console, reEvaluate } = {})
368
406
  if (report?.approval_presentation) {
369
407
  io.log(report.approval_presentation.blocks.run_status_card.markdown);
370
408
  io.log("");
409
+ if (report.status_presentation?.markdown) {
410
+ io.log(report.status_presentation.markdown);
411
+ } else {
412
+ const pack = localePack(interactionLocales, report.approval_presentation.presentation_language || "en");
413
+ const codes = report.presentation_diagnostics?.status_presentation_errors ?? [];
414
+ io.log(codes.length ? `${pack.interaction.statusPresentationFailure} (${codes.join(", ")})` : pack.interaction.statusPresentationFailure);
415
+ }
416
+ io.log("");
371
417
  io.log(report.approval_presentation.blocks.gate_transition_card.markdown);
372
418
  io.log("");
373
419
  io.log(report.approval_presentation.approval_interaction.exact_text_fallback);
@@ -386,7 +432,10 @@ export function printApprovalEnvelope(report, { io = console, reEvaluate } = {})
386
432
  const pack = localePack(interactionLocales, refreshed?.status_card?.presentation_language || report?.status_card?.presentation_language || "en");
387
433
  const refreshedApproval = canonicalApprovalForReport(refreshed);
388
434
  if (initialApproval && refreshedApproval) {
389
- io.log(pack.interaction.presentationFailure);
435
+ const codes = refreshed?.presentation_diagnostics?.approval_presentation_errors
436
+ ?? report?.presentation_diagnostics?.approval_presentation_errors
437
+ ?? [];
438
+ io.log(codes.length ? `${pack.interaction.presentationFailure} (${codes.join(", ")})` : pack.interaction.presentationFailure);
390
439
  io.log(pack.interaction.exactTextRequest.replace("{approval}", refreshedApproval));
391
440
  return Object.freeze({ outcome: "exact_text_recovery", requested_decision: true, status: refreshed.status });
392
441
  }
@@ -404,7 +453,9 @@ export function printApprovalEnvelope(report, { io = console, reEvaluate } = {})
404
453
  function printGateCheckStatusCard(report, io) {
405
454
  const card = report.status_card;
406
455
  if (!report.status_presentation?.markdown) {
407
- io.log(localePack(interactionLocales, card?.presentation_language || "en").interaction.statusPresentationFailure);
456
+ const failure = localePack(interactionLocales, card?.presentation_language || "en").interaction.statusPresentationFailure;
457
+ const codes = report.presentation_diagnostics?.status_presentation_errors ?? [];
458
+ io.log(codes.length ? `${failure} (${codes.join(", ")})` : failure);
408
459
  return false;
409
460
  }
410
461
  io.log(report.status_presentation.markdown);
@@ -2,6 +2,7 @@ import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
2
2
  import { isAbsolute, join, relative, resolve } from "node:path";
3
3
  import process from "node:process";
4
4
  import { parseControlState, resolveRuns } from "../control-state/index.js";
5
+ import { validateRunIdentity } from "../control-state/run-identity.js";
5
6
  import { buildRunCandidates } from "../interaction-presentation.js";
6
7
  import { cleanStatusCell, filled, isPlaceholderValue, readTargetFile } from "./shared.js";
7
8
  import { extractField, isSafeRepoRelativePath, readVerifiedChangeRecord } from "./verified-change.js";
@@ -87,6 +88,7 @@ export function readRunState(targetDir, selection = {}) {
87
88
  memory: {},
88
89
  candidate_runs: candidateRuns,
89
90
  resolution_error: resolutionError,
91
+ identity_findings: [],
90
92
  };
91
93
  }
92
94
 
@@ -101,6 +103,10 @@ export function readRunState(targetDir, selection = {}) {
101
103
  path: runPath,
102
104
  content,
103
105
  ...parsed,
106
+ identity_findings: validateRunIdentity({
107
+ runId: extractField(content, "run_id").replace(/^`|`$/g, ""),
108
+ revisionId: extractField(content, "revision_id").replace(/^`|`$/g, ""),
109
+ }),
104
110
  };
105
111
  }
106
112
 
@@ -0,0 +1,9 @@
1
+ export const RUN_ID_PATTERN = /^[a-z0-9][a-z0-9._-]{0,127}$/;
2
+ export const REVISION_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
3
+
4
+ export function validateRunIdentity({ runId, revisionId } = {}) {
5
+ const findings = [];
6
+ if (!RUN_ID_PATTERN.test(String(runId ?? ""))) findings.push({ code: "AGDF_RUN_ID_INVALID" });
7
+ if (!REVISION_ID_PATTERN.test(String(revisionId ?? ""))) findings.push({ code: "AGDF_RUN_REVISION_ID_INVALID" });
8
+ return findings;
9
+ }
@@ -1,4 +1,6 @@
1
- export const RUN_ID_PATTERN = /^[a-z0-9][a-z0-9._-]{0,127}$/;
1
+ import { REVISION_ID_PATTERN, RUN_ID_PATTERN } from "./run-identity.js";
2
+
3
+ export { RUN_ID_PATTERN } from "./run-identity.js";
2
4
  export const LIFECYCLES = new Set([
3
5
  "active",
4
6
  "completed",
@@ -34,7 +36,7 @@ export function parseRunState(content, expected) {
34
36
  findings.push({ code: "AGDF_RUN_LIFECYCLE_INVALID" });
35
37
  if (!/^[1-9]\d*$/.test(values.get("revision") ?? ""))
36
38
  findings.push({ code: "AGDF_RUN_REVISION_INVALID" });
37
- if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(values.get("revision_id") ?? ""))
39
+ if (!REVISION_ID_PATTERN.test(values.get("revision_id") ?? ""))
38
40
  findings.push({ code: "AGDF_RUN_REVISION_ID_INVALID" });
39
41
  return {
40
42
  content,