agent-relay-orchestrator 0.28.0 → 0.29.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/package.json +2 -2
- package/src/control.ts +1 -1
- package/src/relay.ts +1 -1
- package/src/self-supervision.ts +1 -1
- package/src/self-upgrade.ts +2 -2
- package/src/spawn.ts +1 -1
- package/src/terminal-stream.ts +2 -2
- package/src/workspace-probe.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-relay-orchestrator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Agent Relay orchestrator — manages agent lifecycle across hosts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"test": "bun test"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"agent-relay-sdk": "0.2.
|
|
19
|
+
"agent-relay-sdk": "0.2.18"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/bun": "latest",
|
package/src/control.ts
CHANGED
|
@@ -192,7 +192,7 @@ function shutdownTimeoutMs(ctrl: Record<string, any>): number | undefined {
|
|
|
192
192
|
// input and stays defensive against junk).
|
|
193
193
|
// - cwd: `source.cwd || baseDir` — an empty-string cwd now falls back to
|
|
194
194
|
// baseDir on the restart path too (was a latent bug; empty cwd is invalid).
|
|
195
|
-
|
|
195
|
+
function spawnOptionsFromRecord(source: Record<string, any>, config: OrchestratorConfig): SpawnOptions {
|
|
196
196
|
return {
|
|
197
197
|
provider: source.provider === "codex" ? "codex" : "claude",
|
|
198
198
|
cwd: source.cwd || config.baseDir,
|
package/src/relay.ts
CHANGED
package/src/self-supervision.ts
CHANGED
|
@@ -32,7 +32,7 @@ export function detectSelfSupervision(moduleUrl: string = import.meta.url): Self
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/** Reset the cache. Test-only. */
|
|
35
|
-
|
|
35
|
+
function resetSelfSupervisionCache(): void {
|
|
36
36
|
cached = undefined;
|
|
37
37
|
}
|
|
38
38
|
|
package/src/self-upgrade.ts
CHANGED
|
@@ -16,7 +16,7 @@ const CACHE_RACE_RE = /ETARGET|No matching version found|notarget/i;
|
|
|
16
16
|
const DEFAULT_INSTALL_RETRIES = 4;
|
|
17
17
|
const DEFAULT_INSTALL_RETRY_BASE_MS = 2000;
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
interface SelfUpgradeOptions {
|
|
20
20
|
/** Sleep between install retries (injectable for tests). */
|
|
21
21
|
sleep?: (ms: number) => Promise<void>;
|
|
22
22
|
/** Max extra install attempts after the first on a cache-race error. */
|
|
@@ -55,7 +55,7 @@ const defaultRunner: SelfUpgradeRunner = {
|
|
|
55
55
|
},
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
interface SelfUpgradePlan {
|
|
59
59
|
targetVersion: string;
|
|
60
60
|
providers: string[];
|
|
61
61
|
unit: string;
|
package/src/spawn.ts
CHANGED
package/src/terminal-stream.ts
CHANGED
|
@@ -157,7 +157,7 @@ export function latin1LineToUtf8(line: string): string {
|
|
|
157
157
|
return REPLY_UTF8_DECODER.decode(bytes);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
type ControlLine =
|
|
161
161
|
| { type: "output"; pane: string; bytes: Uint8Array }
|
|
162
162
|
| { type: "exit"; reason?: string }
|
|
163
163
|
// Command-reply block framing. Every command written to the control client's stdin is
|
|
@@ -204,7 +204,7 @@ export function parseControlLine(line: string): ControlLine {
|
|
|
204
204
|
// scroll-region TUIs like Claude Code emit constantly). So we track whether the outbound
|
|
205
205
|
// stream is at a sequence boundary (ground) and only inject there. This is a deliberately
|
|
206
206
|
// minimal VT state machine: enough to know "are we mid-sequence?", not a full parser.
|
|
207
|
-
|
|
207
|
+
type AnsiState = "ground" | "esc" | "esc-charset" | "csi" | "string" | "string-esc";
|
|
208
208
|
|
|
209
209
|
export function advanceAnsiState(state: AnsiState, byte: number): AnsiState {
|
|
210
210
|
// CAN (0x18) / SUB (0x1a) abort any in-progress sequence from any state → ground.
|
package/src/workspace-probe.ts
CHANGED
|
@@ -441,7 +441,7 @@ export function refreshWorkspaceDeps(repoRoot: string, worktreePath: string, opt
|
|
|
441
441
|
* install (full isolation, no shared cache), or =none to skip entirely.
|
|
442
442
|
* Never throws — provisioning failure must not block the spawn.
|
|
443
443
|
*/
|
|
444
|
-
|
|
444
|
+
function provisionWorkspaceDeps(repoRoot: string, worktreePath: string): WorkspaceDepsProvision {
|
|
445
445
|
const requested = (process.env.AGENT_RELAY_WORKSPACE_DEPS || "symlink").toLowerCase();
|
|
446
446
|
if (requested === "none") return { mode: "none" };
|
|
447
447
|
|