spell 0.8.7 → 0.8.9

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 (304) hide show
  1. package/README-epics.md +149 -49
  2. package/app/package.json +25 -1
  3. package/app/spaces/@spell/guides/SpellUI/SpellUI.spellml +486 -486
  4. package/app/spaces/@spell/sites/SpellApp/SpellApp.spellml +50 -124
  5. package/dist/app/app/pages/SiteBoardView.css +5 -5
  6. package/dist/app/app/pages/SiteBoardView.js +1 -1
  7. package/dist/app/app/pages/SiteEditorPage.js +6 -3
  8. package/dist/app/app/pages/SiteEdits.js +27 -10
  9. package/dist/app/app/pages/SiteWrites.js +11 -0
  10. package/dist/app/app/runner/spellRuntime.js +1 -0
  11. package/dist/cli/publish/PublishedPackage.d.ts +2 -1
  12. package/dist/cli/publish/PublishedPackage.js +6 -3
  13. package/dist/cli/publish/ScratchInstall.d.ts +14 -3
  14. package/dist/cli/publish/ScratchInstall.js +69 -8
  15. package/dist/epic/cli/EpicProgram.js +20 -5
  16. package/dist/epic/cli/epicGroups.js +7 -1
  17. package/dist/epic/command/BaseBranch.d.ts +35 -0
  18. package/dist/epic/command/BaseBranch.js +58 -0
  19. package/dist/epic/command/EpicCheckout.d.ts +1 -1
  20. package/dist/epic/command/EpicCheckout.js +4 -4
  21. package/dist/epic/command/EpicGuide.js +3 -2
  22. package/dist/epic/command/EpicTools.d.ts +5 -0
  23. package/dist/epic/command/EpicTools.js +14 -3
  24. package/dist/epic/command/MainMerge.d.ts +26 -15
  25. package/dist/epic/command/MainMerge.js +60 -16
  26. package/dist/epic/command/PullRequest.d.ts +45 -0
  27. package/dist/epic/command/PullRequest.js +100 -0
  28. package/dist/epic/command/RepoInit.d.ts +196 -39
  29. package/dist/epic/command/RepoInit.js +481 -60
  30. package/dist/epic/command/Requests.d.ts +1 -0
  31. package/dist/epic/command/Requests.js +7 -1
  32. package/dist/epic/command/SessionMoves.js +2 -1
  33. package/dist/epic/command/SkillsCheck.js +3 -2
  34. package/dist/epic/command/Stock.js +3 -1
  35. package/dist/epic/command/TurnEnd.d.ts +1 -1
  36. package/dist/epic/command/TurnEnd.js +4 -3
  37. package/dist/epic/command/Worktrees.d.ts +20 -3
  38. package/dist/epic/command/Worktrees.js +39 -7
  39. package/dist/epic/command/command.types.d.ts +3 -0
  40. package/dist/epic/components/__pack/epics.entry.js +43 -43
  41. package/dist/epic/components/__pack/epics.pack.js +36 -12794
  42. package/dist/epic/config/CodeHost.d.ts +96 -0
  43. package/dist/epic/config/CodeHost.js +89 -0
  44. package/dist/epic/config/EngineFiles.mjs +60 -0
  45. package/dist/epic/config/EpicConfig.d.ts +20 -3
  46. package/dist/epic/config/EpicConfig.js +25 -1
  47. package/dist/epic/config/EpicRepo.js +1 -1
  48. package/dist/epic/config/GitHub.d.ts +75 -3
  49. package/dist/epic/config/GitHub.js +106 -5
  50. package/dist/epic/config/GitLab.d.ts +138 -0
  51. package/dist/epic/config/GitLab.js +297 -0
  52. package/dist/epic/config/LayeredSettings.js +3 -2
  53. package/dist/epic/server/EpicServer.d.ts +1 -1
  54. package/dist/epic/server/EpicServer.js +26 -12
  55. package/dist/epic/tool/InboxPoller.mjs +2 -1
  56. package/dist/epic/tool/MigrateCommands.js +6 -8
  57. package/dist/epic/tool/PlanCommits.d.ts +7 -4
  58. package/dist/epic/tool/PlanCommits.js +7 -5
  59. package/dist/epic/tool/PlanDocCommands.js +3 -4
  60. package/dist/epic/tool/PlanDocFiles.d.ts +3 -1
  61. package/dist/epic/tool/PlanDocFiles.js +13 -5
  62. package/dist/epic/tool/ServedFolders.d.ts +1 -1
  63. package/dist/epic/tool/ServedFolders.js +4 -4
  64. package/dist/epic/tools/PageInboxes.js +3 -3
  65. package/dist/epic/tools/_assets/commands.entry.js +149 -68
  66. package/dist/epic/tools/_assets/commands.js +20 -2073
  67. package/dist/epic/tools/_assets/core-reference.entry.js +244 -124
  68. package/dist/epic/tools/_assets/core-reference.js +20 -2142
  69. package/dist/epic/tools/_assets/emoji/cldr/0.js +2 -2
  70. package/dist/epic/tools/_assets/emoji/cldr/a.js +2 -2
  71. package/dist/epic/tools/_assets/emoji/cldr/b.js +2 -2
  72. package/dist/epic/tools/_assets/emoji/cldr/c.js +2 -2
  73. package/dist/epic/tools/_assets/emoji/cldr/d.js +2 -2
  74. package/dist/epic/tools/_assets/emoji/cldr/e.js +2 -2
  75. package/dist/epic/tools/_assets/emoji/cldr/f.js +2 -2
  76. package/dist/epic/tools/_assets/emoji/cldr/g.js +2 -2
  77. package/dist/epic/tools/_assets/emoji/cldr/h.js +2 -2
  78. package/dist/epic/tools/_assets/emoji/cldr/i.js +2 -2
  79. package/dist/epic/tools/_assets/emoji/cldr/j.js +2 -2
  80. package/dist/epic/tools/_assets/emoji/cldr/k.js +2 -2
  81. package/dist/epic/tools/_assets/emoji/cldr/l.js +2 -2
  82. package/dist/epic/tools/_assets/emoji/cldr/m.js +2 -2
  83. package/dist/epic/tools/_assets/emoji/cldr/n.js +2 -2
  84. package/dist/epic/tools/_assets/emoji/cldr/o.js +2 -2
  85. package/dist/epic/tools/_assets/emoji/cldr/p.js +2 -2
  86. package/dist/epic/tools/_assets/emoji/cldr/r.js +2 -2
  87. package/dist/epic/tools/_assets/emoji/cldr/s.js +2 -2
  88. package/dist/epic/tools/_assets/emoji/cldr/t.js +2 -2
  89. package/dist/epic/tools/_assets/emoji/cldr/u.js +2 -2
  90. package/dist/epic/tools/_assets/emoji/cldr/v.js +2 -2
  91. package/dist/epic/tools/_assets/emoji/cldr/w.js +2 -2
  92. package/dist/epic/tools/_assets/emoji/cldr/x.js +2 -2
  93. package/dist/epic/tools/_assets/emoji/cldr/y.js +2 -2
  94. package/dist/epic/tools/_assets/emoji/cldr/z.js +2 -2
  95. package/dist/epic/tools/_assets/emoji/fomantic/0.js +2 -2
  96. package/dist/epic/tools/_assets/emoji/fomantic/a.js +2 -2
  97. package/dist/epic/tools/_assets/emoji/fomantic/b.js +2 -2
  98. package/dist/epic/tools/_assets/emoji/fomantic/c.js +2 -2
  99. package/dist/epic/tools/_assets/emoji/fomantic/d.js +2 -2
  100. package/dist/epic/tools/_assets/emoji/fomantic/e.js +2 -2
  101. package/dist/epic/tools/_assets/emoji/fomantic/f.js +2 -2
  102. package/dist/epic/tools/_assets/emoji/fomantic/g.js +2 -2
  103. package/dist/epic/tools/_assets/emoji/fomantic/h.js +2 -2
  104. package/dist/epic/tools/_assets/emoji/fomantic/i.js +2 -2
  105. package/dist/epic/tools/_assets/emoji/fomantic/j.js +2 -2
  106. package/dist/epic/tools/_assets/emoji/fomantic/k.js +2 -2
  107. package/dist/epic/tools/_assets/emoji/fomantic/l.js +2 -2
  108. package/dist/epic/tools/_assets/emoji/fomantic/m.js +2 -2
  109. package/dist/epic/tools/_assets/emoji/fomantic/n.js +2 -2
  110. package/dist/epic/tools/_assets/emoji/fomantic/o.js +2 -2
  111. package/dist/epic/tools/_assets/emoji/fomantic/p.js +2 -2
  112. package/dist/epic/tools/_assets/emoji/fomantic/q.js +2 -2
  113. package/dist/epic/tools/_assets/emoji/fomantic/r.js +2 -2
  114. package/dist/epic/tools/_assets/emoji/fomantic/s.js +2 -2
  115. package/dist/epic/tools/_assets/emoji/fomantic/t.js +2 -2
  116. package/dist/epic/tools/_assets/emoji/fomantic/u.js +2 -2
  117. package/dist/epic/tools/_assets/emoji/fomantic/v.js +2 -2
  118. package/dist/epic/tools/_assets/emoji/fomantic/w.js +2 -2
  119. package/dist/epic/tools/_assets/emoji/fomantic/x.js +2 -2
  120. package/dist/epic/tools/_assets/emoji/fomantic/y.js +2 -2
  121. package/dist/epic/tools/_assets/emoji/fomantic/z.js +2 -2
  122. package/dist/epic/tools/_assets/goals-live.js +318 -210
  123. package/dist/epic/tools/_assets/highlight.min.js +5764 -5269
  124. package/dist/epic/tools/_assets/lazy/code-engine.js +5 -1270
  125. package/dist/epic/tools/_assets/lazy/markdown-engine.js +67 -1513
  126. package/dist/epic/tools/_assets/lazy/markdown-sanitizer.js +3 -753
  127. package/dist/epic/tools/_assets/spell-comments.entry.js +282 -159
  128. package/dist/epic/tools/_assets/spell-comments.js +24 -3716
  129. package/dist/epic/tools/_assets/spell-doc-comments.js +1243 -816
  130. package/dist/epic/tools/_assets/spell-doc-helpers.js +298 -165
  131. package/dist/epic/tools/_assets/spell-doc-runtime.js +2760 -1415
  132. package/dist/epic/tools/_assets/spell-doc-toolbar.js +396 -227
  133. package/dist/epic/tools/_assets/spell-syntax.entry.js +505 -285
  134. package/dist/epic/tools/_assets/spell-syntax.js +22 -2916
  135. package/dist/epic/tools/_assets/spell-ui-sources.js +102 -60
  136. package/dist/epic/tools/_assets/spell-ui.entry.js +108 -40
  137. package/dist/epic/tools/_assets/spell-ui.js +3131 -46465
  138. package/dist/epic/tools/pages.d.ts +5 -6
  139. package/dist/epic/tools/pages.js +7 -6
  140. package/dist/epic/window.mjs +2 -3
  141. package/dist/parser/core/classes/View.d.ts +20 -0
  142. package/dist/parser/core/classes/View.js +91 -17
  143. package/dist/parser/core/core.declarations.json5 +18 -0
  144. package/dist/parser/core/core.scopes.js +5 -0
  145. package/dist/parser/core/sites.d.ts +10 -0
  146. package/dist/parser/core/sites.js +12 -0
  147. package/dist/parser/parser/tokenizer/Tokenizer.d.ts +9 -1
  148. package/dist/parser/parser/tokenizer/Tokenizer.js +43 -5
  149. package/dist/parser/parser/tokenizer/Tokens.d.ts +4 -0
  150. package/dist/parser/parser/tokenizer/Tokens.js +4 -0
  151. package/dist/parser/parser/tokenizer/tokenizer.types.d.ts +5 -0
  152. package/dist/parser/parser/tokenizer/tokenizer.types.js +2 -0
  153. package/dist/parser/py/core/spell_core/apps.py +2 -0
  154. package/dist/parser/spell/PARSING.md +21 -0
  155. package/dist/parser/spell/SpellParser.d.ts +2 -0
  156. package/dist/parser/spell/SpellParser.js +58 -3
  157. package/dist/parser/spell/SpellxTokenizer.js +2 -1
  158. package/dist/parser/spell/SpellxTwin.d.ts +4 -1
  159. package/dist/parser/spell/SpellxTwin.js +10 -3
  160. package/dist/parser/spell/builtinTypes.js +24 -1
  161. package/dist/parser/spell/ingest/PlaceIngest.js +3 -1
  162. package/dist/parser/spell/languages/Language.d.ts +11 -2
  163. package/dist/parser/spell/languages/en/words.js +3 -2
  164. package/dist/parser/spell/languages/es/words.js +7 -4
  165. package/dist/parser/spell/rules/Statement.js +1 -1
  166. package/dist/parser/spell/rules/classes/DrawSlot.js +6 -1
  167. package/dist/parser/spell/rules/sites/SitePage.d.ts +3 -3
  168. package/dist/parser/spell/rules/sites/SitePage.js +2 -2
  169. package/dist/parser/spell/rules/sites/sites.en.js +1 -1
  170. package/dist/parser/spell/rules/sites/sites.es.js +1 -1
  171. package/dist/parser/spell/rules/sites/sites.shared.d.ts +2 -2
  172. package/dist/parser/spell/spell.types.d.ts +7 -0
  173. package/dist/parser/spell/spellSyntax.es.json +6 -6
  174. package/dist/parser/spell/spellSyntax.json +6 -6
  175. package/dist/parser/spellx/SpellxView.js +2 -1
  176. package/dist/ui/components/ui-accordion/UIAccordion.d.ts +1 -0
  177. package/dist/ui/components/ui-ad/UIAd.d.ts +1 -0
  178. package/dist/ui/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
  179. package/dist/ui/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
  180. package/dist/ui/components/ui-button/UIButton.d.ts +8 -3
  181. package/dist/ui/components/ui-button/UIButton.fallback.d.ts +8 -3
  182. package/dist/ui/components/ui-button/UIButtons.d.ts +1 -0
  183. package/dist/ui/components/ui-button/UIOr.d.ts +1 -0
  184. package/dist/ui/components/ui-calendar/UICalendar.d.ts +6 -0
  185. package/dist/ui/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
  186. package/dist/ui/components/ui-card/UICards.d.ts +31 -0
  187. package/dist/ui/components/ui-checkbox/UICheckbox.d.ts +7 -0
  188. package/dist/ui/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
  189. package/dist/ui/components/ui-comment/UIComment.d.ts +1 -0
  190. package/dist/ui/components/ui-comment/UIComments.d.ts +1 -0
  191. package/dist/ui/components/ui-components/UIComponents.d.ts +1 -0
  192. package/dist/ui/components/ui-dimmer/UIDimmer.d.ts +1 -0
  193. package/dist/ui/components/ui-divider/UIDivider.d.ts +2 -0
  194. package/dist/ui/components/ui-dropdown/UIDropdown.d.ts +6 -0
  195. package/dist/ui/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
  196. package/dist/ui/components/ui-embed/UIEmbed.d.ts +1 -0
  197. package/dist/ui/components/ui-emoji/UIEmoji.d.ts +1 -0
  198. package/dist/ui/components/ui-feed/UIFeed.d.ts +1 -0
  199. package/dist/ui/components/ui-feed/UIFeedEvent.d.ts +1 -0
  200. package/dist/ui/components/ui-flag/UIFlag.d.ts +1 -0
  201. package/dist/ui/components/ui-flyout/UIFlyout.d.ts +1 -0
  202. package/dist/ui/components/ui-form/UIFields.d.ts +1 -0
  203. package/dist/ui/components/ui-form/UIRepeat.d.ts +1 -0
  204. package/dist/ui/components/ui-grid/UIColumn.d.ts +1 -0
  205. package/dist/ui/components/ui-grid/UIGrid.d.ts +1 -0
  206. package/dist/ui/components/ui-grid/UIRow.d.ts +1 -0
  207. package/dist/ui/components/ui-icon/UIIcon.d.ts +3 -2
  208. package/dist/ui/components/ui-icon/UIIcons.d.ts +1 -0
  209. package/dist/ui/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
  210. package/dist/ui/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
  211. package/dist/ui/components/ui-image/UIImages.d.ts +1 -0
  212. package/dist/ui/components/ui-include/UIInclude.d.ts +1 -0
  213. package/dist/ui/components/ui-input/UIInput.fallback.d.ts +9 -2
  214. package/dist/ui/components/ui-items/UIItems.d.ts +1 -0
  215. package/dist/ui/components/ui-keys/UIKeys.d.ts +1 -0
  216. package/dist/ui/components/ui-label/UILabel.d.ts +2 -0
  217. package/dist/ui/components/ui-label/UILabels.d.ts +1 -0
  218. package/dist/ui/components/ui-list/UIList.d.ts +2 -0
  219. package/dist/ui/components/ui-loader/UILoader.d.ts +1 -0
  220. package/dist/ui/components/ui-message/UIMessage.d.ts +2 -0
  221. package/dist/ui/components/ui-modal/UIModal.d.ts +1 -0
  222. package/dist/ui/components/ui-nag/UINag.d.ts +1 -0
  223. package/dist/ui/components/ui-page/UIPage.d.ts +15 -0
  224. package/dist/ui/components/ui-page/UIPage.es.d.ts +1 -0
  225. package/dist/ui/components/ui-parts/UIActions.d.ts +1 -0
  226. package/dist/ui/components/ui-parts/UIAuthor.d.ts +1 -0
  227. package/dist/ui/components/ui-parts/UIAvatar.d.ts +1 -0
  228. package/dist/ui/components/ui-parts/UIContent.d.ts +1 -0
  229. package/dist/ui/components/ui-parts/UIDate.d.ts +1 -0
  230. package/dist/ui/components/ui-parts/UIDescription.d.ts +1 -0
  231. package/dist/ui/components/ui-parts/UIDetail.d.ts +1 -0
  232. package/dist/ui/components/ui-parts/UIExtra.d.ts +1 -0
  233. package/dist/ui/components/ui-parts/UIHeader.d.ts +15 -3
  234. package/dist/ui/components/ui-parts/UIHeader.en.d.ts +5 -2
  235. package/dist/ui/components/ui-parts/UIHeader.en.js +6 -3
  236. package/dist/ui/components/ui-parts/UIHeader.js +45 -5
  237. package/dist/ui/components/ui-parts/UIMeta.d.ts +1 -0
  238. package/dist/ui/components/ui-parts/UIParts.css +18 -0
  239. package/dist/ui/components/ui-parts/UIParts.css.inline.js +1 -1
  240. package/dist/ui/components/ui-parts/UIParts.types.d.ts +15 -1
  241. package/dist/ui/components/ui-parts/UISummary.d.ts +1 -0
  242. package/dist/ui/components/ui-parts/UITitle.d.ts +1 -0
  243. package/dist/ui/components/ui-parts/UIValue.d.ts +1 -0
  244. package/dist/ui/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
  245. package/dist/ui/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
  246. package/dist/ui/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
  247. package/dist/ui/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
  248. package/dist/ui/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
  249. package/dist/ui/components/ui-progress/UIProgress.d.ts +2 -0
  250. package/dist/ui/components/ui-quote/UIQuote.d.ts +1 -0
  251. package/dist/ui/components/ui-rail/UIRail.d.ts +1 -0
  252. package/dist/ui/components/ui-rating/UIRating.d.ts +6 -0
  253. package/dist/ui/components/ui-rating/UIRating.fallback.d.ts +6 -0
  254. package/dist/ui/components/ui-reveal/UIReveal.d.ts +1 -0
  255. package/dist/ui/components/ui-search/UISearch.fallback.d.ts +13 -1
  256. package/dist/ui/components/ui-section/UISections.d.ts +1 -0
  257. package/dist/ui/components/ui-segment/UISegment.d.ts +2 -0
  258. package/dist/ui/components/ui-segment/UISegments.d.ts +1 -0
  259. package/dist/ui/components/ui-select/UISelect.d.ts +6 -0
  260. package/dist/ui/components/ui-select/UISelect.fallback.d.ts +6 -0
  261. package/dist/ui/components/ui-shape/UISide.d.ts +4 -0
  262. package/dist/ui/components/ui-sidebar/UIPushable.d.ts +1 -0
  263. package/dist/ui/components/ui-sidebar/UIPusher.d.ts +1 -0
  264. package/dist/ui/components/ui-sidebar/UISidebar.d.ts +1 -0
  265. package/dist/ui/components/ui-sides/UISides.d.ts +6 -0
  266. package/dist/ui/components/ui-sides/UISides.fallback.d.ts +6 -0
  267. package/dist/ui/components/ui-slider/UISlider.d.ts +7 -0
  268. package/dist/ui/components/ui-slider/UISlider.fallback.d.ts +7 -0
  269. package/dist/ui/components/ui-space/UISpace.d.ts +1 -0
  270. package/dist/ui/components/ui-statistic/UIStatistic.d.ts +1 -0
  271. package/dist/ui/components/ui-statistic/UIStatistics.d.ts +1 -0
  272. package/dist/ui/components/ui-step/UIStep.d.ts +1 -0
  273. package/dist/ui/components/ui-step/UISteps.d.ts +1 -0
  274. package/dist/ui/components/ui-table/UICell.d.ts +1 -0
  275. package/dist/ui/components/ui-terms/UITerm.d.ts +1 -0
  276. package/dist/ui/components/ui-terms/UITerms.d.ts +1 -0
  277. package/dist/ui/components/ui-theme-editor/UIColorChip.d.ts +1 -0
  278. package/dist/ui/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
  279. package/dist/ui/components/ui-toast/UIToast.d.ts +1 -0
  280. package/dist/ui/components/ui-toc/UIToc.d.ts +1 -0
  281. package/dist/ui/components/ui-transition/UITransition.d.ts +1 -0
  282. package/dist/ui/components/ui-video/UIAudio.d.ts +1 -0
  283. package/dist/ui/components/ui-video/UIVideo.d.ts +1 -0
  284. package/dist/ui/components/ui-visibility/UIVisibility.d.ts +1 -0
  285. package/dist/ui/components/ui-zoom/UIZoom.d.ts +1 -0
  286. package/dist/ui/jsx.d.ts +4 -4
  287. package/dist/ui/vocabulary/defaults.generated.js +1 -1
  288. package/dist/util/spell/constants.js +1 -1
  289. package/epic/.claude-plugin/plugin.json +1 -1
  290. package/epic/.codex-plugin/plugin.json +1 -1
  291. package/epic/hooks/handoff.mjs +4 -3
  292. package/epic/hooks/worktree.mjs +22 -3
  293. package/epic/package.json +41 -2
  294. package/epic/skills/details/SKILL.md +2 -1
  295. package/epic/skills/epic/SKILL.md +7 -1
  296. package/epic/skills/epic/guide.md +3 -0
  297. package/epic/skills/isolate/SKILL.md +53 -20
  298. package/epic/src/AGENTS.md +11 -2
  299. package/epic/templates/durable.html +1 -1
  300. package/epic/vscode/package.json +1 -1
  301. package/epic/vscode/spell-epic.vsix +0 -0
  302. package/package.json +1 -1
  303. package/parser/package.json +1 -1
  304. package/ui/package.json +15 -2
