@rallycry/conveyor-agent 10.11.1 → 10.12.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.
|
@@ -2444,7 +2444,17 @@ var PtyChatEventPayloadSchema = z2.discriminatedUnion("kind", [
|
|
|
2444
2444
|
kind: z2.literal("tool_use"),
|
|
2445
2445
|
name: z2.string().max(200),
|
|
2446
2446
|
// Compact preview: JSON.stringify(input) truncated agent-side.
|
|
2447
|
-
input: z2.string().max(2e3)
|
|
2447
|
+
input: z2.string().max(2e3),
|
|
2448
|
+
// Transcript tool_use block id — lets the client pair the tool_result.
|
|
2449
|
+
id: z2.string().max(100).optional()
|
|
2450
|
+
}),
|
|
2451
|
+
z2.object({
|
|
2452
|
+
kind: z2.literal("tool_result"),
|
|
2453
|
+
// tool_use block id this result answers (absent on malformed records).
|
|
2454
|
+
toolUseId: z2.string().max(100).optional(),
|
|
2455
|
+
// Compact output preview, truncated agent-side.
|
|
2456
|
+
output: z2.string().max(2e3),
|
|
2457
|
+
isError: z2.boolean().optional()
|
|
2448
2458
|
}),
|
|
2449
2459
|
z2.object({ kind: z2.literal("turn_end") })
|
|
2450
2460
|
]);
|
|
@@ -2823,7 +2833,9 @@ var UpdateProjectTagRequestSchema = z4.object({
|
|
|
2823
2833
|
var PostToProjectChatRequestSchema = z4.object({
|
|
2824
2834
|
projectId: z4.string(),
|
|
2825
2835
|
content: z4.string().min(1).max(2e4),
|
|
2826
|
-
requestingUserId: z4.string().optional()
|
|
2836
|
+
requestingUserId: z4.string().optional(),
|
|
2837
|
+
/** Marks the post so the server can persist it beyond chat (tag-audit summaries land in tag history). */
|
|
2838
|
+
kind: z4.enum(["tag_audit_summary"]).optional()
|
|
2827
2839
|
});
|
|
2828
2840
|
var StartTagAuditRequestSchema = z4.object({
|
|
2829
2841
|
projectId: z4.string(),
|
|
@@ -2900,6 +2912,9 @@ var TASK_CHAT_HISTORY_LIMIT = 20;
|
|
|
2900
2912
|
var PM_CHAT_HISTORY_LIMIT = 40;
|
|
2901
2913
|
var AGENT_CHAT_HISTORY_FETCH_LIMIT = Math.max(TASK_CHAT_HISTORY_LIMIT, PM_CHAT_HISTORY_LIMIT) + 10;
|
|
2902
2914
|
var PRE_BUILD_TASK_STATUSES = /* @__PURE__ */ new Set(["Planning", "Open"]);
|
|
2915
|
+
function hasTaskPlan(plan) {
|
|
2916
|
+
return !!plan?.trim();
|
|
2917
|
+
}
|
|
2903
2918
|
|
|
2904
2919
|
// src/runner/mode-controller.ts
|
|
2905
2920
|
var ModeController = class {
|
|
@@ -3632,6 +3647,7 @@ function matchUsageLimitBanner(text, now = Date.now()) {
|
|
|
3632
3647
|
// src/harness/pty/chat-record-mapper.ts
|
|
3633
3648
|
var TEXT_MAX = 16e3;
|
|
3634
3649
|
var TOOL_INPUT_MAX = 1900;
|
|
3650
|
+
var TOOL_OUTPUT_MAX = 1900;
|
|
3635
3651
|
function isRecord2(value) {
|
|
3636
3652
|
return typeof value === "object" && value !== null;
|
|
3637
3653
|
}
|
|
@@ -3681,16 +3697,42 @@ function mapAssistant2(record) {
|
|
|
3681
3697
|
const name = stringField2(raw, "name");
|
|
3682
3698
|
if (name) {
|
|
3683
3699
|
const input = "input" in raw ? raw.input : void 0;
|
|
3684
|
-
|
|
3700
|
+
const event = {
|
|
3685
3701
|
kind: "tool_use",
|
|
3686
3702
|
name: truncate(name, 200),
|
|
3687
3703
|
input: JSON.stringify(input ?? {}).slice(0, TOOL_INPUT_MAX)
|
|
3688
|
-
}
|
|
3704
|
+
};
|
|
3705
|
+
const id = stringField2(raw, "id");
|
|
3706
|
+
if (id !== void 0) event.id = id;
|
|
3707
|
+
events.push(event);
|
|
3689
3708
|
}
|
|
3690
3709
|
}
|
|
3691
3710
|
}
|
|
3692
3711
|
return events;
|
|
3693
3712
|
}
|
|
3713
|
+
function toolResultText(block) {
|
|
3714
|
+
const content = block.content;
|
|
3715
|
+
if (typeof content === "string") return content;
|
|
3716
|
+
if (isUnknownArray2(content)) {
|
|
3717
|
+
return content.filter((b) => isRecord2(b) && b.type === "text").map((b) => typeof b.text === "string" ? b.text : "").filter((t) => t.length > 0).join("\n");
|
|
3718
|
+
}
|
|
3719
|
+
return "";
|
|
3720
|
+
}
|
|
3721
|
+
function mapToolResults(content) {
|
|
3722
|
+
const events = [];
|
|
3723
|
+
for (const raw of content) {
|
|
3724
|
+
if (!isRecord2(raw) || raw.type !== "tool_result") continue;
|
|
3725
|
+
const event = {
|
|
3726
|
+
kind: "tool_result",
|
|
3727
|
+
output: truncate(toolResultText(raw), TOOL_OUTPUT_MAX),
|
|
3728
|
+
isError: raw.is_error === true
|
|
3729
|
+
};
|
|
3730
|
+
const toolUseId = stringField2(raw, "tool_use_id");
|
|
3731
|
+
if (toolUseId !== void 0) event.toolUseId = toolUseId;
|
|
3732
|
+
events.push(event);
|
|
3733
|
+
}
|
|
3734
|
+
return events;
|
|
3735
|
+
}
|
|
3694
3736
|
function mapUser(record) {
|
|
3695
3737
|
const message = record.message;
|
|
3696
3738
|
if (!isRecord2(message)) return [];
|
|
@@ -3700,7 +3742,7 @@ function mapUser(record) {
|
|
|
3700
3742
|
text = content;
|
|
3701
3743
|
} else if (isUnknownArray2(content)) {
|
|
3702
3744
|
const hasToolResult = content.some((b) => isRecord2(b) && b.type === "tool_result");
|
|
3703
|
-
if (hasToolResult) return
|
|
3745
|
+
if (hasToolResult) return mapToolResults(content);
|
|
3704
3746
|
text = content.filter((b) => isRecord2(b) && b.type === "text").map((b) => typeof b.text === "string" ? b.text : "").filter((t) => t.length > 0).join("\n");
|
|
3705
3747
|
} else {
|
|
3706
3748
|
return [];
|
|
@@ -10875,7 +10917,7 @@ var SessionRunner = class _SessionRunner {
|
|
|
10875
10917
|
}
|
|
10876
10918
|
this.mode.applyServerMode(this.fullContext?.agentMode, this.fullContext?.isAuto);
|
|
10877
10919
|
this.mode.resolveInitialMode(this.taskContext);
|
|
10878
|
-
if (this.fullContext?.isAuto && PRE_BUILD_TASK_STATUSES.has(this.taskContext.status) && this.mode.isBuildCapable) {
|
|
10920
|
+
if (this.fullContext?.isAuto && PRE_BUILD_TASK_STATUSES.has(this.taskContext.status) && this.mode.isBuildCapable && hasTaskPlan(this.fullContext.plan)) {
|
|
10879
10921
|
void this.connection.triggerIdentification().catch(() => {
|
|
10880
10922
|
});
|
|
10881
10923
|
}
|
|
@@ -11792,4 +11834,4 @@ export {
|
|
|
11792
11834
|
runStartCommand,
|
|
11793
11835
|
unshallowRepo
|
|
11794
11836
|
};
|
|
11795
|
-
//# sourceMappingURL=chunk-
|
|
11837
|
+
//# sourceMappingURL=chunk-K23F674K.js.map
|