spell 0.8.8 → 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 (92) hide show
  1. package/README-epics.md +60 -20
  2. package/app/package.json +1 -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/epic/cli/EpicProgram.js +15 -6
  12. package/dist/epic/cli/epicGroups.js +5 -0
  13. package/dist/epic/command/BaseBranch.js +1 -1
  14. package/dist/epic/command/PullRequest.d.ts +45 -0
  15. package/dist/epic/command/PullRequest.js +100 -0
  16. package/dist/epic/command/RepoInit.d.ts +96 -47
  17. package/dist/epic/command/RepoInit.js +222 -96
  18. package/dist/epic/command/Requests.js +2 -1
  19. package/dist/epic/command/Worktrees.d.ts +5 -3
  20. package/dist/epic/command/Worktrees.js +9 -8
  21. package/dist/epic/components/__pack/epics.entry.js +43 -43
  22. package/dist/epic/components/__pack/epics.pack.js +2 -2
  23. package/dist/epic/config/CodeHost.d.ts +96 -0
  24. package/dist/epic/config/CodeHost.js +89 -0
  25. package/dist/epic/config/EpicConfig.d.ts +9 -2
  26. package/dist/epic/config/EpicConfig.js +16 -0
  27. package/dist/epic/config/EpicRepo.js +1 -1
  28. package/dist/epic/config/GitHub.d.ts +34 -2
  29. package/dist/epic/config/GitHub.js +36 -7
  30. package/dist/epic/config/GitLab.d.ts +138 -0
  31. package/dist/epic/config/GitLab.js +297 -0
  32. package/dist/epic/tool/PlanCommits.d.ts +7 -4
  33. package/dist/epic/tool/PlanCommits.js +7 -5
  34. package/dist/epic/tool/PlanDocCommands.js +3 -4
  35. package/dist/epic/tool/PlanDocFiles.d.ts +3 -1
  36. package/dist/epic/tool/PlanDocFiles.js +10 -3
  37. package/dist/parser/core/classes/View.d.ts +20 -0
  38. package/dist/parser/core/classes/View.js +91 -17
  39. package/dist/parser/core/core.declarations.json5 +18 -0
  40. package/dist/parser/core/core.scopes.js +5 -0
  41. package/dist/parser/core/sites.d.ts +10 -0
  42. package/dist/parser/core/sites.js +12 -0
  43. package/dist/parser/parser/tokenizer/Tokenizer.d.ts +9 -1
  44. package/dist/parser/parser/tokenizer/Tokenizer.js +43 -5
  45. package/dist/parser/parser/tokenizer/Tokens.d.ts +4 -0
  46. package/dist/parser/parser/tokenizer/Tokens.js +4 -0
  47. package/dist/parser/parser/tokenizer/tokenizer.types.d.ts +5 -0
  48. package/dist/parser/parser/tokenizer/tokenizer.types.js +2 -0
  49. package/dist/parser/py/core/spell_core/apps.py +2 -0
  50. package/dist/parser/spell/PARSING.md +21 -0
  51. package/dist/parser/spell/SpellParser.d.ts +2 -0
  52. package/dist/parser/spell/SpellParser.js +58 -3
  53. package/dist/parser/spell/SpellxTokenizer.js +2 -1
  54. package/dist/parser/spell/SpellxTwin.d.ts +4 -1
  55. package/dist/parser/spell/SpellxTwin.js +10 -3
  56. package/dist/parser/spell/builtinTypes.js +24 -1
  57. package/dist/parser/spell/ingest/PlaceIngest.js +3 -1
  58. package/dist/parser/spell/languages/Language.d.ts +11 -2
  59. package/dist/parser/spell/languages/en/words.js +3 -2
  60. package/dist/parser/spell/languages/es/words.js +7 -4
  61. package/dist/parser/spell/rules/Statement.js +1 -1
  62. package/dist/parser/spell/rules/classes/DrawSlot.js +6 -1
  63. package/dist/parser/spell/rules/sites/SitePage.d.ts +3 -3
  64. package/dist/parser/spell/rules/sites/SitePage.js +2 -2
  65. package/dist/parser/spell/rules/sites/sites.en.js +1 -1
  66. package/dist/parser/spell/rules/sites/sites.es.js +1 -1
  67. package/dist/parser/spell/rules/sites/sites.shared.d.ts +2 -2
  68. package/dist/parser/spell/spell.types.d.ts +7 -0
  69. package/dist/parser/spell/spellSyntax.es.json +6 -6
  70. package/dist/parser/spell/spellSyntax.json +6 -6
  71. package/dist/parser/spellx/SpellxView.js +2 -1
  72. package/dist/ui/components/ui-parts/UIHeader.d.ts +12 -2
  73. package/dist/ui/components/ui-parts/UIHeader.en.d.ts +5 -2
  74. package/dist/ui/components/ui-parts/UIHeader.en.js +6 -3
  75. package/dist/ui/components/ui-parts/UIHeader.js +45 -5
  76. package/dist/ui/components/ui-parts/UIParts.css +18 -0
  77. package/dist/ui/components/ui-parts/UIParts.css.inline.js +1 -1
  78. package/dist/ui/jsx.d.ts +4 -4
  79. package/dist/ui/vocabulary/defaults.generated.js +1 -1
  80. package/dist/util/spell/constants.js +1 -1
  81. package/epic/.claude-plugin/plugin.json +1 -1
  82. package/epic/.codex-plugin/plugin.json +1 -1
  83. package/epic/package.json +1 -1
  84. package/epic/skills/epic/SKILL.md +2 -2
  85. package/epic/skills/epic/guide.md +2 -3
  86. package/epic/skills/isolate/SKILL.md +25 -27
  87. package/epic/src/AGENTS.md +5 -0
  88. package/epic/vscode/package.json +1 -1
  89. package/epic/vscode/spell-epic.vsix +0 -0
  90. package/package.json +1 -1
  91. package/parser/package.json +1 -1
  92. package/ui/package.json +1 -1
