@astralbeam/sdk 0.25.0 → 0.26.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 +1 -1
- package/dist/client.d.ts +10 -10
- package/dist/client.js +2 -2
- package/dist/{combobox-B6w-LeTo.js → combobox-DP4y27_X.js} +1 -1
- package/dist/{core-zgz5sorX.js → core-iDw0grkb.js} +43 -43
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/{index-Cg2qqahU.d.ts → index-Coxrpa2o.d.ts} +10 -10
- package/dist/{listings-BMUU5Ssj.js → listings-Vd3lhoY9.js} +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/server.js +44 -44
- package/dist/{validate-BOw-BAyv.js → validate-lNXZvCeQ.js} +4 -4
- package/dist/{widget-DxIW_E_U.js → widget-G_WaD28k.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { At as personalMcpTestConnection, Bt as uploadChatFile, C as getChatConfig, Ct as personalMcpAuthorizeConnection, Dt as personalMcpDisconnectConnection, Et as personalMcpCreateConnection, Ht as isAstralBeamApiError, Lt as updateChatThread, Ot as personalMcpGetCatalog, S as deleteChatThread, Tt as personalMcpCompleteAuthorization, Ut as resolveApiUrl, Vt as astralBeamChatFetch, dt as getThreadAttachment, gt as listChatMessages, it as getRunChatUrl, k as getCurrentUser, kt as personalMcpSetHeaders, rt as getResolveChatToolResultUrl, vt as listChatThreads, wt as personalMcpBindBrowser, y as createChatThread } from "./api-CzXKVU8Z.js";
|
|
2
|
-
import { _ as strictDecoder, i as isObject, l as decode, p as JWTInvalid } from "./validate-
|
|
2
|
+
import { _ as strictDecoder, i as isObject, l as decode, p as JWTInvalid } from "./validate-lNXZvCeQ.js";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
@@ -13,27 +13,27 @@ var __exportAll = (all, no_symbols) => {
|
|
|
13
13
|
return target;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
|
-
//#region ../node_modules/.bun/jose@6.2.
|
|
16
|
+
//#region ../node_modules/.bun/jose@6.2.15/node_modules/jose/dist/webapi/util/decode_jwt.js
|
|
17
17
|
function decodeJwt(jwt) {
|
|
18
18
|
if (typeof jwt != "string") throw new JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
19
|
-
const { 1:
|
|
19
|
+
const { 1: encodedPayload, length } = jwt.split(".");
|
|
20
20
|
if (length === 5) throw new JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");
|
|
21
21
|
if (length !== 3) throw new JWTInvalid("Invalid JWT");
|
|
22
|
-
if (!
|
|
23
|
-
let
|
|
22
|
+
if (!encodedPayload) throw new JWTInvalid("JWTs must contain a payload");
|
|
23
|
+
let claimsSetBytes;
|
|
24
24
|
try {
|
|
25
|
-
|
|
26
|
-
} catch {
|
|
27
|
-
throw new JWTInvalid("Failed to base64url decode the payload");
|
|
25
|
+
claimsSetBytes = decode(encodedPayload);
|
|
26
|
+
} catch (cause) {
|
|
27
|
+
throw new JWTInvalid("Failed to base64url decode the payload", { cause });
|
|
28
28
|
}
|
|
29
|
-
let
|
|
29
|
+
let claimsSet;
|
|
30
30
|
try {
|
|
31
|
-
|
|
32
|
-
} catch {
|
|
33
|
-
throw new JWTInvalid("Failed to parse the decoded payload as JSON");
|
|
31
|
+
claimsSet = JSON.parse(strictDecoder.decode(claimsSetBytes));
|
|
32
|
+
} catch (cause) {
|
|
33
|
+
throw new JWTInvalid("Failed to parse the decoded payload as JSON", { cause });
|
|
34
34
|
}
|
|
35
|
-
if (!isObject(
|
|
36
|
-
return
|
|
35
|
+
if (!isObject(claimsSet)) throw new JWTInvalid("Invalid JWT Claims Set");
|
|
36
|
+
return claimsSet;
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region ../node_modules/.bun/@tanstack+store@0.11.2/node_modules/@tanstack/store/dist/alien.js
|
|
@@ -532,7 +532,7 @@ function normalizeMessagesDates(messages) {
|
|
|
532
532
|
return messages.map(normalizeMessageDates);
|
|
533
533
|
}
|
|
534
534
|
//#endregion
|
|
535
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
535
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-usage.js
|
|
536
536
|
function definedDetails(value) {
|
|
537
537
|
return Object.keys(value).length > 0 ? value : void 0;
|
|
538
538
|
}
|
|
@@ -577,7 +577,7 @@ function fromSpecTokenUsage(usage, leftover) {
|
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
579
|
//#endregion
|
|
580
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
580
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/merge-metadata.js
|
|
581
581
|
function isPlainRecord$1(value) {
|
|
582
582
|
return value != null && typeof value === "object" && !Array.isArray(value);
|
|
583
583
|
}
|
|
@@ -656,7 +656,7 @@ let EventType = /* @__PURE__ */ function(EventType) {
|
|
|
656
656
|
return EventType;
|
|
657
657
|
}({});
|
|
658
658
|
//#endregion
|
|
659
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
659
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/tool-call-arguments.js
|
|
660
660
|
function sameJsonValue(left, right) {
|
|
661
661
|
if (Object.is(left, right)) return true;
|
|
662
662
|
if (Array.isArray(left) && Array.isArray(right)) return left.length === right.length && left.every((value, index) => sameJsonValue(value, right[index]));
|
|
@@ -821,7 +821,7 @@ function finishToolCallArguments(streamed, end) {
|
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
823
|
//#endregion
|
|
824
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
824
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/reasoning-encrypted-value.js
|
|
825
825
|
/**
|
|
826
826
|
* Id prefix for the reasoning message of a redacted thinking block (Anthropic
|
|
827
827
|
* `redacted_thinking`). AG-UI's `encryptedValue` does not say what kind of
|
|
@@ -833,7 +833,7 @@ function isRedactedThinkingId(id) {
|
|
|
833
833
|
return typeof id === "string" && id.startsWith("redacted_thinking-");
|
|
834
834
|
}
|
|
835
835
|
//#endregion
|
|
836
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
836
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/interrupt-serialization.js
|
|
837
837
|
var SHA256_K = new Uint32Array([
|
|
838
838
|
1116352408,
|
|
839
839
|
1899447441,
|
|
@@ -1008,7 +1008,7 @@ function cloneAndDeepFreezeJson(value) {
|
|
|
1008
1008
|
return clone;
|
|
1009
1009
|
}
|
|
1010
1010
|
//#endregion
|
|
1011
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1011
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/interrupts.js
|
|
1012
1012
|
function canonicalizeInterruptResolutions(resolutions) {
|
|
1013
1013
|
const frozen = cloneAndDeepFreezeJson([...resolutions].sort((left, right) => left.interruptId.localeCompare(right.interruptId)));
|
|
1014
1014
|
const canonicalResolutions = canonicalInterruptJson(frozen);
|
|
@@ -1019,7 +1019,7 @@ function canonicalizeInterruptResolutions(resolutions) {
|
|
|
1019
1019
|
});
|
|
1020
1020
|
}
|
|
1021
1021
|
//#endregion
|
|
1022
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1022
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/tools/schema-converter.js
|
|
1023
1023
|
/**
|
|
1024
1024
|
* Build a JSONSchema object from any plain key/value source. The `JSONSchema`
|
|
1025
1025
|
* interface's `[key: string]: any` index signature makes every property
|
|
@@ -1287,7 +1287,7 @@ async function validateWithStandardSchema(schema, data) {
|
|
|
1287
1287
|
};
|
|
1288
1288
|
}
|
|
1289
1289
|
//#endregion
|
|
1290
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1290
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/tools/approval-schema.js
|
|
1291
1291
|
var jsonSchemaKeywords = /* @__PURE__ */ new Set([
|
|
1292
1292
|
"$schema",
|
|
1293
1293
|
"$id",
|
|
@@ -1401,7 +1401,7 @@ function hashSchemaInput(schema) {
|
|
|
1401
1401
|
return digestInterruptJson(canonicalInterruptJson(schemaToWire(schema).jsonSchema ?? { standardValidator: "unserialized" }));
|
|
1402
1402
|
}
|
|
1403
1403
|
//#endregion
|
|
1404
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1404
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/interrupt-resume.js
|
|
1405
1405
|
/**
|
|
1406
1406
|
* The `Interrupt.metadata` key under which this package's resume binding
|
|
1407
1407
|
* travels.
|
|
@@ -1522,7 +1522,7 @@ function readInterruptBinding(descriptor) {
|
|
|
1522
1522
|
};
|
|
1523
1523
|
}
|
|
1524
1524
|
//#endregion
|
|
1525
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1525
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/interrupt-definition.js
|
|
1526
1526
|
var INTERRUPT_PAYLOAD_METADATA_KEY = "tanstack:interruptPayload";
|
|
1527
1527
|
function schemaJson(schema, name) {
|
|
1528
1528
|
if (!isStandardJSONSchema(schema)) throw new TypeError(`${name} must be a Standard Schema with a JSON Schema converter.`);
|
|
@@ -1547,7 +1547,7 @@ function hashInterruptDefinitionSchema(schema) {
|
|
|
1547
1547
|
return digestInterruptJson(schemaJson(schema, "Interrupt schema").canonicalJson);
|
|
1548
1548
|
}
|
|
1549
1549
|
//#endregion
|
|
1550
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1550
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/generic-interrupt-continuation.js
|
|
1551
1551
|
/**
|
|
1552
1552
|
* `ResumeEntry.metadata` key for a first-party generic request.
|
|
1553
1553
|
*
|
|
@@ -1586,7 +1586,7 @@ function genericInterruptContinuationFromDescriptor(interrupt) {
|
|
|
1586
1586
|
};
|
|
1587
1587
|
}
|
|
1588
1588
|
//#endregion
|
|
1589
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1589
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/subagent-wire.js
|
|
1590
1590
|
function isRecord$2(value) {
|
|
1591
1591
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1592
1592
|
}
|
|
@@ -1700,7 +1700,7 @@ function splitSubagentWire(messages) {
|
|
|
1700
1700
|
};
|
|
1701
1701
|
}
|
|
1702
1702
|
//#endregion
|
|
1703
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1703
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/provider-executed.js
|
|
1704
1704
|
/**
|
|
1705
1705
|
* Narrow a tool call's opaque `metadata` to the provider-executed convention.
|
|
1706
1706
|
* Returns the typed metadata when the call is provider-executed, else `null`.
|
|
@@ -1730,7 +1730,7 @@ function isAssistantSegmentOf(id, parentId) {
|
|
|
1730
1730
|
return id?.startsWith(`${parentId}-segment-`) === true;
|
|
1731
1731
|
}
|
|
1732
1732
|
//#endregion
|
|
1733
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1733
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/tool-result.js
|
|
1734
1734
|
var CONTENT_PART_TYPES = /* @__PURE__ */ new Set([
|
|
1735
1735
|
"text",
|
|
1736
1736
|
"image",
|
|
@@ -1791,7 +1791,7 @@ function normalizeToolResult(result) {
|
|
|
1791
1791
|
return JSON.stringify(result);
|
|
1792
1792
|
}
|
|
1793
1793
|
//#endregion
|
|
1794
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1794
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/block-order.js
|
|
1795
1795
|
/**
|
|
1796
1796
|
* The order map for these entries in produced order, or undefined when they
|
|
1797
1797
|
* are in the default order (all thinking, then text, then tool calls).
|
|
@@ -1879,7 +1879,7 @@ function orderedAssistantBlocks(message) {
|
|
|
1879
1879
|
return blocks;
|
|
1880
1880
|
}
|
|
1881
1881
|
//#endregion
|
|
1882
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
1882
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/messages.js
|
|
1883
1883
|
function isRecord$1(value) {
|
|
1884
1884
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1885
1885
|
}
|
|
@@ -2591,7 +2591,7 @@ function generateMessageId() {
|
|
|
2591
2591
|
return `msg-${Date.now()}-${Math.random().toString(36).substring(7)}`;
|
|
2592
2592
|
}
|
|
2593
2593
|
//#endregion
|
|
2594
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
2594
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-wire.js
|
|
2595
2595
|
function isRecord(value) {
|
|
2596
2596
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2597
2597
|
}
|
|
@@ -2974,7 +2974,7 @@ function hashContent(s) {
|
|
|
2974
2974
|
return Math.abs(h).toString(36);
|
|
2975
2975
|
}
|
|
2976
2976
|
//#endregion
|
|
2977
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
2977
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/restore-inbound-chunk.js
|
|
2978
2978
|
/**
|
|
2979
2979
|
* Rebuild TanStack `TokenUsage` (`promptTokens`) from spec `usage[]` plus
|
|
2980
2980
|
* leftover fields in `metadata.tanstack.usage`. Restore the in-process field
|
|
@@ -3011,7 +3011,7 @@ function restoreInboundChunk(chunk) {
|
|
|
3011
3011
|
return next;
|
|
3012
3012
|
}
|
|
3013
3013
|
//#endregion
|
|
3014
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
3014
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/tools/tool-definition.js
|
|
3015
3015
|
/**
|
|
3016
3016
|
* Create an isomorphic tool definition that can be used directly or instantiated for server/client
|
|
3017
3017
|
*
|
|
@@ -3109,7 +3109,7 @@ function toolDefinition(config) {
|
|
|
3109
3109
|
};
|
|
3110
3110
|
}
|
|
3111
3111
|
//#endregion
|
|
3112
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
3112
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/chunk-ids.js
|
|
3113
3113
|
function stringField(value) {
|
|
3114
3114
|
return typeof value === "string" && value !== "" ? value : void 0;
|
|
3115
3115
|
}
|
|
@@ -3212,7 +3212,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3212
3212
|
exports.default = exports.Allow;
|
|
3213
3213
|
}));
|
|
3214
3214
|
//#endregion
|
|
3215
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
3215
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/stream/json-parser.js
|
|
3216
3216
|
var import_dist = (/* @__PURE__ */ __commonJSMin(((exports, module, this$1) => {
|
|
3217
3217
|
var __createBinding = this$1 && this$1.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
3218
3218
|
if (k2 === void 0) k2 = k;
|
|
@@ -3434,7 +3434,7 @@ function parsePartialJSON(jsonString) {
|
|
|
3434
3434
|
return defaultJSONParser.parse(jsonString);
|
|
3435
3435
|
}
|
|
3436
3436
|
//#endregion
|
|
3437
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
3437
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/stream/strategies.js
|
|
3438
3438
|
/**
|
|
3439
3439
|
* Immediate Strategy - emit on every chunk (default behavior)
|
|
3440
3440
|
*/
|
|
@@ -3444,7 +3444,7 @@ var ImmediateStrategy = class {
|
|
|
3444
3444
|
}
|
|
3445
3445
|
};
|
|
3446
3446
|
//#endregion
|
|
3447
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
3447
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/errors.js
|
|
3448
3448
|
/**
|
|
3449
3449
|
* Convert an AG-UI RUN_ERROR event to the Error shape exposed to consumers.
|
|
3450
3450
|
* Preserves the provider code and sanitized raw event when available.
|
|
@@ -4105,7 +4105,7 @@ var fast_json_patch_default = Object.assign({}, core_exports, duplex_exports, {
|
|
|
4105
4105
|
unescapePathComponent
|
|
4106
4106
|
});
|
|
4107
4107
|
//#endregion
|
|
4108
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
4108
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/activity-records.js
|
|
4109
4109
|
function isActivityPart(part) {
|
|
4110
4110
|
return part.type === "activity";
|
|
4111
4111
|
}
|
|
@@ -4181,7 +4181,7 @@ function applyActivityDeltaToUIMessages(messages, chunk) {
|
|
|
4181
4181
|
}
|
|
4182
4182
|
}
|
|
4183
4183
|
//#endregion
|
|
4184
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
4184
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/stream/message-updaters.js
|
|
4185
4185
|
/**
|
|
4186
4186
|
* Message Updaters (Internal)
|
|
4187
4187
|
*
|
|
@@ -4483,7 +4483,7 @@ function updateThinkingPart(messages, messageId, stepId, content, signature) {
|
|
|
4483
4483
|
});
|
|
4484
4484
|
}
|
|
4485
4485
|
//#endregion
|
|
4486
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
4486
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/stream/processor.js
|
|
4487
4487
|
/**
|
|
4488
4488
|
* Unified Stream Processor
|
|
4489
4489
|
*
|
|
@@ -6612,7 +6612,7 @@ function createReplayStream(recording) {
|
|
|
6612
6612
|
} };
|
|
6613
6613
|
}
|
|
6614
6614
|
//#endregion
|
|
6615
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
6615
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/errors.js
|
|
6616
6616
|
var ByokMissingError = class extends Error {
|
|
6617
6617
|
provider;
|
|
6618
6618
|
constructor(provider) {
|
|
@@ -6638,14 +6638,14 @@ var ByokUnresolvedProviderError = class extends Error {
|
|
|
6638
6638
|
}
|
|
6639
6639
|
};
|
|
6640
6640
|
//#endregion
|
|
6641
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
6641
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/providers.js
|
|
6642
6642
|
/** `[a-z][a-z0-9-]{0,63}` — lowercase, no underscores, max 64 chars. */
|
|
6643
6643
|
var BYOK_PROVIDER_ID_PATTERN = /^[a-z][a-z0-9-]{0,63}$/;
|
|
6644
6644
|
function isProviderId(value) {
|
|
6645
6645
|
return typeof value === "string" && BYOK_PROVIDER_ID_PATTERN.test(value);
|
|
6646
6646
|
}
|
|
6647
6647
|
//#endregion
|
|
6648
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
6648
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/missing.js
|
|
6649
6649
|
function isByokMissingBody(value) {
|
|
6650
6650
|
if (typeof value !== "object" || value === null) return false;
|
|
6651
6651
|
if (!("error" in value)) return false;
|
package/dist/core.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ChatSubmissionCallbacks, B as RenderWidgetInput, C as lastPartInProgress, D as AstralBeamChatState, E as AstralBeamChatCoreOptions, F as McpCatalog, G as SandboxStatus, H as SandboxArtifact, I as McpConnectionOperation, J as ParametersSchema, K as InferParameters, L as ChatAuthenticationState, M as createAstralBeamChat, N as ChatPendingInteraction, O as ChatStreamCallbacks, P as ChatThread, R as WidgetDeclaration, S as isSettledToolCall, T as AstralBeamChatCore, U as SandboxCommandRun, V as SandboxActivity, W as SandboxFileWrite, X as ToolDefinition, Y as StandardSchemaV1, _ as readSandboxArtifact, a as defineTool, b as sandboxRefusal, c as SANDBOX_LIST_FILES_TOOL, d as SANDBOX_RUN_COMMAND_TOOL, f as SANDBOX_STATUS_EVENT, g as isSandboxTool, h as describeSandboxCommandRun, i as WebSource, j as WidgetRenderRequest, k as ChatSubmission, l as SANDBOX_PUBLISH_ARTIFACT_TOOL, m as collectSandboxActivity, n as WebEvidence, o as ASK_QUESTIONNAIRE_TOOL, p as SANDBOX_WRITE_FILE_TOOL, q as JsonSchemaObject, r as WebPartMetadata, s as RENDER_WIDGET_TOOL, t as WebCitation, u as SANDBOX_READ_FILE_TOOL, v as readSandboxCommandRun, w as AgentToolInfo, x as hasPendingToolRun, y as readSandboxFileWrite, z as buildAgentTools } from "./index-
|
|
1
|
+
import { A as ChatSubmissionCallbacks, B as RenderWidgetInput, C as lastPartInProgress, D as AstralBeamChatState, E as AstralBeamChatCoreOptions, F as McpCatalog, G as SandboxStatus, H as SandboxArtifact, I as McpConnectionOperation, J as ParametersSchema, K as InferParameters, L as ChatAuthenticationState, M as createAstralBeamChat, N as ChatPendingInteraction, O as ChatStreamCallbacks, P as ChatThread, R as WidgetDeclaration, S as isSettledToolCall, T as AstralBeamChatCore, U as SandboxCommandRun, V as SandboxActivity, W as SandboxFileWrite, X as ToolDefinition, Y as StandardSchemaV1, _ as readSandboxArtifact, a as defineTool, b as sandboxRefusal, c as SANDBOX_LIST_FILES_TOOL, d as SANDBOX_RUN_COMMAND_TOOL, f as SANDBOX_STATUS_EVENT, g as isSandboxTool, h as describeSandboxCommandRun, i as WebSource, j as WidgetRenderRequest, k as ChatSubmission, l as SANDBOX_PUBLISH_ARTIFACT_TOOL, m as collectSandboxActivity, n as WebEvidence, o as ASK_QUESTIONNAIRE_TOOL, p as SANDBOX_WRITE_FILE_TOOL, q as JsonSchemaObject, r as WebPartMetadata, s as RENDER_WIDGET_TOOL, t as WebCitation, u as SANDBOX_READ_FILE_TOOL, v as readSandboxCommandRun, w as AgentToolInfo, x as hasPendingToolRun, y as readSandboxFileWrite, z as buildAgentTools } from "./index-Coxrpa2o.js";
|
|
2
2
|
export { ASK_QUESTIONNAIRE_TOOL, type AgentToolInfo, type AstralBeamChatCore, type AstralBeamChatCoreOptions, type AstralBeamChatState, type ChatAuthenticationState, type ChatPendingInteraction, type ChatStreamCallbacks, type ChatSubmission, type ChatSubmissionCallbacks, type ChatThread, type InferParameters, type JsonSchemaObject, type McpCatalog, type McpConnectionOperation, type ParametersSchema, RENDER_WIDGET_TOOL, type RenderWidgetInput, SANDBOX_LIST_FILES_TOOL, SANDBOX_PUBLISH_ARTIFACT_TOOL, SANDBOX_READ_FILE_TOOL, SANDBOX_RUN_COMMAND_TOOL, SANDBOX_STATUS_EVENT, SANDBOX_WRITE_FILE_TOOL, type SandboxActivity, type SandboxArtifact, type SandboxCommandRun, type SandboxFileWrite, type SandboxStatus, type StandardSchemaV1, type ToolDefinition, type WebCitation, type WebEvidence, type WebPartMetadata, type WebSource, type WidgetDeclaration, type WidgetRenderRequest, buildAgentTools, collectSandboxActivity, createAstralBeamChat, defineTool, describeSandboxCommandRun, hasPendingToolRun, isSandboxTool, isSettledToolCall, lastPartInProgress, readSandboxArtifact, readSandboxCommandRun, readSandboxFileWrite, sandboxRefusal };
|
package/dist/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { h as ASK_QUESTIONNAIRE_TOOL, g as RENDER_WIDGET_TOOL, _ as SANDBOX_LIST_FILES_TOOL, v as SANDBOX_PUBLISH_ARTIFACT_TOOL, y as SANDBOX_READ_FILE_TOOL, b as SANDBOX_RUN_COMMAND_TOOL, x as SANDBOX_STATUS_EVENT, S as SANDBOX_WRITE_FILE_TOOL, m as buildAgentTools, i as collectSandboxActivity, r as createAstralBeamChat, t as defineTool, a as describeSandboxCommandRun, d as hasPendingToolRun, o as isSandboxTool, f as isSettledToolCall, p as lastPartInProgress, s as readSandboxArtifact, c as readSandboxCommandRun, l as readSandboxFileWrite, u as sandboxRefusal } from "./core-
|
|
1
|
+
export { h as ASK_QUESTIONNAIRE_TOOL, g as RENDER_WIDGET_TOOL, _ as SANDBOX_LIST_FILES_TOOL, v as SANDBOX_PUBLISH_ARTIFACT_TOOL, y as SANDBOX_READ_FILE_TOOL, b as SANDBOX_RUN_COMMAND_TOOL, x as SANDBOX_STATUS_EVENT, S as SANDBOX_WRITE_FILE_TOOL, m as buildAgentTools, i as collectSandboxActivity, r as createAstralBeamChat, t as defineTool, a as describeSandboxCommandRun, d as hasPendingToolRun, o as isSandboxTool, f as isSettledToolCall, p as lastPartInProgress, s as readSandboxArtifact, c as readSandboxCommandRun, l as readSandboxFileWrite, u as sandboxRefusal } from "./core-iDw0grkb.js";
|
|
@@ -116,7 +116,7 @@ declare namespace StandardJSONSchemaV1 {
|
|
|
116
116
|
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
117
117
|
}
|
|
118
118
|
//#endregion
|
|
119
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
119
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/middleware/capabilities.d.ts
|
|
120
120
|
/**
|
|
121
121
|
* The minimal context shape a capability accessor needs. The full
|
|
122
122
|
* `ChatMiddlewareContext` satisfies this (it has `capabilities`), so accessors
|
|
@@ -169,7 +169,7 @@ declare class CapabilityRegistry {
|
|
|
169
169
|
has(handle: CapabilityHandle): boolean;
|
|
170
170
|
}
|
|
171
171
|
//#endregion
|
|
172
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
172
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/interrupts.d.ts
|
|
173
173
|
interface InterruptCorrelation {
|
|
174
174
|
threadId: string;
|
|
175
175
|
interruptedRunId: string;
|
|
@@ -2873,11 +2873,11 @@ type SubagentInfo = {
|
|
|
2873
2873
|
description?: string;
|
|
2874
2874
|
};
|
|
2875
2875
|
//#endregion
|
|
2876
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
2876
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-usage.d.ts
|
|
2877
2877
|
/** TokenUsage fields that have no AG-UI `usage[]` equivalent. */
|
|
2878
2878
|
type TokenUsageLeftover = Omit<TokenUsage$1, 'promptTokens' | 'completionTokens' | 'totalTokens'>;
|
|
2879
2879
|
//#endregion
|
|
2880
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
2880
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/subagent-wire.d.ts
|
|
2881
2881
|
/**
|
|
2882
2882
|
* Card data that travels on each child wire message, in
|
|
2883
2883
|
* `metadata.tanstack.subagent`. The messages carry the AG-UI `subagentRunId`.
|
|
@@ -2887,7 +2887,7 @@ interface SubagentWireInfo extends SubagentInfo, Pick<SubagentHandleData, 'statu
|
|
|
2887
2887
|
placeholder?: true;
|
|
2888
2888
|
}
|
|
2889
2889
|
//#endregion
|
|
2890
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
2890
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/types.d.ts
|
|
2891
2891
|
/**
|
|
2892
2892
|
* Tool call states - track the lifecycle of a tool call
|
|
2893
2893
|
*/
|
|
@@ -3913,7 +3913,7 @@ interface SubagentErrorEvent extends SubagentErrorEvent$1 {}
|
|
|
3913
3913
|
*/
|
|
3914
3914
|
type StreamChunk = AGUIEvent;
|
|
3915
3915
|
//#endregion
|
|
3916
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
3916
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/interrupt-definition.d.ts
|
|
3917
3917
|
type PortableSchema = StandardJSONSchemaV1<any, any> | StandardSchemaV1$1<any, any>;
|
|
3918
3918
|
type InterruptInput<TPayloadSchema extends PortableSchema | undefined, TPayload = unknown> = {
|
|
3919
3919
|
key: string;
|
|
@@ -3955,7 +3955,7 @@ interface InterruptDefinition<TId extends string, TPayloadSchema extends Portabl
|
|
|
3955
3955
|
interrupt: InterruptRequestMethod<TId, TPayloadSchema, TResponseSchema, TPayload, TPayloadInput>;
|
|
3956
3956
|
}
|
|
3957
3957
|
//#endregion
|
|
3958
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
3958
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/tools/tool-definition.d.ts
|
|
3959
3959
|
/**
|
|
3960
3960
|
* Type-level brand key for {@link ToolApprovalCapabilityMarker}. Only ever used
|
|
3961
3961
|
* in type positions, but it must stay exported: a `unique symbol` referenced by
|
|
@@ -4037,7 +4037,7 @@ type InferToolOutput<T> = T extends {
|
|
|
4037
4037
|
outputSchema?: infer TOutput;
|
|
4038
4038
|
} ? TOutput extends StandardJSONSchemaV1<any, any> ? InferSchemaType<TOutput> : TOutput extends StandardSchemaV1$1<any, any> ? InferSchemaType<TOutput> : TOutput extends JSONSchema ? unknown : InferSchemaType<TOutput> : unknown;
|
|
4039
4039
|
//#endregion
|
|
4040
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
4040
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/define-provider.d.ts
|
|
4041
4041
|
/**
|
|
4042
4042
|
* A BYOK provider declared by an adapter. `id` is the `x-byok-<id>` slug and
|
|
4043
4043
|
* is required — `{ id?: string }` is not a {@link ByokProvider}.
|
|
@@ -4057,14 +4057,14 @@ interface ByokProvider<TId extends string = string> {
|
|
|
4057
4057
|
readonly with?: ReadonlyArray<ByokProvider>;
|
|
4058
4058
|
}
|
|
4059
4059
|
//#endregion
|
|
4060
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
4060
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/providers.d.ts
|
|
4061
4061
|
/**
|
|
4062
4062
|
* Provider ids are open slugs, not a closed catalog. `@tanstack/ai` does not
|
|
4063
4063
|
* list adapters. Any matching string is a valid id and becomes `x-byok-<id>`.
|
|
4064
4064
|
*/
|
|
4065
4065
|
type ProviderId = string;
|
|
4066
4066
|
//#endregion
|
|
4067
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0.
|
|
4067
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.0.1+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/stream/types.d.ts
|
|
4068
4068
|
/**
|
|
4069
4069
|
* Strategy for determining when to emit text updates
|
|
4070
4070
|
*/
|