@superblocksteam/gateway 2.0.0-SNAPSHOT.cdb7085d31b464f3 → 2.0.0-SNAPSHOT.eb2b4fee8d75a1b5
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 +136 -54
- package/dist/capabilities/lifecycle.d.ts +9 -1
- package/dist/capabilities/lifecycle.js +60 -91
- package/dist/capabilities/lifecycle.js.map +1 -1
- package/dist/capture/mode.js +2 -2
- package/dist/capture/mode.js.map +1 -1
- package/dist/deps.d.ts +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js.map +1 -1
- package/dist/orchestrator/client.d.ts +2 -1
- package/dist/orchestrator/client.js +4 -2
- package/dist/orchestrator/client.js.map +1 -1
- package/dist/playwright/ensure-chromium.d.ts +3 -2
- package/dist/playwright/ensure-chromium.js +6 -5
- package/dist/playwright/ensure-chromium.js.map +1 -1
- package/dist/sabs/agent-facing-text.js +18 -4
- package/dist/sabs/agent-facing-text.js.map +1 -1
- package/dist/sabs/app-state.d.ts +1 -1
- package/dist/sabs/app-state.js +2 -2
- package/dist/sabs/app-state.js.map +1 -1
- package/dist/sabs/awaited-decision.d.ts +2 -0
- package/dist/sabs/awaited-decision.js +6 -1
- package/dist/sabs/awaited-decision.js.map +1 -1
- package/dist/sabs/editor-client-methods.d.ts +2 -0
- package/dist/sabs/editor-client-methods.js +8 -2
- package/dist/sabs/editor-client-methods.js.map +1 -1
- package/dist/sabs/session-peer.d.ts +5 -1
- package/dist/sabs/streamed-reply.d.ts +3 -0
- package/dist/sabs/streamed-reply.js +15 -0
- package/dist/sabs/streamed-reply.js.map +1 -1
- package/dist/sabs/turn-collector.d.ts +1 -0
- package/dist/sabs/turn-collector.js +24 -5
- package/dist/sabs/turn-collector.js.map +1 -1
- package/dist/sabs/websocket-session-peer.d.ts +5 -1
- package/dist/sabs/websocket-session-peer.js +19 -9
- package/dist/sabs/websocket-session-peer.js.map +1 -1
- package/dist/server/client.d.ts +2 -0
- package/dist/server/client.js +5 -3
- package/dist/server/client.js.map +1 -1
- package/dist/start.d.ts +5 -2
- package/dist/start.js +18 -6
- package/dist/start.js.map +1 -1
- package/dist/stores/memory.d.ts +8 -4
- package/dist/stores/memory.js +45 -3
- package/dist/stores/memory.js.map +1 -1
- package/dist/stores/types.d.ts +23 -5
- package/dist/stores/types.js.map +1 -1
- package/dist/telemetry/runtime.d.ts +1 -0
- package/dist/telemetry/runtime.js +4 -1
- package/dist/telemetry/runtime.js.map +1 -1
- package/dist/transports/mcp/admin-tools.d.ts +7 -0
- package/dist/transports/mcp/admin-tools.js +86 -10
- package/dist/transports/mcp/admin-tools.js.map +1 -1
- package/dist/transports/mcp/app-status-html.d.ts +2 -2
- package/dist/transports/mcp/app-status-html.js +4 -1
- package/dist/transports/mcp/app-status-html.js.map +1 -1
- package/dist/transports/mcp/cowork-editor-url.d.ts +6 -0
- package/dist/transports/mcp/cowork-editor-url.js +10 -0
- package/dist/transports/mcp/cowork-editor-url.js.map +1 -0
- package/dist/transports/mcp/decision-card-html.d.ts +2 -2
- package/dist/transports/mcp/decision-card-html.js +2 -2
- package/dist/transports/mcp/editor-integration-setup-url.d.ts +14 -0
- package/dist/transports/mcp/editor-integration-setup-url.js +29 -0
- package/dist/transports/mcp/editor-integration-setup-url.js.map +1 -0
- package/dist/transports/mcp/format-tool-content.js +35 -2
- package/dist/transports/mcp/format-tool-content.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/check-app-progress.js +1 -2
- package/dist/transports/mcp/instructions/tools/check-app-progress.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/check-publish-progress.d.ts +2 -1
- package/dist/transports/mcp/instructions/tools/check-publish-progress.js +10 -1
- package/dist/transports/mcp/instructions/tools/check-publish-progress.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/copy.d.ts +5 -0
- package/dist/transports/mcp/instructions/tools/copy.js +16 -1
- package/dist/transports/mcp/instructions/tools/copy.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/create-integration.d.ts +1 -0
- package/dist/transports/mcp/instructions/tools/create-integration.js +15 -6
- package/dist/transports/mcp/instructions/tools/create-integration.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/publish-app.d.ts +2 -1
- package/dist/transports/mcp/instructions/tools/publish-app.js +15 -3
- package/dist/transports/mcp/instructions/tools/publish-app.js.map +1 -1
- package/dist/transports/mcp/mount.d.ts +2 -3
- package/dist/transports/mcp/mount.js +151 -36
- package/dist/transports/mcp/mount.js.map +1 -1
- package/dist/transports/mcp/plan-approval.d.ts +7 -1
- package/dist/transports/mcp/plan-approval.js +7 -3
- package/dist/transports/mcp/plan-approval.js.map +1 -1
- package/dist/transports/mcp/tool-names.d.ts +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
# Gateway v0
|
|
2
2
|
|
|
3
3
|
Standalone Superblocks entry point for a **single MCP connector** (Admin + Builder)
|
|
4
|
-
over **stdio**, running as the
|
|
4
|
+
over **stdio**, running as the Superblocks user authenticated through browser
|
|
5
|
+
login or a personal API key.
|
|
5
6
|
|
|
6
7
|
Builder tools (`upload_artifact`, `start_app`, `edit_app`,
|
|
7
8
|
`check_app_progress`, `ask_user`, `get_app`, `get_integration_metadata`,
|
|
8
|
-
`
|
|
9
|
+
`preview_app`, `publish_app`) plus customer Admin tools from
|
|
9
10
|
`@superblocksteam/mcp-server` share this process.
|
|
10
11
|
|
|
11
12
|
The MCP host owns process lifecycle: it spawns `superblocks mcp serve`. The
|
|
12
13
|
unified Gateway has no foreground HTTP `/mcp`, no OAuth resource server, and no
|
|
13
|
-
linked-grant exchange.
|
|
14
|
-
|
|
14
|
+
linked-grant exchange. Browser login uses authorization code + PKCE to obtain
|
|
15
|
+
Server-audience access tokens. Personal API keys remain supported through
|
|
16
|
+
`SUPERBLOCKS_API_TOKEN` or the CLI session (`~/.superblocks/auth.json` /
|
|
17
|
+
`SUPERBLOCKS_AUTH_FILE` / `just worktree auth`).
|
|
15
18
|
|
|
16
19
|
Scope notes:
|
|
17
20
|
|
|
18
21
|
- In-memory stores only; no Redis (ENG-5594).
|
|
19
|
-
-
|
|
22
|
+
- One authenticated user per process. Linked MCP grants, static `GATEWAY_DEV_SUPERBLOCKS_API_KEY`,
|
|
20
23
|
and on-behalf-of exchange are not supported.
|
|
21
24
|
- Missing Playwright Chromium does not block start (ENG-5796). Screenshots fail
|
|
22
25
|
closed when Chromium is absent.
|
|
@@ -32,22 +35,35 @@ Add the Superblocks marketplace and install the plugin from inside Claude Code:
|
|
|
32
35
|
/plugin install superblocks@superblocks
|
|
33
36
|
```
|
|
34
37
|
|
|
35
|
-
The plugin includes Gateway and the `superblocks-import` skill.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
The plugin includes Gateway and the `superblocks-import` skill. Enter your
|
|
39
|
+
Superblocks instance URL and leave the API token blank to sign in through your
|
|
40
|
+
browser automatically. No terminal login is required. A supplied personal API
|
|
41
|
+
key takes precedence and skips browser login. The desktop-local plugin starts
|
|
42
|
+
`mcp serve --browser-login`, reuses a saved browser session when possible, and
|
|
43
|
+
opens the browser when sign-in is needed. Your instance must have browser login
|
|
44
|
+
configured as described below. The npm-backed plugin requires Node.js 24 or newer
|
|
45
|
+
and npm 10 or newer.
|
|
39
46
|
|
|
40
47
|
## Claude Cowork plugin
|
|
41
48
|
|
|
42
|
-
For
|
|
49
|
+
For desktop or cloud Cowork sessions:
|
|
43
50
|
|
|
44
|
-
1.
|
|
51
|
+
1. The session running the plugin needs Node.js 24 or newer and npm 10 or newer.
|
|
45
52
|
2. Download [the Cowork plugin](https://unpkg.com/@superblocksteam/cli@beta/dist/superblocks.plugin).
|
|
46
53
|
3. Open `Customize > Plugins`, choose upload, and select the plugin file.
|
|
47
|
-
4. Enter
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
4. Enter your Superblocks instance URL and leave the API token blank. Ask Claude
|
|
55
|
+
to connect to Superblocks, then open the sign-in link it shows you and confirm
|
|
56
|
+
the displayed code. Return to Claude after approving. No terminal login is required.
|
|
57
|
+
Alternatively, supply a personal API key to skip browser sign-in.
|
|
58
|
+
|
|
59
|
+
The archive starts `mcp serve --device-login` through an exact public CLI version.
|
|
60
|
+
Its `authenticate` tool returns a browser verification link and code while the
|
|
61
|
+
plugin polls Auth0 in the background. After approval, the same running Gateway
|
|
62
|
+
uses the session; no loopback callback or terminal command is needed. Only the
|
|
63
|
+
link, code, expiration, and status reach Claude, never access or refresh tokens.
|
|
64
|
+
Sessions are stored under `${CLAUDE_PLUGIN_DATA}` and reused while that data persists.
|
|
65
|
+
Device sign-in requires the Auth0 native client device-code grant and API offline
|
|
66
|
+
access. Organization-bound Auth0 deployments are not supported by this flow.
|
|
51
67
|
|
|
52
68
|
### Organization-managed rollout
|
|
53
69
|
|
|
@@ -70,14 +86,14 @@ archive in a test marketplace before relying on it.
|
|
|
70
86
|
|
|
71
87
|
Superblocks supplies the archive and Gateway runtime. Claude organization Owners
|
|
72
88
|
control marketplace distribution and installation policy. Each member supplies
|
|
73
|
-
their Superblocks credentials;
|
|
74
|
-
permission to run
|
|
89
|
+
their Superblocks credentials; the session still needs Node.js, npm, and
|
|
90
|
+
permission to run the plugin's MCP server. See [Anthropic's organization plugin guide](https://support.claude.com/en/articles/13837433-manage-plugins-for-your-organization).
|
|
75
91
|
|
|
76
92
|
## Internal review
|
|
77
93
|
|
|
78
94
|
```bash
|
|
79
|
-
#
|
|
80
|
-
superblocks login
|
|
95
|
+
# Sign in through the browser for this Server origin
|
|
96
|
+
superblocks mcp login --server-url https://app.superblocks.com
|
|
81
97
|
|
|
82
98
|
# Write a stdio MCP entry into the client config
|
|
83
99
|
superblocks mcp setup --client claude
|
|
@@ -97,11 +113,11 @@ Published `bin/run.js` is the MCP `command` (its `node` shebang applies).
|
|
|
97
113
|
Worktree `bin/dev.js` is launched with `tsx` and without `--watch`: the
|
|
98
114
|
dev shebang is a file-watcher, which would kill stdio on source edits and
|
|
99
115
|
corrupt JSON-RPC on stdout. When `SUPERBLOCKS_AUTH_FILE` is set (worktree
|
|
100
|
-
auth), it is copied into the MCP `env` block. Gateway derives
|
|
101
|
-
|
|
116
|
+
auth), it is copied into the MCP `env` block. Gateway derives control plane and
|
|
117
|
+
remote UI URLs from the selected browser or personal-key session.
|
|
102
118
|
|
|
103
|
-
`mcp setup` downloads Playwright Chromium for
|
|
104
|
-
|
|
119
|
+
Optional: `mcp setup --with-screenshots` downloads Playwright Chromium for
|
|
120
|
+
preview captures. Omit it; MCP setup still succeeds.
|
|
105
121
|
|
|
106
122
|
## Local run
|
|
107
123
|
|
|
@@ -117,13 +133,15 @@ Against a remote Superblocks domain (EE / SaaS IR):
|
|
|
117
133
|
|
|
118
134
|
```bash
|
|
119
135
|
cd packages/cli/packages/cli
|
|
120
|
-
./bin/dev.js
|
|
121
|
-
./bin/dev.js login
|
|
136
|
+
./bin/dev.js mcp login --server-url https://<host>
|
|
122
137
|
./bin/dev.js mcp setup --client claude
|
|
123
138
|
```
|
|
124
139
|
|
|
125
140
|
Against a local control plane, start the stack first (`just up <worktree>`),
|
|
126
|
-
then
|
|
141
|
+
then use its Server origin with `mcp login --server-url <origin>` and run
|
|
142
|
+
`mcp setup`. Browser login requires the Server/Auth0 setup below. Existing
|
|
143
|
+
`superblocks login` and worktree personal keys still work when browser login
|
|
144
|
+
is not configured.
|
|
127
145
|
|
|
128
146
|
The standalone `superblocks-mcp` Admin-only server is deprecated; prefer
|
|
129
147
|
`superblocks mcp setup`.
|
|
@@ -135,8 +153,7 @@ Log in and run setup from the worktree CLI (not a globally installed `superblock
|
|
|
135
153
|
|
|
136
154
|
```bash
|
|
137
155
|
cd packages/cli/packages/cli
|
|
138
|
-
./bin/dev.js
|
|
139
|
-
./bin/dev.js login
|
|
156
|
+
./bin/dev.js mcp login --server-url https://<host>
|
|
140
157
|
./bin/dev.js mcp setup --client cursor
|
|
141
158
|
# or: --client claude
|
|
142
159
|
```
|
|
@@ -165,7 +182,8 @@ for Cursor, `~/.claude.json` for Claude Code):
|
|
|
165
182
|
`command` is `tsx` without `--watch`: the `bin/dev.js` shebang is a file
|
|
166
183
|
watcher, which would kill stdio on source edits and corrupt JSON-RPC on
|
|
167
184
|
stdout. `env` only copies the worktree CLI session path
|
|
168
|
-
(`SUPERBLOCKS_AUTH_FILE`). Gateway reads
|
|
185
|
+
(`SUPERBLOCKS_AUTH_FILE`). Gateway reads the selected browser session from the
|
|
186
|
+
adjacent `.mcp-oauth` file, or `superblocksBaseUrl` from the personal-key file.
|
|
169
187
|
Do not add `SUPERBLOCKS_GATEWAY_FROM_SOURCE`.
|
|
170
188
|
Optional stderr tees (`2>> ~/.cursor/superblocks-gateway.err`) are host
|
|
171
189
|
specific; `setup` does not write them.
|
|
@@ -194,12 +212,85 @@ at boot. A crash that `@superblocksteam/shared` does not export
|
|
|
194
212
|
|
|
195
213
|
## Authentication
|
|
196
214
|
|
|
197
|
-
|
|
198
|
-
the
|
|
199
|
-
|
|
215
|
+
Desktop-local Claude Code plugins launch `mcp serve --browser-login` automatically. Leave
|
|
216
|
+
the plugin's API token blank to use browser sign-in. Other MCP hosts can opt in
|
|
217
|
+
by adding `--browser-login` to their launch arguments, or sign in explicitly
|
|
218
|
+
before setup:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
superblocks mcp login --server-url https://app.superblocks.com
|
|
222
|
+
superblocks mcp setup --client claude
|
|
223
|
+
# Restart the MCP host after setup.
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
The CLI reads public configuration from `GET /api/v1/mcp/oauth/config`, opens
|
|
227
|
+
the system browser, and receives an authorization code at
|
|
228
|
+
`http://127.0.0.1:8485/callback`. It exchanges that code with S256 PKCE and
|
|
229
|
+
requests `openid profile email offline_access`. Gateway uses the resulting
|
|
230
|
+
Server-audience access token directly; it does not retrieve a personal API key.
|
|
231
|
+
The MCP connection stays on stdio. The callback port is used only during login.
|
|
232
|
+
|
|
233
|
+
Credential selection, in order:
|
|
234
|
+
|
|
235
|
+
1. Nonblank `SUPERBLOCKS_API_TOKEN` (including a plugin-supplied personal key).
|
|
236
|
+
2. Saved browser login, provided it matches an explicit `SUPERBLOCKS_SERVER_URL`
|
|
237
|
+
or, when that is unset, `SUPERBLOCKS_BASE_URL`.
|
|
238
|
+
3. With `--device-login`, offer sign-in through `authenticate`. With
|
|
239
|
+
`--browser-login`, open browser sign-in. Without either flag, use the existing
|
|
240
|
+
CLI personal-key session.
|
|
241
|
+
|
|
242
|
+
With `--browser-login`, an unusable matching browser session starts a new browser
|
|
243
|
+
sign-in; without the flag, it reports an error instead of silently changing
|
|
244
|
+
identity. Signing in manually or running `superblocks mcp logout` requires
|
|
245
|
+
restarting the MCP host. Logout clears the local browser session only; it does
|
|
246
|
+
not clear the legacy CLI personal key, log out the browser, or revoke Auth0
|
|
247
|
+
credentials.
|
|
248
|
+
|
|
249
|
+
Browser credentials are stored at `~/.superblocks/auth.json.mcp-oauth`, or
|
|
250
|
+
`${SUPERBLOCKS_AUTH_FILE}.mcp-oauth` when the worktree override is set. The file
|
|
251
|
+
contains access and refresh tokens and is written atomically with owner-only
|
|
252
|
+
`0600` permissions; newly created parent directories use `0700`. A file lock
|
|
253
|
+
coordinates refresh-token rotation across Gateway processes. A persistent random
|
|
254
|
+
session ID keeps plan approvals and native-browser presence shared across those
|
|
255
|
+
processes when the access token changes. A new login gets a new session ID.
|
|
256
|
+
|
|
257
|
+
Server calls, Admin tools, orchestrator requests, and telemetry obtain the current
|
|
258
|
+
credential before sending authenticated requests. New screenshots and Clark
|
|
259
|
+
browser contexts receive the current credential as well. An already-running
|
|
260
|
+
isolated browser holds a snapshot and cannot renew that token during its run;
|
|
261
|
+
browser actions can fail if it expires before the run finishes. Existing scoped
|
|
262
|
+
JWTs for live edit, previews, and integration execution retain their own lifetimes.
|
|
263
|
+
|
|
264
|
+
### Server and Auth0 setup
|
|
265
|
+
|
|
266
|
+
Configure each environment before enabling browser login:
|
|
267
|
+
|
|
268
|
+
1. Create a dedicated first-party native Auth0 application with
|
|
269
|
+
`token_endpoint_auth_method: none`, the `authorization_code` and `refresh_token`
|
|
270
|
+
grants, and callback `http://127.0.0.1:8485/callback`. No client secret belongs
|
|
271
|
+
in the CLI or plugin. Enable rotating refresh tokens with expiration.
|
|
272
|
+
For Cowork, also enable `urn:ietf:params:oauth:grant-type:device_code`.
|
|
273
|
+
Device sign-in does not support organization-bound deployments.
|
|
274
|
+
2. Enable offline access on the Server API audience (normally
|
|
275
|
+
`https://superblocks/api`) and enable the sign-in connections this application
|
|
276
|
+
needs. Keep the existing connections' client assignments when adding it.
|
|
277
|
+
3. Set Server's `SUPERBLOCKS_SERVER_AUTH_NATIVE_CLIENT_ID` to the new client ID.
|
|
278
|
+
`SUPERBLOCKS_SERVER_AUTH_ISSUER_URL` and `SUPERBLOCKS_SERVER_AUTH_AUDIENCE` must
|
|
279
|
+
identify that environment's issuer and Server API. Cloud-Prem configuration
|
|
280
|
+
also includes `SUPERBLOCKS_CLOUD_PREM_AUTH0_ORG_ID` when configured.
|
|
281
|
+
|
|
282
|
+
The public configuration route returns only the issuer, audience, native client
|
|
283
|
+
ID, and optional organization ID, wrapped in `data`. It returns HTTP 503 when
|
|
284
|
+
browser login is not configured. The system browser must be able to reach the
|
|
285
|
+
loopback callback in the environment running the desktop plugin or `mcp login`;
|
|
286
|
+
logging in on the host does not authenticate a separate VM or container
|
|
287
|
+
filesystem.
|
|
200
288
|
|
|
201
289
|
## Cloud-Prem laptop agent
|
|
202
290
|
|
|
291
|
+
On-prem deployments with signing enabled still require a personal API key.
|
|
292
|
+
Their signing RPCs do not accept identity-provider access tokens.
|
|
293
|
+
|
|
203
294
|
Set `GATEWAY_LOCAL_AGENT=true` for a single-user corp laptop process. Stores are
|
|
204
295
|
always in-memory; suspended turns and progress cursors do not survive a restart.
|
|
205
296
|
`SUPERBLOCKS_SERVER_URL` (or `GATEWAY_SERVER_URL`) points at the in-VPC control
|
|
@@ -212,7 +303,7 @@ package only the customer Admin surface. Builder tools are not registered.
|
|
|
212
303
|
|
|
213
304
|
After `mcp setup`, restart Claude Code or Cursor and call `upload_artifact`,
|
|
214
305
|
`start_app`, `edit_app`, `check_app_progress`, `ask_user`, `get_app`,
|
|
215
|
-
`get_integration_metadata`, `
|
|
306
|
+
`get_integration_metadata`, `preview_app`, and `publish_app`.
|
|
216
307
|
|
|
217
308
|
`upload_artifact` accepts any file the gateway can read through `filePath` -
|
|
218
309
|
an archive, an image, a PDF, or a log - or source the MCP client is writing out
|
|
@@ -244,30 +335,21 @@ build permission on that integration and `integration_not_supported` for a
|
|
|
244
335
|
plugin Clark cannot use as a tool.
|
|
245
336
|
`get_integration_config_schema` is the create-integration form, not live data.
|
|
246
337
|
|
|
247
|
-
`query_integration` answers one-off data questions directly without creating an
|
|
248
|
-
application or persistent API. It accepts one parser-constrained PostgreSQL
|
|
249
|
-
`SELECT`, read-only CTE, `SHOW`, or `EXPLAIN` statement and returns a sanitized,
|
|
250
|
-
bounded result. PostgreSQL functions are limited to `count`, `sum`, `avg`,
|
|
251
|
-
`min`, and `max`; explicit casts, all other functions, and all mutation, schema,
|
|
252
|
-
session, and row-locking statements are rejected before execution. The
|
|
253
|
-
operation uses the same integration-level build permission and scoped token as
|
|
254
|
-
metadata reads and has a 30-second execution ceiling within the host-call
|
|
255
|
-
deadline.
|
|
256
|
-
|
|
257
338
|
## Env
|
|
258
339
|
|
|
259
340
|
See `.env.example`. Stores are in-memory only. Identity comes from the CLI
|
|
260
|
-
session
|
|
261
|
-
|
|
262
|
-
| Variable | Purpose
|
|
263
|
-
| ---------------------------- |
|
|
264
|
-
| `
|
|
265
|
-
| `
|
|
266
|
-
| `
|
|
267
|
-
| `
|
|
268
|
-
| `
|
|
269
|
-
| `
|
|
270
|
-
| `
|
|
341
|
+
session or `SUPERBLOCKS_API_TOKEN`.
|
|
342
|
+
|
|
343
|
+
| Variable | Purpose |
|
|
344
|
+
| ---------------------------- | ----------------------------------------------------------- |
|
|
345
|
+
| `SUPERBLOCKS_API_TOKEN` | Personal API key; takes precedence over saved sessions. |
|
|
346
|
+
| `SUPERBLOCKS_SERVER_URL` | Control plane URL; browser sessions must match this origin. |
|
|
347
|
+
| `GATEWAY_PROFILE_KEY` | Integration profile key (default `default`). |
|
|
348
|
+
| `GATEWAY_LOCAL_AGENT` | Cloud-Prem laptop agent mode. |
|
|
349
|
+
| `GATEWAY_ADMIN_TOOLS_ONLY` | Admin tools only; skip Builder surface. |
|
|
350
|
+
| `GATEWAY_IMPORT_SEARCH_DIRS` | Fallback folders for bare or sandbox attachment paths. |
|
|
351
|
+
| `SUPERBLOCKS_AUTH_FILE` | Worktree-local CLI session (from `just worktree auth`). |
|
|
352
|
+
| `NODE_DEBUG=gateway` | Tool call stacks and conditional-flow logs on stderr. |
|
|
271
353
|
|
|
272
354
|
Gateway debug logs include tool names, result states, decision branches, and
|
|
273
355
|
entry-point stacks. They intentionally omit credentials, prompts, answers, and
|
|
@@ -51,7 +51,15 @@ export type CapabilityContext = {
|
|
|
51
51
|
* so it surfaces as an error rather than an interactive-auth elicitation.
|
|
52
52
|
*/
|
|
53
53
|
export declare function ensurePrincipal(ctx: CapabilityContext): Promise<CapabilityResult<ResolvedPrincipal>>;
|
|
54
|
-
export declare function resolveApplicationId(ctx: CapabilityContext, principal: ResolvedPrincipal, applicationId: string | undefined
|
|
54
|
+
export declare function resolveApplicationId(ctx: CapabilityContext, principal: ResolvedPrincipal, applicationId: string | undefined,
|
|
55
|
+
/**
|
|
56
|
+
* `unambiguous` declines to guess while a second application is also in
|
|
57
|
+
* play. Reserved for calls that write: acting on the wrong application is
|
|
58
|
+
* cheap to undo for a status poll and not cheap at all for an edit.
|
|
59
|
+
*/
|
|
60
|
+
options?: {
|
|
61
|
+
unambiguous?: boolean;
|
|
62
|
+
}): Promise<CapabilityResult<string>>;
|
|
55
63
|
export declare function startApp(ctx: CapabilityContext, input: StartAppInput): Promise<CapabilityResult<StartAppResult>>;
|
|
56
64
|
export declare function uploadArtifact(ctx: CapabilityContext, input: UploadArtifactInput): Promise<CapabilityResult<UploadArtifactResult>>;
|
|
57
65
|
export declare function checkAppProgress(ctx: CapabilityContext, input: CheckAppProgressInput): Promise<CapabilityResult<CheckAppProgressResult>>;
|