@wayai/cli 0.3.258 → 0.3.260

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
@@ -5700,10 +5700,10 @@ var init_chunk_ACKF2MVU = __esm({
5700
5700
  }
5701
5701
  });
5702
5702
 
5703
- // ../../packages/core/dist/chunk-JOPEQ3WP.js
5703
+ // ../../packages/core/dist/chunk-GPYAZPH7.js
5704
5704
  var accessExplainQuery;
5705
- var init_chunk_JOPEQ3WP = __esm({
5706
- "../../packages/core/dist/chunk-JOPEQ3WP.js"() {
5705
+ var init_chunk_GPYAZPH7 = __esm({
5706
+ "../../packages/core/dist/chunk-GPYAZPH7.js"() {
5707
5707
  "use strict";
5708
5708
  init_chunk_HZ6CADSY();
5709
5709
  init_zod();
@@ -6636,7 +6636,7 @@ var init_chunk_Y7CFCYX4 = __esm({
6636
6636
  }
6637
6637
  });
6638
6638
 
6639
- // ../../packages/core/dist/chunk-LIDKVVXZ.js
6639
+ // ../../packages/core/dist/chunk-LOCEO2KI.js
6640
6640
  function normalizeContactPhone(raw) {
6641
6641
  const compact = raw.trim().replace(/[\s\-.()]/g, "");
6642
6642
  const withPlus = compact.startsWith("00") ? `+${compact.slice(2)}` : compact;
@@ -6649,8 +6649,8 @@ function importRowLabels(row, batchLabels) {
6649
6649
  return [.../* @__PURE__ */ new Set([...row.labels ?? [], ...batchLabels ?? []])];
6650
6650
  }
6651
6651
  var 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, SUPPRESSION_SCOPES, SUPPRESSION_ID_REGEX, 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, CONTACT_CUSTOMER_BASE_ID_PATTERN, baseId, recordId, linkContactCustomerBody, unlinkContactCustomerQuery, listName, contactListFilterSchema, createContactBookListBody, updateContactBookListBody, updateContactBookListPinsBody, suppressionIdentitySchema, createContactBookSuppressionBody, contactBookSuppressionParam, listContactBookSuppressionsQuery, contactBookEmailUnsubscribeTokenSchema, contactBookEmailUnsubscribeQuery, orgListReferenceSchema;
6652
- var init_chunk_LIDKVVXZ = __esm({
6653
- "../../packages/core/dist/chunk-LIDKVVXZ.js"() {
6652
+ var init_chunk_LOCEO2KI = __esm({
6653
+ "../../packages/core/dist/chunk-LOCEO2KI.js"() {
6654
6654
  "use strict";
6655
6655
  init_zod();
6656
6656
  CONTACT_ENVIRONMENTS = ["production", "preview", "all"];
@@ -6821,12 +6821,12 @@ var init_chunk_LIDKVVXZ = __esm({
6821
6821
  }
6822
6822
  });
6823
6823
 
6824
- // ../../packages/core/dist/chunk-DGTJX3C4.js
6824
+ // ../../packages/core/dist/chunk-OZC45RYU.js
6825
6825
  var PERSON_ID_PATTERN, CONTACT_PERSON_ID_PATTERN, PERSON_DENY_PAGE_MAX, PERSON_ID_FORM_MESSAGE, userPersonIdSchema, personIdSchema, personParam, personLinkParam, deniedPersonParam, listDeniedPersonsQuery;
6826
- var init_chunk_DGTJX3C4 = __esm({
6827
- "../../packages/core/dist/chunk-DGTJX3C4.js"() {
6826
+ var init_chunk_OZC45RYU = __esm({
6827
+ "../../packages/core/dist/chunk-OZC45RYU.js"() {
6828
6828
  "use strict";
6829
- init_chunk_LIDKVVXZ();
6829
+ init_chunk_LOCEO2KI();
6830
6830
  init_zod();
6831
6831
  PERSON_ID_PATTERN = /^prs_[a-z2-7]{52}$/;
6832
6832
  CONTACT_PERSON_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
@@ -6998,10 +6998,10 @@ var init_chunk_FPSDNS2E = __esm({
6998
6998
  }
6999
6999
  });
7000
7000
 
7001
- // ../../packages/core/dist/chunk-LVTURR5A.js
7001
+ // ../../packages/core/dist/chunk-5ZLNVO63.js
7002
7002
  var 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, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, REKOR_BOUND_BASE_HEADER, REKOR_BOUND_TOOLSET_HEADER, REKOR_BOUND_TOKEN_HEADER, REKOR_BOUND_CUSTOMER_HEADER, REKOR_BOUND_ACCESS_HEADER, REKOR_BOUND_ACCESS_SCOPE_HEADER, REKOR_BOUND_PAGE_HEADER, REKOR_BOUND_PERSON_HEADER, REKOR_PERSON_AUDIENCE_STAFF, REKOR_PERSON_AUDIENCE_CUSTOMER, REKOR_PERSON_ALL, REKOR_ACCESS_SCOPE_CUSTOMER, DATA_BASE_GENERATION_HEADER, REKOR_MAX_ACTOR_ID_LENGTH, REKOR_MAX_ACTOR_LABEL_LENGTH, REKOR_MAX_ACCESS_DIMENSIONS, REKOR_MAX_ACCESS_VALUES, REKOR_MAX_ACCESS_ID_LENGTH, REKOR_MAX_ACCESS_HEADER_LENGTH, REKOR_MAX_PERSON_PARTIES, REKOR_MAX_PERSON_IDS, REKOR_MAX_PERSON_ID_LENGTH, REKOR_MAX_PERSON_HEADER_LENGTH;
7003
- var init_chunk_LVTURR5A = __esm({
7004
- "../../packages/core/dist/chunk-LVTURR5A.js"() {
7003
+ var init_chunk_5ZLNVO63 = __esm({
7004
+ "../../packages/core/dist/chunk-5ZLNVO63.js"() {
7005
7005
  "use strict";
7006
7006
  init_zod();
7007
7007
  REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
@@ -7057,7 +7057,7 @@ var init_chunk_LVTURR5A = __esm({
7057
7057
  }
7058
7058
  });
7059
7059
 
7060
- // ../../packages/core/dist/chunk-R3YTRHDM.js
7060
+ // ../../packages/core/dist/chunk-642WMH6U.js
7061
7061
  function isPersonAccessAll(lists) {
7062
7062
  return lists !== void 0 && lists.read.length === 1 && lists.read[0] === ACCESS_UNRESTRICTED && lists.write.length === 1 && lists.write[0] === ACCESS_UNRESTRICTED;
7063
7063
  }
@@ -7095,10 +7095,10 @@ function assignmentHasUnrestricted(assignment) {
7095
7095
  return Object.values(assignment).some((lists) => lists.read.includes(ACCESS_UNRESTRICTED) || lists.write.includes(ACCESS_UNRESTRICTED));
7096
7096
  }
7097
7097
  var ACCESS_UNRESTRICTED, ACCESS_ID_REGEX, ACCESS_ID_MAX_LENGTH, MAX_ACCESS_DIMENSIONS_PER_ORG, MAX_ACCESS_VALUES_PER_DIMENSION, ACCESS_LABEL_MAX_LENGTH, accessIdSchema, accessLabelSchema, accessValueListSchema, accessListsSchema, accessAssignmentSchema, PERSON_ACCESS_KEY, heldAccessKeySchema, heldAccessAssignmentSchema, AGENT_PERSON_ACCESS_REFUSAL, accessSetSchema, accessDimensionParam, accessValueParam, orgMemberParam, orgHubParam, createAccessDimensionBody, updateAccessDimensionBody, createAccessValueBody, updateAccessValueBody, setMemberAccessValuesBody, HUB_PERSON_KINDS, ACCESS_PERSON_KINDS, setHubUserAccessValuesBody, setHubAccessValuesBody, setAgentAccessValuesBody;
7098
- var init_chunk_R3YTRHDM = __esm({
7099
- "../../packages/core/dist/chunk-R3YTRHDM.js"() {
7098
+ var init_chunk_642WMH6U = __esm({
7099
+ "../../packages/core/dist/chunk-642WMH6U.js"() {
7100
7100
  "use strict";
7101
- init_chunk_LVTURR5A();
7101
+ init_chunk_5ZLNVO63();
7102
7102
  init_chunk_HZ6CADSY();
7103
7103
  init_chunk_YROEDMVZ();
7104
7104
  init_zod();
@@ -7189,7 +7189,10 @@ var init_chunk_R3YTRHDM = __esm({
7189
7189
  }
7190
7190
  });
7191
7191
 
7192
- // ../../packages/core/dist/chunk-ZJQGHQEQ.js
7192
+ // ../../packages/core/dist/chunk-G5MO5PB5.js
7193
+ function boundCustomerPartyIsValid(audience, parties, customer) {
7194
+ return audience !== REKOR_PERSON_AUDIENCE_STAFF && customer < parties.length && Array.isArray(parties[customer]);
7195
+ }
7193
7196
  function isEncodedBoundPerson(raw) {
7194
7197
  let parsed;
7195
7198
  try {
@@ -7200,11 +7203,11 @@ function isEncodedBoundPerson(raw) {
7200
7203
  return rekorBoundPersonSchema.safeParse(parsed).success;
7201
7204
  }
7202
7205
  var TOOLSET_SLUG_PATTERN, REKOR_STRUCTURAL_ID_PATTERN, baseEnvironmentSchema, toolsetFileToolSchema, toolsetSurfaceSchema, toolsetConnectionBindingSchema, rekorToolsetToolsSchema, rekorPersonIdSchema, rekorPersonAudienceSchema, rekorBoundPersonSchema, rekorBoundAttestation, rekorResolvedToolsetSchema, REKOR_TOOL_KINDS_PARAM, REKOR_TOOL_KINDS_RESOLVE_SEARCH, resolvedRecordTypeSchema, reviewWritersSchema, sharedScopeSchema, resolvedFileToolSchema, rekorToolsetFileSchema, rekorToolsetFileUrlAnswerSchema, rekorToolsetFileListSchema, rekorToolsetFileGetSchema, rekorToolsetFilePutSchema, TOOLSET_CUSTOMER_FACING_REFUSAL_MARK, TOOLSET_CUSTOMER_FACING_REFUSAL;
7203
- var init_chunk_ZJQGHQEQ = __esm({
7204
- "../../packages/core/dist/chunk-ZJQGHQEQ.js"() {
7206
+ var init_chunk_G5MO5PB5 = __esm({
7207
+ "../../packages/core/dist/chunk-G5MO5PB5.js"() {
7205
7208
  "use strict";
7206
- init_chunk_R3YTRHDM();
7207
- init_chunk_LVTURR5A();
7209
+ init_chunk_642WMH6U();
7210
+ init_chunk_5ZLNVO63();
7208
7211
  init_zod();
7209
7212
  TOOLSET_SLUG_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
7210
7213
  REKOR_STRUCTURAL_ID_PATTERN = TOOLSET_SLUG_PATTERN;
@@ -7230,15 +7233,17 @@ var init_chunk_ZJQGHQEQ = __esm({
7230
7233
  batch: external_exports.boolean(),
7231
7234
  /**
7232
7235
  * The toolset serves one customer per call (#5083 RK2): its every call names the customer it serves,
7233
- * and reaches only that customer's records and shared ones. Absent on a surface recorded before it
7234
- * was, which reads as not scoped until the connection's next tool sync or token save records it: its
7235
- * calls name no customer, and the customer-facing rule admits none of its record tools.
7236
+ * and reaches only that customer's records and shared ones. Only a customer page and an eval run name
7237
+ * one; an agent's other calls name none (#5473 2b1), so they are refused it. Absent on a surface recorded
7238
+ * before it was, which reads as not scoped until the connection's next tool sync or token save records
7239
+ * it: its calls name no customer, and the customer-facing rule admits none of its record tools to a
7240
+ * customer page.
7236
7241
  */
7237
7242
  customer_scoped: external_exports.boolean().optional(),
7238
7243
  /**
7239
7244
  * A key of the resolve this side neither describes nor classifies exposes something: a kind of tool
7240
- * the data product added later, counted in `records`. The customer-facing rule never admits it, a
7241
- * customer scope included, until it is classified here. Absent on a surface recorded before it was,
7245
+ * the data product added later, counted in `records`. The customer-facing rule never admits it, to
7246
+ * any holder, until it is classified here. Absent on a surface recorded before it was,
7242
7247
  * which reads as present.
7243
7248
  */
7244
7249
  unclassified_tools: external_exports.boolean().optional(),
@@ -7305,10 +7310,14 @@ var init_chunk_ZJQGHQEQ = __esm({
7305
7310
  rekorBoundPersonSchema = external_exports.object({
7306
7311
  audience: rekorPersonAudienceSchema,
7307
7312
  parties: external_exports.array(external_exports.union([external_exports.array(rekorPersonIdSchema).max(REKOR_MAX_PERSON_IDS), external_exports.literal(REKOR_PERSON_ALL)])).max(REKOR_MAX_PERSON_PARTIES),
7308
- agent_all: external_exports.boolean()
7313
+ agent_all: external_exports.boolean(),
7314
+ customer: external_exports.number().int().nonnegative().optional()
7309
7315
  }).strict().refine((person) => !person.agent_all || person.audience === REKOR_PERSON_AUDIENCE_STAFF, {
7310
7316
  message: `The agent's "*" applies only to a staff call`,
7311
7317
  path: ["agent_all"]
7318
+ }).refine((person) => person.customer === void 0 || boundCustomerPartyIsValid(person.audience, person.parties, person.customer), {
7319
+ message: "The customer party is a listed party of person ids, on a call that is not staff's",
7320
+ path: ["customer"]
7312
7321
  });
7313
7322
  rekorBoundAttestation = rekorAttestation.extend({
7314
7323
  [REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["token", "user"]),
@@ -7455,7 +7464,7 @@ var init_chunk_ZJQGHQEQ = __esm({
7455
7464
  });
7456
7465
  rekorToolsetFilePutSchema = external_exports.object({ data: rekorToolsetFileSchema });
7457
7466
  TOOLSET_CUSTOMER_FACING_REFUSAL_MARK = "A customer-facing agent (a pilot, pilot specialist or pilot advisor) can use a toolset only when it exposes files alone: no record, composite or relationship tools, and neither sql_query nor batch";
7458
- TOOLSET_CUSTOMER_FACING_REFUSAL = `${TOOLSET_CUSTOMER_FACING_REFUSAL_MARK}, nor a file put, delete or put_url, nor a write of a reviewed record type \u2014 unless the toolset is customer-scoped, which admits its record, composite, relationship and SQL Action tools, since each of their calls reaches only the conversation's customer and shared records, or they only read approved records of reviewed shared record types`;
7467
+ TOOLSET_CUSTOMER_FACING_REFUSAL = `${TOOLSET_CUSTOMER_FACING_REFUSAL_MARK}, nor a file put, delete or put_url, nor a write of a reviewed record type, nor a kind of tool WayAI does not classify. Its record, composite, relationship and SQL Action tools are admitted to a customer-facing agent, since the data product holds each of its calls to the record types that declare person rules or shared access; to a customer page only when the toolset is customer-scoped, or they only read approved records of reviewed shared record types`;
7459
7468
  }
7460
7469
  });
7461
7470
 
@@ -7843,12 +7852,12 @@ var init_chunk_VFDRJV2E = __esm({
7843
7852
  }
7844
7853
  });
7845
7854
 
7846
- // ../../packages/core/dist/chunk-MBORBRUA.js
7855
+ // ../../packages/core/dist/chunk-KSENISEM.js
7847
7856
  var hubPageWatchParam, pageWatchedBaseSchema, hubPageWatchResponseSchema;
7848
- var init_chunk_MBORBRUA = __esm({
7849
- "../../packages/core/dist/chunk-MBORBRUA.js"() {
7857
+ var init_chunk_KSENISEM = __esm({
7858
+ "../../packages/core/dist/chunk-KSENISEM.js"() {
7850
7859
  "use strict";
7851
- init_chunk_ZJQGHQEQ();
7860
+ init_chunk_G5MO5PB5();
7852
7861
  init_chunk_VFDRJV2E();
7853
7862
  init_chunk_HZ6CADSY();
7854
7863
  init_zod();
@@ -12025,12 +12034,12 @@ var init_chunk_6J742GLA = __esm({
12025
12034
  }
12026
12035
  });
12027
12036
 
12028
- // ../../packages/core/dist/chunk-PIOPQ5UH.js
12037
+ // ../../packages/core/dist/chunk-NZU2FWVV.js
12029
12038
  var COMMUNITIES_PER_ORG_MAX, COMMUNITY_NAME_MAX_LENGTH, COMMUNITY_REGISTRY_CLOSED_REASON, COMMUNITY_MEMBERS_MAX, COMMUNITY_ADMISSIONS, COMMUNITY_ACCESS_MAX, COMMUNITY_ACCESS_ADD_MAX, COMMUNITY_ACCESS_FULL_REASON, COMMUNITY_JOIN_SOURCE_MAX_LENGTH, COMMUNITY_JOIN_FLOW_TOKEN_MAX_LENGTH, COMMUNITY_ROOMS_MAX, 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_MEMBER_STATUSES, COMMUNITY_RULES_MAX_LENGTH, COMMUNITY_SLOW_MODE_MAX_SECONDS, COMMUNITY_COURSES_LABEL_MAX_LENGTH, COMMUNITY_LIVE_TICKET_PREFIX, COMMUNITY_STATS_DAYS, 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, communityAdmissionSchema, communitySettingsBody, communityAccessEmailSchema, communityAccessAddBody, communityAccessQuery, communityAccessIdParam, communityBanBody, communityLockBody, communityPinBody, communityModLogQuery, communityReportsQuery, communityReportIdParam, communityLiveTicketSchema, communityLiveQuery, communityMuteBody, communityEmailUnsubscribeTokenSchema, communityEmailUnsubscribeQuery;
12030
- var init_chunk_PIOPQ5UH = __esm({
12031
- "../../packages/core/dist/chunk-PIOPQ5UH.js"() {
12039
+ var init_chunk_NZU2FWVV = __esm({
12040
+ "../../packages/core/dist/chunk-NZU2FWVV.js"() {
12032
12041
  "use strict";
12033
- init_chunk_LIDKVVXZ();
12042
+ init_chunk_LOCEO2KI();
12034
12043
  init_chunk_6J742GLA();
12035
12044
  init_chunk_ZVXO3XL6();
12036
12045
  init_chunk_HZ6CADSY();
@@ -12134,7 +12143,7 @@ var init_chunk_PIOPQ5UH = __esm({
12134
12143
  }
12135
12144
  });
12136
12145
 
12137
- // ../../packages/core/dist/chunk-7LLIQ4UF.js
12146
+ // ../../packages/core/dist/chunk-HUE3HZK5.js
12138
12147
  function parseCommunityLessonVideoUrl(url) {
12139
12148
  const parts = /^https?:\/\/([^/?#]+)([^?#]*)(?:\?([^#]*))?(?:#.*)?$/i.exec(url.trim());
12140
12149
  if (!parts) return null;
@@ -12160,10 +12169,10 @@ function communityLessonVideoWatchUrl(video) {
12160
12169
  }
12161
12170
  }
12162
12171
  var COMMUNITY_COURSES_MAX, COMMUNITY_COURSE_MODULES_MAX, COMMUNITY_COURSE_LESSONS_MAX, COMMUNITY_LESSONS_MAX, 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;
12163
- var init_chunk_7LLIQ4UF = __esm({
12164
- "../../packages/core/dist/chunk-7LLIQ4UF.js"() {
12172
+ var init_chunk_HUE3HZK5 = __esm({
12173
+ "../../packages/core/dist/chunk-HUE3HZK5.js"() {
12165
12174
  "use strict";
12166
- init_chunk_PIOPQ5UH();
12175
+ init_chunk_NZU2FWVV();
12167
12176
  init_chunk_HZ6CADSY();
12168
12177
  init_zod();
12169
12178
  COMMUNITY_COURSES_MAX = 20;
@@ -12748,7 +12757,7 @@ var init_chunk_2ISUBJG7 = __esm({
12748
12757
  }
12749
12758
  });
12750
12759
 
12751
- // ../../packages/core/dist/chunk-UN7QXDKQ.js
12760
+ // ../../packages/core/dist/chunk-HSQZYXKA.js
12752
12761
  function describeRole(role) {
12753
12762
  if (typeof role === "string") {
12754
12763
  return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
@@ -12922,8 +12931,8 @@ function terminalRunCount(counts) {
12922
12931
  return counts.successful_runs + counts.failed_runs;
12923
12932
  }
12924
12933
  var evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, 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, evalCustomerContactIdSchema, 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, evalAttachmentRef, turnMayCarryAttachments, ATTACHMENTS_USER_ONLY_MESSAGE, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, fixtureField, createJourneyBody, updateJourneyBody, evalSessionConfigResponseSchema, evalSessionResponseSchema, evalSessionListConfigSchema, evalSessionListItemSchema, seedReleaseStatusSchema, EVAL_SESSION_NOT_QUIESCENT;
12925
- var init_chunk_UN7QXDKQ = __esm({
12926
- "../../packages/core/dist/chunk-UN7QXDKQ.js"() {
12934
+ var init_chunk_HSQZYXKA = __esm({
12935
+ "../../packages/core/dist/chunk-HSQZYXKA.js"() {
12927
12936
  "use strict";
12928
12937
  init_chunk_4LXDRTO4();
12929
12938
  init_chunk_WTOA3ANF();
@@ -13991,7 +14000,7 @@ var init_chunk_TU4Y4MEX = __esm({
13991
14000
  }
13992
14001
  });
13993
14002
 
13994
- // ../../packages/core/dist/chunk-WJVJAWKV.js
14003
+ // ../../packages/core/dist/chunk-H27PRUAQ.js
13995
14004
  function refineHubAsCodeCustomTools(config, ctx) {
13996
14005
  const agents = config.agents;
13997
14006
  if (!Array.isArray(agents)) return;
@@ -14601,12 +14610,12 @@ function skillSectionsAsResources(scope) {
14601
14610
  };
14602
14611
  }
14603
14612
  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;
14604
- var init_chunk_WJVJAWKV = __esm({
14605
- "../../packages/core/dist/chunk-WJVJAWKV.js"() {
14613
+ var init_chunk_H27PRUAQ = __esm({
14614
+ "../../packages/core/dist/chunk-H27PRUAQ.js"() {
14606
14615
  "use strict";
14607
14616
  init_chunk_SARVKRZB();
14608
- init_chunk_R3YTRHDM();
14609
- init_chunk_UN7QXDKQ();
14617
+ init_chunk_642WMH6U();
14618
+ init_chunk_HSQZYXKA();
14610
14619
  init_chunk_LBDH7LCG();
14611
14620
  init_chunk_4LXDRTO4();
14612
14621
  init_chunk_TU4Y4MEX();
@@ -15662,15 +15671,15 @@ var init_chunk_JO53JB35 = __esm({
15662
15671
  }
15663
15672
  });
15664
15673
 
15665
- // ../../packages/core/dist/chunk-WJ7THIFJ.js
15674
+ // ../../packages/core/dist/chunk-4RUAEE3H.js
15666
15675
  function filterNamesAnything(filter) {
15667
15676
  return filter.labels.length + filter.scope_tag_ids.length > 0;
15668
15677
  }
15669
15678
  var hubListNameSchema, HUB_LIST_FILTER_REQUIRED, hubContactListFilterSchema, hubContactListIdParam, hubContactListHubQuery, description, createHubContactListBody, updateHubContactListBody;
15670
- var init_chunk_WJ7THIFJ = __esm({
15671
- "../../packages/core/dist/chunk-WJ7THIFJ.js"() {
15679
+ var init_chunk_4RUAEE3H = __esm({
15680
+ "../../packages/core/dist/chunk-4RUAEE3H.js"() {
15672
15681
  "use strict";
15673
- init_chunk_LIDKVVXZ();
15682
+ init_chunk_LOCEO2KI();
15674
15683
  init_zod();
15675
15684
  hubListNameSchema = orgListReferenceSchema;
15676
15685
  HUB_LIST_FILTER_REQUIRED = "A hub list names at least one label or scope tag";
@@ -15696,13 +15705,13 @@ var init_chunk_WJ7THIFJ = __esm({
15696
15705
  }
15697
15706
  });
15698
15707
 
15699
- // ../../packages/core/dist/chunk-KXQZYCAO.js
15708
+ // ../../packages/core/dist/chunk-BLX7KXE6.js
15700
15709
  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;
15701
- var init_chunk_KXQZYCAO = __esm({
15702
- "../../packages/core/dist/chunk-KXQZYCAO.js"() {
15710
+ var init_chunk_BLX7KXE6 = __esm({
15711
+ "../../packages/core/dist/chunk-BLX7KXE6.js"() {
15703
15712
  "use strict";
15704
- init_chunk_WJ7THIFJ();
15705
- init_chunk_LIDKVVXZ();
15713
+ init_chunk_4RUAEE3H();
15714
+ init_chunk_LOCEO2KI();
15706
15715
  init_chunk_5FTGVRDF();
15707
15716
  init_chunk_5XEJSR22();
15708
15717
  init_chunk_Q3WAAJBA();
@@ -16152,21 +16161,21 @@ var init_contracts = __esm({
16152
16161
  init_chunk_MF2VVXBR();
16153
16162
  init_chunk_ZC6YGHNX();
16154
16163
  init_chunk_ACKF2MVU();
16155
- init_chunk_JOPEQ3WP();
16164
+ init_chunk_GPYAZPH7();
16156
16165
  init_chunk_EKMLVJJ7();
16157
16166
  init_chunk_IPDOHAZ5();
16158
16167
  init_chunk_GPM7PE44();
16159
16168
  init_chunk_VEERWOZ6();
16160
16169
  init_chunk_ZXK6N2HN();
16161
16170
  init_chunk_Y7CFCYX4();
16162
- init_chunk_DGTJX3C4();
16171
+ init_chunk_OZC45RYU();
16163
16172
  init_chunk_5DGHIY7L();
16164
16173
  init_chunk_YUZFHVB2();
16165
16174
  init_chunk_I3O2RACG();
16166
16175
  init_chunk_34LE6P7E();
16167
16176
  init_chunk_FPSDNS2E();
16168
- init_chunk_MBORBRUA();
16169
- init_chunk_ZJQGHQEQ();
16177
+ init_chunk_KSENISEM();
16178
+ init_chunk_G5MO5PB5();
16170
16179
  init_chunk_OPETF4GS();
16171
16180
  init_chunk_SY6PLCPK();
16172
16181
  init_chunk_KMAC3O3L();
@@ -16176,8 +16185,8 @@ var init_contracts = __esm({
16176
16185
  init_chunk_UI6YFSZL();
16177
16186
  init_chunk_C4HEZ7ZI();
16178
16187
  init_chunk_IR2NOSI3();
16179
- init_chunk_7LLIQ4UF();
16180
- init_chunk_PIOPQ5UH();
16188
+ init_chunk_HUE3HZK5();
16189
+ init_chunk_NZU2FWVV();
16181
16190
  init_chunk_YULHXJ5M();
16182
16191
  init_chunk_V4FRPRH5();
16183
16192
  init_chunk_LWMLR2WI();
@@ -16188,11 +16197,11 @@ var init_contracts = __esm({
16188
16197
  init_chunk_E4DIIOOE();
16189
16198
  init_chunk_7CYHPF35();
16190
16199
  init_chunk_BPCNB5RT();
16191
- init_chunk_WJVJAWKV();
16200
+ init_chunk_H27PRUAQ();
16192
16201
  init_chunk_SARVKRZB();
16193
- init_chunk_R3YTRHDM();
16194
- init_chunk_LVTURR5A();
16195
- init_chunk_UN7QXDKQ();
16202
+ init_chunk_642WMH6U();
16203
+ init_chunk_5ZLNVO63();
16204
+ init_chunk_HSQZYXKA();
16196
16205
  init_chunk_LBDH7LCG();
16197
16206
  init_chunk_4LXDRTO4();
16198
16207
  init_chunk_JDJ4EUOL();
@@ -16208,9 +16217,9 @@ var init_contracts = __esm({
16208
16217
  init_chunk_2PZIF56U();
16209
16218
  init_chunk_UEJOG2Q7();
16210
16219
  init_chunk_JO53JB35();
16211
- init_chunk_KXQZYCAO();
16212
- init_chunk_WJ7THIFJ();
16213
- init_chunk_LIDKVVXZ();
16220
+ init_chunk_BLX7KXE6();
16221
+ init_chunk_4RUAEE3H();
16222
+ init_chunk_LOCEO2KI();
16214
16223
  init_chunk_5FTGVRDF();
16215
16224
  init_chunk_IG6QBZMA();
16216
16225
  init_chunk_OMPT4ZHR();
@@ -35751,9 +35760,9 @@ Usage:
35751
35760
  wayai contacts deny-person <person_id|contact_id> [--org <org_id>] [--json]
35752
35761
  wayai contacts undeny-person <person_id|contact_id> [--org <org_id>] [--json]
35753
35762
 
35754
- link-customer Make the record the contact's customer record: a conversation with the
35755
- contact (its WhatsApp phone, Instagram id or app account) then serves that
35756
- customer through a customer-scoped toolset. The record is one of the base's
35763
+ link-customer Make the record the contact's customer record: the contact's customer pages
35764
+ then serve that customer through a customer-scoped toolset (an agent's calls
35765
+ name no customer). The record is one of the base's
35757
35766
  customer record type (x-customer-scope role root), holding no external key
35758
35767
  or the contact id under another source. A record keyed under another
35759
35768
  external_id is refused: re-keying it would orphan its owned records.
@@ -36021,7 +36030,7 @@ function formatExplanation(data) {
36021
36030
  if (data.values_hub_id === null) lines.push("This preview hub was never published: it has no hub values, so it reaches nothing.");
36022
36031
  else if (data.values_hub_id !== data.hub_id) lines.push(`Hub values are those of its production hub ${text3(data.values_hub_id)}.`);
36023
36032
  if (data.customer_only) {
36024
- lines.push("Customer-only: held only on record types customer scope narrows to one customer, on a call naming its customer; every other scoped type reaches nothing.");
36033
+ lines.push("Customer-only: on an agent's call, held only on record types open to customer-facing calls (person rules or shared access); on a call naming its customer, only on record types customer scope narrows to that customer. Every other type that enforces a dimension reaches nothing.");
36025
36034
  }
36026
36035
  if (data.conversations_reach_nothing) {
36027
36036
  lines.push("This person's own set reaches nothing, whatever the agent: every turn in their conversations, a team member's send or consult there included, reaches nothing either.");
@@ -36105,8 +36114,9 @@ removed it. Every layer only narrows:
36105
36114
  app, WhatsApp, Instagram, Telegram); on any other they are everyone else.
36106
36115
  - with a scoped API token and no --user: the hub's \u2229 the agent's, what a hub
36107
36116
  automation's turn of the agent gets.
36108
- Everyone else takes the hub's public values, customer-only: held only on record types that
36109
- customer scope narrows to one customer, on a call naming its customer. A turn in another
36117
+ Everyone else takes the hub's public values, customer-only: on an agent's call, held only on
36118
+ record types open to customer-facing calls (person entries in enforce, or shared access); on a
36119
+ call naming its customer, only on record types customer scope narrows to that customer. A turn in another
36110
36120
  person's conversation is also cut to that person's set, a delegated task's to its
36111
36121
  delegation's, and a background agent's side-call's to its host turn's agent's values: those
36112
36122
  are not shown here. Explaining someone else matches no unredeemed team invite by their
@@ -38326,7 +38336,7 @@ async function runCommunitiesCreate(flagArgs) {
38326
38336
  process.exit(1);
38327
38337
  }
38328
38338
  if (err instanceof ApiError && err.status === 503) {
38329
- console.error("The community was not created in time. Run the command again.");
38339
+ console.error(errorCodeOf(err.body) === "TRANSIENT_STORAGE" ? `The platform was briefly unavailable, and the community may have been created. Check organization ${parsed.data.org_id}'s communities before running the command again.` : "The community was not created in time. Run the command again.");
38330
38340
  process.exit(1);
38331
38341
  }
38332
38342
  exitOnApiError(err);
@@ -38519,6 +38529,14 @@ function requireFlagValue(flagArgs, index, flag) {
38519
38529
  }
38520
38530
  return v;
38521
38531
  }
38532
+ function errorCodeOf(body) {
38533
+ try {
38534
+ const code = JSON.parse(body)?.error;
38535
+ return typeof code === "string" ? code : null;
38536
+ } catch {
38537
+ return null;
38538
+ }
38539
+ }
38522
38540
  function exitOnApiError(err) {
38523
38541
  if (err instanceof ApiError) {
38524
38542
  if (err.status === 401) {
@@ -38541,6 +38559,8 @@ function exitOnApiError(err) {
38541
38559
  if (err.status === 503) {
38542
38560
  if (err.isRetryable) {
38543
38561
  console.error("ClickHouse is warming up (cold start); the read is temporarily unavailable. Retry in a few seconds.");
38562
+ } else if (errorCodeOf(err.body) === "TRANSIENT_STORAGE") {
38563
+ console.error("The platform is briefly unavailable (usually a deploy in progress). Retry in a few seconds.");
38544
38564
  } else {
38545
38565
  console.error("Admin debug reads are currently disabled (platform kill switch).");
38546
38566
  }