@copilotkit/runtime 1.10.5-next.0 → 1.10.5-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/__snapshots__/schema/schema.graphql +6 -0
- package/dist/{chunk-2JRX6LGW.mjs → chunk-C56AVUZI.mjs} +2 -2
- package/dist/{chunk-4GRKJVD6.mjs → chunk-CX4GADTM.mjs} +2 -2
- package/dist/{chunk-HZWVUP7K.mjs → chunk-FOXQPOXW.mjs} +184 -136
- package/dist/chunk-FOXQPOXW.mjs.map +1 -0
- package/dist/{chunk-TPMK44TE.mjs → chunk-H6QUY5ZQ.mjs} +16 -6
- package/dist/chunk-H6QUY5ZQ.mjs.map +1 -0
- package/dist/{chunk-WGOBL6DV.mjs → chunk-T4NLPBCY.mjs} +2 -2
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/{groq-adapter-4ba7b2f0.d.ts → groq-adapter-c8aec5c5.d.ts} +1 -1
- package/dist/{index-d4614f9b.d.ts → index-96b330da.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +216 -158
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{langserve-3f99bf2e.d.ts → langserve-0c6100e3.d.ts} +1 -1
- package/dist/lib/index.d.ts +12 -6
- package/dist/lib/index.js +216 -158
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +5 -5
- package/dist/lib/integrations/index.d.ts +4 -4
- package/dist/lib/integrations/index.js +188 -143
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +4 -4
- package/dist/lib/integrations/nest/index.d.ts +3 -3
- package/dist/lib/integrations/nest/index.js +188 -143
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +2 -2
- package/dist/lib/integrations/node-express/index.d.ts +3 -3
- package/dist/lib/integrations/node-express/index.js +188 -143
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +2 -2
- package/dist/lib/integrations/node-http/index.d.ts +3 -3
- package/dist/lib/integrations/node-http/index.js +188 -143
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +1 -1
- package/dist/service-adapters/index.d.ts +5 -5
- package/dist/{shared-26958730.d.ts → shared-35015e40.d.ts} +9 -2
- package/package.json +3 -3
- package/src/graphql/inputs/copilot-context.input.ts +10 -0
- package/src/graphql/inputs/generate-copilot-response.input.ts +4 -0
- package/src/graphql/resolvers/copilot.resolver.ts +1 -0
- package/src/lib/runtime/agui-action.ts +4 -0
- package/src/lib/runtime/copilot-runtime.ts +5 -0
- package/src/lib/runtime/langgraph/langgraph-agent.ts +27 -7
- package/src/lib/runtime/remote-actions.ts +4 -0
- package/dist/chunk-HZWVUP7K.mjs.map +0 -1
- package/dist/chunk-TPMK44TE.mjs.map +0 -1
- /package/dist/{chunk-2JRX6LGW.mjs.map → chunk-C56AVUZI.mjs.map} +0 -0
- /package/dist/{chunk-4GRKJVD6.mjs.map → chunk-CX4GADTM.mjs.map} +0 -0
- /package/dist/{chunk-WGOBL6DV.mjs.map → chunk-T4NLPBCY.mjs.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copilotRuntimeNodeExpressEndpoint
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-C56AVUZI.mjs";
|
|
4
|
+
import "../../../chunk-FOXQPOXW.mjs";
|
|
5
5
|
import "../../../chunk-SHBDMA63.mjs";
|
|
6
6
|
import "../../../chunk-F7IANE7Z.mjs";
|
|
7
7
|
import "../../../chunk-XWBDEXDA.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as graphql_yoga from 'graphql-yoga';
|
|
2
|
-
import { b as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../../shared-
|
|
2
|
+
import { b as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../../shared-35015e40.js';
|
|
3
3
|
import 'graphql';
|
|
4
4
|
import 'pino';
|
|
5
5
|
import '@copilotkit/shared';
|
|
6
|
-
import '../../../langserve-
|
|
7
|
-
import '../../../index-
|
|
6
|
+
import '../../../langserve-0c6100e3.js';
|
|
7
|
+
import '../../../index-96b330da.js';
|
|
8
8
|
import '../../../graphql/types/base/index.js';
|
|
9
9
|
import 'rxjs';
|
|
10
10
|
import '../../cloud/index.js';
|
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.10.5-next.
|
|
47
|
+
version: "1.10.5-next.1",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -85,7 +85,7 @@ var require_package = __commonJS({
|
|
|
85
85
|
"@ag-ui/client": "^0.0.37",
|
|
86
86
|
"@ag-ui/core": "^0.0.37",
|
|
87
87
|
"@ag-ui/encoder": "^0.0.37",
|
|
88
|
-
"@ag-ui/langgraph": "^0.0.
|
|
88
|
+
"@ag-ui/langgraph": "^0.0.13",
|
|
89
89
|
"@ag-ui/proto": "^0.0.37",
|
|
90
90
|
"@anthropic-ai/sdk": "^0.57.0",
|
|
91
91
|
"@copilotkit/shared": "workspace:*",
|
|
@@ -145,14 +145,14 @@ module.exports = __toCommonJS(node_http_exports);
|
|
|
145
145
|
var import_graphql_yoga2 = require("graphql-yoga");
|
|
146
146
|
|
|
147
147
|
// src/lib/integrations/shared.ts
|
|
148
|
-
var
|
|
148
|
+
var import_type_graphql27 = require("type-graphql");
|
|
149
149
|
|
|
150
150
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
151
|
-
var
|
|
151
|
+
var import_type_graphql21 = require("type-graphql");
|
|
152
152
|
var import_rxjs3 = require("rxjs");
|
|
153
153
|
|
|
154
154
|
// src/graphql/inputs/generate-copilot-response.input.ts
|
|
155
|
-
var
|
|
155
|
+
var import_type_graphql19 = require("type-graphql");
|
|
156
156
|
|
|
157
157
|
// src/graphql/inputs/message.input.ts
|
|
158
158
|
var import_type_graphql3 = require("type-graphql");
|
|
@@ -1510,7 +1510,8 @@ MetaEventInput = _ts_decorate16([
|
|
|
1510
1510
|
(0, import_type_graphql17.InputType)()
|
|
1511
1511
|
], MetaEventInput);
|
|
1512
1512
|
|
|
1513
|
-
// src/graphql/inputs/
|
|
1513
|
+
// src/graphql/inputs/copilot-context.input.ts
|
|
1514
|
+
var import_type_graphql18 = require("type-graphql");
|
|
1514
1515
|
function _ts_decorate17(decorators, target, key, desc) {
|
|
1515
1516
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1516
1517
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -1527,18 +1528,52 @@ function _ts_metadata17(k, v) {
|
|
|
1527
1528
|
return Reflect.metadata(k, v);
|
|
1528
1529
|
}
|
|
1529
1530
|
__name(_ts_metadata17, "_ts_metadata");
|
|
1531
|
+
var CopilotContextInput = class {
|
|
1532
|
+
description;
|
|
1533
|
+
value;
|
|
1534
|
+
};
|
|
1535
|
+
__name(CopilotContextInput, "CopilotContextInput");
|
|
1536
|
+
_ts_decorate17([
|
|
1537
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1538
|
+
_ts_metadata17("design:type", String)
|
|
1539
|
+
], CopilotContextInput.prototype, "description", void 0);
|
|
1540
|
+
_ts_decorate17([
|
|
1541
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1542
|
+
_ts_metadata17("design:type", String)
|
|
1543
|
+
], CopilotContextInput.prototype, "value", void 0);
|
|
1544
|
+
CopilotContextInput = _ts_decorate17([
|
|
1545
|
+
(0, import_type_graphql18.InputType)()
|
|
1546
|
+
], CopilotContextInput);
|
|
1547
|
+
|
|
1548
|
+
// src/graphql/inputs/generate-copilot-response.input.ts
|
|
1549
|
+
function _ts_decorate18(decorators, target, key, desc) {
|
|
1550
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1551
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1552
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
1553
|
+
else
|
|
1554
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1555
|
+
if (d = decorators[i])
|
|
1556
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1557
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1558
|
+
}
|
|
1559
|
+
__name(_ts_decorate18, "_ts_decorate");
|
|
1560
|
+
function _ts_metadata18(k, v) {
|
|
1561
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1562
|
+
return Reflect.metadata(k, v);
|
|
1563
|
+
}
|
|
1564
|
+
__name(_ts_metadata18, "_ts_metadata");
|
|
1530
1565
|
var GenerateCopilotResponseMetadataInput = class {
|
|
1531
1566
|
requestType;
|
|
1532
1567
|
};
|
|
1533
1568
|
__name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput");
|
|
1534
|
-
|
|
1535
|
-
(0,
|
|
1569
|
+
_ts_decorate18([
|
|
1570
|
+
(0, import_type_graphql19.Field)(() => CopilotRequestType, {
|
|
1536
1571
|
nullable: true
|
|
1537
1572
|
}),
|
|
1538
|
-
|
|
1573
|
+
_ts_metadata18("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
|
|
1539
1574
|
], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0);
|
|
1540
|
-
GenerateCopilotResponseMetadataInput =
|
|
1541
|
-
(0,
|
|
1575
|
+
GenerateCopilotResponseMetadataInput = _ts_decorate18([
|
|
1576
|
+
(0, import_type_graphql19.InputType)()
|
|
1542
1577
|
], GenerateCopilotResponseMetadataInput);
|
|
1543
1578
|
var GenerateCopilotResponseInput = class {
|
|
1544
1579
|
metadata;
|
|
@@ -1553,84 +1588,93 @@ var GenerateCopilotResponseInput = class {
|
|
|
1553
1588
|
agentStates;
|
|
1554
1589
|
extensions;
|
|
1555
1590
|
metaEvents;
|
|
1591
|
+
context;
|
|
1556
1592
|
};
|
|
1557
1593
|
__name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput");
|
|
1558
|
-
|
|
1559
|
-
(0,
|
|
1594
|
+
_ts_decorate18([
|
|
1595
|
+
(0, import_type_graphql19.Field)(() => GenerateCopilotResponseMetadataInput, {
|
|
1560
1596
|
nullable: false
|
|
1561
1597
|
}),
|
|
1562
|
-
|
|
1598
|
+
_ts_metadata18("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
|
|
1563
1599
|
], GenerateCopilotResponseInput.prototype, "metadata", void 0);
|
|
1564
|
-
|
|
1565
|
-
(0,
|
|
1600
|
+
_ts_decorate18([
|
|
1601
|
+
(0, import_type_graphql19.Field)(() => String, {
|
|
1566
1602
|
nullable: true
|
|
1567
1603
|
}),
|
|
1568
|
-
|
|
1604
|
+
_ts_metadata18("design:type", String)
|
|
1569
1605
|
], GenerateCopilotResponseInput.prototype, "threadId", void 0);
|
|
1570
|
-
|
|
1571
|
-
(0,
|
|
1606
|
+
_ts_decorate18([
|
|
1607
|
+
(0, import_type_graphql19.Field)(() => String, {
|
|
1572
1608
|
nullable: true
|
|
1573
1609
|
}),
|
|
1574
|
-
|
|
1610
|
+
_ts_metadata18("design:type", String)
|
|
1575
1611
|
], GenerateCopilotResponseInput.prototype, "runId", void 0);
|
|
1576
|
-
|
|
1577
|
-
(0,
|
|
1612
|
+
_ts_decorate18([
|
|
1613
|
+
(0, import_type_graphql19.Field)(() => [
|
|
1578
1614
|
MessageInput
|
|
1579
1615
|
]),
|
|
1580
|
-
|
|
1616
|
+
_ts_metadata18("design:type", Array)
|
|
1581
1617
|
], GenerateCopilotResponseInput.prototype, "messages", void 0);
|
|
1582
|
-
|
|
1583
|
-
(0,
|
|
1584
|
-
|
|
1618
|
+
_ts_decorate18([
|
|
1619
|
+
(0, import_type_graphql19.Field)(() => FrontendInput),
|
|
1620
|
+
_ts_metadata18("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
|
|
1585
1621
|
], GenerateCopilotResponseInput.prototype, "frontend", void 0);
|
|
1586
|
-
|
|
1587
|
-
(0,
|
|
1622
|
+
_ts_decorate18([
|
|
1623
|
+
(0, import_type_graphql19.Field)(() => CloudInput, {
|
|
1588
1624
|
nullable: true
|
|
1589
1625
|
}),
|
|
1590
|
-
|
|
1626
|
+
_ts_metadata18("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
|
|
1591
1627
|
], GenerateCopilotResponseInput.prototype, "cloud", void 0);
|
|
1592
|
-
|
|
1593
|
-
(0,
|
|
1628
|
+
_ts_decorate18([
|
|
1629
|
+
(0, import_type_graphql19.Field)(() => ForwardedParametersInput, {
|
|
1594
1630
|
nullable: true
|
|
1595
1631
|
}),
|
|
1596
|
-
|
|
1632
|
+
_ts_metadata18("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
|
|
1597
1633
|
], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0);
|
|
1598
|
-
|
|
1599
|
-
(0,
|
|
1634
|
+
_ts_decorate18([
|
|
1635
|
+
(0, import_type_graphql19.Field)(() => AgentSessionInput, {
|
|
1600
1636
|
nullable: true
|
|
1601
1637
|
}),
|
|
1602
|
-
|
|
1638
|
+
_ts_metadata18("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
|
|
1603
1639
|
], GenerateCopilotResponseInput.prototype, "agentSession", void 0);
|
|
1604
|
-
|
|
1605
|
-
(0,
|
|
1640
|
+
_ts_decorate18([
|
|
1641
|
+
(0, import_type_graphql19.Field)(() => AgentStateInput, {
|
|
1606
1642
|
nullable: true
|
|
1607
1643
|
}),
|
|
1608
|
-
|
|
1644
|
+
_ts_metadata18("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
|
|
1609
1645
|
], GenerateCopilotResponseInput.prototype, "agentState", void 0);
|
|
1610
|
-
|
|
1611
|
-
(0,
|
|
1646
|
+
_ts_decorate18([
|
|
1647
|
+
(0, import_type_graphql19.Field)(() => [
|
|
1612
1648
|
AgentStateInput
|
|
1613
1649
|
], {
|
|
1614
1650
|
nullable: true
|
|
1615
1651
|
}),
|
|
1616
|
-
|
|
1652
|
+
_ts_metadata18("design:type", Array)
|
|
1617
1653
|
], GenerateCopilotResponseInput.prototype, "agentStates", void 0);
|
|
1618
|
-
|
|
1619
|
-
(0,
|
|
1654
|
+
_ts_decorate18([
|
|
1655
|
+
(0, import_type_graphql19.Field)(() => ExtensionsInput, {
|
|
1620
1656
|
nullable: true
|
|
1621
1657
|
}),
|
|
1622
|
-
|
|
1658
|
+
_ts_metadata18("design:type", typeof ExtensionsInput === "undefined" ? Object : ExtensionsInput)
|
|
1623
1659
|
], GenerateCopilotResponseInput.prototype, "extensions", void 0);
|
|
1624
|
-
|
|
1625
|
-
(0,
|
|
1660
|
+
_ts_decorate18([
|
|
1661
|
+
(0, import_type_graphql19.Field)(() => [
|
|
1626
1662
|
MetaEventInput
|
|
1627
1663
|
], {
|
|
1628
1664
|
nullable: true
|
|
1629
1665
|
}),
|
|
1630
|
-
|
|
1666
|
+
_ts_metadata18("design:type", Array)
|
|
1631
1667
|
], GenerateCopilotResponseInput.prototype, "metaEvents", void 0);
|
|
1632
|
-
|
|
1633
|
-
(0,
|
|
1668
|
+
_ts_decorate18([
|
|
1669
|
+
(0, import_type_graphql19.Field)(() => [
|
|
1670
|
+
CopilotContextInput
|
|
1671
|
+
], {
|
|
1672
|
+
nullable: true
|
|
1673
|
+
}),
|
|
1674
|
+
_ts_metadata18("design:type", Array)
|
|
1675
|
+
], GenerateCopilotResponseInput.prototype, "context", void 0);
|
|
1676
|
+
GenerateCopilotResponseInput = _ts_decorate18([
|
|
1677
|
+
(0, import_type_graphql19.InputType)()
|
|
1634
1678
|
], GenerateCopilotResponseInput);
|
|
1635
1679
|
|
|
1636
1680
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
@@ -1944,8 +1988,8 @@ __name(UnknownErrorResponse, "UnknownErrorResponse");
|
|
|
1944
1988
|
var import_shared6 = require("@copilotkit/shared");
|
|
1945
1989
|
|
|
1946
1990
|
// src/graphql/types/agents-response.type.ts
|
|
1947
|
-
var
|
|
1948
|
-
function
|
|
1991
|
+
var import_type_graphql20 = require("type-graphql");
|
|
1992
|
+
function _ts_decorate19(decorators, target, key, desc) {
|
|
1949
1993
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1950
1994
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1951
1995
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1955,50 +1999,50 @@ function _ts_decorate18(decorators, target, key, desc) {
|
|
|
1955
1999
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1956
2000
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1957
2001
|
}
|
|
1958
|
-
__name(
|
|
1959
|
-
function
|
|
2002
|
+
__name(_ts_decorate19, "_ts_decorate");
|
|
2003
|
+
function _ts_metadata19(k, v) {
|
|
1960
2004
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1961
2005
|
return Reflect.metadata(k, v);
|
|
1962
2006
|
}
|
|
1963
|
-
__name(
|
|
2007
|
+
__name(_ts_metadata19, "_ts_metadata");
|
|
1964
2008
|
var Agent = class {
|
|
1965
2009
|
id;
|
|
1966
2010
|
name;
|
|
1967
2011
|
description;
|
|
1968
2012
|
};
|
|
1969
2013
|
__name(Agent, "Agent");
|
|
1970
|
-
|
|
1971
|
-
(0,
|
|
1972
|
-
|
|
2014
|
+
_ts_decorate19([
|
|
2015
|
+
(0, import_type_graphql20.Field)(() => String),
|
|
2016
|
+
_ts_metadata19("design:type", String)
|
|
1973
2017
|
], Agent.prototype, "id", void 0);
|
|
1974
|
-
|
|
1975
|
-
(0,
|
|
1976
|
-
|
|
2018
|
+
_ts_decorate19([
|
|
2019
|
+
(0, import_type_graphql20.Field)(() => String),
|
|
2020
|
+
_ts_metadata19("design:type", String)
|
|
1977
2021
|
], Agent.prototype, "name", void 0);
|
|
1978
|
-
|
|
1979
|
-
(0,
|
|
1980
|
-
|
|
2022
|
+
_ts_decorate19([
|
|
2023
|
+
(0, import_type_graphql20.Field)(() => String),
|
|
2024
|
+
_ts_metadata19("design:type", String)
|
|
1981
2025
|
], Agent.prototype, "description", void 0);
|
|
1982
|
-
Agent =
|
|
1983
|
-
(0,
|
|
2026
|
+
Agent = _ts_decorate19([
|
|
2027
|
+
(0, import_type_graphql20.ObjectType)()
|
|
1984
2028
|
], Agent);
|
|
1985
2029
|
var AgentsResponse = class {
|
|
1986
2030
|
agents;
|
|
1987
2031
|
};
|
|
1988
2032
|
__name(AgentsResponse, "AgentsResponse");
|
|
1989
|
-
|
|
1990
|
-
(0,
|
|
2033
|
+
_ts_decorate19([
|
|
2034
|
+
(0, import_type_graphql20.Field)(() => [
|
|
1991
2035
|
Agent
|
|
1992
2036
|
]),
|
|
1993
|
-
|
|
2037
|
+
_ts_metadata19("design:type", Array)
|
|
1994
2038
|
], AgentsResponse.prototype, "agents", void 0);
|
|
1995
|
-
AgentsResponse =
|
|
1996
|
-
(0,
|
|
2039
|
+
AgentsResponse = _ts_decorate19([
|
|
2040
|
+
(0, import_type_graphql20.ObjectType)()
|
|
1997
2041
|
], AgentsResponse);
|
|
1998
2042
|
|
|
1999
2043
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
2000
2044
|
var import_shared7 = require("@copilotkit/shared");
|
|
2001
|
-
function
|
|
2045
|
+
function _ts_decorate20(decorators, target, key, desc) {
|
|
2002
2046
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2003
2047
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2004
2048
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2008,12 +2052,12 @@ function _ts_decorate19(decorators, target, key, desc) {
|
|
|
2008
2052
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2009
2053
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2010
2054
|
}
|
|
2011
|
-
__name(
|
|
2012
|
-
function
|
|
2055
|
+
__name(_ts_decorate20, "_ts_decorate");
|
|
2056
|
+
function _ts_metadata20(k, v) {
|
|
2013
2057
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2014
2058
|
return Reflect.metadata(k, v);
|
|
2015
2059
|
}
|
|
2016
|
-
__name(
|
|
2060
|
+
__name(_ts_metadata20, "_ts_metadata");
|
|
2017
2061
|
function _ts_param(paramIndex, decorator) {
|
|
2018
2062
|
return function(target, key) {
|
|
2019
2063
|
decorator(target, key, paramIndex);
|
|
@@ -2162,7 +2206,8 @@ var CopilotResolver = class {
|
|
|
2162
2206
|
agentStates: data.agentStates,
|
|
2163
2207
|
url: data.frontend.url,
|
|
2164
2208
|
extensions: data.extensions,
|
|
2165
|
-
metaEvents: data.metaEvents
|
|
2209
|
+
metaEvents: data.metaEvents,
|
|
2210
|
+
context: data.context
|
|
2166
2211
|
});
|
|
2167
2212
|
} catch (error) {
|
|
2168
2213
|
if ((0, import_shared7.isStructuredCopilotKitError)(error) || ((_e = error == null ? void 0 : error.extensions) == null ? void 0 : _e.visibility)) {
|
|
@@ -2559,38 +2604,38 @@ var CopilotResolver = class {
|
|
|
2559
2604
|
}
|
|
2560
2605
|
};
|
|
2561
2606
|
__name(CopilotResolver, "CopilotResolver");
|
|
2562
|
-
|
|
2563
|
-
(0,
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2607
|
+
_ts_decorate20([
|
|
2608
|
+
(0, import_type_graphql21.Query)(() => String),
|
|
2609
|
+
_ts_metadata20("design:type", Function),
|
|
2610
|
+
_ts_metadata20("design:paramtypes", []),
|
|
2611
|
+
_ts_metadata20("design:returntype", Promise)
|
|
2567
2612
|
], CopilotResolver.prototype, "hello", null);
|
|
2568
|
-
|
|
2569
|
-
(0,
|
|
2570
|
-
_ts_param(0, (0,
|
|
2571
|
-
|
|
2572
|
-
|
|
2613
|
+
_ts_decorate20([
|
|
2614
|
+
(0, import_type_graphql21.Query)(() => AgentsResponse),
|
|
2615
|
+
_ts_param(0, (0, import_type_graphql21.Ctx)()),
|
|
2616
|
+
_ts_metadata20("design:type", Function),
|
|
2617
|
+
_ts_metadata20("design:paramtypes", [
|
|
2573
2618
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext
|
|
2574
2619
|
]),
|
|
2575
|
-
|
|
2620
|
+
_ts_metadata20("design:returntype", Promise)
|
|
2576
2621
|
], CopilotResolver.prototype, "availableAgents", null);
|
|
2577
|
-
|
|
2578
|
-
(0,
|
|
2579
|
-
_ts_param(0, (0,
|
|
2580
|
-
_ts_param(1, (0,
|
|
2581
|
-
_ts_param(2, (0,
|
|
2622
|
+
_ts_decorate20([
|
|
2623
|
+
(0, import_type_graphql21.Mutation)(() => CopilotResponse),
|
|
2624
|
+
_ts_param(0, (0, import_type_graphql21.Ctx)()),
|
|
2625
|
+
_ts_param(1, (0, import_type_graphql21.Arg)("data")),
|
|
2626
|
+
_ts_param(2, (0, import_type_graphql21.Arg)("properties", () => import_graphql_scalars2.GraphQLJSONObject, {
|
|
2582
2627
|
nullable: true
|
|
2583
2628
|
})),
|
|
2584
|
-
|
|
2585
|
-
|
|
2629
|
+
_ts_metadata20("design:type", Function),
|
|
2630
|
+
_ts_metadata20("design:paramtypes", [
|
|
2586
2631
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
|
|
2587
2632
|
typeof GenerateCopilotResponseInput === "undefined" ? Object : GenerateCopilotResponseInput,
|
|
2588
2633
|
typeof CopilotRequestContextProperties === "undefined" ? Object : CopilotRequestContextProperties
|
|
2589
2634
|
]),
|
|
2590
|
-
|
|
2635
|
+
_ts_metadata20("design:returntype", Promise)
|
|
2591
2636
|
], CopilotResolver.prototype, "generateCopilotResponse", null);
|
|
2592
|
-
CopilotResolver =
|
|
2593
|
-
(0,
|
|
2637
|
+
CopilotResolver = _ts_decorate20([
|
|
2638
|
+
(0, import_type_graphql21.Resolver)(() => CopilotResponse)
|
|
2594
2639
|
], CopilotResolver);
|
|
2595
2640
|
|
|
2596
2641
|
// src/lib/integrations/shared.ts
|
|
@@ -2625,13 +2670,13 @@ function createLogger(options) {
|
|
|
2625
2670
|
__name(createLogger, "createLogger");
|
|
2626
2671
|
|
|
2627
2672
|
// src/graphql/resolvers/state.resolver.ts
|
|
2628
|
-
var import_type_graphql23 = require("type-graphql");
|
|
2629
2673
|
var import_type_graphql24 = require("type-graphql");
|
|
2630
2674
|
var import_type_graphql25 = require("type-graphql");
|
|
2675
|
+
var import_type_graphql26 = require("type-graphql");
|
|
2631
2676
|
|
|
2632
2677
|
// src/graphql/types/load-agent-state-response.type.ts
|
|
2633
|
-
var
|
|
2634
|
-
function
|
|
2678
|
+
var import_type_graphql22 = require("type-graphql");
|
|
2679
|
+
function _ts_decorate21(decorators, target, key, desc) {
|
|
2635
2680
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2636
2681
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2637
2682
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2641,12 +2686,12 @@ function _ts_decorate20(decorators, target, key, desc) {
|
|
|
2641
2686
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2642
2687
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2643
2688
|
}
|
|
2644
|
-
__name(
|
|
2645
|
-
function
|
|
2689
|
+
__name(_ts_decorate21, "_ts_decorate");
|
|
2690
|
+
function _ts_metadata21(k, v) {
|
|
2646
2691
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2647
2692
|
return Reflect.metadata(k, v);
|
|
2648
2693
|
}
|
|
2649
|
-
__name(
|
|
2694
|
+
__name(_ts_metadata21, "_ts_metadata");
|
|
2650
2695
|
var LoadAgentStateResponse = class {
|
|
2651
2696
|
threadId;
|
|
2652
2697
|
threadExists;
|
|
@@ -2654,29 +2699,29 @@ var LoadAgentStateResponse = class {
|
|
|
2654
2699
|
messages;
|
|
2655
2700
|
};
|
|
2656
2701
|
__name(LoadAgentStateResponse, "LoadAgentStateResponse");
|
|
2657
|
-
|
|
2658
|
-
(0,
|
|
2659
|
-
|
|
2702
|
+
_ts_decorate21([
|
|
2703
|
+
(0, import_type_graphql22.Field)(() => String),
|
|
2704
|
+
_ts_metadata21("design:type", String)
|
|
2660
2705
|
], LoadAgentStateResponse.prototype, "threadId", void 0);
|
|
2661
|
-
|
|
2662
|
-
(0,
|
|
2663
|
-
|
|
2706
|
+
_ts_decorate21([
|
|
2707
|
+
(0, import_type_graphql22.Field)(() => Boolean),
|
|
2708
|
+
_ts_metadata21("design:type", Boolean)
|
|
2664
2709
|
], LoadAgentStateResponse.prototype, "threadExists", void 0);
|
|
2665
|
-
|
|
2666
|
-
(0,
|
|
2667
|
-
|
|
2710
|
+
_ts_decorate21([
|
|
2711
|
+
(0, import_type_graphql22.Field)(() => String),
|
|
2712
|
+
_ts_metadata21("design:type", String)
|
|
2668
2713
|
], LoadAgentStateResponse.prototype, "state", void 0);
|
|
2669
|
-
|
|
2670
|
-
(0,
|
|
2671
|
-
|
|
2714
|
+
_ts_decorate21([
|
|
2715
|
+
(0, import_type_graphql22.Field)(() => String),
|
|
2716
|
+
_ts_metadata21("design:type", String)
|
|
2672
2717
|
], LoadAgentStateResponse.prototype, "messages", void 0);
|
|
2673
|
-
LoadAgentStateResponse =
|
|
2674
|
-
(0,
|
|
2718
|
+
LoadAgentStateResponse = _ts_decorate21([
|
|
2719
|
+
(0, import_type_graphql22.ObjectType)()
|
|
2675
2720
|
], LoadAgentStateResponse);
|
|
2676
2721
|
|
|
2677
2722
|
// src/graphql/inputs/load-agent-state.input.ts
|
|
2678
|
-
var
|
|
2679
|
-
function
|
|
2723
|
+
var import_type_graphql23 = require("type-graphql");
|
|
2724
|
+
function _ts_decorate22(decorators, target, key, desc) {
|
|
2680
2725
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2681
2726
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2682
2727
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2686,32 +2731,32 @@ function _ts_decorate21(decorators, target, key, desc) {
|
|
|
2686
2731
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2687
2732
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2688
2733
|
}
|
|
2689
|
-
__name(
|
|
2690
|
-
function
|
|
2734
|
+
__name(_ts_decorate22, "_ts_decorate");
|
|
2735
|
+
function _ts_metadata22(k, v) {
|
|
2691
2736
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2692
2737
|
return Reflect.metadata(k, v);
|
|
2693
2738
|
}
|
|
2694
|
-
__name(
|
|
2739
|
+
__name(_ts_metadata22, "_ts_metadata");
|
|
2695
2740
|
var LoadAgentStateInput = class {
|
|
2696
2741
|
threadId;
|
|
2697
2742
|
agentName;
|
|
2698
2743
|
};
|
|
2699
2744
|
__name(LoadAgentStateInput, "LoadAgentStateInput");
|
|
2700
|
-
|
|
2701
|
-
(0,
|
|
2702
|
-
|
|
2745
|
+
_ts_decorate22([
|
|
2746
|
+
(0, import_type_graphql23.Field)(() => String),
|
|
2747
|
+
_ts_metadata22("design:type", String)
|
|
2703
2748
|
], LoadAgentStateInput.prototype, "threadId", void 0);
|
|
2704
|
-
|
|
2705
|
-
(0,
|
|
2706
|
-
|
|
2749
|
+
_ts_decorate22([
|
|
2750
|
+
(0, import_type_graphql23.Field)(() => String),
|
|
2751
|
+
_ts_metadata22("design:type", String)
|
|
2707
2752
|
], LoadAgentStateInput.prototype, "agentName", void 0);
|
|
2708
|
-
LoadAgentStateInput =
|
|
2709
|
-
(0,
|
|
2753
|
+
LoadAgentStateInput = _ts_decorate22([
|
|
2754
|
+
(0, import_type_graphql23.InputType)()
|
|
2710
2755
|
], LoadAgentStateInput);
|
|
2711
2756
|
|
|
2712
2757
|
// src/graphql/resolvers/state.resolver.ts
|
|
2713
2758
|
var import_shared8 = require("@copilotkit/shared");
|
|
2714
|
-
function
|
|
2759
|
+
function _ts_decorate23(decorators, target, key, desc) {
|
|
2715
2760
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2716
2761
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2717
2762
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2721,12 +2766,12 @@ function _ts_decorate22(decorators, target, key, desc) {
|
|
|
2721
2766
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2722
2767
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2723
2768
|
}
|
|
2724
|
-
__name(
|
|
2725
|
-
function
|
|
2769
|
+
__name(_ts_decorate23, "_ts_decorate");
|
|
2770
|
+
function _ts_metadata23(k, v) {
|
|
2726
2771
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2727
2772
|
return Reflect.metadata(k, v);
|
|
2728
2773
|
}
|
|
2729
|
-
__name(
|
|
2774
|
+
__name(_ts_metadata23, "_ts_metadata");
|
|
2730
2775
|
function _ts_param2(paramIndex, decorator) {
|
|
2731
2776
|
return function(target, key) {
|
|
2732
2777
|
decorator(target, key, paramIndex);
|
|
@@ -2751,19 +2796,19 @@ var StateResolver = class {
|
|
|
2751
2796
|
}
|
|
2752
2797
|
};
|
|
2753
2798
|
__name(StateResolver, "StateResolver");
|
|
2754
|
-
|
|
2755
|
-
(0,
|
|
2756
|
-
_ts_param2(0, (0,
|
|
2757
|
-
_ts_param2(1, (0,
|
|
2758
|
-
|
|
2759
|
-
|
|
2799
|
+
_ts_decorate23([
|
|
2800
|
+
(0, import_type_graphql26.Query)(() => LoadAgentStateResponse),
|
|
2801
|
+
_ts_param2(0, (0, import_type_graphql25.Ctx)()),
|
|
2802
|
+
_ts_param2(1, (0, import_type_graphql24.Arg)("data")),
|
|
2803
|
+
_ts_metadata23("design:type", Function),
|
|
2804
|
+
_ts_metadata23("design:paramtypes", [
|
|
2760
2805
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
|
|
2761
2806
|
typeof LoadAgentStateInput === "undefined" ? Object : LoadAgentStateInput
|
|
2762
2807
|
]),
|
|
2763
|
-
|
|
2808
|
+
_ts_metadata23("design:returntype", Promise)
|
|
2764
2809
|
], StateResolver.prototype, "loadAgentState", null);
|
|
2765
|
-
StateResolver =
|
|
2766
|
-
(0,
|
|
2810
|
+
StateResolver = _ts_decorate23([
|
|
2811
|
+
(0, import_type_graphql24.Resolver)(() => LoadAgentStateResponse)
|
|
2767
2812
|
], StateResolver);
|
|
2768
2813
|
|
|
2769
2814
|
// src/lib/integrations/shared.ts
|
|
@@ -2794,7 +2839,7 @@ async function createContext(initialContext, copilotKitContext, contextLogger, p
|
|
|
2794
2839
|
__name(createContext, "createContext");
|
|
2795
2840
|
function buildSchema(options = {}) {
|
|
2796
2841
|
logger.debug("Building GraphQL schema...");
|
|
2797
|
-
const schema = (0,
|
|
2842
|
+
const schema = (0, import_type_graphql27.buildSchemaSync)({
|
|
2798
2843
|
resolvers: [
|
|
2799
2844
|
CopilotResolver,
|
|
2800
2845
|
StateResolver
|