@boxxy/model 0.1.2 → 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/README.md +8 -6
- package/dist/closeouts/build-close-out-schema.d.ts +31 -0
- package/dist/closeouts/close-out-answer-schema.d.ts +3 -0
- package/dist/closeouts/close-out-schema.d.ts +3 -0
- package/dist/closeouts/design-close-out-schema.d.ts +30 -0
- package/dist/closeouts/friction-schema.d.ts +14 -0
- package/dist/closeouts/open-item-schema.d.ts +3 -0
- package/dist/closeouts/review-close-out-schema.d.ts +40 -0
- package/dist/closeouts/triage-close-out-schema.d.ts +40 -0
- package/dist/closeouts/types.d.ts +221 -0
- package/dist/dispatch/build-applied-change.d.ts +6 -0
- package/dist/dispatch/collect-seat-sync.d.ts +14 -0
- package/dist/dispatch/pick-seat-take.d.ts +10 -0
- package/dist/dispatch/types.d.ts +11 -0
- package/dist/{outbox-fact-schema.d.ts → facts/outbox-fact-schema.d.ts} +1 -1
- package/dist/facts/parse-new-fact.d.ts +2 -0
- package/dist/facts/types.d.ts +191 -0
- package/dist/facts/work-fact-schemas.d.ts +293 -0
- package/dist/index.d.ts +64 -23
- package/dist/items/build-item-views.d.ts +4 -0
- package/dist/items/collect-retries.d.ts +3 -0
- package/dist/items/collect-settled.d.ts +3 -0
- package/dist/items/derive-item-state.d.ts +17 -0
- package/dist/{live-levers.d.ts → items/live-levers.d.ts} +1 -1
- package/dist/items/types.d.ts +12 -0
- package/dist/pipeline/advance.d.ts +10 -0
- package/dist/pipeline/constants.d.ts +2 -0
- package/dist/pipeline/count-trailing.d.ts +1 -0
- package/dist/pipeline/find-position.d.ts +9 -0
- package/dist/pipeline/find-step.d.ts +3 -0
- package/dist/pipeline/merge-by-time.d.ts +9 -0
- package/dist/pipeline/position-schema.d.ts +3 -0
- package/dist/pipeline/types.d.ts +28 -0
- package/dist/planning/define-admission.d.ts +3 -0
- package/dist/planning/define-gate.d.ts +3 -0
- package/dist/planning/define-signal.d.ts +3 -0
- package/dist/planning/is-filter-match.d.ts +3 -0
- package/dist/planning/limit-fill-schema.d.ts +3 -0
- package/dist/{signal-key.d.ts → planning/signal-key.d.ts} +1 -1
- package/dist/planning/types.d.ts +155 -0
- package/dist/ports/types.d.ts +289 -0
- package/dist/reports/constants.d.ts +3 -0
- package/dist/reports/cost-to-land-schema.d.ts +29 -0
- package/dist/reports/outbox-status.d.ts +16 -0
- package/dist/reports/stage-time-schema.d.ts +25 -0
- package/dist/reports/types.d.ts +5 -0
- package/dist/rows/actor-ref-schema.d.ts +2 -0
- package/dist/rows/attempt-row-schema.d.ts +3 -0
- package/dist/rows/attempt-session-row-schema.d.ts +3 -0
- package/dist/{brand-schemas.d.ts → rows/brand-schemas.d.ts} +5 -2
- package/dist/rows/caller-identity-schema.d.ts +3 -0
- package/dist/rows/criterion-schema.d.ts +3 -0
- package/dist/rows/decision-row-schema.d.ts +34 -0
- package/dist/rows/evidence-row-schema.d.ts +3 -0
- package/dist/rows/item-row-schema.d.ts +28 -0
- package/dist/rows/item-view-schema.d.ts +3 -0
- package/dist/rows/lease-row-schema.d.ts +3 -0
- package/dist/rows/lever-row-schema.d.ts +12 -0
- package/dist/rows/limit-schema.d.ts +3 -0
- package/dist/rows/limit-seat-row-schema.d.ts +3 -0
- package/dist/rows/note-row-schema.d.ts +3 -0
- package/dist/rows/notice-row-schema.d.ts +3 -0
- package/dist/rows/pull-request-row-schema.d.ts +3 -0
- package/dist/rows/relation-row-schema.d.ts +3 -0
- package/dist/{row-schemas.d.ts → rows/row-schemas.d.ts} +2 -2
- package/dist/rows/runner-row-schema.d.ts +3 -0
- package/dist/rows/spawn-request-schema.d.ts +3 -0
- package/dist/rules/define-phase.d.ts +3 -0
- package/dist/rules/load-rejection-schema.d.ts +3 -0
- package/dist/rules/types.d.ts +244 -0
- package/dist/test-utils/build-mock-cost-to-land.d.ts +2 -0
- package/dist/test-utils/build-mock-evidence-row.d.ts +1 -1
- package/dist/test-utils/build-mock-fact-id.d.ts +1 -1
- package/dist/test-utils/build-mock-frame-item.d.ts +1 -1
- package/dist/test-utils/build-mock-frame.d.ts +2 -0
- package/dist/test-utils/build-mock-item-rules.d.ts +2 -0
- package/dist/test-utils/build-mock-lease-row.d.ts +1 -1
- package/dist/test-utils/build-mock-outbox-fact.d.ts +2 -0
- package/dist/test-utils/build-mock-phase-kind.d.ts +7 -0
- package/dist/test-utils/build-mock-pipeline.d.ts +7 -0
- package/dist/test-utils/build-mock-relation-row.d.ts +2 -0
- package/dist/test-utils/build-mock-settled.d.ts +9 -0
- package/dist/test-utils/build-mock-snapshot.d.ts +1 -1
- package/dist/test-utils/build-mock-v1-attempt-row.d.ts +2 -0
- package/dist/test-utils/build-mock-v1-item-row.d.ts +2 -0
- package/dist/test-utils/build-mock-v1-item-view.d.ts +2 -0
- package/dist/test-utils/build-mock-v1-lever-row.d.ts +2 -0
- package/dist/test-utils/build-mock-v1-pull-request-row.d.ts +2 -0
- package/dist/test-utils/build-mock-work-fact.d.ts +12 -0
- package/dist/test-utils/create-fake-notifier.d.ts +9 -0
- package/dist/test-utils/create-fake-pepys-reader.d.ts +13 -0
- package/dist/test-utils/fact-sink-contract.d.ts +14 -0
- package/dist/test-utils/pepys-reader-contract.d.ts +17 -0
- package/dist/{types/core.d.ts → types.d.ts} +93 -43
- package/package.json +13 -3
- package/src/{build-close-out-schema.ts → closeouts/build-close-out-schema.ts} +5 -10
- package/src/closeouts/close-out-answer-schema.ts +42 -0
- package/src/closeouts/close-out-schema.ts +13 -0
- package/src/closeouts/design-close-out-schema.ts +20 -0
- package/src/closeouts/friction-schema.ts +11 -0
- package/src/closeouts/open-item-schema.ts +8 -0
- package/src/closeouts/review-close-out-schema.ts +38 -0
- package/src/closeouts/triage-close-out-schema.ts +29 -0
- package/src/closeouts/types.ts +230 -0
- package/src/dispatch/build-applied-change.ts +57 -0
- package/src/dispatch/collect-seat-sync.ts +86 -0
- package/src/dispatch/pick-seat-take.ts +39 -0
- package/src/dispatch/types.ts +14 -0
- package/src/facts/outbox-fact-schema.ts +22 -0
- package/src/facts/parse-new-fact.ts +16 -0
- package/src/facts/types.ts +235 -0
- package/src/facts/work-fact-schemas.ts +201 -0
- package/src/index.ts +147 -55
- package/src/items/build-item-views.ts +146 -0
- package/src/items/collect-retries.ts +12 -0
- package/src/items/collect-settled.ts +20 -0
- package/src/items/derive-item-state.ts +95 -0
- package/src/{live-levers.ts → items/live-levers.ts} +1 -1
- package/src/items/types.ts +26 -0
- package/src/pipeline/advance.ts +78 -0
- package/src/pipeline/constants.ts +12 -0
- package/src/pipeline/count-trailing.ts +16 -0
- package/src/pipeline/find-position.ts +74 -0
- package/src/pipeline/find-step.ts +6 -0
- package/src/pipeline/merge-by-time.ts +33 -0
- package/src/pipeline/position-schema.ts +27 -0
- package/src/pipeline/types.ts +47 -0
- package/src/{define-admission.ts → planning/define-admission.ts} +2 -2
- package/src/{define-gate.ts → planning/define-gate.ts} +2 -2
- package/src/{define-signal.ts → planning/define-signal.ts} +2 -2
- package/src/planning/is-filter-match.ts +10 -0
- package/src/planning/limit-fill-schema.ts +12 -0
- package/src/{signal-key.ts → planning/signal-key.ts} +1 -1
- package/src/planning/types.ts +216 -0
- package/src/ports/types.ts +412 -0
- package/src/reports/constants.ts +6 -0
- package/src/reports/cost-to-land-schema.ts +47 -0
- package/src/reports/outbox-status.ts +22 -0
- package/src/reports/stage-time-schema.ts +21 -0
- package/src/reports/types.ts +7 -0
- package/src/rows/actor-ref-schema.ts +17 -0
- package/src/rows/attempt-row-schema.ts +69 -0
- package/src/rows/attempt-session-row-schema.ts +12 -0
- package/src/{brand-schemas.ts → rows/brand-schemas.ts} +5 -2
- package/src/rows/caller-identity-schema.ts +7 -0
- package/src/rows/criterion-schema.ts +9 -0
- package/src/rows/decision-row-schema.ts +34 -0
- package/src/rows/evidence-row-schema.ts +13 -0
- package/src/rows/item-row-schema.ts +32 -0
- package/src/rows/item-view-schema.ts +31 -0
- package/src/rows/lease-row-schema.ts +12 -0
- package/src/rows/lever-row-schema.ts +17 -0
- package/src/rows/limit-schema.ts +12 -0
- package/src/rows/limit-seat-row-schema.ts +12 -0
- package/src/rows/note-row-schema.ts +12 -0
- package/src/rows/notice-row-schema.ts +17 -0
- package/src/rows/pull-request-row-schema.ts +15 -0
- package/src/rows/relation-row-schema.ts +13 -0
- package/src/rows/row-schemas.ts +30 -0
- package/src/rows/runner-row-schema.ts +9 -0
- package/src/rows/spawn-request-schema.ts +15 -0
- package/src/rules/define-phase.ts +12 -0
- package/src/rules/load-rejection-schema.ts +51 -0
- package/src/rules/types.ts +291 -0
- package/src/test-utils/build-mock-cost-to-land.ts +31 -0
- package/src/test-utils/build-mock-evidence-row.ts +2 -2
- package/src/test-utils/build-mock-fact-id.ts +3 -3
- package/src/test-utils/build-mock-frame-item.ts +10 -5
- package/src/test-utils/build-mock-frame.ts +13 -0
- package/src/test-utils/build-mock-item-rules.ts +17 -0
- package/src/test-utils/build-mock-lease-row.ts +2 -2
- package/src/test-utils/build-mock-outbox-fact.ts +22 -0
- package/src/test-utils/build-mock-phase-kind.ts +29 -0
- package/src/test-utils/build-mock-pipeline.ts +52 -0
- package/src/test-utils/{build-mock-link-row.ts → build-mock-relation-row.ts} +4 -4
- package/src/test-utils/build-mock-settled.ts +18 -0
- package/src/test-utils/build-mock-snapshot.ts +10 -2
- package/src/test-utils/{build-mock-attempt-row.ts → build-mock-v1-attempt-row.ts} +28 -9
- package/src/test-utils/{build-mock-item-row.ts → build-mock-v1-item-row.ts} +7 -3
- package/src/test-utils/build-mock-v1-item-view.ts +29 -0
- package/src/test-utils/{build-mock-lever-row.ts → build-mock-v1-lever-row.ts} +5 -3
- package/src/test-utils/build-mock-v1-pull-request-row.ts +26 -0
- package/src/test-utils/build-mock-work-fact.ts +179 -0
- package/src/test-utils/create-fake-notifier.ts +54 -0
- package/src/test-utils/create-fake-pepys-reader.ts +73 -0
- package/src/test-utils/fact-sink-contract.ts +103 -0
- package/src/test-utils/pepys-reader-contract.ts +117 -0
- package/src/{types/core.ts → types.ts} +183 -59
- package/dist/actor-ref-schema.d.ts +0 -2
- package/dist/build-applied-change.d.ts +0 -13
- package/dist/build-close-out-schema.d.ts +0 -3
- package/dist/build-item-views.d.ts +0 -2
- package/dist/define-admission.d.ts +0 -3
- package/dist/define-gate.d.ts +0 -3
- package/dist/define-signal.d.ts +0 -3
- package/dist/derive-item-state.d.ts +0 -2
- package/dist/fact-schemas.d.ts +0 -5
- package/dist/find-slot-take.d.ts +0 -5
- package/dist/friction-schema.d.ts +0 -3
- package/dist/test-utils/build-mock-attempt-row.d.ts +0 -2
- package/dist/test-utils/build-mock-item-row.d.ts +0 -2
- package/dist/test-utils/build-mock-item-rows.d.ts +0 -2
- package/dist/test-utils/build-mock-item-view.d.ts +0 -2
- package/dist/test-utils/build-mock-lever-row.d.ts +0 -2
- package/dist/test-utils/build-mock-link-row.d.ts +0 -2
- package/dist/test-utils/build-mock-pull-request-row.d.ts +0 -2
- package/dist/types/dispatch.d.ts +0 -82
- package/dist/types/facts.d.ts +0 -154
- package/dist/types/planning.d.ts +0 -94
- package/dist/types/ports.d.ts +0 -218
- package/dist/types/registries.d.ts +0 -150
- package/src/actor-ref-schema.ts +0 -9
- package/src/build-applied-change.ts +0 -71
- package/src/build-item-views.ts +0 -128
- package/src/derive-item-state.ts +0 -76
- package/src/fact-schemas.ts +0 -132
- package/src/find-slot-take.ts +0 -12
- package/src/friction-schema.ts +0 -10
- package/src/outbox-fact-schema.ts +0 -25
- package/src/row-schemas.ts +0 -89
- package/src/test-utils/build-mock-item-rows.ts +0 -14
- package/src/test-utils/build-mock-item-view.ts +0 -8
- package/src/test-utils/build-mock-pull-request-row.ts +0 -16
- package/src/types/dispatch.ts +0 -95
- package/src/types/facts.ts +0 -166
- package/src/types/planning.ts +0 -136
- package/src/types/ports.ts +0 -262
- package/src/types/registries.ts +0 -185
- /package/dist/test-utils/{seed-faker.d.ts → pin-faker-seed.d.ts} +0 -0
- /package/dist/{format-key-path.d.ts → utils/format-key-path.d.ts} +0 -0
- /package/dist/{to-json-value.d.ts → utils/to-json-value.d.ts} +0 -0
- /package/src/test-utils/{seed-faker.ts → pin-faker-seed.ts} +0 -0
- /package/src/{format-key-path.ts → utils/format-key-path.ts} +0 -0
- /package/src/{to-json-value.ts → utils/to-json-value.ts} +0 -0
package/README.md
CHANGED
|
@@ -31,12 +31,14 @@ The package runs on [Bun](https://bun.sh) 1.3 or newer.
|
|
|
31
31
|
|
|
32
32
|
- The branded ids and names, with a zod schema for each in `brandSchemas`.
|
|
33
33
|
- The store rows, the port interfaces, the plug-in interfaces and the loaded rules.
|
|
34
|
-
- The fact catalog
|
|
35
|
-
([facts
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
- `
|
|
39
|
-
|
|
34
|
+
- The fact catalog `WorkFacts`, with a zod schema for each fact type's payload in `workFactSchemas`
|
|
35
|
+
([v1 facts](../../docs/design/boxxy/v1-facts-and-pepys.md)).
|
|
36
|
+
- The four close-outs of the v1 phases, each with its schema, and `closeOutSchema` for any of them.
|
|
37
|
+
- The output schemas of the two pepys reports, `costToLandSchema` and `stageTimeSchema`.
|
|
38
|
+
- `definePhase`, which registers a phase kind with its close-out type hidden.
|
|
39
|
+
- `buildItemViews`, which derives each item's position and state from its rows and the rules, with
|
|
40
|
+
`findPosition` and `deriveItemState`.
|
|
41
|
+
- `pickSeatTake` and `collectSeatSync`, which give a store's seat take and seat sync.
|
|
40
42
|
- `liveLevers`, which drops the levers a later undo lever cancels and those past their expiry.
|
|
41
43
|
- `signalKey`, which builds a signal's key from its name and the content hash of its parameters.
|
|
42
44
|
- `defineSignal`, `defineGate` and `defineAdmission`, which register a plug-in with its parameter
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const buildCloseOutSchema: z.ZodObject<{
|
|
3
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"built">;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
kind: z.ZodLiteral<"blocked">;
|
|
7
|
+
reason: z.ZodString;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
kind: z.ZodLiteral<"abandoned">;
|
|
10
|
+
reason: z.ZodString;
|
|
11
|
+
}, z.core.$strip>], "kind">;
|
|
12
|
+
criteria: z.ZodArray<z.ZodObject<{
|
|
13
|
+
criterion: z.core.$ZodBranded<z.ZodString, "CriterionId", "out">;
|
|
14
|
+
evidence: z.core.$ZodBranded<z.ZodString, "FactId", "out">;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
openItems: z.ZodArray<z.ZodType<import("./types.ts").OpenItem, unknown, z.core.$ZodTypeInternals<import("./types.ts").OpenItem, unknown>>>;
|
|
17
|
+
friction: z.ZodArray<z.ZodObject<{
|
|
18
|
+
target: z.ZodObject<{
|
|
19
|
+
kind: z.ZodEnum<{
|
|
20
|
+
"agents-md": "agents-md";
|
|
21
|
+
lint: "lint";
|
|
22
|
+
rule: "rule";
|
|
23
|
+
skill: "skill";
|
|
24
|
+
tool: "tool";
|
|
25
|
+
}>;
|
|
26
|
+
name: z.ZodString;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
change: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
frictionDropped: z.ZodNumber;
|
|
31
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const designCloseOutSchema: z.ZodObject<{
|
|
3
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"designed">;
|
|
5
|
+
design: z.ZodObject<{
|
|
6
|
+
summary: z.ZodString;
|
|
7
|
+
location: z.ZodNullable<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"blocked">;
|
|
11
|
+
reason: z.ZodString;
|
|
12
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
13
|
+
kind: z.ZodLiteral<"abandoned">;
|
|
14
|
+
reason: z.ZodString;
|
|
15
|
+
}, z.core.$strip>], "kind">;
|
|
16
|
+
friction: z.ZodArray<z.ZodObject<{
|
|
17
|
+
target: z.ZodObject<{
|
|
18
|
+
kind: z.ZodEnum<{
|
|
19
|
+
"agents-md": "agents-md";
|
|
20
|
+
lint: "lint";
|
|
21
|
+
rule: "rule";
|
|
22
|
+
skill: "skill";
|
|
23
|
+
tool: "tool";
|
|
24
|
+
}>;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
change: z.ZodString;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
frictionDropped: z.ZodNumber;
|
|
30
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const frictionSchema: z.ZodObject<{
|
|
3
|
+
target: z.ZodObject<{
|
|
4
|
+
kind: z.ZodEnum<{
|
|
5
|
+
"agents-md": "agents-md";
|
|
6
|
+
lint: "lint";
|
|
7
|
+
rule: "rule";
|
|
8
|
+
skill: "skill";
|
|
9
|
+
tool: "tool";
|
|
10
|
+
}>;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
change: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const reviewCloseOutSchema: z.ZodObject<{
|
|
3
|
+
verdict: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"passed">;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
kind: z.ZodLiteral<"changes-requested">;
|
|
7
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
body: z.ZodString;
|
|
10
|
+
path: z.ZodExactOptional<z.ZodString>;
|
|
11
|
+
line: z.ZodExactOptional<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
}, z.core.$strip>], "kind">;
|
|
14
|
+
noslop: z.ZodObject<{
|
|
15
|
+
version: z.ZodNumber;
|
|
16
|
+
reviewID: z.ZodString;
|
|
17
|
+
head: z.core.$ZodBranded<z.ZodString, "CommitSha", "out">;
|
|
18
|
+
counts: z.ZodObject<{
|
|
19
|
+
findings: z.ZodNumber;
|
|
20
|
+
failedCalls: z.ZodNumber;
|
|
21
|
+
fixChecks: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
reportBytes: z.ZodNumber;
|
|
24
|
+
report: z.ZodNullable<z.ZodJSONSchema>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
friction: z.ZodArray<z.ZodObject<{
|
|
27
|
+
target: z.ZodObject<{
|
|
28
|
+
kind: z.ZodEnum<{
|
|
29
|
+
"agents-md": "agents-md";
|
|
30
|
+
lint: "lint";
|
|
31
|
+
rule: "rule";
|
|
32
|
+
skill: "skill";
|
|
33
|
+
tool: "tool";
|
|
34
|
+
}>;
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
change: z.ZodString;
|
|
38
|
+
}, z.core.$strip>>;
|
|
39
|
+
frictionDropped: z.ZodNumber;
|
|
40
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const triageCloseOutSchema: z.ZodObject<{
|
|
3
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"accepted">;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
kind: z.ZodLiteral<"duplicate">;
|
|
7
|
+
of: z.core.$ZodBranded<z.ZodString, "ItemId", "out">;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
kind: z.ZodLiteral<"declined">;
|
|
10
|
+
reason: z.ZodString;
|
|
11
|
+
}, z.core.$strip>], "kind">;
|
|
12
|
+
set: z.ZodExactOptional<z.ZodObject<{
|
|
13
|
+
kind: z.ZodExactOptional<z.core.$ZodBranded<z.ZodString, "ItemKindName", "out">>;
|
|
14
|
+
designMode: z.ZodExactOptional<z.ZodEnum<{
|
|
15
|
+
agent: "agent";
|
|
16
|
+
attended: "attended";
|
|
17
|
+
}>>;
|
|
18
|
+
acceptance: z.ZodExactOptional<z.ZodArray<z.ZodObject<{
|
|
19
|
+
text: z.ZodString;
|
|
20
|
+
}, z.core.$strip>>>;
|
|
21
|
+
}, z.core.$strict>>;
|
|
22
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
23
|
+
type: z.core.$ZodBranded<z.ZodString, "RelationTypeName", "out">;
|
|
24
|
+
target: z.core.$ZodBranded<z.ZodString, "ItemId", "out">;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
friction: z.ZodArray<z.ZodObject<{
|
|
27
|
+
target: z.ZodObject<{
|
|
28
|
+
kind: z.ZodEnum<{
|
|
29
|
+
"agents-md": "agents-md";
|
|
30
|
+
lint: "lint";
|
|
31
|
+
rule: "rule";
|
|
32
|
+
skill: "skill";
|
|
33
|
+
tool: "tool";
|
|
34
|
+
}>;
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
change: z.ZodString;
|
|
38
|
+
}, z.core.$strip>>;
|
|
39
|
+
frictionDropped: z.ZodNumber;
|
|
40
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import type { JsonValue } from '@boxxy/content-hash';
|
|
2
|
+
import type { AttemptId, CommitSha, Criterion, CriterionId, DesignMode, EvidenceRow, FactId, ItemId, ItemKindName, ItemView, RelationTypeName, RepoName } from '../types.ts';
|
|
3
|
+
export type CloseOut = TriageCloseOut | DesignCloseOut | BuildCloseOut | ReviewCloseOut;
|
|
4
|
+
export interface TriageCloseOut {
|
|
5
|
+
readonly result: {
|
|
6
|
+
readonly kind: 'accepted';
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: 'duplicate';
|
|
9
|
+
readonly of: ItemId;
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: 'declined';
|
|
12
|
+
readonly reason: string;
|
|
13
|
+
};
|
|
14
|
+
readonly set?: {
|
|
15
|
+
readonly kind?: ItemKindName;
|
|
16
|
+
readonly designMode?: DesignMode;
|
|
17
|
+
readonly acceptance?: readonly {
|
|
18
|
+
readonly text: string;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
readonly relations: readonly RelationDraft[];
|
|
22
|
+
readonly friction: readonly Friction[];
|
|
23
|
+
readonly frictionDropped: number;
|
|
24
|
+
}
|
|
25
|
+
export interface DesignCloseOut {
|
|
26
|
+
readonly result: {
|
|
27
|
+
readonly kind: 'designed';
|
|
28
|
+
readonly design: DesignRef;
|
|
29
|
+
} | {
|
|
30
|
+
readonly kind: 'blocked';
|
|
31
|
+
readonly reason: string;
|
|
32
|
+
} | {
|
|
33
|
+
readonly kind: 'abandoned';
|
|
34
|
+
readonly reason: string;
|
|
35
|
+
};
|
|
36
|
+
readonly friction: readonly Friction[];
|
|
37
|
+
readonly frictionDropped: number;
|
|
38
|
+
}
|
|
39
|
+
export interface DesignRef {
|
|
40
|
+
readonly summary: string;
|
|
41
|
+
readonly location: string | null;
|
|
42
|
+
}
|
|
43
|
+
export interface BuildCloseOut {
|
|
44
|
+
readonly result: {
|
|
45
|
+
readonly kind: 'built';
|
|
46
|
+
} | {
|
|
47
|
+
readonly kind: 'blocked';
|
|
48
|
+
readonly reason: string;
|
|
49
|
+
} | {
|
|
50
|
+
readonly kind: 'abandoned';
|
|
51
|
+
readonly reason: string;
|
|
52
|
+
};
|
|
53
|
+
readonly criteria: readonly {
|
|
54
|
+
readonly criterion: CriterionId;
|
|
55
|
+
readonly evidence: FactId;
|
|
56
|
+
}[];
|
|
57
|
+
readonly openItems: readonly OpenItem[];
|
|
58
|
+
readonly friction: readonly Friction[];
|
|
59
|
+
readonly frictionDropped: number;
|
|
60
|
+
}
|
|
61
|
+
export interface ReviewCloseOut {
|
|
62
|
+
readonly verdict: {
|
|
63
|
+
readonly kind: 'passed';
|
|
64
|
+
} | {
|
|
65
|
+
readonly kind: 'changes-requested';
|
|
66
|
+
readonly findings: readonly Finding[];
|
|
67
|
+
};
|
|
68
|
+
readonly noslop: NoslopSummary;
|
|
69
|
+
readonly friction: readonly Friction[];
|
|
70
|
+
readonly frictionDropped: number;
|
|
71
|
+
}
|
|
72
|
+
export interface NoslopSummary {
|
|
73
|
+
readonly version: number;
|
|
74
|
+
readonly reviewID: string;
|
|
75
|
+
readonly head: CommitSha;
|
|
76
|
+
readonly counts: {
|
|
77
|
+
readonly findings: number;
|
|
78
|
+
readonly failedCalls: number;
|
|
79
|
+
readonly fixChecks: number;
|
|
80
|
+
};
|
|
81
|
+
readonly reportBytes: number;
|
|
82
|
+
readonly report: JsonValue | null;
|
|
83
|
+
}
|
|
84
|
+
export interface Finding {
|
|
85
|
+
readonly title: string;
|
|
86
|
+
readonly body: string;
|
|
87
|
+
readonly path?: string;
|
|
88
|
+
readonly line?: number;
|
|
89
|
+
}
|
|
90
|
+
export interface RelationDraft {
|
|
91
|
+
readonly type: RelationTypeName;
|
|
92
|
+
readonly target: ItemId;
|
|
93
|
+
}
|
|
94
|
+
export interface OpenItem {
|
|
95
|
+
readonly kind: 'core.issue';
|
|
96
|
+
readonly title: string;
|
|
97
|
+
readonly body: string;
|
|
98
|
+
}
|
|
99
|
+
export type FrictionTargetKind = 'skill' | 'rule' | 'lint' | 'agents-md' | 'tool';
|
|
100
|
+
export interface Friction {
|
|
101
|
+
readonly target: {
|
|
102
|
+
readonly kind: FrictionTargetKind;
|
|
103
|
+
readonly name: string;
|
|
104
|
+
};
|
|
105
|
+
readonly change: string;
|
|
106
|
+
}
|
|
107
|
+
export type Effect = {
|
|
108
|
+
readonly kind: 'file-item';
|
|
109
|
+
readonly item: OpenItem;
|
|
110
|
+
} | {
|
|
111
|
+
readonly kind: 'close-item';
|
|
112
|
+
readonly reason: string;
|
|
113
|
+
readonly of: ItemId | null;
|
|
114
|
+
} | {
|
|
115
|
+
readonly kind: 'add-relation';
|
|
116
|
+
readonly relation: RelationDraft;
|
|
117
|
+
} | {
|
|
118
|
+
readonly kind: 'set-kind';
|
|
119
|
+
readonly itemKind: ItemKindName;
|
|
120
|
+
} | {
|
|
121
|
+
readonly kind: 'set-field';
|
|
122
|
+
readonly field: 'designMode';
|
|
123
|
+
readonly value: DesignMode;
|
|
124
|
+
} | {
|
|
125
|
+
readonly kind: 'set-acceptance';
|
|
126
|
+
readonly criteria: readonly Criterion[];
|
|
127
|
+
} | {
|
|
128
|
+
readonly kind: 'record-proposal';
|
|
129
|
+
readonly friction: Friction;
|
|
130
|
+
};
|
|
131
|
+
export type CloseOutProblem = {
|
|
132
|
+
readonly kind: 'schema';
|
|
133
|
+
readonly path: string;
|
|
134
|
+
readonly message: string;
|
|
135
|
+
} | {
|
|
136
|
+
readonly kind: 'unknown-criterion';
|
|
137
|
+
readonly criterion: CriterionId;
|
|
138
|
+
} | {
|
|
139
|
+
readonly kind: 'foreign-evidence';
|
|
140
|
+
readonly evidence: FactId;
|
|
141
|
+
} | {
|
|
142
|
+
readonly kind: 'built-without-evidence';
|
|
143
|
+
readonly criteria: readonly CriterionId[];
|
|
144
|
+
} | {
|
|
145
|
+
readonly kind: 'no-acceptance';
|
|
146
|
+
} | {
|
|
147
|
+
readonly kind: 'unknown-item';
|
|
148
|
+
readonly item: string;
|
|
149
|
+
} | {
|
|
150
|
+
readonly kind: 'unknown-kind';
|
|
151
|
+
readonly itemKind: string;
|
|
152
|
+
} | {
|
|
153
|
+
readonly kind: 'refused-relation';
|
|
154
|
+
readonly type: string;
|
|
155
|
+
readonly target: string;
|
|
156
|
+
readonly reason: 'unknown-type' | 'self';
|
|
157
|
+
} | {
|
|
158
|
+
readonly kind: 'phase-rule';
|
|
159
|
+
readonly message: string;
|
|
160
|
+
} | {
|
|
161
|
+
readonly kind: 'too-large';
|
|
162
|
+
readonly bytes: number;
|
|
163
|
+
readonly max: number;
|
|
164
|
+
};
|
|
165
|
+
export type CloseOutParse<Body> = {
|
|
166
|
+
readonly kind: 'valid';
|
|
167
|
+
readonly closeOut: Body;
|
|
168
|
+
} | {
|
|
169
|
+
readonly kind: 'invalid';
|
|
170
|
+
readonly problems: readonly CloseOutProblem[];
|
|
171
|
+
};
|
|
172
|
+
export interface CloseOutParser<Body> {
|
|
173
|
+
parse: (raw: unknown, ctx: CloseOutContext) => CloseOutParse<Body>;
|
|
174
|
+
readonly jsonSchema: JsonValue;
|
|
175
|
+
}
|
|
176
|
+
export interface CloseOutContext {
|
|
177
|
+
readonly item: ItemView;
|
|
178
|
+
readonly attempt: AttemptId;
|
|
179
|
+
readonly evidence: readonly EvidenceRow[];
|
|
180
|
+
readonly world: CloseOutWorld;
|
|
181
|
+
}
|
|
182
|
+
export interface CloseOutWorld {
|
|
183
|
+
readonly items: ReadonlySet<ItemId>;
|
|
184
|
+
readonly kinds: ReadonlySet<ItemKindName>;
|
|
185
|
+
readonly relationTypes: ReadonlySet<RelationTypeName>;
|
|
186
|
+
}
|
|
187
|
+
export interface CriterionText {
|
|
188
|
+
readonly id: CriterionId;
|
|
189
|
+
readonly text: string;
|
|
190
|
+
}
|
|
191
|
+
export interface AcceptanceInput {
|
|
192
|
+
readonly acceptance: readonly CriterionText[];
|
|
193
|
+
}
|
|
194
|
+
export interface BuildInput {
|
|
195
|
+
readonly acceptance: readonly CriterionText[];
|
|
196
|
+
readonly design: DesignRef | null;
|
|
197
|
+
readonly findings: readonly Finding[];
|
|
198
|
+
readonly pullRequest: PullRequestLink | null;
|
|
199
|
+
}
|
|
200
|
+
export interface ReviewInput {
|
|
201
|
+
readonly acceptance: readonly CriterionText[];
|
|
202
|
+
readonly design: DesignRef | null;
|
|
203
|
+
readonly pullRequest: PullRequestLink | null;
|
|
204
|
+
}
|
|
205
|
+
export interface PullRequestLink {
|
|
206
|
+
readonly repo: RepoName;
|
|
207
|
+
readonly number: number;
|
|
208
|
+
readonly url: string;
|
|
209
|
+
}
|
|
210
|
+
export type CloseOutAnswer = {
|
|
211
|
+
readonly kind: 'recorded';
|
|
212
|
+
readonly attempt: AttemptId;
|
|
213
|
+
readonly factId: FactId;
|
|
214
|
+
readonly repeat: boolean;
|
|
215
|
+
} | {
|
|
216
|
+
readonly kind: 'rejected';
|
|
217
|
+
readonly problems: readonly CloseOutProblem[];
|
|
218
|
+
} | {
|
|
219
|
+
readonly kind: 'refused';
|
|
220
|
+
readonly reason: 'no-attempt' | 'already-closed-out' | 'not-current';
|
|
221
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StoreChange } from '../ports/types.ts';
|
|
2
|
+
export interface ChangeAssignments {
|
|
3
|
+
readonly lastLeverSeq: number;
|
|
4
|
+
readonly lastNoticeId: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function buildAppliedChange(change: StoreChange, assignments: ChangeAssignments): Pick<StoreChange, 'writes' | 'facts'>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Limit } from '../planning/types.ts';
|
|
2
|
+
import type { AttemptRow, Instant, LimitSeatRow } from '../types.ts';
|
|
3
|
+
export interface SeatSync {
|
|
4
|
+
readonly release: readonly LimitSeatRow[];
|
|
5
|
+
readonly take: readonly LimitSeatRow[];
|
|
6
|
+
}
|
|
7
|
+
interface SeatSyncInput {
|
|
8
|
+
readonly limits: readonly Limit[];
|
|
9
|
+
readonly held: readonly LimitSeatRow[];
|
|
10
|
+
readonly attempts: readonly AttemptRow[];
|
|
11
|
+
readonly at: Instant;
|
|
12
|
+
}
|
|
13
|
+
export declare function collectSeatSync(input: SeatSyncInput): SeatSync;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LimitFill, SeatTake } from '../planning/types.ts';
|
|
2
|
+
import type { Instant, LimitName, LimitSeatRow } from '../types.ts';
|
|
3
|
+
export type SeatTakeAnswer = {
|
|
4
|
+
readonly kind: 'take';
|
|
5
|
+
readonly seats: readonly LimitSeatRow[];
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: 'limit-full' | 'unknown-limit';
|
|
8
|
+
readonly limit: LimitName;
|
|
9
|
+
};
|
|
10
|
+
export declare function pickSeatTake(take: SeatTake, limits: readonly LimitFill[], at: Instant): SeatTakeAnswer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SpawnRequest } from '../ports/types.ts';
|
|
2
|
+
import type { AttemptRow, KeptSession } from '../types.ts';
|
|
3
|
+
export type Claim = {
|
|
4
|
+
readonly kind: 'start';
|
|
5
|
+
readonly attempt: AttemptRow;
|
|
6
|
+
readonly spawn: SpawnRequest;
|
|
7
|
+
readonly kept: KeptSession | null;
|
|
8
|
+
} | {
|
|
9
|
+
readonly kind: 'wake';
|
|
10
|
+
readonly attempt: AttemptRow;
|
|
11
|
+
};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import type { ContentHash, JsonValue } from '@boxxy/content-hash';
|
|
2
|
+
import type { CloseOut, Effect, Friction } from '../closeouts/types.ts';
|
|
3
|
+
import type { SeatRef } from '../planning/types.ts';
|
|
4
|
+
import type { WakeSource } from '../ports/types.ts';
|
|
5
|
+
import type { ActorRef, AgentSessionId, AtcSessionId, AttemptId, CallerIdentity, ClosingCause, CommitSha, Criterion, CriterionId, DecisionRow, DesignMode, EvidenceKind, FactId, FieldValues, Instant, ItemId, ItemKindName, ItemRow, LeverRow, Minutes, PhaseName, PoolName, Product, RecipeHash, RelationTypeName, RepoName, RulesVersion, SessionMode } from '../types.ts';
|
|
6
|
+
export type EntityRef = `boxxy:item:${string}`;
|
|
7
|
+
export interface FactEnvelope<M extends object, T extends keyof M & string = keyof M & string> {
|
|
8
|
+
readonly id: FactId;
|
|
9
|
+
readonly type: T;
|
|
10
|
+
readonly v: 1;
|
|
11
|
+
readonly api: 'boxxy/1';
|
|
12
|
+
readonly entity: EntityRef;
|
|
13
|
+
readonly actor: ActorRef;
|
|
14
|
+
readonly at: Instant;
|
|
15
|
+
readonly payload: M[T] & {
|
|
16
|
+
readonly storeVersion: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface NewFact<T extends FactType> {
|
|
20
|
+
readonly id: FactId;
|
|
21
|
+
readonly type: T;
|
|
22
|
+
readonly entity: EntityRef;
|
|
23
|
+
readonly actor: ActorRef;
|
|
24
|
+
readonly payload: WorkFacts[T];
|
|
25
|
+
}
|
|
26
|
+
export type AnyNewFact = {
|
|
27
|
+
[T in FactType]: NewFact<T>;
|
|
28
|
+
}[FactType];
|
|
29
|
+
export interface OutboxFact {
|
|
30
|
+
readonly seq: number;
|
|
31
|
+
readonly factId: FactId;
|
|
32
|
+
readonly type: FactType;
|
|
33
|
+
readonly entity: EntityRef;
|
|
34
|
+
readonly actor: ActorRef;
|
|
35
|
+
readonly at: Instant;
|
|
36
|
+
readonly payload: JsonValue;
|
|
37
|
+
readonly sentAt: Instant | null;
|
|
38
|
+
readonly parkedAt: Instant | null;
|
|
39
|
+
readonly parkedReason: string | null;
|
|
40
|
+
}
|
|
41
|
+
export type FactType = keyof WorkFacts;
|
|
42
|
+
export interface RelationPayload {
|
|
43
|
+
readonly source: ItemId;
|
|
44
|
+
readonly target: ItemId;
|
|
45
|
+
readonly type: RelationTypeName;
|
|
46
|
+
}
|
|
47
|
+
interface OfAttempt {
|
|
48
|
+
readonly attempt: AttemptId;
|
|
49
|
+
}
|
|
50
|
+
export interface WorkFacts {
|
|
51
|
+
'boxxy.item.filed': Omit<ItemRow, 'keptSession'>;
|
|
52
|
+
'boxxy.item.noted': {
|
|
53
|
+
readonly seq: number;
|
|
54
|
+
readonly text: string;
|
|
55
|
+
};
|
|
56
|
+
'boxxy.item.edited': {
|
|
57
|
+
readonly title?: string;
|
|
58
|
+
readonly outcome?: string;
|
|
59
|
+
readonly acceptance?: readonly Criterion[];
|
|
60
|
+
readonly kind?: ItemKindName;
|
|
61
|
+
readonly fields?: {
|
|
62
|
+
readonly designMode?: DesignMode;
|
|
63
|
+
};
|
|
64
|
+
readonly labels?: readonly string[];
|
|
65
|
+
readonly byAttempt: AttemptId | null;
|
|
66
|
+
};
|
|
67
|
+
'boxxy.item.closed': {
|
|
68
|
+
readonly reason: string;
|
|
69
|
+
readonly byAttempt: AttemptId | null;
|
|
70
|
+
readonly ended: readonly {
|
|
71
|
+
readonly attempt: AttemptId;
|
|
72
|
+
readonly how: 'settled' | 'closing';
|
|
73
|
+
}[];
|
|
74
|
+
};
|
|
75
|
+
'boxxy.relation.added': RelationPayload;
|
|
76
|
+
'boxxy.relation.removed': RelationPayload;
|
|
77
|
+
'boxxy.lever.recorded': LeverRow;
|
|
78
|
+
'boxxy.attempt.claimed': OfAttempt & {
|
|
79
|
+
readonly phase: PhaseName;
|
|
80
|
+
readonly number: number;
|
|
81
|
+
readonly round: number;
|
|
82
|
+
readonly mode: SessionMode;
|
|
83
|
+
readonly pool: PoolName;
|
|
84
|
+
readonly fields: FieldValues;
|
|
85
|
+
readonly seats: readonly SeatRef[];
|
|
86
|
+
readonly recipeHash: RecipeHash;
|
|
87
|
+
readonly skillsRef: CommitSha | null;
|
|
88
|
+
readonly rulesVersion: RulesVersion;
|
|
89
|
+
};
|
|
90
|
+
'boxxy.decision.recorded': DecisionRow;
|
|
91
|
+
'boxxy.attempt.started': OfAttempt & {
|
|
92
|
+
readonly atcSession: AtcSessionId;
|
|
93
|
+
readonly resumeFallback: boolean;
|
|
94
|
+
readonly caller: CallerIdentity | null;
|
|
95
|
+
};
|
|
96
|
+
'boxxy.attempt.spawn_unanswered': OfAttempt & {
|
|
97
|
+
readonly reason: string;
|
|
98
|
+
};
|
|
99
|
+
'boxxy.attempt.reconciled': OfAttempt & {
|
|
100
|
+
readonly atcSession: AtcSessionId;
|
|
101
|
+
readonly caller: CallerIdentity | null;
|
|
102
|
+
};
|
|
103
|
+
'boxxy.attempt.session_bound': OfAttempt & {
|
|
104
|
+
readonly atcSession: AtcSessionId;
|
|
105
|
+
readonly agentSession: AgentSessionId;
|
|
106
|
+
readonly product: Product;
|
|
107
|
+
readonly source: 'worker' | 'hook';
|
|
108
|
+
readonly seenAt: Instant;
|
|
109
|
+
};
|
|
110
|
+
'boxxy.attempt.slept': OfAttempt & {
|
|
111
|
+
readonly idleSince: Instant;
|
|
112
|
+
readonly asked: boolean;
|
|
113
|
+
};
|
|
114
|
+
'boxxy.attempt.wake_requested': OfAttempt & {
|
|
115
|
+
readonly by: WakeSource;
|
|
116
|
+
};
|
|
117
|
+
'boxxy.attempt.woken': OfAttempt & {
|
|
118
|
+
readonly holdGen: number;
|
|
119
|
+
readonly seats: readonly SeatRef[];
|
|
120
|
+
readonly overCap: boolean;
|
|
121
|
+
};
|
|
122
|
+
'boxxy.attempt.resumed': OfAttempt & {
|
|
123
|
+
readonly atcSession: AtcSessionId;
|
|
124
|
+
readonly caller: CallerIdentity | null;
|
|
125
|
+
};
|
|
126
|
+
'boxxy.attempt.closed_out': OfAttempt & {
|
|
127
|
+
readonly phase: PhaseName;
|
|
128
|
+
readonly closeOut: CloseOut;
|
|
129
|
+
readonly hash: ContentHash;
|
|
130
|
+
};
|
|
131
|
+
'boxxy.attempt.timed_out': OfAttempt & {
|
|
132
|
+
readonly phase: PhaseName;
|
|
133
|
+
readonly afterMinutes: Minutes;
|
|
134
|
+
};
|
|
135
|
+
'boxxy.attempt.turn_ended': OfAttempt & {
|
|
136
|
+
readonly phase: PhaseName;
|
|
137
|
+
};
|
|
138
|
+
'boxxy.attempt.settled': OfAttempt & {
|
|
139
|
+
readonly phase: PhaseName;
|
|
140
|
+
readonly round: number;
|
|
141
|
+
readonly state: 'succeeded' | 'failed';
|
|
142
|
+
readonly failure: string | null;
|
|
143
|
+
readonly outcome: string;
|
|
144
|
+
readonly returnedOutcome: string | null;
|
|
145
|
+
readonly closing: ClosingCause | null;
|
|
146
|
+
readonly asleep: boolean;
|
|
147
|
+
readonly sessionStopped: boolean;
|
|
148
|
+
readonly endedAt: Instant;
|
|
149
|
+
readonly criteria: readonly {
|
|
150
|
+
readonly criterion: CriterionId;
|
|
151
|
+
readonly evidence: readonly FactId[];
|
|
152
|
+
}[];
|
|
153
|
+
readonly matched: readonly ItemId[];
|
|
154
|
+
readonly frictionDropped: number;
|
|
155
|
+
readonly skippedEffects: readonly {
|
|
156
|
+
readonly effect: Effect['kind'];
|
|
157
|
+
readonly reason: string;
|
|
158
|
+
}[];
|
|
159
|
+
};
|
|
160
|
+
'boxxy.proposal.recorded': OfAttempt & Friction;
|
|
161
|
+
'boxxy.evidence.recorded': OfAttempt & {
|
|
162
|
+
readonly kind: EvidenceKind;
|
|
163
|
+
readonly ref: string;
|
|
164
|
+
readonly observed: string | null;
|
|
165
|
+
};
|
|
166
|
+
'boxxy.pull_request.linked': OfAttempt & {
|
|
167
|
+
readonly repo: RepoName;
|
|
168
|
+
readonly number: number;
|
|
169
|
+
readonly url: string;
|
|
170
|
+
readonly pullRequestId: string;
|
|
171
|
+
readonly source: 'hook' | 'watch';
|
|
172
|
+
};
|
|
173
|
+
'boxxy.commit.linked': OfAttempt & {
|
|
174
|
+
readonly repo: RepoName;
|
|
175
|
+
readonly sha: CommitSha;
|
|
176
|
+
readonly pullRequestNumber: number;
|
|
177
|
+
};
|
|
178
|
+
'boxxy.pull_request.merged': OfAttempt & {
|
|
179
|
+
readonly repo: RepoName;
|
|
180
|
+
readonly number: number;
|
|
181
|
+
readonly pullRequestId: string;
|
|
182
|
+
readonly mergedAt: Instant;
|
|
183
|
+
readonly mergeCommit: CommitSha;
|
|
184
|
+
};
|
|
185
|
+
'boxxy.pull_request.closed': OfAttempt & {
|
|
186
|
+
readonly repo: RepoName;
|
|
187
|
+
readonly number: number;
|
|
188
|
+
readonly pullRequestId: string;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
export {};
|