@apteva/web-sdk 0.5.5 → 0.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0 — 2026-09-07
4
+
5
+ - Add typed app-owned extensions through `defineAppExtension` and `client.use`.
6
+ - Add project/install-scoped app handles, HTTP/MCP request options, and app SSE subscriptions sharing live client credentials.
7
+ - Add framework-independent component references, manifest metadata types and a local export registry.
8
+ - Expose installed-app discovery and explicit metadata/version compatibility checks.
9
+ - Fix caller cancellation being overridden by request timeouts; retain cancellation and timeouts through response-body reads.
10
+ - Add abortable fetch subscriptions with SSE resume IDs, optional cursor queries, bounded opt-in deduplication, configurable reconnect delay and terminal auth handling.
11
+ - Add coordinated host-owned access-token renewal without automatically replaying HTTP requests.
12
+ - Preserve legacy Channel Chat APIs; app-specific extensions and UI stay in app-owned packages.
13
+
3
14
  ## 0.5.5 — 2026-08-15
4
15
 
5
16
  - Add a generic, opaque `accessToken` credential to `AptevaClient`, including
package/README.md CHANGED
@@ -93,6 +93,185 @@ If the MCP call returns a JSON-RPC error, the SDK throws `AptevaError(-1, messag
93
93
 
94
94
  For lower-level usage, `client.callTool(appName, toolName, args)` and the standalone `unwrapMCP(envelope)` are both exported.
95
95
 
96
+ ## App-owned extensions and web components
97
+
98
+ Apps can publish a headless client and frontend components from their own
99
+ versioned package. The core SDK supplies transport, component references, and
100
+ metadata checks; it has no React dependency and does not import executable UI
101
+ from a server. A dashboard wrapper and an external package can share the same
102
+ component source, receiving an app handle instead of implementing authentication
103
+ and requests again.
104
+
105
+ ### Typed extensions
106
+
107
+ `defineAppExtension` preserves the extension's return type. `client.use` supplies
108
+ an authenticated app handle. Each call creates a new instance: retain it in your
109
+ host (for example with React's `useMemo`), and close subscriptions when unmounting.
110
+ An async `create` is supported; `use` then returns its Promise unchanged.
111
+
112
+ ```ts
113
+ import { AptevaClient, defineAppExtension } from "@apteva/web-sdk";
114
+
115
+ // Illustrative app-owned API. Replace routes and wire types with your app's contract.
116
+ const itemsExtension = defineAppExtension({
117
+ app: "example",
118
+ create: ({ app }) => ({
119
+ list: (signal?: AbortSignal) =>
120
+ app.get<Array<{ id: string; title: string }>>("/items", { signal }),
121
+ }),
122
+ });
123
+
124
+ const client = new AptevaClient({ baseURL: "https://agents.example.com", accessToken });
125
+ const items = client.use(itemsExtension, { projectId: "p1", installId: 42 });
126
+ const rows = await items.list(); // typed result
127
+ ```
128
+
129
+ Extensions contain the app's own business logic and API contract validation.
130
+ A Conversations extension and its chat, inbox, and approval UI belong in the
131
+ Conversations package. The existing `client.chat` remains a Channel Chat API;
132
+ it is not redirected to Conversations.
133
+
134
+ ### Shared app transport
135
+
136
+ `client.app(name, { projectId, installId })` scopes HTTP, MCP, and subscriptions
137
+ together. It exposes `name`, `projectId`, and `installId` for host context and
138
+ reads the client's current credentials on each request or reconnection.
139
+ Explicit handle scope overrides routing query parameters. With no explicit
140
+ project scope, the existing client default and query-override behavior remain.
141
+ The platform still validates the selected installation and project.
142
+
143
+ ```ts
144
+ const app = client.app("example", { projectId: "p1", installId: 42 });
145
+ const controller = new AbortController();
146
+
147
+ await app.post("/items", { title: "Hello" }, { signal: controller.signal });
148
+ await app.tool("items_list", {}, { signal: controller.signal });
149
+
150
+ const subscription = app.subscribe<{ id: string; title: string }>(
151
+ "/events",
152
+ (row, metadata) => console.log(row, metadata.event, metadata.id),
153
+ { signal: controller.signal, eventTypes: ["item.updated"] },
154
+ );
155
+ subscription.close();
156
+ ```
157
+
158
+ All HTTP helpers accept `RequestInit`; MCP accepts it as the third argument.
159
+ Cancellation works alongside the client timeout, including while reading the
160
+ response body. App paths must start with `/` and remain inside the app route.
161
+ Use the raw client methods for platform endpoints. No HTTP method is retried
162
+ automatically. Pass an app-supported idempotency header or body field explicitly
163
+ when the app contract permits a write to be retried.
164
+
165
+ ### Component exports and manifest metadata
166
+
167
+ `AppComponentReference` is the existing `{ app, name, props? }` message shape;
168
+ `ChatComponent` remains a compatible name. `AppComponentSpec` mirrors existing
169
+ `provides.ui_components` metadata, including slots, prop schemas and widget
170
+ settings. There is no second server declaration format.
171
+
172
+ `AppComponentRegistry<T>` maps those app/component names to local frontend
173
+ exports. It accepts framework-specific components or host-owned loaders without
174
+ adding a framework dependency. Registration rejects duplicate names atomically
175
+ and returns an idempotent unregister function; unknown references resolve to
176
+ `undefined` so the host can render a fallback.
177
+
178
+ ```ts
179
+ import { AppComponentRegistry } from "@apteva/web-sdk";
180
+ import { ItemCard } from "./components/ItemCard"; // or an app-owned frontend package
181
+
182
+ const components = new AppComponentRegistry<typeof ItemCard>();
183
+ const unregister = components.register("example", { "item-card": ItemCard });
184
+ const Component = components.resolve({ app: "example", name: "item-card" });
185
+ // Render Component using your framework and validated, appropriate props.
186
+ unregister();
187
+ ```
188
+
189
+ `AppComponentContext` defines a host-injected `app: AppHandle`. Pass this trusted
190
+ context separately from message data; do not let message props replace it.
191
+ The host handles rendering, slots, schema validation, loading/error boundaries,
192
+ theme and component lifecycle. Registry membership alone does not establish
193
+ installation, compatibility, identity or authorization. Existing dashboard
194
+ module loading remains a host concern; installing this SDK does not port an
195
+ existing component's fetch calls or styling automatically.
196
+
197
+ ### Installed-app discovery and compatibility
198
+
199
+ `client.apps.list({ projectId? }, requestInit?)` wraps the existing `/api/apps`
200
+ endpoint and defaults to the client's project. This endpoint retains its current
201
+ platform permissions; application-user tokens are not guaranteed access. Hosts
202
+ can instead supply metadata they have already obtained through an authorized
203
+ flow. Extension setup does not automatically perform discovery.
204
+
205
+ ```ts
206
+ import { checkAppCompatibility, assertAppCompatibility } from "@apteva/web-sdk";
207
+
208
+ const installed = (await client.apps.list()).find(app => app.install_id === 42);
209
+ const requirements = {
210
+ app: "example",
211
+ version: { description: "1.x", accepts: (version: string) => version.startsWith("1.") },
212
+ tools: ["items_list"],
213
+ components: ["item-card"],
214
+ };
215
+ const result = checkAppCompatibility(installed, requirements); // { compatible, issues }
216
+ assertAppCompatibility(installed, requirements); // AptevaError if incompatible
217
+ ```
218
+
219
+ Version policy belongs to the app package: supply a predicate (including a semver
220
+ library if needed). These checks validate advertised app identity, version,
221
+ tools and components. They do not infer API schema versions, backend health,
222
+ permissions or unadvertised capabilities. App extensions should separately
223
+ validate any app-owned versioned API contract they require.
224
+
225
+ ### Subscription recovery
226
+
227
+ Generic subscriptions accept `signal`; already-aborted signals open no connection.
228
+ Bearer credentials use authenticated fetch streaming. Cookie clients can opt into
229
+ fetch with `transport: "fetch"`. `lastEventId`, `cursorParam`, `deduplicate`, and
230
+ `reconnectDelayMs` also select fetch streaming, even if an EventSource was supplied.
231
+
232
+ ```ts
233
+ const subscription = app.subscribe("/events", onEvent, {
234
+ signal: controller.signal,
235
+ lastEventId: savedEventId,
236
+ cursorParam: "since_id", // only if this app accepts SSE IDs here
237
+ deduplicate: true, // only if the app promises unique IDs per event
238
+ deduplicationWindow: 1000,
239
+ reconnectDelayMs: 1000,
240
+ });
241
+ ```
242
+
243
+ Fetch streams preserve SSE IDs across reconnects, send `Last-Event-ID`, and
244
+ optionally send the same ID in the app's cursor query parameter. Deduplication
245
+ is opt-in and bounded to the most recent 1000 delivered IDs by default; ID-less
246
+ updates are always delivered. It does not persist across new subscriptions.
247
+ Message-row IDs and SSE IDs are not interchangeable unless the backend says so.
248
+ Named events still require `eventTypes`. Malformed JSON is skipped; a throwing
249
+ fetch-stream event/open callback is reported and closes the subscription.
250
+
251
+ Reconnect delay defaults to 1000ms. Closing or aborting cancels the active reader
252
+ and any pending reconnect. Fetch streams stop on 204 or 403, and on 401 unless
253
+ credentials can be renewed once before a successful connection. Other failures
254
+ reconnect. Native EventSource retains the browser's own reconnect behavior.
255
+ The SDK cannot supply replay, a gap-free history/live handoff, or durable delivery
256
+ unless the app backend implements those contracts.
257
+
258
+ ### Host-owned credential renewal
259
+
260
+ Configure `refreshAccessToken: async () => tokenOrUndefined` on the client to
261
+ reuse your own authentication flow. Concurrent 401s coordinate one in-flight
262
+ refresh. `client.refreshAccessToken()` can also be called proactively; it returns
263
+ whether a new token was applied. A login/logout/token replacement during a
264
+ refresh wins over the late result. An undefined result leaves credentials intact.
265
+
266
+ A failed HTTP request still throws its original 401 and triggers `onUnauthorized`
267
+ after the renewal attempt; it is never replayed. Subsequent calls use the new
268
+ token. Requests with a caller-supplied Authorization header do not trigger
269
+ renewal. Fetch SSE can reconnect once with renewed credentials; another 401
270
+ before a successful connection terminates the subscription. Automatic renewal
271
+ failure preserves the original 401; direct `refreshAccessToken()` calls expose
272
+ hook errors. The SDK transports opaque credentials and makes no identity or
273
+ permission decisions.
274
+
96
275
  ## Agents
97
276
 
98
277
  `client.agents` wraps the core `/api/agents/*` routes — the running apteva-core child processes.
@@ -254,7 +433,7 @@ and `conversationKey` atomically resumes the same conversation.
254
433
  `client.delegatedUsers.create(...)` remains available for older trusted-backend
255
434
  integrations, but is deprecated and is no longer the recommended website flow.
256
435
 
257
- **Rendering note:** `ChatMessage.components[]` carries the agent's `respond(components=…)` attachments. The SDK hands you the data, but rendering app-provided UI components needs a dynamic-component loader the SDK doesn't include yet — third-party UIs render text + a placeholder for now.
436
+ **Rendering note:** `ChatMessage.components[]` carries the agent's `respond(components=…)` attachments. Use `AppComponentRegistry` to resolve these references against app-owned frontend exports, then render them in your host framework. The SDK does not dynamically load server-provided UI.
258
437
 
259
438
  A complete reference chat UI (message list, composer, streaming bubbles, optimistic send) lives in [`examples/dashboard/src/components/ChatCard.tsx`](./examples/dashboard/src/components/ChatCard.tsx).
260
439
 
package/dist/apps.d.ts ADDED
@@ -0,0 +1,34 @@
1
+ import type { AppComponentSpec } from "./components.js";
2
+ /** Relevant fields of the existing platform /api/apps response. */
3
+ export interface InstalledApp {
4
+ install_id: number;
5
+ name: string;
6
+ version: string;
7
+ project_id: string;
8
+ status: string;
9
+ display_name?: string;
10
+ source?: string;
11
+ ui_components?: AppComponentSpec[];
12
+ surfaces?: {
13
+ mcp_tool_names?: string[];
14
+ http_routes?: string[];
15
+ };
16
+ }
17
+ export interface AppRequirements {
18
+ app: string;
19
+ /** App packages choose their version policy; no implied wire/API version. */
20
+ version?: {
21
+ description: string;
22
+ accepts(version: string): boolean;
23
+ };
24
+ tools?: readonly string[];
25
+ components?: readonly string[];
26
+ }
27
+ export interface AppCompatibility {
28
+ compatible: boolean;
29
+ issues: string[];
30
+ }
31
+ /** Checks advertised metadata only. This never grants access to an app. */
32
+ export declare function checkAppCompatibility(installed: InstalledApp | undefined, requirements: AppRequirements): AppCompatibility;
33
+ export declare function assertAppCompatibility(installed: InstalledApp | undefined, requirements: AppRequirements): void;
34
+ //# sourceMappingURL=apps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,mEAAmE;AACnE,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE;QACT,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,6EAA6E;IAC7E,OAAO,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACrE,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,YAAY,GAAG,SAAS,EACnC,YAAY,EAAE,eAAe,GAC5B,gBAAgB,CAiBlB;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,YAAY,GAAG,SAAS,EACnC,YAAY,EAAE,eAAe,GAC5B,IAAI,CAGN"}
package/dist/apps.js ADDED
@@ -0,0 +1,30 @@
1
+ import { AptevaError } from "./errors.js";
2
+ /** Checks advertised metadata only. This never grants access to an app. */
3
+ export function checkAppCompatibility(installed, requirements) {
4
+ const issues = [];
5
+ if (!installed) {
6
+ issues.push(`app ${requirements.app} is not installed`);
7
+ }
8
+ else {
9
+ if (installed.name !== requirements.app)
10
+ issues.push(`expected app ${requirements.app}, got ${installed.name}`);
11
+ if (requirements.version && !requirements.version.accepts(installed.version)) {
12
+ issues.push(`version ${installed.version} does not satisfy ${requirements.version.description}`);
13
+ }
14
+ for (const tool of requirements.tools ?? []) {
15
+ if (!installed.surfaces?.mcp_tool_names?.includes(tool))
16
+ issues.push(`missing tool: ${tool}`);
17
+ }
18
+ for (const name of requirements.components ?? []) {
19
+ if (!installed.ui_components?.some((component) => component.name === name))
20
+ issues.push(`missing component: ${name}`);
21
+ }
22
+ }
23
+ return { compatible: issues.length === 0, issues };
24
+ }
25
+ export function assertAppCompatibility(installed, requirements) {
26
+ const result = checkAppCompatibility(installed, requirements);
27
+ if (!result.compatible)
28
+ throw new AptevaError(0, `incompatible app: ${result.issues.join("; ")}`);
29
+ }
30
+ //# sourceMappingURL=apps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.js","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,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AC;AACrD,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,SAAmC,EACnC,YAA6B;IAE7B,MAAM,MAAM,GAAG,qBAAqB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9D,IAAI,CAAC,MAAM,CAAC,UAAU;QAAE,MAAM,IAAI,WAAW,CAAC,CAAC,EAAE,qBAAqB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpG,CAAC"}
package/dist/client.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import type { Agent, AgentConfig, AgentCoreEvent, AgentCreateInput, AgentCreateResult, AgentDeleteResult, AgentPauseResult, AgentRestartResult, AgentStatus, AgentSystemMCPResult, AgentUpdateInput, AptevaClientOptions, AuthStatus, ChannelInfo, Chat, CreateChatOptions, CreateOrResumeChatOptions, ChatCreateResult, CreateDelegatedUserInput, DelegatedUserToken, ChatHistoryMessage, ChatMessage, ChatMessagesQuery, ChatSendInput, ChatSendOptions, ChatStreamOptions, MCPCallResponse, Project, StreamHandle, SubscribeOptions, TelemetryEvent, TelemetryPeriod, TelemetryQuery, TelemetryStats, Thread, TimelineBucket, UpdateChatOptions, User } from "./types.js";
1
+ import type { AppExtension, AppScope } from "./extensions.js";
2
+ import type { InstalledApp } from "./apps.js";
3
+ import type { Agent, AgentConfig, AgentCoreEvent, AgentCreateInput, AgentCreateResult, AgentDeleteResult, AgentPauseResult, AgentRestartResult, AgentStatus, AgentSystemMCPResult, AgentUpdateInput, AptevaClientOptions, AuthStatus, ChannelInfo, Chat, CreateChatOptions, CreateOrResumeChatOptions, ChatCreateResult, CreateDelegatedUserInput, DelegatedUserToken, ChatHistoryMessage, ChatMessage, ChatMessagesQuery, ChatSendInput, ChatSendOptions, ChatStreamOptions, MCPCallResponse, Project, StreamHandle, SubscribeOptions, SSEEventMetadata, TelemetryEvent, TelemetryPeriod, TelemetryQuery, TelemetryStats, Thread, TimelineBucket, UpdateChatOptions, User } from "./types.js";
2
4
  export declare class AptevaClient {
3
5
  private readonly baseURL;
4
6
  private apiKey?;
@@ -7,12 +9,18 @@ export declare class AptevaClient {
7
9
  private readonly fetchImpl;
8
10
  private readonly onUnauthorized?;
9
11
  private readonly timeoutMs;
12
+ private readonly refreshTokenHook?;
13
+ private credentialRevision;
14
+ private pendingTokenRefresh?;
10
15
  private readonly pendingChatResolutions;
11
16
  constructor(opts: AptevaClientOptions);
12
17
  setApiKey(key: string | undefined): void;
13
18
  getApiKey(): string | undefined;
14
19
  setAccessToken(token: string | undefined): void;
15
20
  getAccessToken(): string | undefined;
21
+ /** Refresh once for concurrent callers. Undefined leaves credentials unchanged. */
22
+ refreshAccessToken(): Promise<boolean>;
23
+ private renewAfterUnauthorized;
16
24
  readonly auth: {
17
25
  register: (email: string, password: string, name?: string) => Promise<{
18
26
  user: User;
@@ -61,7 +69,7 @@ export declare class AptevaClient {
61
69
  togglePause: (id: number) => Promise<AgentPauseResult>;
62
70
  event: <R = unknown>(id: number, body: Record<string, unknown>) => Promise<R>;
63
71
  control: <R = unknown>(id: number, body: Record<string, unknown>) => Promise<R>;
64
- events: <E = AgentCoreEvent>(id: number, onEvent: (event: E) => void, opts?: SubscribeOptions) => StreamHandle;
72
+ events: <E = AgentCoreEvent>(id: number, onEvent: (event: E, metadata: SSEEventMetadata) => void, opts?: SubscribeOptions) => StreamHandle;
65
73
  };
66
74
  readonly telemetry: {
67
75
  query: (q: TelemetryQuery) => Promise<TelemetryEvent[]>;
@@ -86,15 +94,21 @@ export declare class AptevaClient {
86
94
  last_seen_id: number;
87
95
  }>;
88
96
  };
89
- app<T = unknown>(name: string): AppHandle<T>;
90
- callTool<R>(appName: string, toolName: string, args: Record<string, unknown>): Promise<R>;
97
+ app<T = unknown>(name: string, scope?: AppScope): AppHandle<T>;
98
+ /** Create an extension instance. Retain it in the host; use() does not cache. */
99
+ use<T>(extension: AppExtension<T>, scope?: AppScope): T;
100
+ readonly apps: {
101
+ /** Requires the platform's existing app-list permission. No auth bypass. */
102
+ list: (scope?: Pick<AppScope, "projectId">, init?: RequestInit) => Promise<InstalledApp[]>;
103
+ };
104
+ callTool<R>(appName: string, toolName: string, args: Record<string, unknown>, init?: RequestInit): Promise<R>;
91
105
  get<R>(path: string, init?: RequestInit): Promise<R>;
92
106
  post<R>(path: string, body?: unknown, init?: RequestInit): Promise<R>;
93
107
  put<R>(path: string, body?: unknown, init?: RequestInit): Promise<R>;
94
108
  patch<R>(path: string, body?: unknown, init?: RequestInit): Promise<R>;
95
109
  del<R>(path: string, init?: RequestInit): Promise<R>;
96
110
  sseURL(path: string, params?: Record<string, string | number | undefined>): string;
97
- subscribe<E>(path: string, params: Record<string, string | number | undefined> | undefined, onEvent: (event: E) => void, opts?: SubscribeOptions): StreamHandle;
111
+ subscribe<E>(path: string, params: Record<string, string | number | undefined> | undefined, onEvent: (event: E, metadata: SSEEventMetadata) => void, opts?: SubscribeOptions): StreamHandle;
98
112
  private subscribeWithFetch;
99
113
  private bindAbortSignal;
100
114
  private appPath;
@@ -105,12 +119,15 @@ export declare class AptevaClient {
105
119
  export declare function unwrapMCP<R>(env: MCPCallResponse<unknown>): R;
106
120
  export interface AppHandle<TDefault = unknown> {
107
121
  readonly name: string;
108
- get<R = TDefault>(path: string): Promise<R>;
109
- post<R = TDefault>(path: string, body?: unknown): Promise<R>;
110
- put<R = TDefault>(path: string, body?: unknown): Promise<R>;
111
- patch<R = TDefault>(path: string, body?: unknown): Promise<R>;
112
- del<R = TDefault>(path: string): Promise<R>;
113
- tool<R = TDefault>(name: string, args?: Record<string, unknown>): Promise<R>;
122
+ readonly projectId?: string;
123
+ readonly installId?: number;
124
+ get<R = TDefault>(path: string, init?: RequestInit): Promise<R>;
125
+ post<R = TDefault>(path: string, body?: unknown, init?: RequestInit): Promise<R>;
126
+ put<R = TDefault>(path: string, body?: unknown, init?: RequestInit): Promise<R>;
127
+ patch<R = TDefault>(path: string, body?: unknown, init?: RequestInit): Promise<R>;
128
+ del<R = TDefault>(path: string, init?: RequestInit): Promise<R>;
129
+ tool<R = TDefault>(name: string, args?: Record<string, unknown>, init?: RequestInit): Promise<R>;
130
+ subscribe<E>(path: string, onEvent: (event: E, metadata: SSEEventMetadata) => void, opts?: SubscribeOptions): StreamHandle;
114
131
  mcpURL(queryParams?: Record<string, string>): string;
115
132
  }
116
133
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,iBAAiB,EAEjB,eAAe,EACf,OAAO,EAEP,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,IAAI,EACL,MAAM,YAAY,CAAC;AAIpB,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAa;IAC7C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAoC;gBAE/D,IAAI,EAAE,mBAAmB;IAYrC,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