@wayai/cli 0.3.259 → 0.3.261

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
@@ -5730,7 +5730,7 @@ var init_chunk_5XEJSR22 = __esm({
5730
5730
  }
5731
5731
  });
5732
5732
 
5733
- // ../../packages/core/dist/chunk-J3UZCMO6.js
5733
+ // ../../packages/core/dist/chunk-D7SSWNL3.js
5734
5734
  function matchPath(pattern, path45) {
5735
5735
  const pathSegments2 = path45.replace(/\/$/, "").split("/");
5736
5736
  const isPrefix = pattern.endsWith("/*");
@@ -5759,8 +5759,8 @@ function getEndpointConfig(path45) {
5759
5759
  return { tier: "STANDARD" };
5760
5760
  }
5761
5761
  var ENDPOINT_CONFIGS, EXCLUDED_PATHS;
5762
- var init_chunk_J3UZCMO6 = __esm({
5763
- "../../packages/core/dist/chunk-J3UZCMO6.js"() {
5762
+ var init_chunk_D7SSWNL3 = __esm({
5763
+ "../../packages/core/dist/chunk-D7SSWNL3.js"() {
5764
5764
  "use strict";
5765
5765
  init_chunk_5XEJSR22();
5766
5766
  ENDPOINT_CONFIGS = {
@@ -6238,7 +6238,7 @@ var init_chunk_J3UZCMO6 = __esm({
6238
6238
  }
6239
6239
  });
6240
6240
 
6241
- // ../../packages/core/dist/chunk-EKMLVJJ7.js
6241
+ // ../../packages/core/dist/chunk-7QJBCQR3.js
6242
6242
  function fileSnapshotChanged(run) {
6243
6243
  return run.written + run.removed > 0;
6244
6244
  }
@@ -6279,10 +6279,10 @@ async function sendWithRetry(opts, cursor) {
6279
6279
  }
6280
6280
  }
6281
6281
  var rekorFileSnapshotAnswerSchema, FILE_SNAPSHOT_MAX_PAGES, FILE_SNAPSHOT_CONFLICT_ATTEMPTS, FILE_SNAPSHOT_PAGE_SPACING_MS, FILE_SNAPSHOT_CONFLICT_STATUS;
6282
- var init_chunk_EKMLVJJ7 = __esm({
6283
- "../../packages/core/dist/chunk-EKMLVJJ7.js"() {
6282
+ var init_chunk_7QJBCQR3 = __esm({
6283
+ "../../packages/core/dist/chunk-7QJBCQR3.js"() {
6284
6284
  "use strict";
6285
- init_chunk_J3UZCMO6();
6285
+ init_chunk_D7SSWNL3();
6286
6286
  init_chunk_5XEJSR22();
6287
6287
  init_zod();
6288
6288
  rekorFileSnapshotAnswerSchema = external_exports.object({
@@ -6636,7 +6636,7 @@ var init_chunk_Y7CFCYX4 = __esm({
6636
6636
  }
6637
6637
  });
6638
6638
 
6639
- // ../../packages/core/dist/chunk-LOCEO2KI.js
6639
+ // ../../packages/core/dist/chunk-IPEFFLCO.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_LOCEO2KI = __esm({
6653
- "../../packages/core/dist/chunk-LOCEO2KI.js"() {
6652
+ var init_chunk_IPEFFLCO = __esm({
6653
+ "../../packages/core/dist/chunk-IPEFFLCO.js"() {
6654
6654
  "use strict";
6655
6655
  init_zod();
6656
6656
  CONTACT_ENVIRONMENTS = ["production", "preview", "all"];
@@ -6821,12 +6821,12 @@ var init_chunk_LOCEO2KI = __esm({
6821
6821
  }
6822
6822
  });
6823
6823
 
6824
- // ../../packages/core/dist/chunk-OZC45RYU.js
6824
+ // ../../packages/core/dist/chunk-YHH6V2TT.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_OZC45RYU = __esm({
6827
- "../../packages/core/dist/chunk-OZC45RYU.js"() {
6826
+ var init_chunk_YHH6V2TT = __esm({
6827
+ "../../packages/core/dist/chunk-YHH6V2TT.js"() {
6828
6828
  "use strict";
6829
- init_chunk_LOCEO2KI();
6829
+ init_chunk_IPEFFLCO();
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-M4FCOW6Q.js
7001
+ // ../../packages/core/dist/chunk-L55XSECQ.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_M4FCOW6Q = __esm({
7004
- "../../packages/core/dist/chunk-M4FCOW6Q.js"() {
7003
+ var init_chunk_L55XSECQ = __esm({
7004
+ "../../packages/core/dist/chunk-L55XSECQ.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_M4FCOW6Q = __esm({
7057
7057
  }
7058
7058
  });
7059
7059
 
7060
- // ../../packages/core/dist/chunk-P3S2WL7F.js
7060
+ // ../../packages/core/dist/chunk-XAYDRN6A.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_P3S2WL7F = __esm({
7099
- "../../packages/core/dist/chunk-P3S2WL7F.js"() {
7098
+ var init_chunk_XAYDRN6A = __esm({
7099
+ "../../packages/core/dist/chunk-XAYDRN6A.js"() {
7100
7100
  "use strict";
7101
- init_chunk_M4FCOW6Q();
7101
+ init_chunk_L55XSECQ();
7102
7102
  init_chunk_HZ6CADSY();
7103
7103
  init_chunk_YROEDMVZ();
7104
7104
  init_zod();
@@ -7189,7 +7189,10 @@ var init_chunk_P3S2WL7F = __esm({
7189
7189
  }
7190
7190
  });
7191
7191
 
7192
- // ../../packages/core/dist/chunk-36EGVRCM.js
7192
+ // ../../packages/core/dist/chunk-BUYOPDSJ.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_36EGVRCM = __esm({
7204
- "../../packages/core/dist/chunk-36EGVRCM.js"() {
7206
+ var init_chunk_BUYOPDSJ = __esm({
7207
+ "../../packages/core/dist/chunk-BUYOPDSJ.js"() {
7205
7208
  "use strict";
7206
- init_chunk_P3S2WL7F();
7207
- init_chunk_M4FCOW6Q();
7209
+ init_chunk_XAYDRN6A();
7210
+ init_chunk_L55XSECQ();
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,11 +7233,10 @@ var init_chunk_36EGVRCM = __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. Only a customer page and an eval run name
7234
- * one; an agent's other calls name none (#5473 2b1), so they are refused it. Absent on a surface recorded
7236
+ * and reaches only that customer's records and shared ones. Only an eval run names one; every other call,
7237
+ * an agent's (#5473 2b1) or a page's (2b2), names none, so it is refused it. Absent on a surface recorded
7235
7238
  * before it was, which reads as not scoped until the connection's next tool sync or token save records
7236
- * it: its calls name no customer, and the customer-facing rule admits none of its record tools to a
7237
- * customer page.
7239
+ * it: its calls name no customer.
7238
7240
  */
7239
7241
  customer_scoped: external_exports.boolean().optional(),
7240
7242
  /**
@@ -7307,10 +7309,14 @@ var init_chunk_36EGVRCM = __esm({
7307
7309
  rekorBoundPersonSchema = external_exports.object({
7308
7310
  audience: rekorPersonAudienceSchema,
7309
7311
  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),
7310
- agent_all: external_exports.boolean()
7312
+ agent_all: external_exports.boolean(),
7313
+ customer: external_exports.number().int().nonnegative().optional()
7311
7314
  }).strict().refine((person) => !person.agent_all || person.audience === REKOR_PERSON_AUDIENCE_STAFF, {
7312
7315
  message: `The agent's "*" applies only to a staff call`,
7313
7316
  path: ["agent_all"]
7317
+ }).refine((person) => person.customer === void 0 || boundCustomerPartyIsValid(person.audience, person.parties, person.customer), {
7318
+ message: "The customer party is a listed party of person ids, on a call that is not staff's",
7319
+ path: ["customer"]
7314
7320
  });
7315
7321
  rekorBoundAttestation = rekorAttestation.extend({
7316
7322
  [REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["token", "user"]),
@@ -7457,7 +7463,7 @@ var init_chunk_36EGVRCM = __esm({
7457
7463
  });
7458
7464
  rekorToolsetFilePutSchema = external_exports.object({ data: rekorToolsetFileSchema });
7459
7465
  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";
7460
- 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`;
7466
+ 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 and a customer page, since the data product holds each of their calls to the record types that declare person rules or shared access`;
7461
7467
  }
7462
7468
  });
7463
7469
 
@@ -7674,7 +7680,7 @@ var init_chunk_WEXVYJ5H = __esm({
7674
7680
  }
7675
7681
  });
7676
7682
 
7677
- // ../../packages/core/dist/chunk-VFDRJV2E.js
7683
+ // ../../packages/core/dist/chunk-FBV7NLKO.js
7678
7684
  function utf8ByteLength(text4) {
7679
7685
  let bytes = 0;
7680
7686
  for (let i = 0; i < text4.length; i++) {
@@ -7702,8 +7708,8 @@ function pageHtmlIssue(html) {
7702
7708
  return null;
7703
7709
  }
7704
7710
  var PAGES_PER_HUB_MAX, PAGE_HTML_MAX_BYTES, PAGE_SLUG_MAX, PAGE_SLUG_REGEX, PAGE_TITLE_MAX, PAGE_DESCRIPTION_MAX, PAGE_ORDER_MAX, PAGE_TOOLS_MAX, PAGE_CONNECTION_NAME_MAX, PAGE_TOOL_NAME_MAX, PAGE_PARAMS_MAX_CHARS, PAGE_AUDIENCES, PAGE_NOTIFY_LEVELS, pageSlugSchema, pageToolSchema, pageParamsSchema, pageManifestObject, pageManifestSchema, pageSummarySchema, hubPagesParam, hubPagesQuery, hubPageParam, pageRevisionSchema, PAGE_TOOL_CALL_BODY_MAX_BYTES, pageToolCallBody, PAGE_REVISION_STALE_CODE;
7705
- var init_chunk_VFDRJV2E = __esm({
7706
- "../../packages/core/dist/chunk-VFDRJV2E.js"() {
7711
+ var init_chunk_FBV7NLKO = __esm({
7712
+ "../../packages/core/dist/chunk-FBV7NLKO.js"() {
7707
7713
  "use strict";
7708
7714
  init_chunk_WEXVYJ5H();
7709
7715
  init_chunk_HZ6CADSY();
@@ -7756,7 +7762,8 @@ var init_chunk_VFDRJV2E = __esm({
7756
7762
  /** A team page's: the hub's team users may run its write tools. A `conversation:write` grant on the hub always may. */
7757
7763
  team_writes: external_exports.boolean().default(false),
7758
7764
  /**
7759
- * A customer page's: its customers may run its write tools, each on their own records (opt-in). Stored
7765
+ * A customer page's: its customers may run its write tools (opt-in), each on their own records of a person-ruled
7766
+ * record type, and on every record of a `{ shared: true }` one (wayai#5473 2b2). Stored
7760
7767
  * only when stated, so a page that states none (every team page) keeps the manifest it had.
7761
7768
  */
7762
7769
  customer_writes: external_exports.boolean().optional(),
@@ -7845,13 +7852,13 @@ var init_chunk_VFDRJV2E = __esm({
7845
7852
  }
7846
7853
  });
7847
7854
 
7848
- // ../../packages/core/dist/chunk-AAGIHNDX.js
7855
+ // ../../packages/core/dist/chunk-XH4PIFRT.js
7849
7856
  var hubPageWatchParam, pageWatchedBaseSchema, hubPageWatchResponseSchema;
7850
- var init_chunk_AAGIHNDX = __esm({
7851
- "../../packages/core/dist/chunk-AAGIHNDX.js"() {
7857
+ var init_chunk_XH4PIFRT = __esm({
7858
+ "../../packages/core/dist/chunk-XH4PIFRT.js"() {
7852
7859
  "use strict";
7853
- init_chunk_36EGVRCM();
7854
- init_chunk_VFDRJV2E();
7860
+ init_chunk_BUYOPDSJ();
7861
+ init_chunk_FBV7NLKO();
7855
7862
  init_chunk_HZ6CADSY();
7856
7863
  init_zod();
7857
7864
  hubPageWatchParam = external_exports.object({ hub_id: uuidSchema, slug: pageSlugSchema, watch_id: uuidSchema });
@@ -12027,12 +12034,12 @@ var init_chunk_6J742GLA = __esm({
12027
12034
  }
12028
12035
  });
12029
12036
 
12030
- // ../../packages/core/dist/chunk-NZU2FWVV.js
12037
+ // ../../packages/core/dist/chunk-ZM3DFTSY.js
12031
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;
12032
- var init_chunk_NZU2FWVV = __esm({
12033
- "../../packages/core/dist/chunk-NZU2FWVV.js"() {
12039
+ var init_chunk_ZM3DFTSY = __esm({
12040
+ "../../packages/core/dist/chunk-ZM3DFTSY.js"() {
12034
12041
  "use strict";
12035
- init_chunk_LOCEO2KI();
12042
+ init_chunk_IPEFFLCO();
12036
12043
  init_chunk_6J742GLA();
12037
12044
  init_chunk_ZVXO3XL6();
12038
12045
  init_chunk_HZ6CADSY();
@@ -12136,7 +12143,7 @@ var init_chunk_NZU2FWVV = __esm({
12136
12143
  }
12137
12144
  });
12138
12145
 
12139
- // ../../packages/core/dist/chunk-HUE3HZK5.js
12146
+ // ../../packages/core/dist/chunk-5WTHC665.js
12140
12147
  function parseCommunityLessonVideoUrl(url) {
12141
12148
  const parts = /^https?:\/\/([^/?#]+)([^?#]*)(?:\?([^#]*))?(?:#.*)?$/i.exec(url.trim());
12142
12149
  if (!parts) return null;
@@ -12162,10 +12169,10 @@ function communityLessonVideoWatchUrl(video) {
12162
12169
  }
12163
12170
  }
12164
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;
12165
- var init_chunk_HUE3HZK5 = __esm({
12166
- "../../packages/core/dist/chunk-HUE3HZK5.js"() {
12172
+ var init_chunk_5WTHC665 = __esm({
12173
+ "../../packages/core/dist/chunk-5WTHC665.js"() {
12167
12174
  "use strict";
12168
- init_chunk_NZU2FWVV();
12175
+ init_chunk_ZM3DFTSY();
12169
12176
  init_chunk_HZ6CADSY();
12170
12177
  init_zod();
12171
12178
  COMMUNITY_COURSES_MAX = 20;
@@ -13993,7 +14000,7 @@ var init_chunk_TU4Y4MEX = __esm({
13993
14000
  }
13994
14001
  });
13995
14002
 
13996
- // ../../packages/core/dist/chunk-MK2PZAPE.js
14003
+ // ../../packages/core/dist/chunk-TRA7DRML.js
13997
14004
  function refineHubAsCodeCustomTools(config, ctx) {
13998
14005
  const agents = config.agents;
13999
14006
  if (!Array.isArray(agents)) return;
@@ -14603,11 +14610,11 @@ function skillSectionsAsResources(scope) {
14603
14610
  };
14604
14611
  }
14605
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;
14606
- var init_chunk_MK2PZAPE = __esm({
14607
- "../../packages/core/dist/chunk-MK2PZAPE.js"() {
14613
+ var init_chunk_TRA7DRML = __esm({
14614
+ "../../packages/core/dist/chunk-TRA7DRML.js"() {
14608
14615
  "use strict";
14609
14616
  init_chunk_SARVKRZB();
14610
- init_chunk_P3S2WL7F();
14617
+ init_chunk_XAYDRN6A();
14611
14618
  init_chunk_HSQZYXKA();
14612
14619
  init_chunk_LBDH7LCG();
14613
14620
  init_chunk_4LXDRTO4();
@@ -14617,7 +14624,7 @@ var init_chunk_MK2PZAPE = __esm({
14617
14624
  init_chunk_5FTGVRDF();
14618
14625
  init_chunk_S4VDZ7PZ();
14619
14626
  init_chunk_C2UEA2KW();
14620
- init_chunk_VFDRJV2E();
14627
+ init_chunk_FBV7NLKO();
14621
14628
  init_chunk_WEXVYJ5H();
14622
14629
  init_chunk_Q3WAAJBA();
14623
14630
  init_chunk_YROEDMVZ();
@@ -15664,15 +15671,15 @@ var init_chunk_JO53JB35 = __esm({
15664
15671
  }
15665
15672
  });
15666
15673
 
15667
- // ../../packages/core/dist/chunk-4RUAEE3H.js
15674
+ // ../../packages/core/dist/chunk-63ZD7TGN.js
15668
15675
  function filterNamesAnything(filter) {
15669
15676
  return filter.labels.length + filter.scope_tag_ids.length > 0;
15670
15677
  }
15671
15678
  var hubListNameSchema, HUB_LIST_FILTER_REQUIRED, hubContactListFilterSchema, hubContactListIdParam, hubContactListHubQuery, description, createHubContactListBody, updateHubContactListBody;
15672
- var init_chunk_4RUAEE3H = __esm({
15673
- "../../packages/core/dist/chunk-4RUAEE3H.js"() {
15679
+ var init_chunk_63ZD7TGN = __esm({
15680
+ "../../packages/core/dist/chunk-63ZD7TGN.js"() {
15674
15681
  "use strict";
15675
- init_chunk_LOCEO2KI();
15682
+ init_chunk_IPEFFLCO();
15676
15683
  init_zod();
15677
15684
  hubListNameSchema = orgListReferenceSchema;
15678
15685
  HUB_LIST_FILTER_REQUIRED = "A hub list names at least one label or scope tag";
@@ -15698,13 +15705,13 @@ var init_chunk_4RUAEE3H = __esm({
15698
15705
  }
15699
15706
  });
15700
15707
 
15701
- // ../../packages/core/dist/chunk-BLX7KXE6.js
15708
+ // ../../packages/core/dist/chunk-EXAQDPNR.js
15702
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;
15703
- var init_chunk_BLX7KXE6 = __esm({
15704
- "../../packages/core/dist/chunk-BLX7KXE6.js"() {
15710
+ var init_chunk_EXAQDPNR = __esm({
15711
+ "../../packages/core/dist/chunk-EXAQDPNR.js"() {
15705
15712
  "use strict";
15706
- init_chunk_4RUAEE3H();
15707
- init_chunk_LOCEO2KI();
15713
+ init_chunk_63ZD7TGN();
15714
+ init_chunk_IPEFFLCO();
15708
15715
  init_chunk_5FTGVRDF();
15709
15716
  init_chunk_5XEJSR22();
15710
15717
  init_chunk_Q3WAAJBA();
@@ -15895,7 +15902,7 @@ var init_chunk_SOJMWM63 = __esm({
15895
15902
  }
15896
15903
  });
15897
15904
 
15898
- // ../../packages/core/dist/chunk-FW5JW3N3.js
15905
+ // ../../packages/core/dist/chunk-B6PT7ZSX.js
15899
15906
  function capped(max, field) {
15900
15907
  return (value, ctx) => {
15901
15908
  if (!withinJsonLength(value, max)) {
@@ -15904,11 +15911,11 @@ function capped(max, field) {
15904
15911
  };
15905
15912
  }
15906
15913
  var INTERACTIVE_PAGE_PARAMS_MAX_CHARS, interactivePageSchema, INTERACTIVE_TEMPLATE_PARAMS_MAX_CHARS, INTERACTIVE_TEMPLATE_DATA_MAX_CHARS, INTERACTIVE_TEMPLATE_STATUSES, interactiveTemplateSchema, interactiveSchema, INTERACTIVE_KINDS, KNOWN_KINDS;
15907
- var init_chunk_FW5JW3N3 = __esm({
15908
- "../../packages/core/dist/chunk-FW5JW3N3.js"() {
15914
+ var init_chunk_B6PT7ZSX = __esm({
15915
+ "../../packages/core/dist/chunk-B6PT7ZSX.js"() {
15909
15916
  "use strict";
15910
15917
  init_chunk_VOBDVWNC();
15911
- init_chunk_VFDRJV2E();
15918
+ init_chunk_FBV7NLKO();
15912
15919
  init_chunk_HZ6CADSY();
15913
15920
  init_zod();
15914
15921
  INTERACTIVE_PAGE_PARAMS_MAX_CHARS = 4 * 1024;
@@ -16026,10 +16033,10 @@ var init_chunk_WFQDSQJK = __esm({
16026
16033
  }
16027
16034
  });
16028
16035
 
16029
- // ../../packages/core/dist/chunk-XXZ4MOE3.js
16036
+ // ../../packages/core/dist/chunk-EV3MAOEX.js
16030
16037
  var APP_ERROR_BRAND, AppError, PAGE_CUSTOMER_UNAVAILABLE_CODE, LLM_RATE_LIMIT_BRAND, LlmRateLimitError, LLM_PROVIDER_HTTP_BRAND, LlmProviderHttpError, LLM_PROVIDER_CONTENT_BRAND, LlmProviderContentError, LLM_PROVIDER_TIMEOUT_BRAND, LlmProviderTimeoutError, ExternalServiceError, CHANNEL_PROVIDER_HTTP_BRAND, ChannelProviderHttpError, MEDIA_PROVIDER_HTTP_BRAND, MediaProviderHttpError;
16031
- var init_chunk_XXZ4MOE3 = __esm({
16032
- "../../packages/core/dist/chunk-XXZ4MOE3.js"() {
16038
+ var init_chunk_EV3MAOEX = __esm({
16039
+ "../../packages/core/dist/chunk-EV3MAOEX.js"() {
16033
16040
  "use strict";
16034
16041
  init_chunk_WFQDSQJK();
16035
16042
  APP_ERROR_BRAND = /* @__PURE__ */ Symbol.for("wayai.AppError");
@@ -16155,20 +16162,20 @@ var init_contracts = __esm({
16155
16162
  init_chunk_ZC6YGHNX();
16156
16163
  init_chunk_ACKF2MVU();
16157
16164
  init_chunk_GPYAZPH7();
16158
- init_chunk_EKMLVJJ7();
16165
+ init_chunk_7QJBCQR3();
16159
16166
  init_chunk_IPDOHAZ5();
16160
16167
  init_chunk_GPM7PE44();
16161
16168
  init_chunk_VEERWOZ6();
16162
16169
  init_chunk_ZXK6N2HN();
16163
16170
  init_chunk_Y7CFCYX4();
16164
- init_chunk_OZC45RYU();
16171
+ init_chunk_YHH6V2TT();
16165
16172
  init_chunk_5DGHIY7L();
16166
16173
  init_chunk_YUZFHVB2();
16167
16174
  init_chunk_I3O2RACG();
16168
16175
  init_chunk_34LE6P7E();
16169
16176
  init_chunk_FPSDNS2E();
16170
- init_chunk_AAGIHNDX();
16171
- init_chunk_36EGVRCM();
16177
+ init_chunk_XH4PIFRT();
16178
+ init_chunk_BUYOPDSJ();
16172
16179
  init_chunk_OPETF4GS();
16173
16180
  init_chunk_SY6PLCPK();
16174
16181
  init_chunk_KMAC3O3L();
@@ -16178,8 +16185,8 @@ var init_contracts = __esm({
16178
16185
  init_chunk_UI6YFSZL();
16179
16186
  init_chunk_C4HEZ7ZI();
16180
16187
  init_chunk_IR2NOSI3();
16181
- init_chunk_HUE3HZK5();
16182
- init_chunk_NZU2FWVV();
16188
+ init_chunk_5WTHC665();
16189
+ init_chunk_ZM3DFTSY();
16183
16190
  init_chunk_YULHXJ5M();
16184
16191
  init_chunk_V4FRPRH5();
16185
16192
  init_chunk_LWMLR2WI();
@@ -16190,10 +16197,10 @@ var init_contracts = __esm({
16190
16197
  init_chunk_E4DIIOOE();
16191
16198
  init_chunk_7CYHPF35();
16192
16199
  init_chunk_BPCNB5RT();
16193
- init_chunk_MK2PZAPE();
16200
+ init_chunk_TRA7DRML();
16194
16201
  init_chunk_SARVKRZB();
16195
- init_chunk_P3S2WL7F();
16196
- init_chunk_M4FCOW6Q();
16202
+ init_chunk_XAYDRN6A();
16203
+ init_chunk_L55XSECQ();
16197
16204
  init_chunk_HSQZYXKA();
16198
16205
  init_chunk_LBDH7LCG();
16199
16206
  init_chunk_4LXDRTO4();
@@ -16210,13 +16217,13 @@ var init_contracts = __esm({
16210
16217
  init_chunk_2PZIF56U();
16211
16218
  init_chunk_UEJOG2Q7();
16212
16219
  init_chunk_JO53JB35();
16213
- init_chunk_BLX7KXE6();
16214
- init_chunk_4RUAEE3H();
16215
- init_chunk_LOCEO2KI();
16220
+ init_chunk_EXAQDPNR();
16221
+ init_chunk_63ZD7TGN();
16222
+ init_chunk_IPEFFLCO();
16216
16223
  init_chunk_5FTGVRDF();
16217
16224
  init_chunk_IG6QBZMA();
16218
16225
  init_chunk_OMPT4ZHR();
16219
- init_chunk_J3UZCMO6();
16226
+ init_chunk_D7SSWNL3();
16220
16227
  init_chunk_SOJMWM63();
16221
16228
  init_chunk_WTOA3ANF();
16222
16229
  init_chunk_5XEJSR22();
@@ -16229,10 +16236,10 @@ var init_contracts = __esm({
16229
16236
  init_chunk_C2UEA2KW();
16230
16237
  init_chunk_6J742GLA();
16231
16238
  init_chunk_ZVXO3XL6();
16232
- init_chunk_FW5JW3N3();
16239
+ init_chunk_B6PT7ZSX();
16233
16240
  init_chunk_VOBDVWNC();
16234
16241
  init_chunk_ZIGA5RCU();
16235
- init_chunk_VFDRJV2E();
16242
+ init_chunk_FBV7NLKO();
16236
16243
  init_chunk_WEXVYJ5H();
16237
16244
  init_chunk_6TSQ5HXC();
16238
16245
  init_chunk_HZ6CADSY();
@@ -16243,7 +16250,7 @@ var init_contracts = __esm({
16243
16250
  init_chunk_MIWZOSPI();
16244
16251
  init_chunk_YROEDMVZ();
16245
16252
  init_chunk_L5F7ZOUJ();
16246
- init_chunk_XXZ4MOE3();
16253
+ init_chunk_EV3MAOEX();
16247
16254
  init_chunk_WFQDSQJK();
16248
16255
  }
16249
16256
  });
@@ -16377,7 +16384,7 @@ var UUID_RE2, WAYAI_WORKSPACE_LAYOUT;
16377
16384
  var init_dist = __esm({
16378
16385
  "../../packages/core/dist/index.js"() {
16379
16386
  "use strict";
16380
- init_chunk_J3UZCMO6();
16387
+ init_chunk_D7SSWNL3();
16381
16388
  init_chunk_SOJMWM63();
16382
16389
  init_chunk_WTOA3ANF();
16383
16390
  init_chunk_5XEJSR22();
@@ -16403,7 +16410,7 @@ var init_dist = __esm({
16403
16410
  init_chunk_MIWZOSPI();
16404
16411
  init_chunk_YROEDMVZ();
16405
16412
  init_chunk_L5F7ZOUJ();
16406
- init_chunk_XXZ4MOE3();
16413
+ init_chunk_EV3MAOEX();
16407
16414
  init_chunk_WFQDSQJK();
16408
16415
  UUID_RE2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
16409
16416
  WAYAI_WORKSPACE_LAYOUT = {
@@ -21458,10 +21465,10 @@ var init_call_openings = __esm({
21458
21465
  var init_pages = __esm({
21459
21466
  "../../packages/core/dist/contracts/pages.js"() {
21460
21467
  "use strict";
21461
- init_chunk_VFDRJV2E();
21468
+ init_chunk_FBV7NLKO();
21462
21469
  init_chunk_WEXVYJ5H();
21463
21470
  init_chunk_HZ6CADSY();
21464
- init_chunk_XXZ4MOE3();
21471
+ init_chunk_EV3MAOEX();
21465
21472
  init_chunk_WFQDSQJK();
21466
21473
  }
21467
21474
  });
@@ -28119,7 +28126,7 @@ function scaffoldPage(input) {
28119
28126
  throw expected(issues.map((issue) => `page "${input.slug}": ${issue}`).join("\n"));
28120
28127
  }
28121
28128
  const { slug: _slug, ...written } = manifest;
28122
- const header = customers ? "# The page's manifest: pages.md in the WayAI skill has every field, and its Customer Pages section\n# what a customer page may reach. Hub Users given access on the Users tab open it from their own\n# conversation's header; those an account-mode hub adds automatically are admitted but have no way in\n# from the apps yet.\n# Add the tool it lists to tools, from a customer-scoped Base Toolset connection, so each customer reads\n# only their own records and shared ones:\n# tools: - { connection: <a customer-scoped Base Toolset connection in hub.yaml>, tool: <its list tool>, notify: none }\n# It only reads. customer_writes: true lets each customer change their own records through its write tools.\n" : "# The page's manifest: pages.md in the WayAI skill has every field. Add each tool the page calls to\n# tools: - { connection: <a Base Toolset connection in hub.yaml>, tool: <its tool name>, notify: none }\n";
28129
+ const header = customers ? "# The page's manifest: pages.md in the WayAI skill has every field, and its Customer Pages section\n# what a customer page may reach. Hub Users given access on the Users tab open it from their own\n# conversation's header; those an account-mode hub adds automatically are admitted but have no way in\n# from the apps yet.\n# Each call is for the person using it: add the tool it lists to tools, from a Base Toolset connection\n# whose record types declare person entries or { shared: true }, so each customer reads only their own\n# records and shared ones:\n# tools: - { connection: <a Base Toolset connection in hub.yaml>, tool: <its list tool>, notify: none }\n# It only reads. customer_writes: true lets each customer run its write tools: on their own records, and on\n# every record of a { shared: true } type, which every other customer then sees.\n" : "# The page's manifest: pages.md in the WayAI skill has every field. Add each tool the page calls to\n# tools: - { connection: <a Base Toolset connection in hub.yaml>, tool: <its tool name>, notify: none }\n";
28123
28130
  const manifestYaml = header + yaml16.dump(written, YAML_DUMP_OPTIONS);
28124
28131
  return { manifestYaml, html: starterHtml(input.slug, parsed.data.title) };
28125
28132
  }
@@ -35753,9 +35760,9 @@ Usage:
35753
35760
  wayai contacts deny-person <person_id|contact_id> [--org <org_id>] [--json]
35754
35761
  wayai contacts undeny-person <person_id|contact_id> [--org <org_id>] [--json]
35755
35762
 
35756
- link-customer Make the record the contact's customer record: the contact's customer pages
35757
- then serve that customer through a customer-scoped toolset (an agent's calls
35758
- name no customer). The record is one of the base's
35763
+ link-customer Make the record the contact's customer record: an eval declaring the contact
35764
+ then reaches that customer through a customer-scoped toolset (an agent's and
35765
+ a customer page's calls name no customer). The record is one of the base's
35759
35766
  customer record type (x-customer-scope role root), holding no external key
35760
35767
  or the contact id under another source. A record keyed under another
35761
35768
  external_id is refused: re-keying it would orphan its owned records.
@@ -38329,7 +38336,7 @@ async function runCommunitiesCreate(flagArgs) {
38329
38336
  process.exit(1);
38330
38337
  }
38331
38338
  if (err instanceof ApiError && err.status === 503) {
38332
- 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.");
38333
38340
  process.exit(1);
38334
38341
  }
38335
38342
  exitOnApiError(err);
@@ -38522,6 +38529,14 @@ function requireFlagValue(flagArgs, index, flag) {
38522
38529
  }
38523
38530
  return v;
38524
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
+ }
38525
38540
  function exitOnApiError(err) {
38526
38541
  if (err instanceof ApiError) {
38527
38542
  if (err.status === 401) {
@@ -38544,6 +38559,8 @@ function exitOnApiError(err) {
38544
38559
  if (err.status === 503) {
38545
38560
  if (err.isRetryable) {
38546
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.");
38547
38564
  } else {
38548
38565
  console.error("Admin debug reads are currently disabled (platform kill switch).");
38549
38566
  }