@superblocksteam/gateway 2.0.167-next.0 → 2.0.169-next.0
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 +163 -28
- package/dist/agents/resolve-orchestrator-url.js +1 -2
- package/dist/agents/resolve-orchestrator-url.js.map +1 -1
- package/dist/capabilities/lifecycle.d.ts +3 -0
- package/dist/capabilities/lifecycle.js +330 -128
- package/dist/capabilities/lifecycle.js.map +1 -1
- package/dist/capabilities/live-state-attaches.d.ts +26 -0
- package/dist/capabilities/live-state-attaches.js +41 -0
- package/dist/capabilities/live-state-attaches.js.map +1 -0
- package/dist/capabilities/tool-permission-reply.d.ts +28 -0
- package/dist/capabilities/tool-permission-reply.js +55 -0
- package/dist/capabilities/tool-permission-reply.js.map +1 -0
- package/dist/capabilities/types.d.ts +19 -1
- package/dist/capabilities/types.js.map +1 -1
- package/dist/deadline.d.ts +6 -0
- package/dist/deadline.js +23 -0
- package/dist/deadline.js.map +1 -0
- package/dist/deps.d.ts +7 -0
- package/dist/health/readiness.js +1 -17
- package/dist/health/readiness.js.map +1 -1
- package/dist/integrations/filters.js +2 -2
- package/dist/integrations/filters.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/sabs/app-state.d.ts +1 -0
- package/dist/sabs/app-state.js +9 -0
- package/dist/sabs/app-state.js.map +1 -1
- package/dist/sabs/awaited-decision.d.ts +24 -1
- package/dist/sabs/awaited-decision.js +40 -9
- package/dist/sabs/awaited-decision.js.map +1 -1
- package/dist/sabs/editor-client-methods.d.ts +21 -10
- package/dist/sabs/editor-client-methods.js +48 -24
- package/dist/sabs/editor-client-methods.js.map +1 -1
- package/dist/sabs/session-peer.d.ts +47 -14
- package/dist/sabs/session-peer.js.map +1 -1
- package/dist/sabs/turn-collector.d.ts +27 -1
- package/dist/sabs/turn-collector.js +38 -2
- package/dist/sabs/turn-collector.js.map +1 -1
- package/dist/sabs/websocket-session-peer.d.ts +27 -3
- package/dist/sabs/websocket-session-peer.js +476 -76
- package/dist/sabs/websocket-session-peer.js.map +1 -1
- package/dist/server/client.d.ts +5 -0
- package/dist/server/client.js +9 -3
- package/dist/server/client.js.map +1 -1
- package/dist/start.d.ts +13 -2
- package/dist/start.js +112 -12
- package/dist/start.js.map +1 -1
- package/dist/telemetry/metrics.js +8 -21
- package/dist/telemetry/metrics.js.map +1 -1
- package/dist/telemetry/runtime.d.ts +5 -0
- package/dist/telemetry/runtime.js +22 -8
- package/dist/telemetry/runtime.js.map +1 -1
- package/dist/transports/mcp/admin-tools.d.ts +2 -1
- package/dist/transports/mcp/admin-tools.js +19 -2
- package/dist/transports/mcp/admin-tools.js.map +1 -1
- package/dist/transports/mcp/client-presentation.d.ts +9 -1
- package/dist/transports/mcp/client-presentation.js +10 -0
- package/dist/transports/mcp/client-presentation.js.map +1 -1
- package/dist/transports/mcp/decision-card-html.d.ts +4 -2
- package/dist/transports/mcp/decision-card-html.js +107 -25
- package/dist/transports/mcp/decision-card-html.js.map +1 -1
- package/dist/transports/mcp/decision-elicitation.d.ts +3 -2
- package/dist/transports/mcp/decision-elicitation.js +67 -2
- package/dist/transports/mcp/decision-elicitation.js.map +1 -1
- package/dist/transports/mcp/format-tool-content.d.ts +7 -0
- package/dist/transports/mcp/format-tool-content.js +3 -3
- package/dist/transports/mcp/format-tool-content.js.map +1 -1
- package/dist/transports/mcp/instructions/result.js +1 -0
- package/dist/transports/mcp/instructions/result.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/ask-user.d.ts +2 -1
- package/dist/transports/mcp/instructions/tools/ask-user.js +9 -2
- package/dist/transports/mcp/instructions/tools/ask-user.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/copy.d.ts +5 -2
- package/dist/transports/mcp/instructions/tools/copy.js +20 -5
- package/dist/transports/mcp/instructions/tools/copy.js.map +1 -1
- package/dist/transports/mcp/instructions/tools/edit-app.d.ts +1 -1
- package/dist/transports/mcp/instructions/tools/edit-app.js +11 -1
- package/dist/transports/mcp/instructions/tools/edit-app.js.map +1 -1
- package/dist/transports/mcp/mount.d.ts +2 -3
- package/dist/transports/mcp/mount.js +395 -112
- package/dist/transports/mcp/mount.js.map +1 -1
- package/dist/transports/mcp/plan-approval.d.ts +23 -13
- package/dist/transports/mcp/plan-approval.js +39 -26
- package/dist/transports/mcp/plan-approval.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type LLMProviderConfig } from "@superblocksteam/library-shared/types";
|
|
2
2
|
import type { RecentToolRun } from "../capabilities/types.js";
|
|
3
3
|
import { type OrchestratorClient } from "../orchestrator/client.js";
|
|
4
4
|
import type { SuperblocksServerClient } from "../server/client.js";
|
|
@@ -36,6 +36,7 @@ export declare const MAX_RERESOLVES_PER_OPEN = 3;
|
|
|
36
36
|
*/
|
|
37
37
|
export declare const DEFAULT_RELEASE_AFTER_TURN_MS = 30000;
|
|
38
38
|
export type WebSocketSessionPeerOptions = {
|
|
39
|
+
getAccessToken?: () => Promise<string>;
|
|
39
40
|
/** Shared with the capability layer; created here when omitted. */
|
|
40
41
|
appState?: AppState;
|
|
41
42
|
/**
|
|
@@ -99,6 +100,11 @@ export type WebSocketSessionPeerOptions = {
|
|
|
99
100
|
provider?: LLMProviderConfig["provider"];
|
|
100
101
|
pushWaitMs?: number;
|
|
101
102
|
readyWaitMs?: number;
|
|
103
|
+
/**
|
|
104
|
+
* How long a socket held only to read the editor state stays open with
|
|
105
|
+
* nothing running on it. Defaults to the post-turn grace.
|
|
106
|
+
*/
|
|
107
|
+
releaseAfterReadMs?: number;
|
|
102
108
|
/** Grace period between a turn settling and the gateway socket being dropped. */
|
|
103
109
|
releaseAfterTurnMs?: number;
|
|
104
110
|
reattachWaitMs?: number;
|
|
@@ -199,7 +205,7 @@ export declare class WebSocketSessionPeer implements SessionPeer {
|
|
|
199
205
|
applicationId: string;
|
|
200
206
|
branch?: string;
|
|
201
207
|
decision?: TurnDecision;
|
|
202
|
-
generationStatus?: "detached" | "live_edit_terminated" | "needs_decision";
|
|
208
|
+
generationStatus?: "detached" | "live_edit_terminated" | "needs_decision" | "no_changes";
|
|
203
209
|
idempotencyKey?: string;
|
|
204
210
|
organizationId: string;
|
|
205
211
|
pendingStartRequired?: boolean;
|
|
@@ -231,10 +237,19 @@ export declare class WebSocketSessionPeer implements SessionPeer {
|
|
|
231
237
|
heldContext(applicationId: string): {
|
|
232
238
|
branch?: string;
|
|
233
239
|
} | undefined;
|
|
234
|
-
libraryBrowserContext(applicationId: string, requestedBranch?: string): import("@superblocksteam/library-shared/types").BrowserContext | undefined
|
|
240
|
+
libraryBrowserContext(applicationId: string, requestedBranch?: string): Promise<import("@superblocksteam/library-shared/types").BrowserContext | undefined>;
|
|
235
241
|
holdLiveEdit(input: HoldLiveEditInput): Promise<void>;
|
|
242
|
+
/**
|
|
243
|
+
* Bounds a socket held only to read the editor state. Nothing runs on it,
|
|
244
|
+
* so it gets a finished turn's grace instead of keeping the sandbox awake
|
|
245
|
+
* and contesting the editor's binding for the life of the process. A turn
|
|
246
|
+
* seen on it clears this timer and arms its own.
|
|
247
|
+
*/
|
|
248
|
+
private armReadRelease;
|
|
249
|
+
private synchronizeChatState;
|
|
236
250
|
release(applicationId: string): void;
|
|
237
251
|
closeAll(): void;
|
|
252
|
+
resetForLogin(): void;
|
|
238
253
|
/**
|
|
239
254
|
* Sends the prompt and waits for Clark's whole turn.
|
|
240
255
|
*
|
|
@@ -259,7 +274,15 @@ export declare class WebSocketSessionPeer implements SessionPeer {
|
|
|
259
274
|
* the turn to {@link runTurn} once the session confirms it took it on.
|
|
260
275
|
*/
|
|
261
276
|
private sendPrompt;
|
|
277
|
+
/**
|
|
278
|
+
* The mode a new turn runs in. A reply to a tool permission carries no mode
|
|
279
|
+
* to Superblocks, which carries on in the mode of the turn that asked, so the
|
|
280
|
+
* reply takes that turn's mode here. When this peer did not run the turn that
|
|
281
|
+
* asked, the mode is unknown rather than guessed.
|
|
282
|
+
*/
|
|
283
|
+
private turnMode;
|
|
262
284
|
private latestTurn;
|
|
285
|
+
private clearChatSessionState;
|
|
263
286
|
private observeEditorEvent;
|
|
264
287
|
private forgetObservedTurn;
|
|
265
288
|
private finishObservedTurn;
|
|
@@ -371,6 +394,7 @@ export declare class WebSocketSessionPeer implements SessionPeer {
|
|
|
371
394
|
private proveIdentity;
|
|
372
395
|
private reconnect;
|
|
373
396
|
private setHeld;
|
|
397
|
+
private hasStoredToolPermission;
|
|
374
398
|
private recordEditorStructure;
|
|
375
399
|
private publishEditorStructure;
|
|
376
400
|
private currentViewStatus;
|