strikethroo 3.4.0 → 3.4.2

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 (59) hide show
  1. package/README.md +113 -64
  2. package/dist/serve/self-review.d.ts +2 -1
  3. package/dist/serve/self-review.d.ts.map +1 -1
  4. package/dist/serve/self-review.js +28 -12
  5. package/dist/serve/self-review.js.map +1 -1
  6. package/dist-web/assets/{arc-DNWIWcmV.js → arc-B2vRTAtp.js} +1 -1
  7. package/dist-web/assets/{architectureDiagram-3BPJPVTR-4848pSVU.js → architectureDiagram-3BPJPVTR-BaE0WZP8.js} +1 -1
  8. package/dist-web/assets/{blockDiagram-GPEHLZMM-Di4f0Fdh.js → blockDiagram-GPEHLZMM-EYPDaLkJ.js} +1 -1
  9. package/dist-web/assets/{c4Diagram-AAUBKEIU-DnKXYQDd.js → c4Diagram-AAUBKEIU-fc_1_fJV.js} +1 -1
  10. package/dist-web/assets/channel-C1z4NHke.js +1 -0
  11. package/dist-web/assets/{chunk-2J33WTMH-CrMXYkYd.js → chunk-2J33WTMH-BFdYIb-H.js} +1 -1
  12. package/dist-web/assets/{chunk-4BX2VUAB-pTNw0nRN.js → chunk-4BX2VUAB-BTnyxNYb.js} +1 -1
  13. package/dist-web/assets/{chunk-55IACEB6-eiUq45LC.js → chunk-55IACEB6-DAnXzn2R.js} +1 -1
  14. package/dist-web/assets/{chunk-727SXJPM-VK2_81_k.js → chunk-727SXJPM-CgGGmYGu.js} +1 -1
  15. package/dist-web/assets/{chunk-AQP2D5EJ-CvquacZq.js → chunk-AQP2D5EJ-B-eVBjow.js} +1 -1
  16. package/dist-web/assets/{chunk-FMBD7UC4-B7UIk6n2.js → chunk-FMBD7UC4-Qn3q5Qhx.js} +1 -1
  17. package/dist-web/assets/{chunk-ND2GUHAM-Bcyx7l35.js → chunk-ND2GUHAM-DDrXpr-b.js} +1 -1
  18. package/dist-web/assets/{chunk-QZHKN3VN-BE8fUiEk.js → chunk-QZHKN3VN-Ib3X1Gaq.js} +1 -1
  19. package/dist-web/assets/classDiagram-4FO5ZUOK-D0BcCPc_.js +1 -0
  20. package/dist-web/assets/classDiagram-v2-Q7XG4LA2-D0BcCPc_.js +1 -0
  21. package/dist-web/assets/{cose-bilkent-S5V4N54A-SUwTDClI.js → cose-bilkent-S5V4N54A-Cc9Pa2Np.js} +1 -1
  22. package/dist-web/assets/{dagre-BM42HDAG-CNCYCywf.js → dagre-BM42HDAG-CSZhBLZq.js} +1 -1
  23. package/dist-web/assets/{diagram-2AECGRRQ-oI2I_IyJ.js → diagram-2AECGRRQ-CbX0S5by.js} +1 -1
  24. package/dist-web/assets/{diagram-5GNKFQAL-QRLGQy6P.js → diagram-5GNKFQAL-DQucEHMA.js} +1 -1
  25. package/dist-web/assets/{diagram-KO2AKTUF-CXlVW8DC.js → diagram-KO2AKTUF-CSs1kvk3.js} +1 -1
  26. package/dist-web/assets/{diagram-LMA3HP47-IvDNOxHH.js → diagram-LMA3HP47-CoDfh1_X.js} +1 -1
  27. package/dist-web/assets/{diagram-OG6HWLK6-GTLNmKq-.js → diagram-OG6HWLK6-se9DZ4Bb.js} +1 -1
  28. package/dist-web/assets/{erDiagram-TEJ5UH35-CS5OdUM4.js → erDiagram-TEJ5UH35-cVHBGhT0.js} +1 -1
  29. package/dist-web/assets/{flowDiagram-I6XJVG4X-DL2zkHBm.js → flowDiagram-I6XJVG4X-pxtIoOED.js} +1 -1
  30. package/dist-web/assets/{ganttDiagram-6RSMTGT7-siEEVsTQ.js → ganttDiagram-6RSMTGT7-CLBch1QN.js} +1 -1
  31. package/dist-web/assets/{gitGraphDiagram-PVQCEYII-_v7TLh-c.js → gitGraphDiagram-PVQCEYII-DJux0GA6.js} +1 -1
  32. package/dist-web/assets/{index-DxdIvMsZ.js → index-9yA-mDCf.js} +1 -1
  33. package/dist-web/assets/{index-CsGJFeu3.js → index-DN2M3jFj.js} +1 -1
  34. package/dist-web/assets/{index-DR9brvG5.js → index-DtUXMh0p.js} +4 -4
  35. package/dist-web/assets/{infoDiagram-5YYISTIA-KWgpr0cu.js → infoDiagram-5YYISTIA-DsPlHBE7.js} +1 -1
  36. package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-DDc8_Paq.js → ishikawaDiagram-YF4QCWOH-BxbaTVwk.js} +1 -1
  37. package/dist-web/assets/{journeyDiagram-JHISSGLW-BHVcA05s.js → journeyDiagram-JHISSGLW-CDwF7CzN.js} +1 -1
  38. package/dist-web/assets/{kanban-definition-UN3LZRKU-CK_4fRNH.js → kanban-definition-UN3LZRKU-Caz5DWRS.js} +1 -1
  39. package/dist-web/assets/{linear-B5osl92g.js → linear-BP4pxN-r.js} +1 -1
  40. package/dist-web/assets/{mermaid.core-CK5fxgQo.js → mermaid.core-C0ywvB_J.js} +4 -4
  41. package/dist-web/assets/{mindmap-definition-RKZ34NQL-tDsLSYUH.js → mindmap-definition-RKZ34NQL-DCrqo_pU.js} +1 -1
  42. package/dist-web/assets/{pieDiagram-4H26LBE5-KfLsJngJ.js → pieDiagram-4H26LBE5--wRkF_Wt.js} +1 -1
  43. package/dist-web/assets/{quadrantDiagram-W4KKPZXB-BH5JIycq.js → quadrantDiagram-W4KKPZXB-N-hXNYsT.js} +1 -1
  44. package/dist-web/assets/{requirementDiagram-4Y6WPE33-27Aob3ha.js → requirementDiagram-4Y6WPE33-D8-9JKfq.js} +1 -1
  45. package/dist-web/assets/{sankeyDiagram-5OEKKPKP-CLhYpJP3.js → sankeyDiagram-5OEKKPKP-nucHWP9c.js} +1 -1
  46. package/dist-web/assets/{sequenceDiagram-3UESZ5HK-MHNCDzjW.js → sequenceDiagram-3UESZ5HK-BA3nMsqM.js} +1 -1
  47. package/dist-web/assets/{stateDiagram-AJRCARHV-RWRWv-5M.js → stateDiagram-AJRCARHV-CtGW_5HH.js} +1 -1
  48. package/dist-web/assets/stateDiagram-v2-BHNVJYJU-CbmIerZp.js +1 -0
  49. package/dist-web/assets/{timeline-definition-PNZ67QCA-8JLQGcYC.js → timeline-definition-PNZ67QCA-DqvFcHZm.js} +1 -1
  50. package/dist-web/assets/{vennDiagram-CIIHVFJN-BDn87xD1.js → vennDiagram-CIIHVFJN-xaOtI74Z.js} +1 -1
  51. package/dist-web/assets/{wardley-L42UT6IY-mqty9-3v.js → wardley-L42UT6IY-BHR2vhXn.js} +1 -1
  52. package/dist-web/assets/{wardleyDiagram-YWT4CUSO-Dt8iN9_w.js → wardleyDiagram-YWT4CUSO-B_5FPztm.js} +1 -1
  53. package/dist-web/assets/{xychartDiagram-2RQKCTM6-BZ2zaIT8.js → xychartDiagram-2RQKCTM6-DW9idD29.js} +1 -1
  54. package/dist-web/index.html +1 -1
  55. package/package.json +1 -1
  56. package/dist-web/assets/channel-CkHLU9ln.js +0 -1
  57. package/dist-web/assets/classDiagram-4FO5ZUOK-Dv-jZ30v.js +0 -1
  58. package/dist-web/assets/classDiagram-v2-Q7XG4LA2-Dv-jZ30v.js +0 -1
  59. package/dist-web/assets/stateDiagram-v2-BHNVJYJU-FZh-288q.js +0 -1
