clud-bug 0.6.34 → 0.7.0-rc.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/bin/clud-bug.js +10 -1353
- package/dist/cli/agents-md.d.ts +16 -0
- package/dist/cli/agents-md.d.ts.map +1 -0
- package/dist/cli/agents-md.js +226 -0
- package/dist/cli/agents-md.js.map +1 -0
- package/dist/cli/audit.d.ts +13 -0
- package/dist/cli/audit.d.ts.map +1 -0
- package/dist/cli/audit.js +90 -0
- package/dist/cli/audit.js.map +1 -0
- package/dist/cli/branch-protection.d.ts +57 -0
- package/dist/cli/branch-protection.d.ts.map +1 -0
- package/dist/cli/branch-protection.js +118 -0
- package/dist/cli/branch-protection.js.map +1 -0
- package/dist/cli/edit-workflow.d.ts +18 -0
- package/dist/cli/edit-workflow.d.ts.map +1 -0
- package/dist/cli/edit-workflow.js +43 -0
- package/dist/cli/edit-workflow.js.map +1 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +18 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +1336 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/skill-usage.d.ts +109 -0
- package/dist/cli/skill-usage.d.ts.map +1 -0
- package/dist/cli/skill-usage.js +380 -0
- package/dist/cli/skill-usage.js.map +1 -0
- package/dist/cli/skills.d.ts +56 -0
- package/dist/cli/skills.d.ts.map +1 -0
- package/dist/cli/skills.js +292 -0
- package/dist/cli/skills.js.map +1 -0
- package/dist/cli/update.d.ts +29 -0
- package/dist/cli/update.d.ts.map +1 -0
- package/dist/cli/update.js +186 -0
- package/dist/cli/update.js.map +1 -0
- package/dist/cli/usage.d.ts +142 -0
- package/dist/cli/usage.d.ts.map +1 -0
- package/dist/cli/usage.js +348 -0
- package/dist/cli/usage.js.map +1 -0
- package/dist/core/audit.d.ts +8 -0
- package/dist/core/audit.d.ts.map +1 -0
- package/dist/core/audit.js +47 -0
- package/dist/core/audit.js.map +1 -0
- package/dist/core/detect.d.ts +77 -0
- package/dist/core/detect.d.ts.map +1 -0
- package/dist/core/detect.js +262 -0
- package/dist/core/detect.js.map +1 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +14 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/prompts.d.ts +9 -0
- package/dist/core/prompts.d.ts.map +1 -0
- package/dist/core/prompts.js +401 -0
- package/dist/core/prompts.js.map +1 -0
- package/dist/core/render-review.d.ts +6 -0
- package/dist/core/render-review.d.ts.map +1 -0
- package/dist/core/render-review.js +219 -0
- package/dist/core/render-review.js.map +1 -0
- package/dist/core/render.d.ts +13 -0
- package/dist/core/render.d.ts.map +1 -0
- package/dist/core/render.js +80 -0
- package/dist/core/render.js.map +1 -0
- package/dist/core/review-schema.d.ts +42 -0
- package/dist/core/review-schema.d.ts.map +1 -0
- package/dist/core/review-schema.js +156 -0
- package/dist/core/review-schema.js.map +1 -0
- package/dist/core/skills.d.ts +80 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +510 -0
- package/dist/core/skills.js.map +1 -0
- package/package.json +27 -4
- package/{lib/agents-md.js → src/cli/agents-md.ts} +25 -14
- package/{lib/audit.js → src/cli/audit.ts} +37 -44
- package/{lib/branch-protection.js → src/cli/branch-protection.ts} +75 -11
- package/{lib/edit-workflow.js → src/cli/edit-workflow.ts} +32 -11
- package/src/cli/index.ts +101 -0
- package/src/cli/main.ts +1376 -0
- package/{lib/skill-usage.js → src/cli/skill-usage.ts} +168 -94
- package/src/cli/skills.ts +386 -0
- package/{lib/update.js → src/cli/update.ts} +68 -27
- package/{lib/usage.js → src/cli/usage.ts} +167 -76
- package/src/core/audit.ts +53 -0
- package/{lib/detect.js → src/core/detect.ts} +100 -47
- package/src/core/index.ts +70 -0
- package/{lib/prompts.js → src/core/prompts.ts} +16 -2
- package/{lib/render-review.js → src/core/render-review.ts} +57 -25
- package/{lib/render.js → src/core/render.ts} +36 -10
- package/{lib/review-schema.js → src/core/review-schema.ts} +68 -5
- package/{lib/skills.js → src/core/skills.ts} +172 -343
- package/templates/workflow-py.yml.tmpl +2 -2
- package/templates/workflow-ts.yml.tmpl +2 -2
- package/templates/workflow.yml.tmpl +17 -8
|
@@ -23,10 +23,21 @@
|
|
|
23
23
|
// keep the model from inventing fields.
|
|
24
24
|
//
|
|
25
25
|
// Bumped via deliberate edit; not derived from a TypeScript type. The
|
|
26
|
-
// rendering side (
|
|
26
|
+
// rendering side (./render-review.ts) treats unknown fields permissively
|
|
27
27
|
// — schema and renderer can drift up to one minor version safely.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
// The JSON Schema shape is structurally rich (oneOf, enum, conditional
|
|
30
|
+
// required fields) and is consumed as a raw JSON object by Agent SDK
|
|
31
|
+
// validators that have their own runtime semantics. Typing it as
|
|
32
|
+
// `Record<string, unknown>` would erase the literal-property structure
|
|
33
|
+
// callers rely on for IDE navigation; typing each sub-object exactly
|
|
34
|
+
// would tightly couple every test that asserts a specific path. We use
|
|
35
|
+
// a structural alias `JSONSchemaObject` here so the export keeps its
|
|
36
|
+
// rich literal type (caller-visible field names) without forcing a
|
|
37
|
+
// schema-spec round-trip.
|
|
38
|
+
type JSONSchemaObject = Record<string, unknown>;
|
|
39
|
+
|
|
40
|
+
const FINDING_ITEM: JSONSchemaObject = {
|
|
30
41
|
type: 'object',
|
|
31
42
|
additionalProperties: false,
|
|
32
43
|
properties: {
|
|
@@ -55,7 +66,7 @@ const FINDING_ITEM = {
|
|
|
55
66
|
required: ['skill', 'summary'],
|
|
56
67
|
};
|
|
57
68
|
|
|
58
|
-
const PER_SKILL_SCAN_ITEM = {
|
|
69
|
+
const PER_SKILL_SCAN_ITEM: JSONSchemaObject = {
|
|
59
70
|
type: 'object',
|
|
60
71
|
additionalProperties: false,
|
|
61
72
|
properties: {
|
|
@@ -68,7 +79,7 @@ const PER_SKILL_SCAN_ITEM = {
|
|
|
68
79
|
required: ['skill', 'outcome'],
|
|
69
80
|
};
|
|
70
81
|
|
|
71
|
-
export const REVIEW_SCHEMA = {
|
|
82
|
+
export const REVIEW_SCHEMA: JSONSchemaObject = {
|
|
72
83
|
type: 'object',
|
|
73
84
|
additionalProperties: false,
|
|
74
85
|
properties: {
|
|
@@ -154,6 +165,58 @@ export const REVIEW_SCHEMA = {
|
|
|
154
165
|
// `--json-schema '<JSON>'` argument. Single-line (the workflow YAML uses
|
|
155
166
|
// the pipe block; single-quoted JSON inside that needs to stay flat to
|
|
156
167
|
// avoid YAML parser surprises with embedded newlines).
|
|
157
|
-
export function serializedReviewSchema() {
|
|
168
|
+
export function serializedReviewSchema(): string {
|
|
158
169
|
return JSON.stringify(REVIEW_SCHEMA);
|
|
159
170
|
}
|
|
171
|
+
|
|
172
|
+
// --- Schema-derived runtime types for renderReview() input ---
|
|
173
|
+
//
|
|
174
|
+
// The TypeScript types below mirror the JSON Schema shape above so that
|
|
175
|
+
// render-review.ts can consume the parsed JSON with structural typing.
|
|
176
|
+
// They are intentionally permissive (every field optional except where
|
|
177
|
+
// the schema's `required` list forces it) because the renderer is the
|
|
178
|
+
// last line of defense — malformed JSON should degrade rather than throw.
|
|
179
|
+
|
|
180
|
+
export type FindingSeverity = 'critical' | 'minor' | 'preexisting';
|
|
181
|
+
|
|
182
|
+
export interface ReviewFinding {
|
|
183
|
+
skill: string;
|
|
184
|
+
summary: string;
|
|
185
|
+
file?: string;
|
|
186
|
+
line?: number;
|
|
187
|
+
reasoning?: string;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface PerSkillScanItem {
|
|
191
|
+
skill: string;
|
|
192
|
+
outcome: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface DedicatedSection {
|
|
196
|
+
section_name: string;
|
|
197
|
+
skill: string;
|
|
198
|
+
findings: ReviewFinding[];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface ReviewSummaryCounts {
|
|
202
|
+
critical: number;
|
|
203
|
+
minor: number;
|
|
204
|
+
preexisting: number;
|
|
205
|
+
resolved_from_prior: number;
|
|
206
|
+
still_open: number;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export type ReviewStatusHeader = 'critical findings' | 'clean' | 'bare';
|
|
210
|
+
|
|
211
|
+
export interface ReviewData {
|
|
212
|
+
status_header: ReviewStatusHeader | string;
|
|
213
|
+
summary_counts: ReviewSummaryCounts;
|
|
214
|
+
per_skill_scan: PerSkillScanItem[];
|
|
215
|
+
critical_findings: ReviewFinding[];
|
|
216
|
+
minor_findings: ReviewFinding[];
|
|
217
|
+
preexisting_findings: ReviewFinding[];
|
|
218
|
+
skills_referenced: string[];
|
|
219
|
+
last_reviewed_sha: string;
|
|
220
|
+
dedicated_sections?: DedicatedSection[];
|
|
221
|
+
diagnostics?: string[];
|
|
222
|
+
}
|