@@ -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";
@@ -406,7 +407,7 @@ ${merged.err}`);
406
407
  const { baseBranch: base, baseBranchProtected } = new EpicConfig(main);
407
408
  if (baseBranchProtected)
408
409
  throw new EpicCommandError(
409
- `merge: ${base} takes only pull requests here (baseBranchProtected): push ${epic} and open one; nothing merged`
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`
410
411
  );
411
412
  const branch = Git.run(["branch", "--show-current"], main).out;
412
413
  if (branch !== base) throw new EpicCommandError(`merge: ${label} is on '${branch}', not ${base}`);
@@ -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
  /****************
@@ -130,11 +131,12 @@ export declare class Worktrees {
130
131
  /**
131
132
  * Why `branch` counts as merged into `base`, in a repo whose base takes only pull requests; `undefined` if it doesn't:
132
133
  * - all its commits in `base`, local or `origin`'s
133
- * - or a pull request GitHub reports merged whose last commit holds the branch's tip:
134
+ * - or a pull or merge request `host` reports merged whose last commit holds the branch's tip:
134
135
  * so a commit made since the merge keeps the branch
135
- * - runs `gh` only when git alone can't say; `gh` missing or offline: `undefined`, and the branch stays
136
+ * - runs its command (`gh`, `glab`) only when git alone can't say; missing or offline: `undefined`, and the branch
137
+ * stays
136
138
  */
137
- static mergedThroughPullRequest(main: string, branch: string, base: string): string | undefined;
139
+ static mergedThroughPullRequest(main: string, branch: string, base: string, host: CodeHostClient): string | undefined;
138
140
  /** `move --idle`: move every worktree in the old place that no session works in; a report each. */
