@vascend/talos 0.1.0

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 (620) hide show
  1. package/README.md +202 -0
  2. package/dist/backend/asset-events.d.ts +31 -0
  3. package/dist/backend/asset-events.js +149 -0
  4. package/dist/backend/assets.d.ts +31 -0
  5. package/dist/backend/assets.js +210 -0
  6. package/dist/backend/auth.d.ts +18 -0
  7. package/dist/backend/auth.js +59 -0
  8. package/dist/backend/config.d.ts +14 -0
  9. package/dist/backend/config.js +41 -0
  10. package/dist/backend/conversations.d.ts +21 -0
  11. package/dist/backend/conversations.js +141 -0
  12. package/dist/backend/crypto.d.ts +9 -0
  13. package/dist/backend/crypto.js +68 -0
  14. package/dist/backend/engine.d.ts +13 -0
  15. package/dist/backend/engine.js +78 -0
  16. package/dist/backend/http.d.ts +25 -0
  17. package/dist/backend/http.js +112 -0
  18. package/dist/backend/index.d.ts +1 -0
  19. package/dist/backend/index.js +24 -0
  20. package/dist/backend/routes.d.ts +14 -0
  21. package/dist/backend/routes.js +169 -0
  22. package/dist/backend/sdk.d.ts +12 -0
  23. package/dist/backend/sdk.js +11 -0
  24. package/dist/backend/server.d.ts +12 -0
  25. package/dist/backend/server.js +91 -0
  26. package/dist/backend/temp-image-store.d.ts +46 -0
  27. package/dist/backend/temp-image-store.js +197 -0
  28. package/dist/backend/types.d.ts +103 -0
  29. package/dist/backend/types.js +29 -0
  30. package/dist/backend/users.d.ts +13 -0
  31. package/dist/backend/users.js +76 -0
  32. package/dist/backend/ws-handler.d.ts +14 -0
  33. package/dist/backend/ws-handler.js +72 -0
  34. package/dist/backend/ws.d.ts +19 -0
  35. package/dist/backend/ws.js +146 -0
  36. package/dist/core/agent.d.ts +56 -0
  37. package/dist/core/agent.js +1783 -0
  38. package/dist/core/background.d.ts +45 -0
  39. package/dist/core/background.js +140 -0
  40. package/dist/core/bootstrap.d.ts +45 -0
  41. package/dist/core/bootstrap.js +294 -0
  42. package/dist/core/cli-args.d.ts +41 -0
  43. package/dist/core/cli-args.js +282 -0
  44. package/dist/core/collapsible-output.d.ts +38 -0
  45. package/dist/core/collapsible-output.js +143 -0
  46. package/dist/core/compaction-checkpoint.d.ts +9 -0
  47. package/dist/core/compaction-checkpoint.js +58 -0
  48. package/dist/core/compaction.d.ts +42 -0
  49. package/dist/core/compaction.js +270 -0
  50. package/dist/core/config.d.ts +49 -0
  51. package/dist/core/config.js +417 -0
  52. package/dist/core/context-ledger.d.ts +99 -0
  53. package/dist/core/context-ledger.js +222 -0
  54. package/dist/core/context-policy.d.ts +17 -0
  55. package/dist/core/context-policy.js +81 -0
  56. package/dist/core/continuation-review.d.ts +23 -0
  57. package/dist/core/continuation-review.js +64 -0
  58. package/dist/core/crash-report.d.ts +3 -0
  59. package/dist/core/crash-report.js +27 -0
  60. package/dist/core/credentials.d.ts +11 -0
  61. package/dist/core/credentials.js +183 -0
  62. package/dist/core/doctor.d.ts +24 -0
  63. package/dist/core/doctor.js +125 -0
  64. package/dist/core/effort.d.ts +5 -0
  65. package/dist/core/effort.js +42 -0
  66. package/dist/core/env-paths.d.ts +3 -0
  67. package/dist/core/env-paths.js +38 -0
  68. package/dist/core/execution-guidance.d.ts +9 -0
  69. package/dist/core/execution-guidance.js +73 -0
  70. package/dist/core/execution-target.d.ts +41 -0
  71. package/dist/core/execution-target.js +69 -0
  72. package/dist/core/file-coordination.d.ts +66 -0
  73. package/dist/core/file-coordination.js +176 -0
  74. package/dist/core/file-lease-store.d.ts +14 -0
  75. package/dist/core/file-lease-store.js +89 -0
  76. package/dist/core/image-limits.d.ts +26 -0
  77. package/dist/core/image-limits.js +205 -0
  78. package/dist/core/interruptible-completion.d.ts +3 -0
  79. package/dist/core/interruptible-completion.js +42 -0
  80. package/dist/core/kingdoms-mode-state.d.ts +24 -0
  81. package/dist/core/kingdoms-mode-state.js +139 -0
  82. package/dist/core/licenza.d.ts +38 -0
  83. package/dist/core/licenza.js +125 -0
  84. package/dist/core/model-limits.d.ts +2 -0
  85. package/dist/core/model-limits.js +36 -0
  86. package/dist/core/output-lifecycle.d.ts +44 -0
  87. package/dist/core/output-lifecycle.js +190 -0
  88. package/dist/core/package-update.d.ts +15 -0
  89. package/dist/core/package-update.js +121 -0
  90. package/dist/core/permission-queue.d.ts +2 -0
  91. package/dist/core/permission-queue.js +20 -0
  92. package/dist/core/prompt-attachment.d.ts +21 -0
  93. package/dist/core/prompt-attachment.js +123 -0
  94. package/dist/core/request-plan.d.ts +16 -0
  95. package/dist/core/request-plan.js +36 -0
  96. package/dist/core/run-timing.d.ts +17 -0
  97. package/dist/core/run-timing.js +123 -0
  98. package/dist/core/self-update.d.ts +17 -0
  99. package/dist/core/self-update.js +54 -0
  100. package/dist/core/session-refs.d.ts +27 -0
  101. package/dist/core/session-refs.js +126 -0
  102. package/dist/core/session-storage.d.ts +4 -0
  103. package/dist/core/session-storage.js +48 -0
  104. package/dist/core/session-title.d.ts +1 -0
  105. package/dist/core/session-title.js +21 -0
  106. package/dist/core/session-usage.d.ts +17 -0
  107. package/dist/core/session-usage.js +74 -0
  108. package/dist/core/session.d.ts +58 -0
  109. package/dist/core/session.js +296 -0
  110. package/dist/core/settings.d.ts +17 -0
  111. package/dist/core/settings.js +107 -0
  112. package/dist/core/storage-retention.d.ts +21 -0
  113. package/dist/core/storage-retention.js +227 -0
  114. package/dist/core/text-sanitize.d.ts +1 -0
  115. package/dist/core/text-sanitize.js +35 -0
  116. package/dist/core/tool-artifacts.d.ts +6 -0
  117. package/dist/core/tool-artifacts.js +51 -0
  118. package/dist/core/tool-compress.d.ts +8 -0
  119. package/dist/core/tool-compress.js +111 -0
  120. package/dist/core/tool-executor.d.ts +16 -0
  121. package/dist/core/tool-executor.js +97 -0
  122. package/dist/core/tool-result-index.d.ts +52 -0
  123. package/dist/core/tool-result-index.js +327 -0
  124. package/dist/core/tool-result-store.d.ts +38 -0
  125. package/dist/core/tool-result-store.js +190 -0
  126. package/dist/core/tool-scheduler.d.ts +16 -0
  127. package/dist/core/tool-scheduler.js +35 -0
  128. package/dist/core/trust.d.ts +21 -0
  129. package/dist/core/trust.js +95 -0
  130. package/dist/core/types.d.ts +402 -0
  131. package/dist/core/types.js +1 -0
  132. package/dist/core/update-check.d.ts +26 -0
  133. package/dist/core/update-check.js +89 -0
  134. package/dist/core/update-process.d.ts +10 -0
  135. package/dist/core/update-process.js +31 -0
  136. package/dist/core/user-inbox.d.ts +23 -0
  137. package/dist/core/user-inbox.js +56 -0
  138. package/dist/core/user-input.d.ts +10 -0
  139. package/dist/core/user-input.js +35 -0
  140. package/dist/core/version.d.ts +1 -0
  141. package/dist/core/version.js +10 -0
  142. package/dist/core/vibe-modes.d.ts +38 -0
  143. package/dist/core/vibe-modes.js +383 -0
  144. package/dist/core/workspace-roots.d.ts +13 -0
  145. package/dist/core/workspace-roots.js +91 -0
  146. package/dist/core/workspace-sessions.d.ts +51 -0
  147. package/dist/core/workspace-sessions.js +243 -0
  148. package/dist/cowork/client.d.ts +29 -0
  149. package/dist/cowork/client.js +49 -0
  150. package/dist/cowork/engine-bridge.d.ts +22 -0
  151. package/dist/cowork/engine-bridge.js +98 -0
  152. package/dist/cowork/index.d.ts +11 -0
  153. package/dist/cowork/index.js +16 -0
  154. package/dist/cowork/ipc.d.ts +97 -0
  155. package/dist/cowork/ipc.js +96 -0
  156. package/dist/cowork/manager.d.ts +66 -0
  157. package/dist/cowork/manager.js +325 -0
  158. package/dist/cowork/store.d.ts +23 -0
  159. package/dist/cowork/store.js +182 -0
  160. package/dist/cowork/sync.d.ts +20 -0
  161. package/dist/cowork/sync.js +164 -0
  162. package/dist/cowork/types.d.ts +78 -0
  163. package/dist/cowork/types.js +21 -0
  164. package/dist/extensions/ext-tools.d.ts +3 -0
  165. package/dist/extensions/ext-tools.js +73 -0
  166. package/dist/extensions/loader.d.ts +91 -0
  167. package/dist/extensions/loader.js +474 -0
  168. package/dist/extensions/settings.d.ts +20 -0
  169. package/dist/extensions/settings.js +86 -0
  170. package/dist/extensions/types.d.ts +219 -0
  171. package/dist/extensions/types.js +1 -0
  172. package/dist/horizon/async-queue.d.ts +9 -0
  173. package/dist/horizon/async-queue.js +46 -0
  174. package/dist/horizon/engine.d.ts +85 -0
  175. package/dist/horizon/engine.js +603 -0
  176. package/dist/horizon/index.d.ts +4 -0
  177. package/dist/horizon/index.js +2 -0
  178. package/dist/horizon/main-team.d.ts +163 -0
  179. package/dist/horizon/main-team.js +774 -0
  180. package/dist/horizon/types.d.ts +233 -0
  181. package/dist/horizon/types.js +1 -0
  182. package/dist/index.d.ts +2 -0
  183. package/dist/index.js +233 -0
  184. package/dist/mcp/protocol.d.ts +81 -0
  185. package/dist/mcp/protocol.js +122 -0
  186. package/dist/package.json +1 -0
  187. package/dist/packages/packages.d.ts +12 -0
  188. package/dist/packages/packages.js +323 -0
  189. package/dist/prompts/templates.d.ts +13 -0
  190. package/dist/prompts/templates.js +139 -0
  191. package/dist/providers/anthropic-oauth.d.ts +13 -0
  192. package/dist/providers/anthropic-oauth.js +124 -0
  193. package/dist/providers/anthropic.d.ts +27 -0
  194. package/dist/providers/anthropic.js +526 -0
  195. package/dist/providers/catalog.d.ts +15 -0
  196. package/dist/providers/catalog.js +166 -0
  197. package/dist/providers/effort.d.ts +12 -0
  198. package/dist/providers/effort.js +102 -0
  199. package/dist/providers/model-catalog.d.ts +43 -0
  200. package/dist/providers/model-catalog.js +70 -0
  201. package/dist/providers/model-effort.d.ts +5 -0
  202. package/dist/providers/model-effort.js +43 -0
  203. package/dist/providers/model-registry.d.ts +39 -0
  204. package/dist/providers/model-registry.js +142 -0
  205. package/dist/providers/models-dev.d.ts +9 -0
  206. package/dist/providers/models-dev.js +97 -0
  207. package/dist/providers/oauth-callback-server.d.ts +28 -0
  208. package/dist/providers/oauth-callback-server.js +184 -0
  209. package/dist/providers/oauth-orchestrator.d.ts +58 -0
  210. package/dist/providers/oauth-orchestrator.js +159 -0
  211. package/dist/providers/oauth-store.d.ts +12 -0
  212. package/dist/providers/oauth-store.js +139 -0
  213. package/dist/providers/open-browser.d.ts +20 -0
  214. package/dist/providers/open-browser.js +92 -0
  215. package/dist/providers/openai-compat.d.ts +14 -0
  216. package/dist/providers/openai-compat.js +523 -0
  217. package/dist/providers/openai-oauth.d.ts +15 -0
  218. package/dist/providers/openai-oauth.js +382 -0
  219. package/dist/providers/openrouter-auth.d.ts +73 -0
  220. package/dist/providers/openrouter-auth.js +321 -0
  221. package/dist/providers/openrouter-manual-fallback.d.ts +25 -0
  222. package/dist/providers/openrouter-manual-fallback.js +161 -0
  223. package/dist/providers/openrouter.d.ts +15 -0
  224. package/dist/providers/openrouter.js +107 -0
  225. package/dist/providers/plan-limits.d.ts +6 -0
  226. package/dist/providers/plan-limits.js +175 -0
  227. package/dist/providers/provider-reset.d.ts +4 -0
  228. package/dist/providers/provider-reset.js +83 -0
  229. package/dist/providers/quota-limits.d.ts +4 -0
  230. package/dist/providers/quota-limits.js +33 -0
  231. package/dist/providers/registry.d.ts +33 -0
  232. package/dist/providers/registry.js +213 -0
  233. package/dist/providers/retry.d.ts +37 -0
  234. package/dist/providers/retry.js +347 -0
  235. package/dist/rpc/server.d.ts +23 -0
  236. package/dist/rpc/server.js +222 -0
  237. package/dist/sdk.d.ts +67 -0
  238. package/dist/sdk.js +64 -0
  239. package/dist/skills/skills.d.ts +17 -0
  240. package/dist/skills/skills.js +155 -0
  241. package/dist/text-sanitize.js +28 -0
  242. package/dist/tools/ask-user.d.ts +2 -0
  243. package/dist/tools/ask-user.js +60 -0
  244. package/dist/tools/builtin.d.ts +48 -0
  245. package/dist/tools/builtin.js +2494 -0
  246. package/dist/tools/capabilities.d.ts +5 -0
  247. package/dist/tools/capabilities.js +55 -0
  248. package/dist/tools/computer-capture.d.ts +2 -0
  249. package/dist/tools/computer-capture.js +91 -0
  250. package/dist/tools/computer-posix.d.ts +5 -0
  251. package/dist/tools/computer-posix.js +136 -0
  252. package/dist/tools/computer-use.d.ts +14 -0
  253. package/dist/tools/computer-use.js +108 -0
  254. package/dist/tools/discovery.d.ts +12 -0
  255. package/dist/tools/discovery.js +205 -0
  256. package/dist/tools/execute.d.ts +2 -0
  257. package/dist/tools/execute.js +73 -0
  258. package/dist/tools/normalize-input.d.ts +17 -0
  259. package/dist/tools/normalize-input.js +174 -0
  260. package/dist/tools/output-artifact.d.ts +3 -0
  261. package/dist/tools/output-artifact.js +80 -0
  262. package/dist/tools/pagination.d.ts +15 -0
  263. package/dist/tools/pagination.js +93 -0
  264. package/dist/tools/plan-status.d.ts +2 -0
  265. package/dist/tools/plan-status.js +109 -0
  266. package/dist/tools/program-input.d.ts +3 -0
  267. package/dist/tools/program-input.js +19 -0
  268. package/dist/tools/program.d.ts +3 -0
  269. package/dist/tools/program.js +567 -0
  270. package/dist/tools/protocol-catalog.d.ts +12 -0
  271. package/dist/tools/protocol-catalog.js +46 -0
  272. package/dist/tools/ramification-tools.d.ts +12 -0
  273. package/dist/tools/ramification-tools.js +528 -0
  274. package/dist/tools/regex-compat.d.ts +9 -0
  275. package/dist/tools/regex-compat.js +96 -0
  276. package/dist/tools/registry.d.ts +51 -0
  277. package/dist/tools/registry.js +185 -0
  278. package/dist/tools/resolve.d.ts +2 -0
  279. package/dist/tools/resolve.js +107 -0
  280. package/dist/tools/shell-env.d.ts +2 -0
  281. package/dist/tools/shell-env.js +7 -0
  282. package/dist/tools/team-input.d.ts +3 -0
  283. package/dist/tools/team-input.js +129 -0
  284. package/dist/tools/team-tools.d.ts +7 -0
  285. package/dist/tools/team-tools.js +348 -0
  286. package/dist/tools/workspace-sessions.d.ts +2 -0
  287. package/dist/tools/workspace-sessions.js +35 -0
  288. package/dist/tui/account-entry.d.ts +1 -0
  289. package/dist/tui/account-entry.js +93 -0
  290. package/dist/tui/attachment-highlight.d.ts +1 -0
  291. package/dist/tui/attachment-highlight.js +24 -0
  292. package/dist/tui/attachment-refs.d.ts +2 -0
  293. package/dist/tui/attachment-refs.js +3 -0
  294. package/dist/tui/bottom-input.d.ts +219 -0
  295. package/dist/tui/bottom-input.js +1958 -0
  296. package/dist/tui/branding.d.ts +107 -0
  297. package/dist/tui/branding.js +750 -0
  298. package/dist/tui/clipboard-image.d.ts +10 -0
  299. package/dist/tui/clipboard-image.js +163 -0
  300. package/dist/tui/clipboard-text.d.ts +9 -0
  301. package/dist/tui/clipboard-text.js +51 -0
  302. package/dist/tui/clipboard-windows.d.ts +8 -0
  303. package/dist/tui/clipboard-windows.js +84 -0
  304. package/dist/tui/collapsible-command.d.ts +15 -0
  305. package/dist/tui/collapsible-command.js +48 -0
  306. package/dist/tui/command-feedback.d.ts +10 -0
  307. package/dist/tui/command-feedback.js +46 -0
  308. package/dist/tui/command-output-registry.d.ts +28 -0
  309. package/dist/tui/command-output-registry.js +103 -0
  310. package/dist/tui/command-transcript.d.ts +12 -0
  311. package/dist/tui/command-transcript.js +90 -0
  312. package/dist/tui/commands.d.ts +20 -0
  313. package/dist/tui/commands.js +131 -0
  314. package/dist/tui/context-bar.d.ts +4 -0
  315. package/dist/tui/context-bar.js +74 -0
  316. package/dist/tui/context-meter.d.ts +25 -0
  317. package/dist/tui/context-meter.js +81 -0
  318. package/dist/tui/cost-binding.d.ts +8 -0
  319. package/dist/tui/cost-binding.js +43 -0
  320. package/dist/tui/cost-tracker.d.ts +49 -0
  321. package/dist/tui/cost-tracker.js +122 -0
  322. package/dist/tui/diff.d.ts +9 -0
  323. package/dist/tui/diff.js +119 -0
  324. package/dist/tui/i18n-catalog.d.ts +5 -0
  325. package/dist/tui/i18n-catalog.js +184 -0
  326. package/dist/tui/i18n.d.ts +6 -0
  327. package/dist/tui/i18n.js +10 -0
  328. package/dist/tui/image-attachments.d.ts +46 -0
  329. package/dist/tui/image-attachments.js +167 -0
  330. package/dist/tui/images.d.ts +12 -0
  331. package/dist/tui/images.js +87 -0
  332. package/dist/tui/intro.d.ts +13 -0
  333. package/dist/tui/intro.js +109 -0
  334. package/dist/tui/language-preference.d.ts +6 -0
  335. package/dist/tui/language-preference.js +24 -0
  336. package/dist/tui/live-output.d.ts +2 -0
  337. package/dist/tui/live-output.js +18 -0
  338. package/dist/tui/locales.d.ts +19 -0
  339. package/dist/tui/locales.js +22 -0
  340. package/dist/tui/login-menu.d.ts +17 -0
  341. package/dist/tui/login-menu.js +58 -0
  342. package/dist/tui/logo.d.ts +8 -0
  343. package/dist/tui/logo.js +305 -0
  344. package/dist/tui/markdown-inline.d.ts +3 -0
  345. package/dist/tui/markdown-inline.js +99 -0
  346. package/dist/tui/markdown-table.d.ts +4 -0
  347. package/dist/tui/markdown-table.js +63 -0
  348. package/dist/tui/markdown.d.ts +11 -0
  349. package/dist/tui/markdown.js +257 -0
  350. package/dist/tui/mcp-transcript.d.ts +7 -0
  351. package/dist/tui/mcp-transcript.js +40 -0
  352. package/dist/tui/model-details.d.ts +2 -0
  353. package/dist/tui/model-details.js +21 -0
  354. package/dist/tui/model-selection.d.ts +7 -0
  355. package/dist/tui/model-selection.js +41 -0
  356. package/dist/tui/native-scrollback.d.ts +27 -0
  357. package/dist/tui/native-scrollback.js +134 -0
  358. package/dist/tui/onboarding.d.ts +72 -0
  359. package/dist/tui/onboarding.js +207 -0
  360. package/dist/tui/paste-collapse.d.ts +39 -0
  361. package/dist/tui/paste-collapse.js +117 -0
  362. package/dist/tui/perm-mode.d.ts +8 -0
  363. package/dist/tui/perm-mode.js +41 -0
  364. package/dist/tui/prompt-queue-store.d.ts +26 -0
  365. package/dist/tui/prompt-queue-store.js +87 -0
  366. package/dist/tui/prompt-queue.d.ts +47 -0
  367. package/dist/tui/prompt-queue.js +187 -0
  368. package/dist/tui/provider-menu.d.ts +33 -0
  369. package/dist/tui/provider-menu.js +175 -0
  370. package/dist/tui/question.d.ts +24 -0
  371. package/dist/tui/question.js +32 -0
  372. package/dist/tui/queue-screen.d.ts +25 -0
  373. package/dist/tui/queue-screen.js +152 -0
  374. package/dist/tui/queue-team.d.ts +3 -0
  375. package/dist/tui/queue-team.js +28 -0
  376. package/dist/tui/queued-questions.d.ts +20 -0
  377. package/dist/tui/queued-questions.js +163 -0
  378. package/dist/tui/quick-help.d.ts +1 -0
  379. package/dist/tui/quick-help.js +53 -0
  380. package/dist/tui/repl.d.ts +78 -0
  381. package/dist/tui/repl.js +4130 -0
  382. package/dist/tui/restore-queued-input.d.ts +3 -0
  383. package/dist/tui/restore-queued-input.js +20 -0
  384. package/dist/tui/review-detail.d.ts +6 -0
  385. package/dist/tui/review-detail.js +56 -0
  386. package/dist/tui/review-files.d.ts +3 -0
  387. package/dist/tui/review-files.js +22 -0
  388. package/dist/tui/review-render.d.ts +22 -0
  389. package/dist/tui/review-render.js +98 -0
  390. package/dist/tui/review-screen.d.ts +38 -0
  391. package/dist/tui/review-screen.js +358 -0
  392. package/dist/tui/review-store.d.ts +60 -0
  393. package/dist/tui/review-store.js +270 -0
  394. package/dist/tui/review-team.d.ts +2 -0
  395. package/dist/tui/review-team.js +27 -0
  396. package/dist/tui/selector-mouse.d.ts +26 -0
  397. package/dist/tui/selector-mouse.js +65 -0
  398. package/dist/tui/selector.d.ts +51 -0
  399. package/dist/tui/selector.js +299 -0
  400. package/dist/tui/session-replay.d.ts +10 -0
  401. package/dist/tui/session-replay.js +78 -0
  402. package/dist/tui/session-usage.d.ts +22 -0
  403. package/dist/tui/session-usage.js +55 -0
  404. package/dist/tui/skill-transcript.d.ts +5 -0
  405. package/dist/tui/skill-transcript.js +31 -0
  406. package/dist/tui/startup.d.ts +5 -0
  407. package/dist/tui/startup.js +61 -0
  408. package/dist/tui/status-line-loader.d.ts +8 -0
  409. package/dist/tui/status-line-loader.js +33 -0
  410. package/dist/tui/status-line.d.ts +38 -0
  411. package/dist/tui/status-line.js +213 -0
  412. package/dist/tui/system-language.d.ts +8 -0
  413. package/dist/tui/system-language.js +41 -0
  414. package/dist/tui/task-labels.d.ts +2 -0
  415. package/dist/tui/task-labels.js +7 -0
  416. package/dist/tui/term-bg.d.ts +4 -0
  417. package/dist/tui/term-bg.js +67 -0
  418. package/dist/tui/terminal-screen.d.ts +12 -0
  419. package/dist/tui/terminal-screen.js +1 -0
  420. package/dist/tui/terminal-text.d.ts +7 -0
  421. package/dist/tui/terminal-text.js +123 -0
  422. package/dist/tui/theme.d.ts +25 -0
  423. package/dist/tui/theme.js +383 -0
  424. package/dist/tui/tool-style.d.ts +7 -0
  425. package/dist/tui/tool-style.js +119 -0
  426. package/dist/tui/update-prompt.d.ts +14 -0
  427. package/dist/tui/update-prompt.js +104 -0
  428. package/dist/tui/usage-footer.d.ts +9 -0
  429. package/dist/tui/usage-footer.js +123 -0
  430. package/dist/tui/vascend-login.d.ts +68 -0
  431. package/dist/tui/vascend-login.js +355 -0
  432. package/dist/tui/web-login.d.ts +28 -0
  433. package/dist/tui/web-login.js +115 -0
  434. package/dist/vascend/activity-status.d.ts +12 -0
  435. package/dist/vascend/activity-status.js +68 -0
  436. package/dist/vascend/architecture-map.d.ts +73 -0
  437. package/dist/vascend/architecture-map.js +424 -0
  438. package/dist/vascend/attention-layout.d.ts +19 -0
  439. package/dist/vascend/attention-layout.js +141 -0
  440. package/dist/vascend/budget-allocator.d.ts +31 -0
  441. package/dist/vascend/budget-allocator.js +79 -0
  442. package/dist/vascend/candidate-collector.d.ts +20 -0
  443. package/dist/vascend/candidate-collector.js +220 -0
  444. package/dist/vascend/code-events.d.ts +24 -0
  445. package/dist/vascend/code-events.js +304 -0
  446. package/dist/vascend/code-graph-memory.d.ts +38 -0
  447. package/dist/vascend/code-graph-memory.js +334 -0
  448. package/dist/vascend/code-graph-runtime.d.ts +19 -0
  449. package/dist/vascend/code-graph-runtime.js +190 -0
  450. package/dist/vascend/code-graph-types.d.ts +58 -0
  451. package/dist/vascend/code-graph-types.js +50 -0
  452. package/dist/vascend/code-parser.d.ts +4 -0
  453. package/dist/vascend/code-parser.js +257 -0
  454. package/dist/vascend/competitor-knowledge.d.ts +53 -0
  455. package/dist/vascend/competitor-knowledge.js +262 -0
  456. package/dist/vascend/completeness.d.ts +16 -0
  457. package/dist/vascend/completeness.js +90 -0
  458. package/dist/vascend/context-autotuner.d.ts +45 -0
  459. package/dist/vascend/context-autotuner.js +231 -0
  460. package/dist/vascend/context-candidate.d.ts +45 -0
  461. package/dist/vascend/context-candidate.js +150 -0
  462. package/dist/vascend/context-capsule.d.ts +51 -0
  463. package/dist/vascend/context-capsule.js +133 -0
  464. package/dist/vascend/context-fabric.d.ts +108 -0
  465. package/dist/vascend/context-fabric.js +480 -0
  466. package/dist/vascend/context-feedback-loop.d.ts +56 -0
  467. package/dist/vascend/context-feedback-loop.js +204 -0
  468. package/dist/vascend/context-learning-identity.d.ts +4 -0
  469. package/dist/vascend/context-learning-identity.js +8 -0
  470. package/dist/vascend/context-links.d.ts +14 -0
  471. package/dist/vascend/context-links.js +83 -0
  472. package/dist/vascend/context-lint.d.ts +22 -0
  473. package/dist/vascend/context-lint.js +91 -0
  474. package/dist/vascend/context-market-selection.d.ts +17 -0
  475. package/dist/vascend/context-market-selection.js +50 -0
  476. package/dist/vascend/context-metrics.d.ts +25 -0
  477. package/dist/vascend/context-metrics.js +57 -0
  478. package/dist/vascend/context-pack-render.d.ts +16 -0
  479. package/dist/vascend/context-pack-render.js +52 -0
  480. package/dist/vascend/context-pareto.d.ts +33 -0
  481. package/dist/vascend/context-pareto.js +165 -0
  482. package/dist/vascend/context-pattern-explorer.d.ts +41 -0
  483. package/dist/vascend/context-pattern-explorer.js +276 -0
  484. package/dist/vascend/context-regret.d.ts +32 -0
  485. package/dist/vascend/context-regret.js +93 -0
  486. package/dist/vascend/context-retriever.d.ts +22 -0
  487. package/dist/vascend/context-retriever.js +243 -0
  488. package/dist/vascend/context-scope-index.d.ts +5 -0
  489. package/dist/vascend/context-scope-index.js +96 -0
  490. package/dist/vascend/context-scorer.d.ts +35 -0
  491. package/dist/vascend/context-scorer.js +162 -0
  492. package/dist/vascend/context-search-index.d.ts +12 -0
  493. package/dist/vascend/context-search-index.js +25 -0
  494. package/dist/vascend/context-snapshot.d.ts +22 -0
  495. package/dist/vascend/context-snapshot.js +135 -0
  496. package/dist/vascend/context-window-compiler.d.ts +42 -0
  497. package/dist/vascend/context-window-compiler.js +237 -0
  498. package/dist/vascend/contract-memory.d.ts +61 -0
  499. package/dist/vascend/contract-memory.js +435 -0
  500. package/dist/vascend/council.d.ts +58 -0
  501. package/dist/vascend/council.js +337 -0
  502. package/dist/vascend/decision-promotion.d.ts +48 -0
  503. package/dist/vascend/decision-promotion.js +410 -0
  504. package/dist/vascend/delta-context.d.ts +12 -0
  505. package/dist/vascend/delta-context.js +36 -0
  506. package/dist/vascend/dev-context-compiler.d.ts +27 -0
  507. package/dist/vascend/dev-context-compiler.js +133 -0
  508. package/dist/vascend/dev-context-layout.d.ts +30 -0
  509. package/dist/vascend/dev-context-layout.js +262 -0
  510. package/dist/vascend/evidence-slots.d.ts +14 -0
  511. package/dist/vascend/evidence-slots.js +55 -0
  512. package/dist/vascend/expansion-levels.d.ts +15 -0
  513. package/dist/vascend/expansion-levels.js +178 -0
  514. package/dist/vascend/file-lock.d.ts +7 -0
  515. package/dist/vascend/file-lock.js +95 -0
  516. package/dist/vascend/granular-kingdom.d.ts +25 -0
  517. package/dist/vascend/granular-kingdom.js +259 -0
  518. package/dist/vascend/granular-launcher.d.ts +48 -0
  519. package/dist/vascend/granular-launcher.js +202 -0
  520. package/dist/vascend/kingdom-bus.d.ts +25 -0
  521. package/dist/vascend/kingdom-bus.js +54 -0
  522. package/dist/vascend/kingdom-channel.d.ts +22 -0
  523. package/dist/vascend/kingdom-channel.js +180 -0
  524. package/dist/vascend/kingdom-kpi.d.ts +48 -0
  525. package/dist/vascend/kingdom-kpi.js +172 -0
  526. package/dist/vascend/kingdom-live.d.ts +28 -0
  527. package/dist/vascend/kingdom-live.js +61 -0
  528. package/dist/vascend/kingdom-run.d.ts +18 -0
  529. package/dist/vascend/kingdom-run.js +506 -0
  530. package/dist/vascend/kingdom-scribe.d.ts +20 -0
  531. package/dist/vascend/kingdom-scribe.js +52 -0
  532. package/dist/vascend/kingdom.d.ts +79 -0
  533. package/dist/vascend/kingdom.js +870 -0
  534. package/dist/vascend/lexical-index.d.ts +10 -0
  535. package/dist/vascend/lexical-index.js +99 -0
  536. package/dist/vascend/lexical-search.d.ts +29 -0
  537. package/dist/vascend/lexical-search.js +262 -0
  538. package/dist/vascend/long-term-context.d.ts +51 -0
  539. package/dist/vascend/long-term-context.js +194 -0
  540. package/dist/vascend/mandate.d.ts +33 -0
  541. package/dist/vascend/mandate.js +107 -0
  542. package/dist/vascend/memory-packet.d.ts +13 -0
  543. package/dist/vascend/memory-packet.js +155 -0
  544. package/dist/vascend/memory-status.d.ts +22 -0
  545. package/dist/vascend/memory-status.js +73 -0
  546. package/dist/vascend/memory-store.d.ts +62 -0
  547. package/dist/vascend/memory-store.js +273 -0
  548. package/dist/vascend/objective-revision.d.ts +69 -0
  549. package/dist/vascend/objective-revision.js +319 -0
  550. package/dist/vascend/patch-plan-store.d.ts +33 -0
  551. package/dist/vascend/patch-plan-store.js +240 -0
  552. package/dist/vascend/patch-plan.d.ts +97 -0
  553. package/dist/vascend/patch-plan.js +345 -0
  554. package/dist/vascend/plan-progress.d.ts +11 -0
  555. package/dist/vascend/plan-progress.js +68 -0
  556. package/dist/vascend/plan-store.d.ts +64 -0
  557. package/dist/vascend/plan-store.js +460 -0
  558. package/dist/vascend/proof-chains.d.ts +19 -0
  559. package/dist/vascend/proof-chains.js +120 -0
  560. package/dist/vascend/ramification-store.d.ts +25 -0
  561. package/dist/vascend/ramification-store.js +94 -0
  562. package/dist/vascend/ramification.d.ts +193 -0
  563. package/dist/vascend/ramification.js +583 -0
  564. package/dist/vascend/recall-planner.d.ts +17 -0
  565. package/dist/vascend/recall-planner.js +109 -0
  566. package/dist/vascend/requirements.d.ts +31 -0
  567. package/dist/vascend/requirements.js +151 -0
  568. package/dist/vascend/reviewer.d.ts +9 -0
  569. package/dist/vascend/reviewer.js +93 -0
  570. package/dist/vascend/room-graph.d.ts +29 -0
  571. package/dist/vascend/room-graph.js +242 -0
  572. package/dist/vascend/room-memory.d.ts +57 -0
  573. package/dist/vascend/room-memory.js +631 -0
  574. package/dist/vascend/runtime.d.ts +84 -0
  575. package/dist/vascend/runtime.js +286 -0
  576. package/dist/vascend/self-improve.d.ts +104 -0
  577. package/dist/vascend/self-improve.js +396 -0
  578. package/dist/vascend/session-search.d.ts +52 -0
  579. package/dist/vascend/session-search.js +349 -0
  580. package/dist/vascend/supersession-graph.d.ts +14 -0
  581. package/dist/vascend/supersession-graph.js +70 -0
  582. package/dist/vascend/team-areas.d.ts +9 -0
  583. package/dist/vascend/team-areas.js +28 -0
  584. package/dist/vascend/team-handoff.d.ts +24 -0
  585. package/dist/vascend/team-handoff.js +37 -0
  586. package/dist/vascend/team-scheduler.d.ts +13 -0
  587. package/dist/vascend/team-scheduler.js +74 -0
  588. package/dist/vascend/team-session.d.ts +42 -0
  589. package/dist/vascend/team-session.js +142 -0
  590. package/dist/vascend/test-failure-memory.d.ts +76 -0
  591. package/dist/vascend/test-failure-memory.js +354 -0
  592. package/dist/vascend/token-market.d.ts +42 -0
  593. package/dist/vascend/token-market.js +144 -0
  594. package/dist/vascend/tuner-baseline-store.d.ts +52 -0
  595. package/dist/vascend/tuner-baseline-store.js +446 -0
  596. package/dist/vascend/user-profile.d.ts +44 -0
  597. package/dist/vascend/user-profile.js +131 -0
  598. package/dist/vascend/vision.d.ts +94 -0
  599. package/dist/vascend/vision.js +375 -0
  600. package/dist/vascend/work-agent.d.ts +12 -0
  601. package/dist/vascend/work-agent.js +83 -0
  602. package/dist/vascend/work-queue.d.ts +62 -0
  603. package/dist/vascend/work-queue.js +255 -0
  604. package/dist/vascend/work-runner.d.ts +64 -0
  605. package/dist/vascend/work-runner.js +137 -0
  606. package/dist/vascend/worktree.d.ts +38 -0
  607. package/dist/vascend/worktree.js +206 -0
  608. package/dist/vendor/computer-use/README.md +7 -0
  609. package/dist/vendor/computer-use/computer-desktop.js +211 -0
  610. package/dist/vendor/computer-use/computer-observe.js +315 -0
  611. package/dist/vendor/computer-use/computer-scripts.js +1230 -0
  612. package/dist/vendor/computer-use/computer-tools.js +2136 -0
  613. package/dist/vendor/computer-use/package.json +1 -0
  614. package/dist/vendor/computer-use/rac/atomic-input.js +91 -0
  615. package/dist/vendor/computer-use/rac/grammatica.js +101 -0
  616. package/dist/vendor/computer-use/rac/parser.js +185 -0
  617. package/dist/vendor/computer-use/rac/protocol.js +136 -0
  618. package/install.ps1 +30 -0
  619. package/install.sh +50 -0
  620. package/package.json +56 -0
