@jungjaehoon/mama-os 0.32.0 → 0.32.2

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 (327) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +15 -13
  3. package/dist/agent/agent-loop.d.ts +10 -1
  4. package/dist/agent/agent-loop.d.ts.map +1 -1
  5. package/dist/agent/agent-loop.js +221 -103
  6. package/dist/agent/agent-loop.js.map +1 -1
  7. package/dist/agent/backend-model-policy.d.ts +9 -0
  8. package/dist/agent/backend-model-policy.d.ts.map +1 -0
  9. package/dist/agent/backend-model-policy.js +21 -0
  10. package/dist/agent/backend-model-policy.js.map +1 -0
  11. package/dist/agent/backend-model-runner-factory.d.ts +27 -0
  12. package/dist/agent/backend-model-runner-factory.d.ts.map +1 -0
  13. package/dist/agent/backend-model-runner-factory.js +85 -0
  14. package/dist/agent/backend-model-runner-factory.js.map +1 -0
  15. package/dist/agent/cline-cli-adapter.d.ts +124 -0
  16. package/dist/agent/cline-cli-adapter.d.ts.map +1 -0
  17. package/dist/agent/cline-cli-adapter.js +1040 -0
  18. package/dist/agent/cline-cli-adapter.js.map +1 -0
  19. package/dist/agent/cline-native-tool-policy.d.ts +3 -0
  20. package/dist/agent/cline-native-tool-policy.d.ts.map +1 -0
  21. package/dist/agent/cline-native-tool-policy.js +50 -0
  22. package/dist/agent/cline-native-tool-policy.js.map +1 -0
  23. package/dist/agent/code-act/constants.d.ts +1 -1
  24. package/dist/agent/code-act/constants.d.ts.map +1 -1
  25. package/dist/agent/code-act/constants.js +13 -1
  26. package/dist/agent/code-act/constants.js.map +1 -1
  27. package/dist/agent/code-act/host-bridge.d.ts.map +1 -1
  28. package/dist/agent/code-act/host-bridge.js +35 -74
  29. package/dist/agent/code-act/host-bridge.js.map +1 -1
  30. package/dist/agent/codex-app-server-process.d.ts +5 -0
  31. package/dist/agent/codex-app-server-process.d.ts.map +1 -1
  32. package/dist/agent/codex-app-server-process.js +30 -0
  33. package/dist/agent/codex-app-server-process.js.map +1 -1
  34. package/dist/agent/codex-auxiliary-tools.d.ts +17 -0
  35. package/dist/agent/codex-auxiliary-tools.d.ts.map +1 -0
  36. package/dist/agent/codex-auxiliary-tools.js +267 -0
  37. package/dist/agent/codex-auxiliary-tools.js.map +1 -0
  38. package/dist/agent/codex-home.d.ts.map +1 -1
  39. package/dist/agent/codex-home.js +1 -0
  40. package/dist/agent/codex-home.js.map +1 -1
  41. package/dist/agent/gateway-tool-catalog.d.ts +14 -0
  42. package/dist/agent/gateway-tool-catalog.d.ts.map +1 -0
  43. package/dist/agent/gateway-tool-catalog.js +41 -0
  44. package/dist/agent/gateway-tool-catalog.js.map +1 -0
  45. package/dist/agent/gateway-tool-executor.d.ts +12 -1
  46. package/dist/agent/gateway-tool-executor.d.ts.map +1 -1
  47. package/dist/agent/gateway-tool-executor.js +149 -15
  48. package/dist/agent/gateway-tool-executor.js.map +1 -1
  49. package/dist/agent/gateway-tools.md +5 -7
  50. package/dist/agent/managed-agent-runtime-sync.d.ts.map +1 -1
  51. package/dist/agent/managed-agent-runtime-sync.js +17 -3
  52. package/dist/agent/managed-agent-runtime-sync.js.map +1 -1
  53. package/dist/agent/managed-agent-validation.js +1 -1
  54. package/dist/agent/managed-agent-validation.js.map +1 -1
  55. package/dist/agent/model-runner.d.ts +11 -1
  56. package/dist/agent/model-runner.d.ts.map +1 -1
  57. package/dist/agent/model-runner.js +12 -1
  58. package/dist/agent/model-runner.js.map +1 -1
  59. package/dist/agent/session-pool.d.ts +10 -9
  60. package/dist/agent/session-pool.d.ts.map +1 -1
  61. package/dist/agent/session-pool.js +12 -47
  62. package/dist/agent/session-pool.js.map +1 -1
  63. package/dist/agent/tool-registry.d.ts +6 -4
  64. package/dist/agent/tool-registry.d.ts.map +1 -1
  65. package/dist/agent/tool-registry.js +62 -30
  66. package/dist/agent/tool-registry.js.map +1 -1
  67. package/dist/agent/types.d.ts +36 -4
  68. package/dist/agent/types.d.ts.map +1 -1
  69. package/dist/agent/types.js.map +1 -1
  70. package/dist/api/graph-api.d.ts.map +1 -1
  71. package/dist/api/graph-api.js +15 -5
  72. package/dist/api/graph-api.js.map +1 -1
  73. package/dist/api/index.d.ts +10 -0
  74. package/dist/api/index.d.ts.map +1 -1
  75. package/dist/api/index.js +7 -16
  76. package/dist/api/index.js.map +1 -1
  77. package/dist/cli/commands/connector.d.ts +6 -1
  78. package/dist/cli/commands/connector.d.ts.map +1 -1
  79. package/dist/cli/commands/connector.js +61 -45
  80. package/dist/cli/commands/connector.js.map +1 -1
  81. package/dist/cli/commands/init.d.ts +1 -1
  82. package/dist/cli/commands/init.d.ts.map +1 -1
  83. package/dist/cli/commands/init.js +43 -10
  84. package/dist/cli/commands/init.js.map +1 -1
  85. package/dist/cli/commands/run.d.ts.map +1 -1
  86. package/dist/cli/commands/run.js +12 -0
  87. package/dist/cli/commands/run.js.map +1 -1
  88. package/dist/cli/commands/setup.d.ts +22 -0
  89. package/dist/cli/commands/setup.d.ts.map +1 -1
  90. package/dist/cli/commands/setup.js +79 -28
  91. package/dist/cli/commands/setup.js.map +1 -1
  92. package/dist/cli/commands/start.d.ts +13 -9
  93. package/dist/cli/commands/start.d.ts.map +1 -1
  94. package/dist/cli/commands/start.js +190 -97
  95. package/dist/cli/commands/start.js.map +1 -1
  96. package/dist/cli/commands/status.d.ts.map +1 -1
  97. package/dist/cli/commands/status.js +4 -0
  98. package/dist/cli/commands/status.js.map +1 -1
  99. package/dist/cli/config/config-manager.d.ts.map +1 -1
  100. package/dist/cli/config/config-manager.js +63 -14
  101. package/dist/cli/config/config-manager.js.map +1 -1
  102. package/dist/cli/config/types.d.ts +12 -5
  103. package/dist/cli/config/types.d.ts.map +1 -1
  104. package/dist/cli/config/types.js +3 -4
  105. package/dist/cli/config/types.js.map +1 -1
  106. package/dist/cli/index.js +6 -4
  107. package/dist/cli/index.js.map +1 -1
  108. package/dist/cli/runtime/agent-loop-init.d.ts +1 -1
  109. package/dist/cli/runtime/agent-loop-init.d.ts.map +1 -1
  110. package/dist/cli/runtime/agent-loop-init.js +8 -3
  111. package/dist/cli/runtime/agent-loop-init.js.map +1 -1
  112. package/dist/cli/runtime/api-routes-init.d.ts +38 -1
  113. package/dist/cli/runtime/api-routes-init.d.ts.map +1 -1
  114. package/dist/cli/runtime/api-routes-init.js +150 -30
  115. package/dist/cli/runtime/api-routes-init.js.map +1 -1
  116. package/dist/cli/runtime/api-server-init.d.ts +4 -0
  117. package/dist/cli/runtime/api-server-init.d.ts.map +1 -1
  118. package/dist/cli/runtime/api-server-init.js +3 -1
  119. package/dist/cli/runtime/api-server-init.js.map +1 -1
  120. package/dist/cli/runtime/connector-bootstrap.d.ts +8 -0
  121. package/dist/cli/runtime/connector-bootstrap.d.ts.map +1 -0
  122. package/dist/cli/runtime/connector-bootstrap.js +14 -0
  123. package/dist/cli/runtime/connector-bootstrap.js.map +1 -0
  124. package/dist/cli/runtime/connector-init.d.ts +4 -1
  125. package/dist/cli/runtime/connector-init.d.ts.map +1 -1
  126. package/dist/cli/runtime/connector-init.js +2 -8
  127. package/dist/cli/runtime/connector-init.js.map +1 -1
  128. package/dist/cli/runtime/envelope-bootstrap.d.ts +2 -1
  129. package/dist/cli/runtime/envelope-bootstrap.d.ts.map +1 -1
  130. package/dist/cli/runtime/envelope-bootstrap.js +7 -15
  131. package/dist/cli/runtime/envelope-bootstrap.js.map +1 -1
  132. package/dist/cli/runtime/gateway-init.d.ts +1 -1
  133. package/dist/cli/runtime/gateway-init.d.ts.map +1 -1
  134. package/dist/cli/runtime/gateway-init.js.map +1 -1
  135. package/dist/cli/runtime/mama-core-init.d.ts +10 -2
  136. package/dist/cli/runtime/mama-core-init.d.ts.map +1 -1
  137. package/dist/cli/runtime/mama-core-init.js +52 -68
  138. package/dist/cli/runtime/mama-core-init.js.map +1 -1
  139. package/dist/cli/runtime/memory-agent-init.d.ts.map +1 -1
  140. package/dist/cli/runtime/memory-agent-init.js +18 -5
  141. package/dist/cli/runtime/memory-agent-init.js.map +1 -1
  142. package/dist/cli/runtime/scheduler-init.d.ts +4 -0
  143. package/dist/cli/runtime/scheduler-init.d.ts.map +1 -1
  144. package/dist/cli/runtime/scheduler-init.js +24 -3
  145. package/dist/cli/runtime/scheduler-init.js.map +1 -1
  146. package/dist/cli/runtime/shutdown.d.ts +4 -0
  147. package/dist/cli/runtime/shutdown.d.ts.map +1 -1
  148. package/dist/cli/runtime/shutdown.js +30 -6
  149. package/dist/cli/runtime/shutdown.js.map +1 -1
  150. package/dist/cli/runtime/utilities.d.ts +2 -0
  151. package/dist/cli/runtime/utilities.d.ts.map +1 -1
  152. package/dist/cli/runtime/utilities.js +33 -0
  153. package/dist/cli/runtime/utilities.js.map +1 -1
  154. package/dist/connectors/index.d.ts +4 -1
  155. package/dist/connectors/index.d.ts.map +1 -1
  156. package/dist/connectors/index.js +3 -2
  157. package/dist/connectors/index.js.map +1 -1
  158. package/dist/connectors/private-connector-policy.d.ts +150 -0
  159. package/dist/connectors/private-connector-policy.d.ts.map +1 -0
  160. package/dist/connectors/private-connector-policy.js +289 -0
  161. package/dist/connectors/private-connector-policy.js.map +1 -0
  162. package/dist/connectors/private-prompt-overlay.d.ts +17 -0
  163. package/dist/connectors/private-prompt-overlay.d.ts.map +1 -0
  164. package/dist/connectors/private-prompt-overlay.js +156 -0
  165. package/dist/connectors/private-prompt-overlay.js.map +1 -0
  166. package/dist/db/migrations/operator-task-external-lifecycle.d.ts +8 -0
  167. package/dist/db/migrations/operator-task-external-lifecycle.d.ts.map +1 -0
  168. package/dist/db/migrations/operator-task-external-lifecycle.js +169 -0
  169. package/dist/db/migrations/operator-task-external-lifecycle.js.map +1 -0
  170. package/dist/envelope/enforcer.js +8 -7
  171. package/dist/envelope/enforcer.js.map +1 -1
  172. package/dist/envelope/reactive-config.d.ts.map +1 -1
  173. package/dist/envelope/reactive-config.js +2 -1
  174. package/dist/envelope/reactive-config.js.map +1 -1
  175. package/dist/envelope/tool-connector-scope.d.ts.map +1 -1
  176. package/dist/envelope/tool-connector-scope.js +4 -0
  177. package/dist/envelope/tool-connector-scope.js.map +1 -1
  178. package/dist/gateways/discord.d.ts.map +1 -1
  179. package/dist/gateways/discord.js +11 -6
  180. package/dist/gateways/discord.js.map +1 -1
  181. package/dist/gateways/image-analyzer.d.ts +5 -0
  182. package/dist/gateways/image-analyzer.d.ts.map +1 -1
  183. package/dist/gateways/image-analyzer.js +8 -0
  184. package/dist/gateways/image-analyzer.js.map +1 -1
  185. package/dist/gateways/message-router.d.ts +11 -1
  186. package/dist/gateways/message-router.d.ts.map +1 -1
  187. package/dist/gateways/message-router.js +146 -52
  188. package/dist/gateways/message-router.js.map +1 -1
  189. package/dist/gateways/slack.d.ts.map +1 -1
  190. package/dist/gateways/slack.js +6 -2
  191. package/dist/gateways/slack.js.map +1 -1
  192. package/dist/gateways/telegram-message-ledger.d.ts +8 -1
  193. package/dist/gateways/telegram-message-ledger.d.ts.map +1 -1
  194. package/dist/gateways/telegram-message-ledger.js +141 -24
  195. package/dist/gateways/telegram-message-ledger.js.map +1 -1
  196. package/dist/gateways/telegram.d.ts +2 -0
  197. package/dist/gateways/telegram.d.ts.map +1 -1
  198. package/dist/gateways/telegram.js +19 -12
  199. package/dist/gateways/telegram.js.map +1 -1
  200. package/dist/gateways/types.d.ts +1 -1
  201. package/dist/gateways/types.d.ts.map +1 -1
  202. package/dist/index.d.ts +1 -1
  203. package/dist/index.js +1 -1
  204. package/dist/multi-agent/agent-process-manager.d.ts +14 -4
  205. package/dist/multi-agent/agent-process-manager.d.ts.map +1 -1
  206. package/dist/multi-agent/agent-process-manager.js +144 -47
  207. package/dist/multi-agent/agent-process-manager.js.map +1 -1
  208. package/dist/multi-agent/dashboard-agent-persona.d.ts +3 -3
  209. package/dist/multi-agent/dashboard-agent-persona.d.ts.map +1 -1
  210. package/dist/multi-agent/dashboard-agent-persona.js +10 -13
  211. package/dist/multi-agent/dashboard-agent-persona.js.map +1 -1
  212. package/dist/multi-agent/memory-agent-persona.d.ts +1 -1
  213. package/dist/multi-agent/memory-agent-persona.d.ts.map +1 -1
  214. package/dist/multi-agent/memory-agent-persona.js +1 -1
  215. package/dist/multi-agent/runtime-process.d.ts +3 -0
  216. package/dist/multi-agent/runtime-process.d.ts.map +1 -1
  217. package/dist/multi-agent/runtime-process.js +10 -2
  218. package/dist/multi-agent/runtime-process.js.map +1 -1
  219. package/dist/multi-agent/types.d.ts +12 -2
  220. package/dist/multi-agent/types.d.ts.map +1 -1
  221. package/dist/multi-agent/types.js.map +1 -1
  222. package/dist/multi-agent/wiki-agent-persona.d.ts +2 -2
  223. package/dist/multi-agent/wiki-agent-persona.js +2 -2
  224. package/dist/multi-agent/workflow-types.d.ts +1 -1
  225. package/dist/multi-agent/workflow-types.d.ts.map +1 -1
  226. package/dist/onboarding/complete-autonomous-prompt.d.ts +1 -1
  227. package/dist/onboarding/complete-autonomous-prompt.d.ts.map +1 -1
  228. package/dist/onboarding/complete-autonomous-prompt.js +9 -9
  229. package/dist/operator/board-slot-instructions.d.ts +1 -1
  230. package/dist/operator/board-slot-instructions.js +2 -2
  231. package/dist/operator/board-slot-instructions.js.map +1 -1
  232. package/dist/operator/briefs.d.ts +3 -0
  233. package/dist/operator/briefs.d.ts.map +1 -1
  234. package/dist/operator/briefs.js +64 -3
  235. package/dist/operator/briefs.js.map +1 -1
  236. package/dist/operator/console-brief.d.ts +6 -3
  237. package/dist/operator/console-brief.d.ts.map +1 -1
  238. package/dist/operator/console-brief.js +39 -9
  239. package/dist/operator/console-brief.js.map +1 -1
  240. package/dist/operator/external-lifecycle-candidates.d.ts +56 -0
  241. package/dist/operator/external-lifecycle-candidates.d.ts.map +1 -0
  242. package/dist/operator/external-lifecycle-candidates.js +415 -0
  243. package/dist/operator/external-lifecycle-candidates.js.map +1 -0
  244. package/dist/operator/external-lifecycle.d.ts +82 -0
  245. package/dist/operator/external-lifecycle.d.ts.map +1 -0
  246. package/dist/operator/external-lifecycle.js +27 -0
  247. package/dist/operator/external-lifecycle.js.map +1 -0
  248. package/dist/operator/file-coordination.d.ts +7 -0
  249. package/dist/operator/file-coordination.d.ts.map +1 -0
  250. package/dist/operator/file-coordination.js +84 -0
  251. package/dist/operator/file-coordination.js.map +1 -0
  252. package/dist/operator/operator-trigger-loop.d.ts +19 -4
  253. package/dist/operator/operator-trigger-loop.d.ts.map +1 -1
  254. package/dist/operator/operator-trigger-loop.js +151 -23
  255. package/dist/operator/operator-trigger-loop.js.map +1 -1
  256. package/dist/operator/pending-report-store.d.ts +62 -3
  257. package/dist/operator/pending-report-store.d.ts.map +1 -1
  258. package/dist/operator/pending-report-store.js +297 -40
  259. package/dist/operator/pending-report-store.js.map +1 -1
  260. package/dist/operator/report-carry-delivery.d.ts +35 -0
  261. package/dist/operator/report-carry-delivery.d.ts.map +1 -0
  262. package/dist/operator/report-carry-delivery.js +55 -0
  263. package/dist/operator/report-carry-delivery.js.map +1 -0
  264. package/dist/operator/report-carry.d.ts +50 -30
  265. package/dist/operator/report-carry.d.ts.map +1 -1
  266. package/dist/operator/report-carry.js +323 -71
  267. package/dist/operator/report-carry.js.map +1 -1
  268. package/dist/operator/situation-report.d.ts +30 -11
  269. package/dist/operator/situation-report.d.ts.map +1 -1
  270. package/dist/operator/situation-report.js +79 -35
  271. package/dist/operator/situation-report.js.map +1 -1
  272. package/dist/operator/task-ledger.d.ts +101 -0
  273. package/dist/operator/task-ledger.d.ts.map +1 -1
  274. package/dist/operator/task-ledger.js +599 -124
  275. package/dist/operator/task-ledger.js.map +1 -1
  276. package/dist/operator/temporal-runtime.d.ts.map +1 -1
  277. package/dist/operator/temporal-runtime.js +3 -1
  278. package/dist/operator/temporal-runtime.js.map +1 -1
  279. package/dist/operator/temporal-worker.js +1 -1
  280. package/dist/operator/trigger-author.d.ts +13 -1
  281. package/dist/operator/trigger-author.d.ts.map +1 -1
  282. package/dist/operator/trigger-author.js +35 -0
  283. package/dist/operator/trigger-author.js.map +1 -1
  284. package/dist/operator/worker-run.d.ts +1 -1
  285. package/dist/operator/worker-run.d.ts.map +1 -1
  286. package/dist/operator/worker-run.js +27 -9
  287. package/dist/operator/worker-run.js.map +1 -1
  288. package/dist/operator/workorder-consumer.d.ts +12 -1
  289. package/dist/operator/workorder-consumer.d.ts.map +1 -1
  290. package/dist/operator/workorder-consumer.js +125 -6
  291. package/dist/operator/workorder-consumer.js.map +1 -1
  292. package/dist/operator/workorder-hooks.d.ts +7 -2
  293. package/dist/operator/workorder-hooks.d.ts.map +1 -1
  294. package/dist/operator/workorder-hooks.js +22 -0
  295. package/dist/operator/workorder-hooks.js.map +1 -1
  296. package/dist/operator/workorder-publishers.d.ts +9 -2
  297. package/dist/operator/workorder-publishers.d.ts.map +1 -1
  298. package/dist/operator/workorder-publishers.js +167 -5
  299. package/dist/operator/workorder-publishers.js.map +1 -1
  300. package/dist/scheduler/cron-worker.d.ts +8 -4
  301. package/dist/scheduler/cron-worker.d.ts.map +1 -1
  302. package/dist/scheduler/cron-worker.js +56 -39
  303. package/dist/scheduler/cron-worker.js.map +1 -1
  304. package/dist/setup/setup-actions.d.ts +26 -0
  305. package/dist/setup/setup-actions.d.ts.map +1 -0
  306. package/dist/setup/setup-actions.js +371 -0
  307. package/dist/setup/setup-actions.js.map +1 -0
  308. package/dist/setup/setup-prompt.d.ts +1 -1
  309. package/dist/setup/setup-prompt.d.ts.map +1 -1
  310. package/dist/setup/setup-prompt.js +28 -33
  311. package/dist/setup/setup-prompt.js.map +1 -1
  312. package/dist/setup/setup-server.d.ts +6 -1
  313. package/dist/setup/setup-server.d.ts.map +1 -1
  314. package/dist/setup/setup-server.js +55 -9
  315. package/dist/setup/setup-server.js.map +1 -1
  316. package/dist/setup/setup-websocket.d.ts +14 -2
  317. package/dist/setup/setup-websocket.d.ts.map +1 -1
  318. package/dist/setup/setup-websocket.js +121 -37
  319. package/dist/setup/setup-websocket.js.map +1 -1
  320. package/package.json +2 -2
  321. package/public/setup.html +9 -6
  322. package/public/viewer/js/modules/agents.js +5 -4
  323. package/public/viewer/js/modules/settings.js +34 -10
  324. package/public/viewer/src/modules/agents.ts +5 -4
  325. package/public/viewer/src/modules/settings.ts +49 -11
  326. package/public/viewer/src/utils/api.ts +3 -2
  327. package/scripts/generate-gateway-tools.ts +13 -3
