@wayai/cli 0.3.358 → 0.3.360

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/index.js CHANGED
@@ -5204,10 +5204,10 @@ var init_chunk_HZ6CADSY = __esm({
5204
5204
  }
5205
5205
  });
5206
5206
 
5207
- // ../../packages/core/dist/chunk-RACEDHG6.js
5208
- var resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery;
5209
- var init_chunk_RACEDHG6 = __esm({
5210
- "../../packages/core/dist/chunk-RACEDHG6.js"() {
5207
+ // ../../packages/core/dist/chunk-2ZBLI7IH.js
5208
+ var resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery, syncSkillsResultItemSchema, syncSkillsResponseSchema;
5209
+ var init_chunk_2ZBLI7IH = __esm({
5210
+ "../../packages/core/dist/chunk-2ZBLI7IH.js"() {
5211
5211
  "use strict";
5212
5212
  init_chunk_HZ6CADSY();
5213
5213
  init_zod();
@@ -5344,6 +5344,18 @@ var init_chunk_RACEDHG6 = __esm({
5344
5344
  resource_id: uuidSchema,
5345
5345
  agent_id: uuidSchema
5346
5346
  });
5347
+ syncSkillsResultItemSchema = external_exports.object({
5348
+ connection_id: external_exports.string().min(1),
5349
+ connection_name: external_exports.string(),
5350
+ uploaded: external_exports.number().int().nonnegative(),
5351
+ failed: external_exports.number().int().nonnegative(),
5352
+ errors: external_exports.array(external_exports.string())
5353
+ });
5354
+ syncSkillsResponseSchema = external_exports.object({
5355
+ success: external_exports.literal(true),
5356
+ message: external_exports.string(),
5357
+ results: external_exports.array(syncSkillsResultItemSchema)
5358
+ });
5347
5359
  }
5348
5360
  });
5349
5361
 
@@ -5530,7 +5542,7 @@ function normalizeAuthType(raw) {
5530
5542
  function isCustomerFacingAgentRole(role) {
5531
5543
  return typeof role === "string" && CUSTOMER_FACING_AGENT_ROLES.includes(role);
5532
5544
  }
5533
- var AUTH_TYPE, ORG_CREDENTIAL_AUTH_TYPES, AUTH_TYPE_DISPLAY, LEGACY_AUTH_TYPE_MAP, VALID_AUTH_TYPES, AGENT_ROLES, PILOT_TRACK_ROLES, COPILOT_TRACK_ROLES, CUSTOMER_FACING_AGENT_ROLES, AGENT_ROLE_DISPLAY, SAFE_USER_ID_REGEX, SUPPORTED_LOCALES, SKILL_INSTALL_COMMAND, CASE_TYPE_ABBREVIATION_PATTERN;
5545
+ var AUTH_TYPE, ORG_CREDENTIAL_AUTH_TYPES, AUTH_TYPE_DISPLAY, LEGACY_AUTH_TYPE_MAP, VALID_AUTH_TYPES, AGENT_ROLES, PILOT_TRACK_ROLES, COPILOT_TRACK_ROLES, CUSTOMER_FACING_AGENT_ROLES, AGENT_ROLE_DISPLAY, AI_MODES, SAFE_USER_ID_REGEX, SUPPORTED_LOCALES, SKILL_INSTALL_COMMAND, CASE_TYPE_ABBREVIATION_PATTERN;
5534
5546
  var init_chunk_ZTNFLGW5 = __esm({
5535
5547
  "../../packages/core/dist/chunk-ZTNFLGW5.js"() {
5536
5548
  "use strict";
@@ -5594,6 +5606,7 @@ var init_chunk_ZTNFLGW5 = __esm({
5594
5606
  consultant: "Consultant",
5595
5607
  pilot_voice: "Pilot Voice"
5596
5608
  };
5609
+ AI_MODES = ["pilot", "copilot", "pilot+copilot", "turned_off"];
5597
5610
  SAFE_USER_ID_REGEX = /^[A-Za-z0-9_-]{1,64}$/;
5598
5611
  SUPPORTED_LOCALES = ["en", "pt", "es"];
5599
5612
  SKILL_INSTALL_COMMAND = "mkdir -p .claude && npx skills add wayai-pro/wayai-skill -y";
@@ -11587,7 +11600,7 @@ var init_chunk_C2UEA2KW = __esm({
11587
11600
  }
11588
11601
  });
11589
11602
 
11590
- // ../../packages/core/dist/chunk-QMQGGR7Q.js
11603
+ // ../../packages/core/dist/chunk-OLBDDBKV.js
11591
11604
  function resolveMonitorTrigger(monitorConfig) {
11592
11605
  if (!monitorConfig || typeof monitorConfig !== "object") return "idle";
11593
11606
  const raw = monitorConfig.trigger;
@@ -11893,8 +11906,8 @@ function refineMonitorRulesStructuredOutput(body, ctx) {
11893
11906
  if (refusal2) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["response_format"], message: refusal2 });
11894
11907
  }
11895
11908
  var previousConversationsCountField, summarizationThresholdField, flagConditionSchema, MONITOR_TRIGGERS, monitorTriggerSchema, AUTOMATION_GATE_TRIGGERS, NON_FIRING_TRIGGERS, MONITOR_FIRING_TRIGGERS, MONITOR_DELAY_SECONDS_MIN, MONITOR_IDLE_DELAY_REQUIRED_MESSAGE, MONITOR_HISTORY_MESSAGES_MAX, monitorHistoryMessagesSchema, monitorIncludeToolResultsSchema, MONITOR_INPUT_SHAPING_KEYS, MONITOR_INPUT_SHAPING_SCHEMAS, MONITOR_INPUT_SHAPING_IDLE_MESSAGE, monitorArgumentSourceSchema, MONITOR_NOTE_TEMPLATE_MAX, MONITOR_STEER_NOTE_MAX, MONITOR_GATE_AGENT_NAME_MAX, monitorActionSchema, monitorRuleSchema, MONITOR_RULE_KEYS, MONITOR_RULE_SCHEMAS, MONITOR_RULE_TRIGGERS, MONITOR_RULE_TRIGGER_MESSAGE, CALL_UTTERANCE_SPEAKERS, callUtteranceSpeakerSchema, MONITOR_CALL_KEYS, MONITOR_CALL_SCHEMAS, MONITOR_CALL_KEY_MESSAGE, CALL_STEERING_MIN_CONFIDENCE, CALL_UTTERANCE_RULE_NOT_CONFIDENT_MESSAGE, CALL_UTTERANCE_FALLBACK_MESSAGE, CALL_UTTERANCE_FLAG_CONDITIONS_MESSAGE, CALL_STEER_NOTE_BLANK_MESSAGE, MONITOR_USER_MESSAGE_ACTION_KINDS, MONITOR_ASSISTANT_REPLY_ACTION_KINDS, MONITOR_CALL_UTTERANCE_ACTION_KINDS, MONITOR_AUTOMATION_FIRE_ACTION_KINDS, MONITOR_AUTOMATION_ITEM_ACTION_KINDS, INSERT_NOTE_TOOL_NAME, RUN_MONITOR_TOOL_NAME, MONITOR_RULE_ALLOWED_NATIVE_TOOLS, MONITOR_RULE_REENTRY_TOOLS, MONITOR_RULE_REENTRY_TRACKS, AUTOMATION_FIRE_FLAG_CONDITIONS_MESSAGE, AUTOMATION_FIRE_INPUT_SHAPING_MESSAGE, AUTOMATION_ITEM_FLAG_CONDITIONS_MESSAGE, AUTOMATION_ITEM_INPUT_SHAPING_MESSAGE, AUTOMATION_GATE_KEY_MESSAGES, monitorConfigField, flagConditionsField, agentIdParam, listAgentsQuery, agentConnectionsQuery, createAgentBody, updateAgentBody, AGENT_PARAMETER_TYPES, AGENT_PARAMETER_NAME_REGEX, agentParameterCreateSchema, MAX_AGENT_PARAMETERS_PER_REQUEST, createAgentParametersBody;
11896
- var init_chunk_QMQGGR7Q = __esm({
11897
- "../../packages/core/dist/chunk-QMQGGR7Q.js"() {
11909
+ var init_chunk_OLBDDBKV = __esm({
11910
+ "../../packages/core/dist/chunk-OLBDDBKV.js"() {
11898
11911
  "use strict";
11899
11912
  init_chunk_IBL7FANV();
11900
11913
  init_chunk_KB5RK3RP();
@@ -12118,12 +12131,12 @@ var init_chunk_QMQGGR7Q = __esm({
12118
12131
  }
12119
12132
  });
12120
12133
 
12121
- // ../../packages/core/dist/chunk-QEEQN2NE.js
12134
+ // ../../packages/core/dist/chunk-V2CXEU5X.js
12122
12135
  var conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody;
12123
- var init_chunk_QEEQN2NE = __esm({
12124
- "../../packages/core/dist/chunk-QEEQN2NE.js"() {
12136
+ var init_chunk_V2CXEU5X = __esm({
12137
+ "../../packages/core/dist/chunk-V2CXEU5X.js"() {
12125
12138
  "use strict";
12126
- init_chunk_QMQGGR7Q();
12139
+ init_chunk_OLBDDBKV();
12127
12140
  init_chunk_HZ6CADSY();
12128
12141
  init_chunk_ZTNFLGW5();
12129
12142
  init_zod();
@@ -12919,10 +12932,10 @@ var init_chunk_YR7QALGP = __esm({
12919
12932
  }
12920
12933
  });
12921
12934
 
12922
- // ../../packages/core/dist/chunk-ME6NL7FI.js
12935
+ // ../../packages/core/dist/chunk-X4IDZLLS.js
12923
12936
  var caseVerifyQuery;
12924
- var init_chunk_ME6NL7FI = __esm({
12925
- "../../packages/core/dist/chunk-ME6NL7FI.js"() {
12937
+ var init_chunk_X4IDZLLS = __esm({
12938
+ "../../packages/core/dist/chunk-X4IDZLLS.js"() {
12926
12939
  "use strict";
12927
12940
  init_chunk_YR7QALGP();
12928
12941
  init_zod();
@@ -13875,7 +13888,7 @@ var init_chunk_D3EP4TDU = __esm({
13875
13888
  }
13876
13889
  });
13877
13890
 
13878
- // ../../packages/core/dist/chunk-X5PZZVTS.js
13891
+ // ../../packages/core/dist/chunk-ZANBA4K4.js
13879
13892
  function isEventRelativeFollowupType(type) {
13880
13893
  return typeof type === "string" && EVENT_RELATIVE_FOLLOWUP_TYPES.includes(type);
13881
13894
  }
@@ -13968,9 +13981,9 @@ function validateLaneReferences(lanes, statuses) {
13968
13981
  });
13969
13982
  return issues;
13970
13983
  }
13971
- var MAX_KANBAN_STATUSES, MAX_FOLLOWUPS_PER_STATUS, MAX_LANES, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES, RESERVED_TEMPLATE_DUMP_NAME, kanbanStatusSlugSchema, followupTypeSchema, EVENT_RELATIVE_FOLLOWUP_TYPES, followupTimeUnitSchema, followupIdSchema, SELECTABLE_FOLLOWUP_TYPES, MAX_LINKED_FOLLOWUP_TARGETS_PER_STATUS, followupSchema, MAX_OUTCOMES_PER_STATUS, kanbanOutcomeSchema, EXCLUSIVE_FLAG_PAIRS, kanbanStatusSchema, kanbanStatusesArraySchema, laneSchema, lanesArraySchema;
13972
- var init_chunk_X5PZZVTS = __esm({
13973
- "../../packages/core/dist/chunk-X5PZZVTS.js"() {
13984
+ var MAX_KANBAN_STATUSES, MAX_FOLLOWUPS_PER_STATUS, MAX_LANES, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES, RESERVED_TEMPLATE_DUMP_NAME, kanbanStatusSlugSchema, followupTypeSchema, EVENT_RELATIVE_FOLLOWUP_TYPES, followupTimeUnitSchema, followupIdSchema, SELECTABLE_FOLLOWUP_TYPES, MAX_LINKED_FOLLOWUP_TARGETS_PER_STATUS, followupSchema, MAX_OUTCOMES_PER_STATUS, kanbanOutcomeSchema, EXCLUSIVE_FLAG_PAIRS, kanbanStatusSchema, kanbanStatusesArraySchema, laneSchema, lanesArraySchema, kanbanLintWarningSchema;
13985
+ var init_chunk_ZANBA4K4 = __esm({
13986
+ "../../packages/core/dist/chunk-ZANBA4K4.js"() {
13974
13987
  "use strict";
13975
13988
  init_chunk_6TSQ5HXC();
13976
13989
  init_chunk_HZ6CADSY();
@@ -14270,10 +14283,23 @@ var init_chunk_X5PZZVTS = __esm({
14270
14283
  }
14271
14284
  }
14272
14285
  });
14286
+ kanbanLintWarningSchema = external_exports.object({
14287
+ code: external_exports.enum([
14288
+ "unreachable",
14289
+ "placeholder_unresolved",
14290
+ "unused_lane",
14291
+ "no_eligible_outcome",
14292
+ "terminal_outcomes_all_restricted",
14293
+ "duplicate_followup_id"
14294
+ ]),
14295
+ slug: external_exports.string(),
14296
+ name: external_exports.string(),
14297
+ message: external_exports.string()
14298
+ });
14273
14299
  }
14274
14300
  });
14275
14301
 
14276
- // ../../packages/core/dist/chunk-PIZTARVG.js
14302
+ // ../../packages/core/dist/chunk-QT7R3TGR.js
14277
14303
  function byLocale(entry) {
14278
14304
  const shape = Object.fromEntries(SUPPORTED_LOCALES.map((locale) => [locale, entry.optional()]));
14279
14305
  return external_exports.object(shape).strict();
@@ -14283,9 +14309,9 @@ function writeField(map) {
14283
14309
  (value) => value && Object.keys(value).length === 0 ? null : value
14284
14310
  );
14285
14311
  }
14286
- var HUB_DISPLAY_NAME_MAX_CHARS, HUB_WELCOME_MESSAGE_MAX_CHARS, HUB_STARTER_QUESTIONS_MAX, HUB_STARTER_QUESTION_MAX_CHARS, displayName, welcomeMessage, starterQuestions, hubDisplayNamesSchema, hubWelcomeMessagesSchema, hubStarterQuestionsSchema, hubDisplayNamesField, hubWelcomeMessagesField, hubStarterQuestionsField, HUB_PRESENTATION_FIELDS, HUB_PRESENTATION_SCHEMAS;
14287
- var init_chunk_PIZTARVG = __esm({
14288
- "../../packages/core/dist/chunk-PIZTARVG.js"() {
14312
+ var HUB_DISPLAY_NAME_MAX_CHARS, HUB_WELCOME_MESSAGE_MAX_CHARS, HUB_STARTER_QUESTIONS_MAX, HUB_STARTER_QUESTION_MAX_CHARS, displayName, welcomeMessage, starterQuestions, hubDisplayNamesSchema, hubWelcomeMessagesSchema, hubStarterQuestionsSchema, hubDisplayNamesField, hubWelcomeMessagesField, hubStarterQuestionsField, HUB_PRESENTATION_FIELDS, hubPresentationColumnsSchema, HUB_PRESENTATION_SCHEMAS;
14313
+ var init_chunk_QT7R3TGR = __esm({
14314
+ "../../packages/core/dist/chunk-QT7R3TGR.js"() {
14289
14315
  "use strict";
14290
14316
  init_chunk_ZTNFLGW5();
14291
14317
  init_zod();
@@ -14303,6 +14329,11 @@ var init_chunk_PIZTARVG = __esm({
14303
14329
  hubWelcomeMessagesField = writeField(hubWelcomeMessagesSchema);
14304
14330
  hubStarterQuestionsField = writeField(hubStarterQuestionsSchema);
14305
14331
  HUB_PRESENTATION_FIELDS = ["display_names", "welcome_messages", "starter_questions"];
14332
+ hubPresentationColumnsSchema = external_exports.object({
14333
+ display_names: byLocale(external_exports.string()).nullable(),
14334
+ welcome_messages: byLocale(external_exports.string()).nullable(),
14335
+ starter_questions: byLocale(external_exports.array(external_exports.string())).nullable()
14336
+ });
14306
14337
  HUB_PRESENTATION_SCHEMAS = {
14307
14338
  display_names: hubDisplayNamesSchema,
14308
14339
  welcome_messages: hubWelcomeMessagesSchema,
@@ -14311,7 +14342,7 @@ var init_chunk_PIZTARVG = __esm({
14311
14342
  }
14312
14343
  });
14313
14344
 
14314
- // ../../packages/core/dist/chunk-ARK3766Q.js
14345
+ // ../../packages/core/dist/chunk-25BLQS73.js
14315
14346
  function refineLaneReferences(val, ctx) {
14316
14347
  const lanes = val.lanes;
14317
14348
  const statuses = val.kanban_statuses;
@@ -14334,14 +14365,15 @@ function describeSyncWarning(warning) {
14334
14365
  }
14335
14366
  return `${label3}: ${parts.join("; ")}. Promote the base so production's tools match the preview's.`;
14336
14367
  }
14337
- var hubIdParam, hubAdminIdParam, hubUserIdParam, hubAgentIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, HUB_USERS_PAGE_SIZE_MAX, HUB_USERS_SEARCH_MAX, HUB_USERS_CHANNEL_TYPES, getHubUsersQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, MAX_END_USER_DAILY_MESSAGE_LIMIT, endUserDailyMessageLimitField, previewLabelField, hubTagsField, createHubBody, updateHubBody, HUB_TAG_CHANGE_REFUSED, hubTagChangeRefusalSchema, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, CONTACT_ACCESS_PAGE_SIZE_MAX, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, HUB_DIFF_SECTION_SET, HUB_DIFF_SECTIONS, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam;
14338
- var init_chunk_ARK3766Q = __esm({
14339
- "../../packages/core/dist/chunk-ARK3766Q.js"() {
14368
+ var hubIdParam, hubAdminIdParam, hubUserIdParam, hubAgentIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, HUB_USERS_PAGE_SIZE_MAX, HUB_USERS_SEARCH_MAX, HUB_USERS_CHANNEL_TYPES, getHubUsersQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, MAX_END_USER_DAILY_MESSAGE_LIMIT, endUserDailyMessageLimitField, previewLabelField, hubTagsField, hubTypeSchema, supportModelSchema, unassignedPolicySchema, hubLanguageSchema, accessApprovalRoleSchema, createHubBody, updateHubBody, HUB_TAG_CHANGE_REFUSED, hubTagChangeRefusalSchema, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, CONTACT_ACCESS_PAGE_SIZE_MAX, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, hubRowObjectListSchema, createdHubRowSchema, createHubResponseSchema, diffEntrySchema, diffEntriesSchema, hubDiffResultSchema, HUB_DIFF_SECTION_SET, HUB_DIFF_SECTIONS, getHubDiffResponseSchema, publishHubResponseSchema, syncWarningSchema, syncHubResponseSchema, replicatePreviewHubResponseSchema, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam;
14369
+ var init_chunk_25BLQS73 = __esm({
14370
+ "../../packages/core/dist/chunk-25BLQS73.js"() {
14340
14371
  "use strict";
14341
14372
  init_chunk_D3EP4TDU();
14342
- init_chunk_X5PZZVTS();
14343
- init_chunk_PIZTARVG();
14373
+ init_chunk_ZANBA4K4();
14374
+ init_chunk_QT7R3TGR();
14344
14375
  init_chunk_HZ6CADSY();
14376
+ init_chunk_ZTNFLGW5();
14345
14377
  init_zod();
14346
14378
  hubIdParam = external_exports.object({ id: uuidSchema });
14347
14379
  hubAdminIdParam = external_exports.object({ id: uuidSchema, adminId: uuidSchema });
@@ -14371,11 +14403,16 @@ var init_chunk_ARK3766Q = __esm({
14371
14403
  return trimmed || null;
14372
14404
  });
14373
14405
  hubTagsField = external_exports.array(external_exports.string()).nullable().optional();
14406
+ hubTypeSchema = external_exports.enum(["chat", "task"]);
14407
+ supportModelSchema = external_exports.enum(["conversation", "account"]);
14408
+ unassignedPolicySchema = external_exports.enum(["default_team", "auto_assign_random", "auto_assign_round_robin", "pull_queue"]);
14409
+ hubLanguageSchema = external_exports.enum(SUPPORTED_LOCALES);
14410
+ accessApprovalRoleSchema = external_exports.enum(["admin", "team"]);
14374
14411
  createHubBody = external_exports.object({
14375
14412
  organization_id: uuidSchema,
14376
14413
  hub_name: external_exports.string().min(1, "hub_name is required"),
14377
14414
  hub_description: external_exports.string().optional(),
14378
- hub_type: external_exports.enum(["chat", "task"]).optional(),
14415
+ hub_type: hubTypeSchema.optional(),
14379
14416
  kanban_statuses: kanbanStatusesArraySchema.nullable().optional(),
14380
14417
  lanes: lanesArraySchema.nullable().optional(),
14381
14418
  // Optional preview label for the first preview. Server-owned thereafter
@@ -14393,8 +14430,8 @@ var init_chunk_ARK3766Q = __esm({
14393
14430
  end_user_daily_message_limit: endUserDailyMessageLimitField
14394
14431
  }).strict().superRefine(refineLaneReferences);
14395
14432
  updateHubBody = external_exports.object({
14396
- support_model: external_exports.enum(["conversation", "account"]).optional(),
14397
- unassigned_policy: external_exports.enum(["default_team", "auto_assign_random", "auto_assign_round_robin", "pull_queue"]).optional(),
14433
+ support_model: supportModelSchema.optional(),
14434
+ unassigned_policy: unassignedPolicySchema.optional(),
14398
14435
  default_hub_team_id: uuidSchema.nullable().optional(),
14399
14436
  kanban_statuses: kanbanStatusesArraySchema.nullable().optional(),
14400
14437
  lanes: lanesArraySchema.nullable().optional(),
@@ -14416,9 +14453,9 @@ var init_chunk_ARK3766Q = __esm({
14416
14453
  eval_retention_days: external_exports.number().int().min(0).max(MAX_EVAL_RETENTION_DAYS).nullable().optional(),
14417
14454
  // Channel contact access control. Enum-validated explicitly (not via passthrough)
14418
14455
  // so `language`/`access_approval_role` can't reach the DB with an invalid value.
14419
- language: external_exports.enum(["en", "pt", "es"]).optional(),
14456
+ language: hubLanguageSchema.optional(),
14420
14457
  access_request_message: external_exports.string().max(1e3).nullable().optional(),
14421
- access_approval_role: external_exports.enum(["admin", "team"]).optional(),
14458
+ access_approval_role: accessApprovalRoleSchema.optional(),
14422
14459
  // AI-failure escalation. When an LLM provider outage persists past this many
14423
14460
  // minutes the conversation escalates to the team; null → code default. The two
14424
14461
  // message fields override the localized (hub.language) delay / hand-off notices;
@@ -14500,6 +14537,96 @@ var init_chunk_ARK3766Q = __esm({
14500
14537
  replicatePreviewBody = external_exports.object({
14501
14538
  preview_label: previewLabelField
14502
14539
  });
14540
+ hubRowObjectListSchema = external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown()));
14541
+ createdHubRowSchema = external_exports.object({
14542
+ hub_id: external_exports.string().min(1),
14543
+ hub_name: external_exports.string(),
14544
+ hub_type: hubTypeSchema,
14545
+ hub_description: external_exports.string().nullable(),
14546
+ ai_mode: external_exports.enum(AI_MODES),
14547
+ non_app_permission: external_exports.enum(["everyone", "require_permission", "not_allowed"]),
14548
+ hub_environment: external_exports.enum(["preview", "production"]),
14549
+ production_hub_id: external_exports.string().nullable(),
14550
+ branch_name: external_exports.string().nullable(),
14551
+ preview_label: external_exports.string().nullable(),
14552
+ tags: external_exports.array(external_exports.string()),
14553
+ org_id: external_exports.string(),
14554
+ created_by: external_exports.string(),
14555
+ kanban_statuses: hubRowObjectListSchema.nullable(),
14556
+ timezone: external_exports.string().nullable(),
14557
+ support_model: supportModelSchema,
14558
+ unassigned_policy: unassignedPolicySchema,
14559
+ default_hub_team_id: external_exports.string().nullable(),
14560
+ last_assigned_team_index: external_exports.number(),
14561
+ storage_retention_months: external_exports.number().nullable(),
14562
+ holidays: external_exports.array(external_exports.string()).nullable(),
14563
+ template_id: external_exports.string().nullable(),
14564
+ last_ci_activity_at: external_exports.string().nullable(),
14565
+ ci_commit_sha: external_exports.string().nullable(),
14566
+ config_version: external_exports.number(),
14567
+ created_at: external_exports.string(),
14568
+ updated_at: external_exports.string(),
14569
+ deleted_at: external_exports.string().nullable(),
14570
+ auto_close_inactive_days: external_exports.number(),
14571
+ primary_region: primaryRegionSchema.nullable(),
14572
+ placement_region: primaryRegionSchema.nullable(),
14573
+ placement_source: placementSourceSchema.nullable(),
14574
+ language: hubLanguageSchema,
14575
+ access_request_message: external_exports.string().nullable(),
14576
+ access_approval_role: accessApprovalRoleSchema,
14577
+ lanes: hubRowObjectListSchema.nullable(),
14578
+ conversation_retention_days: external_exports.number(),
14579
+ harness_enabled: external_exports.number(),
14580
+ fallback_connection_id: external_exports.string().nullable(),
14581
+ seed_connection_id: external_exports.string().nullable(),
14582
+ ended_index_retention_days: external_exports.number().nullable(),
14583
+ ai_failure_escalation_minutes: external_exports.number().nullable(),
14584
+ ai_delay_message: external_exports.string().nullable(),
14585
+ ai_handoff_message: external_exports.string().nullable(),
14586
+ eval_retention_days: external_exports.number().nullable(),
14587
+ end_user_daily_message_limit: external_exports.number().nullable()
14588
+ }).merge(hubPresentationColumnsSchema);
14589
+ createHubResponseSchema = external_exports.object({
14590
+ data: external_exports.array(createdHubRowSchema),
14591
+ /** Non-blocking lint warnings (e.g. unreachable kanban statuses). */
14592
+ warnings: external_exports.array(kanbanLintWarningSchema)
14593
+ });
14594
+ diffEntrySchema = external_exports.object({
14595
+ name: external_exports.string(),
14596
+ type: external_exports.string().optional(),
14597
+ status: external_exports.enum(["added", "removed", "updated"])
14598
+ });
14599
+ diffEntriesSchema = external_exports.array(diffEntrySchema);
14600
+ hubDiffResultSchema = external_exports.object({
14601
+ has_changes: external_exports.boolean(),
14602
+ is_first_publish: external_exports.boolean(),
14603
+ hub_changed: external_exports.boolean(),
14604
+ agents: diffEntriesSchema,
14605
+ connections: diffEntriesSchema,
14606
+ tools: diffEntriesSchema,
14607
+ channels: diffEntriesSchema,
14608
+ states: diffEntriesSchema,
14609
+ resources: diffEntriesSchema,
14610
+ /** A connection's message templates, which publish and sync copy too. Absent from a server older than wayai#4931 PR 4a. */
14611
+ message_templates: diffEntriesSchema.optional(),
14612
+ // Every other type publish and sync copy. Each is absent from a server older than wayai#4931 PR 1d.
14613
+ /** An agent's parameters; `type` names their agent. */
14614
+ agent_parameters: diffEntriesSchema.optional(),
14615
+ mcp_tools: diffEntriesSchema.optional(),
14616
+ teams: diffEntriesSchema.optional(),
14617
+ /** `type` names the resource a folder belongs to. */
14618
+ resource_folders: diffEntriesSchema.optional(),
14619
+ /** `type` names the resource a file belongs to. */
14620
+ resource_files: diffEntriesSchema.optional(),
14621
+ /** An agent's link to a resource: `name` is the resource, `type` the agent. */
14622
+ agent_resources: diffEntriesSchema.optional(),
14623
+ evals: diffEntriesSchema.optional(),
14624
+ /** The hub's own contact lists (wayai#4931 PR 2c). */
14625
+ contact_lists: diffEntriesSchema.optional(),
14626
+ automations: diffEntriesSchema.optional(),
14627
+ /** The hub's pages (wayai#5333), named by slug: a page is the same page in both hubs. Absent from a server older than its pages section. */
14628
+ pages: diffEntriesSchema.optional()
14629
+ });
14503
14630
  HUB_DIFF_SECTION_SET = {
14504
14631
  agents: true,
14505
14632
  agent_parameters: true,
@@ -14520,6 +14647,37 @@ var init_chunk_ARK3766Q = __esm({
14520
14647
  evals: true
14521
14648
  };
14522
14649
  HUB_DIFF_SECTIONS = Object.keys(HUB_DIFF_SECTION_SET);
14650
+ getHubDiffResponseSchema = external_exports.object({ data: hubDiffResultSchema });
14651
+ publishHubResponseSchema = external_exports.object({
14652
+ data: external_exports.object({ production_hub_id: external_exports.string().min(1) })
14653
+ });
14654
+ syncWarningSchema = external_exports.discriminatedUnion("kind", [
14655
+ external_exports.object({
14656
+ kind: external_exports.literal("toolset_tools_differ"),
14657
+ connection_name: external_exports.string(),
14658
+ toolset: external_exports.string(),
14659
+ /** Tools the preview's toolset publishes and production's does not, sorted. */
14660
+ missing_in_production: external_exports.array(external_exports.string()),
14661
+ /** Tools only production's toolset publishes, sorted. */
14662
+ only_in_production: external_exports.array(external_exports.string())
14663
+ }),
14664
+ external_exports.object({
14665
+ /** The tools could not be compared (the data service unreachable, or refusing a token). */
14666
+ kind: external_exports.literal("toolset_tools_unverified"),
14667
+ connection_name: external_exports.string(),
14668
+ toolset: external_exports.string()
14669
+ })
14670
+ ]);
14671
+ syncHubResponseSchema = external_exports.object({
14672
+ data: external_exports.object({
14673
+ synced: external_exports.boolean(),
14674
+ /** Absent when there is nothing to say. */
14675
+ warnings: external_exports.array(syncWarningSchema).optional()
14676
+ })
14677
+ });
14678
+ replicatePreviewHubResponseSchema = external_exports.object({
14679
+ data: external_exports.object({ preview_hub_id: external_exports.string().min(1) })
14680
+ });
14523
14681
  updateChannelTestIdentitiesBody = external_exports.object({
14524
14682
  test_identities: external_exports.array(external_exports.string().max(320)).max(1e3)
14525
14683
  });
@@ -14535,7 +14693,7 @@ var init_chunk_ARK3766Q = __esm({
14535
14693
  }
14536
14694
  });
14537
14695
 
14538
- // ../../packages/core/dist/chunk-S24FZRPG.js
14696
+ // ../../packages/core/dist/chunk-JTG72ANZ.js
14539
14697
  function declaresNoConnection(agent) {
14540
14698
  return agent.connection === null && !agent.connection_id;
14541
14699
  }
@@ -15266,21 +15424,22 @@ function skillSectionsAsResources(scope) {
15266
15424
  return out;
15267
15425
  };
15268
15426
  }
15269
- var MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, MAX_HUB_AS_CODE_PAGE_MANIFEST_CHARS, hubAsCodePagesSchema, MAX_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, HUB_AS_CODE_AGENT_TOOL_KEYS, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, flagEntriesOf, boundedHubAsCodeResourcesSchema, isPlainObject, MIN_SKILLS_LAYOUT_CLI, MAX_HUB_AS_CODE_DEPTH, NAMED_DEPTH_SEGMENTS, NAMED_DEPTH_KEY_CHARS, fieldName, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciDiffDirectionSchema, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, ciDiffResponseSchema, ciHubIdentitySchema, ciLookupResponseSchema, ciOrganizationsResponseSchema, ciCreateOrganizationResponseSchema, ciHubListItemSchema, ciHubListResponseSchema, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema, ciOrgResourcesPushResponseSchema;
15270
- var init_chunk_S24FZRPG = __esm({
15271
- "../../packages/core/dist/chunk-S24FZRPG.js"() {
15427
+ var MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, hubAsCodeKanbanFollowupSchema, hubAsCodeKanbanOutcomeSchema, hubAsCodeKanbanStatusSchema, hubAsCodeLaneSchema, hubAsCodePageSchema, MAX_HUB_AS_CODE_PAGE_MANIFEST_CHARS, hubAsCodePagesSchema, hubAsCodeCallOpeningSchema, hubAsCodeCallOpeningFileSchema, MAX_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, hubAsCodeEvaluationVariableSchema, hubAsCodeNativeToolSchema, hubAsCodeMcpToolSchema, hubAsCodeCustomToolSchema, hubAsCodeStateSchema, hubAsCodeTeamSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, hubAsCodeAgentResourceSchema, hubAsCodeDelegationToolSchema, hubAsCodeAgentSchema, HUB_AS_CODE_AGENT_KEYS, HUB_AS_CODE_AGENT_TOOL_KEYS, orgAsCodeResourceFolderSchema, orgAsCodeResourceSchema, orgResourcesPayloadSchema, hubAsCodeAutomationSchema, HUB_AS_CODE_AUTOMATION_KEYS, HUB_AS_CODE_AUTOMATION_TRIGGER_KEYS, HUB_AS_CODE_AUTOMATION_TARGET_KEYS, HUB_AS_CODE_AUTOMATION_ACTION_KEYS, HUB_AS_CODE_AUTOMATION_GATE_KEYS, hubAsCodeContactListSchema, HUB_AS_CODE_CONTACT_LIST_KEYS, HUB_AS_CODE_CONTACT_LIST_FILTER_KEYS, hubAsCodeEvalMessageFields, hubAsCodeHistoryTurnSchema, hubAsCodeEvalSchema, hubAsCodeEvalAttachmentFileSchema, hubAsCodeJourneyTurnSchema, hubAsCodeJourneyStepOverrideSchema, hubAsCodeJourneySchema, uuidPattern, ciUuidSchema, flagEntriesOf, boundedHubAsCodeResourcesSchema, isPlainObject, MIN_SKILLS_LAYOUT_CLI, MAX_HUB_AS_CODE_DEPTH, NAMED_DEPTH_SEGMENTS, NAMED_DEPTH_KEY_CHARS, fieldName, hubAsCodeConfigObjectSchema, hubAsCodeConfigSchema, hubAsCodeConnectionSchema, hubAsCodePayloadSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciDiffDirectionSchema, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, ciDiffResponseSchema, ciHubIdentitySchema, ciLookupResponseSchema, ciOrganizationsResponseSchema, ciCreateOrganizationResponseSchema, ciHubListItemSchema, ciHubListResponseSchema, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema, ciPublishResponseSchema, ciMcpDriftEntrySchema, ciSyncMcpResponseSchema, ciPublishPreviewResponseSchema, ciBranchInfoSchema, ciBranchListResponseSchema, ciBranchDeleteResponseSchema, ciOrgResourcesPullFileSchema, ciOrgResourcesPullFolderSchema, ciOrgResourcesPullResourceSchema, ciOrgResourcesPullResponseSchema, ciOrgResourcesPushResponseSchema;
15428
+ var init_chunk_JTG72ANZ = __esm({
15429
+ "../../packages/core/dist/chunk-JTG72ANZ.js"() {
15272
15430
  "use strict";
15273
15431
  init_chunk_QG3XMUEN();
15274
15432
  init_chunk_EBUWHIFV();
15275
15433
  init_chunk_5YZ3R7KF();
15276
- init_chunk_QMQGGR7Q();
15434
+ init_chunk_OLBDDBKV();
15277
15435
  init_chunk_LBDH7LCG();
15278
15436
  init_chunk_4LXDRTO4();
15279
- init_chunk_ARK3766Q();
15280
- init_chunk_X5PZZVTS();
15281
- init_chunk_PIZTARVG();
15437
+ init_chunk_25BLQS73();
15438
+ init_chunk_ZANBA4K4();
15439
+ init_chunk_QT7R3TGR();
15282
15440
  init_chunk_S4VDZ7PZ();
15283
15441
  init_chunk_ZDTX3DG5();
15442
+ init_chunk_JP7XIMUA();
15284
15443
  init_chunk_C2UEA2KW();
15285
15444
  init_chunk_FBV7NLKO();
15286
15445
  init_chunk_WEXVYJ5H();
@@ -15296,6 +15455,92 @@ var init_chunk_S24FZRPG = __esm({
15296
15455
  MAX_HUB_AS_CODE_RESOURCE_FILES = 5e3;
15297
15456
  MAX_RESOURCE_AGGREGATE_ENCODED_BYTES = 32 * 1024 * 1024;
15298
15457
  MAX_CI_CONFIG_BODY_BYTES = 64 * 1024 * 1024;
15458
+ hubAsCodeKanbanFollowupSchema = external_exports.object({
15459
+ id: external_exports.string().optional(),
15460
+ order: external_exports.number(),
15461
+ type: followupTypeSchema,
15462
+ threshold: external_exports.number(),
15463
+ timeUnit: followupTimeUnitSchema,
15464
+ instructions: external_exports.string(),
15465
+ excludedWeekDays: external_exports.array(external_exports.number()).optional(),
15466
+ excludeHolidays: external_exports.boolean().optional(),
15467
+ excludedTimeStart: external_exports.string().optional(),
15468
+ excludedTimeEnd: external_exports.string().optional(),
15469
+ /** 'agent_generated' (default) feeds `instructions` to the LLM; 'direct' sends `direct_text` verbatim. */
15470
+ delivery_mode: external_exports.enum(["agent_generated", "direct"]).optional(),
15471
+ /** Verbatim user-facing text. Required when `delivery_mode='direct'`. */
15472
+ direct_text: external_exports.string().optional(),
15473
+ /** Approved Meta WhatsApp template id; consulted only outside the WA 24h window. */
15474
+ template_whatsapp_id: external_exports.string().nullable().optional(),
15475
+ /** Default `'route_to_team'` when omitted. Only consulted on `direct` mode + windowed channels outside the window. */
15476
+ outside_window_policy: external_exports.enum(["route_to_team", "skip"]).optional(),
15477
+ /** Default true — followup turn includes tool schemas. Set to false to strip them and save tokens. No effect on `direct` mode. */
15478
+ include_tools: external_exports.boolean().optional(),
15479
+ /** `inactivity_after_before_event` only: the `id` of the `before_event` followup in
15480
+ * this status whose fire anchors this chain. */
15481
+ after_followup_id: external_exports.string().optional()
15482
+ });
15483
+ hubAsCodeKanbanOutcomeSchema = external_exports.object({
15484
+ slug: external_exports.string(),
15485
+ name: external_exports.string(),
15486
+ color: external_exports.string().optional(),
15487
+ from_statuses: external_exports.array(external_exports.string()).optional()
15488
+ });
15489
+ hubAsCodeKanbanStatusSchema = external_exports.object({
15490
+ /** Stable identifier — set once at create, never edited. Lowercase slug, used in
15491
+ * `conversation.kanban_status`, ClickHouse `data.meta.kanban_status`, tool params,
15492
+ * and `allowed_next_statuses` references. */
15493
+ slug: external_exports.string(),
15494
+ /** Display label — shown in UI and tool descriptions. Freely editable. */
15495
+ name: external_exports.string(),
15496
+ order: external_exports.number().optional(),
15497
+ color: external_exports.string().optional(),
15498
+ isInitialStatus: external_exports.boolean().optional(),
15499
+ triggersAgentResponse: external_exports.boolean().optional(),
15500
+ allowsAgentUpdate: external_exports.boolean().optional(),
15501
+ isTerminalStatus: external_exports.boolean().optional(),
15502
+ isSchedulingStatus: external_exports.boolean().optional(),
15503
+ eventName: external_exports.string().optional(),
15504
+ /** Minutes after the scheduled event date at which the conversation is flagged
15505
+ * `event_due` for the support team. Scheduling statuses only. */
15506
+ event_due_delay_minutes: external_exports.number().optional(),
15507
+ /** Template prose injected into the agent turn on transition. Supports
15508
+ * `{{path.to.field}}` placeholders (dotted, whitespace-tolerant) and the
15509
+ * reserved `{{additional_data}}` placeholder which expands to the full
15510
+ * payload as 2-space-indented JSON. */
15511
+ additional_instructions: external_exports.string().optional(),
15512
+ /** JSON Schema (Draft 2020-12) defining the form fields collected at
15513
+ * transition time. The collected payload is interpolated into
15514
+ * `additional_instructions` and emitted to the agent as a
15515
+ * `<system_additional_instructions>` block. Top-level property name
15516
+ * `additional_data` is reserved (collides with the dump placeholder).
15517
+ * Capped at 16 KB when JSON-serialized. */
15518
+ additional_context_schema: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
15519
+ followups: external_exports.array(hubAsCodeKanbanFollowupSchema).optional(),
15520
+ /** Slugs this status can transition to. `undefined` = unrestricted (any next).
15521
+ * Empty array is rejected by the validator — use `isTerminalStatus: true` for
15522
+ * no outbound transitions. */
15523
+ allowed_next_statuses: external_exports.array(external_exports.string()).optional(),
15524
+ /** Optional presentational lane this status belongs to (slug of a hub `lanes[]`
15525
+ * entry). Board-grouping only; not a transition constraint, not agent-visible.
15526
+ * The initial status must not set this. */
15527
+ lane_slug: external_exports.string().optional(),
15528
+ /** Closing outcomes offered when a conversation enters this status. Only valid
15529
+ * on the terminal status (`isTerminalStatus: true`); rejected elsewhere. When
15530
+ * present, choosing one is required on the terminal transition, and the chosen
15531
+ * slug is stored on the conversation and ingested to ClickHouse `data.meta.outcome`. */
15532
+ outcomes: external_exports.array(hubAsCodeKanbanOutcomeSchema).optional()
15533
+ });
15534
+ hubAsCodeLaneSchema = external_exports.object({
15535
+ slug: external_exports.string(),
15536
+ name: external_exports.string(),
15537
+ color: external_exports.string().optional(),
15538
+ order: external_exports.number().optional()
15539
+ });
15540
+ hubAsCodePageSchema = external_exports.object({
15541
+ manifest: external_exports.record(external_exports.string(), external_exports.unknown()),
15542
+ html: external_exports.string()
15543
+ });
15299
15544
  MAX_HUB_AS_CODE_PAGE_MANIFEST_CHARS = 64 * 1024;
15300
15545
  hubAsCodePagesSchema = external_exports.array(external_exports.object({
15301
15546
  manifest: external_exports.record(external_exports.unknown()).superRefine((manifest, ctx) => {
@@ -15305,14 +15550,101 @@ var init_chunk_S24FZRPG = __esm({
15305
15550
  }),
15306
15551
  html: external_exports.string().max(PAGE_HTML_MAX_BYTES, `a page's HTML is at most ${PAGE_HTML_MAX_BYTES / 1024} KiB`)
15307
15552
  }).strict()).max(PAGES_PER_HUB_MAX, `a hub holds at most ${PAGES_PER_HUB_MAX} pages`);
15553
+ hubAsCodeCallOpeningSchema = external_exports.object({
15554
+ hash: external_exports.string().optional(),
15555
+ file: external_exports.string().optional(),
15556
+ caption: external_exports.string()
15557
+ });
15558
+ hubAsCodeCallOpeningFileSchema = external_exports.object({
15559
+ hash: external_exports.string(),
15560
+ content_base64: external_exports.string().optional(),
15561
+ // push only
15562
+ download_url: external_exports.string().optional(),
15563
+ // pull only (signed R2 URL)
15564
+ content_type: external_exports.string().optional()
15565
+ // pull only: `audio/mpeg` or `audio/mp4`, which names the local file
15566
+ });
15308
15567
  MAX_CALL_OPENING_CARRIERS = 30;
15309
15568
  MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES = 8 * 1024 * 1024;
15310
- HUB_AS_CODE_AGENT_TOOL_KEYS = [
15311
- "native",
15312
- "delegation",
15313
- "custom",
15314
- "mcp"
15315
- ];
15569
+ hubAsCodeEvaluationVariableSchema = external_exports.object({
15570
+ /** Variable name the agent writes — unique within the agent. Required. */
15571
+ name: external_exports.string(),
15572
+ /** 'string' (default) | 'number' | 'boolean' | 'integer' | 'enum'. */
15573
+ type: external_exports.string().optional(),
15574
+ description: external_exports.string().optional(),
15575
+ /** Human-facing display label (Analytics columns, UI). */
15576
+ label: external_exports.string().optional(),
15577
+ /** Allowed values when `type: enum`. Ignored for other types. */
15578
+ enum: external_exports.array(external_exports.string()).optional(),
15579
+ /** Defaults to true when omitted (mirrors the UI's new-variable default). */
15580
+ required: external_exports.boolean().optional(),
15581
+ /**
15582
+ * Analytics grouping. Conventional values: quality | satisfaction |
15583
+ * compliance | categorization. Free-form to preserve system-internal
15584
+ * markers (e.g. `eval` on message-evaluator defaults) across round-trips.
15585
+ */
15586
+ category: external_exports.string().nullable().optional(),
15587
+ /**
15588
+ * Marks the rolling conversation-summary field. Only honored for
15589
+ * `type: string`; coerced to false otherwise.
15590
+ */
15591
+ is_summary: external_exports.boolean().optional()
15592
+ });
15593
+ hubAsCodeNativeToolSchema = external_exports.object({
15594
+ id: external_exports.string().optional(),
15595
+ name: external_exports.string(),
15596
+ keep_in_history: external_exports.boolean().optional(),
15597
+ expose_schema_to_llm: external_exports.boolean().optional(),
15598
+ /**
15599
+ * Whether the tool runs. A pull writes it only as `false`. Omitted leaves the row as it is, unlike a
15600
+ * custom tool's: a file pulled before a pull wrote this key holds none on a row that is off.
15601
+ */
15602
+ enabled: external_exports.boolean().optional()
15603
+ });
15604
+ hubAsCodeMcpToolSchema = external_exports.object({
15605
+ id: external_exports.string().optional(),
15606
+ name: external_exports.string(),
15607
+ connection: external_exports.string().optional(),
15608
+ connection_id: external_exports.string().optional(),
15609
+ /** As {@link HubAsCodeNativeTool}'s `enabled`. */
15610
+ enabled: external_exports.boolean().optional()
15611
+ });
15612
+ hubAsCodeCustomToolSchema = external_exports.object({
15613
+ id: external_exports.string().optional(),
15614
+ name: external_exports.string(),
15615
+ description: external_exports.string().optional(),
15616
+ method: external_exports.string().optional(),
15617
+ path: external_exports.string().optional(),
15618
+ body_format: external_exports.string().optional(),
15619
+ connection: external_exports.string().optional(),
15620
+ connection_id: external_exports.string().optional(),
15621
+ headers: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
15622
+ query_params: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
15623
+ body_params: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
15624
+ /**
15625
+ * The OpenAI function schema (`tool_config`). A pull answers it as stored, so a row a write stored as
15626
+ * JSON text holding the object comes back as that text (`customToolConfigObject` reads it).
15627
+ */
15628
+ config: external_exports.union([external_exports.record(external_exports.string(), external_exports.unknown()), external_exports.string()]).optional(),
15629
+ keep_in_history: external_exports.boolean().optional(),
15630
+ // default false; controls whether tool call+result remain in LLM history
15631
+ instructions: external_exports.string().optional(),
15632
+ composed_tools: external_exports.array(external_exports.object({
15633
+ tool_name: external_exports.string(),
15634
+ mappings: external_exports.record(external_exports.string(), external_exports.union([
15635
+ external_exports.string(),
15636
+ external_exports.object({ source: external_exports.string(), type: external_exports.string().optional(), description: external_exports.string().optional() })
15637
+ ])),
15638
+ appended_description: external_exports.string().optional(),
15639
+ success_path: external_exports.string().optional()
15640
+ })).nullable().optional(),
15641
+ enabled: external_exports.boolean().optional(),
15642
+ expose_schema_to_llm: external_exports.boolean().optional(),
15643
+ /** The hub's replay settings on the tool (wayai#5083; `withToolReplaySettings`). Absent: unset. */
15644
+ replay_override: external_exports.enum(REPLAY_OVERRIDES).optional(),
15645
+ idempotency_header: external_exports.string().optional(),
15646
+ irreversible: external_exports.boolean().optional()
15647
+ });
15316
15648
  hubAsCodeStateSchema = external_exports.object({
15317
15649
  id: external_exports.string().min(1).optional(),
15318
15650
  slug: external_exports.string().optional(),
@@ -15324,6 +15656,16 @@ var init_chunk_S24FZRPG = __esm({
15324
15656
  json_schema: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
15325
15657
  initial_value: external_exports.record(external_exports.string(), external_exports.unknown()).nullable().optional()
15326
15658
  }).passthrough();
15659
+ hubAsCodeTeamSchema = external_exports.object({
15660
+ id: external_exports.string().optional(),
15661
+ // hub_team_id (stable, set by pull)
15662
+ name: external_exports.string(),
15663
+ // team_name
15664
+ access_rule: external_exports.enum(["anytime", "anytime_if_delegated_once", "only_while_delegated"]).optional(),
15665
+ initial_team: external_exports.boolean().optional(),
15666
+ display_only_if_claimed: external_exports.boolean().optional()
15667
+ // conversation_display_only_if_claimed
15668
+ });
15327
15669
  hubAsCodeResourceFileSchema = external_exports.object({
15328
15670
  id: external_exports.string().min(1).optional(),
15329
15671
  // resource_file_id (stable, set by pull)
@@ -15355,6 +15697,380 @@ var init_chunk_S24FZRPG = __esm({
15355
15697
  // skill-only; auto-derived when omitted
15356
15698
  files: external_exports.array(hubAsCodeResourceFileSchema).optional()
15357
15699
  }).passthrough();
15700
+ hubAsCodeAgentResourceSchema = external_exports.object({
15701
+ name: external_exports.string(),
15702
+ // resource display name
15703
+ resource_id: external_exports.string().optional(),
15704
+ // stable ID
15705
+ priority: external_exports.number().optional(),
15706
+ enabled: external_exports.boolean().optional(),
15707
+ // `include_structure_in_prompt` was removed here in PR 5 — structure is now
15708
+ // asked for per call with `{{files('tree')}}`. `hubAsCodeConfigSchema` is
15709
+ // `.passthrough()`, so YAML pulled before that still parses; the diff engine
15710
+ // simply ignores the key.
15711
+ use_native_integration: external_exports.boolean().optional()
15712
+ // skill-only: tool-based (false) vs provider-native (true)
15713
+ // `write_enabled` was retired with knowledge (wayai-pro/wayai#5142 step 5 C1); YAML pulled before
15714
+ // that still parses (passthrough), and the diff engine ignores the key.
15715
+ });
15716
+ hubAsCodeDelegationToolSchema = external_exports.object({
15717
+ id: external_exports.string().optional(),
15718
+ type: external_exports.string(),
15719
+ tool: external_exports.string(),
15720
+ target: external_exports.string(),
15721
+ target_id: external_exports.string().optional(),
15722
+ /** Only for `type: 'hub'` (`delegate_to_hub`, H1.5) — the admin's
15723
+ * data-boundary choice (`instruction` | `summary` | `transcript`). */
15724
+ context_boundary: external_exports.string().optional(),
15725
+ /** Only for `tool: start_consult_thread` (H1.7b) — the EXPLICIT
15726
+ * consultant→consultant chain opt-in. Chains are off by default. */
15727
+ allow_consultant_chain: external_exports.boolean().optional(),
15728
+ /** As {@link HubAsCodeNativeTool}'s `enabled`. */
15729
+ enabled: external_exports.boolean().optional()
15730
+ });
15731
+ hubAsCodeAgentSchema = external_exports.object({
15732
+ id: external_exports.string().optional(),
15733
+ name: external_exports.string(),
15734
+ role: external_exports.string(),
15735
+ /** The connection's name. `null` for an agent whose row stores none (`declaresNoConnection`): a pull writes it. */
15736
+ connection: external_exports.string().nullable(),
15737
+ /** The connection's id; `null` beside a `null` connection on a pull. */
15738
+ connection_id: external_exports.string().nullable().optional(),
15739
+ instructions: external_exports.string().optional(),
15740
+ additional_context_template: external_exports.string().optional(),
15741
+ enabled: external_exports.boolean().optional(),
15742
+ include_message_timestamps: external_exports.boolean().optional(),
15743
+ settings: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
15744
+ response_format: external_exports.object({
15745
+ type: external_exports.string(),
15746
+ schema_name: external_exports.string(),
15747
+ schema_json: external_exports.record(external_exports.string(), external_exports.unknown())
15748
+ }).optional(),
15749
+ tools: external_exports.object({
15750
+ native: external_exports.array(external_exports.union([external_exports.string(), hubAsCodeNativeToolSchema])).optional(),
15751
+ delegation: external_exports.array(hubAsCodeDelegationToolSchema).optional(),
15752
+ custom: external_exports.array(hubAsCodeCustomToolSchema).optional(),
15753
+ /**
15754
+ * MCP tools discovered from an MCP Server connection, assigned to this agent.
15755
+ * Identity key is `(connection, name)` (an MCP tool name is unique per server).
15756
+ *
15757
+ * **Omitted vs present (mirrors `evaluation_variables`):** when the `mcp` key
15758
+ * is OMITTED, existing MCP tool rows on the agent are left untouched (so tools
15759
+ * assigned in the Platform UI survive a push that doesn't manage them). When
15760
+ * PRESENT (even as `[]`), the list is AUTHORITATIVE — listed-but-missing tools
15761
+ * are created, unlisted MCP tools are removed, matched ones kept. This differs
15762
+ * from `native`/`custom` (whose absence deletes them) because MCP tools are
15763
+ * dual-origin (UI + GitOps).
15764
+ *
15765
+ * Push discovers the connection's tools on demand (equivalent to the UI's
15766
+ * "Sync MCP tools" action), so a single push can create the connection AND
15767
+ * assign its tools — the MCP server must be reachable.
15768
+ */
15769
+ mcp: external_exports.array(hubAsCodeMcpToolSchema).optional()
15770
+ }).optional(),
15771
+ resources: external_exports.array(hubAsCodeAgentResourceSchema).optional(),
15772
+ /**
15773
+ * Evaluation variables (a.k.a. agent parameters) — the structured fields an
15774
+ * evaluator agent writes per conversation/message. Round-trippable via
15775
+ * pull/push. Identity key is `name` (unique per agent). When the key is
15776
+ * OMITTED from YAML, existing variables are left untouched; when PRESENT
15777
+ * (even as `[]`), the list is treated as authoritative and replaces the
15778
+ * agent's current variables. Primarily used by `conversation_evaluator` /
15779
+ * `message_evaluator` agents.
15780
+ */
15781
+ evaluation_variables: external_exports.array(hubAsCodeEvaluationVariableSchema).optional(),
15782
+ /**
15783
+ * Conversation-flagging conditions evaluated post-close (OR semantics). A true
15784
+ * agent parameter on the `conversation_evaluator` agent (relocated from the hub
15785
+ * section). Round-trippable via pull/push. Meaningful only on the
15786
+ * `conversation_evaluator` agent; ignored elsewhere.
15787
+ */
15788
+ flag_conditions: external_exports.array(flagConditionSchema).optional(),
15789
+ /**
15790
+ * Token threshold that fires the rolling summarizer (effective tokens =
15791
+ * input + cache_read + cache_creation; default 120000). A true agent parameter
15792
+ * on the `summarizer` agent (relocated from the hub section). Round-trippable via
15793
+ * pull/push. Meaningful only on the `summarizer` agent; ignored elsewhere.
15794
+ */
15795
+ summarization_threshold_tokens: external_exports.number().optional(),
15796
+ /**
15797
+ * How many of the user's most recent ended conversations this agent receives as
15798
+ * context, injected into the conversation's first user message and frozen there for
15799
+ * the life of that conversation. `0` = off; bounded by `PREVIOUS_CONVERSATIONS_MAX`.
15800
+ * Ignored on background roles (monitor, evaluators, summarizer), which never address
15801
+ * the end user.
15802
+ *
15803
+ * Round-trippable via pull/push with the same patch semantics as every other optional
15804
+ * agent key: absent on CREATE is off, absent on UPDATE leaves the stored value alone,
15805
+ * and `0` is what clears one.
15806
+ */
15807
+ previous_conversations_count: external_exports.number().optional(),
15808
+ /**
15809
+ * Monitor scheduling + flagging config. A true agent parameter on the `monitor`
15810
+ * agent (relocated from the hub section). Round-trippable via pull/push.
15811
+ * Meaningful only on the `monitor` agent; ignored elsewhere.
15812
+ *
15813
+ * `trigger` says WHEN the monitor runs and defaults to `idle` when absent.
15814
+ * `delay_seconds` describes the `idle` fire alone, so it is required exactly
15815
+ * when the effective trigger is `idle`, and floored at
15816
+ * `MONITOR_DELAY_SECONDS_MIN` — both enforced by
15817
+ * `refineHubAsCodeMonitorConfig` and the apply/diff normalization, because
15818
+ * agents carry no Zod object schema on this path.
15819
+ *
15820
+ * Any object, typed `MonitorConfig`: a pull answers the column as stored, which may carry keys
15821
+ * that type does not name (`monitorConfigField` is `.passthrough()`).
15822
+ */
15823
+ monitor_config: external_exports.custom((value) => isPlainObject(value)).nullable().optional(),
15824
+ /**
15825
+ * The voice agent's own call openings, by language (`agent.call_openings`, gh #4418):
15826
+ * meaningful only on a `pilot_voice` agent. A language left out plays the platform's
15827
+ * opening. Round-trippable via pull/push. **Omitted vs present (mirrors
15828
+ * `evaluation_variables`):** OMITTED leaves the stored openings alone, so openings set in
15829
+ * the web editor survive a push that doesn't manage them; PRESENT (even `{}` or `null`) is
15830
+ * authoritative — every language it lists is set, and every other one is cleared.
15831
+ */
15832
+ call_openings: external_exports.record(callOpeningLanguage, hubAsCodeCallOpeningSchema).nullable().optional(),
15833
+ /**
15834
+ * The agent's access values (`agent.access_values`, wayai#5358): per dimension of the org, the
15835
+ * value ids it may read and write, checked against the org's dimensions on push, which narrow its turns
15836
+ * on the record types that enforce a dimension. **Omitted vs present (mirrors `call_openings`):** OMITTED leaves the stored
15837
+ * values alone; `null` clears them, so the agent narrows nothing; an object replaces them whole.
15838
+ * Changing them takes `hub:admin` on the hub, and an agent holding them that can run code must use
15839
+ * its own sandbox (`sandbox_scope: agent`). A pull answers them as held, `$person` included.
15840
+ */
15841
+ access_values: heldAccessAssignmentSchema.nullable().optional()
15842
+ });
15843
+ HUB_AS_CODE_AGENT_KEYS = hubAsCodeAgentSchema.keyof().options;
15844
+ HUB_AS_CODE_AGENT_TOOL_KEYS = hubAsCodeAgentSchema.shape.tools.unwrap().keyof().options;
15845
+ orgAsCodeResourceFolderSchema = external_exports.object({
15846
+ id: external_exports.string().min(1).optional(),
15847
+ // org_resource_folder_id (stable, set by pull)
15848
+ path: external_exports.string(),
15849
+ // folder path relative to resource root, e.g. "docs/guides"
15850
+ description: external_exports.string().optional()
15851
+ // folder_description
15852
+ });
15853
+ orgAsCodeResourceSchema = external_exports.object({
15854
+ id: external_exports.string().min(1).optional(),
15855
+ // org_resource_id (stable, set by pull)
15856
+ name: external_exports.string(),
15857
+ description: external_exports.string().optional(),
15858
+ enabled: external_exports.boolean().optional(),
15859
+ // No `user_browsable` (retired, wayai#4710): the org config schema passes it through
15860
+ // like the hub one, and the org diff and apply ignore it.
15861
+ skill_name: external_exports.string().optional(),
15862
+ // skill-only: slugified unique name (auto-derived from name if omitted)
15863
+ environment: external_exports.enum(["all", "preview", "production"]).optional(),
15864
+ // which hub environments may link this resource
15865
+ tags: external_exports.array(external_exports.string()).optional(),
15866
+ // org_tag UUIDs gating hub eligibility
15867
+ folders: external_exports.array(orgAsCodeResourceFolderSchema).optional(),
15868
+ // explicit folders (preserves empty/described folders)
15869
+ files: external_exports.array(hubAsCodeResourceFileSchema).optional()
15870
+ // identical shape to hub resource files
15871
+ });
15872
+ orgResourcesPayloadSchema = external_exports.object({
15873
+ version: external_exports.literal(1),
15874
+ organization_id: external_exports.string().optional(),
15875
+ resources: external_exports.array(orgAsCodeResourceSchema).optional()
15876
+ });
15877
+ hubAsCodeAutomationSchema = external_exports.object({
15878
+ id: external_exports.string().optional(),
15879
+ name: external_exports.string(),
15880
+ description: external_exports.string().optional(),
15881
+ purpose: external_exports.string().optional(),
15882
+ // marketing | operational; absent is marketing (`AUTOMATION_PURPOSES`)
15883
+ enabled: external_exports.boolean().optional(),
15884
+ trigger: external_exports.object({
15885
+ type: external_exports.string(),
15886
+ cron: external_exports.string().optional(),
15887
+ timezone: external_exports.string().optional(),
15888
+ event: external_exports.string().optional(),
15889
+ // an `event` trigger's event (`AUTOMATION_EVENT_TYPES`)
15890
+ source_hub: external_exports.string().optional(),
15891
+ // the production hub (id) whose events it listens to; absent: this hub's
15892
+ auth: external_exports.string().optional(),
15893
+ // webhook: hmac | static_header (`AUTOMATION_WEBHOOK_AUTHS`)
15894
+ header: external_exports.string().optional()
15895
+ // webhook, static_header: the header that carries the secret
15896
+ }),
15897
+ target: external_exports.object({
15898
+ type: external_exports.string(),
15899
+ list: external_exports.string().optional(),
15900
+ // hub contact list name (this hub's `contact_lists:`)
15901
+ org_list: external_exports.string().optional()
15902
+ // org contact list name (the org contact book's, never the hub's)
15903
+ }),
15904
+ action: external_exports.object({
15905
+ type: external_exports.string(),
15906
+ channel: external_exports.string().optional(),
15907
+ connection: external_exports.string().optional(),
15908
+ // connection display name
15909
+ connection_id: external_exports.string().optional(),
15910
+ template: external_exports.string().optional(),
15911
+ // WhatsApp template name, on the action's connection
15912
+ template_id: external_exports.string().optional(),
15913
+ text: external_exports.string().optional(),
15914
+ agent: external_exports.string().optional(),
15915
+ // agent name
15916
+ agent_id: external_exports.string().optional(),
15917
+ instructions: external_exports.string().optional()
15918
+ }),
15919
+ gate: external_exports.object({
15920
+ monitor: external_exports.string()
15921
+ }).nullable().optional()
15922
+ });
15923
+ HUB_AS_CODE_AUTOMATION_KEYS = hubAsCodeAutomationSchema.keyof().options;
15924
+ HUB_AS_CODE_AUTOMATION_TRIGGER_KEYS = hubAsCodeAutomationSchema.shape.trigger.keyof().options;
15925
+ HUB_AS_CODE_AUTOMATION_TARGET_KEYS = hubAsCodeAutomationSchema.shape.target.keyof().options;
15926
+ HUB_AS_CODE_AUTOMATION_ACTION_KEYS = hubAsCodeAutomationSchema.shape.action.keyof().options;
15927
+ HUB_AS_CODE_AUTOMATION_GATE_KEYS = hubAsCodeAutomationSchema.shape.gate.unwrap().unwrap().keyof().options;
15928
+ hubAsCodeContactListSchema = external_exports.object({
15929
+ id: external_exports.string().optional(),
15930
+ name: external_exports.string(),
15931
+ description: external_exports.string().optional(),
15932
+ filter: external_exports.object({
15933
+ labels: external_exports.array(external_exports.string()).optional(),
15934
+ scope_tags: external_exports.array(external_exports.string()).optional()
15935
+ // org tag names
15936
+ })
15937
+ });
15938
+ HUB_AS_CODE_CONTACT_LIST_KEYS = hubAsCodeContactListSchema.keyof().options;
15939
+ HUB_AS_CODE_CONTACT_LIST_FILTER_KEYS = hubAsCodeContactListSchema.shape.filter.keyof().options;
15940
+ hubAsCodeEvalMessageFields = {
15941
+ role: external_exports.string(),
15942
+ content: external_exports.string().nullable().optional(),
15943
+ tool_calls: external_exports.unknown().optional()
15944
+ };
15945
+ hubAsCodeHistoryTurnSchema = external_exports.object({
15946
+ ...hubAsCodeEvalMessageFields,
15947
+ tool_call_id: external_exports.string().optional(),
15948
+ /** User-turn-only file references — see `EvalAttachmentRef` (gh #3365). */
15949
+ attachments: external_exports.array(evalAttachmentRef).optional()
15950
+ });
15951
+ hubAsCodeEvalSchema = external_exports.object({
15952
+ id: external_exports.string().optional(),
15953
+ name: external_exports.string(),
15954
+ path: external_exports.string().nullable().optional(),
15955
+ agent: external_exports.string(),
15956
+ // agent display name
15957
+ agent_id: external_exports.string().optional(),
15958
+ // stable agent UUID
15959
+ runs: external_exports.number().optional(),
15960
+ // default 1
15961
+ enabled: external_exports.boolean().optional(),
15962
+ // default true
15963
+ history: external_exports.array(hubAsCodeHistoryTurnSchema).optional(),
15964
+ input: external_exports.object({ ...hubAsCodeEvalMessageFields, attachments: external_exports.array(evalAttachmentRef).optional() }),
15965
+ expected: external_exports.object(hubAsCodeEvalMessageFields),
15966
+ evaluator_instructions: external_exports.string().optional(),
15967
+ /**
15968
+ * Per-run variables (gh #3007): a map of author-provided arrays. Run i of
15969
+ * `runs` resolves `{{var(NAME)}}` / `{{var(NAME).field}}` in input/history/
15970
+ * expected/evaluator_instructions against `variables.NAME[i-1]`, so a
15971
+ * data-mutating eval leases a disjoint fixture per run. Each array MUST cover
15972
+ * `runs` (validated at run-launch). Values may be objects (one index → a
15973
+ * coherent bundle).
15974
+ */
15975
+ variables: external_exports.record(external_exports.string(), external_exports.array(external_exports.unknown())).optional(),
15976
+ /**
15977
+ * Eval-session seed fixture (gh #3090): the named Rekor fixture this scenario's
15978
+ * set depends on. At run-start `run-eval` resets it before the session and
15979
+ * clears it after (try/finally). All enabled scenarios in a set MUST agree on
15980
+ * one fixture (2+ distinct → the run is rejected). Absent → no seeding (today's
15981
+ * behavior). Pairs with `variables` for parallel-safe MUTATING evals.
15982
+ */
15983
+ fixture: external_exports.string().optional(),
15984
+ /**
15985
+ * The Rekor base the fixture is seeded against (gh #3090). REQUIRED whenever
15986
+ * `fixture` is declared: the hub seed connection supplies the API origin +
15987
+ * token, this supplies the base. A `fixture` with no `target_base` resolves to
15988
+ * `incomplete_seed_config` (`resolveEvalFixtureTarget`) and aborts the session
15989
+ * with `fixture_seed_failed` (no runs scored) — there is no derived-base
15990
+ * fallback. Must agree across a set, same as `fixture`.
15991
+ */
15992
+ target_base: external_exports.string().optional(),
15993
+ /**
15994
+ * User-scope state to seed before this scenario's trigger runs (gh #3430). Each
15995
+ * entry `{ slug, scope: 'user', value }` writes `value` to an EXISTING user-scope
15996
+ * state definition (`slug`) for the eval's synthetic per-run user, so behavior that
15997
+ * depends on memory of prior conversations (a recurring-user shortcut, a "confirmed"
15998
+ * flag) is testable. Isolated + torn down per session, like `fixture`. A slug the
15999
+ * hub doesn't define, or a value its `json_schema` rejects, degrades the run with a
16000
+ * warning — it never poisons shared state.
16001
+ */
16002
+ initial_state: external_exports.array(external_exports.object({
16003
+ slug: external_exports.string(),
16004
+ scope: external_exports.enum(EVAL_INITIAL_STATE_SCOPES).optional(),
16005
+ value: external_exports.record(external_exports.string(), external_exports.unknown())
16006
+ })).optional(),
16007
+ /**
16008
+ * The persons this scenario's runs are for (wayai-pro/wayai#5473 2-eval): person ids or contact ids, named by
16009
+ * every Base Toolset call of a run as its customer. Honoured on a preview hub only; a production hub's eval
16010
+ * names none. See `evalPersonSchema`. Its retired alias `customer_contact_id` is refused on push, diff and sync
16011
+ * (`evalPersonIssue`, #5473 3c).
16012
+ */
16013
+ person: external_exports.array(external_exports.string()).nullable().optional()
16014
+ });
16015
+ hubAsCodeEvalAttachmentFileSchema = external_exports.object({
16016
+ hash: external_exports.string(),
16017
+ content_base64: external_exports.string().optional(),
16018
+ // push only
16019
+ download_url: external_exports.string().optional(),
16020
+ // pull only (signed R2 URL)
16021
+ file_name: external_exports.string().optional(),
16022
+ mime_type: external_exports.string().optional(),
16023
+ file_size: external_exports.number().optional()
16024
+ });
16025
+ hubAsCodeJourneyTurnSchema = hubAsCodeHistoryTurnSchema.extend({
16026
+ step_id: external_exports.string().optional()
16027
+ });
16028
+ hubAsCodeJourneyStepOverrideSchema = external_exports.object({
16029
+ runs: external_exports.number().optional(),
16030
+ evaluator_instructions: external_exports.string().nullable().optional()
16031
+ });
16032
+ hubAsCodeJourneySchema = external_exports.object({
16033
+ id: external_exports.string().optional(),
16034
+ // journey_id (stable, set by pull; primary match key)
16035
+ name: external_exports.string(),
16036
+ // journey_name
16037
+ agent: external_exports.string(),
16038
+ // responder_agent_id, resolved by display name
16039
+ agent_id: external_exports.string().optional(),
16040
+ // stable agent UUID
16041
+ enabled: external_exports.boolean().optional(),
16042
+ // default true
16043
+ evaluator_instructions: external_exports.string().optional(),
16044
+ transcript: external_exports.array(hubAsCodeJourneyTurnSchema).optional(),
16045
+ /** Per-step overrides keyed by `step_id`. */
16046
+ step_config: external_exports.record(external_exports.string(), hubAsCodeJourneyStepOverrideSchema).optional(),
16047
+ /**
16048
+ * Per-run variables (gh #3007): a map of author-provided arrays, propagated to
16049
+ * every derived step eval. Run i of the whole journey resolves `{{var(NAME)}}`
16050
+ * against `variables.NAME[i-1]`, so the journey run leases one coherent fixture.
16051
+ * Each array MUST cover the step's `runs` (validated at run-launch).
16052
+ */
16053
+ variables: external_exports.record(external_exports.string(), external_exports.array(external_exports.unknown())).optional(),
16054
+ /**
16055
+ * The persons this journey's steps are for (#5473 2-eval; a journey's by owner decision 141): propagated to
16056
+ * every derived step eval as `variables` is, so each step's runs name them as a scenario's do
16057
+ * (`HubAsCodeEval.person`). Honoured on a preview hub only; its retired alias is refused as a scenario's is.
16058
+ */
16059
+ person: external_exports.array(external_exports.string()).nullable().optional(),
16060
+ /**
16061
+ * Eval-session seed fixture (gh #3090): the named Rekor fixture this journey
16062
+ * depends on. A journey owns its managed set, so this is the set-level fixture —
16063
+ * reset before / cleared after the journey run (try/finally). Absent → no
16064
+ * seeding. Pairs with `variables` for parallel-safe MUTATING journeys.
16065
+ */
16066
+ fixture: external_exports.string().optional(),
16067
+ /**
16068
+ * The Rekor base the fixture is seeded against — REQUIRED alongside `fixture`
16069
+ * (absence aborts the run with `fixture_seed_failed`). See
16070
+ * `HubAsCodeEval.target_base`.
16071
+ */
16072
+ target_base: external_exports.string().optional()
16073
+ });
15358
16074
  uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
15359
16075
  ciUuidSchema = external_exports.string().regex(uuidPattern, "must be a valid UUID");
15360
16076
  flagEntriesOf = (list2) => Array.isArray(list2) ? list2.map((entry) => entry ?? {}) : [];
@@ -15393,10 +16109,7 @@ var init_chunk_S24FZRPG = __esm({
15393
16109
  (name, key) => typeof key === "number" ? `${name}[${key}]` : name ? `${name}.${key}` : key,
15394
16110
  ""
15395
16111
  );
15396
- hubAsCodeConfigSchema = external_exports.preprocess((config, ctx) => {
15397
- if (refusedNesting(config, [], ctx) || refusedStringConfigNesting(config, ctx) || refusedUnreadableSection(config, ctx)) return config;
15398
- return skillSectionsAsResources("hub")(config, ctx);
15399
- }, external_exports.object({
16112
+ hubAsCodeConfigObjectSchema = external_exports.object({
15400
16113
  version: external_exports.literal(1),
15401
16114
  hub: external_exports.object({
15402
16115
  name: external_exports.string().min(1, "config.hub.name is required"),
@@ -15406,7 +16119,11 @@ var init_chunk_S24FZRPG = __esm({
15406
16119
  states: external_exports.array(hubAsCodeStateSchema).optional(),
15407
16120
  resources: boundedHubAsCodeResourcesSchema.optional(),
15408
16121
  pages: hubAsCodePagesSchema.optional()
15409
- }).passthrough().superRefine((config, ctx) => {
16122
+ }).passthrough();
16123
+ hubAsCodeConfigSchema = external_exports.preprocess((config, ctx) => {
16124
+ if (refusedNesting(config, [], ctx) || refusedStringConfigNesting(config, ctx) || refusedUnreadableSection(config, ctx)) return config;
16125
+ return skillSectionsAsResources("hub")(config, ctx);
16126
+ }, hubAsCodeConfigObjectSchema.superRefine((config, ctx) => {
15410
16127
  refineHubAsCodeCustomTools(config, ctx);
15411
16128
  refineHubAsCodeKanbanStatuses(config, ctx);
15412
16129
  refineHubAsCodeLanes(config, ctx);
@@ -15424,6 +16141,164 @@ var init_chunk_S24FZRPG = __esm({
15424
16141
  refineHubAsCodeDecisionsModel(config, ctx);
15425
16142
  refineHubAsCodeMonitorRulesOutput(config, ctx);
15426
16143
  }));
16144
+ hubAsCodeConnectionSchema = external_exports.object({
16145
+ id: external_exports.string().optional(),
16146
+ name: external_exports.string(),
16147
+ type: external_exports.string(),
16148
+ service: external_exports.string().optional(),
16149
+ /** Pin an org credential by display name (round-trips on pull). */
16150
+ credential: external_exports.string().optional(),
16151
+ /** Bearer Token org credential for dual-credential (API Key + access token)
16152
+ * connectors. Push-only: not round-tripped on pull (the connection row stores
16153
+ * a single credential id, so only the primary `credential` is re-emitted). */
16154
+ access_token_credential: external_exports.string().optional(),
16155
+ /** Opt into a deliberately unauthenticated connection for optional-auth connectors
16156
+ * (e.g. a no-auth MCP server), or a REST API or External Resources connection to an
16157
+ * API that takes no key. Suppresses the "created without" push warning. Must not be
16158
+ * combined with `credential`. */
16159
+ no_auth: external_exports.boolean().optional(),
16160
+ base_url: external_exports.string().optional(),
16161
+ /** Push-only: a pull never answers the stored headers, which may hold a key. */
16162
+ headers: external_exports.record(external_exports.string(), external_exports.string()).optional(),
16163
+ settings: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
16164
+ account_sid: external_exports.string().optional(),
16165
+ enabled: external_exports.boolean().optional(),
16166
+ authentication_type: external_exports.string().optional(),
16167
+ /** Opt out of copying this connection's credential into production on publish/sync.
16168
+ * Defaults to true. Round-trips on pull (emitted only when false). */
16169
+ sync_credentials_to_production: external_exports.boolean().optional()
16170
+ });
16171
+ hubAsCodePayloadSchema = hubAsCodeConfigObjectSchema.extend({
16172
+ /** A pull answers `1`. A number: a CLI sends the version its folder states, for the push to judge. */
16173
+ version: external_exports.number(),
16174
+ hub_id: external_exports.string().min(1),
16175
+ hub_environment: external_exports.string(),
16176
+ preview_label: external_exports.string().nullable().optional(),
16177
+ branch_name: external_exports.string().nullable().optional(),
16178
+ /**
16179
+ * For a preview hub, the id of its linked production hub (null until first
16180
+ * publish). Lets the CLI mirror production read-only on every preview pull.
16181
+ * Always null on a production hub's own payload (it has no parent).
16182
+ */
16183
+ production_hub_id: external_exports.string().nullable().optional(),
16184
+ /**
16185
+ * The hub's settings — and its localized end-user presentation (`Partial<HubPresentationColumns>`,
16186
+ * `hub-presentation.ts`): its name, welcome message and starter questions as its end users see
16187
+ * them, keyed by supported locale. A presentation map left out leaves the stored one unchanged;
16188
+ * `null` or `{}` clears it. Pull emits each only when set.
16189
+ */
16190
+ hub: hubAsCodeConfigObjectSchema.shape.hub.extend({
16191
+ description: external_exports.string().optional(),
16192
+ hub_type: external_exports.string().optional(),
16193
+ ai_mode: external_exports.string().optional(),
16194
+ timezone: external_exports.string().optional(),
16195
+ /** Hub language (en|pt|es) — localizes the channel-contact-access pending notice. */
16196
+ language: external_exports.string().optional(),
16197
+ /** Gate for who may approve/block channel contacts: 'admin' (default) | 'team'. */
16198
+ access_approval_role: external_exports.string().optional(),
16199
+ /** Override text for the one-time "your access is pending" notice (else localized default). */
16200
+ access_request_message: external_exports.string().nullable().optional(),
16201
+ /** Minutes of sustained LLM-provider failure before escalating to the team (null → code default). */
16202
+ ai_failure_escalation_minutes: external_exports.number().nullable().optional(),
16203
+ /** Override text for the mid-outage "we're delayed" notice (else localized default). */
16204
+ ai_delay_message: external_exports.string().nullable().optional(),
16205
+ /** Override text for the escalation hand-off notice (else localized default). */
16206
+ ai_handoff_message: external_exports.string().nullable().optional(),
16207
+ non_app_permission: external_exports.string().optional(),
16208
+ kanban_statuses: external_exports.array(hubAsCodeKanbanStatusSchema).optional(),
16209
+ /** Presentational lane definitions for board grouping (see HubAsCodeLane). A
16210
+ * hub-config field, NOT a separate YAML entity like `journeys`. */
16211
+ lanes: external_exports.array(hubAsCodeLaneSchema).optional(),
16212
+ // flag_conditions relocated to the conversation_evaluator AGENT (see HubAsCodeAgent.flag_conditions).
16213
+ // summarization_threshold_tokens relocated to the summarizer AGENT (see HubAsCodeAgent.summarization_threshold_tokens).
16214
+ // monitor_config relocated to the monitor AGENT (see HubAsCodeAgent.monitor_config).
16215
+ /** Days of inactivity (no user/team messages) before a conversation is force-closed.
16216
+ * Range 1..180, default 7. Mandatory across every hub. */
16217
+ auto_close_inactive_days: external_exports.number().optional(),
16218
+ /** Days an ended conversation's ConversationDO is kept alive so it can still receive
16219
+ * post-hoc annotations before the cleanup cron deletes it. Range 1..30, default 7.
16220
+ * Archival is unaffected (still at close). */
16221
+ conversation_retention_days: external_exports.number().optional(),
16222
+ /** Days an ended conversation's `conversation_index` row is retained warm (Ended tab +
16223
+ * chat-hub continuous history) before the cleanup cron reaps it. Range 1..730,
16224
+ * default 365. Emitted only when non-default. Re-clamped to the effective storage
16225
+ * retention at reap time so an index row never outlives its archive. */
16226
+ ended_index_retention_days: external_exports.number().optional(),
16227
+ /** Days a terminal eval session (its runs, results and eval conversations) is retained
16228
+ * in HubDO before the weekly retention cron retires it. Range 0..3650; `0` disables
16229
+ * retention (keep forever). Emitted only when the hub sets an explicit override —
16230
+ * omission means "inherit `platform_config.default_eval_retention_days`", so pushing
16231
+ * a config without this field never clears an override set elsewhere — an explicit
16232
+ * `null` is what clears it. Retirement destroys transcripts (HubDO-only);
16233
+ * ClickHouse eval scores survive. */
16234
+ eval_retention_days: external_exports.number().nullable().optional(),
16235
+ // `end_user_daily_message_limit` is the push body's own: messages one end user may send the hub
16236
+ // on the app channel per 24 hours, 1..10000. Emitted only when set; omission leaves the stored
16237
+ // limit unchanged, and an explicit `null` removes it.
16238
+ /** Org tag slug names (not UUIDs). Resolved against OrgDO `org_tag` on push;
16239
+ * unknown names are rejected. Hub tags gate which org credentials this hub
16240
+ * can resolve via the symmetric overlap rule (see SKILL connections doc). */
16241
+ tags: external_exports.array(external_exports.string()).optional(),
16242
+ /** Eval-session seed connection, bound BY NAME (gh #3097). References a
16243
+ * connection declared in this hub's `connections:` — a REST API (custom tool)
16244
+ * connection whose `base_url` is the data API's origin, bound to its base with no token stored
16245
+ * (`wayai bind-seed-connection`, wayai#5644).
16246
+ * Resolved name→id on push (base_url validated for parity with the setup PATCH);
16247
+ * round-trips as the connection's display name on pull. Absent = leave unchanged;
16248
+ * explicit `null` = clear (omission does NOT unbind, matching `tags`). */
16249
+ seed_connection: external_exports.string().nullable().optional()
16250
+ }).merge(hubPresentationColumnsSchema.partial()).strip(),
16251
+ agents: external_exports.array(hubAsCodeAgentSchema).optional(),
16252
+ /** The hub's skills, by the wire's name; unbounded, unlike a push's (`boundedHubAsCodeResourcesSchema`). */
16253
+ resources: external_exports.array(hubAsCodeResourceSchema.extend({
16254
+ files: external_exports.array(hubAsCodeResourceFileSchema.strip()).optional()
16255
+ }).strip()).optional(),
16256
+ states: external_exports.array(hubAsCodeStateSchema.strip()).optional(),
16257
+ teams: external_exports.array(hubAsCodeTeamSchema).optional(),
16258
+ evals: external_exports.array(hubAsCodeEvalSchema).optional(),
16259
+ journeys: external_exports.array(hubAsCodeJourneySchema).optional(),
16260
+ /**
16261
+ * Byte carrier for eval/journey attachments (gh #3365) — deduped by `hash`,
16262
+ * PUSH-ONLY, never stored and never diffed (the turn refs are what persist and
16263
+ * diff). Kept off the turn objects on purpose: base64 on a turn would ride every
16264
+ * frozen `scenario_snapshot` and poison the JSON-stringify diff engine. Apply
16265
+ * uploads any hash whose R2 object is missing (re-hashing to verify the bytes
16266
+ * match the declared hash — content-addressing must not be poisonable). On pull,
16267
+ * `download_url` carries a signed link per referenced hash instead.
16268
+ */
16269
+ eval_attachment_files: external_exports.array(hubAsCodeEvalAttachmentFileSchema).optional(),
16270
+ /**
16271
+ * Byte carrier for the voice agents' call openings (gh #4418), deduped by `hash` — the
16272
+ * `eval_attachment_files` split: the agents' `call_openings` persist and diff, this carries
16273
+ * only bytes. A push may leave out the bytes of an opening the hub already holds. On pull,
16274
+ * `download_url` carries a signed link per opening instead.
16275
+ */
16276
+ call_opening_files: external_exports.array(hubAsCodeCallOpeningFileSchema).optional(),
16277
+ /**
16278
+ * The hub's automations (wayai#4931). An ABSENT key changes nothing; `[]` deletes every
16279
+ * automation. While the key is absent, the stored automations still count wherever another key
16280
+ * is checked against them — a connection they use is never deleted as unreferenced.
16281
+ */
16282
+ automations: external_exports.array(hubAsCodeAutomationSchema).optional(),
16283
+ /**
16284
+ * The hub's own contact lists (wayai#4931 D6a): filters over the org contact book's labels and
16285
+ * scope tags, which an automation names by `target.list`. An ABSENT key changes nothing; `[]`
16286
+ * deletes every list. While the key is absent, the stored lists still count wherever an
16287
+ * automation is checked against them.
16288
+ */
16289
+ contact_lists: external_exports.array(hubAsCodeContactListSchema).optional(),
16290
+ /**
16291
+ * The hub's pages (wayai-pro/wayai#5333): each its manifest (`pageManifestSchema`) and its HTML.
16292
+ * An ABSENT key changes nothing; `[]` deletes every page. A pull answers every page the hub
16293
+ * holds, the stored manifest with every default filled. Unbounded, unlike a push's (`hubAsCodePagesSchema`).
16294
+ */
16295
+ pages: external_exports.array(hubAsCodePageSchema).optional(),
16296
+ /** Connections serve as reference targets for `connection_id` fields on agents
16297
+ * and custom tools. Non-secret configuration fields (base_url, settings,
16298
+ * etc.) are round-trippable via pull/push. The bound org credential round-trips
16299
+ * by name via `credential`; the raw secret is never exported. */
16300
+ connections: external_exports.array(hubAsCodeConnectionSchema).optional()
16301
+ }).strip();
15427
16302
  ciPullHubIdParam = external_exports.object({
15428
16303
  hub_id: ciUuidSchema
15429
16304
  });
@@ -15497,8 +16372,10 @@ var init_chunk_S24FZRPG = __esm({
15497
16372
  direction: ciDiffDirectionSchema,
15498
16373
  summary: external_exports.string(),
15499
16374
  /**
15500
- * The diff engine's own result (`DiffResult` for a hub, the org skills diff for an org), as
15501
- * computed. Not part of the contract yet: no client reads it, and its shape is the engine's.
16375
+ * The diff engine's own result (`DiffResult` for a hub, the org skills diff for an org). A hub's
16376
+ * answers each stored connection in `connections.delete` with its header values hidden
16377
+ * (`hideConnectionValues`, wayai#6077), never as stored: the engine carries those rows whole for
16378
+ * apply's teardown. Not part of the contract yet: no client reads it, and its shape is the engine's.
15502
16379
  */
15503
16380
  diff: external_exports.unknown(),
15504
16381
  /**
@@ -15643,6 +16520,64 @@ var init_chunk_S24FZRPG = __esm({
15643
16520
  apply_errors: external_exports.array(ciApplyErrorSchema).optional(),
15644
16521
  warnings: external_exports.array(ciSyncWarningSchema).optional()
15645
16522
  });
16523
+ ciPublishResponseSchema = external_exports.object({
16524
+ synced: external_exports.boolean(),
16525
+ production_hub_id: external_exports.string().min(1),
16526
+ /** The sync's warnings (`SyncHubResponse`); absent when there are none. */
16527
+ warnings: external_exports.array(syncWarningSchema).optional()
16528
+ });
16529
+ ciMcpDriftEntrySchema = external_exports.object({
16530
+ tool_name: external_exports.string(),
16531
+ kind: external_exports.enum(["added", "changed", "removed"]),
16532
+ detail: external_exports.string().optional()
16533
+ });
16534
+ ciSyncMcpResponseSchema = external_exports.object({
16535
+ success: external_exports.boolean(),
16536
+ connection_id: external_exports.string().min(1),
16537
+ connection_name: external_exports.string(),
16538
+ tools_count: external_exports.number().int().nonnegative().optional(),
16539
+ resources_count: external_exports.number().int().nonnegative().optional(),
16540
+ message: external_exports.string().optional(),
16541
+ warnings: external_exports.array(external_exports.string()).optional(),
16542
+ // Drift-check mode (`check: true`) only. `drift` is present (possibly empty)
16543
+ // when the catalog was compared to the live server and NOTHING was written;
16544
+ // an empty array means "verified in sync". `reachable: false` means the server
16545
+ // or its credentials couldn't be contacted, so drift could NOT be verified —
16546
+ // distinct from "verified, no drift".
16547
+ drift: external_exports.array(ciMcpDriftEntrySchema).optional(),
16548
+ reachable: external_exports.boolean().optional()
16549
+ });
16550
+ ciPublishPreviewResponseSchema = ciPublishResponseSchema.partial({ production_hub_id: true });
16551
+ ciBranchInfoSchema = external_exports.object({
16552
+ branch_name: external_exports.string().min(1),
16553
+ preview_hub_id: external_exports.string().min(1),
16554
+ last_ci_activity_at: external_exports.string().nullable(),
16555
+ ci_commit_sha: external_exports.string().nullable()
16556
+ });
16557
+ ciBranchListResponseSchema = external_exports.object({
16558
+ branches: external_exports.array(ciBranchInfoSchema)
16559
+ });
16560
+ ciBranchDeleteResponseSchema = external_exports.object({
16561
+ deleted: external_exports.boolean(),
16562
+ message: external_exports.string().optional()
16563
+ });
16564
+ ciOrgResourcesPullFileSchema = hubAsCodeResourceFileSchema.strip().extend({
16565
+ id: external_exports.string().min(1),
16566
+ title: external_exports.string()
16567
+ });
16568
+ ciOrgResourcesPullFolderSchema = orgAsCodeResourceFolderSchema.extend({ id: external_exports.string().min(1) });
16569
+ ciOrgResourcesPullResourceSchema = orgAsCodeResourceSchema.extend({
16570
+ id: external_exports.string().min(1),
16571
+ enabled: external_exports.boolean(),
16572
+ environment: orgAsCodeResourceSchema.shape.environment.unwrap(),
16573
+ tags: external_exports.array(external_exports.string()),
16574
+ folders: external_exports.array(ciOrgResourcesPullFolderSchema).optional(),
16575
+ files: external_exports.array(ciOrgResourcesPullFileSchema).optional()
16576
+ });
16577
+ ciOrgResourcesPullResponseSchema = orgResourcesPayloadSchema.extend({
16578
+ organization_id: external_exports.string().min(1),
16579
+ resources: external_exports.array(ciOrgResourcesPullResourceSchema)
16580
+ });
15646
16581
  ciOrgResourcesPushResponseSchema = external_exports.object({
15647
16582
  changes: external_exports.object({
15648
16583
  resources_created: ciSyncCountSchema,
@@ -16604,10 +17539,10 @@ var init_chunk_K6O2P77D = __esm({
16604
17539
  }
16605
17540
  });
16606
17541
 
16607
- // ../../packages/core/dist/chunk-UAFAJNZ6.js
17542
+ // ../../packages/core/dist/chunk-AQRCKNQP.js
16608
17543
  var CASE_REVIEW_DECISIONS, CASE_ISSUED_FORMATS, CASE_REVIEW_COMMENT_MAX_LENGTH, CASE_REVIEW_JUSTIFICATION_MAX_LENGTH, text2, caseSubmissionParam, decideCaseSubmissionBody, caseIssuedQuery, CASE_APPROVALS_STATES, caseApprovalsQuery, caseCompareDefaultQuery, caseApprovalsAgendaQuery;
16609
- var init_chunk_UAFAJNZ6 = __esm({
16610
- "../../packages/core/dist/chunk-UAFAJNZ6.js"() {
17544
+ var init_chunk_AQRCKNQP = __esm({
17545
+ "../../packages/core/dist/chunk-AQRCKNQP.js"() {
16611
17546
  "use strict";
16612
17547
  init_chunk_VHA3AQE4();
16613
17548
  init_chunk_2S6LIRGD();
@@ -16753,10 +17688,10 @@ var init_chunk_UPGAWPE2 = __esm({
16753
17688
  }
16754
17689
  });
16755
17690
 
16756
- // ../../packages/core/dist/chunk-3EEL6BQ7.js
17691
+ // ../../packages/core/dist/chunk-AKG7A2TR.js
16757
17692
  var CASE_MEMBER_CASES_PAGE_MAX, caseMemberReachQuery;
16758
- var init_chunk_3EEL6BQ7 = __esm({
16759
- "../../packages/core/dist/chunk-3EEL6BQ7.js"() {
17693
+ var init_chunk_AKG7A2TR = __esm({
17694
+ "../../packages/core/dist/chunk-AKG7A2TR.js"() {
16760
17695
  "use strict";
16761
17696
  init_chunk_TYI6QVPX();
16762
17697
  init_zod();
@@ -17252,10 +18187,10 @@ var init_chunk_I6CZPDXO = __esm({
17252
18187
  }
17253
18188
  });
17254
18189
 
17255
- // ../../packages/core/dist/chunk-FPFUDA22.js
18190
+ // ../../packages/core/dist/chunk-M7BXKCNK.js
17256
18191
  var caseInputLinkParam, caseCollectionDocumentOfCaseParam, linkCaseCollectionInputBody, linkCasePreviousOutputInputBody, linkCaseReceivedInputBody, linkCaseInputBody, CASE_LINK_OFFICIAL_VERSION_UNKNOWN_REASON, CASE_LINK_OUTPUT_NOT_PRIOR_REASON, CASE_LINK_RECEIVED_UNKNOWN_REASON, CASE_LINK_DOCUMENT_TYPE_MISMATCH_REASON, CASE_LINK_VERSION_NOT_CURRENT_REASON, CASE_COLLECTION_CASES_PAGE_MAX, caseCollectionCasesQuery, CASE_REFERENCES_PAGE_MAX, caseReferencesQuery;
17257
- var init_chunk_FPFUDA22 = __esm({
17258
- "../../packages/core/dist/chunk-FPFUDA22.js"() {
18192
+ var init_chunk_M7BXKCNK = __esm({
18193
+ "../../packages/core/dist/chunk-M7BXKCNK.js"() {
17259
18194
  "use strict";
17260
18195
  init_chunk_ZZZ65EIA();
17261
18196
  init_chunk_I6CZPDXO();
@@ -17363,10 +18298,10 @@ var init_chunk_7QN6QYGN = __esm({
17363
18298
  }
17364
18299
  });
17365
18300
 
17366
- // ../../packages/core/dist/chunk-7RWVVW7T.js
18301
+ // ../../packages/core/dist/chunk-CUBLS2GW.js
17367
18302
  var lines, ordered, citeCaseOfficialVersionPassageBody, citeCaseReceivedPassageBody, citeCaseSourcePassageBody, citeCaseInputPassageBody, caseSourceRefSchema;
17368
- var init_chunk_7RWVVW7T = __esm({
17369
- "../../packages/core/dist/chunk-7RWVVW7T.js"() {
18303
+ var init_chunk_CUBLS2GW = __esm({
18304
+ "../../packages/core/dist/chunk-CUBLS2GW.js"() {
17370
18305
  "use strict";
17371
18306
  init_chunk_I6CZPDXO();
17372
18307
  init_chunk_LU4T7K5F();
@@ -17541,14 +18476,14 @@ var init_chunk_R6Y377AW = __esm({
17541
18476
  }
17542
18477
  });
17543
18478
 
17544
- // ../../packages/core/dist/chunk-L5GC53VI.js
18479
+ // ../../packages/core/dist/chunk-JQRL355P.js
17545
18480
  var AUTOMATION_TRIGGER_TYPES, AUTOMATION_EVENT_TYPES, AUTOMATION_TARGET_TYPES, AUTOMATION_ACTION_TYPES, AUTOMATION_CHANNEL_TYPES, AUTOMATION_PURPOSES, AUTOMATION_NAME_MAX, AUTOMATION_DESCRIPTION_MAX, AUTOMATION_INSTRUCTIONS_MAX, AUTOMATION_TEXT_MAX, AUTOMATION_CRON_MAX, AUTOMATION_WEBHOOK_AUTHS, AUTOMATION_WEBHOOK_HEADERS, AUTOMATION_WEBHOOK_BODY_MAX_BYTES, AUTOMATION_WEBHOOK_HEADER_NAME_MAX, WEBHOOK_RESERVED_HEADERS, automationTriggerSchema, automationTargetSchema, automationActionSchema, automationGateSchema, automationName, automationDescription, automationIdParam, automationHubQuery, automationWebhookParams, AUTOMATION_RUNS_PAGE_MAX, listAutomationRunsQuery, createAutomationBody, updateAutomationBody, AUTOMATION_ALERT_CATEGORIES, AUTOMATION_BLOCKED_ALERT_CATEGORY, automationEventSubscriberParam;
17546
- var init_chunk_L5GC53VI = __esm({
17547
- "../../packages/core/dist/chunk-L5GC53VI.js"() {
18481
+ var init_chunk_JQRL355P = __esm({
18482
+ "../../packages/core/dist/chunk-JQRL355P.js"() {
17548
18483
  "use strict";
17549
18484
  init_chunk_R6Y377AW();
17550
18485
  init_chunk_UAOHHCW5();
17551
- init_chunk_QMQGGR7Q();
18486
+ init_chunk_OLBDDBKV();
17552
18487
  init_chunk_5FO3GNKP();
17553
18488
  init_chunk_ZDTX3DG5();
17554
18489
  init_chunk_ZTNFLGW5();
@@ -17961,7 +18896,7 @@ var init_chunk_OMPT4ZHR = __esm({
17961
18896
  }
17962
18897
  });
17963
18898
 
17964
- // ../../packages/core/dist/chunk-347WE2N4.js
18899
+ // ../../packages/core/dist/chunk-SUDGFYG2.js
17965
18900
  function refineScopedTarget(data, ctx) {
17966
18901
  if (data.scope === "org") {
17967
18902
  if (!data.org_id) {
@@ -17987,13 +18922,13 @@ function refineScopedTarget(data, ctx) {
17987
18922
  }
17988
18923
  }
17989
18924
  var adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, AUTOMATION_GATE_EVALUATIONS_PER_OPERATION_BOUND, automationGateEvaluationsPerOperation, AUTOMATION_RUN_RETENTION_DAYS_MAX, automationRunRetentionDays, turnDeadlineSeconds, casesLimit, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, adminDryRunByDefaultTargetBody, WAYAI_HOST_TOKEN_TARGET_KINDS, WAYAI_HOST_TOKEN_MAX_TARGETS, adminClearWayaiHostTokensBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCredentialServicesBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, dataExplorerDebugCountsDoType, dataExplorerDebugCountsParam, debugHubConvParam, debugMessageIdQuery;
17990
- var init_chunk_347WE2N4 = __esm({
17991
- "../../packages/core/dist/chunk-347WE2N4.js"() {
18925
+ var init_chunk_SUDGFYG2 = __esm({
18926
+ "../../packages/core/dist/chunk-SUDGFYG2.js"() {
17992
18927
  "use strict";
17993
18928
  init_chunk_FECLIZTY();
17994
18929
  init_chunk_BFG4ZWR4();
17995
18930
  init_chunk_UY32MQHG();
17996
- init_chunk_ARK3766Q();
18931
+ init_chunk_25BLQS73();
17997
18932
  init_chunk_OMPT4ZHR();
17998
18933
  init_chunk_MIWZOSPI();
17999
18934
  init_chunk_HZ6CADSY();
@@ -18556,7 +19491,7 @@ var init_contracts = __esm({
18556
19491
  "../../packages/core/dist/contracts/index.js"() {
18557
19492
  "use strict";
18558
19493
  init_chunk_VXEAR36B();
18559
- init_chunk_RACEDHG6();
19494
+ init_chunk_2ZBLI7IH();
18560
19495
  init_chunk_Q7KIQHAZ();
18561
19496
  init_chunk_IPXBFWUU();
18562
19497
  init_chunk_63UWXV4T();
@@ -18591,7 +19526,7 @@ var init_contracts = __esm({
18591
19526
  init_chunk_SY6PLCPK();
18592
19527
  init_chunk_ACGAI25T();
18593
19528
  init_chunk_MH4O3YEX();
18594
- init_chunk_QEEQN2NE();
19529
+ init_chunk_V2CXEU5X();
18595
19530
  init_chunk_KSTYTQ7I();
18596
19531
  init_chunk_LKBSHANA();
18597
19532
  init_chunk_LX3D5LCB();
@@ -18601,32 +19536,32 @@ var init_contracts = __esm({
18601
19536
  init_chunk_YULHXJ5M();
18602
19537
  init_chunk_V4FRPRH5();
18603
19538
  init_chunk_LWMLR2WI();
18604
- init_chunk_ME6NL7FI();
19539
+ init_chunk_X4IDZLLS();
18605
19540
  init_chunk_7CYHPF35();
18606
19541
  init_chunk_NETRUHZF();
18607
- init_chunk_S24FZRPG();
19542
+ init_chunk_JTG72ANZ();
18608
19543
  init_chunk_QG3XMUEN();
18609
19544
  init_chunk_EBUWHIFV();
18610
19545
  init_chunk_5YZ3R7KF();
18611
19546
  init_chunk_2YEGUQR7();
18612
19547
  init_chunk_AHISKXHA();
18613
- init_chunk_UAFAJNZ6();
19548
+ init_chunk_AQRCKNQP();
18614
19549
  init_chunk_K3PD6AOF();
18615
19550
  init_chunk_F4264AMK();
18616
19551
  init_chunk_ZTRVP4OT();
18617
19552
  init_chunk_5WMOQ5NC();
18618
19553
  init_chunk_UPGAWPE2();
18619
- init_chunk_3EEL6BQ7();
19554
+ init_chunk_AKG7A2TR();
18620
19555
  init_chunk_VHA3AQE4();
18621
19556
  init_chunk_2S6LIRGD();
18622
19557
  init_chunk_WJJJFHIA();
18623
- init_chunk_FPFUDA22();
19558
+ init_chunk_M7BXKCNK();
18624
19559
  init_chunk_ZZZ65EIA();
18625
19560
  init_chunk_ATX6AHPZ();
18626
19561
  init_chunk_NKJ2DQCV();
18627
19562
  init_chunk_NVZB33EA();
18628
19563
  init_chunk_7QN6QYGN();
18629
- init_chunk_7RWVVW7T();
19564
+ init_chunk_CUBLS2GW();
18630
19565
  init_chunk_5PKKFSSF();
18631
19566
  init_chunk_AF2RCYPB();
18632
19567
  init_chunk_2KOYNTE2();
@@ -18634,24 +19569,24 @@ var init_contracts = __esm({
18634
19569
  init_chunk_I6CZPDXO();
18635
19570
  init_chunk_UEJOG2Q7();
18636
19571
  init_chunk_KEN2DASI();
18637
- init_chunk_L5GC53VI();
19572
+ init_chunk_JQRL355P();
18638
19573
  init_chunk_R6Y377AW();
18639
19574
  init_chunk_UAOHHCW5();
18640
- init_chunk_QMQGGR7Q();
19575
+ init_chunk_OLBDDBKV();
18641
19576
  init_chunk_ULQGJUXZ();
18642
19577
  init_chunk_YWZFB34T();
18643
19578
  init_chunk_PZPOUXJR();
18644
19579
  init_chunk_LBDH7LCG();
18645
19580
  init_chunk_4LXDRTO4();
18646
19581
  init_chunk_NVKU5PPQ();
18647
- init_chunk_347WE2N4();
19582
+ init_chunk_SUDGFYG2();
18648
19583
  init_chunk_FECLIZTY();
18649
19584
  init_chunk_BFG4ZWR4();
18650
19585
  init_chunk_UY32MQHG();
18651
- init_chunk_ARK3766Q();
19586
+ init_chunk_25BLQS73();
18652
19587
  init_chunk_D3EP4TDU();
18653
- init_chunk_X5PZZVTS();
18654
- init_chunk_PIZTARVG();
19588
+ init_chunk_ZANBA4K4();
19589
+ init_chunk_QT7R3TGR();
18655
19590
  init_chunk_OMPT4ZHR();
18656
19591
  init_chunk_2PZIF56U();
18657
19592
  init_chunk_6J742GLA();
@@ -25459,19 +26394,19 @@ var init_hub_materializer = __esm({
25459
26394
  var init_ci = __esm({
25460
26395
  "../../packages/core/dist/contracts/ci.js"() {
25461
26396
  "use strict";
25462
- init_chunk_S24FZRPG();
26397
+ init_chunk_JTG72ANZ();
25463
26398
  init_chunk_QG3XMUEN();
25464
26399
  init_chunk_EBUWHIFV();
25465
26400
  init_chunk_5YZ3R7KF();
25466
26401
  init_chunk_2YEGUQR7();
25467
26402
  init_chunk_AHISKXHA();
25468
- init_chunk_QMQGGR7Q();
26403
+ init_chunk_OLBDDBKV();
25469
26404
  init_chunk_LBDH7LCG();
25470
26405
  init_chunk_4LXDRTO4();
25471
- init_chunk_ARK3766Q();
26406
+ init_chunk_25BLQS73();
25472
26407
  init_chunk_D3EP4TDU();
25473
- init_chunk_X5PZZVTS();
25474
- init_chunk_PIZTARVG();
26408
+ init_chunk_ZANBA4K4();
26409
+ init_chunk_QT7R3TGR();
25475
26410
  init_chunk_AMMLEB4T();
25476
26411
  init_chunk_IBL7FANV();
25477
26412
  init_chunk_S4VDZ7PZ();
@@ -41974,7 +42909,7 @@ var init_case_collection_citations = __esm({
41974
42909
  var init_case_collection_links = __esm({
41975
42910
  "../../packages/core/dist/contracts/case-collection-links.js"() {
41976
42911
  "use strict";
41977
- init_chunk_FPFUDA22();
42912
+ init_chunk_M7BXKCNK();
41978
42913
  init_chunk_ZZZ65EIA();
41979
42914
  init_chunk_ATX6AHPZ();
41980
42915
  init_chunk_NKJ2DQCV();
@@ -43520,7 +44455,7 @@ ${line}`).join("");
43520
44455
  var init_case_input_sources = __esm({
43521
44456
  "../../packages/core/dist/contracts/case-input-sources.js"() {
43522
44457
  "use strict";
43523
- init_chunk_7RWVVW7T();
44458
+ init_chunk_CUBLS2GW();
43524
44459
  init_chunk_I6CZPDXO();
43525
44460
  init_chunk_LU4T7K5F();
43526
44461
  init_chunk_74HGW6HA();