@bridge_gpt/mcp-server 0.2.69 → 0.2.71
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 +140 -292
- package/build/agent-launchers/claude-executor-adapter.js +27 -5
- package/build/agent-registry.js +5 -5
- package/build/agents.generated.js +15 -5
- package/build/artifact-diff.js +110 -0
- package/build/bin-entrypoint.js +36 -0
- package/build/bounded-wait.js +9 -1
- package/build/bridge-permissions.js +36 -9
- package/build/claude-review-workflow-drift.js +3 -3
- package/build/codex-bridge-profile.js +1 -1
- package/build/commands.generated.js +6 -6
- package/build/conductor/bridge-api-client.js +858 -21
- package/build/conductor/bring-up-facts.js +9 -9
- package/build/conductor/command-drift-production.js +7 -2
- package/build/conductor/doctor.js +472 -18
- package/build/conductor/epic-child-continuation.js +54 -3
- package/build/conductor/epic-implementer-cli.js +136 -34
- package/build/conductor/epic-runtime.js +2 -2
- package/build/conductor/epic-state.js +1 -1
- package/build/conductor/gate-discovery.js +524 -10
- package/build/conductor/gate-settings-review.js +451 -0
- package/build/conductor/hook-runtime-qualification.js +1 -1
- package/build/conductor/install-doctor.js +4 -2
- package/build/conductor/launch-need-probes.js +342 -0
- package/build/conductor/launch-plan.js +145 -0
- package/build/conductor/local-merge.js +241 -56
- package/build/conductor/merge-credential.js +172 -0
- package/build/conductor/merge-execution-eligibility.js +1 -1
- package/build/conductor/merged-child-check.js +95 -0
- package/build/conductor/plan-trim.js +30 -0
- package/build/conductor/pr-ci-producer.js +1 -1
- package/build/conductor/precheck-timings.js +14 -0
- package/build/conductor/preview-observations.js +10 -0
- package/build/conductor/readiness-cli.js +11 -6
- package/build/conductor/readiness-prerequisites.js +41 -0
- package/build/conductor/readiness-sections.js +348 -55
- package/build/conductor/readiness.js +99 -87
- package/build/conductor/recovery-cli.js +665 -23
- package/build/conductor/recovery-operations.js +350 -8
- package/build/conductor/repair-contract.js +47 -2
- package/build/conductor/repository-workflow-remedy.js +8 -6
- package/build/conductor/stored-merge-credential.js +76 -0
- package/build/conductor/stored-merge-token-probe.js +28 -0
- package/build/conductor/temporary-plan.js +50 -0
- package/build/conductor/wait-run-cli.js +759 -0
- package/build/conductor/worker-database-doctor-inspector.js +49 -0
- package/build/conductor-bin.js +2 -2
- package/build/conductor-claude-hook-bin.js +2 -2
- package/build/conductor-claude-hook-removed-stub-bin.js +2 -5
- package/build/conductor-removed-stub-bin.js +2 -5
- package/build/credential-store.js +356 -13
- package/build/docs.generated.js +26 -13
- package/build/doctor.js +94 -32
- package/build/drive-epic-help.js +212 -0
- package/build/drive-epic.js +1989 -379
- package/build/epic-ci-workflow-drift.js +125 -0
- package/build/epic-ci-workflow-install.js +240 -0
- package/build/epic-ci-workflow-v1.js +132 -0
- package/build/epic-ci-workflow.js +318 -0
- package/build/epic-contract-context.js +326 -0
- package/build/epic-implementer-bin.js +58 -42
- package/build/epic-implementer-claude-hook-bin.js +2 -2
- package/build/escalation-reachability.js +134 -0
- package/build/executor/ci-rerun-job.js +220 -14
- package/build/executor/cleanup-report.js +99 -0
- package/build/executor/cli.js +12 -1
- package/build/executor/completion-contract.js +66 -11
- package/build/executor/completion-supervision.js +99 -0
- package/build/executor/delivery-outcome.js +179 -0
- package/build/executor/deps.js +3 -0
- package/build/executor/env.js +276 -1
- package/build/executor/failure-reason-codes.js +126 -0
- package/build/executor/gate-qualification-job.js +20 -5
- package/build/executor/heartbeat.js +38 -0
- package/build/executor/http-client.js +72 -0
- package/build/executor/integration-job.js +298 -5
- package/build/executor/job-errors.js +36 -6
- package/build/executor/job-runner.js +830 -45
- package/build/executor/likely-tests.js +42 -3
- package/build/executor/merge-job.js +145 -2
- package/build/executor/observation.js +73 -4
- package/build/executor/permissions.js +193 -97
- package/build/executor/preflight.js +19 -3
- package/build/executor/process-containment.js +46 -2
- package/build/executor/prompt-spec.js +113 -9
- package/build/executor/rebase-finalization.js +38 -3
- package/build/executor/reconcile-overlap-job.js +41 -8
- package/build/executor/required-work-ledger.js +236 -81
- package/build/executor/resume-pre-spawn.js +38 -1
- package/build/executor/runner.js +91 -3
- package/build/executor/test-clock.js +8 -0
- package/build/executor/types.js +37 -2
- package/build/executor/worker-cli-launcher.js +259 -0
- package/build/executor/worker-command.js +177 -5
- package/build/executor/worker-database-target.js +91 -0
- package/build/executor/worker-database.js +927 -0
- package/build/executor/worker-finalization.js +106 -0
- package/build/executor/worker-guard-hook.js +203 -0
- package/build/executor/worker-resources.js +58 -0
- package/build/executor/worker-verification-guidance.js +44 -2
- package/build/executor/worktree.js +303 -15
- package/build/executor-launch.js +11 -1
- package/build/generated-assets-doctor.js +9 -1
- package/build/generated-assets-health.js +13 -4
- package/build/generated-assets-legacy.js +39 -0
- package/build/generated-assets-paths.js +12 -1
- package/build/generated-assets-repair.js +4 -1
- package/build/generated-assets-test-support.js +12 -0
- package/build/github-remote.js +33 -0
- package/build/github-sign-in.js +62 -0
- package/build/index.js +1133 -546
- package/build/init.js +39 -1
- package/build/install-bridge-conductor-gate.js +270 -11
- package/build/install-bridge-conductor-setup.js +427 -0
- package/build/install-bridge-conductor.js +1545 -268
- package/build/install-bridge.js +376 -60
- package/build/mcp-install-state.js +8 -2
- package/build/merge-pull-request.js +6 -0
- package/build/merge-workflow-install.js +782 -344
- package/build/phase-result-artifacts.js +75 -20
- package/build/pipeline-orchestrator.js +247 -4
- package/build/pipelines.generated.js +35 -35
- package/build/plan-discovery.js +15 -2
- package/build/plan-execution-ledger.js +321 -17
- package/build/plan-phase-routing.js +48 -13
- package/build/plane/cli.js +105 -51
- package/build/plane/defaults.js +3 -0
- package/build/plane/plane-freshness.js +298 -0
- package/build/plane/preflight.js +19 -0
- package/build/plane/schema-compatibility.js +137 -0
- package/build/plane/shutdown-deps.js +38 -0
- package/build/plane/shutdown.js +83 -8
- package/build/plane/terminal-run-cleanup.js +303 -0
- package/build/printed-remedy-commands.js +33 -4
- package/build/readiness-check.js +6 -2
- package/build/readiness-prerequisites.generated.js +532 -0
- package/build/readme.generated.js +1 -1
- package/build/repository-toolchains.js +581 -0
- package/build/setup-epic.js +421 -34
- package/build/shared-resources.generated.js +5 -0
- package/build/start-tickets.js +28 -15
- package/build/test-command-detection.js +284 -0
- package/build/test-command-validation.js +73 -0
- package/build/testing-config-client.js +150 -0
- package/build/ticket-delivery-artifacts.js +265 -0
- package/build/ticket-delivery-enrollment.js +369 -0
- package/build/ticket-delivery.js +205 -0
- package/build/ticket-review-summary.js +14 -0
- package/build/upgrade-cli.js +13 -0
- package/build/v2-readiness-requirements.js +552 -0
- package/build/version.generated.js +3 -3
- package/build/worker-guard-hook-bin.js +2 -2
- package/build/worktree-core.js +22 -7
- package/docs/BRIDGE-DIRECTORY-README.md +48 -0
- package/docs/EPIC-IMPLEMENTER-INSTALL.md +12 -867
- package/docs/EPIC-IMPLEMENTER.md +142 -63
- package/docs/epic-implementer/getting-started.md +187 -0
- package/docs/epic-implementer/self-hosting.md +133 -0
- package/package.json +4 -4
- package/pipelines/idea-to-ticket.json +1 -1
- package/pipelines/implement-ticket.json +8 -8
- package/pipelines/review-ticket.json +2 -2
- package/design-assets/favicon/favicon-32x32.png +0 -0
- package/design-assets/just-logo-rough-draft.png +0 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A small line-based unified diff for installer refusals (BAPI-1460).
|
|
3
|
+
*
|
|
4
|
+
* When the artifact installer refuses to overwrite a file it did not write, it
|
|
5
|
+
* shows the person what it would have written against what is there. Inputs are
|
|
6
|
+
* workflow-sized text, so a plain longest-common-subsequence table is enough;
|
|
7
|
+
* past {@link MAX_DIFF_CELLS} the diff degrades to a whole-file replacement
|
|
8
|
+
* rather than spending unbounded time. The output passes through
|
|
9
|
+
* `redactSecrets`, so a credential a person pasted into their own file is not
|
|
10
|
+
* echoed to the terminal.
|
|
11
|
+
*/
|
|
12
|
+
import { redactSecrets } from "./secret-redaction.js";
|
|
13
|
+
/** Upper bound on the LCS table, in cells. */
|
|
14
|
+
export const MAX_DIFF_CELLS = 4_000_000;
|
|
15
|
+
const CONTEXT_LINES = 3;
|
|
16
|
+
function splitLines(text) {
|
|
17
|
+
if (text.length === 0)
|
|
18
|
+
return [];
|
|
19
|
+
const lines = text.split("\n");
|
|
20
|
+
if (lines[lines.length - 1] === "")
|
|
21
|
+
lines.pop();
|
|
22
|
+
return lines;
|
|
23
|
+
}
|
|
24
|
+
function diffOps(a, b) {
|
|
25
|
+
const n = a.length;
|
|
26
|
+
const m = b.length;
|
|
27
|
+
if (n * m > MAX_DIFF_CELLS) {
|
|
28
|
+
return [...a.map((text) => ({ kind: "-", text })), ...b.map((text) => ({ kind: "+", text }))];
|
|
29
|
+
}
|
|
30
|
+
// lcs[i][j] = LCS length of a[i:] and b[j:], stored row-major.
|
|
31
|
+
const width = m + 1;
|
|
32
|
+
const lcs = new Uint32Array((n + 1) * width);
|
|
33
|
+
for (let i = n - 1; i >= 0; i--) {
|
|
34
|
+
for (let j = m - 1; j >= 0; j--) {
|
|
35
|
+
lcs[i * width + j] =
|
|
36
|
+
a[i] === b[j] ? lcs[(i + 1) * width + j + 1] + 1 : Math.max(lcs[(i + 1) * width + j], lcs[i * width + j + 1]);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const ops = [];
|
|
40
|
+
let i = 0;
|
|
41
|
+
let j = 0;
|
|
42
|
+
while (i < n && j < m) {
|
|
43
|
+
if (a[i] === b[j]) {
|
|
44
|
+
ops.push({ kind: " ", text: a[i] });
|
|
45
|
+
i++;
|
|
46
|
+
j++;
|
|
47
|
+
}
|
|
48
|
+
else if (lcs[(i + 1) * width + j] >= lcs[i * width + j + 1]) {
|
|
49
|
+
ops.push({ kind: "-", text: a[i++] });
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
ops.push({ kind: "+", text: b[j++] });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
while (i < n)
|
|
56
|
+
ops.push({ kind: "-", text: a[i++] });
|
|
57
|
+
while (j < m)
|
|
58
|
+
ops.push({ kind: "+", text: b[j++] });
|
|
59
|
+
return ops;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Render a unified diff from `existing` (the file that is there) to `proposed`
|
|
63
|
+
* (what the installer would have written). Returns `""` when they are equal.
|
|
64
|
+
*/
|
|
65
|
+
export function renderUnifiedDiff(relPath, existing, proposed) {
|
|
66
|
+
if (existing === proposed)
|
|
67
|
+
return "";
|
|
68
|
+
const a = splitLines(existing);
|
|
69
|
+
const b = splitLines(proposed);
|
|
70
|
+
const ops = diffOps(a, b);
|
|
71
|
+
const out = [`--- a/${relPath}`, `+++ b/${relPath}`];
|
|
72
|
+
// Positions (in ops) of changed lines, grouped into hunks with context.
|
|
73
|
+
const changed = ops.map((op, idx) => (op.kind === " " ? -1 : idx)).filter((idx) => idx >= 0);
|
|
74
|
+
if (changed.length === 0) {
|
|
75
|
+
// Only a trailing-newline or line-ending difference.
|
|
76
|
+
out.push("@@ line endings or the final newline differ @@");
|
|
77
|
+
return redactSecrets(out.join("\n")) + "\n";
|
|
78
|
+
}
|
|
79
|
+
let start = 0;
|
|
80
|
+
while (start < changed.length) {
|
|
81
|
+
let end = start;
|
|
82
|
+
while (end + 1 < changed.length && changed[end + 1] - changed[end] <= CONTEXT_LINES * 2)
|
|
83
|
+
end++;
|
|
84
|
+
const from = Math.max(0, changed[start] - CONTEXT_LINES);
|
|
85
|
+
const to = Math.min(ops.length - 1, changed[end] + CONTEXT_LINES);
|
|
86
|
+
let aLine = 1;
|
|
87
|
+
let bLine = 1;
|
|
88
|
+
for (let k = 0; k < from; k++) {
|
|
89
|
+
if (ops[k].kind !== "+")
|
|
90
|
+
aLine++;
|
|
91
|
+
if (ops[k].kind !== "-")
|
|
92
|
+
bLine++;
|
|
93
|
+
}
|
|
94
|
+
let aCount = 0;
|
|
95
|
+
let bCount = 0;
|
|
96
|
+
const body = [];
|
|
97
|
+
for (let k = from; k <= to; k++) {
|
|
98
|
+
const op = ops[k];
|
|
99
|
+
if (op.kind !== "+")
|
|
100
|
+
aCount++;
|
|
101
|
+
if (op.kind !== "-")
|
|
102
|
+
bCount++;
|
|
103
|
+
body.push(op.kind + op.text);
|
|
104
|
+
}
|
|
105
|
+
out.push(`@@ -${aCount === 0 ? aLine - 1 : aLine},${aCount} +${bCount === 0 ? bLine - 1 : bLine},${bCount} @@`);
|
|
106
|
+
out.push(...body);
|
|
107
|
+
start = end + 1;
|
|
108
|
+
}
|
|
109
|
+
return redactSecrets(out.join("\n")) + "\n";
|
|
110
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared "is this module the process's own entry point?" gate for the packaged
|
|
3
|
+
* bins.
|
|
4
|
+
*
|
|
5
|
+
* Package managers launch a bin through a symlink (`node_modules/.bin/<name>`, or
|
|
6
|
+
* a symlinked parent directory), so `process.argv[1]` is the LINK path while the
|
|
7
|
+
* module's `import.meta.url` is the real file. Comparing resolved paths alone
|
|
8
|
+
* reports "not the entry" and the bin silently does nothing. This compares
|
|
9
|
+
* realpaths instead.
|
|
10
|
+
*
|
|
11
|
+
* Import-inert on purpose: it reads no `import.meta.url` of its own, logs
|
|
12
|
+
* nothing, exits nothing, and has no import-time side effect. Each bin passes its
|
|
13
|
+
* own `import.meta.url`.
|
|
14
|
+
*/
|
|
15
|
+
import { realpathSync } from "node:fs";
|
|
16
|
+
import path from "node:path";
|
|
17
|
+
import { fileURLToPath } from "node:url";
|
|
18
|
+
/**
|
|
19
|
+
* `true` only when `argv1` and the caller module resolve to the same file.
|
|
20
|
+
* A missing `argv1` is never a direct invocation.
|
|
21
|
+
*
|
|
22
|
+
* When a realpath operation throws, this falls back SILENTLY to the exact
|
|
23
|
+
* pre-helper comparison, `path.resolve(argv1) === fileURLToPath(callerModuleUrl)`,
|
|
24
|
+
* so a bin that ran before still runs and one that did not still does not.
|
|
25
|
+
*/
|
|
26
|
+
export function isBinEntrypoint(callerModuleUrl, argv1 = process.argv[1]) {
|
|
27
|
+
if (argv1 === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
const callerPath = fileURLToPath(callerModuleUrl);
|
|
30
|
+
try {
|
|
31
|
+
return realpathSync(argv1) === realpathSync(callerPath);
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return path.resolve(argv1) === callerPath;
|
|
35
|
+
}
|
|
36
|
+
}
|
package/build/bounded-wait.js
CHANGED
|
@@ -251,7 +251,15 @@ export async function boundedWait(options) {
|
|
|
251
251
|
// The existing poller's curve plus bounded jitter, clamped to whatever is
|
|
252
252
|
// actually left so a backoff can never overrun the deadline it is inside.
|
|
253
253
|
const backoff = defaultPollDelayMs(now() - startedAt) + jitterMs();
|
|
254
|
-
|
|
254
|
+
const sleepMs = Math.min(backoff, remaining());
|
|
255
|
+
await delay(sleepMs);
|
|
256
|
+
// A sleep clamped to the deadline IS the end of the window. A real timer
|
|
257
|
+
// can fire a millisecond before the clock reaches the deadline; re-checking
|
|
258
|
+
// the clock then would spend one more ~1 ms probe that can only fail and
|
|
259
|
+
// could turn an elapsed window into a false UPSTREAM_TRANSIENT.
|
|
260
|
+
if (sleepMs < backoff && !signal?.aborted) {
|
|
261
|
+
return pending("WAIT_WINDOW_ELAPSED");
|
|
262
|
+
}
|
|
255
263
|
}
|
|
256
264
|
}
|
|
257
265
|
finally {
|
|
@@ -102,6 +102,9 @@ export const BRIDGE_SANCTIONED_VERB_SUBCOMMANDS = [
|
|
|
102
102
|
"resume-run",
|
|
103
103
|
"resume-ci",
|
|
104
104
|
"rerun-ci",
|
|
105
|
+
"resolve-handoff",
|
|
106
|
+
// BAPI-1532: answer a named plan failure with one forced regeneration.
|
|
107
|
+
"regenerate-plan",
|
|
105
108
|
];
|
|
106
109
|
/** The Bridge MCP tools the supervisor calls. */
|
|
107
110
|
export const BRIDGE_SUPERVISOR_MCP_TOOLS = [
|
|
@@ -180,6 +183,8 @@ export function buildProjectPermissionRules(launcherPrefix, serverNames = [MCP_S
|
|
|
180
183
|
rules.push(`Bash(${launcherPrefix} epic-implementer readiness *)`);
|
|
181
184
|
// Read-only supporting commands.
|
|
182
185
|
rules.push(`Bash(${launcherPrefix} epic-implementer continuation-receipt *)`);
|
|
186
|
+
// BAPI-1469: the bounded, read-only wait the Monitoring loop runs between passes.
|
|
187
|
+
rules.push(`Bash(${launcherPrefix} epic-implementer wait-run *)`);
|
|
183
188
|
rules.push(`Bash(${launcherPrefix} epic-implementer doctor)`);
|
|
184
189
|
rules.push(`Bash(${launcherPrefix} plane status)`);
|
|
185
190
|
// BAPI-1448: the read-only user-scope check `/drive-epic-run` runs first. There is
|
|
@@ -192,6 +197,8 @@ export function buildProjectPermissionRules(launcherPrefix, serverNames = [MCP_S
|
|
|
192
197
|
// Stage 0's local checks, exactly as the posture spells them.
|
|
193
198
|
rules.push("Bash(source .venv/bin/activate)");
|
|
194
199
|
rules.push("Bash(ENVIRONMENT=TEST python scripts/conductor_health_check.py --json)");
|
|
200
|
+
rules.push("Bash(ENVIRONMENT=TEST python scripts/conductor_health_check.py --json --reuse)");
|
|
201
|
+
rules.push("Bash(git rev-parse --show-toplevel)");
|
|
195
202
|
rules.push("Bash(alembic -c alembic.ini heads)");
|
|
196
203
|
rules.push("Bash(alembic -c alembic.ini current)");
|
|
197
204
|
// The private tally directory: create, restrict, read, and append.
|
|
@@ -219,10 +226,24 @@ export function buildProjectPermissionRules(launcherPrefix, serverNames = [MCP_S
|
|
|
219
226
|
rules.push("Bash(git show '*:.bridge/epic-workarounds/*.md')");
|
|
220
227
|
rules.push("Bash(gh pr view 'epic/*' --json number,isDraft,state,headRefOid,baseRefName,comments)");
|
|
221
228
|
rules.push(`Bash(gh pr comment * --body-file ${BRIDGE_RUN_STATE_DIR}/*/workarounds.md)`);
|
|
222
|
-
// The notes-log commit on docs/<KEY>-conductor-run-notes
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
229
|
+
// The notes-log commit on docs/<KEY>-conductor-run-notes, made in a private
|
|
230
|
+
// worktree under the run-state directory so the shared checkout is never
|
|
231
|
+
// switched. The notes files themselves are written under the run-state
|
|
232
|
+
// Read/Edit/Write rules above.
|
|
233
|
+
rules.push(`Bash(git worktree add -b 'docs/*-conductor-run-notes' ${BRIDGE_RUN_STATE_DIR}/*/notes-worktree HEAD)`);
|
|
234
|
+
rules.push(`Bash(git -C ${BRIDGE_RUN_STATE_DIR}/*/notes-worktree add docs/epic-implementer/run-notes/)`);
|
|
235
|
+
rules.push(`Bash(git -C ${BRIDGE_RUN_STATE_DIR}/*/notes-worktree commit -m * -- docs/epic-implementer/run-notes/)`);
|
|
236
|
+
rules.push(`Bash(git worktree remove ${BRIDGE_RUN_STATE_DIR}/*/notes-worktree)`);
|
|
237
|
+
// BAPI-1496: the owner-tagged worker-supervisor pause before a local launch,
|
|
238
|
+
// the ownership-guarded post-completion teardown of this run's own plane, and
|
|
239
|
+
// the paired owner-tagged resume. Only the quoted owner tag or run id fills
|
|
240
|
+
// the `*`. The bare `plane down` and bare `resume` are operator overrides the
|
|
241
|
+
// supervisor never runs, so they have no rule.
|
|
242
|
+
rules.push("Bash(python scripts/worker_supervisor.py pause --owner '*')");
|
|
243
|
+
rules.push(`Bash(${launcherPrefix} plane down --expect-epic-run-id '*')`);
|
|
244
|
+
rules.push("Bash(python scripts/worker_supervisor.py resume --owner '*')");
|
|
245
|
+
// The planned-hand-off comparison's one read of each dependent child PR.
|
|
246
|
+
rules.push("Bash(gh pr view * --json number,body)");
|
|
226
247
|
// The Bridge MCP tools the supervisor uses, under each installed server key.
|
|
227
248
|
for (const serverName of serverNames) {
|
|
228
249
|
for (const tool of BRIDGE_SUPERVISOR_MCP_TOOLS) {
|
|
@@ -233,9 +254,9 @@ export function buildProjectPermissionRules(launcherPrefix, serverNames = [MCP_S
|
|
|
233
254
|
}
|
|
234
255
|
/**
|
|
235
256
|
* The user-settings `autoMode` prose. It describes the run sandbox — the run's
|
|
236
|
-
* branches and worktrees
|
|
237
|
-
*
|
|
238
|
-
* work as routine. `sandboxAccounts` adds named accounts when a caller knows them;
|
|
257
|
+
* branches and worktrees (including a dispatched fixer's private repair worktrees),
|
|
258
|
+
* the Bridge server, and third-party sandbox accounts the project explicitly
|
|
259
|
+
* names — so the classifier treats the supervisor's in-scope work as routine. `sandboxAccounts` adds named accounts when a caller knows them;
|
|
239
260
|
* none is ever inferred.
|
|
240
261
|
*/
|
|
241
262
|
export function buildUserAutoModeEntries(sandboxAccounts = []) {
|
|
@@ -247,13 +268,17 @@ export function buildUserAutoModeEntries(sandboxAccounts = []) {
|
|
|
247
268
|
environment: [
|
|
248
269
|
"Bridge Epic Implementer runs (/drive-epic-run): a run's sandbox is its own branches " +
|
|
249
270
|
"(epic/<KEY> and each child ticket's branch_name) and the worktrees made for them, " +
|
|
271
|
+
`the private repair worktrees a dispatched fixer uses under ${BRIDGE_RUN_STATE_DIR}/<KEY>/repair-<TICKET>-<n>/ ` +
|
|
272
|
+
"(they publish only to that ticket's run-bound branch, and the executor's worktrees stay read-only to them), " +
|
|
250
273
|
`the Bridge server, and ${accounts}.`,
|
|
251
274
|
],
|
|
252
275
|
allow: [
|
|
253
276
|
"Bridge /drive-epic-run supervisor: the packaged Bridge CLI's sanctioned " +
|
|
254
277
|
"epic-implementer recovery verbs, drive-epic preview and attach, and readiness, applied " +
|
|
255
278
|
"to the run's own sandbox; reads, waits, the private tally under " +
|
|
256
|
-
`${BRIDGE_RUN_STATE_DIR}/,
|
|
279
|
+
`${BRIDGE_RUN_STATE_DIR}/, Bridge bug reports, and a dispatched epic-run-fixer's edits, ` +
|
|
280
|
+
`commits and pushes confined to its repair worktree under ${BRIDGE_RUN_STATE_DIR}/<KEY>/repair-<TICKET>-<n>/ ` +
|
|
281
|
+
"and the ticket's own run-bound branch.",
|
|
257
282
|
],
|
|
258
283
|
};
|
|
259
284
|
}
|
|
@@ -1071,7 +1096,9 @@ export const USER_AUTO_MODE_CONSENT_PROMPT = "Epic runs work best in Claude Code
|
|
|
1071
1096
|
"\n" +
|
|
1072
1097
|
"Bridge can add a short description of the run's sandbox to ~/.claude/settings.json so the\n" +
|
|
1073
1098
|
"check recognizes this work. It describes:\n" +
|
|
1074
|
-
" • the run's own branches (epic/<KEY> and each child ticket's branch) and their worktrees
|
|
1099
|
+
" • the run's own branches (epic/<KEY> and each child ticket's branch) and their worktrees,\n" +
|
|
1100
|
+
" including the private repair worktrees a dispatched fixer uses\n" +
|
|
1101
|
+
" (~/.local/state/bapi-conductor-runs/<KEY>/repair-<TICKET>-<n>/)\n" +
|
|
1075
1102
|
" • the Bridge server\n" +
|
|
1076
1103
|
" • any sandbox accounts your project names\n" +
|
|
1077
1104
|
"It grants no other access, and you can remove it any time with --remove-bridge-permissions.\n" +
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
* path, and a fixed reason code — never bytes, never provider exception text.
|
|
35
35
|
*/
|
|
36
36
|
import crypto from "crypto";
|
|
37
|
+
import { CONSUMER_GUIDE_POINTER } from "./printed-remedy-commands.js";
|
|
37
38
|
/**
|
|
38
39
|
* Repo-relative path of the reviewed workflow. Defined here rather than in
|
|
39
40
|
* `claude-review-workflow.ts` so the drift module stays a leaf: the renderer
|
|
@@ -168,6 +169,5 @@ export function summarizeClaudeReviewWorkflowDrift(classification) {
|
|
|
168
169
|
}
|
|
169
170
|
/** Secret-free remediation sentence shared by the doctor and install-doctor surfaces. */
|
|
170
171
|
export const CLAUDE_REVIEW_WORKFLOW_DRIFT_REMEDIATION = `Reconcile the base branch with the repository default branch — merge the default ` +
|
|
171
|
-
`branch in, or sync ${CLAUDE_REVIEW_WORKFLOW_RELPATH}
|
|
172
|
-
|
|
173
|
-
`docs/claude/runbooks/claude-review-base-branch-drift.md.`;
|
|
172
|
+
`branch in, or sync ${CLAUDE_REVIEW_WORKFLOW_RELPATH} with the default branch. See ` +
|
|
173
|
+
`${CONSUMER_GUIDE_POINTER}.`;
|
|
@@ -11,7 +11,7 @@ const MARKER = "# Bridge-managed Codex approval profile (BAPI-1214)";
|
|
|
11
11
|
/** Tools called by review-and-start, review-and-implement, and implement-ticket. */
|
|
12
12
|
export const BRIDGE_WORKFLOW_TOOLS = [
|
|
13
13
|
"ping", "get_ticket", "get_pipeline_recipe", "request_ticket_review",
|
|
14
|
-
"wait_for_ticket_review", "fresh_base", "generate_decision_page",
|
|
14
|
+
"wait_for_ticket_review", "fresh_base", "get_epic_contract_context", "generate_decision_page",
|
|
15
15
|
"capture_review_decisions", "request_plan_generation", "get_plan",
|
|
16
16
|
"attachment", "publish_reviewed_attachment",
|
|
17
17
|
"get_phase_context", "record_phase_result", "create_pull_request",
|