@rallycry/conveyor-agent 11.0.51 → 11.1.1
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/dist/{boot-GD5XMLPS.js → boot-3FWYGHSN.js} +3 -2
- package/dist/{chunk-SXZS2R52.js → chunk-76JCOHPE.js} +2 -2
- package/dist/chunk-JSBRDJBE.js +30 -0
- package/dist/{chunk-NK6JMYEY.js → chunk-K2PCYBXI.js} +14034 -10603
- package/dist/{chunk-ATYCG6MT.js → chunk-MFGRXD4Y.js} +1 -1
- package/dist/chunk-MILKMRPU.js +10043 -0
- package/dist/{chunk-HIJWYTBH.js → chunk-NLVZSOKK.js} +12 -4
- package/dist/{chunk-XCO2BP6A.js → chunk-VVDV5P5Y.js} +1 -1
- package/dist/cli.js +11 -10
- package/dist/{client-VIFYMBT2.js → client-3EEFC7OD.js} +1 -0
- package/dist/gate-cli.js +1 -0
- package/dist/heartbeat-worker.js +28 -20
- package/dist/index.d.ts +79 -87
- package/dist/index.js +5 -4
- package/dist/{mode-ZJSOSLGU.js → mode-2XRJTIX6.js} +1 -0
- package/dist/{oom-watchdog-PAC5OJJG.js → oom-watchdog-YQYPVUKH.js} +1 -0
- package/dist/{protocol-QBCYO4GI.js → protocol-U6Z4MJ5S.js} +1 -0
- package/dist/{serve-boot-NMLVGJS3.js → serve-boot-3GJ3IFKW.js} +4 -3
- package/dist/{server-FPDS4CT5.js → server-3SSY4JV7.js} +3 -2
- package/package.json +4 -1
- package/skills/conveyor-prune/SKILL.md +1 -1
- package/dist/chunk-IA45XHOA.js +0 -141
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
spawnOptionsFingerprint,
|
|
32
32
|
transcriptSize,
|
|
33
33
|
turnOptionsFrom
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-76JCOHPE.js";
|
|
35
35
|
import {
|
|
36
36
|
AGENT_STATUS_REASON_USER_QUESTION,
|
|
37
37
|
AgentConnection,
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
subProjectScopePaths,
|
|
100
100
|
updateRemoteToken,
|
|
101
101
|
verifyGitCredential
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-K2PCYBXI.js";
|
|
103
103
|
import {
|
|
104
104
|
reportBootMilestone
|
|
105
105
|
} from "./chunk-VIUZS7V4.js";
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
import {
|
|
119
119
|
LoopLagMonitor,
|
|
120
120
|
loopStatusForRunnerStatus
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-MILKMRPU.js";
|
|
122
122
|
import {
|
|
123
123
|
getWorkbenchClient
|
|
124
124
|
} from "./chunk-SQM2BQ7H.js";
|
|
@@ -8172,7 +8172,7 @@ var attachmentTags = f.optional(
|
|
|
8172
8172
|
);
|
|
8173
8173
|
var attachmentShowcase = f.optional(
|
|
8174
8174
|
f.boolean({
|
|
8175
|
-
desc: "Mark this file as a showcase: the finished result of the card. Showcase files render first with a thumbnail on the card, are what a tag gallery shows, always post to chat, get a long-lived link, are kept past the 90-day purge, and are appended to the PR body under '## Showcase'. Use it for the final capture, not for scoping or before shots."
|
|
8175
|
+
desc: "Mark this file as a showcase: the finished result of the card. Showcase files render first with a thumbnail on the card, are what a tag gallery shows, always post to chat, get a long-lived link, are kept past the 90-day purge, and are appended to the PR body under '## Showcase' when Conveyor opens the PR (add them yourself to a PR that is already open). Use it for the final capture, not for scoping or before shots."
|
|
8176
8176
|
})
|
|
8177
8177
|
);
|
|
8178
8178
|
var attachmentSupersedes = f.optional(
|
|
@@ -16542,6 +16542,14 @@ var SessionRunner = class _SessionRunner {
|
|
|
16542
16542
|
projectName: ctx.projectName ?? null,
|
|
16543
16543
|
projectDescription: ctx.projectDescription ?? null,
|
|
16544
16544
|
siteAssetTargetsConfigured: ctx.siteAssetTargetsConfigured ?? false,
|
|
16545
|
+
// Each gate fails closed: a flag the server did not send hides its tools.
|
|
16546
|
+
googleDriveConnected: ctx.googleDriveConnected ?? false,
|
|
16547
|
+
googleDriveFolderName: ctx.googleDriveFolderName ?? null,
|
|
16548
|
+
chatChannelsConfigured: ctx.chatChannelsConfigured ?? false,
|
|
16549
|
+
meetingsAvailable: ctx.meetingsAvailable ?? false,
|
|
16550
|
+
googleAnalyticsConfigured: ctx.googleAnalyticsConfigured ?? false,
|
|
16551
|
+
gcpLogsConfigured: ctx.gcpLogsConfigured ?? false,
|
|
16552
|
+
grafanaLogsConfigured: ctx.grafanaLogsConfigured ?? false,
|
|
16545
16553
|
githubPRUrl: ctx.githubPRUrl,
|
|
16546
16554
|
claudeSessionId: ctx.claudeSessionId ?? null,
|
|
16547
16555
|
lastSeenMessageId: ctx.lastSeenMessageId ?? null,
|
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
WorkspaceCommandSupervisor,
|
|
8
8
|
startWorkspaceCommandsAfterConnect,
|
|
9
9
|
stopWorkspaceCommands
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VVDV5P5Y.js";
|
|
11
11
|
import {
|
|
12
12
|
PtyHarness,
|
|
13
13
|
SessionRunner,
|
|
@@ -25,12 +25,12 @@ import {
|
|
|
25
25
|
resolveTuiKindFromEnv,
|
|
26
26
|
sampleKeyUsage,
|
|
27
27
|
usesNativeUsageReporting
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-NLVZSOKK.js";
|
|
29
29
|
import "./chunk-V5WR2F2P.js";
|
|
30
30
|
import {
|
|
31
31
|
inheritedEnv,
|
|
32
32
|
resolvePtySpawn
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-76JCOHPE.js";
|
|
34
34
|
import {
|
|
35
35
|
AgentConnection,
|
|
36
36
|
DEFAULT_LIFECYCLE_CONFIG,
|
|
@@ -41,14 +41,15 @@ import {
|
|
|
41
41
|
createServiceLogger,
|
|
42
42
|
loadAndAnnotateDiscoveredPorts,
|
|
43
43
|
loadConveyorConfig
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-K2PCYBXI.js";
|
|
45
45
|
import "./chunk-VIUZS7V4.js";
|
|
46
46
|
import "./chunk-W4LZ7R6Z.js";
|
|
47
47
|
import "./chunk-372R6E4C.js";
|
|
48
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-MILKMRPU.js";
|
|
49
49
|
import "./chunk-SQM2BQ7H.js";
|
|
50
50
|
import "./chunk-KMB3BU4S.js";
|
|
51
51
|
import "./chunk-6Q6LQBWO.js";
|
|
52
|
+
import "./chunk-JSBRDJBE.js";
|
|
52
53
|
|
|
53
54
|
// src/cli.ts
|
|
54
55
|
import { readFileSync } from "fs";
|
|
@@ -1186,7 +1187,7 @@ function wireSpawnChildren(mode, connection, supervisors, logger7) {
|
|
|
1186
1187
|
|
|
1187
1188
|
// src/cli.ts
|
|
1188
1189
|
if (process.argv[2] === "boot") {
|
|
1189
|
-
const { runBoot } = await import("./boot-
|
|
1190
|
+
const { runBoot } = await import("./boot-3FWYGHSN.js");
|
|
1190
1191
|
process.exit(await runBoot(process.argv.slice(3)));
|
|
1191
1192
|
}
|
|
1192
1193
|
if (isLegacyEntrypointLaunch(process.env)) {
|
|
@@ -1255,9 +1256,9 @@ process.on("unhandledRejection", (reason) => {
|
|
|
1255
1256
|
process.exit(1);
|
|
1256
1257
|
});
|
|
1257
1258
|
if (process.env.CONVEYOR_MODE === "workbench") {
|
|
1258
|
-
const { startWorkbenchServer } = await import("./server-
|
|
1259
|
-
const { oomWatchdogOptionsFromEnv } = await import("./oom-watchdog-
|
|
1260
|
-
const { DEFAULT_WORKBENCH_PORT } = await import("./protocol-
|
|
1259
|
+
const { startWorkbenchServer } = await import("./server-3SSY4JV7.js");
|
|
1260
|
+
const { oomWatchdogOptionsFromEnv } = await import("./oom-watchdog-YQYPVUKH.js");
|
|
1261
|
+
const { DEFAULT_WORKBENCH_PORT } = await import("./protocol-U6Z4MJ5S.js");
|
|
1261
1262
|
const port = Number(process.env.CONVEYOR_WORKBENCH_PORT) || DEFAULT_WORKBENCH_PORT;
|
|
1262
1263
|
const token = process.env.CONVEYOR_WORKBENCH_TOKEN ?? process.env.POD_BOOTSTRAP_TOKEN ?? "";
|
|
1263
1264
|
if (!token) {
|
|
@@ -1397,7 +1398,7 @@ if (!RUNNER_MODES.includes(CONVEYOR_MODE)) {
|
|
|
1397
1398
|
process.exit(1);
|
|
1398
1399
|
}
|
|
1399
1400
|
if (CONVEYOR_MODE === "serving") {
|
|
1400
|
-
const { runServingSession } = await import("./serve-boot-
|
|
1401
|
+
const { runServingSession } = await import("./serve-boot-3GJ3IFKW.js");
|
|
1401
1402
|
exitContext.runnerMode = "serving";
|
|
1402
1403
|
exitContext.sessionId = process.env.CONVEYOR_SESSION_ID ?? exitContext.sessionId;
|
|
1403
1404
|
const outcome = await runServingSession({
|
package/dist/gate-cli.js
CHANGED
package/dist/heartbeat-worker.js
CHANGED
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
callAgentSession,
|
|
3
|
+
createAgentSessionConnection,
|
|
3
4
|
heartbeatStatusFor,
|
|
5
|
+
isConnected,
|
|
4
6
|
lagFromBuffer,
|
|
7
|
+
needsReopen,
|
|
5
8
|
statusFromBuffer
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MILKMRPU.js";
|
|
10
|
+
import "./chunk-JSBRDJBE.js";
|
|
7
11
|
|
|
8
12
|
// src/connection/heartbeat-worker.ts
|
|
9
13
|
import { parentPort, workerData } from "worker_threads";
|
|
10
|
-
import { io } from "socket.io-client";
|
|
11
14
|
var data = workerData;
|
|
12
15
|
var view = new Float64Array(data.sharedBuffer);
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
data.apiUrl,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
var handshake = (taskToken) => ({ taskToken, runnerMode: data.runnerMode });
|
|
17
|
+
var connection = createAgentSessionConnection({
|
|
18
|
+
apiUrl: data.apiUrl,
|
|
19
|
+
auth: handshake(data.taskToken),
|
|
20
|
+
timeoutMs: data.intervalMs
|
|
21
|
+
});
|
|
18
22
|
parentPort?.on("message", (msg) => {
|
|
19
|
-
if (msg?.taskToken)
|
|
23
|
+
if (msg?.taskToken) connection.setAuth(handshake(msg.taskToken));
|
|
20
24
|
});
|
|
21
|
-
|
|
22
|
-
if (
|
|
23
|
-
socket.connect();
|
|
24
|
-
}
|
|
25
|
+
connection.subscribe(() => {
|
|
26
|
+
if (connection.getState().status === "disconnected") connection.open();
|
|
25
27
|
});
|
|
26
28
|
function beat() {
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
if (needsReopen(connection)) {
|
|
30
|
+
connection.open();
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (!isConnected(connection)) return;
|
|
34
|
+
void callAgentSession(
|
|
35
|
+
connection,
|
|
36
|
+
"heartbeat",
|
|
30
37
|
{
|
|
31
38
|
sessionId: data.sessionId,
|
|
32
39
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -35,10 +42,11 @@ function beat() {
|
|
|
35
42
|
status: heartbeatStatusFor(statusFromBuffer(view)),
|
|
36
43
|
loopLagMs: Math.round(lagFromBuffer(view))
|
|
37
44
|
},
|
|
38
|
-
|
|
45
|
+
{ kind: "mutation" }
|
|
46
|
+
// Answer intentionally ignored: a missed beat self-heals on the next tick,
|
|
39
47
|
// and the worker must never accumulate state or throw.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
);
|
|
48
|
+
).catch(() => {
|
|
49
|
+
});
|
|
43
50
|
}
|
|
51
|
+
connection.open();
|
|
44
52
|
setInterval(beat, data.intervalMs);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _project_shared from '@project/shared';
|
|
2
|
-
import { RunnerMode, AgentSessionServiceMethods,
|
|
2
|
+
import { RunnerMode, AgentSessionServiceMethods, SessionMessagePush, SessionModeChangePush, SessionSpawnReviewPush, SessionSpawnBuilderPush, SessionSpawnTuiPush, PtyChatEventPayload, PtyModelEffortRelay, AgentMode, WorkspaceDiscoveredPort, AgentQuestion, AgentRunnerStatus, SessionPreviewLink } from '@project/shared';
|
|
3
3
|
export * from '@project/shared';
|
|
4
4
|
import { ChildProcess } from 'node:child_process';
|
|
5
5
|
|
|
@@ -19,83 +19,49 @@ interface AgentConnectionConfig {
|
|
|
19
19
|
sessionId: string;
|
|
20
20
|
runnerMode?: RunnerMode;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Delivery hint for the PTY harness: "prefill" parks the message in the
|
|
33
|
-
* Connected-TUI input for a human to review/edit/Enter instead of
|
|
34
|
-
* auto-submitting (set by Refine → Discovery/Review). Absent → submit.
|
|
35
|
-
*/
|
|
36
|
-
delivery?: "prefill";
|
|
37
|
-
}
|
|
38
|
-
interface SetModeData {
|
|
39
|
-
agentMode: AgentMode;
|
|
40
|
-
}
|
|
22
|
+
/**
|
|
23
|
+
* A message for the agent: the `sessionMessage` push. `delivery: "prefill"`
|
|
24
|
+
* parks it in the Connected-TUI input for a human to review/edit/Enter
|
|
25
|
+
* instead of auto-submitting (set by Refine → Discovery/Review).
|
|
26
|
+
*/
|
|
27
|
+
type IncomingMessage = SessionMessagePush;
|
|
28
|
+
/** The `sessionModeChange` push. */
|
|
29
|
+
type SetModeData = SessionModeChangePush;
|
|
30
|
+
/** Never sent by an API that serves protocol 5; `onApiKeyUpdate` keeps its shape. */
|
|
41
31
|
interface ApiKeyUpdateData {
|
|
42
32
|
apiKey: string;
|
|
43
33
|
isSubscription?: boolean;
|
|
44
34
|
}
|
|
45
35
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
36
|
+
* The `sessionSpawnReview` push: spawn a same-pod review child, a second
|
|
37
|
+
* conveyor-agent process bound to a fresh review WorkspaceSession (sessionId +
|
|
38
|
+
* sessionJwt). No taskId on the wire — the child inherits the parent's
|
|
39
|
+
* CONVEYOR_TASK_ID and the server derives it from the JWT.
|
|
50
40
|
*/
|
|
51
|
-
|
|
52
|
-
sessionId: string;
|
|
53
|
-
sessionJwt: string;
|
|
54
|
-
mode: "code-review";
|
|
55
|
-
branch?: string | null;
|
|
56
|
-
prNumber?: number | null;
|
|
57
|
-
checkoutRef?: string | null;
|
|
58
|
-
}
|
|
41
|
+
type SpawnReviewData = SessionSpawnReviewPush;
|
|
59
42
|
/**
|
|
60
|
-
*
|
|
61
|
-
* conveyor-agent process bound to a fresh `mode:"build"`
|
|
62
|
-
* lifecycle handoff — a human pressing Build, or a
|
|
63
|
-
* without cold-booting a second pod, and without
|
|
64
|
-
* session into a builder in place.
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* parent's CONVEYOR_TASK_ID and the server derives it from the JWT), and the
|
|
68
|
-
* runner mode rides the JWT claim rather than this field — `mode` here is what
|
|
69
|
-
* the supervisor exports as CONVEYOR_MODE for the child process.
|
|
43
|
+
* The `sessionSpawnBuilder` push to a PLANNER pod: spawn the Builder child, a
|
|
44
|
+
* second conveyor-agent process bound to a fresh `mode:"build"`
|
|
45
|
+
* WorkspaceSession. The lifecycle handoff — a human pressing Build, or a
|
|
46
|
+
* Yolomatic plan landing — without cold-booting a second pod, and without
|
|
47
|
+
* flipping the planner's own session into a builder in place. `mode` is what
|
|
48
|
+
* the supervisor exports as CONVEYOR_MODE for the child process (`pack` when
|
|
49
|
+
* the card has children).
|
|
70
50
|
*/
|
|
71
|
-
|
|
72
|
-
sessionId: string;
|
|
73
|
-
sessionJwt: string;
|
|
74
|
-
/**
|
|
75
|
-
* Runner mode for the child — `pack` when the card has children, so the
|
|
76
|
-
* pack runner gets the pack prompt and toolset. Optional so a pod
|
|
77
|
-
* running against an older server (which sends none) still boots as `task`.
|
|
78
|
-
*/
|
|
79
|
-
mode?: "task" | "pack";
|
|
80
|
-
branch?: string | null;
|
|
81
|
-
/** The agent whose model/settings/instructions the Builder runs under. */
|
|
82
|
-
agentName?: string | null;
|
|
83
|
-
}
|
|
51
|
+
type SpawnBuilderData = SessionSpawnBuilderPush;
|
|
84
52
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* No taskId on the wire — the child inherits the parent's CONVEYOR_TASK_ID
|
|
89
|
-
* and the server derives it from the JWT.
|
|
53
|
+
* The `sessionSpawnTui` push: spawn an extra interactive child on this pod, a
|
|
54
|
+
* second Claude TUI (mode "adhoc") or a raw login shell (mode "shell"), bound
|
|
55
|
+
* to a fresh WorkspaceSession (sessionId + sessionJwt).
|
|
90
56
|
*/
|
|
91
|
-
|
|
92
|
-
sessionId: string;
|
|
93
|
-
sessionJwt: string;
|
|
94
|
-
mode: "adhoc" | "shell";
|
|
95
|
-
projectId: string;
|
|
96
|
-
}
|
|
57
|
+
type SpawnTuiData = SessionSpawnTuiPush;
|
|
97
58
|
declare class AgentConnection {
|
|
98
|
-
|
|
59
|
+
/** The protocol-5 connection to the API; null before connect() and after disconnect(). */
|
|
60
|
+
private connection;
|
|
61
|
+
/** What connect() listens to on the connection, for disconnect() to stop. */
|
|
62
|
+
private readonly connectionListeners;
|
|
63
|
+
/** Set by the first `qd:hello`: every later one is a new socket in no room. */
|
|
64
|
+
private helloSeen;
|
|
99
65
|
private readonly config;
|
|
100
66
|
private eventBuffer;
|
|
101
67
|
private flushTimer;
|
|
@@ -116,7 +82,6 @@ declare class AgentConnection {
|
|
|
116
82
|
private stopCallback;
|
|
117
83
|
private softStopCallback;
|
|
118
84
|
private modeChangeCallback;
|
|
119
|
-
private apiKeyUpdateCallback;
|
|
120
85
|
private pullBranchCallback;
|
|
121
86
|
private runStartCommandCallback;
|
|
122
87
|
private earlyRunStartCommand;
|
|
@@ -150,24 +115,49 @@ declare class AgentConnection {
|
|
|
150
115
|
private recycleTimer;
|
|
151
116
|
private pendingCalls;
|
|
152
117
|
call<M extends keyof AgentSessionServiceMethods>(method: M, payload: AgentSessionServiceMethods[M]["payload"]): Promise<AgentSessionServiceMethods[M]["response"]>;
|
|
153
|
-
/** (Re)arm the recycle timer — called on every
|
|
118
|
+
/** (Re)arm the recycle timer — called on every `qd:hello`, a fresh socket. */
|
|
154
119
|
private scheduleSocketRecycle;
|
|
155
120
|
private clearSocketRecycle;
|
|
156
121
|
private armRecycleTimer;
|
|
157
122
|
private attemptSocketRecycle;
|
|
158
|
-
/** Resolve once `
|
|
123
|
+
/** Resolve once `connection` reports connected, or reject after `timeoutMs`. */
|
|
159
124
|
private waitForConnected;
|
|
160
|
-
/**
|
|
161
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Call a method and resolve with its data, rejecting when no answer arrives
|
|
127
|
+
* in time. Every AgentSessionServiceMethods response carries data, so an
|
|
128
|
+
* answer without any is a failure, as the 4.x wire's `requireData` was.
|
|
129
|
+
*/
|
|
130
|
+
private callService;
|
|
131
|
+
/**
|
|
132
|
+
* A failed call's error. A method's own refusal passes through as quickdraw
|
|
133
|
+
* sent it (its code and message); a call the transport lost reads as the
|
|
134
|
+
* transient it is, so the model retries the tool instead of giving up.
|
|
135
|
+
*/
|
|
136
|
+
private callError;
|
|
137
|
+
/** The handshake fields: the task token the next (re)connect presents. */
|
|
138
|
+
private handshake;
|
|
162
139
|
connect(): Promise<void>;
|
|
140
|
+
/**
|
|
141
|
+
* Every `qd:hello` is a new socket, in no room. The first is connect()'s
|
|
142
|
+
* own, and the runner joins the session's room with its own connectAgent.
|
|
143
|
+
* After any later one (a dropped transport, the proactive recycle, a new
|
|
144
|
+
* token, a reopen after the server ended the connection) re-join the room
|
|
145
|
+
* and drain what arrived meanwhile.
|
|
146
|
+
*/
|
|
147
|
+
private onHello;
|
|
148
|
+
/** What each session push does. Early-buffered where the push can land before the runner registered. */
|
|
149
|
+
private pushHandlers;
|
|
150
|
+
private controlPushHandlers;
|
|
151
|
+
private spawnPushHandlers;
|
|
152
|
+
private ptyPushHandlers;
|
|
163
153
|
disconnect(): void;
|
|
164
154
|
private static readonly RECONNECT_BASE_DELAY_MS;
|
|
165
155
|
private static readonly RECONNECT_MAX_DELAY_MS;
|
|
166
156
|
private static readonly RECONNECT_STATUS_EVERY_N;
|
|
167
157
|
private isReconnecting;
|
|
168
|
-
private
|
|
158
|
+
private reopening;
|
|
169
159
|
/** Capped exponential backoff (2s, 4s, 8s, 16s, 32s, then 60s steady) shared
|
|
170
|
-
* by both
|
|
160
|
+
* by both loops (the connectAgent re-join and the reopen). */
|
|
171
161
|
private static backoffDelayMs;
|
|
172
162
|
/** Sleep `ms`, unref'd so it never holds the process open on its own. */
|
|
173
163
|
private static delay;
|
|
@@ -180,17 +170,14 @@ declare class AgentConnection {
|
|
|
180
170
|
*/
|
|
181
171
|
onReconnected?: () => void;
|
|
182
172
|
private reconnectToSession;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
private scheduleReconnectAfterServerDisconnect;
|
|
192
|
-
private reconnectAfterServerDisconnect;
|
|
193
|
-
private looksLikeAuthError;
|
|
173
|
+
private scheduleReopen;
|
|
174
|
+
private reopenUntilConnected;
|
|
175
|
+
private tokenSwapPending;
|
|
176
|
+
private tokenSwapTimer;
|
|
177
|
+
/** Present the pending token now unless a call is in flight on a live socket; true when it reconnected. */
|
|
178
|
+
private applyTaskToken;
|
|
179
|
+
private armTokenSwap;
|
|
180
|
+
private clearTokenSwap;
|
|
194
181
|
private startProactiveTokenRefresh;
|
|
195
182
|
private stopProactiveTokenRefresh;
|
|
196
183
|
private drainPendingMessages;
|
|
@@ -198,7 +185,12 @@ declare class AgentConnection {
|
|
|
198
185
|
onStop(callback: () => void): void;
|
|
199
186
|
onSoftStop(callback: () => void): void;
|
|
200
187
|
onModeChange(callback: (data: SetModeData) => void): void;
|
|
201
|
-
|
|
188
|
+
/**
|
|
189
|
+
* No API sends an API-key update (4.x's `agentRunner:updateApiKey` had no
|
|
190
|
+
* sender left), so nothing ever calls `_callback`. Kept for the runner's
|
|
191
|
+
* registration.
|
|
192
|
+
*/
|
|
193
|
+
onApiKeyUpdate(_callback: (data: ApiKeyUpdateData) => void): void;
|
|
202
194
|
onPullBranch(callback: (data: {
|
|
203
195
|
branch: string;
|
|
204
196
|
}) => void): void;
|
|
@@ -409,7 +401,7 @@ declare class AgentConnection {
|
|
|
409
401
|
* Refresh the in-process `CONVEYOR_TASK_TOKEN` from the bootstrap endpoint.
|
|
410
402
|
* Returns true if a new token was applied. Rate-limited locally to once per
|
|
411
403
|
* 60s so a tight auth-rejected loop can't hammer the bootstrap endpoint —
|
|
412
|
-
* the server
|
|
404
|
+
* the server rate-limits the bootstrap route too (`podBootstrapLimiter`).
|
|
413
405
|
*/
|
|
414
406
|
private lastTaskTokenRefreshAt;
|
|
415
407
|
refreshTaskTokenFromBootstrap(): Promise<boolean>;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionRunner,
|
|
3
3
|
unshallowRepo
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NLVZSOKK.js";
|
|
5
5
|
import "./chunk-V5WR2F2P.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-76JCOHPE.js";
|
|
7
7
|
import {
|
|
8
8
|
AgentConnection,
|
|
9
9
|
GIT_TIMEOUT_MS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
stageAndCommit,
|
|
18
18
|
updateRemoteToken,
|
|
19
19
|
workspacePathExists
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-K2PCYBXI.js";
|
|
21
21
|
import "./chunk-VIUZS7V4.js";
|
|
22
22
|
import {
|
|
23
23
|
runAuthTokenCommand,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
runStartCommand
|
|
26
26
|
} from "./chunk-W4LZ7R6Z.js";
|
|
27
27
|
import "./chunk-372R6E4C.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-MILKMRPU.js";
|
|
29
29
|
import {
|
|
30
30
|
getWorkbenchClient
|
|
31
31
|
} from "./chunk-SQM2BQ7H.js";
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
workbenchEnabled
|
|
34
34
|
} from "./chunk-KMB3BU4S.js";
|
|
35
35
|
import "./chunk-6Q6LQBWO.js";
|
|
36
|
+
import "./chunk-JSBRDJBE.js";
|
|
36
37
|
|
|
37
38
|
// src/runner/worktree.ts
|
|
38
39
|
import { execFile } from "child_process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkspaceCommandSupervisor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VVDV5P5Y.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentConnection,
|
|
6
6
|
DEFAULT_LIFECYCLE_CONFIG,
|
|
@@ -11,13 +11,14 @@ import {
|
|
|
11
11
|
ensureOnTaskBranch,
|
|
12
12
|
loadAndAnnotateDiscoveredPorts,
|
|
13
13
|
loadConveyorConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-K2PCYBXI.js";
|
|
15
15
|
import "./chunk-VIUZS7V4.js";
|
|
16
16
|
import "./chunk-W4LZ7R6Z.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-MILKMRPU.js";
|
|
18
18
|
import "./chunk-SQM2BQ7H.js";
|
|
19
19
|
import "./chunk-KMB3BU4S.js";
|
|
20
20
|
import "./chunk-6Q6LQBWO.js";
|
|
21
|
+
import "./chunk-JSBRDJBE.js";
|
|
21
22
|
|
|
22
23
|
// src/runner/serve-session-runner.ts
|
|
23
24
|
var ServeSessionRunner = class {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
startWorkbenchServer
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-MFGRXD4Y.js";
|
|
4
|
+
import "./chunk-76JCOHPE.js";
|
|
5
5
|
import "./chunk-W4LZ7R6Z.js";
|
|
6
6
|
import "./chunk-372R6E4C.js";
|
|
7
7
|
import "./chunk-SQM2BQ7H.js";
|
|
8
8
|
import "./chunk-KMB3BU4S.js";
|
|
9
9
|
import "./chunk-6Q6LQBWO.js";
|
|
10
10
|
import "./chunk-6W6UZ4SJ.js";
|
|
11
|
+
import "./chunk-JSBRDJBE.js";
|
|
11
12
|
export {
|
|
12
13
|
startWorkbenchServer
|
|
13
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rallycry/conveyor-agent",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"description": "Conveyor Agent Runner v10 - PTY harness for the task chat (SDK harness for audit/project-chat). Agent-as-User architecture with BaseService patterns. Works locally too.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -41,11 +41,14 @@
|
|
|
41
41
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
42
42
|
"node-pty": "^1.1.0",
|
|
43
43
|
"socket.io-client": "^4.8.4",
|
|
44
|
+
"socket.io-parser": "^4.2.4",
|
|
44
45
|
"tar": "^7.5.22",
|
|
45
46
|
"zod": "^4.6.5"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
49
|
+
"@fitzzero/quickdraw-core": "^5.1.1",
|
|
48
50
|
"@project/shared": "workspace:*",
|
|
51
|
+
"@tanstack/query-core": "^5.104.0",
|
|
49
52
|
"tsup": "^8.5.1",
|
|
50
53
|
"typescript": "~6.0.3",
|
|
51
54
|
"vitest": "^5.0.2"
|
|
@@ -71,7 +71,7 @@ mutation applied before the reply — is a stalled run, not a paused one.
|
|
|
71
71
|
4. Skip, and list under "deliberately not touched":
|
|
72
72
|
- rows with `parentTaskId` set — prune the pack parent; its children follow
|
|
73
73
|
the parent's disposition;
|
|
74
|
-
- rows with a non-null `workspaceStatus`
|
|
74
|
+
- rows with a non-null `workspaceStatus` — something is running on it;
|
|
75
75
|
- rows with a `githubPRUrl` — work exists; that is a review question, not
|
|
76
76
|
a prune question.
|
|
77
77
|
5. `mcp__conveyor__list_tags` once — the project's vocabulary, and whether a
|