@boxxy/pepys 0.0.0-stage → 0.1.3
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/LICENSE +21 -0
- package/README.md +43 -2
- package/dist/boxxy-source.d.ts +636 -0
- package/dist/boxxy-work-plugin.d.ts +1 -0
- package/dist/build-boxxy-plugin.d.ts +181 -0
- package/dist/consumers/apply-scope.d.ts +5 -0
- package/dist/create-pepys-fact-sink.d.ts +9 -0
- package/dist/create-pepys-reader.d.ts +9 -0
- package/dist/generated/boxxy-work-boundary.d.ts +566 -0
- package/dist/index.d.ts +5 -0
- package/dist/queries/build-cost-to-land-query.d.ts +156 -0
- package/dist/queries/build-cost-to-land.d.ts +12 -0
- package/dist/queries/build-stage-time-query.d.ts +29 -0
- package/dist/queries/build-stage-time.d.ts +10 -0
- package/dist/queries/constants.d.ts +6 -0
- package/dist/queries/find-item-entity-id.d.ts +2 -0
- package/dist/queries/types.d.ts +109 -0
- package/dist/sink/is-outgoing-fact.d.ts +3 -0
- package/dist/sink/pick-sink-answer.d.ts +7 -0
- package/dist/sink/to-wire-fact.d.ts +5 -0
- package/dist/types.d.ts +6 -0
- package/dist/wire-fact-schemas.d.ts +319 -0
- package/dist/work/boxxy-work-consumer.d.ts +125 -0
- package/dist/work/constants.d.ts +3 -0
- package/dist/work/fold-work-facts.d.ts +2 -0
- package/dist/work/types.d.ts +147 -0
- package/package.json +59 -4
- package/src/boxxy-source.ts +25 -0
- package/src/boxxy-work-plugin.ts +11 -0
- package/src/build-boxxy-plugin.ts +18 -0
- package/src/consumers/apply-scope.ts +125 -0
- package/src/create-pepys-fact-sink.ts +64 -0
- package/src/create-pepys-reader.ts +79 -0
- package/src/generated/boxxy-work-boundary.ts +2923 -0
- package/src/generated/boxxy-work.sql +71 -0
- package/src/index.ts +17 -0
- package/src/queries/build-cost-to-land-query.ts +127 -0
- package/src/queries/build-cost-to-land.ts +226 -0
- package/src/queries/build-stage-time-query.ts +59 -0
- package/src/queries/build-stage-time.ts +188 -0
- package/src/queries/constants.ts +10 -0
- package/src/queries/find-item-entity-id.ts +16 -0
- package/src/queries/types.ts +168 -0
- package/src/sink/is-outgoing-fact.ts +19 -0
- package/src/sink/pick-sink-answer.ts +29 -0
- package/src/sink/to-wire-fact.ts +31 -0
- package/src/types.ts +14 -0
- package/src/wire-fact-schemas.ts +41 -0
- package/src/work/boxxy-work-consumer.ts +95 -0
- package/src/work/constants.ts +25 -0
- package/src/work/fold-work-facts.ts +490 -0
- package/src/work/types.ts +177 -0
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
declare const idTag: unique symbol;
|
|
2
|
+
declare const kindTag: unique symbol;
|
|
3
|
+
export type EntityID = string & {
|
|
4
|
+
readonly [idTag]: 'EntityID';
|
|
5
|
+
};
|
|
6
|
+
type KindedID<Kind extends string> = EntityID & {
|
|
7
|
+
readonly [kindTag]: Kind;
|
|
8
|
+
};
|
|
9
|
+
export type BoxxyAttemptID = KindedID<'boxxy:attempt'>;
|
|
10
|
+
export declare function toBoxxyAttemptID(id: string): BoxxyAttemptID;
|
|
11
|
+
export declare function parseBoxxyAttemptID(text: string): BoxxyAttemptID | undefined;
|
|
12
|
+
export type BoxxyItemID = KindedID<'boxxy:item'>;
|
|
13
|
+
export declare function toBoxxyItemID(id: string): BoxxyItemID;
|
|
14
|
+
export declare function parseBoxxyItemID(text: string): BoxxyItemID | undefined;
|
|
15
|
+
export type GithubPullRequestID = KindedID<'github:pull_request'>;
|
|
16
|
+
export declare function toGithubPullRequestID(id: string): GithubPullRequestID;
|
|
17
|
+
export declare function parseGithubPullRequestID(text: string): GithubPullRequestID | undefined;
|
|
18
|
+
export type TelemetrySessionID = KindedID<'telemetry:session'>;
|
|
19
|
+
export declare function toTelemetrySessionID(id: string): TelemetrySessionID;
|
|
20
|
+
export declare function parseTelemetrySessionID(text: string): TelemetrySessionID | undefined;
|
|
21
|
+
export interface BoxxyWorkModel {
|
|
22
|
+
input: string;
|
|
23
|
+
}
|
|
24
|
+
export type BoxxyWorkMessage = {
|
|
25
|
+
kind: 'apply';
|
|
26
|
+
input: string;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'reset';
|
|
29
|
+
};
|
|
30
|
+
export declare function initBoxxyWorkModel(): BoxxyWorkModel;
|
|
31
|
+
export declare function updateBoxxyWorkModel(model: BoxxyWorkModel, message: BoxxyWorkMessage): BoxxyWorkModel;
|
|
32
|
+
export interface BoxxyItemFiledPayload {
|
|
33
|
+
id: string;
|
|
34
|
+
kind: string;
|
|
35
|
+
repo: string;
|
|
36
|
+
title: string;
|
|
37
|
+
outcome: string;
|
|
38
|
+
acceptance: BoxxyItemFiledPayloadAcceptanceItem[];
|
|
39
|
+
fields: BoxxyItemFiledPayloadFields;
|
|
40
|
+
labels: string[];
|
|
41
|
+
foundInAttempt: string | null;
|
|
42
|
+
filedBy: unknown;
|
|
43
|
+
filedAt: number;
|
|
44
|
+
closedAt: number | null;
|
|
45
|
+
closeReason: string | null;
|
|
46
|
+
storeVersion: number;
|
|
47
|
+
}
|
|
48
|
+
export interface BoxxyItemFiledPayloadAcceptanceItem {
|
|
49
|
+
id: string;
|
|
50
|
+
text: string;
|
|
51
|
+
evidence: string[];
|
|
52
|
+
}
|
|
53
|
+
export interface BoxxyItemFiledPayloadFields {
|
|
54
|
+
designMode: unknown;
|
|
55
|
+
}
|
|
56
|
+
export interface BoxxyItemNotedPayload {
|
|
57
|
+
seq: number;
|
|
58
|
+
text: string;
|
|
59
|
+
storeVersion: number;
|
|
60
|
+
}
|
|
61
|
+
export interface BoxxyItemEditedPayload {
|
|
62
|
+
title: unknown;
|
|
63
|
+
outcome: unknown;
|
|
64
|
+
acceptance: unknown;
|
|
65
|
+
kind: unknown;
|
|
66
|
+
fields: unknown;
|
|
67
|
+
labels: unknown;
|
|
68
|
+
byAttempt: string | null;
|
|
69
|
+
storeVersion: number;
|
|
70
|
+
}
|
|
71
|
+
export interface BoxxyItemClosedPayload {
|
|
72
|
+
reason: string;
|
|
73
|
+
byAttempt: string | null;
|
|
74
|
+
ended: BoxxyItemClosedPayloadEndedItem[];
|
|
75
|
+
storeVersion: number;
|
|
76
|
+
}
|
|
77
|
+
export interface BoxxyItemClosedPayloadEndedItem {
|
|
78
|
+
attempt: string;
|
|
79
|
+
how: 'settled' | 'closing';
|
|
80
|
+
}
|
|
81
|
+
export interface BoxxyRelationAddedPayload {
|
|
82
|
+
source: string;
|
|
83
|
+
target: string;
|
|
84
|
+
type: string;
|
|
85
|
+
storeVersion: number;
|
|
86
|
+
}
|
|
87
|
+
export interface BoxxyRelationRemovedPayload {
|
|
88
|
+
source: string;
|
|
89
|
+
target: string;
|
|
90
|
+
type: string;
|
|
91
|
+
storeVersion: number;
|
|
92
|
+
}
|
|
93
|
+
export interface BoxxyLeverRecordedPayload {
|
|
94
|
+
seq: number;
|
|
95
|
+
kind: unknown;
|
|
96
|
+
item: string;
|
|
97
|
+
until: number | null;
|
|
98
|
+
expiresAt: number | null;
|
|
99
|
+
reason: string | null;
|
|
100
|
+
phase: string | null;
|
|
101
|
+
actor: unknown;
|
|
102
|
+
at: number;
|
|
103
|
+
storeVersion: number;
|
|
104
|
+
}
|
|
105
|
+
export interface BoxxyAttemptClaimedPayload {
|
|
106
|
+
attempt: string;
|
|
107
|
+
phase: string;
|
|
108
|
+
number: number;
|
|
109
|
+
round: number;
|
|
110
|
+
mode: 'agent' | 'attended';
|
|
111
|
+
pool: string;
|
|
112
|
+
fields: unknown;
|
|
113
|
+
seats: BoxxyAttemptClaimedPayloadSeatsItem[];
|
|
114
|
+
recipeHash: string;
|
|
115
|
+
skillsRef: string | null;
|
|
116
|
+
rulesVersion: string;
|
|
117
|
+
storeVersion: number;
|
|
118
|
+
}
|
|
119
|
+
export interface BoxxyAttemptClaimedPayloadSeatsItem {
|
|
120
|
+
limit: string;
|
|
121
|
+
}
|
|
122
|
+
export interface BoxxyDecisionRecordedPayload {
|
|
123
|
+
id: string;
|
|
124
|
+
attempt: string;
|
|
125
|
+
item: string;
|
|
126
|
+
kind: 'start' | 'wake';
|
|
127
|
+
pool: string;
|
|
128
|
+
rulesVersion: string;
|
|
129
|
+
snapshotHash: string;
|
|
130
|
+
storeVersion: number;
|
|
131
|
+
pepysOffsets: unknown;
|
|
132
|
+
faults: BoxxyDecisionRecordedPayloadFaultsItem[];
|
|
133
|
+
limits: BoxxyDecisionRecordedPayloadLimitsItem[];
|
|
134
|
+
at: number;
|
|
135
|
+
}
|
|
136
|
+
export interface BoxxyDecisionRecordedPayloadFaultsItem {
|
|
137
|
+
plugin: string;
|
|
138
|
+
kind: 'signal' | 'gate' | 'waiver' | 'admission' | 'propagation' | 'filter-field';
|
|
139
|
+
item: string | null;
|
|
140
|
+
error: string;
|
|
141
|
+
}
|
|
142
|
+
export interface BoxxyDecisionRecordedPayloadLimitsItem {
|
|
143
|
+
limit: string;
|
|
144
|
+
held: number;
|
|
145
|
+
max: number;
|
|
146
|
+
}
|
|
147
|
+
export interface BoxxyAttemptStartedPayload {
|
|
148
|
+
attempt: string;
|
|
149
|
+
atcSession: string;
|
|
150
|
+
resumeFallback: boolean;
|
|
151
|
+
caller: BoxxyAttemptStartedPayloadCaller | null;
|
|
152
|
+
storeVersion: number;
|
|
153
|
+
}
|
|
154
|
+
export interface BoxxyAttemptStartedPayloadCaller {
|
|
155
|
+
issuer: string;
|
|
156
|
+
subject: string;
|
|
157
|
+
}
|
|
158
|
+
export interface BoxxyAttemptSpawnUnansweredPayload {
|
|
159
|
+
attempt: string;
|
|
160
|
+
reason: string;
|
|
161
|
+
storeVersion: number;
|
|
162
|
+
}
|
|
163
|
+
export interface BoxxyAttemptReconciledPayload {
|
|
164
|
+
attempt: string;
|
|
165
|
+
atcSession: string;
|
|
166
|
+
caller: BoxxyAttemptReconciledPayloadCaller | null;
|
|
167
|
+
storeVersion: number;
|
|
168
|
+
}
|
|
169
|
+
export interface BoxxyAttemptReconciledPayloadCaller {
|
|
170
|
+
issuer: string;
|
|
171
|
+
subject: string;
|
|
172
|
+
}
|
|
173
|
+
export interface BoxxyAttemptSessionBoundPayload {
|
|
174
|
+
attempt: string;
|
|
175
|
+
atcSession: string;
|
|
176
|
+
agentSession: string;
|
|
177
|
+
product: 'claude_code' | 'codex';
|
|
178
|
+
source: 'worker' | 'hook';
|
|
179
|
+
seenAt: number;
|
|
180
|
+
storeVersion: number;
|
|
181
|
+
}
|
|
182
|
+
export interface BoxxyAttemptSleptPayload {
|
|
183
|
+
attempt: string;
|
|
184
|
+
idleSince: number;
|
|
185
|
+
asked: boolean;
|
|
186
|
+
storeVersion: number;
|
|
187
|
+
}
|
|
188
|
+
export interface BoxxyAttemptWakeRequestedPayload {
|
|
189
|
+
attempt: string;
|
|
190
|
+
by: 'command' | 'session-ran' | 'host-slept-unasked';
|
|
191
|
+
storeVersion: number;
|
|
192
|
+
}
|
|
193
|
+
export interface BoxxyAttemptWokenPayload {
|
|
194
|
+
attempt: string;
|
|
195
|
+
holdGen: number;
|
|
196
|
+
seats: BoxxyAttemptWokenPayloadSeatsItem[];
|
|
197
|
+
overCap: boolean;
|
|
198
|
+
storeVersion: number;
|
|
199
|
+
}
|
|
200
|
+
export interface BoxxyAttemptWokenPayloadSeatsItem {
|
|
201
|
+
limit: string;
|
|
202
|
+
}
|
|
203
|
+
export interface BoxxyAttemptResumedPayload {
|
|
204
|
+
attempt: string;
|
|
205
|
+
atcSession: string;
|
|
206
|
+
caller: BoxxyAttemptResumedPayloadCaller | null;
|
|
207
|
+
storeVersion: number;
|
|
208
|
+
}
|
|
209
|
+
export interface BoxxyAttemptResumedPayloadCaller {
|
|
210
|
+
issuer: string;
|
|
211
|
+
subject: string;
|
|
212
|
+
}
|
|
213
|
+
export interface BoxxyAttemptClosedOutPayload {
|
|
214
|
+
attempt: string;
|
|
215
|
+
phase: string;
|
|
216
|
+
closeOut: unknown;
|
|
217
|
+
hash: string;
|
|
218
|
+
storeVersion: number;
|
|
219
|
+
}
|
|
220
|
+
export interface BoxxyAttemptTimedOutPayload {
|
|
221
|
+
attempt: string;
|
|
222
|
+
phase: string;
|
|
223
|
+
afterMinutes: number;
|
|
224
|
+
storeVersion: number;
|
|
225
|
+
}
|
|
226
|
+
export interface BoxxyAttemptTurnEndedPayload {
|
|
227
|
+
attempt: string;
|
|
228
|
+
phase: string;
|
|
229
|
+
storeVersion: number;
|
|
230
|
+
}
|
|
231
|
+
export interface BoxxyAttemptSettledPayload {
|
|
232
|
+
attempt: string;
|
|
233
|
+
phase: string;
|
|
234
|
+
round: number;
|
|
235
|
+
state: 'succeeded' | 'failed';
|
|
236
|
+
failure: string | null;
|
|
237
|
+
outcome: string;
|
|
238
|
+
returnedOutcome: string | null;
|
|
239
|
+
closing: 'closed-out' | 'timed-out' | 'item-closed' | 'stalled' | 'skill-missing' | 'turn-ended' | 'usage-limit' | null;
|
|
240
|
+
asleep: boolean;
|
|
241
|
+
sessionStopped: boolean;
|
|
242
|
+
endedAt: number;
|
|
243
|
+
criteria: BoxxyAttemptSettledPayloadCriteriaItem[];
|
|
244
|
+
matched: string[];
|
|
245
|
+
frictionDropped: number;
|
|
246
|
+
skippedEffects: BoxxyAttemptSettledPayloadSkippedEffectsItem[];
|
|
247
|
+
storeVersion: number;
|
|
248
|
+
}
|
|
249
|
+
export interface BoxxyAttemptSettledPayloadCriteriaItem {
|
|
250
|
+
criterion: string;
|
|
251
|
+
evidence: string[];
|
|
252
|
+
}
|
|
253
|
+
export interface BoxxyAttemptSettledPayloadSkippedEffectsItem {
|
|
254
|
+
effect: 'file-item' | 'close-item' | 'add-relation' | 'set-kind' | 'set-field' | 'set-acceptance' | 'record-proposal';
|
|
255
|
+
reason: string;
|
|
256
|
+
}
|
|
257
|
+
export interface BoxxyProposalRecordedPayload {
|
|
258
|
+
target: BoxxyProposalRecordedPayloadTarget;
|
|
259
|
+
change: string;
|
|
260
|
+
attempt: string;
|
|
261
|
+
storeVersion: number;
|
|
262
|
+
}
|
|
263
|
+
export interface BoxxyProposalRecordedPayloadTarget {
|
|
264
|
+
kind: 'skill' | 'rule' | 'lint' | 'agents-md' | 'tool';
|
|
265
|
+
name: string;
|
|
266
|
+
}
|
|
267
|
+
export interface BoxxyEvidenceRecordedPayload {
|
|
268
|
+
attempt: string;
|
|
269
|
+
kind: 'pull_request' | 'commit' | 'test' | 'ci-run' | 'live-check';
|
|
270
|
+
ref: string;
|
|
271
|
+
observed: string | null;
|
|
272
|
+
storeVersion: number;
|
|
273
|
+
}
|
|
274
|
+
export interface BoxxyPullRequestLinkedPayload {
|
|
275
|
+
attempt: string;
|
|
276
|
+
repo: string;
|
|
277
|
+
number: number;
|
|
278
|
+
url: string;
|
|
279
|
+
pullRequestId: string;
|
|
280
|
+
source: 'hook' | 'watch';
|
|
281
|
+
storeVersion: number;
|
|
282
|
+
}
|
|
283
|
+
export interface BoxxyCommitLinkedPayload {
|
|
284
|
+
attempt: string;
|
|
285
|
+
repo: string;
|
|
286
|
+
sha: string;
|
|
287
|
+
pullRequestNumber: number;
|
|
288
|
+
storeVersion: number;
|
|
289
|
+
}
|
|
290
|
+
export interface BoxxyPullRequestMergedPayload {
|
|
291
|
+
attempt: string;
|
|
292
|
+
repo: string;
|
|
293
|
+
number: number;
|
|
294
|
+
pullRequestId: string;
|
|
295
|
+
mergedAt: number;
|
|
296
|
+
mergeCommit: string;
|
|
297
|
+
storeVersion: number;
|
|
298
|
+
}
|
|
299
|
+
export interface BoxxyPullRequestClosedPayload {
|
|
300
|
+
attempt: string;
|
|
301
|
+
repo: string;
|
|
302
|
+
number: number;
|
|
303
|
+
pullRequestId: string;
|
|
304
|
+
storeVersion: number;
|
|
305
|
+
}
|
|
306
|
+
export type BoxxyWorkFact = {
|
|
307
|
+
id: string;
|
|
308
|
+
type: 'boxxy.item.filed';
|
|
309
|
+
entity: string;
|
|
310
|
+
at: string;
|
|
311
|
+
payload: BoxxyItemFiledPayload;
|
|
312
|
+
} | {
|
|
313
|
+
id: string;
|
|
314
|
+
type: 'boxxy.item.noted';
|
|
315
|
+
entity: string;
|
|
316
|
+
at: string;
|
|
317
|
+
payload: BoxxyItemNotedPayload;
|
|
318
|
+
} | {
|
|
319
|
+
id: string;
|
|
320
|
+
type: 'boxxy.item.edited';
|
|
321
|
+
entity: string;
|
|
322
|
+
at: string;
|
|
323
|
+
payload: BoxxyItemEditedPayload;
|
|
324
|
+
} | {
|
|
325
|
+
id: string;
|
|
326
|
+
type: 'boxxy.item.closed';
|
|
327
|
+
entity: string;
|
|
328
|
+
at: string;
|
|
329
|
+
payload: BoxxyItemClosedPayload;
|
|
330
|
+
} | {
|
|
331
|
+
id: string;
|
|
332
|
+
type: 'boxxy.relation.added';
|
|
333
|
+
entity: string;
|
|
334
|
+
at: string;
|
|
335
|
+
payload: BoxxyRelationAddedPayload;
|
|
336
|
+
} | {
|
|
337
|
+
id: string;
|
|
338
|
+
type: 'boxxy.relation.removed';
|
|
339
|
+
entity: string;
|
|
340
|
+
at: string;
|
|
341
|
+
payload: BoxxyRelationRemovedPayload;
|
|
342
|
+
} | {
|
|
343
|
+
id: string;
|
|
344
|
+
type: 'boxxy.lever.recorded';
|
|
345
|
+
entity: string;
|
|
346
|
+
at: string;
|
|
347
|
+
payload: BoxxyLeverRecordedPayload;
|
|
348
|
+
} | {
|
|
349
|
+
id: string;
|
|
350
|
+
type: 'boxxy.attempt.claimed';
|
|
351
|
+
entity: string;
|
|
352
|
+
at: string;
|
|
353
|
+
payload: BoxxyAttemptClaimedPayload;
|
|
354
|
+
} | {
|
|
355
|
+
id: string;
|
|
356
|
+
type: 'boxxy.decision.recorded';
|
|
357
|
+
entity: string;
|
|
358
|
+
at: string;
|
|
359
|
+
payload: BoxxyDecisionRecordedPayload;
|
|
360
|
+
} | {
|
|
361
|
+
id: string;
|
|
362
|
+
type: 'boxxy.attempt.started';
|
|
363
|
+
entity: string;
|
|
364
|
+
at: string;
|
|
365
|
+
payload: BoxxyAttemptStartedPayload;
|
|
366
|
+
} | {
|
|
367
|
+
id: string;
|
|
368
|
+
type: 'boxxy.attempt.spawn_unanswered';
|
|
369
|
+
entity: string;
|
|
370
|
+
at: string;
|
|
371
|
+
payload: BoxxyAttemptSpawnUnansweredPayload;
|
|
372
|
+
} | {
|
|
373
|
+
id: string;
|
|
374
|
+
type: 'boxxy.attempt.reconciled';
|
|
375
|
+
entity: string;
|
|
376
|
+
at: string;
|
|
377
|
+
payload: BoxxyAttemptReconciledPayload;
|
|
378
|
+
} | {
|
|
379
|
+
id: string;
|
|
380
|
+
type: 'boxxy.attempt.session_bound';
|
|
381
|
+
entity: string;
|
|
382
|
+
at: string;
|
|
383
|
+
payload: BoxxyAttemptSessionBoundPayload;
|
|
384
|
+
} | {
|
|
385
|
+
id: string;
|
|
386
|
+
type: 'boxxy.attempt.slept';
|
|
387
|
+
entity: string;
|
|
388
|
+
at: string;
|
|
389
|
+
payload: BoxxyAttemptSleptPayload;
|
|
390
|
+
} | {
|
|
391
|
+
id: string;
|
|
392
|
+
type: 'boxxy.attempt.wake_requested';
|
|
393
|
+
entity: string;
|
|
394
|
+
at: string;
|
|
395
|
+
payload: BoxxyAttemptWakeRequestedPayload;
|
|
396
|
+
} | {
|
|
397
|
+
id: string;
|
|
398
|
+
type: 'boxxy.attempt.woken';
|
|
399
|
+
entity: string;
|
|
400
|
+
at: string;
|
|
401
|
+
payload: BoxxyAttemptWokenPayload;
|
|
402
|
+
} | {
|
|
403
|
+
id: string;
|
|
404
|
+
type: 'boxxy.attempt.resumed';
|
|
405
|
+
entity: string;
|
|
406
|
+
at: string;
|
|
407
|
+
payload: BoxxyAttemptResumedPayload;
|
|
408
|
+
} | {
|
|
409
|
+
id: string;
|
|
410
|
+
type: 'boxxy.attempt.closed_out';
|
|
411
|
+
entity: string;
|
|
412
|
+
at: string;
|
|
413
|
+
payload: BoxxyAttemptClosedOutPayload;
|
|
414
|
+
} | {
|
|
415
|
+
id: string;
|
|
416
|
+
type: 'boxxy.attempt.timed_out';
|
|
417
|
+
entity: string;
|
|
418
|
+
at: string;
|
|
419
|
+
payload: BoxxyAttemptTimedOutPayload;
|
|
420
|
+
} | {
|
|
421
|
+
id: string;
|
|
422
|
+
type: 'boxxy.attempt.turn_ended';
|
|
423
|
+
entity: string;
|
|
424
|
+
at: string;
|
|
425
|
+
payload: BoxxyAttemptTurnEndedPayload;
|
|
426
|
+
} | {
|
|
427
|
+
id: string;
|
|
428
|
+
type: 'boxxy.attempt.settled';
|
|
429
|
+
entity: string;
|
|
430
|
+
at: string;
|
|
431
|
+
payload: BoxxyAttemptSettledPayload;
|
|
432
|
+
} | {
|
|
433
|
+
id: string;
|
|
434
|
+
type: 'boxxy.proposal.recorded';
|
|
435
|
+
entity: string;
|
|
436
|
+
at: string;
|
|
437
|
+
payload: BoxxyProposalRecordedPayload;
|
|
438
|
+
} | {
|
|
439
|
+
id: string;
|
|
440
|
+
type: 'boxxy.evidence.recorded';
|
|
441
|
+
entity: string;
|
|
442
|
+
at: string;
|
|
443
|
+
payload: BoxxyEvidenceRecordedPayload;
|
|
444
|
+
} | {
|
|
445
|
+
id: string;
|
|
446
|
+
type: 'boxxy.pull_request.linked';
|
|
447
|
+
entity: string;
|
|
448
|
+
at: string;
|
|
449
|
+
payload: BoxxyPullRequestLinkedPayload;
|
|
450
|
+
} | {
|
|
451
|
+
id: string;
|
|
452
|
+
type: 'boxxy.commit.linked';
|
|
453
|
+
entity: string;
|
|
454
|
+
at: string;
|
|
455
|
+
payload: BoxxyCommitLinkedPayload;
|
|
456
|
+
} | {
|
|
457
|
+
id: string;
|
|
458
|
+
type: 'boxxy.pull_request.merged';
|
|
459
|
+
entity: string;
|
|
460
|
+
at: string;
|
|
461
|
+
payload: BoxxyPullRequestMergedPayload;
|
|
462
|
+
} | {
|
|
463
|
+
id: string;
|
|
464
|
+
type: 'boxxy.pull_request.closed';
|
|
465
|
+
entity: string;
|
|
466
|
+
at: string;
|
|
467
|
+
payload: BoxxyPullRequestClosedPayload;
|
|
468
|
+
};
|
|
469
|
+
export declare function readScopeFacts(scope: BoxxyItemID): BoxxyWorkFact[];
|
|
470
|
+
export interface BoxxyItemRow {
|
|
471
|
+
id: BoxxyItemID;
|
|
472
|
+
kind: string;
|
|
473
|
+
repo: string;
|
|
474
|
+
title: string;
|
|
475
|
+
design_mode: string | null;
|
|
476
|
+
filed_at: string;
|
|
477
|
+
closed_at: string | null;
|
|
478
|
+
close_reason: string | null;
|
|
479
|
+
updated_at: string;
|
|
480
|
+
}
|
|
481
|
+
export interface BoxxyAttemptRow {
|
|
482
|
+
id: BoxxyAttemptID;
|
|
483
|
+
item_id: EntityID;
|
|
484
|
+
phase: string;
|
|
485
|
+
number: number;
|
|
486
|
+
round: number;
|
|
487
|
+
mode: string;
|
|
488
|
+
pool: string;
|
|
489
|
+
recipe_hash: string;
|
|
490
|
+
rules_version: string;
|
|
491
|
+
atc_session: string | null;
|
|
492
|
+
state: string;
|
|
493
|
+
outcome: string | null;
|
|
494
|
+
failure: string | null;
|
|
495
|
+
claimed_at: string;
|
|
496
|
+
started_at: string | null;
|
|
497
|
+
closed_out_at: string | null;
|
|
498
|
+
ended_at: string | null;
|
|
499
|
+
sleeps: unknown;
|
|
500
|
+
updated_at: string;
|
|
501
|
+
}
|
|
502
|
+
export interface BoxxyAttemptSessionRow {
|
|
503
|
+
attempt_id: EntityID;
|
|
504
|
+
session_id: EntityID;
|
|
505
|
+
key: string;
|
|
506
|
+
product: string | null;
|
|
507
|
+
caller_issuer: string | null;
|
|
508
|
+
caller_subject: string | null;
|
|
509
|
+
bound_at: string;
|
|
510
|
+
}
|
|
511
|
+
export type BoxxyWorkOperation = {
|
|
512
|
+
upsert: {
|
|
513
|
+
boxxy_item: BoxxyItemRow;
|
|
514
|
+
};
|
|
515
|
+
} | {
|
|
516
|
+
upsert: {
|
|
517
|
+
boxxy_attempt: BoxxyAttemptRow;
|
|
518
|
+
};
|
|
519
|
+
} | {
|
|
520
|
+
upsert: {
|
|
521
|
+
boxxy_attempt_session: BoxxyAttemptSessionRow;
|
|
522
|
+
};
|
|
523
|
+
} | {
|
|
524
|
+
link: {
|
|
525
|
+
type: 'ran_in';
|
|
526
|
+
from: BoxxyAttemptID;
|
|
527
|
+
to: TelemetrySessionID;
|
|
528
|
+
confidence: number;
|
|
529
|
+
evidence: string;
|
|
530
|
+
};
|
|
531
|
+
} | {
|
|
532
|
+
link: {
|
|
533
|
+
type: 'produced';
|
|
534
|
+
from: BoxxyAttemptID;
|
|
535
|
+
to: GithubPullRequestID;
|
|
536
|
+
confidence: number;
|
|
537
|
+
evidence: string;
|
|
538
|
+
};
|
|
539
|
+
} | {
|
|
540
|
+
link: {
|
|
541
|
+
type: 'attempt_of';
|
|
542
|
+
from: BoxxyAttemptID;
|
|
543
|
+
to: BoxxyItemID;
|
|
544
|
+
confidence: number;
|
|
545
|
+
evidence: string;
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
export declare function linkRanIn(link: {
|
|
549
|
+
from: BoxxyAttemptID;
|
|
550
|
+
to: TelemetrySessionID;
|
|
551
|
+
confidence: number;
|
|
552
|
+
evidence: string;
|
|
553
|
+
}): BoxxyWorkOperation;
|
|
554
|
+
export declare function linkProduced(link: {
|
|
555
|
+
from: BoxxyAttemptID;
|
|
556
|
+
to: GithubPullRequestID;
|
|
557
|
+
confidence: number;
|
|
558
|
+
evidence: string;
|
|
559
|
+
}): BoxxyWorkOperation;
|
|
560
|
+
export declare function linkAttemptOf(link: {
|
|
561
|
+
from: BoxxyAttemptID;
|
|
562
|
+
to: BoxxyItemID;
|
|
563
|
+
confidence: number;
|
|
564
|
+
evidence: string;
|
|
565
|
+
}): BoxxyWorkOperation;
|
|
566
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { buildBoxxyPlugin } from './build-boxxy-plugin.ts';
|
|
2
|
+
export type { DeliveryInput, DeliveryReadRow, DeliveryReads, ForeignReads, GithubPullRequestConsumer, OpaqueConsumer, StageTimeReads, TelemetryModelRequestConsumer, TelemetryTurnCostConsumer, } from './queries/types.ts';
|
|
3
|
+
export { boxxySource } from './boxxy-source.ts';
|
|
4
|
+
export type { BoxxyQueryClient, UncheckedQueryClient } from './types.ts';
|
|
5
|
+
export { boxxyWorkConsumer } from './work/boxxy-work-consumer.ts';
|