@topline-build/harness-mcp 0.9.9 → 0.9.10

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 CHANGED
@@ -2,6 +2,13 @@
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.10 - 2026-11-08
6
+
7
+ - `platform_run_artifact_workspace_sql` takes `scope: "company"` to create and change company tables, matching the server. The Topline sign-in now asks for `harness:company:tables:write`, so your next launch asks you to approve it once.
8
+ - `platform_artifact_validation_status` accepts the optional `artifactVersionId` and `idempotencyKey` the server already takes.
9
+ - `artifact_version_conflict`'s recovery says that a build session always starts from the current version, and how to go back to older source.
10
+ - The viewer-scoped portal starter says it will filter rows once a dataset is connected, instead of saying it already does.
11
+
5
12
  ## 0.9.9 - 2026-11-02
6
13
 
7
14
  - Dashboard starters from `platform_init_artifact_app` no longer declare their `/_artifact/data/*` route as an app route or call it from the page. The platform serves those paths itself, and only once a dataset or source binding declares them, so the placeholder answered 404 and a fresh deploy's smoke check failed. The page now shows each data route as not connected until it is declared.
@@ -96,7 +96,7 @@ export const ARTIFACT_STARTERS = [
96
96
  {
97
97
  id: "viewer-scoped-customer-portal",
98
98
  kind: "dashboard",
99
- summary: "Read-only portal where each viewer sees only their own rows.",
99
+ summary: "Read-only portal starter: once you connect a dataset, each viewer will see only their own rows. Until then it shows no customer data.",
100
100
  routes: [{ path: "/_artifact/data/customers", note: "Placeholder for the viewer-scoped source binding." }],
101
101
  nextSteps: [
102
102
  "Add the recipe's viewer-scoped sourceBindings[] entry for a source you already have, then switch viewerPolicy to tenant.",
@@ -19,8 +19,9 @@ export function externalBuildHelperTools(annotate) {
19
19
  }, ["idempotencyKey", "budgetCents", "brief"]),
20
20
  tool("platform_read_build_session", "Read the owned build session and original pending operations. Does not start another coder or deployment.", session, ["sessionId"], true),
21
21
  tool("platform_close_build_session", "Stop new authoring and request pending-operation cancellation. Unknown effects retain their reservation; cancellation does not undo committed writes.", session, ["sessionId"]),
22
- tool("platform_run_artifact_workspace_sql", "Run guarded private artifact SQL using the exact session namespace, version and retry key. CREATE TABLE/ADD COLUMN require documentation. Enforced non-admin writes remain denied; unknown writes are never replayed.", {
23
- ...mutation, sql: { type: "string", minLength: 1, maxLength: 20000 }, purpose: { type: "string", minLength: 3, maxLength: 500 },
22
+ tool("platform_run_artifact_workspace_sql", "Run guarded SQL using the exact session, version and retry key. Without scope, or scope \"artifact\", it reads and writes this app's own build-checkpoint and cache tables. With scope \"company\", it creates, changes or drops a company table in company_data, or changes its rows, at once with no confirmation step; check the catalog before creating one, and declare tables an app uses in manifest tables[]. The company scope needs the harness:company:tables:write permission on your sign-in and the build session. CREATE TABLE/ADD COLUMN require documentation (company tables: a description and sensitivity for every column). Enforced non-admin writes remain denied; unknown writes are never replayed.", {
23
+ ...mutation, scope: { type: "string", enum: ["artifact", "company"] },
24
+ sql: { type: "string", minLength: 1, maxLength: 20000 }, purpose: { type: "string", minLength: 3, maxLength: 500 },
24
25
  params: { type: "object", additionalProperties: true }, maxRows: { type: "integer", minimum: 1, maximum: 5000 }, documentation: { type: "object" }, columnDocumentation: { type: "object" }
25
26
  }, [...Object.keys(mutation), "sql", "purpose"]),
26
27
  tool("platform_checkout_artifact_app", "Download exact saved app source through the owned session, verify archive hash/version/commit and extract regular source files into a new local directory. Missing source is never reconstructed.", {
@@ -48,7 +49,7 @@ export function externalBuildHelperTools(annotate) {
48
49
  docImpactNotes: { type: "string", minLength: 12, maxLength: 2000 }, visualReview: { type: "object", additionalProperties: true }, dataValidation: { type: "object", additionalProperties: true }
49
50
  }, [...Object.keys(deployed), "summary", "docImpact", "docImpactNotes", "visualReview"]),
50
51
  tool("platform_artifact_validation_status", "Read the original validation result and pending prompts without starting another reviewer or deploy. Current authorization is rechecked before evidence delivery.", {
51
- ...session, operationId: id
52
+ ...session, operationId: id, artifactVersionId: id, idempotencyKey: requestKey
52
53
  }, ["sessionId", "operationId"], true),
53
54
  tool("platform_answer_operator_prompt", "Answer the exact saved operator prompt on the original review operation. Appends guidance and reopens the same eligible session; cannot approve validation or widen the saved grant.", {
54
55
  ...session, operationId: id, promptId: id, idempotencyKey: requestKey, message: { type: "string", minLength: 3, maxLength: 4000 }
package/dist/index.d.ts CHANGED
@@ -42,7 +42,7 @@ type ToolProgressReporter = (progress: number, message: string) => void | Promis
42
42
  export type McpSurface = "build" | "topline" | "harness";
43
43
  export declare const DEFAULT_MCP_PROTOCOL_VERSION = "2025-11-25";
44
44
  export declare const BUILD_MCP_SERVER_NAME = "topline-build-stdio";
45
- export declare const HARNESS_MCP_VERSION = "0.9.9";
45
+ export declare const HARNESS_MCP_VERSION = "0.9.10";
46
46
  export declare const DEFAULT_OAUTH_SCOPES: readonly string[];
47
47
  /** The Topline server's scopes: Build and Workspace. Consent shows what the seat allows. */
48
48
  export declare const TOPLINE_OAUTH_SCOPES: readonly string[];
package/dist/index.js CHANGED
@@ -19,12 +19,12 @@ const MCP_SURFACES = ["build", "topline", "harness"];
19
19
  export const DEFAULT_MCP_PROTOCOL_VERSION = "2025-11-25";
20
20
  const DEFAULT_TIMEOUT_MS = 120_000;
21
21
  export const BUILD_MCP_SERVER_NAME = "topline-build-stdio";
22
- export const HARNESS_MCP_VERSION = "0.9.9";
22
+ export const HARNESS_MCP_VERSION = "0.9.10";
23
23
  export const DEFAULT_OAUTH_SCOPES = Object.freeze(["harness:artifact:read", "harness:artifact:write", "harness:artifact:deploy", "harness:artifact:delete"]);
24
24
  /** The Topline server's scopes: Build and Workspace. Consent shows what the seat allows. */
25
25
  export const TOPLINE_OAUTH_SCOPES = Object.freeze([
26
26
  "harness:artifact:read", "harness:artifact:write", "harness:artifact:deploy", "harness:artifact:delete",
27
- "harness:artifact:tables:write", "harness:artifact:validate", "harness:artifact:data:verify", "harness:assets:read",
27
+ "harness:artifact:tables:write", "harness:company:tables:write", "harness:artifact:validate", "harness:artifact:data:verify", "harness:assets:read",
28
28
  "harness:secrets:metadata:read", "harness:domains:read", "harness:domains:manage", "harness:artifact:addresses:write",
29
29
  "storyboard:read", "storyboard:write",
30
30
  "docs:read", "chat:read", "chat:write", "workspace:write", "workspace:delete", "workspace:content:read",
@@ -2376,7 +2376,7 @@ const BUILD_MCP_RECOVERY_ERROR_VALUES = {
2376
2376
  artifact_app_scaffold_starter_invalid: { retryable: false, recoveryAction: `Use one of the starters: ${ARTIFACT_STARTER_IDS.join(", ")}.` },
2377
2377
  artifact_app_scaffold_starter_shape_conflict: { retryable: false, recoveryAction: "A starter scaffolds the single shape; leave shape out or set it to single." },
2378
2378
  // Stale preconditions: the same input can never succeed, whatever HTTP status an older Topline sends.
2379
- artifact_version_conflict: { retryable: false, recoveryAction: "The session moved to a newer version. Read the session (platform_read_build_session). For a refused deploy: keep your local edits, run platform_inspect_artifact_app again, then deploy with the current artifactVersionId and the new inspectedSourceHash. For a refused validation request: don't deploy again. Wait for the current version's deploy to settle (platform_deploy_operation), run its checks and smoke, prepare it with platform_prepare_artifact_validation, then call platform_request_artifact_validation with that prepared evidence." },
2379
+ artifact_version_conflict: { retryable: false, recoveryAction: "The session moved to a newer version. Read the session (platform_read_build_session). A build session always starts from the app's current version; Build MCP can't check out an older saved version, so to go back, deploy source you saved before (or ask the coding agent in Topline to go back to version N). For a refused deploy: keep your local edits, run platform_inspect_artifact_app again, then deploy with the current artifactVersionId and the new inspectedSourceHash. For a refused validation request: don't deploy again. Wait for the current version's deploy to settle (platform_deploy_operation), run its checks and smoke, prepare it with platform_prepare_artifact_validation, then call platform_request_artifact_validation with that prepared evidence." },
2380
2380
  build_session_deployment_arguments_required: { retryable: false, recoveryAction: "Inside a build session a deploy needs artifactVersionId, idempotencyKey, and the inspectedSourceHash and expectedBundleSha256 that platform_inspect_artifact_app returned. The fields named after the code are missing; add them and call again." },
2381
2381
  artifact_source_conflict: { retryable: false, recoveryAction: "inspectedSourceHash no longer matches the session's source fence. Read the session for its current sourceHash (or check out again into a new directory), keep your local edits, inspect again, then deploy with the fresh hash." },
2382
2382
  artifact_operation_pending: { retryable: false, recoveryAction: "Another operation on this app has not settled. Read it with platform_deploy_operation (a deploy that already landed settles on that read), or platform_read_build_session, then call this tool again once it is terminal." },
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "package": {
4
4
  "name": "@topline-build/harness-mcp",
5
- "version": "0.9.9",
5
+ "version": "0.9.10",
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.9"
15
+ "version": "0.9.10"
16
16
  }
17
17
  },
18
18
  "generatedFrom": {
@@ -473,7 +473,7 @@
473
473
  {
474
474
  "code": "artifact_version_conflict",
475
475
  "retryable": false,
476
- "recoveryAction": "The session moved to a newer version. Read the session (platform_read_build_session). For a refused deploy: keep your local edits, run platform_inspect_artifact_app again, then deploy with the current artifactVersionId and the new inspectedSourceHash. For a refused validation request: don't deploy again. Wait for the current version's deploy to settle (platform_deploy_operation), run its checks and smoke, prepare it with platform_prepare_artifact_validation, then call platform_request_artifact_validation with that prepared evidence."
476
+ "recoveryAction": "The session moved to a newer version. Read the session (platform_read_build_session). A build session always starts from the app's current version; Build MCP can't check out an older saved version, so to go back, deploy source you saved before (or ask the coding agent in Topline to go back to version N). For a refused deploy: keep your local edits, run platform_inspect_artifact_app again, then deploy with the current artifactVersionId and the new inspectedSourceHash. For a refused validation request: don't deploy again. Wait for the current version's deploy to settle (platform_deploy_operation), run its checks and smoke, prepare it with platform_prepare_artifact_validation, then call platform_request_artifact_validation with that prepared evidence."
477
477
  },
478
478
  {
479
479
  "code": "build_session_deployment_arguments_required",
@@ -3554,7 +3554,7 @@
3554
3554
  },
3555
3555
  {
3556
3556
  "name": "platform_run_artifact_workspace_sql",
3557
- "description": "Run guarded private artifact SQL using the exact session namespace, version and retry key. CREATE TABLE/ADD COLUMN require documentation. Enforced non-admin writes remain denied; unknown writes are never replayed.",
3557
+ "description": "Run guarded SQL using the exact session, version and retry key. Without scope, or scope \"artifact\", it reads and writes this app's own build-checkpoint and cache tables. With scope \"company\", it creates, changes or drops a company table in company_data, or changes its rows, at once with no confirmation step; check the catalog before creating one, and declare tables an app uses in manifest tables[]. The company scope needs the harness:company:tables:write permission on your sign-in and the build session. CREATE TABLE/ADD COLUMN require documentation (company tables: a description and sensitivity for every column). Enforced non-admin writes remain denied; unknown writes are never replayed.",
3558
3558
  "annotations": {
3559
3559
  "title": "Platform Run Artifact Workspace Sql",
3560
3560
  "readOnlyHint": false,
@@ -3580,6 +3580,13 @@
3580
3580
  "maxLength": 128,
3581
3581
  "pattern": "^[A-Za-z0-9._:-]+$"
3582
3582
  },
3583
+ "scope": {
3584
+ "type": "string",
3585
+ "enum": [
3586
+ "artifact",
3587
+ "company"
3588
+ ]
3589
+ },
3583
3590
  "sql": {
3584
3591
  "type": "string",
3585
3592
  "minLength": 1,
@@ -4747,6 +4754,16 @@
4747
4754
  "operationId": {
4748
4755
  "type": "string",
4749
4756
  "format": "uuid"
4757
+ },
4758
+ "artifactVersionId": {
4759
+ "type": "string",
4760
+ "format": "uuid"
4761
+ },
4762
+ "idempotencyKey": {
4763
+ "type": "string",
4764
+ "minLength": 1,
4765
+ "maxLength": 128,
4766
+ "pattern": "^[A-Za-z0-9._:-]+$"
4750
4767
  }
4751
4768
  },
4752
4769
  "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.9`
5
+ Package: `@topline-build/harness-mcp@0.9.10`
6
6
  Transport: `stdio`
7
7
  Default protocol: `2025-11-25`
8
8
  Canonical guide: https://topline.build/docs/build-mcp-guide
@@ -91,7 +91,7 @@ Tool failures set `isError: true` and return `structuredContent.error` with `cod
91
91
  - `artifact_app_scaffold_shape_invalid` (not automatically retryable): Use shape single or web-and-api.
92
92
  - `artifact_app_scaffold_starter_invalid` (not automatically retryable): Use one of the starters: bounded-bedrock-assistant, cache-warmed-multi-source-dashboard, internal-action-tool, live-operations-dashboard, materialized-sql-data-product, precomputed-s3-report, private-api-first-app, viewer-scoped-customer-portal.
93
93
  - `artifact_app_scaffold_starter_shape_conflict` (not automatically retryable): A starter scaffolds the single shape; leave shape out or set it to single.
94
- - `artifact_version_conflict` (not automatically retryable): The session moved to a newer version. Read the session (platform_read_build_session). For a refused deploy: keep your local edits, run platform_inspect_artifact_app again, then deploy with the current artifactVersionId and the new inspectedSourceHash. For a refused validation request: don't deploy again. Wait for the current version's deploy to settle (platform_deploy_operation), run its checks and smoke, prepare it with platform_prepare_artifact_validation, then call platform_request_artifact_validation with that prepared evidence.
94
+ - `artifact_version_conflict` (not automatically retryable): The session moved to a newer version. Read the session (platform_read_build_session). A build session always starts from the app's current version; Build MCP can't check out an older saved version, so to go back, deploy source you saved before (or ask the coding agent in Topline to go back to version N). For a refused deploy: keep your local edits, run platform_inspect_artifact_app again, then deploy with the current artifactVersionId and the new inspectedSourceHash. For a refused validation request: don't deploy again. Wait for the current version's deploy to settle (platform_deploy_operation), run its checks and smoke, prepare it with platform_prepare_artifact_validation, then call platform_request_artifact_validation with that prepared evidence.
95
95
  - `build_session_deployment_arguments_required` (not automatically retryable): Inside a build session a deploy needs artifactVersionId, idempotencyKey, and the inspectedSourceHash and expectedBundleSha256 that platform_inspect_artifact_app returned. The fields named after the code are missing; add them and call again.
96
96
  - `artifact_source_conflict` (not automatically retryable): inspectedSourceHash no longer matches the session's source fence. Read the session for its current sourceHash (or check out again into a new directory), keep your local edits, inspect again, then deploy with the fresh hash.
97
97
  - `artifact_operation_pending` (not automatically retryable): Another operation on this app has not settled. Read it with platform_deploy_operation (a deploy that already landed settles on that read), or platform_read_build_session, then call this tool again once it is terminal.
@@ -3458,7 +3458,7 @@ Output schema:
3458
3458
 
3459
3459
  ### `platform_run_artifact_workspace_sql`
3460
3460
 
3461
- Run guarded private artifact SQL using the exact session namespace, version and retry key. CREATE TABLE/ADD COLUMN require documentation. Enforced non-admin writes remain denied; unknown writes are never replayed.
3461
+ Run guarded SQL using the exact session, version and retry key. Without scope, or scope "artifact", it reads and writes this app's own build-checkpoint and cache tables. With scope "company", it creates, changes or drops a company table in company_data, or changes its rows, at once with no confirmation step; check the catalog before creating one, and declare tables an app uses in manifest tables[]. The company scope needs the harness:company:tables:write permission on your sign-in and the build session. CREATE TABLE/ADD COLUMN require documentation (company tables: a description and sensitivity for every column). Enforced non-admin writes remain denied; unknown writes are never replayed.
3462
3462
 
3463
3463
  Safety: read-only=false, destructive=false, idempotent=true, open-world=true.
3464
3464
 
@@ -3501,6 +3501,13 @@ Input schema:
3501
3501
  "maxLength": 128,
3502
3502
  "pattern": "^[A-Za-z0-9._:-]+$"
3503
3503
  },
3504
+ "scope": {
3505
+ "type": "string",
3506
+ "enum": [
3507
+ "artifact",
3508
+ "company"
3509
+ ]
3510
+ },
3504
3511
  "sql": {
3505
3512
  "type": "string",
3506
3513
  "minLength": 1,
@@ -4786,6 +4793,16 @@ Input schema:
4786
4793
  "operationId": {
4787
4794
  "type": "string",
4788
4795
  "format": "uuid"
4796
+ },
4797
+ "artifactVersionId": {
4798
+ "type": "string",
4799
+ "format": "uuid"
4800
+ },
4801
+ "idempotencyKey": {
4802
+ "type": "string",
4803
+ "minLength": 1,
4804
+ "maxLength": 128,
4805
+ "pattern": "^[A-Za-z0-9._:-]+$"
4789
4806
  }
4790
4807
  },
4791
4808
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topline-build/harness-mcp",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "description": "Topline Build MCP for creating and deploying artifact app drafts.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",