@tangle-network/agent-app 0.53.17 → 0.54.1

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 (86) hide show
  1. package/dist/app-auth/index.js +2 -2
  2. package/dist/assistant/index.js +10 -10
  3. package/dist/chat-react/index.js +3 -3
  4. package/dist/chat-routes/index.js +22 -11
  5. package/dist/chat-routes/index.js.map +1 -1
  6. package/dist/chat-routes/sandbox-producer.d.ts +7 -0
  7. package/dist/chat-routes/wire.d.ts +1 -1
  8. package/dist/chat-store/index.js +4 -4
  9. package/dist/{chunk-UII6SBT4.js → chunk-4XBRPVL3.js} +4 -4
  10. package/dist/{chunk-TSZIYQAZ.js → chunk-6VRVRWYN.js} +2 -2
  11. package/dist/{chunk-CP36C5LZ.js → chunk-D6UJEOZQ.js} +1 -1
  12. package/dist/chunk-D6UJEOZQ.js.map +1 -0
  13. package/dist/{chunk-W3RSC6XB.js → chunk-DVOJNI6T.js} +3 -3
  14. package/dist/{chunk-M3K2HVQD.js → chunk-FCON65I2.js} +1 -1
  15. package/dist/{chunk-M3K2HVQD.js.map → chunk-FCON65I2.js.map} +1 -1
  16. package/dist/{chunk-UJHENCPR.js → chunk-GYDFGEJ2.js} +1 -1
  17. package/dist/chunk-GYDFGEJ2.js.map +1 -0
  18. package/dist/{chunk-YB6BZKXY.js → chunk-IJDPERPL.js} +31 -5
  19. package/dist/chunk-IJDPERPL.js.map +1 -0
  20. package/dist/{chunk-2S7QRQUS.js → chunk-NJA6X7JI.js} +2 -2
  21. package/dist/{chunk-JZ64GXYP.js → chunk-OMHGFN5I.js} +2 -2
  22. package/dist/{chunk-4KFM7VTH.js → chunk-OXDA7G4E.js} +9 -8
  23. package/dist/chunk-OXDA7G4E.js.map +1 -0
  24. package/dist/{chunk-ZMMIQOFI.js → chunk-UII4YDYS.js} +2 -2
  25. package/dist/{chunk-L57CYCXN.js → chunk-WN3UK23P.js} +2 -2
  26. package/dist/design-canvas-react/index.js +4 -4
  27. package/dist/interactions/contract.d.ts +4 -3
  28. package/dist/interactions/index.js +2 -2
  29. package/dist/platform/index.js +2 -2
  30. package/dist/public-consultation/index.js +6 -6
  31. package/dist/runtime/index.js +1 -1
  32. package/dist/runtime/model.d.ts +1 -1
  33. package/dist/sandbox/index.d.ts +0 -4
  34. package/dist/sandbox/index.js +2 -2
  35. package/dist/sandbox/model.d.ts +9 -12
  36. package/dist/stream/index.js +2 -2
  37. package/dist/teams-react/index.d.ts +1 -2
  38. package/dist/teams-react/index.js +618 -10
  39. package/dist/teams-react/index.js.map +1 -1
  40. package/dist/web-react/chat-stream.d.ts +1 -1
  41. package/dist/web-react/index.d.ts +10 -0
  42. package/dist/web-react/index.js +13 -13
  43. package/dist/workspace-react/index.js +51 -5
  44. package/dist/workspace-react/index.js.map +1 -1
  45. package/package.json +3 -33
  46. package/dist/InvitationsPanel-OFCYVSAE.js +0 -9
  47. package/dist/InvitationsPanel-OFCYVSAE.js.map +0 -1
  48. package/dist/InviteAcceptPage-BDOO4JSE.js +0 -7
  49. package/dist/InviteAcceptPage-BDOO4JSE.js.map +0 -1
  50. package/dist/MembersPanel-3ZK2GCMC.js +0 -9
  51. package/dist/MembersPanel-3ZK2GCMC.js.map +0 -1
  52. package/dist/chunk-4KFM7VTH.js.map +0 -1
  53. package/dist/chunk-5MI2SKQH.js +0 -211
  54. package/dist/chunk-5MI2SKQH.js.map +0 -1
  55. package/dist/chunk-AULM4X7U.js +0 -77
  56. package/dist/chunk-AULM4X7U.js.map +0 -1
  57. package/dist/chunk-CP36C5LZ.js.map +0 -1
  58. package/dist/chunk-GRDLGQ6A.js +0 -164
  59. package/dist/chunk-GRDLGQ6A.js.map +0 -1
  60. package/dist/chunk-UJHENCPR.js.map +0 -1
  61. package/dist/chunk-W7P5KV6O.js +0 -192
  62. package/dist/chunk-W7P5KV6O.js.map +0 -1
  63. package/dist/chunk-YB6BZKXY.js.map +0 -1
  64. package/dist/run/index.d.ts +0 -63
  65. package/dist/run/index.js +0 -30
  66. package/dist/run/index.js.map +0 -1
  67. package/dist/tangle/index.d.ts +0 -94
  68. package/dist/tangle/index.js +0 -33
  69. package/dist/tangle/index.js.map +0 -1
  70. package/dist/teams/resend.d.ts +0 -27
  71. package/dist/teams/resend.js +0 -38
  72. package/dist/teams/resend.js.map +0 -1
  73. package/dist/teams-react/lazy.d.ts +0 -14
  74. package/dist/teams-react/lazy.js +0 -17
  75. package/dist/teams-react/lazy.js.map +0 -1
  76. package/dist/web-react/inert.d.ts +0 -39
  77. package/dist/web-react/session-gateway.d.ts +0 -140
  78. package/dist/web-react/session-gateway.js +0 -187
  79. package/dist/web-react/session-gateway.js.map +0 -1
  80. /package/dist/{chunk-UII6SBT4.js.map → chunk-4XBRPVL3.js.map} +0 -0
  81. /package/dist/{chunk-TSZIYQAZ.js.map → chunk-6VRVRWYN.js.map} +0 -0
  82. /package/dist/{chunk-W3RSC6XB.js.map → chunk-DVOJNI6T.js.map} +0 -0
  83. /package/dist/{chunk-2S7QRQUS.js.map → chunk-NJA6X7JI.js.map} +0 -0
  84. /package/dist/{chunk-JZ64GXYP.js.map → chunk-OMHGFN5I.js.map} +0 -0
  85. /package/dist/{chunk-ZMMIQOFI.js.map → chunk-UII4YDYS.js.map} +0 -0
  86. /package/dist/{chunk-L57CYCXN.js.map → chunk-WN3UK23P.js.map} +0 -0
