@wayai/cli 0.3.192 → 0.3.194

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
@@ -488,7 +488,7 @@ var init_sentry = __esm({
488
488
  }
489
489
  });
490
490
 
491
- // ../../packages/core/dist/chunk-FJKE7WIF.js
491
+ // ../../packages/core/dist/chunk-POL7B3EM.js
492
492
  function spokenLineField(label, description) {
493
493
  return { type: "text", label, maxLength: SPOKEN_LINE_MAX_CHARS, default: "", description };
494
494
  }
@@ -498,8 +498,8 @@ function byLowercaseName(a, b) {
498
498
  return x < y ? -1 : x > y ? 1 : 0;
499
499
  }
500
500
  var CALLER_LANGUAGE, TTS_VOICE_REPLY_ENABLED_FIELD, COPILOT_TRIGGER_FIELD, AUDIO_LANGUAGE_OPTIONS, whatsapp, instagram, resend, telegram, API_CHANNEL_DELIVERY_EVENTS, apiChannel, OPENAI_REASONING_MODELS, openai, anthropic, googleAiStudio, openRouter, xai, groqStt, openaiStt, elevenLabsStt, openaiTts, groqTts, elevenLabsTts, GEMINI_TTS_VOICES, googleTts, wayai, externalResources, restApiTool, mcpServer, e2b, CLAUDE_HARNESS_MODELS, CLAUDE_HARNESS_MODEL_OPTIONS, HARNESS_MCP_SERVERS_FIELD, HARNESS_EGRESS_FIELDS, claudeAgentSdk, claudeManagedAgents, rekorMemory, SPOKEN_LINE_MAX_CHARS, gptLive, CONNECTORS;
