@takeshape/schema 11.133.4 → 11.142.5
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/agents.d.ts +2 -4
- package/dist/agents.js +99 -98
- package/dist/builtin-schema.js +66 -16
- package/dist/layers/refs.d.ts +1 -1
- package/dist/models/project-schema.d.ts +2 -2
- package/dist/models/project-schema.js +7 -3
- package/dist/models/types.d.ts +4 -1
- package/dist/project-schema/latest.d.ts +6 -0
- package/dist/project-schema/v3.59.0.d.ts +6 -0
- package/dist/refs.d.ts +1 -1
- package/dist/resolvers/ai/abort-agent-message-response.d.ts +18 -5
- package/dist/resolvers/ai/abort-agent-message-response.js +4 -4
- package/dist/resolvers/ai/agent-chat-args.js +1 -2
- package/dist/resolvers/ai/agent-chat-payload.js +1 -2
- package/dist/resolvers/ai/agent-chat-response.d.ts +169 -37
- package/dist/resolvers/ai/agent-chat-response.js +11 -7
- package/dist/resolvers/ai/agent-generate-args.js +1 -2
- package/dist/resolvers/ai/agent-message-input.d.ts +73 -0
- package/dist/resolvers/ai/agent-message-input.js +39 -0
- package/dist/resolvers/ai/agent-message-output.d.ts +169 -0
- package/dist/resolvers/ai/agent-message-output.js +77 -0
- package/dist/resolvers/ai/agent-message-payload.d.ts +187 -73
- package/dist/resolvers/ai/agent-message-payload.js +20 -72
- package/dist/resolvers/ai/agent-run-mode.js +1 -2
- package/dist/resolvers/ai/agent-session-payload.d.ts +415 -5
- package/dist/resolvers/ai/agent-session-payload.js +83 -2
- package/dist/resolvers/ai/create-agent-session-response.d.ts +126 -23
- package/dist/resolvers/ai/create-agent-session-response.js +6 -11
- package/dist/resolvers/ai/get-agent-message-response.d.ts +592 -18
- package/dist/resolvers/ai/get-agent-message-response.js +43 -9
- package/dist/resolvers/ai/inspect-agent-response.d.ts +479 -70
- package/dist/resolvers/ai/inspect-agent-response.js +30 -19
- package/dist/resolvers/ai/send-agent-feedback-args.js +1 -2
- package/dist/resolvers/ai/send-agent-message-args.d.ts +8 -8
- package/dist/resolvers/ai/send-agent-message-args.js +2 -2
- package/dist/resolvers/ai/send-agent-message-response.d.ts +257 -4
- package/dist/resolvers/ai/send-agent-message-response.js +32 -2
- package/dist/resolvers/ai/types.d.ts +6 -0
- package/dist/resolvers/ai/types.js +1 -0
- package/dist/resolvers/takeshape/assets/asset.d.ts +1 -1
- package/dist/schemas/project-schema/latest.json +15 -0
- package/dist/schemas/project-schema/v3.59.0.json +15 -0
- package/package.json +12 -8
- package/dist/resolvers/ai/constants.d.ts +0 -9
- package/dist/resolvers/ai/constants.js +0 -9
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { FromSchema } from 'json-schema-to-ts';
|
|
2
|
-
export declare const shapeName = "TSCreateAgentSessionResponse";
|
|
3
2
|
export declare const schema: {
|
|
4
3
|
readonly properties: {
|
|
5
4
|
readonly id: {
|
|
@@ -20,6 +19,14 @@ export declare const schema: {
|
|
|
20
19
|
readonly type: "string";
|
|
21
20
|
readonly description: "The name of the agent associated with this session.";
|
|
22
21
|
};
|
|
22
|
+
readonly projectId: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
readonly description: "The ID of the project to which this agent session belongs.";
|
|
25
|
+
};
|
|
26
|
+
readonly schemaId: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly description: "The schema ID associated with the agent session, typically in the format \"production~projectId\".";
|
|
29
|
+
};
|
|
23
30
|
readonly schemaHash: {
|
|
24
31
|
readonly type: "string";
|
|
25
32
|
readonly description: "The hash of the schema version associated with the agent session.";
|
|
@@ -67,30 +74,126 @@ export declare const schema: {
|
|
|
67
74
|
readonly type: "integer";
|
|
68
75
|
};
|
|
69
76
|
};
|
|
77
|
+
readonly firstMessageInput: {
|
|
78
|
+
readonly title: "TSAgentMessageInput";
|
|
79
|
+
readonly description: "The input schema for agent messages.";
|
|
80
|
+
readonly discriminator: {
|
|
81
|
+
readonly propertyName: "type";
|
|
82
|
+
};
|
|
83
|
+
readonly oneOf: [{
|
|
84
|
+
readonly title: "TSAgentMessageUnknownInput";
|
|
85
|
+
readonly type: "object";
|
|
86
|
+
readonly properties: {
|
|
87
|
+
readonly type: {
|
|
88
|
+
readonly const: "unknown";
|
|
89
|
+
};
|
|
90
|
+
readonly data: {};
|
|
91
|
+
};
|
|
92
|
+
readonly required: ["type", "data"];
|
|
93
|
+
readonly additionalProperties: false;
|
|
94
|
+
}, {
|
|
95
|
+
readonly title: "TSAgentMessageStringInput";
|
|
96
|
+
readonly type: "object";
|
|
97
|
+
readonly properties: {
|
|
98
|
+
readonly type: {
|
|
99
|
+
readonly const: "string";
|
|
100
|
+
};
|
|
101
|
+
readonly content: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly required: ["type", "content"];
|
|
106
|
+
readonly additionalProperties: false;
|
|
107
|
+
}];
|
|
108
|
+
};
|
|
109
|
+
readonly lastMessageOutput: {
|
|
110
|
+
readonly title: "TSAgentMessageOutput";
|
|
111
|
+
readonly description: "The output schema for agent messages.";
|
|
112
|
+
readonly discriminator: {
|
|
113
|
+
readonly propertyName: "type";
|
|
114
|
+
};
|
|
115
|
+
readonly oneOf: [{
|
|
116
|
+
readonly title: "TSAgentGenerateStateOutput";
|
|
117
|
+
readonly type: "object";
|
|
118
|
+
readonly properties: {
|
|
119
|
+
readonly type: {
|
|
120
|
+
readonly const: "generate";
|
|
121
|
+
};
|
|
122
|
+
readonly data: {};
|
|
123
|
+
};
|
|
124
|
+
readonly required: ["type", "data"];
|
|
125
|
+
readonly additionalProperties: false;
|
|
126
|
+
}, {
|
|
127
|
+
readonly title: "TSAgentGraphQLStateOutput";
|
|
128
|
+
readonly type: "object";
|
|
129
|
+
readonly properties: {
|
|
130
|
+
readonly type: {
|
|
131
|
+
readonly const: "graphql";
|
|
132
|
+
};
|
|
133
|
+
readonly data: {};
|
|
134
|
+
};
|
|
135
|
+
readonly required: ["type", "data"];
|
|
136
|
+
readonly additionalProperties: false;
|
|
137
|
+
}, {
|
|
138
|
+
readonly title: "TSAgentChatStateOutput";
|
|
139
|
+
readonly type: "object";
|
|
140
|
+
readonly properties: {
|
|
141
|
+
readonly type: {
|
|
142
|
+
readonly const: "chat";
|
|
143
|
+
};
|
|
144
|
+
readonly data: {
|
|
145
|
+
readonly type: "object";
|
|
146
|
+
readonly properties: {
|
|
147
|
+
readonly content: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
};
|
|
150
|
+
readonly artifact: {
|
|
151
|
+
readonly type: "object";
|
|
152
|
+
};
|
|
153
|
+
readonly references: {
|
|
154
|
+
readonly type: "array";
|
|
155
|
+
readonly items: {
|
|
156
|
+
readonly type: "object";
|
|
157
|
+
readonly properties: {
|
|
158
|
+
readonly _tid: {
|
|
159
|
+
readonly type: "string";
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
readonly required: ["_tid"];
|
|
163
|
+
readonly additionalProperties: false;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
readonly required: ["content", "references"];
|
|
168
|
+
readonly additionalProperties: false;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
readonly required: ["type", "data"];
|
|
172
|
+
readonly additionalProperties: false;
|
|
173
|
+
}, {
|
|
174
|
+
readonly title: "TSAgentUnknownStateOutput";
|
|
175
|
+
readonly type: "object";
|
|
176
|
+
readonly properties: {
|
|
177
|
+
readonly type: {
|
|
178
|
+
readonly const: "unknown";
|
|
179
|
+
};
|
|
180
|
+
readonly data: {};
|
|
181
|
+
};
|
|
182
|
+
readonly required: ["type", "data"];
|
|
183
|
+
readonly additionalProperties: false;
|
|
184
|
+
}];
|
|
185
|
+
};
|
|
186
|
+
readonly totalTokens: {
|
|
187
|
+
readonly type: "number";
|
|
188
|
+
readonly description: "The total number of tokens used in the agent session.";
|
|
189
|
+
};
|
|
70
190
|
};
|
|
71
|
-
readonly required: ["id", "agentName", "done", "currentStateId", "chatSessionIds", "sessionMemory"];
|
|
191
|
+
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "chatSessionIds", "sessionMemory", "hasAgentHistory", "hasFeedback", "suspend", "projectId", "schemaId", "schemaHash", "totalTokens"];
|
|
72
192
|
readonly additionalProperties: false;
|
|
193
|
+
readonly title: "TSAgentSession";
|
|
73
194
|
readonly type: "object";
|
|
74
195
|
};
|
|
75
196
|
export type CreateAgentSessionResponse = FromSchema<typeof schema>;
|
|
76
|
-
export declare
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
schemaHash?: string | undefined;
|
|
80
|
-
suspended?: boolean | undefined;
|
|
81
|
-
previousStateId?: string | undefined;
|
|
82
|
-
hasAgentHistory?: boolean | undefined;
|
|
83
|
-
hasFeedback?: boolean | undefined;
|
|
84
|
-
suspend?: boolean | undefined;
|
|
85
|
-
suspendedTransitionIndices?: number[] | undefined;
|
|
86
|
-
id: string;
|
|
87
|
-
agentName: string;
|
|
88
|
-
done: boolean;
|
|
89
|
-
currentStateId: string;
|
|
90
|
-
chatSessionIds: {
|
|
91
|
-
[x: string]: unknown;
|
|
92
|
-
};
|
|
93
|
-
sessionMemory: {
|
|
94
|
-
[x: string]: unknown;
|
|
95
|
-
};
|
|
96
|
-
}>;
|
|
197
|
+
export declare function createUserShapeSchema(): {
|
|
198
|
+
'@ref': string;
|
|
199
|
+
};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { createTypedValidator } from '@takeshape/json-schema';
|
|
2
|
-
import omit from 'lodash/omit.js';
|
|
3
1
|
import * as agentSessionPayload from "./agent-session-payload.js";
|
|
4
|
-
import { AI_AGENT_SESSION_SHAPE_NAME } from "./constants.js";
|
|
5
|
-
export const shapeName = AI_AGENT_SESSION_SHAPE_NAME;
|
|
6
2
|
export const schema = {
|
|
7
|
-
...agentSessionPayload.schema
|
|
8
|
-
properties: {
|
|
9
|
-
...omit(agentSessionPayload.schema.properties, ['projectId', 'schemaId'])
|
|
10
|
-
},
|
|
11
|
-
required: ['id', 'agentName', 'done', 'currentStateId', 'chatSessionIds', 'sessionMemory'],
|
|
12
|
-
additionalProperties: false
|
|
3
|
+
...agentSessionPayload.schema
|
|
13
4
|
};
|
|
14
|
-
export
|
|
5
|
+
export function createUserShapeSchema() {
|
|
6
|
+
return {
|
|
7
|
+
'@ref': agentSessionPayload.shapeName
|
|
8
|
+
};
|
|
9
|
+
}
|