skedyul 1.2.44 → 1.2.50

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.
Files changed (59) hide show
  1. package/dist/cli/commands/event.d.ts +1 -0
  2. package/dist/cli/commands/workflows.d.ts +1 -0
  3. package/dist/cli/index.js +3928 -9110
  4. package/dist/cli/utils/auth.d.ts +4 -1
  5. package/dist/cli/utils/auth.js +32 -8
  6. package/dist/cli/utils/config.d.ts +23 -0
  7. package/dist/cli/utils/env-sync.d.ts +46 -0
  8. package/dist/cli/utils/mcp-http-client.d.ts +74 -0
  9. package/dist/cli/utils/migration-approval.d.ts +39 -0
  10. package/dist/cli/utils/mock-context.d.ts +19 -9
  11. package/dist/cli/utils/sse.d.ts +33 -0
  12. package/dist/cli/utils.d.ts +5 -1
  13. package/dist/compiler/types.d.ts +11 -9
  14. package/dist/config/app-config.d.ts +3 -1
  15. package/dist/config/schema-loader.d.ts +15 -2
  16. package/dist/config/types/index.d.ts +1 -0
  17. package/dist/config/types/model.d.ts +2 -0
  18. package/dist/config/types/page.d.ts +9 -0
  19. package/dist/config/types/signal.d.ts +20 -0
  20. package/dist/context/index.d.ts +2 -2
  21. package/dist/context/resolver.d.ts +29 -28
  22. package/dist/context/types.d.ts +195 -37
  23. package/dist/core/client.d.ts +211 -233
  24. package/dist/dedicated/server.js +252 -163
  25. package/dist/dockerfile.d.ts +1 -1
  26. package/dist/esm/index.mjs +1207 -7684
  27. package/dist/index.d.ts +11 -6
  28. package/dist/index.js +1253 -7682
  29. package/dist/scheduling/calculateWaitTime.d.ts +16 -0
  30. package/dist/scheduling/index.d.ts +11 -0
  31. package/dist/scheduling/index.js +334 -0
  32. package/dist/scheduling/index.mjs +305 -0
  33. package/dist/scheduling/isTimeInWindow.d.ts +15 -0
  34. package/dist/scheduling/types-workflow.d.ts +54 -0
  35. package/dist/scheduling/types.d.ts +166 -0
  36. package/dist/schemas/agent-schema-v3.d.ts +416 -60
  37. package/dist/schemas/agent-schema-v3.js +262 -74
  38. package/dist/schemas/agent-schema-v3.mjs +248 -72
  39. package/dist/schemas/agent-schema.js +3 -7295
  40. package/dist/schemas/agent-schema.mjs +3 -7323
  41. package/dist/schemas/crm-schema.d.ts +53 -19
  42. package/dist/schemas/index.d.ts +1 -1
  43. package/dist/schemas.d.ts +128 -40
  44. package/dist/server/route-handlers/handlers.d.ts +7 -0
  45. package/dist/server/utils/env.d.ts +9 -0
  46. package/dist/server/utils/index.d.ts +1 -0
  47. package/dist/server/utils/mcp-response.d.ts +11 -0
  48. package/dist/server.js +252 -163
  49. package/dist/serverless/server.mjs +252 -163
  50. package/dist/skills/index.d.ts +1 -1
  51. package/dist/skills/types.d.ts +35 -23
  52. package/dist/skills/types.js +10 -17
  53. package/dist/skills/types.mjs +9 -16
  54. package/dist/types/index.d.ts +3 -3
  55. package/dist/types/server.d.ts +1 -0
  56. package/dist/types/tool-context.d.ts +31 -4
  57. package/dist/types/tool-response.d.ts +2 -0
  58. package/dist/types/tool.d.ts +33 -1
  59. package/package.json +9 -2
