@wayai/cli 0.3.271 → 0.3.273

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
@@ -9375,7 +9375,7 @@ var init_chunk_EVXGKOJV = __esm({
9375
9375
  }
9376
9376
  });
9377
9377
 
9378
- // ../../packages/core/dist/chunk-ECRNR7ET.js
9378
+ // ../../packages/core/dist/chunk-I42QJGJF.js
9379
9379
  function spokenLineField(label2, description2) {
9380
9380
  return { type: "text", label: label2, maxLength: SPOKEN_LINE_MAX_CHARS, default: "", description: description2 };
9381
9381
  }
@@ -9385,8 +9385,8 @@ function byLowercaseName(a, b) {
9385
9385
  return x < y ? -1 : x > y ? 1 : 0;
9386
9386
  }
9387
9387
  var CALLER_LANGUAGE, GIT_CHECKOUT_MAX_LENGTH, TTS_VOICE_REPLY_ENABLED_FIELD, decisionsImageInputField, COPILOT_TRIGGER_FIELD, SANDBOX_AGENT_FIELDS, AUDIO_LANGUAGE_OPTIONS, whatsapp, instagram, resend, telegram, API_CHANNEL_DELIVERY_EVENTS, apiChannel, OPENAI_REASONING_MODELS, openai, anthropic, googleAiStudio, openRouter, xai, typesafe, groqStt, openaiStt, elevenLabsStt, openaiTts, groqTts, elevenLabsTts, GEMINI_TTS_VOICES, googleTts, wayai, externalResources, restApiTool, mcpServer, REKOR_TOOLSET_SERVICE_NAME, rekorToolset, CLAUDE_HARNESS_MODELS, CLAUDE_HARNESS_MODEL_OPTIONS, HARNESS_EGRESS_FIELDS, claudeManagedAgents, SPOKEN_LINE_MAX_CHARS, gptLive, CONNECTORS;
