projmux 0.8.4 → 0.10.0

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/docs/cli.md CHANGED
@@ -23,15 +23,16 @@ projmux <command> [args...]
23
23
  | `attention` | View and manage live tmux pane attention state. |
24
24
  | `attach` | Open tmux lifecycle entry helpers. |
25
25
  | `current` | Resolve the active tmux pane path. |
26
- | `doctor` | Diagnose runtime dependencies. |
26
+ | `doctor` | Run read-only runtime and integration diagnostics. |
27
+ | `diagnostics` | Read the private bounded operational event log. |
27
28
  | `focus` | Switch the active client to a session/window/pane target. |
28
- | `init` | Preview or apply supported terminal key delivery mappings. |
29
29
  | `kill` | Terminate tagged tmux sessions. |
30
30
  | `notify` | Manage the pending AI notify queue (push/list/ack/reconcile). |
31
31
  | `pin` | Manage pinned project directories. |
32
32
  | `preview` | Manage persisted tmux preview selection. |
33
33
  | `prune` | Trim stale tmux lifecycle state and inspect preserved session snapshots. |
34
34
  | `quit` | Quit the app-owned projmux tmux runtime. |
35
+ | `resources` | Inspect live Linux/tmux Project → Window → Pane CPU/RSS attribution. |
35
36
  | `sessions` | Pick and open an existing tmux session. |
36
37
  | `session-popup` | Read tmux popup preview state. |
37
38
  | `settings` | Configure projmux. |
@@ -45,7 +46,7 @@ projmux <command> [args...]
45
46
  | `update` | Check installer-aware GitHub release update status. |
46
47
  | `upgrade` | Self-update via `go install`. |
47
48
  | `welcome` | Print the shell onboarding guide again. |
48
- | `usage` | Report AI token usage across 5h and weekly windows. |
49
+ | `usage` | Report AI usage across fixed windows, context, and named quota buckets. |
49
50
  | `version` | Print the current version. |
50
51
 
51
52
  ## switch
@@ -62,8 +63,9 @@ sub-verbs are entry hooks invoked by tmux keybindings (e.g.
62
63
  `sidebar-focus` is wired to the sidebar's focus binding so navigation keeps
63
64
  the active session in sync).
64
65
 
65
- Settings > Labs remains available for experimental settings, but picker backend
66
- selection has been retired. The native picker is always used.
66
+ Settings > Labs remains available for experimental settings, but picker
67
+ selection/source rows have been retired. The native picker is always used, and
68
+ there is no picker selection configuration or migration behavior.
67
69
 
68
70
  ## setup
69
71
 
@@ -81,31 +83,31 @@ key map. Default `--timeout` is `5s`. Run it outside tmux after trying
81
83
  Settings > Keybindings edits in-app action aliases; terminal delivery
82
84
  diagnostics stay in this CLI flow.
83
85
 
84
- ## init
86
+ ## setup terminal
85
87
 
86
88
  ```
87
- projmux init [terminal] [--apply | --dry-run] [--config <path>]
88
- [--allow-symlink]
89
+ projmux setup terminal [terminal] [--apply] [--config <path>]
90
+ [--allow-symlink]
89
91
  ```
90
92
 
91
93
  Previews or applies terminal-specific key delivery mappings for supported
92
94
  terminals when `projmux setup` reports swallowed shortcuts. When `terminal` is
93
95
  omitted, autodetects from `$TERM_PROGRAM`/`$TERMINAL_EMULATOR`.
94
- Known terminals: `ghostty`, `windows-terminal`. Default is dry-run; pass
95
- `--apply` to write (timestamped `.bak.<timestamp>` is created). Refuses to
96
+ Known terminals: `ghostty`, `windows-terminal`. Default is a read-only
97
+ preview; pass `--apply` to write (timestamped `.bak.<timestamp>` is created). Refuses to
96
98
  write through a symlink unless `--allow-symlink` is passed (dotfiles repos).
97
99
  `--config <path>` overrides the candidate list when the adapter has more
98
100
  than one default location (Ghostty `config` vs `config.ghostty`). If setup
99
- shows every key arriving, skip init.
101
+ shows every key arriving, skip terminal remediation.
100
102
 
101
103
  ## doctor
102
104
 
103
105
  ```
104
- projmux doctor [--json]
105
- projmux doctor --install-missing [--dry-run] [--include-optional]
106
+ projmux doctor [--json] [--section deps|runtime|integrations|session-state|logs] [--verbose]
106
107
  ```
107
108
 
108
- Runs a dependency check: `tmux ≥ 3.4`, `git`, `stty` (POSIX only), and
109
+ Runs read-only diagnostics, including a dependency check for `tmux ≥ 3.4`,
110
+ `git`, `stty` (POSIX only), and
109
111
  `kubectl` (optional), then reports read-only AI notify integration diagnostics
110
112
  for Codex hooks, Claude Code hooks, and the tmux bell
