saeeol 1.1.1 → 1.2.1

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 (379) hide show
  1. package/package.json +14 -14
  2. package/script/build.ts +1 -1
  3. package/src/addons/addon-analytics.ts +1 -1
  4. package/src/cli/cmd/tui/routes/session/suggest.tsx +1 -1
  5. package/src/cli/logo.ts +1 -1
  6. package/src/cli/ui.ts +1 -1
  7. package/src/config/config-loader.ts +1 -1
  8. package/src/config/config-schema.ts +1 -1
  9. package/src/config/config.ts +1 -1
  10. package/src/config/markdown.ts +1 -1
  11. package/src/index.ts +2 -2
  12. package/src/lsp/lsp.ts +1 -1
  13. package/src/lsp/server-web.ts +1 -1
  14. package/src/mcp/oauth-callback.ts +1 -1
  15. package/src/{saeeol → overlay}/encoding.ts +1 -1
  16. package/src/{saeeol → overlay}/text-stream.ts +1 -1
  17. package/src/{saeeol → overlay}/tool/encoded-io.ts +1 -1
  18. package/src/patch/patch-apply.ts +1 -1
  19. package/src/patch/patch-parse.ts +1 -1
  20. package/src/session/compaction-helpers.ts +1 -169
  21. package/src/session/compaction.ts +1 -712
  22. package/src/session/core/compaction/compaction-helpers.ts +169 -0
  23. package/src/session/core/compaction/compaction.ts +712 -0
  24. package/src/session/core/compaction/overflow.ts +28 -0
  25. package/src/session/core/instruction.ts +234 -0
  26. package/src/session/core/llm.ts +504 -0
  27. package/src/session/core/network.ts +392 -0
  28. package/src/session/core/processor.ts +731 -0
  29. package/src/session/core/projectors.ts +139 -0
  30. package/src/session/core/resolve-tools.ts +241 -0
  31. package/src/session/core/retry.ts +149 -0
  32. package/src/session/core/revert.ts +173 -0
  33. package/src/session/core/run-state.ts +110 -0
  34. package/src/session/core/schema.ts +35 -0
  35. package/src/session/core/session-types.ts +160 -0
  36. package/src/session/core/session.sql.ts +124 -0
  37. package/src/session/core/session.ts +948 -0
  38. package/src/session/core/shell-exec.ts +205 -0
  39. package/src/session/core/status.ts +100 -0
  40. package/src/session/core/subtask.ts +268 -0
  41. package/src/session/core/summary.ts +173 -0
  42. package/src/session/core/system.ts +114 -0
  43. package/src/session/core/todo.ts +86 -0
  44. package/src/session/core/user-part.ts +293 -0
  45. package/src/session/instruction.ts +1 -234
  46. package/src/session/llm.ts +1 -504
  47. package/src/session/message/message-errors.ts +83 -0
  48. package/src/session/message/message-parts.ts +89 -0
  49. package/src/session/message/message-query.ts +107 -0
  50. package/src/session/message/message-transform.ts +156 -0
  51. package/src/session/message/message-types.ts +68 -0
  52. package/src/session/message/message-v2.ts +73 -0
  53. package/src/session/message/message.ts +192 -0
  54. package/src/session/message-errors.ts +1 -83
  55. package/src/session/message-parts.ts +1 -89
  56. package/src/session/message-query.ts +1 -107
  57. package/src/session/message-transform.ts +1 -156
  58. package/src/session/message-types.ts +1 -68
  59. package/src/session/message-v2.ts +1 -73
  60. package/src/session/message.ts +1 -192
  61. package/src/session/network.ts +1 -392
  62. package/src/session/overflow.ts +1 -28
  63. package/src/session/processor.ts +1 -731
  64. package/src/session/projectors.ts +2 -139
  65. package/src/session/prompt/prompt-command.ts +93 -0
  66. package/src/session/prompt/prompt-loop.ts +299 -0
  67. package/src/session/prompt/prompt-model.ts +44 -0
  68. package/src/session/prompt/prompt-reminders.ts +120 -0
  69. package/src/session/prompt/prompt-resolve.ts +42 -0
  70. package/src/session/prompt/prompt-schemas.ts +128 -0
  71. package/src/session/prompt/prompt-title.ts +55 -0
  72. package/src/session/prompt/prompt-types.ts +47 -0
  73. package/src/session/prompt/prompt-user-msg.ts +80 -0
  74. package/src/session/prompt/prompt.ts +211 -0
  75. package/src/session/prompt-command.ts +1 -93
  76. package/src/session/prompt-loop.ts +1 -299
  77. package/src/session/prompt-model.ts +1 -44
  78. package/src/session/prompt-reminders.ts +1 -120
  79. package/src/session/prompt-resolve.ts +1 -42
  80. package/src/session/prompt-schemas.ts +1 -128
  81. package/src/session/prompt-title.ts +1 -55
  82. package/src/session/prompt-types.ts +1 -47
  83. package/src/session/prompt-user-msg.ts +1 -80
  84. package/src/session/prompt.ts +1 -211
  85. package/src/session/resolve-tools.ts +1 -241
  86. package/src/session/retry.ts +1 -149
  87. package/src/session/revert.ts +1 -173
  88. package/src/session/run-state.ts +1 -110
  89. package/src/session/schema.ts +1 -35
  90. package/src/session/session-types.ts +1 -160
  91. package/src/session/session.sql.ts +1 -124
  92. package/src/session/session.ts +1 -948
  93. package/src/session/shell-exec.ts +1 -205
  94. package/src/session/status.ts +1 -100
  95. package/src/session/subtask.ts +1 -268
  96. package/src/session/summary.ts +1 -173
  97. package/src/session/system.ts +1 -114
  98. package/src/session/todo.ts +1 -86
  99. package/src/session/user-part.ts +1 -293
  100. package/src/skill/index.ts +1 -1
  101. package/src/suggestion/index.ts +1 -1
  102. package/src/tool/apply_patch.ts +2 -2
  103. package/src/tool/edit.ts +2 -2
  104. package/src/tool/read.ts +2 -2
  105. package/src/tool/recall.ts +1 -1
  106. package/src/tool/registry.ts +2 -2
  107. package/src/tool/suggest.ts +1 -1
  108. package/src/tool/task.ts +3 -3
  109. package/src/tool/todo.ts +1 -1
  110. package/src/tool/write.ts +2 -2
  111. package/test/lsp/index.test.ts +1 -1
  112. package/test/saeeol/agent-manager-tool.test.ts +1 -1
  113. package/test/saeeol/ask-agent-permissions.test.ts +1 -1
  114. package/test/saeeol/bash-hierarchy.test.ts +1 -1
  115. package/test/saeeol/builtin-skills.test.ts +1 -1
  116. package/test/saeeol/cli/dev-setup.test.ts +1 -1
  117. package/test/saeeol/cli/roll-call.test.ts +1 -1
  118. package/test/saeeol/cli-run-auto-helper.test.ts +1 -1
  119. package/test/saeeol/codex-auth-refresh.test.ts +1 -1
  120. package/test/saeeol/commit-message/generate.test.ts +1 -1
  121. package/test/saeeol/commit-message/git-context.test.ts +1 -1
  122. package/test/saeeol/commit-message-windows.test.ts +1 -1
  123. package/test/saeeol/compaction-payload-recovery.test.ts +1 -1
  124. package/test/saeeol/config/config.test.ts +1 -1
  125. package/test/saeeol/config-injector.test.ts +1 -1
  126. package/test/saeeol/config-validation.test.ts +1 -1
  127. package/test/saeeol/cost-propagation.test.ts +1 -1
  128. package/test/saeeol/custom-provider-delete.test.ts +1 -1
  129. package/test/saeeol/diff-full.test.ts +1 -1
  130. package/test/saeeol/encoding.test.ts +1 -1
  131. package/test/saeeol/enhance-prompt.test.ts +1 -1
  132. package/test/saeeol/ensure-plan-dir.test.ts +1 -1
  133. package/test/saeeol/errors.test.ts +1 -1
  134. package/test/saeeol/help.test.ts +3 -3
  135. package/test/saeeol/ignore-migrator.test.ts +1 -1
  136. package/test/saeeol/indexing-auth.test.ts +1 -1
  137. package/test/saeeol/indexing-feature.test.ts +1 -1
  138. package/test/saeeol/indexing-label.test.ts +1 -1
  139. package/test/saeeol/indexing-startup.test.ts +1 -1
  140. package/test/saeeol/indexing-worktree.test.ts +1 -1
  141. package/test/saeeol/lancedb-runtime.test.ts +9 -9
  142. package/test/saeeol/logo.test.ts +1 -1
  143. package/test/saeeol/lsp-typescript-lightweight.test.ts +2 -2
  144. package/test/saeeol/mcp-migrator.test.ts +1 -1
  145. package/test/saeeol/model-info-panel-utils.test.ts +1 -1
  146. package/test/saeeol/modes-migrator.test.ts +1 -1
  147. package/test/saeeol/paths.test.ts +1 -1
  148. package/test/saeeol/permission/config-paths.test.ts +2 -2
  149. package/test/saeeol/permission/external-directory-allow.test.ts +1 -1
  150. package/test/saeeol/plan-exit-detection.test.ts +1 -1
  151. package/test/saeeol/plan-followup.test.ts +2 -2
  152. package/test/saeeol/project-id.test.ts +1 -1
  153. package/test/saeeol/question-dismiss-all.test.ts +1 -1
  154. package/test/saeeol/rules-migrator.test.ts +1 -1
  155. package/test/saeeol/semantic-search.test.ts +2 -2
  156. package/test/saeeol/session/platform-attribution.test.ts +1 -1
  157. package/test/saeeol/session-compaction-cap.test.ts +2 -2
  158. package/test/saeeol/session-compaction-chunks.test.ts +1 -1
  159. package/test/saeeol/session-compaction-safety.test.ts +1 -1
  160. package/test/saeeol/session-import-service.test.ts +1 -1
  161. package/test/saeeol/session-processor-empty-tool-calls.test.ts +1 -1
  162. package/test/saeeol/session-processor-review-telemetry.test.ts +1 -1
  163. package/test/saeeol/session-prompt-queue.test.ts +1 -1
  164. package/test/saeeol/sessions/remote-sender.test.ts +1 -1
  165. package/test/saeeol/snapshot-track-timeout.test.ts +1 -1
  166. package/test/saeeol/suggestion/auto-dismiss.test.ts +2 -2
  167. package/test/saeeol/suggestion/suggestion.test.ts +1 -1
  168. package/test/saeeol/suggestion/tool.test.ts +2 -2
  169. package/test/saeeol/system-prompt.test.ts +1 -1
  170. package/test/saeeol/todo-view.test.ts +1 -1
  171. package/test/saeeol/tool-registry-indexing.test.ts +3 -3
  172. package/test/saeeol/tui-diff.test.ts +1 -1
  173. package/test/saeeol/tui-sync.test.ts +1 -1
  174. package/test/saeeol/util/url.test.ts +1 -1
  175. package/test/saeeol/workflows-migrator.test.ts +1 -1
  176. package/test/saeeol/worktree-diff-summary.test.ts +1 -1
  177. package/tsconfig.json +1 -1
  178. /package/src/{saeeol → overlay}/agent/agent-remove.ts +0 -0
  179. /package/src/{saeeol → overlay}/agent/index.ts +0 -0
  180. /package/src/{saeeol → overlay}/agent/patch-agents.ts +0 -0
  181. /package/src/{saeeol → overlay}/agent/permissions.ts +0 -0
  182. /package/src/{saeeol → overlay}/agent-manager/event.ts +0 -0
  183. /package/src/{saeeol → overlay}/bash-hierarchy.ts +0 -0
  184. /package/src/{saeeol → overlay}/bell.ts +0 -0
  185. /package/src/{saeeol → overlay}/bootstrap.ts +0 -0
  186. /package/src/{saeeol → overlay}/claw/autocomplete-popup.tsx +0 -0
  187. /package/src/{saeeol → overlay}/claw/autocomplete-ref.ts +0 -0
  188. /package/src/{saeeol → overlay}/claw/autocomplete-types.ts +0 -0
  189. /package/src/{saeeol → overlay}/claw/autocomplete.tsx +0 -0
  190. /package/src/{saeeol → overlay}/claw/chat-client.ts +0 -0
  191. /package/src/{saeeol → overlay}/claw/chat.tsx +0 -0
  192. /package/src/{saeeol → overlay}/claw/client-events.ts +0 -0
  193. /package/src/{saeeol → overlay}/claw/client-helpers.ts +0 -0
  194. /package/src/{saeeol → overlay}/claw/client.ts +0 -0
  195. /package/src/{saeeol → overlay}/claw/dialog-conversation-list.tsx +0 -0
  196. /package/src/{saeeol → overlay}/claw/event-service-client-core.ts +0 -0
  197. /package/src/{saeeol → overlay}/claw/event-service-client-impl.ts +0 -0
  198. /package/src/{saeeol → overlay}/claw/event-service-client.ts +0 -0
  199. /package/src/{saeeol → overlay}/claw/hooks.ts +0 -0
  200. /package/src/{saeeol → overlay}/claw/sidebar.tsx +0 -0
  201. /package/src/{saeeol → overlay}/claw/types.ts +0 -0
  202. /package/src/{saeeol → overlay}/claw/view.tsx +0 -0
  203. /package/src/{saeeol → overlay}/cli/cmd/roll-call-call.ts +0 -0
  204. /package/src/{saeeol → overlay}/cli/cmd/roll-call-format.ts +0 -0
  205. /package/src/{saeeol → overlay}/cli/cmd/roll-call.ts +0 -0
  206. /package/src/{saeeol → overlay}/cli/cmd/tui/app.tsx +0 -0
  207. /package/src/{saeeol → overlay}/cli/cmd/tui/component/dialog-provider.tsx +0 -0
  208. /package/src/{saeeol → overlay}/cli/cmd/tui/feedback.ts +0 -0
  209. /package/src/{saeeol → overlay}/cli/cmd/tui/util/terminal.ts +0 -0
  210. /package/src/{saeeol → overlay}/cli/dev-setup-utils.ts +0 -0
  211. /package/src/{saeeol → overlay}/cli/dev-setup.ts +0 -0
  212. /package/src/{saeeol → overlay}/cli/heap-snapshot.ts +0 -0
  213. /package/src/{saeeol → overlay}/cli/logo.ts +0 -0
  214. /package/src/{saeeol → overlay}/cli/run-auto.ts +0 -0
  215. /package/src/{saeeol → overlay}/cli/saeeol-logo.ts +0 -0
  216. /package/src/{saeeol → overlay}/cloud-session.ts +0 -0
  217. /package/src/{saeeol → overlay}/commands-index.ts +0 -0
  218. /package/src/{saeeol → overlay}/commands.ts +0 -0
  219. /package/src/{saeeol → overlay}/commands.tsx +0 -0
  220. /package/src/{saeeol → overlay}/commit-message/generate.ts +0 -0
  221. /package/src/{saeeol → overlay}/commit-message/git-context.ts +0 -0
  222. /package/src/{saeeol → overlay}/commit-message/index.ts +0 -0
  223. /package/src/{saeeol → overlay}/commit-message/types.ts +0 -0
  224. /package/src/{saeeol → overlay}/components/dialog-auto-method.tsx +0 -0
  225. /package/src/{saeeol → overlay}/components/dialog-claw-setup.tsx +0 -0
  226. /package/src/{saeeol → overlay}/components/dialog-claw-upgrade.tsx +0 -0
  227. /package/src/{saeeol → overlay}/components/dialog-indexing-helpers.ts +0 -0
  228. /package/src/{saeeol → overlay}/components/dialog-indexing.tsx +0 -0
  229. /package/src/{saeeol → overlay}/components/dialog-notifications.tsx +0 -0
  230. /package/src/{saeeol → overlay}/components/dialog-organization.tsx +0 -0
  231. /package/src/{saeeol → overlay}/components/dialog-profile.tsx +0 -0
  232. /package/src/{saeeol → overlay}/components/dialog-provider-settings.tsx +0 -0
  233. /package/src/{saeeol → overlay}/components/dialog-team-select.tsx +0 -0
  234. /package/src/{saeeol → overlay}/components/dialog-tuning.tsx +0 -0
  235. /package/src/{saeeol → overlay}/components/dialog-vector-store.tsx +0 -0
  236. /package/src/{saeeol → overlay}/components/error-display.tsx +0 -0
  237. /package/src/{saeeol → overlay}/components/model-info-panel-utils.ts +0 -0
  238. /package/src/{saeeol → overlay}/components/model-info-panel.tsx +0 -0
  239. /package/src/{saeeol → overlay}/components/news.tsx +0 -0
  240. /package/src/{saeeol → overlay}/components/notification-banner.tsx +0 -0
  241. /package/src/{saeeol → overlay}/components/session-indexing.tsx +0 -0
  242. /package/src/{saeeol → overlay}/components/tips.tsx +0 -0
  243. /package/src/{saeeol → overlay}/config/config-core.ts +0 -0
  244. /package/src/{saeeol → overlay}/config/config-helpers.ts +0 -0
  245. /package/src/{saeeol → overlay}/config/config-legacy.ts +0 -0
  246. /package/src/{saeeol → overlay}/config/config.ts +0 -0
  247. /package/src/{saeeol → overlay}/config/default-plugins.ts +0 -0
  248. /package/src/{saeeol → overlay}/config/markdown.ts +0 -0
  249. /package/src/{saeeol → overlay}/config-injector.ts +0 -0
  250. /package/src/{saeeol → overlay}/config-validation.ts +0 -0
  251. /package/src/{saeeol → overlay}/const.ts +0 -0
  252. /package/src/{saeeol → overlay}/cost-tracker/format.ts +0 -0
  253. /package/src/{saeeol → overlay}/cost-tracker/index.ts +0 -0
  254. /package/src/{saeeol → overlay}/cost-tracker/state.ts +0 -0
  255. /package/src/{saeeol → overlay}/cost-tracker/types.ts +0 -0
  256. /package/src/{saeeol → overlay}/docs/migration.md +0 -0
  257. /package/src/{saeeol → overlay}/docs/rules-migration.md +0 -0
  258. /package/src/{saeeol → overlay}/editor-context.ts +0 -0
  259. /package/src/{saeeol → overlay}/enhance-prompt.ts +0 -0
  260. /package/src/{saeeol → overlay}/errors.ts +0 -0
  261. /package/src/{saeeol → overlay}/generate-cli-docs.ts +0 -0
  262. /package/src/{saeeol → overlay}/help-command.ts +0 -0
  263. /package/src/{saeeol → overlay}/help.ts +0 -0
  264. /package/src/{saeeol → overlay}/i18n/index.ts +0 -0
  265. /package/src/{saeeol → overlay}/ignore-migrator.ts +0 -0
  266. /package/src/{saeeol → overlay}/index.ts +0 -0
  267. /package/src/{saeeol → overlay}/indexing-auth.ts +0 -0
  268. /package/src/{saeeol → overlay}/indexing-feature.ts +0 -0
  269. /package/src/{saeeol → overlay}/indexing-helpers.ts +0 -0
  270. /package/src/{saeeol → overlay}/indexing-label.ts +0 -0
  271. /package/src/{saeeol → overlay}/indexing-state.ts +0 -0
  272. /package/src/{saeeol → overlay}/indexing-types.ts +0 -0
  273. /package/src/{saeeol → overlay}/indexing.ts +0 -0
  274. /package/src/{saeeol → overlay}/lancedb.ts +0 -0
  275. /package/src/{saeeol → overlay}/mcp-migrator.ts +0 -0
  276. /package/src/{saeeol → overlay}/mcp-oauth-callback.ts +0 -0
  277. /package/src/{saeeol → overlay}/memory/age.ts +0 -0
  278. /package/src/{saeeol → overlay}/memory/index.ts +0 -0
  279. /package/src/{saeeol → overlay}/memory/paths.ts +0 -0
  280. /package/src/{saeeol → overlay}/memory/scan.ts +0 -0
  281. /package/src/{saeeol → overlay}/memory/types.ts +0 -0
  282. /package/src/{saeeol → overlay}/model-match.ts +0 -0
  283. /package/src/{saeeol → overlay}/modes-migrator.ts +0 -0
  284. /package/src/{saeeol → overlay}/paths.ts +0 -0
  285. /package/src/{saeeol → overlay}/permission/config-paths.ts +0 -0
  286. /package/src/{saeeol → overlay}/permission/drain.ts +0 -0
  287. /package/src/{saeeol → overlay}/permission/external-directory.ts +0 -0
  288. /package/src/{saeeol → overlay}/permission/read.ts +0 -0
  289. /package/src/{saeeol → overlay}/permission/routes.ts +0 -0
  290. /package/src/{saeeol → overlay}/permission/rule.ts +0 -0
  291. /package/src/{saeeol → overlay}/plan-followup-handover.ts +0 -0
  292. /package/src/{saeeol → overlay}/plan-followup-runtime.ts +0 -0
  293. /package/src/{saeeol → overlay}/plan-followup-session.ts +0 -0
  294. /package/src/{saeeol → overlay}/plan-followup.ts +0 -0
  295. /package/src/{saeeol → overlay}/plugins/home-footer.tsx +0 -0
  296. /package/src/{saeeol → overlay}/plugins/home-news.tsx +0 -0
  297. /package/src/{saeeol → overlay}/plugins/home-onboarding.tsx +0 -0
  298. /package/src/{saeeol → overlay}/plugins/sidebar-footer.tsx +0 -0
  299. /package/src/{saeeol → overlay}/plugins/sidebar-pr.tsx +0 -0
  300. /package/src/{saeeol → overlay}/plugins/sidebar-usage.tsx +0 -0
  301. /package/src/{saeeol → overlay}/project-id.ts +0 -0
  302. /package/src/{saeeol → overlay}/provider/codex-refresh.ts +0 -0
  303. /package/src/{saeeol → overlay}/provider/provider.ts +0 -0
  304. /package/src/{saeeol → overlay}/provider-options.ts +0 -0
  305. /package/src/{saeeol → overlay}/question/index.ts +0 -0
  306. /package/src/{saeeol → overlay}/remote-tui.tsx +0 -0
  307. /package/src/{saeeol → overlay}/review/command.ts +0 -0
  308. /package/src/{saeeol → overlay}/review/diff.ts +0 -0
  309. /package/src/{saeeol → overlay}/review/prompt.ts +0 -0
  310. /package/src/{saeeol → overlay}/review/review.ts +0 -0
  311. /package/src/{saeeol → overlay}/review/types.ts +0 -0
  312. /package/src/{saeeol → overlay}/review/worktree-diff.ts +0 -0
  313. /package/src/{saeeol → overlay}/rules-migrator.ts +0 -0
  314. /package/src/{saeeol → overlay}/server/instance.ts +0 -0
  315. /package/src/{saeeol → overlay}/server/router.ts +0 -0
  316. /package/src/{saeeol → overlay}/server/routes/commit-message.ts +0 -0
  317. /package/src/{saeeol → overlay}/server/routes/indexing.ts +0 -0
  318. /package/src/{saeeol → overlay}/server/server.ts +0 -0
  319. /package/src/{saeeol → overlay}/session/compaction-chunks-core.ts +0 -0
  320. /package/src/{saeeol → overlay}/session/compaction-chunks-utils.ts +0 -0
  321. /package/src/{saeeol → overlay}/session/compaction-chunks.ts +0 -0
  322. /package/src/{saeeol → overlay}/session/compaction-payload-recovery.ts +0 -0
  323. /package/src/{saeeol → overlay}/session/cost-propagation.ts +0 -0
  324. /package/src/{saeeol → overlay}/session/digest-storage.ts +0 -0
  325. /package/src/{saeeol → overlay}/session/fork.ts +0 -0
  326. /package/src/{saeeol → overlay}/session/index.ts +0 -0
  327. /package/src/{saeeol → overlay}/session/instruction.ts +0 -0
  328. /package/src/{saeeol → overlay}/session/kg-compaction.ts +0 -0
  329. /package/src/{saeeol → overlay}/session/llm.ts +0 -0
  330. /package/src/{saeeol → overlay}/session/overflow.ts +0 -0
  331. /package/src/{saeeol → overlay}/session/platform.ts +0 -0
  332. /package/src/{saeeol → overlay}/session/processor.ts +0 -0
  333. /package/src/{saeeol → overlay}/session/prompt-context.ts +0 -0
  334. /package/src/{saeeol → overlay}/session/prompt-plan.ts +0 -0
  335. /package/src/{saeeol → overlay}/session/prompt-queue.ts +0 -0
  336. /package/src/{saeeol → overlay}/session/prompt.ts +0 -0
  337. /package/src/{saeeol → overlay}/session/queries.ts +0 -0
  338. /package/src/{saeeol → overlay}/session/tui-sync.ts +0 -0
  339. /package/src/{saeeol → overlay}/session-import/routes.ts +0 -0
  340. /package/src/{saeeol → overlay}/session-import/service.ts +0 -0
  341. /package/src/{saeeol → overlay}/session-import/types.ts +0 -0
  342. /package/src/{saeeol → overlay}/skills/builtin.ts +0 -0
  343. /package/src/{saeeol → overlay}/skills/config.md +0 -0
  344. /package/src/{saeeol → overlay}/snapshot/diff-full.ts +0 -0
  345. /package/src/{saeeol → overlay}/snapshot/index.ts +0 -0
  346. /package/src/{saeeol → overlay}/snapshot/track-hooks.ts +0 -0
  347. /package/src/{saeeol → overlay}/snapshot/track-types.ts +0 -0
  348. /package/src/{saeeol → overlay}/snapshot/track.ts +0 -0
  349. /package/src/{saeeol → overlay}/soul.txt +0 -0
  350. /package/src/{saeeol → overlay}/suggestion/index.ts +0 -0
  351. /package/src/{saeeol → overlay}/suggestion/routes.ts +0 -0
  352. /package/src/{saeeol → overlay}/suggestion/tool.ts +0 -0
  353. /package/src/{saeeol → overlay}/suggestion/tool.txt +0 -0
  354. /package/src/{saeeol → overlay}/suggestion/tui/bar.tsx +0 -0
  355. /package/src/{saeeol → overlay}/suggestion/tui/prompt.tsx +0 -0
  356. /package/src/{saeeol → overlay}/suggestion/tui/render.tsx +0 -0
  357. /package/src/{saeeol → overlay}/suggestion/tui/sync.ts +0 -0
  358. /package/src/{saeeol → overlay}/system-prompt.ts +0 -0
  359. /package/src/{saeeol → overlay}/todo-view.ts +0 -0
  360. /package/src/{saeeol → overlay}/tool/agent-manager.ts +0 -0
  361. /package/src/{saeeol → overlay}/tool/agent-manager.txt +0 -0
  362. /package/src/{saeeol → overlay}/tool/bash-security-patterns.ts +0 -0
  363. /package/src/{saeeol → overlay}/tool/bash-security.ts +0 -0
  364. /package/src/{saeeol → overlay}/tool/question.ts +0 -0
  365. /package/src/{saeeol → overlay}/tool/registry.ts +0 -0
  366. /package/src/{saeeol → overlay}/tool/semantic-search.ts +0 -0
  367. /package/src/{saeeol → overlay}/tool/semantic-search.txt +0 -0
  368. /package/src/{saeeol → overlay}/tool/task.ts +0 -0
  369. /package/src/{saeeol → overlay}/ts-check.ts +0 -0
  370. /package/src/{saeeol → overlay}/ts-client.ts +0 -0
  371. /package/src/{saeeol → overlay}/tui/diff.ts +0 -0
  372. /package/src/{saeeol → overlay}/util/url.ts +0 -0
  373. /package/src/{saeeol → overlay}/worker/index.ts +0 -0
  374. /package/src/{saeeol → overlay}/worker/pool.ts +0 -0
  375. /package/src/{saeeol → overlay}/worker/store.ts +0 -0
  376. /package/src/{saeeol → overlay}/worker/types.ts +0 -0
  377. /package/src/{saeeol → overlay}/workflows-migrator.ts +0 -0
  378. /package/src/{saeeol → overlay}/worktree-cleanup.ts +0 -0
  379. /package/src/{saeeol → overlay}/worktree-family.ts +0 -0
