@wayai/cli 0.3.242 → 0.3.244
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 +1339 -1030
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4687,8 +4687,8 @@ var init_resource_paths = __esm({
|
|
|
4687
4687
|
"../../packages/core/dist/resource-paths.js"() {
|
|
4688
4688
|
"use strict";
|
|
4689
4689
|
init_chunk_S4VDZ7PZ();
|
|
4690
|
-
init_chunk_CJ3L46X6();
|
|
4691
4690
|
init_chunk_LD6U3CDG();
|
|
4691
|
+
init_chunk_CJ3L46X6();
|
|
4692
4692
|
init_chunk_6TSQ5HXC();
|
|
4693
4693
|
SKILL_NAMESPACE = "skills";
|
|
4694
4694
|
FALLBACK_SLUG = "resource";
|
|
@@ -4888,6 +4888,54 @@ var init_fs_safety = __esm({
|
|
|
4888
4888
|
}
|
|
4889
4889
|
});
|
|
4890
4890
|
|
|
4891
|
+
// ../../packages/core/dist/chunk-Q7KIQHAZ.js
|
|
4892
|
+
var initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody;
|
|
4893
|
+
var init_chunk_Q7KIQHAZ = __esm({
|
|
4894
|
+
"../../packages/core/dist/chunk-Q7KIQHAZ.js"() {
|
|
4895
|
+
"use strict";
|
|
4896
|
+
init_chunk_6TSQ5HXC();
|
|
4897
|
+
init_zod();
|
|
4898
|
+
initialValueCreateSchema = external_exports.record(external_exports.unknown()).nullish().transform((v) => v && Object.keys(v).length > 0 ? v : null);
|
|
4899
|
+
initialValueUpdateSchema = external_exports.record(external_exports.unknown()).nullish().transform((v) => v === void 0 ? void 0 : v && Object.keys(v).length > 0 ? v : null);
|
|
4900
|
+
stateIdParam = external_exports.object({
|
|
4901
|
+
id: external_exports.string().uuid()
|
|
4902
|
+
});
|
|
4903
|
+
listStatesQuery = external_exports.object({
|
|
4904
|
+
hub_id: external_exports.string().uuid()
|
|
4905
|
+
});
|
|
4906
|
+
stateNameSchema = external_exports.string().min(1, "state_name is required").max(100, "state_name must be 100 characters or fewer").refine((v) => visibleLength(v) > 0, "state_name must not be blank");
|
|
4907
|
+
createStateBody = external_exports.object({
|
|
4908
|
+
hub_id: external_exports.string().uuid(),
|
|
4909
|
+
state_slug: slugSchema,
|
|
4910
|
+
state_name: stateNameSchema,
|
|
4911
|
+
state_scope: external_exports.enum(["conversation", "user"]),
|
|
4912
|
+
state_description: external_exports.string().max(1e3).nullish(),
|
|
4913
|
+
json_schema: external_exports.record(external_exports.unknown()).default({}),
|
|
4914
|
+
initial_value: initialValueCreateSchema,
|
|
4915
|
+
display_order: external_exports.number().int().nonnegative().optional(),
|
|
4916
|
+
is_enabled: external_exports.boolean().default(true),
|
|
4917
|
+
inject_in_last_message: external_exports.boolean().default(true)
|
|
4918
|
+
});
|
|
4919
|
+
updateStateBody = external_exports.object({
|
|
4920
|
+
// state_slug is immutable after first persist — not accepted here.
|
|
4921
|
+
state_name: stateNameSchema.optional(),
|
|
4922
|
+
state_scope: external_exports.enum(["conversation", "user"]).optional(),
|
|
4923
|
+
state_description: external_exports.string().max(1e3).nullish(),
|
|
4924
|
+
json_schema: external_exports.record(external_exports.unknown()).optional(),
|
|
4925
|
+
initial_value: initialValueUpdateSchema,
|
|
4926
|
+
display_order: external_exports.number().int().nonnegative().optional(),
|
|
4927
|
+
is_enabled: external_exports.boolean().optional(),
|
|
4928
|
+
inject_in_last_message: external_exports.boolean().optional()
|
|
4929
|
+
});
|
|
4930
|
+
reorderStatesBody = external_exports.object({
|
|
4931
|
+
states: external_exports.array(external_exports.object({
|
|
4932
|
+
state_id: external_exports.string().uuid(),
|
|
4933
|
+
display_order: external_exports.number().int().nonnegative()
|
|
4934
|
+
})).min(1)
|
|
4935
|
+
});
|
|
4936
|
+
}
|
|
4937
|
+
});
|
|
4938
|
+
|
|
4891
4939
|
// ../../packages/core/dist/chunk-NKLVUTFO.js
|
|
4892
4940
|
var BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, BASE_CREDENTIAL_NAME_PATTERN, BASE_CREDENTIAL_NAME_CHARSET, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery;
|
|
4893
4941
|
var init_chunk_NKLVUTFO = __esm({
|
|
@@ -5348,86 +5396,6 @@ var init_chunk_RACEDHG6 = __esm({
|
|
|
5348
5396
|
}
|
|
5349
5397
|
});
|
|
5350
5398
|
|
|
5351
|
-
// ../../packages/core/dist/chunk-Q7KIQHAZ.js
|
|
5352
|
-
var initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody;
|
|
5353
|
-
var init_chunk_Q7KIQHAZ = __esm({
|
|
5354
|
-
"../../packages/core/dist/chunk-Q7KIQHAZ.js"() {
|
|
5355
|
-
"use strict";
|
|
5356
|
-
init_chunk_6TSQ5HXC();
|
|
5357
|
-
init_zod();
|
|
5358
|
-
initialValueCreateSchema = external_exports.record(external_exports.unknown()).nullish().transform((v) => v && Object.keys(v).length > 0 ? v : null);
|
|
5359
|
-
initialValueUpdateSchema = external_exports.record(external_exports.unknown()).nullish().transform((v) => v === void 0 ? void 0 : v && Object.keys(v).length > 0 ? v : null);
|
|
5360
|
-
stateIdParam = external_exports.object({
|
|
5361
|
-
id: external_exports.string().uuid()
|
|
5362
|
-
});
|
|
5363
|
-
listStatesQuery = external_exports.object({
|
|
5364
|
-
hub_id: external_exports.string().uuid()
|
|
5365
|
-
});
|
|
5366
|
-
stateNameSchema = external_exports.string().min(1, "state_name is required").max(100, "state_name must be 100 characters or fewer").refine((v) => visibleLength(v) > 0, "state_name must not be blank");
|
|
5367
|
-
createStateBody = external_exports.object({
|
|
5368
|
-
hub_id: external_exports.string().uuid(),
|
|
5369
|
-
state_slug: slugSchema,
|
|
5370
|
-
state_name: stateNameSchema,
|
|
5371
|
-
state_scope: external_exports.enum(["conversation", "user"]),
|
|
5372
|
-
state_description: external_exports.string().max(1e3).nullish(),
|
|
5373
|
-
json_schema: external_exports.record(external_exports.unknown()).default({}),
|
|
5374
|
-
initial_value: initialValueCreateSchema,
|
|
5375
|
-
display_order: external_exports.number().int().nonnegative().optional(),
|
|
5376
|
-
is_enabled: external_exports.boolean().default(true),
|
|
5377
|
-
inject_in_last_message: external_exports.boolean().default(true)
|
|
5378
|
-
});
|
|
5379
|
-
updateStateBody = external_exports.object({
|
|
5380
|
-
// state_slug is immutable after first persist — not accepted here.
|
|
5381
|
-
state_name: stateNameSchema.optional(),
|
|
5382
|
-
state_scope: external_exports.enum(["conversation", "user"]).optional(),
|
|
5383
|
-
state_description: external_exports.string().max(1e3).nullish(),
|
|
5384
|
-
json_schema: external_exports.record(external_exports.unknown()).optional(),
|
|
5385
|
-
initial_value: initialValueUpdateSchema,
|
|
5386
|
-
display_order: external_exports.number().int().nonnegative().optional(),
|
|
5387
|
-
is_enabled: external_exports.boolean().optional(),
|
|
5388
|
-
inject_in_last_message: external_exports.boolean().optional()
|
|
5389
|
-
});
|
|
5390
|
-
reorderStatesBody = external_exports.object({
|
|
5391
|
-
states: external_exports.array(external_exports.object({
|
|
5392
|
-
state_id: external_exports.string().uuid(),
|
|
5393
|
-
display_order: external_exports.number().int().nonnegative()
|
|
5394
|
-
})).min(1)
|
|
5395
|
-
});
|
|
5396
|
-
}
|
|
5397
|
-
});
|
|
5398
|
-
|
|
5399
|
-
// ../../packages/core/dist/chunk-ACKF2MVU.js
|
|
5400
|
-
var MAX_NAME_LENGTH, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody;
|
|
5401
|
-
var init_chunk_ACKF2MVU = __esm({
|
|
5402
|
-
"../../packages/core/dist/chunk-ACKF2MVU.js"() {
|
|
5403
|
-
"use strict";
|
|
5404
|
-
init_chunk_HZ6CADSY();
|
|
5405
|
-
init_zod();
|
|
5406
|
-
MAX_NAME_LENGTH = 100;
|
|
5407
|
-
MAX_VALUE_LENGTH = 32 * 1024;
|
|
5408
|
-
MAX_TAGS = 20;
|
|
5409
|
-
MAX_TAG_LENGTH = 50;
|
|
5410
|
-
MAX_SCOPE_HUBS = 100;
|
|
5411
|
-
MAX_SCOPE_TAGS = 50;
|
|
5412
|
-
vaultSecretScopeSchema = external_exports.object({
|
|
5413
|
-
hubs: external_exports.array(external_exports.string().min(1)).max(MAX_SCOPE_HUBS).optional(),
|
|
5414
|
-
tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH)).max(MAX_SCOPE_TAGS).optional()
|
|
5415
|
-
}).strict();
|
|
5416
|
-
vaultCreateBody = external_exports.object({
|
|
5417
|
-
name: external_exports.string().trim().min(1, "name is required").max(MAX_NAME_LENGTH, `name must be ${MAX_NAME_LENGTH} characters or fewer`),
|
|
5418
|
-
value: external_exports.string().min(1, "value is required").max(MAX_VALUE_LENGTH, `value must be ${MAX_VALUE_LENGTH} characters or fewer`),
|
|
5419
|
-
tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH, `Tag must be ${MAX_TAG_LENGTH} characters or fewer`)).max(MAX_TAGS, `Maximum ${MAX_TAGS} tags allowed`).optional().default([]),
|
|
5420
|
-
scope: vaultSecretScopeSchema.optional().default({})
|
|
5421
|
-
}).strict();
|
|
5422
|
-
vaultUpdateBody = external_exports.object({
|
|
5423
|
-
name: external_exports.string().trim().min(1).max(MAX_NAME_LENGTH).optional(),
|
|
5424
|
-
value: external_exports.string().min(1).max(MAX_VALUE_LENGTH).optional(),
|
|
5425
|
-
tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH)).max(MAX_TAGS).optional(),
|
|
5426
|
-
scope: vaultSecretScopeSchema.optional()
|
|
5427
|
-
}).strict();
|
|
5428
|
-
}
|
|
5429
|
-
});
|
|
5430
|
-
|
|
5431
5399
|
// ../../packages/core/dist/chunk-WBFLPPDI.js
|
|
5432
5400
|
var connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, BESIDE_LINK_FIELDS, setProductionCredentialBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery;
|
|
5433
5401
|
var init_chunk_WBFLPPDI = __esm({
|
|
@@ -5571,402 +5539,6 @@ var init_chunk_IPXBFWUU = __esm({
|
|
|
5571
5539
|
}
|
|
5572
5540
|
});
|
|
5573
5541
|
|
|
5574
|
-
// ../../packages/core/dist/chunk-VTFFO3RA.js
|
|
5575
|
-
var REKOR_ACTOR_TYPE_HEADER, REKOR_ACTOR_ID_HEADER, REKOR_ACTOR_LABEL_HEADER, REKOR_ACTOR_ORG_HEADER, REKOR_ACTOR_ADMIN_HEADER, REKOR_CLIENT_HEADER, REKOR_TOOL_ID_HEADER, REKOR_CLIENTS, rekorClientSchema, MAX_REKOR_TOOL_ID_LENGTH, rekorToolIdSchema, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, REKOR_BOUND_BASE_HEADER, REKOR_BOUND_TOOLSET_HEADER, REKOR_BOUND_TOKEN_HEADER, REKOR_BOUND_CUSTOMER_HEADER, DATA_BASE_GENERATION_HEADER, REKOR_MAX_ACTOR_ID_LENGTH, REKOR_MAX_ACTOR_LABEL_LENGTH;
|
|
5576
|
-
var init_chunk_VTFFO3RA = __esm({
|
|
5577
|
-
"../../packages/core/dist/chunk-VTFFO3RA.js"() {
|
|
5578
|
-
"use strict";
|
|
5579
|
-
init_zod();
|
|
5580
|
-
REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
|
|
5581
|
-
REKOR_ACTOR_ID_HEADER = "X-Rekor-Actor-Id";
|
|
5582
|
-
REKOR_ACTOR_LABEL_HEADER = "X-Rekor-Actor-Label";
|
|
5583
|
-
REKOR_ACTOR_ORG_HEADER = "X-Rekor-Actor-Org";
|
|
5584
|
-
REKOR_ACTOR_ADMIN_HEADER = "X-Rekor-Actor-Admin";
|
|
5585
|
-
REKOR_CLIENT_HEADER = "X-Rekor-Client";
|
|
5586
|
-
REKOR_TOOL_ID_HEADER = "X-Rekor-Tool-Id";
|
|
5587
|
-
REKOR_CLIENTS = ["api", "cli", "mcp"];
|
|
5588
|
-
rekorClientSchema = external_exports.enum(REKOR_CLIENTS);
|
|
5589
|
-
MAX_REKOR_TOOL_ID_LENGTH = 128;
|
|
5590
|
-
rekorToolIdSchema = external_exports.string().trim().min(1).max(MAX_REKOR_TOOL_ID_LENGTH);
|
|
5591
|
-
REKOR_V1_PREFIX = "/v1";
|
|
5592
|
-
DATA_PROXY_ORG_QUERY_PARAM = "org_id";
|
|
5593
|
-
MAX_PROVISIONING_BODY_BYTES = 256 * 1024;
|
|
5594
|
-
dataProxyQuery = external_exports.object({
|
|
5595
|
-
[DATA_PROXY_ORG_QUERY_PARAM]: external_exports.string().uuid().optional()
|
|
5596
|
-
});
|
|
5597
|
-
rekorAttestation = external_exports.object({
|
|
5598
|
-
[REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["user", "token"]),
|
|
5599
|
-
[REKOR_ACTOR_ID_HEADER]: external_exports.string().min(1),
|
|
5600
|
-
[REKOR_ACTOR_LABEL_HEADER]: external_exports.string(),
|
|
5601
|
-
[REKOR_ACTOR_ORG_HEADER]: external_exports.string().uuid(),
|
|
5602
|
-
[REKOR_ACTOR_ADMIN_HEADER]: external_exports.enum(["0", "1"]),
|
|
5603
|
-
[REKOR_CLIENT_HEADER]: rekorClientSchema,
|
|
5604
|
-
[REKOR_TOOL_ID_HEADER]: rekorToolIdSchema.optional()
|
|
5605
|
-
});
|
|
5606
|
-
REQUIRED_REKOR_ATTESTATION_HEADERS = Object.entries(rekorAttestation.shape).filter(([, field]) => !field.isOptional()).map(([header]) => header);
|
|
5607
|
-
REKOR_BOUND_BASE_HEADER = "X-Rekor-Bound-Base";
|
|
5608
|
-
REKOR_BOUND_TOOLSET_HEADER = "X-Rekor-Bound-Toolset";
|
|
5609
|
-
REKOR_BOUND_TOKEN_HEADER = "X-Rekor-Bound-Token";
|
|
5610
|
-
REKOR_BOUND_CUSTOMER_HEADER = "X-Rekor-Bound-Customer";
|
|
5611
|
-
DATA_BASE_GENERATION_HEADER = "X-Data-Base-Generation";
|
|
5612
|
-
REKOR_MAX_ACTOR_ID_LENGTH = 256;
|
|
5613
|
-
REKOR_MAX_ACTOR_LABEL_LENGTH = 256;
|
|
5614
|
-
}
|
|
5615
|
-
});
|
|
5616
|
-
|
|
5617
|
-
// ../../packages/core/dist/chunk-VZA6NHCH.js
|
|
5618
|
-
var TOOLSET_SLUG_PATTERN, REKOR_STRUCTURAL_ID_PATTERN, baseEnvironmentSchema, toolsetFileToolSchema, toolsetSurfaceSchema, toolsetConnectionBindingSchema, rekorToolsetToolsSchema, rekorBoundAttestation, rekorResolvedToolsetSchema, resolvedRecordTypeSchema, reviewWritersSchema, sharedScopeSchema, resolvedFileToolSchema, rekorToolsetFileSchema, rekorToolsetFileUrlAnswerSchema, rekorToolsetFileListSchema, rekorToolsetFileGetSchema, rekorToolsetFilePutSchema, TOOLSET_CUSTOMER_FACING_REFUSAL_MARK, TOOLSET_CUSTOMER_FACING_REFUSAL;
|
|
5619
|
-
var init_chunk_VZA6NHCH = __esm({
|
|
5620
|
-
"../../packages/core/dist/chunk-VZA6NHCH.js"() {
|
|
5621
|
-
"use strict";
|
|
5622
|
-
init_chunk_VTFFO3RA();
|
|
5623
|
-
init_chunk_WNLWNFHH();
|
|
5624
|
-
init_zod();
|
|
5625
|
-
TOOLSET_SLUG_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
|
|
5626
|
-
REKOR_STRUCTURAL_ID_PATTERN = TOOLSET_SLUG_PATTERN;
|
|
5627
|
-
baseEnvironmentSchema = external_exports.enum(["preview", "production"]);
|
|
5628
|
-
toolsetFileToolSchema = external_exports.object({
|
|
5629
|
-
file_type: external_exports.string().min(1),
|
|
5630
|
-
path_prefix: external_exports.string(),
|
|
5631
|
-
/** The entry's authored description of its tools (`description_override`), when it has one. */
|
|
5632
|
-
description: external_exports.string().min(1).optional(),
|
|
5633
|
-
tools: external_exports.object({
|
|
5634
|
-
list: external_exports.string().min(1).optional(),
|
|
5635
|
-
get: external_exports.string().min(1).optional(),
|
|
5636
|
-
put: external_exports.string().min(1).optional(),
|
|
5637
|
-
delete: external_exports.string().min(1).optional(),
|
|
5638
|
-
get_url: external_exports.string().min(1).optional(),
|
|
5639
|
-
put_url: external_exports.string().min(1).optional()
|
|
5640
|
-
})
|
|
5641
|
-
});
|
|
5642
|
-
toolsetSurfaceSchema = external_exports.object({
|
|
5643
|
-
/** Any record, composite, relationship or SQL Action tool: the toolset reaches records. */
|
|
5644
|
-
records: external_exports.boolean(),
|
|
5645
|
-
sql_query: external_exports.boolean(),
|
|
5646
|
-
batch: external_exports.boolean(),
|
|
5647
|
-
/**
|
|
5648
|
-
* The toolset serves one customer per call (#5083 RK2): its every call names the customer it serves,
|
|
5649
|
-
* and reaches only that customer's records and shared ones. Absent on a surface recorded before it
|
|
5650
|
-
* was, which reads as not scoped until the connection's next tool sync or token save records it: its
|
|
5651
|
-
* calls name no customer, and the customer-facing rule admits none of its record tools.
|
|
5652
|
-
*/
|
|
5653
|
-
customer_scoped: external_exports.boolean().optional(),
|
|
5654
|
-
/**
|
|
5655
|
-
* A key of the resolve this side neither describes nor classifies exposes something: a kind of tool
|
|
5656
|
-
* the data product added later, counted in `records`. The customer-facing rule never admits it, a
|
|
5657
|
-
* customer scope included, until it is classified here. Absent on a surface recorded before it was,
|
|
5658
|
-
* which reads as present.
|
|
5659
|
-
*/
|
|
5660
|
-
unclassified_tools: external_exports.boolean().optional(),
|
|
5661
|
-
/**
|
|
5662
|
-
* Any of its file tools writes: an operation other than `list`, `get` and `get_url` (`put`, `delete`,
|
|
5663
|
-
* `put_url`, or one the data product adds later), or an entry this side cannot read. Absent on a surface recorded
|
|
5664
|
-
* before it was, which the customer-facing rule reads as writing until the connection's next tool
|
|
5665
|
-
* sync or token save records it.
|
|
5666
|
-
*/
|
|
5667
|
-
file_writes: external_exports.boolean().optional(),
|
|
5668
|
-
/**
|
|
5669
|
-
* A record type the resolve's `record_types` carries names the toolset among its writers
|
|
5670
|
-
* (`x-review.writers`, #5083 RK4): the toolset writes the type's drafts and reads its every record,
|
|
5671
|
-
* drafts included. Those are the types its actions and composite record steps reach, and every
|
|
5672
|
-
* reviewed type it reaches otherwise: at a relationship tool's or a composite relationship step's
|
|
5673
|
-
* end, in a `batch` entry, or, through `sql_query`, all of them (decision 198). Or such a type's
|
|
5674
|
-
* declaration this side cannot read, or a resolve reaching records that carries no record types.
|
|
5675
|
-
* Absent on a surface recorded before it was, which the customer-facing rule reads as writing, for a
|
|
5676
|
-
* toolset reaching records, until the connection's next tool sync or token save records it.
|
|
5677
|
-
*/
|
|
5678
|
-
review_writes: external_exports.boolean().optional(),
|
|
5679
|
-
/**
|
|
5680
|
-
* Every record type the toolset reaches, at least one, is reviewed (`x-review`), holds no customer data
|
|
5681
|
-
* (`shared`), and does not name it among its writers: each call reads only that type's approved
|
|
5682
|
-
* records (#5083 decision 182, Q9). Never with a SQL Action, whose query reads its types' every
|
|
5683
|
-
* record, drafts included. Absent on a surface recorded before it was, which reads as false.
|
|
5684
|
-
*/
|
|
5685
|
-
approved_reads_only: external_exports.boolean().optional(),
|
|
5686
|
-
/**
|
|
5687
|
-
* The toolset's file tools. Absent when it has none, and on a surface recorded before they were.
|
|
5688
|
-
* A list this side cannot read is dropped rather than failing the binding, which every call and
|
|
5689
|
-
* the customer-facing rule read: the next tool sync records it again.
|
|
5690
|
-
*/
|
|
5691
|
-
files: external_exports.array(toolsetFileToolSchema).optional().catch(void 0)
|
|
5692
|
-
});
|
|
5693
|
-
toolsetConnectionBindingSchema = external_exports.object({
|
|
5694
|
-
base_id: external_exports.string().min(1),
|
|
5695
|
-
/** The slug the token was resolved against — `settings.toolset` at that write. */
|
|
5696
|
-
toolset: external_exports.string().min(1),
|
|
5697
|
-
/** The base's incarnation when the token was written; a bound attested call states it. */
|
|
5698
|
-
base_generation: external_exports.number().int().min(1),
|
|
5699
|
-
environment: baseEnvironmentSchema,
|
|
5700
|
-
surface: toolsetSurfaceSchema,
|
|
5701
|
-
/**
|
|
5702
|
-
* The id of the token the binding was resolved from, as its resolve reports it; a bound attested
|
|
5703
|
-
* call names it (`REKOR_BOUND_TOKEN_HEADER`), so the data product refuses the binding once the token
|
|
5704
|
-
* is revoked or expires (owner decision 41). Absent on a binding recorded before the report carried
|
|
5705
|
-
* it: its calls name none until a token save, or a tool sync while the token still stands, records it.
|
|
5706
|
-
* One that does not read is dropped rather than failing the binding.
|
|
5707
|
-
*/
|
|
5708
|
-
token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
|
|
5709
|
-
});
|
|
5710
|
-
rekorToolsetToolsSchema = external_exports.object({
|
|
5711
|
-
data: external_exports.object({
|
|
5712
|
-
tools: external_exports.array(external_exports.object({
|
|
5713
|
-
name: external_exports.string(),
|
|
5714
|
-
description: external_exports.string().optional(),
|
|
5715
|
-
inputSchema: external_exports.record(external_exports.unknown()).optional()
|
|
5716
|
-
}))
|
|
5717
|
-
})
|
|
5718
|
-
});
|
|
5719
|
-
rekorBoundAttestation = rekorAttestation.extend({
|
|
5720
|
-
[REKOR_ACTOR_TYPE_HEADER]: external_exports.literal("token"),
|
|
5721
|
-
/** Trimmed and checked as the far side trims and checks it. */
|
|
5722
|
-
[REKOR_ACTOR_ID_HEADER]: external_exports.string().trim().min(1).max(REKOR_MAX_ACTOR_ID_LENGTH),
|
|
5723
|
-
[REKOR_ACTOR_LABEL_HEADER]: external_exports.string().max(REKOR_MAX_ACTOR_LABEL_LENGTH),
|
|
5724
|
-
[REKOR_ACTOR_ADMIN_HEADER]: external_exports.literal("0"),
|
|
5725
|
-
[REKOR_BOUND_BASE_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
|
|
5726
|
-
[REKOR_BOUND_TOOLSET_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
|
|
5727
|
-
/**
|
|
5728
|
-
* Decimal digits only, as the far side parses it, and at most 15 of them: its `Number()` reads
|
|
5729
|
-
* every such value back exactly, where a longer one may round or overflow to `Infinity` (a 400).
|
|
5730
|
-
*/
|
|
5731
|
-
[DATA_BASE_GENERATION_HEADER]: external_exports.string().regex(/^[1-9]\d{0,14}$/),
|
|
5732
|
-
/** The token the binding was resolved from, when the connection records it (owner decision 41). */
|
|
5733
|
-
[REKOR_BOUND_TOKEN_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional(),
|
|
5734
|
-
/**
|
|
5735
|
-
* The customer the call serves (#5083 RK2): a contact id, which the contact book mints as a UUID.
|
|
5736
|
-
* Every UUID is an id the far side reads back as the customer's external id.
|
|
5737
|
-
*/
|
|
5738
|
-
[REKOR_BOUND_CUSTOMER_HEADER]: external_exports.string().uuid().optional()
|
|
5739
|
-
});
|
|
5740
|
-
rekorResolvedToolsetSchema = external_exports.object({
|
|
5741
|
-
data: external_exports.object({
|
|
5742
|
-
base_id: external_exports.string().min(1),
|
|
5743
|
-
environment: baseEnvironmentSchema,
|
|
5744
|
-
base_generation: external_exports.number().int().min(1),
|
|
5745
|
-
/**
|
|
5746
|
-
* The calling token's binding, or null for a token bound to none. A bound token can call only
|
|
5747
|
-
* its toolset's tools, which is what a toolset connection stores (#5083 decision 14). Its org
|
|
5748
|
-
* is the token's own: base ids are unique only per org, so the base id alone does not say
|
|
5749
|
-
* which base the token reaches.
|
|
5750
|
-
*/
|
|
5751
|
-
toolset_binding: external_exports.object({
|
|
5752
|
-
org_id: external_exports.string().optional(),
|
|
5753
|
-
base_id: external_exports.string(),
|
|
5754
|
-
toolset_id: external_exports.string(),
|
|
5755
|
-
/**
|
|
5756
|
-
* The token's own id, which a bound call names (`REKOR_BOUND_TOKEN_HEADER`); absent when the
|
|
5757
|
-
* caller has none (owner decision 41), and dropped when it is not an id the far side reads back.
|
|
5758
|
-
*/
|
|
5759
|
-
token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
|
|
5760
|
-
}).nullable().optional(),
|
|
5761
|
-
actions: external_exports.array(external_exports.unknown()).optional(),
|
|
5762
|
-
composites: external_exports.array(external_exports.unknown()).optional(),
|
|
5763
|
-
relationships: external_exports.array(external_exports.unknown()).optional(),
|
|
5764
|
-
/**
|
|
5765
|
-
* The toolset's SQL Actions (#5311): each a fixed, read-only query over the record types it
|
|
5766
|
-
* declares, which the resolve also carries in `record_types` and `record_type_scopes`.
|
|
5767
|
-
*/
|
|
5768
|
-
sql_actions: external_exports.array(external_exports.unknown()).optional(),
|
|
5769
|
-
files: external_exports.array(external_exports.unknown()).optional(),
|
|
5770
|
-
batch: external_exports.object({ enabled: external_exports.boolean().optional() }).passthrough().nullable().optional(),
|
|
5771
|
-
sql_query: external_exports.boolean().optional(),
|
|
5772
|
-
/** The toolset serves one customer per call (#5083 RK2). Absent reads as not scoped. */
|
|
5773
|
-
customer_scope: external_exports.boolean().optional(),
|
|
5774
|
-
/**
|
|
5775
|
-
* Record types the toolset reaches, by id, as the data product stores them (`json_schema`
|
|
5776
|
-
* included): each one its actions, composite record steps and SQL Actions reach, and each reviewed one it
|
|
5777
|
-
* reaches otherwise (relationship ends, `batch` entries, every one through `sql_query`; #5083
|
|
5778
|
-
* decision 198). An unreviewed type it reaches only otherwise is not here. A reviewed type's
|
|
5779
|
-
* `x-review` names its writers (RK4).
|
|
5780
|
-
*/
|
|
5781
|
-
record_types: external_exports.record(external_exports.unknown()).optional(),
|
|
5782
|
-
/**
|
|
5783
|
-
* What each record type the toolset's actions, composite steps, SQL Actions and relationship tools reach is to a
|
|
5784
|
-
* customer scope (`{ role }`, or null), by id (#5083 RK2). A reviewed type `record_types` carries
|
|
5785
|
-
* because only a `batch` entry or `sql_query` reaches it has none.
|
|
5786
|
-
*/
|
|
5787
|
-
record_type_scopes: external_exports.record(external_exports.unknown()).optional()
|
|
5788
|
-
}).passthrough()
|
|
5789
|
-
});
|
|
5790
|
-
resolvedRecordTypeSchema = external_exports.object({ json_schema: external_exports.record(external_exports.unknown()) });
|
|
5791
|
-
reviewWritersSchema = external_exports.object({ writers: external_exports.array(external_exports.string()).optional() });
|
|
5792
|
-
sharedScopeSchema = external_exports.object({ role: external_exports.literal("shared") });
|
|
5793
|
-
resolvedFileToolSchema = external_exports.object({
|
|
5794
|
-
file_type: external_exports.string().min(1),
|
|
5795
|
-
path_prefix: external_exports.string().nullish(),
|
|
5796
|
-
operations: external_exports.array(external_exports.unknown()),
|
|
5797
|
-
name: external_exports.unknown().optional(),
|
|
5798
|
-
names: external_exports.unknown().optional(),
|
|
5799
|
-
description_override: external_exports.unknown().optional()
|
|
5800
|
-
});
|
|
5801
|
-
rekorToolsetFileSchema = external_exports.object({
|
|
5802
|
-
path: external_exports.string().min(1),
|
|
5803
|
-
version: external_exports.number().int().min(1),
|
|
5804
|
-
content_type: external_exports.string().optional()
|
|
5805
|
-
}).passthrough();
|
|
5806
|
-
rekorToolsetFileUrlAnswerSchema = external_exports.object({
|
|
5807
|
-
data: external_exports.object({
|
|
5808
|
-
url: external_exports.string(),
|
|
5809
|
-
expires_at: external_exports.string(),
|
|
5810
|
-
path: external_exports.string(),
|
|
5811
|
-
content_sha256: external_exports.string()
|
|
5812
|
-
}).passthrough()
|
|
5813
|
-
});
|
|
5814
|
-
rekorToolsetFileListSchema = external_exports.object({ data: external_exports.array(rekorToolsetFileSchema) });
|
|
5815
|
-
rekorToolsetFileGetSchema = external_exports.object({
|
|
5816
|
-
data: rekorToolsetFileSchema.extend({
|
|
5817
|
-
content: external_exports.string(),
|
|
5818
|
-
encoding: external_exports.enum(["utf-8", "base64"])
|
|
5819
|
-
})
|
|
5820
|
-
});
|
|
5821
|
-
rekorToolsetFilePutSchema = external_exports.object({ data: rekorToolsetFileSchema });
|
|
5822
|
-
TOOLSET_CUSTOMER_FACING_REFUSAL_MARK = "A customer-facing agent (a pilot, pilot specialist or pilot advisor) can use a toolset only when it exposes files alone: no record, composite or relationship tools, and neither sql_query nor batch";
|
|
5823
|
-
TOOLSET_CUSTOMER_FACING_REFUSAL = `${TOOLSET_CUSTOMER_FACING_REFUSAL_MARK}, nor a file put, delete or put_url, nor a write of a reviewed record type \u2014 unless the toolset is customer-scoped, which admits its record, composite, relationship and SQL Action tools, since each of their calls reaches only the conversation's customer and shared records, or they only read approved records of reviewed shared record types`;
|
|
5824
|
-
}
|
|
5825
|
-
});
|
|
5826
|
-
|
|
5827
|
-
// ../../packages/core/dist/chunk-IPDOHAZ5.js
|
|
5828
|
-
var reportSourceSchema, intakeReportSourceSchema, reportClassificationSchema, reportStatusSchema, reportLocaleSchema, reportMessageAuthorRoleSchema, reportMessageSchema, sentryRefStatusSchema, createReportBody, editReportBody, reporterReportSummarySchema, reporterListResponseSchema, getReportResponseSchema, reporterTransitionResponseSchema, contestReportBody, reporterListQuery, listReportsQuery, GITHUB_ISSUE_URL_REGEX, githubIssueUrlSchema, transitionReportBody, groupReportsBody, holdReportBody;
|
|
5829
|
-
var init_chunk_IPDOHAZ5 = __esm({
|
|
5830
|
-
"../../packages/core/dist/chunk-IPDOHAZ5.js"() {
|
|
5831
|
-
"use strict";
|
|
5832
|
-
init_chunk_HZ6CADSY();
|
|
5833
|
-
init_zod();
|
|
5834
|
-
reportSourceSchema = external_exports.enum(["sentry", "cli", "review", "security_audit"]);
|
|
5835
|
-
intakeReportSourceSchema = external_exports.enum(["cli", "review", "security_audit"]);
|
|
5836
|
-
reportClassificationSchema = external_exports.enum(["bug", "flaky_test", "security", "enhancement"]);
|
|
5837
|
-
reportStatusSchema = external_exports.enum([
|
|
5838
|
-
"pending",
|
|
5839
|
-
"grouped",
|
|
5840
|
-
"escalated",
|
|
5841
|
-
"shipped",
|
|
5842
|
-
"contested",
|
|
5843
|
-
"addressed",
|
|
5844
|
-
"dismissed"
|
|
5845
|
-
]);
|
|
5846
|
-
reportLocaleSchema = external_exports.enum(["en", "pt", "es"]);
|
|
5847
|
-
reportMessageAuthorRoleSchema = external_exports.enum(["reporter", "triage", "fixer", "system"]);
|
|
5848
|
-
reportMessageSchema = external_exports.object({
|
|
5849
|
-
message_id: external_exports.string(),
|
|
5850
|
-
author_role: reportMessageAuthorRoleSchema,
|
|
5851
|
-
/** The status transition this note accompanied (e.g. 'shipped'); null for a free/system note. */
|
|
5852
|
-
transition: external_exports.string().nullable(),
|
|
5853
|
-
body: external_exports.string(),
|
|
5854
|
-
created_at: timestampSchema,
|
|
5855
|
-
/**
|
|
5856
|
-
* Visibility: `false` = reporter-facing (the default for every narrative entry); `true` =
|
|
5857
|
-
* triage-internal (e.g. a `hold` rationale) — surfaced to platform admins only and NEVER
|
|
5858
|
-
* returned on the reporter read path. The reporter's `GET /api/reports/:id` filters these out.
|
|
5859
|
-
*/
|
|
5860
|
-
internal: external_exports.boolean()
|
|
5861
|
-
});
|
|
5862
|
-
sentryRefStatusSchema = external_exports.enum(["valid", "not_found", "mismatch", "unverified"]);
|
|
5863
|
-
createReportBody = external_exports.object({
|
|
5864
|
-
title: external_exports.string().min(5).max(256),
|
|
5865
|
-
description: external_exports.string().min(10).max(5e3),
|
|
5866
|
-
steps_to_reproduce: external_exports.string().max(3e3).optional(),
|
|
5867
|
-
error_message: external_exports.string().max(2e3).optional(),
|
|
5868
|
-
// Taxonomy (server defaults: source=cli, classification=bug when absent).
|
|
5869
|
-
source: intakeReportSourceSchema.optional(),
|
|
5870
|
-
classification: reportClassificationSchema.optional(),
|
|
5871
|
-
// Stable dedup key (e.g. "<file>::<test>" for flaky, "<file>:<line>" for
|
|
5872
|
-
// security). When present, the fingerprint uses it instead of the body hash.
|
|
5873
|
-
dedup_key: external_exports.string().min(1).max(256).optional(),
|
|
5874
|
-
// Context fields (auto-captured by the CLI)
|
|
5875
|
-
organization_id: external_exports.string().optional(),
|
|
5876
|
-
hub_id: external_exports.string().uuid().optional(),
|
|
5877
|
-
hub_name: external_exports.string().max(256).optional(),
|
|
5878
|
-
conversation_id: external_exports.string().uuid().optional(),
|
|
5879
|
-
agent_id: external_exports.string().uuid().optional(),
|
|
5880
|
-
agent_name: external_exports.string().max(256).optional(),
|
|
5881
|
-
client_version: external_exports.string().max(64).optional(),
|
|
5882
|
-
additional_context: external_exports.string().max(2e3).optional()
|
|
5883
|
-
});
|
|
5884
|
-
editReportBody = external_exports.object({
|
|
5885
|
-
title: external_exports.string().min(5).max(256).optional(),
|
|
5886
|
-
description: external_exports.string().min(10).max(5e3).optional(),
|
|
5887
|
-
steps_to_reproduce: external_exports.string().max(3e3).optional(),
|
|
5888
|
-
error_message: external_exports.string().max(2e3).optional(),
|
|
5889
|
-
additional_context: external_exports.string().max(2e3).optional()
|
|
5890
|
-
}).strict().refine((b) => Object.keys(b).length > 0, {
|
|
5891
|
-
message: "at least one field must be provided"
|
|
5892
|
-
});
|
|
5893
|
-
reporterReportSummarySchema = external_exports.object({
|
|
5894
|
-
report_id: external_exports.string(),
|
|
5895
|
-
title: external_exports.string(),
|
|
5896
|
-
description: external_exports.string(),
|
|
5897
|
-
classification: reportClassificationSchema,
|
|
5898
|
-
status: reportStatusSchema,
|
|
5899
|
-
created_at: timestampSchema,
|
|
5900
|
-
triaged_at: timestampSchema.nullable(),
|
|
5901
|
-
resolved_at: timestampSchema.nullable(),
|
|
5902
|
-
/** How many times the reporter has contested (gates the hard cap). */
|
|
5903
|
-
contest_count: external_exports.number(),
|
|
5904
|
-
/** True once triage issued a non-contestable (final) dismissal. */
|
|
5905
|
-
dismissal_final: external_exports.boolean()
|
|
5906
|
-
});
|
|
5907
|
-
reporterListResponseSchema = external_exports.object({
|
|
5908
|
-
data: external_exports.array(reporterReportSummarySchema)
|
|
5909
|
-
});
|
|
5910
|
-
getReportResponseSchema = external_exports.object({
|
|
5911
|
-
report: reporterReportSummarySchema,
|
|
5912
|
-
messages: external_exports.array(reportMessageSchema)
|
|
5913
|
-
});
|
|
5914
|
-
reporterTransitionResponseSchema = external_exports.object({
|
|
5915
|
-
report: reporterReportSummarySchema
|
|
5916
|
-
});
|
|
5917
|
-
contestReportBody = external_exports.object({
|
|
5918
|
-
reason: external_exports.string().min(1).max(5e3)
|
|
5919
|
-
});
|
|
5920
|
-
reporterListQuery = external_exports.object({
|
|
5921
|
-
status: reportStatusSchema.optional()
|
|
5922
|
-
});
|
|
5923
|
-
listReportsQuery = external_exports.object({
|
|
5924
|
-
status: reportStatusSchema.optional(),
|
|
5925
|
-
source: reportSourceSchema.optional(),
|
|
5926
|
-
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
5927
|
-
offset: external_exports.coerce.number().int().min(0).optional(),
|
|
5928
|
-
/** ISO 8601 lower bound on created_at. */
|
|
5929
|
-
since: external_exports.string().datetime().optional(),
|
|
5930
|
-
/**
|
|
5931
|
-
* ISO 8601 lower bound on resolution time — "what did we resolve recently", which `since`
|
|
5932
|
-
* (a created_at filter) cannot answer for a long-lived report resolved yesterday. Implies
|
|
5933
|
-
* a terminal status (`addressed`/`dismissed`) and orders on that same axis.
|
|
5934
|
-
*/
|
|
5935
|
-
resolved_since: external_exports.string().datetime().optional()
|
|
5936
|
-
});
|
|
5937
|
-
GITHUB_ISSUE_URL_REGEX = /^https:\/\/github\.com\/[^/]+\/[^/]+\/issues\/\d+(?:[/?#]|$)/;
|
|
5938
|
-
githubIssueUrlSchema = external_exports.string().url().refine((u) => GITHUB_ISSUE_URL_REGEX.test(u), {
|
|
5939
|
-
message: "must be an https://github.com/<owner>/<repo>/issues/<number> URL"
|
|
5940
|
-
});
|
|
5941
|
-
transitionReportBody = external_exports.discriminatedUnion("target", [
|
|
5942
|
-
external_exports.object({
|
|
5943
|
-
target: external_exports.literal("escalated"),
|
|
5944
|
-
gh_issue_url: githubIssueUrlSchema,
|
|
5945
|
-
ai_verdict: external_exports.string().max(2e3).optional()
|
|
5946
|
-
}),
|
|
5947
|
-
external_exports.object({
|
|
5948
|
-
target: external_exports.literal("shipped"),
|
|
5949
|
-
note: external_exports.string().min(1).max(2e3).optional()
|
|
5950
|
-
}),
|
|
5951
|
-
external_exports.object({
|
|
5952
|
-
target: external_exports.literal("addressed")
|
|
5953
|
-
}),
|
|
5954
|
-
external_exports.object({
|
|
5955
|
-
target: external_exports.literal("dismissed"),
|
|
5956
|
-
dismissal_reason: external_exports.string().min(1).max(5e3),
|
|
5957
|
-
ai_verdict: external_exports.string().max(2e3).optional(),
|
|
5958
|
-
final: external_exports.boolean().optional()
|
|
5959
|
-
})
|
|
5960
|
-
]);
|
|
5961
|
-
groupReportsBody = external_exports.object({
|
|
5962
|
-
member_ids: external_exports.array(external_exports.string().uuid()).min(1).max(100)
|
|
5963
|
-
});
|
|
5964
|
-
holdReportBody = external_exports.object({
|
|
5965
|
-
reason: external_exports.string().min(1).max(5e3)
|
|
5966
|
-
});
|
|
5967
|
-
}
|
|
5968
|
-
});
|
|
5969
|
-
|
|
5970
5542
|
// ../../packages/core/dist/chunk-GPM7PE44.js
|
|
5971
5543
|
var bootstrapQuery;
|
|
5972
5544
|
var init_chunk_GPM7PE44 = __esm({
|
|
@@ -6011,14 +5583,14 @@ var init_chunk_5VL6LBFD = __esm({
|
|
|
6011
5583
|
});
|
|
6012
5584
|
|
|
6013
5585
|
// ../../packages/core/dist/chunk-VEERWOZ6.js
|
|
6014
|
-
var
|
|
5586
|
+
var MAX_NAME_LENGTH, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam;
|
|
6015
5587
|
var init_chunk_VEERWOZ6 = __esm({
|
|
6016
5588
|
"../../packages/core/dist/chunk-VEERWOZ6.js"() {
|
|
6017
5589
|
"use strict";
|
|
6018
5590
|
init_chunk_5VL6LBFD();
|
|
6019
5591
|
init_chunk_HZ6CADSY();
|
|
6020
5592
|
init_zod();
|
|
6021
|
-
|
|
5593
|
+
MAX_NAME_LENGTH = 100;
|
|
6022
5594
|
MAX_HUBS_PER_GRANT = 50;
|
|
6023
5595
|
MAX_HUB_TAGS_PER_GRANT = 20;
|
|
6024
5596
|
MAX_GRANTS = 20;
|
|
@@ -6040,7 +5612,7 @@ var init_chunk_VEERWOZ6 = __esm({
|
|
|
6040
5612
|
permissions: external_exports.array(permissionEnum).min(1, "Each grant must have permissions as a non-empty array")
|
|
6041
5613
|
}).strict();
|
|
6042
5614
|
createTokenBody = external_exports.object({
|
|
6043
|
-
name: external_exports.string().trim().min(1, "name is required").max(
|
|
5615
|
+
name: external_exports.string().trim().min(1, "name is required").max(MAX_NAME_LENGTH, `name must be ${MAX_NAME_LENGTH} characters or fewer`),
|
|
6044
5616
|
grants: external_exports.array(grantSchema).min(1, "grants must be a non-empty array").max(MAX_GRANTS),
|
|
6045
5617
|
expires_at: external_exports.string().datetime({ message: "expires_at must be a valid ISO 8601 date" }).refine(
|
|
6046
5618
|
(s) => new Date(s).getTime() > Date.now(),
|
|
@@ -6121,41 +5693,35 @@ var init_chunk_ZC6YGHNX = __esm({
|
|
|
6121
5693
|
}
|
|
6122
5694
|
});
|
|
6123
5695
|
|
|
6124
|
-
// ../../packages/core/dist/chunk-
|
|
6125
|
-
var
|
|
6126
|
-
var
|
|
6127
|
-
"../../packages/core/dist/chunk-
|
|
5696
|
+
// ../../packages/core/dist/chunk-ACKF2MVU.js
|
|
5697
|
+
var MAX_NAME_LENGTH2, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody;
|
|
5698
|
+
var init_chunk_ACKF2MVU = __esm({
|
|
5699
|
+
"../../packages/core/dist/chunk-ACKF2MVU.js"() {
|
|
6128
5700
|
"use strict";
|
|
5701
|
+
init_chunk_HZ6CADSY();
|
|
6129
5702
|
init_zod();
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
}).refine((b) => Object.keys(b).length > 0, { message: "at least one field must be provided" });
|
|
6153
|
-
listNoticesQuery = external_exports.object({
|
|
6154
|
-
status: noticeStatusSchema.optional(),
|
|
6155
|
-
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
6156
|
-
offset: external_exports.coerce.number().int().min(0).optional()
|
|
6157
|
-
});
|
|
6158
|
-
noticeIdParamSchema = external_exports.object({ id: external_exports.string().min(1) });
|
|
5703
|
+
MAX_NAME_LENGTH2 = 100;
|
|
5704
|
+
MAX_VALUE_LENGTH = 32 * 1024;
|
|
5705
|
+
MAX_TAGS = 20;
|
|
5706
|
+
MAX_TAG_LENGTH = 50;
|
|
5707
|
+
MAX_SCOPE_HUBS = 100;
|
|
5708
|
+
MAX_SCOPE_TAGS = 50;
|
|
5709
|
+
vaultSecretScopeSchema = external_exports.object({
|
|
5710
|
+
hubs: external_exports.array(external_exports.string().min(1)).max(MAX_SCOPE_HUBS).optional(),
|
|
5711
|
+
tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH)).max(MAX_SCOPE_TAGS).optional()
|
|
5712
|
+
}).strict();
|
|
5713
|
+
vaultCreateBody = external_exports.object({
|
|
5714
|
+
name: external_exports.string().trim().min(1, "name is required").max(MAX_NAME_LENGTH2, `name must be ${MAX_NAME_LENGTH2} characters or fewer`),
|
|
5715
|
+
value: external_exports.string().min(1, "value is required").max(MAX_VALUE_LENGTH, `value must be ${MAX_VALUE_LENGTH} characters or fewer`),
|
|
5716
|
+
tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH, `Tag must be ${MAX_TAG_LENGTH} characters or fewer`)).max(MAX_TAGS, `Maximum ${MAX_TAGS} tags allowed`).optional().default([]),
|
|
5717
|
+
scope: vaultSecretScopeSchema.optional().default({})
|
|
5718
|
+
}).strict();
|
|
5719
|
+
vaultUpdateBody = external_exports.object({
|
|
5720
|
+
name: external_exports.string().trim().min(1).max(MAX_NAME_LENGTH2).optional(),
|
|
5721
|
+
value: external_exports.string().min(1).max(MAX_VALUE_LENGTH).optional(),
|
|
5722
|
+
tags: external_exports.array(external_exports.string().min(1).max(MAX_TAG_LENGTH)).max(MAX_TAGS).optional(),
|
|
5723
|
+
scope: vaultSecretScopeSchema.optional()
|
|
5724
|
+
}).strict();
|
|
6159
5725
|
}
|
|
6160
5726
|
});
|
|
6161
5727
|
|
|
@@ -6857,75 +6423,518 @@ var init_chunk_TUHJ5PQH = __esm({
|
|
|
6857
6423
|
init_zod();
|
|
6858
6424
|
rekorFileSnapshotAnswerSchema = external_exports.object({
|
|
6859
6425
|
data: external_exports.object({
|
|
6860
|
-
next_cursor: external_exports.string().nullable(),
|
|
6861
|
-
/** Files the page created or replaced on the preview. */
|
|
6862
|
-
written: external_exports.number().int(),
|
|
6863
|
-
/** The preview's own files, ones production does not hold, the page removed. */
|
|
6864
|
-
removed: external_exports.number().int(),
|
|
6865
|
-
/** Files the page found already equal to production's. */
|
|
6866
|
-
unchanged: external_exports.number().int()
|
|
6426
|
+
next_cursor: external_exports.string().nullable(),
|
|
6427
|
+
/** Files the page created or replaced on the preview. */
|
|
6428
|
+
written: external_exports.number().int(),
|
|
6429
|
+
/** The preview's own files, ones production does not hold, the page removed. */
|
|
6430
|
+
removed: external_exports.number().int(),
|
|
6431
|
+
/** Files the page found already equal to production's. */
|
|
6432
|
+
unchanged: external_exports.number().int()
|
|
6433
|
+
})
|
|
6434
|
+
});
|
|
6435
|
+
FILE_SNAPSHOT_MAX_PAGES = 1e4;
|
|
6436
|
+
FILE_SNAPSHOT_CONFLICT_ATTEMPTS = 3;
|
|
6437
|
+
FILE_SNAPSHOT_PAGE_SPACING_MS = Math.ceil(
|
|
6438
|
+
6e4 / Math.max(1, Math.floor((getEndpointConfig(`${DATA_PROXY_PREFIX}/files/snapshot`)?.userLimit ?? 60) * 4 / 5))
|
|
6439
|
+
);
|
|
6440
|
+
FILE_SNAPSHOT_CONFLICT_STATUS = 409;
|
|
6441
|
+
}
|
|
6442
|
+
});
|
|
6443
|
+
|
|
6444
|
+
// ../../packages/core/dist/chunk-3LY5HJUX.js
|
|
6445
|
+
var REKOR_ACTOR_TYPE_HEADER, REKOR_ACTOR_ID_HEADER, REKOR_ACTOR_LABEL_HEADER, REKOR_ACTOR_ORG_HEADER, REKOR_ACTOR_ADMIN_HEADER, REKOR_CLIENT_HEADER, REKOR_TOOL_ID_HEADER, REKOR_CLIENTS, rekorClientSchema, MAX_REKOR_TOOL_ID_LENGTH, rekorToolIdSchema, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, REKOR_BOUND_BASE_HEADER, REKOR_BOUND_TOOLSET_HEADER, REKOR_BOUND_TOKEN_HEADER, REKOR_BOUND_CUSTOMER_HEADER, REKOR_BOUND_ACCESS_HEADER, DATA_BASE_GENERATION_HEADER, REKOR_MAX_ACTOR_ID_LENGTH, REKOR_MAX_ACTOR_LABEL_LENGTH, REKOR_MAX_ACCESS_DIMENSIONS, REKOR_MAX_ACCESS_VALUES, REKOR_MAX_ACCESS_ID_LENGTH, REKOR_MAX_ACCESS_HEADER_LENGTH;
|
|
6446
|
+
var init_chunk_3LY5HJUX = __esm({
|
|
6447
|
+
"../../packages/core/dist/chunk-3LY5HJUX.js"() {
|
|
6448
|
+
"use strict";
|
|
6449
|
+
init_zod();
|
|
6450
|
+
REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
|
|
6451
|
+
REKOR_ACTOR_ID_HEADER = "X-Rekor-Actor-Id";
|
|
6452
|
+
REKOR_ACTOR_LABEL_HEADER = "X-Rekor-Actor-Label";
|
|
6453
|
+
REKOR_ACTOR_ORG_HEADER = "X-Rekor-Actor-Org";
|
|
6454
|
+
REKOR_ACTOR_ADMIN_HEADER = "X-Rekor-Actor-Admin";
|
|
6455
|
+
REKOR_CLIENT_HEADER = "X-Rekor-Client";
|
|
6456
|
+
REKOR_TOOL_ID_HEADER = "X-Rekor-Tool-Id";
|
|
6457
|
+
REKOR_CLIENTS = ["api", "cli", "mcp"];
|
|
6458
|
+
rekorClientSchema = external_exports.enum(REKOR_CLIENTS);
|
|
6459
|
+
MAX_REKOR_TOOL_ID_LENGTH = 128;
|
|
6460
|
+
rekorToolIdSchema = external_exports.string().trim().min(1).max(MAX_REKOR_TOOL_ID_LENGTH);
|
|
6461
|
+
REKOR_V1_PREFIX = "/v1";
|
|
6462
|
+
DATA_PROXY_ORG_QUERY_PARAM = "org_id";
|
|
6463
|
+
MAX_PROVISIONING_BODY_BYTES = 256 * 1024;
|
|
6464
|
+
dataProxyQuery = external_exports.object({
|
|
6465
|
+
[DATA_PROXY_ORG_QUERY_PARAM]: external_exports.string().uuid().optional()
|
|
6466
|
+
});
|
|
6467
|
+
rekorAttestation = external_exports.object({
|
|
6468
|
+
[REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["user", "token"]),
|
|
6469
|
+
[REKOR_ACTOR_ID_HEADER]: external_exports.string().min(1),
|
|
6470
|
+
[REKOR_ACTOR_LABEL_HEADER]: external_exports.string(),
|
|
6471
|
+
[REKOR_ACTOR_ORG_HEADER]: external_exports.string().uuid(),
|
|
6472
|
+
[REKOR_ACTOR_ADMIN_HEADER]: external_exports.enum(["0", "1"]),
|
|
6473
|
+
[REKOR_CLIENT_HEADER]: rekorClientSchema,
|
|
6474
|
+
[REKOR_TOOL_ID_HEADER]: rekorToolIdSchema.optional()
|
|
6475
|
+
});
|
|
6476
|
+
REQUIRED_REKOR_ATTESTATION_HEADERS = Object.entries(rekorAttestation.shape).filter(([, field]) => !field.isOptional()).map(([header]) => header);
|
|
6477
|
+
REKOR_BOUND_BASE_HEADER = "X-Rekor-Bound-Base";
|
|
6478
|
+
REKOR_BOUND_TOOLSET_HEADER = "X-Rekor-Bound-Toolset";
|
|
6479
|
+
REKOR_BOUND_TOKEN_HEADER = "X-Rekor-Bound-Token";
|
|
6480
|
+
REKOR_BOUND_CUSTOMER_HEADER = "X-Rekor-Bound-Customer";
|
|
6481
|
+
REKOR_BOUND_ACCESS_HEADER = "X-Rekor-Bound-Access";
|
|
6482
|
+
DATA_BASE_GENERATION_HEADER = "X-Data-Base-Generation";
|
|
6483
|
+
REKOR_MAX_ACTOR_ID_LENGTH = 256;
|
|
6484
|
+
REKOR_MAX_ACTOR_LABEL_LENGTH = 256;
|
|
6485
|
+
REKOR_MAX_ACCESS_DIMENSIONS = 8;
|
|
6486
|
+
REKOR_MAX_ACCESS_VALUES = 100;
|
|
6487
|
+
REKOR_MAX_ACCESS_ID_LENGTH = 32;
|
|
6488
|
+
REKOR_MAX_ACCESS_HEADER_LENGTH = 65536;
|
|
6489
|
+
}
|
|
6490
|
+
});
|
|
6491
|
+
|
|
6492
|
+
// ../../packages/core/dist/chunk-BCDGY3GH.js
|
|
6493
|
+
function writeWithinRead(assignment) {
|
|
6494
|
+
return Object.values(assignment).every(({ read, write }) => read.includes(ACCESS_UNRESTRICTED) || !write.includes(ACCESS_UNRESTRICTED) && write.every((id) => read.includes(id)));
|
|
6495
|
+
}
|
|
6496
|
+
function isEncodedAccessSet(raw) {
|
|
6497
|
+
let parsed;
|
|
6498
|
+
try {
|
|
6499
|
+
parsed = JSON.parse(raw);
|
|
6500
|
+
} catch {
|
|
6501
|
+
return false;
|
|
6502
|
+
}
|
|
6503
|
+
return accessSetSchema.safeParse(parsed).success;
|
|
6504
|
+
}
|
|
6505
|
+
function assignmentHasUnrestricted(assignment) {
|
|
6506
|
+
return Object.values(assignment).some((lists) => lists.read.includes(ACCESS_UNRESTRICTED) || lists.write.includes(ACCESS_UNRESTRICTED));
|
|
6507
|
+
}
|
|
6508
|
+
var ACCESS_UNRESTRICTED, ACCESS_ID_REGEX, ACCESS_ID_MAX_LENGTH, MAX_ACCESS_DIMENSIONS_PER_ORG, MAX_ACCESS_VALUES_PER_DIMENSION, ACCESS_LABEL_MAX_LENGTH, accessIdSchema, accessLabelSchema, accessValueListSchema, accessAssignmentSchema, accessSetSchema, accessDimensionParam, accessValueParam, orgMemberParam, orgHubParam, createAccessDimensionBody, updateAccessDimensionBody, createAccessValueBody, updateAccessValueBody, setMemberAccessValuesBody, setHubUserAccessValuesBody, setAgentAccessValuesBody;
|
|
6509
|
+
var init_chunk_BCDGY3GH = __esm({
|
|
6510
|
+
"../../packages/core/dist/chunk-BCDGY3GH.js"() {
|
|
6511
|
+
"use strict";
|
|
6512
|
+
init_chunk_3LY5HJUX();
|
|
6513
|
+
init_chunk_HZ6CADSY();
|
|
6514
|
+
init_zod();
|
|
6515
|
+
ACCESS_UNRESTRICTED = "*";
|
|
6516
|
+
ACCESS_ID_REGEX = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
6517
|
+
ACCESS_ID_MAX_LENGTH = REKOR_MAX_ACCESS_ID_LENGTH;
|
|
6518
|
+
MAX_ACCESS_DIMENSIONS_PER_ORG = REKOR_MAX_ACCESS_DIMENSIONS;
|
|
6519
|
+
MAX_ACCESS_VALUES_PER_DIMENSION = REKOR_MAX_ACCESS_VALUES;
|
|
6520
|
+
ACCESS_LABEL_MAX_LENGTH = 100;
|
|
6521
|
+
accessIdSchema = external_exports.string().min(1).max(ACCESS_ID_MAX_LENGTH).regex(ACCESS_ID_REGEX, { message: 'Must be ASCII letters, digits, "_" or "-", starting with a letter or digit (e.g. "class", "7A")' });
|
|
6522
|
+
accessLabelSchema = external_exports.string().trim().min(1).max(ACCESS_LABEL_MAX_LENGTH);
|
|
6523
|
+
accessValueListSchema = external_exports.array(external_exports.union([accessIdSchema, external_exports.literal(ACCESS_UNRESTRICTED)])).max(MAX_ACCESS_VALUES_PER_DIMENSION).refine((list) => !list.includes(ACCESS_UNRESTRICTED) || list.length === 1, {
|
|
6524
|
+
message: `"${ACCESS_UNRESTRICTED}" reaches the dimension unrestricted, so it stands alone in its list`
|
|
6525
|
+
});
|
|
6526
|
+
accessAssignmentSchema = external_exports.record(
|
|
6527
|
+
accessIdSchema,
|
|
6528
|
+
external_exports.object({ read: accessValueListSchema, write: accessValueListSchema }).strict()
|
|
6529
|
+
).refine((assignment) => Object.keys(assignment).length <= MAX_ACCESS_DIMENSIONS_PER_ORG, {
|
|
6530
|
+
message: `An assignment names at most ${MAX_ACCESS_DIMENSIONS_PER_ORG} dimensions`
|
|
6531
|
+
});
|
|
6532
|
+
accessSetSchema = accessAssignmentSchema.refine(writeWithinRead, {
|
|
6533
|
+
message: "An access set writes only what it reads"
|
|
6534
|
+
});
|
|
6535
|
+
accessDimensionParam = external_exports.object({
|
|
6536
|
+
id: uuidSchema,
|
|
6537
|
+
dimensionId: accessIdSchema
|
|
6538
|
+
});
|
|
6539
|
+
accessValueParam = accessDimensionParam.extend({
|
|
6540
|
+
valueId: accessIdSchema
|
|
6541
|
+
});
|
|
6542
|
+
orgMemberParam = external_exports.object({
|
|
6543
|
+
id: uuidSchema,
|
|
6544
|
+
userId: external_exports.string().min(1).max(256)
|
|
6545
|
+
});
|
|
6546
|
+
orgHubParam = external_exports.object({
|
|
6547
|
+
id: uuidSchema,
|
|
6548
|
+
hubId: uuidSchema
|
|
6549
|
+
});
|
|
6550
|
+
createAccessDimensionBody = external_exports.object({
|
|
6551
|
+
dimension_id: accessIdSchema,
|
|
6552
|
+
label: accessLabelSchema
|
|
6553
|
+
});
|
|
6554
|
+
updateAccessDimensionBody = external_exports.object({
|
|
6555
|
+
label: accessLabelSchema
|
|
6556
|
+
});
|
|
6557
|
+
createAccessValueBody = external_exports.object({
|
|
6558
|
+
value_id: accessIdSchema,
|
|
6559
|
+
label: accessLabelSchema
|
|
6560
|
+
});
|
|
6561
|
+
updateAccessValueBody = external_exports.object({
|
|
6562
|
+
label: accessLabelSchema.optional(),
|
|
6563
|
+
retired: external_exports.boolean().optional()
|
|
6564
|
+
}).refine((body) => body.label !== void 0 || body.retired !== void 0, {
|
|
6565
|
+
message: "Nothing to change: pass label, retired, or both"
|
|
6566
|
+
});
|
|
6567
|
+
setMemberAccessValuesBody = external_exports.object({
|
|
6568
|
+
values: accessAssignmentSchema
|
|
6569
|
+
});
|
|
6570
|
+
setHubUserAccessValuesBody = external_exports.object({
|
|
6571
|
+
values: accessAssignmentSchema.refine((assignment) => !assignmentHasUnrestricted(assignment), {
|
|
6572
|
+
message: `A hub user's values never hold "${ACCESS_UNRESTRICTED}"`
|
|
6573
|
+
})
|
|
6574
|
+
});
|
|
6575
|
+
setAgentAccessValuesBody = external_exports.object({
|
|
6576
|
+
values: accessAssignmentSchema.nullable()
|
|
6577
|
+
});
|
|
6578
|
+
}
|
|
6579
|
+
});
|
|
6580
|
+
|
|
6581
|
+
// ../../packages/core/dist/chunk-QZTGWNFB.js
|
|
6582
|
+
var TOOLSET_SLUG_PATTERN, REKOR_STRUCTURAL_ID_PATTERN, baseEnvironmentSchema, toolsetFileToolSchema, toolsetSurfaceSchema, toolsetConnectionBindingSchema, rekorToolsetToolsSchema, rekorBoundAttestation, rekorResolvedToolsetSchema, resolvedRecordTypeSchema, reviewWritersSchema, sharedScopeSchema, resolvedFileToolSchema, rekorToolsetFileSchema, rekorToolsetFileUrlAnswerSchema, rekorToolsetFileListSchema, rekorToolsetFileGetSchema, rekorToolsetFilePutSchema, TOOLSET_CUSTOMER_FACING_REFUSAL_MARK, TOOLSET_CUSTOMER_FACING_REFUSAL;
|
|
6583
|
+
var init_chunk_QZTGWNFB = __esm({
|
|
6584
|
+
"../../packages/core/dist/chunk-QZTGWNFB.js"() {
|
|
6585
|
+
"use strict";
|
|
6586
|
+
init_chunk_BCDGY3GH();
|
|
6587
|
+
init_chunk_3LY5HJUX();
|
|
6588
|
+
init_chunk_WNLWNFHH();
|
|
6589
|
+
init_zod();
|
|
6590
|
+
TOOLSET_SLUG_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
|
|
6591
|
+
REKOR_STRUCTURAL_ID_PATTERN = TOOLSET_SLUG_PATTERN;
|
|
6592
|
+
baseEnvironmentSchema = external_exports.enum(["preview", "production"]);
|
|
6593
|
+
toolsetFileToolSchema = external_exports.object({
|
|
6594
|
+
file_type: external_exports.string().min(1),
|
|
6595
|
+
path_prefix: external_exports.string(),
|
|
6596
|
+
/** The entry's authored description of its tools (`description_override`), when it has one. */
|
|
6597
|
+
description: external_exports.string().min(1).optional(),
|
|
6598
|
+
tools: external_exports.object({
|
|
6599
|
+
list: external_exports.string().min(1).optional(),
|
|
6600
|
+
get: external_exports.string().min(1).optional(),
|
|
6601
|
+
put: external_exports.string().min(1).optional(),
|
|
6602
|
+
delete: external_exports.string().min(1).optional(),
|
|
6603
|
+
get_url: external_exports.string().min(1).optional(),
|
|
6604
|
+
put_url: external_exports.string().min(1).optional()
|
|
6605
|
+
})
|
|
6606
|
+
});
|
|
6607
|
+
toolsetSurfaceSchema = external_exports.object({
|
|
6608
|
+
/** Any record, composite, relationship or SQL Action tool: the toolset reaches records. */
|
|
6609
|
+
records: external_exports.boolean(),
|
|
6610
|
+
sql_query: external_exports.boolean(),
|
|
6611
|
+
batch: external_exports.boolean(),
|
|
6612
|
+
/**
|
|
6613
|
+
* The toolset serves one customer per call (#5083 RK2): its every call names the customer it serves,
|
|
6614
|
+
* and reaches only that customer's records and shared ones. Absent on a surface recorded before it
|
|
6615
|
+
* was, which reads as not scoped until the connection's next tool sync or token save records it: its
|
|
6616
|
+
* calls name no customer, and the customer-facing rule admits none of its record tools.
|
|
6617
|
+
*/
|
|
6618
|
+
customer_scoped: external_exports.boolean().optional(),
|
|
6619
|
+
/**
|
|
6620
|
+
* A key of the resolve this side neither describes nor classifies exposes something: a kind of tool
|
|
6621
|
+
* the data product added later, counted in `records`. The customer-facing rule never admits it, a
|
|
6622
|
+
* customer scope included, until it is classified here. Absent on a surface recorded before it was,
|
|
6623
|
+
* which reads as present.
|
|
6624
|
+
*/
|
|
6625
|
+
unclassified_tools: external_exports.boolean().optional(),
|
|
6626
|
+
/**
|
|
6627
|
+
* Any of its file tools writes: an operation other than `list`, `get` and `get_url` (`put`, `delete`,
|
|
6628
|
+
* `put_url`, or one the data product adds later), or an entry this side cannot read. Absent on a surface recorded
|
|
6629
|
+
* before it was, which the customer-facing rule reads as writing until the connection's next tool
|
|
6630
|
+
* sync or token save records it.
|
|
6631
|
+
*/
|
|
6632
|
+
file_writes: external_exports.boolean().optional(),
|
|
6633
|
+
/**
|
|
6634
|
+
* A record type the resolve's `record_types` carries names the toolset among its writers
|
|
6635
|
+
* (`x-review.writers`, #5083 RK4): the toolset writes the type's drafts and reads its every record,
|
|
6636
|
+
* drafts included. Those are the types its actions and composite record steps reach, and every
|
|
6637
|
+
* reviewed type it reaches otherwise: at a relationship tool's or a composite relationship step's
|
|
6638
|
+
* end, in a `batch` entry, or, through `sql_query`, all of them (decision 198). Or such a type's
|
|
6639
|
+
* declaration this side cannot read, or a resolve reaching records that carries no record types.
|
|
6640
|
+
* Absent on a surface recorded before it was, which the customer-facing rule reads as writing, for a
|
|
6641
|
+
* toolset reaching records, until the connection's next tool sync or token save records it.
|
|
6642
|
+
*/
|
|
6643
|
+
review_writes: external_exports.boolean().optional(),
|
|
6644
|
+
/**
|
|
6645
|
+
* Every record type the toolset reaches, at least one, is reviewed (`x-review`), holds no customer data
|
|
6646
|
+
* (`shared`), and does not name it among its writers: each call reads only that type's approved
|
|
6647
|
+
* records (#5083 decision 182, Q9). Never with a SQL Action, whose query reads its types' every
|
|
6648
|
+
* record, drafts included. Absent on a surface recorded before it was, which reads as false.
|
|
6649
|
+
*/
|
|
6650
|
+
approved_reads_only: external_exports.boolean().optional(),
|
|
6651
|
+
/**
|
|
6652
|
+
* The toolset's file tools. Absent when it has none, and on a surface recorded before they were.
|
|
6653
|
+
* A list this side cannot read is dropped rather than failing the binding, which every call and
|
|
6654
|
+
* the customer-facing rule read: the next tool sync records it again.
|
|
6655
|
+
*/
|
|
6656
|
+
files: external_exports.array(toolsetFileToolSchema).optional().catch(void 0)
|
|
6657
|
+
});
|
|
6658
|
+
toolsetConnectionBindingSchema = external_exports.object({
|
|
6659
|
+
base_id: external_exports.string().min(1),
|
|
6660
|
+
/** The slug the token was resolved against — `settings.toolset` at that write. */
|
|
6661
|
+
toolset: external_exports.string().min(1),
|
|
6662
|
+
/** The base's incarnation when the token was written; a bound attested call states it. */
|
|
6663
|
+
base_generation: external_exports.number().int().min(1),
|
|
6664
|
+
environment: baseEnvironmentSchema,
|
|
6665
|
+
surface: toolsetSurfaceSchema,
|
|
6666
|
+
/**
|
|
6667
|
+
* The id of the token the binding was resolved from, as its resolve reports it; a bound attested
|
|
6668
|
+
* call names it (`REKOR_BOUND_TOKEN_HEADER`), so the data product refuses the binding once the token
|
|
6669
|
+
* is revoked or expires (owner decision 41). Absent on a binding recorded before the report carried
|
|
6670
|
+
* it: its calls name none until a token save, or a tool sync while the token still stands, records it.
|
|
6671
|
+
* One that does not read is dropped rather than failing the binding.
|
|
6672
|
+
*/
|
|
6673
|
+
token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
|
|
6674
|
+
});
|
|
6675
|
+
rekorToolsetToolsSchema = external_exports.object({
|
|
6676
|
+
data: external_exports.object({
|
|
6677
|
+
tools: external_exports.array(external_exports.object({
|
|
6678
|
+
name: external_exports.string(),
|
|
6679
|
+
description: external_exports.string().optional(),
|
|
6680
|
+
inputSchema: external_exports.record(external_exports.unknown()).optional()
|
|
6681
|
+
}))
|
|
6682
|
+
})
|
|
6683
|
+
});
|
|
6684
|
+
rekorBoundAttestation = rekorAttestation.extend({
|
|
6685
|
+
[REKOR_ACTOR_TYPE_HEADER]: external_exports.literal("token"),
|
|
6686
|
+
/** Trimmed and checked as the far side trims and checks it. */
|
|
6687
|
+
[REKOR_ACTOR_ID_HEADER]: external_exports.string().trim().min(1).max(REKOR_MAX_ACTOR_ID_LENGTH),
|
|
6688
|
+
[REKOR_ACTOR_LABEL_HEADER]: external_exports.string().max(REKOR_MAX_ACTOR_LABEL_LENGTH),
|
|
6689
|
+
[REKOR_ACTOR_ADMIN_HEADER]: external_exports.literal("0"),
|
|
6690
|
+
[REKOR_BOUND_BASE_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
|
|
6691
|
+
[REKOR_BOUND_TOOLSET_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
|
|
6692
|
+
/**
|
|
6693
|
+
* Decimal digits only, as the far side parses it, and at most 15 of them: its `Number()` reads
|
|
6694
|
+
* every such value back exactly, where a longer one may round or overflow to `Infinity` (a 400).
|
|
6695
|
+
*/
|
|
6696
|
+
[DATA_BASE_GENERATION_HEADER]: external_exports.string().regex(/^[1-9]\d{0,14}$/),
|
|
6697
|
+
/** The token the binding was resolved from, when the connection records it (owner decision 41). */
|
|
6698
|
+
[REKOR_BOUND_TOKEN_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional(),
|
|
6699
|
+
/**
|
|
6700
|
+
* The customer the call serves (#5083 RK2): a contact id, which the contact book mints as a UUID.
|
|
6701
|
+
* Every UUID is an id the far side reads back as the customer's external id.
|
|
6702
|
+
*/
|
|
6703
|
+
[REKOR_BOUND_CUSTOMER_HEADER]: external_exports.string().uuid().optional(),
|
|
6704
|
+
/**
|
|
6705
|
+
* The access set the call carries (#5358): an access set's header text (`encodeAccessSet`), within
|
|
6706
|
+
* the far side's header cap. Tool calls carry one; the config reads (resolve, tool definitions) do not.
|
|
6707
|
+
*/
|
|
6708
|
+
[REKOR_BOUND_ACCESS_HEADER]: external_exports.string().max(REKOR_MAX_ACCESS_HEADER_LENGTH).refine(isEncodedAccessSet, {
|
|
6709
|
+
message: "Not an access set"
|
|
6710
|
+
}).optional()
|
|
6711
|
+
});
|
|
6712
|
+
rekorResolvedToolsetSchema = external_exports.object({
|
|
6713
|
+
data: external_exports.object({
|
|
6714
|
+
base_id: external_exports.string().min(1),
|
|
6715
|
+
environment: baseEnvironmentSchema,
|
|
6716
|
+
base_generation: external_exports.number().int().min(1),
|
|
6717
|
+
/**
|
|
6718
|
+
* The calling token's binding, or null for a token bound to none. A bound token can call only
|
|
6719
|
+
* its toolset's tools, which is what a toolset connection stores (#5083 decision 14). Its org
|
|
6720
|
+
* is the token's own: base ids are unique only per org, so the base id alone does not say
|
|
6721
|
+
* which base the token reaches.
|
|
6722
|
+
*/
|
|
6723
|
+
toolset_binding: external_exports.object({
|
|
6724
|
+
org_id: external_exports.string().optional(),
|
|
6725
|
+
base_id: external_exports.string(),
|
|
6726
|
+
toolset_id: external_exports.string(),
|
|
6727
|
+
/**
|
|
6728
|
+
* The token's own id, which a bound call names (`REKOR_BOUND_TOKEN_HEADER`); absent when the
|
|
6729
|
+
* caller has none (owner decision 41), and dropped when it is not an id the far side reads back.
|
|
6730
|
+
*/
|
|
6731
|
+
token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
|
|
6732
|
+
}).nullable().optional(),
|
|
6733
|
+
actions: external_exports.array(external_exports.unknown()).optional(),
|
|
6734
|
+
composites: external_exports.array(external_exports.unknown()).optional(),
|
|
6735
|
+
relationships: external_exports.array(external_exports.unknown()).optional(),
|
|
6736
|
+
/**
|
|
6737
|
+
* The toolset's SQL Actions (#5311): each a fixed, read-only query over the record types it
|
|
6738
|
+
* declares, which the resolve also carries in `record_types` and `record_type_scopes`.
|
|
6739
|
+
*/
|
|
6740
|
+
sql_actions: external_exports.array(external_exports.unknown()).optional(),
|
|
6741
|
+
files: external_exports.array(external_exports.unknown()).optional(),
|
|
6742
|
+
batch: external_exports.object({ enabled: external_exports.boolean().optional() }).passthrough().nullable().optional(),
|
|
6743
|
+
sql_query: external_exports.boolean().optional(),
|
|
6744
|
+
/** The toolset serves one customer per call (#5083 RK2). Absent reads as not scoped. */
|
|
6745
|
+
customer_scope: external_exports.boolean().optional(),
|
|
6746
|
+
/**
|
|
6747
|
+
* Record types the toolset reaches, by id, as the data product stores them (`json_schema`
|
|
6748
|
+
* included): each one its actions, composite record steps and SQL Actions reach, and each reviewed one it
|
|
6749
|
+
* reaches otherwise (relationship ends, `batch` entries, every one through `sql_query`; #5083
|
|
6750
|
+
* decision 198). An unreviewed type it reaches only otherwise is not here. A reviewed type's
|
|
6751
|
+
* `x-review` names its writers (RK4).
|
|
6752
|
+
*/
|
|
6753
|
+
record_types: external_exports.record(external_exports.unknown()).optional(),
|
|
6754
|
+
/**
|
|
6755
|
+
* What each record type the toolset's actions, composite steps, SQL Actions and relationship tools reach is to a
|
|
6756
|
+
* customer scope (`{ role }`, or null), by id (#5083 RK2). A reviewed type `record_types` carries
|
|
6757
|
+
* because only a `batch` entry or `sql_query` reaches it has none.
|
|
6758
|
+
*/
|
|
6759
|
+
record_type_scopes: external_exports.record(external_exports.unknown()).optional()
|
|
6760
|
+
}).passthrough()
|
|
6761
|
+
});
|
|
6762
|
+
resolvedRecordTypeSchema = external_exports.object({ json_schema: external_exports.record(external_exports.unknown()) });
|
|
6763
|
+
reviewWritersSchema = external_exports.object({ writers: external_exports.array(external_exports.string()).optional() });
|
|
6764
|
+
sharedScopeSchema = external_exports.object({ role: external_exports.literal("shared") });
|
|
6765
|
+
resolvedFileToolSchema = external_exports.object({
|
|
6766
|
+
file_type: external_exports.string().min(1),
|
|
6767
|
+
path_prefix: external_exports.string().nullish(),
|
|
6768
|
+
operations: external_exports.array(external_exports.unknown()),
|
|
6769
|
+
name: external_exports.unknown().optional(),
|
|
6770
|
+
names: external_exports.unknown().optional(),
|
|
6771
|
+
description_override: external_exports.unknown().optional()
|
|
6772
|
+
});
|
|
6773
|
+
rekorToolsetFileSchema = external_exports.object({
|
|
6774
|
+
path: external_exports.string().min(1),
|
|
6775
|
+
version: external_exports.number().int().min(1),
|
|
6776
|
+
content_type: external_exports.string().optional()
|
|
6777
|
+
}).passthrough();
|
|
6778
|
+
rekorToolsetFileUrlAnswerSchema = external_exports.object({
|
|
6779
|
+
data: external_exports.object({
|
|
6780
|
+
url: external_exports.string(),
|
|
6781
|
+
expires_at: external_exports.string(),
|
|
6782
|
+
path: external_exports.string(),
|
|
6783
|
+
content_sha256: external_exports.string()
|
|
6784
|
+
}).passthrough()
|
|
6785
|
+
});
|
|
6786
|
+
rekorToolsetFileListSchema = external_exports.object({ data: external_exports.array(rekorToolsetFileSchema) });
|
|
6787
|
+
rekorToolsetFileGetSchema = external_exports.object({
|
|
6788
|
+
data: rekorToolsetFileSchema.extend({
|
|
6789
|
+
content: external_exports.string(),
|
|
6790
|
+
encoding: external_exports.enum(["utf-8", "base64"])
|
|
6867
6791
|
})
|
|
6868
6792
|
});
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
6e4 / Math.max(1, Math.floor((getEndpointConfig(`${DATA_PROXY_PREFIX}/files/snapshot`)?.userLimit ?? 60) * 4 / 5))
|
|
6873
|
-
);
|
|
6874
|
-
FILE_SNAPSHOT_CONFLICT_STATUS = 409;
|
|
6793
|
+
rekorToolsetFilePutSchema = external_exports.object({ data: rekorToolsetFileSchema });
|
|
6794
|
+
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";
|
|
6795
|
+
TOOLSET_CUSTOMER_FACING_REFUSAL = `${TOOLSET_CUSTOMER_FACING_REFUSAL_MARK}, nor a file put, delete or put_url, nor a write of a reviewed record type \u2014 unless the toolset is customer-scoped, which admits its record, composite, relationship and SQL Action tools, since each of their calls reaches only the conversation's customer and shared records, or they only read approved records of reviewed shared record types`;
|
|
6875
6796
|
}
|
|
6876
6797
|
});
|
|
6877
6798
|
|
|
6878
|
-
// ../../packages/core/dist/chunk-
|
|
6879
|
-
var
|
|
6880
|
-
var
|
|
6881
|
-
"../../packages/core/dist/chunk-
|
|
6799
|
+
// ../../packages/core/dist/chunk-IPDOHAZ5.js
|
|
6800
|
+
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;
|
|
6801
|
+
var init_chunk_IPDOHAZ5 = __esm({
|
|
6802
|
+
"../../packages/core/dist/chunk-IPDOHAZ5.js"() {
|
|
6882
6803
|
"use strict";
|
|
6883
|
-
|
|
6804
|
+
init_chunk_HZ6CADSY();
|
|
6884
6805
|
init_zod();
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6806
|
+
reportSourceSchema = external_exports.enum(["sentry", "cli", "review", "security_audit"]);
|
|
6807
|
+
intakeReportSourceSchema = external_exports.enum(["cli", "review", "security_audit"]);
|
|
6808
|
+
reportClassificationSchema = external_exports.enum(["bug", "flaky_test", "security", "enhancement"]);
|
|
6809
|
+
reportStatusSchema = external_exports.enum([
|
|
6810
|
+
"pending",
|
|
6811
|
+
"grouped",
|
|
6812
|
+
"escalated",
|
|
6813
|
+
"shipped",
|
|
6814
|
+
"contested",
|
|
6815
|
+
"addressed",
|
|
6816
|
+
"dismissed"
|
|
6817
|
+
]);
|
|
6818
|
+
reportLocaleSchema = external_exports.enum(["en", "pt", "es"]);
|
|
6819
|
+
reportMessageAuthorRoleSchema = external_exports.enum(["reporter", "triage", "fixer", "system"]);
|
|
6820
|
+
reportMessageSchema = external_exports.object({
|
|
6821
|
+
message_id: external_exports.string(),
|
|
6822
|
+
author_role: reportMessageAuthorRoleSchema,
|
|
6823
|
+
/** The status transition this note accompanied (e.g. 'shipped'); null for a free/system note. */
|
|
6824
|
+
transition: external_exports.string().nullable(),
|
|
6825
|
+
body: external_exports.string(),
|
|
6826
|
+
created_at: timestampSchema,
|
|
6827
|
+
/**
|
|
6828
|
+
* Visibility: `false` = reporter-facing (the default for every narrative entry); `true` =
|
|
6829
|
+
* triage-internal (e.g. a `hold` rationale) — surfaced to platform admins only and NEVER
|
|
6830
|
+
* returned on the reporter read path. The reporter's `GET /api/reports/:id` filters these out.
|
|
6831
|
+
*/
|
|
6832
|
+
internal: external_exports.boolean()
|
|
6897
6833
|
});
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6834
|
+
sentryRefStatusSchema = external_exports.enum(["valid", "not_found", "mismatch", "unverified"]);
|
|
6835
|
+
createReportBody = external_exports.object({
|
|
6836
|
+
title: external_exports.string().min(5).max(256),
|
|
6837
|
+
description: external_exports.string().min(10).max(5e3),
|
|
6838
|
+
steps_to_reproduce: external_exports.string().max(3e3).optional(),
|
|
6839
|
+
error_message: external_exports.string().max(2e3).optional(),
|
|
6840
|
+
// Taxonomy (server defaults: source=cli, classification=bug when absent).
|
|
6841
|
+
source: intakeReportSourceSchema.optional(),
|
|
6842
|
+
classification: reportClassificationSchema.optional(),
|
|
6843
|
+
// Stable dedup key (e.g. "<file>::<test>" for flaky, "<file>:<line>" for
|
|
6844
|
+
// security). When present, the fingerprint uses it instead of the body hash.
|
|
6845
|
+
dedup_key: external_exports.string().min(1).max(256).optional(),
|
|
6846
|
+
// Context fields (auto-captured by the CLI)
|
|
6847
|
+
organization_id: external_exports.string().optional(),
|
|
6848
|
+
hub_id: external_exports.string().uuid().optional(),
|
|
6849
|
+
hub_name: external_exports.string().max(256).optional(),
|
|
6850
|
+
conversation_id: external_exports.string().uuid().optional(),
|
|
6851
|
+
agent_id: external_exports.string().uuid().optional(),
|
|
6852
|
+
agent_name: external_exports.string().max(256).optional(),
|
|
6853
|
+
client_version: external_exports.string().max(64).optional(),
|
|
6854
|
+
additional_context: external_exports.string().max(2e3).optional()
|
|
6907
6855
|
});
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6856
|
+
editReportBody = external_exports.object({
|
|
6857
|
+
title: external_exports.string().min(5).max(256).optional(),
|
|
6858
|
+
description: external_exports.string().min(10).max(5e3).optional(),
|
|
6859
|
+
steps_to_reproduce: external_exports.string().max(3e3).optional(),
|
|
6860
|
+
error_message: external_exports.string().max(2e3).optional(),
|
|
6861
|
+
additional_context: external_exports.string().max(2e3).optional()
|
|
6862
|
+
}).strict().refine((b) => Object.keys(b).length > 0, {
|
|
6863
|
+
message: "at least one field must be provided"
|
|
6912
6864
|
});
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6865
|
+
reporterReportSummarySchema = external_exports.object({
|
|
6866
|
+
report_id: external_exports.string(),
|
|
6867
|
+
title: external_exports.string(),
|
|
6868
|
+
description: external_exports.string(),
|
|
6869
|
+
classification: reportClassificationSchema,
|
|
6870
|
+
status: reportStatusSchema,
|
|
6871
|
+
created_at: timestampSchema,
|
|
6872
|
+
triaged_at: timestampSchema.nullable(),
|
|
6873
|
+
resolved_at: timestampSchema.nullable(),
|
|
6874
|
+
/** How many times the reporter has contested (gates the hard cap). */
|
|
6875
|
+
contest_count: external_exports.number(),
|
|
6876
|
+
/** True once triage issued a non-contestable (final) dismissal. */
|
|
6877
|
+
dismissal_final: external_exports.boolean()
|
|
6917
6878
|
});
|
|
6918
|
-
|
|
6919
|
-
|
|
6879
|
+
reporterListResponseSchema = external_exports.object({
|
|
6880
|
+
data: external_exports.array(reporterReportSummarySchema)
|
|
6920
6881
|
});
|
|
6921
|
-
|
|
6922
|
-
|
|
6882
|
+
getReportResponseSchema = external_exports.object({
|
|
6883
|
+
report: reporterReportSummarySchema,
|
|
6884
|
+
messages: external_exports.array(reportMessageSchema)
|
|
6923
6885
|
});
|
|
6924
|
-
|
|
6925
|
-
|
|
6886
|
+
reporterTransitionResponseSchema = external_exports.object({
|
|
6887
|
+
report: reporterReportSummarySchema
|
|
6926
6888
|
});
|
|
6927
|
-
|
|
6928
|
-
|
|
6889
|
+
contestReportBody = external_exports.object({
|
|
6890
|
+
reason: external_exports.string().min(1).max(5e3)
|
|
6891
|
+
});
|
|
6892
|
+
reporterListQuery = external_exports.object({
|
|
6893
|
+
status: reportStatusSchema.optional()
|
|
6894
|
+
});
|
|
6895
|
+
listReportsQuery = external_exports.object({
|
|
6896
|
+
status: reportStatusSchema.optional(),
|
|
6897
|
+
source: reportSourceSchema.optional(),
|
|
6898
|
+
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
6899
|
+
offset: external_exports.coerce.number().int().min(0).optional(),
|
|
6900
|
+
/** ISO 8601 lower bound on created_at. */
|
|
6901
|
+
since: external_exports.string().datetime().optional(),
|
|
6902
|
+
/**
|
|
6903
|
+
* ISO 8601 lower bound on resolution time — "what did we resolve recently", which `since`
|
|
6904
|
+
* (a created_at filter) cannot answer for a long-lived report resolved yesterday. Implies
|
|
6905
|
+
* a terminal status (`addressed`/`dismissed`) and orders on that same axis.
|
|
6906
|
+
*/
|
|
6907
|
+
resolved_since: external_exports.string().datetime().optional()
|
|
6908
|
+
});
|
|
6909
|
+
GITHUB_ISSUE_URL_REGEX = /^https:\/\/github\.com\/[^/]+\/[^/]+\/issues\/\d+(?:[/?#]|$)/;
|
|
6910
|
+
githubIssueUrlSchema = external_exports.string().url().refine((u) => GITHUB_ISSUE_URL_REGEX.test(u), {
|
|
6911
|
+
message: "must be an https://github.com/<owner>/<repo>/issues/<number> URL"
|
|
6912
|
+
});
|
|
6913
|
+
transitionReportBody = external_exports.discriminatedUnion("target", [
|
|
6914
|
+
external_exports.object({
|
|
6915
|
+
target: external_exports.literal("escalated"),
|
|
6916
|
+
gh_issue_url: githubIssueUrlSchema,
|
|
6917
|
+
ai_verdict: external_exports.string().max(2e3).optional()
|
|
6918
|
+
}),
|
|
6919
|
+
external_exports.object({
|
|
6920
|
+
target: external_exports.literal("shipped"),
|
|
6921
|
+
note: external_exports.string().min(1).max(2e3).optional()
|
|
6922
|
+
}),
|
|
6923
|
+
external_exports.object({
|
|
6924
|
+
target: external_exports.literal("addressed")
|
|
6925
|
+
}),
|
|
6926
|
+
external_exports.object({
|
|
6927
|
+
target: external_exports.literal("dismissed"),
|
|
6928
|
+
dismissal_reason: external_exports.string().min(1).max(5e3),
|
|
6929
|
+
ai_verdict: external_exports.string().max(2e3).optional(),
|
|
6930
|
+
final: external_exports.boolean().optional()
|
|
6931
|
+
})
|
|
6932
|
+
]);
|
|
6933
|
+
groupReportsBody = external_exports.object({
|
|
6934
|
+
member_ids: external_exports.array(external_exports.string().uuid()).min(1).max(100)
|
|
6935
|
+
});
|
|
6936
|
+
holdReportBody = external_exports.object({
|
|
6937
|
+
reason: external_exports.string().min(1).max(5e3)
|
|
6929
6938
|
});
|
|
6930
6939
|
}
|
|
6931
6940
|
});
|
|
@@ -7010,98 +7019,41 @@ var init_chunk_34LE6P7E = __esm({
|
|
|
7010
7019
|
}
|
|
7011
7020
|
});
|
|
7012
7021
|
|
|
7013
|
-
// ../../packages/core/dist/chunk-
|
|
7014
|
-
var
|
|
7015
|
-
var
|
|
7016
|
-
"../../packages/core/dist/chunk-
|
|
7022
|
+
// ../../packages/core/dist/chunk-FPSDNS2E.js
|
|
7023
|
+
var noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema;
|
|
7024
|
+
var init_chunk_FPSDNS2E = __esm({
|
|
7025
|
+
"../../packages/core/dist/chunk-FPSDNS2E.js"() {
|
|
7017
7026
|
"use strict";
|
|
7018
7027
|
init_zod();
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
* Present, and true, when the shell runs from the Microsoft Store's package: the Store updates it,
|
|
7033
|
-
* and Windows alone opens it at login (the package's startup task, which the person turns on in
|
|
7034
|
-
* Windows' settings). An optional field, so no new `bridgeVersion`: an older page ignores it, and
|
|
7035
|
-
* its absence is every other shell.
|
|
7036
|
-
*/
|
|
7037
|
-
store: external_exports.literal(true).optional()
|
|
7038
|
-
});
|
|
7039
|
-
DESKTOP_PRESENCE_STATES = ["present", "away"];
|
|
7040
|
-
desktopPresenceSchema = external_exports.object({
|
|
7041
|
-
presence: external_exports.enum(DESKTOP_PRESENCE_STATES),
|
|
7042
|
-
mainWindow: external_exports.object({
|
|
7043
|
-
shown: external_exports.boolean(),
|
|
7044
|
-
focused: external_exports.boolean()
|
|
7045
|
-
})
|
|
7046
|
-
});
|
|
7047
|
-
desktopUpdateSchema = external_exports.object({
|
|
7048
|
-
ready: external_exports.object({
|
|
7049
|
-
version: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
|
|
7050
|
-
offerRestart: external_exports.boolean()
|
|
7051
|
-
}).nullable()
|
|
7052
|
-
});
|
|
7053
|
-
DESKTOP_SIGN_IN_URL_MAX_LENGTH = 4096;
|
|
7054
|
-
DESKTOP_APP_PATH_MAX_LENGTH = 512;
|
|
7055
|
-
desktopAppPathSchema = external_exports.string().max(DESKTOP_APP_PATH_MAX_LENGTH).regex(/^\/(?![/\\])[^\s\\]*$/);
|
|
7056
|
-
DESKTOP_NOTIFICATION_KINDS = ["handoff", "message", "summary"];
|
|
7057
|
-
DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH = 200;
|
|
7058
|
-
DESKTOP_NOTIFICATION_BODY_MAX_LENGTH = 500;
|
|
7059
|
-
notificationTitleSchema = external_exports.string().min(1).max(DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH);
|
|
7060
|
-
notificationBodySchema = external_exports.string().max(DESKTOP_NOTIFICATION_BODY_MAX_LENGTH);
|
|
7061
|
-
desktopNotificationSchema = external_exports.object({
|
|
7062
|
-
kind: external_exports.enum(DESKTOP_NOTIFICATION_KINDS),
|
|
7063
|
-
title: notificationTitleSchema,
|
|
7064
|
-
body: notificationBodySchema,
|
|
7065
|
-
path: desktopAppPathSchema,
|
|
7066
|
-
withoutPreview: external_exports.object({ title: notificationTitleSchema, body: notificationBodySchema }).optional()
|
|
7067
|
-
});
|
|
7068
|
-
DESKTOP_BADGE_MAX_COUNT = 1e6;
|
|
7069
|
-
DESKTOP_BADGE_LABEL_MAX_LENGTH = 200;
|
|
7070
|
-
desktopBadgeSchema = external_exports.object({
|
|
7071
|
-
count: external_exports.number().int().min(0).max(DESKTOP_BADGE_MAX_COUNT),
|
|
7072
|
-
label: external_exports.string().max(DESKTOP_BADGE_LABEL_MAX_LENGTH)
|
|
7073
|
-
});
|
|
7074
|
-
desktopNavigateSchema = external_exports.object({
|
|
7075
|
-
path: desktopAppPathSchema
|
|
7076
|
-
});
|
|
7077
|
-
desktopSettingsSchema = external_exports.object({
|
|
7078
|
-
/** The app opens when the person logs in to the computer: the operating system's own login item. */
|
|
7079
|
-
openAtLogin: external_exports.boolean(),
|
|
7080
|
-
/** Closing the window keeps the app running in the tray (true), or quits it (false). */
|
|
7081
|
-
closeToTray: external_exports.boolean(),
|
|
7082
|
-
/** The shell shows notifications (true), or none (false). The badge is not a notification. */
|
|
7083
|
-
notifications: external_exports.boolean(),
|
|
7084
|
-
/**
|
|
7085
|
-
* A customer message's notification shows the customer's name and words, where the platform
|
|
7086
|
-
* allows them at all (`desktopShowsCustomerWords`: macOS); elsewhere the shell never shows them.
|
|
7087
|
-
*/
|
|
7088
|
-
messagePreview: external_exports.boolean()
|
|
7028
|
+
noticeSeveritySchema = external_exports.enum(["critical", "warn", "info"]);
|
|
7029
|
+
noticeStatusSchema = external_exports.enum(["active", "resolved"]);
|
|
7030
|
+
NOTICE_SCOPE_REGEX = /^(global|provider:[a-z0-9_-]{1,40}|service:[a-z0-9_-]{1,40})$/;
|
|
7031
|
+
noticeScopeSchema = external_exports.string().regex(NOTICE_SCOPE_REGEX, "scope must be 'global', 'provider:<x>', or 'service:<x>'");
|
|
7032
|
+
noticeLinkSchema = external_exports.string().url().refine((u) => /^https?:\/\//i.test(u), { message: "link must be an http(s) URL" });
|
|
7033
|
+
createNoticeBody = external_exports.object({
|
|
7034
|
+
severity: noticeSeveritySchema.default("info"),
|
|
7035
|
+
scope: noticeScopeSchema.default("global"),
|
|
7036
|
+
title: external_exports.string().trim().min(1).max(200),
|
|
7037
|
+
body: external_exports.string().max(2e3).optional(),
|
|
7038
|
+
link: noticeLinkSchema.optional(),
|
|
7039
|
+
starts_at: external_exports.string().datetime().optional(),
|
|
7040
|
+
ends_at: external_exports.string().datetime().optional()
|
|
7089
7041
|
});
|
|
7090
|
-
|
|
7091
|
-
|
|
7042
|
+
updateNoticeBody = external_exports.object({
|
|
7043
|
+
severity: noticeSeveritySchema.optional(),
|
|
7044
|
+
scope: noticeScopeSchema.optional(),
|
|
7045
|
+
title: external_exports.string().trim().min(1).max(200).optional(),
|
|
7046
|
+
body: external_exports.string().max(2e3).nullable().optional(),
|
|
7047
|
+
link: noticeLinkSchema.nullable().optional(),
|
|
7048
|
+
starts_at: external_exports.string().datetime().optional(),
|
|
7049
|
+
ends_at: external_exports.string().datetime().nullable().optional()
|
|
7050
|
+
}).refine((b) => Object.keys(b).length > 0, { message: "at least one field must be provided" });
|
|
7051
|
+
listNoticesQuery = external_exports.object({
|
|
7052
|
+
status: noticeStatusSchema.optional(),
|
|
7053
|
+
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
7054
|
+
offset: external_exports.coerce.number().int().min(0).optional()
|
|
7092
7055
|
});
|
|
7093
|
-
|
|
7094
|
-
getShellInfo: external_exports.tuple([]),
|
|
7095
|
-
getPresence: external_exports.tuple([]),
|
|
7096
|
-
openSignIn: external_exports.tuple([external_exports.string().max(DESKTOP_SIGN_IN_URL_MAX_LENGTH)]),
|
|
7097
|
-
getUpdate: external_exports.tuple([]),
|
|
7098
|
-
restartToUpdate: external_exports.tuple([]),
|
|
7099
|
-
notify: external_exports.tuple([desktopNotificationSchema]),
|
|
7100
|
-
setBadge: external_exports.tuple([desktopBadgeSchema]),
|
|
7101
|
-
clearAll: external_exports.tuple([]),
|
|
7102
|
-
getSettings: external_exports.tuple([]),
|
|
7103
|
-
setSettings: external_exports.tuple([desktopSettingsChangeSchema])
|
|
7104
|
-
};
|
|
7056
|
+
noticeIdParamSchema = external_exports.object({ id: external_exports.string().min(1) });
|
|
7105
7057
|
}
|
|
7106
7058
|
});
|
|
7107
7059
|
|
|
@@ -8484,72 +8436,58 @@ var init_chunk_EA23LSDS = __esm({
|
|
|
8484
8436
|
}
|
|
8485
8437
|
});
|
|
8486
8438
|
|
|
8487
|
-
// ../../packages/core/dist/chunk-
|
|
8488
|
-
var
|
|
8489
|
-
var
|
|
8490
|
-
"../../packages/core/dist/chunk-
|
|
8491
|
-
"use strict";
|
|
8492
|
-
COMMUNITY_LESSON_TREE_MAX_BYTES = 512 * 1024;
|
|
8493
|
-
COMMUNITY_LESSON_LINK_PROTOCOLS = ["http", "https", "mailto"];
|
|
8494
|
-
COMMUNITY_LESSON_TREE_TOO_LARGE_REASON = "lesson_tree_too_large";
|
|
8495
|
-
COMMUNITY_LESSON_TREE_TOO_DEEP_REASON = "lesson_tree_too_deep";
|
|
8496
|
-
COMMUNITY_LESSON_LINE_PREFIX_TOO_WIDE_REASON = "lesson_line_prefix_too_wide";
|
|
8497
|
-
LINK_SCHEME = new RegExp(`^(${COMMUNITY_LESSON_LINK_PROTOCOLS.join("|")}):`, "i");
|
|
8498
|
-
}
|
|
8499
|
-
});
|
|
8500
|
-
|
|
8501
|
-
// ../../packages/core/dist/chunk-V4FRPRH5.js
|
|
8502
|
-
var CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS;
|
|
8503
|
-
var init_chunk_V4FRPRH5 = __esm({
|
|
8504
|
-
"../../packages/core/dist/chunk-V4FRPRH5.js"() {
|
|
8439
|
+
// ../../packages/core/dist/chunk-SY6PLCPK.js
|
|
8440
|
+
var jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse;
|
|
8441
|
+
var init_chunk_SY6PLCPK = __esm({
|
|
8442
|
+
"../../packages/core/dist/chunk-SY6PLCPK.js"() {
|
|
8505
8443
|
"use strict";
|
|
8444
|
+
init_chunk_6TSQ5HXC();
|
|
8506
8445
|
init_zod();
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
status: consultThreadStatus,
|
|
8520
|
-
created_at: external_exports.string()
|
|
8446
|
+
jsonSchemaSchema = external_exports.record(external_exports.unknown());
|
|
8447
|
+
hubUserIdentity = external_exports.object({
|
|
8448
|
+
user_id: external_exports.string().nullable(),
|
|
8449
|
+
user_name: external_exports.string().nullable(),
|
|
8450
|
+
user_email: external_exports.string().nullable(),
|
|
8451
|
+
user_name_locked: external_exports.boolean(),
|
|
8452
|
+
created_at: external_exports.string(),
|
|
8453
|
+
updated_at: external_exports.string().nullable(),
|
|
8454
|
+
hub_user_id: external_exports.string().optional(),
|
|
8455
|
+
enabled: external_exports.boolean().optional(),
|
|
8456
|
+
hub_team_id: external_exports.string().nullable().optional(),
|
|
8457
|
+
source: external_exports.enum(["grant", "auto"]).optional()
|
|
8521
8458
|
});
|
|
8522
|
-
|
|
8523
|
-
|
|
8459
|
+
stateValueEntry = external_exports.object({
|
|
8460
|
+
state_slug: external_exports.string(),
|
|
8461
|
+
state_name: external_exports.string(),
|
|
8462
|
+
state_description: external_exports.string().nullable().optional(),
|
|
8463
|
+
scope: external_exports.enum(["user", "conversation"]),
|
|
8464
|
+
json_schema: jsonSchemaSchema,
|
|
8465
|
+
initial_value: external_exports.unknown(),
|
|
8466
|
+
value: external_exports.unknown(),
|
|
8467
|
+
is_reserved: external_exports.boolean()
|
|
8524
8468
|
});
|
|
8525
|
-
|
|
8526
|
-
|
|
8469
|
+
getHubUserContextResponse = external_exports.object({
|
|
8470
|
+
user: hubUserIdentity,
|
|
8471
|
+
user_states: external_exports.array(stateValueEntry),
|
|
8472
|
+
conversation_states: external_exports.array(stateValueEntry)
|
|
8527
8473
|
});
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
// hub's `consultant`-role agents; a non-consultant / unknown id is rejected.
|
|
8533
|
-
engaged_agent_id: external_exports.string().uuid().optional()
|
|
8474
|
+
updateHubUserBody = external_exports.object({
|
|
8475
|
+
// Non-empty, non-null. `.nullable()` here would bypass `.min(1)` and let an
|
|
8476
|
+
// admin arm the lock on a null name — see hub-do.ts updateHubUser null-guard.
|
|
8477
|
+
user_name: external_exports.string().min(1).max(120)
|
|
8534
8478
|
});
|
|
8535
|
-
|
|
8536
|
-
|
|
8479
|
+
updateHubUserResponse = external_exports.object({
|
|
8480
|
+
user: hubUserIdentity
|
|
8537
8481
|
});
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
threadId: external_exports.string().uuid()
|
|
8482
|
+
unlockHubUserNameResponse = external_exports.object({
|
|
8483
|
+
user: hubUserIdentity
|
|
8541
8484
|
});
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
title: consultThreadTitle.optional(),
|
|
8545
|
-
engaged_agent_id: external_exports.string().uuid().optional()
|
|
8546
|
-
}).refine((v) => v.title !== void 0 || v.engaged_agent_id !== void 0, {
|
|
8547
|
-
message: "Provide a title and/or an engaged_agent_id to update"
|
|
8485
|
+
stateResetParams = external_exports.object({
|
|
8486
|
+
stateSlug: slugSchema
|
|
8548
8487
|
});
|
|
8549
|
-
|
|
8550
|
-
|
|
8488
|
+
stateResetResponse = external_exports.object({
|
|
8489
|
+
ok: external_exports.literal(true)
|
|
8551
8490
|
});
|
|
8552
|
-
CONSULT_AWAIT_TIMEOUT_MS = 15 * 6e4;
|
|
8553
8491
|
}
|
|
8554
8492
|
});
|
|
8555
8493
|
|
|
@@ -8610,15 +8548,15 @@ var init_chunk_MH4O3YEX = __esm({
|
|
|
8610
8548
|
}
|
|
8611
8549
|
});
|
|
8612
8550
|
|
|
8613
|
-
// ../../packages/core/dist/chunk-
|
|
8551
|
+
// ../../packages/core/dist/chunk-SAQNCSQ6.js
|
|
8614
8552
|
function catalogToolSideEffects(toolName) {
|
|
8615
8553
|
const sideEffects = CATALOG_SIDE_EFFECTS.get(toolName);
|
|
8616
8554
|
if (sideEffects === void 0) return "unknown";
|
|
8617
8555
|
return sideEffects ? "side_effects" : "none";
|
|
8618
8556
|
}
|
|
8619
8557
|
var NATIVE_TOOL_SCHEMAS, WAYAI_CONNECTOR, SANDBOX_AGENT_ROLES, BASE_NATIVE_TOOLS, NATIVE_TOOLS, CATALOG_SIDE_EFFECTS;
|
|
8620
|
-
var
|
|
8621
|
-
"../../packages/core/dist/chunk-
|
|
8558
|
+
var init_chunk_SAQNCSQ6 = __esm({
|
|
8559
|
+
"../../packages/core/dist/chunk-SAQNCSQ6.js"() {
|
|
8622
8560
|
"use strict";
|
|
8623
8561
|
init_chunk_WNLWNFHH();
|
|
8624
8562
|
NATIVE_TOOL_SCHEMAS = {
|
|
@@ -9790,7 +9728,7 @@ var init_chunk_T7KQKDET = __esm({
|
|
|
9790
9728
|
}
|
|
9791
9729
|
});
|
|
9792
9730
|
|
|
9793
|
-
// ../../packages/core/dist/chunk-
|
|
9731
|
+
// ../../packages/core/dist/chunk-VU7E2RFY.js
|
|
9794
9732
|
function resolveMonitorTrigger(monitorConfig) {
|
|
9795
9733
|
if (!monitorConfig || typeof monitorConfig !== "object") return "idle";
|
|
9796
9734
|
const raw = monitorConfig.trigger;
|
|
@@ -10096,10 +10034,10 @@ function refineMonitorRulesStructuredOutput(body, ctx) {
|
|
|
10096
10034
|
if (refusal2) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["response_format"], message: refusal2 });
|
|
10097
10035
|
}
|
|
10098
10036
|
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;
|
|
10099
|
-
var
|
|
10100
|
-
"../../packages/core/dist/chunk-
|
|
10037
|
+
var init_chunk_VU7E2RFY = __esm({
|
|
10038
|
+
"../../packages/core/dist/chunk-VU7E2RFY.js"() {
|
|
10101
10039
|
"use strict";
|
|
10102
|
-
|
|
10040
|
+
init_chunk_SAQNCSQ6();
|
|
10103
10041
|
init_chunk_IBL7FANV();
|
|
10104
10042
|
init_chunk_HZ6CADSY();
|
|
10105
10043
|
init_chunk_C2UEA2KW();
|
|
@@ -10322,12 +10260,12 @@ var init_chunk_2LE72ZC7 = __esm({
|
|
|
10322
10260
|
}
|
|
10323
10261
|
});
|
|
10324
10262
|
|
|
10325
|
-
// ../../packages/core/dist/chunk-
|
|
10263
|
+
// ../../packages/core/dist/chunk-FKBQSXOY.js
|
|
10326
10264
|
var conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody;
|
|
10327
|
-
var
|
|
10328
|
-
"../../packages/core/dist/chunk-
|
|
10265
|
+
var init_chunk_FKBQSXOY = __esm({
|
|
10266
|
+
"../../packages/core/dist/chunk-FKBQSXOY.js"() {
|
|
10329
10267
|
"use strict";
|
|
10330
|
-
|
|
10268
|
+
init_chunk_VU7E2RFY();
|
|
10331
10269
|
init_chunk_HZ6CADSY();
|
|
10332
10270
|
init_chunk_WNLWNFHH();
|
|
10333
10271
|
init_zod();
|
|
@@ -10624,115 +10562,98 @@ var init_chunk_KSTYTQ7I = __esm({
|
|
|
10624
10562
|
}
|
|
10625
10563
|
});
|
|
10626
10564
|
|
|
10627
|
-
// ../../packages/core/dist/chunk-
|
|
10628
|
-
var
|
|
10629
|
-
var
|
|
10630
|
-
"../../packages/core/dist/chunk-
|
|
10565
|
+
// ../../packages/core/dist/chunk-LKBSHANA.js
|
|
10566
|
+
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;
|
|
10567
|
+
var init_chunk_LKBSHANA = __esm({
|
|
10568
|
+
"../../packages/core/dist/chunk-LKBSHANA.js"() {
|
|
10631
10569
|
"use strict";
|
|
10632
|
-
init_chunk_HZ6CADSY();
|
|
10633
10570
|
init_zod();
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10571
|
+
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})?$/;
|
|
10572
|
+
DESKTOP_PLATFORMS = ["darwin", "win32"];
|
|
10573
|
+
DESKTOP_FLAVORS = ["production", "development"];
|
|
10574
|
+
desktopShellInfoSchema = external_exports.object({
|
|
10575
|
+
/** The shell's own release version, independent of the web deploy. */
|
|
10576
|
+
shellVersion: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
|
|
10577
|
+
/** The Electron runtime the shell was built with. */
|
|
10578
|
+
electronVersion: external_exports.string().regex(/^\d{1,4}\.\d{1,4}\.\d{1,4}(-[0-9A-Za-z.-]{1,32})?$/),
|
|
10579
|
+
platform: external_exports.enum(DESKTOP_PLATFORMS),
|
|
10580
|
+
/** CPU architecture as Node reports it (`arm64`, `x64`). */
|
|
10581
|
+
arch: external_exports.string().regex(/^[a-z0-9_]{1,16}$/),
|
|
10582
|
+
flavor: external_exports.enum(DESKTOP_FLAVORS),
|
|
10583
|
+
/**
|
|
10584
|
+
* Present, and true, when the shell runs from the Microsoft Store's package: the Store updates it,
|
|
10585
|
+
* and Windows alone opens it at login (the package's startup task, which the person turns on in
|
|
10586
|
+
* Windows' settings). An optional field, so no new `bridgeVersion`: an older page ignores it, and
|
|
10587
|
+
* its absence is every other shell.
|
|
10588
|
+
*/
|
|
10589
|
+
store: external_exports.literal(true).optional()
|
|
10641
10590
|
});
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
// otherwise skip the owner guard and silently MINT a new conversation instead of
|
|
10650
|
-
// rejecting. A format 400 is shape-only — not an existence oracle (a valid-but-unknown
|
|
10651
|
-
// UUID still collapses to the opaque authorization error downstream).
|
|
10652
|
-
conversation_id: external_exports.string().uuid().optional(),
|
|
10653
|
-
// On-behalf-of end-user identity. Absent → per-connection service principal (task-hub
|
|
10654
|
-
// only; chat hub rejects with 422 in the route).
|
|
10655
|
-
user: external_exports.object({
|
|
10656
|
-
id: external_exports.string().min(1),
|
|
10657
|
-
email: clientOptionalString,
|
|
10658
|
-
name: clientOptionalString
|
|
10659
|
-
}).optional(),
|
|
10660
|
-
message: apiChannelMessage,
|
|
10661
|
-
// Idempotency key: maps to channel_message_sid, deduped within one conversation
|
|
10662
|
-
// (ConversationDO.storeMessage). A retried POST resolves to the same conversation (a chat
|
|
10663
|
-
// hub's user, the external_ref, the conversation_id, or on a task hub with neither, this key
|
|
10664
|
-
// scoped by the sender), so it echoes the original message_id and skips billing / turn
|
|
10665
|
-
// dispatch. A failed store answers a retryable 503 only when this key is set; without it a
|
|
10666
|
-
// retry could store the message twice, so it answers 400.
|
|
10667
|
-
client_message_id: external_exports.string().min(1).max(256).optional()
|
|
10668
|
-
}).refine((b) => !(b.external_ref && b.conversation_id), {
|
|
10669
|
-
message: "provide external_ref or conversation_id, not both",
|
|
10670
|
-
path: ["external_ref"]
|
|
10591
|
+
DESKTOP_PRESENCE_STATES = ["present", "away"];
|
|
10592
|
+
desktopPresenceSchema = external_exports.object({
|
|
10593
|
+
presence: external_exports.enum(DESKTOP_PRESENCE_STATES),
|
|
10594
|
+
mainWindow: external_exports.object({
|
|
10595
|
+
shown: external_exports.boolean(),
|
|
10596
|
+
focused: external_exports.boolean()
|
|
10597
|
+
})
|
|
10671
10598
|
});
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
message_body: clientOptionalString,
|
|
10678
|
-
// Conversation context. Ids are plain strings rather than `.uuid()` on purpose:
|
|
10679
|
-
// they are AUTHORIZED downstream, which is the stronger guarantee — a well-formed
|
|
10680
|
-
// uuid belonging to another tenant must fail just as hard as junk. `hub_id` is
|
|
10681
|
-
// gated by `assertHubEndUserAccess` (gh #3286) and `conversation_id` by HubDO's
|
|
10682
|
-
// conversation_index owner check (gh #2781, #3281). The route's own falsy guards
|
|
10683
|
-
// ('hub_id is required') still reject an empty one.
|
|
10684
|
-
hub_id: clientOptionalString,
|
|
10685
|
-
channel_id: clientOptionalString,
|
|
10686
|
-
conversation_id: clientOptionalString,
|
|
10687
|
-
hub_type: external_exports.enum(["chat", "task"]).nullish().transform((v) => v ?? void 0),
|
|
10688
|
-
// Stable idempotency key for one explicit task-hub launcher. HubDO scopes it
|
|
10689
|
-
// to the authenticated user and resolves retries/tabs to one conversation.
|
|
10690
|
-
task_start_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
|
|
10691
|
-
// Routing.
|
|
10692
|
-
sender_type: appMessageSenderType.nullish().transform((v) => v ?? void 0),
|
|
10693
|
-
receiver_type: appMessageReceiverType.nullish().transform((v) => v ?? void 0),
|
|
10694
|
-
// Only meaningful on a team send, where `validateAppTeamSendContext` proves the
|
|
10695
|
-
// caller may send to this receiver. Absent on a team send to a conversation with no
|
|
10696
|
-
// person, which names its `conversation_id` instead. The end-user branch ignores it —
|
|
10697
|
-
// see the receiver derivation in the route.
|
|
10698
|
-
user_receiver_id: clientOptionalString,
|
|
10699
|
-
// ── Internal consult (consultant-agents PR 2 — H1.0) ──────────────────────
|
|
10700
|
-
// A team member handling a customer conversation can tag a `consultant`-role
|
|
10701
|
-
// agent for a PRIVATE, team-only exchange that never reaches the customer. A
|
|
10702
|
-
// consult send is a team send with `receiver_type: 'agent'` targeting the
|
|
10703
|
-
// consultant; `user_receiver_id` identifies the customer whose conversation this is
|
|
10704
|
-
// (and is authorized by `validateAppTeamSendContext`, exactly as a team→user send is),
|
|
10705
|
-
// and is absent, as on a team→user send, when the conversation has no person. The consultant is resolved from `agent_receiver_id`
|
|
10706
|
-
// when supplied, else from an `@mention` parsed out of the message text against
|
|
10707
|
-
// the hub's consultant agents. `consult_thread_id` continues an existing thread;
|
|
10708
|
-
// absent, the route creates/reuses the single implicit thread. These fields are
|
|
10709
|
-
// inert on every non-consult send (end-user send, team→user send).
|
|
10710
|
-
agent_receiver_id: clientOptionalString,
|
|
10711
|
-
consult_thread_id: clientOptionalString,
|
|
10712
|
-
is_first_message: clientOptionalBoolean,
|
|
10713
|
-
end_conversation: clientOptionalBoolean,
|
|
10714
|
-
// Pre-generated by the client so the optimistic bubble and the stored row share
|
|
10715
|
-
// a key (transcription live-updates land on the same row instead of duplicating).
|
|
10716
|
-
message_id: clientOptionalString,
|
|
10717
|
-
attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0),
|
|
10718
|
-
// Base64-encoded audio for STT. Size-capped in the route (the cap is a byte
|
|
10719
|
-
// budget tied to the /channels/* bodyLimit, not a shape rule).
|
|
10720
|
-
audio_file: clientOptionalString
|
|
10599
|
+
desktopUpdateSchema = external_exports.object({
|
|
10600
|
+
ready: external_exports.object({
|
|
10601
|
+
version: external_exports.string().regex(DESKTOP_SHELL_VERSION_RE),
|
|
10602
|
+
offerRestart: external_exports.boolean()
|
|
10603
|
+
}).nullable()
|
|
10721
10604
|
});
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10605
|
+
DESKTOP_SIGN_IN_URL_MAX_LENGTH = 4096;
|
|
10606
|
+
DESKTOP_APP_PATH_MAX_LENGTH = 512;
|
|
10607
|
+
desktopAppPathSchema = external_exports.string().max(DESKTOP_APP_PATH_MAX_LENGTH).regex(/^\/(?![/\\])[^\s\\]*$/);
|
|
10608
|
+
DESKTOP_NOTIFICATION_KINDS = ["handoff", "message", "summary"];
|
|
10609
|
+
DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH = 200;
|
|
10610
|
+
DESKTOP_NOTIFICATION_BODY_MAX_LENGTH = 500;
|
|
10611
|
+
notificationTitleSchema = external_exports.string().min(1).max(DESKTOP_NOTIFICATION_TITLE_MAX_LENGTH);
|
|
10612
|
+
notificationBodySchema = external_exports.string().max(DESKTOP_NOTIFICATION_BODY_MAX_LENGTH);
|
|
10613
|
+
desktopNotificationSchema = external_exports.object({
|
|
10614
|
+
kind: external_exports.enum(DESKTOP_NOTIFICATION_KINDS),
|
|
10615
|
+
title: notificationTitleSchema,
|
|
10616
|
+
body: notificationBodySchema,
|
|
10617
|
+
path: desktopAppPathSchema,
|
|
10618
|
+
withoutPreview: external_exports.object({ title: notificationTitleSchema, body: notificationBodySchema }).optional()
|
|
10619
|
+
});
|
|
10620
|
+
DESKTOP_BADGE_MAX_COUNT = 1e6;
|
|
10621
|
+
DESKTOP_BADGE_LABEL_MAX_LENGTH = 200;
|
|
10622
|
+
desktopBadgeSchema = external_exports.object({
|
|
10623
|
+
count: external_exports.number().int().min(0).max(DESKTOP_BADGE_MAX_COUNT),
|
|
10624
|
+
label: external_exports.string().max(DESKTOP_BADGE_LABEL_MAX_LENGTH)
|
|
10625
|
+
});
|
|
10626
|
+
desktopNavigateSchema = external_exports.object({
|
|
10627
|
+
path: desktopAppPathSchema
|
|
10628
|
+
});
|
|
10629
|
+
desktopSettingsSchema = external_exports.object({
|
|
10630
|
+
/** The app opens when the person logs in to the computer: the operating system's own login item. */
|
|
10631
|
+
openAtLogin: external_exports.boolean(),
|
|
10632
|
+
/** Closing the window keeps the app running in the tray (true), or quits it (false). */
|
|
10633
|
+
closeToTray: external_exports.boolean(),
|
|
10634
|
+
/** The shell shows notifications (true), or none (false). The badge is not a notification. */
|
|
10635
|
+
notifications: external_exports.boolean(),
|
|
10636
|
+
/**
|
|
10637
|
+
* A customer message's notification shows the customer's name and words, where the platform
|
|
10638
|
+
* allows them at all (`desktopShowsCustomerWords`: macOS); elsewhere the shell never shows them.
|
|
10639
|
+
*/
|
|
10640
|
+
messagePreview: external_exports.boolean()
|
|
10735
10641
|
});
|
|
10642
|
+
desktopSettingsChangeSchema = desktopSettingsSchema.partial().strict().refine((change) => Object.values(change).every((value) => typeof value === "boolean"), {
|
|
10643
|
+
message: "each setting changed is true or false"
|
|
10644
|
+
});
|
|
10645
|
+
desktopBridgeArgsSchemas = {
|
|
10646
|
+
getShellInfo: external_exports.tuple([]),
|
|
10647
|
+
getPresence: external_exports.tuple([]),
|
|
10648
|
+
openSignIn: external_exports.tuple([external_exports.string().max(DESKTOP_SIGN_IN_URL_MAX_LENGTH)]),
|
|
10649
|
+
getUpdate: external_exports.tuple([]),
|
|
10650
|
+
restartToUpdate: external_exports.tuple([]),
|
|
10651
|
+
notify: external_exports.tuple([desktopNotificationSchema]),
|
|
10652
|
+
setBadge: external_exports.tuple([desktopBadgeSchema]),
|
|
10653
|
+
clearAll: external_exports.tuple([]),
|
|
10654
|
+
getSettings: external_exports.tuple([]),
|
|
10655
|
+
setSettings: external_exports.tuple([desktopSettingsChangeSchema])
|
|
10656
|
+
};
|
|
10736
10657
|
}
|
|
10737
10658
|
});
|
|
10738
10659
|
|
|
@@ -10800,7 +10721,7 @@ var init_chunk_BPCNB5RT = __esm({
|
|
|
10800
10721
|
}
|
|
10801
10722
|
});
|
|
10802
10723
|
|
|
10803
|
-
// ../../packages/core/dist/chunk-
|
|
10724
|
+
// ../../packages/core/dist/chunk-5HA6FIE7.js
|
|
10804
10725
|
function idempotencyHeaderRefusal(value) {
|
|
10805
10726
|
if (typeof value !== "string" || !/^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/.test(value)) {
|
|
10806
10727
|
return "idempotency_header must be a header name: letters, digits and dashes, at most 64";
|
|
@@ -10811,10 +10732,10 @@ function idempotencyHeaderRefusal(value) {
|
|
|
10811
10732
|
return null;
|
|
10812
10733
|
}
|
|
10813
10734
|
var CATALOG_REPLAY, REPLAY_OVERRIDES, RESERVED_HEADERS;
|
|
10814
|
-
var
|
|
10815
|
-
"../../packages/core/dist/chunk-
|
|
10735
|
+
var init_chunk_5HA6FIE7 = __esm({
|
|
10736
|
+
"../../packages/core/dist/chunk-5HA6FIE7.js"() {
|
|
10816
10737
|
"use strict";
|
|
10817
|
-
|
|
10738
|
+
init_chunk_SAQNCSQ6();
|
|
10818
10739
|
CATALOG_REPLAY = new Map(
|
|
10819
10740
|
NATIVE_TOOLS.map((tool) => [tool.tool_name, tool.replay])
|
|
10820
10741
|
);
|
|
@@ -11047,7 +10968,7 @@ var init_chunk_WEXVYJ5H = __esm({
|
|
|
11047
10968
|
}
|
|
11048
10969
|
});
|
|
11049
10970
|
|
|
11050
|
-
// ../../packages/core/dist/chunk-
|
|
10971
|
+
// ../../packages/core/dist/chunk-HCE5YOBD.js
|
|
11051
10972
|
function refineToolConfig(value, ctx) {
|
|
11052
10973
|
const raw = value.tool_config;
|
|
11053
10974
|
if (raw == null) return;
|
|
@@ -11083,10 +11004,10 @@ function refineToolConfig(value, ctx) {
|
|
|
11083
11004
|
}
|
|
11084
11005
|
}
|
|
11085
11006
|
var toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, toolReplaySettingsFields, toolReplaySettingsSchema, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody;
|
|
11086
|
-
var
|
|
11087
|
-
"../../packages/core/dist/chunk-
|
|
11007
|
+
var init_chunk_HCE5YOBD = __esm({
|
|
11008
|
+
"../../packages/core/dist/chunk-HCE5YOBD.js"() {
|
|
11088
11009
|
"use strict";
|
|
11089
|
-
|
|
11010
|
+
init_chunk_5HA6FIE7();
|
|
11090
11011
|
init_chunk_WEXVYJ5H();
|
|
11091
11012
|
init_chunk_HZ6CADSY();
|
|
11092
11013
|
init_zod();
|
|
@@ -12213,7 +12134,7 @@ var init_chunk_XQBFXSYS = __esm({
|
|
|
12213
12134
|
}
|
|
12214
12135
|
});
|
|
12215
12136
|
|
|
12216
|
-
// ../../packages/core/dist/chunk-
|
|
12137
|
+
// ../../packages/core/dist/chunk-USFRRP7E.js
|
|
12217
12138
|
function refineLaneReferences(val, ctx) {
|
|
12218
12139
|
const lanes = val.lanes;
|
|
12219
12140
|
const statuses = val.kanban_statuses;
|
|
@@ -12236,9 +12157,9 @@ function describeSyncWarning(warning) {
|
|
|
12236
12157
|
}
|
|
12237
12158
|
return `${label}: ${parts.join("; ")}. Promote the base so production's tools match the preview's.`;
|
|
12238
12159
|
}
|
|
12239
|
-
var hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, HUB_USERS_PAGE_SIZE_MAX, HUB_USERS_SEARCH_MAX, HUB_USERS_CHANNEL_TYPES, getHubUsersQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, MAX_END_USER_DAILY_MESSAGE_LIMIT, endUserDailyMessageLimitField, previewLabelField, hubTagsField, createHubBody, updateHubBody, HUB_TAG_CHANGE_REFUSED, hubTagChangeRefusalSchema, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, CONTACT_ACCESS_PAGE_SIZE_MAX, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, HUB_DIFF_SECTION_SET, HUB_DIFF_SECTIONS, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam;
|
|
12240
|
-
var
|
|
12241
|
-
"../../packages/core/dist/chunk-
|
|
12160
|
+
var hubIdParam, hubAdminIdParam, hubUserIdParam, hubAgentIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, HUB_USERS_PAGE_SIZE_MAX, HUB_USERS_SEARCH_MAX, HUB_USERS_CHANNEL_TYPES, getHubUsersQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, MAX_END_USER_DAILY_MESSAGE_LIMIT, endUserDailyMessageLimitField, previewLabelField, hubTagsField, createHubBody, updateHubBody, HUB_TAG_CHANGE_REFUSED, hubTagChangeRefusalSchema, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, CONTACT_ACCESS_PAGE_SIZE_MAX, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, HUB_DIFF_SECTION_SET, HUB_DIFF_SECTIONS, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam;
|
|
12161
|
+
var init_chunk_USFRRP7E = __esm({
|
|
12162
|
+
"../../packages/core/dist/chunk-USFRRP7E.js"() {
|
|
12242
12163
|
"use strict";
|
|
12243
12164
|
init_chunk_3VHMUK4W();
|
|
12244
12165
|
init_chunk_AMG6HKUQ();
|
|
@@ -12248,6 +12169,7 @@ var init_chunk_R555PBKV = __esm({
|
|
|
12248
12169
|
hubIdParam = external_exports.object({ id: uuidSchema });
|
|
12249
12170
|
hubAdminIdParam = external_exports.object({ id: uuidSchema, adminId: uuidSchema });
|
|
12250
12171
|
hubUserIdParam = external_exports.object({ id: uuidSchema, hubUserId: uuidSchema });
|
|
12172
|
+
hubAgentIdParam = external_exports.object({ id: uuidSchema, agentId: uuidSchema });
|
|
12251
12173
|
hubIdentityIdParam = external_exports.object({ id: uuidSchema, identityId: uuidSchema });
|
|
12252
12174
|
hubTeamIdParam = external_exports.object({ id: uuidSchema, teamId: uuidSchema });
|
|
12253
12175
|
hubTeamUserDeleteParam = external_exports.object({ id: uuidSchema, teamUserId: uuidSchema });
|
|
@@ -12435,7 +12357,7 @@ var init_chunk_R555PBKV = __esm({
|
|
|
12435
12357
|
}
|
|
12436
12358
|
});
|
|
12437
12359
|
|
|
12438
|
-
// ../../packages/core/dist/chunk-
|
|
12360
|
+
// ../../packages/core/dist/chunk-BGUEWUAI.js
|
|
12439
12361
|
function refineHubAsCodeCustomTools(config, ctx) {
|
|
12440
12362
|
const agents = config.agents;
|
|
12441
12363
|
if (!Array.isArray(agents)) return;
|
|
@@ -12671,6 +12593,22 @@ function refineHubAsCodeEvalAttachments(config, ctx) {
|
|
|
12671
12593
|
}
|
|
12672
12594
|
}
|
|
12673
12595
|
}
|
|
12596
|
+
function refineHubAsCodeAccessValues(config, ctx) {
|
|
12597
|
+
const agents = config?.agents;
|
|
12598
|
+
if (!Array.isArray(agents)) return;
|
|
12599
|
+
agents.forEach((entry, a) => {
|
|
12600
|
+
const agent = entry;
|
|
12601
|
+
if (agent?.access_values === void 0 || agent.access_values === null) return;
|
|
12602
|
+
const parsed = accessAssignmentSchema.safeParse(agent.access_values);
|
|
12603
|
+
if (parsed.success) return;
|
|
12604
|
+
const issue = parsed.error.issues[0];
|
|
12605
|
+
ctx.addIssue({
|
|
12606
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12607
|
+
path: ["agents", a, "access_values", ...issue?.path ?? []],
|
|
12608
|
+
message: `agent "${typeof agent.name === "string" ? agent.name : "<unnamed>"}": access_values ${issue?.message ?? "is invalid"}`
|
|
12609
|
+
});
|
|
12610
|
+
});
|
|
12611
|
+
}
|
|
12674
12612
|
function refineHubAsCodeCallOpenings(config, ctx) {
|
|
12675
12613
|
const cfg = config;
|
|
12676
12614
|
if (Array.isArray(cfg.agents)) {
|
|
@@ -13019,15 +12957,16 @@ function skillSectionsAsResources(scope) {
|
|
|
13019
12957
|
};
|
|
13020
12958
|
}
|
|
13021
12959
|
var MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, MAX_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, isPlainObject, MIN_SKILLS_LAYOUT_CLI, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema;
|
|
13022
|
-
var
|
|
13023
|
-
"../../packages/core/dist/chunk-
|
|
12960
|
+
var init_chunk_BGUEWUAI = __esm({
|
|
12961
|
+
"../../packages/core/dist/chunk-BGUEWUAI.js"() {
|
|
13024
12962
|
"use strict";
|
|
13025
|
-
|
|
12963
|
+
init_chunk_HCE5YOBD();
|
|
12964
|
+
init_chunk_BCDGY3GH();
|
|
13026
12965
|
init_chunk_VQIITUAJ();
|
|
13027
|
-
|
|
12966
|
+
init_chunk_VU7E2RFY();
|
|
13028
12967
|
init_chunk_LBDH7LCG();
|
|
13029
12968
|
init_chunk_4LXDRTO4();
|
|
13030
|
-
|
|
12969
|
+
init_chunk_USFRRP7E();
|
|
13031
12970
|
init_chunk_AMG6HKUQ();
|
|
13032
12971
|
init_chunk_XQBFXSYS();
|
|
13033
12972
|
init_chunk_WEXVYJ5H();
|
|
@@ -13133,6 +13072,7 @@ var init_chunk_ZANV2H25 = __esm({
|
|
|
13133
13072
|
refineHubAsCodeCustomers(config, ctx);
|
|
13134
13073
|
refineHubAsCodeEvalAttachments(config, ctx);
|
|
13135
13074
|
refineHubAsCodeCallOpenings(config, ctx);
|
|
13075
|
+
refineHubAsCodeAccessValues(config, ctx);
|
|
13136
13076
|
refineHubAsCodeResources(config, ctx);
|
|
13137
13077
|
refineHubAsCodeDelegation(config, ctx);
|
|
13138
13078
|
refineHubAsCodeFlagConditions(config, ctx);
|
|
@@ -13856,140 +13796,72 @@ var init_chunk_ZLJP22IA = __esm({
|
|
|
13856
13796
|
}
|
|
13857
13797
|
});
|
|
13858
13798
|
|
|
13859
|
-
// ../../packages/core/dist/chunk-
|
|
13860
|
-
var
|
|
13861
|
-
var
|
|
13862
|
-
"../../packages/core/dist/chunk-
|
|
13799
|
+
// ../../packages/core/dist/chunk-YULHXJ5M.js
|
|
13800
|
+
var COMMUNITY_LESSON_TREE_MAX_BYTES, COMMUNITY_LESSON_LINK_PROTOCOLS, COMMUNITY_LESSON_TREE_TOO_LARGE_REASON, COMMUNITY_LESSON_TREE_TOO_DEEP_REASON, COMMUNITY_LESSON_LINE_PREFIX_TOO_WIDE_REASON, LINK_SCHEME;
|
|
13801
|
+
var init_chunk_YULHXJ5M = __esm({
|
|
13802
|
+
"../../packages/core/dist/chunk-YULHXJ5M.js"() {
|
|
13803
|
+
"use strict";
|
|
13804
|
+
COMMUNITY_LESSON_TREE_MAX_BYTES = 512 * 1024;
|
|
13805
|
+
COMMUNITY_LESSON_LINK_PROTOCOLS = ["http", "https", "mailto"];
|
|
13806
|
+
COMMUNITY_LESSON_TREE_TOO_LARGE_REASON = "lesson_tree_too_large";
|
|
13807
|
+
COMMUNITY_LESSON_TREE_TOO_DEEP_REASON = "lesson_tree_too_deep";
|
|
13808
|
+
COMMUNITY_LESSON_LINE_PREFIX_TOO_WIDE_REASON = "lesson_line_prefix_too_wide";
|
|
13809
|
+
LINK_SCHEME = new RegExp(`^(${COMMUNITY_LESSON_LINK_PROTOCOLS.join("|")}):`, "i");
|
|
13810
|
+
}
|
|
13811
|
+
});
|
|
13812
|
+
|
|
13813
|
+
// ../../packages/core/dist/chunk-V4FRPRH5.js
|
|
13814
|
+
var CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS;
|
|
13815
|
+
var init_chunk_V4FRPRH5 = __esm({
|
|
13816
|
+
"../../packages/core/dist/chunk-V4FRPRH5.js"() {
|
|
13863
13817
|
"use strict";
|
|
13864
13818
|
init_zod();
|
|
13865
|
-
|
|
13866
|
-
|
|
13867
|
-
|
|
13868
|
-
|
|
13869
|
-
|
|
13870
|
-
|
|
13871
|
-
|
|
13872
|
-
|
|
13873
|
-
|
|
13874
|
-
|
|
13875
|
-
|
|
13876
|
-
|
|
13877
|
-
|
|
13878
|
-
|
|
13879
|
-
TEXT_FILTER_OPS = ["equals", "not_equals", "contains", "not_contains", "starts_with", "ends_with"];
|
|
13880
|
-
CATEGORICAL_FILTER_OPS = ["is", "is_not", "in", "not_in"];
|
|
13881
|
-
VARIABLE_FILTER_OPS = [
|
|
13882
|
-
...NUMERIC_FILTER_OPS,
|
|
13883
|
-
...TEXT_FILTER_OPS,
|
|
13884
|
-
...CATEGORICAL_FILTER_OPS
|
|
13885
|
-
];
|
|
13886
|
-
STRUCTURED_QUERY_OPS = ["eq", "neq", "gt", "gte", "lt", "lte", "in", "not_in", "like"];
|
|
13887
|
-
STRUCTURED_QUERY_AGGREGATIONS = ["avg", "sum", "min", "max", "count", "quantile", "stddevPop", "corr", "uniq"];
|
|
13888
|
-
filterValueSchema = external_exports.object({
|
|
13889
|
-
variable_id: external_exports.string(),
|
|
13890
|
-
filter_type: external_exports.enum(VARIABLE_FILTER_OPS),
|
|
13891
|
-
filter_value: external_exports.union([external_exports.string(), external_exports.number()])
|
|
13892
|
-
});
|
|
13893
|
-
conversationsBody = external_exports.object({
|
|
13894
|
-
hub_id: external_exports.string().uuid(),
|
|
13895
|
-
time_interval: external_exports.object({
|
|
13896
|
-
start: external_exports.string().optional(),
|
|
13897
|
-
end: external_exports.string().optional()
|
|
13898
|
-
}).optional(),
|
|
13899
|
-
filters: external_exports.array(filterValueSchema).optional(),
|
|
13900
|
-
limit: external_exports.number().int().positive().max(500).default(50),
|
|
13901
|
-
offset: external_exports.number().int().min(0).default(0)
|
|
13902
|
-
});
|
|
13903
|
-
analyticsConversationIdParam = external_exports.object({
|
|
13904
|
-
conversationId: external_exports.string().uuid()
|
|
13905
|
-
});
|
|
13906
|
-
messagesQuery = external_exports.object({
|
|
13907
|
-
hub_id: external_exports.string().uuid(),
|
|
13908
|
-
limit: external_exports.string().regex(/^\d+$/).optional(),
|
|
13909
|
-
offset: external_exports.string().regex(/^\d+$/).optional()
|
|
13819
|
+
CONSULT_THREAD_STATUSES = ["open", "awaiting", "resolved", "cancelled_at_close"];
|
|
13820
|
+
consultThreadStatus = external_exports.enum(CONSULT_THREAD_STATUSES);
|
|
13821
|
+
CONSULT_THREAD_TITLE_MAX = 120;
|
|
13822
|
+
consultThreadTitle = external_exports.string().trim().min(1).max(CONSULT_THREAD_TITLE_MAX);
|
|
13823
|
+
consultThreadSummary = external_exports.object({
|
|
13824
|
+
consult_thread_id: external_exports.string(),
|
|
13825
|
+
conversation_id: external_exports.string(),
|
|
13826
|
+
initiator_type: external_exports.enum(["team", "agent"]),
|
|
13827
|
+
initiator_id: external_exports.string(),
|
|
13828
|
+
engaged_agent_id: external_exports.string().nullable(),
|
|
13829
|
+
engaged_agent_name: external_exports.string().nullable(),
|
|
13830
|
+
title: external_exports.string().nullable(),
|
|
13831
|
+
status: consultThreadStatus,
|
|
13832
|
+
created_at: external_exports.string()
|
|
13910
13833
|
});
|
|
13911
|
-
|
|
13834
|
+
listConsultThreadsQuery = external_exports.object({
|
|
13912
13835
|
hub_id: external_exports.string().uuid()
|
|
13913
13836
|
});
|
|
13914
|
-
|
|
13915
|
-
|
|
13916
|
-
periodicity: external_exports.enum(["daily", "weekly", "monthly", "yearly"]),
|
|
13917
|
-
time_interval: external_exports.object({
|
|
13918
|
-
start: external_exports.string(),
|
|
13919
|
-
end: external_exports.string()
|
|
13920
|
-
}),
|
|
13921
|
-
trend_analysis: external_exports.boolean(),
|
|
13922
|
-
filters: external_exports.array(filterValueSchema).optional(),
|
|
13923
|
-
selected_variables: external_exports.array(external_exports.string()),
|
|
13924
|
-
include_summary: external_exports.boolean().optional(),
|
|
13925
|
-
include_variables: external_exports.boolean().optional(),
|
|
13926
|
-
variable_origin: external_exports.enum(["agent", "system", "annotation"]).optional(),
|
|
13927
|
-
variable_category: external_exports.string().optional(),
|
|
13928
|
-
variables_only: external_exports.boolean().optional()
|
|
13929
|
-
});
|
|
13930
|
-
structuredQueryBody = external_exports.object({
|
|
13931
|
-
hub_id: external_exports.string().uuid(),
|
|
13932
|
-
metrics: external_exports.array(external_exports.object({
|
|
13933
|
-
column: external_exports.string(),
|
|
13934
|
-
aggregation: external_exports.enum(STRUCTURED_QUERY_AGGREGATIONS),
|
|
13935
|
-
alias: external_exports.string().optional(),
|
|
13936
|
-
corr_with: external_exports.string().optional(),
|
|
13937
|
-
quantile_level: external_exports.number().min(0).max(1).optional()
|
|
13938
|
-
})).min(1),
|
|
13939
|
-
group_by: external_exports.array(external_exports.string()).optional(),
|
|
13940
|
-
order_by: external_exports.array(external_exports.object({
|
|
13941
|
-
column: external_exports.string(),
|
|
13942
|
-
direction: external_exports.enum(["asc", "desc"]).optional()
|
|
13943
|
-
})).optional(),
|
|
13944
|
-
filters: external_exports.array(external_exports.object({
|
|
13945
|
-
column: external_exports.string(),
|
|
13946
|
-
operator: external_exports.enum(STRUCTURED_QUERY_OPS),
|
|
13947
|
-
value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()])
|
|
13948
|
-
})).optional(),
|
|
13949
|
-
time_range: external_exports.object({
|
|
13950
|
-
start: external_exports.string(),
|
|
13951
|
-
end: external_exports.string()
|
|
13952
|
-
}).optional(),
|
|
13953
|
-
limit: external_exports.number().int().positive().max(1e4).optional()
|
|
13954
|
-
});
|
|
13955
|
-
analyticsSqlBody = external_exports.object({
|
|
13956
|
-
hub_id: external_exports.string().uuid(),
|
|
13957
|
-
// Hard size cap before the validator runs — keeps lex/parse work bounded.
|
|
13958
|
-
sql: external_exports.string().min(1).max(8e3),
|
|
13959
|
-
limit: external_exports.number().int().positive().max(1e4).optional()
|
|
13837
|
+
listConsultThreadsResponse = external_exports.object({
|
|
13838
|
+
threads: external_exports.array(consultThreadSummary)
|
|
13960
13839
|
});
|
|
13961
|
-
|
|
13962
|
-
analyticsSqlSchemaQuery = external_exports.object({
|
|
13840
|
+
createConsultThreadBody = external_exports.object({
|
|
13963
13841
|
hub_id: external_exports.string().uuid(),
|
|
13964
|
-
|
|
13965
|
-
|
|
13842
|
+
title: consultThreadTitle.optional(),
|
|
13843
|
+
// Optionally engage a consultant on creation. Validated server-side against the
|
|
13844
|
+
// hub's `consultant`-role agents; a non-consultant / unknown id is rejected.
|
|
13845
|
+
engaged_agent_id: external_exports.string().uuid().optional()
|
|
13966
13846
|
});
|
|
13967
|
-
|
|
13968
|
-
|
|
13969
|
-
|
|
13970
|
-
// ../../packages/core/dist/chunk-UEJOG2Q7.js
|
|
13971
|
-
var archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams;
|
|
13972
|
-
var init_chunk_UEJOG2Q7 = __esm({
|
|
13973
|
-
"../../packages/core/dist/chunk-UEJOG2Q7.js"() {
|
|
13974
|
-
"use strict";
|
|
13975
|
-
init_zod();
|
|
13976
|
-
archiveHubIdParam = external_exports.object({
|
|
13977
|
-
hubId: external_exports.string().uuid()
|
|
13847
|
+
createConsultThreadResponse = external_exports.object({
|
|
13848
|
+
thread: consultThreadSummary
|
|
13978
13849
|
});
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
|
|
13850
|
+
consultThreadIdParam = external_exports.object({
|
|
13851
|
+
id: external_exports.string().uuid(),
|
|
13852
|
+
threadId: external_exports.string().uuid()
|
|
13982
13853
|
});
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
|
|
13986
|
-
|
|
13987
|
-
|
|
13988
|
-
|
|
13854
|
+
updateConsultThreadBody = external_exports.object({
|
|
13855
|
+
hub_id: external_exports.string().uuid(),
|
|
13856
|
+
title: consultThreadTitle.optional(),
|
|
13857
|
+
engaged_agent_id: external_exports.string().uuid().optional()
|
|
13858
|
+
}).refine((v) => v.title !== void 0 || v.engaged_agent_id !== void 0, {
|
|
13859
|
+
message: "Provide a title and/or an engaged_agent_id to update"
|
|
13989
13860
|
});
|
|
13990
|
-
|
|
13991
|
-
|
|
13861
|
+
updateConsultThreadResponse = external_exports.object({
|
|
13862
|
+
thread: consultThreadSummary
|
|
13992
13863
|
});
|
|
13864
|
+
CONSULT_AWAIT_TIMEOUT_MS = 15 * 6e4;
|
|
13993
13865
|
}
|
|
13994
13866
|
});
|
|
13995
13867
|
|
|
@@ -14101,13 +13973,13 @@ var init_chunk_LQY2OCQL = __esm({
|
|
|
14101
13973
|
}
|
|
14102
13974
|
});
|
|
14103
13975
|
|
|
14104
|
-
// ../../packages/core/dist/chunk-
|
|
13976
|
+
// ../../packages/core/dist/chunk-3TKJNWDS.js
|
|
14105
13977
|
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;
|
|
14106
|
-
var
|
|
14107
|
-
"../../packages/core/dist/chunk-
|
|
13978
|
+
var init_chunk_3TKJNWDS = __esm({
|
|
13979
|
+
"../../packages/core/dist/chunk-3TKJNWDS.js"() {
|
|
14108
13980
|
"use strict";
|
|
14109
13981
|
init_chunk_LQY2OCQL();
|
|
14110
|
-
|
|
13982
|
+
init_chunk_VU7E2RFY();
|
|
14111
13983
|
init_chunk_3HSB6J4J();
|
|
14112
13984
|
init_chunk_5XEJSR22();
|
|
14113
13985
|
init_chunk_WNLWNFHH();
|
|
@@ -14358,6 +14230,118 @@ var init_chunk_YWZFB34T = __esm({
|
|
|
14358
14230
|
}
|
|
14359
14231
|
});
|
|
14360
14232
|
|
|
14233
|
+
// ../../packages/core/dist/chunk-7CYHPF35.js
|
|
14234
|
+
var appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse;
|
|
14235
|
+
var init_chunk_7CYHPF35 = __esm({
|
|
14236
|
+
"../../packages/core/dist/chunk-7CYHPF35.js"() {
|
|
14237
|
+
"use strict";
|
|
14238
|
+
init_chunk_HZ6CADSY();
|
|
14239
|
+
init_zod();
|
|
14240
|
+
appMessageSenderType = external_exports.enum(["user", "team"]);
|
|
14241
|
+
appMessageReceiverType = external_exports.enum(["user", "team", "agent", "assistant"]).transform((v) => v === "assistant" ? "agent" : v);
|
|
14242
|
+
apiChannelMessage = external_exports.object({
|
|
14243
|
+
text: clientOptionalString,
|
|
14244
|
+
attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0)
|
|
14245
|
+
}).refine((m) => m.text && m.text.length > 0 || m.attachments && m.attachments.length > 0, {
|
|
14246
|
+
message: "message must have text or at least one attachment"
|
|
14247
|
+
});
|
|
14248
|
+
apiChannelMessageBody = external_exports.object({
|
|
14249
|
+
// Correlation id (task hubs): new → new conversation, repeat → continue. min 1 so an
|
|
14250
|
+
// empty string can't masquerade as a ref. Mutually exclusive with conversation_id.
|
|
14251
|
+
external_ref: external_exports.string().min(1).max(256).optional(),
|
|
14252
|
+
// Continue a specific WayAI conversation (authorized against the hub/channel + owner).
|
|
14253
|
+
// UUID-validated here (unlike the app channel, whose client we control): allocation
|
|
14254
|
+
// only treats a UUID-shaped id as a provided conversation, so a malformed id would
|
|
14255
|
+
// otherwise skip the owner guard and silently MINT a new conversation instead of
|
|
14256
|
+
// rejecting. A format 400 is shape-only — not an existence oracle (a valid-but-unknown
|
|
14257
|
+
// UUID still collapses to the opaque authorization error downstream).
|
|
14258
|
+
conversation_id: external_exports.string().uuid().optional(),
|
|
14259
|
+
// On-behalf-of end-user identity. Absent → per-connection service principal (task-hub
|
|
14260
|
+
// only; chat hub rejects with 422 in the route).
|
|
14261
|
+
user: external_exports.object({
|
|
14262
|
+
id: external_exports.string().min(1),
|
|
14263
|
+
email: clientOptionalString,
|
|
14264
|
+
name: clientOptionalString
|
|
14265
|
+
}).optional(),
|
|
14266
|
+
message: apiChannelMessage,
|
|
14267
|
+
// Idempotency key: maps to channel_message_sid, deduped within one conversation
|
|
14268
|
+
// (ConversationDO.storeMessage). A retried POST resolves to the same conversation (a chat
|
|
14269
|
+
// hub's user, the external_ref, the conversation_id, or on a task hub with neither, this key
|
|
14270
|
+
// scoped by the sender), so it echoes the original message_id and skips billing / turn
|
|
14271
|
+
// dispatch. A failed store answers a retryable 503 only when this key is set; without it a
|
|
14272
|
+
// retry could store the message twice, so it answers 400.
|
|
14273
|
+
client_message_id: external_exports.string().min(1).max(256).optional()
|
|
14274
|
+
}).refine((b) => !(b.external_ref && b.conversation_id), {
|
|
14275
|
+
message: "provide external_ref or conversation_id, not both",
|
|
14276
|
+
path: ["external_ref"]
|
|
14277
|
+
});
|
|
14278
|
+
appMessageBody = external_exports.object({
|
|
14279
|
+
// Message content — three historical aliases. All optional: an attachment-only
|
|
14280
|
+
// or voice-only message carries no text.
|
|
14281
|
+
content: clientOptionalString,
|
|
14282
|
+
message_text: clientOptionalString,
|
|
14283
|
+
message_body: clientOptionalString,
|
|
14284
|
+
// Conversation context. Ids are plain strings rather than `.uuid()` on purpose:
|
|
14285
|
+
// they are AUTHORIZED downstream, which is the stronger guarantee — a well-formed
|
|
14286
|
+
// uuid belonging to another tenant must fail just as hard as junk. `hub_id` is
|
|
14287
|
+
// gated by `assertHubEndUserAccess` (gh #3286) and `conversation_id` by HubDO's
|
|
14288
|
+
// conversation_index owner check (gh #2781, #3281). The route's own falsy guards
|
|
14289
|
+
// ('hub_id is required') still reject an empty one.
|
|
14290
|
+
hub_id: clientOptionalString,
|
|
14291
|
+
channel_id: clientOptionalString,
|
|
14292
|
+
conversation_id: clientOptionalString,
|
|
14293
|
+
hub_type: external_exports.enum(["chat", "task"]).nullish().transform((v) => v ?? void 0),
|
|
14294
|
+
// Stable idempotency key for one explicit task-hub launcher. HubDO scopes it
|
|
14295
|
+
// to the authenticated user and resolves retries/tabs to one conversation.
|
|
14296
|
+
task_start_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
|
|
14297
|
+
// Routing.
|
|
14298
|
+
sender_type: appMessageSenderType.nullish().transform((v) => v ?? void 0),
|
|
14299
|
+
receiver_type: appMessageReceiverType.nullish().transform((v) => v ?? void 0),
|
|
14300
|
+
// Only meaningful on a team send, where `validateAppTeamSendContext` proves the
|
|
14301
|
+
// caller may send to this receiver. Absent on a team send to a conversation with no
|
|
14302
|
+
// person, which names its `conversation_id` instead. The end-user branch ignores it —
|
|
14303
|
+
// see the receiver derivation in the route.
|
|
14304
|
+
user_receiver_id: clientOptionalString,
|
|
14305
|
+
// ── Internal consult (consultant-agents PR 2 — H1.0) ──────────────────────
|
|
14306
|
+
// A team member handling a customer conversation can tag a `consultant`-role
|
|
14307
|
+
// agent for a PRIVATE, team-only exchange that never reaches the customer. A
|
|
14308
|
+
// consult send is a team send with `receiver_type: 'agent'` targeting the
|
|
14309
|
+
// consultant; `user_receiver_id` identifies the customer whose conversation this is
|
|
14310
|
+
// (and is authorized by `validateAppTeamSendContext`, exactly as a team→user send is),
|
|
14311
|
+
// and is absent, as on a team→user send, when the conversation has no person. The consultant is resolved from `agent_receiver_id`
|
|
14312
|
+
// when supplied, else from an `@mention` parsed out of the message text against
|
|
14313
|
+
// the hub's consultant agents. `consult_thread_id` continues an existing thread;
|
|
14314
|
+
// absent, the route creates/reuses the single implicit thread. These fields are
|
|
14315
|
+
// inert on every non-consult send (end-user send, team→user send).
|
|
14316
|
+
agent_receiver_id: clientOptionalString,
|
|
14317
|
+
consult_thread_id: clientOptionalString,
|
|
14318
|
+
is_first_message: clientOptionalBoolean,
|
|
14319
|
+
end_conversation: clientOptionalBoolean,
|
|
14320
|
+
// Pre-generated by the client so the optimistic bubble and the stored row share
|
|
14321
|
+
// a key (transcription live-updates land on the same row instead of duplicating).
|
|
14322
|
+
message_id: clientOptionalString,
|
|
14323
|
+
attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0),
|
|
14324
|
+
// Base64-encoded audio for STT. Size-capped in the route (the cap is a byte
|
|
14325
|
+
// budget tied to the /channels/* bodyLimit, not a shape rule).
|
|
14326
|
+
audio_file: clientOptionalString
|
|
14327
|
+
});
|
|
14328
|
+
appMessageResponse = external_exports.object({
|
|
14329
|
+
success: external_exports.boolean(),
|
|
14330
|
+
message: external_exports.string(),
|
|
14331
|
+
result: external_exports.object({
|
|
14332
|
+
conversation_id: external_exports.string().optional(),
|
|
14333
|
+
message_id: external_exports.string().optional(),
|
|
14334
|
+
status: external_exports.string().optional(),
|
|
14335
|
+
files: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).optional(),
|
|
14336
|
+
// True when this request reused a task-start/message id already accepted by
|
|
14337
|
+
// the server. Clients must replace their optimistic payload with a fresh
|
|
14338
|
+
// authoritative read because another tab may have won with different text.
|
|
14339
|
+
deduped: external_exports.boolean().optional()
|
|
14340
|
+
}).optional()
|
|
14341
|
+
});
|
|
14342
|
+
}
|
|
14343
|
+
});
|
|
14344
|
+
|
|
14361
14345
|
// ../../packages/core/dist/chunk-NVKU5PPQ.js
|
|
14362
14346
|
var ADMIN_SKILL_NAME_REGEX, adminSkillNameParam;
|
|
14363
14347
|
var init_chunk_NVKU5PPQ = __esm({
|
|
@@ -14521,7 +14505,7 @@ var init_chunk_OMPT4ZHR = __esm({
|
|
|
14521
14505
|
}
|
|
14522
14506
|
});
|
|
14523
14507
|
|
|
14524
|
-
// ../../packages/core/dist/chunk-
|
|
14508
|
+
// ../../packages/core/dist/chunk-6KBLVPN6.js
|
|
14525
14509
|
function refineScopedTarget(data, ctx) {
|
|
14526
14510
|
if (data.scope === "org") {
|
|
14527
14511
|
if (!data.org_id) {
|
|
@@ -14547,13 +14531,13 @@ function refineScopedTarget(data, ctx) {
|
|
|
14547
14531
|
}
|
|
14548
14532
|
}
|
|
14549
14533
|
var adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, AUTOMATION_GATE_EVALUATIONS_PER_OPERATION_BOUND, automationGateEvaluationsPerOperation, AUTOMATION_RUN_RETENTION_DAYS_MAX, automationRunRetentionDays, turnDeadlineSeconds, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, adminRepairKnowledgeBlobsBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, dataExplorerDebugCountsDoType, dataExplorerDebugCountsParam, debugHubConvParam, debugMessageIdQuery;
|
|
14550
|
-
var
|
|
14551
|
-
"../../packages/core/dist/chunk-
|
|
14534
|
+
var init_chunk_6KBLVPN6 = __esm({
|
|
14535
|
+
"../../packages/core/dist/chunk-6KBLVPN6.js"() {
|
|
14552
14536
|
"use strict";
|
|
14553
14537
|
init_chunk_FECLIZTY();
|
|
14554
14538
|
init_chunk_BFG4ZWR4();
|
|
14555
14539
|
init_chunk_YZAIZJTO();
|
|
14556
|
-
|
|
14540
|
+
init_chunk_USFRRP7E();
|
|
14557
14541
|
init_chunk_OMPT4ZHR();
|
|
14558
14542
|
init_chunk_HZ6CADSY();
|
|
14559
14543
|
init_chunk_MIWZOSPI();
|
|
@@ -14895,6 +14879,143 @@ var init_chunk_I5J3BRUB = __esm({
|
|
|
14895
14879
|
}
|
|
14896
14880
|
});
|
|
14897
14881
|
|
|
14882
|
+
// ../../packages/core/dist/chunk-2PZIF56U.js
|
|
14883
|
+
var analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlTable, analyticsSqlSchemaQuery;
|
|
14884
|
+
var init_chunk_2PZIF56U = __esm({
|
|
14885
|
+
"../../packages/core/dist/chunk-2PZIF56U.js"() {
|
|
14886
|
+
"use strict";
|
|
14887
|
+
init_zod();
|
|
14888
|
+
analyticsHubIdParam = external_exports.object({
|
|
14889
|
+
hubId: external_exports.string().uuid()
|
|
14890
|
+
});
|
|
14891
|
+
analyticsVariableIdParam = external_exports.object({
|
|
14892
|
+
variableId: external_exports.string().uuid()
|
|
14893
|
+
});
|
|
14894
|
+
updateVariablePinBody = external_exports.object({
|
|
14895
|
+
pin: external_exports.union([external_exports.boolean(), external_exports.string()])
|
|
14896
|
+
});
|
|
14897
|
+
updateAnalyticsViewBody = external_exports.object({
|
|
14898
|
+
// 64 covers UUIDs (36) and the `sys:{name}` synthetic IDs for system variables.
|
|
14899
|
+
selected_variable_ids: external_exports.array(external_exports.string().min(1).max(64)).max(200)
|
|
14900
|
+
});
|
|
14901
|
+
NUMERIC_FILTER_OPS = ["eq", "neq", "gt", "gte", "lt", "lte"];
|
|
14902
|
+
TEXT_FILTER_OPS = ["equals", "not_equals", "contains", "not_contains", "starts_with", "ends_with"];
|
|
14903
|
+
CATEGORICAL_FILTER_OPS = ["is", "is_not", "in", "not_in"];
|
|
14904
|
+
VARIABLE_FILTER_OPS = [
|
|
14905
|
+
...NUMERIC_FILTER_OPS,
|
|
14906
|
+
...TEXT_FILTER_OPS,
|
|
14907
|
+
...CATEGORICAL_FILTER_OPS
|
|
14908
|
+
];
|
|
14909
|
+
STRUCTURED_QUERY_OPS = ["eq", "neq", "gt", "gte", "lt", "lte", "in", "not_in", "like"];
|
|
14910
|
+
STRUCTURED_QUERY_AGGREGATIONS = ["avg", "sum", "min", "max", "count", "quantile", "stddevPop", "corr", "uniq"];
|
|
14911
|
+
filterValueSchema = external_exports.object({
|
|
14912
|
+
variable_id: external_exports.string(),
|
|
14913
|
+
filter_type: external_exports.enum(VARIABLE_FILTER_OPS),
|
|
14914
|
+
filter_value: external_exports.union([external_exports.string(), external_exports.number()])
|
|
14915
|
+
});
|
|
14916
|
+
conversationsBody = external_exports.object({
|
|
14917
|
+
hub_id: external_exports.string().uuid(),
|
|
14918
|
+
time_interval: external_exports.object({
|
|
14919
|
+
start: external_exports.string().optional(),
|
|
14920
|
+
end: external_exports.string().optional()
|
|
14921
|
+
}).optional(),
|
|
14922
|
+
filters: external_exports.array(filterValueSchema).optional(),
|
|
14923
|
+
limit: external_exports.number().int().positive().max(500).default(50),
|
|
14924
|
+
offset: external_exports.number().int().min(0).default(0)
|
|
14925
|
+
});
|
|
14926
|
+
analyticsConversationIdParam = external_exports.object({
|
|
14927
|
+
conversationId: external_exports.string().uuid()
|
|
14928
|
+
});
|
|
14929
|
+
messagesQuery = external_exports.object({
|
|
14930
|
+
hub_id: external_exports.string().uuid(),
|
|
14931
|
+
limit: external_exports.string().regex(/^\d+$/).optional(),
|
|
14932
|
+
offset: external_exports.string().regex(/^\d+$/).optional()
|
|
14933
|
+
});
|
|
14934
|
+
conversationDetailDataQuery = external_exports.object({
|
|
14935
|
+
hub_id: external_exports.string().uuid()
|
|
14936
|
+
});
|
|
14937
|
+
analyticsDataBody = external_exports.object({
|
|
14938
|
+
hub_id: external_exports.string().uuid(),
|
|
14939
|
+
periodicity: external_exports.enum(["daily", "weekly", "monthly", "yearly"]),
|
|
14940
|
+
time_interval: external_exports.object({
|
|
14941
|
+
start: external_exports.string(),
|
|
14942
|
+
end: external_exports.string()
|
|
14943
|
+
}),
|
|
14944
|
+
trend_analysis: external_exports.boolean(),
|
|
14945
|
+
filters: external_exports.array(filterValueSchema).optional(),
|
|
14946
|
+
selected_variables: external_exports.array(external_exports.string()),
|
|
14947
|
+
include_summary: external_exports.boolean().optional(),
|
|
14948
|
+
include_variables: external_exports.boolean().optional(),
|
|
14949
|
+
variable_origin: external_exports.enum(["agent", "system", "annotation"]).optional(),
|
|
14950
|
+
variable_category: external_exports.string().optional(),
|
|
14951
|
+
variables_only: external_exports.boolean().optional()
|
|
14952
|
+
});
|
|
14953
|
+
structuredQueryBody = external_exports.object({
|
|
14954
|
+
hub_id: external_exports.string().uuid(),
|
|
14955
|
+
metrics: external_exports.array(external_exports.object({
|
|
14956
|
+
column: external_exports.string(),
|
|
14957
|
+
aggregation: external_exports.enum(STRUCTURED_QUERY_AGGREGATIONS),
|
|
14958
|
+
alias: external_exports.string().optional(),
|
|
14959
|
+
corr_with: external_exports.string().optional(),
|
|
14960
|
+
quantile_level: external_exports.number().min(0).max(1).optional()
|
|
14961
|
+
})).min(1),
|
|
14962
|
+
group_by: external_exports.array(external_exports.string()).optional(),
|
|
14963
|
+
order_by: external_exports.array(external_exports.object({
|
|
14964
|
+
column: external_exports.string(),
|
|
14965
|
+
direction: external_exports.enum(["asc", "desc"]).optional()
|
|
14966
|
+
})).optional(),
|
|
14967
|
+
filters: external_exports.array(external_exports.object({
|
|
14968
|
+
column: external_exports.string(),
|
|
14969
|
+
operator: external_exports.enum(STRUCTURED_QUERY_OPS),
|
|
14970
|
+
value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()])
|
|
14971
|
+
})).optional(),
|
|
14972
|
+
time_range: external_exports.object({
|
|
14973
|
+
start: external_exports.string(),
|
|
14974
|
+
end: external_exports.string()
|
|
14975
|
+
}).optional(),
|
|
14976
|
+
limit: external_exports.number().int().positive().max(1e4).optional()
|
|
14977
|
+
});
|
|
14978
|
+
analyticsSqlBody = external_exports.object({
|
|
14979
|
+
hub_id: external_exports.string().uuid(),
|
|
14980
|
+
// Hard size cap before the validator runs — keeps lex/parse work bounded.
|
|
14981
|
+
sql: external_exports.string().min(1).max(8e3),
|
|
14982
|
+
limit: external_exports.number().int().positive().max(1e4).optional()
|
|
14983
|
+
});
|
|
14984
|
+
analyticsSqlTable = external_exports.enum(["conversation", "message"]);
|
|
14985
|
+
analyticsSqlSchemaQuery = external_exports.object({
|
|
14986
|
+
hub_id: external_exports.string().uuid(),
|
|
14987
|
+
// Defaulted so a client that predates the message table keeps its old response.
|
|
14988
|
+
table: analyticsSqlTable.default("conversation")
|
|
14989
|
+
});
|
|
14990
|
+
}
|
|
14991
|
+
});
|
|
14992
|
+
|
|
14993
|
+
// ../../packages/core/dist/chunk-UEJOG2Q7.js
|
|
14994
|
+
var archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams;
|
|
14995
|
+
var init_chunk_UEJOG2Q7 = __esm({
|
|
14996
|
+
"../../packages/core/dist/chunk-UEJOG2Q7.js"() {
|
|
14997
|
+
"use strict";
|
|
14998
|
+
init_zod();
|
|
14999
|
+
archiveHubIdParam = external_exports.object({
|
|
15000
|
+
hubId: external_exports.string().uuid()
|
|
15001
|
+
});
|
|
15002
|
+
archiveConversationParams = external_exports.object({
|
|
15003
|
+
hubId: external_exports.string().uuid(),
|
|
15004
|
+
conversationId: external_exports.string().uuid()
|
|
15005
|
+
});
|
|
15006
|
+
archiveListQuery = external_exports.object({
|
|
15007
|
+
user_id: external_exports.string().optional(),
|
|
15008
|
+
start: external_exports.string().optional(),
|
|
15009
|
+
end: external_exports.string().optional(),
|
|
15010
|
+
page: external_exports.string().regex(/^\d+$/).optional(),
|
|
15011
|
+
page_size: external_exports.string().regex(/^\d+$/).optional()
|
|
15012
|
+
});
|
|
15013
|
+
archiveMessageObservabilityParams = archiveConversationParams.extend({
|
|
15014
|
+
messageId: external_exports.string().uuid()
|
|
15015
|
+
});
|
|
15016
|
+
}
|
|
15017
|
+
});
|
|
15018
|
+
|
|
14898
15019
|
// ../../packages/core/dist/chunk-SOJMWM63.js
|
|
14899
15020
|
var init_chunk_SOJMWM63 = __esm({
|
|
14900
15021
|
"../../packages/core/dist/chunk-SOJMWM63.js"() {
|
|
@@ -15110,78 +15231,79 @@ var init_chunk_Y66JOKZI = __esm({
|
|
|
15110
15231
|
var init_contracts = __esm({
|
|
15111
15232
|
"../../packages/core/dist/contracts/index.js"() {
|
|
15112
15233
|
"use strict";
|
|
15234
|
+
init_chunk_Q7KIQHAZ();
|
|
15113
15235
|
init_chunk_NKLVUTFO();
|
|
15114
15236
|
init_chunk_GLJSJX5R();
|
|
15115
15237
|
init_chunk_YVY2TZK2();
|
|
15116
15238
|
init_chunk_VXEAR36B();
|
|
15117
15239
|
init_chunk_RACEDHG6();
|
|
15118
|
-
init_chunk_Q7KIQHAZ();
|
|
15119
|
-
init_chunk_ACKF2MVU();
|
|
15120
15240
|
init_chunk_WBFLPPDI();
|
|
15121
15241
|
init_chunk_IPXBFWUU();
|
|
15122
|
-
init_chunk_VZA6NHCH();
|
|
15123
|
-
init_chunk_IPDOHAZ5();
|
|
15124
15242
|
init_chunk_GPM7PE44();
|
|
15125
15243
|
init_chunk_VEERWOZ6();
|
|
15126
15244
|
init_chunk_ZC6YGHNX();
|
|
15127
|
-
|
|
15245
|
+
init_chunk_ACKF2MVU();
|
|
15128
15246
|
init_chunk_ZXK6N2HN();
|
|
15129
15247
|
init_chunk_Y7CFCYX4();
|
|
15130
|
-
init_chunk_VTFFO3RA();
|
|
15131
15248
|
init_chunk_5DGHIY7L();
|
|
15132
15249
|
init_chunk_TUHJ5PQH();
|
|
15133
|
-
|
|
15250
|
+
init_chunk_QZTGWNFB();
|
|
15251
|
+
init_chunk_IPDOHAZ5();
|
|
15134
15252
|
init_chunk_YUZFHVB2();
|
|
15135
15253
|
init_chunk_I3O2RACG();
|
|
15136
15254
|
init_chunk_34LE6P7E();
|
|
15137
|
-
|
|
15255
|
+
init_chunk_FPSDNS2E();
|
|
15138
15256
|
init_chunk_SGYHEHIO();
|
|
15139
15257
|
init_chunk_C4HEZ7ZI();
|
|
15140
15258
|
init_chunk_IR2NOSI3();
|
|
15141
15259
|
init_chunk_EA23LSDS();
|
|
15142
|
-
|
|
15143
|
-
init_chunk_V4FRPRH5();
|
|
15260
|
+
init_chunk_SY6PLCPK();
|
|
15144
15261
|
init_chunk_LWMLR2WI();
|
|
15145
15262
|
init_chunk_ACGAI25T();
|
|
15146
15263
|
init_chunk_MH4O3YEX();
|
|
15147
|
-
|
|
15264
|
+
init_chunk_FKBQSXOY();
|
|
15148
15265
|
init_chunk_KSTYTQ7I();
|
|
15149
|
-
|
|
15150
|
-
init_chunk_7CYHPF35();
|
|
15266
|
+
init_chunk_LKBSHANA();
|
|
15151
15267
|
init_chunk_BPCNB5RT();
|
|
15152
|
-
|
|
15153
|
-
|
|
15268
|
+
init_chunk_BGUEWUAI();
|
|
15269
|
+
init_chunk_HCE5YOBD();
|
|
15270
|
+
init_chunk_BCDGY3GH();
|
|
15271
|
+
init_chunk_3LY5HJUX();
|
|
15154
15272
|
init_chunk_VQIITUAJ();
|
|
15155
15273
|
init_chunk_JDJ4EUOL();
|
|
15156
15274
|
init_chunk_ZLJP22IA();
|
|
15157
15275
|
init_chunk_6IKFJ3GW();
|
|
15158
15276
|
init_chunk_6J742GLA();
|
|
15159
15277
|
init_chunk_ZVXO3XL6();
|
|
15160
|
-
|
|
15161
|
-
|
|
15278
|
+
init_chunk_YULHXJ5M();
|
|
15279
|
+
init_chunk_V4FRPRH5();
|
|
15162
15280
|
init_chunk_JO53JB35();
|
|
15163
|
-
|
|
15281
|
+
init_chunk_3TKJNWDS();
|
|
15164
15282
|
init_chunk_LQY2OCQL();
|
|
15165
|
-
|
|
15283
|
+
init_chunk_VU7E2RFY();
|
|
15166
15284
|
init_chunk_3HSB6J4J();
|
|
15167
15285
|
init_chunk_IG6QBZMA();
|
|
15168
15286
|
init_chunk_YWZFB34T();
|
|
15169
15287
|
init_chunk_PZPOUXJR();
|
|
15170
15288
|
init_chunk_LBDH7LCG();
|
|
15171
15289
|
init_chunk_4LXDRTO4();
|
|
15290
|
+
init_chunk_E4DIIOOE();
|
|
15291
|
+
init_chunk_7CYHPF35();
|
|
15172
15292
|
init_chunk_ILGGO4PT();
|
|
15173
|
-
|
|
15174
|
-
|
|
15293
|
+
init_chunk_5HA6FIE7();
|
|
15294
|
+
init_chunk_SAQNCSQ6();
|
|
15175
15295
|
init_chunk_NVKU5PPQ();
|
|
15176
|
-
|
|
15296
|
+
init_chunk_6KBLVPN6();
|
|
15177
15297
|
init_chunk_FECLIZTY();
|
|
15178
15298
|
init_chunk_BFG4ZWR4();
|
|
15179
15299
|
init_chunk_YZAIZJTO();
|
|
15180
|
-
|
|
15300
|
+
init_chunk_USFRRP7E();
|
|
15181
15301
|
init_chunk_3VHMUK4W();
|
|
15182
15302
|
init_chunk_AMG6HKUQ();
|
|
15183
15303
|
init_chunk_XQBFXSYS();
|
|
15184
15304
|
init_chunk_OMPT4ZHR();
|
|
15305
|
+
init_chunk_2PZIF56U();
|
|
15306
|
+
init_chunk_UEJOG2Q7();
|
|
15185
15307
|
init_chunk_KKA642DR();
|
|
15186
15308
|
init_chunk_SOJMWM63();
|
|
15187
15309
|
init_chunk_WEXVYJ5H();
|
|
@@ -15195,8 +15317,8 @@ var init_contracts = __esm({
|
|
|
15195
15317
|
init_chunk_2ISUBJG7();
|
|
15196
15318
|
init_chunk_C2UEA2KW();
|
|
15197
15319
|
init_chunk_S4VDZ7PZ();
|
|
15198
|
-
init_chunk_CJ3L46X6();
|
|
15199
15320
|
init_chunk_LD6U3CDG();
|
|
15321
|
+
init_chunk_CJ3L46X6();
|
|
15200
15322
|
init_chunk_6TSQ5HXC();
|
|
15201
15323
|
init_chunk_WNLWNFHH();
|
|
15202
15324
|
init_chunk_T7KQKDET();
|
|
@@ -15352,8 +15474,8 @@ var init_dist = __esm({
|
|
|
15352
15474
|
init_chunk_RPGBR5IN();
|
|
15353
15475
|
init_chunk_C2UEA2KW();
|
|
15354
15476
|
init_chunk_S4VDZ7PZ();
|
|
15355
|
-
init_chunk_CJ3L46X6();
|
|
15356
15477
|
init_chunk_LD6U3CDG();
|
|
15478
|
+
init_chunk_CJ3L46X6();
|
|
15357
15479
|
init_chunk_6TSQ5HXC();
|
|
15358
15480
|
init_chunk_WNLWNFHH();
|
|
15359
15481
|
init_chunk_BF4WRSOQ();
|
|
@@ -16425,6 +16547,7 @@ var init_utils = __esm({
|
|
|
16425
16547
|
"alerts",
|
|
16426
16548
|
"communities",
|
|
16427
16549
|
"contacts",
|
|
16550
|
+
"dimensions",
|
|
16428
16551
|
"knowledge"
|
|
16429
16552
|
]);
|
|
16430
16553
|
HELP_AND_VERSION = ["help", "--help", "-h", "--version", "-v"];
|
|
@@ -16433,6 +16556,7 @@ var init_utils = __esm({
|
|
|
16433
16556
|
["push", "all"],
|
|
16434
16557
|
["communities", "all"],
|
|
16435
16558
|
["contacts", "all"],
|
|
16559
|
+
["dimensions", "all"],
|
|
16436
16560
|
["knowledge", "all"],
|
|
16437
16561
|
["use", "selectors"],
|
|
16438
16562
|
["unbind", "selectors"],
|
|
@@ -16974,7 +17098,7 @@ function dataErrorMessage(err) {
|
|
|
16974
17098
|
const message = parsed?.error?.message;
|
|
16975
17099
|
return typeof message === "string" && message ? message : null;
|
|
16976
17100
|
}
|
|
16977
|
-
var RETRYABLE_BACKOFF_MS, delay, courseAuthoring, ApiError, ApiClient;
|
|
17101
|
+
var RETRYABLE_BACKOFF_MS, delay, accessDimensions, courseAuthoring, ApiError, ApiClient;
|
|
16978
17102
|
var init_api_client = __esm({
|
|
16979
17103
|
"src/lib/api-client.ts"() {
|
|
16980
17104
|
"use strict";
|
|
@@ -16984,6 +17108,7 @@ var init_api_client = __esm({
|
|
|
16984
17108
|
init_mask_secrets();
|
|
16985
17109
|
RETRYABLE_BACKOFF_MS = [500, 1e3, 2e3];
|
|
16986
17110
|
delay = (ms) => new Promise((resolve13) => setTimeout(resolve13, ms));
|
|
17111
|
+
accessDimensions = (orgId, dimensionId) => `/api/setup/organizations/${encodeURIComponent(orgId)}/access-dimensions${dimensionId === void 0 ? "" : `/${encodeURIComponent(dimensionId)}`}`;
|
|
16987
17112
|
courseAuthoring = (communityId, courseId) => `/api/communities/${encodeURIComponent(communityId)}/authoring/courses${courseId === void 0 ? "" : `/${encodeURIComponent(courseId)}`}`;
|
|
16988
17113
|
ApiError = class extends Error {
|
|
16989
17114
|
status;
|
|
@@ -17125,6 +17250,23 @@ var init_api_client = __esm({
|
|
|
17125
17250
|
const qs = new URLSearchParams({ organization_id: orgId, base_id: baseId2 });
|
|
17126
17251
|
return this.request("DELETE", `/api/contact-book/contacts/${encodeURIComponent(contactId)}/customer?${qs}`);
|
|
17127
17252
|
}
|
|
17253
|
+
/** An organization's access dimensions, each with every value, retired ones included (#5358). */
|
|
17254
|
+
async listAccessDimensions(orgId) {
|
|
17255
|
+
return this.request("GET", accessDimensions(orgId));
|
|
17256
|
+
}
|
|
17257
|
+
async createAccessDimension(orgId, body) {
|
|
17258
|
+
return this.request("POST", accessDimensions(orgId), body);
|
|
17259
|
+
}
|
|
17260
|
+
async relabelAccessDimension(orgId, dimensionId, label) {
|
|
17261
|
+
return this.request("PATCH", accessDimensions(orgId, dimensionId), { label });
|
|
17262
|
+
}
|
|
17263
|
+
async createAccessValue(orgId, dimensionId, body) {
|
|
17264
|
+
return this.request("POST", `${accessDimensions(orgId, dimensionId)}/values`, body);
|
|
17265
|
+
}
|
|
17266
|
+
/** Relabel, retire or restore a value; a value is never deleted. */
|
|
17267
|
+
async updateAccessValue(orgId, dimensionId, valueId, body) {
|
|
17268
|
+
return this.request("PATCH", `${accessDimensions(orgId, dimensionId)}/values/${encodeURIComponent(valueId)}`, body);
|
|
17269
|
+
}
|
|
17128
17270
|
async listOrgCommunities(orgId) {
|
|
17129
17271
|
return this.request("GET", `/api/communities/orgs/${encodeURIComponent(orgId)}`);
|
|
17130
17272
|
}
|
|
@@ -28020,9 +28162,9 @@ async function conversationsCommand(args2) {
|
|
|
28020
28162
|
if (result.partial || result.hubs_queried === 0) process.exit(1);
|
|
28021
28163
|
return;
|
|
28022
28164
|
}
|
|
28023
|
-
for (const
|
|
28024
|
-
const where =
|
|
28025
|
-
console.error(`Could not read ${where}: ${sanitizeTerminalText(
|
|
28165
|
+
for (const failure3 of result.errors) {
|
|
28166
|
+
const where = failure3.scope_kind === "hub" ? `hub ${sanitizeTerminalText(failure3.hub_name || failure3.hub_id || "")} (${failure3.hub_id})` : `organization ${failure3.organization_id}`;
|
|
28167
|
+
console.error(`Could not read ${where}: ${sanitizeTerminalText(failure3.error)}`);
|
|
28026
28168
|
}
|
|
28027
28169
|
if (result.hubs_queried === 0) {
|
|
28028
28170
|
console.error(
|
|
@@ -33664,6 +33806,167 @@ token (\`wayai login --token\`, or WAYAI_TOKEN) is refused.
|
|
|
33664
33806
|
}
|
|
33665
33807
|
});
|
|
33666
33808
|
|
|
33809
|
+
// src/commands/dimensions.ts
|
|
33810
|
+
var dimensions_exports = {};
|
|
33811
|
+
__export(dimensions_exports, {
|
|
33812
|
+
dimensionsCommand: () => dimensionsCommand
|
|
33813
|
+
});
|
|
33814
|
+
import { parseArgs as parseArgs23 } from "util";
|
|
33815
|
+
function usageError3(message) {
|
|
33816
|
+
return expected(`${message}
|
|
33817
|
+
|
|
33818
|
+
${USAGE4}`);
|
|
33819
|
+
}
|
|
33820
|
+
function parse3(args2) {
|
|
33821
|
+
try {
|
|
33822
|
+
return parseArgs23({
|
|
33823
|
+
args: args2,
|
|
33824
|
+
options: {
|
|
33825
|
+
org: { type: "string" },
|
|
33826
|
+
label: { type: "string" },
|
|
33827
|
+
json: { type: "boolean" }
|
|
33828
|
+
},
|
|
33829
|
+
allowPositionals: true,
|
|
33830
|
+
strict: true
|
|
33831
|
+
});
|
|
33832
|
+
} catch (err) {
|
|
33833
|
+
throw usageError3(err instanceof Error ? err.message : String(err));
|
|
33834
|
+
}
|
|
33835
|
+
}
|
|
33836
|
+
function resolveOrgId3(flag) {
|
|
33837
|
+
if (flag !== void 0) {
|
|
33838
|
+
if (!UUID_RE3.test(flag)) throw expected(`Invalid --org ${JSON.stringify(flag)}: expected an organization id (a UUID).`);
|
|
33839
|
+
return flag;
|
|
33840
|
+
}
|
|
33841
|
+
const bound = readRepoConfigUnlessBlocked()?.organization_id;
|
|
33842
|
+
if (bound) return bound;
|
|
33843
|
+
throw expected("No organization: pass --org <org_id>, or run this inside a workspace scoped with `wayai init`.");
|
|
33844
|
+
}
|
|
33845
|
+
function failure2(err) {
|
|
33846
|
+
if (err instanceof ApiError && err.isExpected) return expected(sanitizeTerminalText(extractApiMessage(err)));
|
|
33847
|
+
return err;
|
|
33848
|
+
}
|
|
33849
|
+
async function dimensionsCommand(args2) {
|
|
33850
|
+
if (wantsHelp(args2) || args2.length === 0) {
|
|
33851
|
+
console.log(USAGE4);
|
|
33852
|
+
return;
|
|
33853
|
+
}
|
|
33854
|
+
const { values, positionals } = parse3(args2);
|
|
33855
|
+
const [sub, ...ids] = positionals;
|
|
33856
|
+
if (!SUBCOMMANDS3.includes(sub)) throw usageError3(`Unknown subcommand ${JSON.stringify(sub)}.`);
|
|
33857
|
+
const shape = SHAPE[sub];
|
|
33858
|
+
if (ids.length !== shape.ids) {
|
|
33859
|
+
throw usageError3(`${sub} takes ${shape.ids === 0 ? "no arguments" : shape.ids === 1 ? "a <dimension>" : "a <dimension> and a <value>"}.`);
|
|
33860
|
+
}
|
|
33861
|
+
if (shape.label && values.label === void 0) throw usageError3(`${sub} needs --label <label>.`);
|
|
33862
|
+
if (!shape.label && values.label !== void 0) throw usageError3(`--label does not apply to ${sub}.`);
|
|
33863
|
+
const orgId = resolveOrgId3(values.org);
|
|
33864
|
+
const [dimensionId, valueId] = ids;
|
|
33865
|
+
const label = values.label;
|
|
33866
|
+
const { config, accessToken } = await requireAuth();
|
|
33867
|
+
const api = new ApiClient({ apiUrl: config.api_url, accessToken, onUnauthorized: () => getAccessToken(config) });
|
|
33868
|
+
let data;
|
|
33869
|
+
let done = "";
|
|
33870
|
+
try {
|
|
33871
|
+
switch (sub) {
|
|
33872
|
+
case "list": {
|
|
33873
|
+
const { data: dimensions } = await api.listAccessDimensions(orgId);
|
|
33874
|
+
if (values.json) {
|
|
33875
|
+
console.log(JSON.stringify(dimensions, null, 2));
|
|
33876
|
+
return;
|
|
33877
|
+
}
|
|
33878
|
+
if (dimensions.length === 0) {
|
|
33879
|
+
console.log(`Organization ${orgId} defines no access dimensions.`);
|
|
33880
|
+
return;
|
|
33881
|
+
}
|
|
33882
|
+
for (const dimension of dimensions) {
|
|
33883
|
+
console.log(`${sanitizeTerminalText(dimension.dimension_id)} ${sanitizeTerminalText(dimension.label)}`);
|
|
33884
|
+
for (const value of dimension.values) {
|
|
33885
|
+
const retired = value.retired_at ? " (retired)" : "";
|
|
33886
|
+
console.log(` ${sanitizeTerminalText(value.value_id)} ${sanitizeTerminalText(value.label)}${retired}`);
|
|
33887
|
+
}
|
|
33888
|
+
}
|
|
33889
|
+
return;
|
|
33890
|
+
}
|
|
33891
|
+
case "create":
|
|
33892
|
+
({ data } = await api.createAccessDimension(orgId, { dimension_id: dimensionId, label }));
|
|
33893
|
+
done = `Created dimension ${dimensionId}.`;
|
|
33894
|
+
break;
|
|
33895
|
+
case "relabel":
|
|
33896
|
+
({ data } = await api.relabelAccessDimension(orgId, dimensionId, label));
|
|
33897
|
+
done = `Relabelled dimension ${dimensionId}.`;
|
|
33898
|
+
break;
|
|
33899
|
+
case "add-value":
|
|
33900
|
+
({ data } = await api.createAccessValue(orgId, dimensionId, { value_id: valueId, label }));
|
|
33901
|
+
done = `Added value ${valueId} to dimension ${dimensionId}.`;
|
|
33902
|
+
break;
|
|
33903
|
+
case "relabel-value":
|
|
33904
|
+
({ data } = await api.updateAccessValue(orgId, dimensionId, valueId, { label }));
|
|
33905
|
+
done = `Relabelled value ${valueId} of dimension ${dimensionId}.`;
|
|
33906
|
+
break;
|
|
33907
|
+
case "retire-value":
|
|
33908
|
+
({ data } = await api.updateAccessValue(orgId, dimensionId, valueId, { retired: true }));
|
|
33909
|
+
done = `Retired value ${valueId} of dimension ${dimensionId}: it can no longer be assigned, and records holding it still match.`;
|
|
33910
|
+
break;
|
|
33911
|
+
case "restore-value":
|
|
33912
|
+
({ data } = await api.updateAccessValue(orgId, dimensionId, valueId, { retired: false }));
|
|
33913
|
+
done = `Restored value ${valueId} of dimension ${dimensionId}.`;
|
|
33914
|
+
break;
|
|
33915
|
+
}
|
|
33916
|
+
} catch (err) {
|
|
33917
|
+
throw failure2(err);
|
|
33918
|
+
}
|
|
33919
|
+
console.log(values.json ? JSON.stringify(data, null, 2) : sanitizeTerminalText(done));
|
|
33920
|
+
}
|
|
33921
|
+
var USAGE4, SUBCOMMANDS3, SHAPE;
|
|
33922
|
+
var init_dimensions = __esm({
|
|
33923
|
+
"src/commands/dimensions.ts"() {
|
|
33924
|
+
"use strict";
|
|
33925
|
+
init_auth();
|
|
33926
|
+
init_api_client();
|
|
33927
|
+
init_errors2();
|
|
33928
|
+
init_expected();
|
|
33929
|
+
init_repo_config();
|
|
33930
|
+
init_terminal_output();
|
|
33931
|
+
init_utils();
|
|
33932
|
+
init_contracts();
|
|
33933
|
+
USAGE4 = `
|
|
33934
|
+
wayai dimensions \u2014 an organization's access dimensions and their values
|
|
33935
|
+
|
|
33936
|
+
Usage:
|
|
33937
|
+
wayai dimensions list [--org <org_id>] [--json]
|
|
33938
|
+
wayai dimensions create <dimension> --label <label> [--org <org_id>] [--json]
|
|
33939
|
+
wayai dimensions relabel <dimension> --label <label> [--org <org_id>] [--json]
|
|
33940
|
+
wayai dimensions add-value <dimension> <value> --label <label> [--org <org_id>] [--json]
|
|
33941
|
+
wayai dimensions relabel-value <dimension> <value> --label <label> [--org <org_id>] [--json]
|
|
33942
|
+
wayai dimensions retire-value <dimension> <value> [--org <org_id>] [--json]
|
|
33943
|
+
wayai dimensions restore-value <dimension> <value> [--org <org_id>] [--json]
|
|
33944
|
+
|
|
33945
|
+
A record type in one of the organization's bases names a dimension in its x-access
|
|
33946
|
+
declaration (for example "class"). Once that declaration can be enforced, a call will
|
|
33947
|
+
reach only the records whose value (for example "7A") is among the caller's; nothing
|
|
33948
|
+
filters any record yet. A dimension's and a value's id is
|
|
33949
|
+
fixed once created: change what people read with relabel. A value is never deleted:
|
|
33950
|
+
retire-value stops it from being assigned again, and records holding it still match.
|
|
33951
|
+
An organization holds at most ${MAX_ACCESS_DIMENSIONS_PER_ORG} dimensions of at most ${MAX_ACCESS_VALUES_PER_DIMENSION} values each, retired ones
|
|
33952
|
+
counted. Ids are ASCII letters, digits, "_" and "-", up to ${ACCESS_ID_MAX_LENGTH} characters.
|
|
33953
|
+
|
|
33954
|
+
The organization is --org, else this repo's (wayai-ws/wayai.yaml). Changes need an
|
|
33955
|
+
organization admin.
|
|
33956
|
+
`.trim();
|
|
33957
|
+
SUBCOMMANDS3 = ["list", "create", "relabel", "add-value", "relabel-value", "retire-value", "restore-value"];
|
|
33958
|
+
SHAPE = {
|
|
33959
|
+
list: { ids: 0, label: false },
|
|
33960
|
+
create: { ids: 1, label: true },
|
|
33961
|
+
relabel: { ids: 1, label: true },
|
|
33962
|
+
"add-value": { ids: 2, label: true },
|
|
33963
|
+
"relabel-value": { ids: 2, label: true },
|
|
33964
|
+
"retire-value": { ids: 2, label: false },
|
|
33965
|
+
"restore-value": { ids: 2, label: false }
|
|
33966
|
+
};
|
|
33967
|
+
}
|
|
33968
|
+
});
|
|
33969
|
+
|
|
33667
33970
|
// src/data/files-sync/headers.ts
|
|
33668
33971
|
function ifMatchValue(raw) {
|
|
33669
33972
|
const hash = raw.trim().replace(/^W\//, "").replace(/^"(.*)"$/, "$1");
|
|
@@ -34639,20 +34942,20 @@ __export(knowledge_exports, {
|
|
|
34639
34942
|
knowledgeCommand: () => knowledgeCommand,
|
|
34640
34943
|
parseKnowledgeArgs: () => parseKnowledgeArgs
|
|
34641
34944
|
});
|
|
34642
|
-
import { parseArgs as
|
|
34643
|
-
function
|
|
34945
|
+
import { parseArgs as parseArgs24 } from "util";
|
|
34946
|
+
function usageError4(message) {
|
|
34644
34947
|
return expected(`${message}
|
|
34645
|
-
${
|
|
34948
|
+
${USAGE5}`);
|
|
34646
34949
|
}
|
|
34647
34950
|
function readArgs(args2) {
|
|
34648
34951
|
try {
|
|
34649
|
-
return
|
|
34952
|
+
return parseArgs24({ args: args2, options: OPTIONS, allowPositionals: true, strict: true });
|
|
34650
34953
|
} catch (err) {
|
|
34651
|
-
throw
|
|
34954
|
+
throw usageError4(err instanceof Error ? err.message : String(err));
|
|
34652
34955
|
}
|
|
34653
34956
|
}
|
|
34654
34957
|
function parseKnowledgeArgs(args2) {
|
|
34655
|
-
const [retired] =
|
|
34958
|
+
const [retired] = parseArgs24({ args: args2, options: OPTIONS, allowPositionals: true, strict: false }).positionals;
|
|
34656
34959
|
if (retired !== void 0 && RETIRED_VERBS.has(retired)) {
|
|
34657
34960
|
throw expected(
|
|
34658
34961
|
`\`wayai knowledge ${retired}\` is retired: knowledge resources are gone, and an organization's documents live in its knowledge base as files (\`wayai files pull\` and \`push\`).`
|
|
@@ -34661,25 +34964,25 @@ function parseKnowledgeArgs(args2) {
|
|
|
34661
34964
|
const { values, positionals } = readArgs(args2);
|
|
34662
34965
|
const [verb, ...extra] = positionals;
|
|
34663
34966
|
if (verb !== "refresh-preview") {
|
|
34664
|
-
throw
|
|
34967
|
+
throw usageError4(verb === void 0 ? "No subcommand given." : `Unknown subcommand ${JSON.stringify(verb)}.`);
|
|
34665
34968
|
}
|
|
34666
|
-
if (extra.length > 0) throw
|
|
34667
|
-
if (!values.org) throw
|
|
34668
|
-
if (!UUID_RE3.test(values.org)) throw
|
|
34669
|
-
if (!values.base) throw
|
|
34969
|
+
if (extra.length > 0) throw usageError4(`Unexpected argument ${JSON.stringify(extra[0])}.`);
|
|
34970
|
+
if (!values.org) throw usageError4("--org <org_id> is required.");
|
|
34971
|
+
if (!UUID_RE3.test(values.org)) throw usageError4(`Invalid --org ${JSON.stringify(values.org)}: expected an organization id (a UUID).`);
|
|
34972
|
+
if (!values.base) throw usageError4("--base <knowledge base> is required.");
|
|
34670
34973
|
return { verb, orgId: values.org, base: values.base, yes: values.yes === true };
|
|
34671
34974
|
}
|
|
34672
34975
|
async function knowledgeCommand(args2) {
|
|
34673
34976
|
if (wantsHelp(args2) || args2.length === 0) {
|
|
34674
|
-
console.log(
|
|
34977
|
+
console.log(USAGE5);
|
|
34675
34978
|
return;
|
|
34676
34979
|
}
|
|
34677
34980
|
const options = parseKnowledgeArgs(args2);
|
|
34678
|
-
if (!options.yes && !isInteractive()) throw
|
|
34981
|
+
if (!options.yes && !isInteractive()) throw usageError4("It asks before it copies; pass -y when not running in a terminal.");
|
|
34679
34982
|
const data = await createDataClient(options.orgId, { refreshLogin: true });
|
|
34680
34983
|
await refreshPreviewKnowledge(knowledgeBase(data), options, { log: (line) => console.log(line), confirm });
|
|
34681
34984
|
}
|
|
34682
|
-
var
|
|
34985
|
+
var USAGE5, OPTIONS, RETIRED_VERBS;
|
|
34683
34986
|
var init_knowledge = __esm({
|
|
34684
34987
|
"src/commands/knowledge.ts"() {
|
|
34685
34988
|
"use strict";
|
|
@@ -34689,7 +34992,7 @@ var init_knowledge = __esm({
|
|
|
34689
34992
|
init_helpers();
|
|
34690
34993
|
init_remote();
|
|
34691
34994
|
init_refresh_preview();
|
|
34692
|
-
|
|
34995
|
+
USAGE5 = `
|
|
34693
34996
|
wayai knowledge \u2014 the organization's knowledge base
|
|
34694
34997
|
|
|
34695
34998
|
Usage:
|
|
@@ -35390,8 +35693,8 @@ function parseScopedTargetFlags(flagArgs, usage3, opts = {}) {
|
|
|
35390
35693
|
return { body: { scope: "hub", hub_id: hubId, dry_run: dryRun }, targetLabel: `hub ${hubId}`, dryRun, yes, jsonOutput };
|
|
35391
35694
|
}
|
|
35392
35695
|
async function runRepairTeamOrphans(flagArgs) {
|
|
35393
|
-
const
|
|
35394
|
-
const { body, targetLabel, dryRun, yes, jsonOutput } = parseScopedTargetFlags(flagArgs,
|
|
35696
|
+
const USAGE6 = "wayai admin hubs repair-team-orphans --all | --org <org_id> | --hub <hub_id> [--dry-run] [--yes] [--json]";
|
|
35697
|
+
const { body, targetLabel, dryRun, yes, jsonOutput } = parseScopedTargetFlags(flagArgs, USAGE6);
|
|
35395
35698
|
if (!dryRun && !yes && !jsonOutput) {
|
|
35396
35699
|
console.log(`About to PURGE dangling team references in: ${targetLabel}.`);
|
|
35397
35700
|
console.log("Memberships pointing at a deleted team are removed (HubDO + UserDO mirror); conversations pinned to one are unassigned.");
|
|
@@ -35437,15 +35740,15 @@ async function runRepairTeamOrphans(flagArgs) {
|
|
|
35437
35740
|
}
|
|
35438
35741
|
}
|
|
35439
35742
|
async function runRepairKnowledgeBlobs(flagArgs) {
|
|
35440
|
-
const
|
|
35743
|
+
const USAGE6 = "wayai admin hubs repair-knowledge-blobs --all | --org <org_id> | --hub <hub_id> [--apply] [--yes] [--json]";
|
|
35441
35744
|
const apply = flagArgs.includes("--apply");
|
|
35442
35745
|
const { body, targetLabel, dryRun, yes, jsonOutput } = parseScopedTargetFlags(
|
|
35443
35746
|
flagArgs.filter((arg) => arg !== "--apply"),
|
|
35444
|
-
|
|
35747
|
+
USAGE6
|
|
35445
35748
|
);
|
|
35446
35749
|
if (apply && dryRun) {
|
|
35447
35750
|
console.error("--apply and --dry-run contradict each other: a run is a dry run unless --apply is given.");
|
|
35448
|
-
console.error(
|
|
35751
|
+
console.error(USAGE6);
|
|
35449
35752
|
process.exit(1);
|
|
35450
35753
|
}
|
|
35451
35754
|
const input = { ...body, dry_run: !apply };
|
|
@@ -35495,7 +35798,7 @@ async function runRepairKnowledgeBlobs(flagArgs) {
|
|
|
35495
35798
|
}
|
|
35496
35799
|
}
|
|
35497
35800
|
async function runRepairBranchingOrphans(flagArgs) {
|
|
35498
|
-
const
|
|
35801
|
+
const USAGE6 = "wayai admin hubs repair-branching-orphans --all | --org <org_id> | --hub <hub_id> [--id <type>:<id> ...] [--dry-run] [--yes] [--json]";
|
|
35499
35802
|
const targets = [];
|
|
35500
35803
|
const scopeArgs = [];
|
|
35501
35804
|
for (let i = 0; i < flagArgs.length; i++) {
|
|
@@ -35513,10 +35816,10 @@ async function runRepairBranchingOrphans(flagArgs) {
|
|
|
35513
35816
|
}
|
|
35514
35817
|
targets.push({ entity_type: entityType, entity_id: entityId });
|
|
35515
35818
|
}
|
|
35516
|
-
const { body, targetLabel, dryRun, yes, jsonOutput } = parseScopedTargetFlags(scopeArgs,
|
|
35819
|
+
const { body, targetLabel, dryRun, yes, jsonOutput } = parseScopedTargetFlags(scopeArgs, USAGE6);
|
|
35517
35820
|
if (targets.length > 0 && body.scope !== "hub") {
|
|
35518
35821
|
console.error("--id deletes rows of ONE production hub: combine it with --hub <hub_id>.");
|
|
35519
|
-
console.error(
|
|
35822
|
+
console.error(USAGE6);
|
|
35520
35823
|
process.exit(1);
|
|
35521
35824
|
}
|
|
35522
35825
|
if (targets.length > 0 && !dryRun && !yes && !jsonOutput) {
|
|
@@ -35578,8 +35881,8 @@ async function runRepairBranchingOrphans(flagArgs) {
|
|
|
35578
35881
|
}
|
|
35579
35882
|
}
|
|
35580
35883
|
async function runRepairLegacyOrgGrants(flagArgs) {
|
|
35581
|
-
const
|
|
35582
|
-
const scoped = parseScopedTargetFlags(flagArgs,
|
|
35884
|
+
const USAGE6 = "wayai admin orgs repair-legacy-grants --all | --org <org_id> [--dry-run] [--yes] [--json]";
|
|
35885
|
+
const scoped = parseScopedTargetFlags(flagArgs, USAGE6, {
|
|
35583
35886
|
scopes: ["all", "org"],
|
|
35584
35887
|
allLabel: "ALL organizations (platform-wide)"
|
|
35585
35888
|
});
|
|
@@ -35631,8 +35934,8 @@ async function runRepairLegacyOrgGrants(flagArgs) {
|
|
|
35631
35934
|
}
|
|
35632
35935
|
}
|
|
35633
35936
|
async function runHarnessMassDestroy(flagArgs) {
|
|
35634
|
-
const
|
|
35635
|
-
const { body, targetLabel, dryRun, yes, jsonOutput } = parseScopedTargetFlags(flagArgs,
|
|
35937
|
+
const USAGE6 = "wayai admin harness mass-destroy --all | --org <org_id> | --hub <hub_id> [--dry-run] [--yes] [--json]";
|
|
35938
|
+
const { body, targetLabel, dryRun, yes, jsonOutput } = parseScopedTargetFlags(flagArgs, USAGE6);
|
|
35636
35939
|
if (!dryRun && !yes && !jsonOutput) {
|
|
35637
35940
|
console.log(`About to REAP every live harness session / token / slot in: ${targetLabel}.`);
|
|
35638
35941
|
console.log("This destroys running harness sessions and revokes their tokens. Run with --dry-run first to see the blast radius.");
|
|
@@ -40218,6 +40521,11 @@ async function main() {
|
|
|
40218
40521
|
await contactsCommand2(args);
|
|
40219
40522
|
break;
|
|
40220
40523
|
}
|
|
40524
|
+
case "dimensions": {
|
|
40525
|
+
const { dimensionsCommand: dimensionsCommand2 } = await Promise.resolve().then(() => (init_dimensions(), dimensions_exports));
|
|
40526
|
+
await dimensionsCommand2(args);
|
|
40527
|
+
break;
|
|
40528
|
+
}
|
|
40221
40529
|
case "knowledge": {
|
|
40222
40530
|
const { knowledgeCommand: knowledgeCommand2 } = await Promise.resolve().then(() => (init_knowledge(), knowledge_exports));
|
|
40223
40531
|
await knowledgeCommand2(args);
|
|
@@ -40313,6 +40621,7 @@ Commands:
|
|
|
40313
40621
|
list List organizations and hubs
|
|
40314
40622
|
communities An organization's communities: list, join link (get/rotate/off), stats, access list (list/add/remove) \u2014 \`wayai communities --help\`
|
|
40315
40623
|
contacts Link a contact to its customer record in a base, or unlink it (browser sign-in only) \u2014 \`wayai contacts --help\`
|
|
40624
|
+
dimensions An organization's access dimensions and their values: list, create, relabel, add/retire values \u2014 \`wayai dimensions --help\`
|
|
40316
40625
|
knowledge refresh-preview Make the knowledge base's preview hold its production base's files \u2014 \`wayai knowledge --help\`
|
|
40317
40626
|
report create Report a platform bug (submits to the triage queue)
|
|
40318
40627
|
report edit Amend your own pending report (title/description/error/steps/context)
|