@tecet/ollm 0.1.4 → 0.1.5

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 (86) hide show
  1. package/dist/cli.js +20 -14
  2. package/dist/cli.js.map +3 -3
  3. package/dist/services/documentService.d.ts.map +1 -1
  4. package/dist/services/documentService.js +12 -2
  5. package/dist/services/documentService.js.map +1 -1
  6. package/dist/ui/components/docs/DocsPanel.d.ts.map +1 -1
  7. package/dist/ui/components/docs/DocsPanel.js +1 -1
  8. package/dist/ui/components/docs/DocsPanel.js.map +1 -1
  9. package/dist/ui/components/launch/VersionBanner.js +1 -1
  10. package/dist/ui/components/launch/VersionBanner.js.map +1 -1
  11. package/dist/ui/components/layout/KeybindsLegend.d.ts.map +1 -1
  12. package/dist/ui/components/layout/KeybindsLegend.js +1 -1
  13. package/dist/ui/components/layout/KeybindsLegend.js.map +1 -1
  14. package/dist/ui/components/tabs/BugReportTab.js +1 -1
  15. package/dist/ui/components/tabs/BugReportTab.js.map +1 -1
  16. package/dist/ui/services/docsService.d.ts +12 -27
  17. package/dist/ui/services/docsService.d.ts.map +1 -1
  18. package/dist/ui/services/docsService.js +40 -67
  19. package/dist/ui/services/docsService.js.map +1 -1
  20. package/docs/README.md +3 -410
  21. package/package.json +10 -7
  22. package/scripts/copy-docs-to-user.cjs +34 -0
  23. package/docs/Context/CheckpointFlowDiagram.md +0 -673
  24. package/docs/Context/ContextArchitecture.md +0 -898
  25. package/docs/Context/ContextCompression.md +0 -1102
  26. package/docs/Context/ContextManagment.md +0 -750
  27. package/docs/Context/Index.md +0 -209
  28. package/docs/Context/README.md +0 -390
  29. package/docs/DevelopmentRoadmap/Index.md +0 -238
  30. package/docs/DevelopmentRoadmap/OLLM-CLI_Releases.md +0 -419
  31. package/docs/DevelopmentRoadmap/PlanedFeatures.md +0 -448
  32. package/docs/DevelopmentRoadmap/README.md +0 -174
  33. package/docs/DevelopmentRoadmap/Roadmap.md +0 -572
  34. package/docs/DevelopmentRoadmap/RoadmapVisual.md +0 -372
  35. package/docs/Hooks/Architecture.md +0 -885
  36. package/docs/Hooks/Index.md +0 -244
  37. package/docs/Hooks/KeyboardShortcuts.md +0 -248
  38. package/docs/Hooks/Protocol.md +0 -817
  39. package/docs/Hooks/README.md +0 -403
  40. package/docs/Hooks/UserGuide.md +0 -1483
  41. package/docs/Hooks/VisualGuide.md +0 -598
  42. package/docs/Index.md +0 -506
  43. package/docs/Installation.md +0 -586
  44. package/docs/Introduction.md +0 -367
  45. package/docs/LLM Models/Index.md +0 -239
  46. package/docs/LLM Models/LLM_GettingStarted.md +0 -748
  47. package/docs/LLM Models/LLM_Index.md +0 -701
  48. package/docs/LLM Models/LLM_MemorySystem.md +0 -337
  49. package/docs/LLM Models/LLM_ModelCompatibility.md +0 -499
  50. package/docs/LLM Models/LLM_ModelsArchitecture.md +0 -933
  51. package/docs/LLM Models/LLM_ModelsCommands.md +0 -839
  52. package/docs/LLM Models/LLM_ModelsConfiguration.md +0 -1094
  53. package/docs/LLM Models/LLM_ModelsList.md +0 -1071
  54. package/docs/LLM Models/LLM_ModelsList.md.backup +0 -400
  55. package/docs/LLM Models/README.md +0 -355
  56. package/docs/MCP/MCP_Architecture.md +0 -1086
  57. package/docs/MCP/MCP_Commands.md +0 -1111
  58. package/docs/MCP/MCP_GettingStarted.md +0 -590
  59. package/docs/MCP/MCP_Index.md +0 -524
  60. package/docs/MCP/MCP_Integration.md +0 -866
  61. package/docs/MCP/MCP_Marketplace.md +0 -160
  62. package/docs/MCP/README.md +0 -415
  63. package/docs/Prompts System/Architecture.md +0 -760
  64. package/docs/Prompts System/Index.md +0 -223
  65. package/docs/Prompts System/PromptsRouting.md +0 -1047
  66. package/docs/Prompts System/PromptsTemplates.md +0 -1102
  67. package/docs/Prompts System/README.md +0 -389
  68. package/docs/Prompts System/SystemPrompts.md +0 -856
  69. package/docs/Quickstart.md +0 -535
  70. package/docs/Tools/Architecture.md +0 -884
  71. package/docs/Tools/GettingStarted.md +0 -624
  72. package/docs/Tools/Index.md +0 -216
  73. package/docs/Tools/ManifestReference.md +0 -141
  74. package/docs/Tools/README.md +0 -440
  75. package/docs/Tools/UserGuide.md +0 -773
  76. package/docs/Troubleshooting.md +0 -1265
  77. package/docs/UI&Settings/Architecture.md +0 -729
  78. package/docs/UI&Settings/ColorASCII.md +0 -34
  79. package/docs/UI&Settings/Commands.md +0 -755
  80. package/docs/UI&Settings/Configuration.md +0 -872
  81. package/docs/UI&Settings/Index.md +0 -293
  82. package/docs/UI&Settings/Keybinds.md +0 -372
  83. package/docs/UI&Settings/README.md +0 -278
  84. package/docs/UI&Settings/Terminal.md +0 -637
  85. package/docs/UI&Settings/Themes.md +0 -604
  86. package/docs/UI&Settings/UIGuide.md +0 -550
