@wayai/cli 0.3.238 → 0.3.240

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
@@ -8434,15 +8434,15 @@ var init_chunk_MH4O3YEX = __esm({
8434
8434
  }
8435
8435
  });
8436
8436
 
8437
- // ../../packages/core/dist/chunk-FQZRBIAQ.js
8437
+ // ../../packages/core/dist/chunk-VZTO5ZM7.js
8438
8438
  function catalogToolSideEffects(toolName) {
8439
8439
  const sideEffects = CATALOG_SIDE_EFFECTS.get(toolName);
8440
8440
  if (sideEffects === void 0) return "unknown";
8441
8441
  return sideEffects ? "side_effects" : "none";
8442
8442
  }
8443
8443
  var NATIVE_TOOL_SCHEMAS, WAYAI_CONNECTOR, SANDBOX_AGENT_ROLES, BASE_NATIVE_TOOLS, NATIVE_TOOLS, CATALOG_SIDE_EFFECTS;
8444
- var init_chunk_FQZRBIAQ = __esm({
8445
- "../../packages/core/dist/chunk-FQZRBIAQ.js"() {
8444
+ var init_chunk_VZTO5ZM7 = __esm({
8445
+ "../../packages/core/dist/chunk-VZTO5ZM7.js"() {
8446
8446
  "use strict";
8447
8447
  init_chunk_DHPUPI4Y();
8448
8448
  NATIVE_TOOL_SCHEMAS = {
@@ -8667,7 +8667,7 @@ var init_chunk_FQZRBIAQ = __esm({
8667
8667
  },
8668
8668
  "file_id": {
8669
8669
  "type": "string",
8670
- "description": "The file ID to retrieve, from a conversation message or a file listing. Still supported, but prefer path for resource files."
8670
+ "description": "The file ID to retrieve, from a conversation message or a file listing. Still supported, but prefer path for skill files."
8671
8671
  },
8672
8672
  "skill_id": {
8673
8673
  "type": "string",
@@ -8685,7 +8685,7 @@ var init_chunk_FQZRBIAQ = __esm({
8685
8685
  "additionalProperties": false
8686
8686
  }
8687
8687
  },
8688
- "tool_instructions": "Use this tool to read a file for AI analysis. Provide either path (preferred \u2014 the exact paths appear in your resource structure and in list_files output) or file_id. The file will be injected into the conversation context."
8688
+ "tool_instructions": "Use this tool to read a file for AI analysis. Provide either path (preferred \u2014 the exact paths appear in your skill structure and in list_files output) or file_id. The file will be injected into the conversation context."
8689
8689
  },
8690
8690
  "write_file": {
8691
8691
  "tool_config": {
@@ -8697,7 +8697,7 @@ var init_chunk_FQZRBIAQ = __esm({
8697
8697
  "properties": {
8698
8698
  "path": {
8699
8699
  "type": "string",
8700
- "description": `The document's full path, e.g. "data/policies/eu/refunds.md", as list_files gives it. Files outside "data/" (skills, resources, conversation files) are read-only.`
8700
+ "description": `The document's full path, e.g. "data/policies/eu/refunds.md", as list_files gives it. Files outside "data/" (skill files and conversation files) are read-only.`
8701
8701
  },
8702
8702
  "content": {
8703
8703
  "type": "string",
@@ -8727,7 +8727,7 @@ var init_chunk_FQZRBIAQ = __esm({
8727
8727
  "properties": {
8728
8728
  "path": {
8729
8729
  "type": "string",
8730
- "description": `The document's full path, e.g. "data/policies/eu/refunds.md", as list_files gives it. Files outside "data/" (skills, resources, conversation files) are read-only.`
8730
+ "description": `The document's full path, e.g. "data/policies/eu/refunds.md", as list_files gives it. Files outside "data/" (skill files and conversation files) are read-only.`
8731
8731
  },
8732
8732
  "old_str": {
8733
8733
  "type": "string",
@@ -8790,7 +8790,7 @@ var init_chunk_FQZRBIAQ = __esm({
8790
8790
  "copy_to_sandbox": {
8791
8791
  "tool_config": {
8792
8792
  "name": "copy_to_sandbox",
8793
- "description": `Copy one of this conversation's files, or one of your documents, into the code sandbox, so commands run with bash can read or edit it there. path names the file as read_file does: this conversation's attachments under "conversation/" (e.g. "conversation/report.xlsx"), an earlier conversation's under "conversations/<conversation_id>/<name>", or a document under "data/<file-type>/" (e.g. "data/contracts/acme/msa.docx"), whose result gives the version you copied: pass it to copy_from_sandbox to copy the document back. Hub resource files cannot be copied. The copy lands at sandbox_path, replacing any file there; a file larger than 25 MiB is refused, and a document larger than 1 MiB. If no sandbox is running, the copy starts one, with the /workspace files from the last save.`,
8793
+ "description": `Copy one of this conversation's files, or one of your documents, into the code sandbox, so commands run with bash can read or edit it there. path names the file as read_file does: this conversation's attachments under "conversation/" (e.g. "conversation/report.xlsx"), an earlier conversation's under "conversations/<conversation_id>/<name>", or a document under "data/<file-type>/" (e.g. "data/contracts/acme/msa.docx"), whose result gives the version you copied: pass it to copy_from_sandbox to copy the document back. Skill files cannot be copied. The copy lands at sandbox_path, replacing any file there; a file larger than 25 MiB is refused, and a document larger than 1 MiB. If no sandbox is running, the copy starts one, with the /workspace files from the last save.`,
8794
8794
  "strict": false,
8795
8795
  "parameters": {
8796
8796
  "type": "object",
@@ -8865,7 +8865,7 @@ var init_chunk_FQZRBIAQ = __esm({
8865
8865
  "items": {
8866
8866
  "type": "string"
8867
8867
  },
8868
- "description": "Array of resource folder IDs to send all files from. Alternative to file_ids."
8868
+ "description": "Array of skill folder IDs to send all files from. Alternative to file_ids."
8869
8869
  },
8870
8870
  "message_text": {
8871
8871
  "type": "string",
@@ -8892,18 +8892,18 @@ var init_chunk_FQZRBIAQ = __esm({
8892
8892
  },
8893
8893
  "query": {
8894
8894
  "type": "string",
8895
- "description": "Search text. Matched against a file's title and its file name. Under a resource or data/ path this searches the WHOLE subtree below it, not just the level named, and every result is returned as a full path."
8895
+ "description": "Search text. Matched against a file's title and its file name. Under a skills/ or data/ path this searches the WHOLE subtree below it, not just the level named, and every result is returned as a full path."
8896
8896
  },
8897
8897
  "tags": {
8898
8898
  "type": "array",
8899
8899
  "items": {
8900
8900
  "type": "string"
8901
8901
  },
8902
- "description": "Return files carrying ANY of these tags. Applies to resource and data/ files \u2014 conversation attachments carry no tags. Searches the whole subtree, like query."
8902
+ "description": "Return files carrying ANY of these tags. Applies to skill and data/ files \u2014 conversation attachments carry no tags. Searches the whole subtree, like query."
8903
8903
  },
8904
8904
  "metadata_filter": {
8905
8905
  "type": "object",
8906
- "description": `Filter resource and data/ files by their metadata using MongoDB-style operators. Supported: $eq (equal), $ne (not equal), $gt/$gte/$lt/$lte (comparisons), $in/$nin (in/not in array), $contains (substring for text, membership for a list), $and/$or/$not (logical). Nested paths like "location.city" are supported, and a bare value means equality. Examples: {"status": "active"}, {"priority": {"$gte": 5}}, {"location.city": "Miami"}, {"$and": [{"status": "active"}, {"priority": {"$gt": 3}}]}, {"$not": {"status": "archived"}}. A comparison between different types simply does not match. Under data/, the file type's metadata schema refuses a field it does not declare. Searches the whole subtree, like query.`
8906
+ "description": `Filter skill and data/ files by their metadata using MongoDB-style operators. Supported: $eq (equal), $ne (not equal), $gt/$gte/$lt/$lte (comparisons), $in/$nin (in/not in array), $contains (substring for text, membership for a list), $and/$or/$not (logical). Nested paths like "location.city" are supported, and a bare value means equality. Examples: {"status": "active"}, {"priority": {"$gte": 5}}, {"location.city": "Miami"}, {"$and": [{"status": "active"}, {"priority": {"$gt": 3}}]}, {"$not": {"status": "archived"}}. A comparison between different types simply does not match. Under data/, the file type's metadata schema refuses a field it does not declare. Searches the whole subtree, like query.`
8907
8907
  },
8908
8908
  "limit": {
8909
8909
  "type": "integer",
@@ -8998,7 +8998,7 @@ var init_chunk_FQZRBIAQ = __esm({
8998
8998
  "properties": {
8999
8999
  "skill_id": {
9000
9000
  "type": "string",
9001
- "description": "The skill's resource_id. Must be one of the skills linked to this agent (the available ids are listed here at runtime)."
9001
+ "description": "The skill's id. Must be one of the skills linked to this agent (the available ids are listed here at runtime)."
9002
9002
  }
9003
9003
  },
9004
9004
  "required": [
@@ -9019,7 +9019,7 @@ var init_chunk_FQZRBIAQ = __esm({
9019
9019
  "properties": {
9020
9020
  "skill_id": {
9021
9021
  "type": "string",
9022
- "description": "The skill's resource_id. Must be one of the skills linked to this agent (the available ids are listed here at runtime)."
9022
+ "description": "The skill's id. Must be one of the skills linked to this agent (the available ids are listed here at runtime)."
9023
9023
  },
9024
9024
  "file_path": {
9025
9025
  "type": "string",
@@ -9266,7 +9266,7 @@ var init_chunk_FQZRBIAQ = __esm({
9266
9266
  { tool_native_id: "nt-011", tool_name: "consult_agent", tool_display_name: "Consult Agent", tool_description: "Consult an advisor agent for advice without transferring", connector_id: WAYAI_CONNECTOR, operation: "consult_agent", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "keyed", hosted: false },
9267
9267
  { tool_native_id: "nt-013", tool_name: "read_skill", tool_display_name: "Read Skill", tool_description: "Read the full specification of a skill", connector_id: WAYAI_CONNECTOR, operation: "read_skill", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun", hosted: false },
9268
9268
  { tool_native_id: "nt-014", tool_name: "read_skill_file", tool_display_name: "Read Skill File", tool_description: "Read a specific file within a skill", connector_id: WAYAI_CONNECTOR, operation: "read_skill_file", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun", hosted: false },
9269
- { tool_native_id: "nt-015", tool_name: "read_file", tool_display_name: "Read File", tool_description: "Read the contents of a resource file", connector_id: WAYAI_CONNECTOR, operation: "read_file", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun", hosted: false },
9269
+ { tool_native_id: "nt-015", tool_name: "read_file", tool_display_name: "Read File", tool_description: "Read the contents of a file", connector_id: WAYAI_CONNECTOR, operation: "read_file", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun", hosted: false },
9270
9270
  { tool_native_id: "nt-018", tool_name: "get_conversations_summary", tool_display_name: "Get Conversations Summary", tool_description: "Get a summary of recent conversations", connector_id: WAYAI_CONNECTOR, operation: "get_conversations_summary", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun", hosted: true },
9271
9271
  { tool_native_id: "nt-019", tool_name: "get_conversation", tool_display_name: "Get Conversation", tool_description: "Retrieve full conversation history", connector_id: WAYAI_CONNECTOR, operation: "get_conversation", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun", hosted: true },
9272
9272
  { tool_native_id: "nt-020", tool_name: "get_tool_schema", tool_display_name: "Get Tool Schema", tool_description: "Retrieve the JSON schema for a tool", connector_id: WAYAI_CONNECTOR, operation: "get_tool_schema", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun", hosted: false },
@@ -9569,7 +9569,7 @@ var init_chunk_T7KQKDET = __esm({
9569
9569
  }
9570
9570
  });
9571
9571
 
9572
- // ../../packages/core/dist/chunk-WFQU5HXK.js
9572
+ // ../../packages/core/dist/chunk-E32ZC76C.js
9573
9573
  function resolveMonitorTrigger(monitorConfig) {
9574
9574
  if (!monitorConfig || typeof monitorConfig !== "object") return "idle";
9575
9575
  const raw = monitorConfig.trigger;
@@ -9875,10 +9875,10 @@ function refineMonitorRulesStructuredOutput(body, ctx) {
9875
9875
  if (refusal2) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["response_format"], message: refusal2 });
9876
9876
  }
9877
9877
  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;
9878
- var init_chunk_WFQU5HXK = __esm({
9879
- "../../packages/core/dist/chunk-WFQU5HXK.js"() {
9878
+ var init_chunk_E32ZC76C = __esm({
9879
+ "../../packages/core/dist/chunk-E32ZC76C.js"() {
9880
9880
  "use strict";
9881
- init_chunk_FQZRBIAQ();
9881
+ init_chunk_VZTO5ZM7();
9882
9882
  init_chunk_IBL7FANV();
9883
9883
  init_chunk_HZ6CADSY();
9884
9884
  init_chunk_C2UEA2KW();
@@ -10101,12 +10101,12 @@ var init_chunk_WFQU5HXK = __esm({
10101
10101
  }
10102
10102
  });
10103
10103
 
10104
- // ../../packages/core/dist/chunk-KTUVBNMI.js
10104
+ // ../../packages/core/dist/chunk-SURLRMEK.js
10105
10105
  var conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody;
10106
- var init_chunk_KTUVBNMI = __esm({
10107
- "../../packages/core/dist/chunk-KTUVBNMI.js"() {
10106
+ var init_chunk_SURLRMEK = __esm({
10107
+ "../../packages/core/dist/chunk-SURLRMEK.js"() {
10108
10108
  "use strict";
10109
- init_chunk_WFQU5HXK();
10109
+ init_chunk_E32ZC76C();
10110
10110
  init_chunk_HZ6CADSY();
10111
10111
  init_chunk_DHPUPI4Y();
10112
10112
  init_zod();
@@ -10562,7 +10562,7 @@ var init_chunk_BPCNB5RT = __esm({
10562
10562
  }
10563
10563
  });
10564
10564
 
10565
- // ../../packages/core/dist/chunk-DYCGBLRW.js
10565
+ // ../../packages/core/dist/chunk-CGQWQYWY.js
10566
10566
  function idempotencyHeaderRefusal(value) {
10567
10567
  if (typeof value !== "string" || !/^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/.test(value)) {
10568
10568
  return "idempotency_header must be a header name: letters, digits and dashes, at most 64";
@@ -10573,10 +10573,10 @@ function idempotencyHeaderRefusal(value) {
10573
10573
  return null;
10574
10574
  }
10575
10575
  var CATALOG_REPLAY, REPLAY_OVERRIDES, RESERVED_HEADERS;
10576
- var init_chunk_DYCGBLRW = __esm({
10577
- "../../packages/core/dist/chunk-DYCGBLRW.js"() {
10576
+ var init_chunk_CGQWQYWY = __esm({
10577
+ "../../packages/core/dist/chunk-CGQWQYWY.js"() {
10578
10578
  "use strict";
10579
- init_chunk_FQZRBIAQ();
10579
+ init_chunk_VZTO5ZM7();
10580
10580
  CATALOG_REPLAY = new Map(
10581
10581
  NATIVE_TOOLS.map((tool) => [tool.tool_name, tool.replay])
10582
10582
  );
@@ -10809,7 +10809,7 @@ var init_chunk_WEXVYJ5H = __esm({
10809
10809
  }
10810
10810
  });
10811
10811
 
10812
- // ../../packages/core/dist/chunk-SK2X6UOC.js
10812
+ // ../../packages/core/dist/chunk-O65PHXK6.js
10813
10813
  function refineToolConfig(value, ctx) {
10814
10814
  const raw = value.tool_config;
10815
10815
  if (raw == null) return;
@@ -10845,10 +10845,10 @@ function refineToolConfig(value, ctx) {
10845
10845
  }
10846
10846
  }
10847
10847
  var toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, toolReplaySettingsFields, toolReplaySettingsSchema, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody;
10848
- var init_chunk_SK2X6UOC = __esm({
10849
- "../../packages/core/dist/chunk-SK2X6UOC.js"() {
10848
+ var init_chunk_O65PHXK6 = __esm({
10849
+ "../../packages/core/dist/chunk-O65PHXK6.js"() {
10850
10850
  "use strict";
10851
- init_chunk_DYCGBLRW();
10851
+ init_chunk_CGQWQYWY();
10852
10852
  init_chunk_WEXVYJ5H();
10853
10853
  init_chunk_HZ6CADSY();
10854
10854
  init_zod();
@@ -12197,7 +12197,7 @@ var init_chunk_T4Q5COKJ = __esm({
12197
12197
  }
12198
12198
  });
12199
12199
 
12200
- // ../../packages/core/dist/chunk-RRRUNBRX.js
12200
+ // ../../packages/core/dist/chunk-6PAEFCFT.js
12201
12201
  function refineHubAsCodeCustomTools(config, ctx) {
12202
12202
  const agents = config.agents;
12203
12203
  if (!Array.isArray(agents)) return;
@@ -12781,12 +12781,12 @@ function skillSectionsAsResources(scope) {
12781
12781
  };
12782
12782
  }
12783
12783
  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_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;
12784
- var init_chunk_RRRUNBRX = __esm({
12785
- "../../packages/core/dist/chunk-RRRUNBRX.js"() {
12784
+ var init_chunk_6PAEFCFT = __esm({
12785
+ "../../packages/core/dist/chunk-6PAEFCFT.js"() {
12786
12786
  "use strict";
12787
- init_chunk_SK2X6UOC();
12787
+ init_chunk_O65PHXK6();
12788
12788
  init_chunk_EE5FYMSX();
12789
- init_chunk_WFQU5HXK();
12789
+ init_chunk_E32ZC76C();
12790
12790
  init_chunk_LBDH7LCG();
12791
12791
  init_chunk_4LXDRTO4();
12792
12792
  init_chunk_T4Q5COKJ();
@@ -13800,13 +13800,13 @@ var init_chunk_LQY2OCQL = __esm({
13800
13800
  }
13801
13801
  });
13802
13802
 
13803
- // ../../packages/core/dist/chunk-5GJGVPL6.js
13803
+ // ../../packages/core/dist/chunk-7FHUVBQ2.js
13804
13804
  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;
13805
- var init_chunk_5GJGVPL6 = __esm({
13806
- "../../packages/core/dist/chunk-5GJGVPL6.js"() {
13805
+ var init_chunk_7FHUVBQ2 = __esm({
13806
+ "../../packages/core/dist/chunk-7FHUVBQ2.js"() {
13807
13807
  "use strict";
13808
13808
  init_chunk_LQY2OCQL();
13809
- init_chunk_WFQU5HXK();
13809
+ init_chunk_E32ZC76C();
13810
13810
  init_chunk_3HSB6J4J();
13811
13811
  init_chunk_5XEJSR22();
13812
13812
  init_chunk_DHPUPI4Y();
@@ -15088,12 +15088,12 @@ var init_contracts = __esm({
15088
15088
  init_chunk_LWMLR2WI();
15089
15089
  init_chunk_ACGAI25T();
15090
15090
  init_chunk_MH4O3YEX();
15091
- init_chunk_KTUVBNMI();
15091
+ init_chunk_SURLRMEK();
15092
15092
  init_chunk_KSTYTQ7I();
15093
15093
  init_chunk_LKBSHANA();
15094
15094
  init_chunk_BPCNB5RT();
15095
- init_chunk_RRRUNBRX();
15096
- init_chunk_SK2X6UOC();
15095
+ init_chunk_6PAEFCFT();
15096
+ init_chunk_O65PHXK6();
15097
15097
  init_chunk_EE5FYMSX();
15098
15098
  init_chunk_JDJ4EUOL();
15099
15099
  init_chunk_ZLJP22IA();
@@ -15103,9 +15103,9 @@ var init_contracts = __esm({
15103
15103
  init_chunk_YULHXJ5M();
15104
15104
  init_chunk_V4FRPRH5();
15105
15105
  init_chunk_ZHJEQBXJ();
15106
- init_chunk_5GJGVPL6();
15106
+ init_chunk_7FHUVBQ2();
15107
15107
  init_chunk_LQY2OCQL();
15108
- init_chunk_WFQU5HXK();
15108
+ init_chunk_E32ZC76C();
15109
15109
  init_chunk_3HSB6J4J();
15110
15110
  init_chunk_IG6QBZMA();
15111
15111
  init_chunk_ZJJ5ODOD();
@@ -15115,8 +15115,8 @@ var init_contracts = __esm({
15115
15115
  init_chunk_E4DIIOOE();
15116
15116
  init_chunk_7CYHPF35();
15117
15117
  init_chunk_VMAX5YRT();
15118
- init_chunk_DYCGBLRW();
15119
- init_chunk_FQZRBIAQ();
15118
+ init_chunk_CGQWQYWY();
15119
+ init_chunk_VZTO5ZM7();
15120
15120
  init_chunk_NVKU5PPQ();
15121
15121
  init_chunk_7LN3OG3F();
15122
15122
  init_chunk_FECLIZTY();
@@ -17961,7 +17961,7 @@ var init_registry = __esm({
17961
17961
  "src/data/registry.ts"() {
17962
17962
  "use strict";
17963
17963
  COMMAND_SURVIVAL = [
17964
- // --- Clause 1: deleted. One keyring login, one status, one CLI self-update. ---
17964
+ // --- Clause 1: deleted. One keyring login, one status, one CLI self-update, one report queue. ---
17965
17965
  {
17966
17966
  original: "login",
17967
17967
  disposition: "deleted",
@@ -18010,6 +18010,14 @@ var init_registry = __esm({
18010
18010
  shipped: true,
18011
18011
  reason: "One binary, one self-update."
18012
18012
  },
18013
+ {
18014
+ original: "report",
18015
+ disposition: "deleted",
18016
+ surviving: null,
18017
+ clause: 1,
18018
+ shipped: true,
18019
+ reason: "One report queue. WayAI's `report` is the survivor."
18020
+ },
18013
18021
  // --- Clause 2: top-level ontology entities WayAI owns no concept of. ---
18014
18022
  {
18015
18023
  original: "bases",
@@ -18218,14 +18226,6 @@ var init_registry = __esm({
18218
18226
  shipped: false,
18219
18227
  reason: "Clause 3's group exception: `wayai admin` is an existing group with its own gating and subgroups, so the operator surface joins it as a peer rather than sitting under `bases`. UNSHIPPED pending a transport: the Data backend's operator routes live at `/admin/*`, a SIBLING of `/v1/*`, and the merged CLI reaches Data only through WayAI's `/api/data` proxy, which contains every forwarded path under `/v1` by construction (`rekor/upstream-url.ts`). The standalone CLI could call them because it held a second `api_url` pointed straight at the Data backend \u2014 the thing the merge deliberately removed. Shipping needs a proxy channel for operator routes plus platform-admin gating on it, which is a backend change, not a CLI one."
18220
18228
  },
18221
- {
18222
- original: "report",
18223
- disposition: "namespaced",
18224
- surviving: "bases report",
18225
- clause: 3,
18226
- shipped: true,
18227
- reason: "Two report queues still exist, so the merged CLI must be able to file to either. The two collapse when the queues do."
18228
- },
18229
18229
  // --- Neither: one verb each, routing by workspace subtree. ---
18230
18230
  {
18231
18231
  original: "pull",
@@ -19899,8 +19899,8 @@ function resolveCommunityTarget(gitRoot, selector, cwd = process.cwd()) {
19899
19899
  const { communitiesDir } = resolveLayout(gitRoot);
19900
19900
  const label = communitiesDirLabel(gitRoot);
19901
19901
  if (selector === void 0) {
19902
- const here2 = path12.resolve(cwd);
19903
- const name = isUnder(communitiesDir, here2) ? path12.relative(communitiesDir, here2).split(path12.sep)[0] : "";
19902
+ const here = path12.resolve(cwd);
19903
+ const name = isUnder(communitiesDir, here) ? path12.relative(communitiesDir, here).split(path12.sep)[0] : "";
19904
19904
  if (!name) {
19905
19905
  const folders = listCommunityFolders(communitiesDir);
19906
19906
  throw expected(
@@ -22061,7 +22061,12 @@ var init_config_writer = __esm({
22061
22061
  "expose_fields",
22062
22062
  "default_fields",
22063
22063
  "agent_minimal",
22064
- "base_filter"
22064
+ "base_filter",
22065
+ // A SQL Action: `sql` last, so its query reads as one block at the end of the file.
22066
+ "record_types",
22067
+ "params",
22068
+ "limit",
22069
+ "sql"
22065
22070
  ],
22066
22071
  seeds: ["id", "description", "records", "relationships", "exclusive_record_types"]
22067
22072
  };
@@ -33872,9 +33877,9 @@ function diskClash(dir, rel) {
33872
33877
  if (!names.includes(segments[i])) return void 0;
33873
33878
  abs = path39.join(abs, segments[i]);
33874
33879
  const isDir = fs28.lstatSync(abs).isDirectory();
33875
- const here2 = segments.slice(0, i + 1).join("/");
33876
- if (i < segments.length - 1 && !isDir) return { reason: "file_folder", other: here2 };
33877
- if (i === segments.length - 1 && isDir) return { reason: "file_folder", other: `${here2}/` };
33880
+ const here = segments.slice(0, i + 1).join("/");
33881
+ if (i < segments.length - 1 && !isDir) return { reason: "file_folder", other: here };
33882
+ if (i === segments.length - 1 && isDir) return { reason: "file_folder", other: `${here}/` };
33878
33883
  }
33879
33884
  return void 0;
33880
33885
  }
@@ -37831,220 +37836,9 @@ var init_providers = __esm({
37831
37836
  }
37832
37837
  });
37833
37838
 
37834
- // src/data/commands/report.ts
37839
+ // src/data/commands/credentials.ts
37835
37840
  import { Command as Command6 } from "commander";
37836
37841
  import { readFileSync as readFileSync20 } from "fs";
37837
- import { dirname as dirname16, join as join37 } from "path";
37838
- import { fileURLToPath as fileURLToPath2 } from "url";
37839
- function resolveCliVersion() {
37840
- for (const candidate of [
37841
- join37(here, "..", "package.json"),
37842
- join37(here, "..", "..", "..", "package.json")
37843
- ]) {
37844
- try {
37845
- const version = JSON.parse(readFileSync20(candidate, "utf-8")).version;
37846
- if (typeof version === "string" && version) return version;
37847
- } catch {
37848
- }
37849
- }
37850
- return "unknown";
37851
- }
37852
- function resolveReportClientVersions(projectRoot, cliVersion) {
37853
- const versions = { cli_version: cliVersion };
37854
- try {
37855
- const skillVersion = lowestInstalledVersion(findInstalledSkills(projectRoot));
37856
- if (skillVersion) versions.skill_version = skillVersion;
37857
- } catch {
37858
- }
37859
- return versions;
37860
- }
37861
- function reportActionError2(err) {
37862
- if (err instanceof ApiError) {
37863
- if (err.status === 404) {
37864
- console.error("Report not found, or it was not filed by you.");
37865
- } else if (err.status === 403) {
37866
- console.error("This report is agent-authored and can only be handled by a platform admin.");
37867
- } else if (err.status === 409) {
37868
- console.error(err.message);
37869
- } else if (err.status === 429) {
37870
- console.error("Rate limit exceeded. Please try again later.");
37871
- } else {
37872
- console.error(`Request failed: ${err.message}`);
37873
- }
37874
- return process.exit(1);
37875
- }
37876
- throw err;
37877
- }
37878
- function buildBasesReportCommand() {
37879
- const report2 = new Command6("report").description(
37880
- "File a report to the Data triage queue and verify the outcome"
37881
- );
37882
- report2.command("create").description("Submit a report to the Data triage queue (deduplicated)").requiredOption("--title <title>", "Short summary").requiredOption("--description <text>", "What happened").option("--source <source>", "Origin: cli_report (default) | review | security_audit").option("--classification <c>", "Nature: bug (default) | flaky_test | security | enhancement").option(
37883
- "--dedup-key <key>",
37884
- 'Stable dedup key (e.g. "<file>::<test>"); collapses repeat occurrences'
37885
- ).option("--severity <level>", "low | medium | high | critical").option("--steps <text>", "Steps to reproduce").option("--error-message <text>", "Exact error text if any").option("--context <text>", "Additional context (logs, request ids)").option("--locale <code>", "Notification locale (en | pt | es)", "en").option("--reporter-email <addr>", "Override reporter email (defaults to session email)").option("--base-id <id>", "Base the error relates to (defaults to the configured base)").option("--record-type <name>", "Record type the error relates to").option("--record-id <id>", "Record id (UUID) the error relates to").option("--external-id <id>", "External id of the related record").option("--external-source <src>", "External source of the related record").option("--relationship-id <id>", "Relationship id the error relates to").action(async function(opts) {
37886
- const body = {
37887
- title: opts.title,
37888
- description: opts.description,
37889
- locale: opts.locale
37890
- };
37891
- if (opts.source) body.source = opts.source;
37892
- if (opts.classification) body.classification = opts.classification;
37893
- if (opts.dedupKey) body.dedup_key = opts.dedupKey;
37894
- if (opts.severity) body.severity = opts.severity;
37895
- if (opts.steps) body.steps = opts.steps;
37896
- if (opts.errorMessage) body.error_message = opts.errorMessage;
37897
- if (opts.context) body.context = opts.context;
37898
- if (opts.reporterEmail) body.reporter_email = opts.reporterEmail;
37899
- const baseId2 = opts.baseId ?? findBase(this) ?? process.env.WAYAI_BASE;
37900
- if (baseId2) body.base_id = baseId2;
37901
- if (opts.recordType) body.record_type = opts.recordType;
37902
- if (opts.recordId) body.record_id = opts.recordId;
37903
- if (opts.externalId) body.external_id = opts.externalId;
37904
- if (opts.externalSource) body.external_source = opts.externalSource;
37905
- if (opts.relationshipId) body.relationship_id = opts.relationshipId;
37906
- const versions = resolveReportClientVersions(
37907
- findGitRoot() ?? process.cwd(),
37908
- resolveCliVersion()
37909
- );
37910
- body.cli_version = versions.cli_version;
37911
- if (versions.skill_version) body.skill_version = versions.skill_version;
37912
- const client = await createDataClient();
37913
- const data = await client.request("POST", "/v1/reports", body);
37914
- if (outputFormat(this) === "json") {
37915
- printOutput(data, "json");
37916
- return;
37917
- }
37918
- if (data.created) {
37919
- console.log(`Report submitted (id: ${data.report_id}).`);
37920
- console.log("Our team will review and follow up by email if you provided one.");
37921
- } else if (data.recurrence?.reopened) {
37922
- console.log(`Report reopened for another look (id: ${data.report_id}).`);
37923
- } else if (data.recurrence) {
37924
- console.log(
37925
- `A matching report remains closed (id: ${data.report_id}); this occurrence was recorded.`
37926
- );
37927
- } else {
37928
- console.log(
37929
- `A matching report already exists (id: ${data.report_id}) \u2014 your submission was merged into it.`
37930
- );
37931
- }
37932
- });
37933
- report2.command("list").description("List your reports, newest first").option("--status <s>", "Filter by status (e.g. shipped \u2014 awaiting your verification)").action(async function(opts) {
37934
- const client = await createDataClient();
37935
- const qs = opts.status ? `?status=${encodeURIComponent(opts.status)}` : "";
37936
- try {
37937
- const rows = await client.request("GET", `/v1/reports${qs}`);
37938
- if (outputFormat(this) === "json") {
37939
- printOutput(rows, "json");
37940
- return;
37941
- }
37942
- if (rows.length === 0) {
37943
- console.log("No reports found.");
37944
- return;
37945
- }
37946
- for (const r of rows) {
37947
- const title = sanitizeTerminalText(r.title?.replace(/\s+/g, " ").trim() || "(untitled)");
37948
- console.log(
37949
- `${r.report_id} ${r.status.padEnd(10)} ${(r.classification ?? "bug").padEnd(12)} ${title}`
37950
- );
37951
- }
37952
- } catch (err) {
37953
- reportActionError2(err);
37954
- }
37955
- });
37956
- report2.command("get <report_id>").description("Show one of your reports: status + the message thread").action(async function(reportId) {
37957
- const client = await createDataClient();
37958
- try {
37959
- const data = await client.request("GET", `/v1/reports/${pathSegment(reportId, "report id")}`);
37960
- if (outputFormat(this) === "json") {
37961
- printOutput(data, "json");
37962
- return;
37963
- }
37964
- const { report: row, messages } = data;
37965
- console.log(`Report ${row.report_id}`);
37966
- console.log(` title: ${sanitizeTerminalText(row.title ?? "(unavailable)")}`);
37967
- console.log(
37968
- ` description: ${sanitizeTerminalText(row.description ?? "(unavailable)")}`
37969
- );
37970
- console.log(` status: ${row.status}`);
37971
- console.log(` classification: ${row.classification ?? "bug"}`);
37972
- if (row.contest_count > 0) console.log(` contests: ${row.contest_count}`);
37973
- if (row.dismissal_final) console.log(" dismissal: final (non-contestable)");
37974
- if (messages.length > 0) {
37975
- console.log("\n Thread:");
37976
- for (const m of messages) {
37977
- console.log(` [${m.author_role}] ${sanitizeTerminalText(m.body)}`);
37978
- }
37979
- }
37980
- if (row.status === "shipped") {
37981
- console.log(
37982
- `
37983
- This fix is shipped. Run \`wayai bases report accept ${row.report_id}\` if it works,`
37984
- );
37985
- console.log(
37986
- ` or \`wayai bases report contest ${row.report_id} --reason "..."\` if it does not.`
37987
- );
37988
- }
37989
- } catch (err) {
37990
- reportActionError2(err);
37991
- }
37992
- });
37993
- report2.command("accept <report_id>").description("Accept a shipped fix (\u2192 addressed)").action(async function(reportId) {
37994
- const client = await createDataClient();
37995
- try {
37996
- const data = await client.request(
37997
- "POST",
37998
- `/v1/reports/${pathSegment(reportId, "report id")}/accept`
37999
- );
38000
- if (outputFormat(this) === "json") {
38001
- printOutput(data, "json");
38002
- return;
38003
- }
38004
- console.log(`Accepted. Report ${data.report.report_id} \u2192 ${data.report.status}.`);
38005
- } catch (err) {
38006
- reportActionError2(err);
38007
- }
38008
- });
38009
- report2.command("contest <report_id>").description("Contest a shipped fix or a dismissal (\u2192 back to triage)").requiredOption("--reason <text>", "Why the fix/dismissal is wrong").action(async function(reportId, opts) {
38010
- const client = await createDataClient();
38011
- try {
38012
- const data = await client.request(
38013
- "POST",
38014
- `/v1/reports/${pathSegment(reportId, "report id")}/contest`,
38015
- { reason: opts.reason }
38016
- );
38017
- if (outputFormat(this) === "json") {
38018
- printOutput(data, "json");
38019
- return;
38020
- }
38021
- console.log(
38022
- `Contested. Report ${data.report.report_id} \u2192 ${data.report.status} (back to triage).`
38023
- );
38024
- } catch (err) {
38025
- reportActionError2(err);
38026
- }
38027
- });
38028
- return report2;
38029
- }
38030
- var here;
38031
- var init_report3 = __esm({
38032
- "src/data/commands/report.ts"() {
38033
- "use strict";
38034
- init_client();
38035
- init_output();
38036
- init_helpers();
38037
- init_api_client();
38038
- init_terminal_output();
38039
- init_workspace();
38040
- init_skill_version();
38041
- here = dirname16(fileURLToPath2(import.meta.url));
38042
- }
38043
- });
38044
-
38045
- // src/data/commands/credentials.ts
38046
- import { Command as Command7 } from "commander";
38047
- import { readFileSync as readFileSync21 } from "fs";
38048
37842
  function withValueSourceOptions(cmd, what) {
38049
37843
  return cmd.option(
38050
37844
  "--file <path>",
@@ -38057,7 +37851,7 @@ async function resolveValue(opts, label) {
38057
37851
  throw expected("--file cannot be combined with --value-stdin or --value-prompt \u2014 pass one.");
38058
37852
  }
38059
37853
  try {
38060
- return readFileSync21(opts.file).toString("base64");
37854
+ return readFileSync20(opts.file).toString("base64");
38061
37855
  } catch (e) {
38062
37856
  throw expected(`--file ${opts.file}: ${e instanceof Error ? e.message : "could not be read"}`);
38063
37857
  }
@@ -38078,7 +37872,7 @@ function credentialPath(base, id) {
38078
37872
  }
38079
37873
  function buildBasesCredentialsCommand() {
38080
37874
  const credentials = withBaseOption(
38081
- new Command7("credentials").description("Manage a base's integration credentials")
37875
+ new Command6("credentials").description("Manage a base's integration credentials")
38082
37876
  );
38083
37877
  withValueSourceOptions(
38084
37878
  credentials.command("create").description("Store a credential on this base (value read from stdin, a masked prompt, or --file)").requiredOption("--name <name>", "Credential name \u2014 what a credential:<name> reference resolves").option("--content-type <mime>", "MIME type of the value (e.g. application/x-pkcs12)").option(
@@ -38205,10 +37999,10 @@ var init_credentials = __esm({
38205
37999
  });
38206
38000
 
38207
38001
  // src/data/commands/sql.ts
38208
- import { Command as Command8 } from "commander";
38209
- import { readFileSync as readFileSync22 } from "fs";
38002
+ import { Command as Command7 } from "commander";
38003
+ import { readFileSync as readFileSync21 } from "fs";
38210
38004
  function buildBasesSqlCommand() {
38211
- return withBaseOption(new Command8("sql")).description("Execute a read-only SQL query against base data").argument("[query]", "SQL query (SELECT only)").option("--file <path>", "Read SQL from a file instead of the argument").option(
38005
+ return withBaseOption(new Command7("sql")).description("Execute a read-only SQL query against base data").argument("[query]", "SQL query (SELECT only)").option("--file <path>", "Read SQL from a file instead of the argument").option(
38212
38006
  "--param <kv...>",
38213
38007
  "Named parameters as key=value pairs (e.g. --param status=issued)"
38214
38008
  ).action(async function(queryArg, opts) {
@@ -38216,7 +38010,7 @@ function buildBasesSqlCommand() {
38216
38010
  let query;
38217
38011
  if (opts.file) {
38218
38012
  try {
38219
- query = readFileSync22(opts.file, "utf-8").trim();
38013
+ query = readFileSync21(opts.file, "utf-8").trim();
38220
38014
  } catch (e) {
38221
38015
  throw expected(`--file ${opts.file}: ${e instanceof Error ? e.message : "could not be read"}`);
38222
38016
  }
@@ -38251,7 +38045,7 @@ var init_sql = __esm({
38251
38045
  });
38252
38046
 
38253
38047
  // src/data/commands/tokens.ts
38254
- import { Command as Command9 } from "commander";
38048
+ import { Command as Command8 } from "commander";
38255
38049
  function rawTokenFrom(data) {
38256
38050
  const token = typeof data === "object" && data !== null && "token" in data ? data.token : void 0;
38257
38051
  if (typeof token !== "string" || !RAW_TOKEN_PATTERN.test(token)) {
@@ -38304,7 +38098,7 @@ function pruneRow(t, reason) {
38304
38098
  };
38305
38099
  }
38306
38100
  function buildBasesTokensCommand() {
38307
- const tokens2 = new Command9("tokens").description("Manage API tokens");
38101
+ const tokens2 = new Command8("tokens").description("Manage API tokens");
38308
38102
  addTokenLifecycleOptions(
38309
38103
  tokens2.command("create").description("Create a scoped API token").requiredOption("--name <name>", "Token name").requiredOption("--grants <json>", "Grant definitions as JSON array").option(
38310
38104
  "--token-only",
@@ -38525,7 +38319,7 @@ var init_base_tags = __esm({
38525
38319
  });
38526
38320
 
38527
38321
  // src/data/commands/bases.ts
38528
- import { Command as Command10 } from "commander";
38322
+ import { Command as Command9 } from "commander";
38529
38323
  function pageOf(path42, cursor) {
38530
38324
  if (!cursor) return path42;
38531
38325
  return `${path42}${path42.includes("?") ? "&" : "?"}cursor=${encodeURIComponent(cursor)}`;
@@ -38538,7 +38332,7 @@ function parseEnum(flag, value, allowed) {
38538
38332
  return value;
38539
38333
  }
38540
38334
  function buildBasesCommand() {
38541
- const bases = new Command10("bases").description("Manage bases");
38335
+ const bases = new Command9("bases").description("Manage bases");
38542
38336
  bases.command("list").description("List all bases").option("--tag <tag>", "Filter by tag").action(async function(opts) {
38543
38337
  const client = await createDataClient();
38544
38338
  const qs = opts.tag ? `?tag=${encodeURIComponent(opts.tag)}` : "";
@@ -38789,7 +38583,6 @@ function buildBasesCommand() {
38789
38583
  bases.addCommand(buildBasesImportCommand());
38790
38584
  bases.addCommand(buildBasesBatchCommand());
38791
38585
  bases.addCommand(buildBasesProvidersCommand());
38792
- bases.addCommand(buildBasesReportCommand());
38793
38586
  return bases;
38794
38587
  }
38795
38588
  var init_bases = __esm({
@@ -38798,7 +38591,6 @@ var init_bases = __esm({
38798
38591
  init_batch();
38799
38592
  init_import();
38800
38593
  init_providers();
38801
- init_report3();
38802
38594
  init_credentials();
38803
38595
  init_sql();
38804
38596
  init_tokens();
@@ -38816,9 +38608,9 @@ var init_bases = __esm({
38816
38608
  });
38817
38609
 
38818
38610
  // src/data/commands/file-types.ts
38819
- import { Command as Command11 } from "commander";
38611
+ import { Command as Command10 } from "commander";
38820
38612
  function buildFileTypesCommand() {
38821
- const fileTypes = new Command11("file-types").description(
38613
+ const fileTypes = new Command10("file-types").description(
38822
38614
  "Manage file types (Buckets) \u2014 storage policy + optional metadata schema for files"
38823
38615
  );
38824
38616
  fileTypes.command("list").description("List all file types in a base").action(async function() {
@@ -38874,8 +38666,8 @@ var init_file_types = __esm({
38874
38666
  });
38875
38667
 
38876
38668
  // src/data/commands/files.ts
38877
- import { Command as Command12 } from "commander";
38878
- import { readFileSync as readFileSync23, writeFileSync as writeFileSync11 } from "fs";
38669
+ import { Command as Command11 } from "commander";
38670
+ import { readFileSync as readFileSync22, writeFileSync as writeFileSync11 } from "fs";
38879
38671
  import { basename as basename27 } from "path";
38880
38672
  function renderFileDiff(fileType, filePath2, from, to, d) {
38881
38673
  console.log(sanitizeTerminalText(`${fileType}/${filePath2}: v${from} \u2192 v${to}`));
@@ -38917,7 +38709,7 @@ function downloadTarget(remotePath2, to) {
38917
38709
  return derived;
38918
38710
  }
38919
38711
  function buildFilesCommand() {
38920
- const files = new Command12("files").description(
38712
+ const files = new Command11("files").description(
38921
38713
  "Manage files (path-addressed, versioned content) within a file type"
38922
38714
  );
38923
38715
  files.command("put <file_type> <path>").description(
@@ -38932,7 +38724,7 @@ function buildFilesCommand() {
38932
38724
  label: opts.label,
38933
38725
  metadata: opts.metadata === void 0 ? void 0 : parseData(opts.metadata, "--metadata")
38934
38726
  });
38935
- const body = readFileSync23(opts.file);
38727
+ const body = readFileSync22(opts.file);
38936
38728
  const client = await createDataClient();
38937
38729
  printOutput(
38938
38730
  await client.upload(
@@ -39125,9 +38917,9 @@ var init_files2 = __esm({
39125
38917
 
39126
38918
  // src/data/commands/inbound-webhooks.ts
39127
38919
  import { randomUUID as randomUUID2 } from "crypto";
39128
- import { Command as Command13 } from "commander";
38920
+ import { Command as Command12 } from "commander";
39129
38921
  function buildInboundWebhooksCommand() {
39130
- const inboundWebhooks = new Command13("inbound-webhooks").description(
38922
+ const inboundWebhooks = new Command12("inbound-webhooks").description(
39131
38923
  "Manage inbound webhook endpoints"
39132
38924
  );
39133
38925
  inboundWebhooks.command("create").description("Create a new inbound webhook").requiredOption("--name <name>", "Inbound webhook name").option("--secret-stdin", "Read the HMAC shared secret from stdin (recommended for CI)").option("--id <id>", "Inbound webhook ID (auto-generated if omitted)").option("--record-type-scope <record_types>", "Comma-separated record_type scope").option(
@@ -39225,9 +39017,9 @@ var init_inbound_webhooks = __esm({
39225
39017
  });
39226
39018
 
39227
39019
  // src/data/commands/query-relationships.ts
39228
- import { Command as Command14 } from "commander";
39020
+ import { Command as Command13 } from "commander";
39229
39021
  function buildQueryRelationshipsCommand() {
39230
- return new Command14("query-relationships").description("Query related records").argument("<record_type>", "RecordType of the source record").argument("<id>", "Source record ID").option("--type <type>", "Filter by relationship type").option("--direction <dir>", "Direction: outgoing, incoming, or both", "both").option("--limit <n>", "Max results", "50").option("--offset <n>", "Skip results", "0").action(async function(recordType2, id, opts) {
39022
+ return new Command13("query-relationships").description("Query related records").argument("<record_type>", "RecordType of the source record").argument("<id>", "Source record ID").option("--type <type>", "Filter by relationship type").option("--direction <dir>", "Direction: outgoing, incoming, or both", "both").option("--limit <n>", "Max results", "50").option("--offset <n>", "Skip results", "0").action(async function(recordType2, id, opts) {
39231
39023
  const base = pathSegment(requireBase(this), "--base");
39232
39024
  const client = await createDataClient();
39233
39025
  const params = new URLSearchParams();
@@ -39260,9 +39052,9 @@ var init_query_relationships = __esm({
39260
39052
  });
39261
39053
 
39262
39054
  // src/data/commands/record-types.ts
39263
- import { Command as Command15 } from "commander";
39055
+ import { Command as Command14 } from "commander";
39264
39056
  function buildRecordTypesCommand() {
39265
- const recordTypes = new Command15("record-types").description("Manage record_types");
39057
+ const recordTypes = new Command14("record-types").description("Manage record_types");
39266
39058
  recordTypes.command("list").description("List all record_types in a base").action(async function() {
39267
39059
  const base = pathSegment(requireBase(this), "--base");
39268
39060
  const client = await createDataClient();
@@ -39320,12 +39112,12 @@ var init_record_types = __esm({
39320
39112
  });
39321
39113
 
39322
39114
  // src/data/commands/records.ts
39323
- import { Command as Command16 } from "commander";
39115
+ import { Command as Command15 } from "commander";
39324
39116
  function recordKey(id, externalSource) {
39325
39117
  return externalSource ? foreignSegment(id, "external id") : pathSegment(id, "record id");
39326
39118
  }
39327
39119
  function buildRecordsCommand() {
39328
- const records = new Command16("records").description("Manage records");
39120
+ const records = new Command15("records").description("Manage records");
39329
39121
  records.command("upsert <record_type>").description("Create or update a record").requiredOption("--data <json>", "Record data (inline JSON or @filename)").option("--id <id>", "Internal record ID (UUID) to update a known record").option("--external-id <id>", "External/agent-supplied ID for idempotent upsert").option("--external-source <source>", "Source system for external_id (e.g. stripe)").action(async function(recordType2, opts) {
39330
39122
  const base = pathSegment(requireBase(this), "--base");
39331
39123
  const client = await createDataClient();
@@ -39414,9 +39206,9 @@ var init_records = __esm({
39414
39206
  });
39415
39207
 
39416
39208
  // src/data/commands/relationship-types.ts
39417
- import { Command as Command17 } from "commander";
39209
+ import { Command as Command16 } from "commander";
39418
39210
  function buildRelationshipTypesCommand() {
39419
- const relationshipTypes = new Command17("relationship-types").description(
39211
+ const relationshipTypes = new Command16("relationship-types").description(
39420
39212
  "Manage relationship types (the schema for a relationship's metadata)"
39421
39213
  );
39422
39214
  relationshipTypes.command("list").description("List all relationship types in a base").action(async function() {
@@ -39493,7 +39285,7 @@ var init_relationship_types = __esm({
39493
39285
  });
39494
39286
 
39495
39287
  // src/data/commands/relationships.ts
39496
- import { Command as Command18 } from "commander";
39288
+ import { Command as Command17 } from "commander";
39497
39289
  function relationshipKey(id, relType) {
39498
39290
  return relType ? foreignSegment(id, "external id") : pathSegment(id, "relationship id");
39499
39291
  }
@@ -39529,7 +39321,7 @@ function byKeyQuery(relType, externalSource) {
39529
39321
  return q ? `?${q}` : "";
39530
39322
  }
39531
39323
  function buildRelationshipsCommand() {
39532
- const relationships = new Command18("relationships").description(
39324
+ const relationships = new Command17("relationships").description(
39533
39325
  "Manage relationships between records"
39534
39326
  );
39535
39327
  relationships.command("upsert").description("Create or update a relationship").option("--source <record_type/id>", "Source record by internal id").option(
@@ -39614,9 +39406,9 @@ var init_relationships = __esm({
39614
39406
  });
39615
39407
 
39616
39408
  // src/data/commands/seed.ts
39617
- import { Command as Command19 } from "commander";
39409
+ import { Command as Command18 } from "commander";
39618
39410
  function buildSeedCommand() {
39619
- const seed = new Command19("seed").description(
39411
+ const seed = new Command18("seed").description(
39620
39412
  "Apply, reset, or clear a seed fixture on a preview base (hermetic eval data)"
39621
39413
  );
39622
39414
  seed.command("apply <name>").description(
@@ -39708,7 +39500,7 @@ var init_seed = __esm({
39708
39500
  });
39709
39501
 
39710
39502
  // src/data/commands/toolsets.ts
39711
- import { Command as Command20 } from "commander";
39503
+ import { Command as Command19 } from "commander";
39712
39504
  function collect(value, previous) {
39713
39505
  return [...previous, value];
39714
39506
  }
@@ -39731,7 +39523,7 @@ function parseRelSpec(spec) {
39731
39523
  return { rel_type: key, operations: ops };
39732
39524
  }
39733
39525
  function buildToolsetsCommand() {
39734
- const toolsets = new Command20("toolsets").description("Manage MCP toolsets");
39526
+ const toolsets = new Command19("toolsets").description("Manage MCP toolsets");
39735
39527
  toolsets.command("upsert <slug>").description("Create or update an MCP toolset").option("--name <name>", "Toolset display name (required unless using --config)").option("--description <desc>", "Toolset description").option(
39736
39528
  "--action <ref>",
39737
39529
  "Reference an Action by id, optionally renamed: <action_id> or <action_id>=<surface_name> (repeatable). Create Actions first with `wayai actions upsert`.",
@@ -39823,9 +39615,9 @@ var init_toolsets = __esm({
39823
39615
 
39824
39616
  // src/data/commands/triggers.ts
39825
39617
  import { randomUUID as randomUUID3 } from "crypto";
39826
- import { Command as Command21 } from "commander";
39618
+ import { Command as Command20 } from "commander";
39827
39619
  function buildTriggersCommand() {
39828
- const triggers = new Command21("triggers").description(
39620
+ const triggers = new Command20("triggers").description(
39829
39621
  "Manage triggers (outbound webhooks, internal writes, external writes)"
39830
39622
  );
39831
39623
  triggers.command("create").description(
@@ -39931,7 +39723,7 @@ __export(program_exports, {
39931
39723
  withBaseOption: () => withBaseOption,
39932
39724
  withDataGlobals: () => withDataGlobals
39933
39725
  });
39934
- import { Command as Command22 } from "commander";
39726
+ import { Command as Command21 } from "commander";
39935
39727
  function withDataGlobals(command2) {
39936
39728
  return command2.option("--org <uuid>", "Organization to operate against (overrides the repo's org binding)").option("--output <format>", "Output format: json or table", "table").option("--json", "Shorthand for --output json");
39937
39729
  }
@@ -39954,7 +39746,7 @@ function handleParserExit(err) {
39954
39746
  throw err;
39955
39747
  }
39956
39748
  function buildDataProgram() {
39957
- const program = new Command22("wayai");
39749
+ const program = new Command21("wayai");
39958
39750
  program.addCommand(withDataGlobals(buildBasesCommand()));
39959
39751
  for (const build of [
39960
39752
  buildRecordsCommand,
@@ -40021,9 +39813,9 @@ init_errors2();
40021
39813
  init_mask_secrets();
40022
39814
  init_utils();
40023
39815
  init_registry();
40024
- import { readFileSync as readFileSync24 } from "fs";
40025
- import { fileURLToPath as fileURLToPath3 } from "url";
40026
- import { dirname as dirname17, join as join38 } from "path";
39816
+ import { readFileSync as readFileSync23 } from "fs";
39817
+ import { fileURLToPath as fileURLToPath2 } from "url";
39818
+ import { dirname as dirname16, join as join37 } from "path";
40027
39819
 
40028
39820
  // src/lib/version-refresh.ts
40029
39821
  init_version_cache();
@@ -40178,8 +39970,8 @@ Run \`wayai admin skill install\` to update.`);
40178
39970
  }
40179
39971
 
40180
39972
  // src/index.ts
40181
- var __dirname = dirname17(fileURLToPath3(import.meta.url));
40182
- var pkg = JSON.parse(readFileSync24(join38(__dirname, "..", "package.json"), "utf-8"));
39973
+ var __dirname = dirname16(fileURLToPath2(import.meta.url));
39974
+ var pkg = JSON.parse(readFileSync23(join37(__dirname, "..", "package.json"), "utf-8"));
40183
39975
  var [, , command, ...args] = process.argv;
40184
39976
  var isBackgroundRefresh = command === REFRESH_COMMAND;
40185
39977
  if (!isBackgroundRefresh) initSentry(command, pkg.version);
@@ -40557,7 +40349,7 @@ async function runForeground() {
40557
40349
  try {
40558
40350
  await main();
40559
40351
  if (command && !SKIP_UPDATE_CHECK.includes(command) && !wantsHelp(args)) {
40560
- showUpdateNudges(pkg.version, fileURLToPath3(import.meta.url));
40352
+ showUpdateNudges(pkg.version, fileURLToPath2(import.meta.url));
40561
40353
  }
40562
40354
  await closeSentry();
40563
40355
  } catch (err) {