@bridge_gpt/mcp-server 0.2.68 → 0.2.70

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 (166) hide show
  1. package/README.md +226 -320
  2. package/build/agent-launchers/claude-executor-adapter.js +17 -4
  3. package/build/agents.generated.js +4 -4
  4. package/build/artifact-diff.js +110 -0
  5. package/build/bin-entrypoint.js +36 -0
  6. package/build/bridge-permissions.js +650 -98
  7. package/build/check-update-cli.js +74 -0
  8. package/build/claude-review-workflow-drift.js +3 -3
  9. package/build/claude-settings.js +84 -2
  10. package/build/cli-help.js +7 -1
  11. package/build/codex-bridge-profile.js +1 -1
  12. package/build/codex-home.js +9 -1
  13. package/build/codex-launcher-pin.js +598 -0
  14. package/build/commands.generated.js +8 -8
  15. package/build/conductor/bridge-api-client.js +598 -19
  16. package/build/conductor/bring-up-facts.js +9 -9
  17. package/build/conductor/doctor.js +466 -18
  18. package/build/conductor/epic-child-continuation.js +54 -3
  19. package/build/conductor/epic-implementer-cli.js +132 -34
  20. package/build/conductor/epic-runtime.js +2 -2
  21. package/build/conductor/epic-state.js +1 -1
  22. package/build/conductor/hook-runtime-qualification.js +1 -1
  23. package/build/conductor/install-doctor.js +4 -2
  24. package/build/conductor/launch-need-probes.js +337 -0
  25. package/build/conductor/local-merge.js +241 -56
  26. package/build/conductor/merge-credential.js +172 -0
  27. package/build/conductor/merge-execution-eligibility.js +1 -1
  28. package/build/conductor/merged-child-check.js +95 -0
  29. package/build/conductor/plan-trim.js +30 -0
  30. package/build/conductor/pr-ci-producer.js +1 -1
  31. package/build/conductor/readiness-cli.js +11 -6
  32. package/build/conductor/readiness-prerequisites.js +41 -0
  33. package/build/conductor/readiness-sections.js +345 -55
  34. package/build/conductor/readiness.js +99 -87
  35. package/build/conductor/recovery-cli.js +606 -21
  36. package/build/conductor/recovery-operations.js +306 -7
  37. package/build/conductor/repair-contract.js +47 -2
  38. package/build/conductor/repository-workflow-remedy.js +8 -6
  39. package/build/conductor/stored-merge-credential.js +76 -0
  40. package/build/conductor/stored-merge-token-probe.js +28 -0
  41. package/build/conductor/temporary-plan.js +50 -0
  42. package/build/conductor/wait-run-cli.js +759 -0
  43. package/build/conductor/worker-database-doctor-inspector.js +49 -0
  44. package/build/conductor-bin.js +2 -2
  45. package/build/conductor-claude-hook-bin.js +2 -2
  46. package/build/conductor-claude-hook-removed-stub-bin.js +2 -5
  47. package/build/conductor-removed-stub-bin.js +2 -5
  48. package/build/connect-github-api.js +33 -14
  49. package/build/credential-store.js +356 -13
  50. package/build/docs.generated.js +27 -14
  51. package/build/doctor.js +203 -38
  52. package/build/drive-epic-help.js +212 -0
  53. package/build/drive-epic.js +1840 -373
  54. package/build/epic-ci-workflow-drift.js +77 -0
  55. package/build/epic-ci-workflow-install.js +183 -0
  56. package/build/epic-ci-workflow.js +157 -0
  57. package/build/epic-contract-context.js +326 -0
  58. package/build/epic-implementer-bin.js +131 -120
  59. package/build/epic-implementer-claude-hook-bin.js +2 -2
  60. package/build/escalation-reachability.js +134 -0
  61. package/build/executor/cleanup-report.js +99 -0
  62. package/build/executor/cli.js +12 -1
  63. package/build/executor/completion-contract.js +68 -11
  64. package/build/executor/completion-supervision.js +99 -0
  65. package/build/executor/delivery-outcome.js +179 -0
  66. package/build/executor/deps.js +3 -0
  67. package/build/executor/env.js +71 -0
  68. package/build/executor/failure-reason-codes.js +126 -0
  69. package/build/executor/heartbeat.js +38 -0
  70. package/build/executor/http-client.js +115 -4
  71. package/build/executor/integration-job.js +298 -5
  72. package/build/executor/job-errors.js +36 -6
  73. package/build/executor/job-runner.js +720 -36
  74. package/build/executor/likely-tests.js +36 -2
  75. package/build/executor/merge-job.js +145 -2
  76. package/build/executor/observation.js +73 -4
  77. package/build/executor/permissions.js +193 -97
  78. package/build/executor/preflight.js +14 -3
  79. package/build/executor/process-containment.js +28 -2
  80. package/build/executor/prompt-spec.js +50 -5
  81. package/build/executor/rebase-finalization.js +38 -3
  82. package/build/executor/reconcile-overlap-job.js +35 -7
  83. package/build/executor/required-work-ledger.js +236 -81
  84. package/build/executor/resume-pre-spawn.js +38 -1
  85. package/build/executor/runner.js +91 -3
  86. package/build/executor/test-clock.js +8 -0
  87. package/build/executor/types.js +37 -2
  88. package/build/executor/worker-cli-launcher.js +259 -0
  89. package/build/executor/worker-command.js +41 -4
  90. package/build/executor/worker-database-target.js +91 -0
  91. package/build/executor/worker-database.js +908 -0
  92. package/build/executor/worker-finalization.js +106 -0
  93. package/build/executor/worker-guard-hook.js +203 -0
  94. package/build/executor/worker-resources.js +47 -0
  95. package/build/executor/worker-verification-guidance.js +15 -2
  96. package/build/executor/worktree.js +303 -15
  97. package/build/executor-launch.js +11 -1
  98. package/build/generated-assets-doctor.js +9 -1
  99. package/build/generated-assets-health.js +13 -4
  100. package/build/generated-assets-legacy.js +39 -0
  101. package/build/generated-assets-paths.js +12 -1
  102. package/build/generated-assets-repair.js +4 -1
  103. package/build/generated-assets-test-support.js +12 -0
  104. package/build/github-remote.js +33 -0
  105. package/build/github-sign-in.js +62 -0
  106. package/build/index.js +1214 -465
  107. package/build/init.js +39 -1
  108. package/build/install-bridge-conductor-gate.js +78 -0
  109. package/build/install-bridge-conductor-setup.js +413 -0
  110. package/build/install-bridge-conductor.js +1226 -267
  111. package/build/install-bridge.js +629 -350
  112. package/build/launcher-config-inspection.js +184 -19
  113. package/build/mcp-host-targets.js +4 -0
  114. package/build/mcp-identity.js +7 -0
  115. package/build/mcp-install-state.js +8 -2
  116. package/build/merge-pull-request.js +6 -0
  117. package/build/merge-workflow-install.js +763 -345
  118. package/build/phase-result-artifacts.js +75 -20
  119. package/build/pipeline-orchestrator.js +247 -4
  120. package/build/pipelines.generated.js +35 -35
  121. package/build/plan-discovery.js +15 -2
  122. package/build/plan-execution-ledger.js +306 -17
  123. package/build/plan-phase-routing.js +48 -13
  124. package/build/plane/cli.js +105 -51
  125. package/build/plane/defaults.js +3 -0
  126. package/build/plane/plane-freshness.js +294 -0
  127. package/build/plane/schema-compatibility.js +137 -0
  128. package/build/plane/shutdown-deps.js +38 -0
  129. package/build/plane/shutdown.js +83 -8
  130. package/build/plane/terminal-run-cleanup.js +303 -0
  131. package/build/printed-remedy-commands.js +26 -4
  132. package/build/readiness-check.js +6 -2
  133. package/build/readiness-prerequisites.generated.js +532 -0
  134. package/build/readme.generated.js +1 -1
  135. package/build/session-upgrade-notice.js +86 -0
  136. package/build/setup-epic.js +400 -30
  137. package/build/shared-resources.generated.js +5 -0
  138. package/build/start-tickets.js +43 -15
  139. package/build/test-command-detection.js +247 -0
  140. package/build/test-command-validation.js +73 -0
  141. package/build/testing-config-client.js +150 -0
  142. package/build/ticket-delivery-artifacts.js +258 -0
  143. package/build/ticket-delivery-enrollment.js +306 -0
  144. package/build/ticket-delivery.js +205 -0
  145. package/build/ticket-review-summary.js +14 -0
  146. package/build/tool-call-advisory.js +162 -0
  147. package/build/tool-surface-gating.js +28 -89
  148. package/build/update-check.js +97 -16
  149. package/build/update-status.js +61 -71
  150. package/build/upgrade-advice.js +15 -11
  151. package/build/upgrade-cli.js +360 -20
  152. package/build/v2-readiness-requirements.js +552 -0
  153. package/build/version.generated.js +3 -3
  154. package/build/worker-guard-hook-bin.js +2 -2
  155. package/build/worktree-core.js +22 -7
  156. package/docs/BRIDGE-DIRECTORY-README.md +48 -0
  157. package/docs/EPIC-IMPLEMENTER-INSTALL.md +12 -867
  158. package/docs/EPIC-IMPLEMENTER.md +104 -63
  159. package/docs/epic-implementer/getting-started.md +131 -0
  160. package/docs/epic-implementer/self-hosting.md +133 -0
  161. package/package.json +3 -3
  162. package/pipelines/idea-to-ticket.json +1 -1
  163. package/pipelines/implement-ticket.json +8 -8
  164. package/pipelines/review-ticket.json +2 -2
  165. package/design-assets/favicon/favicon-32x32.png +0 -0
  166. package/design-assets/just-logo-rough-draft.png +0 -0
