@wayai/cli 0.3.289 → 0.3.291

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 CHANGED
@@ -38507,6 +38507,25 @@ async function runVaultImport(flagArgs) {
38507
38507
  console.log(` value ${v.field} \u2192 ${v.secret_id ?? "-"}: ${v.outcome}${v.code ? ` (${v.code})` : ""}`);
38508
38508
  for (const r of v.rows) console.log(` hub=${r.hub_id} connection=${r.connection_id}: ${r.outcome}`);
38509
38509
  }
38510
+ const credentials = data.credentials ?? [];
38511
+ if (credentials.length > 0) {
38512
+ console.log(`org credentials: ${credentials.length} credentials_remaining=${data.credentials_remaining ?? 0}`);
38513
+ for (const r of data.credential_reasons ?? []) console.log(` stays (${r.reason}): ${r.credentials}`);
38514
+ for (const c of credentials) {
38515
+ const reasons = c.reasons.length > 0 ? ` (${c.reasons.join(", ")})` : "";
38516
+ console.log(` credential ${c.credential_id} ${c.field} \u2192 ${c.secret_id ?? "-"}: ${c.outcome}${reasons}${c.code ? ` (${c.code})` : ""}${c.credential_row ? ` credential_row=${c.credential_row}` : ""}`);
38517
+ for (const r of c.rows) console.log(` hub=${r.hub_id} connection=${r.connection_id}: ${r.outcome}`);
38518
+ for (const r of c.stale_rows) console.log(` stale: hub=${r.hub_id} connection=${r.connection_id}`);
38519
+ }
38520
+ if (credentials.some((c) => c.reasons.includes("stale_row"))) {
38521
+ console.log("A credential with a stale row moves once `wayai admin hubs repair-credential-links --org <org_id> --apply` writes its current value.");
38522
+ }
38523
+ }
38524
+ const voiceRows = data.voice_rows ?? [];
38525
+ if (voiceRows.length > 0) {
38526
+ console.log(`GPT-Live connections this run ${data.dry_run ? "would move" : "moved"} (${voiceRows.length}): a call live on one keeps its key; one started after, or a restarted call control, goes through the vault. Live calls are not counted.`);
38527
+ for (const r of voiceRows) console.log(` hub=${r.hub_id}${r.preview ? " (preview)" : ""} connection=${r.connection_id}`);
38528
+ }
38510
38529
  printVaultReport(data);
38511
38530
  }
38512
38531
  async function runVaultRevert(flagArgs) {
@@ -38538,6 +38557,10 @@ async function runVaultRevert(flagArgs) {
38538
38557
  console.log(` value ${v.field} \u2190 ${v.secret_id}${v.code ? `: ${v.code}` : ""}`);
38539
38558
  for (const r of v.rows) console.log(` hub=${r.hub_id} connection=${r.connection_id}: ${r.outcome}`);
38540
38559
  }
38560
+ for (const c of data.credentials ?? []) {
38561
+ console.log(` credential ${c.credential_id} ${c.field} \u2190 ${c.secret_id}${c.code ? `: ${c.code}` : ""}${c.credential_row ? ` credential_row=${c.credential_row}` : ""}`);
38562
+ for (const r of c.rows) console.log(` hub=${r.hub_id} connection=${r.connection_id}: ${r.outcome}`);
38563
+ }
38541
38564
  printVaultReport(data);
38542
38565
  }
