@bridge_gpt/mcp-server 0.2.65 → 0.2.67
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 +269 -82
- package/build/agent-capabilities/probes.js +15 -5
- package/build/agent-launchers/claude-executor-adapter.js +55 -34
- package/build/agent-launchers/executor-adapter.js +34 -4
- package/build/agents.generated.js +1 -1
- package/build/bounded-wait.js +67 -10
- package/build/bridge-config.js +104 -0
- package/build/codex-bridge-profile.js +10 -1
- package/build/commands.generated.js +12 -12
- package/build/conductor/bridge-api-client.js +372 -10
- package/build/conductor/bring-up-facts.js +1 -1
- package/build/conductor/doctor.js +3 -3
- package/build/conductor/epic-child-continuation.js +61 -34
- package/build/conductor/epic-implementer-cli.js +34 -6
- package/build/conductor/errors.js +4 -3
- package/build/conductor/guided-repair.js +327 -0
- package/build/conductor/hook-runtime-qualification.js +1 -1
- package/build/conductor/merge-execution-contract.js +27 -8
- package/build/conductor/merge-execution-eligibility.js +3 -2
- package/build/conductor/pr-ci-producer.js +1 -1
- package/build/conductor/readiness-cli.js +46 -9
- package/build/conductor/readiness-sections.js +41 -6
- package/build/conductor/readiness.js +204 -30
- package/build/conductor/recovery-cli.js +703 -20
- package/build/conductor/recovery-operations.js +392 -3
- package/build/conductor/repair-contract.js +112 -3
- package/build/conductor/repository-workflow-remedy.js +125 -0
- package/build/conductor/tools.js +2 -2
- package/build/conductor-bundle-artifacts.js +8 -0
- package/build/credential-store.js +5 -4
- package/build/diagnostic-text.js +36 -0
- package/build/docs.generated.js +8 -3
- package/build/doctor.js +70 -10
- package/build/drive-epic-key.js +6 -5
- package/build/drive-epic.js +479 -131
- package/build/epic-coherence-input.js +2 -1
- package/build/epic-implementer-bin.js +30 -26
- package/build/epic-implementer-bundle-cli.js +2 -2
- package/build/epic-launch-diagnostic.js +31 -0
- package/build/epic-launch-profile.js +44 -14
- package/build/executor/cli.js +3 -2
- package/build/executor/completion-contract.js +48 -5
- package/build/executor/completion-supervision.js +9 -0
- package/build/executor/correction-dispatch.js +60 -0
- package/build/executor/env.js +25 -0
- package/build/executor/heartbeat.js +1 -1
- package/build/executor/http-client.js +35 -0
- package/build/executor/integration-job.js +6 -1
- package/build/executor/job-errors.js +38 -4
- package/build/executor/job-log-registry.js +340 -73
- package/build/executor/job-runner.js +485 -74
- package/build/executor/job-types.js +8 -13
- package/build/executor/observation.js +6 -1
- package/build/executor/preflight.js +136 -10
- package/build/executor/prompt-spec.js +113 -9
- package/build/executor/required-work-ledger.js +6 -1
- package/build/executor/resume-pre-spawn.js +2 -0
- package/build/executor/runner.js +31 -2
- package/build/executor/service-unit.js +7 -1
- package/build/executor/stale-artifacts.js +5 -4
- package/build/executor/types.js +1 -0
- package/build/executor/watch-cli.js +35 -8
- package/build/executor/worker-command.js +43 -43
- package/build/executor/worker-finalization.js +161 -43
- package/build/executor/worker-guard-hook.js +152 -12
- package/build/executor/worker-log.js +137 -70
- package/build/executor/worktree-gc.js +30 -6
- package/build/executor/worktree.js +82 -1
- package/build/index.js +482 -660
- package/build/init.js +107 -4
- package/build/install-bridge-conductor.js +8 -6
- package/build/install-bridge.js +287 -23
- package/build/install-doctor.js +172 -30
- package/build/install-reexec.js +69 -7
- package/build/macos-terminal-permission-guidance.js +16 -0
- package/build/model-thresholds-tool.js +185 -0
- package/build/phase-context-git-probe.js +68 -0
- package/build/phase-result-artifacts.js +173 -5
- package/build/pipelines.generated.js +19 -25
- package/build/plane/alembic-head.js +12 -3
- package/build/plane/base-worktree-guard.js +147 -0
- package/build/plane/cli.js +217 -17
- package/build/plane/code-snapshot.js +468 -0
- package/build/plane/defaults.js +48 -3
- package/build/plane/endpoint.js +41 -0
- package/build/plane/manifest.js +120 -1
- package/build/plane/member-roster.js +94 -19
- package/build/plane/preflight.js +30 -2
- package/build/plane/process-cwd.js +67 -0
- package/build/plane/restart.js +542 -0
- package/build/plane/shutdown.js +31 -0
- package/build/plane/status.js +145 -6
- package/build/plane/supervisor.js +588 -177
- package/build/plane/types.js +54 -2
- package/build/plane/worker-exit-code.js +2 -0
- package/build/printed-remedy-commands.js +37 -0
- package/build/project-root.js +99 -0
- package/build/readiness-check.js +1 -1
- package/build/readme.generated.js +1 -1
- package/build/review-generation.js +22 -0
- package/build/review-tickets.js +156 -13
- package/build/setup-epic.js +224 -127
- package/build/sfcc/config.js +9 -0
- package/build/sfcc/credentials.js +100 -38
- package/build/sfcc/hostname.js +67 -0
- package/build/sfcc/permissions.js +17 -13
- package/build/sfcc/register.js +1 -1
- package/build/sfcc/setup-status.js +2 -0
- package/build/sfcc/tool-wrapper.js +41 -43
- package/build/sfcc/tools-configured.js +96 -0
- package/build/sfcc/write-grants.js +17 -11
- package/build/sfcc/write-result.js +4 -3
- package/build/sfcc/writes-site-preference.js +20 -8
- package/build/start-tickets.js +332 -79
- package/build/tool-error-envelope.js +61 -0
- package/build/upgrade-cli.js +109 -24
- package/build/version.generated.js +3 -3
- package/build/visual-diff.js +22 -1
- package/build/windows-npm-entry.js +103 -0
- package/build/worker-guard-hook-bin.js +3 -5
- package/build/worker-guard-hook-main.js +47 -0
- package/build/worktree-core.js +136 -9
- package/docs/EPIC-IMPLEMENTER-INSTALL.md +849 -0
- package/docs/EPIC-IMPLEMENTER.md +662 -0
- package/docs/install/mcp-tool-integrations.md +25 -15
- package/docs/install/sfcc-integration.md +21 -8
- package/package.json +1 -1
- package/pipelines/implement-ticket.json +1 -1
- package/pipelines/plan-epic.json +0 -5
- package/pipelines/review-ticket.json +1 -1
- package/docs/CONDUCTOR.md +0 -605
- package/pipelines/idea-to-pr.json +0 -49
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* where a caller can read it without parsing text and `result.isError === true`
|
|
14
14
|
* still detects the failure.
|
|
15
15
|
*/
|
|
16
|
+
import { OCAPI_SETTINGS_STRUCTURE_VERSION } from "./config.js";
|
|
16
17
|
import { formatSfccWriteFailure } from "./sfcc-result.js";
|
|
17
18
|
// ---------------------------------------------------------------------------
|
|
18
19
|
// Write resource families
|
|
@@ -25,7 +26,7 @@ export const OCAPI_WRITE_RESOURCE_IDS = [
|
|
|
25
26
|
"/system_object_definitions",
|
|
26
27
|
"/system_object_definitions/**",
|
|
27
28
|
"/custom_object_definitions/**",
|
|
28
|
-
"/site_preferences/**",
|
|
29
|
+
"/sites/*/site_preferences/**",
|
|
29
30
|
];
|
|
30
31
|
/**
|
|
31
32
|
* The exact HTTP methods each resource family needs, derived from the methods
|
|
@@ -50,27 +51,32 @@ export const OCAPI_WRITE_RESOURCE_IDS = [
|
|
|
50
51
|
* custom preference create.
|
|
51
52
|
* /custom_object_definitions/** put, patch (+get for ETag) — attribute
|
|
52
53
|
* definition create/update.
|
|
53
|
-
*
|
|
54
|
-
* a direct PATCH with no ETag round trip
|
|
54
|
+
* site-scoped site_preferences patch (+get) — site_preference_values_set,
|
|
55
|
+
* a direct PATCH with no ETag round trip on
|
|
56
|
+
* the site-scoped resource (the org-level
|
|
57
|
+
* /site_preferences/** is read/search only).
|
|
55
58
|
*/
|
|
56
59
|
export const OCAPI_WRITE_RESOURCE_METHODS = {
|
|
57
60
|
"/system_object_definitions": ["get"],
|
|
58
61
|
"/system_object_definitions/**": ["get", "put", "patch"],
|
|
59
62
|
"/custom_object_definitions/**": ["get", "put", "patch"],
|
|
60
|
-
"/site_preferences/**": ["get", "patch"],
|
|
63
|
+
"/sites/*/site_preferences/**": ["get", "patch"],
|
|
61
64
|
};
|
|
62
65
|
// ---------------------------------------------------------------------------
|
|
63
66
|
// Grant JSON builders
|
|
64
67
|
// ---------------------------------------------------------------------------
|
|
65
68
|
/**
|
|
66
|
-
* Build the OCAPI Settings write-grant object
|
|
69
|
+
* Build the OCAPI Settings write-grant object.
|
|
70
|
+
*
|
|
71
|
+
* `_v` is the settings-structure version, never an OCAPI API version, so no
|
|
72
|
+
* caller can override it.
|
|
67
73
|
*
|
|
68
74
|
* The `clientIdPlaceholder` stays as `<YOUR_CLIENT_ID>` by default so the output
|
|
69
75
|
* is safe to print and paste — the real resolved client_id is never substituted.
|
|
70
76
|
*/
|
|
71
|
-
export function buildOcapiWriteGrantSettings(
|
|
77
|
+
export function buildOcapiWriteGrantSettings(clientIdPlaceholder = "<YOUR_CLIENT_ID>") {
|
|
72
78
|
return {
|
|
73
|
-
_v:
|
|
79
|
+
_v: OCAPI_SETTINGS_STRUCTURE_VERSION,
|
|
74
80
|
clients: [
|
|
75
81
|
{
|
|
76
82
|
client_id: clientIdPlaceholder,
|
|
@@ -85,8 +91,8 @@ export function buildOcapiWriteGrantSettings(ocapiVersion, clientIdPlaceholder =
|
|
|
85
91
|
};
|
|
86
92
|
}
|
|
87
93
|
/** Pretty-printed JSON string of the write-grant settings. */
|
|
88
|
-
export function formatOcapiWriteGrantJson(
|
|
89
|
-
return JSON.stringify(buildOcapiWriteGrantSettings(
|
|
94
|
+
export function formatOcapiWriteGrantJson(clientIdPlaceholder = "<YOUR_CLIENT_ID>") {
|
|
95
|
+
return JSON.stringify(buildOcapiWriteGrantSettings(clientIdPlaceholder), null, 2);
|
|
90
96
|
}
|
|
91
97
|
// ---------------------------------------------------------------------------
|
|
92
98
|
// 403 write-grant UX
|
|
@@ -115,7 +121,7 @@ export function ocapiWriteForbiddenMessage(operation, path) {
|
|
|
115
121
|
* same way an OCAPI read fault body is preserved.
|
|
116
122
|
*/
|
|
117
123
|
export function writeGrantForbiddenResult(params) {
|
|
118
|
-
const { operation, path,
|
|
124
|
+
const { operation, path, body } = params;
|
|
119
125
|
return formatSfccWriteFailure({
|
|
120
126
|
code: "OCAPI_WRITE_ERROR",
|
|
121
127
|
status: 403,
|
|
@@ -127,7 +133,7 @@ export function writeGrantForbiddenResult(params) {
|
|
|
127
133
|
remediation: {
|
|
128
134
|
business_manager_path: OCAPI_WRITE_GRANT_BUSINESS_MANAGER_PATH,
|
|
129
135
|
instruction: OCAPI_WRITE_GRANT_CLIENT_ID_INSTRUCTION,
|
|
130
|
-
write_grant: buildOcapiWriteGrantSettings(
|
|
136
|
+
write_grant: buildOcapiWriteGrantSettings(),
|
|
131
137
|
},
|
|
132
138
|
...(body === undefined ? {} : { body }),
|
|
133
139
|
},
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
* pre-transport ones.
|
|
17
17
|
*/
|
|
18
18
|
import { writeGrantForbiddenResult } from "./write-grants.js";
|
|
19
|
-
import { DEFAULT_OCAPI_VERSION } from "./config.js";
|
|
20
19
|
import { formatSfccWriteFailure } from "./sfcc-result.js";
|
|
21
20
|
import { redactSfccBody } from "./read-body.js";
|
|
22
21
|
/** Wrap text in the standard MCP text-result shape (success path only). */
|
|
@@ -72,12 +71,14 @@ function ocapiWriteFaultMessage(body, status) {
|
|
|
72
71
|
* `Response.status` verbatim, so the reported status *is* the upstream status
|
|
73
72
|
* and the shared formatter would rightly omit a duplicate.
|
|
74
73
|
*/
|
|
75
|
-
export function formatOcapiWriteToolResult(result, operation, path,
|
|
74
|
+
export function formatOcapiWriteToolResult(result, operation, path,
|
|
75
|
+
// Kept for call compatibility. It no longer reaches the grant JSON: `_v` there
|
|
76
|
+
// is the settings-structure version, which an API version must not override.
|
|
77
|
+
_ocapiVersion) {
|
|
76
78
|
if (result.status === 403) {
|
|
77
79
|
return writeGrantForbiddenResult({
|
|
78
80
|
operation,
|
|
79
81
|
path,
|
|
80
|
-
ocapiVersion,
|
|
81
82
|
body: result.body,
|
|
82
83
|
});
|
|
83
84
|
}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* SFCC site-preference value write tool (BAPI-584).
|
|
3
3
|
*
|
|
4
4
|
* Implements:
|
|
5
|
-
* site_preference_values_set — PATCH /site_preferences/preference_groups/{group}/sandbox
|
|
5
|
+
* site_preference_values_set — PATCH /sites/{site_id}/site_preferences/preference_groups/{group}/sandbox
|
|
6
6
|
*
|
|
7
|
-
* Sets custom site-preference VALUES through the OCAPI Data API
|
|
7
|
+
* Sets custom site-preference VALUES through the OCAPI Data API for ONE named
|
|
8
|
+
* site. `site_id` is required and is never derived from `dw.json`: a destructive
|
|
9
|
+
* write must not pick its target silently. Sandbox-only:
|
|
8
10
|
* the value endpoint would otherwise accept `production`, so the `{instance}`
|
|
9
11
|
* segment is forced to the `sandbox` literal AFTER the shared sandbox guard has
|
|
10
12
|
* validated the requested instance. The body is a FLAT map of `c_`-prefixed
|
|
@@ -35,7 +37,17 @@ const INSTANCE_ENUM = z.enum(["staging", "development", "sandbox", "production"]
|
|
|
35
37
|
// safeguard on the OCAPI route.
|
|
36
38
|
const INSTANCE_DESCRIBE = "OCAPI instance context. v1 supports the 'sandbox' context only; any other " +
|
|
37
39
|
"value is rejected before OCAPI is called.";
|
|
40
|
+
// A site id is one URL path segment. This is a conservative single-segment
|
|
41
|
+
// pattern (no separators, whitespace, or dots), not a claim about the full set
|
|
42
|
+
// OCAPI allows; the exact constraint is confirmed by owner check OR-1.
|
|
43
|
+
const SITE_ID_PATTERN = /^[A-Za-z0-9_-]+$/;
|
|
44
|
+
const SITE_ID_DESCRIBE = "Site id to write to; required, never defaulted. Not 'instance'.";
|
|
38
45
|
const sitePreferenceValuesSetInput = z.object({
|
|
46
|
+
site_id: z
|
|
47
|
+
.string()
|
|
48
|
+
.min(1)
|
|
49
|
+
.regex(SITE_ID_PATTERN, "site_id must contain only letters, digits, '_' or '-'.")
|
|
50
|
+
.describe(SITE_ID_DESCRIBE),
|
|
39
51
|
group: z.string().describe("Custom site preference group id, e.g. 'LLMIntegration'."),
|
|
40
52
|
instance: INSTANCE_ENUM.optional().default("sandbox").describe(INSTANCE_DESCRIBE),
|
|
41
53
|
values: sitePreferenceValuesPatchBodySchema.describe("Flat map of c_-prefixed preference ids to values (string, number, boolean, or string[])."),
|
|
@@ -44,12 +56,12 @@ const sitePreferenceValuesSetInput = z.object({
|
|
|
44
56
|
// Path builder
|
|
45
57
|
// ---------------------------------------------------------------------------
|
|
46
58
|
/**
|
|
47
|
-
* Build the site-preference group PATCH path. The `{instance}` segment is the
|
|
59
|
+
* Build the site-scoped site-preference group PATCH path. The `{instance}` segment is the
|
|
48
60
|
* `sandbox` literal — a non-sandbox instance is rejected by the guard before
|
|
49
61
|
* this is called, so a non-sandbox value can never leak into transport.
|
|
50
62
|
*/
|
|
51
|
-
export function sitePreferenceGroupPath(group) {
|
|
52
|
-
return `/site_preferences/preference_groups/${encodedSegment(group)}/sandbox`;
|
|
63
|
+
export function sitePreferenceGroupPath(siteId, group) {
|
|
64
|
+
return `/sites/${encodedSegment(siteId)}/site_preferences/preference_groups/${encodedSegment(group)}/sandbox`;
|
|
53
65
|
}
|
|
54
66
|
// ---------------------------------------------------------------------------
|
|
55
67
|
// Handler
|
|
@@ -66,7 +78,7 @@ export function buildSitePreferenceValuesSetHandler(gateDeps) {
|
|
|
66
78
|
const guard = rejectIfNotSandboxForWrite(parsed.instance);
|
|
67
79
|
if (guard)
|
|
68
80
|
return guard;
|
|
69
|
-
const path = sitePreferenceGroupPath(parsed.group);
|
|
81
|
+
const path = sitePreferenceGroupPath(parsed.site_id, parsed.group);
|
|
70
82
|
const body = buildSitePreferenceValuesPatchPayload(parsed.values);
|
|
71
83
|
try {
|
|
72
84
|
// Direct PATCH (no ETag round trip): the value endpoint does not gate on
|
|
@@ -92,10 +104,10 @@ export const SITE_PREFERENCE_WRITE_TOOL_NAMES = ["site_preference_values_set"];
|
|
|
92
104
|
export function registerSitePreferenceWriteTools(registerTool, deps) {
|
|
93
105
|
const { gateDeps } = deps;
|
|
94
106
|
registerTool("site_preference_values_set", {
|
|
95
|
-
description: "Set site-preference VALUES via PATCH /site_preferences/preference_groups/{group}/sandbox. " +
|
|
107
|
+
description: "Set site-preference VALUES via PATCH /sites/{site_id}/site_preferences/preference_groups/{group}/sandbox. " +
|
|
96
108
|
"Preference must already be defined via custom_preference_definition_create. Sandbox-only, " +
|
|
97
109
|
"destructive; flat c_-prefixed id→value map (string/number/boolean/string[]). " +
|
|
98
|
-
"Bad group → 404
|
|
110
|
+
"Bad group → 404. 403 → paste-ready grant JSON.",
|
|
99
111
|
inputSchema: sitePreferenceValuesSetInput,
|
|
100
112
|
annotations: WRITE_ANNOTATIONS,
|
|
101
113
|
}, buildSitePreferenceValuesSetHandler(gateDeps));
|