openwolf 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/LICENSE +663 -0
  2. package/README.md +232 -0
  3. package/dist/bin/openwolf.js +10 -0
  4. package/dist/bin/openwolf.js.map +1 -0
  5. package/dist/dashboard/assets/AISuggestions-DzE-DQkR.js +1 -0
  6. package/dist/dashboard/assets/ActivityTimeline-DGVjujnt.js +1 -0
  7. package/dist/dashboard/assets/AnatomyBrowser-S-2rmYtw.js +1 -0
  8. package/dist/dashboard/assets/BugLog-CG2zDHJc.js +1 -0
  9. package/dist/dashboard/assets/CerebrumViewer-Dlgoy69U.js +1 -0
  10. package/dist/dashboard/assets/CronStatus-DxUF1iW_.js +1 -0
  11. package/dist/dashboard/assets/DesignQC-BGXn_aq8.js +1 -0
  12. package/dist/dashboard/assets/MemoryViewer-CGqkTyvQ.js +1 -0
  13. package/dist/dashboard/assets/ProjectOverview-DlFhu69i.js +1 -0
  14. package/dist/dashboard/assets/TokenUsage-DDsQiVIq.js +68 -0
  15. package/dist/dashboard/assets/index-CzK9GUjV.css +1 -0
  16. package/dist/dashboard/assets/index-PYeNGjkN.js +52 -0
  17. package/dist/dashboard/index.html +16 -0
  18. package/dist/hooks/post-read.js +68 -0
  19. package/dist/hooks/post-write.js +502 -0
  20. package/dist/hooks/pre-read.js +79 -0
  21. package/dist/hooks/pre-write.js +120 -0
  22. package/dist/hooks/session-start.js +76 -0
  23. package/dist/hooks/shared.js +613 -0
  24. package/dist/hooks/stop.js +146 -0
  25. package/dist/src/buglog/bug-matcher.js +3 -0
  26. package/dist/src/buglog/bug-matcher.js.map +1 -0
  27. package/dist/src/buglog/bug-tracker.js +81 -0
  28. package/dist/src/buglog/bug-tracker.js.map +1 -0
  29. package/dist/src/cli/bug-cmd.js +28 -0
  30. package/dist/src/cli/bug-cmd.js.map +1 -0
  31. package/dist/src/cli/cron-cmd.js +106 -0
  32. package/dist/src/cli/cron-cmd.js.map +1 -0
  33. package/dist/src/cli/daemon-cmd.js +177 -0
  34. package/dist/src/cli/daemon-cmd.js.map +1 -0
  35. package/dist/src/cli/dashboard.js +84 -0
  36. package/dist/src/cli/dashboard.js.map +1 -0
  37. package/dist/src/cli/designqc-cmd.js +31 -0
  38. package/dist/src/cli/designqc-cmd.js.map +1 -0
  39. package/dist/src/cli/index.js +149 -0
  40. package/dist/src/cli/index.js.map +1 -0
  41. package/dist/src/cli/init.js +506 -0
  42. package/dist/src/cli/init.js.map +1 -0
  43. package/dist/src/cli/registry.js +93 -0
  44. package/dist/src/cli/registry.js.map +1 -0
  45. package/dist/src/cli/scan.js +39 -0
  46. package/dist/src/cli/scan.js.map +1 -0
  47. package/dist/src/cli/status.js +85 -0
  48. package/dist/src/cli/status.js.map +1 -0
  49. package/dist/src/cli/update.js +414 -0
  50. package/dist/src/cli/update.js.map +1 -0
  51. package/dist/src/daemon/cron-engine.js +300 -0
  52. package/dist/src/daemon/cron-engine.js.map +1 -0
  53. package/dist/src/daemon/file-watcher.js +53 -0
  54. package/dist/src/daemon/file-watcher.js.map +1 -0
  55. package/dist/src/daemon/health.js +23 -0
  56. package/dist/src/daemon/health.js.map +1 -0
  57. package/dist/src/daemon/wolf-daemon.js +294 -0
  58. package/dist/src/daemon/wolf-daemon.js.map +1 -0
  59. package/dist/src/designqc/designqc-capture.js +235 -0
  60. package/dist/src/designqc/designqc-capture.js.map +1 -0
  61. package/dist/src/designqc/designqc-engine.js +141 -0
  62. package/dist/src/designqc/designqc-engine.js.map +1 -0
  63. package/dist/src/designqc/designqc-types.js +5 -0
  64. package/dist/src/designqc/designqc-types.js.map +1 -0
  65. package/dist/src/hooks/post-read.js +69 -0
  66. package/dist/src/hooks/post-read.js.map +1 -0
  67. package/dist/src/hooks/post-write.js +503 -0
  68. package/dist/src/hooks/post-write.js.map +1 -0
  69. package/dist/src/hooks/pre-read.js +80 -0
  70. package/dist/src/hooks/pre-read.js.map +1 -0
  71. package/dist/src/hooks/pre-write.js +121 -0
  72. package/dist/src/hooks/pre-write.js.map +1 -0
  73. package/dist/src/hooks/session-start.js +77 -0
  74. package/dist/src/hooks/session-start.js.map +1 -0
  75. package/dist/src/hooks/shared.js +614 -0
  76. package/dist/src/hooks/shared.js.map +1 -0
  77. package/dist/src/hooks/stop.js +147 -0
  78. package/dist/src/hooks/stop.js.map +1 -0
  79. package/dist/src/scanner/anatomy-scanner.js +260 -0
  80. package/dist/src/scanner/anatomy-scanner.js.map +1 -0
  81. package/dist/src/scanner/description-extractor.js +1007 -0
  82. package/dist/src/scanner/description-extractor.js.map +1 -0
  83. package/dist/src/scanner/project-root.js +42 -0
  84. package/dist/src/scanner/project-root.js.map +1 -0
  85. package/dist/src/tracker/token-estimator.js +20 -0
  86. package/dist/src/tracker/token-estimator.js.map +1 -0
  87. package/dist/src/tracker/token-ledger.js +45 -0
  88. package/dist/src/tracker/token-ledger.js.map +1 -0
  89. package/dist/src/tracker/waste-detector.js +101 -0
  90. package/dist/src/tracker/waste-detector.js.map +1 -0
  91. package/dist/src/utils/fs-safe.js +74 -0
  92. package/dist/src/utils/fs-safe.js.map +1 -0
  93. package/dist/src/utils/logger.js +48 -0
  94. package/dist/src/utils/logger.js.map +1 -0
  95. package/dist/src/utils/paths.js +23 -0
  96. package/dist/src/utils/paths.js.map +1 -0
  97. package/dist/src/utils/platform.js +14 -0
  98. package/dist/src/utils/platform.js.map +1 -0
  99. package/package.json +77 -0
  100. package/src/templates/OPENWOLF.md +135 -0
  101. package/src/templates/anatomy.md +5 -0
  102. package/src/templates/buglog.json +4 -0
  103. package/src/templates/cerebrum.md +22 -0
  104. package/src/templates/claude-md-snippet.md +5 -0
  105. package/src/templates/claude-rules-openwolf.md +15 -0
  106. package/src/templates/config.json +73 -0
  107. package/src/templates/cron-manifest.json +97 -0
  108. package/src/templates/cron-state.json +7 -0
  109. package/src/templates/identity.md +9 -0
  110. package/src/templates/memory.md +4 -0
  111. package/src/templates/reframe-frameworks.md +597 -0
  112. package/src/templates/token-ledger.json +21 -0
