@rallycry/conveyor-agent 6.0.2 → 6.0.3
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/{chunk-HYWZJYPW.js → chunk-SL5MRNSI.js} +1736 -148
- package/dist/chunk-SL5MRNSI.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +107 -2
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-HYWZJYPW.js.map +0 -1
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SDKUserMessage } from '@anthropic-ai/claude-agent-sdk';
|
|
2
2
|
import * as _project_shared from '@project/shared';
|
|
3
|
-
import { AgentRunnerStatus, MultimodalBlock, ProjectEnvironmentStatus, ChatMessageResponse, TaskFileResponse, TaskContext, AgentEvent, AgentQuestion, IncomingMessagePayload, SetModePayload, AgentMode, SubtaskCreatePayload, SubtaskUpdateFields, SubtaskResponse, StartChildCloudBuildResponse, TaskLookupResponse, UpdateTaskPropertiesPayload, IconListItem, GenerateIconResponse, TaskPropertiesResponse, TriggerIdentificationResponse, ModeTransitionPayload, IncidentDTO, TaskIncidentDTO } from '@project/shared';
|
|
3
|
+
import { AgentRunnerStatus, MultimodalBlock, ProjectEnvironmentStatus, ChatMessageResponse, TaskFileResponse, TaskContext, AgentEvent, AgentQuestion, IncomingMessagePayload, SetModePayload, AgentMode, SubtaskCreatePayload, SubtaskUpdateFields, SubtaskResponse, StartChildCloudBuildResponse, TaskLookupResponse, UpdateTaskPropertiesPayload, IconListItem, GenerateIconResponse, TaskPropertiesResponse, TriggerIdentificationResponse, ModeTransitionPayload, IncidentDTO, TaskIncidentDTO, TagAuditRunnerRequest, TagAuditRunnerResponse, TagAuditProgressActivity } from '@project/shared';
|
|
4
4
|
export { AgentEvent, ChatMessage, TaskContext, TaskFileContext } from '@project/shared';
|
|
5
5
|
import { ChildProcess } from 'node:child_process';
|
|
6
6
|
|
|
@@ -46,6 +46,7 @@ declare class AgentRunner {
|
|
|
46
46
|
private idleCheckInterval;
|
|
47
47
|
private conveyorConfig;
|
|
48
48
|
private _queryHost;
|
|
49
|
+
private tunnelClient;
|
|
49
50
|
constructor(config: AgentRunnerConfig, callbacks: AgentRunnerCallbacks);
|
|
50
51
|
get state(): AgentRunnerStatus;
|
|
51
52
|
private get effectiveAgentMode();
|
|
@@ -57,6 +58,7 @@ declare class AgentRunner {
|
|
|
57
58
|
private tryInitWorktree;
|
|
58
59
|
private fetchAndInitContext;
|
|
59
60
|
private tryPostContextWorktree;
|
|
61
|
+
private startPreviewTunnel;
|
|
60
62
|
private activateWorktree;
|
|
61
63
|
private checkoutWorktreeBranch;
|
|
62
64
|
private needsPRNudge;
|
|
@@ -91,9 +93,12 @@ declare class ProjectRunner {
|
|
|
91
93
|
private heartbeatTimer;
|
|
92
94
|
private stopping;
|
|
93
95
|
private resolveLifecycle;
|
|
96
|
+
private chatSessionIds;
|
|
94
97
|
private startCommandChild;
|
|
95
98
|
private startCommandRunning;
|
|
96
99
|
private setupComplete;
|
|
100
|
+
private branchSwitchCommand;
|
|
101
|
+
private commitWatcher;
|
|
97
102
|
constructor(config: ProjectRunnerConfig);
|
|
98
103
|
private checkoutWorkspaceBranch;
|
|
99
104
|
private executeSetupCommand;
|
|
@@ -101,6 +106,11 @@ declare class ProjectRunner {
|
|
|
101
106
|
killStartCommand(): Promise<void>;
|
|
102
107
|
restartStartCommand(): Promise<void>;
|
|
103
108
|
getEnvironmentStatus(): ProjectEnvironmentStatus;
|
|
109
|
+
private getCurrentBranch;
|
|
110
|
+
private smartSync;
|
|
111
|
+
private handleSwitchBranch;
|
|
112
|
+
private handleSyncEnvironment;
|
|
113
|
+
private handleGetEnvStatus;
|
|
104
114
|
start(): Promise<void>;
|
|
105
115
|
private handleAssignment;
|
|
106
116
|
private handleStopTask;
|
|
@@ -137,6 +147,7 @@ declare class ConveyorConnection {
|
|
|
137
147
|
title: string;
|
|
138
148
|
body: string;
|
|
139
149
|
baseBranch?: string;
|
|
150
|
+
branch?: string;
|
|
140
151
|
}): Promise<{
|
|
141
152
|
url: string;
|
|
142
153
|
number: number;
|
|
@@ -200,6 +211,7 @@ declare class ConveyorConnection {
|
|
|
200
211
|
generateTaskIcon(prompt: string, aspectRatio?: "auto" | "portrait" | "landscape" | "square"): Promise<GenerateIconResponse>;
|
|
201
212
|
getTaskProperties(): Promise<TaskPropertiesResponse>;
|
|
202
213
|
triggerIdentification(): Promise<TriggerIdentificationResponse>;
|
|
214
|
+
refreshAuthToken(): Promise<boolean>;
|
|
203
215
|
emitModeTransition(payload: ModeTransitionPayload): void;
|
|
204
216
|
searchIncidents(status?: string, source?: string): Promise<IncidentDTO[]>;
|
|
205
217
|
getTaskIncidents(taskId?: string): Promise<TaskIncidentDTO[]>;
|
|
@@ -210,6 +222,7 @@ interface ProjectConnectionConfig {
|
|
|
210
222
|
apiUrl: string;
|
|
211
223
|
projectToken: string;
|
|
212
224
|
projectId: string;
|
|
225
|
+
projectDir?: string;
|
|
213
226
|
}
|
|
214
227
|
interface TaskAssignment {
|
|
215
228
|
taskId: string;
|
|
@@ -225,6 +238,7 @@ interface TaskAssignment {
|
|
|
225
238
|
interface IncomingChatMessage {
|
|
226
239
|
content: string;
|
|
227
240
|
userId: string;
|
|
241
|
+
chatId?: string;
|
|
228
242
|
files?: {
|
|
229
243
|
id: string;
|
|
230
244
|
fileName: string;
|
|
@@ -249,7 +263,22 @@ interface AgentContext {
|
|
|
249
263
|
agentInstructions: string;
|
|
250
264
|
model: string;
|
|
251
265
|
agentSettings: Record<string, unknown> | null;
|
|
266
|
+
branchSwitchCommand?: string;
|
|
252
267
|
}
|
|
268
|
+
type SwitchBranchCallback = (res: {
|
|
269
|
+
ok: boolean;
|
|
270
|
+
data?: _project_shared.ProjectEnvironmentStatus;
|
|
271
|
+
error?: string;
|
|
272
|
+
}) => void;
|
|
273
|
+
type SyncEnvironmentCallback = (res: {
|
|
274
|
+
ok: boolean;
|
|
275
|
+
data?: _project_shared.ProjectEnvironmentStatus;
|
|
276
|
+
error?: string;
|
|
277
|
+
}) => void;
|
|
278
|
+
type GetEnvStatusCallback = (res: {
|
|
279
|
+
ok: boolean;
|
|
280
|
+
data?: _project_shared.ProjectEnvironmentStatus;
|
|
281
|
+
}) => void;
|
|
253
282
|
declare class ProjectConnection {
|
|
254
283
|
private socket;
|
|
255
284
|
private config;
|
|
@@ -258,6 +287,17 @@ declare class ProjectConnection {
|
|
|
258
287
|
private shutdownCallback;
|
|
259
288
|
private chatMessageCallback;
|
|
260
289
|
private earlyChatMessages;
|
|
290
|
+
private auditRequestCallback;
|
|
291
|
+
onSwitchBranch: ((data: {
|
|
292
|
+
branch: string;
|
|
293
|
+
syncAfter?: boolean;
|
|
294
|
+
}, cb: SwitchBranchCallback) => void) | null;
|
|
295
|
+
onSyncEnvironment: ((cb: SyncEnvironmentCallback) => void) | null;
|
|
296
|
+
onGetEnvStatus: ((cb: GetEnvStatusCallback) => void) | null;
|
|
297
|
+
onRestartStartCommand: ((cb: (res: {
|
|
298
|
+
ok: boolean;
|
|
299
|
+
error?: string;
|
|
300
|
+
}) => void) => void) | null;
|
|
261
301
|
constructor(config: ProjectConnectionConfig);
|
|
262
302
|
connect(): Promise<void>;
|
|
263
303
|
onTaskAssignment(callback: (assignment: TaskAssignment) => void): void;
|
|
@@ -266,6 +306,12 @@ declare class ProjectConnection {
|
|
|
266
306
|
}) => void): void;
|
|
267
307
|
onShutdown(callback: () => void): void;
|
|
268
308
|
onChatMessage(callback: (msg: IncomingChatMessage) => void): void;
|
|
309
|
+
onAuditRequest(callback: (request: TagAuditRunnerRequest) => void): void;
|
|
310
|
+
emitAuditResult(data: TagAuditRunnerResponse): void;
|
|
311
|
+
emitAuditProgress(data: {
|
|
312
|
+
requestId: string;
|
|
313
|
+
activity: TagAuditProgressActivity;
|
|
314
|
+
}): void;
|
|
269
315
|
sendHeartbeat(): void;
|
|
270
316
|
emitTaskStarted(taskId: string): void;
|
|
271
317
|
emitTaskStopped(taskId: string, reason: string): void;
|
|
@@ -273,11 +319,70 @@ declare class ProjectConnection {
|
|
|
273
319
|
emitChatMessage(content: string): Promise<void>;
|
|
274
320
|
emitAgentStatus(status: string): void;
|
|
275
321
|
fetchAgentContext(): Promise<AgentContext | null>;
|
|
276
|
-
fetchChatHistory(limit?: number): Promise<ChatHistoryMessage[]>;
|
|
322
|
+
fetchChatHistory(limit?: number, chatId?: string): Promise<ChatHistoryMessage[]>;
|
|
323
|
+
requestListTasks(params: {
|
|
324
|
+
status?: string;
|
|
325
|
+
assigneeId?: string;
|
|
326
|
+
limit?: number;
|
|
327
|
+
}): Promise<unknown[]>;
|
|
328
|
+
requestGetTask(taskId: string): Promise<unknown>;
|
|
329
|
+
requestCreateTask(params: {
|
|
330
|
+
title: string;
|
|
331
|
+
description?: string;
|
|
332
|
+
plan?: string;
|
|
333
|
+
status?: string;
|
|
334
|
+
isBug?: boolean;
|
|
335
|
+
}): Promise<{
|
|
336
|
+
id: string;
|
|
337
|
+
slug: string;
|
|
338
|
+
}>;
|
|
339
|
+
requestUpdateTask(params: {
|
|
340
|
+
taskId: string;
|
|
341
|
+
title?: string;
|
|
342
|
+
description?: string;
|
|
343
|
+
plan?: string;
|
|
344
|
+
status?: string;
|
|
345
|
+
assignedUserId?: string | null;
|
|
346
|
+
}): Promise<unknown>;
|
|
347
|
+
requestSearchTasks(params: {
|
|
348
|
+
tagNames?: string[];
|
|
349
|
+
searchQuery?: string;
|
|
350
|
+
statusFilters?: string[];
|
|
351
|
+
limit?: number;
|
|
352
|
+
}): Promise<unknown[]>;
|
|
353
|
+
requestListTags(): Promise<unknown[]>;
|
|
354
|
+
requestGetProjectSummary(): Promise<unknown>;
|
|
355
|
+
private requestWithCallback;
|
|
356
|
+
emitNewCommitsDetected(data: {
|
|
357
|
+
branch: string;
|
|
358
|
+
commitCount: number;
|
|
359
|
+
latestCommit: {
|
|
360
|
+
sha: string;
|
|
361
|
+
message: string;
|
|
362
|
+
author: string;
|
|
363
|
+
};
|
|
364
|
+
autoSyncing: boolean;
|
|
365
|
+
}): void;
|
|
366
|
+
emitEnvironmentReady(data: {
|
|
367
|
+
branch: string;
|
|
368
|
+
commitsSynced: number;
|
|
369
|
+
syncDurationMs: number;
|
|
370
|
+
stepsRun: string[];
|
|
371
|
+
}): void;
|
|
372
|
+
emitEnvSwitchProgress(data: {
|
|
373
|
+
step: string;
|
|
374
|
+
status: "running" | "success" | "error";
|
|
375
|
+
message?: string;
|
|
376
|
+
}): void;
|
|
377
|
+
private handleRunAuthTokenCommand;
|
|
277
378
|
disconnect(): void;
|
|
278
379
|
}
|
|
279
380
|
|
|
280
381
|
declare function ensureWorktree(projectDir: string, taskId: string, branch?: string): string;
|
|
382
|
+
/**
|
|
383
|
+
* Force-remove is intentional: this runs after task completion or explicit stop.
|
|
384
|
+
* Any uncommitted changes at this point are scratch artifacts, not valuable work.
|
|
385
|
+
*/
|
|
281
386
|
declare function removeWorktree(projectDir: string, taskId: string): void;
|
|
282
387
|
|
|
283
388
|
interface CacheEntry {
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rallycry/conveyor-agent",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "Conveyor cloud build agent runner - executes task plans inside GitHub Codespaces",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"typecheck": "tsgo --noEmit"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@anthropic-ai/claude-agent-sdk": "^0.2.
|
|
36
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.89",
|
|
37
37
|
"socket.io-client": "^4.7.4",
|
|
38
38
|
"winston": "^3.11.0",
|
|
39
39
|
"zod": "^3.25.76"
|