@wayai/cli 0.3.259 → 0.3.260
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 +44 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6998,10 +6998,10 @@ var init_chunk_FPSDNS2E = __esm({
|
|
|
6998
6998
|
}
|
|
6999
6999
|
});
|
|
7000
7000
|
|
|
7001
|
-
// ../../packages/core/dist/chunk-
|
|
7001
|
+
// ../../packages/core/dist/chunk-5ZLNVO63.js
|
|
7002
7002
|
var REKOR_ACTOR_TYPE_HEADER, REKOR_ACTOR_ID_HEADER, REKOR_ACTOR_LABEL_HEADER, REKOR_ACTOR_ORG_HEADER, REKOR_ACTOR_ADMIN_HEADER, REKOR_CLIENT_HEADER, REKOR_TOOL_ID_HEADER, REKOR_CLIENTS, rekorClientSchema, MAX_REKOR_TOOL_ID_LENGTH, rekorToolIdSchema, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, REKOR_BOUND_BASE_HEADER, REKOR_BOUND_TOOLSET_HEADER, REKOR_BOUND_TOKEN_HEADER, REKOR_BOUND_CUSTOMER_HEADER, REKOR_BOUND_ACCESS_HEADER, REKOR_BOUND_ACCESS_SCOPE_HEADER, REKOR_BOUND_PAGE_HEADER, REKOR_BOUND_PERSON_HEADER, REKOR_PERSON_AUDIENCE_STAFF, REKOR_PERSON_AUDIENCE_CUSTOMER, REKOR_PERSON_ALL, REKOR_ACCESS_SCOPE_CUSTOMER, 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;
|
|
7003
|
-
var
|
|
7004
|
-
"../../packages/core/dist/chunk-
|
|
7003
|
+
var init_chunk_5ZLNVO63 = __esm({
|
|
7004
|
+
"../../packages/core/dist/chunk-5ZLNVO63.js"() {
|
|
7005
7005
|
"use strict";
|
|
7006
7006
|
init_zod();
|
|
7007
7007
|
REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
|
|
@@ -7057,7 +7057,7 @@ var init_chunk_M4FCOW6Q = __esm({
|
|
|
7057
7057
|
}
|
|
7058
7058
|
});
|
|
7059
7059
|
|
|
7060
|
-
// ../../packages/core/dist/chunk-
|
|
7060
|
+
// ../../packages/core/dist/chunk-642WMH6U.js
|
|
7061
7061
|
function isPersonAccessAll(lists) {
|
|
7062
7062
|
return lists !== void 0 && lists.read.length === 1 && lists.read[0] === ACCESS_UNRESTRICTED && lists.write.length === 1 && lists.write[0] === ACCESS_UNRESTRICTED;
|
|
7063
7063
|
}
|
|
@@ -7095,10 +7095,10 @@ function assignmentHasUnrestricted(assignment) {
|
|
|
7095
7095
|
return Object.values(assignment).some((lists) => lists.read.includes(ACCESS_UNRESTRICTED) || lists.write.includes(ACCESS_UNRESTRICTED));
|
|
7096
7096
|
}
|
|
7097
7097
|
var ACCESS_UNRESTRICTED, ACCESS_ID_REGEX, ACCESS_ID_MAX_LENGTH, MAX_ACCESS_DIMENSIONS_PER_ORG, MAX_ACCESS_VALUES_PER_DIMENSION, ACCESS_LABEL_MAX_LENGTH, accessIdSchema, accessLabelSchema, accessValueListSchema, accessListsSchema, accessAssignmentSchema, PERSON_ACCESS_KEY, heldAccessKeySchema, heldAccessAssignmentSchema, AGENT_PERSON_ACCESS_REFUSAL, accessSetSchema, accessDimensionParam, accessValueParam, orgMemberParam, orgHubParam, createAccessDimensionBody, updateAccessDimensionBody, createAccessValueBody, updateAccessValueBody, setMemberAccessValuesBody, HUB_PERSON_KINDS, ACCESS_PERSON_KINDS, setHubUserAccessValuesBody, setHubAccessValuesBody, setAgentAccessValuesBody;
|
|
7098
|
-
var
|
|
7099
|
-
"../../packages/core/dist/chunk-
|
|
7098
|
+
var init_chunk_642WMH6U = __esm({
|
|
7099
|
+
"../../packages/core/dist/chunk-642WMH6U.js"() {
|
|
7100
7100
|
"use strict";
|
|
7101
|
-
|
|
7101
|
+
init_chunk_5ZLNVO63();
|
|
7102
7102
|
init_chunk_HZ6CADSY();
|
|
7103
7103
|
init_chunk_YROEDMVZ();
|
|
7104
7104
|
init_zod();
|
|
@@ -7189,7 +7189,10 @@ var init_chunk_P3S2WL7F = __esm({
|
|
|
7189
7189
|
}
|
|
7190
7190
|
});
|
|
7191
7191
|
|
|
7192
|
-
// ../../packages/core/dist/chunk-
|
|
7192
|
+
// ../../packages/core/dist/chunk-G5MO5PB5.js
|
|
7193
|
+
function boundCustomerPartyIsValid(audience, parties, customer) {
|
|
7194
|
+
return audience !== REKOR_PERSON_AUDIENCE_STAFF && customer < parties.length && Array.isArray(parties[customer]);
|
|
7195
|
+
}
|
|
7193
7196
|
function isEncodedBoundPerson(raw) {
|
|
7194
7197
|
let parsed;
|
|
7195
7198
|
try {
|
|
@@ -7200,11 +7203,11 @@ function isEncodedBoundPerson(raw) {
|
|
|
7200
7203
|
return rekorBoundPersonSchema.safeParse(parsed).success;
|
|
7201
7204
|
}
|
|
7202
7205
|
var TOOLSET_SLUG_PATTERN, REKOR_STRUCTURAL_ID_PATTERN, baseEnvironmentSchema, toolsetFileToolSchema, toolsetSurfaceSchema, toolsetConnectionBindingSchema, rekorToolsetToolsSchema, rekorPersonIdSchema, rekorPersonAudienceSchema, rekorBoundPersonSchema, rekorBoundAttestation, 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;
|
|
7203
|
-
var
|
|
7204
|
-
"../../packages/core/dist/chunk-
|
|
7206
|
+
var init_chunk_G5MO5PB5 = __esm({
|
|
7207
|
+
"../../packages/core/dist/chunk-G5MO5PB5.js"() {
|
|
7205
7208
|
"use strict";
|
|
7206
|
-
|
|
7207
|
-
|
|
7209
|
+
init_chunk_642WMH6U();
|
|
7210
|
+
init_chunk_5ZLNVO63();
|
|
7208
7211
|
init_zod();
|
|
7209
7212
|
TOOLSET_SLUG_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
|
|
7210
7213
|
REKOR_STRUCTURAL_ID_PATTERN = TOOLSET_SLUG_PATTERN;
|
|
@@ -7307,10 +7310,14 @@ var init_chunk_36EGVRCM = __esm({
|
|
|
7307
7310
|
rekorBoundPersonSchema = external_exports.object({
|
|
7308
7311
|
audience: rekorPersonAudienceSchema,
|
|
7309
7312
|
parties: external_exports.array(external_exports.union([external_exports.array(rekorPersonIdSchema).max(REKOR_MAX_PERSON_IDS), external_exports.literal(REKOR_PERSON_ALL)])).max(REKOR_MAX_PERSON_PARTIES),
|
|
7310
|
-
agent_all: external_exports.boolean()
|
|
7313
|
+
agent_all: external_exports.boolean(),
|
|
7314
|
+
customer: external_exports.number().int().nonnegative().optional()
|
|
7311
7315
|
}).strict().refine((person) => !person.agent_all || person.audience === REKOR_PERSON_AUDIENCE_STAFF, {
|
|
7312
7316
|
message: `The agent's "*" applies only to a staff call`,
|
|
7313
7317
|
path: ["agent_all"]
|
|
7318
|
+
}).refine((person) => person.customer === void 0 || boundCustomerPartyIsValid(person.audience, person.parties, person.customer), {
|
|
7319
|
+
message: "The customer party is a listed party of person ids, on a call that is not staff's",
|
|
7320
|
+
path: ["customer"]
|
|
7314
7321
|
});
|
|
7315
7322
|
rekorBoundAttestation = rekorAttestation.extend({
|
|
7316
7323
|
[REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["token", "user"]),
|
|
@@ -7845,12 +7852,12 @@ var init_chunk_VFDRJV2E = __esm({
|
|
|
7845
7852
|
}
|
|
7846
7853
|
});
|
|
7847
7854
|
|
|
7848
|
-
// ../../packages/core/dist/chunk-
|
|
7855
|
+
// ../../packages/core/dist/chunk-KSENISEM.js
|
|
7849
7856
|
var hubPageWatchParam, pageWatchedBaseSchema, hubPageWatchResponseSchema;
|
|
7850
|
-
var
|
|
7851
|
-
"../../packages/core/dist/chunk-
|
|
7857
|
+
var init_chunk_KSENISEM = __esm({
|
|
7858
|
+
"../../packages/core/dist/chunk-KSENISEM.js"() {
|
|
7852
7859
|
"use strict";
|
|
7853
|
-
|
|
7860
|
+
init_chunk_G5MO5PB5();
|
|
7854
7861
|
init_chunk_VFDRJV2E();
|
|
7855
7862
|
init_chunk_HZ6CADSY();
|
|
7856
7863
|
init_zod();
|
|
@@ -13993,7 +14000,7 @@ var init_chunk_TU4Y4MEX = __esm({
|
|
|
13993
14000
|
}
|
|
13994
14001
|
});
|
|
13995
14002
|
|
|
13996
|
-
// ../../packages/core/dist/chunk-
|
|
14003
|
+
// ../../packages/core/dist/chunk-H27PRUAQ.js
|
|
13997
14004
|
function refineHubAsCodeCustomTools(config, ctx) {
|
|
13998
14005
|
const agents = config.agents;
|
|
13999
14006
|
if (!Array.isArray(agents)) return;
|
|
@@ -14603,11 +14610,11 @@ function skillSectionsAsResources(scope) {
|
|
|
14603
14610
|
};
|
|
14604
14611
|
}
|
|
14605
14612
|
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, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, isPlainObject, MIN_SKILLS_LAYOUT_CLI, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema;
|
|
14606
|
-
var
|
|
14607
|
-
"../../packages/core/dist/chunk-
|
|
14613
|
+
var init_chunk_H27PRUAQ = __esm({
|
|
14614
|
+
"../../packages/core/dist/chunk-H27PRUAQ.js"() {
|
|
14608
14615
|
"use strict";
|
|
14609
14616
|
init_chunk_SARVKRZB();
|
|
14610
|
-
|
|
14617
|
+
init_chunk_642WMH6U();
|
|
14611
14618
|
init_chunk_HSQZYXKA();
|
|
14612
14619
|
init_chunk_LBDH7LCG();
|
|
14613
14620
|
init_chunk_4LXDRTO4();
|
|
@@ -16167,8 +16174,8 @@ var init_contracts = __esm({
|
|
|
16167
16174
|
init_chunk_I3O2RACG();
|
|
16168
16175
|
init_chunk_34LE6P7E();
|
|
16169
16176
|
init_chunk_FPSDNS2E();
|
|
16170
|
-
|
|
16171
|
-
|
|
16177
|
+
init_chunk_KSENISEM();
|
|
16178
|
+
init_chunk_G5MO5PB5();
|
|
16172
16179
|
init_chunk_OPETF4GS();
|
|
16173
16180
|
init_chunk_SY6PLCPK();
|
|
16174
16181
|
init_chunk_KMAC3O3L();
|
|
@@ -16190,10 +16197,10 @@ var init_contracts = __esm({
|
|
|
16190
16197
|
init_chunk_E4DIIOOE();
|
|
16191
16198
|
init_chunk_7CYHPF35();
|
|
16192
16199
|
init_chunk_BPCNB5RT();
|
|
16193
|
-
|
|
16200
|
+
init_chunk_H27PRUAQ();
|
|
16194
16201
|
init_chunk_SARVKRZB();
|
|
16195
|
-
|
|
16196
|
-
|
|
16202
|
+
init_chunk_642WMH6U();
|
|
16203
|
+
init_chunk_5ZLNVO63();
|
|
16197
16204
|
init_chunk_HSQZYXKA();
|
|
16198
16205
|
init_chunk_LBDH7LCG();
|
|
16199
16206
|
init_chunk_4LXDRTO4();
|
|
@@ -38329,7 +38336,7 @@ async function runCommunitiesCreate(flagArgs) {
|
|
|
38329
38336
|
process.exit(1);
|
|
38330
38337
|
}
|
|
38331
38338
|
if (err instanceof ApiError && err.status === 503) {
|
|
38332
|
-
console.error("The community was not created in time. Run the command again.");
|
|
38339
|
+
console.error(errorCodeOf(err.body) === "TRANSIENT_STORAGE" ? `The platform was briefly unavailable, and the community may have been created. Check organization ${parsed.data.org_id}'s communities before running the command again.` : "The community was not created in time. Run the command again.");
|
|
38333
38340
|
process.exit(1);
|
|
38334
38341
|
}
|
|
38335
38342
|
exitOnApiError(err);
|
|
@@ -38522,6 +38529,14 @@ function requireFlagValue(flagArgs, index, flag) {
|
|
|
38522
38529
|
}
|
|
38523
38530
|
return v;
|
|
38524
38531
|
}
|
|
38532
|
+
function errorCodeOf(body) {
|
|
38533
|
+
try {
|
|
38534
|
+
const code = JSON.parse(body)?.error;
|
|
38535
|
+
return typeof code === "string" ? code : null;
|
|
38536
|
+
} catch {
|
|
38537
|
+
return null;
|
|
38538
|
+
}
|
|
38539
|
+
}
|
|
38525
38540
|
function exitOnApiError(err) {
|
|
38526
38541
|
if (err instanceof ApiError) {
|
|
38527
38542
|
if (err.status === 401) {
|
|
@@ -38544,6 +38559,8 @@ function exitOnApiError(err) {
|
|
|
38544
38559
|
if (err.status === 503) {
|
|
38545
38560
|
if (err.isRetryable) {
|
|
38546
38561
|
console.error("ClickHouse is warming up (cold start); the read is temporarily unavailable. Retry in a few seconds.");
|
|
38562
|
+
} else if (errorCodeOf(err.body) === "TRANSIENT_STORAGE") {
|
|
38563
|
+
console.error("The platform is briefly unavailable (usually a deploy in progress). Retry in a few seconds.");
|
|
38547
38564
|
} else {
|
|
38548
38565
|
console.error("Admin debug reads are currently disabled (platform kill switch).");
|
|
38549
38566
|
}
|