111
113
  fallback. AI notify integration statuses are `installed`, `missing`, or
@@ -115,23 +117,132 @@ diagnostics for saved agent panes, including `available`, `stale`, or
115
117
  `unavailable` status plus confidence, source, updated-at, and the affected
116
118
  snapshot/window/pane.
117
119
 
118
- Exit code `0` even when optional deps or AI notify integrations are missing;
119
- non-zero only when a required dep is missing or stale. `--json` emits a
120
- machine-readable object with `dependencies`, `ai_notify_integrations`, and
121
- `session_state_resume`; the default is the human report with suggested install
122
- commands per platform, AI integration install/remove/dry-run commands, and
123
- Session State resume metadata health. `--install-missing` is explicit opt-in
124
- and runs generated install commands only for missing or stale required
125
- dependencies. `--dry-run` prints those commands without executing them.
126
- `--include-optional` also includes optional missing dependencies such as
127
- `kubectl` when an install command is available. Install flags cannot be combined
128
- with `--json`. Doctor does not diagnose terminal key delivery; use `projmux
129
- setup` for that.
130
-
131
- `Settings > Notifications > Delivery sources` shows active Codex hooks, Claude,
132
- Antigravity manual hook ingest, and tmux statuses, conflicts, config paths, and
133
- copyable AI integration commands where available. Settings does not install or
134
- remove external Codex, Claude, Antigravity, or tmux notify wiring.
120
+ Session State preview and doctor report the resume source captured on the pane.
121
+ Live `hook`/`session-id` metadata is high confidence; DB-validated Antigravity
122
+ `antigravity-last-conversation` and `antigravity-conversation-metadata` picker
123
+ sources are medium confidence; legacy `antigravity-history` is low confidence.
124
+ Disk discovery never lowers or overwrites an already captured live source.
125
+
126
+ The default text report shows per-section summaries plus failing or warning
127
+ items. `--verbose` adds successful checks and complete typed detail, including
128
+ versions, paths, confidence/source metadata, and displayed remediation.
129
+ `--section` projects the same inventory used by text and JSON: `deps` selects
130
+ dependencies, `integrations` selects AI notify integrations, and
131
+ `session-state` selects resume metadata plus retention guidance. `runtime`
132
+ selects the fixed `tmux` backend, an actual one-second read-only probe of the
133
+ app socket, and generated-versus-live config digest state. `logs` selects the
134
+ state/log/journal presence, private permissions and metadata-only writability
135
+ checks plus a bounded aggregate of recent safe operational error codes. These
136
+ sections expose only closed status codes and counts: no path, socket name,
137
+ routing identity, message, config content, or argv is rendered.
138
+ The recent-error count is the size of the newest 20-record window, not a
139
+ lifetime total; `logs.recent-errors.bounded` means older errors were omitted.
140
+ The probe captures at most 4 KiB, generated config inspection reads at most
141
+ 1 MiB, and the journal seam reads at most 5 MiB.
142
+ Symlinks and non-regular inputs are rejected without following or blocking on
143
+ them. On Windows, POSIX mode bits cannot establish ACL privacy, so otherwise
144
+ valid paths report the closed `privacy-unverified` warning rather than a false
145
+ private/insecure classification, followed by a separate metadata-only `ready`
146
+ or `not-writable` finding; Doctor never changes ACLs.
147
+
148
+ JSON reports have integer `schema_version: 2`. An unfiltered report retains the
149
+ existing typed `dependencies`, `ai_notify_integrations`,
150
+ `session_state_resume`, and `session_state_prune` detail and adds ordered
151
+ `runtime` and `logs` finding arrays. Every finding has closed `severity`,
152
+ stable `code`, and closed `remediation`; bounded aggregates may add `count`
153
+ and `safe_codes`. A filtered report contains only the selected typed field(s).
154
+ `--verbose` is accepted with `--json` but does not change JSON fields or values.
155
+
156
+ Default and verbose text exit non-zero only when their projected dependency
157
+ inventory contains a required missing or stale dependency. A non-`deps`
158
+ section exits `0`. JSON preserves its successful exit after emitting a report,
159
+ even when required dependencies are missing or stale.
160
+
161
+ Doctor is read-only for every flag combination. It never creates or repairs
162
+ state/log paths, installs packages, runs displayed remediation, changes
163
+ terminal or tmux state, generates/applies config, migrates files, or writes
164
+ operational-log outcomes. Missing, malformed, or permission-denied journals
165
+ degrade to typed log findings without failing the command. The removed `--install-missing`,
166
+ `--include-optional`, and Doctor `--dry-run` mutation flags fail as unknown
167
+ usage with an exact instruction to remove the flag and run displayed
168
+ remediation explicitly outside Doctor; they are never ignored. Doctor does not
169
+ diagnose terminal key delivery; use `projmux setup` for that.
170
+
171
+ JSON migration: consumers must switch on `schema_version` before decoding.
172
+ Version 2 changes the previously empty/reserved `runtime` and `logs` arrays to
173
+ the typed finding shape above; field meanings inside the version 1 dependency,
174
+ integration, and Session State inventories are unchanged. Consumers that only
175
+ understand version 1 must reject version 2 rather than decoding the new arrays
176
+ as the old empty placeholder shape.
177
+
178
+ `Settings > Notifications > Delivery sources` shows active Codex, Claude, and
179
+ Antigravity hooks plus tmux statuses, conflicts, config paths, and
180
+ copyable AI integration commands where available. Its summary/detail also shows
181
+ whether `PROJMUX_NOTIFY_HOOK` overrides the built-in desktop sender. Settings
182
+ does not install or remove external Codex, Claude, Antigravity, or tmux notify
183
+ wiring. Pending in-app queue rows remain owned by the statusbar/sidebar rather
184
+ than a standalone Settings row.
185
+
186
+ ## diagnostics
187
+
188
+ ```
189
+ projmux diagnostics log [--tail N] [--json]
190
+ [--level info|error] [--component NAME] [--path]
191
+ projmux diagnostics report [--output <path>]
192
+ ```
193
+
194
+ Reads the local operational event journal through the same tolerant JSONL
195
+ reader used by every output mode. The default text view shows the newest 50
196
+ valid records. `--tail N` changes that bound, `--json` emits the selected
197
+ records as JSONL, and `--level` / `--component` filter before tailing. `--path`
198
+ prints the resolved path without creating or reading the log.
199
+
200
+ Successful state-changing top-level commands produce one `info` outcome, and
201
+ every top-level command error produces one `error` outcome. Successful
202
+ high-frequency/read-only commands such as `status`, `ai ingest`, `attention
203
+ arm`/`clear`/`window`, `tmux autosave-session-state`, `window record`, and
204
+ successful `diagnostics log` views do not produce an event. Errors from those
205
+ automatic hook/poll paths still produce one safe `error` outcome. Successful
206
+ direct command help and explicit `--dry-run` preview modes also remain
207
+ read-only and do not produce an event. Journal failures are a best-effort side
208
+ channel and never change command output or exit status. See
209
+ [operational-diagnostics.md](operational-diagnostics.md) for the file,
210
+ retention, concurrency, and privacy contracts.
211
+
212
+ Session create/attach/switch/kill and `tmux apply` use correlated
213
+ `lifecycle.start`/`lifecycle.outcome` records instead of a duplicate generic
214
+ top-level outcome. The text and JSONL views expose only the closed safe
215
+ `operation` and optional `code` enums; session names, socket paths, tmux
216
+ targets, subprocess argv, and generated configuration are never recorded.
217
+
218
+ `diagnostics report` is the explicit consent boundary for creating one local
219
+ private `tar.gz` support archive. The invocation first prints a redacted
220
+ destination label, the complete included/omitted entry list, stable omission reasons, report
221
+ schema, and redaction mode; the first parent/temp/archive write happens only
222
+ after that preview is successfully written. `--output` selects the local
223
+ destination. Without it, the command uses a timestamped archive in the current
224
+ directory. Existing destinations are never replaced.
225
+
226
+ The archive contains `manifest.json`, safe projmux version/platform/backend
227
+ metadata, a redacted projection of Doctor JSON schema version 2,
228
+ config presence states (never values), up to 50 recent errors from the existing
229
+ bounded operations reader, and count-only AI ingest diagnostics. Paths,
230
+ session/window/pane/thread/routing identifiers, run IDs, tool/version output,
231
+ commands, guidance, reasons, and other free text are field-scoped hashes unless they
232
+ match a closed diagnostic enum/static-name allowlist. Raw config/environment
233
+ values, argv/stdin, prompts, notification text, pane output, transcripts, and
234
+ hook payloads are never collected. Missing, corrupt, or unreadable sources are
235
+ recorded as stable manifest omissions. Report collection does not repair source
236
+ permissions, migrate hooks, append an operational outcome, contact a network,
237
+ upload, create an issue, or run in the background; only the explicitly selected
238
+ output parent/temp/archive can be written.
239
+
240
+ The redacted Doctor projection keeps `schema_version`, closed runtime/log
241
+ finding enums, and structural/count
242
+ numbers as numbers. Numeric routing fields such as `window_index` and
243
+ `pane_index` become field-scoped hash strings under `default-hash-v1`; consumers
244
+ must treat this support projection as redacted evidence rather than decoding it
245
+ back into the unredacted Doctor Go types.
135
246
 
