@takeshape/util 11.102.4 → 11.103.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/dist/common/agents.d.ts +24 -18
- package/package.json +3 -3
package/dist/common/agents.d.ts
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
import type { CoreMessage } from 'ai';
|
|
2
|
-
export type
|
|
3
|
-
|
|
2
|
+
export type AgentSessionValueUnknownOutput = {
|
|
3
|
+
type: 'unknown';
|
|
4
|
+
data: unknown;
|
|
5
|
+
};
|
|
6
|
+
export type AgentSessionValueGenerateOutput = {
|
|
7
|
+
type: 'generate';
|
|
8
|
+
data: string | Record<string, unknown>;
|
|
9
|
+
};
|
|
10
|
+
export type AgentSessionValueGraphQLOutput = {
|
|
11
|
+
type: 'graphql';
|
|
12
|
+
data: unknown;
|
|
4
13
|
};
|
|
5
14
|
export type AgentSessionValueChatOutput = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
type: 'chat';
|
|
16
|
+
data: {
|
|
17
|
+
content: string;
|
|
18
|
+
artifact?: Record<string, unknown>;
|
|
19
|
+
references: Array<{
|
|
20
|
+
_tid: string;
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
11
23
|
};
|
|
12
|
-
export type AgentSessionValueOutput =
|
|
24
|
+
export type AgentSessionValueOutput = AgentSessionValueGenerateOutput | AgentSessionValueGraphQLOutput | AgentSessionValueChatOutput | AgentSessionValueUnknownOutput;
|
|
13
25
|
export type AgentSessionValue<Output = AgentSessionValueOutput> = {
|
|
14
|
-
/**
|
|
15
|
-
* This is a cludge because agent state outputs are not expected to be normalized.
|
|
16
|
-
*
|
|
17
|
-
* @todo Refactor agent state outputs to be a normal object and handle appropriately.
|
|
18
|
-
*/
|
|
19
|
-
agentOutputPath: string;
|
|
20
|
-
includeMetadata?: true;
|
|
21
26
|
input: string;
|
|
22
27
|
output: Output;
|
|
23
28
|
agentHistoryUpdate?: CoreMessage[] | null;
|
|
@@ -25,18 +30,19 @@ export type AgentSessionValue<Output = AgentSessionValueOutput> = {
|
|
|
25
30
|
export type AgentSession = {
|
|
26
31
|
id: string;
|
|
27
32
|
projectId: string;
|
|
33
|
+
schemaId: string;
|
|
28
34
|
agentName: string;
|
|
29
35
|
done: boolean;
|
|
30
36
|
previousStateId?: string;
|
|
31
37
|
currentStateId: string;
|
|
32
38
|
chatSessionIds: Record<string, string | undefined>;
|
|
33
39
|
sessionMemory: Record<string, unknown>;
|
|
34
|
-
stateOutputs: Record<string,
|
|
40
|
+
stateOutputs: Record<string, AgentSessionValueOutput | undefined>;
|
|
35
41
|
suspended?: boolean;
|
|
36
42
|
currentValue?: AgentSessionValue;
|
|
37
|
-
userHistory: CoreMessage[];
|
|
38
43
|
hasAgentHistory?: boolean;
|
|
39
44
|
};
|
|
40
|
-
export type InspectAgentSessionResult = AgentSession & {
|
|
45
|
+
export type InspectAgentSessionResult<Message extends Record<string, unknown>> = AgentSession & {
|
|
46
|
+
messages: Message[];
|
|
41
47
|
agentHistory: CoreMessage[];
|
|
42
48
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/util",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.103.3",
|
|
4
4
|
"description": "Shared utilities",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"tiny-invariant": "^1.2.0",
|
|
46
46
|
"uint8array-extras": "^1.4.0",
|
|
47
47
|
"url-parse": "^1.5.3",
|
|
48
|
-
"@takeshape/prism": "11.
|
|
49
|
-
"@takeshape/routing": "11.
|
|
48
|
+
"@takeshape/prism": "11.103.3",
|
|
49
|
+
"@takeshape/routing": "11.103.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/classnames": "^2.2.9",
|