package/README.md CHANGED
@@ -1,100 +1,149 @@
1
- # 🤖 Strikethroo
1
+ <p align="center">
2
+ <img src="docs/assets/strikethroo-hero.png" alt="Strikethroo: complex programming requests become atomic, validated tasks through staged, spec-driven refinement" width="100%">
3
+ </p>
2
4
 
3
- [![npm version](https://img.shields.io/npm/v/strikethroo.svg)](https://www.npmjs.com/package/strikethroo)
4
- [![License](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
5
+ <p align="center">
6
+ <strong>Spec-driven development that fits each codebase like a glove.</strong><br>
7
+ Plain-Markdown hooks teach the agent your conventions, so every plan, task, and run inherits them. No API keys, no extra tools to run.
8
+ </p>
5
9
 
6
- **Strikethroo: extensible AI-powered plan and task management with customizable workflows and structured development processes.**
10
+ <p align="center">
11
+ <a href="https://www.npmjs.com/package/strikethroo"><img src="https://img.shields.io/npm/v/strikethroo?style=flat-square&label=npm&color=BE376F&labelColor=2b2230" alt="npm version"></a>
12
+ <a href="https://github.com/e0ipso/strikethroo/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/e0ipso/strikethroo/test.yml?style=flat-square&label=tests&color=BE376F&labelColor=2b2230" alt="tests"></a>
13
+ <a href="package.json"><img src="https://img.shields.io/node/v/strikethroo?style=flat-square&color=BE376F&labelColor=2b2230" alt="node version"></a>
14
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-BE376F?style=flat-square&labelColor=2b2230" alt="MIT license"></a>
15
+ </p>
7
16
 
8
- Transform complex AI prompts into organized, executable workflows through customizable hooks, templates, and progressive refinement. Works seamlessly within your existing AI subscriptions for Claude Code, Gemini CLI, and Open Code.
17
+ <p align="center">
18
+ <a href="https://mateuaguilo.com/strikethroo/workflow.html">Workflow</a> &nbsp;·&nbsp;
19
+ <a href="https://mateuaguilo.com/strikethroo/customization.html">Customization</a> &nbsp;·&nbsp;
20
+ <a href="https://mateuaguilo.com/strikethroo/visualizations.html">Visualizations</a> &nbsp;·&nbsp;
21
+ <a href="https://mateuaguilo.com/strikethroo/faq.html">FAQ</a>
22
+ </p>
9
23
 
10
- ## 🚀 Quick Start
24
+ ## Why Strikethroo?
11
25
 
12
- This project ships in two parts: the **skills** (installed by [vercel-labs/skills](https://github.com/vercel-labs/skills)) and the **workspace** (initialized by this CLI). Run both:
26
+ <table>
27
+ <tr>
28
+ <td width="50%" valign="top">
13
29
 
14
- ```bash
15
- # 1. Install the Strikethroo skills for your assistant
16
- npx skills add e0ipso/strikethroo
30
+ <img src="docs/assets/icons/sliders-horizontal.svg" width="28" height="28" alt="" />
17
31
 
18
- # 2. Initialize the .ai/strikethroo/ workspace
19
- npx strikethroo init --harnesses claude --destination-directory .
20
- ```
32
+ ### Bends to your conventions
21
33
 
22
- The skills give your assistant the planning, decomposition, and execution workflow; the CLI bootstraps `.ai/strikethroo/` with hooks, templates, and the hash-tracked diff-on-conflict UX. Each step is independently re-runnable. See the [migration guide](https://mateuaguilo.com/strikethroo/migration.html) for upgrade flows from 1.x.
34
+ Plain-Markdown hooks fire at nine points across the workflow; inject your test commands, standards, and domain rules so every plan, task, and run inherits them. No plugins, no code.
23
35
 
24
- The CLI's `init` emits the shared workspace plus harness-specific agents (e.g., `.claude/agents/` for Claude). Other harnesses rely entirely on the installed skills.
36
+ </td>
37
+ <td width="50%" valign="top">
25
38
 
26
- ## 🌐 Serve the Workspace
39
+ <img src="docs/assets/icons/focus.svg" width="28" height="28" alt="" />
27
40
 
28
- The web app is Strikethroo's **visualization layer** — the way to *see* your plans, tasks, the dependency graph, and the strikethrough done-state instead of reading a tree of Markdown files by hand. It is the other half of the story: the assistant authors plan and task files inside your harness (Claude Code, Gemini CLI, opencode, the desktop app), and the web app is the read-only window onto those same files.
41
+ ### Clean context per agent
29
42
 
30
- ![Strikethroo web app](docs/assets/readme-preview.png)
43
+ Every step runs with a fresh, focused context: the planner sees only your work order, the task generator only the approved plan, each execution sub-agent only its single task. No context bleed, no drift.
31
44
 
32
- Run a local web app over an initialized `.ai/strikethroo/` workspace:
45
+ </td>
46
+ </tr>
47
+ <tr>
48
+ <td width="50%" valign="top">
33
49
 
34
- ```bash
35
- npx strikethroo serve
36
- ```
50
+ <img src="docs/assets/icons/scissors.svg" width="28" height="28" alt="" />
37
51
 
38
- See [The Web App](https://mateuaguilo.com/strikethroo/web-app.html) for a full tour of the Board, Plan Detail, dependency graph, archive, and customization screens.
52
+ ### No API keys
39
53
 
40
- `serve` boots a dependency-light Node server that hosts the prebuilt single-page app as static files, exposes a read-only JSON API over the workspace model, and streams a coalesced `changed` event over Server-Sent Events whenever the workspace mutates on disk. Run it from inside an initialized workspace; if none is found it prints guidance to run `init` and exits without binding.
54
+ Runs inside the assistant you already use -- Claude Code, Codex, Cursor, OpenCode, or Copilot -- on the subscription you already pay for. Nothing to provision, host, or rotate.
41
55
 
42
- The viewer is read-only **except for one permitted mutation: the archive action.** A plan whose tasks are all complete (derived state `done`) shows an **Archive** control; confirming it issues `POST /api/plans/:id/archive`, which moves that plan's directory from `plans/` to `archive/`. It is strictly a directory move — no files are deleted or edited, and only `done` plans are accepted. This is the manual escape hatch for plans that are done but not yet archived; it does **not** replace the automatic archival the `st-execute-blueprint` skill performs on successful completion.
56
+ </td>
57
+ <td>
43
58
 
44
- Flags:
59
+ <img src="docs/assets/icons/puzzle.svg" width="28" height="28" alt="" />
45
60
 
46
- - `--port <n>` — port to bind (default `4317`).
47
- - `--no-open` — do not open the browser on start.
48
- - `--workspace <path>` — override workspace root discovery.
61
+ ### Harness-agnostic skills
49
62
 
50
- ## Key Benefits
63
+ The workflow ships as Agent Skills: one `SKILL.md` works on any harness supporting the format. Install once; the right skill auto-loads when you describe what you need.
51
64
 
52
- - **🔧 Fully Customizable**: Tailor hooks, templates, and workflows to your project's specific needs
53
- - **🎯 Extensible Architecture**: Add custom validation gates, quality checks, and workflow patterns
54
- - **📋 Structured Workflows**: Three-phase progressive refinement with validation gates
55
- - **🔄 Plan Mode Integration**: Enhance existing AI assistant features with structured task management
56
- - **💰 Works Within Subscriptions**: No additional API keys or costs required
65
+ </td>
66
+ <td width="50%" valign="top"></td>
67
+ </tr>
68
+ </table>
57
69
 
58
- ## 📖 Documentation
70
+ ## Adapts to every codebase
59
71
 
60
- ### 🌐 **[Complete Documentation →](https://mateuaguilo.com/strikethroo/)**
72
+ Every codebase has its own conventions, and Strikethroo bends to them instead of imposing its own. Three plain-Markdown surfaces -- no plugins, no code:
61
73
 
62
- Comprehensive guides covering:
63
- - Installation and configuration
64
- - Customization with hooks and templates
65
- - Workflow patterns and best practices
66
- - Architecture and design principles
74
+ [![Strikethroo's customizable spec-driven workflow, showing where the hooks fire: PRE_PLAN, POST_PLAN, POST_TASK_GENERATION_ALL, PRE_TASK_ASSIGNMENT, and POST_EXECUTION](docs/assets/strikethroo-customization.png)](docs/assets/strikethroo-customization.png)
67
75
 
68
- ## 🔄 Workflow Preview
76
+ ### <img src="docs/assets/icons/waypoints.svg" width="28" height="28" alt="" /> Hooks
69
77
 
70
- Once the skills are installed, invoke the workflow by intent the assistant auto-loads the matching skill. There are no slash commands to memorize.
78
+ Fire at nine points across the workflow (before planning, after each phase, on errors, and more). Drop in your test commands, coding standards, and domain rules; every plan, task, and execution run inherits them.
71
79
 
72
- **Automated end-to-end run:**
80
+ ### <img src="docs/assets/icons/file-text.svg" width="28" height="28" alt="" /> Templates
73
81
 
74
- > "Run the full workflow to create a user authentication system."
82
+ Define the shape of plans and tasks -- add your own sections and checklists.
75
83
 
76
- The `st-full-workflow` skill handles plan creation, task generation, and blueprint execution in a single pass.
84
+ ### <img src="docs/assets/icons/book-open.svg" width="28" height="28" alt="" /> Project context
77
85
 
78
- **Step-by-step (for manual review between phases):**
86
+ One file of domain knowledge every step reads.
79
87
 
80
- 1. **📝 Create a plan** "Create a plan for a user authentication system" (`st-create-plan` skill)
81
- 2. **🔍 Refine the plan** → "Refine plan 1" (`st-refine-plan` skill — useful when a second assistant should red-team the plan)
82
- 3. **📋 Generate tasks** → "Generate tasks for plan 1" (`st-generate-tasks` skill)
83
- 4. **🚀 Execute blueprint** → "Execute the blueprint for plan 1" (`st-execute-blueprint` skill)
88
+ Hooks, templates, and a project-context file are all plain Markdown -- nothing to compile, no plugin API to learn. See the [Customization Guide](https://mateuaguilo.com/strikethroo/customization.html) for examples.
84
89
 
85
- Progress is driven by the Agent Skills workflow: the `st-execute-blueprint` skill runs the phases, archives the plan automatically on completion, and you can inspect plan and task files directly under `.ai/strikethroo/plans/` (completed plans move to `.ai/strikethroo/archive/`).
90
+ ## Quick Start
91
+
92
+ ```bash
93
+ # 1. Bootstrap the shared workspace
94
+ npx strikethroo init --harnesses claude
95
+
96
+ # 2. Install the workflow skills
97
+ npx skills add e0ipso/strikethroo
98
+ ```
99
+
100
+ Requires Node.js 22+ and an assistant that supports the Agent Skills format.
101
+
102
+ ## In your coding assistant
103
+
104
+ ```mermaid
105
+ flowchart LR
106
+ A[Work Order] --> B[Plan]
107
+ B --> C{Review}
108
+ C -->|Edit| B
109
+ C -->|Approve| D[Tasks]
110
+ D --> E{Verify}
111
+ E --> G[Execute]
112
+ G --> H{Review}
113
+ H -->|Edit| G
114
+ H -->|Approve| J[Done]
115
+ ```
116
+
117
+ Three steps, each delivered as an Agent Skill that loads when you describe what you need:
118
+
119
+ | Step | Skill | Output |
120
+ |-------------|---------------------------------|---------------------------------------------------|
121
+ | **Plan** | `/st-create-plan <your prompt>` | `.ai/strikethroo/plans/64--auth/plan-64--auth.md` |
122
+ | **Tasks** | `/st-generate-tasks 64` | `.ai/strikethroo/plans/64--auth/tasks/*.md` |
123
+ | **Execute** | `/st-execute-blueprint 64` | Working code, one commit per phase |
124
+
125
+ Human review gates between steps catch scope creep before any code is written. Each step runs with clean context -- the planning agent sees only the work order, the task agent sees only the approved plan, and each execution sub-agent receives only its specific task.
126
+
127
+ See the [Workflow Guide](https://mateuaguilo.com/strikethroo/workflow.html) for the full step-by-step with advanced patterns. Once a plan exists, visualize its plans, tasks, and dependency graph in [Visualizations](https://mateuaguilo.com/strikethroo/visualizations.html).
128
+
129
+ ## Visualize the data
130
+ Strikethroo comes with an optional **web application** to help you visualize your plans, tasks, and progress. No installation necessary, just execute the following command in a project using Strikethroo:
131
+
132
+ ```shell
133
+ npx strikethroo serve
134
+ ```
86
135
 
87
- ## 🤖 Supported Harnesses
136
+ This will open a web page that will help you navigate your plans and their tasks, present or archived.
88
137
 
89
- | Harness | Interface | Setup Time |
90
- |-----------|-----------|------------|
91
- | 🎭 **Claude** | [claude.ai/code](https://claude.ai/code) | < 30 seconds |
92
- | 🖱️ **Cursor** | Cursor IDE | < 30 seconds |
93
- | 💎 **Gemini** | Gemini CLI | < 30 seconds |
94
- | 📝 **Open Code** | Open source | < 30 seconds |
95
- | 🔮 **Codex** | Codex CLI | < 30 seconds |
96
- | 🐙 **GitHub Copilot** | VS Code / JetBrains IDEs | < 30 seconds |
138
+ | Plans board | Plan detail page | Archive |
139
+ |-------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|
140
+ | [![img](docs/assets/plans-board.png)](docs/assets/plans-board.png) | [![img](docs/assets/plan-detail-graph.png)](docs/assets/plan-detail-graph.png) | [![img](docs/assets/archive-all.png)](docs/assets/archive-all.png) |
97
141
 
98
- ## 📄 License
142
+ ## Documentation
99
143
 
100
- MIT License - Open source and free to use.
144
+ - [Workflow Guide](https://mateuaguilo.com/strikethroo/workflow.html) -- Step-by-step workflow with visual guides
145
+ - [Customization Guide](https://mateuaguilo.com/strikethroo/customization.html) -- Hooks, templates, and project context
146
+ - [Reference](https://mateuaguilo.com/strikethroo/reference.html) -- Glossary and CLI reference
147
+ - [FAQ](https://mateuaguilo.com/strikethroo/faq.html) -- Answers to common questions
148
+ - [Visualizations](https://mateuaguilo.com/strikethroo/visualizations.html) -- See plans, tasks, and the dependency graph
149
+ - [Migrating from 1.x](https://mateuaguilo.com/strikethroo/migration.html) -- Upgrade from slash commands to Agent Skills
@@ -25,7 +25,8 @@ export declare const SELF_REVIEW_URL = "https://github.com/e0ipso/self-review";
25
25
  * A presence check, matching the literal "binary is in path" contract: each
26
26
  * `PATH` entry is probed for a regular file named `self-review` (plus the
27
27
  * `PATHEXT` variants on Windows). It deliberately does not execute the binary,
28
- * so it cannot hang and has no side effects.
28
+ * so it cannot hang and has no side effects. The result is cached in-memory
29
+ * keyed by the relevant environment inputs.
29
30
  */
30
31
  export declare const isSelfReviewAvailable: (env?: Record<string, string | undefined>) => boolean;
31
32
  /** Outcome of resolving and launching a self-review request. */
@@ -1 +1 @@
1
- {"version":3,"file":"self-review.d.ts","sourceRoot":"","sources":["../../src/serve/self-review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAEhD,iFAAiF;AACjF,eAAO,MAAM,eAAe,0CAA0C,CAAC;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,MAAK,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,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AAE;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACnD;AAED,oEAAoE;AACpE,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC3D;AAWD;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,EACZ,YAAY,MAAM,KACjB;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CA4BvD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,EACZ,YAAY,MAAM,EAClB,OAAM,UAAe,KACpB,YAwBF,CAAC"}
@@ -58,21 +58,19 @@ const child_process_1 = require("child_process");
58
58
  exports.SELF_REVIEW_BINARY = 'self-review';
59
59
  /** Where to obtain self-review; surfaced by the SPA when it is not installed. */
60
60
  exports.SELF_REVIEW_URL = 'https://github.com/e0ipso/self-review';
61
- /**
62
- * Returns `true` when the `self-review` binary is found on the process `PATH`.
63
- *
64
- * A presence check, matching the literal "binary is in path" contract: each
65
- * `PATH` entry is probed for a regular file named `self-review` (plus the
66
- * `PATHEXT` variants on Windows). It deliberately does not execute the binary,
67
- * so it cannot hang and has no side effects.
68
- */
69
- const isSelfReviewAvailable = (env = process.env) => {
61
+ /** Cache key derived from the environment inputs that affect the PATH scan. */
62
+ const availabilityCacheKey = (env) => {
63
+ const pathVar = env.PATH ?? env.Path ?? '';
64
+ const pathext = process.platform === 'win32' ? (env.PATHEXT ?? '') : '';
65
+ return `${process.platform}:${pathVar}:${pathext}`;
66
+ };
67
+ /** In-memory cache so repeated `/api/capabilities` calls avoid re-scanning PATH. */
68
+ const availabilityCache = new Map();
69
+ const computeSelfReviewAvailable = (env, platform) => {
70
70
  const pathVar = env.PATH ?? env.Path ?? '';
71
71
  if (!pathVar)
72
72
  return false;
73
- const exts = process.platform === 'win32'
74
- ? (env.PATHEXT ?? '.EXE;.CMD;.BAT;.COM').split(';').filter(Boolean)
75
- : [''];
73
+ const exts = platform === 'win32' ? (env.PATHEXT ?? '.EXE;.CMD;.BAT;.COM').split(';').filter(Boolean) : [''];
76
74
  for (const dir of pathVar.split(path.delimiter).filter(Boolean)) {
77
75
  for (const ext of exts) {
78
76
  const candidate = path.join(dir, exports.SELF_REVIEW_BINARY + ext);
@@ -87,6 +85,24 @@ const isSelfReviewAvailable = (env = process.env) => {
87
85
  }
88
86
  return false;
89
87
  };
88
+ /**
89
+ * Returns `true` when the `self-review` binary is found on the process `PATH`.
90
+ *
91
+ * A presence check, matching the literal "binary is in path" contract: each
92
+ * `PATH` entry is probed for a regular file named `self-review` (plus the
93
+ * `PATHEXT` variants on Windows). It deliberately does not execute the binary,
94
+ * so it cannot hang and has no side effects. The result is cached in-memory
95
+ * keyed by the relevant environment inputs.
96
+ */
97
+ const isSelfReviewAvailable = (env = process.env) => {
98
+ const key = availabilityCacheKey(env);
99
+ const cached = availabilityCache.get(key);
100
+ if (cached !== undefined)
101
+ return cached;
102
+ const result = computeSelfReviewAvailable(env, process.platform);
103
+ availabilityCache.set(key, result);
104
+ return result;
105
+ };
90
106
  exports.isSelfReviewAvailable = isSelfReviewAvailable;
91
107
  /** Spawns the binary detached and unref'd so it outlives the request. */
92
108
  const spawnDetached = (command, args) => {
@@ -1 +1 @@
1
- {"version":3,"file":"self-review.js","sourceRoot":"","sources":["../../src/serve/self-review.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,iDAAsC;AAEtC,qDAAqD;AACxC,QAAA,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AE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC;AAC7C,CAAC,CAAC;AA5BW,QAAA,gBAAgB,oBA4B3B"}
@@ -1 +1 @@
1
- import{bk as ln,aN as an,H as k,b7 as w,F as N,ag as un,V as g,bc as tn,b8 as C,aH as _,c as rn,m as o,aF as on,j as sn,d as fn}from"./mermaid.core-CK5fxgQo.js";function cn(l){return l.innerRadius}function gn(l){return l.outerRadius}function yn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,j,F,v,A,O,a){var q=j-l,i=F-h,n=O-v,d=a-A,u=d*q-n*i;if(!(u*u<g))return u=(n*(h-A)-d*(l-v))/u,[l+u*q,h+u*i]}function Q(l,h,j,F,v,A,O){var a=l-j,q=h-F,i=(O?A:-A)/C(a*a+q*q),n=i*q,d=-i*a,u=l+n,s=h+d,f=j+n,c=F+d,S=(u+f)/2,t=(s+c)/2,m=f-u,y=c-s,R=m*m+y*y,T=v-A,P=u*c-f*s,D=(y<0?-1:1)*C(on(0,T*T*R-P*P)),E=(P*y-m*D)/R,I=(-P*m-y*D)/R,b=(P*y+m*D)/R,p=(-P*m+y*D)/R,x=E-S,e=I-t,r=b-S,V=p-t;return x*x+e*e>r*r+V*V&&(E=b,I=p),{cx:E,cy:I,x01:-n,y01:-d,x11:E*(v/T-1),y11:I*(v/T-1)}}function hn(){var l=cn,h=gn,j=N(0),F=null,v=yn,A=dn,O=mn,a=null,q=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,S=rn(c-f),t=c>f;if(a||(a=n=q()),s<u&&(d=s,s=u,u=d),!(s>g))a.moveTo(0,0);else if(S>tn-g)a.moveTo(s*k(f),s*w(f)),a.arc(0,0,s,f,c,!t),u>g&&(a.moveTo(u*k(c),u*w(c)),a.arc(0,0,u,c,f,t));else{var m=f,y=c,R=f,T=c,P=S,D=S,E=O.apply(this,arguments)/2,I=E>g&&(F?+F.apply(this,arguments):C(u*u+s*s)),b=_(rn(s-u)/2,+j.apply(this,arguments)),p=b,x=b,e,r;if(I>g){var V=sn(I/u*w(E)),G=sn(I/s*w(E));(P-=V*2)>g?(V*=t?1:-1,R+=V,T-=V):(P=0,R=T=(f+c)/2),(D-=G*2)>g?(G*=t?1:-1,m+=G,y-=G):(D=0,m=y=(f+c)/2)}var z=s*k(m),B=s*w(m),J=u*k(T),K=u*w(T);if(b>g){var L=s*k(y),M=s*w(y),U=u*k(R),W=u*w(R),H;if(S<an)if(H=pn(z,B,U,W,L,M,J,K)){var X=z-H[0],Y=B-H[1],Z=L-H[0],$=M-H[1],nn=1/w(fn((X*Z+Y*$)/(C(X*X+Y*Y)*C(Z*Z+$*$)))/2),en=C(H[0]*H[0]+H[1]*H[1]);p=_(b,(u-en)/(nn-1)),x=_(b,(s-en)/(nn+1))}else p=x=0}D>g?x>g?(e=Q(U,W,z,B,s,x,t),r=Q(L,M,J,K,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<b?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(z,B),a.arc(0,0,s,m,y,!t)):a.moveTo(z,B),!(u>g)||!(P>g)?a.lineTo(J,K):p>g?(e=Q(J,K,L,M,u,-p,t),r=Q(z,B,U,W,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<b?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[k(d)*n,w(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:N(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:N(+n),i):h},i.cornerRadius=function(n){return arguments.length?(j=typeof n=="function"?n:N(+n),i):j},i.padRadius=function(n){return arguments.length?(F=n==null?null:typeof n=="function"?n:N(+n),i):F},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:N(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:N(+n),i):A},i.padAngle=function(n){return arguments.length?(O=typeof n=="function"?n:N(+n),i):O},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{bk as ln,aN as an,H as k,b7 as w,F as N,ag as un,V as g,bc as tn,b8 as C,aH as _,c as rn,m as o,aF as on,j as sn,d as fn}from"./mermaid.core-C0ywvB_J.js";function cn(l){return l.innerRadius}function gn(l){return l.outerRadius}function yn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,j,F,v,A,O,a){var q=j-l,i=F-h,n=O-v,d=a-A,u=d*q-n*i;if(!(u*u<g))return u=(n*(h-A)-d*(l-v))/u,[l+u*q,h+u*i]}function Q(l,h,j,F,v,A,O){var a=l-j,q=h-F,i=(O?A:-A)/C(a*a+q*q),n=i*q,d=-i*a,u=l+n,s=h+d,f=j+n,c=F+d,S=(u+f)/2,t=(s+c)/2,m=f-u,y=c-s,R=m*m+y*y,T=v-A,P=u*c-f*s,D=(y<0?-1:1)*C(on(0,T*T*R-P*P)),E=(P*y-m*D)/R,I=(-P*m-y*D)/R,b=(P*y+m*D)/R,p=(-P*m+y*D)/R,x=E-S,e=I-t,r=b-S,V=p-t;return x*x+e*e>r*r+V*V&&(E=b,I=p),{cx:E,cy:I,x01:-n,y01:-d,x11:E*(v/T-1),y11:I*(v/T-1)}}function hn(){var l=cn,h=gn,j=N(0),F=null,v=yn,A=dn,O=mn,a=null,q=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,S=rn(c-f),t=c>f;if(a||(a=n=q()),s<u&&(d=s,s=u,u=d),!(s>g))a.moveTo(0,0);else if(S>tn-g)a.moveTo(s*k(f),s*w(f)),a.arc(0,0,s,f,c,!t),u>g&&(a.moveTo(u*k(c),u*w(c)),a.arc(0,0,u,c,f,t));else{var m=f,y=c,R=f,T=c,P=S,D=S,E=O.apply(this,arguments)/2,I=E>g&&(F?+F.apply(this,arguments):C(u*u+s*s)),b=_(rn(s-u)/2,+j.apply(this,arguments)),p=b,x=b,e,r;if(I>g){var V=sn(I/u*w(E)),G=sn(I/s*w(E));(P-=V*2)>g?(V*=t?1:-1,R+=V,T-=V):(P=0,R=T=(f+c)/2),(D-=G*2)>g?(G*=t?1:-1,m+=G,y-=G):(D=0,m=y=(f+c)/2)}var z=s*k(m),B=s*w(m),J=u*k(T),K=u*w(T);if(b>g){var L=s*k(y),M=s*w(y),U=u*k(R),W=u*w(R),H;if(S<an)if(H=pn(z,B,U,W,L,M,J,K)){var X=z-H[0],Y=B-H[1],Z=L-H[0],$=M-H[1],nn=1/w(fn((X*Z+Y*$)/(C(X*X+Y*Y)*C(Z*Z+$*$)))/2),en=C(H[0]*H[0]+H[1]*H[1]);p=_(b,(u-en)/(nn-1)),x=_(b,(s-en)/(nn+1))}else p=x=0}D>g?x>g?(e=Q(U,W,z,B,s,x,t),r=Q(L,M,J,K,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<b?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(z,B),a.arc(0,0,s,m,y,!t)):a.moveTo(z,B),!(u>g)||!(P>g)?a.lineTo(J,K):p>g?(e=Q(J,K,L,M,u,-p,t),r=Q(z,B,U,W,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<b?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[k(d)*n,w(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:N(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:N(+n),i):h},i.cornerRadius=function(n){return arguments.length?(j=typeof n=="function"?n:N(+n),i):j},i.padRadius=function(n){return arguments.length?(F=n==null?null:typeof n=="function"?n:N(+n),i):F},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:N(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:N(+n),i):A},i.padAngle=function(n){return arguments.length?(O=typeof n=="function"?n:N(+n),i):O},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};