@phnx-labs/agents-cli 1.22.126 → 1.22.127
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 +8 -0
- package/dist/index.js +2 -1
- package/dist/lib/accounting/usage-ingest.js +2 -1
- package/dist/lib/stdout.d.ts +1 -0
- package/dist/lib/stdout.js +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.22.127
|
|
4
|
+
|
|
5
|
+
- **A peer's fleet-state reply now arrives whole over ssh.** `agents __usage-ingest --reply`
|
|
6
|
+
and `agents __usage-export` exited before stdout drained, so a reply larger than one pipe
|
|
7
|
+
buffer was cut at 65,536 bytes and the dialing box logged "malformed JSON payload" for every
|
|
8
|
+
peer. That left peer state stale, which blocked worker owner-notify tokens from minting. Both
|
|
9
|
+
verbs now wait for stdout to flush before exiting. Source: `cli/src/lib/stdout.ts`.
|
|
10
|
+
|
|
3
11
|
## 1.22.126
|
|
4
12
|
|
|
5
13
|
- **Liveness checks no longer spawn one `ps` per session (PHNX-4225).** Every PID-reuse check
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,8 @@ if (process.argv[2] === '__usage-ingest') {
|
|
|
34
34
|
}
|
|
35
35
|
if (process.argv[2] === '__usage-export') {
|
|
36
36
|
const { exportClaudeUsageCacheRows } = await import('./lib/accounting/usage.js');
|
|
37
|
-
|
|
37
|
+
const { writeStdoutFlushed } = await import('./lib/stdout.js');
|
|
38
|
+
await writeStdoutFlushed(JSON.stringify({ v: 1, rows: exportClaudeUsageCacheRows() }));
|
|
38
39
|
process.exit(0);
|
|
39
40
|
}
|
|
40
41
|
if (process.argv[2] === '__harness-update-run') {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import { REMOTE_STDOUT_MAX_BYTES, RemoteUtf8Accumulator } from '../ssh-exec.js';
|
|
3
|
+
import { writeStdoutFlushed } from '../stdout.js';
|
|
3
4
|
import { ingestPeerClaudeUsageRows } from './usage.js';
|
|
4
5
|
import { applyPeerFleetState, buildFleetStatePayload, formatFleetStateReply, parseFleetStateExchangeInput, publishOwnFleetState, } from './usage-sync.js';
|
|
5
6
|
export class UsageIngestInputTooLargeError extends Error {
|
|
@@ -98,6 +99,6 @@ export async function runUsageIngest(argv = process.argv.slice(3)) {
|
|
|
98
99
|
errors.push(...published.errors);
|
|
99
100
|
for (const message of published.errors)
|
|
100
101
|
process.stderr.write(`[agents] __usage-ingest: ${message}\n`);
|
|
101
|
-
|
|
102
|
+
await writeStdoutFlushed(formatFleetStateReply(buildFleetStatePayload({ errors })));
|
|
102
103
|
return 0;
|
|
103
104
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function writeStdoutFlushed(text: string): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phnx-labs/agents-cli",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.127",
|
|
4
4
|
"description": "One CLI for all your AI coding agents - versions, config, cloud dispatch, sessions, and teams (now with first-class Grok Build CLI support)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|