@takeshape/schema 11.118.0 → 11.120.0

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.
@@ -119,6 +119,29 @@ export declare const schema: {
119
119
  readonly additionalProperties: false;
120
120
  readonly required: ["name"];
121
121
  };
122
+ readonly blocked: {
123
+ readonly type: "boolean";
124
+ readonly description: "If this message was blocked by a guardrail";
125
+ };
126
+ readonly usage: {
127
+ readonly type: "object";
128
+ readonly description: "LLM token usage for this message";
129
+ readonly properties: {
130
+ readonly completionTokens: {
131
+ readonly type: "number";
132
+ };
133
+ readonly promptTokens: {
134
+ readonly type: "number";
135
+ };
136
+ readonly totalTokens: {
137
+ readonly type: "number";
138
+ };
139
+ readonly guardrailUnits: {
140
+ readonly type: "number";
141
+ };
142
+ };
143
+ readonly additionalProperties: false;
144
+ };
122
145
  };
123
146
  readonly required: ["messageId", "sessionId", "agentName", "projectId", "schemaId", "runMode", "sentAt"];
124
147
  readonly additionalProperties: false;
@@ -154,6 +177,13 @@ export declare const validate: import("ajv").ValidateFunction<{
154
177
  updatedBy?: string | undefined;
155
178
  name: string;
156
179
  } | undefined;
180
+ blocked?: boolean | undefined;
181
+ usage?: {
182
+ completionTokens?: number | undefined;
183
+ promptTokens?: number | undefined;
184
+ totalTokens?: number | undefined;
185
+ guardrailUnits?: number | undefined;
186
+ } | undefined;
157
187
  messageId: string;
158
188
  agentName: string;
159
189
  projectId: string;
@@ -112,6 +112,21 @@ export const schema = {
112
112
  },
113
113
  additionalProperties: false,
114
114
  required: ['name']
115
+ },
116
+ blocked: {
117
+ type: 'boolean',
118
+ description: 'If this message was blocked by a guardrail'
119
+ },
120
+ usage: {
121
+ type: 'object',
122
+ description: 'LLM token usage for this message',
123
+ properties: {
124
+ completionTokens: { type: 'number' },
125
+ promptTokens: { type: 'number' },
126
+ totalTokens: { type: 'number' },
127
+ guardrailUnits: { type: 'number' }
128
+ },
129
+ additionalProperties: false
115
130
  }
116
131
  },
117
132
  required: ['messageId', 'sessionId', 'agentName', 'projectId', 'schemaId', 'runMode', 'sentAt'],
@@ -1,4 +1,4 @@
1
- import type { AgentSessionValue, AgentSessionValueOutput } from '@takeshape/util';
1
+ import type { AgentExecutionOutputValue, AgentExecutionResultValue } from '@takeshape/util';
2
2
  import type { FromSchema } from 'json-schema-to-ts';
3
3
  export declare const schema: {
4
4
  readonly type: "object";
@@ -74,8 +74,8 @@ export declare const schema: {
74
74
  readonly additionalProperties: false;
75
75
  };
76
76
  export type AgentSessionPayload = FromSchema<typeof schema> & {
77
- stateOutputs: Record<string, AgentSessionValueOutput | undefined>;
77
+ stateOutputs: Record<string, AgentExecutionOutputValue | undefined>;
78
78
  suspended?: boolean;
79
- currentValue?: AgentSessionValue;
79
+ currentValue?: AgentExecutionResultValue;
80
80
  };
81
81
  export declare const validate: import("ajv").ValidateFunction<AgentSessionPayload>;
@@ -188,6 +188,29 @@ export declare const schema: {
188
188
  readonly additionalProperties: false;
189
189
  readonly required: ["name"];
190
190
  };
191
+ readonly blocked: {
192
+ readonly type: "boolean";
193
+ readonly description: "If this message was blocked by a guardrail";
194
+ };
195
+ readonly usage: {
196
+ readonly type: "object";
197
+ readonly description: "LLM token usage for this message";
198
+ readonly properties: {
199
+ readonly completionTokens: {
200
+ readonly type: "number";
201
+ };
202
+ readonly promptTokens: {
203
+ readonly type: "number";
204
+ };
205
+ readonly totalTokens: {
206
+ readonly type: "number";
207
+ };
208
+ readonly guardrailUnits: {
209
+ readonly type: "number";
210
+ };
211
+ };
212
+ readonly additionalProperties: false;
213
+ };
191
214
  };
192
215
  readonly required: ["messageId", "status"];
193
216
  readonly additionalProperties: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/schema",
3
- "version": "11.118.0",
3
+ "version": "11.120.0",
4
4
  "description": "TakeShape Schema",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -56,9 +56,9 @@
56
56
  "p-reduce": "2.1.0",
57
57
  "semver": "7.7.2",
58
58
  "tiny-invariant": "1.3.3",
59
- "@takeshape/json-schema": "11.118.0",
60
- "@takeshape/errors": "11.118.0",
61
- "@takeshape/util": "11.118.0"
59
+ "@takeshape/errors": "11.120.0",
60
+ "@takeshape/util": "11.120.0",
61
+ "@takeshape/json-schema": "11.120.0"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@takeshape/json-schema-to-typescript": "11.0.0",
@@ -75,8 +75,8 @@
75
75
  "glob": "7.2.3",
76
76
  "json-schema-to-ts": "3.1.1",
77
77
  "shortid": "2.2.16",
78
- "@takeshape/logger": "11.118.0",
79
- "@takeshape/infra": "11.118.0"
78
+ "@takeshape/infra": "11.120.0",
79
+ "@takeshape/logger": "11.120.0"
80
80
  },
81
81
  "engines": {
82
82
  "node": ">=22"