osagent 0.2.89 → 0.2.90
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 +17 -18
- 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.90";
|
|
133092
133092
|
const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
|
|
133093
133093
|
let headers = {
|
|
133094
133094
|
"User-Agent": userAgent2
|
|
@@ -146973,13 +146973,13 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
146973
146973
|
type: "function",
|
|
146974
146974
|
function: {
|
|
146975
146975
|
name: part.functionCall.name || "",
|
|
146976
|
-
arguments:
|
|
146976
|
+
arguments: part.functionCall.args || {}
|
|
146977
146977
|
}
|
|
146978
146978
|
});
|
|
146979
146979
|
} else if ("functionResponse" in part && part.functionResponse) {
|
|
146980
146980
|
messages.push({
|
|
146981
146981
|
role: "tool",
|
|
146982
|
-
content: JSON.stringify(part.functionResponse.response),
|
|
146982
|
+
content: typeof part.functionResponse.response === "string" ? part.functionResponse.response : JSON.stringify(part.functionResponse.response),
|
|
146983
146983
|
tool_call_id: part.functionResponse.name || ""
|
|
146984
146984
|
});
|
|
146985
146985
|
continue;
|
|
@@ -147054,10 +147054,6 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147054
147054
|
}
|
|
147055
147055
|
}
|
|
147056
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
|
-
}
|
|
147061
147057
|
const ollamaRequest = {
|
|
147062
147058
|
model: this.model,
|
|
147063
147059
|
messages,
|
|
@@ -147070,13 +147066,16 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147070
147066
|
num_predict: request4.config?.maxOutputTokens
|
|
147071
147067
|
}
|
|
147072
147068
|
};
|
|
147069
|
+
const requestBody = JSON.stringify(ollamaRequest);
|
|
147070
|
+
console.error(`[DEBUG] Request body length: ${requestBody.length}`);
|
|
147071
|
+
console.error(`[DEBUG] Tools in request:`, JSON.stringify(ollamaRequest.tools?.slice(0, 2), null, 2));
|
|
147073
147072
|
const controller = new AbortController();
|
|
147074
147073
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
147075
147074
|
try {
|
|
147076
147075
|
const response = await fetch(this.baseUrl, {
|
|
147077
147076
|
method: "POST",
|
|
147078
147077
|
headers: this.buildHeaders(),
|
|
147079
|
-
body:
|
|
147078
|
+
body: requestBody,
|
|
147080
147079
|
signal: request4.config?.abortSignal || controller.signal
|
|
147081
147080
|
});
|
|
147082
147081
|
clearTimeout(timeoutId);
|
|
@@ -147085,11 +147084,6 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147085
147084
|
throw new Error(`Ollama Cloud API error ${response.status}: ${errorText}`);
|
|
147086
147085
|
}
|
|
147087
147086
|
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
|
-
}
|
|
147093
147087
|
const geminiResponse = this.convertToGeminiResponse(ollamaResponse);
|
|
147094
147088
|
if (geminiResponse.usageMetadata?.promptTokenCount !== void 0) {
|
|
147095
147089
|
uiTelemetryService.setLastPromptTokenCount(geminiResponse.usageMetadata.promptTokenCount);
|
|
@@ -147129,10 +147123,15 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147129
147123
|
num_predict: request4.config?.maxOutputTokens
|
|
147130
147124
|
}
|
|
147131
147125
|
};
|
|
147126
|
+
const requestBody = JSON.stringify(ollamaRequest);
|
|
147127
|
+
console.error(`[DEBUG STREAM] Request body length: ${requestBody.length}`);
|
|
147128
|
+
console.error(`[DEBUG STREAM] Tools count: ${ollamaTools?.length || 0}`);
|
|
147129
|
+
console.error(`[DEBUG STREAM] Messages count: ${messages.length}`);
|
|
147130
|
+
console.error(`[DEBUG STREAM] Messages:`, JSON.stringify(messages, null, 2));
|
|
147132
147131
|
const response = await fetch(this.baseUrl, {
|
|
147133
147132
|
method: "POST",
|
|
147134
147133
|
headers: this.buildHeaders(),
|
|
147135
|
-
body:
|
|
147134
|
+
body: requestBody,
|
|
147136
147135
|
signal: request4.config?.abortSignal
|
|
147137
147136
|
});
|
|
147138
147137
|
if (!response.ok) {
|
|
@@ -153396,7 +153395,7 @@ function createContentGeneratorConfig(config2, authType, generationConfig) {
|
|
|
153396
153395
|
};
|
|
153397
153396
|
}
|
|
153398
153397
|
async function createContentGenerator(config2, gcConfig, sessionId2, isInitialAuth) {
|
|
153399
|
-
const version3 = "0.2.
|
|
153398
|
+
const version3 = "0.2.90";
|
|
153400
153399
|
const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
|
|
153401
153400
|
const baseHeaders = {
|
|
153402
153401
|
"User-Agent": userAgent2
|
|
@@ -341297,7 +341296,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
341297
341296
|
// packages/cli/src/utils/version.ts
|
|
341298
341297
|
async function getCliVersion() {
|
|
341299
341298
|
const pkgJson = await getPackageJson();
|
|
341300
|
-
return "0.2.
|
|
341299
|
+
return "0.2.90";
|
|
341301
341300
|
}
|
|
341302
341301
|
__name(getCliVersion, "getCliVersion");
|
|
341303
341302
|
|
|
@@ -341712,8 +341711,8 @@ import { homedir as homedir13, platform as platform14, release as release3, cpus
|
|
|
341712
341711
|
|
|
341713
341712
|
// packages/cli/src/generated/git-commit.ts
|
|
341714
341713
|
init_esbuild_shims();
|
|
341715
|
-
var GIT_COMMIT_INFO2 = "
|
|
341716
|
-
var CLI_VERSION2 = "0.2.
|
|
341714
|
+
var GIT_COMMIT_INFO2 = "9967a4d";
|
|
341715
|
+
var CLI_VERSION2 = "0.2.90";
|
|
341717
341716
|
|
|
341718
341717
|
// packages/cli/src/commands/doctor.ts
|
|
341719
341718
|
var C = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "osagent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.90",
|
|
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.90"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"punycode": "^2.3.1"
|