quilltap 4.6.0-dev → 4.6.0-dev.105
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.
- package/bin/quilltap.js +79 -101
- package/lib/completion/bash.template +152 -33
- package/lib/completion/fish.template +262 -87
- package/lib/completion/zsh.template +219 -26
- package/lib/db-commands.js +418 -11
- package/lib/db-helpers.js +90 -9
- package/lib/memories-commands.js +20 -16
- package/lib/native-modules.js +151 -0
- package/package.json +6 -3
|
@@ -16,6 +16,7 @@ _quilltap() {
|
|
|
16
16
|
'(-v --version)'{-v,--version}'[Show version number]'
|
|
17
17
|
'(-h --help)'{-h,--help}'[Show help message]'
|
|
18
18
|
'--update[Force re-download of application files]'
|
|
19
|
+
'--passphrase[Database passphrase]:passphrase:'
|
|
19
20
|
)
|
|
20
21
|
|
|
21
22
|
subcommands=(
|
|
@@ -25,6 +26,8 @@ _quilltap() {
|
|
|
25
26
|
'instances:Register or inspect named Quilltap instances'
|
|
26
27
|
'memories:Search, browse, and graph memories'
|
|
27
28
|
'memory-diff:Dump existing memories and dry-run re-extraction'
|
|
29
|
+
'logs:Tail or print an instance log file'
|
|
30
|
+
'migrations:Inspect migration status'
|
|
28
31
|
'completion:Generate shell completion scripts'
|
|
29
32
|
)
|
|
30
33
|
|
|
@@ -67,6 +70,12 @@ _quilltap_subcommand() {
|
|
|
67
70
|
memory-diff)
|
|
68
71
|
_quilltap_memory_diff
|
|
69
72
|
;;
|
|
73
|
+
logs)
|
|
74
|
+
_quilltap_logs
|
|
75
|
+
;;
|
|
76
|
+
migrations)
|
|
77
|
+
_quilltap_migrations
|
|
78
|
+
;;
|
|
70
79
|
completion)
|
|
71
80
|
_quilltap_completion
|
|
72
81
|
;;
|
|
@@ -74,7 +83,7 @@ _quilltap_subcommand() {
|
|
|
74
83
|
}
|
|
75
84
|
|
|
76
85
|
_quilltap_db() {
|
|
77
|
-
local -a subverbs
|
|
86
|
+
local -a subverbs db_opts
|
|
78
87
|
subverbs=(
|
|
79
88
|
'schema:Show database schema'
|
|
80
89
|
'find:Find entities by name'
|
|
@@ -89,11 +98,46 @@ _quilltap_db() {
|
|
|
89
98
|
'integrity:Check database integrity'
|
|
90
99
|
)
|
|
91
100
|
|
|
92
|
-
|
|
101
|
+
db_opts=(
|
|
102
|
+
'(-i --instance)'{-i,--instance}'[Registered instance name]:instance:_quilltap_instance_names'
|
|
103
|
+
'(-d --data-dir)'{-d,--data-dir}'[Data directory]:directory:_directories'
|
|
104
|
+
'--passphrase[Database passphrase]:passphrase:'
|
|
105
|
+
'--json[JSON output]'
|
|
106
|
+
'--limit[Result limit]:limit:'
|
|
107
|
+
'--grep[Substring search]:text:'
|
|
108
|
+
'--character[Character name or id]:character:'
|
|
109
|
+
'--project[Project name or id]:project:'
|
|
110
|
+
'--about[Subject character]:character:'
|
|
111
|
+
'--source[Memory source]:source:(AUTO MANUAL)'
|
|
112
|
+
'--chat[Chat name or id]:chat:'
|
|
113
|
+
'--message[Message id]:id:'
|
|
114
|
+
'--rendered[Render rich content]'
|
|
115
|
+
'--field[Log field]:field:(request response both)'
|
|
116
|
+
'--tail[Tail N rows]:n:'
|
|
117
|
+
'--last[Last N items]:n:'
|
|
118
|
+
'--full[Full output]'
|
|
119
|
+
'--from[Participant filter]:participant:'
|
|
120
|
+
'--type[Filter by type]:type:'
|
|
121
|
+
'--out[Output directory]:path:_files -/'
|
|
122
|
+
'--tables[List tables (low-level)]'
|
|
123
|
+
'--count[Count rows in table]:table:'
|
|
124
|
+
'--repl[Open SQL REPL]'
|
|
125
|
+
'--llm-logs[Target llm-logs database]'
|
|
126
|
+
'--mount-points[Target mount-index database]'
|
|
127
|
+
'--lock-status[Show instance lock status]'
|
|
128
|
+
'--lock-clean[Clean stale lock]'
|
|
129
|
+
'--lock-override[Override active lock]'
|
|
130
|
+
'(-h --help)'{-h,--help}'[Show help]'
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
if (( CURRENT == 2 )); then
|
|
134
|
+
_describe 'db subcommand' subverbs
|
|
135
|
+
fi
|
|
136
|
+
_arguments $db_opts
|
|
93
137
|
}
|
|
94
138
|
|
|
95
139
|
_quilltap_docs() {
|
|
96
|
-
local -a subverbs
|
|
140
|
+
local -a subverbs docs_opts
|
|
97
141
|
subverbs=(
|
|
98
142
|
'list:List all mount points'
|
|
99
143
|
'show:Details for one mount point'
|
|
@@ -115,11 +159,45 @@ _quilltap_docs() {
|
|
|
115
159
|
'copy:Copy file'
|
|
116
160
|
)
|
|
117
161
|
|
|
118
|
-
|
|
162
|
+
docs_opts=(
|
|
163
|
+
'(-i --instance)'{-i,--instance}'[Registered instance name]:instance:_quilltap_instance_names'
|
|
164
|
+
'(-d --data-dir)'{-d,--data-dir}'[Data directory]:directory:_directories'
|
|
165
|
+
'--passphrase[Database passphrase]:passphrase:'
|
|
166
|
+
'(-p --port)'{-p,--port}'[Server port]:port:'
|
|
167
|
+
'--json[JSON output]'
|
|
168
|
+
'--mount[Mount name or id]:mount:'
|
|
169
|
+
'--folder[Folder filter]:folder:'
|
|
170
|
+
'--force[Force operation]'
|
|
171
|
+
'--rendered[Render rich content]'
|
|
172
|
+
'--links[Include link details]'
|
|
173
|
+
'--type[Filter by type]:type:(file folder)'
|
|
174
|
+
'--ext[Extension filter]:ext:'
|
|
175
|
+
'--limit[Result limit]:n:'
|
|
176
|
+
'--max[Maximum results]:n:'
|
|
177
|
+
'--context[Context lines]:n:'
|
|
178
|
+
'--top[Top N results]:n:'
|
|
179
|
+
'--threshold[Similarity threshold]:value:'
|
|
180
|
+
'--ignore-case[Case-insensitive search]'
|
|
181
|
+
'-l[Paths only]'
|
|
182
|
+
'--wait[Wait for completion]'
|
|
183
|
+
'(-R --recursive)'{-R,--recursive}'[Recursive listing]'
|
|
184
|
+
'--sort[Sort field]:field:(name path size modified created)'
|
|
185
|
+
'(-r --reverse)'{-r,--reverse}'[Reverse sort order]'
|
|
186
|
+
'--depth[Maximum traversal depth]:n:'
|
|
187
|
+
'--max-nodes[Maximum nodes in graph]:n:'
|
|
188
|
+
'--long[Long-form output]'
|
|
189
|
+
'--semantic[Use semantic search]'
|
|
190
|
+
'(-h --help)'{-h,--help}'[Show help]'
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
if (( CURRENT == 2 )); then
|
|
194
|
+
_describe 'docs subcommand' subverbs
|
|
195
|
+
fi
|
|
196
|
+
_arguments $docs_opts
|
|
119
197
|
}
|
|
120
198
|
|
|
121
199
|
_quilltap_themes() {
|
|
122
|
-
local -a subverbs
|
|
200
|
+
local -a subverbs registry_verbs themes_opts registry_opts
|
|
123
201
|
subverbs=(
|
|
124
202
|
'list:List available themes'
|
|
125
203
|
'install:Install a theme'
|
|
@@ -132,17 +210,50 @@ _quilltap_themes() {
|
|
|
132
210
|
'registry:Manage registries'
|
|
133
211
|
)
|
|
134
212
|
|
|
135
|
-
|
|
213
|
+
themes_opts=(
|
|
214
|
+
'(-i --instance)'{-i,--instance}'[Registered instance name]:instance:_quilltap_instance_names'
|
|
215
|
+
'(-d --data-dir)'{-d,--data-dir}'[Data directory]:directory:_directories'
|
|
216
|
+
'(-o --output)'{-o,--output}'[Output path]:path:_files'
|
|
217
|
+
'(-h --help)'{-h,--help}'[Show help]'
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
if (( CURRENT == 2 )); then
|
|
221
|
+
_describe 'themes subcommand' subverbs
|
|
222
|
+
return
|
|
223
|
+
fi
|
|
224
|
+
|
|
225
|
+
if [[ "$words[2]" == "registry" ]]; then
|
|
226
|
+
registry_verbs=(
|
|
227
|
+
'list:List registries'
|
|
228
|
+
'add:Add a registry'
|
|
229
|
+
'remove:Remove a registry'
|
|
230
|
+
'refresh:Refresh registries'
|
|
231
|
+
'keygen:Generate Ed25519 key'
|
|
232
|
+
'sign:Sign a registry or bundle'
|
|
233
|
+
)
|
|
234
|
+
registry_opts=(
|
|
235
|
+
'(-k --key)'{-k,--key}'[Signing key path]:path:_files'
|
|
236
|
+
'(-n --name)'{-n,--name}'[Registry name]:name:'
|
|
237
|
+
'(-o --output)'{-o,--output}'[Output path]:path:_files'
|
|
238
|
+
)
|
|
239
|
+
if (( CURRENT == 3 )); then
|
|
240
|
+
_describe 'registry subcommand' registry_verbs
|
|
241
|
+
fi
|
|
242
|
+
_arguments $registry_opts
|
|
243
|
+
return
|
|
244
|
+
fi
|
|
245
|
+
|
|
246
|
+
_arguments $themes_opts
|
|
136
247
|
}
|
|
137
248
|
|
|
138
249
|
_quilltap_instances() {
|
|
139
|
-
local -a subverbs
|
|
250
|
+
local -a subverbs inst_opts
|
|
140
251
|
subverbs=(
|
|
141
252
|
'list:List registered instances'
|
|
142
|
-
'ls:List instances'
|
|
253
|
+
'ls:List registered instances'
|
|
143
254
|
'show:Show instance details'
|
|
144
|
-
'path:Show
|
|
145
|
-
'where:Show
|
|
255
|
+
'path:Show instances.json path'
|
|
256
|
+
'where:Show instances.json path'
|
|
146
257
|
'add:Register a new instance'
|
|
147
258
|
'create:Register a new instance'
|
|
148
259
|
'remove:Unregister an instance'
|
|
@@ -150,9 +261,32 @@ _quilltap_instances() {
|
|
|
150
261
|
'delete:Unregister an instance'
|
|
151
262
|
'set-passphrase:Set instance passphrase'
|
|
152
263
|
'passphrase:Set instance passphrase'
|
|
264
|
+
'default:Set/show/clear the default instance'
|
|
265
|
+
'rename:Rename an instance (preserves passphrase)'
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
inst_opts=(
|
|
269
|
+
'--names-only[Print one name per line (for completion)]'
|
|
270
|
+
'--json[JSON output]'
|
|
271
|
+
'--clear[Clear value (for default)]'
|
|
272
|
+
'(-h --help)'{-h,--help}'[Show help]'
|
|
153
273
|
)
|
|
154
274
|
|
|
155
|
-
|
|
275
|
+
if (( CURRENT == 2 )); then
|
|
276
|
+
_describe 'instances subcommand' subverbs
|
|
277
|
+
return
|
|
278
|
+
fi
|
|
279
|
+
|
|
280
|
+
case "$words[2]" in
|
|
281
|
+
show|remove|rm|delete|set-passphrase|passphrase|default|rename)
|
|
282
|
+
if (( CURRENT == 3 )); then
|
|
283
|
+
_values 'instance' ${(f)"$(command quilltap instances list --names-only 2>/dev/null)"}
|
|
284
|
+
return
|
|
285
|
+
fi
|
|
286
|
+
;;
|
|
287
|
+
esac
|
|
288
|
+
|
|
289
|
+
_arguments $inst_opts
|
|
156
290
|
}
|
|
157
291
|
|
|
158
292
|
_quilltap_memories() {
|
|
@@ -168,24 +302,44 @@ _quilltap_memories() {
|
|
|
168
302
|
)
|
|
169
303
|
|
|
170
304
|
mem_opts=(
|
|
171
|
-
'--
|
|
172
|
-
'--
|
|
173
|
-
'--
|
|
174
|
-
'--
|
|
175
|
-
'--project[Project name or id]'
|
|
176
|
-
'--since[Since timestamp]'
|
|
177
|
-
'--until[Until timestamp]'
|
|
178
|
-
'--min-importance[Minimum importance]'
|
|
179
|
-
'--min-reinforced[Minimum reinforcement]'
|
|
180
|
-
'--has-embedding[Has embedding]'
|
|
181
|
-
'--no-embedding[No embedding]'
|
|
182
|
-
'--sort[Sort field]'
|
|
183
|
-
'--limit[Result limit]'
|
|
305
|
+
'(-i --instance)'{-i,--instance}'[Registered instance name]:instance:_quilltap_instance_names'
|
|
306
|
+
'(-d --data-dir)'{-d,--data-dir}'[Data directory]:directory:_directories'
|
|
307
|
+
'--passphrase[Database passphrase]:passphrase:'
|
|
308
|
+
'(-p --port)'{-p,--port}'[Server port]:port:'
|
|
184
309
|
'--json[JSON output]'
|
|
185
|
-
'--
|
|
310
|
+
'--character[Character name or id]:character:'
|
|
311
|
+
'--about[Subject of memory]:character:'
|
|
312
|
+
'--source[Memory source]:source:(AUTO MANUAL)'
|
|
313
|
+
'--chat[Chat id or title]:chat:'
|
|
314
|
+
'--project[Project name or id]:project:'
|
|
315
|
+
'--since[Since timestamp]:date:'
|
|
316
|
+
'--until[Until timestamp]:date:'
|
|
317
|
+
'--min-importance[Minimum importance]:value:'
|
|
318
|
+
'--min-reinforced[Minimum reinforcement]:value:'
|
|
319
|
+
'--has-embedding[Only memories with embeddings]'
|
|
320
|
+
'--no-embedding[Only memories without embeddings]'
|
|
321
|
+
'--sort[Sort field]:field:(reinforced importance created accessed reinforcement-count links)'
|
|
322
|
+
'(-r --reverse)'{-r,--reverse}'[Reverse sort]'
|
|
323
|
+
'--limit[Result limit]:n:'
|
|
324
|
+
'--full-titles[Show full titles]'
|
|
325
|
+
'--in[Restrict find-in field]:field:'
|
|
326
|
+
'--no-related[Hide related neighbors]'
|
|
327
|
+
'--list[List-only output]'
|
|
328
|
+
'(-i --ignore-case)'{-i,--ignore-case}'[Case-insensitive]'
|
|
329
|
+
'(-l --paths-only)'{-l,--paths-only}'[Paths only]'
|
|
330
|
+
'--max[Maximum results]:n:'
|
|
331
|
+
'--context[Context lines]:n:'
|
|
332
|
+
'--depth[Walk depth]:n:'
|
|
333
|
+
'--max-nodes[Maximum nodes]:n:'
|
|
334
|
+
'--semantic[Semantic search]'
|
|
335
|
+
'--top[Top N results]:n:'
|
|
336
|
+
'--threshold[Similarity threshold]:value:'
|
|
337
|
+
'(-h --help)'{-h,--help}'[Show help]'
|
|
186
338
|
)
|
|
187
339
|
|
|
188
|
-
|
|
340
|
+
if (( CURRENT == 2 )); then
|
|
341
|
+
_describe 'memories subcommand' subverbs
|
|
342
|
+
fi
|
|
189
343
|
_arguments $mem_opts
|
|
190
344
|
}
|
|
191
345
|
|
|
@@ -193,7 +347,46 @@ _quilltap_memory_diff() {
|
|
|
193
347
|
_arguments \
|
|
194
348
|
'(-h --help)'{-h,--help}'[Show help]' \
|
|
195
349
|
'(-i --instance)'{-i,--instance}'[Use instance]:instance:_quilltap_instance_names' \
|
|
350
|
+
'(-d --data-dir)'{-d,--data-dir}'[Data directory]:directory:_directories' \
|
|
351
|
+
'--passphrase[Database passphrase]:passphrase:' \
|
|
352
|
+
'(-p --port)'{-p,--port}'[Server port]:port:' \
|
|
353
|
+
'--concurrency[Concurrency limit]:n:' \
|
|
354
|
+
'--out[Output file]:path:_files'
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
_quilltap_logs() {
|
|
358
|
+
_arguments \
|
|
359
|
+
'(-h --help)'{-h,--help}'[Show help]' \
|
|
360
|
+
'(-i --instance)'{-i,--instance}'[Use instance]:instance:_quilltap_instance_names' \
|
|
361
|
+
'(-d --data-dir)'{-d,--data-dir}'[Data directory]:directory:_directories' \
|
|
362
|
+
'--passphrase[Database passphrase]:passphrase:' \
|
|
363
|
+
'--stream[Which log stream]:stream:(combined error stdout stderr startup)' \
|
|
364
|
+
'--tail[Last N lines (0=full)]:n:' \
|
|
365
|
+
'(-f --follow)'{-f,--follow}'[Stream new lines]' \
|
|
366
|
+
'--grep[Regex filter]:pattern:'
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
_quilltap_migrations() {
|
|
370
|
+
local -a subverbs mig_opts
|
|
371
|
+
subverbs=(
|
|
372
|
+
'status:Migration status'
|
|
373
|
+
'pending:List pending migrations'
|
|
374
|
+
'run:Run pending migrations (use --dry-run)'
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
mig_opts=(
|
|
378
|
+
'(-i --instance)'{-i,--instance}'[Registered instance name]:instance:_quilltap_instance_names'
|
|
196
379
|
'(-d --data-dir)'{-d,--data-dir}'[Data directory]:directory:_directories'
|
|
380
|
+
'--passphrase[Database passphrase]:passphrase:'
|
|
381
|
+
'--dry-run[Dry run]'
|
|
382
|
+
'--json[JSON output]'
|
|
383
|
+
'(-h --help)'{-h,--help}'[Show help]'
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
if (( CURRENT == 2 )); then
|
|
387
|
+
_describe 'migrations subcommand' subverbs
|
|
388
|
+
fi
|
|
389
|
+
_arguments $mig_opts
|
|
197
390
|
}
|
|
198
391
|
|
|
199
392
|
_quilltap_completion() {
|