@topolo/cli 0.12.24 → 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 +11 -5
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -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) {
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.24",
5
- "topoloPublishedVersion": "0.12.24",
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.15",
32
- "@topolo/sdk": "0.23.11",
31
+ "@topolo/mcp": "0.14.16",
32
+ "@topolo/sdk": "0.23.12",
33
33
  "commander": "^12.1.0"
34
34
  },
35
35
  "devDependencies": {