@topline-build/harness-mcp 0.9.1 → 0.9.2
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/CHANGELOG.md +8 -1
- package/README.md +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +127 -10
- package/docs/generated/build-mcp-manifest.json +18 -4
- package/docs/generated/build-mcp-reference.md +9 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable customer-visible Build MCP changes are recorded here. A source change is not a published package or customer release.
|
|
4
4
|
|
|
5
|
-
## 0.9.
|
|
5
|
+
## 0.9.2 - source candidate
|
|
6
|
+
|
|
7
|
+
- The Topline server (`--surface topline`) opens the browser sign-in as soon as it starts signed out, then asks the assistant to list tools again after you choose Allow, so a first chat no longer needs `login` beforehand. A tool call that needs a token while that browser approval is open waits for it instead of opening a second one. `login` still works for signing in ahead of time.
|
|
8
|
+
- Tool errors from Topline now carry Topline's own code (for example `artifact_external_session_active`, `external_private_tables_disabled` or `scope_required`) instead of the generic `platform_mcp_tool_error`, with recovery steps for that code. The full message is unchanged. `platform_mcp_tool_error` remains only when Topline gives no code, and its recovery text no longer suggests changing scopes.
|
|
9
|
+
- `build_session_id_required` names the session-only fields a session-less deploy passed (for example `build_session_id_required:idempotencyKey`), and says to remove them or start a session.
|
|
10
|
+
- `platform_run_artifact_smoke` takes an optional `sessionId`, so the holder of an open build session can rerun smoke without closing it (needs a Topline release with the matching change).
|
|
11
|
+
|
|
12
|
+
## 0.9.1 - 2026-10-23
|
|
6
13
|
|
|
7
14
|
- `--surface topline` no longer asks for `workspace:todo:write`. Topline retired that scope and leaves it out of every grant, so the package treated each fresh sign-in as incomplete and opened the browser again on the next launch (and twice during `topline-mcp login`). A retired scope named in `TOPLINE_MCP_SCOPES` or `--scopes` is dropped too. Existing sign-ins are reused without another approval.
|
|
8
15
|
- The default `build` surface lists and forwards hosted Build tools the way `--surface topline` does, so new hosted Build tools reach Codex, Claude Code and Cursor without a package release. Local tools (init, inspect, deploy, checkout, materialize and the rest of the package's own list) stay local and win over a hosted tool of the same name. Hosted `platform_create_artifact_app` and `platform_bedrock_local_token_command` stay off. A manual token on `build` keeps the package's own list.
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Topline Developer Access now sets up one Topline connection per account. Its plu
|
|
|
20
20
|
npx -y @topline-build/harness-mcp login --url https://YOUR-TOPLINE-HOST
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Run it on the computer where your browser opens. `login` opens the browser, waits up to 5 minutes for you to choose Allow, saves the refresh token where the server reads it, and records a connection check so Developer Access shows the computer as connected without a verification code. Start a new assistant chat afterwards so it loads the tools; the server refreshes the sign-in on its own after that. The plugin runs one exact package version. To update, copy the setup from Developer Access again (it shows "Update available" when a newer version is ready) and paste it into your assistant.
|
|
23
|
+
Run it on the computer where your browser opens. `login` opens the browser, waits up to 5 minutes for you to choose Allow, saves the refresh token where the server reads it, and records a connection check so Developer Access shows the computer as connected without a verification code. Start a new assistant chat afterwards so it loads the tools; the server refreshes the sign-in on its own after that. `login` is optional: when the Topline server starts signed out it opens the same browser sign-in itself and reloads its tools after you choose Allow. The plugin runs one exact package version. To update, copy the setup from Developer Access again (it shows "Update available" when a newer version is ready) and paste it into your assistant.
|
|
24
24
|
|
|
25
25
|
Set `TOPLINE_WORKSPACE_ROOT` when the MCP host starts outside the repository containing the artifact app:
|
|
26
26
|
|
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ type ToolProgressReporter = (progress: number, message: string) => void | Promis
|
|
|
40
40
|
export type McpSurface = "build" | "topline" | "harness";
|
|
41
41
|
export declare const DEFAULT_MCP_PROTOCOL_VERSION = "2025-11-25";
|
|
42
42
|
export declare const BUILD_MCP_SERVER_NAME = "topline-build-stdio";
|
|
43
|
-
export declare const HARNESS_MCP_VERSION = "0.9.
|
|
43
|
+
export declare const HARNESS_MCP_VERSION = "0.9.2";
|
|
44
44
|
export declare const DEFAULT_OAUTH_SCOPES: readonly string[];
|
|
45
45
|
/** The Topline server's scopes: Build and Workspace. Consent shows what the seat allows. */
|
|
46
46
|
export declare const TOPLINE_OAUTH_SCOPES: readonly string[];
|
|
@@ -58,6 +58,14 @@ export declare function parseHarnessOptions(argv: string[], env?: Record<string,
|
|
|
58
58
|
surface?: McpSurface;
|
|
59
59
|
}): HarnessMcpStdioOptions;
|
|
60
60
|
export declare function runHarnessMcpStdioCli(): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* The one Topline server lists most of its tools only once signed in, so a
|
|
63
|
+
* first chat that starts signed out would see almost nothing. Start the browser
|
|
64
|
+
* sign-in as soon as the server is up instead, and tell the host to list tools
|
|
65
|
+
* again after Allow. Returns whether it signed in. Never throws: a sign-in that
|
|
66
|
+
* is ignored or refused leaves the on-demand sign-in of the first tool call.
|
|
67
|
+
*/
|
|
68
|
+
export declare function signInAtStartup(opts: HarnessMcpStdioOptions, onSignedIn: () => Promise<void>, log?: (message: string) => void): Promise<boolean>;
|
|
61
69
|
/**
|
|
62
70
|
* `topline-mcp login`: sign in once during setup so the assistant's next chat
|
|
63
71
|
* starts already connected. Opens the browser, saves the refresh token to the
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const MCP_SURFACES = ["build", "topline", "harness"];
|
|
|
17
17
|
export const DEFAULT_MCP_PROTOCOL_VERSION = "2025-11-25";
|
|
18
18
|
const DEFAULT_TIMEOUT_MS = 120_000;
|
|
19
19
|
export const BUILD_MCP_SERVER_NAME = "topline-build-stdio";
|
|
20
|
-
export const HARNESS_MCP_VERSION = "0.9.
|
|
20
|
+
export const HARNESS_MCP_VERSION = "0.9.2";
|
|
21
21
|
export const DEFAULT_OAUTH_SCOPES = Object.freeze(["harness:artifact:read", "harness:artifact:write", "harness:artifact:deploy", "harness:artifact:delete"]);
|
|
22
22
|
/** The Topline server's scopes: Build and Workspace. Consent shows what the seat allows. */
|
|
23
23
|
export const TOPLINE_OAUTH_SCOPES = Object.freeze([
|
|
@@ -116,7 +116,94 @@ export async function runHarnessMcpStdioCli() {
|
|
|
116
116
|
}
|
|
117
117
|
const opts = parseHarnessOptions(argv);
|
|
118
118
|
const mcp = createHarnessMcpStdioServer(opts);
|
|
119
|
+
// A browser sign-in holds a callback server and a 5-minute timer; once the
|
|
120
|
+
// host closes the connection nothing will use it, so do not linger.
|
|
121
|
+
mcp.onclose = () => { if (inFlightSignIns.size > 0)
|
|
122
|
+
process.exit(0); };
|
|
119
123
|
await mcp.connect(new StdioServerTransport());
|
|
124
|
+
void signInAtStartup(opts, () => mcp.sendToolListChanged());
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The one Topline server lists most of its tools only once signed in, so a
|
|
128
|
+
* first chat that starts signed out would see almost nothing. Start the browser
|
|
129
|
+
* sign-in as soon as the server is up instead, and tell the host to list tools
|
|
130
|
+
* again after Allow. Returns whether it signed in. Never throws: a sign-in that
|
|
131
|
+
* is ignored or refused leaves the on-demand sign-in of the first tool call.
|
|
132
|
+
*/
|
|
133
|
+
export async function signInAtStartup(opts, onSignedIn, log = (message) => process.stderr.write(`${message}\n`)) {
|
|
134
|
+
if (opts.token || mcpSurface(opts) !== "topline")
|
|
135
|
+
return false;
|
|
136
|
+
try {
|
|
137
|
+
const stored = await readStoredOAuthCredentials(opts);
|
|
138
|
+
if (stored?.refreshToken || (stored?.accessToken && Date.parse(stored.accessTokenExpiresAt ?? "") > Date.now()))
|
|
139
|
+
return false;
|
|
140
|
+
// Hosts often start one server per window or session; only one of them opens the browser.
|
|
141
|
+
if (!(await takeStartupSignInLock(opts.authFile)))
|
|
142
|
+
return false;
|
|
143
|
+
try {
|
|
144
|
+
log(`Opening your browser to sign in to Topline at ${platformBaseUrl(opts)}. Choose Allow to load the Topline tools.`);
|
|
145
|
+
await interactiveSignIn({
|
|
146
|
+
...opts,
|
|
147
|
+
quietOpenFailure: true,
|
|
148
|
+
openUrl: async (url) => {
|
|
149
|
+
// Printed every time: with no browser (SSH, a container) this is the only way to finish.
|
|
150
|
+
log(`If it does not open, visit this address:\n${url}`);
|
|
151
|
+
await (opts.openUrl ? opts.openUrl(url) : openBrowser({ ...opts, openUrl: undefined, quietOpenFailure: true }, url));
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
finally {
|
|
156
|
+
await rm(startupSignInLockFile(opts.authFile), { force: true }).catch(() => undefined);
|
|
157
|
+
}
|
|
158
|
+
await onSignedIn().catch(() => undefined);
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
catch (err) {
|
|
162
|
+
log(`Topline sign-in did not finish (${err instanceof Error ? err.message : "unknown error"}). The first Topline tool will ask again.`);
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function startupSignInLockFile(authFile) {
|
|
167
|
+
return `${path.resolve(authFile)}.signin-lock`;
|
|
168
|
+
}
|
|
169
|
+
/** True when this process may run the startup sign-in; a lock younger than the 5-minute sign-in window means another one is. */
|
|
170
|
+
async function takeStartupSignInLock(authFile) {
|
|
171
|
+
const lock = startupSignInLockFile(authFile);
|
|
172
|
+
await mkdir(path.dirname(lock), { recursive: true });
|
|
173
|
+
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
174
|
+
try {
|
|
175
|
+
await writeFile(lock, `${process.pid}\n`, { flag: "wx", mode: 0o600 });
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
const age = Date.now() - ((await lstat(lock).catch(() => null))?.mtimeMs ?? 0);
|
|
180
|
+
if (age < 6 * 60 * 1000)
|
|
181
|
+
return false;
|
|
182
|
+
await rm(lock, { force: true }).catch(() => undefined);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
// One browser sign-in per auth file at a time: the startup sign-in and a tool
|
|
188
|
+
// call that needs a token share it instead of opening two approvals.
|
|
189
|
+
const inFlightSignIns = new Map();
|
|
190
|
+
async function interactiveSignIn(opts) {
|
|
191
|
+
const key = path.resolve(opts.authFile);
|
|
192
|
+
const pending = inFlightSignIns.get(key);
|
|
193
|
+
if (pending)
|
|
194
|
+
return pending;
|
|
195
|
+
const started = (async () => {
|
|
196
|
+
const credentials = await runOAuthLogin(opts);
|
|
197
|
+
await writeStoredOAuthCredentials(opts, credentials);
|
|
198
|
+
return credentials;
|
|
199
|
+
})();
|
|
200
|
+
inFlightSignIns.set(key, started);
|
|
201
|
+
try {
|
|
202
|
+
return await started;
|
|
203
|
+
}
|
|
204
|
+
finally {
|
|
205
|
+
inFlightSignIns.delete(key);
|
|
206
|
+
}
|
|
120
207
|
}
|
|
121
208
|
/**
|
|
122
209
|
* `topline-mcp login`: sign in once during setup so the assistant's next chat
|
|
@@ -491,8 +578,13 @@ export async function deployArtifactApp(opts, input, onProgress) {
|
|
|
491
578
|
if (input.artifactId !== undefined && input.artifactId !== sessionArtifactId)
|
|
492
579
|
throw new Error("build_session_artifact_mismatch");
|
|
493
580
|
}
|
|
494
|
-
else
|
|
495
|
-
|
|
581
|
+
else {
|
|
582
|
+
const sessionOnly = Object.entries({ artifactVersionId: sessionVersion, idempotencyKey, inspectedSourceHash, platformAppDir: suppliedPlatformAppDir })
|
|
583
|
+
.filter(([, value]) => value).map(([field]) => field);
|
|
584
|
+
// Name the fields so the caller can drop them for a plain deploy or start a session.
|
|
585
|
+
if (sessionOnly.length)
|
|
586
|
+
throw new Error(`build_session_id_required:${sessionOnly.join(",")}`);
|
|
587
|
+
}
|
|
496
588
|
await onProgress?.(0.4, "Creating private artifact draft");
|
|
497
589
|
const created = await fetchJson(opts, artifactAppsPath(opts), {
|
|
498
590
|
method: "POST",
|
|
@@ -1672,9 +1764,9 @@ const BUILD_MCP_TOOLS = [
|
|
|
1672
1764
|
},
|
|
1673
1765
|
{
|
|
1674
1766
|
name: "platform_run_artifact_smoke",
|
|
1675
|
-
description: "Rerun the trusted draft smoke check and return fresh rendered-page evidence.",
|
|
1767
|
+
description: "Rerun the trusted draft smoke check and return fresh rendered-page evidence. While you hold an open build session on the app, pass its sessionId.",
|
|
1676
1768
|
annotations: mcpToolAnnotations("platform_run_artifact_smoke", { readOnly: false, openWorld: true }),
|
|
1677
|
-
inputSchema: { type: "object", properties: { artifactId: { type: "string", format: "uuid" }, deploymentRecordId: { type: "string", format: "uuid" } }, required: ["artifactId"], additionalProperties: false },
|
|
1769
|
+
inputSchema: { type: "object", properties: { artifactId: { type: "string", format: "uuid" }, deploymentRecordId: { type: "string", format: "uuid" }, sessionId: { type: "string", format: "uuid" } }, required: ["artifactId"], additionalProperties: false },
|
|
1678
1770
|
outputSchema: { type: "object", properties: { ok: { type: "boolean" }, phase: { type: "string" }, artifactId: { type: "string" }, deploymentRecordId: { type: "string" }, smoke: { type: "object" }, validation: { type: "object" } }, required: ["ok", "phase", "artifactId", "deploymentRecordId", "smoke", "validation"] }
|
|
1679
1771
|
},
|
|
1680
1772
|
{
|
|
@@ -1832,7 +1924,9 @@ const BUILD_MCP_RECOVERY_ERROR_VALUES = {
|
|
|
1832
1924
|
build_session_tool_unavailable: { retryable: false, recoveryAction: "The connection's hosted Build tool list does not offer this build session tool, so the package does not list or run it. Call platform_capability_status to see what is missing, such as a scope or capability, and reconnect through browser sign-in with any missing scope. The package asks the host to list tools again, so the tool comes back once Topline offers it." },
|
|
1833
1925
|
authorization_required: { retryable: false, recoveryAction: "Clear only this connection's cached OAuth credentials, then reconnect the Build MCP through browser sign-in. If using a manual bearer token, replace the expired or revoked token. Recover existing artifact/deployment progress before retrying a write." },
|
|
1834
1926
|
platform_harness_timeout: { retryable: true, recoveryAction: "Retry the call. For a deployment, use platform_list_artifact_drafts to recover the artifact and platform_wait_artifact_deploy to resume progress." },
|
|
1835
|
-
platform_mcp_tool_error: { retryable: false, recoveryAction: "
|
|
1927
|
+
platform_mcp_tool_error: { retryable: false, recoveryAction: "Topline refused the call without a code. Read the message, correct the request, then retry. Reconnect only when the message names a missing scope." },
|
|
1928
|
+
build_session_id_required: { retryable: false, recoveryAction: "The fields named after the code only work inside a build session. Remove them for a plain deploy of an app you created over MCP, or start a session and pass its sessionId." },
|
|
1929
|
+
artifact_external_session_active: { retryable: false, recoveryAction: "An open build session holds this app. If it is yours, pass its sessionId; otherwise close it with platform_close_build_session or wait for it to end." },
|
|
1836
1930
|
artifact_deploy_wait_timeout: { retryable: true, recoveryAction: "Call platform_wait_artifact_deploy again with the same artifactId and operationId." },
|
|
1837
1931
|
artifact_delete_plan_stale: { retryable: true, recoveryAction: "Call platform_plan_artifact_draft_delete again, review the new effects, and use its planToken." },
|
|
1838
1932
|
artifact_app_bundle_changed_after_inspection: { retryable: true, recoveryAction: "Call platform_inspect_artifact_app again, review the new bundle hash, then retry deployment with that hash." },
|
|
@@ -1855,9 +1949,32 @@ function structuredToolError(message) {
|
|
|
1855
1949
|
isError: true
|
|
1856
1950
|
};
|
|
1857
1951
|
}
|
|
1952
|
+
/** The code Topline put inside a wrapped tool error: JSON `{ error: { code } }`, `{ error: "code" }`, or a leading code token. */
|
|
1953
|
+
function hostedToolErrorCode(inner) {
|
|
1954
|
+
try {
|
|
1955
|
+
const parsed = JSON.parse(inner);
|
|
1956
|
+
if (isRecord(parsed)) {
|
|
1957
|
+
const error = parsed.error;
|
|
1958
|
+
const code = isRecord(error) ? error.code : typeof error === "string" ? error : parsed.code;
|
|
1959
|
+
if (typeof code === "string" && /^[a-z][a-z0-9_]{2,}$/.test(code))
|
|
1960
|
+
return code;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
catch {
|
|
1964
|
+
// Not JSON; fall back to a leading code token.
|
|
1965
|
+
}
|
|
1966
|
+
// Only a code-shaped token (it has an underscore): plain English such as
|
|
1967
|
+
// "missing scope ..." or "not found" is a message, not a code.
|
|
1968
|
+
return inner.match(/^([a-z][a-z0-9]*_[a-z0-9_]+)(?::|$|\s)/)?.[1] ?? null;
|
|
1969
|
+
}
|
|
1858
1970
|
function recoveryErrorCode(message) {
|
|
1859
1971
|
if (/^platform_harness_http_error:401(?::|$)/.test(message))
|
|
1860
1972
|
return "authorization_required";
|
|
1973
|
+
if (message.startsWith("platform_mcp_tool_error:")) {
|
|
1974
|
+
const inner = hostedToolErrorCode(message.slice("platform_mcp_tool_error:".length).trim());
|
|
1975
|
+
if (inner && !["unknown_error", "tool_failed", "empty_response"].includes(inner))
|
|
1976
|
+
return inner === "mcp_tool_failed" ? "platform_mcp_tool_error" : inner;
|
|
1977
|
+
}
|
|
1861
1978
|
if (DOMAIN_ERROR_CODES.has(message) || message === "domain_result_unknown")
|
|
1862
1979
|
return message;
|
|
1863
1980
|
const known = [
|
|
@@ -1866,8 +1983,9 @@ function recoveryErrorCode(message) {
|
|
|
1866
1983
|
"artifact_app_scaffold_target_not_empty",
|
|
1867
1984
|
"artifact_app_scaffold_shape_invalid",
|
|
1868
1985
|
"platform_harness_timeout",
|
|
1869
|
-
|
|
1870
|
-
"scope_required"
|
|
1986
|
+
// Before the generic wrapper, which every hosted error message starts with.
|
|
1987
|
+
"scope_required",
|
|
1988
|
+
"platform_mcp_tool_error"
|
|
1871
1989
|
].find((candidate) => message.includes(candidate));
|
|
1872
1990
|
if (known)
|
|
1873
1991
|
return known;
|
|
@@ -1973,8 +2091,7 @@ async function getOAuthBearerToken(opts) {
|
|
|
1973
2091
|
// Fall through to an interactive login; the stored refresh token may have been revoked.
|
|
1974
2092
|
}
|
|
1975
2093
|
}
|
|
1976
|
-
const loggedIn = await
|
|
1977
|
-
await writeStoredOAuthCredentials(opts, loggedIn);
|
|
2094
|
+
const loggedIn = await interactiveSignIn(opts);
|
|
1978
2095
|
return loggedIn.accessToken;
|
|
1979
2096
|
}
|
|
1980
2097
|
async function refreshOAuthToken(opts, stored) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": {
|
|
4
4
|
"name": "@topline-build/harness-mcp",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.2",
|
|
6
6
|
"bin": {
|
|
7
7
|
"topline-mcp": "dist/cli.js"
|
|
8
8
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"defaultVersion": "2025-11-25",
|
|
13
13
|
"server": {
|
|
14
14
|
"name": "topline-build-stdio",
|
|
15
|
-
"version": "0.9.
|
|
15
|
+
"version": "0.9.2"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"generatedFrom": {
|
|
@@ -350,7 +350,17 @@
|
|
|
350
350
|
{
|
|
351
351
|
"code": "platform_mcp_tool_error",
|
|
352
352
|
"retryable": false,
|
|
353
|
-
"recoveryAction": "
|
|
353
|
+
"recoveryAction": "Topline refused the call without a code. Read the message, correct the request, then retry. Reconnect only when the message names a missing scope."
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"code": "build_session_id_required",
|
|
357
|
+
"retryable": false,
|
|
358
|
+
"recoveryAction": "The fields named after the code only work inside a build session. Remove them for a plain deploy of an app you created over MCP, or start a session and pass its sessionId."
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"code": "artifact_external_session_active",
|
|
362
|
+
"retryable": false,
|
|
363
|
+
"recoveryAction": "An open build session holds this app. If it is yours, pass its sessionId; otherwise close it with platform_close_build_session or wait for it to end."
|
|
354
364
|
},
|
|
355
365
|
{
|
|
356
366
|
"code": "artifact_deploy_wait_timeout",
|
|
@@ -2514,7 +2524,7 @@
|
|
|
2514
2524
|
},
|
|
2515
2525
|
{
|
|
2516
2526
|
"name": "platform_run_artifact_smoke",
|
|
2517
|
-
"description": "Rerun the trusted draft smoke check and return fresh rendered-page evidence.",
|
|
2527
|
+
"description": "Rerun the trusted draft smoke check and return fresh rendered-page evidence. While you hold an open build session on the app, pass its sessionId.",
|
|
2518
2528
|
"annotations": {
|
|
2519
2529
|
"title": "Platform Run Artifact Smoke",
|
|
2520
2530
|
"readOnlyHint": false,
|
|
@@ -2531,6 +2541,10 @@
|
|
|
2531
2541
|
"deploymentRecordId": {
|
|
2532
2542
|
"type": "string",
|
|
2533
2543
|
"format": "uuid"
|
|
2544
|
+
},
|
|
2545
|
+
"sessionId": {
|
|
2546
|
+
"type": "string",
|
|
2547
|
+
"format": "uuid"
|
|
2534
2548
|
}
|
|
2535
2549
|
},
|
|
2536
2550
|
"required": [
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Generated from `src/index.ts#BUILD_MCP_TOOLS`. Do not edit this file by hand.
|
|
4
4
|
|
|
5
|
-
Package: `@topline-build/harness-mcp@0.9.
|
|
5
|
+
Package: `@topline-build/harness-mcp@0.9.2`
|
|
6
6
|
Transport: `stdio`
|
|
7
7
|
Default protocol: `2025-11-25`
|
|
8
8
|
Canonical guide: https://topline.build/docs/build-mcp-guide
|
|
@@ -67,7 +67,9 @@ Tool failures set `isError: true` and return `structuredContent.error` with `cod
|
|
|
67
67
|
- `domain_result_unknown` (not automatically retryable): The response did not establish an outcome. Recover the original receipt through platform_get_artifact_address (saved artifactId and apply key) or platform_read_artifact_domains (request/verify kind and key). Preserve the original plan/domain/input/key; an absent, pending or expired receipt does not authorize a fresh key. No mutation is replayed automatically.
|
|
68
68
|
- `build_session_tool_unavailable` (not automatically retryable): The connection's hosted Build tool list does not offer this build session tool, so the package does not list or run it. Call platform_capability_status to see what is missing, such as a scope or capability, and reconnect through browser sign-in with any missing scope. The package asks the host to list tools again, so the tool comes back once Topline offers it.
|
|
69
69
|
- `platform_harness_timeout` (retryable): Retry the call. For a deployment, use platform_list_artifact_drafts to recover the artifact and platform_wait_artifact_deploy to resume progress.
|
|
70
|
-
- `platform_mcp_tool_error` (not automatically retryable):
|
|
70
|
+
- `platform_mcp_tool_error` (not automatically retryable): Topline refused the call without a code. Read the message, correct the request, then retry. Reconnect only when the message names a missing scope.
|
|
71
|
+
- `build_session_id_required` (not automatically retryable): The fields named after the code only work inside a build session. Remove them for a plain deploy of an app you created over MCP, or start a session and pass its sessionId.
|
|
72
|
+
- `artifact_external_session_active` (not automatically retryable): An open build session holds this app. If it is yours, pass its sessionId; otherwise close it with platform_close_build_session or wait for it to end.
|
|
71
73
|
- `artifact_deploy_wait_timeout` (retryable): Call platform_wait_artifact_deploy again with the same artifactId and operationId.
|
|
72
74
|
- `artifact_delete_plan_stale` (retryable): Call platform_plan_artifact_draft_delete again, review the new effects, and use its planToken.
|
|
73
75
|
- `artifact_app_bundle_changed_after_inspection` (retryable): Call platform_inspect_artifact_app again, review the new bundle hash, then retry deployment with that hash.
|
|
@@ -2410,7 +2412,7 @@ Output schema:
|
|
|
2410
2412
|
|
|
2411
2413
|
### `platform_run_artifact_smoke`
|
|
2412
2414
|
|
|
2413
|
-
Rerun the trusted draft smoke check and return fresh rendered-page evidence.
|
|
2415
|
+
Rerun the trusted draft smoke check and return fresh rendered-page evidence. While you hold an open build session on the app, pass its sessionId.
|
|
2414
2416
|
|
|
2415
2417
|
Safety: read-only=false, destructive=false, idempotent=false, open-world=true.
|
|
2416
2418
|
|
|
@@ -2448,6 +2450,10 @@ Input schema:
|
|
|
2448
2450
|
"deploymentRecordId": {
|
|
2449
2451
|
"type": "string",
|
|
2450
2452
|
"format": "uuid"
|
|
2453
|
+
},
|
|
2454
|
+
"sessionId": {
|
|
2455
|
+
"type": "string",
|
|
2456
|
+
"format": "uuid"
|
|
2451
2457
|
}
|
|
2452
2458
|
},
|
|
2453
2459
|
"required": [
|