@wayai/cli 0.3.322 → 0.3.323
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 +638 -561
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5509,171 +5509,64 @@ var init_chunk_MF2VVXBR = __esm({
|
|
|
5509
5509
|
}
|
|
5510
5510
|
});
|
|
5511
5511
|
|
|
5512
|
-
// ../../packages/core/dist/chunk-
|
|
5513
|
-
var
|
|
5514
|
-
var
|
|
5515
|
-
"../../packages/core/dist/chunk-
|
|
5516
|
-
"use strict";
|
|
5517
|
-
init_chunk_MF2VVXBR();
|
|
5518
|
-
init_chunk_HZ6CADSY();
|
|
5519
|
-
init_zod();
|
|
5520
|
-
connectionIdParam = external_exports.object({ id: uuidSchema });
|
|
5521
|
-
connectorIdParam = external_exports.object({ id: uuidSchema });
|
|
5522
|
-
listConnectionsQuery = external_exports.object({ hub_id: uuidSchema });
|
|
5523
|
-
deleteConnectionQuery = external_exports.object({ hub_id: uuidSchema });
|
|
5524
|
-
addConnectionBody = external_exports.object({
|
|
5525
|
-
hub_id: uuidSchema,
|
|
5526
|
-
connector_id: uuidSchema,
|
|
5527
|
-
authentication_type: external_exports.string().optional(),
|
|
5528
|
-
inbound_mode: external_exports.enum(["wayai", "resend"]).optional(),
|
|
5529
|
-
inbound_address: external_exports.string().email().optional(),
|
|
5530
|
-
// Opt out of copying this connection's credentials into production on publish/sync.
|
|
5531
|
-
// Defaults to true at the DB layer.
|
|
5532
|
-
sync_credentials_to_production: external_exports.boolean().optional(),
|
|
5533
|
-
// When the connection's own secret expires; null for none (`credential-expiry.ts`).
|
|
5534
|
-
expires_at: credentialExpiresAtSchema.optional()
|
|
5535
|
-
}).passthrough().superRefine((data, ctx) => {
|
|
5536
|
-
if (data.inbound_mode === "resend" && !data.inbound_address) {
|
|
5537
|
-
ctx.addIssue({
|
|
5538
|
-
code: external_exports.ZodIssueCode.custom,
|
|
5539
|
-
message: "Receiving email address is required when using Resend inbound mode",
|
|
5540
|
-
path: ["inbound_address"]
|
|
5541
|
-
});
|
|
5542
|
-
}
|
|
5543
|
-
});
|
|
5544
|
-
editConnectionBody = external_exports.object({
|
|
5545
|
-
hub_id: uuidSchema,
|
|
5546
|
-
sync_credentials_to_production: external_exports.boolean().optional(),
|
|
5547
|
-
expires_at: credentialExpiresAtSchema.optional()
|
|
5548
|
-
}).passthrough();
|
|
5549
|
-
PRODUCTION_DIRECT_FIELDS = ["username", "api_key", "access_token", "password", "refresh_token", "webhook_secret_token", "webhook_signing_secret", "github_app_id", "github_app_private_key"];
|
|
5550
|
-
BESIDE_LINK_FIELDS = /* @__PURE__ */ new Set(["webhook_secret_token", "github_app_id", "github_app_private_key"]);
|
|
5551
|
-
setProductionCredentialBody = external_exports.object({
|
|
5552
|
-
hub_id: uuidSchema,
|
|
5553
|
-
organization_credential_id: external_exports.string().nullable().optional(),
|
|
5554
|
-
organization_credential_token_id: external_exports.string().nullable().optional(),
|
|
5555
|
-
username: external_exports.string().optional(),
|
|
5556
|
-
api_key: external_exports.string().optional(),
|
|
5557
|
-
access_token: external_exports.string().optional(),
|
|
5558
|
-
password: external_exports.string().optional(),
|
|
5559
|
-
refresh_token: external_exports.string().optional(),
|
|
5560
|
-
webhook_secret_token: external_exports.string().optional(),
|
|
5561
|
-
webhook_signing_secret: external_exports.string().optional(),
|
|
5562
|
-
github_app_id: external_exports.string().optional(),
|
|
5563
|
-
github_app_private_key: external_exports.string().optional(),
|
|
5564
|
-
expires_at: credentialExpiresAtSchema.optional()
|
|
5565
|
-
}).strict().superRefine((data, ctx) => {
|
|
5566
|
-
const hasOrgLink = !!data.organization_credential_id || !!data.organization_credential_token_id;
|
|
5567
|
-
const sets = (f) => data[f] != null && data[f] !== `__USE_EXISTING_${f.toUpperCase()}__`;
|
|
5568
|
-
const hasDirect = PRODUCTION_DIRECT_FIELDS.some(sets);
|
|
5569
|
-
const hasDirectBesideLink = PRODUCTION_DIRECT_FIELDS.some((f) => !BESIDE_LINK_FIELDS.has(f) && sets(f));
|
|
5570
|
-
if (hasOrgLink && hasDirectBesideLink) {
|
|
5571
|
-
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Provide either an organization credential link or direct credential fields, not both" });
|
|
5572
|
-
}
|
|
5573
|
-
if (hasOrgLink && data.expires_at != null) {
|
|
5574
|
-
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: LINKED_EXPIRY_REFUSAL, path: ["expires_at"] });
|
|
5575
|
-
}
|
|
5576
|
-
if (!hasOrgLink && !hasDirect && data.expires_at === void 0) {
|
|
5577
|
-
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "A credential is required: link an organization credential or provide a credential field" });
|
|
5578
|
-
}
|
|
5579
|
-
});
|
|
5580
|
-
registerWhatsappQuery = external_exports.object({ hub_id: uuidSchema });
|
|
5581
|
-
registerWhatsappBody = external_exports.object({
|
|
5582
|
-
pin: external_exports.string().optional()
|
|
5583
|
-
});
|
|
5584
|
-
retryProvisioningQuery = external_exports.object({ hub_id: uuidSchema });
|
|
5585
|
-
resendDomainStatusQuery = external_exports.object({ hub_id: uuidSchema });
|
|
5586
|
-
}
|
|
5587
|
-
});
|
|
5588
|
-
|
|
5589
|
-
// ../../packages/core/dist/chunk-IPXBFWUU.js
|
|
5590
|
-
var variantAiModeSchema, experimentStatusSchema, overlayUpdateSchema, experimentIdParam, variantIdParam, listExperimentsQuery, listVariantsQuery, listOverridesQuery, deleteOverrideQuery, createExperimentBody, updateExperimentBody, setExperimentStatusBody, createVariantBody, updateVariantBody, upsertOverrideBody;
|
|
5591
|
-
var init_chunk_IPXBFWUU = __esm({
|
|
5592
|
-
"../../packages/core/dist/chunk-IPXBFWUU.js"() {
|
|
5512
|
+
// ../../packages/core/dist/chunk-LHTWT6HS.js
|
|
5513
|
+
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, REKOR_LIFECYCLE_PREFIX, REKOR_BASE_VAULT_DRY_RUN_PATH, REKOR_S3_CREDENTIAL_COUNT_PATH, 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_ACCESS_HEADER, REKOR_BOUND_PAGE_HEADER, REKOR_BOUND_PERSON_HEADER, REKOR_BOUND_CAPABILITY_HEADER, REKOR_BOUND_CAPABILITY_SEED, REKOR_PERSON_AUDIENCE_STAFF, REKOR_PERSON_AUDIENCE_CUSTOMER, REKOR_PERSON_ALL, DATA_BASE_GENERATION_HEADER, REKOR_MAX_ACTOR_ID_LENGTH, REKOR_MAX_ACTOR_LABEL_LENGTH, REKOR_MAX_ACCESS_DIMENSIONS, REKOR_MAX_ACCESS_VALUES, REKOR_MAX_ACCESS_ID_LENGTH, REKOR_MAX_ACCESS_HEADER_LENGTH, REKOR_MAX_PERSON_PARTIES, REKOR_MAX_PERSON_IDS, REKOR_MAX_PERSON_ID_LENGTH, REKOR_MAX_PERSON_HEADER_LENGTH;
|
|
5514
|
+
var init_chunk_LHTWT6HS = __esm({
|
|
5515
|
+
"../../packages/core/dist/chunk-LHTWT6HS.js"() {
|
|
5593
5516
|
"use strict";
|
|
5594
|
-
init_chunk_6TSQ5HXC();
|
|
5595
5517
|
init_zod();
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
});
|
|
5616
|
-
deleteOverrideQuery = external_exports.object({
|
|
5617
|
-
hub_id: external_exports.string().uuid(),
|
|
5618
|
-
variant_id: external_exports.string().uuid(),
|
|
5619
|
-
agent_id: external_exports.string().uuid()
|
|
5620
|
-
});
|
|
5621
|
-
createExperimentBody = external_exports.object({
|
|
5622
|
-
hub_id: external_exports.string().uuid(),
|
|
5623
|
-
experiment_slug: slugSchema.optional(),
|
|
5624
|
-
experiment_name: external_exports.string().min(1, "experiment_name is required").max(100, "experiment_name must be 100 characters or fewer"),
|
|
5625
|
-
primary_metric: external_exports.string().max(200).nullish(),
|
|
5626
|
-
status: experimentStatusSchema.default("draft")
|
|
5627
|
-
});
|
|
5628
|
-
updateExperimentBody = external_exports.object({
|
|
5629
|
-
// experiment_slug is immutable after first persist — not accepted here.
|
|
5630
|
-
experiment_name: external_exports.string().min(1).max(100).optional(),
|
|
5631
|
-
primary_metric: external_exports.string().max(200).nullish(),
|
|
5632
|
-
control_variant_id: external_exports.string().uuid().nullish()
|
|
5633
|
-
});
|
|
5634
|
-
setExperimentStatusBody = external_exports.object({
|
|
5635
|
-
status: experimentStatusSchema
|
|
5636
|
-
});
|
|
5637
|
-
createVariantBody = external_exports.object({
|
|
5638
|
-
hub_id: external_exports.string().uuid(),
|
|
5639
|
-
experiment_id: external_exports.string().uuid(),
|
|
5640
|
-
label: external_exports.string().min(1, "label is required").max(100, "label must be 100 characters or fewer"),
|
|
5641
|
-
weight: external_exports.number().positive().default(1),
|
|
5642
|
-
ai_mode: variantAiModeSchema.nullish(),
|
|
5643
|
-
is_control: external_exports.boolean().default(false)
|
|
5644
|
-
});
|
|
5645
|
-
updateVariantBody = external_exports.object({
|
|
5646
|
-
label: external_exports.string().min(1).max(100).optional(),
|
|
5647
|
-
weight: external_exports.number().positive().optional(),
|
|
5648
|
-
ai_mode: variantAiModeSchema.nullish(),
|
|
5649
|
-
is_control: external_exports.boolean().optional()
|
|
5518
|
+
REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
|
|
5519
|
+
REKOR_ACTOR_ID_HEADER = "X-Rekor-Actor-Id";
|
|
5520
|
+
REKOR_ACTOR_LABEL_HEADER = "X-Rekor-Actor-Label";
|
|
5521
|
+
REKOR_ACTOR_ORG_HEADER = "X-Rekor-Actor-Org";
|
|
5522
|
+
REKOR_ACTOR_ADMIN_HEADER = "X-Rekor-Actor-Admin";
|
|
5523
|
+
REKOR_CLIENT_HEADER = "X-Rekor-Client";
|
|
5524
|
+
REKOR_TOOL_ID_HEADER = "X-Rekor-Tool-Id";
|
|
5525
|
+
REKOR_CLIENTS = ["api", "cli", "mcp"];
|
|
5526
|
+
rekorClientSchema = external_exports.enum(REKOR_CLIENTS);
|
|
5527
|
+
MAX_REKOR_TOOL_ID_LENGTH = 128;
|
|
5528
|
+
rekorToolIdSchema = external_exports.string().trim().min(1).max(MAX_REKOR_TOOL_ID_LENGTH);
|
|
5529
|
+
REKOR_V1_PREFIX = "/v1";
|
|
5530
|
+
REKOR_LIFECYCLE_PREFIX = "/lifecycle";
|
|
5531
|
+
REKOR_BASE_VAULT_DRY_RUN_PATH = `${REKOR_LIFECYCLE_PREFIX}/vault-dry-run`;
|
|
5532
|
+
REKOR_S3_CREDENTIAL_COUNT_PATH = `${REKOR_LIFECYCLE_PREFIX}/s3-credential-count`;
|
|
5533
|
+
DATA_PROXY_ORG_QUERY_PARAM = "org_id";
|
|
5534
|
+
MAX_PROVISIONING_BODY_BYTES = 256 * 1024;
|
|
5535
|
+
dataProxyQuery = external_exports.object({
|
|
5536
|
+
[DATA_PROXY_ORG_QUERY_PARAM]: external_exports.string().uuid().optional()
|
|
5650
5537
|
});
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5538
|
+
rekorAttestation = external_exports.object({
|
|
5539
|
+
[REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["user", "token"]),
|
|
5540
|
+
[REKOR_ACTOR_ID_HEADER]: external_exports.string().min(1),
|
|
5541
|
+
[REKOR_ACTOR_LABEL_HEADER]: external_exports.string(),
|
|
5542
|
+
[REKOR_ACTOR_ORG_HEADER]: external_exports.string().uuid(),
|
|
5543
|
+
[REKOR_ACTOR_ADMIN_HEADER]: external_exports.enum(["0", "1"]),
|
|
5544
|
+
[REKOR_CLIENT_HEADER]: rekorClientSchema,
|
|
5545
|
+
[REKOR_TOOL_ID_HEADER]: rekorToolIdSchema.optional()
|
|
5659
5546
|
});
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5547
|
+
REQUIRED_REKOR_ATTESTATION_HEADERS = Object.entries(rekorAttestation.shape).filter(([, field]) => !field.isOptional()).map(([header]) => header);
|
|
5548
|
+
REKOR_BOUND_BASE_HEADER = "X-Rekor-Bound-Base";
|
|
5549
|
+
REKOR_BOUND_TOOLSET_HEADER = "X-Rekor-Bound-Toolset";
|
|
5550
|
+
REKOR_BOUND_TOKEN_HEADER = "X-Rekor-Bound-Token";
|
|
5551
|
+
REKOR_BOUND_ACCESS_HEADER = "X-Rekor-Bound-Access";
|
|
5552
|
+
REKOR_BOUND_PAGE_HEADER = "X-Rekor-Bound-Page";
|
|
5553
|
+
REKOR_BOUND_PERSON_HEADER = "X-Rekor-Bound-Person";
|
|
5554
|
+
REKOR_BOUND_CAPABILITY_HEADER = "X-Rekor-Bound-Capability";
|
|
5555
|
+
REKOR_BOUND_CAPABILITY_SEED = "seed";
|
|
5556
|
+
REKOR_PERSON_AUDIENCE_STAFF = "staff";
|
|
5557
|
+
REKOR_PERSON_AUDIENCE_CUSTOMER = "customer";
|
|
5558
|
+
REKOR_PERSON_ALL = "*";
|
|
5559
|
+
DATA_BASE_GENERATION_HEADER = "X-Data-Base-Generation";
|
|
5560
|
+
REKOR_MAX_ACTOR_ID_LENGTH = 256;
|
|
5561
|
+
REKOR_MAX_ACTOR_LABEL_LENGTH = 256;
|
|
5562
|
+
REKOR_MAX_ACCESS_DIMENSIONS = 8;
|
|
5563
|
+
REKOR_MAX_ACCESS_VALUES = 100;
|
|
5564
|
+
REKOR_MAX_ACCESS_ID_LENGTH = 32;
|
|
5565
|
+
REKOR_MAX_ACCESS_HEADER_LENGTH = 65536;
|
|
5566
|
+
REKOR_MAX_PERSON_PARTIES = 16;
|
|
5567
|
+
REKOR_MAX_PERSON_IDS = 16;
|
|
5568
|
+
REKOR_MAX_PERSON_ID_LENGTH = 64;
|
|
5569
|
+
REKOR_MAX_PERSON_HEADER_LENGTH = 32768;
|
|
5677
5570
|
}
|
|
5678
5571
|
});
|
|
5679
5572
|
|
|
@@ -5756,313 +5649,6 @@ var init_chunk_ZTNFLGW5 = __esm({
|
|
|
5756
5649
|
}
|
|
5757
5650
|
});
|
|
5758
5651
|
|
|
5759
|
-
// ../../packages/core/dist/chunk-DSKOMKRY.js
|
|
5760
|
-
var orgCredentialIdParam, listOrgCredentialsQuery, ORG_CREDENTIAL_SERVICE_REQUIRED, createOrgCredentialBody, updateOrgCredentialBody;
|
|
5761
|
-
var init_chunk_DSKOMKRY = __esm({
|
|
5762
|
-
"../../packages/core/dist/chunk-DSKOMKRY.js"() {
|
|
5763
|
-
"use strict";
|
|
5764
|
-
init_chunk_MF2VVXBR();
|
|
5765
|
-
init_chunk_ZTNFLGW5();
|
|
5766
|
-
init_zod();
|
|
5767
|
-
orgCredentialIdParam = external_exports.object({
|
|
5768
|
-
id: external_exports.string().uuid()
|
|
5769
|
-
});
|
|
5770
|
-
listOrgCredentialsQuery = external_exports.object({
|
|
5771
|
-
organization_id: external_exports.string().uuid(),
|
|
5772
|
-
hub_id: external_exports.string().uuid().optional()
|
|
5773
|
-
});
|
|
5774
|
-
ORG_CREDENTIAL_SERVICE_REQUIRED = "An organization credential must name the service it is for (connector_id): pick its Service in the console, or run `wayai create-credential --service <name>`, updating the WayAI CLI first if it has no --service. Nothing was created.";
|
|
5775
|
-
createOrgCredentialBody = external_exports.object({
|
|
5776
|
-
organization_id: external_exports.string().uuid(),
|
|
5777
|
-
credential_display_name: external_exports.string().min(1).max(255),
|
|
5778
|
-
credential_description: external_exports.string().max(1e3).nullish(),
|
|
5779
|
-
authentication_type: external_exports.enum(["api_key", "bearer", "basic_auth"]).or(
|
|
5780
|
-
external_exports.enum(["API Key", "Bearer Token", "Basic Auth"]).transform((v) => normalizeAuthType(v))
|
|
5781
|
-
),
|
|
5782
|
-
api_key: external_exports.string().optional(),
|
|
5783
|
-
access_token: external_exports.string().optional(),
|
|
5784
|
-
username: external_exports.string().optional(),
|
|
5785
|
-
password: external_exports.string().optional(),
|
|
5786
|
-
tags: external_exports.array(external_exports.string().uuid()).optional(),
|
|
5787
|
-
environment: external_exports.enum(["preview", "production", "all"]).optional(),
|
|
5788
|
-
expires_at: credentialExpiresAtSchema.optional(),
|
|
5789
|
-
/**
|
|
5790
|
-
* The service the credential is for: a catalog `connector_id` (wayai#5644). Required (owner decision Q2): its value goes
|
|
5791
|
-
* to the credentials vault under that connector, and a credential naming none had nowhere there to go. It links only to
|
|
5792
|
-
* connections of that service, and is fixed for the credential's life. A connector whose host the customer types (REST
|
|
5793
|
-
* API, External Resources, MCP Server) is refused: its value is entered on the connection. A client that sends none (a
|
|
5794
|
-
* CLI from before `--service`) is refused with {@link ORG_CREDENTIAL_SERVICE_REQUIRED}.
|
|
5795
|
-
*/
|
|
5796
|
-
connector_id: external_exports.string({ required_error: ORG_CREDENTIAL_SERVICE_REQUIRED }).uuid()
|
|
5797
|
-
});
|
|
5798
|
-
updateOrgCredentialBody = external_exports.object({
|
|
5799
|
-
credential_display_name: external_exports.string().min(1).max(255).optional(),
|
|
5800
|
-
credential_description: external_exports.string().max(1e3).nullish(),
|
|
5801
|
-
api_key: external_exports.string().optional(),
|
|
5802
|
-
access_token: external_exports.string().optional(),
|
|
5803
|
-
username: external_exports.string().optional(),
|
|
5804
|
-
password: external_exports.string().optional(),
|
|
5805
|
-
tags: external_exports.array(external_exports.string().uuid()).optional(),
|
|
5806
|
-
environment: external_exports.enum(["preview", "production", "all"]).optional(),
|
|
5807
|
-
// Absent keeps the stored date, unless the request stores a new secret, which clears it.
|
|
5808
|
-
expires_at: credentialExpiresAtSchema.optional()
|
|
5809
|
-
});
|
|
5810
|
-
}
|
|
5811
|
-
});
|
|
5812
|
-
|
|
5813
|
-
// ../../packages/core/dist/chunk-HIGKBEPF.js
|
|
5814
|
-
var accessExplainQuery;
|
|
5815
|
-
var init_chunk_HIGKBEPF = __esm({
|
|
5816
|
-
"../../packages/core/dist/chunk-HIGKBEPF.js"() {
|
|
5817
|
-
"use strict";
|
|
5818
|
-
init_chunk_HZ6CADSY();
|
|
5819
|
-
init_zod();
|
|
5820
|
-
accessExplainQuery = external_exports.object({
|
|
5821
|
-
user_id: external_exports.string().regex(USER_ID_REGEX).optional()
|
|
5822
|
-
});
|
|
5823
|
-
}
|
|
5824
|
-
});
|
|
5825
|
-
|
|
5826
|
-
// ../../packages/core/dist/chunk-KEN2DASI.js
|
|
5827
|
-
var SECOND_FACTOR_TIERS, secondFactorTier, META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, normalizeEmail, REVIEW_ACCOUNT_EMAILS;
|
|
5828
|
-
var init_chunk_KEN2DASI = __esm({
|
|
5829
|
-
"../../packages/core/dist/chunk-KEN2DASI.js"() {
|
|
5830
|
-
"use strict";
|
|
5831
|
-
init_zod();
|
|
5832
|
-
SECOND_FACTOR_TIERS = ["off", "settings"];
|
|
5833
|
-
secondFactorTier = external_exports.enum(SECOND_FACTOR_TIERS);
|
|
5834
|
-
META_ENTITY_ID_PATTERN = /^\d{1,32}$/;
|
|
5835
|
-
metaEntityId = external_exports.string().regex(META_ENTITY_ID_PATTERN, "must be a numeric Meta entity id");
|
|
5836
|
-
whatsappCallbackBody = external_exports.object({
|
|
5837
|
-
state: external_exports.string().min(1, "state is required"),
|
|
5838
|
-
code: external_exports.string().optional(),
|
|
5839
|
-
access_token: external_exports.string().optional(),
|
|
5840
|
-
user_id: external_exports.string().optional(),
|
|
5841
|
-
/**
|
|
5842
|
-
* The phone number and WABA the operator actually picked in Meta's Embedded
|
|
5843
|
-
* Signup popup (posted to the opener as `WA_EMBEDDED_SIGNUP`). Optional:
|
|
5844
|
-
* older clients, and the redirect-based flow, never see that event and fall
|
|
5845
|
-
* back to discovery.
|
|
5846
|
-
*/
|
|
5847
|
-
phone_number_id: metaEntityId.optional(),
|
|
5848
|
-
waba_id: metaEntityId.optional()
|
|
5849
|
-
}).refine(
|
|
5850
|
-
(data) => !!data.access_token || !!data.code,
|
|
5851
|
-
{ message: "Missing required parameters: state and either access_token or code" }
|
|
5852
|
-
);
|
|
5853
|
-
authMeResponse = external_exports.object({
|
|
5854
|
-
user_id: external_exports.string(),
|
|
5855
|
-
email: external_exports.string(),
|
|
5856
|
-
org_id: external_exports.string().nullable(),
|
|
5857
|
-
is_platform_admin: external_exports.boolean()
|
|
5858
|
-
});
|
|
5859
|
-
wsTicketResponse = external_exports.object({
|
|
5860
|
-
ticket: external_exports.string(),
|
|
5861
|
-
/** Seconds until the ticket expires if unconsumed. */
|
|
5862
|
-
expires_in: external_exports.number()
|
|
5863
|
-
});
|
|
5864
|
-
sessionCheckResponse = external_exports.object({
|
|
5865
|
-
valid: external_exports.literal(true)
|
|
5866
|
-
});
|
|
5867
|
-
logoutResponse = external_exports.object({
|
|
5868
|
-
success: external_exports.literal(true)
|
|
5869
|
-
});
|
|
5870
|
-
magicCodeSendBody = external_exports.object({
|
|
5871
|
-
email: external_exports.string().email("Invalid email").max(254)
|
|
5872
|
-
// RFC 5321 max; bounds the request payload
|
|
5873
|
-
});
|
|
5874
|
-
magicCodeSendResponse = external_exports.object({
|
|
5875
|
-
success: external_exports.literal(true)
|
|
5876
|
-
});
|
|
5877
|
-
magicCodeVerifyBody = external_exports.object({
|
|
5878
|
-
email: external_exports.string().email("Invalid email").max(254),
|
|
5879
|
-
// RFC 5321 max; bounds the request payload
|
|
5880
|
-
code: external_exports.string().min(1, "Code is required").max(12)
|
|
5881
|
-
// WorkOS sends a 6-digit code; bound the input
|
|
5882
|
-
});
|
|
5883
|
-
magicCodeVerifyResponse = external_exports.object({
|
|
5884
|
-
access_token: external_exports.string(),
|
|
5885
|
-
refresh_token: external_exports.string()
|
|
5886
|
-
});
|
|
5887
|
-
passwordLoginBody = external_exports.object({
|
|
5888
|
-
email: external_exports.string().email("Invalid email").max(254),
|
|
5889
|
-
// RFC 5321 max; bounds the request payload
|
|
5890
|
-
password: external_exports.string().min(1, "Password is required").max(128)
|
|
5891
|
-
// bound the payload; WorkOS validates
|
|
5892
|
-
});
|
|
5893
|
-
normalizeEmail = (email) => email.trim().toLowerCase();
|
|
5894
|
-
REVIEW_ACCOUNT_EMAILS = new Set(
|
|
5895
|
-
["apple.review@wayai.pro", "play.review@wayai.pro", "microsoft.review@wayai.pro", "meta.review@wayai.pro"].map(
|
|
5896
|
-
normalizeEmail
|
|
5897
|
-
)
|
|
5898
|
-
);
|
|
5899
|
-
}
|
|
5900
|
-
});
|
|
5901
|
-
|
|
5902
|
-
// ../../packages/core/dist/chunk-PFGVH2CX.js
|
|
5903
|
-
var secondFactorCode, secondFactorRecoveryCode, secondFactorCodeBody, secondFactorRecoveryBody, secondFactorDisableBody, setOrgSecondFactorBody;
|
|
5904
|
-
var init_chunk_PFGVH2CX = __esm({
|
|
5905
|
-
"../../packages/core/dist/chunk-PFGVH2CX.js"() {
|
|
5906
|
-
"use strict";
|
|
5907
|
-
init_chunk_KEN2DASI();
|
|
5908
|
-
init_zod();
|
|
5909
|
-
secondFactorCode = external_exports.string().regex(/^\d{6}$/, "Enter the 6-digit code");
|
|
5910
|
-
secondFactorRecoveryCode = external_exports.string().min(1, "Enter a recovery code").max(64);
|
|
5911
|
-
secondFactorCodeBody = external_exports.object({ code: secondFactorCode });
|
|
5912
|
-
secondFactorRecoveryBody = external_exports.object({ recovery_code: secondFactorRecoveryCode });
|
|
5913
|
-
secondFactorDisableBody = external_exports.union([
|
|
5914
|
-
external_exports.object({ code: secondFactorCode, recovery_code: external_exports.undefined().optional() }),
|
|
5915
|
-
external_exports.object({ recovery_code: secondFactorRecoveryCode, code: external_exports.undefined().optional() })
|
|
5916
|
-
]);
|
|
5917
|
-
setOrgSecondFactorBody = external_exports.object({ tier: secondFactorTier });
|
|
5918
|
-
}
|
|
5919
|
-
});
|
|
5920
|
-
|
|
5921
|
-
// ../../packages/core/dist/chunk-WE4KMHZK.js
|
|
5922
|
-
var bootstrapQuery;
|
|
5923
|
-
var init_chunk_WE4KMHZK = __esm({
|
|
5924
|
-
"../../packages/core/dist/chunk-WE4KMHZK.js"() {
|
|
5925
|
-
"use strict";
|
|
5926
|
-
init_zod();
|
|
5927
|
-
bootstrapQuery = external_exports.object({
|
|
5928
|
-
active_hub_id: external_exports.string().uuid().optional(),
|
|
5929
|
-
active_conversation_id: external_exports.string().uuid().optional(),
|
|
5930
|
-
active_nav: external_exports.enum(["chat", "task", "support"]).optional(),
|
|
5931
|
-
/**
|
|
5932
|
-
* The people thread the URL names (`/chat/threads/:threadId`, gh #4661): the snapshot
|
|
5933
|
-
* preloads it as `people.active_thread` when the viewer is a member.
|
|
5934
|
-
*/
|
|
5935
|
-
active_thread_id: external_exports.string().uuid().optional()
|
|
5936
|
-
});
|
|
5937
|
-
}
|
|
5938
|
-
});
|
|
5939
|
-
|
|
5940
|
-
// ../../packages/core/dist/chunk-SCC6AVLY.js
|
|
5941
|
-
var PERMISSIONS;
|
|
5942
|
-
var init_chunk_SCC6AVLY = __esm({
|
|
5943
|
-
"../../packages/core/dist/chunk-SCC6AVLY.js"() {
|
|
5944
|
-
"use strict";
|
|
5945
|
-
PERMISSIONS = [
|
|
5946
|
-
"hub:read",
|
|
5947
|
-
"hub:write",
|
|
5948
|
-
"hub:admin",
|
|
5949
|
-
"conversation:read",
|
|
5950
|
-
"conversation:write",
|
|
5951
|
-
"analytics:read",
|
|
5952
|
-
"billing:read",
|
|
5953
|
-
"billing:write",
|
|
5954
|
-
"org:read",
|
|
5955
|
-
"org:write",
|
|
5956
|
-
"org:admin",
|
|
5957
|
-
"contacts:write",
|
|
5958
|
-
"platform:admin",
|
|
5959
|
-
"*"
|
|
5960
|
-
];
|
|
5961
|
-
}
|
|
5962
|
-
});
|
|
5963
|
-
|
|
5964
|
-
// ../../packages/core/dist/chunk-P5GJNS5R.js
|
|
5965
|
-
var MAX_NAME_LENGTH, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam;
|
|
5966
|
-
var init_chunk_P5GJNS5R = __esm({
|
|
5967
|
-
"../../packages/core/dist/chunk-P5GJNS5R.js"() {
|
|
5968
|
-
"use strict";
|
|
5969
|
-
init_chunk_SCC6AVLY();
|
|
5970
|
-
init_chunk_HZ6CADSY();
|
|
5971
|
-
init_zod();
|
|
5972
|
-
MAX_NAME_LENGTH = 100;
|
|
5973
|
-
MAX_HUBS_PER_GRANT = 50;
|
|
5974
|
-
MAX_HUB_TAGS_PER_GRANT = 20;
|
|
5975
|
-
MAX_GRANTS = 20;
|
|
5976
|
-
permissionEnum = external_exports.enum(PERMISSIONS).refine(
|
|
5977
|
-
(p) => p !== "platform:admin",
|
|
5978
|
-
{ message: "platform:admin cannot be delegated via token creation" }
|
|
5979
|
-
);
|
|
5980
|
-
grantScopeSchema = external_exports.object({
|
|
5981
|
-
// Required: every token grant must declare its org tenancy. The handler
|
|
5982
|
-
// also strict-checks this as defense-in-depth, but failing at the Zod
|
|
5983
|
-
// boundary keeps the generated client type honest (org_id: string).
|
|
5984
|
-
org_id: external_exports.string().min(1),
|
|
5985
|
-
hubs: external_exports.array(external_exports.string().min(1)).min(1, "Each grant must have scope.hubs as a non-empty array").max(MAX_HUBS_PER_GRANT),
|
|
5986
|
-
hub_tags: external_exports.array(external_exports.string().min(1)).min(1, "scope.hub_tags must be a non-empty array if provided").max(MAX_HUB_TAGS_PER_GRANT).optional(),
|
|
5987
|
-
environments: external_exports.array(external_exports.enum(["production", "preview"])).min(1, "scope.environments must be a non-empty array if provided").optional()
|
|
5988
|
-
}).strict();
|
|
5989
|
-
grantSchema = external_exports.object({
|
|
5990
|
-
scope: grantScopeSchema,
|
|
5991
|
-
permissions: external_exports.array(permissionEnum).min(1, "Each grant must have permissions as a non-empty array")
|
|
5992
|
-
}).strict();
|
|
5993
|
-
createTokenBody = external_exports.object({
|
|
5994
|
-
name: external_exports.string().trim().min(1, "name is required").max(MAX_NAME_LENGTH, `name must be ${MAX_NAME_LENGTH} characters or fewer`),
|
|
5995
|
-
grants: external_exports.array(grantSchema).min(1, "grants must be a non-empty array").max(MAX_GRANTS),
|
|
5996
|
-
expires_at: external_exports.string().datetime({ message: "expires_at must be a valid ISO 8601 date" }).refine(
|
|
5997
|
-
(s) => new Date(s).getTime() > Date.now(),
|
|
5998
|
-
{ message: "expires_at must be in the future" }
|
|
5999
|
-
).optional()
|
|
6000
|
-
});
|
|
6001
|
-
tokenOrgIdParam = external_exports.object({ orgId: uuidSchema });
|
|
6002
|
-
}
|
|
6003
|
-
});
|
|
6004
|
-
|
|
6005
|
-
// ../../packages/core/dist/chunk-LHTWT6HS.js
|
|
6006
|
-
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, REKOR_LIFECYCLE_PREFIX, REKOR_BASE_VAULT_DRY_RUN_PATH, REKOR_S3_CREDENTIAL_COUNT_PATH, 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_ACCESS_HEADER, REKOR_BOUND_PAGE_HEADER, REKOR_BOUND_PERSON_HEADER, REKOR_BOUND_CAPABILITY_HEADER, REKOR_BOUND_CAPABILITY_SEED, REKOR_PERSON_AUDIENCE_STAFF, REKOR_PERSON_AUDIENCE_CUSTOMER, REKOR_PERSON_ALL, DATA_BASE_GENERATION_HEADER, REKOR_MAX_ACTOR_ID_LENGTH, REKOR_MAX_ACTOR_LABEL_LENGTH, REKOR_MAX_ACCESS_DIMENSIONS, REKOR_MAX_ACCESS_VALUES, REKOR_MAX_ACCESS_ID_LENGTH, REKOR_MAX_ACCESS_HEADER_LENGTH, REKOR_MAX_PERSON_PARTIES, REKOR_MAX_PERSON_IDS, REKOR_MAX_PERSON_ID_LENGTH, REKOR_MAX_PERSON_HEADER_LENGTH;
|
|
6007
|
-
var init_chunk_LHTWT6HS = __esm({
|
|
6008
|
-
"../../packages/core/dist/chunk-LHTWT6HS.js"() {
|
|
6009
|
-
"use strict";
|
|
6010
|
-
init_zod();
|
|
6011
|
-
REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
|
|
6012
|
-
REKOR_ACTOR_ID_HEADER = "X-Rekor-Actor-Id";
|
|
6013
|
-
REKOR_ACTOR_LABEL_HEADER = "X-Rekor-Actor-Label";
|
|
6014
|
-
REKOR_ACTOR_ORG_HEADER = "X-Rekor-Actor-Org";
|
|
6015
|
-
REKOR_ACTOR_ADMIN_HEADER = "X-Rekor-Actor-Admin";
|
|
6016
|
-
REKOR_CLIENT_HEADER = "X-Rekor-Client";
|
|
6017
|
-
REKOR_TOOL_ID_HEADER = "X-Rekor-Tool-Id";
|
|
6018
|
-
REKOR_CLIENTS = ["api", "cli", "mcp"];
|
|
6019
|
-
rekorClientSchema = external_exports.enum(REKOR_CLIENTS);
|
|
6020
|
-
MAX_REKOR_TOOL_ID_LENGTH = 128;
|
|
6021
|
-
rekorToolIdSchema = external_exports.string().trim().min(1).max(MAX_REKOR_TOOL_ID_LENGTH);
|
|
6022
|
-
REKOR_V1_PREFIX = "/v1";
|
|
6023
|
-
REKOR_LIFECYCLE_PREFIX = "/lifecycle";
|
|
6024
|
-
REKOR_BASE_VAULT_DRY_RUN_PATH = `${REKOR_LIFECYCLE_PREFIX}/vault-dry-run`;
|
|
6025
|
-
REKOR_S3_CREDENTIAL_COUNT_PATH = `${REKOR_LIFECYCLE_PREFIX}/s3-credential-count`;
|
|
6026
|
-
DATA_PROXY_ORG_QUERY_PARAM = "org_id";
|
|
6027
|
-
MAX_PROVISIONING_BODY_BYTES = 256 * 1024;
|
|
6028
|
-
dataProxyQuery = external_exports.object({
|
|
6029
|
-
[DATA_PROXY_ORG_QUERY_PARAM]: external_exports.string().uuid().optional()
|
|
6030
|
-
});
|
|
6031
|
-
rekorAttestation = external_exports.object({
|
|
6032
|
-
[REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["user", "token"]),
|
|
6033
|
-
[REKOR_ACTOR_ID_HEADER]: external_exports.string().min(1),
|
|
6034
|
-
[REKOR_ACTOR_LABEL_HEADER]: external_exports.string(),
|
|
6035
|
-
[REKOR_ACTOR_ORG_HEADER]: external_exports.string().uuid(),
|
|
6036
|
-
[REKOR_ACTOR_ADMIN_HEADER]: external_exports.enum(["0", "1"]),
|
|
6037
|
-
[REKOR_CLIENT_HEADER]: rekorClientSchema,
|
|
6038
|
-
[REKOR_TOOL_ID_HEADER]: rekorToolIdSchema.optional()
|
|
6039
|
-
});
|
|
6040
|
-
REQUIRED_REKOR_ATTESTATION_HEADERS = Object.entries(rekorAttestation.shape).filter(([, field]) => !field.isOptional()).map(([header]) => header);
|
|
6041
|
-
REKOR_BOUND_BASE_HEADER = "X-Rekor-Bound-Base";
|
|
6042
|
-
REKOR_BOUND_TOOLSET_HEADER = "X-Rekor-Bound-Toolset";
|
|
6043
|
-
REKOR_BOUND_TOKEN_HEADER = "X-Rekor-Bound-Token";
|
|
6044
|
-
REKOR_BOUND_ACCESS_HEADER = "X-Rekor-Bound-Access";
|
|
6045
|
-
REKOR_BOUND_PAGE_HEADER = "X-Rekor-Bound-Page";
|
|
6046
|
-
REKOR_BOUND_PERSON_HEADER = "X-Rekor-Bound-Person";
|
|
6047
|
-
REKOR_BOUND_CAPABILITY_HEADER = "X-Rekor-Bound-Capability";
|
|
6048
|
-
REKOR_BOUND_CAPABILITY_SEED = "seed";
|
|
6049
|
-
REKOR_PERSON_AUDIENCE_STAFF = "staff";
|
|
6050
|
-
REKOR_PERSON_AUDIENCE_CUSTOMER = "customer";
|
|
6051
|
-
REKOR_PERSON_ALL = "*";
|
|
6052
|
-
DATA_BASE_GENERATION_HEADER = "X-Data-Base-Generation";
|
|
6053
|
-
REKOR_MAX_ACTOR_ID_LENGTH = 256;
|
|
6054
|
-
REKOR_MAX_ACTOR_LABEL_LENGTH = 256;
|
|
6055
|
-
REKOR_MAX_ACCESS_DIMENSIONS = 8;
|
|
6056
|
-
REKOR_MAX_ACCESS_VALUES = 100;
|
|
6057
|
-
REKOR_MAX_ACCESS_ID_LENGTH = 32;
|
|
6058
|
-
REKOR_MAX_ACCESS_HEADER_LENGTH = 65536;
|
|
6059
|
-
REKOR_MAX_PERSON_PARTIES = 16;
|
|
6060
|
-
REKOR_MAX_PERSON_IDS = 16;
|
|
6061
|
-
REKOR_MAX_PERSON_ID_LENGTH = 64;
|
|
6062
|
-
REKOR_MAX_PERSON_HEADER_LENGTH = 32768;
|
|
6063
|
-
}
|
|
6064
|
-
});
|
|
6065
|
-
|
|
6066
5652
|
// ../../packages/core/dist/chunk-2PQCTEDW.js
|
|
6067
5653
|
function isPersonAccessAll(lists) {
|
|
6068
5654
|
return lists !== void 0 && lists.read.length === 1 && lists.read[0] === ACCESS_UNRESTRICTED && lists.write.length === 1 && lists.write[0] === ACCESS_UNRESTRICTED;
|
|
@@ -6195,7 +5781,7 @@ var init_chunk_2PQCTEDW = __esm({
|
|
|
6195
5781
|
}
|
|
6196
5782
|
});
|
|
6197
5783
|
|
|
6198
|
-
// ../../packages/core/dist/chunk-
|
|
5784
|
+
// ../../packages/core/dist/chunk-HVCJ2WAL.js
|
|
6199
5785
|
function boundCustomerPartyIsValid(audience, parties, customer) {
|
|
6200
5786
|
return audience !== REKOR_PERSON_AUDIENCE_STAFF && customer < parties.length && Array.isArray(parties[customer]);
|
|
6201
5787
|
}
|
|
@@ -6209,8 +5795,8 @@ function isEncodedBoundPerson(raw) {
|
|
|
6209
5795
|
return rekorBoundPersonSchema.safeParse(parsed).success;
|
|
6210
5796
|
}
|
|
6211
5797
|
var TOOLSET_SLUG_PATTERN, REKOR_STRUCTURAL_ID_PATTERN, baseEnvironmentSchema, toolsetFileToolSchema, toolsetSurfaceSchema, toolsetConnectionBindingSchema, seedConnectionBindingSchema, rekorSeedBindingSchema, rekorToolsetToolsSchema, rekorPersonIdSchema, rekorPersonAudienceSchema, rekorBoundPersonSchema, STATED_GENERATION_PATTERN, rekorBoundAttestation, rekorSeedAttestation, rekorResolvedToolsetSchema, REKOR_TOOL_KINDS_PARAM, REKOR_TOOL_KINDS_RESOLVE_SEARCH, resolvedRecordTypeSchema, reviewWritersSchema, sharedScopeSchema, resolvedFileToolSchema, rekorToolsetFileSchema, rekorToolsetFileUrlAnswerSchema, rekorToolsetFileListSchema, rekorToolsetFileGetSchema, rekorToolsetFilePutSchema, TOOLSET_CUSTOMER_FACING_REFUSAL_MARK, TOOLSET_CUSTOMER_FACING_REFUSAL, BASE_TOOLSET_ONLY_FOR_CUSTOMER_FACING, GENERIC_DATA_MCP_CUSTOMER_FACING_REFUSAL, GENERIC_DATA_API_CUSTOMER_FACING_REFUSAL;
|
|
6212
|
-
var
|
|
6213
|
-
"../../packages/core/dist/chunk-
|
|
5798
|
+
var init_chunk_HVCJ2WAL = __esm({
|
|
5799
|
+
"../../packages/core/dist/chunk-HVCJ2WAL.js"() {
|
|
6214
5800
|
"use strict";
|
|
6215
5801
|
init_chunk_2PQCTEDW();
|
|
6216
5802
|
init_chunk_LHTWT6HS();
|
|
@@ -6500,12 +6086,432 @@ var init_chunk_LM27W3HZ = __esm({
|
|
|
6500
6086
|
}
|
|
6501
6087
|
});
|
|
6502
6088
|
|
|
6503
|
-
// ../../packages/core/dist/chunk-
|
|
6089
|
+
// ../../packages/core/dist/chunk-6KMVY2W7.js
|
|
6090
|
+
var connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, BESIDE_LINK_FIELDS, setProductionCredentialBody, bindSeedConnectionBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery;
|
|
6091
|
+
var init_chunk_6KMVY2W7 = __esm({
|
|
6092
|
+
"../../packages/core/dist/chunk-6KMVY2W7.js"() {
|
|
6093
|
+
"use strict";
|
|
6094
|
+
init_chunk_MF2VVXBR();
|
|
6095
|
+
init_chunk_HVCJ2WAL();
|
|
6096
|
+
init_chunk_HZ6CADSY();
|
|
6097
|
+
init_zod();
|
|
6098
|
+
connectionIdParam = external_exports.object({ id: uuidSchema });
|
|
6099
|
+
connectorIdParam = external_exports.object({ id: uuidSchema });
|
|
6100
|
+
listConnectionsQuery = external_exports.object({ hub_id: uuidSchema });
|
|
6101
|
+
deleteConnectionQuery = external_exports.object({ hub_id: uuidSchema });
|
|
6102
|
+
addConnectionBody = external_exports.object({
|
|
6103
|
+
hub_id: uuidSchema,
|
|
6104
|
+
connector_id: uuidSchema,
|
|
6105
|
+
authentication_type: external_exports.string().optional(),
|
|
6106
|
+
inbound_mode: external_exports.enum(["wayai", "resend"]).optional(),
|
|
6107
|
+
inbound_address: external_exports.string().email().optional(),
|
|
6108
|
+
// Opt out of copying this connection's credentials into production on publish/sync.
|
|
6109
|
+
// Defaults to true at the DB layer.
|
|
6110
|
+
sync_credentials_to_production: external_exports.boolean().optional(),
|
|
6111
|
+
// When the connection's own secret expires; null for none (`credential-expiry.ts`).
|
|
6112
|
+
expires_at: credentialExpiresAtSchema.optional()
|
|
6113
|
+
}).passthrough().superRefine((data, ctx) => {
|
|
6114
|
+
if (data.inbound_mode === "resend" && !data.inbound_address) {
|
|
6115
|
+
ctx.addIssue({
|
|
6116
|
+
code: external_exports.ZodIssueCode.custom,
|
|
6117
|
+
message: "Receiving email address is required when using Resend inbound mode",
|
|
6118
|
+
path: ["inbound_address"]
|
|
6119
|
+
});
|
|
6120
|
+
}
|
|
6121
|
+
});
|
|
6122
|
+
editConnectionBody = external_exports.object({
|
|
6123
|
+
hub_id: uuidSchema,
|
|
6124
|
+
sync_credentials_to_production: external_exports.boolean().optional(),
|
|
6125
|
+
expires_at: credentialExpiresAtSchema.optional()
|
|
6126
|
+
}).passthrough();
|
|
6127
|
+
PRODUCTION_DIRECT_FIELDS = ["username", "api_key", "access_token", "password", "refresh_token", "webhook_secret_token", "webhook_signing_secret", "github_app_id", "github_app_private_key"];
|
|
6128
|
+
BESIDE_LINK_FIELDS = /* @__PURE__ */ new Set(["webhook_secret_token", "github_app_id", "github_app_private_key"]);
|
|
6129
|
+
setProductionCredentialBody = external_exports.object({
|
|
6130
|
+
hub_id: uuidSchema,
|
|
6131
|
+
organization_credential_id: external_exports.string().nullable().optional(),
|
|
6132
|
+
organization_credential_token_id: external_exports.string().nullable().optional(),
|
|
6133
|
+
username: external_exports.string().optional(),
|
|
6134
|
+
api_key: external_exports.string().optional(),
|
|
6135
|
+
access_token: external_exports.string().optional(),
|
|
6136
|
+
password: external_exports.string().optional(),
|
|
6137
|
+
refresh_token: external_exports.string().optional(),
|
|
6138
|
+
webhook_secret_token: external_exports.string().optional(),
|
|
6139
|
+
webhook_signing_secret: external_exports.string().optional(),
|
|
6140
|
+
github_app_id: external_exports.string().optional(),
|
|
6141
|
+
github_app_private_key: external_exports.string().optional(),
|
|
6142
|
+
expires_at: credentialExpiresAtSchema.optional()
|
|
6143
|
+
}).strict().superRefine((data, ctx) => {
|
|
6144
|
+
const hasOrgLink = !!data.organization_credential_id || !!data.organization_credential_token_id;
|
|
6145
|
+
const sets = (f) => data[f] != null && data[f] !== `__USE_EXISTING_${f.toUpperCase()}__`;
|
|
6146
|
+
const hasDirect = PRODUCTION_DIRECT_FIELDS.some(sets);
|
|
6147
|
+
const hasDirectBesideLink = PRODUCTION_DIRECT_FIELDS.some((f) => !BESIDE_LINK_FIELDS.has(f) && sets(f));
|
|
6148
|
+
if (hasOrgLink && hasDirectBesideLink) {
|
|
6149
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Provide either an organization credential link or direct credential fields, not both" });
|
|
6150
|
+
}
|
|
6151
|
+
if (hasOrgLink && data.expires_at != null) {
|
|
6152
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: LINKED_EXPIRY_REFUSAL, path: ["expires_at"] });
|
|
6153
|
+
}
|
|
6154
|
+
if (!hasOrgLink && !hasDirect && data.expires_at === void 0) {
|
|
6155
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "A credential is required: link an organization credential or provide a credential field" });
|
|
6156
|
+
}
|
|
6157
|
+
});
|
|
6158
|
+
bindSeedConnectionBody = external_exports.object({
|
|
6159
|
+
hub_id: uuidSchema,
|
|
6160
|
+
base_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
|
|
6161
|
+
token: external_exports.string().min(1).max(1024)
|
|
6162
|
+
}).strict();
|
|
6163
|
+
registerWhatsappQuery = external_exports.object({ hub_id: uuidSchema });
|
|
6164
|
+
registerWhatsappBody = external_exports.object({
|
|
6165
|
+
pin: external_exports.string().optional()
|
|
6166
|
+
});
|
|
6167
|
+
retryProvisioningQuery = external_exports.object({ hub_id: uuidSchema });
|
|
6168
|
+
resendDomainStatusQuery = external_exports.object({ hub_id: uuidSchema });
|
|
6169
|
+
}
|
|
6170
|
+
});
|
|
6171
|
+
|
|
6172
|
+
// ../../packages/core/dist/chunk-IPXBFWUU.js
|
|
6173
|
+
var variantAiModeSchema, experimentStatusSchema, overlayUpdateSchema, experimentIdParam, variantIdParam, listExperimentsQuery, listVariantsQuery, listOverridesQuery, deleteOverrideQuery, createExperimentBody, updateExperimentBody, setExperimentStatusBody, createVariantBody, updateVariantBody, upsertOverrideBody;
|
|
6174
|
+
var init_chunk_IPXBFWUU = __esm({
|
|
6175
|
+
"../../packages/core/dist/chunk-IPXBFWUU.js"() {
|
|
6176
|
+
"use strict";
|
|
6177
|
+
init_chunk_6TSQ5HXC();
|
|
6178
|
+
init_zod();
|
|
6179
|
+
variantAiModeSchema = external_exports.enum(["pilot+copilot", "pilot", "copilot", "turned_off"]);
|
|
6180
|
+
experimentStatusSchema = external_exports.enum(["draft", "running", "stopped"]);
|
|
6181
|
+
overlayUpdateSchema = external_exports.record(external_exports.unknown()).nullish().transform((v) => v === void 0 ? void 0 : v && Object.keys(v).length > 0 ? v : null);
|
|
6182
|
+
experimentIdParam = external_exports.object({
|
|
6183
|
+
id: external_exports.string().uuid()
|
|
6184
|
+
});
|
|
6185
|
+
variantIdParam = external_exports.object({
|
|
6186
|
+
id: external_exports.string().uuid()
|
|
6187
|
+
});
|
|
6188
|
+
listExperimentsQuery = external_exports.object({
|
|
6189
|
+
hub_id: external_exports.string().uuid()
|
|
6190
|
+
});
|
|
6191
|
+
listVariantsQuery = external_exports.object({
|
|
6192
|
+
hub_id: external_exports.string().uuid(),
|
|
6193
|
+
experiment_id: external_exports.string().uuid().optional()
|
|
6194
|
+
});
|
|
6195
|
+
listOverridesQuery = external_exports.object({
|
|
6196
|
+
hub_id: external_exports.string().uuid(),
|
|
6197
|
+
variant_id: external_exports.string().uuid()
|
|
6198
|
+
});
|
|
6199
|
+
deleteOverrideQuery = external_exports.object({
|
|
6200
|
+
hub_id: external_exports.string().uuid(),
|
|
6201
|
+
variant_id: external_exports.string().uuid(),
|
|
6202
|
+
agent_id: external_exports.string().uuid()
|
|
6203
|
+
});
|
|
6204
|
+
createExperimentBody = external_exports.object({
|
|
6205
|
+
hub_id: external_exports.string().uuid(),
|
|
6206
|
+
experiment_slug: slugSchema.optional(),
|
|
6207
|
+
experiment_name: external_exports.string().min(1, "experiment_name is required").max(100, "experiment_name must be 100 characters or fewer"),
|
|
6208
|
+
primary_metric: external_exports.string().max(200).nullish(),
|
|
6209
|
+
status: experimentStatusSchema.default("draft")
|
|
6210
|
+
});
|
|
6211
|
+
updateExperimentBody = external_exports.object({
|
|
6212
|
+
// experiment_slug is immutable after first persist — not accepted here.
|
|
6213
|
+
experiment_name: external_exports.string().min(1).max(100).optional(),
|
|
6214
|
+
primary_metric: external_exports.string().max(200).nullish(),
|
|
6215
|
+
control_variant_id: external_exports.string().uuid().nullish()
|
|
6216
|
+
});
|
|
6217
|
+
setExperimentStatusBody = external_exports.object({
|
|
6218
|
+
status: experimentStatusSchema
|
|
6219
|
+
});
|
|
6220
|
+
createVariantBody = external_exports.object({
|
|
6221
|
+
hub_id: external_exports.string().uuid(),
|
|
6222
|
+
experiment_id: external_exports.string().uuid(),
|
|
6223
|
+
label: external_exports.string().min(1, "label is required").max(100, "label must be 100 characters or fewer"),
|
|
6224
|
+
weight: external_exports.number().positive().default(1),
|
|
6225
|
+
ai_mode: variantAiModeSchema.nullish(),
|
|
6226
|
+
is_control: external_exports.boolean().default(false)
|
|
6227
|
+
});
|
|
6228
|
+
updateVariantBody = external_exports.object({
|
|
6229
|
+
label: external_exports.string().min(1).max(100).optional(),
|
|
6230
|
+
weight: external_exports.number().positive().optional(),
|
|
6231
|
+
ai_mode: variantAiModeSchema.nullish(),
|
|
6232
|
+
is_control: external_exports.boolean().optional()
|
|
6233
|
+
});
|
|
6234
|
+
upsertOverrideBody = external_exports.object({
|
|
6235
|
+
hub_id: external_exports.string().uuid(),
|
|
6236
|
+
variant_id: external_exports.string().uuid(),
|
|
6237
|
+
agent_id: external_exports.string().uuid(),
|
|
6238
|
+
instructions: external_exports.string().nullish(),
|
|
6239
|
+
additional_context_template: external_exports.string().nullish(),
|
|
6240
|
+
connection_id: external_exports.string().uuid().nullish(),
|
|
6241
|
+
agent_settings_overlay: overlayUpdateSchema
|
|
6242
|
+
});
|
|
6243
|
+
}
|
|
6244
|
+
});
|
|
6245
|
+
|
|
6246
|
+
// ../../packages/core/dist/chunk-AYLAGFAD.js
|
|
6247
|
+
var BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, BASE_CREDENTIAL_NAME_PATTERN, BASE_CREDENTIAL_NAME_CHARSET, baseCredentialNameSchema;
|
|
6248
|
+
var init_chunk_AYLAGFAD = __esm({
|
|
6249
|
+
"../../packages/core/dist/chunk-AYLAGFAD.js"() {
|
|
6250
|
+
"use strict";
|
|
6251
|
+
init_zod();
|
|
6252
|
+
BASE_CREDENTIAL_MANAGED_BY = {
|
|
6253
|
+
DIRECT: "direct",
|
|
6254
|
+
ORG_LINK: "org-link"
|
|
6255
|
+
};
|
|
6256
|
+
BASE_CREDENTIAL_NAME_MAX = 100;
|
|
6257
|
+
BASE_CREDENTIAL_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:@+~=-]*$/;
|
|
6258
|
+
BASE_CREDENTIAL_NAME_CHARSET = "letters, digits and '. _ : @ + ~ = -', starting with a letter or digit";
|
|
6259
|
+
baseCredentialNameSchema = external_exports.string().min(1).max(BASE_CREDENTIAL_NAME_MAX).regex(BASE_CREDENTIAL_NAME_PATTERN, `name must use ${BASE_CREDENTIAL_NAME_CHARSET}`);
|
|
6260
|
+
}
|
|
6261
|
+
});
|
|
6262
|
+
|
|
6263
|
+
// ../../packages/core/dist/chunk-DSKOMKRY.js
|
|
6264
|
+
var orgCredentialIdParam, listOrgCredentialsQuery, ORG_CREDENTIAL_SERVICE_REQUIRED, createOrgCredentialBody, updateOrgCredentialBody;
|
|
6265
|
+
var init_chunk_DSKOMKRY = __esm({
|
|
6266
|
+
"../../packages/core/dist/chunk-DSKOMKRY.js"() {
|
|
6267
|
+
"use strict";
|
|
6268
|
+
init_chunk_MF2VVXBR();
|
|
6269
|
+
init_chunk_ZTNFLGW5();
|
|
6270
|
+
init_zod();
|
|
6271
|
+
orgCredentialIdParam = external_exports.object({
|
|
6272
|
+
id: external_exports.string().uuid()
|
|
6273
|
+
});
|
|
6274
|
+
listOrgCredentialsQuery = external_exports.object({
|
|
6275
|
+
organization_id: external_exports.string().uuid(),
|
|
6276
|
+
hub_id: external_exports.string().uuid().optional()
|
|
6277
|
+
});
|
|
6278
|
+
ORG_CREDENTIAL_SERVICE_REQUIRED = "An organization credential must name the service it is for (connector_id): pick its Service in the console, or run `wayai create-credential --service <name>`, updating the WayAI CLI first if it has no --service. Nothing was created.";
|
|
6279
|
+
createOrgCredentialBody = external_exports.object({
|
|
6280
|
+
organization_id: external_exports.string().uuid(),
|
|
6281
|
+
credential_display_name: external_exports.string().min(1).max(255),
|
|
6282
|
+
credential_description: external_exports.string().max(1e3).nullish(),
|
|
6283
|
+
authentication_type: external_exports.enum(["api_key", "bearer", "basic_auth"]).or(
|
|
6284
|
+
external_exports.enum(["API Key", "Bearer Token", "Basic Auth"]).transform((v) => normalizeAuthType(v))
|
|
6285
|
+
),
|
|
6286
|
+
api_key: external_exports.string().optional(),
|
|
6287
|
+
access_token: external_exports.string().optional(),
|
|
6288
|
+
username: external_exports.string().optional(),
|
|
6289
|
+
password: external_exports.string().optional(),
|
|
6290
|
+
tags: external_exports.array(external_exports.string().uuid()).optional(),
|
|
6291
|
+
environment: external_exports.enum(["preview", "production", "all"]).optional(),
|
|
6292
|
+
expires_at: credentialExpiresAtSchema.optional(),
|
|
6293
|
+
/**
|
|
6294
|
+
* The service the credential is for: a catalog `connector_id` (wayai#5644). Required (owner decision Q2): its value goes
|
|
6295
|
+
* to the credentials vault under that connector, and a credential naming none had nowhere there to go. It links only to
|
|
6296
|
+
* connections of that service, and is fixed for the credential's life. A connector whose host the customer types (REST
|
|
6297
|
+
* API, External Resources, MCP Server) is refused: its value is entered on the connection. A client that sends none (a
|
|
6298
|
+
* CLI from before `--service`) is refused with {@link ORG_CREDENTIAL_SERVICE_REQUIRED}.
|
|
6299
|
+
*/
|
|
6300
|
+
connector_id: external_exports.string({ required_error: ORG_CREDENTIAL_SERVICE_REQUIRED }).uuid()
|
|
6301
|
+
});
|
|
6302
|
+
updateOrgCredentialBody = external_exports.object({
|
|
6303
|
+
credential_display_name: external_exports.string().min(1).max(255).optional(),
|
|
6304
|
+
credential_description: external_exports.string().max(1e3).nullish(),
|
|
6305
|
+
api_key: external_exports.string().optional(),
|
|
6306
|
+
access_token: external_exports.string().optional(),
|
|
6307
|
+
username: external_exports.string().optional(),
|
|
6308
|
+
password: external_exports.string().optional(),
|
|
6309
|
+
tags: external_exports.array(external_exports.string().uuid()).optional(),
|
|
6310
|
+
environment: external_exports.enum(["preview", "production", "all"]).optional(),
|
|
6311
|
+
// Absent keeps the stored date, unless the request stores a new secret, which clears it.
|
|
6312
|
+
expires_at: credentialExpiresAtSchema.optional()
|
|
6313
|
+
});
|
|
6314
|
+
}
|
|
6315
|
+
});
|
|
6316
|
+
|
|
6317
|
+
// ../../packages/core/dist/chunk-HIGKBEPF.js
|
|
6318
|
+
var accessExplainQuery;
|
|
6319
|
+
var init_chunk_HIGKBEPF = __esm({
|
|
6320
|
+
"../../packages/core/dist/chunk-HIGKBEPF.js"() {
|
|
6321
|
+
"use strict";
|
|
6322
|
+
init_chunk_HZ6CADSY();
|
|
6323
|
+
init_zod();
|
|
6324
|
+
accessExplainQuery = external_exports.object({
|
|
6325
|
+
user_id: external_exports.string().regex(USER_ID_REGEX).optional()
|
|
6326
|
+
});
|
|
6327
|
+
}
|
|
6328
|
+
});
|
|
6329
|
+
|
|
6330
|
+
// ../../packages/core/dist/chunk-KEN2DASI.js
|
|
6331
|
+
var SECOND_FACTOR_TIERS, secondFactorTier, META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, normalizeEmail, REVIEW_ACCOUNT_EMAILS;
|
|
6332
|
+
var init_chunk_KEN2DASI = __esm({
|
|
6333
|
+
"../../packages/core/dist/chunk-KEN2DASI.js"() {
|
|
6334
|
+
"use strict";
|
|
6335
|
+
init_zod();
|
|
6336
|
+
SECOND_FACTOR_TIERS = ["off", "settings"];
|
|
6337
|
+
secondFactorTier = external_exports.enum(SECOND_FACTOR_TIERS);
|
|
6338
|
+
META_ENTITY_ID_PATTERN = /^\d{1,32}$/;
|
|
6339
|
+
metaEntityId = external_exports.string().regex(META_ENTITY_ID_PATTERN, "must be a numeric Meta entity id");
|
|
6340
|
+
whatsappCallbackBody = external_exports.object({
|
|
6341
|
+
state: external_exports.string().min(1, "state is required"),
|
|
6342
|
+
code: external_exports.string().optional(),
|
|
6343
|
+
access_token: external_exports.string().optional(),
|
|
6344
|
+
user_id: external_exports.string().optional(),
|
|
6345
|
+
/**
|
|
6346
|
+
* The phone number and WABA the operator actually picked in Meta's Embedded
|
|
6347
|
+
* Signup popup (posted to the opener as `WA_EMBEDDED_SIGNUP`). Optional:
|
|
6348
|
+
* older clients, and the redirect-based flow, never see that event and fall
|
|
6349
|
+
* back to discovery.
|
|
6350
|
+
*/
|
|
6351
|
+
phone_number_id: metaEntityId.optional(),
|
|
6352
|
+
waba_id: metaEntityId.optional()
|
|
6353
|
+
}).refine(
|
|
6354
|
+
(data) => !!data.access_token || !!data.code,
|
|
6355
|
+
{ message: "Missing required parameters: state and either access_token or code" }
|
|
6356
|
+
);
|
|
6357
|
+
authMeResponse = external_exports.object({
|
|
6358
|
+
user_id: external_exports.string(),
|
|
6359
|
+
email: external_exports.string(),
|
|
6360
|
+
org_id: external_exports.string().nullable(),
|
|
6361
|
+
is_platform_admin: external_exports.boolean()
|
|
6362
|
+
});
|
|
6363
|
+
wsTicketResponse = external_exports.object({
|
|
6364
|
+
ticket: external_exports.string(),
|
|
6365
|
+
/** Seconds until the ticket expires if unconsumed. */
|
|
6366
|
+
expires_in: external_exports.number()
|
|
6367
|
+
});
|
|
6368
|
+
sessionCheckResponse = external_exports.object({
|
|
6369
|
+
valid: external_exports.literal(true)
|
|
6370
|
+
});
|
|
6371
|
+
logoutResponse = external_exports.object({
|
|
6372
|
+
success: external_exports.literal(true)
|
|
6373
|
+
});
|
|
6374
|
+
magicCodeSendBody = external_exports.object({
|
|
6375
|
+
email: external_exports.string().email("Invalid email").max(254)
|
|
6376
|
+
// RFC 5321 max; bounds the request payload
|
|
6377
|
+
});
|
|
6378
|
+
magicCodeSendResponse = external_exports.object({
|
|
6379
|
+
success: external_exports.literal(true)
|
|
6380
|
+
});
|
|
6381
|
+
magicCodeVerifyBody = external_exports.object({
|
|
6382
|
+
email: external_exports.string().email("Invalid email").max(254),
|
|
6383
|
+
// RFC 5321 max; bounds the request payload
|
|
6384
|
+
code: external_exports.string().min(1, "Code is required").max(12)
|
|
6385
|
+
// WorkOS sends a 6-digit code; bound the input
|
|
6386
|
+
});
|
|
6387
|
+
magicCodeVerifyResponse = external_exports.object({
|
|
6388
|
+
access_token: external_exports.string(),
|
|
6389
|
+
refresh_token: external_exports.string()
|
|
6390
|
+
});
|
|
6391
|
+
passwordLoginBody = external_exports.object({
|
|
6392
|
+
email: external_exports.string().email("Invalid email").max(254),
|
|
6393
|
+
// RFC 5321 max; bounds the request payload
|
|
6394
|
+
password: external_exports.string().min(1, "Password is required").max(128)
|
|
6395
|
+
// bound the payload; WorkOS validates
|
|
6396
|
+
});
|
|
6397
|
+
normalizeEmail = (email) => email.trim().toLowerCase();
|
|
6398
|
+
REVIEW_ACCOUNT_EMAILS = new Set(
|
|
6399
|
+
["apple.review@wayai.pro", "play.review@wayai.pro", "microsoft.review@wayai.pro", "meta.review@wayai.pro"].map(
|
|
6400
|
+
normalizeEmail
|
|
6401
|
+
)
|
|
6402
|
+
);
|
|
6403
|
+
}
|
|
6404
|
+
});
|
|
6405
|
+
|
|
6406
|
+
// ../../packages/core/dist/chunk-PFGVH2CX.js
|
|
6407
|
+
var secondFactorCode, secondFactorRecoveryCode, secondFactorCodeBody, secondFactorRecoveryBody, secondFactorDisableBody, setOrgSecondFactorBody;
|
|
6408
|
+
var init_chunk_PFGVH2CX = __esm({
|
|
6409
|
+
"../../packages/core/dist/chunk-PFGVH2CX.js"() {
|
|
6410
|
+
"use strict";
|
|
6411
|
+
init_chunk_KEN2DASI();
|
|
6412
|
+
init_zod();
|
|
6413
|
+
secondFactorCode = external_exports.string().regex(/^\d{6}$/, "Enter the 6-digit code");
|
|
6414
|
+
secondFactorRecoveryCode = external_exports.string().min(1, "Enter a recovery code").max(64);
|
|
6415
|
+
secondFactorCodeBody = external_exports.object({ code: secondFactorCode });
|
|
6416
|
+
secondFactorRecoveryBody = external_exports.object({ recovery_code: secondFactorRecoveryCode });
|
|
6417
|
+
secondFactorDisableBody = external_exports.union([
|
|
6418
|
+
external_exports.object({ code: secondFactorCode, recovery_code: external_exports.undefined().optional() }),
|
|
6419
|
+
external_exports.object({ recovery_code: secondFactorRecoveryCode, code: external_exports.undefined().optional() })
|
|
6420
|
+
]);
|
|
6421
|
+
setOrgSecondFactorBody = external_exports.object({ tier: secondFactorTier });
|
|
6422
|
+
}
|
|
6423
|
+
});
|
|
6424
|
+
|
|
6425
|
+
// ../../packages/core/dist/chunk-WE4KMHZK.js
|
|
6426
|
+
var bootstrapQuery;
|
|
6427
|
+
var init_chunk_WE4KMHZK = __esm({
|
|
6428
|
+
"../../packages/core/dist/chunk-WE4KMHZK.js"() {
|
|
6429
|
+
"use strict";
|
|
6430
|
+
init_zod();
|
|
6431
|
+
bootstrapQuery = external_exports.object({
|
|
6432
|
+
active_hub_id: external_exports.string().uuid().optional(),
|
|
6433
|
+
active_conversation_id: external_exports.string().uuid().optional(),
|
|
6434
|
+
active_nav: external_exports.enum(["chat", "task", "support"]).optional(),
|
|
6435
|
+
/**
|
|
6436
|
+
* The people thread the URL names (`/chat/threads/:threadId`, gh #4661): the snapshot
|
|
6437
|
+
* preloads it as `people.active_thread` when the viewer is a member.
|
|
6438
|
+
*/
|
|
6439
|
+
active_thread_id: external_exports.string().uuid().optional()
|
|
6440
|
+
});
|
|
6441
|
+
}
|
|
6442
|
+
});
|
|
6443
|
+
|
|
6444
|
+
// ../../packages/core/dist/chunk-SCC6AVLY.js
|
|
6445
|
+
var PERMISSIONS;
|
|
6446
|
+
var init_chunk_SCC6AVLY = __esm({
|
|
6447
|
+
"../../packages/core/dist/chunk-SCC6AVLY.js"() {
|
|
6448
|
+
"use strict";
|
|
6449
|
+
PERMISSIONS = [
|
|
6450
|
+
"hub:read",
|
|
6451
|
+
"hub:write",
|
|
6452
|
+
"hub:admin",
|
|
6453
|
+
"conversation:read",
|
|
6454
|
+
"conversation:write",
|
|
6455
|
+
"analytics:read",
|
|
6456
|
+
"billing:read",
|
|
6457
|
+
"billing:write",
|
|
6458
|
+
"org:read",
|
|
6459
|
+
"org:write",
|
|
6460
|
+
"org:admin",
|
|
6461
|
+
"contacts:write",
|
|
6462
|
+
"platform:admin",
|
|
6463
|
+
"*"
|
|
6464
|
+
];
|
|
6465
|
+
}
|
|
6466
|
+
});
|
|
6467
|
+
|
|
6468
|
+
// ../../packages/core/dist/chunk-P5GJNS5R.js
|
|
6469
|
+
var MAX_NAME_LENGTH, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam;
|
|
6470
|
+
var init_chunk_P5GJNS5R = __esm({
|
|
6471
|
+
"../../packages/core/dist/chunk-P5GJNS5R.js"() {
|
|
6472
|
+
"use strict";
|
|
6473
|
+
init_chunk_SCC6AVLY();
|
|
6474
|
+
init_chunk_HZ6CADSY();
|
|
6475
|
+
init_zod();
|
|
6476
|
+
MAX_NAME_LENGTH = 100;
|
|
6477
|
+
MAX_HUBS_PER_GRANT = 50;
|
|
6478
|
+
MAX_HUB_TAGS_PER_GRANT = 20;
|
|
6479
|
+
MAX_GRANTS = 20;
|
|
6480
|
+
permissionEnum = external_exports.enum(PERMISSIONS).refine(
|
|
6481
|
+
(p) => p !== "platform:admin",
|
|
6482
|
+
{ message: "platform:admin cannot be delegated via token creation" }
|
|
6483
|
+
);
|
|
6484
|
+
grantScopeSchema = external_exports.object({
|
|
6485
|
+
// Required: every token grant must declare its org tenancy. The handler
|
|
6486
|
+
// also strict-checks this as defense-in-depth, but failing at the Zod
|
|
6487
|
+
// boundary keeps the generated client type honest (org_id: string).
|
|
6488
|
+
org_id: external_exports.string().min(1),
|
|
6489
|
+
hubs: external_exports.array(external_exports.string().min(1)).min(1, "Each grant must have scope.hubs as a non-empty array").max(MAX_HUBS_PER_GRANT),
|
|
6490
|
+
hub_tags: external_exports.array(external_exports.string().min(1)).min(1, "scope.hub_tags must be a non-empty array if provided").max(MAX_HUB_TAGS_PER_GRANT).optional(),
|
|
6491
|
+
environments: external_exports.array(external_exports.enum(["production", "preview"])).min(1, "scope.environments must be a non-empty array if provided").optional()
|
|
6492
|
+
}).strict();
|
|
6493
|
+
grantSchema = external_exports.object({
|
|
6494
|
+
scope: grantScopeSchema,
|
|
6495
|
+
permissions: external_exports.array(permissionEnum).min(1, "Each grant must have permissions as a non-empty array")
|
|
6496
|
+
}).strict();
|
|
6497
|
+
createTokenBody = external_exports.object({
|
|
6498
|
+
name: external_exports.string().trim().min(1, "name is required").max(MAX_NAME_LENGTH, `name must be ${MAX_NAME_LENGTH} characters or fewer`),
|
|
6499
|
+
grants: external_exports.array(grantSchema).min(1, "grants must be a non-empty array").max(MAX_GRANTS),
|
|
6500
|
+
expires_at: external_exports.string().datetime({ message: "expires_at must be a valid ISO 8601 date" }).refine(
|
|
6501
|
+
(s) => new Date(s).getTime() > Date.now(),
|
|
6502
|
+
{ message: "expires_at must be in the future" }
|
|
6503
|
+
).optional()
|
|
6504
|
+
});
|
|
6505
|
+
tokenOrgIdParam = external_exports.object({ orgId: uuidSchema });
|
|
6506
|
+
}
|
|
6507
|
+
});
|
|
6508
|
+
|
|
6509
|
+
// ../../packages/core/dist/chunk-OSWY3GQY.js
|
|
6504
6510
|
var TOOLSET_ANSWER_PERSON_PARTIES, toolsetAnswerPersonSchema, toolsetAnswerPersonsSchema;
|
|
6505
|
-
var
|
|
6506
|
-
"../../packages/core/dist/chunk-
|
|
6511
|
+
var init_chunk_OSWY3GQY = __esm({
|
|
6512
|
+
"../../packages/core/dist/chunk-OSWY3GQY.js"() {
|
|
6507
6513
|
"use strict";
|
|
6508
|
-
|
|
6514
|
+
init_chunk_HVCJ2WAL();
|
|
6509
6515
|
init_chunk_LHTWT6HS();
|
|
6510
6516
|
init_zod();
|
|
6511
6517
|
TOOLSET_ANSWER_PERSON_PARTIES = ["requester", "originator", "initiator", "delegator"];
|
|
@@ -8062,12 +8068,12 @@ var init_chunk_FBV7NLKO = __esm({
|
|
|
8062
8068
|
}
|
|
8063
8069
|
});
|
|
8064
8070
|
|
|
8065
|
-
// ../../packages/core/dist/chunk-
|
|
8071
|
+
// ../../packages/core/dist/chunk-TBQYMMC2.js
|
|
8066
8072
|
var hubPageWatchParam, pageWatchedBaseSchema, hubPageWatchResponseSchema;
|
|
8067
|
-
var
|
|
8068
|
-
"../../packages/core/dist/chunk-
|
|
8073
|
+
var init_chunk_TBQYMMC2 = __esm({
|
|
8074
|
+
"../../packages/core/dist/chunk-TBQYMMC2.js"() {
|
|
8069
8075
|
"use strict";
|
|
8070
|
-
|
|
8076
|
+
init_chunk_HVCJ2WAL();
|
|
8071
8077
|
init_chunk_FBV7NLKO();
|
|
8072
8078
|
init_chunk_HZ6CADSY();
|
|
8073
8079
|
init_zod();
|
|
@@ -12884,7 +12890,7 @@ var init_chunk_2ISUBJG7 = __esm({
|
|
|
12884
12890
|
}
|
|
12885
12891
|
});
|
|
12886
12892
|
|
|
12887
|
-
// ../../packages/core/dist/chunk-
|
|
12893
|
+
// ../../packages/core/dist/chunk-LIE6DQT2.js
|
|
12888
12894
|
function describeRole(role) {
|
|
12889
12895
|
if (typeof role === "string") {
|
|
12890
12896
|
return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
|
|
@@ -13063,8 +13069,8 @@ function terminalRunCount(counts) {
|
|
|
13063
13069
|
return counts.successful_runs + counts.failed_runs;
|
|
13064
13070
|
}
|
|
13065
13071
|
var evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, EVAL_FIXTURE_NAME_MAX_LENGTH, evalFixtureOverrideSchema, runSessionQuery, runJourneyQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, EVAL_PERSON_MAX, evalPersonSchema, EVAL_PERSON_ALIAS_RETIRED, EVAL_PERSON_ALIAS_REFUSED, evalBody, EVAL_LIST_MAX_LIMIT, evalListLimit, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, EVAL_MAX_SELECTED_SCENARIOS, evalScenarioSelectionEntrySchema, evalScenarioSelectionSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, evalAttachmentRef, turnMayCarryAttachments, ATTACHMENTS_USER_ONLY_MESSAGE, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, fixtureField, createJourneyBody, updateJourneyBody, evalSessionConfigResponseSchema, evalSessionResponseSchema, evalSessionListConfigSchema, evalSessionListItemSchema, seedReleaseStatusSchema, EVAL_SESSION_NOT_QUIESCENT;
|
|
13066
|
-
var
|
|
13067
|
-
"../../packages/core/dist/chunk-
|
|
13072
|
+
var init_chunk_LIE6DQT2 = __esm({
|
|
13073
|
+
"../../packages/core/dist/chunk-LIE6DQT2.js"() {
|
|
13068
13074
|
"use strict";
|
|
13069
13075
|
init_chunk_2YEGUQR7();
|
|
13070
13076
|
init_chunk_LHTWT6HS();
|
|
@@ -13917,7 +13923,7 @@ var init_chunk_PIZTARVG = __esm({
|
|
|
13917
13923
|
}
|
|
13918
13924
|
});
|
|
13919
13925
|
|
|
13920
|
-
// ../../packages/core/dist/chunk-
|
|
13926
|
+
// ../../packages/core/dist/chunk-XEG3QEIZ.js
|
|
13921
13927
|
function refineLaneReferences(val, ctx) {
|
|
13922
13928
|
const lanes = val.lanes;
|
|
13923
13929
|
const statuses = val.kanban_statuses;
|
|
@@ -13941,8 +13947,8 @@ function describeSyncWarning(warning) {
|
|
|
13941
13947
|
return `${label3}: ${parts.join("; ")}. Promote the base so production's tools match the preview's.`;
|
|
13942
13948
|
}
|
|
13943
13949
|
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;
|
|
13944
|
-
var
|
|
13945
|
-
"../../packages/core/dist/chunk-
|
|
13950
|
+
var init_chunk_XEG3QEIZ = __esm({
|
|
13951
|
+
"../../packages/core/dist/chunk-XEG3QEIZ.js"() {
|
|
13946
13952
|
"use strict";
|
|
13947
13953
|
init_chunk_D3EP4TDU();
|
|
13948
13954
|
init_chunk_YZHCIGDZ();
|
|
@@ -14039,7 +14045,7 @@ var init_chunk_B32UCOKG = __esm({
|
|
|
14039
14045
|
fallback_connection_id: uuidSchema.nullable().optional(),
|
|
14040
14046
|
// Rekor API connection used to reset/clear eval seed fixtures (gh #3090). A
|
|
14041
14047
|
// connection id on this hub (a REST API (custom tool) connection whose base_url
|
|
14042
|
-
// is the
|
|
14048
|
+
// is the data API's origin, bound to its base with no token stored: wayai#5644). Validated at
|
|
14043
14049
|
// set-time on the REST PATCH (setup/hubs.ts). Nullable to clear it.
|
|
14044
14050
|
seed_connection_id: uuidSchema.nullable().optional(),
|
|
14045
14051
|
// Org tag ids, replacing the hub's; null clears them. A change is refused to anyone
|
|
@@ -14141,7 +14147,7 @@ var init_chunk_B32UCOKG = __esm({
|
|
|
14141
14147
|
}
|
|
14142
14148
|
});
|
|
14143
14149
|
|
|
14144
|
-
// ../../packages/core/dist/chunk-
|
|
14150
|
+
// ../../packages/core/dist/chunk-3LM6A6Y3.js
|
|
14145
14151
|
function declaresNoConnection(agent) {
|
|
14146
14152
|
return agent.connection === null && !agent.connection_id;
|
|
14147
14153
|
}
|
|
@@ -14873,16 +14879,16 @@ function skillSectionsAsResources(scope) {
|
|
|
14873
14879
|
};
|
|
14874
14880
|
}
|
|
14875
14881
|
var MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, MAX_HUB_AS_CODE_PAGE_MANIFEST_CHARS, hubAsCodePagesSchema, MAX_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, HUB_AS_CODE_AGENT_TOOL_KEYS, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, flagEntriesOf, boundedHubAsCodeResourcesSchema, isPlainObject, MIN_SKILLS_LAYOUT_CLI, MAX_HUB_AS_CODE_DEPTH, NAMED_DEPTH_SEGMENTS, NAMED_DEPTH_KEY_CHARS, fieldName, 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;
|
|
14876
|
-
var
|
|
14877
|
-
"../../packages/core/dist/chunk-
|
|
14882
|
+
var init_chunk_3LM6A6Y3 = __esm({
|
|
14883
|
+
"../../packages/core/dist/chunk-3LM6A6Y3.js"() {
|
|
14878
14884
|
"use strict";
|
|
14879
14885
|
init_chunk_JSPSTJH4();
|
|
14880
14886
|
init_chunk_2PQCTEDW();
|
|
14881
|
-
|
|
14887
|
+
init_chunk_LIE6DQT2();
|
|
14882
14888
|
init_chunk_WRLPUYS3();
|
|
14883
14889
|
init_chunk_LBDH7LCG();
|
|
14884
14890
|
init_chunk_4LXDRTO4();
|
|
14885
|
-
|
|
14891
|
+
init_chunk_XEG3QEIZ();
|
|
14886
14892
|
init_chunk_YZHCIGDZ();
|
|
14887
14893
|
init_chunk_PIZTARVG();
|
|
14888
14894
|
init_chunk_FBV7NLKO();
|
|
@@ -17082,7 +17088,7 @@ var init_chunk_OMPT4ZHR = __esm({
|
|
|
17082
17088
|
}
|
|
17083
17089
|
});
|
|
17084
17090
|
|
|
17085
|
-
// ../../packages/core/dist/chunk-
|
|
17091
|
+
// ../../packages/core/dist/chunk-3UITNZV5.js
|
|
17086
17092
|
function refineScopedTarget(data, ctx) {
|
|
17087
17093
|
if (data.scope === "org") {
|
|
17088
17094
|
if (!data.org_id) {
|
|
@@ -17108,13 +17114,13 @@ function refineScopedTarget(data, ctx) {
|
|
|
17108
17114
|
}
|
|
17109
17115
|
}
|
|
17110
17116
|
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, casesLimit, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, adminDryRunByDefaultTargetBody, WAYAI_HOST_TOKEN_TARGET_KINDS, WAYAI_HOST_TOKEN_MAX_TARGETS, adminClearWayaiHostTokensBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCredentialServicesBody, 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;
|
|
17111
|
-
var
|
|
17112
|
-
"../../packages/core/dist/chunk-
|
|
17117
|
+
var init_chunk_3UITNZV5 = __esm({
|
|
17118
|
+
"../../packages/core/dist/chunk-3UITNZV5.js"() {
|
|
17113
17119
|
"use strict";
|
|
17114
17120
|
init_chunk_FECLIZTY();
|
|
17115
17121
|
init_chunk_BFG4ZWR4();
|
|
17116
17122
|
init_chunk_7VJ4SOFF();
|
|
17117
|
-
|
|
17123
|
+
init_chunk_XEG3QEIZ();
|
|
17118
17124
|
init_chunk_OMPT4ZHR();
|
|
17119
17125
|
init_chunk_HZ6CADSY();
|
|
17120
17126
|
init_chunk_MIWZOSPI();
|
|
@@ -17688,7 +17694,7 @@ var init_contracts = __esm({
|
|
|
17688
17694
|
init_chunk_VXEAR36B();
|
|
17689
17695
|
init_chunk_RACEDHG6();
|
|
17690
17696
|
init_chunk_Q7KIQHAZ();
|
|
17691
|
-
|
|
17697
|
+
init_chunk_6KMVY2W7();
|
|
17692
17698
|
init_chunk_IPXBFWUU();
|
|
17693
17699
|
init_chunk_AYLAGFAD();
|
|
17694
17700
|
init_chunk_DSKOMKRY();
|
|
@@ -17697,7 +17703,7 @@ var init_contracts = __esm({
|
|
|
17697
17703
|
init_chunk_PFGVH2CX();
|
|
17698
17704
|
init_chunk_WE4KMHZK();
|
|
17699
17705
|
init_chunk_P5GJNS5R();
|
|
17700
|
-
|
|
17706
|
+
init_chunk_OSWY3GQY();
|
|
17701
17707
|
init_chunk_ZC6YGHNX();
|
|
17702
17708
|
init_chunk_MGBAXT5Y();
|
|
17703
17709
|
init_chunk_5DGHIY7L();
|
|
@@ -17705,8 +17711,8 @@ var init_contracts = __esm({
|
|
|
17705
17711
|
init_chunk_IPDOHAZ5();
|
|
17706
17712
|
init_chunk_34LE6P7E();
|
|
17707
17713
|
init_chunk_FPSDNS2E();
|
|
17708
|
-
|
|
17709
|
-
|
|
17714
|
+
init_chunk_TBQYMMC2();
|
|
17715
|
+
init_chunk_HVCJ2WAL();
|
|
17710
17716
|
init_chunk_ZXK6N2HN();
|
|
17711
17717
|
init_chunk_Y7CFCYX4();
|
|
17712
17718
|
init_chunk_OABSWQ6P();
|
|
@@ -17724,10 +17730,10 @@ var init_contracts = __esm({
|
|
|
17724
17730
|
init_chunk_KSTYTQ7I();
|
|
17725
17731
|
init_chunk_LKBSHANA();
|
|
17726
17732
|
init_chunk_FMB4KA3N();
|
|
17727
|
-
|
|
17733
|
+
init_chunk_3LM6A6Y3();
|
|
17728
17734
|
init_chunk_JSPSTJH4();
|
|
17729
17735
|
init_chunk_2PQCTEDW();
|
|
17730
|
-
|
|
17736
|
+
init_chunk_LIE6DQT2();
|
|
17731
17737
|
init_chunk_2YEGUQR7();
|
|
17732
17738
|
init_chunk_LHTWT6HS();
|
|
17733
17739
|
init_chunk_JDJ4EUOL();
|
|
@@ -17764,11 +17770,11 @@ var init_contracts = __esm({
|
|
|
17764
17770
|
init_chunk_N7TIWXUC();
|
|
17765
17771
|
init_chunk_IZPR5A6I();
|
|
17766
17772
|
init_chunk_NVKU5PPQ();
|
|
17767
|
-
|
|
17773
|
+
init_chunk_3UITNZV5();
|
|
17768
17774
|
init_chunk_FECLIZTY();
|
|
17769
17775
|
init_chunk_BFG4ZWR4();
|
|
17770
17776
|
init_chunk_7VJ4SOFF();
|
|
17771
|
-
|
|
17777
|
+
init_chunk_XEG3QEIZ();
|
|
17772
17778
|
init_chunk_D3EP4TDU();
|
|
17773
17779
|
init_chunk_YZHCIGDZ();
|
|
17774
17780
|
init_chunk_PIZTARVG();
|
|
@@ -19120,6 +19126,7 @@ var init_utils = __esm({
|
|
|
19120
19126
|
["create-credential", { positionals: 0, values: ["--name", "--type", "--service", "--org", "--description", "--tag", "--environment"] }],
|
|
19121
19127
|
["update-credential", { positionals: 0, values: ["--name", "--rename", "--org", "--description", "--tag", "--environment"] }],
|
|
19122
19128
|
["set-connection-credential", { positionals: 0, values: ["--hub", "--connection", "--org-credential", "--field"] }],
|
|
19129
|
+
["bind-seed-connection", { positionals: 0, values: ["--hub", "--connection", "--base"] }],
|
|
19123
19130
|
["org create", { positionals: 1, values: ["--region"] }],
|
|
19124
19131
|
["org pull", { positionals: 0 }],
|
|
19125
19132
|
["org diff", { positionals: 0 }],
|
|
@@ -20221,6 +20228,13 @@ var init_api_client = __esm({
|
|
|
20221
20228
|
async setPreviewConnectionCredential(connectionId, body) {
|
|
20222
20229
|
return this.request("PATCH", `/api/setup/connections/${connectionId}`, body);
|
|
20223
20230
|
}
|
|
20231
|
+
/**
|
|
20232
|
+
* Bind a PREVIEW hub's eval seed connection to one base with that base's `write:seeds` token, which the server uses
|
|
20233
|
+
* once to read its binding and never stores (wayai#5644).
|
|
20234
|
+
*/
|
|
20235
|
+
async bindSeedConnection(connectionId, body) {
|
|
20236
|
+
return this.request("POST", `/api/setup/connections/${connectionId}/seed-binding`, body);
|
|
20237
|
+
}
|
|
20224
20238
|
/** Set a credential on a PRODUCTION connection (the sanctioned carve-out). */
|
|
20225
20239
|
async setProductionConnectionCredential(connectionId, body) {
|
|
20226
20240
|
return this.request("PATCH", `/api/setup/connections/${connectionId}/production-credential`, body);
|
|
@@ -23168,7 +23182,7 @@ var init_pages2 = __esm({
|
|
|
23168
23182
|
var init_evals = __esm({
|
|
23169
23183
|
"../../packages/core/dist/contracts/evals.js"() {
|
|
23170
23184
|
"use strict";
|
|
23171
|
-
|
|
23185
|
+
init_chunk_LIE6DQT2();
|
|
23172
23186
|
init_chunk_2YEGUQR7();
|
|
23173
23187
|
init_chunk_LHTWT6HS();
|
|
23174
23188
|
init_chunk_4LXDRTO4();
|
|
@@ -24196,16 +24210,16 @@ var init_hub_materializer = __esm({
|
|
|
24196
24210
|
var init_ci = __esm({
|
|
24197
24211
|
"../../packages/core/dist/contracts/ci.js"() {
|
|
24198
24212
|
"use strict";
|
|
24199
|
-
|
|
24213
|
+
init_chunk_3LM6A6Y3();
|
|
24200
24214
|
init_chunk_JSPSTJH4();
|
|
24201
24215
|
init_chunk_2PQCTEDW();
|
|
24202
|
-
|
|
24216
|
+
init_chunk_LIE6DQT2();
|
|
24203
24217
|
init_chunk_2YEGUQR7();
|
|
24204
24218
|
init_chunk_LHTWT6HS();
|
|
24205
24219
|
init_chunk_WRLPUYS3();
|
|
24206
24220
|
init_chunk_LBDH7LCG();
|
|
24207
24221
|
init_chunk_4LXDRTO4();
|
|
24208
|
-
|
|
24222
|
+
init_chunk_XEG3QEIZ();
|
|
24209
24223
|
init_chunk_D3EP4TDU();
|
|
24210
24224
|
init_chunk_YZHCIGDZ();
|
|
24211
24225
|
init_chunk_PIZTARVG();
|
|
@@ -36592,6 +36606,63 @@ var init_set_connection_credential = __esm({
|
|
|
36592
36606
|
}
|
|
36593
36607
|
});
|
|
36594
36608
|
|
|
36609
|
+
// src/commands/bind-seed-connection.ts
|
|
36610
|
+
var bind_seed_connection_exports = {};
|
|
36611
|
+
__export(bind_seed_connection_exports, {
|
|
36612
|
+
bindSeedConnectionCommand: () => bindSeedConnectionCommand,
|
|
36613
|
+
parseArgs: () => parseArgs22
|
|
36614
|
+
});
|
|
36615
|
+
function parseArgs22(args2) {
|
|
36616
|
+
let connection;
|
|
36617
|
+
let base;
|
|
36618
|
+
let stdin = false;
|
|
36619
|
+
for (let i = 0; i < args2.length; i++) {
|
|
36620
|
+
if (args2[i] === "--connection" && args2[i + 1]) connection = args2[++i];
|
|
36621
|
+
else if (args2[i] === "--base" && args2[i + 1]) base = args2[++i];
|
|
36622
|
+
else if (args2[i] === "--stdin") stdin = true;
|
|
36623
|
+
}
|
|
36624
|
+
return { connection, base, stdin };
|
|
36625
|
+
}
|
|
36626
|
+
function usage3(msg) {
|
|
36627
|
+
if (msg) console.error(`${msg}
|
|
36628
|
+
`);
|
|
36629
|
+
console.error('Usage: printf %s "$SEED_TOKEN" | wayai bind-seed-connection --hub <id|name> --connection <name|id> --base <base_id> --stdin');
|
|
36630
|
+
console.error(" --connection <name|id> the hub's seed connection (`seed_connection:` in hub.yaml)");
|
|
36631
|
+
console.error(" --base <base_id> the base its evals seed (their `target_base`)");
|
|
36632
|
+
console.error(" --stdin read the base's write:seeds token from stdin (otherwise it is prompted for); it is used once and never stored");
|
|
36633
|
+
process.exit(1);
|
|
36634
|
+
}
|
|
36635
|
+
async function bindSeedConnectionCommand(args2) {
|
|
36636
|
+
const hubId = resolveActiveHubId(args2);
|
|
36637
|
+
const parsed = parseArgs22(args2);
|
|
36638
|
+
if (!parsed.connection) usage3("Missing required flag: --connection <name|id>");
|
|
36639
|
+
if (!parsed.base) usage3("Missing required flag: --base <base_id>");
|
|
36640
|
+
const { config, accessToken } = await requireAuth();
|
|
36641
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
36642
|
+
const { connections } = await client.listConnections(hubId);
|
|
36643
|
+
const conn = connections.find(
|
|
36644
|
+
(c) => c.connection_id === parsed.connection || c.connection_display_name === parsed.connection
|
|
36645
|
+
);
|
|
36646
|
+
if (!conn || !conn.connection_id) usage3(`Connection "${parsed.connection}" not found on hub ${hubId}.`);
|
|
36647
|
+
const token = await readSecret(
|
|
36648
|
+
{ stdin: parsed.stdin, prompt: void 0, stdinFlag: "--stdin", promptHint: "omit --stdin to be prompted for the token" },
|
|
36649
|
+
"write:seeds token"
|
|
36650
|
+
);
|
|
36651
|
+
const bound = await client.bindSeedConnection(conn.connection_id, { hub_id: hubId, base_id: parsed.base, token });
|
|
36652
|
+
console.log(
|
|
36653
|
+
`Bound seed connection "${conn.connection_display_name}" to base ${bound.base_id} (incarnation ${bound.base_generation}, token ${bound.token_id}). The token was not stored.`
|
|
36654
|
+
);
|
|
36655
|
+
}
|
|
36656
|
+
var init_bind_seed_connection = __esm({
|
|
36657
|
+
"src/commands/bind-seed-connection.ts"() {
|
|
36658
|
+
"use strict";
|
|
36659
|
+
init_auth();
|
|
36660
|
+
init_api_client();
|
|
36661
|
+
init_workspace();
|
|
36662
|
+
init_helpers();
|
|
36663
|
+
}
|
|
36664
|
+
});
|
|
36665
|
+
|
|
36595
36666
|
// src/lib/org-workspace.ts
|
|
36596
36667
|
import * as fs29 from "fs";
|
|
36597
36668
|
import * as path41 from "path";
|
|
@@ -36887,9 +36958,9 @@ var init_org = __esm({
|
|
|
36887
36958
|
var list_exports = {};
|
|
36888
36959
|
__export(list_exports, {
|
|
36889
36960
|
listCommand: () => listCommand,
|
|
36890
|
-
parseArgs: () =>
|
|
36961
|
+
parseArgs: () => parseArgs23
|
|
36891
36962
|
});
|
|
36892
|
-
function
|
|
36963
|
+
function parseArgs23(args2) {
|
|
36893
36964
|
let orgId;
|
|
36894
36965
|
let json = false;
|
|
36895
36966
|
for (let i = 0; i < args2.length; i++) {
|
|
@@ -36902,7 +36973,7 @@ function parseArgs22(args2) {
|
|
|
36902
36973
|
return { orgId, json };
|
|
36903
36974
|
}
|
|
36904
36975
|
async function listCommand(args2) {
|
|
36905
|
-
const { orgId, json } =
|
|
36976
|
+
const { orgId, json } = parseArgs23(args2);
|
|
36906
36977
|
const { config, accessToken } = await requireAuth();
|
|
36907
36978
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
36908
36979
|
const { organizations } = await client.organizations();
|
|
@@ -37059,10 +37130,10 @@ var communities_exports = {};
|
|
|
37059
37130
|
__export(communities_exports, {
|
|
37060
37131
|
communitiesCommand: () => communitiesCommand
|
|
37061
37132
|
});
|
|
37062
|
-
import { parseArgs as
|
|
37133
|
+
import { parseArgs as parseArgs24 } from "util";
|
|
37063
37134
|
function parse(args2) {
|
|
37064
37135
|
try {
|
|
37065
|
-
const { values, positionals } =
|
|
37136
|
+
const { values, positionals } = parseArgs24({
|
|
37066
37137
|
args: args2,
|
|
37067
37138
|
options: { org: { type: "string" }, json: { type: "boolean" }, yes: { type: "boolean", short: "y" } },
|
|
37068
37139
|
allowPositionals: true,
|
|
@@ -37419,7 +37490,7 @@ var contacts_exports = {};
|
|
|
37419
37490
|
__export(contacts_exports, {
|
|
37420
37491
|
contactsCommand: () => contactsCommand
|
|
37421
37492
|
});
|
|
37422
|
-
import { parseArgs as
|
|
37493
|
+
import { parseArgs as parseArgs25 } from "util";
|
|
37423
37494
|
function usageError3(message) {
|
|
37424
37495
|
return expected(`${message}
|
|
37425
37496
|
|
|
@@ -37427,7 +37498,7 @@ ${USAGE4}`);
|
|
|
37427
37498
|
}
|
|
37428
37499
|
function parse2(args2) {
|
|
37429
37500
|
try {
|
|
37430
|
-
return
|
|
37501
|
+
return parseArgs25({
|
|
37431
37502
|
args: args2,
|
|
37432
37503
|
options: {
|
|
37433
37504
|
org: { type: "string" },
|
|
@@ -37631,7 +37702,7 @@ var dimensions_exports = {};
|
|
|
37631
37702
|
__export(dimensions_exports, {
|
|
37632
37703
|
dimensionsCommand: () => dimensionsCommand
|
|
37633
37704
|
});
|
|
37634
|
-
import { parseArgs as
|
|
37705
|
+
import { parseArgs as parseArgs26 } from "util";
|
|
37635
37706
|
function usageError4(message) {
|
|
37636
37707
|
return expected(`${message}
|
|
37637
37708
|
|
|
@@ -37639,7 +37710,7 @@ ${USAGE5}`);
|
|
|
37639
37710
|
}
|
|
37640
37711
|
function parse3(args2) {
|
|
37641
37712
|
try {
|
|
37642
|
-
return
|
|
37713
|
+
return parseArgs26({
|
|
37643
37714
|
args: args2,
|
|
37644
37715
|
options: {
|
|
37645
37716
|
org: { type: "string" },
|
|
@@ -37793,7 +37864,7 @@ __export(access_exports, {
|
|
|
37793
37864
|
accessCommand: () => accessCommand,
|
|
37794
37865
|
formatExplanation: () => formatExplanation
|
|
37795
37866
|
});
|
|
37796
|
-
import { parseArgs as
|
|
37867
|
+
import { parseArgs as parseArgs27 } from "util";
|
|
37797
37868
|
function usageError5(message) {
|
|
37798
37869
|
return expected(`${message}
|
|
37799
37870
|
|
|
@@ -37801,7 +37872,7 @@ ${USAGE6}`);
|
|
|
37801
37872
|
}
|
|
37802
37873
|
function parse4(args2) {
|
|
37803
37874
|
try {
|
|
37804
|
-
return
|
|
37875
|
+
return parseArgs27({
|
|
37805
37876
|
args: args2,
|
|
37806
37877
|
options: {
|
|
37807
37878
|
hub: { type: "string" },
|
|
@@ -38956,20 +39027,20 @@ __export(knowledge_exports, {
|
|
|
38956
39027
|
knowledgeCommand: () => knowledgeCommand,
|
|
38957
39028
|
parseKnowledgeArgs: () => parseKnowledgeArgs
|
|
38958
39029
|
});
|
|
38959
|
-
import { parseArgs as
|
|
39030
|
+
import { parseArgs as parseArgs28 } from "util";
|
|
38960
39031
|
function usageError6(message) {
|
|
38961
39032
|
return expected(`${message}
|
|
38962
39033
|
${USAGE7}`);
|
|
38963
39034
|
}
|
|
38964
39035
|
function readArgs(args2) {
|
|
38965
39036
|
try {
|
|
38966
|
-
return
|
|
39037
|
+
return parseArgs28({ args: args2, options: OPTIONS2, allowPositionals: true, strict: true });
|
|
38967
39038
|
} catch (err) {
|
|
38968
39039
|
throw usageError6(err instanceof Error ? err.message : String(err));
|
|
38969
39040
|
}
|
|
38970
39041
|
}
|
|
38971
39042
|
function parseKnowledgeArgs(args2) {
|
|
38972
|
-
const [retired] =
|
|
39043
|
+
const [retired] = parseArgs28({ args: args2, options: OPTIONS2, allowPositionals: true, strict: false }).positionals;
|
|
38973
39044
|
if (retired !== void 0 && RETIRED_VERBS.has(retired)) {
|
|
38974
39045
|
throw expected(
|
|
38975
39046
|
`\`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\`).`
|
|
@@ -39987,7 +40058,7 @@ async function runSkillInstall(positional) {
|
|
|
39987
40058
|
console.log(`Installed skill "${name}" (${fileCount} file${fileCount === 1 ? "" : "s"}) \u2192 ${relDirs.join(", ")}`);
|
|
39988
40059
|
console.log("Reload your agent (e.g. restart Claude Code) to pick up the skill.");
|
|
39989
40060
|
}
|
|
39990
|
-
function parseScopedTargetFlags(flagArgs,
|
|
40061
|
+
function parseScopedTargetFlags(flagArgs, usage4, opts = {}) {
|
|
39991
40062
|
const scopes = opts.scopes ?? ["all", "org", "hub"];
|
|
39992
40063
|
let all = false;
|
|
39993
40064
|
let orgId;
|
|
@@ -40029,7 +40100,7 @@ function parseScopedTargetFlags(flagArgs, usage3, opts = {}) {
|
|
|
40029
40100
|
const forms = scopes.map((s) => s === "all" ? "--all" : s === "org" ? "--org <org_id>" : "--hub <hub_id>");
|
|
40030
40101
|
const oneOf = forms.length === 2 ? forms.join(" or ") : `${forms.slice(0, -1).join(", ")}, or ${forms[forms.length - 1]}`;
|
|
40031
40102
|
console.error(`Provide exactly ONE of ${oneOf}.`);
|
|
40032
|
-
console.error(
|
|
40103
|
+
console.error(usage4);
|
|
40033
40104
|
process.exit(1);
|
|
40034
40105
|
}
|
|
40035
40106
|
if (all) {
|
|
@@ -40088,12 +40159,12 @@ async function runRepairTeamOrphans(flagArgs) {
|
|
|
40088
40159
|
console.log(`${d.hub_id} | ${d.dangling_team_ids.join(",")} | ${d.team_users_removed}`);
|
|
40089
40160
|
}
|
|
40090
40161
|
}
|
|
40091
|
-
function parseApplyTargetFlags(flagArgs,
|
|
40162
|
+
function parseApplyTargetFlags(flagArgs, usage4, opts = {}) {
|
|
40092
40163
|
const apply = flagArgs.includes("--apply");
|
|
40093
|
-
const target = parseScopedTargetFlags(flagArgs.filter((arg) => arg !== "--apply"),
|
|
40164
|
+
const target = parseScopedTargetFlags(flagArgs.filter((arg) => arg !== "--apply"), usage4, opts);
|
|
40094
40165
|
if (apply && target.dryRun) {
|
|
40095
40166
|
console.error("--apply and --dry-run contradict each other: a run is a dry run unless --apply is given.");
|
|
40096
|
-
console.error(
|
|
40167
|
+
console.error(usage4);
|
|
40097
40168
|
process.exit(1);
|
|
40098
40169
|
}
|
|
40099
40170
|
return { ...target, apply };
|
|
@@ -40303,7 +40374,7 @@ function printVaultReport(data) {
|
|
|
40303
40374
|
console.log(`${data.dry_run ? "Would need" : "Need"} their channel enabled again, on the preview hub (${data.reenable.length}):`);
|
|
40304
40375
|
for (const r of data.reenable) console.log(` hub=${r.hub_id}${r.preview ? " (preview)" : ""} connection=${r.connection_id} bot=${r.bot_username ?? "-"}${r.enabled ? "" : " (disabled)"}`);
|
|
40305
40376
|
}
|
|
40306
|
-
function parseVaultFlags(flagArgs,
|
|
40377
|
+
function parseVaultFlags(flagArgs, usage4, importFlags) {
|
|
40307
40378
|
let orgId;
|
|
40308
40379
|
let connectorId;
|
|
40309
40380
|
let maxPuts;
|
|
@@ -40329,13 +40400,13 @@ function parseVaultFlags(flagArgs, usage3, importFlags) {
|
|
|
40329
40400
|
jsonOutput = true;
|
|
40330
40401
|
} else {
|
|
40331
40402
|
console.error(`Unknown flag: ${flag}`);
|
|
40332
|
-
console.error(
|
|
40403
|
+
console.error(usage4);
|
|
40333
40404
|
process.exit(1);
|
|
40334
40405
|
}
|
|
40335
40406
|
}
|
|
40336
40407
|
if (!orgId || !connectorId) {
|
|
40337
40408
|
console.error("--org and --connector are required.");
|
|
40338
|
-
console.error(
|
|
40409
|
+
console.error(usage4);
|
|
40339
40410
|
process.exit(1);
|
|
40340
40411
|
}
|
|
40341
40412
|
return { orgId, connectorId, maxPuts, approvedFile, apply, yes, jsonOutput };
|
|
@@ -40878,7 +40949,7 @@ function voiceCallPriceLine(data) {
|
|
|
40878
40949
|
return `voice_call_minute_ops: ${value} operation(s) per connected call-minute${value === 0 ? " (calls bill their turns only)" : ""}`;
|
|
40879
40950
|
}
|
|
40880
40951
|
async function runVoiceCallsPrice(flagArgs) {
|
|
40881
|
-
const
|
|
40952
|
+
const usage4 = "wayai admin voice-calls price [--ops-per-minute <n>]";
|
|
40882
40953
|
let raw;
|
|
40883
40954
|
for (let i = 0; i < flagArgs.length; i++) {
|
|
40884
40955
|
if (flagArgs[i] === "--ops-per-minute") {
|
|
@@ -40886,13 +40957,13 @@ async function runVoiceCallsPrice(flagArgs) {
|
|
|
40886
40957
|
i++;
|
|
40887
40958
|
} else {
|
|
40888
40959
|
console.error(`Unknown flag: ${flagArgs[i]}`);
|
|
40889
|
-
console.error(
|
|
40960
|
+
console.error(usage4);
|
|
40890
40961
|
process.exit(1);
|
|
40891
40962
|
}
|
|
40892
40963
|
}
|
|
40893
40964
|
if (raw !== void 0 && (!/^\d+$/.test(raw) || !voiceCallMinuteOps.safeParse(Number(raw)).success)) {
|
|
40894
40965
|
console.error(`--ops-per-minute must be a whole number from 0 to ${MAX_VOICE_CALL_MINUTE_OPS}`);
|
|
40895
|
-
console.error(
|
|
40966
|
+
console.error(usage4);
|
|
40896
40967
|
process.exit(1);
|
|
40897
40968
|
}
|
|
40898
40969
|
const { config, accessToken } = await requireAuth();
|
|
@@ -40924,7 +40995,7 @@ async function runCasesToggle(enable, flagArgs) {
|
|
|
40924
40995
|
console.log(PLATFORM_CONFIG_PROPAGATION_NOTE);
|
|
40925
40996
|
}
|
|
40926
40997
|
async function runCasesCreate(flagArgs) {
|
|
40927
|
-
const
|
|
40998
|
+
const usage4 = "wayai admin cases create --org <org_id> --name <name> [--timezone <zone>] [--json]";
|
|
40928
40999
|
let orgId;
|
|
40929
41000
|
let name;
|
|
40930
41001
|
let timezone;
|
|
@@ -40944,14 +41015,14 @@ async function runCasesCreate(flagArgs) {
|
|
|
40944
41015
|
jsonOutput = true;
|
|
40945
41016
|
} else {
|
|
40946
41017
|
console.error(`Unknown flag: ${flag}`);
|
|
40947
|
-
console.error(
|
|
41018
|
+
console.error(usage4);
|
|
40948
41019
|
process.exit(1);
|
|
40949
41020
|
}
|
|
40950
41021
|
}
|
|
40951
41022
|
const parsed = adminCreateCaseSpaceBody.safeParse({ org_id: orgId, name, ...timezone !== void 0 ? { timezone } : {} });
|
|
40952
41023
|
if (!parsed.success) {
|
|
40953
41024
|
console.error(parsed.error.issues.map((issue) => `--${issue.path[0] === "org_id" ? "org" : issue.path[0]}: ${issue.message}`).join("\n"));
|
|
40954
|
-
console.error(
|
|
41025
|
+
console.error(usage4);
|
|
40955
41026
|
process.exit(1);
|
|
40956
41027
|
}
|
|
40957
41028
|
const { config, accessToken } = await requireAuth();
|
|
@@ -40991,7 +41062,7 @@ async function runCommunitiesToggle(enable, flagArgs) {
|
|
|
40991
41062
|
console.log(PLATFORM_CONFIG_PROPAGATION_NOTE);
|
|
40992
41063
|
}
|
|
40993
41064
|
async function runCommunitiesCreate(flagArgs) {
|
|
40994
|
-
const
|
|
41065
|
+
const usage4 = "wayai admin communities create --org <org_id> --name <name> [--json]";
|
|
40995
41066
|
let orgId;
|
|
40996
41067
|
let name;
|
|
40997
41068
|
let jsonOutput = false;
|
|
@@ -41007,14 +41078,14 @@ async function runCommunitiesCreate(flagArgs) {
|
|
|
41007
41078
|
jsonOutput = true;
|
|
41008
41079
|
} else {
|
|
41009
41080
|
console.error(`Unknown flag: ${flag}`);
|
|
41010
|
-
console.error(
|
|
41081
|
+
console.error(usage4);
|
|
41011
41082
|
process.exit(1);
|
|
41012
41083
|
}
|
|
41013
41084
|
}
|
|
41014
41085
|
const parsed = adminCreateCommunityBody.safeParse({ org_id: orgId, name });
|
|
41015
41086
|
if (!parsed.success) {
|
|
41016
41087
|
console.error(parsed.error.issues.map((issue) => `--${issue.path[0] === "org_id" ? "org" : issue.path[0]}: ${issue.message}`).join("\n"));
|
|
41017
|
-
console.error(
|
|
41088
|
+
console.error(usage4);
|
|
41018
41089
|
process.exit(1);
|
|
41019
41090
|
}
|
|
41020
41091
|
const { config, accessToken } = await requireAuth();
|
|
@@ -41045,7 +41116,7 @@ async function runCommunitiesCreate(flagArgs) {
|
|
|
41045
41116
|
console.log(`Created community ${data.community_id} \u2014 "${data.name}", owned by ${data.org_name} (${data.org_id}).`);
|
|
41046
41117
|
}
|
|
41047
41118
|
async function runCommunitiesDestroy(positional, flagArgs) {
|
|
41048
|
-
const
|
|
41119
|
+
const usage4 = "wayai admin communities destroy <community_id> [--yes] [--json]";
|
|
41049
41120
|
let yes = false;
|
|
41050
41121
|
let jsonOutput = false;
|
|
41051
41122
|
for (const flag of flagArgs) {
|
|
@@ -41055,14 +41126,14 @@ async function runCommunitiesDestroy(positional, flagArgs) {
|
|
|
41055
41126
|
jsonOutput = true;
|
|
41056
41127
|
} else {
|
|
41057
41128
|
console.error(`Unknown flag: ${flag}`);
|
|
41058
|
-
console.error(
|
|
41129
|
+
console.error(usage4);
|
|
41059
41130
|
process.exit(1);
|
|
41060
41131
|
}
|
|
41061
41132
|
}
|
|
41062
41133
|
const parsed = communityIdParam.safeParse({ communityId: positional[0] });
|
|
41063
41134
|
if (positional.length !== 1 || !parsed.success) {
|
|
41064
41135
|
console.error("<community_id> must be one community id (a UUID).");
|
|
41065
|
-
console.error(
|
|
41136
|
+
console.error(usage4);
|
|
41066
41137
|
process.exit(1);
|
|
41067
41138
|
}
|
|
41068
41139
|
const { communityId } = parsed.data;
|
|
@@ -41097,23 +41168,23 @@ async function runCommunitiesDestroy(positional, flagArgs) {
|
|
|
41097
41168
|
function describeGuideHub(hub) {
|
|
41098
41169
|
return `${hub.hub_name ?? "(unnamed)"} (${hub.hub_id}), owned by ${hub.organization_name ?? "(unnamed org)"} (${hub.organization_id})`;
|
|
41099
41170
|
}
|
|
41100
|
-
function parseBooleanFlags(flagArgs,
|
|
41171
|
+
function parseBooleanFlags(flagArgs, usage4, allowed) {
|
|
41101
41172
|
for (const flag of flagArgs) {
|
|
41102
41173
|
if (!allowed.includes(flag)) {
|
|
41103
41174
|
console.error(`Unknown flag: ${flag}`);
|
|
41104
|
-
console.error(
|
|
41175
|
+
console.error(usage4);
|
|
41105
41176
|
process.exit(1);
|
|
41106
41177
|
}
|
|
41107
41178
|
}
|
|
41108
41179
|
return { yes: flagArgs.includes("--yes"), jsonOutput: flagArgs.includes("--json") };
|
|
41109
41180
|
}
|
|
41110
41181
|
async function runGuideSetHub(positional, flagArgs) {
|
|
41111
|
-
const
|
|
41112
|
-
const { yes, jsonOutput } = parseBooleanFlags(flagArgs,
|
|
41182
|
+
const usage4 = "wayai admin guide set-hub <hub_id> [--yes] [--json]";
|
|
41183
|
+
const { yes, jsonOutput } = parseBooleanFlags(flagArgs, usage4, ["--yes", "--json"]);
|
|
41113
41184
|
const parsed = adminSetGuideHubBody.safeParse({ hub_id: positional[0] });
|
|
41114
41185
|
if (positional.length !== 1 || !parsed.success) {
|
|
41115
41186
|
console.error("<hub_id> must be one hub id (a UUID).");
|
|
41116
|
-
console.error(
|
|
41187
|
+
console.error(usage4);
|
|
41117
41188
|
process.exit(1);
|
|
41118
41189
|
}
|
|
41119
41190
|
const hubId = parsed.data.hub_id;
|
|
@@ -41155,12 +41226,12 @@ async function runGuideSetHub(positional, flagArgs) {
|
|
|
41155
41226
|
console.log(PLATFORM_CONFIG_PROPAGATION_NOTE);
|
|
41156
41227
|
}
|
|
41157
41228
|
async function runGuideClear(positional, flagArgs) {
|
|
41158
|
-
const
|
|
41229
|
+
const usage4 = "wayai admin guide clear [--json]";
|
|
41159
41230
|
if (positional.length > 0) {
|
|
41160
|
-
console.error(
|
|
41231
|
+
console.error(usage4);
|
|
41161
41232
|
process.exit(1);
|
|
41162
41233
|
}
|
|
41163
|
-
const { jsonOutput } = parseBooleanFlags(flagArgs,
|
|
41234
|
+
const { jsonOutput } = parseBooleanFlags(flagArgs, usage4, ["--json"]);
|
|
41164
41235
|
const { config, accessToken } = await requireAuth();
|
|
41165
41236
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
41166
41237
|
try {
|
|
@@ -41178,12 +41249,12 @@ async function runGuideClear(positional, flagArgs) {
|
|
|
41178
41249
|
console.log(PLATFORM_CONFIG_PROPAGATION_NOTE);
|
|
41179
41250
|
}
|
|
41180
41251
|
async function runGuideStatus(positional, flagArgs) {
|
|
41181
|
-
const
|
|
41252
|
+
const usage4 = "wayai admin guide status [--json]";
|
|
41182
41253
|
if (positional.length > 0) {
|
|
41183
|
-
console.error(
|
|
41254
|
+
console.error(usage4);
|
|
41184
41255
|
process.exit(1);
|
|
41185
41256
|
}
|
|
41186
|
-
const { jsonOutput } = parseBooleanFlags(flagArgs,
|
|
41257
|
+
const { jsonOutput } = parseBooleanFlags(flagArgs, usage4, ["--json"]);
|
|
41187
41258
|
const { config, accessToken } = await requireAuth();
|
|
41188
41259
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
41189
41260
|
let data;
|
|
@@ -41235,7 +41306,7 @@ function readVaultGateList(data) {
|
|
|
41235
41306
|
}
|
|
41236
41307
|
return parsed;
|
|
41237
41308
|
}
|
|
41238
|
-
function resolveVaultGateConnector(arg,
|
|
41309
|
+
function resolveVaultGateConnector(arg, usage4) {
|
|
41239
41310
|
const wanted = (arg ?? "").trim().toLowerCase();
|
|
41240
41311
|
const ids = VAULT_GATE_CONNECTORS.get(wanted) ?? (vaultGateConnectorName(wanted) ? [wanted] : null);
|
|
41241
41312
|
if (!ids) {
|
|
@@ -41244,7 +41315,7 @@ function resolveVaultGateConnector(arg, usage3) {
|
|
|
41244
41315
|
...[...VAULT_GATE_BY_ID_ONLY].map(([id, name]) => `${id} (${name}, by its id only)`)
|
|
41245
41316
|
].join(", ");
|
|
41246
41317
|
console.error(arg ? `Refused: the credentials vault holds nothing of connector "${arg}". It holds only: ${known}.` : "A connector is required.");
|
|
41247
|
-
console.error(
|
|
41318
|
+
console.error(usage4);
|
|
41248
41319
|
process.exit(1);
|
|
41249
41320
|
}
|
|
41250
41321
|
return ids;
|
|
@@ -41258,12 +41329,12 @@ async function readVaultGateConfig(client) {
|
|
|
41258
41329
|
}
|
|
41259
41330
|
}
|
|
41260
41331
|
async function runVaultGateStatus(positional, flagArgs) {
|
|
41261
|
-
const
|
|
41332
|
+
const usage4 = "wayai admin vault-gate status [--json]";
|
|
41262
41333
|
if (positional.length > 0) {
|
|
41263
|
-
console.error(
|
|
41334
|
+
console.error(usage4);
|
|
41264
41335
|
process.exit(1);
|
|
41265
41336
|
}
|
|
41266
|
-
const { jsonOutput } = parseBooleanFlags(flagArgs,
|
|
41337
|
+
const { jsonOutput } = parseBooleanFlags(flagArgs, usage4, ["--json"]);
|
|
41267
41338
|
const { config, accessToken } = await requireAuth();
|
|
41268
41339
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
41269
41340
|
const ids = await readVaultGateConfig(client);
|
|
@@ -41274,14 +41345,14 @@ async function runVaultGateStatus(positional, flagArgs) {
|
|
|
41274
41345
|
console.log(`vault_connector_ids (platform): ${describeVaultGateList(ids)}`);
|
|
41275
41346
|
}
|
|
41276
41347
|
async function runVaultGateChange(change, positional, flagArgs) {
|
|
41277
|
-
const
|
|
41278
|
-
const { yes, jsonOutput } = parseBooleanFlags(flagArgs,
|
|
41348
|
+
const usage4 = `wayai admin vault-gate ${change} <connector> [--yes] [--json]`;
|
|
41349
|
+
const { yes, jsonOutput } = parseBooleanFlags(flagArgs, usage4, ["--yes", "--json"]);
|
|
41279
41350
|
if (positional.length !== 1) {
|
|
41280
41351
|
console.error("Name one connector.");
|
|
41281
|
-
console.error(
|
|
41352
|
+
console.error(usage4);
|
|
41282
41353
|
process.exit(1);
|
|
41283
41354
|
}
|
|
41284
|
-
const connectorIds = resolveVaultGateConnector(positional[0],
|
|
41355
|
+
const connectorIds = resolveVaultGateConnector(positional[0], usage4);
|
|
41285
41356
|
const entry = connectorIds.map(describeVaultGateEntry).join(", ");
|
|
41286
41357
|
const { config, accessToken } = await requireAuth();
|
|
41287
41358
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
@@ -45647,6 +45718,11 @@ async function main() {
|
|
|
45647
45718
|
await setConnectionCredentialCommand2(args);
|
|
45648
45719
|
break;
|
|
45649
45720
|
}
|
|
45721
|
+
case "bind-seed-connection": {
|
|
45722
|
+
const { bindSeedConnectionCommand: bindSeedConnectionCommand2 } = await Promise.resolve().then(() => (init_bind_seed_connection(), bind_seed_connection_exports));
|
|
45723
|
+
await bindSeedConnectionCommand2(args);
|
|
45724
|
+
break;
|
|
45725
|
+
}
|
|
45650
45726
|
case "org": {
|
|
45651
45727
|
const { orgCommand: orgCommand2 } = await Promise.resolve().then(() => (init_org(), org_exports));
|
|
45652
45728
|
await orgCommand2(args);
|
|
@@ -45744,6 +45820,7 @@ Commands:
|
|
|
45744
45820
|
create-credential Create an organization credential for a service (--service)
|
|
45745
45821
|
update-credential Update / rotate an organization credential (by name)
|
|
45746
45822
|
set-connection-credential Set a connection's credential directly (org link or --field/--stdin), preview or production
|
|
45823
|
+
bind-seed-connection Bind a preview hub's eval seed connection to a base (--connection, --base, token on --stdin; never stored)
|
|
45747
45824
|
pull Fetch config and write local files \u2014 \`hubs/<hub>\`, \`bases/<base>\` or \`communities/<community>\` (also mirrors the linked production hub/base read-only)
|
|
45748
45825
|
push Parse local files, show diff, sync to preview \u2014 \`hubs/<hub>\` or \`bases/<base>\` (creates the hub/base if new); \`communities/<community>\` edits the live community
|
|
45749
45826
|
create [folder] Explicitly create a new hub from an idless folder, then push (--label to name the preview)
|