@rallycry/conveyor-agent 6.3.0 → 6.4.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/{chunk-WBBX5AIX.js → chunk-VDLO4YL6.js} +125 -9
- package/dist/chunk-VDLO4YL6.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-WBBX5AIX.js.map +0 -1
|
@@ -176,6 +176,15 @@ function createFollowUpTask(socket, data) {
|
|
|
176
176
|
function queryGcpLogs(socket, params) {
|
|
177
177
|
return emitRpc(requireSocket(socket), "agentRunner:queryGcpLogs", params);
|
|
178
178
|
}
|
|
179
|
+
function createSuggestion(socket, data) {
|
|
180
|
+
return emitRpc(requireSocket(socket), "agentRunner:createSuggestion", data);
|
|
181
|
+
}
|
|
182
|
+
function voteSuggestion(socket, suggestionId, value) {
|
|
183
|
+
return emitRpc(requireSocket(socket), "agentRunner:voteSuggestion", { suggestionId, value });
|
|
184
|
+
}
|
|
185
|
+
function getSuggestions(socket, status, limit) {
|
|
186
|
+
return emitRpc(requireSocket(socket), "agentRunner:getSuggestions", { status, limit });
|
|
187
|
+
}
|
|
179
188
|
|
|
180
189
|
// src/connection/task-connection.ts
|
|
181
190
|
var ConveyorConnection = class _ConveyorConnection {
|
|
@@ -245,9 +254,18 @@ var ConveyorConnection = class _ConveyorConnection {
|
|
|
245
254
|
this.chatMessageCallback({ content: "", userId: "system" });
|
|
246
255
|
}
|
|
247
256
|
});
|
|
248
|
-
this.socket.on(
|
|
249
|
-
|
|
250
|
-
|
|
257
|
+
this.socket.on(
|
|
258
|
+
"agentRunner:updateApiKey",
|
|
259
|
+
(data) => {
|
|
260
|
+
if (data.isSubscription) {
|
|
261
|
+
process.env.CLAUDE_CODE_OAUTH_TOKEN = data.apiKey;
|
|
262
|
+
delete process.env.ANTHROPIC_API_KEY;
|
|
263
|
+
} else {
|
|
264
|
+
process.env.ANTHROPIC_API_KEY = data.apiKey;
|
|
265
|
+
delete process.env.CLAUDE_CODE_OAUTH_TOKEN;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
);
|
|
251
269
|
this.socket.on(
|
|
252
270
|
"agentRunner:runAuthTokenCommand",
|
|
253
271
|
(data, cb) => this.handleRunAuthTokenCommand(data.userEmail, cb)
|
|
@@ -539,6 +557,15 @@ var ConveyorConnection = class _ConveyorConnection {
|
|
|
539
557
|
queryGcpLogs(params) {
|
|
540
558
|
return queryGcpLogs(this.socket, params);
|
|
541
559
|
}
|
|
560
|
+
createSuggestion(title, description, tagNames) {
|
|
561
|
+
return createSuggestion(this.socket, { title, description, tagNames });
|
|
562
|
+
}
|
|
563
|
+
voteSuggestion(suggestionId, value) {
|
|
564
|
+
return voteSuggestion(this.socket, suggestionId, value);
|
|
565
|
+
}
|
|
566
|
+
getSuggestions(status, limit) {
|
|
567
|
+
return getSuggestions(this.socket, status, limit);
|
|
568
|
+
}
|
|
542
569
|
disconnect() {
|
|
543
570
|
this.flushEvents();
|
|
544
571
|
if (this.socket) {
|
|
@@ -956,14 +983,14 @@ function pushToOrigin(cwd) {
|
|
|
956
983
|
const currentBranch = getCurrentBranch(cwd);
|
|
957
984
|
if (!currentBranch) return false;
|
|
958
985
|
try {
|
|
959
|
-
execSync2(`git push origin ${currentBranch}`, {
|
|
986
|
+
execSync2(`git push --no-verify origin ${currentBranch}`, {
|
|
960
987
|
cwd,
|
|
961
988
|
stdio: ["ignore", "pipe", "ignore"]
|
|
962
989
|
});
|
|
963
990
|
return true;
|
|
964
991
|
} catch {
|
|
965
992
|
try {
|
|
966
|
-
execSync2(`git push --force-with-lease origin ${currentBranch}`, {
|
|
993
|
+
execSync2(`git push --no-verify --force-with-lease origin ${currentBranch}`, {
|
|
967
994
|
cwd,
|
|
968
995
|
stdio: ["ignore", "pipe", "ignore"]
|
|
969
996
|
});
|
|
@@ -3268,6 +3295,76 @@ function buildGetDependenciesTool(connection) {
|
|
|
3268
3295
|
{ annotations: { readOnlyHint: true } }
|
|
3269
3296
|
);
|
|
3270
3297
|
}
|
|
3298
|
+
function buildCreateSuggestionTool(connection) {
|
|
3299
|
+
return defineTool(
|
|
3300
|
+
"create_suggestion",
|
|
3301
|
+
"Suggest a feature, improvement, or idea for the project. If you want to recommend something \u2014 a document, a rule, a feature, a task, an optimization \u2014 use this tool. If a similar suggestion already exists, your vote will be added to it instead of creating a duplicate.",
|
|
3302
|
+
{
|
|
3303
|
+
title: z.string().describe("Short title for the suggestion"),
|
|
3304
|
+
description: z.string().optional().describe("Details about the suggestion"),
|
|
3305
|
+
tag_names: z.array(z.string()).optional().describe("Tag names to categorize the suggestion")
|
|
3306
|
+
},
|
|
3307
|
+
async ({ title, description, tag_names }) => {
|
|
3308
|
+
try {
|
|
3309
|
+
const result = await connection.createSuggestion(title, description, tag_names);
|
|
3310
|
+
if (result.merged) {
|
|
3311
|
+
return textResult(
|
|
3312
|
+
`Your suggestion was merged into an existing one (ID: ${result.mergedIntoId ?? result.id}). Your upvote has been recorded.`
|
|
3313
|
+
);
|
|
3314
|
+
}
|
|
3315
|
+
return textResult(`Suggestion created (ID: ${result.id}).`);
|
|
3316
|
+
} catch (error) {
|
|
3317
|
+
return textResult(
|
|
3318
|
+
`Failed to create suggestion: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
3319
|
+
);
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
);
|
|
3323
|
+
}
|
|
3324
|
+
function buildVoteSuggestionTool(connection) {
|
|
3325
|
+
return defineTool(
|
|
3326
|
+
"vote_suggestion",
|
|
3327
|
+
"Vote on a project suggestion. Use +1 to upvote or -1 to downvote.",
|
|
3328
|
+
{
|
|
3329
|
+
suggestion_id: z.string().describe("The suggestion ID to vote on"),
|
|
3330
|
+
value: z.number().refine((v) => v === 1 || v === -1, { message: "Value must be 1 or -1" }).describe("+1 to upvote, -1 to downvote")
|
|
3331
|
+
},
|
|
3332
|
+
async ({ suggestion_id, value }) => {
|
|
3333
|
+
try {
|
|
3334
|
+
const result = await connection.voteSuggestion(suggestion_id, value);
|
|
3335
|
+
return textResult(`Vote recorded. Current score: ${result.score}`);
|
|
3336
|
+
} catch (error) {
|
|
3337
|
+
return textResult(
|
|
3338
|
+
`Failed to vote: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
3339
|
+
);
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
);
|
|
3343
|
+
}
|
|
3344
|
+
function buildGetSuggestionsTool(connection) {
|
|
3345
|
+
return defineTool(
|
|
3346
|
+
"get_suggestions",
|
|
3347
|
+
"List project suggestions sorted by vote score. Use this to see what the team thinks is important.",
|
|
3348
|
+
{
|
|
3349
|
+
status: z.string().optional().describe("Filter by status: Open, Accepted, Rejected, Implemented"),
|
|
3350
|
+
limit: z.number().optional().describe("Max results (default 20)")
|
|
3351
|
+
},
|
|
3352
|
+
async ({ status, limit }) => {
|
|
3353
|
+
try {
|
|
3354
|
+
const suggestions = await connection.getSuggestions(status, limit);
|
|
3355
|
+
if (suggestions.length === 0) {
|
|
3356
|
+
return textResult("No suggestions found.");
|
|
3357
|
+
}
|
|
3358
|
+
return textResult(JSON.stringify(suggestions, null, 2));
|
|
3359
|
+
} catch (error) {
|
|
3360
|
+
return textResult(
|
|
3361
|
+
`Failed to get suggestions: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
3362
|
+
);
|
|
3363
|
+
}
|
|
3364
|
+
},
|
|
3365
|
+
{ annotations: { readOnlyHint: true } }
|
|
3366
|
+
);
|
|
3367
|
+
}
|
|
3271
3368
|
function buildCreateFollowUpTaskTool(connection) {
|
|
3272
3369
|
return defineTool(
|
|
3273
3370
|
"create_follow_up_task",
|
|
@@ -3313,7 +3410,10 @@ function buildCommonTools(connection, config) {
|
|
|
3313
3410
|
buildAddDependencyTool(connection),
|
|
3314
3411
|
buildRemoveDependencyTool(connection),
|
|
3315
3412
|
buildGetDependenciesTool(connection),
|
|
3316
|
-
buildCreateFollowUpTaskTool(connection)
|
|
3413
|
+
buildCreateFollowUpTaskTool(connection),
|
|
3414
|
+
buildCreateSuggestionTool(connection),
|
|
3415
|
+
buildVoteSuggestionTool(connection),
|
|
3416
|
+
buildGetSuggestionsTool(connection)
|
|
3317
3417
|
];
|
|
3318
3418
|
if (process.env.CLAUDESPACE_NAME) {
|
|
3319
3419
|
tools.push(buildScaleUpResourcesTool(connection));
|
|
@@ -6052,6 +6152,19 @@ var AgentRunner = class {
|
|
|
6052
6152
|
return;
|
|
6053
6153
|
}
|
|
6054
6154
|
this.conveyorConfig = result.conveyorConfig;
|
|
6155
|
+
} else if (process.env.CLAUDESPACE_NAME) {
|
|
6156
|
+
void runSetupSafe(
|
|
6157
|
+
this.config,
|
|
6158
|
+
this.connection,
|
|
6159
|
+
this.callbacks,
|
|
6160
|
+
this.setupLog,
|
|
6161
|
+
this.effectiveAgentMode,
|
|
6162
|
+
// no-op setState — agent state is managed by the main flow
|
|
6163
|
+
() => Promise.resolve()
|
|
6164
|
+
).then((result) => {
|
|
6165
|
+
if (result.ok) this.conveyorConfig = result.conveyorConfig;
|
|
6166
|
+
}).catch(() => {
|
|
6167
|
+
});
|
|
6055
6168
|
}
|
|
6056
6169
|
this.tryInitWorktree();
|
|
6057
6170
|
if (!await this.fetchAndInitContext()) return;
|
|
@@ -6093,7 +6206,9 @@ var AgentRunner = class {
|
|
|
6093
6206
|
if (builderModel) this.taskContext.model = builderModel;
|
|
6094
6207
|
}
|
|
6095
6208
|
this.logEffectiveSettings();
|
|
6096
|
-
if (process.env.CODESPACES === "true"
|
|
6209
|
+
if (process.env.CODESPACES === "true" || process.env.CLAUDESPACE_NAME) {
|
|
6210
|
+
unshallowRepo(this.config.workspaceDir);
|
|
6211
|
+
}
|
|
6097
6212
|
return true;
|
|
6098
6213
|
}
|
|
6099
6214
|
tryPostContextWorktree() {
|
|
@@ -6425,7 +6540,8 @@ var AgentRunner = class {
|
|
|
6425
6540
|
return;
|
|
6426
6541
|
}
|
|
6427
6542
|
if (newAgentMode !== "auto") return;
|
|
6428
|
-
|
|
6543
|
+
if (!this.taskContext) return;
|
|
6544
|
+
const pastPlanning = this.taskContext.status !== "Planning" && this.taskContext.status !== "Unidentified";
|
|
6429
6545
|
if (pastPlanning) {
|
|
6430
6546
|
this.hasExitedPlanMode = true;
|
|
6431
6547
|
}
|
|
@@ -8017,4 +8133,4 @@ export {
|
|
|
8017
8133
|
ProjectRunner,
|
|
8018
8134
|
FileCache
|
|
8019
8135
|
};
|
|
8020
|
-
//# sourceMappingURL=chunk-
|
|
8136
|
+
//# sourceMappingURL=chunk-VDLO4YL6.js.map
|