9388
- var init_chunk_ECRNR7ET = __esm({
9389
- "../../packages/core/dist/chunk-ECRNR7ET.js"() {
9388
+ var init_chunk_I42QJGJF = __esm({
9389
+ "../../packages/core/dist/chunk-I42QJGJF.js"() {
9390
9390
  "use strict";
9391
9391
  CALLER_LANGUAGE = "caller";
9392
9392
  GIT_CHECKOUT_MAX_LENGTH = 255;
@@ -10156,20 +10156,20 @@ var init_chunk_ECRNR7ET = __esm({
10156
10156
  base_url: { type: "text", label: "Base URL", placeholder: "https://api.example.com", description: "Base URL for the API connection (used as prefix for all tool paths)" },
10157
10157
  api_key: { type: "password", label: "API Key", placeholder: "Enter your API key", required: true, maskInEdit: true, useExistingPlaceholder: "__USE_EXISTING_API_KEY__" },
10158
10158
  access_token: { type: "password", label: "Access Token / Service Key (Optional)", placeholder: "Enter if your API requires a second credential", description: "Optional: Some APIs require both an API key and an access token/service key", maskInEdit: true, useExistingPlaceholder: "__USE_EXISTING_ACCESS_TOKEN__" },
10159
- connection_headers: { type: "custom", component: "KeyValueGrid", label: "Connection Headers", description: "Headers to include in all requests for this connection" }
10159
+ connection_headers: { type: "custom", component: "KeyValueGrid", label: "Connection Headers", description: "Sent to the base URL's origin, else to a tool's fixed host" }
10160
10160
  },
10161
10161
  basic_auth: {
10162
10162
  connection_display_name: { type: "text", label: "Connection Name", placeholder: "Enter a name for this connection", description: "This name will be used to identify the connection in the system", required: true },
10163
10163
  base_url: { type: "text", label: "Base URL", placeholder: "https://api.example.com", description: "Base URL for the API connection (used as prefix for all tool paths)" },
10164
10164
  username: { type: "text", label: "Username", placeholder: "Enter username", required: true },
10165
10165
  password: { type: "password", label: "Password", placeholder: "Enter password", required: true, maskInEdit: true, useExistingPlaceholder: "__USE_EXISTING_PASSWORD__" },
10166
- connection_headers: { type: "custom", component: "KeyValueGrid", label: "Connection Headers", description: "Headers to include in all requests for this connection" }
10166
+ connection_headers: { type: "custom", component: "KeyValueGrid", label: "Connection Headers", description: "Sent to the base URL's origin, else to a tool's fixed host" }
10167
10167
  },
10168
10168
  bearer: {
10169
10169
  connection_display_name: { type: "text", label: "Connection Name", placeholder: "Enter a name for this connection", description: "This name will be used to identify the connection in the system", required: true },
10170
10170
  base_url: { type: "text", label: "Base URL", placeholder: "https://api.example.com", description: "Base URL for the API connection (used as prefix for all tool paths)" },
10171
10171
  access_token: { type: "password", label: "Bearer Token", placeholder: "Enter your bearer token", required: true, maskInEdit: true, useExistingPlaceholder: "__USE_EXISTING_ACCESS_TOKEN__" },
10172
- connection_headers: { type: "custom", component: "KeyValueGrid", label: "Connection Headers", description: "Headers to include in all requests for this connection", defaultValue: { Authorization: "Bearer {{access_token}}" } }
10172
+ connection_headers: { type: "custom", component: "KeyValueGrid", label: "Connection Headers", description: "Sent to the base URL's origin, else to a tool's fixed host", defaultValue: { Authorization: "Bearer {{access_token}}" } }
10173
10173
  }
10174
10174
  },
10175
10175
  token_refresh_config: { api_key: { strategy: "none" }, basic_auth: { strategy: "none" }, bearer: { strategy: "none" } },
@@ -10402,13 +10402,13 @@ var init_chunk_ECRNR7ET = __esm({
10402
10402
  }
10403
10403
  });
10404
10404
 
10405
- // ../../packages/core/dist/chunk-CBSOYDZQ.js
10405
+ // ../../packages/core/dist/chunk-ZUKC6A2W.js
10406
10406
  var COUNTER_KEYS, STT_PRICING, CONTAINER_PRICING, connectorById, nativeToolById;
10407
- var init_chunk_CBSOYDZQ = __esm({
10408
- "../../packages/core/dist/chunk-CBSOYDZQ.js"() {
10407
+ var init_chunk_ZUKC6A2W = __esm({
10408
+ "../../packages/core/dist/chunk-ZUKC6A2W.js"() {
10409
10409
  "use strict";
10410
10410
  init_chunk_EVXGKOJV();
10411
- init_chunk_ECRNR7ET();
10411
+ init_chunk_I42QJGJF();
10412
10412
  init_chunk_MIWZOSPI();
10413
10413
  COUNTER_KEYS = Object.keys({
10414
10414
  input_tokens: true,
@@ -10531,7 +10531,7 @@ var init_chunk_L5F7ZOUJ = __esm({
10531
10531
  }
10532
10532
  });
10533
10533
 
10534
- // ../../packages/core/dist/chunk-Q3WAAJBA.js
10534
+ // ../../packages/core/dist/chunk-G4HTKQCL.js
10535
10535
  function normalizeDecisionsModelId(modelId) {
10536
10536
  return modelId.trim().toLowerCase();
10537
10537
  }
@@ -10602,10 +10602,10 @@ function readAgentSettingsModel(agentSettings) {
10602
10602
  return typeof model === "string" ? model : null;
10603
10603
  }
10604
10604
  var DECISIONS_MODEL_PREFIXES, DECISION_CAPABLE_AGENT_ROLES;
10605
- var init_chunk_Q3WAAJBA = __esm({
10606
- "../../packages/core/dist/chunk-Q3WAAJBA.js"() {
10605
+ var init_chunk_G4HTKQCL = __esm({
10606
+ "../../packages/core/dist/chunk-G4HTKQCL.js"() {
10607
10607
  "use strict";
10608
- init_chunk_CBSOYDZQ();
10608
+ init_chunk_ZUKC6A2W();
10609
10609
  init_chunk_L5F7ZOUJ();
10610
10610
  DECISIONS_MODEL_PREFIXES = ["typesafe/jev-", "jev-"];
10611
10611
  DECISION_CAPABLE_AGENT_ROLES = [
@@ -10616,7 +10616,7 @@ var init_chunk_Q3WAAJBA = __esm({
10616
10616
  }
10617
10617
  });
10618
10618
 
10619
- // ../../packages/core/dist/chunk-5FTGVRDF.js
10619
+ // ../../packages/core/dist/chunk-MBXNS7SI.js
10620
10620
  function resolveMonitorTrigger(monitorConfig) {
10621
10621
  if (!monitorConfig || typeof monitorConfig !== "object") return "idle";
10622
10622
  const raw = monitorConfig.trigger;
@@ -10922,14 +10922,14 @@ function refineMonitorRulesStructuredOutput(body, ctx) {
10922
10922
  if (refusal2) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["response_format"], message: refusal2 });
10923
10923
  }
10924
10924
  var NATIVE_TOOL_NAMES, previousConversationsCountField, summarizationThresholdField, flagConditionSchema, MONITOR_TRIGGERS, monitorTriggerSchema, AUTOMATION_GATE_TRIGGERS, NON_FIRING_TRIGGERS, MONITOR_FIRING_TRIGGERS, MONITOR_DELAY_SECONDS_MIN, MONITOR_IDLE_DELAY_REQUIRED_MESSAGE, MONITOR_HISTORY_MESSAGES_MAX, monitorHistoryMessagesSchema, monitorIncludeToolResultsSchema, MONITOR_INPUT_SHAPING_KEYS, MONITOR_INPUT_SHAPING_SCHEMAS, MONITOR_INPUT_SHAPING_IDLE_MESSAGE, monitorArgumentSourceSchema, MONITOR_NOTE_TEMPLATE_MAX, MONITOR_STEER_NOTE_MAX, MONITOR_GATE_AGENT_NAME_MAX, monitorActionSchema, monitorRuleSchema, MONITOR_RULE_KEYS, MONITOR_RULE_SCHEMAS, MONITOR_RULE_TRIGGERS, MONITOR_RULE_TRIGGER_MESSAGE, CALL_UTTERANCE_SPEAKERS, callUtteranceSpeakerSchema, MONITOR_CALL_KEYS, MONITOR_CALL_SCHEMAS, MONITOR_CALL_KEY_MESSAGE, CALL_STEERING_MIN_CONFIDENCE, CALL_UTTERANCE_RULE_NOT_CONFIDENT_MESSAGE, CALL_UTTERANCE_FALLBACK_MESSAGE, CALL_UTTERANCE_FLAG_CONDITIONS_MESSAGE, CALL_STEER_NOTE_BLANK_MESSAGE, MONITOR_USER_MESSAGE_ACTION_KINDS, MONITOR_ASSISTANT_REPLY_ACTION_KINDS, MONITOR_CALL_UTTERANCE_ACTION_KINDS, MONITOR_AUTOMATION_FIRE_ACTION_KINDS, MONITOR_AUTOMATION_ITEM_ACTION_KINDS, INSERT_NOTE_TOOL_NAME, RUN_MONITOR_TOOL_NAME, MONITOR_RULE_ALLOWED_NATIVE_TOOLS, MONITOR_RULE_REENTRY_TOOLS, MONITOR_RULE_REENTRY_TRACKS, AUTOMATION_FIRE_FLAG_CONDITIONS_MESSAGE, AUTOMATION_FIRE_INPUT_SHAPING_MESSAGE, AUTOMATION_ITEM_FLAG_CONDITIONS_MESSAGE, AUTOMATION_ITEM_INPUT_SHAPING_MESSAGE, AUTOMATION_GATE_KEY_MESSAGES, monitorConfigField, flagConditionsField, agentIdParam, listAgentsQuery, agentConnectionsQuery, createAgentBody, updateAgentBody, AGENT_PARAMETER_TYPES, AGENT_PARAMETER_NAME_REGEX, agentParameterCreateSchema, MAX_AGENT_PARAMETERS_PER_REQUEST, createAgentParametersBody;
10925
- var init_chunk_5FTGVRDF = __esm({
10926
- "../../packages/core/dist/chunk-5FTGVRDF.js"() {
10925
+ var init_chunk_MBXNS7SI = __esm({
10926
+ "../../packages/core/dist/chunk-MBXNS7SI.js"() {
10927
10927
  "use strict";
10928
10928
  init_chunk_IBL7FANV();
10929
10929
  init_chunk_KB5RK3RP();
10930
10930
  init_chunk_C2UEA2KW();
10931
10931
  init_chunk_HZ6CADSY();
10932
- init_chunk_Q3WAAJBA();
10932
+ init_chunk_G4HTKQCL();
10933
10933
  init_chunk_EVXGKOJV();
10934
10934
  init_chunk_YROEDMVZ();
10935
10935
  init_chunk_L5F7ZOUJ();
@@ -11148,12 +11148,12 @@ var init_chunk_5FTGVRDF = __esm({
11148
11148
  }
11149
11149
  });
11150
11150
 
11151
- // ../../packages/core/dist/chunk-OJB6LIVM.js
11151
+ // ../../packages/core/dist/chunk-YGDHKCKK.js
11152
11152
  var conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody;
11153
- var init_chunk_OJB6LIVM = __esm({
11154
- "../../packages/core/dist/chunk-OJB6LIVM.js"() {
11153
+ var init_chunk_YGDHKCKK = __esm({
11154
+ "../../packages/core/dist/chunk-YGDHKCKK.js"() {
11155
11155
  "use strict";
11156
- init_chunk_5FTGVRDF();
11156
+ init_chunk_MBXNS7SI();
11157
11157
  init_chunk_HZ6CADSY();
11158
11158
  init_chunk_YROEDMVZ();
11159
11159
  init_zod();
@@ -11682,14 +11682,14 @@ var init_chunk_E4DIIOOE = __esm({
11682
11682
  }
11683
11683
  });
11684
11684
 
11685
- // ../../packages/core/dist/chunk-UI6YFSZL.js
11685
+ // ../../packages/core/dist/chunk-Y6NC5CH5.js
11686
11686
  var 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;
11687
- var init_chunk_UI6YFSZL = __esm({
11688
- "../../packages/core/dist/chunk-UI6YFSZL.js"() {
11687
+ var init_chunk_Y6NC5CH5 = __esm({
11688
+ "../../packages/core/dist/chunk-Y6NC5CH5.js"() {
11689
11689
  "use strict";
11690
11690
  init_chunk_E4DIIOOE();
11691
11691
  init_chunk_HZ6CADSY();
11692
- init_chunk_ECRNR7ET();
11692
+ init_chunk_I42QJGJF();
11693
11693
  init_chunk_MIWZOSPI();
11694
11694
  init_zod();
11695
11695
  evalCallInstant = timestampSchema.refine(isIsoTimestamp, "Expected a canonical ISO timestamp");
@@ -13996,7 +13996,7 @@ var init_chunk_TU4Y4MEX = __esm({
13996
13996
  }
13997
13997
  });
13998
13998
 
13999
- // ../../packages/core/dist/chunk-NEJLHNKX.js
13999
+ // ../../packages/core/dist/chunk-JR6ZYRSI.js
14000
14000
  function refineHubAsCodeCustomTools(config, ctx) {
14001
14001
  const agents = config.agents;
14002
14002
  if (!Array.isArray(agents)) return;
@@ -14345,7 +14345,7 @@ function refineHubAsCodeResources(config, ctx) {
14345
14345
  const files = resource?.files;
14346
14346
  if (!Array.isArray(files)) return;
14347
14347
  files.forEach((file, fileIndex) => {
14348
- const entry = file;
14348
+ const entry = file ?? {};
14349
14349
  if (typeof entry.content_base64 === "string") {
14350
14350
  aggregateEncoded += entry.content_base64.length;
14351
14351
  if (entry.content_base64.length > MAX_RESOURCE_ENCODED_BYTES) {
@@ -14421,25 +14421,35 @@ function refineHubAsCodeDelegation(config, ctx) {
14421
14421
  });
14422
14422
  });
14423
14423
  }
14424
- function refineHubAsCodeToolEnabled(config, ctx) {
14425
- const agents = config?.agents;
14426
- if (!Array.isArray(agents)) return;
14427
- agents.forEach((agent, agentIndex) => {
14428
- const tools = agent?.tools;
14429
- for (const group of ["native", "mcp", "delegation"]) {
14430
- const entries = tools?.[group];
14431
- if (!Array.isArray(entries)) continue;
14432
- entries.forEach((entry, entryIndex) => {
14433
- const enabled = entry?.enabled;
14434
- if (enabled === void 0 || typeof enabled === "boolean") return;
14435
- ctx.addIssue({
14436
- code: external_exports.ZodIssueCode.custom,
14437
- path: ["agents", agentIndex, "tools", group, entryIndex, "enabled"],
14438
- message: "enabled must be true or false"
14439
- });
14424
+ function refuseNonBooleanFlag(ctx, subject, entry, key, path45) {
14425
+ const value = entry[key];
14426
+ if (value === void 0 || typeof value === "boolean") return;
14427
+ const shown3 = value === null || typeof value !== "object" ? JSON.stringify(value).slice(0, 40) : Array.isArray(value) ? "a list" : "an object";
14428
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: [...path45, key], message: `${subject}: ${key} must be true or false, got ${shown3}` });
14429
+ }
14430
+ function refineHubAsCodeFlags(config, ctx) {
14431
+ const { agents, connections, evals, journeys } = config;
14432
+ flagEntriesOf(agents).forEach((agent, agentIndex) => {
14433
+ const subject = `Agent "${flagEntryName(agent.name)}"`;
14434
+ const at = ["agents", agentIndex];
14435
+ refuseNonBooleanFlag(ctx, subject, agent, "enabled", at);
14436
+ flagEntriesOf(agent.resources).forEach((link, linkIndex) => {
14437
+ refuseNonBooleanFlag(ctx, `${subject}, skill "${flagEntryName(link.name)}"`, link, "enabled", [...at, "resources", linkIndex]);
14438
+ });
14439
+ for (const group of HUB_AS_CODE_AGENT_TOOL_KEYS) {
14440
+ flagEntriesOf(agent.tools?.[group]).forEach((entry, entryIndex) => {
14441
+ const tool = `${subject}, tool "${flagEntryName(entry.name ?? entry.tool)}"`;
14442
+ const entryAt = [...at, "tools", group, entryIndex];
14443
+ refuseNonBooleanFlag(ctx, tool, entry, "enabled", entryAt);
14444
+ if (group === "custom") refuseNonBooleanFlag(ctx, tool, entry, "expose_schema_to_llm", entryAt);
14440
14445
  });
14441
14446
  }
14442
14447
  });
14448
+ for (const [section, noun, list2] of [["connections", "Connection", connections], ["evals", "Eval", evals], ["journeys", "Journey", journeys]]) {
14449
+ flagEntriesOf(list2).forEach((entry, index) => {
14450
+ refuseNonBooleanFlag(ctx, `${noun} "${flagEntryName(entry.name)}"`, entry, "enabled", [section, index]);
14451
+ });
14452
+ }
14443
14453
  }
14444
14454
  function refineHubAsCodeFlagConditions(config, ctx) {
14445
14455
  const agents = config?.agents;
@@ -14625,9 +14635,9 @@ function skillSectionsAsResources(scope) {
14625
14635
  return out;
14626
14636
  };
14627
14637
  }
14628
- var MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, MAX_HUB_AS_CODE_PAGE_MANIFEST_CHARS, hubAsCodePagesSchema, MAX_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, isPlainObject, MIN_SKILLS_LAYOUT_CLI, 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;
14629
- var init_chunk_NEJLHNKX = __esm({
14630
- "../../packages/core/dist/chunk-NEJLHNKX.js"() {
14638
+ var MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, MAX_HUB_AS_CODE_PAGE_MANIFEST_CHARS, hubAsCodePagesSchema, MAX_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, HUB_AS_CODE_AGENT_TOOL_KEYS, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, flagEntriesOf, flagEntryName, boundedHubAsCodeResourcesSchema, isPlainObject, MIN_SKILLS_LAYOUT_CLI, 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;
14639
+ var init_chunk_JR6ZYRSI = __esm({
14640
+ "../../packages/core/dist/chunk-JR6ZYRSI.js"() {
14631
14641
  "use strict";
14632
14642
  init_chunk_SARVKRZB();
14633
14643
  init_chunk_HRKVCI5A();
@@ -14637,12 +14647,12 @@ var init_chunk_NEJLHNKX = __esm({
14637
14647
  init_chunk_TU4Y4MEX();
14638
14648
  init_chunk_2KNVPV7S();
14639
14649
  init_chunk_K5UAZWFF();
14640
- init_chunk_5FTGVRDF();
14650
+ init_chunk_MBXNS7SI();
14641
14651
  init_chunk_S4VDZ7PZ();
14642
14652
  init_chunk_C2UEA2KW();
14643
14653
  init_chunk_FBV7NLKO();
14644
14654
  init_chunk_WEXVYJ5H();
14645
- init_chunk_Q3WAAJBA();
14655
+ init_chunk_G4HTKQCL();
14646
14656
  init_chunk_YROEDMVZ();
14647
14657
  init_zod();
14648
14658
  MAX_10MB_BASE64_ENCODED_BYTES = Math.ceil(MAX_RESOURCE_FILE_SIZE / 3) * 4 + 16;
@@ -14665,6 +14675,12 @@ var init_chunk_NEJLHNKX = __esm({
14665
14675
  }).strict()).max(PAGES_PER_HUB_MAX, `a hub holds at most ${PAGES_PER_HUB_MAX} pages`);
14666
14676
  MAX_CALL_OPENING_CARRIERS = 30;
14667
14677
  MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES = 8 * 1024 * 1024;
14678
+ HUB_AS_CODE_AGENT_TOOL_KEYS = [
14679
+ "native",
14680
+ "delegation",
14681
+ "custom",
14682
+ "mcp"
14683
+ ];
14668
14684
  hubAsCodeStateSchema = external_exports.object({
14669
14685
  id: external_exports.string().min(1).optional(),
14670
14686
  slug: external_exports.string().optional(),
@@ -14709,6 +14725,8 @@ var init_chunk_NEJLHNKX = __esm({
14709
14725
  }).passthrough();
14710
14726
  uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
14711
14727
  ciUuidSchema = external_exports.string().regex(uuidPattern, "must be a valid UUID");
14728
+ flagEntriesOf = (list2) => Array.isArray(list2) ? list2.map((entry) => entry ?? {}) : [];
14729
+ flagEntryName = (name) => typeof name === "string" || typeof name === "number" ? name : "<unnamed>";
14712
14730
  boundedHubAsCodeResourcesSchema = external_exports.unknown().superRefine((resources, ctx) => {
14713
14731
  if (!Array.isArray(resources)) return;
14714
14732
  if (resources.length > MAX_HUB_AS_CODE_RESOURCES) {
@@ -14718,6 +14736,9 @@ var init_chunk_NEJLHNKX = __esm({
14718
14736
  });
14719
14737
  return;
14720
14738
  }
14739
+ flagEntriesOf(resources).forEach((skill, index) => {
14740
+ refuseNonBooleanFlag(ctx, `Skill "${flagEntryName(skill.name)}"`, skill, "enabled", [index]);
14741
+ });
14721
14742
  let fileCount = 0;
14722
14743
  for (const resource of resources) {
14723
14744
  const files = resource?.files;
@@ -14756,7 +14777,7 @@ var init_chunk_NEJLHNKX = __esm({
14756
14777
  refineHubAsCodeAccessValues(config, ctx);
14757
14778
  refineHubAsCodeResources(config, ctx);
14758
14779
  refineHubAsCodeDelegation(config, ctx);
14759
- refineHubAsCodeToolEnabled(config, ctx);
14780
+ refineHubAsCodeFlags(config, ctx);
14760
14781
  refineHubAsCodeFlagConditions(config, ctx);
14761
14782
  refineHubAsCodeMonitorConfig(config, ctx);
14762
14783
  refineHubAsCodeDecisionsModel(config, ctx);
@@ -15722,16 +15743,16 @@ var init_chunk_ZU2FJGU3 = __esm({
15722
15743
  }
15723
15744
  });
15724
15745
 
15725
- // ../../packages/core/dist/chunk-CL2SULM6.js
15746
+ // ../../packages/core/dist/chunk-QUW6OYZR.js
15726
15747
  var AUTOMATION_TRIGGER_TYPES, AUTOMATION_EVENT_TYPES, AUTOMATION_TARGET_TYPES, AUTOMATION_ACTION_TYPES, AUTOMATION_CHANNEL_TYPES, AUTOMATION_PURPOSES, AUTOMATION_NAME_MAX, AUTOMATION_DESCRIPTION_MAX, AUTOMATION_INSTRUCTIONS_MAX, AUTOMATION_TEXT_MAX, AUTOMATION_CRON_MAX, AUTOMATION_WEBHOOK_AUTHS, AUTOMATION_WEBHOOK_HEADERS, AUTOMATION_WEBHOOK_BODY_MAX_BYTES, AUTOMATION_WEBHOOK_HEADER_NAME_MAX, WEBHOOK_RESERVED_HEADERS, automationTriggerSchema, automationTargetSchema, automationActionSchema, automationGateSchema, automationName, automationDescription, automationIdParam, automationHubQuery, automationWebhookParams, AUTOMATION_RUNS_PAGE_MAX, listAutomationRunsQuery, createAutomationBody, updateAutomationBody, AUTOMATION_ALERT_CATEGORIES, AUTOMATION_BLOCKED_ALERT_CATEGORY, automationEventSubscriberParam;
15727
- var init_chunk_CL2SULM6 = __esm({
15728
- "../../packages/core/dist/chunk-CL2SULM6.js"() {
15748
+ var init_chunk_QUW6OYZR = __esm({
15749
+ "../../packages/core/dist/chunk-QUW6OYZR.js"() {
15729
15750
  "use strict";
15730
15751
  init_chunk_ZU2FJGU3();
15731
15752
  init_chunk_S5SVBLGT();
15732
- init_chunk_5FTGVRDF();
15753
+ init_chunk_MBXNS7SI();
15733
15754
  init_chunk_5XEJSR22();
15734
- init_chunk_Q3WAAJBA();
15755
+ init_chunk_G4HTKQCL();
15735
15756
  init_chunk_YROEDMVZ();
15736
15757
  init_zod();
15737
15758
  AUTOMATION_TRIGGER_TYPES = ["schedule", "event", "webhook"];
@@ -16196,10 +16217,10 @@ var init_contracts = __esm({
16196
16217
  init_chunk_OPETF4GS();
16197
16218
  init_chunk_SY6PLCPK();
16198
16219
  init_chunk_KMAC3O3L();
16199
- init_chunk_OJB6LIVM();
16220
+ init_chunk_YGDHKCKK();
16200
16221
  init_chunk_KSTYTQ7I();
16201
16222
  init_chunk_LKBSHANA();
16202
- init_chunk_UI6YFSZL();
16223
+ init_chunk_Y6NC5CH5();
16203
16224
  init_chunk_C4HEZ7ZI();
16204
16225
  init_chunk_IR2NOSI3();
16205
16226
  init_chunk_MT4ITTI4();
@@ -16214,7 +16235,7 @@ var init_contracts = __esm({
16214
16235
  init_chunk_E4DIIOOE();
16215
16236
  init_chunk_7CYHPF35();
16216
16237
  init_chunk_BPCNB5RT();
16217
- init_chunk_NEJLHNKX();
16238
+ init_chunk_JR6ZYRSI();
16218
16239
  init_chunk_SARVKRZB();
16219
16240
  init_chunk_HRKVCI5A();
16220
16241
  init_chunk_ICE6SQZO();
@@ -16235,10 +16256,10 @@ var init_contracts = __esm({
16235
16256
  init_chunk_2PZIF56U();
16236
16257
  init_chunk_UEJOG2Q7();
16237
16258
  init_chunk_JO53JB35();
16238
- init_chunk_CL2SULM6();
16259
+ init_chunk_QUW6OYZR();
16239
16260
  init_chunk_ZU2FJGU3();
16240
16261
  init_chunk_S5SVBLGT();
16241
- init_chunk_5FTGVRDF();
16262
+ init_chunk_MBXNS7SI();
16242
16263
  init_chunk_IG6QBZMA();
16243
16264
  init_chunk_OMPT4ZHR();
16244
16265
  init_chunk_D7SSWNL3();
@@ -16261,10 +16282,10 @@ var init_contracts = __esm({
16261
16282
  init_chunk_WEXVYJ5H();
16262
16283
  init_chunk_6TSQ5HXC();
16263
16284
  init_chunk_HZ6CADSY();
16264
- init_chunk_Q3WAAJBA();
16265
- init_chunk_CBSOYDZQ();
16285
+ init_chunk_G4HTKQCL();
16286
+ init_chunk_ZUKC6A2W();
16266
16287
  init_chunk_EVXGKOJV();
16267
- init_chunk_ECRNR7ET();
16288
+ init_chunk_I42QJGJF();
16268
16289
  init_chunk_MIWZOSPI();
16269
16290
  init_chunk_YROEDMVZ();
16270
16291
  init_chunk_L5F7ZOUJ();
@@ -16421,10 +16442,10 @@ var init_dist = __esm({
16421
16442
  init_chunk_6TSQ5HXC();
16422
16443
  init_chunk_HZ6CADSY();
16423
16444
  init_chunk_BF4WRSOQ();
16424
- init_chunk_Q3WAAJBA();
16425
- init_chunk_CBSOYDZQ();
16445
+ init_chunk_G4HTKQCL();
16446
+ init_chunk_ZUKC6A2W();
16426
16447
  init_chunk_EVXGKOJV();
16427
- init_chunk_ECRNR7ET();
16448
+ init_chunk_I42QJGJF();
16428
16449
  init_chunk_MIWZOSPI();
16429
16450
  init_chunk_YROEDMVZ();
16430
16451
  init_chunk_L5F7ZOUJ();
@@ -17699,6 +17720,9 @@ function assertSkillEntryType(name, type) {
17699
17720
  if (type === void 0 || type === "skill") return;
17700
17721
  throw expected(`Skill "${name}" has \`type: ${String(type)}\`: a skill takes no type. Documents live in the knowledge base (\`wayai files\`).`);
17701
17722
  }
17723
+ function carryEnabled(written, target) {
17724
+ if (written !== void 0 && written !== true) target.enabled = written;
17725
+ }
17702
17726
  function renameKey(obj, from, to, map) {
17703
17727
  const out = {};
17704
17728
  for (const [key, value] of Object.entries(obj)) {
@@ -21772,7 +21796,7 @@ function parseEvalYaml(filePath2, relPath, setName, hubFolder, bytesByHash) {
21772
21796
  if (typeof data.id === "string") evalEntry.id = data.id;
21773
21797
  if (typeof data.agent_id === "string") evalEntry.agent_id = data.agent_id;
21774
21798
  if (typeof data.runs === "number") evalEntry.runs = data.runs;
21775
- if (data.enabled === false) evalEntry.enabled = false;
21799
+ carryEnabled(data.enabled, evalEntry);
21776
21800
  if (Array.isArray(data.history)) {
21777
21801
  evalEntry.history = data.history.map((turn, i) => {
21778
21802
  const t = { ...turn };
@@ -21905,7 +21929,7 @@ function parseJourneyYaml(filePath2, relPath, hubFolder, bytesByHash) {
21905
21929
  };
21906
21930
  if (typeof data.id === "string") journeyEntry.id = data.id;
21907
21931
  if (typeof data.agent_id === "string") journeyEntry.agent_id = data.agent_id;
21908
- if (data.enabled === false) journeyEntry.enabled = false;
21932
+ carryEnabled(data.enabled, journeyEntry);
21909
21933
  if (typeof data.evaluator_instructions === "string") {
21910
21934
  journeyEntry.evaluator_instructions = data.evaluator_instructions;
21911
21935
  }
@@ -22004,7 +22028,7 @@ function parseSkills(hubFolder, config, unreadable) {
22004
22028
  if (!old) assertSkillEntryType(skill.name, entry.type);
22005
22029
  if (entry.id) skill.id = entry.id;
22006
22030
  if (entry.description) skill.description = entry.description;
22007
- if (entry.enabled === false) skill.enabled = false;
22031
+ carryEnabled(entry.enabled, skill);
22008
22032
  if (entry.skill_name) skill.skill_name = entry.skill_name;
22009
22033
  const folder = old ? oldResourceFolder(skill) : skillFolder(skill);
22010
22034
  const dir = path17.join(root, folder);
@@ -34814,7 +34838,7 @@ function parseOrgSkills(orgDir, opts = {}) {
34814
34838
  if (!old) assertSkillEntryType(skill.name, entry.type);
34815
34839
  if (entry.id) skill.id = entry.id;
34816
34840
  if (entry.description) skill.description = entry.description;
34817
- if (entry.enabled === false) skill.enabled = false;
34841
+ carryEnabled(entry.enabled, skill);
34818
34842
  if (entry.skill_name) skill.skill_name = entry.skill_name;
34819
34843
  if (entry.environment) skill.environment = entry.environment;
34820
34844
  if (Array.isArray(entry.tags)) skill.tags = entry.tags;
@@ -34969,10 +34993,18 @@ async function orgPull(args2) {
34969
34993
  assertOrgDirConvertible(orgDir, payload);
34970
34994
  if (orgManifestExists(orgDir) && !autoConfirm) {
34971
34995
  const local = parseOrgSkills(orgDir, { readOldLayout: true });
34972
- const diff = await client.diffOrgSkills(orgId, local, "pull");
34973
- if (diff.has_changes) {
34996
+ let diff;
34997
+ try {
34998
+ diff = await client.diffOrgSkills(orgId, local, "pull");
34999
+ } catch (err) {
35000
+ console.log("\nThe platform could not compare your local org/, so the changes cannot be listed:");
35001
+ console.log(` ${extractApiMessage(err)}`);
35002
+ }
35003
+ if (diff?.has_changes) {
34974
35004
  console.log("\nLocal org/ differs from the platform. Pulling overwrites local with the platform state:");
34975
35005
  printDiff(diff.summary);
35006
+ }
35007
+ if (!diff || diff.has_changes) {
34976
35008
  const ok = await confirm("Overwrite local org/ with platform state?");
34977
35009
  if (!ok) {
34978
35010
  console.log("Cancelled.");
@@ -35049,6 +35081,7 @@ var init_org = __esm({
35049
35081
  init_layout();
35050
35082
  init_utils();
35051
35083
  init_diff_display();
35084
+ init_errors2();
35052
35085
  init_org_workspace();
35053
35086
  }
35054
35087
  });