@superblocksteam/gateway 2.0.175-next.0 → 2.0.176

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 (65) hide show
  1. package/README.md +18 -43
  2. package/dist/capabilities/lifecycle.d.ts +0 -1
  3. package/dist/capabilities/lifecycle.d.ts.map +1 -1
  4. package/dist/capabilities/lifecycle.js +6 -10
  5. package/dist/capabilities/lifecycle.js.map +1 -1
  6. package/dist/config.d.ts +0 -6
  7. package/dist/config.d.ts.map +1 -1
  8. package/dist/config.js +0 -1
  9. package/dist/config.js.map +1 -1
  10. package/dist/deps.d.ts +3 -3
  11. package/dist/integrations/filters.d.ts.map +1 -1
  12. package/dist/integrations/filters.js +16 -1
  13. package/dist/integrations/filters.js.map +1 -1
  14. package/dist/preview/capture-screenshot.d.ts.map +1 -1
  15. package/dist/preview/capture-screenshot.js +1 -1
  16. package/dist/preview/capture-screenshot.js.map +1 -1
  17. package/dist/sabs/app-state.d.ts +0 -2
  18. package/dist/sabs/app-state.d.ts.map +1 -1
  19. package/dist/sabs/app-state.js +0 -5
  20. package/dist/sabs/app-state.js.map +1 -1
  21. package/dist/sabs/editor-client-methods.js +1 -1
  22. package/dist/sabs/editor-client-methods.js.map +1 -1
  23. package/dist/sabs/session-peer.d.ts +0 -7
  24. package/dist/sabs/session-peer.d.ts.map +1 -1
  25. package/dist/sabs/websocket-session-peer.d.ts +0 -1
  26. package/dist/sabs/websocket-session-peer.d.ts.map +1 -1
  27. package/dist/sabs/websocket-session-peer.js +0 -5
  28. package/dist/sabs/websocket-session-peer.js.map +1 -1
  29. package/dist/server/client.d.ts +0 -9
  30. package/dist/server/client.d.ts.map +1 -1
  31. package/dist/server/client.js +0 -9
  32. package/dist/server/client.js.map +1 -1
  33. package/dist/start.d.ts +1 -5
  34. package/dist/start.d.ts.map +1 -1
  35. package/dist/start.js +9 -22
  36. package/dist/start.js.map +1 -1
  37. package/dist/telemetry/metrics.d.ts +0 -3
  38. package/dist/telemetry/metrics.d.ts.map +1 -1
  39. package/dist/telemetry/metrics.js +0 -11
  40. package/dist/telemetry/metrics.js.map +1 -1
  41. package/dist/telemetry/runtime.d.ts +1 -2
  42. package/dist/telemetry/runtime.d.ts.map +1 -1
  43. package/dist/telemetry/runtime.js +5 -12
  44. package/dist/telemetry/runtime.js.map +1 -1
  45. package/dist/transports/mcp/admin-tools.d.ts +7 -3
  46. package/dist/transports/mcp/admin-tools.d.ts.map +1 -1
  47. package/dist/transports/mcp/admin-tools.js +51 -5
  48. package/dist/transports/mcp/admin-tools.js.map +1 -1
  49. package/dist/transports/mcp/mount.d.ts +13 -2
  50. package/dist/transports/mcp/mount.d.ts.map +1 -1
  51. package/dist/transports/mcp/mount.js +38 -73
  52. package/dist/transports/mcp/mount.js.map +1 -1
  53. package/package.json +19 -22
  54. package/dist/http/main.d.ts +0 -3
  55. package/dist/http/main.d.ts.map +0 -1
  56. package/dist/http/main.js +0 -8
  57. package/dist/http/main.js.map +0 -1
  58. package/dist/http/serve.d.ts +0 -26
  59. package/dist/http/serve.d.ts.map +0 -1
  60. package/dist/http/serve.js +0 -255
  61. package/dist/http/serve.js.map +0 -1
  62. package/dist/telemetry/mcp-usage.d.ts +0 -22
  63. package/dist/telemetry/mcp-usage.d.ts.map +0 -1
  64. package/dist/telemetry/mcp-usage.js +0 -102
  65. package/dist/telemetry/mcp-usage.js.map +0 -1
