zames_pro 2.82.13 → 2.82.15

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/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.82.15] - 2026-10-22
11
+
12
+ ### Fixed
13
+
14
+ - **glm:** probe the send button so a missing one is a critical UI failure
15
+
16
+ ## [2.82.14] - 2026-10-22
17
+
18
+ ### Fixed
19
+
20
+ - **glm:** read token usage inside the chat:completion envelope
21
+
10
22
  ## [2.82.13] - 2026-10-22
11
23
 
12
24
  ### Fixed
@@ -1306,6 +1306,11 @@ export class GlmBrowser {
1306
1306
  _uiCapabilities() {
1307
1307
  return [
1308
1308
  { capability: 'input', selectors: INPUT_SELECTORS, critical: true },
1309
+ // z.ai's send button is present on an idle page (a disabled
1310
+ // `button#send-message-button`), so a missing one is a REAL failure: the
1311
+ // prompt would be typed and never submitted. Without this entry the page
1312
+ // reported healthy while no send control existed.
1313
+ { capability: 'send', selectors: SEND_SELECTORS, critical: true },
1309
1314
  { capability: 'toggles', selectors: [], critical: false },
1310
1315
  {
1311
1316
  capability: 'newChat',
@@ -197,7 +197,13 @@ export function extractTokenUsage(body) {
197
197
  return lastTotal;
198
198
  try {
199
199
  const obj = JSON.parse(body);
200
- const usage = obj?.usage;
200
+ // A non-streamed reply keeps `usage` inside the same `chat:completion`
201
+ // envelope as the SSE stream (`data.usage`); reading only the top level
202
+ // lost the counter entirely.
203
+ const envelope = obj?.data && typeof obj.data === 'object'
204
+ ? obj.data
205
+ : null;
206
+ const usage = ((envelope ? envelope.usage : undefined) ?? obj?.usage);
201
207
  if (usage) {
202
208
  if (typeof usage.prompt_tokens === 'number')
203
209
  return usage.prompt_tokens;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.82.13",
3
+ "version": "2.82.15",
4
4
  "description": "Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen and other web LLMs — no API key required. Reads and edits files, runs commands, commits to git, like Claude Code / Codex CLI.",
5
5
  "type": "module",
6
6
  "bin": {