136
247
  ## focus
137
248
 
@@ -249,23 +360,67 @@ Authoritative AI token usage. See [usage-tracking.md](usage-tracking.md)
249
360
  for adapter detail.
250
361
 
251
362
  ```
252
- projmux usage [--model codex|claude|antigravity|all] [--window 5h|weekly|all]
363
+ projmux usage [--model codex|claude|antigravity|all] [--window 5h|weekly|context|quota|all]
253
364
  [--json] [--force|-f]
254
365
  ```
255
366
 
256
- Renders a tab-aligned `MODEL WINDOW PCT RESETS_AT STALE` table; appends a
367
+ Renders a tab-aligned `MODEL WINDOW PCT RESETS_AT RESET_IN STALE` table; appends a
257
368
  backoff note when an adapter is in 429 cooldown. `--force` clears any
258
369
  active backoff and bypasses the per-adapter throttle floor (Claude `5m`,
259
370
  Codex shares the global `30s`). `--json` emits the snapshot array; when
260
371
  backoff is active the wrapper `{snapshots, backoff}` object is emitted
261
372
  instead.
262
373
 
263
- Antigravity has no 5-hour/weekly quota contract, so it is surfaced
264
- `context-window-only`: the adapter emits a single `context` window row
265
- (context-window fullness, no `RESETS_AT`) sourced from the latest
266
- statusline `context_window` seen via hook ingest. `--model antigravity`
267
- renders that row; in the HUD it shows as `Antigravity ctx [bar] N%`
268
- alongside the Claude/Codex quota bars.
374
+ Claude keeps the canonical aggregate `5h` and `weekly` rows and projects each
375
+ valid typed upstream `limits[]` entry as a named `quota/<exact group>` row.
376
+ Model-scoped rows append the exact upstream model display identity in text
377
+ output; terminal controls are escaped and the visible label is bounded without
378
+ normalizing the stored identity. JSON preserves the typed named-quota metadata,
379
+ including nullable scope/model ID/surface, reset, `updated_at`, and `stale`.
380
+ These percent-only rows never synthesize token counts. A malformed limits block
381
+ fails that adapter refresh so the prior complete Claude slice remains visible;
382
+ a valid aggregate-only response replaces and removes obsolete named rows.
383
+
384
+ Antigravity emits official account rows labelled
385
+ `quota/<upstream bucket ID>`. Conversation-local context remains private
386
+ hook/notify diagnostic metadata and legacy cached context rows are suppressed
387
+ from text and JSON output. `--window quota` selects named account rows; opaque
388
+ IDs such as `weekly` are not aliases for the fixed `weekly` window. Used
389
+ percent is `100 * (1 - remaining_fraction)`. `--window context` remains
390
+ accepted for compatibility and returns no Usage rows.
391
+ `reset_time` and optional `reset_in_seconds` are preserved independently,
392
+ including the distinction between absent and explicit zero. Invalid,
393
+ disabled, missing, or empty quota data degrades without reinterpreting the
394
+ private conversation context diagnostic.
395
+
396
+ ## resources
397
+
398
+ ```
399
+ projmux resources
400
+ ```
401
+
402
+ Opens the native, read-only Resource Inspector. It samples only while this
403
+ interactive process is alive, paints `warming` immediately, then refreshes at
404
+ a non-overlapping two-second cadence. Right or Enter drills Project → Window →
405
+ Pane → Pane detail; Left returns (and is a no-op at the root), while Esc closes
406
+ the popup at every depth. Search matches the current scope's display name and
407
+ stable tmux id. Tab cycles CPU, Memory, and Name sorting; Ctrl-R requests an
408
+ immediate refresh. A plain `r` remains search input.
409
+
410
+ CPU list values are host-capacity share; pane detail also shows
411
+ core-equivalent CPU. Project and window rows count panes, while pane rows count
412
+ the attributed processes. Pane rows and detail share the resolved pane identity
413
+ and label the tmux current command, PID/SID, pane id, and TTY separately. Memory
414
+ is explicitly an RSS sum (shared pages can be counted more than once) plus its
415
+ host ratio. `Unassigned`,
416
+ `Shared / ambiguous`, and non-drillable `Other / unattributed` remain explicit,
417
+ as do warming, partial, unavailable, unknown, and overage states. No process
418
+ command list, mutation, history, graph, daemon, persistence, or Session State
419
+ telemetry is created. Linux/tmux provides attribution; unsupported platforms
420
+ show an unavailable reason rather than zero metrics.
421
+
422
+ This is distinct from `projmux status resources`, which remains the short
423
+ host-only statusbar renderer.
269
424
 