@@ -21,8 +21,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var agent_schema_v3_exports = {};
22
22
  __export(agent_schema_v3_exports, {
23
23
  AGENT_SCHEMA_VERSION_V3: () => AGENT_SCHEMA_VERSION_V3,
24
- AgentConfigV3Schema: () => AgentConfigV3Schema,
24
+ AgentToolRefSchema: () => AgentToolRefSchema,
25
25
  AgentYAMLV3Schema: () => AgentYAMLV3Schema,
26
+ BehaviorConfigV3Schema: () => BehaviorConfigV3Schema,
26
27
  BootstrapToolRefSchema: () => BootstrapToolRefSchema,
27
28
  ExternalMemoryConfigSchema: () => ExternalMemoryConfigSchema,
28
29
  MemoryConfigV3Schema: () => MemoryConfigV3Schema,
@@ -31,9 +32,20 @@ __export(agent_schema_v3_exports, {
31
32
  PersonaVoiceV3Schema: () => PersonaVoiceV3Schema,
32
33
  PoliciesConfigV3Schema: () => PoliciesConfigV3Schema,
33
34
  PromptsConfigV3Schema: () => PromptsConfigV3Schema,
34
- ResponsePolicySchema: () => ResponsePolicySchema,
35
+ ResponseModeSchema: () => ResponseModeSchema,
36
+ ResponsesBehaviorConfigSchema: () => ResponsesBehaviorConfigSchema,
35
37
  RuntimeConfigV3Schema: () => RuntimeConfigV3Schema,
38
+ SchedulingBehaviorConfigSchema: () => SchedulingBehaviorConfigSchema,
39
+ SchedulingDelaySchema: () => SchedulingDelaySchema,
40
+ SchedulingPatternSchema: () => SchedulingPatternSchema,
36
41
  SemanticMemoryConfigSchema: () => SemanticMemoryConfigSchema,
42
+ TimeWindowBehaviorSchema: () => TimeWindowBehaviorSchema,
43
+ TimeWindowDayOfWeekSchema: () => TimeWindowDayOfWeekSchema,
44
+ TimeWindowDefaultSchema: () => TimeWindowDefaultSchema,
45
+ TimeWindowPoliciesSchema: () => TimeWindowPoliciesSchema,
46
+ TimeWindowPolicySchema: () => TimeWindowPolicySchema,
47
+ TimeWindowSlotAgentSchema: () => TimeWindowSlotAgentSchema,
48
+ TimeWindowTimeStampSchema: () => TimeWindowTimeStampSchema,
37
49
  ToolApprovalConfigSchema: () => ToolApprovalConfigSchema,
38
50
  ToolRefV3Schema: () => ToolRefV3Schema,
39
51
  ToolSandboxConfigSchema: () => ToolSandboxConfigSchema,
@@ -211,14 +223,12 @@ var SkillExampleSchema = import_v42.z.object({
211
223
  output: import_v42.z.string(),
212
224
  tool_call: import_v42.z.string().optional()
213
225
  });
214
- var SkillEvaluationMetricSchema = import_v42.z.object({
215
- metric: import_v42.z.string(),
216
- description: import_v42.z.string().optional(),
217
- threshold: import_v42.z.number().optional()
226
+ var CRMModelFieldRequirementsSchema = import_v42.z.object({
227
+ required: import_v42.z.array(import_v42.z.string()).optional(),
228
+ recommended: import_v42.z.array(import_v42.z.string()).optional()
218
229
  });
219
230
  var CRMContextSchema = import_v42.z.object({
220
- models: import_v42.z.record(import_v42.z.string(), import_v42.z.array(import_v42.z.string()))
221
- // { modelHandle: [fieldHandles] }
231
+ models: import_v42.z.record(import_v42.z.string(), CRMModelFieldRequirementsSchema)
222
232
  });
223
233
  var SkillYAMLSchema = import_v42.z.object({
224
234
  // Schema version
@@ -235,11 +245,7 @@ var SkillYAMLSchema = import_v42.z.object({
235
245
  // CRM context - specifies which models/fields to include in schema
236
246
  crmContext: CRMContextSchema.optional(),
237
247
  // Few-shot examples
238
- examples: import_v42.z.array(SkillExampleSchema).optional(),
239
- // Evaluation criteria
240
- evaluation: import_v42.z.array(SkillEvaluationMetricSchema).optional(),
241
- // Tags for discovery
242
- tags: import_v42.z.array(import_v42.z.string()).optional()
248
+ examples: import_v42.z.array(SkillExampleSchema).optional()
243
249
  });
244
250
  var SkillYAMLV2Schema = import_v42.z.object({
245
251
  $schema: import_v42.z.literal(SKILL_SCHEMA_VERSION_V2).optional(),
@@ -250,9 +256,7 @@ var SkillYAMLV2Schema = import_v42.z.object({
250
256
  instructions: import_v42.z.string(),
251
257
  tools: import_v42.z.array(SkillToolDefinitionSchema).optional(),
252
258
  crmContext: CRMContextSchema.optional(),
253
- examples: import_v42.z.array(SkillExampleSchema).optional(),
254
- evaluation: import_v42.z.array(SkillEvaluationMetricSchema).optional(),
255
- tags: import_v42.z.array(import_v42.z.string()).optional()
259
+ examples: import_v42.z.array(SkillExampleSchema).optional()
256
260
  });
257
261
  var SkillVersionWeightSchema = import_v42.z.object({
258
262
  version: import_v42.z.number(),
@@ -265,6 +269,8 @@ var SkillRefSchema = import_v42.z.union([
265
269
  skill: import_v42.z.string(),
266
270
  description: import_v42.z.string().optional(),
267
271
  // For AI SDK Agent Skills discovery
272
+ /** Auto-inject this skill's instructions and tools on every agent turn */
273
+ alwaysLoad: import_v42.z.boolean().optional(),
268
274
  // Version selection (pick one):
269
275
  version: import_v42.z.number().optional(),
270
276
  // Pin to specific version number
@@ -286,7 +292,6 @@ var SkillMetadataSchema = import_v42.z.object({
286
292
  s3Key: import_v42.z.string().optional(),
287
293
  appVersionId: import_v42.z.string().optional(),
288
294
  workplaceId: import_v42.z.string().optional(),
289
- tags: import_v42.z.array(import_v42.z.string()).optional(),
290
295
  createdAt: import_v42.z.string().datetime().optional(),
291
296
  updatedAt: import_v42.z.string().datetime().optional()
292
297
  });
@@ -334,52 +339,61 @@ var ThreadInfoSchema = import_v43.z.object({
334
339
  status: import_v43.z.string().optional(),
335
340
  kind: import_v43.z.string().optional()
336
341
  });
337
- var AgentContextSchema = import_v43.z.object({
338
- // Who sent the message
339
- sender: SenderContextSchema,
340
- // Thread contexts (linked CRM instances)
341
- contexts: import_v43.z.array(ThreadContextItemSchema).optional(),
342
- // Thread info
343
- thread: ThreadInfoSchema,
344
- // Workplace info
345
- workplace: import_v43.z.object({
346
- id: import_v43.z.string(),
347
- name: import_v43.z.string().optional()
348
- }).optional()
349
- });
350
- var MockSubscriptionSchema = import_v43.z.object({
342
+ var SubscriptionSchema = import_v43.z.object({
351
343
  identifierValue: import_v43.z.string(),
352
344
  channelHandle: import_v43.z.string().optional()
353
345
  });
354
- var MockAssociationSchema = import_v43.z.object({
346
+ var AssociationSchema = import_v43.z.object({
355
347
  id: import_v43.z.string().optional(),
356
348
  data: import_v43.z.record(import_v43.z.string(), import_v43.z.unknown())
357
349
  });
358
- var MockContactSchema = import_v43.z.object({
350
+ var ContactSchema = import_v43.z.object({
359
351
  id: import_v43.z.string().optional(),
360
352
  name: import_v43.z.string().optional(),
361
- subscription: MockSubscriptionSchema.optional(),
362
- associations: import_v43.z.record(import_v43.z.string(), MockAssociationSchema).optional()
353
+ subscription: SubscriptionSchema.optional(),
354
+ associations: import_v43.z.record(import_v43.z.string(), AssociationSchema).optional()
363
355
  });
364
- var MockSenderContextSchema = import_v43.z.object({
356
+ var AgentSenderContextSchema = import_v43.z.object({
365
357
  kind: import_v43.z.enum(["contact", "member"]),
366
358
  displayName: import_v43.z.string().optional(),
367
359
  role: import_v43.z.string().optional(),
368
360
  permissions: import_v43.z.array(import_v43.z.string()).optional(),
369
- contact: MockContactSchema.optional()
361
+ contact: ContactSchema.optional()
370
362
  });
371
- var MockThreadContextSchema = import_v43.z.object({
363
+ var AgentThreadContextSchema = import_v43.z.object({
372
364
  handle: import_v43.z.string(),
373
365
  model: import_v43.z.string(),
374
366
  data: import_v43.z.record(import_v43.z.string(), import_v43.z.unknown())
375
367
  });
376
- var MockContextSchema = import_v43.z.object({
377
- sender: MockSenderContextSchema,
378
- contexts: import_v43.z.array(MockThreadContextSchema).optional()
368
+ var AgentContextSchema = import_v43.z.object({
369
+ sender: AgentSenderContextSchema,
370
+ contexts: import_v43.z.array(AgentThreadContextSchema).optional()
371
+ });
372
+ var ContextIssueSeveritySchema = import_v43.z.enum(["ERROR", "WARNING"]);
373
+ var ContextIssueTypeSchema = import_v43.z.enum([
374
+ "MISSING_ROUTING_PARTICIPANT",
375
+ "MISSING_ASSOCIATION",
376
+ "MISSING_REQUIRED_FIELD",
377
+ "MISSING_RECOMMENDED_FIELD"
378
+ ]);
379
+ var ContextIssueSchema = import_v43.z.object({
380
+ type: ContextIssueTypeSchema,
381
+ severity: ContextIssueSeveritySchema,
382
+ model: import_v43.z.string().optional(),
383
+ field: import_v43.z.string().optional(),
384
+ message: import_v43.z.string(),
385
+ suggestion: import_v43.z.string().optional()
386
+ });
387
+ var ContextValidationResultSchema = import_v43.z.object({
388
+ valid: import_v43.z.boolean(),
389
+ degraded: import_v43.z.boolean(),
390
+ issues: import_v43.z.array(ContextIssueSchema)
379
391
  });
380
392
  var SandboxConfigSchema = import_v43.z.object({
381
393
  enabled: import_v43.z.boolean().optional(),
382
- mockContext: MockContextSchema.optional()
394
+ /** @deprecated Use 'context' instead of 'mockContext' */
395
+ mockContext: AgentContextSchema.optional(),
396
+ context: AgentContextSchema.optional()
383
397
  });
384
398
 
385
399
  // src/schemas/agent-schema-v3.ts
@@ -417,13 +431,14 @@ var ToolRefV3Schema = import_v44.z.union([
417
431
  overrides: import_v44.z.record(import_v44.z.string(), import_v44.z.unknown()).optional()
418
432
  })
419
433
  ]);
420
- var BootstrapToolRefSchema = import_v44.z.union([
434
+ var AgentToolRefSchema = import_v44.z.union([
421
435
  import_v44.z.string(),
422
436
  import_v44.z.object({
423
437
  tool: import_v44.z.string(),
424
438
  description: import_v44.z.string().optional()
425
439
  })
426
440
  ]);
441
+ var BootstrapToolRefSchema = AgentToolRefSchema;
427
442
  var WorkingMemoryConfigSchema = import_v44.z.object({
428
443
  strategy: import_v44.z.enum(["full", "rolling_summary", "sliding_window"]).optional(),
429
444
  maxTokens: import_v44.z.number().optional(),
@@ -446,29 +461,182 @@ var MemoryConfigV3Schema = import_v44.z.object({
446
461
  external: ExternalMemoryConfigSchema.optional(),
447
462
  semantic: SemanticMemoryConfigSchema.optional()
448
463
  });
449
- var ResponsePolicySchema = import_v44.z.object({
450
- requiresApproval: import_v44.z.boolean().optional(),
451
- requiresApprovalIf: import_v44.z.array(import_v44.z.string()).optional()
464
+ var RequiresApprovalPolicySchema = import_v44.z.object({
465
+ requiresApproval: import_v44.z.boolean().optional()
452
466
  });
453
467
  var PoliciesConfigV3Schema = import_v44.z.object({
454
- response: ResponsePolicySchema.optional(),
455
- rules: import_v44.z.array(import_v44.z.string()).optional()
468
+ messages: import_v44.z.object({
469
+ send: RequiresApprovalPolicySchema.optional(),
470
+ schedule: RequiresApprovalPolicySchema.optional()
471
+ }).optional(),
472
+ tools: import_v44.z.object({
473
+ externalRequiresApproval: import_v44.z.boolean().optional(),
474
+ systemRequiresApproval: import_v44.z.boolean().optional()
475
+ }).optional()
456
476
  });
457
477
  var RuntimeConfigV3Schema = import_v44.z.object({
478
+ /** LLM model identifier for reasoning (e.g., "google/gemini-3.1-flash-lite") */
458
479
  model: import_v44.z.string().optional(),
459
- timeout: import_v44.z.string().optional(),
460
- timezone: import_v44.z.string().optional(),
461
- retry: import_v44.z.object({
462
- attempts: import_v44.z.number().optional(),
463
- backoff: import_v44.z.enum(["linear", "exponential"]).optional()
480
+ /** LLM model for persona transformation (e.g., "openai/gpt-5-nano") */
481
+ personaModel: import_v44.z.string().optional()
482
+ });
483
+ var TimeWindowTimeStampSchema = import_v44.z.union([
484
+ import_v44.z.number().describe("Hour of day (0-23)"),
485
+ import_v44.z.object({
486
+ hour: import_v44.z.number(),
487
+ minute: import_v44.z.number().optional().default(0)
488
+ })
489
+ ]);
490
+ var TimeWindowDayOfWeekSchema = import_v44.z.enum([
491
+ "monday",
492
+ "tuesday",
493
+ "wednesday",
494
+ "thursday",
495
+ "friday",
496
+ "saturday",
497
+ "sunday"
498
+ ]);
499
+ var TimeWindowSlotAgentSchema = import_v44.z.object({
500
+ startTime: TimeWindowTimeStampSchema,
501
+ endTime: TimeWindowTimeStampSchema,
502
+ days: import_v44.z.array(TimeWindowDayOfWeekSchema)
503
+ });
504
+ var ResponseModeSchema = import_v44.z.enum([
505
+ "immediate",
506
+ "ack_and_schedule",
507
+ "schedule_only"
508
+ ]);
509
+ var TimeWindowBehaviorSchema = import_v44.z.object({
510
+ /** How to handle responses in this window */
511
+ responseMode: ResponseModeSchema,
512
+ /** Prompt injection for this time context */
513
+ prompt: import_v44.z.string().optional().describe("Prompt injection for this time context"),
514
+ /** Window to schedule responses for (when responseMode is ack_and_schedule or schedule_only) */
515
+ scheduleFor: import_v44.z.string().optional().describe("Window name to schedule responses for")
516
+ });
517
+ var TimeWindowPolicySchema = import_v44.z.object({
518
+ /** IANA timezone for the window (e.g., "Australia/Sydney") */
519
+ timezone: import_v44.z.string().describe('IANA timezone, e.g., "Australia/Sydney"'),
520
+ /** Time slots when this window is active */
521
+ windows: import_v44.z.array(TimeWindowSlotAgentSchema),
522
+ /** Behavior for this window (optional - defaults to immediate response) */
523
+ behavior: TimeWindowBehaviorSchema.optional()
524
+ });
525
+ var TimeWindowPoliciesSchema = import_v44.z.record(import_v44.z.string(), TimeWindowPolicySchema);
526
+ var TimeWindowDefaultSchema = TimeWindowBehaviorSchema.describe(
527
+ "Fallback behavior when no time window matches"
528
+ );
529
+ var ResponsesBehaviorConfigSchema = import_v44.z.object({
530
+ /**
531
+ * Maximum immediate messages per agent run (acks, progress updates).
532
+ * @default 1
533
+ */
534
+ maxImmediate: import_v44.z.number().optional(),
535
+ /**
536
+ * Maximum scheduled messages per agent run (follow-ups via sendAt).
537
+ * @default 2
538
+ */
539
+ maxScheduled: import_v44.z.number().optional(),
540
+ /**
541
+ * Maximum intermediate messages per agent run.
542
+ * Intermediate = progress updates, acknowledgments before task completion.
543
+ * The final message slot is always reserved separately.
544
+ * @deprecated Use maxImmediate instead
545
+ * @default 2
546
+ */
547
+ maxIntermediate: import_v44.z.number().optional(),
548
+ /**
549
+ * Whether a final message is required before the run completes.
550
+ * If true and no final message is sent, the run fails.
551
+ * @default true
552
+ */
553
+ requireFinal: import_v44.z.boolean().optional(),
554
+ /**
555
+ * Whether the agent can schedule messages for future delivery.
556
+ * Scheduled messages typically require approval.
557
+ * @default false
558
+ */
559
+ allowSchedule: import_v44.z.boolean().optional(),
560
+ /**
561
+ * Message splitting configuration.
562
+ * Controls whether and how the agent splits responses into multiple messages.
563
+ */
564
+ messageSplitting: import_v44.z.object({
565
+ /**
566
+ * Whether to allow natural message splitting.
567
+ * When true, the agent may split responses into multiple messages
568
+ * when it improves conversational flow.
569
+ */
570
+ enabled: import_v44.z.boolean(),
571
+ /**
572
+ * Custom prompt to override the default message splitting guidance.
573
+ * If not provided, uses sensible defaults for when to split vs. keep together.
574
+ */
575
+ prompt: import_v44.z.string().optional()
464
576
  }).optional()
465
577
  });
578
+ var SchedulingDelaySchema = import_v44.z.object({
579
+ /** Time unit amount */
580
+ amount: import_v44.z.number(),
581
+ /** Time unit (e.g., "week", "weeks", "day", "days", "month", "months") */
582
+ unit: import_v44.z.string(),
583
+ /** Optional time window to constrain the delay */
584
+ timeWindow: import_v44.z.string().optional()
585
+ });
586
+ var SchedulingPatternSchema = import_v44.z.object({
587
+ /** Trigger name for this pattern */
588
+ trigger: import_v44.z.string(),
589
+ /** Human-readable description of when this pattern applies */
590
+ description: import_v44.z.string().optional(),
591
+ /** Example user phrases that match this pattern */
592
+ examples: import_v44.z.array(import_v44.z.string()).optional(),
593
+ /** Default delay for this pattern */
594
+ defaultDelay: SchedulingDelaySchema.optional()
595
+ });
596
+ var SchedulingBehaviorConfigSchema = import_v44.z.object({
597
+ /**
598
+ * Patterns that trigger scheduling suggestions.
599
+ * The agent uses these to know when to add sendAt to messages.
600
+ */
601
+ patterns: import_v44.z.array(SchedulingPatternSchema).optional(),
602
+ /**
603
+ * Default settings for scheduled messages.
604
+ */
605
+ defaults: import_v44.z.object({
606
+ /** Cancel scheduled message if user replies before send time (default: true) */
607
+ cancelOnActivity: import_v44.z.boolean().optional(),
608
+ /** Whether scheduled messages require approval (default: true) */
609
+ requiresApproval: import_v44.z.boolean().optional(),
610
+ /** Default time window policy to constrain all scheduled messages */
611
+ timeWindow: import_v44.z.string().optional().describe("Time window policy name for scheduled messages")
612
+ }).optional()
613
+ });
614
+ var BehaviorConfigV3Schema = import_v44.z.object({
615
+ /**
616
+ * Response behavior - controls message sending via tool calls.
617
+ * When configured, agents must explicitly call system:message:send
618
+ * instead of producing implicit final output.
619
+ */
620
+ responses: ResponsesBehaviorConfigSchema.optional(),
621
+ /**
622
+ * Scheduling behavior - controls when the agent schedules follow-up messages.
623
+ * Patterns define triggers like "user indicates they'll return later".
624
+ */
625
+ scheduling: SchedulingBehaviorConfigSchema.optional()
626
+ });
466
627
  var PromptsConfigV3Schema = import_v44.z.object({
628
+ /** Main system prompt with workflow instructions */
629
+ system: import_v44.z.string().optional(),
630
+ /** Injected during second pass when skills were loaded but tools not used */
467
631
  recovery: import_v44.z.string().optional(),
632
+ /** Injected during follow-up passes when context needs updating */
468
633
  followUp: import_v44.z.string().optional(),
469
- skillDiscoveryWorkflow: import_v44.z.string().optional()
634
+ /** Thread list title generation (system + user template with {{var}} placeholders) */
635
+ titleEnrichment: import_v44.z.object({
636
+ system: import_v44.z.string().optional(),
637
+ user: import_v44.z.string().optional()
638
+ }).optional()
470
639
  });
471
- var AgentConfigV3Schema = import_v44.z.record(import_v44.z.string(), import_v44.z.unknown());
472
640
  var AgentYAMLV3Schema = import_v44.z.object({
473
641
  $schema: import_v44.z.string().optional(),
474
642
  handle: import_v44.z.string(),
@@ -479,28 +647,36 @@ var AgentYAMLV3Schema = import_v44.z.object({
479
647
  persona: PersonaV3Schema.optional(),
480
648
  // Skills - What the agent knows how to do (skills own their tools)
481
649
  skills: import_v44.z.array(SkillRefSchema).optional(),
482
- // Bootstrap tools - Always-available system tools before any skill loads
483
- // Examples: system:skill:load, system:message:send
484
- bootstrapTools: import_v44.z.array(BootstrapToolRefSchema).optional(),
485
- // Tools - DEPRECATED: Use skills to own tools instead
486
- // Kept for backward compatibility during migration
487
- // @deprecated Will be removed in a future version
488
- tools: import_v44.z.array(ToolRefV3Schema).optional(),
489
- // Events - When the agent activates
650
+ // Tools - Always-available tools before any skill loads
651
+ // Examples: system:settings:business_information:get
652
+ tools: import_v44.z.array(AgentToolRefSchema).optional(),
653
+ /**
654
+ * Events - When the agent activates
655
+ * @deprecated Not yet implemented - this is a planned feature for event-driven agents.
656
+ * Fields are accepted but not used at runtime.
657
+ */
490
658
  events: EventsConfigSchema.optional(),
491
- // Memory - How the agent remembers
659
+ /**
660
+ * Memory - How the agent remembers
661
+ * @deprecated Not yet implemented - this is a planned feature.
662
+ * Fields are accepted but not used at runtime.
663
+ */
492
664
  memory: MemoryConfigV3Schema.optional(),
493
- // Policies - Constraints and approvals
665
+ // Policies - Business rules for the agent
494
666
  policies: PoliciesConfigV3Schema.optional(),
495
- // Runtime - Execution configuration
667
+ // Runtime - Execution configuration (model + personaModel)
496
668
  runtime: RuntimeConfigV3Schema.optional(),
497
- // Prompts - Agent-specific prompt injections for runtime phases
498
- // recovery: Injected during second pass when skills were loaded but tools not used
499
- // followUp: Injected during follow-up passes when context needs updating
500
- // skillDiscoveryWorkflow: Custom workflow instructions for skill discovery
669
+ // Prompts - Agent-specific prompt injections
501
670
  prompts: PromptsConfigV3Schema.optional(),
502
- // Config - Business-specific settings
503
- config: AgentConfigV3Schema.optional(),
671
+ // Behavior - Agent runtime behavior configuration
672
+ // responses: Controls message sending via explicit tool calls
673
+ behavior: BehaviorConfigV3Schema.optional(),
674
+ // Time Windows - Named time window policies for scheduling constraints
675
+ // Windows must be mutually exclusive (non-overlapping)
676
+ // Each window can define its own behavior (response mode, prompt, etc.)
677
+ timeWindows: TimeWindowPoliciesSchema.optional(),
678
+ // Time Window Default - Fallback behavior when no window matches
679
+ timeWindowDefault: TimeWindowDefaultSchema.optional(),
504
680
  // Sandbox - Testing configuration
505
681
  sandbox: SandboxConfigSchema.optional()
506
682
  });
@@ -517,8 +693,9 @@ function validateAgentYAMLV3(agent) {
517
693
  // Annotate the CommonJS export names for ESM import in node:
518
694
  0 && (module.exports = {
519
695
  AGENT_SCHEMA_VERSION_V3,
520
- AgentConfigV3Schema,
696
+ AgentToolRefSchema,
521
697
  AgentYAMLV3Schema,
698
+ BehaviorConfigV3Schema,
522
699
  BootstrapToolRefSchema,
523
700
  ExternalMemoryConfigSchema,
524
701
  MemoryConfigV3Schema,
@@ -527,9 +704,20 @@ function validateAgentYAMLV3(agent) {
527
704
  PersonaVoiceV3Schema,
528
705
  PoliciesConfigV3Schema,
529
706
  PromptsConfigV3Schema,
530
- ResponsePolicySchema,
707
+ ResponseModeSchema,
708
+ ResponsesBehaviorConfigSchema,
531
709
  RuntimeConfigV3Schema,
710
+ SchedulingBehaviorConfigSchema,
711
+ SchedulingDelaySchema,
712
+ SchedulingPatternSchema,
532
713
  SemanticMemoryConfigSchema,
714
+ TimeWindowBehaviorSchema,
715
+ TimeWindowDayOfWeekSchema,
716
+ TimeWindowDefaultSchema,
717
+ TimeWindowPoliciesSchema,
718
+ TimeWindowPolicySchema,
719
+ TimeWindowSlotAgentSchema,
720
+ TimeWindowTimeStampSchema,
533
721
  ToolApprovalConfigSchema,
534
722
  ToolRefV3Schema,
535
723
  ToolSandboxConfigSchema,