@wayai/cli 0.3.319 → 0.3.321
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 +249 -102
- 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();
|
|
@@ -16714,7 +16715,7 @@ var init_chunk_OMPT4ZHR = __esm({
|
|
|
16714
16715
|
}
|
|
16715
16716
|
});
|
|
16716
16717
|
|
|
16717
|
-
// ../../packages/core/dist/chunk-
|
|
16718
|
+
// ../../packages/core/dist/chunk-SL2AJJMS.js
|
|
16718
16719
|
function refineScopedTarget(data, ctx) {
|
|
16719
16720
|
if (data.scope === "org") {
|
|
16720
16721
|
if (!data.org_id) {
|
|
@@ -16740,8 +16741,8 @@ function refineScopedTarget(data, ctx) {
|
|
|
16740
16741
|
}
|
|
16741
16742
|
}
|
|
16742
16743
|
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;
|
|
16743
|
-
var
|
|
16744
|
-
"../../packages/core/dist/chunk-
|
|
16744
|
+
var init_chunk_SL2AJJMS = __esm({
|
|
16745
|
+
"../../packages/core/dist/chunk-SL2AJJMS.js"() {
|
|
16745
16746
|
"use strict";
|
|
16746
16747
|
init_chunk_FECLIZTY();
|
|
16747
16748
|
init_chunk_BFG4ZWR4();
|
|
@@ -16902,10 +16903,11 @@ var init_chunk_5THT3WVS = __esm({
|
|
|
16902
16903
|
/** How long a native agent turn may run (`turnDeadlineSeconds`). */
|
|
16903
16904
|
turn_deadline_seconds: turnDeadlineSeconds.optional(),
|
|
16904
16905
|
/**
|
|
16905
|
-
* The catalog connectors (`connector_id`)
|
|
16906
|
-
*
|
|
16907
|
-
*
|
|
16908
|
-
*
|
|
16906
|
+
* The credentials vault's gate list (wayai#5644): catalog connectors (`connector_id`), replacing
|
|
16907
|
+
* the whole list; empty is the default. On the production Worker it decides only Instagram's gate,
|
|
16908
|
+
* every other vault gate being held open there whatever it lists; the rule, and the conditions it
|
|
16909
|
+
* holds under, are `apps/backend/src/durable-objects/platform-do/vault-gate.ts`'s. The route stores
|
|
16910
|
+
* it as JSON. An id no connector has matches nothing, so it leaves that connector off.
|
|
16909
16911
|
*/
|
|
16910
16912
|
vault_connector_ids: external_exports.array(uuidSchema).max(200).optional(),
|
|
16911
16913
|
/**
|
|
@@ -17550,7 +17552,7 @@ var init_contracts = __esm({
|
|
|
17550
17552
|
init_chunk_MF2VVXBR();
|
|
17551
17553
|
init_chunk_IPXBFWUU();
|
|
17552
17554
|
init_chunk_P5GJNS5R();
|
|
17553
|
-
|
|
17555
|
+
init_chunk_BZVN5MG2();
|
|
17554
17556
|
init_chunk_ZC6YGHNX();
|
|
17555
17557
|
init_chunk_5DGHIY7L();
|
|
17556
17558
|
init_chunk_HFEOIQF4();
|
|
@@ -17565,8 +17567,8 @@ var init_contracts = __esm({
|
|
|
17565
17567
|
init_chunk_CMRECH67();
|
|
17566
17568
|
init_chunk_34LE6P7E();
|
|
17567
17569
|
init_chunk_FPSDNS2E();
|
|
17568
|
-
|
|
17569
|
-
|
|
17570
|
+
init_chunk_GBX5UNUO();
|
|
17571
|
+
init_chunk_U4FSUKVU();
|
|
17570
17572
|
init_chunk_SY6PLCPK();
|
|
17571
17573
|
init_chunk_KMAC3O3L();
|
|
17572
17574
|
init_chunk_KSTYTQ7I();
|
|
@@ -17584,12 +17586,12 @@ var init_contracts = __esm({
|
|
|
17584
17586
|
init_chunk_WEV7ZGHP();
|
|
17585
17587
|
init_chunk_7CYHPF35();
|
|
17586
17588
|
init_chunk_NETRUHZF();
|
|
17587
|
-
|
|
17589
|
+
init_chunk_RUFGXTXW();
|
|
17588
17590
|
init_chunk_JSPSTJH4();
|
|
17589
|
-
|
|
17590
|
-
|
|
17591
|
+
init_chunk_XYKOUYXA();
|
|
17592
|
+
init_chunk_FQ6TZ2X4();
|
|
17591
17593
|
init_chunk_2YEGUQR7();
|
|
17592
|
-
|
|
17594
|
+
init_chunk_RLS7WBVR();
|
|
17593
17595
|
init_chunk_JDJ4EUOL();
|
|
17594
17596
|
init_chunk_6AYIXGDT();
|
|
17595
17597
|
init_chunk_XCWEXZQE();
|
|
@@ -17612,7 +17614,7 @@ var init_contracts = __esm({
|
|
|
17612
17614
|
init_chunk_EPW6REOS();
|
|
17613
17615
|
init_chunk_KYBVSEJ2();
|
|
17614
17616
|
init_chunk_NVKU5PPQ();
|
|
17615
|
-
|
|
17617
|
+
init_chunk_SL2AJJMS();
|
|
17616
17618
|
init_chunk_FECLIZTY();
|
|
17617
17619
|
init_chunk_BFG4ZWR4();
|
|
17618
17620
|
init_chunk_7VJ4SOFF();
|
|
@@ -18839,9 +18841,9 @@ function entryFlagRefusal(command2, args2, dataNamespaces) {
|
|
|
18839
18841
|
if (reads === void 0 || reads === "selectors") return null;
|
|
18840
18842
|
return unreadArgumentRefusal(invocation, args2.slice(named - 1), reads, SPLITS_AT_FIRST_LONG_FLAG.has(command2));
|
|
18841
18843
|
}
|
|
18842
|
-
function isNewerVersion(
|
|
18844
|
+
function isNewerVersion(latest2, current) {
|
|
18843
18845
|
const strip = (v) => v.replace(/[-+].*$/, "");
|
|
18844
|
-
const l = strip(
|
|
18846
|
+
const l = strip(latest2).split(".").map(Number);
|
|
18845
18847
|
const c = strip(current).split(".").map(Number);
|
|
18846
18848
|
for (let i = 0; i < Math.max(l.length, c.length); i++) {
|
|
18847
18849
|
const lv = l[i] ?? 0;
|
|
@@ -19045,6 +19047,7 @@ var init_utils = __esm({
|
|
|
19045
19047
|
["admin vault import", { positionals: 0, values: ["--org", "--connector", "--max-puts", "--approved"] }],
|
|
19046
19048
|
["admin vault revert", { positionals: 0, values: ["--org", "--connector"] }],
|
|
19047
19049
|
["admin vault base-dry-run", { positionals: 0, values: ["--org", "--base", "--after"] }],
|
|
19050
|
+
["admin vault mount-credential-count", { positionals: 0, values: ["--org", "--cursor"] }],
|
|
19048
19051
|
["admin harness mass-destroy", { positionals: 0, values: ["--org", "--hub"], dryRun: true }],
|
|
19049
19052
|
["admin harness disable", { positionals: 0 }],
|
|
19050
19053
|
["admin harness enable", { positionals: 0 }],
|
|
@@ -20304,6 +20307,12 @@ var init_api_client = __esm({
|
|
|
20304
20307
|
if (query.after) params.set("after", query.after);
|
|
20305
20308
|
return this.request("GET", `/api/admin/data-explorer/debug/base-vault-dry-run?${params.toString()}`);
|
|
20306
20309
|
}
|
|
20310
|
+
/** One page of the platform's S3 mount credential count: numbers per org, never a key. */
|
|
20311
|
+
async debugS3CredentialCount(query) {
|
|
20312
|
+
const params = new URLSearchParams({ org_id: query.org_id });
|
|
20313
|
+
if (query.cursor) params.set("cursor", query.cursor);
|
|
20314
|
+
return this.request("GET", `/api/admin/data-explorer/debug/s3-credential-count?${params.toString()}`);
|
|
20315
|
+
}
|
|
20307
20316
|
async debugListAnalyticsTables() {
|
|
20308
20317
|
return this.request("GET", "/api/admin/data-explorer/debug/analytics/tables");
|
|
20309
20318
|
}
|
|
@@ -22186,11 +22195,11 @@ function buildSkillState() {
|
|
|
22186
22195
|
}
|
|
22187
22196
|
const version = lowestInstalledVersion(installs);
|
|
22188
22197
|
const cached = readCachedLatest(SKILL_CACHE_FILE);
|
|
22189
|
-
const
|
|
22198
|
+
const latest2 = cached && version && isNewerVersion(cached, version) ? cached : null;
|
|
22190
22199
|
return {
|
|
22191
22200
|
installed: true,
|
|
22192
22201
|
version,
|
|
22193
|
-
latest,
|
|
22202
|
+
latest: latest2,
|
|
22194
22203
|
paths: installs.map((i) => i.path)
|
|
22195
22204
|
};
|
|
22196
22205
|
}
|
|
@@ -23036,9 +23045,9 @@ var init_pages2 = __esm({
|
|
|
23036
23045
|
var init_evals = __esm({
|
|
23037
23046
|
"../../packages/core/dist/contracts/evals.js"() {
|
|
23038
23047
|
"use strict";
|
|
23039
|
-
|
|
23048
|
+
init_chunk_FQ6TZ2X4();
|
|
23040
23049
|
init_chunk_2YEGUQR7();
|
|
23041
|
-
|
|
23050
|
+
init_chunk_RLS7WBVR();
|
|
23042
23051
|
init_chunk_4LXDRTO4();
|
|
23043
23052
|
init_chunk_MLNQUHG5();
|
|
23044
23053
|
init_chunk_KB5RK3RP();
|
|
@@ -24064,12 +24073,12 @@ var init_hub_materializer = __esm({
|
|
|
24064
24073
|
var init_ci = __esm({
|
|
24065
24074
|
"../../packages/core/dist/contracts/ci.js"() {
|
|
24066
24075
|
"use strict";
|
|
24067
|
-
|
|
24076
|
+
init_chunk_RUFGXTXW();
|
|
24068
24077
|
init_chunk_JSPSTJH4();
|
|
24069
|
-
|
|
24070
|
-
|
|
24078
|
+
init_chunk_XYKOUYXA();
|
|
24079
|
+
init_chunk_FQ6TZ2X4();
|
|
24071
24080
|
init_chunk_2YEGUQR7();
|
|
24072
|
-
|
|
24081
|
+
init_chunk_RLS7WBVR();
|
|
24073
24082
|
init_chunk_LBDH7LCG();
|
|
24074
24083
|
init_chunk_4LXDRTO4();
|
|
24075
24084
|
init_chunk_L5KGJZQD();
|
|
@@ -24744,12 +24753,12 @@ function routeToSubtree(options) {
|
|
|
24744
24753
|
}
|
|
24745
24754
|
const repeated = repeatedFlagWithNoTargetRefusal(verb, tokens2);
|
|
24746
24755
|
if (repeated) return { ok: false, refusal: repeated };
|
|
24747
|
-
const
|
|
24748
|
-
if (
|
|
24756
|
+
const empty2 = SUBTREE_FLAGS.find(({ flag: flag2, token }) => tokens2[token] === "" || tokens2.trailingFlag === flag2);
|
|
24757
|
+
if (empty2) {
|
|
24749
24758
|
return {
|
|
24750
24759
|
ok: false,
|
|
24751
|
-
refusal: `\`wayai ${verb} ${
|
|
24752
|
-
wayai ${verb} ${
|
|
24760
|
+
refusal: `\`wayai ${verb} ${empty2.flag}\` needs ${empty2.target}, and none followed it.
|
|
24761
|
+
wayai ${verb} ${empty2.flag} ${empty2.value}`
|
|
24753
24762
|
};
|
|
24754
24763
|
}
|
|
24755
24764
|
const layout = gitRoot ? resolveLayout(gitRoot) : null;
|
|
@@ -30728,12 +30737,12 @@ async function useCommand(args2) {
|
|
|
30728
30737
|
].join("\n")
|
|
30729
30738
|
);
|
|
30730
30739
|
}
|
|
30731
|
-
const
|
|
30740
|
+
const add2 = addFlag !== void 0;
|
|
30732
30741
|
const selector = resolveScopeSelector("use", args2);
|
|
30733
30742
|
if (!selector) throw expected(USAGE2);
|
|
30734
30743
|
const { axis, id } = resolveScopeTarget(selector);
|
|
30735
30744
|
const noun = axisNoun(axis);
|
|
30736
|
-
if (
|
|
30745
|
+
if (add2) {
|
|
30737
30746
|
const widened = addToScope(axis, id);
|
|
30738
30747
|
console.log(
|
|
30739
30748
|
widened ? `Worktree scope widened \u2014 now ${describeAxis(axis, widened)}.` : `Worktree scope already includes ${noun} ${id}.`
|
|
@@ -38939,11 +38948,12 @@ var init_file_map = __esm({
|
|
|
38939
38948
|
});
|
|
38940
38949
|
|
|
38941
38950
|
// ../../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;
|
|
38951
|
+
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
38952
|
var init_vault_import = __esm({
|
|
38944
38953
|
"../../packages/core/dist/contracts/vault-import.js"() {
|
|
38945
38954
|
"use strict";
|
|
38946
38955
|
init_chunk_HZ6CADSY();
|
|
38956
|
+
init_chunk_MIWZOSPI();
|
|
38947
38957
|
init_zod();
|
|
38948
38958
|
VAULT_IMPORT_DEFAULT_PUTS = 25;
|
|
38949
38959
|
VAULT_IMPORT_MAX_PUTS = 100;
|
|
@@ -38990,6 +39000,29 @@ var init_vault_import = __esm({
|
|
|
38990
39000
|
base_id: external_exports.string().regex(/^(?!\.\.?$)[A-Za-z0-9._-]{1,256}$/).optional(),
|
|
38991
39001
|
after: dryRunBaseId.optional()
|
|
38992
39002
|
}).refine((query) => !(query.base_id && query.after), { message: "base_id and after cannot be combined" });
|
|
39003
|
+
S3_CREDENTIAL_COUNT_PAGE_KEYS = 500;
|
|
39004
|
+
s3CountInstant = timestampSchema.refine(isIsoTimestamp).nullable();
|
|
39005
|
+
s3CountCursor = external_exports.string().min(1).max(4096);
|
|
39006
|
+
s3CredentialCountOrg = external_exports.strictObject({
|
|
39007
|
+
org_id: external_exports.string().regex(/^[A-Za-z0-9_-]{1,128}$/),
|
|
39008
|
+
live: dryRunCount,
|
|
39009
|
+
expired: dryRunCount,
|
|
39010
|
+
no_expiry: dryRunCount,
|
|
39011
|
+
oldest_created_at: s3CountInstant,
|
|
39012
|
+
newest_created_at: s3CountInstant,
|
|
39013
|
+
last_expires_at: s3CountInstant
|
|
39014
|
+
});
|
|
39015
|
+
s3CredentialCountPage = external_exports.strictObject({
|
|
39016
|
+
listed: dryRunCount.max(S3_CREDENTIAL_COUNT_PAGE_KEYS),
|
|
39017
|
+
vanished: dryRunCount,
|
|
39018
|
+
unreadable: dryRunCount,
|
|
39019
|
+
orgs: external_exports.array(s3CredentialCountOrg).max(S3_CREDENTIAL_COUNT_PAGE_KEYS),
|
|
39020
|
+
next_cursor: s3CountCursor.nullable()
|
|
39021
|
+
});
|
|
39022
|
+
s3CredentialCountQuery = external_exports.object({
|
|
39023
|
+
org_id: uuidSchema,
|
|
39024
|
+
cursor: s3CountCursor.optional()
|
|
39025
|
+
});
|
|
38993
39026
|
}
|
|
38994
39027
|
});
|
|
38995
39028
|
|
|
@@ -39113,6 +39146,53 @@ var init_base_vault_dry_run = __esm({
|
|
|
39113
39146
|
}
|
|
39114
39147
|
});
|
|
39115
39148
|
|
|
39149
|
+
// src/lib/s3-credential-count.ts
|
|
39150
|
+
function add(into, from) {
|
|
39151
|
+
into.live += from.live;
|
|
39152
|
+
into.expired += from.expired;
|
|
39153
|
+
into.no_expiry += from.no_expiry;
|
|
39154
|
+
into.oldest_created_at = earliest(into.oldest_created_at, from.oldest_created_at);
|
|
39155
|
+
into.newest_created_at = latest(into.newest_created_at, from.newest_created_at);
|
|
39156
|
+
into.last_expires_at = latest(into.last_expires_at, from.last_expires_at);
|
|
39157
|
+
}
|
|
39158
|
+
function summarizeS3CredentialCount(input) {
|
|
39159
|
+
const orgs = /* @__PURE__ */ new Map();
|
|
39160
|
+
const total = { ...empty(), orgs: 0 };
|
|
39161
|
+
for (const row of input.pages.flatMap((page) => page.orgs)) {
|
|
39162
|
+
const into = orgs.get(row.org_id) ?? { org_id: row.org_id, ...empty() };
|
|
39163
|
+
orgs.set(row.org_id, into);
|
|
39164
|
+
add(into, row);
|
|
39165
|
+
add(total, row);
|
|
39166
|
+
}
|
|
39167
|
+
total.orgs = orgs.size;
|
|
39168
|
+
const nextCursor = input.pages.length === 0 ? input.resumedFrom ?? null : input.pages.at(-1).next_cursor;
|
|
39169
|
+
const sum = (field) => input.pages.reduce((n, page) => n + page[field], 0);
|
|
39170
|
+
const reasons = [];
|
|
39171
|
+
if (input.resumedFrom) reasons.push("resumed_from_cursor");
|
|
39172
|
+
if (nextCursor !== null) reasons.push("listing_truncated");
|
|
39173
|
+
if (input.stop) reasons.push(input.stop);
|
|
39174
|
+
return {
|
|
39175
|
+
complete: reasons.length === 0,
|
|
39176
|
+
incomplete_reasons: reasons,
|
|
39177
|
+
reads: input.pages.length,
|
|
39178
|
+
listed: sum("listed"),
|
|
39179
|
+
vanished: sum("vanished"),
|
|
39180
|
+
unreadable: sum("unreadable"),
|
|
39181
|
+
total,
|
|
39182
|
+
next_cursor: nextCursor,
|
|
39183
|
+
orgs: [...orgs.values()].sort((a, b) => a.org_id < b.org_id ? -1 : 1)
|
|
39184
|
+
};
|
|
39185
|
+
}
|
|
39186
|
+
var earliest, latest, empty;
|
|
39187
|
+
var init_s3_credential_count = __esm({
|
|
39188
|
+
"src/lib/s3-credential-count.ts"() {
|
|
39189
|
+
"use strict";
|
|
39190
|
+
earliest = (a, b) => a === null || b !== null && b < a ? b : a;
|
|
39191
|
+
latest = (a, b) => a === null || b !== null && b > a ? b : a;
|
|
39192
|
+
empty = () => ({ live: 0, expired: 0, no_expiry: 0, oldest_created_at: null, newest_created_at: null, last_expires_at: null });
|
|
39193
|
+
}
|
|
39194
|
+
});
|
|
39195
|
+
|
|
39116
39196
|
// src/commands/admin.ts
|
|
39117
39197
|
var admin_exports = {};
|
|
39118
39198
|
__export(admin_exports, {
|
|
@@ -39344,6 +39424,9 @@ async function adminCommand(args2) {
|
|
|
39344
39424
|
case "base-dry-run":
|
|
39345
39425
|
await runVaultBaseDryRun(flagArgs);
|
|
39346
39426
|
return;
|
|
39427
|
+
case "mount-credential-count":
|
|
39428
|
+
await runVaultS3CredentialCount(flagArgs);
|
|
39429
|
+
return;
|
|
39347
39430
|
default:
|
|
39348
39431
|
printHelp2();
|
|
39349
39432
|
process.exit(1);
|
|
@@ -40224,6 +40307,26 @@ async function runVaultImport(flagArgs) {
|
|
|
40224
40307
|
}
|
|
40225
40308
|
printVaultReport(data);
|
|
40226
40309
|
}
|
|
40310
|
+
async function readAdminPages(read, nextOf, start, paceMs = 0) {
|
|
40311
|
+
const pages = [];
|
|
40312
|
+
let cursor = start;
|
|
40313
|
+
do {
|
|
40314
|
+
if (pages.length > 0 && paceMs > 0) await new Promise((resolve13) => setTimeout(resolve13, paceMs));
|
|
40315
|
+
try {
|
|
40316
|
+
const page = await read(cursor);
|
|
40317
|
+
pages.push(page);
|
|
40318
|
+
cursor = nextOf(page) ?? void 0;
|
|
40319
|
+
} catch (err) {
|
|
40320
|
+
const limited = err instanceof ApiError && err.status === 429;
|
|
40321
|
+
if (pages.length === 0 && !limited) {
|
|
40322
|
+
exitOnApiError(err);
|
|
40323
|
+
throw err;
|
|
40324
|
+
}
|
|
40325
|
+
return { pages, stop: limited ? "rate_limited" : "request_failed" };
|
|
40326
|
+
}
|
|
40327
|
+
} while (cursor);
|
|
40328
|
+
return { pages };
|
|
40329
|
+
}
|
|
40227
40330
|
async function runVaultBaseDryRun(flagArgs) {
|
|
40228
40331
|
const USAGE8 = "wayai admin vault base-dry-run --org <org_id> [--base <base_id>] [--after <base_id>] [--json]";
|
|
40229
40332
|
let orgId;
|
|
@@ -40250,24 +40353,11 @@ async function runVaultBaseDryRun(flagArgs) {
|
|
|
40250
40353
|
}
|
|
40251
40354
|
const { config, accessToken } = await requireAuth();
|
|
40252
40355
|
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);
|
|
40356
|
+
const { pages, stop } = await readAdminPages(
|
|
40357
|
+
async (cursor) => (await client.debugBaseVaultDryRun({ ...query.data, after: cursor })).data,
|
|
40358
|
+
(page) => page.next_after,
|
|
40359
|
+
after
|
|
40360
|
+
);
|
|
40271
40361
|
const summary = summarizeBaseVaultDryRun({ orgId: query.data.org_id, pages, resumedAfter: after, stop });
|
|
40272
40362
|
const gotItsBase = summary.bases_read === 1 && summary.incomplete_reasons.every((reason2) => reason2 === "single_base");
|
|
40273
40363
|
if (!summary.complete && !gotItsBase) process.exitCode = 1;
|
|
@@ -40291,6 +40381,56 @@ async function runVaultBaseDryRun(flagArgs) {
|
|
|
40291
40381
|
if (base.status === "read") for (const line of nonZero(base.report)) console.log(` ${line}`);
|
|
40292
40382
|
}
|
|
40293
40383
|
}
|
|
40384
|
+
async function runVaultS3CredentialCount(flagArgs) {
|
|
40385
|
+
const USAGE8 = "wayai admin vault mount-credential-count --org <org_id> [--cursor <cursor>] [--json]";
|
|
40386
|
+
let orgId;
|
|
40387
|
+
let cursor;
|
|
40388
|
+
let jsonOutput = false;
|
|
40389
|
+
for (let i = 0; i < flagArgs.length; i++) {
|
|
40390
|
+
const flag = flagArgs[i];
|
|
40391
|
+
if (flag === "--org") orgId = requireFlagValue(flagArgs, ++i, "--org");
|
|
40392
|
+
else if (flag === "--cursor") cursor = requireFlagValue(flagArgs, ++i, "--cursor");
|
|
40393
|
+
else if (flag === "--json") jsonOutput = true;
|
|
40394
|
+
else {
|
|
40395
|
+
console.error(`Unknown flag: ${flag}`);
|
|
40396
|
+
console.error(USAGE8);
|
|
40397
|
+
process.exit(1);
|
|
40398
|
+
}
|
|
40399
|
+
}
|
|
40400
|
+
const query = s3CredentialCountQuery.safeParse({ org_id: orgId, cursor });
|
|
40401
|
+
if (!query.success) {
|
|
40402
|
+
console.error("--org must be an organization id, and --cursor the cursor a run printed.");
|
|
40403
|
+
console.error(USAGE8);
|
|
40404
|
+
process.exit(1);
|
|
40405
|
+
}
|
|
40406
|
+
const { config, accessToken } = await requireAuth();
|
|
40407
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
40408
|
+
const { pages, stop } = await readAdminPages(
|
|
40409
|
+
async (next) => (await client.debugS3CredentialCount({ org_id: query.data.org_id, cursor: next })).data,
|
|
40410
|
+
(page) => page.next_cursor,
|
|
40411
|
+
cursor,
|
|
40412
|
+
MOUNT_CREDENTIAL_COUNT_PACE_MS
|
|
40413
|
+
);
|
|
40414
|
+
const summary = summarizeS3CredentialCount({ pages, resumedFrom: cursor, stop });
|
|
40415
|
+
if (!summary.complete) process.exitCode = 1;
|
|
40416
|
+
if (jsonOutput) {
|
|
40417
|
+
console.log(JSON.stringify(summary, null, 2));
|
|
40418
|
+
return;
|
|
40419
|
+
}
|
|
40420
|
+
const { total } = summary;
|
|
40421
|
+
console.log(`S3 credential count \u2014 every org \u2014 ${summary.complete ? "complete" : `INCOMPLETE, not the platform's total (${summary.incomplete_reasons.join(", ")})`}`);
|
|
40422
|
+
console.log(`reads: ${summary.reads} of the 120/hour cap`);
|
|
40423
|
+
console.log(`keys: listed ${summary.listed}, gone by their read ${summary.vanished}, with no org ${summary.unreadable}`);
|
|
40424
|
+
console.log(`live: ${total.live} in ${total.orgs} org(s); expired, not yet evicted: ${total.expired}; with no expiry: ${total.no_expiry}`);
|
|
40425
|
+
const lastExpiry = (counts) => counts.no_expiry > 0 ? `never: ${counts.no_expiry} hold no expiry` : counts.last_expires_at ?? "never";
|
|
40426
|
+
if (total.live > 0) console.log(`created ${total.oldest_created_at ?? "?"} to ${total.newest_created_at ?? "?"}; the last expires ${lastExpiry(total)}`);
|
|
40427
|
+
if (stop || summary.next_cursor) {
|
|
40428
|
+
console.log(summary.next_cursor ? `To continue: --cursor ${summary.next_cursor}` : "Nothing read past the start; re-run later.");
|
|
40429
|
+
}
|
|
40430
|
+
for (const row of summary.orgs) {
|
|
40431
|
+
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)}`);
|
|
40432
|
+
}
|
|
40433
|
+
}
|
|
40294
40434
|
async function runVaultRevert(flagArgs) {
|
|
40295
40435
|
const USAGE8 = "wayai admin vault revert --org <org_id> --connector <connector_id> [--apply] [--yes] [--json]";
|
|
40296
40436
|
const { orgId, connectorId, apply, yes, jsonOutput } = parseVaultFlags(flagArgs, USAGE8, false);
|
|
@@ -40965,7 +41105,7 @@ function describeVaultGateEntry(connectorId) {
|
|
|
40965
41105
|
return name ? `${name} (${connectorId})` : `${connectorId} (no connector the vault holds)`;
|
|
40966
41106
|
}
|
|
40967
41107
|
function describeVaultGateList(ids) {
|
|
40968
|
-
return ids.length === 0 ? "(none
|
|
41108
|
+
return ids.length === 0 ? "(none listed)" : ids.map(describeVaultGateEntry).join(", ");
|
|
40969
41109
|
}
|
|
40970
41110
|
function readVaultGateList(data) {
|
|
40971
41111
|
const raw = data.vault_connector_ids;
|
|
@@ -41046,7 +41186,8 @@ async function runVaultGateChange(change, positional, flagArgs) {
|
|
|
41046
41186
|
const next = change === "add" ? [...before, ...toChange] : before.filter((id) => !toChange.includes(id));
|
|
41047
41187
|
if (!jsonOutput) console.log(`Before: ${describeVaultGateList(before)}`);
|
|
41048
41188
|
if (!yes && !jsonOutput) {
|
|
41049
|
-
console.log(change === "add" ? `About to add ${toChange.map(describeVaultGateEntry).join(", ")}: their connections' new credentials go to the credentials vault.` : `About to remove ${toChange.map(describeVaultGateEntry).join(", ")}: their connections' new credentials
|
|
41189
|
+
console.log(change === "add" ? `About to add ${toChange.map(describeVaultGateEntry).join(", ")}: their connections' new credentials go to the credentials vault.` : `About to remove ${toChange.map(describeVaultGateEntry).join(", ")}: their connections' new credentials no longer go to the vault; ones the vault already holds stay there.`);
|
|
41190
|
+
console.log("In production only Instagram's gate reads this list: every other vault gate stays open, listed or not.");
|
|
41050
41191
|
const ok = await confirm("Proceed?");
|
|
41051
41192
|
if (!ok) {
|
|
41052
41193
|
console.log("Aborted.");
|
|
@@ -41729,12 +41870,14 @@ Usage:
|
|
|
41729
41870
|
|
|
41730
41871
|
wayai admin vault base-dry-run --org <org_id> [--base <base_id>] [--after <base_id>] [--json]
|
|
41731
41872
|
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)
|
|
41873
|
+
wayai admin vault mount-credential-count --org <org_id> [--cursor <cursor>] [--json]
|
|
41874
|
+
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
41875
|
|
|
41733
|
-
wayai admin vault-gate status [--json] Print the
|
|
41876
|
+
wayai admin vault-gate status [--json] Print the vault_connector_ids list (on production it decides only Instagram's gate: the backend's vault-gate.ts)
|
|
41734
41877
|
wayai admin vault-gate add <connector> [--yes] [--json]
|
|
41735
41878
|
List a connector: a vault connector's name (e.g. telegram, whatsapp, instagram, or openai for its LLM, STT and TTS ids, never GPT-Live's) or one catalog id (GPT-Live's only so); prints before and after, confirms unless --yes
|
|
41736
41879
|
wayai admin vault-gate remove <connector> [--yes] [--json]
|
|
41737
|
-
Stop listing it: its new credentials
|
|
41880
|
+
Stop listing it: its new credentials no longer go to the vault (on production only Instagram's gate reads the list)
|
|
41738
41881
|
|
|
41739
41882
|
Sources:
|
|
41740
41883
|
do Live DO SQLite (existing conversation, hub config, etc.).
|
|
@@ -41854,7 +41997,9 @@ Sources:
|
|
|
41854
41997
|
enrollment and hides the help entry; people already enrolled keep their row.
|
|
41855
41998
|
Changes land within about 60 s.
|
|
41856
41999
|
vault-gate The credentials vault's gate, per connector and never per org: the PLATFORM-wide
|
|
41857
|
-
vault_connector_ids list.
|
|
42000
|
+
vault_connector_ids list. In production every vault gate but Instagram's is open
|
|
42001
|
+
whatever it lists, so there it decides only Instagram's (the backend's
|
|
42002
|
+
vault-gate.ts states the rule). A listed connector's new credentials go to the vault,
|
|
41858
42003
|
the row keeping only a reference; credentials the vault already holds stay there
|
|
41859
42004
|
whichever way the gate is set. Only connectors the vault holds anything of are
|
|
41860
42005
|
taken: ${[...VAULT_GATE_CONNECTORS.keys()].join(", ")}, and GPT-Live (openai) by its
|
|
@@ -41900,7 +42045,7 @@ Audit + rate limit:
|
|
|
41900
42045
|
across all sources. Platform-admin grant required.
|
|
41901
42046
|
`.trim());
|
|
41902
42047
|
}
|
|
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;
|
|
42048
|
+
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
42049
|
var init_admin = __esm({
|
|
41905
42050
|
"src/commands/admin.ts"() {
|
|
41906
42051
|
"use strict";
|
|
@@ -41917,8 +42062,10 @@ var init_admin = __esm({
|
|
|
41917
42062
|
init_vault_import();
|
|
41918
42063
|
init_vault();
|
|
41919
42064
|
init_base_vault_dry_run();
|
|
42065
|
+
init_s3_credential_count();
|
|
41920
42066
|
VALID_TYPES = dataExplorerDebugDoType.options;
|
|
41921
42067
|
VALID_ANALYTICS_TABLES = dataExplorerDebugAnalyticsTable.options;
|
|
42068
|
+
MOUNT_CREDENTIAL_COUNT_PACE_MS = 12500;
|
|
41922
42069
|
HARNESS_GATE = {
|
|
41923
42070
|
group: "harness",
|
|
41924
42071
|
key: "harness_enabled",
|
|
@@ -41992,8 +42139,8 @@ var init_admin = __esm({
|
|
|
41992
42139
|
});
|
|
41993
42140
|
|
|
41994
42141
|
// src/lib/version-status.ts
|
|
41995
|
-
function componentStatus(current,
|
|
41996
|
-
return { current, latest, behind: Boolean(current &&
|
|
42142
|
+
function componentStatus(current, latest2) {
|
|
42143
|
+
return { current, latest: latest2, behind: Boolean(current && latest2 && isNewerVersion(latest2, current)) };
|
|
41997
42144
|
}
|
|
41998
42145
|
function resolveVersionStatus(cliVersion) {
|
|
41999
42146
|
const cliLatest = readVersionCache(CLI_CACHE_FILE)?.latest ?? null;
|
|
@@ -42425,18 +42572,18 @@ async function updateCommand(pkg2) {
|
|
|
42425
42572
|
console.log(`Current version: ${pkg2.version}`);
|
|
42426
42573
|
console.log("Checking for updates...");
|
|
42427
42574
|
try {
|
|
42428
|
-
const
|
|
42575
|
+
const latest2 = execSync("npm view @wayai/cli version", {
|
|
42429
42576
|
timeout: 1e4
|
|
42430
42577
|
}).toString().trim();
|
|
42431
|
-
if (
|
|
42578
|
+
if (latest2 === pkg2.version) {
|
|
42432
42579
|
console.log(`Already on the latest version (${pkg2.version}).`);
|
|
42433
42580
|
} else {
|
|
42434
|
-
console.log(`Updating ${pkg2.version} \u2192 ${
|
|
42581
|
+
console.log(`Updating ${pkg2.version} \u2192 ${latest2}...`);
|
|
42435
42582
|
execSync("npm install -g @wayai/cli@latest", {
|
|
42436
42583
|
timeout: 6e4,
|
|
42437
42584
|
stdio: "inherit"
|
|
42438
42585
|
});
|
|
42439
|
-
console.log(`Updated to ${
|
|
42586
|
+
console.log(`Updated to ${latest2}.`);
|
|
42440
42587
|
}
|
|
42441
42588
|
} catch (err) {
|
|
42442
42589
|
captureException2(err);
|
|
@@ -45082,10 +45229,10 @@ function refreshCliCache() {
|
|
|
45082
45229
|
return new Promise((resolve13) => {
|
|
45083
45230
|
exec("npm view @wayai/cli version", { timeout: REFRESH_TIMEOUT_MS }, (err, stdout) => {
|
|
45084
45231
|
if (!err) {
|
|
45085
|
-
const
|
|
45086
|
-
if (
|
|
45232
|
+
const latest2 = stdout.trim();
|
|
45233
|
+
if (latest2) {
|
|
45087
45234
|
try {
|
|
45088
|
-
writeVersionCache(CLI_CACHE_FILE, { lastCheck: Date.now(), latest });
|
|
45235
|
+
writeVersionCache(CLI_CACHE_FILE, { lastCheck: Date.now(), latest: latest2 });
|
|
45089
45236
|
} catch {
|
|
45090
45237
|
}
|
|
45091
45238
|
}
|
|
@@ -45101,10 +45248,10 @@ async function refreshSkillCache() {
|
|
|
45101
45248
|
try {
|
|
45102
45249
|
const res = await fetch(url, { signal: controller.signal });
|
|
45103
45250
|
if (res.ok) {
|
|
45104
|
-
const
|
|
45105
|
-
if (
|
|
45251
|
+
const latest2 = parseFrontmatterVersion(await res.text());
|
|
45252
|
+
if (latest2) {
|
|
45106
45253
|
try {
|
|
45107
|
-
writeVersionCache(SKILL_CACHE_FILE, { lastCheck: Date.now(), latest });
|
|
45254
|
+
writeVersionCache(SKILL_CACHE_FILE, { lastCheck: Date.now(), latest: latest2 });
|
|
45108
45255
|
} catch {
|
|
45109
45256
|
}
|
|
45110
45257
|
}
|
|
@@ -45134,10 +45281,10 @@ async function fetchAndCacheAdminSkillVersion() {
|
|
|
45134
45281
|
const accessToken = await getAccessToken2(config);
|
|
45135
45282
|
const client = new ApiClient2({ apiUrl: config.api_url, accessToken });
|
|
45136
45283
|
const res = await client.adminSkillInstall(ADMIN_SKILL_NAME);
|
|
45137
|
-
const
|
|
45138
|
-
if (
|
|
45284
|
+
const latest2 = parseFrontmatterVersion(res.files[SKILL_FILENAME] ?? "");
|
|
45285
|
+
if (latest2) {
|
|
45139
45286
|
try {
|
|
45140
|
-
writeVersionCache(ADMIN_SKILL_CACHE_FILE, { lastCheck: Date.now(), latest });
|
|
45287
|
+
writeVersionCache(ADMIN_SKILL_CACHE_FILE, { lastCheck: Date.now(), latest: latest2 });
|
|
45141
45288
|
} catch {
|
|
45142
45289
|
}
|
|
45143
45290
|
}
|