hammoc 1.5.0 → 1.6.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 (197) hide show
  1. package/README.md +8 -2
  2. package/package.json +2 -2
  3. package/packages/client/dist/assets/{agentExampleHighlight-BgwTm15v.js → agentExampleHighlight-ltj9ce0U.js} +1 -1
  4. package/packages/client/dist/assets/{commandTokenHighlight-BljHwnrK.js → commandTokenHighlight-ji_ViMb4.js} +1 -1
  5. package/packages/client/dist/assets/{index-D3LxqW3f.js → index-B-DiRGuz.js} +1 -1
  6. package/packages/client/dist/assets/index-B09doO8H.js +139 -0
  7. package/packages/client/dist/assets/{index-NqJdhlek.js → index-BT4RIi0U.js} +535 -510
  8. package/packages/client/dist/assets/index-DyNJ5jEW.css +32 -0
  9. package/packages/client/dist/assets/{snippetTokenHighlight-DWsaQXX0.js → snippetTokenHighlight-CP3v4o2g.js} +1 -1
  10. package/packages/client/dist/index.html +2 -2
  11. package/packages/client/dist/sw.js +1 -1
  12. package/packages/server/dist/controllers/bmadCoreConfigController.d.ts +41 -0
  13. package/packages/server/dist/controllers/bmadCoreConfigController.d.ts.map +1 -0
  14. package/packages/server/dist/controllers/bmadCoreConfigController.js +172 -0
  15. package/packages/server/dist/controllers/bmadCoreConfigController.js.map +1 -0
  16. package/packages/server/dist/controllers/contextBuilderController.d.ts +43 -0
  17. package/packages/server/dist/controllers/contextBuilderController.d.ts.map +1 -0
  18. package/packages/server/dist/controllers/contextBuilderController.js +159 -0
  19. package/packages/server/dist/controllers/contextBuilderController.js.map +1 -0
  20. package/packages/server/dist/controllers/harnessAgentController.d.ts +7 -0
  21. package/packages/server/dist/controllers/harnessAgentController.d.ts.map +1 -1
  22. package/packages/server/dist/controllers/harnessAgentController.js +33 -0
  23. package/packages/server/dist/controllers/harnessAgentController.js.map +1 -1
  24. package/packages/server/dist/controllers/harnessBundleController.d.ts +37 -0
  25. package/packages/server/dist/controllers/harnessBundleController.d.ts.map +1 -0
  26. package/packages/server/dist/controllers/harnessBundleController.js +312 -0
  27. package/packages/server/dist/controllers/harnessBundleController.js.map +1 -0
  28. package/packages/server/dist/controllers/harnessCommandController.d.ts +7 -0
  29. package/packages/server/dist/controllers/harnessCommandController.d.ts.map +1 -1
  30. package/packages/server/dist/controllers/harnessCommandController.js +33 -0
  31. package/packages/server/dist/controllers/harnessCommandController.js.map +1 -1
  32. package/packages/server/dist/controllers/harnessHookController.d.ts.map +1 -1
  33. package/packages/server/dist/controllers/harnessHookController.js +44 -1
  34. package/packages/server/dist/controllers/harnessHookController.js.map +1 -1
  35. package/packages/server/dist/controllers/harnessMcpController.d.ts.map +1 -1
  36. package/packages/server/dist/controllers/harnessMcpController.js +62 -1
  37. package/packages/server/dist/controllers/harnessMcpController.js.map +1 -1
  38. package/packages/server/dist/controllers/harnessShareScopeController.d.ts +9 -0
  39. package/packages/server/dist/controllers/harnessShareScopeController.d.ts.map +1 -1
  40. package/packages/server/dist/controllers/harnessShareScopeController.js +48 -1
  41. package/packages/server/dist/controllers/harnessShareScopeController.js.map +1 -1
  42. package/packages/server/dist/controllers/marketplaceController.d.ts +19 -0
  43. package/packages/server/dist/controllers/marketplaceController.d.ts.map +1 -0
  44. package/packages/server/dist/controllers/marketplaceController.js +74 -0
  45. package/packages/server/dist/controllers/marketplaceController.js.map +1 -0
  46. package/packages/server/dist/controllers/observabilityController.d.ts +32 -0
  47. package/packages/server/dist/controllers/observabilityController.d.ts.map +1 -0
  48. package/packages/server/dist/controllers/observabilityController.js +148 -0
  49. package/packages/server/dist/controllers/observabilityController.js.map +1 -0
  50. package/packages/server/dist/handlers/streamCallbacks.d.ts +8 -0
  51. package/packages/server/dist/handlers/streamCallbacks.d.ts.map +1 -1
  52. package/packages/server/dist/handlers/streamCallbacks.js +8 -0
  53. package/packages/server/dist/handlers/streamCallbacks.js.map +1 -1
  54. package/packages/server/dist/handlers/websocket.d.ts.map +1 -1
  55. package/packages/server/dist/handlers/websocket.js +24 -2
  56. package/packages/server/dist/handlers/websocket.js.map +1 -1
  57. package/packages/server/dist/routes/harness.d.ts.map +1 -1
  58. package/packages/server/dist/routes/harness.js +58 -0
  59. package/packages/server/dist/routes/harness.js.map +1 -1
  60. package/packages/server/dist/services/bmadCoreConfigService.d.ts +86 -0
  61. package/packages/server/dist/services/bmadCoreConfigService.d.ts.map +1 -0
  62. package/packages/server/dist/services/bmadCoreConfigService.js +175 -0
  63. package/packages/server/dist/services/bmadCoreConfigService.js.map +1 -0
  64. package/packages/server/dist/services/bmadStatusService.d.ts +9 -0
  65. package/packages/server/dist/services/bmadStatusService.d.ts.map +1 -1
  66. package/packages/server/dist/services/bmadStatusService.js +59 -6
  67. package/packages/server/dist/services/bmadStatusService.js.map +1 -1
  68. package/packages/server/dist/services/chatService.js +1 -1
  69. package/packages/server/dist/services/chatService.js.map +1 -1
  70. package/packages/server/dist/services/contextBuilderScriptTemplate.d.ts +24 -0
  71. package/packages/server/dist/services/contextBuilderScriptTemplate.d.ts.map +1 -0
  72. package/packages/server/dist/services/contextBuilderScriptTemplate.js +181 -0
  73. package/packages/server/dist/services/contextBuilderScriptTemplate.js.map +1 -0
  74. package/packages/server/dist/services/contextBuilderService.d.ts +68 -0
  75. package/packages/server/dist/services/contextBuilderService.d.ts.map +1 -0
  76. package/packages/server/dist/services/contextBuilderService.js +345 -0
  77. package/packages/server/dist/services/contextBuilderService.js.map +1 -0
  78. package/packages/server/dist/services/fileWatcherService.d.ts.map +1 -1
  79. package/packages/server/dist/services/fileWatcherService.js +40 -0
  80. package/packages/server/dist/services/fileWatcherService.js.map +1 -1
  81. package/packages/server/dist/services/harnessAgentService.d.ts +18 -0
  82. package/packages/server/dist/services/harnessAgentService.d.ts.map +1 -1
  83. package/packages/server/dist/services/harnessAgentService.js +55 -0
  84. package/packages/server/dist/services/harnessAgentService.js.map +1 -1
  85. package/packages/server/dist/services/harnessBundleService.d.ts +145 -0
  86. package/packages/server/dist/services/harnessBundleService.d.ts.map +1 -0
  87. package/packages/server/dist/services/harnessBundleService.js +1318 -0
  88. package/packages/server/dist/services/harnessBundleService.js.map +1 -0
  89. package/packages/server/dist/services/harnessCommandService.d.ts +21 -0
  90. package/packages/server/dist/services/harnessCommandService.d.ts.map +1 -1
  91. package/packages/server/dist/services/harnessCommandService.js +64 -0
  92. package/packages/server/dist/services/harnessCommandService.js.map +1 -1
  93. package/packages/server/dist/services/harnessHookService.d.ts +27 -0
  94. package/packages/server/dist/services/harnessHookService.d.ts.map +1 -1
  95. package/packages/server/dist/services/harnessHookService.js +52 -0
  96. package/packages/server/dist/services/harnessHookService.js.map +1 -1
  97. package/packages/server/dist/services/harnessMcpService.d.ts +24 -1
  98. package/packages/server/dist/services/harnessMcpService.d.ts.map +1 -1
  99. package/packages/server/dist/services/harnessMcpService.js +70 -0
  100. package/packages/server/dist/services/harnessMcpService.js.map +1 -1
  101. package/packages/server/dist/services/harnessShareScopeService.d.ts +19 -0
  102. package/packages/server/dist/services/harnessShareScopeService.d.ts.map +1 -1
  103. package/packages/server/dist/services/harnessShareScopeService.js +65 -0
  104. package/packages/server/dist/services/harnessShareScopeService.js.map +1 -1
  105. package/packages/server/dist/services/issueService.d.ts.map +1 -1
  106. package/packages/server/dist/services/issueService.js +1 -0
  107. package/packages/server/dist/services/issueService.js.map +1 -1
  108. package/packages/server/dist/services/marketplaceService.d.ts +50 -0
  109. package/packages/server/dist/services/marketplaceService.d.ts.map +1 -0
  110. package/packages/server/dist/services/marketplaceService.js +326 -0
  111. package/packages/server/dist/services/marketplaceService.js.map +1 -0
  112. package/packages/server/dist/services/observabilityService.d.ts +87 -0
  113. package/packages/server/dist/services/observabilityService.d.ts.map +1 -0
  114. package/packages/server/dist/services/observabilityService.js +0 -0
  115. package/packages/server/dist/services/observabilityService.js.map +1 -0
  116. package/packages/server/dist/services/queueService.d.ts.map +1 -1
  117. package/packages/server/dist/services/queueService.js +3 -0
  118. package/packages/server/dist/services/queueService.js.map +1 -1
  119. package/packages/server/dist/services/sessionService.d.ts +16 -0
  120. package/packages/server/dist/services/sessionService.d.ts.map +1 -1
  121. package/packages/server/dist/services/sessionService.js +125 -0
  122. package/packages/server/dist/services/sessionService.js.map +1 -1
  123. package/packages/server/dist/services/tokenCountService.d.ts +71 -0
  124. package/packages/server/dist/services/tokenCountService.d.ts.map +1 -0
  125. package/packages/server/dist/services/tokenCountService.js +313 -0
  126. package/packages/server/dist/services/tokenCountService.js.map +1 -0
  127. package/packages/server/dist/snippets/apply-qa-fixes +7 -5
  128. package/packages/server/dist/snippets/qa-review +5 -1
  129. package/packages/server/dist/utils/assertSafeBundlePath.d.ts +29 -0
  130. package/packages/server/dist/utils/assertSafeBundlePath.d.ts.map +1 -0
  131. package/packages/server/dist/utils/assertSafeBundlePath.js +53 -0
  132. package/packages/server/dist/utils/assertSafeBundlePath.js.map +1 -0
  133. package/packages/server/dist/utils/bundledBinaryModelSupport.d.ts +7 -0
  134. package/packages/server/dist/utils/bundledBinaryModelSupport.d.ts.map +1 -0
  135. package/packages/server/dist/utils/bundledBinaryModelSupport.js +107 -0
  136. package/packages/server/dist/utils/bundledBinaryModelSupport.js.map +1 -0
  137. package/packages/server/dist/utils/effortUtils.d.ts +2 -2
  138. package/packages/server/dist/utils/effortUtils.js +5 -5
  139. package/packages/server/dist/utils/effortUtils.js.map +1 -1
  140. package/packages/server/dist/utils/errors.d.ts +1 -0
  141. package/packages/server/dist/utils/errors.d.ts.map +1 -1
  142. package/packages/server/dist/utils/errors.js +17 -0
  143. package/packages/server/dist/utils/errors.js.map +1 -1
  144. package/packages/server/dist/utils/harnessBundleSchema.d.ts +14 -12
  145. package/packages/server/dist/utils/harnessBundleSchema.d.ts.map +1 -1
  146. package/packages/server/dist/utils/harnessBundleSchema.js +11 -1
  147. package/packages/server/dist/utils/harnessBundleSchema.js.map +1 -1
  148. package/packages/server/dist/utils/harnessPaths.d.ts +40 -0
  149. package/packages/server/dist/utils/harnessPaths.d.ts.map +1 -1
  150. package/packages/server/dist/utils/harnessPaths.js +123 -0
  151. package/packages/server/dist/utils/harnessPaths.js.map +1 -1
  152. package/packages/server/package.json +2 -1
  153. package/packages/server/resources/internals/INDEX.md +3 -1
  154. package/packages/server/resources/internals/bmad-qa-fix-marker.md +32 -0
  155. package/packages/server/resources/internals/harness-files.md +22 -0
  156. package/packages/server/resources/internals/observability-storage.md +23 -0
  157. package/packages/server/resources/manual/02-chat.md +2 -2
  158. package/packages/server/resources/manual/05-projects.md +3 -1
  159. package/packages/server/resources/manual/10-project-board.md +4 -3
  160. package/packages/server/resources/manual/11-bmad-method-integration.md +10 -8
  161. package/packages/server/resources/manual/12-harness-workbench.md +82 -1
  162. package/packages/server/resources/manual/13-settings.md +4 -4
  163. package/packages/shared/dist/index.d.ts +4 -0
  164. package/packages/shared/dist/index.d.ts.map +1 -1
  165. package/packages/shared/dist/index.js +8 -0
  166. package/packages/shared/dist/index.js.map +1 -1
  167. package/packages/shared/dist/types/bmadCoreConfig.d.ts +71 -0
  168. package/packages/shared/dist/types/bmadCoreConfig.d.ts.map +1 -0
  169. package/packages/shared/dist/types/bmadCoreConfig.js +30 -0
  170. package/packages/shared/dist/types/bmadCoreConfig.js.map +1 -0
  171. package/packages/shared/dist/types/bmadStatus.d.ts +10 -0
  172. package/packages/shared/dist/types/bmadStatus.d.ts.map +1 -1
  173. package/packages/shared/dist/types/bmadStatus.js.map +1 -1
  174. package/packages/shared/dist/types/board.d.ts +6 -0
  175. package/packages/shared/dist/types/board.d.ts.map +1 -1
  176. package/packages/shared/dist/types/contextBuilder.d.ts +102 -0
  177. package/packages/shared/dist/types/contextBuilder.d.ts.map +1 -0
  178. package/packages/shared/dist/types/contextBuilder.js +55 -0
  179. package/packages/shared/dist/types/contextBuilder.js.map +1 -0
  180. package/packages/shared/dist/types/harnessBundle.d.ts +35 -0
  181. package/packages/shared/dist/types/harnessBundle.d.ts.map +1 -1
  182. package/packages/shared/dist/types/marketplace.d.ts +83 -0
  183. package/packages/shared/dist/types/marketplace.d.ts.map +1 -0
  184. package/packages/shared/dist/types/marketplace.js +18 -0
  185. package/packages/shared/dist/types/marketplace.js.map +1 -0
  186. package/packages/shared/dist/types/observability.d.ts +148 -0
  187. package/packages/shared/dist/types/observability.d.ts.map +1 -0
  188. package/packages/shared/dist/types/observability.js +24 -0
  189. package/packages/shared/dist/types/observability.js.map +1 -0
  190. package/packages/shared/dist/types/preferences.d.ts +2 -0
  191. package/packages/shared/dist/types/preferences.d.ts.map +1 -1
  192. package/packages/shared/dist/types/preferences.js.map +1 -1
  193. package/packages/shared/dist/types/sdk.d.ts +1 -1
  194. package/packages/shared/dist/types/sdk.d.ts.map +1 -1
  195. package/packages/shared/dist/types/sdk.js +1 -1
  196. package/packages/shared/dist/types/sdk.js.map +1 -1
  197. package/packages/client/dist/assets/index-CjyjnXB8.css +0 -32
