@fatagnus/codebuff 1.0.4 → 1.0.5
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/convex.cjs +8 -10
- package/dist/convex.mjs +8 -10
- package/package.json +2 -5
package/dist/convex.cjs
CHANGED
|
@@ -6948,16 +6948,18 @@ async function run(options) {
|
|
|
6948
6948
|
messageHistoryLength: initialMessages.length
|
|
6949
6949
|
});
|
|
6950
6950
|
}
|
|
6951
|
+
const effectiveAgentDef = agentDefinition ?? {
|
|
6952
|
+
id: agentId,
|
|
6953
|
+
displayName: agentId,
|
|
6954
|
+
systemPrompt: "You are a helpful AI assistant.",
|
|
6955
|
+
toolNames: ["read_files", "end_turn"],
|
|
6956
|
+
model: "anthropic/claude-sonnet-4"
|
|
6957
|
+
};
|
|
6951
6958
|
const result = await executeAgentLoop({
|
|
6952
6959
|
apiKey,
|
|
6953
6960
|
runId,
|
|
6954
6961
|
agentId: mainAgentId,
|
|
6955
|
-
agentDefinition:
|
|
6956
|
-
id: agentId,
|
|
6957
|
-
displayName: agentId,
|
|
6958
|
-
systemPrompt: "You are a helpful AI assistant.",
|
|
6959
|
-
toolNames: ["read_files", "end_turn"]
|
|
6960
|
-
},
|
|
6962
|
+
agentDefinition: effectiveAgentDef,
|
|
6961
6963
|
agentDefinitions,
|
|
6962
6964
|
projectFiles,
|
|
6963
6965
|
maxAgentSteps,
|
|
@@ -6971,10 +6973,6 @@ async function run(options) {
|
|
|
6971
6973
|
logger,
|
|
6972
6974
|
signal
|
|
6973
6975
|
});
|
|
6974
|
-
const allMessages = [...initialMessages.slice(0, -1), ...result.messages];
|
|
6975
|
-
if (initialMessages.length > 0 && result.messages.length === 0) {
|
|
6976
|
-
allMessages.push(...initialMessages);
|
|
6977
|
-
}
|
|
6978
6976
|
sessionState.mainAgentState.messageHistory = result.messages.length > 0 ? result.messages : initialMessages;
|
|
6979
6977
|
sessionState.mainAgentState.creditsUsed = result.creditsUsed;
|
|
6980
6978
|
await finishAgentRun(apiKey, runId, "completed", Math.ceil(result.messages.length / 2), result.creditsUsed, result.creditsUsed, logger);
|
package/dist/convex.mjs
CHANGED
|
@@ -6891,16 +6891,18 @@ async function run(options) {
|
|
|
6891
6891
|
messageHistoryLength: initialMessages.length
|
|
6892
6892
|
});
|
|
6893
6893
|
}
|
|
6894
|
+
const effectiveAgentDef = agentDefinition ?? {
|
|
6895
|
+
id: agentId,
|
|
6896
|
+
displayName: agentId,
|
|
6897
|
+
systemPrompt: "You are a helpful AI assistant.",
|
|
6898
|
+
toolNames: ["read_files", "end_turn"],
|
|
6899
|
+
model: "anthropic/claude-sonnet-4"
|
|
6900
|
+
};
|
|
6894
6901
|
const result = await executeAgentLoop({
|
|
6895
6902
|
apiKey,
|
|
6896
6903
|
runId,
|
|
6897
6904
|
agentId: mainAgentId,
|
|
6898
|
-
agentDefinition:
|
|
6899
|
-
id: agentId,
|
|
6900
|
-
displayName: agentId,
|
|
6901
|
-
systemPrompt: "You are a helpful AI assistant.",
|
|
6902
|
-
toolNames: ["read_files", "end_turn"]
|
|
6903
|
-
},
|
|
6905
|
+
agentDefinition: effectiveAgentDef,
|
|
6904
6906
|
agentDefinitions,
|
|
6905
6907
|
projectFiles,
|
|
6906
6908
|
maxAgentSteps,
|
|
@@ -6914,10 +6916,6 @@ async function run(options) {
|
|
|
6914
6916
|
logger,
|
|
6915
6917
|
signal
|
|
6916
6918
|
});
|
|
6917
|
-
const allMessages = [...initialMessages.slice(0, -1), ...result.messages];
|
|
6918
|
-
if (initialMessages.length > 0 && result.messages.length === 0) {
|
|
6919
|
-
allMessages.push(...initialMessages);
|
|
6920
|
-
}
|
|
6921
6919
|
sessionState.mainAgentState.messageHistory = result.messages.length > 0 ? result.messages : initialMessages;
|
|
6922
6920
|
sessionState.mainAgentState.creditsUsed = result.creditsUsed;
|
|
6923
6921
|
await finishAgentRun(apiKey, runId, "completed", Math.ceil(result.messages.length / 2), result.creditsUsed, result.creditsUsed, logger);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fatagnus/codebuff",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.5",
|
|
5
5
|
"description": "Official SDK for Codebuff — AI coding agent & framework",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"type": "module",
|
|
@@ -72,10 +72,7 @@
|
|
|
72
72
|
"ws": "^8.18.0",
|
|
73
73
|
"zod": "^4.2.1"
|
|
74
74
|
},
|
|
75
|
-
|
|
76
|
-
"@vscode/tree-sitter-wasm": "0.1.4",
|
|
77
|
-
"web-tree-sitter": "0.25.6"
|
|
78
|
-
},
|
|
75
|
+
|
|
79
76
|
"devDependencies": {
|
|
80
77
|
"@types/bun": "^1.3.5",
|
|
81
78
|
"@types/diff": "8.0.0",
|