@sequenceholdings/agent-spec 0.1.5 → 0.1.6

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
@@ -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.
@@ -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;
@@ -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;
@@ -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>>;
@@ -16,6 +16,14 @@ export const RECOMMENDED_AGENT_MODEL = {
16
16
  provider: 'anthropic',
17
17
  name: 'claude-sonnet-5-5',
18
18
  };
19
+ export const AGENT_EXECUTION_MACHINES = [
20
+ 'small-1x',
21
+ 'small-2x',
22
+ 'medium-1x',
23
+ 'medium-2x',
24
+ 'large-1x',
25
+ 'large-2x',
26
+ ];
19
27
  const jsonObjectSchema = z.record(z.string(), z.unknown());
20
28
  const unsupportedConstraints = {
21
29
  integer: ['minimum', 'maximum', 'exclusiveMinimum', 'exclusiveMaximum'],
@@ -111,8 +119,10 @@ const textDefinitionBaseSchema = z
111
119
  name: z.string().min(1),
112
120
  description: z.string().optional(),
113
121
  framework: z.enum(['vercel', 'claude-agent']).optional(),
122
+ runtime: z.enum(['agentic', 'single_call']).optional(),
114
123
  vmBackend: z.enum(['gce', 'e2b']).optional(),
115
124
  idleTimeoutSeconds: z.number().int().min(60).max(86_400).optional(),
125
+ executionMachine: z.enum(AGENT_EXECUTION_MACHINES).optional(),
116
126
  agentCapabilities: jsonObjectSchema.nullish(),
117
127
  claudeToolSearch: z.enum(['enabled', 'disabled', 'auto']).optional(),
118
128
  claudeBuiltInTools: z.array(z.string()).default([]),
@@ -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>>;
@@ -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)),
@@ -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>>;
@@ -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>>;
@@ -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>>;
@@ -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.6",
4
4
  "description": "Typed agent definition contract, compiler, hashing, and migration utilities",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -44,12 +44,12 @@
44
44
  "dependencies": {
45
45
  "js-yaml": "^4.3.2",
46
46
  "typescript": "^5.6.0",
47
- "zod": "^4.1.13"
47
+ "zod": "4.6.6"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/js-yaml": "^4.0.9",
51
51
  "@types/node": "^22.0.0",
52
- "vitest": "^4.1.11"
52
+ "vitest": "^4.1.12"
53
53
  },
54
54
  "engines": {
55
55
  "node": ">=20"