@copilotkit/core 1.55.2 → 1.55.3-canary.1776215089
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/dist/index.cjs +21 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +14 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +21 -3
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +28 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -628,6 +628,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
628
628
|
_defineProperty(this, "singleEndpointUrl", void 0);
|
|
629
629
|
_defineProperty(this, "runtimeMode", void 0);
|
|
630
630
|
_defineProperty(this, "intelligence", void 0);
|
|
631
|
+
_defineProperty(this, "_capabilities", void 0);
|
|
631
632
|
_defineProperty(this, "delegate", void 0);
|
|
632
633
|
_defineProperty(this, "runtimeInfoPromise", void 0);
|
|
633
634
|
this.runtimeUrl = normalizedRuntimeUrl !== null && normalizedRuntimeUrl !== void 0 ? normalizedRuntimeUrl : config.runtimeUrl;
|
|
@@ -635,8 +636,16 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
635
636
|
this.transport = transport;
|
|
636
637
|
this.runtimeMode = (_config$runtimeMode = config.runtimeMode) !== null && _config$runtimeMode !== void 0 ? _config$runtimeMode : _copilotkit_shared.RUNTIME_MODE_SSE;
|
|
637
638
|
this.intelligence = config.intelligence;
|
|
639
|
+
this._capabilities = config.capabilities;
|
|
638
640
|
if (this.transport === "single") this.singleEndpointUrl = this.runtimeUrl;
|
|
639
641
|
}
|
|
642
|
+
get capabilities() {
|
|
643
|
+
return this._capabilities;
|
|
644
|
+
}
|
|
645
|
+
async getCapabilities() {
|
|
646
|
+
var _this$_capabilities;
|
|
647
|
+
return (_this$_capabilities = this._capabilities) !== null && _this$_capabilities !== void 0 ? _this$_capabilities : {};
|
|
648
|
+
}
|
|
640
649
|
async detachActiveRun() {
|
|
641
650
|
if (this.delegate) await this.delegate.detachActiveRun();
|
|
642
651
|
await super.detachActiveRun();
|
|
@@ -742,7 +751,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
742
751
|
credentials: this.credentials,
|
|
743
752
|
transport: this.transport,
|
|
744
753
|
runtimeMode: this.runtimeMode,
|
|
745
|
-
intelligence: this.intelligence
|
|
754
|
+
intelligence: this.intelligence,
|
|
755
|
+
capabilities: this._capabilities
|
|
746
756
|
});
|
|
747
757
|
cloned.threadId = this.threadId;
|
|
748
758
|
cloned.setState(this.state);
|
|
@@ -1072,7 +1082,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1072
1082
|
const runtimeInfoResponse = await this.fetchRuntimeInfo();
|
|
1073
1083
|
const { version, ...runtimeInfo } = runtimeInfoResponse;
|
|
1074
1084
|
const credentials = this.core.credentials;
|
|
1075
|
-
this.remoteAgents = Object.fromEntries(Object.entries(runtimeInfo.agents).map(([id, { description }]) => {
|
|
1085
|
+
this.remoteAgents = Object.fromEntries(Object.entries(runtimeInfo.agents).map(([id, { description, capabilities }]) => {
|
|
1076
1086
|
var _runtimeInfoResponse$;
|
|
1077
1087
|
const agent = new ProxiedCopilotRuntimeAgent({
|
|
1078
1088
|
runtimeUrl: this.runtimeUrl,
|
|
@@ -1081,7 +1091,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1081
1091
|
transport: this._runtimeTransport,
|
|
1082
1092
|
credentials,
|
|
1083
1093
|
runtimeMode: (_runtimeInfoResponse$ = runtimeInfoResponse.mode) !== null && _runtimeInfoResponse$ !== void 0 ? _runtimeInfoResponse$ : _copilotkit_shared.RUNTIME_MODE_SSE,
|
|
1084
|
-
intelligence: runtimeInfoResponse.intelligence
|
|
1094
|
+
intelligence: runtimeInfoResponse.intelligence,
|
|
1095
|
+
capabilities
|
|
1085
1096
|
});
|
|
1086
1097
|
this.applyHeadersToAgent(agent);
|
|
1087
1098
|
return [id, agent];
|
|
@@ -1669,6 +1680,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1669
1680
|
agent.setMessages([]);
|
|
1670
1681
|
agent.setState({});
|
|
1671
1682
|
if (agent instanceof _ag_ui_client.HttpAgent) agent.headers = { ...this._internal.headers };
|
|
1683
|
+
await this._internal.notifySubscribers((subscriber) => {
|
|
1684
|
+
var _subscriber$onAgentRu;
|
|
1685
|
+
return (_subscriber$onAgentRu = subscriber.onAgentRunStarted) === null || _subscriber$onAgentRu === void 0 ? void 0 : _subscriber$onAgentRu.call(subscriber, {
|
|
1686
|
+
copilotkit: this.core,
|
|
1687
|
+
agent
|
|
1688
|
+
});
|
|
1689
|
+
}, "Subscriber onAgentRunStarted error:");
|
|
1672
1690
|
const runAgentResult = await agent.connectAgent({
|
|
1673
1691
|
forwardedProps: this._internal.properties,
|
|
1674
1692
|
tools: this.buildFrontendTools(agent.agentId),
|
|
@@ -1700,6 +1718,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1700
1718
|
if (agent instanceof _ag_ui_client.HttpAgent) agent.headers = { ...this._internal.headers };
|
|
1701
1719
|
if (agent.detachActiveRun) await agent.detachActiveRun();
|
|
1702
1720
|
this._internal.subscribeAgentToStateManager(agent);
|
|
1721
|
+
await this._internal.notifySubscribers((subscriber) => {
|
|
1722
|
+
var _subscriber$onAgentRu2;
|
|
1723
|
+
return (_subscriber$onAgentRu2 = subscriber.onAgentRunStarted) === null || _subscriber$onAgentRu2 === void 0 ? void 0 : _subscriber$onAgentRu2.call(subscriber, {
|
|
1724
|
+
copilotkit: this.core,
|
|
1725
|
+
agent
|
|
1726
|
+
});
|
|
1727
|
+
}, "Subscriber onAgentRunStarted error:");
|
|
1703
1728
|
const isTopLevel = this._runDepth === 0;
|
|
1704
1729
|
let originalAbortRun;
|
|
1705
1730
|
if (isTopLevel) {
|