501
- var init_chunk_FJKE7WIF = __esm({
502
- "../../packages/core/dist/chunk-FJKE7WIF.js"() {
501
+ var init_chunk_POL7B3EM = __esm({
502
+ "../../packages/core/dist/chunk-POL7B3EM.js"() {
503
503
  "use strict";
504
504
  CALLER_LANGUAGE = "caller";
505
505
  TTS_VOICE_REPLY_ENABLED_FIELD = {
@@ -680,7 +680,7 @@ var init_chunk_FJKE7WIF = __esm({
680
680
  token_refresh_config: { api_key: { strategy: "none" } },
681
681
  connector_description: "Start and continue hub conversations over REST; receive replies as signed webhooks."
682
682
  };
683
- OPENAI_REASONING_MODELS = ["gpt-6-sol", "gpt-6-astra", "gpt-6-luna", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.2", "gpt-5.1", "gpt-5", "gpt-5-mini", "gpt-5-nano"];
683
+ OPENAI_REASONING_MODELS = ["gpt-6.1-sol", "gpt-6-sol", "gpt-6-astra", "gpt-6-luna", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.2", "gpt-5.1", "gpt-5", "gpt-5-mini", "gpt-5-nano"];
684
684
  openai = {
685
685
  connector_id: "0cd6a292-895b-4667-b89e-dd298628c272",
686
686
  service_name: "Openai",
@@ -690,17 +690,17 @@ var init_chunk_FJKE7WIF = __esm({
690
690
  init_endpoint: null,
691
691
  unique_per_hub: true,
692
692
  account_sid_placeholder: "Enter email of the account",
693
- models: ["gpt-6-sol", "gpt-6-astra", "gpt-6-luna", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.4", "gpt-5.2", "gpt-5.2-chat-latest", "gpt-5.1", "gpt-5", "gpt-5-mini", "gpt-5-nano", "gpt-4.1", "gpt-4.1-mini"],
693
+ models: ["gpt-6.1-sol", "gpt-6-astra", "gpt-6-luna", "gpt-6-sol", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.4", "gpt-5.2", "gpt-5.2-chat-latest", "gpt-5.1", "gpt-5", "gpt-5-mini", "gpt-5-nano", "gpt-4.1", "gpt-4.1-mini"],
694
694
  is_internal: true,
695
695
  is_harness: false,
696
696
  connector_module: "agent",
697
697
  enabled: true,
698
698
  connector_settings_schema: null,
699
699
  agent_settings_schema: {
700
- model: { type: "select", label: "Model", allowCustomValue: true, options: [{ value: "gpt-6-sol", label: "GPT-6 Sol", deprecated: false }, { value: "gpt-6-astra", label: "GPT-6 Astra", deprecated: false }, { value: "gpt-6-luna", label: "GPT-6 Luna", deprecated: false }, { value: "gpt-5.6-sol", label: "GPT-5.6 Sol (Legacy)", deprecated: true }, { value: "gpt-5.6-terra", label: "GPT-5.6 Terra (Legacy)", deprecated: true }, { value: "gpt-5.6-luna", label: "GPT-5.6 Luna (Legacy)", deprecated: true }, { value: "gpt-5.5", label: "GPT-5.5 (Legacy)", deprecated: true }, { value: "gpt-5.4-mini", label: "GPT-5.4 Mini (Legacy)", deprecated: true }, { value: "gpt-5.4-nano", label: "GPT-5.4 Nano (Legacy)", deprecated: true }, { value: "gpt-5.4", label: "GPT-5.4 (Legacy)", deprecated: true }, { value: "gpt-5.2", label: "GPT-5.2 (Legacy)", deprecated: true }, { value: "gpt-5.2-chat-latest", label: "GPT-5.2 Chat (Legacy)", deprecated: true }, { value: "gpt-5.1", label: "GPT-5.1 (Legacy)", deprecated: true }, { value: "gpt-5", label: "GPT-5 (Legacy)", deprecated: true }, { value: "gpt-5-mini", label: "GPT-5 Mini (Legacy)", deprecated: true }, { value: "gpt-5-nano", label: "GPT-5 Nano (Legacy)", deprecated: true }, { value: "gpt-4.1", label: "GPT-4.1 (Legacy)", deprecated: true }, { value: "gpt-4.1-mini", label: "GPT-4.1 Mini (Legacy)", deprecated: true }], default: "gpt-6-sol", description: "AI model to use", required: true },
700
+ model: { type: "select", label: "Model", allowCustomValue: true, options: [{ value: "gpt-6.1-sol", label: "GPT-6.1 Sol", deprecated: false }, { value: "gpt-6-astra", label: "GPT-6 Astra", deprecated: false }, { value: "gpt-6-luna", label: "GPT-6 Luna", deprecated: false }, { value: "gpt-6-sol", label: "GPT-6 Sol (Legacy)", deprecated: true }, { value: "gpt-5.6-sol", label: "GPT-5.6 Sol (Legacy)", deprecated: true }, { value: "gpt-5.6-terra", label: "GPT-5.6 Terra (Legacy)", deprecated: true }, { value: "gpt-5.6-luna", label: "GPT-5.6 Luna (Legacy)", deprecated: true }, { value: "gpt-5.5", label: "GPT-5.5 (Legacy)", deprecated: true }, { value: "gpt-5.4-mini", label: "GPT-5.4 Mini (Legacy)", deprecated: true }, { value: "gpt-5.4-nano", label: "GPT-5.4 Nano (Legacy)", deprecated: true }, { value: "gpt-5.4", label: "GPT-5.4 (Legacy)", deprecated: true }, { value: "gpt-5.2", label: "GPT-5.2 (Legacy)", deprecated: true }, { value: "gpt-5.2-chat-latest", label: "GPT-5.2 Chat (Legacy)", deprecated: true }, { value: "gpt-5.1", label: "GPT-5.1 (Legacy)", deprecated: true }, { value: "gpt-5", label: "GPT-5 (Legacy)", deprecated: true }, { value: "gpt-5-mini", label: "GPT-5 Mini (Legacy)", deprecated: true }, { value: "gpt-5-nano", label: "GPT-5 Nano (Legacy)", deprecated: true }, { value: "gpt-4.1", label: "GPT-4.1 (Legacy)", deprecated: true }, { value: "gpt-4.1-mini", label: "GPT-4.1 Mini (Legacy)", deprecated: true }], default: "gpt-6.1-sol", description: "AI model to use", required: true },
701
701
  temperature: { type: "slider", label: "Temperature", min: 0, max: 2, default: 0.7, step: 0.01, description: "Controls randomness (0=focused, 2=creative). Only for non-reasoning models.", dependsOn: { field: "model", values: ["gpt-5.2-chat-latest", "gpt-4.1-mini", "gpt-4.1"] } },
702
702
  top_p: { type: "slider", label: "Top P", min: 0, max: 1, default: 1, step: 0.01, description: "Nucleus sampling parameter. Only for non-reasoning models.", dependsOn: { field: "model", values: ["gpt-5.2-chat-latest", "gpt-4.1-mini", "gpt-4.1"] } },
703
- reasoning_effort: { type: "select", label: "Reasoning Effort", options: [{ value: "minimal", label: "minimal", deprecated: true }, "low", "medium", "high", "xhigh", "max", "none"], default: "medium", description: "How much effort the model spends reasoning. Higher effort = more tokens & time. Set to none for fastest responses. xhigh requires gpt-5.2 or newer; max requires gpt-5.6 or newer; on older models each is clamped down to the highest supported level. GPT-6 Astra has no none level \u2014 none runs it at low. minimal is a legacy level only gpt-5 / gpt-5.1 accept \u2014 it is clamped to low on gpt-5.2 and newer.", dependsOn: { field: "model", values: OPENAI_REASONING_MODELS } },
703
+ reasoning_effort: { type: "select", label: "Reasoning Effort", options: [{ value: "minimal", label: "minimal", deprecated: true }, "low", "medium", "high", "xhigh", "max", "none"], default: "medium", description: "How much effort the model spends reasoning. Higher effort = more tokens & time. Set to none for fastest responses. xhigh requires gpt-5.2 or newer; max requires gpt-5.6 or newer; on older models each is clamped down to the highest supported level. GPT-6 Astra and GPT-6.1 Sol have no none level \u2014 none runs them at low. minimal is a legacy level only gpt-5 / gpt-5.1 accept \u2014 it is clamped to low on gpt-5.2 and newer.", dependsOn: { field: "model", values: OPENAI_REASONING_MODELS } },
704
704
  verbosity: { type: "select", label: "Verbosity", options: ["low", "medium", "high"], default: "medium", description: "Output detail level. Only for reasoning models.", dependsOn: { field: "model", values: OPENAI_REASONING_MODELS } },
705
705
  service_tier: { type: "select", label: "Service Tier", options: ["auto", "flex", "default", "priority"], default: "auto", description: "Service tier (flex=50% cheaper, higher latency). Only for reasoning models.", dependsOn: { field: "model", values: OPENAI_REASONING_MODELS } },
706
706
  max_tokens: { type: "number", label: "Max Tokens", min: 1, default: 4096, description: "Maximum tokens to generate. On reasoning models, this cap includes reasoning tokens." },
@@ -731,18 +731,18 @@ var init_chunk_FJKE7WIF = __esm({
731
731
  init_endpoint: null,
732
732
  unique_per_hub: true,
733
733
  account_sid_placeholder: "Enter email of the account",
734
- models: ["claude-fable-5-1", "claude-opus-5-5", "claude-sonnet-5", "claude-haiku-4-5", "claude-fable-5", "claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-4-6", "claude-sonnet-4-5", "claude-opus-4-6", "claude-opus-4-5"],
734
+ models: ["claude-fable-5-1", "claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5", "claude-fable-5", "claude-sonnet-5", "claude-haiku-4-5", "claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-4-6", "claude-sonnet-4-5", "claude-opus-4-6", "claude-opus-4-5"],
735
735
  is_internal: true,
736
736
  is_harness: false,
737
737
  connector_module: "agent",
738
738
  enabled: true,
739
739
  connector_settings_schema: null,
740
740
  agent_settings_schema: {
741
- model: { type: "select", label: "Model", allowCustomValue: true, options: [{ value: "claude-fable-5-1", label: "Claude Fable 5.1", deprecated: false }, { value: "claude-opus-5-5", label: "Claude Opus 5.5", deprecated: false }, { value: "claude-sonnet-5", label: "Claude Sonnet 5", deprecated: false }, { value: "claude-haiku-4-5", label: "Claude Haiku 4.5", deprecated: false }, { value: "claude-fable-5", label: "Claude Fable 5 (Legacy)", deprecated: true }, { value: "claude-opus-4-8", label: "Claude Opus 4.8 (Legacy)", deprecated: true }, { value: "claude-opus-4-7", label: "Claude Opus 4.7 (Legacy)", deprecated: true }, { value: "claude-sonnet-4-6", label: "Claude Sonnet 4.6 (Legacy)", deprecated: true }, { value: "claude-sonnet-4-5", label: "Claude Sonnet 4.5 (Legacy)", deprecated: true }, { value: "claude-opus-4-6", label: "Claude Opus 4.6 (Legacy)", deprecated: true }, { value: "claude-opus-4-5", label: "Claude Opus 4.5 (Legacy)", deprecated: true }], default: "claude-sonnet-5", description: "Claude model to use", required: true },
741
+ model: { type: "select", label: "Model", allowCustomValue: true, options: [{ value: "claude-fable-5-1", label: "Claude Fable 5.1", deprecated: false }, { value: "claude-opus-5-5", label: "Claude Opus 5.5", deprecated: false }, { value: "claude-sonnet-5-5", label: "Claude Sonnet 5.5", deprecated: false }, { value: "claude-haiku-5-5", label: "Claude Haiku 5.5", deprecated: false }, { value: "claude-fable-5", label: "Claude Fable 5 (Legacy)", deprecated: true }, { value: "claude-sonnet-5", label: "Claude Sonnet 5 (Legacy)", deprecated: true }, { value: "claude-haiku-4-5", label: "Claude Haiku 4.5 (Legacy)", deprecated: true }, { value: "claude-opus-4-8", label: "Claude Opus 4.8 (Legacy)", deprecated: true }, { value: "claude-opus-4-7", label: "Claude Opus 4.7 (Legacy)", deprecated: true }, { value: "claude-sonnet-4-6", label: "Claude Sonnet 4.6 (Legacy)", deprecated: true }, { value: "claude-sonnet-4-5", label: "Claude Sonnet 4.5 (Legacy)", deprecated: true }, { value: "claude-opus-4-6", label: "Claude Opus 4.6 (Legacy)", deprecated: true }, { value: "claude-opus-4-5", label: "Claude Opus 4.5 (Legacy)", deprecated: true }], default: "claude-sonnet-5-5", description: "Claude model to use", required: true },
742
742
  temperature: { type: "slider", label: "Temperature", min: 0, max: 1, default: 1, step: 0.01, description: "Controls randomness (0=focused, 1=creative)" },
743
743
  max_tokens: { type: "number", label: "Max Tokens", min: 1, max: 8192, default: 4096, description: "Maximum tokens to generate", required: true },
744
- thinking_enabled: { type: "toggle", label: "Extended Thinking", default: false, description: "Enable Claude extended thinking for deeper reasoning. Uses output tokens; temperature/top_p are ignored when on. Not shown for Claude Fable and Claude Opus 5.5, which always reason adaptively.", dependsOn: { field: "model", values: ["claude-opus-4-8", "claude-opus-4-7", "claude-opus-4-6", "claude-sonnet-5", "claude-sonnet-4-6", "claude-sonnet-4-5", "claude-haiku-4-5", "claude-opus-4-5"] } },
745
- effort: { type: "select", label: "Reasoning Effort", options: [{ value: "low", label: "Low" }, { value: "medium", label: "Medium" }, { value: "high", label: "High" }, { value: "xhigh", label: "Extra high" }, { value: "max", label: "Max" }], default: "high", description: "How hard Claude reasons and how many tokens it spends overall (output_config.effort). Higher = better quality, more cost/latency. xhigh needs Opus 4.7+/Sonnet 5/Fable; max excludes Opus 4.5. Levels the chosen model does not support are clamped down to the highest it allows.", dependsOn: { field: "model", values: ["claude-fable-5-1", "claude-opus-5-5", "claude-fable-5", "claude-opus-4-8", "claude-opus-4-7", "claude-opus-4-6", "claude-opus-4-5", "claude-sonnet-5", "claude-sonnet-4-6"] } },
744
+ thinking_enabled: { type: "toggle", label: "Extended Thinking", default: false, description: "Enable Claude extended thinking for deeper reasoning. Uses output tokens; temperature/top_p are ignored when on. Not shown for Claude Fable and Claude Opus 5.5, which always reason adaptively. On Claude Sonnet 5.5 and Claude Haiku 5.5, off applies at Reasoning Effort High or below; at Extra high or Max they keep thinking.", dependsOn: { field: "model", values: ["claude-sonnet-5-5", "claude-haiku-5-5", "claude-opus-4-8", "claude-opus-4-7", "claude-opus-4-6", "claude-sonnet-5", "claude-sonnet-4-6", "claude-sonnet-4-5", "claude-haiku-4-5", "claude-opus-4-5"] } },
745
+ effort: { type: "select", label: "Reasoning Effort", options: [{ value: "low", label: "Low" }, { value: "medium", label: "Medium" }, { value: "high", label: "High" }, { value: "xhigh", label: "Extra high" }, { value: "max", label: "Max" }], default: "high", description: "How hard Claude reasons and how many tokens it spends overall (output_config.effort). Higher = better quality, more cost/latency. xhigh needs Opus 4.7+/Sonnet 5+/Haiku 5.5/Fable; max excludes Opus 4.5. Levels the chosen model does not support are clamped down to the highest it allows.", dependsOn: { field: "model", values: ["claude-fable-5-1", "claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5", "claude-fable-5", "claude-opus-4-8", "claude-opus-4-7", "claude-opus-4-6", "claude-opus-4-5", "claude-sonnet-5", "claude-sonnet-4-6"] } },
746
746
  code_execution_enabled: { type: "toggle", label: "Code Execution Sandbox", default: false, description: "Allow this agent to use the Anthropic code_execution sandbox for the download_file/upload_file tools. Off keeps the agent read-only on resources even if the tools are attached." },
747
747
  cache_ttl: { type: "select", label: "System Prompt Cache TTL", options: [{ value: "1h", label: "1 hour (recommended)" }, { value: "5m", label: "5 minutes" }, { value: "off", label: "Disabled" }], default: "1h", description: "Caches system prompt and tool definitions (shared across all conversations on this agent). 1h amortizes the 2\xD7 write premium across concurrent conversations." },
748
748
  cache_ttl_history: { type: "select", label: "Conversation History Cache TTL", options: [{ value: "5m", label: "5 minutes (recommended)" }, { value: "1h", label: "1 hour" }, { value: "off", label: "Disabled" }], default: "5m", description: "Caches per-conversation history. Primary readers are tool-loop iterations (seconds apart) \u2014 5m captures these at 1.25\xD7 write premium instead of 2\xD7. Use 1h only if conversations frequently re-engage between 5min\u20131h." },
@@ -812,14 +812,14 @@ var init_chunk_FJKE7WIF = __esm({
812
812
  // Jev Latest is the bare `jev-latest`: OpenRouter's decisions endpoint refuses
813
813
  // `typesafe/jev-latest` (#4486). `decisions-completion.test.ts` holds every
814
814
  // decisions model offered here to an id that endpoint was measured to serve.
815
- models: ["openai/gpt-6-sol", "openai/gpt-6-astra", "openai/gpt-6-luna", "anthropic/claude-fable-5-1", "anthropic/claude-opus-5-5", "anthropic/claude-sonnet-5", "anthropic/claude-haiku-4-5", "google/gemini-3.1-pro-preview", "google/gemini-3.8-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.1-flash-lite", "x-ai/grok-4.7", "x-ai/grok-4.6", "x-ai/grok-4.5", "x-ai/grok-4.3", "deepseek/deepseek-v4-pro", "deepseek/deepseek-v4.1-flash", "minimax/minimax-m3", "moonshotai/kimi-k3", "z-ai/glm-5.3", "z-ai/glm-5-turbo", "qwen/qwen3.8-max", "qwen/qwen3.7-plus", "qwen/qwen3-coder", "xiaomi/mimo-v2.6-pro", "jev-latest", "typesafe/jev-1.13", "openai/gpt-5.6-sol", "openai/gpt-5.6-terra", "openai/gpt-5.6-luna", "openai/gpt-5.5", "openai/gpt-5.4-mini", "openai/gpt-5.4-nano", "openai/gpt-5.4", "openai/gpt-5.2", "openai/gpt-5.2-chat-latest", "openai/gpt-5.1", "openai/gpt-5", "openai/gpt-5-mini", "openai/gpt-5-nano", "openai/gpt-4.1", "openai/gpt-4.1-mini", "anthropic/claude-fable-5", "anthropic/claude-opus-4-8", "anthropic/claude-opus-4-7", "anthropic/claude-sonnet-4-6", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-6", "anthropic/claude-opus-4-5", "anthropic/claude-opus-4.1", "google/gemini-3.5-flash", "google/gemini-3.1-flash", "google/gemini-3-pro", "google/gemini-3-flash-preview", "google/gemini-2.5-pro", "google/gemini-2.5-flash", "google/gemini-2.5-flash-lite", "x-ai/grok-4.20", "x-ai/grok-4.1", "x-ai/grok-4-heavy", "x-ai/grok-4-fast", "x-ai/grok-4", "deepseek/deepseek-v3.2", "minimax/minimax-m2.7", "moonshotai/kimi-k2.6", "moonshotai/kimi-k2.5", "z-ai/glm-5.1", "z-ai/glm-5", "qwen/qwen3.7-max", "qwen/qwen3.6-plus", "xiaomi/mimo-v2.5-pro", "xiaomi/mimo-v2-pro"],
815
+ models: ["openai/gpt-6.1-sol", "openai/gpt-6-astra", "openai/gpt-6-luna", "anthropic/claude-fable-5-1", "anthropic/claude-opus-5-5", "anthropic/claude-sonnet-5-5", "anthropic/claude-haiku-5-5", "google/gemini-3.1-pro-preview", "google/gemini-3.8-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.1-flash-lite", "x-ai/grok-4.7", "x-ai/grok-4.6", "x-ai/grok-4.5", "x-ai/grok-4.3", "deepseek/deepseek-v4-pro", "deepseek/deepseek-v4.1-flash", "minimax/minimax-m3", "moonshotai/kimi-k3", "z-ai/glm-5.3", "z-ai/glm-5-turbo", "qwen/qwen3.8-max", "qwen/qwen3.7-plus", "qwen/qwen3-coder", "xiaomi/mimo-v2.6-pro", "jev-latest", "typesafe/jev-1.13", "openai/gpt-6-sol", "openai/gpt-5.6-sol", "openai/gpt-5.6-terra", "openai/gpt-5.6-luna", "openai/gpt-5.5", "openai/gpt-5.4-mini", "openai/gpt-5.4-nano", "openai/gpt-5.4", "openai/gpt-5.2", "openai/gpt-5.2-chat-latest", "openai/gpt-5.1", "openai/gpt-5", "openai/gpt-5-mini", "openai/gpt-5-nano", "openai/gpt-4.1", "openai/gpt-4.1-mini", "anthropic/claude-fable-5", "anthropic/claude-sonnet-5", "anthropic/claude-haiku-4-5", "anthropic/claude-opus-4-8", "anthropic/claude-opus-4-7", "anthropic/claude-sonnet-4-6", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-6", "anthropic/claude-opus-4-5", "anthropic/claude-opus-4.1", "google/gemini-3.5-flash", "google/gemini-3.1-flash", "google/gemini-3-pro", "google/gemini-3-flash-preview", "google/gemini-2.5-pro", "google/gemini-2.5-flash", "google/gemini-2.5-flash-lite", "x-ai/grok-4.20", "x-ai/grok-4.1", "x-ai/grok-4-heavy", "x-ai/grok-4-fast", "x-ai/grok-4", "deepseek/deepseek-v3.2", "minimax/minimax-m2.7", "moonshotai/kimi-k2.6", "moonshotai/kimi-k2.5", "z-ai/glm-5.1", "z-ai/glm-5", "qwen/qwen3.7-max", "qwen/qwen3.6-plus", "xiaomi/mimo-v2.5-pro", "xiaomi/mimo-v2-pro"],
816
816
  is_internal: true,
817
817
  is_harness: false,
818
818
  connector_module: "agent",
819
819
  enabled: true,
820
820
  connector_settings_schema: null,
821
821
  agent_settings_schema: {
822
- model: { type: "select", label: "Model", allowCustomValue: true, options: [{ value: "openai/gpt-6-sol", label: "GPT-6 Sol", deprecated: false }, { value: "openai/gpt-6-astra", label: "GPT-6 Astra", deprecated: false }, { value: "openai/gpt-6-luna", label: "GPT-6 Luna", deprecated: false }, { value: "anthropic/claude-fable-5-1", label: "Claude Fable 5.1", deprecated: false }, { value: "anthropic/claude-opus-5-5", label: "Claude Opus 5.5", deprecated: false }, { value: "anthropic/claude-sonnet-5", label: "Claude Sonnet 5", deprecated: false }, { value: "anthropic/claude-haiku-4-5", label: "Claude Haiku 4.5", deprecated: false }, { value: "google/gemini-3.1-pro-preview", label: "Gemini 3.1 Pro (Preview)", deprecated: false }, { value: "google/gemini-3.8-flash", label: "Gemini 3.8 Flash", deprecated: false }, { value: "google/gemini-3.5-flash-lite", label: "Gemini 3.5 Flash-Lite", deprecated: false }, { value: "google/gemini-3.1-flash-lite", label: "Gemini 3.1 Flash-Lite", deprecated: false }, { value: "x-ai/grok-4.7", label: "Grok 4.7", deprecated: false }, { value: "x-ai/grok-4.6", label: "Grok 4.6", deprecated: false }, { value: "x-ai/grok-4.5", label: "Grok 4.5", deprecated: false }, { value: "x-ai/grok-4.3", label: "Grok 4.3", deprecated: false }, { value: "deepseek/deepseek-v4-pro", label: "DeepSeek V4 Pro", deprecated: false }, { value: "deepseek/deepseek-v4.1-flash", label: "DeepSeek V4.1 Flash", deprecated: false }, { value: "minimax/minimax-m3", label: "MiniMax M3", deprecated: false }, { value: "moonshotai/kimi-k3", label: "Kimi K3", deprecated: false }, { value: "z-ai/glm-5.3", label: "GLM-5.3", deprecated: false }, { value: "z-ai/glm-5-turbo", label: "GLM-5-Turbo", deprecated: false }, { value: "qwen/qwen3.8-max", label: "Qwen3.8 Max", deprecated: false }, { value: "qwen/qwen3.7-plus", label: "Qwen3.7 Plus", deprecated: false }, { value: "qwen/qwen3-coder", label: "Qwen3 Coder", deprecated: false }, { value: "xiaomi/mimo-v2.6-pro", label: "MiMo-V2.6-Pro", deprecated: false }, { value: "jev-latest", label: "Jev Latest (decisions)", deprecated: false }, { value: "typesafe/jev-1.13", label: "Jev 1.13 (decisions)", deprecated: false }, { value: "openai/gpt-5.6-sol", label: "GPT-5.6 Sol (Legacy)", deprecated: true }, { value: "openai/gpt-5.6-terra", label: "GPT-5.6 Terra (Legacy)", deprecated: true }, { value: "openai/gpt-5.6-luna", label: "GPT-5.6 Luna (Legacy)", deprecated: true }, { value: "openai/gpt-5.5", label: "GPT-5.5 (Legacy)", deprecated: true }, { value: "openai/gpt-5.4-mini", label: "GPT-5.4 Mini (Legacy)", deprecated: true }, { value: "openai/gpt-5.4-nano", label: "GPT-5.4 Nano (Legacy)", deprecated: true }, { value: "openai/gpt-5.4", label: "GPT-5.4 (Legacy)", deprecated: true }, { value: "openai/gpt-5.2", label: "GPT-5.2 (Legacy)", deprecated: true }, { value: "openai/gpt-5.2-chat-latest", label: "GPT-5.2 Chat (Legacy)", deprecated: true }, { value: "openai/gpt-5.1", label: "GPT-5.1 (Legacy)", deprecated: true }, { value: "openai/gpt-5", label: "GPT-5 (Legacy)", deprecated: true }, { value: "openai/gpt-5-mini", label: "GPT-5 Mini (Legacy)", deprecated: true }, { value: "openai/gpt-5-nano", label: "GPT-5 Nano (Legacy)", deprecated: true }, { value: "openai/gpt-4.1", label: "GPT-4.1 (Legacy)", deprecated: true }, { value: "openai/gpt-4.1-mini", label: "GPT-4.1 Mini (Legacy)", deprecated: true }, { value: "anthropic/claude-fable-5", label: "Claude Fable 5 (Legacy)", deprecated: true }, { value: "anthropic/claude-opus-4-8", label: "Claude Opus 4.8 (Legacy)", deprecated: true }, { value: "anthropic/claude-opus-4-7", label: "Claude Opus 4.7 (Legacy)", deprecated: true }, { value: "anthropic/claude-sonnet-4-6", label: "Claude Sonnet 4.6 (Legacy)", deprecated: true }, { value: "anthropic/claude-sonnet-4-5", label: "Claude Sonnet 4.5 (Legacy)", deprecated: true }, { value: "anthropic/claude-opus-4-6", label: "Claude Opus 4.6 (Legacy)", deprecated: true }, { value: "anthropic/claude-opus-4-5", label: "Claude Opus 4.5 (Legacy)", deprecated: true }, { value: "anthropic/claude-opus-4.1", label: "Claude Opus 4.1 (Legacy)", deprecated: true }, { value: "google/gemini-3.5-flash", label: "Gemini 3.5 Flash (Legacy)", deprecated: true }, { value: "google/gemini-3.1-flash", label: "Gemini 3.1 Flash (Legacy)", deprecated: true }, { value: "google/gemini-3-pro", label: "Gemini 3 Pro (Legacy)", deprecated: true }, { value: "google/gemini-3-flash-preview", label: "Gemini 3 Flash (Legacy)", deprecated: true }, { value: "google/gemini-2.5-pro", label: "Gemini 2.5 Pro (Legacy)", deprecated: true }, { value: "google/gemini-2.5-flash", label: "Gemini 2.5 Flash (Legacy)", deprecated: true }, { value: "google/gemini-2.5-flash-lite", label: "Gemini 2.5 Flash-Lite (Legacy)", deprecated: true }, { value: "x-ai/grok-4.20", label: "Grok 4.20 (Legacy)", deprecated: true }, { value: "x-ai/grok-4.1", label: "Grok 4.1 (Legacy)", deprecated: true }, { value: "x-ai/grok-4-heavy", label: "Grok 4 Heavy (Legacy)", deprecated: true }, { value: "x-ai/grok-4-fast", label: "Grok 4 Fast (Legacy)", deprecated: true }, { value: "x-ai/grok-4", label: "Grok 4 (Legacy)", deprecated: true }, { value: "deepseek/deepseek-v3.2", label: "DeepSeek V3.2 (Legacy)", deprecated: true }, { value: "minimax/minimax-m2.7", label: "MiniMax M2.7 (Legacy)", deprecated: true }, { value: "moonshotai/kimi-k2.6", label: "Kimi K2.6 (Legacy)", deprecated: true }, { value: "moonshotai/kimi-k2.5", label: "Kimi K2.5 (Legacy)", deprecated: true }, { value: "z-ai/glm-5.1", label: "GLM-5.1 (Legacy)", deprecated: true }, { value: "z-ai/glm-5", label: "GLM-5 (Legacy)", deprecated: true }, { value: "qwen/qwen3.7-max", label: "Qwen3.7 Max (Legacy)", deprecated: true }, { value: "qwen/qwen3.6-plus", label: "Qwen3.6 Plus (Legacy)", deprecated: true }, { value: "xiaomi/mimo-v2.5-pro", label: "MiMo-V2.5-Pro (Legacy)", deprecated: true }, { value: "xiaomi/mimo-v2-pro", label: "MiMo-V2-Pro (Legacy)", deprecated: true }], default: "openai/gpt-6-sol", description: "AI model to use", required: true },
822
+ model: { type: "select", label: "Model", allowCustomValue: true, options: [{ value: "openai/gpt-6.1-sol", label: "GPT-6.1 Sol", deprecated: false }, { value: "openai/gpt-6-astra", label: "GPT-6 Astra", deprecated: false }, { value: "openai/gpt-6-luna", label: "GPT-6 Luna", deprecated: false }, { value: "anthropic/claude-fable-5-1", label: "Claude Fable 5.1", deprecated: false }, { value: "anthropic/claude-opus-5-5", label: "Claude Opus 5.5", deprecated: false }, { value: "anthropic/claude-sonnet-5-5", label: "Claude Sonnet 5.5", deprecated: false }, { value: "anthropic/claude-haiku-5-5", label: "Claude Haiku 5.5", deprecated: false }, { value: "google/gemini-3.1-pro-preview", label: "Gemini 3.1 Pro (Preview)", deprecated: false }, { value: "google/gemini-3.8-flash", label: "Gemini 3.8 Flash", deprecated: false }, { value: "google/gemini-3.5-flash-lite", label: "Gemini 3.5 Flash-Lite", deprecated: false }, { value: "google/gemini-3.1-flash-lite", label: "Gemini 3.1 Flash-Lite", deprecated: false }, { value: "x-ai/grok-4.7", label: "Grok 4.7", deprecated: false }, { value: "x-ai/grok-4.6", label: "Grok 4.6", deprecated: false }, { value: "x-ai/grok-4.5", label: "Grok 4.5", deprecated: false }, { value: "x-ai/grok-4.3", label: "Grok 4.3", deprecated: false }, { value: "deepseek/deepseek-v4-pro", label: "DeepSeek V4 Pro", deprecated: false }, { value: "deepseek/deepseek-v4.1-flash", label: "DeepSeek V4.1 Flash", deprecated: false }, { value: "minimax/minimax-m3", label: "MiniMax M3", deprecated: false }, { value: "moonshotai/kimi-k3", label: "Kimi K3", deprecated: false }, { value: "z-ai/glm-5.3", label: "GLM-5.3", deprecated: false }, { value: "z-ai/glm-5-turbo", label: "GLM-5-Turbo", deprecated: false }, { value: "qwen/qwen3.8-max", label: "Qwen3.8 Max", deprecated: false }, { value: "qwen/qwen3.7-plus", label: "Qwen3.7 Plus", deprecated: false }, { value: "qwen/qwen3-coder", label: "Qwen3 Coder", deprecated: false }, { value: "xiaomi/mimo-v2.6-pro", label: "MiMo-V2.6-Pro", deprecated: false }, { value: "jev-latest", label: "Jev Latest (decisions)", deprecated: false }, { value: "typesafe/jev-1.13", label: "Jev 1.13 (decisions)", deprecated: false }, { value: "openai/gpt-6-sol", label: "GPT-6 Sol (Legacy)", deprecated: true }, { value: "openai/gpt-5.6-sol", label: "GPT-5.6 Sol (Legacy)", deprecated: true }, { value: "openai/gpt-5.6-terra", label: "GPT-5.6 Terra (Legacy)", deprecated: true }, { value: "openai/gpt-5.6-luna", label: "GPT-5.6 Luna (Legacy)", deprecated: true }, { value: "openai/gpt-5.5", label: "GPT-5.5 (Legacy)", deprecated: true }, { value: "openai/gpt-5.4-mini", label: "GPT-5.4 Mini (Legacy)", deprecated: true }, { value: "openai/gpt-5.4-nano", label: "GPT-5.4 Nano (Legacy)", deprecated: true }, { value: "openai/gpt-5.4", label: "GPT-5.4 (Legacy)", deprecated: true }, { value: "openai/gpt-5.2", label: "GPT-5.2 (Legacy)", deprecated: true }, { value: "openai/gpt-5.2-chat-latest", label: "GPT-5.2 Chat (Legacy)", deprecated: true }, { value: "openai/gpt-5.1", label: "GPT-5.1 (Legacy)", deprecated: true }, { value: "openai/gpt-5", label: "GPT-5 (Legacy)", deprecated: true }, { value: "openai/gpt-5-mini", label: "GPT-5 Mini (Legacy)", deprecated: true }, { value: "openai/gpt-5-nano", label: "GPT-5 Nano (Legacy)", deprecated: true }, { value: "openai/gpt-4.1", label: "GPT-4.1 (Legacy)", deprecated: true }, { value: "openai/gpt-4.1-mini", label: "GPT-4.1 Mini (Legacy)", deprecated: true }, { value: "anthropic/claude-fable-5", label: "Claude Fable 5 (Legacy)", deprecated: true }, { value: "anthropic/claude-sonnet-5", label: "Claude Sonnet 5 (Legacy)", deprecated: true }, { value: "anthropic/claude-haiku-4-5", label: "Claude Haiku 4.5 (Legacy)", deprecated: true }, { value: "anthropic/claude-opus-4-8", label: "Claude Opus 4.8 (Legacy)", deprecated: true }, { value: "anthropic/claude-opus-4-7", label: "Claude Opus 4.7 (Legacy)", deprecated: true }, { value: "anthropic/claude-sonnet-4-6", label: "Claude Sonnet 4.6 (Legacy)", deprecated: true }, { value: "anthropic/claude-sonnet-4-5", label: "Claude Sonnet 4.5 (Legacy)", deprecated: true }, { value: "anthropic/claude-opus-4-6", label: "Claude Opus 4.6 (Legacy)", deprecated: true }, { value: "anthropic/claude-opus-4-5", label: "Claude Opus 4.5 (Legacy)", deprecated: true }, { value: "anthropic/claude-opus-4.1", label: "Claude Opus 4.1 (Legacy)", deprecated: true }, { value: "google/gemini-3.5-flash", label: "Gemini 3.5 Flash (Legacy)", deprecated: true }, { value: "google/gemini-3.1-flash", label: "Gemini 3.1 Flash (Legacy)", deprecated: true }, { value: "google/gemini-3-pro", label: "Gemini 3 Pro (Legacy)", deprecated: true }, { value: "google/gemini-3-flash-preview", label: "Gemini 3 Flash (Legacy)", deprecated: true }, { value: "google/gemini-2.5-pro", label: "Gemini 2.5 Pro (Legacy)", deprecated: true }, { value: "google/gemini-2.5-flash", label: "Gemini 2.5 Flash (Legacy)", deprecated: true }, { value: "google/gemini-2.5-flash-lite", label: "Gemini 2.5 Flash-Lite (Legacy)", deprecated: true }, { value: "x-ai/grok-4.20", label: "Grok 4.20 (Legacy)", deprecated: true }, { value: "x-ai/grok-4.1", label: "Grok 4.1 (Legacy)", deprecated: true }, { value: "x-ai/grok-4-heavy", label: "Grok 4 Heavy (Legacy)", deprecated: true }, { value: "x-ai/grok-4-fast", label: "Grok 4 Fast (Legacy)", deprecated: true }, { value: "x-ai/grok-4", label: "Grok 4 (Legacy)", deprecated: true }, { value: "deepseek/deepseek-v3.2", label: "DeepSeek V3.2 (Legacy)", deprecated: true }, { value: "minimax/minimax-m2.7", label: "MiniMax M2.7 (Legacy)", deprecated: true }, { value: "moonshotai/kimi-k2.6", label: "Kimi K2.6 (Legacy)", deprecated: true }, { value: "moonshotai/kimi-k2.5", label: "Kimi K2.5 (Legacy)", deprecated: true }, { value: "z-ai/glm-5.1", label: "GLM-5.1 (Legacy)", deprecated: true }, { value: "z-ai/glm-5", label: "GLM-5 (Legacy)", deprecated: true }, { value: "qwen/qwen3.7-max", label: "Qwen3.7 Max (Legacy)", deprecated: true }, { value: "qwen/qwen3.6-plus", label: "Qwen3.6 Plus (Legacy)", deprecated: true }, { value: "xiaomi/mimo-v2.5-pro", label: "MiMo-V2.5-Pro (Legacy)", deprecated: true }, { value: "xiaomi/mimo-v2-pro", label: "MiMo-V2-Pro (Legacy)", deprecated: true }], default: "openai/gpt-6.1-sol", description: "AI model to use", required: true },
823
823
  temperature: { type: "slider", label: "Temperature", min: 0, max: 2, default: 0.7, step: 0.01, description: "Controls randomness (0=focused, 2=creative)" },
824
824
  top_p: { type: "slider", label: "Top P", min: 0, max: 1, default: 1, step: 0.01, description: "Nucleus sampling parameter" },
825
825
  max_tokens: { type: "number", label: "Max Tokens", min: 1, default: 4096, description: "Maximum number of tokens to generate" },
@@ -1555,15 +1555,15 @@ var init_chunk_FJKE7WIF = __esm({
1555
1555
  }
1556
1556
  });
1557
1557
 
1558
- // ../../packages/core/dist/chunk-YX7EL2HJ.js
1558
+ // ../../packages/core/dist/chunk-SNA2DXAC.js
1559
1559
  function catalogToolSideEffects(toolName) {
1560
1560
  const sideEffects = CATALOG_SIDE_EFFECTS.get(toolName);
1561
1561
  if (sideEffects === void 0) return "unknown";
1562
1562
  return sideEffects ? "side_effects" : "none";
1563
1563
  }
1564
1564
  var NATIVE_TOOL_SCHEMAS, WAYAI_CONNECTOR, BASE_NATIVE_TOOLS, NATIVE_TOOLS, CATALOG_SIDE_EFFECTS;
1565
- var init_chunk_YX7EL2HJ = __esm({
1566
- "../../packages/core/dist/chunk-YX7EL2HJ.js"() {
1565
+ var init_chunk_SNA2DXAC = __esm({
1566
+ "../../packages/core/dist/chunk-SNA2DXAC.js"() {
1567
1567
  "use strict";
1568
1568
  NATIVE_TOOL_SCHEMAS = {
1569
1569
  "close_conversation": {
@@ -6587,7 +6587,7 @@ var init_zod = __esm({
6587
6587
  }
6588
6588
  });
6589
6589
 
6590
- // ../../packages/core/dist/chunk-XNDI2XQA.js
6590
+ // ../../packages/core/dist/chunk-3NS3HULK.js
6591
6591
  function visibleLength(s) {
6592
6592
  return s.replace(INVISIBLE_NAME_CHARS, "").length;
6593
6593
  }
@@ -6615,8 +6615,8 @@ function ensureUniqueSlug(slug, used) {
6615
6615
  throw new Error(`slug collision space exhausted for "${slug}"`);
6616
6616
  }
6617
6617
  var SLUG_REGEX, slugSchema, INVISIBLE_NAME_CHARS;
6618
- var init_chunk_XNDI2XQA = __esm({
6619
- "../../packages/core/dist/chunk-XNDI2XQA.js"() {
6618
+ var init_chunk_3NS3HULK = __esm({
6619
+ "../../packages/core/dist/chunk-3NS3HULK.js"() {
6620
6620
  "use strict";
6621
6621
  init_zod();
6622
6622
  SLUG_REGEX = /^[a-z][a-z0-9_]{0,49}$/;
@@ -6882,10 +6882,10 @@ var init_chunk_T7KQKDET = __esm({
6882
6882
  }
6883
6883
  });
6884
6884
 
6885
- // ../../packages/core/dist/chunk-SSN6QPMX.js
6885
+ // ../../packages/core/dist/chunk-2ISUBJG7.js
6886
6886
  var EVAL_PACING_PRESET_NAMES, PACING_INTERVAL_MIN_MS, PACING_INTERVAL_MAX_MS, EVAL_MAX_RUNS_PER_SCENARIO, EVAL_RUN_DEADLINE_MIN_MS, EVAL_RUN_DEADLINE_MAX_MS;
6887
- var init_chunk_SSN6QPMX = __esm({
6888
- "../../packages/core/dist/chunk-SSN6QPMX.js"() {
6887
+ var init_chunk_2ISUBJG7 = __esm({
6888
+ "../../packages/core/dist/chunk-2ISUBJG7.js"() {
6889
6889
  "use strict";
6890
6890
  EVAL_PACING_PRESET_NAMES = ["conservative", "balanced", "fast", "custom"];
6891
6891
  PACING_INTERVAL_MIN_MS = 50;
@@ -6896,7 +6896,7 @@ var init_chunk_SSN6QPMX = __esm({
6896
6896
  }
6897
6897
  });
6898
6898
 
6899
- // ../../packages/core/dist/chunk-IYXLMIWU.js
6899
+ // ../../packages/core/dist/chunk-Z6GKZO4F.js
6900
6900
  function containsKanbanPlaceholders(value) {
6901
6901
  if (value == null) return false;
6902
6902
  const serialized = typeof value === "string" ? value : JSON.stringify(value);
@@ -8142,19 +8142,19 @@ function refineHubAsCodeMonitorRulesOutput(config, ctx) {
8142
8142
  }
8143
8143
  });
8144
8144
  }
8145
- var PLACEHOLDER_TOKENS, ALLOWED_TYPES, SUBSCHEMA_OBJECT_KEYWORDS, SUBSCHEMA_LIST_KEYWORDS, SUBSCHEMA_MAP_KEYWORDS, MAX_SCHEMA_DEPTH, uuidSchema, USER_ID_REGEX, timestampSchema, idParamSchema, clientOptionalString, clientOptionalBoolean, clientOptionalNumber, messageAttachment, MAX_MESSAGE_BODY_BYTES, MAX_ATTACHMENTS_PER_MESSAGE, MESSAGE_ENVELOPE_HEADROOM_BYTES, MAX_AUDIO_FILE_BASE64_BYTES, 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, toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody, PREVIOUS_CONVERSATIONS_MAX, NATIVE_TOOL_NAMES, previousConversationsCountField, summarizationThresholdField, flagConditionSchema, MONITOR_TRIGGERS, monitorTriggerSchema, 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, 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, INSERT_NOTE_TOOL_NAME, RUN_MONITOR_TOOL_NAME, MONITOR_RULE_ALLOWED_NATIVE_TOOLS, MONITOR_RULE_REENTRY_TOOLS, MONITOR_RULE_REENTRY_TRACKS, monitorConfigField, flagConditionsField, agentIdParam, listAgentsQuery, agentConnectionsQuery, createAgentBody, updateAgentBody, AGENT_PARAMETER_TYPES, AGENT_PARAMETER_NAME_REGEX, agentParameterCreateSchema, MAX_AGENT_PARAMETERS_PER_REQUEST, createAgentParametersBody, paginationSchema, evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, evalDateContextSchema, EVAL_FIXTURE_NAME_MAX_LENGTH, evalFixtureOverrideSchema, runSessionQuery, runJourneyQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, evalBody, EVAL_LIST_MAX_LIMIT, evalListLimit, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, EVAL_MAX_SELECTED_SCENARIOS, evalScenarioSelectionEntrySchema, evalScenarioSelectionSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, EVAL_ATTACHMENT_HASH_REGEX, evalAttachmentRef, turnMayCarryAttachments, ATTACHMENTS_USER_ONLY_MESSAGE, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, fixtureField, createJourneyBody, updateJourneyBody, evalSessionConfigResponseSchema, evalSessionResponseSchema, evalSessionListConfigSchema, evalSessionListItemSchema, seedReleaseStatusSchema, EVAL_SESSION_NOT_QUIESCENT, MAX_RESOURCE_FILE_SIZE, CALL_OPENING_LANGUAGES, callOpeningLanguage, CALL_OPENING_MAX_DURATION_MS, CALL_OPENING_MAX_BYTES, CALL_OPENING_CAPTION_MAX_CHARS, CALL_OPENING_CONTENT_TYPES, callOpeningContentType, CALL_OPENING_HASH_REGEX, callOpeningHash, callOpeningCaption, storedCallOpening, MAX_CALL_OPENING_ENCODED_BYTES, MAX_CALL_OPENING_BODY_BYTES, agentCallOpeningParams, putAgentCallOpeningBody, deleteAgentCallOpeningQuery, callOpeningParam, callOpeningQuery, 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_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema;
8146
- var init_chunk_IYXLMIWU = __esm({
8147
- "../../packages/core/dist/chunk-IYXLMIWU.js"() {
8145
+ var PLACEHOLDER_TOKENS, ALLOWED_TYPES, SUBSCHEMA_OBJECT_KEYWORDS, SUBSCHEMA_LIST_KEYWORDS, SUBSCHEMA_MAP_KEYWORDS, MAX_SCHEMA_DEPTH, uuidSchema, USER_ID_REGEX, timestampSchema, idParamSchema, clientOptionalString, clientOptionalBoolean, clientOptionalNumber, messageAttachment, MAX_MESSAGE_BODY_BYTES, MAX_ATTACHMENTS_PER_MESSAGE, MESSAGE_ENVELOPE_HEADROOM_BYTES, MAX_AUDIO_FILE_BASE64_BYTES, 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, toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody, PREVIOUS_CONVERSATIONS_MAX, NATIVE_TOOL_NAMES, previousConversationsCountField, summarizationThresholdField, flagConditionSchema, MONITOR_TRIGGERS, monitorTriggerSchema, 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, 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, INSERT_NOTE_TOOL_NAME, RUN_MONITOR_TOOL_NAME, MONITOR_RULE_ALLOWED_NATIVE_TOOLS, MONITOR_RULE_REENTRY_TOOLS, MONITOR_RULE_REENTRY_TRACKS, monitorConfigField, flagConditionsField, agentIdParam, listAgentsQuery, agentConnectionsQuery, createAgentBody, updateAgentBody, AGENT_PARAMETER_TYPES, AGENT_PARAMETER_NAME_REGEX, agentParameterCreateSchema, MAX_AGENT_PARAMETERS_PER_REQUEST, createAgentParametersBody, evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, evalDateContextSchema, EVAL_FIXTURE_NAME_MAX_LENGTH, evalFixtureOverrideSchema, runSessionQuery, runJourneyQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, evalBody, EVAL_LIST_MAX_LIMIT, evalListLimit, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, EVAL_MAX_SELECTED_SCENARIOS, evalScenarioSelectionEntrySchema, evalScenarioSelectionSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, EVAL_ATTACHMENT_HASH_REGEX, evalAttachmentRef, turnMayCarryAttachments, ATTACHMENTS_USER_ONLY_MESSAGE, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, fixtureField, createJourneyBody, updateJourneyBody, evalSessionConfigResponseSchema, evalSessionResponseSchema, evalSessionListConfigSchema, evalSessionListItemSchema, seedReleaseStatusSchema, EVAL_SESSION_NOT_QUIESCENT, MAX_RESOURCE_FILE_SIZE, CALL_OPENING_LANGUAGES, callOpeningLanguage, CALL_OPENING_MAX_DURATION_MS, CALL_OPENING_MAX_BYTES, CALL_OPENING_CAPTION_MAX_CHARS, CALL_OPENING_CONTENT_TYPES, callOpeningContentType, CALL_OPENING_HASH_REGEX, callOpeningHash, callOpeningCaption, storedCallOpening, MAX_CALL_OPENING_ENCODED_BYTES, MAX_CALL_OPENING_BODY_BYTES, agentCallOpeningParams, putAgentCallOpeningBody, deleteAgentCallOpeningQuery, callOpeningParam, callOpeningQuery, 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_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema;
8146
+ var init_chunk_Z6GKZO4F = __esm({
8147
+ "../../packages/core/dist/chunk-Z6GKZO4F.js"() {
8148
8148
  "use strict";
8149
- init_chunk_YX7EL2HJ();
8149
+ init_chunk_SNA2DXAC();
8150
8150
  init_chunk_IBL7FANV();
8151
8151
  init_chunk_C2UEA2KW();
8152
- init_chunk_XNDI2XQA();
8152
+ init_chunk_3NS3HULK();
8153
8153
  init_chunk_MIWZOSPI();
8154
8154
  init_chunk_JWPRTSIB();
8155
8155
  init_chunk_T7KQKDET();
8156
8156
  init_chunk_L5F7ZOUJ();
8157
- init_chunk_SSN6QPMX();
8157
+ init_chunk_2ISUBJG7();
8158
8158
  init_zod();
8159
8159
  init_zod();
8160
8160
  init_zod();
@@ -8735,10 +8735,6 @@ var init_chunk_IYXLMIWU = __esm({
8735
8735
  agentParameterCreateSchema,
8736
8736
  external_exports.array(agentParameterCreateSchema).max(MAX_AGENT_PARAMETERS_PER_REQUEST, `too many parameters (max ${MAX_AGENT_PARAMETERS_PER_REQUEST})`)
8737
8737
  ]);
8738
- paginationSchema = external_exports.object({
8739
- limit: external_exports.number().int().positive().max(1e3).default(50),
8740
- offset: external_exports.number().int().min(0).default(0)
8741
- }).optional();
8742
8738
  evalIdParam = external_exports.object({
8743
8739
  id: external_exports.string().uuid()
8744
8740
  });
@@ -9262,14 +9258,11 @@ var init_chunk_IYXLMIWU = __esm({
9262
9258
  "agent",
9263
9259
  "agent_parameter",
9264
9260
  "agent_resource",
9261
+ "automation",
9265
9262
  "connection",
9266
9263
  "eval",
9267
9264
  "hub_config",
9268
9265
  "journey",
9269
- "outbound_contact",
9270
- "outbound_list",
9271
- "outbound_list_contact",
9272
- "outbound_schedule",
9273
9266
  "resource",
9274
9267
  "resource_file",
9275
9268
  "state",
@@ -9330,15 +9323,9 @@ var init_chunk_IYXLMIWU = __esm({
9330
9323
  journeys_created: ciSyncCountSchema,
9331
9324
  journeys_updated: ciSyncCountSchema,
9332
9325
  journeys_deleted: ciSyncCountSchema,
9333
- outbound_contacts_created: ciSyncCountSchema,
9334
- outbound_contacts_updated: ciSyncCountSchema,
9335
- outbound_contacts_deleted: ciSyncCountSchema,
9336
- outbound_lists_created: ciSyncCountSchema,
9337
- outbound_lists_updated: ciSyncCountSchema,
9338
- outbound_lists_deleted: ciSyncCountSchema,
9339
- outbound_schedules_created: ciSyncCountSchema,
9340
- outbound_schedules_updated: ciSyncCountSchema,
9341
- outbound_schedules_deleted: ciSyncCountSchema
9326
+ automations_created: ciSyncCountSchema,
9327
+ automations_updated: ciSyncCountSchema,
9328
+ automations_deleted: ciSyncCountSchema
9342
9329
  });
9343
9330
  ciSyncWarningSchema = external_exports.object({
9344
9331
  code: external_exports.string(),
@@ -9357,10 +9344,10 @@ var init_chunk_IYXLMIWU = __esm({
9357
9344
  }
9358
9345
  });
9359
9346
 
9360
- // ../../packages/core/dist/chunk-XJDAH2N7.js
9347
+ // ../../packages/core/dist/chunk-VORPHGDT.js
9361
9348
  var PERMISSIONS;
9362
- var init_chunk_XJDAH2N7 = __esm({
9363
- "../../packages/core/dist/chunk-XJDAH2N7.js"() {
9349
+ var init_chunk_VORPHGDT = __esm({
9350
+ "../../packages/core/dist/chunk-VORPHGDT.js"() {
9364
9351
  "use strict";
9365
9352
  PERMISSIONS = [
9366
9353
  "hub:read",
@@ -9374,13 +9361,14 @@ var init_chunk_XJDAH2N7 = __esm({
9374
9361
  "org:read",
9375
9362
  "org:write",
9376
9363
  "org:admin",
9364
+ "contacts:write",
9377
9365
  "platform:admin",
9378
9366
  "*"
9379
9367
  ];
9380
9368
  }
9381
9369
  });
9382
9370
 
9383
- // ../../packages/core/dist/chunk-GTV7SIKE.js
9371
+ // ../../packages/core/dist/chunk-VIHOXNPF.js
9384
9372
  function refineLaneReferences(val, ctx) {
9385
9373
  const lanes = val.lanes;
9386
9374
  const statuses = val.kanban_statuses;
@@ -9392,6 +9380,17 @@ function refineLaneReferences(val, ctx) {
9392
9380
  function cacheReconcileIdCount(body) {
9393
9381
  return body.conversations.length + body.histories.reduce((n, history) => n + history.conversation_ids.length, 0) + body.threads.length;
9394
9382
  }
9383
+ function normalizeContactPhone(raw) {
9384
+ const compact = raw.trim().replace(/[\s\-.()]/g, "");
9385
+ const withPlus = compact.startsWith("00") ? `+${compact.slice(2)}` : compact;
9386
+ return /^\+[1-9]\d{7,14}$/.test(withPlus) ? withPlus : null;
9387
+ }
9388
+ function normalizeContactLabel(raw) {
9389
+ return raw.trim().replace(/\s+/g, " ").toLowerCase();
9390
+ }
9391
+ function importRowLabels(row, batchLabels) {
9392
+ return [.../* @__PURE__ */ new Set([...row.labels ?? [], ...batchLabels ?? []])];
9393
+ }
9395
9394
  function refineScopedTarget(data, ctx) {
9396
9395
  if (data.scope === "org") {
9397
9396
  if (!data.org_id) {
@@ -9416,15 +9415,33 @@ function refineScopedTarget(data, ctx) {
9416
9415
  }
9417
9416
  }
9418
9417
  }
9419
- var primaryRegionSchema, placementSourceSchema, orgIdParam, orgAdminIdParam, createOrganizationBody, updateOrganizationBody, addOrgAdminBody, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, previewLabelField, createHubBody, updateHubBody, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam, connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, setProductionCredentialBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery, initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody, variantAiModeSchema, experimentStatusSchema, overlayUpdateSchema, experimentIdParam, variantIdParam, listExperimentsQuery, listVariantsQuery, listOverridesQuery, deleteOverrideQuery, createExperimentBody, updateExperimentBody, setExperimentStatusBody, createVariantBody, updateVariantBody, upsertOverrideBody, orgTagIdParam, listOrgTagsQuery, ORG_TAG_NAME_REGEX, ORG_TAG_NAME_MAX_LENGTH, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery, orgResourceIdParam, orgResourceFileIdParam, orgResourceFolderIdParam, hubOrgResourceParam, listOrgResourcesQuery, orgIdQuery, createOrgResourceBody, updateOrgResourceBody, createOrgResourceFolderBody, updateOrgResourceFolderBody, uploadOrgResourceFileBody, updateOrgResourceFileBody, uploadOrgSkillZipBody, linkOrgResourceBody, resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery, navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody, analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlTable, analyticsSqlSchemaQuery, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse, CALL_STATUSES, callStatus, CALL_END_REASONS, callEndReason, CALL_TRANSPORTS, callTransport, CALL_PARTICIPANT_TYPES, callParticipantType, callInstant, MAX_SDP_OFFER_LENGTH, sdpDescription, sdpOffer, MAX_CALL_REQUEST_BODY_BYTES, hubScoped, callSummaryFields, callSummary, callIdParam, createCallBody, createCallResponse, callReadyBody, callHangupBody, callStatusQuery, MAX_REPORTED_DELEGATION_IDS, callDelegationId, callDelegationsBody, callResponse, MAX_CALL_RECORDING_GAPS, callRecordingGap, callRecordingNoteMetadata, evalCallInstant, EVAL_CALL_MIN_SECONDS, EVAL_CALL_MAX_SECONDS, EVAL_CALL_SPOKEN_LINE_MAX_CHARS, hubScoped2, createEvalCallBody, createEvalCallResponse, evalCallConversationQuery, evalCallRecordQuery, evalCallSpeaker, evalCallUtterance, evalCallTurn, evalCallRecording, evalCallRecordResponse, evalCallFinishResponse, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, recordAiDisclosureAcceptanceBody, activityQuery, deletionModeSchema, deletionRequestBody, CACHE_RECONCILE_MAX_IDS, CACHE_RECONCILE_MAX_HUBS, cacheReconcileScopeSchema, cachedConversationPageSchema, cachedHistoryThreadSchema, cachedPeopleThreadSchema, cacheReconcileBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, copilotSuggestBody, copilotSuggestResponse, CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, planKeySchema, billingStatusSchema, billingPlanTypeSchema, dataUsageCountersSchema, REKOR_ENTITLEMENT_CONTRACT_VERSION, entitlementProjectionSchema, rekorEntitlementRefreshMessageSchema, downloadBody, uploadQuery, SIGN_URL_MAX_EXPIRES_IN_SECONDS, signUrlBody, outboundSchemaQuery, templateIdParam, listTemplatesQuery, deleteTemplateQuery, templateStatusQuery, createTemplateBody, updateTemplateBody, submitTemplateBody, testTemplateBody, contactIdParam, listContactsQuery, createContactBody, updateContactBody, listIdParam, listListsQuery, listListContactsQuery, createListBody, updateListBody, addListContactsBody, removeListContactsBody, scheduleIdParam, listSchedulesQuery, listExecutionsQuery, createScheduleBody, updateScheduleBody, VERSION_PART, MOBILE_APP_VERSION_RE, mobileAppVersionSchema, MOBILE_PLATFORMS, mobilePlatformSchema, mobileVersionPolicyQuery, mobileVersionPolicySchema, mobileVersionPolicyResponse, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, dataExplorerDebugDoType, DEBUG_READ_MAX_LIMIT, DEBUG_READ_DEFAULT_LIMIT, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, debugHubConvParam, debugMessageIdQuery, sandboxEgressPolicy, SANDBOX_EXEC_MAX_CMD_LENGTH, SANDBOX_EXEC_MAX_ALLOWLIST, SANDBOX_EXEC_MAX_TIMEOUT_MS, adminSandboxExecBody, META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, stateOperationBody, conversationListResourcesQuery, conversationReadResourceQuery, listPendingSchedulesQuery, listHubAggregateSchedulesQuery, reportSourceSchema, intakeReportSourceSchema, reportClassificationSchema, reportStatusSchema, reportLocaleSchema, reportMessageAuthorRoleSchema, reportMessageSchema, sentryRefStatusSchema, createReportBody, editReportBody, reporterReportSummarySchema, reporterListResponseSchema, getReportResponseSchema, reporterTransitionResponseSchema, contestReportBody, reporterListQuery, listReportsQuery, GITHUB_ISSUE_URL_REGEX, githubIssueUrlSchema, transitionReportBody, groupReportsBody, holdReportBody, clickhouseReadyResponse, bootstrapQuery, MAX_NAME_LENGTH, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody, MAX_NAME_LENGTH2, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam, invitePreviewQuery, inviteRolePreviewResponse, inviteContactPreviewResponse, invitePreviewResponse, inviteUnsubscribeBody, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam, REKOR_ACTOR_TYPE_HEADER, REKOR_ACTOR_ID_HEADER, REKOR_ACTOR_LABEL_HEADER, REKOR_ACTOR_ORG_HEADER, REKOR_ACTOR_ADMIN_HEADER, REKOR_CLIENT_HEADER, REKOR_TOOL_ID_HEADER, REKOR_CLIENTS, rekorClientSchema, MAX_REKOR_TOOL_ID_LENGTH, rekorToolIdSchema, DATA_PROXY_MOUNT, DATA_PROXY_PREFIX, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, BASE_DESTRUCTION_MOUNT, BASE_DESTRUCTION_PREFIX, BASE_DESTRUCTION_CONFIRM_PATH, baseDestructionConfirmBody, BASE_DESTRUCTION_GRACE_MS, BASE_DESTRUCTION_CONFIRM_TTL_MS, BASE_DESTRUCTION_ORG_QUERY_PARAM, baseDestructionQuery, baseDestructionParam, baseDestructionInitiateBody, baseDestructionStatus, baseDestructionRequest, baseDestructionListResponse, baseDestructionInitiateResponse, baseDestructionConfirmResponse, baseDestructionCancelResponse, rekorBaseChangeMessageSchema, PEOPLE_CONTACT_PAGE_MAX, PEOPLE_CONTACT_PAGE_DEFAULT, PEOPLE_CONTACT_EMAIL_MAX_LENGTH, peopleUserIdSchema, peopleInviteEmailSchema, peopleContactInviteBody, peopleContactInviteIdParam, peopleContactUserIdParam, peopleContactBlockBody, peopleContactPageQuery, peopleOutgoingInviteSchema, peopleContactPersonSchema, peopleContactSchema, peopleIncomingInviteSchema, peopleBlockedUserSchema, PEOPLE_THREAD_MESSAGE_MAX_LENGTH, PEOPLE_THREAD_MESSAGES_PAGE_MAX, PEOPLE_THREAD_PAGE_MAX, PEOPLE_THREAD_PAGE_DEFAULT, PEOPLE_GROUP_NAME_MAX_LENGTH, PEOPLE_GROUP_AVATAR_URL_MAX_LENGTH, PEOPLE_THREAD_ATTACHMENT_MAX_BYTES, PEOPLE_THREAD_ATTACHMENT_NAME_MAX_LENGTH, PEOPLE_ATTACHMENT_STORAGE_PER_USER_BYTES, PEOPLE_THREAD_ATTACHMENT_MAX_MB, PEOPLE_THREAD_ATTACHMENT_URL_TTL_SECONDS, PEOPLE_THREAD_ATTACHMENT_URLS_MAX, peopleThreadIdParam, peopleThreadMessageIdParam, peopleThreadListQuery, peopleThreadMessagesQuery, peopleThreadAttachmentUploadSchema, peopleThreadSendBody, peopleThreadAttachmentUrlsBody, peopleThreadReadBody, peopleThreadSettingsBody, peopleGroupNameSchema, peopleGroupAvatarUrlSchema, peopleGroupCreateBody, peopleOrgDirectBody, peopleGroupUpdateBody, peopleGroupInviteBody, peopleOrgErasureBody, peopleGroupLeaveBody, peopleGroupInviteIdParam, peopleGroupIncomingInviteIdParam, peopleGroupMemberParam, peopleThreadKindSchema, peopleThreadMemberSchema, peopleThreadLastMessageSchema, peopleGroupRoleSchema, peopleGroupSummarySchema, peopleThreadSummarySchema, peopleThreadAttachmentSchema, peopleThreadMessageSchema, peopleGroupMemberSchema, peopleGroupSentInviteSchema, peopleGroupIncomingInviteSchema, PEOPLE_REPORT_DETAILS_MAX_LENGTH, peopleReportReasonSchema, reportDetailsSchema, reportFields, peopleReportBody, PEOPLE_MODERATION_NOTE_MAX_LENGTH, ADMIN_PEOPLE_REPORTS_PAGE_MAX, ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT, peopleModerationActionSchema, moderationNoteSchema, adminPeopleReportListQuery, adminPeopleReportIdParam, adminPeopleMessageRemovalBody, adminPeopleSuspendBody, adminPeopleNoteBody, COMMUNITIES_PER_ORG_MAX, COMMUNITY_NAME_MAX_LENGTH, COMMUNITY_REGISTRY_CLOSED_REASON, COMMUNITY_JOIN_SOURCE_MAX_LENGTH, COMMUNITY_JOIN_FLOW_TOKEN_MAX_LENGTH, COMMUNITY_ROOM_NAME_MAX_LENGTH, COMMUNITY_MESSAGE_MAX_LENGTH, COMMUNITY_POST_TITLE_MAX_LENGTH, COMMUNITY_POST_SEARCH_MAX_LENGTH, COMMUNITY_RULES_MAX_LENGTH, COMMUNITY_SLOW_MODE_MAX_SECONDS, communityNameSchema, adminCreateCommunityBody, communityIdParam, communityJoinTokenSchema, communityJoinSourceSchema, communityJoinPreviewQuery, communityJoinBody, communityRoomKindSchema, communityRoomNameSchema, communityRoomIdParam, communityMessageIdParam, communityRoomCreateBody, communityRoomUpdateBody, communityMessagesQuery, communityMessageBodySchema, communityPostTitleSchema, communitySendBody, communityEditBody, communityPostIdParam, communityPostsQuery, communityAnswerBody, communityReadBody, communityPersonParam, communityOrgParam, communityPeopleQuery, communitySettingsBody, communityBanBody, communityLockBody, communityPinBody, communityModLogQuery, communityReportsQuery, communityReportIdParam;
9420
- var init_chunk_GTV7SIKE = __esm({
9421
- "../../packages/core/dist/chunk-GTV7SIKE.js"() {
9418
+ function parseCommunityLessonVideoUrl(url) {
9419
+ const parts = /^https?:\/\/([^/?#]+)([^?#]*)(?:\?([^#]*))?(?:#.*)?$/i.exec(url.trim());
9420
+ if (!parts) return null;
9421
+ const host = parts[1].toLowerCase();
9422
+ const path36 = parts[2] ?? "";
9423
+ const query = parts[3] ?? "";
9424
+ let id;
9425
+ if (host === YOUTU_BE) {
9426
+ id = /^\/([A-Za-z0-9_-]{11})\/?$/.exec(path36)?.[1];
9427
+ } else if (YOUTUBE_HOSTS.has(host)) {
9428
+ if (path36 === "/watch" || path36 === "/watch/") {
9429
+ id = query.split("&").find((param) => param.startsWith("v="))?.slice(2);
9430
+ } else {
9431
+ id = YOUTUBE_ID_PATH.exec(path36)?.[1];
9432
+ }
9433
+ }
9434
+ return id !== void 0 && YOUTUBE_ID.test(id) ? { provider: "youtube", id } : null;
9435
+ }
9436
+ var primaryRegionSchema, placementSourceSchema, orgIdParam, orgAdminIdParam, createOrganizationBody, updateOrganizationBody, addOrgAdminBody, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, previewLabelField, hubTagsField, createHubBody, updateHubBody, HUB_TAG_CHANGE_REFUSED, hubTagChangeRefusalSchema, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam, connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, setProductionCredentialBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery, initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody, variantAiModeSchema, experimentStatusSchema, overlayUpdateSchema, experimentIdParam, variantIdParam, listExperimentsQuery, listVariantsQuery, listOverridesQuery, deleteOverrideQuery, createExperimentBody, updateExperimentBody, setExperimentStatusBody, createVariantBody, updateVariantBody, upsertOverrideBody, orgTagIdParam, listOrgTagsQuery, ORG_TAG_NAME_REGEX, ORG_TAG_NAME_MAX_LENGTH, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery, orgResourceIdParam, orgResourceFileIdParam, orgResourceFolderIdParam, hubOrgResourceParam, listOrgResourcesQuery, orgIdQuery, createOrgResourceBody, updateOrgResourceBody, createOrgResourceFolderBody, updateOrgResourceFolderBody, uploadOrgResourceFileBody, updateOrgResourceFileBody, uploadOrgSkillZipBody, linkOrgResourceBody, resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery, navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody, analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlTable, analyticsSqlSchemaQuery, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse, CALL_STATUSES, callStatus, CALL_END_REASONS, callEndReason, CALL_TRANSPORTS, callTransport, CALL_PARTICIPANT_TYPES, callParticipantType, callInstant, MAX_SDP_OFFER_LENGTH, sdpDescription, sdpOffer, MAX_CALL_REQUEST_BODY_BYTES, hubScoped, callSummaryFields, callSummary, callIdParam, createCallBody, createCallResponse, callReadyBody, callHangupBody, callStatusQuery, MAX_REPORTED_DELEGATION_IDS, callDelegationId, callDelegationsBody, callResponse, MAX_CALL_RECORDING_GAPS, callRecordingGap, callRecordingNoteMetadata, evalCallInstant, EVAL_CALL_MIN_SECONDS, EVAL_CALL_MAX_SECONDS, EVAL_CALL_SPOKEN_LINE_MAX_CHARS, hubScoped2, createEvalCallBody, createEvalCallResponse, evalCallConversationQuery, evalCallRecordQuery, evalCallSpeaker, evalCallUtterance, evalCallTurn, evalCallRecording, evalCallRecordResponse, evalCallFinishResponse, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, recordAiDisclosureAcceptanceBody, activityQuery, deletionModeSchema, deletionRequestBody, CACHE_RECONCILE_MAX_IDS, CACHE_RECONCILE_MAX_HUBS, cacheReconcileScopeSchema, cachedConversationPageSchema, cachedHistoryThreadSchema, cachedPeopleThreadSchema, cacheReconcileBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, copilotSuggestBody, copilotSuggestResponse, CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, planKeySchema, billingStatusSchema, billingPlanTypeSchema, dataUsageCountersSchema, REKOR_ENTITLEMENT_CONTRACT_VERSION, entitlementProjectionSchema, rekorEntitlementRefreshMessageSchema, downloadBody, uploadQuery, SIGN_URL_MAX_EXPIRES_IN_SECONDS, signUrlBody, templateIdParam, listTemplatesQuery, deleteTemplateQuery, templateStatusQuery, createTemplateBody, updateTemplateBody, submitTemplateBody, testTemplateBody, CONTACT_ENVIRONMENTS, CONTACT_NAME_MAX, CONTACT_EMAIL_MAX, CONTACT_PHONE_INPUT_MAX, CONTACT_INSTAGRAM_SID_MAX, CONTACT_METADATA_MAX_BYTES, CONTACT_LABEL_MAX, CONTACT_LABELS_MAX, CONTACT_SCOPE_TAGS_MAX, CONTACT_PAGE_MAX, CONTACT_IMPORT_BATCH_MAX, CONTACT_SEARCH_MAX, CONTACT_LIST_NAME_MAX, CONTACT_LIST_NAME_REGEX, CONTACT_LIST_DESCRIPTION_MAX, CONTACT_LIST_FILTER_MAX, CONTACT_LIST_PINS_PER_REQUEST_MAX, contactName, contactPhone, contactEmail, contactInstagramSid, contactLabel, contactLabels, contactMetadata, scopeTagIds, contactVisibilitySchema, hasIdentity, IDENTITY_REQUIRED, contactBookOrgQuery, contactBookContactParam, contactBookListParam, contactBookHubParam, contactBookPageQuery, listContactBookContactsQuery, listHubContactBookContactsQuery, contactBookLinkCandidatesQuery, listContactBookListMembersQuery, contactRowFields, createContactBookContactBody, updateContactBookContactBody, contactImportRowSchema, importContactBookContactsBody, linkContactBookContactBody, listName, contactListFilterSchema, createContactBookListBody, updateContactBookListBody, updateContactBookListPinsBody, orgListReferenceSchema, AUTOMATION_TRIGGER_TYPES, AUTOMATION_TARGET_TYPES, AUTOMATION_ACTION_TYPES, AUTOMATION_CHANNEL_TYPES, AUTOMATION_NAME_MAX, AUTOMATION_DESCRIPTION_MAX, AUTOMATION_INSTRUCTIONS_MAX, AUTOMATION_TEXT_MAX, AUTOMATION_CRON_MAX, automationTriggerSchema, automationTargetSchema, automationActionSchema, automationName, automationDescription, automationIdParam, automationHubQuery, AUTOMATION_RUNS_PAGE_MAX, listAutomationRunsQuery, createAutomationBody, updateAutomationBody, AUTOMATION_ALERT_CATEGORIES, VERSION_PART, MOBILE_APP_VERSION_RE, mobileAppVersionSchema, MOBILE_PLATFORMS, mobilePlatformSchema, mobileVersionPolicyQuery, mobileVersionPolicySchema, mobileVersionPolicyResponse, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, AUTOMATION_LIST_MAX_CONTACTS_BOUND, automationListMaxContacts, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, dataExplorerDebugDoType, DEBUG_READ_MAX_LIMIT, DEBUG_READ_DEFAULT_LIMIT, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, debugHubConvParam, debugMessageIdQuery, sandboxEgressPolicy, SANDBOX_EXEC_MAX_CMD_LENGTH, SANDBOX_EXEC_MAX_ALLOWLIST, SANDBOX_EXEC_MAX_TIMEOUT_MS, adminSandboxExecBody, META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, stateOperationBody, conversationListResourcesQuery, conversationReadResourceQuery, listPendingSchedulesQuery, listHubAggregateSchedulesQuery, reportSourceSchema, intakeReportSourceSchema, reportClassificationSchema, reportStatusSchema, reportLocaleSchema, reportMessageAuthorRoleSchema, reportMessageSchema, sentryRefStatusSchema, createReportBody, editReportBody, reporterReportSummarySchema, reporterListResponseSchema, getReportResponseSchema, reporterTransitionResponseSchema, contestReportBody, reporterListQuery, listReportsQuery, GITHUB_ISSUE_URL_REGEX, githubIssueUrlSchema, transitionReportBody, groupReportsBody, holdReportBody, clickhouseReadyResponse, bootstrapQuery, MAX_NAME_LENGTH, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody, MAX_NAME_LENGTH2, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam, invitePreviewQuery, inviteRolePreviewResponse, inviteContactPreviewResponse, invitePreviewResponse, inviteUnsubscribeBody, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam, REKOR_ACTOR_TYPE_HEADER, REKOR_ACTOR_ID_HEADER, REKOR_ACTOR_LABEL_HEADER, REKOR_ACTOR_ORG_HEADER, REKOR_ACTOR_ADMIN_HEADER, REKOR_CLIENT_HEADER, REKOR_TOOL_ID_HEADER, REKOR_CLIENTS, rekorClientSchema, MAX_REKOR_TOOL_ID_LENGTH, rekorToolIdSchema, DATA_PROXY_MOUNT, DATA_PROXY_PREFIX, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, BASE_DESTRUCTION_MOUNT, BASE_DESTRUCTION_PREFIX, BASE_DESTRUCTION_CONFIRM_PATH, baseDestructionConfirmBody, BASE_DESTRUCTION_GRACE_MS, BASE_DESTRUCTION_CONFIRM_TTL_MS, BASE_DESTRUCTION_ORG_QUERY_PARAM, baseDestructionQuery, baseDestructionParam, baseDestructionInitiateBody, baseDestructionStatus, baseDestructionRequest, baseDestructionListResponse, baseDestructionInitiateResponse, baseDestructionConfirmResponse, baseDestructionCancelResponse, rekorBaseChangeMessageSchema, PEOPLE_CONTACT_PAGE_MAX, PEOPLE_CONTACT_PAGE_DEFAULT, PEOPLE_CONTACT_EMAIL_MAX_LENGTH, peopleUserIdSchema, peopleInviteEmailSchema, peopleContactInviteBody, peopleContactInviteIdParam, peopleContactUserIdParam, peopleContactBlockBody, peopleContactPageQuery, peopleOutgoingInviteSchema, peopleContactPersonSchema, peopleContactSchema, peopleIncomingInviteSchema, peopleBlockedUserSchema, PEOPLE_THREAD_MESSAGE_MAX_LENGTH, PEOPLE_THREAD_MESSAGES_PAGE_MAX, PEOPLE_THREAD_PAGE_MAX, PEOPLE_THREAD_PAGE_DEFAULT, PEOPLE_GROUP_NAME_MAX_LENGTH, PEOPLE_GROUP_AVATAR_URL_MAX_LENGTH, PEOPLE_THREAD_ATTACHMENT_MAX_BYTES, PEOPLE_THREAD_ATTACHMENT_NAME_MAX_LENGTH, PEOPLE_ATTACHMENT_STORAGE_PER_USER_BYTES, PEOPLE_THREAD_ATTACHMENT_MAX_MB, PEOPLE_THREAD_ATTACHMENT_URL_TTL_SECONDS, PEOPLE_THREAD_ATTACHMENT_URLS_MAX, peopleThreadIdParam, peopleThreadMessageIdParam, peopleThreadListQuery, peopleThreadMessagesQuery, peopleThreadAttachmentUploadSchema, peopleThreadSendBody, peopleThreadAttachmentUrlsBody, peopleThreadReadBody, peopleThreadSettingsBody, peopleGroupNameSchema, peopleGroupAvatarUrlSchema, peopleGroupCreateBody, peopleOrgDirectBody, peopleGroupUpdateBody, peopleGroupInviteBody, peopleOrgErasureBody, peopleGroupLeaveBody, peopleGroupInviteIdParam, peopleGroupIncomingInviteIdParam, peopleGroupMemberParam, peopleThreadKindSchema, peopleThreadMemberSchema, peopleThreadLastMessageSchema, peopleGroupRoleSchema, peopleGroupSummarySchema, peopleThreadSummarySchema, peopleThreadAttachmentSchema, peopleThreadMessageSchema, peopleGroupMemberSchema, peopleGroupSentInviteSchema, peopleGroupIncomingInviteSchema, PEOPLE_REPORT_DETAILS_MAX_LENGTH, peopleReportReasonSchema, reportDetailsSchema, reportFields, peopleReportBody, PEOPLE_MODERATION_NOTE_MAX_LENGTH, ADMIN_PEOPLE_REPORTS_PAGE_MAX, ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT, peopleModerationActionSchema, moderationNoteSchema, adminPeopleReportListQuery, adminPeopleReportIdParam, adminPeopleMessageRemovalBody, adminPeopleSuspendBody, adminPeopleNoteBody, COMMUNITIES_PER_ORG_MAX, COMMUNITY_NAME_MAX_LENGTH, COMMUNITY_REGISTRY_CLOSED_REASON, COMMUNITY_JOIN_SOURCE_MAX_LENGTH, COMMUNITY_JOIN_FLOW_TOKEN_MAX_LENGTH, COMMUNITY_ROOM_NAME_MAX_LENGTH, COMMUNITY_MESSAGE_MAX_LENGTH, COMMUNITY_MESSAGES_PAGE_SIZE, COMMUNITY_ATTACHMENT_URLS_MAX, COMMUNITY_POST_TITLE_MAX_LENGTH, COMMUNITY_POST_SEARCH_MAX_LENGTH, COMMUNITY_RULES_MAX_LENGTH, COMMUNITY_SLOW_MODE_MAX_SECONDS, COMMUNITY_COURSES_LABEL_MAX_LENGTH, COMMUNITY_LIVE_TICKET_PREFIX, communityNameSchema, adminCreateCommunityBody, communityIdParam, communityJoinTokenSchema, communityJoinSourceSchema, communityJoinPreviewQuery, communityJoinBody, communityRoomKindSchema, communityRoomNameSchema, communityRoomIdParam, communityMessageIdParam, communityRoomCreateBody, communityRoomUpdateBody, communityMessagesQuery, communityMessageBodySchema, communityPostTitleSchema, communityAttachmentUploadSchema, communitySendBody, communityEditBody, communityPostIdParam, communityPostsQuery, communityAnswerBody, communityReadBody, communityAttachmentUrlsBody, communityPersonParam, communityOrgParam, communityPeopleQuery, communityCoursesLabelSchema, communitySettingsBody, communityBanBody, communityLockBody, communityPinBody, communityModLogQuery, communityReportsQuery, communityReportIdParam, communityLiveTicketSchema, communityLiveQuery, communityMuteBody, communityEmailUnsubscribeTokenSchema, COMMUNITY_EMAIL_UNSUBSCRIBE_PATH, communityEmailUnsubscribeQuery, COMMUNITY_COURSE_TITLE_MAX_LENGTH, COMMUNITY_COURSE_DESCRIPTION_MAX_LENGTH, COMMUNITY_LESSON_BODY_MAX_LENGTH, COMMUNITY_LESSON_LINKS_MAX, COMMUNITY_LESSON_URL_MAX_LENGTH, YOUTUBE_ID, YOUTUBE_HOSTS, YOUTU_BE, YOUTUBE_ID_PATH, communityCourseIdParam, communityCourseModuleIdParam, communityLessonIdParam, communityCourseTitleSchema, communityCourseDescriptionSchema, communityCoursePositionSchema, communityLessonVideoUrlSchema, communityLessonLinkSchema, communityLessonLinksSchema, communityLessonBodySchema, communityCourseCreateBody, communityCourseUpdateBody, communityModuleCreateBody, communityModuleUpdateBody, communityLessonCreateBody, communityLessonUpdateBody, COMMUNITY_LESSON_TREE_MAX_BYTES, COMMUNITY_LESSON_LINK_PROTOCOLS, LINK_SCHEME;
9437
+ var init_chunk_VIHOXNPF = __esm({
9438
+ "../../packages/core/dist/chunk-VIHOXNPF.js"() {
9422
9439
  "use strict";
9423
- init_chunk_FJKE7WIF();
9424
- init_chunk_IYXLMIWU();
9425
- init_chunk_XNDI2XQA();
9440
+ init_chunk_POL7B3EM();
9441
+ init_chunk_Z6GKZO4F();
9442
+ init_chunk_3NS3HULK();
9426
9443
  init_chunk_MIWZOSPI();
9427
- init_chunk_XJDAH2N7();
9444
+ init_chunk_VORPHGDT();
9428
9445
  init_chunk_JWPRTSIB();
9429
9446
  init_zod();
9430
9447
  init_zod();
@@ -9534,6 +9551,7 @@ var init_chunk_GTV7SIKE = __esm({
9534
9551
  const trimmed = v.trim();
9535
9552
  return trimmed || null;
9536
9553
  });
9554
+ hubTagsField = external_exports.array(external_exports.string()).nullable().optional();
9537
9555
  createHubBody = external_exports.object({
9538
9556
  organization_id: uuidSchema,
9539
9557
  hub_name: external_exports.string().min(1, "hub_name is required"),
@@ -9544,7 +9562,10 @@ var init_chunk_GTV7SIKE = __esm({
9544
9562
  // (change via `wayai relabel` / replicate); the push diff never writes it.
9545
9563
  preview_label: previewLabelField,
9546
9564
  // Write-once at creation; updateHubBody does not accept this.
9547
- primary_region: primaryRegionSchema.optional()
9565
+ primary_region: primaryRegionSchema.optional(),
9566
+ // Org tag ids. Ids that name none of the org's tags are dropped; a hub created with
9567
+ // any is a tag change (`hubTagChangeRefusalSchema`).
9568
+ tags: hubTagsField
9548
9569
  }).passthrough().superRefine(refineLaneReferences);
9549
9570
  updateHubBody = external_exports.object({
9550
9571
  support_model: external_exports.enum(["conversation", "account"]).optional(),
@@ -9589,8 +9610,19 @@ var init_chunk_GTV7SIKE = __esm({
9589
9610
  // connection id on this hub (a REST API (custom tool) connection whose base_url
9590
9611
  // is the Rekor API origin + a bearer/api_key `write:seeds` token). Validated at
9591
9612
  // set-time on the REST PATCH (setup/hubs.ts). Nullable to clear it.
9592
- seed_connection_id: uuidSchema.nullable().optional()
9613
+ seed_connection_id: uuidSchema.nullable().optional(),
9614
+ // Org tag ids, replacing the hub's; null clears them. A change is refused to anyone
9615
+ // but an org admin (`hubTagChangeRefusalSchema`).
9616
+ tags: hubTagsField
9593
9617
  }).passthrough().superRefine(refineLaneReferences);
9618
+ HUB_TAG_CHANGE_REFUSED = "hub_tag_change_requires_org_admin";
9619
+ hubTagChangeRefusalSchema = external_exports.object({
9620
+ reason: external_exports.literal(HUB_TAG_CHANGE_REFUSED),
9621
+ operation: external_exports.enum(["update", "publish"]),
9622
+ hub_id: external_exports.string(),
9623
+ tags_added: external_exports.array(external_exports.string()),
9624
+ tags_removed: external_exports.array(external_exports.string())
9625
+ });
9594
9626
  addHubAdminBody = external_exports.object({
9595
9627
  user_email: external_exports.string().email("valid email is required")
9596
9628
  });
@@ -10343,16 +10375,17 @@ var init_chunk_GTV7SIKE = __esm({
10343
10375
  sender_type: appMessageSenderType.nullish().transform((v) => v ?? void 0),
10344
10376
  receiver_type: appMessageReceiverType.nullish().transform((v) => v ?? void 0),
10345
10377
  // Only meaningful on a team send, where `validateAppTeamSendContext` proves the
10346
- // caller may send to this receiver. The end-user branch ignores it — see the
10347
- // receiver derivation in the route.
10378
+ // caller may send to this receiver. Absent on a team send to a conversation with no
10379
+ // person, which names its `conversation_id` instead. The end-user branch ignores it —
10380
+ // see the receiver derivation in the route.
10348
10381
  user_receiver_id: clientOptionalString,
10349
10382
  // ── Internal consult (consultant-agents PR 2 — H1.0) ──────────────────────
10350
10383
  // A team member handling a customer conversation can tag a `consultant`-role
10351
10384
  // agent for a PRIVATE, team-only exchange that never reaches the customer. A
10352
10385
  // consult send is a team send with `receiver_type: 'agent'` targeting the
10353
- // consultant; the still-required `user_receiver_id` identifies the customer whose
10354
- // conversation this is (and is authorized by `validateAppTeamSendContext`, exactly
10355
- // as a team→user send is). The consultant is resolved from `agent_receiver_id`
10386
+ // consultant; `user_receiver_id` identifies the customer whose conversation this is
10387
+ // (and is authorized by `validateAppTeamSendContext`, exactly as a team→user send is),
10388
+ // and is absent, as on a team→user send, when the conversation has no person. The consultant is resolved from `agent_receiver_id`
10356
10389
  // when supplied, else from an `@mention` parsed out of the message text against
10357
10390
  // the hub's consultant agents. `consult_thread_id` continues an existing thread;
10358
10391
  // absent, the route creates/reuses the single implicit thread. These fields are
@@ -10673,7 +10706,14 @@ var init_chunk_GTV7SIKE = __esm({
10673
10706
  * with it receives thread pushes, whose `data` carries `thread_id` and no `conversation_id`.
10674
10707
  * Each registration states it afresh, so a build that sends none clears it.
10675
10708
  */
10676
- supports_threads: external_exports.boolean().optional()
10709
+ supports_threads: external_exports.boolean().optional(),
10710
+ /**
10711
+ * The build opens a community from a push (gh #4872 Decision 8): only a token registered with it
10712
+ * receives a community's pushes (an announcement, a reply to the member's forum post), whose
10713
+ * `data` is `CommunityPushData` — never a `conversation_id` or a `thread_id`. Each registration
10714
+ * states it afresh, so a build that sends none clears it.
10715
+ */
10716
+ supports_communities: external_exports.boolean().optional()
10677
10717
  });
10678
10718
  deletePushTokenQuery = external_exports.object({
10679
10719
  token: external_exports.string().min(1).max(512)
@@ -11001,7 +11041,7 @@ var init_chunk_GTV7SIKE = __esm({
11001
11041
  });
11002
11042
  sendWhatsAppTemplateBody = external_exports.object({
11003
11043
  hub_id: external_exports.string().uuid(),
11004
- /** HubDO outbound_template.template_id. */
11044
+ /** HubDO message_template.template_id. */
11005
11045
  template_id: external_exports.string().min(1).max(128),
11006
11046
  /** The conversation's end user (customer). Bounded like `claimBody.user_id`. */
11007
11047
  user_receiver_id: external_exports.string().regex(SAFE_USER_ID_REGEX),
@@ -11170,9 +11210,6 @@ var init_chunk_GTV7SIKE = __esm({
11170
11210
  filePath: external_exports.string(),
11171
11211
  expiresIn: external_exports.number().int().positive().max(SIGN_URL_MAX_EXPIRES_IN_SECONDS).optional()
11172
11212
  });
11173
- outboundSchemaQuery = external_exports.object({
11174
- type: external_exports.enum(["whatsapp", "email", "app", "all"]).default("all")
11175
- });
11176
11213
  templateIdParam = external_exports.object({
11177
11214
  id: external_exports.string().uuid()
11178
11215
  });
@@ -11201,103 +11238,203 @@ var init_chunk_GTV7SIKE = __esm({
11201
11238
  hub_id: external_exports.string().uuid(),
11202
11239
  connection_id: external_exports.string().uuid()
11203
11240
  }).passthrough();
11204
- contactIdParam = external_exports.object({
11205
- id: external_exports.string().uuid()
11206
- });
11207
- listContactsQuery = external_exports.object({
11208
- hub_id: external_exports.string().uuid(),
11209
- search: external_exports.string().optional(),
11210
- tags: external_exports.string().optional(),
11211
- // comma-separated
11212
- page: external_exports.coerce.number().int().min(1).default(1),
11213
- per_page: external_exports.coerce.number().int().min(1).max(100).default(25)
11214
- });
11215
- createContactBody = external_exports.object({
11216
- hub_id: external_exports.string().uuid(),
11217
- contact_name: external_exports.string().min(1),
11218
- phone: external_exports.string().optional(),
11219
- email: external_exports.string().email().optional(),
11220
- instagram_sid: external_exports.string().optional(),
11221
- tags: external_exports.array(external_exports.string()).default([]),
11222
- metadata: external_exports.record(external_exports.unknown()).default({}),
11223
- enabled: external_exports.boolean().default(true)
11224
- }).refine(
11225
- (data) => data.phone || data.email || data.instagram_sid,
11226
- { message: "At least one channel (phone, email, or instagram_sid) is required" }
11241
+ CONTACT_ENVIRONMENTS = ["production", "preview", "all"];
11242
+ CONTACT_NAME_MAX = 200;
11243
+ CONTACT_EMAIL_MAX = 320;
11244
+ CONTACT_PHONE_INPUT_MAX = 40;
11245
+ CONTACT_INSTAGRAM_SID_MAX = 64;
11246
+ CONTACT_METADATA_MAX_BYTES = 4096;
11247
+ CONTACT_LABEL_MAX = 64;
11248
+ CONTACT_LABELS_MAX = 20;
11249
+ CONTACT_SCOPE_TAGS_MAX = 20;
11250
+ CONTACT_PAGE_MAX = 100;
11251
+ CONTACT_IMPORT_BATCH_MAX = 500;
11252
+ CONTACT_SEARCH_MAX = 100;
11253
+ CONTACT_LIST_NAME_MAX = 64;
11254
+ CONTACT_LIST_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;
11255
+ CONTACT_LIST_DESCRIPTION_MAX = 1e3;
11256
+ CONTACT_LIST_FILTER_MAX = 20;
11257
+ CONTACT_LIST_PINS_PER_REQUEST_MAX = 100;
11258
+ contactName = external_exports.string().trim().min(1).max(CONTACT_NAME_MAX);
11259
+ contactPhone = external_exports.string().max(CONTACT_PHONE_INPUT_MAX).transform((raw, ctx) => {
11260
+ const phone = normalizeContactPhone(raw);
11261
+ if (phone === null) {
11262
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Phone must be an international number, e.g. +5511999999999" });
11263
+ return external_exports.NEVER;
11264
+ }
11265
+ return phone;
11266
+ });
11267
+ contactEmail = external_exports.string().trim().toLowerCase().max(CONTACT_EMAIL_MAX).email();
11268
+ contactInstagramSid = external_exports.string().trim().min(1).max(CONTACT_INSTAGRAM_SID_MAX);
11269
+ contactLabel = external_exports.string().max(CONTACT_LABEL_MAX).transform(normalizeContactLabel).refine((label) => label.length > 0, "A label cannot be empty").refine((label) => !label.includes(","), "A label cannot contain a comma");
11270
+ contactLabels = external_exports.array(contactLabel).max(CONTACT_LABELS_MAX).transform((labels) => [...new Set(labels)]);
11271
+ contactMetadata = external_exports.record(external_exports.unknown()).refine(
11272
+ (metadata) => new TextEncoder().encode(JSON.stringify(metadata)).length <= CONTACT_METADATA_MAX_BYTES,
11273
+ `Metadata must serialize to at most ${CONTACT_METADATA_MAX_BYTES} bytes`
11227
11274
  );
11228
- updateContactBody = external_exports.object({
11229
- contact_name: external_exports.string().min(1).optional(),
11230
- phone: external_exports.string().nullable().optional(),
11231
- email: external_exports.string().email().nullable().optional(),
11232
- instagram_sid: external_exports.string().nullable().optional(),
11233
- tags: external_exports.array(external_exports.string()).optional(),
11234
- metadata: external_exports.record(external_exports.unknown()).optional(),
11235
- enabled: external_exports.boolean().optional()
11236
- });
11237
- listIdParam = external_exports.object({
11238
- id: external_exports.string().uuid()
11239
- });
11240
- listListsQuery = external_exports.object({
11241
- hub_id: external_exports.string().uuid()
11275
+ scopeTagIds = external_exports.array(external_exports.string().uuid()).min(1).max(CONTACT_SCOPE_TAGS_MAX).transform((ids) => [...new Set(ids)]);
11276
+ contactVisibilitySchema = external_exports.discriminatedUnion("scope", [
11277
+ external_exports.object({ scope: external_exports.literal("all_hubs") }).strict(),
11278
+ external_exports.object({ scope: external_exports.literal("tags"), tag_ids: scopeTagIds }).strict()
11279
+ ]);
11280
+ hasIdentity = (row) => Boolean(row.phone || row.email || row.instagram_sid);
11281
+ IDENTITY_REQUIRED = "A contact needs a phone, an email or an Instagram id";
11282
+ contactBookOrgQuery = external_exports.object({
11283
+ organization_id: external_exports.string().uuid()
11242
11284
  });
11243
- listListContactsQuery = external_exports.object({
11244
- page: external_exports.coerce.number().int().min(1).default(1),
11245
- per_page: external_exports.coerce.number().int().min(1).max(100).default(25)
11285
+ contactBookContactParam = external_exports.object({
11286
+ contactId: external_exports.string().uuid()
11246
11287
  });
11247
- createListBody = external_exports.object({
11248
- hub_id: external_exports.string().uuid(),
11249
- list_name: external_exports.string().min(1),
11250
- description: external_exports.string().nullable().optional()
11288
+ contactBookListParam = external_exports.object({
11289
+ listId: external_exports.string().uuid()
11251
11290
  });
11252
- updateListBody = external_exports.object({
11253
- list_name: external_exports.string().min(1).optional(),
11254
- description: external_exports.string().nullable().optional()
11291
+ contactBookHubParam = external_exports.object({
11292
+ hubId: external_exports.string().uuid()
11255
11293
  });
11256
- addListContactsBody = external_exports.object({
11257
- contact_ids: external_exports.array(external_exports.string().uuid()).min(1)
11294
+ contactBookPageQuery = external_exports.object({
11295
+ cursor: external_exports.string().max(2048).optional(),
11296
+ limit: external_exports.coerce.number().int().min(1).max(CONTACT_PAGE_MAX).default(50)
11297
+ });
11298
+ listContactBookContactsQuery = contactBookOrgQuery.merge(contactBookPageQuery).extend({
11299
+ q: external_exports.string().trim().max(CONTACT_SEARCH_MAX).optional(),
11300
+ label: external_exports.string().max(CONTACT_LABEL_MAX).transform(normalizeContactLabel).optional(),
11301
+ scope_tag_id: external_exports.string().uuid().optional()
11302
+ });
11303
+ listHubContactBookContactsQuery = contactBookPageQuery.extend({
11304
+ q: external_exports.string().trim().max(CONTACT_SEARCH_MAX).optional()
11305
+ });
11306
+ contactBookLinkCandidatesQuery = contactBookOrgQuery.extend({
11307
+ email: contactEmail
11308
+ });
11309
+ listContactBookListMembersQuery = contactBookOrgQuery.merge(contactBookPageQuery);
11310
+ contactRowFields = {
11311
+ name: contactName,
11312
+ phone: contactPhone.nullish(),
11313
+ email: contactEmail.nullish(),
11314
+ instagram_sid: contactInstagramSid.nullish(),
11315
+ labels: contactLabels.optional(),
11316
+ metadata: contactMetadata.optional()
11317
+ };
11318
+ createContactBookContactBody = external_exports.object({
11319
+ organization_id: external_exports.string().uuid(),
11320
+ ...contactRowFields,
11321
+ visibility: contactVisibilitySchema,
11322
+ environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional()
11323
+ }).strict().refine(hasIdentity, IDENTITY_REQUIRED);
11324
+ updateContactBookContactBody = external_exports.object({
11325
+ name: contactName.optional(),
11326
+ phone: contactPhone.nullable().optional(),
11327
+ email: contactEmail.nullable().optional(),
11328
+ instagram_sid: contactInstagramSid.nullable().optional(),
11329
+ labels: contactLabels.optional(),
11330
+ metadata: contactMetadata.optional(),
11331
+ visibility: contactVisibilitySchema.optional(),
11332
+ environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional()
11333
+ }).strict();
11334
+ contactImportRowSchema = external_exports.object(contactRowFields).strict().refine(hasIdentity, IDENTITY_REQUIRED);
11335
+ importContactBookContactsBody = external_exports.object({
11336
+ organization_id: external_exports.string().uuid(),
11337
+ visibility: contactVisibilitySchema,
11338
+ environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional(),
11339
+ labels: contactLabels.optional(),
11340
+ rows: external_exports.array(contactImportRowSchema).min(1).max(CONTACT_IMPORT_BATCH_MAX)
11341
+ }).strict().superRefine((batch, ctx) => {
11342
+ batch.rows.forEach((row, index) => {
11343
+ if (importRowLabels(row, batch.labels).length > CONTACT_LABELS_MAX) {
11344
+ ctx.addIssue({
11345
+ code: external_exports.ZodIssueCode.custom,
11346
+ path: ["rows", index, "labels"],
11347
+ message: `A contact holds at most ${CONTACT_LABELS_MAX} labels, the batch's included`
11348
+ });
11349
+ }
11350
+ });
11258
11351
  });
11259
- removeListContactsBody = external_exports.object({
11260
- contact_ids: external_exports.array(external_exports.string().uuid()).min(1)
11352
+ linkContactBookContactBody = external_exports.object({
11353
+ user_id: external_exports.string().min(1).max(128)
11354
+ }).strict();
11355
+ listName = external_exports.string().trim().min(1).max(CONTACT_LIST_NAME_MAX).regex(CONTACT_LIST_NAME_REGEX, {
11356
+ message: 'Must be lowercase alphanumeric with hyphens (e.g. "vip-customers")'
11261
11357
  });
11262
- scheduleIdParam = external_exports.object({
11358
+ contactListFilterSchema = external_exports.object({
11359
+ labels: external_exports.array(contactLabel).max(CONTACT_LIST_FILTER_MAX).transform((l) => [...new Set(l)]).default([]),
11360
+ scope_tag_ids: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_FILTER_MAX).transform((t) => [...new Set(t)]).default([])
11361
+ }).strict();
11362
+ createContactBookListBody = external_exports.object({
11363
+ organization_id: external_exports.string().uuid(),
11364
+ name: listName,
11365
+ description: external_exports.string().max(CONTACT_LIST_DESCRIPTION_MAX).nullish(),
11366
+ filter: contactListFilterSchema.optional()
11367
+ }).strict();
11368
+ updateContactBookListBody = external_exports.object({
11369
+ name: listName.optional(),
11370
+ description: external_exports.string().max(CONTACT_LIST_DESCRIPTION_MAX).nullable().optional(),
11371
+ filter: contactListFilterSchema.optional()
11372
+ }).strict();
11373
+ updateContactBookListPinsBody = external_exports.object({
11374
+ add: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_PINS_PER_REQUEST_MAX).default([]),
11375
+ remove: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_PINS_PER_REQUEST_MAX).default([])
11376
+ }).strict().refine((b) => b.add.length + b.remove.length > 0, "Add or remove at least one contact");
11377
+ orgListReferenceSchema = listName;
11378
+ AUTOMATION_TRIGGER_TYPES = ["schedule", "event", "webhook"];
11379
+ AUTOMATION_TARGET_TYPES = ["none", "contact_list"];
11380
+ AUTOMATION_ACTION_TYPES = ["run_agent", "send_message"];
11381
+ AUTOMATION_CHANNEL_TYPES = ["whatsapp", "instagram", "email", "app"];
11382
+ AUTOMATION_NAME_MAX = 100;
11383
+ AUTOMATION_DESCRIPTION_MAX = 1e3;
11384
+ AUTOMATION_INSTRUCTIONS_MAX = 1e4;
11385
+ AUTOMATION_TEXT_MAX = 4096;
11386
+ AUTOMATION_CRON_MAX = 512;
11387
+ automationTriggerSchema = external_exports.object({
11388
+ type: external_exports.enum(AUTOMATION_TRIGGER_TYPES),
11389
+ cron: external_exports.string().trim().min(1).max(AUTOMATION_CRON_MAX).optional(),
11390
+ timezone: external_exports.string().trim().min(1).optional()
11391
+ }).strict();
11392
+ automationTargetSchema = external_exports.object({
11393
+ type: external_exports.enum(AUTOMATION_TARGET_TYPES),
11394
+ org_list: orgListReferenceSchema.optional()
11395
+ }).strict();
11396
+ automationActionSchema = external_exports.object({
11397
+ type: external_exports.enum(AUTOMATION_ACTION_TYPES),
11398
+ channel: external_exports.enum(AUTOMATION_CHANNEL_TYPES).optional(),
11399
+ connection_id: external_exports.string().uuid().nullable().optional(),
11400
+ template_id: external_exports.string().uuid().nullable().optional(),
11401
+ text: external_exports.string().max(AUTOMATION_TEXT_MAX).nullable().optional(),
11402
+ agent_id: external_exports.string().uuid().nullable().optional(),
11403
+ instructions: external_exports.string().max(AUTOMATION_INSTRUCTIONS_MAX).nullable().optional()
11404
+ }).strict();
11405
+ automationName = external_exports.string().trim().min(1).max(AUTOMATION_NAME_MAX);
11406
+ automationDescription = external_exports.string().max(AUTOMATION_DESCRIPTION_MAX).nullable().optional();
11407
+ automationIdParam = external_exports.object({
11263
11408
  id: external_exports.string().uuid()
11264
11409
  });
11265
- listSchedulesQuery = external_exports.object({
11410
+ automationHubQuery = external_exports.object({
11266
11411
  hub_id: external_exports.string().uuid()
11267
11412
  });
11268
- listExecutionsQuery = external_exports.object({
11413
+ AUTOMATION_RUNS_PAGE_MAX = 50;
11414
+ listAutomationRunsQuery = external_exports.object({
11415
+ hub_id: external_exports.string().uuid(),
11269
11416
  page: external_exports.coerce.number().int().min(1).default(1),
11270
- per_page: external_exports.coerce.number().int().min(1).max(50).default(10)
11417
+ per_page: external_exports.coerce.number().int().min(1).max(AUTOMATION_RUNS_PAGE_MAX).default(10)
11271
11418
  });
11272
- createScheduleBody = external_exports.object({
11419
+ createAutomationBody = external_exports.object({
11273
11420
  hub_id: external_exports.string().uuid(),
11274
- schedule_name: external_exports.string().min(1),
11275
- description: external_exports.string().nullable().optional(),
11276
- cron_expression: external_exports.string().min(1),
11277
- timezone: external_exports.string().default("UTC"),
11278
- list_id: external_exports.string().uuid(),
11279
- channel_type: external_exports.enum(["whatsapp", "instagram", "email", "app"]),
11280
- connection_id: external_exports.string().uuid().nullable().optional(),
11281
- execution_mode: external_exports.enum(["direct_message", "agent_trigger"]).default("direct_message"),
11282
- template_whatsapp_id: external_exports.string().uuid().nullable().optional(),
11283
- initial_message: external_exports.string().nullable().optional(),
11284
- agent_id: external_exports.string().uuid().nullable().optional(),
11285
- trigger_message: external_exports.string().nullable().optional()
11286
- });
11287
- updateScheduleBody = external_exports.object({
11288
- schedule_name: external_exports.string().min(1).optional(),
11289
- description: external_exports.string().nullable().optional(),
11290
- cron_expression: external_exports.string().min(1).optional(),
11291
- timezone: external_exports.string().optional(),
11292
- list_id: external_exports.string().uuid().optional(),
11293
- channel_type: external_exports.enum(["whatsapp", "instagram", "email", "app"]).optional(),
11294
- connection_id: external_exports.string().uuid().nullable().optional(),
11295
- execution_mode: external_exports.enum(["direct_message", "agent_trigger"]).optional(),
11296
- template_whatsapp_id: external_exports.string().uuid().nullable().optional(),
11297
- initial_message: external_exports.string().nullable().optional(),
11298
- agent_id: external_exports.string().uuid().nullable().optional(),
11299
- trigger_message: external_exports.string().nullable().optional()
11300
- });
11421
+ name: automationName,
11422
+ description: automationDescription,
11423
+ trigger: automationTriggerSchema,
11424
+ target: automationTargetSchema,
11425
+ action: automationActionSchema
11426
+ }).strict();
11427
+ updateAutomationBody = external_exports.object({
11428
+ name: automationName.optional(),
11429
+ description: automationDescription,
11430
+ trigger: automationTriggerSchema.optional(),
11431
+ target: automationTargetSchema.optional(),
11432
+ action: automationActionSchema.optional()
11433
+ }).strict();
11434
+ AUTOMATION_ALERT_CATEGORIES = {
11435
+ list_not_found: "automation_list_not_found",
11436
+ list_over_cap: "automation_list_over_cap"
11437
+ };
11301
11438
  VERSION_PART = "(0|[1-9][0-9]{0,5})";
11302
11439
  MOBILE_APP_VERSION_RE = new RegExp(`^${VERSION_PART}\\.${VERSION_PART}\\.${VERSION_PART}$`);
11303
11440
  mobileAppVersionSchema = external_exports.string().regex(MOBILE_APP_VERSION_RE, "must be a MAJOR.MINOR.PATCH version, e.g. 1.0.0");
@@ -11398,6 +11535,8 @@ var init_chunk_GTV7SIKE = __esm({
11398
11535
  });
11399
11536
  MAX_VOICE_CALL_MINUTE_OPS = 60;
11400
11537
  voiceCallMinuteOps = external_exports.number().int().min(0).max(MAX_VOICE_CALL_MINUTE_OPS);
11538
+ AUTOMATION_LIST_MAX_CONTACTS_BOUND = 1e4;
11539
+ automationListMaxContacts = external_exports.number().int().min(1).max(AUTOMATION_LIST_MAX_CONTACTS_BOUND);
11401
11540
  updatePlatformConfigBody = external_exports.object({
11402
11541
  free_plan_max_free_orgs_per_user: external_exports.number().int().min(0).optional(),
11403
11542
  /** Kill switch for admin debug-read endpoints. 0 = off, 1 = on. */
@@ -11437,6 +11576,8 @@ var init_chunk_GTV7SIKE = __esm({
11437
11576
  * `wayai admin communities enable|disable` flips this.
11438
11577
  */
11439
11578
  communities_enabled: external_exports.number().int().min(0).max(1).optional(),
11579
+ /** The most contacts one automation fire reaches (`automationListMaxContacts`). */
11580
+ automation_list_max_contacts: automationListMaxContacts.optional(),
11440
11581
  /**
11441
11582
  * The mobile app version policy (`MOBILE_VERSION_POLICY_COLUMNS`), per platform: an install
11442
11583
  * below the minimum is blocked until it updates from the store; one below the recommended
@@ -11469,8 +11610,6 @@ var init_chunk_GTV7SIKE = __esm({
11469
11610
  "connection",
11470
11611
  "eval",
11471
11612
  "mcp_tool",
11472
- "outbound_contact",
11473
- "outbound_schedule",
11474
11613
  "resource",
11475
11614
  "resource_folder",
11476
11615
  "tool"
@@ -11589,7 +11728,7 @@ var init_chunk_GTV7SIKE = __esm({
11589
11728
  /** Filter to specific DO types (default: all) */
11590
11729
  do_types: external_exports.array(pitrDoNamespace).optional()
11591
11730
  });
11592
- dataExplorerDebugDoType = external_exports.enum(["hub", "org", "conversation", "user", "platform", "thread", "community"]);
11731
+ dataExplorerDebugDoType = external_exports.enum(["hub", "org", "conversation", "user", "platform", "thread", "community", "contact_book"]);
11593
11732
  DEBUG_READ_MAX_LIMIT = 100;
11594
11733
  DEBUG_READ_DEFAULT_LIMIT = 20;
11595
11734
  DEBUG_DO_HEX_PREFIX = "hex:";
@@ -12415,10 +12554,14 @@ var init_chunk_GTV7SIKE = __esm({
12415
12554
  COMMUNITY_JOIN_FLOW_TOKEN_MAX_LENGTH = 128;
12416
12555
  COMMUNITY_ROOM_NAME_MAX_LENGTH = 100;
12417
12556
  COMMUNITY_MESSAGE_MAX_LENGTH = 4e3;
12557
+ COMMUNITY_MESSAGES_PAGE_SIZE = 50;
12558
+ COMMUNITY_ATTACHMENT_URLS_MAX = COMMUNITY_MESSAGES_PAGE_SIZE + 2;
12418
12559
  COMMUNITY_POST_TITLE_MAX_LENGTH = 200;
12419
12560
  COMMUNITY_POST_SEARCH_MAX_LENGTH = 100;
12420
12561
  COMMUNITY_RULES_MAX_LENGTH = 4e3;
12421
12562
  COMMUNITY_SLOW_MODE_MAX_SECONDS = 21600;
12563
+ COMMUNITY_COURSES_LABEL_MAX_LENGTH = 16;
12564
+ COMMUNITY_LIVE_TICKET_PREFIX = "cst";
12422
12565
  communityNameSchema = external_exports.string().trim().min(1).max(COMMUNITY_NAME_MAX_LENGTH);
12423
12566
  adminCreateCommunityBody = external_exports.object({ org_id: uuidSchema, name: communityNameSchema }).strict();
12424
12567
  communityIdParam = external_exports.object({ communityId: uuidSchema });
@@ -12442,12 +12585,14 @@ var init_chunk_GTV7SIKE = __esm({
12442
12585
  }).refine((q) => q.before === void 0 || q.after === void 0, "before and after cannot be combined");
12443
12586
  communityMessageBodySchema = external_exports.string().max(COMMUNITY_MESSAGE_MAX_LENGTH).refine((body) => body.trim().length > 0, "must not be empty");
12444
12587
  communityPostTitleSchema = external_exports.string().trim().min(1).max(COMMUNITY_POST_TITLE_MAX_LENGTH);
12588
+ communityAttachmentUploadSchema = peopleThreadAttachmentUploadSchema;
12445
12589
  communitySendBody = external_exports.object({
12446
- body: communityMessageBodySchema,
12590
+ body: external_exports.string().max(COMMUNITY_MESSAGE_MAX_LENGTH).default(""),
12447
12591
  client_message_id: uuidSchema.optional(),
12448
12592
  title: communityPostTitleSchema.optional(),
12449
- parent_message_id: uuidSchema.optional()
12450
- }).strict().refine((b) => b.title === void 0 || b.parent_message_id === void 0, "a post is not a reply: send a title or a parent_message_id, not both");
12593
+ parent_message_id: uuidSchema.optional(),
12594
+ attachment: communityAttachmentUploadSchema.optional()
12595
+ }).strict().refine((b) => b.title === void 0 || b.parent_message_id === void 0, "a post is not a reply: send a title or a parent_message_id, not both").refine((b) => b.body.trim().length > 0 || b.attachment !== void 0, { message: "must not be empty", path: ["body"] });
12451
12596
  communityEditBody = external_exports.object({ body: communityMessageBodySchema, title: communityPostTitleSchema.optional() }).strict();
12452
12597
  communityPostIdParam = external_exports.object({ communityId: uuidSchema, roomId: uuidSchema, postId: uuidSchema });
12453
12598
  communityPostsQuery = external_exports.object({
@@ -12457,13 +12602,16 @@ var init_chunk_GTV7SIKE = __esm({
12457
12602
  });
12458
12603
  communityAnswerBody = external_exports.object({ reply_id: uuidSchema.nullable() }).strict();
12459
12604
  communityReadBody = external_exports.object({ seq: external_exports.number().int().min(0) }).strict();
12605
+ communityAttachmentUrlsBody = external_exports.object({ attachment_ids: external_exports.array(uuidSchema).min(1).max(COMMUNITY_ATTACHMENT_URLS_MAX) }).strict();
12460
12606
  communityPersonParam = external_exports.object({ communityId: uuidSchema, userId: peopleUserIdSchema });
12461
12607
  communityOrgParam = external_exports.object({ orgId: uuidSchema });
12462
12608
  communityPeopleQuery = external_exports.object({ after: peopleUserIdSchema.optional() });
12609
+ communityCoursesLabelSchema = external_exports.string().trim().max(COMMUNITY_COURSES_LABEL_MAX_LENGTH);
12463
12610
  communitySettingsBody = external_exports.object({
12464
12611
  rules: external_exports.string().trim().max(COMMUNITY_RULES_MAX_LENGTH).nullable().optional().transform((rules) => rules === "" ? null : rules),
12465
- slow_mode_seconds: external_exports.number().int().min(0).max(COMMUNITY_SLOW_MODE_MAX_SECONDS).optional()
12466
- }).strict().refine((b) => b.rules !== void 0 || b.slow_mode_seconds !== void 0, "nothing to change");
12612
+ slow_mode_seconds: external_exports.number().int().min(0).max(COMMUNITY_SLOW_MODE_MAX_SECONDS).optional(),
12613
+ courses_label: communityCoursesLabelSchema.optional()
12614
+ }).strict().refine((b) => b.rules !== void 0 || b.slow_mode_seconds !== void 0 || b.courses_label !== void 0, "nothing to change");
12467
12615
  communityBanBody = external_exports.object({ delete_messages: external_exports.boolean().optional() }).strict();
12468
12616
  communityLockBody = external_exports.object({ locked: external_exports.boolean() }).strict();
12469
12617
  communityPinBody = external_exports.object({ pinned: external_exports.boolean() }).strict();
@@ -12472,6 +12620,71 @@ var init_chunk_GTV7SIKE = __esm({
12472
12620
  pending: external_exports.enum(["true", "false"]).optional().transform((value) => value === "true")
12473
12621
  });
12474
12622
  communityReportIdParam = external_exports.object({ communityId: uuidSchema, reportId: uuidSchema });
12623
+ communityLiveTicketSchema = external_exports.string().regex(new RegExp(`^${COMMUNITY_LIVE_TICKET_PREFIX}_[A-Za-z0-9_-]{43}$`));
12624
+ communityLiveQuery = external_exports.object({ ticket: communityLiveTicketSchema });
12625
+ communityMuteBody = external_exports.object({ muted: external_exports.boolean() }).strict();
12626
+ communityEmailUnsubscribeTokenSchema = external_exports.string().max(200).regex(/^[0-9a-f-]{36}\.[A-Za-z0-9_-]{1,64}\.[0-9a-f]{64}$/i);
12627
+ COMMUNITY_EMAIL_UNSUBSCRIBE_PATH = "/api/communities/email-unsubscribe";
12628
+ communityEmailUnsubscribeQuery = external_exports.object({ token: communityEmailUnsubscribeTokenSchema });
12629
+ COMMUNITY_COURSE_TITLE_MAX_LENGTH = 200;
12630
+ COMMUNITY_COURSE_DESCRIPTION_MAX_LENGTH = 2e3;
12631
+ COMMUNITY_LESSON_BODY_MAX_LENGTH = 2e4;
12632
+ COMMUNITY_LESSON_LINKS_MAX = 10;
12633
+ COMMUNITY_LESSON_URL_MAX_LENGTH = 2e3;
12634
+ YOUTUBE_ID = /^[A-Za-z0-9_-]{11}$/;
12635
+ YOUTUBE_HOSTS = /* @__PURE__ */ new Set(["youtube.com", "www.youtube.com", "m.youtube.com", "youtube-nocookie.com", "www.youtube-nocookie.com"]);
12636
+ YOUTU_BE = "youtu.be";
12637
+ YOUTUBE_ID_PATH = /^\/(?:embed|shorts|live|v)\/([A-Za-z0-9_-]{11})\/?$/;
12638
+ communityCourseIdParam = external_exports.object({ communityId: uuidSchema, courseId: uuidSchema });
12639
+ communityCourseModuleIdParam = external_exports.object({ communityId: uuidSchema, courseId: uuidSchema, moduleId: uuidSchema });
12640
+ communityLessonIdParam = external_exports.object({ communityId: uuidSchema, courseId: uuidSchema, lessonId: uuidSchema });
12641
+ communityCourseTitleSchema = external_exports.string().trim().min(1).max(COMMUNITY_COURSE_TITLE_MAX_LENGTH);
12642
+ communityCourseDescriptionSchema = external_exports.string().trim().max(COMMUNITY_COURSE_DESCRIPTION_MAX_LENGTH);
12643
+ communityCoursePositionSchema = external_exports.number().int().min(0);
12644
+ communityLessonVideoUrlSchema = external_exports.string().trim().max(COMMUNITY_LESSON_URL_MAX_LENGTH).transform((url, ctx) => {
12645
+ const video = parseCommunityLessonVideoUrl(url);
12646
+ if (video) return video;
12647
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Only a YouTube video URL is accepted" });
12648
+ return external_exports.NEVER;
12649
+ });
12650
+ communityLessonLinkSchema = external_exports.object({
12651
+ title: communityCourseTitleSchema,
12652
+ url: external_exports.string().trim().max(COMMUNITY_LESSON_URL_MAX_LENGTH).url().refine((url) => /^https?:\/\//i.test(url), "must be an http or https URL")
12653
+ }).strict();
12654
+ communityLessonLinksSchema = external_exports.array(communityLessonLinkSchema).max(COMMUNITY_LESSON_LINKS_MAX);
12655
+ communityLessonBodySchema = external_exports.string().max(COMMUNITY_LESSON_BODY_MAX_LENGTH);
12656
+ communityCourseCreateBody = external_exports.object({ title: communityCourseTitleSchema, description: communityCourseDescriptionSchema.optional() }).strict();
12657
+ communityCourseUpdateBody = external_exports.object({
12658
+ title: communityCourseTitleSchema.optional(),
12659
+ description: communityCourseDescriptionSchema.optional(),
12660
+ position: communityCoursePositionSchema.optional(),
12661
+ published: external_exports.boolean().optional()
12662
+ }).strict().refine((b) => Object.values(b).some((value) => value !== void 0), "nothing to change");
12663
+ communityModuleCreateBody = external_exports.object({ title: communityCourseTitleSchema }).strict();
12664
+ communityModuleUpdateBody = external_exports.object({ title: communityCourseTitleSchema.optional(), position: communityCoursePositionSchema.optional() }).strict().refine((b) => b.title !== void 0 || b.position !== void 0, "nothing to change");
12665
+ communityLessonCreateBody = external_exports.object({
12666
+ module_id: uuidSchema,
12667
+ title: communityCourseTitleSchema,
12668
+ video_url: communityLessonVideoUrlSchema.nullable().optional(),
12669
+ body: communityLessonBodySchema.optional(),
12670
+ links: communityLessonLinksSchema.optional(),
12671
+ room_id: uuidSchema.nullable().optional(),
12672
+ requires_paid_plan: external_exports.boolean().optional()
12673
+ }).strict();
12674
+ communityLessonUpdateBody = external_exports.object({
12675
+ module_id: uuidSchema.optional(),
12676
+ title: communityCourseTitleSchema.optional(),
12677
+ video_url: communityLessonVideoUrlSchema.nullable().optional(),
12678
+ body: communityLessonBodySchema.optional(),
12679
+ links: communityLessonLinksSchema.optional(),
12680
+ room_id: uuidSchema.nullable().optional(),
12681
+ requires_paid_plan: external_exports.boolean().optional(),
12682
+ position: communityCoursePositionSchema.optional(),
12683
+ published: external_exports.boolean().optional()
12684
+ }).strict().refine((b) => Object.values(b).some((value) => value !== void 0), "nothing to change");
12685
+ COMMUNITY_LESSON_TREE_MAX_BYTES = 512 * 1024;
12686
+ COMMUNITY_LESSON_LINK_PROTOCOLS = ["http", "https", "mailto"];
12687
+ LINK_SCHEME = new RegExp(`^(${COMMUNITY_LESSON_LINK_PROTOCOLS.join("|")}):`, "i");
12475
12688
  }
12476
12689
  });
12477
12690
 
@@ -12574,20 +12787,20 @@ var init_chunk_R5WRRHCL = __esm({
12574
12787
  var init_contracts = __esm({
12575
12788
  "../../packages/core/dist/contracts/index.js"() {
12576
12789
  "use strict";
12577
- init_chunk_GTV7SIKE();
12578
- init_chunk_FJKE7WIF();
12579
- init_chunk_IYXLMIWU();
12580
- init_chunk_YX7EL2HJ();
12790
+ init_chunk_VIHOXNPF();
12791
+ init_chunk_POL7B3EM();
12792
+ init_chunk_Z6GKZO4F();
12793
+ init_chunk_SNA2DXAC();
12581
12794
  init_chunk_R5WRRHCL();
12582
12795
  init_chunk_IBL7FANV();
12583
12796
  init_chunk_C2UEA2KW();
12584
- init_chunk_XNDI2XQA();
12797
+ init_chunk_3NS3HULK();
12585
12798
  init_chunk_MIWZOSPI();
12586
- init_chunk_XJDAH2N7();
12799
+ init_chunk_VORPHGDT();
12587
12800
  init_chunk_JWPRTSIB();
12588
12801
  init_chunk_T7KQKDET();
12589
12802
  init_chunk_L5F7ZOUJ();
12590
- init_chunk_SSN6QPMX();
12803
+ init_chunk_2ISUBJG7();
12591
12804
  }
12592
12805
  });
12593
12806
 
@@ -13567,16 +13780,16 @@ var init_chunk_IOJOM4DE = __esm({
13567
13780
  }
13568
13781
  });
13569
13782
 
13570
- // ../../packages/core/dist/chunk-5UOHWWD5.js
13783
+ // ../../packages/core/dist/chunk-WSROLRJN.js
13571
13784
  function identifyTokenType(token) {
13572
13785
  if (token.startsWith("way_")) return "way_token";
13573
13786
  if (token.startsWith("eyJ")) return "jwt";
13574
13787
  return "unknown";
13575
13788
  }
13576
- var init_chunk_5UOHWWD5 = __esm({
13577
- "../../packages/core/dist/chunk-5UOHWWD5.js"() {
13789
+ var init_chunk_WSROLRJN = __esm({
13790
+ "../../packages/core/dist/chunk-WSROLRJN.js"() {
13578
13791
  "use strict";
13579
- init_chunk_XJDAH2N7();
13792
+ init_chunk_VORPHGDT();
13580
13793
  }
13581
13794
  });
13582
13795
 
@@ -13587,42 +13800,6 @@ var init_chunk_BF4WRSOQ = __esm({
13587
13800
  }
13588
13801
  });
13589
13802
 
13590
- // ../../packages/core/dist/chunk-A5NDENFB.js
13591
- var decisionAnswerSchema, decisionsResponseSchema;
13592
- var init_chunk_A5NDENFB = __esm({
13593
- "../../packages/core/dist/chunk-A5NDENFB.js"() {
13594
- "use strict";
13595
- init_zod();
13596
- decisionAnswerSchema = external_exports.discriminatedUnion("type", [
13597
- external_exports.object({
13598
- type: external_exports.literal("choice"),
13599
- choice: external_exports.string(),
13600
- confidence: external_exports.number().optional()
13601
- }),
13602
- external_exports.object({
13603
- type: external_exports.literal("score"),
13604
- score: external_exports.number(),
13605
- confidence: external_exports.number().optional()
13606
- }),
13607
- external_exports.object({
13608
- type: external_exports.literal("noul"),
13609
- noul: external_exports.number()
13610
- })
13611
- ]);
13612
- decisionsResponseSchema = external_exports.object({
13613
- id: external_exports.string().optional(),
13614
- model: external_exports.string().optional(),
13615
- provider: external_exports.string().optional(),
13616
- answers: external_exports.record(decisionAnswerSchema),
13617
- usage: external_exports.object({
13618
- input_tokens: external_exports.number().optional(),
13619
- output_tokens: external_exports.number().optional(),
13620
- cost: external_exports.number().optional()
13621
- }).optional()
13622
- });
13623
- }
13624
- });
13625
-
13626
13803
  // ../../packages/core/dist/chunk-R7VSUKKX.js
13627
13804
  function isPublicIdentifier(value) {
13628
13805
  return UUID_RE.test(value) || HEX_RE.test(value) || WORKOS_ID_RE.test(value) || TRACE_HEADER_RE.test(value);
@@ -13714,10 +13891,10 @@ var init_chunk_R7VSUKKX = __esm({
13714
13891
  }
13715
13892
  });
13716
13893
 
13717
- // ../../packages/core/dist/chunk-MHWOQS63.js
13894
+ // ../../packages/core/dist/chunk-4MBOLX7Q.js
13718
13895
  var APP_ERROR_BRAND, AppError, LLM_RATE_LIMIT_BRAND, LlmRateLimitError, LLM_PROVIDER_HTTP_BRAND, LlmProviderHttpError, LLM_PROVIDER_CONTENT_BRAND, LlmProviderContentError, LLM_PROVIDER_TIMEOUT_BRAND, LlmProviderTimeoutError, ExternalServiceError, CHANNEL_PROVIDER_HTTP_BRAND, ChannelProviderHttpError, MEDIA_PROVIDER_HTTP_BRAND, MediaProviderHttpError;
13719
- var init_chunk_MHWOQS63 = __esm({
13720
- "../../packages/core/dist/chunk-MHWOQS63.js"() {
13896
+ var init_chunk_4MBOLX7Q = __esm({
13897
+ "../../packages/core/dist/chunk-4MBOLX7Q.js"() {
13721
13898
  "use strict";
13722
13899
  init_chunk_R7VSUKKX();
13723
13900
  APP_ERROR_BRAND = /* @__PURE__ */ Symbol.for("wayai.AppError");
@@ -13826,7 +14003,7 @@ var init_chunk_MHWOQS63 = __esm({
13826
14003
  }
13827
14004
  });
13828
14005
 
13829
- // ../../packages/core/dist/chunk-Q4KTDDYO.js
14006
+ // ../../packages/core/dist/chunk-ERFR7IRY.js
13830
14007
  function findStepBoundaries(transcript) {
13831
14008
  const out = [];
13832
14009
  const n = transcript.length;
@@ -13861,10 +14038,10 @@ function findStepBoundaries(transcript) {
13861
14038
  }
13862
14039
  return out;
13863
14040
  }
13864
- var init_chunk_Q4KTDDYO = __esm({
13865
- "../../packages/core/dist/chunk-Q4KTDDYO.js"() {
14041
+ var init_chunk_ERFR7IRY = __esm({
14042
+ "../../packages/core/dist/chunk-ERFR7IRY.js"() {
13866
14043
  "use strict";
13867
- init_chunk_SSN6QPMX();
14044
+ init_chunk_2ISUBJG7();
13868
14045
  }
13869
14046
  });
13870
14047
 
@@ -13896,27 +14073,26 @@ var ENDPOINT_CONFIGS, WAYAI_WORKSPACE_LAYOUT;
13896
14073
  var init_dist = __esm({
13897
14074
  "../../packages/core/dist/index.js"() {
13898
14075
  "use strict";
13899
- init_chunk_GTV7SIKE();
13900
- init_chunk_FJKE7WIF();
13901
- init_chunk_IYXLMIWU();
13902
- init_chunk_YX7EL2HJ();
14076
+ init_chunk_VIHOXNPF();
14077
+ init_chunk_POL7B3EM();
14078
+ init_chunk_Z6GKZO4F();
14079
+ init_chunk_SNA2DXAC();
13903
14080
  init_chunk_R5WRRHCL();
13904
14081
  init_chunk_IBL7FANV();
13905
14082
  init_chunk_IOJOM4DE();
13906
14083
  init_chunk_C2UEA2KW();
13907
- init_chunk_XNDI2XQA();
14084
+ init_chunk_3NS3HULK();
13908
14085
  init_chunk_MIWZOSPI();
13909
- init_chunk_5UOHWWD5();
13910
- init_chunk_XJDAH2N7();
14086
+ init_chunk_WSROLRJN();
14087
+ init_chunk_VORPHGDT();
13911
14088
  init_chunk_JWPRTSIB();
13912
14089
  init_chunk_BF4WRSOQ();
13913
- init_chunk_A5NDENFB();
13914
14090
  init_chunk_T7KQKDET();
13915
14091
  init_chunk_L5F7ZOUJ();
13916
- init_chunk_MHWOQS63();
14092
+ init_chunk_4MBOLX7Q();
13917
14093
  init_chunk_R7VSUKKX();
13918
- init_chunk_Q4KTDDYO();
13919
- init_chunk_SSN6QPMX();
14094
+ init_chunk_ERFR7IRY();
14095
+ init_chunk_2ISUBJG7();
13920
14096
  init_chunk_FEOO3UPS();
13921
14097
  ENDPOINT_CONFIGS = {
13922
14098
  // OAuth callbacks - strict, fail-closed (prevent brute force)
@@ -13997,11 +14173,25 @@ var init_dist = __esm({
13997
14173
  userLimitKey: "/api/evals/calls/*"
13998
14174
  },
13999
14175
  "/api/files/*": { tier: "STANDARD", userLimit: 150, skipAuthenticatedUsers: true },
14000
- "/api/outbound/*": {
14176
+ // The org contact book (wayai#4931 PR 2b). A CSV import sends one request per
14177
+ // `CONTACT_IMPORT_BATCH_MAX` rows, so 150 a minute imports 75,000 rows a minute.
14178
+ "/api/contact-book/*": {
14179
+ tier: "STANDARD",
14180
+ userLimit: 150,
14181
+ skipAuthenticatedUsers: true,
14182
+ userLimitKey: "/api/contact-book/*"
14183
+ },
14184
+ "/api/automations/*": {
14001
14185
  tier: "STANDARD",
14002
14186
  userLimit: 150,
14003
14187
  skipAuthenticatedUsers: true,
14004
- userLimitKey: "/api/outbound/*"
14188
+ userLimitKey: "/api/automations/*"
14189
+ },
14190
+ "/api/message-templates/*": {
14191
+ tier: "STANDARD",
14192
+ userLimit: 150,
14193
+ skipAuthenticatedUsers: true,
14194
+ userLimitKey: "/api/message-templates/*"
14005
14195
  },
14006
14196
  "/api/live-updates/*": { tier: "STANDARD", userLimit: 150, skipAuthenticatedUsers: true },
14007
14197
  "/api/hub-users/*": {
@@ -14317,6 +14507,12 @@ var init_dist = __esm({
14317
14507
  // owner-delegated decision 9). MODERATE (30/min per IP) leaves room for reloads and several
14318
14508
  // tabs. An exact key, so it wins over the wildcard above.
14319
14509
  "/api/communities/join-preview": { tier: "MODERATE" },
14510
+ // An announcement email's unsubscribe (#4872 PR 8a) — public: its token is its one credential, so
14511
+ // this per-IP limit is its one bound, and runs before the route reads anything. MODERATE (30/min
14512
+ // per IP), not STRICT: mail clients' one-click unsubscribe POSTs it from their own servers, which
14513
+ // many members' clicks share, and STRICT's 5/min bucket is shared with sign-in. An exact key, so
14514
+ // it wins over the wildcard above.
14515
+ [COMMUNITY_EMAIL_UNSUBSCRIBE_PATH]: { tier: "MODERATE" },
14320
14516
  // App channel - high throughput with user limits
14321
14517
  "/channels/app/*": { tier: "HIGH", userLimit: 500, skipAuthenticatedUsers: true },
14322
14518
  // API channel (api-channel-connector) - machine-to-machine, high throughput
@@ -14326,6 +14522,11 @@ var init_dist = __esm({
14326
14522
  "/scheduled/*": { tier: "HIGH", skipAuthenticatedUsers: true },
14327
14523
  // WebSocket - standard with user limit to prevent connection spam
14328
14524
  "/live-updates/ws": { tier: "STANDARD", userLimit: 100, failClosed: true },
14525
+ // A community's live socket (gh #4872 PR 5, `GET /communities/:communityId/live`): outside
14526
+ // `/api/*`, with no bearer token, so its per-IP tier is its one bound before the CommunityDO
14527
+ // checks the ticket. STANDARD, as `/live-updates/ws`: a client opens one per community it shows
14528
+ // and reconnects within the hour.
14529
+ "/communities/*": { tier: "STANDARD" },
14329
14530
  // WS ticket mint - per-user 60/min accommodates aggressive reconnect patterns
14330
14531
  // without opening abuse vectors; fail-closed so Redis outages don't let
14331
14532
  // runaway clients mint unbounded tickets.
@@ -15688,7 +15889,7 @@ var init_registry = __esm({
15688
15889
  surviving: "bases import",
15689
15890
  clause: 3,
15690
15891
  shipped: true,
15691
- reason: "WayAI has outbound-contact import."
15892
+ reason: "WayAI has contact import (the organization's contact book)."
15692
15893
  },
15693
15894
  {
15694
15895
  original: "batch",
@@ -17343,7 +17544,7 @@ import * as path11 from "path";
17343
17544
  import * as crypto3 from "crypto";
17344
17545
  function isBinaryFile(filename) {
17345
17546
  const ext = filename.split(".").pop()?.toLowerCase() || "";
17346
- return BINARY_EXTENSIONS2.has(ext);
17547
+ return BINARY_EXTENSIONS.has(ext);
17347
17548
  }
17348
17549
  function guessMimeType(filename) {
17349
17550
  const ext = filename.split(".").pop()?.toLowerCase() || "";
@@ -17543,13 +17744,13 @@ async function downloadBinaryFiles(resDir, files, root, log) {
17543
17744
  }
17544
17745
  return count;
17545
17746
  }
17546
- var BINARY_EXTENSIONS2, MAX_RESOURCE_FILE_SIZE2;
17747
+ var BINARY_EXTENSIONS, MAX_RESOURCE_FILE_SIZE2;
17547
17748
  var init_resource_files = __esm({
17548
17749
  "src/lib/resource-files.ts"() {
17549
17750
  "use strict";
17550
17751
  init_fs_safety();
17551
17752
  init_contracts();
17552
- BINARY_EXTENSIONS2 = /* @__PURE__ */ new Set([
17753
+ BINARY_EXTENSIONS = /* @__PURE__ */ new Set([
17553
17754
  "pdf",
17554
17755
  "png",
17555
17756
  "jpg",
@@ -17977,14 +18178,16 @@ function parseHubFolder(hubFolder, opts) {
17977
18178
  if (Array.isArray(config.connections)) {
17978
18179
  payload.connections = config.connections;
17979
18180
  }
17980
- if (config.outbound_contacts && config.outbound_contacts.length > 0) {
17981
- payload.outbound_contacts = config.outbound_contacts;
18181
+ if (Array.isArray(config.automations)) {
18182
+ payload.automations = config.automations;
17982
18183
  }
17983
- if (config.outbound_lists && config.outbound_lists.length > 0) {
17984
- payload.outbound_lists = config.outbound_lists;
18184
+ if (config.outbound_schedules !== void 0) {
18185
+ console.warn(" Warning: hub.yaml `outbound_schedules:` is no longer read \u2014 schedules are now `automations:` (see the wayai skill). Its entries were not pushed.");
17985
18186
  }
17986
- if (config.outbound_schedules && config.outbound_schedules.length > 0) {
17987
- payload.outbound_schedules = config.outbound_schedules;
18187
+ for (const key of ["outbound_contacts", "outbound_lists"]) {
18188
+ if (config[key] !== void 0) {
18189
+ console.warn(` Warning: hub.yaml \`${key}:\` is no longer read \u2014 contacts and lists are now the organization's contact book (see the wayai skill). Its entries were not pushed.`);
18190
+ }
17988
18191
  }
17989
18192
  const bytesByHash = /* @__PURE__ */ new Map();
17990
18193
  const evals = scanEvalYamlFiles(hubFolder, bytesByHash, unreadable);
@@ -18486,14 +18689,8 @@ function buildYamlPayload(payload) {
18486
18689
  if (payload.connections && payload.connections.length > 0) {
18487
18690
  result.connections = payload.connections;
18488
18691
  }
18489
- if (payload.outbound_contacts && payload.outbound_contacts.length > 0) {
18490
- result.outbound_contacts = payload.outbound_contacts;
18491
- }
18492
- if (payload.outbound_lists && payload.outbound_lists.length > 0) {
18493
- result.outbound_lists = payload.outbound_lists;
18494
- }
18495
- if (payload.outbound_schedules && payload.outbound_schedules.length > 0) {
18496
- result.outbound_schedules = payload.outbound_schedules;
18692
+ if (payload.automations && payload.automations.length > 0) {
18693
+ result.automations = payload.automations;
18497
18694
  }
18498
18695
  return result;
18499
18696
  }
@@ -20015,15 +20212,9 @@ Sync complete. Preview hub: ${result.preview_hub_id}`);
20015
20212
  if (c.resource_links_created > 0) parts.push(`${c.resource_links_created} resource link(s) created`);
20016
20213
  if (c.resource_links_updated > 0) parts.push(`${c.resource_links_updated} resource link(s) updated`);
20017
20214
  if (c.resource_links_deleted > 0) parts.push(`${c.resource_links_deleted} resource link(s) deleted`);
20018
- if (c.outbound_contacts_created > 0) parts.push(`${c.outbound_contacts_created} outbound contact(s) created`);
20019
- if (c.outbound_contacts_updated > 0) parts.push(`${c.outbound_contacts_updated} outbound contact(s) updated`);
20020
- if (c.outbound_contacts_deleted > 0) parts.push(`${c.outbound_contacts_deleted} outbound contact(s) deleted`);
20021
- if (c.outbound_lists_created > 0) parts.push(`${c.outbound_lists_created} outbound list(s) created`);
20022
- if (c.outbound_lists_updated > 0) parts.push(`${c.outbound_lists_updated} outbound list(s) updated`);
20023
- if (c.outbound_lists_deleted > 0) parts.push(`${c.outbound_lists_deleted} outbound list(s) deleted`);
20024
- if (c.outbound_schedules_created > 0) parts.push(`${c.outbound_schedules_created} outbound schedule(s) created`);
20025
- if (c.outbound_schedules_updated > 0) parts.push(`${c.outbound_schedules_updated} outbound schedule(s) updated`);
20026
- if (c.outbound_schedules_deleted > 0) parts.push(`${c.outbound_schedules_deleted} outbound schedule(s) deleted`);
20215
+ if (c.automations_created > 0) parts.push(`${c.automations_created} automation(s) created`);
20216
+ if (c.automations_updated > 0) parts.push(`${c.automations_updated} automation(s) updated`);
20217
+ if (c.automations_deleted > 0) parts.push(`${c.automations_deleted} automation(s) deleted`);
20027
20218
  if (parts.length > 0) {
20028
20219
  console.log(`Changes: ${parts.join(", ")}`);
20029
20220
  }
@@ -22539,6 +22730,17 @@ function describeCategory(category) {
22539
22730
  label: "Production credential missing",
22540
22731
  hint: "A production connection has no credential. Set it with `wayai set-connection-credential`."
22541
22732
  };
22733
+ // wayai#4931 PR 2b: an automation whose fire reached no org list.
22734
+ case AUTOMATION_ALERT_CATEGORIES.list_not_found:
22735
+ return {
22736
+ label: "Automation list not found",
22737
+ hint: "An automation names an org list the organization no longer has. Point it at another list (its `target.org_list`), or create the list in the organization's Contacts settings."
22738
+ };
22739
+ case AUTOMATION_ALERT_CATEGORIES.list_over_cap:
22740
+ return {
22741
+ label: "Automation list over the cap",
22742
+ hint: "An automation's org list holds more contacts this hub sees than one fire may reach. Narrow the list's filter in the organization's Contacts settings."
22743
+ };
22542
22744
  default:
22543
22745
  if (category.startsWith("provider:")) {
22544
22746
  return {
@@ -22568,6 +22770,7 @@ ${lines.join("\n")}`;
22568
22770
  var init_hub_alerts = __esm({
22569
22771
  "src/lib/hub-alerts.ts"() {
22570
22772
  "use strict";
22773
+ init_contracts();
22571
22774
  }
22572
22775
  });
22573
22776