@copilotkit/runtime 1.8.4-next.1 → 1.8.4-next.3
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/dist/{chunk-K7ZZXZK5.mjs → chunk-6SHV3BGA.mjs} +2 -2
- package/dist/{chunk-WVWVPGXI.mjs → chunk-FEE2BWEL.mjs} +26 -16
- package/dist/chunk-FEE2BWEL.mjs.map +1 -0
- package/dist/{chunk-J3MFBKHV.mjs → chunk-NN5RJK22.mjs} +2 -2
- package/dist/{chunk-ZXFXJVAP.mjs → chunk-VT4HR4Q5.mjs} +2 -2
- package/dist/index.js +19 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/lib/index.js +19 -9
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +7 -7
- package/dist/lib/integrations/index.js +1 -1
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +7 -7
- package/dist/lib/integrations/nest/index.js +1 -1
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +3 -3
- package/dist/lib/integrations/node-express/index.js +1 -1
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +3 -3
- package/dist/lib/integrations/node-http/index.js +1 -1
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +2 -2
- package/package.json +2 -2
- package/src/lib/runtime/remote-lg-action.ts +24 -11
- package/dist/chunk-WVWVPGXI.mjs.map +0 -1
- /package/dist/{chunk-K7ZZXZK5.mjs.map → chunk-6SHV3BGA.mjs.map} +0 -0
- /package/dist/{chunk-J3MFBKHV.mjs.map → chunk-NN5RJK22.mjs.map} +0 -0
- /package/dist/{chunk-ZXFXJVAP.mjs.map → chunk-VT4HR4Q5.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @copilotkit/runtime
|
|
2
2
|
|
|
3
|
+
## 1.8.4-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e652aac: - feat: add support for langgraph config schema
|
|
8
|
+
- @copilotkit/shared@1.8.4-next.3
|
|
9
|
+
|
|
10
|
+
## 1.8.4-next.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- @copilotkit/shared@1.8.4-next.2
|
|
15
|
+
|
|
3
16
|
## 1.8.4-next.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
copilotRuntimeNodeHttpEndpoint,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FEE2BWEL.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-FHD4JECV.mjs";
|
|
@@ -22,4 +22,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
|
|
|
22
22
|
export {
|
|
23
23
|
copilotRuntimeNestEndpoint
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-6SHV3BGA.mjs.map
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ActionExecutionMessage,
|
|
3
|
-
AgentStateMessage,
|
|
4
|
-
ResultMessage,
|
|
5
|
-
TextMessage
|
|
6
|
-
} from "./chunk-RTFJTJMA.mjs";
|
|
7
1
|
import {
|
|
8
2
|
EmptyAdapter,
|
|
9
3
|
RemoteChain,
|
|
@@ -16,6 +10,12 @@ import {
|
|
|
16
10
|
SuccessResponseStatus,
|
|
17
11
|
UnknownErrorResponse
|
|
18
12
|
} from "./chunk-5BIEM2UU.mjs";
|
|
13
|
+
import {
|
|
14
|
+
ActionExecutionMessage,
|
|
15
|
+
AgentStateMessage,
|
|
16
|
+
ResultMessage,
|
|
17
|
+
TextMessage
|
|
18
|
+
} from "./chunk-RTFJTJMA.mjs";
|
|
19
19
|
import {
|
|
20
20
|
BaseMessageInput
|
|
21
21
|
} from "./chunk-2OZAGFV3.mjs";
|
|
@@ -39,7 +39,7 @@ var require_package = __commonJS({
|
|
|
39
39
|
publishConfig: {
|
|
40
40
|
access: "public"
|
|
41
41
|
},
|
|
42
|
-
version: "1.8.4-next.
|
|
42
|
+
version: "1.8.4-next.3",
|
|
43
43
|
sideEffects: false,
|
|
44
44
|
main: "./dist/index.js",
|
|
45
45
|
module: "./dist/index.mjs",
|
|
@@ -1797,18 +1797,19 @@ async function streamEvents(controller, args) {
|
|
|
1797
1797
|
throw new Error("No agent id found");
|
|
1798
1798
|
}
|
|
1799
1799
|
const assistantId = retrievedAssistant.assistant_id;
|
|
1800
|
+
const graphInfo = await client.assistants.getGraph(assistantId);
|
|
1801
|
+
const graphSchema = await client.assistants.getSchemas(assistantId);
|
|
1802
|
+
const schemaKeys = getSchemaKeys(graphSchema);
|
|
1800
1803
|
if (configurable) {
|
|
1804
|
+
const filteredConfigurable = (schemaKeys == null ? void 0 : schemaKeys.config) ? filterObjectBySchemaKeys(configurable, schemaKeys == null ? void 0 : schemaKeys.config) : configurable;
|
|
1801
1805
|
await client.assistants.update(assistantId, {
|
|
1802
1806
|
config: {
|
|
1803
|
-
configurable
|
|
1807
|
+
configurable: filteredConfigurable
|
|
1804
1808
|
}
|
|
1805
1809
|
});
|
|
1806
1810
|
}
|
|
1807
|
-
const graphInfo = await client.assistants.getGraph(assistantId);
|
|
1808
|
-
const graphSchema = await client.assistants.getSchemas(assistantId);
|
|
1809
|
-
const schemaKeys = getSchemaKeys(graphSchema);
|
|
1810
1811
|
if (payload.input && (schemaKeys == null ? void 0 : schemaKeys.input)) {
|
|
1811
|
-
payload.input =
|
|
1812
|
+
payload.input = filterObjectBySchemaKeys(payload.input, schemaKeys.input);
|
|
1812
1813
|
}
|
|
1813
1814
|
let streamingStateExtractor = new StreamingStateExtractor([]);
|
|
1814
1815
|
let prevNodeName = null;
|
|
@@ -1982,7 +1983,7 @@ function getStateSyncEvent({ threadId, runId, agentName, nodeName, state, runnin
|
|
|
1982
1983
|
};
|
|
1983
1984
|
}
|
|
1984
1985
|
if (schemaKeys == null ? void 0 : schemaKeys.output) {
|
|
1985
|
-
state =
|
|
1986
|
+
state = filterObjectBySchemaKeys(state, schemaKeys.output);
|
|
1986
1987
|
}
|
|
1987
1988
|
return JSON.stringify({
|
|
1988
1989
|
event: LangGraphEventTypes.OnCopilotKitStateSync,
|
|
@@ -2223,8 +2224,12 @@ function getSchemaKeys(graphSchema) {
|
|
|
2223
2224
|
"messages",
|
|
2224
2225
|
"copilotkit"
|
|
2225
2226
|
];
|
|
2227
|
+
let configSchema = null;
|
|
2228
|
+
if (graphSchema.config_schema.properties) {
|
|
2229
|
+
configSchema = Object.keys(graphSchema.config_schema.properties);
|
|
2230
|
+
}
|
|
2226
2231
|
if (!graphSchema.input_schema.properties || !graphSchema.output_schema.properties) {
|
|
2227
|
-
return
|
|
2232
|
+
return configSchema;
|
|
2228
2233
|
}
|
|
2229
2234
|
const inputSchema = Object.keys(graphSchema.input_schema.properties);
|
|
2230
2235
|
const outputSchema = Object.keys(graphSchema.output_schema.properties);
|
|
@@ -2236,10 +2241,15 @@ function getSchemaKeys(graphSchema) {
|
|
|
2236
2241
|
output: outputSchema && outputSchema.length ? [
|
|
2237
2242
|
...outputSchema,
|
|
2238
2243
|
...CONSTANT_KEYS
|
|
2239
|
-
] : null
|
|
2244
|
+
] : null,
|
|
2245
|
+
config: configSchema
|
|
2240
2246
|
};
|
|
2241
2247
|
}
|
|
2242
2248
|
__name(getSchemaKeys, "getSchemaKeys");
|
|
2249
|
+
function filterObjectBySchemaKeys(obj, schemaKeys) {
|
|
2250
|
+
return Object.fromEntries(Object.entries(obj).filter(([key]) => schemaKeys.includes(key)));
|
|
2251
|
+
}
|
|
2252
|
+
__name(filterObjectBySchemaKeys, "filterObjectBySchemaKeys");
|
|
2243
2253
|
|
|
2244
2254
|
// src/lib/runtime/remote-action-constructors.ts
|
|
2245
2255
|
import { CopilotKitError, CopilotKitLowLevelError } from "@copilotkit/shared";
|
|
@@ -4581,4 +4591,4 @@ export {
|
|
|
4581
4591
|
getCommonConfig,
|
|
4582
4592
|
copilotRuntimeNodeHttpEndpoint
|
|
4583
4593
|
};
|
|
4584
|
-
//# sourceMappingURL=chunk-
|
|
4594
|
+
//# sourceMappingURL=chunk-FEE2BWEL.mjs.map
|