@@ -150,6 +150,7 @@ export declare class Requests {
150
150
  * - moved aside into `ditched` (`StrayFiles.folderFor()`), never deleted, and only once every check passed
151
151
  * - branch `<epic>` holds all of `main`: else `main` moved, and the branch merges it first
152
152
  * (`epic worktree merge-main`, in its worktree)
153
+ * - Refused in one line where `main` takes only pull requests (`baseBranchProtected`).
153
154
  * - Returns the commits it brought onto `main`, oldest first (`[]`: nothing to merge), and what it moved aside.
154
155
  * - throws an `EpicCommandError` saying what to do, for any check that fails: then nothing moved, nothing merged
155
156
  * - static: about the repo `cwd` is in, not the epics folder
@@ -11,6 +11,7 @@ import { SRV } from "spell/server";
11
11
  import { Git } from "spell/server/Git";
12
12
  import { PageServer } from "spell/server/page";
13
13
  import { CLI } from "spell/cli";
14
+ import { CodeHost } from "../config/CodeHost.js";
14
15
  import { EpicConfig } from "../config/EpicConfig.js";
15
16
  import { Transcript } from "../config/Transcript.js";
16
17
  import { DataFile } from "../data/DataFile.js";
@@ -381,6 +382,7 @@ var Requests = class _Requests {
381
382
  * - moved aside into `ditched` (`StrayFiles.folderFor()`), never deleted, and only once every check passed
382
383
  * - branch `<epic>` holds all of `main`: else `main` moved, and the branch merges it first
383
384
  * (`epic worktree merge-main`, in its worktree)
385
+ * - Refused in one line where `main` takes only pull requests (`baseBranchProtected`).
384
386
  * - Returns the commits it brought onto `main`, oldest first (`[]`: nothing to merge), and what it moved aside.
385
387
  * - throws an `EpicCommandError` saying what to do, for any check that fails: then nothing moved, nothing merged
386
388
  * - static: about the repo `cwd` is in, not the epics folder
@@ -402,7 +404,11 @@ ${merged.err}`);
402
404
  * - throws an `EpicCommandError` naming the checkout (`label`) for a check that fails
403
405
  */
404
406
  static mergeCheck(epic, main, { ditch, label }) {
405
- const base = new EpicConfig(main).baseBranch;
407
+ const { baseBranch: base, baseBranchProtected } = new EpicConfig(main);
408
+ if (baseBranchProtected)
409
+ throw new EpicCommandError(
410
+ `merge: ${base} takes only ${CodeHost.of(new EpicConfig(main)).words.pullRequest}s here (baseBranchProtected): epic pr ${epic} pushes it and opens one; nothing merged`
411
+ );
406
412
  const branch = Git.run(["branch", "--show-current"], main).out;
407
413
  if (branch !== base) throw new EpicCommandError(`merge: ${label} is on '${branch}', not ${base}`);
408
414
  const stray = new StrayFiles(main);
@@ -15,6 +15,7 @@ import {
15
15
  } from "node:fs";
16
16
  import { basename, dirname, join } from "node:path";
17
17
  import { ClaudeHome } from "../config/ClaudeHome.js";
18
+ import { EngineFiles } from "../config/EngineFiles.mjs";
18
19
  import { EpicHome } from "../config/EpicHome.js";
19
20
  var SessionMoves = class _SessionMoves {
20
21
  static {
@@ -195,7 +196,7 @@ ${missed.message}` : missed.message, "joined");
195
196
  };
