@kenkaiiii/ggcoder 6.4.0 → 7.0.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 (1116) hide show
  1. package/README.md +9 -8
  2. package/dist/app-sidecar/app-settings.d.ts +1 -1
  3. package/dist/app-sidecar/app-settings.js +3 -4
  4. package/dist/app-sidecar/app-settings.js.map +1 -1
  5. package/dist/app-sidecar/attachments.js +1 -1
  6. package/dist/app-sidecar/attachments.js.map +1 -1
  7. package/dist/app-sidecar/auth-routes.js +2 -5
  8. package/dist/app-sidecar/auth-routes.js.map +1 -1
  9. package/dist/app-sidecar/autopilot-runner.d.ts +8 -8
  10. package/dist/app-sidecar/autopilot-runner.js +8 -8
  11. package/dist/app-sidecar/autopilot-runner.js.map +1 -1
  12. package/dist/app-sidecar/branch-routes.d.ts +8 -1
  13. package/dist/app-sidecar/branch-routes.js +154 -2
  14. package/dist/app-sidecar/branch-routes.js.map +1 -1
  15. package/dist/app-sidecar/detached-sessions.d.ts +2 -10
  16. package/dist/app-sidecar/detached-sessions.js.map +1 -1
  17. package/dist/app-sidecar/file-search.js +1 -1
  18. package/dist/app-sidecar/file-search.js.map +1 -1
  19. package/dist/app-sidecar/git-branches.d.ts +18 -1
  20. package/dist/app-sidecar/git-branches.js +24 -6
  21. package/dist/app-sidecar/git-branches.js.map +1 -1
  22. package/dist/app-sidecar/git-ship.d.ts +42 -0
  23. package/dist/app-sidecar/git-ship.js +349 -0
  24. package/dist/app-sidecar/git-ship.js.map +1 -0
  25. package/dist/app-sidecar/git-target.d.ts +2 -2
  26. package/dist/app-sidecar/git-target.js +2 -2
  27. package/dist/app-sidecar/git-target.js.map +1 -1
  28. package/dist/app-sidecar/goal-routes.d.ts +1 -1
  29. package/dist/app-sidecar/goal-routes.js +5 -6
  30. package/dist/app-sidecar/goal-routes.js.map +1 -1
  31. package/dist/app-sidecar/hf-pull-manager.d.ts +5 -4
  32. package/dist/app-sidecar/hf-pull-manager.js +1 -1
  33. package/dist/app-sidecar/hf-pull-manager.js.map +1 -1
  34. package/dist/app-sidecar/history-routes.js +6 -6
  35. package/dist/app-sidecar/history-routes.js.map +1 -1
  36. package/dist/app-sidecar/history.d.ts +2 -2
  37. package/dist/app-sidecar/integration-routes.js +4 -6
  38. package/dist/app-sidecar/integration-routes.js.map +1 -1
  39. package/dist/app-sidecar/keep-awake.d.ts +1 -1
  40. package/dist/app-sidecar/keep-awake.js +1 -1
  41. package/dist/app-sidecar/keep-awake.js.map +1 -1
  42. package/dist/app-sidecar/ken-context.d.ts +2 -2
  43. package/dist/app-sidecar/ken-context.js +1 -1
  44. package/dist/app-sidecar/ken-context.js.map +1 -1
  45. package/dist/app-sidecar/live-preview/dev-url.d.ts +1 -1
  46. package/dist/app-sidecar/live-preview/manager.d.ts +2 -14
  47. package/dist/app-sidecar/live-preview/manager.js.map +1 -1
  48. package/dist/app-sidecar/live-preview/routes.js +1 -1
  49. package/dist/app-sidecar/live-preview/routes.js.map +1 -1
  50. package/dist/app-sidecar/live-preview/servers.js +1 -1
  51. package/dist/app-sidecar/live-preview/servers.js.map +1 -1
  52. package/dist/app-sidecar/mcp-routes.js +2 -2
  53. package/dist/app-sidecar/mcp-routes.js.map +1 -1
  54. package/dist/app-sidecar/mcp-rows.d.ts +3 -15
  55. package/dist/app-sidecar/mcp-rows.js +7 -2
  56. package/dist/app-sidecar/mcp-rows.js.map +1 -1
  57. package/dist/app-sidecar/mcp-shell-command.d.ts +1 -1
  58. package/dist/app-sidecar/mcp-shell-command.js +3 -3
  59. package/dist/app-sidecar/mcp-shell-command.js.map +1 -1
  60. package/dist/app-sidecar/mcp-sync.d.ts +2 -2
  61. package/dist/app-sidecar/mcp-sync.js +3 -3
  62. package/dist/app-sidecar/mcp-sync.js.map +1 -1
  63. package/dist/app-sidecar/progress-manager.d.ts +1 -1
  64. package/dist/app-sidecar/progress-manager.js +6 -6
  65. package/dist/app-sidecar/progress-manager.js.map +1 -1
  66. package/dist/app-sidecar/prompt-routes.js +5 -5
  67. package/dist/app-sidecar/prompt-routes.js.map +1 -1
  68. package/dist/app-sidecar/repo-polls.d.ts +3 -3
  69. package/dist/app-sidecar/repo-polls.js +4 -4
  70. package/dist/app-sidecar/repo-polls.js.map +1 -1
  71. package/dist/app-sidecar/route-context.d.ts +17 -17
  72. package/dist/app-sidecar/run-control-routes.js +2 -5
  73. package/dist/app-sidecar/run-control-routes.js.map +1 -1
  74. package/dist/app-sidecar/session-file-routes.d.ts +1 -1
  75. package/dist/app-sidecar/session-file-routes.js +2 -2
  76. package/dist/app-sidecar/session-file-routes.js.map +1 -1
  77. package/dist/app-sidecar/session-routes.js +3 -4
  78. package/dist/app-sidecar/session-routes.js.map +1 -1
  79. package/dist/app-sidecar/session-types.d.ts +5 -13
  80. package/dist/app-sidecar/shell-routes.js +1 -1
  81. package/dist/app-sidecar/shell-routes.js.map +1 -1
  82. package/dist/app-sidecar/shell-runs.js +2 -2
  83. package/dist/app-sidecar/shell-runs.js.map +1 -1
  84. package/dist/app-sidecar/shell-suggestions.d.ts +2 -8
  85. package/dist/app-sidecar/shell-suggestions.js +1 -1
  86. package/dist/app-sidecar/shell-suggestions.js.map +1 -1
  87. package/dist/app-sidecar/task-routes.js +5 -5
  88. package/dist/app-sidecar/task-routes.js.map +1 -1
  89. package/dist/app-sidecar/trophy-manager.d.ts +2 -2
  90. package/dist/app-sidecar/trophy-manager.js +3 -3
  91. package/dist/app-sidecar/trophy-manager.js.map +1 -1
  92. package/dist/app-sidecar/usage.d.ts +1 -1
  93. package/dist/app-sidecar/usage.js +3 -2
  94. package/dist/app-sidecar/usage.js.map +1 -1
  95. package/dist/app-sidecar/workspace-routes.js +4 -4
  96. package/dist/app-sidecar/workspace-routes.js.map +1 -1
  97. package/dist/app-sidecar/worktrees.js +1 -1
  98. package/dist/app-sidecar/worktrees.js.map +1 -1
  99. package/dist/app-sidecar-sessions.d.ts +2 -5
  100. package/dist/app-sidecar-sessions.js +1 -1
  101. package/dist/app-sidecar-sessions.js.map +1 -1
  102. package/dist/app-sidecar.d.ts +1 -1
  103. package/dist/app-sidecar.js +47 -45
  104. package/dist/app-sidecar.js.map +1 -1
  105. package/dist/chat-agents/general.d.ts +1 -1
  106. package/dist/chat-agents/index.d.ts +1 -1
  107. package/dist/chat-agents/jiwa.d.ts +2 -9
  108. package/dist/chat-agents/jiwa.js +1 -0
  109. package/dist/chat-agents/jiwa.js.map +1 -1
  110. package/dist/chat-agents/memory.d.ts +2 -9
  111. package/dist/chat-agents/memory.js +1 -0
  112. package/dist/chat-agents/memory.js.map +1 -1
  113. package/dist/chat-agents/research.d.ts +1 -1
  114. package/dist/chat-agents/shared.d.ts +1 -1
  115. package/dist/chat-agents/shared.js +1 -1
  116. package/dist/chat-agents/shared.js.map +1 -1
  117. package/dist/chat-agents/therapist.d.ts +1 -1
  118. package/dist/chat-agents/types.d.ts +2 -1
  119. package/dist/chat-agents/types.js +6 -1
  120. package/dist/chat-agents/types.js.map +1 -1
  121. package/dist/cli/auth.js +3 -6
  122. package/dist/cli/auth.js.map +1 -1
  123. package/dist/cli/mcp.js +4 -3
  124. package/dist/cli/mcp.js.map +1 -1
  125. package/dist/cli.d.ts +1 -0
  126. package/dist/cli.js +26 -27
  127. package/dist/cli.js.map +1 -1
  128. package/dist/goals-agent/goal-team.d.ts +1 -1
  129. package/dist/goals-agent/goals-agent.d.ts +3 -3
  130. package/dist/goals-agent/goals-agent.js +5 -5
  131. package/dist/goals-agent/goals-agent.js.map +1 -1
  132. package/dist/hf-pull.d.ts +2 -1
  133. package/dist/hf-pull.js +0 -1
  134. package/dist/hf-pull.js.map +1 -1
  135. package/dist/index.d.ts +0 -8
  136. package/dist/index.js +1 -14
  137. package/dist/index.js.map +1 -1
  138. package/dist/modes/acp-autopilot.js +3 -3
  139. package/dist/modes/acp-autopilot.js.map +1 -1
  140. package/dist/modes/acp-goals.d.ts +2 -2
  141. package/dist/modes/acp-goals.js +3 -3
  142. package/dist/modes/acp-goals.js.map +1 -1
  143. package/dist/modes/acp-mode.d.ts +6 -6
  144. package/dist/modes/acp-mode.js +22 -23
  145. package/dist/modes/acp-mode.js.map +1 -1
  146. package/dist/modes/agent-home-mode.js +7 -8
  147. package/dist/modes/agent-home-mode.js.map +1 -1
  148. package/dist/modes/json-mode.js +4 -4
  149. package/dist/modes/json-mode.js.map +1 -1
  150. package/dist/modes/print-mode.js +4 -3
  151. package/dist/modes/print-mode.js.map +1 -1
  152. package/dist/modes/rpc-mode.js +2 -2
  153. package/dist/modes/rpc-mode.js.map +1 -1
  154. package/dist/modes/serve-mode.js +10 -11
  155. package/dist/modes/serve-mode.js.map +1 -1
  156. package/dist/modes/subagent-worker-mode.d.ts +1 -1
  157. package/dist/modes/subagent-worker-mode.js +8 -8
  158. package/dist/modes/subagent-worker-mode.js.map +1 -1
  159. package/dist/motion-agent/motion-agent.d.ts +3 -2
  160. package/dist/motion-agent/motion-agent.js +3 -2
  161. package/dist/motion-agent/motion-agent.js.map +1 -1
  162. package/dist/motion-agent/motion-bundle.d.ts +18 -0
  163. package/dist/motion-agent/motion-bundle.js +34 -0
  164. package/dist/motion-agent/motion-bundle.js.map +1 -0
  165. package/dist/subagent-entry-path.d.ts +1 -0
  166. package/dist/subagent-entry-path.js +13 -0
  167. package/dist/subagent-entry-path.js.map +1 -0
  168. package/dist/subagent-entry.d.ts +1 -1
  169. package/dist/subagent-entry.js +2 -1
  170. package/dist/subagent-entry.js.map +1 -1
  171. package/dist/ui/App.d.ts +8 -8
  172. package/dist/ui/App.js +20 -21
  173. package/dist/ui/App.js.map +1 -1
  174. package/dist/ui/app-items.d.ts +1 -1
  175. package/dist/ui/components/BackgroundTasksBar.d.ts +1 -1
  176. package/dist/ui/components/Banner.js +1 -1
  177. package/dist/ui/components/Banner.js.map +1 -1
  178. package/dist/ui/components/ChatFooterPane.d.ts +1 -1
  179. package/dist/ui/components/ChatScreen.d.ts +4 -4
  180. package/dist/ui/components/Footer.d.ts +1 -1
  181. package/dist/ui/components/Footer.js +1 -1
  182. package/dist/ui/components/Footer.js.map +1 -1
  183. package/dist/ui/components/FooterStatusRow.d.ts +1 -1
  184. package/dist/ui/components/InputArea.d.ts +2 -2
  185. package/dist/ui/components/InputArea.js +2 -2
  186. package/dist/ui/components/InputArea.js.map +1 -1
  187. package/dist/ui/components/ModelSelector.js +1 -1
  188. package/dist/ui/components/ModelSelector.js.map +1 -1
  189. package/dist/ui/components/RewindOverlay.d.ts +1 -1
  190. package/dist/ui/components/RewindOverlay.js.map +1 -1
  191. package/dist/ui/components/SessionSelector.d.ts +1 -1
  192. package/dist/ui/components/SettingsSelector.d.ts +1 -1
  193. package/dist/ui/components/SkillsOverlay.js +2 -2
  194. package/dist/ui/components/SkillsOverlay.js.map +1 -1
  195. package/dist/ui/components/StreamingArea.js +1 -1
  196. package/dist/ui/components/StreamingArea.js.map +1 -1
  197. package/dist/ui/components/TaskPickerMenu.d.ts +1 -1
  198. package/dist/ui/components/ToolExecution.js +1 -1
  199. package/dist/ui/components/ToolExecution.js.map +1 -1
  200. package/dist/ui/error-item.js +2 -2
  201. package/dist/ui/error-item.js.map +1 -1
  202. package/dist/ui/hooks/useAgentLoop.d.ts +2 -2
  203. package/dist/ui/hooks/useAgentLoop.js +8 -8
  204. package/dist/ui/hooks/useAgentLoop.js.map +1 -1
  205. package/dist/ui/hooks/useChatLayoutMeasurements.d.ts +1 -1
  206. package/dist/ui/hooks/useContextCompaction.d.ts +3 -3
  207. package/dist/ui/hooks/useContextCompaction.js +6 -7
  208. package/dist/ui/hooks/useContextCompaction.js.map +1 -1
  209. package/dist/ui/hooks/useModeState.d.ts +2 -2
  210. package/dist/ui/hooks/useModeState.js +2 -2
  211. package/dist/ui/hooks/useModeState.js.map +1 -1
  212. package/dist/ui/hooks/useSessionPersistence.d.ts +1 -1
  213. package/dist/ui/hooks/useSessionPersistence.js +3 -3
  214. package/dist/ui/hooks/useSessionPersistence.js.map +1 -1
  215. package/dist/ui/hooks/useTaskPickerController.d.ts +1 -1
  216. package/dist/ui/hooks/useTaskPickerController.js +1 -1
  217. package/dist/ui/hooks/useTaskPickerController.js.map +1 -1
  218. package/dist/ui/hooks/useTranscriptHistory.d.ts +1 -1
  219. package/dist/ui/item-helpers.js +1 -1
  220. package/dist/ui/item-helpers.js.map +1 -1
  221. package/dist/ui/language-pack-update.d.ts +1 -1
  222. package/dist/ui/language-pack-update.js +1 -1
  223. package/dist/ui/language-pack-update.js.map +1 -1
  224. package/dist/ui/login.js +1 -1
  225. package/dist/ui/login.js.map +1 -1
  226. package/dist/ui/mcp.d.ts +1 -1
  227. package/dist/ui/prompt-routing.d.ts +3 -3
  228. package/dist/ui/prompt-routing.js +3 -3
  229. package/dist/ui/prompt-routing.js.map +1 -1
  230. package/dist/ui/render.d.ts +8 -8
  231. package/dist/ui/sessions.js +1 -1
  232. package/dist/ui/sessions.js.map +1 -1
  233. package/dist/ui/stores/taskbar-store.d.ts +1 -1
  234. package/dist/ui/stores/taskbar-store.js.map +1 -1
  235. package/dist/ui/submit-prompt-command.d.ts +2 -2
  236. package/dist/ui/submit-prompt-command.js +2 -3
  237. package/dist/ui/submit-prompt-command.js.map +1 -1
  238. package/dist/ui/terminal-history-status-renderers.d.ts +1 -1
  239. package/dist/ui/terminal-history.js +2 -3
  240. package/dist/ui/terminal-history.js.map +1 -1
  241. package/dist/ui/theme/theme.d.ts +2 -1
  242. package/dist/ui/theme/theme.js.map +1 -1
  243. package/dist/ui/thinking-level.d.ts +1 -1
  244. package/dist/ui/thinking-level.js +1 -1
  245. package/dist/ui/thinking-level.js.map +1 -1
  246. package/dist/ui/tool-line-summary.js +1 -1
  247. package/dist/ui/tool-line-summary.js.map +1 -1
  248. package/dist/ui/transcript/presentation.js +1 -1
  249. package/dist/ui/transcript/presentation.js.map +1 -1
  250. package/dist/ui/utils/text-utils.js +1 -1
  251. package/dist/ui/utils/text-utils.js.map +1 -1
  252. package/dist/utils/git-overview.d.ts +2 -23
  253. package/dist/utils/git-overview.js +8 -1
  254. package/dist/utils/git-overview.js.map +1 -1
  255. package/package.json +13 -103
  256. package/assets/skills/bulletproof/SKILL.md +0 -132
  257. package/assets/skills/bulletproof/references/agent-surface.md +0 -113
  258. package/assets/skills/bulletproof/references/attack-classes.md +0 -226
  259. package/assets/skills/bulletproof/references/audit-protocol.md +0 -232
  260. package/assets/skills/bulletproof/references/platform-playbooks.md +0 -196
  261. package/assets/skills/bulletproof/references/provenance.md +0 -146
  262. package/assets/skills/bulletproof/references/secure-defaults.md +0 -137
  263. package/assets/skills/bulletproof/references/supply-chain.md +0 -84
  264. package/assets/skills/bulletproof/references/threat-landscape.md +0 -66
  265. package/assets/skills/bulletproof/references/verification.md +0 -74
  266. package/assets/skills/compliance-guard/SKILL.md +0 -115
  267. package/assets/skills/compliance-guard/references/artifacts.md +0 -199
  268. package/assets/skills/compliance-guard/references/eu-uk.md +0 -162
  269. package/assets/skills/compliance-guard/references/exposure-triage.md +0 -177
  270. package/assets/skills/compliance-guard/references/full-review.md +0 -155
  271. package/assets/skills/compliance-guard/references/lawsuit-vectors.md +0 -153
  272. package/assets/skills/compliance-guard/references/provenance.md +0 -135
  273. package/assets/skills/compliance-guard/references/sector-gates.md +0 -187
  274. package/assets/skills/compliance-guard/references/security-baseline.md +0 -117
  275. package/assets/skills/compliance-guard/references/trigger-map.md +0 -177
  276. package/assets/skills/compliance-guard/references/us.md +0 -194
  277. package/assets/skills/durable/SKILL.md +0 -114
  278. package/assets/skills/durable/references/agent-db-safety.md +0 -76
  279. package/assets/skills/durable/references/backups-and-runtime.md +0 -93
  280. package/assets/skills/durable/references/migrations-and-schema.md +0 -87
  281. package/assets/skills/gg-guide/SKILL.md +0 -43
  282. package/assets/skills/gg-guide/references/chat-motion-goals.md +0 -217
  283. package/assets/skills/gg-guide/references/checklist-and-safety.md +0 -177
  284. package/assets/skills/gg-guide/references/code-mode.md +0 -268
  285. package/assets/skills/gg-guide/references/getting-started.md +0 -290
  286. package/assets/skills/gg-guide/references/ken-and-autopilot.md +0 -172
  287. package/assets/skills/gg-guide/references/mcp-and-skills.md +0 -204
  288. package/assets/skills/gg-guide/references/models-and-sign-in.md +0 -200
  289. package/assets/skills/gg-guide/references/sessions-and-history.md +0 -213
  290. package/assets/skills/gg-guide/references/settings.md +0 -193
  291. package/assets/skills/gg-guide/references/troubleshooting-and-data.md +0 -186
  292. package/assets/skills/lean/SKILL.md +0 -117
  293. package/assets/skills/lean/references/memory-and-processes.md +0 -99
  294. package/assets/skills/lean/references/playbooks.md +0 -134
  295. package/dist/app-error.d.ts +0 -22
  296. package/dist/app-error.js +0 -41
  297. package/dist/app-error.js.map +0 -1
  298. package/dist/config.d.ts +0 -90
  299. package/dist/config.js +0 -240
  300. package/dist/config.js.map +0 -1
  301. package/dist/core/acceptance-checks.d.ts +0 -48
  302. package/dist/core/acceptance-checks.js +0 -151
  303. package/dist/core/acceptance-checks.js.map +0 -1
  304. package/dist/core/action-threats.d.ts +0 -68
  305. package/dist/core/action-threats.js +0 -894
  306. package/dist/core/action-threats.js.map +0 -1
  307. package/dist/core/agent-notifications.d.ts +0 -79
  308. package/dist/core/agent-notifications.js +0 -125
  309. package/dist/core/agent-notifications.js.map +0 -1
  310. package/dist/core/agent-session/helpers.d.ts +0 -26
  311. package/dist/core/agent-session/helpers.js +0 -47
  312. package/dist/core/agent-session/helpers.js.map +0 -1
  313. package/dist/core/agent-session/mcp-tools.d.ts +0 -87
  314. package/dist/core/agent-session/mcp-tools.js +0 -227
  315. package/dist/core/agent-session/mcp-tools.js.map +0 -1
  316. package/dist/core/agent-session/run-loop-monitor.d.ts +0 -63
  317. package/dist/core/agent-session/run-loop-monitor.js +0 -164
  318. package/dist/core/agent-session/run-loop-monitor.js.map +0 -1
  319. package/dist/core/agent-session/transcript-markers.d.ts +0 -57
  320. package/dist/core/agent-session/transcript-markers.js +0 -166
  321. package/dist/core/agent-session/transcript-markers.js.map +0 -1
  322. package/dist/core/agent-session/verification-tracker.d.ts +0 -71
  323. package/dist/core/agent-session/verification-tracker.js +0 -295
  324. package/dist/core/agent-session/verification-tracker.js.map +0 -1
  325. package/dist/core/agent-session.d.ts +0 -1398
  326. package/dist/core/agent-session.js +0 -5123
  327. package/dist/core/agent-session.js.map +0 -1
  328. package/dist/core/agents.d.ts +0 -63
  329. package/dist/core/agents.js +0 -160
  330. package/dist/core/agents.js.map +0 -1
  331. package/dist/core/ask-user.d.ts +0 -163
  332. package/dist/core/ask-user.js +0 -178
  333. package/dist/core/ask-user.js.map +0 -1
  334. package/dist/core/auth/index.d.ts +0 -11
  335. package/dist/core/auth/index.js +0 -11
  336. package/dist/core/auth/index.js.map +0 -1
  337. package/dist/core/auth-providers.d.ts +0 -2
  338. package/dist/core/auth-providers.js +0 -5
  339. package/dist/core/auth-providers.js.map +0 -1
  340. package/dist/core/auth-storage.d.ts +0 -1
  341. package/dist/core/auth-storage.js +0 -4
  342. package/dist/core/auth-storage.js.map +0 -1
  343. package/dist/core/auto-update.d.ts +0 -6
  344. package/dist/core/auto-update.js +0 -15
  345. package/dist/core/auto-update.js.map +0 -1
  346. package/dist/core/autopilot-cycle.d.ts +0 -127
  347. package/dist/core/autopilot-cycle.js +0 -182
  348. package/dist/core/autopilot-cycle.js.map +0 -1
  349. package/dist/core/autopilot-gate.d.ts +0 -106
  350. package/dist/core/autopilot-gate.js +0 -192
  351. package/dist/core/autopilot-gate.js.map +0 -1
  352. package/dist/core/autopilot-verdict.d.ts +0 -55
  353. package/dist/core/autopilot-verdict.js +0 -226
  354. package/dist/core/autopilot-verdict.js.map +0 -1
  355. package/dist/core/blocked-packages-file.d.ts +0 -33
  356. package/dist/core/blocked-packages-file.js +0 -274
  357. package/dist/core/blocked-packages-file.js.map +0 -1
  358. package/dist/core/bundled-agents.d.ts +0 -2
  359. package/dist/core/bundled-agents.js +0 -253
  360. package/dist/core/bundled-agents.js.map +0 -1
  361. package/dist/core/cache-diagnostics.d.ts +0 -72
  362. package/dist/core/cache-diagnostics.js +0 -200
  363. package/dist/core/cache-diagnostics.js.map +0 -1
  364. package/dist/core/cache-expiry.d.ts +0 -89
  365. package/dist/core/cache-expiry.js +0 -117
  366. package/dist/core/cache-expiry.js.map +0 -1
  367. package/dist/core/checklist-detection.d.ts +0 -11
  368. package/dist/core/checklist-detection.js +0 -238
  369. package/dist/core/checklist-detection.js.map +0 -1
  370. package/dist/core/checklist-git.d.ts +0 -19
  371. package/dist/core/checklist-git.js +0 -54
  372. package/dist/core/checklist-git.js.map +0 -1
  373. package/dist/core/checklist-items.d.ts +0 -181
  374. package/dist/core/checklist-items.js +0 -230
  375. package/dist/core/checklist-items.js.map +0 -1
  376. package/dist/core/checklist-prompt.d.ts +0 -14
  377. package/dist/core/checklist-prompt.js +0 -64
  378. package/dist/core/checklist-prompt.js.map +0 -1
  379. package/dist/core/checklist-snapshot.d.ts +0 -17
  380. package/dist/core/checklist-snapshot.js +0 -46
  381. package/dist/core/checklist-snapshot.js.map +0 -1
  382. package/dist/core/checklist-store.d.ts +0 -63
  383. package/dist/core/checklist-store.js +0 -273
  384. package/dist/core/checklist-store.js.map +0 -1
  385. package/dist/core/checkout-record.d.ts +0 -22
  386. package/dist/core/checkout-record.js +0 -68
  387. package/dist/core/checkout-record.js.map +0 -1
  388. package/dist/core/checkpoint-store.d.ts +0 -109
  389. package/dist/core/checkpoint-store.js +0 -260
  390. package/dist/core/checkpoint-store.js.map +0 -1
  391. package/dist/core/claude-code/complete.d.ts +0 -35
  392. package/dist/core/claude-code/complete.js +0 -125
  393. package/dist/core/claude-code/complete.js.map +0 -1
  394. package/dist/core/claude-code/events.d.ts +0 -67
  395. package/dist/core/claude-code/events.js +0 -460
  396. package/dist/core/claude-code/events.js.map +0 -1
  397. package/dist/core/claude-code/live-session.d.ts +0 -94
  398. package/dist/core/claude-code/live-session.js +0 -525
  399. package/dist/core/claude-code/live-session.js.map +0 -1
  400. package/dist/core/claude-code/loop.d.ts +0 -9
  401. package/dist/core/claude-code/loop.js +0 -15
  402. package/dist/core/claude-code/loop.js.map +0 -1
  403. package/dist/core/claude-code/session-sync.d.ts +0 -28
  404. package/dist/core/claude-code/session-sync.js +0 -53
  405. package/dist/core/claude-code/session-sync.js.map +0 -1
  406. package/dist/core/claude-code/tool-bridge.d.ts +0 -49
  407. package/dist/core/claude-code/tool-bridge.js +0 -352
  408. package/dist/core/claude-code/tool-bridge.js.map +0 -1
  409. package/dist/core/claude-code/transcripts.d.ts +0 -39
  410. package/dist/core/claude-code/transcripts.js +0 -195
  411. package/dist/core/claude-code/transcripts.js.map +0 -1
  412. package/dist/core/code-retrieval-chunkers.d.ts +0 -26
  413. package/dist/core/code-retrieval-chunkers.js +0 -264
  414. package/dist/core/code-retrieval-chunkers.js.map +0 -1
  415. package/dist/core/code-retrieval.d.ts +0 -18
  416. package/dist/core/code-retrieval.js +0 -124
  417. package/dist/core/code-retrieval.js.map +0 -1
  418. package/dist/core/codex-request-shape.d.ts +0 -7
  419. package/dist/core/codex-request-shape.js +0 -19
  420. package/dist/core/codex-request-shape.js.map +0 -1
  421. package/dist/core/compaction/active-context.d.ts +0 -16
  422. package/dist/core/compaction/active-context.js +0 -20
  423. package/dist/core/compaction/active-context.js.map +0 -1
  424. package/dist/core/compaction/compactor.d.ts +0 -281
  425. package/dist/core/compaction/compactor.js +0 -1452
  426. package/dist/core/compaction/compactor.js.map +0 -1
  427. package/dist/core/compaction/plan-step-policy.d.ts +0 -46
  428. package/dist/core/compaction/plan-step-policy.js +0 -57
  429. package/dist/core/compaction/plan-step-policy.js.map +0 -1
  430. package/dist/core/compaction/policy.d.ts +0 -36
  431. package/dist/core/compaction/policy.js +0 -144
  432. package/dist/core/compaction/policy.js.map +0 -1
  433. package/dist/core/compaction/query-aware-selector.d.ts +0 -32
  434. package/dist/core/compaction/query-aware-selector.js +0 -202
  435. package/dist/core/compaction/query-aware-selector.js.map +0 -1
  436. package/dist/core/compaction/token-estimator.d.ts +0 -36
  437. package/dist/core/compaction/token-estimator.js +0 -180
  438. package/dist/core/compaction/token-estimator.js.map +0 -1
  439. package/dist/core/compaction/tool-result-pruner.d.ts +0 -90
  440. package/dist/core/compaction/tool-result-pruner.js +0 -238
  441. package/dist/core/compaction/tool-result-pruner.js.map +0 -1
  442. package/dist/core/completion-review.d.ts +0 -24
  443. package/dist/core/completion-review.js +0 -2
  444. package/dist/core/completion-review.js.map +0 -1
  445. package/dist/core/context-files.d.ts +0 -8
  446. package/dist/core/context-files.js +0 -46
  447. package/dist/core/context-files.js.map +0 -1
  448. package/dist/core/context-limits.d.ts +0 -40
  449. package/dist/core/context-limits.js +0 -43
  450. package/dist/core/context-limits.js.map +0 -1
  451. package/dist/core/custom-commands.d.ts +0 -18
  452. package/dist/core/custom-commands.js +0 -57
  453. package/dist/core/custom-commands.js.map +0 -1
  454. package/dist/core/destructive-git-guard.d.ts +0 -113
  455. package/dist/core/destructive-git-guard.js +0 -874
  456. package/dist/core/destructive-git-guard.js.map +0 -1
  457. package/dist/core/encode-cwd.d.ts +0 -41
  458. package/dist/core/encode-cwd.js +0 -53
  459. package/dist/core/encode-cwd.js.map +0 -1
  460. package/dist/core/env-delta.d.ts +0 -34
  461. package/dist/core/env-delta.js +0 -84
  462. package/dist/core/env-delta.js.map +0 -1
  463. package/dist/core/event-bus.d.ts +0 -178
  464. package/dist/core/event-bus.js +0 -171
  465. package/dist/core/event-bus.js.map +0 -1
  466. package/dist/core/extensions/loader.d.ts +0 -7
  467. package/dist/core/extensions/loader.js +0 -68
  468. package/dist/core/extensions/loader.js.map +0 -1
  469. package/dist/core/extensions/plugin-bundles.d.ts +0 -13
  470. package/dist/core/extensions/plugin-bundles.js +0 -45
  471. package/dist/core/extensions/plugin-bundles.js.map +0 -1
  472. package/dist/core/extensions/types.d.ts +0 -18
  473. package/dist/core/extensions/types.js +0 -2
  474. package/dist/core/extensions/types.js.map +0 -1
  475. package/dist/core/foreign-session-import.d.ts +0 -119
  476. package/dist/core/foreign-session-import.js +0 -598
  477. package/dist/core/foreign-session-import.js.map +0 -1
  478. package/dist/core/foreign-transcript-blocks.d.ts +0 -50
  479. package/dist/core/foreign-transcript-blocks.js +0 -151
  480. package/dist/core/foreign-transcript-blocks.js.map +0 -1
  481. package/dist/core/frontmatter.d.ts +0 -22
  482. package/dist/core/frontmatter.js +0 -90
  483. package/dist/core/frontmatter.js.map +0 -1
  484. package/dist/core/goal-run-marker.d.ts +0 -32
  485. package/dist/core/goal-run-marker.js +0 -178
  486. package/dist/core/goal-run-marker.js.map +0 -1
  487. package/dist/core/goal-summary.d.ts +0 -32
  488. package/dist/core/goal-summary.js +0 -110
  489. package/dist/core/goal-summary.js.map +0 -1
  490. package/dist/core/goals-store.d.ts +0 -215
  491. package/dist/core/goals-store.js +0 -577
  492. package/dist/core/goals-store.js.map +0 -1
  493. package/dist/core/hashline.d.ts +0 -51
  494. package/dist/core/hashline.js +0 -76
  495. package/dist/core/hashline.js.map +0 -1
  496. package/dist/core/idle-wake.d.ts +0 -62
  497. package/dist/core/idle-wake.js +0 -103
  498. package/dist/core/idle-wake.js.map +0 -1
  499. package/dist/core/index.d.ts +0 -14
  500. package/dist/core/index.js +0 -14
  501. package/dist/core/index.js.map +0 -1
  502. package/dist/core/injection-detect.d.ts +0 -39
  503. package/dist/core/injection-detect.js +0 -241
  504. package/dist/core/injection-detect.js.map +0 -1
  505. package/dist/core/installed-threats.d.ts +0 -23
  506. package/dist/core/installed-threats.js +0 -71
  507. package/dist/core/installed-threats.js.map +0 -1
  508. package/dist/core/internal-diagnostics.d.ts +0 -159
  509. package/dist/core/internal-diagnostics.js +0 -495
  510. package/dist/core/internal-diagnostics.js.map +0 -1
  511. package/dist/core/keep-awake.d.ts +0 -88
  512. package/dist/core/keep-awake.js +0 -251
  513. package/dist/core/keep-awake.js.map +0 -1
  514. package/dist/core/ken-ask-answer.d.ts +0 -24
  515. package/dist/core/ken-ask-answer.js +0 -96
  516. package/dist/core/ken-ask-answer.js.map +0 -1
  517. package/dist/core/ken-context.d.ts +0 -119
  518. package/dist/core/ken-context.js +0 -447
  519. package/dist/core/ken-context.js.map +0 -1
  520. package/dist/core/ken-model.d.ts +0 -45
  521. package/dist/core/ken-model.js +0 -26
  522. package/dist/core/ken-model.js.map +0 -1
  523. package/dist/core/ken-prompt.d.ts +0 -21
  524. package/dist/core/ken-prompt.js +0 -370
  525. package/dist/core/ken-prompt.js.map +0 -1
  526. package/dist/core/language-detector.d.ts +0 -41
  527. package/dist/core/language-detector.js +0 -293
  528. package/dist/core/language-detector.js.map +0 -1
  529. package/dist/core/live-preview.d.ts +0 -26
  530. package/dist/core/live-preview.js +0 -80
  531. package/dist/core/live-preview.js.map +0 -1
  532. package/dist/core/local-endpoint-store.d.ts +0 -53
  533. package/dist/core/local-endpoint-store.js +0 -221
  534. package/dist/core/local-endpoint-store.js.map +0 -1
  535. package/dist/core/logger.d.ts +0 -22
  536. package/dist/core/logger.js +0 -95
  537. package/dist/core/logger.js.map +0 -1
  538. package/dist/core/loop-breaker.d.ts +0 -89
  539. package/dist/core/loop-breaker.js +0 -204
  540. package/dist/core/loop-breaker.js.map +0 -1
  541. package/dist/core/lsp/client.d.ts +0 -206
  542. package/dist/core/lsp/client.js +0 -685
  543. package/dist/core/lsp/client.js.map +0 -1
  544. package/dist/core/lsp/edit-telemetry.d.ts +0 -26
  545. package/dist/core/lsp/edit-telemetry.js +0 -52
  546. package/dist/core/lsp/edit-telemetry.js.map +0 -1
  547. package/dist/core/lsp/format.d.ts +0 -11
  548. package/dist/core/lsp/format.js +0 -30
  549. package/dist/core/lsp/format.js.map +0 -1
  550. package/dist/core/lsp/jsonrpc.d.ts +0 -68
  551. package/dist/core/lsp/jsonrpc.js +0 -153
  552. package/dist/core/lsp/jsonrpc.js.map +0 -1
  553. package/dist/core/lsp/manager.d.ts +0 -188
  554. package/dist/core/lsp/manager.js +0 -576
  555. package/dist/core/lsp/manager.js.map +0 -1
  556. package/dist/core/lsp/pool.d.ts +0 -114
  557. package/dist/core/lsp/pool.js +0 -259
  558. package/dist/core/lsp/pool.js.map +0 -1
  559. package/dist/core/lsp/project-root.d.ts +0 -9
  560. package/dist/core/lsp/project-root.js +0 -75
  561. package/dist/core/lsp/project-root.js.map +0 -1
  562. package/dist/core/lsp/reference-project.d.ts +0 -6
  563. package/dist/core/lsp/reference-project.js +0 -110
  564. package/dist/core/lsp/reference-project.js.map +0 -1
  565. package/dist/core/lsp/servers.d.ts +0 -44
  566. package/dist/core/lsp/servers.js +0 -289
  567. package/dist/core/lsp/servers.js.map +0 -1
  568. package/dist/core/lsp/test-support.d.ts +0 -17
  569. package/dist/core/lsp/test-support.js +0 -27
  570. package/dist/core/lsp/test-support.js.map +0 -1
  571. package/dist/core/mcp/catalog-cache.d.ts +0 -64
  572. package/dist/core/mcp/catalog-cache.js +0 -167
  573. package/dist/core/mcp/catalog-cache.js.map +0 -1
  574. package/dist/core/mcp/client.d.ts +0 -317
  575. package/dist/core/mcp/client.js +0 -1168
  576. package/dist/core/mcp/client.js.map +0 -1
  577. package/dist/core/mcp/content.d.ts +0 -23
  578. package/dist/core/mcp/content.js +0 -194
  579. package/dist/core/mcp/content.js.map +0 -1
  580. package/dist/core/mcp/defaults.d.ts +0 -26
  581. package/dist/core/mcp/defaults.js +0 -81
  582. package/dist/core/mcp/defaults.js.map +0 -1
  583. package/dist/core/mcp/deferred-catalog.d.ts +0 -53
  584. package/dist/core/mcp/deferred-catalog.js +0 -117
  585. package/dist/core/mcp/deferred-catalog.js.map +0 -1
  586. package/dist/core/mcp/elicitation-bridge.d.ts +0 -40
  587. package/dist/core/mcp/elicitation-bridge.js +0 -36
  588. package/dist/core/mcp/elicitation-bridge.js.map +0 -1
  589. package/dist/core/mcp/index.d.ts +0 -16
  590. package/dist/core/mcp/index.js +0 -10
  591. package/dist/core/mcp/index.js.map +0 -1
  592. package/dist/core/mcp/loopback.d.ts +0 -26
  593. package/dist/core/mcp/loopback.js +0 -66
  594. package/dist/core/mcp/loopback.js.map +0 -1
  595. package/dist/core/mcp/oauth-provider.d.ts +0 -55
  596. package/dist/core/mcp/oauth-provider.js +0 -106
  597. package/dist/core/mcp/oauth-provider.js.map +0 -1
  598. package/dist/core/mcp/oauth-store.d.ts +0 -44
  599. package/dist/core/mcp/oauth-store.js +0 -77
  600. package/dist/core/mcp/oauth-store.js.map +0 -1
  601. package/dist/core/mcp/parse-add-command.d.ts +0 -50
  602. package/dist/core/mcp/parse-add-command.js +0 -391
  603. package/dist/core/mcp/parse-add-command.js.map +0 -1
  604. package/dist/core/mcp/resolve-stdio.d.ts +0 -77
  605. package/dist/core/mcp/resolve-stdio.js +0 -359
  606. package/dist/core/mcp/resolve-stdio.js.map +0 -1
  607. package/dist/core/mcp/shared-pool.d.ts +0 -157
  608. package/dist/core/mcp/shared-pool.js +0 -236
  609. package/dist/core/mcp/shared-pool.js.map +0 -1
  610. package/dist/core/mcp/store.d.ts +0 -100
  611. package/dist/core/mcp/store.js +0 -202
  612. package/dist/core/mcp/store.js.map +0 -1
  613. package/dist/core/mcp/tool-guard.d.ts +0 -58
  614. package/dist/core/mcp/tool-guard.js +0 -215
  615. package/dist/core/mcp/tool-guard.js.map +0 -1
  616. package/dist/core/mcp/types.d.ts +0 -57
  617. package/dist/core/mcp/types.js +0 -2
  618. package/dist/core/mcp/types.js.map +0 -1
  619. package/dist/core/message-images.d.ts +0 -11
  620. package/dist/core/message-images.js +0 -52
  621. package/dist/core/message-images.js.map +0 -1
  622. package/dist/core/model-registry.d.ts +0 -1
  623. package/dist/core/model-registry.js +0 -5
  624. package/dist/core/model-registry.js.map +0 -1
  625. package/dist/core/model-unavailable.d.ts +0 -14
  626. package/dist/core/model-unavailable.js +0 -23
  627. package/dist/core/model-unavailable.js.map +0 -1
  628. package/dist/core/network-guard.d.ts +0 -28
  629. package/dist/core/network-guard.js +0 -251
  630. package/dist/core/network-guard.js.map +0 -1
  631. package/dist/core/node-debugger.d.ts +0 -148
  632. package/dist/core/node-debugger.js +0 -642
  633. package/dist/core/node-debugger.js.map +0 -1
  634. package/dist/core/oauth/openai.d.ts +0 -1
  635. package/dist/core/oauth/openai.js +0 -3
  636. package/dist/core/oauth/openai.js.map +0 -1
  637. package/dist/core/oauth/types.d.ts +0 -1
  638. package/dist/core/oauth/types.js +0 -2
  639. package/dist/core/oauth/types.js.map +0 -1
  640. package/dist/core/opencode-catalog-store.d.ts +0 -20
  641. package/dist/core/opencode-catalog-store.js +0 -82
  642. package/dist/core/opencode-catalog-store.js.map +0 -1
  643. package/dist/core/openrouter-catalog-store.d.ts +0 -24
  644. package/dist/core/openrouter-catalog-store.js +0 -140
  645. package/dist/core/openrouter-catalog-store.js.map +0 -1
  646. package/dist/core/package-cooldown.d.ts +0 -69
  647. package/dist/core/package-cooldown.js +0 -297
  648. package/dist/core/package-cooldown.js.map +0 -1
  649. package/dist/core/package-threats.d.ts +0 -92
  650. package/dist/core/package-threats.js +0 -1340
  651. package/dist/core/package-threats.js.map +0 -1
  652. package/dist/core/parked-requests.d.ts +0 -43
  653. package/dist/core/parked-requests.js +0 -34
  654. package/dist/core/parked-requests.js.map +0 -1
  655. package/dist/core/persistent-shell.d.ts +0 -81
  656. package/dist/core/persistent-shell.js +0 -452
  657. package/dist/core/persistent-shell.js.map +0 -1
  658. package/dist/core/plan-delta.d.ts +0 -23
  659. package/dist/core/plan-delta.js +0 -36
  660. package/dist/core/plan-delta.js.map +0 -1
  661. package/dist/core/plan-handoff.d.ts +0 -38
  662. package/dist/core/plan-handoff.js +0 -21
  663. package/dist/core/plan-handoff.js.map +0 -1
  664. package/dist/core/plan-submission-gate.d.ts +0 -28
  665. package/dist/core/plan-submission-gate.js +0 -27
  666. package/dist/core/plan-submission-gate.js.map +0 -1
  667. package/dist/core/platform-clis.d.ts +0 -15
  668. package/dist/core/platform-clis.js +0 -299
  669. package/dist/core/platform-clis.js.map +0 -1
  670. package/dist/core/process-gate.d.ts +0 -61
  671. package/dist/core/process-gate.js +0 -103
  672. package/dist/core/process-gate.js.map +0 -1
  673. package/dist/core/process-manager.d.ts +0 -242
  674. package/dist/core/process-manager.js +0 -902
  675. package/dist/core/process-manager.js.map +0 -1
  676. package/dist/core/progress/engine.d.ts +0 -22
  677. package/dist/core/progress/engine.js +0 -131
  678. package/dist/core/progress/engine.js.map +0 -1
  679. package/dist/core/progress/git-xp.d.ts +0 -15
  680. package/dist/core/progress/git-xp.js +0 -100
  681. package/dist/core/progress/git-xp.js.map +0 -1
  682. package/dist/core/progress/ranks.d.ts +0 -31
  683. package/dist/core/progress/ranks.js +0 -310
  684. package/dist/core/progress/ranks.js.map +0 -1
  685. package/dist/core/progress/rebuild.d.ts +0 -8
  686. package/dist/core/progress/rebuild.js +0 -125
  687. package/dist/core/progress/rebuild.js.map +0 -1
  688. package/dist/core/progress/store.d.ts +0 -34
  689. package/dist/core/progress/store.js +0 -200
  690. package/dist/core/progress/store.js.map +0 -1
  691. package/dist/core/progress/types.d.ts +0 -108
  692. package/dist/core/progress/types.js +0 -3
  693. package/dist/core/progress/types.js.map +0 -1
  694. package/dist/core/project-discovery.d.ts +0 -88
  695. package/dist/core/project-discovery.js +0 -907
  696. package/dist/core/project-discovery.js.map +0 -1
  697. package/dist/core/project-files.d.ts +0 -15
  698. package/dist/core/project-files.js +0 -37
  699. package/dist/core/project-files.js.map +0 -1
  700. package/dist/core/project-health-scan.d.ts +0 -109
  701. package/dist/core/project-health-scan.js +0 -673
  702. package/dist/core/project-health-scan.js.map +0 -1
  703. package/dist/core/project-health-score.d.ts +0 -41
  704. package/dist/core/project-health-score.js +0 -257
  705. package/dist/core/project-health-score.js.map +0 -1
  706. package/dist/core/prompt-command-expansion.d.ts +0 -13
  707. package/dist/core/prompt-command-expansion.js +0 -48
  708. package/dist/core/prompt-command-expansion.js.map +0 -1
  709. package/dist/core/prompt-commands.d.ts +0 -13
  710. package/dist/core/prompt-commands.js +0 -370
  711. package/dist/core/prompt-commands.js.map +0 -1
  712. package/dist/core/radio-players.d.ts +0 -28
  713. package/dist/core/radio-players.js +0 -133
  714. package/dist/core/radio-players.js.map +0 -1
  715. package/dist/core/radio.d.ts +0 -50
  716. package/dist/core/radio.js +0 -480
  717. package/dist/core/radio.js.map +0 -1
  718. package/dist/core/regrounding.d.ts +0 -37
  719. package/dist/core/regrounding.js +0 -89
  720. package/dist/core/regrounding.js.map +0 -1
  721. package/dist/core/resolve-start.d.ts +0 -28
  722. package/dist/core/resolve-start.js +0 -35
  723. package/dist/core/resolve-start.js.map +0 -1
  724. package/dist/core/run-claim.d.ts +0 -36
  725. package/dist/core/run-claim.js +0 -46
  726. package/dist/core/run-claim.js.map +0 -1
  727. package/dist/core/run-lifecycle.d.ts +0 -58
  728. package/dist/core/run-lifecycle.js +0 -104
  729. package/dist/core/run-lifecycle.js.map +0 -1
  730. package/dist/core/run-status.d.ts +0 -17
  731. package/dist/core/run-status.js +0 -28
  732. package/dist/core/run-status.js.map +0 -1
  733. package/dist/core/runtime-mode.d.ts +0 -21
  734. package/dist/core/runtime-mode.js +0 -43
  735. package/dist/core/runtime-mode.js.map +0 -1
  736. package/dist/core/sandbox-domains.d.ts +0 -13
  737. package/dist/core/sandbox-domains.js +0 -76
  738. package/dist/core/sandbox-domains.js.map +0 -1
  739. package/dist/core/sandbox-feedback.d.ts +0 -21
  740. package/dist/core/sandbox-feedback.js +0 -69
  741. package/dist/core/sandbox-feedback.js.map +0 -1
  742. package/dist/core/sandbox.d.ts +0 -106
  743. package/dist/core/sandbox.js +0 -383
  744. package/dist/core/sandbox.js.map +0 -1
  745. package/dist/core/semantic-loop-check.d.ts +0 -58
  746. package/dist/core/semantic-loop-check.js +0 -103
  747. package/dist/core/semantic-loop-check.js.map +0 -1
  748. package/dist/core/session-compaction.d.ts +0 -23
  749. package/dist/core/session-compaction.js +0 -54
  750. package/dist/core/session-compaction.js.map +0 -1
  751. package/dist/core/session-export.d.ts +0 -97
  752. package/dist/core/session-export.js +0 -368
  753. package/dist/core/session-export.js.map +0 -1
  754. package/dist/core/session-history.d.ts +0 -160
  755. package/dist/core/session-history.js +0 -467
  756. package/dist/core/session-history.js.map +0 -1
  757. package/dist/core/session-manager.d.ts +0 -509
  758. package/dist/core/session-manager.js +0 -1367
  759. package/dist/core/session-manager.js.map +0 -1
  760. package/dist/core/session-preview.d.ts +0 -12
  761. package/dist/core/session-preview.js +0 -58
  762. package/dist/core/session-preview.js.map +0 -1
  763. package/dist/core/session-storage.d.ts +0 -78
  764. package/dist/core/session-storage.js +0 -659
  765. package/dist/core/session-storage.js.map +0 -1
  766. package/dist/core/session-summary-index.d.ts +0 -51
  767. package/dist/core/session-summary-index.js +0 -192
  768. package/dist/core/session-summary-index.js.map +0 -1
  769. package/dist/core/settings-manager.d.ts +0 -113
  770. package/dist/core/settings-manager.js +0 -281
  771. package/dist/core/settings-manager.js.map +0 -1
  772. package/dist/core/shared-checkout-guard.d.ts +0 -78
  773. package/dist/core/shared-checkout-guard.js +0 -219
  774. package/dist/core/shared-checkout-guard.js.map +0 -1
  775. package/dist/core/shell-path.d.ts +0 -13
  776. package/dist/core/shell-path.js +0 -175
  777. package/dist/core/shell-path.js.map +0 -1
  778. package/dist/core/shell-threats-popular-packages.d.ts +0 -11
  779. package/dist/core/shell-threats-popular-packages.js +0 -675
  780. package/dist/core/shell-threats-popular-packages.js.map +0 -1
  781. package/dist/core/shell-threats.d.ts +0 -21
  782. package/dist/core/shell-threats.js +0 -235
  783. package/dist/core/shell-threats.js.map +0 -1
  784. package/dist/core/shell.d.ts +0 -54
  785. package/dist/core/shell.js +0 -99
  786. package/dist/core/shell.js.map +0 -1
  787. package/dist/core/shutdown.d.ts +0 -70
  788. package/dist/core/shutdown.js +0 -144
  789. package/dist/core/shutdown.js.map +0 -1
  790. package/dist/core/skill-scan.d.ts +0 -112
  791. package/dist/core/skill-scan.js +0 -781
  792. package/dist/core/skill-scan.js.map +0 -1
  793. package/dist/core/skills.d.ts +0 -100
  794. package/dist/core/skills.js +0 -299
  795. package/dist/core/skills.js.map +0 -1
  796. package/dist/core/slash-commands.d.ts +0 -58
  797. package/dist/core/slash-commands.js +0 -242
  798. package/dist/core/slash-commands.js.map +0 -1
  799. package/dist/core/steering.d.ts +0 -47
  800. package/dist/core/steering.js +0 -65
  801. package/dist/core/steering.js.map +0 -1
  802. package/dist/core/steroids.d.ts +0 -66
  803. package/dist/core/steroids.js +0 -243
  804. package/dist/core/steroids.js.map +0 -1
  805. package/dist/core/stream-diag-level.d.ts +0 -3
  806. package/dist/core/stream-diag-level.js +0 -24
  807. package/dist/core/stream-diag-level.js.map +0 -1
  808. package/dist/core/stream-rules.d.ts +0 -30
  809. package/dist/core/stream-rules.js +0 -151
  810. package/dist/core/stream-rules.js.map +0 -1
  811. package/dist/core/subagent-manager.d.ts +0 -239
  812. package/dist/core/subagent-manager.js +0 -1060
  813. package/dist/core/subagent-manager.js.map +0 -1
  814. package/dist/core/subagent-policy.d.ts +0 -9
  815. package/dist/core/subagent-policy.js +0 -41
  816. package/dist/core/subagent-policy.js.map +0 -1
  817. package/dist/core/subagent-receipt.d.ts +0 -54
  818. package/dist/core/subagent-receipt.js +0 -274
  819. package/dist/core/subagent-receipt.js.map +0 -1
  820. package/dist/core/subagent-store.d.ts +0 -41
  821. package/dist/core/subagent-store.js +0 -284
  822. package/dist/core/subagent-store.js.map +0 -1
  823. package/dist/core/subagent-turn-record.d.ts +0 -18
  824. package/dist/core/subagent-turn-record.js +0 -82
  825. package/dist/core/subagent-turn-record.js.map +0 -1
  826. package/dist/core/tasks-store.d.ts +0 -31
  827. package/dist/core/tasks-store.js +0 -97
  828. package/dist/core/tasks-store.js.map +0 -1
  829. package/dist/core/telegram-config.d.ts +0 -20
  830. package/dist/core/telegram-config.js +0 -52
  831. package/dist/core/telegram-config.js.map +0 -1
  832. package/dist/core/telegram.d.ts +0 -1
  833. package/dist/core/telegram.js +0 -3
  834. package/dist/core/telegram.js.map +0 -1
  835. package/dist/core/temp-paths.d.ts +0 -5
  836. package/dist/core/temp-paths.js +0 -50
  837. package/dist/core/temp-paths.js.map +0 -1
  838. package/dist/core/test-impact.d.ts +0 -73
  839. package/dist/core/test-impact.js +0 -467
  840. package/dist/core/test-impact.js.map +0 -1
  841. package/dist/core/thinking-level.d.ts +0 -1
  842. package/dist/core/thinking-level.js +0 -4
  843. package/dist/core/thinking-level.js.map +0 -1
  844. package/dist/core/threat-feed.d.ts +0 -65
  845. package/dist/core/threat-feed.js +0 -335
  846. package/dist/core/threat-feed.js.map +0 -1
  847. package/dist/core/trophies/catalog-more.d.ts +0 -2
  848. package/dist/core/trophies/catalog-more.js +0 -837
  849. package/dist/core/trophies/catalog-more.js.map +0 -1
  850. package/dist/core/trophies/catalog.d.ts +0 -4
  851. package/dist/core/trophies/catalog.js +0 -649
  852. package/dist/core/trophies/catalog.js.map +0 -1
  853. package/dist/core/trophies/engine.d.ts +0 -70
  854. package/dist/core/trophies/engine.js +0 -347
  855. package/dist/core/trophies/engine.js.map +0 -1
  856. package/dist/core/trophies/store.d.ts +0 -17
  857. package/dist/core/trophies/store.js +0 -113
  858. package/dist/core/trophies/store.js.map +0 -1
  859. package/dist/core/trophies/types.d.ts +0 -119
  860. package/dist/core/trophies/types.js +0 -76
  861. package/dist/core/trophies/types.js.map +0 -1
  862. package/dist/core/ui-adoption.d.ts +0 -32
  863. package/dist/core/ui-adoption.js +0 -302
  864. package/dist/core/ui-adoption.js.map +0 -1
  865. package/dist/core/ui-compatibility.d.ts +0 -10
  866. package/dist/core/ui-compatibility.js +0 -51
  867. package/dist/core/ui-compatibility.js.map +0 -1
  868. package/dist/core/ui-registry.d.ts +0 -101
  869. package/dist/core/ui-registry.js +0 -292
  870. package/dist/core/ui-registry.js.map +0 -1
  871. package/dist/core/user-shell-context.d.ts +0 -8
  872. package/dist/core/user-shell-context.js +0 -12
  873. package/dist/core/user-shell-context.js.map +0 -1
  874. package/dist/core/verification-evidence.d.ts +0 -49
  875. package/dist/core/verification-evidence.js +0 -816
  876. package/dist/core/verification-evidence.js.map +0 -1
  877. package/dist/core/verification-gate.d.ts +0 -77
  878. package/dist/core/verification-gate.js +0 -504
  879. package/dist/core/verification-gate.js.map +0 -1
  880. package/dist/core/verification-snapshot.d.ts +0 -7
  881. package/dist/core/verification-snapshot.js +0 -109
  882. package/dist/core/verification-snapshot.js.map +0 -1
  883. package/dist/core/verify-commands.d.ts +0 -34
  884. package/dist/core/verify-commands.js +0 -203
  885. package/dist/core/verify-commands.js.map +0 -1
  886. package/dist/core/voice-transcriber.d.ts +0 -1
  887. package/dist/core/voice-transcriber.js +0 -4
  888. package/dist/core/voice-transcriber.js.map +0 -1
  889. package/dist/core/workspace-guard.d.ts +0 -56
  890. package/dist/core/workspace-guard.js +0 -334
  891. package/dist/core/workspace-guard.js.map +0 -1
  892. package/dist/session.d.ts +0 -44
  893. package/dist/session.js +0 -105
  894. package/dist/session.js.map +0 -1
  895. package/dist/system-prompt.d.ts +0 -104
  896. package/dist/system-prompt.js +0 -480
  897. package/dist/system-prompt.js.map +0 -1
  898. package/dist/test-support/fake-home.d.ts +0 -19
  899. package/dist/test-support/fake-home.js +0 -37
  900. package/dist/test-support/fake-home.js.map +0 -1
  901. package/dist/test-support/keep-alive.d.ts +0 -14
  902. package/dist/test-support/keep-alive.js +0 -17
  903. package/dist/test-support/keep-alive.js.map +0 -1
  904. package/dist/test-support/slow-git.d.ts +0 -1
  905. package/dist/test-support/slow-git.js +0 -21
  906. package/dist/test-support/slow-git.js.map +0 -1
  907. package/dist/test-support/system-tools.d.ts +0 -6
  908. package/dist/test-support/system-tools.js +0 -36
  909. package/dist/test-support/system-tools.js.map +0 -1
  910. package/dist/tools/ask-user.d.ts +0 -34
  911. package/dist/tools/ask-user.js +0 -99
  912. package/dist/tools/ask-user.js.map +0 -1
  913. package/dist/tools/background-watch-lint.d.ts +0 -18
  914. package/dist/tools/background-watch-lint.js +0 -102
  915. package/dist/tools/background-watch-lint.js.map +0 -1
  916. package/dist/tools/bash-read-evidence.d.ts +0 -23
  917. package/dist/tools/bash-read-evidence.js +0 -180
  918. package/dist/tools/bash-read-evidence.js.map +0 -1
  919. package/dist/tools/bash.d.ts +0 -64
  920. package/dist/tools/bash.js +0 -552
  921. package/dist/tools/bash.js.map +0 -1
  922. package/dist/tools/browser-api.d.ts +0 -27
  923. package/dist/tools/browser-api.js +0 -449
  924. package/dist/tools/browser-api.js.map +0 -1
  925. package/dist/tools/browser-sandbox.d.ts +0 -16
  926. package/dist/tools/browser-sandbox.js +0 -158
  927. package/dist/tools/browser-sandbox.js.map +0 -1
  928. package/dist/tools/browser-session.d.ts +0 -84
  929. package/dist/tools/browser-session.js +0 -304
  930. package/dist/tools/browser-session.js.map +0 -1
  931. package/dist/tools/browser-snapshot.d.ts +0 -19
  932. package/dist/tools/browser-snapshot.js +0 -109
  933. package/dist/tools/browser-snapshot.js.map +0 -1
  934. package/dist/tools/browser.d.ts +0 -11
  935. package/dist/tools/browser.js +0 -106
  936. package/dist/tools/browser.js.map +0 -1
  937. package/dist/tools/checklist.d.ts +0 -49
  938. package/dist/tools/checklist.js +0 -154
  939. package/dist/tools/checklist.js.map +0 -1
  940. package/dist/tools/compress.d.ts +0 -56
  941. package/dist/tools/compress.js +0 -226
  942. package/dist/tools/compress.js.map +0 -1
  943. package/dist/tools/debug.d.ts +0 -54
  944. package/dist/tools/debug.js +0 -230
  945. package/dist/tools/debug.js.map +0 -1
  946. package/dist/tools/document-text.d.ts +0 -6
  947. package/dist/tools/document-text.js +0 -154
  948. package/dist/tools/document-text.js.map +0 -1
  949. package/dist/tools/edit-diff.d.ts +0 -123
  950. package/dist/tools/edit-diff.js +0 -476
  951. package/dist/tools/edit-diff.js.map +0 -1
  952. package/dist/tools/edit-targets.d.ts +0 -10
  953. package/dist/tools/edit-targets.js +0 -31
  954. package/dist/tools/edit-targets.js.map +0 -1
  955. package/dist/tools/edit.d.ts +0 -38
  956. package/dist/tools/edit.js +0 -695
  957. package/dist/tools/edit.js.map +0 -1
  958. package/dist/tools/enter-plan.d.ts +0 -7
  959. package/dist/tools/enter-plan.js +0 -20
  960. package/dist/tools/enter-plan.js.map +0 -1
  961. package/dist/tools/exit-plan.d.ts +0 -7
  962. package/dist/tools/exit-plan.js +0 -51
  963. package/dist/tools/exit-plan.js.map +0 -1
  964. package/dist/tools/find.d.ts +0 -17
  965. package/dist/tools/find.js +0 -100
  966. package/dist/tools/find.js.map +0 -1
  967. package/dist/tools/generate-image.d.ts +0 -83
  968. package/dist/tools/generate-image.js +0 -625
  969. package/dist/tools/generate-image.js.map +0 -1
  970. package/dist/tools/grep-scan.d.ts +0 -96
  971. package/dist/tools/grep-scan.js +0 -283
  972. package/dist/tools/grep-scan.js.map +0 -1
  973. package/dist/tools/grep.d.ts +0 -48
  974. package/dist/tools/grep.js +0 -1013
  975. package/dist/tools/grep.js.map +0 -1
  976. package/dist/tools/html-extract.d.ts +0 -57
  977. package/dist/tools/html-extract.js +0 -130
  978. package/dist/tools/html-extract.js.map +0 -1
  979. package/dist/tools/index.d.ts +0 -198
  980. package/dist/tools/index.js +0 -216
  981. package/dist/tools/index.js.map +0 -1
  982. package/dist/tools/live-preview.d.ts +0 -23
  983. package/dist/tools/live-preview.js +0 -41
  984. package/dist/tools/live-preview.js.map +0 -1
  985. package/dist/tools/ls.d.ts +0 -9
  986. package/dist/tools/ls.js +0 -59
  987. package/dist/tools/ls.js.map +0 -1
  988. package/dist/tools/operations.d.ts +0 -86
  989. package/dist/tools/operations.js +0 -117
  990. package/dist/tools/operations.js.map +0 -1
  991. package/dist/tools/overflow.d.ts +0 -17
  992. package/dist/tools/overflow.js +0 -68
  993. package/dist/tools/overflow.js.map +0 -1
  994. package/dist/tools/path-utils.d.ts +0 -30
  995. package/dist/tools/path-utils.js +0 -74
  996. package/dist/tools/path-utils.js.map +0 -1
  997. package/dist/tools/pdf-extract.d.ts +0 -17
  998. package/dist/tools/pdf-extract.js +0 -43
  999. package/dist/tools/pdf-extract.js.map +0 -1
  1000. package/dist/tools/prompt-hints.d.ts +0 -46
  1001. package/dist/tools/prompt-hints.js +0 -171
  1002. package/dist/tools/prompt-hints.js.map +0 -1
  1003. package/dist/tools/read-only-bash.d.ts +0 -31
  1004. package/dist/tools/read-only-bash.js +0 -338
  1005. package/dist/tools/read-only-bash.js.map +0 -1
  1006. package/dist/tools/read-tracker.d.ts +0 -43
  1007. package/dist/tools/read-tracker.js +0 -120
  1008. package/dist/tools/read-tracker.js.map +0 -1
  1009. package/dist/tools/read.d.ts +0 -18
  1010. package/dist/tools/read.js +0 -316
  1011. package/dist/tools/read.js.map +0 -1
  1012. package/dist/tools/redaction-guard.d.ts +0 -10
  1013. package/dist/tools/redaction-guard.js +0 -55
  1014. package/dist/tools/redaction-guard.js.map +0 -1
  1015. package/dist/tools/routine-output.d.ts +0 -39
  1016. package/dist/tools/routine-output.js +0 -281
  1017. package/dist/tools/routine-output.js.map +0 -1
  1018. package/dist/tools/safe-env.d.ts +0 -1
  1019. package/dist/tools/safe-env.js +0 -79
  1020. package/dist/tools/safe-env.js.map +0 -1
  1021. package/dist/tools/session-stats.d.ts +0 -26
  1022. package/dist/tools/session-stats.js +0 -51
  1023. package/dist/tools/session-stats.js.map +0 -1
  1024. package/dist/tools/side-web-search.d.ts +0 -34
  1025. package/dist/tools/side-web-search.js +0 -146
  1026. package/dist/tools/side-web-search.js.map +0 -1
  1027. package/dist/tools/skill.d.ts +0 -12
  1028. package/dist/tools/skill.js +0 -94
  1029. package/dist/tools/skill.js.map +0 -1
  1030. package/dist/tools/source-path.d.ts +0 -8
  1031. package/dist/tools/source-path.js +0 -128
  1032. package/dist/tools/source-path.js.map +0 -1
  1033. package/dist/tools/steroids.d.ts +0 -44
  1034. package/dist/tools/steroids.js +0 -356
  1035. package/dist/tools/steroids.js.map +0 -1
  1036. package/dist/tools/subagent-control.d.ts +0 -5
  1037. package/dist/tools/subagent-control.js +0 -211
  1038. package/dist/tools/subagent-control.js.map +0 -1
  1039. package/dist/tools/subagent-shared.d.ts +0 -110
  1040. package/dist/tools/subagent-shared.js +0 -180
  1041. package/dist/tools/subagent-shared.js.map +0 -1
  1042. package/dist/tools/subagent.d.ts +0 -37
  1043. package/dist/tools/subagent.js +0 -406
  1044. package/dist/tools/subagent.js.map +0 -1
  1045. package/dist/tools/task-output.d.ts +0 -10
  1046. package/dist/tools/task-output.js +0 -74
  1047. package/dist/tools/task-output.js.map +0 -1
  1048. package/dist/tools/task-send.d.ts +0 -11
  1049. package/dist/tools/task-send.js +0 -36
  1050. package/dist/tools/task-send.js.map +0 -1
  1051. package/dist/tools/task-stop.d.ts +0 -8
  1052. package/dist/tools/task-stop.js +0 -15
  1053. package/dist/tools/task-stop.js.map +0 -1
  1054. package/dist/tools/tasks.d.ts +0 -15
  1055. package/dist/tools/tasks.js +0 -94
  1056. package/dist/tools/tasks.js.map +0 -1
  1057. package/dist/tools/tool-search.d.ts +0 -26
  1058. package/dist/tools/tool-search.js +0 -81
  1059. package/dist/tools/tool-search.js.map +0 -1
  1060. package/dist/tools/tool-tiers.d.ts +0 -65
  1061. package/dist/tools/tool-tiers.js +0 -121
  1062. package/dist/tools/tool-tiers.js.map +0 -1
  1063. package/dist/tools/truncate.d.ts +0 -39
  1064. package/dist/tools/truncate.js +0 -242
  1065. package/dist/tools/truncate.js.map +0 -1
  1066. package/dist/tools/ui-adopt.d.ts +0 -16
  1067. package/dist/tools/ui-adopt.js +0 -66
  1068. package/dist/tools/ui-adopt.js.map +0 -1
  1069. package/dist/tools/ui-registry.d.ts +0 -15
  1070. package/dist/tools/ui-registry.js +0 -39
  1071. package/dist/tools/ui-registry.js.map +0 -1
  1072. package/dist/tools/verification-review.d.ts +0 -2
  1073. package/dist/tools/verification-review.js +0 -41
  1074. package/dist/tools/verification-review.js.map +0 -1
  1075. package/dist/tools/web-fetch.d.ts +0 -52
  1076. package/dist/tools/web-fetch.js +0 -986
  1077. package/dist/tools/web-fetch.js.map +0 -1
  1078. package/dist/tools/web-search.d.ts +0 -35
  1079. package/dist/tools/web-search.js +0 -926
  1080. package/dist/tools/web-search.js.map +0 -1
  1081. package/dist/tools/write.d.ts +0 -16
  1082. package/dist/tools/write.js +0 -196
  1083. package/dist/tools/write.js.map +0 -1
  1084. package/dist/types.d.ts +0 -44
  1085. package/dist/types.js +0 -2
  1086. package/dist/types.js.map +0 -1
  1087. package/dist/utils/git.d.ts +0 -102
  1088. package/dist/utils/git.js +0 -325
  1089. package/dist/utils/git.js.map +0 -1
  1090. package/dist/utils/github-ci.d.ts +0 -18
  1091. package/dist/utils/github-ci.js +0 -138
  1092. package/dist/utils/github-ci.js.map +0 -1
  1093. package/dist/utils/github.d.ts +0 -19
  1094. package/dist/utils/github.js +0 -67
  1095. package/dist/utils/github.js.map +0 -1
  1096. package/dist/utils/image.d.ts +0 -166
  1097. package/dist/utils/image.js +0 -673
  1098. package/dist/utils/image.js.map +0 -1
  1099. package/dist/utils/open-browser.d.ts +0 -13
  1100. package/dist/utils/open-browser.js +0 -31
  1101. package/dist/utils/open-browser.js.map +0 -1
  1102. package/dist/utils/plan-steps.d.ts +0 -90
  1103. package/dist/utils/plan-steps.js +0 -209
  1104. package/dist/utils/plan-steps.js.map +0 -1
  1105. package/dist/utils/process.d.ts +0 -48
  1106. package/dist/utils/process.js +0 -175
  1107. package/dist/utils/process.js.map +0 -1
  1108. package/dist/utils/prompt-enhancer.d.ts +0 -53
  1109. package/dist/utils/prompt-enhancer.js +0 -178
  1110. package/dist/utils/prompt-enhancer.js.map +0 -1
  1111. package/dist/utils/text.d.ts +0 -61
  1112. package/dist/utils/text.js +0 -68
  1113. package/dist/utils/text.js.map +0 -1
  1114. package/dist/web.d.ts +0 -5
  1115. package/dist/web.js +0 -5
  1116. package/dist/web.js.map +0 -1