270
425
  ## status
271
426
 
@@ -289,9 +444,14 @@ projmux status resources
289
444
  `~/.cache/tmux/kube-segment-<session>.txt` first (TTL governed by
290
445
  `TMUX_KUBE_CACHE_TTL`, default `5s`). Picks up a per-session
291
446
  `KUBECONFIG` from `${XDG_RUNTIME_DIR:-~/.cache}/kube-sessions/<session>.yaml`.
292
- - `usage` — HUD-style `Claude (Nm) 5h [bar] N% · weekly [bar] N% Codex 5h
293
- [bar] N% · weekly [bar] N%`. Degrades through six tiers as `--max-width`
294
- shrinks. Triggers an opportunistic, throttled refresh (per-adapter
447
+ - `usage` — HUD-style provider blocks containing only official `5h` and
448
+ `weekly` windows. Antigravity's exact `quota/gemini-weekly` snapshot is
449
+ projected as `weekly` without changing its cached identity; other named
450
+ quotas and context never consume status width. Claude typed `limits[]`
451
+ named/model rows are likewise excluded, so only its aggregate `5h` and
452
+ `weekly` rows reach the status line. Narrow tiers keep one primary window per
453
+ provider (`5h`, otherwise `weekly`) before hard truncation.
454
+ Triggers an opportunistic, throttled refresh (per-adapter
295
455
  throttle, `30s` floor) so a stale cache self-heals.
296
456
  - `notify` — newest-first HUD block with project, state, optional agent, text,
297
457
  age, and `+<extras>`. Window/pane ids remain routable metadata but are not
@@ -300,7 +460,11 @@ projmux status resources
300
460
  - `resources` — macOS/Linux/WSL aggregate `CPU N% MEM N%`. Linux uses
301
461
  `/proc/stat` and `/proc/meminfo`; macOS uses native Mach host statistics.
302
462
  CPU needs two invocations to establish a delta and renders `--` for the first
303
- sample. WSL reports the Linux guest/VM view. Unsupported platforms and
463
+ sample. CPU independently warns at 70–89% and becomes bold critical at 90% or
464
+ above; memory independently warns at 75–89% and becomes bold critical at 90%
465
+ or above. Normal and unavailable values use the secondary status-text role.
466
+ These values are host-scoped rather than pane/window/project/session
467
+ attribution. WSL reports the Linux guest/VM view. Unsupported platforms and
304
468
  unreadable system metrics produce no error output.
305
469
 
306
470
  ## statusbar
@@ -320,8 +484,14 @@ non-specialized placeholders and no-op. `session` opens the existing-session
320
484
  popup; `pwd` shows the current pane path in a native-framed display-only
321
485
  popup; `kube` and `git` open the project switcher popup;
322
486
  `settings` toggles the settings popup for the tmux client; `usage` opens the
323
- detailed `projmux usage` table popup; `notify` focuses and acks the newest
324
- actionable queue target. The internal `usage-refresh` shortcut entry point
487
+ detailed cached account-usage popup. Legacy context rows are suppressed and
488
+ named quotas retain exact identity/reset/freshness values. Claude model-scoped
489
+ rows distinguish the exact group and model display identity with bounded,
490
+ terminal-safe labels; JSON retains their full typed metadata. `USED`, `LIMIT`,
491
+ and `LEFT` appear together only when at least one displayed row has real
492
+ absolute counts; percent-only datasets omit those columns rather than
493
+ synthesizing counts.
494
+ `notify` focuses and acks the newest actionable queue target. The internal `usage-refresh` shortcut entry point
325
495
  runs the same throttled, per-adapter collection policy as `status usage` and
326
496
  then reopens the display-only usage popup from cache.
327
497
  `MouseDown1Status` errors are
@@ -352,7 +522,7 @@ supplied window.
352
522
  ## ai
353
523
 
354
524
  ```
355
- projmux ai split [--agent <claude|codex|antigravity|shell|selective|resume>] [--force-agent] [right|down] [-- <extra-arg>...]
525
+ projmux ai split [--agent <claude|codex|antigravity|shell|selective|resume>] [--force-agent] [--print-pane-id] [right|down] [-- <extra-arg>...]
356
526
  projmux ai picker [--inside] [--shell] [--resume] <right|down>
357
527
  projmux ai settings
358
528
  projmux ai status set <thinking|waiting|idle> [--pane <id>]
@@ -360,11 +530,12 @@ projmux ai notify <reset|notify> [--pane <id>]
360
530
  projmux ai watch-title [--pane <id>]
361
531
  projmux ai ingest codex-hook < payload.json
362
532
  projmux ai ingest claude-hook < payload.json
363
- projmux ai ingest antigravity-hook < payload.json
533
+ projmux ai ingest antigravity-hook [--event <PreInvocation|PostInvocation|PostToolUse|Stop|Statusline>] < payload.json
364
534
  projmux ai ingest bell --pane <pane_id>
365
535
  projmux ai ingest log [--tail N] [--json] [--path]
366
536
  projmux ai integrate codex [--dry-run] [--remove]
367
537
  projmux ai integrate claude [--dry-run] [--remove]
538
+ projmux ai integrate antigravity [--dry-run] [--remove]
368
539
  projmux ai integrate tmux-bell [--dry-run] [--remove]
369
540
  projmux ai topic ...
370
541
  ```
@@ -394,11 +565,41 @@ existing plain shell split. Arguments after `--` are extra arguments appended to
394
565
  the resolved `claude`, `codex`, or `agy` executable inside the managed wrapper;
395
566
  projmux still sets the context directory, tmux title, AI pane metadata, title
396
567
  watcher, and split layout.
397
- The resume picker lists the newest deduplicated Claude/Codex resume sessions
398
- for the current project, with `[+ New Session]` pinned first. If there are no
399
- resume sessions it goes straight to the existing selective picker. Phase 1
400
- captures the selected `(agent, resume id)` contract but still launches a fresh
401
- split; actual `claude --resume` / `codex resume` wiring is reserved for Phase 2.
568
+
569
+ Automation callers can add `--print-pane-id` to an explicit direct
570
+ `--agent claude|codex|antigravity|shell` launch. On success, stdout contains
571
+ exactly the new `%N` pane id followed by one newline. The value comes directly
572
+ from tmux's existing
573
+ `split-window -P -F '#{pane_id}'` result. If tmux returns no valid pane id, the
574
+ command fails non-zero with tmux-specific guidance and writes no
575
+ success value. Without `--print-pane-id`, successful split invocations keep the
576
+ existing empty-stdout behavior.
577
+
578
+ `--print-pane-id` is not available for the saved default mode or for
579
+ `--agent selective|resume`, because those paths may open a picker and launch
580
+ only after a later user selection. Those combinations fail before opening a
581
+ picker or creating a pane. Arguments after `--` keep their existing argv-tail
582
+ meaning when the flag is used with a concrete AI agent.
583
+ The resume picker lists the newest deduplicated Claude, Codex, and Antigravity
584
+ resume sessions for the current project, with `[+ New Session]` pinned first.
585
+ If there are no resume sessions it goes straight to the existing selective
586
+ picker. Selecting a row directly starts `claude --resume <id>`,
587
+ `codex resume <id>`, or `agy --conversation <uuid>`.
588
+
589
+ Live Antigravity hook/session-state resume metadata remains a separate,
590
+ high-confidence lane; it is not enumerated from disk by the picker. Within the
591
+ picker's disk discovery, source order is the workspace-to-latest-UUID mapping
592
+ in `cache/last_conversations.json`, workspace-bearing summarized rows in
593
+ `cache/conversation_metadata.json`, then legacy `history.jsonl`. The two cache
594
+ sources require a normalized UUID and an exact regular
595
+ `conversations/<uuid>.db`; only DB existence and mtime are read. SQLite content,
596
+ prompt/transcript text, sidecars, symlinks, and arbitrary paths are never used.
597
+ The cache is only the history floor exposed by upstream v1.1.12, not a complete
598
+ conversation history. Cache rows have medium confidence and blank turns;
599
+ `last_conversations` uses a short UUID title, while metadata uses only a safe
600
+ summary. Legacy history is low confidence. Missing/malformed cache, stale
601
+ missing-DB mappings, workspace-less metadata, and unknown fields degrade
602
+ without failing Claude/Codex or legacy discovery.
402
603
  Settings > AI Settings > Enabled agents controls Claude/Codex/Antigravity launch
403
604
  visibility. Disabled agents are hidden from the selective picker and from the
404
605
  default-mode picker. A saved default that later becomes disabled fails clearly
@@ -467,27 +668,75 @@ precedence over catalog `action` for known Claude events too; for example a
467
668
  noisy notify event can be made state-only or quiet without changing installed
468
669
  Claude hook commands.
469
670
 
470
- `ingest antigravity-hook` is the manual hook/statusline entrypoint for
471
- Antigravity CLI `agy` payloads observed in the Phase 0b smoke. Projmux does not
472
- provide `projmux ai integrate antigravity`, does not install Antigravity hooks,
473
- and does not mutate Antigravity user config. If users wire Antigravity manually,
474
- the hook/statusline command should call an absolute `projmux` path or run from a
475
- known cwd because relative command paths failed smoke.
476
-
477
- The default known Antigravity catalog is intentionally narrow:
478
- `PostInvocation` is quiet/log-only, `Stop` is notify, and `Statusline` is notify
479
- only when manually wired and `tool_confirmation_pending=true`. `Stop` with
480
- `error` or a non-normal `terminationReason` pushes a critical error row; `Stop`
481
- without those error signals pushes an info completion row. Accepted identity
482
- fields include `conversationId`/`conversation_id`, `cwd` or `workspace.path`,
483
- `transcriptPath`, `fullyIdle`, `agent_state`, and `context_window`.
671
+ `ingest antigravity-hook` is the hook/statusline entrypoint for
672
+ Antigravity CLI `agy` payloads. Official v1.1.12 hook commands must pass their
673
+ event identity explicitly, for example
674
+ `projmux ai ingest antigravity-hook --event Stop`; the official stdin payload
675
+ does not carry an event field. The explicit selector is authoritative, while
676
+ payload `eventName` and its legacy aliases remain fallback inputs for existing
677
+ manual wiring. `projmux ai integrate antigravity` manages exactly the named
678
+ `projmux` entry in `~/.gemini/config/hooks.json` and, separately, exactly the
679
+ `statusLine` member in `~/.gemini/antigravity-cli/settings.json`. The managed
680
+ statusline uses the official v1.1.12 `{type:"command", enabled:true,
681
+ stack_with_default:true}` shape and an absolute direct ingest command whose
682
+ stdout is empty, so the built-in statusline remains visible. It preserves every
683
+ other named entry and unknown JSON value, resolves the running projmux
684
+ executable to a stable absolute path, and supports `--dry-run` and `--remove`.
685
+ An existing unmanaged custom `statusLine` is an actionable conflict and is
686
+ never chained, wrapped, or rewritten. An existing
687
+ unmanaged `projmux` entry, another Antigravity projmux ingest command, malformed
688
+ JSON, symlinks, and read/write permission failures are reported without
689
+ rewriting the file. Doctor and Settings also report a managed entry as `stale`
690
+ when its absolute executable, event/schema wiring, or stdout fallback differs
691
+ from the current plan; the displayed install command refreshes it.
692
+
693
+ The embedded v1.1.12 catalog contains the five official events `PreToolUse`,
694
+ `PostToolUse`, `PreInvocation`, `PostInvocation`, and `Stop`. The managed entry
695
+ installs `PreInvocation`, `PostInvocation`, `PostToolUse`, and `Stop`, each with
696
+ an explicit `--event`; `PreToolUse` remains disabled because its response can
697
+ change permission policy. `Statusline` remains an explicit statusline selector
698
+ outside that official hook catalog.
699
+
700
+ `PreInvocation` moves the matched pane to thinking/busy without notifying.
701
+ `PostInvocation` and `PostToolUse` remain quiet bookkeeping paths, with tool
702
+ errors retained in ingest diagnostics. `Stop` keeps the completion/error notify
703
+ classification. Hook stdout is `{}` for the three non-Stop managed events and
704
+ `{"decision":"stop"}` for Stop, including a shell fallback if ingest fails, so
705
+ the hook cannot force continuation or synthesize a permission decision.
706
+ Official statusline `agent_state` values `thinking`, `working`, and `tool_use`
707
+ map to thinking/busy unless the pane already holds a terminal completion or
708
+ approval state; this prevents a late statusline refresh from regressing `Stop`.
709
+ A new `PreInvocation` resets the pane to thinking for the next generation.
710
+ `idle` is quiet and does not clear an existing completion or approval state.
711
+ `tool_confirmation_pending=true` produces a stable-ID,
712
+ deduped approval-required row; false never produces a notification.
713
+
714
+ The managed JSON is the install source of truth. The command
715
+ `agy -p '/hooks' --output-format json` is a read-only runtime diagnostic for
716
+ confirming loaded event names and sources; projmux never uses `/hooks` output
717
+ to rewrite `hooks.json`.
718
+
719
+ `workspacePaths` uses the first non-empty path as a cwd matching candidate;
720
+ an absent or empty array does not invent a cwd. Inherited `$TMUX_PANE` remains
721
+ the first pane attribution source. A Stop with non-empty `error`, explicit
722
+ `ERROR`, or a `MAX_STEPS_EXCEEDED` family reason pushes a critical error row.
723
+ `NO_TOOL_CALL`, `MODEL_STOP`, and known normal reasons push an info completion;
724
+ unknown reasons remain info completions with diagnostic metadata rather than
725
+ being promoted to critical. Official camelCase fields retained by the parser
726
+ also include `artifactDirectoryPath`, `modelName`, `invocationNum`,
727
+ `initialNumSteps`, `toolCall`, `stepIdx`, `executionNum`, and `fullyIdle`.
484
728
  Antigravity notify metadata uses `agent=antigravity`. Phase 3 session-state
485
729
  restore is included: Antigravity ingest stores `conversationId` as pane thread
486
730
  metadata for matching and as session-state resume metadata. Restore uses
487
731
  `agy --conversation <uuid>` when that id is present and UUID-shaped; otherwise
488
- session-state preview/doctor render `resume unavailable`. The statusline
489
- `context_window` value is persisted on ingest and surfaced by the usage HUD
490
- as a `context-window-only` row (Antigravity has no 5h/weekly quota contract).
732
+ session-state preview/doctor render `resume unavailable`. Structured statusline
733
+ `context_window.used_percentage` is persisted with its conversation id as
734
+ private hook/notify diagnostic metadata and is not surfaced as account usage.
735
+ The official `quota` map is persisted independently and surfaces each valid entry as
736
+ `quota/<exact bucket ID>` with independently retained absolute and relative
737
+ reset values. Bucket IDs are never mapped to `5h`/`weekly`, and account quota
738
+ is never inferred from the conversation-local gauge.
739
+ The earlier string percentage form remains a compatibility fallback.
491
740
  Transcript contents are not read.
492
741
 
493
742
  `ingest bell --pane <pane_id>` is the narrow tmux-bell fallback ingest path.
@@ -664,7 +913,7 @@ projmux tmux popup-switch
664
913
  projmux tmux popup-sessions
665
914
  projmux tmux popup-preview <session>
666
915
  projmux tmux rebalance-panes
667
- projmux tmux rename-pane <pane> <title>
916
+ projmux tmux rename-pane <pane> <label>
668
917
  projmux tmux print-config [--bin <path>]
669
918
  projmux tmux print-app-config [--bin <path>]
670
919
  projmux tmux install [--bin <path>] [--config <path>] [--include <path>]
@@ -675,16 +924,27 @@ projmux tmux apply
675
924
  Helpers tmux's keybindings and the install pipeline call into. Modes
676
925
  accepted by `popup-toggle` mirror the historical sessionizer surface:
677
926
  `session-popup`, `sessionizer`, `sessionizer-sidebar`,
678
- `notify-sidebar`, `recent-windows`, `ai-split-picker-right`,
927
+ `notify-sidebar`, `recent-windows`, `resource-inspector`, `ai-split-picker-right`,
679
928
  `ai-split-picker-down`, `ai-split-resume-right`, `ai-split-resume-down`,
680
929
  `ai-split-settings`.
930
+ `rename-pane` sets only the pane-scoped user label
931
+ `@projmux_pane_label`; an empty label clears the option. It does not change the
932
+ raw tmux pane title, AI topic, or AI topic manual-ownership flag. The canonical
933
+ keybinding action id is `rename-pane-label`. The retired `rename-pane-topic`
934
+ keymap action is no longer accepted: replace a stale
935
+ `[bindings.rename-pane-topic]` table with `[bindings.rename-pane-label]`.
936
+ The advanced `projmux ai topic set/clear` commands remain available and keep
937
+ AI topic ownership separate from the user pane label and raw pane title.
681
938
  `apply` regenerates the app tmux config and reloads the live `-L projmux`
682
939
  server without restarting it. `make install` and `projmux upgrade` invoke it
683
940
  after replacing the binary. Settings > Keybindings normally runs the same
684
941
  save/config/reload flow automatically; use `projmux tmux apply` as the CLI
685
942
  recovery or sync path after hand-editing `keymap.toml`, after saving Settings
686
943
  outside tmux, or after resolving a reported config-generation or live-reload
687
- failure.
944
+ failure. Reload also removes the known retired no-prefix `C-t` pane-label
945
+ binding from older live servers before installing current bindings. If the
946
+ current keymap assigns `C-t` to another action, that current action is bound
947
+ after cleanup and remains the owner.
688
948
 
689
949
  ## update
690
950
 
@@ -818,8 +1078,13 @@ flags with the top-level `switch` UX:
818
1078
  regenerates the app config, and reloads the running tmux session when
819
1079
  possible; skipped or failed stages show `projmux tmux apply` as the recovery
820
1080
  or sync command. Terminal diagnostics and terminal mapping application stay
821
- in the `projmux shell` -> `projmux setup` -> `projmux init` remediation path.
822
- The About section includes the `Welcome` entry. In Project
1081
+ in the `projmux shell` -> `projmux setup` -> `projmux setup terminal`
1082
+ remediation path.
1083
+ The compact About section contains Version, Source, real update
1084
+ status/actions, Welcome, and Quit. It does not duplicate static setup or
1085
+ diagnostics guides: use `projmux setup` for key-delivery diagnosis,
1086
+ `projmux setup terminal` for supported terminal remediation, and the
1087
+ read-only `projmux doctor` report for dependency/runtime diagnostics. In Project
823
1088
  Picker, `Project Root` manages the saved
824
1089
  primary root (`~/.config/projmux/projdir`) and displays whether the effective
825
1090
  value comes from `PROJMUX_PROJDIR`, tmux `@projmux_projdir`, saved config, or
@@ -834,10 +1099,9 @@ flags with the top-level `switch` UX:
834
1099
  selecting Check Updates runs `projmux update check`, Update Now runs
835
1100
  `projmux update apply`, and Welcome opens a Settings-native viewer
836
1101
  independent of shell skip state. `Settings > About > Quit projmux` routes
837
- through the same `projmux quit` action picker. The same About section also
838
- lists the keybinding diagnostic path: try `projmux shell` first, use `setup`
839
- for swallowed keys, use `init` for supported terminal mappings, and use
840
- `doctor` for dependencies.
1102
+ through the same `projmux quit` action picker. Settings mutations surface
1103
+ their handled success/failure as a transient passive row inside the native
1104
+ popup; selecting the next action clears or replaces that row.
841
1105
 
842
1106
  ## See also
843
1107