package/README.md CHANGED
@@ -135,20 +135,20 @@ Restart the MCP host after `setup` and after every rebuild below.
135
135
 
136
136
  ### Rebuild after source changes
137
137
 
138
- Cursor MCP goes through oclif `dist/index.js`, which loads
139
- `@superblocksteam/gateway` and `@superblocksteam/shared` from their own `dist/`.
140
- Rebuild the package you changed.
138
+ Cursor MCP still goes through oclif `dist/index.js`. CLI esbuild inlines
139
+ `@superblocksteam/gateway`, so a Gateway `tsc` alone does not update the
140
+ process the host spawns.
141
141
 
142
142
  | You changed | Rebuild |
143
143
  | --------------------------------------------------------------- | ---------------------------------------------- |
144
144
  | `packages/shared` (types Gateway imports, e.g. SocketHeartbeat) | `pnpm --filter @superblocksteam/shared build` |
145
145
  | `packages/gateway/src` | `pnpm --filter @superblocksteam/gateway build` |
146
- | CLI serve wiring (`packages/cli/packages/cli/src`) | `pnpm --filter @superblocksteam/cli build` |
146
+ | Gateway, CLI serve wiring, or anything oclif esbuild inlines | `pnpm --filter @superblocksteam/cli build` |
147
147
 
148
- A typical Gateway capture change is shared (if types moved), then Gateway.
149
- Then restart Cursor.
148
+ A typical Gateway capture change is shared (if types moved), then Gateway,
149
+ then CLI. Then restart Cursor.
150
150
 
151
- Proof the new build is live: Gateway stderr logs
151
+ Proof the new bundle is live: Gateway stderr logs
152
152
  `gateway live canvas capture uses libraryBrowserContext (testingEnabled does not gate it)`
153
153
  at boot. A crash that `@superblocksteam/shared` does not export
154
154
  `SocketHeartbeat` means shared `dist/` is stale.
@@ -335,42 +335,17 @@ exports over OTLP through the authenticated Server `/api/v1/metrics` proxy
335
335
  (same path and policy as traces). `service.name=gateway` and
336
336
  `deployment.environment.name` ride on the SDK resource, not on each data point.
337
337
 
