@bridge_gpt/mcp-server 0.2.70 → 0.2.72

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.
Files changed (134) hide show
  1. package/README.md +55 -17
  2. package/build/agent-launchers/claude-executor-adapter.js +29 -4
  3. package/build/agent-notes.js +171 -95
  4. package/build/agent-registry.js +5 -5
  5. package/build/agents.generated.js +12 -2
  6. package/build/bounded-wait.js +9 -1
  7. package/build/bridge-permissions.js +17 -5
  8. package/build/bridge-worktree-inspection.js +237 -0
  9. package/build/check-evidence.js +6 -0
  10. package/build/claude-review-workflow.js +1 -1
  11. package/build/cli-help.js +6 -0
  12. package/build/codex-auto-recovery.js +126 -0
  13. package/build/codex-skill-adapter.js +2 -0
  14. package/build/commands.generated.js +5 -5
  15. package/build/conductor/bridge-api-client.js +776 -23
  16. package/build/conductor/command-drift-production.js +7 -2
  17. package/build/conductor/doctor.js +93 -13
  18. package/build/conductor/epic-implementer-cli.js +55 -2
  19. package/build/conductor/gate-discovery.js +659 -19
  20. package/build/conductor/gate-settings-review.js +751 -0
  21. package/build/conductor/git-hooks-uninstall.js +112 -0
  22. package/build/conductor/git-hooks.js +81 -15
  23. package/build/conductor/guided-repair.js +10 -1
  24. package/build/conductor/install-doctor.js +2 -4
  25. package/build/conductor/launch-need-probes.js +16 -11
  26. package/build/conductor/launch-plan.js +185 -0
  27. package/build/conductor/local-merge.js +12 -1
  28. package/build/conductor/merge-execution-contract.js +1 -1
  29. package/build/conductor/merged-child-check.js +2 -1
  30. package/build/conductor/precheck-timings.js +14 -0
  31. package/build/conductor/prerequisite-inputs.js +379 -0
  32. package/build/conductor/preview-observations.js +10 -0
  33. package/build/conductor/readiness-assessment.js +78 -0
  34. package/build/conductor/readiness-cli.js +10 -0
  35. package/build/conductor/readiness-prerequisites.js +53 -0
  36. package/build/conductor/readiness-sections.js +25 -9
  37. package/build/conductor/readiness.js +20 -2
  38. package/build/conductor/recovery-cli.js +281 -14
  39. package/build/conductor/recovery-operations.js +78 -5
  40. package/build/conductor/repair-contract.js +33 -0
  41. package/build/conductor/tools.js +34 -3
  42. package/build/conductor/wait-run-attention.js +115 -0
  43. package/build/conductor/wait-run-cli.js +96 -3
  44. package/build/conductor/worker-database-doctor-inspector.js +1 -0
  45. package/build/credential-store.js +25 -20
  46. package/build/dependency-install-declarations.js +157 -0
  47. package/build/docs.generated.js +4 -4
  48. package/build/doctor.js +37 -5
  49. package/build/drive-epic-help.js +2 -2
  50. package/build/drive-epic.js +240 -56
  51. package/build/epic-ci-workflow-drift.js +71 -23
  52. package/build/epic-ci-workflow-install.js +83 -26
  53. package/build/epic-ci-workflow-v1.js +132 -0
  54. package/build/epic-ci-workflow.js +174 -13
  55. package/build/epic-implementer-bin.js +119 -44
  56. package/build/epic-launch-profile.js +1 -1
  57. package/build/executor/ci-rerun-job.js +220 -14
  58. package/build/executor/cli.js +2 -0
  59. package/build/executor/completion-contract.js +16 -0
  60. package/build/executor/credentials.js +1 -1
  61. package/build/executor/delivery-observations.js +113 -0
  62. package/build/executor/delivery-outcome.js +30 -0
  63. package/build/executor/dependency-refresh-runner.js +132 -0
  64. package/build/executor/dependency-refresh.js +530 -0
  65. package/build/executor/deps.js +4 -0
  66. package/build/executor/env.js +274 -5
  67. package/build/executor/gate-qualification-job.js +20 -5
  68. package/build/executor/harness-coverage.js +19 -0
  69. package/build/executor/http-client.js +35 -1
  70. package/build/executor/index.js +2 -1
  71. package/build/executor/install-preflight.js +1 -1
  72. package/build/executor/job-runner.js +355 -36
  73. package/build/executor/likely-tests.js +100 -98
  74. package/build/executor/preflight.js +5 -0
  75. package/build/executor/process-containment.js +18 -0
  76. package/build/executor/prompt-spec.js +84 -15
  77. package/build/executor/reconcile-overlap-job.js +6 -1
  78. package/build/executor/required-verification.js +28 -0
  79. package/build/executor/required-work-diagnostics.js +30 -0
  80. package/build/executor/required-work-ledger.js +19 -1
  81. package/build/executor/results.js +42 -0
  82. package/build/executor/service-discovery.js +42 -0
  83. package/build/executor/service-lifecycle.js +109 -2
  84. package/build/executor/service-uninstall.js +205 -0
  85. package/build/executor/service-unit.js +5 -3
  86. package/build/executor/test-clock.js +3 -0
  87. package/build/executor/verification-hints.js +179 -0
  88. package/build/executor/worker-command.js +188 -1
  89. package/build/executor/worker-database.js +299 -40
  90. package/build/executor/worker-finalization.js +65 -10
  91. package/build/executor/worker-guard-hook.js +10 -2
  92. package/build/executor/worker-resources.js +12 -1
  93. package/build/executor/worker-verification-guidance.js +64 -0
  94. package/build/executor/worktree-inspection.js +42 -0
  95. package/build/github-sign-in.js +1 -1
  96. package/build/index.js +767 -310
  97. package/build/init.js +3 -3
  98. package/build/install-bridge-conductor-gate.js +416 -41
  99. package/build/install-bridge-conductor-setup.js +135 -32
  100. package/build/install-bridge-conductor.js +769 -353
  101. package/build/install-bridge.js +419 -124
  102. package/build/install-maintenance.js +104 -0
  103. package/build/install-reexec.js +1 -1
  104. package/build/local-cleanup.js +59 -0
  105. package/build/mcp-install-state.js +68 -2
  106. package/build/merge-workflow-install.js +22 -2
  107. package/build/package-script-semantics.js +10 -0
  108. package/build/pipeline-utils.js +1 -1
  109. package/build/pipelines.generated.js +6 -6
  110. package/build/plan-execution-ledger.js +171 -10
  111. package/build/plane/plane-freshness.js +12 -9
  112. package/build/plane/preflight.js +19 -0
  113. package/build/plane/terminal-run-cleanup.js +5 -1
  114. package/build/plane/terminal-run-status.js +4 -0
  115. package/build/printed-remedy-commands.js +31 -4
  116. package/build/readiness-check.js +1 -78
  117. package/build/readiness-prerequisites.generated.js +199 -0
  118. package/build/readme.generated.js +1 -1
  119. package/build/repository-toolchains.js +623 -0
  120. package/build/setup-change-policy.js +32 -0
  121. package/build/setup-epic.js +26 -9
  122. package/build/setup-question.js +62 -0
  123. package/build/start-tickets.js +4 -0
  124. package/build/test-command-detection.js +61 -80
  125. package/build/test-support/notes-fs.js +40 -0
  126. package/build/ticket-delivery-artifacts.js +7 -0
  127. package/build/ticket-delivery-enrollment.js +80 -4
  128. package/build/ticket-delivery-run-scope.js +128 -0
  129. package/build/version.generated.js +3 -3
  130. package/build/worker-guard-hook-bin.js +2 -2
  131. package/build/worktrees.js +105 -0
  132. package/docs/EPIC-IMPLEMENTER.md +43 -0
  133. package/docs/epic-implementer/getting-started.md +95 -14
  134. package/package.json +2 -2
