create-agdf 0.13.8 → 0.14.2
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/README.md +14 -10
- package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/.codex-plugin/plugin.json +2 -4
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +26 -2
- package/generated/plugins/agdf/meta/copilot-payload-baseline.json +7 -0
- package/generated/plugins/agdf/runtime/agdf-local.js +1 -1
- package/generated/plugins/agdf/runtime/agdf-session-check.js +10 -5
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +26 -2
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +6 -7
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/local-validator.js +29 -17
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +50 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime-check-consent/contract.js +3 -1
- package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
- package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +32 -3
- package/generated/plugins/agdf/submission/openai/availability.md +1 -1
- package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/plugins/agdf/submission/openai/release-notes.md +1 -1
- package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
- package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +771 -0
- package/generated/plugins/copilot/agdf/LICENSE +201 -0
- package/generated/plugins/copilot/agdf/hooks/copilot-hooks.json +15 -0
- package/generated/{AGENTS.md → plugins/copilot/agdf/meta/agdf-agent-router.md} +49 -33
- package/generated/plugins/copilot/agdf/meta/agdf-constitution.md +329 -0
- package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +331 -0
- package/generated/plugins/copilot/agdf/meta/agdf-runtime-contract.md +16 -0
- package/generated/plugins/copilot/agdf/plugin.json +22 -0
- package/generated/plugins/copilot/agdf/runtime/agdf-local.js +18 -0
- package/generated/plugins/copilot/agdf/runtime/agdf-session-check.js +97 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/NOTICE +10 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/bin/agdf-validator.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +512 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +331 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +144 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/delivery-path-search-command.js +139 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +173 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/runtime-context.js +83 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +46 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/delivery-map.js +301 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/doctor.js +272 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +455 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/gate-policy.js +305 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/parent-reconciliation.js +284 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/required-files.js +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/run-state.js +217 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/shared.js +345 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/verified-change.js +156 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/aggregate.js +18 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/gate-approval-validator.js +49 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/index.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/legacy-migration.js +95 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-parser.js +265 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-repository.js +68 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-resolver.js +45 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-writer.js +97 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/candidate-policy.js +99 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/contracts.js +237 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/claude.js +35 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/codex.js +44 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/opencode.js +234 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/prompt.js +13 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/protocol.js +13 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/claude.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/codex.js +38 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/protocol.js +12 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/persistence.js +39 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/scoring.js +21 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/search-engine.js +155 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/state-adapter.js +161 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/surfaces/capabilities.js +27 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/transports/read-only-guard.js +43 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/interaction-presentation.js +842 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/local-validator.js +239 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +255 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime-check-consent/contract.js +73 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +6 -0
- package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +8 -0
- package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -2
- package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +26 -2
- package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +7 -0
- package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
- package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/inventory.json +13 -9
- package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
- package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
- package/generated/submissions/openai/agdf/submission/openai/release-notes.md +1 -1
- package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
- package/lib/cli/application.js +64 -8
- package/lib/cli/command-registry.js +6 -7
- package/lib/installers/copilot-precedence.js +34 -0
- package/lib/installers/copilot-settings.js +84 -0
- package/lib/installers/local-marketplace.js +112 -30
- package/lib/installers/plugin-installers.js +184 -5
- package/lib/lifecycle/operations.js +3 -0
- package/lib/lifecycle/result.js +1 -0
- package/lib/lifecycle/status.js +3 -3
- package/lib/public-plugin/copilot-profile.js +126 -0
- package/lib/public-plugin/manifest.js +34 -2
- package/lib/public-plugin/validator.js +1 -1
- package/lib/release/version-coherence.js +4 -0
- package/lib/runtime/local-validator.js +29 -17
- package/lib/runtime/plugin-provenance.js +50 -1
- package/lib/runtime-check-consent/contract.js +3 -1
- package/lib/runtime-check-consent/coordinator.js +1 -0
- package/lib/runtime-check-consent/service.js +1 -1
- package/lib/runtime-check-consent/state.js +3 -3
- package/lib/scaffold/plan.js +3 -89
- package/lib/scaffold/presentation.js +3 -22
- package/package.json +6 -3
- package/generated/.github/copilot-instructions.md +0 -16
- package/generated/.github/instructions/agdf-governance.instructions.md +0 -14
- package/generated/.github/skills/README.md +0 -20
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-brownfield-analysis/SKILL.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-clean-implementation-review/SKILL.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-code-review/SKILL.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-delivery-closeout/SKILL.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-delivery-path-search/SKILL.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-gate-check/SKILL.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-interaction-locales.json +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-qa-gate/SKILL.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-release-or/SKILL.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-runtime-contract.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-task-plan-review/SKILL.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-ux-intent-definition/SKILL.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/closeout.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/context-graph.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/control-scaffold.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/gate-transition.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/interaction.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/modes.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/quality.md +0 -0
- /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/task-target-resolution.md +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"id": "agdf",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.2",
|
|
5
5
|
"displayName": "AI Governance & Delivery Framework",
|
|
6
6
|
"developerName": "Arndt Gold",
|
|
7
7
|
"description": "Control layer for governed AI-assisted delivery.",
|
|
@@ -50,7 +50,10 @@
|
|
|
50
50
|
},
|
|
51
51
|
"copilot": {
|
|
52
52
|
"skillPrefix": "agdf-",
|
|
53
|
-
"runtimeContractFileName": "agdf-runtime-contract.md"
|
|
53
|
+
"runtimeContractFileName": "agdf-runtime-contract.md",
|
|
54
|
+
"pluginManifest": "plugin.json",
|
|
55
|
+
"skills": "copilot-skills/",
|
|
56
|
+
"hooks": "hooks/copilot-hooks.json"
|
|
54
57
|
},
|
|
55
58
|
"opencode": {
|
|
56
59
|
"skillPrefix": "agdf-",
|
|
@@ -87,6 +90,7 @@
|
|
|
87
90
|
"surfaces": {
|
|
88
91
|
"codex": "native-hook-review",
|
|
89
92
|
"claude": "exact-command-rule",
|
|
93
|
+
"copilot": "plugin-hook-review",
|
|
90
94
|
"opencode": "plugin-internal",
|
|
91
95
|
"portable-skills": "manual-external-required"
|
|
92
96
|
}
|
|
@@ -143,6 +147,21 @@
|
|
|
143
147
|
"authorizationPath": "exact_text",
|
|
144
148
|
"technicalPermissionOwner": "claude_host"
|
|
145
149
|
},
|
|
150
|
+
"copilot": {
|
|
151
|
+
"questionAdapter": "exact_text",
|
|
152
|
+
"availability": "always",
|
|
153
|
+
"gateSafety": "wait_for_deliberate_user_input",
|
|
154
|
+
"explicitOutcomes": [
|
|
155
|
+
"approve",
|
|
156
|
+
"revise",
|
|
157
|
+
"decline",
|
|
158
|
+
"cancel"
|
|
159
|
+
],
|
|
160
|
+
"approvalValueTransport": "exact_option_value",
|
|
161
|
+
"waitSafety": "deliberate_no_auto_resolution",
|
|
162
|
+
"authorizationPath": "exact_text",
|
|
163
|
+
"technicalPermissionOwner": "copilot_host"
|
|
164
|
+
},
|
|
146
165
|
"opencode": {
|
|
147
166
|
"questionAdapter": "question",
|
|
148
167
|
"availability": "when_permission_question_allows",
|
|
@@ -292,6 +311,11 @@
|
|
|
292
311
|
"installable": true,
|
|
293
312
|
"machineValidation": "local_exact_version_digest"
|
|
294
313
|
},
|
|
314
|
+
"copilot-runtime-plugin": {
|
|
315
|
+
"runtime": "required",
|
|
316
|
+
"installable": true,
|
|
317
|
+
"machineValidation": "local_exact_version_digest_inventory"
|
|
318
|
+
},
|
|
295
319
|
"opencode-config-local": {
|
|
296
320
|
"runtime": "config_local_package",
|
|
297
321
|
"installable": true,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"profile_id": "copilot-runtime-plugin",
|
|
4
|
+
"max_files": 78,
|
|
5
|
+
"max_bytes": 539607,
|
|
6
|
+
"rationale": "Reviewed Copilot-only manifest, ten prefixed skills, required contracts, exact-version runtime and evidence-plane separation. Any further increase requires review."
|
|
7
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"releaseVersion": "0.
|
|
4
|
-
"digest": "
|
|
3
|
+
"releaseVersion": "0.14.2",
|
|
4
|
+
"digest": "0c78d217817ca7cec6cd2e8638e3a4fa678a7dc4c954119606f5f954bd1a2ca2",
|
|
5
5
|
"files": [
|
|
6
6
|
{
|
|
7
7
|
"path": ".codex-plugin/plugin.json",
|
|
8
|
-
"sha256": "
|
|
8
|
+
"sha256": "0eccc7ed08162a4f4437c7ccfbdd9145a9034b4ab6de44f5565ca608989d5c4a"
|
|
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": "
|
|
32
|
+
"sha256": "ba636c3e224125df8f2dedde215b00473174b1a02fdeecbf91da1a262dcde778"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "meta/agdf-runtime-contract.md",
|
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
"path": "meta/contracts/task-target-resolution.md",
|
|
76
76
|
"sha256": "3d078596b02360c34e40a6529e063b9c89c62c490be374507fb2046543c380e8"
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
"path": "meta/copilot-payload-baseline.json",
|
|
80
|
+
"sha256": "ab87e177288c36a056cccc583c78fd57b50fd82517a56276a009345e065ec1d6"
|
|
81
|
+
},
|
|
78
82
|
{
|
|
79
83
|
"path": "skills/brownfield-analysis/SKILL.md",
|
|
80
84
|
"sha256": "4ca65f8efe0b50d6c7b625f6355ec2961fe91affa154b9d1e91dfe1334bcaf99"
|
|
@@ -157,23 +161,23 @@
|
|
|
157
161
|
},
|
|
158
162
|
{
|
|
159
163
|
"path": "submission/openai/availability.md",
|
|
160
|
-
"sha256": "
|
|
164
|
+
"sha256": "57e428da0faf2a48f459796781b4f5b472dc10e1cea957f6078404bf6e7a184b"
|
|
161
165
|
},
|
|
162
166
|
{
|
|
163
167
|
"path": "submission/openai/capability-matrix.json",
|
|
164
|
-
"sha256": "
|
|
168
|
+
"sha256": "203b63da20727ac116fe816893c669725d46ff67388a934fa17cda68ea97f09a"
|
|
165
169
|
},
|
|
166
170
|
{
|
|
167
171
|
"path": "submission/openai/listing.json",
|
|
168
|
-
"sha256": "
|
|
172
|
+
"sha256": "29c2a8865f69e227d746548b487422135b7165c4c5aa4f92ed414b220dd21151"
|
|
169
173
|
},
|
|
170
174
|
{
|
|
171
175
|
"path": "submission/openai/release-notes.md",
|
|
172
|
-
"sha256": "
|
|
176
|
+
"sha256": "fcacfc5c8382ae589871359a3467dafac700822928999e680a106c484cc7044e"
|
|
173
177
|
},
|
|
174
178
|
{
|
|
175
179
|
"path": "submission/openai/reviewer-cases.json",
|
|
176
|
-
"sha256": "
|
|
180
|
+
"sha256": "e1ffc93e955edfab9a95cfaf0437badbf5f4741763cb0161f3de6b0e23c8bb27"
|
|
177
181
|
}
|
|
178
182
|
]
|
|
179
183
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"releaseVersion": "0.
|
|
3
|
+
"releaseVersion": "0.14.2",
|
|
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": "
|
|
19
|
+
"detail": "44 inventoried files; inventory digest 0c78d217817ca7cec6cd2e8638e3a4fa678a7dc4c954119606f5f954bd1a2ca2"
|
|
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.
|
|
3
|
+
- release: `0.14.2`
|
|
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 |
|
|
12
|
+
| bundle | pass | 44 inventoried files; inventory digest 0c78d217817ca7cec6cd2e8638e3a4fa678a7dc4c954119606f5f954bd1a2ca2 |
|
|
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.
|
|
1
|
+
# AGDF 0.14.2 — 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
|
package/lib/cli/application.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from "../installers/opencode.js";
|
|
18
18
|
import {
|
|
19
19
|
installClaudeGlobalPlugin,
|
|
20
|
+
installCopilotGlobalPlugin,
|
|
20
21
|
installCodexGlobalPlugin,
|
|
21
22
|
} from "../installers/plugin-installers.js";
|
|
22
23
|
import {
|
|
@@ -30,7 +31,7 @@ import { printGeneralStatus, printLifecycleResult } from "../lifecycle/presentat
|
|
|
30
31
|
import { createLifecycleResult, globalInstallRestartAction, lifecycleFailure } from "../lifecycle/result.js";
|
|
31
32
|
import { prepareInstallConsent, persistInstallConsent, retainCurrentInstallConsent, runtimeCheckStatus, setRuntimeChecksManual } from "../runtime-check-consent/service.js";
|
|
32
33
|
import { evaluateGeneralStatus } from "../lifecycle/status.js";
|
|
33
|
-
import {
|
|
34
|
+
import { generatedFilesForTarget } from "../scaffold/plan.js";
|
|
34
35
|
import { printNextSteps } from "../scaffold/presentation.js";
|
|
35
36
|
import { assertGeneratedWritePlan, writeGeneratedFile } from "../scaffold/write.js";
|
|
36
37
|
import { renderUsage, resolveCommand, validateCommandOptions } from "./command-registry.js";
|
|
@@ -38,19 +39,19 @@ import { CliUsageError, parseArgs } from "./parse-args.js";
|
|
|
38
39
|
import { pluginDefinition } from "./runtime-context.js";
|
|
39
40
|
import { createValidationHandlers } from "./validation-handlers.js";
|
|
40
41
|
|
|
41
|
-
function createHandlers({ io, env, exec, prepare, openCodePackageSource, askRuntimeCheckDecision, interactive }) {
|
|
42
|
+
function createHandlers({ io, env, exec, packagedCopilotExec, prepare, openCodePackageSource, copilotSettingsPath, askRuntimeCheckDecision, interactive }) {
|
|
42
43
|
const installerAdapters = {
|
|
43
44
|
...(exec ? { exec } : {}),
|
|
45
|
+
...(packagedCopilotExec ? { packagedCopilotExec } : {}),
|
|
44
46
|
...(prepare ? { prepare } : {}),
|
|
47
|
+
...(copilotSettingsPath ? { copilotSettingsPath } : {}),
|
|
45
48
|
...(env.AGDF_DATA_DIR ? { dataRoot: env.AGDF_DATA_DIR } : {}),
|
|
46
49
|
};
|
|
47
50
|
const scaffoldHandler = (options) => runScaffold(options, io);
|
|
48
51
|
return new Map([
|
|
49
52
|
...createValidationHandlers(io),
|
|
50
53
|
["codex-repo", scaffoldHandler],
|
|
51
|
-
["copilot", scaffoldHandler],
|
|
52
54
|
["opencode-repo", scaffoldHandler],
|
|
53
|
-
["both", scaffoldHandler],
|
|
54
55
|
["init", scaffoldHandler],
|
|
55
56
|
["config", scaffoldHandler],
|
|
56
57
|
["run-create", (options) => {
|
|
@@ -141,6 +142,56 @@ function createHandlers({ io, env, exec, prepare, openCodePackageSource, askRunt
|
|
|
141
142
|
return 1;
|
|
142
143
|
}
|
|
143
144
|
}],
|
|
145
|
+
["copilot", async (options) => {
|
|
146
|
+
const surface = "copilot";
|
|
147
|
+
try {
|
|
148
|
+
const consent = await installConsentDecision(surface, options, { io, askRuntimeCheckDecision, interactive, dataRoot: installerAdapters.dataRoot });
|
|
149
|
+
if (consent.decision === "cancel") return printCancelledConsent(surface, options, io);
|
|
150
|
+
printInstallProgress(surface, options, io, interactive);
|
|
151
|
+
const installed = installCopilotGlobalPlugin({
|
|
152
|
+
...installerAdapters,
|
|
153
|
+
});
|
|
154
|
+
const finalizedConsent = finalizeInstallConsent(consent, { surface, installed, dataRoot: installerAdapters.dataRoot });
|
|
155
|
+
if (installed.declarativeConfigured) {
|
|
156
|
+
printLifecycleResult(createLifecycleResult({
|
|
157
|
+
operation: "install", result: "partial", surface, scope: "global",
|
|
158
|
+
version: { expected: installed.expectedVersion, installed: null, status: "unknown" },
|
|
159
|
+
verification: { status: "configured_pending_restart", evidence: installed.evidence },
|
|
160
|
+
installation: { status: "configured_pending_restart" },
|
|
161
|
+
activation: { status: "pending_restart" },
|
|
162
|
+
runtime_checks: finalizedConsent.state,
|
|
163
|
+
restart: { required: true, reason: "host_reload" },
|
|
164
|
+
next_action: { kind: "restart", text: "Restart GitHub Copilot. Then verify AGDF in Plugins and the agdf- skills in a fresh session." },
|
|
165
|
+
}), { json: options.json, compact: !options.verbose, io });
|
|
166
|
+
return 0;
|
|
167
|
+
}
|
|
168
|
+
if (installed.manualHandoff) {
|
|
169
|
+
printLifecycleResult(createLifecycleResult({
|
|
170
|
+
operation: "install", result: "partial", surface, scope: "global",
|
|
171
|
+
version: { expected: installed.expectedVersion, installed: null, status: "unknown" },
|
|
172
|
+
verification: { status: "unavailable", evidence: installed.evidence },
|
|
173
|
+
installation: { status: "not_verified" },
|
|
174
|
+
activation: { status: "not_verified" },
|
|
175
|
+
runtime_checks: finalizedConsent.state,
|
|
176
|
+
restart: { required: false, reason: "none" },
|
|
177
|
+
next_action: { kind: "manual_install", text: `In GitHub Copilot, run /plugins install ${installed.pluginRoot}. Then run /restart and verify /plugins list and /skills list.` },
|
|
178
|
+
failure: { phase: "executable", message: "Copilot CLI was not available; no plugin installation was performed." },
|
|
179
|
+
}), { json: options.json, compact: !options.verbose, io });
|
|
180
|
+
return 1;
|
|
181
|
+
}
|
|
182
|
+
printLifecycleResult(installResult(installed, {
|
|
183
|
+
restartRequired: true,
|
|
184
|
+
nextAction: installNextAction(surface, finalizedConsent.state, globalInstallRestartAction(surface).text),
|
|
185
|
+
runtimeChecks: finalizedConsent.state,
|
|
186
|
+
consentFailure: finalizedConsent.failure,
|
|
187
|
+
}), { json: options.json, compact: !options.verbose, io });
|
|
188
|
+
printVerboseHostOutput(installed, options, io);
|
|
189
|
+
return installed.verificationStatus === "healthy" ? 0 : 1;
|
|
190
|
+
} catch (error) {
|
|
191
|
+
printInstallFailure(surface, error, options, io, "copilot");
|
|
192
|
+
return 1;
|
|
193
|
+
}
|
|
194
|
+
}],
|
|
144
195
|
["opencode", async (options) => {
|
|
145
196
|
const configDir = options.dirExplicit ? options.dir : defaultOpenCodeConfigDir();
|
|
146
197
|
try {
|
|
@@ -230,6 +281,9 @@ function installNextAction(surface, runtimeChecks, fallback) {
|
|
|
230
281
|
if (surface === "codex" && runtimeChecks.requested === "enabled" && runtimeChecks.effective === "decision_required") {
|
|
231
282
|
return "Restart Codex, then approve the AGDF session hook when Codex asks.";
|
|
232
283
|
}
|
|
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.";
|
|
286
|
+
}
|
|
233
287
|
return fallback;
|
|
234
288
|
}
|
|
235
289
|
|
|
@@ -313,6 +367,7 @@ function printInstallConsentDisclosure(disclosure, retained, io) {
|
|
|
313
367
|
|
|
314
368
|
function installSurfaceLabel(surface) {
|
|
315
369
|
if (surface === "claude") return "Claude Code";
|
|
370
|
+
if (surface === "copilot") return "GitHub Copilot";
|
|
316
371
|
if (surface === "opencode") return "OpenCode";
|
|
317
372
|
return "Codex";
|
|
318
373
|
}
|
|
@@ -356,7 +411,7 @@ function printVerboseHostOutput(installed, options, io) {
|
|
|
356
411
|
for (const output of installed.nativeOutput) io.log(output);
|
|
357
412
|
}
|
|
358
413
|
|
|
359
|
-
function printInstallFailure(surface, error, options, io) {
|
|
414
|
+
function printInstallFailure(surface, error, options, io, command = surface) {
|
|
360
415
|
const report = lifecycleFailure({
|
|
361
416
|
operation: "install",
|
|
362
417
|
surface,
|
|
@@ -364,7 +419,7 @@ function printInstallFailure(surface, error, options, io) {
|
|
|
364
419
|
phase: error.phase || "plugin_operation",
|
|
365
420
|
message: error.message,
|
|
366
421
|
evidence: [error.evidence ?? {}],
|
|
367
|
-
nextAction: `Resolve the ${error.phase || "plugin operation"} failure and rerun npx --yes @agdf/cli@latest ${
|
|
422
|
+
nextAction: `Resolve the ${error.phase || "plugin operation"} failure and rerun npx --yes @agdf/cli@latest ${command}.`,
|
|
368
423
|
});
|
|
369
424
|
if (options.json) printLifecycleResult(report, { json: true, io });
|
|
370
425
|
else {
|
|
@@ -445,7 +500,6 @@ function runUninstall(options, { io, env, exec }) {
|
|
|
445
500
|
|
|
446
501
|
function runScaffold(options, io) {
|
|
447
502
|
const files = generatedFilesForTarget(options.target, options.dir, options.force, options.language);
|
|
448
|
-
const wroteAgentsFragment = files.some((file) => file.path === agdfFragmentPath);
|
|
449
503
|
let removedOpenCodeAgents = [];
|
|
450
504
|
|
|
451
505
|
try {
|
|
@@ -460,7 +514,7 @@ function runScaffold(options, io) {
|
|
|
460
514
|
return 1;
|
|
461
515
|
}
|
|
462
516
|
|
|
463
|
-
printNextSteps(options.target, options.dir, files,
|
|
517
|
+
printNextSteps(options.target, options.dir, files, removedOpenCodeAgents, { verbose: options.verbose, json: options.json, io });
|
|
464
518
|
return 0;
|
|
465
519
|
}
|
|
466
520
|
|
|
@@ -500,8 +554,10 @@ export async function runCli(argv = process.argv.slice(2), adapters = {}) {
|
|
|
500
554
|
io,
|
|
501
555
|
env,
|
|
502
556
|
exec: adapters.exec,
|
|
557
|
+
packagedCopilotExec: adapters.packagedCopilotExec,
|
|
503
558
|
prepare: adapters.prepare,
|
|
504
559
|
openCodePackageSource: adapters.openCodePackageSource,
|
|
560
|
+
copilotSettingsPath: adapters.copilotSettingsPath,
|
|
505
561
|
askRuntimeCheckDecision: adapters.askRuntimeCheckDecision ?? defaultAskRuntimeCheckDecision,
|
|
506
562
|
interactive: adapters.interactive ?? (Boolean(process.stdin.isTTY) && Boolean(process.stdout.isTTY)),
|
|
507
563
|
}).get(command.handler);
|
|
@@ -13,15 +13,14 @@ export const commandRegistry = Object.freeze([
|
|
|
13
13
|
command("codex", { preferred: [""], scaffold: [""] }),
|
|
14
14
|
command("codex-repo", { preferred: [""], scaffold: [""] }),
|
|
15
15
|
command("claude", { preferred: [""], scaffold: [""] }),
|
|
16
|
-
command("copilot", { preferred: [""]
|
|
16
|
+
command("copilot", { preferred: [""] }),
|
|
17
17
|
command("opencode", { preferred: [""], scaffold: [""] }),
|
|
18
18
|
command("opencode-status", { preferred: [""], scaffold: [""] }),
|
|
19
19
|
command("status", { preferred: [" [--surface <surface>] [--run <run_id>] [--json]"] }),
|
|
20
|
-
command("runtime-checks", { preferred: [" <status|enable|manual> --surface <codex|claude|opencode> [--json]"] }),
|
|
20
|
+
command("runtime-checks", { preferred: [" <status|enable|manual> --surface <codex|claude|copilot|opencode> [--json]"] }),
|
|
21
21
|
command("disable", { preferred: [" --surface <surface> [--scope repository] [--dir <path>]"] }),
|
|
22
22
|
command("uninstall", { preferred: [" --surface <surface> --scope global [--confirm]"] }),
|
|
23
23
|
command("opencode-repo", { preferred: [""], scaffold: [""] }),
|
|
24
|
-
command("both", { scaffold: [""] }),
|
|
25
24
|
command("init", { preferred: [""], scaffold: [""] }),
|
|
26
25
|
command("config", { scaffold: [" --language de"] }),
|
|
27
26
|
command("doctor", { local: [""], scaffold: [""], legacy: [" --json"] }),
|
|
@@ -66,11 +65,11 @@ export function validateCommandOptions(options) {
|
|
|
66
65
|
throw new Error("uninstall requires explicit --scope global");
|
|
67
66
|
}
|
|
68
67
|
if (options.confirm && options.target !== "uninstall") throw new Error("--confirm is supported only by uninstall");
|
|
69
|
-
if (options.runtimeChecksDecision && !["codex", "claude", "opencode"].includes(options.target)) {
|
|
70
|
-
throw new Error("--runtime-checks is supported only by codex, claude and opencode installation commands");
|
|
68
|
+
if (options.runtimeChecksDecision && !["codex", "claude", "copilot", "opencode"].includes(options.target)) {
|
|
69
|
+
throw new Error("--runtime-checks is supported only by codex, claude, copilot and opencode installation commands");
|
|
71
70
|
}
|
|
72
|
-
if (options.target === "runtime-checks" && !["codex", "claude", "opencode"].includes(options.surface)) {
|
|
73
|
-
throw new Error("runtime-checks requires --surface codex, claude or opencode");
|
|
71
|
+
if (options.target === "runtime-checks" && !["codex", "claude", "copilot", "opencode"].includes(options.surface)) {
|
|
72
|
+
throw new Error("runtime-checks requires --surface codex, claude, copilot or opencode");
|
|
74
73
|
}
|
|
75
74
|
if (options.approvalEnvelope && options.target !== "gate-check") throw new Error("--approval-envelope is supported only by gate-check");
|
|
76
75
|
if (options.approvalEnvelope && (options.json || options.statusCard || options.allActive)) {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function skillNames(values, field) {
|
|
2
|
+
if (!Array.isArray(values) || values.some((value) => typeof value !== "string" || !value.trim())) {
|
|
3
|
+
throw new Error(`AGDF_COPILOT_PRECEDENCE_INVALID: ${field}`);
|
|
4
|
+
}
|
|
5
|
+
const normalized = values.map((value) => value.trim());
|
|
6
|
+
if (new Set(normalized).size !== normalized.length) throw new Error(`AGDF_COPILOT_PRECEDENCE_DUPLICATE: ${field}`);
|
|
7
|
+
return new Set(normalized);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function diagnoseCopilotSkillPrecedence({ declaredPluginSkills, projectSkills = [], personalSkills = [] } = {}) {
|
|
11
|
+
const plugin = skillNames(declaredPluginSkills, "declaredPluginSkills");
|
|
12
|
+
const project = skillNames(projectSkills, "projectSkills");
|
|
13
|
+
const personal = skillNames(personalSkills, "personalSkills");
|
|
14
|
+
const skills = [...plugin].sort().map((name) => {
|
|
15
|
+
const projectMatch = project.has(name);
|
|
16
|
+
const personalMatch = personal.has(name);
|
|
17
|
+
return Object.freeze({
|
|
18
|
+
name,
|
|
19
|
+
effective_source: projectMatch ? "project" : personalMatch ? "personal" : "plugin",
|
|
20
|
+
plugin_loaded: !projectMatch && !personalMatch,
|
|
21
|
+
collisions: Object.freeze([
|
|
22
|
+
...(projectMatch ? ["project"] : []),
|
|
23
|
+
...(personalMatch ? ["personal"] : []),
|
|
24
|
+
]),
|
|
25
|
+
mutation: "none",
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
return Object.freeze({
|
|
29
|
+
schema_version: 1,
|
|
30
|
+
precedence: Object.freeze(["project", "personal", "plugin"]),
|
|
31
|
+
skills: Object.freeze(skills),
|
|
32
|
+
destructive_override: false,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
4
|
+
import process from "node:process";
|
|
5
|
+
import { renameSyncWithRetry } from "../fs-swap.js";
|
|
6
|
+
|
|
7
|
+
export function defaultCopilotSettingsPath({ env = process.env, home = homedir() } = {}) {
|
|
8
|
+
return join(resolve(env.COPILOT_HOME || join(home, ".copilot")), "settings.json");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function readCopilotSettings(path = defaultCopilotSettingsPath()) {
|
|
12
|
+
if (!existsSync(path)) return { exists: false, settings: {} };
|
|
13
|
+
const stats = lstatSync(path);
|
|
14
|
+
if (!stats.isFile() || stats.isSymbolicLink()) throw new Error("AGDF_COPILOT_SETTINGS_UNOWNED_PATH");
|
|
15
|
+
try {
|
|
16
|
+
const settings = JSON.parse(readFileSync(path, "utf8"));
|
|
17
|
+
if (!settings || typeof settings !== "object" || Array.isArray(settings)) throw new Error("not an object");
|
|
18
|
+
if (settings.enabledPlugins !== undefined
|
|
19
|
+
&& (!settings.enabledPlugins || typeof settings.enabledPlugins !== "object" || Array.isArray(settings.enabledPlugins))) {
|
|
20
|
+
throw new Error("enabledPlugins must be an object");
|
|
21
|
+
}
|
|
22
|
+
return { exists: true, settings };
|
|
23
|
+
} catch (error) {
|
|
24
|
+
throw new Error(`AGDF_COPILOT_SETTINGS_INVALID: ${error.message}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function atomicSettingsWrite(path, settings) {
|
|
29
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
30
|
+
const temp = `${path}.agdf-tmp-${process.pid}`;
|
|
31
|
+
const backup = `${path}.agdf-backup-${process.pid}`;
|
|
32
|
+
const hadPrevious = existsSync(path);
|
|
33
|
+
const mode = hadPrevious ? lstatSync(path).mode & 0o777 : 0o600;
|
|
34
|
+
writeFileSync(temp, `${JSON.stringify(settings, null, 2)}\n`, { encoding: "utf8", flag: "wx", mode });
|
|
35
|
+
if (process.platform !== "win32") chmodSync(temp, mode);
|
|
36
|
+
try {
|
|
37
|
+
if (hadPrevious && process.platform === "win32") renameSyncWithRetry(path, backup);
|
|
38
|
+
renameSyncWithRetry(temp, path);
|
|
39
|
+
if (hadPrevious && process.platform === "win32") rmSync(backup, { force: true });
|
|
40
|
+
} catch (error) {
|
|
41
|
+
try { rmSync(temp, { force: true }); } catch {}
|
|
42
|
+
if (hadPrevious && process.platform === "win32" && existsSync(backup) && !existsSync(path)) renameSyncWithRetry(backup, path);
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function configureCopilotDeclarativePlugin({ path = defaultCopilotSettingsPath(), pluginRoot }) {
|
|
48
|
+
if (typeof pluginRoot !== "string" || !pluginRoot.trim() || !isAbsolute(pluginRoot)) {
|
|
49
|
+
throw new Error("AGDF_COPILOT_PLUGIN_SPEC_INVALID");
|
|
50
|
+
}
|
|
51
|
+
const spec = resolve(pluginRoot);
|
|
52
|
+
if (!existsSync(spec) || !lstatSync(spec).isDirectory() || lstatSync(spec).isSymbolicLink()) {
|
|
53
|
+
throw new Error("AGDF_COPILOT_PLUGIN_SPEC_UNAVAILABLE");
|
|
54
|
+
}
|
|
55
|
+
const before = readCopilotSettings(path);
|
|
56
|
+
const next = structuredClone(before.settings);
|
|
57
|
+
next.enabledPlugins = { ...(next.enabledPlugins ?? {}), [spec]: true };
|
|
58
|
+
atomicSettingsWrite(path, next);
|
|
59
|
+
const verified = readCopilotSettings(path);
|
|
60
|
+
if (verified.settings.enabledPlugins?.[spec] !== true) throw new Error("AGDF_COPILOT_SETTINGS_VERIFICATION_FAILED");
|
|
61
|
+
return {
|
|
62
|
+
status: "configured_pending_restart",
|
|
63
|
+
reason: "host_activation_unverified",
|
|
64
|
+
path,
|
|
65
|
+
spec,
|
|
66
|
+
rollback() {
|
|
67
|
+
if (before.exists) atomicSettingsWrite(path, before.settings);
|
|
68
|
+
else rmSync(path, { force: true });
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function revokeCopilotDeclarativePlugin({ path = defaultCopilotSettingsPath(), pluginRoot }) {
|
|
74
|
+
const before = readCopilotSettings(path);
|
|
75
|
+
if (!before.exists) return { status: "not_configured", path };
|
|
76
|
+
const spec = resolve(pluginRoot);
|
|
77
|
+
const next = structuredClone(before.settings);
|
|
78
|
+
if (next.enabledPlugins && Object.hasOwn(next.enabledPlugins, spec)) {
|
|
79
|
+
delete next.enabledPlugins[spec];
|
|
80
|
+
if (Object.keys(next.enabledPlugins).length === 0) delete next.enabledPlugins;
|
|
81
|
+
atomicSettingsWrite(path, next);
|
|
82
|
+
}
|
|
83
|
+
return { status: "removed", path, spec };
|
|
84
|
+
}
|