139
141
  moveIdle({ dryRun }?: {
140
142
  dryRun?: boolean;
@@ -13,7 +13,7 @@ import { EngineFiles } from "../config/EngineFiles.mjs";
13
13
  import { EpicConfig } from "../config/EpicConfig.js";
14
14
  import { EpicHome } from "../config/EpicHome.js";
15
15
  import { EpicRepo } from "../config/EpicRepo.js";
16
- import { GitHub } from "../config/GitHub.js";
16
+ import { CodeHost } from "../config/CodeHost.js";
17
17
  import { SessionFolders } from "../config/SessionFolders.js";
18
18
  import { URGENT_STATES } from "../list/EpicState.js";
19
19
  import { PhaseStatuses } from "../phases/index.js";
@@ -292,9 +292,9 @@ var Worktrees = class _Worktrees {
292
292
  static deleteBranch(main, branch) {
293
293
  const config = new EpicConfig(main);
294
294
  if (config.baseBranchProtected) {
295
- const why = _Worktrees.mergedThroughPullRequest(main, branch, config.baseBranch);
295
+ const why = _Worktrees.mergedThroughPullRequest(main, branch, config.baseBranch, CodeHost.of(config));
296
296
  if (!why)
297
- return `kept branch ${branch}: not in ${config.baseBranch}, and no merged pull request has its last commit`;
297
+ return `kept branch ${branch}: not in ${config.baseBranch}, and no merged ${CodeHost.of(config).words.pullRequest} has its last commit`;
298
298
  const forced = Git.run(["branch", "-D", branch], main);
299
299
  return forced.ok ? `deleted branch ${branch} (${why})` : `kept branch ${branch}: ${forced.err.split("\n")[0]}`;
300
300
  }
@@ -304,15 +304,16 @@ var Worktrees = class _Worktrees {
304
304
  /**
305
305
  * Why `branch` counts as merged into `base`, in a repo whose base takes only pull requests; `undefined` if it doesn't:
306
306
  * - all its commits in `base`, local or `origin`'s
307
- * - or a pull request GitHub reports merged whose last commit holds the branch's tip:
307
+ * - or a pull or merge request `host` reports merged whose last commit holds the branch's tip:
308
308
  * so a commit made since the merge keeps the branch
309
- * - runs `gh` only when git alone can't say; `gh` missing or offline: `undefined`, and the branch stays
309
+ * - runs its command (`gh`, `glab`) only when git alone can't say; missing or offline: `undefined`, and the branch
310
+ * stays
310
311
  */
311
- static mergedThroughPullRequest(main, branch, base) {
312
+ static mergedThroughPullRequest(main, branch, base, host) {
312
313
  const within = /* @__PURE__ */ __name((into) => Git.run(["merge-base", "--is-ancestor", branch, into], main).ok, "within");
313
314
  if (within(base) || within(`refs/remotes/origin/${base}`)) return `in ${base}`;
314
- const merged = GitHub.mergedPullRequests(branch, base, main).find((pull) => within(pull.head));
315
- return merged && `pull request #${merged.number} merged`;
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`;
316
317
  }
317
318
  /** `move --idle`: move every worktree in the old place that no session works in; a report each. */
318
319
  moveIdle({ dryRun = false } = {}) {
@@ -9,49 +9,49 @@ SpellUI.registerPack({
9
9
  prefix: "epic-",
10
10
  catalog: CATALOG,
11
11
  families: {
12
- "epic-actions": "ef64e747ea8672b0",
13
- "epic-agents": "4ffd4c4044893929",
14
- "epic-answer": "c054a2592dd45d9c",
15
- "epic-aside": "156ff751a73b5457",
16
- "epic-ask": "529c7870bac46880",
17
- "epic-away-line": "cfa6b823a1ad335f",
18
- "epic-cards": "124995ea104e52b1",
19
- "epic-change": "1d7445274c7f36e8",
20
- "epic-choice-rows": "4a8c606ad3bc1b82",
21
- "epic-choices": "bfc1ae2cdfb301a4",
22
- "epic-choices-bar": "be403caca00a9d61",
23
- "epic-code": "3281a9716863157f",
24
- "epic-comment-pane": "3193c792ae7fb89f",
25
- "epic-commit": "8e2a903aad4693aa",
26
- "epic-event": "6a17caf5ef5539ee",
27
- "epic-focus": "e5b28a3ea962ea78",
28
- "epic-item": "b1f7cf6de0f9cd75",
29
- "epic-link": "1f840d15565a2454",
30
- "epic-list": "ecc05b9e22c6a941",
31
- "epic-mark": "ca998df684180216",
32
- "epic-net-effect": "f5ef44203c51991d",
33
- "epic-new-item": "fc35809a2052d019",
34
- "epic-note": "bd770b93c2fb577f",
35
- "epic-option-form": "9e853b176df80597",
36
- "epic-original": "4664fe7092fbcbb9",
37
- "epic-overview": "8485ad7194ff71f2",
38
- "epic-page": "9411eadf91cf74f4",
39
- "epic-page-note-head": "fc7ada2db299401b",
40
- "epic-phase": "9408533a1dc3d9f0",
41
- "epic-prompt": "306c24a6a03ab0a9",
42
- "epic-question": "2c5edad5f813b7d8",
43
- "epic-review": "daec103517caa1ce",
44
- "epic-run": "182c07fc553b119e",
45
- "epic-run-row": "18bd6292c0d1f894",
46
- "epic-section": "971db483216c54f8",
47
- "epic-send": "392137c9bfd6ab75",
48
- "epic-send-buttons": "33166dd017177ab7",
49
- "epic-state-filter": "684e4e4dcd8858fd",
50
- "epic-status": "04800116c353eb5a",
51
- "epic-summary": "a4dd22a5b99a5e4f",
52
- "epic-text-box": "9cf523f20790a744",
53
- "epic-thread": "78a603414c4d21b4",
54
- "epic-update": "72d34a933e83210e"
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"),