quilltap 4.13.0-dev.72 → 4.13.0-dev.77

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/README.md CHANGED
@@ -37,6 +37,7 @@ quilltap [options]
37
37
 
38
38
  Options:
39
39
  -p, --port <number> Port to listen on (default: 3000)
40
+ --host <address> Address to bind (default: 127.0.0.1)
40
41
  -d, --data-dir <path> Data directory (default: platform-specific)
41
42
  -o, --open Open browser after server starts
42
43
  -v, --version Show version number
@@ -56,6 +57,10 @@ quilltap --port 8080
56
57
  # Use a custom data directory
57
58
  quilltap --data-dir /mnt/data/quilltap
58
59
 
60
+ # Listen on every interface (Quilltap has no login: trusted networks only;
61
+ # reach it by IP address, or list host names in QUILLTAP_ALLOWED_HOSTS)
62
+ quilltap --host 0.0.0.0
63
+
59
64
  # Start and open browser automatically
60
65
  quilltap --open
61
66
 
package/bin/quilltap.js CHANGED
@@ -29,6 +29,7 @@ function getVersion() {
29
29
  function parseArgs(argv) {
30
30
  const opts = {
31
31
  port: 3000,
32
+ host: '',
32
33
  dataDir: '',
33
34
  instance: '',
34
35
  open: false,
@@ -49,6 +50,13 @@ function parseArgs(argv) {
49
50
  process.exit(1);
50
51
  }
51
52
  break;
53
+ case '--host':
54
+ opts.host = args[++i];
55
+ if (!opts.host) {
56
+ console.error('Error: --host needs an address (e.g. 127.0.0.1 or 0.0.0.0)');
57
+ process.exit(1);
58
+ }
59
+ break;
52
60
  case '--data-dir':
53
61
  case '-d':
54
62
  opts.dataDir = args[++i];
@@ -108,6 +116,8 @@ Subcommands:
108
116
 
109
117
  Options:
110
118
  -p, --port <number> Port to listen on (default: 3000)
119
+ --host <address> Address to bind (default: 127.0.0.1; 0.0.0.0 for every
120
+ interface — there is no login, so only on a trusted network)
111
121
  -d, --data-dir <path> Data directory (default: platform-specific)
112
122
  -i, --instance <name> Use a registered instance (see 'quilltap instances')
113
123
  -o, --open Open browser after server starts
@@ -358,8 +368,11 @@ async function main() {
358
368
  ...process.env,
359
369
  NODE_ENV: 'production',
360
370
  PORT: String(opts.port),
361
- HOSTNAME: '0.0.0.0',
362
371
  };
372
+ // Loopback unless asked otherwise: Quilltap has no login.
373
+ const bindHost = opts.host || process.env.QUILLTAP_HOST || '127.0.0.1';
374
+ env.QUILLTAP_HOST = bindHost;
375
+ env.HOSTNAME = bindHost;
363
376
 
364
377
  if (opts.dataDir && opts.instance) {
365
378
  console.error('Error: Specify either --instance or --data-dir, not both.');
@@ -393,6 +406,9 @@ async function main() {
393
406
  console.log(` Quilltap v${version}`);
394
407
  console.log('');
395
408
  console.log(` URL: ${url}`);
409
+ if (bindHost !== '127.0.0.1' && bindHost !== 'localhost' && bindHost !== '::1') {
410
+ console.log(` Bind: ${bindHost} — reachable from the network; Quilltap has no login`);
411
+ }
396
412
  if (opts.dataDir) {
397
413
  console.log(` Data dir: ${env.QUILLTAP_DATA_DIR}`);
398
414
  }
@@ -58,7 +58,7 @@ _quilltap_complete() {
58
58
  cword=$COMP_CWORD
59
59
 
60
60
  # Global options that can appear before subcommands
61
- local global_opts="-d --data-dir -i --instance -p --port -o --open -v --version -h --help --update --passphrase"
61
+ local global_opts="-d --data-dir -i --instance -p --port --host -o --open -v --version -h --help --update --passphrase"
62
62
 
63
63
  # Top-level subcommands
64
64
  local top_cmds="db docs sync themes instances memories memory-diff recall-replay anchor-probe logs migrations maintenance file-verify completion"
@@ -68,7 +68,7 @@ _quilltap_complete() {
68
68
  # reserves -i for --ignore-case rather than --instance. Counting those wrong
69
69
  # makes a flag's value look like the subcommand's verb, which is how
70
70
  # `quilltap docs --limit 5 <TAB>` used to lose the verb list.
71
- local vf_global=" -d --data-dir -i --instance -p --port --passphrase "
71
+ local vf_global=" -d --data-dir -i --instance -p --port --host --passphrase "
72
72
  local vf_db=" --limit --grep --character --project --about --source --tier --chat --message --field --tail --last --from --type --out --id --count "
73
73
  local vf_docs=" --mount --folder --type --ext --limit --max --context --top --threshold --sort --depth --max-nodes --format "
74
74
  local vf_sync=" --direction --prefer "
@@ -146,7 +146,7 @@ _quilltap_complete() {
146
146
  COMPREPLY=($(compgen -d -- "$cur"))
147
147
  return
148
148
  fi
149
- if [[ "$prev" == "-p" ]] || [[ "$prev" == "--port" ]] || [[ "$prev" == "--passphrase" ]]; then
149
+ if [[ "$prev" == "-p" ]] || [[ "$prev" == "--port" ]] || [[ "$prev" == "--host" ]] || [[ "$prev" == "--passphrase" ]]; then
150
150
  return
151
151
  fi
152
152
  if [[ "$prev" == "--instance" ]] || { [[ "$prev" == "-i" ]] && [[ "$subcommand" != "memories" ]]; }; then
@@ -70,6 +70,7 @@ complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'completion' -d 'Genera
70
70
 
71
71
  # Global options
72
72
  complete -c quilltap -n '__quilltap_no_subcommand' -l 'port' -s 'p' -d 'Port to listen on' -x
73
+ complete -c quilltap -n '__quilltap_no_subcommand' -l 'host' -d 'Address to bind (default 127.0.0.1)' -x
73
74
  complete -c quilltap -n '__quilltap_no_subcommand' -l 'data-dir' -s 'd' -d 'Data directory' -r -F
74
75
  complete -c quilltap -n '__quilltap_no_subcommand' -l 'instance' -s 'i' -d 'Use registered instance' -x -a '(__quilltap_instance_names)'
75
76
  complete -c quilltap -n '__quilltap_no_subcommand' -l 'open' -s 'o' -d 'Open browser after start'
@@ -27,6 +27,7 @@ _quilltap() {
27
27
  '(-d --data-dir)'{-d,--data-dir}'[Data directory]:directory:_directories'
28
28
  '(-i --instance)'{-i,--instance}'[Use a registered instance]:instance:_quilltap_instance_names'
29
29
  '(-p --port)'{-p,--port}'[Port to listen on]:port:'
30
+ '--host[Address to bind (default 127.0.0.1)]:address:'
30
31
  '(-o --open)'{-o,--open}'[Open browser after server starts]'
31
32
  '(-v --version)'{-v,--version}'[Show version number]'
32
33
  '(-h --help)'{-h,--help}'[Show help message]'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quilltap",
3
- "version": "4.13.0-dev.72",
3
+ "version": "4.13.0-dev.77",
4
4
  "description": "Self-hosted AI workspace for writers, worldbuilders, and roleplayers. Run with npx quilltap.",
5
5
  "author": {
6
6
  "name": "Charles Sebold",