xforce 0.1.3 → 0.1.4
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/cli/index.js +2 -38
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +2 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1042,39 +1042,6 @@ var ImplementationPlanSchema = z2.object({
|
|
|
1042
1042
|
implementationSteps: z2.array(ImplementationStepSchema),
|
|
1043
1043
|
estimatedTurns: z2.number().int().positive()
|
|
1044
1044
|
});
|
|
1045
|
-
var PLAN_JSON_SCHEMA = {
|
|
1046
|
-
type: "object",
|
|
1047
|
-
properties: {
|
|
1048
|
-
approach: { type: "string" },
|
|
1049
|
-
filesToModify: { type: "array", items: { type: "string" } },
|
|
1050
|
-
filesToCreate: { type: "array", items: { type: "string" } },
|
|
1051
|
-
estimatedComplexity: { type: "string", enum: ["low", "medium", "high"] },
|
|
1052
|
-
risks: { type: "array", items: { type: "string" } },
|
|
1053
|
-
implementationSteps: {
|
|
1054
|
-
type: "array",
|
|
1055
|
-
items: {
|
|
1056
|
-
type: "object",
|
|
1057
|
-
properties: {
|
|
1058
|
-
order: { type: "number" },
|
|
1059
|
-
description: { type: "string" },
|
|
1060
|
-
files: { type: "array", items: { type: "string" } },
|
|
1061
|
-
rationale: { type: "string" }
|
|
1062
|
-
},
|
|
1063
|
-
required: ["order", "description", "files", "rationale"]
|
|
1064
|
-
}
|
|
1065
|
-
},
|
|
1066
|
-
estimatedTurns: { type: "number" }
|
|
1067
|
-
},
|
|
1068
|
-
required: [
|
|
1069
|
-
"approach",
|
|
1070
|
-
"filesToModify",
|
|
1071
|
-
"filesToCreate",
|
|
1072
|
-
"estimatedComplexity",
|
|
1073
|
-
"risks",
|
|
1074
|
-
"implementationSteps",
|
|
1075
|
-
"estimatedTurns"
|
|
1076
|
-
]
|
|
1077
|
-
};
|
|
1078
1045
|
function extractJSON(text) {
|
|
1079
1046
|
const jsonMatch = text.match(/\{[\s\S]*\}/);
|
|
1080
1047
|
if (jsonMatch) return jsonMatch[0];
|
|
@@ -1108,10 +1075,6 @@ async function runPlanningAgent(params) {
|
|
|
1108
1075
|
permissionMode: "bypassPermissions",
|
|
1109
1076
|
allowDangerouslySkipPermissions: true,
|
|
1110
1077
|
systemPrompt: PLANNER_SYSTEM_PROMPT,
|
|
1111
|
-
outputFormat: {
|
|
1112
|
-
type: "json_schema",
|
|
1113
|
-
schema: PLAN_JSON_SCHEMA
|
|
1114
|
-
},
|
|
1115
1078
|
stderr: (data) => {
|
|
1116
1079
|
stderrOutput += data;
|
|
1117
1080
|
log5.debug({ stderr: data.trimEnd() }, "Agent SDK stderr");
|
|
@@ -1156,7 +1119,8 @@ ${stderrOutput.slice(0, 2e3)}` : "";
|
|
|
1156
1119
|
log5.debug(
|
|
1157
1120
|
{
|
|
1158
1121
|
subtype: resultMessage.subtype,
|
|
1159
|
-
|
|
1122
|
+
numTurns: resultMessage.num_turns,
|
|
1123
|
+
costUsd: resultMessage.total_cost_usd,
|
|
1160
1124
|
hasResult: "result" in resultMessage && !!resultMessage.result,
|
|
1161
1125
|
hasLastAssistant: !!lastAssistantText,
|
|
1162
1126
|
lastAssistantLength: lastAssistantText.length
|