38543
38566
  async function runRepairBranchingOrphans(flagArgs) {
@@ -39065,7 +39088,7 @@ async function runGuideStatus(positional, flagArgs) {
39065
39088
  }
39066
39089
  function vaultGateConnectorName(connectorId) {
39067
39090
  for (const [name, ids] of VAULT_GATE_CONNECTORS) if (ids.includes(connectorId)) return name;
39068
- return null;
39091
+ return VAULT_GATE_BY_ID_ONLY.get(connectorId) ?? null;
39069
39092
  }
39070
39093
  function describeVaultGateEntry(connectorId) {
39071
39094
  const name = vaultGateConnectorName(connectorId);
@@ -39093,7 +39116,10 @@ function resolveVaultGateConnector(arg, usage3) {
39093
39116
  const wanted = (arg ?? "").trim().toLowerCase();
39094
39117
  const ids = VAULT_GATE_CONNECTORS.get(wanted) ?? (vaultGateConnectorName(wanted) ? [wanted] : null);
39095
39118
  if (!ids) {
39096
- const known = [...VAULT_GATE_CONNECTORS].map(([name, cids]) => `${name} (${cids.join(", ")})`).join(", ");
39119
+ const known = [
39120
+ ...[...VAULT_GATE_CONNECTORS].map(([name, cids]) => `${name} (${cids.join(", ")})`),
39121
+ ...[...VAULT_GATE_BY_ID_ONLY].map(([id, name]) => `${id} (${name}, by its id only)`)
39122
+ ].join(", ");
39097
39123
  console.error(arg ? `Refused: the credentials vault holds nothing of connector "${arg}". It holds only: ${known}.` : "A connector is required.");
39098
39124
  console.error(usage3);
39099
39125
  process.exit(1);
@@ -39783,7 +39809,7 @@ Usage:
39783
39809
  Repair org-admin roster rows keyed by email with a NULL user_email (pre-#3922 platform-admin adds): grant the real access they never conferred, or drop the phantom seat. Idempotent \u2014 run --dry-run first
39784
39810
 
39785
39811
  wayai admin vault import --org <org_id> --connector <connector_id> [--max-puts <n>] [--apply] [--yes] [--json]
39786
- Move one org's stored credentials of one connector into the credentials vault, no re-entry (#5644). A dry run by default (counts by field, link kind and form); --apply needs the connector's gate open, puts each distinct value once for the direct rows holding it (a field an org credential supplies stays), and keeps the old ciphertext 30 days for revert. Re-run until values_remaining is 0. Lists Telegram bots to enable again
39812
+ Move one org's stored credentials of one connector into the credentials vault, no re-entry (#5644). A dry run by default (counts by field, link kind and form); --apply needs the connector's gate open, puts each distinct value once for the direct rows holding it, moves each org credential with the rows it supplies when all of them may move (else names why it stays), and keeps the old ciphertext 30 days for revert. Re-run until values_remaining and credentials_remaining are 0. Lists Telegram bots to enable again
39787
39813
 
39788
39814
  wayai admin vault revert --org <org_id> --connector <connector_id> [--apply] [--yes] [--json]
39789
39815
  Put back what vault import moved, within 30 days, and erase the vault entries no row names. A dry run by default
@@ -39819,7 +39845,7 @@ Usage:
39819
39845
 
39820
39846
  wayai admin vault-gate status [--json] Print the connectors whose new credentials go to the credentials vault
39821
39847
  wayai admin vault-gate add <connector> [--yes] [--json]
39822
- List a connector: a vault connector's name (e.g. telegram, or openai for each of its catalog ids) or one catalog id; prints before and after, confirms unless --yes
39848
+ List a connector: a vault connector's name (e.g. telegram, 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
39823
39849
  wayai admin vault-gate remove <connector> [--yes] [--json]
39824
39850
  Stop listing it: its new credentials take the existing path again
39825
39851
 
@@ -39926,7 +39952,8 @@ Sources:
39926
39952
  vault_connector_ids list. A listed connector's new credentials go to the vault,
39927
39953
  the row keeping only a reference; credentials the vault already holds stay there
39928
39954
  whichever way the gate is set. Only connectors the vault holds anything of are
39929
- taken: ${[...VAULT_GATE_CONNECTORS.keys()].join(", ")}. Changes land within about 60 s.
39955
+ taken: ${[...VAULT_GATE_CONNECTORS.keys()].join(", ")}, and GPT-Live (openai) by its
39956
+ catalog id only. Changes land within about 60 s.
39930
39957
 
39931
39958
  Types (do): ${VALID_TYPES.join(" | ")}
39932
39959
  Tables (analytics): ${VALID_ANALYTICS_TABLES.join(" | ")}
@@ -39964,7 +39991,7 @@ Audit + rate limit:
39964
39991
  across all sources. Platform-admin grant required.
39965
39992
  `.trim());
39966
39993
  }
39967
- 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;
39994
+ var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, COMMUNITIES_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VAULT_GATE_CONNECTORS, VAULT_GATE_BY_ID_ONLY, VALID_NOTICE_SEVERITIES;
39968
39995
  var init_admin = __esm({
39969
39996
  "src/commands/admin.ts"() {
39970
39997
  "use strict";
@@ -40013,6 +40040,9 @@ var init_admin = __esm({
40013
40040
  "b2c3d4e5-f6a7-4b89-c012-3456789abcdf"
40014
40041
  ]]
40015
40042
  ]);
40043
+ VAULT_GATE_BY_ID_ONLY = /* @__PURE__ */ new Map([
40044
+ ["01e7b19c-bc94-43f4-a780-ad5a22fb7127", "openai"]
40045
+ ]);
40016
40046
  VALID_NOTICE_SEVERITIES = ["critical", "warn", "info"];
40017
40047
  }
40018
40048
  });