@getlore/cli 0.2.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 (148) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +80 -0
  3. package/dist/cli/colors.d.ts +48 -0
  4. package/dist/cli/colors.js +48 -0
  5. package/dist/cli/commands/ask.d.ts +7 -0
  6. package/dist/cli/commands/ask.js +97 -0
  7. package/dist/cli/commands/auth.d.ts +10 -0
  8. package/dist/cli/commands/auth.js +484 -0
  9. package/dist/cli/commands/daemon.d.ts +22 -0
  10. package/dist/cli/commands/daemon.js +244 -0
  11. package/dist/cli/commands/docs.d.ts +7 -0
  12. package/dist/cli/commands/docs.js +188 -0
  13. package/dist/cli/commands/extensions.d.ts +7 -0
  14. package/dist/cli/commands/extensions.js +204 -0
  15. package/dist/cli/commands/misc.d.ts +7 -0
  16. package/dist/cli/commands/misc.js +172 -0
  17. package/dist/cli/commands/pending.d.ts +7 -0
  18. package/dist/cli/commands/pending.js +63 -0
  19. package/dist/cli/commands/projects.d.ts +7 -0
  20. package/dist/cli/commands/projects.js +136 -0
  21. package/dist/cli/commands/search.d.ts +7 -0
  22. package/dist/cli/commands/search.js +102 -0
  23. package/dist/cli/commands/skills.d.ts +24 -0
  24. package/dist/cli/commands/skills.js +447 -0
  25. package/dist/cli/commands/sources.d.ts +7 -0
  26. package/dist/cli/commands/sources.js +121 -0
  27. package/dist/cli/commands/sync.d.ts +31 -0
  28. package/dist/cli/commands/sync.js +768 -0
  29. package/dist/cli/helpers.d.ts +30 -0
  30. package/dist/cli/helpers.js +119 -0
  31. package/dist/core/auth.d.ts +62 -0
  32. package/dist/core/auth.js +330 -0
  33. package/dist/core/config.d.ts +41 -0
  34. package/dist/core/config.js +96 -0
  35. package/dist/core/data-repo.d.ts +31 -0
  36. package/dist/core/data-repo.js +146 -0
  37. package/dist/core/embedder.d.ts +22 -0
  38. package/dist/core/embedder.js +104 -0
  39. package/dist/core/git.d.ts +37 -0
  40. package/dist/core/git.js +140 -0
  41. package/dist/core/index.d.ts +4 -0
  42. package/dist/core/index.js +5 -0
  43. package/dist/core/insight-extractor.d.ts +26 -0
  44. package/dist/core/insight-extractor.js +114 -0
  45. package/dist/core/local-search.d.ts +43 -0
  46. package/dist/core/local-search.js +221 -0
  47. package/dist/core/themes.d.ts +15 -0
  48. package/dist/core/themes.js +77 -0
  49. package/dist/core/types.d.ts +177 -0
  50. package/dist/core/types.js +9 -0
  51. package/dist/core/user-settings.d.ts +15 -0
  52. package/dist/core/user-settings.js +42 -0
  53. package/dist/core/vector-store-lance.d.ts +98 -0
  54. package/dist/core/vector-store-lance.js +384 -0
  55. package/dist/core/vector-store-supabase.d.ts +89 -0
  56. package/dist/core/vector-store-supabase.js +295 -0
  57. package/dist/core/vector-store.d.ts +131 -0
  58. package/dist/core/vector-store.js +503 -0
  59. package/dist/daemon-runner.d.ts +8 -0
  60. package/dist/daemon-runner.js +246 -0
  61. package/dist/extensions/config.d.ts +22 -0
  62. package/dist/extensions/config.js +102 -0
  63. package/dist/extensions/proposals.d.ts +30 -0
  64. package/dist/extensions/proposals.js +178 -0
  65. package/dist/extensions/registry.d.ts +35 -0
  66. package/dist/extensions/registry.js +309 -0
  67. package/dist/extensions/sandbox.d.ts +16 -0
  68. package/dist/extensions/sandbox.js +17 -0
  69. package/dist/extensions/types.d.ts +114 -0
  70. package/dist/extensions/types.js +4 -0
  71. package/dist/extensions/worker.d.ts +1 -0
  72. package/dist/extensions/worker.js +49 -0
  73. package/dist/index.d.ts +17 -0
  74. package/dist/index.js +105 -0
  75. package/dist/mcp/handlers/archive-project.d.ts +51 -0
  76. package/dist/mcp/handlers/archive-project.js +112 -0
  77. package/dist/mcp/handlers/get-quotes.d.ts +27 -0
  78. package/dist/mcp/handlers/get-quotes.js +61 -0
  79. package/dist/mcp/handlers/get-source.d.ts +9 -0
  80. package/dist/mcp/handlers/get-source.js +40 -0
  81. package/dist/mcp/handlers/ingest.d.ts +25 -0
  82. package/dist/mcp/handlers/ingest.js +305 -0
  83. package/dist/mcp/handlers/list-projects.d.ts +4 -0
  84. package/dist/mcp/handlers/list-projects.js +16 -0
  85. package/dist/mcp/handlers/list-sources.d.ts +11 -0
  86. package/dist/mcp/handlers/list-sources.js +20 -0
  87. package/dist/mcp/handlers/research-agent.d.ts +21 -0
  88. package/dist/mcp/handlers/research-agent.js +369 -0
  89. package/dist/mcp/handlers/research.d.ts +22 -0
  90. package/dist/mcp/handlers/research.js +225 -0
  91. package/dist/mcp/handlers/retain.d.ts +18 -0
  92. package/dist/mcp/handlers/retain.js +92 -0
  93. package/dist/mcp/handlers/search.d.ts +52 -0
  94. package/dist/mcp/handlers/search.js +145 -0
  95. package/dist/mcp/handlers/sync.d.ts +47 -0
  96. package/dist/mcp/handlers/sync.js +211 -0
  97. package/dist/mcp/server.d.ts +10 -0
  98. package/dist/mcp/server.js +268 -0
  99. package/dist/mcp/tools.d.ts +16 -0
  100. package/dist/mcp/tools.js +297 -0
  101. package/dist/sync/config.d.ts +26 -0
  102. package/dist/sync/config.js +140 -0
  103. package/dist/sync/discover.d.ts +51 -0
  104. package/dist/sync/discover.js +190 -0
  105. package/dist/sync/index.d.ts +11 -0
  106. package/dist/sync/index.js +11 -0
  107. package/dist/sync/process.d.ts +50 -0
  108. package/dist/sync/process.js +285 -0
  109. package/dist/sync/processors.d.ts +24 -0
  110. package/dist/sync/processors.js +351 -0
  111. package/dist/tui/browse-handlers-ask.d.ts +30 -0
  112. package/dist/tui/browse-handlers-ask.js +372 -0
  113. package/dist/tui/browse-handlers-autocomplete.d.ts +49 -0
  114. package/dist/tui/browse-handlers-autocomplete.js +270 -0
  115. package/dist/tui/browse-handlers-extensions.d.ts +18 -0
  116. package/dist/tui/browse-handlers-extensions.js +107 -0
  117. package/dist/tui/browse-handlers-pending.d.ts +22 -0
  118. package/dist/tui/browse-handlers-pending.js +100 -0
  119. package/dist/tui/browse-handlers-research.d.ts +32 -0
  120. package/dist/tui/browse-handlers-research.js +363 -0
  121. package/dist/tui/browse-handlers-tools.d.ts +42 -0
  122. package/dist/tui/browse-handlers-tools.js +289 -0
  123. package/dist/tui/browse-handlers.d.ts +239 -0
  124. package/dist/tui/browse-handlers.js +1944 -0
  125. package/dist/tui/browse-render-extensions.d.ts +14 -0
  126. package/dist/tui/browse-render-extensions.js +114 -0
  127. package/dist/tui/browse-render-tools.d.ts +18 -0
  128. package/dist/tui/browse-render-tools.js +259 -0
  129. package/dist/tui/browse-render.d.ts +51 -0
  130. package/dist/tui/browse-render.js +599 -0
  131. package/dist/tui/browse-types.d.ts +142 -0
  132. package/dist/tui/browse-types.js +70 -0
  133. package/dist/tui/browse-ui.d.ts +10 -0
  134. package/dist/tui/browse-ui.js +432 -0
  135. package/dist/tui/browse.d.ts +17 -0
  136. package/dist/tui/browse.js +625 -0
  137. package/dist/tui/markdown.d.ts +22 -0
  138. package/dist/tui/markdown.js +223 -0
  139. package/package.json +71 -0
  140. package/plugins/claude-code/.claude-plugin/plugin.json +10 -0
  141. package/plugins/claude-code/.mcp.json +6 -0
  142. package/plugins/claude-code/skills/lore/SKILL.md +63 -0
  143. package/plugins/codex/SKILL.md +36 -0
  144. package/plugins/codex/agents/openai.yaml +10 -0
  145. package/plugins/gemini/GEMINI.md +31 -0
  146. package/plugins/gemini/gemini-extension.json +11 -0
  147. package/skills/generic-agent.md +99 -0
  148. package/skills/openclaw.md +67 -0
