@imisbahk/hive 0.1.3 → 0.1.4

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 (81) hide show
  1. package/.gitattributes +7 -0
  2. package/.rocket/README.md +9 -9
  3. package/dist/agent/agent.d.ts +4 -0
  4. package/dist/agent/agent.d.ts.map +1 -1
  5. package/dist/agent/agent.js +40 -4
  6. package/dist/agent/agent.js.map +1 -1
  7. package/dist/cli/commands/chat.d.ts.map +1 -1
  8. package/dist/cli/commands/chat.js +642 -12
  9. package/dist/cli/commands/chat.js.map +1 -1
  10. package/dist/cli/commands/memory.d.ts +3 -0
  11. package/dist/cli/commands/memory.d.ts.map +1 -0
  12. package/dist/cli/commands/memory.js +104 -0
  13. package/dist/cli/commands/memory.js.map +1 -0
  14. package/dist/cli/index.js +3 -1
  15. package/dist/cli/index.js.map +1 -1
  16. package/dist/providers/api-key.js +1 -1
  17. package/dist/providers/api-key.js.map +1 -1
  18. package/dist/providers/base.js +1 -1
  19. package/dist/providers/base.js.map +1 -1
  20. package/dist/providers/openai-compatible.js +2 -2
  21. package/dist/providers/openai-compatible.js.map +1 -1
  22. package/dist/storage/db.d.ts +31 -2
  23. package/dist/storage/db.d.ts.map +1 -1
  24. package/dist/storage/db.js +165 -3
  25. package/dist/storage/db.js.map +1 -1
  26. package/dist/storage/schema.d.ts +12 -1
  27. package/dist/storage/schema.d.ts.map +1 -1
  28. package/dist/storage/schema.js +29 -1
  29. package/dist/storage/schema.js.map +1 -1
  30. package/package.json +8 -2
  31. package/.github/workflows/publish.yml +0 -31
  32. package/.rocket/ARCHITECTURE.md +0 -7
  33. package/.rocket/SYMBOLS.md +0 -425
  34. package/001-local-first-storage.md +0 -43
  35. package/003-memory-architechture.md +0 -71
  36. package/CONTRIBUTING.md +0 -150
  37. package/FEATURES.md +0 -63
  38. package/index.md +0 -16
  39. package/prompts/Behaviour.md +0 -23
  40. package/prompts/Browser.md +0 -13
  41. package/prompts/Code.md +0 -12
  42. package/prompts/Debugging.md +0 -15
  43. package/prompts/Execution.md +0 -13
  44. package/prompts/Memory.md +0 -11
  45. package/prompts/Planning.md +0 -13
  46. package/prompts/Product.md +0 -14
  47. package/prompts/Review.md +0 -15
  48. package/prompts/Safety.md +0 -12
  49. package/prompts/Search.md +0 -14
  50. package/prompts/System.md +0 -6
  51. package/prompts/Tools.md +0 -14
  52. package/prompts/Writing.md +0 -13
  53. package/releases/v1/v0.1/RELEASE-NOTES.md +0 -101
  54. package/src/agent/agent.ts +0 -595
  55. package/src/agent/index.ts +0 -2
  56. package/src/browser/browser.ts +0 -410
  57. package/src/cli/commands/chat.ts +0 -864
  58. package/src/cli/commands/config.ts +0 -610
  59. package/src/cli/commands/doctor.ts +0 -655
  60. package/src/cli/commands/init.ts +0 -288
  61. package/src/cli/commands/nuke.ts +0 -64
  62. package/src/cli/commands/status.ts +0 -170
  63. package/src/cli/helpers/providerPrompts.ts +0 -192
  64. package/src/cli/index.ts +0 -68
  65. package/src/cli/theme.ts +0 -88
  66. package/src/cli/ui.ts +0 -127
  67. package/src/providers/anthropic.ts +0 -146
  68. package/src/providers/api-key.ts +0 -23
  69. package/src/providers/base.ts +0 -409
  70. package/src/providers/google.ts +0 -21
  71. package/src/providers/groq.ts +0 -21
  72. package/src/providers/index.ts +0 -65
  73. package/src/providers/mistral.ts +0 -21
  74. package/src/providers/ollama.ts +0 -22
  75. package/src/providers/openai-compatible.ts +0 -82
  76. package/src/providers/openai.ts +0 -21
  77. package/src/providers/openrouter.ts +0 -21
  78. package/src/providers/together.ts +0 -21
  79. package/src/storage/db.ts +0 -476
  80. package/src/storage/schema.ts +0 -116
  81. package/tsconfig.json +0 -51