338
- | Metric | Labels |
339
- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
340
- | `gateway.identity.read.outcomes` | `gateway.outcome`: `cached`, `resolved`, `refused`, `credential_error`, `breaker_open`, `caller_timeout`, `outage` |
341
- | `gateway.server.read_retry.outcomes` | `gateway.server.read_retry.outcome`, `gateway.server.read_retry.cause`, `gateway.server.read_retry.operation` |
342
- | `gateway.clark.facts_flag_bootstrap.outcomes` | `gateway.clark.facts_flag_bootstrap.outcome`: `enabled`, `disabled`, `invalid` |
343
- | `gateway.integration_profile.resolutions` | `gateway.profile.source`, `gateway.profile.reason`, `gateway.profile.scope` |
344
- | `gateway.mcp.tool_calls` | `tool.name`, `tool.status`, `mcp.client.name` |
345
- | `gateway.mcp.tool_call_duration_seconds` | same as `gateway.mcp.tool_calls` |
346
- | `gateway.mcp.usage_delivery` | `gateway.mcp.usage_delivery.outcome`: `accepted`, `failed`; `gateway.mcp.usage_delivery.reason`: bounded delivery reason |
347
- | `gateway.mcp.usage_delivery.attempts` | none; counted before dispatch, independently of delivery settlement |
348
- | `gateway.checkpoint.outcomes` | `gateway.checkpoint.outcome` |
349
- | `gateway.process.faults` | `gateway.fault.kind`, `gateway.fault.fatal` |
350
- | `gateway.readiness.verdicts` | `gateway.readiness.probe`, `gateway.readiness.ready`, `gateway.readiness.dispatch`, `gateway.readiness.upstream` |
351
-
352
- Usage delivery reasons are `none` for accepted events, or `authentication`,
353
- `http_error`, `invalid_request`, `network`, `rate_limited`, `server_error`,
354
- `timeout`, `unknown`, and `unsupported` for failures. Activity ingestion shares
355
- the Server's authenticated per-user API allowance of 120 requests per minute
356
- per process; each tool operation sends two events. A confirmed plan refusal
357
- has activity outcome `not_entitled` and is excluded from warehouse adoption.
358
- Started and finished events can arrive in either order; the warehouse pairs
359
- them by authenticated principal and operation ID.
360
-
361
- The attempts counter includes deliveries still in flight; compare it with the
362
- accepted and failed counts over the same interval in a long-lived process.
363
- All these counters require telemetry export. Abrupt process exit can lose
364
- both an activity event and its counters, so this is not an end-to-end loss
365
- rate or a durable delivery guarantee.
366
-
367
- Schema rejections use the Server's existing request warning with bounded
368
- `builder.mcp.validation.issues` field/code pairs. It inherits authenticated
369
- request context; rejected values and unknown field names are omitted. Each
370
- phase is sent once with no automatic retry, and the Server quota also applies
371
- to invalid activity. Deploy the Server schema before gateways that send new
372
- outcomes; the delivery counter classifies skew as `invalid_request` or
373
- `unsupported`.
338
+ | Metric | Labels |
339
+ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
340
+ | `gateway.identity.read.outcomes` | `gateway.outcome`: `cached`, `resolved`, `refused`, `credential_error`, `breaker_open`, `caller_timeout`, `outage` |
341
+ | `gateway.server.read_retry.outcomes` | `gateway.server.read_retry.outcome`, `gateway.server.read_retry.cause`, `gateway.server.read_retry.operation` |
342
+ | `gateway.clark.facts_flag_bootstrap.outcomes` | `gateway.clark.facts_flag_bootstrap.outcome`: `enabled`, `disabled`, `invalid` |
343
+ | `gateway.integration_profile.resolutions` | `gateway.profile.source`, `gateway.profile.reason`, `gateway.profile.scope` |
344
+ | `gateway.mcp.tool_calls` | `tool.name`, `tool.status`, `mcp.client.name` |
345
+ | `gateway.mcp.tool_call_duration_seconds` | same as `gateway.mcp.tool_calls` |
346
+ | `gateway.checkpoint.outcomes` | `gateway.checkpoint.outcome` |
347
+ | `gateway.process.faults` | `gateway.fault.kind`, `gateway.fault.fatal` |
348
+ | `gateway.readiness.verdicts` | `gateway.readiness.probe`, `gateway.readiness.ready`, `gateway.readiness.dispatch`, `gateway.readiness.upstream` |
374
349
 
375
350
  Locally, the Server forwards the proxy to the OTel collector on `:4318`. The
376
351
  workspace `just up` (any profile) starts the LGTM stack from
@@ -10,7 +10,6 @@ import type { LiveStateAttaches } from "./live-state-attaches.js";
10
10
  import type { CapabilityResult, CheckAppProgressInput, CheckAppProgressResult, CheckPublishProgressInput, EditAppInput, EditAppResult, AskUserInput, AskUserResult, GetAppInput, GetAppResult, PreviewAppInput, PreviewAppResult, PreviewStatusInput, PreviewStatusResult, Principal, ProgressEvent, PublishAppInput, PublishAppResult, ResolvedPrincipal, StartAppInput, StartAppResult, UploadArtifactInput, UploadArtifactResult } from "./types.js";
11
11
  export { IMPORT_ZIP_MAX_BYTES } from "./types.js";