@@ -63,7 +63,8 @@ const session_pool_js_1 = require("../agent/session-pool.js");
63
63
  const agent_loop_js_1 = require("../agent/agent-loop.js");
64
64
  const console_brief_js_1 = require("../operator/console-brief.js");
65
65
  const role_manager_js_1 = require("../agent/role-manager.js");
66
- const tool_registry_js_1 = require("../agent/tool-registry.js");
66
+ const gateway_tool_catalog_js_1 = require("../agent/gateway-tool-catalog.js");
67
+ const private_prompt_overlay_js_1 = require("../connectors/private-prompt-overlay.js");
67
68
  const context_prompt_builder_js_1 = require("../agent/context-prompt-builder.js");
68
69
  const prompt_enhancer_js_1 = require("../agent/prompt-enhancer.js");
69
70
  const debugLogger = __importStar(require("@jungjaehoon/mama-core/debug-logger"));
@@ -74,11 +75,16 @@ const recall_bundle_formatter_js_1 = require("../memory/recall-bundle-formatter.
74
75
  const save_candidate_extractor_js_1 = require("../memory/save-candidate-extractor.js");
75
76
  const untrusted_content_js_1 = require("../utils/untrusted-content.js");
76
77
  const security_monitor_js_1 = require("../security/security-monitor.js");
77
- const report_carry_js_1 = require("../operator/report-carry.js");
78
78
  const agent_store_js_1 = require("../db/agent-store.js");
79
79
  const reactive_config_js_1 = require("../envelope/reactive-config.js");
80
+ const private_connector_policy_js_1 = require("../connectors/private-connector-policy.js");
80
81
  const { DebugLogger } = debugLogger;
81
82
  const logger = new DebugLogger('MessageRouter');
83
+ const DEFAULT_PRIVATE_CONNECTOR_POLICY = (0, private_connector_policy_js_1.resolvePrivateConnectorPolicy)({
84
+ ok: true,
85
+ config: {},
86
+ enabledNames: [],
87
+ });
82
88
  /**
83
89
  * The owner's message, as the cause of whatever the turn it started changes.
84
90
  *
@@ -158,7 +164,7 @@ function hashSessionPolicyFingerprint({ baseInstructions, agentsContent, rulesCo
158
164
  }
159
165
  return hash.digest('hex');
160
166
  }
161
- function buildStableRolePolicyInstructions(agentContext, roleManager, trelloAvailable, options = {}) {
167
+ function buildStableRolePolicyInstructions(agentContext, roleManager, trelloAvailable, privateConnectorPolicy, options = {}) {
162
168
  if (agentContext.roleName !== 'owner_console') {
163
169
  return '';
164
170
  }
@@ -166,9 +172,12 @@ function buildStableRolePolicyInstructions(agentContext, roleManager, trelloAvai
166
172
  const trelloBoundary = trelloAvailable && roleManager.isToolAllowed(agentContext.role, 'context_compile')
167
173
  ? `
168
174
  - ${untrusted_content_js_1.UNTRUSTED_EXTERNAL_EVIDENCE_INSTRUCTION}
169
- - Trello is separate external connector evidence and is available only through context_compile. When intentionally isolating Trello evidence, use context_compile({ task: "...", connectors: ['trello'] }); never claim that kagemusha_* is Trello or substitute one store for the other.`
175
+ - Trello is separate external connector evidence and is available only through context_compile. When intentionally isolating Trello evidence, use context_compile({ task: "...", connectors: ['trello'] }); never claim that one store is another or substitute lifecycle state across stores.`
176
+ : '';
177
+ const privateStoreBoundary = privateConnectorPolicy.enabledPrivateConnectors.length > 0
178
+ ? '\n- Private connector task tools are read-only evidence. Keep their lifecycle state separate from the native task board.'
170
179
  : '';
171
- const evidencePolicy = `- Task-store canonicity: kagemusha_* is the READ-ONLY project-task truth; the task board (task_list/task_create/task_update) is the tracker YOU maintain - the owner only views it. Their status vocabularies DIFFER (e.g. kagemusha has no 'blocked') - when a status query returns nothing, say the vocabulary difference instead of inferring the work is gone.${trelloBoundary}
180
+ const evidencePolicy = `- Task-store canonicity: the task board (task_list/task_create/task_update) is the tracker YOU maintain for the owner. Every external store remains separate evidence; never copy or infer lifecycle state across stores.${privateStoreBoundary}${trelloBoundary}
172
181
  - Answer status questions from artifacts first (board_read, workorder_status, audit_findings_read), then live queries; memory recall is the LAST resort and may be stale - cite which source answered.`;
173
182
  return includeOperatingDiscipline
174
183
  ? `${evidencePolicy}\n\n${OWNER_CONSOLE_OPERATING_DISCIPLINE}`
@@ -219,7 +228,7 @@ const KOREAN_TARGETS = new Set(['korean', '한국어']);
219
228
  const VIEWER_CONTEXT_AGENT_LIST_LIMIT = 5;
220
229
  const VIEWER_CONTEXT_ALERT_LIMIT = 3;
221
230
  const REACTIVE_ENVELOPE_EXPIRY_MULTIPLIER = 4;
222
- function buildReactiveEnvelopeInput(message, config) {
231
+ function buildReactiveEnvelopeInput(message, config, surface, privateConnectorPolicy) {
223
232
  const policy = (0, reactive_config_js_1.getReactiveRoutePolicy)(message, config);
224
233
  return {
225
234
  agent_id: 'worker',
@@ -229,7 +238,9 @@ function buildReactiveEnvelopeInput(message, config) {
229
238
  trigger_context: { user_text: message.text },
230
239
  scope: {
231
240
  project_refs: policy.projectRefs,
232
- raw_connectors: policy.rawConnectors,
241
+ raw_connectors: [
242
+ ...privateConnectorPolicy.projectRawConnectors(surface, policy.rawConnectors),
243
+ ],
233
244
  // Identity scopes only - the grant mirror is an enforcement-layer READ
234
245
  // allowance, never issued into the envelope (PR #217 review: issuing it
235
246
  // here widened this chat's raw narrowing back to every sibling channel
@@ -308,6 +319,8 @@ class MessageRouter {
308
319
  config;
309
320
  envelopeConfig;
310
321
  envelopeAuthority;
322
+ privateConnectorPolicy;
323
+ reportCarry;
311
324
  roleManager;
312
325
  promptEnhancer;
313
326
  gatewayRegistry = null;
@@ -493,12 +506,15 @@ class MessageRouter {
493
506
  };
494
507
  return this.memoryAuditQueue.enqueue(auditJob);
495
508
  }
496
- constructor(sessionStore, agentLoop, mamaApi, config = {}, envelopeConfig, envelopeAuthority) {
509
+ constructor(sessionStore, agentLoop, mamaApi, config = {}, envelopeConfig, envelopeAuthority, dependencies = {}) {
497
510
  this.sessionStore = sessionStore;
498
511
  this.agentLoop = agentLoop;
499
512
  this.mamaApi = mamaApi;
500
513
  this.envelopeConfig = envelopeConfig;
501
514
  this.envelopeAuthority = envelopeAuthority;
515
+ this.privateConnectorPolicy =
516
+ dependencies.privateConnectorPolicy ?? DEFAULT_PRIVATE_CONNECTOR_POLICY;
517
+ this.reportCarry = dependencies.reportCarry;
502
518
  if (this.envelopeConfig && !this.envelopeAuthority) {
503
519
  throw new Error('[envelope] ReactiveEnvelopeConfig provided without EnvelopeAuthority');
504
520
  }
@@ -522,13 +538,14 @@ class MessageRouter {
522
538
  maxDecisions: this.config.maxDecisions,
523
539
  });
524
540
  }
525
- buildReactiveEnvelope(message) {
541
+ buildReactiveEnvelope(message, agentContext) {
526
542
  const config = this.envelopeConfig;
527
543
  const authority = this.envelopeAuthority;
528
544
  if (!config || !authority) {
529
545
  return undefined;
530
546
  }
531
- return authority.buildAndPersist(buildReactiveEnvelopeInput(message, config));
547
+ const surface = (0, private_connector_policy_js_1.resolvePrivatePrincipalSurface)({ agentContext });
548
+ return authority.buildAndPersist(buildReactiveEnvelopeInput(message, config, surface, this.privateConnectorPolicy));
532
549
  }
533
550
  /**
534
551
  * Create AgentContext for a message
@@ -541,9 +558,15 @@ class MessageRouter {
541
558
  channelId: message.channelId,
542
559
  chatType: typeof message.metadata?.chatType === 'string' ? message.metadata.chatType : undefined,
543
560
  });
544
- const capabilities = this.roleManager.getCapabilities(role);
545
- const limitations = this.roleManager.getLimitations(role);
546
- const ctx = (0, context_prompt_builder_js_1.createAgentContext)(message.source, roleName, role, {
561
+ const surface = roleName === 'owner_console'
562
+ ? 'owner_console'
563
+ : roleName === 'os_agent'
564
+ ? 'os_agent'
565
+ : 'multi-agent-generic';
566
+ const projectedRole = this.privateConnectorPolicy.projectRole(surface, role);
567
+ const capabilities = this.roleManager.getCapabilities(projectedRole);
568
+ const limitations = this.roleManager.getLimitations(projectedRole);
569
+ const ctx = (0, context_prompt_builder_js_1.createAgentContext)(message.source, roleName, projectedRole, {
547
570
  sessionId,
548
571
  channelId: message.channelId,
549
572
  userId: message.userId,
@@ -726,6 +749,15 @@ This protects your credentials from being exposed in chat logs.`;
726
749
  };
727
750
  try {
728
751
  const agentContext = this.createAgentContext(message, session.id);
752
+ const reportCarryTarget = agentContext.roleName === 'owner_console' && message.source === 'telegram'
753
+ ? { source: message.source, channelId: message.channelId }
754
+ : null;
755
+ const reportCarryChannelKey = reportCarryTarget
756
+ ? (0, session_pool_js_1.buildChannelKey)(reportCarryTarget.source, reportCarryTarget.channelId)
757
+ : null;
758
+ const reportCarryPeek = reportCarryTarget
759
+ ? (this.reportCarry?.peek(reportCarryTarget) ?? null)
760
+ : null;
729
761
  const mediaInstructions = buildUploadedMediaInstructions(message, agentContext.role.allowedTools, agentContext.roleName === 'owner_console');
730
762
  // Save user message immediately for crash/refresh resilience
731
763
  this.sessionStore.appendMessage(session.id, {
@@ -751,22 +783,26 @@ This protects your credentials from being exposed in chat logs.`;
751
783
  ? { agentId: agentContext.roleName, channelId: message.channelId }
752
784
  : undefined;
753
785
  const enhanced = await this.promptEnhancer.enhance(message.text, workspacePath, ruleContext);
754
- // CONTINUE: skip expensive embedding search — Codex retains full conversation via threadId
786
+ // TG-05: every main backend keeps its live conversation in a durable
787
+ // runtime session. Only a genuinely new/replacement session rebuilds
788
+ // bounded MAMA context.
789
+ const needsFullContext = isNewCliSession;
790
+ // Persistent backends skip repeated retrieval after the first turn.
755
791
  context =
756
- isNewCliSession && this.config.implicitLegacyContextSearch
792
+ needsFullContext && this.config.implicitLegacyContextSearch
757
793
  ? await this.contextInjector.getRelevantContext(message.text)
758
794
  : { prompt: '', decisions: [], hasContext: false };
759
- if (!isNewCliSession) {
795
+ if (!needsFullContext) {
760
796
  systemPrompt = '';
761
797
  logger.info('CONTINUE turn: skipping context injection');
762
798
  }
763
799
  else {
764
- // NEW session: full prompt build
800
+ // New persistent session: full prompt build.
765
801
  const sessionStartupContext = await this.contextInjector.getSessionStartupContext({
766
802
  source: message.source,
767
803
  channelId: message.channelId,
768
804
  });
769
- systemPrompt = this.buildSystemPrompt(session, context.prompt, historyContext, sessionStartupContext, agentContext, enhanced, isNewCliSession, trelloAvailable);
805
+ systemPrompt = this.buildSystemPrompt(session, context.prompt, historyContext, sessionStartupContext, agentContext, enhanced, true, trelloAvailable);
770
806
  }
771
807
  // 7. Run agent loop (with session info for lane-based concurrency)
772
808
  const roleModel = agentContext.role.model;
@@ -779,6 +815,9 @@ This protects your credentials from being exposed in chat logs.`;
779
815
  ' Codex: codex login → roles.definitions.' +
780
816
  agentContext.roleName +
781
817
  '.model: gpt-5.4\n\n' +
818
+ ' Cline: cline auth cline → roles.definitions.' +
819
+ agentContext.roleName +
820
+ '.model: deepseek/deepseek-v4-flash\n\n' +
782
821
  'Or run: mama init --reconfigure');
783
822
  }
784
823
  const roleMaxTurns = agentContext.role.maxTurns;
@@ -833,7 +872,7 @@ This protects your credentials from being exposed in chat logs.`;
833
872
  let pendingNotices = false;
834
873
  let pendingChannelNoticeCount = 0;
835
874
  let pendingBroadcastNoticeCount = 0;
836
- const envelope = this.buildReactiveEnvelope(message);
875
+ const envelope = this.buildReactiveEnvelope(message, agentContext);
837
876
  const options = {
838
877
  systemPrompt: effectivePrompt,
839
878
  sessionPolicyFingerprint,
@@ -866,7 +905,7 @@ This protects your credentials from being exposed in chat logs.`;
866
905
  // citation this ledger exists to refuse.
867
906
  ...(causeFromOwnerMessage(sourceTurnId, sourceMessageRef) ?? {}),
868
907
  };
869
- if (this.config.backend === 'codex' && shouldResume) {
908
+ if ((this.config.backend === 'codex' || this.config.backend === 'cline') && shouldResume) {
870
909
  options.freshSessionSystemPrompt = async () => {
871
910
  const freshContext = this.config.implicitLegacyContextSearch
872
911
  ? await this.contextInjector.getRelevantContext(message.text)
@@ -884,11 +923,9 @@ This protects your credentials from being exposed in chat logs.`;
884
923
  else {
885
924
  logger.info(`New CLI session (full: ${systemPrompt.length} chars)`);
886
925
  }
887
- // Context carry (plan v6 S1-T4): owner console turns reference the last
888
- // DELIVERED full report. User-message prefix is the only channel that
889
- // reaches the model on EVERY turn including CONTINUE (per-call system
890
- // prompts never reach a pooled CLI process).
891
- const carryPrefix = agentContext?.roleName === 'owner_console' ? (0, report_carry_js_1.buildReportCarryPrefix)() : '';
926
+ // TG-05/TG-06: carry is captured once before the model call and travels
927
+ // only in this turn's user message, never in a rebuilt system prompt.
928
+ const carryPrefix = reportCarryPeek?.prefix ?? '';
892
929
  try {
893
930
  if (shouldResume) {
894
931
  // Per-channel notices PLUS the operator broadcast key: host-code
@@ -968,8 +1005,10 @@ This protects your credentials from being exposed in chat logs.`;
968
1005
  if (effectiveMessageText) {
969
1006
  contentBlocks.push({ type: 'text', text: effectiveMessageText });
970
1007
  }
971
- // Pre-analyze images via shared ImageAnalyzer
972
- if (hasImages) {
1008
+ // Claude uses its direct vision client. Durable Codex/Cline runtimes
1009
+ // receive the original image block and inspect the private workspace
1010
+ // media through their own native path, avoiding hidden Claude auth.
1011
+ if (hasImages && this.config.backend === 'claude') {
973
1012
  const { getImageAnalyzer } = await import('./image-analyzer.js');
974
1013
  const analysisText = protectImageAnalysis(message, await getImageAnalyzer().processContentBlocks(message.contentBlocks));
975
1014
  contentBlocks.length = 0;
@@ -983,6 +1022,9 @@ This protects your credentials from being exposed in chat logs.`;
983
1022
  if (block.type === 'text' && block.text) {
984
1023
  contentBlocks.push(block);
985
1024
  }
1025
+ else if (block.type === 'image') {
1026
+ contentBlocks.push(block);
1027
+ }
986
1028
  }
987
1029
  if (mediaInstructions) {
988
1030
  contentBlocks.push({
@@ -1052,9 +1094,11 @@ This protects your credentials from being exposed in chat logs.`;
1052
1094
  this.logAgentActivity(this.resolveFrontdoorAgentId(message), 'task_error', message.text?.slice(0, 200), undefined, durationMs, error instanceof Error ? error.message : String(error));
1053
1095
  // CLI timeout or resume failure - invalidate session to force fresh start next time
1054
1096
  const errorMsg = error instanceof Error ? error.message : String(error);
1055
- const isCriticalError = errorMsg.includes('timeout') ||
1056
- errorMsg.includes('resume') ||
1057
- errorMsg.includes('exited with code');
1097
+ const normalizedErrorMsg = errorMsg.toLowerCase();
1098
+ const isCriticalError = normalizedErrorMsg.includes('timeout') ||
1099
+ normalizedErrorMsg.includes('timed out') ||
1100
+ normalizedErrorMsg.includes('resume') ||
1101
+ normalizedErrorMsg.includes('exited with code');
1058
1102
  if (isCriticalError) {
1059
1103
  logger.warn(`CLI error detected, invalidating session: ${errorMsg}`);
1060
1104
  sessionPool.invalidateSession(channelKey, cliSessionId);
@@ -1105,13 +1149,27 @@ This protects your credentials from being exposed in chat logs.`;
1105
1149
  // 6. Update session context — finalize assistant response
1106
1150
  // Use flushStreamingResponse first (updates existing turn from periodic flush),
1107
1151
  // fall back to appendMessage if no turn exists yet (non-streaming path)
1108
- const flushed = this.sessionStore.flushStreamingResponse(session.id, response);
1109
- if (!flushed) {
1152
+ const persisted = this.sessionStore.flushStreamingResponse(session.id, response) ||
1110
1153
  this.sessionStore.appendMessage(session.id, {
1111
1154
  role: 'assistant',
1112
1155
  content: response,
1113
1156
  timestamp: Date.now(),
1114
1157
  });
1158
+ if (!persisted) {
1159
+ throw new Error('Unable to persist final assistant response');
1160
+ }
1161
+ if (reportCarryPeek && reportCarryTarget && reportCarryChannelKey) {
1162
+ try {
1163
+ this.reportCarry?.acknowledge({
1164
+ deliveryId: reportCarryPeek.deliveryId,
1165
+ target: reportCarryTarget,
1166
+ consumingChannelKey: reportCarryChannelKey,
1167
+ consumedAtIso: new Date().toISOString(),
1168
+ });
1169
+ }
1170
+ catch (error) {
1171
+ logger.warn(`[report-carry] acknowledgement failed: ${error instanceof Error ? error.message : String(error)}`);
1172
+ }
1115
1173
  }
1116
1174
  // Release session lock AFTER final persistence to prevent out-of-order turns
1117
1175
  releaseCliSessionLock();
@@ -1149,19 +1207,42 @@ This protects your credentials from being exposed in chat logs.`;
1149
1207
  const isOnboarding = !(0, node_fs_1.existsSync)(soulPath);
1150
1208
  // Hoist session history — reuse across onboarding check and prompt build
1151
1209
  const sessionHistory = this.sessionStore.formatContextForPrompt(session.id);
1210
+ const surface = agentContext
1211
+ ? (0, private_connector_policy_js_1.resolvePrivatePrincipalSurface)({ agentContext })
1212
+ : 'multi-agent-generic';
1213
+ const gatewayCatalog = agentContext
1214
+ ? (0, gateway_tool_catalog_js_1.buildGatewayToolCatalog)({
1215
+ surface,
1216
+ allowedTools: agentContext.role.allowedTools,
1217
+ blockedTools: agentContext.role.blockedTools,
1218
+ privateConnectorPolicy: this.privateConnectorPolicy,
1219
+ })
1220
+ : null;
1221
+ const durableNativeBackend = this.config.backend === 'codex' || this.config.backend === 'cline';
1222
+ const privatePolicyPrompt = durableNativeBackend && surface === 'owner_console'
1223
+ ? (0, console_brief_js_1.projectConsoleBriefForPrompt)('', this.privateConnectorPolicy).trim()
1224
+ : '';
1152
1225
  const stableRolePolicy = agentContext
1153
- ? buildStableRolePolicyInstructions(agentContext, this.roleManager, trelloAvailable)
1226
+ ? [
1227
+ buildStableRolePolicyInstructions(agentContext, this.roleManager, trelloAvailable, this.privateConnectorPolicy),
1228
+ privatePolicyPrompt,
1229
+ ]
1230
+ .filter(Boolean)
1231
+ .join('\n\n')
1154
1232
  : '';
1155
1233
  // Onboarding is guided first contact, not operator duty. The awakening persona asks the
1156
1234
  // user's name and runs a personality quiz; ordering it to gather via gateway tools and
1157
1235
  // execute multi-step work would fight that flow and aim it at connectors that do not
1158
1236
  // exist yet. Evidence policy still travels; the operating posture does not.
1159
1237
  const onboardingRolePolicy = agentContext
1160
- ? buildStableRolePolicyInstructions(agentContext, this.roleManager, trelloAvailable, {
1161
- includeOperatingDiscipline: false,
1162
- })
1238
+ ? [
1239
+ buildStableRolePolicyInstructions(agentContext, this.roleManager, trelloAvailable, this.privateConnectorPolicy, { includeOperatingDiscipline: false }),
1240
+ privatePolicyPrompt,
1241
+ ]
1242
+ .filter(Boolean)
1243
+ .join('\n\n')
1163
1244
  : '';
1164
- const appendOnboardingRolePolicy = (basePrompt) => onboardingRolePolicy ? `${basePrompt}\n\n${onboardingRolePolicy}\n` : basePrompt;
1245
+ const appendOnboardingRolePolicy = (basePrompt) => this.projectPrivatePromptText(onboardingRolePolicy ? `${basePrompt}\n\n${onboardingRolePolicy}\n` : basePrompt);
1165
1246
  if (isOnboarding) {
1166
1247
  // Check if we have existing conversation
1167
1248
  const hasHistory = sessionHistory && sessionHistory !== 'New conversation';
@@ -1284,7 +1365,10 @@ ${historyContext}
1284
1365
  if (agentContext.roleName === 'owner_console') {
1285
1366
  const consoleBrief = (0, console_brief_js_1.loadConsoleBrief)();
1286
1367
  if (consoleBrief.trim()) {
1287
- prompt += `\n\n${consoleBrief.trim()}\n`;
1368
+ const projectedBrief = (0, console_brief_js_1.projectConsoleBriefForPrompt)(consoleBrief, this.privateConnectorPolicy);
1369
+ prompt += `\n\n${((gatewayCatalog && !durableNativeBackend) || privatePolicyPrompt
1370
+ ? (0, private_prompt_overlay_js_1.stripMarkedPrivatePromptOverlays)(projectedBrief)
1371
+ : projectedBrief).trim()}\n`;
1288
1372
  }
1289
1373
  }
1290
1374
  }
@@ -1297,38 +1381,48 @@ ${historyContext}
1297
1381
  // See process() method for user-message injection.
1298
1382
  // Include gateway tools directly in system prompt (priority 1 protection)
1299
1383
  // so they don't get truncated by PromptSizeMonitor as a separate layer.
1300
- // Prompt-permission coherence: advertise ONLY the tools this role can
1301
- // execute - the previous role-agnostic single cache advertised the full
1302
- // catalog, teaching the model to call tools the executor then denied.
1303
- // getGatewayToolsPrompt keeps its own per-disallowed-key cache, and its
1304
- // per-bullet filter preserves the '## Gateway Tools' marker - AgentLoop
1305
- // must keep seeing that marker or it double-injects an UNFILTERED catalog
1306
- // (agent-loop alreadyHasTools check).
1307
- const disallowedForRole = agentContext
1308
- ? tool_registry_js_1.ToolRegistry.getValidToolNames().filter((name) => !this.roleManager.isToolAllowed(agentContext.role, name))
1309
- : undefined;
1310
- const gatewayToolsPrompt = this.config.backend === 'codex' ? '' : (0, agent_loop_js_1.getGatewayToolsPrompt)(disallowedForRole) || '';
1384
+ // Prompt-permission coherence: the policy-keyed catalog is generated from
1385
+ // the final exact role projection, so cached private text cannot cross a
1386
+ // connector-policy or principal boundary.
1387
+ const gatewayToolsPrompt = durableNativeBackend ? '' : (gatewayCatalog?.prompt ?? '');
1311
1388
  if (gatewayToolsPrompt) {
1312
1389
  prompt += `\n---\n\n${gatewayToolsPrompt}\n`;
1313
1390
  }
1314
- return prompt;
1391
+ return this.projectPrivatePromptText(prompt);
1315
1392
  }
1316
1393
  buildSessionPolicyFingerprint(agentContext, enhanced, model, trelloAvailable) {
1317
1394
  const soulPath = (0, node_path_1.join)((0, node_os_1.homedir)(), '.mama', 'SOUL.md');
1318
1395
  const baseInstructions = (0, node_fs_1.existsSync)(soulPath)
1319
1396
  ? (0, agent_loop_js_1.loadComposedSystemPrompt)(false, agentContext)
1320
1397
  : complete_autonomous_prompt_js_1.COMPLETE_AUTONOMOUS_PROMPT;
1398
+ const surface = (0, private_connector_policy_js_1.resolvePrivatePrincipalSurface)({ agentContext });
1399
+ const gatewayCatalog = (0, gateway_tool_catalog_js_1.buildGatewayToolCatalog)({
1400
+ surface,
1401
+ allowedTools: agentContext.role.allowedTools,
1402
+ blockedTools: agentContext.role.blockedTools,
1403
+ privateConnectorPolicy: this.privateConnectorPolicy,
1404
+ });
1321
1405
  return hashSessionPolicyFingerprint({
1322
1406
  baseInstructions,
1323
1407
  agentsContent: enhanced.agentsContent,
1324
1408
  rulesContent: enhanced.rulesContent,
1325
1409
  model,
1326
- stableRolePolicy: buildStableRolePolicyInstructions(agentContext, this.roleManager, trelloAvailable) +
1410
+ stableRolePolicy: buildStableRolePolicyInstructions(agentContext, this.roleManager, trelloAvailable, this.privateConnectorPolicy) +
1327
1411
  // Brief edits must rotate the durable-session policy (re-anchor carries
1328
1412
  // the new manual); non-owner roles contribute an empty string.
1329
- (agentContext.roleName === 'owner_console' ? `\n${(0, console_brief_js_1.loadConsoleBrief)()}` : ''),
1413
+ (agentContext.roleName === 'owner_console'
1414
+ ? `\n${(0, console_brief_js_1.projectConsoleBriefForPrompt)((0, console_brief_js_1.loadConsoleBrief)(), this.privateConnectorPolicy)}`
1415
+ : '') +
1416
+ `\n${gatewayCatalog.cacheKey}`,
1330
1417
  });
1331
1418
  }
1419
+ /** Remove only a complete, structurally valid host-generated private overlay. */
1420
+ projectPrivatePromptText(prompt) {
1421
+ if (this.privateConnectorPolicy.enabledPrivateConnectors.length > 0) {
1422
+ return prompt;
1423
+ }
1424
+ return (0, private_prompt_overlay_js_1.stripMarkedPrivatePromptOverlays)(prompt);
1425
+ }
1332
1426
  /**
1333
1427
  * Build minimal prompt for resumed CLI sessions.
1334
1428
  * CLI already has full system prompt from initial request.