@wayai/cli 0.3.218 → 0.3.219

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
@@ -5283,6 +5283,25 @@ var init_chunk_VXEAR36B = __esm({
5283
5283
  }
5284
5284
  });
5285
5285
 
5286
+ // ../../packages/core/dist/chunk-GPM7PE44.js
5287
+ var bootstrapQuery;
5288
+ var init_chunk_GPM7PE44 = __esm({
5289
+ "../../packages/core/dist/chunk-GPM7PE44.js"() {
5290
+ "use strict";
5291
+ init_zod();
5292
+ bootstrapQuery = external_exports.object({
5293
+ active_hub_id: external_exports.string().uuid().optional(),
5294
+ active_conversation_id: external_exports.string().uuid().optional(),
5295
+ active_nav: external_exports.enum(["chat", "task", "support"]).optional(),
5296
+ /**
5297
+ * The people thread the URL names (`/chat/threads/:threadId`, gh #4661): the snapshot
5298
+ * preloads it as `people.active_thread` when the viewer is a member.
5299
+ */
5300
+ active_thread_id: external_exports.string().uuid().optional()
5301
+ });
5302
+ }
5303
+ });
5304
+
5286
5305
  // ../../packages/core/dist/chunk-VORPHGDT.js
5287
5306
  var PERMISSIONS;
