sprag-cli 3.130.0 → 3.132.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/bin/cli.js +11 -1
- package/mac/SpragBar.swift +3141 -0
- package/mod/sprag-statusline/hooks/register.tsx +58 -3
- package/package.json +2 -1
- package/src/agent-activity.js +485 -0
- package/src/agent-detail.js +266 -0
- package/src/agent-usage.js +410 -0
- package/src/agent-warnings.js +128 -0
- package/src/bar-app.js +330 -0
- package/src/bar-rules.js +133 -0
- package/src/bar-settings.js +78 -0
- package/src/brief.js +40 -13
- package/src/caps-cache.js +4 -3
- package/src/claude-version.js +38 -0
- package/src/codex/budget.js +1 -1
- package/src/codex/delegation-diagnostics.js +1 -1
- package/src/codex/panel.js +1 -7
- package/src/commands/bar.js +370 -0
- package/src/commands/delegate.js +1 -0
- package/src/commands/feedback.js +2 -2
- package/src/commands/install.js +4 -1
- package/src/commands/last.js +1 -1
- package/src/commands/route-scan.js +39 -1
- package/src/commands/team.js +1 -1
- package/src/commands/uninstall.js +2 -0
- package/src/commands/upgrade.js +1 -1
- package/src/compact-window.js +1 -1
- package/src/cowork-sync.js +1 -1
- package/src/ctx-window-cache.js +11 -8
- package/src/delegation-agents.js +41 -2
- package/src/doc2md.cjs +1 -0
- package/src/gateway-auth.js +1 -0
- package/src/handoff.js +1 -0
- package/src/history.js +18 -1
- package/src/installer.js +43 -0
- package/src/korean-style.js +1 -1
- package/src/permission-secrets.js +1 -1
- package/src/session-cache.js +19 -0
- package/src/statusline-guard.js +17 -0
- package/src/team-sync.js +1 -1
- package/src/transcript-lines.js +1 -1
- package/src/window-labels.js +11 -0
package/bin/cli.js
CHANGED
|
@@ -168,7 +168,7 @@ const KNOWN_SUBCOMMANDS = new Set([
|
|
|
168
168
|
'last', 'brief', 'history', 'handoff', 'install', 'uninstall', 'mode', 'korean', 'cohesion',
|
|
169
169
|
'doc2md', 'delegate', 'proof', 'harness', 'route-scan', 'compact-window', 'update-check', 'upgrade',
|
|
170
170
|
'seed', 'litellm-budget', 'oauth-budget', 'profile-map', 'feedback', 'saved', 'cowork', 'team', 'presets', 'routing', 'secrets',
|
|
171
|
-
'panel',
|
|
171
|
+
'panel', 'bar',
|
|
172
172
|
]);
|
|
173
173
|
|
|
174
174
|
// Flags each entry path reads, collected from the hasFlag/getArg/numArg calls in
|
|
@@ -196,6 +196,7 @@ const FLAG_SPECS = {
|
|
|
196
196
|
value: ['--project', '--session', '--interval'],
|
|
197
197
|
bool: ['--once', '--no-color', '--icon', '--verbose', '--single-line', '--help', '-h'],
|
|
198
198
|
},
|
|
199
|
+
bar: { value: [], bool: ['--json', '--swiftbar', '--plugin', '--settings', '--rules', '--detail', '--then-launch', '--help', '-h'] },
|
|
199
200
|
};
|
|
200
201
|
|
|
201
202
|
/** Which spec applies to this invocation, or null for a subcommand that parses its own arguments. */
|
|
@@ -290,6 +291,9 @@ Usage:
|
|
|
290
291
|
sprag --uninstall-hook remove that hook
|
|
291
292
|
sprag panel live statusline in a terminal pane, for hosts that do not draw it (T3 Code, Agent SDK)
|
|
292
293
|
--once / --interval <sec> / --project <dir> / --session <id> / --no-color
|
|
294
|
+
sprag bar what each running agent session is doing, with its model, context, cost, CPU, memory and account limits
|
|
295
|
+
--json / --swiftbar (SwiftBar or xbar menu bar text) / --plugin (print the plugin script) / --settings (routing, statusline and team name settings as JSON) / --rules (every ratchet, preset, model and team rule as JSON) / --detail (with --json: each session's request, last reply, recent tool calls and child processes)
|
|
296
|
+
on|off|status|build [--then-launch] the macOS menu bar app: compiled from its source once (again only when a release changes it) and started when a session starts
|
|
293
297
|
sprag --statusline one-line output for Claude Code statusline
|
|
294
298
|
--verbose / --no-color / --icon / --no-timer / --single-line
|
|
295
299
|
--columns N fit lines to N cells (default: $COLUMNS, which Claude Code sets, else 120)
|
|
@@ -354,6 +358,12 @@ async function main() {
|
|
|
354
358
|
return (await import('../src/commands/panel.js')).run({ getArg, hasFlag });
|
|
355
359
|
}
|
|
356
360
|
|
|
361
|
+
// Subcommand: bar — one-shot snapshot of what each running Claude Code and
|
|
362
|
+
// Codex session is doing, with CPU and memory (text, JSON or SwiftBar/xbar).
|
|
363
|
+
if (args[0] === 'bar') {
|
|
364
|
+
return (await import('../src/commands/bar.js')).run({ args, hasFlag });
|
|
365
|
+
}
|
|
366
|
+
|
|
357
367
|
// Subcommand: last — print the most recent warning + how to handle it.
|
|
358
368
|
// Designed for the auto-trigger skill so the user immediately sees
|
|
359
369
|
// "what just fired and how to fix it" without having to read the whole
|