@bridge_gpt/mcp-server 0.2.62 → 0.2.65

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 (80) hide show
  1. package/README.md +47 -8
  2. package/build/agent-launchers/claude-executor-adapter.js +134 -3
  3. package/build/agent-launchers/executor-adapter.js +54 -2
  4. package/build/agents.generated.js +10 -1
  5. package/build/bounded-wait.js +32 -1
  6. package/build/commands.generated.js +6 -5
  7. package/build/conductor/bridge-api-client.js +335 -22
  8. package/build/conductor/bring-up-facts.js +3 -1
  9. package/build/conductor/doctor.js +23 -14
  10. package/build/conductor/epic-child-continuation.js +324 -0
  11. package/build/conductor/epic-implementer-cli.js +142 -17
  12. package/build/conductor/git-hooks.js +529 -118
  13. package/build/conductor/hook-runtime-qualification.js +340 -0
  14. package/build/conductor/readiness-sections.js +5 -4
  15. package/build/conductor/readiness.js +22 -11
  16. package/build/conductor/recovery-cli.js +354 -13
  17. package/build/conductor/recovery-operations.js +251 -5
  18. package/build/conductor/repair-contract.js +8 -0
  19. package/build/conductor-bundle-artifacts.js +1 -0
  20. package/build/credential-store.js +50 -12
  21. package/build/docs.generated.js +2 -1
  22. package/build/doctor.js +77 -11
  23. package/build/drive-epic-key.js +12 -0
  24. package/build/drive-epic.js +1211 -116
  25. package/build/epic-coherence-input-cli.js +137 -0
  26. package/build/epic-coherence-input.js +920 -0
  27. package/build/epic-coherence-input.test-fixtures.js +175 -0
  28. package/build/epic-implementer-bin.js +35 -29
  29. package/build/epic-implementer-bundle-cli.js +14 -1
  30. package/build/epic-launch-profile.js +14 -5
  31. package/build/epic-run-status.js +5 -0
  32. package/build/epic-shared/bridge-client.js +46 -4
  33. package/build/executor/cli.js +39 -0
  34. package/build/executor/completion-contract.js +423 -0
  35. package/build/executor/completion-supervision.js +286 -0
  36. package/build/executor/credentials.js +3 -1
  37. package/build/executor/deps.js +65 -1
  38. package/build/executor/env.js +6 -0
  39. package/build/executor/heartbeat.js +13 -3
  40. package/build/executor/http-client.js +76 -4
  41. package/build/executor/job-errors.js +48 -0
  42. package/build/executor/job-runner.js +1294 -26
  43. package/build/executor/job-types.js +10 -2
  44. package/build/executor/preflight.js +99 -0
  45. package/build/executor/process-containment.js +756 -0
  46. package/build/executor/process.js +235 -5
  47. package/build/executor/prompt-spec.js +262 -1
  48. package/build/executor/provider-checks.js +69 -0
  49. package/build/executor/rebase-finalization.js +351 -0
  50. package/build/executor/reconcile-overlap-job.js +77 -84
  51. package/build/executor/required-verification.js +313 -0
  52. package/build/executor/required-work-ledger.js +1121 -0
  53. package/build/executor/results.js +142 -0
  54. package/build/executor/resume-pre-spawn.js +87 -4
  55. package/build/executor/runner.js +145 -0
  56. package/build/executor/test-declaration.js +20 -0
  57. package/build/executor/types.js +12 -0
  58. package/build/executor/worker-command.js +49 -13
  59. package/build/executor/worker-finalization.js +88 -11
  60. package/build/executor/worker-guard-hook.js +29 -4
  61. package/build/executor/worktree.js +13 -0
  62. package/build/executor-launch.js +658 -0
  63. package/build/index.js +537 -943
  64. package/build/install-bridge-conductor.js +231 -41
  65. package/build/merge-pull-request.js +1 -1
  66. package/build/pipelines.generated.js +8 -7
  67. package/build/plan-discovery.js +137 -0
  68. package/build/plan-epic-implementer-eligibility.js +2 -2
  69. package/build/plane/cli.js +37 -3
  70. package/build/plane/member-logs.js +3 -0
  71. package/build/plane/member-roster.js +7 -1
  72. package/build/plane/shutdown.js +59 -1
  73. package/build/plane/supervisor.js +142 -0
  74. package/build/readme.generated.js +1 -1
  75. package/build/scripts/executor-protocol-contract-driver.js +13 -3
  76. package/build/setup-epic.js +28 -17
  77. package/build/version.generated.js +3 -3
  78. package/build/worker-guard-hook-bin.js +2 -2
  79. package/docs/CONDUCTOR.md +116 -2
  80. package/package.json +2 -1
@@ -40,6 +40,33 @@
40
40
  import { MAX_CONSECUTIVE_POLL_FAILURES, MAX_PROBE_TIMEOUT_MS, MAX_POLL_JITTER_MS, defaultPollDelayMs, } from "./polling-policy.js";
41
41
  /** Hard ceiling on one wait window. Well inside the 900 s MCP client deadline. */
42
42
  export const MAX_BUDGET_MS = 240_000;
43
+ /**
44
+ * Plain sentences for the server's closed terminal-reason tokens. An unknown
45
+ * token is printed as received, so a newer server's reason is never hidden.
46
+ */
47
+ const TERMINAL_REASON_SENTENCES = {
48
+ lost_after_retries: "The server restarted during the run and gave up after its automatic retries.",
49
+ handler_failed: "The run failed on the server.",
50
+ expired: "The run expired on the server before it finished.",
51
+ };
52
+ /**
53
+ * Build the plain recovery message for a terminal outcome, or `null` when the
54
+ * server sent neither a reason nor a retry hint (the caller then keeps its
55
+ * existing wording exactly). `retry_hint` is printed verbatim.
56
+ */
57
+ export function formatTerminalRecoveryMessage(detail) {
58
+ const reason = typeof detail?.reason === "string" ? detail.reason.trim() : "";
59
+ const retryHint = typeof detail?.retryHint === "string" ? detail.retryHint.trim() : "";
60
+ if (!reason && !retryHint)
61
+ return null;
62
+ const parts = [];
63
+ if (reason) {
64
+ parts.push(TERMINAL_REASON_SENTENCES[reason] ?? `The server reported: ${reason}.`);
65
+ }
66
+ if (retryHint)
67
+ parts.push(`Retry with: ${retryHint}`);
68
+ return parts.join(" ");
69
+ }
43
70
  const monotonicNow = () => typeof performance !== "undefined" && typeof performance.now === "function"
44
71
  ? performance.now()
45
72
  : Date.now();
@@ -141,7 +168,11 @@ export async function boundedWait(options) {
141
168
  }
142
169
  }
143
170
  else if (outcome.kind === "terminal") {
144
- return { state: "error", reason: "UPSTREAM_TERMINAL" };
171
+ // Recovery detail is additive: it is attached only when the probe
172
+ // captured some, so a legacy terminal result keeps its exact shape.
173
+ return outcome.recovery
174
+ ? { state: "error", reason: "UPSTREAM_TERMINAL", recovery: outcome.recovery }
175
+ : { state: "error", reason: "UPSTREAM_TERMINAL" };
145
176
  }
146
177
  else if (outcome.kind === "malformed") {
147
178
  return { state: "error", reason: "INVALID_RESPONSE" };