@bridge_gpt/mcp-server 0.2.34 → 0.2.37
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 +490 -366
- package/build/agent-capabilities/probe-context.js +8 -1
- package/build/agent-capabilities/probes.js +7 -1
- package/build/agents.generated.js +1 -1
- package/build/base-url.js +79 -0
- package/build/bridge-api-urls.js +9 -0
- package/build/chain-orchestrator.js +93 -15
- package/build/claude-review-workflow.js +264 -0
- package/build/claude-user-config-doctor.js +317 -0
- package/build/cli-release.js +53 -0
- package/build/commands.generated.js +6 -5
- package/build/conductor/bridge-api-client.js +393 -4
- package/build/conductor/deny-enforcement-preflight.js +1 -0
- package/build/conductor/done-gate.js +44 -5
- package/build/conductor/epic-reconcile.js +6 -0
- package/build/conductor/install-doctor.js +462 -0
- package/build/conductor-bin.js +3 -3
- package/build/conductor-bundle-artifacts.js +37 -15
- package/build/credential-store.js +205 -4
- package/build/direct-ticket-tools.js +70 -0
- package/build/doctor.js +473 -81
- package/build/executor/cli.js +83 -6
- package/build/executor/credentials.js +39 -11
- package/build/executor/deps.js +32 -1
- package/build/executor/env.js +71 -28
- package/build/executor/heartbeat.js +138 -17
- package/build/executor/http-client.js +49 -8
- package/build/executor/index.js +4 -0
- package/build/executor/job-errors.js +4 -0
- package/build/executor/job-runner.js +530 -20
- package/build/executor/observation.js +130 -0
- package/build/executor/permissions.js +114 -8
- package/build/executor/preflight.js +127 -8
- package/build/executor/prompt-spec.js +51 -0
- package/build/executor/runner.js +23 -2
- package/build/executor/service-unit.js +876 -0
- package/build/executor/test-clock.js +75 -3
- package/build/executor/types.js +4 -18
- package/build/executor/worker-command.js +73 -12
- package/build/executor/worker-config-isolation.js +287 -0
- package/build/executor/worker-finalization.js +68 -14
- package/build/executor/worktree.js +46 -4
- package/build/index.js +1039 -237
- package/build/init.js +503 -111
- package/build/install-bridge-conductor.js +491 -0
- package/build/install-bridge.js +1188 -247
- package/build/install-reexec.js +233 -0
- package/build/launcher-config-inspection.js +351 -0
- package/build/mcp-host-config.js +11 -1
- package/build/mcp-install-state.js +32 -0
- package/build/mcp-invoke.js +49 -6
- package/build/mcp-provisioning.js +52 -13
- package/build/mcp-registration-doctor.js +14 -5
- package/build/notifications.js +553 -0
- package/build/pipeline-orchestrator.js +146 -4
- package/build/pipeline-utils.js +3 -0
- package/build/pipelines.generated.js +32 -13
- package/build/plan-execution-ledger.js +550 -0
- package/build/plan-phase-routing.js +272 -0
- package/build/plane/alembic-head.js +110 -0
- package/build/plane/build-freshness.js +167 -0
- package/build/plane/cli.js +480 -0
- package/build/plane/defaults.js +266 -0
- package/build/plane/manifest.js +377 -0
- package/build/plane/member-logs.js +147 -0
- package/build/plane/member-roster.js +147 -0
- package/build/plane/preflight.js +289 -0
- package/build/plane/shutdown.js +195 -0
- package/build/plane/status.js +125 -0
- package/build/plane/supervisor.js +569 -0
- package/build/plane/test-fakes.js +156 -0
- package/build/plane/types.js +75 -0
- package/build/readme.generated.js +1 -1
- package/build/run-unit-tests-launcher.js +259 -0
- package/build/setup-epic.js +772 -28
- package/build/sfcc/log-gate.js +38 -11
- package/build/sfcc/log-query.js +55 -15
- package/build/sfcc/ocapi-shape.js +51 -14
- package/build/sfcc/output.js +41 -11
- package/build/sfcc/permissions.js +24 -2
- package/build/sfcc/read-projection.js +181 -0
- package/build/sfcc/read-result.js +158 -0
- package/build/sfcc/reads-custom-object-def.js +29 -18
- package/build/sfcc/reads-site-preference.js +75 -29
- package/build/sfcc/reads-system-object.js +40 -34
- package/build/sfcc/sfcc-result.js +106 -0
- package/build/sfcc/tool-wrapper.js +56 -13
- package/build/sfcc/write-grants.js +45 -22
- package/build/sfcc/write-guard.js +21 -13
- package/build/sfcc/write-result.js +61 -14
- package/build/sfcc/write-tool-common.js +126 -32
- package/build/sfcc/writes-system-object.js +11 -50
- package/build/start-tickets-prereqs.js +129 -0
- package/build/start-tickets.js +17 -13
- package/build/ticket-backend-metadata.js +59 -0
- package/build/ticket-key-utils.js +92 -0
- package/build/tool-error-envelope.js +71 -0
- package/build/tool-surface-gating.js +72 -0
- package/build/update-status.js +102 -0
- package/build/upgrade-advice.js +47 -0
- package/build/upgrade-cli.js +412 -110
- package/build/version.generated.js +1 -1
- package/build/worktree-core.js +73 -0
- package/docs/CONDUCTOR.md +132 -6
- package/docs/install/mcp-tool-integrations.md +29 -21
- package/package.json +9 -6
- package/pipelines/implement-ticket.json +19 -4
- package/build/conductor/supervisor-judgment-python.js +0 -141
- package/build/conductor/supervisor-judgment.js +0 -215
|
@@ -12,6 +12,28 @@ function isOkBody(bodyText) {
|
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* The server-published run-level stop field on a heartbeat response (BAPI-731,
|
|
17
|
+
* WS-B). Owned by the reconciler safety-plane ticket; until it ships the field is
|
|
18
|
+
* simply never present.
|
|
19
|
+
*/
|
|
20
|
+
export const HEARTBEAT_STOP_FIELD = "stop_requested";
|
|
21
|
+
/**
|
|
22
|
+
* True ONLY for a literal `true` on the stop field. Anything else — absent,
|
|
23
|
+
* `false`, a string, a truthy non-boolean, or an unparseable body — means "no
|
|
24
|
+
* stop was requested", so an ambiguous body can never cancel a healthy run.
|
|
25
|
+
*/
|
|
26
|
+
function parseStopRequested(bodyText) {
|
|
27
|
+
try {
|
|
28
|
+
const parsed = JSON.parse(bodyText);
|
|
29
|
+
if (!parsed || typeof parsed !== "object")
|
|
30
|
+
return false;
|
|
31
|
+
return parsed[HEARTBEAT_STOP_FIELD] === true;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
15
37
|
/**
|
|
16
38
|
* Map a mutation (heartbeat/complete/fail) HTTP response onto the fencing
|
|
17
39
|
* outcome. `allowInvalidResult` maps 422 to `invalid_job_result` (complete only).
|
|
@@ -92,14 +114,33 @@ export function createExecutorHttpClient(config) {
|
|
|
92
114
|
// 5xx and any other unexpected status are retryable.
|
|
93
115
|
return { kind: "retryable", error: `claim failed (HTTP ${status}): ${boundedDetail(text)}` };
|
|
94
116
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
117
|
+
// Heartbeat does NOT go through `mutate()`: it is the one mutation whose
|
|
118
|
+
// response BODY carries information beyond the outcome (the BAPI-731 stop
|
|
119
|
+
// request), so it maps the response itself instead of discarding the body.
|
|
120
|
+
async heartbeat(job, payload) {
|
|
121
|
+
let status;
|
|
122
|
+
let text;
|
|
123
|
+
try {
|
|
124
|
+
const res = await post(`/${job.id}/heartbeat`, {
|
|
125
|
+
repo_name: job.repo_name,
|
|
126
|
+
claim_token: job.claim_token,
|
|
127
|
+
local_commit_count: payload.local_commit_count,
|
|
128
|
+
last_commit_sha: payload.last_commit_sha,
|
|
129
|
+
telemetry: payload.telemetry,
|
|
130
|
+
}, job.repo_name);
|
|
131
|
+
status = res.status;
|
|
132
|
+
text = res.text;
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
// Transient network error — identical to the previous behavior; the
|
|
136
|
+
// caller's dead-man logic decides whether to keep the worker alive.
|
|
137
|
+
return { outcome: "fatal_http_error" };
|
|
138
|
+
}
|
|
139
|
+
const outcome = mapMutationResponse(status, text, false);
|
|
140
|
+
const result = { outcome };
|
|
141
|
+
if (parseStopRequested(text))
|
|
142
|
+
result.stop_requested = true;
|
|
143
|
+
return result;
|
|
103
144
|
},
|
|
104
145
|
complete(job, completion) {
|
|
105
146
|
return mutate(`/${job.id}/complete`, {
|
package/build/executor/index.js
CHANGED
|
@@ -7,4 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { runExecutorCli, getExecutorUsage, parseExecutorArgs } from "./cli.js";
|
|
9
9
|
export { runExecutor } from "./runner.js";
|
|
10
|
+
// Persistent-service packaging (BAPI-688). The CLI entry plus the PURE helpers
|
|
11
|
+
// doctor needs to enumerate and inspect generated units — doctor must share this
|
|
12
|
+
// module's naming/format contract instead of maintaining a second parser.
|
|
13
|
+
export { runExecutorInstallServiceCli, getExecutorInstallServiceUsage, buildExecutorServiceArtifact, writeExecutorServiceArtifact, inspectExecutorServiceArtifact, executorLaunchdDirForHome, executorSystemdDirForHome, executorIdFromLaunchdFilename, executorIdFromSystemdFilename, EXECUTOR_SERVICE_BASE_URL_ENV, EXECUTOR_SERVICE_PATH_ENV, } from "./service-unit.js";
|
|
10
14
|
export { runExecutorWatchCli, getExecutorWatchUsage, parseExecutorWatchArgs, } from "./watch-cli.js";
|
|
@@ -4,6 +4,10 @@ export const WorktreeLostBeforePush = "WorktreeLostBeforePush";
|
|
|
4
4
|
export const BranchMismatch = "BranchMismatch";
|
|
5
5
|
export const WorkerFinalizationMissingRemoteBranchAndPr = "WorkerFinalizationMissingRemoteBranchAndPr";
|
|
6
6
|
export const WorkerFinalizationPrBaseMismatch = "WorkerFinalizationPrBaseMismatch";
|
|
7
|
+
export const WorkerFinalizationSavedButUnfinalized = "WorkerFinalizationSavedButUnfinalized";
|
|
8
|
+
export const WorkerConfigIsolation = "ContractError.WorkerConfigIsolation";
|
|
9
|
+
export const PreSpawnVerification = "ContractError.PreSpawnVerification";
|
|
10
|
+
export const BridgeCredentialUnavailable = "ContractError.BridgeCredentialUnavailable";
|
|
7
11
|
/** Bound a failure message so no unbounded/secret-bearing text is posted. */
|
|
8
12
|
const ERROR_MESSAGE_MAX_CHARS = 300;
|
|
9
13
|
/**
|