@krtclcdy/tersio 2.6.0 → 2.8.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.md CHANGED
@@ -82,7 +82,7 @@ Break-even math, balanced preset (caveman full + rtk + ponytail): `⌈overhead
82
82
  | `tersio reinstall` | Fresh install, preserving the Ponytail package |
83
83
  | `tersio doctor` | Check OMP, extension, Ponytail, and RTK health |
84
84
  | `tersio usage` | Ledger-backed usage + savings report |
85
- | `tersio dashboard` | Serve the gain dashboard on localhost (`--open`, `--export <file>`, `--port <n>`) |
85
+ | `tersio gain` | Open the gain dashboard (`--open`, `--export <file>`, `--port <n>`; serves localhost only) |
86
86
  | `tersio uninstall` | Remove extensions, registration, and the Ponytail plugin (`--keep-ponytail` keeps Ponytail; `--remove-rtk` also removes the RTK binary) |
87
87
  | `tersio version` | Print version |
88
88
 
@@ -94,40 +94,17 @@ Everything runs under one root. Bare `/tersio` prints status.
94
94
 
95
95
  | Command | Purpose |
96
96
  |---|---|
97
- | `/tersio combo off\|medium\|balanced\|max\|status` | preset for all three modes (start here) |
98
- | `/tersio caveman lite\|full\|ultra\|wenyan\|off\|status` | terse-reply mode |
99
- | `/tersio rtk on\|off\|status` | compact shell-output toggle |
100
- | `/tersio ponytail off\|lite\|full\|ultra\|review\|status` | minimal-code level |
101
- | `/tersio status` | active modes + combo level |
102
- | `/tersio check` | add-on version check (same as old `/ai-addons check`) |
103
- | `/tersio update <ponytail\|rtk\|caveman\|all> [--dry-run]` | update add-ons, preview with dry-run |
104
- | `/tersio gain` | savings summary + dashboard hint |
105
- | `/tersio usage` | ledger report for this machine |
106
- | `/tersio help` | this table |
107
-
108
- ### Combo — one preset for all three
109
-
110
- Start here: one setting drives all three modes (`medium` = lite/lite/on, `balanced` = full/full/on, `max` = ultra/ultra/on, `off` = normal). Tweaking a mode individually drops to a `custom` mix.
111
-
112
- ### Caveman — terse replies
113
-
114
- Pleasantries and restatements go; substance stays. Ladder: `lite`, `full`, `ultra` (fragments only), `wenyan` (compressed classical-Chinese-inspired register).
115
-
116
- ### RTK — compact shell output
117
-
118
- A real binary, not a prompt trick: `rtk git status|diff|grep|test|tsc|lint` strips noise before output reaches the model. Exact bytes (checksums, patches) bypass it by policy.
119
-
120
- ### Ponytail — minimal code (YAGNI)
121
-
122
- You Aren't Gonna Need It: smallest working change, no speculative abstractions, no new deps for stdlib jobs. `lite` nudges, `full` enforces, `ultra` challenges the requirement, `review` audits for over-engineering.
123
-
124
- `/tersio` persists state and reloads OMP without emitting separate command messages. Presets propagate to task subagents and light the Combo footer indicator; mixed individual settings report via `/tersio status`.
125
-
126
- ### Legacy aliases (still work)
127
-
128
- The pre-`/tersio` commands remain registered: `/caveman`, `/rtk`, `/combo`, `/ai-addons`. Prefer `/tersio` in new muscle memory; help output lists the aliases as deprecated-but-working.
129
-
130
- Usage rows land in `~/.omp/plugins/tersio-usage.jsonl` (local only); `tersio dashboard` serves them as a plain-HTML page on 127.0.0.1.
97
+ | `/tersio combo off\|medium\|balanced\|max\|status` | One preset for all three (start here): medium = lite/lite/on, balanced = full/full/on, max = ultra/ultra/on; per-mode tweaks drop to `custom`. |
98
+ | `/tersio caveman lite\|full\|ultra\|wenyan\|off\|status` | Terse replies (substance stays); `ultra` uses fragments only, `wenyan` a compressed classical-Chinese-inspired register. |
99
+ | `/tersio rtk on\|off\|status` | Compact shell output via the real `rtk` binary; exact bytes (checksums, patches) bypass it by policy. |
100
+ | `/tersio ponytail off\|lite\|full\|ultra\|review\|status` | Minimal code (YAGNI): `lite` nudges, `full` enforces, `ultra` challenges the requirement, `review` audits for over-engineering. |
101
+ | `/tersio status` | Active modes + combo level; state persists, propagates to subagents, and lights the Combo footer indicator. |
102
+ | `/tersio check` | Add-on version check |
103
+ | `/tersio update <ponytail\|rtk\|caveman\|all> [--dry-run]` | Update add-ons, preview with dry-run |
104
+ | `/tersio gain` | Savings summary; the gain dashboard charts `~/.omp/plugins/tersio-usage.jsonl` (`tersio gain --open` serves on 127.0.0.1, `--export` writes one file). |
105
+ | `/tersio usage` | Ledger report for this machine (rows in `~/.omp/plugins/tersio-usage.jsonl`, local only) |
106
+ | `/tersio help` | This table |
107
+ | `/caveman`, `/rtk`, `/combo`, `/ai-addons` | Legacy aliases, still work; prefer `/tersio`. |
131
108
 
132
109
  ## Files and backups
133
110
 
package/cli/common.js CHANGED
@@ -46,11 +46,11 @@ function flagValue(name) {
46
46
  return args.find((arg) => arg.startsWith(prefix))?.slice(prefix.length);
47
47
  }
48
48
  // --- CLI flags ---
49
- const COMMANDS = new Set(['install', 'update', 'reinstall', 'doctor', 'uninstall', 'usage', 'dashboard', 'version', 'help']);
49
+ const COMMANDS = { install: true, update: true, reinstall: true, doctor: true, uninstall: true, usage: true, gain: true, version: true, help: true };
50
50
  const args = process.argv.slice(2);
51
51
  const commandArg = args.find((arg, index) => !arg.startsWith('-') && args[index - 1] !== '--scope');
52
52
  const command = commandArg?.toLowerCase() || null;
53
- const unknownCommand = command !== null && !COMMANDS.has(command);
53
+ const unknownCommand = command !== null && !COMMANDS[command];
54
54
  const install = command === 'install';
55
55
  const update = command === 'update';
56
56
  const reinstall = command === 'reinstall';
@@ -62,7 +62,7 @@ const yes = args.includes('--yes') || args.includes('-y') || install || update |
62
62
  const verbose = args.includes('--verbose');
63
63
  const doctor = command === 'doctor' || args.includes('--doctor');
64
64
  const usage = command === 'usage' || args.includes('--usage');
65
- const dashboard = command === 'dashboard' || args.includes('--dashboard');
65
+ const gain = command === 'gain';
66
66
  const dashboardPort = Number.parseInt(flagValue('--port') ?? '', 10) || 0;
67
67
  const dashboardOpen = args.includes('--open');
68
68
  const dashboardExport = flagValue('--export') ?? null;
@@ -254,4 +254,4 @@ function relTime(ageMs) {
254
254
  const weeks = Math.floor(days / 7);
255
255
  return `${weeks} week${weeks === 1 ? '' : 's'} ago`;
256
256
  }
257
- export { IS_WINDOWS, RTK_BINARY_NAME, HOME, OMP_AGENT_DIR, OMP_PLUGINS_DIR, BUN_BIN_DIR, OMP_BIN, PACKAGE_NAME, PACKAGE_BIN, PACKAGE_VERSION, CAVEMAN_DEFAULTS, PONYTAIL_DEFAULTS, RTK_DEFAULTS, COMBO_PRESET_MODES, COMBO_DEFAULTS, parseEnum, flagValue, COMMANDS, commandArg, command, unknownCommand, install, update, reinstall, showVersion, showHelp, applyUpdate, dryRun, yes, verbose, doctor, uninstall, usage, dashboard, dashboardPort, dashboardOpen, dashboardExport, removePonytail, keepPonytail, removeRtk, scopeFlag, comboDefaultFlag, cavemanDefaultFlag, ponytailDefaultFlag, rtkDefaultFlag, profileFlagsGiven, debug, execFileP, execP, writeIfChanged, normalizeExtensionsKey, EXTENSIONS_KEY_RE, writeConfigLines, ensureExtensionInConfig, ensureExtensionAfterConfigEntry, readPonytailConfig, parseJsonObject, parsePonytailConfig, patchPonytailConfig, ensurePonytailConfigValue, readPluginsPackage, SCOPE_MAP, relTime, };
257
+ export { IS_WINDOWS, RTK_BINARY_NAME, HOME, OMP_AGENT_DIR, OMP_PLUGINS_DIR, BUN_BIN_DIR, OMP_BIN, PACKAGE_NAME, PACKAGE_BIN, PACKAGE_VERSION, CAVEMAN_DEFAULTS, PONYTAIL_DEFAULTS, RTK_DEFAULTS, COMBO_PRESET_MODES, COMBO_DEFAULTS, parseEnum, flagValue, COMMANDS, commandArg, command, unknownCommand, install, update, reinstall, showVersion, showHelp, applyUpdate, dryRun, yes, verbose, doctor, uninstall, usage, gain, dashboardPort, dashboardOpen, dashboardExport, removePonytail, keepPonytail, removeRtk, scopeFlag, comboDefaultFlag, cavemanDefaultFlag, ponytailDefaultFlag, rtkDefaultFlag, profileFlagsGiven, debug, execFileP, execP, writeIfChanged, normalizeExtensionsKey, EXTENSIONS_KEY_RE, writeConfigLines, ensureExtensionInConfig, ensureExtensionAfterConfigEntry, readPonytailConfig, parseJsonObject, parsePonytailConfig, patchPonytailConfig, ensurePonytailConfigValue, readPluginsPackage, SCOPE_MAP, relTime, };