@topolo/cli 0.12.18 → 0.12.19

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 +12 -5
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -463,9 +463,13 @@ async function resolveActionSecrets(value, store, secrets) {
463
463
  if (!isRecord(value)) return value;
464
464
  return Object.fromEntries(await Promise.all(Object.entries(value).map(async ([key, item]) => [key, await resolveActionSecrets(item, store, secrets)])));
465
465
  }
466
- async function protectActionResult(value, store) {
466
+ async function protectActionResult(value, store, options = {}) {
467
467
  const secrets = /* @__PURE__ */ new Map();
468
+ function documentation(item, key) {
469
+ return options.preserveAgentGuidance === true && key === "agentGuidance" && isRecord(item) && item.schemaVersion === 1 && typeof item.kind === "string" && ["action-guide", "product-guide", "concept"].includes(item.kind);
470
+ }
468
471
  async function protect(item, key = "") {
472
+ if (documentation(item, key)) return item;
469
473
  if (isActionSecretReference(item)) return item;
470
474
  if (Array.isArray(item) && /(?:backup|recovery)codes$/.test(key.toLowerCase().replace(/[^a-z0-9]/g, ""))) {
471
475
  return Promise.all(item.map((child) => protect(child, key)));
@@ -480,13 +484,14 @@ async function protectActionResult(value, store) {
480
484
  return Object.fromEntries(await Promise.all(Object.entries(item).map(async ([name, child]) => [name, await protect(child, name)])));
481
485
  }
482
486
  const protectedValue = await protect(value);
483
- async function protectEmbedded(item) {
487
+ async function protectEmbedded(item, key = "") {
488
+ if (documentation(item, key)) return item;
484
489
  if (typeof item === "string" && !isActionSecretReference(item) && maskActionSecrets(item, secrets) !== item) {
485
490
  return store ? store.save(item) : maskActionSecrets(item, secrets);
486
491
  }
487
- if (Array.isArray(item)) return Promise.all(item.map(protectEmbedded));
492
+ if (Array.isArray(item)) return Promise.all(item.map((child) => protectEmbedded(child)));
488
493
  if (!isRecord(item)) return item;
489
- return Object.fromEntries(await Promise.all(Object.entries(item).map(async ([key, child]) => [key, await protectEmbedded(child)])));
494
+ return Object.fromEntries(await Promise.all(Object.entries(item).map(async ([key2, child]) => [key2, await protectEmbedded(child, key2)])));
490
495
  }
491
496
  return protectEmbedded(protectedValue);
492
497
  }
@@ -2194,7 +2199,9 @@ var TopoloClient = class _TopoloClient {
2194
2199
  } catch (error) {
2195
2200
  throw maskActionSecretError(error, this.actionSecrets);
2196
2201
  }
2197
- return preserveSensitiveResult ? result : await protectActionResult(result, this.actionSecretStore);
2202
+ return preserveSensitiveResult ? result : await protectActionResult(result, this.actionSecretStore, {
2203
+ preserveAgentGuidance: entry.appId === "app_topolo_docs"
2204
+ });
2198
2205
  }
2199
2206
  async releaseActionSecret(reference) {
2200
2207
  if (!this.actionSecretStore) throw new TopoloSdkError("action_secret_store_required", "Protected action references require a secret store.");
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.18",
5
- "topoloPublishedVersion": "0.12.18",
4
+ "version": "0.12.19",
5
+ "topoloPublishedVersion": "0.12.19",
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.10",
32
- "@topolo/sdk": "0.23.5",
31
+ "@topolo/mcp": "0.14.11",
32
+ "@topolo/sdk": "0.23.6",
33
33
  "commander": "^12.1.0"
34
34
  },
35
35
  "devDependencies": {