@subseam/mcp 0.3.1 → 0.3.3

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 (3) hide show
  1. package/README.md +1 -1
  2. package/dist/main.js +54 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -17,7 +17,7 @@ The script runs `npm install @subseam/mcp@<version>` in the host directory and p
17
17
  The equivalent by hand:
18
18
 
19
19
  ```
20
- npm install @subseam/mcp@0.3.1
20
+ npm install @subseam/mcp@0.3.3
21
21
  claude mcp add-json --scope user subseam '{"command":"node","args":["<dir>/node_modules/@subseam/mcp/dist/main.js"],"env":{"SUBSEAM_URL":"https://api.example.subseam.com","SUBSEAM_TENANT":"<your tenant id>"}}'
22
22
  ```
23
23
 
package/dist/main.js CHANGED
@@ -20170,6 +20170,9 @@ init_esm_shims();
20170
20170
  init_esm_shims();
20171
20171
  var VERIFY_ANALYSES = ["coverage-residue", "mutation", "witness"];
20172
20172
 
20173
+ // ../verify-contract/src/request/scratch-headers.ts
20174
+ init_esm_shims();
20175
+
20173
20176
  // ../verify-contract/src/result/verdict.ts
20174
20177
  init_esm_shims();
20175
20178
 
@@ -20238,7 +20241,8 @@ var ROOT_SCRIPTS = [
20238
20241
  "test:extract-prod-compose",
20239
20242
  "test:backend",
20240
20243
  "test:control",
20241
- "test:oracle"
20244
+ "test:oracle",
20245
+ "test:oracle-exhaustive"
20242
20246
  ];
20243
20247
 
20244
20248
  // ../execution-contract/src/workload/scoping.ts
@@ -20565,7 +20569,8 @@ var VERIFY_ROOT_SCRIPTS = [
20565
20569
  "test:extract-prod-compose",
20566
20570
  "test:backend",
20567
20571
  "test:control",
20568
- "test:oracle"
20572
+ "test:oracle",
20573
+ "test:oracle-exhaustive"
20569
20574
  ];
20570
20575
 
20571
20576
  // ../verify-contract/src/job/artifact.ts
@@ -20628,6 +20633,10 @@ init_esm_shims();
20628
20633
  // ../verify/src/delta/pushed-head.ts
20629
20634
  init_esm_shims();
20630
20635
 
20636
+ // ../verify/src/delta/walk-lag.ts
20637
+ init_esm_shims();
20638
+ var SCRATCH_BODY_LIMIT_BYTES = 64 * 1024 * 1024;
20639
+
20631
20640
  // ../verify/src/service/gateway-verify.ts
20632
20641
  init_esm_shims();
20633
20642
 
@@ -36306,8 +36315,11 @@ var BuildRequestSchema = external_exports.discriminatedUnion("op", [
36306
36315
  op: external_exports.literal("config"),
36307
36316
  workspaceId: external_exports.string().uuid(),
36308
36317
  set: external_exports.object({
36309
- landCommand: external_exports.array(external_exports.string()).min(1),
36310
- landingShape: external_exports.enum(["direct-push", "pr"]).optional()
36318
+ landCommand: external_exports.array(external_exports.string()).min(1).optional(),
36319
+ landingShape: external_exports.enum(["direct-push", "pr"]).optional(),
36320
+ /** Whether Secure is on for this repo. Every `set` field is optional and an absent one is left
36321
+ * as it stands, so enabling Secure never touches the gate; a `set` naming nothing is refused. */
36322
+ secure: external_exports.object({ enabled: external_exports.boolean() }).optional()
36311
36323
  }).optional()
36312
36324
  })
36313
36325
  ]).readonly();