@@ -1,425 +0,0 @@
1
- # Symbols
2
-
3
- Auto-generated symbol reference (truncated for readability).
4
-
5
- - `class` `AnthropicProvider` in `src/providers/anthropic.ts`:21:8
6
- - `class` `GoogleProvider` in `src/providers/google.ts`:7:8
7
- - `class` `GroqProvider` in `src/providers/groq.ts`:7:8
8
- - `class` `MistralProvider` in `src/providers/mistral.ts`:7:8
9
- - `class` `OllamaProvider` in `src/providers/ollama.ts`:7:8
10
- - `class` `OpenAICompatibleProvider` in `src/providers/openai-compatible.ts`:22:8
11
- - `class` `OpenAIProvider` in `src/providers/openai.ts`:7:8
12
- - `class` `OpenRouterProvider` in `src/providers/openrouter.ts`:7:8
13
- - `class` `ProviderConfigurationError` in `src/providers/base.ts`:72:8
14
- - `class` `ProviderRequestError` in `src/providers/base.ts`:79:8
15
- - `class` `TogetherProvider` in `src/providers/together.ts`:7:8
16
- - `function` `apiKeyEnvVar` in `src/cli/commands/config.ts`:265:1
17
- - `function` `appendMessage` in `src/storage/db.ts`:421:8
18
- - `function` `assertNever` in `src/providers/index.ts`:63:1
19
- - `function` `assertNever` in `src/cli/commands/config.ts`:298:1
20
- - `function` `centerText` in `src/cli/ui.ts`:108:1
21
- - `function` `cleanupText` in `src/browser/browser.ts`:374:1
22
- - `function` `closeHiveDatabase` in `src/storage/db.ts`:85:8
23
- - `function` `completeOpenAICompatibleChat` in `src/providers/base.ts`:190:8
24
- - `function` `configureDatabase` in `src/storage/db.ts`:89:1
25
- - `function` `countFiles` in `src/cli/commands/status.ts`:103:1
26
- - `function` `createAnthropicProvider` in `src/providers/anthropic.ts`:98:8
27
- - `function` `createConversation` in `src/storage/db.ts`:362:8
28
- - `function` `createGoogleProvider` in `src/providers/google.ts`:18:8
29
- - `function` `createGroqProvider` in `src/providers/groq.ts`:18:8
30
- - `function` `createMistralProvider` in `src/providers/mistral.ts`:18:8
31
- - `function` `createOllamaProvider` in `src/providers/ollama.ts`:19:8
32
- - `function` `createOpenAIProvider` in `src/providers/openai.ts`:18:8
33
- - `function` `createOpenRouterProvider` in `src/providers/openrouter.ts`:18:8
34
- - `function` `createProvider` in `src/providers/index.ts`:15:8
35
- - `function` `createTogetherProvider` in `src/providers/together.ts`:18:8
36
- - `function` `decodeHtmlEntities` in `src/browser/browser.ts`:387:1
37
- - `function` `displayPath` in `src/cli/commands/status.ts`:139:1
38
- - `function` `ensureAgentProfileColumns` in `src/storage/db.ts`:137:1
39
- - `function` `ensureInteractiveTerminal` in `src/cli/commands/config.ts`:249:1
40
- - `function` `ensureMigrationTable` in `src/storage/db.ts`:95:1
41
- - `function` `ensureOk` in `src/providers/base.ts`:398:1
42
- - `function` `ensureTrailingSlash` in `src/cli/commands/status.ts`:152:1
43
- - `function` `extractContent` in `src/browser/browser.ts`:29:8
44
- - `function` `extractDuckDuckGoRedirectTarget` in `src/browser/browser.ts`:276:1
45
- - `function` `extractReadableText` in `src/browser/browser.ts`:337:1
46
- - `function` `extractSnippetForMatch` in `src/browser/browser.ts`:310:1
47
- - `function` `fetchHtml` in `src/browser/browser.ts`:146:1
48
- - `function` `fetchOllamaModels` in `src/cli/helpers/providerPrompts.ts`:140:1
49
- - `function` `firstCapture` in `src/browser/browser.ts`:360:1
50
- - `function` `formatBytes` in `src/cli/commands/status.ts`:113:1
51
- - `function` `formatDate` in `src/cli/commands/status.ts`:130:1
52
- - `function` `getApiKeyStatus` in `src/cli/commands/status.ts`:78:1
53
- - `function` `getCliVersion` in `src/cli/ui.ts`:66:1
54
- - `function` `getConversationById` in `src/storage/db.ts`:385:8
55
- - `function` `getDefaultModelForProvider` in `src/providers/index.ts`:40:8
56
- - `function` `getFileSize` in `src/cli/commands/status.ts`:95:1
57
- - `function` `getHiveDatabasePath` in `src/storage/db.ts`:70:8
58
- - `function` `getHiveHomeDir` in `src/storage/db.ts`:66:8
59
- - `function` `getKeyStatus` in `src/cli/commands/config.ts`:260:1
60
- - `function` `getLatestConversationForAgent` in `src/storage/db.ts`:402:8
61
- - `function` `getMetaValue` in `src/storage/db.ts`:156:8
62
- - `function` `getPrimaryAgent` in `src/storage/db.ts`:184:8
63
- - `function` `getSeparatorWidth` in `src/cli/ui.ts`:117:1
64
- - `function` `getTerminalWidth` in `src/cli/ui.ts`:95:1
65
- - `function` `isHiveInitialized` in `src/storage/db.ts`:176:8
66
- - `function` `launchBrowser` in `src/browser/browser.ts`:86:1
67
- - `function` `listMessages` in `src/storage/db.ts`:456:8
68
- - `function` `normalizeDuckDuckGoResultUrl` in `src/browser/browser.ts`:248:1
69
- - `function` `normalizeExternalUrl` in `src/browser/browser.ts`:290:1
70
- - `function` `normalizeGoogleResultUrl` in `src/browser/browser.ts`:226:1
71
- - `function` `normalizePageTitle` in `src/cli/ui.ts`:86:1
72
- - `function` `normalizeProviderName` in `src/providers/base.ts`:102:8
73
- - `function` `nowIso` in `src/storage/db.ts`:152:1
74
- - `function` `openHiveDatabase` in `src/storage/db.ts`:74:8
75
- - `function` `openPage` in `src/browser/browser.ts`:21:8
76
- - `function` `openPageWithBrowser` in `src/browser/browser.ts`:94:1
77
- - `function` `openPageWithHttp` in `src/browser/browser.ts`:107:1
78
- - `function` `parseDuckDuckGoResults` in `src/browser/browser.ts`:193:1
79
- - `function` `parseGoogleResults` in `src/browser/browser.ts`:158:1
80
- - `function` `parseJson` in `src/providers/anthropic.ts`:140:1
81
- - `function` `parseJson` in `src/providers/base.ts`:305:1
82
- - `function` `parseSseData` in `src/providers/base.ts`:291:1
83
- - `function` `pickAnthropicDelta` in `src/providers/anthropic.ts`:115:1
84
- - `function` `pickErrorMessage` in `src/providers/base.ts`:313:1
85
- - `function` `pickMessageContent` in `src/providers/base.ts`:329:1
86
- - `function` `pickToolCalls` in `src/providers/base.ts`:361:1
87
- - `function` `printCurrentProviderAndModel` in `src/cli/commands/config.ts`:255:1
88
- - `function` `printStatusLine` in `src/cli/commands/status.ts`:90:1
89
- - `function` `promptForModel` in `src/cli/helpers/providerPrompts.ts`:68:8
90
- - `function` `promptForProvider` in `src/cli/helpers/providerPrompts.ts`:49:8
91
- - `function` `registerConfigCommand` in `src/cli/commands/config.ts`:29:8
92
- - `function` `registerNukeCommand` in `src/cli/commands/nuke.ts`:20:8
93
- - `function` `registerStatusCommand` in `src/cli/commands/status.ts`:27:8
94
- - `function` `renderError` in `src/cli/ui.ts`:45:8
95
- - `function` `renderHiveHeader` in `src/cli/ui.ts`:21:8
96
- - `function` `renderInfo` in `src/cli/ui.ts`:53:8
97
- - `function` `renderSeparator` in `src/cli/ui.ts`:57:8
98
- - `function` `renderStep` in `src/cli/ui.ts`:49:8
99
- - `function` `renderSuccess` in `src/cli/ui.ts`:41:8
100
- - `function` `requiredField` in `src/cli/helpers/providerPrompts.ts`:184:1
101
- - `function` `requiredField` in `src/cli/commands/config.ts`:288:1
102
- - `function` `resolveHelpTitle` in `src/cli/index.ts`:56:1
103
- - `function` `resolveProviderApiKey` in `src/providers/api-key.ts`:7:8
104
- - `function` `runConfigKeyCommand` in `src/cli/commands/config.ts`:180:8
105
- - `function` `runConfigModelCommand` in `src/cli/commands/config.ts`:137:8
106
- - `function` `runConfigProviderCommand` in `src/cli/commands/config.ts`:68:8
107
- - `function` `runConfigShowCommand` in `src/cli/commands/config.ts`:226:8
108
- - `function` `runMigrations` in `src/storage/db.ts`:105:8
109
- - `function` `runNukeCommand` in `src/cli/commands/nuke.ts`:29:8
110
- - `function` `runStatusCommand` in `src/cli/commands/status.ts`:36:8
111
- - `function` `search` in `src/browser/browser.ts`:33:8
112
- - `function` `searchWithHttp` in `src/browser/browser.ts`:112:1
113
- - `function` `setMetaValue` in `src/storage/db.ts`:164:8
114
- - `function` `shouldRenderHelpHeader` in `src/cli/index.ts`:52:1
115
- - `function` `stripSections` in `src/browser/browser.ts`:365:1
116
- - `function` `toAnthropicMessages` in `src/providers/anthropic.ts`:103:1
117
- - `function` `updatePrimaryAgentConfiguration` in `src/storage/db.ts`:338:1
118
- - `function` `updatePrimaryAgentModel` in `src/storage/db.ts`:326:8
119
- - `function` `updatePrimaryAgentProviderAndModel` in `src/storage/db.ts`:314:8
120
- - `function` `upsertPrimaryAgent` in `src/storage/db.ts`:211:8
121
- - `interface` `AgentRecord` in `src/storage/schema.ts`:87:8
122
- - `interface` `AnthropicMessage` in `src/providers/anthropic.ts`:16:1
123
- - `interface` `AppendMessageInput` in `src/storage/db.ts`:44:8
124
- - `interface` `CompleteChatRequest` in `src/providers/base.ts`:56:8
125
- - `interface` `CompleteChatResponse` in `src/providers/base.ts`:60:8
126
- - `interface` `ConversationRecord` in `src/storage/schema.ts`:102:8
127
- - `interface` `CreateConversationInput` in `src/storage/db.ts`:39:8
128
- - `interface` `MessageRecord` in `src/storage/schema.ts`:110:8
129
- - `interface` `MetaRecord` in `src/storage/schema.ts`:81:8
130
- - `interface` `OllamaTagsResponse` in `src/cli/helpers/providerPrompts.ts`:32:1
131
- - `interface` `OpenAICompatibleCompleteInput` in `src/providers/base.ts`:98:8
132
- - `interface` `OpenAICompatibleProviderConfig` in `src/providers/openai-compatible.ts`:12:8
133
- - `interface` `OpenAICompatibleStreamInput` in `src/providers/base.ts`:86:8
134
- - `interface` `PromptForModelOptions` in `src/cli/helpers/providerPrompts.ts`:44:1
135
- - `interface` `PromptForProviderOptions` in `src/cli/helpers/providerPrompts.ts`:39:1
136
- - `interface` `Provider` in `src/providers/base.ts`:65:8
137
- - `interface` `ProviderMessage` in `src/providers/base.ts`:41:8
138
- - `interface` `ProviderToolCall` in `src/providers/base.ts`:35:8
139
- - `interface` `ProviderToolCallPayload` in `src/providers/base.ts`:26:8
140
- - `interface` `ProviderToolDefinition` in `src/providers/base.ts`:17:8
141
- - `interface` `SchemaMigration` in `src/storage/schema.ts`:5:8
142
- - `interface` `SearchResult` in `src/browser/browser.ts`:15:8
143
- - `interface` `StreamChatRequest` in `src/providers/base.ts`:49:8
144
- - `interface` `UpdatePrimaryAgentProviderModelInput` in `src/storage/db.ts`:50:8
145
- - `interface` `UpsertAgentInput` in `src/storage/db.ts`:27:8
146
- - `method` `completeChat` in `src/providers/openai-compatible.ts`:62:3
147
- - `method` `constructor` in `src/providers/anthropic.ts`:27:3
148
- - `method` `constructor` in `src/providers/google.ts`:8:3
149
- - `method` `constructor` in `src/providers/groq.ts`:8:3
150
- - `method` `constructor` in `src/providers/mistral.ts`:8:3
151
- - `method` `constructor` in `src/providers/ollama.ts`:8:3
152
- - `method` `constructor` in `src/providers/openai.ts`:8:3
153
- - `method` `constructor` in `src/providers/openrouter.ts`:8:3
154
- - `method` `constructor` in `src/providers/together.ts`:8:3
155
- - `method` `constructor` in `src/providers/base.ts`:73:3
156
- - `method` `constructor` in `src/providers/base.ts`:80:3
157
- - `method` `constructor` in `src/providers/openai-compatible.ts`:32:3
158
- - `method` `streamChat` in `src/providers/anthropic.ts`:32:3
159
- - `method` `streamChat` in `src/providers/openai-compatible.ts`:42:3
160
- - `type` `HiveDatabase` in `src/storage/db.ts`:18:8
161
- - `type` `HostedProviderName` in `src/cli/helpers/providerPrompts.ts`:6:1
162
- - `type` `MessageRole` in `src/storage/schema.ts`:3:8
163
- - `type` `ProviderMessageRole` in `src/providers/base.ts`:15:8
164
- - `type` `ProviderName` in `src/providers/base.ts`:14:8
165
- - `variable` `agent` in `src/cli/commands/config.ts`:76:5
166
- - `variable` `agent` in `src/cli/commands/config.ts`:145:5
167
- - `variable` `agent` in `src/cli/commands/config.ts`:188:5
168
- - `variable` `agent` in `src/cli/commands/config.ts`:231:5
169
- - `variable` `agent` in `src/cli/commands/status.ts`:41:5
170
- - `variable` `AGENT_PROFILE_COLUMNS` in `src/storage/db.ts`:58:1
171
- - `variable` `anchorPattern` in `src/browser/browser.ts`:161:3
172
- - `variable` `anchorPattern` in `src/browser/browser.ts`:196:3
173
- - `variable` `answer` in `src/cli/helpers/providerPrompts.ts`:52:3
174
- - `variable` `answer` in `src/cli/helpers/providerPrompts.ts`:83:7
175
- - `variable` `answer` in `src/cli/helpers/providerPrompts.ts`:106:5
176
- - `variable` `answer` in `src/cli/helpers/providerPrompts.ts`:124:3
177
- - `variable` `answer` in `src/cli/commands/config.ts`:98:7
178
- - `variable` `answer` in `src/cli/commands/config.ts`:200:5
179
- - `variable` `ANTHROPIC_API_URL` in `src/providers/anthropic.ts`:13:1
180
- - `variable` `apiKey` in `src/providers/anthropic.ts`:99:3
181
- - `variable` `apiKey` in `src/providers/google.ts`:19:3
182
- - `variable` `apiKey` in `src/providers/groq.ts`:19:3
183
- - `variable` `apiKey` in `src/providers/mistral.ts`:19:3
184
- - `variable` `apiKey` in `src/providers/ollama.ts`:20:3
185
- - `variable` `apiKey` in `src/providers/openai.ts`:19:3
186
- - `variable` `apiKey` in `src/providers/openrouter.ts`:19:3
187
- - `variable` `apiKey` in `src/providers/together.ts`:19:3
188
- - `variable` `apiKey` in `src/cli/commands/config.ts`:96:5
189
- - `variable` `apiKey` in `src/cli/commands/config.ts`:261:3
190
- - `variable` `appliedRows` in `src/storage/db.ts`:108:3
191
- - `variable` `appliedVersions` in `src/storage/db.ts`:111:3
192
- - `variable` `applyMigration` in `src/storage/db.ts`:118:5
193
- - `variable` `argv` in `src/cli/index.ts`:27:1
194
- - `variable` `asRecord` in `src/providers/base.ts`:347:11
195
- - `variable` `body` in `src/providers/base.ts`:131:3
196
- - `variable` `body` in `src/providers/base.ts`:204:3
197
- - `variable` `body` in `src/browser/browser.ts`:338:3
198
- - `variable` `bodyText` in `src/providers/anthropic.ts`:64:7
199
- - `variable` `bodyText` in `src/providers/base.ts`:403:3
200
- - `variable` `browser` in `src/browser/browser.ts`:41:5
201
- - `variable` `browser` in `src/browser/browser.ts`:95:3
202
- - `variable` `BROWSER_TIMEOUT_MS` in `src/browser/browser.ts`:8:1
203
- - `variable` `browserResults` in `src/browser/browser.ts`:39:3
204
- - `variable` `buffer` in `src/providers/base.ts`:260:3
205
- - `variable` `cachedVersion` in `src/cli/ui.ts`:19:1
206
- - `variable` `callArguments` in `src/providers/base.ts`:381:5
207
- - `variable` `callFunction` in `src/providers/base.ts`:379:5
208
- - `variable` `callId` in `src/providers/base.ts`:378:5
209
- - `variable` `callName` in `src/providers/base.ts`:380:5
210
- - `variable` `callRecord` in `src/providers/base.ts`:377:5
211
- - `variable` `calls` in `src/providers/base.ts`:371:3
212
- - `variable` `codePoint` in `src/browser/browser.ts`:399:7
213
- - `variable` `codePoint` in `src/browser/browser.ts`:404:7
214
- - `variable` `columns` in `src/cli/ui.ts`:100:3
215
- - `variable` `COMMAND_CENTRE_LABEL` in `src/cli/ui.ts`:15:1
216
- - `variable` `commandCentreTitle` in `src/cli/ui.ts`:33:3
217
- - `variable` `commandName` in `src/cli/index.ts`:61:3
218
- - `variable` `configCommand` in `src/cli/commands/config.ts`:30:3
219
- - `variable` `confirmation` in `src/cli/commands/nuke.ts`:41:3
220
- - `variable` `content` in `src/providers/base.ts`:246:3
221
- - `variable` `contentBlock` in `src/providers/anthropic.ts`:117:5
222
- - `variable` `controller` in `src/cli/helpers/providerPrompts.ts`:141:3
223
- - `variable` `CURRENT_SCHEMA_VERSION` in `src/storage/schema.ts`:11:8
224
- - `variable` `currentModel` in `src/cli/commands/config.ts`:84:5
225
- - `variable` `currentModel` in `src/cli/commands/config.ts`:153:5
226
- - `variable` `currentProvider` in `src/cli/commands/config.ts`:83:5
227
- - `variable` `data` in `src/providers/base.ts`:270:7
228
- - `variable` `date` in `src/cli/commands/status.ts`:131:3
229
- - `variable` `db` in `src/storage/db.ts`:77:3
230
- - `variable` `db` in `src/cli/commands/config.ts`:71:3
231
- - `variable` `db` in `src/cli/commands/config.ts`:140:3
232
- - `variable` `db` in `src/cli/commands/config.ts`:183:3
233
- - `variable` `db` in `src/cli/commands/config.ts`:228:3
234
- - `variable` `db` in `src/cli/commands/status.ts`:38:3
235
- - `variable` `dbPath` in `src/cli/commands/status.ts`:49:5
236
- - `variable` `dbSizeBytes` in `src/cli/commands/status.ts`:51:5
237
- - `variable` `decoded` in `src/browser/browser.ts`:376:3
238
- - `variable` `DEFAULT_ANTHROPIC_MODEL` in `src/providers/anthropic.ts`:14:1
239
- - `variable` `DEFAULT_GOOGLE_BASE_URL` in `src/providers/google.ts`:4:1
240
- - `variable` `DEFAULT_GOOGLE_MODEL` in `src/providers/google.ts`:5:1
241
- - `variable` `DEFAULT_GROQ_BASE_URL` in `src/providers/groq.ts`:4:1
242
- - `variable` `DEFAULT_GROQ_MODEL` in `src/providers/groq.ts`:5:1
243
- - `variable` `DEFAULT_MISTRAL_BASE_URL` in `src/providers/mistral.ts`:4:1
244
- - `variable` `DEFAULT_MISTRAL_MODEL` in `src/providers/mistral.ts`:5:1
245
- - `variable` `DEFAULT_OLLAMA_BASE_URL` in `src/providers/ollama.ts`:4:1
246
- - `variable` `DEFAULT_OLLAMA_MODEL` in `src/providers/ollama.ts`:5:1
247
- - `variable` `DEFAULT_OPENAI_BASE_URL` in `src/providers/openai.ts`:4:1
248
- - `variable` `DEFAULT_OPENAI_MODEL` in `src/providers/openai.ts`:5:1
249
- - `variable` `DEFAULT_OPENROUTER_BASE_URL` in `src/providers/openrouter.ts`:4:1
250
- - `variable` `DEFAULT_OPENROUTER_MODEL` in `src/providers/openrouter.ts`:5:1
251
- - `variable` `DEFAULT_REQUEST_HEADERS` in `src/browser/browser.ts`:9:1
252
- - `variable` `DEFAULT_TOGETHER_BASE_URL` in `src/providers/together.ts`:4:1
253
- - `variable` `DEFAULT_TOGETHER_MODEL` in `src/providers/together.ts`:5:1
254
- - `variable` `defaultModel` in `src/cli/helpers/providerPrompts.ts`:119:3
255
- - `variable` `defaultSelection` in `src/cli/helpers/providerPrompts.ts`:78:7
256
- - `variable` `delta` in `src/providers/anthropic.ts`:124:5
257
- - `variable` `delta` in `src/providers/anthropic.ts`:131:5
258
- - `variable` `delta` in `src/providers/base.ts`:175:5
259
- - `variable` `details` in `src/providers/base.ts`:404:3
260
- - `variable` `endpoint` in `src/providers/base.ts`:120:3
261
- - `variable` `endpoint` in `src/providers/base.ts`:193:3
262
- - `variable` `error` in `src/providers/anthropic.ts`:81:9
263
- - `variable` `errorMessage` in `src/providers/base.ts`:164:5
264
- - `variable` `errorMessage` in `src/providers/base.ts`:233:3
265
- - `variable` `eventBoundary` in `src/providers/base.ts`:265:5
266
- - `variable` `existing` in `src/storage/db.ts`:215:3
267
- - `variable` `existing` in `src/storage/db.ts`:318:3
268
- - `variable` `existing` in `src/storage/db.ts`:330:3
269
- - `variable` `existingColumns` in `src/storage/db.ts`:141:3
270
- - `variable` `fallbackMessage` in `src/cli/helpers/providerPrompts.ts`:101:5
271
- - `variable` `fallbackResults` in `src/browser/browser.ts`:82:3
272
- - `variable` `filtered` in `src/providers/anthropic.ts`:104:3
273
- - `variable` `firstChoice` in `src/providers/base.ts`:174:5
274
- - `variable` `firstChoice` in `src/providers/base.ts`:243:3
275
- - `variable` `hadSuccessfulRequest` in `src/browser/browser.ts`:118:3
276
- - `variable` `headers` in `src/providers/base.ts`:122:3
277
- - `variable` `headers` in `src/providers/base.ts`:195:3
278
- - `variable` `HIVE_DB_FILENAME` in `src/storage/db.ts`:56:8
279
- - `variable` `HIVE_DIRECTORY_NAME` in `src/storage/db.ts`:55:8
280
- - `variable` `home` in `src/cli/commands/status.ts`:140:3
281
- - `variable` `hostname` in `src/browser/browser.ts`:293:5
282
- - `variable` `html` in `src/browser/browser.ts`:60:9
283
- - `variable` `html` in `src/browser/browser.ts`:100:5
284
- - `variable` `html` in `src/browser/browser.ts`:108:3
285
- - `variable` `html` in `src/browser/browser.ts`:121:5
286
- - `variable` `id` in `src/storage/db.ts`:264:3
287
- - `variable` `id` in `src/storage/db.ts`:366:3
288
- - `variable` `id` in `src/storage/db.ts`:425:3
289
- - `variable` `initializedRaw` in `src/cli/commands/status.ts`:53:5
290
- - `variable` `initialSchemaSql` in `src/storage/schema.ts`:13:1
291
- - `variable` `key` in `src/cli/commands/status.ts`:79:3
292
- - `variable` `KEYCHAIN_SERVICE` in `src/providers/api-key.ts`:5:1
293
- - `variable` `KEYCHAIN_SERVICE` in `src/cli/commands/config.ts`:27:1
294
- - `variable` `KEYCHAIN_SERVICE` in `src/cli/commands/nuke.ts`:17:1
295
- - `variable` `KEYCHAIN_SERVICE` in `src/cli/commands/status.ts`:24:1
296
- - `variable` `keychainValue` in `src/providers/api-key.ts`:11:3
297
- - `variable` `keyStatus` in `src/cli/commands/config.ts`:238:5
298
- - `variable` `keyStatus` in `src/cli/commands/status.ts`:48:5
299
- - `variable` `lastError` in `src/browser/browser.ts`:117:3
300
- - `variable` `leftPadding` in `src/cli/ui.ts`:113:3
301
- - `variable` `lines` in `src/providers/base.ts`:292:3
302
- - `variable` `match` in `src/browser/browser.ts`:163:3
303
- - `variable` `match` in `src/browser/browser.ts`:199:3
304
- - `variable` `match` in `src/browser/browser.ts`:361:3
305
- - `variable` `MAX_CONTENT_CHARS` in `src/browser/browser.ts`:4:1
306
- - `variable` `MAX_SEPARATOR_WIDTH` in `src/cli/ui.ts`:16:1
307
- - `variable` `maybeChoices` in `src/providers/base.ts`:169:5
308
- - `variable` `maybeChoices` in `src/providers/base.ts`:238:3
309
- - `variable` `maybeError` in `src/providers/base.ts`:314:3
310
- - `variable` `message` in `src/providers/anthropic.ts`:82:9
311
- - `variable` `message` in `src/providers/base.ts`:244:3
312
- - `variable` `message` in `src/providers/base.ts`:320:5
313
- - `variable` `MESSAGE_ROLES` in `src/storage/schema.ts`:1:8
314
- - `variable` `messages` in `src/providers/anthropic.ts`:44:5
315
- - `variable` `MIGRATIONS` in `src/storage/schema.ts`:62:8
316
- - `variable` `MIN_SEPARATOR_WIDTH` in `src/cli/ui.ts`:17:1
317
- - `variable` `model` in `src/cli/commands/config.ts`:92:5
318
- - `variable` `model` in `src/cli/commands/config.ts`:158:5
319
- - `variable` `MODEL_CHOICES_BY_PROVIDER` in `src/cli/helpers/providerPrompts.ts`:10:1
320
- - `variable` `modelChoices` in `src/cli/helpers/providerPrompts.ts`:118:3
321
- - `variable` `namedEntities` in `src/browser/browser.ts`:388:3
322
- - `variable` `normalized` in `src/providers/base.ts`:107:3
323
- - `variable` `normalized` in `src/browser/browser.ts`:377:3
324
- - `variable` `normalizedTitle` in `src/cli/ui.ts`:32:3
325
- - `variable` `NUKE_CONFIRMATION` in `src/cli/commands/nuke.ts`:18:1
326
- - `variable` `OLLAMA_TAGS_URL` in `src/cli/helpers/providerPrompts.ts`:8:1
327
- - `variable` `ollamaModels` in `src/cli/helpers/providerPrompts.ts`:75:5
328
- - `variable` `paddedLabel` in `src/cli/commands/status.ts`:91:3
329
- - `variable` `page` in `src/browser/browser.ts`:44:7
330
- - `variable` `page` in `src/browser/browser.ts`:98:5
331
- - `variable` `params` in `src/browser/browser.ts`:233:5
332
- - `variable` `parsed` in `src/browser/browser.ts`:278:5
333
- - `variable` `parsed` in `src/cli/ui.ts`:73:5
334
- - `variable` `parsedUrl` in `src/browser/browser.ts`:169:7
335
- - `variable` `parsedUrl` in `src/browser/browser.ts`:202:5
336
- - `variable` `pattern` in `src/browser/browser.ts`:368:5
337
- - `variable` `payload` in `src/cli/helpers/providerPrompts.ts`:155:5
338
- - `variable` `payload` in `src/providers/anthropic.ts`:75:7
339
- - `variable` `payload` in `src/providers/base.ts`:159:5
340
- - `variable` `payload` in `src/providers/base.ts`:232:3
341
- - `variable` `prioritized` in `src/browser/browser.ts`:340:3
342
- - `variable` `program` in `src/cli/index.ts`:14:1
343
- - `variable` `promptFiles` in `src/cli/commands/status.ts`:52:5
344
- - `variable` `promptMessage` in `src/cli/helpers/providerPrompts.ts`:72:3
345
- - `variable` `PROMPTS_DIRECTORY` in `src/cli/commands/status.ts`:25:1
346
- - `variable` `promptsPath` in `src/cli/commands/status.ts`:50:5
347
- - `variable` `provider` in `src/cli/commands/config.ts`:89:5
348
- - `variable` `provider` in `src/cli/commands/config.ts`:152:5
349
- - `variable` `provider` in `src/cli/commands/config.ts`:195:5
350
- - `variable` `provider` in `src/cli/commands/config.ts`:237:5
351
- - `variable` `provider` in `src/cli/commands/status.ts`:47:5
352
- - `variable` `q` in `src/browser/browser.ts`:234:5
353
- - `variable` `queryString` in `src/browser/browser.ts`:232:5
354
- - `variable` `raw` in `src/cli/ui.ts`:72:5
355
- - `variable` `rawContent` in `src/providers/base.ts`:334:3
356
- - `variable` `rawEvent` in `src/providers/base.ts`:267:7
357
- - `variable` `rawHref` in `src/browser/browser.ts`:165:5
358
- - `variable` `rawHref` in `src/browser/browser.ts`:201:5
359
- - `variable` `rawToolCalls` in `src/providers/base.ts`:366:3
360
- - `variable` `remaining` in `src/providers/base.ts`:279:3
361
- - `variable` `resolvedName` in `src/providers/index.ts`:16:3
362
- - `variable` `response` in `src/cli/helpers/providerPrompts.ts`:147:5
363
- - `variable` `response` in `src/providers/anthropic.ts`:46:5
364
- - `variable` `response` in `src/providers/base.ts`:146:3
365
- - `variable` `response` in `src/providers/base.ts`:224:3
366
- - `variable` `response` in `src/browser/browser.ts`:147:3
367
- - `variable` `results` in `src/browser/browser.ts`:61:9
368
- - `variable` `results` in `src/browser/browser.ts`:130:5
369
- - `variable` `results` in `src/browser/browser.ts`:159:3
370
- - `variable` `results` in `src/browser/browser.ts`:194:3
371
- - `variable` `rl` in `src/cli/commands/nuke.ts`:35:3
372
- - `variable` `row` in `src/storage/db.ts`:157:3
373
- - `variable` `row` in `src/storage/db.ts`:177:3
374
- - `variable` `row` in `src/storage/db.ts`:185:3
375
- - `variable` `row` in `src/storage/db.ts`:389:3
376
- - `variable` `row` in `src/storage/db.ts`:406:3
377
- - `variable` `SEARCH_RESULT_LIMIT` in `src/browser/browser.ts`:5:1
378
- - `variable` `SEARCH_SNIPPET_CHARS` in `src/browser/browser.ts`:6:1
379
- - `variable` `SEARCH_WINDOW_CHARS` in `src/browser/browser.ts`:7:1
380
- - `variable` `searchUrls` in `src/browser/browser.ts`:45:7
381
- - `variable` `searchUrls` in `src/browser/browser.ts`:113:3
382
- - `variable` `seenUrls` in `src/browser/browser.ts`:160:3
383
- - `variable` `seenUrls` in `src/browser/browser.ts`:195:3
384
- - `variable` `separator` in `src/cli/ui.ts`:23:3
385
- - `variable` `snippet` in `src/browser/browser.ts`:173:11
386
- - `variable` `snippet` in `src/browser/browser.ts`:207:9
387
- - `variable` `snippet` in `src/browser/browser.ts`:329:3
388
- - `variable` `snippetMatch` in `src/browser/browser.ts`:316:3
389
- - `variable` `spinner` in `src/cli/commands/config.ts`:70:3
390
- - `variable` `spinner` in `src/cli/commands/config.ts`:139:3
391
- - `variable` `spinner` in `src/cli/commands/config.ts`:182:3
392
- - `variable` `start` in `src/providers/base.ts`:286:8
393
- - `variable` `stripped` in `src/browser/browser.ts`:366:3
394
- - `variable` `SUPPORTED_PROVIDER_NAMES` in `src/providers/base.ts`:3:8
395
- - `variable` `system` in `src/providers/anthropic.ts`:39:5
396
- - `variable` `tableInfo` in `src/storage/db.ts`:138:3
397
- - `variable` `target` in `src/browser/browser.ts`:279:5
398
- - `variable` `terminalWidth` in `src/cli/ui.ts`:22:3
399
- - `variable` `text` in `src/providers/anthropic.ts`:90:7
400
- - `variable` `text` in `src/providers/base.ts`:177:5
401
- - `variable` `text` in `src/browser/browser.ts`:351:3
402
- - `variable` `timeout` in `src/cli/helpers/providerPrompts.ts`:142:3
403
- - `variable` `timestamp` in `src/storage/db.ts`:216:3
404
- - `variable` `timestamp` in `src/storage/db.ts`:344:3
405
- - `variable` `timestamp` in `src/storage/db.ts`:367:3
406
- - `variable` `timestamp` in `src/storage/db.ts`:426:3
407
- - `variable` `title` in `src/browser/browser.ts`:171:9
408
- - `variable` `title` in `src/browser/browser.ts`:205:7
409
- - `variable` `titleMatch` in `src/browser/browser.ts`:166:5
410
- - `variable` `toolCalls` in `src/providers/base.ts`:247:3
411
- - `variable` `trimmed` in `src/cli/ui.ts`:87:3
412
- - `variable` `trimmedQuery` in `src/browser/browser.ts`:34:3
413
- - `variable` `unitIndex` in `src/cli/commands/status.ts`:115:3
414
- - `variable` `units` in `src/cli/commands/status.ts`:114:3
415
- - `variable` `updatedAgent` in `src/cli/commands/config.ts`:113:5
416
- - `variable` `updatedAgent` in `src/cli/commands/config.ts`:164:5
417
- - `variable` `url` in `src/browser/browser.ts`:292:5
418
- - `variable` `usableWidth` in `src/cli/ui.ts`:118:3
419
- - `variable` `value` in `src/cli/commands/status.ts`:116:3
420
- - `variable` `window` in `src/browser/browser.ts`:315:3
421
- - `variable` `withoutLayout` in `src/browser/browser.ts`:344:3
422
- - `variable` `withoutNoise` in `src/browser/browser.ts`:339:3
423
- - `variable` `withoutTags` in `src/browser/browser.ts`:375:3
424
- - `variable` `WORDMARK_LINES` in `src/cli/ui.ts`:6:1
425
- - `variable` `writeMessage` in `src/storage/db.ts`:428:3
@@ -1,43 +0,0 @@
1
- # ADR 001 — Local-First SQLite Storage
2
-
3
- **Status:** Accepted
4
- **Date:** 2025
5
-
6
- ---
7
-
8
- ## Decision
9
-
10
- All agent data — persona, episodic memory, knowledge graph, task history, audit logs — is stored locally in SQLite. Nothing is sent to a remote database. Nothing requires a cloud account.
11
-
12
- ---
13
-
14
- ## Why
15
-
16
- The Hive's core promise is that your agent is yours. Completely. That promise breaks the moment user data touches an external server we control.
17
-
18
- SQLite is:
19
- - Fast enough for everything we need
20
- - Zero dependency — ships as a single file
21
- - Battle-tested at massive scale
22
- - Already used by Genie (consistency)
23
- - Trivially encryptable at rest
24
-
25
- ---
26
-
27
- ## What We Rejected
28
-
29
- **Postgres/MySQL** — requires a running server, adds ops complexity, external dependency. Rejected.
30
-
31
- **Cloud databases (Supabase, Firebase, etc.)** — violates local-first principle entirely. Rejected.
32
-
33
- **File-based JSON storage** — no query capability, no transactions, breaks under concurrent access. Rejected.
34
-
35
- ---
36
-
37
- ## Consequences
38
-
39
- - User data never leaves the machine by default
40
- - Air gap mode works trivially — nothing to disconnect
41
- - Backup is just copying a file
42
- - We need to handle SQLite migrations carefully as schema evolves
43
- - Multi-device sync is a future problem we defer intentionally
@@ -1,71 +0,0 @@
1
- # ADR 003 — 3-Layer Memory Architecture
2
-
3
- **Status:** Accepted
4
- **Date:** 2025
5
-
6
- ---
7
-
8
- ## Decision
9
-
10
- Agent memory is split into three distinct layers, each with a different lifecycle and purpose:
11
-
12
- 1. **Core Persona** — compressed personality snapshot
13
- 2. **Episodic Memory** — recent events as semantic embeddings
14
- 3. **Knowledge Graph** — permanent hard facts
15
-
16
- ---
17
-
18
- ## Why
19
-
20
- A naive approach — appending every conversation to a growing context — fails in two ways: it hits token limits fast, and it treats a 3-year-old interaction the same as a conversation from this morning.
21
-
22
- Human memory doesn't work that way. Some things are permanent (your name, your profession). Some things are recent and contextually relevant (what you worked on this week). Some things define who you are at a level that doesn't need raw recall — just influences behavior.
23
-
24
- ---
25
-
26
- ## Layer Details
27
-
28
- ### Core Persona
29
- - Rebuilt nightly by a compression process
30
- - Takes all interactions from the day, extracts what matters, rewrites the persona
31
- - Never grows — stays at a fixed token budget
32
- - Influences the system prompt on every conversation
33
-
34
- ### Episodic Memory
35
- - Recent interactions stored as vector embeddings (sqlite-vec)
36
- - Semantically searchable — retrieved by relevance, not recency alone
37
- - Rolling window — old episodes decay and are absorbed into persona
38
- - Answers "what happened recently that's relevant to this conversation"
39
-
40
- ### Knowledge Graph
41
- - Permanent hard facts — name, DOB, profession, relationships, preferences
42
- - Written explicitly (by user or extracted with high confidence)
43
- - Never expires, never decays
44
- - Tiny footprint — just structured facts
45
-
46
- ---
47
-
48
- ## Context Window Assembly
49
-
50
- On every agent invocation, context is assembled dynamically:
51
-
52
- ```
53
- system prompt
54
- + core persona (always)
55
- + relevant knowledge graph facts (filtered by relevance)
56
- + relevant episodic memories (top-k by embedding similarity)
57
- + conversation history (recent turns)
58
- + current task context
59
- ```
60
-
61
- Total context stays within budget. Always. No bloat.
62
-
63
- ---
64
-
65
- ## What We Rejected
66
-
67
- **Single growing context file** — hits token limits, no prioritization, expensive. Rejected.
68
-
69
- **External vector database** — adds dependency, breaks local-first. Rejected (sqlite-vec instead).
70
-
71
- **No memory** — stateless agent is just a chatbot. Not what we're building. Rejected.