@llmist/cli 15.0.0 → 15.1.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/dist/cli.js +33 -19
- package/dist/cli.js.map +1 -1
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -98,7 +98,7 @@ import { Command, InvalidArgumentError as InvalidArgumentError2 } from "commande
|
|
|
98
98
|
// package.json
|
|
99
99
|
var package_default = {
|
|
100
100
|
name: "@llmist/cli",
|
|
101
|
-
version: "15.
|
|
101
|
+
version: "15.1.0",
|
|
102
102
|
description: "CLI for llmist - run LLM agents from the command line",
|
|
103
103
|
type: "module",
|
|
104
104
|
main: "dist/cli.js",
|
|
@@ -154,7 +154,7 @@ var package_default = {
|
|
|
154
154
|
node: ">=22.0.0"
|
|
155
155
|
},
|
|
156
156
|
dependencies: {
|
|
157
|
-
llmist: "^15.
|
|
157
|
+
llmist: "^15.1.0",
|
|
158
158
|
"@unblessed/node": "^1.0.0-alpha.23",
|
|
159
159
|
chalk: "^5.6.2",
|
|
160
160
|
commander: "^12.1.0",
|
|
@@ -168,7 +168,7 @@ var package_default = {
|
|
|
168
168
|
zod: "^4.1.12"
|
|
169
169
|
},
|
|
170
170
|
devDependencies: {
|
|
171
|
-
"@llmist/testing": "^15.
|
|
171
|
+
"@llmist/testing": "^15.1.0",
|
|
172
172
|
"@types/diff": "^8.0.0",
|
|
173
173
|
"@types/js-yaml": "^4.0.9",
|
|
174
174
|
"@types/marked-terminal": "^6.1.1",
|
|
@@ -7202,9 +7202,10 @@ var StatusBar = class {
|
|
|
7202
7202
|
/**
|
|
7203
7203
|
* Show rate limiting throttle indicator.
|
|
7204
7204
|
* @param delayMs - Delay in milliseconds before next request
|
|
7205
|
+
* @param triggeredBy - Which limit(s) triggered the throttle
|
|
7205
7206
|
*/
|
|
7206
|
-
showThrottling(delayMs) {
|
|
7207
|
-
this.rateLimitState = { isThrottling: true, delayMs };
|
|
7207
|
+
showThrottling(delayMs, triggeredBy) {
|
|
7208
|
+
this.rateLimitState = { isThrottling: true, delayMs, triggeredBy };
|
|
7208
7209
|
this.render(true);
|
|
7209
7210
|
}
|
|
7210
7211
|
/**
|
|
@@ -7458,8 +7459,14 @@ var StatusBar = class {
|
|
|
7458
7459
|
parts.push(`${GRAY}${debugStr}${typeStr}${RESET2}`);
|
|
7459
7460
|
}
|
|
7460
7461
|
if (this.rateLimitState?.isThrottling) {
|
|
7461
|
-
const
|
|
7462
|
-
|
|
7462
|
+
const { triggeredBy } = this.rateLimitState;
|
|
7463
|
+
if (triggeredBy?.daily) {
|
|
7464
|
+
parts.push(`${YELLOW2}\u23F8 Daily limit, resets midnight UTC${RESET2}`);
|
|
7465
|
+
} else {
|
|
7466
|
+
const seconds = Math.ceil(this.rateLimitState.delayMs / 1e3);
|
|
7467
|
+
const reason = triggeredBy?.rpm ? " (RPM)" : triggeredBy?.tpm ? " (TPM)" : "";
|
|
7468
|
+
parts.push(`${YELLOW2}\u23F8 Throttled ${seconds}s${reason}${RESET2}`);
|
|
7469
|
+
}
|
|
7463
7470
|
}
|
|
7464
7471
|
if (this.retryState) {
|
|
7465
7472
|
const { attemptNumber, retriesLeft } = this.retryState;
|
|
@@ -7853,9 +7860,10 @@ var TUIApp = class _TUIApp {
|
|
|
7853
7860
|
/**
|
|
7854
7861
|
* Show rate limiting throttle indicator in status bar.
|
|
7855
7862
|
* @param delayMs - Delay in milliseconds before next request
|
|
7863
|
+
* @param triggeredBy - Which limit(s) triggered the throttle
|
|
7856
7864
|
*/
|
|
7857
|
-
showThrottling(delayMs) {
|
|
7858
|
-
this.statusBar.showThrottling(delayMs);
|
|
7865
|
+
showThrottling(delayMs, triggeredBy) {
|
|
7866
|
+
this.statusBar.showThrottling(delayMs, triggeredBy);
|
|
7859
7867
|
}
|
|
7860
7868
|
/**
|
|
7861
7869
|
* Clear rate limiting throttle indicator from status bar.
|
|
@@ -8189,16 +8197,22 @@ async function executeAgent(promptArg, options, env, commandName) {
|
|
|
8189
8197
|
if (context.subagentContext) return;
|
|
8190
8198
|
if (tui) {
|
|
8191
8199
|
const seconds = Math.ceil(context.delayMs / 1e3);
|
|
8192
|
-
|
|
8193
|
-
|
|
8194
|
-
|
|
8195
|
-
if (
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8200
|
+
const { triggeredBy } = context.stats;
|
|
8201
|
+
tui.showThrottling(context.delayMs, triggeredBy);
|
|
8202
|
+
let message;
|
|
8203
|
+
if (triggeredBy?.daily) {
|
|
8204
|
+
const current = Math.round(triggeredBy.daily.current / 1e3);
|
|
8205
|
+
const limit = Math.round(triggeredBy.daily.limit / 1e3);
|
|
8206
|
+
message = `Daily token limit reached (${current}K/${limit}K), waiting until midnight UTC...`;
|
|
8207
|
+
} else {
|
|
8208
|
+
const statsMsg = [];
|
|
8209
|
+
if (context.stats.rpm > 0) statsMsg.push(`${context.stats.rpm} RPM`);
|
|
8210
|
+
if (context.stats.tpm > 0)
|
|
8211
|
+
statsMsg.push(`${Math.round(context.stats.tpm / 1e3)}K TPM`);
|
|
8212
|
+
const statsStr = statsMsg.length > 0 ? ` (${statsMsg.join(", ")})` : "";
|
|
8213
|
+
message = `Rate limit approaching${statsStr}, waiting ${seconds}s...`;
|
|
8214
|
+
}
|
|
8215
|
+
tui.addSystemMessage(message, "throttle");
|
|
8202
8216
|
setTimeout(() => tui.clearThrottling(), context.delayMs);
|
|
8203
8217
|
}
|
|
8204
8218
|
},
|