@takeshape/schema 12.17.3 → 12.18.2
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/resolvers/ai/agent-chat-response.d.ts +1 -5
- package/dist/resolvers/ai/agent-message-payload.d.ts +7 -0
- package/dist/resolvers/ai/agent-session-payload.d.ts +2 -13
- package/dist/resolvers/ai/agent-session-payload.js +1 -7
- package/dist/resolvers/ai/create-agent-session-response.d.ts +1 -5
- package/dist/resolvers/ai/get-agent-message-response.d.ts +1 -5
- package/dist/resolvers/ai/inspect-agent-response.d.ts +3 -7
- package/dist/resolvers/ai/inspect-agent-response.js +4 -1
- package/dist/resolvers/ai/send-agent-message-response.d.ts +1 -5
- package/examples/latest/shape-editor-schema-edited.json +1 -1
- package/examples/source/shape-editor-schema-edited.json +1 -1
- package/package.json +6 -6
|
@@ -109,10 +109,6 @@ export declare const schema: {
|
|
|
109
109
|
readonly type: "string";
|
|
110
110
|
readonly description: "The ID of the current state in the agent session.";
|
|
111
111
|
};
|
|
112
|
-
readonly chatSessionIds: {
|
|
113
|
-
readonly type: "object";
|
|
114
|
-
readonly description: "A mapping of chat session IDs to their corresponding state IDs.";
|
|
115
|
-
};
|
|
116
112
|
readonly sessionMemory: {
|
|
117
113
|
readonly type: "object";
|
|
118
114
|
readonly description: "Memory associated with the agent session, which can be used to store stateful information.";
|
|
@@ -327,7 +323,7 @@ export declare const schema: {
|
|
|
327
323
|
};
|
|
328
324
|
};
|
|
329
325
|
};
|
|
330
|
-
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "
|
|
326
|
+
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "sessionMemory", "hasAgentHistory", "hasFeedback", "suspend", "projectId", "schemaId", "schemaHash", "totalTokens"];
|
|
331
327
|
readonly additionalProperties: false;
|
|
332
328
|
readonly title: "TSAgentSession";
|
|
333
329
|
readonly type: "object";
|
|
@@ -415,6 +415,13 @@ export type AgentGenerateStateExecuteResult = {
|
|
|
415
415
|
input: string;
|
|
416
416
|
output: AgentGenerateStateOutput;
|
|
417
417
|
metadata: {
|
|
418
|
+
/**
|
|
419
|
+
* The conversation history after this state executed. Populated so run.ts can detect
|
|
420
|
+
* yields (open tool-calls at the end) and save the snapshot needed to resume.
|
|
421
|
+
* Non-null only when the state carries a history (e.g., resuming a yield, or state
|
|
422
|
+
* has client tools that could yield).
|
|
423
|
+
*/
|
|
424
|
+
agentHistoryUpdate: ModelMessage[] | null;
|
|
418
425
|
usage: AiUsage;
|
|
419
426
|
blocked: boolean;
|
|
420
427
|
};
|
|
@@ -50,10 +50,6 @@ export declare const recordSchema: {
|
|
|
50
50
|
readonly type: "string";
|
|
51
51
|
readonly description: "The ID of the current state in the agent session.";
|
|
52
52
|
};
|
|
53
|
-
readonly chatSessionIds: {
|
|
54
|
-
readonly type: "object";
|
|
55
|
-
readonly description: "A mapping of chat session IDs to their corresponding state IDs.";
|
|
56
|
-
};
|
|
57
53
|
readonly sessionMemory: {
|
|
58
54
|
readonly type: "object";
|
|
59
55
|
readonly description: "Memory associated with the agent session, which can be used to store stateful information.";
|
|
@@ -280,7 +276,7 @@ export declare const recordSchema: {
|
|
|
280
276
|
readonly type: "string";
|
|
281
277
|
};
|
|
282
278
|
};
|
|
283
|
-
readonly required: ["__createdRegion", "__updatedRegion", "ttl", "schemaIdAgentName", "id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "
|
|
279
|
+
readonly required: ["__createdRegion", "__updatedRegion", "ttl", "schemaIdAgentName", "id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "sessionMemory", "hasAgentHistory", "hasFeedback", "suspend", "projectId", "schemaId", "schemaHash", "totalTokens"];
|
|
284
280
|
readonly additionalProperties: false;
|
|
285
281
|
};
|
|
286
282
|
export type AgentSessionRecord = FromSchema<typeof recordSchema>;
|
|
@@ -332,10 +328,6 @@ export declare const schema: {
|
|
|
332
328
|
readonly type: "string";
|
|
333
329
|
readonly description: "The ID of the current state in the agent session.";
|
|
334
330
|
};
|
|
335
|
-
readonly chatSessionIds: {
|
|
336
|
-
readonly type: "object";
|
|
337
|
-
readonly description: "A mapping of chat session IDs to their corresponding state IDs.";
|
|
338
|
-
};
|
|
339
331
|
readonly sessionMemory: {
|
|
340
332
|
readonly type: "object";
|
|
341
333
|
readonly description: "Memory associated with the agent session, which can be used to store stateful information.";
|
|
@@ -550,7 +542,7 @@ export declare const schema: {
|
|
|
550
542
|
};
|
|
551
543
|
};
|
|
552
544
|
};
|
|
553
|
-
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "
|
|
545
|
+
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "sessionMemory", "hasAgentHistory", "hasFeedback", "suspend", "projectId", "schemaId", "schemaHash", "totalTokens"];
|
|
554
546
|
readonly additionalProperties: false;
|
|
555
547
|
readonly title: "TSAgentSession";
|
|
556
548
|
readonly type: "object";
|
|
@@ -619,9 +611,6 @@ export declare const validate: import("ajv").ValidateFunction<{
|
|
|
619
611
|
schemaHash: string;
|
|
620
612
|
done: boolean;
|
|
621
613
|
currentStateId: string;
|
|
622
|
-
chatSessionIds: {
|
|
623
|
-
[x: string]: unknown;
|
|
624
|
-
};
|
|
625
614
|
sessionMemory: {
|
|
626
615
|
[x: string]: unknown;
|
|
627
616
|
};
|
|
@@ -53,10 +53,6 @@ export const recordSchema = {
|
|
|
53
53
|
type: 'string',
|
|
54
54
|
description: 'The ID of the current state in the agent session.'
|
|
55
55
|
},
|
|
56
|
-
chatSessionIds: {
|
|
57
|
-
type: 'object',
|
|
58
|
-
description: 'A mapping of chat session IDs to their corresponding state IDs.'
|
|
59
|
-
},
|
|
60
56
|
sessionMemory: {
|
|
61
57
|
type: 'object',
|
|
62
58
|
description: 'Memory associated with the agent session, which can be used to store stateful information.'
|
|
@@ -128,7 +124,6 @@ export const recordSchema = {
|
|
|
128
124
|
'updatedAt',
|
|
129
125
|
'done',
|
|
130
126
|
'currentStateId',
|
|
131
|
-
'chatSessionIds',
|
|
132
127
|
'sessionMemory',
|
|
133
128
|
'hasAgentHistory',
|
|
134
129
|
'hasFeedback',
|
|
@@ -153,7 +148,6 @@ export const schema = {
|
|
|
153
148
|
'updatedAt',
|
|
154
149
|
'done',
|
|
155
150
|
'currentStateId',
|
|
156
|
-
'chatSessionIds',
|
|
157
151
|
'sessionMemory',
|
|
158
152
|
'hasAgentHistory',
|
|
159
153
|
'hasFeedback',
|
|
@@ -166,7 +160,7 @@ export const schema = {
|
|
|
166
160
|
additionalProperties: false
|
|
167
161
|
};
|
|
168
162
|
export const validate = createTypedValidator(schema);
|
|
169
|
-
const { projectId, schemaId, schemaHash, firstMessageInput, lastMessageOutput, suspendedTransitionIndices,
|
|
163
|
+
const { projectId, schemaId, schemaHash, firstMessageInput, lastMessageOutput, suspendedTransitionIndices, previousStateId, ...shapeSchemaProperties } = schema.properties;
|
|
170
164
|
// Schema for user-facing responses - used for TypeScript type derivation (no @ref)
|
|
171
165
|
export const userSchema = {
|
|
172
166
|
...schema,
|
|
@@ -47,10 +47,6 @@ export declare const schema: {
|
|
|
47
47
|
readonly type: "string";
|
|
48
48
|
readonly description: "The ID of the current state in the agent session.";
|
|
49
49
|
};
|
|
50
|
-
readonly chatSessionIds: {
|
|
51
|
-
readonly type: "object";
|
|
52
|
-
readonly description: "A mapping of chat session IDs to their corresponding state IDs.";
|
|
53
|
-
};
|
|
54
50
|
readonly sessionMemory: {
|
|
55
51
|
readonly type: "object";
|
|
56
52
|
readonly description: "Memory associated with the agent session, which can be used to store stateful information.";
|
|
@@ -265,7 +261,7 @@ export declare const schema: {
|
|
|
265
261
|
};
|
|
266
262
|
};
|
|
267
263
|
};
|
|
268
|
-
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "
|
|
264
|
+
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "sessionMemory", "hasAgentHistory", "hasFeedback", "suspend", "projectId", "schemaId", "schemaHash", "totalTokens"];
|
|
269
265
|
readonly additionalProperties: false;
|
|
270
266
|
readonly title: "TSAgentSession";
|
|
271
267
|
readonly type: "object";
|
|
@@ -52,10 +52,6 @@ export declare const schema: {
|
|
|
52
52
|
readonly type: "string";
|
|
53
53
|
readonly description: "The ID of the current state in the agent session.";
|
|
54
54
|
};
|
|
55
|
-
readonly chatSessionIds: {
|
|
56
|
-
readonly type: "object";
|
|
57
|
-
readonly description: "A mapping of chat session IDs to their corresponding state IDs.";
|
|
58
|
-
};
|
|
59
55
|
readonly sessionMemory: {
|
|
60
56
|
readonly type: "object";
|
|
61
57
|
readonly description: "Memory associated with the agent session, which can be used to store stateful information.";
|
|
@@ -270,7 +266,7 @@ export declare const schema: {
|
|
|
270
266
|
};
|
|
271
267
|
};
|
|
272
268
|
};
|
|
273
|
-
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "
|
|
269
|
+
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "sessionMemory", "hasAgentHistory", "hasFeedback", "suspend", "projectId", "schemaId", "schemaHash", "totalTokens"];
|
|
274
270
|
readonly additionalProperties: false;
|
|
275
271
|
readonly title: "TSAgentSession";
|
|
276
272
|
readonly type: "object";
|
|
@@ -53,10 +53,6 @@ export declare const schema: {
|
|
|
53
53
|
readonly type: "string";
|
|
54
54
|
readonly description: "The ID of the current state in the agent session.";
|
|
55
55
|
};
|
|
56
|
-
readonly chatSessionIds: {
|
|
57
|
-
readonly type: "object";
|
|
58
|
-
readonly description: "A mapping of chat session IDs to their corresponding state IDs.";
|
|
59
|
-
};
|
|
60
56
|
readonly sessionMemory: {
|
|
61
57
|
readonly type: "object";
|
|
62
58
|
readonly description: "Memory associated with the agent session, which can be used to store stateful information.";
|
|
@@ -271,7 +267,7 @@ export declare const schema: {
|
|
|
271
267
|
};
|
|
272
268
|
};
|
|
273
269
|
};
|
|
274
|
-
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "
|
|
270
|
+
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "sessionMemory", "hasAgentHistory", "hasFeedback", "suspend", "projectId", "schemaId", "schemaHash", "totalTokens"];
|
|
275
271
|
readonly additionalProperties: false;
|
|
276
272
|
readonly title: "TSAgentSession";
|
|
277
273
|
readonly type: "object";
|
|
@@ -281,7 +277,7 @@ export declare const schema: {
|
|
|
281
277
|
readonly items: {
|
|
282
278
|
readonly type: "object";
|
|
283
279
|
};
|
|
284
|
-
readonly description: "
|
|
280
|
+
readonly description: "Chat-state history for the agent session.";
|
|
285
281
|
};
|
|
286
282
|
readonly messages: {
|
|
287
283
|
readonly type: "array";
|
|
@@ -620,7 +616,7 @@ export declare function createUserShapeSchema(): {
|
|
|
620
616
|
readonly items: {
|
|
621
617
|
readonly type: "object";
|
|
622
618
|
};
|
|
623
|
-
readonly description: "
|
|
619
|
+
readonly description: "Chat-state history for the agent session.";
|
|
624
620
|
};
|
|
625
621
|
};
|
|
626
622
|
additionalProperties: false;
|
|
@@ -7,12 +7,15 @@ export const schema = {
|
|
|
7
7
|
session: {
|
|
8
8
|
...agentSessionPayload.schema
|
|
9
9
|
},
|
|
10
|
+
// `history` is chat-only despite the name: chat and generate tracks are stored
|
|
11
|
+
// separately on the session, and `history` predates the split. Generate-state
|
|
12
|
+
// history is intentionally not exposed in the GraphQL API.
|
|
10
13
|
history: {
|
|
11
14
|
type: 'array',
|
|
12
15
|
items: {
|
|
13
16
|
type: 'object'
|
|
14
17
|
},
|
|
15
|
-
description: '
|
|
18
|
+
description: 'Chat-state history for the agent session.'
|
|
16
19
|
},
|
|
17
20
|
messages: {
|
|
18
21
|
type: 'array',
|
|
@@ -167,10 +167,6 @@ export declare const schema: {
|
|
|
167
167
|
readonly type: "string";
|
|
168
168
|
readonly description: "The ID of the current state in the agent session.";
|
|
169
169
|
};
|
|
170
|
-
readonly chatSessionIds: {
|
|
171
|
-
readonly type: "object";
|
|
172
|
-
readonly description: "A mapping of chat session IDs to their corresponding state IDs.";
|
|
173
|
-
};
|
|
174
170
|
readonly sessionMemory: {
|
|
175
171
|
readonly type: "object";
|
|
176
172
|
readonly description: "Memory associated with the agent session, which can be used to store stateful information.";
|
|
@@ -385,7 +381,7 @@ export declare const schema: {
|
|
|
385
381
|
};
|
|
386
382
|
};
|
|
387
383
|
};
|
|
388
|
-
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "
|
|
384
|
+
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "sessionMemory", "hasAgentHistory", "hasFeedback", "suspend", "projectId", "schemaId", "schemaHash", "totalTokens"];
|
|
389
385
|
readonly additionalProperties: false;
|
|
390
386
|
readonly title: "TSAgentSession";
|
|
391
387
|
readonly type: "object";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/schema",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.18.2",
|
|
4
4
|
"description": "TakeShape Schema",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"p-reduce": "3.0.0",
|
|
58
58
|
"semver": "7.7.2",
|
|
59
59
|
"tiny-invariant": "1.3.3",
|
|
60
|
-
"@takeshape/
|
|
61
|
-
"@takeshape/
|
|
62
|
-
"@takeshape/errors": "12.
|
|
60
|
+
"@takeshape/util": "12.18.2",
|
|
61
|
+
"@takeshape/json-schema": "12.18.2",
|
|
62
|
+
"@takeshape/errors": "12.18.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@aws-sdk/client-s3": "3.848.0",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"glob": "11.0.1",
|
|
78
78
|
"json-schema-to-ts": "3.1.1",
|
|
79
79
|
"shortid": "2.2.16",
|
|
80
|
-
"@takeshape/infra": "12.
|
|
81
|
-
"@takeshape/logger": "12.
|
|
80
|
+
"@takeshape/infra": "12.18.2",
|
|
81
|
+
"@takeshape/logger": "12.18.2"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=24"
|