package/README.md ADDED
@@ -0,0 +1,232 @@
1
+ [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](LICENSE)
2
+ [![Node.js](https://img.shields.io/badge/Node.js-20%2B-green.svg)](https://nodejs.org)
3
+
4
+ # OpenWolf
5
+
6
+ **Persistent memory, token tracking, and context management for Claude Code.**
7
+ _Your Claude subscription shouldn't empty itself in a week._
8
+
9
+ ## The Problem
10
+
11
+ Claude Code reads the same file three times in one session and doesn't notice. It forgets the correction you gave it yesterday. It loads your entire codebase to find one function. When the session ends, everything it learned - your naming conventions, the bug it just fixed, the architecture decision you explained - vanishes. Next session, it starts from zero. And you have no idea where your tokens went.
12
+
13
+ ## What OpenWolf Does
14
+
15
+ OpenWolf is invisible middleware that hooks into Claude Code's lifecycle. It tracks every file read and write with token estimates. It maintains a learning file - `cerebrum.md` - that accumulates your preferences, corrections, and past mistakes across sessions. It keeps a project structure map - `anatomy.md` - so Claude navigates your codebase without scanning every file. All of this happens automatically through 6 hook scripts. You just type `claude` and work normally.
16
+
17
+ ## Real Numbers
18
+
19
+ ```
20
+ Tested across 20 projects on Windows 11 & Ubuntu 24.04.4 | 132+ sessions | Node v24.13
21
+
22
+ Average token reduction: 65.8%
23
+ Repeated reads caught: 71% of all read attempts (106/148 in one project)
24
+ ```
25
+
26
+ These are numbers from real projects, not benchmarks. Your results will vary by project size and usage patterns.
27
+
28
+ ## Quick Start
29
+
30
+ ```bash
31
+ npm install -g openwolf
32
+ cd your-project
33
+ openwolf init
34
+ ```
35
+
36
+ That's it. Use `claude` normally. OpenWolf is watching.
37
+
38
+ `openwolf init` creates a `.wolf/` directory:
39
+
40
+ ```
41
+ .wolf/
42
+ ├── OPENWOLF.md Instructions Claude follows every session
43
+ ├── cerebrum.md Learns your preferences, remembers corrections
44
+ ├── memory.md Logs every action with token estimates
45
+ ├── anatomy.md Project file map - AI navigates without scanning
46
+ ├── identity.md Agent persona for this project
47
+ ├── buglog.json Remembers how bugs were fixed
48
+ ├── token-ledger.json Tracks every token spent
49
+ ├── config.json OpenWolf configuration
50
+ ├── cron-manifest.json Scheduled task definitions
51
+ ├── cron-state.json Task execution history
52
+ ├── reframe-frameworks.md UI framework selection guide (12 frameworks)
53
+ └── hooks/ Claude Code lifecycle hooks (6 scripts)
54
+ ```
55
+
56
+ ## How It Works
57
+
58
+ When you ask Claude to read a file, OpenWolf checks if it was already read this session. If yes, it warns Claude. When Claude writes code, OpenWolf checks your `cerebrum.md` for known mistakes. After every write, it auto-updates the project map. When the session ends, it logs everything to the token ledger. You see none of this. It just happens.
59
+
60
+ ```
61
+ You type a message
62
+
63
+ Claude decides to read a file
64
+
65
+ OpenWolf: "anatomy.md says this file is ~380 tokens. Description: Main entry point."
66
+
67
+ Claude reads the file
68
+
69
+ OpenWolf: logs the read, estimates tokens, checks for repeated reads
70
+
71
+ Claude writes code
72
+
73
+ OpenWolf: checks cerebrum.md - no known mistakes matched
74
+
75
+ Claude finishes
76
+
77
+ OpenWolf: updates anatomy.md, appends to memory.md, updates token ledger
78
+ ```
79
+
80
+ ## The .wolf/ Files
81
+
82
+ <details>
83
+ <summary><strong>cerebrum.md</strong> - the learning memory</summary>
84
+
85
+ This is the "wow" feature. Claude updates this file when you correct it, express a preference, or make a decision. The Do-Not-Repeat list prevents the same mistake across sessions.
86
+
87
+ ```markdown
88
+ ## Do-Not-Repeat
89
+
90
+ - 2026-03-10: Never use `var` - always `const` or `let`
91
+ - 2026-03-11: Don't mock the database in integration tests - use the real connection
92
+ - 2026-03-14: The auth middleware reads from `cfg.talk`, not `cfg.tts` - got burned twice
93
+
94
+ ## User Preferences
95
+
96
+ - Prefers functional components over class components
97
+ - Always use named exports, never default exports
98
+ - Tests go in `__tests__/` next to the source file
99
+
100
+ ## Key Learnings
101
+
102
+ - This project uses pnpm workspaces with strict hoisting
103
+ - The gateway WebSocket server runs on port 18789
104
+ - `tsdown` dead-code-eliminates process.env.NODE_ENV at build time
105
+ ```
106
+
107
+ </details>
108
+
109
+ <details>
110
+ <summary><strong>anatomy.md</strong> - the project map</summary>
111
+
112
+ Every file gets a description and token estimate. Claude reads this instead of opening files when the summary is enough.
113
+
114
+ ```markdown
115
+ ## src/
116
+
117
+ - `index.ts` - Main entry point. Exports createProgram() for CLI. (~180 tok)
118
+ - `server.ts` - Express HTTP server with middleware chain. (~520 tok)
119
+
120
+ ## src/api/
121
+
122
+ - `auth.ts` - JWT validation middleware. Reads from env.JWT_SECRET. (~340 tok)
123
+ - `users.ts` - CRUD endpoints for /api/users. Pagination via query params. (~890 tok)
124
+ ```
125
+
126
+ </details>
127
+
128
+ <details>
129
+ <summary><strong>token-ledger.json</strong> - the receipt</summary>
130
+
131
+ Every session gets a line item. Lifetime totals tell you if OpenWolf is actually saving tokens.
132
+
133
+ ```json
134
+ {
135
+ "lifetime": {
136
+ "total_tokens_estimated": 142800,
137
+ "total_reads": 287,
138
+ "total_writes": 94,
139
+ "total_sessions": 44,
140
+ "anatomy_hits": 198,
141
+ "anatomy_misses": 89,
142
+ "repeated_reads_blocked": 106,
143
+ "estimated_savings_vs_bare_cli": 34200
144
+ }
145
+ }
146
+ ```
147
+
148
+ </details>
149
+
150
+ <details>
151
+ <summary><strong>buglog.json</strong> - the bug memory</summary>
152
+
153
+ Before fixing anything, Claude checks if the fix is already known. After fixing, it logs the solution.
154
+
155
+ ```json
156
+ {
157
+ "id": "bug-012",
158
+ "error_message": "TypeError: Cannot read properties of undefined (reading 'map')",
159
+ "file": "src/components/UserList.tsx",
160
+ "root_cause": "API response was null when users array was expected",
161
+ "fix": "Added optional chaining: data?.users?.map() and fallback empty array",
162
+ "tags": ["null-check", "api-response", "react"]
163
+ }
164
+ ```
165
+
166
+ </details>
167
+
168
+ ## Commands
169
+
170
+ ```
171
+ openwolf init Initialize .wolf/ and register hooks
172
+ openwolf status Show health, stats, file integrity
173
+ openwolf scan Refresh the project structure map
174
+ openwolf scan --check Verify anatomy matches filesystem (exits 1 if stale)
175
+ openwolf dashboard Open the real-time web dashboard
176
+ openwolf daemon start Start background task scheduler via PM2
177
+ openwolf daemon stop Stop the scheduler
178
+ openwolf daemon restart Restart the scheduler
179
+ openwolf daemon logs View scheduler logs
180
+ openwolf cron list Show all scheduled tasks
181
+ openwolf cron run <id> Trigger a task manually
182
+ openwolf cron retry <id> Retry a dead-lettered task
183
+ openwolf designqc Capture full-page screenshots for design evaluation
184
+ openwolf bug search <term> Search bug memory for known fixes
185
+ openwolf update Update all registered projects to latest version
186
+ openwolf restore [backup] Restore .wolf/ from a timestamped backup
187
+ ```
188
+
189
+ ## Design QC
190
+
191
+ Capture full-page screenshots of your running app and let Claude evaluate the design - no separate API key needed.
192
+
193
+ ```bash
194
+ openwolf designqc
195
+ ```
196
+
197
+ OpenWolf auto-detects your dev server (or starts one from `package.json`), captures viewport-height JPEG sections of every route, and saves them to `.wolf/designqc-captures/`. Then tell Claude to read the screenshots and evaluate. Requires `puppeteer-core` (`npm install puppeteer-core`).
198
+
199
+ ## Reframe
200
+
201
+ Ask Claude to help you pick a UI framework. OpenWolf ships a curated knowledge base of 12 frameworks (shadcn/ui, Aceternity, Magic UI, DaisyUI, HeroUI, Chakra, Flowbite, Preline, Park UI, Origin UI, Headless UI, Cult UI) with battle-tested migration prompts. No CLI command needed - Claude reads `.wolf/reframe-frameworks.md`, asks you a few questions, and executes the migration with the right prompt for your project.
202
+
203
+ ## How OpenWolf Compares
204
+
205
+ OpenWolf is a `.wolf/` directory with 6 hook scripts and a learning protocol. It doesn't run your AI for you. It doesn't replace your workflow. It gives Claude Code two things it doesn't have: a memory that survives between sessions, and a budget you can see. If you want an AI operating system, look elsewhere. If you want your AI assistant to stop re-reading the same file four times and forgetting what you told it yesterday, this is that.
206
+
207
+ ## Requirements
208
+
209
+ - Node.js 20+
210
+ - Claude Code CLI
211
+ - Windows, macOS, or Linux
212
+ - Optional: PM2 for persistent background tasks
213
+ - Optional: `puppeteer-core` for Design QC screenshots
214
+
215
+ ## Limitations
216
+
217
+ - Claude Code hooks are a relatively new feature. `PreToolUse`/`PostToolUse` have had reliability issues in some Claude Code versions. OpenWolf falls back to `CLAUDE.md` instructions when hooks don't fire.
218
+ - Token tracking is estimation-based (character-to-token ratio), not exact API counts. Accurate to within ~15%.
219
+ - `cerebrum.md` depends on the AI following instructions to update it after corrections. Compliance is ~85-90%, not 100%.
220
+ - This is v1.0.0. Things may break. [File issues](https://github.com/cytostack/openwolf/issues).
221
+
222
+ ## Origin Story
223
+
224
+ I burned through my entire Claude Max subscription in a week. Claude Code was draining tokens with zero visibility into where they went. I built OpenWolf because I needed to see the fire before the house burned down.
225
+
226
+ ## License
227
+
228
+ [AGPL-3.0](LICENSE)
229
+
230
+ ## Author
231
+
232
+ Built by Farhan Palathinkal Afsal - [Cytostack](https://github.com/cytostack)
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ const major = parseInt(process.versions.node.split(".")[0], 10);
3
+ if (major < 20) {
4
+ console.error(`OpenWolf requires Node.js 20 or higher. You are running ${process.version}.`);
5
+ process.exit(1);
6
+ }
7
+ import { createProgram } from "../src/cli/index.js";
8
+ const program = createProgram();
9
+ program.parse(process.argv);
10
+ //# sourceMappingURL=openwolf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openwolf.js","sourceRoot":"","sources":["../../bin/openwolf.ts"],"names":[],"mappings":";AAEA,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAChE,IAAI,KAAK,GAAG,EAAE,EAAE,CAAC;IACf,OAAO,CAAC,KAAK,CAAC,2DAA2D,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC;IAC7F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;AAChC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ import{j as e,b as x}from"./index-PYeNGjkN.js";const m=[{key:"achievements",title:"Achievements",icon:"🏆",color:"#059669"},{key:"improvements",title:"Improvements",icon:"✨",color:"#3b82f6"},{key:"next_tasks",title:"Next Tasks",icon:"📋",color:"#d97706"},{key:"risks",title:"Risks & Tech Debt",icon:"🛡",color:"#dc2626"}];function p({data:a}){const{suggestions:s,client:t}=a;return s?e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("span",{className:"text-sm",style:{color:"var(--text-faint)"},children:["Generated: ",s.generated_at?x(s.generated_at):"unknown"]}),e.jsx("button",{onClick:()=>t==null?void 0:t.send({type:"trigger_task",task_id:"project-suggestions"}),className:"px-3 py-1.5 text-xs rounded-lg transition-colors",style:{background:"var(--bg-surface-hover)",border:"1px solid var(--border-subtle)",color:"var(--text-secondary)"},children:"Regenerate"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:m.map(({key:n,title:c,icon:o,color:r})=>{const l=s[n]||[];return e.jsxs("div",{className:"rounded-xl p-5",style:{background:`${r}08`,border:`1px solid ${r}33`},children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("span",{className:"text-lg",children:o}),e.jsx("h3",{className:"font-medium",style:{color:r},children:c})]}),l.length===0?e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"None reported."}):e.jsx("ul",{className:"space-y-2",children:l.map((i,d)=>e.jsxs("li",{className:"text-sm flex items-start gap-2",style:{color:"var(--text-secondary)"},children:[e.jsx("span",{className:"mt-1 shrink-0",style:{color:"var(--text-faint)"},children:"•"}),e.jsx("span",{children:i})]},d))})]},n)})})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("div",{className:"text-4xl mb-3",children:"✦"}),e.jsx("h3",{className:"font-medium mb-1",style:{color:"var(--text-secondary)"},children:"AI suggestions generate weekly"}),e.jsxs("p",{className:"text-sm max-w-sm",style:{color:"var(--text-muted)"},children:["Run ",e.jsx("code",{style:{color:"var(--text-secondary)"},children:"openwolf cron run project-suggestions"})," to generate now."]})]})}export{p as AISuggestions};
@@ -0,0 +1 @@
1
+ import{r as n,j as t}from"./index-PYeNGjkN.js";function f({data:x}){const{memory:c}=x,[a,m]=n.useState("all"),[l,u]=n.useState(""),[i,p]=n.useState(!0),d=n.useMemo(()=>{let e=c;if(a==="today"){const r=new Date().toISOString().slice(0,10);e=e.filter(s=>s.date===r)}else if(a==="week"){const r=new Date(Date.now()-6048e5).toISOString().slice(0,10);e=e.filter(s=>s.date>=r)}if(l){const r=l.toLowerCase();e=e.map(s=>({...s,entries:s.entries.filter(o=>o.action.toLowerCase().includes(r)||o.files.toLowerCase().includes(r))})).filter(s=>s.entries.length>0)}return e},[c,a,l]);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[t.jsx("div",{className:"flex gap-1 rounded-lg p-1",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:["all","today","week"].map(e=>t.jsx("button",{onClick:()=>m(e),className:"px-3 py-1 text-xs rounded-md transition-colors",style:{background:a===e?"var(--bg-surface-hover)":"transparent",color:a===e?"var(--text-primary)":"var(--text-muted)"},children:e==="all"?"All":e==="today"?"Today":"This Week"},e))}),t.jsx("input",{type:"text",placeholder:"Search actions...",value:l,onChange:e=>u(e.target.value),className:"rounded-lg px-3 py-1.5 text-sm flex-1 min-w-[200px] focus:outline-none",style:{background:"var(--bg-surface)",border:"1px solid var(--border)",color:"var(--text-primary)"}}),t.jsx("button",{onClick:()=>p(!i),className:"px-3 py-1.5 text-xs rounded-lg",style:{background:"var(--bg-surface)",border:"1px solid var(--border)",color:"var(--text-muted)"},children:i?"Flat view":"Group by session"})]}),d.length===0?t.jsx("div",{className:"text-center py-12",style:{color:"var(--text-muted)"},children:"No activity found."}):i?d.map((e,r)=>t.jsxs("div",{className:"mb-4",children:[t.jsxs("div",{className:"text-sm font-medium mb-2",style:{color:"var(--text-muted)"},children:[e.date," ",e.time," — ",e.entries.length," actions"]}),t.jsx("div",{className:"rounded-xl",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:e.entries.map((s,o)=>t.jsxs("div",{className:"flex items-center gap-4 px-4 py-3",style:{borderBottom:o<e.entries.length-1?"1px solid var(--border)":"none"},children:[t.jsx("span",{className:"text-xs font-mono w-12 shrink-0",style:{color:"var(--text-faint)"},children:s.time}),t.jsx("span",{className:`w-2 h-2 rounded-full shrink-0 ${s.action.includes("Created")?"bg-emerald-500":s.action.includes("Edited")?"bg-blue-500":""}`,style:{background:!s.action.includes("Created")&&!s.action.includes("Edited")?"var(--text-faint)":void 0}}),t.jsx("span",{className:"text-sm flex-1",style:{color:"var(--text-secondary)"},children:s.action}),t.jsx("span",{className:"text-xs font-mono",style:{color:"var(--text-faint)"},children:s.tokens})]},o))})]},r)):t.jsx("div",{className:"rounded-xl",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:d.flatMap(e=>e.entries.map((r,s)=>t.jsxs("div",{className:"flex items-center gap-4 px-4 py-3",style:{borderBottom:"1px solid var(--border)"},children:[t.jsx("span",{className:"text-xs font-mono w-20 shrink-0",style:{color:"var(--text-faint)"},children:e.date}),t.jsx("span",{className:"text-xs font-mono w-12 shrink-0",style:{color:"var(--text-faint)"},children:r.time}),t.jsx("span",{className:"text-sm flex-1",style:{color:"var(--text-secondary)"},children:r.action}),t.jsx("span",{className:"text-xs font-mono",style:{color:"var(--text-faint)"},children:r.tokens})]},`${e.date}-${s}`)))})]})}export{f as ActivityTimeline};
@@ -0,0 +1 @@
1
+ import{j as t,f,d as g,r as x}from"./index-PYeNGjkN.js";function j({tokens:r,className:s}){const n=r<200?"text-emerald-400":r<1e3?"text-amber-400":"text-red-400";return t.jsxs("span",{className:g("font-mono text-xs",n,s),children:["~",f(r)," tok"]})}function v(r){const s={name:".",path:".",children:[],files:[]},n=new Map;n.set("./",s);for(const o of r){const c=o.section;if(!n.has(c)){const i=c.replace(/\/$/,"").split("/");let d=s,l="";for(const e of i){l=l?`${l}/${e}`:e;const a=`${l}/`;if(!n.has(a)){const m={name:e,path:a,children:[],files:[]};d.children.push(m),n.set(a,m)}d=n.get(a)}}n.get(c).files.push({file:o.file,description:o.description,tokens:o.tokens})}return s}function p({node:r,search:s,depth:n=0}){const[o,c]=x.useState(n<2),i=s.toLowerCase(),d=r.files.filter(e=>!s||e.file.toLowerCase().includes(i)||e.description.toLowerCase().includes(i)),l=r.children.some(e=>h(e,i));return s&&d.length===0&&!l?null:t.jsxs("div",{className:"ml-3",children:[r.name!=="."&&t.jsxs("button",{onClick:()=>c(!o),className:"flex items-center gap-1.5 py-1 text-sm transition-colors",style:{color:"var(--text-secondary)"},children:[t.jsx("span",{className:"w-4 text-center",style:{color:"var(--text-faint)"},children:o?"▼":"▶"}),t.jsx("span",{className:"text-amber-400",children:"📁"}),t.jsxs("span",{children:[r.name,"/"]}),t.jsxs("span",{className:"text-xs",style:{color:"var(--text-faint)"},children:[u(r)," files"]})]}),(o||r.name===".")&&t.jsxs("div",{className:r.name!=="."?"ml-4":"",children:[d.sort((e,a)=>e.file.localeCompare(a.file)).map(e=>t.jsxs("div",{className:"flex items-center gap-2 py-1 pl-5",children:[t.jsx("span",{style:{color:"var(--text-faint)"},children:"📄"}),t.jsx("span",{className:"text-sm font-mono",style:{color:"var(--text-primary)"},children:e.file}),e.description&&t.jsxs("span",{className:"text-xs truncate max-w-xs",style:{color:"var(--text-faint)"},children:["— ",e.description]}),t.jsx(j,{tokens:e.tokens,className:"ml-auto shrink-0"})]},e.file)),r.children.sort((e,a)=>e.name.localeCompare(a.name)).map(e=>t.jsx(p,{node:e,search:s,depth:n+1},e.path))]})]})}function u(r){return r.files.length+r.children.reduce((s,n)=>s+u(n),0)}function h(r,s){return r.files.some(n=>n.file.toLowerCase().includes(s)||n.description.toLowerCase().includes(s))?!0:r.children.some(n=>h(n,s))}function b({data:r}){const{anatomy:s}=r,[n,o]=x.useState(""),[c,i]=x.useState(!1),d=x.useMemo(()=>v(s.entries),[s.entries]),l=x.useMemo(()=>{const e=s.entries.map(a=>a.tokens);return{total:s.entries.length,avg:e.length>0?Math.round(e.reduce((a,m)=>a+m,0)/e.length):0,largest:e.length>0?Math.max(...e):0}},[s.entries]);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[t.jsx("input",{type:"text",placeholder:"Search files...",value:n,onChange:e=>o(e.target.value),className:"flex-1 min-w-[200px] rounded-lg px-3 py-2 text-sm focus:outline-none",style:{background:"var(--bg-surface)",border:"1px solid var(--border)",color:"var(--text-primary)"}}),t.jsx("button",{onClick:()=>i(!c),className:"px-3 py-2 text-xs rounded-lg",style:{background:"var(--bg-surface)",border:"1px solid var(--border)",color:"var(--text-muted)"},children:c?"Sort: Size":"Sort: A-Z"})]}),t.jsxs("div",{className:"flex gap-4 mb-4 text-sm",style:{color:"var(--text-muted)"},children:[t.jsxs("span",{children:[l.total," files tracked"]}),t.jsxs("span",{children:["Avg: ",l.avg," tok/file"]}),t.jsxs("span",{children:["Largest: ",l.largest," tok"]})]}),t.jsx("div",{className:"rounded-xl p-4",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:s.entries.length===0?t.jsxs("div",{className:"text-center py-12",style:{color:"var(--text-muted)"},children:[t.jsx("p",{className:"text-2xl mb-2",children:"📂"}),t.jsxs("p",{children:["No anatomy data. Run ",t.jsx("code",{style:{color:"var(--text-secondary)"},children:"openwolf scan"})," to index your project."]})]}):t.jsx(p,{node:d,search:n})})]})}export{b as AnatomyBrowser};
@@ -0,0 +1 @@
1
+ import{r as d,j as e}from"./index-PYeNGjkN.js";function g({data:i}){const{buglog:l}=i,[t,c]=d.useState(""),[u,m]=d.useState(null),p=t?l.bugs.filter(s=>s.error_message.toLowerCase().includes(t.toLowerCase())||s.root_cause.toLowerCase().includes(t.toLowerCase())||s.fix.toLowerCase().includes(t.toLowerCase())||s.tags.some(r=>r.toLowerCase().includes(t.toLowerCase()))):l.bugs;if(l.bugs.length===0)return e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("div",{className:"text-4xl mb-3",children:"🐛"}),e.jsx("h3",{className:"font-medium mb-1",style:{color:"var(--text-secondary)"},children:"No bugs logged yet"}),e.jsx("p",{className:"text-sm max-w-sm",style:{color:"var(--text-muted)"},children:"When you encounter and fix bugs, they'll appear here for future reference."})]});const v=l.bugs.flatMap(s=>s.tags),o=new Map;for(const s of v)o.set(s,(o.get(s)||0)+1);const n=[...o.entries()].sort((s,r)=>r[1]-s[1]).slice(0,5);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-4 mb-4",children:[e.jsx("input",{type:"text",placeholder:"Search bugs...",value:t,onChange:s=>c(s.target.value),className:"flex-1 min-w-[200px] rounded-lg px-3 py-2 text-sm focus:outline-none",style:{background:"var(--bg-surface)",border:"1px solid var(--border)",color:"var(--text-primary)"}}),e.jsxs("span",{className:"text-sm",style:{color:"var(--text-faint)"},children:[l.bugs.length," bugs logged"]})]}),n.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:n.map(([s,r])=>e.jsxs("button",{onClick:()=>c(s),className:"px-2 py-1 text-xs rounded-full",style:{background:"var(--bg-surface-hover)",border:"1px solid var(--border-subtle)",color:"var(--text-muted)"},children:[s," (",r,")"]},s))}),e.jsx("div",{className:"space-y-3",children:p.map(s=>{var x;const r=u===s.id;return e.jsxs("div",{className:"rounded-xl overflow-hidden",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsxs("button",{onClick:()=>m(r?null:s.id),className:"w-full flex items-start gap-3 px-5 py-3 transition-colors text-left",onMouseEnter:a=>a.currentTarget.style.background="var(--bg-surface-hover)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[e.jsx("span",{className:"text-sm mt-0.5",style:{color:"var(--text-faint)"},children:r?"▼":"▶"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm truncate",style:{color:"var(--text-primary)"},children:s.error_message}),e.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[e.jsx("span",{className:"text-xs",style:{color:"var(--text-faint)"},children:s.file}),e.jsx("span",{className:"text-xs",style:{color:"var(--text-faint)"},children:(x=s.timestamp)==null?void 0:x.slice(0,10)})]})]}),s.occurrences>1&&e.jsxs("span",{className:"shrink-0 px-2 py-0.5 rounded-full text-xs",style:{background:"var(--warning-subtle)",color:"var(--warning)"},children:["Seen ",s.occurrences,"x"]})]}),r&&e.jsxs("div",{className:"px-5 py-4 space-y-3",style:{borderTop:"1px solid var(--border)"},children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase mb-1",style:{color:"var(--text-faint)"},children:"Error Message"}),e.jsx("pre",{className:"text-sm rounded-lg p-3 overflow-x-auto font-mono",style:{color:"var(--danger)",background:"var(--danger-subtle)"},children:s.error_message})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase mb-1",style:{color:"var(--text-faint)"},children:"Root Cause"}),e.jsx("p",{className:"text-sm",style:{color:"var(--text-secondary)"},children:s.root_cause})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase mb-1",style:{color:"var(--text-faint)"},children:"Fix"}),e.jsx("pre",{className:"text-sm rounded-lg p-3 overflow-x-auto font-mono",style:{color:"var(--accent)",background:"var(--accent-subtle)"},children:s.fix})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:s.tags.map(a=>e.jsx("span",{className:"px-2 py-0.5 text-xs rounded-full",style:{background:"var(--bg-surface-hover)",border:"1px solid var(--border-subtle)",color:"var(--text-muted)"},children:a},a))})]})]},s.id)})})]})}export{g as BugLog};
@@ -0,0 +1 @@
1
+ import{r as o,j as e}from"./index-PYeNGjkN.js";function p({data:d}){const{cerebrum:r}=d,[c,i]=o.useState(""),[a,x]=o.useState({preferences:!0,learnings:!0,doNotRepeat:!0,decisions:!1}),n=s=>x(t=>({...t,[s]:!t[s]})),l=s=>!c||s.toLowerCase().includes(c.toLowerCase());return e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center justify-between mb-4",children:e.jsxs("div",{className:"text-sm",style:{color:"var(--text-faint)"},children:["Last updated: ",r.lastUpdated||"—"," ·",r.preferences.length+r.learnings.length+r.doNotRepeat.length+r.decisions.length," entries"]})}),e.jsx("input",{type:"text",placeholder:"Search cerebrum...",value:c,onChange:s=>i(s.target.value),className:"w-full rounded-lg px-3 py-2 text-sm mb-4 focus:outline-none",style:{background:"var(--bg-surface)",border:"1px solid var(--border)",color:"var(--text-primary)"}}),e.jsxs("div",{className:"rounded-xl mb-4 overflow-hidden",style:{background:"var(--danger-subtle)",border:"1px solid rgba(220, 38, 38, 0.2)"},children:[e.jsxs("button",{onClick:()=>n("doNotRepeat"),className:"w-full flex items-center justify-between px-5 py-3 transition-colors",onMouseEnter:s=>s.currentTarget.style.background="rgba(220, 38, 38, 0.08)",onMouseLeave:s=>s.currentTarget.style.background="transparent",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{style:{color:"var(--danger)"},children:"⊘"}),e.jsx("h3",{className:"font-medium",style:{color:"var(--danger)"},children:"Do-Not-Repeat"}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full",style:{background:"rgba(220, 38, 38, 0.1)",color:"var(--danger)"},children:r.doNotRepeat.length})]}),e.jsx("span",{className:"text-sm",style:{color:"var(--text-faint)"},children:a.doNotRepeat?"▼":"▶"})]}),a.doNotRepeat&&e.jsxs("div",{className:"px-5 pb-4 space-y-2",children:[r.doNotRepeat.filter(s=>l(s.text)).map((s,t)=>e.jsxs("div",{className:"rounded-lg p-3",style:{background:"rgba(220, 38, 38, 0.05)",border:"1px solid rgba(220, 38, 38, 0.1)"},children:[s.date&&e.jsxs("span",{className:"text-xs font-mono mr-2",style:{color:"rgba(220, 38, 38, 0.6)"},children:["[",s.date,"]"]}),e.jsx("span",{className:"text-sm",style:{color:"var(--text-secondary)"},children:s.text})]},t)),r.doNotRepeat.length===0&&e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"No entries yet."})]})]}),e.jsxs("div",{className:"rounded-xl mb-4 overflow-hidden",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsxs("button",{onClick:()=>n("preferences"),className:"w-full flex items-center justify-between px-5 py-3 transition-colors",onMouseEnter:s=>s.currentTarget.style.background="var(--bg-surface-hover)",onMouseLeave:s=>s.currentTarget.style.background="transparent",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-blue-400",children:"◈"}),e.jsx("h3",{className:"font-medium",style:{color:"var(--text-secondary)"},children:"User Preferences"}),e.jsx("span",{className:"text-xs",style:{color:"var(--text-faint)"},children:r.preferences.length})]}),e.jsx("span",{className:"text-sm",style:{color:"var(--text-faint)"},children:a.preferences?"▼":"▶"})]}),a.preferences&&e.jsxs("div",{className:"px-5 pb-4",children:[r.preferences.filter(l).map((s,t)=>e.jsxs("div",{className:"flex items-start gap-2 py-1.5",children:[e.jsx("span",{className:"mt-1",style:{color:"var(--text-faint)"},children:"•"}),e.jsx("span",{className:"text-sm",style:{color:"var(--text-secondary)"},children:s})]},t)),r.preferences.length===0&&e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"No preferences recorded yet."})]})]}),e.jsxs("div",{className:"rounded-xl mb-4 overflow-hidden",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsxs("button",{onClick:()=>n("learnings"),className:"w-full flex items-center justify-between px-5 py-3 transition-colors",onMouseEnter:s=>s.currentTarget.style.background="var(--bg-surface-hover)",onMouseLeave:s=>s.currentTarget.style.background="transparent",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{style:{color:"var(--accent)"},children:"◎"}),e.jsx("h3",{className:"font-medium",style:{color:"var(--text-secondary)"},children:"Key Learnings"}),e.jsx("span",{className:"text-xs",style:{color:"var(--text-faint)"},children:r.learnings.length})]}),e.jsx("span",{className:"text-sm",style:{color:"var(--text-faint)"},children:a.learnings?"▼":"▶"})]}),a.learnings&&e.jsxs("div",{className:"px-5 pb-4 space-y-2",children:[r.learnings.filter(l).map((s,t)=>e.jsx("div",{className:"rounded-lg p-3 text-sm",style:{background:"var(--bg-surface-hover)",color:"var(--text-secondary)"},children:s},t)),r.learnings.length===0&&e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"No learnings recorded yet."})]})]}),e.jsxs("div",{className:"rounded-xl overflow-hidden",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsxs("button",{onClick:()=>n("decisions"),className:"w-full flex items-center justify-between px-5 py-3 transition-colors",onMouseEnter:s=>s.currentTarget.style.background="var(--bg-surface-hover)",onMouseLeave:s=>s.currentTarget.style.background="transparent",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-amber-400",children:"⚖"}),e.jsx("h3",{className:"font-medium",style:{color:"var(--text-secondary)"},children:"Decision Log"}),e.jsx("span",{className:"text-xs",style:{color:"var(--text-faint)"},children:r.decisions.length})]}),e.jsx("span",{className:"text-sm",style:{color:"var(--text-faint)"},children:a.decisions?"▼":"▶"})]}),a.decisions&&e.jsxs("div",{className:"px-5 pb-4 space-y-2",children:[r.decisions.filter(l).map((s,t)=>e.jsx("div",{className:"rounded-lg p-3 text-sm",style:{background:"var(--bg-surface-hover)",color:"var(--text-secondary)"},children:s},t)),r.decisions.length===0&&e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"No decisions logged yet."})]})]})]})}export{p as CerebrumViewer};
@@ -0,0 +1 @@
1
+ import{r as n,j as e,S as x,a as j,b as i}from"./index-PYeNGjkN.js";function g({data:m}){const{cronManifest:u,cronState:a,client:l}=m,[o,p]=n.useState(!0),[d,h]=n.useState(!1),y=t=>{if(a.dead_letter_queue.some(r=>r.task_id===t))return"failed";const s=a.execution_log.filter(r=>r.task_id===t).sort((r,c)=>c.timestamp.localeCompare(r.timestamp))[0];return(s==null?void 0:s.status)||"ok"},v=t=>{const s=a.execution_log.filter(r=>r.task_id===t).sort((r,c)=>c.timestamp.localeCompare(r.timestamp))[0];return s?i(s.timestamp):"never"},f=t=>{l==null||l.send({type:"trigger_task",task_id:t})},b=t=>{l==null||l.send({type:"retry_dead_letter",task_id:t})};return e.jsxs("div",{children:[e.jsx("div",{className:"rounded-xl overflow-hidden mb-6",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{style:{borderBottom:"1px solid var(--border)"},children:[e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium uppercase",style:{color:"var(--text-faint)"},children:"Status"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium uppercase",style:{color:"var(--text-faint)"},children:"Task"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium uppercase hidden md:table-cell",style:{color:"var(--text-faint)"},children:"Schedule"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium uppercase hidden md:table-cell",style:{color:"var(--text-faint)"},children:"Last Run"}),e.jsx("th",{className:"text-right px-4 py-3 text-xs font-medium uppercase",style:{color:"var(--text-faint)"},children:"Actions"})]})}),e.jsx("tbody",{children:u.tasks.map(t=>e.jsxs("tr",{className:"transition-colors",style:{borderBottom:"1px solid var(--border)"},onMouseEnter:s=>s.currentTarget.style.background="var(--bg-surface-hover)",onMouseLeave:s=>s.currentTarget.style.background="transparent",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsx(x,{status:t.enabled?y(t.id):"disabled"})}),e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"text-sm",style:{color:"var(--text-primary)"},children:t.name}),e.jsx("p",{className:"text-xs",style:{color:"var(--text-faint)"},children:t.description})]}),e.jsx("td",{className:"px-4 py-3 hidden md:table-cell text-sm",style:{color:"var(--text-muted)"},children:j(t.schedule)}),e.jsx("td",{className:"px-4 py-3 hidden md:table-cell text-sm",style:{color:"var(--text-faint)"},children:v(t.id)}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("button",{onClick:()=>f(t.id),className:"px-3 py-1 text-xs rounded-md transition-colors",style:{background:"var(--bg-surface-hover)",border:"1px solid var(--border-subtle)",color:"var(--text-secondary)"},children:"Run Now"})})]},t.id))})]})}),e.jsxs("div",{className:"rounded-xl p-5 mb-6",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsxs("button",{onClick:()=>p(!o),className:"flex items-center gap-2 w-full text-left",children:[e.jsx("span",{className:"text-sm",style:{color:"var(--text-muted)"},children:o?"▼":"▶"}),e.jsx("h3",{className:"font-medium",style:{color:"var(--text-secondary)"},children:"Dead Letter Queue"}),e.jsxs("span",{className:"text-xs",style:{color:"var(--text-faint)"},children:["(",a.dead_letter_queue.length,")"]})]}),o&&(a.dead_letter_queue.length===0?e.jsx("div",{className:"text-center py-6 text-sm mt-2",style:{color:"var(--text-muted)"},children:"No dead letters — all systems healthy"}):e.jsx("div",{className:"space-y-3 mt-3",children:a.dead_letter_queue.map((t,s)=>e.jsx("div",{className:"rounded-lg p-4",style:{background:"var(--danger-subtle)",border:"1px solid rgba(220, 38, 38, 0.2)"},children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",style:{color:"var(--danger)"},children:t.task_id}),e.jsx("p",{className:"text-xs mt-1",style:{color:"var(--text-muted)"},children:t.error}),e.jsxs("p",{className:"text-xs mt-1",style:{color:"var(--text-faint)"},children:[i(t.timestamp)," · ",t.attempts," attempts"]})]}),e.jsx("button",{onClick:()=>b(t.task_id),className:"px-3 py-1 text-xs rounded-md",style:{background:"var(--bg-surface-hover)",border:"1px solid var(--border-subtle)",color:"var(--text-secondary)"},children:"Retry"})]})},s))}))]}),e.jsxs("div",{className:"rounded-xl p-5",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsxs("button",{onClick:()=>h(!d),className:"flex items-center gap-2 w-full text-left",children:[e.jsx("span",{className:"text-sm",style:{color:"var(--text-muted)"},children:d?"▼":"▶"}),e.jsx("h3",{className:"font-medium",style:{color:"var(--text-secondary)"},children:"Execution History"})]}),d&&e.jsxs("div",{className:"mt-3",children:[a.execution_log.slice(-30).reverse().map((t,s)=>{var r;return e.jsxs("div",{className:"flex items-center gap-4 py-2",style:{borderBottom:"1px solid var(--border)"},children:[e.jsx("span",{className:"text-xs font-mono",style:{color:"var(--text-faint)"},children:(r=t.timestamp)==null?void 0:r.slice(11,16)}),e.jsx("span",{className:"text-sm flex-1",style:{color:"var(--text-secondary)"},children:t.task_id}),e.jsxs("span",{className:"text-xs font-mono",style:{color:"var(--text-faint)"},children:[t.duration_ms,"ms"]}),e.jsx(x,{status:t.status})]},s)}),a.execution_log.length===0&&e.jsx("p",{className:"text-sm py-4 text-center",style:{color:"var(--text-muted)"},children:"No executions yet."})]})]})]})}export{g as CronStatus};
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-PYeNGjkN.js";function n({data:a}){const{designqcReport:s}=a,r=s&&s.captures&&s.captures.length>0;return e.jsxs("div",{children:[e.jsxs("div",{className:"rounded-xl p-5 mb-6",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsx("h3",{className:"font-medium mb-3",style:{color:"var(--text-secondary)"},children:"How Design QC Works"}),e.jsxs("div",{className:"space-y-2 text-sm",style:{color:"var(--text-muted)"},children:[e.jsxs("p",{children:["1. Run ",e.jsx("code",{className:"px-1.5 py-0.5 rounded text-xs",style:{background:"var(--bg-base)"},children:"openwolf designqc --url http://localhost:3000"})]}),e.jsx("p",{children:"2. OpenWolf captures compressed screenshots of your app"}),e.jsx("p",{children:"3. In your Claude Code session, ask Claude to evaluate the screenshots:"}),e.jsx("p",{className:"pl-4 italic",children:'"Read the screenshots in .wolf/designqc-captures/ and evaluate the design"'}),e.jsx("p",{children:"4. Claude sees the images, evaluates design, and can fix issues right in your session"})]})]}),e.jsxs("div",{className:"rounded-xl p-5",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsx("h3",{className:"font-medium mb-3",style:{color:"var(--text-secondary)"},children:"Last Capture"}),r?e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex gap-4 text-sm mb-3",children:[e.jsxs("span",{style:{color:"var(--text-faint)"},children:["Captured: ",s.captured_at||"—"]}),e.jsxs("span",{style:{color:"var(--text-faint)"},children:["Size: ",s.total_size_kb||0,"KB"]}),e.jsxs("span",{style:{color:"var(--text-faint)"},children:["Est. tokens: ~",s.estimated_tokens||0]})]}),s.captures.map((t,l)=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg",style:{background:"var(--bg-base)"},children:[e.jsx("span",{className:"text-sm",style:{color:"var(--text-primary)"},children:t.file}),e.jsxs("span",{className:"text-xs",style:{color:"var(--text-faint)"},children:[t.viewport," · ",t.route]})]},l))]}):e.jsx("div",{className:"text-center py-8",children:e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"No screenshots captured yet."})})]})]})}export{n as DesignQC};
@@ -0,0 +1 @@
1
+ import{r as i,j as e}from"./index-PYeNGjkN.js";function f({data:m}){const{memory:c}=m,[p,h]=i.useState(0),[l,u]=i.useState(""),d=l?c.filter(s=>s.entries.some(r=>r.action.toLowerCase().includes(l.toLowerCase())||r.files.toLowerCase().includes(l.toLowerCase()))):c;return e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center gap-3 mb-4",children:e.jsx("input",{type:"text",placeholder:"Search memory...",value:l,onChange:s=>u(s.target.value),className:"flex-1 rounded-lg px-3 py-2 text-sm focus:outline-none",style:{background:"var(--bg-surface)",border:"1px solid var(--border)",color:"var(--text-primary)"}})}),d.length===0?e.jsx("div",{className:"text-center py-12",style:{color:"var(--text-muted)"},children:"No sessions found."}):e.jsx("div",{className:"space-y-3",children:d.map((s,r)=>{const o=p===r,x=s.entries.reduce((t,n)=>{const a=parseInt(n.tokens.replace(/[^0-9]/g,""))||0;return t+a},0);return e.jsxs("div",{className:"rounded-xl overflow-hidden",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsxs("button",{onClick:()=>h(o?-1:r),className:"w-full flex items-center justify-between px-5 py-3 transition-colors",onMouseEnter:t=>t.currentTarget.style.background="var(--bg-surface-hover)",onMouseLeave:t=>t.currentTarget.style.background="transparent",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm",style:{color:"var(--text-faint)"},children:o?"▼":"▶"}),e.jsxs("span",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:[s.date," ",s.time]}),e.jsxs("span",{className:"text-xs",style:{color:"var(--text-faint)"},children:[s.entries.length," actions"]})]}),x>0&&e.jsxs("span",{className:"text-xs font-mono",style:{color:"var(--text-faint)"},children:["~",x," tok"]})]}),o&&s.entries.length>0&&e.jsx("div",{style:{borderTop:"1px solid var(--border)"},children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-xs uppercase",style:{color:"var(--text-faint)"},children:[e.jsx("th",{className:"text-left px-4 py-2 w-16",children:"Time"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Action"}),e.jsx("th",{className:"text-left px-4 py-2 hidden md:table-cell",children:"Files"}),e.jsx("th",{className:"text-left px-4 py-2 hidden md:table-cell",children:"Outcome"}),e.jsx("th",{className:"text-right px-4 py-2 w-20",children:"Tokens"})]})}),e.jsx("tbody",{children:s.entries.map((t,n)=>e.jsxs("tr",{style:{borderBottom:"1px solid var(--border)"},onMouseEnter:a=>a.currentTarget.style.background="var(--bg-surface-hover)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[e.jsx("td",{className:"px-4 py-2 text-xs font-mono",style:{color:"var(--text-faint)"},children:t.time}),e.jsx("td",{className:"px-4 py-2 text-sm",style:{color:"var(--text-secondary)"},children:t.action}),e.jsx("td",{className:"px-4 py-2 text-sm hidden md:table-cell",style:{color:"var(--text-muted)"},children:t.files}),e.jsx("td",{className:"px-4 py-2 text-sm hidden md:table-cell",style:{color:"var(--text-muted)"},children:t.outcome}),e.jsx("td",{className:"px-4 py-2 text-xs font-mono text-right",style:{color:"var(--text-faint)"},children:t.tokens})]},n))})]})})]},r)})})]})}export{f as MemoryViewer};
@@ -0,0 +1 @@
1
+ import{j as e,S as p,f as h}from"./index-PYeNGjkN.js";function b({data:d}){const{identity:i,health:t,tokenLedger:n,anatomy:m,memory:r,project:l}=d,s=n.lifetime,x=l.name||i.name,o=l.description||"";return e.jsxs("div",{children:[e.jsxs("div",{className:"rounded-xl p-6 mb-6",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsx("h2",{className:"text-3xl font-bold",style:{color:"var(--text-primary)"},children:x}),o&&e.jsx("p",{className:"mt-1",style:{color:"var(--text-muted)"},children:o}),e.jsxs("div",{className:"flex items-center gap-4 mt-3",children:[e.jsx(p,{status:t.status}),t.uptime_seconds>0&&e.jsxs("span",{className:"text-xs",style:{color:"var(--text-faint)"},children:["Uptime: ",Math.floor(t.uptime_seconds/3600),"h ",Math.floor(t.uptime_seconds%3600/60),"m"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[e.jsxs("div",{className:"rounded-xl p-5",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"Files Tracked"}),e.jsx("p",{className:"text-2xl font-bold mt-1",style:{color:"var(--text-primary)"},children:m.metadata.files})]}),e.jsxs("div",{className:"rounded-xl p-5",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"Sessions"}),e.jsx("p",{className:"text-2xl font-bold mt-1",style:{color:"var(--text-primary)"},children:s.total_sessions})]}),e.jsxs("div",{className:"rounded-xl p-5",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"Tokens Saved"}),e.jsxs("p",{className:"text-2xl font-bold mt-1",style:{color:"var(--accent)"},children:["~",h(s.estimated_savings_vs_bare_cli)]}),s.total_tokens_estimated>0&&e.jsxs("p",{className:"text-xs mt-1",style:{color:"var(--text-faint)"},children:[Math.round(s.estimated_savings_vs_bare_cli/(s.total_tokens_estimated+s.estimated_savings_vs_bare_cli)*100),"% savings"]})]})]}),e.jsxs("div",{className:"rounded-xl p-5",style:{background:"var(--bg-surface)",border:"1px solid var(--border)"},children:[e.jsx("h3",{className:"font-medium mb-3",style:{color:"var(--text-secondary)"},children:"Recent Activity"}),r.length===0?e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"No activity yet. Start a Claude Code session to see activity here."}):e.jsx("div",{className:"space-y-2",children:r.slice(0,3).flatMap(c=>c.entries.slice(0,5).map((a,v)=>e.jsxs("div",{className:"flex items-center gap-3 py-2",style:{borderBottom:"1px solid var(--border)"},children:[e.jsx("span",{className:"text-xs font-mono w-12",style:{color:"var(--text-faint)"},children:a.time}),e.jsx("span",{className:"text-sm flex-1",style:{color:"var(--text-secondary)"},children:a.action}),e.jsx("span",{className:"text-xs font-mono",style:{color:"var(--text-faint)"},children:a.tokens})]},`${c.date}-${v}`))).slice(0,5)})]})]})}export{b as ProjectOverview};