@apexops/cli 0.10.0-next.4 → 0.10.0-next.5
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 +40 -0
- package/assets/client-projection-metadata/copilot-cli-agent-tools.json +8 -0
- package/assets/client-projections/github-copilot-cli/.github/agents/apex-architect.agent.md +9 -8
- package/assets/client-projections/github-copilot-cli/.github/agents/apex-planner.agent.md +7 -5
- package/assets/client-projections/github-copilot-cli/.github/agents/apex-requirements.agent.md +18 -11
- package/assets/client-projections/github-copilot-cli/.github/mcp.json +5 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-requirements/SKILL.md +7 -4
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-architect.agent.md +9 -8
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-planner.agent.md +7 -5
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-requirements.agent.md +18 -11
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-reviewer.agent.md +9 -5
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-requirements/SKILL.md +7 -4
- package/assets/config/runtime-bundle.v1.json +7 -7
- package/assets/customizations/.github/agents/apex-architect.agent.md +9 -8
- package/assets/customizations/.github/agents/apex-planner.agent.md +7 -5
- package/assets/customizations/.github/agents/apex-requirements.agent.md +18 -11
- package/assets/customizations/.github/agents/apex-reviewer.agent.md +9 -5
- package/assets/customizations/.github/mcp.json +5 -0
- package/assets/customizations/.github/skills/apex-requirements/SKILL.md +7 -4
- package/assets/customizations/manifest.json +1 -1
- package/assets/manifest.json +50 -50
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +42 -2
- package/dist/mcp.js +58 -16
- package/dist/service.d.ts +41 -1
- package/dist/service.js +448 -40
- package/dist/state-transfer.js +23 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -5
|
@@ -11,17 +11,22 @@
|
|
|
11
11
|
"capabilityStatus",
|
|
12
12
|
"nextTask",
|
|
13
13
|
"taskContext",
|
|
14
|
+
"readTaskInput",
|
|
14
15
|
"recordInput",
|
|
15
16
|
"projectCreate",
|
|
16
17
|
"projectList",
|
|
17
18
|
"projectUse",
|
|
18
19
|
"projectDelete",
|
|
19
20
|
"gateDecide",
|
|
21
|
+
"reviewDecide",
|
|
20
22
|
"stageArtifact",
|
|
21
23
|
"stageFile",
|
|
22
24
|
"generateIac",
|
|
23
25
|
"validateTask",
|
|
24
26
|
"completeTask",
|
|
27
|
+
"requirementsComplete",
|
|
28
|
+
"architectureComplete",
|
|
29
|
+
"reviewComplete",
|
|
25
30
|
"planComplete",
|
|
26
31
|
"preview",
|
|
27
32
|
"reconcile",
|
|
@@ -24,10 +24,13 @@ Use this skill only for an active requirements task.
|
|
|
24
24
|
4. Submit that request only through `apex/recordInput`, preserving its request ID, expected journal head, and owner
|
|
25
25
|
epoch.
|
|
26
26
|
5. Call `apex/nextTask` again and repeat until it returns a requirements `task`; only then read `apex/taskContext`.
|
|
27
|
-
6. Treat the
|
|
28
|
-
SKU preferences, and environment overrides without selecting
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
6. Treat service questions in the workload panel as a preference boundary. Present the kernel recommendation, then
|
|
28
|
+
capture retained, prohibited, and preferred services, SKU preferences, and environment overrides without selecting
|
|
29
|
+
architecture, SKUs, or implementation details.
|
|
30
|
+
7. Submit the task-context-defined output through `apex/requirementsComplete`, invoke the required Reviewer, and handle
|
|
31
|
+
`needs_review` through one native findings panel and `apex/reviewDecide`.
|
|
32
|
+
8. After a clean or fully dispositioned review, ask for explicit Gate 1 approval. Call `apex/gateDecide` only after the
|
|
33
|
+
user chooses Proceed, then continue to Architecture in the same turn.
|
|
31
34
|
|
|
32
35
|
The kernel catalog and its versioned input contracts are authoritative. Do not choose architecture, SKUs, or
|
|
33
36
|
implementation details while gathering requirements.
|
package/assets/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"sources": {
|
|
4
|
-
"customizations": "0.10.0-next.
|
|
4
|
+
"customizations": "0.10.0-next.5",
|
|
5
5
|
"config": "1.0.0"
|
|
6
6
|
},
|
|
7
7
|
"composition": {
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/test-design.md",
|
|
191
191
|
"client-projections/github-copilot-cli/.github/skills/apex-workflow/SKILL.md"
|
|
192
192
|
],
|
|
193
|
-
"digest": "
|
|
193
|
+
"digest": "87f5d74109a94f0014cb832441c4e02bb5b7c5ce97f7a43f80959e55b96052ec"
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
"id": "github-copilot-vscode",
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
"client-projections/github-copilot-vscode/.github/skills/apex-workflow/SKILL.md",
|
|
339
339
|
"client-projections/github-copilot-vscode/.vscode/mcp.json"
|
|
340
340
|
],
|
|
341
|
-
"digest": "
|
|
341
|
+
"digest": "a6387c778c2f2fddbda8453960f113ec4522bca784a7aeaa0a113fa18e9da7db"
|
|
342
342
|
}
|
|
343
343
|
],
|
|
344
344
|
"files": [
|
|
@@ -378,8 +378,8 @@
|
|
|
378
378
|
"path": "tools/registry/copilot-cli-agent-tools.json",
|
|
379
379
|
"mapping": "copilot-cli-tool-inventory"
|
|
380
380
|
},
|
|
381
|
-
"sha256": "
|
|
382
|
-
"bytes":
|
|
381
|
+
"sha256": "e67b7d9ca1c28956c13e8817c5f8ae2173d2070f4855ff71098690516e40d1fc",
|
|
382
|
+
"bytes": 3310
|
|
383
383
|
},
|
|
384
384
|
{
|
|
385
385
|
"path": "client-projections/github-copilot-cli/.github/agents/apex-architect.agent.md",
|
|
@@ -388,13 +388,13 @@
|
|
|
388
388
|
"composition": "client-projections",
|
|
389
389
|
"roleId": "architecture",
|
|
390
390
|
"sourcePath": ".github/agents/apex-architect.agent.md",
|
|
391
|
-
"sourceHash": "
|
|
391
|
+
"sourceHash": "47e6edf792c88ea633cd3bc66c59fba00a3c13020f8771d3635d5e2cc3414e70",
|
|
392
392
|
"clientId": "github-copilot-cli",
|
|
393
393
|
"target": ".github/agents/apex-architect.agent.md",
|
|
394
394
|
"adapterVersion": "1.1.0"
|
|
395
395
|
},
|
|
396
|
-
"sha256": "
|
|
397
|
-
"bytes":
|
|
396
|
+
"sha256": "9c194b0877b6dabcb5a5775c1e719bf851ea194206a183a582200f645b74dfc8",
|
|
397
|
+
"bytes": 5362
|
|
398
398
|
},
|
|
399
399
|
{
|
|
400
400
|
"path": "client-projections/github-copilot-cli/.github/agents/apex-operator.agent.md",
|
|
@@ -418,13 +418,13 @@
|
|
|
418
418
|
"composition": "client-projections",
|
|
419
419
|
"roleId": "planning",
|
|
420
420
|
"sourcePath": ".github/agents/apex-planner.agent.md",
|
|
421
|
-
"sourceHash": "
|
|
421
|
+
"sourceHash": "b33471f0ef586ace4847b9eecfd5363c1d8b269dd9eba460022498ff488c509c",
|
|
422
422
|
"clientId": "github-copilot-cli",
|
|
423
423
|
"target": ".github/agents/apex-planner.agent.md",
|
|
424
424
|
"adapterVersion": "1.1.0"
|
|
425
425
|
},
|
|
426
|
-
"sha256": "
|
|
427
|
-
"bytes":
|
|
426
|
+
"sha256": "e1e7a3790dc13628214ba19d5b28d1ab8a522fff07868e5c962a3ad985b690f5",
|
|
427
|
+
"bytes": 4868
|
|
428
428
|
},
|
|
429
429
|
{
|
|
430
430
|
"path": "client-projections/github-copilot-cli/.github/agents/apex-requirements.agent.md",
|
|
@@ -433,13 +433,13 @@
|
|
|
433
433
|
"composition": "client-projections",
|
|
434
434
|
"roleId": "requirements",
|
|
435
435
|
"sourcePath": ".github/agents/apex-requirements.agent.md",
|
|
436
|
-
"sourceHash": "
|
|
436
|
+
"sourceHash": "4bb98532f4c277424689eab261779a33dd0790faf6764a8487848afb5ffb9225",
|
|
437
437
|
"clientId": "github-copilot-cli",
|
|
438
438
|
"target": ".github/agents/apex-requirements.agent.md",
|
|
439
439
|
"adapterVersion": "1.1.0"
|
|
440
440
|
},
|
|
441
|
-
"sha256": "
|
|
442
|
-
"bytes":
|
|
441
|
+
"sha256": "6bd816e8b228ca0fd5b46e55949495286316b5cc406d11f0cefd9cd5bf0b3b0d",
|
|
442
|
+
"bytes": 6044
|
|
443
443
|
},
|
|
444
444
|
{
|
|
445
445
|
"path": "client-projections/github-copilot-cli/.github/agents/apex.agent.md",
|
|
@@ -773,10 +773,10 @@
|
|
|
773
773
|
"target": ".github/mcp.json",
|
|
774
774
|
"adapterVersion": "1.1.0",
|
|
775
775
|
"sourcePath": ".github/mcp.json",
|
|
776
|
-
"sourceHash": "
|
|
776
|
+
"sourceHash": "21d86c077f0f304e59433f7b7f5063948f60b41ec961f71d50eccf94c340fea9"
|
|
777
777
|
},
|
|
778
|
-
"sha256": "
|
|
779
|
-
"bytes":
|
|
778
|
+
"sha256": "21d86c077f0f304e59433f7b7f5063948f60b41ec961f71d50eccf94c340fea9",
|
|
779
|
+
"bytes": 1535
|
|
780
780
|
},
|
|
781
781
|
{
|
|
782
782
|
"path": "client-projections/github-copilot-cli/.github/skills/apex-architecture/SKILL.md",
|
|
@@ -2089,10 +2089,10 @@
|
|
|
2089
2089
|
"target": ".github/skills/apex-requirements/SKILL.md",
|
|
2090
2090
|
"adapterVersion": "1.1.0",
|
|
2091
2091
|
"sourcePath": ".github/skills/apex-requirements/SKILL.md",
|
|
2092
|
-
"sourceHash": "
|
|
2092
|
+
"sourceHash": "0b5076218e79d165efaa2d4a00d5f6014804e6f04666d223947a4e8c9f9512f5"
|
|
2093
2093
|
},
|
|
2094
|
-
"sha256": "
|
|
2095
|
-
"bytes":
|
|
2094
|
+
"sha256": "0b5076218e79d165efaa2d4a00d5f6014804e6f04666d223947a4e8c9f9512f5",
|
|
2095
|
+
"bytes": 2418
|
|
2096
2096
|
},
|
|
2097
2097
|
{
|
|
2098
2098
|
"path": "client-projections/github-copilot-cli/.github/skills/apex-terraform-import/SKILL.md",
|
|
@@ -2339,13 +2339,13 @@
|
|
|
2339
2339
|
"composition": "client-projections",
|
|
2340
2340
|
"roleId": "architecture",
|
|
2341
2341
|
"sourcePath": ".github/agents/apex-architect.agent.md",
|
|
2342
|
-
"sourceHash": "
|
|
2342
|
+
"sourceHash": "47e6edf792c88ea633cd3bc66c59fba00a3c13020f8771d3635d5e2cc3414e70",
|
|
2343
2343
|
"clientId": "github-copilot-vscode",
|
|
2344
2344
|
"target": ".github/agents/apex-architect.agent.md",
|
|
2345
2345
|
"adapterVersion": "1.1.0"
|
|
2346
2346
|
},
|
|
2347
|
-
"sha256": "
|
|
2348
|
-
"bytes":
|
|
2347
|
+
"sha256": "f4e8363fd82309494f2d3a54371abd824e6862323c4db6f52c8b8fe657bf0745",
|
|
2348
|
+
"bytes": 5647
|
|
2349
2349
|
},
|
|
2350
2350
|
{
|
|
2351
2351
|
"path": "client-projections/github-copilot-vscode/.github/agents/apex-codegen.agent.md",
|
|
@@ -2384,13 +2384,13 @@
|
|
|
2384
2384
|
"composition": "client-projections",
|
|
2385
2385
|
"roleId": "planning",
|
|
2386
2386
|
"sourcePath": ".github/agents/apex-planner.agent.md",
|
|
2387
|
-
"sourceHash": "
|
|
2387
|
+
"sourceHash": "b33471f0ef586ace4847b9eecfd5363c1d8b269dd9eba460022498ff488c509c",
|
|
2388
2388
|
"clientId": "github-copilot-vscode",
|
|
2389
2389
|
"target": ".github/agents/apex-planner.agent.md",
|
|
2390
2390
|
"adapterVersion": "1.1.0"
|
|
2391
2391
|
},
|
|
2392
|
-
"sha256": "
|
|
2393
|
-
"bytes":
|
|
2392
|
+
"sha256": "1133d3020cdf6b5a787df091730e9efa7de9076290dd760fe58864478d7fbec4",
|
|
2393
|
+
"bytes": 5176
|
|
2394
2394
|
},
|
|
2395
2395
|
{
|
|
2396
2396
|
"path": "client-projections/github-copilot-vscode/.github/agents/apex-requirements.agent.md",
|
|
@@ -2399,13 +2399,13 @@
|
|
|
2399
2399
|
"composition": "client-projections",
|
|
2400
2400
|
"roleId": "requirements",
|
|
2401
2401
|
"sourcePath": ".github/agents/apex-requirements.agent.md",
|
|
2402
|
-
"sourceHash": "
|
|
2402
|
+
"sourceHash": "4bb98532f4c277424689eab261779a33dd0790faf6764a8487848afb5ffb9225",
|
|
2403
2403
|
"clientId": "github-copilot-vscode",
|
|
2404
2404
|
"target": ".github/agents/apex-requirements.agent.md",
|
|
2405
2405
|
"adapterVersion": "1.1.0"
|
|
2406
2406
|
},
|
|
2407
|
-
"sha256": "
|
|
2408
|
-
"bytes":
|
|
2407
|
+
"sha256": "70e254ca0b7a8cef6f44fc93c5558d6983c6d0bee71b616dc467f5010a687165",
|
|
2408
|
+
"bytes": 6348
|
|
2409
2409
|
},
|
|
2410
2410
|
{
|
|
2411
2411
|
"path": "client-projections/github-copilot-vscode/.github/agents/apex-reviewer.agent.md",
|
|
@@ -2414,13 +2414,13 @@
|
|
|
2414
2414
|
"composition": "client-projections",
|
|
2415
2415
|
"roleId": "review",
|
|
2416
2416
|
"sourcePath": ".github/agents/apex-reviewer.agent.md",
|
|
2417
|
-
"sourceHash": "
|
|
2417
|
+
"sourceHash": "aa2c8064d102f8e2e69eaccc15894455abfcc56892e61bde46d6ece0cbc3c7cd",
|
|
2418
2418
|
"clientId": "github-copilot-vscode",
|
|
2419
2419
|
"target": ".github/agents/apex-reviewer.agent.md",
|
|
2420
2420
|
"adapterVersion": "1.1.0"
|
|
2421
2421
|
},
|
|
2422
|
-
"sha256": "
|
|
2423
|
-
"bytes":
|
|
2422
|
+
"sha256": "4be66c1a357ea492c20eaada3431c9b7184f33618bfd69f2725c0c83a2f3f8e7",
|
|
2423
|
+
"bytes": 2976
|
|
2424
2424
|
},
|
|
2425
2425
|
{
|
|
2426
2426
|
"path": "client-projections/github-copilot-vscode/.github/agents/apex-validator.agent.md",
|
|
@@ -4071,10 +4071,10 @@
|
|
|
4071
4071
|
"target": ".github/skills/apex-requirements/SKILL.md",
|
|
4072
4072
|
"adapterVersion": "1.1.0",
|
|
4073
4073
|
"sourcePath": ".github/skills/apex-requirements/SKILL.md",
|
|
4074
|
-
"sourceHash": "
|
|
4074
|
+
"sourceHash": "0b5076218e79d165efaa2d4a00d5f6014804e6f04666d223947a4e8c9f9512f5"
|
|
4075
4075
|
},
|
|
4076
|
-
"sha256": "
|
|
4077
|
-
"bytes":
|
|
4076
|
+
"sha256": "0b5076218e79d165efaa2d4a00d5f6014804e6f04666d223947a4e8c9f9512f5",
|
|
4077
|
+
"bytes": 2418
|
|
4078
4078
|
},
|
|
4079
4079
|
{
|
|
4080
4080
|
"path": "client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/SKILL.md",
|
|
@@ -4385,7 +4385,7 @@
|
|
|
4385
4385
|
"path": "config/runtime-bundle.v1.json",
|
|
4386
4386
|
"mapping": "config"
|
|
4387
4387
|
},
|
|
4388
|
-
"sha256": "
|
|
4388
|
+
"sha256": "7f90c32650d60c10143c298896b404b204427c77a5a746a8778a9bdf1229fd30",
|
|
4389
4389
|
"bytes": 2039
|
|
4390
4390
|
},
|
|
4391
4391
|
{
|
|
@@ -4415,8 +4415,8 @@
|
|
|
4415
4415
|
"path": "customizations/.github/agents/apex-architect.agent.md",
|
|
4416
4416
|
"mapping": "customizations"
|
|
4417
4417
|
},
|
|
4418
|
-
"sha256": "
|
|
4419
|
-
"bytes":
|
|
4418
|
+
"sha256": "47e6edf792c88ea633cd3bc66c59fba00a3c13020f8771d3635d5e2cc3414e70",
|
|
4419
|
+
"bytes": 5463
|
|
4420
4420
|
},
|
|
4421
4421
|
{
|
|
4422
4422
|
"path": "customizations/.github/agents/apex-codegen.agent.md",
|
|
@@ -4445,8 +4445,8 @@
|
|
|
4445
4445
|
"path": "customizations/.github/agents/apex-planner.agent.md",
|
|
4446
4446
|
"mapping": "customizations"
|
|
4447
4447
|
},
|
|
4448
|
-
"sha256": "
|
|
4449
|
-
"bytes":
|
|
4448
|
+
"sha256": "b33471f0ef586ace4847b9eecfd5363c1d8b269dd9eba460022498ff488c509c",
|
|
4449
|
+
"bytes": 4992
|
|
4450
4450
|
},
|
|
4451
4451
|
{
|
|
4452
4452
|
"path": "customizations/.github/agents/apex-requirements.agent.md",
|
|
@@ -4455,8 +4455,8 @@
|
|
|
4455
4455
|
"path": "customizations/.github/agents/apex-requirements.agent.md",
|
|
4456
4456
|
"mapping": "customizations"
|
|
4457
4457
|
},
|
|
4458
|
-
"sha256": "
|
|
4459
|
-
"bytes":
|
|
4458
|
+
"sha256": "4bb98532f4c277424689eab261779a33dd0790faf6764a8487848afb5ffb9225",
|
|
4459
|
+
"bytes": 6164
|
|
4460
4460
|
},
|
|
4461
4461
|
{
|
|
4462
4462
|
"path": "customizations/.github/agents/apex-reviewer.agent.md",
|
|
@@ -4465,8 +4465,8 @@
|
|
|
4465
4465
|
"path": "customizations/.github/agents/apex-reviewer.agent.md",
|
|
4466
4466
|
"mapping": "customizations"
|
|
4467
4467
|
},
|
|
4468
|
-
"sha256": "
|
|
4469
|
-
"bytes":
|
|
4468
|
+
"sha256": "aa2c8064d102f8e2e69eaccc15894455abfcc56892e61bde46d6ece0cbc3c7cd",
|
|
4469
|
+
"bytes": 2935
|
|
4470
4470
|
},
|
|
4471
4471
|
{
|
|
4472
4472
|
"path": "customizations/.github/agents/apex-validator.agent.md",
|
|
@@ -4715,8 +4715,8 @@
|
|
|
4715
4715
|
"path": "customizations/.github/mcp.json",
|
|
4716
4716
|
"mapping": "customizations"
|
|
4717
4717
|
},
|
|
4718
|
-
"sha256": "
|
|
4719
|
-
"bytes":
|
|
4718
|
+
"sha256": "21d86c077f0f304e59433f7b7f5063948f60b41ec961f71d50eccf94c340fea9",
|
|
4719
|
+
"bytes": 1535
|
|
4720
4720
|
},
|
|
4721
4721
|
{
|
|
4722
4722
|
"path": "customizations/.github/skills/apex-architecture/SKILL.md",
|
|
@@ -5655,8 +5655,8 @@
|
|
|
5655
5655
|
"path": "customizations/.github/skills/apex-requirements/SKILL.md",
|
|
5656
5656
|
"mapping": "customizations"
|
|
5657
5657
|
},
|
|
5658
|
-
"sha256": "
|
|
5659
|
-
"bytes":
|
|
5658
|
+
"sha256": "0b5076218e79d165efaa2d4a00d5f6014804e6f04666d223947a4e8c9f9512f5",
|
|
5659
|
+
"bytes": 2418
|
|
5660
5660
|
},
|
|
5661
5661
|
{
|
|
5662
5662
|
"path": "customizations/.github/skills/apex-terraform-import/SKILL.md",
|
|
@@ -5855,13 +5855,13 @@
|
|
|
5855
5855
|
"path": "customizations/manifest.json",
|
|
5856
5856
|
"mapping": "customizations"
|
|
5857
5857
|
},
|
|
5858
|
-
"sha256": "
|
|
5858
|
+
"sha256": "c6f64975501baddd9d1712a7a5169b70ab61a4328fdcba9444c0b20800d05ade",
|
|
5859
5859
|
"bytes": 14078
|
|
5860
5860
|
}
|
|
5861
5861
|
],
|
|
5862
5862
|
"lock": {
|
|
5863
5863
|
"algorithm": "sha256",
|
|
5864
5864
|
"canonicalization": "apex-bundled-assets-v1",
|
|
5865
|
-
"digest": "
|
|
5865
|
+
"digest": "455ee4805ee6e1635feea04cd73745cd358679a791360ba7f6ae24180785a05d"
|
|
5866
5866
|
}
|
|
5867
5867
|
}
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { type ServiceOptions } from "./service.js";
|
|
3
3
|
export declare function execute(argv: string[], root?: string, options?: ServiceOptions): Promise<unknown>;
|
|
4
|
+
export declare function formatHumanResult(args: string[], result: unknown): string;
|
|
4
5
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.js
CHANGED
|
@@ -624,12 +624,14 @@ export async function execute(argv, root = process.cwd(), options = {}) {
|
|
|
624
624
|
}
|
|
625
625
|
async function main() {
|
|
626
626
|
const json = process.argv.includes("--json");
|
|
627
|
+
const verbose = process.argv.includes("--verbose");
|
|
628
|
+
const args = process.argv.slice(2);
|
|
627
629
|
try {
|
|
628
|
-
const result = await execute(
|
|
630
|
+
const result = await execute(args);
|
|
629
631
|
if (result !== undefined)
|
|
630
632
|
process.stdout.write(json
|
|
631
633
|
? `${JSON.stringify({ ok: true, result })}\n`
|
|
632
|
-
: `${typeof result === "string" ? result : JSON.stringify(result, null, 2)}\n`);
|
|
634
|
+
: `${verbose ? (typeof result === "string" ? result : JSON.stringify(result, null, 2)) : formatHumanResult(args, result)}\n`);
|
|
633
635
|
}
|
|
634
636
|
catch (error) {
|
|
635
637
|
const normalized = normalizeError(error);
|
|
@@ -641,6 +643,44 @@ async function main() {
|
|
|
641
643
|
process.exitCode = normalized.exitCode;
|
|
642
644
|
}
|
|
643
645
|
}
|
|
646
|
+
export function formatHumanResult(args, result) {
|
|
647
|
+
const command = args.find((argument) => !argument.startsWith("--"));
|
|
648
|
+
if (command === "status" && result !== null && typeof result === "object") {
|
|
649
|
+
const status = result;
|
|
650
|
+
const task = status.task ?? null;
|
|
651
|
+
const stage = task?.startsWith("requirements")
|
|
652
|
+
? "Requirements"
|
|
653
|
+
: task?.startsWith("architecture") || task?.startsWith("governance")
|
|
654
|
+
? "Architecture"
|
|
655
|
+
: task?.startsWith("plan")
|
|
656
|
+
? "Planning"
|
|
657
|
+
: task?.startsWith("codegen") || task?.startsWith("validation")
|
|
658
|
+
? "Build and validate"
|
|
659
|
+
: task?.startsWith("preview") || task?.startsWith("deploy") || task === "inventory"
|
|
660
|
+
? "Operations"
|
|
661
|
+
: "Ready for next decision";
|
|
662
|
+
const blocker = status.blockers?.[0] ?? "None";
|
|
663
|
+
const next = task !== null ? `Continue ${stage}` : blocker !== "None" ? blocker : "Ask APEX to continue";
|
|
664
|
+
return [
|
|
665
|
+
`Project: ${status.run?.projectId ?? "unknown"} (${status.run?.environment ?? "unknown"})`,
|
|
666
|
+
`Stage: ${stage}`,
|
|
667
|
+
`Blocker: ${blocker}`,
|
|
668
|
+
`Next: ${next}`,
|
|
669
|
+
].join("\n");
|
|
670
|
+
}
|
|
671
|
+
if (command === "doctor" && result !== null && typeof result === "object") {
|
|
672
|
+
const doctor = result;
|
|
673
|
+
const passed = doctor.checks?.filter(({ ok }) => ok).length ?? 0;
|
|
674
|
+
const total = doctor.checks?.length ?? 0;
|
|
675
|
+
const remaining = doctor.remedies?.length ?? 0;
|
|
676
|
+
return [
|
|
677
|
+
`Status: ${doctor.healthy ? "Ready" : "Setup incomplete"} (${passed}/${total} checks ready)`,
|
|
678
|
+
`Next: ${doctor.nextAction ?? "No action required"}`,
|
|
679
|
+
...(remaining > 1 ? [`Later: ${remaining - 1} additional setup item${remaining === 2 ? "" : "s"}`] : []),
|
|
680
|
+
].join("\n");
|
|
681
|
+
}
|
|
682
|
+
return typeof result === "string" ? result : JSON.stringify(result, null, 2);
|
|
683
|
+
}
|
|
644
684
|
if (process.argv[1] !== undefined && (await realpath(process.argv[1])) === (await realpath(new URL(import.meta.url))))
|
|
645
685
|
await main();
|
|
646
686
|
//# sourceMappingURL=cli.js.map
|
package/dist/mcp.js
CHANGED
|
@@ -5,6 +5,14 @@ import { ApexService, SUPPORTED_ARTIFACT_KINDS } from "./service.js";
|
|
|
5
5
|
import { APEX_VERSION } from "./version.js";
|
|
6
6
|
const artifactKind = z.enum(SUPPORTED_ARTIFACT_KINDS);
|
|
7
7
|
const taskOutput = z.object({ kind: artifactKind, value: z.unknown(), summary: z.string().optional() });
|
|
8
|
+
const reviewFinding = z
|
|
9
|
+
.object({
|
|
10
|
+
id: z.string().min(1),
|
|
11
|
+
severity: z.enum(["critical", "high", "medium", "low", "info"]),
|
|
12
|
+
title: z.string().min(1),
|
|
13
|
+
detail: z.string().min(1),
|
|
14
|
+
})
|
|
15
|
+
.strict();
|
|
8
16
|
const uniqueStrings = z
|
|
9
17
|
.array(z.string().min(1))
|
|
10
18
|
.min(1)
|
|
@@ -88,6 +96,21 @@ const gateDecisionInput = z
|
|
|
88
96
|
confirm: z.literal(true),
|
|
89
97
|
})
|
|
90
98
|
.strict();
|
|
99
|
+
const reviewDecisionInput = z
|
|
100
|
+
.object({
|
|
101
|
+
reviewHash: z.string().regex(/^[0-9a-f]{64}$/),
|
|
102
|
+
decisions: z
|
|
103
|
+
.array(z
|
|
104
|
+
.object({
|
|
105
|
+
findingId: z.string().min(1),
|
|
106
|
+
action: z.enum(["revise", "accept-risk"]),
|
|
107
|
+
rationale: z.string().min(1),
|
|
108
|
+
expiresAt: z.string().datetime().optional(),
|
|
109
|
+
})
|
|
110
|
+
.strict())
|
|
111
|
+
.min(1),
|
|
112
|
+
})
|
|
113
|
+
.strict();
|
|
91
114
|
const normalizeOutputs = (outputs) => outputs.map(({ kind, value, summary }) => ({
|
|
92
115
|
kind,
|
|
93
116
|
value,
|
|
@@ -109,6 +132,14 @@ export function createMcpServer(service) {
|
|
|
109
132
|
description: "Read context only for the exact task.taskId returned by nextTask with status=task.",
|
|
110
133
|
inputSchema: { taskId: z.string() },
|
|
111
134
|
}, async ({ taskId }) => result(await service.taskContext(taskId)));
|
|
135
|
+
server.registerTool("readTaskInput", {
|
|
136
|
+
description: "Read a bounded chunk of the accepted source artifact for an active review task.",
|
|
137
|
+
inputSchema: {
|
|
138
|
+
taskId: z.string(),
|
|
139
|
+
offset: z.number().int().nonnegative().optional(),
|
|
140
|
+
limit: z.number().int().min(1).max(6_000).optional(),
|
|
141
|
+
},
|
|
142
|
+
}, async ({ taskId, offset, limit }) => result(await service.readTaskInput(taskId, offset, limit)));
|
|
112
143
|
server.registerTool("recordInput", { description: "Record answers for the exact pending kernel input request", inputSchema: inputSubmission }, async (input) => result(await service.recordInput(input)));
|
|
113
144
|
server.registerTool("projectCreate", {
|
|
114
145
|
description: "Create and select a new project with its initial environment run",
|
|
@@ -124,6 +155,13 @@ export function createMcpServer(service) {
|
|
|
124
155
|
description: "Record an explicitly confirmed human decision for Gate 1, 2, or 3 using the local OS username as actor. Gate 4 remains CLI-only.",
|
|
125
156
|
inputSchema: gateDecisionInput,
|
|
126
157
|
}, async ({ gate, decision }) => result(await service.decideInteractiveGate(gate, decision)));
|
|
158
|
+
server.registerTool("reviewDecide", {
|
|
159
|
+
description: "Resolve all current review findings atomically by requesting revision or accepting permitted time-bound risk.",
|
|
160
|
+
inputSchema: reviewDecisionInput,
|
|
161
|
+
}, async ({ reviewHash, decisions }) => result(await service.decideReview(reviewHash, decisions.map(({ expiresAt, ...decision }) => ({
|
|
162
|
+
...decision,
|
|
163
|
+
...(expiresAt === undefined ? {} : { expiresAt }),
|
|
164
|
+
})))));
|
|
127
165
|
server.registerTool("stageArtifact", {
|
|
128
166
|
inputSchema: {
|
|
129
167
|
taskId: z.string(),
|
|
@@ -178,25 +216,29 @@ export function createMcpServer(service) {
|
|
|
178
216
|
: { kind, value, ...(summary === undefined ? {} : { summary }) }
|
|
179
217
|
: normalizeOutputs(outputs))));
|
|
180
218
|
server.registerTool("completeTask", {
|
|
181
|
-
description: "Complete a task atomically
|
|
219
|
+
description: "Complete a task atomically with a nonempty outputs[] bundle.",
|
|
182
220
|
inputSchema: {
|
|
183
221
|
taskId: z.string(),
|
|
184
|
-
|
|
185
|
-
value: z.unknown().optional(),
|
|
186
|
-
summary: z.string().optional(),
|
|
187
|
-
outputs: z.array(taskOutput).optional(),
|
|
222
|
+
outputs: z.array(taskOutput).min(1),
|
|
188
223
|
},
|
|
189
|
-
}, async ({ taskId,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
224
|
+
}, async ({ taskId, outputs }) => result(await service.completeTaskOutputs(taskId, normalizeOutputs(outputs))));
|
|
225
|
+
server.registerTool("requirementsComplete", {
|
|
226
|
+
description: "Complete the active Requirements task atomically.",
|
|
227
|
+
inputSchema: { taskId: z.string(), requirements: z.unknown() },
|
|
228
|
+
}, async ({ taskId, requirements }) => result(await service.completeRequirements(taskId, requirements)));
|
|
229
|
+
server.registerTool("architectureComplete", {
|
|
230
|
+
description: "Complete the active Architecture task atomically with all required outputs.",
|
|
231
|
+
inputSchema: {
|
|
232
|
+
taskId: z.string(),
|
|
233
|
+
architecture: z.unknown(),
|
|
234
|
+
costEstimate: z.unknown(),
|
|
235
|
+
decisionManifest: z.unknown(),
|
|
236
|
+
},
|
|
237
|
+
}, async ({ taskId, architecture, costEstimate, decisionManifest }) => result(await service.completeArchitecture(taskId, architecture, costEstimate, decisionManifest)));
|
|
238
|
+
server.registerTool("reviewComplete", {
|
|
239
|
+
description: "Complete the active review task; APEX derives subject identity, hash, timestamp, and evidence binding.",
|
|
240
|
+
inputSchema: { taskId: z.string(), findings: z.array(reviewFinding) },
|
|
241
|
+
}, async ({ taskId, findings }) => result(await service.completeReview(taskId, findings)));
|
|
200
242
|
server.registerTool("planComplete", {
|
|
201
243
|
description: "Atomically complete a plan. Derives the canonical implementation intent hash for the binding; do not supply intentHash.",
|
|
202
244
|
inputSchema: planCompletionInput,
|
package/dist/service.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ApprovalEvidenceV1, type ArchitectureAvailabilityV1, type DeploymentPreviewV1, type EnvironmentInputsV1, type IacBindingV1, type InputRequestV1, type InputValueV1, type InputSubmissionV1, type ImprovementCategory, type ImprovementDecisionV1, type ImprovementObservationV1, type ImprovementPolicyV1, type ImprovementProposalV1, type ImprovementSource, type ImplementationIntentV1, type Operation, type ProjectId, type ResourceInventoryV1, type RunConfigV1, type RunId, type TaskEnvelopeV1 } from "@apexops/contracts";
|
|
1
|
+
import { type ApprovalEvidenceV1, type ArchitectureAvailabilityV1, type ArchitectureV1, type CostEstimateV1, type DeploymentPreviewV1, type EnvironmentInputsV1, type IacBindingV1, type InputRequestV1, type InputValueV1, type InputSubmissionV1, type ImprovementCategory, type ImprovementDecisionV1, type ImprovementObservationV1, type ImprovementPolicyV1, type ImprovementProposalV1, type ImprovementSource, type ImplementationIntentV1, type Operation, type ProjectId, type ResourceInventoryV1, type ReviewFindingsV1, type RequirementsV1, type RunConfigV1, type RunId, type WorkloadDecisionManifestV1, type TaskEnvelopeV1 } from "@apexops/contracts";
|
|
2
2
|
import { type CapabilityPackInstallOptions, type IacProvider, type ProcessRunnerLike } from "@apexops/capabilities";
|
|
3
3
|
import { type JsonValue } from "@apexops/kernel";
|
|
4
4
|
import { type BundledClientProjection } from "./assets.js";
|
|
@@ -52,6 +52,12 @@ export interface ReviewResolution {
|
|
|
52
52
|
expiresAt?: string;
|
|
53
53
|
dependencyHash: string;
|
|
54
54
|
}
|
|
55
|
+
export interface ReviewDecision {
|
|
56
|
+
findingId: string;
|
|
57
|
+
action: "revise" | "accept-risk";
|
|
58
|
+
rationale: string;
|
|
59
|
+
expiresAt?: string;
|
|
60
|
+
}
|
|
55
61
|
export interface ServiceOptions {
|
|
56
62
|
clock?: () => Date;
|
|
57
63
|
idSource?: () => string;
|
|
@@ -618,6 +624,9 @@ export declare class ApexService {
|
|
|
618
624
|
nextTask(): Promise<{
|
|
619
625
|
status: "needs_input";
|
|
620
626
|
request: InputRequestV1;
|
|
627
|
+
} | {
|
|
628
|
+
status: "needs_review";
|
|
629
|
+
review: Awaited<ReturnType<ApexService["pendingReview"]>>;
|
|
621
630
|
} | {
|
|
622
631
|
status: "task";
|
|
623
632
|
task: TaskEnvelopeV1;
|
|
@@ -638,6 +647,13 @@ export declare class ApexService {
|
|
|
638
647
|
status: string;
|
|
639
648
|
blockers: string[];
|
|
640
649
|
}>;
|
|
650
|
+
readTaskInput(taskId: string, offset?: number, limit?: number): Promise<{
|
|
651
|
+
subjectHash: string;
|
|
652
|
+
content: string;
|
|
653
|
+
offset: number;
|
|
654
|
+
nextOffset?: number;
|
|
655
|
+
outputTemplate?: unknown;
|
|
656
|
+
}>;
|
|
641
657
|
stageArtifact(taskId: string, output: TaskOutput): Promise<StagedArtifact>;
|
|
642
658
|
stageFile(taskId: string, relativePath: string, content: string | Uint8Array, expectedSha?: string): Promise<StagedFile>;
|
|
643
659
|
generateIac(taskId: string, options?: GenerateIacOptions): Promise<{
|
|
@@ -658,10 +674,23 @@ export declare class ApexService {
|
|
|
658
674
|
outputHashes: Partial<Record<ArtifactKind, string>>;
|
|
659
675
|
summary: string;
|
|
660
676
|
}>;
|
|
677
|
+
completeRequirements(taskId: string, requirements: RequirementsV1): Promise<{
|
|
678
|
+
outputHashes: Partial<Record<ArtifactKind, string>>;
|
|
679
|
+
summary: string;
|
|
680
|
+
}>;
|
|
681
|
+
completeArchitecture(taskId: string, architecture: ArchitectureV1, costEstimate: CostEstimateV1, decisionManifest: WorkloadDecisionManifestV1): Promise<{
|
|
682
|
+
outputHashes: Partial<Record<ArtifactKind, string>>;
|
|
683
|
+
summary: string;
|
|
684
|
+
}>;
|
|
685
|
+
completeReview(taskId: string, findings: Array<Pick<ReviewFindingsV1["findings"][number], "id" | "severity" | "title" | "detail">>): Promise<{
|
|
686
|
+
outputHashes: Partial<Record<ArtifactKind, string>>;
|
|
687
|
+
summary: string;
|
|
688
|
+
}>;
|
|
661
689
|
completePlan(taskId: string, intent: ImplementationIntentV1, binding: Omit<IacBindingV1, "intentHash">, environmentInputs: EnvironmentInputsV1): Promise<{
|
|
662
690
|
outputHashes: Partial<Record<ArtifactKind, string>>;
|
|
663
691
|
summary: string;
|
|
664
692
|
}>;
|
|
693
|
+
private assertTaskType;
|
|
665
694
|
private acceptTaskOutputs;
|
|
666
695
|
private renderRequirementsDocument;
|
|
667
696
|
private requirementsReviewDirectory;
|
|
@@ -680,6 +709,11 @@ export declare class ApexService {
|
|
|
680
709
|
private requirementsDocumentTemplateContent;
|
|
681
710
|
cancelTask(taskId: string): Promise<void>;
|
|
682
711
|
resolveReview(resolution: ReviewResolution): Promise<void>;
|
|
712
|
+
decideReview(reviewHash: string, decisions: ReviewDecision[]): Promise<{
|
|
713
|
+
status: "revision_requested" | "resolved";
|
|
714
|
+
}>;
|
|
715
|
+
private pendingReview;
|
|
716
|
+
private reviseReview;
|
|
683
717
|
private assertReviewResolution;
|
|
684
718
|
decideGateNumber(gateNumber: number, decision: "approved" | "rejected", actor: string, options?: GateDecisionOptions): Promise<ApprovalEvidenceV1>;
|
|
685
719
|
decideInteractiveGate(gateNumber: 1 | 2 | 3, decision: "approved" | "rejected"): Promise<ApprovalEvidenceV1>;
|
|
@@ -754,8 +788,12 @@ export declare class ApexService {
|
|
|
754
788
|
private architectureDecisionValues;
|
|
755
789
|
private issueArchitectureDecision;
|
|
756
790
|
private nextRequirementsIntakeRound;
|
|
791
|
+
private requirementsIntakeCatalog;
|
|
757
792
|
private issueRequirementsInput;
|
|
758
793
|
private requirementsIntakeQuestions;
|
|
794
|
+
private recommendedWorkloadPattern;
|
|
795
|
+
private workloadScalePrompt;
|
|
796
|
+
private recommendedServiceCandidates;
|
|
759
797
|
private append;
|
|
760
798
|
private journal;
|
|
761
799
|
private runPath;
|
|
@@ -806,6 +844,8 @@ export declare class ApexService {
|
|
|
806
844
|
private customizationSelection;
|
|
807
845
|
private assertCleanInitialization;
|
|
808
846
|
private createRuntimeLock;
|
|
847
|
+
private installRuntimeGeneration;
|
|
848
|
+
private runtimeRootForRun;
|
|
809
849
|
private capabilityPacks;
|
|
810
850
|
private runtimeLockChecks;
|
|
811
851
|
private ensureLocalGitBoundary;
|