@@ -36556,6 +36568,9 @@ var BuildResultSchema = external_exports.union([
36556
36568
  /** Which shape this repo's lands take. Null ONLY when the repo has no config row at all — the
36557
36569
  * same absence `landCommand` reports null for. A repo that has a row always has a shape. */
36558
36570
  landingShape: external_exports.enum(["direct-push", "pr"]).nullable(),
36571
+ /** Whether Secure is on for this repo. Not nullable: no config row means Secure is off, which is
36572
+ * an answer, not an absence — the repair miner scans nothing either way. */
36573
+ secure: external_exports.object({ enabled: external_exports.boolean() }),
36559
36574
  verification: external_exports.object({
36560
36575
  declaredScopeSupported: external_exports.boolean(),
36561
36576
  scopePatternForms: external_exports.array(external_exports.string())
@@ -43118,6 +43133,20 @@ var coerce = {
43118
43133
  };
43119
43134
  var NEVER2 = INVALID;
43120
43135
 
43136
+ // src/discovery-failure.ts
43137
+ init_esm_shims();
43138
+ var DISCOVERY_FAILURE_TOOL = "subseam_unavailable";
43139
+ function discoveryFailureText(url2, reason) {
43140
+ return `subseam is unavailable this session: capability discovery failed, so no subseam tools are mounted. Tried GET ${url2.replace(/\/$/, "")}/capabilities \u2014 ${reason}. Check SUBSEAM_URL is your subseam API URL and that it is reachable, then restart the MCP server.`;
43141
+ }
43142
+ function mountDiscoveryFailure(server, url2, reason) {
43143
+ const text = discoveryFailureText(url2, reason);
43144
+ server.registerTool(DISCOVERY_FAILURE_TOOL, { description: text, inputSchema: {} }, () => ({
43145
+ content: [{ type: "text", text }],
43146
+ isError: true
43147
+ }));
43148
+ }
43149
+
43121
43150
  // src/gateway.ts
43122
43151
  init_esm_shims();
43123
43152
  var TENANT_HEADER2 = "x-tenant-id";
@@ -45043,9 +45072,11 @@ Land ${inFlight.landedCommit} is pushed and awaiting the walk. Do NOT push again
45043
45072
  case "config": {
45044
45073
  const gate = r.landCommand === null ? "Land gate: NONE configured for this repo \u2014 a land cannot be authorized until one is set." : `Land gate: ${r.landCommand.join(" ")}`;
45045
45074
  const shape = r.landingShape === null ? "Landing shape: none configured (this repo has no config row)." : r.landingShape === "pr" ? "Landing shape: pr \u2014 a land pushes the verified commit to its own branch and opens a pull request. It lands when that PR is merged." : "Landing shape: direct-push \u2014 a land fast-forwards the verified commit straight onto the default branch.";
45075
+ const secure = r.secure.enabled ? "Secure: on \u2014 this repo's landed commits are scanned, and the taint findings they remove are kept." : "Secure: off \u2014 this repo is not scanned. Turn it on with set: { secure: { enabled: true } }.";
45046
45076
  const scope = r.verification.declaredScopeSupported ? `Declared run scope: supported. Pattern forms: ${r.verification.scopePatternForms.join(", ")}.` : "Declared run scope: not supported by this server.";
45047
45077
  return `${gate}
45048
45078
  ${shape}
45079
+ ${secure}
45049
45080
  ${scope}`;
45050
45081
  }
45051
45082
  case "run":
@@ -45238,19 +45269,24 @@ var buildLandsTool = {
45238
45269
  };
45239
45270
  var configTool = {
45240
45271
  name: "config",
45241
- description: "Read \u2014 or set \u2014 the hosted workspace repo's land gate, plus this server's verification affordances. Called bare it is read-only: returns the landCommand your land will be held to (null when the repo has no land config), plus whether `run` accepts a declared `scope` and which pattern forms it takes. Pass `set: { landCommand: [...] }` to configure the gate for this workspace's REPO \u2014 that is what the land refusal means by \"configure the repo's landCommand\", and it is repo-scoped, so a re-set replaces the gate rather than adding one. The gate still lives server-side and a land is still held to whatever this table says; setting it names the command, it does not let a land name its own. Pass `set: { landCommand: [...], landingShape: \"pr\" }` to also choose HOW this repo lands: `direct-push` (the default) fast-forwards the verified commit onto the default branch; `pr` pushes it to a branch of its own and opens a pull request, so the change lands when that PR is merged. landingShape is optional and OMITTING IT LEAVES THE SHAPE UNCHANGED \u2014 setting a gate command never silently reverts a review-configured repo to a direct push. Either form answers with the config that now holds.",
45272
+ description: "Read \u2014 or set \u2014 the hosted workspace repo's land gate, plus this server's verification affordances. Called bare it is read-only: returns the landCommand your land will be held to (null when the repo has no land config), plus whether `run` accepts a declared `scope` and which pattern forms it takes. Pass `set: { landCommand: [...] }` to configure the gate for this workspace's REPO \u2014 that is what the land refusal means by \"configure the repo's landCommand\", and it is repo-scoped, so a re-set replaces the gate rather than adding one. The gate still lives server-side and a land is still held to whatever this table says; setting it names the command, it does not let a land name its own. Pass `set: { landCommand: [...], landingShape: \"pr\" }` to also choose HOW this repo lands: `direct-push` (the default) fast-forwards the verified commit onto the default branch; `pr` pushes it to a branch of its own and opens a pull request, so the change lands when that PR is merged. landingShape is optional and OMITTING IT LEAVES THE SHAPE UNCHANGED \u2014 setting a gate command never silently reverts a review-configured repo to a direct push. Pass `set: { secure: { enabled: true } }` to turn Secure on for this repo \u2014 that is what makes the repair miner scan the commits this repo lands; a repo without it is never scanned. Every `set` field is optional and an absent one is left exactly as it stands, so enabling Secure never touches the gate and setting a gate never turns Secure off. Every form answers with the config that now holds.",
45242
45273
  capability: "build",
45243
45274
  inputSchema: {
45244
45275
  workspaceId: workspaceIdArg,
45245
45276
  set: external_exports2.object({
45246
- landCommand: external_exports2.array(external_exports2.string()).min(1),
45247
- landingShape: external_exports2.enum(["direct-push", "pr"]).optional()
45277
+ landCommand: external_exports2.array(external_exports2.string()).min(1).optional(),
45278
+ landingShape: external_exports2.enum(["direct-push", "pr"]).optional(),
45279
+ secure: external_exports2.object({ enabled: external_exports2.boolean() }).optional()
45248
45280
  }).optional()
45249
45281
  },
45250
45282
  handler: async (input8, ctx) => invoke(ctx, {
45251
45283
  op: "config",
45252
45284
  workspaceId: resolveWorkspaceId(input8.workspaceId, ctx),
45253
- ...input8.set !== void 0 ? { set: { landCommand: input8.set.landCommand, ...input8.set.landingShape !== void 0 ? { landingShape: input8.set.landingShape } : {} } } : {}
45285
+ ...input8.set !== void 0 ? { set: {
45286
+ ...input8.set.landCommand !== void 0 ? { landCommand: input8.set.landCommand } : {},
45287
+ ...input8.set.landingShape !== void 0 ? { landingShape: input8.set.landingShape } : {},
45288
+ ...input8.set.secure !== void 0 ? { secure: input8.set.secure } : {}
45289
+ } } : {}
45254
45290
  })
45255
45291
  };
45256
45292
  var buildTools = [
@@ -45382,6 +45418,11 @@ init_esm_shims();
45382
45418
  // ../secure/src/taint/trust/python.ts
45383
45419
  init_esm_shims();
45384
45420
 
45421
+ // ../secure/src/scanner.ts
45422
+ init_esm_shims();
45423
+ var SECURE_SCANNER_VERSION = 1;
45424
+ var SECURE_ORACLE_VERSION = `secure-taint/${SECURE_SCANNER_VERSION}`;
45425
+
45385
45426
  // ../inference/src/index.ts
45386
45427
  init_esm_shims();
45387
45428
 
@@ -45687,7 +45728,7 @@ var workTools = createPullToolProviders({ capability: "work" });
45687
45728
  var bundledProviders = [src_default2, src_default, tension_default, ...defineTools, ...decisionTools, ...captureTools, ...buildTools, secureTool, ...workTools];
45688
45729
 
45689
45730
  // package.json
45690
- var version2 = "0.3.1";
45731
+ var version2 = "0.3.3";
45691
45732
 
45692
45733
  // src/server.ts
45693
45734
  var SERVER_VERSION = version2;
@@ -45700,10 +45741,13 @@ async function createServer(config3, cwd, initialWorkspaceId) {
45700
45741
  try {
45701
45742
  enabled = await fetchEnabledCapabilities(config3);
45702
45743
  } catch (err2) {
45744
+ const reason = err2 instanceof Error ? err2.message : String(err2);
45703
45745
  process.stderr.write(
45704
- `subseam-mcp: capability discovery failed; mounting no tools this session. ${err2 instanceof Error ? err2.message : String(err2)}
45746
+ `subseam-mcp: capability discovery failed; mounting no product tools this session, only ${DISCOVERY_FAILURE_TOOL} reporting the failure. ${reason}
45705
45747
  `
45706
45748
  );
45749
+ mountDiscoveryFailure(server, config3.url, reason);
45750
+ return server;
45707
45751
  }
45708
45752
  const providers = bundledProviders.map((p, i) => assertToolProvider(p, `bundled provider [${i}]`));
45709
45753
  const ctx = { cwd, tenantId: config3.tenantId, gateway: createGatewayClient(config3), enabledCapabilities: enabled, workspace: createWorkspaceBinding(initialWorkspaceId) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subseam/mcp",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {