@nyxa/nyx-agent 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -5
- package/dist/cli.js +4 -1
- package/dist/commands/init.js +53 -29
- package/dist/commands/run.js +2 -1
- package/dist/config/schema.js +45 -4
- package/dist/runtime/prompts.js +50 -17
- package/dist/runtime/reporter.js +65 -0
- package/dist/runtime/runPhase.js +76 -15
- package/dist/runtime/runPipeline.js +578 -151
- package/dist/runtime/schemas.js +108 -22
- package/package.json +1 -1
package/dist/runtime/schemas.js
CHANGED
|
@@ -12,41 +12,127 @@ export const SELECTION_SCHEMA = {
|
|
|
12
12
|
work_item_keys: {
|
|
13
13
|
type: "array",
|
|
14
14
|
items: { type: "string" },
|
|
15
|
-
description: "Ordered keys of the chosen candidates (prerequisites first)."
|
|
16
|
-
}
|
|
15
|
+
description: "Ordered keys of the chosen candidates (prerequisites first).",
|
|
16
|
+
},
|
|
17
17
|
},
|
|
18
18
|
allOf: [
|
|
19
19
|
{
|
|
20
20
|
if: { properties: { outcome: { const: "selected" } } },
|
|
21
|
-
then: { required: ["work_item_keys"] }
|
|
22
|
-
}
|
|
21
|
+
then: { required: ["work_item_keys"] },
|
|
22
|
+
},
|
|
23
23
|
],
|
|
24
|
-
additionalProperties: true
|
|
24
|
+
additionalProperties: true,
|
|
25
|
+
};
|
|
26
|
+
const evidenceSchema = {
|
|
27
|
+
type: "object",
|
|
28
|
+
properties: {
|
|
29
|
+
file: { type: "string" },
|
|
30
|
+
line: { type: "integer", minimum: 1 },
|
|
31
|
+
command: { type: "string" },
|
|
32
|
+
observation: { type: "string" },
|
|
33
|
+
detail: { type: "string" },
|
|
34
|
+
},
|
|
35
|
+
additionalProperties: true,
|
|
36
|
+
};
|
|
37
|
+
const findingSchema = {
|
|
38
|
+
type: "object",
|
|
39
|
+
required: ["title", "required_change", "confidence", "evidence"],
|
|
40
|
+
properties: {
|
|
41
|
+
title: { type: "string", minLength: 1 },
|
|
42
|
+
required_change: { type: "string", minLength: 1 },
|
|
43
|
+
confidence: {
|
|
44
|
+
type: "string",
|
|
45
|
+
enum: ["low", "medium", "high"],
|
|
46
|
+
},
|
|
47
|
+
evidence: {
|
|
48
|
+
type: "array",
|
|
49
|
+
minItems: 1,
|
|
50
|
+
items: evidenceSchema,
|
|
51
|
+
description: "Concrete evidence: file+line, command+observation, or an equivalent current-code observation.",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
additionalProperties: true,
|
|
25
55
|
};
|
|
26
|
-
const
|
|
56
|
+
const findingArraySchema = {
|
|
57
|
+
type: "array",
|
|
58
|
+
items: findingSchema,
|
|
59
|
+
default: [],
|
|
60
|
+
};
|
|
61
|
+
const reviewDiscoverySchema = {
|
|
27
62
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
28
63
|
type: "object",
|
|
29
|
-
required: [
|
|
64
|
+
required: [
|
|
65
|
+
"summary",
|
|
66
|
+
"blockers",
|
|
67
|
+
"test_gaps",
|
|
68
|
+
"advisory_findings",
|
|
69
|
+
"uncertain_findings",
|
|
70
|
+
"rejected_findings",
|
|
71
|
+
],
|
|
30
72
|
properties: {
|
|
31
|
-
outcome: { type: "string", enum: ["approved", "changes_requested"] },
|
|
32
73
|
summary: {
|
|
33
74
|
type: "string",
|
|
34
75
|
minLength: 1,
|
|
35
|
-
description: "A brief assessment of the work."
|
|
76
|
+
description: "A brief assessment of the work.",
|
|
36
77
|
},
|
|
37
|
-
|
|
78
|
+
blockers: findingArraySchema,
|
|
79
|
+
test_gaps: findingArraySchema,
|
|
80
|
+
advisory_findings: findingArraySchema,
|
|
81
|
+
uncertain_findings: findingArraySchema,
|
|
82
|
+
rejected_findings: findingArraySchema,
|
|
83
|
+
},
|
|
84
|
+
additionalProperties: true,
|
|
85
|
+
};
|
|
86
|
+
const reviewChallengeSchema = {
|
|
87
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
88
|
+
type: "object",
|
|
89
|
+
required: ["summary", "blockers", "rejected_findings"],
|
|
90
|
+
properties: {
|
|
91
|
+
summary: { type: "string", minLength: 1 },
|
|
92
|
+
blockers: findingArraySchema,
|
|
93
|
+
rejected_findings: findingArraySchema,
|
|
94
|
+
},
|
|
95
|
+
additionalProperties: true,
|
|
96
|
+
};
|
|
97
|
+
const validationSchema = {
|
|
98
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
99
|
+
type: "object",
|
|
100
|
+
required: ["summary", "validations"],
|
|
101
|
+
properties: {
|
|
102
|
+
summary: { type: "string", minLength: 1 },
|
|
103
|
+
validations: {
|
|
38
104
|
type: "array",
|
|
39
|
-
items: {
|
|
40
|
-
|
|
41
|
-
|
|
105
|
+
items: {
|
|
106
|
+
type: "object",
|
|
107
|
+
required: ["blocker_title", "status", "evidence"],
|
|
108
|
+
properties: {
|
|
109
|
+
blocker_title: { type: "string", minLength: 1 },
|
|
110
|
+
status: {
|
|
111
|
+
type: "string",
|
|
112
|
+
enum: [
|
|
113
|
+
"resolved",
|
|
114
|
+
"unresolved",
|
|
115
|
+
"false_positive",
|
|
116
|
+
"regression_from_correction",
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
required_change: {
|
|
120
|
+
type: "string",
|
|
121
|
+
description: "Required when the status remains unresolved or is a correction-caused regression.",
|
|
122
|
+
},
|
|
123
|
+
evidence: {
|
|
124
|
+
type: "array",
|
|
125
|
+
minItems: 1,
|
|
126
|
+
items: evidenceSchema,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
additionalProperties: true,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
42
132
|
},
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
if: { properties: { outcome: { const: "changes_requested" } } },
|
|
46
|
-
then: { required: ["required_changes"] }
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
additionalProperties: true
|
|
133
|
+
additionalProperties: true,
|
|
50
134
|
};
|
|
51
|
-
export const
|
|
52
|
-
export const GLOBAL_REVIEW_SCHEMA =
|
|
135
|
+
export const REVIEW_DISCOVERY_SCHEMA = reviewDiscoverySchema;
|
|
136
|
+
export const GLOBAL_REVIEW_SCHEMA = reviewDiscoverySchema;
|
|
137
|
+
export const REVIEW_CHALLENGE_SCHEMA = reviewChallengeSchema;
|
|
138
|
+
export const REVIEW_VALIDATION_SCHEMA = validationSchema;
|