@copilotkit/runtime 1.10.4 → 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 +13 -0
- package/__snapshots__/schema/schema.graphql +6 -0
- package/dist/{chunk-HV5H6LOK.mjs → chunk-C56AVUZI.mjs} +2 -2
- package/dist/{chunk-HHMKB5P4.mjs → chunk-CX4GADTM.mjs} +2 -2
- package/dist/{chunk-XAA5PFCY.mjs → chunk-FOXQPOXW.mjs} +184 -136
- package/dist/chunk-FOXQPOXW.mjs.map +1 -0
- package/dist/{chunk-XGVZS3FD.mjs → chunk-H6QUY5ZQ.mjs} +16 -6
- package/dist/chunk-H6QUY5ZQ.mjs.map +1 -0
- package/dist/{chunk-CNG7I5M5.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-XAA5PFCY.mjs.map +0 -1
- package/dist/chunk-XGVZS3FD.mjs.map +0 -1
- /package/dist/{chunk-HV5H6LOK.mjs.map → chunk-C56AVUZI.mjs.map} +0 -0
- /package/dist/{chunk-HHMKB5P4.mjs.map → chunk-CX4GADTM.mjs.map} +0 -0
- /package/dist/{chunk-CNG7I5M5.mjs.map → chunk-T4NLPBCY.mjs.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copilotRuntimeNestEndpoint
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-T4NLPBCY.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.
|
|
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:*",
|
|
@@ -147,14 +147,14 @@ module.exports = __toCommonJS(node_express_exports);
|
|
|
147
147
|
var import_graphql_yoga2 = require("graphql-yoga");
|
|
148
148
|
|
|
149
149
|
// src/lib/integrations/shared.ts
|
|
150
|
-
var
|
|
150
|
+
var import_type_graphql27 = require("type-graphql");
|
|
151
151
|
|
|
152
152
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
153
|
-
var
|
|
153
|
+
var import_type_graphql21 = require("type-graphql");
|
|
154
154
|
var import_rxjs3 = require("rxjs");
|
|
155
155
|
|
|
156
156
|
// src/graphql/inputs/generate-copilot-response.input.ts
|
|
157
|
-
var
|
|
157
|
+
var import_type_graphql19 = require("type-graphql");
|
|
158
158
|
|
|
159
159
|
// src/graphql/inputs/message.input.ts
|
|
160
160
|
var import_type_graphql3 = require("type-graphql");
|
|
@@ -1512,7 +1512,8 @@ MetaEventInput = _ts_decorate16([
|
|
|
1512
1512
|
(0, import_type_graphql17.InputType)()
|
|
1513
1513
|
], MetaEventInput);
|
|
1514
1514
|
|
|
1515
|
-
// src/graphql/inputs/
|
|
1515
|
+
// src/graphql/inputs/copilot-context.input.ts
|
|
1516
|
+
var import_type_graphql18 = require("type-graphql");
|
|
1516
1517
|
function _ts_decorate17(decorators, target, key, desc) {
|
|
1517
1518
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1518
1519
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -1529,18 +1530,52 @@ function _ts_metadata17(k, v) {
|
|
|
1529
1530
|
return Reflect.metadata(k, v);
|
|
1530
1531
|
}
|
|
1531
1532
|
__name(_ts_metadata17, "_ts_metadata");
|
|
1533
|
+
var CopilotContextInput = class {
|
|
1534
|
+
description;
|
|
1535
|
+
value;
|
|
1536
|
+
};
|
|
1537
|
+
__name(CopilotContextInput, "CopilotContextInput");
|
|
1538
|
+
_ts_decorate17([
|
|
1539
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1540
|
+
_ts_metadata17("design:type", String)
|
|
1541
|
+
], CopilotContextInput.prototype, "description", void 0);
|
|
1542
|
+
_ts_decorate17([
|
|
1543
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1544
|
+
_ts_metadata17("design:type", String)
|
|
1545
|
+
], CopilotContextInput.prototype, "value", void 0);
|
|
1546
|
+
CopilotContextInput = _ts_decorate17([
|
|
1547
|
+
(0, import_type_graphql18.InputType)()
|
|
1548
|
+
], CopilotContextInput);
|
|
1549
|
+
|
|
1550
|
+
// src/graphql/inputs/generate-copilot-response.input.ts
|
|
1551
|
+
function _ts_decorate18(decorators, target, key, desc) {
|
|
1552
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1553
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1554
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
1555
|
+
else
|
|
1556
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1557
|
+
if (d = decorators[i])
|
|
1558
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1559
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1560
|
+
}
|
|
1561
|
+
__name(_ts_decorate18, "_ts_decorate");
|
|
1562
|
+
function _ts_metadata18(k, v) {
|
|
1563
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1564
|
+
return Reflect.metadata(k, v);
|
|
1565
|
+
}
|
|
1566
|
+
__name(_ts_metadata18, "_ts_metadata");
|
|
1532
1567
|
var GenerateCopilotResponseMetadataInput = class {
|
|
1533
1568
|
requestType;
|
|
1534
1569
|
};
|
|
1535
1570
|
__name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput");
|
|
1536
|
-
|
|
1537
|
-
(0,
|
|
1571
|
+
_ts_decorate18([
|
|
1572
|
+
(0, import_type_graphql19.Field)(() => CopilotRequestType, {
|
|
1538
1573
|
nullable: true
|
|
1539
1574
|
}),
|
|
1540
|
-
|
|
1575
|
+
_ts_metadata18("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
|
|
1541
1576
|
], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0);
|
|
1542
|
-
GenerateCopilotResponseMetadataInput =
|
|
1543
|
-
(0,
|
|
1577
|
+
GenerateCopilotResponseMetadataInput = _ts_decorate18([
|
|
1578
|
+
(0, import_type_graphql19.InputType)()
|
|
1544
1579
|
], GenerateCopilotResponseMetadataInput);
|
|
1545
1580
|
var GenerateCopilotResponseInput = class {
|
|
1546
1581
|
metadata;
|
|
@@ -1555,84 +1590,93 @@ var GenerateCopilotResponseInput = class {
|
|
|
1555
1590
|
agentStates;
|
|
1556
1591
|
extensions;
|
|
1557
1592
|
metaEvents;
|
|
1593
|
+
context;
|
|
1558
1594
|
};
|
|
1559
1595
|
__name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput");
|
|
1560
|
-
|
|
1561
|
-
(0,
|
|
1596
|
+
_ts_decorate18([
|
|
1597
|
+
(0, import_type_graphql19.Field)(() => GenerateCopilotResponseMetadataInput, {
|
|
1562
1598
|
nullable: false
|
|
1563
1599
|
}),
|
|
1564
|
-
|
|
1600
|
+
_ts_metadata18("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
|
|
1565
1601
|
], GenerateCopilotResponseInput.prototype, "metadata", void 0);
|
|
1566
|
-
|
|
1567
|
-
(0,
|
|
1602
|
+
_ts_decorate18([
|
|
1603
|
+
(0, import_type_graphql19.Field)(() => String, {
|
|
1568
1604
|
nullable: true
|
|
1569
1605
|
}),
|
|
1570
|
-
|
|
1606
|
+
_ts_metadata18("design:type", String)
|
|
1571
1607
|
], GenerateCopilotResponseInput.prototype, "threadId", void 0);
|
|
1572
|
-
|
|
1573
|
-
(0,
|
|
1608
|
+
_ts_decorate18([
|
|
1609
|
+
(0, import_type_graphql19.Field)(() => String, {
|
|
1574
1610
|
nullable: true
|
|
1575
1611
|
}),
|
|
1576
|
-
|
|
1612
|
+
_ts_metadata18("design:type", String)
|
|
1577
1613
|
], GenerateCopilotResponseInput.prototype, "runId", void 0);
|
|
1578
|
-
|
|
1579
|
-
(0,
|
|
1614
|
+
_ts_decorate18([
|
|
1615
|
+
(0, import_type_graphql19.Field)(() => [
|
|
1580
1616
|
MessageInput
|
|
1581
1617
|
]),
|
|
1582
|
-
|
|
1618
|
+
_ts_metadata18("design:type", Array)
|
|
1583
1619
|
], GenerateCopilotResponseInput.prototype, "messages", void 0);
|
|
1584
|
-
|
|
1585
|
-
(0,
|
|
1586
|
-
|
|
1620
|
+
_ts_decorate18([
|
|
1621
|
+
(0, import_type_graphql19.Field)(() => FrontendInput),
|
|
1622
|
+
_ts_metadata18("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
|
|
1587
1623
|
], GenerateCopilotResponseInput.prototype, "frontend", void 0);
|
|
1588
|
-
|
|
1589
|
-
(0,
|
|
1624
|
+
_ts_decorate18([
|
|
1625
|
+
(0, import_type_graphql19.Field)(() => CloudInput, {
|
|
1590
1626
|
nullable: true
|
|
1591
1627
|
}),
|
|
1592
|
-
|
|
1628
|
+
_ts_metadata18("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
|
|
1593
1629
|
], GenerateCopilotResponseInput.prototype, "cloud", void 0);
|
|
1594
|
-
|
|
1595
|
-
(0,
|
|
1630
|
+
_ts_decorate18([
|
|
1631
|
+
(0, import_type_graphql19.Field)(() => ForwardedParametersInput, {
|
|
1596
1632
|
nullable: true
|
|
1597
1633
|
}),
|
|
1598
|
-
|
|
1634
|
+
_ts_metadata18("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
|
|
1599
1635
|
], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0);
|
|
1600
|
-
|
|
1601
|
-
(0,
|
|
1636
|
+
_ts_decorate18([
|
|
1637
|
+
(0, import_type_graphql19.Field)(() => AgentSessionInput, {
|
|
1602
1638
|
nullable: true
|
|
1603
1639
|
}),
|
|
1604
|
-
|
|
1640
|
+
_ts_metadata18("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
|
|
1605
1641
|
], GenerateCopilotResponseInput.prototype, "agentSession", void 0);
|
|
1606
|
-
|
|
1607
|
-
(0,
|
|
1642
|
+
_ts_decorate18([
|
|
1643
|
+
(0, import_type_graphql19.Field)(() => AgentStateInput, {
|
|
1608
1644
|
nullable: true
|
|
1609
1645
|
}),
|
|
1610
|
-
|
|
1646
|
+
_ts_metadata18("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
|
|
1611
1647
|
], GenerateCopilotResponseInput.prototype, "agentState", void 0);
|
|
1612
|
-
|
|
1613
|
-
(0,
|
|
1648
|
+
_ts_decorate18([
|
|
1649
|
+
(0, import_type_graphql19.Field)(() => [
|
|
1614
1650
|
AgentStateInput
|
|
1615
1651
|
], {
|
|
1616
1652
|
nullable: true
|
|
1617
1653
|
}),
|
|
1618
|
-
|
|
1654
|
+
_ts_metadata18("design:type", Array)
|
|
1619
1655
|
], GenerateCopilotResponseInput.prototype, "agentStates", void 0);
|
|
1620
|
-
|
|
1621
|
-
(0,
|
|
1656
|
+
_ts_decorate18([
|
|
1657
|
+
(0, import_type_graphql19.Field)(() => ExtensionsInput, {
|
|
1622
1658
|
nullable: true
|
|
1623
1659
|
}),
|
|
1624
|
-
|
|
1660
|
+
_ts_metadata18("design:type", typeof ExtensionsInput === "undefined" ? Object : ExtensionsInput)
|
|
1625
1661
|
], GenerateCopilotResponseInput.prototype, "extensions", void 0);
|
|
1626
|
-
|
|
1627
|
-
(0,
|
|
1662
|
+
_ts_decorate18([
|
|
1663
|
+
(0, import_type_graphql19.Field)(() => [
|
|
1628
1664
|
MetaEventInput
|
|
1629
1665
|
], {
|
|
1630
1666
|
nullable: true
|
|
1631
1667
|
}),
|
|
1632
|
-
|
|
1668
|
+
_ts_metadata18("design:type", Array)
|
|
1633
1669
|
], GenerateCopilotResponseInput.prototype, "metaEvents", void 0);
|
|
1634
|
-
|
|
1635
|
-
(0,
|
|
1670
|
+
_ts_decorate18([
|
|
1671
|
+
(0, import_type_graphql19.Field)(() => [
|
|
1672
|
+
CopilotContextInput
|
|
1673
|
+
], {
|
|
1674
|
+
nullable: true
|
|
1675
|
+
}),
|
|
1676
|
+
_ts_metadata18("design:type", Array)
|
|
1677
|
+
], GenerateCopilotResponseInput.prototype, "context", void 0);
|
|
1678
|
+
GenerateCopilotResponseInput = _ts_decorate18([
|
|
1679
|
+
(0, import_type_graphql19.InputType)()
|
|
1636
1680
|
], GenerateCopilotResponseInput);
|
|
1637
1681
|
|
|
1638
1682
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
@@ -1946,8 +1990,8 @@ __name(UnknownErrorResponse, "UnknownErrorResponse");
|
|
|
1946
1990
|
var import_shared6 = require("@copilotkit/shared");
|
|
1947
1991
|
|
|
1948
1992
|
// src/graphql/types/agents-response.type.ts
|
|
1949
|
-
var
|
|
1950
|
-
function
|
|
1993
|
+
var import_type_graphql20 = require("type-graphql");
|
|
1994
|
+
function _ts_decorate19(decorators, target, key, desc) {
|
|
1951
1995
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1952
1996
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1953
1997
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1957,50 +2001,50 @@ function _ts_decorate18(decorators, target, key, desc) {
|
|
|
1957
2001
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1958
2002
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1959
2003
|
}
|
|
1960
|
-
__name(
|
|
1961
|
-
function
|
|
2004
|
+
__name(_ts_decorate19, "_ts_decorate");
|
|
2005
|
+
function _ts_metadata19(k, v) {
|
|
1962
2006
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1963
2007
|
return Reflect.metadata(k, v);
|
|
1964
2008
|
}
|
|
1965
|
-
__name(
|
|
2009
|
+
__name(_ts_metadata19, "_ts_metadata");
|
|
1966
2010
|
var Agent = class {
|
|
1967
2011
|
id;
|
|
1968
2012
|
name;
|
|
1969
2013
|
description;
|
|
1970
2014
|
};
|
|
1971
2015
|
__name(Agent, "Agent");
|
|
1972
|
-
|
|
1973
|
-
(0,
|
|
1974
|
-
|
|
2016
|
+
_ts_decorate19([
|
|
2017
|
+
(0, import_type_graphql20.Field)(() => String),
|
|
2018
|
+
_ts_metadata19("design:type", String)
|
|
1975
2019
|
], Agent.prototype, "id", void 0);
|
|
1976
|
-
|
|
1977
|
-
(0,
|
|
1978
|
-
|
|
2020
|
+
_ts_decorate19([
|
|
2021
|
+
(0, import_type_graphql20.Field)(() => String),
|
|
2022
|
+
_ts_metadata19("design:type", String)
|
|
1979
2023
|
], Agent.prototype, "name", void 0);
|
|
1980
|
-
|
|
1981
|
-
(0,
|
|
1982
|
-
|
|
2024
|
+
_ts_decorate19([
|
|
2025
|
+
(0, import_type_graphql20.Field)(() => String),
|
|
2026
|
+
_ts_metadata19("design:type", String)
|
|
1983
2027
|
], Agent.prototype, "description", void 0);
|
|
1984
|
-
Agent =
|
|
1985
|
-
(0,
|
|
2028
|
+
Agent = _ts_decorate19([
|
|
2029
|
+
(0, import_type_graphql20.ObjectType)()
|
|
1986
2030
|
], Agent);
|
|
1987
2031
|
var AgentsResponse = class {
|
|
1988
2032
|
agents;
|
|
1989
2033
|
};
|
|
1990
2034
|
__name(AgentsResponse, "AgentsResponse");
|
|
1991
|
-
|
|
1992
|
-
(0,
|
|
2035
|
+
_ts_decorate19([
|
|
2036
|
+
(0, import_type_graphql20.Field)(() => [
|
|
1993
2037
|
Agent
|
|
1994
2038
|
]),
|
|
1995
|
-
|
|
2039
|
+
_ts_metadata19("design:type", Array)
|
|
1996
2040
|
], AgentsResponse.prototype, "agents", void 0);
|
|
1997
|
-
AgentsResponse =
|
|
1998
|
-
(0,
|
|
2041
|
+
AgentsResponse = _ts_decorate19([
|
|
2042
|
+
(0, import_type_graphql20.ObjectType)()
|
|
1999
2043
|
], AgentsResponse);
|
|
2000
2044
|
|
|
2001
2045
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
2002
2046
|
var import_shared7 = require("@copilotkit/shared");
|
|
2003
|
-
function
|
|
2047
|
+
function _ts_decorate20(decorators, target, key, desc) {
|
|
2004
2048
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2005
2049
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2006
2050
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2010,12 +2054,12 @@ function _ts_decorate19(decorators, target, key, desc) {
|
|
|
2010
2054
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2011
2055
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2012
2056
|
}
|
|
2013
|
-
__name(
|
|
2014
|
-
function
|
|
2057
|
+
__name(_ts_decorate20, "_ts_decorate");
|
|
2058
|
+
function _ts_metadata20(k, v) {
|
|
2015
2059
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2016
2060
|
return Reflect.metadata(k, v);
|
|
2017
2061
|
}
|
|
2018
|
-
__name(
|
|
2062
|
+
__name(_ts_metadata20, "_ts_metadata");
|
|
2019
2063
|
function _ts_param(paramIndex, decorator) {
|
|
2020
2064
|
return function(target, key) {
|
|
2021
2065
|
decorator(target, key, paramIndex);
|
|
@@ -2164,7 +2208,8 @@ var CopilotResolver = class {
|
|
|
2164
2208
|
agentStates: data.agentStates,
|
|
2165
2209
|
url: data.frontend.url,
|
|
2166
2210
|
extensions: data.extensions,
|
|
2167
|
-
metaEvents: data.metaEvents
|
|
2211
|
+
metaEvents: data.metaEvents,
|
|
2212
|
+
context: data.context
|
|
2168
2213
|
});
|
|
2169
2214
|
} catch (error) {
|
|
2170
2215
|
if ((0, import_shared7.isStructuredCopilotKitError)(error) || ((_e = error == null ? void 0 : error.extensions) == null ? void 0 : _e.visibility)) {
|
|
@@ -2561,38 +2606,38 @@ var CopilotResolver = class {
|
|
|
2561
2606
|
}
|
|
2562
2607
|
};
|
|
2563
2608
|
__name(CopilotResolver, "CopilotResolver");
|
|
2564
|
-
|
|
2565
|
-
(0,
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2609
|
+
_ts_decorate20([
|
|
2610
|
+
(0, import_type_graphql21.Query)(() => String),
|
|
2611
|
+
_ts_metadata20("design:type", Function),
|
|
2612
|
+
_ts_metadata20("design:paramtypes", []),
|
|
2613
|
+
_ts_metadata20("design:returntype", Promise)
|
|
2569
2614
|
], CopilotResolver.prototype, "hello", null);
|
|
2570
|
-
|
|
2571
|
-
(0,
|
|
2572
|
-
_ts_param(0, (0,
|
|
2573
|
-
|
|
2574
|
-
|
|
2615
|
+
_ts_decorate20([
|
|
2616
|
+
(0, import_type_graphql21.Query)(() => AgentsResponse),
|
|
2617
|
+
_ts_param(0, (0, import_type_graphql21.Ctx)()),
|
|
2618
|
+
_ts_metadata20("design:type", Function),
|
|
2619
|
+
_ts_metadata20("design:paramtypes", [
|
|
2575
2620
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext
|
|
2576
2621
|
]),
|
|
2577
|
-
|
|
2622
|
+
_ts_metadata20("design:returntype", Promise)
|
|
2578
2623
|
], CopilotResolver.prototype, "availableAgents", null);
|
|
2579
|
-
|
|
2580
|
-
(0,
|
|
2581
|
-
_ts_param(0, (0,
|
|
2582
|
-
_ts_param(1, (0,
|
|
2583
|
-
_ts_param(2, (0,
|
|
2624
|
+
_ts_decorate20([
|
|
2625
|
+
(0, import_type_graphql21.Mutation)(() => CopilotResponse),
|
|
2626
|
+
_ts_param(0, (0, import_type_graphql21.Ctx)()),
|
|
2627
|
+
_ts_param(1, (0, import_type_graphql21.Arg)("data")),
|
|
2628
|
+
_ts_param(2, (0, import_type_graphql21.Arg)("properties", () => import_graphql_scalars2.GraphQLJSONObject, {
|
|
2584
2629
|
nullable: true
|
|
2585
2630
|
})),
|
|
2586
|
-
|
|
2587
|
-
|
|
2631
|
+
_ts_metadata20("design:type", Function),
|
|
2632
|
+
_ts_metadata20("design:paramtypes", [
|
|
2588
2633
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
|
|
2589
2634
|
typeof GenerateCopilotResponseInput === "undefined" ? Object : GenerateCopilotResponseInput,
|
|
2590
2635
|
typeof CopilotRequestContextProperties === "undefined" ? Object : CopilotRequestContextProperties
|
|
2591
2636
|
]),
|
|
2592
|
-
|
|
2637
|
+
_ts_metadata20("design:returntype", Promise)
|
|
2593
2638
|
], CopilotResolver.prototype, "generateCopilotResponse", null);
|
|
2594
|
-
CopilotResolver =
|
|
2595
|
-
(0,
|
|
2639
|
+
CopilotResolver = _ts_decorate20([
|
|
2640
|
+
(0, import_type_graphql21.Resolver)(() => CopilotResponse)
|
|
2596
2641
|
], CopilotResolver);
|
|
2597
2642
|
|
|
2598
2643
|
// src/lib/integrations/shared.ts
|
|
@@ -2627,13 +2672,13 @@ function createLogger(options) {
|
|
|
2627
2672
|
__name(createLogger, "createLogger");
|
|
2628
2673
|
|
|
2629
2674
|
// src/graphql/resolvers/state.resolver.ts
|
|
2630
|
-
var import_type_graphql23 = require("type-graphql");
|
|
2631
2675
|
var import_type_graphql24 = require("type-graphql");
|
|
2632
2676
|
var import_type_graphql25 = require("type-graphql");
|
|
2677
|
+
var import_type_graphql26 = require("type-graphql");
|
|
2633
2678
|
|
|
2634
2679
|
// src/graphql/types/load-agent-state-response.type.ts
|
|
2635
|
-
var
|
|
2636
|
-
function
|
|
2680
|
+
var import_type_graphql22 = require("type-graphql");
|
|
2681
|
+
function _ts_decorate21(decorators, target, key, desc) {
|
|
2637
2682
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2638
2683
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2639
2684
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2643,12 +2688,12 @@ function _ts_decorate20(decorators, target, key, desc) {
|
|
|
2643
2688
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2644
2689
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2645
2690
|
}
|
|
2646
|
-
__name(
|
|
2647
|
-
function
|
|
2691
|
+
__name(_ts_decorate21, "_ts_decorate");
|
|
2692
|
+
function _ts_metadata21(k, v) {
|
|
2648
2693
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2649
2694
|
return Reflect.metadata(k, v);
|
|
2650
2695
|
}
|
|
2651
|
-
__name(
|
|
2696
|
+
__name(_ts_metadata21, "_ts_metadata");
|
|
2652
2697
|
var LoadAgentStateResponse = class {
|
|
2653
2698
|
threadId;
|
|
2654
2699
|
threadExists;
|
|
@@ -2656,29 +2701,29 @@ var LoadAgentStateResponse = class {
|
|
|
2656
2701
|
messages;
|
|
2657
2702
|
};
|
|
2658
2703
|
__name(LoadAgentStateResponse, "LoadAgentStateResponse");
|
|
2659
|
-
|
|
2660
|
-
(0,
|
|
2661
|
-
|
|
2704
|
+
_ts_decorate21([
|
|
2705
|
+
(0, import_type_graphql22.Field)(() => String),
|
|
2706
|
+
_ts_metadata21("design:type", String)
|
|
2662
2707
|
], LoadAgentStateResponse.prototype, "threadId", void 0);
|
|
2663
|
-
|
|
2664
|
-
(0,
|
|
2665
|
-
|
|
2708
|
+
_ts_decorate21([
|
|
2709
|
+
(0, import_type_graphql22.Field)(() => Boolean),
|
|
2710
|
+
_ts_metadata21("design:type", Boolean)
|
|
2666
2711
|
], LoadAgentStateResponse.prototype, "threadExists", void 0);
|
|
2667
|
-
|
|
2668
|
-
(0,
|
|
2669
|
-
|
|
2712
|
+
_ts_decorate21([
|
|
2713
|
+
(0, import_type_graphql22.Field)(() => String),
|
|
2714
|
+
_ts_metadata21("design:type", String)
|
|
2670
2715
|
], LoadAgentStateResponse.prototype, "state", void 0);
|
|
2671
|
-
|
|
2672
|
-
(0,
|
|
2673
|
-
|
|
2716
|
+
_ts_decorate21([
|
|
2717
|
+
(0, import_type_graphql22.Field)(() => String),
|
|
2718
|
+
_ts_metadata21("design:type", String)
|
|
2674
2719
|
], LoadAgentStateResponse.prototype, "messages", void 0);
|
|
2675
|
-
LoadAgentStateResponse =
|
|
2676
|
-
(0,
|
|
2720
|
+
LoadAgentStateResponse = _ts_decorate21([
|
|
2721
|
+
(0, import_type_graphql22.ObjectType)()
|
|
2677
2722
|
], LoadAgentStateResponse);
|
|
2678
2723
|
|
|
2679
2724
|
// src/graphql/inputs/load-agent-state.input.ts
|
|
2680
|
-
var
|
|
2681
|
-
function
|
|
2725
|
+
var import_type_graphql23 = require("type-graphql");
|
|
2726
|
+
function _ts_decorate22(decorators, target, key, desc) {
|
|
2682
2727
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2683
2728
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2684
2729
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2688,32 +2733,32 @@ function _ts_decorate21(decorators, target, key, desc) {
|
|
|
2688
2733
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2689
2734
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2690
2735
|
}
|
|
2691
|
-
__name(
|
|
2692
|
-
function
|
|
2736
|
+
__name(_ts_decorate22, "_ts_decorate");
|
|
2737
|
+
function _ts_metadata22(k, v) {
|
|
2693
2738
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2694
2739
|
return Reflect.metadata(k, v);
|
|
2695
2740
|
}
|
|
2696
|
-
__name(
|
|
2741
|
+
__name(_ts_metadata22, "_ts_metadata");
|
|
2697
2742
|
var LoadAgentStateInput = class {
|
|
2698
2743
|
threadId;
|
|
2699
2744
|
agentName;
|
|
2700
2745
|
};
|
|
2701
2746
|
__name(LoadAgentStateInput, "LoadAgentStateInput");
|
|
2702
|
-
|
|
2703
|
-
(0,
|
|
2704
|
-
|
|
2747
|
+
_ts_decorate22([
|
|
2748
|
+
(0, import_type_graphql23.Field)(() => String),
|
|
2749
|
+
_ts_metadata22("design:type", String)
|
|
2705
2750
|
], LoadAgentStateInput.prototype, "threadId", void 0);
|
|
2706
|
-
|
|
2707
|
-
(0,
|
|
2708
|
-
|
|
2751
|
+
_ts_decorate22([
|
|
2752
|
+
(0, import_type_graphql23.Field)(() => String),
|
|
2753
|
+
_ts_metadata22("design:type", String)
|
|
2709
2754
|
], LoadAgentStateInput.prototype, "agentName", void 0);
|
|
2710
|
-
LoadAgentStateInput =
|
|
2711
|
-
(0,
|
|
2755
|
+
LoadAgentStateInput = _ts_decorate22([
|
|
2756
|
+
(0, import_type_graphql23.InputType)()
|
|
2712
2757
|
], LoadAgentStateInput);
|
|
2713
2758
|
|
|
2714
2759
|
// src/graphql/resolvers/state.resolver.ts
|
|
2715
2760
|
var import_shared8 = require("@copilotkit/shared");
|
|
2716
|
-
function
|
|
2761
|
+
function _ts_decorate23(decorators, target, key, desc) {
|
|
2717
2762
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2718
2763
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2719
2764
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2723,12 +2768,12 @@ function _ts_decorate22(decorators, target, key, desc) {
|
|
|
2723
2768
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2724
2769
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2725
2770
|
}
|
|
2726
|
-
__name(
|
|
2727
|
-
function
|
|
2771
|
+
__name(_ts_decorate23, "_ts_decorate");
|
|
2772
|
+
function _ts_metadata23(k, v) {
|
|
2728
2773
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2729
2774
|
return Reflect.metadata(k, v);
|
|
2730
2775
|
}
|
|
2731
|
-
__name(
|
|
2776
|
+
__name(_ts_metadata23, "_ts_metadata");
|
|
2732
2777
|
function _ts_param2(paramIndex, decorator) {
|
|
2733
2778
|
return function(target, key) {
|
|
2734
2779
|
decorator(target, key, paramIndex);
|
|
@@ -2753,19 +2798,19 @@ var StateResolver = class {
|
|
|
2753
2798
|
}
|
|
2754
2799
|
};
|
|
2755
2800
|
__name(StateResolver, "StateResolver");
|
|
2756
|
-
|
|
2757
|
-
(0,
|
|
2758
|
-
_ts_param2(0, (0,
|
|
2759
|
-
_ts_param2(1, (0,
|
|
2760
|
-
|
|
2761
|
-
|
|
2801
|
+
_ts_decorate23([
|
|
2802
|
+
(0, import_type_graphql26.Query)(() => LoadAgentStateResponse),
|
|
2803
|
+
_ts_param2(0, (0, import_type_graphql25.Ctx)()),
|
|
2804
|
+
_ts_param2(1, (0, import_type_graphql24.Arg)("data")),
|
|
2805
|
+
_ts_metadata23("design:type", Function),
|
|
2806
|
+
_ts_metadata23("design:paramtypes", [
|
|
2762
2807
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
|
|
2763
2808
|
typeof LoadAgentStateInput === "undefined" ? Object : LoadAgentStateInput
|
|
2764
2809
|
]),
|
|
2765
|
-
|
|
2810
|
+
_ts_metadata23("design:returntype", Promise)
|
|
2766
2811
|
], StateResolver.prototype, "loadAgentState", null);
|
|
2767
|
-
StateResolver =
|
|
2768
|
-
(0,
|
|
2812
|
+
StateResolver = _ts_decorate23([
|
|
2813
|
+
(0, import_type_graphql24.Resolver)(() => LoadAgentStateResponse)
|
|
2769
2814
|
], StateResolver);
|
|
2770
2815
|
|
|
2771
2816
|
// src/lib/integrations/shared.ts
|
|
@@ -2796,7 +2841,7 @@ async function createContext(initialContext, copilotKitContext, contextLogger, p
|
|
|
2796
2841
|
__name(createContext, "createContext");
|
|
2797
2842
|
function buildSchema(options = {}) {
|
|
2798
2843
|
logger.debug("Building GraphQL schema...");
|
|
2799
|
-
const schema = (0,
|
|
2844
|
+
const schema = (0, import_type_graphql27.buildSchemaSync)({
|
|
2800
2845
|
resolvers: [
|
|
2801
2846
|
CopilotResolver,
|
|
2802
2847
|
StateResolver
|