@wayai/cli 0.3.286 → 0.3.287
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 +185 -49
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12614,7 +12614,7 @@ var init_chunk_BPCNB5RT = __esm({
|
|
|
12614
12614
|
}
|
|
12615
12615
|
});
|
|
12616
12616
|
|
|
12617
|
-
// ../../packages/core/dist/chunk-
|
|
12617
|
+
// ../../packages/core/dist/chunk-KVOFZ5RY.js
|
|
12618
12618
|
function toolParametersViolations(params) {
|
|
12619
12619
|
try {
|
|
12620
12620
|
if (containsKanbanPlaceholders(params)) return [];
|
|
@@ -12638,28 +12638,30 @@ function toolConfigDescription(config) {
|
|
|
12638
12638
|
function offeredToolDescription(config, toolDescription) {
|
|
12639
12639
|
return toolConfigDescription(config) ?? nonBlank(toolDescription);
|
|
12640
12640
|
}
|
|
12641
|
-
function
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
const parsed = JSON.parse(raw);
|
|
12649
|
-
return parsed !== null && typeof parsed === "object" && !Array.isArray(parsed);
|
|
12650
|
-
} catch {
|
|
12651
|
-
return false;
|
|
12652
|
-
}
|
|
12653
|
-
})();
|
|
12654
|
-
if (!looksLikeObject) {
|
|
12655
|
-
ctx.addIssue({
|
|
12656
|
-
code: external_exports.ZodIssueCode.custom,
|
|
12657
|
-
path: ["tool_config"],
|
|
12658
|
-
message: "tool_config must be an object"
|
|
12659
|
-
});
|
|
12641
|
+
function customToolConfigObject(config) {
|
|
12642
|
+
let read = config;
|
|
12643
|
+
for (let layer = 0; layer < MAX_CUSTOM_TOOL_CONFIG_TEXT_LAYERS && typeof read === "string"; layer++) {
|
|
12644
|
+
try {
|
|
12645
|
+
read = JSON.parse(read);
|
|
12646
|
+
} catch {
|
|
12647
|
+
return read;
|
|
12660
12648
|
}
|
|
12649
|
+
}
|
|
12650
|
+
return read;
|
|
12651
|
+
}
|
|
12652
|
+
function refineToolConfig(value, ctx) {
|
|
12653
|
+
if (value.tool_config == null) return;
|
|
12654
|
+
const config = customToolConfigObject(value.tool_config);
|
|
12655
|
+
if (config === null || typeof config !== "object" || Array.isArray(config)) {
|
|
12656
|
+
ctx.addIssue({
|
|
12657
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12658
|
+
path: ["tool_config"],
|
|
12659
|
+
message: "tool_config must be an object"
|
|
12660
|
+
});
|
|
12661
12661
|
return;
|
|
12662
12662
|
}
|
|
12663
|
+
const params = extractToolParameters(config);
|
|
12664
|
+
if (params === void 0) return;
|
|
12663
12665
|
for (const err of toolParametersViolations(params)) {
|
|
12664
12666
|
ctx.addIssue({
|
|
12665
12667
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -12668,9 +12670,9 @@ function refineToolConfig(value, ctx) {
|
|
|
12668
12670
|
});
|
|
12669
12671
|
}
|
|
12670
12672
|
}
|
|
12671
|
-
var nonBlank, DEFAULT_TOOL_CONFIG_DESCRIPTION, toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, toolReplaySettingsFields, toolReplaySettingsSchema, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody;
|
|
12672
|
-
var
|
|
12673
|
-
"../../packages/core/dist/chunk-
|
|
12673
|
+
var nonBlank, DEFAULT_TOOL_CONFIG_DESCRIPTION, MAX_CUSTOM_TOOL_CONFIG_TEXT_LAYERS, toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, toolReplaySettingsFields, toolReplaySettingsSchema, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody;
|
|
12674
|
+
var init_chunk_KVOFZ5RY = __esm({
|
|
12675
|
+
"../../packages/core/dist/chunk-KVOFZ5RY.js"() {
|
|
12674
12676
|
"use strict";
|
|
12675
12677
|
init_chunk_WEXVYJ5H();
|
|
12676
12678
|
init_chunk_HZ6CADSY();
|
|
@@ -12678,6 +12680,7 @@ var init_chunk_YWCYUPJV = __esm({
|
|
|
12678
12680
|
init_zod();
|
|
12679
12681
|
nonBlank = (text4) => typeof text4 === "string" && text4.trim() !== "" ? text4 : void 0;
|
|
12680
12682
|
DEFAULT_TOOL_CONFIG_DESCRIPTION = "Function description";
|
|
12683
|
+
MAX_CUSTOM_TOOL_CONFIG_TEXT_LAYERS = 16;
|
|
12681
12684
|
toolIdParam = external_exports.object({ id: uuidSchema });
|
|
12682
12685
|
listToolsQuery = external_exports.object({ agent_id: uuidSchema, hub_id: uuidSchema });
|
|
12683
12686
|
toolAgentQuery = external_exports.object({ agent_id: uuidSchema, hub_id: uuidSchema });
|
|
@@ -14040,7 +14043,7 @@ var init_chunk_7NQZRSSJ = __esm({
|
|
|
14040
14043
|
}
|
|
14041
14044
|
});
|
|
14042
14045
|
|
|
14043
|
-
// ../../packages/core/dist/chunk-
|
|
14046
|
+
// ../../packages/core/dist/chunk-UCPEWP5G.js
|
|
14044
14047
|
function declaresNoConnection(agent) {
|
|
14045
14048
|
return agent.connection === null && !agent.connection_id;
|
|
14046
14049
|
}
|
|
@@ -14053,17 +14056,6 @@ function customToolConnectionRefusal(agentName, tool) {
|
|
|
14053
14056
|
if (tool.connection || tool.connection_id) return null;
|
|
14054
14057
|
return `Agent "${agentName}", tool "${tool.name}": connection is required. A custom tool calls through one of the hub's connections: name it.`;
|
|
14055
14058
|
}
|
|
14056
|
-
function customToolConfigObject(config) {
|
|
14057
|
-
let read = config;
|
|
14058
|
-
for (let layer = 0; layer < MAX_CUSTOM_TOOL_CONFIG_TEXT_LAYERS && typeof read === "string"; layer++) {
|
|
14059
|
-
try {
|
|
14060
|
-
read = JSON.parse(read);
|
|
14061
|
-
} catch {
|
|
14062
|
-
return read;
|
|
14063
|
-
}
|
|
14064
|
-
}
|
|
14065
|
-
return read;
|
|
14066
|
-
}
|
|
14067
14059
|
function customToolDescriptionAfterPush(entry, row, writtenConfig) {
|
|
14068
14060
|
const written = row ? writtenConfig : entry.config;
|
|
14069
14061
|
const stated = toolConfigDescription(written);
|
|
@@ -14782,11 +14774,11 @@ function skillSectionsAsResources(scope) {
|
|
|
14782
14774
|
return out;
|
|
14783
14775
|
};
|
|
14784
14776
|
}
|
|
14785
|
-
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,
|
|
14786
|
-
var
|
|
14787
|
-
"../../packages/core/dist/chunk-
|
|
14777
|
+
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;
|
|
14778
|
+
var init_chunk_UCPEWP5G = __esm({
|
|
14779
|
+
"../../packages/core/dist/chunk-UCPEWP5G.js"() {
|
|
14788
14780
|
"use strict";
|
|
14789
|
-
|
|
14781
|
+
init_chunk_KVOFZ5RY();
|
|
14790
14782
|
init_chunk_HRKVCI5A();
|
|
14791
14783
|
init_chunk_CZEJR5UE();
|
|
14792
14784
|
init_chunk_LBDH7LCG();
|
|
@@ -14821,7 +14813,6 @@ var init_chunk_VMPEOBYP = __esm({
|
|
|
14821
14813
|
}),
|
|
14822
14814
|
html: external_exports.string().max(PAGE_HTML_MAX_BYTES, `a page's HTML is at most ${PAGE_HTML_MAX_BYTES / 1024} KiB`)
|
|
14823
14815
|
}).strict()).max(PAGES_PER_HUB_MAX, `a hub holds at most ${PAGES_PER_HUB_MAX} pages`);
|
|
14824
|
-
MAX_CUSTOM_TOOL_CONFIG_TEXT_LAYERS = 16;
|
|
14825
14816
|
MAX_CALL_OPENING_CARRIERS = 30;
|
|
14826
14817
|
MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES = 8 * 1024 * 1024;
|
|
14827
14818
|
HUB_AS_CODE_AGENT_TOOL_KEYS = [
|
|
@@ -16401,8 +16392,8 @@ var init_contracts = __esm({
|
|
|
16401
16392
|
init_chunk_E4DIIOOE();
|
|
16402
16393
|
init_chunk_7CYHPF35();
|
|
16403
16394
|
init_chunk_BPCNB5RT();
|
|
16404
|
-
|
|
16405
|
-
|
|
16395
|
+
init_chunk_UCPEWP5G();
|
|
16396
|
+
init_chunk_KVOFZ5RY();
|
|
16406
16397
|
init_chunk_HRKVCI5A();
|
|
16407
16398
|
init_chunk_CZEJR5UE();
|
|
16408
16399
|
init_chunk_4D6K4P4K();
|
|
@@ -17851,6 +17842,9 @@ var init_utils = __esm({
|
|
|
17851
17842
|
["admin guide set-hub", { positionals: 1 }],
|
|
17852
17843
|
["admin guide clear", { positionals: 0 }],
|
|
17853
17844
|
["admin guide status", { positionals: 0 }],
|
|
17845
|
+
["admin vault-gate status", { positionals: 0 }],
|
|
17846
|
+
["admin vault-gate add", { positionals: 1 }],
|
|
17847
|
+
["admin vault-gate remove", { positionals: 1 }],
|
|
17854
17848
|
["admin voice-calls enable", { positionals: 0 }],
|
|
17855
17849
|
["admin voice-calls disable", { positionals: 0 }],
|
|
17856
17850
|
["admin voice-calls status", { positionals: 0 }],
|
|
@@ -22765,8 +22759,8 @@ var init_hub_materializer = __esm({
|
|
|
22765
22759
|
var init_ci = __esm({
|
|
22766
22760
|
"../../packages/core/dist/contracts/ci.js"() {
|
|
22767
22761
|
"use strict";
|
|
22768
|
-
|
|
22769
|
-
|
|
22762
|
+
init_chunk_UCPEWP5G();
|
|
22763
|
+
init_chunk_KVOFZ5RY();
|
|
22770
22764
|
init_chunk_HRKVCI5A();
|
|
22771
22765
|
init_chunk_CZEJR5UE();
|
|
22772
22766
|
init_chunk_4D6K4P4K();
|
|
@@ -37890,6 +37884,26 @@ async function adminCommand(args2) {
|
|
|
37890
37884
|
process.exit(1);
|
|
37891
37885
|
}
|
|
37892
37886
|
}
|
|
37887
|
+
if (group === "vault-gate") {
|
|
37888
|
+
if (!sub) {
|
|
37889
|
+
printHelp2();
|
|
37890
|
+
process.exit(1);
|
|
37891
|
+
}
|
|
37892
|
+
switch (sub) {
|
|
37893
|
+
case "status":
|
|
37894
|
+
await runVaultGateStatus(positional, flagArgs);
|
|
37895
|
+
return;
|
|
37896
|
+
case "add":
|
|
37897
|
+
await runVaultGateChange("add", positional, flagArgs);
|
|
37898
|
+
return;
|
|
37899
|
+
case "remove":
|
|
37900
|
+
await runVaultGateChange("remove", positional, flagArgs);
|
|
37901
|
+
return;
|
|
37902
|
+
default:
|
|
37903
|
+
printHelp2();
|
|
37904
|
+
process.exit(1);
|
|
37905
|
+
}
|
|
37906
|
+
}
|
|
37893
37907
|
if (group === "voice-calls") {
|
|
37894
37908
|
if (!sub) {
|
|
37895
37909
|
printHelp2();
|
|
@@ -38803,7 +38817,7 @@ async function runCommunitiesDestroy(positional, flagArgs) {
|
|
|
38803
38817
|
function describeGuideHub(hub) {
|
|
38804
38818
|
return `${hub.hub_name ?? "(unnamed)"} (${hub.hub_id}), owned by ${hub.organization_name ?? "(unnamed org)"} (${hub.organization_id})`;
|
|
38805
38819
|
}
|
|
38806
|
-
function
|
|
38820
|
+
function parseBooleanFlags(flagArgs, usage3, allowed) {
|
|
38807
38821
|
for (const flag of flagArgs) {
|
|
38808
38822
|
if (!allowed.includes(flag)) {
|
|
38809
38823
|
console.error(`Unknown flag: ${flag}`);
|
|
@@ -38815,7 +38829,7 @@ function parseGuideFlags(flagArgs, usage3, allowed) {
|
|
|
38815
38829
|
}
|
|
38816
38830
|
async function runGuideSetHub(positional, flagArgs) {
|
|
38817
38831
|
const usage3 = "wayai admin guide set-hub <hub_id> [--yes] [--json]";
|
|
38818
|
-
const { yes, jsonOutput } =
|
|
38832
|
+
const { yes, jsonOutput } = parseBooleanFlags(flagArgs, usage3, ["--yes", "--json"]);
|
|
38819
38833
|
const parsed = adminSetGuideHubBody.safeParse({ hub_id: positional[0] });
|
|
38820
38834
|
if (positional.length !== 1 || !parsed.success) {
|
|
38821
38835
|
console.error("<hub_id> must be one hub id (a UUID).");
|
|
@@ -38866,7 +38880,7 @@ async function runGuideClear(positional, flagArgs) {
|
|
|
38866
38880
|
console.error(usage3);
|
|
38867
38881
|
process.exit(1);
|
|
38868
38882
|
}
|
|
38869
|
-
const { jsonOutput } =
|
|
38883
|
+
const { jsonOutput } = parseBooleanFlags(flagArgs, usage3, ["--json"]);
|
|
38870
38884
|
const { config, accessToken } = await requireAuth();
|
|
38871
38885
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
38872
38886
|
try {
|
|
@@ -38889,7 +38903,7 @@ async function runGuideStatus(positional, flagArgs) {
|
|
|
38889
38903
|
console.error(usage3);
|
|
38890
38904
|
process.exit(1);
|
|
38891
38905
|
}
|
|
38892
|
-
const { jsonOutput } =
|
|
38906
|
+
const { jsonOutput } = parseBooleanFlags(flagArgs, usage3, ["--json"]);
|
|
38893
38907
|
const { config, accessToken } = await requireAuth();
|
|
38894
38908
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
38895
38909
|
let data;
|
|
@@ -38915,6 +38929,114 @@ async function runGuideStatus(positional, flagArgs) {
|
|
|
38915
38929
|
console.log(`Hub: ${describeGuideHub(data.hub)}`);
|
|
38916
38930
|
console.log(`Environment: ${data.hub.hub_environment ?? "unknown"}; type: ${data.hub.hub_type ?? "unknown"}; app channel: ${data.hub.app_channel_enabled ? "enabled" : "DISABLED"}`);
|
|
38917
38931
|
}
|
|
38932
|
+
function vaultGateConnectorName(connectorId) {
|
|
38933
|
+
for (const [name, id] of VAULT_GATE_CONNECTORS) if (id === connectorId) return name;
|
|
38934
|
+
return null;
|
|
38935
|
+
}
|
|
38936
|
+
function describeVaultGateEntry(connectorId) {
|
|
38937
|
+
const name = vaultGateConnectorName(connectorId);
|
|
38938
|
+
return name ? `${name} (${connectorId})` : `${connectorId} (no connector the vault holds)`;
|
|
38939
|
+
}
|
|
38940
|
+
function describeVaultGateList(ids) {
|
|
38941
|
+
return ids.length === 0 ? "(none: every connector's new credentials take the existing path)" : ids.map(describeVaultGateEntry).join(", ");
|
|
38942
|
+
}
|
|
38943
|
+
function readVaultGateList(data) {
|
|
38944
|
+
const raw = data.vault_connector_ids;
|
|
38945
|
+
if (raw === void 0 || raw === null) return [];
|
|
38946
|
+
let parsed;
|
|
38947
|
+
try {
|
|
38948
|
+
parsed = typeof raw === "string" ? JSON.parse(raw) : raw;
|
|
38949
|
+
} catch {
|
|
38950
|
+
parsed = void 0;
|
|
38951
|
+
}
|
|
38952
|
+
if (!Array.isArray(parsed) || !parsed.every((id) => uuidSchema.safeParse(id).success)) {
|
|
38953
|
+
console.error(`vault_connector_ids cannot be read as a list of connector ids: ${JSON.stringify(raw)}`);
|
|
38954
|
+
process.exit(1);
|
|
38955
|
+
}
|
|
38956
|
+
return parsed;
|
|
38957
|
+
}
|
|
38958
|
+
function resolveVaultGateConnector(arg, usage3) {
|
|
38959
|
+
const wanted = (arg ?? "").trim().toLowerCase();
|
|
38960
|
+
const id = VAULT_GATE_CONNECTORS.get(wanted) ?? (vaultGateConnectorName(wanted) ? wanted : null);
|
|
38961
|
+
if (!id) {
|
|
38962
|
+
const known = [...VAULT_GATE_CONNECTORS].map(([name, cid]) => `${name} (${cid})`).join(", ");
|
|
38963
|
+
console.error(arg ? `Refused: the credentials vault holds nothing of connector "${arg}". It holds only: ${known}.` : "A connector is required.");
|
|
38964
|
+
console.error(usage3);
|
|
38965
|
+
process.exit(1);
|
|
38966
|
+
}
|
|
38967
|
+
return id;
|
|
38968
|
+
}
|
|
38969
|
+
async function readVaultGateConfig(client) {
|
|
38970
|
+
try {
|
|
38971
|
+
return readVaultGateList((await client.adminGetConfig()).data);
|
|
38972
|
+
} catch (err) {
|
|
38973
|
+
exitOnApiError(err);
|
|
38974
|
+
throw err;
|
|
38975
|
+
}
|
|
38976
|
+
}
|
|
38977
|
+
async function runVaultGateStatus(positional, flagArgs) {
|
|
38978
|
+
const usage3 = "wayai admin vault-gate status [--json]";
|
|
38979
|
+
if (positional.length > 0) {
|
|
38980
|
+
console.error(usage3);
|
|
38981
|
+
process.exit(1);
|
|
38982
|
+
}
|
|
38983
|
+
const { jsonOutput } = parseBooleanFlags(flagArgs, usage3, ["--json"]);
|
|
38984
|
+
const { config, accessToken } = await requireAuth();
|
|
38985
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
38986
|
+
const ids = await readVaultGateConfig(client);
|
|
38987
|
+
if (jsonOutput) {
|
|
38988
|
+
console.log(JSON.stringify({ vault_connector_ids: ids }, null, 2));
|
|
38989
|
+
return;
|
|
38990
|
+
}
|
|
38991
|
+
console.log(`vault_connector_ids (platform): ${describeVaultGateList(ids)}`);
|
|
38992
|
+
}
|
|
38993
|
+
async function runVaultGateChange(change, positional, flagArgs) {
|
|
38994
|
+
const usage3 = `wayai admin vault-gate ${change} <connector> [--yes] [--json]`;
|
|
38995
|
+
const { yes, jsonOutput } = parseBooleanFlags(flagArgs, usage3, ["--yes", "--json"]);
|
|
38996
|
+
if (positional.length !== 1) {
|
|
38997
|
+
console.error("Name one connector.");
|
|
38998
|
+
console.error(usage3);
|
|
38999
|
+
process.exit(1);
|
|
39000
|
+
}
|
|
39001
|
+
const connectorId = resolveVaultGateConnector(positional[0], usage3);
|
|
39002
|
+
const entry = describeVaultGateEntry(connectorId);
|
|
39003
|
+
const { config, accessToken } = await requireAuth();
|
|
39004
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
39005
|
+
const before = await readVaultGateConfig(client);
|
|
39006
|
+
const listed2 = before.includes(connectorId);
|
|
39007
|
+
if (listed2 === (change === "add")) {
|
|
39008
|
+
if (jsonOutput) {
|
|
39009
|
+
console.log(JSON.stringify({ before, after: before, changed: false }, null, 2));
|
|
39010
|
+
return;
|
|
39011
|
+
}
|
|
39012
|
+
console.log(`Before: ${describeVaultGateList(before)}`);
|
|
39013
|
+
console.log(`${entry} is ${listed2 ? "already" : "not"} listed; nothing was written.`);
|
|
39014
|
+
return;
|
|
39015
|
+
}
|
|
39016
|
+
const next = change === "add" ? [...before, connectorId] : before.filter((id) => id !== connectorId);
|
|
39017
|
+
if (!jsonOutput) console.log(`Before: ${describeVaultGateList(before)}`);
|
|
39018
|
+
if (!yes && !jsonOutput) {
|
|
39019
|
+
console.log(change === "add" ? `About to add ${entry}: its connections' new credentials go to the credentials vault.` : `About to remove ${entry}: its connections' new credentials take the existing path again; ones the vault already holds stay there.`);
|
|
39020
|
+
const ok = await confirm("Proceed?");
|
|
39021
|
+
if (!ok) {
|
|
39022
|
+
console.log("Aborted.");
|
|
39023
|
+
return;
|
|
39024
|
+
}
|
|
39025
|
+
}
|
|
39026
|
+
let after;
|
|
39027
|
+
try {
|
|
39028
|
+
after = readVaultGateList((await client.adminUpdateConfig({ vault_connector_ids: next })).data);
|
|
39029
|
+
} catch (err) {
|
|
39030
|
+
exitOnApiError(err);
|
|
39031
|
+
throw err;
|
|
39032
|
+
}
|
|
39033
|
+
if (jsonOutput) {
|
|
39034
|
+
console.log(JSON.stringify({ before, after, changed: true }, null, 2));
|
|
39035
|
+
return;
|
|
39036
|
+
}
|
|
39037
|
+
console.log(`After: ${describeVaultGateList(after)}`);
|
|
39038
|
+
console.log(PLATFORM_CONFIG_PROPAGATION_NOTE);
|
|
39039
|
+
}
|
|
38918
39040
|
function conflictReasonOf(err) {
|
|
38919
39041
|
try {
|
|
38920
39042
|
const reason = JSON.parse(err.body).details?.reason;
|
|
@@ -39555,6 +39677,12 @@ Usage:
|
|
|
39555
39677
|
wayai admin guide clear [--json] Turn the Guide off: nobody new is enrolled and the help entry is hidden
|
|
39556
39678
|
wayai admin guide status [--json] Print which hub is the Guide, and its facts
|
|
39557
39679
|
|
|
39680
|
+
wayai admin vault-gate status [--json] Print the connectors whose new credentials go to the credentials vault
|
|
39681
|
+
wayai admin vault-gate add <connector> [--yes] [--json]
|
|
39682
|
+
List a connector (a vault connector's name, e.g. telegram, or its catalog id); prints before and after, confirms unless --yes
|
|
39683
|
+
wayai admin vault-gate remove <connector> [--yes] [--json]
|
|
39684
|
+
Stop listing it: its new credentials take the existing path again
|
|
39685
|
+
|
|
39558
39686
|
Sources:
|
|
39559
39687
|
do Live DO SQLite (existing conversation, hub config, etc.).
|
|
39560
39688
|
analytics ClickHouse projections (conversation, message, schedule_event).
|
|
@@ -39654,6 +39782,11 @@ Sources:
|
|
|
39654
39782
|
it from the help entry ("Ask WayAI"); its owning org pays. \`clear\` stops new
|
|
39655
39783
|
enrollment and hides the help entry; people already enrolled keep their row.
|
|
39656
39784
|
Changes land within about 60 s.
|
|
39785
|
+
vault-gate The credentials vault's gate, per connector and never per org: the PLATFORM-wide
|
|
39786
|
+
vault_connector_ids list. A listed connector's new credentials go to the vault,
|
|
39787
|
+
the row keeping only a reference; credentials the vault already holds stay there
|
|
39788
|
+
whichever way the gate is set. Only connectors the vault holds anything of are
|
|
39789
|
+
taken: ${[...VAULT_GATE_CONNECTORS.keys()].join(", ")}. Changes land within about 60 s.
|
|
39657
39790
|
|
|
39658
39791
|
Types (do): ${VALID_TYPES.join(" | ")}
|
|
39659
39792
|
Tables (analytics): ${VALID_ANALYTICS_TABLES.join(" | ")}
|
|
@@ -39691,7 +39824,7 @@ Audit + rate limit:
|
|
|
39691
39824
|
across all sources. Platform-admin grant required.
|
|
39692
39825
|
`.trim());
|
|
39693
39826
|
}
|
|
39694
|
-
var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, COMMUNITIES_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VALID_NOTICE_SEVERITIES;
|
|
39827
|
+
var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, COMMUNITIES_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VAULT_GATE_CONNECTORS, VALID_NOTICE_SEVERITIES;
|
|
39695
39828
|
var init_admin = __esm({
|
|
39696
39829
|
"src/commands/admin.ts"() {
|
|
39697
39830
|
"use strict";
|
|
@@ -39732,6 +39865,9 @@ var init_admin = __esm({
|
|
|
39732
39865
|
displayName: "Communities"
|
|
39733
39866
|
};
|
|
39734
39867
|
PLATFORM_CONFIG_PROPAGATION_NOTE = "Takes effect within about 60 s (the platform-config cache is dropped; KV deletes propagate eventually).";
|
|
39868
|
+
VAULT_GATE_CONNECTORS = /* @__PURE__ */ new Map([
|
|
39869
|
+
["telegram", "a1b2c3d4-e5f6-4a89-b012-3e5e0d000002"]
|
|
39870
|
+
]);
|
|
39735
39871
|
VALID_NOTICE_SEVERITIES = ["critical", "warn", "info"];
|
|
39736
39872
|
}
|
|
39737
39873
|
});
|