@@ -1,114 +0,0 @@
1
- ---
2
- name: durable
3
- description: "Use to keep stored data from being lost: before running or writing anything that could delete, overwrite or reshape it, and when asked whether data is backed up and recoverable. Do NOT use for read-only queries or query speed."
4
- metadata:
5
- version: "2026.11.22"
6
- license: Data-durability engineering guidance, not a DBA certification. Sources and snapshot date are recorded at the foot of each reference file.
7
- compatibility: Snapshot dated 3 October 2026; Prisma 7/8 status and agent safeguards, PostgreSQL 19 status and the Neon, RDS and D1 retention rows re-verified 22 October 2026; PostgreSQL 19 GA and 14 EOL, Prisma 8 status and drop prompts, and the Supabase, D1, PlanetScale and PgBouncer rows re-verified 22 November 2026. Re-verify version behaviours and provider defaults before asserting them as current.
8
- ---
9
-
10
- # Durable
11
-
12
- **Route first:**
13
-
14
- | You are… | Mode | Do next |
15
- |---|---|---|
16
- | About to run *any* command against a database yourself (migrate, reset, push, seed, SQL shell, delete script) | **Agent gate** | Run the agent gate below before the command. Always. |
17
- | Writing code that touches stored data (table, migration, import, delete endpoint, webhook write, backup cron) | **Inline gate** | Apply binding defaults; one line on the guard you built; keep building. |
18
- | Asked "is my data safe / back up my app", a migration is about to hit production, or after a data scare | **Full pass** | Run the full-pass workflow. |
19
-
20
- Never say data is "safe": say what loss is survivable and what is not.
21
-
22
- ## Agent gate — binding rules for you, the agent
23
-
24
- Coding agents have wiped production data during a natural-language code freeze (Replit, July 2025; `references/agent-db-safety.md`). These rules are the mechanism.
25
-
26
- 1. **Identify the target before every command.** Resolve which database the command will hit. Classify it `throwaway` / `shared-dev` / `may-hold-real-data` using the detection list in `references/agent-db-safety.md`. Unknown = `may-hold-real-data`.
27
- 2. **On `may-hold-real-data`, read-only by default.** Inspect with `SELECT`/`EXPLAIN`/`\d`, a read-only role, or `BEGIN READ ONLY`. No DDL, no writes, no `migrate dev|reset`, `db push`, `--force`, `--accept-data-loss`, `flush`, `dropDatabase`, `TRUNCATE`, seed scripts.
28
- 3. **Destructive or schema-changing commands on real data require all of:** (a) a backup or PITR point you verified exists *for this database* (`RUNTIME` or provider-console evidence, not assumption), (b) a dry-run count of affected rows shown to the user, (c) the exact command shown, and (d) the user's explicit go-ahead in this conversation for that command. "Go ahead and fix it" does not cover a `DROP`.
29
- 4. **Experiment on a branch, not the original.** Use a provider branch, restored clone or local copy; prove the change there, then hand back the production step with evidence.
30
- 5. **Never bypass a tool's safety interlock yourself.** If a CLI refuses because it detected an agent (e.g. Prisma 7's AI-consent check, Prisma 8's drop prompts), a platform holds your request for the user's approval (e.g. Prisma Console agent approvals), or a prompt asks for confirmation: stop and ask. Never set a consent variable, approve your own request, or pass `--force`/`--yes`/`--delete`/`--allow` on your own initiative.
31
- 6. **Surprising results mean stop, not fix.** Empty tables, missing rows, failed restores: report what you observed and ask. Never "repair" by recreating, reseeding, or fabricating data, and never declare data unrecoverable without checking the provider's backups/PITR.
32
- 7. **Report exactly what you ran** — every command that touched a database, its target, and its result, including mistakes, immediately.
33
-
34
- Also flag (do not silently fix) setups where the agent's shell holds production write credentials: recommend separate dev/prod credentials, a read-only role for inspection, and production URLs absent from local `.env`.
35
-
36
- ## Governing rules
37
-
38
- 1. **The store is the last line of defence.** `NOT NULL`, `UNIQUE`, foreign keys with a chosen `ON DELETE`, `CHECK` — in the database, where scripts and bugs cannot walk past them.
39
- 2. **Destructive operations are guilty until guarded**: `WHERE` + batch limit, dry-run count first, backup when anything of value exists, undo path (soft delete, staging copy) for user-facing data.
40
- 3. **Migrations run on data you cannot recreate.** Checked in, reviewed as SQL (ORM output included — a rename can become `DROP` + `ADD`), never edited once applied, forward-only in production. Push/sync commands are for throwaway databases.
41
- 4. **One logical change, one transaction; anything retried is idempotent.**
42
- 5. **Backups you have not restored are fiction.** Automated, off-instance, stated RPO/RTO, timed restore drill.
43
- 6. **Fail loudly, not corruptly.** Bulk jobs are keyset-resumable with durable checkpoints.
44
- 7. **Respect the store's concurrency model** — SQLite has one writer; transaction poolers break session state.
45
- 8. **Evidence labels on every claim:** `RUNTIME` (observed), `CODE` (read in source), `DEDUCED` (inferred), `SNAPSHOT` (dated external source).
46
- 9. **Proportionality.** Test rows need migrations; the first real user row raises the floor to backups, then tested restore, then PITR.
47
-
48
- ## Binding defaults (inline gate)
49
-
50
- - **Migration tooling from the first table.** Generate without applying (`prisma migrate dev --create-only`, `drizzle-kit generate`), read the SQL, apply via the deploy path (`prisma migrate deploy`, `drizzle-kit migrate`). Corrections are new migrations.
51
- - **Destructive code carries its guard**: count-first, `WHERE` + batch, soft delete (`deleted_at` + partial unique index) for user-visible data.
52
- - **Constraints in the store** per rule 1; integer cents or `NUMERIC` for money; `bigint`/UUID keys (`uuidv7()` built in from Postgres 18).
53
- - **Transactions around multi-write invariants**; across systems, use an outbox.
54
- - **Idempotency keys on retried writes**: unique event/job IDs + `INSERT … ON CONFLICT`.
55
- - **Batched, resumable bulk work** (keyset, fixed batch, checkpoint, sleep) — never one unbounded `UPDATE` on production.
56
- - **Backups the moment real data exists**: confirm the plan actually includes them (free tiers often do not), add an off-account copy, state RPO/RTO where configured. Uploads need bucket versioning — DB backups do not cover objects.
57
- - **Serverless connections**: assume transaction-mode pooling (no session state); one pool per instance; release in `finally`.
58
- - **SQLite as SQLite**: WAL, `busy_timeout`, `foreign_keys=ON` per connection, one writer, local disk, continuous or scheduled backup.
59
-
60
- ## Full-pass workflow
61
-
62
- 1. **Profile from the code.** Stores, migration tooling, write/delete paths, backup config, environments and credentials, and whether real user data exists.
63
- 2. **Define loss.** Recreatable vs unrecoverable (user content, uploads, payments), and rows ↔ files links.
64
- 3. **Sweep the seven areas** (detail in references):
65
-
66
- | # | Area | Hunting for |
67
- |---|---|---|
68
- | 1 | Backups & recovery | None; same machine/account only; free tier assumed to be PITR; never restored; no RPO/RTO; unversioned upload buckets |
69
- | 2 | Destructive paths | Unguarded `DELETE`/`UPDATE`; cascades sweeping too far; reset/push/drop in scripts or CI near production config |
70
- | 3 | Agent & credential exposure | Prod write URL in local `.env`; agent/CI tokens with DDL rights; no branch/dev DB to experiment on |
71
- | 4 | Migrations health | No tooling; edited applied migrations; unreviewed destructive SQL; lock-unsafe DDL; drift |
72
- | 5 | Transactions & idempotency | Multi-writes without a transaction; double-apply on retry; check-then-act races |
73
- | 6 | Schema integrity | Missing FKs/uniques/`NOT NULL`; orphans; float money; int IDs near overflow |
74
- | 7 | Runtime data safety | Session state through transaction poolers; SQLite multi-writer; non-atomic file writes; no dead-letter path |
75
-
76
- 4. **Rank by survivability.**
77
-
78
- | Severity | Meaning |
79
- |---|---|
80
- | Critical | Loss certain or one common failure away: real data with no backups; unguarded destructive path; pending data-dropping migration; agent/CI holding prod write creds with no verified backup; double-charge on retry |
81
- | High | Loss on a plausible bad day: never-restored backups; single copy; broad cascades; multi-writes without transactions |
82
- | Medium | Bites at scale or in recovery: missing constraints, drift, non-idempotent jobs, non-atomic writes |
83
- | Low | Hygiene; fix only when adjacent |
84
-
85
- 5. **Report, then fix what the user selects**, Critical and High first (three to five, each verified). Fix straight away only when the user asked for fixes.
86
- 6. **Verify.**
87
- - *Restore drill* (any backup fix): note a point, insert a canary, restore to the point **into a separate location**, confirm the canary is absent, record wall-clock time as the real RTO. `RUNTIME` or it did not happen.
88
- - *Guard drill* (destructive fix): on a copy, one row that must survive and one that must not; assert both.
89
- - *Migration drill*: apply pending migrations to a branch or prod-shaped copy first, with `lock_timeout` set.
90
- - Not run: label it unverified and give the exact command.
91
- 7. **Leave a guard behind** with tools already installed and the existing CI: CI migrations on a throwaway DB, a scheduled restore test, a constraint, or a read-only agent role. A new package or workflow (e.g. a migration linter) is a recommendation unless the user agrees.
92
- 8. **Report**: lead with the RPO the user *actually* has ("if this server died now you lose everything since …"); then ranked findings with file:line and fix; then **not checked**; then fixed (with labels) vs needs-the-user (provider settings, paid tiers, retention choices).
93
-
94
- ## Scaling: one agent or several
95
-
96
- - Stay single-threaded for the agent gate, inline gate, small edits, and a full pass on one store and one deployable.
97
- - Fan out a full pass over several stores, services or deployables: read-only repo helpers, one per disjoint slice of the ledger (7 areas × stores/services); a researcher for dated provider or version claims.
98
- - Helpers never connect to or run commands against any database. A production migration plan or "is my data safe" verdict also gets a fresh-context check that tries to disprove the findings and the restore evidence.
99
- - **Database commands are never parallel.** Migrations, restores and writes to shared or production data run serially on the main thread, after the agent gate.
100
-
101
- Helper types, brief contents and merge rules come with the skill loader.
102
-
103
- ## Honesty rules
104
-
105
- - "Backups are configured" is `CODE`; "recoverable" needs a `RUNTIME` restore. Never say "safe".
106
- - Never claim data is gone, or restored, without checking. A fabricated restore test is the worst lie this skill could tell.
107
-
108
- ## Reference map
109
-
110
- Resolve paths from the skill root; load only what the profile triggers.
111
-
112
- - `references/agent-db-safety.md` — incident, production-target detection, safe inspection, branches, tool interlocks. Before any agent-run command on a non-throwaway database; area 3.
113
- - `references/migrations-and-schema.md` — expand/contract, lock-safety table, Postgres 18/19 notes, backfills, ORM traps (Prisma 7/8, Drizzle), integrity sweep. Areas 2, 4, 6.
114
- - `references/backups-and-runtime.md` — tiers, restore drill, provider PITR snapshot, SQLite/Litestream, object versioning, idempotency/outbox, poolers. Areas 1, 5, 7.
@@ -1,76 +0,0 @@
1
- # Durable — agent database safety
2
-
3
- Load before the agent runs any command against a database that is not provably throwaway, and for full-pass area 3. `SNAPSHOT` = sourced 3 October 2026.
4
-
5
- ## Why this file exists
6
-
7
- `SNAPSHOT` — July 2025, SaaStr founder Jason Lemkin's public "vibe coding" experiment on Replit: the agent deleted a live project database during an explicit, repeated code freeze, produced misleading output (including fabricated records), and said rollback was impossible — which proved false. Replit responded by separating dev and production databases, adding approval for destructive commands, and pointing to tested backups. Lessons this skill encodes:
8
-
9
- - A natural-language "don't touch it" is not a control. Credentials, read-only roles, and branches are.
10
- - Agents misread anomalies (empty results) as problems to fix. Anomaly → stop and report.
11
- - Agents misreport recoverability. Check backups/PITR before saying anything about loss.
12
-
13
- `SNAPSHOT` (single secondary write-up) — April 2026, PocketOS: a coding agent found a broadly scoped Railway token in an unrelated file and deleted a production volume; the volume-level backups stored with it went too (Railway later recovered the data). Lessons:
14
-
15
- - An agent will use any credential it can read. Scope tokens to one project and environment, and keep them out of the repo.
16
- - Backups stored with the volume or in the same account are not off-instance.
17
-
18
- ## Classify the target (before every command)
19
-
20
- Treat as **`may-hold-real-data`** if any is true; unknown also counts:
21
-
22
- - Host is not `localhost`/`127.0.0.1`/a docker-compose service/`file:` under the repo's dev path.
23
- - Host or name matches a managed provider (`*.supabase.co`, `*.pooler.supabase.com`, `*.neon.tech`, `*.psdb.cloud`/PlanetScale, `*.rds.amazonaws.com`, `*.turso.io`, `mongodb+srv://`, Firestore project IDs) and is not a known branch/preview.
24
- - Variable or file name contains `prod`, `production`, `live`, `main`; or it is the value in `.env.production`, deploy config, or CI secrets.
25
- - `NODE_ENV`/`RAILS_ENV`/`APP_ENV`/`DJANGO_SETTINGS_MODULE` points at production.
26
- - Row counts or timestamps suggest real use (inspect read-only: `SELECT count(*), max(created_at) FROM users`).
27
-
28
- **`throwaway`** only when you created it this session, or it is a local container/file seeded by the repo, or a branch you just made.
29
-
30
- Never print full connection strings; show host and database name only.
31
-
32
- ## Read-only inspection
33
-
34
- | Store | Read-only pattern |
35
- |---|---|
36
- | Postgres | Dedicated role with `SELECT` only; or `psql` with `BEGIN READ ONLY;` / `SET default_transaction_read_only = on` (a session setting, not a security boundary) |
37
- | MySQL | User with `SELECT` grant only; `START TRANSACTION READ ONLY` |
38
- | SQLite | Open with `?mode=ro` or `sqlite3 -readonly`; or inspect a copy |
39
- | MongoDB | User with the `read` role |
40
- | Database MCP servers | Use the server's read-only and project-scoping options (Supabase MCP: `read_only=true`, `project_ref=…`); a full-access database MCP is a production write credential |
41
-
42
- Recommend the user create the read-only role; do not create roles on production yourself without the gate.
43
-
44
- ## Branch / clone first
45
-
46
- | Platform | Experiment surface (`SNAPSHOT`, verify flags) |
47
- |---|---|
48
- | Neon | Branches (copy-on-write, can be created from a past point in the restore window) |
49
- | Supabase | Branching (preview branches) or restore into a new project |
50
- | PlanetScale | Development branches |
51
- | Any Postgres | `pg_dump` → local container; or provider snapshot restored to a new instance |
52
- | SQLite / D1 / Turso | Copy the file; D1/Turso restore to a point into a new database where supported |
53
-
54
- Run the migration on the branch, record the result and timing, then present the production step for the user's go-ahead.
55
-
56
- ## Tool interlocks — respect, never bypass
57
-
58
- - **Prisma** (`SNAPSHOT` 22 Oct 2026): the Prisma 7 CLI refuses dangerous actions such as `migrate reset` when it detects an AI agent, until `PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION` holds the user's exact consent message. Stop and ask; only the user's literal words may be passed. Separately, Prisma Console now enrolls a coding agent with its own credential: by default it works freely on preview branches, and writes to production, deletes and connection-string creation wait for the user's approval in the Console. Never approve your own request or use the user's login to get around it.
59
- - **Prisma 8** (`SNAPSHOT` 22 Nov 2026, changelog 9 Oct 2026): `prisma migration plan` and `prisma db update` ask about each dropped model or field. Flags answer in advance (`--delete X` lets the data go, `--rename A:B` keeps the rows); an unanswered question fails in CI with `CLI.CONSENT_REQUIRED`, and loosening row-level security needs `--allow <Model>`. Never add `--delete` or `--allow` yourself: show the user what would be dropped and let them choose.
60
- - Prompts like "data loss will occur, continue?" (`db push`, `drizzle-kit push`) are a stop sign. Never pipe `yes`, never add `--force`/`--accept-data-loss` yourself.
61
- - Prefer commands that print the plan without applying: `prisma migrate diff`, `drizzle-kit generate` (then read SQL), Rails `db:migrate:status`, Django `sqlmigrate` / `migrate --plan`.
62
-
63
- ## Credential hygiene to recommend
64
-
65
- - Separate dev/prod credentials and URLs; production values only in the deploy platform's secret store.
66
- - The agent's shell gets dev or read-only creds by default; production writes go through CI/deploy, not a laptop.
67
- - Migration role ≠ app role ≠ read-only inspection role.
68
- - PITR enabled and verified on any database an agent can reach with write rights.
69
-
70
- ## Dry-run counts
71
-
72
- Before any `DELETE`/`UPDATE` you are asked to run: execute the same `WHERE` as `SELECT count(*)` (and a sample of ids), show the user, then run inside a transaction and check the affected count matches before `COMMIT`.
73
-
74
- ---
75
-
76
- **Provenance:** snapshot 3 October 2026. Sources (accessed 3 Oct 2026): The Register via Slashdot, 21 Jul 2025 — https://developers.slashdot.org/story/25/07/21/1338204/ ; heise, 25 Jul 2025 — https://www.heise.de/en/news/Artificial-intelligence-Vibe-coding-service-Replit-deletes-production-database-10499597.html ; incident summary — https://openleash.com/blog/ai-agents-deleted-production-databases-replit-pocketos ; Prisma 7 CLI reference (AI-agent consent, re-verified 22 Oct 2026) — https://www.prisma.io/docs/orm/v7/reference/prisma-cli-reference ; Prisma agent enrollment (22 Oct 2026) — https://www.prisma.io/changelog/2026-10-02 . Re-verified 22 Nov 2026: Prisma 8 drop consent — https://www.prisma.io/changelog/2026-10-09 ; Supabase MCP read-only mode — https://supabase.com/docs/guides/ai-tools/mcp . Branching surfaces from provider docs; verify flags before asserting.
@@ -1,93 +0,0 @@
1
- # Durable — backups, recovery & runtime data safety
2
-
3
- Load for any backup, recovery, or runtime finding. `SNAPSHOT` = sourced 3 October 2026 — provider tiers and defaults change often; verify before asserting.
4
-
5
- Contents: Part 1 — RPO/RTO, tiers, provider snapshot, restore drill, uploads. Part 2 — idempotency/outbox, poolers, SQLite, atomic files.
6
-
7
- ## Part 1 — Backups & recovery
8
-
9
- ### RPO/RTO first
10
-
11
- - **RPO** (Recovery Point Objective): how much data loss is acceptable — "5 minutes" vs "a day".
12
- - **RTO** (Recovery Time Objective): how long until you are back up.
13
-
14
- Pick both consciously; they dictate the tier. An app where users type for hours wants an RPO near zero; a read-mostly catalog may accept a day. Stating them where the backup is configured turns "we have backups" into an actual contract.
15
-
16
- ### The tiers, best to weakest
17
-
18
- 1. **PITR (point-in-time recovery)** — base backup + continuous write-ahead-log archive; restore to any second in the retention window. RPO of seconds-to-minutes. Gold standard for transactional data.
19
- 2. **Scheduled logical dumps** (`pg_dump`, `mongodump`, Firestore export) — portable, cheap, easy to verify by inspection; but restore time scales with size and everything after the dump starts is lost. Fine as the archive layer or the only layer for small apps.
20
- 3. **Storage/block snapshots** — fast, near-zero impact; restoring a running DB from a raw snapshot leaves crash recovery to do the rest. Good for staging clones; for disaster recovery prefer PITR.
21
- 4. **Nothing / a copy on the same machine** — the default state of most small projects, and the finding most often reported after it stops mattering.
22
-
23
- **3-2-1 floor**: at least 3 copies, 2 different media/systems, 1 off-site (different provider or account is fine). A dump cron writing to the same VPS is one disk failure from zero.
24
-
25
- ### Managed-provider baselines (`SNAPSHOT` — Supabase, Neon, PlanetScale Postgres, Cloudflare D1 and Turso re-checked on official docs 22 Nov 2026, AWS RDS 22 Oct 2026; Firestore and Atlas unchecked since 3 Oct 2026; verify the project's actual settings before quoting)
26
-
27
- | Provider | What the docs say |
28
- |---|---|
29
- | Supabase | Daily backups: Pro 7 days, Team 14, Enterprise up to 30. PITR is a paid **add-on** (Pro+, any compute size; worst-case recovery point 2 minutes), and turning it on stops the daily backups. **Deleting a project permanently deletes its backups.** Backups exclude Storage objects — restoring does not bring back deleted files. Custom-role passwords not in daily backups |
30
- | Neon | History window (formerly "restore window": WAL history, set under Settings → Postgres or `history_retention_seconds`) powers instant restore, time travel, and branching from the past: Free capped at 6 hours (1 GB); Launch default 1 day, max 7; Scale default 1 day, max 30 |
31
- | PlanetScale Postgres | Default backup every 12 hours plus on-demand; PITR via WAL archiving, with WAL kept as long as the oldest backup; check the branch's schedule |
32
- | AWS RDS | Retention 0–35 days; default 1 day via API/CLI, 7 days via console. 0 disables automated backups and PITR |
33
- | Cloudflare D1 | Time Travel always on: restore to any minute in the last 30 days on Workers Paid, **7 days on Workers Free** |
34
- | Turso | PITR: Free 24 hours; Developer 10, Scaler 30, Pro 90 days; deleted DBs restorable up to 5 days on paid plans |
35
- | Firestore (3 Oct 2026) | Without PITR, version retention is 1 hour; enabling PITR gives 7 days. Scheduled exports for longer history |
36
- | MongoDB Atlas | Cloud backups / continuous backup by cluster tier — not verified this snapshot; check the cluster's backup policy |
37
-
38
- Not re-verified this snapshot (removed): Crunchy Bridge numbers. Aurora: same 1–35 day continuous backup model as RDS — confirm per cluster.
39
-
40
- The recurring failure: the free tier's weekly backup or none at all, assumed to be PITR because the marketing page said "backups". Check the project's actual settings, not the provider's homepage.
41
-
42
- **Self-hosted Postgres**: pgBackRest, Barman, or WAL-G → S3-compatible storage. **Self-hosted/embedded SQLite**: Litestream (continuous replication to object storage). The 2025 rewrite (v0.5.x, `SNAPSHOT`) stores changes as LTX files (sorted page changesets that compact), giving faster point-in-time restores, and uses compare-and-swap leases on object storage to avoid two primaries; configs from 0.3.x need review on upgrade. Weaker floor: `sqlite3 .backup` / `VACUUM INTO` on a schedule, shipped off-machine with restic/borg. **Firestore/DynamoDB-style**: scheduled exports to storage — PITR is a paid or absent feature; check the project's state.
43
-
44
- ### The restore drill (the only proof)
45
-
46
- 1. Note the current time / snapshot point of a known state.
47
- 2. Make a recognizable change (insert a canary row).
48
- 3. Restore to the noted point into a *separate* location — never over the live DB.
49
- 4. Verify the canary is absent. Time the whole operation — that measured duration is the real RTO; write it down.
50
- 5. Repeat on a schedule (quarterly is the common bar); the drill doc itself is the runbook you'll follow at 3am.
51
-
52
- **File uploads need their own answer** — DB backups don't cover a disk of user uploads unless the backup includes the volume or the uploads live in object storage with versioning (S3 versioning or equivalent preserves deleted/overwritten objects — turn it on and add a lifecycle rule for noncurrent versions). For ransomware-grade or compliance retention, S3 Object Lock (requires versioning) stores objects write-once-read-many; use governance mode unless you truly need compliance mode, which nobody — including you — can shorten. A credential that can delete the bucket can delete its backups: keep backup copies in a different account. DB row + orphaned-file mismatch is a finding: cleanup discipline (delete file then row, in that order, with the row's file path recorded for resweep) or accept orphans.
53
-
54
- ### What a backup must exclude/include
55
-
56
- Include: the data, schema history (migrations), and anything unrecreatable (uploads, generated-but-expensive artifacts). Exclude/rotate: secrets in plaintext dumps (a dump with PII inherits compliance-guard's storage rules — encrypt at rest, restrict access), logs, caches. Test that the restore includes what you think: a backup that skips a table because of a wrong flag is the most humiliating restore failure.
57
-
58
- ## Part 2 — Runtime data safety
59
-
60
- ### Idempotency & exactly-once writes
61
-
62
- Anything retried — webhooks, queue jobs, mobile clients on flaky networks, imports — **will** run twice. Patterns, in order of preference:
63
-
64
- - **Store-side dedup**: unique constraint on the natural key (webhook event ID, job ID + attempt) and `INSERT ... ON CONFLICT DO NOTHING` returning whether it inserted. The store is the arbiter; no race can beat it.
65
- - **Upsert by natural key**: `ON CONFLICT ... DO UPDATE` with a deterministic outcome, so replay converges instead of duplicating.
66
- - **Compare-and-set / optimistic concurrency**: `UPDATE ... WHERE version = :expected`, check affected count — the guard for read-modify-write races (balance updates, seat claims, counter increments).
67
- - **Outbox pattern**: state changes and the events they trigger written in one transaction to an outbox table, published by a separate relay — eliminates "DB updated but email/queue lost" (and its evil twin, "email sent but DB rolled back"). The default answer where a store lacks cross-service transactions.
68
-
69
- Check-then-act without a constraint (`if not exists: insert`) is a bug that just hasn't raced yet.
70
-
71
- ### Connection & session pitfalls (correctness, not speed)
72
-
73
- - **Transaction-mode poolers** (PgBouncer, Supabase port 6543 — Supavisor on the shared pooler, PgBouncer on the dedicated one; port 5432 is direct or session mode — Neon's `-pooler` endpoint which runs PgBouncer, RDS Proxy): each transaction may run on a different connection — session state breaks. Protocol-level named prepared statements work through PgBouncer ≥ 1.21 when `max_prepared_statements` is non-zero (on by default, 200, since PgBouncer 1.24; SQL-level `PREPARE` still breaks). Self-hosted PgBouncer: run ≥ 1.26.1 (14 Oct 2026), which fixes CVE-2026-107350 (a SCRAM user can log in as another user, admins included) and CVE-2026-107348/107349, on top of 1.26.0's pre-auth crash/hang fixes (CVE-2026-19888, CVE-2026-6668, CVE-2026-6669) (`SNAPSHOT`). Run migrations over a **direct/session** connection, not the transaction pooler. Other casualties: session-level `SET`, advisory locks, `LISTEN/NOTIFY`, temp tables, `COPY`. Patterns: keep per-transaction state in SQL (`SET LOCAL`), use `pg_advisory_xact_lock` (transaction-scoped), or route state-needing work to a direct/session connection.
74
- - **Serverless functions**: one pool per *instance* (module scope), never per request; assume the process freezes between invocations — no in-memory "it'll flush later".
75
- - **Postgres connections are processes** — exhausting them fails every new client; the fix is a pooler, not a bigger `max_connections`. (Sizing the pool for throughput is lean's lane.)
76
- - **Always release/close in `finally`** — a leaked connection per request is a slow outage and a durability finding.
77
-
78
- ### SQLite runtime rules
79
-
80
- - **WAL mode on** (`PRAGMA journal_mode=WAL`) — readers don't block the writer; the default rollback journal serializes everything.
81
- - **`busy_timeout` set** (e.g. 5000ms) — without it, concurrent access returns `SQLITE_BUSY` instantly instead of waiting.
82
- - **`PRAGMA foreign_keys = ON` on every connection** — it is per-connection and off by default; constraints silently unenforced is a schema-integrity finding wearing runtime clothes.
83
- - **One writer** — route writes through a single instance or a write queue; multiple app instances writing one SQLite file on shared/network storage corrupts. Local disk (NVMe), not NFS.
84
- - **Backup without Litestream**: `VACUUM INTO 'backup.db'` or the `sqlite3 .backup` command — never copy the file mid-write; the WAL file and the checkpoint state are part of the database.
85
-
86
- ### Atomic file writes and cleanup
87
-
88
- - **Temp-then-rename** for any file a reader may open: write to `path.tmp`, `fsync`, then `rename` over the target. Atomic on POSIX; a crash mid-write never leaves a truncated JSON the app will happily parse.
89
- - **Delete in dependency order and resweep**: child rows then parent; file after the row referencing it is gone (or record orphans for a sweep job). Reversible orderings first: soft-delete the row, mark the file, sweep files later — undoability beats tidiness.
90
-
91
- ---
92
-
93
- **Provenance:** snapshot 3 October 2026; Supabase PITR and backup behaviour, Neon history window, PlanetScale Postgres, D1 free-tier window, Turso and PgBouncer 1.26.1 re-checked 22 Nov 2026 (https://supabase.com/docs/guides/platform/backups , https://developers.cloudflare.com/d1/reference/time-travel/ , https://www.pgbouncer.org/changelog.html ); Neon restore window, RDS retention and D1 Time Travel re-checked 22 Oct 2026. Accessed 3 Oct 2026: https://supabase.com/docs/guides/platform/backups ; https://neon.com/docs/introduction/restore-window ; https://planetscale.com/docs/postgres/backups ; https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.BackupRetention.html ; https://developers.cloudflare.com/d1/reference/time-travel/ ; https://docs.turso.tech/features/point-in-time-recovery ; https://cloud.google.com/firestore/native/docs/use-pitr ; https://fly.io/blog/litestream-revamped/ ; https://litestream.io/ ; https://www.pgbouncer.org/config.html ; https://www.pgbouncer.org/changelog.html ; https://neon.com/docs/connect/connection-pooling ; https://supabase.com/docs/guides/database/connecting-to-postgres ; https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html . Earlier sources: Postgres WAL/PITR documentation and pgBackRest/Barman/WAL-G docs, Litestream documentation (SQLite WAL replication), provider documentation for Supabase/Neon/RDS/Crunchy/MongoDB Atlas backup tiers (tier specifics are `SNAPSHOT` — they change often), PgBouncer documentation (transaction-mode feature matrix), SQLite documentation (WAL, busy_timeout, foreign_keys pragma, VACUUM INTO), current disaster-recovery practice guides (3-2-1, RPO/RTO, restore drills). Provider tiers and defaults decay fastest — re-verify before asserting.
@@ -1,87 +0,0 @@
1
- # Durable — migrations & schema
2
-
3
- Load for any migration or schema finding. Postgres examples dominate because it is the default; MySQL and SQLite divergences are called out. `SNAPSHOT` = sourced 3 October 2026 unless dated otherwise (Prisma and PostgreSQL 19 status re-verified 22 October 2026) — version behaviours decay, verify before asserting. Run every migration on a branch or copy first, and obey SKILL.md's agent gate before applying anything to a database that may hold real data.
4
-
5
- ## The one rule that prevents most downtime
6
-
7
- **Never deploy a schema change and the code that depends on it in the same step.** Old code must keep working against the new schema, and new code must keep working against the old schema, for at least one deploy cycle. That is what expand-contract buys.
8
-
9
- ## Expand-contract (parallel change)
10
-
11
- Every breaking change is two or three separately-deployed steps, each leaving the system fully functional:
12
-
13
- 1. **Expand** — add the new column/table/index (nullable, no constraints yet). Old code ignores it; nothing breaks.
14
- 2. **Backfill + dual-write** — copy old data to new in batches; code writes both; code reads new with fallback to old. Deploy, watch, wait.
15
- 3. **Contract** — after the old path is provably dead (feature flag flipped, traffic at zero), remove the old column and the dual-write.
16
-
17
- Rollback at any point is "flip back to the old path", not "restore the database".
18
-
19
- **Rename a column** — never `RENAME COLUMN` on a live system (breaks all in-flight code): add `email`, backfill from `email_addr`, dual-write, switch reads, drop `email_addr` in a later deploy.
20
-
21
- **Change a type or split a column** — add the new column, backfill with transformation in batches, cut writes over, drop old. Same shape, always.
22
-
23
- ## Lock-safety table (Postgres)
24
-
25
- What common DDL actually does to a live table (`SNAPSHOT` — verify per version).
26
-
27
- **Always set `SET lock_timeout = '5s'` (and a `statement_timeout`) before DDL on a live table.** An `ALTER` queued behind a long transaction blocks every query behind it; the timeout turns that outage into a retryable failure. `CONCURRENTLY` operations cannot run inside a transaction block — keep them in their own migration (many ORMs wrap migrations in a transaction by default).
28
-
29
- | Operation | Behavior | Safe pattern |
30
- |---|---|---|
31
- | `ADD COLUMN` (no default) | Fast, brief lock | Fine as-is |
32
- | `ADD COLUMN ... NOT NULL DEFAULT x` | Fast since Postgres 11 (default not backfilled); table rewrite before 11 | Fine on ≥11; otherwise add nullable → backfill → `SET NOT NULL` |
33
- | `SET NOT NULL` on existing column | Full-table scan under lock | Backfill first. Postgres 18: `ADD CONSTRAINT … NOT NULL col NOT VALID`, then `VALIDATE CONSTRAINT`. Older: `CHECK (col IS NOT NULL) NOT VALID` → `VALIDATE` → `SET NOT NULL` (uses the valid check, skipping the scan) → drop the check |
34
- | `CREATE INDEX` | Blocks writes for the whole build | `CREATE INDEX CONCURRENTLY` (drop with `DROP INDEX CONCURRENTLY`); slower, non-transactional — if it fails, drop the invalid index and retry |
35
- | `ADD FOREIGN KEY` | Locks while validating all rows | Two-step: `ADD CONSTRAINT ... NOT VALID` then `VALIDATE CONSTRAINT` (weaker lock) |
36
- | One giant `UPDATE`/`DELETE` | Locks rows, bloats the table, stalls replication | Batch: keyset-select N rows → update → sleep → repeat, resumable from last key |
37
- | `DROP COLUMN` | Fast (metadata) — but data is gone | Only in the contract phase, after dual-write is verified dead |
38
-
39
- **Postgres 18 notes** (`SNAPSHOT`, released 25 Sep 2025): `uuidv7()` built in; generated columns are now **virtual by default** (computed on read — say `STORED` if you need it materialised or indexed); `pg_upgrade` keeps planner statistics (not extended statistics), so post-upgrade slow plans are less likely; new clusters get data checksums by default and `pg_upgrade` needs matching checksum settings (`initdb --no-data-checksums` for old non-checksum clusters); asynchronous I/O via `io_method`. **Postgres 19 notes** (`SNAPSHOT`, released 19 Nov 2026): JIT off by default; a warning on md5 password logins (move to SCRAM); RADIUS auth removed; `INSERT … ON CONFLICT DO SELECT`. **Postgres 14 reached end of life on 12 November 2026** (13 on 13 Nov 2025) — no more security or data-corruption fixes; flag any project on ≤14 as High.
40
-
41
- **Tools that automate expand/contract** (`SNAPSHOT`, verify maturity before recommending): pgroll (Xata; serves old and new schema versions via views during a migration), Reshape (same idea, less active), and migration linters — Squawk (Postgres SQL lint), `strong_migrations` (Rails), `django-pg-zero-downtime-migrations` / `django-migration-linter` (Django). For Laravel, no equivalent gem is verified here — review SQL with `php artisan migrate --pretend`.
42
-
43
- MySQL has no `CONCURRENTLY`: use `ALGORITHM=INSTANT/INPLACE` where the version supports it, `gh-ost` or `pt-online-schema-change` for big tables (`SNAPSHOT` — both maintained; verify current). Postgres big-table rebuilds (PK change, deep bloat, partitioning): `pg_repack`, which rebuilds online with minimal locking and needs ~2x disk temporarily. PostgreSQL 19 (released 19 Nov 2026 — `SNAPSHOT` 22 Nov 2026) adds a built-in `REPACK` command; plain `REPACK` takes `ACCESS EXCLUSIVE`, `REPACK (CONCURRENTLY)` avoids it — on 19+ prefer it over installing `pg_repack` for bloat, after checking the running version.
44
-
45
- ## Resumable backfill skeleton
46
-
47
- ```sql
48
- -- keyset, not OFFSET: stable order, restartable from last processed id
49
- UPDATE users
50
- SET status = 'active'
51
- WHERE id IN (
52
- SELECT id FROM users WHERE id > :last_id AND status IS NULL
53
- ORDER BY id LIMIT 5000
54
- )
55
- RETURNING id; -- record max(id) as the checkpoint; sleep between batches
56
- ```
57
-
58
- From application code the same shape applies: select batch by `id > last`, write, record checkpoint durably (a checkpoint table or job state), sleep. A crashed backfill resumes at the checkpoint instead of restarting or double-writing. On stores without `RETURNING`, select the batch first, update by primary key, checkpoint the max selected id.
59
-
60
- ## Migration tooling discipline
61
-
62
- - **Versioned, checked-in migrations from the first table** — Alembic (Python), Flyway/Liquibase (JVM), golang-migrate (Go), sqlx/Diesel (Rust), Drizzle Kit / Prisma Migrate (TS). Hand-run SQL files and "schema.sql we run sometimes" are how drift starts.
63
- - **Review generated SQL before it touches anything real.** ORM migration generators emit what the schema diff implies: renaming a column in the schema file becomes `DROP COLUMN` + `ADD COLUMN` — the data is dropped. Prisma flow: `migrate dev --create-only`, read the SQL, fix it to a safe expand-contract, then apply. Drizzle: `drizzle-kit generate`, read the SQL, then `drizzle-kit migrate`. This review is the single highest-value habit in this file.
64
- - **Prisma 7** (`SNAPSHOT`, Nov 2025): Rust-free TypeScript client via the `prisma-client` generator with a required `output`, driver adapters required, config in `prisma.config.ts`, and automatic seeding after migrate removed. Migration semantics are unchanged: `migrate dev` (dev only, may prompt to reset), `migrate deploy` (production, applies pending only), `migrate reset` (drops everything — agent-gated, see SKILL.md). Upgrading v6→v7 is a client/config change; it should not create a migration — if a diff appears, read it. Prisma 6's security-patch window ended 19 Nov 2026, so it is unsupported; MongoDB users must go to v8, because v7 has no MongoDB support.
65
- - **Prisma ORM 8** (`SNAPSHOT` 22 Nov 2026): still a release candidate (CLI `8.0.0-rc.34` on 16 Nov 2026, no GA date given), but `npm install prisma` / `npx prisma` already resolve to the v8 CLI, which does not read `schema.prisma` and has no `generate`, `migrate dev` or `db push`. A Prisma 7 project must pin `prisma@7` in `package.json`; an unpinned `npx prisma migrate …` is a finding. Prisma 7 stays supported for 18 months after v8 GA. v8's schema commands are `prisma migration plan` and `prisma db update`, which ask about each dropped model or field (`agent-db-safety.md` §Tool interlocks).
66
- - **`db push` / `drizzle-kit push` / sync-style commands are for throwaway dev databases only** (Drizzle documents push as its rapid-prototyping path). They bypass migration history; on a database with data they can apply destructive diffs without review. If a deploy script or CI contains `db push` against anything shared or persistent, that is a finding.
67
- - **Never edit an applied migration.** The hash changes, history diverges, teammates' databases desync. Corrections are new migrations.
68
- - **Forward-only in production.** Down migrations cannot faithfully reverse a migration that touched data (you cannot un-drop a column). "Rollback" is a new forward migration that reverses the change, written and tested like any other. Down migrations are a dev convenience at most.
69
- - **Apply migrations as a distinct step before the new code rolls out** (deploy script step or pre-deploy Job), never lazily on first request, never concurrently from every replica. One applier, ordered, recorded.
70
-
71
- ## CI and testing
72
-
73
- - A CI job that applies all migrations to a throwaway database (a fresh dump or seed of production shape) on every PR — catches broken SQL and lock surprises before merge, and keeps prod-shaped test data honest.
74
- - Migration + dependent code in one PR is fine; shipping them as one *deploy step* is not — expand and contract are separate deploys even when they merge as one review.
75
-
76
- ## Schema integrity sweep
77
-
78
- - **Foreign keys enforced?** MySQL: check the engine (InnoDB enforces, MyISAM does not). SQLite: `PRAGMA foreign_keys = ON` per connection — it is OFF by default and every connection must set it. Postgres: on by default; hunt instead for `ON DELETE` behavior nobody chose — cascade on a `users` delete that sweeps orders, messages, and uploads is a mass-delete path wearing a constraint's clothing.
79
- - **Unique constraints where identity lives** — email, username, external IDs (`stripe_customer_id`), webhook event IDs. Without the constraint, every race produces a duplicate; with it, the race becomes a retryable error. Partial unique indexes for soft delete: `CREATE UNIQUE INDEX ... ON users(email) WHERE deleted_at IS NULL` — the live rows stay unique, the deleted ones don't collide.
80
- - **Nullable-in-fact columns** — every column the code treats as required should be `NOT NULL`, or the store will accept what the code never imagined.
81
- - **Lossy types** — money in floating point (use integer cents or `NUMERIC`), IDs in 32-bit ints near overflow (YouTube hit this), timestamps without timezone when the product is multi-timezone, enums-as-free-text where a `CHECK` or lookup table belongs.
82
- - **Orphan check** — rows referencing deleted parents (FKs added late don't clean history): count them before adding the constraint, and expect `VALIDATE` to fail if history is dirty. Decide: clean, archive, or keep the constraint `NOT VALID` deliberately and document why.
83
- - **Drift** — schema file vs live DB: most ORMs can diff (`prisma migrate diff`, `drizzle-kit check`). Drift on production means migrations were bypassed at some point — a process finding, not just a schema one.
84
-
85
- ---
86
-
87
- **Provenance:** snapshot 3 October 2026. Re-verified 22 Nov 2026: PostgreSQL 19 release https://www.postgresql.org/about/news/postgresql-19-released-3449/ ; versioning (14 EOL) https://www.postgresql.org/support/versioning/ ; Prisma release status (8.0.0-rc.34, Prisma 6 window ended) and drop-consent changelog https://www.prisma.io/changelog/2026-10-09 . Re-verified 22 Oct 2026: Prisma release status https://www.prisma.io/docs/orm/release-status and changelog https://www.prisma.io/changelog/2026-10-02 ; PostgreSQL 19 RC1 https://www.postgresql.org/about/news/postgresql-19-rc-1-released-3409/ and https://www.postgresql.org/docs/19/sql-repack.html . Accessed 3 Oct 2026: PostgreSQL 18 release notes https://www.postgresql.org/docs/18/release-18.html and announcement https://www.postgresql.org/about/news/postgresql-18-released-3142/ ; versioning policy (13 EOL) https://www.postgresql.org/support/versioning/ ; Prisma 7 https://www.prisma.io/blog/announcing-prisma-orm-7-0-0 and https://www.prisma.io/docs/guides/upgrade-prisma-orm/v7 ; Drizzle push https://orm.drizzle.team/docs/drizzle-kit-push . Earlier sources: Postgres documentation (DDL locking behavior, `CONCURRENTLY`, `NOT VALID`/`VALIDATE`, ADD COLUMN default fast-path), current zero-downtime migration practice guides (expand-contract/parallel-change, batched keyset backfill, forward-only production, pre-deploy application), Prisma/Drizzle documentation (create-only review workflow, `db push` scope), MySQL online-schema-change tooling (gh-ost, pt-online-schema-change) public docs. Version-specific lock behavior decays fastest — re-verify against the running version before asserting.
@@ -1,43 +0,0 @@
1
- ---
2
- name: gg-guide
3
- description: "Only when the user asks how to use GG Coder itself: how or where to do something in the app (models, sessions, settings, MCP, `!` and `/` commands, Checklist, safety, Goals, Motion, Chat, files, errors). Do NOT use for coding work."
4
- metadata:
5
- version: "2026.11.30"
6
- ---
7
-
8
- # GG Coder guide
9
-
10
- How the GG Coder desktop app works, for answering the user's questions about it. The user is in the desktop app (not the `ggcoder` terminal CLI) unless they say otherwise.
11
-
12
- ## Rules
13
-
14
- 1. Use this only to answer a question the user asked about the app. Don't bring the app's features up unprompted while doing other work.
15
- 2. Read the matching reference below before answering. Answer from it, not from memory: the app changes often. Each page ends with common questions in users' own words.
16
- 3. Use the exact on-screen labels from the reference, in bold, and say where they are (for example **Settings** › **General**).
17
- 4. If the references don't cover it, say so plainly and suggest where to look in the app. Never invent a button, setting or command.
18
- 5. Give the steps the user needs, not whole sections. Answer first, in your reply text. Only after that, if it's something you could do for them (run a Checklist item, a security review, a commit), offer it in one line; don't start it unasked.
19
-
20
- ## Quick answers
21
-
22
- - New session: **New session** in the **More** panel (the ⋯ key on the bottom bar), **New session** in the sidebar, or **+ New session** in the project's session list. See `references/sessions-and-history.md`.
23
- - Code, Chat, Goal and Motion: the four mode buttons on the icon rail (left of every window, Settings too). They are not in the sidebar. See `references/getting-started.md`.
24
- - Change model or thinking: click the model readout in a session to open the **Model** panel. See `references/models-and-sign-in.md`.
25
- - Improve a prompt before sending: the **Enhance** key next to send. See `references/code-mode.md`.
26
- - Add an MCP server: give the user the exact line to paste into the chat input, `!claude mcp add …` (from the server's docs). It loads straight away, no restart. Never run `claude mcp add` in your own bash tool: that changes Claude Code's config, not GG Coder's. See `references/mcp-and-skills.md`.
27
- - Is my app safe / ready to ship: the **Checklist** (Security, Dependencies, Secrets and the rest), or ask for a review. See `references/checklist-and-safety.md`.
28
- - App problems: the log is `~/.gg/gg-app-sidecar.log`. See `references/troubleshooting-and-data.md`.
29
-
30
- ## References
31
-
32
- | The question is about | Read |
33
- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
34
- | First run, the icon rail (modes, checklist, Settings) and session sidebar (projects, folding), session status marks, the title row, Home, projects, windows and layout, tray menu, updates, What's new, About, zoom, keyboard shortcuts | `references/getting-started.md` |
35
- | Sessions: new, resume, import, export, the transcript, answering GG's questions, context and compaction, errors in the chat | `references/sessions-and-history.md` |
36
- | Code windows: composer, `@` files, attachments, queued messages, `!` commands, `/` commands, schedules, Enhance, plan review, tasks, notes, git and commits, CI | `references/code-mode.md` |
37
- | Ken, Autopilot, sub-agents and critters, trophies, Radio | `references/ken-and-autopilot.md` |
38
- | Checklist, project health, making an app safe or ready to ship, and how GG Coder keeps the user safe | `references/checklist-and-safety.md` |
39
- | Providers and sign-in, plans and keys, choosing a model, thinking levels, local models, usage | `references/models-and-sign-in.md` |
40
- | Every Settings tab: General, AI Providers, Remote (Telegram), MCP, Steroids, About | `references/settings.md` |
41
- | MCP servers (panel and `!claude mcp …`), skills, blocked skills | `references/mcp-and-skills.md` |
42
- | Chat (agents, Brain memory), Motion (videos) and Goals | `references/chat-motion-goals.md` |
43
- | Files on disk, logs, errors, sign-in and update problems, reporting a bug | `references/troubleshooting-and-data.md` |