quilltap 4.5.0 → 4.5.1
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/lib/completion/bash.template +152 -33
- package/lib/completion/fish.template +262 -87
- package/lib/completion/zsh.template +219 -26
- package/package.json +1 -1
|
@@ -12,15 +12,19 @@ _quilltap_complete() {
|
|
|
12
12
|
cword=$COMP_CWORD
|
|
13
13
|
|
|
14
14
|
# Global options that can appear before subcommands
|
|
15
|
-
local global_opts="-d --data-dir -i --instance -p --port -o --open -v --version -h --help --update"
|
|
15
|
+
local global_opts="-d --data-dir -i --instance -p --port -o --open -v --version -h --help --update --passphrase"
|
|
16
|
+
|
|
17
|
+
# Top-level subcommands
|
|
18
|
+
local top_cmds="db docs themes instances memories memory-diff logs migrations completion"
|
|
16
19
|
|
|
17
20
|
# Get the subcommand (first non-option word after quilltap)
|
|
18
21
|
local subcommand=""
|
|
22
|
+
local subverb=""
|
|
19
23
|
local i=1
|
|
20
24
|
while [[ $i -lt $cword ]]; do
|
|
21
25
|
local word="${words[$i]}"
|
|
22
26
|
case "$word" in
|
|
23
|
-
-d|--data-dir|-i|--instance|-p|--port)
|
|
27
|
+
-d|--data-dir|-i|--instance|-p|--port|--passphrase)
|
|
24
28
|
# These take a value, skip the next word
|
|
25
29
|
((i += 2))
|
|
26
30
|
;;
|
|
@@ -33,22 +37,26 @@ _quilltap_complete() {
|
|
|
33
37
|
((i += 1))
|
|
34
38
|
;;
|
|
35
39
|
*)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
if [[ -z "$subcommand" ]]; then
|
|
41
|
+
subcommand="$word"
|
|
42
|
+
elif [[ -z "$subverb" ]]; then
|
|
43
|
+
subverb="$word"
|
|
44
|
+
fi
|
|
45
|
+
((i += 1))
|
|
39
46
|
;;
|
|
40
47
|
esac
|
|
41
48
|
done
|
|
42
49
|
|
|
43
50
|
# If we're completing a global flag value
|
|
44
|
-
if [[ "$prev" == "-d" ]] || [[ "$prev" == "--data-dir" ]]
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
if [[ "$prev" == "-d" ]] || [[ "$prev" == "--data-dir" ]]; then
|
|
52
|
+
# Complete with directories
|
|
53
|
+
COMPREPLY=($(compgen -d -- "$cur"))
|
|
54
|
+
return
|
|
55
|
+
fi
|
|
56
|
+
if [[ "$prev" == "-p" ]] || [[ "$prev" == "--port" ]] || [[ "$prev" == "--passphrase" ]]; then
|
|
47
57
|
return
|
|
48
58
|
fi
|
|
49
|
-
|
|
50
59
|
if [[ "$prev" == "-i" ]] || [[ "$prev" == "--instance" ]]; then
|
|
51
|
-
# Complete with instance names
|
|
52
60
|
local instances=$(command quilltap instances list --names-only 2>/dev/null)
|
|
53
61
|
COMPREPLY=($(compgen -W "$instances" -- "$cur"))
|
|
54
62
|
return
|
|
@@ -59,53 +67,164 @@ _quilltap_complete() {
|
|
|
59
67
|
if [[ "$cur" == -* ]]; then
|
|
60
68
|
COMPREPLY=($(compgen -W "$global_opts" -- "$cur"))
|
|
61
69
|
else
|
|
62
|
-
COMPREPLY=($(compgen -W "
|
|
70
|
+
COMPREPLY=($(compgen -W "$top_cmds" -- "$cur"))
|
|
63
71
|
fi
|
|
64
72
|
return
|
|
65
73
|
fi
|
|
66
74
|
|
|
75
|
+
# Shared flag-value completions for any subcommand
|
|
76
|
+
case "$prev" in
|
|
77
|
+
--mount)
|
|
78
|
+
local mounts=$(command quilltap docs list --names-only 2>/dev/null)
|
|
79
|
+
COMPREPLY=($(compgen -W "$mounts" -- "$cur"))
|
|
80
|
+
return
|
|
81
|
+
;;
|
|
82
|
+
--character|--about)
|
|
83
|
+
# No live source; suggest common literals
|
|
84
|
+
COMPREPLY=($(compgen -W "all self none" -- "$cur"))
|
|
85
|
+
return
|
|
86
|
+
;;
|
|
87
|
+
--source)
|
|
88
|
+
COMPREPLY=($(compgen -W "AUTO MANUAL" -- "$cur"))
|
|
89
|
+
return
|
|
90
|
+
;;
|
|
91
|
+
--sort)
|
|
92
|
+
COMPREPLY=($(compgen -W "name path size modified created reinforced importance accessed reinforcement-count links" -- "$cur"))
|
|
93
|
+
return
|
|
94
|
+
;;
|
|
95
|
+
--field)
|
|
96
|
+
COMPREPLY=($(compgen -W "request response both" -- "$cur"))
|
|
97
|
+
return
|
|
98
|
+
;;
|
|
99
|
+
--type)
|
|
100
|
+
COMPREPLY=($(compgen -W "file folder" -- "$cur"))
|
|
101
|
+
return
|
|
102
|
+
;;
|
|
103
|
+
--stream)
|
|
104
|
+
COMPREPLY=($(compgen -W "combined error stdout stderr startup" -- "$cur"))
|
|
105
|
+
return
|
|
106
|
+
;;
|
|
107
|
+
esac
|
|
108
|
+
|
|
67
109
|
# Subcommand-specific completion
|
|
68
|
-
local subcommand_opts=""
|
|
69
110
|
case "$subcommand" in
|
|
70
111
|
db)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
112
|
+
local db_verbs="schema find chats messages logs message log memories optimize backup integrity"
|
|
113
|
+
local db_flags="--instance --data-dir --passphrase --json --limit --grep \
|
|
114
|
+
--character --project --about --source --chat --message --rendered --field \
|
|
115
|
+
--tail --last --full --from --type --out --help \
|
|
116
|
+
--tables --count --repl --llm-logs --mount-points \
|
|
117
|
+
--lock-status --lock-clean --lock-override"
|
|
118
|
+
if [[ -z "$subverb" ]]; then
|
|
119
|
+
if [[ "$cur" == -* ]]; then
|
|
120
|
+
COMPREPLY=($(compgen -W "$db_flags" -- "$cur"))
|
|
121
|
+
else
|
|
122
|
+
COMPREPLY=($(compgen -W "$db_verbs" -- "$cur"))
|
|
123
|
+
fi
|
|
124
|
+
else
|
|
125
|
+
COMPREPLY=($(compgen -W "$db_flags" -- "$cur"))
|
|
74
126
|
fi
|
|
75
|
-
COMPREPLY=($(compgen -W "$subcommand_opts" -- "$cur"))
|
|
76
127
|
;;
|
|
77
128
|
docs)
|
|
78
129
|
local docs_verbs="list show files ls dir read export scan write delete mkdir move copy status find grep reindex embed"
|
|
79
|
-
|
|
80
|
-
|
|
130
|
+
local docs_flags="--mount --instance --data-dir --passphrase --port --json --help \
|
|
131
|
+
--force --rendered --links --folder --type --ext --limit --max --context --top --threshold \
|
|
132
|
+
--ignore-case -l --wait -R --recursive --sort -r --reverse --depth --max-nodes --long --semantic"
|
|
133
|
+
if [[ -z "$subverb" ]]; then
|
|
134
|
+
if [[ "$cur" == -* ]]; then
|
|
135
|
+
COMPREPLY=($(compgen -W "$docs_flags" -- "$cur"))
|
|
136
|
+
else
|
|
137
|
+
COMPREPLY=($(compgen -W "$docs_verbs" -- "$cur"))
|
|
138
|
+
fi
|
|
139
|
+
else
|
|
140
|
+
COMPREPLY=($(compgen -W "$docs_flags" -- "$cur"))
|
|
81
141
|
fi
|
|
82
|
-
COMPREPLY=($(compgen -W "$docs_verbs" -- "$cur"))
|
|
83
142
|
;;
|
|
84
143
|
themes)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
144
|
+
local themes_verbs="list install uninstall validate export create search update registry"
|
|
145
|
+
local themes_flags="--instance --data-dir --output -o --help"
|
|
146
|
+
if [[ -z "$subverb" ]]; then
|
|
147
|
+
if [[ "$cur" == -* ]]; then
|
|
148
|
+
COMPREPLY=($(compgen -W "$themes_flags" -- "$cur"))
|
|
149
|
+
else
|
|
150
|
+
COMPREPLY=($(compgen -W "$themes_verbs" -- "$cur"))
|
|
151
|
+
fi
|
|
152
|
+
elif [[ "$subverb" == "registry" ]]; then
|
|
153
|
+
local registry_verbs="list add remove refresh keygen sign"
|
|
154
|
+
local registry_flags="--key -k --name -n --output -o --help"
|
|
155
|
+
if [[ "$cur" == -* ]]; then
|
|
156
|
+
COMPREPLY=($(compgen -W "$registry_flags" -- "$cur"))
|
|
157
|
+
else
|
|
158
|
+
COMPREPLY=($(compgen -W "$registry_verbs" -- "$cur"))
|
|
159
|
+
fi
|
|
160
|
+
else
|
|
161
|
+
COMPREPLY=($(compgen -W "$themes_flags" -- "$cur"))
|
|
88
162
|
fi
|
|
89
|
-
COMPREPLY=($(compgen -W "$subcommand_opts" -- "$cur"))
|
|
90
163
|
;;
|
|
91
164
|
instances)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
165
|
+
local inst_verbs="list ls show path where add create remove rm delete set-passphrase passphrase default rename"
|
|
166
|
+
local inst_flags="--names-only --json --clear --help"
|
|
167
|
+
if [[ -z "$subverb" ]]; then
|
|
168
|
+
if [[ "$cur" == -* ]]; then
|
|
169
|
+
COMPREPLY=($(compgen -W "$inst_flags" -- "$cur"))
|
|
170
|
+
else
|
|
171
|
+
COMPREPLY=($(compgen -W "$inst_verbs" -- "$cur"))
|
|
172
|
+
fi
|
|
173
|
+
else
|
|
174
|
+
# Most instances verbs take a name as positional; offer registered names
|
|
175
|
+
case "$subverb" in
|
|
176
|
+
show|remove|rm|delete|set-passphrase|passphrase|default|rename)
|
|
177
|
+
local instances=$(command quilltap instances list --names-only 2>/dev/null)
|
|
178
|
+
if [[ "$cur" == -* ]]; then
|
|
179
|
+
COMPREPLY=($(compgen -W "$inst_flags" -- "$cur"))
|
|
180
|
+
else
|
|
181
|
+
COMPREPLY=($(compgen -W "$instances" -- "$cur"))
|
|
182
|
+
fi
|
|
183
|
+
;;
|
|
184
|
+
*)
|
|
185
|
+
COMPREPLY=($(compgen -W "$inst_flags" -- "$cur"))
|
|
186
|
+
;;
|
|
187
|
+
esac
|
|
95
188
|
fi
|
|
96
|
-
COMPREPLY=($(compgen -W "$subcommand_opts" -- "$cur"))
|
|
97
189
|
;;
|
|
98
190
|
memories)
|
|
99
191
|
local mem_verbs="ls find grep show tree status validate"
|
|
100
|
-
|
|
101
|
-
|
|
192
|
+
local mem_flags="--character --about --source --chat --project --since --until \
|
|
193
|
+
--min-importance --min-reinforced --has-embedding --no-embedding \
|
|
194
|
+
--sort -r --reverse --limit --full-titles --in --no-related --list \
|
|
195
|
+
--ignore-case -i --paths-only -l --max --context --depth --max-nodes \
|
|
196
|
+
--semantic --top --threshold \
|
|
197
|
+
--instance --data-dir --passphrase --port --json --help"
|
|
198
|
+
if [[ -z "$subverb" ]]; then
|
|
199
|
+
if [[ "$cur" == -* ]]; then
|
|
200
|
+
COMPREPLY=($(compgen -W "$mem_flags" -- "$cur"))
|
|
201
|
+
else
|
|
202
|
+
COMPREPLY=($(compgen -W "$mem_verbs" -- "$cur"))
|
|
203
|
+
fi
|
|
204
|
+
else
|
|
205
|
+
COMPREPLY=($(compgen -W "$mem_flags" -- "$cur"))
|
|
102
206
|
fi
|
|
103
|
-
COMPREPLY=($(compgen -W "$mem_verbs" -- "$cur"))
|
|
104
207
|
;;
|
|
105
208
|
memory-diff)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
209
|
+
local md_flags="--instance --data-dir --passphrase --port --concurrency --out --help"
|
|
210
|
+
COMPREPLY=($(compgen -W "$md_flags" -- "$cur"))
|
|
211
|
+
;;
|
|
212
|
+
logs)
|
|
213
|
+
local logs_flags="--stream --tail -f --follow --grep \
|
|
214
|
+
--instance --data-dir --passphrase --help"
|
|
215
|
+
COMPREPLY=($(compgen -W "$logs_flags" -- "$cur"))
|
|
216
|
+
;;
|
|
217
|
+
migrations)
|
|
218
|
+
local mig_verbs="status pending run"
|
|
219
|
+
local mig_flags="--dry-run --json --instance --data-dir --passphrase --help"
|
|
220
|
+
if [[ -z "$subverb" ]]; then
|
|
221
|
+
if [[ "$cur" == -* ]]; then
|
|
222
|
+
COMPREPLY=($(compgen -W "$mig_flags" -- "$cur"))
|
|
223
|
+
else
|
|
224
|
+
COMPREPLY=($(compgen -W "$mig_verbs" -- "$cur"))
|
|
225
|
+
fi
|
|
226
|
+
else
|
|
227
|
+
COMPREPLY=($(compgen -W "$mig_flags" -- "$cur"))
|
|
109
228
|
fi
|
|
110
229
|
;;
|
|
111
230
|
completion)
|
|
@@ -2,92 +2,267 @@
|
|
|
2
2
|
|
|
3
3
|
# Fish completion for quilltap
|
|
4
4
|
|
|
5
|
-
#
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
# ---------- helper functions ----------
|
|
6
|
+
|
|
7
|
+
function __quilltap_instance_names
|
|
8
|
+
command quilltap instances list --names-only 2>/dev/null
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
function __quilltap_no_subcommand
|
|
12
|
+
set -l cmd (commandline -opc)
|
|
13
|
+
if test (count $cmd) -lt 2
|
|
14
|
+
return 0
|
|
15
|
+
end
|
|
16
|
+
for i in (seq 2 (count $cmd))
|
|
17
|
+
switch $cmd[$i]
|
|
18
|
+
case db docs themes instances memories memory-diff logs migrations completion
|
|
19
|
+
return 1
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
return 0
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
function __quilltap_using_subcommand
|
|
26
|
+
set -l target $argv[1]
|
|
27
|
+
set -l cmd (commandline -opc)
|
|
28
|
+
for i in (seq 2 (count $cmd))
|
|
29
|
+
switch $cmd[$i]
|
|
30
|
+
case db docs themes instances memories memory-diff logs migrations completion
|
|
31
|
+
test "$cmd[$i]" = "$target"
|
|
32
|
+
return $status
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
return 1
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
function __quilltap_using_subverb
|
|
39
|
+
# usage: __quilltap_using_subverb <subcommand> <subverb>
|
|
40
|
+
__quilltap_using_subcommand $argv[1]; or return 1
|
|
41
|
+
set -l cmd (commandline -opc)
|
|
42
|
+
for token in $cmd
|
|
43
|
+
if test "$token" = "$argv[2]"
|
|
44
|
+
return 0
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
return 1
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# ---------- top-level verbs ----------
|
|
51
|
+
|
|
52
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'db' -d 'Query encrypted databases'
|
|
53
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'docs' -d 'Inspect and read document mounts'
|
|
54
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'themes' -d 'Manage theme bundles'
|
|
55
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'instances' -d 'Register or inspect instances'
|
|
56
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'memories' -d 'Search and browse memories'
|
|
57
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'memory-diff' -d 'Memory extraction dry-run'
|
|
58
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'logs' -d 'Tail or print log files'
|
|
59
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'migrations' -d 'Inspect migration status'
|
|
60
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'completion' -d 'Generate shell completion'
|
|
13
61
|
|
|
14
62
|
# Global options
|
|
15
|
-
complete -c quilltap -n '
|
|
16
|
-
complete -c quilltap -n '
|
|
17
|
-
complete -c quilltap -n '
|
|
18
|
-
complete -c quilltap -n '
|
|
19
|
-
complete -c quilltap -n '
|
|
20
|
-
complete -c quilltap -n '
|
|
21
|
-
complete -c quilltap -n '
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
complete -c quilltap -n '
|
|
26
|
-
complete -c quilltap -n '
|
|
27
|
-
complete -c quilltap -n '
|
|
28
|
-
complete -c quilltap -n '
|
|
29
|
-
complete -c quilltap -n '
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
complete -c quilltap -n '
|
|
33
|
-
complete -c quilltap -n '
|
|
34
|
-
complete -c quilltap -n '
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
complete -c quilltap -n '
|
|
38
|
-
complete -c quilltap -n '
|
|
39
|
-
complete -c quilltap -n '
|
|
40
|
-
complete -c quilltap -n '
|
|
41
|
-
complete -c quilltap -n '
|
|
42
|
-
complete -c quilltap -n '
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
complete -c quilltap -n '
|
|
46
|
-
complete -c quilltap -n '
|
|
47
|
-
complete -c quilltap -n '
|
|
48
|
-
complete -c quilltap -n '
|
|
49
|
-
complete -c quilltap -n '
|
|
50
|
-
complete -c quilltap -n '
|
|
51
|
-
complete -c quilltap -n '
|
|
52
|
-
complete -c quilltap -n '
|
|
53
|
-
complete -c quilltap -n '
|
|
54
|
-
complete -c quilltap -n '
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
complete -c quilltap -n '
|
|
58
|
-
complete -c quilltap -n '
|
|
59
|
-
complete -c quilltap -n '
|
|
60
|
-
complete -c quilltap -n '
|
|
61
|
-
complete -c quilltap -n '
|
|
62
|
-
complete -c quilltap -n '
|
|
63
|
-
complete -c quilltap -n '
|
|
64
|
-
complete -c quilltap -n '
|
|
65
|
-
complete -c quilltap -n '
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
complete -c quilltap -n '
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
complete -c quilltap -n '
|
|
72
|
-
complete -c quilltap -n '
|
|
73
|
-
complete -c quilltap -n '
|
|
74
|
-
complete -c quilltap -n '
|
|
75
|
-
complete -c quilltap -n '
|
|
76
|
-
complete -c quilltap -n '
|
|
77
|
-
complete -c quilltap -n '
|
|
78
|
-
complete -c quilltap -n '
|
|
79
|
-
complete -c quilltap -n '
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
complete -c quilltap -n '
|
|
83
|
-
complete -c quilltap -n '
|
|
84
|
-
complete -c quilltap -n '
|
|
85
|
-
complete -c quilltap -n '
|
|
86
|
-
complete -c quilltap -n '
|
|
87
|
-
complete -c quilltap -n '
|
|
88
|
-
complete -c quilltap -n '
|
|
89
|
-
|
|
90
|
-
#
|
|
91
|
-
complete -c quilltap -n '
|
|
92
|
-
complete -c quilltap -n '
|
|
93
|
-
complete -c quilltap -n '
|
|
63
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -l 'port' -s 'p' -d 'Port to listen on' -x
|
|
64
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -l 'data-dir' -s 'd' -d 'Data directory' -r -F
|
|
65
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -l 'instance' -s 'i' -d 'Use registered instance' -x -a '(__quilltap_instance_names)'
|
|
66
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -l 'open' -s 'o' -d 'Open browser after start'
|
|
67
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -l 'version' -s 'v' -d 'Show version'
|
|
68
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -l 'update' -d 'Force re-download'
|
|
69
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -l 'help' -s 'h' -d 'Show help'
|
|
70
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -l 'passphrase' -d 'Database passphrase' -x
|
|
71
|
+
|
|
72
|
+
# Shared --instance completion when any subcommand is present
|
|
73
|
+
complete -c quilltap -n 'not __quilltap_no_subcommand' -l 'instance' -s 'i' -d 'Use registered instance' -x -a '(__quilltap_instance_names)'
|
|
74
|
+
complete -c quilltap -n 'not __quilltap_no_subcommand' -l 'data-dir' -s 'd' -d 'Data directory' -r -F
|
|
75
|
+
complete -c quilltap -n 'not __quilltap_no_subcommand' -l 'passphrase' -d 'Database passphrase' -x
|
|
76
|
+
complete -c quilltap -n 'not __quilltap_no_subcommand' -l 'help' -s 'h' -d 'Show help'
|
|
77
|
+
complete -c quilltap -n 'not __quilltap_no_subcommand' -l 'json' -d 'JSON output'
|
|
78
|
+
|
|
79
|
+
# ---------- db verbs ----------
|
|
80
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'schema' -d 'Show database schema'
|
|
81
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'find' -d 'Find entities by name'
|
|
82
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'chats' -d 'Find chats'
|
|
83
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'messages' -d 'Find messages'
|
|
84
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'logs' -d 'Get LLM logs'
|
|
85
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'message' -d 'Get single message'
|
|
86
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'log' -d 'Get single log entry'
|
|
87
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'memories' -d 'List memories'
|
|
88
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'optimize' -d 'Optimize database'
|
|
89
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'backup' -d 'Backup database'
|
|
90
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -f -a 'integrity' -d 'Check integrity'
|
|
91
|
+
|
|
92
|
+
# db flags
|
|
93
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'limit' -d 'Result limit' -x
|
|
94
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'grep' -d 'Substring search' -x
|
|
95
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'character' -d 'Character name or id' -x
|
|
96
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'project' -d 'Project name or id' -x
|
|
97
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'about' -d 'Subject character' -x
|
|
98
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'source' -d 'Memory source' -x -a 'AUTO MANUAL'
|
|
99
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'chat' -d 'Chat name or id' -x
|
|
100
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'message' -d 'Message id' -x
|
|
101
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'rendered' -d 'Render rich content'
|
|
102
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'field' -d 'Log field' -x -a 'request response both'
|
|
103
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'tail' -d 'Tail N rows' -x
|
|
104
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'last' -d 'Last N items' -x
|
|
105
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'full' -d 'Full output'
|
|
106
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'from' -d 'Participant filter' -x
|
|
107
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'type' -d 'Filter by type' -x
|
|
108
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'out' -d 'Output directory' -r -F
|
|
109
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'tables' -d 'List tables (low-level)'
|
|
110
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'count' -d 'Count rows in table' -x
|
|
111
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'repl' -d 'Open SQL REPL'
|
|
112
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'llm-logs' -d 'Target llm-logs database'
|
|
113
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'mount-points' -d 'Target mount-index database'
|
|
114
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'lock-status' -d 'Show instance lock status'
|
|
115
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'lock-clean' -d 'Clean stale lock'
|
|
116
|
+
complete -c quilltap -n '__quilltap_using_subcommand db' -l 'lock-override' -d 'Override active lock'
|
|
117
|
+
|
|
118
|
+
# ---------- docs verbs ----------
|
|
119
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'list' -d 'List mount points'
|
|
120
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'show' -d 'Show mount details'
|
|
121
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'files' -d 'List files in mount'
|
|
122
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'ls' -d 'ls-style listing'
|
|
123
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'dir' -d 'Directory listing'
|
|
124
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'read' -d 'Print file contents'
|
|
125
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'export' -d 'Export mount'
|
|
126
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'scan' -d 'Trigger rescan'
|
|
127
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'find' -d 'Substring search'
|
|
128
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'grep' -d 'Pattern search in text'
|
|
129
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'status' -d 'Per-mount status'
|
|
130
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'reindex' -d 'Re-extract and chunk'
|
|
131
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'embed' -d 'Enqueue embeddings'
|
|
132
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'write' -d 'Write a file'
|
|
133
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'delete' -d 'Delete a file'
|
|
134
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'mkdir' -d 'Create folder'
|
|
135
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'move' -d 'Move file'
|
|
136
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -f -a 'copy' -d 'Copy file'
|
|
137
|
+
|
|
138
|
+
# docs flags
|
|
139
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'mount' -d 'Mount name or id' -x
|
|
140
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'port' -s 'p' -d 'Server port' -x
|
|
141
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'folder' -d 'Folder filter' -x
|
|
142
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'force' -d 'Force operation'
|
|
143
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'rendered' -d 'Render rich content'
|
|
144
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'links' -d 'Include link details'
|
|
145
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'type' -d 'Filter by type' -x -a 'file folder'
|
|
146
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'ext' -d 'Extension filter' -x
|
|
147
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'limit' -d 'Result limit' -x
|
|
148
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'max' -d 'Maximum results' -x
|
|
149
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'context' -d 'Context lines' -x
|
|
150
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'top' -d 'Top N results' -x
|
|
151
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'threshold' -d 'Similarity threshold' -x
|
|
152
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'ignore-case' -d 'Case-insensitive'
|
|
153
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -s 'l' -d 'Paths only'
|
|
154
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'wait' -d 'Wait for completion'
|
|
155
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'recursive' -s 'R' -d 'Recursive listing'
|
|
156
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'sort' -d 'Sort field' -x -a 'name path size modified created'
|
|
157
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'reverse' -s 'r' -d 'Reverse sort order'
|
|
158
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'depth' -d 'Maximum traversal depth' -x
|
|
159
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'max-nodes' -d 'Maximum graph nodes' -x
|
|
160
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'long' -d 'Long-form output'
|
|
161
|
+
complete -c quilltap -n '__quilltap_using_subcommand docs' -l 'semantic' -d 'Semantic search'
|
|
162
|
+
|
|
163
|
+
# ---------- themes verbs ----------
|
|
164
|
+
complete -c quilltap -n '__quilltap_using_subcommand themes' -f -a 'list' -d 'List themes'
|
|
165
|
+
complete -c quilltap -n '__quilltap_using_subcommand themes' -f -a 'install' -d 'Install theme'
|
|
166
|
+
complete -c quilltap -n '__quilltap_using_subcommand themes' -f -a 'uninstall' -d 'Uninstall theme'
|
|
167
|
+
complete -c quilltap -n '__quilltap_using_subcommand themes' -f -a 'validate' -d 'Validate bundle'
|
|
168
|
+
complete -c quilltap -n '__quilltap_using_subcommand themes' -f -a 'export' -d 'Export theme'
|
|
169
|
+
complete -c quilltap -n '__quilltap_using_subcommand themes' -f -a 'create' -d 'Create theme'
|
|
170
|
+
complete -c quilltap -n '__quilltap_using_subcommand themes' -f -a 'search' -d 'Search registries'
|
|
171
|
+
complete -c quilltap -n '__quilltap_using_subcommand themes' -f -a 'update' -d 'Update themes'
|
|
172
|
+
complete -c quilltap -n '__quilltap_using_subcommand themes' -f -a 'registry' -d 'Manage registries'
|
|
173
|
+
complete -c quilltap -n '__quilltap_using_subcommand themes' -l 'output' -s 'o' -d 'Output path' -r -F
|
|
174
|
+
|
|
175
|
+
# themes registry sub-subverbs
|
|
176
|
+
complete -c quilltap -n '__quilltap_using_subverb themes registry' -f -a 'list' -d 'List registries'
|
|
177
|
+
complete -c quilltap -n '__quilltap_using_subverb themes registry' -f -a 'add' -d 'Add a registry'
|
|
178
|
+
complete -c quilltap -n '__quilltap_using_subverb themes registry' -f -a 'remove' -d 'Remove a registry'
|
|
179
|
+
complete -c quilltap -n '__quilltap_using_subverb themes registry' -f -a 'refresh' -d 'Refresh registries'
|
|
180
|
+
complete -c quilltap -n '__quilltap_using_subverb themes registry' -f -a 'keygen' -d 'Generate Ed25519 key'
|
|
181
|
+
complete -c quilltap -n '__quilltap_using_subverb themes registry' -f -a 'sign' -d 'Sign a registry or bundle'
|
|
182
|
+
complete -c quilltap -n '__quilltap_using_subverb themes registry' -l 'key' -s 'k' -d 'Signing key path' -r -F
|
|
183
|
+
complete -c quilltap -n '__quilltap_using_subverb themes registry' -l 'name' -s 'n' -d 'Registry name' -x
|
|
184
|
+
|
|
185
|
+
# ---------- instances verbs ----------
|
|
186
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'list' -d 'List instances'
|
|
187
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'ls' -d 'List instances'
|
|
188
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'show' -d 'Show instance'
|
|
189
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'path' -d 'Show instances.json path'
|
|
190
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'where' -d 'Show instances.json path'
|
|
191
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'add' -d 'Register instance'
|
|
192
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'create' -d 'Register instance'
|
|
193
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'remove' -d 'Unregister instance'
|
|
194
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'rm' -d 'Unregister instance'
|
|
195
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'delete' -d 'Unregister instance'
|
|
196
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'set-passphrase' -d 'Set passphrase'
|
|
197
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'passphrase' -d 'Set passphrase'
|
|
198
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'default' -d 'Set/show/clear default instance'
|
|
199
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -f -a 'rename' -d 'Rename instance'
|
|
200
|
+
|
|
201
|
+
# Instance names as positional for verbs that target one
|
|
202
|
+
for verb in show remove rm delete set-passphrase passphrase default rename
|
|
203
|
+
complete -c quilltap -n "__quilltap_using_subverb instances $verb" -f -a '(__quilltap_instance_names)'
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
complete -c quilltap -n '__quilltap_using_subcommand instances' -l 'names-only' -d 'Print one name per line'
|
|
207
|
+
complete -c quilltap -n '__quilltap_using_subverb instances default' -l 'clear' -d 'Clear default instance'
|
|
208
|
+
|
|
209
|
+
# ---------- memories verbs ----------
|
|
210
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -f -a 'ls' -d 'List memories'
|
|
211
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -f -a 'find' -d 'Substring search'
|
|
212
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -f -a 'grep' -d 'Pattern search'
|
|
213
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -f -a 'show' -d 'Show memory'
|
|
214
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -f -a 'tree' -d 'Graph walk'
|
|
215
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -f -a 'status' -d 'Memory status'
|
|
216
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -f -a 'validate' -d 'Health check'
|
|
217
|
+
|
|
218
|
+
# memories flags
|
|
219
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'character' -d 'Character name or id' -x
|
|
220
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'about' -d 'Subject of memory' -x
|
|
221
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'source' -d 'Memory source' -x -a 'AUTO MANUAL'
|
|
222
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'chat' -d 'Chat id or title' -x
|
|
223
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'project' -d 'Project name or id' -x
|
|
224
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'since' -d 'Since timestamp' -x
|
|
225
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'until' -d 'Until timestamp' -x
|
|
226
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'min-importance' -d 'Minimum importance' -x
|
|
227
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'min-reinforced' -d 'Minimum reinforcement' -x
|
|
228
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'has-embedding' -d 'Only memories with embeddings'
|
|
229
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'no-embedding' -d 'Only memories without embeddings'
|
|
230
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'sort' -d 'Sort field' -x -a 'reinforced importance created accessed reinforcement-count links'
|
|
231
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'reverse' -s 'r' -d 'Reverse sort'
|
|
232
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'limit' -d 'Result limit' -x
|
|
233
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'full-titles' -d 'Show full titles'
|
|
234
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'in' -d 'Restrict find-in field' -x
|
|
235
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'no-related' -d 'Hide related neighbors'
|
|
236
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'list' -d 'List-only output'
|
|
237
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'ignore-case' -s 'i' -d 'Case-insensitive'
|
|
238
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'paths-only' -s 'l' -d 'Paths only'
|
|
239
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'max' -d 'Maximum results' -x
|
|
240
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'context' -d 'Context lines' -x
|
|
241
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'depth' -d 'Walk depth' -x
|
|
242
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'max-nodes' -d 'Maximum graph nodes' -x
|
|
243
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'semantic' -d 'Semantic search'
|
|
244
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'top' -d 'Top N results' -x
|
|
245
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'threshold' -d 'Similarity threshold' -x
|
|
246
|
+
complete -c quilltap -n '__quilltap_using_subcommand memories' -l 'port' -s 'p' -d 'Server port' -x
|
|
247
|
+
|
|
248
|
+
# ---------- memory-diff flags ----------
|
|
249
|
+
complete -c quilltap -n '__quilltap_using_subcommand memory-diff' -l 'port' -s 'p' -d 'Server port' -x
|
|
250
|
+
complete -c quilltap -n '__quilltap_using_subcommand memory-diff' -l 'concurrency' -d 'Concurrency limit' -x
|
|
251
|
+
complete -c quilltap -n '__quilltap_using_subcommand memory-diff' -l 'out' -d 'Output file' -r -F
|
|
252
|
+
|
|
253
|
+
# ---------- logs flags ----------
|
|
254
|
+
complete -c quilltap -n '__quilltap_using_subcommand logs' -l 'stream' -d 'Log stream' -x -a 'combined error stdout stderr startup'
|
|
255
|
+
complete -c quilltap -n '__quilltap_using_subcommand logs' -l 'tail' -d 'Last N lines (0=full)' -x
|
|
256
|
+
complete -c quilltap -n '__quilltap_using_subcommand logs' -l 'follow' -s 'f' -d 'Stream new lines'
|
|
257
|
+
complete -c quilltap -n '__quilltap_using_subcommand logs' -l 'grep' -d 'Regex filter' -x
|
|
258
|
+
|
|
259
|
+
# ---------- migrations verbs ----------
|
|
260
|
+
complete -c quilltap -n '__quilltap_using_subcommand migrations' -f -a 'status' -d 'Migration status'
|
|
261
|
+
complete -c quilltap -n '__quilltap_using_subcommand migrations' -f -a 'pending' -d 'List pending migrations'
|
|
262
|
+
complete -c quilltap -n '__quilltap_using_subcommand migrations' -f -a 'run' -d 'Run pending migrations'
|
|
263
|
+
complete -c quilltap -n '__quilltap_using_subcommand migrations' -l 'dry-run' -d 'Dry run (required for run)'
|
|
264
|
+
|
|
265
|
+
# ---------- completion sub-args ----------
|
|
266
|
+
complete -c quilltap -n '__quilltap_using_subcommand completion' -f -a 'bash' -d 'Bash completion'
|
|
267
|
+
complete -c quilltap -n '__quilltap_using_subcommand completion' -f -a 'zsh' -d 'Zsh completion'
|
|
268
|
+
complete -c quilltap -n '__quilltap_using_subcommand completion' -f -a 'fish' -d 'Fish completion'
|
|
@@ -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() {
|