@@ -0,0 +1,125 @@
1
+ // `talos doctor`: diagnostica dell'ambiente PRIMA di lavorare. Verifica cio'
2
+ // che rompe silenziosamente una sessione: credenziali/provider risolvibili,
3
+ // modello configurato instradabile, directory sessioni scrivibile, config
4
+ // caricabile, risorse locali del progetto. Nessuna chiamata di rete: la
5
+ // diagnosi e' locale e deterministica.
6
+ //
7
+ // Separazione host/logica: runDoctor produce dati (DoctorReport), il render e
8
+ // l'exit code stanno in renderDoctorReport/doctorExitCode. Cosi' la CLI stampa,
9
+ // i test verificano il report, un host futuro (Horizon) puo' consumare il JSON.
10
+ import { accessSync, constants, existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
11
+ import { join } from "node:path";
12
+ import { buildConfig } from "./config.js";
13
+ import { applyStoredCredentials, credentialsPath } from "./credentials.js";
14
+ import { defaultRegistry, resolveStartupModel } from "../providers/registry.js";
15
+ function worst(a, b) {
16
+ const rank = { ok: 0, warn: 1, fail: 2 };
17
+ return rank[b] > rank[a] ? b : a;
18
+ }
19
+ export function runDoctor(input, deps = {}) {
20
+ const makeRegistry = deps.registry ?? defaultRegistry;
21
+ const checks = [];
22
+ const push = (id, label, status, detail) => {
23
+ checks.push({ id, label, status, detail });
24
+ };
25
+ // 1) Runtime: versioni di Bun/Node (informativo, fail solo se irriconoscibile).
26
+ const bunVersion = globalThis.Bun?.version ?? "";
27
+ const nodeVersion = process.versions?.node ?? "";
28
+ push("runtime", "runtime", bunVersion || nodeVersion ? "ok" : "fail", bunVersion ? `bun ${bunVersion} (node ${nodeVersion})` : nodeVersion ? `node ${nodeVersion}` : "runtime non riconosciuto");
29
+ // 2) Config: buildConfig non deve lanciare; elenca i file caricati.
30
+ let cwd = input.cwd ?? process.cwd();
31
+ let sessionDir = "";
32
+ let configuredModel = input.model ?? "";
33
+ try {
34
+ const config = buildConfig({ ...(input.cwd !== undefined ? { cwd: input.cwd } : {}), ...(input.model !== undefined ? { model: input.model } : {}), env: input.env });
35
+ cwd = config.cwd;
36
+ sessionDir = config.sessionDir;
37
+ configuredModel = config.model;
38
+ push("config", "configurazione", "ok", config.loadedConfigFiles.length
39
+ ? `caricata da: ${config.loadedConfigFiles.join(", ")}`
40
+ : "default (nessun file di config)");
41
+ }
42
+ catch (err) {
43
+ push("config", "configurazione", "fail", `buildConfig fallita: ${err.message}`);
44
+ }
45
+ // 3) Credenziali persistite + provider risolvibili con l'env effettivo.
46
+ const env = applyStoredCredentials(input.env);
47
+ const storedPath = credentialsPath(input.env);
48
+ const stored = storedPath && existsSync(storedPath);
49
+ let providerIds = [];
50
+ try {
51
+ providerIds = makeRegistry(env).list().map((p) => p.id);
52
+ push("providers", "provider", providerIds.length ? "ok" : "fail", providerIds.length
53
+ ? `${providerIds.length} configurati: ${providerIds.join(", ")}${stored ? ` (credenziali: ${storedPath})` : ""}`
54
+ : "nessun provider con credenziali: esporta una API key (es. ANTHROPIC_API_KEY) o usa un login OAuth");
55
+ }
56
+ catch (err) {
57
+ push("providers", "provider", "fail", err.message);
58
+ }
59
+ // 4) Modello configurato: instradabile? Segnala il fallback silenzioso.
60
+ if (providerIds.length) {
61
+ try {
62
+ const startup = resolveStartupModel(makeRegistry(env), configuredModel);
63
+ const fellBack = configuredModel && startup.model !== configuredModel;
64
+ push("model", "modello", fellBack ? "warn" : "ok", fellBack
65
+ ? `"${configuredModel}" non instradabile: fallback a ${startup.model}`
66
+ : startup.model);
67
+ }
68
+ catch (err) {
69
+ push("model", "modello", "fail", err.message);
70
+ }
71
+ }
72
+ else {
73
+ push("model", "modello", "warn", `configurato ${configuredModel || "(default)"}; nessun provider per instradarlo`);
74
+ }
75
+ // 5) Directory sessioni scrivibile (crea, tocca, pulisce).
76
+ if (sessionDir) {
77
+ try {
78
+ mkdirSync(sessionDir, { recursive: true });
79
+ const probe = join(sessionDir, `.doctor-${process.pid}.tmp`);
80
+ writeFileSync(probe, "ok");
81
+ rmSync(probe, { force: true });
82
+ push("sessions", "sessioni", "ok", sessionDir);
83
+ }
84
+ catch (err) {
85
+ push("sessions", "sessioni", "fail", `directory non scrivibile: ${sessionDir} (${err.message})`);
86
+ }
87
+ }
88
+ // 6) Risorse locali del progetto (estensioni/skill/config): presenza e trust.
89
+ const localDirs = [".talos/extensions", ".talos/config.json", "talos.config.json", "AGENTS.md"]
90
+ .filter((rel) => existsSync(join(cwd, rel)));
91
+ if (localDirs.length) {
92
+ let readable = true;
93
+ for (const rel of localDirs) {
94
+ try {
95
+ accessSync(join(cwd, rel), constants.R_OK);
96
+ }
97
+ catch {
98
+ readable = false;
99
+ }
100
+ }
101
+ push("local", "risorse locali", readable ? "ok" : "warn", `${localDirs.join(", ")}${readable ? "" : " (non tutte leggibili)"}`);
102
+ }
103
+ else {
104
+ push("local", "risorse locali", "ok", "nessuna (il progetto non definisce estensioni/skill)");
105
+ }
106
+ const status = checks.reduce((acc, check) => worst(acc, check.status), "ok");
107
+ return { cwd, checks, status };
108
+ }
109
+ const STATUS_MARK = { ok: "ok ", warn: "WARN", fail: "FAIL" };
110
+ export function renderDoctorReport(report) {
111
+ const lines = [];
112
+ lines.push(`talos doctor — ${report.cwd}`);
113
+ for (const check of report.checks) {
114
+ lines.push(` [${STATUS_MARK[check.status]}] ${check.label.padEnd(14)} ${check.detail}`);
115
+ }
116
+ lines.push(report.status === "ok"
117
+ ? "tutto in ordine."
118
+ : report.status === "warn"
119
+ ? "avvisi presenti: la sessione parte ma con fallback."
120
+ : "problemi bloccanti: risolvi i FAIL prima di avviare una sessione.");
121
+ return lines.join("\n");
122
+ }
123
+ export function doctorExitCode(report) {
124
+ return report.status === "fail" ? 1 : 0;
125
+ }
@@ -0,0 +1,5 @@
1
+ export type Effort = "" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
2
+ export declare function effectiveToolName(name: string, input?: Record<string, unknown>): string;
3
+ export declare function effortRoutingEnabled(env: NodeJS.ProcessEnv): boolean;
4
+ export declare function isRoutineBatch(toolNames: readonly string[], hadError: boolean): boolean;
5
+ export declare function routeEffort(base: Effort, turn: number, routine: boolean, enabled: boolean): Effort;
@@ -0,0 +1,42 @@
1
+ // Effort routing dinamico: abbassa il livello di reasoning sui turni di ROUTINE
2
+ // (digestione di letture/ricerche, niente scrittura ne' errori) e tiene l'effort
3
+ // pieno sui turni che decidono/scrivono. Riduce latenza e costo senza perdere
4
+ // qualita' dove serve. Modulo PURO (testabile); il gate via env.
5
+ // Tool di sola lettura/ricerca: un turno che ha eseguito SOLO questi e' "routine"
6
+ // (il modello deve solo assorbire l'output e proseguire).
7
+ const READONLY_TOOLS = new Set([
8
+ "read_file", "list_dir", "glob", "grep", "recall", "web_fetch",
9
+ "tool_search", "resolve", "skill_search", "output_page", "bash_output",
10
+ ]);
11
+ // Nome del tool che ha DAVVERO lavorato. Una chiamata via tool_invoke porta il
12
+ // bersaglio in `input.name`: senza questa risoluzione un turno di sole letture
13
+ // mediate dal meta-tool non risulterebbe mai di routine, e il routing
14
+ // dell'effort resterebbe inattivo per l'intero profilo Horizon.
15
+ export function effectiveToolName(name, input) {
16
+ if (name === "execute") {
17
+ const target = input?.["mode"] === "call" ? input["tool"] : undefined;
18
+ return typeof target === "string" && target.trim() ? target.trim() : name;
19
+ }
20
+ if (name !== "tool_invoke")
21
+ return name;
22
+ const target = input?.["name"];
23
+ return typeof target === "string" && target.trim() ? target.trim() : name;
24
+ }
25
+ export function effortRoutingEnabled(env) {
26
+ const v = (env["TALOS_EFFORT_ROUTING"] ?? "").trim().toLowerCase();
27
+ return !(v === "0" || v === "off" || v === "false" || v === "no");
28
+ }
29
+ // Il batch di tool appena eseguito e' di routine? (solo read-only, nessun errore).
30
+ export function isRoutineBatch(toolNames, hadError) {
31
+ return !hadError && toolNames.length > 0 && toolNames.every((n) => READONLY_TOOLS.has(n));
32
+ }
33
+ // Effort effettivo del prossimo turno. Turno 0 (decisione iniziale) e turni non
34
+ // di routine usano l'effort configurato; i turni di routine lo abbassano. Non
35
+ // alza mai sopra il configurato.
36
+ export function routeEffort(base, turn, routine, enabled) {
37
+ if (!enabled || turn === 0 || !routine)
38
+ return base;
39
+ if (base === "max" || base === "xhigh" || base === "high" || base === "medium")
40
+ return "low";
41
+ return base; // low / "" restano invariati
42
+ }
@@ -0,0 +1,3 @@
1
+ export declare function homeDirFromEnv(env: NodeJS.ProcessEnv): string;
2
+ export declare function talosConfigDir(env: NodeJS.ProcessEnv): string;
3
+ export declare function defaultSessionDir(cwd: string, env: NodeJS.ProcessEnv): string;
@@ -0,0 +1,38 @@
1
+ import { createHash } from "node:crypto";
2
+ import { realpathSync } from "node:fs";
3
+ import { homedir } from "node:os";
4
+ import { basename, join, resolve } from "node:path";
5
+ function nonEmpty(value) {
6
+ const trimmed = value?.trim();
7
+ return trimmed ? trimmed : undefined;
8
+ }
9
+ // Risolve la home dall'OGGETTO env ricevuto, senza consultare implicitamente
10
+ // process.env. Questo rende bootstrap e test isolabili: su Windows USERPROFILE
11
+ // ha precedenza, su POSIX HOME; l'altra variabile resta un fallback portabile.
12
+ export function homeDirFromEnv(env) {
13
+ const home = nonEmpty(env["HOME"]);
14
+ const profile = nonEmpty(env["USERPROFILE"]);
15
+ const configured = process.platform === "win32"
16
+ ? profile ?? home
17
+ : home ?? profile;
18
+ return configured ?? homedir();
19
+ }
20
+ // Directory globale di Talos. TALOS_CONFIG_DIR e' l'override esplicito comune
21
+ // a config, settings e credenziali; altrimenti vive sotto la home risolta sopra.
22
+ export function talosConfigDir(env) {
23
+ return nonEmpty(env["TALOS_CONFIG_DIR"]) ?? join(homeDirFromEnv(env), ".talos");
24
+ }
25
+ // Lo stato runtime appartiene all'utente, non al repository. Il path completo
26
+ // distingue checkout omonimi; realpath e case folding unificano gli alias.
27
+ export function defaultSessionDir(cwd, env) {
28
+ let canonical = resolve(cwd);
29
+ try {
30
+ canonical = realpathSync.native(canonical);
31
+ }
32
+ catch { /* cwd non ancora creato */ }
33
+ if (process.platform === "win32")
34
+ canonical = canonical.toLowerCase();
35
+ const name = (basename(canonical).replace(/[^a-zA-Z0-9._-]/g, "_") || "workspace").slice(0, 60);
36
+ const digest = createHash("sha256").update(canonical).digest("hex").slice(0, 24);
37
+ return resolve(cwd, talosConfigDir(env), "projects", `${name}-${digest}`, "sessions");
38
+ }
@@ -0,0 +1,9 @@
1
+ import type { ToolCallPart, ToolResultPart } from "./types.js";
2
+ export declare const EXECUTION_GUIDANCE = "Efficient execution\n- Determine whether the user wants advice, an explanation, instructions for manual work, or\n actual execution. Advice and manual instructions are fulfilled by the response; do not run\n their example scripts or perform the user's setup. A todo list does not grant authorization.\n Before continuing after an error, check whether further agent action is needed and authorized.\n Stop when the request is answered; wait when the next step belongs to the user or needs input.\n Preserve incomplete tasks honestly instead of forcing completion or retrying indefinitely.\n- For a small cosmetic change (one button color, label, spacing or font), locate the affected\n component, edit it, then verify the local result. Do not create a plan, delegate, research the\n web, inspect the whole repository or run a global test/build cycle unless evidence requires it.\n Escalate scope only when the actual dependency or failure demands it.\n- Decide what evidence is needed for the next decision. Issue independent reads together and\n reuse results that are still valid. Do not spend a model round on each already-decided action.\n- Use run_program for known sequences: await dependent edits and plan transitions in order,\n stop on errors, and return a concise summary. Complete a task only after its checks succeed.\n- Prepare related replacements in one round. Never edit the same file concurrently. Independent\n edits on distinct files may run together in bounded groups of at most four; await every outcome\n before inspecting the result or starting dependent work. Keep permission gates in place.\n- For short checks use foreground bash, or background with its brief initial wait. Use\n background=true with yield_time_ms=0 for persistent servers or work that must detach immediately.\n Collect ready background results together; a running command is not a passed check.\n- Run the relevant integrated checks after the edits. Repeat checks only after changes, failures\n or a concrete unresolved concern; do not duplicate typecheck and build without a reason.\n- When parallel work is authorized and worthwhile, start with at most two collaborators on\n concrete disjoint areas, agree on interfaces and acceptance checks, and declare after dependencies.\n The coordinator reviews the combined result. Prefer one agent for small or tightly coupled work.\n- Format user-facing responses in readable Markdown: short paragraphs, **bold** key findings,\n lists for steps, tables for comparisons, fenced code with a language, and descriptive links.\n Keep internal planning notation out of ordinary explanations unless the user asks for it.";
3
+ export declare class ExecutionGuidance {
4
+ private previous;
5
+ private readonly reminded;
6
+ observe(calls: readonly ToolCallPart[], results: readonly ToolResultPart[]): string;
7
+ }
8
+ export declare function isSmallPresentationChange(text: string): boolean;
9
+ export declare function smallChangeGuidance(text: string): string;
@@ -0,0 +1,73 @@
1
+ import { effectiveToolName } from "./effort.js";
2
+ export const EXECUTION_GUIDANCE = `Efficient execution
3
+ - Determine whether the user wants advice, an explanation, instructions for manual work, or
4
+ actual execution. Advice and manual instructions are fulfilled by the response; do not run
5
+ their example scripts or perform the user's setup. A todo list does not grant authorization.
6
+ Before continuing after an error, check whether further agent action is needed and authorized.
7
+ Stop when the request is answered; wait when the next step belongs to the user or needs input.
8
+ Preserve incomplete tasks honestly instead of forcing completion or retrying indefinitely.
9
+ - For a small cosmetic change (one button color, label, spacing or font), locate the affected
10
+ component, edit it, then verify the local result. Do not create a plan, delegate, research the
11
+ web, inspect the whole repository or run a global test/build cycle unless evidence requires it.
12
+ Escalate scope only when the actual dependency or failure demands it.
13
+ - Decide what evidence is needed for the next decision. Issue independent reads together and
14
+ reuse results that are still valid. Do not spend a model round on each already-decided action.
15
+ - Use run_program for known sequences: await dependent edits and plan transitions in order,
16
+ stop on errors, and return a concise summary. Complete a task only after its checks succeed.
17
+ - Prepare related replacements in one round. Never edit the same file concurrently. Independent
18
+ edits on distinct files may run together in bounded groups of at most four; await every outcome
19
+ before inspecting the result or starting dependent work. Keep permission gates in place.
20
+ - For short checks use foreground bash, or background with its brief initial wait. Use
21
+ background=true with yield_time_ms=0 for persistent servers or work that must detach immediately.
22
+ Collect ready background results together; a running command is not a passed check.
23
+ - Run the relevant integrated checks after the edits. Repeat checks only after changes, failures
24
+ or a concrete unresolved concern; do not duplicate typecheck and build without a reason.
25
+ - When parallel work is authorized and worthwhile, start with at most two collaborators on
26
+ concrete disjoint areas, agree on interfaces and acceptance checks, and declare after dependencies.
27
+ The coordinator reviews the combined result. Prefer one agent for small or tightly coupled work.
28
+ - Format user-facing responses in readable Markdown: short paragraphs, **bold** key findings,
29
+ lists for steps, tables for comparisons, fenced code with a language, and descriptive links.
30
+ Keep internal planning notation out of ordinary explanations unless the user asks for it.`;
31
+ // One reminder per pattern per run, transient and outside conversation history.
32
+ export class ExecutionGuidance {
33
+ previous = "";
34
+ reminded = new Set();
35
+ observe(calls, results) {
36
+ if (calls.length !== 1 || results.length !== 1 || results[0]?.isError) {
37
+ this.previous = "";
38
+ return "";
39
+ }
40
+ const call = calls[0];
41
+ const name = effectiveToolName(call.name, call.input);
42
+ const input = call.name === "tool_invoke" || call.name === "execute" ? call.input["args"] : call.input;
43
+ const path = input && typeof input === "object" ? input["path"] : undefined;
44
+ const pattern = name === "vascend_mark" ? "plan"
45
+ : name === "bash_output" && input && typeof input === "object" && input["kill"] !== true ? "poll"
46
+ : name === "edit_file" && typeof path === "string" ? `edit:${path}` : "";
47
+ const repeated = pattern && pattern === this.previous;
48
+ this.previous = pattern;
49
+ const category = pattern.startsWith("edit:") ? "edit" : pattern;
50
+ if (!repeated || this.reminded.has(category))
51
+ return "";
52
+ this.reminded.add(category);
53
+ const advice = category === "plan"
54
+ ? "Group already-decided plan transitions with the next work in run_program, using sequential await and checking each outcome. Do not mark unverified work completed."
55
+ : category === "edit"
56
+ ? "Prepare the remaining known edits together. Apply edits to the same file sequentially in run_program; independent files may be edited concurrently. Await all outcomes."
57
+ : "Avoid a separate model round for each ready background result. Collect them together with independent work, and use foreground mode for short checks. Confirm the final exit status.";
58
+ return `[Execution efficiency]\n${advice} Keep dependencies, permissions and verification intact.`;
59
+ }
60
+ }
61
+ // Conservative hint, not a capability restriction or a deadline. Broad work,
62
+ // explicit continuation and assigned collaborator tasks keep their full plan.
63
+ export function isSmallPresentationChange(text) {
64
+ if (text.length > 240 || /\b(tutt[oaie]|inter[oaie]|ovunque|all|entire|every|refactor|redesign|migra\w*|sicurezza|security|accessibil\w*|architett\w*|continua\w*|riprend\w*|resume|continue|team|parallel\w*|collabor\w*|poi|anche|inoltre|then|also|performance|logic[ae]?|auth\w*|database|comportamento|behavior|api|funzion\w*)\b/i.test(text))
65
+ return false;
66
+ return /\b(cambia|modifica|imposta|rinomina|sostituisci|change|set|rename|adjust|update)\b/i.test(text)
67
+ && /\b(colore|color|colour|padding|margine|margin|spaziatura|spacing|font|etichetta|label)\b/i.test(text);
68
+ }
69
+ export function smallChangeGuidance(text) {
70
+ return isSmallPresentationChange(text)
71
+ ? "[Small presentation change]\nStay on this local edit: locate the component, change it, verify the affected result, and finish concisely. Do not resume an unrelated old plan or start planning, delegation, broad research or global checks without a concrete need. Preserve required project checks."
72
+ : "";
73
+ }
@@ -0,0 +1,41 @@
1
+ export type ExecutionTargetKind = "local" | "wsl" | "ssh" | "container";
2
+ export type ExecutionPlatform = "windows" | "macos" | "linux";
3
+ export interface LocalExecutionTarget {
4
+ readonly kind: "local";
5
+ readonly platform: ExecutionPlatform;
6
+ }
7
+ export interface WslExecutionTarget {
8
+ readonly kind: "wsl";
9
+ readonly distro: string;
10
+ readonly platform: "linux";
11
+ }
12
+ export interface SshExecutionTarget {
13
+ readonly kind: "ssh";
14
+ readonly host: string;
15
+ readonly platform: ExecutionPlatform;
16
+ }
17
+ export interface ContainerExecutionTarget {
18
+ readonly kind: "container";
19
+ readonly containerId: string;
20
+ readonly platform: "linux";
21
+ readonly parent: LocalExecutionTarget | WslExecutionTarget | SshExecutionTarget;
22
+ }
23
+ export type ExecutionTarget = LocalExecutionTarget | WslExecutionTarget | SshExecutionTarget | ContainerExecutionTarget;
24
+ export interface ExecutionCapabilities {
25
+ readonly platform: ExecutionPlatform;
26
+ readonly arch: string;
27
+ readonly caseSensitive: boolean;
28
+ readonly home: string;
29
+ readonly shell: string;
30
+ readonly pathSeparator: "/" | "\\";
31
+ readonly node?: string;
32
+ readonly bun?: string;
33
+ readonly git?: string;
34
+ readonly terminal?: boolean;
35
+ readonly agentHostRuntimeReady?: boolean;
36
+ }
37
+ export declare function localExecutionTarget(platform?: NodeJS.Platform): LocalExecutionTarget;
38
+ export declare function normalizeExecutionTarget(value: unknown, platform?: NodeJS.Platform): ExecutionTarget;
39
+ export declare function executionTargetKey(target: ExecutionTarget): string;
40
+ export declare function executionPathKey(target: ExecutionTarget, path: string): string;
41
+ export declare function workspaceUri(target: ExecutionTarget, path: string): string;
@@ -0,0 +1,69 @@
1
+ function currentPlatform(platform = process.platform) {
2
+ if (platform === "win32")
3
+ return "windows";
4
+ if (platform === "darwin")
5
+ return "macos";
6
+ return "linux";
7
+ }
8
+ function safeId(value, label) {
9
+ const id = String(value ?? "").trim();
10
+ if (!id || id.length > 160 || !/^[A-Za-z0-9._@+-]+$/.test(id)) {
11
+ throw new Error(`${label} non valido`);
12
+ }
13
+ return id;
14
+ }
15
+ export function localExecutionTarget(platform = process.platform) {
16
+ return Object.freeze({ kind: "local", platform: currentPlatform(platform) });
17
+ }
18
+ export function normalizeExecutionTarget(value, platform = process.platform) {
19
+ if (!value || typeof value !== "object")
20
+ return localExecutionTarget(platform);
21
+ const row = value;
22
+ const kind = String(row["kind"] ?? "local").toLowerCase();
23
+ if (kind === "wsl") {
24
+ return Object.freeze({ kind: "wsl", distro: safeId(row["distro"], "distribuzione WSL"), platform: "linux" });
25
+ }
26
+ if (kind === "ssh") {
27
+ const remotePlatform = String(row["platform"] ?? "linux").toLowerCase();
28
+ const resolvedPlatform = remotePlatform === "windows" || remotePlatform === "macos"
29
+ ? remotePlatform
30
+ : "linux";
31
+ return Object.freeze({ kind: "ssh", host: safeId(row["host"], "host SSH"), platform: resolvedPlatform });
32
+ }
33
+ if (kind === "container") {
34
+ const parent = normalizeExecutionTarget(row["parent"], platform);
35
+ if (parent.kind === "container")
36
+ throw new Error("un container non puo' contenere un altro target container");
37
+ return Object.freeze({
38
+ kind: "container",
39
+ containerId: safeId(row["containerId"], "container"),
40
+ platform: "linux",
41
+ parent,
42
+ });
43
+ }
44
+ return localExecutionTarget(platform);
45
+ }
46
+ export function executionTargetKey(target) {
47
+ if (target.kind === "local")
48
+ return `local:${target.platform}`;
49
+ if (target.kind === "wsl")
50
+ return `wsl:${target.distro.toLowerCase()}`;
51
+ if (target.kind === "ssh")
52
+ return `ssh:${target.host.toLowerCase()}`;
53
+ return `container:${executionTargetKey(target.parent)}:${target.containerId}`;
54
+ }
55
+ export function executionPathKey(target, path) {
56
+ const clean = String(path ?? "").replace(/[\\/]+$/, "");
57
+ const caseSensitive = target.kind === "wsl" || target.kind === "container" || target.platform !== "windows";
58
+ return caseSensitive ? clean : clean.toLowerCase();
59
+ }
60
+ export function workspaceUri(target, path) {
61
+ const encodedPath = String(path ?? "").replace(/\\/g, "/").split("/").map(encodeURIComponent).join("/");
62
+ if (target.kind === "local")
63
+ return `file://${encodedPath.startsWith("/") ? "" : "/"}${encodedPath}`;
64
+ if (target.kind === "wsl")
65
+ return `horizon-wsl://${encodeURIComponent(target.distro)}/${encodedPath.replace(/^\/+/, "")}`;
66
+ if (target.kind === "ssh")
67
+ return `horizon-ssh://${encodeURIComponent(target.host)}/${encodedPath.replace(/^\/+/, "")}`;
68
+ return `horizon-container://${encodeURIComponent(target.containerId)}/${encodedPath.replace(/^\/+/, "")}`;
69
+ }
@@ -0,0 +1,66 @@
1
+ import { type ExecutionTarget } from "./execution-target.js";
2
+ export type FileActivityMode = "viewing" | "editing" | "writing";
3
+ export type FileActorKind = "human" | "main" | "subagent" | "agent" | "external";
4
+ export interface FileActor {
5
+ readonly id: string;
6
+ readonly label: string;
7
+ readonly kind: FileActorKind;
8
+ }
9
+ export interface FilePresence {
10
+ readonly path: string;
11
+ readonly mode: FileActivityMode;
12
+ readonly actor: FileActor;
13
+ readonly updatedAt: number;
14
+ }
15
+ export interface FileCoordinationEvent {
16
+ readonly phase: "observed" | "blocked" | "acquired" | "released" | "presence";
17
+ readonly path: string;
18
+ readonly actor: FileActor;
19
+ readonly mode: FileActivityMode;
20
+ readonly others: readonly FilePresence[];
21
+ readonly at: number;
22
+ }
23
+ export interface FileLease {
24
+ readonly id: string;
25
+ readonly path: string;
26
+ readonly actor: FileActor;
27
+ }
28
+ export type FileLeaseResult = {
29
+ readonly ok: true;
30
+ readonly lease: FileLease;
31
+ } | {
32
+ readonly ok: false;
33
+ readonly conflicts: readonly FilePresence[];
34
+ };
35
+ export interface FileCoordinationContext {
36
+ readonly hub: FileCoordinationHub;
37
+ readonly actor: FileActor;
38
+ readonly emit?: (event: FileCoordinationEvent) => void;
39
+ }
40
+ /** Registro condiviso fra engine, main agent, sub-agent e host desktop. */
41
+ export declare class FileCoordinationHub {
42
+ readonly cwd: string;
43
+ readonly executionTarget: ExecutionTarget;
44
+ private readonly persistent;
45
+ private readonly byPath;
46
+ private readonly leases;
47
+ constructor(cwd: string, executionTarget?: ExecutionTarget, leaseDirectory?: string);
48
+ path(value: string): string;
49
+ list(path?: string, exceptActorId?: string): readonly FilePresence[];
50
+ replaceActorPresence(actor: FileActor, entries: readonly {
51
+ readonly path: string;
52
+ readonly mode: FileActivityMode;
53
+ }[]): readonly FileCoordinationEvent[];
54
+ observe(pathValue: string, actor: FileActor): readonly FilePresence[];
55
+ acquire(pathValue: string, actor: FileActor): FileLeaseResult;
56
+ validate(lease: FileLease): readonly FilePresence[];
57
+ release(lease: FileLease): void;
58
+ clearActor(actorId: string, includeLeases?: boolean): void;
59
+ private activeConflicts;
60
+ private storageFailure;
61
+ private put;
62
+ private prune;
63
+ }
64
+ export declare function fileActor(id: string, label: string, kind: FileActorKind): FileActor;
65
+ export declare function withFileActor(context: FileCoordinationContext, actor: FileActor): FileCoordinationContext;
66
+ export declare function formatFileConflicts(conflicts: readonly FilePresence[]): string;
@@ -0,0 +1,176 @@
1
+ import { isAbsolute, normalize, resolve, dirname, basename, join } from "node:path";
2
+ import { realpathSync } from "node:fs";
3
+ import { executionPathKey, localExecutionTarget } from "./execution-target.js";
4
+ import { randomUUID } from "node:crypto";
5
+ import { FileLeaseStore, workspaceLeaseDirectory } from "./file-lease-store.js";
6
+ const ACTIVE_MODES = new Set(["editing", "writing"]);
7
+ const EXTERNAL_PRESENCE_TTL_MS = 15_000;
8
+ /** Registro condiviso fra engine, main agent, sub-agent e host desktop. */
9
+ export class FileCoordinationHub {
10
+ cwd;
11
+ executionTarget;
12
+ persistent;
13
+ byPath = new Map();
14
+ leases = new Map();
15
+ constructor(cwd, executionTarget = localExecutionTarget(), leaseDirectory = workspaceLeaseDirectory(cwd, executionTarget)) {
16
+ this.cwd = cwd;
17
+ this.executionTarget = executionTarget;
18
+ this.persistent = new FileLeaseStore(leaseDirectory);
19
+ }
20
+ path(value) {
21
+ const absolute = isAbsolute(value) ? value : resolve(this.cwd, value);
22
+ const clean = this.executionTarget.kind === "local" ? canonicalLocalPath(normalize(absolute)) : normalize(absolute);
23
+ return executionPathKey(this.executionTarget, clean);
24
+ }
25
+ list(path, exceptActorId) {
26
+ this.prune();
27
+ const rows = path
28
+ ? [...(this.byPath.get(this.path(path))?.values() ?? [])]
29
+ : [...this.byPath.values()].flatMap((entries) => [...entries.values()]);
30
+ let shared = [];
31
+ try {
32
+ shared = this.persistent.list(path ? this.path(path) : undefined);
33
+ }
34
+ catch { /* reads remain available */ }
35
+ return [...new Map([...rows, ...shared].map((entry) => [entry.path + "\0" + entry.actor.id, entry])).values()]
36
+ .filter((entry) => !exceptActorId || entry.actor.id !== exceptActorId)
37
+ .map((entry) => ({ path: entry.path, mode: entry.mode, actor: entry.actor, updatedAt: entry.updatedAt }))
38
+ .sort((a, b) => b.updatedAt - a.updatedAt || a.actor.label.localeCompare(b.actor.label));
39
+ }
40
+ replaceActorPresence(actor, entries) {
41
+ this.clearActor(actor.id, false);
42
+ const events = [];
43
+ for (const entry of entries) {
44
+ const path = this.path(entry.path);
45
+ const others = this.activeConflicts(path, actor.id);
46
+ const at = Date.now();
47
+ this.put({ path, mode: entry.mode, actor, updatedAt: at });
48
+ events.push({ phase: "presence", path, actor, mode: entry.mode, others, at });
49
+ }
50
+ return events;
51
+ }
52
+ observe(pathValue, actor) {
53
+ const path = this.path(pathValue);
54
+ const others = this.activeConflicts(path, actor.id);
55
+ this.put({ path, mode: "viewing", actor, updatedAt: Date.now() });
56
+ return others;
57
+ }
58
+ acquire(pathValue, actor) {
59
+ const path = this.path(pathValue);
60
+ const conflicts = this.activeConflicts(path, actor.id);
61
+ if (conflicts.length)
62
+ return { ok: false, conflicts };
63
+ const lease = {
64
+ id: `fl-${randomUUID()}`,
65
+ path,
66
+ actor,
67
+ };
68
+ try {
69
+ const shared = this.persistent.acquire(lease);
70
+ if (shared.length)
71
+ return { ok: false, conflicts: shared };
72
+ }
73
+ catch (error) {
74
+ return { ok: false, conflicts: [this.storageFailure(path, error)] };
75
+ }
76
+ this.leases.set(lease.id, lease);
77
+ this.put({ path, mode: "writing", actor, updatedAt: Date.now(), leaseId: lease.id });
78
+ return { ok: true, lease };
79
+ }
80
+ validate(lease) {
81
+ try {
82
+ return [...this.activeConflicts(lease.path, lease.actor.id), ...this.persistent.validate(lease)];
83
+ }
84
+ catch (error) {
85
+ return [this.storageFailure(lease.path, error)];
86
+ }
87
+ }
88
+ release(lease) {
89
+ try {
90
+ this.persistent.release(lease);
91
+ }
92
+ catch { /* fail closed: a later writer sees the retained lease */ }
93
+ this.leases.delete(lease.id);
94
+ const entries = this.byPath.get(lease.path);
95
+ const current = entries?.get(lease.actor.id);
96
+ if (current?.leaseId === lease.id)
97
+ entries?.delete(lease.actor.id);
98
+ if (entries && entries.size === 0)
99
+ this.byPath.delete(lease.path);
100
+ }
101
+ clearActor(actorId, includeLeases = true) {
102
+ for (const [path, entries] of this.byPath) {
103
+ const current = entries.get(actorId);
104
+ if (current && (includeLeases || !current.leaseId))
105
+ entries.delete(actorId);
106
+ if (!entries.size)
107
+ this.byPath.delete(path);
108
+ }
109
+ if (includeLeases) {
110
+ for (const [id, lease] of this.leases) {
111
+ if (lease.actor.id === actorId)
112
+ this.release(lease);
113
+ }
114
+ }
115
+ }
116
+ activeConflicts(path, actorId) {
117
+ this.prune(path);
118
+ return [...(this.byPath.get(path)?.values() ?? [])]
119
+ .filter((entry) => entry.actor.id !== actorId && ACTIVE_MODES.has(entry.mode))
120
+ .map(({ leaseId: _leaseId, ...entry }) => entry);
121
+ }
122
+ storageFailure(path, error) {
123
+ return { path, mode: "writing", updatedAt: Date.now(), actor: { id: "lease-store", kind: "external",
124
+ label: "coordinamento file non disponibile: " + (error instanceof Error ? error.message : String(error)) } };
125
+ }
126
+ put(entry) {
127
+ let entries = this.byPath.get(entry.path);
128
+ if (!entries) {
129
+ entries = new Map();
130
+ this.byPath.set(entry.path, entries);
131
+ }
132
+ entries.set(entry.actor.id, entry);
133
+ }
134
+ prune(onlyPath) {
135
+ const cutoff = Date.now() - EXTERNAL_PRESENCE_TTL_MS;
136
+ const paths = onlyPath ? [onlyPath] : [...this.byPath.keys()];
137
+ for (const path of paths) {
138
+ const entries = this.byPath.get(path);
139
+ if (!entries)
140
+ continue;
141
+ for (const [actorId, entry] of entries) {
142
+ const external = entry.actor.kind === "human" || entry.actor.kind === "external";
143
+ if (external && !entry.leaseId && entry.updatedAt < cutoff)
144
+ entries.delete(actorId);
145
+ }
146
+ if (!entries.size)
147
+ this.byPath.delete(path);
148
+ }
149
+ }
150
+ }
151
+ function canonicalLocalPath(path) {
152
+ let parent = path;
153
+ const tail = [];
154
+ for (;;) {
155
+ try {
156
+ return join(realpathSync(parent), ...tail);
157
+ }
158
+ catch { /* resolve the closest existing ancestor */ }
159
+ const next = dirname(parent);
160
+ if (next === parent)
161
+ return path;
162
+ tail.unshift(basename(parent));
163
+ parent = next;
164
+ }
165
+ }
166
+ export function fileActor(id, label, kind) {
167
+ return Object.freeze({ id: id.trim(), label: label.trim() || id.trim(), kind });
168
+ }
169
+ export function withFileActor(context, actor) {
170
+ return { ...context, actor };
171
+ }
172
+ export function formatFileConflicts(conflicts) {
173
+ return conflicts
174
+ .map((entry) => `${entry.actor.label} (${entry.mode === "writing" ? "sta scrivendo" : "sta modificando"})`)
175
+ .join(", ");
176
+ }