@nanobpm/nano-workforce 0.189.3 → 0.191.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/CHANGELOG.md +12 -0
- package/README.md +5 -4
- package/SPEC.md +5 -5
- package/app/agentGuide.ts +1 -1
- package/app/deliveryGraph.test.ts +447 -0
- package/app/deliveryGraph.ts +355 -0
- package/app/deliveryGraphCompiler.test.ts +1465 -3
- package/app/deliveryGraphCompiler.ts +833 -36
- package/app/deliveryGraphDispatch.test.ts +118 -2
- package/app/deliveryGraphDispatch.ts +138 -10
- package/app/deliveryGraphProposals.test.ts +243 -0
- package/app/deliveryGraphProposals.ts +130 -56
- package/app/deliveryGraphRun.test.ts +42 -2
- package/app/deliveryGraphRun.ts +46 -6
- package/app/deliveryGraphVocabulary.ts +6 -6
- package/app/deliveryRunner.test.ts +21 -0
- package/app/deliveryRunner.ts +9 -2
- package/app/readiness.test.ts +72 -0
- package/app/readiness.ts +234 -8
- package/db/migrations/113_delivery_graph_run_identity.sql +37 -0
- package/db/migrations/114_delivery_graph_proposals_stage_seq.sql +21 -0
- package/docs/adr/0005-agent-authored-delivery-graphs.md +1 -1
- package/docs/agent-guide.md +9 -9
- package/openapi.yaml +29 -17
- package/operations/dispatchDeliveryGraph.test.ts +255 -0
- package/operations/dispatchDeliveryGraph.ts +156 -5
- package/operations/getAgentInstructions.test.ts +2 -1
- package/operations/startAndMessage.test.ts +44 -2
- package/operations/startConvergenceLoop.ts +13 -10
- package/package.json +1 -1
- package/pages/home.page.json +2 -2
- package/workers/delivery-connector/worker.test.ts +8 -0
- package/workers/delivery-connector/worker.ts +13 -6
|
@@ -149,6 +149,14 @@ test("readConvergeInput: an explicit payload.convergeOnly overrides the target d
|
|
|
149
149
|
assertEquals(r.dependsOn, ["owner/repo#5"], "non-string dependsOn entries are dropped");
|
|
150
150
|
});
|
|
151
151
|
|
|
152
|
+
test("readConvergeInput: autoMerge is the positive per-dispatch control", () => {
|
|
153
|
+
const merge = readConvergeInput("converge", { pr: "owner/repo#7", autoMerge: true }, null);
|
|
154
|
+
assertEquals(merge.convergeOnly, false);
|
|
155
|
+
|
|
156
|
+
const review = readConvergeInput("converge-merge", { pr: "owner/repo#7", autoMerge: false }, null);
|
|
157
|
+
assertEquals(review.convergeOnly, true);
|
|
158
|
+
});
|
|
159
|
+
|
|
152
160
|
test("readConvergeInput: a missing / unparseable pr fails CLOSED (a converge connector with no target PR is meaningless)", () => {
|
|
153
161
|
assertThrows(() => readConvergeInput("converge-merge", null, null), Error, "payload.pr");
|
|
154
162
|
assertThrows(() => readConvergeInput("converge-merge", {}, null), Error, "payload.pr");
|
|
@@ -76,13 +76,14 @@ export function safeStringify(value: unknown): string {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
/** Parse + validate the converge connector's payload (`{ pr,
|
|
79
|
+
/** Parse + validate the converge connector's payload (`{ pr, autoMerge?, dependsOn? }`) for a
|
|
80
80
|
* `converge` / `converge-merge` / `merge-main` target. `pr` is REQUIRED and must parse to a canonical `owner/repo#N`
|
|
81
81
|
* (fail CLOSED — a converge connector with no target PR is meaningless and could never enroll).
|
|
82
|
-
* `
|
|
83
|
-
*
|
|
84
|
-
* optional list of PR refs unioned into the enrolled PR's
|
|
85
|
-
* entries are dropped; `submitPr` itself ignores unparseable
|
|
82
|
+
* `autoMerge` DEFAULTS from the target (`converge` → `false`; `converge-merge`/`merge-main` → `true`) and
|
|
83
|
+
* may be overridden per-dispatch by an explicit boolean. The deprecated `convergeOnly` alias is still
|
|
84
|
+
* accepted for compatibility. `dependsOn` is an optional list of PR refs unioned into the enrolled PR's
|
|
85
|
+
* merge-stage dependency set (only non-string entries are dropped; `submitPr` itself ignores unparseable
|
|
86
|
+
* refs). Exported for unit coverage.
|
|
86
87
|
*
|
|
87
88
|
* `pr` may be sourced three ways (issue #548), resolved by {@link resolveConvergePr} against the
|
|
88
89
|
* threaded `boundFacts` BEFORE parsing: a LITERAL `owner/repo#N`, an explicit fact REFERENCE
|
|
@@ -104,7 +105,13 @@ export function readConvergeInput(
|
|
|
104
105
|
`bound from an upstream \`agent\` node (got ${safeStringify(prValue ?? null)})`,
|
|
105
106
|
);
|
|
106
107
|
}
|
|
107
|
-
const
|
|
108
|
+
const autoMerge =
|
|
109
|
+
typeof p.autoMerge === "boolean"
|
|
110
|
+
? p.autoMerge
|
|
111
|
+
: typeof p.convergeOnly === "boolean"
|
|
112
|
+
? !p.convergeOnly
|
|
113
|
+
: !convergeOnlyForTarget(target);
|
|
114
|
+
const convergeOnly = !autoMerge;
|
|
108
115
|
const dependsOn = Array.isArray(p.dependsOn) ? p.dependsOn.filter((d): d is string => typeof d === "string") : [];
|
|
109
116
|
return { parsed, convergeOnly, dependsOn };
|
|
110
117
|
}
|