5288
5307
  var init_chunk_VORPHGDT = __esm({
@@ -5498,6 +5517,34 @@ var init_chunk_ZVXO3XL6 = __esm({
5498
5517
  }
5499
5518
  });
5500
5519
 
5520
+ // ../../packages/core/dist/chunk-ZXK6N2HN.js
5521
+ var PEOPLE_MODERATION_NOTE_MAX_LENGTH, ADMIN_PEOPLE_REPORTS_PAGE_MAX, ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT, PEOPLE_SUSPENDED_REASON, peopleModerationActionSchema, moderationNoteSchema, adminPeopleReportListQuery, adminPeopleReportIdParam, adminPeopleMessageRemovalBody, adminPeopleSuspendBody, adminPeopleNoteBody;
5522
+ var init_chunk_ZXK6N2HN = __esm({
5523
+ "../../packages/core/dist/chunk-ZXK6N2HN.js"() {
5524
+ "use strict";
5525
+ init_chunk_ZVXO3XL6();
5526
+ init_chunk_HZ6CADSY();
5527
+ init_zod();
5528
+ PEOPLE_MODERATION_NOTE_MAX_LENGTH = 500;
5529
+ ADMIN_PEOPLE_REPORTS_PAGE_MAX = 100;
5530
+ ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT = 50;
5531
+ PEOPLE_SUSPENDED_REASON = "suspended";
5532
+ peopleModerationActionSchema = external_exports.enum(["remove_message", "suspend", "unsuspend", "dismiss"]);
5533
+ moderationNoteSchema = optionalTrimmedText(PEOPLE_MODERATION_NOTE_MAX_LENGTH);
5534
+ adminPeopleReportListQuery = external_exports.object({
5535
+ pending: external_exports.enum(["true", "false"]).optional().transform((value) => value === "true"),
5536
+ /** Lower bound on `created_at`. */
5537
+ since: timestampSchema.optional(),
5538
+ limit: external_exports.coerce.number().int().min(1).max(ADMIN_PEOPLE_REPORTS_PAGE_MAX).default(ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT),
5539
+ offset: external_exports.coerce.number().int().min(0).default(0)
5540
+ });
5541
+ adminPeopleReportIdParam = external_exports.object({ reportId: uuidSchema });
5542
+ adminPeopleMessageRemovalBody = external_exports.object({ report_id: uuidSchema, message_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
5543
+ adminPeopleSuspendBody = external_exports.object({ report_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
5544
+ adminPeopleNoteBody = external_exports.object({ note: moderationNoteSchema }).strict();
5545
+ }
5546
+ });
5547
+
5501
5548
  // ../../packages/core/dist/chunk-Y7CFCYX4.js
5502
5549
  var PEOPLE_REPORT_DETAILS_MAX_LENGTH, peopleReportReasonSchema, reportDetailsSchema, reportFields, peopleReportBody;
5503
5550
  var init_chunk_Y7CFCYX4 = __esm({
@@ -5553,10 +5600,10 @@ var init_chunk_5DGHIY7L = __esm({
5553
5600
  }
5554
5601
  });
5555
5602
 
5556
- // ../../packages/core/dist/chunk-KWBAMM7C.js
5557
- 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, DATA_BASE_GENERATION_HEADER, REKOR_MAX_ACTOR_ID_LENGTH, REKOR_MAX_ACTOR_LABEL_LENGTH;
5558
- var init_chunk_KWBAMM7C = __esm({
5559
- "../../packages/core/dist/chunk-KWBAMM7C.js"() {
5603
+ // ../../packages/core/dist/chunk-BEOHBREG.js
5604
+ 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;
5605
+ var init_chunk_BEOHBREG = __esm({
5606
+ "../../packages/core/dist/chunk-BEOHBREG.js"() {
5560
5607
  "use strict";
5561
5608
  init_zod();
5562
5609
  REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
@@ -5589,18 +5636,19 @@ var init_chunk_KWBAMM7C = __esm({
5589
5636
  REKOR_BOUND_BASE_HEADER = "X-Rekor-Bound-Base";
5590
5637
  REKOR_BOUND_TOOLSET_HEADER = "X-Rekor-Bound-Toolset";
5591
5638
  REKOR_BOUND_TOKEN_HEADER = "X-Rekor-Bound-Token";
5639
+ REKOR_BOUND_CUSTOMER_HEADER = "X-Rekor-Bound-Customer";
5592
5640
  DATA_BASE_GENERATION_HEADER = "X-Data-Base-Generation";
5593
5641
  REKOR_MAX_ACTOR_ID_LENGTH = 256;
5594
5642
  REKOR_MAX_ACTOR_LABEL_LENGTH = 256;
5595
5643
  }
5596
5644
  });
5597
5645
 
5598
- // ../../packages/core/dist/chunk-4I3WSYXD.js
5646
+ // ../../packages/core/dist/chunk-BVQE66I2.js
5599
5647
  var TOOLSET_SLUG_PATTERN, REKOR_STRUCTURAL_ID_PATTERN, baseEnvironmentSchema, TOOLSET_FILE_OPERATIONS, toolsetFileToolSchema, toolsetSurfaceSchema, toolsetConnectionBindingSchema, rekorToolsetToolsSchema, rekorBoundAttestation, rekorResolvedToolsetSchema, resolvedFileToolSchema, rekorToolsetFileSchema, rekorToolsetFileListSchema, rekorToolsetFileGetSchema, rekorToolsetFilePutSchema, TOOLSET_CUSTOMER_FACING_REFUSAL_MARK, TOOLSET_CUSTOMER_FACING_REFUSAL;
5600
- var init_chunk_4I3WSYXD = __esm({
5601
- "../../packages/core/dist/chunk-4I3WSYXD.js"() {
5648
+ var init_chunk_BVQE66I2 = __esm({
5649
+ "../../packages/core/dist/chunk-BVQE66I2.js"() {
5602
5650
  "use strict";
5603
- init_chunk_KWBAMM7C();
5651
+ init_chunk_BEOHBREG();
5604
5652
  init_chunk_DHPUPI4Y();
5605
5653
  init_zod();
5606
5654
  TOOLSET_SLUG_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
@@ -5624,6 +5672,20 @@ var init_chunk_4I3WSYXD = __esm({
5624
5672
  records: external_exports.boolean(),
5625
5673
  sql_query: external_exports.boolean(),
5626
5674
  batch: external_exports.boolean(),
5675
+ /**
5676
+ * The toolset serves one customer per call (#5083 RK2): its every call names the customer it serves,
5677
+ * and reaches only that customer's records and shared ones. Absent on a surface recorded before it
5678
+ * was, which reads as not scoped until the connection's next tool sync or token save records it: its
5679
+ * calls name no customer, and the customer-facing rule admits none of its record tools.
5680
+ */
5681
+ customer_scoped: external_exports.boolean().optional(),
5682
+ /**
5683
+ * A key of the resolve this side neither describes nor classifies exposes something: a kind of tool
5684
+ * the data product added later, counted in `records`. The customer-facing rule never admits it, a
5685
+ * customer scope included, until it is classified here. Absent on a surface recorded before it was,
5686
+ * which reads as present.
5687
+ */
5688
+ unclassified_tools: external_exports.boolean().optional(),
5627
5689
  /**
5628
5690
  * Any of its file tools writes: an operation other than `list` and `get` (`put`, `delete`, or one
5629
5691
  * the data product adds later), or an entry this side cannot read. Absent on a surface recorded
@@ -5678,7 +5740,12 @@ var init_chunk_4I3WSYXD = __esm({
5678
5740
  */
5679
5741
  [DATA_BASE_GENERATION_HEADER]: external_exports.string().regex(/^[1-9]\d{0,14}$/),
5680
5742
  /** The token the binding was resolved from, when the connection records it (owner decision 41). */
5681
- [REKOR_BOUND_TOKEN_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional()
5743
+ [REKOR_BOUND_TOKEN_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional(),
5744
+ /**
5745
+ * The customer the call serves (#5083 RK2): a contact id, which the contact book mints as a UUID.
5746
+ * Every UUID is an id the far side reads back as the customer's external id.
5747
+ */
5748
+ [REKOR_BOUND_CUSTOMER_HEADER]: external_exports.string().uuid().optional()
5682
5749
  });
5683
5750
  rekorResolvedToolsetSchema = external_exports.object({
5684
5751
  data: external_exports.object({
@@ -5706,7 +5773,9 @@ var init_chunk_4I3WSYXD = __esm({
5706
5773
  relationships: external_exports.array(external_exports.unknown()).optional(),
5707
5774
  files: external_exports.array(external_exports.unknown()).optional(),
5708
5775
  batch: external_exports.object({ enabled: external_exports.boolean().optional() }).passthrough().nullable().optional(),
5709
- sql_query: external_exports.boolean().optional()
5776
+ sql_query: external_exports.boolean().optional(),
5777
+ /** The toolset serves one customer per call (#5083 RK2). Absent reads as not scoped. */
5778
+ customer_scope: external_exports.boolean().optional()
5710
5779
  }).passthrough()
5711
5780
  });
5712
5781
  resolvedFileToolSchema = external_exports.object({
@@ -5731,7 +5800,7 @@ var init_chunk_4I3WSYXD = __esm({
5731
5800
  });
5732
5801
  rekorToolsetFilePutSchema = external_exports.object({ data: rekorToolsetFileSchema });
5733
5802
  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";
5734
- TOOLSET_CUSTOMER_FACING_REFUSAL = `${TOOLSET_CUSTOMER_FACING_REFUSAL_MARK}, nor a file put or delete`;
5803
+ TOOLSET_CUSTOMER_FACING_REFUSAL = `${TOOLSET_CUSTOMER_FACING_REFUSAL_MARK}, nor a file put or delete \u2014 unless the toolset is customer-scoped, which admits its record, composite and relationship tools, since each of their calls reaches only the conversation's customer and shared records`;
5735
5804
  }
5736
5805
  });
5737
5806
 
@@ -5878,21 +5947,57 @@ var init_chunk_IPDOHAZ5 = __esm({
5878
5947
  }
5879
5948
  });
5880
5949
 
5881
- // ../../packages/core/dist/chunk-GPM7PE44.js
5882
- var bootstrapQuery;
5883
- var init_chunk_GPM7PE44 = __esm({
5884
- "../../packages/core/dist/chunk-GPM7PE44.js"() {
5950
+ // ../../packages/core/dist/chunk-SY6PLCPK.js
5951
+ var jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse;
5952
+ var init_chunk_SY6PLCPK = __esm({
5953
+ "../../packages/core/dist/chunk-SY6PLCPK.js"() {
5885
5954
  "use strict";
5955
+ init_chunk_6TSQ5HXC();
5886
5956
  init_zod();
5887
- bootstrapQuery = external_exports.object({
5888
- active_hub_id: external_exports.string().uuid().optional(),
5889
- active_conversation_id: external_exports.string().uuid().optional(),
5890
- active_nav: external_exports.enum(["chat", "task", "support"]).optional(),
5891
- /**
5892
- * The people thread the URL names (`/chat/threads/:threadId`, gh #4661): the snapshot
5893
- * preloads it as `people.active_thread` when the viewer is a member.
5894
- */
5895
- active_thread_id: external_exports.string().uuid().optional()
5957
+ jsonSchemaSchema = external_exports.record(external_exports.unknown());
5958
+ hubUserIdentity = external_exports.object({
5959
+ user_id: external_exports.string().nullable(),
5960
+ user_name: external_exports.string().nullable(),
5961
+ user_email: external_exports.string().nullable(),
5962
+ user_name_locked: external_exports.boolean(),
5963
+ created_at: external_exports.string(),
5964
+ updated_at: external_exports.string().nullable(),
5965
+ hub_user_id: external_exports.string().optional(),
5966
+ enabled: external_exports.boolean().optional(),
5967
+ hub_team_id: external_exports.string().nullable().optional(),
5968
+ source: external_exports.enum(["grant", "auto"]).optional()
5969
+ });
5970
+ stateValueEntry = external_exports.object({
5971
+ state_slug: external_exports.string(),
5972
+ state_name: external_exports.string(),
5973
+ state_description: external_exports.string().nullable().optional(),
5974
+ scope: external_exports.enum(["user", "conversation"]),
5975
+ json_schema: jsonSchemaSchema,
5976
+ initial_value: external_exports.unknown(),
5977
+ value: external_exports.unknown(),
5978
+ is_reserved: external_exports.boolean()
5979
+ });
5980
+ getHubUserContextResponse = external_exports.object({
5981
+ user: hubUserIdentity,
5982
+ user_states: external_exports.array(stateValueEntry),
5983
+ conversation_states: external_exports.array(stateValueEntry)
5984
+ });
5985
+ updateHubUserBody = external_exports.object({
5986
+ // Non-empty, non-null. `.nullable()` here would bypass `.min(1)` and let an
5987
+ // admin arm the lock on a null name — see hub-do.ts updateHubUser null-guard.
5988
+ user_name: external_exports.string().min(1).max(120)
5989
+ });
5990
+ updateHubUserResponse = external_exports.object({
5991
+ user: hubUserIdentity
5992
+ });
5993
+ unlockHubUserNameResponse = external_exports.object({
5994
+ user: hubUserIdentity
5995
+ });
5996
+ stateResetParams = external_exports.object({
5997
+ stateSlug: slugSchema
5998
+ });
5999
+ stateResetResponse = external_exports.object({
6000
+ ok: external_exports.literal(true)
5896
6001
  });
5897
6002
  }
5898
6003
  });
@@ -6001,31 +6106,98 @@ var init_chunk_FPSDNS2E = __esm({
6001
6106
  }
6002
6107
  });
6003
6108
 
6004
- // ../../packages/core/dist/chunk-ZXK6N2HN.js
6005
- var PEOPLE_MODERATION_NOTE_MAX_LENGTH, ADMIN_PEOPLE_REPORTS_PAGE_MAX, ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT, PEOPLE_SUSPENDED_REASON, peopleModerationActionSchema, moderationNoteSchema, adminPeopleReportListQuery, adminPeopleReportIdParam, adminPeopleMessageRemovalBody, adminPeopleSuspendBody, adminPeopleNoteBody;
6006
- var init_chunk_ZXK6N2HN = __esm({
6007
- "../../packages/core/dist/chunk-ZXK6N2HN.js"() {
6109
+ // ../../packages/core/dist/chunk-LKBSHANA.js
6110
+ 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;
6111
+ var init_chunk_LKBSHANA = __esm({
6112
+ "../../packages/core/dist/chunk-LKBSHANA.js"() {
6008
6113
  "use strict";
6009
- init_chunk_ZVXO3XL6();
6010
- init_chunk_HZ6CADSY();
6011
6114
  init_zod();
6012
- PEOPLE_MODERATION_NOTE_MAX_LENGTH = 500;
6013
- ADMIN_PEOPLE_REPORTS_PAGE_MAX = 100;
6014
- ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT = 50;
6015
- PEOPLE_SUSPENDED_REASON = "suspended";
6016
- peopleModerationActionSchema = external_exports.enum(["remove_message", "suspend", "unsuspend", "dismiss"]);
6017
- moderationNoteSchema = optionalTrimmedText(PEOPLE_MODERATION_NOTE_MAX_LENGTH);
6018
- adminPeopleReportListQuery = external_exports.object({
6019
- pending: external_exports.enum(["true", "false"]).optional().transform((value) => value === "true"),
6020
- /** Lower bound on `created_at`. */
6021
- since: timestampSchema.optional(),
6022
- limit: external_exports.coerce.number().int().min(1).max(ADMIN_PEOPLE_REPORTS_PAGE_MAX).default(ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT),
6023
- offset: external_exports.coerce.number().int().min(0).default(0)
6115
+ 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})?$/;
6116
+ DESKTOP_PLATFORMS = ["darwin", "win32"];
6117
+ DESKTOP_FLAVORS = ["production", "development"];
6118
+ desktopShellInfoSchema = external_exports.object({
6119
+ /** The shell's own release version, independent of the web deploy. */
6120
+ shellVersion: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
6121
+ /** The Electron runtime the shell was built with. */
6122
+ electronVersion: external_exports.string().regex(/^\d{1,4}\.\d{1,4}\.\d{1,4}(-[0-9A-Za-z.-]{1,32})?$/),
6123
+ platform: external_exports.enum(DESKTOP_PLATFORMS),
6124
+ /** CPU architecture as Node reports it (`arm64`, `x64`). */
6125
+ arch: external_exports.string().regex(/^[a-z0-9_]{1,16}$/),
6126
+ flavor: external_exports.enum(DESKTOP_FLAVORS),
6127
+ /**
6128
+ * Present, and true, when the shell runs from the Microsoft Store's package: the Store updates it,
6129
+ * and Windows alone opens it at login (the package's startup task, which the person turns on in
6130
+ * Windows' settings). An optional field, so no new `bridgeVersion`: an older page ignores it, and
6131
+ * its absence is every other shell.
6132
+ */
6133
+ store: external_exports.literal(true).optional()
6024
6134
  });
6025
- adminPeopleReportIdParam = external_exports.object({ reportId: uuidSchema });
6026
- adminPeopleMessageRemovalBody = external_exports.object({ report_id: uuidSchema, message_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
6027
- adminPeopleSuspendBody = external_exports.object({ report_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
6028
- adminPeopleNoteBody = external_exports.object({ note: moderationNoteSchema }).strict();
6135
+ DESKTOP_PRESENCE_STATES = ["present", "away"];
6136
+ desktopPresenceSchema = external_exports.object({
6137
+ presence: external_exports.enum(DESKTOP_PRESENCE_STATES),
6138
+ mainWindow: external_exports.object({
6139
+ shown: external_exports.boolean(),
6140
+ focused: external_exports.boolean()
6141
+ })
6142
+ });
6143
+ desktopUpdateSchema = external_exports.object({
6144
+ ready: external_exports.object({
6145
+ version: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
6146
+ offerRestart: external_exports.boolean()
6147
+ }).nullable()
6148
+ });
6149
+ DESKTOP_SIGN_IN_URL_MAX_LENGTH = 4096;
6150
+ DESKTOP_APP_PATH_MAX_LENGTH = 512;
6151
+ desktopAppPathSchema = external_exports.string().max(DESKTOP_APP_PATH_MAX_LENGTH).regex(/^\/(?![/\\])[^\s\\]*$/);
6152
+ DESKTOP_NOTIFICATION_KINDS = ["handoff", "message", "summary"];
6153
+ DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH = 200;
6154
+ DESKTOP_NOTIFICATION_BODY_MAX_LENGTH = 500;
6155
+ notificationTitleSchema = external_exports.string().min(1).max(DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH);
6156
+ notificationBodySchema = external_exports.string().max(DESKTOP_NOTIFICATION_BODY_MAX_LENGTH);
6157
+ desktopNotificationSchema = external_exports.object({
6158
+ kind: external_exports.enum(DESKTOP_NOTIFICATION_KINDS),
6159
+ title: notificationTitleSchema,
6160
+ body: notificationBodySchema,
6161
+ path: desktopAppPathSchema,
6162
+ withoutPreview: external_exports.object({ title: notificationTitleSchema, body: notificationBodySchema }).optional()
6163
+ });
6164
+ DESKTOP_BADGE_MAX_COUNT = 1e6;
6165
+ DESKTOP_BADGE_LABEL_MAX_LENGTH = 200;
6166
+ desktopBadgeSchema = external_exports.object({
6167
+ count: external_exports.number().int().min(0).max(DESKTOP_BADGE_MAX_COUNT),
6168
+ label: external_exports.string().max(DESKTOP_BADGE_LABEL_MAX_LENGTH)
6169
+ });
6170
+ desktopNavigateSchema = external_exports.object({
6171
+ path: desktopAppPathSchema
6172
+ });
6173
+ desktopSettingsSchema = external_exports.object({
6174
+ /** The app opens when the person logs in to the computer: the operating system's own login item. */
6175
+ openAtLogin: external_exports.boolean(),
6176
+ /** Closing the window keeps the app running in the tray (true), or quits it (false). */
6177
+ closeToTray: external_exports.boolean(),
6178
+ /** The shell shows notifications (true), or none (false). The badge is not a notification. */
6179
+ notifications: external_exports.boolean(),
6180
+ /**
6181
+ * A customer message's notification shows the customer's name and words, where the platform
6182
+ * allows them at all (`desktopShowsCustomerWords`: macOS); elsewhere the shell never shows them.
6183
+ */
6184
+ messagePreview: external_exports.boolean()
6185
+ });
6186
+ desktopSettingsChangeSchema = desktopSettingsSchema.partial().strict().refine((change) => Object.values(change).every((value) => typeof value === "boolean"), {
6187
+ message: "each setting changed is true or false"
6188
+ });
6189
+ desktopBridgeArgsSchemas = {
6190
+ getShellInfo: external_exports.tuple([]),
6191
+ getPresence: external_exports.tuple([]),
6192
+ openSignIn: external_exports.tuple([external_exports.string().max(DESKTOP_SIGN_IN_URL_MAX_LENGTH)]),
6193
+ getUpdate: external_exports.tuple([]),
6194
+ restartToUpdate: external_exports.tuple([]),
6195
+ notify: external_exports.tuple([desktopNotificationSchema]),
6196
+ setBadge: external_exports.tuple([desktopBadgeSchema]),
6197
+ clearAll: external_exports.tuple([]),
6198
+ getSettings: external_exports.tuple([]),
6199
+ setSettings: external_exports.tuple([desktopSettingsChangeSchema])
6200
+ };
6029
6201
  }
6030
6202
  });
6031
6203
 
@@ -6184,7 +6356,7 @@ var init_chunk_E4DIIOOE = __esm({
6184
6356
  }
6185
6357
  });
6186
6358
 
6187
- // ../../packages/core/dist/chunk-LR5WDVCH.js
6359
+ // ../../packages/core/dist/chunk-FMXFEZN4.js
6188
6360
  function spokenLineField(label, description2) {
6189
6361
  return { type: "text", label, maxLength: SPOKEN_LINE_MAX_CHARS, default: "", description: description2 };
6190
6362
  }
@@ -6194,8 +6366,8 @@ function byLowercaseName(a, b) {
6194
6366
  return x < y ? -1 : x > y ? 1 : 0;
6195
6367
  }
6196
6368
  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;
6197
- var init_chunk_LR5WDVCH = __esm({
6198
- "../../packages/core/dist/chunk-LR5WDVCH.js"() {
6369
+ var init_chunk_FMXFEZN4 = __esm({
6370
+ "../../packages/core/dist/chunk-FMXFEZN4.js"() {
6199
6371
  "use strict";
6200
6372
  CALLER_LANGUAGE = "caller";
6201
6373
  TTS_VOICE_REPLY_ENABLED_FIELD = {
@@ -7149,13 +7321,13 @@ var init_chunk_LR5WDVCH = __esm({
7149
7321
  }
7150
7322
  });
7151
7323
 
7152
- // ../../packages/core/dist/chunk-73J42LZ3.js
7324
+ // ../../packages/core/dist/chunk-VOC3AGY4.js
7153
7325
  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;
7154
- var init_chunk_73J42LZ3 = __esm({
7155
- "../../packages/core/dist/chunk-73J42LZ3.js"() {
7326
+ var init_chunk_VOC3AGY4 = __esm({
7327
+ "../../packages/core/dist/chunk-VOC3AGY4.js"() {
7156
7328
  "use strict";
7157
7329
  init_chunk_E4DIIOOE();
7158
- init_chunk_LR5WDVCH();
7330
+ init_chunk_FMXFEZN4();
7159
7331
  init_chunk_HZ6CADSY();
7160
7332
  init_chunk_MIWZOSPI();
7161
7333
  init_zod();
@@ -7410,58 +7582,58 @@ var init_chunk_EA23LSDS = __esm({
7410
7582
  }
7411
7583
  });
7412
7584
 
7413
- // ../../packages/core/dist/chunk-SY6PLCPK.js
7414
- var jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse;
7415
- var init_chunk_SY6PLCPK = __esm({
7416
- "../../packages/core/dist/chunk-SY6PLCPK.js"() {
7585
+ // ../../packages/core/dist/chunk-3O5XTDI2.js
7586
+ var CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS;
7587
+ var init_chunk_3O5XTDI2 = __esm({
7588
+ "../../packages/core/dist/chunk-3O5XTDI2.js"() {
7417
7589
  "use strict";
7418
- init_chunk_6TSQ5HXC();
7419
7590
  init_zod();
7420
- jsonSchemaSchema = external_exports.record(external_exports.unknown());
7421
- hubUserIdentity = external_exports.object({
7422
- user_id: external_exports.string().nullable(),
7423
- user_name: external_exports.string().nullable(),
7424
- user_email: external_exports.string().nullable(),
7425
- user_name_locked: external_exports.boolean(),
7426
- created_at: external_exports.string(),
7427
- updated_at: external_exports.string().nullable(),
7428
- hub_user_id: external_exports.string().optional(),
7429
- enabled: external_exports.boolean().optional(),
7430
- hub_team_id: external_exports.string().nullable().optional(),
7431
- source: external_exports.enum(["grant", "auto"]).optional()
7591
+ CONSULT_THREAD_STATUSES = ["open", "awaiting", "resolved", "cancelled_at_close"];
7592
+ consultThreadStatus = external_exports.enum(CONSULT_THREAD_STATUSES);
7593
+ CONSULT_THREAD_TITLE_MAX = 120;
7594
+ consultThreadTitle = external_exports.string().trim().min(1).max(CONSULT_THREAD_TITLE_MAX);
7595
+ consultThreadSummary = external_exports.object({
7596
+ consult_thread_id: external_exports.string(),
7597
+ conversation_id: external_exports.string(),
7598
+ initiator_type: external_exports.enum(["team", "agent"]),
7599
+ initiator_id: external_exports.string(),
7600
+ engaged_agent_id: external_exports.string().nullable(),
7601
+ engaged_agent_name: external_exports.string().nullable(),
7602
+ title: external_exports.string().nullable(),
7603
+ status: consultThreadStatus,
7604
+ created_at: external_exports.string()
7432
7605
  });
7433
- stateValueEntry = external_exports.object({
7434
- state_slug: external_exports.string(),
7435
- state_name: external_exports.string(),
7436
- state_description: external_exports.string().nullable().optional(),
7437
- scope: external_exports.enum(["user", "conversation"]),
7438
- json_schema: jsonSchemaSchema,
7439
- initial_value: external_exports.unknown(),
7440
- value: external_exports.unknown(),
7441
- is_reserved: external_exports.boolean()
7606
+ listConsultThreadsQuery = external_exports.object({
7607
+ hub_id: external_exports.string().uuid()
7442
7608
  });
7443
- getHubUserContextResponse = external_exports.object({
7444
- user: hubUserIdentity,
7445
- user_states: external_exports.array(stateValueEntry),
7446
- conversation_states: external_exports.array(stateValueEntry)
7609
+ listConsultThreadsResponse = external_exports.object({
7610
+ threads: external_exports.array(consultThreadSummary)
7447
7611
  });
7448
- updateHubUserBody = external_exports.object({
7449
- // Non-empty, non-null. `.nullable()` here would bypass `.min(1)` and let an
7450
- // admin arm the lock on a null name — see hub-do.ts updateHubUser null-guard.
7451
- user_name: external_exports.string().min(1).max(120)
7612
+ createConsultThreadBody = external_exports.object({
7613
+ hub_id: external_exports.string().uuid(),
7614
+ title: consultThreadTitle.optional(),
7615
+ // Optionally engage a consultant on creation. Validated server-side against the
7616
+ // hub's `consultant`-role agents; a non-consultant / unknown id is rejected.
7617
+ engaged_agent_id: external_exports.string().uuid().optional()
7452
7618
  });
7453
- updateHubUserResponse = external_exports.object({
7454
- user: hubUserIdentity
7619
+ createConsultThreadResponse = external_exports.object({
7620
+ thread: consultThreadSummary
7455
7621
  });
7456
- unlockHubUserNameResponse = external_exports.object({
7457
- user: hubUserIdentity
7622
+ consultThreadIdParam = external_exports.object({
7623
+ id: external_exports.string().uuid(),
7624
+ threadId: external_exports.string().uuid()
7458
7625
  });
7459
- stateResetParams = external_exports.object({
7460
- stateSlug: slugSchema
7626
+ updateConsultThreadBody = external_exports.object({
7627
+ hub_id: external_exports.string().uuid(),
7628
+ title: consultThreadTitle.optional(),
7629
+ engaged_agent_id: external_exports.string().uuid().optional()
7630
+ }).refine((v) => v.title !== void 0 || v.engaged_agent_id !== void 0, {
7631
+ message: "Provide a title and/or an engaged_agent_id to update"
7461
7632
  });
7462
- stateResetResponse = external_exports.object({
7463
- ok: external_exports.literal(true)
7633
+ updateConsultThreadResponse = external_exports.object({
7634
+ thread: consultThreadSummary
7464
7635
  });
7636
+ CONSULT_AWAIT_TIMEOUT_MS = 15 * 6e4;
7465
7637
  }
7466
7638
  });
7467
7639
 
@@ -7522,15 +7694,15 @@ var init_chunk_MH4O3YEX = __esm({
7522
7694
  }
7523
7695
  });
7524
7696
 
7525
- // ../../packages/core/dist/chunk-45TIBJK6.js
7697
+ // ../../packages/core/dist/chunk-VBUWGVFY.js
7526
7698
  function catalogToolSideEffects(toolName) {
7527
7699
  const sideEffects = CATALOG_SIDE_EFFECTS.get(toolName);
7528
7700
  if (sideEffects === void 0) return "unknown";
7529
7701
  return sideEffects ? "side_effects" : "none";
7530
7702
  }
7531
7703
  var NATIVE_TOOL_SCHEMAS, WAYAI_CONNECTOR, SANDBOX_AGENT_ROLES, BASE_NATIVE_TOOLS, NATIVE_TOOLS, CATALOG_SIDE_EFFECTS;
7532
- var init_chunk_45TIBJK6 = __esm({
7533
- "../../packages/core/dist/chunk-45TIBJK6.js"() {
7704
+ var init_chunk_VBUWGVFY = __esm({
7705
+ "../../packages/core/dist/chunk-VBUWGVFY.js"() {
7534
7706
  "use strict";
7535
7707
  init_chunk_DHPUPI4Y();
7536
7708
  NATIVE_TOOL_SCHEMAS = {
@@ -8415,7 +8587,7 @@ var init_chunk_45TIBJK6 = __esm({
8415
8587
  { tool_native_id: "nt-003", tool_name: "close_conversation", tool_display_name: "Close Conversation", tool_description: "Close and end the current conversation", connector_id: WAYAI_CONNECTOR, operation: "close_conversation", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: true, replay: "keyed" },
8416
8588
  { tool_native_id: "nt-004", tool_name: "update_kanban_status", tool_display_name: "Update Kanban Status", tool_description: "Update the kanban status of the conversation", connector_id: WAYAI_CONNECTOR, operation: "update_kanban_status", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun" },
8417
8589
  { tool_native_id: "nt-005", tool_name: "schedule_followup", tool_display_name: "Schedule Follow-up", tool_description: "Schedule a follow-up message for the conversation", connector_id: WAYAI_CONNECTOR, operation: "schedule_followup", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: true, execution_config: null, side_effects: true, replay: "keyed" },
8418
- { tool_native_id: "nt-006", tool_name: "send_files", tool_display_name: "Send Files", tool_description: "Send files to the user", connector_id: WAYAI_CONNECTOR, operation: "send_files", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: true, replay: "reconcile" },
8590
+ { tool_native_id: "nt-006", tool_name: "send_files", tool_display_name: "Send Files", tool_description: "Send files to the user", connector_id: WAYAI_CONNECTOR, operation: "send_files", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: true, replay: "keyed" },
8419
8591
  { tool_native_id: "nt-007", tool_name: "update_state", tool_display_name: "Update State", tool_description: "Update conversation or user state variables", connector_id: WAYAI_CONNECTOR, operation: "update_state", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun" },
8420
8592
  { tool_native_id: "nt-008", tool_name: "get_state", tool_display_name: "Get State", tool_description: "Retrieve conversation or user state values", connector_id: WAYAI_CONNECTOR, operation: "get_state", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun" },
8421
8593
  { tool_native_id: "nt-009", tool_name: "reset_state", tool_display_name: "Reset State", tool_description: "Reset conversation or user state to initial values", connector_id: WAYAI_CONNECTOR, operation: "reset_state", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun" },
@@ -8507,7 +8679,7 @@ var init_chunk_45TIBJK6 = __esm({
8507
8679
  { tool_native_id: "nt-031", tool_name: "copy_to_sandbox", tool_display_name: "Copy File to Sandbox", tool_description: "Copy one of the conversation's files into its code sandbox", connector_id: WAYAI_CONNECTOR, operation: "copy_to_sandbox", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "rerun", assignable_roles: SANDBOX_AGENT_ROLES },
8508
8680
  // Copies a sandbox file OUT into the conversation, as an internal note for the team: nothing
8509
8681
  // reaches the customer until `send_files` sends it.
8510
- { tool_native_id: "nt-032", tool_name: "copy_from_sandbox", tool_display_name: "Copy File from Sandbox", tool_description: "Copy a file out of the code sandbox into the conversation, for the team", connector_id: WAYAI_CONNECTOR, operation: "copy_from_sandbox", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "reconcile", assignable_roles: SANDBOX_AGENT_ROLES },
8682
+ { tool_native_id: "nt-032", tool_name: "copy_from_sandbox", tool_display_name: "Copy File from Sandbox", tool_description: "Copy a file out of the code sandbox into the conversation, for the team", connector_id: WAYAI_CONNECTOR, operation: "copy_from_sandbox", tool_method: "internal", tool_group: "Native Tools", is_delegation: false, is_auto_set: false, execution_config: null, side_effects: false, replay: "keyed", assignable_roles: SANDBOX_AGENT_ROLES },
8511
8683
  // The `data/` mount's writes (#5142 step 2): a document of the agent's Base Toolset, written
8512
8684
  // through the toolset's own `put` tool with its version check. `reconcile`, not `keyed`: a re-run
8513
8685
  // after a first write that changed the file is refused by that check (its version, or the create's
@@ -8742,7 +8914,7 @@ var init_chunk_T7KQKDET = __esm({
8742
8914
  }
8743
8915
  });
8744
8916
 
8745
- // ../../packages/core/dist/chunk-STST7XWM.js
8917
+ // ../../packages/core/dist/chunk-6WCPZ26B.js
8746
8918
  function resolveMonitorTrigger(monitorConfig) {
8747
8919
  if (!monitorConfig || typeof monitorConfig !== "object") return "idle";
8748
8920
  const raw = monitorConfig.trigger;
@@ -9048,10 +9220,10 @@ function refineMonitorRulesStructuredOutput(body, ctx) {
9048
9220
  if (refusal2) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["response_format"], message: refusal2 });
9049
9221
  }
9050
9222
  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;
9051
- var init_chunk_STST7XWM = __esm({
9052
- "../../packages/core/dist/chunk-STST7XWM.js"() {
9223
+ var init_chunk_6WCPZ26B = __esm({
9224
+ "../../packages/core/dist/chunk-6WCPZ26B.js"() {
9053
9225
  "use strict";
9054
- init_chunk_45TIBJK6();
9226
+ init_chunk_VBUWGVFY();
9055
9227
  init_chunk_IBL7FANV();
9056
9228
  init_chunk_PFDZEKDE();
9057
9229
  init_chunk_HZ6CADSY();
@@ -9274,12 +9446,12 @@ var init_chunk_STST7XWM = __esm({
9274
9446
  }
9275
9447
  });
9276
9448
 
9277
- // ../../packages/core/dist/chunk-RKJYFGBO.js
9449
+ // ../../packages/core/dist/chunk-YVHDDEQV.js
9278
9450
  var conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody;
9279
- var init_chunk_RKJYFGBO = __esm({
9280
- "../../packages/core/dist/chunk-RKJYFGBO.js"() {
9451
+ var init_chunk_YVHDDEQV = __esm({
9452
+ "../../packages/core/dist/chunk-YVHDDEQV.js"() {
9281
9453
  "use strict";
9282
- init_chunk_STST7XWM();
9454
+ init_chunk_6WCPZ26B();
9283
9455
  init_chunk_HZ6CADSY();
9284
9456
  init_chunk_DHPUPI4Y();
9285
9457
  init_zod();
@@ -9576,98 +9748,115 @@ var init_chunk_KSTYTQ7I = __esm({
9576
9748
  }
9577
9749
  });
9578
9750
 
9579
- // ../../packages/core/dist/chunk-LKBSHANA.js
9580
- 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;
9581
- var init_chunk_LKBSHANA = __esm({
9582
- "../../packages/core/dist/chunk-LKBSHANA.js"() {
9751
+ // ../../packages/core/dist/chunk-7CYHPF35.js
9752
+ var appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse;
9753
+ var init_chunk_7CYHPF35 = __esm({
9754
+ "../../packages/core/dist/chunk-7CYHPF35.js"() {
9583
9755
  "use strict";
9756
+ init_chunk_HZ6CADSY();
9584
9757
  init_zod();
9585
- 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})?$/;
9586
- DESKTOP_PLATFORMS = ["darwin", "win32"];
9587
- DESKTOP_FLAVORS = ["production", "development"];
9588
- desktopShellInfoSchema = external_exports.object({
9589
- /** The shell's own release version, independent of the web deploy. */
9590
- shellVersion: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
9591
- /** The Electron runtime the shell was built with. */
9592
- electronVersion: external_exports.string().regex(/^\d{1,4}\.\d{1,4}\.\d{1,4}(-[0-9A-Za-z.-]{1,32})?$/),
9593
- platform: external_exports.enum(DESKTOP_PLATFORMS),
9594
- /** CPU architecture as Node reports it (`arm64`, `x64`). */
9595
- arch: external_exports.string().regex(/^[a-z0-9_]{1,16}$/),
9596
- flavor: external_exports.enum(DESKTOP_FLAVORS),
9597
- /**
9598
- * Present, and true, when the shell runs from the Microsoft Store's package: the Store updates it,
9599
- * and Windows alone opens it at login (the package's startup task, which the person turns on in
9600
- * Windows' settings). An optional field, so no new `bridgeVersion`: an older page ignores it, and
9601
- * its absence is every other shell.
9602
- */
9603
- store: external_exports.literal(true).optional()
9604
- });
9605
- DESKTOP_PRESENCE_STATES = ["present", "away"];
9606
- desktopPresenceSchema = external_exports.object({
9607
- presence: external_exports.enum(DESKTOP_PRESENCE_STATES),
9608
- mainWindow: external_exports.object({
9609
- shown: external_exports.boolean(),
9610
- focused: external_exports.boolean()
9611
- })
9612
- });
9613
- desktopUpdateSchema = external_exports.object({
9614
- ready: external_exports.object({
9615
- version: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
9616
- offerRestart: external_exports.boolean()
9617
- }).nullable()
9618
- });
9619
- DESKTOP_SIGN_IN_URL_MAX_LENGTH = 4096;
9620
- DESKTOP_APP_PATH_MAX_LENGTH = 512;
9621
- desktopAppPathSchema = external_exports.string().max(DESKTOP_APP_PATH_MAX_LENGTH).regex(/^\/(?![/\\])[^\s\\]*$/);
9622
- DESKTOP_NOTIFICATION_KINDS = ["handoff", "message", "summary"];
9623
- DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH = 200;
9624
- DESKTOP_NOTIFICATION_BODY_MAX_LENGTH = 500;
9625
- notificationTitleSchema = external_exports.string().min(1).max(DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH);
9626
- notificationBodySchema = external_exports.string().max(DESKTOP_NOTIFICATION_BODY_MAX_LENGTH);
9627
- desktopNotificationSchema = external_exports.object({
9628
- kind: external_exports.enum(DESKTOP_NOTIFICATION_KINDS),
9629
- title: notificationTitleSchema,
9630
- body: notificationBodySchema,
9631
- path: desktopAppPathSchema,
9632
- withoutPreview: external_exports.object({ title: notificationTitleSchema, body: notificationBodySchema }).optional()
9633
- });
9634
- DESKTOP_BADGE_MAX_COUNT = 1e6;
9635
- DESKTOP_BADGE_LABEL_MAX_LENGTH = 200;
9636
- desktopBadgeSchema = external_exports.object({
9637
- count: external_exports.number().int().min(0).max(DESKTOP_BADGE_MAX_COUNT),
9638
- label: external_exports.string().max(DESKTOP_BADGE_LABEL_MAX_LENGTH)
9758
+ appMessageSenderType = external_exports.enum(["user", "team"]);
9759
+ appMessageReceiverType = external_exports.enum(["user", "team", "agent", "assistant"]).transform((v) => v === "assistant" ? "agent" : v);
9760
+ apiChannelMessage = external_exports.object({
9761
+ text: clientOptionalString,
9762
+ attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0)
9763
+ }).refine((m) => m.text && m.text.length > 0 || m.attachments && m.attachments.length > 0, {
9764
+ message: "message must have text or at least one attachment"
9639
9765
  });
9640
- desktopNavigateSchema = external_exports.object({
9641
- path: desktopAppPathSchema
9766
+ apiChannelMessageBody = external_exports.object({
9767
+ // Correlation id (task hubs): new → new conversation, repeat → continue. min 1 so an
9768
+ // empty string can't masquerade as a ref. Mutually exclusive with conversation_id.
9769
+ external_ref: external_exports.string().min(1).max(256).optional(),
9770
+ // Continue a specific WayAI conversation (authorized against the hub/channel + owner).
9771
+ // UUID-validated here (unlike the app channel, whose client we control): allocation
9772
+ // only treats a UUID-shaped id as a provided conversation, so a malformed id would
9773
+ // otherwise skip the owner guard and silently MINT a new conversation instead of
9774
+ // rejecting. A format 400 is shape-only — not an existence oracle (a valid-but-unknown
9775
+ // UUID still collapses to the opaque authorization error downstream).
9776
+ conversation_id: external_exports.string().uuid().optional(),
9777
+ // On-behalf-of end-user identity. Absent → per-connection service principal (task-hub
9778
+ // only; chat hub rejects with 422 in the route).
9779
+ user: external_exports.object({
9780
+ id: external_exports.string().min(1),
9781
+ email: clientOptionalString,
9782
+ name: clientOptionalString
9783
+ }).optional(),
9784
+ message: apiChannelMessage,
9785
+ // Idempotency key: maps to channel_message_sid, deduped within one conversation
9786
+ // (ConversationDO.storeMessage). A retried POST resolves to the same conversation (a chat
9787
+ // hub's user, the external_ref, the conversation_id, or on a task hub with neither, this key
9788
+ // scoped by the sender), so it echoes the original message_id and skips billing / turn
9789
+ // dispatch. A failed store answers a retryable 503 only when this key is set; without it a
9790
+ // retry could store the message twice, so it answers 400.
9791
+ client_message_id: external_exports.string().min(1).max(256).optional()
9792
+ }).refine((b) => !(b.external_ref && b.conversation_id), {
9793
+ message: "provide external_ref or conversation_id, not both",
9794
+ path: ["external_ref"]
9642
9795
  });
9643
- desktopSettingsSchema = external_exports.object({
9644
- /** The app opens when the person logs in to the computer: the operating system's own login item. */
9645
- openAtLogin: external_exports.boolean(),
9646
- /** Closing the window keeps the app running in the tray (true), or quits it (false). */
9647
- closeToTray: external_exports.boolean(),
9648
- /** The shell shows notifications (true), or none (false). The badge is not a notification. */
9649
- notifications: external_exports.boolean(),
9650
- /**
9651
- * A customer message's notification shows the customer's name and words, where the platform
9652
- * allows them at all (`desktopShowsCustomerWords`: macOS); elsewhere the shell never shows them.
9653
- */
9654
- messagePreview: external_exports.boolean()
9796
+ appMessageBody = external_exports.object({
9797
+ // Message content — three historical aliases. All optional: an attachment-only
9798
+ // or voice-only message carries no text.
9799
+ content: clientOptionalString,
9800
+ message_text: clientOptionalString,
9801
+ message_body: clientOptionalString,
9802
+ // Conversation context. Ids are plain strings rather than `.uuid()` on purpose:
9803
+ // they are AUTHORIZED downstream, which is the stronger guarantee — a well-formed
9804
+ // uuid belonging to another tenant must fail just as hard as junk. `hub_id` is
9805
+ // gated by `assertHubEndUserAccess` (gh #3286) and `conversation_id` by HubDO's
9806
+ // conversation_index owner check (gh #2781, #3281). The route's own falsy guards
9807
+ // ('hub_id is required') still reject an empty one.
9808
+ hub_id: clientOptionalString,
9809
+ channel_id: clientOptionalString,
9810
+ conversation_id: clientOptionalString,
9811
+ hub_type: external_exports.enum(["chat", "task"]).nullish().transform((v) => v ?? void 0),
9812
+ // Stable idempotency key for one explicit task-hub launcher. HubDO scopes it
9813
+ // to the authenticated user and resolves retries/tabs to one conversation.
9814
+ task_start_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
9815
+ // Routing.
9816
+ sender_type: appMessageSenderType.nullish().transform((v) => v ?? void 0),
9817
+ receiver_type: appMessageReceiverType.nullish().transform((v) => v ?? void 0),
9818
+ // Only meaningful on a team send, where `validateAppTeamSendContext` proves the
9819
+ // caller may send to this receiver. Absent on a team send to a conversation with no
9820
+ // person, which names its `conversation_id` instead. The end-user branch ignores it —
9821
+ // see the receiver derivation in the route.
9822
+ user_receiver_id: clientOptionalString,
9823
+ // ── Internal consult (consultant-agents PR 2 — H1.0) ──────────────────────
9824
+ // A team member handling a customer conversation can tag a `consultant`-role
9825
+ // agent for a PRIVATE, team-only exchange that never reaches the customer. A
9826
+ // consult send is a team send with `receiver_type: 'agent'` targeting the
9827
+ // consultant; `user_receiver_id` identifies the customer whose conversation this is
9828
+ // (and is authorized by `validateAppTeamSendContext`, exactly as a team→user send is),
9829
+ // and is absent, as on a team→user send, when the conversation has no person. The consultant is resolved from `agent_receiver_id`
9830
+ // when supplied, else from an `@mention` parsed out of the message text against
9831
+ // the hub's consultant agents. `consult_thread_id` continues an existing thread;
9832
+ // absent, the route creates/reuses the single implicit thread. These fields are
9833
+ // inert on every non-consult send (end-user send, team→user send).
9834
+ agent_receiver_id: clientOptionalString,
9835
+ consult_thread_id: clientOptionalString,
9836
+ is_first_message: clientOptionalBoolean,
9837
+ end_conversation: clientOptionalBoolean,
9838
+ // Pre-generated by the client so the optimistic bubble and the stored row share
9839
+ // a key (transcription live-updates land on the same row instead of duplicating).
9840
+ message_id: clientOptionalString,
9841
+ attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0),
9842
+ // Base64-encoded audio for STT. Size-capped in the route (the cap is a byte
9843
+ // budget tied to the /channels/* bodyLimit, not a shape rule).
9844
+ audio_file: clientOptionalString
9655
9845
  });
9656
- desktopSettingsChangeSchema = desktopSettingsSchema.partial().strict().refine((change) => Object.values(change).every((value) => typeof value === "boolean"), {
9657
- message: "each setting changed is true or false"
9846
+ appMessageResponse = external_exports.object({
9847
+ success: external_exports.boolean(),
9848
+ message: external_exports.string(),
9849
+ result: external_exports.object({
9850
+ conversation_id: external_exports.string().optional(),
9851
+ message_id: external_exports.string().optional(),
9852
+ status: external_exports.string().optional(),
9853
+ files: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).optional(),
9854
+ // True when this request reused a task-start/message id already accepted by
9855
+ // the server. Clients must replace their optimistic payload with a fresh
9856
+ // authoritative read because another tab may have won with different text.
9857
+ deduped: external_exports.boolean().optional()
9858
+ }).optional()
9658
9859
  });
9659
- desktopBridgeArgsSchemas = {
9660
- getShellInfo: external_exports.tuple([]),
9661
- getPresence: external_exports.tuple([]),
9662
- openSignIn: external_exports.tuple([external_exports.string().max(DESKTOP_SIGN_IN_URL_MAX_LENGTH)]),
9663
- getUpdate: external_exports.tuple([]),
9664
- restartToUpdate: external_exports.tuple([]),
9665
- notify: external_exports.tuple([desktopNotificationSchema]),
9666
- setBadge: external_exports.tuple([desktopBadgeSchema]),
9667
- clearAll: external_exports.tuple([]),
9668
- getSettings: external_exports.tuple([]),
9669
- setSettings: external_exports.tuple([desktopSettingsChangeSchema])
9670
- };
9671
9860
  }
9672
9861
  });
9673
9862
 
@@ -9735,7 +9924,7 @@ var init_chunk_BPCNB5RT = __esm({
9735
9924
  }
9736
9925
  });
9737
9926
 
9738
- // ../../packages/core/dist/chunk-OMZEKMYZ.js
9927
+ // ../../packages/core/dist/chunk-5KFFZX2J.js
9739
9928
  function idempotencyHeaderRefusal(value) {
9740
9929
  if (typeof value !== "string" || !/^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/.test(value)) {
9741
9930
  return "idempotency_header must be a header name: letters, digits and dashes, at most 64";
@@ -9746,10 +9935,10 @@ function idempotencyHeaderRefusal(value) {
9746
9935
  return null;
9747
9936
  }
9748
9937
  var CATALOG_REPLAY, REPLAY_OVERRIDES, RESERVED_HEADERS;
9749
- var init_chunk_OMZEKMYZ = __esm({
9750
- "../../packages/core/dist/chunk-OMZEKMYZ.js"() {
9938
+ var init_chunk_5KFFZX2J = __esm({
9939
+ "../../packages/core/dist/chunk-5KFFZX2J.js"() {
9751
9940
  "use strict";
9752
- init_chunk_45TIBJK6();
9941
+ init_chunk_VBUWGVFY();
9753
9942
  CATALOG_REPLAY = new Map(
9754
9943
  NATIVE_TOOLS.map((tool) => [tool.tool_name, tool.replay])
9755
9944
  );
@@ -9982,7 +10171,7 @@ var init_chunk_WEXVYJ5H = __esm({
9982
10171
  }
9983
10172
  });
9984
10173
 
9985
- // ../../packages/core/dist/chunk-L3SN4B6Q.js
10174
+ // ../../packages/core/dist/chunk-D26NGKIY.js
9986
10175
  function refineToolConfig(value, ctx) {
9987
10176
  const raw = value.tool_config;
9988
10177
  if (raw == null) return;
@@ -10018,10 +10207,10 @@ function refineToolConfig(value, ctx) {
10018
10207
  }
10019
10208
  }
10020
10209
  var toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, toolReplaySettingsFields, toolReplaySettingsSchema, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody;
10021
- var init_chunk_L3SN4B6Q = __esm({
10022
- "../../packages/core/dist/chunk-L3SN4B6Q.js"() {
10210
+ var init_chunk_D26NGKIY = __esm({
10211
+ "../../packages/core/dist/chunk-D26NGKIY.js"() {
10023
10212
  "use strict";
10024
- init_chunk_OMZEKMYZ();
10213
+ init_chunk_5KFFZX2J();
10025
10214
  init_chunk_WEXVYJ5H();
10026
10215
  init_chunk_HZ6CADSY();
10027
10216
  init_zod();
@@ -10132,7 +10321,7 @@ var init_chunk_2ISUBJG7 = __esm({
10132
10321
  }
10133
10322
  });
10134
10323
 
10135
- // ../../packages/core/dist/chunk-KVO4NTS2.js
10324
+ // ../../packages/core/dist/chunk-7MRZJN4O.js
10136
10325
  function describeRole(role) {
10137
10326
  if (typeof role === "string") {
10138
10327
  return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
@@ -10220,6 +10409,13 @@ function evalInitialStateError(input) {
10220
10409
  }
10221
10410
  return null;
10222
10411
  }
10412
+ function evalCustomerContactIdError(input) {
10413
+ const record = asEvalInputRecord(input);
10414
+ if (record === null) return null;
10415
+ const value = record.customer_contact_id;
10416
+ if (value === void 0 || value === null) return null;
10417
+ return evalCustomerContactIdSchema.safeParse(value).success ? null : "customer_contact_id must be a contact id (a UUID)";
10418
+ }
10223
10419
  function evalNameError(name) {
10224
10420
  if (name === void 0) return null;
10225
10421
  if (typeof name === "string" && name.trim().length > 0) return null;
@@ -10251,6 +10447,12 @@ function refineEvalInitialState(value, ctx) {
10251
10447
  });
10252
10448
  }
10253
10449
  }
10450
+ function refineEvalCustomer(value, ctx) {
10451
+ const error = evalCustomerContactIdError(value.eval);
10452
+ if (error) {
10453
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["eval", "customer_contact_id"], message: error });
10454
+ }
10455
+ }
10254
10456
  function refineEvalAttachments(value, ctx) {
10255
10457
  const triggerError = evalTurnAttachmentsError(value.eval.message_text);
10256
10458
  if (triggerError) {
@@ -10292,9 +10494,9 @@ function unprovenRunCount(counts) {
10292
10494
  function terminalRunCount(counts) {
10293
10495
  return counts.successful_runs + counts.failed_runs;
10294
10496
  }
10295
- 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, 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;
10296
- var init_chunk_KVO4NTS2 = __esm({
10297
- "../../packages/core/dist/chunk-KVO4NTS2.js"() {
10497
+ 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;
10498
+ var init_chunk_7MRZJN4O = __esm({
10499
+ "../../packages/core/dist/chunk-7MRZJN4O.js"() {
10298
10500
  "use strict";
10299
10501
  init_chunk_4LXDRTO4();
10300
10502
  init_chunk_LZDVDC2S();
@@ -10331,9 +10533,10 @@ var init_chunk_KVO4NTS2 = __esm({
10331
10533
  scope: external_exports.enum(EVAL_INITIAL_STATE_SCOPES).default("user"),
10332
10534
  value: external_exports.record(external_exports.unknown())
10333
10535
  });
10536
+ evalCustomerContactIdSchema = uuidSchema;
10334
10537
  evalBody = external_exports.object({
10335
10538
  eval: external_exports.record(external_exports.unknown())
10336
- }).superRefine(refineEvalName).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments).superRefine(refineEvalInitialState);
10539
+ }).superRefine(refineEvalName).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments).superRefine(refineEvalInitialState).superRefine(refineEvalCustomer);
10337
10540
  EVAL_LIST_MAX_LIMIT = 1e3;
10338
10541
  evalListLimit = external_exports.string().regex(/^\d+$/).refine((v) => Number(v) <= EVAL_LIST_MAX_LIMIT, {
10339
10542
  message: `limit must be ${EVAL_LIST_MAX_LIMIT} or less`
@@ -11379,7 +11582,7 @@ var init_chunk_6NI5RAM4 = __esm({
11379
11582
  }
11380
11583
  });
11381
11584
 
11382
- // ../../packages/core/dist/chunk-UBTZT3O4.js
11585
+ // ../../packages/core/dist/chunk-DBQLPVOO.js
11383
11586
  function refineHubAsCodeCustomTools(config, ctx) {
11384
11587
  const agents = config.agents;
11385
11588
  if (!Array.isArray(agents)) return;
@@ -11523,6 +11726,14 @@ function refineHubAsCodeEvals(config, ctx) {
11523
11726
  message: `eval "${entry?.name ?? "<unnamed>"}": ${initialStateError}`
11524
11727
  });
11525
11728
  }
11729
+ const customerError = evalCustomerContactIdError(entry);
11730
+ if (customerError) {
11731
+ ctx.addIssue({
11732
+ code: external_exports.ZodIssueCode.custom,
11733
+ path: ["evals", e, "customer_contact_id"],
11734
+ message: `eval "${entry?.name ?? "<unnamed>"}": ${customerError}`
11735
+ });
11736
+ }
11526
11737
  }
11527
11738
  }
11528
11739
  function refineHubAsCodeEvalAttachments(config, ctx) {
@@ -11899,12 +12110,12 @@ function refineHubAsCodeMonitorRulesOutput(config, ctx) {
11899
12110
  });
11900
12111
  }
11901
12112
  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, 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;
11902
- var init_chunk_UBTZT3O4 = __esm({
11903
- "../../packages/core/dist/chunk-UBTZT3O4.js"() {
12113
+ var init_chunk_DBQLPVOO = __esm({
12114
+ "../../packages/core/dist/chunk-DBQLPVOO.js"() {
11904
12115
  "use strict";
11905
- init_chunk_L3SN4B6Q();
11906
- init_chunk_KVO4NTS2();
11907
- init_chunk_STST7XWM();
12116
+ init_chunk_D26NGKIY();
12117
+ init_chunk_7MRZJN4O();
12118
+ init_chunk_6WCPZ26B();
11908
12119
  init_chunk_LBDH7LCG();
11909
12120
  init_chunk_4LXDRTO4();
11910
12121
  init_chunk_T4Q5COKJ();
@@ -12734,58 +12945,29 @@ var init_chunk_YULHXJ5M = __esm({
12734
12945
  }
12735
12946
  });
12736
12947
 
12737
- // ../../packages/core/dist/chunk-3O5XTDI2.js
12738
- var CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS;
12739
- var init_chunk_3O5XTDI2 = __esm({
12740
- "../../packages/core/dist/chunk-3O5XTDI2.js"() {
12948
+ // ../../packages/core/dist/chunk-UEJOG2Q7.js
12949
+ var archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams;
12950
+ var init_chunk_UEJOG2Q7 = __esm({
12951
+ "../../packages/core/dist/chunk-UEJOG2Q7.js"() {
12741
12952
  "use strict";
12742
12953
  init_zod();
12743
- CONSULT_THREAD_STATUSES = ["open", "awaiting", "resolved", "cancelled_at_close"];
12744
- consultThreadStatus = external_exports.enum(CONSULT_THREAD_STATUSES);
12745
- CONSULT_THREAD_TITLE_MAX = 120;
12746
- consultThreadTitle = external_exports.string().trim().min(1).max(CONSULT_THREAD_TITLE_MAX);
12747
- consultThreadSummary = external_exports.object({
12748
- consult_thread_id: external_exports.string(),
12749
- conversation_id: external_exports.string(),
12750
- initiator_type: external_exports.enum(["team", "agent"]),
12751
- initiator_id: external_exports.string(),
12752
- engaged_agent_id: external_exports.string().nullable(),
12753
- engaged_agent_name: external_exports.string().nullable(),
12754
- title: external_exports.string().nullable(),
12755
- status: consultThreadStatus,
12756
- created_at: external_exports.string()
12757
- });
12758
- listConsultThreadsQuery = external_exports.object({
12759
- hub_id: external_exports.string().uuid()
12760
- });
12761
- listConsultThreadsResponse = external_exports.object({
12762
- threads: external_exports.array(consultThreadSummary)
12763
- });
12764
- createConsultThreadBody = external_exports.object({
12765
- hub_id: external_exports.string().uuid(),
12766
- title: consultThreadTitle.optional(),
12767
- // Optionally engage a consultant on creation. Validated server-side against the
12768
- // hub's `consultant`-role agents; a non-consultant / unknown id is rejected.
12769
- engaged_agent_id: external_exports.string().uuid().optional()
12770
- });
12771
- createConsultThreadResponse = external_exports.object({
12772
- thread: consultThreadSummary
12954
+ archiveHubIdParam = external_exports.object({
12955
+ hubId: external_exports.string().uuid()
12773
12956
  });
12774
- consultThreadIdParam = external_exports.object({
12775
- id: external_exports.string().uuid(),
12776
- threadId: external_exports.string().uuid()
12957
+ archiveConversationParams = external_exports.object({
12958
+ hubId: external_exports.string().uuid(),
12959
+ conversationId: external_exports.string().uuid()
12777
12960
  });
12778
- updateConsultThreadBody = external_exports.object({
12779
- hub_id: external_exports.string().uuid(),
12780
- title: consultThreadTitle.optional(),
12781
- engaged_agent_id: external_exports.string().uuid().optional()
12782
- }).refine((v) => v.title !== void 0 || v.engaged_agent_id !== void 0, {
12783
- message: "Provide a title and/or an engaged_agent_id to update"
12961
+ archiveListQuery = external_exports.object({
12962
+ user_id: external_exports.string().optional(),
12963
+ start: external_exports.string().optional(),
12964
+ end: external_exports.string().optional(),
12965
+ page: external_exports.string().regex(/^\d+$/).optional(),
12966
+ page_size: external_exports.string().regex(/^\d+$/).optional()
12784
12967
  });
12785
- updateConsultThreadResponse = external_exports.object({
12786
- thread: consultThreadSummary
12968
+ archiveMessageObservabilityParams = archiveConversationParams.extend({
12969
+ messageId: external_exports.string().uuid()
12787
12970
  });
12788
- CONSULT_AWAIT_TIMEOUT_MS = 15 * 6e4;
12789
12971
  }
12790
12972
  });
12791
12973
 
@@ -12918,13 +13100,13 @@ var init_chunk_F3JHI4Y4 = __esm({
12918
13100
  }
12919
13101
  });
12920
13102
 
12921
- // ../../packages/core/dist/chunk-FAVLH62F.js
13103
+ // ../../packages/core/dist/chunk-ALUW3KZS.js
12922
13104
  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;
12923
- var init_chunk_FAVLH62F = __esm({
12924
- "../../packages/core/dist/chunk-FAVLH62F.js"() {
13105
+ var init_chunk_ALUW3KZS = __esm({
13106
+ "../../packages/core/dist/chunk-ALUW3KZS.js"() {
12925
13107
  "use strict";
12926
13108
  init_chunk_WNWIYFR3();
12927
- init_chunk_STST7XWM();
13109
+ init_chunk_6WCPZ26B();
12928
13110
  init_chunk_JR2ITK6N();
12929
13111
  init_chunk_F3JHI4Y4();
12930
13112
  init_chunk_DHPUPI4Y();
@@ -13175,118 +13357,6 @@ var init_chunk_ZJJ5ODOD = __esm({
13175
13357
  }
13176
13358
  });
13177
13359
 
13178
- // ../../packages/core/dist/chunk-7CYHPF35.js
13179
- var appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse;
13180
- var init_chunk_7CYHPF35 = __esm({
13181
- "../../packages/core/dist/chunk-7CYHPF35.js"() {
13182
- "use strict";
13183
- init_chunk_HZ6CADSY();
13184
- init_zod();
13185
- appMessageSenderType = external_exports.enum(["user", "team"]);
13186
- appMessageReceiverType = external_exports.enum(["user", "team", "agent", "assistant"]).transform((v) => v === "assistant" ? "agent" : v);
13187
- apiChannelMessage = external_exports.object({
13188
- text: clientOptionalString,
13189
- attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0)
13190
- }).refine((m) => m.text && m.text.length > 0 || m.attachments && m.attachments.length > 0, {
13191
- message: "message must have text or at least one attachment"
13192
- });
13193
- apiChannelMessageBody = external_exports.object({
13194
- // Correlation id (task hubs): new → new conversation, repeat → continue. min 1 so an
13195
- // empty string can't masquerade as a ref. Mutually exclusive with conversation_id.
13196
- external_ref: external_exports.string().min(1).max(256).optional(),
13197
- // Continue a specific WayAI conversation (authorized against the hub/channel + owner).
13198
- // UUID-validated here (unlike the app channel, whose client we control): allocation
13199
- // only treats a UUID-shaped id as a provided conversation, so a malformed id would
13200
- // otherwise skip the owner guard and silently MINT a new conversation instead of
13201
- // rejecting. A format 400 is shape-only — not an existence oracle (a valid-but-unknown
13202
- // UUID still collapses to the opaque authorization error downstream).
13203
- conversation_id: external_exports.string().uuid().optional(),
13204
- // On-behalf-of end-user identity. Absent → per-connection service principal (task-hub
13205
- // only; chat hub rejects with 422 in the route).
13206
- user: external_exports.object({
13207
- id: external_exports.string().min(1),
13208
- email: clientOptionalString,
13209
- name: clientOptionalString
13210
- }).optional(),
13211
- message: apiChannelMessage,
13212
- // Idempotency key: maps to channel_message_sid, deduped within one conversation
13213
- // (ConversationDO.storeMessage). A retried POST resolves to the same conversation (a chat
13214
- // hub's user, the external_ref, the conversation_id, or on a task hub with neither, this key
13215
- // scoped by the sender), so it echoes the original message_id and skips billing / turn
13216
- // dispatch. A failed store answers a retryable 503 only when this key is set; without it a
13217
- // retry could store the message twice, so it answers 400.
13218
- client_message_id: external_exports.string().min(1).max(256).optional()
13219
- }).refine((b) => !(b.external_ref && b.conversation_id), {
13220
- message: "provide external_ref or conversation_id, not both",
13221
- path: ["external_ref"]
13222
- });
13223
- appMessageBody = external_exports.object({
13224
- // Message content — three historical aliases. All optional: an attachment-only
13225
- // or voice-only message carries no text.
13226
- content: clientOptionalString,
13227
- message_text: clientOptionalString,
13228
- message_body: clientOptionalString,
13229
- // Conversation context. Ids are plain strings rather than `.uuid()` on purpose:
13230
- // they are AUTHORIZED downstream, which is the stronger guarantee — a well-formed
13231
- // uuid belonging to another tenant must fail just as hard as junk. `hub_id` is
13232
- // gated by `assertHubEndUserAccess` (gh #3286) and `conversation_id` by HubDO's
13233
- // conversation_index owner check (gh #2781, #3281). The route's own falsy guards
13234
- // ('hub_id is required') still reject an empty one.
13235
- hub_id: clientOptionalString,
13236
- channel_id: clientOptionalString,
13237
- conversation_id: clientOptionalString,
13238
- hub_type: external_exports.enum(["chat", "task"]).nullish().transform((v) => v ?? void 0),
13239
- // Stable idempotency key for one explicit task-hub launcher. HubDO scopes it
13240
- // to the authenticated user and resolves retries/tabs to one conversation.
13241
- task_start_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
13242
- // Routing.
13243
- sender_type: appMessageSenderType.nullish().transform((v) => v ?? void 0),
13244
- receiver_type: appMessageReceiverType.nullish().transform((v) => v ?? void 0),
13245
- // Only meaningful on a team send, where `validateAppTeamSendContext` proves the
13246
- // caller may send to this receiver. Absent on a team send to a conversation with no
13247
- // person, which names its `conversation_id` instead. The end-user branch ignores it —
13248
- // see the receiver derivation in the route.
13249
- user_receiver_id: clientOptionalString,
13250
- // ── Internal consult (consultant-agents PR 2 — H1.0) ──────────────────────
13251
- // A team member handling a customer conversation can tag a `consultant`-role
13252
- // agent for a PRIVATE, team-only exchange that never reaches the customer. A
13253
- // consult send is a team send with `receiver_type: 'agent'` targeting the
13254
- // consultant; `user_receiver_id` identifies the customer whose conversation this is
13255
- // (and is authorized by `validateAppTeamSendContext`, exactly as a team→user send is),
13256
- // and is absent, as on a team→user send, when the conversation has no person. The consultant is resolved from `agent_receiver_id`
13257
- // when supplied, else from an `@mention` parsed out of the message text against
13258
- // the hub's consultant agents. `consult_thread_id` continues an existing thread;
13259
- // absent, the route creates/reuses the single implicit thread. These fields are
13260
- // inert on every non-consult send (end-user send, team→user send).
13261
- agent_receiver_id: clientOptionalString,
13262
- consult_thread_id: clientOptionalString,
13263
- is_first_message: clientOptionalBoolean,
13264
- end_conversation: clientOptionalBoolean,
13265
- // Pre-generated by the client so the optimistic bubble and the stored row share
13266
- // a key (transcription live-updates land on the same row instead of duplicating).
13267
- message_id: clientOptionalString,
13268
- attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0),
13269
- // Base64-encoded audio for STT. Size-capped in the route (the cap is a byte
13270
- // budget tied to the /channels/* bodyLimit, not a shape rule).
13271
- audio_file: clientOptionalString
13272
- });
13273
- appMessageResponse = external_exports.object({
13274
- success: external_exports.boolean(),
13275
- message: external_exports.string(),
13276
- result: external_exports.object({
13277
- conversation_id: external_exports.string().optional(),
13278
- message_id: external_exports.string().optional(),
13279
- status: external_exports.string().optional(),
13280
- files: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).optional(),
13281
- // True when this request reused a task-start/message id already accepted by
13282
- // the server. Clients must replace their optimistic payload with a fresh
13283
- // authoritative read because another tab may have won with different text.
13284
- deduped: external_exports.boolean().optional()
13285
- }).optional()
13286
- });
13287
- }
13288
- });
13289
-
13290
13360
  // ../../packages/core/dist/chunk-NVKU5PPQ.js
13291
13361
  var ADMIN_SKILL_NAME_REGEX, adminSkillNameParam;
13292
13362
  var init_chunk_NVKU5PPQ = __esm({
@@ -13929,32 +13999,6 @@ var init_chunk_2PZIF56U = __esm({
13929
13999
  }
13930
14000
  });
13931
14001
 
13932
- // ../../packages/core/dist/chunk-UEJOG2Q7.js
13933
- var archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams;
13934
- var init_chunk_UEJOG2Q7 = __esm({
13935
- "../../packages/core/dist/chunk-UEJOG2Q7.js"() {
13936
- "use strict";
13937
- init_zod();
13938
- archiveHubIdParam = external_exports.object({
13939
- hubId: external_exports.string().uuid()
13940
- });
13941
- archiveConversationParams = external_exports.object({
13942
- hubId: external_exports.string().uuid(),
13943
- conversationId: external_exports.string().uuid()
13944
- });
13945
- archiveListQuery = external_exports.object({
13946
- user_id: external_exports.string().optional(),
13947
- start: external_exports.string().optional(),
13948
- end: external_exports.string().optional(),
13949
- page: external_exports.string().regex(/^\d+$/).optional(),
13950
- page_size: external_exports.string().regex(/^\d+$/).optional()
13951
- });
13952
- archiveMessageObservabilityParams = archiveConversationParams.extend({
13953
- messageId: external_exports.string().uuid()
13954
- });
13955
- }
13956
- });
13957
-
13958
14002
  // ../../packages/core/dist/chunk-SOJMWM63.js
13959
14003
  var init_chunk_SOJMWM63 = __esm({
13960
14004
  "../../packages/core/dist/chunk-SOJMWM63.js"() {
@@ -14177,45 +14221,47 @@ var init_contracts = __esm({
14177
14221
  init_chunk_SXDX4GHS();
14178
14222
  init_chunk_FK6HBXM7();
14179
14223
  init_chunk_VXEAR36B();
14224
+ init_chunk_GPM7PE44();
14180
14225
  init_chunk_DGKMMFIR();
14181
14226
  init_chunk_ZC6YGHNX();
14182
14227
  init_chunk_ACKF2MVU();
14228
+ init_chunk_ZXK6N2HN();
14183
14229
  init_chunk_Y7CFCYX4();
14184
14230
  init_chunk_5DGHIY7L();
14185
- init_chunk_4I3WSYXD();
14186
- init_chunk_KWBAMM7C();
14231
+ init_chunk_BVQE66I2();
14232
+ init_chunk_BEOHBREG();
14187
14233
  init_chunk_IPDOHAZ5();
14188
- init_chunk_GPM7PE44();
14234
+ init_chunk_SY6PLCPK();
14189
14235
  init_chunk_YUZFHVB2();
14190
14236
  init_chunk_34LE6P7E();
14191
14237
  init_chunk_FPSDNS2E();
14192
- init_chunk_ZXK6N2HN();
14193
- init_chunk_73J42LZ3();
14238
+ init_chunk_LKBSHANA();
14239
+ init_chunk_VOC3AGY4();
14194
14240
  init_chunk_C4HEZ7ZI();
14195
14241
  init_chunk_IR2NOSI3();
14196
14242
  init_chunk_EA23LSDS();
14197
- init_chunk_SY6PLCPK();
14243
+ init_chunk_3O5XTDI2();
14198
14244
  init_chunk_LWMLR2WI();
14199
14245
  init_chunk_ACGAI25T();
14200
14246
  init_chunk_MH4O3YEX();
14201
- init_chunk_RKJYFGBO();
14247
+ init_chunk_YVHDDEQV();
14202
14248
  init_chunk_KSTYTQ7I();
14203
- init_chunk_LKBSHANA();
14249
+ init_chunk_7CYHPF35();
14204
14250
  init_chunk_BPCNB5RT();
14205
- init_chunk_UBTZT3O4();
14206
- init_chunk_L3SN4B6Q();
14207
- init_chunk_KVO4NTS2();
14251
+ init_chunk_DBQLPVOO();
14252
+ init_chunk_D26NGKIY();
14253
+ init_chunk_7MRZJN4O();
14208
14254
  init_chunk_JDJ4EUOL();
14209
14255
  init_chunk_QAWIPRNA();
14210
14256
  init_chunk_EA2IJGKN();
14211
14257
  init_chunk_6J742GLA();
14212
14258
  init_chunk_ZVXO3XL6();
14213
14259
  init_chunk_YULHXJ5M();
14214
- init_chunk_3O5XTDI2();
14260
+ init_chunk_UEJOG2Q7();
14215
14261
  init_chunk_ZHJEQBXJ();
14216
- init_chunk_FAVLH62F();
14262
+ init_chunk_ALUW3KZS();
14217
14263
  init_chunk_WNWIYFR3();
14218
- init_chunk_STST7XWM();
14264
+ init_chunk_6WCPZ26B();
14219
14265
  init_chunk_JR2ITK6N();
14220
14266
  init_chunk_IG6QBZMA();
14221
14267
  init_chunk_ZJJ5ODOD();
@@ -14223,10 +14269,9 @@ var init_contracts = __esm({
14223
14269
  init_chunk_LBDH7LCG();
14224
14270
  init_chunk_4LXDRTO4();
14225
14271
  init_chunk_E4DIIOOE();
14226
- init_chunk_7CYHPF35();
14227
- init_chunk_LR5WDVCH();
14228
- init_chunk_OMZEKMYZ();
14229
- init_chunk_45TIBJK6();
14272
+ init_chunk_FMXFEZN4();
14273
+ init_chunk_5KFFZX2J();
14274
+ init_chunk_VBUWGVFY();
14230
14275
  init_chunk_NVKU5PPQ();
14231
14276
  init_chunk_2FCLSQSQ();
14232
14277
  init_chunk_FECLIZTY();
@@ -14238,7 +14283,6 @@ var init_contracts = __esm({
14238
14283
  init_chunk_ACN6GXU6();
14239
14284
  init_chunk_OMPT4ZHR();
14240
14285
  init_chunk_2PZIF56U();
14241
- init_chunk_UEJOG2Q7();
14242
14286
  init_chunk_SOJMWM63();
14243
14287
  init_chunk_WEXVYJ5H();
14244
14288
  init_chunk_LZDVDC2S();
@@ -20217,6 +20261,13 @@ function parseEvalYaml(filePath2, relPath, setName, hubFolder, bytesByHash) {
20217
20261
  if (targetBase) evalEntry.target_base = targetBase;
20218
20262
  const initialState = parseInitialStateField(data.initial_state, `Eval "${evalName}" in ${relPath}`);
20219
20263
  if (initialState) evalEntry.initial_state = initialState;
20264
+ const customer = parseFixtureField(
20265
+ data.customer_contact_id,
20266
+ `Eval "${evalName}" in ${relPath}`,
20267
+ "customer_contact_id",
20268
+ "the customer's contact id"
20269
+ );
20270
+ if (customer) evalEntry.customer_contact_id = customer;
20220
20271
  return evalEntry;
20221
20272
  }
20222
20273
  function parseInitialStateField(raw, label) {
@@ -20253,10 +20304,10 @@ function parseVariablesMap(raw, label) {
20253
20304
  }
20254
20305
  return vars;
20255
20306
  }
20256
- function parseFixtureField(raw, label, key) {
20307
+ function parseFixtureField(raw, label, key, hint = "the Rekor fixture name") {
20257
20308
  if (raw === void 0 || raw === null) return void 0;
20258
20309
  if (typeof raw !== "string") {
20259
- throw expected(`${label}: "${key}" must be a string (the Rekor fixture name).`);
20310
+ throw expected(`${label}: "${key}" must be a string (${hint}).`);
20260
20311
  }
20261
20312
  const trimmed = raw.trim();
20262
20313
  return trimmed.length > 0 ? trimmed : void 0;
@@ -20506,6 +20557,9 @@ function buildEvalYamlObject(evalEntry, slug) {
20506
20557
  if (Array.isArray(evalEntry.initial_state) && evalEntry.initial_state.length > 0) {
20507
20558
  out.initial_state = evalEntry.initial_state;
20508
20559
  }
20560
+ if (typeof evalEntry.customer_contact_id === "string" && evalEntry.customer_contact_id) {
20561
+ out.customer_contact_id = evalEntry.customer_contact_id;
20562
+ }
20509
20563
  assertAttachmentsAreLocalPaths(evalEntry.input, `eval "${evalEntry.name}" input`);
20510
20564
  out.input = evalEntry.input;
20511
20565
  out.expected = evalEntry.expected;
@@ -33021,8 +33075,8 @@ These commands need a browser sign-in (\`wayai login\`). An API token
33021
33075
  var init_rekor_toolset = __esm({
33022
33076
  "../../packages/core/dist/contracts/rekor-toolset.js"() {
33023
33077
  "use strict";
33024
- init_chunk_4I3WSYXD();
33025
- init_chunk_KWBAMM7C();
33078
+ init_chunk_BVQE66I2();
33079
+ init_chunk_BEOHBREG();
33026
33080
  init_chunk_DHPUPI4Y();
33027
33081
  }
33028
33082
  });