projmux 0.10.0 → 0.11.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/README-ko.md +90 -72
- package/README.md +24 -16
- package/docs/agent-workflow.md +86 -23
- package/docs/ai-agent-shortcuts.md +63 -278
- package/docs/architecture.md +678 -16
- package/docs/cli-guide.md +1367 -0
- package/docs/cli.md +1239 -1091
- package/docs/configuration.md +185 -136
- package/docs/globalization.md +16 -12
- package/docs/hooks.md +90 -67
- package/docs/install.md +22 -6
- package/docs/keybindings.md +223 -60
- package/docs/legacy-cli-retirement.md +64 -0
- package/docs/legacy-diagnostics-inventory.md +23 -0
- package/docs/migration-plan.md +6 -3
- package/docs/notify-os-focus-poc.md +36 -15
- package/docs/notify-queue.md +21 -19
- package/docs/operational-diagnostics.md +190 -11
- package/docs/repo-layout.md +4 -1
- package/docs/resource-attribution.md +16 -0
- package/docs/session-restore.md +27 -9
- package/docs/settings-ia.md +232 -162
- package/docs/statusbar.md +228 -48
- package/docs/testing.md +9 -9
- package/docs/theme-palette.md +0 -3
- package/docs/tmux-surface-inventory.md +2 -2
- package/docs/upgrading.md +138 -23
- package/docs/usage-tracking.md +120 -34
- package/package.json +5 -5
package/docs/hooks.md
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
projmux runs optional user scripts at selected tmux lifecycle points. Hooks are
|
|
4
4
|
the project-agnostic extension point for behavior projmux itself stays out of:
|
|
5
5
|
injecting per-session env via `tmux set-environment`, selecting repository
|
|
6
|
-
tokens,
|
|
7
|
-
sending an initial pane command.
|
|
6
|
+
tokens, kicking off a background sync, or sending an initial pane command.
|
|
8
7
|
|
|
9
8
|
projmux-owned internal tmux hooks such as `pane-focus-in`, `pane-focus-out`,
|
|
10
9
|
`after-select-pane`, and `after-kill-pane` are not exposed as user hook events.
|
|
@@ -16,7 +15,7 @@ projmux-owned internal tmux hooks such as `pane-focus-in`, `pane-focus-out`,
|
|
|
16
15
|
| `pre-create` | Before projmux creates a missing persistent or ephemeral session | Non-zero exit, exec error, or timeout aborts creation | Logged with `[pre-create] ` |
|
|
17
16
|
| `post-create` | After projmux creates a brand-new persistent or ephemeral session | Logged and ignored; creation continues | Logged with `[post-create] ` |
|
|
18
17
|
| `post-attach` | After projmux switches the current tmux client to an existing session/target from inside tmux | Logged and ignored | Logged with `[post-attach] ` |
|
|
19
|
-
| `send-noti` | After `projmux
|
|
18
|
+
| `send-noti` | After `projmux create notification` (or the in-process AI notify producer) successfully writes a queue entry | Fired asynchronously and best-effort; queue write and desktop notifications continue even if the hook fails or times out | Receives JSON on stdin; stdout/stderr are logged with `[send-noti] ` |
|
|
20
19
|
|
|
21
20
|
Deferred Phase A candidates remain future work until their behavior can be
|
|
22
21
|
specified without exposing projmux's internal tmux hook machinery: pane exit,
|
|
@@ -66,10 +65,6 @@ run = "jq -r '.message' | xargs -I{} send-slack \"{}\""
|
|
|
66
65
|
|
|
67
66
|
[env]
|
|
68
67
|
FOO = "bar"
|
|
69
|
-
|
|
70
|
-
[kube]
|
|
71
|
-
context = "dev-cluster"
|
|
72
|
-
namespace = "tools"
|
|
73
68
|
```
|
|
74
69
|
|
|
75
70
|
Only quoted string values are supported. Unknown sections or keys make the
|
|
@@ -100,10 +95,22 @@ KEY VALUE` after creation for later panes. projmux's reserved `PROJMUX_*` hook
|
|
|
100
95
|
variables are appended after `[env]` in hook process environments, so the hook
|
|
101
96
|
contract cannot be overridden by project config.
|
|
102
97
|
|
|
103
|
-
`[kube]
|
|
104
|
-
|
|
105
|
-
`
|
|
106
|
-
|
|
98
|
+
### Removed `[kube]` input
|
|
99
|
+
|
|
100
|
+
The former `[kube]` section is no longer a product or runtime feature. projmux
|
|
101
|
+
does not project Kube-specific hook/session variables and does not rewrite a
|
|
102
|
+
legacy file. If a config still contains `[kube]`, every config write stops
|
|
103
|
+
before changing the file and reports this exact diagnostic:
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
legacy [kube] support was removed; manually move context to [env] KUBE_CONTEXT and namespace to [env] KUBE_NAMESPACE, then remove [kube]; original config was not changed
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Migration is deliberately manual: copy the former `context` value to an
|
|
110
|
+
explicit `KUBE_CONTEXT` key under generic `[env]`, and the former `namespace`
|
|
111
|
+
value to `KUBE_NAMESPACE`, then remove `[kube]`. Those names are examples, not
|
|
112
|
+
special fields—`[env]` preserves any valid user-supplied key verbatim and no
|
|
113
|
+
`PROJMUX_KUBE_*` variable is synthesized.
|
|
107
114
|
|
|
108
115
|
## Trust Model
|
|
109
116
|
|
|
@@ -165,7 +172,7 @@ the notification or block the normal desktop notification flow.
|
|
|
165
172
|
|
|
166
173
|
The hook runs asynchronously with the same default timeout (`5s`) as other
|
|
167
174
|
hooks. projmux does not wait for completion before returning from
|
|
168
|
-
`projmux
|
|
175
|
+
`projmux create notification`.
|
|
169
176
|
|
|
170
177
|
stdin receives one JSON object:
|
|
171
178
|
|
|
@@ -201,15 +208,15 @@ The hook environment also includes:
|
|
|
201
208
|
| `PROJMUX_NOTIFY_MESSAGE` | Human-readable message text |
|
|
202
209
|
| `PROJMUX_NOTIFY_HOOK_DEPTH` | Recursion guard; values `>= 1` suppress nested `send-noti` dispatch |
|
|
203
210
|
|
|
204
|
-
If a `send-noti` hook itself calls `projmux
|
|
211
|
+
If a `send-noti` hook itself calls `projmux create notification`, projmux sees
|
|
205
212
|
`PROJMUX_NOTIFY_HOOK_DEPTH=1` in the child environment and skips another
|
|
206
213
|
`send-noti` hook fire. The queue write itself still succeeds.
|
|
207
214
|
|
|
208
|
-
`Settings > Notifications > Delivery sources` surfaces the active Codex
|
|
209
|
-
Claude, and tmux AI notify diagnostics: status, conflicts, config
|
|
210
|
-
copyable CLI install/remove/dry-run commands. It also shows whether
|
|
215
|
+
`Settings > Notifications > Delivery sources` surfaces the active Codex,
|
|
216
|
+
Claude, Antigravity, and tmux AI notify diagnostics: status, conflicts, config
|
|
217
|
+
paths, and copyable CLI install/remove/dry-run commands. It also shows whether
|
|
211
218
|
`PROJMUX_NOTIFY_HOOK` overrides the built-in desktop sender. It does not install
|
|
212
|
-
or remove external Codex, Claude, or tmux settings.
|
|
219
|
+
or remove external Codex, Claude, Antigravity, or tmux settings.
|
|
213
220
|
|
|
214
221
|
`PROJMUX_NOTIFY_HOOK` is separate from `[hooks.send-noti]`: it replaces the
|
|
215
222
|
desktop sender and receives positional arguments
|
|
@@ -226,9 +233,9 @@ severity, and permission/input status badges do not use red.
|
|
|
226
233
|
|
|
227
234
|
`projmux doctor` reports Codex hooks-engine wiring separately from legacy
|
|
228
235
|
notify, including unmanaged hooks/conflict details and the relevant
|
|
229
|
-
`projmux
|
|
236
|
+
`projmux agent integrate codex` commands.
|
|
230
237
|
|
|
231
|
-
`projmux
|
|
238
|
+
`projmux internal agent-hook ingest codex-hook` is the conservative core ingest path for Codex
|
|
232
239
|
hooks-engine events. It reads a single JSON payload from stdin. The embedded
|
|
233
240
|
default install catalog is based on Codex CLI 0.130.0:
|
|
234
241
|
|
|
@@ -250,7 +257,7 @@ Codex hook payload parsing accepts the common fields
|
|
|
250
257
|
and falls back to treating `session_id` as the thread identity so existing
|
|
251
258
|
`matchAIPane` matching can reuse cached pane metadata.
|
|
252
259
|
|
|
253
|
-
`projmux
|
|
260
|
+
`projmux agent integrate codex` manages a separate
|
|
254
261
|
`~/.codex/config.toml` marker block for the hooks engine. If a `[features]`
|
|
255
262
|
table already exists, projmux merges `hooks = true` into that table instead of
|
|
256
263
|
creating a duplicate table. Older projmux-managed `codex_hooks = true` entries
|
|
@@ -264,54 +271,54 @@ hooks = true
|
|
|
264
271
|
matcher = "*"
|
|
265
272
|
[[hooks.PreToolUse.hooks]]
|
|
266
273
|
type = "command"
|
|
267
|
-
command = "projmux
|
|
274
|
+
command = "projmux internal agent-hook ingest codex-hook >/dev/null 2>&1 || true"
|
|
268
275
|
|
|
269
276
|
[[hooks.PermissionRequest]]
|
|
270
277
|
matcher = "*"
|
|
271
278
|
[[hooks.PermissionRequest.hooks]]
|
|
272
279
|
type = "command"
|
|
273
|
-
command = "projmux
|
|
280
|
+
command = "projmux internal agent-hook ingest codex-hook >/dev/null 2>&1 || true"
|
|
274
281
|
|
|
275
282
|
[[hooks.PostToolUse]]
|
|
276
283
|
matcher = "*"
|
|
277
284
|
[[hooks.PostToolUse.hooks]]
|
|
278
285
|
type = "command"
|
|
279
|
-
command = "projmux
|
|
286
|
+
command = "projmux internal agent-hook ingest codex-hook >/dev/null 2>&1 || true"
|
|
280
287
|
|
|
281
288
|
[[hooks.PreCompact]]
|
|
282
289
|
matcher = "*"
|
|
283
290
|
[[hooks.PreCompact.hooks]]
|
|
284
291
|
type = "command"
|
|
285
|
-
command = "projmux
|
|
292
|
+
command = "projmux internal agent-hook ingest codex-hook >/dev/null 2>&1 || true"
|
|
286
293
|
|
|
287
294
|
[[hooks.PostCompact]]
|
|
288
295
|
matcher = "*"
|
|
289
296
|
[[hooks.PostCompact.hooks]]
|
|
290
297
|
type = "command"
|
|
291
|
-
command = "projmux
|
|
298
|
+
command = "projmux internal agent-hook ingest codex-hook >/dev/null 2>&1 || true"
|
|
292
299
|
|
|
293
300
|
[[hooks.SessionStart]]
|
|
294
301
|
matcher = "*"
|
|
295
302
|
[[hooks.SessionStart.hooks]]
|
|
296
303
|
type = "command"
|
|
297
|
-
command = "projmux
|
|
304
|
+
command = "projmux internal agent-hook ingest codex-hook >/dev/null 2>&1 || true"
|
|
298
305
|
|
|
299
306
|
[[hooks.UserPromptSubmit]]
|
|
300
307
|
matcher = "*"
|
|
301
308
|
[[hooks.UserPromptSubmit.hooks]]
|
|
302
309
|
type = "command"
|
|
303
|
-
command = "projmux
|
|
310
|
+
command = "projmux internal agent-hook ingest codex-hook >/dev/null 2>&1 || true"
|
|
304
311
|
|
|
305
312
|
[[hooks.Stop]]
|
|
306
313
|
matcher = "*"
|
|
307
314
|
[[hooks.Stop.hooks]]
|
|
308
315
|
type = "command"
|
|
309
|
-
command = "projmux
|
|
316
|
+
command = "projmux internal agent-hook ingest codex-hook >/dev/null 2>&1 || true"
|
|
310
317
|
```
|
|
311
318
|
|
|
312
319
|
Repeated installs are idempotent and preserve unrelated Codex config, including
|
|
313
320
|
unmanaged hook entries for the same events. If projmux sees an unmanaged
|
|
314
|
-
`projmux
|
|
321
|
+
`projmux internal agent-hook ingest codex-hook` command, it refuses to install over it rather
|
|
315
322
|
than guessing ownership. `--dry-run` previews the TOML update. `--remove`
|
|
316
323
|
removes projmux-managed Codex hooks wiring.
|
|
317
324
|
|
|
@@ -354,9 +361,9 @@ Runtime action overrides are stored separately from the install catalog at:
|
|
|
354
361
|
${XDG_CONFIG_HOME:-$HOME/.config}/projmux/ai-hook-actions.json
|
|
355
362
|
```
|
|
356
363
|
|
|
357
|
-
`Settings > Notifications >
|
|
364
|
+
`Settings > Notifications > Agent event behavior` reads and writes that file. The
|
|
358
365
|
runtime file only changes ingest behavior (`notify`, `state`, or `quiet`);
|
|
359
|
-
`projmux
|
|
366
|
+
`projmux agent integrate codex` still uses the catalog `install` field to decide
|
|
360
367
|
which hooks to write. Runtime overrides also apply to known specialized
|
|
361
368
|
events, so `Stop` or `PermissionRequest` can be made state-only or quiet
|
|
362
369
|
without changing which hook commands are installed. When a known Codex event
|
|
@@ -379,7 +386,7 @@ to auto-trust hooks.
|
|
|
379
386
|
projmux-managed bell hook installed. The diagnostic is read-only; it only
|
|
380
387
|
inspects current `alert-bell` hooks and prints the matching integrate commands.
|
|
381
388
|
|
|
382
|
-
`projmux
|
|
389
|
+
`projmux agent integrate tmux-bell` is the opt-in fallback for AI CLIs that do
|
|
383
390
|
not expose structured hooks but do emit BEL or OSC 9. It mutates the current
|
|
384
391
|
tmux server only; it does not edit tmux config files. Install applies these
|
|
385
392
|
server settings and appends a marked `alert-bell` hook:
|
|
@@ -388,10 +395,10 @@ server settings and appends a marked `alert-bell` hook:
|
|
|
388
395
|
tmux set-option -g allow-passthrough on
|
|
389
396
|
tmux set-option -g monitor-bell on
|
|
390
397
|
tmux set-option -g bell-action other
|
|
391
|
-
tmux set-hook -ag alert-bell run-shell -b 'projmux
|
|
398
|
+
tmux set-hook -ag alert-bell run-shell -b 'projmux internal agent-hook ingest bell --pane "#{pane_id}" >/dev/null 2>&1 || true # projmux-managed:tmux-bell:v1'
|
|
392
399
|
```
|
|
393
400
|
|
|
394
|
-
The hook calls `projmux
|
|
401
|
+
The hook calls `projmux internal agent-hook ingest bell --pane <pane_id>`. Bell ingest resolves
|
|
395
402
|
the target pane through tmux and pushes an info notify queue row such as
|
|
396
403
|
`bell · Claude CLI`, with metadata including `agent=bell`, `event=bell`,
|
|
397
404
|
session/window/pane, pane title, command, and socket path when available. The
|
|
@@ -413,9 +420,9 @@ the current `alert-bell` hooks and unsets only entries carrying
|
|
|
413
420
|
|
|
414
421
|
`projmux doctor` reports Claude Code hook wiring in `~/.claude/settings.json`,
|
|
415
422
|
including unmanaged projmux ingest command conflicts and the relevant
|
|
416
|
-
`projmux
|
|
423
|
+
`projmux agent integrate claude` commands.
|
|
417
424
|
|
|
418
|
-
`projmux
|
|
425
|
+
`projmux internal agent-hook ingest claude-hook` is the conservative core ingest path for
|
|
419
426
|
Claude Code hooks. It reads a single JSON payload from stdin. The embedded
|
|
420
427
|
default install catalog is based on Claude Code 2.1.140 and represents the
|
|
421
428
|
29 hook events visible in that version:
|
|
@@ -456,14 +463,14 @@ Hook-generated queue rows use the same compact body catalog: agent label,
|
|
|
456
463
|
event category, then the best available summary (Codex assistant text, Claude
|
|
457
464
|
tool/action summary, transcript summary, error, or teammate labels). Structured
|
|
458
465
|
payload details remain in `metadata`, which is passed through the `send-noti`
|
|
459
|
-
JSON payload and `
|
|
466
|
+
JSON payload and `get notifications --json`; the sidebar stays compact and does not
|
|
460
467
|
expand a separate metadata detail view. `SubagentStop` remains parsed for
|
|
461
468
|
diagnostics but is intentionally excluded from hook notifications because it can
|
|
462
469
|
fire at high volume.
|
|
463
470
|
|
|
464
471
|
Pane matching follows the shared AI ingest order: inherited `$TMUX_PANE`, then
|
|
465
472
|
payload `cwd`, then cached session id pane options. A matched pane is marked
|
|
466
|
-
with `@projmux_ai_hook_active=1`, so `projmux
|
|
473
|
+
with `@projmux_ai_hook_active=1`, so `projmux internal agent-hook watch-title` skips the pane
|
|
467
474
|
after a minimal hook-active gate instead of polling pane title/capture output;
|
|
468
475
|
hook payloads become the primary signal. The tmux bell fallback does not mark
|
|
469
476
|
panes hook-active, so title/capture fallback remains available for panes that
|
|
@@ -481,7 +488,7 @@ upstream schemas settle:
|
|
|
481
488
|
| `SubagentStop` | `subagent_type`, `subagentType`, `agent_type`, `agentType`; `subagent_id`, `subagentId`, `agent_id`, `agentId`; nested `subagent.type`, `subagent.name`, `subagent.kind`, `subagent.id`, `subagent.subagent_id`, `subagent.agent_id` |
|
|
482
489
|
| `TeammateIdle` | `teammate_name`, `teammateName`, `teammate`; `teammate_id`, `teammateId`; `teammate_context`, `teammateContext`, `context`, `reason`, `message`; nested `teammate.name`, `teammate.type`, `teammate.kind`, `teammate.id`, `teammate.teammate_id`, `teammate.context`, `teammate.status`, `teammate.reason`, `teammate.message` |
|
|
483
490
|
|
|
484
|
-
`projmux
|
|
491
|
+
`projmux agent integrate claude` manages user-level Claude Code hook settings in
|
|
485
492
|
`~/.claude/settings.json`. Claude Code hooks are configured under the top-level
|
|
486
493
|
`hooks` object, with each event containing matcher entries and each matcher
|
|
487
494
|
entry containing a `hooks` array. Projmux omits `matcher`, which Claude Code
|
|
@@ -497,7 +504,7 @@ an observability hook:
|
|
|
497
504
|
"hooks": [
|
|
498
505
|
{
|
|
499
506
|
"type": "command",
|
|
500
|
-
"command": "projmux
|
|
507
|
+
"command": "projmux internal agent-hook ingest claude-hook >/dev/null 2>&1 || true # projmux-managed:claude-hook:v1"
|
|
501
508
|
}
|
|
502
509
|
]
|
|
503
510
|
}
|
|
@@ -507,7 +514,7 @@ an observability hook:
|
|
|
507
514
|
"hooks": [
|
|
508
515
|
{
|
|
509
516
|
"type": "command",
|
|
510
|
-
"command": "projmux
|
|
517
|
+
"command": "projmux internal agent-hook ingest claude-hook >/dev/null 2>&1 || true # projmux-managed:claude-hook:v1"
|
|
511
518
|
}
|
|
512
519
|
]
|
|
513
520
|
}
|
|
@@ -517,7 +524,7 @@ an observability hook:
|
|
|
517
524
|
"hooks": [
|
|
518
525
|
{
|
|
519
526
|
"type": "command",
|
|
520
|
-
"command": "projmux
|
|
527
|
+
"command": "projmux internal agent-hook ingest claude-hook >/dev/null 2>&1 || true # projmux-managed:claude-hook:v1"
|
|
521
528
|
}
|
|
522
529
|
]
|
|
523
530
|
}
|
|
@@ -527,7 +534,7 @@ an observability hook:
|
|
|
527
534
|
"hooks": [
|
|
528
535
|
{
|
|
529
536
|
"type": "command",
|
|
530
|
-
"command": "projmux
|
|
537
|
+
"command": "projmux internal agent-hook ingest claude-hook >/dev/null 2>&1 || true # projmux-managed:claude-hook:v1"
|
|
531
538
|
}
|
|
532
539
|
]
|
|
533
540
|
}
|
|
@@ -537,7 +544,7 @@ an observability hook:
|
|
|
537
544
|
"hooks": [
|
|
538
545
|
{
|
|
539
546
|
"type": "command",
|
|
540
|
-
"command": "projmux
|
|
547
|
+
"command": "projmux internal agent-hook ingest claude-hook >/dev/null 2>&1 || true # projmux-managed:claude-hook:v1"
|
|
541
548
|
}
|
|
542
549
|
]
|
|
543
550
|
}
|
|
@@ -547,7 +554,7 @@ an observability hook:
|
|
|
547
554
|
"hooks": [
|
|
548
555
|
{
|
|
549
556
|
"type": "command",
|
|
550
|
-
"command": "projmux
|
|
557
|
+
"command": "projmux internal agent-hook ingest claude-hook >/dev/null 2>&1 || true # projmux-managed:claude-hook:v1"
|
|
551
558
|
}
|
|
552
559
|
]
|
|
553
560
|
}
|
|
@@ -557,7 +564,7 @@ an observability hook:
|
|
|
557
564
|
"hooks": [
|
|
558
565
|
{
|
|
559
566
|
"type": "command",
|
|
560
|
-
"command": "projmux
|
|
567
|
+
"command": "projmux internal agent-hook ingest claude-hook >/dev/null 2>&1 || true # projmux-managed:claude-hook:v1"
|
|
561
568
|
}
|
|
562
569
|
]
|
|
563
570
|
}
|
|
@@ -572,7 +579,7 @@ and re-adds the current managed command while preserving unrelated settings and
|
|
|
572
579
|
hooks. `--remove` deletes only marked commands, and `--dry-run` previews the
|
|
573
580
|
JSON without writing. Removal and unmanaged conflict detection scan every event
|
|
574
581
|
under the settings `hooks` object, not just the current catalog. If any event
|
|
575
|
-
already has an unmanaged command that invokes `projmux
|
|
582
|
+
already has an unmanaged command that invokes `projmux internal agent-hook ingest claude-hook`,
|
|
576
583
|
projmux refuses to install over it because it cannot tell whether the command
|
|
577
584
|
is user-owned or stale projmux wiring.
|
|
578
585
|
|
|
@@ -612,17 +619,17 @@ that fallback; catalog `"notify"` and `"state"` entries still need built-in
|
|
|
612
619
|
handler code for event-specific queue rows or state transitions. Runtime action
|
|
613
620
|
overrides live in the same
|
|
614
621
|
`${XDG_CONFIG_HOME:-$HOME/.config}/projmux/ai-hook-actions.json` file used by
|
|
615
|
-
Codex and are managed from `Settings > Notifications >
|
|
616
|
-
They only affect ingest delivery; `projmux
|
|
622
|
+
Codex and are managed from `Settings > Notifications > Agent event behavior`.
|
|
623
|
+
They only affect ingest delivery; `projmux agent integrate claude` still uses the
|
|
617
624
|
catalog `install` field for installed hook events.
|
|
618
625
|
|
|
619
626
|
## Antigravity Hook Ingest
|
|
620
627
|
|
|
621
|
-
`projmux
|
|
628
|
+
`projmux internal agent-hook ingest antigravity-hook --event <event> < payload.json` accepts
|
|
622
629
|
Antigravity CLI `agy` hook payloads. Antigravity v1.1.12 stdin does
|
|
623
630
|
not include the event name, so the command's `--event` value is authoritative.
|
|
624
631
|
Payload event aliases remain a compatibility fallback when `--event` is
|
|
625
|
-
omitted. `projmux
|
|
632
|
+
omitted. `projmux agent integrate antigravity [--dry-run|--remove]` owns exactly
|
|
626
633
|
the named `projmux` entry in `~/.gemini/config/hooks.json` and separately owns
|
|
627
634
|
only `statusLine` in `~/.gemini/antigravity-cli/settings.json`. Other named hooks,
|
|
628
635
|
their fields, and unknown JSON values remain untouched. The generated commands
|
|
@@ -694,7 +701,7 @@ reinterpreting context. Raw payloads or transcript contents are not stored.
|
|
|
694
701
|
|
|
695
702
|
## Ingest Debug Log
|
|
696
703
|
|
|
697
|
-
Every `projmux
|
|
704
|
+
Every `projmux internal agent-hook ingest ...` path appends compact JSONL diagnostics to
|
|
698
705
|
`$XDG_STATE_HOME/projmux/ai-ingest.log`, or
|
|
699
706
|
`~/.local/state/projmux/ai-ingest.log` when `XDG_STATE_HOME` is unset. The log
|
|
700
707
|
records source, event, result, pane, match identifiers, and a short reason for
|
|
@@ -702,14 +709,17 @@ parse errors, unsupported events, missing pane matches, deduped bells,
|
|
|
702
709
|
state-only transitions, quiet high-volume events, and notify pushes. Raw hook
|
|
703
710
|
payloads are not stored.
|
|
704
711
|
|
|
705
|
-
Use `projmux
|
|
712
|
+
Use `projmux diagnostics agent-hook` to inspect recent entries:
|
|
706
713
|
|
|
707
714
|
```text
|
|
708
|
-
projmux
|
|
709
|
-
projmux
|
|
710
|
-
projmux
|
|
715
|
+
projmux diagnostics agent-hook --tail 20
|
|
716
|
+
projmux diagnostics agent-hook --json --tail 20
|
|
717
|
+
projmux diagnostics agent-hook --path
|
|
711
718
|
```
|
|
712
719
|
|
|
720
|
+
The human legacy ingest-log reader has been removed. Use
|
|
721
|
+
`projmux diagnostics agent-hook`; it reads the same bytes.
|
|
722
|
+
|
|
713
723
|
The file is capped at 1 MiB. When an append grows it past the cap, projmux
|
|
714
724
|
keeps the most recent roughly 512 KiB and trims from the next JSONL boundary so
|
|
715
725
|
the remaining file still starts at a whole entry.
|
|
@@ -731,16 +741,28 @@ projmux does not run `post-attach` for outside-tmux attach paths in this phase.
|
|
|
731
741
|
|
|
732
742
|
## Environment
|
|
733
743
|
|
|
734
|
-
Hooks inherit projmux's environment
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
| `
|
|
739
|
-
|
|
|
740
|
-
| `
|
|
741
|
-
| `
|
|
742
|
-
| `
|
|
743
|
-
| `
|
|
744
|
+
Hooks inherit projmux's environment. The lifecycle variables below are added by
|
|
745
|
+
event; “omitted” means the variable is not added when its context value is
|
|
746
|
+
empty.
|
|
747
|
+
|
|
748
|
+
| Variable | `pre-create` | `post-create` | `post-attach` | `send-noti` |
|
|
749
|
+
| --- | --- | --- | --- | --- |
|
|
750
|
+
| `PROJMUX_SESSION` | new session name | new session name | target session name | target session when known; otherwise empty |
|
|
751
|
+
| `PROJMUX_CWD` | requested session directory | created session directory | resolved target directory; may be empty if lookup fails | dispatcher working directory |
|
|
752
|
+
| `PROJMUX_SESSION_KIND` | `persistent` or `ephemeral` | `persistent` or `ephemeral` | empty | empty |
|
|
753
|
+
| `PROJMUX_VERSION` | projmux version | projmux version | projmux version | projmux version |
|
|
754
|
+
| `PROJMUX_SOCKET` | app socket metadata (`projmux`) | app socket metadata (`projmux`) | app socket metadata (`projmux`) | queue-entry socket when known; otherwise omitted |
|
|
755
|
+
| `PROJMUX_PANE` | omitted: no pane exists yet | exact id returned by standard persistent/ephemeral `tmux new-session`, such as `%7`; omitted for snapshot replay | omitted | target pane when known; otherwise omitted |
|
|
756
|
+
|
|
757
|
+
`pre-create` intentionally has no `PROJMUX_PANE`: it runs before
|
|
758
|
+
`tmux new-session` creates the first pane. Standard persistent and ephemeral
|
|
759
|
+
`post-create` paths run after creation and therefore receive that exact pane
|
|
760
|
+
id. Snapshot replay can restore multiple panes and does not expose a single
|
|
761
|
+
returned pane at its lifecycle boundary, so it omits `PROJMUX_PANE`.
|
|
762
|
+
`PROJMUX_SOCKET` is routing metadata for hook commands; it does not imply that
|
|
763
|
+
the tmux client itself adds `-L` to its commands. The `post-attach` and
|
|
764
|
+
`send-noti` cells describe their existing contexts; this contract adds no pane
|
|
765
|
+
context to either event.
|
|
744
766
|
|
|
745
767
|
## Examples
|
|
746
768
|
|
|
@@ -749,6 +771,7 @@ Hooks inherit projmux's environment, plus:
|
|
|
749
771
|
```bash
|
|
750
772
|
#!/usr/bin/env bash
|
|
751
773
|
echo "session=$PROJMUX_SESSION cwd=$PROJMUX_CWD kind=$PROJMUX_SESSION_KIND"
|
|
774
|
+
tmux -L "$PROJMUX_SOCKET" set-option -p -t "$PROJMUX_PANE" @projmux_initialized 1
|
|
752
775
|
```
|
|
753
776
|
|
|
754
777
|
### Project Startup Command
|
|
@@ -770,7 +793,7 @@ case "$PROJMUX_CWD" in
|
|
|
770
793
|
*) exit 0 ;;
|
|
771
794
|
esac
|
|
772
795
|
|
|
773
|
-
tmux set-environment -t "$PROJMUX_SESSION" GH_TOKEN "$token"
|
|
796
|
+
tmux -L "$PROJMUX_SOCKET" set-environment -t "$PROJMUX_SESSION" GH_TOKEN "$token"
|
|
774
797
|
```
|
|
775
798
|
|
|
776
799
|
`set-environment` only seeds the session env that newly-spawned panes inherit;
|
package/docs/install.md
CHANGED
|
@@ -21,6 +21,19 @@ projmux doctor
|
|
|
21
21
|
`doctor` performs read-only diagnostics for runtime tools such as `tmux`,
|
|
22
22
|
`git`, and `stty`.
|
|
23
23
|
|
|
24
|
+
Provider integrations are opt-in and use the canonical installer spelling:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
projmux agent integrate codex
|
|
28
|
+
projmux agent integrate claude
|
|
29
|
+
projmux agent integrate antigravity
|
|
30
|
+
projmux agent integrate tmux-bell
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
These installers write managed producers that call
|
|
34
|
+
`projmux internal agent-hook ingest ...`. Existing markerless hooks remain
|
|
35
|
+
user-owned and are never rewritten.
|
|
36
|
+
|
|
24
37
|
Start the tmux app with:
|
|
25
38
|
|
|
26
39
|
```sh
|
|
@@ -52,7 +65,6 @@ Normal use needs:
|
|
|
52
65
|
Useful optional tools:
|
|
53
66
|
|
|
54
67
|
- `git` for branch/status metadata.
|
|
55
|
-
- `kubectl` for the Kubernetes status segment.
|
|
56
68
|
- `notify-send` on Linux, or `powershell.exe` under WSL, for built-in desktop
|
|
57
69
|
notifications.
|
|
58
70
|
|
|
@@ -71,7 +83,7 @@ directory is on `PATH`.
|
|
|
71
83
|
Go-managed installs can update through:
|
|
72
84
|
|
|
73
85
|
```sh
|
|
74
|
-
projmux
|
|
86
|
+
projmux update apply
|
|
75
87
|
```
|
|
76
88
|
|
|
77
89
|
See [Upgrading](upgrading.md) for version pinning and installer-specific
|
|
@@ -89,8 +101,9 @@ make install
|
|
|
89
101
|
```
|
|
90
102
|
|
|
91
103
|
`make install` builds the binary, atomically replaces
|
|
92
|
-
`$(go env GOPATH)/bin/projmux`, runs `projmux
|
|
93
|
-
notify queue
|
|
104
|
+
`$(go env GOPATH)/bin/projmux`, runs `projmux config apply`, and reconciles the
|
|
105
|
+
notify queue through `projmux notification reconcile`. Override the destination
|
|
106
|
+
with `INSTALL_DIR=/usr/local/bin`.
|
|
94
107
|
|
|
95
108
|
Update source checkouts with the repository workflow:
|
|
96
109
|
|
|
@@ -109,8 +122,11 @@ export PROJMUX_INSTALLER=github-release
|
|
|
109
122
|
```
|
|
110
123
|
|
|
111
124
|
With that set, `projmux update apply` downloads the latest matching release
|
|
112
|
-
asset, replaces the current executable, and reapplies the live tmux config
|
|
113
|
-
|
|
125
|
+
asset, replaces the current executable, and reapplies the live tmux config.
|
|
126
|
+
`--no-apply` skips the live reload only — the new binary still migrates the
|
|
127
|
+
keymap schema and marker-owned provider files, then writes the generated
|
|
128
|
+
config. It does not touch a live tmux bell hook. See
|
|
129
|
+
[Upgrading](upgrading.md#managed-agent-hook-producer-migration).
|
|
114
130
|
|
|
115
131
|
## npm Packaging Details
|
|
116
132
|
|