@k-leumas/queque-cli 0.7.1 → 0.8.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/README.md +11 -0
- package/dist/cli/app.js +1917 -262
- package/dist/cli/app.js.map +1 -1
- package/package.json +4 -1
- package/shell/zsh/queque.zsh +28 -1
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.8.1",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/k-leumas/queque.git"
|
|
@@ -24,11 +24,14 @@
|
|
|
24
24
|
"dev:restart": "node scripts/restart-dev-server.mjs",
|
|
25
25
|
"test": "vitest --passWithNoTests",
|
|
26
26
|
"test:run": "vitest run --passWithNoTests",
|
|
27
|
+
"test:live": "vitest run --config vitest.live.config.ts",
|
|
27
28
|
"typecheck": "tsc --noEmit",
|
|
28
29
|
"lint": "biome check .",
|
|
29
30
|
"lint:fix": "biome check --write .",
|
|
30
31
|
"format": "biome format --write .",
|
|
31
32
|
"commitlint": "commitlint --edit",
|
|
33
|
+
"smoke:distro": "scripts/smoke-distro.sh",
|
|
34
|
+
"test:distro": "scripts/ci/test-in-distro.sh",
|
|
32
35
|
"prepare": "[ -d .git ] && lefthook install || true"
|
|
33
36
|
},
|
|
34
37
|
"dependencies": {
|
package/shell/zsh/queque.zsh
CHANGED
|
@@ -102,6 +102,15 @@ _qq_instant_frame() {
|
|
|
102
102
|
if [[ "${QQ_INSTANT_FRAME:-}" == 0 ]]; then
|
|
103
103
|
return 0
|
|
104
104
|
fi
|
|
105
|
+
# Outside a UTF-8 locale (glibc images default to C) zsh counts and slices bytes, so the
|
|
106
|
+
# header came out short (› and … are 3 bytes) and a typed multibyte character could be cut
|
|
107
|
+
# in half. Count characters in a UTF-8 locale for this function only; if none exists the
|
|
108
|
+
# assignment is a no-op and the old byte arithmetic stays.
|
|
109
|
+
local probe='›'
|
|
110
|
+
if (( ${#probe} != 1 )); then
|
|
111
|
+
local LC_ALL=C.UTF-8
|
|
112
|
+
(( ${#probe} == 1 )) || LC_ALL=en_US.UTF-8
|
|
113
|
+
fi
|
|
105
114
|
local lbuffer="${1//[[:cntrl:]]/}"
|
|
106
115
|
local columns="${2:-}"
|
|
107
116
|
if [[ "$columns" != <1-> ]] || (( columns > QQ_MODAL_MAX_COLUMNS )); then
|
|
@@ -369,7 +378,20 @@ qq-question-widget() {
|
|
|
369
378
|
# Create a private session directory (CR-006 fix).
|
|
370
379
|
# Using mktemp -d + chmod 700 prevents symlink-redirect attacks on temp paths.
|
|
371
380
|
local tmpdir req_file
|
|
372
|
-
tmpdir=$(mktemp -d /tmp/qq-sess.XXXXXX)
|
|
381
|
+
tmpdir=$(mktemp -d /tmp/qq-sess.XXXXXX 2>/dev/null)
|
|
382
|
+
# Phase 10 Defect 3: a full or unwritable /tmp leaves tmpdir empty, and every path
|
|
383
|
+
# below would then be at the filesystem root (/request.json, the tool handoff). Stop
|
|
384
|
+
# before any write: clear the instant frame, keep the typed line, say why.
|
|
385
|
+
if [[ -z "$tmpdir" || ! -d "$tmpdir" ]]; then
|
|
386
|
+
if [[ "$QQ_INSTANT_FRAME_PAINTED" == 1 ]]; then
|
|
387
|
+
print -rn -- $'\e8\e[J' 2>/dev/null || true
|
|
388
|
+
fi
|
|
389
|
+
LBUFFER="$QQ_LBUFFER"
|
|
390
|
+
RBUFFER="$QQ_RBUFFER"
|
|
391
|
+
_qq_log "mktemp -d failed; session dir not created"
|
|
392
|
+
zle -M "queque: cannot create a temp dir in /tmp"
|
|
393
|
+
return 0
|
|
394
|
+
fi
|
|
373
395
|
chmod 700 "$tmpdir"
|
|
374
396
|
req_file="$tmpdir/request.json"
|
|
375
397
|
_qq_log "tmpdir=${tmpdir}"
|
|
@@ -397,6 +419,11 @@ JSON
|
|
|
397
419
|
_qq_write_tool_handoff "$tmpdir"
|
|
398
420
|
_qq_log "tool handoff written"
|
|
399
421
|
|
|
422
|
+
# Phase 10 telemetry: $ZSH_VERSION is not exported, so the client cannot read it. Export
|
|
423
|
+
# it like QQ_RESULT_FILE: both the inline child and the Zellij pane inherit it, and the
|
|
424
|
+
# client reports major.minor only (and only with telemetry on).
|
|
425
|
+
export QQ_ZSH_VERSION="$ZSH_VERSION"
|
|
426
|
+
|
|
400
427
|
if [[ -n "$ZELLIJ" ]]; then
|
|
401
428
|
# ---- Zellij path: FIFO + floating pane ----
|
|
402
429
|
local fifo_path="$tmpdir/result.fifo"
|