osagent 0.2.88 → 0.2.89
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/cli.js +21 -9
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -133088,7 +133088,7 @@ var init_geminiContentGenerator = __esm({
|
|
|
133088
133088
|
}
|
|
133089
133089
|
models;
|
|
133090
133090
|
constructor(contentGeneratorConfig, config2) {
|
|
133091
|
-
const version3 = "0.2.
|
|
133091
|
+
const version3 = "0.2.89";
|
|
133092
133092
|
const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
|
|
133093
133093
|
let headers = {
|
|
133094
133094
|
"User-Agent": userAgent2
|
|
@@ -146985,7 +146985,7 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
146985
146985
|
continue;
|
|
146986
146986
|
}
|
|
146987
146987
|
}
|
|
146988
|
-
|
|
146988
|
+
const role = content.role === "model" ? "assistant" : content.role;
|
|
146989
146989
|
if (textContent2 || images.length > 0 || toolCalls.length > 0) {
|
|
146990
146990
|
const message2 = { role, content: textContent2 };
|
|
146991
146991
|
if (images.length > 0) {
|
|
@@ -147009,10 +147009,11 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147009
147009
|
}
|
|
147010
147010
|
if (ollamaResponse.message?.tool_calls) {
|
|
147011
147011
|
for (const toolCall of ollamaResponse.message.tool_calls) {
|
|
147012
|
+
const args = typeof toolCall.function.arguments === "string" ? JSON.parse(toolCall.function.arguments || "{}") : toolCall.function.arguments || {};
|
|
147012
147013
|
parts.push({
|
|
147013
147014
|
functionCall: {
|
|
147014
147015
|
name: toolCall.function.name,
|
|
147015
|
-
args
|
|
147016
|
+
args
|
|
147016
147017
|
}
|
|
147017
147018
|
});
|
|
147018
147019
|
}
|
|
@@ -147053,6 +147054,10 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147053
147054
|
}
|
|
147054
147055
|
}
|
|
147055
147056
|
const ollamaTools = this.convertToolsToOllamaFormat(request4.config);
|
|
147057
|
+
console.error(`[DEBUG] Tools count: ${ollamaTools?.length || 0}`);
|
|
147058
|
+
if (ollamaTools && ollamaTools.length > 0) {
|
|
147059
|
+
console.error(`[DEBUG] Tool names: ${ollamaTools.map((t3) => t3.function.name).join(", ")}`);
|
|
147060
|
+
}
|
|
147056
147061
|
const ollamaRequest = {
|
|
147057
147062
|
model: this.model,
|
|
147058
147063
|
messages,
|
|
@@ -147080,6 +147085,11 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147080
147085
|
throw new Error(`Ollama Cloud API error ${response.status}: ${errorText}`);
|
|
147081
147086
|
}
|
|
147082
147087
|
const ollamaResponse = await response.json();
|
|
147088
|
+
console.error(`[DEBUG] Response message:`, JSON.stringify(ollamaResponse.message, null, 2));
|
|
147089
|
+
console.error(`[DEBUG] Has tool_calls: ${!!ollamaResponse.message?.tool_calls}`);
|
|
147090
|
+
if (ollamaResponse.message?.tool_calls) {
|
|
147091
|
+
console.error(`[DEBUG] Tool calls:`, JSON.stringify(ollamaResponse.message.tool_calls, null, 2));
|
|
147092
|
+
}
|
|
147083
147093
|
const geminiResponse = this.convertToGeminiResponse(ollamaResponse);
|
|
147084
147094
|
if (geminiResponse.usageMetadata?.promptTokenCount !== void 0) {
|
|
147085
147095
|
uiTelemetryService.setLastPromptTokenCount(geminiResponse.usageMetadata.promptTokenCount);
|
|
@@ -147155,10 +147165,11 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147155
147165
|
}
|
|
147156
147166
|
if (chunk.message?.tool_calls) {
|
|
147157
147167
|
for (const toolCall of chunk.message.tool_calls) {
|
|
147168
|
+
const args = typeof toolCall.function.arguments === "string" ? JSON.parse(toolCall.function.arguments || "{}") : toolCall.function.arguments || {};
|
|
147158
147169
|
parts.push({
|
|
147159
147170
|
functionCall: {
|
|
147160
147171
|
name: toolCall.function.name,
|
|
147161
|
-
args
|
|
147172
|
+
args
|
|
147162
147173
|
}
|
|
147163
147174
|
});
|
|
147164
147175
|
}
|
|
@@ -147202,10 +147213,11 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147202
147213
|
}
|
|
147203
147214
|
if (chunk.message?.tool_calls) {
|
|
147204
147215
|
for (const toolCall of chunk.message.tool_calls) {
|
|
147216
|
+
const args = typeof toolCall.function.arguments === "string" ? JSON.parse(toolCall.function.arguments || "{}") : toolCall.function.arguments || {};
|
|
147205
147217
|
parts.push({
|
|
147206
147218
|
functionCall: {
|
|
147207
147219
|
name: toolCall.function.name,
|
|
147208
|
-
args
|
|
147220
|
+
args
|
|
147209
147221
|
}
|
|
147210
147222
|
});
|
|
147211
147223
|
}
|
|
@@ -153384,7 +153396,7 @@ function createContentGeneratorConfig(config2, authType, generationConfig) {
|
|
|
153384
153396
|
};
|
|
153385
153397
|
}
|
|
153386
153398
|
async function createContentGenerator(config2, gcConfig, sessionId2, isInitialAuth) {
|
|
153387
|
-
const version3 = "0.2.
|
|
153399
|
+
const version3 = "0.2.89";
|
|
153388
153400
|
const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
|
|
153389
153401
|
const baseHeaders = {
|
|
153390
153402
|
"User-Agent": userAgent2
|
|
@@ -341285,7 +341297,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
341285
341297
|
// packages/cli/src/utils/version.ts
|
|
341286
341298
|
async function getCliVersion() {
|
|
341287
341299
|
const pkgJson = await getPackageJson();
|
|
341288
|
-
return "0.2.
|
|
341300
|
+
return "0.2.89";
|
|
341289
341301
|
}
|
|
341290
341302
|
__name(getCliVersion, "getCliVersion");
|
|
341291
341303
|
|
|
@@ -341700,8 +341712,8 @@ import { homedir as homedir13, platform as platform14, release as release3, cpus
|
|
|
341700
341712
|
|
|
341701
341713
|
// packages/cli/src/generated/git-commit.ts
|
|
341702
341714
|
init_esbuild_shims();
|
|
341703
|
-
var GIT_COMMIT_INFO2 = "
|
|
341704
|
-
var CLI_VERSION2 = "0.2.
|
|
341715
|
+
var GIT_COMMIT_INFO2 = "57a223a";
|
|
341716
|
+
var CLI_VERSION2 = "0.2.89";
|
|
341705
341717
|
|
|
341706
341718
|
// packages/cli/src/commands/doctor.ts
|
|
341707
341719
|
var C = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "osagent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.89",
|
|
4
4
|
"description": "OS Agent - AI-powered CLI for autonomous coding with Ollama Cloud and Qwen models",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"locales"
|
|
21
21
|
],
|
|
22
22
|
"config": {
|
|
23
|
-
"sandboxImageUri": "ghcr.io/osagent/osagent:0.2.
|
|
23
|
+
"sandboxImageUri": "ghcr.io/osagent/osagent:0.2.89"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"punycode": "^2.3.1"
|