@wayai/cli 0.3.241 → 0.3.242

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
@@ -4687,8 +4687,8 @@ var init_resource_paths = __esm({
4687
4687
  "../../packages/core/dist/resource-paths.js"() {
4688
4688
  "use strict";
4689
4689
  init_chunk_S4VDZ7PZ();
4690
- init_chunk_LD6U3CDG();
4691
4690
  init_chunk_CJ3L46X6();
4691
+ init_chunk_LD6U3CDG();
4692
4692
  init_chunk_6TSQ5HXC();
4693
4693
  SKILL_NAMESPACE = "skills";
4694
4694
  FALLBACK_SLUG = "resource";
@@ -4888,10 +4888,10 @@ var init_fs_safety = __esm({
4888
4888
  }
4889
4889
  });
4890
4890
 
4891
- // ../../packages/core/dist/chunk-GK27ENTT.js
4892
- var BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery;
4893
- var init_chunk_GK27ENTT = __esm({
4894
- "../../packages/core/dist/chunk-GK27ENTT.js"() {
4891
+ // ../../packages/core/dist/chunk-NKLVUTFO.js
4892
+ var BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, BASE_CREDENTIAL_NAME_PATTERN, BASE_CREDENTIAL_NAME_CHARSET, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery;
4893
+ var init_chunk_NKLVUTFO = __esm({
4894
+ "../../packages/core/dist/chunk-NKLVUTFO.js"() {
4895
4895
  "use strict";
4896
4896
  init_zod();
4897
4897
  BASE_CREDENTIAL_MANAGED_BY = {
@@ -4899,10 +4899,9 @@ var init_chunk_GK27ENTT = __esm({
4899
4899
  ORG_LINK: "org-link"
4900
4900
  };
4901
4901
  BASE_CREDENTIAL_NAME_MAX = 100;
4902
- baseCredentialNameSchema = external_exports.string().min(1).max(BASE_CREDENTIAL_NAME_MAX).regex(
4903
- /^[A-Za-z0-9][A-Za-z0-9._:@+~=-]*$/,
4904
- "name must use letters, digits and '. _ : @ + ~ = -', starting with a letter or digit"
4905
- );
4902
+ BASE_CREDENTIAL_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:@+~=-]*$/;
4903
+ BASE_CREDENTIAL_NAME_CHARSET = "letters, digits and '. _ : @ + ~ = -', starting with a letter or digit";
4904
+ baseCredentialNameSchema = external_exports.string().min(1).max(BASE_CREDENTIAL_NAME_MAX).regex(BASE_CREDENTIAL_NAME_PATTERN, `name must use ${BASE_CREDENTIAL_NAME_CHARSET}`);
4906
4905
  createBaseCredentialLinkBody = external_exports.object({
4907
4906
  organization_id: external_exports.string().uuid(),
4908
4907
  base_id: external_exports.string().min(1),
@@ -4920,14 +4919,14 @@ var init_chunk_GK27ENTT = __esm({
4920
4919
  }
4921
4920
  });
4922
4921
 
4923
- // ../../packages/core/dist/chunk-DHPUPI4Y.js
4922
+ // ../../packages/core/dist/chunk-WNLWNFHH.js
4924
4923
  function normalizeAuthType(raw) {
4925
4924
  if (VALID_AUTH_TYPES.has(raw)) return raw;
4926
4925
  return LEGACY_AUTH_TYPE_MAP[raw] ?? raw;
4927
4926
  }
4928
4927
  var AUTH_TYPE, ORG_CREDENTIAL_AUTH_TYPES, AUTH_TYPE_DISPLAY, LEGACY_AUTH_TYPE_MAP, VALID_AUTH_TYPES, AGENT_ROLES, PILOT_TRACK_ROLES, COPILOT_TRACK_ROLES, CUSTOMER_FACING_AGENT_ROLES, SAFE_USER_ID_REGEX, SUPPORTED_LOCALES, SKILL_INSTALL_COMMAND;
4929
- var init_chunk_DHPUPI4Y = __esm({
4930
- "../../packages/core/dist/chunk-DHPUPI4Y.js"() {
4928
+ var init_chunk_WNLWNFHH = __esm({
4929
+ "../../packages/core/dist/chunk-WNLWNFHH.js"() {
4931
4930
  "use strict";
4932
4931
  AUTH_TYPE = {
4933
4932
  OAUTH: "oauth",
@@ -4981,12 +4980,12 @@ var init_chunk_DHPUPI4Y = __esm({
4981
4980
  }
4982
4981
  });
4983
4982
 
4984
- // ../../packages/core/dist/chunk-SXDX4GHS.js
4983
+ // ../../packages/core/dist/chunk-GLJSJX5R.js
4985
4984
  var orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody;
4986
- var init_chunk_SXDX4GHS = __esm({
4987
- "../../packages/core/dist/chunk-SXDX4GHS.js"() {
4985
+ var init_chunk_GLJSJX5R = __esm({
4986
+ "../../packages/core/dist/chunk-GLJSJX5R.js"() {
4988
4987
  "use strict";
4989
- init_chunk_DHPUPI4Y();
4988
+ init_chunk_WNLWNFHH();
4990
4989
  init_zod();
4991
4990
  orgCredentialIdParam = external_exports.object({
4992
4991
  id: external_exports.string().uuid()
@@ -5397,6 +5396,38 @@ var init_chunk_Q7KIQHAZ = __esm({
5397
5396
  }
5398
5397
  });
5399
5398
 
5399
+ // ../../packages/core/dist/chunk-ACKF2MVU.js
5400
+ var MAX_NAME_LENGTH, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody;
5401
+ var init_chunk_ACKF2MVU = __esm({
5402
+ "../../packages/core/dist/chunk-ACKF2MVU.js"() {
5403
+ "use strict";
5404
+ init_chunk_HZ6CADSY();
5405
+ init_zod();
5406
+ MAX_NAME_LENGTH = 100;
5407
+ MAX_VALUE_LENGTH = 32 * 1024;
5408
+ MAX_TAGS = 20;
5409
+ MAX_TAG_LENGTH = 50;
5410
+ MAX_SCOPE_HUBS = 100;
5411
+ MAX_SCOPE_TAGS = 50;
5412
+ vaultSecretScopeSchema = external_exports.object({
5413
+ hubs: external_exports.array(external_exports.string().min(1)).max(MAX_SCOPE_HUBS).optional(),
5414
+ tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH)).max(MAX_SCOPE_TAGS).optional()
5415
+ }).strict();
5416
+ vaultCreateBody = external_exports.object({
5417
+ name: external_exports.string().trim().min(1, "name is required").max(MAX_NAME_LENGTH, `name must be ${MAX_NAME_LENGTH} characters or fewer`),
5418
+ value: external_exports.string().min(1, "value is required").max(MAX_VALUE_LENGTH, `value must be ${MAX_VALUE_LENGTH} characters or fewer`),
5419
+ tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH, `Tag must be ${MAX_TAG_LENGTH} characters or fewer`)).max(MAX_TAGS, `Maximum ${MAX_TAGS} tags allowed`).optional().default([]),
5420
+ scope: vaultSecretScopeSchema.optional().default({})
5421
+ }).strict();
5422
+ vaultUpdateBody = external_exports.object({
5423
+ name: external_exports.string().trim().min(1).max(MAX_NAME_LENGTH).optional(),
5424
+ value: external_exports.string().min(1).max(MAX_VALUE_LENGTH).optional(),
5425
+ tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH)).max(MAX_TAGS).optional(),
5426
+ scope: vaultSecretScopeSchema.optional()
5427
+ }).strict();
5428
+ }
5429
+ });
5430
+
5400
5431
  // ../../packages/core/dist/chunk-WBFLPPDI.js
5401
5432
  var connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, BESIDE_LINK_FIELDS, setProductionCredentialBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery;
5402
5433
  var init_chunk_WBFLPPDI = __esm({
@@ -5540,189 +5571,591 @@ var init_chunk_IPXBFWUU = __esm({
5540
5571
  }
5541
5572
  });
5542
5573
 
5543
- // ../../packages/core/dist/chunk-GPM7PE44.js
5544
- var bootstrapQuery;
5545
- var init_chunk_GPM7PE44 = __esm({
5546
- "../../packages/core/dist/chunk-GPM7PE44.js"() {
5574
+ // ../../packages/core/dist/chunk-VTFFO3RA.js
5575
+ 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, DATA_BASE_GENERATION_HEADER, REKOR_MAX_ACTOR_ID_LENGTH, REKOR_MAX_ACTOR_LABEL_LENGTH;
5576
+ var init_chunk_VTFFO3RA = __esm({
5577
+ "../../packages/core/dist/chunk-VTFFO3RA.js"() {
5547
5578
  "use strict";
5548
5579
  init_zod();
5549
- bootstrapQuery = external_exports.object({
5550
- active_hub_id: external_exports.string().uuid().optional(),
5551
- active_conversation_id: external_exports.string().uuid().optional(),
5552
- active_nav: external_exports.enum(["chat", "task", "support"]).optional(),
5553
- /**
5554
- * The people thread the URL names (`/chat/threads/:threadId`, gh #4661): the snapshot
5555
- * preloads it as `people.active_thread` when the viewer is a member.
5556
- */
5557
- active_thread_id: external_exports.string().uuid().optional()
5580
+ REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
5581
+ REKOR_ACTOR_ID_HEADER = "X-Rekor-Actor-Id";
5582
+ REKOR_ACTOR_LABEL_HEADER = "X-Rekor-Actor-Label";
5583
+ REKOR_ACTOR_ORG_HEADER = "X-Rekor-Actor-Org";
5584
+ REKOR_ACTOR_ADMIN_HEADER = "X-Rekor-Actor-Admin";
5585
+ REKOR_CLIENT_HEADER = "X-Rekor-Client";
5586
+ REKOR_TOOL_ID_HEADER = "X-Rekor-Tool-Id";
5587
+ REKOR_CLIENTS = ["api", "cli", "mcp"];
5588
+ rekorClientSchema = external_exports.enum(REKOR_CLIENTS);
5589
+ MAX_REKOR_TOOL_ID_LENGTH = 128;
5590
+ rekorToolIdSchema = external_exports.string().trim().min(1).max(MAX_REKOR_TOOL_ID_LENGTH);
5591
+ REKOR_V1_PREFIX = "/v1";
5592
+ DATA_PROXY_ORG_QUERY_PARAM = "org_id";
5593
+ MAX_PROVISIONING_BODY_BYTES = 256 * 1024;
5594
+ dataProxyQuery = external_exports.object({
5595
+ [DATA_PROXY_ORG_QUERY_PARAM]: external_exports.string().uuid().optional()
5558
5596
  });
5559
- }
5560
- });
5561
-
5562
- // ../../packages/core/dist/chunk-VORPHGDT.js
5563
- var PERMISSIONS;
5564
- var init_chunk_VORPHGDT = __esm({
5565
- "../../packages/core/dist/chunk-VORPHGDT.js"() {
5566
- "use strict";
5567
- PERMISSIONS = [
5568
- "hub:read",
5569
- "hub:write",
5570
- "hub:admin",
5571
- "conversation:read",
5572
- "conversation:write",
5573
- "analytics:read",
5574
- "billing:read",
5575
- "billing:write",
5576
- "org:read",
5577
- "org:write",
5578
- "org:admin",
5579
- "contacts:write",
5580
- "platform:admin",
5581
- "*"
5582
- ];
5583
- }
5584
- });
5585
-
5586
- // ../../packages/core/dist/chunk-DGKMMFIR.js
5587
- var MAX_NAME_LENGTH, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam;
5588
- var init_chunk_DGKMMFIR = __esm({
5589
- "../../packages/core/dist/chunk-DGKMMFIR.js"() {
5590
- "use strict";
5591
- init_chunk_VORPHGDT();
5592
- init_chunk_HZ6CADSY();
5593
- init_zod();
5594
- MAX_NAME_LENGTH = 100;
5595
- MAX_HUBS_PER_GRANT = 50;
5596
- MAX_HUB_TAGS_PER_GRANT = 20;
5597
- MAX_GRANTS = 20;
5598
- permissionEnum = external_exports.enum(PERMISSIONS).refine(
5599
- (p) => p !== "platform:admin",
5600
- { message: "platform:admin cannot be delegated via token creation" }
5601
- );
5602
- grantScopeSchema = external_exports.object({
5603
- // Required: every token grant must declare its org tenancy. The handler
5604
- // also strict-checks this as defense-in-depth, but failing at the Zod
5605
- // boundary keeps the generated client type honest (org_id: string).
5606
- org_id: external_exports.string().min(1),
5607
- hubs: external_exports.array(external_exports.string().min(1)).min(1, "Each grant must have scope.hubs as a non-empty array").max(MAX_HUBS_PER_GRANT),
5608
- hub_tags: external_exports.array(external_exports.string().min(1)).min(1, "scope.hub_tags must be a non-empty array if provided").max(MAX_HUB_TAGS_PER_GRANT).optional(),
5609
- environments: external_exports.array(external_exports.enum(["production", "preview"])).min(1, "scope.environments must be a non-empty array if provided").optional()
5610
- }).strict();
5611
- grantSchema = external_exports.object({
5612
- scope: grantScopeSchema,
5613
- permissions: external_exports.array(permissionEnum).min(1, "Each grant must have permissions as a non-empty array")
5614
- }).strict();
5615
- createTokenBody = external_exports.object({
5616
- name: external_exports.string().trim().min(1, "name is required").max(MAX_NAME_LENGTH, `name must be ${MAX_NAME_LENGTH} characters or fewer`),
5617
- grants: external_exports.array(grantSchema).min(1, "grants must be a non-empty array").max(MAX_GRANTS),
5618
- expires_at: external_exports.string().datetime({ message: "expires_at must be a valid ISO 8601 date" }).refine(
5619
- (s) => new Date(s).getTime() > Date.now(),
5620
- { message: "expires_at must be in the future" }
5621
- ).optional()
5597
+ rekorAttestation = external_exports.object({
5598
+ [REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["user", "token"]),
5599
+ [REKOR_ACTOR_ID_HEADER]: external_exports.string().min(1),
5600
+ [REKOR_ACTOR_LABEL_HEADER]: external_exports.string(),
5601
+ [REKOR_ACTOR_ORG_HEADER]: external_exports.string().uuid(),
5602
+ [REKOR_ACTOR_ADMIN_HEADER]: external_exports.enum(["0", "1"]),
5603
+ [REKOR_CLIENT_HEADER]: rekorClientSchema,
5604
+ [REKOR_TOOL_ID_HEADER]: rekorToolIdSchema.optional()
5622
5605
  });
5623
- tokenOrgIdParam = external_exports.object({ orgId: uuidSchema });
5606
+ REQUIRED_REKOR_ATTESTATION_HEADERS = Object.entries(rekorAttestation.shape).filter(([, field]) => !field.isOptional()).map(([header]) => header);
5607
+ REKOR_BOUND_BASE_HEADER = "X-Rekor-Bound-Base";
5608
+ REKOR_BOUND_TOOLSET_HEADER = "X-Rekor-Bound-Toolset";
5609
+ REKOR_BOUND_TOKEN_HEADER = "X-Rekor-Bound-Token";
5610
+ REKOR_BOUND_CUSTOMER_HEADER = "X-Rekor-Bound-Customer";
5611
+ DATA_BASE_GENERATION_HEADER = "X-Data-Base-Generation";
5612
+ REKOR_MAX_ACTOR_ID_LENGTH = 256;
5613
+ REKOR_MAX_ACTOR_LABEL_LENGTH = 256;
5624
5614
  }
5625
5615
  });
5626
5616
 
5627
- // ../../packages/core/dist/chunk-ZC6YGHNX.js
5628
- var updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, recordAiDisclosureAcceptanceBody, activityQuery, deletionModeSchema, deletionRequestBody;
5629
- var init_chunk_ZC6YGHNX = __esm({
5630
- "../../packages/core/dist/chunk-ZC6YGHNX.js"() {
5617
+ // ../../packages/core/dist/chunk-VZA6NHCH.js
5618
+ var TOOLSET_SLUG_PATTERN, REKOR_STRUCTURAL_ID_PATTERN, baseEnvironmentSchema, toolsetFileToolSchema, toolsetSurfaceSchema, toolsetConnectionBindingSchema, rekorToolsetToolsSchema, rekorBoundAttestation, rekorResolvedToolsetSchema, resolvedRecordTypeSchema, reviewWritersSchema, sharedScopeSchema, resolvedFileToolSchema, rekorToolsetFileSchema, rekorToolsetFileUrlAnswerSchema, rekorToolsetFileListSchema, rekorToolsetFileGetSchema, rekorToolsetFilePutSchema, TOOLSET_CUSTOMER_FACING_REFUSAL_MARK, TOOLSET_CUSTOMER_FACING_REFUSAL;
5619
+ var init_chunk_VZA6NHCH = __esm({
5620
+ "../../packages/core/dist/chunk-VZA6NHCH.js"() {
5631
5621
  "use strict";
5622
+ init_chunk_VTFFO3RA();
5623
+ init_chunk_WNLWNFHH();
5632
5624
  init_zod();
5633
- updateUserBody = external_exports.object({
5634
- user_language: external_exports.string().optional(),
5635
- /** true: dark; false: light; null: follow each device's own setting (`AppearanceMode`). */
5636
- ui_dark_mode: external_exports.boolean().nullable().optional(),
5637
- profile_name: external_exports.string().optional(),
5638
- link_email_to_identities: external_exports.boolean().optional()
5639
- }).refine(
5640
- (data) => Object.values(data).some((v) => v !== void 0),
5641
- { message: "At least one field must be provided" }
5642
- );
5643
- updateProfileBody = external_exports.object({
5644
- display_name: external_exports.string().optional(),
5645
- avatar_url: external_exports.string().optional(),
5646
- preferences: external_exports.record(external_exports.unknown()).optional()
5647
- }).refine(
5648
- (data) => Object.values(data).some((v) => v !== void 0),
5649
- { message: "At least one field must be provided" }
5650
- );
5651
- pathnameRegex = /^\/(?!\/)[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*$/;
5652
- updatePreferencesBody = external_exports.object({
5653
- last_viewed_nav: external_exports.string().regex(pathnameRegex, "Must be a URL pathname").max(2048).optional(),
5654
- dismissed_agentic_shortcut: external_exports.boolean().optional(),
5655
- opened_guide: external_exports.boolean().optional()
5656
- }).passthrough();
5657
- registerPushTokenBody = external_exports.object({
5658
- token: external_exports.string().min(1).max(512),
5659
- platform: external_exports.enum(["ios", "android"]),
5660
- /** Stable per-install id so re-registration replaces the prior token for the device. */
5661
- device_id: external_exports.string().min(1).max(128).optional(),
5625
+ TOOLSET_SLUG_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
5626
+ REKOR_STRUCTURAL_ID_PATTERN = TOOLSET_SLUG_PATTERN;
5627
+ baseEnvironmentSchema = external_exports.enum(["preview", "production"]);
5628
+ toolsetFileToolSchema = external_exports.object({
5629
+ file_type: external_exports.string().min(1),
5630
+ path_prefix: external_exports.string(),
5631
+ /** The entry's authored description of its tools (`description_override`), when it has one. */
5632
+ description: external_exports.string().min(1).optional(),
5633
+ tools: external_exports.object({
5634
+ list: external_exports.string().min(1).optional(),
5635
+ get: external_exports.string().min(1).optional(),
5636
+ put: external_exports.string().min(1).optional(),
5637
+ delete: external_exports.string().min(1).optional(),
5638
+ get_url: external_exports.string().min(1).optional(),
5639
+ put_url: external_exports.string().min(1).optional()
5640
+ })
5641
+ });
5642
+ toolsetSurfaceSchema = external_exports.object({
5643
+ /** Any record, composite, relationship or SQL Action tool: the toolset reaches records. */
5644
+ records: external_exports.boolean(),
5645
+ sql_query: external_exports.boolean(),
5646
+ batch: external_exports.boolean(),
5662
5647
  /**
5663
- * The build opens a person-to-person thread from a push (gh #4661): only a token registered
5664
- * with it receives thread pushes, whose `data` carries `thread_id` and no `conversation_id`.
5665
- * Each registration states it afresh, so a build that sends none clears it.
5648
+ * The toolset serves one customer per call (#5083 RK2): its every call names the customer it serves,
5649
+ * and reaches only that customer's records and shared ones. Absent on a surface recorded before it
5650
+ * was, which reads as not scoped until the connection's next tool sync or token save records it: its
5651
+ * calls name no customer, and the customer-facing rule admits none of its record tools.
5666
5652
  */
5667
- supports_threads: external_exports.boolean().optional(),
5653
+ customer_scoped: external_exports.boolean().optional(),
5668
5654
  /**
5669
- * The build opens a community from a push (gh #4872 Decision 8): only a token registered with it
5670
- * receives a community's pushes (an announcement, a reply to the member's forum post), whose
5671
- * `data` is `CommunityPushData` — never a `conversation_id` or a `thread_id`. Each registration
5672
- * states it afresh, so a build that sends none clears it.
5655
+ * A key of the resolve this side neither describes nor classifies exposes something: a kind of tool
5656
+ * the data product added later, counted in `records`. The customer-facing rule never admits it, a
5657
+ * customer scope included, until it is classified here. Absent on a surface recorded before it was,
5658
+ * which reads as present.
5673
5659
  */
5674
- supports_communities: external_exports.boolean().optional()
5675
- });
5676
- deletePushTokenQuery = external_exports.object({
5677
- token: external_exports.string().min(1).max(512)
5678
- });
5679
- recordAiDisclosureAcceptanceBody = external_exports.object({
5680
- version: external_exports.number().int().positive(),
5681
- withdrawn_at_seen: external_exports.string().datetime().nullable().optional()
5682
- });
5683
- activityQuery = external_exports.object({
5684
- limit: external_exports.coerce.number().int().min(1).max(100).optional()
5660
+ unclassified_tools: external_exports.boolean().optional(),
5661
+ /**
5662
+ * Any of its file tools writes: an operation other than `list`, `get` and `get_url` (`put`, `delete`,
5663
+ * `put_url`, or one the data product adds later), or an entry this side cannot read. Absent on a surface recorded
5664
+ * before it was, which the customer-facing rule reads as writing until the connection's next tool
5665
+ * sync or token save records it.
5666
+ */
5667
+ file_writes: external_exports.boolean().optional(),
5668
+ /**
5669
+ * A record type the resolve's `record_types` carries names the toolset among its writers
5670
+ * (`x-review.writers`, #5083 RK4): the toolset writes the type's drafts and reads its every record,
5671
+ * drafts included. Those are the types its actions and composite record steps reach, and every
5672
+ * reviewed type it reaches otherwise: at a relationship tool's or a composite relationship step's
5673
+ * end, in a `batch` entry, or, through `sql_query`, all of them (decision 198). Or such a type's
5674
+ * declaration this side cannot read, or a resolve reaching records that carries no record types.
5675
+ * Absent on a surface recorded before it was, which the customer-facing rule reads as writing, for a
5676
+ * toolset reaching records, until the connection's next tool sync or token save records it.
5677
+ */
5678
+ review_writes: external_exports.boolean().optional(),
5679
+ /**
5680
+ * Every record type the toolset reaches, at least one, is reviewed (`x-review`), holds no customer data
5681
+ * (`shared`), and does not name it among its writers: each call reads only that type's approved
5682
+ * records (#5083 decision 182, Q9). Never with a SQL Action, whose query reads its types' every
5683
+ * record, drafts included. Absent on a surface recorded before it was, which reads as false.
5684
+ */
5685
+ approved_reads_only: external_exports.boolean().optional(),
5686
+ /**
5687
+ * The toolset's file tools. Absent when it has none, and on a surface recorded before they were.
5688
+ * A list this side cannot read is dropped rather than failing the binding, which every call and
5689
+ * the customer-facing rule read: the next tool sync records it again.
5690
+ */
5691
+ files: external_exports.array(toolsetFileToolSchema).optional().catch(void 0)
5685
5692
  });
5686
- deletionModeSchema = external_exports.enum(["scheduled", "immediate"]);
5687
- deletionRequestBody = external_exports.object({
5688
- mode: deletionModeSchema,
5689
- /** User-supplied reason captured in the audit log; bounded to bound logged PII. */
5690
- reason: external_exports.string().max(500).optional(),
5691
- /** Type-to-confirm value; must equal the user's email (constant-time compared). */
5692
- email_confirmation: external_exports.string().min(1).max(320)
5693
+ toolsetConnectionBindingSchema = external_exports.object({
5694
+ base_id: external_exports.string().min(1),
5695
+ /** The slug the token was resolved against — `settings.toolset` at that write. */
5696
+ toolset: external_exports.string().min(1),
5697
+ /** The base's incarnation when the token was written; a bound attested call states it. */
5698
+ base_generation: external_exports.number().int().min(1),
5699
+ environment: baseEnvironmentSchema,
5700
+ surface: toolsetSurfaceSchema,
5701
+ /**
5702
+ * The id of the token the binding was resolved from, as its resolve reports it; a bound attested
5703
+ * call names it (`REKOR_BOUND_TOKEN_HEADER`), so the data product refuses the binding once the token
5704
+ * is revoked or expires (owner decision 41). Absent on a binding recorded before the report carried
5705
+ * it: its calls name none until a token save, or a tool sync while the token still stands, records it.
5706
+ * One that does not read is dropped rather than failing the binding.
5707
+ */
5708
+ token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
5709
+ });
5710
+ rekorToolsetToolsSchema = external_exports.object({
5711
+ data: external_exports.object({
5712
+ tools: external_exports.array(external_exports.object({
5713
+ name: external_exports.string(),
5714
+ description: external_exports.string().optional(),
5715
+ inputSchema: external_exports.record(external_exports.unknown()).optional()
5716
+ }))
5717
+ })
5718
+ });
5719
+ rekorBoundAttestation = rekorAttestation.extend({
5720
+ [REKOR_ACTOR_TYPE_HEADER]: external_exports.literal("token"),
5721
+ /** Trimmed and checked as the far side trims and checks it. */
5722
+ [REKOR_ACTOR_ID_HEADER]: external_exports.string().trim().min(1).max(REKOR_MAX_ACTOR_ID_LENGTH),
5723
+ [REKOR_ACTOR_LABEL_HEADER]: external_exports.string().max(REKOR_MAX_ACTOR_LABEL_LENGTH),
5724
+ [REKOR_ACTOR_ADMIN_HEADER]: external_exports.literal("0"),
5725
+ [REKOR_BOUND_BASE_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
5726
+ [REKOR_BOUND_TOOLSET_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
5727
+ /**
5728
+ * Decimal digits only, as the far side parses it, and at most 15 of them: its `Number()` reads
5729
+ * every such value back exactly, where a longer one may round or overflow to `Infinity` (a 400).
5730
+ */
5731
+ [DATA_BASE_GENERATION_HEADER]: external_exports.string().regex(/^[1-9]\d{0,14}$/),
5732
+ /** The token the binding was resolved from, when the connection records it (owner decision 41). */
5733
+ [REKOR_BOUND_TOKEN_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional(),
5734
+ /**
5735
+ * The customer the call serves (#5083 RK2): a contact id, which the contact book mints as a UUID.
5736
+ * Every UUID is an id the far side reads back as the customer's external id.
5737
+ */
5738
+ [REKOR_BOUND_CUSTOMER_HEADER]: external_exports.string().uuid().optional()
5739
+ });
5740
+ rekorResolvedToolsetSchema = external_exports.object({
5741
+ data: external_exports.object({
5742
+ base_id: external_exports.string().min(1),
5743
+ environment: baseEnvironmentSchema,
5744
+ base_generation: external_exports.number().int().min(1),
5745
+ /**
5746
+ * The calling token's binding, or null for a token bound to none. A bound token can call only
5747
+ * its toolset's tools, which is what a toolset connection stores (#5083 decision 14). Its org
5748
+ * is the token's own: base ids are unique only per org, so the base id alone does not say
5749
+ * which base the token reaches.
5750
+ */
5751
+ toolset_binding: external_exports.object({
5752
+ org_id: external_exports.string().optional(),
5753
+ base_id: external_exports.string(),
5754
+ toolset_id: external_exports.string(),
5755
+ /**
5756
+ * The token's own id, which a bound call names (`REKOR_BOUND_TOKEN_HEADER`); absent when the
5757
+ * caller has none (owner decision 41), and dropped when it is not an id the far side reads back.
5758
+ */
5759
+ token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
5760
+ }).nullable().optional(),
5761
+ actions: external_exports.array(external_exports.unknown()).optional(),
5762
+ composites: external_exports.array(external_exports.unknown()).optional(),
5763
+ relationships: external_exports.array(external_exports.unknown()).optional(),
5764
+ /**
5765
+ * The toolset's SQL Actions (#5311): each a fixed, read-only query over the record types it
5766
+ * declares, which the resolve also carries in `record_types` and `record_type_scopes`.
5767
+ */
5768
+ sql_actions: external_exports.array(external_exports.unknown()).optional(),
5769
+ files: external_exports.array(external_exports.unknown()).optional(),
5770
+ batch: external_exports.object({ enabled: external_exports.boolean().optional() }).passthrough().nullable().optional(),
5771
+ sql_query: external_exports.boolean().optional(),
5772
+ /** The toolset serves one customer per call (#5083 RK2). Absent reads as not scoped. */
5773
+ customer_scope: external_exports.boolean().optional(),
5774
+ /**
5775
+ * Record types the toolset reaches, by id, as the data product stores them (`json_schema`
5776
+ * included): each one its actions, composite record steps and SQL Actions reach, and each reviewed one it
5777
+ * reaches otherwise (relationship ends, `batch` entries, every one through `sql_query`; #5083
5778
+ * decision 198). An unreviewed type it reaches only otherwise is not here. A reviewed type's
5779
+ * `x-review` names its writers (RK4).
5780
+ */
5781
+ record_types: external_exports.record(external_exports.unknown()).optional(),
5782
+ /**
5783
+ * What each record type the toolset's actions, composite steps, SQL Actions and relationship tools reach is to a
5784
+ * customer scope (`{ role }`, or null), by id (#5083 RK2). A reviewed type `record_types` carries
5785
+ * because only a `batch` entry or `sql_query` reaches it has none.
5786
+ */
5787
+ record_type_scopes: external_exports.record(external_exports.unknown()).optional()
5788
+ }).passthrough()
5789
+ });
5790
+ resolvedRecordTypeSchema = external_exports.object({ json_schema: external_exports.record(external_exports.unknown()) });
5791
+ reviewWritersSchema = external_exports.object({ writers: external_exports.array(external_exports.string()).optional() });
5792
+ sharedScopeSchema = external_exports.object({ role: external_exports.literal("shared") });
5793
+ resolvedFileToolSchema = external_exports.object({
5794
+ file_type: external_exports.string().min(1),
5795
+ path_prefix: external_exports.string().nullish(),
5796
+ operations: external_exports.array(external_exports.unknown()),
5797
+ name: external_exports.unknown().optional(),
5798
+ names: external_exports.unknown().optional(),
5799
+ description_override: external_exports.unknown().optional()
5800
+ });
5801
+ rekorToolsetFileSchema = external_exports.object({
5802
+ path: external_exports.string().min(1),
5803
+ version: external_exports.number().int().min(1),
5804
+ content_type: external_exports.string().optional()
5805
+ }).passthrough();
5806
+ rekorToolsetFileUrlAnswerSchema = external_exports.object({
5807
+ data: external_exports.object({
5808
+ url: external_exports.string(),
5809
+ expires_at: external_exports.string(),
5810
+ path: external_exports.string(),
5811
+ content_sha256: external_exports.string()
5812
+ }).passthrough()
5693
5813
  });
5814
+ rekorToolsetFileListSchema = external_exports.object({ data: external_exports.array(rekorToolsetFileSchema) });
5815
+ rekorToolsetFileGetSchema = external_exports.object({
5816
+ data: rekorToolsetFileSchema.extend({
5817
+ content: external_exports.string(),
5818
+ encoding: external_exports.enum(["utf-8", "base64"])
5819
+ })
5820
+ });
5821
+ rekorToolsetFilePutSchema = external_exports.object({ data: rekorToolsetFileSchema });
5822
+ 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";
5823
+ 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`;
5694
5824
  }
5695
5825
  });
5696
5826
 
5697
- // ../../packages/core/dist/chunk-ACKF2MVU.js
5698
- var MAX_NAME_LENGTH2, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody;
5699
- var init_chunk_ACKF2MVU = __esm({
5700
- "../../packages/core/dist/chunk-ACKF2MVU.js"() {
5827
+ // ../../packages/core/dist/chunk-IPDOHAZ5.js
5828
+ var reportSourceSchema, intakeReportSourceSchema, reportClassificationSchema, reportStatusSchema, reportLocaleSchema, reportMessageAuthorRoleSchema, reportMessageSchema, sentryRefStatusSchema, createReportBody, editReportBody, reporterReportSummarySchema, reporterListResponseSchema, getReportResponseSchema, reporterTransitionResponseSchema, contestReportBody, reporterListQuery, listReportsQuery, GITHUB_ISSUE_URL_REGEX, githubIssueUrlSchema, transitionReportBody, groupReportsBody, holdReportBody;
5829
+ var init_chunk_IPDOHAZ5 = __esm({
5830
+ "../../packages/core/dist/chunk-IPDOHAZ5.js"() {
5701
5831
  "use strict";
5702
5832
  init_chunk_HZ6CADSY();
5703
5833
  init_zod();
5834
+ reportSourceSchema = external_exports.enum(["sentry", "cli", "review", "security_audit"]);
5835
+ intakeReportSourceSchema = external_exports.enum(["cli", "review", "security_audit"]);
5836
+ reportClassificationSchema = external_exports.enum(["bug", "flaky_test", "security", "enhancement"]);
5837
+ reportStatusSchema = external_exports.enum([
5838
+ "pending",
5839
+ "grouped",
5840
+ "escalated",
5841
+ "shipped",
5842
+ "contested",
5843
+ "addressed",
5844
+ "dismissed"
5845
+ ]);
5846
+ reportLocaleSchema = external_exports.enum(["en", "pt", "es"]);
5847
+ reportMessageAuthorRoleSchema = external_exports.enum(["reporter", "triage", "fixer", "system"]);
5848
+ reportMessageSchema = external_exports.object({
5849
+ message_id: external_exports.string(),
5850
+ author_role: reportMessageAuthorRoleSchema,
5851
+ /** The status transition this note accompanied (e.g. 'shipped'); null for a free/system note. */
5852
+ transition: external_exports.string().nullable(),
5853
+ body: external_exports.string(),
5854
+ created_at: timestampSchema,
5855
+ /**
5856
+ * Visibility: `false` = reporter-facing (the default for every narrative entry); `true` =
5857
+ * triage-internal (e.g. a `hold` rationale) — surfaced to platform admins only and NEVER
5858
+ * returned on the reporter read path. The reporter's `GET /api/reports/:id` filters these out.
5859
+ */
5860
+ internal: external_exports.boolean()
5861
+ });
5862
+ sentryRefStatusSchema = external_exports.enum(["valid", "not_found", "mismatch", "unverified"]);
5863
+ createReportBody = external_exports.object({
5864
+ title: external_exports.string().min(5).max(256),
5865
+ description: external_exports.string().min(10).max(5e3),
5866
+ steps_to_reproduce: external_exports.string().max(3e3).optional(),
5867
+ error_message: external_exports.string().max(2e3).optional(),
5868
+ // Taxonomy (server defaults: source=cli, classification=bug when absent).
5869
+ source: intakeReportSourceSchema.optional(),
5870
+ classification: reportClassificationSchema.optional(),
5871
+ // Stable dedup key (e.g. "<file>::<test>" for flaky, "<file>:<line>" for
5872
+ // security). When present, the fingerprint uses it instead of the body hash.
5873
+ dedup_key: external_exports.string().min(1).max(256).optional(),
5874
+ // Context fields (auto-captured by the CLI)
5875
+ organization_id: external_exports.string().optional(),
5876
+ hub_id: external_exports.string().uuid().optional(),
5877
+ hub_name: external_exports.string().max(256).optional(),
5878
+ conversation_id: external_exports.string().uuid().optional(),
5879
+ agent_id: external_exports.string().uuid().optional(),
5880
+ agent_name: external_exports.string().max(256).optional(),
5881
+ client_version: external_exports.string().max(64).optional(),
5882
+ additional_context: external_exports.string().max(2e3).optional()
5883
+ });
5884
+ editReportBody = external_exports.object({
5885
+ title: external_exports.string().min(5).max(256).optional(),
5886
+ description: external_exports.string().min(10).max(5e3).optional(),
5887
+ steps_to_reproduce: external_exports.string().max(3e3).optional(),
5888
+ error_message: external_exports.string().max(2e3).optional(),
5889
+ additional_context: external_exports.string().max(2e3).optional()
5890
+ }).strict().refine((b) => Object.keys(b).length > 0, {
5891
+ message: "at least one field must be provided"
5892
+ });
5893
+ reporterReportSummarySchema = external_exports.object({
5894
+ report_id: external_exports.string(),
5895
+ title: external_exports.string(),
5896
+ description: external_exports.string(),
5897
+ classification: reportClassificationSchema,
5898
+ status: reportStatusSchema,
5899
+ created_at: timestampSchema,
5900
+ triaged_at: timestampSchema.nullable(),
5901
+ resolved_at: timestampSchema.nullable(),
5902
+ /** How many times the reporter has contested (gates the hard cap). */
5903
+ contest_count: external_exports.number(),
5904
+ /** True once triage issued a non-contestable (final) dismissal. */
5905
+ dismissal_final: external_exports.boolean()
5906
+ });
5907
+ reporterListResponseSchema = external_exports.object({
5908
+ data: external_exports.array(reporterReportSummarySchema)
5909
+ });
5910
+ getReportResponseSchema = external_exports.object({
5911
+ report: reporterReportSummarySchema,
5912
+ messages: external_exports.array(reportMessageSchema)
5913
+ });
5914
+ reporterTransitionResponseSchema = external_exports.object({
5915
+ report: reporterReportSummarySchema
5916
+ });
5917
+ contestReportBody = external_exports.object({
5918
+ reason: external_exports.string().min(1).max(5e3)
5919
+ });
5920
+ reporterListQuery = external_exports.object({
5921
+ status: reportStatusSchema.optional()
5922
+ });
5923
+ listReportsQuery = external_exports.object({
5924
+ status: reportStatusSchema.optional(),
5925
+ source: reportSourceSchema.optional(),
5926
+ limit: external_exports.coerce.number().int().min(1).max(200).optional(),
5927
+ offset: external_exports.coerce.number().int().min(0).optional(),
5928
+ /** ISO 8601 lower bound on created_at. */
5929
+ since: external_exports.string().datetime().optional(),
5930
+ /**
5931
+ * ISO 8601 lower bound on resolution time — "what did we resolve recently", which `since`
5932
+ * (a created_at filter) cannot answer for a long-lived report resolved yesterday. Implies
5933
+ * a terminal status (`addressed`/`dismissed`) and orders on that same axis.
5934
+ */
5935
+ resolved_since: external_exports.string().datetime().optional()
5936
+ });
5937
+ GITHUB_ISSUE_URL_REGEX = /^https:\/\/github\.com\/[^/]+\/[^/]+\/issues\/\d+(?:[/?#]|$)/;
5938
+ githubIssueUrlSchema = external_exports.string().url().refine((u) => GITHUB_ISSUE_URL_REGEX.test(u), {
5939
+ message: "must be an https://github.com/<owner>/<repo>/issues/<number> URL"
5940
+ });
5941
+ transitionReportBody = external_exports.discriminatedUnion("target", [
5942
+ external_exports.object({
5943
+ target: external_exports.literal("escalated"),
5944
+ gh_issue_url: githubIssueUrlSchema,
5945
+ ai_verdict: external_exports.string().max(2e3).optional()
5946
+ }),
5947
+ external_exports.object({
5948
+ target: external_exports.literal("shipped"),
5949
+ note: external_exports.string().min(1).max(2e3).optional()
5950
+ }),
5951
+ external_exports.object({
5952
+ target: external_exports.literal("addressed")
5953
+ }),
5954
+ external_exports.object({
5955
+ target: external_exports.literal("dismissed"),
5956
+ dismissal_reason: external_exports.string().min(1).max(5e3),
5957
+ ai_verdict: external_exports.string().max(2e3).optional(),
5958
+ final: external_exports.boolean().optional()
5959
+ })
5960
+ ]);
5961
+ groupReportsBody = external_exports.object({
5962
+ member_ids: external_exports.array(external_exports.string().uuid()).min(1).max(100)
5963
+ });
5964
+ holdReportBody = external_exports.object({
5965
+ reason: external_exports.string().min(1).max(5e3)
5966
+ });
5967
+ }
5968
+ });
5969
+
5970
+ // ../../packages/core/dist/chunk-GPM7PE44.js
5971
+ var bootstrapQuery;
5972
+ var init_chunk_GPM7PE44 = __esm({
5973
+ "../../packages/core/dist/chunk-GPM7PE44.js"() {
5974
+ "use strict";
5975
+ init_zod();
5976
+ bootstrapQuery = external_exports.object({
5977
+ active_hub_id: external_exports.string().uuid().optional(),
5978
+ active_conversation_id: external_exports.string().uuid().optional(),
5979
+ active_nav: external_exports.enum(["chat", "task", "support"]).optional(),
5980
+ /**
5981
+ * The people thread the URL names (`/chat/threads/:threadId`, gh #4661): the snapshot
5982
+ * preloads it as `people.active_thread` when the viewer is a member.
5983
+ */
5984
+ active_thread_id: external_exports.string().uuid().optional()
5985
+ });
5986
+ }
5987
+ });
5988
+
5989
+ // ../../packages/core/dist/chunk-5VL6LBFD.js
5990
+ var PERMISSIONS;
5991
+ var init_chunk_5VL6LBFD = __esm({
5992
+ "../../packages/core/dist/chunk-5VL6LBFD.js"() {
5993
+ "use strict";
5994
+ PERMISSIONS = [
5995
+ "hub:read",
5996
+ "hub:write",
5997
+ "hub:admin",
5998
+ "conversation:read",
5999
+ "conversation:write",
6000
+ "analytics:read",
6001
+ "billing:read",
6002
+ "billing:write",
6003
+ "org:read",
6004
+ "org:write",
6005
+ "org:admin",
6006
+ "contacts:write",
6007
+ "platform:admin",
6008
+ "*"
6009
+ ];
6010
+ }
6011
+ });
6012
+
6013
+ // ../../packages/core/dist/chunk-VEERWOZ6.js
6014
+ var MAX_NAME_LENGTH2, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam;
6015
+ var init_chunk_VEERWOZ6 = __esm({
6016
+ "../../packages/core/dist/chunk-VEERWOZ6.js"() {
6017
+ "use strict";
6018
+ init_chunk_5VL6LBFD();
6019
+ init_chunk_HZ6CADSY();
6020
+ init_zod();
5704
6021
  MAX_NAME_LENGTH2 = 100;
5705
- MAX_VALUE_LENGTH = 32 * 1024;
5706
- MAX_TAGS = 20;
5707
- MAX_TAG_LENGTH = 50;
5708
- MAX_SCOPE_HUBS = 100;
5709
- MAX_SCOPE_TAGS = 50;
5710
- vaultSecretScopeSchema = external_exports.object({
5711
- hubs: external_exports.array(external_exports.string().min(1)).max(MAX_SCOPE_HUBS).optional(),
5712
- tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH)).max(MAX_SCOPE_TAGS).optional()
5713
- }).strict();
5714
- vaultCreateBody = external_exports.object({
5715
- name: external_exports.string().trim().min(1, "name is required").max(MAX_NAME_LENGTH2, `name must be ${MAX_NAME_LENGTH2} characters or fewer`),
5716
- value: external_exports.string().min(1, "value is required").max(MAX_VALUE_LENGTH, `value must be ${MAX_VALUE_LENGTH} characters or fewer`),
5717
- tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH, `Tag must be ${MAX_TAG_LENGTH} characters or fewer`)).max(MAX_TAGS, `Maximum ${MAX_TAGS} tags allowed`).optional().default([]),
5718
- scope: vaultSecretScopeSchema.optional().default({})
6022
+ MAX_HUBS_PER_GRANT = 50;
6023
+ MAX_HUB_TAGS_PER_GRANT = 20;
6024
+ MAX_GRANTS = 20;
6025
+ permissionEnum = external_exports.enum(PERMISSIONS).refine(
6026
+ (p) => p !== "platform:admin",
6027
+ { message: "platform:admin cannot be delegated via token creation" }
6028
+ );
6029
+ grantScopeSchema = external_exports.object({
6030
+ // Required: every token grant must declare its org tenancy. The handler
6031
+ // also strict-checks this as defense-in-depth, but failing at the Zod
6032
+ // boundary keeps the generated client type honest (org_id: string).
6033
+ org_id: external_exports.string().min(1),
6034
+ hubs: external_exports.array(external_exports.string().min(1)).min(1, "Each grant must have scope.hubs as a non-empty array").max(MAX_HUBS_PER_GRANT),
6035
+ hub_tags: external_exports.array(external_exports.string().min(1)).min(1, "scope.hub_tags must be a non-empty array if provided").max(MAX_HUB_TAGS_PER_GRANT).optional(),
6036
+ environments: external_exports.array(external_exports.enum(["production", "preview"])).min(1, "scope.environments must be a non-empty array if provided").optional()
5719
6037
  }).strict();
5720
- vaultUpdateBody = external_exports.object({
5721
- name: external_exports.string().trim().min(1).max(MAX_NAME_LENGTH2).optional(),
5722
- value: external_exports.string().min(1).max(MAX_VALUE_LENGTH).optional(),
5723
- tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH)).max(MAX_TAGS).optional(),
5724
- scope: vaultSecretScopeSchema.optional()
6038
+ grantSchema = external_exports.object({
6039
+ scope: grantScopeSchema,
6040
+ permissions: external_exports.array(permissionEnum).min(1, "Each grant must have permissions as a non-empty array")
5725
6041
  }).strict();
6042
+ createTokenBody = external_exports.object({
6043
+ name: external_exports.string().trim().min(1, "name is required").max(MAX_NAME_LENGTH2, `name must be ${MAX_NAME_LENGTH2} characters or fewer`),
6044
+ grants: external_exports.array(grantSchema).min(1, "grants must be a non-empty array").max(MAX_GRANTS),
6045
+ expires_at: external_exports.string().datetime({ message: "expires_at must be a valid ISO 8601 date" }).refine(
6046
+ (s) => new Date(s).getTime() > Date.now(),
6047
+ { message: "expires_at must be in the future" }
6048
+ ).optional()
6049
+ });
6050
+ tokenOrgIdParam = external_exports.object({ orgId: uuidSchema });
6051
+ }
6052
+ });
6053
+
6054
+ // ../../packages/core/dist/chunk-ZC6YGHNX.js
6055
+ var updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, recordAiDisclosureAcceptanceBody, activityQuery, deletionModeSchema, deletionRequestBody;
6056
+ var init_chunk_ZC6YGHNX = __esm({
6057
+ "../../packages/core/dist/chunk-ZC6YGHNX.js"() {
6058
+ "use strict";
6059
+ init_zod();
6060
+ updateUserBody = external_exports.object({
6061
+ user_language: external_exports.string().optional(),
6062
+ /** true: dark; false: light; null: follow each device's own setting (`AppearanceMode`). */
6063
+ ui_dark_mode: external_exports.boolean().nullable().optional(),
6064
+ profile_name: external_exports.string().optional(),
6065
+ link_email_to_identities: external_exports.boolean().optional()
6066
+ }).refine(
6067
+ (data) => Object.values(data).some((v) => v !== void 0),
6068
+ { message: "At least one field must be provided" }
6069
+ );
6070
+ updateProfileBody = external_exports.object({
6071
+ display_name: external_exports.string().optional(),
6072
+ avatar_url: external_exports.string().optional(),
6073
+ preferences: external_exports.record(external_exports.unknown()).optional()
6074
+ }).refine(
6075
+ (data) => Object.values(data).some((v) => v !== void 0),
6076
+ { message: "At least one field must be provided" }
6077
+ );
6078
+ pathnameRegex = /^\/(?!\/)[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*$/;
6079
+ updatePreferencesBody = external_exports.object({
6080
+ last_viewed_nav: external_exports.string().regex(pathnameRegex, "Must be a URL pathname").max(2048).optional(),
6081
+ dismissed_agentic_shortcut: external_exports.boolean().optional(),
6082
+ opened_guide: external_exports.boolean().optional()
6083
+ }).passthrough();
6084
+ registerPushTokenBody = external_exports.object({
6085
+ token: external_exports.string().min(1).max(512),
6086
+ platform: external_exports.enum(["ios", "android"]),
6087
+ /** Stable per-install id so re-registration replaces the prior token for the device. */
6088
+ device_id: external_exports.string().min(1).max(128).optional(),
6089
+ /**
6090
+ * The build opens a person-to-person thread from a push (gh #4661): only a token registered
6091
+ * with it receives thread pushes, whose `data` carries `thread_id` and no `conversation_id`.
6092
+ * Each registration states it afresh, so a build that sends none clears it.
6093
+ */
6094
+ supports_threads: external_exports.boolean().optional(),
6095
+ /**
6096
+ * The build opens a community from a push (gh #4872 Decision 8): only a token registered with it
6097
+ * receives a community's pushes (an announcement, a reply to the member's forum post), whose
6098
+ * `data` is `CommunityPushData` — never a `conversation_id` or a `thread_id`. Each registration
6099
+ * states it afresh, so a build that sends none clears it.
6100
+ */
6101
+ supports_communities: external_exports.boolean().optional()
6102
+ });
6103
+ deletePushTokenQuery = external_exports.object({
6104
+ token: external_exports.string().min(1).max(512)
6105
+ });
6106
+ recordAiDisclosureAcceptanceBody = external_exports.object({
6107
+ version: external_exports.number().int().positive(),
6108
+ withdrawn_at_seen: external_exports.string().datetime().nullable().optional()
6109
+ });
6110
+ activityQuery = external_exports.object({
6111
+ limit: external_exports.coerce.number().int().min(1).max(100).optional()
6112
+ });
6113
+ deletionModeSchema = external_exports.enum(["scheduled", "immediate"]);
6114
+ deletionRequestBody = external_exports.object({
6115
+ mode: deletionModeSchema,
6116
+ /** User-supplied reason captured in the audit log; bounded to bound logged PII. */
6117
+ reason: external_exports.string().max(500).optional(),
6118
+ /** Type-to-confirm value; must equal the user's email (constant-time compared). */
6119
+ email_confirmation: external_exports.string().min(1).max(320)
6120
+ });
6121
+ }
6122
+ });
6123
+
6124
+ // ../../packages/core/dist/chunk-FPSDNS2E.js
6125
+ var noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema;
6126
+ var init_chunk_FPSDNS2E = __esm({
6127
+ "../../packages/core/dist/chunk-FPSDNS2E.js"() {
6128
+ "use strict";
6129
+ init_zod();
6130
+ noticeSeveritySchema = external_exports.enum(["critical", "warn", "info"]);
6131
+ noticeStatusSchema = external_exports.enum(["active", "resolved"]);
6132
+ NOTICE_SCOPE_REGEX = /^(global|provider:[a-z0-9_-]{1,40}|service:[a-z0-9_-]{1,40})$/;
6133
+ noticeScopeSchema = external_exports.string().regex(NOTICE_SCOPE_REGEX, "scope must be 'global', 'provider:<x>', or 'service:<x>'");
6134
+ noticeLinkSchema = external_exports.string().url().refine((u) => /^https?:\/\//i.test(u), { message: "link must be an http(s) URL" });
6135
+ createNoticeBody = external_exports.object({
6136
+ severity: noticeSeveritySchema.default("info"),
6137
+ scope: noticeScopeSchema.default("global"),
6138
+ title: external_exports.string().trim().min(1).max(200),
6139
+ body: external_exports.string().max(2e3).optional(),
6140
+ link: noticeLinkSchema.optional(),
6141
+ starts_at: external_exports.string().datetime().optional(),
6142
+ ends_at: external_exports.string().datetime().optional()
6143
+ });
6144
+ updateNoticeBody = external_exports.object({
6145
+ severity: noticeSeveritySchema.optional(),
6146
+ scope: noticeScopeSchema.optional(),
6147
+ title: external_exports.string().trim().min(1).max(200).optional(),
6148
+ body: external_exports.string().max(2e3).nullable().optional(),
6149
+ link: noticeLinkSchema.nullable().optional(),
6150
+ starts_at: external_exports.string().datetime().optional(),
6151
+ ends_at: external_exports.string().datetime().nullable().optional()
6152
+ }).refine((b) => Object.keys(b).length > 0, { message: "at least one field must be provided" });
6153
+ listNoticesQuery = external_exports.object({
6154
+ status: noticeStatusSchema.optional(),
6155
+ limit: external_exports.coerce.number().int().min(1).max(200).optional(),
6156
+ offset: external_exports.coerce.number().int().min(0).optional()
6157
+ });
6158
+ noticeIdParamSchema = external_exports.object({ id: external_exports.string().min(1) });
5726
6159
  }
5727
6160
  });
5728
6161
 
@@ -5874,7 +6307,7 @@ var init_chunk_5XEJSR22 = __esm({
5874
6307
  }
5875
6308
  });
5876
6309
 
5877
- // ../../packages/core/dist/chunk-QUKTIJKE.js
6310
+ // ../../packages/core/dist/chunk-KKA642DR.js
5878
6311
  function matchPath(pattern, path42) {
5879
6312
  const normalizedPath = path42.replace(/\/$/, "");
5880
6313
  if (pattern.endsWith("/*")) {
@@ -5902,8 +6335,8 @@ function getEndpointConfig(path42) {
5902
6335
  return { tier: "STANDARD" };
5903
6336
  }
5904
6337
  var ENDPOINT_CONFIGS, EXCLUDED_PATHS;
5905
- var init_chunk_QUKTIJKE = __esm({
5906
- "../../packages/core/dist/chunk-QUKTIJKE.js"() {
6338
+ var init_chunk_KKA642DR = __esm({
6339
+ "../../packages/core/dist/chunk-KKA642DR.js"() {
5907
6340
  "use strict";
5908
6341
  init_chunk_5XEJSR22();
5909
6342
  ENDPOINT_CONFIGS = {
@@ -6229,7 +6662,7 @@ var init_chunk_QUKTIJKE = __esm({
6229
6662
  // (pull, diff, push, pull) and a GitOps job may push every hub at once with one token; when
6230
6663
  // each path held its own 100, that ran to 100 hubs a minute.
6231
6664
  "/api/ci/*": { tier: "STANDARD", userLimit: 500, skipAuthenticatedUsers: true, userLimitKey: "/api/ci/*" },
6232
- // Attested `/v1` proxy onto the Rekor Worker. `userLimitKey` is load-bearing here: the
6665
+ // Attested `/v1` proxy onto the data API's `AttestedEntrypoint`. `userLimitKey` is load-bearing here: the
6233
6666
  // per-user budget defaults to the full request path, and this surface's paths carry base,
6234
6667
  // record, and file ids — so without a pinned key every distinct resource would get its own
6235
6668
  // fresh budget and the per-user limit would bound nothing. One shared budget across the
@@ -6375,7 +6808,7 @@ var init_chunk_QUKTIJKE = __esm({
6375
6808
  }
6376
6809
  });
6377
6810
 
6378
- // ../../packages/core/dist/chunk-N4FMK4UY.js
6811
+ // ../../packages/core/dist/chunk-TUHJ5PQH.js
6379
6812
  function fileSnapshotChanged(run) {
6380
6813
  return run.written + run.removed > 0;
6381
6814
  }
@@ -6416,424 +6849,83 @@ async function sendWithRetry(opts, cursor) {
6416
6849
  }
6417
6850
  }
6418
6851
  var rekorFileSnapshotAnswerSchema, FILE_SNAPSHOT_MAX_PAGES, FILE_SNAPSHOT_CONFLICT_ATTEMPTS, FILE_SNAPSHOT_PAGE_SPACING_MS, FILE_SNAPSHOT_CONFLICT_STATUS;
6419
- var init_chunk_N4FMK4UY = __esm({
6420
- "../../packages/core/dist/chunk-N4FMK4UY.js"() {
6852
+ var init_chunk_TUHJ5PQH = __esm({
6853
+ "../../packages/core/dist/chunk-TUHJ5PQH.js"() {
6421
6854
  "use strict";
6422
- init_chunk_QUKTIJKE();
6855
+ init_chunk_KKA642DR();
6423
6856
  init_chunk_5XEJSR22();
6424
6857
  init_zod();
6425
6858
  rekorFileSnapshotAnswerSchema = external_exports.object({
6426
6859
  data: external_exports.object({
6427
- next_cursor: external_exports.string().nullable(),
6428
- /** Files the page created or replaced on the preview. */
6429
- written: external_exports.number().int(),
6430
- /** The preview's own files, ones production does not hold, the page removed. */
6431
- removed: external_exports.number().int(),
6432
- /** Files the page found already equal to production's. */
6433
- unchanged: external_exports.number().int()
6434
- })
6435
- });
6436
- FILE_SNAPSHOT_MAX_PAGES = 1e4;
6437
- FILE_SNAPSHOT_CONFLICT_ATTEMPTS = 3;
6438
- FILE_SNAPSHOT_PAGE_SPACING_MS = Math.ceil(
6439
- 6e4 / Math.max(1, Math.floor((getEndpointConfig(`${DATA_PROXY_PREFIX}/files/snapshot`)?.userLimit ?? 60) * 4 / 5))
6440
- );
6441
- FILE_SNAPSHOT_CONFLICT_STATUS = 409;
6442
- }
6443
- });
6444
-
6445
- // ../../packages/core/dist/chunk-BEOHBREG.js
6446
- 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, DATA_BASE_GENERATION_HEADER, REKOR_MAX_ACTOR_ID_LENGTH, REKOR_MAX_ACTOR_LABEL_LENGTH;
6447
- var init_chunk_BEOHBREG = __esm({
6448
- "../../packages/core/dist/chunk-BEOHBREG.js"() {
6449
- "use strict";
6450
- init_zod();
6451
- REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
6452
- REKOR_ACTOR_ID_HEADER = "X-Rekor-Actor-Id";
6453
- REKOR_ACTOR_LABEL_HEADER = "X-Rekor-Actor-Label";
6454
- REKOR_ACTOR_ORG_HEADER = "X-Rekor-Actor-Org";
6455
- REKOR_ACTOR_ADMIN_HEADER = "X-Rekor-Actor-Admin";
6456
- REKOR_CLIENT_HEADER = "X-Rekor-Client";
6457
- REKOR_TOOL_ID_HEADER = "X-Rekor-Tool-Id";
6458
- REKOR_CLIENTS = ["api", "cli", "mcp"];
6459
- rekorClientSchema = external_exports.enum(REKOR_CLIENTS);
6460
- MAX_REKOR_TOOL_ID_LENGTH = 128;
6461
- rekorToolIdSchema = external_exports.string().trim().min(1).max(MAX_REKOR_TOOL_ID_LENGTH);
6462
- REKOR_V1_PREFIX = "/v1";
6463
- DATA_PROXY_ORG_QUERY_PARAM = "org_id";
6464
- MAX_PROVISIONING_BODY_BYTES = 256 * 1024;
6465
- dataProxyQuery = external_exports.object({
6466
- [DATA_PROXY_ORG_QUERY_PARAM]: external_exports.string().uuid().optional()
6467
- });
6468
- rekorAttestation = external_exports.object({
6469
- [REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["user", "token"]),
6470
- [REKOR_ACTOR_ID_HEADER]: external_exports.string().min(1),
6471
- [REKOR_ACTOR_LABEL_HEADER]: external_exports.string(),
6472
- [REKOR_ACTOR_ORG_HEADER]: external_exports.string().uuid(),
6473
- [REKOR_ACTOR_ADMIN_HEADER]: external_exports.enum(["0", "1"]),
6474
- [REKOR_CLIENT_HEADER]: rekorClientSchema,
6475
- [REKOR_TOOL_ID_HEADER]: rekorToolIdSchema.optional()
6476
- });
6477
- REQUIRED_REKOR_ATTESTATION_HEADERS = Object.entries(rekorAttestation.shape).filter(([, field]) => !field.isOptional()).map(([header]) => header);
6478
- REKOR_BOUND_BASE_HEADER = "X-Rekor-Bound-Base";
6479
- REKOR_BOUND_TOOLSET_HEADER = "X-Rekor-Bound-Toolset";
6480
- REKOR_BOUND_TOKEN_HEADER = "X-Rekor-Bound-Token";
6481
- REKOR_BOUND_CUSTOMER_HEADER = "X-Rekor-Bound-Customer";
6482
- DATA_BASE_GENERATION_HEADER = "X-Data-Base-Generation";
6483
- REKOR_MAX_ACTOR_ID_LENGTH = 256;
6484
- REKOR_MAX_ACTOR_LABEL_LENGTH = 256;
6485
- }
6486
- });
6487
-
6488
- // ../../packages/core/dist/chunk-C2BKAZB7.js
6489
- var TOOLSET_SLUG_PATTERN, REKOR_STRUCTURAL_ID_PATTERN, baseEnvironmentSchema, toolsetFileToolSchema, toolsetSurfaceSchema, toolsetConnectionBindingSchema, rekorToolsetToolsSchema, rekorBoundAttestation, rekorResolvedToolsetSchema, resolvedRecordTypeSchema, reviewWritersSchema, sharedScopeSchema, resolvedFileToolSchema, rekorToolsetFileSchema, rekorToolsetFileUrlAnswerSchema, rekorToolsetFileListSchema, rekorToolsetFileGetSchema, rekorToolsetFilePutSchema, TOOLSET_CUSTOMER_FACING_REFUSAL_MARK, TOOLSET_CUSTOMER_FACING_REFUSAL;
6490
- var init_chunk_C2BKAZB7 = __esm({
6491
- "../../packages/core/dist/chunk-C2BKAZB7.js"() {
6492
- "use strict";
6493
- init_chunk_BEOHBREG();
6494
- init_chunk_DHPUPI4Y();
6495
- init_zod();
6496
- TOOLSET_SLUG_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
6497
- REKOR_STRUCTURAL_ID_PATTERN = TOOLSET_SLUG_PATTERN;
6498
- baseEnvironmentSchema = external_exports.enum(["preview", "production"]);
6499
- toolsetFileToolSchema = external_exports.object({
6500
- file_type: external_exports.string().min(1),
6501
- path_prefix: external_exports.string(),
6502
- /** The entry's authored description of its tools (`description_override`), when it has one. */
6503
- description: external_exports.string().min(1).optional(),
6504
- tools: external_exports.object({
6505
- list: external_exports.string().min(1).optional(),
6506
- get: external_exports.string().min(1).optional(),
6507
- put: external_exports.string().min(1).optional(),
6508
- delete: external_exports.string().min(1).optional(),
6509
- get_url: external_exports.string().min(1).optional(),
6510
- put_url: external_exports.string().min(1).optional()
6511
- })
6512
- });
6513
- toolsetSurfaceSchema = external_exports.object({
6514
- /** Any record, composite, relationship or SQL Action tool: the toolset reaches records. */
6515
- records: external_exports.boolean(),
6516
- sql_query: external_exports.boolean(),
6517
- batch: external_exports.boolean(),
6518
- /**
6519
- * The toolset serves one customer per call (#5083 RK2): its every call names the customer it serves,
6520
- * and reaches only that customer's records and shared ones. Absent on a surface recorded before it
6521
- * was, which reads as not scoped until the connection's next tool sync or token save records it: its
6522
- * calls name no customer, and the customer-facing rule admits none of its record tools.
6523
- */
6524
- customer_scoped: external_exports.boolean().optional(),
6525
- /**
6526
- * A key of the resolve this side neither describes nor classifies exposes something: a kind of tool
6527
- * the data product added later, counted in `records`. The customer-facing rule never admits it, a
6528
- * customer scope included, until it is classified here. Absent on a surface recorded before it was,
6529
- * which reads as present.
6530
- */
6531
- unclassified_tools: external_exports.boolean().optional(),
6532
- /**
6533
- * Any of its file tools writes: an operation other than `list`, `get` and `get_url` (`put`, `delete`,
6534
- * `put_url`, or one the data product adds later), or an entry this side cannot read. Absent on a surface recorded
6535
- * before it was, which the customer-facing rule reads as writing until the connection's next tool
6536
- * sync or token save records it.
6537
- */
6538
- file_writes: external_exports.boolean().optional(),
6539
- /**
6540
- * A record type the resolve's `record_types` carries names the toolset among its writers
6541
- * (`x-review.writers`, #5083 RK4): the toolset writes the type's drafts and reads its every record,
6542
- * drafts included. Those are the types its actions and composite record steps reach, and every
6543
- * reviewed type it reaches otherwise: at a relationship tool's or a composite relationship step's
6544
- * end, in a `batch` entry, or, through `sql_query`, all of them (decision 198). Or such a type's
6545
- * declaration this side cannot read, or a resolve reaching records that carries no record types.
6546
- * Absent on a surface recorded before it was, which the customer-facing rule reads as writing, for a
6547
- * toolset reaching records, until the connection's next tool sync or token save records it.
6548
- */
6549
- review_writes: external_exports.boolean().optional(),
6550
- /**
6551
- * Every record type the toolset reaches, at least one, is reviewed (`x-review`), holds no customer data
6552
- * (`shared`), and does not name it among its writers: each call reads only that type's approved
6553
- * records (#5083 decision 182, Q9). Never with a SQL Action, whose query reads its types' every
6554
- * record, drafts included. Absent on a surface recorded before it was, which reads as false.
6555
- */
6556
- approved_reads_only: external_exports.boolean().optional(),
6557
- /**
6558
- * The toolset's file tools. Absent when it has none, and on a surface recorded before they were.
6559
- * A list this side cannot read is dropped rather than failing the binding, which every call and
6560
- * the customer-facing rule read: the next tool sync records it again.
6561
- */
6562
- files: external_exports.array(toolsetFileToolSchema).optional().catch(void 0)
6563
- });
6564
- toolsetConnectionBindingSchema = external_exports.object({
6565
- base_id: external_exports.string().min(1),
6566
- /** The slug the token was resolved against — `settings.toolset` at that write. */
6567
- toolset: external_exports.string().min(1),
6568
- /** The base's incarnation when the token was written; a bound attested call states it. */
6569
- base_generation: external_exports.number().int().min(1),
6570
- environment: baseEnvironmentSchema,
6571
- surface: toolsetSurfaceSchema,
6572
- /**
6573
- * The id of the token the binding was resolved from, as its resolve reports it; a bound attested
6574
- * call names it (`REKOR_BOUND_TOKEN_HEADER`), so the data product refuses the binding once the token
6575
- * is revoked or expires (owner decision 41). Absent on a binding recorded before the report carried
6576
- * it: its calls name none until a token save, or a tool sync while the token still stands, records it.
6577
- * One that does not read is dropped rather than failing the binding.
6578
- */
6579
- token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
6580
- });
6581
- rekorToolsetToolsSchema = external_exports.object({
6582
- data: external_exports.object({
6583
- tools: external_exports.array(external_exports.object({
6584
- name: external_exports.string(),
6585
- description: external_exports.string().optional(),
6586
- inputSchema: external_exports.record(external_exports.unknown()).optional()
6587
- }))
6588
- })
6589
- });
6590
- rekorBoundAttestation = rekorAttestation.extend({
6591
- [REKOR_ACTOR_TYPE_HEADER]: external_exports.literal("token"),
6592
- /** Trimmed and checked as the far side trims and checks it. */
6593
- [REKOR_ACTOR_ID_HEADER]: external_exports.string().trim().min(1).max(REKOR_MAX_ACTOR_ID_LENGTH),
6594
- [REKOR_ACTOR_LABEL_HEADER]: external_exports.string().max(REKOR_MAX_ACTOR_LABEL_LENGTH),
6595
- [REKOR_ACTOR_ADMIN_HEADER]: external_exports.literal("0"),
6596
- [REKOR_BOUND_BASE_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
6597
- [REKOR_BOUND_TOOLSET_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
6598
- /**
6599
- * Decimal digits only, as the far side parses it, and at most 15 of them: its `Number()` reads
6600
- * every such value back exactly, where a longer one may round or overflow to `Infinity` (a 400).
6601
- */
6602
- [DATA_BASE_GENERATION_HEADER]: external_exports.string().regex(/^[1-9]\d{0,14}$/),
6603
- /** The token the binding was resolved from, when the connection records it (owner decision 41). */
6604
- [REKOR_BOUND_TOKEN_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional(),
6605
- /**
6606
- * The customer the call serves (#5083 RK2): a contact id, which the contact book mints as a UUID.
6607
- * Every UUID is an id the far side reads back as the customer's external id.
6608
- */
6609
- [REKOR_BOUND_CUSTOMER_HEADER]: external_exports.string().uuid().optional()
6610
- });
6611
- rekorResolvedToolsetSchema = external_exports.object({
6612
- data: external_exports.object({
6613
- base_id: external_exports.string().min(1),
6614
- environment: baseEnvironmentSchema,
6615
- base_generation: external_exports.number().int().min(1),
6616
- /**
6617
- * The calling token's binding, or null for a token bound to none. A bound token can call only
6618
- * its toolset's tools, which is what a toolset connection stores (#5083 decision 14). Its org
6619
- * is the token's own: base ids are unique only per org, so the base id alone does not say
6620
- * which base the token reaches.
6621
- */
6622
- toolset_binding: external_exports.object({
6623
- org_id: external_exports.string().optional(),
6624
- base_id: external_exports.string(),
6625
- toolset_id: external_exports.string(),
6626
- /**
6627
- * The token's own id, which a bound call names (`REKOR_BOUND_TOKEN_HEADER`); absent when the
6628
- * caller has none (owner decision 41), and dropped when it is not an id the far side reads back.
6629
- */
6630
- token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
6631
- }).nullable().optional(),
6632
- actions: external_exports.array(external_exports.unknown()).optional(),
6633
- composites: external_exports.array(external_exports.unknown()).optional(),
6634
- relationships: external_exports.array(external_exports.unknown()).optional(),
6635
- /**
6636
- * The toolset's SQL Actions (#5311): each a fixed, read-only query over the record types it
6637
- * declares, which the resolve also carries in `record_types` and `record_type_scopes`.
6638
- */
6639
- sql_actions: external_exports.array(external_exports.unknown()).optional(),
6640
- files: external_exports.array(external_exports.unknown()).optional(),
6641
- batch: external_exports.object({ enabled: external_exports.boolean().optional() }).passthrough().nullable().optional(),
6642
- sql_query: external_exports.boolean().optional(),
6643
- /** The toolset serves one customer per call (#5083 RK2). Absent reads as not scoped. */
6644
- customer_scope: external_exports.boolean().optional(),
6645
- /**
6646
- * Record types the toolset reaches, by id, as the data product stores them (`json_schema`
6647
- * included): each one its actions, composite record steps and SQL Actions reach, and each reviewed one it
6648
- * reaches otherwise (relationship ends, `batch` entries, every one through `sql_query`; #5083
6649
- * decision 198). An unreviewed type it reaches only otherwise is not here. A reviewed type's
6650
- * `x-review` names its writers (RK4).
6651
- */
6652
- record_types: external_exports.record(external_exports.unknown()).optional(),
6653
- /**
6654
- * What each record type the toolset's actions, composite steps, SQL Actions and relationship tools reach is to a
6655
- * customer scope (`{ role }`, or null), by id (#5083 RK2). A reviewed type `record_types` carries
6656
- * because only a `batch` entry or `sql_query` reaches it has none.
6657
- */
6658
- record_type_scopes: external_exports.record(external_exports.unknown()).optional()
6659
- }).passthrough()
6660
- });
6661
- resolvedRecordTypeSchema = external_exports.object({ json_schema: external_exports.record(external_exports.unknown()) });
6662
- reviewWritersSchema = external_exports.object({ writers: external_exports.array(external_exports.string()).optional() });
6663
- sharedScopeSchema = external_exports.object({ role: external_exports.literal("shared") });
6664
- resolvedFileToolSchema = external_exports.object({
6665
- file_type: external_exports.string().min(1),
6666
- path_prefix: external_exports.string().nullish(),
6667
- operations: external_exports.array(external_exports.unknown()),
6668
- name: external_exports.unknown().optional(),
6669
- names: external_exports.unknown().optional(),
6670
- description_override: external_exports.unknown().optional()
6671
- });
6672
- rekorToolsetFileSchema = external_exports.object({
6673
- path: external_exports.string().min(1),
6674
- version: external_exports.number().int().min(1),
6675
- content_type: external_exports.string().optional()
6676
- }).passthrough();
6677
- rekorToolsetFileUrlAnswerSchema = external_exports.object({
6678
- data: external_exports.object({
6679
- url: external_exports.string(),
6680
- expires_at: external_exports.string(),
6681
- path: external_exports.string(),
6682
- content_sha256: external_exports.string()
6683
- }).passthrough()
6684
- });
6685
- rekorToolsetFileListSchema = external_exports.object({ data: external_exports.array(rekorToolsetFileSchema) });
6686
- rekorToolsetFileGetSchema = external_exports.object({
6687
- data: rekorToolsetFileSchema.extend({
6688
- content: external_exports.string(),
6689
- encoding: external_exports.enum(["utf-8", "base64"])
6860
+ next_cursor: external_exports.string().nullable(),
6861
+ /** Files the page created or replaced on the preview. */
6862
+ written: external_exports.number().int(),
6863
+ /** The preview's own files, ones production does not hold, the page removed. */
6864
+ removed: external_exports.number().int(),
6865
+ /** Files the page found already equal to production's. */
6866
+ unchanged: external_exports.number().int()
6690
6867
  })
6691
6868
  });
6692
- rekorToolsetFilePutSchema = external_exports.object({ data: rekorToolsetFileSchema });
6693
- 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";
6694
- 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`;
6869
+ FILE_SNAPSHOT_MAX_PAGES = 1e4;
6870
+ FILE_SNAPSHOT_CONFLICT_ATTEMPTS = 3;
6871
+ FILE_SNAPSHOT_PAGE_SPACING_MS = Math.ceil(
6872
+ 6e4 / Math.max(1, Math.floor((getEndpointConfig(`${DATA_PROXY_PREFIX}/files/snapshot`)?.userLimit ?? 60) * 4 / 5))
6873
+ );
6874
+ FILE_SNAPSHOT_CONFLICT_STATUS = 409;
6695
6875
  }
6696
6876
  });
6697
6877
 
6698
- // ../../packages/core/dist/chunk-IPDOHAZ5.js
6699
- var reportSourceSchema, intakeReportSourceSchema, reportClassificationSchema, reportStatusSchema, reportLocaleSchema, reportMessageAuthorRoleSchema, reportMessageSchema, sentryRefStatusSchema, createReportBody, editReportBody, reporterReportSummarySchema, reporterListResponseSchema, getReportResponseSchema, reporterTransitionResponseSchema, contestReportBody, reporterListQuery, listReportsQuery, GITHUB_ISSUE_URL_REGEX, githubIssueUrlSchema, transitionReportBody, groupReportsBody, holdReportBody;
6700
- var init_chunk_IPDOHAZ5 = __esm({
6701
- "../../packages/core/dist/chunk-IPDOHAZ5.js"() {
6878
+ // ../../packages/core/dist/chunk-SY6PLCPK.js
6879
+ var jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse;
6880
+ var init_chunk_SY6PLCPK = __esm({
6881
+ "../../packages/core/dist/chunk-SY6PLCPK.js"() {
6702
6882
  "use strict";
6703
- init_chunk_HZ6CADSY();
6883
+ init_chunk_6TSQ5HXC();
6704
6884
  init_zod();
6705
- reportSourceSchema = external_exports.enum(["sentry", "cli", "review", "security_audit"]);
6706
- intakeReportSourceSchema = external_exports.enum(["cli", "review", "security_audit"]);
6707
- reportClassificationSchema = external_exports.enum(["bug", "flaky_test", "security", "enhancement"]);
6708
- reportStatusSchema = external_exports.enum([
6709
- "pending",
6710
- "grouped",
6711
- "escalated",
6712
- "shipped",
6713
- "contested",
6714
- "addressed",
6715
- "dismissed"
6716
- ]);
6717
- reportLocaleSchema = external_exports.enum(["en", "pt", "es"]);
6718
- reportMessageAuthorRoleSchema = external_exports.enum(["reporter", "triage", "fixer", "system"]);
6719
- reportMessageSchema = external_exports.object({
6720
- message_id: external_exports.string(),
6721
- author_role: reportMessageAuthorRoleSchema,
6722
- /** The status transition this note accompanied (e.g. 'shipped'); null for a free/system note. */
6723
- transition: external_exports.string().nullable(),
6724
- body: external_exports.string(),
6725
- created_at: timestampSchema,
6726
- /**
6727
- * Visibility: `false` = reporter-facing (the default for every narrative entry); `true` =
6728
- * triage-internal (e.g. a `hold` rationale) — surfaced to platform admins only and NEVER
6729
- * returned on the reporter read path. The reporter's `GET /api/reports/:id` filters these out.
6730
- */
6731
- internal: external_exports.boolean()
6732
- });
6733
- sentryRefStatusSchema = external_exports.enum(["valid", "not_found", "mismatch", "unverified"]);
6734
- createReportBody = external_exports.object({
6735
- title: external_exports.string().min(5).max(256),
6736
- description: external_exports.string().min(10).max(5e3),
6737
- steps_to_reproduce: external_exports.string().max(3e3).optional(),
6738
- error_message: external_exports.string().max(2e3).optional(),
6739
- // Taxonomy (server defaults: source=cli, classification=bug when absent).
6740
- source: intakeReportSourceSchema.optional(),
6741
- classification: reportClassificationSchema.optional(),
6742
- // Stable dedup key (e.g. "<file>::<test>" for flaky, "<file>:<line>" for
6743
- // security). When present, the fingerprint uses it instead of the body hash.
6744
- dedup_key: external_exports.string().min(1).max(256).optional(),
6745
- // Context fields (auto-captured by the CLI)
6746
- organization_id: external_exports.string().optional(),
6747
- hub_id: external_exports.string().uuid().optional(),
6748
- hub_name: external_exports.string().max(256).optional(),
6749
- conversation_id: external_exports.string().uuid().optional(),
6750
- agent_id: external_exports.string().uuid().optional(),
6751
- agent_name: external_exports.string().max(256).optional(),
6752
- client_version: external_exports.string().max(64).optional(),
6753
- additional_context: external_exports.string().max(2e3).optional()
6754
- });
6755
- editReportBody = external_exports.object({
6756
- title: external_exports.string().min(5).max(256).optional(),
6757
- description: external_exports.string().min(10).max(5e3).optional(),
6758
- steps_to_reproduce: external_exports.string().max(3e3).optional(),
6759
- error_message: external_exports.string().max(2e3).optional(),
6760
- additional_context: external_exports.string().max(2e3).optional()
6761
- }).strict().refine((b) => Object.keys(b).length > 0, {
6762
- message: "at least one field must be provided"
6763
- });
6764
- reporterReportSummarySchema = external_exports.object({
6765
- report_id: external_exports.string(),
6766
- title: external_exports.string(),
6767
- description: external_exports.string(),
6768
- classification: reportClassificationSchema,
6769
- status: reportStatusSchema,
6770
- created_at: timestampSchema,
6771
- triaged_at: timestampSchema.nullable(),
6772
- resolved_at: timestampSchema.nullable(),
6773
- /** How many times the reporter has contested (gates the hard cap). */
6774
- contest_count: external_exports.number(),
6775
- /** True once triage issued a non-contestable (final) dismissal. */
6776
- dismissal_final: external_exports.boolean()
6777
- });
6778
- reporterListResponseSchema = external_exports.object({
6779
- data: external_exports.array(reporterReportSummarySchema)
6780
- });
6781
- getReportResponseSchema = external_exports.object({
6782
- report: reporterReportSummarySchema,
6783
- messages: external_exports.array(reportMessageSchema)
6885
+ jsonSchemaSchema = external_exports.record(external_exports.unknown());
6886
+ hubUserIdentity = external_exports.object({
6887
+ user_id: external_exports.string().nullable(),
6888
+ user_name: external_exports.string().nullable(),
6889
+ user_email: external_exports.string().nullable(),
6890
+ user_name_locked: external_exports.boolean(),
6891
+ created_at: external_exports.string(),
6892
+ updated_at: external_exports.string().nullable(),
6893
+ hub_user_id: external_exports.string().optional(),
6894
+ enabled: external_exports.boolean().optional(),
6895
+ hub_team_id: external_exports.string().nullable().optional(),
6896
+ source: external_exports.enum(["grant", "auto"]).optional()
6784
6897
  });
6785
- reporterTransitionResponseSchema = external_exports.object({
6786
- report: reporterReportSummarySchema
6898
+ stateValueEntry = external_exports.object({
6899
+ state_slug: external_exports.string(),
6900
+ state_name: external_exports.string(),
6901
+ state_description: external_exports.string().nullable().optional(),
6902
+ scope: external_exports.enum(["user", "conversation"]),
6903
+ json_schema: jsonSchemaSchema,
6904
+ initial_value: external_exports.unknown(),
6905
+ value: external_exports.unknown(),
6906
+ is_reserved: external_exports.boolean()
6787
6907
  });
6788
- contestReportBody = external_exports.object({
6789
- reason: external_exports.string().min(1).max(5e3)
6908
+ getHubUserContextResponse = external_exports.object({
6909
+ user: hubUserIdentity,
6910
+ user_states: external_exports.array(stateValueEntry),
6911
+ conversation_states: external_exports.array(stateValueEntry)
6790
6912
  });
6791
- reporterListQuery = external_exports.object({
6792
- status: reportStatusSchema.optional()
6913
+ updateHubUserBody = external_exports.object({
6914
+ // Non-empty, non-null. `.nullable()` here would bypass `.min(1)` and let an
6915
+ // admin arm the lock on a null name — see hub-do.ts updateHubUser null-guard.
6916
+ user_name: external_exports.string().min(1).max(120)
6793
6917
  });
6794
- listReportsQuery = external_exports.object({
6795
- status: reportStatusSchema.optional(),
6796
- source: reportSourceSchema.optional(),
6797
- limit: external_exports.coerce.number().int().min(1).max(200).optional(),
6798
- offset: external_exports.coerce.number().int().min(0).optional(),
6799
- /** ISO 8601 lower bound on created_at. */
6800
- since: external_exports.string().datetime().optional(),
6801
- /**
6802
- * ISO 8601 lower bound on resolution time — "what did we resolve recently", which `since`
6803
- * (a created_at filter) cannot answer for a long-lived report resolved yesterday. Implies
6804
- * a terminal status (`addressed`/`dismissed`) and orders on that same axis.
6805
- */
6806
- resolved_since: external_exports.string().datetime().optional()
6918
+ updateHubUserResponse = external_exports.object({
6919
+ user: hubUserIdentity
6807
6920
  });
6808
- GITHUB_ISSUE_URL_REGEX = /^https:\/\/github\.com\/[^/]+\/[^/]+\/issues\/\d+(?:[/?#]|$)/;
6809
- githubIssueUrlSchema = external_exports.string().url().refine((u) => GITHUB_ISSUE_URL_REGEX.test(u), {
6810
- message: "must be an https://github.com/<owner>/<repo>/issues/<number> URL"
6921
+ unlockHubUserNameResponse = external_exports.object({
6922
+ user: hubUserIdentity
6811
6923
  });
6812
- transitionReportBody = external_exports.discriminatedUnion("target", [
6813
- external_exports.object({
6814
- target: external_exports.literal("escalated"),
6815
- gh_issue_url: githubIssueUrlSchema,
6816
- ai_verdict: external_exports.string().max(2e3).optional()
6817
- }),
6818
- external_exports.object({
6819
- target: external_exports.literal("shipped"),
6820
- note: external_exports.string().min(1).max(2e3).optional()
6821
- }),
6822
- external_exports.object({
6823
- target: external_exports.literal("addressed")
6824
- }),
6825
- external_exports.object({
6826
- target: external_exports.literal("dismissed"),
6827
- dismissal_reason: external_exports.string().min(1).max(5e3),
6828
- ai_verdict: external_exports.string().max(2e3).optional(),
6829
- final: external_exports.boolean().optional()
6830
- })
6831
- ]);
6832
- groupReportsBody = external_exports.object({
6833
- member_ids: external_exports.array(external_exports.string().uuid()).min(1).max(100)
6924
+ stateResetParams = external_exports.object({
6925
+ stateSlug: slugSchema
6834
6926
  });
6835
- holdReportBody = external_exports.object({
6836
- reason: external_exports.string().min(1).max(5e3)
6927
+ stateResetResponse = external_exports.object({
6928
+ ok: external_exports.literal(true)
6837
6929
  });
6838
6930
  }
6839
6931
  });
@@ -6918,41 +7010,98 @@ var init_chunk_34LE6P7E = __esm({
6918
7010
  }
6919
7011
  });
6920
7012
 
6921
- // ../../packages/core/dist/chunk-FPSDNS2E.js
6922
- var noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema;
6923
- var init_chunk_FPSDNS2E = __esm({
6924
- "../../packages/core/dist/chunk-FPSDNS2E.js"() {
7013
+ // ../../packages/core/dist/chunk-LKBSHANA.js
7014
+ var DESKTOP_SHELL_VERSION_RE, DESKTOP_PLATFORMS, DESKTOP_FLAVORS, desktopShellInfoSchema, DESKTOP_PRESENCE_STATES, desktopPresenceSchema, desktopUpdateSchema, DESKTOP_SIGN_IN_URL_MAX_LENGTH, DESKTOP_APP_PATH_MAX_LENGTH, desktopAppPathSchema, DESKTOP_NOTIFICATION_KINDS, DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH, DESKTOP_NOTIFICATION_BODY_MAX_LENGTH, notificationTitleSchema, notificationBodySchema, desktopNotificationSchema, DESKTOP_BADGE_MAX_COUNT, DESKTOP_BADGE_LABEL_MAX_LENGTH, desktopBadgeSchema, desktopNavigateSchema, desktopSettingsSchema, desktopSettingsChangeSchema, desktopBridgeArgsSchemas;
7015
+ var init_chunk_LKBSHANA = __esm({
7016
+ "../../packages/core/dist/chunk-LKBSHANA.js"() {
6925
7017
  "use strict";
6926
7018
  init_zod();
6927
- noticeSeveritySchema = external_exports.enum(["critical", "warn", "info"]);
6928
- noticeStatusSchema = external_exports.enum(["active", "resolved"]);
6929
- NOTICE_SCOPE_REGEX = /^(global|provider:[a-z0-9_-]{1,40}|service:[a-z0-9_-]{1,40})$/;
6930
- noticeScopeSchema = external_exports.string().regex(NOTICE_SCOPE_REGEX, "scope must be 'global', 'provider:<x>', or 'service:<x>'");
6931
- noticeLinkSchema = external_exports.string().url().refine((u) => /^https?:\/\//i.test(u), { message: "link must be an http(s) URL" });
6932
- createNoticeBody = external_exports.object({
6933
- severity: noticeSeveritySchema.default("info"),
6934
- scope: noticeScopeSchema.default("global"),
6935
- title: external_exports.string().trim().min(1).max(200),
6936
- body: external_exports.string().max(2e3).optional(),
6937
- link: noticeLinkSchema.optional(),
6938
- starts_at: external_exports.string().datetime().optional(),
6939
- ends_at: external_exports.string().datetime().optional()
7019
+ DESKTOP_SHELL_VERSION_RE = /^(0|[1-9]\d{0,5})\.(0|[1-9]\d{0,5})\.(0|[1-9]\d{0,5})(-[0-9A-Za-z.-]{1,32})?$/;
7020
+ DESKTOP_PLATFORMS = ["darwin", "win32"];
7021
+ DESKTOP_FLAVORS = ["production", "development"];
7022
+ desktopShellInfoSchema = external_exports.object({
7023
+ /** The shell's own release version, independent of the web deploy. */
7024
+ shellVersion: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
7025
+ /** The Electron runtime the shell was built with. */
7026
+ electronVersion: external_exports.string().regex(/^\d{1,4}\.\d{1,4}\.\d{1,4}(-[0-9A-Za-z.-]{1,32})?$/),
7027
+ platform: external_exports.enum(DESKTOP_PLATFORMS),
7028
+ /** CPU architecture as Node reports it (`arm64`, `x64`). */
7029
+ arch: external_exports.string().regex(/^[a-z0-9_]{1,16}$/),
7030
+ flavor: external_exports.enum(DESKTOP_FLAVORS),
7031
+ /**
7032
+ * Present, and true, when the shell runs from the Microsoft Store's package: the Store updates it,
7033
+ * and Windows alone opens it at login (the package's startup task, which the person turns on in
7034
+ * Windows' settings). An optional field, so no new `bridgeVersion`: an older page ignores it, and
7035
+ * its absence is every other shell.
7036
+ */
7037
+ store: external_exports.literal(true).optional()
7038
+ });
7039
+ DESKTOP_PRESENCE_STATES = ["present", "away"];
7040
+ desktopPresenceSchema = external_exports.object({
7041
+ presence: external_exports.enum(DESKTOP_PRESENCE_STATES),
7042
+ mainWindow: external_exports.object({
7043
+ shown: external_exports.boolean(),
7044
+ focused: external_exports.boolean()
7045
+ })
7046
+ });
7047
+ desktopUpdateSchema = external_exports.object({
7048
+ ready: external_exports.object({
7049
+ version: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
7050
+ offerRestart: external_exports.boolean()
7051
+ }).nullable()
7052
+ });
7053
+ DESKTOP_SIGN_IN_URL_MAX_LENGTH = 4096;
7054
+ DESKTOP_APP_PATH_MAX_LENGTH = 512;
7055
+ desktopAppPathSchema = external_exports.string().max(DESKTOP_APP_PATH_MAX_LENGTH).regex(/^\/(?![/\\])[^\s\\]*$/);
7056
+ DESKTOP_NOTIFICATION_KINDS = ["handoff", "message", "summary"];
7057
+ DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH = 200;
7058
+ DESKTOP_NOTIFICATION_BODY_MAX_LENGTH = 500;
7059
+ notificationTitleSchema = external_exports.string().min(1).max(DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH);
7060
+ notificationBodySchema = external_exports.string().max(DESKTOP_NOTIFICATION_BODY_MAX_LENGTH);
7061
+ desktopNotificationSchema = external_exports.object({
7062
+ kind: external_exports.enum(DESKTOP_NOTIFICATION_KINDS),
7063
+ title: notificationTitleSchema,
7064
+ body: notificationBodySchema,
7065
+ path: desktopAppPathSchema,
7066
+ withoutPreview: external_exports.object({ title: notificationTitleSchema, body: notificationBodySchema }).optional()
6940
7067
  });
6941
- updateNoticeBody = external_exports.object({
6942
- severity: noticeSeveritySchema.optional(),
6943
- scope: noticeScopeSchema.optional(),
6944
- title: external_exports.string().trim().min(1).max(200).optional(),
6945
- body: external_exports.string().max(2e3).nullable().optional(),
6946
- link: noticeLinkSchema.nullable().optional(),
6947
- starts_at: external_exports.string().datetime().optional(),
6948
- ends_at: external_exports.string().datetime().nullable().optional()
6949
- }).refine((b) => Object.keys(b).length > 0, { message: "at least one field must be provided" });
6950
- listNoticesQuery = external_exports.object({
6951
- status: noticeStatusSchema.optional(),
6952
- limit: external_exports.coerce.number().int().min(1).max(200).optional(),
6953
- offset: external_exports.coerce.number().int().min(0).optional()
7068
+ DESKTOP_BADGE_MAX_COUNT = 1e6;
7069
+ DESKTOP_BADGE_LABEL_MAX_LENGTH = 200;
7070
+ desktopBadgeSchema = external_exports.object({
7071
+ count: external_exports.number().int().min(0).max(DESKTOP_BADGE_MAX_COUNT),
7072
+ label: external_exports.string().max(DESKTOP_BADGE_LABEL_MAX_LENGTH)
6954
7073
  });
6955
- noticeIdParamSchema = external_exports.object({ id: external_exports.string().min(1) });
7074
+ desktopNavigateSchema = external_exports.object({
7075
+ path: desktopAppPathSchema
7076
+ });
7077
+ desktopSettingsSchema = external_exports.object({
7078
+ /** The app opens when the person logs in to the computer: the operating system's own login item. */
7079
+ openAtLogin: external_exports.boolean(),
7080
+ /** Closing the window keeps the app running in the tray (true), or quits it (false). */
7081
+ closeToTray: external_exports.boolean(),
7082
+ /** The shell shows notifications (true), or none (false). The badge is not a notification. */
7083
+ notifications: external_exports.boolean(),
7084
+ /**
7085
+ * A customer message's notification shows the customer's name and words, where the platform
7086
+ * allows them at all (`desktopShowsCustomerWords`: macOS); elsewhere the shell never shows them.
7087
+ */
7088
+ messagePreview: external_exports.boolean()
7089
+ });
7090
+ desktopSettingsChangeSchema = desktopSettingsSchema.partial().strict().refine((change) => Object.values(change).every((value) => typeof value === "boolean"), {
7091
+ message: "each setting changed is true or false"
7092
+ });
7093
+ desktopBridgeArgsSchemas = {
7094
+ getShellInfo: external_exports.tuple([]),
7095
+ getPresence: external_exports.tuple([]),
7096
+ openSignIn: external_exports.tuple([external_exports.string().max(DESKTOP_SIGN_IN_URL_MAX_LENGTH)]),
7097
+ getUpdate: external_exports.tuple([]),
7098
+ restartToUpdate: external_exports.tuple([]),
7099
+ notify: external_exports.tuple([desktopNotificationSchema]),
7100
+ setBadge: external_exports.tuple([desktopBadgeSchema]),
7101
+ clearAll: external_exports.tuple([]),
7102
+ getSettings: external_exports.tuple([]),
7103
+ setSettings: external_exports.tuple([desktopSettingsChangeSchema])
7104
+ };
6956
7105
  }
6957
7106
  });
6958
7107
 
@@ -7111,16 +7260,16 @@ var init_chunk_E4DIIOOE = __esm({
7111
7260
  }
7112
7261
  });
7113
7262
 
7114
- // ../../packages/core/dist/chunk-A4JC7DXB.js
7263
+ // ../../packages/core/dist/chunk-7FHLACC7.js
7115
7264
  var GIT_CHECKOUT_MAX_LENGTH;
7116
- var init_chunk_A4JC7DXB = __esm({
7117
- "../../packages/core/dist/chunk-A4JC7DXB.js"() {
7265
+ var init_chunk_7FHLACC7 = __esm({
7266
+ "../../packages/core/dist/chunk-7FHLACC7.js"() {
7118
7267
  "use strict";
7119
7268
  GIT_CHECKOUT_MAX_LENGTH = 255;
7120
7269
  }
7121
7270
  });
7122
7271
 
7123
- // ../../packages/core/dist/chunk-VMAX5YRT.js
7272
+ // ../../packages/core/dist/chunk-ILGGO4PT.js
7124
7273
  function spokenLineField(label, description2) {
7125
7274
  return { type: "text", label, maxLength: SPOKEN_LINE_MAX_CHARS, default: "", description: description2 };
7126
7275
  }
@@ -7129,11 +7278,11 @@ function byLowercaseName(a, b) {
7129
7278
  const y = b.connector_name.toLowerCase();
7130
7279
  return x < y ? -1 : x > y ? 1 : 0;
7131
7280
  }
7132
- var CALLER_LANGUAGE, TTS_VOICE_REPLY_ENABLED_FIELD, COPILOT_TRIGGER_FIELD, SANDBOX_AGENT_FIELDS, AUDIO_LANGUAGE_OPTIONS, whatsapp, instagram, resend, telegram, API_CHANNEL_DELIVERY_EVENTS, apiChannel, OPENAI_REASONING_MODELS, openai, anthropic, googleAiStudio, openRouter, xai, groqStt, openaiStt, elevenLabsStt, openaiTts, groqTts, elevenLabsTts, GEMINI_TTS_VOICES, googleTts, wayai, externalResources, restApiTool, mcpServer, REKOR_TOOLSET_SERVICE_NAME, rekorToolset, CLAUDE_HARNESS_MODELS, CLAUDE_HARNESS_MODEL_OPTIONS, HARNESS_MCP_SERVERS_FIELD, HARNESS_EGRESS_FIELDS, claudeManagedAgents, SPOKEN_LINE_MAX_CHARS, gptLive, CONNECTORS;
7133
- var init_chunk_VMAX5YRT = __esm({
7134
- "../../packages/core/dist/chunk-VMAX5YRT.js"() {
7281
+ var CALLER_LANGUAGE, TTS_VOICE_REPLY_ENABLED_FIELD, COPILOT_TRIGGER_FIELD, SANDBOX_AGENT_FIELDS, AUDIO_LANGUAGE_OPTIONS, whatsapp, instagram, resend, telegram, API_CHANNEL_DELIVERY_EVENTS, apiChannel, OPENAI_REASONING_MODELS, openai, anthropic, googleAiStudio, openRouter, xai, groqStt, openaiStt, elevenLabsStt, openaiTts, groqTts, elevenLabsTts, GEMINI_TTS_VOICES, googleTts, wayai, externalResources, restApiTool, mcpServer, REKOR_TOOLSET_SERVICE_NAME, rekorToolset, CLAUDE_HARNESS_MODELS, CLAUDE_HARNESS_MODEL_OPTIONS, HARNESS_EGRESS_FIELDS, claudeManagedAgents, SPOKEN_LINE_MAX_CHARS, gptLive, CONNECTORS;
7282
+ var init_chunk_ILGGO4PT = __esm({
7283
+ "../../packages/core/dist/chunk-ILGGO4PT.js"() {
7135
7284
  "use strict";
7136
- init_chunk_A4JC7DXB();
7285
+ init_chunk_7FHLACC7();
7137
7286
  CALLER_LANGUAGE = "caller";
7138
7287
  TTS_VOICE_REPLY_ENABLED_FIELD = {
7139
7288
  voice_reply_enabled: {
@@ -7912,6 +8061,17 @@ var init_chunk_VMAX5YRT = __esm({
7912
8061
  default: 6e4,
7913
8062
  min: 0,
7914
8063
  description: "How long to cache this server's tool schemas before re-fetching at turn time. 0 = always fetch fresh every turn (highest latency). The server's own freshness hint overrides this when present."
8064
+ },
8065
+ // wayai-pro/wayai#5083 owner decision 35, exception 1: a hosted agent's vendor calls this
8066
+ // server itself, outside WayAI's tool plane, instead of WayAI running its tools as custom
8067
+ // tools. Only for a server that holds no credential: refused at write otherwise
8068
+ // (`VENDOR_DIRECT_CREDENTIAL_REFUSAL`), and dropped at launch should one appear. Native
8069
+ // agents never read it. The web shows its label and description in the viewer's language.
8070
+ vendor_direct: {
8071
+ type: "toggle",
8072
+ label: "Called by the vendor directly",
8073
+ default: false,
8074
+ description: "Hosted agents (Claude Agent (Managed)) only: the vendor calls this server itself, for its own MCP features and less latency, instead of WayAI running its tools. Only for a server that needs no credential: no token, no OAuth and no custom headers."
7915
8075
  }
7916
8076
  },
7917
8077
  agent_settings_schema: null,
@@ -7967,9 +8127,6 @@ var init_chunk_VMAX5YRT = __esm({
7967
8127
  };
7968
8128
  CLAUDE_HARNESS_MODELS = ["claude-opus-5-5", "claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-5", "claude-sonnet-4-6", "claude-haiku-4-5"];
7969
8129
  CLAUDE_HARNESS_MODEL_OPTIONS = [{ value: "claude-opus-5-5", label: "Claude Opus 5.5" }, { value: "claude-opus-4-8", label: "Claude Opus 4.8" }, { value: "claude-opus-4-7", label: "Claude Opus 4.7" }, { value: "claude-sonnet-5", label: "Claude Sonnet 5" }, { value: "claude-sonnet-4-6", label: "Claude Sonnet 4.6" }, { value: "claude-haiku-4-5", label: "Claude Haiku 4.5" }];
7970
- HARNESS_MCP_SERVERS_FIELD = {
7971
- mcp_servers: { type: "array", itemType: "text", maxItems: 32, label: "MCP Servers", description: "MCP server connection IDs (on this hub) the agent may call from inside the sandbox." }
7972
- };
7973
8130
  HARNESS_EGRESS_FIELDS = {
7974
8131
  network_egress_policy: { type: "select", label: "Network Egress", options: [{ value: "allowlist", label: "Allowlist (deny-all unless listed)" }, { value: "isolated", label: "Isolated (control host only)" }, { value: "open", label: "Open (internet)" }], default: "allowlist", description: "Sandbox egress posture. Empty allowlist \u21D2 deny-all." },
7975
8132
  network_egress_allowlist: { type: "array", itemType: "text", maxItems: 64, label: "Egress Allowlist", description: "Hosts reachable under Allowlist, or the single control host under Isolated. Ignored under Open." }
@@ -7992,9 +8149,8 @@ var init_chunk_VMAX5YRT = __esm({
7992
8149
  connector_settings_schema: null,
7993
8150
  agent_settings_schema: {
7994
8151
  model: { type: "select", label: "Model", allowCustomValue: true, options: CLAUDE_HARNESS_MODEL_OPTIONS, default: "claude-sonnet-5", description: "Claude model the Anthropic-hosted managed agent loop drives.", required: true },
7995
- ...HARNESS_MCP_SERVERS_FIELD,
7996
8152
  // The managed session is conversation-lifetime and is NOT reaped at this deadline.
7997
- max_session_minutes: { type: "number", label: "Max Turn (minutes)", min: 1, max: 480, default: 60, description: "Hard cap on a single turn's drain wall-clock, and the bound on the per-turn harness token TTL. The managed session itself lives for the conversation \u2014 it is not reaped at this deadline." },
8153
+ max_session_minutes: { type: "number", label: "Max Turn (minutes)", min: 1, max: 480, default: 60, description: "Hard cap on a single turn's drain wall-clock. The managed session itself lives for the conversation \u2014 it is not reaped at this deadline." },
7998
8154
  ...HARNESS_EGRESS_FIELDS,
7999
8155
  repo_url: { type: "text", label: "Repository URL", description: "Optional GitHub repository (https://github.com/<owner>/<repo>) cloned into the managed workspace at session start. Needs the connection's GitHub App installed on it." },
8000
8156
  // The vendor's `checkout` on the session's `github_repository` resource (a branch, or a
@@ -8098,13 +8254,13 @@ var init_chunk_VMAX5YRT = __esm({
8098
8254
  }
8099
8255
  });
8100
8256
 
8101
- // ../../packages/core/dist/chunk-C4TPQN6Z.js
8257
+ // ../../packages/core/dist/chunk-SGYHEHIO.js
8102
8258
  var evalCallInstant, EVAL_CALL_MIN_SECONDS, EVAL_CALL_MAX_SECONDS, EVAL_CALL_SPOKEN_LINE_MAX_CHARS, hubScoped2, createEvalCallBody, createEvalCallResponse, evalCallConversationQuery, evalCallRecordQuery, evalCallSpeaker, evalCallUtterance, evalCallTurn, evalCallRecording, evalCallRecordResponse, evalCallFinishResponse;
8103
- var init_chunk_C4TPQN6Z = __esm({
8104
- "../../packages/core/dist/chunk-C4TPQN6Z.js"() {
8259
+ var init_chunk_SGYHEHIO = __esm({
8260
+ "../../packages/core/dist/chunk-SGYHEHIO.js"() {
8105
8261
  "use strict";
8106
8262
  init_chunk_E4DIIOOE();
8107
- init_chunk_VMAX5YRT();
8263
+ init_chunk_ILGGO4PT();
8108
8264
  init_chunk_HZ6CADSY();
8109
8265
  init_chunk_MIWZOSPI();
8110
8266
  init_zod();
@@ -8328,58 +8484,72 @@ var init_chunk_EA23LSDS = __esm({
8328
8484
  }
8329
8485
  });
8330
8486
 
8331
- // ../../packages/core/dist/chunk-SY6PLCPK.js
8332
- var jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse;
8333
- var init_chunk_SY6PLCPK = __esm({
8334
- "../../packages/core/dist/chunk-SY6PLCPK.js"() {
8487
+ // ../../packages/core/dist/chunk-YULHXJ5M.js
8488
+ var COMMUNITY_LESSON_TREE_MAX_BYTES, COMMUNITY_LESSON_LINK_PROTOCOLS, COMMUNITY_LESSON_TREE_TOO_LARGE_REASON, COMMUNITY_LESSON_TREE_TOO_DEEP_REASON, COMMUNITY_LESSON_LINE_PREFIX_TOO_WIDE_REASON, LINK_SCHEME;
8489
+ var init_chunk_YULHXJ5M = __esm({
8490
+ "../../packages/core/dist/chunk-YULHXJ5M.js"() {
8491
+ "use strict";
8492
+ COMMUNITY_LESSON_TREE_MAX_BYTES = 512 * 1024;
8493
+ COMMUNITY_LESSON_LINK_PROTOCOLS = ["http", "https", "mailto"];
8494
+ COMMUNITY_LESSON_TREE_TOO_LARGE_REASON = "lesson_tree_too_large";
8495
+ COMMUNITY_LESSON_TREE_TOO_DEEP_REASON = "lesson_tree_too_deep";
8496
+ COMMUNITY_LESSON_LINE_PREFIX_TOO_WIDE_REASON = "lesson_line_prefix_too_wide";
8497
+ LINK_SCHEME = new RegExp(`^(${COMMUNITY_LESSON_LINK_PROTOCOLS.join("|")}):`, "i");
8498
+ }
8499
+ });
8500
+
8501
+ // ../../packages/core/dist/chunk-V4FRPRH5.js
8502
+ var CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS;
8503
+ var init_chunk_V4FRPRH5 = __esm({
8504
+ "../../packages/core/dist/chunk-V4FRPRH5.js"() {
8335
8505
  "use strict";
8336
- init_chunk_6TSQ5HXC();
8337
8506
  init_zod();
8338
- jsonSchemaSchema = external_exports.record(external_exports.unknown());
8339
- hubUserIdentity = external_exports.object({
8340
- user_id: external_exports.string().nullable(),
8341
- user_name: external_exports.string().nullable(),
8342
- user_email: external_exports.string().nullable(),
8343
- user_name_locked: external_exports.boolean(),
8344
- created_at: external_exports.string(),
8345
- updated_at: external_exports.string().nullable(),
8346
- hub_user_id: external_exports.string().optional(),
8347
- enabled: external_exports.boolean().optional(),
8348
- hub_team_id: external_exports.string().nullable().optional(),
8349
- source: external_exports.enum(["grant", "auto"]).optional()
8507
+ CONSULT_THREAD_STATUSES = ["open", "awaiting", "resolved", "cancelled_at_close"];
8508
+ consultThreadStatus = external_exports.enum(CONSULT_THREAD_STATUSES);
8509
+ CONSULT_THREAD_TITLE_MAX = 120;
8510
+ consultThreadTitle = external_exports.string().trim().min(1).max(CONSULT_THREAD_TITLE_MAX);
8511
+ consultThreadSummary = external_exports.object({
8512
+ consult_thread_id: external_exports.string(),
8513
+ conversation_id: external_exports.string(),
8514
+ initiator_type: external_exports.enum(["team", "agent"]),
8515
+ initiator_id: external_exports.string(),
8516
+ engaged_agent_id: external_exports.string().nullable(),
8517
+ engaged_agent_name: external_exports.string().nullable(),
8518
+ title: external_exports.string().nullable(),
8519
+ status: consultThreadStatus,
8520
+ created_at: external_exports.string()
8350
8521
  });
8351
- stateValueEntry = external_exports.object({
8352
- state_slug: external_exports.string(),
8353
- state_name: external_exports.string(),
8354
- state_description: external_exports.string().nullable().optional(),
8355
- scope: external_exports.enum(["user", "conversation"]),
8356
- json_schema: jsonSchemaSchema,
8357
- initial_value: external_exports.unknown(),
8358
- value: external_exports.unknown(),
8359
- is_reserved: external_exports.boolean()
8522
+ listConsultThreadsQuery = external_exports.object({
8523
+ hub_id: external_exports.string().uuid()
8360
8524
  });
8361
- getHubUserContextResponse = external_exports.object({
8362
- user: hubUserIdentity,
8363
- user_states: external_exports.array(stateValueEntry),
8364
- conversation_states: external_exports.array(stateValueEntry)
8525
+ listConsultThreadsResponse = external_exports.object({
8526
+ threads: external_exports.array(consultThreadSummary)
8365
8527
  });
8366
- updateHubUserBody = external_exports.object({
8367
- // Non-empty, non-null. `.nullable()` here would bypass `.min(1)` and let an
8368
- // admin arm the lock on a null name — see hub-do.ts updateHubUser null-guard.
8369
- user_name: external_exports.string().min(1).max(120)
8528
+ createConsultThreadBody = external_exports.object({
8529
+ hub_id: external_exports.string().uuid(),
8530
+ title: consultThreadTitle.optional(),
8531
+ // Optionally engage a consultant on creation. Validated server-side against the
8532
+ // hub's `consultant`-role agents; a non-consultant / unknown id is rejected.
8533
+ engaged_agent_id: external_exports.string().uuid().optional()
8370
8534
  });
8371
- updateHubUserResponse = external_exports.object({
8372
- user: hubUserIdentity
8535
+ createConsultThreadResponse = external_exports.object({
8536
+ thread: consultThreadSummary
8373
8537
  });
8374
- unlockHubUserNameResponse = external_exports.object({
8375
- user: hubUserIdentity
8538
+ consultThreadIdParam = external_exports.object({
8539
+ id: external_exports.string().uuid(),
8540
+ threadId: external_exports.string().uuid()
8376
8541
  });
8377
- stateResetParams = external_exports.object({
8378
- stateSlug: slugSchema
8542
+ updateConsultThreadBody = external_exports.object({
8543
+ hub_id: external_exports.string().uuid(),
8544
+ title: consultThreadTitle.optional(),
8545
+ engaged_agent_id: external_exports.string().uuid().optional()
8546
+ }).refine((v) => v.title !== void 0 || v.engaged_agent_id !== void 0, {
8547
+ message: "Provide a title and/or an engaged_agent_id to update"
8379
8548
  });
8380
- stateResetResponse = external_exports.object({
8381
- ok: external_exports.literal(true)
8549
+ updateConsultThreadResponse = external_exports.object({
8550
+ thread: consultThreadSummary
8382
8551
  });
8552
+ CONSULT_AWAIT_TIMEOUT_MS = 15 * 6e4;
8383
8553
  }
8384
8554
  });
8385
8555
 
@@ -8440,17 +8610,17 @@ var init_chunk_MH4O3YEX = __esm({
8440
8610
  }
8441
8611
  });
8442
8612
 
8443
- // ../../packages/core/dist/chunk-VZTO5ZM7.js
8613
+ // ../../packages/core/dist/chunk-MHTDXCCS.js
8444
8614
  function catalogToolSideEffects(toolName) {
8445
8615
  const sideEffects = CATALOG_SIDE_EFFECTS.get(toolName);
8446
8616
  if (sideEffects === void 0) return "unknown";
8447
8617
  return sideEffects ? "side_effects" : "none";
8448
8618
  }
8449
8619
  var NATIVE_TOOL_SCHEMAS, WAYAI_CONNECTOR, SANDBOX_AGENT_ROLES, BASE_NATIVE_TOOLS, NATIVE_TOOLS, CATALOG_SIDE_EFFECTS;
8450
- var init_chunk_VZTO5ZM7 = __esm({
8451
- "../../packages/core/dist/chunk-VZTO5ZM7.js"() {
8620
+ var init_chunk_MHTDXCCS = __esm({
8621
+ "../../packages/core/dist/chunk-MHTDXCCS.js"() {
8452
8622
  "use strict";
8453
- init_chunk_DHPUPI4Y();
8623
+ init_chunk_WNLWNFHH();
8454
8624
  NATIVE_TOOL_SCHEMAS = {
8455
8625
  "close_conversation": {
8456
8626
  "tool_config": {
@@ -8763,6 +8933,44 @@ var init_chunk_VZTO5ZM7 = __esm({
8763
8933
  },
8764
8934
  "tool_instructions": "Use to change part of a document under data/: read it with read_file, then pass the exact text, its replacement and the version you read."
8765
8935
  },
8936
+ "open_pull_request": {
8937
+ "tool_config": {
8938
+ "name": "open_pull_request",
8939
+ "description": "Opens a pull request on your repository (the one you were cloned from), from a branch you pushed. Answers its number and URL.",
8940
+ "strict": false,
8941
+ "parameters": {
8942
+ "type": "object",
8943
+ "properties": {
8944
+ "head": {
8945
+ "type": "string",
8946
+ "description": "The branch you pushed, holding the changes, e.g. agent/fix-login-timeout."
8947
+ },
8948
+ "base": {
8949
+ "type": "string",
8950
+ "description": "The branch to merge into. Omit it for the branch your session started from, or the repository's default branch when it started from a commit or the default branch."
8951
+ },
8952
+ "title": {
8953
+ "type": "string",
8954
+ "description": "The pull request's title: what it changes, in one line."
8955
+ },
8956
+ "body": {
8957
+ "type": "string",
8958
+ "description": "The pull request's description: what changed and why, and how it was tested."
8959
+ },
8960
+ "draft": {
8961
+ "type": "boolean",
8962
+ "description": "Open it as a draft. Default false."
8963
+ }
8964
+ },
8965
+ "required": [
8966
+ "head",
8967
+ "title"
8968
+ ],
8969
+ "additionalProperties": false
8970
+ }
8971
+ },
8972
+ "tool_instructions": "Use once your branch is pushed, to open its pull request. Push the branch first; one branch has one open pull request."
8973
+ },
8766
8974
  // The code sandbox (wayai#5083 Phase 3). The figures in its description are the backend's
8767
8975
  // sandbox limits (`apps/backend/src/sandbox/limits.ts`), pinned there by a test, so the model is
8768
8976
  // told the limits the sandbox enforces.
@@ -9357,7 +9565,14 @@ var init_chunk_VZTO5ZM7 = __esm({
9357
9565
  // write, which is not the no-op `keyed` re-runs promise (owner decision 74). A first write of the
9358
9566
  // content the file already held kept its version, so its re-run is that same no-op.
9359
9567
  { tool_native_id: "nt-033", tool_name: "write_file", tool_display_name: "Write File", tool_description: "Create or replace a Base Toolset document under data/, with a version check", connector_id: WAYAI_CONNECTOR, operation: "write_file", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: true, replay: "reconcile", hosted: false },
9360
- { tool_native_id: "nt-034", tool_name: "edit_file", tool_display_name: "Edit File", tool_description: "Replace text in a Base Toolset document under data/, with a version check", connector_id: WAYAI_CONNECTOR, operation: "edit_file", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: true, replay: "reconcile", hosted: false }
9568
+ { tool_native_id: "nt-034", tool_name: "edit_file", tool_display_name: "Edit File", tool_description: "Replace text in a Base Toolset document under data/, with a version check", connector_id: WAYAI_CONNECTOR, operation: "edit_file", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: true, replay: "reconcile", hosted: false },
9569
+ // A hosted repository agent's pull request (wayai#5083 Phase 4, owner decision 167): opened on the
9570
+ // repository its session was launched with, through GitHub's REST API, with an installation token
9571
+ // minted for that call from its connection's own GitHub App (contents and pull requests only). The
9572
+ // model names the branch, the base, the title and the body, never the repository. Any other agent is
9573
+ // refused at the call. `reconcile`, not `keyed`: a re-run after a first run that opened it is refused by
9574
+ // GitHub (one open pull request per branch and base), never opened twice, but answers that refusal.
9575
+ { tool_native_id: "nt-035", tool_name: "open_pull_request", tool_display_name: "Open Pull Request", tool_description: "Open a pull request on a hosted repository agent's repository, from the branch it pushed", connector_id: WAYAI_CONNECTOR, operation: "open_pull_request", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: true, replay: "reconcile", hosted: true }
9361
9576
  ];
9362
9577
  NATIVE_TOOLS = BASE_NATIVE_TOOLS.map((base) => {
9363
9578
  const schema = NATIVE_TOOL_SCHEMAS[base.tool_name];
@@ -9575,7 +9790,7 @@ var init_chunk_T7KQKDET = __esm({
9575
9790
  }
9576
9791
  });
9577
9792
 
9578
- // ../../packages/core/dist/chunk-E32ZC76C.js
9793
+ // ../../packages/core/dist/chunk-2LE72ZC7.js
9579
9794
  function resolveMonitorTrigger(monitorConfig) {
9580
9795
  if (!monitorConfig || typeof monitorConfig !== "object") return "idle";
9581
9796
  const raw = monitorConfig.trigger;
@@ -9881,15 +10096,15 @@ function refineMonitorRulesStructuredOutput(body, ctx) {
9881
10096
  if (refusal2) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["response_format"], message: refusal2 });
9882
10097
  }
9883
10098
  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;
9884
- var init_chunk_E32ZC76C = __esm({
9885
- "../../packages/core/dist/chunk-E32ZC76C.js"() {
10099
+ var init_chunk_2LE72ZC7 = __esm({
10100
+ "../../packages/core/dist/chunk-2LE72ZC7.js"() {
9886
10101
  "use strict";
9887
- init_chunk_VZTO5ZM7();
10102
+ init_chunk_MHTDXCCS();
9888
10103
  init_chunk_IBL7FANV();
9889
10104
  init_chunk_HZ6CADSY();
9890
10105
  init_chunk_C2UEA2KW();
9891
10106
  init_chunk_LD6U3CDG();
9892
- init_chunk_DHPUPI4Y();
10107
+ init_chunk_WNLWNFHH();
9893
10108
  init_chunk_T7KQKDET();
9894
10109
  init_chunk_L5F7ZOUJ();
9895
10110
  init_zod();
@@ -10107,14 +10322,14 @@ var init_chunk_E32ZC76C = __esm({
10107
10322
  }
10108
10323
  });
10109
10324
 
10110
- // ../../packages/core/dist/chunk-SURLRMEK.js
10325
+ // ../../packages/core/dist/chunk-2NEZIDGC.js
10111
10326
  var conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody;
10112
- var init_chunk_SURLRMEK = __esm({
10113
- "../../packages/core/dist/chunk-SURLRMEK.js"() {
10327
+ var init_chunk_2NEZIDGC = __esm({
10328
+ "../../packages/core/dist/chunk-2NEZIDGC.js"() {
10114
10329
  "use strict";
10115
- init_chunk_E32ZC76C();
10330
+ init_chunk_2LE72ZC7();
10116
10331
  init_chunk_HZ6CADSY();
10117
- init_chunk_DHPUPI4Y();
10332
+ init_chunk_WNLWNFHH();
10118
10333
  init_zod();
10119
10334
  conversationIdParam = external_exports.object({
10120
10335
  id: external_exports.string().uuid()
@@ -10393,114 +10608,131 @@ var init_chunk_SURLRMEK = __esm({
10393
10608
  }
10394
10609
  });
10395
10610
 
10396
- // ../../packages/core/dist/chunk-KSTYTQ7I.js
10397
- var copilotSuggestBody, copilotSuggestResponse;
10398
- var init_chunk_KSTYTQ7I = __esm({
10399
- "../../packages/core/dist/chunk-KSTYTQ7I.js"() {
10400
- "use strict";
10401
- init_zod();
10402
- copilotSuggestBody = external_exports.object({
10403
- hub_id: external_exports.string().uuid()
10404
- });
10405
- copilotSuggestResponse = external_exports.object({
10406
- status: external_exports.enum(["processing", "skipped"]),
10407
- reason: external_exports.string().optional()
10408
- });
10409
- }
10410
- });
10411
-
10412
- // ../../packages/core/dist/chunk-LKBSHANA.js
10413
- var DESKTOP_SHELL_VERSION_RE, DESKTOP_PLATFORMS, DESKTOP_FLAVORS, desktopShellInfoSchema, DESKTOP_PRESENCE_STATES, desktopPresenceSchema, desktopUpdateSchema, DESKTOP_SIGN_IN_URL_MAX_LENGTH, DESKTOP_APP_PATH_MAX_LENGTH, desktopAppPathSchema, DESKTOP_NOTIFICATION_KINDS, DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH, DESKTOP_NOTIFICATION_BODY_MAX_LENGTH, notificationTitleSchema, notificationBodySchema, desktopNotificationSchema, DESKTOP_BADGE_MAX_COUNT, DESKTOP_BADGE_LABEL_MAX_LENGTH, desktopBadgeSchema, desktopNavigateSchema, desktopSettingsSchema, desktopSettingsChangeSchema, desktopBridgeArgsSchemas;
10414
- var init_chunk_LKBSHANA = __esm({
10415
- "../../packages/core/dist/chunk-LKBSHANA.js"() {
10416
- "use strict";
10417
- init_zod();
10418
- DESKTOP_SHELL_VERSION_RE = /^(0|[1-9]\d{0,5})\.(0|[1-9]\d{0,5})\.(0|[1-9]\d{0,5})(-[0-9A-Za-z.-]{1,32})?$/;
10419
- DESKTOP_PLATFORMS = ["darwin", "win32"];
10420
- DESKTOP_FLAVORS = ["production", "development"];
10421
- desktopShellInfoSchema = external_exports.object({
10422
- /** The shell's own release version, independent of the web deploy. */
10423
- shellVersion: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
10424
- /** The Electron runtime the shell was built with. */
10425
- electronVersion: external_exports.string().regex(/^\d{1,4}\.\d{1,4}\.\d{1,4}(-[0-9A-Za-z.-]{1,32})?$/),
10426
- platform: external_exports.enum(DESKTOP_PLATFORMS),
10427
- /** CPU architecture as Node reports it (`arm64`, `x64`). */
10428
- arch: external_exports.string().regex(/^[a-z0-9_]{1,16}$/),
10429
- flavor: external_exports.enum(DESKTOP_FLAVORS),
10430
- /**
10431
- * Present, and true, when the shell runs from the Microsoft Store's package: the Store updates it,
10432
- * and Windows alone opens it at login (the package's startup task, which the person turns on in
10433
- * Windows' settings). An optional field, so no new `bridgeVersion`: an older page ignores it, and
10434
- * its absence is every other shell.
10435
- */
10436
- store: external_exports.literal(true).optional()
10437
- });
10438
- DESKTOP_PRESENCE_STATES = ["present", "away"];
10439
- desktopPresenceSchema = external_exports.object({
10440
- presence: external_exports.enum(DESKTOP_PRESENCE_STATES),
10441
- mainWindow: external_exports.object({
10442
- shown: external_exports.boolean(),
10443
- focused: external_exports.boolean()
10444
- })
10445
- });
10446
- desktopUpdateSchema = external_exports.object({
10447
- ready: external_exports.object({
10448
- version: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
10449
- offerRestart: external_exports.boolean()
10450
- }).nullable()
10451
- });
10452
- DESKTOP_SIGN_IN_URL_MAX_LENGTH = 4096;
10453
- DESKTOP_APP_PATH_MAX_LENGTH = 512;
10454
- desktopAppPathSchema = external_exports.string().max(DESKTOP_APP_PATH_MAX_LENGTH).regex(/^\/(?![/\\])[^\s\\]*$/);
10455
- DESKTOP_NOTIFICATION_KINDS = ["handoff", "message", "summary"];
10456
- DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH = 200;
10457
- DESKTOP_NOTIFICATION_BODY_MAX_LENGTH = 500;
10458
- notificationTitleSchema = external_exports.string().min(1).max(DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH);
10459
- notificationBodySchema = external_exports.string().max(DESKTOP_NOTIFICATION_BODY_MAX_LENGTH);
10460
- desktopNotificationSchema = external_exports.object({
10461
- kind: external_exports.enum(DESKTOP_NOTIFICATION_KINDS),
10462
- title: notificationTitleSchema,
10463
- body: notificationBodySchema,
10464
- path: desktopAppPathSchema,
10465
- withoutPreview: external_exports.object({ title: notificationTitleSchema, body: notificationBodySchema }).optional()
10611
+ // ../../packages/core/dist/chunk-KSTYTQ7I.js
10612
+ var copilotSuggestBody, copilotSuggestResponse;
10613
+ var init_chunk_KSTYTQ7I = __esm({
10614
+ "../../packages/core/dist/chunk-KSTYTQ7I.js"() {
10615
+ "use strict";
10616
+ init_zod();
10617
+ copilotSuggestBody = external_exports.object({
10618
+ hub_id: external_exports.string().uuid()
10466
10619
  });
10467
- DESKTOP_BADGE_MAX_COUNT = 1e6;
10468
- DESKTOP_BADGE_LABEL_MAX_LENGTH = 200;
10469
- desktopBadgeSchema = external_exports.object({
10470
- count: external_exports.number().int().min(0).max(DESKTOP_BADGE_MAX_COUNT),
10471
- label: external_exports.string().max(DESKTOP_BADGE_LABEL_MAX_LENGTH)
10620
+ copilotSuggestResponse = external_exports.object({
10621
+ status: external_exports.enum(["processing", "skipped"]),
10622
+ reason: external_exports.string().optional()
10472
10623
  });
10473
- desktopNavigateSchema = external_exports.object({
10474
- path: desktopAppPathSchema
10624
+ }
10625
+ });
10626
+
10627
+ // ../../packages/core/dist/chunk-7CYHPF35.js
10628
+ var appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse;
10629
+ var init_chunk_7CYHPF35 = __esm({
10630
+ "../../packages/core/dist/chunk-7CYHPF35.js"() {
10631
+ "use strict";
10632
+ init_chunk_HZ6CADSY();
10633
+ init_zod();
10634
+ appMessageSenderType = external_exports.enum(["user", "team"]);
10635
+ appMessageReceiverType = external_exports.enum(["user", "team", "agent", "assistant"]).transform((v) => v === "assistant" ? "agent" : v);
10636
+ apiChannelMessage = external_exports.object({
10637
+ text: clientOptionalString,
10638
+ attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0)
10639
+ }).refine((m) => m.text && m.text.length > 0 || m.attachments && m.attachments.length > 0, {
10640
+ message: "message must have text or at least one attachment"
10475
10641
  });
10476
- desktopSettingsSchema = external_exports.object({
10477
- /** The app opens when the person logs in to the computer: the operating system's own login item. */
10478
- openAtLogin: external_exports.boolean(),
10479
- /** Closing the window keeps the app running in the tray (true), or quits it (false). */
10480
- closeToTray: external_exports.boolean(),
10481
- /** The shell shows notifications (true), or none (false). The badge is not a notification. */
10482
- notifications: external_exports.boolean(),
10483
- /**
10484
- * A customer message's notification shows the customer's name and words, where the platform
10485
- * allows them at all (`desktopShowsCustomerWords`: macOS); elsewhere the shell never shows them.
10486
- */
10487
- messagePreview: external_exports.boolean()
10642
+ apiChannelMessageBody = external_exports.object({
10643
+ // Correlation id (task hubs): new → new conversation, repeat → continue. min 1 so an
10644
+ // empty string can't masquerade as a ref. Mutually exclusive with conversation_id.
10645
+ external_ref: external_exports.string().min(1).max(256).optional(),
10646
+ // Continue a specific WayAI conversation (authorized against the hub/channel + owner).
10647
+ // UUID-validated here (unlike the app channel, whose client we control): allocation
10648
+ // only treats a UUID-shaped id as a provided conversation, so a malformed id would
10649
+ // otherwise skip the owner guard and silently MINT a new conversation instead of
10650
+ // rejecting. A format 400 is shape-only — not an existence oracle (a valid-but-unknown
10651
+ // UUID still collapses to the opaque authorization error downstream).
10652
+ conversation_id: external_exports.string().uuid().optional(),
10653
+ // On-behalf-of end-user identity. Absent → per-connection service principal (task-hub
10654
+ // only; chat hub rejects with 422 in the route).
10655
+ user: external_exports.object({
10656
+ id: external_exports.string().min(1),
10657
+ email: clientOptionalString,
10658
+ name: clientOptionalString
10659
+ }).optional(),
10660
+ message: apiChannelMessage,
10661
+ // Idempotency key: maps to channel_message_sid, deduped within one conversation
10662
+ // (ConversationDO.storeMessage). A retried POST resolves to the same conversation (a chat
10663
+ // hub's user, the external_ref, the conversation_id, or on a task hub with neither, this key
10664
+ // scoped by the sender), so it echoes the original message_id and skips billing / turn
10665
+ // dispatch. A failed store answers a retryable 503 only when this key is set; without it a
10666
+ // retry could store the message twice, so it answers 400.
10667
+ client_message_id: external_exports.string().min(1).max(256).optional()
10668
+ }).refine((b) => !(b.external_ref && b.conversation_id), {
10669
+ message: "provide external_ref or conversation_id, not both",
10670
+ path: ["external_ref"]
10488
10671
  });
10489
- desktopSettingsChangeSchema = desktopSettingsSchema.partial().strict().refine((change) => Object.values(change).every((value) => typeof value === "boolean"), {
10490
- message: "each setting changed is true or false"
10672
+ appMessageBody = external_exports.object({
10673
+ // Message content — three historical aliases. All optional: an attachment-only
10674
+ // or voice-only message carries no text.
10675
+ content: clientOptionalString,
10676
+ message_text: clientOptionalString,
10677
+ message_body: clientOptionalString,
10678
+ // Conversation context. Ids are plain strings rather than `.uuid()` on purpose:
10679
+ // they are AUTHORIZED downstream, which is the stronger guarantee — a well-formed
10680
+ // uuid belonging to another tenant must fail just as hard as junk. `hub_id` is
10681
+ // gated by `assertHubEndUserAccess` (gh #3286) and `conversation_id` by HubDO's
10682
+ // conversation_index owner check (gh #2781, #3281). The route's own falsy guards
10683
+ // ('hub_id is required') still reject an empty one.
10684
+ hub_id: clientOptionalString,
10685
+ channel_id: clientOptionalString,
10686
+ conversation_id: clientOptionalString,
10687
+ hub_type: external_exports.enum(["chat", "task"]).nullish().transform((v) => v ?? void 0),
10688
+ // Stable idempotency key for one explicit task-hub launcher. HubDO scopes it
10689
+ // to the authenticated user and resolves retries/tabs to one conversation.
10690
+ task_start_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
10691
+ // Routing.
10692
+ sender_type: appMessageSenderType.nullish().transform((v) => v ?? void 0),
10693
+ receiver_type: appMessageReceiverType.nullish().transform((v) => v ?? void 0),
10694
+ // Only meaningful on a team send, where `validateAppTeamSendContext` proves the
10695
+ // caller may send to this receiver. Absent on a team send to a conversation with no
10696
+ // person, which names its `conversation_id` instead. The end-user branch ignores it —
10697
+ // see the receiver derivation in the route.
10698
+ user_receiver_id: clientOptionalString,
10699
+ // ── Internal consult (consultant-agents PR 2 — H1.0) ──────────────────────
10700
+ // A team member handling a customer conversation can tag a `consultant`-role
10701
+ // agent for a PRIVATE, team-only exchange that never reaches the customer. A
10702
+ // consult send is a team send with `receiver_type: 'agent'` targeting the
10703
+ // consultant; `user_receiver_id` identifies the customer whose conversation this is
10704
+ // (and is authorized by `validateAppTeamSendContext`, exactly as a team→user send is),
10705
+ // and is absent, as on a team→user send, when the conversation has no person. The consultant is resolved from `agent_receiver_id`
10706
+ // when supplied, else from an `@mention` parsed out of the message text against
10707
+ // the hub's consultant agents. `consult_thread_id` continues an existing thread;
10708
+ // absent, the route creates/reuses the single implicit thread. These fields are
10709
+ // inert on every non-consult send (end-user send, team→user send).
10710
+ agent_receiver_id: clientOptionalString,
10711
+ consult_thread_id: clientOptionalString,
10712
+ is_first_message: clientOptionalBoolean,
10713
+ end_conversation: clientOptionalBoolean,
10714
+ // Pre-generated by the client so the optimistic bubble and the stored row share
10715
+ // a key (transcription live-updates land on the same row instead of duplicating).
10716
+ message_id: clientOptionalString,
10717
+ attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0),
10718
+ // Base64-encoded audio for STT. Size-capped in the route (the cap is a byte
10719
+ // budget tied to the /channels/* bodyLimit, not a shape rule).
10720
+ audio_file: clientOptionalString
10721
+ });
10722
+ appMessageResponse = external_exports.object({
10723
+ success: external_exports.boolean(),
10724
+ message: external_exports.string(),
10725
+ result: external_exports.object({
10726
+ conversation_id: external_exports.string().optional(),
10727
+ message_id: external_exports.string().optional(),
10728
+ status: external_exports.string().optional(),
10729
+ files: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).optional(),
10730
+ // True when this request reused a task-start/message id already accepted by
10731
+ // the server. Clients must replace their optimistic payload with a fresh
10732
+ // authoritative read because another tab may have won with different text.
10733
+ deduped: external_exports.boolean().optional()
10734
+ }).optional()
10491
10735
  });
10492
- desktopBridgeArgsSchemas = {
10493
- getShellInfo: external_exports.tuple([]),
10494
- getPresence: external_exports.tuple([]),
10495
- openSignIn: external_exports.tuple([external_exports.string().max(DESKTOP_SIGN_IN_URL_MAX_LENGTH)]),
10496
- getUpdate: external_exports.tuple([]),
10497
- restartToUpdate: external_exports.tuple([]),
10498
- notify: external_exports.tuple([desktopNotificationSchema]),
10499
- setBadge: external_exports.tuple([desktopBadgeSchema]),
10500
- clearAll: external_exports.tuple([]),
10501
- getSettings: external_exports.tuple([]),
10502
- setSettings: external_exports.tuple([desktopSettingsChangeSchema])
10503
- };
10504
10736
  }
10505
10737
  });
10506
10738
 
@@ -10568,7 +10800,7 @@ var init_chunk_BPCNB5RT = __esm({
10568
10800
  }
10569
10801
  });
10570
10802
 
10571
- // ../../packages/core/dist/chunk-CGQWQYWY.js
10803
+ // ../../packages/core/dist/chunk-EY6R7A6I.js
10572
10804
  function idempotencyHeaderRefusal(value) {
10573
10805
  if (typeof value !== "string" || !/^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/.test(value)) {
10574
10806
  return "idempotency_header must be a header name: letters, digits and dashes, at most 64";
@@ -10579,10 +10811,10 @@ function idempotencyHeaderRefusal(value) {
10579
10811
  return null;
10580
10812
  }
10581
10813
  var CATALOG_REPLAY, REPLAY_OVERRIDES, RESERVED_HEADERS;
10582
- var init_chunk_CGQWQYWY = __esm({
10583
- "../../packages/core/dist/chunk-CGQWQYWY.js"() {
10814
+ var init_chunk_EY6R7A6I = __esm({
10815
+ "../../packages/core/dist/chunk-EY6R7A6I.js"() {
10584
10816
  "use strict";
10585
- init_chunk_VZTO5ZM7();
10817
+ init_chunk_MHTDXCCS();
10586
10818
  CATALOG_REPLAY = new Map(
10587
10819
  NATIVE_TOOLS.map((tool) => [tool.tool_name, tool.replay])
10588
10820
  );
@@ -10815,7 +11047,7 @@ var init_chunk_WEXVYJ5H = __esm({
10815
11047
  }
10816
11048
  });
10817
11049
 
10818
- // ../../packages/core/dist/chunk-O65PHXK6.js
11050
+ // ../../packages/core/dist/chunk-DEHF7GCX.js
10819
11051
  function refineToolConfig(value, ctx) {
10820
11052
  const raw = value.tool_config;
10821
11053
  if (raw == null) return;
@@ -10851,10 +11083,10 @@ function refineToolConfig(value, ctx) {
10851
11083
  }
10852
11084
  }
10853
11085
  var toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, toolReplaySettingsFields, toolReplaySettingsSchema, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody;
10854
- var init_chunk_O65PHXK6 = __esm({
10855
- "../../packages/core/dist/chunk-O65PHXK6.js"() {
11086
+ var init_chunk_DEHF7GCX = __esm({
11087
+ "../../packages/core/dist/chunk-DEHF7GCX.js"() {
10856
11088
  "use strict";
10857
- init_chunk_CGQWQYWY();
11089
+ init_chunk_EY6R7A6I();
10858
11090
  init_chunk_WEXVYJ5H();
10859
11091
  init_chunk_HZ6CADSY();
10860
11092
  init_zod();
@@ -10923,7 +11155,7 @@ var init_chunk_4LXDRTO4 = __esm({
10923
11155
  }
10924
11156
  });
10925
11157
 
10926
- // ../../packages/core/dist/chunk-LEE5SOCI.js
11158
+ // ../../packages/core/dist/chunk-C552TQHI.js
10927
11159
  function isIanaTimezone(timezone) {
10928
11160
  try {
10929
11161
  new Intl.DateTimeFormat("en-US", { timeZone: timezone }).format(0);
@@ -10933,13 +11165,13 @@ function isIanaTimezone(timezone) {
10933
11165
  }
10934
11166
  }
10935
11167
  var evalDateContextSchema;
10936
- var init_chunk_LEE5SOCI = __esm({
10937
- "../../packages/core/dist/chunk-LEE5SOCI.js"() {
11168
+ var init_chunk_C552TQHI = __esm({
11169
+ "../../packages/core/dist/chunk-C552TQHI.js"() {
10938
11170
  "use strict";
10939
11171
  init_chunk_HZ6CADSY();
10940
11172
  init_chunk_MIWZOSPI();
10941
11173
  init_chunk_LD6U3CDG();
10942
- init_chunk_DHPUPI4Y();
11174
+ init_chunk_WNLWNFHH();
10943
11175
  init_zod();
10944
11176
  evalDateContextSchema = external_exports.object({
10945
11177
  base_time: timestampSchema.refine(isIsoTimestamp, "Expected a canonical ISO timestamp"),
@@ -10963,7 +11195,7 @@ var init_chunk_2ISUBJG7 = __esm({
10963
11195
  }
10964
11196
  });
10965
11197
 
10966
- // ../../packages/core/dist/chunk-EE5FYMSX.js
11198
+ // ../../packages/core/dist/chunk-VQIITUAJ.js
10967
11199
  function describeRole(role) {
10968
11200
  if (typeof role === "string") {
10969
11201
  return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
@@ -11137,11 +11369,11 @@ function terminalRunCount(counts) {
11137
11369
  return counts.successful_runs + counts.failed_runs;
11138
11370
  }
11139
11371
  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;
11140
- var init_chunk_EE5FYMSX = __esm({
11141
- "../../packages/core/dist/chunk-EE5FYMSX.js"() {
11372
+ var init_chunk_VQIITUAJ = __esm({
11373
+ "../../packages/core/dist/chunk-VQIITUAJ.js"() {
11142
11374
  "use strict";
11143
11375
  init_chunk_4LXDRTO4();
11144
- init_chunk_LEE5SOCI();
11376
+ init_chunk_C552TQHI();
11145
11377
  init_chunk_HZ6CADSY();
11146
11378
  init_chunk_2ISUBJG7();
11147
11379
  init_zod();
@@ -11943,7 +12175,7 @@ var init_chunk_AMG6HKUQ = __esm({
11943
12175
  }
11944
12176
  });
11945
12177
 
11946
- // ../../packages/core/dist/chunk-ACN6GXU6.js
12178
+ // ../../packages/core/dist/chunk-XQBFXSYS.js
11947
12179
  function byLocale(entry) {
11948
12180
  const shape = Object.fromEntries(SUPPORTED_LOCALES.map((locale) => [locale, entry.optional()]));
11949
12181
  return external_exports.object(shape).strict();
@@ -11954,10 +12186,10 @@ function writeField(map) {
11954
12186
  );
11955
12187
  }
11956
12188
  var HUB_DISPLAY_NAME_MAX_CHARS, HUB_WELCOME_MESSAGE_MAX_CHARS, HUB_STARTER_QUESTIONS_MAX, HUB_STARTER_QUESTION_MAX_CHARS, displayName, welcomeMessage, starterQuestions, hubDisplayNamesSchema, hubWelcomeMessagesSchema, hubStarterQuestionsSchema, hubDisplayNamesField, hubWelcomeMessagesField, hubStarterQuestionsField, HUB_PRESENTATION_FIELDS, HUB_PRESENTATION_SCHEMAS;
11957
- var init_chunk_ACN6GXU6 = __esm({
11958
- "../../packages/core/dist/chunk-ACN6GXU6.js"() {
12189
+ var init_chunk_XQBFXSYS = __esm({
12190
+ "../../packages/core/dist/chunk-XQBFXSYS.js"() {
11959
12191
  "use strict";
11960
- init_chunk_DHPUPI4Y();
12192
+ init_chunk_WNLWNFHH();
11961
12193
  init_zod();
11962
12194
  HUB_DISPLAY_NAME_MAX_CHARS = 120;
11963
12195
  HUB_WELCOME_MESSAGE_MAX_CHARS = 1e3;
@@ -11981,7 +12213,7 @@ var init_chunk_ACN6GXU6 = __esm({
11981
12213
  }
11982
12214
  });
11983
12215
 
11984
- // ../../packages/core/dist/chunk-T4Q5COKJ.js
12216
+ // ../../packages/core/dist/chunk-R555PBKV.js
11985
12217
  function refineLaneReferences(val, ctx) {
11986
12218
  const lanes = val.lanes;
11987
12219
  const statuses = val.kanban_statuses;
@@ -12005,12 +12237,12 @@ function describeSyncWarning(warning) {
12005
12237
  return `${label}: ${parts.join("; ")}. Promote the base so production's tools match the preview's.`;
12006
12238
  }
12007
12239
  var hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, HUB_USERS_PAGE_SIZE_MAX, HUB_USERS_SEARCH_MAX, HUB_USERS_CHANNEL_TYPES, getHubUsersQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, MAX_END_USER_DAILY_MESSAGE_LIMIT, endUserDailyMessageLimitField, previewLabelField, hubTagsField, createHubBody, updateHubBody, HUB_TAG_CHANGE_REFUSED, hubTagChangeRefusalSchema, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, CONTACT_ACCESS_PAGE_SIZE_MAX, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, HUB_DIFF_SECTION_SET, HUB_DIFF_SECTIONS, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam;
12008
- var init_chunk_T4Q5COKJ = __esm({
12009
- "../../packages/core/dist/chunk-T4Q5COKJ.js"() {
12240
+ var init_chunk_R555PBKV = __esm({
12241
+ "../../packages/core/dist/chunk-R555PBKV.js"() {
12010
12242
  "use strict";
12011
12243
  init_chunk_3VHMUK4W();
12012
12244
  init_chunk_AMG6HKUQ();
12013
- init_chunk_ACN6GXU6();
12245
+ init_chunk_XQBFXSYS();
12014
12246
  init_chunk_HZ6CADSY();
12015
12247
  init_zod();
12016
12248
  hubIdParam = external_exports.object({ id: uuidSchema });
@@ -12203,7 +12435,7 @@ var init_chunk_T4Q5COKJ = __esm({
12203
12435
  }
12204
12436
  });
12205
12437
 
12206
- // ../../packages/core/dist/chunk-6PAEFCFT.js
12438
+ // ../../packages/core/dist/chunk-ZANV2H25.js
12207
12439
  function refineHubAsCodeCustomTools(config, ctx) {
12208
12440
  const agents = config.agents;
12209
12441
  if (!Array.isArray(agents)) return;
@@ -12787,17 +13019,17 @@ function skillSectionsAsResources(scope) {
12787
13019
  };
12788
13020
  }
12789
13021
  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;
12790
- var init_chunk_6PAEFCFT = __esm({
12791
- "../../packages/core/dist/chunk-6PAEFCFT.js"() {
13022
+ var init_chunk_ZANV2H25 = __esm({
13023
+ "../../packages/core/dist/chunk-ZANV2H25.js"() {
12792
13024
  "use strict";
12793
- init_chunk_O65PHXK6();
12794
- init_chunk_EE5FYMSX();
12795
- init_chunk_E32ZC76C();
13025
+ init_chunk_DEHF7GCX();
13026
+ init_chunk_VQIITUAJ();
13027
+ init_chunk_2LE72ZC7();
12796
13028
  init_chunk_LBDH7LCG();
12797
13029
  init_chunk_4LXDRTO4();
12798
- init_chunk_T4Q5COKJ();
13030
+ init_chunk_R555PBKV();
12799
13031
  init_chunk_AMG6HKUQ();
12800
- init_chunk_ACN6GXU6();
13032
+ init_chunk_XQBFXSYS();
12801
13033
  init_chunk_WEXVYJ5H();
12802
13034
  init_chunk_C2UEA2KW();
12803
13035
  init_chunk_S4VDZ7PZ();
@@ -13624,79 +13856,147 @@ var init_chunk_ZLJP22IA = __esm({
13624
13856
  }
13625
13857
  });
13626
13858
 
13627
- // ../../packages/core/dist/chunk-YULHXJ5M.js
13628
- var COMMUNITY_LESSON_TREE_MAX_BYTES, COMMUNITY_LESSON_LINK_PROTOCOLS, COMMUNITY_LESSON_TREE_TOO_LARGE_REASON, COMMUNITY_LESSON_TREE_TOO_DEEP_REASON, COMMUNITY_LESSON_LINE_PREFIX_TOO_WIDE_REASON, LINK_SCHEME;
13629
- var init_chunk_YULHXJ5M = __esm({
13630
- "../../packages/core/dist/chunk-YULHXJ5M.js"() {
13859
+ // ../../packages/core/dist/chunk-2PZIF56U.js
13860
+ var analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlTable, analyticsSqlSchemaQuery;
13861
+ var init_chunk_2PZIF56U = __esm({
13862
+ "../../packages/core/dist/chunk-2PZIF56U.js"() {
13631
13863
  "use strict";
13632
- COMMUNITY_LESSON_TREE_MAX_BYTES = 512 * 1024;
13633
- COMMUNITY_LESSON_LINK_PROTOCOLS = ["http", "https", "mailto"];
13634
- COMMUNITY_LESSON_TREE_TOO_LARGE_REASON = "lesson_tree_too_large";
13635
- COMMUNITY_LESSON_TREE_TOO_DEEP_REASON = "lesson_tree_too_deep";
13636
- COMMUNITY_LESSON_LINE_PREFIX_TOO_WIDE_REASON = "lesson_line_prefix_too_wide";
13637
- LINK_SCHEME = new RegExp(`^(${COMMUNITY_LESSON_LINK_PROTOCOLS.join("|")}):`, "i");
13864
+ init_zod();
13865
+ analyticsHubIdParam = external_exports.object({
13866
+ hubId: external_exports.string().uuid()
13867
+ });
13868
+ analyticsVariableIdParam = external_exports.object({
13869
+ variableId: external_exports.string().uuid()
13870
+ });
13871
+ updateVariablePinBody = external_exports.object({
13872
+ pin: external_exports.union([external_exports.boolean(), external_exports.string()])
13873
+ });
13874
+ updateAnalyticsViewBody = external_exports.object({
13875
+ // 64 covers UUIDs (36) and the `sys:{name}` synthetic IDs for system variables.
13876
+ selected_variable_ids: external_exports.array(external_exports.string().min(1).max(64)).max(200)
13877
+ });
13878
+ NUMERIC_FILTER_OPS = ["eq", "neq", "gt", "gte", "lt", "lte"];
13879
+ TEXT_FILTER_OPS = ["equals", "not_equals", "contains", "not_contains", "starts_with", "ends_with"];
13880
+ CATEGORICAL_FILTER_OPS = ["is", "is_not", "in", "not_in"];
13881
+ VARIABLE_FILTER_OPS = [
13882
+ ...NUMERIC_FILTER_OPS,
13883
+ ...TEXT_FILTER_OPS,
13884
+ ...CATEGORICAL_FILTER_OPS
13885
+ ];
13886
+ STRUCTURED_QUERY_OPS = ["eq", "neq", "gt", "gte", "lt", "lte", "in", "not_in", "like"];
13887
+ STRUCTURED_QUERY_AGGREGATIONS = ["avg", "sum", "min", "max", "count", "quantile", "stddevPop", "corr", "uniq"];
13888
+ filterValueSchema = external_exports.object({
13889
+ variable_id: external_exports.string(),
13890
+ filter_type: external_exports.enum(VARIABLE_FILTER_OPS),
13891
+ filter_value: external_exports.union([external_exports.string(), external_exports.number()])
13892
+ });
13893
+ conversationsBody = external_exports.object({
13894
+ hub_id: external_exports.string().uuid(),
13895
+ time_interval: external_exports.object({
13896
+ start: external_exports.string().optional(),
13897
+ end: external_exports.string().optional()
13898
+ }).optional(),
13899
+ filters: external_exports.array(filterValueSchema).optional(),
13900
+ limit: external_exports.number().int().positive().max(500).default(50),
13901
+ offset: external_exports.number().int().min(0).default(0)
13902
+ });
13903
+ analyticsConversationIdParam = external_exports.object({
13904
+ conversationId: external_exports.string().uuid()
13905
+ });
13906
+ messagesQuery = external_exports.object({
13907
+ hub_id: external_exports.string().uuid(),
13908
+ limit: external_exports.string().regex(/^\d+$/).optional(),
13909
+ offset: external_exports.string().regex(/^\d+$/).optional()
13910
+ });
13911
+ conversationDetailDataQuery = external_exports.object({
13912
+ hub_id: external_exports.string().uuid()
13913
+ });
13914
+ analyticsDataBody = external_exports.object({
13915
+ hub_id: external_exports.string().uuid(),
13916
+ periodicity: external_exports.enum(["daily", "weekly", "monthly", "yearly"]),
13917
+ time_interval: external_exports.object({
13918
+ start: external_exports.string(),
13919
+ end: external_exports.string()
13920
+ }),
13921
+ trend_analysis: external_exports.boolean(),
13922
+ filters: external_exports.array(filterValueSchema).optional(),
13923
+ selected_variables: external_exports.array(external_exports.string()),
13924
+ include_summary: external_exports.boolean().optional(),
13925
+ include_variables: external_exports.boolean().optional(),
13926
+ variable_origin: external_exports.enum(["agent", "system", "annotation"]).optional(),
13927
+ variable_category: external_exports.string().optional(),
13928
+ variables_only: external_exports.boolean().optional()
13929
+ });
13930
+ structuredQueryBody = external_exports.object({
13931
+ hub_id: external_exports.string().uuid(),
13932
+ metrics: external_exports.array(external_exports.object({
13933
+ column: external_exports.string(),
13934
+ aggregation: external_exports.enum(STRUCTURED_QUERY_AGGREGATIONS),
13935
+ alias: external_exports.string().optional(),
13936
+ corr_with: external_exports.string().optional(),
13937
+ quantile_level: external_exports.number().min(0).max(1).optional()
13938
+ })).min(1),
13939
+ group_by: external_exports.array(external_exports.string()).optional(),
13940
+ order_by: external_exports.array(external_exports.object({
13941
+ column: external_exports.string(),
13942
+ direction: external_exports.enum(["asc", "desc"]).optional()
13943
+ })).optional(),
13944
+ filters: external_exports.array(external_exports.object({
13945
+ column: external_exports.string(),
13946
+ operator: external_exports.enum(STRUCTURED_QUERY_OPS),
13947
+ value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()])
13948
+ })).optional(),
13949
+ time_range: external_exports.object({
13950
+ start: external_exports.string(),
13951
+ end: external_exports.string()
13952
+ }).optional(),
13953
+ limit: external_exports.number().int().positive().max(1e4).optional()
13954
+ });
13955
+ analyticsSqlBody = external_exports.object({
13956
+ hub_id: external_exports.string().uuid(),
13957
+ // Hard size cap before the validator runs — keeps lex/parse work bounded.
13958
+ sql: external_exports.string().min(1).max(8e3),
13959
+ limit: external_exports.number().int().positive().max(1e4).optional()
13960
+ });
13961
+ analyticsSqlTable = external_exports.enum(["conversation", "message"]);
13962
+ analyticsSqlSchemaQuery = external_exports.object({
13963
+ hub_id: external_exports.string().uuid(),
13964
+ // Defaulted so a client that predates the message table keeps its old response.
13965
+ table: analyticsSqlTable.default("conversation")
13966
+ });
13638
13967
  }
13639
13968
  });
13640
13969
 
13641
- // ../../packages/core/dist/chunk-V4FRPRH5.js
13642
- var CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS;
13643
- var init_chunk_V4FRPRH5 = __esm({
13644
- "../../packages/core/dist/chunk-V4FRPRH5.js"() {
13970
+ // ../../packages/core/dist/chunk-UEJOG2Q7.js
13971
+ var archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams;
13972
+ var init_chunk_UEJOG2Q7 = __esm({
13973
+ "../../packages/core/dist/chunk-UEJOG2Q7.js"() {
13645
13974
  "use strict";
13646
13975
  init_zod();
13647
- CONSULT_THREAD_STATUSES = ["open", "awaiting", "resolved", "cancelled_at_close"];
13648
- consultThreadStatus = external_exports.enum(CONSULT_THREAD_STATUSES);
13649
- CONSULT_THREAD_TITLE_MAX = 120;
13650
- consultThreadTitle = external_exports.string().trim().min(1).max(CONSULT_THREAD_TITLE_MAX);
13651
- consultThreadSummary = external_exports.object({
13652
- consult_thread_id: external_exports.string(),
13653
- conversation_id: external_exports.string(),
13654
- initiator_type: external_exports.enum(["team", "agent"]),
13655
- initiator_id: external_exports.string(),
13656
- engaged_agent_id: external_exports.string().nullable(),
13657
- engaged_agent_name: external_exports.string().nullable(),
13658
- title: external_exports.string().nullable(),
13659
- status: consultThreadStatus,
13660
- created_at: external_exports.string()
13661
- });
13662
- listConsultThreadsQuery = external_exports.object({
13663
- hub_id: external_exports.string().uuid()
13664
- });
13665
- listConsultThreadsResponse = external_exports.object({
13666
- threads: external_exports.array(consultThreadSummary)
13667
- });
13668
- createConsultThreadBody = external_exports.object({
13669
- hub_id: external_exports.string().uuid(),
13670
- title: consultThreadTitle.optional(),
13671
- // Optionally engage a consultant on creation. Validated server-side against the
13672
- // hub's `consultant`-role agents; a non-consultant / unknown id is rejected.
13673
- engaged_agent_id: external_exports.string().uuid().optional()
13674
- });
13675
- createConsultThreadResponse = external_exports.object({
13676
- thread: consultThreadSummary
13976
+ archiveHubIdParam = external_exports.object({
13977
+ hubId: external_exports.string().uuid()
13677
13978
  });
13678
- consultThreadIdParam = external_exports.object({
13679
- id: external_exports.string().uuid(),
13680
- threadId: external_exports.string().uuid()
13979
+ archiveConversationParams = external_exports.object({
13980
+ hubId: external_exports.string().uuid(),
13981
+ conversationId: external_exports.string().uuid()
13681
13982
  });
13682
- updateConsultThreadBody = external_exports.object({
13683
- hub_id: external_exports.string().uuid(),
13684
- title: consultThreadTitle.optional(),
13685
- engaged_agent_id: external_exports.string().uuid().optional()
13686
- }).refine((v) => v.title !== void 0 || v.engaged_agent_id !== void 0, {
13687
- message: "Provide a title and/or an engaged_agent_id to update"
13983
+ archiveListQuery = external_exports.object({
13984
+ user_id: external_exports.string().optional(),
13985
+ start: external_exports.string().optional(),
13986
+ end: external_exports.string().optional(),
13987
+ page: external_exports.string().regex(/^\d+$/).optional(),
13988
+ page_size: external_exports.string().regex(/^\d+$/).optional()
13688
13989
  });
13689
- updateConsultThreadResponse = external_exports.object({
13690
- thread: consultThreadSummary
13990
+ archiveMessageObservabilityParams = archiveConversationParams.extend({
13991
+ messageId: external_exports.string().uuid()
13691
13992
  });
13692
- CONSULT_AWAIT_TIMEOUT_MS = 15 * 6e4;
13693
13993
  }
13694
13994
  });
13695
13995
 
13696
- // ../../packages/core/dist/chunk-ZHJEQBXJ.js
13996
+ // ../../packages/core/dist/chunk-JO53JB35.js
13697
13997
  var META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, normalizeEmail, REVIEW_ACCOUNT_EMAILS;
13698
- var init_chunk_ZHJEQBXJ = __esm({
13699
- "../../packages/core/dist/chunk-ZHJEQBXJ.js"() {
13998
+ var init_chunk_JO53JB35 = __esm({
13999
+ "../../packages/core/dist/chunk-JO53JB35.js"() {
13700
14000
  "use strict";
13701
14001
  init_zod();
13702
14002
  META_ENTITY_ID_PATTERN = /^\d{1,32}$/;
@@ -13722,12 +14022,7 @@ var init_chunk_ZHJEQBXJ = __esm({
13722
14022
  user_id: external_exports.string(),
13723
14023
  email: external_exports.string(),
13724
14024
  org_id: external_exports.string().nullable(),
13725
- is_platform_admin: external_exports.boolean(),
13726
- // Present so the MCP server can conversation-scope + harness-gate the wayai-conversation
13727
- // control surface (harness-agents PR 2.7c): session_id = conversation_id for a harness
13728
- // token; is_harness marks the synthetic in-sandbox principal. Optional/back-compat.
13729
- session_id: external_exports.string().optional(),
13730
- is_harness: external_exports.boolean().optional()
14025
+ is_platform_admin: external_exports.boolean()
13731
14026
  });
13732
14027
  wsTicketResponse = external_exports.object({
13733
14028
  ticket: external_exports.string(),
@@ -13806,16 +14101,16 @@ var init_chunk_LQY2OCQL = __esm({
13806
14101
  }
13807
14102
  });
13808
14103
 
13809
- // ../../packages/core/dist/chunk-7FHUVBQ2.js
14104
+ // ../../packages/core/dist/chunk-NTWMYWVH.js
13810
14105
  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;
13811
- var init_chunk_7FHUVBQ2 = __esm({
13812
- "../../packages/core/dist/chunk-7FHUVBQ2.js"() {
14106
+ var init_chunk_NTWMYWVH = __esm({
14107
+ "../../packages/core/dist/chunk-NTWMYWVH.js"() {
13813
14108
  "use strict";
13814
14109
  init_chunk_LQY2OCQL();
13815
- init_chunk_E32ZC76C();
14110
+ init_chunk_2LE72ZC7();
13816
14111
  init_chunk_3HSB6J4J();
13817
14112
  init_chunk_5XEJSR22();
13818
- init_chunk_DHPUPI4Y();
14113
+ init_chunk_WNLWNFHH();
13819
14114
  init_chunk_T7KQKDET();
13820
14115
  init_zod();
13821
14116
  AUTOMATION_TRIGGER_TYPES = ["schedule", "event", "webhook"];
@@ -13975,202 +14270,90 @@ var init_chunk_IG6QBZMA = __esm({
13975
14270
  confirm_expires_at: external_exports.string(),
13976
14271
  /** Failed mark attempts. Non-zero means the timer is retrying under backoff. */
13977
14272
  attempts: external_exports.number(),
13978
- last_error: external_exports.string().nullable()
13979
- });
13980
- baseDestructionListResponse = external_exports.object({
13981
- destructions: external_exports.array(baseDestructionRequest)
13982
- });
13983
- baseDestructionInitiateResponse = external_exports.object({
13984
- destruction: baseDestructionRequest,
13985
- /** How many org admins the confirmation link went to. Zero is a refusal, not a state. */
13986
- notified_admins: external_exports.number()
13987
- });
13988
- baseDestructionConfirmResponse = external_exports.object({
13989
- destruction: baseDestructionRequest
13990
- });
13991
- baseDestructionCancelResponse = external_exports.object({
13992
- /** False when there was nothing pending — the cancel button is idempotent by design. */
13993
- cancelled: external_exports.boolean(),
13994
- base_id: external_exports.string()
13995
- });
13996
- }
13997
- });
13998
-
13999
- // ../../packages/core/dist/chunk-PZPOUXJR.js
14000
- var navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody;
14001
- var init_chunk_PZPOUXJR = __esm({
14002
- "../../packages/core/dist/chunk-PZPOUXJR.js"() {
14003
- "use strict";
14004
- init_zod();
14005
- navItemSchema = external_exports.enum(["chat", "support", "task"]);
14006
- hubCountResetBody = external_exports.object({
14007
- hub_id: external_exports.string().uuid(),
14008
- nav_item: navItemSchema,
14009
- conversation_id: external_exports.string().uuid().optional(),
14010
- hub_user_id: external_exports.string().optional(),
14011
- current_team_user_id: external_exports.string().optional()
14012
- });
14013
- navItemCountResetBody = external_exports.object({
14014
- nav_item: navItemSchema
14015
- });
14016
- typingBody = external_exports.object({
14017
- conversationId: external_exports.string().uuid(),
14018
- hubId: external_exports.string().uuid(),
14019
- action: external_exports.enum(["start", "stop"])
14020
- });
14021
- }
14022
- });
14023
-
14024
- // ../../packages/core/dist/chunk-ZJJ5ODOD.js
14025
- function cacheReconcileIdCount(body) {
14026
- return body.conversations.length + body.histories.reduce((n, history) => n + history.conversation_ids.length, 0) + body.threads.length;
14027
- }
14028
- var CACHE_RECONCILE_MAX_IDS, CACHE_RECONCILE_MAX_HUBS, cacheReconcileScopeSchema, cachedConversationPageSchema, cachedHistoryThreadSchema, cachedPeopleThreadSchema, cacheReconcileBody;
14029
- var init_chunk_ZJJ5ODOD = __esm({
14030
- "../../packages/core/dist/chunk-ZJJ5ODOD.js"() {
14031
- "use strict";
14032
- init_chunk_PZPOUXJR();
14033
- init_chunk_HZ6CADSY();
14034
- init_zod();
14035
- CACHE_RECONCILE_MAX_IDS = 300;
14036
- CACHE_RECONCILE_MAX_HUBS = 15;
14037
- cacheReconcileScopeSchema = navItemSchema;
14038
- cachedConversationPageSchema = external_exports.object({
14039
- conversation_id: uuidSchema,
14040
- hub_id: uuidSchema,
14041
- scope: cacheReconcileScopeSchema
14042
- }).strict();
14043
- cachedHistoryThreadSchema = external_exports.object({
14044
- hub_id: uuidSchema,
14045
- hub_user_id: external_exports.string().min(1).max(128),
14046
- nav: cacheReconcileScopeSchema,
14047
- conversation_ids: external_exports.array(uuidSchema).min(1).max(CACHE_RECONCILE_MAX_IDS)
14048
- }).strict();
14049
- cachedPeopleThreadSchema = external_exports.object({ thread_id: uuidSchema }).strict();
14050
- cacheReconcileBody = external_exports.object({
14051
- conversations: external_exports.array(cachedConversationPageSchema).max(CACHE_RECONCILE_MAX_IDS).default([]),
14052
- histories: external_exports.array(cachedHistoryThreadSchema).max(CACHE_RECONCILE_MAX_IDS).default([]),
14053
- threads: external_exports.array(cachedPeopleThreadSchema).max(CACHE_RECONCILE_MAX_IDS).default([])
14054
- }).strict().superRefine((body, ctx) => {
14055
- if (cacheReconcileIdCount(body) > CACHE_RECONCILE_MAX_IDS) {
14056
- ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: `At most ${CACHE_RECONCILE_MAX_IDS} ids in all` });
14057
- }
14058
- const hubs = new Set([...body.conversations, ...body.histories].map((entry) => entry.hub_id));
14059
- if (hubs.size > CACHE_RECONCILE_MAX_HUBS) {
14060
- ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: `At most ${CACHE_RECONCILE_MAX_HUBS} distinct hubs` });
14061
- }
14062
- });
14063
- }
14064
- });
14065
-
14066
- // ../../packages/core/dist/chunk-7CYHPF35.js
14067
- var appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse;
14068
- var init_chunk_7CYHPF35 = __esm({
14069
- "../../packages/core/dist/chunk-7CYHPF35.js"() {
14070
- "use strict";
14071
- init_chunk_HZ6CADSY();
14072
- init_zod();
14073
- appMessageSenderType = external_exports.enum(["user", "team"]);
14074
- appMessageReceiverType = external_exports.enum(["user", "team", "agent", "assistant"]).transform((v) => v === "assistant" ? "agent" : v);
14075
- apiChannelMessage = external_exports.object({
14076
- text: clientOptionalString,
14077
- attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0)
14078
- }).refine((m) => m.text && m.text.length > 0 || m.attachments && m.attachments.length > 0, {
14079
- message: "message must have text or at least one attachment"
14080
- });
14081
- apiChannelMessageBody = external_exports.object({
14082
- // Correlation id (task hubs): new → new conversation, repeat → continue. min 1 so an
14083
- // empty string can't masquerade as a ref. Mutually exclusive with conversation_id.
14084
- external_ref: external_exports.string().min(1).max(256).optional(),
14085
- // Continue a specific WayAI conversation (authorized against the hub/channel + owner).
14086
- // UUID-validated here (unlike the app channel, whose client we control): allocation
14087
- // only treats a UUID-shaped id as a provided conversation, so a malformed id would
14088
- // otherwise skip the owner guard and silently MINT a new conversation instead of
14089
- // rejecting. A format 400 is shape-only — not an existence oracle (a valid-but-unknown
14090
- // UUID still collapses to the opaque authorization error downstream).
14091
- conversation_id: external_exports.string().uuid().optional(),
14092
- // On-behalf-of end-user identity. Absent → per-connection service principal (task-hub
14093
- // only; chat hub rejects with 422 in the route).
14094
- user: external_exports.object({
14095
- id: external_exports.string().min(1),
14096
- email: clientOptionalString,
14097
- name: clientOptionalString
14098
- }).optional(),
14099
- message: apiChannelMessage,
14100
- // Idempotency key: maps to channel_message_sid, deduped within one conversation
14101
- // (ConversationDO.storeMessage). A retried POST resolves to the same conversation (a chat
14102
- // hub's user, the external_ref, the conversation_id, or on a task hub with neither, this key
14103
- // scoped by the sender), so it echoes the original message_id and skips billing / turn
14104
- // dispatch. A failed store answers a retryable 503 only when this key is set; without it a
14105
- // retry could store the message twice, so it answers 400.
14106
- client_message_id: external_exports.string().min(1).max(256).optional()
14107
- }).refine((b) => !(b.external_ref && b.conversation_id), {
14108
- message: "provide external_ref or conversation_id, not both",
14109
- path: ["external_ref"]
14110
- });
14111
- appMessageBody = external_exports.object({
14112
- // Message content — three historical aliases. All optional: an attachment-only
14113
- // or voice-only message carries no text.
14114
- content: clientOptionalString,
14115
- message_text: clientOptionalString,
14116
- message_body: clientOptionalString,
14117
- // Conversation context. Ids are plain strings rather than `.uuid()` on purpose:
14118
- // they are AUTHORIZED downstream, which is the stronger guarantee — a well-formed
14119
- // uuid belonging to another tenant must fail just as hard as junk. `hub_id` is
14120
- // gated by `assertHubEndUserAccess` (gh #3286) and `conversation_id` by HubDO's
14121
- // conversation_index owner check (gh #2781, #3281). The route's own falsy guards
14122
- // ('hub_id is required') still reject an empty one.
14123
- hub_id: clientOptionalString,
14124
- channel_id: clientOptionalString,
14125
- conversation_id: clientOptionalString,
14126
- hub_type: external_exports.enum(["chat", "task"]).nullish().transform((v) => v ?? void 0),
14127
- // Stable idempotency key for one explicit task-hub launcher. HubDO scopes it
14128
- // to the authenticated user and resolves retries/tabs to one conversation.
14129
- task_start_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
14130
- // Routing.
14131
- sender_type: appMessageSenderType.nullish().transform((v) => v ?? void 0),
14132
- receiver_type: appMessageReceiverType.nullish().transform((v) => v ?? void 0),
14133
- // Only meaningful on a team send, where `validateAppTeamSendContext` proves the
14134
- // caller may send to this receiver. Absent on a team send to a conversation with no
14135
- // person, which names its `conversation_id` instead. The end-user branch ignores it —
14136
- // see the receiver derivation in the route.
14137
- user_receiver_id: clientOptionalString,
14138
- // ── Internal consult (consultant-agents PR 2 — H1.0) ──────────────────────
14139
- // A team member handling a customer conversation can tag a `consultant`-role
14140
- // agent for a PRIVATE, team-only exchange that never reaches the customer. A
14141
- // consult send is a team send with `receiver_type: 'agent'` targeting the
14142
- // consultant; `user_receiver_id` identifies the customer whose conversation this is
14143
- // (and is authorized by `validateAppTeamSendContext`, exactly as a team→user send is),
14144
- // and is absent, as on a team→user send, when the conversation has no person. The consultant is resolved from `agent_receiver_id`
14145
- // when supplied, else from an `@mention` parsed out of the message text against
14146
- // the hub's consultant agents. `consult_thread_id` continues an existing thread;
14147
- // absent, the route creates/reuses the single implicit thread. These fields are
14148
- // inert on every non-consult send (end-user send, team→user send).
14149
- agent_receiver_id: clientOptionalString,
14150
- consult_thread_id: clientOptionalString,
14151
- is_first_message: clientOptionalBoolean,
14152
- end_conversation: clientOptionalBoolean,
14153
- // Pre-generated by the client so the optimistic bubble and the stored row share
14154
- // a key (transcription live-updates land on the same row instead of duplicating).
14155
- message_id: clientOptionalString,
14156
- attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0),
14157
- // Base64-encoded audio for STT. Size-capped in the route (the cap is a byte
14158
- // budget tied to the /channels/* bodyLimit, not a shape rule).
14159
- audio_file: clientOptionalString
14273
+ last_error: external_exports.string().nullable()
14160
14274
  });
14161
- appMessageResponse = external_exports.object({
14162
- success: external_exports.boolean(),
14163
- message: external_exports.string(),
14164
- result: external_exports.object({
14165
- conversation_id: external_exports.string().optional(),
14166
- message_id: external_exports.string().optional(),
14167
- status: external_exports.string().optional(),
14168
- files: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).optional(),
14169
- // True when this request reused a task-start/message id already accepted by
14170
- // the server. Clients must replace their optimistic payload with a fresh
14171
- // authoritative read because another tab may have won with different text.
14172
- deduped: external_exports.boolean().optional()
14173
- }).optional()
14275
+ baseDestructionListResponse = external_exports.object({
14276
+ destructions: external_exports.array(baseDestructionRequest)
14277
+ });
14278
+ baseDestructionInitiateResponse = external_exports.object({
14279
+ destruction: baseDestructionRequest,
14280
+ /** How many org admins the confirmation link went to. Zero is a refusal, not a state. */
14281
+ notified_admins: external_exports.number()
14282
+ });
14283
+ baseDestructionConfirmResponse = external_exports.object({
14284
+ destruction: baseDestructionRequest
14285
+ });
14286
+ baseDestructionCancelResponse = external_exports.object({
14287
+ /** False when there was nothing pending — the cancel button is idempotent by design. */
14288
+ cancelled: external_exports.boolean(),
14289
+ base_id: external_exports.string()
14290
+ });
14291
+ }
14292
+ });
14293
+
14294
+ // ../../packages/core/dist/chunk-PZPOUXJR.js
14295
+ var navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody;
14296
+ var init_chunk_PZPOUXJR = __esm({
14297
+ "../../packages/core/dist/chunk-PZPOUXJR.js"() {
14298
+ "use strict";
14299
+ init_zod();
14300
+ navItemSchema = external_exports.enum(["chat", "support", "task"]);
14301
+ hubCountResetBody = external_exports.object({
14302
+ hub_id: external_exports.string().uuid(),
14303
+ nav_item: navItemSchema,
14304
+ conversation_id: external_exports.string().uuid().optional(),
14305
+ hub_user_id: external_exports.string().optional(),
14306
+ current_team_user_id: external_exports.string().optional()
14307
+ });
14308
+ navItemCountResetBody = external_exports.object({
14309
+ nav_item: navItemSchema
14310
+ });
14311
+ typingBody = external_exports.object({
14312
+ conversationId: external_exports.string().uuid(),
14313
+ hubId: external_exports.string().uuid(),
14314
+ action: external_exports.enum(["start", "stop"])
14315
+ });
14316
+ }
14317
+ });
14318
+
14319
+ // ../../packages/core/dist/chunk-YWZFB34T.js
14320
+ function cacheReconcileIdCount(body) {
14321
+ return body.conversations.length + body.histories.reduce((n, history) => n + history.conversation_ids.length, 0) + body.threads.length;
14322
+ }
14323
+ var CACHE_RECONCILE_MAX_IDS, CACHE_RECONCILE_MAX_HUBS, cacheReconcileScopeSchema, cachedConversationPageSchema, cachedHistoryThreadSchema, cachedPeopleThreadSchema, cacheReconcileBody;
14324
+ var init_chunk_YWZFB34T = __esm({
14325
+ "../../packages/core/dist/chunk-YWZFB34T.js"() {
14326
+ "use strict";
14327
+ init_chunk_PZPOUXJR();
14328
+ init_chunk_HZ6CADSY();
14329
+ init_zod();
14330
+ CACHE_RECONCILE_MAX_IDS = 300;
14331
+ CACHE_RECONCILE_MAX_HUBS = 15;
14332
+ cacheReconcileScopeSchema = navItemSchema;
14333
+ cachedConversationPageSchema = external_exports.object({
14334
+ conversation_id: uuidSchema,
14335
+ hub_id: uuidSchema,
14336
+ scope: cacheReconcileScopeSchema
14337
+ }).strict();
14338
+ cachedHistoryThreadSchema = external_exports.object({
14339
+ hub_id: uuidSchema,
14340
+ hub_user_id: external_exports.string().min(1).max(128),
14341
+ nav: cacheReconcileScopeSchema,
14342
+ conversation_ids: external_exports.array(uuidSchema).min(1).max(CACHE_RECONCILE_MAX_IDS)
14343
+ }).strict();
14344
+ cachedPeopleThreadSchema = external_exports.object({ thread_id: uuidSchema }).strict();
14345
+ cacheReconcileBody = external_exports.object({
14346
+ conversations: external_exports.array(cachedConversationPageSchema).max(CACHE_RECONCILE_MAX_IDS).default([]),
14347
+ histories: external_exports.array(cachedHistoryThreadSchema).max(CACHE_RECONCILE_MAX_IDS).default([]),
14348
+ threads: external_exports.array(cachedPeopleThreadSchema).max(CACHE_RECONCILE_MAX_IDS).default([])
14349
+ }).strict().superRefine((body, ctx) => {
14350
+ if (cacheReconcileIdCount(body) > CACHE_RECONCILE_MAX_IDS) {
14351
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: `At most ${CACHE_RECONCILE_MAX_IDS} ids in all` });
14352
+ }
14353
+ const hubs = new Set([...body.conversations, ...body.histories].map((entry) => entry.hub_id));
14354
+ if (hubs.size > CACHE_RECONCILE_MAX_HUBS) {
14355
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: `At most ${CACHE_RECONCILE_MAX_HUBS} distinct hubs` });
14356
+ }
14174
14357
  });
14175
14358
  }
14176
14359
  });
@@ -14338,7 +14521,7 @@ var init_chunk_OMPT4ZHR = __esm({
14338
14521
  }
14339
14522
  });
14340
14523
 
14341
- // ../../packages/core/dist/chunk-7LN3OG3F.js
14524
+ // ../../packages/core/dist/chunk-I5J3BRUB.js
14342
14525
  function refineScopedTarget(data, ctx) {
14343
14526
  if (data.scope === "org") {
14344
14527
  if (!data.org_id) {
@@ -14364,13 +14547,13 @@ function refineScopedTarget(data, ctx) {
14364
14547
  }
14365
14548
  }
14366
14549
  var adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, AUTOMATION_GATE_EVALUATIONS_PER_OPERATION_BOUND, automationGateEvaluationsPerOperation, AUTOMATION_RUN_RETENTION_DAYS_MAX, automationRunRetentionDays, turnDeadlineSeconds, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, adminRepairKnowledgeBlobsBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, dataExplorerDebugCountsDoType, dataExplorerDebugCountsParam, debugHubConvParam, debugMessageIdQuery;
14367
- var init_chunk_7LN3OG3F = __esm({
14368
- "../../packages/core/dist/chunk-7LN3OG3F.js"() {
14550
+ var init_chunk_I5J3BRUB = __esm({
14551
+ "../../packages/core/dist/chunk-I5J3BRUB.js"() {
14369
14552
  "use strict";
14370
14553
  init_chunk_FECLIZTY();
14371
14554
  init_chunk_BFG4ZWR4();
14372
14555
  init_chunk_YZAIZJTO();
14373
- init_chunk_T4Q5COKJ();
14556
+ init_chunk_R555PBKV();
14374
14557
  init_chunk_OMPT4ZHR();
14375
14558
  init_chunk_HZ6CADSY();
14376
14559
  init_chunk_MIWZOSPI();
@@ -14712,143 +14895,6 @@ var init_chunk_7LN3OG3F = __esm({
14712
14895
  }
14713
14896
  });
14714
14897
 
14715
- // ../../packages/core/dist/chunk-2PZIF56U.js
14716
- var analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlTable, analyticsSqlSchemaQuery;
14717
- var init_chunk_2PZIF56U = __esm({
14718
- "../../packages/core/dist/chunk-2PZIF56U.js"() {
14719
- "use strict";
14720
- init_zod();
14721
- analyticsHubIdParam = external_exports.object({
14722
- hubId: external_exports.string().uuid()
14723
- });
14724
- analyticsVariableIdParam = external_exports.object({
14725
- variableId: external_exports.string().uuid()
14726
- });
14727
- updateVariablePinBody = external_exports.object({
14728
- pin: external_exports.union([external_exports.boolean(), external_exports.string()])
14729
- });
14730
- updateAnalyticsViewBody = external_exports.object({
14731
- // 64 covers UUIDs (36) and the `sys:{name}` synthetic IDs for system variables.
14732
- selected_variable_ids: external_exports.array(external_exports.string().min(1).max(64)).max(200)
14733
- });
14734
- NUMERIC_FILTER_OPS = ["eq", "neq", "gt", "gte", "lt", "lte"];
14735
- TEXT_FILTER_OPS = ["equals", "not_equals", "contains", "not_contains", "starts_with", "ends_with"];
14736
- CATEGORICAL_FILTER_OPS = ["is", "is_not", "in", "not_in"];
14737
- VARIABLE_FILTER_OPS = [
14738
- ...NUMERIC_FILTER_OPS,
14739
- ...TEXT_FILTER_OPS,
14740
- ...CATEGORICAL_FILTER_OPS
14741
- ];
14742
- STRUCTURED_QUERY_OPS = ["eq", "neq", "gt", "gte", "lt", "lte", "in", "not_in", "like"];
14743
- STRUCTURED_QUERY_AGGREGATIONS = ["avg", "sum", "min", "max", "count", "quantile", "stddevPop", "corr", "uniq"];
14744
- filterValueSchema = external_exports.object({
14745
- variable_id: external_exports.string(),
14746
- filter_type: external_exports.enum(VARIABLE_FILTER_OPS),
14747
- filter_value: external_exports.union([external_exports.string(), external_exports.number()])
14748
- });
14749
- conversationsBody = external_exports.object({
14750
- hub_id: external_exports.string().uuid(),
14751
- time_interval: external_exports.object({
14752
- start: external_exports.string().optional(),
14753
- end: external_exports.string().optional()
14754
- }).optional(),
14755
- filters: external_exports.array(filterValueSchema).optional(),
14756
- limit: external_exports.number().int().positive().max(500).default(50),
14757
- offset: external_exports.number().int().min(0).default(0)
14758
- });
14759
- analyticsConversationIdParam = external_exports.object({
14760
- conversationId: external_exports.string().uuid()
14761
- });
14762
- messagesQuery = external_exports.object({
14763
- hub_id: external_exports.string().uuid(),
14764
- limit: external_exports.string().regex(/^\d+$/).optional(),
14765
- offset: external_exports.string().regex(/^\d+$/).optional()
14766
- });
14767
- conversationDetailDataQuery = external_exports.object({
14768
- hub_id: external_exports.string().uuid()
14769
- });
14770
- analyticsDataBody = external_exports.object({
14771
- hub_id: external_exports.string().uuid(),
14772
- periodicity: external_exports.enum(["daily", "weekly", "monthly", "yearly"]),
14773
- time_interval: external_exports.object({
14774
- start: external_exports.string(),
14775
- end: external_exports.string()
14776
- }),
14777
- trend_analysis: external_exports.boolean(),
14778
- filters: external_exports.array(filterValueSchema).optional(),
14779
- selected_variables: external_exports.array(external_exports.string()),
14780
- include_summary: external_exports.boolean().optional(),
14781
- include_variables: external_exports.boolean().optional(),
14782
- variable_origin: external_exports.enum(["agent", "system", "annotation"]).optional(),
14783
- variable_category: external_exports.string().optional(),
14784
- variables_only: external_exports.boolean().optional()
14785
- });
14786
- structuredQueryBody = external_exports.object({
14787
- hub_id: external_exports.string().uuid(),
14788
- metrics: external_exports.array(external_exports.object({
14789
- column: external_exports.string(),
14790
- aggregation: external_exports.enum(STRUCTURED_QUERY_AGGREGATIONS),
14791
- alias: external_exports.string().optional(),
14792
- corr_with: external_exports.string().optional(),
14793
- quantile_level: external_exports.number().min(0).max(1).optional()
14794
- })).min(1),
14795
- group_by: external_exports.array(external_exports.string()).optional(),
14796
- order_by: external_exports.array(external_exports.object({
14797
- column: external_exports.string(),
14798
- direction: external_exports.enum(["asc", "desc"]).optional()
14799
- })).optional(),
14800
- filters: external_exports.array(external_exports.object({
14801
- column: external_exports.string(),
14802
- operator: external_exports.enum(STRUCTURED_QUERY_OPS),
14803
- value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()])
14804
- })).optional(),
14805
- time_range: external_exports.object({
14806
- start: external_exports.string(),
14807
- end: external_exports.string()
14808
- }).optional(),
14809
- limit: external_exports.number().int().positive().max(1e4).optional()
14810
- });
14811
- analyticsSqlBody = external_exports.object({
14812
- hub_id: external_exports.string().uuid(),
14813
- // Hard size cap before the validator runs — keeps lex/parse work bounded.
14814
- sql: external_exports.string().min(1).max(8e3),
14815
- limit: external_exports.number().int().positive().max(1e4).optional()
14816
- });
14817
- analyticsSqlTable = external_exports.enum(["conversation", "message"]);
14818
- analyticsSqlSchemaQuery = external_exports.object({
14819
- hub_id: external_exports.string().uuid(),
14820
- // Defaulted so a client that predates the message table keeps its old response.
14821
- table: analyticsSqlTable.default("conversation")
14822
- });
14823
- }
14824
- });
14825
-
14826
- // ../../packages/core/dist/chunk-UEJOG2Q7.js
14827
- var archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams;
14828
- var init_chunk_UEJOG2Q7 = __esm({
14829
- "../../packages/core/dist/chunk-UEJOG2Q7.js"() {
14830
- "use strict";
14831
- init_zod();
14832
- archiveHubIdParam = external_exports.object({
14833
- hubId: external_exports.string().uuid()
14834
- });
14835
- archiveConversationParams = external_exports.object({
14836
- hubId: external_exports.string().uuid(),
14837
- conversationId: external_exports.string().uuid()
14838
- });
14839
- archiveListQuery = external_exports.object({
14840
- user_id: external_exports.string().optional(),
14841
- start: external_exports.string().optional(),
14842
- end: external_exports.string().optional(),
14843
- page: external_exports.string().regex(/^\d+$/).optional(),
14844
- page_size: external_exports.string().regex(/^\d+$/).optional()
14845
- });
14846
- archiveMessageObservabilityParams = archiveConversationParams.extend({
14847
- messageId: external_exports.string().uuid()
14848
- });
14849
- }
14850
- });
14851
-
14852
14898
  // ../../packages/core/dist/chunk-SOJMWM63.js
14853
14899
  var init_chunk_SOJMWM63 = __esm({
14854
14900
  "../../packages/core/dist/chunk-SOJMWM63.js"() {
@@ -14856,12 +14902,12 @@ var init_chunk_SOJMWM63 = __esm({
14856
14902
  }
14857
14903
  });
14858
14904
 
14859
- // ../../packages/core/dist/chunk-R7VSUKKX.js
14905
+ // ../../packages/core/dist/chunk-WFQDSQJK.js
14860
14906
  function isPublicIdentifier(value) {
14861
14907
  return UUID_RE.test(value) || HEX_RE.test(value) || WORKOS_ID_RE.test(value) || TRACE_HEADER_RE.test(value);
14862
14908
  }
14863
14909
  function redactTokenShapes(input) {
14864
- return input.replace(TOKEN_RE, REDACTED).replace(PROVIDER_TOKEN_RE, `$1${REDACTED}`).replace(JSON_CREDENTIAL_RE, `$1"${REDACTED}"`).replace(QUERY_CREDENTIAL_RE, `$1${REDACTED}`);
14910
+ return input.replace(FILE_URL_TOKEN_RE, REDACTED).replace(TOKEN_RE, REDACTED).replace(PROVIDER_TOKEN_RE, `$1${REDACTED}`).replace(JSON_CREDENTIAL_RE, `$1"${REDACTED}"`).replace(QUERY_CREDENTIAL_RE, `$1${REDACTED}`);
14865
14911
  }
14866
14912
  function redactSecrets(value) {
14867
14913
  if (isPublicIdentifier(value)) {
@@ -14875,9 +14921,9 @@ function redactSecrets(value) {
14875
14921
  }
14876
14922
  return redactTokenShapes(value);
14877
14923
  }
14878
- var UUID_RE, HEX_RE, WORKOS_ID_RE, TRACE_HEADER_RE, OPAQUE_SECRET_RE, BASE64_SECRET_RE, BASE64_MARKER_RE, TOKEN_RE, SENSITIVE_FIELDS, SENSITIVE_KEY_ALTERNATION, SENSITIVE_KEY_PATTERN, JSON_CREDENTIAL_RE, QUERY_CREDENTIAL_RE, REDACTED, PROVIDER_TOKEN_RE;
14879
- var init_chunk_R7VSUKKX = __esm({
14880
- "../../packages/core/dist/chunk-R7VSUKKX.js"() {
14924
+ var UUID_RE, HEX_RE, WORKOS_ID_RE, TRACE_HEADER_RE, OPAQUE_SECRET_RE, BASE64_SECRET_RE, BASE64_MARKER_RE, TOKEN_RE, SENSITIVE_FIELDS, SENSITIVE_KEY_ALTERNATION, SENSITIVE_KEY_PATTERN, JSON_CREDENTIAL_RE, QUERY_CREDENTIAL_RE, REDACTED, PROVIDER_TOKEN_RE, FILE_URL_TOKEN_RE;
14925
+ var init_chunk_WFQDSQJK = __esm({
14926
+ "../../packages/core/dist/chunk-WFQDSQJK.js"() {
14881
14927
  "use strict";
14882
14928
  UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
14883
14929
  HEX_RE = /^[0-9a-f]{16,}$/;
@@ -14944,15 +14990,16 @@ var init_chunk_R7VSUKKX = __esm({
14944
14990
  ].join("|") + ")",
14945
14991
  "g"
14946
14992
  );
14993
+ FILE_URL_TOKEN_RE = /v[0-9]+\.[gp]\.[0-9]+\.[A-Za-z0-9_-]{43}\.[A-Za-z0-9_-]{43}/g;
14947
14994
  }
14948
14995
  });
14949
14996
 
14950
- // ../../packages/core/dist/chunk-TS4EYU3W.js
14997
+ // ../../packages/core/dist/chunk-Y66JOKZI.js
14951
14998
  var APP_ERROR_BRAND, AppError, LLM_RATE_LIMIT_BRAND, LlmRateLimitError, LLM_PROVIDER_HTTP_BRAND, LlmProviderHttpError, LLM_PROVIDER_CONTENT_BRAND, LlmProviderContentError, LLM_PROVIDER_TIMEOUT_BRAND, LlmProviderTimeoutError, ExternalServiceError, CHANNEL_PROVIDER_HTTP_BRAND, ChannelProviderHttpError, MEDIA_PROVIDER_HTTP_BRAND, MediaProviderHttpError;
14952
- var init_chunk_TS4EYU3W = __esm({
14953
- "../../packages/core/dist/chunk-TS4EYU3W.js"() {
14999
+ var init_chunk_Y66JOKZI = __esm({
15000
+ "../../packages/core/dist/chunk-Y66JOKZI.js"() {
14954
15001
  "use strict";
14955
- init_chunk_R7VSUKKX();
15002
+ init_chunk_WFQDSQJK();
14956
15003
  APP_ERROR_BRAND = /* @__PURE__ */ Symbol.for("wayai.AppError");
14957
15004
  AppError = class extends Error {
14958
15005
  constructor(message, code, statusCode = 500, details) {
@@ -15063,112 +15110,112 @@ var init_chunk_TS4EYU3W = __esm({
15063
15110
  var init_contracts = __esm({
15064
15111
  "../../packages/core/dist/contracts/index.js"() {
15065
15112
  "use strict";
15066
- init_chunk_GK27ENTT();
15067
- init_chunk_SXDX4GHS();
15113
+ init_chunk_NKLVUTFO();
15114
+ init_chunk_GLJSJX5R();
15068
15115
  init_chunk_YVY2TZK2();
15069
15116
  init_chunk_VXEAR36B();
15070
15117
  init_chunk_RACEDHG6();
15071
15118
  init_chunk_Q7KIQHAZ();
15119
+ init_chunk_ACKF2MVU();
15072
15120
  init_chunk_WBFLPPDI();
15073
15121
  init_chunk_IPXBFWUU();
15122
+ init_chunk_VZA6NHCH();
15123
+ init_chunk_IPDOHAZ5();
15074
15124
  init_chunk_GPM7PE44();
15075
- init_chunk_DGKMMFIR();
15125
+ init_chunk_VEERWOZ6();
15076
15126
  init_chunk_ZC6YGHNX();
15077
- init_chunk_ACKF2MVU();
15127
+ init_chunk_FPSDNS2E();
15078
15128
  init_chunk_ZXK6N2HN();
15079
15129
  init_chunk_Y7CFCYX4();
15130
+ init_chunk_VTFFO3RA();
15080
15131
  init_chunk_5DGHIY7L();
15081
- init_chunk_N4FMK4UY();
15082
- init_chunk_C2BKAZB7();
15083
- init_chunk_BEOHBREG();
15084
- init_chunk_IPDOHAZ5();
15132
+ init_chunk_TUHJ5PQH();
15133
+ init_chunk_SY6PLCPK();
15085
15134
  init_chunk_YUZFHVB2();
15086
15135
  init_chunk_I3O2RACG();
15087
15136
  init_chunk_34LE6P7E();
15088
- init_chunk_FPSDNS2E();
15089
- init_chunk_C4TPQN6Z();
15137
+ init_chunk_LKBSHANA();
15138
+ init_chunk_SGYHEHIO();
15090
15139
  init_chunk_C4HEZ7ZI();
15091
15140
  init_chunk_IR2NOSI3();
15092
15141
  init_chunk_EA23LSDS();
15093
- init_chunk_SY6PLCPK();
15142
+ init_chunk_YULHXJ5M();
15143
+ init_chunk_V4FRPRH5();
15094
15144
  init_chunk_LWMLR2WI();
15095
15145
  init_chunk_ACGAI25T();
15096
15146
  init_chunk_MH4O3YEX();
15097
- init_chunk_SURLRMEK();
15147
+ init_chunk_2NEZIDGC();
15098
15148
  init_chunk_KSTYTQ7I();
15099
- init_chunk_LKBSHANA();
15149
+ init_chunk_E4DIIOOE();
15150
+ init_chunk_7CYHPF35();
15100
15151
  init_chunk_BPCNB5RT();
15101
- init_chunk_6PAEFCFT();
15102
- init_chunk_O65PHXK6();
15103
- init_chunk_EE5FYMSX();
15152
+ init_chunk_ZANV2H25();
15153
+ init_chunk_DEHF7GCX();
15154
+ init_chunk_VQIITUAJ();
15104
15155
  init_chunk_JDJ4EUOL();
15105
15156
  init_chunk_ZLJP22IA();
15106
15157
  init_chunk_6IKFJ3GW();
15107
15158
  init_chunk_6J742GLA();
15108
15159
  init_chunk_ZVXO3XL6();
15109
- init_chunk_YULHXJ5M();
15110
- init_chunk_V4FRPRH5();
15111
- init_chunk_ZHJEQBXJ();
15112
- init_chunk_7FHUVBQ2();
15160
+ init_chunk_2PZIF56U();
15161
+ init_chunk_UEJOG2Q7();
15162
+ init_chunk_JO53JB35();
15163
+ init_chunk_NTWMYWVH();
15113
15164
  init_chunk_LQY2OCQL();
15114
- init_chunk_E32ZC76C();
15165
+ init_chunk_2LE72ZC7();
15115
15166
  init_chunk_3HSB6J4J();
15116
15167
  init_chunk_IG6QBZMA();
15117
- init_chunk_ZJJ5ODOD();
15168
+ init_chunk_YWZFB34T();
15118
15169
  init_chunk_PZPOUXJR();
15119
15170
  init_chunk_LBDH7LCG();
15120
15171
  init_chunk_4LXDRTO4();
15121
- init_chunk_E4DIIOOE();
15122
- init_chunk_7CYHPF35();
15123
- init_chunk_VMAX5YRT();
15124
- init_chunk_CGQWQYWY();
15125
- init_chunk_VZTO5ZM7();
15172
+ init_chunk_ILGGO4PT();
15173
+ init_chunk_EY6R7A6I();
15174
+ init_chunk_MHTDXCCS();
15126
15175
  init_chunk_NVKU5PPQ();
15127
- init_chunk_7LN3OG3F();
15176
+ init_chunk_I5J3BRUB();
15128
15177
  init_chunk_FECLIZTY();
15129
15178
  init_chunk_BFG4ZWR4();
15130
15179
  init_chunk_YZAIZJTO();
15131
- init_chunk_T4Q5COKJ();
15180
+ init_chunk_R555PBKV();
15132
15181
  init_chunk_3VHMUK4W();
15133
15182
  init_chunk_AMG6HKUQ();
15134
- init_chunk_ACN6GXU6();
15183
+ init_chunk_XQBFXSYS();
15135
15184
  init_chunk_OMPT4ZHR();
15136
- init_chunk_2PZIF56U();
15137
- init_chunk_UEJOG2Q7();
15138
- init_chunk_QUKTIJKE();
15185
+ init_chunk_KKA642DR();
15139
15186
  init_chunk_SOJMWM63();
15140
15187
  init_chunk_WEXVYJ5H();
15141
- init_chunk_LEE5SOCI();
15188
+ init_chunk_C552TQHI();
15142
15189
  init_chunk_5XEJSR22();
15143
15190
  init_chunk_IBL7FANV();
15144
- init_chunk_VORPHGDT();
15145
- init_chunk_A4JC7DXB();
15191
+ init_chunk_5VL6LBFD();
15192
+ init_chunk_7FHLACC7();
15146
15193
  init_chunk_HZ6CADSY();
15147
15194
  init_chunk_MIWZOSPI();
15148
15195
  init_chunk_2ISUBJG7();
15149
15196
  init_chunk_C2UEA2KW();
15150
15197
  init_chunk_S4VDZ7PZ();
15151
- init_chunk_LD6U3CDG();
15152
15198
  init_chunk_CJ3L46X6();
15199
+ init_chunk_LD6U3CDG();
15153
15200
  init_chunk_6TSQ5HXC();
15154
- init_chunk_DHPUPI4Y();
15201
+ init_chunk_WNLWNFHH();
15155
15202
  init_chunk_T7KQKDET();
15156
15203
  init_chunk_L5F7ZOUJ();
15157
- init_chunk_TS4EYU3W();
15158
- init_chunk_R7VSUKKX();
15204
+ init_chunk_Y66JOKZI();
15205
+ init_chunk_WFQDSQJK();
15159
15206
  }
15160
15207
  });
15161
15208
 
15162
- // ../../packages/core/dist/chunk-P3AWZG3N.js
15209
+ // ../../packages/core/dist/chunk-R2F7OLXZ.js
15163
15210
  function identifyTokenType(token) {
15164
15211
  if (token.startsWith("way_")) return "way_token";
15165
15212
  if (token.startsWith("eyJ")) return "jwt";
15166
15213
  return "unknown";
15167
15214
  }
15168
- var init_chunk_P3AWZG3N = __esm({
15169
- "../../packages/core/dist/chunk-P3AWZG3N.js"() {
15215
+ var init_chunk_R2F7OLXZ = __esm({
15216
+ "../../packages/core/dist/chunk-R2F7OLXZ.js"() {
15170
15217
  "use strict";
15171
- init_chunk_VORPHGDT();
15218
+ init_chunk_5VL6LBFD();
15172
15219
  }
15173
15220
  });
15174
15221
 
@@ -15288,15 +15335,15 @@ var UUID_RE2, WAYAI_WORKSPACE_LAYOUT;
15288
15335
  var init_dist = __esm({
15289
15336
  "../../packages/core/dist/index.js"() {
15290
15337
  "use strict";
15291
- init_chunk_QUKTIJKE();
15338
+ init_chunk_KKA642DR();
15292
15339
  init_chunk_SOJMWM63();
15293
15340
  init_chunk_WEXVYJ5H();
15294
- init_chunk_LEE5SOCI();
15341
+ init_chunk_C552TQHI();
15295
15342
  init_chunk_5XEJSR22();
15296
15343
  init_chunk_IBL7FANV();
15297
- init_chunk_P3AWZG3N();
15298
- init_chunk_VORPHGDT();
15299
- init_chunk_A4JC7DXB();
15344
+ init_chunk_R2F7OLXZ();
15345
+ init_chunk_5VL6LBFD();
15346
+ init_chunk_7FHLACC7();
15300
15347
  init_chunk_HZ6CADSY();
15301
15348
  init_chunk_MIWZOSPI();
15302
15349
  init_chunk_ERFR7IRY();
@@ -15305,15 +15352,15 @@ var init_dist = __esm({
15305
15352
  init_chunk_RPGBR5IN();
15306
15353
  init_chunk_C2UEA2KW();
15307
15354
  init_chunk_S4VDZ7PZ();
15308
- init_chunk_LD6U3CDG();
15309
15355
  init_chunk_CJ3L46X6();
15356
+ init_chunk_LD6U3CDG();
15310
15357
  init_chunk_6TSQ5HXC();
15311
- init_chunk_DHPUPI4Y();
15358
+ init_chunk_WNLWNFHH();
15312
15359
  init_chunk_BF4WRSOQ();
15313
15360
  init_chunk_T7KQKDET();
15314
15361
  init_chunk_L5F7ZOUJ();
15315
- init_chunk_TS4EYU3W();
15316
- init_chunk_R7VSUKKX();
15362
+ init_chunk_Y66JOKZI();
15363
+ init_chunk_WFQDSQJK();
15317
15364
  UUID_RE2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
15318
15365
  WAYAI_WORKSPACE_LAYOUT = {
15319
15366
  /** Product-namespaced root dir at the git root. */
@@ -19717,7 +19764,7 @@ var init_whoami = __esm({
19717
19764
  var init_constants = __esm({
19718
19765
  "../../packages/core/dist/constants.js"() {
19719
19766
  "use strict";
19720
- init_chunk_DHPUPI4Y();
19767
+ init_chunk_WNLWNFHH();
19721
19768
  }
19722
19769
  });
19723
19770