skedyul 1.2.43 → 1.2.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/workflows.d.ts +1 -0
- package/dist/cli/index.js +3682 -9076
- package/dist/cli/utils/auth.d.ts +4 -1
- package/dist/cli/utils/auth.js +32 -8
- package/dist/cli/utils/config.d.ts +23 -0
- package/dist/cli/utils/env-sync.d.ts +46 -0
- package/dist/cli/utils/mcp-http-client.d.ts +74 -0
- package/dist/cli/utils/migration-approval.d.ts +39 -0
- package/dist/cli/utils/mock-context.d.ts +19 -9
- package/dist/cli/utils/sse.d.ts +33 -0
- package/dist/cli/utils.d.ts +5 -1
- package/dist/compiler/types.d.ts +11 -9
- package/dist/config/schema-loader.d.ts +15 -2
- package/dist/config/types/model.d.ts +2 -0
- package/dist/config/types/page.d.ts +9 -0
- package/dist/context/index.d.ts +2 -2
- package/dist/context/resolver.d.ts +29 -28
- package/dist/context/types.d.ts +195 -37
- package/dist/core/client.d.ts +189 -233
- package/dist/dedicated/server.js +264 -166
- package/dist/esm/index.mjs +1161 -7674
- package/dist/index.d.ts +11 -6
- package/dist/index.js +1206 -7672
- package/dist/scheduling/calculateWaitTime.d.ts +16 -0
- package/dist/scheduling/index.d.ts +11 -0
- package/dist/scheduling/index.js +334 -0
- package/dist/scheduling/index.mjs +305 -0
- package/dist/scheduling/isTimeInWindow.d.ts +15 -0
- package/dist/scheduling/types-workflow.d.ts +54 -0
- package/dist/scheduling/types.d.ts +166 -0
- package/dist/schemas/agent-schema-v3.d.ts +406 -60
- package/dist/schemas/agent-schema-v3.js +248 -75
- package/dist/schemas/agent-schema-v3.mjs +234 -73
- package/dist/schemas/agent-schema.js +3 -7295
- package/dist/schemas/agent-schema.mjs +3 -7323
- package/dist/schemas/crm-schema.d.ts +53 -19
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas.d.ts +128 -40
- package/dist/server/route-handlers/handlers.d.ts +7 -0
- package/dist/server/utils/env.d.ts +9 -0
- package/dist/server/utils/index.d.ts +1 -0
- package/dist/server/utils/mcp-response.d.ts +11 -0
- package/dist/server.js +264 -166
- package/dist/serverless/server.mjs +264 -166
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/types.d.ts +34 -23
- package/dist/skills/types.js +8 -17
- package/dist/skills/types.mjs +7 -16
- package/dist/types/index.d.ts +3 -3
- package/dist/types/server.d.ts +1 -0
- package/dist/types/tool-context.d.ts +31 -4
- package/dist/types/tool-response.d.ts +2 -0
- package/dist/types/tool.d.ts +35 -1
- package/package.json +8 -1
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
215
|
-
|
|
216
|
-
|
|
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(),
|
|
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(),
|
|
@@ -286,7 +290,6 @@ var SkillMetadataSchema = import_v42.z.object({
|
|
|
286
290
|
s3Key: import_v42.z.string().optional(),
|
|
287
291
|
appVersionId: import_v42.z.string().optional(),
|
|
288
292
|
workplaceId: import_v42.z.string().optional(),
|
|
289
|
-
tags: import_v42.z.array(import_v42.z.string()).optional(),
|
|
290
293
|
createdAt: import_v42.z.string().datetime().optional(),
|
|
291
294
|
updatedAt: import_v42.z.string().datetime().optional()
|
|
292
295
|
});
|
|
@@ -334,52 +337,61 @@ var ThreadInfoSchema = import_v43.z.object({
|
|
|
334
337
|
status: import_v43.z.string().optional(),
|
|
335
338
|
kind: import_v43.z.string().optional()
|
|
336
339
|
});
|
|
337
|
-
var
|
|
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({
|
|
340
|
+
var SubscriptionSchema = import_v43.z.object({
|
|
351
341
|
identifierValue: import_v43.z.string(),
|
|
352
342
|
channelHandle: import_v43.z.string().optional()
|
|
353
343
|
});
|
|
354
|
-
var
|
|
344
|
+
var AssociationSchema = import_v43.z.object({
|
|
355
345
|
id: import_v43.z.string().optional(),
|
|
356
346
|
data: import_v43.z.record(import_v43.z.string(), import_v43.z.unknown())
|
|
357
347
|
});
|
|
358
|
-
var
|
|
348
|
+
var ContactSchema = import_v43.z.object({
|
|
359
349
|
id: import_v43.z.string().optional(),
|
|
360
350
|
name: import_v43.z.string().optional(),
|
|
361
|
-
subscription:
|
|
362
|
-
associations: import_v43.z.record(import_v43.z.string(),
|
|
351
|
+
subscription: SubscriptionSchema.optional(),
|
|
352
|
+
associations: import_v43.z.record(import_v43.z.string(), AssociationSchema).optional()
|
|
363
353
|
});
|
|
364
|
-
var
|
|
354
|
+
var AgentSenderContextSchema = import_v43.z.object({
|
|
365
355
|
kind: import_v43.z.enum(["contact", "member"]),
|
|
366
356
|
displayName: import_v43.z.string().optional(),
|
|
367
357
|
role: import_v43.z.string().optional(),
|
|
368
358
|
permissions: import_v43.z.array(import_v43.z.string()).optional(),
|
|
369
|
-
contact:
|
|
359
|
+
contact: ContactSchema.optional()
|
|
370
360
|
});
|
|
371
|
-
var
|
|
361
|
+
var AgentThreadContextSchema = import_v43.z.object({
|
|
372
362
|
handle: import_v43.z.string(),
|
|
373
363
|
model: import_v43.z.string(),
|
|
374
364
|
data: import_v43.z.record(import_v43.z.string(), import_v43.z.unknown())
|
|
375
365
|
});
|
|
376
|
-
var
|
|
377
|
-
sender:
|
|
378
|
-
contexts: import_v43.z.array(
|
|
366
|
+
var AgentContextSchema = import_v43.z.object({
|
|
367
|
+
sender: AgentSenderContextSchema,
|
|
368
|
+
contexts: import_v43.z.array(AgentThreadContextSchema).optional()
|
|
369
|
+
});
|
|
370
|
+
var ContextIssueSeveritySchema = import_v43.z.enum(["ERROR", "WARNING"]);
|
|
371
|
+
var ContextIssueTypeSchema = import_v43.z.enum([
|
|
372
|
+
"MISSING_ROUTING_PARTICIPANT",
|
|
373
|
+
"MISSING_ASSOCIATION",
|
|
374
|
+
"MISSING_REQUIRED_FIELD",
|
|
375
|
+
"MISSING_RECOMMENDED_FIELD"
|
|
376
|
+
]);
|
|
377
|
+
var ContextIssueSchema = import_v43.z.object({
|
|
378
|
+
type: ContextIssueTypeSchema,
|
|
379
|
+
severity: ContextIssueSeveritySchema,
|
|
380
|
+
model: import_v43.z.string().optional(),
|
|
381
|
+
field: import_v43.z.string().optional(),
|
|
382
|
+
message: import_v43.z.string(),
|
|
383
|
+
suggestion: import_v43.z.string().optional()
|
|
384
|
+
});
|
|
385
|
+
var ContextValidationResultSchema = import_v43.z.object({
|
|
386
|
+
valid: import_v43.z.boolean(),
|
|
387
|
+
degraded: import_v43.z.boolean(),
|
|
388
|
+
issues: import_v43.z.array(ContextIssueSchema)
|
|
379
389
|
});
|
|
380
390
|
var SandboxConfigSchema = import_v43.z.object({
|
|
381
391
|
enabled: import_v43.z.boolean().optional(),
|
|
382
|
-
mockContext
|
|
392
|
+
/** @deprecated Use 'context' instead of 'mockContext' */
|
|
393
|
+
mockContext: AgentContextSchema.optional(),
|
|
394
|
+
context: AgentContextSchema.optional()
|
|
383
395
|
});
|
|
384
396
|
|
|
385
397
|
// src/schemas/agent-schema-v3.ts
|
|
@@ -417,13 +429,14 @@ var ToolRefV3Schema = import_v44.z.union([
|
|
|
417
429
|
overrides: import_v44.z.record(import_v44.z.string(), import_v44.z.unknown()).optional()
|
|
418
430
|
})
|
|
419
431
|
]);
|
|
420
|
-
var
|
|
432
|
+
var AgentToolRefSchema = import_v44.z.union([
|
|
421
433
|
import_v44.z.string(),
|
|
422
434
|
import_v44.z.object({
|
|
423
435
|
tool: import_v44.z.string(),
|
|
424
436
|
description: import_v44.z.string().optional()
|
|
425
437
|
})
|
|
426
438
|
]);
|
|
439
|
+
var BootstrapToolRefSchema = AgentToolRefSchema;
|
|
427
440
|
var WorkingMemoryConfigSchema = import_v44.z.object({
|
|
428
441
|
strategy: import_v44.z.enum(["full", "rolling_summary", "sliding_window"]).optional(),
|
|
429
442
|
maxTokens: import_v44.z.number().optional(),
|
|
@@ -446,29 +459,169 @@ var MemoryConfigV3Schema = import_v44.z.object({
|
|
|
446
459
|
external: ExternalMemoryConfigSchema.optional(),
|
|
447
460
|
semantic: SemanticMemoryConfigSchema.optional()
|
|
448
461
|
});
|
|
449
|
-
var
|
|
450
|
-
requiresApproval: import_v44.z.boolean().optional()
|
|
451
|
-
requiresApprovalIf: import_v44.z.array(import_v44.z.string()).optional()
|
|
462
|
+
var RequiresApprovalPolicySchema = import_v44.z.object({
|
|
463
|
+
requiresApproval: import_v44.z.boolean().optional()
|
|
452
464
|
});
|
|
453
465
|
var PoliciesConfigV3Schema = import_v44.z.object({
|
|
454
|
-
|
|
455
|
-
|
|
466
|
+
messages: import_v44.z.object({
|
|
467
|
+
send: RequiresApprovalPolicySchema.optional(),
|
|
468
|
+
schedule: RequiresApprovalPolicySchema.optional()
|
|
469
|
+
}).optional(),
|
|
470
|
+
tools: import_v44.z.object({
|
|
471
|
+
externalRequiresApproval: import_v44.z.boolean().optional(),
|
|
472
|
+
systemRequiresApproval: import_v44.z.boolean().optional()
|
|
473
|
+
}).optional()
|
|
456
474
|
});
|
|
457
475
|
var RuntimeConfigV3Schema = import_v44.z.object({
|
|
458
|
-
model
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
476
|
+
/** LLM model identifier (e.g., "google/gemini-3.1-flash-lite") */
|
|
477
|
+
model: import_v44.z.string().optional()
|
|
478
|
+
});
|
|
479
|
+
var TimeWindowTimeStampSchema = import_v44.z.union([
|
|
480
|
+
import_v44.z.number().describe("Hour of day (0-23)"),
|
|
481
|
+
import_v44.z.object({
|
|
482
|
+
hour: import_v44.z.number(),
|
|
483
|
+
minute: import_v44.z.number().optional().default(0)
|
|
484
|
+
})
|
|
485
|
+
]);
|
|
486
|
+
var TimeWindowDayOfWeekSchema = import_v44.z.enum([
|
|
487
|
+
"monday",
|
|
488
|
+
"tuesday",
|
|
489
|
+
"wednesday",
|
|
490
|
+
"thursday",
|
|
491
|
+
"friday",
|
|
492
|
+
"saturday",
|
|
493
|
+
"sunday"
|
|
494
|
+
]);
|
|
495
|
+
var TimeWindowSlotAgentSchema = import_v44.z.object({
|
|
496
|
+
startTime: TimeWindowTimeStampSchema,
|
|
497
|
+
endTime: TimeWindowTimeStampSchema,
|
|
498
|
+
days: import_v44.z.array(TimeWindowDayOfWeekSchema)
|
|
499
|
+
});
|
|
500
|
+
var ResponseModeSchema = import_v44.z.enum([
|
|
501
|
+
"immediate",
|
|
502
|
+
"ack_and_schedule",
|
|
503
|
+
"schedule_only"
|
|
504
|
+
]);
|
|
505
|
+
var TimeWindowBehaviorSchema = import_v44.z.object({
|
|
506
|
+
/** How to handle responses in this window */
|
|
507
|
+
responseMode: ResponseModeSchema,
|
|
508
|
+
/** Prompt injection for this time context */
|
|
509
|
+
prompt: import_v44.z.string().optional().describe("Prompt injection for this time context"),
|
|
510
|
+
/** Window to schedule responses for (when responseMode is ack_and_schedule or schedule_only) */
|
|
511
|
+
scheduleFor: import_v44.z.string().optional().describe("Window name to schedule responses for")
|
|
512
|
+
});
|
|
513
|
+
var TimeWindowPolicySchema = import_v44.z.object({
|
|
514
|
+
/** IANA timezone for the window (e.g., "Australia/Sydney") */
|
|
515
|
+
timezone: import_v44.z.string().describe('IANA timezone, e.g., "Australia/Sydney"'),
|
|
516
|
+
/** Time slots when this window is active */
|
|
517
|
+
windows: import_v44.z.array(TimeWindowSlotAgentSchema),
|
|
518
|
+
/** Behavior for this window (optional - defaults to immediate response) */
|
|
519
|
+
behavior: TimeWindowBehaviorSchema.optional()
|
|
520
|
+
});
|
|
521
|
+
var TimeWindowPoliciesSchema = import_v44.z.record(import_v44.z.string(), TimeWindowPolicySchema);
|
|
522
|
+
var TimeWindowDefaultSchema = TimeWindowBehaviorSchema.describe(
|
|
523
|
+
"Fallback behavior when no time window matches"
|
|
524
|
+
);
|
|
525
|
+
var ResponsesBehaviorConfigSchema = import_v44.z.object({
|
|
526
|
+
/**
|
|
527
|
+
* Maximum intermediate messages per agent run.
|
|
528
|
+
* Intermediate = progress updates, acknowledgments before task completion.
|
|
529
|
+
* The final message slot is always reserved separately.
|
|
530
|
+
* @default 2
|
|
531
|
+
*/
|
|
532
|
+
maxIntermediate: import_v44.z.number().optional(),
|
|
533
|
+
/**
|
|
534
|
+
* Whether a final message is required before the run completes.
|
|
535
|
+
* If true and no final message is sent, the run fails.
|
|
536
|
+
* @default true
|
|
537
|
+
*/
|
|
538
|
+
requireFinal: import_v44.z.boolean().optional(),
|
|
539
|
+
/**
|
|
540
|
+
* Whether the agent can schedule messages for future delivery.
|
|
541
|
+
* Scheduled messages typically require approval.
|
|
542
|
+
* @default false
|
|
543
|
+
*/
|
|
544
|
+
allowSchedule: import_v44.z.boolean().optional(),
|
|
545
|
+
/**
|
|
546
|
+
* Message splitting configuration.
|
|
547
|
+
* Controls whether and how the agent splits responses into multiple messages.
|
|
548
|
+
*/
|
|
549
|
+
messageSplitting: import_v44.z.object({
|
|
550
|
+
/**
|
|
551
|
+
* Whether to allow natural message splitting.
|
|
552
|
+
* When true, the agent may split responses into multiple messages
|
|
553
|
+
* when it improves conversational flow.
|
|
554
|
+
*/
|
|
555
|
+
enabled: import_v44.z.boolean(),
|
|
556
|
+
/**
|
|
557
|
+
* Custom prompt to override the default message splitting guidance.
|
|
558
|
+
* If not provided, uses sensible defaults for when to split vs. keep together.
|
|
559
|
+
*/
|
|
560
|
+
prompt: import_v44.z.string().optional()
|
|
464
561
|
}).optional()
|
|
465
562
|
});
|
|
563
|
+
var SchedulingDelaySchema = import_v44.z.object({
|
|
564
|
+
/** Time unit amount */
|
|
565
|
+
amount: import_v44.z.number(),
|
|
566
|
+
/** Time unit (e.g., "week", "weeks", "day", "days", "month", "months") */
|
|
567
|
+
unit: import_v44.z.string(),
|
|
568
|
+
/** Optional time window to constrain the delay */
|
|
569
|
+
timeWindow: import_v44.z.string().optional()
|
|
570
|
+
});
|
|
571
|
+
var SchedulingPatternSchema = import_v44.z.object({
|
|
572
|
+
/** Trigger name for this pattern */
|
|
573
|
+
trigger: import_v44.z.string(),
|
|
574
|
+
/** Human-readable description of when this pattern applies */
|
|
575
|
+
description: import_v44.z.string().optional(),
|
|
576
|
+
/** Example user phrases that match this pattern */
|
|
577
|
+
examples: import_v44.z.array(import_v44.z.string()).optional(),
|
|
578
|
+
/** Default delay for this pattern */
|
|
579
|
+
defaultDelay: SchedulingDelaySchema.optional()
|
|
580
|
+
});
|
|
581
|
+
var SchedulingBehaviorConfigSchema = import_v44.z.object({
|
|
582
|
+
/**
|
|
583
|
+
* Patterns that trigger scheduling suggestions.
|
|
584
|
+
* The agent uses these to know when to add sendAt to messages.
|
|
585
|
+
*/
|
|
586
|
+
patterns: import_v44.z.array(SchedulingPatternSchema).optional(),
|
|
587
|
+
/**
|
|
588
|
+
* Default settings for scheduled messages.
|
|
589
|
+
*/
|
|
590
|
+
defaults: import_v44.z.object({
|
|
591
|
+
/** Cancel scheduled message if user replies before send time (default: true) */
|
|
592
|
+
cancelOnActivity: import_v44.z.boolean().optional(),
|
|
593
|
+
/** Whether scheduled messages require approval (default: true) */
|
|
594
|
+
requiresApproval: import_v44.z.boolean().optional(),
|
|
595
|
+
/** Default time window policy to constrain all scheduled messages */
|
|
596
|
+
timeWindow: import_v44.z.string().optional().describe("Time window policy name for scheduled messages")
|
|
597
|
+
}).optional()
|
|
598
|
+
});
|
|
599
|
+
var BehaviorConfigV3Schema = import_v44.z.object({
|
|
600
|
+
/**
|
|
601
|
+
* Response behavior - controls message sending via tool calls.
|
|
602
|
+
* When configured, agents must explicitly call system:message:send
|
|
603
|
+
* instead of producing implicit final output.
|
|
604
|
+
*/
|
|
605
|
+
responses: ResponsesBehaviorConfigSchema.optional(),
|
|
606
|
+
/**
|
|
607
|
+
* Scheduling behavior - controls when the agent schedules follow-up messages.
|
|
608
|
+
* Patterns define triggers like "user indicates they'll return later".
|
|
609
|
+
*/
|
|
610
|
+
scheduling: SchedulingBehaviorConfigSchema.optional()
|
|
611
|
+
});
|
|
466
612
|
var PromptsConfigV3Schema = import_v44.z.object({
|
|
613
|
+
/** Main system prompt with workflow instructions */
|
|
614
|
+
system: import_v44.z.string().optional(),
|
|
615
|
+
/** Injected during second pass when skills were loaded but tools not used */
|
|
467
616
|
recovery: import_v44.z.string().optional(),
|
|
617
|
+
/** Injected during follow-up passes when context needs updating */
|
|
468
618
|
followUp: import_v44.z.string().optional(),
|
|
469
|
-
|
|
619
|
+
/** Thread list title generation (system + user template with {{var}} placeholders) */
|
|
620
|
+
titleEnrichment: import_v44.z.object({
|
|
621
|
+
system: import_v44.z.string().optional(),
|
|
622
|
+
user: import_v44.z.string().optional()
|
|
623
|
+
}).optional()
|
|
470
624
|
});
|
|
471
|
-
var AgentConfigV3Schema = import_v44.z.record(import_v44.z.string(), import_v44.z.unknown());
|
|
472
625
|
var AgentYAMLV3Schema = import_v44.z.object({
|
|
473
626
|
$schema: import_v44.z.string().optional(),
|
|
474
627
|
handle: import_v44.z.string(),
|
|
@@ -479,28 +632,36 @@ var AgentYAMLV3Schema = import_v44.z.object({
|
|
|
479
632
|
persona: PersonaV3Schema.optional(),
|
|
480
633
|
// Skills - What the agent knows how to do (skills own their tools)
|
|
481
634
|
skills: import_v44.z.array(SkillRefSchema).optional(),
|
|
482
|
-
//
|
|
483
|
-
// Examples: system:
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
635
|
+
// Tools - Always-available tools before any skill loads
|
|
636
|
+
// Examples: system:settings:business_information:get
|
|
637
|
+
tools: import_v44.z.array(AgentToolRefSchema).optional(),
|
|
638
|
+
/**
|
|
639
|
+
* Events - When the agent activates
|
|
640
|
+
* @deprecated Not yet implemented - this is a planned feature for event-driven agents.
|
|
641
|
+
* Fields are accepted but not used at runtime.
|
|
642
|
+
*/
|
|
490
643
|
events: EventsConfigSchema.optional(),
|
|
491
|
-
|
|
644
|
+
/**
|
|
645
|
+
* Memory - How the agent remembers
|
|
646
|
+
* @deprecated Not yet implemented - this is a planned feature.
|
|
647
|
+
* Fields are accepted but not used at runtime.
|
|
648
|
+
*/
|
|
492
649
|
memory: MemoryConfigV3Schema.optional(),
|
|
493
|
-
// Policies -
|
|
650
|
+
// Policies - Business rules for the agent
|
|
494
651
|
policies: PoliciesConfigV3Schema.optional(),
|
|
495
|
-
// Runtime - Execution configuration
|
|
652
|
+
// Runtime - Execution configuration (only model is used)
|
|
496
653
|
runtime: RuntimeConfigV3Schema.optional(),
|
|
497
|
-
// Prompts - Agent-specific prompt injections
|
|
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
|
|
654
|
+
// Prompts - Agent-specific prompt injections
|
|
501
655
|
prompts: PromptsConfigV3Schema.optional(),
|
|
502
|
-
//
|
|
503
|
-
|
|
656
|
+
// Behavior - Agent runtime behavior configuration
|
|
657
|
+
// responses: Controls message sending via explicit tool calls
|
|
658
|
+
behavior: BehaviorConfigV3Schema.optional(),
|
|
659
|
+
// Time Windows - Named time window policies for scheduling constraints
|
|
660
|
+
// Windows must be mutually exclusive (non-overlapping)
|
|
661
|
+
// Each window can define its own behavior (response mode, prompt, etc.)
|
|
662
|
+
timeWindows: TimeWindowPoliciesSchema.optional(),
|
|
663
|
+
// Time Window Default - Fallback behavior when no window matches
|
|
664
|
+
timeWindowDefault: TimeWindowDefaultSchema.optional(),
|
|
504
665
|
// Sandbox - Testing configuration
|
|
505
666
|
sandbox: SandboxConfigSchema.optional()
|
|
506
667
|
});
|
|
@@ -517,8 +678,9 @@ function validateAgentYAMLV3(agent) {
|
|
|
517
678
|
// Annotate the CommonJS export names for ESM import in node:
|
|
518
679
|
0 && (module.exports = {
|
|
519
680
|
AGENT_SCHEMA_VERSION_V3,
|
|
520
|
-
|
|
681
|
+
AgentToolRefSchema,
|
|
521
682
|
AgentYAMLV3Schema,
|
|
683
|
+
BehaviorConfigV3Schema,
|
|
522
684
|
BootstrapToolRefSchema,
|
|
523
685
|
ExternalMemoryConfigSchema,
|
|
524
686
|
MemoryConfigV3Schema,
|
|
@@ -527,9 +689,20 @@ function validateAgentYAMLV3(agent) {
|
|
|
527
689
|
PersonaVoiceV3Schema,
|
|
528
690
|
PoliciesConfigV3Schema,
|
|
529
691
|
PromptsConfigV3Schema,
|
|
530
|
-
|
|
692
|
+
ResponseModeSchema,
|
|
693
|
+
ResponsesBehaviorConfigSchema,
|
|
531
694
|
RuntimeConfigV3Schema,
|
|
695
|
+
SchedulingBehaviorConfigSchema,
|
|
696
|
+
SchedulingDelaySchema,
|
|
697
|
+
SchedulingPatternSchema,
|
|
532
698
|
SemanticMemoryConfigSchema,
|
|
699
|
+
TimeWindowBehaviorSchema,
|
|
700
|
+
TimeWindowDayOfWeekSchema,
|
|
701
|
+
TimeWindowDefaultSchema,
|
|
702
|
+
TimeWindowPoliciesSchema,
|
|
703
|
+
TimeWindowPolicySchema,
|
|
704
|
+
TimeWindowSlotAgentSchema,
|
|
705
|
+
TimeWindowTimeStampSchema,
|
|
533
706
|
ToolApprovalConfigSchema,
|
|
534
707
|
ToolRefV3Schema,
|
|
535
708
|
ToolSandboxConfigSchema,
|