haroo 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 (60) hide show
  1. package/README.md +58 -0
  2. package/dist/index.js +84883 -0
  3. package/package.json +73 -0
  4. package/src/__tests__/e2e/EventService.test.ts +211 -0
  5. package/src/__tests__/unit/Event.test.ts +89 -0
  6. package/src/__tests__/unit/Memory.test.ts +130 -0
  7. package/src/application/graph/builder.ts +106 -0
  8. package/src/application/graph/edges.ts +37 -0
  9. package/src/application/graph/nodes/addEvent.ts +113 -0
  10. package/src/application/graph/nodes/chat.ts +128 -0
  11. package/src/application/graph/nodes/extractMemory.ts +135 -0
  12. package/src/application/graph/nodes/index.ts +8 -0
  13. package/src/application/graph/nodes/query.ts +194 -0
  14. package/src/application/graph/nodes/respond.ts +26 -0
  15. package/src/application/graph/nodes/router.ts +82 -0
  16. package/src/application/graph/nodes/toolExecutor.ts +79 -0
  17. package/src/application/graph/nodes/types.ts +2 -0
  18. package/src/application/index.ts +4 -0
  19. package/src/application/services/DiaryService.ts +188 -0
  20. package/src/application/services/EventService.ts +61 -0
  21. package/src/application/services/index.ts +2 -0
  22. package/src/application/tools/calendarTool.ts +179 -0
  23. package/src/application/tools/diaryTool.ts +182 -0
  24. package/src/application/tools/index.ts +68 -0
  25. package/src/config/env.ts +33 -0
  26. package/src/config/index.ts +1 -0
  27. package/src/domain/entities/DiaryEntry.ts +16 -0
  28. package/src/domain/entities/Event.ts +13 -0
  29. package/src/domain/entities/Memory.ts +20 -0
  30. package/src/domain/index.ts +5 -0
  31. package/src/domain/interfaces/IDiaryRepository.ts +21 -0
  32. package/src/domain/interfaces/IEventsRepository.ts +12 -0
  33. package/src/domain/interfaces/ILanguageModel.ts +23 -0
  34. package/src/domain/interfaces/IMemoriesRepository.ts +15 -0
  35. package/src/domain/interfaces/IMemory.ts +19 -0
  36. package/src/domain/interfaces/index.ts +4 -0
  37. package/src/domain/state/AgentState.ts +30 -0
  38. package/src/index.ts +5 -0
  39. package/src/infrastructure/database/factory.ts +52 -0
  40. package/src/infrastructure/database/index.ts +21 -0
  41. package/src/infrastructure/database/sqlite-checkpointer.ts +179 -0
  42. package/src/infrastructure/database/sqlite-client.ts +69 -0
  43. package/src/infrastructure/database/sqlite-diary-repository.ts +209 -0
  44. package/src/infrastructure/database/sqlite-events-repository.ts +167 -0
  45. package/src/infrastructure/database/sqlite-memories-repository.ts +284 -0
  46. package/src/infrastructure/database/sqlite-schema.ts +98 -0
  47. package/src/infrastructure/index.ts +3 -0
  48. package/src/infrastructure/llm/base.ts +14 -0
  49. package/src/infrastructure/llm/gemini.ts +139 -0
  50. package/src/infrastructure/llm/index.ts +22 -0
  51. package/src/infrastructure/llm/ollama.ts +126 -0
  52. package/src/infrastructure/llm/openai.ts +148 -0
  53. package/src/infrastructure/memory/checkpointer.ts +19 -0
  54. package/src/infrastructure/memory/index.ts +2 -0
  55. package/src/infrastructure/settings/index.ts +96 -0
  56. package/src/interface/cli/calendar.ts +120 -0
  57. package/src/interface/cli/chat.ts +185 -0
  58. package/src/interface/cli/commands.ts +337 -0
  59. package/src/interface/cli/printer.ts +65 -0
  60. package/src/interface/index.ts +1 -0
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # haroo
2
+
3
+ AI-powered personal logging CLI with memory, diary, and calendar features.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g haroo
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Chat
14
+
15
+ ```bash
16
+ haroo chat
17
+ ```
18
+
19
+ ### Memory
20
+
21
+ ```bash
22
+ haroo memory list
23
+ haroo memory add
24
+ haroo memory edit
25
+ haroo memory delete
26
+ ```
27
+
28
+ ### Diary
29
+
30
+ ```bash
31
+ haroo diary generate [date]
32
+ haroo diary show
33
+ ```
34
+
35
+ ### Calendar
36
+
37
+ ```bash
38
+ haroo calendar
39
+ ```
40
+
41
+ ### Model
42
+
43
+ ```bash
44
+ haroo model
45
+ ```
46
+
47
+ ## Configuration
48
+
49
+ Create a `.env` file with your LLM provider API keys:
50
+
51
+ ```
52
+ OPENAI_API_KEY=your-key
53
+ GOOGLE_API_KEY=your-key
54
+ ```
55
+
56
+ ## License
57
+
58
+ MIT