@0xmaxma/claude-gateway 2.0.4 → 2.0.5

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 (228) hide show
  1. package/README.md +10 -1
  2. package/dist/agent/builtin-commands.d.ts +1 -1
  3. package/dist/agent/builtin-commands.d.ts.map +1 -1
  4. package/dist/agent/builtin-commands.js +3 -2
  5. package/dist/agent/builtin-commands.js.map +1 -1
  6. package/dist/agent/runner.d.ts +109 -9
  7. package/dist/agent/runner.d.ts.map +1 -1
  8. package/dist/agent/runner.js +148 -119
  9. package/dist/agent/runner.js.map +1 -1
  10. package/dist/agent/skill-learning/index.d.ts.map +1 -1
  11. package/dist/agent/skill-learning/index.js +27 -8
  12. package/dist/agent/skill-learning/index.js.map +1 -1
  13. package/dist/agent/skill-learning/reviewer.d.ts +3 -1
  14. package/dist/agent/skill-learning/reviewer.d.ts.map +1 -1
  15. package/dist/agent/skill-learning/reviewer.js +6 -2
  16. package/dist/agent/skill-learning/reviewer.js.map +1 -1
  17. package/dist/agent/turn-stream.d.ts +3 -1
  18. package/dist/agent/turn-stream.d.ts.map +1 -1
  19. package/dist/agent/turn-stream.js +8 -4
  20. package/dist/agent/turn-stream.js.map +1 -1
  21. package/dist/api/gateway-router.d.ts +2 -0
  22. package/dist/api/gateway-router.d.ts.map +1 -1
  23. package/dist/api/gateway-router.js +229 -12
  24. package/dist/api/gateway-router.js.map +1 -1
  25. package/dist/api/router.js +11 -11
  26. package/dist/api/router.js.map +1 -1
  27. package/dist/api/slack-webhook-router.js +1 -1
  28. package/dist/api/slack-webhook-router.js.map +1 -1
  29. package/dist/api/voice-router.d.ts +1 -0
  30. package/dist/api/voice-router.d.ts.map +1 -1
  31. package/dist/api/voice-router.js +129 -7
  32. package/dist/api/voice-router.js.map +1 -1
  33. package/dist/config/claude-settings.d.ts +14 -0
  34. package/dist/config/claude-settings.d.ts.map +1 -1
  35. package/dist/config/claude-settings.js +20 -0
  36. package/dist/config/claude-settings.js.map +1 -1
  37. package/dist/orchestration/agent-cli-session.d.ts +46 -0
  38. package/dist/orchestration/agent-cli-session.d.ts.map +1 -0
  39. package/dist/orchestration/agent-cli-session.js +121 -0
  40. package/dist/orchestration/agent-cli-session.js.map +1 -0
  41. package/dist/orchestration/agent-tool-schemas.d.ts +6 -0
  42. package/dist/orchestration/agent-tool-schemas.d.ts.map +1 -0
  43. package/dist/orchestration/agent-tool-schemas.js +23 -0
  44. package/dist/orchestration/agent-tool-schemas.js.map +1 -0
  45. package/dist/orchestration/bridge.d.ts +6 -3
  46. package/dist/orchestration/bridge.d.ts.map +1 -1
  47. package/dist/orchestration/bridge.js +31 -14
  48. package/dist/orchestration/bridge.js.map +1 -1
  49. package/dist/orchestration/browser-voice.d.ts +14 -0
  50. package/dist/orchestration/browser-voice.d.ts.map +1 -0
  51. package/dist/orchestration/browser-voice.js +30 -0
  52. package/dist/orchestration/browser-voice.js.map +1 -0
  53. package/dist/orchestration/context-footprint.d.ts +14 -0
  54. package/dist/orchestration/context-footprint.d.ts.map +1 -0
  55. package/dist/orchestration/context-footprint.js +57 -0
  56. package/dist/orchestration/context-footprint.js.map +1 -0
  57. package/dist/orchestration/dashboard-reader-worker.d.ts +2 -0
  58. package/dist/orchestration/dashboard-reader-worker.d.ts.map +1 -0
  59. package/dist/orchestration/dashboard-reader-worker.js +155 -0
  60. package/dist/orchestration/dashboard-reader-worker.js.map +1 -0
  61. package/dist/orchestration/dashboard-reader.d.ts +15 -0
  62. package/dist/orchestration/dashboard-reader.d.ts.map +1 -0
  63. package/dist/orchestration/dashboard-reader.js +87 -0
  64. package/dist/orchestration/dashboard-reader.js.map +1 -0
  65. package/dist/orchestration/decision-context.d.ts +15 -0
  66. package/dist/orchestration/decision-context.d.ts.map +1 -0
  67. package/dist/orchestration/decision-context.js +57 -0
  68. package/dist/orchestration/decision-context.js.map +1 -0
  69. package/dist/orchestration/display-stream.d.ts +21 -2
  70. package/dist/orchestration/display-stream.d.ts.map +1 -1
  71. package/dist/orchestration/display-stream.js +61 -8
  72. package/dist/orchestration/display-stream.js.map +1 -1
  73. package/dist/orchestration/inference-errors.d.ts.map +1 -1
  74. package/dist/orchestration/inference-errors.js +19 -21
  75. package/dist/orchestration/inference-errors.js.map +1 -1
  76. package/dist/orchestration/mutation-recovery.d.ts +12 -0
  77. package/dist/orchestration/mutation-recovery.d.ts.map +1 -0
  78. package/dist/orchestration/mutation-recovery.js +41 -0
  79. package/dist/orchestration/mutation-recovery.js.map +1 -0
  80. package/dist/orchestration/native-compact.d.ts +5 -0
  81. package/dist/orchestration/native-compact.d.ts.map +1 -0
  82. package/dist/orchestration/native-compact.js +29 -0
  83. package/dist/orchestration/native-compact.js.map +1 -0
  84. package/dist/orchestration/notification-mailbox.d.ts +3 -1
  85. package/dist/orchestration/notification-mailbox.d.ts.map +1 -1
  86. package/dist/orchestration/notification-mailbox.js +4 -2
  87. package/dist/orchestration/notification-mailbox.js.map +1 -1
  88. package/dist/orchestration/process-turn.d.ts +15 -2
  89. package/dist/orchestration/process-turn.d.ts.map +1 -1
  90. package/dist/orchestration/process-turn.js +78 -14
  91. package/dist/orchestration/process-turn.js.map +1 -1
  92. package/dist/orchestration/progress-review.d.ts +8 -18
  93. package/dist/orchestration/progress-review.d.ts.map +1 -1
  94. package/dist/orchestration/progress-review.js +12 -14
  95. package/dist/orchestration/progress-review.js.map +1 -1
  96. package/dist/orchestration/provider-message.d.ts +7 -0
  97. package/dist/orchestration/provider-message.d.ts.map +1 -0
  98. package/dist/orchestration/provider-message.js +63 -0
  99. package/dist/orchestration/provider-message.js.map +1 -0
  100. package/dist/orchestration/response-errors.d.ts +6 -0
  101. package/dist/orchestration/response-errors.d.ts.map +1 -0
  102. package/dist/orchestration/response-errors.js +88 -0
  103. package/dist/orchestration/response-errors.js.map +1 -0
  104. package/dist/orchestration/response-schema.d.ts +33 -0
  105. package/dist/orchestration/response-schema.d.ts.map +1 -0
  106. package/dist/orchestration/response-schema.js +61 -0
  107. package/dist/orchestration/response-schema.js.map +1 -0
  108. package/dist/orchestration/runtime.d.ts +67 -0
  109. package/dist/orchestration/runtime.d.ts.map +1 -1
  110. package/dist/orchestration/runtime.js +266 -62
  111. package/dist/orchestration/runtime.js.map +1 -1
  112. package/dist/orchestration/skills.d.ts.map +1 -1
  113. package/dist/orchestration/skills.js +3 -2
  114. package/dist/orchestration/skills.js.map +1 -1
  115. package/dist/orchestration/source-policy.d.ts +1 -1
  116. package/dist/orchestration/source-policy.d.ts.map +1 -1
  117. package/dist/orchestration/source-policy.js +1 -1
  118. package/dist/orchestration/speech.d.ts +15 -17
  119. package/dist/orchestration/speech.d.ts.map +1 -1
  120. package/dist/orchestration/speech.js +90 -30
  121. package/dist/orchestration/speech.js.map +1 -1
  122. package/dist/orchestration/store.d.ts +2 -0
  123. package/dist/orchestration/store.d.ts.map +1 -1
  124. package/dist/orchestration/store.js +16 -1
  125. package/dist/orchestration/store.js.map +1 -1
  126. package/dist/orchestration/tasks/driver.d.ts.map +1 -1
  127. package/dist/orchestration/tasks/driver.js +8 -3
  128. package/dist/orchestration/tasks/driver.js.map +1 -1
  129. package/dist/orchestration/tasks/pool.d.ts.map +1 -1
  130. package/dist/orchestration/tasks/pool.js +8 -4
  131. package/dist/orchestration/tasks/pool.js.map +1 -1
  132. package/dist/orchestration/tasks/service.d.ts +48 -1
  133. package/dist/orchestration/tasks/service.d.ts.map +1 -1
  134. package/dist/orchestration/tasks/service.js +41 -17
  135. package/dist/orchestration/tasks/service.js.map +1 -1
  136. package/dist/orchestration/token-ledger.d.ts +125 -0
  137. package/dist/orchestration/token-ledger.d.ts.map +1 -0
  138. package/dist/orchestration/token-ledger.js +232 -0
  139. package/dist/orchestration/token-ledger.js.map +1 -0
  140. package/dist/orchestration/token-usage.d.ts +46 -0
  141. package/dist/orchestration/token-usage.d.ts.map +1 -0
  142. package/dist/orchestration/token-usage.js +102 -0
  143. package/dist/orchestration/token-usage.js.map +1 -0
  144. package/dist/orchestration/tool-activity.d.ts.map +1 -1
  145. package/dist/orchestration/tool-activity.js +5 -3
  146. package/dist/orchestration/tool-activity.js.map +1 -1
  147. package/dist/orchestration/tool-name.d.ts +10 -0
  148. package/dist/orchestration/tool-name.d.ts.map +1 -0
  149. package/dist/orchestration/tool-name.js +14 -0
  150. package/dist/orchestration/tool-name.js.map +1 -0
  151. package/dist/orchestration/transcript-checkpoint.d.ts +14 -0
  152. package/dist/orchestration/transcript-checkpoint.d.ts.map +1 -0
  153. package/dist/orchestration/transcript-checkpoint.js +83 -0
  154. package/dist/orchestration/transcript-checkpoint.js.map +1 -0
  155. package/dist/orchestration/unanswered-inputs.d.ts +6 -0
  156. package/dist/orchestration/unanswered-inputs.d.ts.map +1 -0
  157. package/dist/orchestration/unanswered-inputs.js +18 -0
  158. package/dist/orchestration/unanswered-inputs.js.map +1 -0
  159. package/dist/session/process.d.ts +10 -0
  160. package/dist/session/process.d.ts.map +1 -1
  161. package/dist/session/process.js +91 -9
  162. package/dist/session/process.js.map +1 -1
  163. package/dist/session/request-tool-capture.d.ts +31 -0
  164. package/dist/session/request-tool-capture.d.ts.map +1 -0
  165. package/dist/session/request-tool-capture.js +194 -0
  166. package/dist/session/request-tool-capture.js.map +1 -0
  167. package/dist/session/runtime-profile.d.ts +7 -3
  168. package/dist/session/runtime-profile.d.ts.map +1 -1
  169. package/dist/session/runtime-profile.js +3 -1
  170. package/dist/session/runtime-profile.js.map +1 -1
  171. package/dist/session/store.d.ts +7 -0
  172. package/dist/session/store.d.ts.map +1 -1
  173. package/dist/session/store.js +27 -0
  174. package/dist/session/store.js.map +1 -1
  175. package/dist/shell/tailer.d.ts +7 -5
  176. package/dist/shell/tailer.d.ts.map +1 -1
  177. package/dist/shell/tailer.js +6 -17
  178. package/dist/shell/tailer.js.map +1 -1
  179. package/dist/ui/cli-viewer-ui.js +1 -1
  180. package/dist/ui/dashboard-client.d.ts +3 -0
  181. package/dist/ui/dashboard-client.d.ts.map +1 -0
  182. package/dist/ui/dashboard-client.js +188 -0
  183. package/dist/ui/dashboard-client.js.map +1 -0
  184. package/dist/ui/dashboard-presentation.d.ts +9 -0
  185. package/dist/ui/dashboard-presentation.d.ts.map +1 -0
  186. package/dist/ui/dashboard-presentation.js +56 -0
  187. package/dist/ui/dashboard-presentation.js.map +1 -0
  188. package/dist/ui/dashboard-range.d.ts +5 -0
  189. package/dist/ui/dashboard-range.d.ts.map +1 -0
  190. package/dist/ui/dashboard-range.js +20 -0
  191. package/dist/ui/dashboard-range.js.map +1 -0
  192. package/dist/ui/dashboard-theme.d.ts +4 -0
  193. package/dist/ui/dashboard-theme.d.ts.map +1 -0
  194. package/dist/ui/dashboard-theme.js +485 -0
  195. package/dist/ui/dashboard-theme.js.map +1 -0
  196. package/dist/ui/token-report-client.d.ts +3 -0
  197. package/dist/ui/token-report-client.d.ts.map +1 -0
  198. package/dist/ui/token-report-client.js +34 -0
  199. package/dist/ui/token-report-client.js.map +1 -0
  200. package/dist/ui/token-report.d.ts +89 -0
  201. package/dist/ui/token-report.d.ts.map +1 -0
  202. package/dist/ui/token-report.js +200 -0
  203. package/dist/ui/token-report.js.map +1 -0
  204. package/dist/ui/web-ui.d.ts.map +1 -1
  205. package/dist/ui/web-ui.js +124 -181
  206. package/dist/ui/web-ui.js.map +1 -1
  207. package/dist/voice/replay.d.ts +8 -0
  208. package/dist/voice/replay.d.ts.map +1 -0
  209. package/dist/voice/replay.js +48 -0
  210. package/dist/voice/replay.js.map +1 -0
  211. package/dist/voice/session.d.ts +9 -0
  212. package/dist/voice/session.d.ts.map +1 -1
  213. package/dist/voice/session.js +72 -14
  214. package/dist/voice/session.js.map +1 -1
  215. package/mcp/lazy-connector.test.ts +58 -0
  216. package/mcp/lazy-connector.ts +67 -0
  217. package/mcp/lazy-tools.test.ts +152 -0
  218. package/mcp/lazy-tools.ts +41 -0
  219. package/mcp/server.ts +53 -34
  220. package/mcp/tools/discord/commands.ts +2 -0
  221. package/mcp/tools/tasks/module.ts +1 -12
  222. package/mcp/tools/telegram/receiver-server.ts +14 -14
  223. package/package.json +2 -1
  224. package/resource/dashboard/OFL.txt +93 -0
  225. package/resource/dashboard/poppins-300.woff2 +0 -0
  226. package/resource/dashboard/poppins-400.woff2 +0 -0
  227. package/resource/dashboard/poppins-500.woff2 +0 -0
  228. package/resource/dashboard/poppins-600.woff2 +0 -0