@@ -1,403 +0,0 @@
1
- # Hook System Documentation
2
-
3
- **Last Updated:** January 26, 2026
4
-
5
- Welcome to the Hook System documentation for OLLM CLI. This section covers the complete event-driven automation system, including hook types, trust model, protocol, and visual guides.
6
-
7
- ---
8
-
9
- ## 📚 Documentation Overview
10
-
11
- ### Core Documentation
12
-
13
- - **[Architecture](Architecture.md)** - Complete system architecture and design
14
- - **[User Guide](UserGuide.md)** - Using hooks for automation
15
- - **[Protocol](Protocol.md)** - Hook protocol specification
16
- - **[Visual Guide](VisualGuide.md)** - Visual diagrams and examples
17
- - **[Keyboard Shortcuts](KeyboardShortcuts.md)** - Hook-related keybindings
18
-
19
- ---
20
-
21
- ## 🎯 What are Hooks?
22
-
23
- The **Hook System** enables event-driven automation and safety gates in OLLM CLI. Hooks are scripts that run automatically when specific events occur:
24
-
25
- ### 1. **Event-Driven Automation**
26
-
27
- Hooks respond to IDE and workflow events:
28
-
29
- - File operations (create, edit, delete, save)
30
- - Agent lifecycle (prompt submit, agent stop)
31
- - User triggers (manual execution)
32
- - Git operations (commit, push, pull)
33
-
34
- ### 2. **Safety Gates**
35
-
36
- Hooks can prevent dangerous operations:
37
-
38
- - Block dangerous shell commands
39
- - Validate file modifications
40
- - Enforce code quality standards
41
- - Require approval for sensitive operations
42
-
43
- ### 3. **Workflow Automation**
44
-
45
- Hooks automate repetitive tasks:
46
-
47
- - Auto-format code on save
48
- - Run tests before commit
49
- - Generate documentation
50
- - Update dependencies
51
-
52
- ### 4. **Trust Model**
53
-
54
- Three-tier trust system for security:
55
-
56
- - **Trusted** - System hooks, always allowed
57
- - **Workspace** - Project hooks, require approval
58
- - **Downloaded** - External hooks, require explicit trust
59
-
60
- ---
61
-
62
- ## 📖 Documentation Structure
63
-
64
- ```
65
- docs/Hooks/
66
- ├── README.md ← You are here
67
- ├── Index.md Quick reference with links
68
- ├── Architecture.md System architecture
69
- ├── UserGuide.md Using hooks
70
- ├── Protocol.md Hook protocol spec
71
- ├── VisualGuide.md Visual diagrams
72
- └── KeyboardShortcuts.md Hook keybindings
73
- ```
74
-
75
- ---
76
-
77
- ## 🎓 Key Concepts
78
-
79
- ### Hook Events
80
-
81
- Hooks can respond to various events:
82
-
83
- **File Events:**
84
-
85
- - `fileEdited` - File saved/modified
86
- - `fileCreated` - New file created
87
- - `fileDeleted` - File deleted
88
-
89
- **Agent Events:**
90
-
91
- - `promptSubmit` - User sends message
92
- - `agentStop` - Agent completes execution
93
-
94
- **User Events:**
95
-
96
- - `userTriggered` - Manual hook execution
97
-
98
- **See:** [User Guide](UserGuide.md#hook-events)
99
-
100
- ### Hook Actions
101
-
102
- Hooks can perform two types of actions:
103
-
104
- **askAgent:**
105
-
106
- - Send prompt to agent
107
- - Agent processes and responds
108
- - Valid with all event types
109
-
110
- **runCommand:**
111
-
112
- - Execute shell command
113
- - Only valid with `promptSubmit` and `agentStop`
114
- - Not valid with file events
115
-
116
- **See:** [Protocol](Protocol.md#hook-actions)
117
-
118
- ### Trust Model
119
-
120
- Three trust levels for security:
121
-
122
- | Level | Description | Approval Required |
123
- | -------------- | -------------- | ------------------- |
124
- | **Trusted** | System hooks | ❌ No |
125
- | **Workspace** | Project hooks | ✅ Yes (first time) |
126
- | **Downloaded** | External hooks | ✅ Yes (explicit) |
127
-
128
- **See:** [Architecture](Architecture.md#trust-model)
129
-
130
- ### Hook Protocol
131
-
132
- Hooks communicate via JSON stdin/stdout:
133
-
134
- **Input:**
135
-
136
- ```json
137
- {
138
- "event": "fileEdited",
139
- "file": "src/main.ts",
140
- "content": "...",
141
- "timestamp": "2026-01-26T10:00:00Z"
142
- }
143
- ```
144
-
145
- **Output:**
146
-
147
- ```json
148
- {
149
- "action": "askAgent",
150
- "prompt": "Review the changes in src/main.ts",
151
- "metadata": {}
152
- }
153
- ```
154
-
155
- **See:** [Protocol](Protocol.md)
156
-
157
- ---
158
-
159
- ## 💡 Common Use Cases
160
-
161
- ### Auto-Format on Save
162
-
163
- ```json
164
- {
165
- "name": "Auto-format on save",
166
- "version": "1.0.0",
167
- "when": {
168
- "type": "fileEdited",
169
- "patterns": ["*.ts", "*.tsx"]
170
- },
171
- "then": {
172
- "type": "askAgent",
173
- "prompt": "Run prettier on {{file}}"
174
- }
175
- }
176
- ```
177
-
178
- ### Run Tests Before Commit
179
-
180
- ```json
181
- {
182
- "name": "Test before commit",
183
- "version": "1.0.0",
184
- "when": {
185
- "type": "promptSubmit"
186
- },
187
- "then": {
188
- "type": "runCommand",
189
- "command": "npm test"
190
- }
191
- }
192
- ```
193
-
194
- ### Block Dangerous Commands
195
-
196
- ```json
197
- {
198
- "name": "Block rm -rf",
199
- "version": "1.0.0",
200
- "when": {
201
- "type": "promptSubmit"
202
- },
203
- "then": {
204
- "type": "askAgent",
205
- "prompt": "Check if command contains 'rm -rf' and warn user"
206
- }
207
- }
208
- ```
209
-
210
- **Learn more:** [User Guide](UserGuide.md#examples)
211
-
212
- ---
213
-
214
- ## 🛠️ Configuration
215
-
216
- ### Hook Settings
217
-
218
- ```yaml
219
- hooks:
220
- # Enable hook system
221
- enabled: true
222
-
223
- # Hook directories
224
- directories:
225
- - .ollm/hooks/ # Workspace hooks
226
- - ~/.ollm/hooks/ # User hooks
227
-
228
- # Trust settings
229
- trustWorkspaceHooks: false # Require approval
230
- trustDownloadedHooks: false # Require explicit trust
231
- ```
232
-
233
- ### Hook File Format
234
-
235
- ```json
236
- {
237
- "name": "Hook Name",
238
- "version": "1.0.0",
239
- "description": "What this hook does",
240
- "when": {
241
- "type": "fileEdited",
242
- "patterns": ["*.ts"]
243
- },
244
- "then": {
245
- "type": "askAgent",
246
- "prompt": "Review changes"
247
- }
248
- }
249
- ```
250
-
251
- **Learn more:** [Protocol](Protocol.md#hook-format)
252
-
253
- ---
254
-
255
- ## 🔍 Troubleshooting
256
-
257
- ### Common Issues
258
-
259
- **Hook not triggering:**
260
-
261
- - Check hook enabled: `/hooks list`
262
- - Verify event type matches
263
- - Check file patterns match
264
- - Enable hook: `/hooks enable <name>`
265
-
266
- **Hook fails to execute:**
267
-
268
- - Check hook syntax: `/hooks debug <name>`
269
- - Verify trust level: `/hooks trust <name>`
270
- - Check error logs
271
- - Test manually: `/hooks run <name>`
272
-
273
- **Permission denied:**
274
-
275
- - Check trust level: `/hooks list`
276
- - Trust hook: `/hooks trust <name>`
277
- - Verify hook in correct directory
278
-
279
- **Invalid action for event:**
280
-
281
- - `runCommand` only works with `promptSubmit` and `agentStop`
282
- - Use `askAgent` for file events
283
- - Check protocol documentation
284
-
285
- **See:** [Troubleshooting Guide](../Troubleshooting.md)
286
-
287
- ---
288
-
289
- ## 📊 Implementation Status
290
-
291
- ### Current (v0.1.0)
292
-
293
- - ✅ Hook Registry
294
- - ✅ Event System
295
- - ✅ Trust Model
296
- - ✅ Hook Protocol
297
- - ✅ File Event Hooks
298
- - ✅ Agent Event Hooks
299
- - ✅ User Triggered Hooks
300
- - ✅ Hook Commands
301
-
302
- ### Planned (v0.2.0)
303
-
304
- - ⏳ Hook Marketplace
305
- - ⏳ Hook Templates
306
- - ⏳ Hook Analytics
307
-
308
- ### Planned (v0.3.0)
309
-
310
- - ⏳ Advanced Hook Chaining
311
- - ⏳ Conditional Hooks
312
- - ⏳ Hook Performance Monitoring
313
-
314
- ---
315
-
316
- ## 🤝 Related Documentation
317
-
318
- ### Core Systems
319
-
320
- - [Tools System](../Tools/README.md) - Tool execution
321
- - [MCP Integration](../MCP/MCP_Index.md) - MCP servers
322
- - [User Interface](../UI&Settings/README.md) - UI documentation
323
-
324
- ### Commands
325
-
326
- - [Hook Commands](../UI&Settings/Commands.md#hook-management) - CLI commands
327
-
328
- ### Developer Resources
329
-
330
- - Knowledge DB: `dev_HookSystem.md` - Hook system architecture
331
-
332
- ---
333
-
334
- ## 🎯 Quick Start
335
-
336
- ### For New Users
337
-
338
- 1. **List Available Hooks**
339
-
340
- ```bash
341
- /hooks list
342
- ```
343
-
344
- 2. **Enable a Hook**
345
-
346
- ```bash
347
- /hooks enable auto-format-on-save
348
- ```
349
-
350
- 3. **Create Your First Hook**
351
- ```bash
352
- /hooks create my-first-hook
353
- ```
354
-
355
- ### For Advanced Users
356
-
357
- 1. **Debug Hook Execution**
358
-
359
- ```bash
360
- /hooks debug <name>
361
- ```
362
-
363
- 2. **Trust Workspace Hooks**
364
-
365
- ```bash
366
- /hooks trust <name>
367
- ```
368
-
369
- 3. **Create Custom Hooks**
370
- - See [User Guide](UserGuide.md#creating-hooks)
371
- - See [Protocol](Protocol.md)
372
-
373
- ---
374
-
375
- ## 📈 Best Practices
376
-
377
- ### Hook Design
378
-
379
- 1. **Keep Hooks Simple** - One hook, one purpose
380
- 2. **Use Descriptive Names** - Clear, meaningful names
381
- 3. **Add Descriptions** - Explain what hook does
382
- 4. **Test Thoroughly** - Test before deploying
383
- 5. **Handle Errors** - Graceful error handling
384
-
385
- ### Security
386
-
387
- 1. **Review Downloaded Hooks** - Always review before trusting
388
- 2. **Use Workspace Hooks** - Keep project-specific hooks in workspace
389
- 3. **Limit Permissions** - Only grant necessary permissions
390
- 4. **Regular Audits** - Review trusted hooks periodically
391
-
392
- ### Performance
393
-
394
- 1. **Avoid Heavy Operations** - Keep hooks fast
395
- 2. **Use Async When Possible** - Don't block main thread
396
- 3. **Cache Results** - Cache expensive operations
397
- 4. **Monitor Performance** - Track hook execution time
398
-
399
- ---
400
-
401
- **Last Updated:** January 26, 2026
402
- **Version:** 0.1.0
403
- **Status:** Active Development