@topolo/cli 0.12.23 → 0.12.25

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -7
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { platform as platform2 } from "os";
9
9
  import { createInterface } from "readline/promises";
10
10
  import { stdin as input } from "process";
11
11
 
12
- // node_modules/.pnpm/@topolo+sdk@0.23.10/node_modules/@topolo/sdk/dist/index.js
12
+ // node_modules/@topolo/sdk/dist/index.js
13
13
  function record(value) {
14
14
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
15
15
  }
@@ -487,20 +487,25 @@ async function protectActionResult(value, store, options = {}) {
487
487
  if (options.preserveActionContracts === true && ["agentContract", "agent_contract"].includes(key) && isRecord(item)) return true;
488
488
  return options.preserveAgentGuidance === true && key === "agentGuidance" && isRecord(item) && item.schemaVersion === 1 && typeof item.kind === "string" && ["action-guide", "product-guide", "concept"].includes(item.kind);
489
489
  }
490
- async function protect(item, key = "") {
490
+ function localizationMap(path) {
491
+ const location = path.join("/");
492
+ if (options.localizationAction === "sources.verify") return location === "data/hashes";
493
+ return ["translation.release.prepare", "translation.release.import", "translation.release.get"].includes(options.localizationAction ?? "") && /^data\/bundle\/catalogs\/\*\/(sources|(?:packs|provenance)\/[^/]+)$/.test(location);
494
+ }
495
+ async function protect(item, key = "", path = []) {
491
496
  if (documentation(item, key)) return item;
492
497
  if (isActionSecretReference(item)) return item;
493
498
  if (Array.isArray(item) && /(?:backup|recovery)codes$/.test(key.toLowerCase().replace(/[^a-z0-9]/g, ""))) {
494
- return Promise.all(item.map((child) => protect(child, key)));
499
+ return Promise.all(item.map((child) => protect(child, key, [...path, "*"])));
495
500
  }
496
501
  if (sensitive(key, item)) {
497
502
  const reference = store ? await store.save(item) : "[REDACTED]";
498
503
  if (typeof item === "string" && item) secrets.set(item, reference);
499
504
  return reference;
500
505
  }
501
- if (Array.isArray(item)) return Promise.all(item.map((child) => protect(child)));
506
+ if (Array.isArray(item)) return Promise.all(item.map((child) => protect(child, "", [...path, "*"])));
502
507
  if (!isRecord(item)) return item;
503
- return Object.fromEntries(await Promise.all(Object.entries(item).map(async ([name, child]) => [name, await protect(child, name)])));
508
+ return Object.fromEntries(await Promise.all(Object.entries(item).map(async ([name, child]) => [name, await protect(child, localizationMap(path) ? "" : name, [...path, name])])));
504
509
  }
505
510
  const protectedValue = await protect(value);
506
511
  async function protectEmbedded(item, key = "") {
@@ -2244,7 +2249,8 @@ var TopoloClient = class _TopoloClient {
2244
2249
  return preserveSensitiveResult ? result : await protectActionResult(result, this.actionSecretStore, {
2245
2250
  preserveAgentGuidance: entry.appId === "app_topolo_docs",
2246
2251
  preserveActionSchemas: entry.appId === "app_topolo_developers" && entry.name === "apps.actions.list",
2247
- preserveActionContracts: entry.appId === "app_topolo_developers" && entry.name === "apps.actions.list"
2252
+ preserveActionContracts: entry.appId === "app_topolo_developers" && entry.name === "apps.actions.list",
2253
+ localizationAction: entry.appId === "app_topolo_localize" ? entry.name : void 0
2248
2254
  });
2249
2255
  }
2250
2256
  async releaseActionSecret(reference) {
@@ -3603,7 +3609,7 @@ async function pollUntilApproved(params) {
3603
3609
  throw new Error("Device code expired. Run `topolo auth login` again.");
3604
3610
  }
3605
3611
 
3606
- // node_modules/.pnpm/@topolo+sdk@0.23.10/node_modules/@topolo/sdk/dist/node/credential-store.js
3612
+ // node_modules/@topolo/sdk/dist/node/credential-store.js
3607
3613
  import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2, chmod as chmod2, rm as rm2, stat } from "fs/promises";
3608
3614
  import { existsSync as existsSync2 } from "fs";
3609
3615
  import { homedir as homedir2, platform } from "os";
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@topolo/cli",
3
3
  "packageManager": "pnpm@10.17.1",
4
- "version": "0.12.23",
5
- "topoloPublishedVersion": "0.12.23",
4
+ "version": "0.12.25",
5
+ "topoloPublishedVersion": "0.12.25",
6
6
  "description": "Public command-line interface for Topolo customer organizations, developers, and agents.",
7
7
  "license": "UNLICENSED",
8
8
  "author": "Topolo",
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@modelcontextprotocol/sdk": "^1.0.0",
31
- "@topolo/mcp": "0.14.14",
32
- "@topolo/sdk": "0.23.10",
31
+ "@topolo/mcp": "0.14.16",
32
+ "@topolo/sdk": "0.23.12",
33
33
  "commander": "^12.1.0"
34
34
  },
35
35
  "devDependencies": {