196
197
  }
197
198
  };
198
- var ENGINE = dirname(dirname(import.meta.dirname));
199
+ var ENGINE = EngineFiles.root;
199
200
  var PLUGIN = "epic";
200
201
  var MARKETPLACE = "spell";
201
202
  var SESSION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -3,8 +3,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
 
4
4
  // src/command/SkillsCheck.ts
5
5
  import { existsSync, readdirSync, readFileSync } from "node:fs";
6
- import { dirname, join } from "node:path";
6
+ import { join } from "node:path";
7
7
  import { CLI } from "spell/cli";
8
+ import { EngineFiles } from "../config/EngineFiles.mjs";
8
9
  import { EXIT, EpicCommandError, parseVerbArgs } from "./command.types.js";
9
10
  var SkillsCheck = class _SkillsCheck {
10
11
  static {
@@ -133,7 +134,7 @@ var NO_IMPLICIT = /^\s*allow_implicit_invocation:\s*false\b/m;
133
134
  var CLAUDE_PLUGIN_ROOT = "${CLAUDE_PLUGIN_ROOT}";
134
135
  var ROOT_COMMAND = "epic guide --root";
135
136
  var FRONT_MATTER = /^---\n([\s\S]*?)\n---\n([\s\S]*)$/;
136
- var SKILLS_FOLDER = join(dirname(dirname(import.meta.dirname)), "skills");
137
+ var SKILLS_FOLDER = EngineFiles.path("skills");
137
138
  export {
138
139
  CLAUDE_ONLY_TOOLS,
139
140
  DESCRIPTION_LIMIT,
@@ -128,7 +128,9 @@ var Stock = class _Stock {
128
128
  morning: morningNote(worktree, name),
129
129
  sessions: here
130
130
  };
131
- return this.classifyCheckout(item);
131
+ const classified = this.classifyCheckout(item);
132
+ if (config.baseBranchProtected) classified.actions = classified.actions?.filter(({ id }) => id !== "merge");
133
+ return classified;
132
134
  }
133
135
  /** Set `group`, `why` and `actions` on a worktree / branch item. */
134
136
  classifyCheckout(item) {
@@ -44,7 +44,7 @@ export declare class TurnEnd {
44
44
  * - its output appended to `<epic repo>/.git/spell-shared.log`; a failed commit never shows as a failed hook,
45
45
  * and the next turn's picks up anything left
46
46
  * - only in a repo set up for epics whose epic repo exists (`contentRepoOf()`): the hooks run in every repo
47
- * - `epic`: this plugin's own `bin/epic`, with its packages installed
47
+ * - `epic`: this copy's `epic` command, with its packages installed (`EngineFiles.bin`)
48
48
  * - returns the command it started, else `undefined`
49
49
  * - NEVER throws
50
50
  */
@@ -4,7 +4,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
4
4
  // src/command/TurnEnd.ts
5
5
  import { spawn } from "node:child_process";
6
6
  import { existsSync, openSync } from "node:fs";
7
- import { dirname, join } from "node:path";
7
+ import { join } from "node:path";
8
+ import { EngineFiles } from "../config/EngineFiles.mjs";
8
9
  import { EpicConfig } from "../config/EpicConfig.js";
9
10
  import { EXIT, EpicCommandError, parseVerbArgs, stringFlag } from "./command.types.js";
10
11
  var TurnEnd = class _TurnEnd {
@@ -62,7 +63,7 @@ var TurnEnd = class _TurnEnd {
62
63
  * - its output appended to `<epic repo>/.git/spell-shared.log`; a failed commit never shows as a failed hook,
63
64
  * and the next turn's picks up anything left
64
65
  * - only in a repo set up for epics whose epic repo exists (`contentRepoOf()`): the hooks run in every repo
65
- * - `epic`: this plugin's own `bin/epic`, with its packages installed
66
+ * - `epic`: this copy's `epic` command, with its packages installed (`EngineFiles.bin`)
66
67
  * - returns the command it started, else `undefined`
67
68
  * - NEVER throws
68
69
  */
@@ -79,7 +80,7 @@ var TurnEnd = class _TurnEnd {
79
80
  }
80
81
  }
81
82
  };
82
- var EPIC = join(dirname(dirname(import.meta.dirname)), "bin", "epic");
83
+ var EPIC = EngineFiles.bin;
83
84
  export {
84
85
  TurnEnd
85
86
  };
@@ -1,4 +1,5 @@
1
1
  import { EpicConfig } from "spell/epic/config/EpicConfig";
2
+ import { type CodeHostClient } from "spell/epic/config/CodeHost";
2
3
  import { type CheckoutPlace, type IdleWorktree, type LiveSession, type MoveReport, type NameStatus, type PlanFacts, type PlanSummary, type RepoState, type RunningSession } from "./command.types";
3
4
  import { Sessions } from "./Sessions";
4
5
  /****************
@@ -24,7 +25,8 @@ import { Sessions } from "./Sessions";
24
25
  * - for a person or a tool: the skills enter a worktree by its NAME, never this path (Claude Code asks before
25
26
  * entering a path outside `.claude/worktrees/`; epic `epic-engine` P16)
26
27
  * - `remove <name | path> [--force] [--branches]`: remove a worktree, its servers stopped FIRST (`remove()`, epic
27
- * `epic-engine` I53); `--branches`: and its branch in each repo, when merged (`git branch -d`)
28
+ * `epic-engine` I53); `--branches`: and its branch in each repo, when merged (`git branch -d`; a merged pull
29
+ * request counts, where the base branch takes only those)
28
30
  * - `repos [<name>] [--json]`: each repo's checkout in epic `<name>`'s worktree (default: the one this runs in),
29
31
  * with its branch, what's uncommitted, and how far it is ahead of and behind its base branch (`repoStates()`)
30
32
  * - `merge-main [--continue] [--json]`: merge `main` into this checkout's branch (`MainMerge`)
@@ -89,7 +91,8 @@ export declare class Worktrees {
89
91
  * 1. its servers stopped (`CheckoutServers.stop()`)
90
92
  * 2. `git worktree remove [--force]`: git refuses a worktree with changes, unless `force`
91
93
  * 3. its saved-session link taken away, if it's one to main's (`SessionFolders.unlink()`), as the worktree hook does
92
- * - NOT its branch: the caller deletes it (`git branch -d`), as it would after `git worktree remove`
94
+ * - NOT its branch, unless `branches`: the caller deletes it (`git branch -d`), as it would after
95
+ * `git worktree remove`
93
96
  * - refuses (`EpicCommandError`) the main checkout, a folder that isn't one of the repo's worktrees, and git's refusal
94
97
  * - what `/isolate done` (`/epic done`) and `/worktrees`' clean-up (`Stock`) run; the `WorktreeRemove` hook stops
95
98
  * the servers itself
@@ -118,8 +121,22 @@ export declare class Worktrees {
118
121
  force?: boolean | undefined;
119
122
  sessions?: string | undefined;
120
123
  }): string[];
121
- /** `git branch -d <branch>` in `main`: a line saying what happened; an unmerged branch stays, never `-D`. */
124
+ /**
125
+ * Delete `branch` in `main`, when merged: a line saying what happened; unmerged work always stays.
126
+ * - `git branch -d`, never a blind `-D`
127
+ * - a base branch that takes only pull requests: `mergedThroughPullRequest()` decides, then `-D`
128
+ * - why: `-d` refuses a squash-merged branch, and passes one that's merely pushed (it checks the upstream)
129
+ */
122
130
  static deleteBranch(main: string, branch: string): string;
131
+ /**
132
+ * Why `branch` counts as merged into `base`, in a repo whose base takes only pull requests; `undefined` if it doesn't:
133
+ * - all its commits in `base`, local or `origin`'s
134
+ * - or a pull or merge request `host` reports merged whose last commit holds the branch's tip:
135
+ * so a commit made since the merge keeps the branch
136
+ * - runs its command (`gh`, `glab`) only when git alone can't say; missing or offline: `undefined`, and the branch
137
+ * stays
138
+ */
139
+ static mergedThroughPullRequest(main: string, branch: string, base: string, host: CodeHostClient): string | undefined;
123
140
  /** `move --idle`: move every worktree in the old place that no session works in; a report each. */
124
141
  moveIdle({ dryRun }?: {
125
142
  dryRun?: boolean;
@@ -9,9 +9,11 @@ import { checkoutOf } from "spell/server/checkout";
9
9
  import { Git } from "spell/server/Git";
10
10
  import { RealPath } from "spell/server/RealPath";
11
11
  import { CLI } from "spell/cli";
12
+ import { EngineFiles } from "../config/EngineFiles.mjs";
12
13
  import { EpicConfig } from "../config/EpicConfig.js";
13
14
  import { EpicHome } from "../config/EpicHome.js";
14
15
  import { EpicRepo } from "../config/EpicRepo.js";
16
+ import { CodeHost } from "../config/CodeHost.js";
15
17
  import { SessionFolders } from "../config/SessionFolders.js";
16
18
  import { URGENT_STATES } from "../list/EpicState.js";
17
19
  import { PhaseStatuses } from "../phases/index.js";
@@ -206,7 +208,8 @@ var Worktrees = class _Worktrees {
206
208
  * 1. its servers stopped (`CheckoutServers.stop()`)
207
209
  * 2. `git worktree remove [--force]`: git refuses a worktree with changes, unless `force`
208
210
  * 3. its saved-session link taken away, if it's one to main's (`SessionFolders.unlink()`), as the worktree hook does
209
- * - NOT its branch: the caller deletes it (`git branch -d`), as it would after `git worktree remove`
211
+ * - NOT its branch, unless `branches`: the caller deletes it (`git branch -d`), as it would after
212
+ * `git worktree remove`
210
213
  * - refuses (`EpicCommandError`) the main checkout, a folder that isn't one of the repo's worktrees, and git's refusal
211
214
  * - what `/isolate done` (`/epic done`) and `/worktrees`' clean-up (`Stock`) run; the `WorktreeRemove` hook stops
212
215
  * the servers itself
@@ -280,11 +283,38 @@ var Worktrees = class _Worktrees {
280
283
  if (SessionFolders.unlink(path, sessions).action === "removed") lines.push(" and its session-folder link");
281
284
  return lines;
282
285
  }
283
- /** `git branch -d <branch>` in `main`: a line saying what happened; an unmerged branch stays, never `-D`. */
286
+ /**
287
+ * Delete `branch` in `main`, when merged: a line saying what happened; unmerged work always stays.
288
+ * - `git branch -d`, never a blind `-D`
289
+ * - a base branch that takes only pull requests: `mergedThroughPullRequest()` decides, then `-D`
290
+ * - why: `-d` refuses a squash-merged branch, and passes one that's merely pushed (it checks the upstream)
291
+ */
284
292
  static deleteBranch(main, branch) {
293
+ const config = new EpicConfig(main);
294
+ if (config.baseBranchProtected) {
295
+ const why = _Worktrees.mergedThroughPullRequest(main, branch, config.baseBranch, CodeHost.of(config));
296
+ if (!why)
297
+ return `kept branch ${branch}: not in ${config.baseBranch}, and no merged ${CodeHost.of(config).words.pullRequest} has its last commit`;
298
+ const forced = Git.run(["branch", "-D", branch], main);
299
+ return forced.ok ? `deleted branch ${branch} (${why})` : `kept branch ${branch}: ${forced.err.split("\n")[0]}`;
300
+ }
285
301
  const deleted = Git.run(["branch", "-d", branch], main);
286
302
  return deleted.ok ? `deleted branch ${branch}` : `kept branch ${branch}: ${deleted.err.split("\n")[0]}`;
287
303
  }
304
+ /**
305
+ * Why `branch` counts as merged into `base`, in a repo whose base takes only pull requests; `undefined` if it doesn't:
306
+ * - all its commits in `base`, local or `origin`'s
307
+ * - or a pull or merge request `host` reports merged whose last commit holds the branch's tip:
308
+ * so a commit made since the merge keeps the branch
309
+ * - runs its command (`gh`, `glab`) only when git alone can't say; missing or offline: `undefined`, and the branch
310
+ * stays
311
+ */
312
+ static mergedThroughPullRequest(main, branch, base, host) {
313
+ const within = /* @__PURE__ */ __name((into) => Git.run(["merge-base", "--is-ancestor", branch, into], main).ok, "within");
314
+ if (within(base) || within(`refs/remotes/origin/${base}`)) return `in ${base}`;
315
+ const merged = host.mergedPullRequests(branch, base, main).find((pull) => within(pull.head));
316
+ return merged && `${host.words.pullRequest} ${host.words.number(merged.number)} merged`;
317
+ }
288
318
  /** `move --idle`: move every worktree in the old place that no session works in; a report each. */
289
319
  moveIdle({ dryRun = false } = {}) {
290
320
  const old = this.config.worktreesFolders[1];
@@ -600,12 +630,14 @@ function repoLines(states) {
600
630
  __name(repoLines, "repoLines");
601
631
  function mergeMainLines(report) {
602
632
  const lines = mergeResultLines(report);
603
- const { ditched, ditchedTo } = report;
604
- if (!ditched?.length) return lines;
633
+ const { ditched = [], ditchedTo, baseCatchUp } = report;
605
634
  return [
635
+ ...baseCatchUp ? [baseCatchUp] : [],
606
636
  lines[0],
607
- ` moved ${ditched.length} generated file(s) aside, into ${ditchedTo}:`,
608
- ...ditched.map((file) => ` ${file}`),
637
+ ...ditched.length ? [
638
+ ` moved ${ditched.length} generated file(s) aside, into ${ditchedTo}:`,
639
+ ...ditched.map((file) => ` ${file}`)
640
+ ] : [],
609
641
  ...lines.slice(1)
610
642
  ];
611
643
  }
@@ -645,7 +677,7 @@ function mergeResultLines(report) {
645
677
  ];
646
678
  }
647
679
  __name(mergeResultLines, "mergeResultLines");
648
- var WORKTREE_HOOK = join(dirname(dirname(import.meta.dirname)), "hooks", "worktree.mjs");
680
+ var WORKTREE_HOOK = EngineFiles.path("hooks/worktree.mjs");
649
681
  export {
650
682
  Worktrees
651
683
  };
@@ -463,6 +463,8 @@ export type PatchReport = {
463
463
  * - `regenerated`: each generator that ran, and the files it staged
464
464
  * - `review`: snapshot entries to show Owen (`SnapshotReview`)
465
465
  * - `unstaged`: files a generator changed outside its `outputs`, left for a person to look at
466
+ * - `baseCatchUp`: what happened bringing the local base branch up to date first (`BaseBranch`), for a repo whose base
467
+ * branch takes only pull requests; left out with nothing to say
466
468
  */
467
469
  /**
468
470
  * What `epic merge` did in one repo (`Requests.merge()`, `mergeEach()`).
@@ -499,6 +501,7 @@ export type MergeMainReport = {
499
501
  }[];
500
502
  review: SnapshotReview[];
501
503
  unstaged: string[];
504
+ baseCatchUp?: string;
502
505
  /** a multi-repo top's epic worktree (`MainMerge.runAll()`): the repo's folder name; left out for a single repo */
503
506
  repo?: string;
504
507
  /** a multi-repo top's: why this repo's merge couldn't start or go on (the others went on) */
@@ -9,49 +9,49 @@ SpellUI.registerPack({
9
9
  prefix: "epic-",
10
10
  catalog: CATALOG,
11
11
  families: {
12
- "epic-actions": "77213e8cd7a1f207",
13
- "epic-agents": "6c2f7ec0eca7ceb7",
14
- "epic-answer": "2e114ef047270ef5",
15
- "epic-aside": "8baf0643fc2eef6f",
16
- "epic-ask": "807582a3fcad6549",
17
- "epic-away-line": "4164b8923e06f327",
18
- "epic-cards": "71be062dd8e19825",
19
- "epic-change": "4fc821718cea0860",
20
- "epic-choice-rows": "fdbff9c73694dd66",
21
- "epic-choices": "1c8d60ce1ea30360",
22
- "epic-choices-bar": "8df26e88d0d159b2",
23
- "epic-code": "8375eb5195441d9d",
24
- "epic-comment-pane": "344d8af2415c391d",
25
- "epic-commit": "07a16ba1abb0d9a0",
26
- "epic-event": "c5a3ce3722289214",
27
- "epic-focus": "697382618fe0fe75",
28
- "epic-item": "e571c14a0ac43f13",
29
- "epic-link": "cf47f238699a81f0",
30
- "epic-list": "a6aaa263c0d568c4",
31
- "epic-mark": "8a046101c4650ee0",
32
- "epic-net-effect": "fe9220a2678318c0",
33
- "epic-new-item": "1b86b6c323ea2982",
34
- "epic-note": "13fba6d852a8abec",
35
- "epic-option-form": "4db681ff381c7abf",
36
- "epic-original": "f5dd264f9d7cc5bd",
37
- "epic-overview": "5880e57f3a5913e6",
38
- "epic-page": "57f4f5b9bdd9451b",
39
- "epic-page-note-head": "58570376817bc803",
40
- "epic-phase": "7e66a13c5db07808",
41
- "epic-prompt": "6f74562d3b4e4a70",
42
- "epic-question": "952a6d26d089d597",
43
- "epic-review": "f1b31cb48f2664d7",
44
- "epic-run": "336960f9c8020d3e",
45
- "epic-run-row": "9bb9c3d43e8d49a2",
46
- "epic-section": "35963512ec51cf6d",
47
- "epic-send": "1e5de840f34d69b7",
48
- "epic-send-buttons": "31ed96dae7dbb0e1",
49
- "epic-state-filter": "c535013018e12119",
50
- "epic-status": "617d5ae486e4a7d9",
51
- "epic-summary": "c8f831b43e1d1612",
52
- "epic-text-box": "ed993c822804b2d6",
53
- "epic-thread": "bbe79f0a3c771e94",
54
- "epic-update": "162d21c50addce16"
12
+ "epic-actions": "17aa66d8b3a210e7",
13
+ "epic-agents": "3a3ba27149b92463",
14
+ "epic-answer": "8ac659d77913cfd7",
15
+ "epic-aside": "b5070a134646e8e1",
16
+ "epic-ask": "dcd18de68190958f",
17
+ "epic-away-line": "2b5823350572fc0c",
18
+ "epic-cards": "3e52412150e30a81",
19
+ "epic-change": "838fc22361d06b86",
20
+ "epic-choice-rows": "6ed09c3337d078ad",
21
+ "epic-choices": "60d0dd099a80c39f",
22
+ "epic-choices-bar": "a80e1e80d1a1b12f",
23
+ "epic-code": "135384b5f935787e",
24
+ "epic-comment-pane": "ee3a3b7361a34247",
25
+ "epic-commit": "bb98ee1fc92150e7",
26
+ "epic-event": "d23ace4b0f65f013",
27
+ "epic-focus": "df3a32ff0937c3be",
28
+ "epic-item": "6edfd1f080100b03",
29
+ "epic-link": "4411636175eab8b3",
30
+ "epic-list": "2a88c9c7a7530234",
31
+ "epic-mark": "1c68974bcf67a7a2",
32
+ "epic-net-effect": "c74464566bd1b9d7",
33
+ "epic-new-item": "d850118a7c384b0c",
34
+ "epic-note": "7d532f03f12a7cd6",
35
+ "epic-option-form": "fc8a7ae1a031185b",
36
+ "epic-original": "a3223280be213ca3",
37
+ "epic-overview": "0a7110ff60ab3b12",
38
+ "epic-page": "8e66e6573f6b6351",
39
+ "epic-page-note-head": "f63ca79ef536f75c",
40
+ "epic-phase": "b78befbf3ffc607d",
41
+ "epic-prompt": "cc5d17cc40934665",
42
+ "epic-question": "3d08f22e6228bbd1",
43
+ "epic-review": "6c7ac8f70e526440",
44
+ "epic-run": "479821dd298893c7",
45
+ "epic-run-row": "f04c3de29a033536",
46
+ "epic-section": "bbd63420149c34e7",
47
+ "epic-send": "377fd631f92885bd",
48
+ "epic-send-buttons": "fa8c4ec06235e342",
49
+ "epic-state-filter": "7fc55acc2403b294",
50
+ "epic-status": "eee7c84130c6724c",
51
+ "epic-summary": "36ed93316dbefde5",
52
+ "epic-text-box": "f400b02a60281d25",
53
+ "epic-thread": "70721c8b129a4df8",
54
+ "epic-update": "343c6042686bf109"
55
55
  },
56
56
  define: /* @__PURE__ */ __name(() => Promise.all([
57
57
  import("../epic-actions/index.js"),