@@ -85,7 +85,7 @@ Draft → Approved → In Progress → Ready for Review → Done
85
85
  - **QA Waived** — Quality review waived/skipped
86
86
  - **QA Failed** — Quality review failed, fixes needed
87
87
  - **QA Concerns** — Quality review raised concerns
88
- - **QA Fixed** — Fixes applied, ready for re-review
88
+ - **QA Fixed** — The developer has recorded a fix for the current gate; ready for re-review
89
89
 
90
90
  Not all statuses are required. Use the context menu to change status directly. **Promoted** indicates an issue that has been escalated to a story or epic.
91
91
 
@@ -134,9 +134,10 @@ Click the **⋮** button on any card to open the context menu. Actions vary by c
134
134
  - **Complete Story** — Mark as Done without committing
135
135
  - **Request QA Review** — Re-request quality review
136
136
  - **QA Failed / QA Concerns:**
137
- - **Apply QA Fix** — Apply fixes for QA issues
137
+ - **Apply QA Fix** — Apply fixes for QA issues (always offered)
138
+ - **Review Story** — Re-request QA review; also offered unless Hammoc has confirmed fixes are still pending for the current gate (e.g., legacy stories or external BMad projects)
138
139
  - **QA Fixed:**
139
- - **Review Story** — Request re-review after fixes
140
+ - **Apply QA Fix** / **Review Story** — Apply further fixes, or request re-review
140
141
  - **Ready for Review / Ready for Done (no QA gate):**