@@ -1,63 +0,0 @@
1
- /**
2
- * Execution-mode dispatch — the shell entry that infers *how* to run an agent
3
- * from its profile's harness, so a product hands over one profile and the
4
- * framework routes to the router tool loop or a sandbox without separate wiring.
5
- *
6
- * The discriminator is the harness: absent / null / 'router' => the router tool
7
- * agent (`@tangle-network/agent-app/runtime`); any member of `KNOWN_HARNESSES`
8
- * (opencode, claude-code, …) => a sandbox (`@tangle-network/agent-app/sandbox`).
9
- * `KNOWN_HARNESSES` is exactly the set of sandbox backends; the *absence* of a
10
- * harness is the router signal.
11
- *
12
- * `runAgent` owns the inference + routing; the two branch runners are injected,
13
- * because their inputs and event shapes legitimately differ (the router loop
14
- * yields `LoopEvent`s, the sandbox yields its own events). A product supplies a
15
- * `router`/`sandbox` thunk and can lazy-import the sandbox driver inside its own
16
- * thunk, so a router-only app never resolves `@tangle-network/sandbox`.
17
- */
18
- import { type Harness } from '../harness/index';
19
- /** Define execution mode as either router or sandbox */
20
- export type ExecutionMode = 'router' | 'sandbox';
21
- /** The router pseudo-harness — the absence of a sandbox backend. Not a member
22
- * of `KNOWN_HARNESSES`; callers may pass it explicitly instead of null. */
23
- export declare const ROUTER_HARNESS: 'router';
24
- /** Provide a type alias for the ROUTER_HARNESS constant to enable consistent router harness usage */
25
- export type RouterHarness = typeof ROUTER_HARNESS;
26
- /** Resolve a ProfileHarness as a Harness, RouterHarness, null, or undefined value */
27
- export type ProfileHarness = Harness | RouterHarness | null | undefined;
28
- /**
29
- * Infer the execution mode from a profile's harness. Absent / null / 'router'
30
- * => 'router'; a known sandbox harness => 'sandbox'. An unrecognized non-null
31
- * string is treated as a sandbox backend (the box installs all harnesses, so an
32
- * unknown id is a sandbox the runtime resolves, not a router) — callers that
33
- * want strictness can validate against `KNOWN_HARNESSES` first.
34
- */
35
- export declare function resolveExecutionMode(harness: ProfileHarness): ExecutionMode;
36
- /** True when `harness` names a sandbox backend the SDK knows about. */
37
- export declare function isKnownSandboxHarness(harness: ProfileHarness): harness is Harness;
38
- /**
39
- * The superset the dispatch reads: the SDK `AgentProfile` plus the harness
40
- * discriminator. Intentionally pins only `harness` — the rest of the profile is
41
- * carried opaquely so this module stays free of the SDK type (router-only apps
42
- * import it without `@tangle-network/sandbox`).
43
- */
44
- export interface ShellProfile {
45
- harness?: ProfileHarness;
46
- }
47
- /** Execution mode for a profile — `harness` omitted/null => router. */
48
- export declare function executionModeForProfile(profile: ShellProfile): ExecutionMode;
49
- /** The two branch runners. Each returns (or resolves to) an async iterable of
50
- * the product's own event type — the shapes differ, so the product owns them.
51
- * A `sandbox` thunk can `await import('@tangle-network/agent-app/sandbox')`
52
- * internally so the SDK is pulled only on the sandbox path. */
53
- export interface RunAgentBranches<T> {
54
- router: () => AsyncIterable<T> | Promise<AsyncIterable<T>>;
55
- sandbox: () => AsyncIterable<T> | Promise<AsyncIterable<T>>;
56
- }
57
- /**
58
- * Route a turn to the branch the harness selects and stream its events through.
59
- * The shell does the inference; the product supplies how each branch runs. The
60
- * unselected branch's thunk is never invoked — so its dependencies (e.g. the
61
- * sandbox SDK) are never loaded on the other path.
62
- */
63
- export declare function runAgent<T>(harness: ProfileHarness, branches: RunAgentBranches<T>): AsyncGenerator<T>;
package/dist/run/index.js DELETED
@@ -1,30 +0,0 @@
1
- import {
2
- KNOWN_HARNESSES
3
- } from "../chunk-MCYJON3F.js";
4
-
5
- // src/run/index.ts
6
- var ROUTER_HARNESS = "router";
7
- function resolveExecutionMode(harness) {
8
- if (harness == null || harness === ROUTER_HARNESS) return "router";
9
- return "sandbox";
10
- }
11
- function isKnownSandboxHarness(harness) {
12
- return harness != null && harness !== ROUTER_HARNESS && KNOWN_HARNESSES.includes(harness);
13
- }
14
- function executionModeForProfile(profile) {
15
- return resolveExecutionMode(profile.harness);
16
- }
17
- async function* runAgent(harness, branches) {
18
- const mode = resolveExecutionMode(harness);
19
- const source = mode === "sandbox" ? branches.sandbox() : branches.router();
20
- const iterable = await source;
21
- for await (const event of iterable) yield event;
22
- }
23
- export {
24
- ROUTER_HARNESS,
25
- executionModeForProfile,
26
- isKnownSandboxHarness,
27
- resolveExecutionMode,
28
- runAgent
29
- };
30
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/run/index.ts"],"sourcesContent":["/**\n * Execution-mode dispatch — the shell entry that infers *how* to run an agent\n * from its profile's harness, so a product hands over one profile and the\n * framework routes to the router tool loop or a sandbox without separate wiring.\n *\n * The discriminator is the harness: absent / null / 'router' => the router tool\n * agent (`@tangle-network/agent-app/runtime`); any member of `KNOWN_HARNESSES`\n * (opencode, claude-code, …) => a sandbox (`@tangle-network/agent-app/sandbox`).\n * `KNOWN_HARNESSES` is exactly the set of sandbox backends; the *absence* of a\n * harness is the router signal.\n *\n * `runAgent` owns the inference + routing; the two branch runners are injected,\n * because their inputs and event shapes legitimately differ (the router loop\n * yields `LoopEvent`s, the sandbox yields its own events). A product supplies a\n * `router`/`sandbox` thunk and can lazy-import the sandbox driver inside its own\n * thunk, so a router-only app never resolves `@tangle-network/sandbox`.\n */\n\nimport { KNOWN_HARNESSES, type Harness } from '../harness/index'\n\n/** Define execution mode as either router or sandbox */\nexport type ExecutionMode = 'router' | 'sandbox'\n\n/** The router pseudo-harness — the absence of a sandbox backend. Not a member\n * of `KNOWN_HARNESSES`; callers may pass it explicitly instead of null. */\nexport const ROUTER_HARNESS = 'router' as const\n/** Provide a type alias for the ROUTER_HARNESS constant to enable consistent router harness usage */\nexport type RouterHarness = typeof ROUTER_HARNESS\n\n/** Resolve a ProfileHarness as a Harness, RouterHarness, null, or undefined value */\nexport type ProfileHarness = Harness | RouterHarness | null | undefined\n\n/**\n * Infer the execution mode from a profile's harness. Absent / null / 'router'\n * => 'router'; a known sandbox harness => 'sandbox'. An unrecognized non-null\n * string is treated as a sandbox backend (the box installs all harnesses, so an\n * unknown id is a sandbox the runtime resolves, not a router) — callers that\n * want strictness can validate against `KNOWN_HARNESSES` first.\n */\nexport function resolveExecutionMode(harness: ProfileHarness): ExecutionMode {\n if (harness == null || harness === ROUTER_HARNESS) return 'router'\n return 'sandbox'\n}\n\n/** True when `harness` names a sandbox backend the SDK knows about. */\nexport function isKnownSandboxHarness(harness: ProfileHarness): harness is Harness {\n return harness != null && harness !== ROUTER_HARNESS && (KNOWN_HARNESSES as readonly string[]).includes(harness)\n}\n\n/**\n * The superset the dispatch reads: the SDK `AgentProfile` plus the harness\n * discriminator. Intentionally pins only `harness` — the rest of the profile is\n * carried opaquely so this module stays free of the SDK type (router-only apps\n * import it without `@tangle-network/sandbox`).\n */\nexport interface ShellProfile {\n harness?: ProfileHarness\n}\n\n/** Execution mode for a profile — `harness` omitted/null => router. */\nexport function executionModeForProfile(profile: ShellProfile): ExecutionMode {\n return resolveExecutionMode(profile.harness)\n}\n\n/** The two branch runners. Each returns (or resolves to) an async iterable of\n * the product's own event type — the shapes differ, so the product owns them.\n * A `sandbox` thunk can `await import('@tangle-network/agent-app/sandbox')`\n * internally so the SDK is pulled only on the sandbox path. */\nexport interface RunAgentBranches<T> {\n router: () => AsyncIterable<T> | Promise<AsyncIterable<T>>\n sandbox: () => AsyncIterable<T> | Promise<AsyncIterable<T>>\n}\n\n/**\n * Route a turn to the branch the harness selects and stream its events through.\n * The shell does the inference; the product supplies how each branch runs. The\n * unselected branch's thunk is never invoked — so its dependencies (e.g. the\n * sandbox SDK) are never loaded on the other path.\n */\nexport async function* runAgent<T>(\n harness: ProfileHarness,\n branches: RunAgentBranches<T>,\n): AsyncGenerator<T> {\n const mode = resolveExecutionMode(harness)\n const source = mode === 'sandbox' ? branches.sandbox() : branches.router()\n const iterable = await source\n for await (const event of iterable) yield event\n}\n"],"mappings":";;;;;AAyBO,IAAM,iBAAiB;AAcvB,SAAS,qBAAqB,SAAwC;AAC3E,MAAI,WAAW,QAAQ,YAAY,eAAgB,QAAO;AAC1D,SAAO;AACT;AAGO,SAAS,sBAAsB,SAA6C;AACjF,SAAO,WAAW,QAAQ,YAAY,kBAAmB,gBAAsC,SAAS,OAAO;AACjH;AAaO,SAAS,wBAAwB,SAAsC;AAC5E,SAAO,qBAAqB,QAAQ,OAAO;AAC7C;AAiBA,gBAAuB,SACrB,SACA,UACmB;AACnB,QAAM,OAAO,qBAAqB,OAAO;AACzC,QAAM,SAAS,SAAS,YAAY,SAAS,QAAQ,IAAI,SAAS,OAAO;AACzE,QAAM,WAAW,MAAM;AACvB,mBAAiB,SAAS,SAAU,OAAM;AAC5C;","names":[]}
@@ -1,94 +0,0 @@
1
- /**
2
- * Tangle login + the developer self-service app-registration → broker-token
3
- * flow, for apps built on agent-app.
4
- *
5
- * The platform (agent-dev-container integration hub) lets a developer register
6
- * their client app and obtain a `sk-tan-broker-` bearer to call `/v1/hub/exec`
7
- * on a user's connected integrations — WITHOUT being a hard-coded "trusted app".
8
- * The wire client (`TangleAppsClient` — registerApp / exchangeAuthCode /
9
- * mintBrokerToken) lives in `@tangle-network/agent-integrations`; this module is
10
- * the app-shell layer on top, and is intentionally **structural**: it depends on
11
- * the minter CONTRACT, not the concrete client, so it installs without the
12
- * agent-integrations publish and is trivially testable. A consumer constructs
13
- * the real client and passes it in.
14
- *
15
- * 1. {@link buildConsentUrl} — send the user through the ONE-TIME consent
16
- * (their Tangle session authorizes the app for a connection + scopes).
17
- * 2. On the callback, the consumer's client `exchangeAuthCode`s the `agc_`
18
- * code into the first broker token + a durable grant.
19
- * 3. {@link createBrokerTokenProvider} — the runtime path: each request mints
20
- * a fresh single-use broker token from the durable grant using only app
21
- * credentials (no user session). Neither tokens nor in-flight mint
22
- * promises may be shared between execution attempts.
23
- */
24
- /** A single-use hub bearer minted from a durable grant — mirrors
25
- * `@tangle-network/agent-integrations`'s `BrokerToken`. */
26
- export interface BrokerToken {
27
- /** The `sk-tan-broker-…` bearer for a single `/v1/hub/exec` call. */
28
- accessToken: string;
29
- /** Seconds until expiry. */
30
- expiresIn: number;
31
- scope: string;
32
- connectionId?: string;
33
- }
34
- /** The one method the provider needs — `TangleAppsClient` satisfies it
35
- * structurally, so `createBrokerTokenProvider({ client: tangleAppsClient, … })`
36
- * type-checks without importing the concrete class. */
37
- export interface BrokerTokenMinter {
38
- mintBrokerToken(input: {
39
- clientId: string;
40
- clientSecret: string;
41
- grantId: string;
42
- ttlSeconds?: number;
43
- }): Promise<BrokerToken>;
44
- }
45
- /** Define input parameters required to generate a consent URL for OAuth authorization */
46
- export interface ConsentUrlInput {
47
- /** Platform base URL (e.g. https://id.tangle.tools). */
48
- endpoint: string;
49
- clientId: string;
50
- /** Must match one of the app's registered redirect URIs. */
51
- redirectUri: string;
52
- /** Scopes the app is requesting for this connection (e.g. ['gmail.read']). */
53
- scopes: string[];
54
- /** Opaque CSRF/state value the callback echoes back — verify it on return. */
55
- state: string;
56
- /** Optionally pre-select a specific connection to authorize. */
57
- connectionId?: string;
58
- }
59
- /**
60
- * Build the URL to send the user to for the one-time app-consent. The user's
61
- * Tangle session (not the app's credentials) authorizes it; on approval the
62
- * platform redirects to `redirectUri?code=agc_…&state=…`.
63
- */
64
- export declare function buildConsentUrl(input: ConsentUrlInput): string;
65
- /** Define options for configuring a broker token provider including client credentials and token management settings */
66
- export interface BrokerTokenProviderOptions {
67
- client: BrokerTokenMinter;
68
- clientId: string;
69
- clientSecret: string;
70
- /** The durable grant id from the consent exchange. */
71
- grantId: string;
72
- /** Requested token TTL (seconds). */
73
- ttlSeconds?: number;
74
- /** @deprecated Retained for source compatibility. Single-use tokens are
75
- * never cached, so refresh skew is ignored. */
76
- refreshSkewMs?: number;
77
- /** @deprecated Retained for source compatibility; no local expiry cache. */
78
- now?: () => number;
79
- }
80
- /** Mint a separate single-use bearer for each execution attempt. */
81
- export interface BrokerTokenProvider {
82
- /** Mint a fresh bearer for exactly one Hub execution; never cache or share it. */
83
- getToken(): Promise<string>;
84
- /** Compatibility no-op: no bearer is cached. Does not revoke Hub grants or
85
- * already-issued tokens; revocation belongs to the authoritative Hub. */
86
- invalidate(): void;
87
- }
88
- /**
89
- * Mint a fresh broker token for every call, including concurrent calls.
90
- * A broker bearer is consumed by one Hub execution even when its TTL has not
91
- * expired. Cache the durable grant, never the bearer or an in-flight mint.
92
- * Mint failures propagate; this helper never retries an external action.
93
- */
94
- export declare function createBrokerTokenProvider(opts: BrokerTokenProviderOptions): BrokerTokenProvider;
@@ -1,33 +0,0 @@
1
- // src/tangle/index.ts
2
- function buildConsentUrl(input) {
3
- const base = input.endpoint.replace(/\/+$/, "");
4
- const params = new URLSearchParams({
5
- client_id: input.clientId,
6
- redirect_uri: input.redirectUri,
7
- scope: input.scopes.join(" "),
8
- state: input.state,
9
- response_type: "code"
10
- });
11
- if (input.connectionId) params.set("connection_id", input.connectionId);
12
- return `${base}/cross-site/app-consent?${params.toString()}`;
13
- }
14
- function createBrokerTokenProvider(opts) {
15
- return {
16
- async getToken() {
17
- const token = await opts.client.mintBrokerToken({
18
- clientId: opts.clientId,
19
- clientSecret: opts.clientSecret,
20
- grantId: opts.grantId,
21
- ttlSeconds: opts.ttlSeconds
22
- });
23
- return token.accessToken;
24
- },
25
- invalidate() {
26
- }
27
- };
28
- }
29
- export {
30
- buildConsentUrl,
31
- createBrokerTokenProvider
32
- };
33
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/tangle/index.ts"],"sourcesContent":["/**\n * Tangle login + the developer self-service app-registration → broker-token\n * flow, for apps built on agent-app.\n *\n * The platform (agent-dev-container integration hub) lets a developer register\n * their client app and obtain a `sk-tan-broker-` bearer to call `/v1/hub/exec`\n * on a user's connected integrations — WITHOUT being a hard-coded \"trusted app\".\n * The wire client (`TangleAppsClient` — registerApp / exchangeAuthCode /\n * mintBrokerToken) lives in `@tangle-network/agent-integrations`; this module is\n * the app-shell layer on top, and is intentionally **structural**: it depends on\n * the minter CONTRACT, not the concrete client, so it installs without the\n * agent-integrations publish and is trivially testable. A consumer constructs\n * the real client and passes it in.\n *\n * 1. {@link buildConsentUrl} — send the user through the ONE-TIME consent\n * (their Tangle session authorizes the app for a connection + scopes).\n * 2. On the callback, the consumer's client `exchangeAuthCode`s the `agc_`\n * code into the first broker token + a durable grant.\n * 3. {@link createBrokerTokenProvider} — the runtime path: each request mints\n * a fresh single-use broker token from the durable grant using only app\n * credentials (no user session). Neither tokens nor in-flight mint\n * promises may be shared between execution attempts.\n */\n\n/** A single-use hub bearer minted from a durable grant — mirrors\n * `@tangle-network/agent-integrations`'s `BrokerToken`. */\nexport interface BrokerToken {\n /** The `sk-tan-broker-…` bearer for a single `/v1/hub/exec` call. */\n accessToken: string\n /** Seconds until expiry. */\n expiresIn: number\n scope: string\n connectionId?: string\n}\n\n/** The one method the provider needs — `TangleAppsClient` satisfies it\n * structurally, so `createBrokerTokenProvider({ client: tangleAppsClient, … })`\n * type-checks without importing the concrete class. */\nexport interface BrokerTokenMinter {\n mintBrokerToken(input: { clientId: string; clientSecret: string; grantId: string; ttlSeconds?: number }): Promise<BrokerToken>\n}\n\n/** Define input parameters required to generate a consent URL for OAuth authorization */\nexport interface ConsentUrlInput {\n /** Platform base URL (e.g. https://id.tangle.tools). */\n endpoint: string\n clientId: string\n /** Must match one of the app's registered redirect URIs. */\n redirectUri: string\n /** Scopes the app is requesting for this connection (e.g. ['gmail.read']). */\n scopes: string[]\n /** Opaque CSRF/state value the callback echoes back — verify it on return. */\n state: string\n /** Optionally pre-select a specific connection to authorize. */\n connectionId?: string\n}\n\n/**\n * Build the URL to send the user to for the one-time app-consent. The user's\n * Tangle session (not the app's credentials) authorizes it; on approval the\n * platform redirects to `redirectUri?code=agc_…&state=…`.\n */\nexport function buildConsentUrl(input: ConsentUrlInput): string {\n const base = input.endpoint.replace(/\\/+$/, '')\n const params = new URLSearchParams({\n client_id: input.clientId,\n redirect_uri: input.redirectUri,\n scope: input.scopes.join(' '),\n state: input.state,\n response_type: 'code',\n })\n if (input.connectionId) params.set('connection_id', input.connectionId)\n return `${base}/cross-site/app-consent?${params.toString()}`\n}\n\n/** Define options for configuring a broker token provider including client credentials and token management settings */\nexport interface BrokerTokenProviderOptions {\n client: BrokerTokenMinter\n clientId: string\n clientSecret: string\n /** The durable grant id from the consent exchange. */\n grantId: string\n /** Requested token TTL (seconds). */\n ttlSeconds?: number\n /** @deprecated Retained for source compatibility. Single-use tokens are\n * never cached, so refresh skew is ignored. */\n refreshSkewMs?: number\n /** @deprecated Retained for source compatibility; no local expiry cache. */\n now?: () => number\n}\n\n/** Mint a separate single-use bearer for each execution attempt. */\nexport interface BrokerTokenProvider {\n /** Mint a fresh bearer for exactly one Hub execution; never cache or share it. */\n getToken(): Promise<string>\n /** Compatibility no-op: no bearer is cached. Does not revoke Hub grants or\n * already-issued tokens; revocation belongs to the authoritative Hub. */\n invalidate(): void\n}\n\n/**\n * Mint a fresh broker token for every call, including concurrent calls.\n * A broker bearer is consumed by one Hub execution even when its TTL has not\n * expired. Cache the durable grant, never the bearer or an in-flight mint.\n * Mint failures propagate; this helper never retries an external action.\n */\nexport function createBrokerTokenProvider(opts: BrokerTokenProviderOptions): BrokerTokenProvider {\n return {\n async getToken() {\n const token = await opts.client.mintBrokerToken({\n clientId: opts.clientId,\n clientSecret: opts.clientSecret,\n grantId: opts.grantId,\n ttlSeconds: opts.ttlSeconds,\n })\n return token.accessToken\n },\n invalidate() {\n // No cached bearer to clear. Keep this method for existing callers.\n },\n }\n}\n"],"mappings":";AA8DO,SAAS,gBAAgB,OAAgC;AAC9D,QAAM,OAAO,MAAM,SAAS,QAAQ,QAAQ,EAAE;AAC9C,QAAM,SAAS,IAAI,gBAAgB;AAAA,IACjC,WAAW,MAAM;AAAA,IACjB,cAAc,MAAM;AAAA,IACpB,OAAO,MAAM,OAAO,KAAK,GAAG;AAAA,IAC5B,OAAO,MAAM;AAAA,IACb,eAAe;AAAA,EACjB,CAAC;AACD,MAAI,MAAM,aAAc,QAAO,IAAI,iBAAiB,MAAM,YAAY;AACtE,SAAO,GAAG,IAAI,2BAA2B,OAAO,SAAS,CAAC;AAC5D;AAiCO,SAAS,0BAA0B,MAAuD;AAC/F,SAAO;AAAA,IACL,MAAM,WAAW;AACf,YAAM,QAAQ,MAAM,KAAK,OAAO,gBAAgB;AAAA,QAC9C,UAAU,KAAK;AAAA,QACf,cAAc,KAAK;AAAA,QACnB,SAAS,KAAK;AAAA,QACd,YAAY,KAAK;AAAA,MACnB,CAAC;AACD,aAAO,MAAM;AAAA,IACf;AAAA,IACA,aAAa;AAAA,IAEb;AAAA,EACF;AACF;","names":[]}
@@ -1,27 +0,0 @@
1
- /**
2
- * Opt-in Resend transport for the teams invitations `sendInvitationEmail` seam.
3
- * Most adopters back the seam with Resend and hand-roll the same wrapper — and
4
- * the same mistake: `resend.emails.send()` returns `{ data, error }` and does NOT
5
- * throw on an API-level failure (unverified domain, rate limit, bad recipient),
6
- * so a `try/catch` alone records a failed send as a success. This helper sends
7
- * through the shared `renderInvitationEmail` template and returns a typed failure
8
- * on BOTH a thrown error AND a non-null `result.error`.
9
- *
10
- * `resend` is an OPTIONAL peer, imported only here: apps not on Resend keep
11
- * passing a raw seam, and the package core never pulls a mail dependency.
12
- */
13
- import type { SendInvitationEmailSeam } from './invitations-api';
14
- /** Define options for sending a resend invitation including sender address and optional API key */
15
- export interface ResendInvitationSenderOptions {
16
- /** RFC-5322 From header, e.g. `GTM Agent <noreply@gtm.tangle.tools>`. */
17
- from: string;
18
- /** Resend API key. Defaults to `process.env.RESEND_API_KEY`. */
19
- apiKey?: string;
20
- }
21
- /**
22
- * Build a `sendInvitationEmail` seam backed by Resend. Wire it into
23
- * `createInvitationsApi({ sendInvitationEmail: createResendInvitationSender({ from }) })`.
24
- * The client is built lazily on first send; with no key the seam fails typed
25
- * (the invitation is still created — emailStatus becomes 'failed').
26
- */
27
- export declare function createResendInvitationSender(opts: ResendInvitationSenderOptions): SendInvitationEmailSeam;
@@ -1,38 +0,0 @@
1
- import {
2
- renderInvitationEmail
3
- } from "../chunk-2DRYTJHI.js";
4
-
5
- // src/teams/resend.ts
6
- import { Resend } from "resend";
7
- function createResendInvitationSender(opts) {
8
- let client = null;
9
- function getClient() {
10
- if (client) return client;
11
- const key = opts.apiKey ?? (typeof process !== "undefined" ? process.env.RESEND_API_KEY : void 0);
12
- if (!key) return null;
13
- client = new Resend(key);
14
- return client;
15
- }
16
- return async (input) => {
17
- const resend = getClient();
18
- if (!resend) return { succeeded: false, error: "RESEND_API_KEY is not configured" };
19
- const msg = renderInvitationEmail(input, { fromAddress: opts.from });
20
- try {
21
- const result = await resend.emails.send({
22
- from: msg.from,
23
- to: input.to,
24
- subject: msg.subject,
25
- html: msg.html,
26
- text: msg.text
27
- });
28
- if (result.error) return { succeeded: false, error: result.error.message };
29
- return { succeeded: true };
30
- } catch (err) {
31
- return { succeeded: false, error: err instanceof Error ? err.message : "Invitation email failed to send" };
32
- }
33
- };
34
- }
35
- export {
36
- createResendInvitationSender
37
- };
38
- //# sourceMappingURL=resend.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/teams/resend.ts"],"sourcesContent":["/**\n * Opt-in Resend transport for the teams invitations `sendInvitationEmail` seam.\n * Most adopters back the seam with Resend and hand-roll the same wrapper — and\n * the same mistake: `resend.emails.send()` returns `{ data, error }` and does NOT\n * throw on an API-level failure (unverified domain, rate limit, bad recipient),\n * so a `try/catch` alone records a failed send as a success. This helper sends\n * through the shared `renderInvitationEmail` template and returns a typed failure\n * on BOTH a thrown error AND a non-null `result.error`.\n *\n * `resend` is an OPTIONAL peer, imported only here: apps not on Resend keep\n * passing a raw seam, and the package core never pulls a mail dependency.\n */\n\nimport { Resend } from 'resend'\nimport { renderInvitationEmail } from './invitations'\nimport type { SendInvitationEmailSeam } from './invitations-api'\n\n/** Define options for sending a resend invitation including sender address and optional API key */\nexport interface ResendInvitationSenderOptions {\n /** RFC-5322 From header, e.g. `GTM Agent <noreply@gtm.tangle.tools>`. */\n from: string\n /** Resend API key. Defaults to `process.env.RESEND_API_KEY`. */\n apiKey?: string\n}\n\n/**\n * Build a `sendInvitationEmail` seam backed by Resend. Wire it into\n * `createInvitationsApi({ sendInvitationEmail: createResendInvitationSender({ from }) })`.\n * The client is built lazily on first send; with no key the seam fails typed\n * (the invitation is still created — emailStatus becomes 'failed').\n */\nexport function createResendInvitationSender(opts: ResendInvitationSenderOptions): SendInvitationEmailSeam {\n let client: Resend | null = null\n\n function getClient(): Resend | null {\n if (client) return client\n const key = opts.apiKey ?? (typeof process !== 'undefined' ? process.env.RESEND_API_KEY : undefined)\n if (!key) return null\n client = new Resend(key)\n return client\n }\n\n return async (input) => {\n const resend = getClient()\n if (!resend) return { succeeded: false, error: 'RESEND_API_KEY is not configured' }\n\n const msg = renderInvitationEmail(input, { fromAddress: opts.from })\n try {\n const result = await resend.emails.send({\n from: msg.from,\n to: input.to,\n subject: msg.subject,\n html: msg.html,\n text: msg.text,\n })\n // Resend reports API-level failures in `result.error` WITHOUT throwing — a\n // try/catch alone would mark a failed send as a success.\n if (result.error) return { succeeded: false, error: result.error.message }\n return { succeeded: true }\n } catch (err) {\n return { succeeded: false, error: err instanceof Error ? err.message : 'Invitation email failed to send' }\n }\n }\n}\n"],"mappings":";;;;;AAaA,SAAS,cAAc;AAkBhB,SAAS,6BAA6B,MAA8D;AACzG,MAAI,SAAwB;AAE5B,WAAS,YAA2B;AAClC,QAAI,OAAQ,QAAO;AACnB,UAAM,MAAM,KAAK,WAAW,OAAO,YAAY,cAAc,QAAQ,IAAI,iBAAiB;AAC1F,QAAI,CAAC,IAAK,QAAO;AACjB,aAAS,IAAI,OAAO,GAAG;AACvB,WAAO;AAAA,EACT;AAEA,SAAO,OAAO,UAAU;AACtB,UAAM,SAAS,UAAU;AACzB,QAAI,CAAC,OAAQ,QAAO,EAAE,WAAW,OAAO,OAAO,mCAAmC;AAElF,UAAM,MAAM,sBAAsB,OAAO,EAAE,aAAa,KAAK,KAAK,CAAC;AACnE,QAAI;AACF,YAAM,SAAS,MAAM,OAAO,OAAO,KAAK;AAAA,QACtC,MAAM,IAAI;AAAA,QACV,IAAI,MAAM;AAAA,QACV,SAAS,IAAI;AAAA,QACb,MAAM,IAAI;AAAA,QACV,MAAM,IAAI;AAAA,MACZ,CAAC;AAGD,UAAI,OAAO,MAAO,QAAO,EAAE,WAAW,OAAO,OAAO,OAAO,MAAM,QAAQ;AACzE,aAAO,EAAE,WAAW,KAAK;AAAA,IAC3B,SAAS,KAAK;AACZ,aAAO,EAAE,WAAW,OAAO,OAAO,eAAe,QAAQ,IAAI,UAAU,kCAAkC;AAAA,IAC3G;AAAA,EACF;AACF;","names":[]}
@@ -1,14 +0,0 @@
1
- /**
2
- * Code-split entries for the teams React surface. Products that don't need the
3
- * members UI on initial load import these `React.lazy` handles instead of the
4
- * components directly, so the panel/page chunks load on first render. Mount
5
- * inside a `<Suspense>` boundary; the product provides the fallback.
6
- */
7
- import type { MembersPanelProps, InvitationsPanelProps, InviteAcceptPageProps } from './contracts';
8
- export type { MembersPanelProps, InvitationsPanelProps, InviteAcceptPageProps };
9
- /** Load MembersPanel component lazily to optimize initial rendering performance */
10
- export declare const MembersPanelLazy: import("react").LazyExoticComponent<typeof import("./components").MembersPanel>;
11
- /** Load InvitationsPanel component lazily to optimize initial rendering performance */
12
- export declare const InvitationsPanelLazy: import("react").LazyExoticComponent<typeof import("./components").InvitationsPanel>;
13
- /** Load InviteAcceptPage component lazily for optimized code splitting and performance */
14
- export declare const InviteAcceptPageLazy: import("react").LazyExoticComponent<typeof import("./components").InviteAcceptPage>;
@@ -1,17 +0,0 @@
1
- // src/teams-react/lazy.tsx
2
- import { lazy } from "react";
3
- var MembersPanelLazy = lazy(
4
- () => import("../MembersPanel-3ZK2GCMC.js").then((m) => ({ default: m.MembersPanel }))
5
- );
6
- var InvitationsPanelLazy = lazy(
7
- () => import("../InvitationsPanel-OFCYVSAE.js").then((m) => ({ default: m.InvitationsPanel }))
8
- );
9
- var InviteAcceptPageLazy = lazy(
10
- () => import("../InviteAcceptPage-BDOO4JSE.js").then((m) => ({ default: m.InviteAcceptPage }))
11
- );
12
- export {
13
- InvitationsPanelLazy,
14
- InviteAcceptPageLazy,
15
- MembersPanelLazy
16
- };
17
- //# sourceMappingURL=lazy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/teams-react/lazy.tsx"],"sourcesContent":["/**\n * Code-split entries for the teams React surface. Products that don't need the\n * members UI on initial load import these `React.lazy` handles instead of the\n * components directly, so the panel/page chunks load on first render. Mount\n * inside a `<Suspense>` boundary; the product provides the fallback.\n */\n\nimport { lazy } from 'react'\nimport type { MembersPanelProps, InvitationsPanelProps, InviteAcceptPageProps } from './contracts'\n\nexport type { MembersPanelProps, InvitationsPanelProps, InviteAcceptPageProps }\n\n/** Load MembersPanel component lazily to optimize initial rendering performance */\nexport const MembersPanelLazy = lazy(\n () => import('./components/MembersPanel').then((m) => ({ default: m.MembersPanel })),\n)\n\n/** Load InvitationsPanel component lazily to optimize initial rendering performance */\nexport const InvitationsPanelLazy = lazy(\n () => import('./components/InvitationsPanel').then((m) => ({ default: m.InvitationsPanel })),\n)\n\n/** Load InviteAcceptPage component lazily for optimized code splitting and performance */\nexport const InviteAcceptPageLazy = lazy(\n () => import('./components/InviteAcceptPage').then((m) => ({ default: m.InviteAcceptPage })),\n)\n"],"mappings":";AAOA,SAAS,YAAY;AAMd,IAAM,mBAAmB;AAAA,EAC9B,MAAM,OAAO,6BAA2B,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE;AACrF;AAGO,IAAM,uBAAuB;AAAA,EAClC,MAAM,OAAO,iCAA+B,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE;AAC7F;AAGO,IAAM,uBAAuB;AAAA,EAClC,MAAM,OAAO,iCAA+B,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE;AAC7F;","names":[]}
@@ -1,39 +0,0 @@
1
- /**
2
- * `inert`, across the React versions this package's peer range admits.
3
- *
4
- * MEASURED, not reasoned. `react` + `react-dom` 18.3.1 and 19.2.8, each
5
- * rendering `<div inert={…}>x</div>` through `renderToStaticMarkup`, and the
6
- * same four cases re-read as `outerHTML` after `createRoot().render` — server
7
- * and client agreed on every row:
8
- *
9
- * | prop | React 18.3.1 | React 19.2.8 |
10
- * | --------------- | ------------------------------- | ------------------------------- |
11
- * | `inert={false}` | `<div>x</div>` — NO attribute | `<div>x</div>` — NO attribute |
12
- * | `inert={''}` | `<div inert="">x</div>` — inert | `<div>x</div>` — NO attribute |
13
- * | `inert={true}` | `<div>x</div>` — NO attribute | `<div inert="">x</div>` — inert |
14
- * | `inert={'1'}` | `<div inert="1">x</div>` — inert | `<div inert="">x</div>` — inert |
15
- *
16
- * React 18 warns on the two it drops (`Received \`false\`/\`true\` for a
17
- * non-boolean attribute \`inert\`.`); React 19 warns on the one it drops
18
- * (`Received an empty string for a boolean attribute \`inert\`.`).
19
- *
20
- * So the FALSE case needs no help: both majors already emit nothing, and a
21
- * plain `inert={!open}` binding never made an open panel inert on either. The
22
- * TRUE case is the defect — `true` is dropped by 18 and `''` is dropped by 19,
23
- * so a plain boolean binding leaves a COLLAPSED panel focusable and
24
- * screen-reader readable on React 18, which `peerDependencies` (`react >=18`)
25
- * admits.
26
- *
27
- * The last row is the answer, and it is why this file no longer detects
28
- * anything. `inert` is an HTML boolean attribute: its PRESENCE is what makes an
29
- * element inert, whatever the value reads. A non-empty string is emitted by
30
- * both majors, warned about by neither, and inert on both — so there is one
31
- * spelling and no branch.
32
- */
33
- /**
34
- * Props that make an element inert when `inert` is true, and nothing at all
35
- * when it is false.
36
- */
37
- export declare function inertProps(inert: boolean): {
38
- inert?: boolean;
39
- };
@@ -1,140 +0,0 @@
1
- /**
2
- * Browser adapter for the Sandbox session gateway.
3
- *
4
- * The Sandbox SDK owns the WebSocket, reconnect, replay, cursor persistence,
5
- * and raw event delivery. This module only composes that client with a
6
- * product-owned grant endpoint and decodes the gateway's event envelope.
7
- *
8
- * Keep this entry separate from `web-react`: `@tangle-network/sandbox` is an
9
- * optional peer, and the dynamic import keeps it out of apps without a
10
- * sandbox-backed session.
11
- */
12
- /** A short-lived, read-only grant for one session's gateway stream. */
13
- export interface SessionStreamGrant {
14
- /** `wss://…/session`, resolved by the product server. */
15
- url: string;
16
- /** Read-only JWT. A browser must never receive a Sandbox API key. */
17
- token: string;
18
- /** Browser-facing session channel selected by the product. */
19
- sessionId: string;
20
- /** Unix seconds, as expected by the SDK token refresher. */
21
- expiresAt: number;
22
- }
23
- /** Common soft-miss reasons a product grant route may report. */
24
- export type SessionGrantUnavailableReason = 'sandbox-absent' | 'sandbox-not-running' | 'session-absent' | 'gateway-unreachable' | 'mint-failed';
25
- /** The grant endpoint response accepted by {@link parseSessionStreamGrant}. */
26
- export type SessionStreamGrantResponse = ({
27
- available: true;
28
- } & SessionStreamGrant) | {
29
- available: false;
30
- reason?: SessionGrantUnavailableReason;
31
- };
32
- /** A decoded event from the raw Sandbox gateway payload. */
33
- export interface GatewayTurnEvent {
34
- type: string;
35
- data?: Record<string, unknown>;
36
- }
37
- /** Event types that terminate a Sandbox execution. */
38
- export declare const GATEWAY_TERMINAL_EVENT_TYPES: ReadonlySet<string>;
39
- /** Gateway bookkeeping events that are not turn feedback. */
40
- export declare const GATEWAY_TRANSPORT_NOTICE_TYPES: ReadonlySet<string>;
41
- /** Report whether a decoded event ends the execution. */
42
- export declare function isTerminalGatewayEvent(type: string): boolean;
43
- /** Report whether a decoded event is gateway bookkeeping. */
44
- export declare function isGatewayTransportNotice(type: string): boolean;
45
- /**
46
- * Decode one raw `onAgentEvent` payload into the event shape a turn reducer
47
- * consumes. The gateway carries both message-lane and run/stream envelopes.
48
- */
49
- export declare function gatewayFrameToTurnEvent(raw: unknown): GatewayTurnEvent | null;
50
- /** Parse a grant response. Invalid or unavailable responses are soft misses. */
51
- export declare function parseSessionStreamGrant(body: unknown): SessionStreamGrant | null;
52
- /** Options for a product-owned grant fetcher. */
53
- export interface SessionStreamGrantFetcherOptions {
54
- /** Endpoint URL, or a function that receives the product scope id. */
55
- url: string | ((scopeId: string) => string);
56
- scopeId: string;
57
- /** Injectable for tests or a product-specific fetch wrapper. */
58
- fetchImpl?: typeof fetch;
59
- /** For example, `{ credentials: 'include' }` on a cross-origin endpoint. */
60
- requestInit?: RequestInit;
61
- }
62
- /**
63
- * Build a grant fetcher that never throws. A grant route is an optional live
64
- * lane, so auth misses, network failures, and malformed bodies fall back to
65
- * the product's durable lane.
66
- */
67
- export declare function createSessionStreamGrantFetcher(options: SessionStreamGrantFetcherOptions): (signal: AbortSignal) => Promise<SessionStreamGrant | null>;
68
- /** Minimal structural surface of the SDK session gateway client. */
69
- export interface SessionGatewayClientLike {
70
- connect(): void;
71
- disconnect(): void;
72
- replay(since: number): void | Promise<void>;
73
- clearReplayState(): void;
74
- }
75
- /** Structural replay storage accepted by the SDK client. */
76
- export interface ReplayCursorStorage {
77
- getItem(key: string): string | null;
78
- setItem(key: string, value: string): void;
79
- removeItem(key: string): void;
80
- }
81
- /** Subset of the SDK client configuration used by this adapter. */
82
- export interface SessionGatewayClientConfigLike {
83
- url: string;
84
- token: string;
85
- sessionId: string;
86
- autoReconnect?: boolean;
87
- enableReplayPersistence?: boolean;
88
- replayStorage?: ReplayCursorStorage;
89
- onTokenRefresh?: () => Promise<{
90
- token: string;
91
- expiresAt: number;
92
- }>;
93
- handlers?: {
94
- onAgentEvent?: (channel: string, data: unknown, sequenceId?: number) => void;
95
- onBackpressureWarning?: (dropped: number, since: number, totalDropped?: number) => void;
96
- onTokenExpired?: () => void;
97
- onError?: (message: string, code?: string) => void;
98
- };
99
- }
100
- /** Injectable SDK-client constructor, used for tests and alternate transports. */
101
- export type SessionGatewayClientFactory = (config: SessionGatewayClientConfigLike) => SessionGatewayClientLike | Promise<SessionGatewayClientLike>;
102
- /** Callbacks driven by one live gateway attachment. */
103
- export interface SessionGatewayLiveViewHandlers {
104
- signal: AbortSignal;
105
- /** Every non-duplicate, non-transport event. */
106
- onEvent: (event: GatewayTurnEvent) => void;
107
- /** Called after the first real turn event, not a gateway notice. */
108
- onFirstTurnEvent?: () => void;
109
- /** Called for each terminal turn event. */
110
- onTerminal?: () => void;
111
- /** Called when an attached lane becomes unusable. */
112
- onUnusable?: (reason: string) => void;
113
- }
114
- /** A handle that stops one gateway attachment. */
115
- export interface SessionGatewayLiveViewAttachment {
116
- close(): void;
117
- }
118
- /** Structural connector returned by {@link createSessionGatewayLane}. */
119
- export type SessionGatewayLiveViewConnector = (handlers: SessionGatewayLiveViewHandlers) => Promise<SessionGatewayLiveViewAttachment | null>;
120
- /** Options for {@link createSessionGatewayLane}. */
121
- export interface SessionGatewayLaneOptions {
122
- /** Mint a grant. `null` is a soft miss with no attachable live stream. */
123
- fetchGrant(signal: AbortSignal): Promise<SessionStreamGrant | null>;
124
- /** Replay cursor storage. Defaults to `window.localStorage`; `null` disables it. */
125
- replayStorage?: ReplayCursorStorage | null;
126
- /** Override the SDK client constructor for tests or another compatible client. */
127
- createClient?: SessionGatewayClientFactory;
128
- /** Maximum sequence ids retained for duplicate suppression. */
129
- appliedSeqCap?: number;
130
- }
131
- /** Default bound on applied sequence ids retained by one attachment. */
132
- export declare const APPLIED_SEQ_CAP = 100000;
133
- /**
134
- * Build a browser-direct Sandbox live-view connector.
135
- *
136
- * The caller supplies a product-authenticated grant fetcher and owns the
137
- * transcript reducer. A missing grant returns `null`, allowing a durable
138
- * replay lane to take over without changing the turn.
139
- */
140
- export declare function createSessionGatewayLane(options: SessionGatewayLaneOptions): SessionGatewayLiveViewConnector;