@rallycry/conveyor-agent 7.1.5 → 7.1.7
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-36TKGT6T.js → chunk-N3365TFE.js} +38 -6
- package/dist/chunk-N3365TFE.js.map +1 -0
- package/dist/{chunk-U6AYNVS7.js → chunk-RRXX6DTB.js} +2 -1
- package/dist/chunk-RRXX6DTB.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/dist/{tag-audit-handler-BM6MMS5T.js → tag-audit-handler-WPGSBNXO.js} +2 -2
- package/dist/{task-audit-handler-URD2BOC4.js → task-audit-handler-AOYSFO5B.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-36TKGT6T.js.map +0 -1
- package/dist/chunk-U6AYNVS7.js.map +0 -1
- /package/dist/{tag-audit-handler-BM6MMS5T.js.map → tag-audit-handler-WPGSBNXO.js.map} +0 -0
- /package/dist/{task-audit-handler-URD2BOC4.js.map → task-audit-handler-AOYSFO5B.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
createHarness,
|
|
8
8
|
createServiceLogger,
|
|
9
9
|
defineTool
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RRXX6DTB.js";
|
|
11
11
|
|
|
12
12
|
// src/connection/agent-connection.ts
|
|
13
13
|
import { io } from "socket.io-client";
|
|
@@ -684,7 +684,11 @@ function ensureOnTaskBranch(cwd, taskBranch) {
|
|
|
684
684
|
return false;
|
|
685
685
|
}
|
|
686
686
|
try {
|
|
687
|
-
execSync(`git checkout ${taskBranch}`, {
|
|
687
|
+
execSync(`git checkout -B ${taskBranch} origin/${taskBranch}`, {
|
|
688
|
+
cwd,
|
|
689
|
+
stdio: "ignore",
|
|
690
|
+
timeout: 3e4
|
|
691
|
+
});
|
|
688
692
|
} catch {
|
|
689
693
|
process.stderr.write(`[conveyor-agent] Warning: git checkout ${taskBranch} failed
|
|
690
694
|
`);
|
|
@@ -923,6 +927,9 @@ var PlanSync = class {
|
|
|
923
927
|
}
|
|
924
928
|
};
|
|
925
929
|
|
|
930
|
+
// src/execution/query-executor.ts
|
|
931
|
+
import { createHash } from "crypto";
|
|
932
|
+
|
|
926
933
|
// src/execution/pack-runner-prompt.ts
|
|
927
934
|
function findLastAgentMessageIndex(history) {
|
|
928
935
|
for (let i = history.length - 1; i >= 0; i--) {
|
|
@@ -5018,6 +5025,10 @@ function buildHooks(host) {
|
|
|
5018
5025
|
]
|
|
5019
5026
|
};
|
|
5020
5027
|
}
|
|
5028
|
+
function taskIdToSessionUuid(taskId) {
|
|
5029
|
+
const hash = createHash("sha256").update(taskId).digest("hex");
|
|
5030
|
+
return `${hash.slice(0, 8)}-${hash.slice(8, 12)}-8${hash.slice(13, 16)}-a${hash.slice(17, 20)}-${hash.slice(20, 32)}`;
|
|
5031
|
+
}
|
|
5021
5032
|
function isReadOnlyMode(mode, hasExitedPlanMode) {
|
|
5022
5033
|
return mode === "discovery" || mode === "help" || mode === "auto" && !hasExitedPlanMode;
|
|
5023
5034
|
}
|
|
@@ -5066,6 +5077,7 @@ function buildQueryOptions(host, context) {
|
|
|
5066
5077
|
abortController: host.abortController ?? void 0,
|
|
5067
5078
|
disallowedTools: buildDisallowedTools(settings, mode, host.hasExitedPlanMode),
|
|
5068
5079
|
enableFileCheckpointing: settings.enableFileCheckpointing,
|
|
5080
|
+
sessionId: taskIdToSessionUuid(context.taskId),
|
|
5069
5081
|
stderr: (data) => {
|
|
5070
5082
|
logger2.warn("Claude Code stderr", { data: data.trimEnd() });
|
|
5071
5083
|
}
|
|
@@ -5139,7 +5151,7 @@ async function runSdkQuery(host, context, followUpContent) {
|
|
|
5139
5151
|
host.snapshotPlanFiles();
|
|
5140
5152
|
}
|
|
5141
5153
|
const options = buildQueryOptions(host, context);
|
|
5142
|
-
const resume = context.
|
|
5154
|
+
const resume = taskIdToSessionUuid(context.taskId);
|
|
5143
5155
|
if (followUpContent) {
|
|
5144
5156
|
const prompt = await buildFollowUpPrompt(host, context, followUpContent);
|
|
5145
5157
|
const agentQuery = host.harness.executeQuery({
|
|
@@ -5976,6 +5988,9 @@ var SessionRunner = class _SessionRunner {
|
|
|
5976
5988
|
if (this.fullContext && action.newMode === "review") {
|
|
5977
5989
|
this.fullContext.claudeSessionId = null;
|
|
5978
5990
|
}
|
|
5991
|
+
if (this.fullContext && action.newMode === "building") {
|
|
5992
|
+
void this.refreshBranchForBuilding();
|
|
5993
|
+
}
|
|
5979
5994
|
this.connection.emitModeChanged(action.newMode);
|
|
5980
5995
|
this.softStop();
|
|
5981
5996
|
}
|
|
@@ -5990,6 +6005,23 @@ var SessionRunner = class _SessionRunner {
|
|
|
5990
6005
|
}
|
|
5991
6006
|
});
|
|
5992
6007
|
}
|
|
6008
|
+
/** Re-fetch task context to pick up a newly created branch and check it out. */
|
|
6009
|
+
async refreshBranchForBuilding() {
|
|
6010
|
+
try {
|
|
6011
|
+
const ctx = await this.connection.call("getTaskContext", {
|
|
6012
|
+
sessionId: this.sessionId,
|
|
6013
|
+
includeHistory: false
|
|
6014
|
+
});
|
|
6015
|
+
if (ctx?.githubBranch && this.fullContext) {
|
|
6016
|
+
this.fullContext.githubBranch = ctx.githubBranch;
|
|
6017
|
+
ensureOnTaskBranch(this.config.workspaceDir, ctx.githubBranch);
|
|
6018
|
+
}
|
|
6019
|
+
} catch {
|
|
6020
|
+
process.stderr.write(
|
|
6021
|
+
"[conveyor-agent] Warning: failed to refresh branch for building transition\n"
|
|
6022
|
+
);
|
|
6023
|
+
}
|
|
6024
|
+
}
|
|
5993
6025
|
async setState(status) {
|
|
5994
6026
|
this._state = status;
|
|
5995
6027
|
await this.connection.emitStatus(status);
|
|
@@ -7051,7 +7083,7 @@ var ProjectRunner = class {
|
|
|
7051
7083
|
async handleAuditTags(request) {
|
|
7052
7084
|
this.connection.emitStatus("busy");
|
|
7053
7085
|
try {
|
|
7054
|
-
const { handleTagAudit } = await import("./tag-audit-handler-
|
|
7086
|
+
const { handleTagAudit } = await import("./tag-audit-handler-WPGSBNXO.js");
|
|
7055
7087
|
await handleTagAudit(request, this.connection, this.projectDir);
|
|
7056
7088
|
} catch (error) {
|
|
7057
7089
|
const msg = error instanceof Error ? error.message : String(error);
|
|
@@ -7074,7 +7106,7 @@ var ProjectRunner = class {
|
|
|
7074
7106
|
async handleAuditTasks(request) {
|
|
7075
7107
|
this.connection.emitStatus("busy");
|
|
7076
7108
|
try {
|
|
7077
|
-
const { handleTaskAudit } = await import("./task-audit-handler-
|
|
7109
|
+
const { handleTaskAudit } = await import("./task-audit-handler-AOYSFO5B.js");
|
|
7078
7110
|
await handleTaskAudit(request, this.connection, this.projectDir);
|
|
7079
7111
|
} catch (error) {
|
|
7080
7112
|
const msg = error instanceof Error ? error.message : String(error);
|
|
@@ -7514,4 +7546,4 @@ export {
|
|
|
7514
7546
|
loadForwardPorts,
|
|
7515
7547
|
loadConveyorConfig
|
|
7516
7548
|
};
|
|
7517
|
-
//# sourceMappingURL=chunk-
|
|
7549
|
+
//# sourceMappingURL=chunk-N3365TFE.js.map
|