@@ -0,0 +1,289 @@
1
+ /**
2
+ * Tool handlers for the Lore Document Browser TUI
3
+ *
4
+ * Handles tool listing, form display, and execution.
5
+ */
6
+ import { renderToolsList, renderToolForm, renderToolResult } from './browse-render-tools.js';
7
+ import { getExtensionRegistry } from '../extensions/registry.js';
8
+ /**
9
+ * Parse tool input schema into form fields
10
+ */
11
+ export function parseInputSchema(inputSchema) {
12
+ if (!inputSchema || typeof inputSchema !== 'object')
13
+ return [];
14
+ const schema = inputSchema;
15
+ const properties = schema.properties && typeof schema.properties === 'object'
16
+ ? schema.properties
17
+ : {};
18
+ const required = Array.isArray(schema.required) ? schema.required : [];
19
+ const fields = [];
20
+ for (const [name, prop] of Object.entries(properties)) {
21
+ const propType = typeof prop === 'object' && prop ? prop.type : undefined;
22
+ let type = 'string';
23
+ if (propType === 'number' || propType === 'integer') {
24
+ type = 'number';
25
+ }
26
+ else if (propType === 'boolean') {
27
+ type = 'boolean';
28
+ }
29
+ else if (propType === 'string') {
30
+ type = 'string';
31
+ }
32
+ const description = typeof prop?.description === 'string' ? prop.description : '';
33
+ const defaultValue = prop?.default;
34
+ let value;
35
+ if (defaultValue !== undefined) {
36
+ if (type === 'boolean') {
37
+ value = Boolean(defaultValue);
38
+ }
39
+ else if (type === 'number') {
40
+ const numeric = typeof defaultValue === 'number' ? defaultValue : Number(defaultValue);
41
+ value = Number.isNaN(numeric) ? '' : numeric;
42
+ }
43
+ else {
44
+ value = String(defaultValue);
45
+ }
46
+ }
47
+ else if (type === 'boolean') {
48
+ value = false;
49
+ }
50
+ else {
51
+ value = '';
52
+ }
53
+ fields.push({
54
+ name,
55
+ type,
56
+ description,
57
+ default: defaultValue,
58
+ required: required.includes(name),
59
+ value,
60
+ });
61
+ }
62
+ return fields;
63
+ }
64
+ function setToolFormFields(state, tool) {
65
+ if (!tool || !tool.inputSchema) {
66
+ state.toolFormFields = [];
67
+ state.toolFormIndex = 0;
68
+ return;
69
+ }
70
+ state.toolFormFields = parseInputSchema(tool.inputSchema);
71
+ state.toolFormIndex = 0;
72
+ }
73
+ /**
74
+ * Show the tools list view
75
+ */
76
+ export async function showTools(state, ui) {
77
+ state.mode = 'tools';
78
+ state.toolResult = null;
79
+ ui.toolForm.hide();
80
+ ui.fullViewPane.hide();
81
+ ui.listPane.show();
82
+ ui.previewPane.show();
83
+ ui.listTitle.setContent(' Tools');
84
+ ui.previewTitle.setContent(' Tool Details');
85
+ ui.footer.setContent(' j/k: navigate Enter: run Esc: back q: quit');
86
+ ui.statusBar.setContent(' Loading tools...');
87
+ ui.screen.render();
88
+ try {
89
+ const registry = await getExtensionRegistry();
90
+ state.toolsList = registry.getToolDefinitions();
91
+ state.selectedToolIndex = 0;
92
+ ui.statusBar.setContent(` ${state.toolsList.length} tool${state.toolsList.length !== 1 ? 's' : ''}`);
93
+ setToolFormFields(state, state.toolsList[state.selectedToolIndex]);
94
+ }
95
+ catch (error) {
96
+ state.toolsList = [];
97
+ state.selectedToolIndex = 0;
98
+ state.toolFormFields = [];
99
+ state.toolFormIndex = 0;
100
+ ui.statusBar.setContent(` {red-fg}Failed to load tools: ${error}{/red-fg}`);
101
+ }
102
+ renderToolsList(ui, state);
103
+ renderToolResult(ui, state);
104
+ ui.listContent.focus();
105
+ ui.screen.render();
106
+ }
107
+ /**
108
+ * Update tool selection and refresh display
109
+ */
110
+ export function selectTool(state, ui) {
111
+ const tool = state.toolsList[state.selectedToolIndex];
112
+ setToolFormFields(state, tool);
113
+ renderToolsList(ui, state);
114
+ renderToolResult(ui, state);
115
+ if (!ui.toolForm.hidden) {
116
+ renderToolForm(ui, state);
117
+ }
118
+ ui.screen.render();
119
+ }
120
+ /**
121
+ * Show the tool input form
122
+ */
123
+ export function showToolForm(state, ui) {
124
+ const tool = state.toolsList[state.selectedToolIndex];
125
+ if (!tool)
126
+ return;
127
+ setToolFormFields(state, tool);
128
+ ui.toolForm.setLabel(` ${tool.name} `);
129
+ ui.toolForm.show();
130
+ renderToolForm(ui, state);
131
+ ui.footer.setContent(' Tab: next field Enter: run Esc: back');
132
+ ui.screen.render();
133
+ }
134
+ /**
135
+ * Hide the tool input form
136
+ */
137
+ export function hideToolForm(state, ui) {
138
+ ui.toolForm.hide();
139
+ ui.footer.setContent(' j/k: navigate Enter: run Esc: back q: quit');
140
+ ui.screen.render();
141
+ }
142
+ /**
143
+ * Move to next form field
144
+ */
145
+ export function formFieldNext(state, ui) {
146
+ if (state.toolFormFields.length === 0)
147
+ return;
148
+ state.toolFormIndex = (state.toolFormIndex + 1) % state.toolFormFields.length;
149
+ renderToolForm(ui, state);
150
+ ui.screen.render();
151
+ }
152
+ /**
153
+ * Move to previous form field
154
+ */
155
+ export function formFieldPrev(state, ui) {
156
+ if (state.toolFormFields.length === 0)
157
+ return;
158
+ state.toolFormIndex = (state.toolFormIndex - 1 + state.toolFormFields.length) % state.toolFormFields.length;
159
+ renderToolForm(ui, state);
160
+ ui.screen.render();
161
+ }
162
+ /**
163
+ * Update current form field value
164
+ */
165
+ export function formFieldUpdate(state, ui, value) {
166
+ const field = state.toolFormFields[state.toolFormIndex];
167
+ if (!field)
168
+ return;
169
+ field.value = value;
170
+ renderToolForm(ui, state);
171
+ ui.screen.render();
172
+ }
173
+ /**
174
+ * Execute the selected tool with current form values
175
+ */
176
+ export async function callTool(state, ui, dbPath, dataDir) {
177
+ const tool = state.toolsList[state.selectedToolIndex];
178
+ if (!tool)
179
+ return false;
180
+ const args = {};
181
+ const missing = [];
182
+ for (const field of state.toolFormFields) {
183
+ if (field.type === 'boolean') {
184
+ const value = Boolean(field.value);
185
+ if (value || field.required || field.default !== undefined) {
186
+ args[field.name] = value;
187
+ }
188
+ continue;
189
+ }
190
+ if (field.type === 'number') {
191
+ const raw = field.value === undefined || field.value === null ? '' : String(field.value);
192
+ if (!raw.trim()) {
193
+ if (field.required)
194
+ missing.push(field.name);
195
+ continue;
196
+ }
197
+ const numeric = Number(raw);
198
+ if (Number.isNaN(numeric)) {
199
+ state.toolResult = {
200
+ toolName: tool.name,
201
+ ok: false,
202
+ result: `Invalid number for "${field.name}"`,
203
+ };
204
+ renderToolResult(ui, state);
205
+ ui.screen.render();
206
+ return false;
207
+ }
208
+ args[field.name] = numeric;
209
+ continue;
210
+ }
211
+ const text = field.value === undefined || field.value === null ? '' : String(field.value);
212
+ if (!text.trim()) {
213
+ if (field.required)
214
+ missing.push(field.name);
215
+ continue;
216
+ }
217
+ args[field.name] = text;
218
+ }
219
+ if (missing.length > 0) {
220
+ state.toolResult = {
221
+ toolName: tool.name,
222
+ ok: false,
223
+ result: `Missing required field(s): ${missing.join(', ')}`,
224
+ };
225
+ renderToolResult(ui, state);
226
+ ui.screen.render();
227
+ return false;
228
+ }
229
+ state.toolRunning = true;
230
+ state.toolStartTime = Date.now();
231
+ // Hide form and show running state clearly
232
+ ui.toolForm.hide();
233
+ ui.statusBar.setContent(` ⏳ Running ${tool.name}... (this may take a moment)`);
234
+ state.toolResult = {
235
+ toolName: tool.name,
236
+ ok: true,
237
+ result: { status: 'running', message: 'Please wait...' },
238
+ };
239
+ renderToolResult(ui, state);
240
+ ui.screen.render();
241
+ try {
242
+ const registry = await getExtensionRegistry();
243
+ const result = await registry.handleToolCall(tool.name, args, {
244
+ mode: 'cli',
245
+ dataDir,
246
+ dbPath,
247
+ // Silence extension logs in TUI mode
248
+ logger: () => { },
249
+ });
250
+ state.toolRunning = false;
251
+ state.toolStartTime = null;
252
+ if (!result.handled) {
253
+ state.toolResult = {
254
+ toolName: tool.name,
255
+ ok: false,
256
+ result: 'Tool not found',
257
+ };
258
+ ui.statusBar.setContent(` {red-fg}✗ ${tool.name}: Tool not found{/red-fg}`);
259
+ }
260
+ else {
261
+ state.toolResult = {
262
+ toolName: tool.name,
263
+ ok: true,
264
+ result: result.result,
265
+ };
266
+ // Check if result contains a proposal - notify user
267
+ const resultObj = result.result;
268
+ if (resultObj && typeof resultObj === 'object' && 'proposal_id' in resultObj) {
269
+ ui.statusBar.setContent(` {green-fg}✓ ${tool.name} complete{/green-fg} — {yellow-fg}Press 'r' to review pending proposal{/yellow-fg}`);
270
+ }
271
+ else {
272
+ ui.statusBar.setContent(` {green-fg}✓ ${tool.name} complete{/green-fg}`);
273
+ }
274
+ }
275
+ }
276
+ catch (error) {
277
+ state.toolRunning = false;
278
+ state.toolStartTime = null;
279
+ state.toolResult = {
280
+ toolName: tool.name,
281
+ ok: false,
282
+ result: error instanceof Error ? error.message : String(error),
283
+ };
284
+ ui.statusBar.setContent(` {red-fg}✗ ${tool.name} failed{/red-fg}`);
285
+ }
286
+ renderToolResult(ui, state);
287
+ ui.screen.render();
288
+ return true;
289
+ }
@@ -0,0 +1,239 @@
1
+ /**
2
+ * Event handlers and operations for the Lore Document Browser TUI
3
+ *
4
+ * Contains navigation, search, editor integration, and mode switching.
5
+ */
6
+ import type { BrowserState, UIComponents } from './browse-types.js';
7
+ import type { SearchMode, SourceType } from '../core/types.js';
8
+ /**
9
+ * Helper to re-render ask/research pane when returning from pickers
10
+ * Exported so browse.ts can use it for autocomplete direct selection
11
+ */
12
+ export declare function renderReturnToAskOrResearch(state: BrowserState, ui: UIComponents, mode: 'ask' | 'research'): void;
13
+ /**
14
+ * Load full content for the selected document
15
+ */
16
+ export declare function loadFullContent(state: BrowserState, ui: UIComponents, dbPath: string, sourcesDir: string): Promise<void>;
17
+ /**
18
+ * Enter full view mode
19
+ */
20
+ export declare function enterFullView(state: BrowserState, ui: UIComponents, dbPath: string, sourcesDir: string): Promise<void>;
21
+ /**
22
+ * Exit full view mode
23
+ */
24
+ export declare function exitFullView(state: BrowserState, ui: UIComponents): void;
25
+ /**
26
+ * Enter semantic/hybrid search mode
27
+ */
28
+ export declare function enterSearch(state: BrowserState, ui: UIComponents): void;
29
+ /**
30
+ * Enter regex search mode
31
+ */
32
+ export declare function enterRegexSearch(state: BrowserState, ui: UIComponents): void;
33
+ /**
34
+ * Exit search mode
35
+ */
36
+ export declare function exitSearch(state: BrowserState, ui: UIComponents): void;
37
+ /**
38
+ * Enter document search mode (within full view)
39
+ */
40
+ export declare function enterDocSearch(state: BrowserState, ui: UIComponents): void;
41
+ /**
42
+ * Exit document search mode
43
+ */
44
+ export declare function exitDocSearch(state: BrowserState, ui: UIComponents, clearPattern?: boolean): void;
45
+ /**
46
+ * Apply document search pattern
47
+ */
48
+ export declare function applyDocSearch(state: BrowserState, ui: UIComponents, pattern: string): void;
49
+ /**
50
+ * Scroll to a specific match
51
+ */
52
+ export declare function scrollToMatch(state: BrowserState, ui: UIComponents, matchIdx: number): void;
53
+ /**
54
+ * Go to next match
55
+ */
56
+ export declare function nextMatch(state: BrowserState, ui: UIComponents): void;
57
+ /**
58
+ * Go to previous match
59
+ */
60
+ export declare function prevMatch(state: BrowserState, ui: UIComponents): void;
61
+ /**
62
+ * Apply search filter
63
+ */
64
+ export declare function applyFilter(state: BrowserState, ui: UIComponents, query: string, filterMode: SearchMode, dbPath: string, dataDir: string, project?: string, sourceType?: SourceType): Promise<void>;
65
+ /**
66
+ * Show help overlay
67
+ */
68
+ export declare function showHelp(state: BrowserState, ui: UIComponents): void;
69
+ /**
70
+ * Hide help overlay
71
+ */
72
+ export declare function hideHelp(state: BrowserState, ui: UIComponents): void;
73
+ export declare function openInEditor(state: BrowserState, ui: UIComponents, sourcesDir: string): Promise<void>;
74
+ export declare function moveDown(state: BrowserState, ui: UIComponents): void;
75
+ export declare function moveUp(state: BrowserState, ui: UIComponents): void;
76
+ export declare function pageDown(state: BrowserState, ui: UIComponents): void;
77
+ export declare function pageUp(state: BrowserState, ui: UIComponents): void;
78
+ export declare function jumpToEnd(state: BrowserState, ui: UIComponents): void;
79
+ export declare function jumpToStart(state: BrowserState, ui: UIComponents): void;
80
+ /**
81
+ * Trigger a manual sync
82
+ */
83
+ export declare function triggerSync(state: BrowserState, ui: UIComponents, dbPath: string, dataDir: string, project?: string, sourceType?: SourceType): Promise<void>;
84
+ /**
85
+ * Load projects and show the project picker
86
+ */
87
+ export declare function showProjectPicker(state: BrowserState, ui: UIComponents, dbPath: string): Promise<void>;
88
+ /**
89
+ * Render the project picker content
90
+ */
91
+ export declare function renderProjectPicker(state: BrowserState, ui: UIComponents): void;
92
+ /**
93
+ * Navigate project picker down
94
+ */
95
+ export declare function projectPickerDown(state: BrowserState, ui: UIComponents): void;
96
+ /**
97
+ * Navigate project picker up
98
+ */
99
+ export declare function projectPickerUp(state: BrowserState, ui: UIComponents): void;
100
+ /**
101
+ * Select current project and filter documents
102
+ */
103
+ export declare function selectProject(state: BrowserState, ui: UIComponents, dbPath: string, dataDir: string, sourceType?: SourceType): Promise<void>;
104
+ /**
105
+ * Cancel project picker
106
+ */
107
+ export declare function cancelProjectPicker(state: BrowserState, ui: UIComponents): void;
108
+ /**
109
+ * Clear project filter (show all)
110
+ */
111
+ export declare function clearProjectFilter(state: BrowserState, ui: UIComponents, dbPath: string, dataDir: string, sourceType?: SourceType): Promise<void>;
112
+ /**
113
+ * Show delete confirmation dialog (for document or project)
114
+ */
115
+ export declare function showDeleteConfirm(state: BrowserState, ui: UIComponents): void;
116
+ /**
117
+ * Cancel delete operation
118
+ */
119
+ export declare function cancelDelete(state: BrowserState, ui: UIComponents): void;
120
+ /**
121
+ * Confirm and execute delete operation (document or project)
122
+ */
123
+ export declare function confirmDelete(state: BrowserState, ui: UIComponents, dbPath: string, dataDir: string, project?: string, sourceType?: import('../core/types.js').SourceType): Promise<void>;
124
+ /**
125
+ * Copy current view content to clipboard
126
+ */
127
+ export declare function copyCurrentContent(state: BrowserState, ui: UIComponents): Promise<void>;
128
+ /**
129
+ * Show move picker to relocate a document to a different project
130
+ */
131
+ export declare function showMovePicker(state: BrowserState, ui: UIComponents, dbPath: string): Promise<void>;
132
+ /**
133
+ * Render the move picker UI
134
+ */
135
+ export declare function renderMovePicker(state: BrowserState, ui: UIComponents): void;
136
+ /**
137
+ * Navigate down in move picker
138
+ */
139
+ export declare function movePickerDown(state: BrowserState, ui: UIComponents): void;
140
+ /**
141
+ * Navigate up in move picker
142
+ */
143
+ export declare function movePickerUp(state: BrowserState, ui: UIComponents): void;
144
+ /**
145
+ * Confirm move to selected project
146
+ */
147
+ export declare function confirmMove(state: BrowserState, ui: UIComponents, dbPath: string, dataDir: string, sourceType?: SourceType): Promise<void>;
148
+ /**
149
+ * Cancel move picker
150
+ */
151
+ export declare function cancelMovePicker(state: BrowserState, ui: UIComponents): void;
152
+ /**
153
+ * Enter edit info mode for the selected document
154
+ */
155
+ export declare function enterEditInfo(state: BrowserState, ui: UIComponents): void;
156
+ /**
157
+ * Save edit info changes
158
+ */
159
+ export declare function saveEditInfo(state: BrowserState, ui: UIComponents, dbPath: string, sourceType?: SourceType): Promise<void>;
160
+ /**
161
+ * Exit edit info mode without saving
162
+ */
163
+ export declare function exitEditInfo(state: BrowserState, ui: UIComponents): void;
164
+ /**
165
+ * Show type picker to change document content type
166
+ */
167
+ export declare function showTypePicker(state: BrowserState, ui: UIComponents): void;
168
+ /**
169
+ * Render the type picker UI
170
+ */
171
+ export declare function renderTypePicker(state: BrowserState, ui: UIComponents): void;
172
+ /**
173
+ * Navigate down in type picker
174
+ */
175
+ export declare function typePickerDown(state: BrowserState, ui: UIComponents): void;
176
+ /**
177
+ * Navigate up in type picker
178
+ */
179
+ export declare function typePickerUp(state: BrowserState, ui: UIComponents): void;
180
+ /**
181
+ * Confirm type selection
182
+ */
183
+ export declare function confirmTypeChange(state: BrowserState, ui: UIComponents, dbPath: string, sourceType?: SourceType): Promise<void>;
184
+ /**
185
+ * Cancel type picker
186
+ */
187
+ export declare function cancelTypePicker(state: BrowserState, ui: UIComponents): void;
188
+ /**
189
+ * Show content type filter picker
190
+ */
191
+ export declare function showContentTypeFilter(state: BrowserState, ui: UIComponents): void;
192
+ /**
193
+ * Render the content type filter UI
194
+ */
195
+ export declare function renderContentTypeFilter(state: BrowserState, ui: UIComponents): void;
196
+ /**
197
+ * Navigate down in content type filter
198
+ */
199
+ export declare function contentTypeFilterDown(state: BrowserState, ui: UIComponents): void;
200
+ /**
201
+ * Navigate up in content type filter
202
+ */
203
+ export declare function contentTypeFilterUp(state: BrowserState, ui: UIComponents): void;
204
+ /**
205
+ * Apply content type filter
206
+ */
207
+ export declare function applyContentTypeFilter(state: BrowserState, ui: UIComponents, dbPath: string, dataDir: string, sourceType?: SourceType): Promise<void>;
208
+ /**
209
+ * Cancel content type filter picker
210
+ */
211
+ export declare function cancelContentTypeFilter(state: BrowserState, ui: UIComponents): void;
212
+ /**
213
+ * Clear content type filter
214
+ */
215
+ export declare function clearContentTypeFilter(state: BrowserState, ui: UIComponents, dbPath: string, dataDir: string, sourceType?: SourceType): Promise<void>;
216
+ /**
217
+ * Toggle expand/collapse for the currently selected project header
218
+ */
219
+ export declare function toggleProjectExpand(state: BrowserState, ui: UIComponents): boolean;
220
+ /**
221
+ * Expand the currently selected project (or the project containing the selected doc)
222
+ */
223
+ export declare function expandCurrentProject(state: BrowserState, ui: UIComponents): void;
224
+ /**
225
+ * Collapse the currently selected project (or the project containing the selected doc)
226
+ */
227
+ export declare function collapseCurrentProject(state: BrowserState, ui: UIComponents): void;
228
+ /**
229
+ * Toggle grouped view mode
230
+ */
231
+ export declare function toggleGroupedView(state: BrowserState, ui: UIComponents): void;
232
+ /**
233
+ * Check if selection is on a document (for Enter key handling)
234
+ */
235
+ export declare function isDocumentSelected(state: BrowserState): boolean;
236
+ /**
237
+ * Get the selected source for full view (handles both modes)
238
+ */
239
+ export declare function getSelectedSourceForFullView(state: BrowserState): import('./browse-types.js').SourceItem | null;