sidekick-agent-hub 0.21.1 → 0.21.3

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.
Files changed (3) hide show
  1. package/README.md +91 -88
  2. package/dist/sidekick-cli.mjs +2676 -1632
  3. package/package.json +7 -4
package/README.md CHANGED
@@ -8,7 +8,7 @@ Sidekick CLI reads from `~/.config/sidekick/` — the same data files the [VS Co
8
8
 
9
9
  ## What's New
10
10
 
11
- - **`sidekick quota --provider zai`** — *estimated* z.ai Coding Plan quota (5-Hour / Weekly) derived from observed OpenCode traffic, with `--tier lite|pro|max|auto`. It's an estimate, not authoritative (z.ai has no usage API); see Quota & Rate Limits below.
11
+ - **`sidekick quota --provider zai`** — authoritative z.ai Coding Plan quota (5-Hour / Weekly) from z.ai's quota API, using OpenCode's stored z.ai token when available.
12
12
  - **`sidekick extract`** — pull URLs, file paths, commands, and plans out of recent Claude Code and Codex chats, with `--json` and an interactive picker.
13
13
  - **`sidekick quota history`** — a 13-week, per-workspace, GitHub-style heatmap of session-limit utilization.
14
14
  - **`sidekick status` & `sidekick peak`** — one-shot Claude/OpenAI API health checks and a Claude peak-hours indicator.
@@ -53,12 +53,12 @@ sidekick tasks|decisions|notes|stats|quota|status|account|handoff|search|context
53
53
 
54
54
  The standalone commands open the dashboard directly to a specific panel or run a one-shot query. All accept `--project` and `--provider` flags.
55
55
 
56
- | Flag | Description |
57
- |------|-------------|
58
- | `--project <path>` | Override project path (default: current working directory) |
59
- | `--provider <id>` | Session provider: `claude-code`, `opencode`, `codex`, or `auto` (default) |
60
- | `--session <id>` | Follow a specific session by ID |
61
- | `--replay` | Replay existing events from the beginning before streaming live |
56
+ | Flag | Description |
57
+ | ------------------ | ------------------------------------------------------------------------- |
58
+ | `--project <path>` | Override project path (default: current working directory) |
59
+ | `--provider <id>` | Session provider: `claude-code`, `opencode`, `codex`, or `auto` (default) |
60
+ | `--session <id>` | Follow a specific session by ID |
61
+ | `--replay` | Replay existing events from the beginning before streaming live |
62
62
 
63
63
  ## Session Dump
64
64
 
@@ -68,13 +68,13 @@ sidekick dump [options]
68
68
 
69
69
  Export session data as text, markdown, or JSON.
70
70
 
71
- | Flag | Description |
72
- |------|-------------|
71
+ | Flag | Description |
72
+ | ---------------- | ------------------------------------------------------ |
73
73
  | `--format <fmt>` | Output format: `text` (default), `json`, or `markdown` |
74
- | `--width <cols>` | Terminal width for text output (default: auto-detect) |
75
- | `--expand` | Show all events including noise |
76
- | `--session <id>` | Target a specific session (default: most recent) |
77
- | `--list` | List available sessions and exit |
74
+ | `--width <cols>` | Terminal width for text output (default: auto-detect) |
75
+ | `--expand` | Show all events including noise |
76
+ | `--session <id>` | Target a specific session (default: most recent) |
77
+ | `--list` | List available sessions and exit |
78
78
 
79
79
  Global flags `--project` and `--provider` also apply.
80
80
 
@@ -86,13 +86,13 @@ sidekick report [options]
86
86
 
87
87
  Generate a self-contained HTML session report and open it in the default browser. Includes full transcript, token/cost stats, model breakdown, and tool-use summary.
88
88
 
89
- | Flag | Description |
90
- |------|-------------|
91
- | `--session <id>` | Target a specific session (default: most recent) |
92
- | `--output <path>` | Write to a specific file (default: temp file) |
93
- | `--theme <theme>` | Color theme: `dark` (default) or `light` |
94
- | `--no-open` | Write the file without opening the browser |
95
- | `--no-thinking` | Omit thinking blocks from the transcript |
89
+ | Flag | Description |
90
+ | ----------------- | ------------------------------------------------ |
91
+ | `--session <id>` | Target a specific session (default: most recent) |
92
+ | `--output <path>` | Write to a specific file (default: temp file) |
93
+ | `--theme <theme>` | Color theme: `dark` (default) or `light` |
94
+ | `--no-open` | Write the file without opening the browser |
95
+ | `--no-thinking` | Omit thinking blocks from the transcript |
96
96
 
97
97
  Global flags `--project` and `--provider` also apply.
98
98
 
@@ -108,11 +108,11 @@ Pull actionable assets from recent Claude Code and Codex sessions for exactly th
108
108
 
109
109
  This feature was contributed by [@B33pBeeps](https://github.com/B33pBeeps) (Juan Fourie) and adapted from his MIT-licensed [`trawl`](https://github.com/B33pBeeps/trawl) project.
110
110
 
111
- | Flag | Description |
112
- |------|-------------|
113
- | `--type <types>` | Comma list: `url`, `path`, `command`, `plan` (aliases: `urls`, `files`, `cmds`, `plans`) |
114
- | `--limit <n>` | Positive integer maximum items per type |
115
- | `-i`, `--interactive` | Interactive picker with copy/open actions |
111
+ | Flag | Description |
112
+ | --------------------- | ---------------------------------------------------------------------------------------- |
113
+ | `--type <types>` | Comma list: `url`, `path`, `command`, `plan` (aliases: `urls`, `files`, `cmds`, `plans`) |
114
+ | `--limit <n>` | Positive integer maximum items per type |
115
+ | `-i`, `--interactive` | Interactive picker with copy/open actions |
116
116
 
117
117
  Global flags `--project`, `--provider`, and `--json` also apply. `--provider claude-code` scopes to Claude Code, `--provider codex` scopes to Codex, and `auto` reads both. Invalid `--type` or `--limit` values fail fast with a clear error. OpenCode extraction is not supported yet.
118
118
 
@@ -157,14 +157,17 @@ sidekick quota
157
157
  Provider-aware quota and rate-limit display. The command auto-detects the active provider:
158
158
 
159
159
  - **Claude Code**: Shows Claude Max subscription quota — 5-hour and 7-day windows with color-coded progress bars, projections, and reset countdowns. Includes a peak-hours summary line.
160
- - **Codex**: Shows rate limits from Codex `token_count.rate_limits` events — primary and secondary windows with progress bars and reset countdowns. The default path is local-only: current workspace rollout, recent account-level rollouts, then the active account's cached snapshot. Add `--refresh` to explicitly refresh from Codex's usage API before falling back to local data.
161
- - **OpenCode / z.ai**: OpenCode has no native rate-limit data, but when it routes to a **z.ai Coding Plan** (GLM), `sidekick quota --provider opencode` auto-routes to an **estimated** z.ai quota (5-Hour / Weekly). Use `--provider zai` to request it explicitly and `--tier lite|pro|max|auto` to override the tier. The figure is an estimate, not authoritative — z.ai exposes no usage API, so utilization is derived from observed OpenCode traffic against provisional per-tier budgets, z.ai is observed-only (not a selectable inference provider) with no account management yet, and reset times are approximate unless a rate-limit error is trapped.
160
+ - **Codex**: Shows rate limits from Codex `token_count.rate_limits` events — primary and secondary windows with progress bars, projected end-of-window utilization, and reset countdowns. The default path is local-only: current workspace rollout, recent account-level rollouts, then the active account's cached snapshot. Add `--refresh` to explicitly refresh from Codex's usage API before falling back to local data.
161
+ - **OpenCode / z.ai**: OpenCode has no native rate-limit data, but when z.ai Coding Plan credentials are available, `sidekick quota --provider opencode` can auto-route to authoritative z.ai quota (5-Hour / Weekly, with projected end-of-window utilization). Use `--provider zai` to request it explicitly. z.ai quota is read from z.ai's quota API using OpenCode's stored token, with fallback support for `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN`.
162
+
163
+ Every provider renders in the same aligned table — a `now` column (current utilization), a `projected` column (estimated end-of-window utilization, or `—` when it can't be computed), and a `resets` countdown:
162
164
 
163
165
  ```
164
- Subscription Quota
165
- ──────────────────────────────────────────────────
166
- 5-Hour ████████████░░░░░░░░░░░░░░░░░░ 40% resets in 2h 15m
167
- 7-Day ██████████████████████░░░░░░░░ 72% resets in 4d 6h
166
+ Subscription Quota now projected resets
167
+ ────────────────────────────────────────────────────────────────
168
+ 5-Hour ████████████░░░░░░░░░░░░░░░░░░ 40% 100% 2h 15m
169
+ 7-Day ██████████████████████░░░░░░░░ 72% 88% 4d 6h
170
+ Peak ● Peak Hours — Limits Drain Faster (off-peak in 2h 45m)
168
171
  ```
169
172
 
170
173
  When quota data is unavailable, `sidekick quota` shows structured auth, rate-limit, network, server, or unexpected-failure messaging instead of a generic raw error. The dashboard Sessions panel also keeps a compact inline quota/rate-limit state visible instead of hiding the section entirely.
@@ -173,7 +176,7 @@ Use `--json` for machine-readable output. Use `--provider codex` to explicitly c
173
176
 
174
177
  When multi-account is enabled, `sidekick quota` shows the active account email above the quota bars.
175
178
 
176
- Use `sidekick quota --all` to show Claude and Codex quota together in a single run (plus the estimated z.ai section when z.ai traffic is active). Each provider degrades independently — if one provider's quota can't be fetched, its error is shown inline and the others still render (the command never aborts on a single provider's failure). `--all --json` emits a provider-keyed payload for dashboards and automation.
179
+ Use `sidekick quota --all` to show Claude and Codex quota together in a single run, plus z.ai when API quota is available or z.ai traffic is active. Each provider degrades independently — if one provider's quota can't be fetched, its error is shown inline and the others still render (the command never aborts on a single provider's failure). `--all --json` emits a provider-keyed payload for dashboards and automation.
177
180
 
178
181
  ### Quota History
179
182
 
@@ -205,16 +208,16 @@ Manage accounts across providers — save, list, switch, and remove without manu
205
208
 
206
209
  On first CLI startup, Sidekick auto-registers the active system Claude Code and Codex credentials as a **"Default"** account (when no saved account exists for that provider yet). Existing manually saved accounts are never overwritten — the flags below are only needed to add additional accounts or switch between them.
207
210
 
208
- | Flag | Description |
209
- |------|-------------|
210
- | `--provider <id>` | Provider: `claude-code` (default), `codex`, or `all` |
211
- | `--add` | Save the currently signed-in account |
212
- | `--login` | Sign in and save a **new** account via a provider-isolated login flow, without disturbing the active account until finalization |
213
- | `--label <name>` | Label for the account (required for Codex and `--login`; optional for Claude `--add`) |
214
- | `--switch` | Switch to the next saved account |
215
- | `--switch-to <id>` | Switch to a specific account by email, label, or ID |
216
- | `--remove <id>` | Remove a saved account by email, label, or ID |
217
- | `--launcher <name>` | Create an opt-in per-account terminal launcher for the active account |
211
+ | Flag | Description |
212
+ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
213
+ | `--provider <id>` | Provider: `claude-code` (default), `codex`, or `all` |
214
+ | `--add` | Save the currently signed-in account |
215
+ | `--login` | Sign in and save a **new** account via a provider-isolated login flow, without disturbing the active account until finalization |
216
+ | `--label <name>` | Label for the account (required for Codex and `--login`; optional for Claude `--add`) |
217
+ | `--switch` | Switch to the next saved account |
218
+ | `--switch-to <id>` | Switch to a specific account by email, label, or ID |
219
+ | `--remove <id>` | Remove a saved account by email, label, or ID |
220
+ | `--launcher <name>` | Create an opt-in per-account terminal launcher for the active account |
218
221
  | `--auto-switch <pct\|off>` | Persist the auto-switch quota threshold (1–100), or `off` to disable. Continuous auto-switching runs in a long-running host such as VS Code |
219
222
 
220
223
  With no flags, lists all saved accounts and marks the active one. `--provider all` lists Claude and Codex accounts together. Use `--json` for machine-readable output (provider-keyed when `--provider all`).
@@ -223,81 +226,81 @@ With no flags, lists all saved accounts and marks the active one. `--provider al
223
226
 
224
227
  The dashboard is a two-pane terminal UI. The left side shows a navigable list, the right side shows details for the selected item.
225
228
 
226
- | # | Panel | Description |
227
- |---|-------|-------------|
228
- | 1 | **Sessions** | Browse recent sessions with detail tabs: Summary, Timeline, Mind Map, Tools, Files, Agents, AI Summary |
229
- | 2 | **Tasks** | View persisted tasks filtered by status |
230
- | 3 | **Kanban** | Task board with status columns |
231
- | 4 | **Notes** | Knowledge notes attached to files |
232
- | 5 | **Decisions** | Architectural decisions from sessions |
233
- | 6 | **Plans** | Discovered agent plans from `~/.claude/plans/` |
234
- | 7 | **Events** | Live event stream with type badges, timestamps, and keyword-highlighted summaries |
235
- | 8 | **Charts** | Tool frequency bars, event distribution, activity heatmap, and pattern analysis |
229
+ | # | Panel | Description |
230
+ | --- | ------------- | ------------------------------------------------------------------------------------------------------ |
231
+ | 1 | **Sessions** | Browse recent sessions with detail tabs: Summary, Timeline, Mind Map, Tools, Files, Agents, AI Summary |
232
+ | 2 | **Tasks** | View persisted tasks filtered by status |
233
+ | 3 | **Kanban** | Task board with status columns |
234
+ | 4 | **Notes** | Knowledge notes attached to files |
235
+ | 5 | **Decisions** | Architectural decisions from sessions |
236
+ | 6 | **Plans** | Discovered agent plans from `~/.claude/plans/` |
237
+ | 7 | **Events** | Live event stream with type badges, timestamps, and keyword-highlighted summaries |
238
+ | 8 | **Charts** | Tool frequency bars, event distribution, activity heatmap, and pattern analysis |
236
239
 
237
240
  ## Layout Modes
238
241
 
239
242
  Press `z` to cycle through layout modes:
240
243
 
241
- | Mode | Description |
242
- |------|-------------|
243
- | **Normal** | Default two-pane split |
244
- | **Expanded** | Side list hidden, detail pane fills the screen |
245
- | **Wide Side** | Wider side list for longer item labels |
244
+ | Mode | Description |
245
+ | ------------- | ---------------------------------------------- |
246
+ | **Normal** | Default two-pane split |
247
+ | **Expanded** | Side list hidden, detail pane fills the screen |
248
+ | **Wide Side** | Wider side list for longer item labels |
246
249
 
247
250
  ## Keybindings
248
251
 
249
252
  ### Navigation
250
253
 
251
- | Key | Action |
252
- |-----|--------|
253
- | `1`–`8` | Switch panel |
254
- | `Tab` | Toggle focus between side list and detail pane |
255
- | `j` / `↓` | Next item (side) or scroll down (detail) |
256
- | `k` / `↑` | Previous item (side) or scroll up (detail) |
257
- | `g` | Jump to first item / scroll to top |
258
- | `G` | Jump to last item / scroll to bottom |
259
- | `h` / `←` | Return focus to side list (from detail) |
260
- | `Enter` | Move focus to detail pane (from side list) |
254
+ | Key | Action |
255
+ | --------- | ---------------------------------------------- |
256
+ | `1`–`8` | Switch panel |
257
+ | `Tab` | Toggle focus between side list and detail pane |
258
+ | `j` / `↓` | Next item (side) or scroll down (detail) |
259
+ | `k` / `↑` | Previous item (side) or scroll up (detail) |
260
+ | `g` | Jump to first item / scroll to top |
261
+ | `G` | Jump to last item / scroll to bottom |
262
+ | `h` / `←` | Return focus to side list (from detail) |
263
+ | `Enter` | Move focus to detail pane (from side list) |
261
264
 
262
265
  ### Detail Tabs
263
266
 
264
- | Key | Action |
265
- |-----|--------|
267
+ | Key | Action |
268
+ | --- | ------------------- |
266
269
  | `[` | Previous detail tab |
267
- | `]` | Next detail tab |
270
+ | `]` | Next detail tab |
268
271
 
269
272
  ### Session Management
270
273
 
271
- | Key | Action |
272
- |-----|--------|
274
+ | Key | Action |
275
+ | --- | ---------------------------------------------- |
273
276
  | `p` | Pin session (prevent auto-switching to newest) |
274
- | `s` | Switch to pending session |
275
- | `f` | Toggle session filter |
277
+ | `s` | Switch to pending session |
278
+ | `f` | Toggle session filter |
276
279
 
277
280
  ### Session Panel — Mind Map Tab
278
281
 
279
- | Key | Action |
280
- |-----|--------|
281
- | `v` | Cycle mind map view: tree → boxed → flow |
282
+ | Key | Action |
283
+ | --- | ---------------------------------------------------------------------------------------- |
284
+ | `v` | Cycle mind map view: tree → boxed → flow |
282
285
  | `f` | Cycle node filter: all → file → tool → task → subagent → command → plan → knowledge-note |
283
286
 
284
287
  ### Session Panel — AI Summary Tab
285
288
 
286
- | Key | Action |
287
- |-----|--------|
289
+ | Key | Action |
290
+ | --- | ----------------------------- |
288
291
  | `n` | Generate / retry AI narrative |
289
292
 
290
293
  ### General
291
294
 
292
- | Key | Action |
293
- |-----|--------|
294
- | `z` | Cycle layout mode |
295
- | `/` | Open filter overlay (supports substring, fuzzy, regex, and date modes — Tab cycles modes) |
296
- | `x` | Open context menu for selected item |
297
- | `?` | Show help |
298
- | `r` | Generate HTML report for the current session |
299
- | `V` | Show version / changelog |
300
- | `q` / `Ctrl+C` | Quit |
295
+ | Key | Action |
296
+ | -------------- | ----------------------------------------------------------------------------------------- |
297
+ | `z` | Cycle layout mode |
298
+ | `/` | Open filter overlay (supports substring, fuzzy, regex, and date modes — Tab cycles modes) |
299
+ | `x` | Open context menu for selected item |
300
+ | `?` | Show help |
301
+ | `r` | Generate HTML report for the current session |
302
+ | `V` | Show version / changelog |
303
+ | `q` / `Ctrl+C` | Quit |
301
304
 
302
305
  ## Mouse Support
303
306