141
142
  - **Review Story** — Request quality review
142
143
 
@@ -108,14 +108,16 @@ The Next Step Recommender analyzes the project state and suggests actions based
108
108
 
109
109
  Recommendations follow reverse workflow order (finish what's closest to done first):
110
110
 
111
- - **Priority 1:** QA Passed/Waived stories → Commit and mark Done, or re-request QA review → Dev agent
112
- - **Priority 2:** QA Fixed stories → Re-review QA agent
113
- - **Priority 3:** QA Failed/Concerns storiesApply QA fixesDev agent
114
- - **Priority 4:** Ready for Review stories (no QA gate) Request QA reviewQA agent
115
- - **Priority 5:** In Progress stories Continue developmentDev agent
116
- - **Priority 6:** Approved stories Start development (Dev), or re-validate with Validate and Fix / Validate Only PO agent
117
- - **Priority 7:** Draft stories → Validate and Fix / Validate Only PO agent
118
- - **Priority 8:** Create next story SM agent (when no actionable stories)
111
+ - **Priority 1:** QA Passed/Waived stories → Commit and mark Done, mark Done without committing, or re-request QA review → Dev/QA agent
112
+ - **Priority 2:** QA Failed/Concerns stories → the next step depends on whether the developer has already recorded a fix for the *current* gate:
113
+ - Fix already applied for this gate Request QA re-reviewQA agent
114
+ - Fix still neededApply QA fixesDev agent
115
+ - State unknown (a story from before this tracking existed, an external BMad project, or a manually-edited gate) **both** "Apply QA fixes" and "Request QA review" are offered (apply-fixes leading) so you choose
116
+ - **Priority 3:** Ready for Review stories (no QA gate) Request QA reviewQA agent
117
+ - **Priority 4:** In Progress stories → Continue developmentDev agent
118
+ - **Priority 5:** Approved storiesStart development (Dev), or re-validate with Validate and Fix / Validate Only → PO agent
119
+ - **Priority 6:** Draft stories → Validate and Fix / Validate Only → PO agent
120
+ - **Priority 7:** Create next story → SM agent (when no actionable stories)
119
121
 
120
122
  **Phase 4: Completed** (all planned stories are Done)
121
123
  - Brainstorm new features → Analyst agent
@@ -2,6 +2,8 @@
2
2
 
3
3
  The **Harness Workbench** is the unified surface for managing everything Claude Code reads from the `.claude/` configuration tree — plugins, skills, MCP servers, hooks, slash commands, sub-agents, `CLAUDE.md`, and Hammoc-native `%snippets`. It lives inside each project's **Settings** tab (see §5.3) under the "Harness Workbench" group, so the workbench is always scoped to the project you're working on but can also reach the global (`~/.claude/`) versions of each item.
4
4
 
5
+ The same Settings tab also hosts four sibling harness-engineering panels next to the Workbench (each a top-level nav item, not one of the Workbench's own sections): **BMad Settings** (§12.16, BMad projects only), **Context Builder** (§12.17), **Observability** (§12.18), and **Plugin Marketplace** (§12.19).
6
+
5
7
  ### 12.1 Layout
6
8
 
7
9
  The workbench has two stacked headers above an eight-section navigator:
@@ -31,7 +33,7 @@ A workbench-wide banner just above the navigator tells you how the project share
31
33
 
32
34
  The banner is derived from the project root's `.gitignore`. Edit the rules and the banner updates the next time the workbench refreshes.
33
35
 
34
- > An **Export bundle** action is planned for the Private mode banner so you can ship the current harness state to a teammate as a single file. The button is intentionally hidden until the export/import flow is fully wired — until then, copy individual files by hand or via the workbench's Project ↔ Global copy actions.
36
+ > The Private mode banner surfaces an **Export** action on its right edge (in addition to the workbench-wide Bundle menu) so you can ship the current harness state to a teammate as a single `.zip` bundle. See §12.15 for the full export/import flow.
35
37
 
36
38
  ### 12.3 Share Badges
37
39
 
@@ -173,3 +175,82 @@ The dialog lists exactly which values were flagged (line numbers for text files,
173
175
 
174
176
  Every Markdown body in the workbench — skill body and raw view, skill bundle files, command body and raw view, agent system prompt and raw view, `CLAUDE.md` (both columns), snippet body — shows a small **Expand** button (⤢ icon) above the editor area. Clicking it opens a fullscreen overlay with the same CodeMirror instance, line wrapping, and a Markdown edit / preview toggle, so you can write long content without scrolling inside a narrow modal. Edits in the overlay sync back to the host panel through the same 300 ms debounce auto-save — there is no separate save button. Close the overlay with **X** or `Escape`. Read-only buffers (a plugin-scope file, a bundled snippet) show a small "read-only" chip in the overlay header.
175
177
 
178
+ ### 12.15 Bundle Export / Import (Team Sharing)
179
+
180
+ When your project's `.claude/` tree is **fully git-ignored** (Mode B — typical when you use Hammoc itself to develop on Hammoc, or when your team intentionally keeps the harness out of source control), you can still share the entire workbench configuration with a teammate by exporting it as a single `.zip` bundle and importing on the other side. The workbench shows a **Bundle** menu (top-right of the workbench header, also surfaced as an **Export** button on the Mode B banner), with two actions:
181
+
182
+ - **Export bundle** — Opens a dialog summarizing what will be packed (the five domain cards + `CLAUDE.md` + snippets) and lets you choose how secrets are handled:
183
+ - **Exclude (default)** — Secrets detected by the heuristic are stripped before packing; the recipient sees a *"N secrets removed"* toast after import. Use this when you want your teammate to fill in their own credentials.
184
+ - **Include as `${ENV_REF}` placeholders** — Detected secrets are replaced with named environment-variable references and a hint table lists which keys the recipient needs to set. Good for sharing a config skeleton without leaking real values.
185
+ - **Include explicit (with secrets)** — Plain-text secrets are packed as-is. This is the *"send it over secure DM and delete after use"* mode: you must check a second confirmation box before the dialog enables the download button, the resulting filename contains a visible `WITH-SECRETS` token, and a 5-second warning toast appears after the download starts.
186
+ - **Import bundle** — Drop a `.zip` (or browse for one). Before anything is applied, Hammoc shows a preview of every incoming item alongside what already exists, with three per-item actions (Overwrite / Skip / Add only if missing) and three bulk-action shortcuts. Bundles tagged *"with secrets"* require the recipient to acknowledge a separate *"this bundle contains plaintext secrets"* checkbox before the apply button activates, and bundles produced by a newer Hammoc version (`bundleVersion` greater than what the local server supports) are rejected outright with an upgrade hint.
187
+
188
+ The export/import flow only touches the workbench items themselves — `package.json`, repository code, and tracked files outside `.claude/` are never bundled. Bundles produced and consumed by the same Hammoc version are round-trip identical: re-importing your own export into an empty project reproduces the workbench cards byte-for-byte (handy for backups or for setting up a new dev machine).
189
+
190
+ ### 12.16 BMad Settings (core-config Editor)
191
+
192
+ > Shown only for BMad projects (those with a `.bmad-core/` folder). For non-BMad projects this nav item is hidden entirely — no empty placeholder.
193
+
194
+ A form-based editor for BMad's `core-config.yaml`, so you can change BMad's paths and flags without opening a terminal or text editor. It is a top-level item in the project Settings left nav (a sibling of the Harness Workbench, not one of its sections).
195
+
196
+ Keys are organized into collapsible groups — **General**, **QA**, **PRD**, **Architecture**, and **Brownfield Epic** — and each value uses a widget matched to its type:
197
+
198
+ - **Toggle** for boolean flags (e.g., Markdown Exploder, PRD Sharded)
199
+ - **Path picker** for file/folder paths — a **Browse** button opens a file-tree dialog; paths are relative to the project root (e.g., Dev Story Location, QA Location)
200
+ - **Text** for plain strings (e.g., PRD Version, Slash Prefix)
201
+ - **Glob** with a live match preview that counts the files matching the pattern (e.g., Epic File Pattern)
202
+ - **Drag-sortable list** for path arrays (e.g., Dev Load Always Files, Custom Technical Documents)
203
+
204
+ Other behaviors:
205
+
206
+ - **Auto-save** — Text/path/glob edits debounce-save (~300 ms); toggles and list changes save immediately. Saves write `.bmad-core/core-config.yaml` while preserving comments and key order.
207
+ - **Raw YAML toggle** — A **Form / Raw** switch in the top-right lets you edit the file as raw YAML; switching back to Form preserves comments and ordering. A parse error keeps you in Raw mode until it is fixed.
208
+ - **Unknown Keys** — Keys the form doesn't recognize (for example, a newer BMad schema) are preserved and listed read-only in an "Unknown Keys" section at the bottom; edit them in Raw mode.
209
+ - **External-change banner** — If the file changes outside Hammoc while the panel is open, a banner with a **Reload** button appears.
210
+
211
+ After you change a path such as **Dev Story Location**, the BMad agents (e.g., `/dev`) pick up the new value on their next run.
212
+
213
+ ### 12.17 Context Builder
214
+
215
+ The **Context Builder** automatically injects a block of context into every new chat session, so you don't have to re-explain "what was I working on" each time. It does this by generating a Claude Code **SessionStart hook** for you. Available on all projects.
216
+
217
+ You declare three kinds of content in the panel:
218
+
219
+ - **Reference files** — Project files that are read fresh and injected at each session start. Each file shows its byte size and an approximate token count. If the combined size nears the SessionStart output cap an amber warning appears; past the hard cap (red), the content spills to a file plus a preview instead of being injected inline, so trim the list when warned.
220
+ - **Dynamic variables** — Built-in values recomputed every session, each with an on/off toggle:
221
+ - **Current branch** — the active git branch
222
+ - **Active BMad story** — title and status of the most recently modified story file
223
+ - **Recent commits** — the most recent commit subjects (count configurable)
224
+ - **Today** — today's date
225
+ - **Uncommitted files** — count of files with uncommitted changes
226
+ - **Custom commands** (advanced) — Arbitrary shell commands whose output is appended. Because these run automatically at every session start, each requires you to tick a confirmation checkbox ("I understand this command runs automatically at every session start"). Hammoc also flags commands that look like they contain a secret.
227
+
228
+ When you save, Hammoc generates a hook script under the project's `.hammoc/` folder and registers a SessionStart entry in `.claude/settings.json`. In the **Hooks** panel (§12.7) that entry is marked **"Hammoc Context Builder"**; editing it by hand there raises a sync-loss warning, since the Context Builder owns it — change it from this panel instead. The token-size hints reuse the same approximation as Observability (§12.18).
229
+
230
+ ### 12.18 Observability
231
+
232
+ The **Observability** panel is the feedback loop for harness tuning: it shows which tools get called and how much of the context window each harness element consumes. Available on all projects.
233
+
234
+ **MCP / tool calls:**
235
+
236
+ - A **timeline** of recent tool calls (server, tool, response time, and success / failed / no-response status) and an **aggregate chart** of calls per server and per tool with average response time and error counts.
237
+ - **Filters** by server, tool, and time window (default: last 30 days).
238
+ - Only call **metadata** is recorded — server, tool, timestamp, argument and response **sizes**, and duration. Argument and response **bodies are never stored**, so file contents and secrets don't leak into the log.
239
+
240
+ **Token attribution:**
241
+
242
+ - A bar chart of how many tokens each harness element contributes — project and global `CLAUDE.md`, each skill's `SKILL.md`, and the Context Builder's injected block — with an overlay showing the total against the current model's context window.
243
+ - Inline hints show an **approximate** token count prefixed with `~` (a fast byte-based estimate), expressed two ways at once: as a percentage of the context window and as a share of the total harness prompt.
244
+ - An **Exact count** button calls Anthropic's official token-count API and caches the result by file content; if the call fails, the approximation is kept.
245
+
246
+ ### 12.19 Plugin Marketplace
247
+
248
+ The **Marketplace** panel lets you discover Claude Code plugins from the marketplaces registered on your machine, complementing the install/toggle view in the Plugins panel (§12.4). Available on all projects.
249
+
250
+ - **Catalog** — One card per plugin parsed from each registered marketplace, showing name, description, version, author, category, a type badge (**Plugin** or **External MCP**), bundled-component counts, and an **Installed** badge when applicable.
251
+ - **Filter & search** — By name, category, type, and installed state.
252
+ - **Install / Uninstall guide** — Because Claude Code's plugin commands are interactive slash commands (not shell subcommands), the **Install** and **Uninstall** buttons open a dialog containing the exact command — e.g. `/plugin install <name>@<marketplace>` — with a **Copy** button. Paste it into your Claude CLI session to run it; plugin commands can't be executed from the Hammoc chat.
253
+ - **Add marketplace** — A form takes a marketplace URL and produces the matching `/plugin marketplace add <url>` command to copy.
254
+ - **Auto-refresh** — After you install or remove a plugin in your CLI session, Hammoc detects the on-disk change and updates both this catalog's **Installed** badges and the Plugins panel cards automatically.
255
+ - **Resilience** — If one marketplace's catalog file can't be read, only that marketplace shows an error badge and the rest still load. If the installed-plugins file is in an unrecognized format, a warning banner notes that installed state may be incomplete.
256
+
@@ -36,8 +36,8 @@ Choose the default Claude model:
36
36
  - **Haiku** — Latest Haiku
37
37
 
38
38
  **Claude 4.x:**
39
- - Opus 4.7 (most capable, 1M context), 4.6, 4.5, 4.1, 4
40
- - Sonnet 4.5, 4
39
+ - Opus 4.8 (most capable, 1M context), 4.7, 4.6, 4.5, 4.1, 4
40
+ - Sonnet 4.6 (1M context), 4.5, 4
41
41
  - Haiku 4.5
42
42
 
43
43
  **Claude 3.x:**
@@ -107,8 +107,8 @@ The timeout resets on every activity. If overridden by an environment variable,
107
107
  Set the default thinking effort for new sessions:
108
108
 
109
109
  - **SDK Default** / Low / Medium / High / XHigh / Max
110
- - Max is available on Opus 4.6, Sonnet 4.6, and Opus 4.7
111
- - XHigh is available only on Opus 4.7 (and is the SDK default for that model)
110
+ - Max is available on Opus 4.6, Sonnet 4.6, Opus 4.7, and Opus 4.8
111
+ - XHigh is available on Opus 4.7 and Opus 4.8 (and is the SDK default for those models)
112
112
  - If the active model does not support the configured level, it falls back to High automatically — the saved preference is kept, only the request to the SDK is clamped
113
113
  - The chosen level is preserved while the active model is still resolving (no flicker back to Default during project switches)
114
114
 
@@ -25,6 +25,10 @@ export * from './types/dashboard.js';
25
25
  export * from './types/board.js';
26
26
  export { LogLevel, parseLogLevel } from './types/logger.js';
27
27
  export * from './types/harness.js';
28
+ export * from './types/observability.js';
28
29
  export { splitMarkdownByH2, appendMarkdownSections, MarkdownH2Section, } from './utils/markdownSections.js';
29
30
  export * from './types/harnessBundle.js';
31
+ export * from './types/bmadCoreConfig.js';
32
+ export * from './types/contextBuilder.js';
33
+ export * from './types/marketplace.js';
30
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,sBAAsB,CAAC;AAGrC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AAIrC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EACL,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,YAAY,GACb,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAIrF,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,4BAA4B,EAC5B,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAG9F,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,2BAA2B,EAC3B,6BAA6B,EAC7B,eAAe,EACf,0BAA0B,EAC1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/B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG5D,cAAc,oBAAoB,CAAC;AAGnC,cAAc,0BAA0B,CAAC;AAGzC,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAGrC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,2BAA2B,CAAC;AAG1C,cAAc,2BAA2B,CAAC;AAG1C,cAAc,wBAAwB,CAAC"}
@@ -47,8 +47,16 @@ export * from './types/board.js';
47
47
  export { LogLevel, parseLogLevel } from './types/logger.js';
48
48
  // Story 28.0.5: Harness workbench shared types (Epic 28 common infra)
49
49
  export * from './types/harness.js';
50
+ // Story 31.3: Observability — MCP call log + token attribution (Epic 31)
51
+ export * from './types/observability.js';
50
52
  // Story 29.1: Markdown H2 split/append helpers (shared by server & client)
51
53
  export { splitMarkdownByH2, appendMarkdownSections, } from './utils/markdownSections.js';
52
54
  // Story 30.3: Harness Export/Import bundle DTOs
53
55
  export * from './types/harnessBundle.js';
56
+ // Story 31.1: BMad core-config.yaml editor DTOs (Epic 31)
57
+ export * from './types/bmadCoreConfig.js';
58
+ // Story 31.2: SessionStart context-builder DTOs (Epic 31)
59
+ export * from './types/contextBuilder.js';
60
+ // Story 31.4: Plugin marketplace catalog DTOs (Epic 31)
61
+ export * from './types/marketplace.js';
54
62
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,cAAc,gBAAgB,CAAC;AAE/B,+CAA+C;AAC/C,cAAc,sBAAsB,CAAC;AAErC,2CAA2C;AAC3C,cAAc,sBAAsB,CAAC;AAErC,4DAA4D;AAC5D,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,C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;AAC9B,cAAc,sBAAsB,CAAC;AAErC,oCAAoC;AACpC,cAAc,kBAAkB,CAAC;AAEjC,kDAAkD;AAClD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE5D,sEAAsE;AACtE,cAAc,oBAAoB,CAAC;AAEnC,yEAAyE;AACzE,cAAc,0BAA0B,CAAC;AAEzC,2EAA2E;AAC3E,OAAO,EACL,iBAAiB,EACjB,sBAAsB,GAEvB,MAAM,6BAA6B,CAAC;AAErC,gDAAgD;AAChD,cAAc,0BAA0B,CAAC;AAEzC,0DAA0D;AAC1D,cAAc,2BAA2B,CAAC;AAE1C,0DAA0D;AAC1D,cAAc,2BAA2B,CAAC;AAE1C,wDAAwD;AACxD,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Typed shape of the 18 known keys of `.bmad-core/core-config.yaml`.
3
+ *
4
+ * Every key is optional: a config that omits a key is valid, and the form
5
+ * renders an empty widget for it. The nested groups (`qa`, `prd`,
6
+ * `architecture`, `brownfieldEpic`) mirror the on-disk YAML nesting so the
7
+ * value of a leaf such as `prd.epicFilePattern` is reachable at the same path
8
+ * the AST patch op uses (`['prd', 'epicFilePattern']`).
9
+ *
10
+ * `customTechnicalDocuments` is `string[] | null` because the canonical
11
+ * default on disk is the literal `null` (an explicit "no extra docs" marker)
12
+ * that the form promotes to an array on first item add.
13
+ */
14
+ export interface BmadCoreConfigKnownKeys {
15
+ markdownExploder?: boolean;
16
+ qa?: {
17
+ qaLocation?: string;
18
+ };
19
+ prd?: {
20
+ prdFile?: string;
21
+ prdVersion?: string;
22
+ prdSharded?: boolean;
23
+ prdShardedLocation?: string;
24
+ epicFilePattern?: string;
25
+ };
26
+ architecture?: {
27
+ architectureFile?: string;
28
+ architectureVersion?: string;
29
+ architectureSharded?: boolean;
30
+ architectureShardedLocation?: string;
31
+ };
32
+ customTechnicalDocuments?: string[] | null;
33
+ devLoadAlwaysFiles?: string[];
34
+ brownfieldEpic?: {
35
+ updateOnCreate?: string[];
36
+ doNotUpdate?: string[];
37
+ };
38
+ devDebugLog?: string;
39
+ devStoryLocation?: string;
40
+ slashPrefix?: string;
41
+ }
42
+ /**
43
+ * The 10 known TOP-LEVEL keys of `.bmad-core/core-config.yaml`. Any other
44
+ * top-level key in the parsed YAML is treated as "unknown" and round-trips
45
+ * untouched (AC4). Nested groups (`qa`/`prd`/`architecture`/`brownfieldEpic`)
46
+ * count as one top-level key each; their leaves are the 18-key matrix.
47
+ *
48
+ * Single source of truth shared by the server partition logic and any client
49
+ * consumer that needs to reason about top-level membership.
50
+ */
51
+ export declare const BMAD_CORE_CONFIG_KNOWN_TOP_LEVEL_KEYS: readonly ["markdownExploder", "qa", "prd", "architecture", "customTechnicalDocuments", "devLoadAlwaysFiles", "brownfieldEpic", "devDebugLog", "devStoryLocation", "slashPrefix"];
52
+ /** GET /api/harness/bmad-config/:projectSlug response. */
53
+ export interface BmadCoreConfigReadResponse {
54
+ /** Full raw text of `.bmad-core/core-config.yaml` — feeds the Raw editor toggle. */
55
+ content: string;
56
+ /** ISO 8601 mtime — STALE_WRITE ETag echoed back on the next patch/raw write. */
57
+ mtime: string;
58
+ /** Known top-level keys, typed. Drives the 18-key form widgets. */
59
+ knownKeys: BmadCoreConfigKnownKeys;
60
+ /**
61
+ * Unknown top-level keys (BMad schema extensions or user-defined keys) shown
62
+ * read-only in the "unknown keys" section with a JS-type hint each (AC4.a).
63
+ */
64
+ unknownKeys: Record<string, unknown>;
65
+ }
66
+ /** PATCH / PUT(raw) write response. */
67
+ export interface BmadCoreConfigWriteResponse {
68
+ /** ISO 8601 mtime after the write — the client persists this as the next ETag. */
69
+ mtime: string;
70
+ }
71
+ //# sourceMappingURL=bmadCoreConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bmadCoreConfig.d.ts","sourceRoot":"","sources":["../../src/types/bmadCoreConfig.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;GAYG;AACH,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A2B;IAC1C,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,30 @@
1
+ // Story 31.1: BMad core-config.yaml editor shared types (Epic 31)
2
+ //
3
+ // Single source of truth for the typed shape of the 18 known keys plus the
4
+ // read-response envelope used by the BMad config form editor. The 18-key
5
+ // widget matrix itself lives client-side (BMAD_KNOWN_KEYS_MATRIX in
6
+ // bmadCoreConfigStore.ts); these types describe the *values* that travel over
7
+ // the wire after the server partitions a parsed config into known vs unknown
8
+ // top-level keys (see bmadCoreConfigService.parseUnknownKeys).
9
+ /**
10
+ * The 10 known TOP-LEVEL keys of `.bmad-core/core-config.yaml`. Any other
11
+ * top-level key in the parsed YAML is treated as "unknown" and round-trips
12
+ * untouched (AC4). Nested groups (`qa`/`prd`/`architecture`/`brownfieldEpic`)
13
+ * count as one top-level key each; their leaves are the 18-key matrix.
14
+ *
15
+ * Single source of truth shared by the server partition logic and any client
16
+ * consumer that needs to reason about top-level membership.
17
+ */
18
+ export const BMAD_CORE_CONFIG_KNOWN_TOP_LEVEL_KEYS = [
19
+ 'markdownExploder',
20
+ 'qa',
21
+ 'prd',
22
+ 'architecture',
23
+ 'customTechnicalDocuments',
24
+ 'devLoadAlwaysFiles',
25
+ 'brownfieldEpic',
26
+ 'devDebugLog',
27
+ 'devStoryLocation',
28
+ 'slashPrefix',
29
+ ];
30
+ //# sourceMappingURL=bmadCoreConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bmadCoreConfig.js","sourceRoot":"","sources":["../../src/types/bmadCoreConfig.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,oEAAoE;AACpE,8EAA8E;AAC9E,6EAA6E;AAC7E,+DAA+D;AA4C/D;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,kBAAkB;IAClB,IAAI;IACJ,KAAK;IACL,cAAc;IACd,0BAA0B;IAC1B,oBAAoB;IACpB,gBAAgB;IAChB,aAAa;IACb,kBAAkB;IAClB,aAAa;CACL,CAAC"}
@@ -52,6 +52,16 @@ export interface BmadStoryStatus {
52
52
  title?: string;
53
53
  /** Latest QA gate decision: 'PASS' | 'CONCERNS' | 'FAIL' | 'WAIVED' */
54
54
  gateResult?: string;
55
+ /**
56
+ * The story's qa-fix marker state relative to the CURRENT gate:
57
+ * - 'applied': Dev ran apply-qa-fixes against this gate → QA re-review is next
58
+ * - 'needed': QA flagged this gate (CONCERNS/FAIL) and it is not yet
59
+ * addressed → apply-qa-fixes is next
60
+ * - undefined: no marker matches the current gate (legacy story or external
61
+ * BMad project) → the UI shows BOTH actions and lets the user pick
62
+ * Derived from explicit marker comments in the story, never from file mtime.
63
+ */
64
+ gateFixState?: 'needed' | 'applied';
55
65
  }
56
66
  /** Epic with its stories */
57
67
  export interface BmadEpicStatus {
@@ -1 +1 @@
1
- {"version":3,"file":"bmadStatus.d.ts","sourceRoot":"","sources":["../../src/types/bmadStatus.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,4FAA4F;AAC5F,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,gCAAgC;AACh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;;;;;;;;;;;;;CAgBrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bmadStatus.js","sourceRoot":"","sources":["../../src/types/bmadStatus.ts"],"names":[],"mappings":"AA8FA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,gBAAgB,EAAE;QAChB,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,mDAAmD;QAC5D,UAAU,EAAE,GAAG;KAChB;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,mCAAmC;QAC5C,UAAU,EAAE,GAAG;KAChB;IACD,UAAU,EAAE;QACV,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,uBAAuB;QAChC,UAAU,EAAE,GAAG;KAChB;CACO,CAAC"}
1
+ {"version":3,"file":"bmadStatus.js","sourceRoot":"","sources":["../../src/types/bmadStatus.ts"],"names":[],"mappings":"AAwGA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,gBAAgB,EAAE;QAChB,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,mDAAmD;QAC5D,UAAU,EAAE,GAAG;KAChB;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,mCAAmC;QAC5C,UAAU,EAAE,GAAG;KAChB;IACD,UAAU,EAAE;QACV,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,uBAAuB;QAChC,UAAU,EAAE,GAAG;KAChB;CACO,CAAC"}
@@ -40,6 +40,12 @@ export interface BoardItem {
40
40
  externalRef?: string;
41
41
  /** Latest QA gate decision: 'PASS' | 'CONCERNS' | 'FAIL' | 'WAIVED' */
42
42
  gateResult?: string;
43
+ /**
44
+ * qa-fix marker state vs the CURRENT gate: 'applied' (Dev addressed this gate
45
+ * → re-review), 'needed' (QA flagged it, not yet addressed → apply fixes), or
46
+ * undefined (no matching marker → show both actions). Marker-based, not mtime.
47
+ */
48
+ gateFixState?: 'needed' | 'applied';
43
49
  /** Project-relative path to the source file (story/epic markdown) */
44
50
  filePath?: string;
45
51
  attachments?: IssueAttachment[];
@@ -1 +1 @@
1
- {"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../src/types/board.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAGvD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAGD,eAAO,MAAM,oBAAoB,uOAWvB,CAAC;AA8BX,eAAO,MAAM,oBAAoB,EAAE,WAGlC,CAAC;AAGF,eAAO,MAAM,mBAAmB,4BAA6B,CAAC;AAE9D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAkD7D;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,eAAe,CAAC;CAC7B;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAClD,SAAS,CAAC,EAAE,KAAK,GAAG,aAAa,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM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MAAM,CAAC;IACpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACpC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAClD,SAAS,CAAC,EAAE,KAAK,GAAG,aAAa,CAAC;CACnC;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAClD,SAAS,CAAC,EAAE,KAAK,GAAG,aAAa,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * The 5 built-in dynamic variable identifiers, mirroring Epic 31 § Story 31.2
3
+ * Scope examples (*"현재 브랜치 / 활성 BMad 스토리 / 최근 커밋 N개 / 오늘 날짜 /
4
+ * 미커밋 파일 개수"*). Each is recomputed at script runtime on every session
5
+ * start (AC2.b) — never snapshotted at generation time.
6
+ */
7
+ export type ContextBuilderVariableId = 'gitBranch' | 'activeBmadStory' | 'recentCommits' | 'today' | 'uncommittedCount';
8
+ /**
9
+ * Ordered list of the built-in variable IDs — single source of truth shared by
10
+ * the server (zod validation + script generation) and the client
11
+ * (`CONTEXT_BUILDER_VARIABLES` widget definitions). Order is the canonical
12
+ * display order in the toggle list.
13
+ */
14
+ export declare const CONTEXT_BUILDER_VARIABLE_IDS: readonly ContextBuilderVariableId[];
15
+ /** One user-defined shell command block (AC5). */
16
+ export interface ContextBuilderCustomCommand {
17
+ /** The shell command whose stdout is appended as a context block. */
18
+ command: string;
19
+ /**
20
+ * AC5.b — only `acknowledged: true` commands are written into the generated
21
+ * script. The acknowledgement is the explicit "I understand this runs every
22
+ * session" confirmation captured by the security checkbox.
23
+ */
24
+ acknowledged: boolean;
25
+ }
26
+ /**
27
+ * The declarative manifest — single source of truth for one project's context
28
+ * builder. Persisted at `<projectRoot>/.hammoc/context-builder.json`.
29
+ */
30
+ export interface ContextBuilderManifest {
31
+ /** Schema version — bump only on a breaking shape change. */
32
+ version: 1;
33
+ /**
34
+ * AC1.f — when false the generated script + settings entry are removed and
35
+ * NOT regenerated (the declaration is retained so re-enabling restores it).
36
+ */
37
+ enabled: boolean;
38
+ /** Reference files, as project-root-relative POSIX paths (e.g. `docs/architecture.md`). */
39
+ files: string[];
40
+ /** Built-in dynamic variables, on/off. A full record of all 5 IDs. */
41
+ variables: Record<ContextBuilderVariableId, boolean>;
42
+ /** N for the `recentCommits` variable (default 5). Ignored when that variable is off. */
43
+ recentCommitsCount?: number;
44
+ /** User-defined shell command blocks (AC5). */
45
+ customCommands: ContextBuilderCustomCommand[];
46
+ }
47
+ /**
48
+ * GET /api/harness/context-builder/:projectSlug response.
49
+ *
50
+ * When the manifest file does not yet exist the server returns a default
51
+ * (disabled, empty) manifest with `mtime: ''` so the panel opens in an
52
+ * empty-state instead of erroring (API table — *"매니페스트 없음 → 빈 기본
53
+ * 매니페스트 반환도 허용"*).
54
+ */
55
+ export interface ContextBuilderReadResponse {
56
+ manifest: ContextBuilderManifest;
57
+ /** ISO 8601 mtime of the manifest — STALE_WRITE ETag. Empty string when the file is absent. */
58
+ mtime: string;
59
+ /** True when the generated `.hammoc/hooks/context-builder.mjs` exists on disk. */
60
+ scriptExists: boolean;
61
+ /** True when a Hammoc-managed `hooks.SessionStart` entry currently points at the script. */
62
+ entryRegistered: boolean;
63
+ }
64
+ /**
65
+ * PUT /api/harness/context-builder/:projectSlug response (save + generate).
66
+ * Extends the write ETag with the generated artifact locations.
67
+ */
68
+ export interface ContextBuilderGenerateResponse {
69
+ /** ISO 8601 mtime of the manifest after the write — next STALE_WRITE ETag. */
70
+ mtime: string;
71
+ /** Absolute path of the generated script (empty string when manifest.enabled === false). */
72
+ scriptPath: string;
73
+ /** ISO 8601 mtime of `.claude/settings.json` after the entry registration. */
74
+ settingsMtime: string;
75
+ /**
76
+ * AC5.c — indices (into `manifest.customCommands`) whose command string the
77
+ * secret heuristic flagged. NON-BLOCKING: the save still succeeds; the client
78
+ * surfaces these as a notice ("고지"), never a hard block. Empty/omitted when
79
+ * nothing matched.
80
+ */
81
+ secretWarningCommandIndices?: number[];
82
+ }
83
+ /** POST /api/harness/context-builder/:projectSlug/disable response. */
84
+ export interface ContextBuilderDisableResponse {
85
+ success: true;
86
+ }
87
+ /**
88
+ * Canonical command-path marker that identifies a Hammoc-managed SessionStart
89
+ * entry. AC1.e / AC3.a identify ownership purely by the command string
90
+ * containing this fragment — no extra metadata key is written into
91
+ * settings.json (the path IS the ownership identifier). The generated entry's
92
+ * command is `node "<abs>/.hammoc/hooks/context-builder.mjs"`, so a substring
93
+ * match on this marker is the ownership test on both server and client.
94
+ */
95
+ export declare const CONTEXT_BUILDER_SCRIPT_MARKER = ".hammoc/hooks/context-builder.";
96
+ /**
97
+ * Build the default empty manifest (disabled, no files, all variables off, no
98
+ * custom commands). Shared by the server empty-state GET and the client store's
99
+ * initial state so the two never drift.
100
+ */
101
+ export declare function createDefaultContextBuilderManifest(): ContextBuilderManifest;
102
+ //# sourceMappingURL=contextBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextBuilder.d.ts","sourceRoot":"","sources":["../../src/types/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O,EAAE,IAAI,CAAC;CACf;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,mCAAmC,CAAC;AAE9E;;;;GAIG;AACH,wBAAgB,mCAAmC,IAAI,sBAAsB,CAe5E"}
@@ -0,0 +1,55 @@
1
+ // Story 31.2: SessionStart context-builder shared types (Epic 31)
2
+ //
3
+ // Single source of truth for the declarative "context builder" manifest that
4
+ // drives the generated `.hammoc/hooks/context-builder.mjs` SessionStart hook
5
+ // script and the `.claude/settings.json` `hooks.SessionStart` entry.
6
+ //
7
+ // The manifest at `<projectRoot>/.hammoc/context-builder.json` is the SSoT;
8
+ // the script + settings entry are GENERATED artifacts derived from it. Server
9
+ // (`contextBuilderService`) and client (`contextBuilderStore`) both import
10
+ // these types, so they live in `packages/shared` (one-way dependency
11
+ // `shared → server/client`).
12
+ /**
13
+ * Ordered list of the built-in variable IDs — single source of truth shared by
14
+ * the server (zod validation + script generation) and the client
15
+ * (`CONTEXT_BUILDER_VARIABLES` widget definitions). Order is the canonical
16
+ * display order in the toggle list.
17
+ */
18
+ export const CONTEXT_BUILDER_VARIABLE_IDS = [
19
+ 'gitBranch',
20
+ 'activeBmadStory',
21
+ 'recentCommits',
22
+ 'today',
23
+ 'uncommittedCount',
24
+ ];
25
+ /**
26
+ * Canonical command-path marker that identifies a Hammoc-managed SessionStart
27
+ * entry. AC1.e / AC3.a identify ownership purely by the command string
28
+ * containing this fragment — no extra metadata key is written into
29
+ * settings.json (the path IS the ownership identifier). The generated entry's
30
+ * command is `node "<abs>/.hammoc/hooks/context-builder.mjs"`, so a substring
31
+ * match on this marker is the ownership test on both server and client.
32
+ */
33
+ export const CONTEXT_BUILDER_SCRIPT_MARKER = '.hammoc/hooks/context-builder.';
34
+ /**
35
+ * Build the default empty manifest (disabled, no files, all variables off, no
36
+ * custom commands). Shared by the server empty-state GET and the client store's
37
+ * initial state so the two never drift.
38
+ */
39
+ export function createDefaultContextBuilderManifest() {
40
+ return {
41
+ version: 1,
42
+ enabled: false,
43
+ files: [],
44
+ variables: {
45
+ gitBranch: false,
46
+ activeBmadStory: false,
47
+ recentCommits: false,
48
+ today: false,
49
+ uncommittedCount: false,
50
+ },
51
+ recentCommitsCount: 5,
52
+ customCommands: [],
53
+ };
54
+ }
55
+ //# sourceMappingURL=contextBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextBuilder.js","sourceRoot":"","sources":["../../src/types/contextBuilder.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,qEAAqE;AACrE,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,2EAA2E;AAC3E,qEAAqE;AACrE,6BAA6B;AAe7B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAwC;IAC/E,WAAW;IACX,iBAAiB;IACjB,eAAe;IACf,OAAO;IACP,kBAAkB;CACV,CAAC;AA+EX;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,gCAAgC,CAAC;AAE9E;;;;GAIG;AACH,MAAM,UAAU,mCAAmC;IACjD,OAAO;QACL,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,EAAE;QACT,SAAS,EAAE;YACT,SAAS,EAAE,KAAK;YAChB,eAAe,EAAE,KAAK;YACtB,aAAa,EAAE,KAAK;YACpB,KAAK,EAAE,KAAK;YACZ,gBAAgB,EAAE,KAAK;SACxB;QACD,kBAAkB,EAAE,CAAC;QACrB,cAAc,EAAE,EAAE;KACnB,CAAC;AACJ,CAAC"}