@bluewombat/runtime 0.8.0 → 0.10.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/README.md +236 -142
- package/SPECS.md +138 -97
- package/dist/cli.js +35 -37
- package/dist/cli.js.map +1 -1
- package/dist/config/agent-shorthand.d.ts +24 -4
- package/dist/config/agent-shorthand.d.ts.map +1 -1
- package/dist/config/agent-shorthand.js +65 -28
- package/dist/config/agent-shorthand.js.map +1 -1
- package/dist/config/defaults.d.ts +0 -2
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +0 -2
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/find-config.d.ts +3 -2
- package/dist/config/find-config.d.ts.map +1 -1
- package/dist/config/find-config.js +4 -4
- package/dist/config/find-config.js.map +1 -1
- package/dist/config/home.d.ts +2 -0
- package/dist/config/home.d.ts.map +1 -1
- package/dist/config/home.js +4 -2
- package/dist/config/home.js.map +1 -1
- package/dist/config/load-config.d.ts +2 -2
- package/dist/config/load-config.d.ts.map +1 -1
- package/dist/config/load-config.js +342 -73
- package/dist/config/load-config.js.map +1 -1
- package/dist/config/parse-args.d.ts +1 -1
- package/dist/config/parse-args.d.ts.map +1 -1
- package/dist/config/parse-args.js +132 -103
- package/dist/config/parse-args.js.map +1 -1
- package/dist/config/types.d.ts +142 -38
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +13 -1
- package/dist/config/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/loop/authority.d.ts +41 -5
- package/dist/loop/authority.d.ts.map +1 -1
- package/dist/loop/authority.js +68 -24
- package/dist/loop/authority.js.map +1 -1
- package/dist/loop/context.d.ts +23 -3
- package/dist/loop/context.d.ts.map +1 -1
- package/dist/loop/deliveries.d.ts +16 -16
- package/dist/loop/deliveries.d.ts.map +1 -1
- package/dist/loop/deliveries.js +35 -187
- package/dist/loop/deliveries.js.map +1 -1
- package/dist/loop/describe.d.ts +4 -6
- package/dist/loop/describe.d.ts.map +1 -1
- package/dist/loop/describe.js +2 -2
- package/dist/loop/describe.js.map +1 -1
- package/dist/loop/drive.d.ts +11 -7
- package/dist/loop/drive.d.ts.map +1 -1
- package/dist/loop/drive.js +24 -38
- package/dist/loop/drive.js.map +1 -1
- package/dist/loop/features.d.ts +23 -0
- package/dist/loop/features.d.ts.map +1 -0
- package/dist/loop/features.js +834 -0
- package/dist/loop/features.js.map +1 -0
- package/dist/loop/journal.d.ts +1 -1
- package/dist/loop/journal.js +2 -2
- package/dist/loop/journal.js.map +1 -1
- package/dist/loop/lock.d.ts +1 -1
- package/dist/loop/lock.js +1 -1
- package/dist/loop/open-host.d.ts.map +1 -1
- package/dist/loop/open-host.js +132 -31
- package/dist/loop/open-host.js.map +1 -1
- package/dist/loop/probe.d.ts +1 -1
- package/dist/loop/probe.d.ts.map +1 -1
- package/dist/loop/probe.js +51 -22
- package/dist/loop/probe.js.map +1 -1
- package/dist/loop/process-tree.d.ts +1 -1
- package/dist/loop/process-tree.js +1 -1
- package/dist/loop/report.d.ts +9 -7
- package/dist/loop/report.d.ts.map +1 -1
- package/dist/loop/report.js +49 -106
- package/dist/loop/report.js.map +1 -1
- package/dist/loop/streams.d.ts +5 -5
- package/dist/loop/streams.d.ts.map +1 -1
- package/dist/loop/streams.js +3 -3
- package/dist/loop/streams.js.map +1 -1
- package/dist/loop/tick.d.ts +6 -4
- package/dist/loop/tick.d.ts.map +1 -1
- package/dist/loop/tick.js +50 -78
- package/dist/loop/tick.js.map +1 -1
- package/dist/loop/trace.d.ts +5 -5
- package/dist/loop/trace.d.ts.map +1 -1
- package/dist/loop/trace.js +5 -14
- package/dist/loop/trace.js.map +1 -1
- package/dist/loop/transformers.d.ts +18 -14
- package/dist/loop/transformers.d.ts.map +1 -1
- package/dist/loop/transformers.js +139 -74
- package/dist/loop/transformers.js.map +1 -1
- package/dist/loop/warm.d.ts +3 -3
- package/dist/loop/warm.js +4 -4
- package/dist/loop/warm.js.map +1 -1
- package/dist/loop/work-line.d.ts +1 -1
- package/dist/operator/agent-plugins.d.ts +11 -0
- package/dist/operator/agent-plugins.d.ts.map +1 -1
- package/dist/operator/agent-plugins.js +17 -11
- package/dist/operator/agent-plugins.js.map +1 -1
- package/dist/operator/board.d.ts +3 -8
- package/dist/operator/board.d.ts.map +1 -1
- package/dist/operator/board.js +2 -11
- package/dist/operator/board.js.map +1 -1
- package/dist/operator/cancel.d.ts +2 -2
- package/dist/operator/cancel.js +6 -6
- package/dist/operator/cancel.js.map +1 -1
- package/dist/operator/doctor.d.ts +9 -0
- package/dist/operator/doctor.d.ts.map +1 -1
- package/dist/operator/doctor.js +110 -53
- package/dist/operator/doctor.js.map +1 -1
- package/dist/operator/explain.d.ts +76 -0
- package/dist/operator/explain.d.ts.map +1 -0
- package/dist/operator/explain.js +585 -0
- package/dist/operator/explain.js.map +1 -0
- package/dist/operator/film.d.ts +3 -11
- package/dist/operator/film.d.ts.map +1 -1
- package/dist/operator/film.js +8 -93
- package/dist/operator/film.js.map +1 -1
- package/dist/operator/init.d.ts.map +1 -1
- package/dist/operator/init.js +52 -55
- package/dist/operator/init.js.map +1 -1
- package/dist/operator/live.js +1 -1
- package/dist/operator/live.js.map +1 -1
- package/dist/operator/log.js +12 -6
- package/dist/operator/log.js.map +1 -1
- package/dist/operator/release.d.ts +2 -2
- package/dist/operator/release.js +7 -7
- package/dist/operator/release.js.map +1 -1
- package/dist/operator/run.d.ts +25 -0
- package/dist/operator/run.d.ts.map +1 -0
- package/dist/operator/run.js +70 -0
- package/dist/operator/run.js.map +1 -0
- package/dist/operator/setup.d.ts.map +1 -1
- package/dist/operator/setup.js +22 -16
- package/dist/operator/setup.js.map +1 -1
- package/dist/plugins/manager.d.ts +33 -2
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/plugins/manager.js +67 -0
- package/dist/plugins/manager.js.map +1 -1
- package/package.json +15 -16
package/dist/loop/describe.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type { PassSpec } from "../config/types.js";
|
|
2
2
|
/**
|
|
3
|
-
* How a delivered
|
|
3
|
+
* How a delivered ticket describes itself is the Project's decision, not
|
|
4
4
|
* Host's: a team has conventions, and an agent can read the change and
|
|
5
5
|
* follow them. The Describer slot is where that lives. Host spawns it once
|
|
6
|
-
* per
|
|
6
|
+
* per ticket, in the ticket workspace where the whole change is, tells it
|
|
7
7
|
* what was asked, and takes one JSON line back: `{ subject, body? }`. What
|
|
8
8
|
* the Authority makes of those words is the manager's business — for GitHub,
|
|
9
|
-
* the fold's message and the pull request's text.
|
|
10
|
-
* described: its fold is folded again into the feature's, and words spent on
|
|
11
|
-
* it are words wasted.
|
|
9
|
+
* the fold's message and the pull request's text.
|
|
12
10
|
*
|
|
13
11
|
* A slot that fails — cannot run, answers nothing readable, subject empty —
|
|
14
12
|
* is not a reason to lose the Submission: the caller keeps the words it had,
|
|
@@ -22,7 +20,7 @@ export type DescribeInput = {
|
|
|
22
20
|
intention: string;
|
|
23
21
|
/** The work line the change will land on, so the slot can diff against it. */
|
|
24
22
|
target: string;
|
|
25
|
-
/** The
|
|
23
|
+
/** The ticket workspace; the slot may read its diff. */
|
|
26
24
|
cwd: string;
|
|
27
25
|
};
|
|
28
26
|
export type Description = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../src/loop/describe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGnD
|
|
1
|
+
{"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../src/loop/describe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGnD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,WAAW,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpG,wBAAsB,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAwC5F"}
|
package/dist/loop/describe.js
CHANGED
|
@@ -10,9 +10,9 @@ export async function describe(slot, input) {
|
|
|
10
10
|
...rest,
|
|
11
11
|
"--id",
|
|
12
12
|
input.id,
|
|
13
|
-
// A Describer keeping a record of its turn files it under the
|
|
13
|
+
// A Describer keeping a record of its turn files it under the ticket,
|
|
14
14
|
// the way every other slot does. Without this its transcripts land in
|
|
15
|
-
// `no-context/` and the
|
|
15
|
+
// `no-context/` and the ticket has to be read back out of the filename.
|
|
16
16
|
"--context",
|
|
17
17
|
input.id,
|
|
18
18
|
"--title",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../src/loop/describe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../src/loop/describe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AA+BxC,MAAM,CAAC,KAAK,UAA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/loop/drive.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import type { ProjectRunResult } from "@bluewombat/conductor";
|
|
2
2
|
import type { HostDeliveryInput } from "./context.js";
|
|
3
3
|
/**
|
|
4
|
-
* Drive one Project and report on the
|
|
4
|
+
* Drive one Project and report on the Ticket that actually ran.
|
|
5
5
|
*
|
|
6
6
|
* A delivery names a key; `runProject` drives whoever is active on that
|
|
7
7
|
* Project. Attributing the outcome to the delivered key closed the wrong
|
|
8
8
|
* issue, or posted an escalation on one that had only been admitted.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
* repeats the verdict. The delivered key is journaled as queued, and a
|
|
12
|
-
* `progress` Event says so once on the tracker.
|
|
10
|
+
* A Project with an `escalated` Ticket is not driven: the caller checks first.
|
|
13
11
|
*/
|
|
14
|
-
export declare function driveProject(input: HostDeliveryInput, project: string, fallbackKey: string
|
|
12
|
+
export declare function driveProject(input: HostDeliveryInput, project: string, fallbackKey: string,
|
|
13
|
+
/**
|
|
14
|
+
* Drive exactly `fallbackKey`, which the Project already holds, instead of
|
|
15
|
+
* whoever is active: several Tickets are then driven at once, and the
|
|
16
|
+
* reconciling that would disturb the others is the caller's, once, before.
|
|
17
|
+
*/
|
|
18
|
+
exactly?: boolean): Promise<ProjectRunResult>;
|
|
15
19
|
/**
|
|
16
20
|
* Drive, then keep driving while a refusal is waiting for repair.
|
|
17
21
|
*
|
|
@@ -21,10 +25,10 @@ export declare function driveProject(input: HostDeliveryInput, project: string,
|
|
|
21
25
|
* next pass. Waiting a poll interval for that next pass is empty time: the
|
|
22
26
|
* work is local. Re-drive in the same Host tick until that case is gone — a
|
|
23
27
|
* new `submitted`, an escalation, or any non-`paused` outcome (e.g.
|
|
24
|
-
*
|
|
28
|
+
* interrupted).
|
|
25
29
|
*
|
|
26
30
|
* Do not continue from `submitted`: judging the Authority waits on the outside
|
|
27
31
|
* and must leave room for listen / probe between ticks.
|
|
28
32
|
*/
|
|
29
|
-
export declare function driveUntilBlocked(input: HostDeliveryInput, project: string, fallbackKey: string): Promise<ProjectRunResult
|
|
33
|
+
export declare function driveUntilBlocked(input: HostDeliveryInput, project: string, fallbackKey: string, exactly?: boolean): Promise<ProjectRunResult>;
|
|
30
34
|
//# sourceMappingURL=drive.d.ts.map
|
package/dist/loop/drive.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../src/loop/drive.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAItD
|
|
1
|
+
{"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../src/loop/drive.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAItD;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM;AACnB;;;;GAIG;AACH,OAAO,UAAQ,GACd,OAAO,CAAC,gBAAgB,CAAC,CAqC3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,UAAQ,GACd,OAAO,CAAC,gBAAgB,CAAC,CAiB3B"}
|
package/dist/loop/drive.js
CHANGED
|
@@ -1,40 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { journalTicket, reportAfterRun } from "./report.js";
|
|
2
|
+
import { describeTicket } from "./trace.js";
|
|
3
3
|
/**
|
|
4
|
-
* Drive one Project and report on the
|
|
4
|
+
* Drive one Project and report on the Ticket that actually ran.
|
|
5
5
|
*
|
|
6
6
|
* A delivery names a key; `runProject` drives whoever is active on that
|
|
7
7
|
* Project. Attributing the outcome to the delivered key closed the wrong
|
|
8
8
|
* issue, or posted an escalation on one that had only been admitted.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
* repeats the verdict. The delivered key is journaled as queued, and a
|
|
12
|
-
* `progress` Event says so once on the tracker.
|
|
10
|
+
* A Project with an `escalated` Ticket is not driven: the caller checks first.
|
|
13
11
|
*/
|
|
14
|
-
export async function driveProject(input, project, fallbackKey
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
eventId: `${fallbackKey}:queued:${held.key}`,
|
|
24
|
-
fields: {
|
|
25
|
-
summary: `Queued behind ${held.key}, which is escalated.`,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
return undefined;
|
|
12
|
+
export async function driveProject(input, project, fallbackKey,
|
|
13
|
+
/**
|
|
14
|
+
* Drive exactly `fallbackKey`, which the Project already holds, instead of
|
|
15
|
+
* whoever is active: several Tickets are then driven at once, and the
|
|
16
|
+
* reconciling that would disturb the others is the caller's, once, before.
|
|
17
|
+
*/
|
|
18
|
+
exactly = false) {
|
|
19
|
+
if (!exactly) {
|
|
20
|
+
await input.conductor.reconcile(project);
|
|
29
21
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
const run = exactly
|
|
23
|
+
? await input.conductor.runTicket(fallbackKey)
|
|
24
|
+
: await input.conductor.runProject(project);
|
|
25
|
+
// idle / refused name no Ticket; the delivered key is the only one we have.
|
|
33
26
|
const key = "key" in run && run.key !== undefined ? run.key : fallbackKey;
|
|
34
27
|
const got = await input.ledger.get(key);
|
|
35
28
|
if (got.ok) {
|
|
36
|
-
const line =
|
|
37
|
-
// A held
|
|
29
|
+
const line = describeTicket(got.aggregate);
|
|
30
|
+
// A held Ticket is swept every poll; repeating the same line on stdout
|
|
38
31
|
// looks like the loop is stuck printing, not waiting.
|
|
39
32
|
const traced = `trace:${key}:${line}`;
|
|
40
33
|
if (input.said === undefined || !input.said.has(traced)) {
|
|
@@ -48,7 +41,7 @@ export async function driveProject(input, project, fallbackKey) {
|
|
|
48
41
|
}
|
|
49
42
|
input.trace(line);
|
|
50
43
|
}
|
|
51
|
-
|
|
44
|
+
journalTicket(input.journal, run.outcome, got.aggregate, input.said);
|
|
52
45
|
await reportAfterRun(input, run, got.aggregate);
|
|
53
46
|
// The work landed, or it was abandoned: nobody is going to read what the
|
|
54
47
|
// agents said on the way. An escalation keeps everything — that is the one
|
|
@@ -69,16 +62,13 @@ export async function driveProject(input, project, fallbackKey) {
|
|
|
69
62
|
* next pass. Waiting a poll interval for that next pass is empty time: the
|
|
70
63
|
* work is local. Re-drive in the same Host tick until that case is gone — a
|
|
71
64
|
* new `submitted`, an escalation, or any non-`paused` outcome (e.g.
|
|
72
|
-
*
|
|
65
|
+
* interrupted).
|
|
73
66
|
*
|
|
74
67
|
* Do not continue from `submitted`: judging the Authority waits on the outside
|
|
75
68
|
* and must leave room for listen / probe between ticks.
|
|
76
69
|
*/
|
|
77
|
-
export async function driveUntilBlocked(input, project, fallbackKey) {
|
|
78
|
-
let last = await driveProject(input, project, fallbackKey);
|
|
79
|
-
if (last === undefined) {
|
|
80
|
-
return undefined;
|
|
81
|
-
}
|
|
70
|
+
export async function driveUntilBlocked(input, project, fallbackKey, exactly = false) {
|
|
71
|
+
let last = await driveProject(input, project, fallbackKey, exactly);
|
|
82
72
|
const interruptFlag = input.options.interruptFlag ?? { interrupted: false };
|
|
83
73
|
while (!interruptFlag.interrupted && last.outcome === "paused") {
|
|
84
74
|
const key = "key" in last && last.key !== undefined ? last.key : fallbackKey;
|
|
@@ -89,11 +79,7 @@ export async function driveUntilBlocked(input, project, fallbackKey) {
|
|
|
89
79
|
got.aggregate.parked_refusal === undefined)) {
|
|
90
80
|
break;
|
|
91
81
|
}
|
|
92
|
-
|
|
93
|
-
if (next === undefined) {
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
last = next;
|
|
82
|
+
last = await driveProject(input, project, key, exactly);
|
|
97
83
|
}
|
|
98
84
|
return last;
|
|
99
85
|
}
|
package/dist/loop/drive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../src/loop/drive.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../src/loop/drive.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,KAAwB,EACxB,OAAe,EACf,WAAmB;AACnB;;;;GAIG;AACH,OAAO,GAAG,KAAK;IAEf,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IACD,MAAM,GAAG,GAAG,OAAO;QACjB,CAAC,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC;QAC9C,CAAC,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC9C,4EAA4E;IAC5E,MAAM,GAAG,GAAG,KAAK,IAAI,GAAG,IAAI,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC;IAC1E,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxC,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC;QACX,MAAM,IAAI,GAAG,cAAc,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,EACxB,OAAe,EACf,WAAmB,EACnB,OAAO,GAAG,KAAK;IAEf,IAAI,IAAI,GAAG,MAAM,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACpE,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;IAC5E,OAAO,CAAC,aAAa,CAAC,WAAW,IAAI,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC/D,MAAM,GAAG,GAAG,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC;QAC7E,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACxC,IACE,CAAC,GAAG,CAAC,EAAE;YACP,GAAG,CAAC,SAAS,CAAC,KAAK,KAAK,aAAa;YACrC,CAAC,GAAG,CAAC,SAAS,CAAC,UAAU,EAAE,WAAW,KAAK,SAAS;gBAClD,GAAG,CAAC,SAAS,CAAC,cAAc,KAAK,SAAS,CAAC,EAC7C,CAAC;YACD,MAAM;QACR,CAAC;QACD,IAAI,GAAG,MAAM,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ProjectRunResult } from "@bluewombat/conductor";
|
|
2
|
+
import type { HostDeliveryInput, HostRunInput } from "./context.js";
|
|
3
|
+
import { type CancelResult } from "./deliveries.js";
|
|
4
|
+
/**
|
|
5
|
+
* One Feature delivery: admit it, resume it, or abandon it. Nothing is driven
|
|
6
|
+
* here — the sweep that follows advances every Project that has a Feature.
|
|
7
|
+
*/
|
|
8
|
+
export declare function handleFeatureDelivery(input: HostDeliveryInput, payload: Record<string, unknown>): Promise<{
|
|
9
|
+
advance: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Abandon a Feature: its Tickets that are not done are cancelled, its line is
|
|
13
|
+
* dropped, and the Project is free for the next one.
|
|
14
|
+
*/
|
|
15
|
+
export declare function cancelFeatureFlow(input: HostDeliveryInput, key: string): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Move a Project's Feature along by one step: open the next one that may open,
|
|
18
|
+
* make its Tickets, close its line, or watch for the human who folds it.
|
|
19
|
+
*/
|
|
20
|
+
export declare function advanceProject(input: HostDeliveryInput, project: string): Promise<ProjectRunResult | undefined>;
|
|
21
|
+
/** Abandon a Feature or a Ticket by key: whichever the ledger knows. */
|
|
22
|
+
export declare function cancelKey(input: HostRunInput, key: string): Promise<CancelResult>;
|
|
23
|
+
//# sourceMappingURL=features.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/loop/features.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAA+B,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAgB3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EACL,KAAK,YAAY,EAIlB,MAAM,iBAAiB,CAAC;AAiBzB;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CA+C/B;AAyED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwC5F;AAUD;;;GAGG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAsBvC;AAkwBD,wEAAwE;AACxE,wBAAsB,SAAS,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAavF"}
|