@blockspool/core 0.2.0 → 0.3.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/package.json +1 -1
- package/dist/db/adapter.d.ts +0 -191
- package/dist/db/adapter.d.ts.map +0 -1
- package/dist/db/adapter.js +0 -40
- package/dist/db/adapter.js.map +0 -1
- package/dist/db/contract.d.ts +0 -47
- package/dist/db/contract.d.ts.map +0 -1
- package/dist/db/contract.js +0 -258
- package/dist/db/contract.js.map +0 -1
- package/dist/db/index.d.ts +0 -6
- package/dist/db/index.d.ts.map +0 -1
- package/dist/db/index.js +0 -7
- package/dist/db/index.js.map +0 -1
- package/dist/exec/index.d.ts +0 -5
- package/dist/exec/index.d.ts.map +0 -1
- package/dist/exec/index.js +0 -5
- package/dist/exec/index.js.map +0 -1
- package/dist/exec/types.d.ts +0 -64
- package/dist/exec/types.d.ts.map +0 -1
- package/dist/exec/types.js +0 -8
- package/dist/exec/types.js.map +0 -1
- package/dist/index.d.ts +0 -23
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -27
- package/dist/index.js.map +0 -1
- package/dist/repos/index.d.ts +0 -15
- package/dist/repos/index.d.ts.map +0 -1
- package/dist/repos/index.js +0 -11
- package/dist/repos/index.js.map +0 -1
- package/dist/repos/projects.d.ts +0 -41
- package/dist/repos/projects.d.ts.map +0 -1
- package/dist/repos/projects.js +0 -74
- package/dist/repos/projects.js.map +0 -1
- package/dist/repos/run_steps.d.ts +0 -152
- package/dist/repos/run_steps.d.ts.map +0 -1
- package/dist/repos/run_steps.js +0 -321
- package/dist/repos/run_steps.js.map +0 -1
- package/dist/repos/runs.d.ts +0 -92
- package/dist/repos/runs.d.ts.map +0 -1
- package/dist/repos/runs.js +0 -177
- package/dist/repos/runs.js.map +0 -1
- package/dist/repos/tickets.d.ts +0 -71
- package/dist/repos/tickets.d.ts.map +0 -1
- package/dist/repos/tickets.js +0 -128
- package/dist/repos/tickets.js.map +0 -1
- package/dist/scout/index.d.ts +0 -15
- package/dist/scout/index.d.ts.map +0 -1
- package/dist/scout/index.js +0 -381
- package/dist/scout/index.js.map +0 -1
- package/dist/scout/prompt.d.ts +0 -30
- package/dist/scout/prompt.d.ts.map +0 -1
- package/dist/scout/prompt.js +0 -101
- package/dist/scout/prompt.js.map +0 -1
- package/dist/scout/runner.d.ts +0 -36
- package/dist/scout/runner.d.ts.map +0 -1
- package/dist/scout/runner.js +0 -133
- package/dist/scout/runner.js.map +0 -1
- package/dist/scout/scanner.d.ts +0 -35
- package/dist/scout/scanner.d.ts.map +0 -1
- package/dist/scout/scanner.js +0 -164
- package/dist/scout/scanner.js.map +0 -1
- package/dist/scout/types.d.ts +0 -175
- package/dist/scout/types.d.ts.map +0 -1
- package/dist/scout/types.js +0 -44
- package/dist/scout/types.js.map +0 -1
- package/dist/services/index.d.ts +0 -9
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/index.js +0 -9
- package/dist/services/index.js.map +0 -1
- package/dist/services/qa.d.ts +0 -76
- package/dist/services/qa.d.ts.map +0 -1
- package/dist/services/qa.js +0 -239
- package/dist/services/qa.js.map +0 -1
- package/dist/services/scout.d.ts +0 -116
- package/dist/services/scout.d.ts.map +0 -1
- package/dist/services/scout.js +0 -203
- package/dist/services/scout.js.map +0 -1
- package/dist/utils/id.d.ts +0 -12
- package/dist/utils/id.d.ts.map +0 -1
- package/dist/utils/id.js +0 -24
- package/dist/utils/id.js.map +0 -1
- package/dist/utils/id.test.d.ts +0 -5
- package/dist/utils/id.test.d.ts.map +0 -1
- package/dist/utils/id.test.js +0 -173
- package/dist/utils/id.test.js.map +0 -1
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -6
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/json.d.ts +0 -9
- package/dist/utils/json.d.ts.map +0 -1
- package/dist/utils/json.js +0 -19
- package/dist/utils/json.js.map +0 -1
package/dist/scout/types.d.ts
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scout types - Shared type definitions for codebase scanning
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Proposal categories
|
|
6
|
-
*/
|
|
7
|
-
export type ProposalCategory = 'refactor' | 'docs' | 'test' | 'perf' | 'security';
|
|
8
|
-
/**
|
|
9
|
-
* Complexity levels
|
|
10
|
-
*/
|
|
11
|
-
export type ComplexityLevel = 'trivial' | 'simple' | 'moderate' | 'complex';
|
|
12
|
-
/**
|
|
13
|
-
* A ticket proposal generated by the scout
|
|
14
|
-
*/
|
|
15
|
-
export interface TicketProposal {
|
|
16
|
-
/** Unique ID (scout-{timestamp}-{random}) */
|
|
17
|
-
id: string;
|
|
18
|
-
/** Category of improvement */
|
|
19
|
-
category: ProposalCategory;
|
|
20
|
-
/** Short, actionable title */
|
|
21
|
-
title: string;
|
|
22
|
-
/** What needs to be done and why */
|
|
23
|
-
description: string;
|
|
24
|
-
/** Verifiable acceptance criteria */
|
|
25
|
-
acceptance_criteria: string[];
|
|
26
|
-
/** Commands to verify the fix */
|
|
27
|
-
verification_commands: string[];
|
|
28
|
-
/** Files that can be modified */
|
|
29
|
-
allowed_paths: string[];
|
|
30
|
-
/** Specific files identified for change */
|
|
31
|
-
files: string[];
|
|
32
|
-
/** Confidence score (0-100) */
|
|
33
|
-
confidence: number;
|
|
34
|
-
/** Impact score (1-10, optional) — how much this matters */
|
|
35
|
-
impact_score?: number;
|
|
36
|
-
/** Why this improvement matters */
|
|
37
|
-
rationale: string;
|
|
38
|
-
/** Estimated complexity */
|
|
39
|
-
estimated_complexity: ComplexityLevel;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Scout configuration options
|
|
43
|
-
*/
|
|
44
|
-
export interface ScoutOptions {
|
|
45
|
-
/** Glob pattern for files to scan (e.g., "src/**") */
|
|
46
|
-
scope: string;
|
|
47
|
-
/** Filter to specific categories */
|
|
48
|
-
types?: ProposalCategory[];
|
|
49
|
-
/** Categories to exclude */
|
|
50
|
-
excludeTypes?: ProposalCategory[];
|
|
51
|
-
/** Glob patterns to exclude */
|
|
52
|
-
exclude?: string[];
|
|
53
|
-
/** Maximum proposals to generate (default: 10) */
|
|
54
|
-
maxProposals?: number;
|
|
55
|
-
/** Minimum confidence threshold (default: 50) */
|
|
56
|
-
minConfidence?: number;
|
|
57
|
-
/** Working directory (default: cwd) */
|
|
58
|
-
projectPath?: string;
|
|
59
|
-
/** Timeout per batch in ms (default: 120000) */
|
|
60
|
-
timeoutMs?: number;
|
|
61
|
-
/** Cancellation signal */
|
|
62
|
-
signal?: AbortSignal;
|
|
63
|
-
/** Progress callback */
|
|
64
|
-
onProgress?: (progress: ScoutProgress) => void;
|
|
65
|
-
/** Recently completed ticket titles to avoid duplicates */
|
|
66
|
-
recentlyCompletedTitles?: string[];
|
|
67
|
-
/** Model to use (default: opus) */
|
|
68
|
-
model?: 'haiku' | 'sonnet' | 'opus';
|
|
69
|
-
/** Custom prompt from formula — tells the AI what to focus on */
|
|
70
|
-
customPrompt?: string;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Progress update during scanning
|
|
74
|
-
*/
|
|
75
|
-
export interface ScoutProgress {
|
|
76
|
-
/** Current phase */
|
|
77
|
-
phase: 'discovering' | 'analyzing' | 'generating' | 'complete';
|
|
78
|
-
/** Files scanned so far */
|
|
79
|
-
filesScanned: number;
|
|
80
|
-
/** Total files to scan */
|
|
81
|
-
totalFiles: number;
|
|
82
|
-
/** Proposals found so far */
|
|
83
|
-
proposalsFound: number;
|
|
84
|
-
/** Current batch number */
|
|
85
|
-
currentBatch: number;
|
|
86
|
-
/** Total batches */
|
|
87
|
-
totalBatches: number;
|
|
88
|
-
/** Current file being processed */
|
|
89
|
-
currentFile?: string;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Scout result
|
|
93
|
-
*/
|
|
94
|
-
export interface ScoutResult {
|
|
95
|
-
/** Whether the scan completed successfully */
|
|
96
|
-
success: boolean;
|
|
97
|
-
/** Generated proposals */
|
|
98
|
-
proposals: TicketProposal[];
|
|
99
|
-
/** Any errors encountered */
|
|
100
|
-
errors: string[];
|
|
101
|
-
/** Total files scanned */
|
|
102
|
-
scannedFiles: number;
|
|
103
|
-
/** Total scan duration in ms */
|
|
104
|
-
scanDurationMs: number;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Schema for validating LLM output
|
|
108
|
-
*/
|
|
109
|
-
export declare const PROPOSAL_SCHEMA: {
|
|
110
|
-
readonly type: "object";
|
|
111
|
-
readonly properties: {
|
|
112
|
-
readonly proposals: {
|
|
113
|
-
readonly type: "array";
|
|
114
|
-
readonly items: {
|
|
115
|
-
readonly type: "object";
|
|
116
|
-
readonly required: readonly ["category", "title", "description", "acceptance_criteria", "verification_commands", "allowed_paths", "files", "confidence", "rationale", "estimated_complexity"];
|
|
117
|
-
readonly properties: {
|
|
118
|
-
readonly category: {
|
|
119
|
-
readonly type: "string";
|
|
120
|
-
readonly enum: readonly ["refactor", "docs", "test", "perf", "security"];
|
|
121
|
-
};
|
|
122
|
-
readonly title: {
|
|
123
|
-
readonly type: "string";
|
|
124
|
-
};
|
|
125
|
-
readonly description: {
|
|
126
|
-
readonly type: "string";
|
|
127
|
-
};
|
|
128
|
-
readonly acceptance_criteria: {
|
|
129
|
-
readonly type: "array";
|
|
130
|
-
readonly items: {
|
|
131
|
-
readonly type: "string";
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
readonly verification_commands: {
|
|
135
|
-
readonly type: "array";
|
|
136
|
-
readonly items: {
|
|
137
|
-
readonly type: "string";
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
readonly allowed_paths: {
|
|
141
|
-
readonly type: "array";
|
|
142
|
-
readonly items: {
|
|
143
|
-
readonly type: "string";
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
readonly files: {
|
|
147
|
-
readonly type: "array";
|
|
148
|
-
readonly items: {
|
|
149
|
-
readonly type: "string";
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
readonly confidence: {
|
|
153
|
-
readonly type: "number";
|
|
154
|
-
readonly minimum: 0;
|
|
155
|
-
readonly maximum: 100;
|
|
156
|
-
};
|
|
157
|
-
readonly impact_score: {
|
|
158
|
-
readonly type: "number";
|
|
159
|
-
readonly minimum: 1;
|
|
160
|
-
readonly maximum: 10;
|
|
161
|
-
};
|
|
162
|
-
readonly rationale: {
|
|
163
|
-
readonly type: "string";
|
|
164
|
-
};
|
|
165
|
-
readonly estimated_complexity: {
|
|
166
|
-
readonly type: "string";
|
|
167
|
-
readonly enum: readonly ["trivial", "simple", "moderate", "complex"];
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
readonly required: readonly ["proposals"];
|
|
174
|
-
};
|
|
175
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/scout/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,8BAA8B;IAC9B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,iCAAiC;IACjC,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,i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AM,CAAC;IACrB,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,0BAA0B;IAC1B,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,6BAA6B;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,0BAA0B;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoClB,CAAC"}
|
package/dist/scout/types.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scout types - Shared type definitions for codebase scanning
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Schema for validating LLM output
|
|
6
|
-
*/
|
|
7
|
-
export const PROPOSAL_SCHEMA = {
|
|
8
|
-
type: 'object',
|
|
9
|
-
properties: {
|
|
10
|
-
proposals: {
|
|
11
|
-
type: 'array',
|
|
12
|
-
items: {
|
|
13
|
-
type: 'object',
|
|
14
|
-
required: [
|
|
15
|
-
'category',
|
|
16
|
-
'title',
|
|
17
|
-
'description',
|
|
18
|
-
'acceptance_criteria',
|
|
19
|
-
'verification_commands',
|
|
20
|
-
'allowed_paths',
|
|
21
|
-
'files',
|
|
22
|
-
'confidence',
|
|
23
|
-
'rationale',
|
|
24
|
-
'estimated_complexity',
|
|
25
|
-
],
|
|
26
|
-
properties: {
|
|
27
|
-
category: { type: 'string', enum: ['refactor', 'docs', 'test', 'perf', 'security'] },
|
|
28
|
-
title: { type: 'string' },
|
|
29
|
-
description: { type: 'string' },
|
|
30
|
-
acceptance_criteria: { type: 'array', items: { type: 'string' } },
|
|
31
|
-
verification_commands: { type: 'array', items: { type: 'string' } },
|
|
32
|
-
allowed_paths: { type: 'array', items: { type: 'string' } },
|
|
33
|
-
files: { type: 'array', items: { type: 'string' } },
|
|
34
|
-
confidence: { type: 'number', minimum: 0, maximum: 100 },
|
|
35
|
-
impact_score: { type: 'number', minimum: 1, maximum: 10 },
|
|
36
|
-
rationale: { type: 'string' },
|
|
37
|
-
estimated_complexity: { type: 'string', enum: ['trivial', 'simple', 'moderate', 'complex'] },
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
required: ['proposals'],
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=types.js.map
|
package/dist/scout/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/scout/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AA8GH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE;oBACR,UAAU;oBACV,OAAO;oBACP,aAAa;oBACb,qBAAqB;oBACrB,uBAAuB;oBACvB,eAAe;oBACf,OAAO;oBACP,YAAY;oBACZ,WAAW;oBACX,sBAAsB;iBACvB;gBACD,UAAU,EAAE;oBACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE;oBACpF,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC/B,mBAAmB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;oBACjE,qBAAqB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;oBACnE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;oBAC3D,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;oBACnD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE;oBACxD,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;oBACzD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC7B,oBAAoB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE;iBAC7F;aACF;SACF;KACF;IACD,QAAQ,EAAE,CAAC,WAAW,CAAC;CACf,CAAC"}
|
package/dist/services/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Service exports
|
|
3
|
-
*
|
|
4
|
-
* Services provide business logic orchestration.
|
|
5
|
-
* They use repositories for data access and are dependency-injected for testability.
|
|
6
|
-
*/
|
|
7
|
-
export { scoutRepo, approveProposals, type ScoutDeps, type ScoutRepoOptions, type ScoutRepoResult, type ScoutProgress, type GitService, type Logger, } from './scout.js';
|
|
8
|
-
export { runQa, getQaRunDetails, type QaDeps, type QaLogger, type QaCommand, type QaConfig, type QaArtifactsConfig, type QaRetryConfig, type QaRunOptions, type QaRunResult, } from './qa.js';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,MAAM,GACZ,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,KAAK,EACL,eAAe,EACf,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,SAAS,CAAC"}
|
package/dist/services/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Service exports
|
|
3
|
-
*
|
|
4
|
-
* Services provide business logic orchestration.
|
|
5
|
-
* They use repositories for data access and are dependency-injected for testability.
|
|
6
|
-
*/
|
|
7
|
-
export { scoutRepo, approveProposals, } from './scout.js';
|
|
8
|
-
export { runQa, getQaRunDetails, } from './qa.js';
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,SAAS,EACT,gBAAgB,GAOjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,KAAK,EACL,eAAe,GAShB,MAAM,SAAS,CAAC"}
|
package/dist/services/qa.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* QA Service - Run local QA commands and record results
|
|
3
|
-
*
|
|
4
|
-
* This is pure orchestration: no FS writes, no raw SQL.
|
|
5
|
-
* Uses repos + ExecRunner for all operations.
|
|
6
|
-
*/
|
|
7
|
-
import type { DatabaseAdapter } from '../db/adapter.js';
|
|
8
|
-
import type { ExecRunner } from '../exec/types.js';
|
|
9
|
-
import * as runs from '../repos/runs.js';
|
|
10
|
-
import * as runSteps from '../repos/run_steps.js';
|
|
11
|
-
export interface QaLogger {
|
|
12
|
-
info: (msg: string) => void;
|
|
13
|
-
warn?: (msg: string) => void;
|
|
14
|
-
error: (msg: string) => void;
|
|
15
|
-
debug?: (msg: string) => void;
|
|
16
|
-
}
|
|
17
|
-
export interface QaCommand {
|
|
18
|
-
name: string;
|
|
19
|
-
cmd: string;
|
|
20
|
-
cwd?: string;
|
|
21
|
-
env?: Record<string, string | undefined>;
|
|
22
|
-
timeoutMs?: number;
|
|
23
|
-
}
|
|
24
|
-
export interface QaArtifactsConfig {
|
|
25
|
-
dir: string;
|
|
26
|
-
maxLogBytes: number;
|
|
27
|
-
tailBytes: number;
|
|
28
|
-
}
|
|
29
|
-
export interface QaRetryConfig {
|
|
30
|
-
enabled: boolean;
|
|
31
|
-
maxAttempts: number;
|
|
32
|
-
}
|
|
33
|
-
export interface QaConfig {
|
|
34
|
-
commands: QaCommand[];
|
|
35
|
-
artifacts: QaArtifactsConfig;
|
|
36
|
-
retry: QaRetryConfig;
|
|
37
|
-
}
|
|
38
|
-
export interface QaDeps {
|
|
39
|
-
db: DatabaseAdapter;
|
|
40
|
-
exec: ExecRunner;
|
|
41
|
-
logger: QaLogger;
|
|
42
|
-
}
|
|
43
|
-
export interface QaRunOptions {
|
|
44
|
-
projectId: string;
|
|
45
|
-
repoRoot: string;
|
|
46
|
-
config: QaConfig;
|
|
47
|
-
maxAttemptsOverride?: number;
|
|
48
|
-
signal?: AbortSignal;
|
|
49
|
-
}
|
|
50
|
-
export interface QaRunResult {
|
|
51
|
-
runId: string;
|
|
52
|
-
projectId: string;
|
|
53
|
-
status: 'success' | 'failed' | 'canceled';
|
|
54
|
-
attempts: number;
|
|
55
|
-
latestAttempt: number;
|
|
56
|
-
failedAt?: {
|
|
57
|
-
attempt: number;
|
|
58
|
-
stepName: string;
|
|
59
|
-
};
|
|
60
|
-
startedAtMs: number;
|
|
61
|
-
endedAtMs: number;
|
|
62
|
-
durationMs: number;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Run QA commands and record results
|
|
66
|
-
*/
|
|
67
|
-
export declare function runQa(deps: QaDeps, opts: QaRunOptions): Promise<QaRunResult>;
|
|
68
|
-
/**
|
|
69
|
-
* Get QA run details with step information
|
|
70
|
-
*/
|
|
71
|
-
export declare function getQaRunDetails(db: DatabaseAdapter, runId: string): Promise<{
|
|
72
|
-
run: runs.Run | null;
|
|
73
|
-
steps: runSteps.RunStep[];
|
|
74
|
-
summary: runSteps.StepSummary;
|
|
75
|
-
} | null>;
|
|
76
|
-
//# sourceMappingURL=qa.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"qa.d.ts","sourceRoot":"","sources":["../../src/services/qa.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAA0B,MAAM,kBAAkB,CAAC;AAE3E,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAElD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAA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AC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAyBD;;GAEG;AACH,wBAAsB,KAAK,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,WAAW,CAAC,CAmOtB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,eAAe,EACnB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;IACT,GAAG,EAAE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;IAC1B,OAAO,EAAE,QAAQ,CAAC,WAAW,CAAC;CAC/B,GAAG,IAAI,CAAC,CAQR"}
|
package/dist/services/qa.js
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* QA Service - Run local QA commands and record results
|
|
3
|
-
*
|
|
4
|
-
* This is pure orchestration: no FS writes, no raw SQL.
|
|
5
|
-
* Uses repos + ExecRunner for all operations.
|
|
6
|
-
*/
|
|
7
|
-
import * as path from 'node:path';
|
|
8
|
-
import * as runs from '../repos/runs.js';
|
|
9
|
-
import * as runSteps from '../repos/run_steps.js';
|
|
10
|
-
function resolveCwd(repoRootAbs, cwd) {
|
|
11
|
-
if (!cwd || cwd === '.')
|
|
12
|
-
return repoRootAbs;
|
|
13
|
-
return path.isAbsolute(cwd) ? cwd : path.join(repoRootAbs, cwd);
|
|
14
|
-
}
|
|
15
|
-
function execStatusToStepStatus(exec) {
|
|
16
|
-
if (exec.status === 'success')
|
|
17
|
-
return 'success';
|
|
18
|
-
if (exec.status === 'canceled')
|
|
19
|
-
return 'canceled';
|
|
20
|
-
return 'failed';
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Extract flat fields from ExecOutput for repo methods
|
|
24
|
-
*/
|
|
25
|
-
function flattenOutput(output, prefix) {
|
|
26
|
-
return {
|
|
27
|
-
[`${prefix}Path`]: output.path,
|
|
28
|
-
[`${prefix}Bytes`]: output.bytes,
|
|
29
|
-
[`${prefix}Truncated`]: output.truncated,
|
|
30
|
-
[`${prefix}Tail`]: output.tail,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Run QA commands and record results
|
|
35
|
-
*/
|
|
36
|
-
export async function runQa(deps, opts) {
|
|
37
|
-
const { db, exec, logger } = deps;
|
|
38
|
-
const { projectId, repoRoot, config, signal } = opts;
|
|
39
|
-
if (!config.commands?.length) {
|
|
40
|
-
throw new Error('QA config has no commands. Add qa.commands to .blockspool/config.json');
|
|
41
|
-
}
|
|
42
|
-
// Validate unique step names
|
|
43
|
-
const names = new Set();
|
|
44
|
-
for (const c of config.commands) {
|
|
45
|
-
if (!c.name?.trim())
|
|
46
|
-
throw new Error('QA command is missing a name');
|
|
47
|
-
if (!c.cmd?.trim())
|
|
48
|
-
throw new Error(`QA command "${c.name}" is missing cmd`);
|
|
49
|
-
if (names.has(c.name))
|
|
50
|
-
throw new Error(`Duplicate QA command name: "${c.name}"`);
|
|
51
|
-
names.add(c.name);
|
|
52
|
-
}
|
|
53
|
-
const startedAtMs = Date.now();
|
|
54
|
-
// Determine max attempts
|
|
55
|
-
const maxAttempts = opts.maxAttemptsOverride ??
|
|
56
|
-
(config.retry.enabled ? config.retry.maxAttempts : 1);
|
|
57
|
-
// Create the run
|
|
58
|
-
const run = await runs.create(db, {
|
|
59
|
-
projectId,
|
|
60
|
-
type: 'qa',
|
|
61
|
-
maxIterations: maxAttempts,
|
|
62
|
-
metadata: {
|
|
63
|
-
maxAttempts,
|
|
64
|
-
commandCount: config.commands.length,
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
logger.info(`QA run started: ${run.id}`);
|
|
68
|
-
let latestAttempt = 1;
|
|
69
|
-
let finalStatus = 'failed';
|
|
70
|
-
let failedAt;
|
|
71
|
-
// Check for early cancellation
|
|
72
|
-
if (signal?.aborted) {
|
|
73
|
-
await runs.markFailure(db, run.id, 'Canceled before start', { attempts: 0 });
|
|
74
|
-
return {
|
|
75
|
-
runId: run.id,
|
|
76
|
-
projectId,
|
|
77
|
-
status: 'canceled',
|
|
78
|
-
attempts: 0,
|
|
79
|
-
latestAttempt: 0,
|
|
80
|
-
startedAtMs,
|
|
81
|
-
endedAtMs: Date.now(),
|
|
82
|
-
durationMs: Date.now() - startedAtMs,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
// Attempt loop
|
|
86
|
-
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
87
|
-
latestAttempt = attempt;
|
|
88
|
-
logger.info(`Attempt ${attempt}/${maxAttempts}`);
|
|
89
|
-
// Pre-create steps as queued
|
|
90
|
-
const createdSteps = await runSteps.createMany(db, run.id, config.commands.map((c) => ({
|
|
91
|
-
name: c.name,
|
|
92
|
-
cmd: c.cmd,
|
|
93
|
-
cwd: c.cwd ?? '.',
|
|
94
|
-
timeoutMs: c.timeoutMs,
|
|
95
|
-
})), attempt);
|
|
96
|
-
let attemptFailed = false;
|
|
97
|
-
for (const step of createdSteps) {
|
|
98
|
-
// Check for cancellation before each step
|
|
99
|
-
if (signal?.aborted) {
|
|
100
|
-
await runSteps.markCanceled(db, step.id, 'Canceled by user');
|
|
101
|
-
// Cancel remaining steps
|
|
102
|
-
for (const remaining of createdSteps) {
|
|
103
|
-
if (remaining.ordinal > step.ordinal) {
|
|
104
|
-
await runSteps.markCanceled(db, remaining.id, 'Canceled by user');
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
finalStatus = 'canceled';
|
|
108
|
-
failedAt = { attempt, stepName: step.name };
|
|
109
|
-
attemptFailed = true;
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
await runSteps.markStarted(db, step.id);
|
|
113
|
-
const cmdCfg = config.commands[step.ordinal];
|
|
114
|
-
const cwdAbs = resolveCwd(repoRoot, cmdCfg.cwd ?? step.cwd ?? '.');
|
|
115
|
-
const execRes = await exec.run({
|
|
116
|
-
cmd: cmdCfg.cmd,
|
|
117
|
-
cwd: cwdAbs,
|
|
118
|
-
env: cmdCfg.env,
|
|
119
|
-
timeoutMs: cmdCfg.timeoutMs ?? step.timeoutMs ?? undefined,
|
|
120
|
-
signal,
|
|
121
|
-
repoRoot,
|
|
122
|
-
artifactsDir: config.artifacts.dir,
|
|
123
|
-
runId: run.id,
|
|
124
|
-
attempt,
|
|
125
|
-
stepName: step.name,
|
|
126
|
-
ordinal: step.ordinal,
|
|
127
|
-
maxLogBytes: config.artifacts.maxLogBytes,
|
|
128
|
-
tailBytes: config.artifacts.tailBytes,
|
|
129
|
-
});
|
|
130
|
-
const stepStatus = execStatusToStepStatus(execRes);
|
|
131
|
-
if (stepStatus === 'success') {
|
|
132
|
-
await runSteps.markSuccess(db, step.id, {
|
|
133
|
-
exitCode: execRes.exitCode ?? 0,
|
|
134
|
-
stdoutPath: execRes.stdout.path,
|
|
135
|
-
stderrPath: execRes.stderr.path,
|
|
136
|
-
stdoutBytes: execRes.stdout.bytes,
|
|
137
|
-
stderrBytes: execRes.stderr.bytes,
|
|
138
|
-
stdoutTruncated: execRes.stdout.truncated,
|
|
139
|
-
stderrTruncated: execRes.stderr.truncated,
|
|
140
|
-
stdoutTail: execRes.stdout.tail,
|
|
141
|
-
stderrTail: execRes.stderr.tail,
|
|
142
|
-
metadata: { execStatus: execRes.status },
|
|
143
|
-
});
|
|
144
|
-
logger.info(` ✓ ${step.name}`);
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
147
|
-
// Failed or canceled
|
|
148
|
-
attemptFailed = true;
|
|
149
|
-
const errorMessage = execRes.errorMessage ??
|
|
150
|
-
(execRes.status === 'timeout'
|
|
151
|
-
? `Timed out after ${cmdCfg.timeoutMs ?? step.timeoutMs ?? 'unknown'}ms`
|
|
152
|
-
: execRes.status === 'canceled'
|
|
153
|
-
? 'Canceled'
|
|
154
|
-
: `Exited with code ${execRes.exitCode ?? 'unknown'}`);
|
|
155
|
-
if (stepStatus === 'canceled') {
|
|
156
|
-
await runSteps.markCanceled(db, step.id, errorMessage);
|
|
157
|
-
finalStatus = 'canceled';
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
await runSteps.markFailed(db, step.id, {
|
|
161
|
-
exitCode: execRes.exitCode ?? undefined,
|
|
162
|
-
signal: execRes.signal ?? undefined,
|
|
163
|
-
errorMessage,
|
|
164
|
-
stdoutPath: execRes.stdout.path,
|
|
165
|
-
stderrPath: execRes.stderr.path,
|
|
166
|
-
stdoutBytes: execRes.stdout.bytes,
|
|
167
|
-
stderrBytes: execRes.stderr.bytes,
|
|
168
|
-
stdoutTruncated: execRes.stdout.truncated,
|
|
169
|
-
stderrTruncated: execRes.stderr.truncated,
|
|
170
|
-
stdoutTail: execRes.stdout.tail,
|
|
171
|
-
stderrTail: execRes.stderr.tail,
|
|
172
|
-
metadata: { execStatus: execRes.status },
|
|
173
|
-
});
|
|
174
|
-
finalStatus = 'failed';
|
|
175
|
-
}
|
|
176
|
-
logger.error(` ✗ ${step.name}: ${errorMessage}`);
|
|
177
|
-
failedAt = { attempt, stepName: step.name };
|
|
178
|
-
// Cancel remaining queued steps in this attempt
|
|
179
|
-
for (const remaining of createdSteps) {
|
|
180
|
-
if (remaining.ordinal <= step.ordinal)
|
|
181
|
-
continue;
|
|
182
|
-
await runSteps.markSkipped(db, remaining.id, `Skipped (previous step "${step.name}" ${stepStatus})`);
|
|
183
|
-
}
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
if (!attemptFailed) {
|
|
187
|
-
finalStatus = 'success';
|
|
188
|
-
failedAt = undefined;
|
|
189
|
-
break;
|
|
190
|
-
}
|
|
191
|
-
// If canceled, don't retry
|
|
192
|
-
if (finalStatus === 'canceled') {
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
const endedAtMs = Date.now();
|
|
197
|
-
// Finalize run
|
|
198
|
-
if (finalStatus === 'success') {
|
|
199
|
-
await runs.markSuccess(db, run.id, {
|
|
200
|
-
attempts: latestAttempt,
|
|
201
|
-
durationMs: endedAtMs - startedAtMs,
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
const errorMsg = failedAt
|
|
206
|
-
? `Failed at ${failedAt.stepName} (attempt ${failedAt.attempt})`
|
|
207
|
-
: finalStatus === 'canceled'
|
|
208
|
-
? 'QA canceled'
|
|
209
|
-
: 'QA failed';
|
|
210
|
-
await runs.markFailure(db, run.id, errorMsg, {
|
|
211
|
-
attempts: latestAttempt,
|
|
212
|
-
failedAt,
|
|
213
|
-
durationMs: endedAtMs - startedAtMs,
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
return {
|
|
217
|
-
runId: run.id,
|
|
218
|
-
projectId,
|
|
219
|
-
status: finalStatus,
|
|
220
|
-
attempts: latestAttempt,
|
|
221
|
-
latestAttempt,
|
|
222
|
-
failedAt,
|
|
223
|
-
startedAtMs,
|
|
224
|
-
endedAtMs,
|
|
225
|
-
durationMs: endedAtMs - startedAtMs,
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Get QA run details with step information
|
|
230
|
-
*/
|
|
231
|
-
export async function getQaRunDetails(db, runId) {
|
|
232
|
-
const run = await runs.getById(db, runId);
|
|
233
|
-
if (!run)
|
|
234
|
-
return null;
|
|
235
|
-
const steps = await runSteps.listByRun(db, runId);
|
|
236
|
-
const summary = await runSteps.getSummary(db, runId);
|
|
237
|
-
return { run, steps, summary };
|
|
238
|
-
}
|
|
239
|
-
//# sourceMappingURL=qa.js.map
|
package/dist/services/qa.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"qa.js","sourceRoot":"","sources":["../../src/services/qa.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAKlC,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,QAAQ,MAA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