@krtclcdy/tersio 2.7.0 → 2.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.md +2 -2
- package/cli/common.js +4 -4
- package/cli/dashboard.html +560 -184
- package/cli/dashboard.js +4 -4
- package/cli/doctor.js +3 -1
- package/cli/install.js +11 -11
- package/cli/update.js +9 -6
- package/cli/usage.js +17 -3
- package/extensions/shared/usage-ledger.js +35 -1
- package/extensions/tersio-commands/index.js +2 -2
- package/package.json +1 -1
- package/tersio.js +6 -6
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
|
|
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
|
|
|
@@ -101,7 +101,7 @@ Everything runs under one root. Bare `/tersio` prints status.
|
|
|
101
101
|
| `/tersio status` | Active modes + combo level; state persists, propagates to subagents, and lights the Combo footer indicator. |
|
|
102
102
|
| `/tersio check` | Add-on version check |
|
|
103
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
|
|
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
105
|
| `/tersio usage` | Ledger report for this machine (rows in `~/.omp/plugins/tersio-usage.jsonl`, local only) |
|
|
106
106
|
| `/tersio help` | This table |
|
|
107
107
|
| `/caveman`, `/rtk`, `/combo`, `/ai-addons` | Legacy aliases, still work; prefer `/tersio`. |
|
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 =
|
|
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
|
|
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
|
|
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,
|
|
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, };
|