@wayai/cli 0.3.319 → 0.3.320
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 +232 -89
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5901,10 +5901,10 @@ var init_chunk_P5GJNS5R = __esm({
|
|
|
5901
5901
|
}
|
|
5902
5902
|
});
|
|
5903
5903
|
|
|
5904
|
-
// ../../packages/core/dist/chunk-
|
|
5905
|
-
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, 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;
|
|
5906
|
-
var
|
|
5907
|
-
"../../packages/core/dist/chunk-
|
|
5904
|
+
// ../../packages/core/dist/chunk-RLS7WBVR.js
|
|
5905
|
+
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;
|
|
5906
|
+
var init_chunk_RLS7WBVR = __esm({
|
|
5907
|
+
"../../packages/core/dist/chunk-RLS7WBVR.js"() {
|
|
5908
5908
|
"use strict";
|
|
5909
5909
|
init_zod();
|
|
5910
5910
|
REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
|
|
@@ -5921,6 +5921,7 @@ var init_chunk_SDOG6762 = __esm({
|
|
|
5921
5921
|
REKOR_V1_PREFIX = "/v1";
|
|
5922
5922
|
REKOR_LIFECYCLE_PREFIX = "/lifecycle";
|
|
5923
5923
|
REKOR_BASE_VAULT_DRY_RUN_PATH = `${REKOR_LIFECYCLE_PREFIX}/vault-dry-run`;
|
|
5924
|
+
REKOR_S3_CREDENTIAL_COUNT_PATH = `${REKOR_LIFECYCLE_PREFIX}/s3-credential-count`;
|
|
5924
5925
|
DATA_PROXY_ORG_QUERY_PARAM = "org_id";
|
|
5925
5926
|
MAX_PROVISIONING_BODY_BYTES = 256 * 1024;
|
|
5926
5927
|
dataProxyQuery = external_exports.object({
|
|
@@ -5961,7 +5962,7 @@ var init_chunk_SDOG6762 = __esm({
|
|
|
5961
5962
|
}
|
|
5962
5963
|
});
|
|
5963
5964
|
|
|
5964
|
-
// ../../packages/core/dist/chunk-
|
|
5965
|
+
// ../../packages/core/dist/chunk-XYKOUYXA.js
|
|
5965
5966
|
function isPersonAccessAll(lists) {
|
|
5966
5967
|
return lists !== void 0 && lists.read.length === 1 && lists.read[0] === ACCESS_UNRESTRICTED && lists.write.length === 1 && lists.write[0] === ACCESS_UNRESTRICTED;
|
|
5967
5968
|
}
|
|
@@ -5999,10 +6000,10 @@ function assignmentHasUnrestricted(assignment) {
|
|
|
5999
6000
|
return Object.values(assignment).some((lists) => lists.read.includes(ACCESS_UNRESTRICTED) || lists.write.includes(ACCESS_UNRESTRICTED));
|
|
6000
6001
|
}
|
|
6001
6002
|
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;
|
|
6002
|
-
var
|
|
6003
|
-
"../../packages/core/dist/chunk-
|
|
6003
|
+
var init_chunk_XYKOUYXA = __esm({
|
|
6004
|
+
"../../packages/core/dist/chunk-XYKOUYXA.js"() {
|
|
6004
6005
|
"use strict";
|
|
6005
|
-
|
|
6006
|
+
init_chunk_RLS7WBVR();
|
|
6006
6007
|
init_chunk_HZ6CADSY();
|
|
6007
6008
|
init_chunk_ZTNFLGW5();
|
|
6008
6009
|
init_zod();
|
|
@@ -6093,7 +6094,7 @@ var init_chunk_MFUQ2NQ5 = __esm({
|
|
|
6093
6094
|
}
|
|
6094
6095
|
});
|
|
6095
6096
|
|
|
6096
|
-
// ../../packages/core/dist/chunk-
|
|
6097
|
+
// ../../packages/core/dist/chunk-U4FSUKVU.js
|
|
6097
6098
|
function boundCustomerPartyIsValid(audience, parties, customer) {
|
|
6098
6099
|
return audience !== REKOR_PERSON_AUDIENCE_STAFF && customer < parties.length && Array.isArray(parties[customer]);
|
|
6099
6100
|
}
|
|
@@ -6107,11 +6108,11 @@ function isEncodedBoundPerson(raw) {
|
|
|
6107
6108
|
return rekorBoundPersonSchema.safeParse(parsed).success;
|
|
6108
6109
|
}
|
|
6109
6110
|
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;
|
|
6110
|
-
var
|
|
6111
|
-
"../../packages/core/dist/chunk-
|
|
6111
|
+
var init_chunk_U4FSUKVU = __esm({
|
|
6112
|
+
"../../packages/core/dist/chunk-U4FSUKVU.js"() {
|
|
6112
6113
|
"use strict";
|
|
6113
|
-
|
|
6114
|
-
|
|
6114
|
+
init_chunk_XYKOUYXA();
|
|
6115
|
+
init_chunk_RLS7WBVR();
|
|
6115
6116
|
init_zod();
|
|
6116
6117
|
TOOLSET_SLUG_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
|
|
6117
6118
|
REKOR_STRUCTURAL_ID_PATTERN = TOOLSET_SLUG_PATTERN;
|
|
@@ -6398,13 +6399,13 @@ var init_chunk_FN7WRXIP = __esm({
|
|
|
6398
6399
|
}
|
|
6399
6400
|
});
|
|
6400
6401
|
|
|
6401
|
-
// ../../packages/core/dist/chunk-
|
|
6402
|
+
// ../../packages/core/dist/chunk-BZVN5MG2.js
|
|
6402
6403
|
var TOOLSET_ANSWER_PERSON_PARTIES, toolsetAnswerPersonSchema, toolsetAnswerPersonsSchema;
|
|
6403
|
-
var
|
|
6404
|
-
"../../packages/core/dist/chunk-
|
|
6404
|
+
var init_chunk_BZVN5MG2 = __esm({
|
|
6405
|
+
"../../packages/core/dist/chunk-BZVN5MG2.js"() {
|
|
6405
6406
|
"use strict";
|
|
6406
|
-
|
|
6407
|
-
|
|
6407
|
+
init_chunk_U4FSUKVU();
|
|
6408
|
+
init_chunk_RLS7WBVR();
|
|
6408
6409
|
init_zod();
|
|
6409
6410
|
TOOLSET_ANSWER_PERSON_PARTIES = ["requester", "originator", "initiator", "delegator"];
|
|
6410
6411
|
toolsetAnswerPersonSchema = external_exports.object({
|
|
@@ -8587,12 +8588,12 @@ var init_chunk_FBV7NLKO = __esm({
|
|
|
8587
8588
|
}
|
|
8588
8589
|
});
|
|
8589
8590
|
|
|
8590
|
-
// ../../packages/core/dist/chunk-
|
|
8591
|
+
// ../../packages/core/dist/chunk-GBX5UNUO.js
|
|
8591
8592
|
var hubPageWatchParam, pageWatchedBaseSchema, hubPageWatchResponseSchema;
|
|
8592
|
-
var
|
|
8593
|
-
"../../packages/core/dist/chunk-
|
|
8593
|
+
var init_chunk_GBX5UNUO = __esm({
|
|
8594
|
+
"../../packages/core/dist/chunk-GBX5UNUO.js"() {
|
|
8594
8595
|
"use strict";
|
|
8595
|
-
|
|
8596
|
+
init_chunk_U4FSUKVU();
|
|
8596
8597
|
init_chunk_FBV7NLKO();
|
|
8597
8598
|
init_chunk_HZ6CADSY();
|
|
8598
8599
|
init_zod();
|
|
@@ -13133,7 +13134,7 @@ var init_chunk_2ISUBJG7 = __esm({
|
|
|
13133
13134
|
}
|
|
13134
13135
|
});
|
|
13135
13136
|
|
|
13136
|
-
// ../../packages/core/dist/chunk-
|
|
13137
|
+
// ../../packages/core/dist/chunk-FQ6TZ2X4.js
|
|
13137
13138
|
function describeRole(role) {
|
|
13138
13139
|
if (typeof role === "string") {
|
|
13139
13140
|
return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
|
|
@@ -13312,11 +13313,11 @@ function terminalRunCount(counts) {
|
|
|
13312
13313
|
return counts.successful_runs + counts.failed_runs;
|
|
13313
13314
|
}
|
|
13314
13315
|
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;
|
|
13315
|
-
var
|
|
13316
|
-
"../../packages/core/dist/chunk-
|
|
13316
|
+
var init_chunk_FQ6TZ2X4 = __esm({
|
|
13317
|
+
"../../packages/core/dist/chunk-FQ6TZ2X4.js"() {
|
|
13317
13318
|
"use strict";
|
|
13318
13319
|
init_chunk_2YEGUQR7();
|
|
13319
|
-
|
|
13320
|
+
init_chunk_RLS7WBVR();
|
|
13320
13321
|
init_chunk_4LXDRTO4();
|
|
13321
13322
|
init_chunk_MLNQUHG5();
|
|
13322
13323
|
init_chunk_2ISUBJG7();
|
|
@@ -14390,7 +14391,7 @@ var init_chunk_L5KGJZQD = __esm({
|
|
|
14390
14391
|
}
|
|
14391
14392
|
});
|
|
14392
14393
|
|
|
14393
|
-
// ../../packages/core/dist/chunk-
|
|
14394
|
+
// ../../packages/core/dist/chunk-RUFGXTXW.js
|
|
14394
14395
|
function declaresNoConnection(agent) {
|
|
14395
14396
|
return agent.connection === null && !agent.connection_id;
|
|
14396
14397
|
}
|
|
@@ -15122,12 +15123,12 @@ function skillSectionsAsResources(scope) {
|
|
|
15122
15123
|
};
|
|
15123
15124
|
}
|
|
15124
15125
|
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;
|
|
15125
|
-
var
|
|
15126
|
-
"../../packages/core/dist/chunk-
|
|
15126
|
+
var init_chunk_RUFGXTXW = __esm({
|
|
15127
|
+
"../../packages/core/dist/chunk-RUFGXTXW.js"() {
|
|
15127
15128
|
"use strict";
|
|
15128
15129
|
init_chunk_JSPSTJH4();
|
|
15129
|
-
|
|
15130
|
-
|
|
15130
|
+
init_chunk_XYKOUYXA();
|
|
15131
|
+
init_chunk_FQ6TZ2X4();
|
|
15131
15132
|
init_chunk_LBDH7LCG();
|
|
15132
15133
|
init_chunk_4LXDRTO4();
|
|
15133
15134
|
init_chunk_L5KGJZQD();
|
|
@@ -17550,7 +17551,7 @@ var init_contracts = __esm({
|
|
|
17550
17551
|
init_chunk_MF2VVXBR();
|
|
17551
17552
|
init_chunk_IPXBFWUU();
|
|
17552
17553
|
init_chunk_P5GJNS5R();
|
|
17553
|
-
|
|
17554
|
+
init_chunk_BZVN5MG2();
|
|
17554
17555
|
init_chunk_ZC6YGHNX();
|
|
17555
17556
|
init_chunk_5DGHIY7L();
|
|
17556
17557
|
init_chunk_HFEOIQF4();
|
|
@@ -17565,8 +17566,8 @@ var init_contracts = __esm({
|
|
|
17565
17566
|
init_chunk_CMRECH67();
|
|
17566
17567
|
init_chunk_34LE6P7E();
|
|
17567
17568
|
init_chunk_FPSDNS2E();
|
|
17568
|
-
|
|
17569
|
-
|
|
17569
|
+
init_chunk_GBX5UNUO();
|
|
17570
|
+
init_chunk_U4FSUKVU();
|
|
17570
17571
|
init_chunk_SY6PLCPK();
|
|
17571
17572
|
init_chunk_KMAC3O3L();
|
|
17572
17573
|
init_chunk_KSTYTQ7I();
|
|
@@ -17584,12 +17585,12 @@ var init_contracts = __esm({
|
|
|
17584
17585
|
init_chunk_WEV7ZGHP();
|
|
17585
17586
|
init_chunk_7CYHPF35();
|
|
17586
17587
|
init_chunk_NETRUHZF();
|
|
17587
|
-
|
|
17588
|
+
init_chunk_RUFGXTXW();
|
|
17588
17589
|
init_chunk_JSPSTJH4();
|
|
17589
|
-
|
|
17590
|
-
|
|
17590
|
+
init_chunk_XYKOUYXA();
|
|
17591
|
+
init_chunk_FQ6TZ2X4();
|
|
17591
17592
|
init_chunk_2YEGUQR7();
|
|
17592
|
-
|
|
17593
|
+
init_chunk_RLS7WBVR();
|
|
17593
17594
|
init_chunk_JDJ4EUOL();
|
|
17594
17595
|
init_chunk_6AYIXGDT();
|
|
17595
17596
|
init_chunk_XCWEXZQE();
|
|
@@ -18839,9 +18840,9 @@ function entryFlagRefusal(command2, args2, dataNamespaces) {
|
|
|
18839
18840
|
if (reads === void 0 || reads === "selectors") return null;
|
|
18840
18841
|
return unreadArgumentRefusal(invocation, args2.slice(named - 1), reads, SPLITS_AT_FIRST_LONG_FLAG.has(command2));
|
|
18841
18842
|
}
|
|
18842
|
-
function isNewerVersion(
|
|
18843
|
+
function isNewerVersion(latest2, current) {
|
|
18843
18844
|
const strip = (v) => v.replace(/[-+].*$/, "");
|
|
18844
|
-
const l = strip(
|
|
18845
|
+
const l = strip(latest2).split(".").map(Number);
|
|
18845
18846
|
const c = strip(current).split(".").map(Number);
|
|
18846
18847
|
for (let i = 0; i < Math.max(l.length, c.length); i++) {
|
|
18847
18848
|
const lv = l[i] ?? 0;
|
|
@@ -19045,6 +19046,7 @@ var init_utils = __esm({
|
|
|
19045
19046
|
["admin vault import", { positionals: 0, values: ["--org", "--connector", "--max-puts", "--approved"] }],
|
|
19046
19047
|
["admin vault revert", { positionals: 0, values: ["--org", "--connector"] }],
|
|
19047
19048
|
["admin vault base-dry-run", { positionals: 0, values: ["--org", "--base", "--after"] }],
|
|
19049
|
+
["admin vault mount-credential-count", { positionals: 0, values: ["--org", "--cursor"] }],
|
|
19048
19050
|
["admin harness mass-destroy", { positionals: 0, values: ["--org", "--hub"], dryRun: true }],
|
|
19049
19051
|
["admin harness disable", { positionals: 0 }],
|
|
19050
19052
|
["admin harness enable", { positionals: 0 }],
|
|
@@ -20304,6 +20306,12 @@ var init_api_client = __esm({
|
|
|
20304
20306
|
if (query.after) params.set("after", query.after);
|
|
20305
20307
|
return this.request("GET", `/api/admin/data-explorer/debug/base-vault-dry-run?${params.toString()}`);
|
|
20306
20308
|
}
|
|
20309
|
+
/** One page of the platform's S3 mount credential count: numbers per org, never a key. */
|
|
20310
|
+
async debugS3CredentialCount(query) {
|
|
20311
|
+
const params = new URLSearchParams({ org_id: query.org_id });
|
|
20312
|
+
if (query.cursor) params.set("cursor", query.cursor);
|
|
20313
|
+
return this.request("GET", `/api/admin/data-explorer/debug/s3-credential-count?${params.toString()}`);
|
|
20314
|
+
}
|
|
20307
20315
|
async debugListAnalyticsTables() {
|
|
20308
20316
|
return this.request("GET", "/api/admin/data-explorer/debug/analytics/tables");
|
|
20309
20317
|
}
|
|
@@ -22186,11 +22194,11 @@ function buildSkillState() {
|
|
|
22186
22194
|
}
|
|
22187
22195
|
const version = lowestInstalledVersion(installs);
|
|
22188
22196
|
const cached = readCachedLatest(SKILL_CACHE_FILE);
|
|
22189
|
-
const
|
|
22197
|
+
const latest2 = cached && version && isNewerVersion(cached, version) ? cached : null;
|
|
22190
22198
|
return {
|
|
22191
22199
|
installed: true,
|
|
22192
22200
|
version,
|
|
22193
|
-
latest,
|
|
22201
|
+
latest: latest2,
|
|
22194
22202
|
paths: installs.map((i) => i.path)
|
|
22195
22203
|
};
|
|
22196
22204
|
}
|
|
@@ -23036,9 +23044,9 @@ var init_pages2 = __esm({
|
|
|
23036
23044
|
var init_evals = __esm({
|
|
23037
23045
|
"../../packages/core/dist/contracts/evals.js"() {
|
|
23038
23046
|
"use strict";
|
|
23039
|
-
|
|
23047
|
+
init_chunk_FQ6TZ2X4();
|
|
23040
23048
|
init_chunk_2YEGUQR7();
|
|
23041
|
-
|
|
23049
|
+
init_chunk_RLS7WBVR();
|
|
23042
23050
|
init_chunk_4LXDRTO4();
|
|
23043
23051
|
init_chunk_MLNQUHG5();
|
|
23044
23052
|
init_chunk_KB5RK3RP();
|
|
@@ -24064,12 +24072,12 @@ var init_hub_materializer = __esm({
|
|
|
24064
24072
|
var init_ci = __esm({
|
|
24065
24073
|
"../../packages/core/dist/contracts/ci.js"() {
|
|
24066
24074
|
"use strict";
|
|
24067
|
-
|
|
24075
|
+
init_chunk_RUFGXTXW();
|
|
24068
24076
|
init_chunk_JSPSTJH4();
|
|
24069
|
-
|
|
24070
|
-
|
|
24077
|
+
init_chunk_XYKOUYXA();
|
|
24078
|
+
init_chunk_FQ6TZ2X4();
|
|
24071
24079
|
init_chunk_2YEGUQR7();
|
|
24072
|
-
|
|
24080
|
+
init_chunk_RLS7WBVR();
|
|
24073
24081
|
init_chunk_LBDH7LCG();
|
|
24074
24082
|
init_chunk_4LXDRTO4();
|
|
24075
24083
|
init_chunk_L5KGJZQD();
|
|
@@ -24744,12 +24752,12 @@ function routeToSubtree(options) {
|
|
|
24744
24752
|
}
|
|
24745
24753
|
const repeated = repeatedFlagWithNoTargetRefusal(verb, tokens2);
|
|
24746
24754
|
if (repeated) return { ok: false, refusal: repeated };
|
|
24747
|
-
const
|
|
24748
|
-
if (
|
|
24755
|
+
const empty2 = SUBTREE_FLAGS.find(({ flag: flag2, token }) => tokens2[token] === "" || tokens2.trailingFlag === flag2);
|
|
24756
|
+
if (empty2) {
|
|
24749
24757
|
return {
|
|
24750
24758
|
ok: false,
|
|
24751
|
-
refusal: `\`wayai ${verb} ${
|
|
24752
|
-
wayai ${verb} ${
|
|
24759
|
+
refusal: `\`wayai ${verb} ${empty2.flag}\` needs ${empty2.target}, and none followed it.
|
|
24760
|
+
wayai ${verb} ${empty2.flag} ${empty2.value}`
|
|
24753
24761
|
};
|
|
24754
24762
|
}
|
|
24755
24763
|
const layout = gitRoot ? resolveLayout(gitRoot) : null;
|
|
@@ -30728,12 +30736,12 @@ async function useCommand(args2) {
|
|
|
30728
30736
|
].join("\n")
|
|
30729
30737
|
);
|
|
30730
30738
|
}
|
|
30731
|
-
const
|
|
30739
|
+
const add2 = addFlag !== void 0;
|
|
30732
30740
|
const selector = resolveScopeSelector("use", args2);
|
|
30733
30741
|
if (!selector) throw expected(USAGE2);
|
|
30734
30742
|
const { axis, id } = resolveScopeTarget(selector);
|
|
30735
30743
|
const noun = axisNoun(axis);
|
|
30736
|
-
if (
|
|
30744
|
+
if (add2) {
|
|
30737
30745
|
const widened = addToScope(axis, id);
|
|
30738
30746
|
console.log(
|
|
30739
30747
|
widened ? `Worktree scope widened \u2014 now ${describeAxis(axis, widened)}.` : `Worktree scope already includes ${noun} ${id}.`
|
|
@@ -38939,11 +38947,12 @@ var init_file_map = __esm({
|
|
|
38939
38947
|
});
|
|
38940
38948
|
|
|
38941
38949
|
// ../../packages/core/dist/contracts/vault-import.js
|
|
38942
|
-
var VAULT_IMPORT_DEFAULT_PUTS, VAULT_IMPORT_MAX_PUTS, VAULT_IMPORT_MAX_APPROVED, vaultImportRunBody, vaultImportRevertBody, dryRunKey, dryRunCount, dryRunCounts, dryRunTable, baseVaultDryRunReport, BASE_VAULT_DRY_RUN_UNREADABLE, dryRunBaseId, baseVaultDryRunBase, BASE_VAULT_DRY_RUN_LISTINGS, baseVaultDryRunPage, baseVaultDryRunQuery;
|
|
38950
|
+
var VAULT_IMPORT_DEFAULT_PUTS, VAULT_IMPORT_MAX_PUTS, VAULT_IMPORT_MAX_APPROVED, vaultImportRunBody, vaultImportRevertBody, dryRunKey, dryRunCount, dryRunCounts, dryRunTable, baseVaultDryRunReport, BASE_VAULT_DRY_RUN_UNREADABLE, dryRunBaseId, baseVaultDryRunBase, BASE_VAULT_DRY_RUN_LISTINGS, baseVaultDryRunPage, baseVaultDryRunQuery, S3_CREDENTIAL_COUNT_PAGE_KEYS, s3CountInstant, s3CountCursor, s3CredentialCountOrg, s3CredentialCountPage, s3CredentialCountQuery;
|
|
38943
38951
|
var init_vault_import = __esm({
|
|
38944
38952
|
"../../packages/core/dist/contracts/vault-import.js"() {
|
|
38945
38953
|
"use strict";
|
|
38946
38954
|
init_chunk_HZ6CADSY();
|
|
38955
|
+
init_chunk_MIWZOSPI();
|
|
38947
38956
|
init_zod();
|
|
38948
38957
|
VAULT_IMPORT_DEFAULT_PUTS = 25;
|
|
38949
38958
|
VAULT_IMPORT_MAX_PUTS = 100;
|
|
@@ -38990,6 +38999,29 @@ var init_vault_import = __esm({
|
|
|
38990
38999
|
base_id: external_exports.string().regex(/^(?!\.\.?$)[A-Za-z0-9._-]{1,256}$/).optional(),
|
|
38991
39000
|
after: dryRunBaseId.optional()
|
|
38992
39001
|
}).refine((query) => !(query.base_id && query.after), { message: "base_id and after cannot be combined" });
|
|
39002
|
+
S3_CREDENTIAL_COUNT_PAGE_KEYS = 500;
|
|
39003
|
+
s3CountInstant = timestampSchema.refine(isIsoTimestamp).nullable();
|
|
39004
|
+
s3CountCursor = external_exports.string().min(1).max(4096);
|
|
39005
|
+
s3CredentialCountOrg = external_exports.strictObject({
|
|
39006
|
+
org_id: external_exports.string().regex(/^[A-Za-z0-9_-]{1,128}$/),
|
|
39007
|
+
live: dryRunCount,
|
|
39008
|
+
expired: dryRunCount,
|
|
39009
|
+
no_expiry: dryRunCount,
|
|
39010
|
+
oldest_created_at: s3CountInstant,
|
|
39011
|
+
newest_created_at: s3CountInstant,
|
|
39012
|
+
last_expires_at: s3CountInstant
|
|
39013
|
+
});
|
|
39014
|
+
s3CredentialCountPage = external_exports.strictObject({
|
|
39015
|
+
listed: dryRunCount.max(S3_CREDENTIAL_COUNT_PAGE_KEYS),
|
|
39016
|
+
vanished: dryRunCount,
|
|
39017
|
+
unreadable: dryRunCount,
|
|
39018
|
+
orgs: external_exports.array(s3CredentialCountOrg).max(S3_CREDENTIAL_COUNT_PAGE_KEYS),
|
|
39019
|
+
next_cursor: s3CountCursor.nullable()
|
|
39020
|
+
});
|
|
39021
|
+
s3CredentialCountQuery = external_exports.object({
|
|
39022
|
+
org_id: uuidSchema,
|
|
39023
|
+
cursor: s3CountCursor.optional()
|
|
39024
|
+
});
|
|
38993
39025
|
}
|
|
38994
39026
|
});
|
|
38995
39027
|
|
|
@@ -39113,6 +39145,53 @@ var init_base_vault_dry_run = __esm({
|
|
|
39113
39145
|
}
|
|
39114
39146
|
});
|
|
39115
39147
|
|
|
39148
|
+
// src/lib/s3-credential-count.ts
|
|
39149
|
+
function add(into, from) {
|
|
39150
|
+
into.live += from.live;
|
|
39151
|
+
into.expired += from.expired;
|
|
39152
|
+
into.no_expiry += from.no_expiry;
|
|
39153
|
+
into.oldest_created_at = earliest(into.oldest_created_at, from.oldest_created_at);
|
|
39154
|
+
into.newest_created_at = latest(into.newest_created_at, from.newest_created_at);
|
|
39155
|
+
into.last_expires_at = latest(into.last_expires_at, from.last_expires_at);
|
|
39156
|
+
}
|
|
39157
|
+
function summarizeS3CredentialCount(input) {
|
|
39158
|
+
const orgs = /* @__PURE__ */ new Map();
|
|
39159
|
+
const total = { ...empty(), orgs: 0 };
|
|
39160
|
+
for (const row of input.pages.flatMap((page) => page.orgs)) {
|
|
39161
|
+
const into = orgs.get(row.org_id) ?? { org_id: row.org_id, ...empty() };
|
|
39162
|
+
orgs.set(row.org_id, into);
|
|
39163
|
+
add(into, row);
|
|
39164
|
+
add(total, row);
|
|
39165
|
+
}
|
|
39166
|
+
total.orgs = orgs.size;
|
|
39167
|
+
const nextCursor = input.pages.length === 0 ? input.resumedFrom ?? null : input.pages.at(-1).next_cursor;
|
|
39168
|
+
const sum = (field) => input.pages.reduce((n, page) => n + page[field], 0);
|
|
39169
|
+
const reasons = [];
|
|
39170
|
+
if (input.resumedFrom) reasons.push("resumed_from_cursor");
|
|
39171
|
+
if (nextCursor !== null) reasons.push("listing_truncated");
|
|
39172
|
+
if (input.stop) reasons.push(input.stop);
|
|
39173
|
+
return {
|
|
39174
|
+
complete: reasons.length === 0,
|
|
39175
|
+
incomplete_reasons: reasons,
|
|
39176
|
+
reads: input.pages.length,
|
|
39177
|
+
listed: sum("listed"),
|
|
39178
|
+
vanished: sum("vanished"),
|
|
39179
|
+
unreadable: sum("unreadable"),
|
|
39180
|
+
total,
|
|
39181
|
+
next_cursor: nextCursor,
|
|
39182
|
+
orgs: [...orgs.values()].sort((a, b) => a.org_id < b.org_id ? -1 : 1)
|
|
39183
|
+
};
|
|
39184
|
+
}
|
|
39185
|
+
var earliest, latest, empty;
|
|
39186
|
+
var init_s3_credential_count = __esm({
|
|
39187
|
+
"src/lib/s3-credential-count.ts"() {
|
|
39188
|
+
"use strict";
|
|
39189
|
+
earliest = (a, b) => a === null || b !== null && b < a ? b : a;
|
|
39190
|
+
latest = (a, b) => a === null || b !== null && b > a ? b : a;
|
|
39191
|
+
empty = () => ({ live: 0, expired: 0, no_expiry: 0, oldest_created_at: null, newest_created_at: null, last_expires_at: null });
|
|
39192
|
+
}
|
|
39193
|
+
});
|
|
39194
|
+
|
|
39116
39195
|
// src/commands/admin.ts
|
|
39117
39196
|
var admin_exports = {};
|
|
39118
39197
|
__export(admin_exports, {
|
|
@@ -39344,6 +39423,9 @@ async function adminCommand(args2) {
|
|
|
39344
39423
|
case "base-dry-run":
|
|
39345
39424
|
await runVaultBaseDryRun(flagArgs);
|
|
39346
39425
|
return;
|
|
39426
|
+
case "mount-credential-count":
|
|
39427
|
+
await runVaultS3CredentialCount(flagArgs);
|
|
39428
|
+
return;
|
|
39347
39429
|
default:
|
|
39348
39430
|
printHelp2();
|
|
39349
39431
|
process.exit(1);
|
|
@@ -40224,6 +40306,26 @@ async function runVaultImport(flagArgs) {
|
|
|
40224
40306
|
}
|
|
40225
40307
|
printVaultReport(data);
|
|
40226
40308
|
}
|
|
40309
|
+
async function readAdminPages(read, nextOf, start, paceMs = 0) {
|
|
40310
|
+
const pages = [];
|
|
40311
|
+
let cursor = start;
|
|
40312
|
+
do {
|
|
40313
|
+
if (pages.length > 0 && paceMs > 0) await new Promise((resolve13) => setTimeout(resolve13, paceMs));
|
|
40314
|
+
try {
|
|
40315
|
+
const page = await read(cursor);
|
|
40316
|
+
pages.push(page);
|
|
40317
|
+
cursor = nextOf(page) ?? void 0;
|
|
40318
|
+
} catch (err) {
|
|
40319
|
+
const limited = err instanceof ApiError && err.status === 429;
|
|
40320
|
+
if (pages.length === 0 && !limited) {
|
|
40321
|
+
exitOnApiError(err);
|
|
40322
|
+
throw err;
|
|
40323
|
+
}
|
|
40324
|
+
return { pages, stop: limited ? "rate_limited" : "request_failed" };
|
|
40325
|
+
}
|
|
40326
|
+
} while (cursor);
|
|
40327
|
+
return { pages };
|
|
40328
|
+
}
|
|
40227
40329
|
async function runVaultBaseDryRun(flagArgs) {
|
|
40228
40330
|
const USAGE8 = "wayai admin vault base-dry-run --org <org_id> [--base <base_id>] [--after <base_id>] [--json]";
|
|
40229
40331
|
let orgId;
|
|
@@ -40250,24 +40352,11 @@ async function runVaultBaseDryRun(flagArgs) {
|
|
|
40250
40352
|
}
|
|
40251
40353
|
const { config, accessToken } = await requireAuth();
|
|
40252
40354
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
40253
|
-
const pages =
|
|
40254
|
-
|
|
40255
|
-
|
|
40256
|
-
|
|
40257
|
-
|
|
40258
|
-
const { data } = await client.debugBaseVaultDryRun({ ...query.data, after: cursor });
|
|
40259
|
-
pages.push(data);
|
|
40260
|
-
cursor = data.next_after ?? void 0;
|
|
40261
|
-
} catch (err) {
|
|
40262
|
-
const limited = err instanceof ApiError && err.status === 429;
|
|
40263
|
-
if (pages.length === 0 && !limited) {
|
|
40264
|
-
exitOnApiError(err);
|
|
40265
|
-
throw err;
|
|
40266
|
-
}
|
|
40267
|
-
stop = limited ? "rate_limited" : "request_failed";
|
|
40268
|
-
break;
|
|
40269
|
-
}
|
|
40270
|
-
} while (cursor);
|
|
40355
|
+
const { pages, stop } = await readAdminPages(
|
|
40356
|
+
async (cursor) => (await client.debugBaseVaultDryRun({ ...query.data, after: cursor })).data,
|
|
40357
|
+
(page) => page.next_after,
|
|
40358
|
+
after
|
|
40359
|
+
);
|
|
40271
40360
|
const summary = summarizeBaseVaultDryRun({ orgId: query.data.org_id, pages, resumedAfter: after, stop });
|
|
40272
40361
|
const gotItsBase = summary.bases_read === 1 && summary.incomplete_reasons.every((reason2) => reason2 === "single_base");
|
|
40273
40362
|
if (!summary.complete && !gotItsBase) process.exitCode = 1;
|
|
@@ -40291,6 +40380,56 @@ async function runVaultBaseDryRun(flagArgs) {
|
|
|
40291
40380
|
if (base.status === "read") for (const line of nonZero(base.report)) console.log(` ${line}`);
|
|
40292
40381
|
}
|
|
40293
40382
|
}
|
|
40383
|
+
async function runVaultS3CredentialCount(flagArgs) {
|
|
40384
|
+
const USAGE8 = "wayai admin vault mount-credential-count --org <org_id> [--cursor <cursor>] [--json]";
|
|
40385
|
+
let orgId;
|
|
40386
|
+
let cursor;
|
|
40387
|
+
let jsonOutput = false;
|
|
40388
|
+
for (let i = 0; i < flagArgs.length; i++) {
|
|
40389
|
+
const flag = flagArgs[i];
|
|
40390
|
+
if (flag === "--org") orgId = requireFlagValue(flagArgs, ++i, "--org");
|
|
40391
|
+
else if (flag === "--cursor") cursor = requireFlagValue(flagArgs, ++i, "--cursor");
|
|
40392
|
+
else if (flag === "--json") jsonOutput = true;
|
|
40393
|
+
else {
|
|
40394
|
+
console.error(`Unknown flag: ${flag}`);
|
|
40395
|
+
console.error(USAGE8);
|
|
40396
|
+
process.exit(1);
|
|
40397
|
+
}
|
|
40398
|
+
}
|
|
40399
|
+
const query = s3CredentialCountQuery.safeParse({ org_id: orgId, cursor });
|
|
40400
|
+
if (!query.success) {
|
|
40401
|
+
console.error("--org must be an organization id, and --cursor the cursor a run printed.");
|
|
40402
|
+
console.error(USAGE8);
|
|
40403
|
+
process.exit(1);
|
|
40404
|
+
}
|
|
40405
|
+
const { config, accessToken } = await requireAuth();
|
|
40406
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
40407
|
+
const { pages, stop } = await readAdminPages(
|
|
40408
|
+
async (next) => (await client.debugS3CredentialCount({ org_id: query.data.org_id, cursor: next })).data,
|
|
40409
|
+
(page) => page.next_cursor,
|
|
40410
|
+
cursor,
|
|
40411
|
+
MOUNT_CREDENTIAL_COUNT_PACE_MS
|
|
40412
|
+
);
|
|
40413
|
+
const summary = summarizeS3CredentialCount({ pages, resumedFrom: cursor, stop });
|
|
40414
|
+
if (!summary.complete) process.exitCode = 1;
|
|
40415
|
+
if (jsonOutput) {
|
|
40416
|
+
console.log(JSON.stringify(summary, null, 2));
|
|
40417
|
+
return;
|
|
40418
|
+
}
|
|
40419
|
+
const { total } = summary;
|
|
40420
|
+
console.log(`S3 credential count \u2014 every org \u2014 ${summary.complete ? "complete" : `INCOMPLETE, not the platform's total (${summary.incomplete_reasons.join(", ")})`}`);
|
|
40421
|
+
console.log(`reads: ${summary.reads} of the 120/hour cap`);
|
|
40422
|
+
console.log(`keys: listed ${summary.listed}, gone by their read ${summary.vanished}, with no org ${summary.unreadable}`);
|
|
40423
|
+
console.log(`live: ${total.live} in ${total.orgs} org(s); expired, not yet evicted: ${total.expired}; with no expiry: ${total.no_expiry}`);
|
|
40424
|
+
const lastExpiry = (counts) => counts.no_expiry > 0 ? `never: ${counts.no_expiry} hold no expiry` : counts.last_expires_at ?? "never";
|
|
40425
|
+
if (total.live > 0) console.log(`created ${total.oldest_created_at ?? "?"} to ${total.newest_created_at ?? "?"}; the last expires ${lastExpiry(total)}`);
|
|
40426
|
+
if (stop || summary.next_cursor) {
|
|
40427
|
+
console.log(summary.next_cursor ? `To continue: --cursor ${summary.next_cursor}` : "Nothing read past the start; re-run later.");
|
|
40428
|
+
}
|
|
40429
|
+
for (const row of summary.orgs) {
|
|
40430
|
+
console.log(`${row.org_id}: live ${row.live}, expired ${row.expired}, no expiry ${row.no_expiry}, created ${row.oldest_created_at ?? "?"} to ${row.newest_created_at ?? "?"}, last expires ${lastExpiry(row)}`);
|
|
40431
|
+
}
|
|
40432
|
+
}
|
|
40294
40433
|
async function runVaultRevert(flagArgs) {
|
|
40295
40434
|
const USAGE8 = "wayai admin vault revert --org <org_id> --connector <connector_id> [--apply] [--yes] [--json]";
|
|
40296
40435
|
const { orgId, connectorId, apply, yes, jsonOutput } = parseVaultFlags(flagArgs, USAGE8, false);
|
|
@@ -41729,6 +41868,8 @@ Usage:
|
|
|
41729
41868
|
|
|
41730
41869
|
wayai admin vault base-dry-run --org <org_id> [--base <base_id>] [--after <base_id>] [--json]
|
|
41731
41870
|
What moving an org's base secrets to the vault would do: counts and reason codes per base, and the sum over the bases read. Reads only. One read per 50 bases (or one for --base), one sleeping base woken per base read: by hand, never scheduled. Marks and exits non-zero on any partial result (a base unreadable, the budget hit, a resumed run)
|
|
41871
|
+
wayai admin vault mount-credential-count --org <org_id> [--cursor <cursor>] [--json]
|
|
41872
|
+
How many S3 mount credentials every org holds: live, expired, with no expiry, and when created. Counts only, never a key. --org is the org the read is attested under. One read per 500 credentials: by hand, never scheduled. Marks and exits non-zero on any partial result
|
|
41732
41873
|
|
|
41733
41874
|
wayai admin vault-gate status [--json] Print the connectors whose new credentials go to the credentials vault
|
|
41734
41875
|
wayai admin vault-gate add <connector> [--yes] [--json]
|
|
@@ -41900,7 +42041,7 @@ Audit + rate limit:
|
|
|
41900
42041
|
across all sources. Platform-admin grant required.
|
|
41901
42042
|
`.trim());
|
|
41902
42043
|
}
|
|
41903
|
-
var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, COMMUNITIES_GATE, CASES_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VAULT_GATE_CONNECTORS, VAULT_GATE_BY_ID_ONLY, VALID_NOTICE_SEVERITIES;
|
|
42044
|
+
var VALID_TYPES, VALID_ANALYTICS_TABLES, MOUNT_CREDENTIAL_COUNT_PACE_MS, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, COMMUNITIES_GATE, CASES_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VAULT_GATE_CONNECTORS, VAULT_GATE_BY_ID_ONLY, VALID_NOTICE_SEVERITIES;
|
|
41904
42045
|
var init_admin = __esm({
|
|
41905
42046
|
"src/commands/admin.ts"() {
|
|
41906
42047
|
"use strict";
|
|
@@ -41917,8 +42058,10 @@ var init_admin = __esm({
|
|
|
41917
42058
|
init_vault_import();
|
|
41918
42059
|
init_vault();
|
|
41919
42060
|
init_base_vault_dry_run();
|
|
42061
|
+
init_s3_credential_count();
|
|
41920
42062
|
VALID_TYPES = dataExplorerDebugDoType.options;
|
|
41921
42063
|
VALID_ANALYTICS_TABLES = dataExplorerDebugAnalyticsTable.options;
|
|
42064
|
+
MOUNT_CREDENTIAL_COUNT_PACE_MS = 12500;
|
|
41922
42065
|
HARNESS_GATE = {
|
|
41923
42066
|
group: "harness",
|
|
41924
42067
|
key: "harness_enabled",
|
|
@@ -41992,8 +42135,8 @@ var init_admin = __esm({
|
|
|
41992
42135
|
});
|
|
41993
42136
|
|
|
41994
42137
|
// src/lib/version-status.ts
|
|
41995
|
-
function componentStatus(current,
|
|
41996
|
-
return { current, latest, behind: Boolean(current &&
|
|
42138
|
+
function componentStatus(current, latest2) {
|
|
42139
|
+
return { current, latest: latest2, behind: Boolean(current && latest2 && isNewerVersion(latest2, current)) };
|
|
41997
42140
|
}
|
|
41998
42141
|
function resolveVersionStatus(cliVersion) {
|
|
41999
42142
|
const cliLatest = readVersionCache(CLI_CACHE_FILE)?.latest ?? null;
|
|
@@ -42425,18 +42568,18 @@ async function updateCommand(pkg2) {
|
|
|
42425
42568
|
console.log(`Current version: ${pkg2.version}`);
|
|
42426
42569
|
console.log("Checking for updates...");
|
|
42427
42570
|
try {
|
|
42428
|
-
const
|
|
42571
|
+
const latest2 = execSync("npm view @wayai/cli version", {
|
|
42429
42572
|
timeout: 1e4
|
|
42430
42573
|
}).toString().trim();
|
|
42431
|
-
if (
|
|
42574
|
+
if (latest2 === pkg2.version) {
|
|
42432
42575
|
console.log(`Already on the latest version (${pkg2.version}).`);
|
|
42433
42576
|
} else {
|
|
42434
|
-
console.log(`Updating ${pkg2.version} \u2192 ${
|
|
42577
|
+
console.log(`Updating ${pkg2.version} \u2192 ${latest2}...`);
|
|
42435
42578
|
execSync("npm install -g @wayai/cli@latest", {
|
|
42436
42579
|
timeout: 6e4,
|
|
42437
42580
|
stdio: "inherit"
|
|
42438
42581
|
});
|
|
42439
|
-
console.log(`Updated to ${
|
|
42582
|
+
console.log(`Updated to ${latest2}.`);
|
|
42440
42583
|
}
|
|
42441
42584
|
} catch (err) {
|
|
42442
42585
|
captureException2(err);
|
|
@@ -45082,10 +45225,10 @@ function refreshCliCache() {
|
|
|
45082
45225
|
return new Promise((resolve13) => {
|
|
45083
45226
|
exec("npm view @wayai/cli version", { timeout: REFRESH_TIMEOUT_MS }, (err, stdout) => {
|
|
45084
45227
|
if (!err) {
|
|
45085
|
-
const
|
|
45086
|
-
if (
|
|
45228
|
+
const latest2 = stdout.trim();
|
|
45229
|
+
if (latest2) {
|
|
45087
45230
|
try {
|
|
45088
|
-
writeVersionCache(CLI_CACHE_FILE, { lastCheck: Date.now(), latest });
|
|
45231
|
+
writeVersionCache(CLI_CACHE_FILE, { lastCheck: Date.now(), latest: latest2 });
|
|
45089
45232
|
} catch {
|
|
45090
45233
|
}
|
|
45091
45234
|
}
|
|
@@ -45101,10 +45244,10 @@ async function refreshSkillCache() {
|
|
|
45101
45244
|
try {
|
|
45102
45245
|
const res = await fetch(url, { signal: controller.signal });
|
|
45103
45246
|
if (res.ok) {
|
|
45104
|
-
const
|
|
45105
|
-
if (
|
|
45247
|
+
const latest2 = parseFrontmatterVersion(await res.text());
|
|
45248
|
+
if (latest2) {
|
|
45106
45249
|
try {
|
|
45107
|
-
writeVersionCache(SKILL_CACHE_FILE, { lastCheck: Date.now(), latest });
|
|
45250
|
+
writeVersionCache(SKILL_CACHE_FILE, { lastCheck: Date.now(), latest: latest2 });
|
|
45108
45251
|
} catch {
|
|
45109
45252
|
}
|
|
45110
45253
|
}
|
|
@@ -45134,10 +45277,10 @@ async function fetchAndCacheAdminSkillVersion() {
|
|
|
45134
45277
|
const accessToken = await getAccessToken2(config);
|
|
45135
45278
|
const client = new ApiClient2({ apiUrl: config.api_url, accessToken });
|
|
45136
45279
|
const res = await client.adminSkillInstall(ADMIN_SKILL_NAME);
|
|
45137
|
-
const
|
|
45138
|
-
if (
|
|
45280
|
+
const latest2 = parseFrontmatterVersion(res.files[SKILL_FILENAME] ?? "");
|
|
45281
|
+
if (latest2) {
|
|
45139
45282
|
try {
|
|
45140
|
-
writeVersionCache(ADMIN_SKILL_CACHE_FILE, { lastCheck: Date.now(), latest });
|
|
45283
|
+
writeVersionCache(ADMIN_SKILL_CACHE_FILE, { lastCheck: Date.now(), latest: latest2 });
|
|
45141
45284
|
} catch {
|
|
45142
45285
|
}
|
|
45143
45286
|
}
|