@@ -1,68 +1 @@
1
- /** User/Assistant 스키마 + Events + Cursor — message-v2.ts에서 분리 */
2
-
3
- import { SessionID, MessageID, PartID } from "./schema"
4
- import { Snapshot } from "@/snapshot"
5
- import { SyncEvent } from "../sync"
6
- import { BusEvent } from "@/bus/bus-event"
7
- import { Effect, Schema, Types } from "effect"
8
- import { zod } from "@/util/effect-zod"
9
- import { NonNegativeInt, withStatics } from "@/util/schema"
10
- import { ModelID, ProviderID } from "@/provider/schema"
11
- import { _Part } from "./message-parts"
12
- import { AssistantErrorSchema, AssistantErrorZod, _Format } from "./message-errors"
13
- export { AssistantErrorSchema, AssistantErrorZod, _Format, _Part as Part }
14
- export type { AssistantError } from "./message-errors"
15
- import z from "zod"
16
-
17
- const messageBase = { id: MessageID, sessionID: SessionID }
18
-
19
- export const EditorContext = Schema.Struct({
20
- visibleFiles: Schema.optional(Schema.Array(Schema.String)), openTabs: Schema.optional(Schema.Array(Schema.String)),
21
- activeFile: Schema.optional(Schema.String), shell: Schema.optional(Schema.String),
22
- })
23
- export type EditorContext = Types.DeepMutable<Schema.Schema.Type<typeof EditorContext>>
24
-
25
- export const User = Schema.Struct({
26
- ...messageBase, role: Schema.Literal("user"), time: Schema.Struct({ created: NonNegativeInt }), format: Schema.optional(_Format),
27
- summary: Schema.optional(Schema.Struct({ title: Schema.optional(Schema.String), body: Schema.optional(Schema.String), diffs: Schema.Array(Snapshot.FileDiff) })),
28
- agent: Schema.String, model: Schema.Struct({ providerID: ProviderID, modelID: ModelID, variant: Schema.optional(Schema.String) }),
29
- system: Schema.optional(Schema.String), tools: Schema.optional(Schema.Record(Schema.String, Schema.Boolean)), editorContext: Schema.optional(EditorContext),
30
- }).annotate({ identifier: "UserMessage" }).pipe(withStatics((s) => ({ zod: zod(s) })))
31
- export type User = Types.DeepMutable<Schema.Schema.Type<typeof User>>
32
-
33
- export const Assistant = Schema.Struct({
34
- ...messageBase, role: Schema.Literal("assistant"), time: Schema.Struct({ created: NonNegativeInt, completed: Schema.optional(NonNegativeInt) }),
35
- error: Schema.optional(AssistantErrorSchema), parentID: MessageID, modelID: ModelID, providerID: ProviderID, mode: Schema.String, agent: Schema.String,
36
- path: Schema.Struct({ cwd: Schema.String, root: Schema.String }), summary: Schema.optional(Schema.Boolean), cost: Schema.Finite,
37
- tokens: Schema.Struct({ total: Schema.optional(NonNegativeInt), input: NonNegativeInt, output: NonNegativeInt, reasoning: NonNegativeInt, cache: Schema.Struct({ read: NonNegativeInt, write: NonNegativeInt }) }),
38
- structured: Schema.optional(Schema.Any), variant: Schema.optional(Schema.String), finish: Schema.optional(Schema.String),
39
- }).annotate({ identifier: "AssistantMessage" }).pipe(withStatics((s) => ({ zod: zod(s) })))
40
- export type Assistant = Omit<Types.DeepMutable<Schema.Schema.Type<typeof Assistant>>, "error"> & { error?: import("./message-errors").AssistantError }
41
-
42
- const _Info = Schema.Union([User, Assistant]).annotate({ discriminator: "role", identifier: "Message" })
43
- export const Info = Object.assign(_Info, { zod: zod(_Info) as unknown as z.ZodType<User | Assistant> })
44
- export type Info = User | Assistant
45
-
46
- export const WithParts = Schema.Struct({ info: _Info, parts: Schema.Array(_Part) }).pipe(withStatics((s) => ({ zod: zod(s) })))
47
- export type WithParts = { info: Info; parts: import("./message-parts").Part[] }
48
-
49
- const UpdatedEventSchema = Schema.Struct({ sessionID: SessionID, info: _Info })
50
- const RemovedEventSchema = Schema.Struct({ sessionID: SessionID, messageID: MessageID })
51
- const PartUpdatedEventSchema = Schema.Struct({ sessionID: SessionID, part: _Part, time: NonNegativeInt })
52
- const PartRemovedEventSchema = Schema.Struct({ sessionID: SessionID, messageID: MessageID, partID: PartID })
53
-
54
- export const Event = {
55
- Updated: SyncEvent.define({ type: "message.updated", version: 1, aggregate: "sessionID", schema: UpdatedEventSchema }),
56
- Removed: SyncEvent.define({ type: "message.removed", version: 1, aggregate: "sessionID", schema: RemovedEventSchema }),
57
- PartUpdated: SyncEvent.define({ type: "message.part.updated", version: 1, aggregate: "sessionID", schema: PartUpdatedEventSchema }),
58
- PartDelta: BusEvent.define("message.part.delta", Schema.Struct({ sessionID: SessionID, messageID: MessageID, partID: PartID, field: Schema.String, delta: Schema.String })),
59
- PartRemoved: SyncEvent.define({ type: "message.part.removed", version: 1, aggregate: "sessionID", schema: PartRemovedEventSchema }),
60
- }
61
-
62
- const Cursor = Schema.Struct({ id: MessageID, time: Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0)) })
63
- type Cursor = typeof Cursor.Type
64
- const decodeCursor = Schema.decodeUnknownSync(Cursor)
65
- export const cursor = {
66
- encode(input: Cursor) { return Buffer.from(JSON.stringify(input)).toString("base64url") },
67
- decode(input: string) { return decodeCursor(JSON.parse(Buffer.from(input, "base64url").toString("utf8"))) },
68
- }
1
+ export * from "./message/message-types"
@@ -1,73 +1 @@
1
- export {
2
- OutputLengthError,
3
- AbortedError,
4
- StructuredOutputError,
5
- AuthError,
6
- APIError,
7
- ContextOverflowError,
8
- OutputFormatText,
9
- OutputFormatJsonSchema,
10
- Format,
11
- fromError,
12
- } from "./message-errors"
13
- export type { OutputFormat } from "./message-errors"
14
-
15
- export {
16
- SnapshotPart,
17
- PatchPart,
18
- TextPart,
19
- ReasoningPart,
20
- FileSource,
21
- SymbolSource,
22
- ResourceSource,
23
- FilePartSource,
24
- FilePart,
25
- AgentPart,
26
- CompactionPart,
27
- SubtaskPart,
28
- RetryPart,
29
- StepStartPart,
30
- StepFinishPart,
31
- ToolStatePending,
32
- ToolStateRunning,
33
- ToolStateCompleted,
34
- ToolStateError,
35
- ToolState,
36
- ToolPart,
37
- truncateToolOutput,
38
- TextPartInput,
39
- FilePartInput,
40
- AgentPartInput,
41
- SubtaskPartInput,
42
- Part,
43
- } from "./message-parts"
44
-
45
- export {
46
- EditorContext,
47
- User,
48
- Assistant,
49
- Info,
50
- WithParts,
51
- Event,
52
- cursor,
53
- } from "./message-types"
54
-
55
- export {
56
- SYNTHETIC_ATTACHMENT_PROMPT,
57
- isMedia,
58
- stripPartMetadata,
59
- stripMessageMetadata,
60
- toModelMessagesEffect,
61
- toModelMessages,
62
- } from "./message-transform"
63
-
64
- export {
65
- page,
66
- stream,
67
- parts,
68
- get,
69
- filterCompacted,
70
- filterCompactedEffect,
71
- } from "./message-query"
72
-
73
- export * as MessageV2 from "./message-v2"
1
+ export * from "./message/message-v2"
@@ -1,192 +1 @@
1
- import { Schema } from "effect"
2
- import { SessionID } from "./schema"
3
- import { ModelID, ProviderID } from "../provider/schema"
4
- import { zod } from "@/util/effect-zod"
5
- import { NonNegativeInt, withStatics } from "@/util/schema"
6
- import { namedSchemaError } from "@/util/named-schema-error"
7
-
8
- export const OutputLengthError = namedSchemaError("MessageOutputLengthError", {})
9
- export const AuthError = namedSchemaError("ProviderAuthError", {
10
- providerID: Schema.String,
11
- message: Schema.String,
12
- })
13
-
14
- const AuthErrorEffect = Schema.Struct({
15
- name: Schema.Literal("ProviderAuthError"),
16
- data: Schema.Struct({
17
- providerID: Schema.String,
18
- message: Schema.String,
19
- }),
20
- })
21
-
22
- const OutputLengthErrorEffect = Schema.Struct({
23
- name: Schema.Literal("MessageOutputLengthError"),
24
- data: Schema.Struct({}),
25
- })
26
-
27
- const UnknownErrorEffect = Schema.Struct({
28
- name: Schema.Literal("UnknownError"),
29
- data: Schema.Struct({
30
- message: Schema.String,
31
- }),
32
- })
33
-
34
- export const ToolCall = Schema.Struct({
35
- state: Schema.Literal("call"),
36
- step: Schema.optional(NonNegativeInt),
37
- toolCallId: Schema.String,
38
- toolName: Schema.String,
39
- args: Schema.Unknown,
40
- })
41
- .annotate({ identifier: "ToolCall" })
42
- .pipe(withStatics((s) => ({ zod: zod(s) })))
43
- export type ToolCall = Schema.Schema.Type<typeof ToolCall>
44
-
45
- export const ToolPartialCall = Schema.Struct({
46
- state: Schema.Literal("partial-call"),
47
- step: Schema.optional(NonNegativeInt),
48
- toolCallId: Schema.String,
49
- toolName: Schema.String,
50
- args: Schema.Unknown,
51
- })
52
- .annotate({ identifier: "ToolPartialCall" })
53
- .pipe(withStatics((s) => ({ zod: zod(s) })))
54
- export type ToolPartialCall = Schema.Schema.Type<typeof ToolPartialCall>
55
-
56
- export const ToolResult = Schema.Struct({
57
- state: Schema.Literal("result"),
58
- step: Schema.optional(NonNegativeInt),
59
- toolCallId: Schema.String,
60
- toolName: Schema.String,
61
- args: Schema.Unknown,
62
- result: Schema.String,
63
- })
64
- .annotate({ identifier: "ToolResult" })
65
- .pipe(withStatics((s) => ({ zod: zod(s) })))
66
- export type ToolResult = Schema.Schema.Type<typeof ToolResult>
67
-
68
- export const ToolInvocation = Schema.Union([ToolCall, ToolPartialCall, ToolResult])
69
- .annotate({ identifier: "ToolInvocation", discriminator: "state" })
70
- .pipe(withStatics((s) => ({ zod: zod(s) })))
71
- export type ToolInvocation = Schema.Schema.Type<typeof ToolInvocation>
72
-
73
- export const TextPart = Schema.Struct({
74
- type: Schema.Literal("text"),
75
- text: Schema.String,
76
- })
77
- .annotate({ identifier: "TextPart" })
78
- .pipe(withStatics((s) => ({ zod: zod(s) })))
79
- export type TextPart = Schema.Schema.Type<typeof TextPart>
80
-
81
- export const ReasoningPart = Schema.Struct({
82
- type: Schema.Literal("reasoning"),
83
- text: Schema.String,
84
- providerMetadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
85
- })
86
- .annotate({ identifier: "ReasoningPart" })
87
- .pipe(withStatics((s) => ({ zod: zod(s) })))
88
- export type ReasoningPart = Schema.Schema.Type<typeof ReasoningPart>
89
-
90
- export const ToolInvocationPart = Schema.Struct({
91
- type: Schema.Literal("tool-invocation"),
92
- toolInvocation: ToolInvocation,
93
- })
94
- .annotate({ identifier: "ToolInvocationPart" })
95
- .pipe(withStatics((s) => ({ zod: zod(s) })))
96
- export type ToolInvocationPart = Schema.Schema.Type<typeof ToolInvocationPart>
97
-
98
- export const SourceUrlPart = Schema.Struct({
99
- type: Schema.Literal("source-url"),
100
- sourceId: Schema.String,
101
- url: Schema.String,
102
- title: Schema.optional(Schema.String),
103
- providerMetadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
104
- })
105
- .annotate({ identifier: "SourceUrlPart" })
106
- .pipe(withStatics((s) => ({ zod: zod(s) })))
107
- export type SourceUrlPart = Schema.Schema.Type<typeof SourceUrlPart>
108
-
109
- export const FilePart = Schema.Struct({
110
- type: Schema.Literal("file"),
111
- mediaType: Schema.String,
112
- filename: Schema.optional(Schema.String),
113
- url: Schema.String,
114
- })
115
- .annotate({ identifier: "FilePart" })
116
- .pipe(withStatics((s) => ({ zod: zod(s) })))
117
- export type FilePart = Schema.Schema.Type<typeof FilePart>
118
-
119
- export const StepStartPart = Schema.Struct({
120
- type: Schema.Literal("step-start"),
121
- })
122
- .annotate({ identifier: "StepStartPart" })
123
- .pipe(withStatics((s) => ({ zod: zod(s) })))
124
- export type StepStartPart = Schema.Schema.Type<typeof StepStartPart>
125
-
126
- export const MessagePart = Schema.Union([
127
- TextPart,
128
- ReasoningPart,
129
- ToolInvocationPart,
130
- SourceUrlPart,
131
- FilePart,
132
- StepStartPart,
133
- ])
134
- .annotate({ identifier: "MessagePart", discriminator: "type" })
135
- .pipe(withStatics((s) => ({ zod: zod(s) })))
136
- export type MessagePart = Schema.Schema.Type<typeof MessagePart>
137
-
138
- export const Info = Schema.Struct({
139
- id: Schema.String,
140
- role: Schema.Literals(["user", "assistant"]),
141
- parts: Schema.Array(MessagePart),
142
- metadata: Schema.Struct({
143
- time: Schema.Struct({
144
- created: NonNegativeInt,
145
- completed: Schema.optional(NonNegativeInt),
146
- }),
147
- error: Schema.optional(Schema.Union([AuthErrorEffect, UnknownErrorEffect, OutputLengthErrorEffect])),
148
- sessionID: SessionID,
149
- tool: Schema.Record(
150
- Schema.String,
151
- Schema.StructWithRest(
152
- Schema.Struct({
153
- title: Schema.String,
154
- snapshot: Schema.optional(Schema.String),
155
- time: Schema.Struct({
156
- start: NonNegativeInt,
157
- end: NonNegativeInt,
158
- }),
159
- }),
160
- [Schema.Record(Schema.String, Schema.Unknown)],
161
- ),
162
- ),
163
- assistant: Schema.optional(
164
- Schema.Struct({
165
- system: Schema.Array(Schema.String),
166
- modelID: ModelID,
167
- providerID: ProviderID,
168
- path: Schema.Struct({
169
- cwd: Schema.String,
170
- root: Schema.String,
171
- }),
172
- cost: Schema.Finite,
173
- summary: Schema.optional(Schema.Boolean),
174
- tokens: Schema.Struct({
175
- input: NonNegativeInt,
176
- output: NonNegativeInt,
177
- reasoning: NonNegativeInt,
178
- cache: Schema.Struct({
179
- read: NonNegativeInt,
180
- write: NonNegativeInt,
181
- }),
182
- }),
183
- }),
184
- ),
185
- snapshot: Schema.optional(Schema.String),
186
- }).annotate({ identifier: "MessageMetadata" }),
187
- })
188
- .annotate({ identifier: "Message" })
189
- .pipe(withStatics((s) => ({ zod: zod(s) })))
190
- export type Info = Schema.Schema.Type<typeof Info>
191
-
192
- export * as Message from "./message"
1
+ export * from "./message/message"