@sequenceholdings/agent-spec 0.1.5 → 0.1.7

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/README.md CHANGED
@@ -30,14 +30,14 @@ export const agent = defineAgent({
30
30
  })
31
31
  ```
32
32
 
33
- `RECOMMENDED_AGENT_MODEL` is the model new agents start on; `seq-studio agents
33
+ `RECOMMENDED_AGENT_MODEL` is the model new agents start on; `seq-studio agent
34
34
  init` writes it into the scaffold. A definition that omits `model` keeps the
35
35
  schema's original default, so upgrading this package never moves an existing
36
36
  agent to another model.
37
37
 
38
38
  Definitions must be pure data literals: do not read environment variables, call
39
39
  functions, or compute fields in `agent.ts`. Keep deployment targeting separate
40
- from a definition, then use `seq-studio agents validate`, `plan`, and `apply`.
40
+ from a definition, then use `seq-studio agent validate`, `plan`, and `apply`.
41
41
 
42
42
  ## Require a declared dependency
43
43
 
@@ -175,6 +175,8 @@ export const assistant = defineAgent({
175
175
  })
176
176
  ```
177
177
 
178
+ `voice.speakDemoNotice` optionally controls the spoken opening for the internal synthetic demo. Omit it (or set `true`, which canonicalizes to omission) to prepend the existing demo/retention notice. Restoring the notice restores the prior authored hash. An explicit `false` uses the authored `firstMessage` alone, while the model still receives the synthetic-data and recording policy. The authenticated tester pane carries the notice. This changes presentation only: it grants no permissions and cannot enable recording or real customer data. Existing definitions omit the property, preserving their bundle and provider-intent hashes. Suppression is rejected if recording is enabled. The two retained historical provider compilers reject suppression.
179
+
178
180
  Model and voice names in this example are placeholders for the server-supported catalog. `validateVoiceAuthoringOptions` checks that catalog; syntactic validation alone does not authorize a model, function, deployment, or call. Runtime identities, environment settings, phone numbers, credentials, provider resources, raw provider configuration, and tool-review assertions are excluded from the authored definition. Text execution settings such as MCP servers, subagents, and framework overrides are rejected on Voice Agents.
179
181
 
180
182
  Each captured procedure preserves exact Markdown, its name, activation description, native source identity, required tool aliases, and local subprocedure references. `contentHash` is recomputed from the captured name and instructions; it is not a native Skill version. Procedure keys, dependency sets, tool aliases, and field mappings have canonical ordering. Duplicate, missing, and cyclic dependencies fail validation. An empty activation description is allowed for a procedure referenced by another declared procedure. Saving a library Skill does not update captured content; an authorized explicit capture/refresh updates a draft. Consumers enforce current source permissions and optimistic revisions before persistence.
@@ -194,3 +196,53 @@ Import `voiceAudioReadRequestSchema`, `voiceAudioReadResponseSchema` and
194
196
  when validating Voice recording metadata in a browser. This narrow entry point
195
197
  avoids the Node-only compiler/hash exports at the package root. It defines
196
198
  metadata and delivery limits, not provider credentials or an audio transport.
199
+
200
+ ### Optional tool review
201
+
202
+ An action remains one tool invocation. Review is opt-in configuration on the
203
+ agent's binding, independent of whether the executor is a Managed Function,
204
+ an MCP tool, or a built-in tool:
205
+
206
+ ```ts
207
+ agentCapabilities: {
208
+ toolReviews: [
209
+ {
210
+ tool: { kind: 'function', ref: 'update-record' },
211
+ approval: 'required',
212
+ title: 'Update record',
213
+ labels: { recordId: 'Record', description: 'Description' },
214
+ },
215
+ {
216
+ tool: { kind: 'mcp', server: 'example', name: 'update_record' },
217
+ approval: 'required',
218
+ },
219
+ ],
220
+ }
221
+ ```
222
+
223
+ Function references must also be in `managedFunctions`; MCP servers must also
224
+ be in `mcpServers`; built-in names must also be in `tools`. This configuration
225
+ never grants access or removes an existing approval requirement. Omitted
226
+ configuration preserves ordinary tool execution.
227
+
228
+ Interactive approval pauses the existing invocation before execution. The
229
+ review card displays every argument. Approving or rejecting uses the normal
230
+ conversation continuation and tool-call identity. The initial native argument
231
+ review is read-only: ask the agent to revise the call to change its arguments.
232
+ Background runs with a required interactive gate fail closed; use a durable
233
+ human task for those workflows. This policy does not turn a background run
234
+ into a task automatically.
235
+
236
+ The single browser-safe `@sequenceholdings/agent-spec/action-review` entry provides `prepareActionReview`,
237
+ `actionReviewSchema`, and catalog types. Applications supply trusted current
238
+ records and field definitions; generated proposals contain only actions,
239
+ record references, and changed values. The same entry also provides the
240
+ transport-neutral policy schema and argument-card adapter. The
241
+ `ActionReview` component in Atlas UI renders the same contract with
242
+ optional editing. An application-owned executor must independently validate
243
+ permissions, input, stale revisions, and idempotency before saving. Rendering
244
+ or approving a card never grants database access.
245
+
246
+ Required interactive approvals are short-lived server-owned records, bound to the initiating execution principal, thread, tool-call ID and exact prepared JSON arguments. Another editor of the same thread cannot release that invocation. Redis is required; unavailable, expired, altered and consumed approvals fail closed. Client-supplied assistant history cannot replace the pending tool or its payload. The reviewed payload includes any conversation history prepared for outbound coding-agent calls; no history is appended after approval.
247
+
248
+ Subagent, evaluation, stub and experimental/qualification execution paths currently refuse required policies because those paths cannot preserve the configured binding. Provider-executed tools without a server-side executor cannot opt into review. These refusals do not remove ordinary invoke authorization or make background human-task approvals automatic.
@@ -0,0 +1,147 @@
1
+ import { z } from 'zod';
2
+ declare const value: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodObject<{
3
+ from: z.ZodNullable<z.ZodString>;
4
+ to: z.ZodNullable<z.ZodString>;
5
+ }, z.core.$strict>, z.ZodObject<{
6
+ amountMinor: z.ZodNumber;
7
+ currency: z.ZodString;
8
+ }, z.core.$strict>, z.ZodObject<{
9
+ type: z.ZodString;
10
+ id: z.ZodString;
11
+ }, z.core.$strict>, z.ZodNull]>;
12
+ export declare const actionReviewSchema: z.ZodObject<{
13
+ version: z.ZodLiteral<1>;
14
+ action: z.ZodEnum<{
15
+ create: "create";
16
+ update: "update";
17
+ archive: "archive";
18
+ invoke: "invoke";
19
+ }>;
20
+ target: z.ZodObject<{
21
+ type: z.ZodString;
22
+ id: z.ZodNullable<z.ZodString>;
23
+ }, z.core.$strict>;
24
+ changes: z.ZodArray<z.ZodObject<{
25
+ field: z.ZodString;
26
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodObject<{
27
+ from: z.ZodNullable<z.ZodString>;
28
+ to: z.ZodNullable<z.ZodString>;
29
+ }, z.core.$strict>, z.ZodObject<{
30
+ amountMinor: z.ZodNumber;
31
+ currency: z.ZodString;
32
+ }, z.core.$strict>, z.ZodObject<{
33
+ type: z.ZodString;
34
+ id: z.ZodString;
35
+ }, z.core.$strict>, z.ZodNull]>;
36
+ }, z.core.$strict>>;
37
+ references: z.ZodArray<z.ZodObject<{
38
+ record: z.ZodObject<{
39
+ type: z.ZodString;
40
+ id: z.ZodString;
41
+ }, z.core.$strict>;
42
+ role: z.ZodEnum<{
43
+ retained: "retained";
44
+ related: "related";
45
+ }>;
46
+ }, z.core.$strict>>;
47
+ }, z.core.$strict>;
48
+ export type ActionReviewValue = z.infer<typeof value>;
49
+ export type ActionReviewRequest = z.infer<typeof actionReviewSchema>;
50
+ export interface ActionReviewField {
51
+ key: string;
52
+ label: string;
53
+ kind: 'text' | 'select' | 'boolean' | 'dateRange' | 'money' | 'reference';
54
+ editable: boolean;
55
+ required?: boolean;
56
+ maxLength?: number;
57
+ referenceTypes?: string[];
58
+ options?: {
59
+ value: string;
60
+ label: string;
61
+ }[];
62
+ }
63
+ export interface ActionReviewRecord {
64
+ type: string;
65
+ id: string;
66
+ label: string;
67
+ values: Record<string, ActionReviewValue>;
68
+ allowedActions: ActionReviewRequest['action'][];
69
+ href?: string;
70
+ }
71
+ export interface ActionReviewCatalog {
72
+ types: Record<string, {
73
+ label: string;
74
+ canCreate: boolean;
75
+ canInvoke?: boolean;
76
+ fields: ActionReviewField[];
77
+ }>;
78
+ records: ActionReviewRecord[];
79
+ }
80
+ export declare function actionReviewValuesEqual(a: ActionReviewValue | undefined, b: ActionReviewValue | undefined): boolean;
81
+ export declare function prepareActionReview(input: unknown, catalog: ActionReviewCatalog): {
82
+ spec: {
83
+ version: 1;
84
+ action: "create" | "update" | "archive" | "invoke";
85
+ target: {
86
+ type: string;
87
+ id: string | null;
88
+ };
89
+ changes: {
90
+ field: string;
91
+ value: string | boolean | {
92
+ from: string | null;
93
+ to: string | null;
94
+ } | {
95
+ type: string;
96
+ id: string;
97
+ } | {
98
+ amountMinor: number;
99
+ currency: string;
100
+ } | null;
101
+ }[];
102
+ references: {
103
+ record: {
104
+ type: string;
105
+ id: string;
106
+ };
107
+ role: "retained" | "related";
108
+ }[];
109
+ };
110
+ definition: {
111
+ label: string;
112
+ canCreate: boolean;
113
+ canInvoke?: boolean;
114
+ fields: ActionReviewField[];
115
+ };
116
+ record: ActionReviewRecord | null;
117
+ current: Record<string, string | boolean | {
118
+ from: string | null;
119
+ to: string | null;
120
+ } | {
121
+ type: string;
122
+ id: string;
123
+ } | {
124
+ amountMinor: number;
125
+ currency: string;
126
+ } | null> | null;
127
+ proposed: Record<string, string | boolean | {
128
+ from: string | null;
129
+ to: string | null;
130
+ } | {
131
+ type: string;
132
+ id: string;
133
+ } | {
134
+ amountMinor: number;
135
+ currency: string;
136
+ } | null>;
137
+ references: {
138
+ record: ActionReviewRecord;
139
+ role: "retained" | "related";
140
+ }[];
141
+ };
142
+ export type PreparedActionReview = ReturnType<typeof prepareActionReview>;
143
+ export declare function actionReviewRecordKey(record: {
144
+ type: string;
145
+ id: string;
146
+ }): string;
147
+ export {};
@@ -0,0 +1,76 @@
1
+ import { z } from 'zod';
2
+ const id = z.string().min(1).max(128).refine(value => !['__proto__', 'prototype', 'constructor'].includes(value), 'Reserved identifier');
3
+ const recordRef = z.object({ type: id, id }).strict();
4
+ const date = z.string().regex(/^\d{4}-\d{2}-\d{2}$/).refine(value => { const parsed = new Date(`${value}T00:00:00Z`); return !Number.isNaN(parsed.valueOf()) && parsed.toISOString().slice(0, 10) === value; }, 'Invalid calendar date');
5
+ const dateRange = z.object({ from: date.nullable(), to: date.nullable() }).strict().refine(value => !value.from || !value.to || value.from <= value.to, 'Date range is reversed');
6
+ const money = z.object({ amountMinor: z.number().int().safe(), currency: z.string().regex(/^[A-Z]{3}$/) }).strict();
7
+ const value = z.union([z.string().max(5000), z.boolean(), dateRange, money, recordRef, z.null()]);
8
+ export const actionReviewSchema = z.object({ version: z.literal(1), action: z.enum(['create', 'update', 'archive', 'invoke']), target: z.object({ type: id, id: id.nullable() }).strict(), changes: z.array(z.object({ field: id, value }).strict()).max(24), references: z.array(z.object({ record: recordRef, role: z.enum(['retained', 'related']) }).strict()).max(8) }).strict();
9
+ export function actionReviewValuesEqual(a, b) {
10
+ const stable = (input) => input && typeof input === 'object' ? Object.entries(input).sort(([a], [b]) => a.localeCompare(b)) : input ?? null;
11
+ return JSON.stringify(stable(a)) === JSON.stringify(stable(b));
12
+ }
13
+ export function prepareActionReview(input, catalog) {
14
+ const spec = actionReviewSchema.parse(typeof input === 'string' ? JSON.parse(input) : input);
15
+ const definition = Object.hasOwn(catalog.types, spec.target.type) ? catalog.types[spec.target.type] : undefined;
16
+ if (!definition)
17
+ throw new Error('Unsupported record type');
18
+ if (definition.fields.length > 24)
19
+ throw new Error('Too many review fields');
20
+ const record = spec.target.id === null ? null : catalog.records.find(row => row.type === spec.target.type && row.id === spec.target.id) ?? null;
21
+ if (spec.action === 'create') {
22
+ if (spec.target.id !== null || !definition.canCreate)
23
+ throw new Error('Cannot create this record');
24
+ }
25
+ else if (spec.action === 'invoke') {
26
+ if (spec.target.id !== null || !definition.canInvoke)
27
+ throw new Error('Cannot invoke this action');
28
+ }
29
+ else if (!record || !record.allowedActions.includes(spec.action))
30
+ throw new Error('Record or action is unavailable');
31
+ if (spec.action === 'archive' && spec.changes.length)
32
+ throw new Error('Archive cannot change fields');
33
+ if (spec.action !== 'archive' && !spec.changes.length)
34
+ throw new Error('No fields proposed');
35
+ const keys = new Set(), proposed = { ...(record?.values ?? {}) };
36
+ for (const patch of spec.changes) {
37
+ if (keys.has(patch.field))
38
+ throw new Error('Duplicate field change');
39
+ keys.add(patch.field);
40
+ const field = definition.fields.find(field => field.key === patch.field);
41
+ if (!field || !field.editable)
42
+ throw new Error('Field is unavailable for changes');
43
+ const v = patch.value;
44
+ const valid = v === null && (field.kind === 'dateRange' || !field.required) || field.kind === 'text' && typeof v === 'string' || field.kind === 'select' && typeof v === 'string' && field.options?.some(option => option.value === v) || field.kind === 'boolean' && typeof v === 'boolean' || field.kind === 'dateRange' && typeof v === 'object' && v !== null && 'from' in v || field.kind === 'money' && typeof v === 'object' && v !== null && 'amountMinor' in v || field.kind === 'reference' && typeof v === 'object' && v !== null && 'type' in v && (!field.referenceTypes || field.referenceTypes.includes(v.type)) && catalog.records.some(row => row.type === v.type && row.id === v.id);
45
+ if (!valid)
46
+ throw new Error(`Invalid value for ${field.label}`);
47
+ if (typeof v === 'string' && field.maxLength && v.length > field.maxLength)
48
+ throw new Error(`${field.label} is too long`);
49
+ proposed[patch.field] = v;
50
+ }
51
+ if (spec.action === 'update' && spec.changes.every(patch => actionReviewValuesEqual(record?.values[patch.field], patch.value)))
52
+ throw new Error('No changes to apply');
53
+ if (spec.action !== 'archive') {
54
+ for (const field of definition.fields) {
55
+ if (field.required && (proposed[field.key] == null || typeof proposed[field.key] === 'string' && !String(proposed[field.key]).trim()))
56
+ throw new Error(`${field.label} is required`);
57
+ }
58
+ }
59
+ const relatedKeys = new Set();
60
+ const references = spec.references.map(ref => {
61
+ const key = actionReviewRecordKey(ref.record);
62
+ if (relatedKeys.has(key))
63
+ throw new Error('Duplicate related record');
64
+ relatedKeys.add(key);
65
+ const related = catalog.records.find(row => row.type === ref.record.type && row.id === ref.record.id);
66
+ if (!related || related === record)
67
+ throw new Error('Related record is unavailable or is the target');
68
+ if (ref.role === 'retained' && spec.action !== 'archive')
69
+ throw new Error('Retained records only apply to archive');
70
+ return { record: related, role: ref.role };
71
+ });
72
+ return { spec, definition, record, current: record?.values ?? null, proposed, references };
73
+ }
74
+ export function actionReviewRecordKey(record) {
75
+ return JSON.stringify([record.type, record.id]);
76
+ }
@@ -0,0 +1,12 @@
1
+ export declare function formatActionReviewMoney({ amountMinor, currency, locale }: {
2
+ amountMinor: number;
3
+ currency: string;
4
+ locale?: string;
5
+ }): string;
6
+ export declare function actionReviewDateEditor(range: {
7
+ from: string | null;
8
+ to: string | null;
9
+ } | null): {
10
+ partial: boolean;
11
+ label: string;
12
+ };
@@ -0,0 +1,19 @@
1
+ export function formatActionReviewMoney({ amountMinor, currency, locale = 'en-US' }) {
2
+ if (!Number.isSafeInteger(amountMinor))
3
+ throw new Error('Amount must use safe integer minor units');
4
+ const formatter = new Intl.NumberFormat(locale, { style: 'currency', currency });
5
+ const digits = formatter.resolvedOptions().maximumFractionDigits ?? 2;
6
+ const minor = BigInt(amountMinor), scale = 10n ** BigInt(digits), whole = minor / scale;
7
+ const fraction = new Intl.NumberFormat(locale, { minimumIntegerDigits: Math.max(1, digits), useGrouping: false }).format((minor < 0n ? -minor : minor) % scale);
8
+ return formatter.formatToParts(whole === 0n && minor < 0n ? -0 : whole).map(part => part.type === 'fraction' ? fraction : part.value).join('');
9
+ }
10
+ export function actionReviewDateEditor(range) {
11
+ const date = (value) => new Intl.DateTimeFormat('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone: 'UTC' }).format(new Date(`${value}T00:00:00Z`));
12
+ if (range?.from && range.to)
13
+ return { partial: false, label: `${date(range.from)} – ${date(range.to)}` };
14
+ if (range?.from)
15
+ return { partial: true, label: `From ${date(range.from)}` };
16
+ if (range?.to)
17
+ return { partial: true, label: `Through ${date(range.to)}` };
18
+ return { partial: false, label: 'No date restriction' };
19
+ }
@@ -0,0 +1,3 @@
1
+ export * from './action-review-contract.js';
2
+ export * from './tool-review.js';
3
+ export * from './action-review-format.js';
@@ -0,0 +1,3 @@
1
+ export * from './action-review-contract.js';
2
+ export * from './tool-review.js';
3
+ export * from './action-review-format.js';
@@ -6,6 +6,8 @@ export declare const RECOMMENDED_AGENT_MODEL: {
6
6
  readonly provider: "anthropic";
7
7
  readonly name: "claude-sonnet-5-5";
8
8
  };
9
+ export declare const AGENT_EXECUTION_MACHINES: readonly ["small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"];
10
+ export type AgentExecutionMachine = (typeof AGENT_EXECUTION_MACHINES)[number];
9
11
  export type UnsupportedConstraint = {
10
12
  path: string;
11
13
  type: string;
@@ -37,11 +39,23 @@ export declare const textAgentDefinitionSchema: z.ZodObject<{
37
39
  vercel: "vercel";
38
40
  "claude-agent": "claude-agent";
39
41
  }>>;
42
+ runtime: z.ZodOptional<z.ZodEnum<{
43
+ agentic: "agentic";
44
+ single_call: "single_call";
45
+ }>>;
40
46
  vmBackend: z.ZodOptional<z.ZodEnum<{
41
47
  gce: "gce";
42
48
  e2b: "e2b";
43
49
  }>>;
44
50
  idleTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
51
+ executionMachine: z.ZodOptional<z.ZodEnum<{
52
+ "small-1x": "small-1x";
53
+ "small-2x": "small-2x";
54
+ "medium-1x": "medium-1x";
55
+ "medium-2x": "medium-2x";
56
+ "large-1x": "large-1x";
57
+ "large-2x": "large-2x";
58
+ }>>;
45
59
  agentCapabilities: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
46
60
  claudeToolSearch: z.ZodOptional<z.ZodEnum<{
47
61
  enabled: "enabled";
@@ -53,7 +67,7 @@ export declare const textAgentDefinitionSchema: z.ZodObject<{
53
67
  enabled: z.ZodBoolean;
54
68
  containerId: z.ZodOptional<z.ZodString>;
55
69
  fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
56
- }, z.core.$strip>>>>;
70
+ }, z.core.$strip>, unknown>>>;
57
71
  model: z.ZodDefault<z.ZodObject<{
58
72
  provider: z.ZodString;
59
73
  name: z.ZodString;
@@ -99,8 +113,8 @@ export declare const textAgentDefinitionSchema: z.ZodObject<{
99
113
  string: "string";
100
114
  number: "number";
101
115
  boolean: "boolean";
102
- text: "text";
103
116
  enum: "enum";
117
+ text: "text";
104
118
  }>;
105
119
  required: z.ZodOptional<z.ZodBoolean>;
106
120
  default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
@@ -120,8 +134,8 @@ export declare const textAgentDefinitionSchema: z.ZodObject<{
120
134
  publicOutputs: z.ZodOptional<z.ZodBoolean>;
121
135
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
122
136
  type: z.ZodEnum<{
123
- user: "user";
124
137
  group: "group";
138
+ user: "user";
125
139
  }>;
126
140
  id: z.ZodString;
127
141
  role: z.ZodEnum<{
@@ -135,13 +149,13 @@ export declare const textAgentDefinitionSchema: z.ZodObject<{
135
149
  voice: z.ZodOptional<z.ZodNever>;
136
150
  }, z.core.$strict>;
137
151
  export declare const voiceAgentDefinitionSchema: z.ZodObject<{
152
+ id: z.ZodString;
138
153
  name: z.ZodString;
139
154
  description: z.ZodOptional<z.ZodString>;
140
- id: z.ZodString;
141
155
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
142
156
  type: z.ZodEnum<{
143
- user: "user";
144
157
  group: "group";
158
+ user: "user";
145
159
  }>;
146
160
  id: z.ZodString;
147
161
  role: z.ZodEnum<{
@@ -163,6 +177,7 @@ export declare const voiceAgentDefinitionSchema: z.ZodObject<{
163
177
  voice: z.ZodString;
164
178
  language: z.ZodString;
165
179
  firstMessage: z.ZodString;
180
+ speakDemoNotice: z.ZodOptional<z.ZodBoolean>;
166
181
  procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
167
182
  key: z.ZodString;
168
183
  name: z.ZodString;
@@ -272,6 +287,7 @@ export declare const voiceAgentDefinitionSchema: z.ZodObject<{
272
287
  operation: string;
273
288
  };
274
289
  }[];
290
+ speakDemoNotice?: false | undefined;
275
291
  schemaVersion: "1";
276
292
  voice: string;
277
293
  language: string;
@@ -309,6 +325,7 @@ export declare const voiceAgentDefinitionSchema: z.ZodObject<{
309
325
  operation: string;
310
326
  };
311
327
  }[];
328
+ speakDemoNotice?: boolean | undefined;
312
329
  }>>;
313
330
  isPublic: z.ZodOptional<z.ZodLiteral<false>>;
314
331
  publicOutputs: z.ZodOptional<z.ZodLiteral<false>>;
@@ -321,11 +338,23 @@ export declare const agentDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject
321
338
  vercel: "vercel";
322
339
  "claude-agent": "claude-agent";
323
340
  }>>;
341
+ runtime: z.ZodOptional<z.ZodEnum<{
342
+ agentic: "agentic";
343
+ single_call: "single_call";
344
+ }>>;
324
345
  vmBackend: z.ZodOptional<z.ZodEnum<{
325
346
  gce: "gce";
326
347
  e2b: "e2b";
327
348
  }>>;
328
349
  idleTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
350
+ executionMachine: z.ZodOptional<z.ZodEnum<{
351
+ "small-1x": "small-1x";
352
+ "small-2x": "small-2x";
353
+ "medium-1x": "medium-1x";
354
+ "medium-2x": "medium-2x";
355
+ "large-1x": "large-1x";
356
+ "large-2x": "large-2x";
357
+ }>>;
329
358
  agentCapabilities: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
330
359
  claudeToolSearch: z.ZodOptional<z.ZodEnum<{
331
360
  enabled: "enabled";
@@ -337,7 +366,7 @@ export declare const agentDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject
337
366
  enabled: z.ZodBoolean;
338
367
  containerId: z.ZodOptional<z.ZodString>;
339
368
  fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
340
- }, z.core.$strip>>>>;
369
+ }, z.core.$strip>, unknown>>>;
341
370
  model: z.ZodDefault<z.ZodObject<{
342
371
  provider: z.ZodString;
343
372
  name: z.ZodString;
@@ -383,8 +412,8 @@ export declare const agentDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject
383
412
  string: "string";
384
413
  number: "number";
385
414
  boolean: "boolean";
386
- text: "text";
387
415
  enum: "enum";
416
+ text: "text";
388
417
  }>;
389
418
  required: z.ZodOptional<z.ZodBoolean>;
390
419
  default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
@@ -404,8 +433,8 @@ export declare const agentDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject
404
433
  publicOutputs: z.ZodOptional<z.ZodBoolean>;
405
434
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
406
435
  type: z.ZodEnum<{
407
- user: "user";
408
436
  group: "group";
437
+ user: "user";
409
438
  }>;
410
439
  id: z.ZodString;
411
440
  role: z.ZodEnum<{
@@ -418,13 +447,13 @@ export declare const agentDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject
418
447
  mode: z.ZodOptional<z.ZodLiteral<"text">>;
419
448
  voice: z.ZodOptional<z.ZodNever>;
420
449
  }, z.core.$strict>, z.ZodObject<{
450
+ id: z.ZodString;
421
451
  name: z.ZodString;
422
452
  description: z.ZodOptional<z.ZodString>;
423
- id: z.ZodString;
424
453
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
425
454
  type: z.ZodEnum<{
426
- user: "user";
427
455
  group: "group";
456
+ user: "user";
428
457
  }>;
429
458
  id: z.ZodString;
430
459
  role: z.ZodEnum<{
@@ -446,6 +475,7 @@ export declare const agentDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject
446
475
  voice: z.ZodString;
447
476
  language: z.ZodString;
448
477
  firstMessage: z.ZodString;
478
+ speakDemoNotice: z.ZodOptional<z.ZodBoolean>;
449
479
  procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
450
480
  key: z.ZodString;
451
481
  name: z.ZodString;
@@ -555,6 +585,7 @@ export declare const agentDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject
555
585
  operation: string;
556
586
  };
557
587
  }[];
588
+ speakDemoNotice?: false | undefined;
558
589
  schemaVersion: "1";
559
590
  voice: string;
560
591
  language: string;
@@ -592,6 +623,7 @@ export declare const agentDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject
592
623
  operation: string;
593
624
  };
594
625
  }[];
626
+ speakDemoNotice?: boolean | undefined;
595
627
  }>>;
596
628
  isPublic: z.ZodOptional<z.ZodLiteral<false>>;
597
629
  publicOutputs: z.ZodOptional<z.ZodLiteral<false>>;
@@ -1,3 +1,4 @@
1
+ import { readToolReviews } from './tool-review.js';
1
2
  import { createHash } from 'node:crypto';
2
3
  import { z } from 'zod';
3
4
  import { inputSchemaSchema } from './input-schema.js';
@@ -16,6 +17,14 @@ export const RECOMMENDED_AGENT_MODEL = {
16
17
  provider: 'anthropic',
17
18
  name: 'claude-sonnet-5-5',
18
19
  };
20
+ export const AGENT_EXECUTION_MACHINES = [
21
+ 'small-1x',
22
+ 'small-2x',
23
+ 'medium-1x',
24
+ 'medium-2x',
25
+ 'large-1x',
26
+ 'large-2x',
27
+ ];
19
28
  const jsonObjectSchema = z.record(z.string(), z.unknown());
20
29
  const unsupportedConstraints = {
21
30
  integer: ['minimum', 'maximum', 'exclusiveMinimum', 'exclusiveMaximum'],
@@ -111,8 +120,10 @@ const textDefinitionBaseSchema = z
111
120
  name: z.string().min(1),
112
121
  description: z.string().optional(),
113
122
  framework: z.enum(['vercel', 'claude-agent']).optional(),
123
+ runtime: z.enum(['agentic', 'single_call']).optional(),
114
124
  vmBackend: z.enum(['gce', 'e2b']).optional(),
115
125
  idleTimeoutSeconds: z.number().int().min(60).max(86_400).optional(),
126
+ executionMachine: z.enum(AGENT_EXECUTION_MACHINES).optional(),
116
127
  agentCapabilities: jsonObjectSchema.nullish(),
117
128
  claudeToolSearch: z.enum(['enabled', 'disabled', 'auto']).optional(),
118
129
  claudeBuiltInTools: z.array(z.string()).default([]),
@@ -152,6 +163,12 @@ export const textAgentDefinitionSchema = textDefinitionBaseSchema.safeExtend({
152
163
  mode: z.literal('text').optional(),
153
164
  voice: z.never().optional(),
154
165
  }).superRefine((definition, context) => {
166
+ try {
167
+ readToolReviews({ capabilities: definition.agentCapabilities, functions: definition.managedFunctions ?? [], servers: definition.mcpServers, tools: definition.tools });
168
+ }
169
+ catch (error) {
170
+ context.addIssue({ code: 'custom', path: ['agentCapabilities', 'toolReviews'], message: error instanceof Error ? error.message : 'Invalid Function tool review configuration' });
171
+ }
155
172
  if (definition.framework === 'claude-agent' && (definition.clientProposals?.length ?? 0) > 0) {
156
173
  context.addIssue({ code: 'custom', path: ['clientProposals'], message: 'Client proposals require the Vercel tool runtime' });
157
174
  }
package/dist/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './agent-definition.js';
2
2
  export * from './voice.js';
3
3
  export * from './job-request-hash.js';
4
4
  export * from './client-proposals.js';
5
+ export * from './tool-review.js';
package/dist/index.js CHANGED
@@ -2,3 +2,4 @@ export * from './agent-definition.js';
2
2
  export * from './voice.js';
3
3
  export * from './job-request-hash.js';
4
4
  export * from './client-proposals.js';
5
+ export * from './tool-review.js';
@@ -8,8 +8,8 @@ export declare const inputSchemaSchema: z.ZodObject<{
8
8
  string: "string";
9
9
  number: "number";
10
10
  boolean: "boolean";
11
- text: "text";
12
11
  enum: "enum";
12
+ text: "text";
13
13
  }>;
14
14
  required: z.ZodOptional<z.ZodBoolean>;
15
15
  default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
@@ -0,0 +1,45 @@
1
+ import { z } from 'zod';
2
+ import { type ActionReviewCatalog, type ActionReviewRequest } from './action-review-contract.js';
3
+ export declare const toolReviewSchema: z.ZodObject<{
4
+ approval: z.ZodEnum<{
5
+ required: "required";
6
+ none: "none";
7
+ }>;
8
+ title: z.ZodOptional<z.ZodString>;
9
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
10
+ }, z.core.$strict>;
11
+ export type ToolReview = z.infer<typeof toolReviewSchema>;
12
+ export declare const toolReviewBindingSchema: z.ZodObject<{
13
+ approval: z.ZodEnum<{
14
+ required: "required";
15
+ none: "none";
16
+ }>;
17
+ title: z.ZodOptional<z.ZodString>;
18
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
19
+ tool: z.ZodDiscriminatedUnion<[z.ZodObject<{
20
+ kind: z.ZodLiteral<"function">;
21
+ ref: z.ZodString;
22
+ }, z.core.$strict>, z.ZodObject<{
23
+ kind: z.ZodLiteral<"mcp">;
24
+ server: z.ZodString;
25
+ name: z.ZodString;
26
+ }, z.core.$strict>, z.ZodObject<{
27
+ kind: z.ZodLiteral<"builtin">;
28
+ name: z.ZodString;
29
+ }, z.core.$strict>], "kind">;
30
+ }, z.core.$strict>;
31
+ export type ToolReviewBinding = z.infer<typeof toolReviewBindingSchema>;
32
+ export declare function readToolReviews({ capabilities, functions, servers, tools }: {
33
+ capabilities?: unknown;
34
+ functions?: readonly string[];
35
+ servers?: readonly string[];
36
+ tools?: readonly string[];
37
+ }): ToolReviewBinding[];
38
+ export declare function toolReviewCard({ title, input, labels }: {
39
+ title: string;
40
+ input: unknown;
41
+ labels?: Record<string, string>;
42
+ }): {
43
+ spec: ActionReviewRequest;
44
+ catalog: ActionReviewCatalog;
45
+ };
@@ -0,0 +1,51 @@
1
+ import { z } from 'zod';
2
+ import { prepareActionReview } from './action-review-contract.js';
3
+ export const toolReviewSchema = z.strictObject({
4
+ approval: z.enum(['required', 'none']),
5
+ title: z.string().min(1).max(160).optional(),
6
+ labels: z.record(z.string().min(1).max(128), z.string().min(1).max(160)).optional(),
7
+ });
8
+ export const toolReviewBindingSchema = toolReviewSchema.extend({
9
+ tool: z.discriminatedUnion('kind', [
10
+ z.strictObject({ kind: z.literal('function'), ref: z.string().min(1) }),
11
+ z.strictObject({ kind: z.literal('mcp'), server: z.string().min(1), name: z.string().min(1) }),
12
+ z.strictObject({ kind: z.literal('builtin'), name: z.string().min(1) }),
13
+ ]),
14
+ });
15
+ export function readToolReviews({ capabilities, functions = [], servers = [], tools = [] }) {
16
+ const configured = capabilities && typeof capabilities === 'object' ? Reflect.get(capabilities, 'toolReviews') : undefined;
17
+ if (configured === undefined)
18
+ return [];
19
+ const bindings = z.array(toolReviewBindingSchema).max(100).parse(configured);
20
+ const seen = new Set();
21
+ for (const { tool } of bindings) {
22
+ const key = JSON.stringify(tool);
23
+ if (seen.has(key))
24
+ throw new Error('Duplicate tool review binding');
25
+ seen.add(key);
26
+ const declared = tool.kind === 'function' ? functions.includes(tool.ref) : tool.kind === 'mcp' ? servers.includes(tool.server) : tools.includes(tool.name);
27
+ if (!declared)
28
+ throw new Error('Review policy must reference a declared tool or integration');
29
+ }
30
+ return bindings;
31
+ }
32
+ export function toolReviewCard({ title, input, labels = {} }) {
33
+ const entries = input && typeof input === 'object' && !Array.isArray(input) ? Object.entries(input) : [['input', input]];
34
+ if (entries.length > 24)
35
+ throw new Error('Too many fields for an action review card');
36
+ const display = (value) => {
37
+ if (value === null || typeof value === 'boolean')
38
+ return value;
39
+ const text = typeof value === 'string' ? value : JSON.stringify(value, null, 2) ?? '—';
40
+ if (text.length > 5000)
41
+ throw new Error('Argument is too large for an action review card');
42
+ return text;
43
+ };
44
+ const changes = entries.length ? entries.map(([field, value]) => ({ field, value: display(value) })) : [{ field: 'arguments', value: '{}' }];
45
+ const catalog = { types: { action: { label: title, canCreate: false, canInvoke: true, fields: changes.map(({ field, value }) => ({
46
+ key: field, label: Object.hasOwn(labels, field) ? labels[field] : field, kind: typeof value === 'boolean' ? 'boolean' : 'text', editable: true,
47
+ })) } }, records: [] };
48
+ const spec = { version: 1, action: 'invoke', target: { type: 'action', id: null }, changes, references: [] };
49
+ prepareActionReview(spec, catalog);
50
+ return { spec, catalog };
51
+ }
@@ -398,13 +398,13 @@ export declare const voiceDraftReadResponseSchema: z.ZodObject<{
398
398
  agentId: z.ZodString;
399
399
  revision: z.ZodNumber;
400
400
  definition: z.ZodObject<{
401
+ id: z.ZodString;
401
402
  name: z.ZodString;
402
403
  description: z.ZodOptional<z.ZodString>;
403
- id: z.ZodString;
404
404
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
405
405
  type: z.ZodEnum<{
406
- user: "user";
407
406
  group: "group";
407
+ user: "user";
408
408
  }>;
409
409
  id: z.ZodString;
410
410
  role: z.ZodEnum<{
@@ -426,6 +426,7 @@ export declare const voiceDraftReadResponseSchema: z.ZodObject<{
426
426
  voice: z.ZodString;
427
427
  language: z.ZodString;
428
428
  firstMessage: z.ZodString;
429
+ speakDemoNotice: z.ZodOptional<z.ZodBoolean>;
429
430
  procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
430
431
  key: z.ZodString;
431
432
  name: z.ZodString;
@@ -535,6 +536,7 @@ export declare const voiceDraftReadResponseSchema: z.ZodObject<{
535
536
  operation: string;
536
537
  };
537
538
  }[];
539
+ speakDemoNotice?: false | undefined;
538
540
  schemaVersion: "1";
539
541
  voice: string;
540
542
  language: string;
@@ -572,6 +574,7 @@ export declare const voiceDraftReadResponseSchema: z.ZodObject<{
572
574
  operation: string;
573
575
  };
574
576
  }[];
577
+ speakDemoNotice?: boolean | undefined;
575
578
  }>>;
576
579
  isPublic: z.ZodOptional<z.ZodLiteral<false>>;
577
580
  publicOutputs: z.ZodOptional<z.ZodLiteral<false>>;
@@ -580,13 +583,13 @@ export declare const voiceDraftReadResponseSchema: z.ZodObject<{
580
583
  updatedAt: z.ZodISODateTime;
581
584
  }, z.core.$strict>;
582
585
  export declare const voiceDefinitionExportResponseSchema: z.ZodObject<{
586
+ id: z.ZodString;
583
587
  name: z.ZodString;
584
588
  description: z.ZodOptional<z.ZodString>;
585
- id: z.ZodString;
586
589
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
587
590
  type: z.ZodEnum<{
588
- user: "user";
589
591
  group: "group";
592
+ user: "user";
590
593
  }>;
591
594
  id: z.ZodString;
592
595
  role: z.ZodEnum<{
@@ -608,6 +611,7 @@ export declare const voiceDefinitionExportResponseSchema: z.ZodObject<{
608
611
  voice: z.ZodString;
609
612
  language: z.ZodString;
610
613
  firstMessage: z.ZodString;
614
+ speakDemoNotice: z.ZodOptional<z.ZodBoolean>;
611
615
  procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
612
616
  key: z.ZodString;
613
617
  name: z.ZodString;
@@ -717,6 +721,7 @@ export declare const voiceDefinitionExportResponseSchema: z.ZodObject<{
717
721
  operation: string;
718
722
  };
719
723
  }[];
724
+ speakDemoNotice?: false | undefined;
720
725
  schemaVersion: "1";
721
726
  voice: string;
722
727
  language: string;
@@ -754,6 +759,7 @@ export declare const voiceDefinitionExportResponseSchema: z.ZodObject<{
754
759
  operation: string;
755
760
  };
756
761
  }[];
762
+ speakDemoNotice?: boolean | undefined;
757
763
  }>>;
758
764
  isPublic: z.ZodOptional<z.ZodLiteral<false>>;
759
765
  publicOutputs: z.ZodOptional<z.ZodLiteral<false>>;
@@ -90,6 +90,7 @@ export declare const voiceDeclarationSchema: z.ZodPipe<z.ZodObject<{
90
90
  voice: z.ZodString;
91
91
  language: z.ZodString;
92
92
  firstMessage: z.ZodString;
93
+ speakDemoNotice: z.ZodOptional<z.ZodBoolean>;
93
94
  procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
94
95
  key: z.ZodString;
95
96
  name: z.ZodString;
@@ -199,6 +200,7 @@ export declare const voiceDeclarationSchema: z.ZodPipe<z.ZodObject<{
199
200
  operation: string;
200
201
  };
201
202
  }[];
203
+ speakDemoNotice?: false | undefined;
202
204
  schemaVersion: "1";
203
205
  voice: string;
204
206
  language: string;
@@ -236,6 +238,7 @@ export declare const voiceDeclarationSchema: z.ZodPipe<z.ZodObject<{
236
238
  operation: string;
237
239
  };
238
240
  }[];
241
+ speakDemoNotice?: boolean | undefined;
239
242
  }>>;
240
243
  export type VoiceDeclaration = z.infer<typeof voiceDeclarationSchema>;
241
244
  export type VoiceDeclarationInput = z.input<typeof voiceDeclarationSchema>;
@@ -268,6 +271,7 @@ export declare const voiceProjectionInputSchema: z.ZodObject<{
268
271
  voice: z.ZodString;
269
272
  language: z.ZodString;
270
273
  firstMessage: z.ZodString;
274
+ speakDemoNotice: z.ZodOptional<z.ZodBoolean>;
271
275
  procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
272
276
  key: z.ZodString;
273
277
  name: z.ZodString;
@@ -377,6 +381,7 @@ export declare const voiceProjectionInputSchema: z.ZodObject<{
377
381
  operation: string;
378
382
  };
379
383
  }[];
384
+ speakDemoNotice?: false | undefined;
380
385
  schemaVersion: "1";
381
386
  voice: string;
382
387
  language: string;
@@ -414,6 +419,7 @@ export declare const voiceProjectionInputSchema: z.ZodObject<{
414
419
  operation: string;
415
420
  };
416
421
  }[];
422
+ speakDemoNotice?: boolean | undefined;
417
423
  }>>;
418
424
  }, z.core.$strict>;
419
425
  export type VoiceProjectionInput = z.infer<typeof voiceProjectionInputSchema>;
@@ -453,6 +459,7 @@ export declare function projectVoiceAuthoring(input: VoiceProjectionInput): {
453
459
  operation: string;
454
460
  };
455
461
  }[];
462
+ speakDemoNotice?: false | undefined;
456
463
  schemaVersion: "1";
457
464
  voice: string;
458
465
  language: string;
@@ -51,6 +51,7 @@ const voiceDeclarationBaseSchema = z.strictObject({
51
51
  voice: voiceIdSchema,
52
52
  language: z.string().regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/).max(35),
53
53
  firstMessage: z.string().trim().min(1).max(4_000),
54
+ speakDemoNotice: z.boolean().optional(),
54
55
  procedures: z.array(capturedVoiceProcedureSchema).max(32).default([]),
55
56
  tools: z.array(voiceAuthoredToolSchema).max(64).default([]),
56
57
  });
@@ -100,10 +101,10 @@ function validateProcedureDependencies({ voice, context, }) {
100
101
  }
101
102
  export const voiceDeclarationSchema = voiceDeclarationBaseSchema
102
103
  .superRefine((voice, context) => validateProcedureDependencies({ voice, context }))
103
- .transform((voice) => ({ ...voice,
104
+ .transform(({ speakDemoNotice, ...voice }) => ({ ...voice,
105
+ ...(speakDemoNotice === false ? { speakDemoNotice: false } : {}),
104
106
  procedures: [...voice.procedures].sort((a, b) => compareKeys(a.key, b.key)),
105
- tools: [...voice.tools].sort((a, b) => compareKeys(a.alias, b.alias)),
106
- }));
107
+ tools: [...voice.tools].sort((a, b) => compareKeys(a.alias, b.alias)), }));
107
108
  export const voiceSupportedAuthoringOptionsSchema = z.strictObject({
108
109
  voices: z.array(voiceIdSchema),
109
110
  languages: z.array(z.string().min(1)),
@@ -7,13 +7,13 @@ export declare const voiceDraftSchema: z.ZodObject<{
7
7
  agentId: z.ZodString;
8
8
  revision: z.ZodNumber;
9
9
  definition: z.ZodObject<{
10
+ id: z.ZodString;
10
11
  name: z.ZodString;
11
12
  description: z.ZodOptional<z.ZodString>;
12
- id: z.ZodString;
13
13
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
14
14
  type: z.ZodEnum<{
15
- user: "user";
16
15
  group: "group";
16
+ user: "user";
17
17
  }>;
18
18
  id: z.ZodString;
19
19
  role: z.ZodEnum<{
@@ -35,6 +35,7 @@ export declare const voiceDraftSchema: z.ZodObject<{
35
35
  voice: z.ZodString;
36
36
  language: z.ZodString;
37
37
  firstMessage: z.ZodString;
38
+ speakDemoNotice: z.ZodOptional<z.ZodBoolean>;
38
39
  procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
39
40
  key: z.ZodString;
40
41
  name: z.ZodString;
@@ -144,6 +145,7 @@ export declare const voiceDraftSchema: z.ZodObject<{
144
145
  operation: string;
145
146
  };
146
147
  }[];
148
+ speakDemoNotice?: false | undefined;
147
149
  schemaVersion: "1";
148
150
  voice: string;
149
151
  language: string;
@@ -181,6 +183,7 @@ export declare const voiceDraftSchema: z.ZodObject<{
181
183
  operation: string;
182
184
  };
183
185
  }[];
186
+ speakDemoNotice?: boolean | undefined;
184
187
  }>>;
185
188
  isPublic: z.ZodOptional<z.ZodLiteral<false>>;
186
189
  publicOutputs: z.ZodOptional<z.ZodLiteral<false>>;
@@ -193,13 +196,13 @@ export declare const voiceDraftSaveRequestSchema: z.ZodObject<{
193
196
  agentId: z.ZodString;
194
197
  expectedRevision: z.ZodNullable<z.ZodNumber>;
195
198
  definition: z.ZodObject<{
199
+ id: z.ZodString;
196
200
  name: z.ZodString;
197
201
  description: z.ZodOptional<z.ZodString>;
198
- id: z.ZodString;
199
202
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
200
203
  type: z.ZodEnum<{
201
- user: "user";
202
204
  group: "group";
205
+ user: "user";
203
206
  }>;
204
207
  id: z.ZodString;
205
208
  role: z.ZodEnum<{
@@ -221,6 +224,7 @@ export declare const voiceDraftSaveRequestSchema: z.ZodObject<{
221
224
  voice: z.ZodString;
222
225
  language: z.ZodString;
223
226
  firstMessage: z.ZodString;
227
+ speakDemoNotice: z.ZodOptional<z.ZodBoolean>;
224
228
  procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
225
229
  key: z.ZodString;
226
230
  name: z.ZodString;
@@ -330,6 +334,7 @@ export declare const voiceDraftSaveRequestSchema: z.ZodObject<{
330
334
  operation: string;
331
335
  };
332
336
  }[];
337
+ speakDemoNotice?: false | undefined;
333
338
  schemaVersion: "1";
334
339
  voice: string;
335
340
  language: string;
@@ -367,6 +372,7 @@ export declare const voiceDraftSaveRequestSchema: z.ZodObject<{
367
372
  operation: string;
368
373
  };
369
374
  }[];
375
+ speakDemoNotice?: boolean | undefined;
370
376
  }>>;
371
377
  isPublic: z.ZodOptional<z.ZodLiteral<false>>;
372
378
  publicOutputs: z.ZodOptional<z.ZodLiteral<false>>;
@@ -2,13 +2,13 @@ import { z } from 'zod';
2
2
  export declare const voiceDefinitionSnapshotSchema: z.ZodObject<{
3
3
  agentVersionId: z.ZodString;
4
4
  definition: z.ZodObject<{
5
+ id: z.ZodString;
5
6
  name: z.ZodString;
6
7
  description: z.ZodOptional<z.ZodString>;
7
- id: z.ZodString;
8
8
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
9
9
  type: z.ZodEnum<{
10
- user: "user";
11
10
  group: "group";
11
+ user: "user";
12
12
  }>;
13
13
  id: z.ZodString;
14
14
  role: z.ZodEnum<{
@@ -30,6 +30,7 @@ export declare const voiceDefinitionSnapshotSchema: z.ZodObject<{
30
30
  voice: z.ZodString;
31
31
  language: z.ZodString;
32
32
  firstMessage: z.ZodString;
33
+ speakDemoNotice: z.ZodOptional<z.ZodBoolean>;
33
34
  procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
34
35
  key: z.ZodString;
35
36
  name: z.ZodString;
@@ -139,6 +140,7 @@ export declare const voiceDefinitionSnapshotSchema: z.ZodObject<{
139
140
  operation: string;
140
141
  };
141
142
  }[];
143
+ speakDemoNotice?: false | undefined;
142
144
  schemaVersion: "1";
143
145
  voice: string;
144
146
  language: string;
@@ -176,6 +178,7 @@ export declare const voiceDefinitionSnapshotSchema: z.ZodObject<{
176
178
  operation: string;
177
179
  };
178
180
  }[];
181
+ speakDemoNotice?: boolean | undefined;
179
182
  }>>;
180
183
  isPublic: z.ZodOptional<z.ZodLiteral<false>>;
181
184
  publicOutputs: z.ZodOptional<z.ZodLiteral<false>>;
@@ -205,13 +208,13 @@ export declare const voiceReleaseRecordSchema: z.ZodObject<{
205
208
  snapshot: z.ZodNullable<z.ZodObject<{
206
209
  agentVersionId: z.ZodString;
207
210
  definition: z.ZodObject<{
211
+ id: z.ZodString;
208
212
  name: z.ZodString;
209
213
  description: z.ZodOptional<z.ZodString>;
210
- id: z.ZodString;
211
214
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
212
215
  type: z.ZodEnum<{
213
- user: "user";
214
216
  group: "group";
217
+ user: "user";
215
218
  }>;
216
219
  id: z.ZodString;
217
220
  role: z.ZodEnum<{
@@ -233,6 +236,7 @@ export declare const voiceReleaseRecordSchema: z.ZodObject<{
233
236
  voice: z.ZodString;
234
237
  language: z.ZodString;
235
238
  firstMessage: z.ZodString;
239
+ speakDemoNotice: z.ZodOptional<z.ZodBoolean>;
236
240
  procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
237
241
  key: z.ZodString;
238
242
  name: z.ZodString;
@@ -342,6 +346,7 @@ export declare const voiceReleaseRecordSchema: z.ZodObject<{
342
346
  operation: string;
343
347
  };
344
348
  }[];
349
+ speakDemoNotice?: false | undefined;
345
350
  schemaVersion: "1";
346
351
  voice: string;
347
352
  language: string;
@@ -379,6 +384,7 @@ export declare const voiceReleaseRecordSchema: z.ZodObject<{
379
384
  operation: string;
380
385
  };
381
386
  }[];
387
+ speakDemoNotice?: boolean | undefined;
382
388
  }>>;
383
389
  isPublic: z.ZodOptional<z.ZodLiteral<false>>;
384
390
  publicOutputs: z.ZodOptional<z.ZodLiteral<false>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequenceholdings/agent-spec",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Typed agent definition contract, compiler, hashing, and migration utilities",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -35,6 +35,11 @@
35
35
  "types": "./dist/voice-runs-audio.d.ts",
36
36
  "import": "./dist/voice-runs-audio.js",
37
37
  "default": "./dist/voice-runs-audio.js"
38
+ },
39
+ "./action-review": {
40
+ "types": "./dist/action-review.d.ts",
41
+ "import": "./dist/action-review.js",
42
+ "default": "./dist/action-review.js"
38
43
  }
39
44
  },
40
45
  "files": [
@@ -44,12 +49,12 @@
44
49
  "dependencies": {
45
50
  "js-yaml": "^4.3.2",
46
51
  "typescript": "^5.6.0",
47
- "zod": "^4.1.13"
52
+ "zod": "4.6.6"
48
53
  },
49
54
  "devDependencies": {
50
55
  "@types/js-yaml": "^4.0.9",
51
56
  "@types/node": "^22.0.0",
52
- "vitest": "^4.1.11"
57
+ "vitest": "^4.1.12"
53
58
  },
54
59
  "engines": {
55
60
  "node": ">=20"