@bridge_gpt/mcp-server 0.2.75 → 0.2.77

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 (94) hide show
  1. package/README.md +8 -6
  2. package/build/agents.generated.js +5 -5
  3. package/build/cli-dispatch.js +333 -0
  4. package/build/codex-auto-recovery.js +25 -7
  5. package/build/commands.generated.js +8 -8
  6. package/build/conductor/bridge-api-client.js +193 -13
  7. package/build/conductor/declare-blocked.js +146 -7
  8. package/build/conductor/driver-pass.js +8 -0
  9. package/build/conductor/driver-register.js +8 -2
  10. package/build/conductor/epic-implementer-cli.js +15 -10
  11. package/build/conductor/epic-server-journal.js +52 -22
  12. package/build/conductor/epic-server-recipe.js +15 -5
  13. package/build/conductor/epic-server-runtime.js +163 -45
  14. package/build/conductor/epic-server.js +13 -6
  15. package/build/conductor/install-doctor.js +30 -2
  16. package/build/conductor/launch-plan.js +28 -7
  17. package/build/conductor/local-merge.js +55 -13
  18. package/build/conductor/pr-ci-producer.js +12 -3
  19. package/build/conductor/readiness-prerequisites.js +89 -2
  20. package/build/conductor/readiness-sections.js +46 -13
  21. package/build/conductor/readiness.js +3 -40
  22. package/build/conductor/recovery-cli.js +14 -12
  23. package/build/conductor/repository-workflow-remedy.js +147 -7
  24. package/build/conductor/ui-readiness.js +224 -0
  25. package/build/conductor/wait-run-attention.js +9 -4
  26. package/build/conductor/wait-run-cli.js +9 -2
  27. package/build/docs.generated.js +67 -4
  28. package/build/doctor.js +97 -1
  29. package/build/drive-epic.js +625 -33
  30. package/build/engine-paths.js +10 -0
  31. package/build/epic-coherence-input-cli.js +105 -10
  32. package/build/epic-coherence-input.js +877 -4
  33. package/build/epic-coherence-input.test-fixtures.js +117 -0
  34. package/build/epic-implementer-bin.js +947 -120
  35. package/build/epic-implementer-env.js +2 -2
  36. package/build/epic-launch-context.js +8 -1
  37. package/build/epic-shared/cut-protocol.js +55 -3
  38. package/build/executor/completion-contract.js +14 -1
  39. package/build/executor/failure-reason-codes.js +2 -0
  40. package/build/executor/guarded-fast-forward-push.js +25 -2
  41. package/build/executor/integration-job.js +56 -2
  42. package/build/executor/job-runner.js +87 -28
  43. package/build/executor/likely-tests.js +78 -6
  44. package/build/executor/merge-job.js +45 -1
  45. package/build/executor/permissions.js +187 -2
  46. package/build/executor/provider-checks.js +101 -5
  47. package/build/executor/rebase-finalization.js +29 -27
  48. package/build/executor/reconcile-overlap-job.js +70 -17
  49. package/build/executor/rename-aside.js +265 -0
  50. package/build/executor/required-work-ledger.js +89 -6
  51. package/build/executor/resume-pre-spawn.js +32 -8
  52. package/build/executor/runner.js +26 -4
  53. package/build/executor/types.js +121 -0
  54. package/build/executor/worktree.js +39 -2
  55. package/build/index.js +2500 -495
  56. package/build/init.js +16 -0
  57. package/build/install-bridge-conductor-answers.js +4 -0
  58. package/build/install-bridge-conductor-apply.js +10 -0
  59. package/build/install-bridge-conductor-assessment.js +84 -0
  60. package/build/install-bridge-conductor-contracts.js +9 -1
  61. package/build/install-bridge-conductor-setup.js +103 -3
  62. package/build/install-bridge-conductor.js +440 -812
  63. package/build/install-bridge.js +4 -11
  64. package/build/language-catalog.generated.js +2649 -0
  65. package/build/mcp-host-config.js +54 -37
  66. package/build/phase-context-git-probe.js +16 -0
  67. package/build/pipelines.generated.js +47 -19
  68. package/build/plan-execution-ledger.js +35 -0
  69. package/build/plan-generation.js +34 -0
  70. package/build/plane/build-freshness.js +6 -0
  71. package/build/plane/cli.js +12 -5
  72. package/build/plane/plane-freshness.js +43 -26
  73. package/build/printed-remedy-commands.js +17 -0
  74. package/build/readiness-prerequisites.generated.js +28 -0
  75. package/build/readme.generated.js +1 -1
  76. package/build/run-unit-tests-launcher.js +3 -1
  77. package/build/secret-redaction.js +3 -0
  78. package/build/server.js +7946 -0
  79. package/build/setup-epic.js +41 -8
  80. package/build/start-tickets-prereqs.js +3 -6
  81. package/build/test-support/console-guard.js +30 -0
  82. package/build/test-support/create-preview-world.js +232 -0
  83. package/build/test-support/module-imports.js +155 -0
  84. package/build/test-support/server-client.js +96 -0
  85. package/build/test-support/stdio-server.js +146 -0
  86. package/build/ticket-delivery.js +65 -0
  87. package/build/v2-readiness-requirements.js +39 -5
  88. package/build/version.generated.js +3 -3
  89. package/build/worktree-core.js +51 -7
  90. package/docs/EPIC-IMPLEMENTER.md +150 -2
  91. package/docs/epic-implementer/getting-started.md +5 -1
  92. package/package.json +3 -3
  93. package/pipelines/implement-ticket.json +2 -2
  94. package/pipelines/learn-repository.json +19 -1
