@indigoai-us/hq-cli 5.345.160 → 5.345.161
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/CHANGELOG.md +24 -0
- package/assets/scaffold/core/scripts/session-journal.sh +116 -24
- package/dist/command-catalog.generated.d.ts +218 -5
- package/dist/command-catalog.generated.js +269 -5
- package/dist/commands/auth.js +6 -5
- package/dist/commands/core-session-helper-runtime.d.ts +1 -0
- package/dist/commands/core-session-journal-native.d.ts +1 -0
- package/dist/commands/core-session-journal-native.js +158 -34
- package/dist/commands/feedback.d.ts +12 -0
- package/dist/commands/feedback.js +52 -0
- package/dist/commands/files-browse.d.ts +8 -0
- package/dist/commands/files-browse.js +83 -1
- package/dist/commands/install-global.d.ts +2 -0
- package/dist/commands/install-global.js +24 -1
- package/dist/commands/integrations-connect.js +1 -0
- package/dist/commands/integrations-manage.d.ts +2 -0
- package/dist/commands/integrations-manage.js +6 -4
- package/dist/commands/lanes-link.js +5 -3
- package/dist/commands/lanes-session-start.d.ts +12 -0
- package/dist/commands/lanes-session-start.js +93 -12
- package/dist/commands/meetings.d.ts +11 -0
- package/dist/commands/meetings.js +41 -11
- package/dist/hq-cloud-sync-runner/bin/sync-runner.js +2486 -1794
- package/dist/hq-cloud-sync-runner/package.json +1 -1
- package/dist/index.js +21 -0
- package/dist/lanes-session-start-argv.d.ts +7 -0
- package/dist/lanes-session-start-argv.js +9 -0
- package/dist/lib/bot/log.d.ts +3 -2
- package/dist/lib/bot/progress.d.ts +23 -1
- package/dist/lib/bot/progress.js +43 -5
- package/dist/lib/bot/run.js +2 -0
- package/dist/lib/bot/runtime/claude.d.ts +12 -0
- package/dist/lib/bot/runtime/claude.js +20 -0
- package/dist/lib/bot/runtime/index.d.ts +10 -1
- package/dist/lib/bot/runtime/index.js +14 -2
- package/dist/lib/bot/runtime/types.d.ts +8 -0
- package/dist/lib/doctor/checks/ps1-shims.d.ts +21 -0
- package/dist/lib/doctor/checks/ps1-shims.js +82 -0
- package/dist/lib/doctor/fix/apply.d.ts +13 -1
- package/dist/lib/doctor/fix/apply.js +38 -3
- package/dist/lib/doctor/fix/remediation.d.ts +9 -1
- package/dist/lib/doctor/fix/remediation.js +22 -0
- package/dist/lib/doctor/registry.js +2 -0
- package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
- package/dist/lib/flag-registry-worker-source.generated.js +1 -1
- package/dist/lib/lanes/links.d.ts +2 -1
- package/dist/lib/lanes/links.js +235 -17
- package/dist/lib/lanes/registry-flag.d.ts +24 -0
- package/dist/lib/lanes/registry-flag.js +72 -6
- package/dist/lib/lanes/store.d.ts +4 -2
- package/dist/lib/lanes/store.js +8 -8
- package/dist/lib/windows/ps1-shims.d.ts +60 -0
- package/dist/lib/windows/ps1-shims.js +152 -0
- package/dist/utils/self-update.d.ts +2 -0
- package/dist/utils/self-update.js +8 -0
- package/dist/utils/staged-npm-install.js +13 -2
- package/dist/utils/token-keychain.d.ts +11 -8
- package/dist/utils/token-keychain.js +36 -15
- package/package.json +8 -8
- package/scripts/install-hook-engine.mjs +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [5.345.161] — 2026-10-23
|
|
6
|
+
- The bundled sync engine now uses hq-cloud 6.18.99, the current npm `latest`.
|
|
7
|
+
HQ Sync follows the server's telemetry decision for free-plan accounts,
|
|
8
|
+
failed company and personal sync legs report a short error summary with no
|
|
9
|
+
file names or paths, and the shell-script line-ending fix never rewrites a
|
|
10
|
+
file whose signature marks it as binary (hq-cloud #1039, #1043, #1044).
|
|
11
|
+
- Fence session-journal counter owners with atomically published PID and owner-token records. Reclaim dead or aged PID-less publisher claims and aged orphan temp directories; holders that lose ownership retry before their callback or counter write.
|
|
12
|
+
- `hq files cat` / `get` and the agent file tools now name the storage host when a signed vault download cannot connect (connection refused or reset, DNS failure, timeout, or a TLS failure from an HTTPS-inspecting proxy) and tell the operator to allow outbound HTTPS (TCP 443) to that host. Before this, the raw `fetch failed` error surfaced with no host.
|
|
13
|
+
- New `hq feedback assign <id> --to <email|prs_uid>` reassigns a feedback ticket with your own login, including a ticket another person claimed. Agent and operator tokens still get `TICKET_CLAIMED_BY_HUMAN` for those tickets, and the command says to rerun it from your own login.
|
|
14
|
+
- `hq integrations share`, `unshare`, `grant` and `ungrant` help now says the principal can be a vault group (`grp_…`), which the commands already accepted. Group membership is resolved when a tool is called, and `hq integrations access` shows the group's name once the server returns it.
|
|
15
|
+
- Bot turns on the Claude runtime now bound each Bash tool call to 10 minutes (`BASH_DEFAULT_TIMEOUT_MS` / `BASH_MAX_TIMEOUT_MS`, kept when already set), and the runtime process is started with stdin closed, so a bot-authored command that waits on stdin (`cat > /dev/null`) can no longer hold a turn "working" indefinitely.
|
|
16
|
+
- A bot no longer posts a short assistant aside (under 40 characters, no `hq-block`) that a tool call follows in the same assistant message ("Bind first, separately."); it is logged at debug level instead. Full-sentence progress notes still post.
|
|
17
|
+
- `hq integrations reconnect` now accepts `--scopes <list>` like `connect` (space- or comma-separated). Use it when a provider such as Meta refuses a sign-in request that names no scopes.
|
|
18
|
+
- Keep explicitly delivered conductor instructions replayable until the receiving
|
|
19
|
+
session acknowledges their stable receipt. Timing out or discarding hook output
|
|
20
|
+
no longer counts as instruction acceptance when the paired hook is installed.
|
|
21
|
+
|
|
22
|
+
- Malformed rows now retain a private audit without preventing valid later
|
|
23
|
+
instructions from being accepted. Active Stop retries do not block repeatedly.
|
|
24
|
+
- Keep temporary macOS Keychain read failures retryable instead of recording them as denied access, explain saved-sign-in fallback, and give explicit retries time to answer the prompt.
|
|
25
|
+
- `hq lanes session-start` (the SessionStart auto-conduct hook) no longer reads the lanes registry flags over the network on every new session. It reads them from the local flag cache and person flag snapshot, fails open when none is known, and refreshes old or missing values in the background. It also skips loading the full command graph. On a warm cache it now returns in about 0.3 s instead of about 3 s, so the hook stays under its 2 s cap and the auto-conduct context is no longer dropped. Feedback 4db60cce.
|
|
26
|
+
- `hq meetings list`, `get`, `transcript`, `search` and the other read subcommands now default to the bound company when the caller explicitly names its HQ session in the environment and omits `--company`. Before this they sent no company at all, so a bound session saw only the caller's personal recordings and missed the company's. Plain terminals and cron calls keep the server default; they never borrow the shared last-session pointer. `--company` still overrides, and `set-company` still requires an explicit target. Feedback 04771691-fcbc-4847-899a-6c966c561b52.
|
|
27
|
+
- On Windows, remove npm's `hq.ps1` and `hq-auth-refresh.ps1` launchers after install, update and `hq install --global`, so PowerShell runs `hq.cmd` instead of failing with UnauthorizedAccess under the default Restricted execution policy. `hq doctor` reports a blocked launcher that is still present and `hq doctor --fix` removes it. The execution policy is only read, never changed.
|
|
28
|
+
|
|
5
29
|
## [5.345.160] — 2026-10-22
|
|
6
30
|
- The bundled sync engine now uses hq-cloud 6.18.98. When HQ pauses an account because of usage, `hq sync` now shows the server's usage-pause message and a Billing link instead of a generic failure (hq-cloud #1036).
|
|
7
31
|
- `hq billing usage` now shows the amounts on HQ's usage statement, which is what the invoice bills. Before this it re-priced the meters itself, so it could show a different figure than the statement, for example charging the vault fee during the trial when the statement waived it.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Spec: core/knowledge/public/hq-core/session-journal-spec.md
|
|
4
4
|
#
|
|
5
5
|
# Usage:
|
|
6
|
-
# session-journal.sh write "<title>" [--files f1,f2,...] [--body-file PATH] [--session KEY]
|
|
6
|
+
# session-journal.sh write "<title>" [--files f1,f2,...] [--body-file PATH] [--session KEY] [--company SLUG]
|
|
7
7
|
# session-journal.sh list [--date YYYY-MM-DD]
|
|
8
8
|
# session-journal.sh read <NNN> [--date YYYY-MM-DD]
|
|
9
9
|
# session-journal.sh index-path [--date YYYY-MM-DD] # prints the INDEX.md path
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
# "unscoped". A date-global counter let concurrent Claude and Codex tasks
|
|
19
19
|
# trigger and reset each other's journal reminders.
|
|
20
20
|
#
|
|
21
|
+
# HQ_JOURNAL_COUNTER_NOW overrides epoch seconds only in the counter-lock age check, for deterministic tests.
|
|
21
22
|
# All commands fail-soft: warn to stderr, exit 0 — never block the caller.
|
|
22
23
|
|
|
23
24
|
set -uo pipefail
|
|
@@ -131,7 +132,8 @@ resolve_session_key() {
|
|
|
131
132
|
counter_lock_is_aged() {
|
|
132
133
|
local lockdir="$1" lock_mtime now
|
|
133
134
|
lock_mtime="$(stat -c %Y "$lockdir" 2>/dev/null)" || lock_mtime="$(stat -f %m "$lockdir" 2>/dev/null)" || return 1
|
|
134
|
-
now="$(date -u +%s 2>/dev/null)"
|
|
135
|
+
now="${HQ_JOURNAL_COUNTER_NOW:-$(date -u +%s 2>/dev/null)}"
|
|
136
|
+
[ -n "$now" ] || return 1
|
|
135
137
|
case "$lock_mtime:$now" in *[!0-9:]*|:*|*:) return 1 ;; esac
|
|
136
138
|
[ "$now" -ge "$lock_mtime" ] && [ "$((now - lock_mtime))" -ge 60 ]
|
|
137
139
|
}
|
|
@@ -158,8 +160,9 @@ counter_lock_owner_is_alive() {
|
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
reclaim_stale_counter_lock() {
|
|
161
|
-
local lockdir="$1" owner_pid current_owner current_windows_pid windows_pid claim stale_dir suffix=0 pidless=0
|
|
163
|
+
local lockdir="$1" owner_pid current_owner current_windows_pid windows_pid owner_token current_token claim stale_dir suffix=0 pidless=0
|
|
162
164
|
owner_pid="$(cat "$lockdir/pid" 2>/dev/null || true)"
|
|
165
|
+
owner_token="$(cat "$lockdir/owner-token" 2>/dev/null || true)"
|
|
163
166
|
case "$owner_pid" in
|
|
164
167
|
'')
|
|
165
168
|
windows_pid="$(cat "$lockdir/winpid" 2>/dev/null || true)"
|
|
@@ -189,6 +192,7 @@ reclaim_stale_counter_lock() {
|
|
|
189
192
|
|
|
190
193
|
current_owner="$(cat "$lockdir/pid" 2>/dev/null || true)"
|
|
191
194
|
current_windows_pid="$(cat "$lockdir/winpid" 2>/dev/null || true)"
|
|
195
|
+
current_token="$(cat "$lockdir/owner-token" 2>/dev/null || true)"
|
|
192
196
|
if [ "$pidless" -eq 1 ]; then
|
|
193
197
|
# Recheck both identity and age after winning the claim, before renaming.
|
|
194
198
|
if [ -z "$current_owner" ] && [ "$current_windows_pid" = "$windows_pid" ] \
|
|
@@ -200,6 +204,7 @@ reclaim_stale_counter_lock() {
|
|
|
200
204
|
fi
|
|
201
205
|
fi
|
|
202
206
|
if [ "$current_owner" = "$owner_pid" ] && [ "$current_windows_pid" = "${windows_pid:-$(cat "$lockdir/winpid" 2>/dev/null || true)}" ] \
|
|
207
|
+
&& [ "$current_token" = "$owner_token" ] \
|
|
203
208
|
&& { [ "$pidless" -eq 1 ] || ! counter_lock_owner_is_alive "$lockdir" "$owner_pid"; }; then
|
|
204
209
|
stale_dir="${lockdir}.stale.$$.$RANDOM"
|
|
205
210
|
while [ -e "$stale_dir" ]; do
|
|
@@ -217,38 +222,111 @@ reclaim_stale_counter_lock() {
|
|
|
217
222
|
return 1
|
|
218
223
|
}
|
|
219
224
|
|
|
225
|
+
reclaim_stale_counter_tempdirs() {
|
|
226
|
+
local lockdir="$1" candidate owner_pid windows_pid owner_token current_pid current_windows current_token stale_dir suffix=0
|
|
227
|
+
# Publishers create <lock>.tmp.XXXXXX. Older native hq-cli builds used
|
|
228
|
+
# <lock>.tmp-XXXXXX, so reclaim aged orphans with either prefix.
|
|
229
|
+
for candidate in "${lockdir}.tmp."* "${lockdir}.tmp-"*; do
|
|
230
|
+
[ -d "$candidate" ] || continue
|
|
231
|
+
counter_lock_is_aged "$candidate" || continue
|
|
232
|
+
owner_pid="$(cat "$candidate/pid" 2>/dev/null || true)"
|
|
233
|
+
windows_pid="$(cat "$candidate/winpid" 2>/dev/null || true)"
|
|
234
|
+
owner_token="$(cat "$candidate/owner-token" 2>/dev/null || true)"
|
|
235
|
+
case "$owner_pid" in
|
|
236
|
+
'')
|
|
237
|
+
if [ -n "$windows_pid" ] && counter_windows_pid_is_alive "$windows_pid"; then continue; fi
|
|
238
|
+
;;
|
|
239
|
+
*[!0-9]*) continue ;;
|
|
240
|
+
*)
|
|
241
|
+
[ "$owner_pid" -gt 1 ] 2>/dev/null || continue
|
|
242
|
+
counter_lock_owner_is_alive "$candidate" "$owner_pid" && continue
|
|
243
|
+
;;
|
|
244
|
+
esac
|
|
245
|
+
current_pid="$(cat "$candidate/pid" 2>/dev/null || true)"
|
|
246
|
+
current_windows="$(cat "$candidate/winpid" 2>/dev/null || true)"
|
|
247
|
+
current_token="$(cat "$candidate/owner-token" 2>/dev/null || true)"
|
|
248
|
+
[ "$current_pid" = "$owner_pid" ] && [ "$current_windows" = "$windows_pid" ] \
|
|
249
|
+
&& [ "$current_token" = "$owner_token" ] && counter_lock_is_aged "$candidate" || continue
|
|
250
|
+
[ -z "$current_pid" ] || ! counter_lock_owner_is_alive "$candidate" "$current_pid" || continue
|
|
251
|
+
[ -z "$current_windows" ] || ! counter_windows_pid_is_alive "$current_windows" || continue
|
|
252
|
+
stale_dir="${candidate}.stale.$$.$RANDOM"
|
|
253
|
+
while [ -e "$stale_dir" ]; do suffix=$((suffix + 1)); stale_dir="${candidate}.stale.$$.$RANDOM.$suffix"; done
|
|
254
|
+
if mv "$candidate" "$stale_dir" 2>/dev/null; then rm -rf "$stale_dir" 2>/dev/null || true; fi
|
|
255
|
+
done
|
|
256
|
+
}
|
|
257
|
+
|
|
220
258
|
with_counter_lock() {
|
|
221
259
|
local lockdir="$1"; shift
|
|
222
|
-
local i=0 acquired=0 rc=0 tries="${HQ_JOURNAL_COUNTER_LOCK_TRIES:-250}"
|
|
260
|
+
local i=0 acquired=0 rc=0 tries="${HQ_JOURNAL_COUNTER_LOCK_TRIES:-250}" owner_token tempdir windows_pid token_file publish_claim
|
|
223
261
|
case "$tries" in ''|*[!0-9]*) tries=250 ;; esac
|
|
224
262
|
while [ "$i" -lt "$tries" ]; do
|
|
225
|
-
|
|
226
|
-
|
|
263
|
+
reclaim_stale_counter_tempdirs "$lockdir"
|
|
264
|
+
# Publish a complete owner record in one rename. Legacy clients may still
|
|
265
|
+
# leave PID-less lock directories, which the age-based reclaim handles.
|
|
266
|
+
tempdir="$(mktemp -d "${lockdir}.tmp.XXXXXX" 2>/dev/null)" || tempdir=""
|
|
267
|
+
if [ -n "$tempdir" ]; then
|
|
268
|
+
owner_token="$$.$RANDOM.$RANDOM.$(date -u +%s 2>/dev/null)"
|
|
227
269
|
if [[ "${OSTYPE:-}" == msys* ]] || [[ "${OSTYPE:-}" == cygwin* ]]; then
|
|
228
|
-
local windows_pid
|
|
229
270
|
windows_pid="$(cat "/proc/$$/winpid" 2>/dev/null || true)"
|
|
230
|
-
case "$windows_pid" in ''|*[!0-9]*)
|
|
271
|
+
case "$windows_pid" in ''|*[!0-9]*) windows_pid="" ;; esac
|
|
272
|
+
if [ -n "$windows_pid" ] && ! printf '%s\n' "$windows_pid" > "$tempdir/winpid"; then rm -rf "$tempdir"; tempdir=""; fi
|
|
231
273
|
fi
|
|
232
|
-
if
|
|
233
|
-
|
|
234
|
-
|
|
274
|
+
if [ -n "$tempdir" ] && printf '%s\n' "$$" > "$tempdir/pid" \
|
|
275
|
+
&& printf '%s\n' "$owner_token" > "$tempdir/owner-token"; then
|
|
276
|
+
# Serialize publishers so mv cannot interpret a concurrently-created
|
|
277
|
+
# lock directory as a destination directory and nest the temp folder.
|
|
278
|
+
publish_claim="${lockdir}.publish"
|
|
279
|
+
if mkdir "$publish_claim" 2>/dev/null; then
|
|
280
|
+
# Exclusive token creation fences a publisher resumed after a stale
|
|
281
|
+
# PID-less claim was reclaimed and reused by another process.
|
|
282
|
+
if (set -C; printf '%s\n' "$owner_token" > "$publish_claim/owner-token") 2>/dev/null \
|
|
283
|
+
&& [ "$(cat "$publish_claim/owner-token" 2>/dev/null || true)" = "$owner_token" ] \
|
|
284
|
+
&& (set -C; printf '%s\n' "$$" > "$publish_claim/pid") 2>/dev/null \
|
|
285
|
+
&& [ "$(cat "$publish_claim/owner-token" 2>/dev/null || true)" = "$owner_token" ] \
|
|
286
|
+
&& [ ! -e "$lockdir" ] && mv "$tempdir" "$lockdir" 2>/dev/null; then :; fi
|
|
287
|
+
if [ "$(cat "$publish_claim/owner-token" 2>/dev/null || true)" = "$owner_token" ]; then
|
|
288
|
+
rm -rf "$publish_claim" 2>/dev/null || true
|
|
289
|
+
fi
|
|
290
|
+
else
|
|
291
|
+
rm -rf "$tempdir" 2>/dev/null || true
|
|
292
|
+
reclaim_stale_counter_lock "$publish_claim" && continue
|
|
293
|
+
fi
|
|
294
|
+
if [ ! -e "$tempdir" ] && [ "$(cat "$lockdir/owner-token" 2>/dev/null || true)" = "$owner_token" ]; then
|
|
295
|
+
acquired=1
|
|
296
|
+
rmdir "$tempdir" 2>/dev/null || true
|
|
297
|
+
token_file="$lockdir/owner-token"
|
|
298
|
+
if [ "$(cat "$token_file" 2>/dev/null || true)" = "$owner_token" ]; then
|
|
299
|
+
"$@" "$owner_token"
|
|
300
|
+
rc=$?
|
|
301
|
+
if [ "$rc" -eq 75 ]; then
|
|
302
|
+
acquired=0
|
|
303
|
+
i=$((i + 1))
|
|
304
|
+
continue
|
|
305
|
+
fi
|
|
306
|
+
if [ "$(cat "$token_file" 2>/dev/null || true)" = "$owner_token" ]; then
|
|
307
|
+
rm -rf "$lockdir" 2>/dev/null || true
|
|
308
|
+
fi
|
|
309
|
+
return "$rc"
|
|
310
|
+
fi
|
|
311
|
+
acquired=0
|
|
312
|
+
i=$((i + 1))
|
|
313
|
+
continue
|
|
314
|
+
fi
|
|
315
|
+
if [ ! -e "$tempdir" ]; then rm -rf "$lockdir/$(basename "$tempdir")" 2>/dev/null || true; fi
|
|
235
316
|
fi
|
|
236
|
-
|
|
317
|
+
if [ -n "$tempdir" ]; then rm -rf "$tempdir" 2>/dev/null || true; fi
|
|
237
318
|
fi
|
|
238
319
|
reclaim_stale_counter_lock "$lockdir" && continue
|
|
239
320
|
i=$((i + 1))
|
|
240
321
|
[ "$i" -ge "$tries" ] || sleep 0.02 2>/dev/null || sleep 1
|
|
241
322
|
done
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
fi
|
|
323
|
+
warn "tool-counter: lock remained busy; skipped update"
|
|
324
|
+
return 0
|
|
325
|
+
}
|
|
246
326
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
fi
|
|
251
|
-
return "$rc"
|
|
327
|
+
counter_lock_token_is_current() {
|
|
328
|
+
local lockdir="$1" owner_token="$2"
|
|
329
|
+
[ -n "$owner_token" ] && [ "$(cat "$lockdir/owner-token" 2>/dev/null || true)" = "$owner_token" ]
|
|
252
330
|
}
|
|
253
331
|
|
|
254
332
|
counter_read_raw() {
|
|
@@ -303,8 +381,10 @@ case "$cmd" in
|
|
|
303
381
|
files_csv=""
|
|
304
382
|
body_file=""
|
|
305
383
|
session_arg=""
|
|
384
|
+
company_arg="${HQ_ACTIVE_COMPANY:-}"
|
|
306
385
|
while [ $# -gt 0 ]; do
|
|
307
386
|
case "$1" in
|
|
387
|
+
--company) company_arg="${2:-}"; shift 2 || break ;;
|
|
308
388
|
--files) files_csv="${2:-}"; shift 2 || break ;;
|
|
309
389
|
--body-file) body_file="${2:-}"; shift 2 || break ;;
|
|
310
390
|
--session) session_arg="${2:-}"; shift 2 || break ;;
|
|
@@ -313,6 +393,9 @@ case "$cmd" in
|
|
|
313
393
|
done
|
|
314
394
|
|
|
315
395
|
[ -z "$title" ] && { warn "write: title required"; exit 0; }
|
|
396
|
+
# The bound company tags the entry so the SessionStart index loader can
|
|
397
|
+
# surface only that company's entries. Anything not slug-shaped is dropped.
|
|
398
|
+
[[ "$company_arg" =~ ^[A-Za-z0-9_-]+$ ]] || company_arg=""
|
|
316
399
|
|
|
317
400
|
d="$(today)"
|
|
318
401
|
dir="$(journal_dir_for "$d")"
|
|
@@ -346,6 +429,7 @@ case "$cmd" in
|
|
|
346
429
|
printf 'ts: %s\n' "$(now_iso_z)"
|
|
347
430
|
printf 'title: %s\n' "$yaml_title"
|
|
348
431
|
printf 'slug: %s\n' "$yaml_slug"
|
|
432
|
+
[ -z "$company_arg" ] || printf 'company: %s\n' "$company_arg"
|
|
349
433
|
if [ -n "$files_csv" ]; then
|
|
350
434
|
printf 'files:\n'
|
|
351
435
|
old_ifs="$IFS"
|
|
@@ -384,7 +468,9 @@ case "$cmd" in
|
|
|
384
468
|
if [ ! -f "$idx" ]; then
|
|
385
469
|
printf '# Session journal — %s\n\n' "$d" > "$idx"
|
|
386
470
|
fi
|
|
387
|
-
|
|
471
|
+
company_tag=""
|
|
472
|
+
[ -z "$company_arg" ] || company_tag=" [company: $company_arg]"
|
|
473
|
+
printf -- '- `%s` %s — %s%s\n' "$seq" "$(now_hhmm_z)" "$title" "$company_tag" >> "$idx" \
|
|
388
474
|
|| warn "write: INDEX update failed"
|
|
389
475
|
|
|
390
476
|
# Reset the tool counter for THIS session only — journaling one task's
|
|
@@ -452,8 +538,10 @@ case "$cmd" in
|
|
|
452
538
|
case "$sub" in
|
|
453
539
|
increment)
|
|
454
540
|
do_increment() {
|
|
455
|
-
local n
|
|
541
|
+
local owner_token="${1:-}" n
|
|
542
|
+
counter_lock_token_is_current "$lockdir" "$owner_token" || return 75
|
|
456
543
|
n=$(counter_read_raw "$counter")
|
|
544
|
+
counter_lock_token_is_current "$lockdir" "$owner_token" || return 75
|
|
457
545
|
echo $((n + 1)) > "$counter" 2>/dev/null || true
|
|
458
546
|
}
|
|
459
547
|
with_counter_lock "$lockdir" do_increment
|
|
@@ -462,7 +550,11 @@ case "$cmd" in
|
|
|
462
550
|
printf '%d\n' "$(counter_read_raw "$counter")"
|
|
463
551
|
;;
|
|
464
552
|
reset)
|
|
465
|
-
do_reset() {
|
|
553
|
+
do_reset() {
|
|
554
|
+
local owner_token="${1:-}"
|
|
555
|
+
counter_lock_token_is_current "$lockdir" "$owner_token" || return 75
|
|
556
|
+
echo 0 > "$counter" 2>/dev/null || true
|
|
557
|
+
}
|
|
466
558
|
with_counter_lock "$lockdir" do_reset
|
|
467
559
|
;;
|
|
468
560
|
*) warn "tool-counter: subcommand required (increment|read|reset)" ;;
|
|
@@ -4554,6 +4554,27 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
4554
4554
|
readonly hidden: false;
|
|
4555
4555
|
}];
|
|
4556
4556
|
readonly subcommands: readonly [];
|
|
4557
|
+
}, {
|
|
4558
|
+
readonly name: "assign";
|
|
4559
|
+
readonly description: "Reassign a ticket to a person, including one another person has claimed";
|
|
4560
|
+
readonly aliases: readonly [];
|
|
4561
|
+
readonly hidden: false;
|
|
4562
|
+
readonly helpOption: true;
|
|
4563
|
+
readonly helpCommand: false;
|
|
4564
|
+
readonly usage: "[options] <id>";
|
|
4565
|
+
readonly helpText: readonly [];
|
|
4566
|
+
readonly arguments: readonly [{
|
|
4567
|
+
readonly name: "id";
|
|
4568
|
+
readonly required: true;
|
|
4569
|
+
readonly variadic: false;
|
|
4570
|
+
readonly description: "Feedback id (feedback_<uuid>)";
|
|
4571
|
+
}];
|
|
4572
|
+
readonly options: readonly [{
|
|
4573
|
+
readonly flags: "--to <assignee>";
|
|
4574
|
+
readonly description: "New assignee: an email address or a prs_ uid";
|
|
4575
|
+
readonly hidden: false;
|
|
4576
|
+
}];
|
|
4577
|
+
readonly subcommands: readonly [];
|
|
4557
4578
|
}];
|
|
4558
4579
|
}, {
|
|
4559
4580
|
readonly name: "meetings";
|
|
@@ -4567,7 +4588,7 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
4567
4588
|
readonly arguments: readonly [];
|
|
4568
4589
|
readonly options: readonly [{
|
|
4569
4590
|
readonly flags: "--company <slug>";
|
|
4570
|
-
readonly description: "Company slug (
|
|
4591
|
+
readonly description: "Company slug (defaults to the company this HQ session is bound to)";
|
|
4571
4592
|
readonly hidden: false;
|
|
4572
4593
|
}, {
|
|
4573
4594
|
readonly flags: "--json";
|
|
@@ -5458,6 +5479,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
5458
5479
|
readonly flags: "--client-secret-stdin";
|
|
5459
5480
|
readonly description: "Read that app's client secret from stdin";
|
|
5460
5481
|
readonly hidden: false;
|
|
5482
|
+
}, {
|
|
5483
|
+
readonly flags: "--scopes <list>";
|
|
5484
|
+
readonly description: "Permissions to request, space- or comma-separated (default: the permissions the app was approved for last time)";
|
|
5485
|
+
readonly hidden: false;
|
|
5461
5486
|
}, {
|
|
5462
5487
|
readonly flags: "--no-browser";
|
|
5463
5488
|
readonly description: "Print the sign-in URL instead of opening a browser";
|
|
@@ -5653,7 +5678,7 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
5653
5678
|
readonly hidden: false;
|
|
5654
5679
|
}, {
|
|
5655
5680
|
readonly flags: "--to <principal>";
|
|
5656
|
-
readonly description: "Email, uid, or `everyone`";
|
|
5681
|
+
readonly description: "Email, uid, vault group (grp_…), or `everyone`";
|
|
5657
5682
|
readonly hidden: false;
|
|
5658
5683
|
}, {
|
|
5659
5684
|
readonly flags: "--permission <level>";
|
|
@@ -5699,7 +5724,7 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
5699
5724
|
readonly hidden: false;
|
|
5700
5725
|
}, {
|
|
5701
5726
|
readonly flags: "--from <principal>";
|
|
5702
|
-
readonly description: "Email, uid, or `everyone`";
|
|
5727
|
+
readonly description: "Email, uid, vault group (grp_…), or `everyone`";
|
|
5703
5728
|
readonly hidden: false;
|
|
5704
5729
|
}, {
|
|
5705
5730
|
readonly flags: "--json";
|
|
@@ -5769,7 +5794,7 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
5769
5794
|
readonly hidden: false;
|
|
5770
5795
|
}, {
|
|
5771
5796
|
readonly flags: "--with <principal>";
|
|
5772
|
-
readonly description: "Email, uid, or `everyone`";
|
|
5797
|
+
readonly description: "Email, uid, vault group (grp_…), or `everyone`";
|
|
5773
5798
|
readonly hidden: false;
|
|
5774
5799
|
}, {
|
|
5775
5800
|
readonly flags: "--permission <level>";
|
|
@@ -5811,7 +5836,7 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
5811
5836
|
readonly hidden: false;
|
|
5812
5837
|
}, {
|
|
5813
5838
|
readonly flags: "--from <principal>";
|
|
5814
|
-
readonly description: "Email, uid, or `everyone`";
|
|
5839
|
+
readonly description: "Email, uid, vault group (grp_…), or `everyone`";
|
|
5815
5840
|
readonly hidden: false;
|
|
5816
5841
|
}, {
|
|
5817
5842
|
readonly flags: "--json";
|
|
@@ -13559,6 +13584,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
13559
13584
|
readonly helpText: readonly [];
|
|
13560
13585
|
readonly arguments: readonly [];
|
|
13561
13586
|
readonly options: readonly [{
|
|
13587
|
+
readonly flags: "--refresh-flags";
|
|
13588
|
+
readonly description: "Refresh the offline session-start flag values from the registry";
|
|
13589
|
+
readonly hidden: false;
|
|
13590
|
+
}, {
|
|
13562
13591
|
readonly flags: "--json";
|
|
13563
13592
|
readonly description: "JSON on stdout (always)";
|
|
13564
13593
|
readonly hidden: false;
|
|
@@ -13617,6 +13646,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
13617
13646
|
readonly flags: "--host-session <id>";
|
|
13618
13647
|
readonly description: "Host session id";
|
|
13619
13648
|
readonly hidden: false;
|
|
13649
|
+
}, {
|
|
13650
|
+
readonly flags: "--claims <ids>";
|
|
13651
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
13652
|
+
readonly hidden: false;
|
|
13620
13653
|
}, {
|
|
13621
13654
|
readonly flags: "--text <message>";
|
|
13622
13655
|
readonly description: "Message text";
|
|
@@ -13681,6 +13714,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
13681
13714
|
readonly flags: "--host-session <id>";
|
|
13682
13715
|
readonly description: "Host session id";
|
|
13683
13716
|
readonly hidden: false;
|
|
13717
|
+
}, {
|
|
13718
|
+
readonly flags: "--claims <ids>";
|
|
13719
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
13720
|
+
readonly hidden: false;
|
|
13684
13721
|
}, {
|
|
13685
13722
|
readonly flags: "--text <message>";
|
|
13686
13723
|
readonly description: "Message text";
|
|
@@ -13745,6 +13782,146 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
13745
13782
|
readonly flags: "--host-session <id>";
|
|
13746
13783
|
readonly description: "Host session id";
|
|
13747
13784
|
readonly hidden: false;
|
|
13785
|
+
}, {
|
|
13786
|
+
readonly flags: "--claims <ids>";
|
|
13787
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
13788
|
+
readonly hidden: false;
|
|
13789
|
+
}, {
|
|
13790
|
+
readonly flags: "--text <message>";
|
|
13791
|
+
readonly description: "Message text";
|
|
13792
|
+
readonly hidden: false;
|
|
13793
|
+
}, {
|
|
13794
|
+
readonly flags: "--text-file <path>";
|
|
13795
|
+
readonly description: "Read message text from a file";
|
|
13796
|
+
readonly hidden: false;
|
|
13797
|
+
}, {
|
|
13798
|
+
readonly flags: "--state <state>";
|
|
13799
|
+
readonly description: "Child state";
|
|
13800
|
+
readonly hidden: false;
|
|
13801
|
+
}, {
|
|
13802
|
+
readonly flags: "--note <note>";
|
|
13803
|
+
readonly description: "State note";
|
|
13804
|
+
readonly hidden: false;
|
|
13805
|
+
}, {
|
|
13806
|
+
readonly flags: "--timeout <seconds>";
|
|
13807
|
+
readonly description: "Wait timeout in seconds";
|
|
13808
|
+
readonly hidden: false;
|
|
13809
|
+
}];
|
|
13810
|
+
readonly subcommands: readonly [];
|
|
13811
|
+
}, {
|
|
13812
|
+
readonly name: "ack";
|
|
13813
|
+
readonly description: "";
|
|
13814
|
+
readonly aliases: readonly [];
|
|
13815
|
+
readonly hidden: false;
|
|
13816
|
+
readonly helpOption: true;
|
|
13817
|
+
readonly helpCommand: false;
|
|
13818
|
+
readonly usage: "[options]";
|
|
13819
|
+
readonly helpText: readonly [];
|
|
13820
|
+
readonly arguments: readonly [];
|
|
13821
|
+
readonly options: readonly [{
|
|
13822
|
+
readonly flags: "--json";
|
|
13823
|
+
readonly description: "Print JSON output (the default)";
|
|
13824
|
+
readonly hidden: false;
|
|
13825
|
+
}, {
|
|
13826
|
+
readonly flags: "--session-id <id>";
|
|
13827
|
+
readonly description: "Act as this session";
|
|
13828
|
+
readonly hidden: false;
|
|
13829
|
+
}, {
|
|
13830
|
+
readonly flags: "--link <id>";
|
|
13831
|
+
readonly description: "Conduct link id";
|
|
13832
|
+
readonly hidden: false;
|
|
13833
|
+
}, {
|
|
13834
|
+
readonly flags: "--child <name|all>";
|
|
13835
|
+
readonly description: "Child name or all children";
|
|
13836
|
+
readonly hidden: false;
|
|
13837
|
+
}, {
|
|
13838
|
+
readonly flags: "--name <name>";
|
|
13839
|
+
readonly description: "Child name";
|
|
13840
|
+
readonly hidden: false;
|
|
13841
|
+
}, {
|
|
13842
|
+
readonly flags: "--engine <engine>";
|
|
13843
|
+
readonly description: "Session engine";
|
|
13844
|
+
readonly hidden: false;
|
|
13845
|
+
}, {
|
|
13846
|
+
readonly flags: "--title <title>";
|
|
13847
|
+
readonly description: "Session title";
|
|
13848
|
+
readonly hidden: false;
|
|
13849
|
+
}, {
|
|
13850
|
+
readonly flags: "--host-session <id>";
|
|
13851
|
+
readonly description: "Host session id";
|
|
13852
|
+
readonly hidden: false;
|
|
13853
|
+
}, {
|
|
13854
|
+
readonly flags: "--claims <ids>";
|
|
13855
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
13856
|
+
readonly hidden: false;
|
|
13857
|
+
}, {
|
|
13858
|
+
readonly flags: "--text <message>";
|
|
13859
|
+
readonly description: "Message text";
|
|
13860
|
+
readonly hidden: false;
|
|
13861
|
+
}, {
|
|
13862
|
+
readonly flags: "--text-file <path>";
|
|
13863
|
+
readonly description: "Read message text from a file";
|
|
13864
|
+
readonly hidden: false;
|
|
13865
|
+
}, {
|
|
13866
|
+
readonly flags: "--state <state>";
|
|
13867
|
+
readonly description: "Child state";
|
|
13868
|
+
readonly hidden: false;
|
|
13869
|
+
}, {
|
|
13870
|
+
readonly flags: "--note <note>";
|
|
13871
|
+
readonly description: "State note";
|
|
13872
|
+
readonly hidden: false;
|
|
13873
|
+
}, {
|
|
13874
|
+
readonly flags: "--timeout <seconds>";
|
|
13875
|
+
readonly description: "Wait timeout in seconds";
|
|
13876
|
+
readonly hidden: false;
|
|
13877
|
+
}];
|
|
13878
|
+
readonly subcommands: readonly [];
|
|
13879
|
+
}, {
|
|
13880
|
+
readonly name: "capabilities";
|
|
13881
|
+
readonly description: "";
|
|
13882
|
+
readonly aliases: readonly [];
|
|
13883
|
+
readonly hidden: false;
|
|
13884
|
+
readonly helpOption: true;
|
|
13885
|
+
readonly helpCommand: false;
|
|
13886
|
+
readonly usage: "[options]";
|
|
13887
|
+
readonly helpText: readonly [];
|
|
13888
|
+
readonly arguments: readonly [];
|
|
13889
|
+
readonly options: readonly [{
|
|
13890
|
+
readonly flags: "--json";
|
|
13891
|
+
readonly description: "Print JSON output (the default)";
|
|
13892
|
+
readonly hidden: false;
|
|
13893
|
+
}, {
|
|
13894
|
+
readonly flags: "--session-id <id>";
|
|
13895
|
+
readonly description: "Act as this session";
|
|
13896
|
+
readonly hidden: false;
|
|
13897
|
+
}, {
|
|
13898
|
+
readonly flags: "--link <id>";
|
|
13899
|
+
readonly description: "Conduct link id";
|
|
13900
|
+
readonly hidden: false;
|
|
13901
|
+
}, {
|
|
13902
|
+
readonly flags: "--child <name|all>";
|
|
13903
|
+
readonly description: "Child name or all children";
|
|
13904
|
+
readonly hidden: false;
|
|
13905
|
+
}, {
|
|
13906
|
+
readonly flags: "--name <name>";
|
|
13907
|
+
readonly description: "Child name";
|
|
13908
|
+
readonly hidden: false;
|
|
13909
|
+
}, {
|
|
13910
|
+
readonly flags: "--engine <engine>";
|
|
13911
|
+
readonly description: "Session engine";
|
|
13912
|
+
readonly hidden: false;
|
|
13913
|
+
}, {
|
|
13914
|
+
readonly flags: "--title <title>";
|
|
13915
|
+
readonly description: "Session title";
|
|
13916
|
+
readonly hidden: false;
|
|
13917
|
+
}, {
|
|
13918
|
+
readonly flags: "--host-session <id>";
|
|
13919
|
+
readonly description: "Host session id";
|
|
13920
|
+
readonly hidden: false;
|
|
13921
|
+
}, {
|
|
13922
|
+
readonly flags: "--claims <ids>";
|
|
13923
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
13924
|
+
readonly hidden: false;
|
|
13748
13925
|
}, {
|
|
13749
13926
|
readonly flags: "--text <message>";
|
|
13750
13927
|
readonly description: "Message text";
|
|
@@ -13809,6 +13986,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
13809
13986
|
readonly flags: "--host-session <id>";
|
|
13810
13987
|
readonly description: "Host session id";
|
|
13811
13988
|
readonly hidden: false;
|
|
13989
|
+
}, {
|
|
13990
|
+
readonly flags: "--claims <ids>";
|
|
13991
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
13992
|
+
readonly hidden: false;
|
|
13812
13993
|
}, {
|
|
13813
13994
|
readonly flags: "--text <message>";
|
|
13814
13995
|
readonly description: "Message text";
|
|
@@ -13873,6 +14054,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
13873
14054
|
readonly flags: "--host-session <id>";
|
|
13874
14055
|
readonly description: "Host session id";
|
|
13875
14056
|
readonly hidden: false;
|
|
14057
|
+
}, {
|
|
14058
|
+
readonly flags: "--claims <ids>";
|
|
14059
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
14060
|
+
readonly hidden: false;
|
|
13876
14061
|
}, {
|
|
13877
14062
|
readonly flags: "--text <message>";
|
|
13878
14063
|
readonly description: "Message text";
|
|
@@ -13937,6 +14122,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
13937
14122
|
readonly flags: "--host-session <id>";
|
|
13938
14123
|
readonly description: "Host session id";
|
|
13939
14124
|
readonly hidden: false;
|
|
14125
|
+
}, {
|
|
14126
|
+
readonly flags: "--claims <ids>";
|
|
14127
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
14128
|
+
readonly hidden: false;
|
|
13940
14129
|
}, {
|
|
13941
14130
|
readonly flags: "--text <message>";
|
|
13942
14131
|
readonly description: "Message text";
|
|
@@ -14001,6 +14190,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
14001
14190
|
readonly flags: "--host-session <id>";
|
|
14002
14191
|
readonly description: "Host session id";
|
|
14003
14192
|
readonly hidden: false;
|
|
14193
|
+
}, {
|
|
14194
|
+
readonly flags: "--claims <ids>";
|
|
14195
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
14196
|
+
readonly hidden: false;
|
|
14004
14197
|
}, {
|
|
14005
14198
|
readonly flags: "--text <message>";
|
|
14006
14199
|
readonly description: "Message text";
|
|
@@ -14065,6 +14258,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
14065
14258
|
readonly flags: "--host-session <id>";
|
|
14066
14259
|
readonly description: "Host session id";
|
|
14067
14260
|
readonly hidden: false;
|
|
14261
|
+
}, {
|
|
14262
|
+
readonly flags: "--claims <ids>";
|
|
14263
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
14264
|
+
readonly hidden: false;
|
|
14068
14265
|
}, {
|
|
14069
14266
|
readonly flags: "--text <message>";
|
|
14070
14267
|
readonly description: "Message text";
|
|
@@ -14129,6 +14326,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
14129
14326
|
readonly flags: "--host-session <id>";
|
|
14130
14327
|
readonly description: "Host session id";
|
|
14131
14328
|
readonly hidden: false;
|
|
14329
|
+
}, {
|
|
14330
|
+
readonly flags: "--claims <ids>";
|
|
14331
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
14332
|
+
readonly hidden: false;
|
|
14132
14333
|
}, {
|
|
14133
14334
|
readonly flags: "--text <message>";
|
|
14134
14335
|
readonly description: "Message text";
|
|
@@ -14193,6 +14394,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
14193
14394
|
readonly flags: "--host-session <id>";
|
|
14194
14395
|
readonly description: "Host session id";
|
|
14195
14396
|
readonly hidden: false;
|
|
14397
|
+
}, {
|
|
14398
|
+
readonly flags: "--claims <ids>";
|
|
14399
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
14400
|
+
readonly hidden: false;
|
|
14196
14401
|
}, {
|
|
14197
14402
|
readonly flags: "--text <message>";
|
|
14198
14403
|
readonly description: "Message text";
|
|
@@ -14257,6 +14462,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
14257
14462
|
readonly flags: "--host-session <id>";
|
|
14258
14463
|
readonly description: "Host session id";
|
|
14259
14464
|
readonly hidden: false;
|
|
14465
|
+
}, {
|
|
14466
|
+
readonly flags: "--claims <ids>";
|
|
14467
|
+
readonly description: "Exact comma-separated recipient receipt IDs";
|
|
14468
|
+
readonly hidden: false;
|
|
14260
14469
|
}, {
|
|
14261
14470
|
readonly flags: "--text <message>";
|
|
14262
14471
|
readonly description: "Message text";
|
|
@@ -14293,6 +14502,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
14293
14502
|
readonly flags: "--event <event>";
|
|
14294
14503
|
readonly description: "Hook event";
|
|
14295
14504
|
readonly hidden: false;
|
|
14505
|
+
}, {
|
|
14506
|
+
readonly flags: "--ack-mode <mode>";
|
|
14507
|
+
readonly description: "Internal explicit recipient acknowledgement";
|
|
14508
|
+
readonly hidden: false;
|
|
14296
14509
|
}, {
|
|
14297
14510
|
readonly flags: "--json";
|
|
14298
14511
|
readonly description: "JSON on stdout (always)";
|