@phnx-labs/agents-cli 1.17.1 → 1.17.2
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 +6 -0
- package/README.md +2 -0
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.17.2
|
|
4
|
+
|
|
5
|
+
**Fixes**
|
|
6
|
+
|
|
7
|
+
- Auto-update prompt no longer hangs in non-interactive environments (CI, k8s pods, cloud sandbox factories). The TTY check now requires both stdin and stdout to be terminals before prompting, and `AGENTS_CLI_DISABLE_AUTO_UPDATE=1` forces the check off entirely for headless deploys. ([#15](https://github.com/phnx-labs/agents-cli/issues/15))
|
|
8
|
+
|
|
3
9
|
## 1.17.1
|
|
4
10
|
|
|
5
11
|
**Agent management**
|
package/README.md
CHANGED
|
@@ -588,6 +588,8 @@ The installer tries Bun first (faster), falls back to npm. Node 18+ required at
|
|
|
588
588
|
|
|
589
589
|
Yes -- `agents run` is non-interactive by default. `--yes` auto-accepts prompts, `--json` for structured output. Pass explicit names and IDs instead of relying on interactive pickers.
|
|
590
590
|
|
|
591
|
+
The auto-update prompt is suppressed automatically when stdin or stdout isn't a TTY. For headless environments where TTY detection misfires (k8s pods that allocate a PTY for stdout, cloud sandbox factories), set `AGENTS_CLI_DISABLE_AUTO_UPDATE=1` to skip the update check entirely -- no prompt, no network call.
|
|
592
|
+
|
|
591
593
|
### What happens to my config when I switch versions?
|
|
592
594
|
|
|
593
595
|
Each version has its own isolated config directory. Switching just repoints a symlink — your per-version config stays untouched. On first migration (if you had a real `~/.claude/` directory before using agents-cli), that gets backed up once to `~/.agents-system/backups/`.
|
package/dist/index.js
CHANGED
|
@@ -60,7 +60,7 @@ import { registerUsageCommand } from './commands/usage.js';
|
|
|
60
60
|
import { registerAliasCommand } from './commands/alias.js';
|
|
61
61
|
import { registerBetaCommands } from './commands/beta.js';
|
|
62
62
|
import { applyGlobalHelpConventions } from './lib/help.js';
|
|
63
|
-
import { isPromptCancelled } from './commands/utils.js';
|
|
63
|
+
import { isInteractiveTerminal, isPromptCancelled } from './commands/utils.js';
|
|
64
64
|
import { AGENTS } from './lib/agents.js';
|
|
65
65
|
import { getGlobalDefault, listInstalledVersions } from './lib/versions.js';
|
|
66
66
|
import { addShimsToPath, ensureShimCurrent, ensureVersionedAliasCurrent, getPathShadowingExecutable, getPathSetupInstructions, hasAliasShadowingShim, isShimsInPath, listAgentsWithInstalledVersions, removeLegacyUserShim, } from './lib/shims.js';
|
|
@@ -240,7 +240,7 @@ function saveUpdateCheck(latestVersion) {
|
|
|
240
240
|
}
|
|
241
241
|
/** Present an interactive upgrade prompt (TTY) or a one-line hint (non-TTY). */
|
|
242
242
|
async function promptUpgrade(latestVersion) {
|
|
243
|
-
if (!
|
|
243
|
+
if (!isInteractiveTerminal()) {
|
|
244
244
|
console.error(chalk.yellow(`Update available: ${VERSION} -> ${latestVersion}. Run: npm install -g @phnx-labs/agents-cli@latest`));
|
|
245
245
|
return;
|
|
246
246
|
}
|
|
@@ -309,6 +309,8 @@ function refreshUpdateCacheInBackground() {
|
|
|
309
309
|
}
|
|
310
310
|
/** Check for available updates using the local cache. Triggers a background refresh if stale. */
|
|
311
311
|
async function checkForUpdates() {
|
|
312
|
+
if (process.env.AGENTS_CLI_DISABLE_AUTO_UPDATE)
|
|
313
|
+
return;
|
|
312
314
|
const cache = readUpdateCache();
|
|
313
315
|
// Kick off network refresh in background if stale. Does not block.
|
|
314
316
|
if (shouldFetchLatest(cache)) {
|
package/package.json
CHANGED