@astralbeam/sdk 0.29.6 → 0.30.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 +38 -33
- package/dist/client.js +2 -2
- package/dist/{combobox-DP4y27_X.js → combobox-xio4DRYl.js} +1 -1
- package/dist/{core-iDw0grkb.js → core-DIrcPvaf.js} +37 -29
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/{index-Coxrpa2o.d.ts → index-COWV2LM7.d.ts} +38 -33
- package/dist/listings-C1-zJbVB.js +1 -0
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/{widget-G_WaD28k.js → widget-Dv4lVfPt.js} +13 -13
- package/package.json +1 -1
- package/dist/listings-Vd3lhoY9.js +0 -1
|
@@ -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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+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.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/stream/processor.js
|
|
4487
4487
|
/**
|
|
4488
4488
|
* Unified Stream Processor
|
|
4489
4489
|
*
|
|
@@ -4569,6 +4569,7 @@ var StreamProcessor = class StreamProcessor {
|
|
|
4569
4569
|
sealedMessageIds = /* @__PURE__ */ new Set();
|
|
4570
4570
|
thinkingOwners = /* @__PURE__ */ new Map();
|
|
4571
4571
|
runToolCallIds = [];
|
|
4572
|
+
handOverAtStreamEnd = false;
|
|
4572
4573
|
toolCallsSentToClient = /* @__PURE__ */ new Set();
|
|
4573
4574
|
childProcessors = /* @__PURE__ */ new Map();
|
|
4574
4575
|
childToolCalls = /* @__PURE__ */ new Map();
|
|
@@ -6007,6 +6008,7 @@ var StreamProcessor = class StreamProcessor {
|
|
|
6007
6008
|
if (this.activeRuns.size === 0) {
|
|
6008
6009
|
this.runToolCallIds = [];
|
|
6009
6010
|
this.toolCallsSentToClient.clear();
|
|
6011
|
+
this.handOverAtStreamEnd = false;
|
|
6010
6012
|
this.streamEndEmitted = false;
|
|
6011
6013
|
}
|
|
6012
6014
|
this.activeRuns.add(chunk.runId);
|
|
@@ -6041,6 +6043,7 @@ var StreamProcessor = class StreamProcessor {
|
|
|
6041
6043
|
this.completeAllToolCalls();
|
|
6042
6044
|
if (this.finishReason === "tool_calls" && chunk.outcome?.type !== "interrupt") {
|
|
6043
6045
|
for (const id of ids) this.sealedMessageIds.add(id);
|
|
6046
|
+
this.handOverAtStreamEnd = this.subagentRunId === void 0;
|
|
6044
6047
|
return;
|
|
6045
6048
|
}
|
|
6046
6049
|
if (!chunk.outcome || chunk.outcome.type === "success") this.handlePendingToolCalls(chunk.outcome?.pendingToolCallIds);
|
|
@@ -6449,6 +6452,10 @@ var StreamProcessor = class StreamProcessor {
|
|
|
6449
6452
|
* @see docs/chat-architecture.md#single-shot-text-response — Finalization step
|
|
6450
6453
|
*/
|
|
6451
6454
|
finalizeStream() {
|
|
6455
|
+
if (this.handOverAtStreamEnd) {
|
|
6456
|
+
this.handOverAtStreamEnd = false;
|
|
6457
|
+
if (!this.hasError) this.handlePendingToolCalls();
|
|
6458
|
+
}
|
|
6452
6459
|
this.isDone = true;
|
|
6453
6460
|
for (const event of this.closeChunk()) this.dispatchChunk(event);
|
|
6454
6461
|
this.closeChildChunkLanes();
|
|
@@ -6574,6 +6581,7 @@ var StreamProcessor = class StreamProcessor {
|
|
|
6574
6581
|
this.thinkingOwners.clear();
|
|
6575
6582
|
this.openChunk = null;
|
|
6576
6583
|
this.finishReason = null;
|
|
6584
|
+
this.handOverAtStreamEnd = false;
|
|
6577
6585
|
this.hasError = false;
|
|
6578
6586
|
this.isDone = false;
|
|
6579
6587
|
this.streamEndEmitted = false;
|
|
@@ -6612,7 +6620,7 @@ function createReplayStream(recording) {
|
|
|
6612
6620
|
} };
|
|
6613
6621
|
}
|
|
6614
6622
|
//#endregion
|
|
6615
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
6623
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/errors.js
|
|
6616
6624
|
var ByokMissingError = class extends Error {
|
|
6617
6625
|
provider;
|
|
6618
6626
|
constructor(provider) {
|
|
@@ -6638,14 +6646,14 @@ var ByokUnresolvedProviderError = class extends Error {
|
|
|
6638
6646
|
}
|
|
6639
6647
|
};
|
|
6640
6648
|
//#endregion
|
|
6641
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
6649
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/providers.js
|
|
6642
6650
|
/** `[a-z][a-z0-9-]{0,63}` — lowercase, no underscores, max 64 chars. */
|
|
6643
6651
|
var BYOK_PROVIDER_ID_PATTERN = /^[a-z][a-z0-9-]{0,63}$/;
|
|
6644
6652
|
function isProviderId(value) {
|
|
6645
6653
|
return typeof value === "string" && BYOK_PROVIDER_ID_PATTERN.test(value);
|
|
6646
6654
|
}
|
|
6647
6655
|
//#endregion
|
|
6648
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
6656
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/missing.js
|
|
6649
6657
|
function isByokMissingBody(value) {
|
|
6650
6658
|
if (typeof value !== "object" || value === null) return false;
|
|
6651
6659
|
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-COWV2LM7.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-DIrcPvaf.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.2.0+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.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/interrupts.d.ts
|
|
173
173
|
interface InterruptCorrelation {
|
|
174
174
|
threadId: string;
|
|
175
175
|
interruptedRunId: string;
|
|
@@ -252,33 +252,12 @@ declare global {
|
|
|
252
252
|
var __TANSTACK_EVENT_TARGET__: EventTarget | null;
|
|
253
253
|
}
|
|
254
254
|
//#endregion
|
|
255
|
-
//#region ../node_modules/.bun/@tanstack+ai-event-client@1.0.
|
|
256
|
-
type AIDevtoolsEventSource = 'client' | 'server' | 'devtools';
|
|
257
|
-
type AIDevtoolsEventVisibility = 'user-visible' | 'client-state' | 'server-internal' | 'devtools-action';
|
|
258
|
-
interface AIDevtoolsEventEnvelope {
|
|
259
|
-
eventId: string;
|
|
260
|
-
eventType: string;
|
|
261
|
-
timestamp: number;
|
|
262
|
-
source: AIDevtoolsEventSource;
|
|
263
|
-
visibility: AIDevtoolsEventVisibility;
|
|
264
|
-
runtimeId?: string;
|
|
265
|
-
clientId?: string;
|
|
266
|
-
requestId?: string;
|
|
267
|
-
streamId?: string;
|
|
268
|
-
hookId?: string;
|
|
269
|
-
threadId?: string;
|
|
270
|
-
runId?: string;
|
|
271
|
-
messageId?: string;
|
|
272
|
-
toolCallId?: string;
|
|
273
|
-
sequence?: number;
|
|
274
|
-
correlationId?: string;
|
|
275
|
-
relatedEventId?: string;
|
|
276
|
-
}
|
|
255
|
+
//#region ../node_modules/.bun/@tanstack+ai-event-client@1.0.1/node_modules/@tanstack/ai-event-client/dist/esm/envelope.d.ts
|
|
277
256
|
declare global {
|
|
278
257
|
var __TANSTACK_AI_DEVTOOLS_RUNTIME_ID__: string | undefined;
|
|
279
258
|
}
|
|
280
259
|
//#endregion
|
|
281
|
-
//#region ../node_modules/.bun/@tanstack+ai-event-client@1.0.
|
|
260
|
+
//#region ../node_modules/.bun/@tanstack+ai-event-client@1.0.1/node_modules/@tanstack/ai-event-client/dist/esm/index.d.ts
|
|
282
261
|
/**
|
|
283
262
|
* Detailed breakdown of prompt/input token usage.
|
|
284
263
|
* Fields are populated based on provider support.
|
|
@@ -2873,11 +2852,11 @@ type SubagentInfo = {
|
|
|
2873
2852
|
description?: string;
|
|
2874
2853
|
};
|
|
2875
2854
|
//#endregion
|
|
2876
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
2855
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-usage.d.ts
|
|
2877
2856
|
/** TokenUsage fields that have no AG-UI `usage[]` equivalent. */
|
|
2878
2857
|
type TokenUsageLeftover = Omit<TokenUsage$1, 'promptTokens' | 'completionTokens' | 'totalTokens'>;
|
|
2879
2858
|
//#endregion
|
|
2880
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
2859
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/subagent-wire.d.ts
|
|
2881
2860
|
/**
|
|
2882
2861
|
* Card data that travels on each child wire message, in
|
|
2883
2862
|
* `metadata.tanstack.subagent`. The messages carry the AG-UI `subagentRunId`.
|
|
@@ -2887,7 +2866,7 @@ interface SubagentWireInfo extends SubagentInfo, Pick<SubagentHandleData, 'statu
|
|
|
2887
2866
|
placeholder?: true;
|
|
2888
2867
|
}
|
|
2889
2868
|
//#endregion
|
|
2890
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
2869
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/types.d.ts
|
|
2891
2870
|
/**
|
|
2892
2871
|
* Tool call states - track the lifecycle of a tool call
|
|
2893
2872
|
*/
|
|
@@ -3913,7 +3892,7 @@ interface SubagentErrorEvent extends SubagentErrorEvent$1 {}
|
|
|
3913
3892
|
*/
|
|
3914
3893
|
type StreamChunk = AGUIEvent;
|
|
3915
3894
|
//#endregion
|
|
3916
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
3895
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/interrupt-definition.d.ts
|
|
3917
3896
|
type PortableSchema = StandardJSONSchemaV1<any, any> | StandardSchemaV1$1<any, any>;
|
|
3918
3897
|
type InterruptInput<TPayloadSchema extends PortableSchema | undefined, TPayload = unknown> = {
|
|
3919
3898
|
key: string;
|
|
@@ -3955,7 +3934,7 @@ interface InterruptDefinition<TId extends string, TPayloadSchema extends Portabl
|
|
|
3955
3934
|
interrupt: InterruptRequestMethod<TId, TPayloadSchema, TResponseSchema, TPayload, TPayloadInput>;
|
|
3956
3935
|
}
|
|
3957
3936
|
//#endregion
|
|
3958
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
3937
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/tools/tool-definition.d.ts
|
|
3959
3938
|
/**
|
|
3960
3939
|
* Type-level brand key for {@link ToolApprovalCapabilityMarker}. Only ever used
|
|
3961
3940
|
* in type positions, but it must stay exported: a `unique symbol` referenced by
|
|
@@ -4037,7 +4016,7 @@ type InferToolOutput<T> = T extends {
|
|
|
4037
4016
|
outputSchema?: infer TOutput;
|
|
4038
4017
|
} ? TOutput extends StandardJSONSchemaV1<any, any> ? InferSchemaType<TOutput> : TOutput extends StandardSchemaV1$1<any, any> ? InferSchemaType<TOutput> : TOutput extends JSONSchema ? unknown : InferSchemaType<TOutput> : unknown;
|
|
4039
4018
|
//#endregion
|
|
4040
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
4019
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/define-provider.d.ts
|
|
4041
4020
|
/**
|
|
4042
4021
|
* A BYOK provider declared by an adapter. `id` is the `x-byok-<id>` slug and
|
|
4043
4022
|
* is required — `{ id?: string }` is not a {@link ByokProvider}.
|
|
@@ -4057,14 +4036,14 @@ interface ByokProvider<TId extends string = string> {
|
|
|
4057
4036
|
readonly with?: ReadonlyArray<ByokProvider>;
|
|
4058
4037
|
}
|
|
4059
4038
|
//#endregion
|
|
4060
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
4039
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/providers.d.ts
|
|
4061
4040
|
/**
|
|
4062
4041
|
* Provider ids are open slugs, not a closed catalog. `@tanstack/ai` does not
|
|
4063
4042
|
* list adapters. Any matching string is a valid id and becomes `x-byok-<id>`.
|
|
4064
4043
|
*/
|
|
4065
4044
|
type ProviderId = string;
|
|
4066
4045
|
//#endregion
|
|
4067
|
-
//#region ../node_modules/.bun/@tanstack+ai@1.0
|
|
4046
|
+
//#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/stream/types.d.ts
|
|
4068
4047
|
/**
|
|
4069
4048
|
* Strategy for determining when to emit text updates
|
|
4070
4049
|
*/
|
|
@@ -4152,6 +4131,32 @@ declare class ByokClient {
|
|
|
4152
4131
|
unlock(): Promise<void>;
|
|
4153
4132
|
}
|
|
4154
4133
|
//#endregion
|
|
4134
|
+
//#region ../node_modules/.bun/@tanstack+ai-event-client@1.0.0/node_modules/@tanstack/ai-event-client/dist/esm/envelope.d.ts
|
|
4135
|
+
type AIDevtoolsEventSource = 'client' | 'server' | 'devtools';
|
|
4136
|
+
type AIDevtoolsEventVisibility = 'user-visible' | 'client-state' | 'server-internal' | 'devtools-action';
|
|
4137
|
+
interface AIDevtoolsEventEnvelope {
|
|
4138
|
+
eventId: string;
|
|
4139
|
+
eventType: string;
|
|
4140
|
+
timestamp: number;
|
|
4141
|
+
source: AIDevtoolsEventSource;
|
|
4142
|
+
visibility: AIDevtoolsEventVisibility;
|
|
4143
|
+
runtimeId?: string;
|
|
4144
|
+
clientId?: string;
|
|
4145
|
+
requestId?: string;
|
|
4146
|
+
streamId?: string;
|
|
4147
|
+
hookId?: string;
|
|
4148
|
+
threadId?: string;
|
|
4149
|
+
runId?: string;
|
|
4150
|
+
messageId?: string;
|
|
4151
|
+
toolCallId?: string;
|
|
4152
|
+
sequence?: number;
|
|
4153
|
+
correlationId?: string;
|
|
4154
|
+
relatedEventId?: string;
|
|
4155
|
+
}
|
|
4156
|
+
declare global {
|
|
4157
|
+
var __TANSTACK_AI_DEVTOOLS_RUNTIME_ID__: string | undefined;
|
|
4158
|
+
}
|
|
4159
|
+
//#endregion
|
|
4155
4160
|
//#region ../node_modules/.bun/@tanstack+ai-client@1.0.0+ac75b968c23456b3/node_modules/@tanstack/ai-client/dist/esm/events.d.ts
|
|
4156
4161
|
interface ChatClientRunEventContext {
|
|
4157
4162
|
threadId: string;
|