@@ -558,7 +558,7 @@ export async function resolveDispatchRunIdForBinding(access, binding, fetchImpl
558
558
  for (const run of activeRuns) {
559
559
  try {
560
560
  const state = await fetchEpicRunState(access, run.epic_key, fetchImpl);
561
- const dispatch = state.dispatches.find((d) => d.ticket_key === ticketKey && d.run_id !== null);
561
+ const dispatch = (state.dispatches ?? []).find((d) => d.ticket_key === ticketKey && d.run_id !== null);
562
562
  if (dispatch?.run_id)
563
563
  return dispatch.run_id;
564
564
  }
@@ -44,15 +44,15 @@ import { runDefaultPlanePreflight } from "../plane/cli.js";
44
44
  import { planeNotApplicableForTarget } from "../plane/endpoint.js";
45
45
  import { resolvePlaneServerEndpoint } from "../plane/member-roster.js";
46
46
  /** Fixed notice emitted to stderr when a source could not be collected. */
47
- export const READINESS_COLLECTION_NOTICE = "one or more readiness sources could not be collected; the affected prerequisites are reported as failures.";
47
+ export const READINESS_COLLECTION_NOTICE = "one or more readiness sources could not be collected; the affected prerequisites are reported as warnings.";
48
48
  /** Usage text for `epic-implementer readiness`. */
49
49
  export function getReadinessUsage() {
50
50
  return [
51
51
  "Usage: epic-implementer readiness [--json] [--no-deny-probe] [--base-url <url>] [--epic-run-id <id>]",
52
52
  "",
53
- "Read-only ADVISORY report of every conductor prerequisite, consolidated from the",
53
+ "Read-only ADVISORY report of every Epic Implementer prerequisite, consolidated from the",
54
54
  "Bridge install checklist, the epic-implementer doctor, the plane preflight, and the",
55
- "server conductor-readiness collector. Each prerequisite reports pass/warn/fail/skip",
55
+ "server's Epic Implementer readiness collector. Each prerequisite reports pass/warn/fail/skip",
56
56
  "and, on a failure, exactly ONE named remediation.",
57
57
  "",
58
58
  "The claude-review workflow row is assessed for a NEW feature-branch run's first",
@@ -65,6 +65,7 @@ export function getReadinessUsage() {
65
65
  "the only route-selection gate and the server-side admission the only hard refusal.",
66
66
  "",
67
67
  "Options:",
68
+ " --all Show every visible prerequisite; default shows actionable rows",
68
69
  " --json Print the versioned structured report as JSON",
69
70
  " --no-deny-probe Accepted for parity with `epic-implementer doctor`; inert here, because",
70
71
  " this command never spawns the deny-enforcement probe",
@@ -78,10 +79,12 @@ export function getReadinessUsage() {
78
79
  }
79
80
  /** Parse `epic-implementer readiness` argv. Unknown flags and positionals are errors. */
80
81
  export function parseReadinessArgs(argv) {
81
- const parsed = { json: false, help: false, noDenyProbe: false };
82
+ const parsed = { all: false, json: false, help: false, noDenyProbe: false };
82
83
  for (let index = 0; index < argv.length; index++) {
83
84
  const token = argv[index];
84
- if (token === "--json")
85
+ if (token === "--all")
86
+ parsed.all = true;
87
+ else if (token === "--json")
85
88
  parsed.json = true;
86
89
  else if (token === "--no-deny-probe")
87
90
  parsed.noDenyProbe = true;
@@ -194,6 +197,8 @@ async function collectProductionReport(repoRoot, env, baseUrl, epicRunId) {
194
197
  // `verdict_protocol` whenever that cannot be established. This is a
195
198
  // prospective assessment, not a prediction or authorization of any run.
196
199
  reviewPolicySource,
200
+ // BAPI-1465: an explicit run id also scopes the effective-review-mode row.
201
+ ...(epicRunId !== undefined ? { epicRunId } : {}),
197
202
  readWorkflowFile: () => fsReadFile(claudeReviewWorkflowPath(repoRoot), "utf-8"),
198
203
  projectRoot: repoRoot,
199
204
  installDoctorDeps: {
@@ -267,7 +272,7 @@ export async function runConductorReadinessCommand(argv, deps = {}) {
267
272
  });
268
273
  }
269
274
  else {
270
- sinks.stdout(formatConductorReadinessGateReport(report));
275
+ sinks.stdout(formatConductorReadinessGateReport(report, { all: parsed.all }));
271
276
  }
272
277
  // Advisory: the exit code is a constant, never derived from a check status.
273
278
  return 0;
@@ -0,0 +1,41 @@
1
+ /** Canonical merging and bounded rendering; provider details never become public text. */
2
+ import { READINESS_PREREQUISITE_BY_ID, READINESS_LEGACY_IDS, READINESS_PREREQUISITE_CATALOG } from '../readiness-prerequisites.generated.js';
3
+ import { READINESS_PREREQUISITE_FIXES } from '../printed-remedy-commands.js';
4
+ import { createReadinessCheckSafely } from '../readiness-check.js';
5
+ export function mergeReadinessPrerequisites(checks, server = []) {
6
+ const rows = new Map();
7
+ for (const check of checks) {
8
+ const id = check.id.startsWith('server.diagnostic-') ? 'server.diagnostics'
9
+ : check.id.startsWith('server.gate-profile-warning-') ? 'server.gate-profile-warnings'
10
+ : READINESS_LEGACY_IDS[check.id] ?? check.id;
11
+ const descriptor = READINESS_PREREQUISITE_BY_ID.get(id);
12
+ if (!descriptor)
13
+ continue;
14
+ const unknown = check.status === 'warn' || (check.status === 'fail' && /unknown|unread|unavailable|could not|unreported|unreachable/i.test(check.detail ?? ''));
15
+ const status = check.status === 'pass' ? 'met' : check.status === 'skip' ? 'not_applicable' : unknown ? 'unknown' : 'not_met';
16
+ const impact = status === 'met' || status === 'not_applicable' ? 'info' : unknown || check.blocking !== true ? 'warning' : descriptor.impact;
17
+ const fix = impact === 'info' ? '' : descriptor.scope === 'self_host' ? READINESS_PREREQUISITE_FIXES.self_host : READINESS_PREREQUISITE_FIXES.retry;
18
+ const item = { ...descriptor, check_status: status, impact, fix };
19
+ const previous = rows.get(id);
20
+ if (!previous || previous.check_status === 'met')
21
+ rows.set(id, item);
22
+ }
23
+ for (const item of server)
24
+ rows.set(item.id, item);
25
+ return READINESS_PREREQUISITE_CATALOG.flatMap(d => rows.has(d.id) ? [rows.get(d.id)] : []);
26
+ }
27
+ export function prerequisiteChecks(items) {
28
+ return items.map(p => createReadinessCheckSafely({ id: p.id, source: 'server', label: p.label,
29
+ status: p.check_status === 'met' ? 'pass' : p.check_status === 'not_applicable' ? 'skip' : p.check_status === 'unknown' || p.impact !== 'blocking' ? 'warn' : 'fail',
30
+ blocking: p.impact === 'blocking', detail: p.check_status,
31
+ ...(p.fix ? { remediation: p.fix } : {}) }));
32
+ }
33
+ export function formatReadinessPrerequisites(items, options = {}) {
34
+ const visible = items.filter(p => !options.isProduction || p.scope === 'customer');
35
+ const blockers = visible.filter(p => p.check_status === 'not_met' && p.impact === 'blocking');
36
+ const warnings = visible.filter(p => ['not_met', 'unknown'].includes(p.check_status) && p.impact === 'warning');
37
+ const verdict = blockers.length ? `Not ready: ${blockers.length} blocking` : warnings.length ? `Ready, with ${warnings.length} warnings` : 'Ready to launch';
38
+ const selected = options.all ? visible : [...blockers, ...warnings];
39
+ const state = { met: 'Met', not_met: 'Not met', unknown: "Couldn't check", not_applicable: 'Not applicable' };
40
+ return [verdict, ...selected.flatMap(p => [` ${p.label}: ${state[p.check_status]}`, ...(p.fix && ['not_met', 'unknown'].includes(p.check_status) ? [` ${p.fix}`] : [])])];
41
+ }