@@ -18,3 +18,13 @@ export const ENGINE_PATHS = [
18
18
  "tests/integration/conductor_harness/",
19
19
  "tests/pytest/db/test_executor_protocol_contract_fidelity.py",
20
20
  ];
21
+ /**
22
+ * BAPI-1782 — the one shared rule that a path is an engine TEST file, not engine
23
+ * runtime code. Both the launch health check (`classifyEngineStatus`) and the
24
+ * plane build-freshness check ignore such a file, so editing a test never asks
25
+ * for a health check or stales the executor build. Only the exact `.test.ts`
26
+ * suffix counts; every other `.ts` file still triggers both checks.
27
+ */
28
+ export function isEngineTestFile(filePath) {
29
+ return filePath.endsWith(".test.ts");
30
+ }
@@ -8,16 +8,29 @@
8
8
  * and prints exactly one JSON envelope on stdout. Diagnostics go only to the
9
9
  * injected stderr logger. It never starts the MCP server.
10
10
  */
11
- import { buildEpicCoherenceInput, checkEpicCoherenceInput, } from "./epic-coherence-input.js";
11
+ import { buildEpicCoherenceInput, checkEpicCoherenceDrafts, checkEpicCoherenceInput, } from "./epic-coherence-input.js";
12
12
  const USAGE = [
13
13
  "Usage: epic-coherence-input build --outline <path> --out <path>",
14
- " epic-coherence-input check <path>",
14
+ " epic-coherence-input check [--structural] <path>",
15
+ " epic-coherence-input check-drafts --input <path> --drafts <dir> --record <path>",
15
16
  "",
16
- " build Build epic-coherence-input.json from an outline and local markdown",
17
- " drafts, validate it, and print its three digests. Writes nothing",
18
- " when parsing or validation fails.",
19
- " check Structurally validate an existing input document and print its",
20
- " three digests. Never judges coverage. Writes nothing.",
17
+ " build Build epic-coherence-input.json from an outline and local markdown",
18
+ " drafts, validate it, and print its three digests. Writes nothing",
19
+ " when parsing or validation fails.",
20
+ " check Structurally validate an existing input document and print its",
21
+ " three digests. Never judges coverage. Writes nothing.",
22
+ " --structural Also check the declarations: every epic AC is claimed, every",
23
+ " declared hand-off thing has write, read, and caller owners, a",
24
+ " cross-child flow names an e2e owner, depends_on has no unknown",
25
+ " child or cycle, and any design_council is well formed. Each",
26
+ " error starts with a stable code. On success it also prints",
27
+ " design_council_covers_high_risk. It checks declarations only;",
28
+ " whether they are true stays the reviewer's semantic judgment.",
29
+ " Read-only. May come before or after the path.",
30
+ " check-drafts Check that each child draft (child-<manifest position>.md in",
31
+ " --drafts) holds its owns_verifications obligations and the",
32
+ " carried findings from --record (epic-coherence.json) word for",
33
+ " word. All three flags are required. Read-only.",
21
34
  "",
22
35
  "Every path is repository-relative to the current directory.",
23
36
  " -h, --help Show this help.",
@@ -31,10 +44,62 @@ export function parseEpicCoherenceInputArgs(argv) {
31
44
  return { kind: "help" };
32
45
  if (mode === "check") {
33
46
  const rest = argv.slice(1);
34
- if (rest.length !== 1 || rest[0].startsWith("-")) {
47
+ const structuralCount = rest.filter((arg) => arg === "--structural").length;
48
+ if (structuralCount > 1) {
49
+ return { kind: "error", message: 'Flag "--structural" may be given only once.' };
50
+ }
51
+ const paths = rest.filter((arg) => arg !== "--structural");
52
+ if (paths.length !== 1 || paths[0].startsWith("-")) {
35
53
  return { kind: "error", message: "check takes exactly one input path." };
36
54
  }
37
- return { kind: "ok", options: { mode: "check", input: rest[0] } };
55
+ return {
56
+ kind: "ok",
57
+ options: structuralCount === 1
58
+ ? { mode: "check", input: paths[0], structural: true }
59
+ : { mode: "check", input: paths[0] },
60
+ };
61
+ }
62
+ if (mode === "check-drafts") {
63
+ const values = {
64
+ "--input": undefined,
65
+ "--drafts": undefined,
66
+ "--record": undefined,
67
+ };
68
+ for (let i = 1; i < argv.length; i++) {
69
+ const arg = argv[i];
70
+ const value = argv[i + 1];
71
+ if (arg === "--input" || arg === "--drafts" || arg === "--record") {
72
+ if (values[arg] !== undefined) {
73
+ return { kind: "error", message: `Flag "${arg}" may be given only once.` };
74
+ }
75
+ if (value === undefined || value.startsWith("-")) {
76
+ return { kind: "error", message: `Flag "${arg}" requires a value.` };
77
+ }
78
+ values[arg] = value;
79
+ i++;
80
+ continue;
81
+ }
82
+ return { kind: "error", message: `Unknown argument "${arg}".` };
83
+ }
84
+ if (!values["--input"])
85
+ return { kind: "error", message: 'Flag "--input" is required.' };
86
+ if (!values["--drafts"])
87
+ return { kind: "error", message: 'Flag "--drafts" is required.' };
88
+ if (!values["--record"]) {
89
+ return {
90
+ kind: "error",
91
+ message: 'Flag "--record" is required: check-drafts needs the coherence record (epic-coherence.json).',
92
+ };
93
+ }
94
+ return {
95
+ kind: "ok",
96
+ options: {
97
+ mode: "check-drafts",
98
+ input: values["--input"],
99
+ drafts: values["--drafts"],
100
+ record: values["--record"],
101
+ },
102
+ };
38
103
  }
39
104
  if (mode === "build") {
40
105
  let outline;
@@ -61,7 +126,10 @@ export function parseEpicCoherenceInputArgs(argv) {
61
126
  return { kind: "error", message: 'Flag "--out" is required.' };
62
127
  return { kind: "ok", options: { mode: "build", outline, out } };
63
128
  }
64
- return { kind: "error", message: `Unknown mode "${mode}". Expected "build" or "check".` };
129
+ return {
130
+ kind: "error",
131
+ message: `Unknown mode "${mode}". Expected "build", "check", or "check-drafts".`,
132
+ };
65
133
  }
66
134
  /**
67
135
  * Run the `epic-coherence-input` subcommand. Returns 0 or 1 and never throws:
@@ -110,6 +178,33 @@ export async function runEpicCoherenceInputCli(argv, overrides = {}) {
110
178
  }));
111
179
  return 0;
112
180
  }
181
+ if (parsed.options.mode === "check-drafts") {
182
+ const result = await checkEpicCoherenceDrafts({
183
+ inputPath: parsed.options.input,
184
+ draftsDir: parsed.options.drafts,
185
+ recordPath: parsed.options.record,
186
+ }, builderDeps);
187
+ for (const warning of result.warnings)
188
+ deps.errorLog(`Warning: ${warning}`);
189
+ if (!result.ok) {
190
+ return emitFailure("check-drafts failed: a child draft is missing, unreadable, or lost an assigned obligation or carried finding.", result.errors);
191
+ }
192
+ deps.log(JSON.stringify({ ok: true, checked_drafts: result.value.checked_drafts, warnings: result.warnings }));
193
+ return 0;
194
+ }
195
+ if (parsed.options.structural) {
196
+ const result = await checkEpicCoherenceInput(parsed.options.input, builderDeps, { structural: true });
197
+ if (!result.ok) {
198
+ return emitFailure("check --structural failed: the input document is missing, unreadable, not structurally valid, or has incomplete declarations.", result.errors);
199
+ }
200
+ deps.log(JSON.stringify({
201
+ ok: true,
202
+ digests: result.value.digests,
203
+ warnings: result.warnings,
204
+ design_council_covers_high_risk: result.value.design_council_covers_high_risk === true,
205
+ }));
206
+ return 0;
207
+ }
113
208
  const result = await checkEpicCoherenceInput(parsed.options.input, builderDeps);
114
209
  if (!result.ok) {
115
210
  return emitFailure("check failed: the input document is missing, unreadable, or not structurally valid.", result.errors);