agent-contracts-runtime 0.31.3 → 0.32.1
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 +77 -96
- package/cli-contract.yaml +411 -22
- package/dist/{chunk-IAIG5VCJ.js → chunk-W5YWUFAH.js} +7 -3
- package/dist/chunk-W5YWUFAH.js.map +1 -0
- package/dist/cli/index.js +1011 -12
- package/dist/cli/index.js.map +1 -1
- package/dist/generator/index.js +1 -1
- package/docs/cli-reference.md +1370 -216
- package/dsl/agent-runtime.config.yaml +2 -0
- package/dsl/agents/implementation-auditor.yaml +195 -0
- package/dsl/agents/llm-feature-implementer.yaml +298 -0
- package/dsl/handoff-types.yaml +184 -0
- package/dsl/implement-dsl.yaml +119 -0
- package/dsl/tasks.yaml +635 -0
- package/package.json +5 -3
- package/templates/implement-reference-templates.md +823 -0
- package/templates/implement-reference.md +240 -0
- package/templates/workflows.ts.hbs +2 -2
- package/dist/chunk-IAIG5VCJ.js.map +0 -1
package/docs/cli-reference.md
CHANGED
|
@@ -15,6 +15,8 @@ then runs workflows through pluggable SDK adapters.
|
|
|
15
15
|
- [run](#agent-runtime-run)
|
|
16
16
|
- [list](#agent-runtime-list)
|
|
17
17
|
- [show-prompt](#agent-runtime-show-prompt)
|
|
18
|
+
- [implement](#agent-runtime-implement)
|
|
19
|
+
- [audit-implementation](#agent-runtime-audit-implementation)
|
|
18
20
|
- [doctor](#agent-runtime-doctor)
|
|
19
21
|
|
|
20
22
|
---
|
|
@@ -95,12 +97,12 @@ agent-runtime init [--adapter] [--output] [--force]
|
|
|
95
97
|
|
|
96
98
|
```yaml
|
|
97
99
|
x-agent:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
riskLevel: low
|
|
101
|
+
requiresConfirmation: false
|
|
100
102
|
idempotent: false
|
|
101
|
-
|
|
103
|
+
sideEffects:
|
|
102
104
|
- filesystem_write
|
|
103
|
-
|
|
105
|
+
safeDryRunOption:
|
|
104
106
|
```
|
|
105
107
|
|
|
106
108
|
---
|
|
@@ -254,12 +256,12 @@ current generated files and expected output.
|
|
|
254
256
|
|
|
255
257
|
```yaml
|
|
256
258
|
x-agent:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
+
riskLevel: low
|
|
260
|
+
requiresConfirmation: false
|
|
259
261
|
idempotent: true
|
|
260
|
-
|
|
262
|
+
sideEffects:
|
|
261
263
|
- filesystem_write
|
|
262
|
-
|
|
264
|
+
safeDryRunOption: check
|
|
263
265
|
```
|
|
264
266
|
|
|
265
267
|
---
|
|
@@ -539,18 +541,22 @@ user-request arguments are read from the file instead of CLI args.
|
|
|
539
541
|
|
|
540
542
|
- **stderr:** format=`text`
|
|
541
543
|
|
|
544
|
+
**Exit 12:** Adapter initialization error (missing API key, etc.).
|
|
545
|
+
|
|
546
|
+
- **stderr:** format=`text`
|
|
547
|
+
|
|
542
548
|
#### Extensions
|
|
543
549
|
|
|
544
550
|
```yaml
|
|
545
551
|
x-agent:
|
|
546
|
-
|
|
547
|
-
|
|
552
|
+
riskLevel: high
|
|
553
|
+
requiresConfirmation: true
|
|
548
554
|
idempotent: false
|
|
549
|
-
|
|
555
|
+
sideEffects:
|
|
550
556
|
- sdk_call
|
|
551
557
|
- filesystem_write
|
|
552
|
-
|
|
553
|
-
|
|
558
|
+
safeDryRunOption: dry-run
|
|
559
|
+
recommendedBeforeUse:
|
|
554
560
|
- Run `agent-runtime generate --check` to ensure contracts are up to date.
|
|
555
561
|
- Run `agent-runtime doctor` to verify SDK configuration.
|
|
556
562
|
```
|
|
@@ -648,10 +654,10 @@ agent-runtime list <resource> [--format]
|
|
|
648
654
|
|
|
649
655
|
```yaml
|
|
650
656
|
x-agent:
|
|
651
|
-
|
|
652
|
-
|
|
657
|
+
riskLevel: low
|
|
658
|
+
requiresConfirmation: false
|
|
653
659
|
idempotent: true
|
|
654
|
-
|
|
660
|
+
sideEffects:
|
|
655
661
|
|
|
656
662
|
```
|
|
657
663
|
|
|
@@ -749,45 +755,71 @@ agent-runtime show-prompt <task-id> [--user-request] [--format] [--with-plugins]
|
|
|
749
755
|
|
|
750
756
|
```yaml
|
|
751
757
|
x-agent:
|
|
752
|
-
|
|
753
|
-
|
|
758
|
+
riskLevel: low
|
|
759
|
+
requiresConfirmation: false
|
|
754
760
|
idempotent: true
|
|
755
|
-
|
|
761
|
+
sideEffects:
|
|
756
762
|
|
|
757
763
|
```
|
|
758
764
|
|
|
759
765
|
---
|
|
760
766
|
|
|
761
|
-
###
|
|
767
|
+
### implement
|
|
762
768
|
|
|
763
|
-
|
|
769
|
+
Implement LLM-powered commands in a CLI tool.
|
|
764
770
|
|
|
765
|
-
|
|
766
|
-
|
|
771
|
+
Uses an agentic LLM adapter (Claude, Cursor, etc.) to analyze the
|
|
772
|
+
target project and implement LLM-powered commands following the
|
|
773
|
+
agent-contracts + agent-contracts-runtime + cli-contracts stack.
|
|
767
774
|
|
|
768
|
-
|
|
769
|
-
|
|
775
|
+
The agent reads the project structure, cli-contract.yaml, and existing
|
|
776
|
+
code, then generates DSL definitions, TypeScript modules (orchestrator,
|
|
777
|
+
context-builder, formatter), CLI command handlers, and updates the
|
|
778
|
+
CLI contract with x-agent metadata.
|
|
779
|
+
|
|
780
|
+
Requires an agentic adapter that supports tool use (file read/write).
|
|
770
781
|
|
|
771
782
|
|
|
772
783
|
**Usage:**
|
|
773
784
|
|
|
774
785
|
```
|
|
775
|
-
agent-runtime
|
|
786
|
+
agent-runtime implement <description> [--adapter] [--project-dir] [--dry-run] [--model] [--fail-on] [--output] [--report-format]
|
|
776
787
|
```
|
|
777
788
|
|
|
789
|
+
#### Arguments
|
|
790
|
+
|
|
791
|
+
| Name | Required | Description |
|
|
792
|
+
|---|---|---|
|
|
793
|
+
| `description` | Yes | Natural language description of the LLM feature(s) to implement. Examples: "Add an audit command for migration safety", "Add propose and explain commands for SQL optimization". |
|
|
794
|
+
|
|
795
|
+
#### Options
|
|
796
|
+
|
|
797
|
+
| Option | Aliases | Required | Default | Description |
|
|
798
|
+
|---|---|---|---|---|
|
|
799
|
+
| `--adapter` | -a | No | `"claude"` | SDK adapter to use. Must be an agentic adapter (claude, cursor). |
|
|
800
|
+
| `--project-dir` | -p | No | `"."` | Path to the target project directory. |
|
|
801
|
+
| `--dry-run` | -n | No | `false` | Output the prompt context without calling the LLM. |
|
|
802
|
+
| `--model` | | No | | Model name override for the selected adapter. |
|
|
803
|
+
| `--fail-on` | | No | `"error"` | Minimum finding severity that causes a non-zero exit. |
|
|
804
|
+
| `--output` | -o | No | | Write the result to a file instead of stdout. |
|
|
805
|
+
| `--report-format` | | No | `"text"` | Output format for the result. |
|
|
806
|
+
|
|
778
807
|
#### Exit Codes
|
|
779
808
|
|
|
780
|
-
**Exit 0:**
|
|
809
|
+
**Exit 0:** Implementation completed successfully.
|
|
781
810
|
|
|
782
811
|
- **stdout:** format=`json`
|
|
783
812
|
|
|
784
813
|
| Property | Type | Required | Description |
|
|
785
814
|
|---|---|---|---|
|
|
786
|
-
| `
|
|
787
|
-
| `
|
|
788
|
-
| `
|
|
789
|
-
| `
|
|
790
|
-
| `
|
|
815
|
+
| `files_created` | `string[]` | Yes | List of new files created. |
|
|
816
|
+
| `files_modified` | `string[]` | Yes | List of existing files modified. |
|
|
817
|
+
| `summary` | `string` | Yes | Human-readable summary of what was implemented. |
|
|
818
|
+
| `commands_added` | `object[]` | No | |
|
|
819
|
+
| `commands_added[].name` | `string` | Yes | |
|
|
820
|
+
| `commands_added[].type` | `"audit" \| "propose" \| "explain"` | Yes | |
|
|
821
|
+
| `commands_added[].description` | `string` | No | |
|
|
822
|
+
| `next_steps` | `string[]` | No | Recommended next steps for the developer. |
|
|
791
823
|
|
|
792
824
|
<details>
|
|
793
825
|
<summary>JSON Schema</summary>
|
|
@@ -796,40 +828,61 @@ agent-runtime doctor
|
|
|
796
828
|
{
|
|
797
829
|
"type": "object",
|
|
798
830
|
"required": [
|
|
799
|
-
"
|
|
800
|
-
"
|
|
831
|
+
"files_created",
|
|
832
|
+
"files_modified",
|
|
833
|
+
"summary"
|
|
801
834
|
],
|
|
802
835
|
"properties": {
|
|
803
|
-
"
|
|
836
|
+
"files_created": {
|
|
837
|
+
"type": "array",
|
|
838
|
+
"items": {
|
|
839
|
+
"type": "string"
|
|
840
|
+
},
|
|
841
|
+
"description": "List of new files created."
|
|
842
|
+
},
|
|
843
|
+
"files_modified": {
|
|
844
|
+
"type": "array",
|
|
845
|
+
"items": {
|
|
846
|
+
"type": "string"
|
|
847
|
+
},
|
|
848
|
+
"description": "List of existing files modified."
|
|
849
|
+
},
|
|
850
|
+
"summary": {
|
|
851
|
+
"type": "string",
|
|
852
|
+
"description": "Human-readable summary of what was implemented."
|
|
853
|
+
},
|
|
854
|
+
"commands_added": {
|
|
804
855
|
"type": "array",
|
|
805
856
|
"items": {
|
|
806
857
|
"type": "object",
|
|
807
858
|
"required": [
|
|
808
859
|
"name",
|
|
809
|
-
"
|
|
860
|
+
"type"
|
|
810
861
|
],
|
|
811
862
|
"properties": {
|
|
812
863
|
"name": {
|
|
813
|
-
"type": "string"
|
|
814
|
-
"description": "Check name (e.g. config_exists, dsl_exists, manifest_fresh)."
|
|
864
|
+
"type": "string"
|
|
815
865
|
},
|
|
816
|
-
"
|
|
866
|
+
"type": {
|
|
817
867
|
"type": "string",
|
|
818
868
|
"enum": [
|
|
819
|
-
"
|
|
820
|
-
"
|
|
821
|
-
"
|
|
869
|
+
"audit",
|
|
870
|
+
"propose",
|
|
871
|
+
"explain"
|
|
822
872
|
]
|
|
823
873
|
},
|
|
824
|
-
"
|
|
825
|
-
"type": "string"
|
|
826
|
-
"description": "Human-readable detail."
|
|
874
|
+
"description": {
|
|
875
|
+
"type": "string"
|
|
827
876
|
}
|
|
828
877
|
}
|
|
829
878
|
}
|
|
830
879
|
},
|
|
831
|
-
"
|
|
832
|
-
"type": "
|
|
880
|
+
"next_steps": {
|
|
881
|
+
"type": "array",
|
|
882
|
+
"items": {
|
|
883
|
+
"type": "string"
|
|
884
|
+
},
|
|
885
|
+
"description": "Recommended next steps for the developer."
|
|
833
886
|
}
|
|
834
887
|
}
|
|
835
888
|
}
|
|
@@ -837,17 +890,118 @@ agent-runtime doctor
|
|
|
837
890
|
|
|
838
891
|
</details>
|
|
839
892
|
|
|
840
|
-
**Exit 1:**
|
|
893
|
+
**Exit 1:** Implementation failed.
|
|
894
|
+
|
|
895
|
+
- **stderr:** format=`text`
|
|
896
|
+
|
|
897
|
+
**Exit 3:** Input validation failed (e.g. project directory not found).
|
|
898
|
+
|
|
899
|
+
- **stderr:** format=`text`
|
|
900
|
+
|
|
901
|
+
**Exit 12:** Adapter initialization error.
|
|
902
|
+
|
|
903
|
+
- **stderr:** format=`text`
|
|
904
|
+
|
|
905
|
+
#### Extensions
|
|
906
|
+
|
|
907
|
+
```yaml
|
|
908
|
+
x-agent:
|
|
909
|
+
riskLevel: high
|
|
910
|
+
requiresConfirmation: true
|
|
911
|
+
idempotent: false
|
|
912
|
+
sideEffects:
|
|
913
|
+
- sdk_call
|
|
914
|
+
- filesystem_write
|
|
915
|
+
safeDryRunOption: dry-run
|
|
916
|
+
expectedDurationMs: 300000
|
|
917
|
+
retryableExitCodes:
|
|
918
|
+
- 1
|
|
919
|
+
- 12
|
|
920
|
+
recommendedBeforeUse:
|
|
921
|
+
- Ensure the target project has a cli-contract.yaml or plan to create one.
|
|
922
|
+
- Run in a clean git working tree so changes can be reviewed.
|
|
923
|
+
```
|
|
924
|
+
|
|
925
|
+
---
|
|
926
|
+
|
|
927
|
+
### audit-implementation
|
|
928
|
+
|
|
929
|
+
Audit an LLM command integration for pattern conformance.
|
|
930
|
+
|
|
931
|
+
Analyzes a target project's LLM command integration to verify it
|
|
932
|
+
correctly follows the agent-contracts + agent-contracts-runtime +
|
|
933
|
+
cli-contracts stack conventions.
|
|
934
|
+
|
|
935
|
+
Checks all three layers:
|
|
936
|
+
1. DSL definitions (agents, tasks, workflows, handoff schemas)
|
|
937
|
+
2. Runtime integration (adapter usage, runTask/runWorkflow, registries)
|
|
938
|
+
3. CLI contract (standard options, x-agent metadata, exit codes)
|
|
939
|
+
|
|
940
|
+
Produces structured findings with severity, category, and
|
|
941
|
+
concrete remediation steps. Read-only — does not modify files.
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
**Usage:**
|
|
945
|
+
|
|
946
|
+
```
|
|
947
|
+
agent-runtime audit-implementation [project-dir] [--adapter] [--focus] [--dry-run] [--fail-on] [--model] [--output] [--report-format]
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
#### Arguments
|
|
951
|
+
|
|
952
|
+
| Name | Required | Description |
|
|
953
|
+
|---|---|---|
|
|
954
|
+
| `project-dir` | No | Path to the project directory to audit. Defaults to current directory. |
|
|
955
|
+
|
|
956
|
+
#### Options
|
|
957
|
+
|
|
958
|
+
| Option | Aliases | Required | Default | Description |
|
|
959
|
+
|---|---|---|---|---|
|
|
960
|
+
| `--adapter` | -a | No | `"claude"` | SDK adapter to use for the audit agent. |
|
|
961
|
+
| `--focus` | | No | `"all"` | Limit audit to a specific layer. Defaults to all layers. |
|
|
962
|
+
| `--dry-run` | -n | No | `false` | Output the prompt context without calling the LLM. |
|
|
963
|
+
| `--fail-on` | | No | `"error"` | Minimum finding severity that causes a non-zero exit. |
|
|
964
|
+
| `--model` | | No | | Model name override for the selected adapter. |
|
|
965
|
+
| `--output` | -o | No | | Write the result to a file instead of stdout. |
|
|
966
|
+
| `--report-format` | | No | `"text"` | Output format for the audit report. |
|
|
967
|
+
|
|
968
|
+
#### Exit Codes
|
|
969
|
+
|
|
970
|
+
**Exit 0:** Audit completed with no findings above threshold.
|
|
841
971
|
|
|
842
972
|
- **stdout:** format=`json`
|
|
843
973
|
|
|
844
974
|
| Property | Type | Required | Description |
|
|
845
975
|
|---|---|---|---|
|
|
846
|
-
| `
|
|
847
|
-
| `
|
|
848
|
-
| `
|
|
849
|
-
| `
|
|
850
|
-
| `
|
|
976
|
+
| `summary` | `string` | Yes | One-paragraph overall assessment. |
|
|
977
|
+
| `riskLevel` | `"low" \| "medium" \| "high" \| "critical"` | Yes | Derived from worst finding severity. |
|
|
978
|
+
| `findings` | `object[]` | Yes | |
|
|
979
|
+
| `findings[].id` | `string` | No | Unique finding identifier (e.g. F-001). |
|
|
980
|
+
| `findings[].severity` | `"info" \| "warning" \| "error" \| "critical"` | Yes | |
|
|
981
|
+
| `findings[].category` | `string` | Yes | Domain vocabulary category (e.g. cli-contract-options, runtime-adapter). |
|
|
982
|
+
| `findings[].target` | `string` | No | File path or resource the finding applies to. |
|
|
983
|
+
| `findings[].location` | `string` | No | Line range or specific location within the target. |
|
|
984
|
+
| `findings[].message` | `string` | Yes | Human-readable description of the finding. |
|
|
985
|
+
| `findings[].recommendation` | `string` | No | Concrete remediation step. |
|
|
986
|
+
| `findings[].confidence` | `number (min: 0, max: 1)` | No | Confidence score (0–1) for the finding. |
|
|
987
|
+
| `findings[].evidence` | `object[]` | No | |
|
|
988
|
+
| `findings[].evidence[].type` | `string` | Yes | Evidence type (e.g. code_snippet, file_excerpt, lint_output). |
|
|
989
|
+
| `findings[].evidence[].content` | `string` | Yes | The evidence content. |
|
|
990
|
+
| `findings[].evidence[].source` | `string` | No | Source file path or URL for the evidence. |
|
|
991
|
+
| `findings[].details` | `object` | No | Additional structured details specific to the finding category. |
|
|
992
|
+
| `recommendedActions` | `object[]` | No | |
|
|
993
|
+
| `recommendedActions[].kind` | `enum(6 values)` | Yes | |
|
|
994
|
+
| `recommendedActions[].title` | `string` | Yes | Short human-readable title for the action. |
|
|
995
|
+
| `recommendedActions[].command` | `string` | No | Shell command to run (when kind is run_command). |
|
|
996
|
+
| `recommendedActions[].target` | `string` | No | File path to edit (when kind is edit_file). |
|
|
997
|
+
| `recommendedActions[].rationale` | `string` | No | Explanation of why this action is recommended. |
|
|
998
|
+
| `metadata` | `object` | No | |
|
|
999
|
+
| `metadata.tool` | `string` | No | |
|
|
1000
|
+
| `metadata.command` | `string` | No | |
|
|
1001
|
+
| `metadata.version` | `string` | No | |
|
|
1002
|
+
| `metadata.generatedAt` | `string` | No | |
|
|
1003
|
+
| `metadata.adapter` | `string` | No | |
|
|
1004
|
+
| `metadata.model` | `string` | No | |
|
|
851
1005
|
|
|
852
1006
|
<details>
|
|
853
1007
|
<summary>JSON Schema</summary>
|
|
@@ -856,40 +1010,166 @@ agent-runtime doctor
|
|
|
856
1010
|
{
|
|
857
1011
|
"type": "object",
|
|
858
1012
|
"required": [
|
|
859
|
-
"
|
|
860
|
-
"
|
|
1013
|
+
"summary",
|
|
1014
|
+
"riskLevel",
|
|
1015
|
+
"findings"
|
|
861
1016
|
],
|
|
862
1017
|
"properties": {
|
|
863
|
-
"
|
|
1018
|
+
"summary": {
|
|
1019
|
+
"type": "string",
|
|
1020
|
+
"description": "One-paragraph overall assessment."
|
|
1021
|
+
},
|
|
1022
|
+
"riskLevel": {
|
|
1023
|
+
"type": "string",
|
|
1024
|
+
"enum": [
|
|
1025
|
+
"low",
|
|
1026
|
+
"medium",
|
|
1027
|
+
"high",
|
|
1028
|
+
"critical"
|
|
1029
|
+
],
|
|
1030
|
+
"description": "Derived from worst finding severity."
|
|
1031
|
+
},
|
|
1032
|
+
"findings": {
|
|
864
1033
|
"type": "array",
|
|
865
1034
|
"items": {
|
|
866
1035
|
"type": "object",
|
|
867
1036
|
"required": [
|
|
868
|
-
"
|
|
869
|
-
"
|
|
1037
|
+
"severity",
|
|
1038
|
+
"category",
|
|
1039
|
+
"message"
|
|
870
1040
|
],
|
|
871
1041
|
"properties": {
|
|
872
|
-
"
|
|
1042
|
+
"id": {
|
|
873
1043
|
"type": "string",
|
|
874
|
-
"description": "
|
|
1044
|
+
"description": "Unique finding identifier (e.g. F-001)."
|
|
875
1045
|
},
|
|
876
|
-
"
|
|
1046
|
+
"severity": {
|
|
877
1047
|
"type": "string",
|
|
878
1048
|
"enum": [
|
|
879
|
-
"
|
|
880
|
-
"
|
|
881
|
-
"
|
|
1049
|
+
"info",
|
|
1050
|
+
"warning",
|
|
1051
|
+
"error",
|
|
1052
|
+
"critical"
|
|
882
1053
|
]
|
|
883
1054
|
},
|
|
1055
|
+
"category": {
|
|
1056
|
+
"type": "string",
|
|
1057
|
+
"description": "Domain vocabulary category (e.g. cli-contract-options, runtime-adapter)."
|
|
1058
|
+
},
|
|
1059
|
+
"target": {
|
|
1060
|
+
"type": "string",
|
|
1061
|
+
"description": "File path or resource the finding applies to."
|
|
1062
|
+
},
|
|
1063
|
+
"location": {
|
|
1064
|
+
"type": "string",
|
|
1065
|
+
"description": "Line range or specific location within the target."
|
|
1066
|
+
},
|
|
884
1067
|
"message": {
|
|
885
1068
|
"type": "string",
|
|
886
|
-
"description": "Human-readable
|
|
1069
|
+
"description": "Human-readable description of the finding."
|
|
1070
|
+
},
|
|
1071
|
+
"recommendation": {
|
|
1072
|
+
"type": "string",
|
|
1073
|
+
"description": "Concrete remediation step."
|
|
1074
|
+
},
|
|
1075
|
+
"confidence": {
|
|
1076
|
+
"type": "number",
|
|
1077
|
+
"minimum": 0,
|
|
1078
|
+
"maximum": 1,
|
|
1079
|
+
"description": "Confidence score (0–1) for the finding."
|
|
1080
|
+
},
|
|
1081
|
+
"evidence": {
|
|
1082
|
+
"type": "array",
|
|
1083
|
+
"items": {
|
|
1084
|
+
"type": "object",
|
|
1085
|
+
"required": [
|
|
1086
|
+
"type",
|
|
1087
|
+
"content"
|
|
1088
|
+
],
|
|
1089
|
+
"properties": {
|
|
1090
|
+
"type": {
|
|
1091
|
+
"type": "string",
|
|
1092
|
+
"description": "Evidence type (e.g. code_snippet, file_excerpt, lint_output)."
|
|
1093
|
+
},
|
|
1094
|
+
"content": {
|
|
1095
|
+
"type": "string",
|
|
1096
|
+
"description": "The evidence content."
|
|
1097
|
+
},
|
|
1098
|
+
"source": {
|
|
1099
|
+
"type": "string",
|
|
1100
|
+
"description": "Source file path or URL for the evidence."
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
1105
|
+
"details": {
|
|
1106
|
+
"type": "object",
|
|
1107
|
+
"description": "Additional structured details specific to the finding category."
|
|
887
1108
|
}
|
|
888
1109
|
}
|
|
889
1110
|
}
|
|
890
1111
|
},
|
|
891
|
-
"
|
|
892
|
-
"type": "
|
|
1112
|
+
"recommendedActions": {
|
|
1113
|
+
"type": "array",
|
|
1114
|
+
"items": {
|
|
1115
|
+
"type": "object",
|
|
1116
|
+
"required": [
|
|
1117
|
+
"kind",
|
|
1118
|
+
"title"
|
|
1119
|
+
],
|
|
1120
|
+
"properties": {
|
|
1121
|
+
"kind": {
|
|
1122
|
+
"type": "string",
|
|
1123
|
+
"enum": [
|
|
1124
|
+
"run_command",
|
|
1125
|
+
"edit_file",
|
|
1126
|
+
"review",
|
|
1127
|
+
"confirm",
|
|
1128
|
+
"block",
|
|
1129
|
+
"ignore"
|
|
1130
|
+
]
|
|
1131
|
+
},
|
|
1132
|
+
"title": {
|
|
1133
|
+
"type": "string",
|
|
1134
|
+
"description": "Short human-readable title for the action."
|
|
1135
|
+
},
|
|
1136
|
+
"command": {
|
|
1137
|
+
"type": "string",
|
|
1138
|
+
"description": "Shell command to run (when kind is run_command)."
|
|
1139
|
+
},
|
|
1140
|
+
"target": {
|
|
1141
|
+
"type": "string",
|
|
1142
|
+
"description": "File path to edit (when kind is edit_file)."
|
|
1143
|
+
},
|
|
1144
|
+
"rationale": {
|
|
1145
|
+
"type": "string",
|
|
1146
|
+
"description": "Explanation of why this action is recommended."
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
},
|
|
1151
|
+
"metadata": {
|
|
1152
|
+
"type": "object",
|
|
1153
|
+
"properties": {
|
|
1154
|
+
"tool": {
|
|
1155
|
+
"type": "string"
|
|
1156
|
+
},
|
|
1157
|
+
"command": {
|
|
1158
|
+
"type": "string"
|
|
1159
|
+
},
|
|
1160
|
+
"version": {
|
|
1161
|
+
"type": "string"
|
|
1162
|
+
},
|
|
1163
|
+
"generatedAt": {
|
|
1164
|
+
"type": "string"
|
|
1165
|
+
},
|
|
1166
|
+
"adapter": {
|
|
1167
|
+
"type": "string"
|
|
1168
|
+
},
|
|
1169
|
+
"model": {
|
|
1170
|
+
"type": "string"
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
893
1173
|
}
|
|
894
1174
|
}
|
|
895
1175
|
}
|
|
@@ -897,77 +1177,457 @@ agent-runtime doctor
|
|
|
897
1177
|
|
|
898
1178
|
</details>
|
|
899
1179
|
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
```yaml
|
|
903
|
-
x-agent:
|
|
904
|
-
risk_level: low
|
|
905
|
-
requires_confirmation: false
|
|
906
|
-
idempotent: true
|
|
907
|
-
side_effects:
|
|
908
|
-
|
|
909
|
-
```
|
|
1180
|
+
**Exit 1:** Audit failed (agent error, unexpected failure).
|
|
910
1181
|
|
|
911
|
-
|
|
1182
|
+
- **stderr:** format=`text`
|
|
912
1183
|
|
|
913
|
-
|
|
1184
|
+
**Exit 3:** Input validation failed (e.g. project directory not found).
|
|
914
1185
|
|
|
915
|
-
|
|
1186
|
+
- **stderr:** format=`text`
|
|
916
1187
|
|
|
917
|
-
|
|
1188
|
+
**Exit 10:** Audit completed with findings above --fail-on threshold.
|
|
918
1189
|
|
|
919
|
-
|
|
1190
|
+
- **stdout:** format=`json`
|
|
920
1191
|
|
|
921
|
-
| Property | Type | Required | Description |
|
|
922
|
-
|---|---|---|---|
|
|
923
|
-
| `
|
|
1192
|
+
| Property | Type | Required | Description |
|
|
1193
|
+
|---|---|---|---|
|
|
1194
|
+
| `summary` | `string` | Yes | One-paragraph overall assessment. |
|
|
1195
|
+
| `riskLevel` | `"low" \| "medium" \| "high" \| "critical"` | Yes | Derived from worst finding severity. |
|
|
1196
|
+
| `findings` | `object[]` | Yes | |
|
|
1197
|
+
| `findings[].id` | `string` | No | Unique finding identifier (e.g. F-001). |
|
|
1198
|
+
| `findings[].severity` | `"info" \| "warning" \| "error" \| "critical"` | Yes | |
|
|
1199
|
+
| `findings[].category` | `string` | Yes | Domain vocabulary category (e.g. cli-contract-options, runtime-adapter). |
|
|
1200
|
+
| `findings[].target` | `string` | No | File path or resource the finding applies to. |
|
|
1201
|
+
| `findings[].location` | `string` | No | Line range or specific location within the target. |
|
|
1202
|
+
| `findings[].message` | `string` | Yes | Human-readable description of the finding. |
|
|
1203
|
+
| `findings[].recommendation` | `string` | No | Concrete remediation step. |
|
|
1204
|
+
| `findings[].confidence` | `number (min: 0, max: 1)` | No | Confidence score (0–1) for the finding. |
|
|
1205
|
+
| `findings[].evidence` | `object[]` | No | |
|
|
1206
|
+
| `findings[].evidence[].type` | `string` | Yes | Evidence type (e.g. code_snippet, file_excerpt, lint_output). |
|
|
1207
|
+
| `findings[].evidence[].content` | `string` | Yes | The evidence content. |
|
|
1208
|
+
| `findings[].evidence[].source` | `string` | No | Source file path or URL for the evidence. |
|
|
1209
|
+
| `findings[].details` | `object` | No | Additional structured details specific to the finding category. |
|
|
1210
|
+
| `recommendedActions` | `object[]` | No | |
|
|
1211
|
+
| `recommendedActions[].kind` | `enum(6 values)` | Yes | |
|
|
1212
|
+
| `recommendedActions[].title` | `string` | Yes | Short human-readable title for the action. |
|
|
1213
|
+
| `recommendedActions[].command` | `string` | No | Shell command to run (when kind is run_command). |
|
|
1214
|
+
| `recommendedActions[].target` | `string` | No | File path to edit (when kind is edit_file). |
|
|
1215
|
+
| `recommendedActions[].rationale` | `string` | No | Explanation of why this action is recommended. |
|
|
1216
|
+
| `metadata` | `object` | No | |
|
|
1217
|
+
| `metadata.tool` | `string` | No | |
|
|
1218
|
+
| `metadata.command` | `string` | No | |
|
|
1219
|
+
| `metadata.version` | `string` | No | |
|
|
1220
|
+
| `metadata.generatedAt` | `string` | No | |
|
|
1221
|
+
| `metadata.adapter` | `string` | No | |
|
|
1222
|
+
| `metadata.model` | `string` | No | |
|
|
924
1223
|
|
|
925
|
-
<details>
|
|
926
|
-
<summary>JSON Schema</summary>
|
|
1224
|
+
<details>
|
|
1225
|
+
<summary>JSON Schema</summary>
|
|
927
1226
|
|
|
928
|
-
```json
|
|
929
|
-
{
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
"
|
|
938
|
-
"type": "string"
|
|
1227
|
+
```json
|
|
1228
|
+
{
|
|
1229
|
+
"type": "object",
|
|
1230
|
+
"required": [
|
|
1231
|
+
"summary",
|
|
1232
|
+
"riskLevel",
|
|
1233
|
+
"findings"
|
|
1234
|
+
],
|
|
1235
|
+
"properties": {
|
|
1236
|
+
"summary": {
|
|
1237
|
+
"type": "string",
|
|
1238
|
+
"description": "One-paragraph overall assessment."
|
|
939
1239
|
},
|
|
940
|
-
"
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1240
|
+
"riskLevel": {
|
|
1241
|
+
"type": "string",
|
|
1242
|
+
"enum": [
|
|
1243
|
+
"low",
|
|
1244
|
+
"medium",
|
|
1245
|
+
"high",
|
|
1246
|
+
"critical"
|
|
1247
|
+
],
|
|
1248
|
+
"description": "Derived from worst finding severity."
|
|
1249
|
+
},
|
|
1250
|
+
"findings": {
|
|
1251
|
+
"type": "array",
|
|
1252
|
+
"items": {
|
|
1253
|
+
"type": "object",
|
|
1254
|
+
"required": [
|
|
1255
|
+
"severity",
|
|
1256
|
+
"category",
|
|
1257
|
+
"message"
|
|
1258
|
+
],
|
|
1259
|
+
"properties": {
|
|
1260
|
+
"id": {
|
|
1261
|
+
"type": "string",
|
|
1262
|
+
"description": "Unique finding identifier (e.g. F-001)."
|
|
1263
|
+
},
|
|
1264
|
+
"severity": {
|
|
1265
|
+
"type": "string",
|
|
1266
|
+
"enum": [
|
|
1267
|
+
"info",
|
|
1268
|
+
"warning",
|
|
1269
|
+
"error",
|
|
1270
|
+
"critical"
|
|
1271
|
+
]
|
|
1272
|
+
},
|
|
1273
|
+
"category": {
|
|
1274
|
+
"type": "string",
|
|
1275
|
+
"description": "Domain vocabulary category (e.g. cli-contract-options, runtime-adapter)."
|
|
1276
|
+
},
|
|
1277
|
+
"target": {
|
|
1278
|
+
"type": "string",
|
|
1279
|
+
"description": "File path or resource the finding applies to."
|
|
1280
|
+
},
|
|
1281
|
+
"location": {
|
|
1282
|
+
"type": "string",
|
|
1283
|
+
"description": "Line range or specific location within the target."
|
|
1284
|
+
},
|
|
1285
|
+
"message": {
|
|
1286
|
+
"type": "string",
|
|
1287
|
+
"description": "Human-readable description of the finding."
|
|
1288
|
+
},
|
|
1289
|
+
"recommendation": {
|
|
1290
|
+
"type": "string",
|
|
1291
|
+
"description": "Concrete remediation step."
|
|
1292
|
+
},
|
|
1293
|
+
"confidence": {
|
|
1294
|
+
"type": "number",
|
|
1295
|
+
"minimum": 0,
|
|
1296
|
+
"maximum": 1,
|
|
1297
|
+
"description": "Confidence score (0–1) for the finding."
|
|
1298
|
+
},
|
|
1299
|
+
"evidence": {
|
|
1300
|
+
"type": "array",
|
|
1301
|
+
"items": {
|
|
1302
|
+
"type": "object",
|
|
1303
|
+
"required": [
|
|
1304
|
+
"type",
|
|
1305
|
+
"content"
|
|
1306
|
+
],
|
|
1307
|
+
"properties": {
|
|
1308
|
+
"type": {
|
|
1309
|
+
"type": "string",
|
|
1310
|
+
"description": "Evidence type (e.g. code_snippet, file_excerpt, lint_output)."
|
|
1311
|
+
},
|
|
1312
|
+
"content": {
|
|
1313
|
+
"type": "string",
|
|
1314
|
+
"description": "The evidence content."
|
|
1315
|
+
},
|
|
1316
|
+
"source": {
|
|
1317
|
+
"type": "string",
|
|
1318
|
+
"description": "Source file path or URL for the evidence."
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
"details": {
|
|
1324
|
+
"type": "object",
|
|
1325
|
+
"description": "Additional structured details specific to the finding category."
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
},
|
|
1330
|
+
"recommendedActions": {
|
|
1331
|
+
"type": "array",
|
|
1332
|
+
"items": {
|
|
1333
|
+
"type": "object",
|
|
1334
|
+
"required": [
|
|
1335
|
+
"kind",
|
|
1336
|
+
"title"
|
|
1337
|
+
],
|
|
1338
|
+
"properties": {
|
|
1339
|
+
"kind": {
|
|
1340
|
+
"type": "string",
|
|
1341
|
+
"enum": [
|
|
1342
|
+
"run_command",
|
|
1343
|
+
"edit_file",
|
|
1344
|
+
"review",
|
|
1345
|
+
"confirm",
|
|
1346
|
+
"block",
|
|
1347
|
+
"ignore"
|
|
1348
|
+
]
|
|
1349
|
+
},
|
|
1350
|
+
"title": {
|
|
1351
|
+
"type": "string",
|
|
1352
|
+
"description": "Short human-readable title for the action."
|
|
1353
|
+
},
|
|
1354
|
+
"command": {
|
|
1355
|
+
"type": "string",
|
|
1356
|
+
"description": "Shell command to run (when kind is run_command)."
|
|
1357
|
+
},
|
|
1358
|
+
"target": {
|
|
1359
|
+
"type": "string",
|
|
1360
|
+
"description": "File path to edit (when kind is edit_file)."
|
|
1361
|
+
},
|
|
1362
|
+
"rationale": {
|
|
1363
|
+
"type": "string",
|
|
1364
|
+
"description": "Explanation of why this action is recommended."
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
"metadata": {
|
|
1370
|
+
"type": "object",
|
|
1371
|
+
"properties": {
|
|
1372
|
+
"tool": {
|
|
1373
|
+
"type": "string"
|
|
1374
|
+
},
|
|
1375
|
+
"command": {
|
|
1376
|
+
"type": "string"
|
|
1377
|
+
},
|
|
1378
|
+
"version": {
|
|
1379
|
+
"type": "string"
|
|
1380
|
+
},
|
|
1381
|
+
"generatedAt": {
|
|
1382
|
+
"type": "string"
|
|
1383
|
+
},
|
|
1384
|
+
"adapter": {
|
|
1385
|
+
"type": "string"
|
|
1386
|
+
},
|
|
1387
|
+
"model": {
|
|
1388
|
+
"type": "string"
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
```
|
|
1395
|
+
|
|
1396
|
+
</details>
|
|
1397
|
+
|
|
1398
|
+
**Exit 12:** Adapter initialization error.
|
|
1399
|
+
|
|
1400
|
+
- **stderr:** format=`text`
|
|
1401
|
+
|
|
1402
|
+
#### Extensions
|
|
1403
|
+
|
|
1404
|
+
```yaml
|
|
1405
|
+
x-agent:
|
|
1406
|
+
riskLevel: low
|
|
1407
|
+
requiresConfirmation: false
|
|
1408
|
+
idempotent: true
|
|
1409
|
+
sideEffects:
|
|
1410
|
+
- network
|
|
1411
|
+
sideEffectNote: Network calls to LLM provider when adapter is not mock. Filesystem write only when --output is specified.
|
|
1412
|
+
safeDryRunOption: dry-run
|
|
1413
|
+
expectedDurationMs: 180000
|
|
1414
|
+
retryableExitCodes:
|
|
1415
|
+
- 1
|
|
1416
|
+
- 12
|
|
1417
|
+
```
|
|
1418
|
+
|
|
1419
|
+
---
|
|
1420
|
+
|
|
1421
|
+
### doctor
|
|
1422
|
+
|
|
1423
|
+
Verify configuration, generated files, and SDK connectivity.
|
|
1424
|
+
|
|
1425
|
+
Runs a series of diagnostic checks to verify that the project
|
|
1426
|
+
is correctly configured for agent-runtime execution.
|
|
1427
|
+
|
|
1428
|
+
Checks: config existence, DSL existence, generated manifest freshness,
|
|
1429
|
+
adapter configuration, API key environment variables, plugin entrypoint.
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
**Usage:**
|
|
1433
|
+
|
|
1434
|
+
```
|
|
1435
|
+
agent-runtime doctor
|
|
1436
|
+
```
|
|
1437
|
+
|
|
1438
|
+
#### Exit Codes
|
|
1439
|
+
|
|
1440
|
+
**Exit 0:** All checks passed.
|
|
1441
|
+
|
|
1442
|
+
- **stdout:** format=`json`
|
|
1443
|
+
|
|
1444
|
+
| Property | Type | Required | Description |
|
|
1445
|
+
|---|---|---|---|
|
|
1446
|
+
| `checks` | `object[]` | Yes | |
|
|
1447
|
+
| `checks[].name` | `string` | Yes | Check name (e.g. config_exists, dsl_exists, manifest_fresh). |
|
|
1448
|
+
| `checks[].status` | `"pass" \| "fail" \| "warn"` | Yes | |
|
|
1449
|
+
| `checks[].message` | `string` | No | Human-readable detail. |
|
|
1450
|
+
| `all_passed` | `boolean` | Yes | |
|
|
1451
|
+
|
|
1452
|
+
<details>
|
|
1453
|
+
<summary>JSON Schema</summary>
|
|
1454
|
+
|
|
1455
|
+
```json
|
|
1456
|
+
{
|
|
1457
|
+
"type": "object",
|
|
1458
|
+
"required": [
|
|
1459
|
+
"checks",
|
|
1460
|
+
"all_passed"
|
|
1461
|
+
],
|
|
1462
|
+
"properties": {
|
|
1463
|
+
"checks": {
|
|
1464
|
+
"type": "array",
|
|
1465
|
+
"items": {
|
|
1466
|
+
"type": "object",
|
|
1467
|
+
"required": [
|
|
1468
|
+
"name",
|
|
1469
|
+
"status"
|
|
1470
|
+
],
|
|
1471
|
+
"properties": {
|
|
1472
|
+
"name": {
|
|
1473
|
+
"type": "string",
|
|
1474
|
+
"description": "Check name (e.g. config_exists, dsl_exists, manifest_fresh)."
|
|
1475
|
+
},
|
|
1476
|
+
"status": {
|
|
1477
|
+
"type": "string",
|
|
1478
|
+
"enum": [
|
|
1479
|
+
"pass",
|
|
1480
|
+
"fail",
|
|
1481
|
+
"warn"
|
|
1482
|
+
]
|
|
1483
|
+
},
|
|
1484
|
+
"message": {
|
|
1485
|
+
"type": "string",
|
|
1486
|
+
"description": "Human-readable detail."
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"all_passed": {
|
|
1492
|
+
"type": "boolean"
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
```
|
|
1497
|
+
|
|
1498
|
+
</details>
|
|
1499
|
+
|
|
1500
|
+
**Exit 1:** One or more checks failed.
|
|
1501
|
+
|
|
1502
|
+
- **stdout:** format=`json`
|
|
1503
|
+
|
|
1504
|
+
| Property | Type | Required | Description |
|
|
1505
|
+
|---|---|---|---|
|
|
1506
|
+
| `checks` | `object[]` | Yes | |
|
|
1507
|
+
| `checks[].name` | `string` | Yes | Check name (e.g. config_exists, dsl_exists, manifest_fresh). |
|
|
1508
|
+
| `checks[].status` | `"pass" \| "fail" \| "warn"` | Yes | |
|
|
1509
|
+
| `checks[].message` | `string` | No | Human-readable detail. |
|
|
1510
|
+
| `all_passed` | `boolean` | Yes | |
|
|
1511
|
+
|
|
1512
|
+
<details>
|
|
1513
|
+
<summary>JSON Schema</summary>
|
|
1514
|
+
|
|
1515
|
+
```json
|
|
1516
|
+
{
|
|
1517
|
+
"type": "object",
|
|
1518
|
+
"required": [
|
|
1519
|
+
"checks",
|
|
1520
|
+
"all_passed"
|
|
1521
|
+
],
|
|
1522
|
+
"properties": {
|
|
1523
|
+
"checks": {
|
|
1524
|
+
"type": "array",
|
|
1525
|
+
"items": {
|
|
1526
|
+
"type": "object",
|
|
1527
|
+
"required": [
|
|
1528
|
+
"name",
|
|
1529
|
+
"status"
|
|
1530
|
+
],
|
|
1531
|
+
"properties": {
|
|
1532
|
+
"name": {
|
|
1533
|
+
"type": "string",
|
|
1534
|
+
"description": "Check name (e.g. config_exists, dsl_exists, manifest_fresh)."
|
|
1535
|
+
},
|
|
1536
|
+
"status": {
|
|
1537
|
+
"type": "string",
|
|
1538
|
+
"enum": [
|
|
1539
|
+
"pass",
|
|
1540
|
+
"fail",
|
|
1541
|
+
"warn"
|
|
1542
|
+
]
|
|
1543
|
+
},
|
|
1544
|
+
"message": {
|
|
1545
|
+
"type": "string",
|
|
1546
|
+
"description": "Human-readable detail."
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
},
|
|
1551
|
+
"all_passed": {
|
|
1552
|
+
"type": "boolean"
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
```
|
|
1557
|
+
|
|
1558
|
+
</details>
|
|
1559
|
+
|
|
1560
|
+
#### Extensions
|
|
1561
|
+
|
|
1562
|
+
```yaml
|
|
1563
|
+
x-agent:
|
|
1564
|
+
riskLevel: low
|
|
1565
|
+
requiresConfirmation: false
|
|
1566
|
+
idempotent: true
|
|
1567
|
+
sideEffects:
|
|
1568
|
+
|
|
1569
|
+
```
|
|
1570
|
+
|
|
1571
|
+
---
|
|
1572
|
+
|
|
1573
|
+
---
|
|
1574
|
+
|
|
1575
|
+
## Schemas
|
|
1576
|
+
|
|
1577
|
+
### InitResult
|
|
1578
|
+
|
|
1579
|
+
Type: `object`
|
|
1580
|
+
|
|
1581
|
+
| Property | Type | Required | Description |
|
|
1582
|
+
|---|---|---|---|
|
|
1583
|
+
| `files_created` | `string[]` | Yes | List of files created by init. |
|
|
1584
|
+
|
|
1585
|
+
<details>
|
|
1586
|
+
<summary>JSON Schema</summary>
|
|
1587
|
+
|
|
1588
|
+
```json
|
|
1589
|
+
{
|
|
1590
|
+
"type": "object",
|
|
1591
|
+
"required": [
|
|
1592
|
+
"files_created"
|
|
1593
|
+
],
|
|
1594
|
+
"properties": {
|
|
1595
|
+
"files_created": {
|
|
1596
|
+
"type": "array",
|
|
1597
|
+
"items": {
|
|
1598
|
+
"type": "string"
|
|
1599
|
+
},
|
|
1600
|
+
"description": "List of files created by init."
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
```
|
|
1605
|
+
|
|
1606
|
+
</details>
|
|
1607
|
+
|
|
1608
|
+
### GenerateResult
|
|
1609
|
+
|
|
1610
|
+
Type: `object`
|
|
1611
|
+
|
|
1612
|
+
| Property | Type | Required | Description |
|
|
1613
|
+
|---|---|---|---|
|
|
1614
|
+
| `files_generated` | `string[]` | Yes | List of generated file paths. |
|
|
1615
|
+
| `dsl_hash` | `string` | Yes | SHA-256 hash of the resolved DSL (canonical stringify). |
|
|
1616
|
+
| `generation_input_hash` | `string` | Yes | SHA-256 hash of all generation inputs. |
|
|
1617
|
+
| `cleaned` | `boolean` | No | Whether --clean was used. |
|
|
1618
|
+
| `check_mode` | `boolean` | No | Whether --check was used. |
|
|
1619
|
+
| `has_differences` | `boolean` | No | In --check mode, whether differences were found. |
|
|
1620
|
+
|
|
1621
|
+
<details>
|
|
1622
|
+
<summary>JSON Schema</summary>
|
|
1623
|
+
|
|
1624
|
+
```json
|
|
1625
|
+
{
|
|
1626
|
+
"type": "object",
|
|
1627
|
+
"required": [
|
|
1628
|
+
"files_generated",
|
|
1629
|
+
"dsl_hash",
|
|
1630
|
+
"generation_input_hash"
|
|
971
1631
|
],
|
|
972
1632
|
"properties": {
|
|
973
1633
|
"files_generated": {
|
|
@@ -1222,13 +1882,261 @@ Type: `object`
|
|
|
1222
1882
|
}
|
|
1223
1883
|
}
|
|
1224
1884
|
},
|
|
1225
|
-
"retries_used": {
|
|
1226
|
-
"type": "integer",
|
|
1227
|
-
"minimum": 0
|
|
1228
|
-
},
|
|
1229
|
-
"elapsed_ms": {
|
|
1230
|
-
"type": "integer",
|
|
1231
|
-
"minimum": 0
|
|
1885
|
+
"retries_used": {
|
|
1886
|
+
"type": "integer",
|
|
1887
|
+
"minimum": 0
|
|
1888
|
+
},
|
|
1889
|
+
"elapsed_ms": {
|
|
1890
|
+
"type": "integer",
|
|
1891
|
+
"minimum": 0
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
```
|
|
1896
|
+
|
|
1897
|
+
</details>
|
|
1898
|
+
|
|
1899
|
+
### ListResult
|
|
1900
|
+
|
|
1901
|
+
Type: `object`
|
|
1902
|
+
|
|
1903
|
+
| Property | Type | Required | Description |
|
|
1904
|
+
|---|---|---|---|
|
|
1905
|
+
| `resource` | `"workflows" \| "tasks" \| "agents"` | Yes | |
|
|
1906
|
+
| `items` | `object[]` | Yes | |
|
|
1907
|
+
| `items[].id` | `string` | Yes | |
|
|
1908
|
+
| `items[].description` | `string` | Yes | |
|
|
1909
|
+
|
|
1910
|
+
<details>
|
|
1911
|
+
<summary>JSON Schema</summary>
|
|
1912
|
+
|
|
1913
|
+
```json
|
|
1914
|
+
{
|
|
1915
|
+
"type": "object",
|
|
1916
|
+
"required": [
|
|
1917
|
+
"resource",
|
|
1918
|
+
"items"
|
|
1919
|
+
],
|
|
1920
|
+
"properties": {
|
|
1921
|
+
"resource": {
|
|
1922
|
+
"type": "string",
|
|
1923
|
+
"enum": [
|
|
1924
|
+
"workflows",
|
|
1925
|
+
"tasks",
|
|
1926
|
+
"agents"
|
|
1927
|
+
]
|
|
1928
|
+
},
|
|
1929
|
+
"items": {
|
|
1930
|
+
"type": "array",
|
|
1931
|
+
"items": {
|
|
1932
|
+
"type": "object",
|
|
1933
|
+
"required": [
|
|
1934
|
+
"id",
|
|
1935
|
+
"description"
|
|
1936
|
+
],
|
|
1937
|
+
"properties": {
|
|
1938
|
+
"id": {
|
|
1939
|
+
"type": "string"
|
|
1940
|
+
},
|
|
1941
|
+
"description": {
|
|
1942
|
+
"type": "string"
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
```
|
|
1950
|
+
|
|
1951
|
+
</details>
|
|
1952
|
+
|
|
1953
|
+
### ShowPromptResult
|
|
1954
|
+
|
|
1955
|
+
Type: `object`
|
|
1956
|
+
|
|
1957
|
+
| Property | Type | Required | Description |
|
|
1958
|
+
|---|---|---|---|
|
|
1959
|
+
| `task_id` | `string` | Yes | The task ID used to build the prompt. |
|
|
1960
|
+
| `agent_id` | `string` | Yes | The target agent ID for this task. |
|
|
1961
|
+
| `prompt` | `string` | Yes | The full generated prompt text. |
|
|
1962
|
+
| `handoff_schema` | `string` | No | The handoff schema ID for the task result. |
|
|
1963
|
+
| `plugins_applied` | `boolean` | No | Whether plugin prompt enhancers were applied. |
|
|
1964
|
+
|
|
1965
|
+
<details>
|
|
1966
|
+
<summary>JSON Schema</summary>
|
|
1967
|
+
|
|
1968
|
+
```json
|
|
1969
|
+
{
|
|
1970
|
+
"type": "object",
|
|
1971
|
+
"required": [
|
|
1972
|
+
"task_id",
|
|
1973
|
+
"agent_id",
|
|
1974
|
+
"prompt"
|
|
1975
|
+
],
|
|
1976
|
+
"properties": {
|
|
1977
|
+
"task_id": {
|
|
1978
|
+
"type": "string",
|
|
1979
|
+
"description": "The task ID used to build the prompt."
|
|
1980
|
+
},
|
|
1981
|
+
"agent_id": {
|
|
1982
|
+
"type": "string",
|
|
1983
|
+
"description": "The target agent ID for this task."
|
|
1984
|
+
},
|
|
1985
|
+
"prompt": {
|
|
1986
|
+
"type": "string",
|
|
1987
|
+
"description": "The full generated prompt text."
|
|
1988
|
+
},
|
|
1989
|
+
"handoff_schema": {
|
|
1990
|
+
"type": "string",
|
|
1991
|
+
"description": "The handoff schema ID for the task result."
|
|
1992
|
+
},
|
|
1993
|
+
"plugins_applied": {
|
|
1994
|
+
"type": "boolean",
|
|
1995
|
+
"description": "Whether plugin prompt enhancers were applied."
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
```
|
|
2000
|
+
|
|
2001
|
+
</details>
|
|
2002
|
+
|
|
2003
|
+
### DoctorResult
|
|
2004
|
+
|
|
2005
|
+
Type: `object`
|
|
2006
|
+
|
|
2007
|
+
| Property | Type | Required | Description |
|
|
2008
|
+
|---|---|---|---|
|
|
2009
|
+
| `checks` | `object[]` | Yes | |
|
|
2010
|
+
| `checks[].name` | `string` | Yes | Check name (e.g. config_exists, dsl_exists, manifest_fresh). |
|
|
2011
|
+
| `checks[].status` | `"pass" \| "fail" \| "warn"` | Yes | |
|
|
2012
|
+
| `checks[].message` | `string` | No | Human-readable detail. |
|
|
2013
|
+
| `all_passed` | `boolean` | Yes | |
|
|
2014
|
+
|
|
2015
|
+
<details>
|
|
2016
|
+
<summary>JSON Schema</summary>
|
|
2017
|
+
|
|
2018
|
+
```json
|
|
2019
|
+
{
|
|
2020
|
+
"type": "object",
|
|
2021
|
+
"required": [
|
|
2022
|
+
"checks",
|
|
2023
|
+
"all_passed"
|
|
2024
|
+
],
|
|
2025
|
+
"properties": {
|
|
2026
|
+
"checks": {
|
|
2027
|
+
"type": "array",
|
|
2028
|
+
"items": {
|
|
2029
|
+
"type": "object",
|
|
2030
|
+
"required": [
|
|
2031
|
+
"name",
|
|
2032
|
+
"status"
|
|
2033
|
+
],
|
|
2034
|
+
"properties": {
|
|
2035
|
+
"name": {
|
|
2036
|
+
"type": "string",
|
|
2037
|
+
"description": "Check name (e.g. config_exists, dsl_exists, manifest_fresh)."
|
|
2038
|
+
},
|
|
2039
|
+
"status": {
|
|
2040
|
+
"type": "string",
|
|
2041
|
+
"enum": [
|
|
2042
|
+
"pass",
|
|
2043
|
+
"fail",
|
|
2044
|
+
"warn"
|
|
2045
|
+
]
|
|
2046
|
+
},
|
|
2047
|
+
"message": {
|
|
2048
|
+
"type": "string",
|
|
2049
|
+
"description": "Human-readable detail."
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
},
|
|
2054
|
+
"all_passed": {
|
|
2055
|
+
"type": "boolean"
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
```
|
|
2060
|
+
|
|
2061
|
+
</details>
|
|
2062
|
+
|
|
2063
|
+
### ImplementResult
|
|
2064
|
+
|
|
2065
|
+
Type: `object`
|
|
2066
|
+
|
|
2067
|
+
| Property | Type | Required | Description |
|
|
2068
|
+
|---|---|---|---|
|
|
2069
|
+
| `files_created` | `string[]` | Yes | List of new files created. |
|
|
2070
|
+
| `files_modified` | `string[]` | Yes | List of existing files modified. |
|
|
2071
|
+
| `summary` | `string` | Yes | Human-readable summary of what was implemented. |
|
|
2072
|
+
| `commands_added` | `object[]` | No | |
|
|
2073
|
+
| `commands_added[].name` | `string` | Yes | |
|
|
2074
|
+
| `commands_added[].type` | `"audit" \| "propose" \| "explain"` | Yes | |
|
|
2075
|
+
| `commands_added[].description` | `string` | No | |
|
|
2076
|
+
| `next_steps` | `string[]` | No | Recommended next steps for the developer. |
|
|
2077
|
+
|
|
2078
|
+
<details>
|
|
2079
|
+
<summary>JSON Schema</summary>
|
|
2080
|
+
|
|
2081
|
+
```json
|
|
2082
|
+
{
|
|
2083
|
+
"type": "object",
|
|
2084
|
+
"required": [
|
|
2085
|
+
"files_created",
|
|
2086
|
+
"files_modified",
|
|
2087
|
+
"summary"
|
|
2088
|
+
],
|
|
2089
|
+
"properties": {
|
|
2090
|
+
"files_created": {
|
|
2091
|
+
"type": "array",
|
|
2092
|
+
"items": {
|
|
2093
|
+
"type": "string"
|
|
2094
|
+
},
|
|
2095
|
+
"description": "List of new files created."
|
|
2096
|
+
},
|
|
2097
|
+
"files_modified": {
|
|
2098
|
+
"type": "array",
|
|
2099
|
+
"items": {
|
|
2100
|
+
"type": "string"
|
|
2101
|
+
},
|
|
2102
|
+
"description": "List of existing files modified."
|
|
2103
|
+
},
|
|
2104
|
+
"summary": {
|
|
2105
|
+
"type": "string",
|
|
2106
|
+
"description": "Human-readable summary of what was implemented."
|
|
2107
|
+
},
|
|
2108
|
+
"commands_added": {
|
|
2109
|
+
"type": "array",
|
|
2110
|
+
"items": {
|
|
2111
|
+
"type": "object",
|
|
2112
|
+
"required": [
|
|
2113
|
+
"name",
|
|
2114
|
+
"type"
|
|
2115
|
+
],
|
|
2116
|
+
"properties": {
|
|
2117
|
+
"name": {
|
|
2118
|
+
"type": "string"
|
|
2119
|
+
},
|
|
2120
|
+
"type": {
|
|
2121
|
+
"type": "string",
|
|
2122
|
+
"enum": [
|
|
2123
|
+
"audit",
|
|
2124
|
+
"propose",
|
|
2125
|
+
"explain"
|
|
2126
|
+
]
|
|
2127
|
+
},
|
|
2128
|
+
"description": {
|
|
2129
|
+
"type": "string"
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
},
|
|
2134
|
+
"next_steps": {
|
|
2135
|
+
"type": "array",
|
|
2136
|
+
"items": {
|
|
2137
|
+
"type": "string"
|
|
2138
|
+
},
|
|
2139
|
+
"description": "Recommended next steps for the developer."
|
|
1232
2140
|
}
|
|
1233
2141
|
}
|
|
1234
2142
|
}
|
|
@@ -1236,16 +2144,41 @@ Type: `object`
|
|
|
1236
2144
|
|
|
1237
2145
|
</details>
|
|
1238
2146
|
|
|
1239
|
-
###
|
|
2147
|
+
### AuditImplementationResult
|
|
1240
2148
|
|
|
1241
2149
|
Type: `object`
|
|
1242
2150
|
|
|
1243
2151
|
| Property | Type | Required | Description |
|
|
1244
2152
|
|---|---|---|---|
|
|
1245
|
-
| `
|
|
1246
|
-
| `
|
|
1247
|
-
| `
|
|
1248
|
-
| `
|
|
2153
|
+
| `summary` | `string` | Yes | One-paragraph overall assessment. |
|
|
2154
|
+
| `riskLevel` | `"low" \| "medium" \| "high" \| "critical"` | Yes | Derived from worst finding severity. |
|
|
2155
|
+
| `findings` | `object[]` | Yes | |
|
|
2156
|
+
| `findings[].id` | `string` | No | Unique finding identifier (e.g. F-001). |
|
|
2157
|
+
| `findings[].severity` | `"info" \| "warning" \| "error" \| "critical"` | Yes | |
|
|
2158
|
+
| `findings[].category` | `string` | Yes | Domain vocabulary category (e.g. cli-contract-options, runtime-adapter). |
|
|
2159
|
+
| `findings[].target` | `string` | No | File path or resource the finding applies to. |
|
|
2160
|
+
| `findings[].location` | `string` | No | Line range or specific location within the target. |
|
|
2161
|
+
| `findings[].message` | `string` | Yes | Human-readable description of the finding. |
|
|
2162
|
+
| `findings[].recommendation` | `string` | No | Concrete remediation step. |
|
|
2163
|
+
| `findings[].confidence` | `number (min: 0, max: 1)` | No | Confidence score (0–1) for the finding. |
|
|
2164
|
+
| `findings[].evidence` | `object[]` | No | |
|
|
2165
|
+
| `findings[].evidence[].type` | `string` | Yes | Evidence type (e.g. code_snippet, file_excerpt, lint_output). |
|
|
2166
|
+
| `findings[].evidence[].content` | `string` | Yes | The evidence content. |
|
|
2167
|
+
| `findings[].evidence[].source` | `string` | No | Source file path or URL for the evidence. |
|
|
2168
|
+
| `findings[].details` | `object` | No | Additional structured details specific to the finding category. |
|
|
2169
|
+
| `recommendedActions` | `object[]` | No | |
|
|
2170
|
+
| `recommendedActions[].kind` | `enum(6 values)` | Yes | |
|
|
2171
|
+
| `recommendedActions[].title` | `string` | Yes | Short human-readable title for the action. |
|
|
2172
|
+
| `recommendedActions[].command` | `string` | No | Shell command to run (when kind is run_command). |
|
|
2173
|
+
| `recommendedActions[].target` | `string` | No | File path to edit (when kind is edit_file). |
|
|
2174
|
+
| `recommendedActions[].rationale` | `string` | No | Explanation of why this action is recommended. |
|
|
2175
|
+
| `metadata` | `object` | No | |
|
|
2176
|
+
| `metadata.tool` | `string` | No | |
|
|
2177
|
+
| `metadata.command` | `string` | No | |
|
|
2178
|
+
| `metadata.version` | `string` | No | |
|
|
2179
|
+
| `metadata.generatedAt` | `string` | No | |
|
|
2180
|
+
| `metadata.adapter` | `string` | No | |
|
|
2181
|
+
| `metadata.model` | `string` | No | |
|
|
1249
2182
|
|
|
1250
2183
|
<details>
|
|
1251
2184
|
<summary>JSON Schema</summary>
|
|
@@ -1254,35 +2187,166 @@ Type: `object`
|
|
|
1254
2187
|
{
|
|
1255
2188
|
"type": "object",
|
|
1256
2189
|
"required": [
|
|
1257
|
-
"
|
|
1258
|
-
"
|
|
2190
|
+
"summary",
|
|
2191
|
+
"riskLevel",
|
|
2192
|
+
"findings"
|
|
1259
2193
|
],
|
|
1260
2194
|
"properties": {
|
|
1261
|
-
"
|
|
2195
|
+
"summary": {
|
|
2196
|
+
"type": "string",
|
|
2197
|
+
"description": "One-paragraph overall assessment."
|
|
2198
|
+
},
|
|
2199
|
+
"riskLevel": {
|
|
1262
2200
|
"type": "string",
|
|
1263
2201
|
"enum": [
|
|
1264
|
-
"
|
|
1265
|
-
"
|
|
1266
|
-
"
|
|
1267
|
-
|
|
2202
|
+
"low",
|
|
2203
|
+
"medium",
|
|
2204
|
+
"high",
|
|
2205
|
+
"critical"
|
|
2206
|
+
],
|
|
2207
|
+
"description": "Derived from worst finding severity."
|
|
1268
2208
|
},
|
|
1269
|
-
"
|
|
2209
|
+
"findings": {
|
|
1270
2210
|
"type": "array",
|
|
1271
2211
|
"items": {
|
|
1272
2212
|
"type": "object",
|
|
1273
2213
|
"required": [
|
|
1274
|
-
"
|
|
1275
|
-
"
|
|
2214
|
+
"severity",
|
|
2215
|
+
"category",
|
|
2216
|
+
"message"
|
|
1276
2217
|
],
|
|
1277
2218
|
"properties": {
|
|
1278
2219
|
"id": {
|
|
1279
|
-
"type": "string"
|
|
2220
|
+
"type": "string",
|
|
2221
|
+
"description": "Unique finding identifier (e.g. F-001)."
|
|
1280
2222
|
},
|
|
1281
|
-
"
|
|
1282
|
-
"type": "string"
|
|
2223
|
+
"severity": {
|
|
2224
|
+
"type": "string",
|
|
2225
|
+
"enum": [
|
|
2226
|
+
"info",
|
|
2227
|
+
"warning",
|
|
2228
|
+
"error",
|
|
2229
|
+
"critical"
|
|
2230
|
+
]
|
|
2231
|
+
},
|
|
2232
|
+
"category": {
|
|
2233
|
+
"type": "string",
|
|
2234
|
+
"description": "Domain vocabulary category (e.g. cli-contract-options, runtime-adapter)."
|
|
2235
|
+
},
|
|
2236
|
+
"target": {
|
|
2237
|
+
"type": "string",
|
|
2238
|
+
"description": "File path or resource the finding applies to."
|
|
2239
|
+
},
|
|
2240
|
+
"location": {
|
|
2241
|
+
"type": "string",
|
|
2242
|
+
"description": "Line range or specific location within the target."
|
|
2243
|
+
},
|
|
2244
|
+
"message": {
|
|
2245
|
+
"type": "string",
|
|
2246
|
+
"description": "Human-readable description of the finding."
|
|
2247
|
+
},
|
|
2248
|
+
"recommendation": {
|
|
2249
|
+
"type": "string",
|
|
2250
|
+
"description": "Concrete remediation step."
|
|
2251
|
+
},
|
|
2252
|
+
"confidence": {
|
|
2253
|
+
"type": "number",
|
|
2254
|
+
"minimum": 0,
|
|
2255
|
+
"maximum": 1,
|
|
2256
|
+
"description": "Confidence score (0–1) for the finding."
|
|
2257
|
+
},
|
|
2258
|
+
"evidence": {
|
|
2259
|
+
"type": "array",
|
|
2260
|
+
"items": {
|
|
2261
|
+
"type": "object",
|
|
2262
|
+
"required": [
|
|
2263
|
+
"type",
|
|
2264
|
+
"content"
|
|
2265
|
+
],
|
|
2266
|
+
"properties": {
|
|
2267
|
+
"type": {
|
|
2268
|
+
"type": "string",
|
|
2269
|
+
"description": "Evidence type (e.g. code_snippet, file_excerpt, lint_output)."
|
|
2270
|
+
},
|
|
2271
|
+
"content": {
|
|
2272
|
+
"type": "string",
|
|
2273
|
+
"description": "The evidence content."
|
|
2274
|
+
},
|
|
2275
|
+
"source": {
|
|
2276
|
+
"type": "string",
|
|
2277
|
+
"description": "Source file path or URL for the evidence."
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
},
|
|
2282
|
+
"details": {
|
|
2283
|
+
"type": "object",
|
|
2284
|
+
"description": "Additional structured details specific to the finding category."
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
},
|
|
2289
|
+
"recommendedActions": {
|
|
2290
|
+
"type": "array",
|
|
2291
|
+
"items": {
|
|
2292
|
+
"type": "object",
|
|
2293
|
+
"required": [
|
|
2294
|
+
"kind",
|
|
2295
|
+
"title"
|
|
2296
|
+
],
|
|
2297
|
+
"properties": {
|
|
2298
|
+
"kind": {
|
|
2299
|
+
"type": "string",
|
|
2300
|
+
"enum": [
|
|
2301
|
+
"run_command",
|
|
2302
|
+
"edit_file",
|
|
2303
|
+
"review",
|
|
2304
|
+
"confirm",
|
|
2305
|
+
"block",
|
|
2306
|
+
"ignore"
|
|
2307
|
+
]
|
|
2308
|
+
},
|
|
2309
|
+
"title": {
|
|
2310
|
+
"type": "string",
|
|
2311
|
+
"description": "Short human-readable title for the action."
|
|
2312
|
+
},
|
|
2313
|
+
"command": {
|
|
2314
|
+
"type": "string",
|
|
2315
|
+
"description": "Shell command to run (when kind is run_command)."
|
|
2316
|
+
},
|
|
2317
|
+
"target": {
|
|
2318
|
+
"type": "string",
|
|
2319
|
+
"description": "File path to edit (when kind is edit_file)."
|
|
2320
|
+
},
|
|
2321
|
+
"rationale": {
|
|
2322
|
+
"type": "string",
|
|
2323
|
+
"description": "Explanation of why this action is recommended."
|
|
1283
2324
|
}
|
|
1284
2325
|
}
|
|
1285
2326
|
}
|
|
2327
|
+
},
|
|
2328
|
+
"metadata": {
|
|
2329
|
+
"type": "object",
|
|
2330
|
+
"properties": {
|
|
2331
|
+
"tool": {
|
|
2332
|
+
"type": "string"
|
|
2333
|
+
},
|
|
2334
|
+
"command": {
|
|
2335
|
+
"type": "string"
|
|
2336
|
+
},
|
|
2337
|
+
"version": {
|
|
2338
|
+
"type": "string"
|
|
2339
|
+
},
|
|
2340
|
+
"generatedAt": {
|
|
2341
|
+
"type": "string"
|
|
2342
|
+
},
|
|
2343
|
+
"adapter": {
|
|
2344
|
+
"type": "string"
|
|
2345
|
+
},
|
|
2346
|
+
"model": {
|
|
2347
|
+
"type": "string"
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
1286
2350
|
}
|
|
1287
2351
|
}
|
|
1288
2352
|
}
|
|
@@ -1290,17 +2354,15 @@ Type: `object`
|
|
|
1290
2354
|
|
|
1291
2355
|
</details>
|
|
1292
2356
|
|
|
1293
|
-
###
|
|
2357
|
+
### DoctorCheck
|
|
1294
2358
|
|
|
1295
2359
|
Type: `object`
|
|
1296
2360
|
|
|
1297
2361
|
| Property | Type | Required | Description |
|
|
1298
2362
|
|---|---|---|---|
|
|
1299
|
-
| `
|
|
1300
|
-
| `
|
|
1301
|
-
| `
|
|
1302
|
-
| `handoff_schema` | `string` | No | The handoff schema ID for the task result. |
|
|
1303
|
-
| `plugins_applied` | `boolean` | No | Whether plugin prompt enhancers were applied. |
|
|
2363
|
+
| `name` | `string` | Yes | Check name (e.g. config_exists, dsl_exists, manifest_fresh). |
|
|
2364
|
+
| `status` | `"pass" \| "fail" \| "warn"` | Yes | |
|
|
2365
|
+
| `message` | `string` | No | Human-readable detail. |
|
|
1304
2366
|
|
|
1305
2367
|
<details>
|
|
1306
2368
|
<summary>JSON Schema</summary>
|
|
@@ -1309,30 +2371,25 @@ Type: `object`
|
|
|
1309
2371
|
{
|
|
1310
2372
|
"type": "object",
|
|
1311
2373
|
"required": [
|
|
1312
|
-
"
|
|
1313
|
-
"
|
|
1314
|
-
"prompt"
|
|
2374
|
+
"name",
|
|
2375
|
+
"status"
|
|
1315
2376
|
],
|
|
1316
2377
|
"properties": {
|
|
1317
|
-
"
|
|
1318
|
-
"type": "string",
|
|
1319
|
-
"description": "The task ID used to build the prompt."
|
|
1320
|
-
},
|
|
1321
|
-
"agent_id": {
|
|
2378
|
+
"name": {
|
|
1322
2379
|
"type": "string",
|
|
1323
|
-
"description": "
|
|
2380
|
+
"description": "Check name (e.g. config_exists, dsl_exists, manifest_fresh)."
|
|
1324
2381
|
},
|
|
1325
|
-
"
|
|
2382
|
+
"status": {
|
|
1326
2383
|
"type": "string",
|
|
1327
|
-
"
|
|
2384
|
+
"enum": [
|
|
2385
|
+
"pass",
|
|
2386
|
+
"fail",
|
|
2387
|
+
"warn"
|
|
2388
|
+
]
|
|
1328
2389
|
},
|
|
1329
|
-
"
|
|
2390
|
+
"message": {
|
|
1330
2391
|
"type": "string",
|
|
1331
|
-
"description": "
|
|
1332
|
-
},
|
|
1333
|
-
"plugins_applied": {
|
|
1334
|
-
"type": "boolean",
|
|
1335
|
-
"description": "Whether plugin prompt enhancers were applied."
|
|
2392
|
+
"description": "Human-readable detail."
|
|
1336
2393
|
}
|
|
1337
2394
|
}
|
|
1338
2395
|
}
|
|
@@ -1340,17 +2397,25 @@ Type: `object`
|
|
|
1340
2397
|
|
|
1341
2398
|
</details>
|
|
1342
2399
|
|
|
1343
|
-
###
|
|
2400
|
+
### AgentFinding
|
|
1344
2401
|
|
|
1345
2402
|
Type: `object`
|
|
1346
2403
|
|
|
1347
2404
|
| Property | Type | Required | Description |
|
|
1348
2405
|
|---|---|---|---|
|
|
1349
|
-
| `
|
|
1350
|
-
| `
|
|
1351
|
-
| `
|
|
1352
|
-
| `
|
|
1353
|
-
| `
|
|
2406
|
+
| `id` | `string` | No | Unique finding identifier (e.g. F-001). |
|
|
2407
|
+
| `severity` | `"info" \| "warning" \| "error" \| "critical"` | Yes | |
|
|
2408
|
+
| `category` | `string` | Yes | Domain vocabulary category (e.g. cli-contract-options, runtime-adapter). |
|
|
2409
|
+
| `target` | `string` | No | File path or resource the finding applies to. |
|
|
2410
|
+
| `location` | `string` | No | Line range or specific location within the target. |
|
|
2411
|
+
| `message` | `string` | Yes | Human-readable description of the finding. |
|
|
2412
|
+
| `recommendation` | `string` | No | Concrete remediation step. |
|
|
2413
|
+
| `confidence` | `number (min: 0, max: 1)` | No | Confidence score (0–1) for the finding. |
|
|
2414
|
+
| `evidence` | `object[]` | No | |
|
|
2415
|
+
| `evidence[].type` | `string` | Yes | Evidence type (e.g. code_snippet, file_excerpt, lint_output). |
|
|
2416
|
+
| `evidence[].content` | `string` | Yes | The evidence content. |
|
|
2417
|
+
| `evidence[].source` | `string` | No | Source file path or URL for the evidence. |
|
|
2418
|
+
| `details` | `object` | No | Additional structured details specific to the finding category. |
|
|
1354
2419
|
|
|
1355
2420
|
<details>
|
|
1356
2421
|
<summary>JSON Schema</summary>
|
|
@@ -1359,40 +2424,77 @@ Type: `object`
|
|
|
1359
2424
|
{
|
|
1360
2425
|
"type": "object",
|
|
1361
2426
|
"required": [
|
|
1362
|
-
"
|
|
1363
|
-
"
|
|
2427
|
+
"severity",
|
|
2428
|
+
"category",
|
|
2429
|
+
"message"
|
|
1364
2430
|
],
|
|
1365
2431
|
"properties": {
|
|
1366
|
-
"
|
|
2432
|
+
"id": {
|
|
2433
|
+
"type": "string",
|
|
2434
|
+
"description": "Unique finding identifier (e.g. F-001)."
|
|
2435
|
+
},
|
|
2436
|
+
"severity": {
|
|
2437
|
+
"type": "string",
|
|
2438
|
+
"enum": [
|
|
2439
|
+
"info",
|
|
2440
|
+
"warning",
|
|
2441
|
+
"error",
|
|
2442
|
+
"critical"
|
|
2443
|
+
]
|
|
2444
|
+
},
|
|
2445
|
+
"category": {
|
|
2446
|
+
"type": "string",
|
|
2447
|
+
"description": "Domain vocabulary category (e.g. cli-contract-options, runtime-adapter)."
|
|
2448
|
+
},
|
|
2449
|
+
"target": {
|
|
2450
|
+
"type": "string",
|
|
2451
|
+
"description": "File path or resource the finding applies to."
|
|
2452
|
+
},
|
|
2453
|
+
"location": {
|
|
2454
|
+
"type": "string",
|
|
2455
|
+
"description": "Line range or specific location within the target."
|
|
2456
|
+
},
|
|
2457
|
+
"message": {
|
|
2458
|
+
"type": "string",
|
|
2459
|
+
"description": "Human-readable description of the finding."
|
|
2460
|
+
},
|
|
2461
|
+
"recommendation": {
|
|
2462
|
+
"type": "string",
|
|
2463
|
+
"description": "Concrete remediation step."
|
|
2464
|
+
},
|
|
2465
|
+
"confidence": {
|
|
2466
|
+
"type": "number",
|
|
2467
|
+
"minimum": 0,
|
|
2468
|
+
"maximum": 1,
|
|
2469
|
+
"description": "Confidence score (0–1) for the finding."
|
|
2470
|
+
},
|
|
2471
|
+
"evidence": {
|
|
1367
2472
|
"type": "array",
|
|
1368
2473
|
"items": {
|
|
1369
2474
|
"type": "object",
|
|
1370
2475
|
"required": [
|
|
1371
|
-
"
|
|
1372
|
-
"
|
|
2476
|
+
"type",
|
|
2477
|
+
"content"
|
|
1373
2478
|
],
|
|
1374
2479
|
"properties": {
|
|
1375
|
-
"
|
|
2480
|
+
"type": {
|
|
1376
2481
|
"type": "string",
|
|
1377
|
-
"description": "
|
|
2482
|
+
"description": "Evidence type (e.g. code_snippet, file_excerpt, lint_output)."
|
|
1378
2483
|
},
|
|
1379
|
-
"
|
|
2484
|
+
"content": {
|
|
1380
2485
|
"type": "string",
|
|
1381
|
-
"
|
|
1382
|
-
"pass",
|
|
1383
|
-
"fail",
|
|
1384
|
-
"warn"
|
|
1385
|
-
]
|
|
2486
|
+
"description": "The evidence content."
|
|
1386
2487
|
},
|
|
1387
|
-
"
|
|
2488
|
+
"source": {
|
|
1388
2489
|
"type": "string",
|
|
1389
|
-
"description": "
|
|
2490
|
+
"description": "Source file path or URL for the evidence."
|
|
1390
2491
|
}
|
|
1391
2492
|
}
|
|
1392
2493
|
}
|
|
1393
2494
|
},
|
|
1394
|
-
"
|
|
1395
|
-
"type": "
|
|
2495
|
+
"details": {
|
|
2496
|
+
"type": "object",
|
|
2497
|
+
"description": "Additional structured details specific to the finding category."
|
|
1396
2498
|
}
|
|
1397
2499
|
}
|
|
1398
2500
|
}
|
|
@@ -1400,15 +2502,17 @@ Type: `object`
|
|
|
1400
2502
|
|
|
1401
2503
|
</details>
|
|
1402
2504
|
|
|
1403
|
-
###
|
|
2505
|
+
### AgentRecommendedAction
|
|
1404
2506
|
|
|
1405
2507
|
Type: `object`
|
|
1406
2508
|
|
|
1407
2509
|
| Property | Type | Required | Description |
|
|
1408
2510
|
|---|---|---|---|
|
|
1409
|
-
| `
|
|
1410
|
-
| `
|
|
1411
|
-
| `
|
|
2511
|
+
| `kind` | `enum(6 values)` | Yes | |
|
|
2512
|
+
| `title` | `string` | Yes | Short human-readable title for the action. |
|
|
2513
|
+
| `command` | `string` | No | Shell command to run (when kind is run_command). |
|
|
2514
|
+
| `target` | `string` | No | File path to edit (when kind is edit_file). |
|
|
2515
|
+
| `rationale` | `string` | No | Explanation of why this action is recommended. |
|
|
1412
2516
|
|
|
1413
2517
|
<details>
|
|
1414
2518
|
<summary>JSON Schema</summary>
|
|
@@ -1417,25 +2521,75 @@ Type: `object`
|
|
|
1417
2521
|
{
|
|
1418
2522
|
"type": "object",
|
|
1419
2523
|
"required": [
|
|
1420
|
-
"
|
|
1421
|
-
"
|
|
2524
|
+
"kind",
|
|
2525
|
+
"title"
|
|
1422
2526
|
],
|
|
1423
2527
|
"properties": {
|
|
1424
|
-
"
|
|
1425
|
-
"type": "string",
|
|
1426
|
-
"description": "Check name (e.g. config_exists, dsl_exists, manifest_fresh)."
|
|
1427
|
-
},
|
|
1428
|
-
"status": {
|
|
2528
|
+
"kind": {
|
|
1429
2529
|
"type": "string",
|
|
1430
2530
|
"enum": [
|
|
1431
|
-
"
|
|
1432
|
-
"
|
|
1433
|
-
"
|
|
2531
|
+
"run_command",
|
|
2532
|
+
"edit_file",
|
|
2533
|
+
"review",
|
|
2534
|
+
"confirm",
|
|
2535
|
+
"block",
|
|
2536
|
+
"ignore"
|
|
1434
2537
|
]
|
|
1435
2538
|
},
|
|
1436
|
-
"
|
|
2539
|
+
"title": {
|
|
1437
2540
|
"type": "string",
|
|
1438
|
-
"description": "
|
|
2541
|
+
"description": "Short human-readable title for the action."
|
|
2542
|
+
},
|
|
2543
|
+
"command": {
|
|
2544
|
+
"type": "string",
|
|
2545
|
+
"description": "Shell command to run (when kind is run_command)."
|
|
2546
|
+
},
|
|
2547
|
+
"target": {
|
|
2548
|
+
"type": "string",
|
|
2549
|
+
"description": "File path to edit (when kind is edit_file)."
|
|
2550
|
+
},
|
|
2551
|
+
"rationale": {
|
|
2552
|
+
"type": "string",
|
|
2553
|
+
"description": "Explanation of why this action is recommended."
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
```
|
|
2558
|
+
|
|
2559
|
+
</details>
|
|
2560
|
+
|
|
2561
|
+
### AgentEvidence
|
|
2562
|
+
|
|
2563
|
+
Type: `object`
|
|
2564
|
+
|
|
2565
|
+
| Property | Type | Required | Description |
|
|
2566
|
+
|---|---|---|---|
|
|
2567
|
+
| `type` | `string` | Yes | Evidence type (e.g. code_snippet, file_excerpt, lint_output). |
|
|
2568
|
+
| `content` | `string` | Yes | The evidence content. |
|
|
2569
|
+
| `source` | `string` | No | Source file path or URL for the evidence. |
|
|
2570
|
+
|
|
2571
|
+
<details>
|
|
2572
|
+
<summary>JSON Schema</summary>
|
|
2573
|
+
|
|
2574
|
+
```json
|
|
2575
|
+
{
|
|
2576
|
+
"type": "object",
|
|
2577
|
+
"required": [
|
|
2578
|
+
"type",
|
|
2579
|
+
"content"
|
|
2580
|
+
],
|
|
2581
|
+
"properties": {
|
|
2582
|
+
"type": {
|
|
2583
|
+
"type": "string",
|
|
2584
|
+
"description": "Evidence type (e.g. code_snippet, file_excerpt, lint_output)."
|
|
2585
|
+
},
|
|
2586
|
+
"content": {
|
|
2587
|
+
"type": "string",
|
|
2588
|
+
"description": "The evidence content."
|
|
2589
|
+
},
|
|
2590
|
+
"source": {
|
|
2591
|
+
"type": "string",
|
|
2592
|
+
"description": "Source file path or URL for the evidence."
|
|
1439
2593
|
}
|
|
1440
2594
|
}
|
|
1441
2595
|
}
|