@aaac/runtime 0.2.3 → 0.2.5
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/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -18,11 +18,6 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
jsonSchemaToZod
|
|
20
20
|
} from "./chunk-ET6TGQRT.js";
|
|
21
|
-
import {
|
|
22
|
-
PROJECT_CONFIG_FILENAME,
|
|
23
|
-
loadProjectConfig,
|
|
24
|
-
loadWorkspaceMembers
|
|
25
|
-
} from "./chunk-F5R46S7I.js";
|
|
26
21
|
import {
|
|
27
22
|
toolGrantForAgent
|
|
28
23
|
} from "./chunk-VJXGCWSZ.js";
|
|
@@ -49,6 +44,11 @@ import {
|
|
|
49
44
|
renderContextPackPrompt,
|
|
50
45
|
serializeObserverEmit
|
|
51
46
|
} from "./chunk-KTVMMG33.js";
|
|
47
|
+
import {
|
|
48
|
+
PROJECT_CONFIG_FILENAME,
|
|
49
|
+
loadProjectConfig,
|
|
50
|
+
loadWorkspaceMembers
|
|
51
|
+
} from "./chunk-F5R46S7I.js";
|
|
52
52
|
import {
|
|
53
53
|
isNavigationIndex,
|
|
54
54
|
renderNavigationIndexPrompt
|
|
@@ -9566,6 +9566,9 @@ function agentOpts(task, step, handoffSchema, indent) {
|
|
|
9566
9566
|
function resultVar(i) {
|
|
9567
9567
|
return `step${i}Result`;
|
|
9568
9568
|
}
|
|
9569
|
+
function gateVar(i) {
|
|
9570
|
+
return `step${i}Gate`;
|
|
9571
|
+
}
|
|
9569
9572
|
function priorContextExpr(i, steps, deps) {
|
|
9570
9573
|
const fragments = [];
|
|
9571
9574
|
if (stepDependsOnWorkflowInput(steps[i].depends_on)) {
|
|
@@ -9664,15 +9667,16 @@ function emitGateStatements(step, i, steps, deps, pad, feedback) {
|
|
|
9664
9667
|
promptExpr = `${promptExpr} + (${feedback.feedbackVar} !== undefined ? ${varSection} : '')`;
|
|
9665
9668
|
}
|
|
9666
9669
|
const label = `gate:${gateStep.gate_kind}`;
|
|
9670
|
+
const verdict = gateVar(i);
|
|
9667
9671
|
const lines = [];
|
|
9668
|
-
lines.push(`${pad}const
|
|
9672
|
+
lines.push(`${pad}const ${verdict} = await agent(${promptExpr}, {`);
|
|
9669
9673
|
lines.push(`${pad} schema: ${jsLiteral(GATE_SCHEMA, 0).replace(/\n/g, `
|
|
9670
9674
|
${pad} `)},`);
|
|
9671
9675
|
lines.push(`${pad} label: ${jsString(label)},`);
|
|
9672
9676
|
lines.push(`${pad} phase: 'Gate',`);
|
|
9673
9677
|
lines.push(`${pad}})`);
|
|
9674
|
-
lines.push(`${pad}if (
|
|
9675
|
-
lines.push(`${pad} return { blocked: true, gate: ${jsString(gateStep.gate_kind)}, reason:
|
|
9678
|
+
lines.push(`${pad}if (!${verdict}.approved) {`);
|
|
9679
|
+
lines.push(`${pad} return { blocked: true, gate: ${jsString(gateStep.gate_kind)}, reason: ${verdict}.reason }`);
|
|
9676
9680
|
lines.push(`${pad}}`);
|
|
9677
9681
|
return lines;
|
|
9678
9682
|
}
|