@@ -0,0 +1,126 @@
1
+ /** Codex-only skill overlay. Shared commands, recipes, and host permissions stay unchanged. */
2
+ export const CODEX_AUTO_RECOVERY_WORKFLOWS = new Set([
3
+ "review-and-start", "review-and-implement", "review-ticket", "implement-ticket",
4
+ ]);
5
+ export const CODEX_AUTO_RECOVERY_POLICY = `## Codex auto-mode recovery policy
6
+
7
+ Apply this overlay ONLY in a Codex skill invocation with --auto, including its
8
+ inline nested review/implementation recipe with auto_approve: true. Without
9
+ --auto, follow the canonical workflow unchanged. This overlay grants no new tool
10
+ permissions and does not apply to server-orchestrated execution or other hosts.
11
+
12
+ ### Scope and precedence
13
+
14
+ For the named cases below, this overlay replaces immediate-stop/escalation wording
15
+ in the canonical command and returned recipe/instruction text with bounded recovery
16
+ inside the failing step. These named exceptions also qualify the command's
17
+ "strictly obey the agent_instructions" requirement: follow the recipe with these
18
+ Codex-only exceptions, rather than letting its immediate-stop wording cancel them.
19
+ In particular, the recipe preamble's on_error "halt"
20
+ means stop after the applicable recovery below fails, not on its first recoverable
21
+ attempt. It does not make any failed mandatory step optional. All other stop
22
+ conditions, ownership rules, approvals, and terminal outcomes remain authoritative.
23
+ Continue from the recovered step; never restart a full command, rerun completed
24
+ review decisions, or launch another worker as recovery.
25
+
26
+ ### Shared budgets and safe retry rules
27
+
28
+ - For a transient transport failure, rate limit, or temporary service error on a
29
+ known read-only retrieval, allow at most two retries after the initial failure.
30
+ Honor a server retry delay with an available bounded wait; if none is available,
31
+ report the delay/blocker instead of spinning. Terminal application states,
32
+ invalid arguments, authentication, and authorization errors are not transient.
33
+ - Allow at most two combined recovery attempts per failing step for local setup,
34
+ reconciled writes, and code repairs. An attempt is one diagnosed repair/retry
35
+ plus its verification. Share the count across nested commands and failure
36
+ categories; changing the error text or switching from setup to code does not
37
+ reset it. A stricter existing step limit wins. Existing CI max_iterations and
38
+ max_minutes remain authoritative for its correction loop, with no added rounds
39
+ or reset budgets. Pending/resuming wait windows are not recovery attempts;
40
+ preserve their existing session and wall-clock budgets.
41
+ - Inspect actual errors and existing state before acting. End recovery early when
42
+ the same failure recurs without new evidence or a materially different repair.
43
+ Use documented runners and existing authorized dependencies/services, preserving
44
+ ticket/file ownership. Never change dependency versions, provision paid services,
45
+ acquire credentials, change shared infrastructure, or weaken checks as recovery.
46
+ - A documented, safely repeatable LOCAL install/build may resume after inspecting
47
+ partial local state, its effects, and whether the original process still runs.
48
+ Do not require proof that it made no local changes; do require safe repeatability
49
+ in the owned worktree, within the combined budget. A setup command with external
50
+ side effects also obeys the external-write rule below.
51
+ - Before retrying an EXTERNAL write, reconcile authoritative state for the exact
52
+ ticket, operation, branch, and head. Reuse a proven successful result. Repeat only
53
+ after confirmed nonapplication and continued authorization, or with a documented
54
+ idempotency key that safely covers the same operation. Unknown external write
55
+ outcomes are blockers. Never classify tools by name alone: a get tool may also
56
+ register state or persist artifacts. Reconcile local commits before repeating
57
+ them too, so a lost response cannot create duplicate commits.
58
+
59
+ ### Named recovery exceptions
60
+
61
+ 1. **Recipe retrieval and read failures.** In review-ticket and implement-ticket,
62
+ replace "If the tool returns an error, stop and report the failure" for
63
+ get_pipeline_recipe with the bounded read retry rule above. The same rule
64
+ applies to transient read failures within their steps before on_error "halt".
65
+ Do not retry a terminal server response or an explicitly exhausted narrower
66
+ read limit. Once the read succeeds, execute the returned recipe normally.
67
+ 2. **Review failure before handoff.** In review-and-implement Phase 1, replace the
68
+ immediate halt on "Status: Failed at step N" only for an eligible recoverable
69
+ failure. Diagnose and resume that same review step using its accepted artifacts
70
+ and the budgets above. For a failed upload, reconcile the exact remote artifact
71
+ before any repeat. Never restart review-ticket, regenerate paid review work,
72
+ repeat completed decisions, or consume stale/withheld artifacts. Only a fully
73
+ successful review permits Phase 2/3; otherwise retain the worktree and branch,
74
+ report the unrecovered failure, and do not spawn implementation.
75
+ 3. **Checkpoint commit/push failure.** Replace checkpoint-work.md Step 4's immediate
76
+ failure stop, and implement-ticket's matching commit/push stop, only while safe
77
+ recovery remains. Inspect HEAD, index, and the exact remote branch first; a lost
78
+ response may follow a successful commit or push. Repair an actionable owned
79
+ hook/test/setup failure within the combined budget, preserving hooks and the
80
+ canonical staging/commit procedure. Before retrying a transient push, prove
81
+ that the intended head was not applied and that it remains a normal authorized
82
+ fast-forward. An unreadable, diverged, or unexpectedly changed remote stops
83
+ recovery. Repeat the durability proof and record_checkpoint only after local
84
+ HEAD equals the observed remote tip. Detached HEAD, an in-progress merge/rebase/
85
+ cherry-pick, authorization denials, and unsafe commit-message paths still stop.
86
+ 4. **Verification escalation.** In execute-plan-verification.md, before escalating
87
+ a local setup problem, failed test, or actionable review finding in owned code,
88
+ diagnose, repair, and rerun the affected verification within the shared budget.
89
+ This does not extend existing rendered-UI cycles. Preserve failure history and
90
+ report the actual final observation at its head; only a successful rerun proves
91
+ a fix. Never label an assertion failure as a missing capability or weaken a
92
+ test. When recovery fails, retain unresolved failures and follow existing
93
+ escalation/hand-off rules. Publication/readiness holds remain in force.
94
+ 5. **Current-head CI/review corrections.** Only in monitor-ci-checks.md's configured
95
+ fix_and_iterate branch (Step 6), item 10 also owns actionable changes_requested findings
96
+ from an authoritative required review for the CURRENT head, even when the
97
+ review transport check succeeded. This is the narrow exception to "corrections
98
+ ONLY for failing required checks". For URL-only failure_detail, first attempt
99
+ an authorized read of that exact failed job's logs/annotations before treating
100
+ it as non-actionable. Diagnose, fix, and verify owned code within the existing
101
+ loop's iteration/time limits. Apply this correction pass before Step 6 item 9.4's
102
+ nothing-to-commit exit; never exit just because the tree was clean before fixes.
103
+ Commit/push through the existing guards and recheck CI/review for the new pushed
104
+ head. If findings remain non-actionable, retain the warning and unresolved
105
+ failure. poll_only and custom keep their existing authority and limits. An
106
+ --epic-worker skips CI monitoring/correction; epic orchestration owns it.
107
+
108
+ ### Stops that recovery never overrides
109
+
110
+ Never automatically resubmit paid plan/review generation, force regeneration, or
111
+ execute a lost_after_retries retry command. Follow recovery_get or the existing
112
+ retrieval path for the ORIGINAL run; preserve accepted-artifact freshness rules.
113
+ A terminal review/plan state or artifact persistence/freshness failure cannot be
114
+ bypassed with files left on disk. Keep terminal review preflight failures and the
115
+ mergeability gate's existing exhausted-read stop.
116
+
117
+ Keep launcher/handoff failures terminal: a nonzero exit can still have spawned a
118
+ worker, so never automatically repeat a launcher invocation. Never bypass human
119
+ gates, authentication/authorization failures, file ownership, publication/readiness
120
+ holds, commit/push guards, or terminal server states. Never force-push, disable
121
+ hooks/tests, alter gate policy, or re-enter implement-ticket/planning for CI fixes.
122
+
123
+ When recovery is exhausted or unsafe, preserve work through the existing permitted
124
+ checkpoint/escalation path and report the failing step, observed error, attempts,
125
+ unresolved obligation, and exact next action. Never claim completion or advance
126
+ past a failed mandatory step.\n`;
@@ -7,6 +7,7 @@
7
7
  * adapter replaces that marker with the explicit-skill input contract and
8
8
  * translates references to shipped slash commands into Codex skill names.
9
9
  */
10
+ import { CODEX_AUTO_RECOVERY_POLICY, CODEX_AUTO_RECOVERY_WORKFLOWS } from "./codex-auto-recovery.js";
10
11
  export const CODEX_SKILLS_DIR = ".agents/skills";
11
12
  function commandStem(filename) {
12
13
  if (!/^[a-z][a-z0-9-]*\.md$/.test(filename)) {
@@ -45,6 +46,7 @@ export function renderCodexSkill(filename, command, knownCommands = [commandStem
45
46
  "",
46
47
  `# Bridge workflow: ${stem}`,
47
48
  "",
49
+ ...(CODEX_AUTO_RECOVERY_WORKFLOWS.has(stem) ? [CODEX_AUTO_RECOVERY_POLICY, ""] : []),
48
50
  adaptedCommand,
49
51
  ].join("\n"),
50
52
  };