@wayai/cli 0.3.229 → 0.3.230
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 +633 -591
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -488,67 +488,6 @@ var init_sentry = __esm({
|
|
|
488
488
|
}
|
|
489
489
|
});
|
|
490
490
|
|
|
491
|
-
// ../../packages/core/dist/chunk-DHPUPI4Y.js
|
|
492
|
-
function normalizeAuthType(raw) {
|
|
493
|
-
if (VALID_AUTH_TYPES.has(raw)) return raw;
|
|
494
|
-
return LEGACY_AUTH_TYPE_MAP[raw] ?? raw;
|
|
495
|
-
}
|
|
496
|
-
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;
|
|
497
|
-
var init_chunk_DHPUPI4Y = __esm({
|
|
498
|
-
"../../packages/core/dist/chunk-DHPUPI4Y.js"() {
|
|
499
|
-
"use strict";
|
|
500
|
-
AUTH_TYPE = {
|
|
501
|
-
OAUTH: "oauth",
|
|
502
|
-
API_KEY: "api_key",
|
|
503
|
-
BASIC_AUTH: "basic_auth",
|
|
504
|
-
BEARER: "bearer",
|
|
505
|
-
NONE: "none"
|
|
506
|
-
};
|
|
507
|
-
ORG_CREDENTIAL_AUTH_TYPES = [
|
|
508
|
-
AUTH_TYPE.API_KEY,
|
|
509
|
-
AUTH_TYPE.BEARER,
|
|
510
|
-
AUTH_TYPE.BASIC_AUTH
|
|
511
|
-
];
|
|
512
|
-
AUTH_TYPE_DISPLAY = {
|
|
513
|
-
[AUTH_TYPE.OAUTH]: "OAuth",
|
|
514
|
-
[AUTH_TYPE.API_KEY]: "API Key",
|
|
515
|
-
[AUTH_TYPE.BASIC_AUTH]: "Basic Auth",
|
|
516
|
-
[AUTH_TYPE.BEARER]: "Bearer Token",
|
|
517
|
-
[AUTH_TYPE.NONE]: "No Authentication"
|
|
518
|
-
};
|
|
519
|
-
LEGACY_AUTH_TYPE_MAP = {
|
|
520
|
-
"OAuth": AUTH_TYPE.OAUTH,
|
|
521
|
-
"API Key": AUTH_TYPE.API_KEY,
|
|
522
|
-
"Basic Auth": AUTH_TYPE.BASIC_AUTH,
|
|
523
|
-
"Bearer Token": AUTH_TYPE.BEARER,
|
|
524
|
-
"No authentication": AUTH_TYPE.NONE,
|
|
525
|
-
// Also handle the old DISPLAY_TO_CODE bug where 'basic' was used instead of 'basic_auth'
|
|
526
|
-
"basic": AUTH_TYPE.BASIC_AUTH
|
|
527
|
-
};
|
|
528
|
-
VALID_AUTH_TYPES = new Set(Object.values(AUTH_TYPE));
|
|
529
|
-
AGENT_ROLES = [
|
|
530
|
-
"pilot",
|
|
531
|
-
"copilot",
|
|
532
|
-
"pilot_specialist",
|
|
533
|
-
"copilot_specialist",
|
|
534
|
-
"pilot_advisor",
|
|
535
|
-
"copilot_advisor",
|
|
536
|
-
"monitor",
|
|
537
|
-
"conversation_evaluator",
|
|
538
|
-
"message_evaluator",
|
|
539
|
-
"summarizer",
|
|
540
|
-
"consultant",
|
|
541
|
-
"pilot_voice"
|
|
542
|
-
];
|
|
543
|
-
PILOT_TRACK_ROLES = ["pilot", "pilot_specialist"];
|
|
544
|
-
COPILOT_TRACK_ROLES = ["copilot", "copilot_specialist"];
|
|
545
|
-
CUSTOMER_FACING_AGENT_ROLES = [...PILOT_TRACK_ROLES, "pilot_advisor"];
|
|
546
|
-
SAFE_USER_ID_REGEX = /^[A-Za-z0-9_-]{1,64}$/;
|
|
547
|
-
SUPPORTED_LOCALES = ["en", "pt", "es"];
|
|
548
|
-
SKILL_INSTALL_COMMAND = "mkdir -p .claude && npx skills add wayai-pro/wayai-skill -y";
|
|
549
|
-
}
|
|
550
|
-
});
|
|
551
|
-
|
|
552
491
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
553
492
|
var util, objectUtil, ZodParsedType, getParsedType;
|
|
554
493
|
var init_util = __esm({
|
|
@@ -4665,6 +4604,99 @@ var init_zod = __esm({
|
|
|
4665
4604
|
}
|
|
4666
4605
|
});
|
|
4667
4606
|
|
|
4607
|
+
// ../../packages/core/dist/chunk-GK27ENTT.js
|
|
4608
|
+
var BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery;
|
|
4609
|
+
var init_chunk_GK27ENTT = __esm({
|
|
4610
|
+
"../../packages/core/dist/chunk-GK27ENTT.js"() {
|
|
4611
|
+
"use strict";
|
|
4612
|
+
init_zod();
|
|
4613
|
+
BASE_CREDENTIAL_MANAGED_BY = {
|
|
4614
|
+
DIRECT: "direct",
|
|
4615
|
+
ORG_LINK: "org-link"
|
|
4616
|
+
};
|
|
4617
|
+
BASE_CREDENTIAL_NAME_MAX = 100;
|
|
4618
|
+
baseCredentialNameSchema = external_exports.string().min(1).max(BASE_CREDENTIAL_NAME_MAX).regex(
|
|
4619
|
+
/^[A-Za-z0-9][A-Za-z0-9._:@+~=-]*$/,
|
|
4620
|
+
"name must use letters, digits and '. _ : @ + ~ = -', starting with a letter or digit"
|
|
4621
|
+
);
|
|
4622
|
+
createBaseCredentialLinkBody = external_exports.object({
|
|
4623
|
+
organization_id: external_exports.string().uuid(),
|
|
4624
|
+
base_id: external_exports.string().min(1),
|
|
4625
|
+
/** Defaults to a slug derived from the credential's display name. */
|
|
4626
|
+
name: baseCredentialNameSchema.optional()
|
|
4627
|
+
});
|
|
4628
|
+
baseCredentialLinkParams = external_exports.object({
|
|
4629
|
+
id: external_exports.string().uuid(),
|
|
4630
|
+
base_credential_id: external_exports.string().min(1)
|
|
4631
|
+
});
|
|
4632
|
+
baseCredentialLinkQuery = external_exports.object({
|
|
4633
|
+
organization_id: external_exports.string().uuid(),
|
|
4634
|
+
base_id: external_exports.string().min(1)
|
|
4635
|
+
});
|
|
4636
|
+
}
|
|
4637
|
+
});
|
|
4638
|
+
|
|
4639
|
+
// ../../packages/core/dist/chunk-DHPUPI4Y.js
|
|
4640
|
+
function normalizeAuthType(raw) {
|
|
4641
|
+
if (VALID_AUTH_TYPES.has(raw)) return raw;
|
|
4642
|
+
return LEGACY_AUTH_TYPE_MAP[raw] ?? raw;
|
|
4643
|
+
}
|
|
4644
|
+
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;
|
|
4645
|
+
var init_chunk_DHPUPI4Y = __esm({
|
|
4646
|
+
"../../packages/core/dist/chunk-DHPUPI4Y.js"() {
|
|
4647
|
+
"use strict";
|
|
4648
|
+
AUTH_TYPE = {
|
|
4649
|
+
OAUTH: "oauth",
|
|
4650
|
+
API_KEY: "api_key",
|
|
4651
|
+
BASIC_AUTH: "basic_auth",
|
|
4652
|
+
BEARER: "bearer",
|
|
4653
|
+
NONE: "none"
|
|
4654
|
+
};
|
|
4655
|
+
ORG_CREDENTIAL_AUTH_TYPES = [
|
|
4656
|
+
AUTH_TYPE.API_KEY,
|
|
4657
|
+
AUTH_TYPE.BEARER,
|
|
4658
|
+
AUTH_TYPE.BASIC_AUTH
|
|
4659
|
+
];
|
|
4660
|
+
AUTH_TYPE_DISPLAY = {
|
|
4661
|
+
[AUTH_TYPE.OAUTH]: "OAuth",
|
|
4662
|
+
[AUTH_TYPE.API_KEY]: "API Key",
|
|
4663
|
+
[AUTH_TYPE.BASIC_AUTH]: "Basic Auth",
|
|
4664
|
+
[AUTH_TYPE.BEARER]: "Bearer Token",
|
|
4665
|
+
[AUTH_TYPE.NONE]: "No Authentication"
|
|
4666
|
+
};
|
|
4667
|
+
LEGACY_AUTH_TYPE_MAP = {
|
|
4668
|
+
"OAuth": AUTH_TYPE.OAUTH,
|
|
4669
|
+
"API Key": AUTH_TYPE.API_KEY,
|
|
4670
|
+
"Basic Auth": AUTH_TYPE.BASIC_AUTH,
|
|
4671
|
+
"Bearer Token": AUTH_TYPE.BEARER,
|
|
4672
|
+
"No authentication": AUTH_TYPE.NONE,
|
|
4673
|
+
// Also handle the old DISPLAY_TO_CODE bug where 'basic' was used instead of 'basic_auth'
|
|
4674
|
+
"basic": AUTH_TYPE.BASIC_AUTH
|
|
4675
|
+
};
|
|
4676
|
+
VALID_AUTH_TYPES = new Set(Object.values(AUTH_TYPE));
|
|
4677
|
+
AGENT_ROLES = [
|
|
4678
|
+
"pilot",
|
|
4679
|
+
"copilot",
|
|
4680
|
+
"pilot_specialist",
|
|
4681
|
+
"copilot_specialist",
|
|
4682
|
+
"pilot_advisor",
|
|
4683
|
+
"copilot_advisor",
|
|
4684
|
+
"monitor",
|
|
4685
|
+
"conversation_evaluator",
|
|
4686
|
+
"message_evaluator",
|
|
4687
|
+
"summarizer",
|
|
4688
|
+
"consultant",
|
|
4689
|
+
"pilot_voice"
|
|
4690
|
+
];
|
|
4691
|
+
PILOT_TRACK_ROLES = ["pilot", "pilot_specialist"];
|
|
4692
|
+
COPILOT_TRACK_ROLES = ["copilot", "copilot_specialist"];
|
|
4693
|
+
CUSTOMER_FACING_AGENT_ROLES = [...PILOT_TRACK_ROLES, "pilot_advisor"];
|
|
4694
|
+
SAFE_USER_ID_REGEX = /^[A-Za-z0-9_-]{1,64}$/;
|
|
4695
|
+
SUPPORTED_LOCALES = ["en", "pt", "es"];
|
|
4696
|
+
SKILL_INSTALL_COMMAND = "mkdir -p .claude && npx skills add wayai-pro/wayai-skill -y";
|
|
4697
|
+
}
|
|
4698
|
+
});
|
|
4699
|
+
|
|
4668
4700
|
// ../../packages/core/dist/chunk-SXDX4GHS.js
|
|
4669
4701
|
var orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody;
|
|
4670
4702
|
var init_chunk_SXDX4GHS = __esm({
|
|
@@ -5257,181 +5289,6 @@ var init_chunk_IPXBFWUU = __esm({
|
|
|
5257
5289
|
}
|
|
5258
5290
|
});
|
|
5259
5291
|
|
|
5260
|
-
// ../../packages/core/dist/chunk-GK27ENTT.js
|
|
5261
|
-
var BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery;
|
|
5262
|
-
var init_chunk_GK27ENTT = __esm({
|
|
5263
|
-
"../../packages/core/dist/chunk-GK27ENTT.js"() {
|
|
5264
|
-
"use strict";
|
|
5265
|
-
init_zod();
|
|
5266
|
-
BASE_CREDENTIAL_MANAGED_BY = {
|
|
5267
|
-
DIRECT: "direct",
|
|
5268
|
-
ORG_LINK: "org-link"
|
|
5269
|
-
};
|
|
5270
|
-
BASE_CREDENTIAL_NAME_MAX = 100;
|
|
5271
|
-
baseCredentialNameSchema = external_exports.string().min(1).max(BASE_CREDENTIAL_NAME_MAX).regex(
|
|
5272
|
-
/^[A-Za-z0-9][A-Za-z0-9._:@+~=-]*$/,
|
|
5273
|
-
"name must use letters, digits and '. _ : @ + ~ = -', starting with a letter or digit"
|
|
5274
|
-
);
|
|
5275
|
-
createBaseCredentialLinkBody = external_exports.object({
|
|
5276
|
-
organization_id: external_exports.string().uuid(),
|
|
5277
|
-
base_id: external_exports.string().min(1),
|
|
5278
|
-
/** Defaults to a slug derived from the credential's display name. */
|
|
5279
|
-
name: baseCredentialNameSchema.optional()
|
|
5280
|
-
});
|
|
5281
|
-
baseCredentialLinkParams = external_exports.object({
|
|
5282
|
-
id: external_exports.string().uuid(),
|
|
5283
|
-
base_credential_id: external_exports.string().min(1)
|
|
5284
|
-
});
|
|
5285
|
-
baseCredentialLinkQuery = external_exports.object({
|
|
5286
|
-
organization_id: external_exports.string().uuid(),
|
|
5287
|
-
base_id: external_exports.string().min(1)
|
|
5288
|
-
});
|
|
5289
|
-
}
|
|
5290
|
-
});
|
|
5291
|
-
|
|
5292
|
-
// ../../packages/core/dist/chunk-IPDOHAZ5.js
|
|
5293
|
-
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;
|
|
5294
|
-
var init_chunk_IPDOHAZ5 = __esm({
|
|
5295
|
-
"../../packages/core/dist/chunk-IPDOHAZ5.js"() {
|
|
5296
|
-
"use strict";
|
|
5297
|
-
init_chunk_HZ6CADSY();
|
|
5298
|
-
init_zod();
|
|
5299
|
-
reportSourceSchema = external_exports.enum(["sentry", "cli", "review", "security_audit"]);
|
|
5300
|
-
intakeReportSourceSchema = external_exports.enum(["cli", "review", "security_audit"]);
|
|
5301
|
-
reportClassificationSchema = external_exports.enum(["bug", "flaky_test", "security", "enhancement"]);
|
|
5302
|
-
reportStatusSchema = external_exports.enum([
|
|
5303
|
-
"pending",
|
|
5304
|
-
"grouped",
|
|
5305
|
-
"escalated",
|
|
5306
|
-
"shipped",
|
|
5307
|
-
"contested",
|
|
5308
|
-
"addressed",
|
|
5309
|
-
"dismissed"
|
|
5310
|
-
]);
|
|
5311
|
-
reportLocaleSchema = external_exports.enum(["en", "pt", "es"]);
|
|
5312
|
-
reportMessageAuthorRoleSchema = external_exports.enum(["reporter", "triage", "fixer", "system"]);
|
|
5313
|
-
reportMessageSchema = external_exports.object({
|
|
5314
|
-
message_id: external_exports.string(),
|
|
5315
|
-
author_role: reportMessageAuthorRoleSchema,
|
|
5316
|
-
/** The status transition this note accompanied (e.g. 'shipped'); null for a free/system note. */
|
|
5317
|
-
transition: external_exports.string().nullable(),
|
|
5318
|
-
body: external_exports.string(),
|
|
5319
|
-
created_at: timestampSchema,
|
|
5320
|
-
/**
|
|
5321
|
-
* Visibility: `false` = reporter-facing (the default for every narrative entry); `true` =
|
|
5322
|
-
* triage-internal (e.g. a `hold` rationale) — surfaced to platform admins only and NEVER
|
|
5323
|
-
* returned on the reporter read path. The reporter's `GET /api/reports/:id` filters these out.
|
|
5324
|
-
*/
|
|
5325
|
-
internal: external_exports.boolean()
|
|
5326
|
-
});
|
|
5327
|
-
sentryRefStatusSchema = external_exports.enum(["valid", "not_found", "mismatch", "unverified"]);
|
|
5328
|
-
createReportBody = external_exports.object({
|
|
5329
|
-
title: external_exports.string().min(5).max(256),
|
|
5330
|
-
description: external_exports.string().min(10).max(5e3),
|
|
5331
|
-
steps_to_reproduce: external_exports.string().max(3e3).optional(),
|
|
5332
|
-
error_message: external_exports.string().max(2e3).optional(),
|
|
5333
|
-
// Taxonomy (server defaults: source=cli, classification=bug when absent).
|
|
5334
|
-
source: intakeReportSourceSchema.optional(),
|
|
5335
|
-
classification: reportClassificationSchema.optional(),
|
|
5336
|
-
// Stable dedup key (e.g. "<file>::<test>" for flaky, "<file>:<line>" for
|
|
5337
|
-
// security). When present, the fingerprint uses it instead of the body hash.
|
|
5338
|
-
dedup_key: external_exports.string().min(1).max(256).optional(),
|
|
5339
|
-
// Context fields (auto-captured by the CLI)
|
|
5340
|
-
organization_id: external_exports.string().optional(),
|
|
5341
|
-
hub_id: external_exports.string().uuid().optional(),
|
|
5342
|
-
hub_name: external_exports.string().max(256).optional(),
|
|
5343
|
-
conversation_id: external_exports.string().uuid().optional(),
|
|
5344
|
-
agent_id: external_exports.string().uuid().optional(),
|
|
5345
|
-
agent_name: external_exports.string().max(256).optional(),
|
|
5346
|
-
client_version: external_exports.string().max(64).optional(),
|
|
5347
|
-
additional_context: external_exports.string().max(2e3).optional()
|
|
5348
|
-
});
|
|
5349
|
-
editReportBody = external_exports.object({
|
|
5350
|
-
title: external_exports.string().min(5).max(256).optional(),
|
|
5351
|
-
description: external_exports.string().min(10).max(5e3).optional(),
|
|
5352
|
-
steps_to_reproduce: external_exports.string().max(3e3).optional(),
|
|
5353
|
-
error_message: external_exports.string().max(2e3).optional(),
|
|
5354
|
-
additional_context: external_exports.string().max(2e3).optional()
|
|
5355
|
-
}).strict().refine((b) => Object.keys(b).length > 0, {
|
|
5356
|
-
message: "at least one field must be provided"
|
|
5357
|
-
});
|
|
5358
|
-
reporterReportSummarySchema = external_exports.object({
|
|
5359
|
-
report_id: external_exports.string(),
|
|
5360
|
-
title: external_exports.string(),
|
|
5361
|
-
description: external_exports.string(),
|
|
5362
|
-
classification: reportClassificationSchema,
|
|
5363
|
-
status: reportStatusSchema,
|
|
5364
|
-
created_at: timestampSchema,
|
|
5365
|
-
triaged_at: timestampSchema.nullable(),
|
|
5366
|
-
resolved_at: timestampSchema.nullable(),
|
|
5367
|
-
/** How many times the reporter has contested (gates the hard cap). */
|
|
5368
|
-
contest_count: external_exports.number(),
|
|
5369
|
-
/** True once triage issued a non-contestable (final) dismissal. */
|
|
5370
|
-
dismissal_final: external_exports.boolean()
|
|
5371
|
-
});
|
|
5372
|
-
reporterListResponseSchema = external_exports.object({
|
|
5373
|
-
data: external_exports.array(reporterReportSummarySchema)
|
|
5374
|
-
});
|
|
5375
|
-
getReportResponseSchema = external_exports.object({
|
|
5376
|
-
report: reporterReportSummarySchema,
|
|
5377
|
-
messages: external_exports.array(reportMessageSchema)
|
|
5378
|
-
});
|
|
5379
|
-
reporterTransitionResponseSchema = external_exports.object({
|
|
5380
|
-
report: reporterReportSummarySchema
|
|
5381
|
-
});
|
|
5382
|
-
contestReportBody = external_exports.object({
|
|
5383
|
-
reason: external_exports.string().min(1).max(5e3)
|
|
5384
|
-
});
|
|
5385
|
-
reporterListQuery = external_exports.object({
|
|
5386
|
-
status: reportStatusSchema.optional()
|
|
5387
|
-
});
|
|
5388
|
-
listReportsQuery = external_exports.object({
|
|
5389
|
-
status: reportStatusSchema.optional(),
|
|
5390
|
-
source: reportSourceSchema.optional(),
|
|
5391
|
-
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
5392
|
-
offset: external_exports.coerce.number().int().min(0).optional(),
|
|
5393
|
-
/** ISO 8601 lower bound on created_at. */
|
|
5394
|
-
since: external_exports.string().datetime().optional(),
|
|
5395
|
-
/**
|
|
5396
|
-
* ISO 8601 lower bound on resolution time — "what did we resolve recently", which `since`
|
|
5397
|
-
* (a created_at filter) cannot answer for a long-lived report resolved yesterday. Implies
|
|
5398
|
-
* a terminal status (`addressed`/`dismissed`) and orders on that same axis.
|
|
5399
|
-
*/
|
|
5400
|
-
resolved_since: external_exports.string().datetime().optional()
|
|
5401
|
-
});
|
|
5402
|
-
GITHUB_ISSUE_URL_REGEX = /^https:\/\/github\.com\/[^/]+\/[^/]+\/issues\/\d+(?:[/?#]|$)/;
|
|
5403
|
-
githubIssueUrlSchema = external_exports.string().url().refine((u) => GITHUB_ISSUE_URL_REGEX.test(u), {
|
|
5404
|
-
message: "must be an https://github.com/<owner>/<repo>/issues/<number> URL"
|
|
5405
|
-
});
|
|
5406
|
-
transitionReportBody = external_exports.discriminatedUnion("target", [
|
|
5407
|
-
external_exports.object({
|
|
5408
|
-
target: external_exports.literal("escalated"),
|
|
5409
|
-
gh_issue_url: githubIssueUrlSchema,
|
|
5410
|
-
ai_verdict: external_exports.string().max(2e3).optional()
|
|
5411
|
-
}),
|
|
5412
|
-
external_exports.object({
|
|
5413
|
-
target: external_exports.literal("shipped"),
|
|
5414
|
-
note: external_exports.string().min(1).max(2e3).optional()
|
|
5415
|
-
}),
|
|
5416
|
-
external_exports.object({
|
|
5417
|
-
target: external_exports.literal("addressed")
|
|
5418
|
-
}),
|
|
5419
|
-
external_exports.object({
|
|
5420
|
-
target: external_exports.literal("dismissed"),
|
|
5421
|
-
dismissal_reason: external_exports.string().min(1).max(5e3),
|
|
5422
|
-
ai_verdict: external_exports.string().max(2e3).optional(),
|
|
5423
|
-
final: external_exports.boolean().optional()
|
|
5424
|
-
})
|
|
5425
|
-
]);
|
|
5426
|
-
groupReportsBody = external_exports.object({
|
|
5427
|
-
member_ids: external_exports.array(external_exports.string().uuid()).min(1).max(100)
|
|
5428
|
-
});
|
|
5429
|
-
holdReportBody = external_exports.object({
|
|
5430
|
-
reason: external_exports.string().min(1).max(5e3)
|
|
5431
|
-
});
|
|
5432
|
-
}
|
|
5433
|
-
});
|
|
5434
|
-
|
|
5435
5292
|
// ../../packages/core/dist/chunk-GPM7PE44.js
|
|
5436
5293
|
var bootstrapQuery;
|
|
5437
5294
|
var init_chunk_GPM7PE44 = __esm({
|
|
@@ -6541,57 +6398,145 @@ var init_chunk_4MRBBR5L = __esm({
|
|
|
6541
6398
|
}
|
|
6542
6399
|
});
|
|
6543
6400
|
|
|
6544
|
-
// ../../packages/core/dist/chunk-
|
|
6545
|
-
var
|
|
6546
|
-
var
|
|
6547
|
-
"../../packages/core/dist/chunk-
|
|
6401
|
+
// ../../packages/core/dist/chunk-IPDOHAZ5.js
|
|
6402
|
+
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;
|
|
6403
|
+
var init_chunk_IPDOHAZ5 = __esm({
|
|
6404
|
+
"../../packages/core/dist/chunk-IPDOHAZ5.js"() {
|
|
6548
6405
|
"use strict";
|
|
6549
|
-
|
|
6406
|
+
init_chunk_HZ6CADSY();
|
|
6550
6407
|
init_zod();
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6408
|
+
reportSourceSchema = external_exports.enum(["sentry", "cli", "review", "security_audit"]);
|
|
6409
|
+
intakeReportSourceSchema = external_exports.enum(["cli", "review", "security_audit"]);
|
|
6410
|
+
reportClassificationSchema = external_exports.enum(["bug", "flaky_test", "security", "enhancement"]);
|
|
6411
|
+
reportStatusSchema = external_exports.enum([
|
|
6412
|
+
"pending",
|
|
6413
|
+
"grouped",
|
|
6414
|
+
"escalated",
|
|
6415
|
+
"shipped",
|
|
6416
|
+
"contested",
|
|
6417
|
+
"addressed",
|
|
6418
|
+
"dismissed"
|
|
6419
|
+
]);
|
|
6420
|
+
reportLocaleSchema = external_exports.enum(["en", "pt", "es"]);
|
|
6421
|
+
reportMessageAuthorRoleSchema = external_exports.enum(["reporter", "triage", "fixer", "system"]);
|
|
6422
|
+
reportMessageSchema = external_exports.object({
|
|
6423
|
+
message_id: external_exports.string(),
|
|
6424
|
+
author_role: reportMessageAuthorRoleSchema,
|
|
6425
|
+
/** The status transition this note accompanied (e.g. 'shipped'); null for a free/system note. */
|
|
6426
|
+
transition: external_exports.string().nullable(),
|
|
6427
|
+
body: external_exports.string(),
|
|
6428
|
+
created_at: timestampSchema,
|
|
6429
|
+
/**
|
|
6430
|
+
* Visibility: `false` = reporter-facing (the default for every narrative entry); `true` =
|
|
6431
|
+
* triage-internal (e.g. a `hold` rationale) — surfaced to platform admins only and NEVER
|
|
6432
|
+
* returned on the reporter read path. The reporter's `GET /api/reports/:id` filters these out.
|
|
6433
|
+
*/
|
|
6434
|
+
internal: external_exports.boolean()
|
|
6563
6435
|
});
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6436
|
+
sentryRefStatusSchema = external_exports.enum(["valid", "not_found", "mismatch", "unverified"]);
|
|
6437
|
+
createReportBody = external_exports.object({
|
|
6438
|
+
title: external_exports.string().min(5).max(256),
|
|
6439
|
+
description: external_exports.string().min(10).max(5e3),
|
|
6440
|
+
steps_to_reproduce: external_exports.string().max(3e3).optional(),
|
|
6441
|
+
error_message: external_exports.string().max(2e3).optional(),
|
|
6442
|
+
// Taxonomy (server defaults: source=cli, classification=bug when absent).
|
|
6443
|
+
source: intakeReportSourceSchema.optional(),
|
|
6444
|
+
classification: reportClassificationSchema.optional(),
|
|
6445
|
+
// Stable dedup key (e.g. "<file>::<test>" for flaky, "<file>:<line>" for
|
|
6446
|
+
// security). When present, the fingerprint uses it instead of the body hash.
|
|
6447
|
+
dedup_key: external_exports.string().min(1).max(256).optional(),
|
|
6448
|
+
// Context fields (auto-captured by the CLI)
|
|
6449
|
+
organization_id: external_exports.string().optional(),
|
|
6450
|
+
hub_id: external_exports.string().uuid().optional(),
|
|
6451
|
+
hub_name: external_exports.string().max(256).optional(),
|
|
6452
|
+
conversation_id: external_exports.string().uuid().optional(),
|
|
6453
|
+
agent_id: external_exports.string().uuid().optional(),
|
|
6454
|
+
agent_name: external_exports.string().max(256).optional(),
|
|
6455
|
+
client_version: external_exports.string().max(64).optional(),
|
|
6456
|
+
additional_context: external_exports.string().max(2e3).optional()
|
|
6573
6457
|
});
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6458
|
+
editReportBody = external_exports.object({
|
|
6459
|
+
title: external_exports.string().min(5).max(256).optional(),
|
|
6460
|
+
description: external_exports.string().min(10).max(5e3).optional(),
|
|
6461
|
+
steps_to_reproduce: external_exports.string().max(3e3).optional(),
|
|
6462
|
+
error_message: external_exports.string().max(2e3).optional(),
|
|
6463
|
+
additional_context: external_exports.string().max(2e3).optional()
|
|
6464
|
+
}).strict().refine((b) => Object.keys(b).length > 0, {
|
|
6465
|
+
message: "at least one field must be provided"
|
|
6578
6466
|
});
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6467
|
+
reporterReportSummarySchema = external_exports.object({
|
|
6468
|
+
report_id: external_exports.string(),
|
|
6469
|
+
title: external_exports.string(),
|
|
6470
|
+
description: external_exports.string(),
|
|
6471
|
+
classification: reportClassificationSchema,
|
|
6472
|
+
status: reportStatusSchema,
|
|
6473
|
+
created_at: timestampSchema,
|
|
6474
|
+
triaged_at: timestampSchema.nullable(),
|
|
6475
|
+
resolved_at: timestampSchema.nullable(),
|
|
6476
|
+
/** How many times the reporter has contested (gates the hard cap). */
|
|
6477
|
+
contest_count: external_exports.number(),
|
|
6478
|
+
/** True once triage issued a non-contestable (final) dismissal. */
|
|
6479
|
+
dismissal_final: external_exports.boolean()
|
|
6583
6480
|
});
|
|
6584
|
-
|
|
6585
|
-
|
|
6481
|
+
reporterListResponseSchema = external_exports.object({
|
|
6482
|
+
data: external_exports.array(reporterReportSummarySchema)
|
|
6586
6483
|
});
|
|
6587
|
-
|
|
6588
|
-
|
|
6484
|
+
getReportResponseSchema = external_exports.object({
|
|
6485
|
+
report: reporterReportSummarySchema,
|
|
6486
|
+
messages: external_exports.array(reportMessageSchema)
|
|
6589
6487
|
});
|
|
6590
|
-
|
|
6591
|
-
|
|
6488
|
+
reporterTransitionResponseSchema = external_exports.object({
|
|
6489
|
+
report: reporterReportSummarySchema
|
|
6592
6490
|
});
|
|
6593
|
-
|
|
6594
|
-
|
|
6491
|
+
contestReportBody = external_exports.object({
|
|
6492
|
+
reason: external_exports.string().min(1).max(5e3)
|
|
6493
|
+
});
|
|
6494
|
+
reporterListQuery = external_exports.object({
|
|
6495
|
+
status: reportStatusSchema.optional()
|
|
6496
|
+
});
|
|
6497
|
+
listReportsQuery = external_exports.object({
|
|
6498
|
+
status: reportStatusSchema.optional(),
|
|
6499
|
+
source: reportSourceSchema.optional(),
|
|
6500
|
+
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
6501
|
+
offset: external_exports.coerce.number().int().min(0).optional(),
|
|
6502
|
+
/** ISO 8601 lower bound on created_at. */
|
|
6503
|
+
since: external_exports.string().datetime().optional(),
|
|
6504
|
+
/**
|
|
6505
|
+
* ISO 8601 lower bound on resolution time — "what did we resolve recently", which `since`
|
|
6506
|
+
* (a created_at filter) cannot answer for a long-lived report resolved yesterday. Implies
|
|
6507
|
+
* a terminal status (`addressed`/`dismissed`) and orders on that same axis.
|
|
6508
|
+
*/
|
|
6509
|
+
resolved_since: external_exports.string().datetime().optional()
|
|
6510
|
+
});
|
|
6511
|
+
GITHUB_ISSUE_URL_REGEX = /^https:\/\/github\.com\/[^/]+\/[^/]+\/issues\/\d+(?:[/?#]|$)/;
|
|
6512
|
+
githubIssueUrlSchema = external_exports.string().url().refine((u) => GITHUB_ISSUE_URL_REGEX.test(u), {
|
|
6513
|
+
message: "must be an https://github.com/<owner>/<repo>/issues/<number> URL"
|
|
6514
|
+
});
|
|
6515
|
+
transitionReportBody = external_exports.discriminatedUnion("target", [
|
|
6516
|
+
external_exports.object({
|
|
6517
|
+
target: external_exports.literal("escalated"),
|
|
6518
|
+
gh_issue_url: githubIssueUrlSchema,
|
|
6519
|
+
ai_verdict: external_exports.string().max(2e3).optional()
|
|
6520
|
+
}),
|
|
6521
|
+
external_exports.object({
|
|
6522
|
+
target: external_exports.literal("shipped"),
|
|
6523
|
+
note: external_exports.string().min(1).max(2e3).optional()
|
|
6524
|
+
}),
|
|
6525
|
+
external_exports.object({
|
|
6526
|
+
target: external_exports.literal("addressed")
|
|
6527
|
+
}),
|
|
6528
|
+
external_exports.object({
|
|
6529
|
+
target: external_exports.literal("dismissed"),
|
|
6530
|
+
dismissal_reason: external_exports.string().min(1).max(5e3),
|
|
6531
|
+
ai_verdict: external_exports.string().max(2e3).optional(),
|
|
6532
|
+
final: external_exports.boolean().optional()
|
|
6533
|
+
})
|
|
6534
|
+
]);
|
|
6535
|
+
groupReportsBody = external_exports.object({
|
|
6536
|
+
member_ids: external_exports.array(external_exports.string().uuid()).min(1).max(100)
|
|
6537
|
+
});
|
|
6538
|
+
holdReportBody = external_exports.object({
|
|
6539
|
+
reason: external_exports.string().min(1).max(5e3)
|
|
6595
6540
|
});
|
|
6596
6541
|
}
|
|
6597
6542
|
});
|
|
@@ -6714,101 +6659,6 @@ var init_chunk_FPSDNS2E = __esm({
|
|
|
6714
6659
|
}
|
|
6715
6660
|
});
|
|
6716
6661
|
|
|
6717
|
-
// ../../packages/core/dist/chunk-LKBSHANA.js
|
|
6718
|
-
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;
|
|
6719
|
-
var init_chunk_LKBSHANA = __esm({
|
|
6720
|
-
"../../packages/core/dist/chunk-LKBSHANA.js"() {
|
|
6721
|
-
"use strict";
|
|
6722
|
-
init_zod();
|
|
6723
|
-
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})?$/;
|
|
6724
|
-
DESKTOP_PLATFORMS = ["darwin", "win32"];
|
|
6725
|
-
DESKTOP_FLAVORS = ["production", "development"];
|
|
6726
|
-
desktopShellInfoSchema = external_exports.object({
|
|
6727
|
-
/** The shell's own release version, independent of the web deploy. */
|
|
6728
|
-
shellVersion: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
|
|
6729
|
-
/** The Electron runtime the shell was built with. */
|
|
6730
|
-
electronVersion: external_exports.string().regex(/^\d{1,4}\.\d{1,4}\.\d{1,4}(-[0-9A-Za-z.-]{1,32})?$/),
|
|
6731
|
-
platform: external_exports.enum(DESKTOP_PLATFORMS),
|
|
6732
|
-
/** CPU architecture as Node reports it (`arm64`, `x64`). */
|
|
6733
|
-
arch: external_exports.string().regex(/^[a-z0-9_]{1,16}$/),
|
|
6734
|
-
flavor: external_exports.enum(DESKTOP_FLAVORS),
|
|
6735
|
-
/**
|
|
6736
|
-
* Present, and true, when the shell runs from the Microsoft Store's package: the Store updates it,
|
|
6737
|
-
* and Windows alone opens it at login (the package's startup task, which the person turns on in
|
|
6738
|
-
* Windows' settings). An optional field, so no new `bridgeVersion`: an older page ignores it, and
|
|
6739
|
-
* its absence is every other shell.
|
|
6740
|
-
*/
|
|
6741
|
-
store: external_exports.literal(true).optional()
|
|
6742
|
-
});
|
|
6743
|
-
DESKTOP_PRESENCE_STATES = ["present", "away"];
|
|
6744
|
-
desktopPresenceSchema = external_exports.object({
|
|
6745
|
-
presence: external_exports.enum(DESKTOP_PRESENCE_STATES),
|
|
6746
|
-
mainWindow: external_exports.object({
|
|
6747
|
-
shown: external_exports.boolean(),
|
|
6748
|
-
focused: external_exports.boolean()
|
|
6749
|
-
})
|
|
6750
|
-
});
|
|
6751
|
-
desktopUpdateSchema = external_exports.object({
|
|
6752
|
-
ready: external_exports.object({
|
|
6753
|
-
version: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
|
|
6754
|
-
offerRestart: external_exports.boolean()
|
|
6755
|
-
}).nullable()
|
|
6756
|
-
});
|
|
6757
|
-
DESKTOP_SIGN_IN_URL_MAX_LENGTH = 4096;
|
|
6758
|
-
DESKTOP_APP_PATH_MAX_LENGTH = 512;
|
|
6759
|
-
desktopAppPathSchema = external_exports.string().max(DESKTOP_APP_PATH_MAX_LENGTH).regex(/^\/(?![/\\])[^\s\\]*$/);
|
|
6760
|
-
DESKTOP_NOTIFICATION_KINDS = ["handoff", "message", "summary"];
|
|
6761
|
-
DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH = 200;
|
|
6762
|
-
DESKTOP_NOTIFICATION_BODY_MAX_LENGTH = 500;
|
|
6763
|
-
notificationTitleSchema = external_exports.string().min(1).max(DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH);
|
|
6764
|
-
notificationBodySchema = external_exports.string().max(DESKTOP_NOTIFICATION_BODY_MAX_LENGTH);
|
|
6765
|
-
desktopNotificationSchema = external_exports.object({
|
|
6766
|
-
kind: external_exports.enum(DESKTOP_NOTIFICATION_KINDS),
|
|
6767
|
-
title: notificationTitleSchema,
|
|
6768
|
-
body: notificationBodySchema,
|
|
6769
|
-
path: desktopAppPathSchema,
|
|
6770
|
-
withoutPreview: external_exports.object({ title: notificationTitleSchema, body: notificationBodySchema }).optional()
|
|
6771
|
-
});
|
|
6772
|
-
DESKTOP_BADGE_MAX_COUNT = 1e6;
|
|
6773
|
-
DESKTOP_BADGE_LABEL_MAX_LENGTH = 200;
|
|
6774
|
-
desktopBadgeSchema = external_exports.object({
|
|
6775
|
-
count: external_exports.number().int().min(0).max(DESKTOP_BADGE_MAX_COUNT),
|
|
6776
|
-
label: external_exports.string().max(DESKTOP_BADGE_LABEL_MAX_LENGTH)
|
|
6777
|
-
});
|
|
6778
|
-
desktopNavigateSchema = external_exports.object({
|
|
6779
|
-
path: desktopAppPathSchema
|
|
6780
|
-
});
|
|
6781
|
-
desktopSettingsSchema = external_exports.object({
|
|
6782
|
-
/** The app opens when the person logs in to the computer: the operating system's own login item. */
|
|
6783
|
-
openAtLogin: external_exports.boolean(),
|
|
6784
|
-
/** Closing the window keeps the app running in the tray (true), or quits it (false). */
|
|
6785
|
-
closeToTray: external_exports.boolean(),
|
|
6786
|
-
/** The shell shows notifications (true), or none (false). The badge is not a notification. */
|
|
6787
|
-
notifications: external_exports.boolean(),
|
|
6788
|
-
/**
|
|
6789
|
-
* A customer message's notification shows the customer's name and words, where the platform
|
|
6790
|
-
* allows them at all (`desktopShowsCustomerWords`: macOS); elsewhere the shell never shows them.
|
|
6791
|
-
*/
|
|
6792
|
-
messagePreview: external_exports.boolean()
|
|
6793
|
-
});
|
|
6794
|
-
desktopSettingsChangeSchema = desktopSettingsSchema.partial().strict().refine((change) => Object.values(change).every((value) => typeof value === "boolean"), {
|
|
6795
|
-
message: "each setting changed is true or false"
|
|
6796
|
-
});
|
|
6797
|
-
desktopBridgeArgsSchemas = {
|
|
6798
|
-
getShellInfo: external_exports.tuple([]),
|
|
6799
|
-
getPresence: external_exports.tuple([]),
|
|
6800
|
-
openSignIn: external_exports.tuple([external_exports.string().max(DESKTOP_SIGN_IN_URL_MAX_LENGTH)]),
|
|
6801
|
-
getUpdate: external_exports.tuple([]),
|
|
6802
|
-
restartToUpdate: external_exports.tuple([]),
|
|
6803
|
-
notify: external_exports.tuple([desktopNotificationSchema]),
|
|
6804
|
-
setBadge: external_exports.tuple([desktopBadgeSchema]),
|
|
6805
|
-
clearAll: external_exports.tuple([]),
|
|
6806
|
-
getSettings: external_exports.tuple([]),
|
|
6807
|
-
setSettings: external_exports.tuple([desktopSettingsChangeSchema])
|
|
6808
|
-
};
|
|
6809
|
-
}
|
|
6810
|
-
});
|
|
6811
|
-
|
|
6812
6662
|
// ../../packages/core/dist/chunk-MIWZOSPI.js
|
|
6813
6663
|
function toIso(epochMs) {
|
|
6814
6664
|
return new Date(epochMs).toISOString();
|
|
@@ -8212,58 +8062,58 @@ var init_chunk_EA23LSDS = __esm({
|
|
|
8212
8062
|
}
|
|
8213
8063
|
});
|
|
8214
8064
|
|
|
8215
|
-
// ../../packages/core/dist/chunk-
|
|
8216
|
-
var
|
|
8217
|
-
var
|
|
8218
|
-
"../../packages/core/dist/chunk-
|
|
8065
|
+
// ../../packages/core/dist/chunk-SY6PLCPK.js
|
|
8066
|
+
var jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse;
|
|
8067
|
+
var init_chunk_SY6PLCPK = __esm({
|
|
8068
|
+
"../../packages/core/dist/chunk-SY6PLCPK.js"() {
|
|
8219
8069
|
"use strict";
|
|
8070
|
+
init_chunk_6TSQ5HXC();
|
|
8220
8071
|
init_zod();
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
status: consultThreadStatus,
|
|
8234
|
-
created_at: external_exports.string()
|
|
8072
|
+
jsonSchemaSchema = external_exports.record(external_exports.unknown());
|
|
8073
|
+
hubUserIdentity = external_exports.object({
|
|
8074
|
+
user_id: external_exports.string().nullable(),
|
|
8075
|
+
user_name: external_exports.string().nullable(),
|
|
8076
|
+
user_email: external_exports.string().nullable(),
|
|
8077
|
+
user_name_locked: external_exports.boolean(),
|
|
8078
|
+
created_at: external_exports.string(),
|
|
8079
|
+
updated_at: external_exports.string().nullable(),
|
|
8080
|
+
hub_user_id: external_exports.string().optional(),
|
|
8081
|
+
enabled: external_exports.boolean().optional(),
|
|
8082
|
+
hub_team_id: external_exports.string().nullable().optional(),
|
|
8083
|
+
source: external_exports.enum(["grant", "auto"]).optional()
|
|
8235
8084
|
});
|
|
8236
|
-
|
|
8237
|
-
|
|
8085
|
+
stateValueEntry = external_exports.object({
|
|
8086
|
+
state_slug: external_exports.string(),
|
|
8087
|
+
state_name: external_exports.string(),
|
|
8088
|
+
state_description: external_exports.string().nullable().optional(),
|
|
8089
|
+
scope: external_exports.enum(["user", "conversation"]),
|
|
8090
|
+
json_schema: jsonSchemaSchema,
|
|
8091
|
+
initial_value: external_exports.unknown(),
|
|
8092
|
+
value: external_exports.unknown(),
|
|
8093
|
+
is_reserved: external_exports.boolean()
|
|
8238
8094
|
});
|
|
8239
|
-
|
|
8240
|
-
|
|
8095
|
+
getHubUserContextResponse = external_exports.object({
|
|
8096
|
+
user: hubUserIdentity,
|
|
8097
|
+
user_states: external_exports.array(stateValueEntry),
|
|
8098
|
+
conversation_states: external_exports.array(stateValueEntry)
|
|
8241
8099
|
});
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
// hub's `consultant`-role agents; a non-consultant / unknown id is rejected.
|
|
8247
|
-
engaged_agent_id: external_exports.string().uuid().optional()
|
|
8100
|
+
updateHubUserBody = external_exports.object({
|
|
8101
|
+
// Non-empty, non-null. `.nullable()` here would bypass `.min(1)` and let an
|
|
8102
|
+
// admin arm the lock on a null name — see hub-do.ts updateHubUser null-guard.
|
|
8103
|
+
user_name: external_exports.string().min(1).max(120)
|
|
8248
8104
|
});
|
|
8249
|
-
|
|
8250
|
-
|
|
8105
|
+
updateHubUserResponse = external_exports.object({
|
|
8106
|
+
user: hubUserIdentity
|
|
8251
8107
|
});
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
threadId: external_exports.string().uuid()
|
|
8108
|
+
unlockHubUserNameResponse = external_exports.object({
|
|
8109
|
+
user: hubUserIdentity
|
|
8255
8110
|
});
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
title: consultThreadTitle.optional(),
|
|
8259
|
-
engaged_agent_id: external_exports.string().uuid().optional()
|
|
8260
|
-
}).refine((v) => v.title !== void 0 || v.engaged_agent_id !== void 0, {
|
|
8261
|
-
message: "Provide a title and/or an engaged_agent_id to update"
|
|
8111
|
+
stateResetParams = external_exports.object({
|
|
8112
|
+
stateSlug: slugSchema
|
|
8262
8113
|
});
|
|
8263
|
-
|
|
8264
|
-
|
|
8114
|
+
stateResetResponse = external_exports.object({
|
|
8115
|
+
ok: external_exports.literal(true)
|
|
8265
8116
|
});
|
|
8266
|
-
CONSULT_AWAIT_TIMEOUT_MS = 15 * 6e4;
|
|
8267
8117
|
}
|
|
8268
8118
|
});
|
|
8269
8119
|
|
|
@@ -9363,7 +9213,7 @@ var init_chunk_IBL7FANV = __esm({
|
|
|
9363
9213
|
}
|
|
9364
9214
|
});
|
|
9365
9215
|
|
|
9366
|
-
// ../../packages/core/dist/chunk-
|
|
9216
|
+
// ../../packages/core/dist/chunk-Z22T2ASG.js
|
|
9367
9217
|
function parseExpr(expr) {
|
|
9368
9218
|
const fnMatch = expr.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\s*\((.*?)\)\s*(?:\.(.*))?$/);
|
|
9369
9219
|
if (!fnMatch) return null;
|
|
@@ -9447,8 +9297,8 @@ function scanTemplateResources(template) {
|
|
|
9447
9297
|
return scan;
|
|
9448
9298
|
}
|
|
9449
9299
|
var PREVIOUS_CONVERSATIONS_MAX, PLACEHOLDER_RE, CATALOG_FN, LEGACY_CATALOG_FN, EMPTY_SCAN;
|
|
9450
|
-
var
|
|
9451
|
-
"../../packages/core/dist/chunk-
|
|
9300
|
+
var init_chunk_Z22T2ASG = __esm({
|
|
9301
|
+
"../../packages/core/dist/chunk-Z22T2ASG.js"() {
|
|
9452
9302
|
"use strict";
|
|
9453
9303
|
PREVIOUS_CONVERSATIONS_MAX = 20;
|
|
9454
9304
|
PLACEHOLDER_RE = /\{\{\s*([^{}]+?)\s*\}\}/g;
|
|
@@ -9652,7 +9502,7 @@ var init_chunk_T7KQKDET = __esm({
|
|
|
9652
9502
|
}
|
|
9653
9503
|
});
|
|
9654
9504
|
|
|
9655
|
-
// ../../packages/core/dist/chunk-
|
|
9505
|
+
// ../../packages/core/dist/chunk-2LZYS6YX.js
|
|
9656
9506
|
function resolveMonitorTrigger(monitorConfig) {
|
|
9657
9507
|
if (!monitorConfig || typeof monitorConfig !== "object") return "idle";
|
|
9658
9508
|
const raw = monitorConfig.trigger;
|
|
@@ -9958,12 +9808,12 @@ function refineMonitorRulesStructuredOutput(body, ctx) {
|
|
|
9958
9808
|
if (refusal2) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["response_format"], message: refusal2 });
|
|
9959
9809
|
}
|
|
9960
9810
|
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;
|
|
9961
|
-
var
|
|
9962
|
-
"../../packages/core/dist/chunk-
|
|
9811
|
+
var init_chunk_2LZYS6YX = __esm({
|
|
9812
|
+
"../../packages/core/dist/chunk-2LZYS6YX.js"() {
|
|
9963
9813
|
"use strict";
|
|
9964
9814
|
init_chunk_UFYIBL66();
|
|
9965
9815
|
init_chunk_IBL7FANV();
|
|
9966
|
-
|
|
9816
|
+
init_chunk_Z22T2ASG();
|
|
9967
9817
|
init_chunk_HZ6CADSY();
|
|
9968
9818
|
init_chunk_C2UEA2KW();
|
|
9969
9819
|
init_chunk_DHPUPI4Y();
|
|
@@ -10184,12 +10034,12 @@ var init_chunk_DIBRGYL6 = __esm({
|
|
|
10184
10034
|
}
|
|
10185
10035
|
});
|
|
10186
10036
|
|
|
10187
|
-
// ../../packages/core/dist/chunk-
|
|
10037
|
+
// ../../packages/core/dist/chunk-XR36MYEY.js
|
|
10188
10038
|
var conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody;
|
|
10189
|
-
var
|
|
10190
|
-
"../../packages/core/dist/chunk-
|
|
10039
|
+
var init_chunk_XR36MYEY = __esm({
|
|
10040
|
+
"../../packages/core/dist/chunk-XR36MYEY.js"() {
|
|
10191
10041
|
"use strict";
|
|
10192
|
-
|
|
10042
|
+
init_chunk_2LZYS6YX();
|
|
10193
10043
|
init_chunk_HZ6CADSY();
|
|
10194
10044
|
init_chunk_DHPUPI4Y();
|
|
10195
10045
|
init_zod();
|
|
@@ -10486,115 +10336,98 @@ var init_chunk_KSTYTQ7I = __esm({
|
|
|
10486
10336
|
}
|
|
10487
10337
|
});
|
|
10488
10338
|
|
|
10489
|
-
// ../../packages/core/dist/chunk-
|
|
10490
|
-
var
|
|
10491
|
-
var
|
|
10492
|
-
"../../packages/core/dist/chunk-
|
|
10339
|
+
// ../../packages/core/dist/chunk-LKBSHANA.js
|
|
10340
|
+
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;
|
|
10341
|
+
var init_chunk_LKBSHANA = __esm({
|
|
10342
|
+
"../../packages/core/dist/chunk-LKBSHANA.js"() {
|
|
10493
10343
|
"use strict";
|
|
10494
|
-
init_chunk_HZ6CADSY();
|
|
10495
10344
|
init_zod();
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10345
|
+
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})?$/;
|
|
10346
|
+
DESKTOP_PLATFORMS = ["darwin", "win32"];
|
|
10347
|
+
DESKTOP_FLAVORS = ["production", "development"];
|
|
10348
|
+
desktopShellInfoSchema = external_exports.object({
|
|
10349
|
+
/** The shell's own release version, independent of the web deploy. */
|
|
10350
|
+
shellVersion: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
|
|
10351
|
+
/** The Electron runtime the shell was built with. */
|
|
10352
|
+
electronVersion: external_exports.string().regex(/^\d{1,4}\.\d{1,4}\.\d{1,4}(-[0-9A-Za-z.-]{1,32})?$/),
|
|
10353
|
+
platform: external_exports.enum(DESKTOP_PLATFORMS),
|
|
10354
|
+
/** CPU architecture as Node reports it (`arm64`, `x64`). */
|
|
10355
|
+
arch: external_exports.string().regex(/^[a-z0-9_]{1,16}$/),
|
|
10356
|
+
flavor: external_exports.enum(DESKTOP_FLAVORS),
|
|
10357
|
+
/**
|
|
10358
|
+
* Present, and true, when the shell runs from the Microsoft Store's package: the Store updates it,
|
|
10359
|
+
* and Windows alone opens it at login (the package's startup task, which the person turns on in
|
|
10360
|
+
* Windows' settings). An optional field, so no new `bridgeVersion`: an older page ignores it, and
|
|
10361
|
+
* its absence is every other shell.
|
|
10362
|
+
*/
|
|
10363
|
+
store: external_exports.literal(true).optional()
|
|
10503
10364
|
});
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
// otherwise skip the owner guard and silently MINT a new conversation instead of
|
|
10512
|
-
// rejecting. A format 400 is shape-only — not an existence oracle (a valid-but-unknown
|
|
10513
|
-
// UUID still collapses to the opaque authorization error downstream).
|
|
10514
|
-
conversation_id: external_exports.string().uuid().optional(),
|
|
10515
|
-
// On-behalf-of end-user identity. Absent → per-connection service principal (task-hub
|
|
10516
|
-
// only; chat hub rejects with 422 in the route).
|
|
10517
|
-
user: external_exports.object({
|
|
10518
|
-
id: external_exports.string().min(1),
|
|
10519
|
-
email: clientOptionalString,
|
|
10520
|
-
name: clientOptionalString
|
|
10521
|
-
}).optional(),
|
|
10522
|
-
message: apiChannelMessage,
|
|
10523
|
-
// Idempotency key: maps to channel_message_sid, deduped within one conversation
|
|
10524
|
-
// (ConversationDO.storeMessage). A retried POST resolves to the same conversation (a chat
|
|
10525
|
-
// hub's user, the external_ref, the conversation_id, or on a task hub with neither, this key
|
|
10526
|
-
// scoped by the sender), so it echoes the original message_id and skips billing / turn
|
|
10527
|
-
// dispatch. A failed store answers a retryable 503 only when this key is set; without it a
|
|
10528
|
-
// retry could store the message twice, so it answers 400.
|
|
10529
|
-
client_message_id: external_exports.string().min(1).max(256).optional()
|
|
10530
|
-
}).refine((b) => !(b.external_ref && b.conversation_id), {
|
|
10531
|
-
message: "provide external_ref or conversation_id, not both",
|
|
10532
|
-
path: ["external_ref"]
|
|
10365
|
+
DESKTOP_PRESENCE_STATES = ["present", "away"];
|
|
10366
|
+
desktopPresenceSchema = external_exports.object({
|
|
10367
|
+
presence: external_exports.enum(DESKTOP_PRESENCE_STATES),
|
|
10368
|
+
mainWindow: external_exports.object({
|
|
10369
|
+
shown: external_exports.boolean(),
|
|
10370
|
+
focused: external_exports.boolean()
|
|
10371
|
+
})
|
|
10533
10372
|
});
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
message_body: clientOptionalString,
|
|
10540
|
-
// Conversation context. Ids are plain strings rather than `.uuid()` on purpose:
|
|
10541
|
-
// they are AUTHORIZED downstream, which is the stronger guarantee — a well-formed
|
|
10542
|
-
// uuid belonging to another tenant must fail just as hard as junk. `hub_id` is
|
|
10543
|
-
// gated by `assertHubEndUserAccess` (gh #3286) and `conversation_id` by HubDO's
|
|
10544
|
-
// conversation_index owner check (gh #2781, #3281). The route's own falsy guards
|
|
10545
|
-
// ('hub_id is required') still reject an empty one.
|
|
10546
|
-
hub_id: clientOptionalString,
|
|
10547
|
-
channel_id: clientOptionalString,
|
|
10548
|
-
conversation_id: clientOptionalString,
|
|
10549
|
-
hub_type: external_exports.enum(["chat", "task"]).nullish().transform((v) => v ?? void 0),
|
|
10550
|
-
// Stable idempotency key for one explicit task-hub launcher. HubDO scopes it
|
|
10551
|
-
// to the authenticated user and resolves retries/tabs to one conversation.
|
|
10552
|
-
task_start_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
|
|
10553
|
-
// Routing.
|
|
10554
|
-
sender_type: appMessageSenderType.nullish().transform((v) => v ?? void 0),
|
|
10555
|
-
receiver_type: appMessageReceiverType.nullish().transform((v) => v ?? void 0),
|
|
10556
|
-
// Only meaningful on a team send, where `validateAppTeamSendContext` proves the
|
|
10557
|
-
// caller may send to this receiver. Absent on a team send to a conversation with no
|
|
10558
|
-
// person, which names its `conversation_id` instead. The end-user branch ignores it —
|
|
10559
|
-
// see the receiver derivation in the route.
|
|
10560
|
-
user_receiver_id: clientOptionalString,
|
|
10561
|
-
// ── Internal consult (consultant-agents PR 2 — H1.0) ──────────────────────
|
|
10562
|
-
// A team member handling a customer conversation can tag a `consultant`-role
|
|
10563
|
-
// agent for a PRIVATE, team-only exchange that never reaches the customer. A
|
|
10564
|
-
// consult send is a team send with `receiver_type: 'agent'` targeting the
|
|
10565
|
-
// consultant; `user_receiver_id` identifies the customer whose conversation this is
|
|
10566
|
-
// (and is authorized by `validateAppTeamSendContext`, exactly as a team→user send is),
|
|
10567
|
-
// and is absent, as on a team→user send, when the conversation has no person. The consultant is resolved from `agent_receiver_id`
|
|
10568
|
-
// when supplied, else from an `@mention` parsed out of the message text against
|
|
10569
|
-
// the hub's consultant agents. `consult_thread_id` continues an existing thread;
|
|
10570
|
-
// absent, the route creates/reuses the single implicit thread. These fields are
|
|
10571
|
-
// inert on every non-consult send (end-user send, team→user send).
|
|
10572
|
-
agent_receiver_id: clientOptionalString,
|
|
10573
|
-
consult_thread_id: clientOptionalString,
|
|
10574
|
-
is_first_message: clientOptionalBoolean,
|
|
10575
|
-
end_conversation: clientOptionalBoolean,
|
|
10576
|
-
// Pre-generated by the client so the optimistic bubble and the stored row share
|
|
10577
|
-
// a key (transcription live-updates land on the same row instead of duplicating).
|
|
10578
|
-
message_id: clientOptionalString,
|
|
10579
|
-
attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0),
|
|
10580
|
-
// Base64-encoded audio for STT. Size-capped in the route (the cap is a byte
|
|
10581
|
-
// budget tied to the /channels/* bodyLimit, not a shape rule).
|
|
10582
|
-
audio_file: clientOptionalString
|
|
10373
|
+
desktopUpdateSchema = external_exports.object({
|
|
10374
|
+
ready: external_exports.object({
|
|
10375
|
+
version: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
|
|
10376
|
+
offerRestart: external_exports.boolean()
|
|
10377
|
+
}).nullable()
|
|
10583
10378
|
});
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10379
|
+
DESKTOP_SIGN_IN_URL_MAX_LENGTH = 4096;
|
|
10380
|
+
DESKTOP_APP_PATH_MAX_LENGTH = 512;
|
|
10381
|
+
desktopAppPathSchema = external_exports.string().max(DESKTOP_APP_PATH_MAX_LENGTH).regex(/^\/(?![/\\])[^\s\\]*$/);
|
|
10382
|
+
DESKTOP_NOTIFICATION_KINDS = ["handoff", "message", "summary"];
|
|
10383
|
+
DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH = 200;
|
|
10384
|
+
DESKTOP_NOTIFICATION_BODY_MAX_LENGTH = 500;
|
|
10385
|
+
notificationTitleSchema = external_exports.string().min(1).max(DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH);
|
|
10386
|
+
notificationBodySchema = external_exports.string().max(DESKTOP_NOTIFICATION_BODY_MAX_LENGTH);
|
|
10387
|
+
desktopNotificationSchema = external_exports.object({
|
|
10388
|
+
kind: external_exports.enum(DESKTOP_NOTIFICATION_KINDS),
|
|
10389
|
+
title: notificationTitleSchema,
|
|
10390
|
+
body: notificationBodySchema,
|
|
10391
|
+
path: desktopAppPathSchema,
|
|
10392
|
+
withoutPreview: external_exports.object({ title: notificationTitleSchema, body: notificationBodySchema }).optional()
|
|
10393
|
+
});
|
|
10394
|
+
DESKTOP_BADGE_MAX_COUNT = 1e6;
|
|
10395
|
+
DESKTOP_BADGE_LABEL_MAX_LENGTH = 200;
|
|
10396
|
+
desktopBadgeSchema = external_exports.object({
|
|
10397
|
+
count: external_exports.number().int().min(0).max(DESKTOP_BADGE_MAX_COUNT),
|
|
10398
|
+
label: external_exports.string().max(DESKTOP_BADGE_LABEL_MAX_LENGTH)
|
|
10399
|
+
});
|
|
10400
|
+
desktopNavigateSchema = external_exports.object({
|
|
10401
|
+
path: desktopAppPathSchema
|
|
10402
|
+
});
|
|
10403
|
+
desktopSettingsSchema = external_exports.object({
|
|
10404
|
+
/** The app opens when the person logs in to the computer: the operating system's own login item. */
|
|
10405
|
+
openAtLogin: external_exports.boolean(),
|
|
10406
|
+
/** Closing the window keeps the app running in the tray (true), or quits it (false). */
|
|
10407
|
+
closeToTray: external_exports.boolean(),
|
|
10408
|
+
/** The shell shows notifications (true), or none (false). The badge is not a notification. */
|
|
10409
|
+
notifications: external_exports.boolean(),
|
|
10410
|
+
/**
|
|
10411
|
+
* A customer message's notification shows the customer's name and words, where the platform
|
|
10412
|
+
* allows them at all (`desktopShowsCustomerWords`: macOS); elsewhere the shell never shows them.
|
|
10413
|
+
*/
|
|
10414
|
+
messagePreview: external_exports.boolean()
|
|
10415
|
+
});
|
|
10416
|
+
desktopSettingsChangeSchema = desktopSettingsSchema.partial().strict().refine((change) => Object.values(change).every((value) => typeof value === "boolean"), {
|
|
10417
|
+
message: "each setting changed is true or false"
|
|
10597
10418
|
});
|
|
10419
|
+
desktopBridgeArgsSchemas = {
|
|
10420
|
+
getShellInfo: external_exports.tuple([]),
|
|
10421
|
+
getPresence: external_exports.tuple([]),
|
|
10422
|
+
openSignIn: external_exports.tuple([external_exports.string().max(DESKTOP_SIGN_IN_URL_MAX_LENGTH)]),
|
|
10423
|
+
getUpdate: external_exports.tuple([]),
|
|
10424
|
+
restartToUpdate: external_exports.tuple([]),
|
|
10425
|
+
notify: external_exports.tuple([desktopNotificationSchema]),
|
|
10426
|
+
setBadge: external_exports.tuple([desktopBadgeSchema]),
|
|
10427
|
+
clearAll: external_exports.tuple([]),
|
|
10428
|
+
getSettings: external_exports.tuple([]),
|
|
10429
|
+
setSettings: external_exports.tuple([desktopSettingsChangeSchema])
|
|
10430
|
+
};
|
|
10598
10431
|
}
|
|
10599
10432
|
});
|
|
10600
10433
|
|
|
@@ -11019,7 +10852,7 @@ var init_chunk_4LXDRTO4 = __esm({
|
|
|
11019
10852
|
}
|
|
11020
10853
|
});
|
|
11021
10854
|
|
|
11022
|
-
// ../../packages/core/dist/chunk-
|
|
10855
|
+
// ../../packages/core/dist/chunk-6Y7XMRWF.js
|
|
11023
10856
|
function isIanaTimezone(timezone) {
|
|
11024
10857
|
try {
|
|
11025
10858
|
new Intl.DateTimeFormat("en-US", { timeZone: timezone }).format(0);
|
|
@@ -11029,10 +10862,10 @@ function isIanaTimezone(timezone) {
|
|
|
11029
10862
|
}
|
|
11030
10863
|
}
|
|
11031
10864
|
var evalDateContextSchema;
|
|
11032
|
-
var
|
|
11033
|
-
"../../packages/core/dist/chunk-
|
|
10865
|
+
var init_chunk_6Y7XMRWF = __esm({
|
|
10866
|
+
"../../packages/core/dist/chunk-6Y7XMRWF.js"() {
|
|
11034
10867
|
"use strict";
|
|
11035
|
-
|
|
10868
|
+
init_chunk_Z22T2ASG();
|
|
11036
10869
|
init_chunk_HZ6CADSY();
|
|
11037
10870
|
init_chunk_MIWZOSPI();
|
|
11038
10871
|
init_chunk_DHPUPI4Y();
|
|
@@ -11059,7 +10892,7 @@ var init_chunk_2ISUBJG7 = __esm({
|
|
|
11059
10892
|
}
|
|
11060
10893
|
});
|
|
11061
10894
|
|
|
11062
|
-
// ../../packages/core/dist/chunk-
|
|
10895
|
+
// ../../packages/core/dist/chunk-RCTKQTJH.js
|
|
11063
10896
|
function describeRole(role) {
|
|
11064
10897
|
if (typeof role === "string") {
|
|
11065
10898
|
return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
|
|
@@ -11233,11 +11066,11 @@ function terminalRunCount(counts) {
|
|
|
11233
11066
|
return counts.successful_runs + counts.failed_runs;
|
|
11234
11067
|
}
|
|
11235
11068
|
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;
|
|
11236
|
-
var
|
|
11237
|
-
"../../packages/core/dist/chunk-
|
|
11069
|
+
var init_chunk_RCTKQTJH = __esm({
|
|
11070
|
+
"../../packages/core/dist/chunk-RCTKQTJH.js"() {
|
|
11238
11071
|
"use strict";
|
|
11239
11072
|
init_chunk_4LXDRTO4();
|
|
11240
|
-
|
|
11073
|
+
init_chunk_6Y7XMRWF();
|
|
11241
11074
|
init_chunk_HZ6CADSY();
|
|
11242
11075
|
init_chunk_2ISUBJG7();
|
|
11243
11076
|
init_zod();
|
|
@@ -12320,7 +12153,7 @@ var init_chunk_6NI5RAM4 = __esm({
|
|
|
12320
12153
|
}
|
|
12321
12154
|
});
|
|
12322
12155
|
|
|
12323
|
-
// ../../packages/core/dist/chunk-
|
|
12156
|
+
// ../../packages/core/dist/chunk-FJ5K57CB.js
|
|
12324
12157
|
function refineHubAsCodeCustomTools(config, ctx) {
|
|
12325
12158
|
const agents = config.agents;
|
|
12326
12159
|
if (!Array.isArray(agents)) return;
|
|
@@ -12856,12 +12689,12 @@ function refineHubAsCodeMonitorRulesOutput(config, ctx) {
|
|
|
12856
12689
|
});
|
|
12857
12690
|
}
|
|
12858
12691
|
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;
|
|
12859
|
-
var
|
|
12860
|
-
"../../packages/core/dist/chunk-
|
|
12692
|
+
var init_chunk_FJ5K57CB = __esm({
|
|
12693
|
+
"../../packages/core/dist/chunk-FJ5K57CB.js"() {
|
|
12861
12694
|
"use strict";
|
|
12862
12695
|
init_chunk_4S4FBSBE();
|
|
12863
|
-
|
|
12864
|
-
|
|
12696
|
+
init_chunk_RCTKQTJH();
|
|
12697
|
+
init_chunk_2LZYS6YX();
|
|
12865
12698
|
init_chunk_LBDH7LCG();
|
|
12866
12699
|
init_chunk_4LXDRTO4();
|
|
12867
12700
|
init_chunk_T4Q5COKJ();
|
|
@@ -13703,29 +13536,58 @@ var init_chunk_YULHXJ5M = __esm({
|
|
|
13703
13536
|
}
|
|
13704
13537
|
});
|
|
13705
13538
|
|
|
13706
|
-
// ../../packages/core/dist/chunk-
|
|
13707
|
-
var
|
|
13708
|
-
var
|
|
13709
|
-
"../../packages/core/dist/chunk-
|
|
13539
|
+
// ../../packages/core/dist/chunk-V4FRPRH5.js
|
|
13540
|
+
var CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS;
|
|
13541
|
+
var init_chunk_V4FRPRH5 = __esm({
|
|
13542
|
+
"../../packages/core/dist/chunk-V4FRPRH5.js"() {
|
|
13710
13543
|
"use strict";
|
|
13711
13544
|
init_zod();
|
|
13712
|
-
|
|
13713
|
-
|
|
13545
|
+
CONSULT_THREAD_STATUSES = ["open", "awaiting", "resolved", "cancelled_at_close"];
|
|
13546
|
+
consultThreadStatus = external_exports.enum(CONSULT_THREAD_STATUSES);
|
|
13547
|
+
CONSULT_THREAD_TITLE_MAX = 120;
|
|
13548
|
+
consultThreadTitle = external_exports.string().trim().min(1).max(CONSULT_THREAD_TITLE_MAX);
|
|
13549
|
+
consultThreadSummary = external_exports.object({
|
|
13550
|
+
consult_thread_id: external_exports.string(),
|
|
13551
|
+
conversation_id: external_exports.string(),
|
|
13552
|
+
initiator_type: external_exports.enum(["team", "agent"]),
|
|
13553
|
+
initiator_id: external_exports.string(),
|
|
13554
|
+
engaged_agent_id: external_exports.string().nullable(),
|
|
13555
|
+
engaged_agent_name: external_exports.string().nullable(),
|
|
13556
|
+
title: external_exports.string().nullable(),
|
|
13557
|
+
status: consultThreadStatus,
|
|
13558
|
+
created_at: external_exports.string()
|
|
13714
13559
|
});
|
|
13715
|
-
|
|
13716
|
-
|
|
13717
|
-
conversationId: external_exports.string().uuid()
|
|
13560
|
+
listConsultThreadsQuery = external_exports.object({
|
|
13561
|
+
hub_id: external_exports.string().uuid()
|
|
13718
13562
|
});
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
start: external_exports.string().optional(),
|
|
13722
|
-
end: external_exports.string().optional(),
|
|
13723
|
-
page: external_exports.string().regex(/^\d+$/).optional(),
|
|
13724
|
-
page_size: external_exports.string().regex(/^\d+$/).optional()
|
|
13563
|
+
listConsultThreadsResponse = external_exports.object({
|
|
13564
|
+
threads: external_exports.array(consultThreadSummary)
|
|
13725
13565
|
});
|
|
13726
|
-
|
|
13727
|
-
|
|
13566
|
+
createConsultThreadBody = external_exports.object({
|
|
13567
|
+
hub_id: external_exports.string().uuid(),
|
|
13568
|
+
title: consultThreadTitle.optional(),
|
|
13569
|
+
// Optionally engage a consultant on creation. Validated server-side against the
|
|
13570
|
+
// hub's `consultant`-role agents; a non-consultant / unknown id is rejected.
|
|
13571
|
+
engaged_agent_id: external_exports.string().uuid().optional()
|
|
13572
|
+
});
|
|
13573
|
+
createConsultThreadResponse = external_exports.object({
|
|
13574
|
+
thread: consultThreadSummary
|
|
13575
|
+
});
|
|
13576
|
+
consultThreadIdParam = external_exports.object({
|
|
13577
|
+
id: external_exports.string().uuid(),
|
|
13578
|
+
threadId: external_exports.string().uuid()
|
|
13579
|
+
});
|
|
13580
|
+
updateConsultThreadBody = external_exports.object({
|
|
13581
|
+
hub_id: external_exports.string().uuid(),
|
|
13582
|
+
title: consultThreadTitle.optional(),
|
|
13583
|
+
engaged_agent_id: external_exports.string().uuid().optional()
|
|
13584
|
+
}).refine((v) => v.title !== void 0 || v.engaged_agent_id !== void 0, {
|
|
13585
|
+
message: "Provide a title and/or an engaged_agent_id to update"
|
|
13586
|
+
});
|
|
13587
|
+
updateConsultThreadResponse = external_exports.object({
|
|
13588
|
+
thread: consultThreadSummary
|
|
13728
13589
|
});
|
|
13590
|
+
CONSULT_AWAIT_TIMEOUT_MS = 15 * 6e4;
|
|
13729
13591
|
}
|
|
13730
13592
|
});
|
|
13731
13593
|
|
|
@@ -13842,13 +13704,13 @@ var init_chunk_LQY2OCQL = __esm({
|
|
|
13842
13704
|
}
|
|
13843
13705
|
});
|
|
13844
13706
|
|
|
13845
|
-
// ../../packages/core/dist/chunk-
|
|
13707
|
+
// ../../packages/core/dist/chunk-EA6XOOL2.js
|
|
13846
13708
|
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;
|
|
13847
|
-
var
|
|
13848
|
-
"../../packages/core/dist/chunk-
|
|
13709
|
+
var init_chunk_EA6XOOL2 = __esm({
|
|
13710
|
+
"../../packages/core/dist/chunk-EA6XOOL2.js"() {
|
|
13849
13711
|
"use strict";
|
|
13850
13712
|
init_chunk_LQY2OCQL();
|
|
13851
|
-
|
|
13713
|
+
init_chunk_2LZYS6YX();
|
|
13852
13714
|
init_chunk_3HSB6J4J();
|
|
13853
13715
|
init_chunk_5XEJSR22();
|
|
13854
13716
|
init_chunk_DHPUPI4Y();
|
|
@@ -14099,6 +13961,118 @@ var init_chunk_ZJJ5ODOD = __esm({
|
|
|
14099
13961
|
}
|
|
14100
13962
|
});
|
|
14101
13963
|
|
|
13964
|
+
// ../../packages/core/dist/chunk-7CYHPF35.js
|
|
13965
|
+
var appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse;
|
|
13966
|
+
var init_chunk_7CYHPF35 = __esm({
|
|
13967
|
+
"../../packages/core/dist/chunk-7CYHPF35.js"() {
|
|
13968
|
+
"use strict";
|
|
13969
|
+
init_chunk_HZ6CADSY();
|
|
13970
|
+
init_zod();
|
|
13971
|
+
appMessageSenderType = external_exports.enum(["user", "team"]);
|
|
13972
|
+
appMessageReceiverType = external_exports.enum(["user", "team", "agent", "assistant"]).transform((v) => v === "assistant" ? "agent" : v);
|
|
13973
|
+
apiChannelMessage = external_exports.object({
|
|
13974
|
+
text: clientOptionalString,
|
|
13975
|
+
attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0)
|
|
13976
|
+
}).refine((m) => m.text && m.text.length > 0 || m.attachments && m.attachments.length > 0, {
|
|
13977
|
+
message: "message must have text or at least one attachment"
|
|
13978
|
+
});
|
|
13979
|
+
apiChannelMessageBody = external_exports.object({
|
|
13980
|
+
// Correlation id (task hubs): new → new conversation, repeat → continue. min 1 so an
|
|
13981
|
+
// empty string can't masquerade as a ref. Mutually exclusive with conversation_id.
|
|
13982
|
+
external_ref: external_exports.string().min(1).max(256).optional(),
|
|
13983
|
+
// Continue a specific WayAI conversation (authorized against the hub/channel + owner).
|
|
13984
|
+
// UUID-validated here (unlike the app channel, whose client we control): allocation
|
|
13985
|
+
// only treats a UUID-shaped id as a provided conversation, so a malformed id would
|
|
13986
|
+
// otherwise skip the owner guard and silently MINT a new conversation instead of
|
|
13987
|
+
// rejecting. A format 400 is shape-only — not an existence oracle (a valid-but-unknown
|
|
13988
|
+
// UUID still collapses to the opaque authorization error downstream).
|
|
13989
|
+
conversation_id: external_exports.string().uuid().optional(),
|
|
13990
|
+
// On-behalf-of end-user identity. Absent → per-connection service principal (task-hub
|
|
13991
|
+
// only; chat hub rejects with 422 in the route).
|
|
13992
|
+
user: external_exports.object({
|
|
13993
|
+
id: external_exports.string().min(1),
|
|
13994
|
+
email: clientOptionalString,
|
|
13995
|
+
name: clientOptionalString
|
|
13996
|
+
}).optional(),
|
|
13997
|
+
message: apiChannelMessage,
|
|
13998
|
+
// Idempotency key: maps to channel_message_sid, deduped within one conversation
|
|
13999
|
+
// (ConversationDO.storeMessage). A retried POST resolves to the same conversation (a chat
|
|
14000
|
+
// hub's user, the external_ref, the conversation_id, or on a task hub with neither, this key
|
|
14001
|
+
// scoped by the sender), so it echoes the original message_id and skips billing / turn
|
|
14002
|
+
// dispatch. A failed store answers a retryable 503 only when this key is set; without it a
|
|
14003
|
+
// retry could store the message twice, so it answers 400.
|
|
14004
|
+
client_message_id: external_exports.string().min(1).max(256).optional()
|
|
14005
|
+
}).refine((b) => !(b.external_ref && b.conversation_id), {
|
|
14006
|
+
message: "provide external_ref or conversation_id, not both",
|
|
14007
|
+
path: ["external_ref"]
|
|
14008
|
+
});
|
|
14009
|
+
appMessageBody = external_exports.object({
|
|
14010
|
+
// Message content — three historical aliases. All optional: an attachment-only
|
|
14011
|
+
// or voice-only message carries no text.
|
|
14012
|
+
content: clientOptionalString,
|
|
14013
|
+
message_text: clientOptionalString,
|
|
14014
|
+
message_body: clientOptionalString,
|
|
14015
|
+
// Conversation context. Ids are plain strings rather than `.uuid()` on purpose:
|
|
14016
|
+
// they are AUTHORIZED downstream, which is the stronger guarantee — a well-formed
|
|
14017
|
+
// uuid belonging to another tenant must fail just as hard as junk. `hub_id` is
|
|
14018
|
+
// gated by `assertHubEndUserAccess` (gh #3286) and `conversation_id` by HubDO's
|
|
14019
|
+
// conversation_index owner check (gh #2781, #3281). The route's own falsy guards
|
|
14020
|
+
// ('hub_id is required') still reject an empty one.
|
|
14021
|
+
hub_id: clientOptionalString,
|
|
14022
|
+
channel_id: clientOptionalString,
|
|
14023
|
+
conversation_id: clientOptionalString,
|
|
14024
|
+
hub_type: external_exports.enum(["chat", "task"]).nullish().transform((v) => v ?? void 0),
|
|
14025
|
+
// Stable idempotency key for one explicit task-hub launcher. HubDO scopes it
|
|
14026
|
+
// to the authenticated user and resolves retries/tabs to one conversation.
|
|
14027
|
+
task_start_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
|
|
14028
|
+
// Routing.
|
|
14029
|
+
sender_type: appMessageSenderType.nullish().transform((v) => v ?? void 0),
|
|
14030
|
+
receiver_type: appMessageReceiverType.nullish().transform((v) => v ?? void 0),
|
|
14031
|
+
// Only meaningful on a team send, where `validateAppTeamSendContext` proves the
|
|
14032
|
+
// caller may send to this receiver. Absent on a team send to a conversation with no
|
|
14033
|
+
// person, which names its `conversation_id` instead. The end-user branch ignores it —
|
|
14034
|
+
// see the receiver derivation in the route.
|
|
14035
|
+
user_receiver_id: clientOptionalString,
|
|
14036
|
+
// ── Internal consult (consultant-agents PR 2 — H1.0) ──────────────────────
|
|
14037
|
+
// A team member handling a customer conversation can tag a `consultant`-role
|
|
14038
|
+
// agent for a PRIVATE, team-only exchange that never reaches the customer. A
|
|
14039
|
+
// consult send is a team send with `receiver_type: 'agent'` targeting the
|
|
14040
|
+
// consultant; `user_receiver_id` identifies the customer whose conversation this is
|
|
14041
|
+
// (and is authorized by `validateAppTeamSendContext`, exactly as a team→user send is),
|
|
14042
|
+
// and is absent, as on a team→user send, when the conversation has no person. The consultant is resolved from `agent_receiver_id`
|
|
14043
|
+
// when supplied, else from an `@mention` parsed out of the message text against
|
|
14044
|
+
// the hub's consultant agents. `consult_thread_id` continues an existing thread;
|
|
14045
|
+
// absent, the route creates/reuses the single implicit thread. These fields are
|
|
14046
|
+
// inert on every non-consult send (end-user send, team→user send).
|
|
14047
|
+
agent_receiver_id: clientOptionalString,
|
|
14048
|
+
consult_thread_id: clientOptionalString,
|
|
14049
|
+
is_first_message: clientOptionalBoolean,
|
|
14050
|
+
end_conversation: clientOptionalBoolean,
|
|
14051
|
+
// Pre-generated by the client so the optimistic bubble and the stored row share
|
|
14052
|
+
// a key (transcription live-updates land on the same row instead of duplicating).
|
|
14053
|
+
message_id: clientOptionalString,
|
|
14054
|
+
attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0),
|
|
14055
|
+
// Base64-encoded audio for STT. Size-capped in the route (the cap is a byte
|
|
14056
|
+
// budget tied to the /channels/* bodyLimit, not a shape rule).
|
|
14057
|
+
audio_file: clientOptionalString
|
|
14058
|
+
});
|
|
14059
|
+
appMessageResponse = external_exports.object({
|
|
14060
|
+
success: external_exports.boolean(),
|
|
14061
|
+
message: external_exports.string(),
|
|
14062
|
+
result: external_exports.object({
|
|
14063
|
+
conversation_id: external_exports.string().optional(),
|
|
14064
|
+
message_id: external_exports.string().optional(),
|
|
14065
|
+
status: external_exports.string().optional(),
|
|
14066
|
+
files: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).optional(),
|
|
14067
|
+
// True when this request reused a task-start/message id already accepted by
|
|
14068
|
+
// the server. Clients must replace their optimistic payload with a fresh
|
|
14069
|
+
// authoritative read because another tab may have won with different text.
|
|
14070
|
+
deduped: external_exports.boolean().optional()
|
|
14071
|
+
}).optional()
|
|
14072
|
+
});
|
|
14073
|
+
}
|
|
14074
|
+
});
|
|
14075
|
+
|
|
14102
14076
|
// ../../packages/core/dist/chunk-NVKU5PPQ.js
|
|
14103
14077
|
var ADMIN_SKILL_NAME_REGEX, adminSkillNameParam;
|
|
14104
14078
|
var init_chunk_NVKU5PPQ = __esm({
|
|
@@ -14148,10 +14122,10 @@ var init_chunk_BFG4ZWR4 = __esm({
|
|
|
14148
14122
|
}
|
|
14149
14123
|
});
|
|
14150
14124
|
|
|
14151
|
-
// ../../packages/core/dist/chunk-
|
|
14125
|
+
// ../../packages/core/dist/chunk-6QXCHNFQ.js
|
|
14152
14126
|
var dataExplorerDebugDoType, DEBUG_READ_MAX_LIMIT, DEBUG_READ_DEFAULT_LIMIT;
|
|
14153
|
-
var
|
|
14154
|
-
"../../packages/core/dist/chunk-
|
|
14127
|
+
var init_chunk_6QXCHNFQ = __esm({
|
|
14128
|
+
"../../packages/core/dist/chunk-6QXCHNFQ.js"() {
|
|
14155
14129
|
"use strict";
|
|
14156
14130
|
init_zod();
|
|
14157
14131
|
dataExplorerDebugDoType = external_exports.enum(["hub", "org", "conversation", "user", "platform", "thread", "community", "contact_book", "batch"]);
|
|
@@ -14262,7 +14236,7 @@ var init_chunk_OMPT4ZHR = __esm({
|
|
|
14262
14236
|
}
|
|
14263
14237
|
});
|
|
14264
14238
|
|
|
14265
|
-
// ../../packages/core/dist/chunk-
|
|
14239
|
+
// ../../packages/core/dist/chunk-3ACHWKFV.js
|
|
14266
14240
|
function refineScopedTarget(data, ctx) {
|
|
14267
14241
|
if (data.scope === "org") {
|
|
14268
14242
|
if (!data.org_id) {
|
|
@@ -14287,13 +14261,13 @@ function refineScopedTarget(data, ctx) {
|
|
|
14287
14261
|
}
|
|
14288
14262
|
}
|
|
14289
14263
|
}
|
|
14290
|
-
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, 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, debugHubConvParam, debugMessageIdQuery;
|
|
14291
|
-
var
|
|
14292
|
-
"../../packages/core/dist/chunk-
|
|
14264
|
+
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, 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;
|
|
14265
|
+
var init_chunk_3ACHWKFV = __esm({
|
|
14266
|
+
"../../packages/core/dist/chunk-3ACHWKFV.js"() {
|
|
14293
14267
|
"use strict";
|
|
14294
14268
|
init_chunk_FECLIZTY();
|
|
14295
14269
|
init_chunk_BFG4ZWR4();
|
|
14296
|
-
|
|
14270
|
+
init_chunk_6QXCHNFQ();
|
|
14297
14271
|
init_chunk_T4Q5COKJ();
|
|
14298
14272
|
init_chunk_OMPT4ZHR();
|
|
14299
14273
|
init_chunk_HZ6CADSY();
|
|
@@ -14620,6 +14594,11 @@ var init_chunk_2FCLSQSQ = __esm({
|
|
|
14620
14594
|
message_id: debugUuid.optional(),
|
|
14621
14595
|
limit: external_exports.coerce.number().int().min(1).max(DEBUG_READ_MAX_LIMIT).default(DEBUG_READ_DEFAULT_LIMIT)
|
|
14622
14596
|
});
|
|
14597
|
+
dataExplorerDebugCountsDoType = dataExplorerDebugDoType.extract(["hub", "org"]);
|
|
14598
|
+
dataExplorerDebugCountsParam = external_exports.object({
|
|
14599
|
+
type: dataExplorerDebugCountsDoType,
|
|
14600
|
+
id: debugUuid
|
|
14601
|
+
});
|
|
14623
14602
|
debugHubConvParam = external_exports.object({
|
|
14624
14603
|
hubId: debugUuid,
|
|
14625
14604
|
conversationId: debugUuid
|
|
@@ -14741,6 +14720,32 @@ var init_chunk_2PZIF56U = __esm({
|
|
|
14741
14720
|
}
|
|
14742
14721
|
});
|
|
14743
14722
|
|
|
14723
|
+
// ../../packages/core/dist/chunk-UEJOG2Q7.js
|
|
14724
|
+
var archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams;
|
|
14725
|
+
var init_chunk_UEJOG2Q7 = __esm({
|
|
14726
|
+
"../../packages/core/dist/chunk-UEJOG2Q7.js"() {
|
|
14727
|
+
"use strict";
|
|
14728
|
+
init_zod();
|
|
14729
|
+
archiveHubIdParam = external_exports.object({
|
|
14730
|
+
hubId: external_exports.string().uuid()
|
|
14731
|
+
});
|
|
14732
|
+
archiveConversationParams = external_exports.object({
|
|
14733
|
+
hubId: external_exports.string().uuid(),
|
|
14734
|
+
conversationId: external_exports.string().uuid()
|
|
14735
|
+
});
|
|
14736
|
+
archiveListQuery = external_exports.object({
|
|
14737
|
+
user_id: external_exports.string().optional(),
|
|
14738
|
+
start: external_exports.string().optional(),
|
|
14739
|
+
end: external_exports.string().optional(),
|
|
14740
|
+
page: external_exports.string().regex(/^\d+$/).optional(),
|
|
14741
|
+
page_size: external_exports.string().regex(/^\d+$/).optional()
|
|
14742
|
+
});
|
|
14743
|
+
archiveMessageObservabilityParams = archiveConversationParams.extend({
|
|
14744
|
+
messageId: external_exports.string().uuid()
|
|
14745
|
+
});
|
|
14746
|
+
}
|
|
14747
|
+
});
|
|
14748
|
+
|
|
14744
14749
|
// ../../packages/core/dist/chunk-SOJMWM63.js
|
|
14745
14750
|
var init_chunk_SOJMWM63 = __esm({
|
|
14746
14751
|
"../../packages/core/dist/chunk-SOJMWM63.js"() {
|
|
@@ -14955,6 +14960,7 @@ var init_chunk_TS4EYU3W = __esm({
|
|
|
14955
14960
|
var init_contracts = __esm({
|
|
14956
14961
|
"../../packages/core/dist/contracts/index.js"() {
|
|
14957
14962
|
"use strict";
|
|
14963
|
+
init_chunk_GK27ENTT();
|
|
14958
14964
|
init_chunk_SXDX4GHS();
|
|
14959
14965
|
init_chunk_HENF6YTF();
|
|
14960
14966
|
init_chunk_VXEAR36B();
|
|
@@ -14962,8 +14968,6 @@ var init_contracts = __esm({
|
|
|
14962
14968
|
init_chunk_Q7KIQHAZ();
|
|
14963
14969
|
init_chunk_WBFLPPDI();
|
|
14964
14970
|
init_chunk_IPXBFWUU();
|
|
14965
|
-
init_chunk_GK27ENTT();
|
|
14966
|
-
init_chunk_IPDOHAZ5();
|
|
14967
14971
|
init_chunk_GPM7PE44();
|
|
14968
14972
|
init_chunk_DGKMMFIR();
|
|
14969
14973
|
init_chunk_ZC6YGHNX();
|
|
@@ -14974,38 +14978,37 @@ var init_contracts = __esm({
|
|
|
14974
14978
|
init_chunk_4QBKRQMM();
|
|
14975
14979
|
init_chunk_4MRBBR5L();
|
|
14976
14980
|
init_chunk_BEOHBREG();
|
|
14977
|
-
|
|
14981
|
+
init_chunk_IPDOHAZ5();
|
|
14978
14982
|
init_chunk_YUZFHVB2();
|
|
14979
14983
|
init_chunk_I3O2RACG();
|
|
14980
14984
|
init_chunk_34LE6P7E();
|
|
14981
14985
|
init_chunk_FPSDNS2E();
|
|
14982
|
-
init_chunk_LKBSHANA();
|
|
14983
14986
|
init_chunk_23ESQLLF();
|
|
14984
14987
|
init_chunk_C4HEZ7ZI();
|
|
14985
14988
|
init_chunk_IR2NOSI3();
|
|
14986
14989
|
init_chunk_EA23LSDS();
|
|
14987
|
-
|
|
14990
|
+
init_chunk_SY6PLCPK();
|
|
14988
14991
|
init_chunk_LWMLR2WI();
|
|
14989
14992
|
init_chunk_ACGAI25T();
|
|
14990
14993
|
init_chunk_MH4O3YEX();
|
|
14991
|
-
|
|
14994
|
+
init_chunk_XR36MYEY();
|
|
14992
14995
|
init_chunk_KSTYTQ7I();
|
|
14993
|
-
|
|
14996
|
+
init_chunk_LKBSHANA();
|
|
14994
14997
|
init_chunk_BPCNB5RT();
|
|
14995
|
-
|
|
14998
|
+
init_chunk_FJ5K57CB();
|
|
14996
14999
|
init_chunk_4S4FBSBE();
|
|
14997
|
-
|
|
15000
|
+
init_chunk_RCTKQTJH();
|
|
14998
15001
|
init_chunk_JDJ4EUOL();
|
|
14999
15002
|
init_chunk_3KYTITOR();
|
|
15000
15003
|
init_chunk_XCDUP42J();
|
|
15001
15004
|
init_chunk_6J742GLA();
|
|
15002
15005
|
init_chunk_ZVXO3XL6();
|
|
15003
15006
|
init_chunk_YULHXJ5M();
|
|
15004
|
-
|
|
15007
|
+
init_chunk_V4FRPRH5();
|
|
15005
15008
|
init_chunk_ZHJEQBXJ();
|
|
15006
|
-
|
|
15009
|
+
init_chunk_EA6XOOL2();
|
|
15007
15010
|
init_chunk_LQY2OCQL();
|
|
15008
|
-
|
|
15011
|
+
init_chunk_2LZYS6YX();
|
|
15009
15012
|
init_chunk_3HSB6J4J();
|
|
15010
15013
|
init_chunk_IG6QBZMA();
|
|
15011
15014
|
init_chunk_ZJJ5ODOD();
|
|
@@ -15013,29 +15016,31 @@ var init_contracts = __esm({
|
|
|
15013
15016
|
init_chunk_LBDH7LCG();
|
|
15014
15017
|
init_chunk_4LXDRTO4();
|
|
15015
15018
|
init_chunk_E4DIIOOE();
|
|
15019
|
+
init_chunk_7CYHPF35();
|
|
15016
15020
|
init_chunk_23UZ2IKU();
|
|
15017
15021
|
init_chunk_MCSEEMGN();
|
|
15018
15022
|
init_chunk_UFYIBL66();
|
|
15019
15023
|
init_chunk_NVKU5PPQ();
|
|
15020
|
-
|
|
15024
|
+
init_chunk_3ACHWKFV();
|
|
15021
15025
|
init_chunk_FECLIZTY();
|
|
15022
15026
|
init_chunk_BFG4ZWR4();
|
|
15023
|
-
|
|
15027
|
+
init_chunk_6QXCHNFQ();
|
|
15024
15028
|
init_chunk_T4Q5COKJ();
|
|
15025
15029
|
init_chunk_3VHMUK4W();
|
|
15026
15030
|
init_chunk_AMG6HKUQ();
|
|
15027
15031
|
init_chunk_ACN6GXU6();
|
|
15028
15032
|
init_chunk_OMPT4ZHR();
|
|
15029
15033
|
init_chunk_2PZIF56U();
|
|
15034
|
+
init_chunk_UEJOG2Q7();
|
|
15030
15035
|
init_chunk_KJXJKAYT();
|
|
15031
15036
|
init_chunk_SOJMWM63();
|
|
15032
15037
|
init_chunk_WEXVYJ5H();
|
|
15033
|
-
|
|
15038
|
+
init_chunk_6Y7XMRWF();
|
|
15034
15039
|
init_chunk_5XEJSR22();
|
|
15035
15040
|
init_chunk_IBL7FANV();
|
|
15036
|
-
|
|
15037
|
-
init_chunk_A4JC7DXB();
|
|
15041
|
+
init_chunk_Z22T2ASG();
|
|
15038
15042
|
init_chunk_VORPHGDT();
|
|
15043
|
+
init_chunk_A4JC7DXB();
|
|
15039
15044
|
init_chunk_HZ6CADSY();
|
|
15040
15045
|
init_chunk_MIWZOSPI();
|
|
15041
15046
|
init_chunk_2ISUBJG7();
|
|
@@ -15935,6 +15940,10 @@ var init_api_client = __esm({
|
|
|
15935
15940
|
`/api/admin/data-explorer/debug/do/${doType}/${encodeURIComponent(doId)}/tables/${encodeURIComponent(table)}/rows${qs}`
|
|
15936
15941
|
);
|
|
15937
15942
|
}
|
|
15943
|
+
/** A hub's or an organization's knowledge as numbers: the admin census's counts (no text). */
|
|
15944
|
+
async debugCounts(doType, doId) {
|
|
15945
|
+
return this.request("GET", `/api/admin/data-explorer/debug/do/${doType}/${encodeURIComponent(doId)}/counts`);
|
|
15946
|
+
}
|
|
15938
15947
|
async debugListAnalyticsTables() {
|
|
15939
15948
|
return this.request("GET", "/api/admin/data-explorer/debug/analytics/tables");
|
|
15940
15949
|
}
|
|
@@ -16359,13 +16368,13 @@ var init_dist = __esm({
|
|
|
16359
16368
|
init_chunk_KJXJKAYT();
|
|
16360
16369
|
init_chunk_SOJMWM63();
|
|
16361
16370
|
init_chunk_WEXVYJ5H();
|
|
16362
|
-
|
|
16371
|
+
init_chunk_6Y7XMRWF();
|
|
16363
16372
|
init_chunk_5XEJSR22();
|
|
16364
16373
|
init_chunk_IBL7FANV();
|
|
16365
|
-
|
|
16366
|
-
init_chunk_A4JC7DXB();
|
|
16374
|
+
init_chunk_Z22T2ASG();
|
|
16367
16375
|
init_chunk_P3AWZG3N();
|
|
16368
16376
|
init_chunk_VORPHGDT();
|
|
16377
|
+
init_chunk_A4JC7DXB();
|
|
16369
16378
|
init_chunk_HZ6CADSY();
|
|
16370
16379
|
init_chunk_MIWZOSPI();
|
|
16371
16380
|
init_chunk_ERFR7IRY();
|
|
@@ -17754,6 +17763,7 @@ var init_utils = __esm({
|
|
|
17754
17763
|
["admin observability", { positionals: 2, values: ["--message-id"] }],
|
|
17755
17764
|
["admin do tables", { positionals: 2 }],
|
|
17756
17765
|
["admin do read", { positionals: 3, values: ["--limit", "--id"] }],
|
|
17766
|
+
["admin do counts", { positionals: 2 }],
|
|
17757
17767
|
["admin analytics tables", { positionals: 0 }],
|
|
17758
17768
|
["admin analytics read", { positionals: 1, values: ["--limit", "--conversation-id", "--hub-id", "--message-id"] }],
|
|
17759
17769
|
["admin report list", { positionals: 0, values: ["--status", "--source", "--limit", "--offset", "--since", "--resolved-since"] }],
|
|
@@ -36131,6 +36141,9 @@ async function adminCommand(args2) {
|
|
|
36131
36141
|
case "read":
|
|
36132
36142
|
await runDoRead(positional, flagArgs);
|
|
36133
36143
|
return;
|
|
36144
|
+
case "counts":
|
|
36145
|
+
await runDoCounts(positional, flagArgs);
|
|
36146
|
+
return;
|
|
36134
36147
|
default:
|
|
36135
36148
|
printHelp2();
|
|
36136
36149
|
process.exit(1);
|
|
@@ -36461,6 +36474,32 @@ async function runDoRead(positional, flagArgs) {
|
|
|
36461
36474
|
}
|
|
36462
36475
|
printDebugRowsResult(response.data, jsonOutput);
|
|
36463
36476
|
}
|
|
36477
|
+
async function runDoCounts(positional, flagArgs) {
|
|
36478
|
+
const type = dataExplorerDebugCountsDoType.safeParse(positional[0]);
|
|
36479
|
+
if (positional.length < 2 || !type.success) {
|
|
36480
|
+
console.error(`wayai admin do counts <${dataExplorerDebugCountsDoType.options.join("|")}> <id> [--json]`);
|
|
36481
|
+
process.exit(1);
|
|
36482
|
+
}
|
|
36483
|
+
const { jsonOutput } = parseFlags2(flagArgs, ["--json"]);
|
|
36484
|
+
const { config, accessToken } = await requireAuth();
|
|
36485
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
36486
|
+
let response;
|
|
36487
|
+
try {
|
|
36488
|
+
response = await client.debugCounts(type.data, positional[1]);
|
|
36489
|
+
} catch (err) {
|
|
36490
|
+
exitOnApiError(err);
|
|
36491
|
+
throw err;
|
|
36492
|
+
}
|
|
36493
|
+
if (jsonOutput) {
|
|
36494
|
+
console.log(JSON.stringify(response.data, null, 2));
|
|
36495
|
+
return;
|
|
36496
|
+
}
|
|
36497
|
+
for (const line of flattenCounts(response.data)) console.log(line);
|
|
36498
|
+
}
|
|
36499
|
+
function flattenCounts(value, prefix = "") {
|
|
36500
|
+
if (value === null || typeof value !== "object") return [`${prefix}: ${value === null ? "\u2014" : String(value)}`];
|
|
36501
|
+
return Object.entries(value).flatMap(([key, child]) => flattenCounts(child, prefix ? `${prefix}.${key}` : key));
|
|
36502
|
+
}
|
|
36464
36503
|
async function runAnalyticsTables() {
|
|
36465
36504
|
const { config, accessToken } = await requireAuth();
|
|
36466
36505
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
@@ -37824,6 +37863,9 @@ wayai admin \u2014 platform-admin diagnostic commands
|
|
|
37824
37863
|
Usage:
|
|
37825
37864
|
wayai admin do tables <type> <id>
|
|
37826
37865
|
wayai admin do read <type> <id> <table> [--limit N] [--id X] [--json]
|
|
37866
|
+
wayai admin do counts <hub|org> <id> [--json] Knowledge as numbers, no text: a hub's knowledge rows, links, toolset connections,
|
|
37867
|
+
knowledge placeholders per stored text and (production) publish state; an org's
|
|
37868
|
+
resources and moved-knowledge registry
|
|
37827
37869
|
|
|
37828
37870
|
wayai admin analytics tables
|
|
37829
37871
|
wayai admin analytics read <table> [--conversation-id X] [--hub-id Y] [--message-id Z] [--limit N] [--json]
|