@cat-factory/contracts 0.178.0 → 0.180.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/dist/bug-hunt.d.ts +199 -0
- package/dist/bug-hunt.d.ts.map +1 -0
- package/dist/bug-hunt.js +150 -0
- package/dist/bug-hunt.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/provider-config.d.ts +24 -0
- package/dist/provider-config.d.ts.map +1 -1
- package/dist/provider-config.js +21 -0
- package/dist/provider-config.js.map +1 -1
- package/dist/routes/bug-hunt.d.ts +2689 -0
- package/dist/routes/bug-hunt.d.ts.map +1 -0
- package/dist/routes/bug-hunt.js +43 -0
- package/dist/routes/bug-hunt.js.map +1 -0
- package/dist/routes/environments.d.ts +8 -0
- package/dist/routes/environments.d.ts.map +1 -1
- package/dist/routes/index.d.ts +1 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/runners.d.ts +4 -0
- package/dist/routes/runners.d.ts.map +1 -1
- package/dist/routes/user-secret.d.ts +4 -0
- package/dist/routes/user-secret.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* One selectable board on a tracker — a Jira project, a Linear team, a GitHub repository.
|
|
4
|
+
* `id` is vendor-shaped and handed straight back as the hunt's board scope, so the SPA
|
|
5
|
+
* never has to know which of the three notions a source uses.
|
|
6
|
+
*/
|
|
7
|
+
export declare const trackerBoardSchema: v.ObjectSchema<{
|
|
8
|
+
readonly id: v.StringSchema<undefined>;
|
|
9
|
+
readonly name: v.StringSchema<undefined>;
|
|
10
|
+
/** A short vendor-side key/slug shown beside the name to disambiguate (may be empty). */
|
|
11
|
+
readonly key: v.StringSchema<undefined>;
|
|
12
|
+
}, undefined>;
|
|
13
|
+
export type TrackerBoard = v.InferOutput<typeof trackerBoardSchema>;
|
|
14
|
+
export declare const trackerBoardsViewSchema: v.ObjectSchema<{
|
|
15
|
+
readonly source: v.PicklistSchema<["jira", "github", "linear"], undefined>;
|
|
16
|
+
readonly boards: v.ArraySchema<v.ObjectSchema<{
|
|
17
|
+
readonly id: v.StringSchema<undefined>;
|
|
18
|
+
readonly name: v.StringSchema<undefined>;
|
|
19
|
+
/** A short vendor-side key/slug shown beside the name to disambiguate (may be empty). */
|
|
20
|
+
readonly key: v.StringSchema<undefined>;
|
|
21
|
+
}, undefined>, undefined>;
|
|
22
|
+
}, undefined>;
|
|
23
|
+
export type TrackerBoardsView = v.InferOutput<typeof trackerBoardsViewSchema>;
|
|
24
|
+
/** How sure the ranking model is about a candidate's assessment. */
|
|
25
|
+
export declare const bugHuntConfidenceSchema: v.PicklistSchema<["high", "medium", "low"], undefined>;
|
|
26
|
+
export type BugHuntConfidence = v.InferOutput<typeof bugHuntConfidenceSchema>;
|
|
27
|
+
/**
|
|
28
|
+
* The model's assessment of ONE candidate. `impact` and `complexity` are 1–5 judgements;
|
|
29
|
+
* `score` is NOT the model's — it is computed deterministically from the two, so the
|
|
30
|
+
* ordering is reproducible and a model that can't do arithmetic can't reorder the list.
|
|
31
|
+
*/
|
|
32
|
+
export declare const bugHuntAnalysisSchema: v.ObjectSchema<{
|
|
33
|
+
/** How much fixing this bug is worth (1 = cosmetic, 5 = users blocked). */
|
|
34
|
+
readonly impact: v.NumberSchema<undefined>;
|
|
35
|
+
/** How hard the fix looks (1 = a contained change, 5 = deep or unclear). */
|
|
36
|
+
readonly complexity: v.NumberSchema<undefined>;
|
|
37
|
+
/** Impact per unit of effort, computed by `bugHuntScore` — never taken from the model. */
|
|
38
|
+
readonly score: v.NumberSchema<undefined>;
|
|
39
|
+
readonly confidence: v.PicklistSchema<["high", "medium", "low"], undefined>;
|
|
40
|
+
/** One or two sentences on why this ratio — the reason a human can argue with. */
|
|
41
|
+
readonly rationale: v.StringSchema<undefined>;
|
|
42
|
+
/** Whether the model would actually pick this one up now. */
|
|
43
|
+
readonly recommended: v.BooleanSchema<undefined>;
|
|
44
|
+
}, undefined>;
|
|
45
|
+
export type BugHuntAnalysis = v.InferOutput<typeof bugHuntAnalysisSchema>;
|
|
46
|
+
/**
|
|
47
|
+
* One open bug read off a tracker board — the FACTS, all of them provider-supplied. Richer
|
|
48
|
+
* than a `TaskSearchResult` (which is deliberately lean for a picker row) but still bounded:
|
|
49
|
+
* a provider gathers the whole candidate set in ONE vendor call, so a 40-candidate hunt costs
|
|
50
|
+
* one request, and `description` is truncated because the ranking only needs enough of the
|
|
51
|
+
* report to judge impact and effort.
|
|
52
|
+
*/
|
|
53
|
+
export declare const bugCandidateSchema: v.ObjectSchema<{
|
|
54
|
+
readonly source: v.PicklistSchema<["jira", "github", "linear"], undefined>;
|
|
55
|
+
/** The source's canonical key for the issue (a valid import ref). */
|
|
56
|
+
readonly externalId: v.StringSchema<undefined>;
|
|
57
|
+
readonly title: v.StringSchema<undefined>;
|
|
58
|
+
readonly url: v.StringSchema<undefined>;
|
|
59
|
+
/** Workflow status name (may be empty). */
|
|
60
|
+
readonly status: v.StringSchema<undefined>;
|
|
61
|
+
/** Issue type name (may be empty for sources with no type notion). */
|
|
62
|
+
readonly type: v.StringSchema<undefined>;
|
|
63
|
+
/** Priority name, or null when the source records none. */
|
|
64
|
+
readonly priority: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
65
|
+
readonly labels: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
66
|
+
/** A truncated excerpt of the issue body (may be empty). */
|
|
67
|
+
readonly description: v.StringSchema<undefined>;
|
|
68
|
+
/** ISO-8601 creation timestamp (empty when the source doesn't report one). */
|
|
69
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
70
|
+
/** How many comments the issue has accumulated — a cheap proxy for how contested it is. */
|
|
71
|
+
readonly commentCount: v.NumberSchema<undefined>;
|
|
72
|
+
}, undefined>;
|
|
73
|
+
export type BugCandidate = v.InferOutput<typeof bugCandidateSchema>;
|
|
74
|
+
/**
|
|
75
|
+
* One ranked candidate: the tracker facts plus the model's assessment, kept as separate
|
|
76
|
+
* halves on purpose. `analysis` is null for a candidate the ranking didn't cover — either the
|
|
77
|
+
* whole analysis was unavailable, or the model silently dropped that row. A missing
|
|
78
|
+
* assessment must read as "not assessed", never as a zero score.
|
|
79
|
+
*/
|
|
80
|
+
export declare const bugHuntCandidateSchema: v.ObjectSchema<{
|
|
81
|
+
readonly source: v.PicklistSchema<["jira", "github", "linear"], undefined>;
|
|
82
|
+
/** The source's canonical key for the issue (a valid import ref). */
|
|
83
|
+
readonly externalId: v.StringSchema<undefined>;
|
|
84
|
+
readonly title: v.StringSchema<undefined>;
|
|
85
|
+
readonly url: v.StringSchema<undefined>;
|
|
86
|
+
/** Workflow status name (may be empty). */
|
|
87
|
+
readonly status: v.StringSchema<undefined>;
|
|
88
|
+
/** Issue type name (may be empty for sources with no type notion). */
|
|
89
|
+
readonly type: v.StringSchema<undefined>;
|
|
90
|
+
/** Priority name, or null when the source records none. */
|
|
91
|
+
readonly priority: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
92
|
+
readonly labels: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
93
|
+
/** A truncated excerpt of the issue body (may be empty). */
|
|
94
|
+
readonly description: v.StringSchema<undefined>;
|
|
95
|
+
/** ISO-8601 creation timestamp (empty when the source doesn't report one). */
|
|
96
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
97
|
+
/** How many comments the issue has accumulated — a cheap proxy for how contested it is. */
|
|
98
|
+
readonly commentCount: v.NumberSchema<undefined>;
|
|
99
|
+
readonly analysis: v.NullableSchema<v.ObjectSchema<{
|
|
100
|
+
/** How much fixing this bug is worth (1 = cosmetic, 5 = users blocked). */
|
|
101
|
+
readonly impact: v.NumberSchema<undefined>;
|
|
102
|
+
/** How hard the fix looks (1 = a contained change, 5 = deep or unclear). */
|
|
103
|
+
readonly complexity: v.NumberSchema<undefined>;
|
|
104
|
+
/** Impact per unit of effort, computed by `bugHuntScore` — never taken from the model. */
|
|
105
|
+
readonly score: v.NumberSchema<undefined>;
|
|
106
|
+
readonly confidence: v.PicklistSchema<["high", "medium", "low"], undefined>;
|
|
107
|
+
/** One or two sentences on why this ratio — the reason a human can argue with. */
|
|
108
|
+
readonly rationale: v.StringSchema<undefined>;
|
|
109
|
+
/** Whether the model would actually pick this one up now. */
|
|
110
|
+
readonly recommended: v.BooleanSchema<undefined>;
|
|
111
|
+
}, undefined>, undefined>;
|
|
112
|
+
}, undefined>;
|
|
113
|
+
export type BugHuntCandidate = v.InferOutput<typeof bugHuntCandidateSchema>;
|
|
114
|
+
/** Why a hunt came back without a ranking, so the UI states the limitation instead of implying one. */
|
|
115
|
+
export declare const bugHuntAnalysisStatusSchema: v.PicklistSchema<["ranked", "unavailable", "failed", "over_budget", "empty"], undefined>;
|
|
116
|
+
export type BugHuntAnalysisStatus = v.InferOutput<typeof bugHuntAnalysisStatusSchema>;
|
|
117
|
+
export declare const bugHuntResultSchema: v.ObjectSchema<{
|
|
118
|
+
readonly source: v.PicklistSchema<["jira", "github", "linear"], undefined>;
|
|
119
|
+
/** The board the hunt ran against, echoed back so a stale response is recognisable. */
|
|
120
|
+
readonly board: v.StringSchema<undefined>;
|
|
121
|
+
readonly analysisStatus: v.PicklistSchema<["ranked", "unavailable", "failed", "over_budget", "empty"], undefined>;
|
|
122
|
+
/** `provider:model` that produced the ranking, or null when there was none. */
|
|
123
|
+
readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
124
|
+
/** Candidates, best-scoring first; unassessed ones sort last. */
|
|
125
|
+
readonly candidates: v.ArraySchema<v.ObjectSchema<{
|
|
126
|
+
readonly source: v.PicklistSchema<["jira", "github", "linear"], undefined>;
|
|
127
|
+
/** The source's canonical key for the issue (a valid import ref). */
|
|
128
|
+
readonly externalId: v.StringSchema<undefined>;
|
|
129
|
+
readonly title: v.StringSchema<undefined>;
|
|
130
|
+
readonly url: v.StringSchema<undefined>;
|
|
131
|
+
/** Workflow status name (may be empty). */
|
|
132
|
+
readonly status: v.StringSchema<undefined>;
|
|
133
|
+
/** Issue type name (may be empty for sources with no type notion). */
|
|
134
|
+
readonly type: v.StringSchema<undefined>;
|
|
135
|
+
/** Priority name, or null when the source records none. */
|
|
136
|
+
readonly priority: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
137
|
+
readonly labels: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
138
|
+
/** A truncated excerpt of the issue body (may be empty). */
|
|
139
|
+
readonly description: v.StringSchema<undefined>;
|
|
140
|
+
/** ISO-8601 creation timestamp (empty when the source doesn't report one). */
|
|
141
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
142
|
+
/** How many comments the issue has accumulated — a cheap proxy for how contested it is. */
|
|
143
|
+
readonly commentCount: v.NumberSchema<undefined>;
|
|
144
|
+
readonly analysis: v.NullableSchema<v.ObjectSchema<{
|
|
145
|
+
/** How much fixing this bug is worth (1 = cosmetic, 5 = users blocked). */
|
|
146
|
+
readonly impact: v.NumberSchema<undefined>;
|
|
147
|
+
/** How hard the fix looks (1 = a contained change, 5 = deep or unclear). */
|
|
148
|
+
readonly complexity: v.NumberSchema<undefined>;
|
|
149
|
+
/** Impact per unit of effort, computed by `bugHuntScore` — never taken from the model. */
|
|
150
|
+
readonly score: v.NumberSchema<undefined>;
|
|
151
|
+
readonly confidence: v.PicklistSchema<["high", "medium", "low"], undefined>;
|
|
152
|
+
/** One or two sentences on why this ratio — the reason a human can argue with. */
|
|
153
|
+
readonly rationale: v.StringSchema<undefined>;
|
|
154
|
+
/** Whether the model would actually pick this one up now. */
|
|
155
|
+
readonly recommended: v.BooleanSchema<undefined>;
|
|
156
|
+
}, undefined>, undefined>;
|
|
157
|
+
}, undefined>, undefined>;
|
|
158
|
+
/**
|
|
159
|
+
* How many open unassigned bugs this hunt considered — the board search's result, bounded by
|
|
160
|
+
* the scan cap. It is what the truncation notice counts, so it is reported rather than left
|
|
161
|
+
* to be inferred from `candidates`.
|
|
162
|
+
*/
|
|
163
|
+
readonly scanned: v.NumberSchema<undefined>;
|
|
164
|
+
/**
|
|
165
|
+
* Whether the board holds MORE matching bugs than the cap allowed in (detected by scanning one
|
|
166
|
+
* past it), so the list is a prefix rather than the whole board. Said out loud because a
|
|
167
|
+
* silently shortened list reads exactly like an exhaustive one.
|
|
168
|
+
*/
|
|
169
|
+
readonly truncated: v.BooleanSchema<undefined>;
|
|
170
|
+
}, undefined>;
|
|
171
|
+
export type BugHuntResult = v.InferOutput<typeof bugHuntResultSchema>;
|
|
172
|
+
/**
|
|
173
|
+
* Run a hunt. `board` is the vendor-shaped id from {@link trackerBoardSchema} (or typed in
|
|
174
|
+
* by hand for a source whose boards can't be listed). The predicates default to the
|
|
175
|
+
* tracker's own bug convention — issue type `bug` — and are narrowable per hunt.
|
|
176
|
+
*/
|
|
177
|
+
export declare const runBugHuntSchema: v.ObjectSchema<{
|
|
178
|
+
readonly board: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
|
|
179
|
+
/** Issue type to hunt; omitted → `bug`. Sources without a type notion ignore it. */
|
|
180
|
+
readonly issueType: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 60, undefined>]>, undefined>;
|
|
181
|
+
/** Labels that must ALL be present. */
|
|
182
|
+
readonly labels: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 60, undefined>]>, undefined>, undefined>;
|
|
183
|
+
/** Substring that must appear in the issue title. */
|
|
184
|
+
readonly titleFragment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 120, undefined>]>, undefined>;
|
|
185
|
+
}, undefined>;
|
|
186
|
+
export type RunBugHuntInput = v.InferOutput<typeof runBugHuntSchema>;
|
|
187
|
+
/**
|
|
188
|
+
* Adopt a confirmed candidate: import the issue, create a `bug` task from it inside
|
|
189
|
+
* `containerId`, link the issue for agent context, and start the bug-fix pipeline.
|
|
190
|
+
*/
|
|
191
|
+
export declare const adoptBugHuntCandidateSchema: v.ObjectSchema<{
|
|
192
|
+
readonly externalId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
193
|
+
/** The service frame or module the new task is created in. */
|
|
194
|
+
readonly containerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
195
|
+
/** The pipeline to run; omitted → the built-in bug-fix pipeline. */
|
|
196
|
+
readonly pipelineId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 120, undefined>]>, undefined>;
|
|
197
|
+
}, undefined>;
|
|
198
|
+
export type AdoptBugHuntCandidateInput = v.InferOutput<typeof adoptBugHuntCandidateSchema>;
|
|
199
|
+
//# sourceMappingURL=bug-hunt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug-hunt.d.ts","sourceRoot":"","sources":["../src/bug-hunt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAe5B;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;IAG7B,yFAAyF;;aAEzF,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEnE,eAAO,MAAM,uBAAuB;;;;;QALlC,yFAAyF;;;aAQzF,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW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AqE;;;;QAIrE,2CAA2C;;QAE3C,sEAAsE;;QAEtE,2DAA2D;;;QAG3D,4DAA4D;;QAE5D,8EAA8E;;QAE9E,2FAA2F;;;YAtC3F,2EAA2E;;YAE3E,4EAA4E;;YAE5E,0FAA0F;;;YAG1F,kFAAkF;;YAElF,6DAA6D;;;;IAyE7D;;;;OAIG;;IAEH;;;;OAIG;;aAEH,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAIrE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;IAE3B,oFAAoF;;IAEpF,uCAAuC;;IAEvC,qDAAqD;;aAErD,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEpE;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;IAEtC,8DAA8D;;IAE9D,oEAAoE;;aAEpE,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
|
package/dist/bug-hunt.js
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { taskSourceKindSchema } from './tasks.js';
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Bug-hunt wire contracts. A hunt is the INTERACTIVE dual of the recurring
|
|
5
|
+
// `bug-intake` step: a human picks a connected tracker and one of its boards, the
|
|
6
|
+
// backend reads that board's open + unassigned bugs, a model ranks them by impact
|
|
7
|
+
// against implementation complexity, and the human confirms one candidate — which is
|
|
8
|
+
// then adopted as a board task and driven through the standard bug-fix pipeline.
|
|
9
|
+
//
|
|
10
|
+
// The hunt itself is STATELESS: nothing is persisted, so there is no hunt table, no
|
|
11
|
+
// migration and no runtime-symmetry surface. The only durable effects happen at adopt
|
|
12
|
+
// time, and they are the ones that already exist (an imported issue, a board task, a run).
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
/**
|
|
15
|
+
* One selectable board on a tracker — a Jira project, a Linear team, a GitHub repository.
|
|
16
|
+
* `id` is vendor-shaped and handed straight back as the hunt's board scope, so the SPA
|
|
17
|
+
* never has to know which of the three notions a source uses.
|
|
18
|
+
*/
|
|
19
|
+
export const trackerBoardSchema = v.object({
|
|
20
|
+
id: v.string(),
|
|
21
|
+
name: v.string(),
|
|
22
|
+
/** A short vendor-side key/slug shown beside the name to disambiguate (may be empty). */
|
|
23
|
+
key: v.string(),
|
|
24
|
+
});
|
|
25
|
+
export const trackerBoardsViewSchema = v.object({
|
|
26
|
+
source: taskSourceKindSchema,
|
|
27
|
+
boards: v.array(trackerBoardSchema),
|
|
28
|
+
});
|
|
29
|
+
/** How sure the ranking model is about a candidate's assessment. */
|
|
30
|
+
export const bugHuntConfidenceSchema = v.picklist(['high', 'medium', 'low']);
|
|
31
|
+
/**
|
|
32
|
+
* The model's assessment of ONE candidate. `impact` and `complexity` are 1–5 judgements;
|
|
33
|
+
* `score` is NOT the model's — it is computed deterministically from the two, so the
|
|
34
|
+
* ordering is reproducible and a model that can't do arithmetic can't reorder the list.
|
|
35
|
+
*/
|
|
36
|
+
export const bugHuntAnalysisSchema = v.object({
|
|
37
|
+
/** How much fixing this bug is worth (1 = cosmetic, 5 = users blocked). */
|
|
38
|
+
impact: v.number(),
|
|
39
|
+
/** How hard the fix looks (1 = a contained change, 5 = deep or unclear). */
|
|
40
|
+
complexity: v.number(),
|
|
41
|
+
/** Impact per unit of effort, computed by `bugHuntScore` — never taken from the model. */
|
|
42
|
+
score: v.number(),
|
|
43
|
+
confidence: bugHuntConfidenceSchema,
|
|
44
|
+
/** One or two sentences on why this ratio — the reason a human can argue with. */
|
|
45
|
+
rationale: v.string(),
|
|
46
|
+
/** Whether the model would actually pick this one up now. */
|
|
47
|
+
recommended: v.boolean(),
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* One open bug read off a tracker board — the FACTS, all of them provider-supplied. Richer
|
|
51
|
+
* than a `TaskSearchResult` (which is deliberately lean for a picker row) but still bounded:
|
|
52
|
+
* a provider gathers the whole candidate set in ONE vendor call, so a 40-candidate hunt costs
|
|
53
|
+
* one request, and `description` is truncated because the ranking only needs enough of the
|
|
54
|
+
* report to judge impact and effort.
|
|
55
|
+
*/
|
|
56
|
+
export const bugCandidateSchema = v.object({
|
|
57
|
+
source: taskSourceKindSchema,
|
|
58
|
+
/** The source's canonical key for the issue (a valid import ref). */
|
|
59
|
+
externalId: v.string(),
|
|
60
|
+
title: v.string(),
|
|
61
|
+
url: v.string(),
|
|
62
|
+
/** Workflow status name (may be empty). */
|
|
63
|
+
status: v.string(),
|
|
64
|
+
/** Issue type name (may be empty for sources with no type notion). */
|
|
65
|
+
type: v.string(),
|
|
66
|
+
/** Priority name, or null when the source records none. */
|
|
67
|
+
priority: v.nullable(v.string()),
|
|
68
|
+
labels: v.array(v.string()),
|
|
69
|
+
/** A truncated excerpt of the issue body (may be empty). */
|
|
70
|
+
description: v.string(),
|
|
71
|
+
/** ISO-8601 creation timestamp (empty when the source doesn't report one). */
|
|
72
|
+
createdAt: v.string(),
|
|
73
|
+
/** How many comments the issue has accumulated — a cheap proxy for how contested it is. */
|
|
74
|
+
commentCount: v.number(),
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* One ranked candidate: the tracker facts plus the model's assessment, kept as separate
|
|
78
|
+
* halves on purpose. `analysis` is null for a candidate the ranking didn't cover — either the
|
|
79
|
+
* whole analysis was unavailable, or the model silently dropped that row. A missing
|
|
80
|
+
* assessment must read as "not assessed", never as a zero score.
|
|
81
|
+
*/
|
|
82
|
+
export const bugHuntCandidateSchema = v.object({
|
|
83
|
+
...bugCandidateSchema.entries,
|
|
84
|
+
analysis: v.nullable(bugHuntAnalysisSchema),
|
|
85
|
+
});
|
|
86
|
+
/** Why a hunt came back without a ranking, so the UI states the limitation instead of implying one. */
|
|
87
|
+
export const bugHuntAnalysisStatusSchema = v.picklist([
|
|
88
|
+
/** The model ranked the candidates. */
|
|
89
|
+
'ranked',
|
|
90
|
+
/** No ranking model is wired on this deployment. */
|
|
91
|
+
'unavailable',
|
|
92
|
+
/** A model is wired but the assessment failed; the candidates are returned unranked. */
|
|
93
|
+
'failed',
|
|
94
|
+
/**
|
|
95
|
+
* The workspace is over its spend budget, so the billable ranking call was not made. Distinct
|
|
96
|
+
* from `failed` because nothing is broken and the fix is a budget, not a credential.
|
|
97
|
+
*/
|
|
98
|
+
'over_budget',
|
|
99
|
+
/** Nothing to rank (the board had no matching open unassigned bugs). */
|
|
100
|
+
'empty',
|
|
101
|
+
]);
|
|
102
|
+
export const bugHuntResultSchema = v.object({
|
|
103
|
+
source: taskSourceKindSchema,
|
|
104
|
+
/** The board the hunt ran against, echoed back so a stale response is recognisable. */
|
|
105
|
+
board: v.string(),
|
|
106
|
+
analysisStatus: bugHuntAnalysisStatusSchema,
|
|
107
|
+
/** `provider:model` that produced the ranking, or null when there was none. */
|
|
108
|
+
model: v.nullable(v.string()),
|
|
109
|
+
/** Candidates, best-scoring first; unassessed ones sort last. */
|
|
110
|
+
candidates: v.array(bugHuntCandidateSchema),
|
|
111
|
+
/**
|
|
112
|
+
* How many open unassigned bugs this hunt considered — the board search's result, bounded by
|
|
113
|
+
* the scan cap. It is what the truncation notice counts, so it is reported rather than left
|
|
114
|
+
* to be inferred from `candidates`.
|
|
115
|
+
*/
|
|
116
|
+
scanned: v.number(),
|
|
117
|
+
/**
|
|
118
|
+
* Whether the board holds MORE matching bugs than the cap allowed in (detected by scanning one
|
|
119
|
+
* past it), so the list is a prefix rather than the whole board. Said out loud because a
|
|
120
|
+
* silently shortened list reads exactly like an exhaustive one.
|
|
121
|
+
*/
|
|
122
|
+
truncated: v.boolean(),
|
|
123
|
+
});
|
|
124
|
+
// ---- Request bodies -------------------------------------------------------
|
|
125
|
+
/**
|
|
126
|
+
* Run a hunt. `board` is the vendor-shaped id from {@link trackerBoardSchema} (or typed in
|
|
127
|
+
* by hand for a source whose boards can't be listed). The predicates default to the
|
|
128
|
+
* tracker's own bug convention — issue type `bug` — and are narrowable per hunt.
|
|
129
|
+
*/
|
|
130
|
+
export const runBugHuntSchema = v.object({
|
|
131
|
+
board: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(200)),
|
|
132
|
+
/** Issue type to hunt; omitted → `bug`. Sources without a type notion ignore it. */
|
|
133
|
+
issueType: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(60))),
|
|
134
|
+
/** Labels that must ALL be present. */
|
|
135
|
+
labels: v.optional(v.array(v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(60)))),
|
|
136
|
+
/** Substring that must appear in the issue title. */
|
|
137
|
+
titleFragment: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(120))),
|
|
138
|
+
});
|
|
139
|
+
/**
|
|
140
|
+
* Adopt a confirmed candidate: import the issue, create a `bug` task from it inside
|
|
141
|
+
* `containerId`, link the issue for agent context, and start the bug-fix pipeline.
|
|
142
|
+
*/
|
|
143
|
+
export const adoptBugHuntCandidateSchema = v.object({
|
|
144
|
+
externalId: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(500)),
|
|
145
|
+
/** The service frame or module the new task is created in. */
|
|
146
|
+
containerId: v.pipe(v.string(), v.trim(), v.minLength(1)),
|
|
147
|
+
/** The pipeline to run; omitted → the built-in bug-fix pipeline. */
|
|
148
|
+
pipelineId: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(120))),
|
|
149
|
+
});
|
|
150
|
+
//# sourceMappingURL=bug-hunt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug-hunt.js","sourceRoot":"","sources":["../src/bug-hunt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEjD,8EAA8E;AAC9E,2EAA2E;AAC3E,kFAAkF;AAClF,kF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AC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1E,8DAA8D;IAC9D,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACzD,oEAAoE;IACpE,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;CACvE,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from './provider-config.js';
|
|
|
25
25
|
export * from './user-secret.js';
|
|
26
26
|
export * from './documents.js';
|
|
27
27
|
export * from './tasks.js';
|
|
28
|
+
export * from './bug-hunt.js';
|
|
28
29
|
export * from './environments.js';
|
|
29
30
|
export * from './preflights.js';
|
|
30
31
|
export * from './stack-recipes.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA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Ac,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export * from './provider-config.js';
|
|
|
25
25
|
export * from './user-secret.js';
|
|
26
26
|
export * from './documents.js';
|
|
27
27
|
export * from './tasks.js';
|
|
28
|
+
export * from './bug-hunt.js';
|
|
28
29
|
export * from './environments.js';
|
|
29
30
|
export * from './preflights.js';
|
|
30
31
|
export * from './stack-recipes.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,wBAAwB,CAAA;AACtC,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAA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B,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
|
|
@@ -173,11 +173,35 @@ export declare const providerDescriptorSchema: v.ObjectSchema<{
|
|
|
173
173
|
readonly values: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
174
174
|
}, undefined>;
|
|
175
175
|
export type ProviderDescriptor = v.InferOutput<typeof providerDescriptorSchema>;
|
|
176
|
+
/**
|
|
177
|
+
* A non-fatal gap in an otherwise-valid provider config: the connection works, but something
|
|
178
|
+
* it never declared costs a recovery or cleanup path that only shows itself during an
|
|
179
|
+
* incident. Machine-readable, because the backend does not localize prose — the SPA maps the
|
|
180
|
+
* `code` to its own copy and keeps `message` only as the untranslated last resort.
|
|
181
|
+
*/
|
|
182
|
+
export declare const connectionWarningCodeSchema: v.PicklistSchema<["runner_manifest_no_release", "runner_manifest_no_status_path"], undefined>;
|
|
183
|
+
export type ConnectionWarningCode = v.InferOutput<typeof connectionWarningCodeSchema>;
|
|
184
|
+
export declare const connectionWarningSchema: v.ObjectSchema<{
|
|
185
|
+
readonly code: v.PicklistSchema<["runner_manifest_no_release", "runner_manifest_no_status_path"], undefined>;
|
|
186
|
+
/** The backend's own English account of the gap, also written to the deployment log. */
|
|
187
|
+
readonly message: v.StringSchema<undefined>;
|
|
188
|
+
}, undefined>;
|
|
189
|
+
export type ConnectionWarning = v.InferOutput<typeof connectionWarningSchema>;
|
|
176
190
|
/** The outcome of a provider connection test (never throws to the client). */
|
|
177
191
|
export declare const connectionTestResultSchema: v.ObjectSchema<{
|
|
178
192
|
readonly ok: v.BooleanSchema<undefined>;
|
|
179
193
|
/** Human-readable detail — a success hint or the failure reason. */
|
|
180
194
|
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
195
|
+
/**
|
|
196
|
+
* Gaps in the config being tested. Independent of `ok`: a warned config still connects, and
|
|
197
|
+
* the test is the one moment the operator is looking at this backend, so it is where they
|
|
198
|
+
* find out. Absent/empty ⇒ nothing to report.
|
|
199
|
+
*/
|
|
200
|
+
readonly warnings: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
201
|
+
readonly code: v.PicklistSchema<["runner_manifest_no_release", "runner_manifest_no_status_path"], undefined>;
|
|
202
|
+
/** The backend's own English account of the gap, also written to the deployment log. */
|
|
203
|
+
readonly message: v.StringSchema<undefined>;
|
|
204
|
+
}, undefined>, undefined>, undefined>;
|
|
181
205
|
}, undefined>;
|
|
182
206
|
export type ConnectionTestResult = v.InferOutput<typeof connectionTestResultSchema>;
|
|
183
207
|
/** Severity of a single repo-config validation finding. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-config.d.ts","sourceRoot":"","sources":["../src/provider-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAc5B;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,+FAOxC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEzF,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB;IACpC,iFAAiF;;IAEjF,sCAAsC;;IAEtC,kDAAkD;;IAElD,kCAAkC;;IAElC,gEAAgE;;IAEhE,oEAAoE;;IAEpE,+CAA+C;;IAE/C,oCAAoC;;;;;IAEpC;;;;;;;OAOG;;aAEH,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;;;QAnCnC,iFAAiF;;QAEjF,sCAAsC;;QAEtC,kDAAkD;;QAElD,kCAAkC;;QAElC,gEAAgE;;QAEhE,oEAAoE;;QAEpE,+CAA+C;;QAE/C,oCAAoC;;;;;QAEpC;;;;;;;WAOG;;;IAiBH,yEAAyE;;IAEzE;;;;;;;OAOG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH,8FAA8F;;QA7D9F,iFAAiF;;QAEjF,sCAAsC;;QAEtC,kDAAkD;;QAElD,kCAAkC;;QAElC,gEAAgE;;QAEhE,oEAAoE;;QAEpE,+CAA+C;;QAE/C,oCAAoC;;;;;QAEpC;;;;;;;WAOG;;;IAwCH;;;;;;;;OAQG;;IAEH;;;;;;;;OAQG;;IAEH;;;;;;;;;;OAUG;;IAEH;;;;OAIG;;aAEH,CAAA;AAC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js
CHANGED
|
@@ -127,11 +127,32 @@ export const providerDescriptorSchema = v.object({
|
|
|
127
127
|
*/
|
|
128
128
|
values: v.optional(v.record(v.string(), v.string())),
|
|
129
129
|
});
|
|
130
|
+
/**
|
|
131
|
+
* A non-fatal gap in an otherwise-valid provider config: the connection works, but something
|
|
132
|
+
* it never declared costs a recovery or cleanup path that only shows itself during an
|
|
133
|
+
* incident. Machine-readable, because the backend does not localize prose — the SPA maps the
|
|
134
|
+
* `code` to its own copy and keeps `message` only as the untranslated last resort.
|
|
135
|
+
*/
|
|
136
|
+
export const connectionWarningCodeSchema = v.picklist([
|
|
137
|
+
'runner_manifest_no_release',
|
|
138
|
+
'runner_manifest_no_status_path',
|
|
139
|
+
]);
|
|
140
|
+
export const connectionWarningSchema = v.object({
|
|
141
|
+
code: connectionWarningCodeSchema,
|
|
142
|
+
/** The backend's own English account of the gap, also written to the deployment log. */
|
|
143
|
+
message: v.string(),
|
|
144
|
+
});
|
|
130
145
|
/** The outcome of a provider connection test (never throws to the client). */
|
|
131
146
|
export const connectionTestResultSchema = v.object({
|
|
132
147
|
ok: v.boolean(),
|
|
133
148
|
/** Human-readable detail — a success hint or the failure reason. */
|
|
134
149
|
message: v.optional(v.string()),
|
|
150
|
+
/**
|
|
151
|
+
* Gaps in the config being tested. Independent of `ok`: a warned config still connects, and
|
|
152
|
+
* the test is the one moment the operator is looking at this backend, so it is where they
|
|
153
|
+
* find out. Absent/empty ⇒ nothing to report.
|
|
154
|
+
*/
|
|
155
|
+
warnings: v.optional(v.array(connectionWarningSchema)),
|
|
135
156
|
});
|
|
136
157
|
/** Severity of a single repo-config validation finding. */
|
|
137
158
|
export const repoValidationSeveritySchema = v.picklist(['error', 'warning']);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-config.js","sourceRoot":"","sources":["../src/provider-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,qEAAqE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