projmux 0.8.3 → 0.9.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 +2 -2
- package/README.md +6 -5
- package/docs/agent-workflow.md +25 -15
- package/docs/ai-agent-shortcuts.md +25 -0
- package/docs/architecture.md +30 -8
- package/docs/cli.md +243 -74
- package/docs/configuration.md +71 -11
- package/docs/globalization.md +1 -1
- package/docs/hooks.md +68 -25
- package/docs/install.md +2 -2
- package/docs/keybindings.md +22 -15
- package/docs/native-picker-no-fzf-poc.md +5 -5
- package/docs/native-picker-parity.md +7 -5
- package/docs/notify-queue.md +4 -3
- package/docs/npm-distribution.md +2 -2
- package/docs/operational-diagnostics.md +80 -0
- package/docs/resource-attribution.md +132 -0
- package/docs/session-restore.md +31 -6
- package/docs/settings-ia.md +54 -14
- package/docs/statusbar.md +24 -6
- package/docs/testing.md +1 -1
- package/docs/tmux-surface-inventory.md +108 -774
- package/docs/usage-tracking.md +47 -28
- package/package.json +5 -5
package/docs/usage-tracking.md
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
# Usage tracking
|
|
2
2
|
|
|
3
|
-
`projmux usage` and `projmux status usage` report authoritative
|
|
4
|
-
|
|
3
|
+
`projmux usage` and `projmux status usage` report authoritative fixed-window
|
|
4
|
+
utilisation for Claude/Codex and official named quota buckets for Antigravity.
|
|
5
|
+
`--model all`, the tmux
|
|
5
6
|
HUD, and the statusbar usage popup use Settings > AI Settings > Enabled
|
|
6
|
-
agents as the source of truth, so disabled Claude/Codex providers are
|
|
7
|
+
agents as the source of truth, so disabled Claude/Codex/Antigravity providers are
|
|
7
8
|
not refreshed or rendered on ambient/all surfaces. Explicit read-only
|
|
8
|
-
requests such as `projmux usage --model claude
|
|
9
|
+
requests such as `projmux usage --model claude`, `--model codex`, or
|
|
10
|
+
`--model antigravity`
|
|
9
11
|
still collect and render that provider even when it is disabled.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
explicit unsupported note when Antigravity is enabled. The statusbar usage
|
|
19
|
-
popup shows an `Antigravity ctx ... unsupported` row, while the compact tmux
|
|
20
|
-
status segment stays silent unless Claude/Codex quota rows exist. Projmux does
|
|
21
|
-
not infer quota, reset timestamps, or account limits from screen scraping,
|
|
22
|
-
tokens, history, OAuth/cache files, or binary strings.
|
|
13
|
+
Claude and Codex adapters read the upstream's own account view. Antigravity
|
|
14
|
+
reads only the official managed statusline payload: `context_window` remains a
|
|
15
|
+
conversation-local fullness gauge, while each `quota` map entry is a separate
|
|
16
|
+
account row. Projmux preserves the upstream bucket ID and never guesses that an
|
|
17
|
+
undocumented ID means `5h` or `weekly`. It does not infer quota, cadence, reset
|
|
18
|
+
timestamps, or account limits from screen scraping, tokens, history,
|
|
19
|
+
OAuth/cache files, or binary strings.
|
|
23
20
|
|
|
24
21
|
## Adapters
|
|
25
22
|
|
|
@@ -73,6 +70,28 @@ Codex shares the manager's default `30s` throttle (no
|
|
|
73
70
|
`ThrottleHinter`). It does not implement `BackoffStater` — local-only
|
|
74
71
|
read.
|
|
75
72
|
|
|
73
|
+
### Antigravity (`internal/core/usage/adapters/antigravity`)
|
|
74
|
+
|
|
75
|
+
Local managed-statusline sidecars. No network or credential reads.
|
|
76
|
+
|
|
77
|
+
- `context_window.used_percentage` becomes the conversation-local `context`
|
|
78
|
+
row and retains the conversation ID in its sidecar. The legacy string
|
|
79
|
+
percentage remains a compatibility fallback.
|
|
80
|
+
- The official `quota` map is sorted by its exact bucket ID. Each valid bucket
|
|
81
|
+
becomes `window=quota`, `bucket=<upstream ID>` and renders as
|
|
82
|
+
`quota/<upstream ID>` beside, never instead of, `ctx`.
|
|
83
|
+
- Used percent is `100 * (1 - remaining_fraction)`. Non-finite or values
|
|
84
|
+
outside `[0,1]`, empty IDs, null/disabled entries, and negative relative
|
|
85
|
+
resets are ignored safely.
|
|
86
|
+
- `reset_time` and optional `reset_in_seconds` are stored independently. An
|
|
87
|
+
absent relative reset differs from explicit zero; no value is derived from
|
|
88
|
+
the other.
|
|
89
|
+
- Context and quota use independent private sidecars. A context-only payload
|
|
90
|
+
does not erase the last quota observation. An explicit empty/null quota map
|
|
91
|
+
records no buckets; the manager's existing rule still preserves prior model
|
|
92
|
+
rows when an adapter returns zero total rows, while any returned context row
|
|
93
|
+
causes the normal full-model replacement.
|
|
94
|
+
|
|
76
95
|
## Snapshot store
|
|
77
96
|
|
|
78
97
|
```
|
|
@@ -81,7 +100,8 @@ ${PROJMUX_USAGE_STATE_DIR:-${XDG_STATE_HOME:-$HOME/.local/state}/projmux/usage}/
|
|
|
81
100
|
|
|
82
101
|
JSON document keyed by adapter, recording:
|
|
83
102
|
|
|
84
|
-
- per-window `Snapshot{Model, Window, Pct, Limit, ResetsAt,
|
|
103
|
+
- per-window `Snapshot{Model, Window, Bucket, Pct, Limit, ResetsAt,
|
|
104
|
+
ResetInSeconds, UpdatedAt}`; `Bucket` is populated only for `window=quota`
|
|
85
105
|
- per-adapter `last_collect` timestamp (drives the throttle)
|
|
86
106
|
- per-adapter `Backoff{Until, Consecutive}` (drives the cooldown)
|
|
87
107
|
|
|
@@ -95,7 +115,7 @@ across machines (Dropbox, iCloud Drive).
|
|
|
95
115
|
### `projmux usage`
|
|
96
116
|
|
|
97
117
|
```
|
|
98
|
-
projmux usage [--model codex|claude|antigravity|all] [--window 5h|weekly|all]
|
|
118
|
+
projmux usage [--model codex|claude|antigravity|all] [--window 5h|weekly|context|quota|all]
|
|
99
119
|
[--json] [--force|-f]
|
|
100
120
|
```
|
|
101
121
|
|
|
@@ -104,11 +124,10 @@ For `--model all`, calls `Manager.Collect` (or `ForceCollect` with
|
|
|
104
124
|
Enabled agents, filters by window, and renders the tab-aligned table:
|
|
105
125
|
|
|
106
126
|
```
|
|
107
|
-
MODEL
|
|
108
|
-
claude
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
codex weekly 4% 2026-05-09T00:00:00+09:00
|
|
127
|
+
MODEL WINDOW PCT RESETS_AT RESET_IN STALE
|
|
128
|
+
claude 5h 80% 2026-05-07T14:00:00+09:00 -
|
|
129
|
+
antigravity context 14% - -
|
|
130
|
+
antigravity quota/gemini-weekly 6% 2026-07-06T16:50:32+09:00 560580s
|
|
112
131
|
```
|
|
113
132
|
|
|
114
133
|
`STALE` is `*` when `now - UpdatedAt > 10m`. A `--json` payload returns
|
|
@@ -124,10 +143,10 @@ When no AI agents are enabled, all-model table output contains no
|
|
|
124
143
|
provider rows and prints a short Settings hint. `--json` returns an
|
|
125
144
|
empty array. Explicit `--model claude`, `--model codex` and
|
|
126
145
|
`--model antigravity` bypass the enabled-agent filter for read-only
|
|
127
|
-
inspection and collect/render only the requested adapter. Antigravity
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
146
|
+
inspection and collect/render only the requested adapter. Antigravity reports
|
|
147
|
+
its conversation-local `context` row separately from zero or more account
|
|
148
|
+
`quota/<bucket-id>` rows. `--window quota` selects only account buckets;
|
|
149
|
+
`--window weekly` never matches an opaque quota bucket named `weekly`.
|
|
131
150
|
|
|
132
151
|
### `projmux status usage`
|
|
133
152
|
|
|
@@ -146,7 +165,7 @@ agents are enabled, the status segment emits nothing.
|
|
|
146
165
|
Output degrades through six tiers as `--max-width` shrinks:
|
|
147
166
|
|
|
148
167
|
1. Long form with last-sync age + bars: `Claude (3m) 5h [████████░░]
|
|
149
|
-
80% · weekly [...]
|
|
168
|
+
80% · weekly [...] Antigravity ctx [...] · quota/gemini-weekly [...]`
|
|
150
169
|
2. Drop the age indicator (legacy long form).
|
|
151
170
|
3. Drop the weekly bar.
|
|
152
171
|
4. Drop bars entirely (`Claude 5h:80% weekly:30%`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projmux",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "tmux project session manager",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/crevissepartners/projmux#readme",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"package:npm:pack": "scripts/package-npm.sh --pack"
|
|
29
29
|
},
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"@projmux/linux-x64": "0.
|
|
32
|
-
"@projmux/linux-arm64": "0.
|
|
33
|
-
"@projmux/darwin-x64": "0.
|
|
34
|
-
"@projmux/darwin-arm64": "0.
|
|
31
|
+
"@projmux/linux-x64": "0.9.0",
|
|
32
|
+
"@projmux/linux-arm64": "0.9.0",
|
|
33
|
+
"@projmux/darwin-x64": "0.9.0",
|
|
34
|
+
"@projmux/darwin-arm64": "0.9.0"
|
|
35
35
|
}
|
|
36
36
|
}
|