@yanzc/claude-pro 0.7.5 → 0.7.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yanzc/claude-pro",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "description": "claude-pro: a command line coding agent for the codex-gateway. Full access with no permission prompts; file edits are checkpointed and can be rewound.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -27,8 +27,7 @@
27
27
  ],
28
28
  "scripts": {
29
29
  "start": "node bin/claude-pro.js",
30
- "check": "node bin/claude-pro.js --self-check",
31
- "test": "node --test --test-force-exit --test-timeout=60000 --test-reporter=dot \"test/**/*.test.js\""
30
+ "check": "node bin/claude-pro.js --self-check"
32
31
  },
33
32
  "engines": {
34
33
  "node": ">=22"
@@ -39,8 +38,5 @@
39
38
  },
40
39
  "dependencies": {
41
40
  "@anthropic-ai/sdk": "^0.128.0"
42
- },
43
- "devDependencies": {
44
- "@xterm/headless": "^6.0.0"
45
41
  }
46
42
  }
package/src/ui/repl.js CHANGED
@@ -29,7 +29,7 @@ import { shutdownBackgroundShells, listBackgroundShells } from '../tools/bash.js
29
29
  import { estimateTokens } from '../agent.js';
30
30
  import { readClipboardImage, imageFromFile, watchClipboard, writeClipboard, readClipboardText } from '../utils/clipboard.js';
31
31
  import { fitImagesIn, imageSize } from '../utils/images.js';
32
- import { checkForUpdate, installUpdate, installedVersion, installedByNpm, isNewer, CHECK_EVERY_MS } from '../updater.js';
32
+ import { checkForUpdate, installUpdate, installedVersion, installedByNpm, isNewer } from '../updater.js';
33
33
  import { PeerNode, peersEnabled, findPeer, resolvePeer, machineName, cleanName, peerMessagePrompt } from '../peers.js';
34
34
  import { RemoteControl, transcriptItems, onlineEnabled, REMOTE_WIDTH } from '../remote.js';
35
35
  import { ensureHost as startHostIfNeeded, ensureAutostart, hostEnabled, listDirectory, recentDirectories, computerId, markBackgroundEnded } from '../host.js';
@@ -328,10 +328,8 @@ export class App {
328
328
  this.fileIndex.refresh();
329
329
  this.startSourceWatch();
330
330
  if (!this.driven) {
331
- if (!this.flags.restart) this.autoUpdate();
332
- // and every few minutes while it runs, so that a release reaches a session that stays open for days
333
- this.updateTimer = setInterval(() => { if (!this.exiting) this.autoUpdate({ quiet: true }); }, CHECK_EVERY_MS);
334
- this.updateTimer.unref?.();
331
+ // Updates are deliberately manual: /update checks npm and installs the selected release.
332
+ // Do not query the registry or install/restart a running session in the background.
335
333
  // online or offline as this computer's gateway login changes (/login or /logout in another window)
336
334
  this.loginTimer = setInterval(() => this.syncRemote(), 10_000);
337
335
  this.loginTimer.unref?.();
@@ -2415,14 +2413,24 @@ export class App {
2415
2413
  const { model, effort } = modelInfo(cfg);
2416
2414
  // An effort that is not set is not sent: the API then uses the model's default, which is shown instead.
2417
2415
  const level = effort || defaultEffort(cfg.model.id, cfg);
2418
- const info = c.dim(level ? `${model} · effort ${level}` : model);
2419
- // Before the model: the prompt cache clock, then what the conversation has cost so far; when room is short
2420
- // the cost goes first, then the clock.
2416
+ const info = c.dim(level ? `${model} · ${level}` : model);
2417
+ const version = c.dim(`v${VERSION}`);
2418
+ const compactTokens = (n) => formatTokens(n).replace(/\.0([kM])$/, '$1');
2419
+ const context = c.dim(`ctx ${compactTokens(used)}/${compactTokens(cfg.model.contextWindow)}`);
2420
+ // Before the context, version and model: the prompt cache clock, then what the conversation has cost so far;
2421
+ // when room is short the cost goes first, then the clock.
2421
2422
  const spent = this.cost > 0 ? c.dim(formatUsd(this.cost)) : '';
2422
2423
  const clock = this.cacheClock();
2423
2424
  const join = (...parts) => parts.filter(Boolean).join(c.dim(' · '));
2424
2425
  const room = w - stringWidth(left) - 1;
2425
- const right = [join(notice, clock, spent, info), join(notice, clock, info), join(notice, info), notice, info].find((r) => r && stringWidth(r) < room) || '';
2426
+ const right = [
2427
+ join(notice, clock, spent, context, version, info),
2428
+ join(notice, clock, context, version, info),
2429
+ join(notice, context, version, info),
2430
+ join(notice, context, version),
2431
+ join(notice, version),
2432
+ version,
2433
+ ].find((r) => r && stringWidth(r) < room) || '';
2426
2434
  const gap = room - stringWidth(right);
2427
2435
  return right ? left + ' '.repeat(gap) + right : left;
2428
2436
  }
package/src/updater.js CHANGED
@@ -1,10 +1,7 @@
1
- // Auto-update, as in Claude Code: an interactive session installed with `npm i -g claude-pro` looks for a newer
2
- // version on the npm registry (when it starts and every few minutes while it runs; the sessions of a machine share
3
- // the interval, and what one finds the others see in the state file). It is installed only once no session of the
4
- // machine is working (App.maybeInstallUpdate asks them), by one session at a time (a lock file), and the session
5
- // then loads it with a restart (the conversation carries over); the others see the files change and restart too,
6
- // each once it is idle (App.startSourceWatch). A git checkout (the development copy) is never touched. Off with
7
- // CLAUDE_PRO_AUTO_UPDATE=0 or DISABLE_AUTOUPDATER=1.
1
+ // Manual update support for `npm i -g claude-pro`: the interactive session checks npm and installs a release only
2
+ // when `/update` calls App.autoUpdate({ force: true }). Installation is serialized by a lock file and the session
3
+ // loads the new package with a restart (the conversation carries over). A git checkout (the development copy) is
4
+ // never touched. The environment switches remain for callers that want to disable even manual checks.
8
5
 
9
6
  import fs from 'node:fs';
10
7
  import path from 'node:path';