agent-dealer 1.2.7 → 1.2.9
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/bundle/server/dist/adapters/agent-deck-bind.js +16 -6
- package/bundle/server/dist/adapters/agent-deck-bind.test.js +74 -0
- package/bundle/server/dist/adapters/agent-health.js +14 -3
- package/bundle/server/dist/adapters/github.js +84 -5
- package/bundle/server/dist/adapters/github.test.js +83 -1
- package/bundle/server/dist/adapters/muse-capability.js +443 -24
- package/bundle/server/dist/adapters/muse-capability.test.js +469 -25
- package/bundle/server/dist/adapters/muse-visual-qa.js +114 -0
- package/bundle/server/dist/adapters/muse-visual-qa.test.js +68 -0
- package/bundle/server/dist/adapters/worktree-deps.js +96 -0
- package/bundle/server/dist/adapters/worktree-deps.test.js +144 -0
- package/bundle/server/dist/capacity/muse-probe.js +56 -9
- package/bundle/server/dist/capacity/muse-probe.test.js +188 -1
- package/bundle/server/dist/coordinator/admission.js +14 -1
- package/bundle/server/dist/coordinator/admission.test.js +197 -4
- package/bundle/server/dist/coordinator/auto-merge.integration.test.js +276 -0
- package/bundle/server/dist/coordinator/auto-merge.js +244 -4
- package/bundle/server/dist/coordinator/checks-wait-config.js +19 -0
- package/bundle/server/dist/coordinator/commands.js +284 -23
- package/bundle/server/dist/coordinator/commands.test.js +47 -0
- package/bundle/server/dist/coordinator/deck-outage.integration.test.js +4 -2
- package/bundle/server/dist/coordinator/developer-effect.js +224 -4
- package/bundle/server/dist/coordinator/developer-effect.test.js +288 -3
- package/bundle/server/dist/coordinator/execution-report.js +6 -0
- package/bundle/server/dist/coordinator/execution-report.test.js +7 -0
- package/bundle/server/dist/coordinator/failure-cause.js +64 -1
- package/bundle/server/dist/coordinator/failure-cause.test.js +92 -1
- package/bundle/server/dist/coordinator/failure-reason.js +7 -0
- package/bundle/server/dist/coordinator/failure-reason.test.js +14 -0
- package/bundle/server/dist/coordinator/human-resolution.js +36 -1
- package/bundle/server/dist/coordinator/human-resolution.test.js +33 -0
- package/bundle/server/dist/coordinator/merge-conflict-sync.js +647 -0
- package/bundle/server/dist/coordinator/merge-conflict-sync.test.js +121 -0
- package/bundle/server/dist/coordinator/muse-developer.integration.test.js +9 -4
- package/bundle/server/dist/coordinator/muse-spawn.js +122 -29
- package/bundle/server/dist/coordinator/muse-spawn.test.js +210 -0
- package/bundle/server/dist/coordinator/operator-criteria.js +168 -0
- package/bundle/server/dist/coordinator/operator-criteria.test.js +78 -0
- package/bundle/server/dist/coordinator/operator-verification.integration.test.js +347 -0
- package/bundle/server/dist/coordinator/playbook-feedback.js +693 -0
- package/bundle/server/dist/coordinator/playbook-feedback.test.js +702 -0
- package/bundle/server/dist/coordinator/projection.js +10 -4
- package/bundle/server/dist/coordinator/projection.test.js +13 -0
- package/bundle/server/dist/coordinator/prompts-execution-contract.test.js +107 -0
- package/bundle/server/dist/coordinator/prompts.js +211 -2
- package/bundle/server/dist/coordinator/prompts.test.js +231 -0
- package/bundle/server/dist/coordinator/recovery.js +57 -3
- package/bundle/server/dist/coordinator/recovery.test.js +67 -8
- package/bundle/server/dist/coordinator/reflect-trigger.js +33 -169
- package/bundle/server/dist/coordinator/reflect-trigger.test.js +149 -200
- package/bundle/server/dist/coordinator/repair-cycle.integration.test.js +1 -0
- package/bundle/server/dist/coordinator/reviewer-effect.js +16 -1
- package/bundle/server/dist/coordinator/reviewer-result.js +6 -0
- package/bundle/server/dist/coordinator/routing.js +45 -6
- package/bundle/server/dist/coordinator/routing.test.js +76 -15
- package/bundle/server/dist/coordinator/session-timeouts.js +30 -0
- package/bundle/server/dist/coordinator/usage-cap-defer.js +61 -0
- package/bundle/server/dist/coordinator/usage-cap.integration.test.js +1 -1
- package/bundle/server/dist/coordinator/worker-loop.js +18 -4
- package/bundle/server/dist/db/ci-attempts-migration.test.js +70 -0
- package/bundle/server/dist/db/index.js +18 -0
- package/bundle/server/dist/db/schema.sql +5 -0
- package/bundle/server/dist/docs-execution-analysis.test.js +1 -0
- package/bundle/server/dist/repository/artifacts-for-issue.js +3 -3
- package/bundle/server/dist/repository/human-actions.js +14 -0
- package/bundle/server/dist/repository/issues.js +67 -6
- package/bundle/server/dist/repository/work-items.js +7 -0
- package/bundle/server/dist/repository/worker-sessions.js +51 -2
- package/bundle/server/dist/routes/human-actions.js +10 -8
- package/bundle/server/dist/routes/issues-execution-contract.test.js +321 -0
- package/bundle/server/dist/routes/issues.js +19 -2
- package/bundle/server/dist/runners/muse-code-args.js +25 -0
- package/bundle/server/dist/runners/muse-code-args.test.js +30 -0
- package/bundle/server/dist/runners/muse-code-jsonl.js +106 -11
- package/bundle/server/dist/runners/muse-config-core.js +18 -1
- package/bundle/server/dist/runners/muse-config.test.js +37 -0
- package/bundle/server/dist/runners/muse-serve-session.js +5 -0
- package/bundle/server/dist/runners/spawn-cli.js +116 -0
- package/bundle/server/dist/runners/spawn-cli.test.js +124 -0
- package/bundle/server/package.json +2 -2
- package/bundle/server/static-ui/assets/index-CU6fNntg.js +64 -0
- package/bundle/server/static-ui/assets/{index-DyAJNyfV.css → index-K_YcYkQU.css} +1 -1
- package/bundle/server/static-ui/index.html +2 -2
- package/bundle/shared/dist/execution-analysis.d.ts +22 -22
- package/bundle/shared/dist/execution-contract.d.ts +117 -0
- package/bundle/shared/dist/execution-contract.js +307 -0
- package/bundle/shared/dist/execution-contract.test.d.ts +2 -0
- package/bundle/shared/dist/execution-contract.test.js +499 -0
- package/bundle/shared/dist/execution-report.d.ts +9 -9
- package/bundle/shared/dist/execution-report.js +2 -0
- package/bundle/shared/dist/failure-cause.d.ts +4 -4
- package/bundle/shared/dist/failure-cause.js +2 -0
- package/bundle/shared/dist/human-actions.d.ts +4 -4
- package/bundle/shared/dist/human-actions.js +17 -0
- package/bundle/shared/dist/index.d.ts +85 -84
- package/bundle/shared/dist/index.js +3 -0
- package/bundle/shared/dist/issues.d.ts +176 -16
- package/bundle/shared/dist/issues.js +22 -0
- package/bundle/shared/dist/issues.test.js +3 -0
- package/bundle/shared/dist/outbound-draft.d.ts +12 -12
- package/bundle/shared/dist/worker-sessions.d.ts +10 -0
- package/bundle/shared/dist/worker-sessions.js +8 -0
- package/bundle/shared/dist/worker-sessions.test.js +1 -0
- package/bundle/shared/dist/workflow.d.ts +4 -4
- package/bundle/shared/dist/workflow.js +16 -0
- package/bundle/shared/dist/workflow.test.js +3 -0
- package/bundle/shared/package.json +1 -1
- package/dist/action.js +4 -1
- package/dist/action.test.js +42 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/bundle/server/static-ui/assets/index-yLyxRd-7.js +0 -64
|
@@ -10,6 +10,13 @@ export const MERGE_FAILURE_RESPONSE_OPTIONS = [
|
|
|
10
10
|
];
|
|
11
11
|
/** Evidence key marking a policy_escalation as a NOT-194 merge failure. */
|
|
12
12
|
export const MERGE_FAILURE_EVIDENCE_KEY = "mergeFailure";
|
|
13
|
+
/**
|
|
14
|
+
* NOT-310: conflicting file paths (string[]) carried on a merge-failure
|
|
15
|
+
* policy_escalation's evidence once the automatic sync + conflict-repair round are
|
|
16
|
+
* spent. Read by operators, not by routing — choice narrowing still keys off
|
|
17
|
+
* `MERGE_FAILURE_EVIDENCE_KEY` alone.
|
|
18
|
+
*/
|
|
19
|
+
export const MERGE_CONFLICT_FILES_EVIDENCE_KEY = "conflictingFiles";
|
|
13
20
|
/** Evidence key marking a policy_escalation as a NOT-221 diverged-push escalation. */
|
|
14
21
|
export const PUSH_DIVERGENCE_EVIDENCE_KEY = "pushDivergence";
|
|
15
22
|
/** NOT-280: evidence key holding a worktree blocker's `{ fingerprint }` for action dedupe. */
|
|
@@ -71,6 +78,11 @@ const VALID_CHOICES = {
|
|
|
71
78
|
deck_interaction_required: ["resume", "close"],
|
|
72
79
|
reflection_interaction_required: ["retry", "dismiss"],
|
|
73
80
|
outbound_delivery_interaction_required: ["retry_send", "reject"],
|
|
81
|
+
// NOT-308: listed only so the map stays total over HumanActionType — parse rejects it
|
|
82
|
+
// below and the only legal resolver is commands.ts's dedicated muse_capability branch
|
|
83
|
+
// (acknowledge records a per-version override; there is no workflow outcome to map).
|
|
84
|
+
muse_capability: ["acknowledge"],
|
|
85
|
+
operator_verification: ["verified", "waive", "repair"],
|
|
74
86
|
};
|
|
75
87
|
/**
|
|
76
88
|
* Validates a raw (actionType, choice) pair against that action type's allowed response
|
|
@@ -84,9 +96,14 @@ const VALID_CHOICES = {
|
|
|
84
96
|
* `outbound_delivery_interaction_required` is rejected for the same reason (NOT-95): it is
|
|
85
97
|
* Run-scoped, has no Issue/workflow_instance to advance, and its only legal resolver is
|
|
86
98
|
* `resolveOutboundDeliveryAction` (queue/approve-deliver.ts).
|
|
99
|
+
* `muse_capability` is rejected the same way (NOT-308): acknowledging it records a
|
|
100
|
+
* per-version capability override, not a workflow outcome, and its only legal resolver
|
|
101
|
+
* is commands.ts's dedicated branch.
|
|
87
102
|
*/
|
|
88
103
|
export function parseHumanResolution(actionType, choice, note) {
|
|
89
|
-
if (actionType === "reflection_interaction_required" ||
|
|
104
|
+
if (actionType === "reflection_interaction_required" ||
|
|
105
|
+
actionType === "outbound_delivery_interaction_required" ||
|
|
106
|
+
actionType === "muse_capability") {
|
|
90
107
|
return null;
|
|
91
108
|
}
|
|
92
109
|
if (!(actionType in VALID_CHOICES))
|
|
@@ -98,6 +115,16 @@ export function parseHumanResolution(actionType, choice, note) {
|
|
|
98
115
|
if (actionType === "product_scope_decision" && note) {
|
|
99
116
|
return { actionType, choice, note };
|
|
100
117
|
}
|
|
118
|
+
// NOT-314: operator_verification always carries a required non-empty note (the
|
|
119
|
+
// recorded result, the waiver reason, or the repair instruction). A missing or
|
|
120
|
+
// blank note is a caller error — resolveHumanActionAndAdvance 400s, never stores.
|
|
121
|
+
if (actionType === "operator_verification") {
|
|
122
|
+
if (!VALID_CHOICES.operator_verification.includes(choice))
|
|
123
|
+
return null;
|
|
124
|
+
if (!note || !note.trim())
|
|
125
|
+
return null;
|
|
126
|
+
return { actionType, choice, note: note.trim() };
|
|
127
|
+
}
|
|
101
128
|
return { actionType, choice };
|
|
102
129
|
}
|
|
103
130
|
/**
|
|
@@ -148,6 +175,14 @@ export function resolveHumanActionOutcome(resolution) {
|
|
|
148
175
|
throw new Error(`Unrecognized policy_escalation choice: ${resolution.choice}`);
|
|
149
176
|
case "product_scope_decision":
|
|
150
177
|
return { issueStatus: "developing", startNewRound: true, roundKind: "none" };
|
|
178
|
+
case "operator_verification":
|
|
179
|
+
// NOT-314: `repair` is a genuine repair cycle (same shape as
|
|
180
|
+
// final_review:repair). `verified` / `waive` never reach here — the sync
|
|
181
|
+
// core parks them for undraft+merge before consulting this outcome map
|
|
182
|
+
// (same as policy_escalation:retry_merge).
|
|
183
|
+
if (resolution.choice === "repair")
|
|
184
|
+
return { issueStatus: "repairing", startNewRound: true, roundKind: "review" };
|
|
185
|
+
throw new Error(`Unrecognized operator_verification choice: ${resolution.choice}`);
|
|
151
186
|
case "deck_interaction_required":
|
|
152
187
|
// Same semantics as policy_escalation:resume — an authority/control-plane hiccup is
|
|
153
188
|
// not a review-round spend; a fresh attempt mints its own new authority when it runs.
|
|
@@ -82,3 +82,36 @@ test("deck_interaction_required close ends the issue", () => {
|
|
|
82
82
|
assert.equal(result.issueStatus, "closed");
|
|
83
83
|
assert.equal(result.workflowOutcome, "closed");
|
|
84
84
|
});
|
|
85
|
+
// NOT-314: operator_verification parses only with a non-empty note.
|
|
86
|
+
test("parseHumanResolution accepts operator_verification choices only with a note", () => {
|
|
87
|
+
assert.deepStrictEqual(parseHumanResolution("operator_verification", "verified", "SSO login OK"), {
|
|
88
|
+
actionType: "operator_verification",
|
|
89
|
+
choice: "verified",
|
|
90
|
+
note: "SSO login OK",
|
|
91
|
+
});
|
|
92
|
+
assert.deepStrictEqual(parseHumanResolution("operator_verification", "waive", " waiver reason "), {
|
|
93
|
+
actionType: "operator_verification",
|
|
94
|
+
choice: "waive",
|
|
95
|
+
note: "waiver reason",
|
|
96
|
+
});
|
|
97
|
+
assert.deepStrictEqual(parseHumanResolution("operator_verification", "repair", "fix the probe"), {
|
|
98
|
+
actionType: "operator_verification",
|
|
99
|
+
choice: "repair",
|
|
100
|
+
note: "fix the probe",
|
|
101
|
+
});
|
|
102
|
+
assert.equal(parseHumanResolution("operator_verification", "verified"), null);
|
|
103
|
+
assert.equal(parseHumanResolution("operator_verification", "verified", ""), null);
|
|
104
|
+
assert.equal(parseHumanResolution("operator_verification", "verified", " "), null);
|
|
105
|
+
assert.equal(parseHumanResolution("operator_verification", "merge", "a note"), null);
|
|
106
|
+
});
|
|
107
|
+
test("operator_verification repair queues another repair round; verified/waive never map here", () => {
|
|
108
|
+
const result = resolveHumanActionOutcome({
|
|
109
|
+
actionType: "operator_verification",
|
|
110
|
+
choice: "repair",
|
|
111
|
+
note: "fix the probe",
|
|
112
|
+
});
|
|
113
|
+
assert.equal(result.issueStatus, "repairing");
|
|
114
|
+
assert.equal(result.startNewRound, true);
|
|
115
|
+
assert.equal(result.roundKind, "review");
|
|
116
|
+
assert.throws(() => resolveHumanActionOutcome({ actionType: "operator_verification", choice: "verified", note: "ok" }), /Unrecognized operator_verification choice/);
|
|
117
|
+
});
|