12
12
  export type CapabilityContext = {
13
- mcpClientName?: string;
14
13
  config: GatewayConfig;
15
14
  /** Injected so turn and stall thresholds are testable without real time. */
16
15
  now?: () => number;
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/capabilities/lifecycle.ts"],"names":[],"mappings":"AAWA,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIlD,OAA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,CAAC,KAAK,EAAE;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAsBpC;AAED,wBAAsB,UAAU,CAC9B,GAAG,EAAE,iBAAiB,EACtB,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAsB7C;AAyED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,iBAAiB,EACtB,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CA8N7C"}
@@ -766,7 +766,6 @@ function turnSummary(turn) {
766
766
  async function promptInput(ctx, input) {
767
767
  return {
768
768
  apiKey: ctx.principal.apiKey,
769
- mcpClientName: ctx.mcpClientName,
770
769
  applicationId: input.applicationId,
771
770
  ...(input.attachments ? { attachments: input.attachments } : {}),
772
771
  ...(input.branch ? { branch: input.branch } : {}),
@@ -1545,22 +1544,19 @@ function tooLargeError(size) {
1545
1544
  * out, so it accepts anything attachments support rather than archives alone.
1546
1545
  * The other two routes are text channels and stay archive-shaped.
1547
1546
  */
1548
- async function resolveImportArchive(input, config) {
1547
+ async function resolveImportArchive(input, searchDirs) {
1549
1548
  const hasFiles = Boolean(input.files?.length);
1550
- // Hosted, the disk is the microVM's own, never the user's files.
1551
- const hasPath = !config.hosted && Boolean(input.filePath?.trim());
1549
+ const hasPath = Boolean(input.filePath?.trim());
1552
1550
  const hasBase64 = Boolean(input.zipBase64?.trim());
1553
1551
  if (Number(hasFiles) + Number(hasPath) + Number(hasBase64) !== 1) {
1554
1552
  return {
1555
1553
  kind: "error",
1556
1554
  code: "import_zip_required",
1557
- message: config.hosted
1558
- ? "Provide exactly one of files or zipBase64."
1559
- : "Provide exactly one of files, filePath (a path or file name on the gateway host), or zipBase64.",
1555
+ message: "Provide exactly one of files, filePath (a path or file name on the gateway host), or zipBase64.",
1560
1556
  };
1561
1557
  }
1562
1558
  if (hasPath) {
1563
- return resolveFileByPath(input.filePath.trim(), config.importSearchDirs);
1559
+ return resolveFileByPath(input.filePath.trim(), searchDirs);
1564
1560
  }
1565
1561
  let bytes;
1566
1562
  if (hasFiles) {
@@ -1569,7 +1565,7 @@ async function resolveImportArchive(input, config) {
1569
1565
  return {
1570
1566
  kind: "error",
1571
1567
  code: "import_files_invalid",
1572
- message: `"${binaryFile.path}" is not a text file, and files entries are archived as the text they contain: base64 in there uploads as base64 characters wearing a "${path.extname(binaryFile.path)}" name. ${config.hosted ? "Put it in a ZIP and pass that as zipBase64 instead, so its real bytes are uploaded. A ZIP too large for zipBase64 cannot be uploaded on this connection yet." : "Pass filePath with the file's name instead, so the gateway reads its real bytes."}`,
1568
+ message: `"${binaryFile.path}" is not a text file, and files entries are archived as the text they contain: base64 in there uploads as base64 characters wearing a "${path.extname(binaryFile.path)}" name. Pass filePath with the file's name instead, so the gateway reads its real bytes.`,
1573
1569
  };
1574
1570
  }
1575
1571
  const archive = archiveSourceFiles(input.files);
@@ -1693,7 +1689,7 @@ export async function uploadArtifact(ctx, input) {
1693
1689
  if (principalResult.kind !== "ok") {
1694
1690
  return principalResult;
1695
1691
  }
1696
- const archiveResult = await resolveImportArchive(input, ctx.config);
1692
+ const archiveResult = await resolveImportArchive(input, ctx.config.importSearchDirs);
1697
1693
  if (archiveResult.kind !== "ok") {
1698
1694
  return archiveResult;
1699
1695
  }