@tangle-network/agent-app 0.44.56 → 0.44.58

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.
@@ -1,51 +0,0 @@
1
- /** Define the connection details and status for a sandbox terminal session */
2
- interface SandboxTerminalConnection {
3
- runtimeUrl: string | null;
4
- sidecarUrl: string | null;
5
- token: string | null;
6
- expiresAt: string | null;
7
- status: string;
8
- error: string | null;
9
- loading: boolean;
10
- sandboxId?: string;
11
- }
12
- /** Define the response structure for a sandbox terminal connection including URLs, token, status, and errors */
13
- interface SandboxTerminalConnectionResponse {
14
- runtimeUrl?: string;
15
- sidecarUrl?: string;
16
- token?: string;
17
- expiresAt?: string;
18
- status?: string;
19
- error?: string;
20
- sandboxId?: string;
21
- }
22
- /** Define options for configuring a sandbox terminal connection including workspace ID and connection parameters */
23
- interface UseSandboxTerminalConnectionOptions {
24
- workspaceId: string;
25
- connectionUrl?: string | ((workspaceId: string) => string);
26
- fetcher?: typeof fetch;
27
- provisionPollIntervalMs?: number;
28
- provisionPollTimeoutMs?: number;
29
- tokenRefreshSkewMs?: number;
30
- }
31
- /** Resolve sandbox terminal connection status and provide a method to initiate the connection */
32
- interface UseSandboxTerminalConnectionResult extends SandboxTerminalConnection {
33
- connect: () => Promise<void>;
34
- }
35
- /** Manage and maintain a sandbox terminal connection with automatic polling and token refresh handling */
36
- declare function useSandboxTerminalConnection(opts: UseSandboxTerminalConnectionOptions): UseSandboxTerminalConnectionResult;
37
- /**
38
- * Stable-per-tab, unique-per-client terminal connection id.
39
- *
40
- * Persists in `sessionStorage` so a reload in the same tab reuses the id (the
41
- * sidecar restores the same PTY session via `TerminalView.connectionId`), while
42
- * separate tabs/windows each get a distinct id. Pass the result as
43
- * `TerminalView`'s `connectionId`. Without it (e.g. gtm-agent today) every tab
44
- * shares one connection id and their reconnects evict each other.
45
- *
46
- * Falls back to an ephemeral id when `sessionStorage` is unavailable (SSR,
47
- * privacy mode) — still unique per call, just not reload-stable.
48
- */
49
- declare function tabTerminalConnectionId(storageKey?: string): string;
50
-
51
- export { type SandboxTerminalConnection as S, type UseSandboxTerminalConnectionOptions as U, type SandboxTerminalConnectionResponse as a, type UseSandboxTerminalConnectionResult as b, tabTerminalConnectionId as t, useSandboxTerminalConnection as u };