@agentconnect.md/daemon 1.0.0-rc.305 → 1.0.0-rc.307

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.
@@ -9648,6 +9648,22 @@ function installedRuntimes(runtimes, env = process.env) {
9648
9648
  //#region src/acp/acp-host.ts
9649
9649
  const PROTOCOL_VERSION = 1;
9650
9650
  /**
9651
+ * Distill the human-actionable reason from a failed ACP request. Adapters wrap
9652
+ * their runtime's own message in a JSON-RPC error whose `message` is often just
9653
+ * the generic title — codex-acp reports quota exhaustion as code -32603
9654
+ * "Internal error" with the real text ("You've hit your usage limit. Visit … or
9655
+ * try again at 7:01 PM.") under `error.data.message` — so prefer that detail
9656
+ * over a bare title, and append it when a specific message carries extra data.
9657
+ * Non-RequestError failures fall back to the plain Error message.
9658
+ */
9659
+ function turnFailureReason(err) {
9660
+ const e = err;
9661
+ const msg = typeof e?.message === "string" && e.message.trim() ? e.message.trim() : String(err);
9662
+ const detail = typeof e?.data?.message === "string" ? e.data.message.trim() : "";
9663
+ if (!detail || msg.includes(detail)) return msg;
9664
+ return /^(parse error|invalid request|invalid params|internal error|request cancelled|authentication required|resource not found)$/i.test(msg) ? detail : `${msg}: ${detail}`;
9665
+ }
9666
+ /**
9651
9667
  * Resolve how to apply `desired` to the select config option tagged `category`.
9652
9668
  * `{skip}` (with the reason) means nothing should be sent: the runtime
9653
9669
  * advertises no such selector, doesn't offer the value, or already has it set.
@@ -10121,6 +10137,6 @@ var AcpHost = class {
10121
10137
  }
10122
10138
  };
10123
10139
  //#endregion
10124
- export { resolveRuntimes as S, writeMemoryFile as _, initGitInjection as a, cachedRuntimeNames as b, simpleGit as c, memoryProviderFor as d, MemoryConflictError as f, resolveInMemoryDir as g, listMemory as h, prepareWorkspace as i, createMemoryProvider as l, MemoryTooLargeError as m, installedRuntimes as n, probeGitVersion as o, MemoryPathError as p, prefetchWorkspace as r, sessionGitEnv as s, AcpHost as t, memoryKindOf as u, MEMORY_TOOL_NAMES as v, cachedRuntimeVersions as x, toolsForIntegrations as y };
10140
+ export { resolveRuntimes as C, cachedRuntimeVersions as S, resolveInMemoryDir as _, prepareWorkspace as a, toolsForIntegrations as b, sessionGitEnv as c, memoryKindOf as d, memoryProviderFor as f, listMemory as g, MemoryTooLargeError as h, prefetchWorkspace as i, simpleGit as l, MemoryPathError as m, turnFailureReason as n, initGitInjection as o, MemoryConflictError as p, installedRuntimes as r, probeGitVersion as s, AcpHost as t, createMemoryProvider as u, writeMemoryFile as v, cachedRuntimeNames as x, MEMORY_TOOL_NAMES as y };
10125
10141
 
10126
- //# sourceMappingURL=acp-host-CbsRPfev.js.map
10142
+ //# sourceMappingURL=acp-host-BDcV2bZY.js.map