@@ -0,0 +1,7 @@
1
+ /** Display provider text without interpreting its language, reset syntax or wording. */
2
+ export declare function sanitizeProviderMessage(text: string): string | undefined;
3
+ /** Only typed error envelopes supply provider display text, never ordinary replies. */
4
+ export declare function structuredProviderMessage(value: unknown, depth?: number, budget?: {
5
+ nodes: number;
6
+ }, errorEnvelope?: boolean): string | undefined;
7
+ //# sourceMappingURL=provider-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-message.d.ts","sourceRoot":"","sources":["../../src/orchestration/provider-message.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAoBxE;AAED,uFAAuF;AACvF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAI,EAAE,MAAM;;CAAiB,EAAE,aAAa,UAAQ,GAAG,MAAM,GAAG,SAAS,CAoBvI"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sanitizeProviderMessage = sanitizeProviderMessage;
4
+ exports.structuredProviderMessage = structuredProviderMessage;
5
+ /** Display provider text without interpreting its language, reset syntax or wording. */
6
+ function sanitizeProviderMessage(text) {
7
+ const safe = text
8
+ // The authorization header carries any scheme (Bearer/Basic/Token/Digest/…)
9
+ // and may hold quoted multi-value params, so redact its whole value to the
10
+ // line end rather than matching a scheme list.
11
+ .replace(/\b((?:proxy-)?authorization\s*:\s*)[^\r\n]*/gi, '$1[redacted]')
12
+ // Bare Bearer/Basic credentials can also appear without the header name.
13
+ .replace(/\b(?:Bearer|Basic)\s+[^\s"'<>]+/gi, '[redacted]')
14
+ .replace(/\bsk-[A-Za-z0-9_-]+/g, '[redacted]')
15
+ .replace(/\b(?:set-cookie|cookie)\s*:\s*[^\r\n]+/gi, '[redacted cookie]')
16
+ .replace(/(["']?[a-z0-9_-]*(?:api[_-]?key|token|password|secret|authorization|cookie)["']?\s*[=:]\s*)(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^\s,;}]+)/gi, '$1[redacted]')
17
+ .replace(/https?:\/\/[^\s<>"']+/gi, value => {
18
+ try {
19
+ const url = new URL(value);
20
+ url.username = '';
21
+ url.password = '';
22
+ url.search = '';
23
+ url.hash = '';
24
+ return url.toString();
25
+ }
26
+ catch {
27
+ return '[redacted URL]';
28
+ }
29
+ })
30
+ .split('\n').filter(line => !/^\s*at\s+/.test(line)).join('\n')
31
+ .replace(/(^|[\s("'])(?:[A-Za-z]:\\|\/)(?:[^\s"'<>:]+[\\/])+[^\s"'<>:]*/g, '$1[redacted path]')
32
+ .replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g, '')
33
+ .trim();
34
+ return safe ? safe.slice(0, 4096) : undefined;
35
+ }
36
+ /** Only typed error envelopes supply provider display text, never ordinary replies. */
37
+ function structuredProviderMessage(value, depth = 0, budget = { nodes: 256 }, errorEnvelope = false) {
38
+ if (depth >= 8 || --budget.nodes < 0 || !value)
39
+ return undefined;
40
+ if (typeof value === 'string')
41
+ return (errorEnvelope || /^API Error:\s*\S/.test(value)) ? value : undefined;
42
+ if (typeof value !== 'object')
43
+ return undefined;
44
+ if (Array.isArray(value)) {
45
+ for (const item of value.slice(0, 32)) {
46
+ const message = structuredProviderMessage(item, depth + 1, budget, errorEnvelope);
47
+ if (message)
48
+ return message;
49
+ }
50
+ return undefined;
51
+ }
52
+ const entry = value;
53
+ if (entry.error && (typeof entry.error === 'object' || typeof entry.error === 'string')) {
54
+ const nested = structuredProviderMessage(entry.error, depth + 1, budget, true);
55
+ if (nested)
56
+ return nested;
57
+ }
58
+ if ((errorEnvelope || typeof entry.type === 'string' || typeof entry.code === 'string' || typeof entry.status === 'number') && typeof entry.message === 'string') {
59
+ return entry.message;
60
+ }
61
+ return undefined;
62
+ }
63
+ //# sourceMappingURL=provider-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-message.js","sourceRoot":"","sources":["../../src/orchestration/provider-message.ts"],"names":[],"mappings":";;AACA,0DAoBC;AAGD,8DAoBC;AA5CD,wFAAwF;AACxF,SAAgB,uBAAuB,CAAC,IAAY;IAClD,MAAM,IAAI,GAAG,IAAI;QACf,4EAA4E;QAC5E,2EAA2E;QAC3E,+CAA+C;SAC9C,OAAO,CAAC,+CAA+C,EAAE,cAAc,CAAC;QACzE,yEAAyE;SACxE,OAAO,CAAC,mCAAmC,EAAE,YAAY,CAAC;SAC1D,OAAO,CAAC,sBAAsB,EAAE,YAAY,CAAC;SAC7C,OAAO,CAAC,0CAA0C,EAAE,mBAAmB,CAAC;SACxE,OAAO,CAAC,gJAAgJ,EAAE,cAAc,CAAC;SACzK,OAAO,CAAC,yBAAyB,EAAE,KAAK,CAAC,EAAE;QAC1C,IAAI,CAAC;YAAC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;YAAC,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC;YAAC,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC;YAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;YAAC,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;YAAC,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;QAAC,CAAC;QAChI,MAAM,CAAC;YAAC,OAAO,gBAAgB,CAAC;QAAC,CAAC;IACpC,CAAC,CAAC;SACD,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;SAC9D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AAC,EAAE,CAAC;QACxF,MAAM,MAAM,GAAG,yBAAyB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAC/E,IAAI,MAAM;YAAE,OAAO,MAAM,CAAC;IAC5B,CAAC;IACD,IAAI,CAAC,aAAa,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QACjK,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare class PresentedResponseError extends Error {
2
+ }
3
+ export declare function responseFailureMessage(error: unknown, legacyMessage?: boolean): string;
4
+ /** Normalize managed failures before they reach legacy stream callbacks. */
5
+ export declare function presentedResponseError(error: unknown): PresentedResponseError;
6
+ //# sourceMappingURL=response-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-errors.d.ts","sourceRoot":"","sources":["../../src/orchestration/response-errors.ts"],"names":[],"mappings":"AAKA,qBAAa,sBAAuB,SAAQ,KAAK;CAAG;AAwCpD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,aAAa,UAAQ,GAAG,MAAM,CAyBpF;AAGD,4EAA4E;AAC5E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,CAK7E"}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PresentedResponseError = void 0;
4
+ exports.responseFailureMessage = responseFailureMessage;
5
+ exports.presentedResponseError = presentedResponseError;
6
+ const provider_message_1 = require("./provider-message");
7
+ const inference_errors_1 = require("./inference-errors");
8
+ const types_1 = require("./types");
9
+ // Used only when replaying an already-rendered terminal frame from the server buffer.
10
+ class PresentedResponseError extends Error {
11
+ }
12
+ exports.PresentedResponseError = PresentedResponseError;
13
+ /** Public explanations, independent of exception prose and transport. Never echo internal messages. */
14
+ const explanations = {
15
+ MODEL_MAX_TURNS: 'The model reached its configured turn limit before completing the request.',
16
+ MODEL_BUDGET_EXCEEDED: 'The model reached its configured spending limit before completing the request.',
17
+ MODEL_OUTPUT_INVALID: 'The model could not produce the required response format after retrying.',
18
+ INFERENCE_FAILED: 'The model request failed without a usable provider diagnostic. Check the gateway logs.',
19
+ PROCESS_EXITED: 'The agent process exited before completing the response. Check the gateway logs before retrying.',
20
+ PROCESS_START_FAILED: 'The agent process could not start. Check the Claude installation and gateway logs.',
21
+ WORKSPACE_DIRECTORY_MISSING: 'The agent workspace directory is missing. Restore the workspace before restarting the agent.',
22
+ CONTAINER_RUNTIME_NOT_FOUND: 'The container runtime executable was not found. Check the Docker installation and gateway PATH.',
23
+ CLAUDE_BINARY_NOT_FOUND: 'The Claude executable was not found. Check the Claude installation or CLAUDE_BIN setting.',
24
+ PROCESS_PERMISSION_DENIED: 'The gateway does not have permission to start the Claude executable.',
25
+ RESPONSE_PERSISTENCE_FAILED: 'The gateway could not save the response. Check storage and gateway logs before retrying.',
26
+ RESPONSE_TOO_LARGE: 'The response exceeded the gateway size limit. Try a smaller request.',
27
+ PROFILE_INVENTORY_MISMATCH: 'The agent tool configuration does not match the running gateway. Check that the gateway and MCP server use the same deployment.',
28
+ CAPACITY_EXCEEDED: 'The gateway has reached its active-session limit. Wait for current work to finish and try again.',
29
+ CONFLICT: 'This session already has a pending request.',
30
+ ORCHESTRATION_CLOSING: 'The gateway is shutting down. Try again after it restarts.',
31
+ GATEWAY_SHUTDOWN: 'The gateway shut down before the response completed.',
32
+ TASK_RESULT_TIMEOUT: 'Scheduled work did not produce a final report before its deadline. Check /tasks before retrying.',
33
+ INTERRUPTED: 'Response stopped.',
34
+ UNSUPPORTED_ORCHESTRATION_BACKEND: 'Orchestration requires the headless backend. Check the gateway configuration.',
35
+ UNSUPPORTED_PROCESS_SUPERVISOR: 'This platform does not support the configured orchestration process supervisor.',
36
+ PROFILE_FLAGS_CONFLICT: 'Custom Claude flags conflict with the orchestration runtime profile. Check the agent configuration.',
37
+ ACKNOWLEDGEMENT_DELIVERY_PENDING: 'The acknowledgement has not been delivered yet. Work has not been started; check channel delivery.',
38
+ VOICE_NOTES_DISABLED: 'Voice-note transcription is disabled for this agent.',
39
+ VOICE_NOTE_ATTACHMENT_MISSING: 'The voice-note attachment is missing. Please resend it.',
40
+ ENOSPC: 'The gateway has run out of storage space. Free disk space before retrying.',
41
+ EACCES: 'The gateway could not access a required resource because permission was denied. Check the gateway logs.',
42
+ EPERM: 'The gateway was not permitted to access a required resource. Check the gateway logs.',
43
+ ENOENT: 'A required gateway file or executable is missing. Check the gateway logs.',
44
+ SQLITE_FULL: 'The gateway database could not be written because storage is full.',
45
+ SQLITE_BUSY: 'The gateway database is busy. Try again shortly.',
46
+ ECONNREFUSED: 'The gateway could not connect to a required service. Check service availability.',
47
+ ECONNRESET: 'The connection to a required service was interrupted. Please try again.',
48
+ ETIMEDOUT: 'The connection to a required service timed out. Please try again.',
49
+ };
50
+ function responseFailureMessage(error, legacyMessage = false) {
51
+ if (error instanceof PresentedResponseError)
52
+ return (0, provider_message_1.sanitizeProviderMessage)(error.message) ?? 'The gateway response failed.';
53
+ const provider = (0, inference_errors_1.inferenceFailureMessage)(error);
54
+ if (provider)
55
+ return provider;
56
+ const failure = error;
57
+ const code = typeof failure?.code === 'string' ? failure.code : '';
58
+ if (code === 'TIMEOUT' || code === 'TIMEOUT_SOFT') {
59
+ const phase = failure?.timeout?.phase;
60
+ const message = code === 'TIMEOUT_SOFT' ? 'The request wait time elapsed; the agent may still be working.'
61
+ : phase === 'startup' ? 'The agent could not finish starting in time.'
62
+ : phase === 'first_response' ? 'The model did not begin responding in time.'
63
+ : phase === 'idle' ? 'The agent stopped making progress before completing the reply.'
64
+ : 'The agent reached its response time limit before completing the reply.';
65
+ return `${message} Please check /tasks for any pending work. (${code})`;
66
+ }
67
+ if (Object.prototype.hasOwnProperty.call(explanations, code))
68
+ return `${explanations[code]} (${code})`;
69
+ // Legacy stream/command callbacks historically carry uncoded public errors.
70
+ // Preserve that contract, with redaction; orchestration/internal callers fail closed.
71
+ if (legacyMessage && !code && error instanceof Error) {
72
+ const text = (0, provider_message_1.sanitizeProviderMessage)(error.message);
73
+ if (text)
74
+ return text;
75
+ }
76
+ // New orchestration codes remain diagnosable without exposing arbitrary exception text.
77
+ const publicCode = error instanceof types_1.OrchestrationError && /^[A-Z][A-Z0-9_]{0,79}$/.test(code) ? code : 'GATEWAY_INTERNAL_ERROR';
78
+ return `The gateway could not complete the response (${publicCode}). Check the gateway logs for details.`;
79
+ }
80
+ /** Normalize managed failures before they reach legacy stream callbacks. */
81
+ function presentedResponseError(error) {
82
+ const presented = new PresentedResponseError(responseFailureMessage(error));
83
+ const code = error?.code;
84
+ if (typeof code === 'string' && /^[A-Z][A-Z0-9_]{0,79}$/.test(code))
85
+ Object.assign(presented, { code });
86
+ return presented;
87
+ }
88
+ //# sourceMappingURL=response-errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-errors.js","sourceRoot":"","sources":["../../src/orchestration/response-errors.ts"],"names":[],"mappings":";;;AA6CA,wDAyBC;AAID,wDAKC;AA/ED,yDAA6D;AAC7D,yDAA6D;AAC7D,mCAA6C;AAE7C,sFAAsF;AACtF,MAAa,sBAAuB,SAAQ,KAAK;CAAG;AAApD,wDAAoD;AAEpD,uGAAuG;AACvG,MAAM,YAAY,GAAqC;IACrD,eAAe,EAAE,4EAA4E;IAC7F,qBAAqB,EAAE,gFAAgF;IACvG,oBAAoB,EAAE,0EAA0E;IAChG,gBAAgB,EAAE,wFAAwF;IAC1G,cAAc,EAAE,kGAAkG;IAClH,oBAAoB,EAAE,oFAAoF;IAC1G,2BAA2B,EAAE,8FAA8F;IAC3H,2BAA2B,E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AC;IACtD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,CAAC,CAAC;IACtG,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /** The one response contract declared on EVERY agent decision turn.
2
+ *
3
+ * Anthropic's prompt cache is a strict prefix match over [tools, system, messages].
4
+ * src/session/runtime-profile.ts turns RuntimeProfile.responseSchema into the CLI's
5
+ * --json-schema flag, and that flag appends a synthetic StructuredOutput tool to the
6
+ * tools block. Verified against the installed claude-code 2.1.274 binary: the flag only
7
+ * (a) appends the tool to the request's tool array and (b) injects one bounded turn-end
8
+ * "call the StructuredOutput tool now" nudge when the turn ended without it. It does NOT
9
+ * set tool_choice — the main query loop always sends toolChoice: undefined — so declaring
10
+ * the schema does not force an ordinary reply through a JSON tool call, and the model may
11
+ * still answer in plain text (both parsers below keep tolerating that).
12
+ *
13
+ * Because the tool renders at position 0 of the cached prefix, a schema attached on only
14
+ * SOME turns of a session invalidates tools+system+messages every time the session switches
15
+ * mode. Anthropic's prescribed remedy is an invariant tool set with the mode carried in
16
+ * message content — not removing the tool. So this schema is the union of every turn shape
17
+ * and is attached unconditionally; the per-turn overlay text (SPEECH_OVERLAY,
18
+ * PROGRESS_REVIEW_OVERLAY, INTAKE_OVERLAY — all appended to the prompt, below the cache
19
+ * breakpoint) remains the mechanism that says which optional fields this turn must fill.
20
+ *
21
+ * Only display_text is required, so an ordinary text turn satisfies the union with exactly
22
+ * the one field it already produced; nothing about a normal turn's user-facing output
23
+ * changes. Length limits are deliberately absent: structured outputs does not enforce
24
+ * minLength/maxLength server-side, so the spoken-length budget is enforced in our own code
25
+ * (splitSpeechResponse/progressReviewResult) instead of being decorative schema text.
26
+ *
27
+ * Frozen so the single canonical definition also has a single canonical serialization:
28
+ * runtimeProfileArgs JSON.stringify()s this exact object on every turn, and byte-identical
29
+ * CLI args are the whole point.
30
+ */
31
+ export declare const SPOKEN_TEXT_LIMIT = 600;
32
+ export declare const ORCHESTRATION_RESPONSE_SCHEMA: Record<string, unknown>;
33
+ //# sourceMappingURL=response-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-schema.d.ts","sourceRoot":"","sources":["../../src/orchestration/response-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAOrC,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAmBhE,CAAC"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ORCHESTRATION_RESPONSE_SCHEMA = exports.SPOKEN_TEXT_LIMIT = void 0;
4
+ /** The one response contract declared on EVERY agent decision turn.
5
+ *
6
+ * Anthropic's prompt cache is a strict prefix match over [tools, system, messages].
7
+ * src/session/runtime-profile.ts turns RuntimeProfile.responseSchema into the CLI's
8
+ * --json-schema flag, and that flag appends a synthetic StructuredOutput tool to the
9
+ * tools block. Verified against the installed claude-code 2.1.274 binary: the flag only
10
+ * (a) appends the tool to the request's tool array and (b) injects one bounded turn-end
11
+ * "call the StructuredOutput tool now" nudge when the turn ended without it. It does NOT
12
+ * set tool_choice — the main query loop always sends toolChoice: undefined — so declaring
13
+ * the schema does not force an ordinary reply through a JSON tool call, and the model may
14
+ * still answer in plain text (both parsers below keep tolerating that).
15
+ *
16
+ * Because the tool renders at position 0 of the cached prefix, a schema attached on only
17
+ * SOME turns of a session invalidates tools+system+messages every time the session switches
18
+ * mode. Anthropic's prescribed remedy is an invariant tool set with the mode carried in
19
+ * message content — not removing the tool. So this schema is the union of every turn shape
20
+ * and is attached unconditionally; the per-turn overlay text (SPEECH_OVERLAY,
21
+ * PROGRESS_REVIEW_OVERLAY, INTAKE_OVERLAY — all appended to the prompt, below the cache
22
+ * breakpoint) remains the mechanism that says which optional fields this turn must fill.
23
+ *
24
+ * Only display_text is required, so an ordinary text turn satisfies the union with exactly
25
+ * the one field it already produced; nothing about a normal turn's user-facing output
26
+ * changes. Length limits are deliberately absent: structured outputs does not enforce
27
+ * minLength/maxLength server-side, so the spoken-length budget is enforced in our own code
28
+ * (splitSpeechResponse/progressReviewResult) instead of being decorative schema text.
29
+ *
30
+ * Frozen so the single canonical definition also has a single canonical serialization:
31
+ * runtimeProfileArgs JSON.stringify()s this exact object on every turn, and byte-identical
32
+ * CLI args are the whole point.
33
+ */
34
+ exports.SPOKEN_TEXT_LIMIT = 600;
35
+ function deepFreeze(value) {
36
+ if (value && typeof value === 'object')
37
+ for (const nested of Object.values(value))
38
+ deepFreeze(nested);
39
+ return Object.freeze(value);
40
+ }
41
+ exports.ORCHESTRATION_RESPONSE_SCHEMA = deepFreeze({
42
+ type: 'object',
43
+ additionalProperties: false,
44
+ description: 'Your reply for this turn. Always fill display_text. Fill the optional fields only when this turn\'s instructions explicitly ask for them.',
45
+ properties: {
46
+ display_text: {
47
+ type: 'string',
48
+ description: 'The complete reply shown to the user in chat, in the user\'s language. On an ordinary turn this is your entire answer: write exactly what you would have written as a plain reply, with the same detail, structure and formatting. Never summarise it or move content elsewhere.',
49
+ },
50
+ spoken_text: {
51
+ type: 'string',
52
+ description: `Only when this turn's instructions ask for speech: a brief natural spoken version of display_text, at most ${exports.SPOKEN_TEXT_LIMIT} characters, in the same language. Omit this field entirely on an ordinary text turn.`,
53
+ },
54
+ notify_user: {
55
+ type: 'boolean',
56
+ description: 'Only on an internal progress-review turn, where the instructions define it: whether the user should receive this update. Omit this field entirely on every other turn.',
57
+ },
58
+ },
59
+ required: ['display_text'],
60
+ });
61
+ //# sourceMappingURL=response-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-schema.js","sourceRoot":"","sources":["../../src/orchestration/response-schema.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACU,QAAA,iBAAiB,GAAG,GAAG,CAAC;AAErC,SAAS,UAAU,CAAI,KAAQ;IAC7B,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;YAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACtG,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAEY,QAAA,6BAA6B,GAA4B,UAAU,CAAC;IAC/E,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,WAAW,EAAE,2IAA2I;IACxJ,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kRAAkR;SAChS;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,8GAA8G,yBAAiB,uFAAuF;SACpO;QACD,WAAW,EAAE;YACX,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,wKAAwK;SACtL;KACF;IACD,QAAQ,EAAE,CAAC,cAAc,CAAC;CAC3B,CAAC,CAAC"}
@@ -36,6 +36,7 @@ export declare class AgentOrchestrationRuntime {
36
36
  readonly store: OrchestrationStore;
37
37
  readonly tasks: TaskService;
38
38
  readonly intake: ConversationIntake;
39
+ private readonly cliSessions;
39
40
  readonly stopControls: StopControls;
40
41
  readonly taskControls: TaskControls;
41
42
  readonly questionControls: TaskQuestions;
@@ -66,6 +67,12 @@ export declare class AgentOrchestrationRuntime {
66
67
  private readonly inputResponses;
67
68
  private readonly inputTools;
68
69
  private readonly voiceListeners;
70
+ setBrowserVoice(sessionId: string, principalId: string, enabled: boolean): void;
71
+ pendingVoiceSpeech(sessionId: string, principalId: string, claimed?: string[]): {
72
+ responseId: string;
73
+ text: string;
74
+ spoken: string;
75
+ }[];
69
76
  subscribeVoiceResults(sessionId: string, principalId: string, receive: (result: {
70
77
  responseId: string;
71
78
  text: string;
@@ -108,6 +115,7 @@ export declare class AgentOrchestrationRuntime {
108
115
  busy: boolean;
109
116
  };
110
117
  isBusy(sessionId: string): boolean;
118
+ isCompacting(sessionId: string): boolean;
111
119
  responseFiles(sessionId: string, requestId?: string): string[];
112
120
  notifySession(sessionId: string, text: string, deliver?: boolean): Promise<void>;
113
121
  ownsSession(sessionId: string): boolean;
@@ -117,11 +125,56 @@ export declare class AgentOrchestrationRuntime {
117
125
  private assertBackend;
118
126
  updateAgentConfig(agent: AgentConfig): void;
119
127
  configure(config: AgentConfig['orchestration'], backendAgent?: AgentConfig): void;
128
+ /** Rotate only the agent CLI context. Tasks and canonical history remain intact. */
129
+ resetSessionContext(sessionId: string): void;
130
+ /** An exclusive maintenance operation on the existing CLI transcript, not a chat summary. */
131
+ compactSession(sessionId: string, model?: string): Promise<void>;
132
+ tokenReport(sessionId: string): {
133
+ sessionId: string;
134
+ turns: import("./token-ledger").TokenTurn[];
135
+ usageByRole: {
136
+ role: string;
137
+ inputTokens: number;
138
+ cacheCreationTokens: number;
139
+ cacheReadTokens: number;
140
+ outputTokens: number;
141
+ }[];
142
+ contextWindow: {
143
+ used: number;
144
+ total: number | null;
145
+ model: string | null;
146
+ } | null;
147
+ totals: {
148
+ agentTokens: number | null;
149
+ workerTokens: number | null;
150
+ totalTokens: number | null;
151
+ };
152
+ distribution: {
153
+ category: string;
154
+ tokens: number;
155
+ }[];
156
+ pagination: {
157
+ total: number;
158
+ offset: number;
159
+ limit: number;
160
+ since?: number;
161
+ newestFirst?: boolean;
162
+ } | undefined;
163
+ coverage: "recorded-turns-only";
164
+ } | undefined;
120
165
  dashboardSummary(): {
121
166
  enabled: boolean;
122
167
  backend: string;
123
168
  workspaceMode: "container" | "host" | "isolated-worktree" | "shared-lock";
124
169
  sessions: {
170
+ tokenSummary: {
171
+ agentTokens: number | null;
172
+ workerTokens: number | null;
173
+ totalTokens: number;
174
+ } | undefined;
175
+ contextTools: string[] | null;
176
+ loadedTools: string[] | null;
177
+ usedTools: string[];
125
178
  orchestration: boolean;
126
179
  sessionId: string;
127
180
  chatId: string;
@@ -134,6 +187,12 @@ export declare class AgentOrchestrationRuntime {
134
187
  spawnedAt: number;
135
188
  uptimeSec: number;
136
189
  tasks: {
190
+ tokenSummary: {
191
+ totalTokens: number | null;
192
+ };
193
+ contextTools: string[] | null;
194
+ loadedTools: string[] | null;
195
+ usedTools: string[];
137
196
  taskId: string | number | null;
138
197
  sessionId: string | number | null;
139
198
  state: string | number | null;
@@ -169,6 +228,12 @@ export declare class AgentOrchestrationRuntime {
169
228
  };
170
229
  activeAgentSessions: string[];
171
230
  tasks: {
231
+ tokenSummary: {
232
+ totalTokens: number | null;
233
+ };
234
+ contextTools: string[] | null;
235
+ loadedTools: string[] | null;
236
+ usedTools: string[];
172
237
  taskId: string | number | null;
173
238
  sessionId: string | number | null;
174
239
  state: string | number | null;
@@ -198,6 +263,8 @@ export declare class AgentOrchestrationRuntime {
198
263
  private publishText;
199
264
  saveVoiceAudio(sessionId: string, principalId: string, responseId: string, audio: Buffer): void;
200
265
  voiceAudio(sessionId: string, principalId: string, responseId?: string): string[] | Buffer<ArrayBufferLike> | undefined;
266
+ replayableVoiceResponses(sessionId: string, principalId: string): string[];
267
+ voiceReplaySpeech(sessionId: string, principalId: string, responseId: string): string | undefined;
201
268
  authorizeSession(sessionId: string, principalId: string): void;
202
269
  responseIdForInput(inputId: string): string | undefined;
203
270
  /** Includes independent acknowledgement responses without crossing input scope. */
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/orchestration/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAcjD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OA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