osagent 0.2.87 → 0.2.88
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.js → cli.js} +99 -10
- package/package.json +14 -134
- package/dist/LICENSE +0 -73
- package/dist/README.md +0 -437
- package/dist/package.json +0 -40
- /package/{dist/locales → locales}/en.js +0 -0
- /package/{dist/locales → locales}/zh.js +0 -0
- /package/{dist/sandbox-macos-permissive-closed.sb → sandbox-macos-permissive-closed.sb} +0 -0
- /package/{dist/sandbox-macos-permissive-open.sb → sandbox-macos-permissive-open.sb} +0 -0
- /package/{dist/sandbox-macos-permissive-proxied.sb → sandbox-macos-permissive-proxied.sb} +0 -0
- /package/{dist/sandbox-macos-restrictive-closed.sb → sandbox-macos-restrictive-closed.sb} +0 -0
- /package/{dist/sandbox-macos-restrictive-open.sb → sandbox-macos-restrictive-open.sb} +0 -0
- /package/{dist/sandbox-macos-restrictive-proxied.sb → sandbox-macos-restrictive-proxied.sb} +0 -0
- /package/{dist/vendor → vendor}/ripgrep/COPYING +0 -0
- /package/{dist/vendor → vendor}/ripgrep/arm64-darwin/rg +0 -0
- /package/{dist/vendor → vendor}/ripgrep/arm64-linux/rg +0 -0
- /package/{dist/vendor → vendor}/ripgrep/x64-darwin/rg +0 -0
- /package/{dist/vendor → vendor}/ripgrep/x64-linux/rg +0 -0
- /package/{dist/vendor → vendor}/ripgrep/x64-win32/rg.exe +0 -0
package/{dist/cli.js → cli.js}
RENAMED
|
@@ -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.88";
|
|
133092
133092
|
const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
|
|
133093
133093
|
let headers = {
|
|
133094
133094
|
"User-Agent": userAgent2
|
|
@@ -146930,27 +146930,70 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
146930
146930
|
"User-Agent": `OSAgent/${version3} (${process.platform}; ${process.arch})`
|
|
146931
146931
|
};
|
|
146932
146932
|
}
|
|
146933
|
+
/**
|
|
146934
|
+
* Convert Gemini tools to Ollama format
|
|
146935
|
+
*/
|
|
146936
|
+
convertToolsToOllamaFormat(tools) {
|
|
146937
|
+
if (!tools?.tools)
|
|
146938
|
+
return void 0;
|
|
146939
|
+
const ollamaTools = [];
|
|
146940
|
+
for (const tool of tools.tools) {
|
|
146941
|
+
if ("functionDeclarations" in tool && tool.functionDeclarations) {
|
|
146942
|
+
for (const func of tool.functionDeclarations) {
|
|
146943
|
+
ollamaTools.push({
|
|
146944
|
+
type: "function",
|
|
146945
|
+
function: {
|
|
146946
|
+
name: func.name || "",
|
|
146947
|
+
description: func.description || "",
|
|
146948
|
+
parameters: func.parametersJsonSchema || {}
|
|
146949
|
+
}
|
|
146950
|
+
});
|
|
146951
|
+
}
|
|
146952
|
+
}
|
|
146953
|
+
}
|
|
146954
|
+
return ollamaTools.length > 0 ? ollamaTools : void 0;
|
|
146955
|
+
}
|
|
146933
146956
|
/**
|
|
146934
146957
|
* Convert Gemini-format content to Ollama messages
|
|
146935
146958
|
*/
|
|
146936
146959
|
convertToOllamaMessages(contents) {
|
|
146937
146960
|
const messages = [];
|
|
146938
146961
|
for (const content of contents) {
|
|
146939
|
-
const role = content.role === "model" ? "assistant" : content.role;
|
|
146940
146962
|
let textContent2 = "";
|
|
146941
146963
|
const images = [];
|
|
146964
|
+
const toolCalls = [];
|
|
146942
146965
|
for (const part of content.parts || []) {
|
|
146943
146966
|
if ("text" in part && part.text) {
|
|
146944
146967
|
textContent2 += part.text;
|
|
146945
146968
|
} else if ("inlineData" in part && part.inlineData?.data) {
|
|
146946
146969
|
images.push(part.inlineData.data);
|
|
146970
|
+
} else if ("functionCall" in part && part.functionCall) {
|
|
146971
|
+
toolCalls.push({
|
|
146972
|
+
id: `call_${Date.now()}_${Math.random().toString(36).substring(7)}`,
|
|
146973
|
+
type: "function",
|
|
146974
|
+
function: {
|
|
146975
|
+
name: part.functionCall.name || "",
|
|
146976
|
+
arguments: JSON.stringify(part.functionCall.args || {})
|
|
146977
|
+
}
|
|
146978
|
+
});
|
|
146979
|
+
} else if ("functionResponse" in part && part.functionResponse) {
|
|
146980
|
+
messages.push({
|
|
146981
|
+
role: "tool",
|
|
146982
|
+
content: JSON.stringify(part.functionResponse.response),
|
|
146983
|
+
tool_call_id: part.functionResponse.name || ""
|
|
146984
|
+
});
|
|
146985
|
+
continue;
|
|
146947
146986
|
}
|
|
146948
146987
|
}
|
|
146949
|
-
|
|
146988
|
+
let role = content.role === "model" ? "assistant" : content.role;
|
|
146989
|
+
if (textContent2 || images.length > 0 || toolCalls.length > 0) {
|
|
146950
146990
|
const message2 = { role, content: textContent2 };
|
|
146951
146991
|
if (images.length > 0) {
|
|
146952
146992
|
message2.images = images;
|
|
146953
146993
|
}
|
|
146994
|
+
if (toolCalls.length > 0) {
|
|
146995
|
+
message2.tool_calls = toolCalls;
|
|
146996
|
+
}
|
|
146954
146997
|
messages.push(message2);
|
|
146955
146998
|
}
|
|
146956
146999
|
}
|
|
@@ -146964,6 +147007,20 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
146964
147007
|
if (ollamaResponse.message?.content) {
|
|
146965
147008
|
parts.push({ text: ollamaResponse.message.content });
|
|
146966
147009
|
}
|
|
147010
|
+
if (ollamaResponse.message?.tool_calls) {
|
|
147011
|
+
for (const toolCall of ollamaResponse.message.tool_calls) {
|
|
147012
|
+
parts.push({
|
|
147013
|
+
functionCall: {
|
|
147014
|
+
name: toolCall.function.name,
|
|
147015
|
+
args: JSON.parse(toolCall.function.arguments || "{}")
|
|
147016
|
+
}
|
|
147017
|
+
});
|
|
147018
|
+
}
|
|
147019
|
+
}
|
|
147020
|
+
let finishReason;
|
|
147021
|
+
if (ollamaResponse.done) {
|
|
147022
|
+
finishReason = ollamaResponse.message?.tool_calls?.length ? "TOOL_CALLS" : "STOP";
|
|
147023
|
+
}
|
|
146967
147024
|
return {
|
|
146968
147025
|
candidates: [
|
|
146969
147026
|
{
|
|
@@ -146971,7 +147028,7 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
146971
147028
|
role: "model",
|
|
146972
147029
|
parts
|
|
146973
147030
|
},
|
|
146974
|
-
finishReason
|
|
147031
|
+
finishReason,
|
|
146975
147032
|
index: 0
|
|
146976
147033
|
}
|
|
146977
147034
|
],
|
|
@@ -146995,10 +147052,12 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
146995
147052
|
messages.unshift({ role: "system", content: systemText });
|
|
146996
147053
|
}
|
|
146997
147054
|
}
|
|
147055
|
+
const ollamaTools = this.convertToolsToOllamaFormat(request4.config);
|
|
146998
147056
|
const ollamaRequest = {
|
|
146999
147057
|
model: this.model,
|
|
147000
147058
|
messages,
|
|
147001
147059
|
stream: false,
|
|
147060
|
+
tools: ollamaTools,
|
|
147002
147061
|
options: {
|
|
147003
147062
|
temperature: request4.config?.temperature,
|
|
147004
147063
|
top_p: request4.config?.topP,
|
|
@@ -147047,10 +147106,12 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147047
147106
|
messages.unshift({ role: "system", content: systemText });
|
|
147048
147107
|
}
|
|
147049
147108
|
}
|
|
147109
|
+
const ollamaTools = this.convertToolsToOllamaFormat(request4.config);
|
|
147050
147110
|
const ollamaRequest = {
|
|
147051
147111
|
model: this.model,
|
|
147052
147112
|
messages,
|
|
147053
147113
|
stream: true,
|
|
147114
|
+
tools: ollamaTools,
|
|
147054
147115
|
options: {
|
|
147055
147116
|
temperature: request4.config?.temperature,
|
|
147056
147117
|
top_p: request4.config?.topP,
|
|
@@ -147092,6 +147153,20 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147092
147153
|
if (chunk.message?.content) {
|
|
147093
147154
|
parts.push({ text: chunk.message.content });
|
|
147094
147155
|
}
|
|
147156
|
+
if (chunk.message?.tool_calls) {
|
|
147157
|
+
for (const toolCall of chunk.message.tool_calls) {
|
|
147158
|
+
parts.push({
|
|
147159
|
+
functionCall: {
|
|
147160
|
+
name: toolCall.function.name,
|
|
147161
|
+
args: JSON.parse(toolCall.function.arguments || "{}")
|
|
147162
|
+
}
|
|
147163
|
+
});
|
|
147164
|
+
}
|
|
147165
|
+
}
|
|
147166
|
+
let finishReason;
|
|
147167
|
+
if (chunk.done) {
|
|
147168
|
+
finishReason = chunk.message?.tool_calls?.length ? "TOOL_CALLS" : "STOP";
|
|
147169
|
+
}
|
|
147095
147170
|
const geminiChunk = {
|
|
147096
147171
|
candidates: [
|
|
147097
147172
|
{
|
|
@@ -147099,7 +147174,7 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147099
147174
|
role: "model",
|
|
147100
147175
|
parts
|
|
147101
147176
|
},
|
|
147102
|
-
finishReason
|
|
147177
|
+
finishReason,
|
|
147103
147178
|
index: 0
|
|
147104
147179
|
}
|
|
147105
147180
|
],
|
|
@@ -147125,6 +147200,20 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147125
147200
|
if (chunk.message?.content) {
|
|
147126
147201
|
parts.push({ text: chunk.message.content });
|
|
147127
147202
|
}
|
|
147203
|
+
if (chunk.message?.tool_calls) {
|
|
147204
|
+
for (const toolCall of chunk.message.tool_calls) {
|
|
147205
|
+
parts.push({
|
|
147206
|
+
functionCall: {
|
|
147207
|
+
name: toolCall.function.name,
|
|
147208
|
+
args: JSON.parse(toolCall.function.arguments || "{}")
|
|
147209
|
+
}
|
|
147210
|
+
});
|
|
147211
|
+
}
|
|
147212
|
+
}
|
|
147213
|
+
let finishReason;
|
|
147214
|
+
if (chunk.done) {
|
|
147215
|
+
finishReason = chunk.message?.tool_calls?.length ? "TOOL_CALLS" : "STOP";
|
|
147216
|
+
}
|
|
147128
147217
|
yield {
|
|
147129
147218
|
candidates: [
|
|
147130
147219
|
{
|
|
@@ -147132,7 +147221,7 @@ var init_nativeOllamaCloudGenerator = __esm({
|
|
|
147132
147221
|
role: "model",
|
|
147133
147222
|
parts
|
|
147134
147223
|
},
|
|
147135
|
-
finishReason
|
|
147224
|
+
finishReason,
|
|
147136
147225
|
index: 0
|
|
147137
147226
|
}
|
|
147138
147227
|
]
|
|
@@ -153295,7 +153384,7 @@ function createContentGeneratorConfig(config2, authType, generationConfig) {
|
|
|
153295
153384
|
};
|
|
153296
153385
|
}
|
|
153297
153386
|
async function createContentGenerator(config2, gcConfig, sessionId2, isInitialAuth) {
|
|
153298
|
-
const version3 = "0.2.
|
|
153387
|
+
const version3 = "0.2.88";
|
|
153299
153388
|
const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
|
|
153300
153389
|
const baseHeaders = {
|
|
153301
153390
|
"User-Agent": userAgent2
|
|
@@ -341196,7 +341285,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
341196
341285
|
// packages/cli/src/utils/version.ts
|
|
341197
341286
|
async function getCliVersion() {
|
|
341198
341287
|
const pkgJson = await getPackageJson();
|
|
341199
|
-
return "0.2.
|
|
341288
|
+
return "0.2.88";
|
|
341200
341289
|
}
|
|
341201
341290
|
__name(getCliVersion, "getCliVersion");
|
|
341202
341291
|
|
|
@@ -341611,8 +341700,8 @@ import { homedir as homedir13, platform as platform14, release as release3, cpus
|
|
|
341611
341700
|
|
|
341612
341701
|
// packages/cli/src/generated/git-commit.ts
|
|
341613
341702
|
init_esbuild_shims();
|
|
341614
|
-
var GIT_COMMIT_INFO2 = "
|
|
341615
|
-
var CLI_VERSION2 = "0.2.
|
|
341703
|
+
var GIT_COMMIT_INFO2 = "719f0f9";
|
|
341704
|
+
var CLI_VERSION2 = "0.2.88";
|
|
341616
341705
|
|
|
341617
341706
|
// packages/cli/src/commands/doctor.ts
|
|
341618
341707
|
var C = {
|
package/package.json
CHANGED
|
@@ -1,138 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "osagent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.88",
|
|
4
4
|
"description": "OS Agent - AI-powered CLI for autonomous coding with Ollama Cloud and Qwen models",
|
|
5
|
-
"author": "Roberto Luna",
|
|
6
|
-
"license": "Apache-2.0",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"ai",
|
|
9
|
-
"cli",
|
|
10
|
-
"agent",
|
|
11
|
-
"ollama",
|
|
12
|
-
"qwen",
|
|
13
|
-
"coding",
|
|
14
|
-
"terminal",
|
|
15
|
-
"autonomous"
|
|
16
|
-
],
|
|
17
|
-
"homepage": "https://github.com/robertohluna/osagent#readme",
|
|
18
|
-
"bugs": {
|
|
19
|
-
"url": "https://github.com/robertohluna/osagent/issues"
|
|
20
|
-
},
|
|
21
|
-
"engines": {
|
|
22
|
-
"node": ">=20.0.0"
|
|
23
|
-
},
|
|
24
|
-
"type": "module",
|
|
25
|
-
"workspaces": [
|
|
26
|
-
"packages/cli",
|
|
27
|
-
"packages/core",
|
|
28
|
-
"packages/test-utils",
|
|
29
|
-
"packages/vscode-ide-companion"
|
|
30
|
-
],
|
|
31
5
|
"repository": {
|
|
32
6
|
"type": "git",
|
|
33
7
|
"url": "git+https://github.com/robertohluna/osagent.git"
|
|
34
8
|
},
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"start": "cross-env node scripts/start.js",
|
|
40
|
-
"debug": "cross-env DEBUG=1 node --inspect-brk scripts/start.js",
|
|
41
|
-
"auth:npm": "npx OSAgent-artifactregistry-auth",
|
|
42
|
-
"auth:docker": "gcloud auth configure-docker us-west1-docker.pkg.dev",
|
|
43
|
-
"auth": "npm run auth:npm && npm run auth:docker",
|
|
44
|
-
"generate": "node scripts/generate-git-commit-info.js",
|
|
45
|
-
"build": "node scripts/build.js",
|
|
46
|
-
"build-and-start": "npm run build && npm run start",
|
|
47
|
-
"build:vscode": "node scripts/build_vscode_companion.js",
|
|
48
|
-
"build:all": "npm run build && npm run build:sandbox && npm run build:vscode",
|
|
49
|
-
"build:packages": "npm run build --workspaces",
|
|
50
|
-
"build:sandbox": "node scripts/build_sandbox.js",
|
|
51
|
-
"bundle": "npm run generate && node esbuild.config.js && node scripts/copy_bundle_assets.js",
|
|
52
|
-
"test": "npm run test --workspaces --if-present --parallel",
|
|
53
|
-
"test:ci": "npm run test:ci --workspaces --if-present --parallel && npm run test:scripts",
|
|
54
|
-
"test:scripts": "vitest run --config ./scripts/tests/vitest.config.ts",
|
|
55
|
-
"test:e2e": "cross-env VERBOSE=true KEEP_OUTPUT=true npm run test:integration:sandbox:none",
|
|
56
|
-
"test:integration:all": "npm run test:integration:sandbox:none && npm run test:integration:sandbox:docker && npm run test:integration:sandbox:podman",
|
|
57
|
-
"test:integration:sandbox:none": "cross-env OSA_SANDBOX=false vitest run --root ./integration-tests",
|
|
58
|
-
"test:integration:sandbox:docker": "cross-env OSA_SANDBOX=docker npm run build:sandbox && OSA_SANDBOX=docker vitest run --root ./integration-tests",
|
|
59
|
-
"test:integration:sandbox:podman": "cross-env OSA_SANDBOX=podman vitest run --root ./integration-tests",
|
|
60
|
-
"test:terminal-bench": "cross-env VERBOSE=true KEEP_OUTPUT=true vitest run --config ./vitest.terminal-bench.config.ts --root ./integration-tests",
|
|
61
|
-
"test:terminal-bench:oracle": "cross-env VERBOSE=true KEEP_OUTPUT=true vitest run --config ./vitest.terminal-bench.config.ts --root ./integration-tests -t 'oracle'",
|
|
62
|
-
"test:terminal-bench:OSA": "cross-env VERBOSE=true KEEP_OUTPUT=true vitest run --config ./vitest.terminal-bench.config.ts --root ./integration-tests -t 'OSA'",
|
|
63
|
-
"lint": "eslint . --ext .ts,.tsx && eslint integration-tests",
|
|
64
|
-
"lint:fix": "eslint . --fix && eslint integration-tests --fix",
|
|
65
|
-
"lint:ci": "eslint . --ext .ts,.tsx --max-warnings 0 && eslint integration-tests --max-warnings 0",
|
|
66
|
-
"lint:all": "node scripts/lint.js",
|
|
67
|
-
"format": "prettier --experimental-cli --write .",
|
|
68
|
-
"typecheck": "npm run typecheck --workspaces --if-present",
|
|
69
|
-
"check-i18n": "npm run check-i18n --workspace=packages/cli",
|
|
70
|
-
"preflight": "npm run clean && npm ci && npm run format && npm run lint:ci && npm run build && npm run typecheck && npm run test:ci",
|
|
71
|
-
"prepare:package": "node scripts/prepare-package.js",
|
|
72
|
-
"publish:npm": "cd dist && npm publish --access public",
|
|
73
|
-
"release:version": "node scripts/version.js",
|
|
74
|
-
"telemetry": "node scripts/telemetry.js",
|
|
75
|
-
"check:lockfile": "node scripts/check-lockfile.js",
|
|
76
|
-
"clean": "node scripts/clean.js",
|
|
77
|
-
"pre-commit": "node scripts/pre-commit.js"
|
|
78
|
-
},
|
|
79
|
-
"overrides": {
|
|
80
|
-
"wrap-ansi": "9.0.2",
|
|
81
|
-
"ansi-regex": "5.0.1",
|
|
82
|
-
"cliui": {
|
|
83
|
-
"wrap-ansi": "7.0.0"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"main": "cli.js",
|
|
86
11
|
"bin": {
|
|
87
|
-
"osagent": "
|
|
12
|
+
"osagent": "cli.js"
|
|
88
13
|
},
|
|
89
14
|
"files": [
|
|
90
|
-
"
|
|
15
|
+
"cli.js",
|
|
16
|
+
"vendor",
|
|
17
|
+
"*.sb",
|
|
91
18
|
"README.md",
|
|
92
|
-
"LICENSE"
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"locales"
|
|
93
21
|
],
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"@types/mime-types": "^3.0.1",
|
|
97
|
-
"@types/minimatch": "^5.1.2",
|
|
98
|
-
"@types/mock-fs": "^4.13.4",
|
|
99
|
-
"@types/qrcode-terminal": "^0.12.2",
|
|
100
|
-
"@types/shell-quote": "^1.7.5",
|
|
101
|
-
"@types/uuid": "^10.0.0",
|
|
102
|
-
"@vitest/coverage-v8": "^3.1.1",
|
|
103
|
-
"@vitest/eslint-plugin": "^1.3.4",
|
|
104
|
-
"cross-env": "^7.0.3",
|
|
105
|
-
"esbuild": "^0.25.0",
|
|
106
|
-
"eslint": "^9.24.0",
|
|
107
|
-
"eslint-config-prettier": "^10.1.2",
|
|
108
|
-
"eslint-plugin-import": "^2.31.0",
|
|
109
|
-
"eslint-plugin-license-header": "^0.8.0",
|
|
110
|
-
"eslint-plugin-react": "^7.37.5",
|
|
111
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
112
|
-
"glob": "^10.4.5",
|
|
113
|
-
"globals": "^16.0.0",
|
|
114
|
-
"google-artifactregistry-auth": "^3.4.0",
|
|
115
|
-
"husky": "^9.1.7",
|
|
116
|
-
"json": "^11.0.0",
|
|
117
|
-
"lint-staged": "^16.1.6",
|
|
118
|
-
"memfs": "^4.42.0",
|
|
119
|
-
"mnemonist": "^0.40.3",
|
|
120
|
-
"mock-fs": "^5.5.0",
|
|
121
|
-
"msw": "^2.10.4",
|
|
122
|
-
"npm-run-all": "^4.1.5",
|
|
123
|
-
"prettier": "^3.5.3",
|
|
124
|
-
"react-devtools-core": "^4.28.5",
|
|
125
|
-
"semver": "^7.7.2",
|
|
126
|
-
"strip-ansi": "^7.1.2",
|
|
127
|
-
"tsx": "^4.20.3",
|
|
128
|
-
"typescript-eslint": "^8.30.1",
|
|
129
|
-
"vitest": "^3.2.4",
|
|
130
|
-
"yargs": "^17.7.2"
|
|
22
|
+
"config": {
|
|
23
|
+
"sandboxImageUri": "ghcr.io/osagent/osagent:0.2.88"
|
|
131
24
|
},
|
|
132
25
|
"dependencies": {
|
|
133
|
-
"
|
|
134
|
-
"punycode": "^2.3.1",
|
|
135
|
-
"simple-git": "^3.28.0"
|
|
26
|
+
"punycode": "^2.3.1"
|
|
136
27
|
},
|
|
137
28
|
"optionalDependencies": {
|
|
138
29
|
"@lydell/node-pty": "1.1.0",
|
|
@@ -141,20 +32,9 @@
|
|
|
141
32
|
"@lydell/node-pty-linux-x64": "1.1.0",
|
|
142
33
|
"@lydell/node-pty-win32-arm64": "1.1.0",
|
|
143
34
|
"@lydell/node-pty-win32-x64": "1.1.0",
|
|
144
|
-
"@osagent/ripgrep-darwin-arm64": "0.1.0",
|
|
145
|
-
"@osagent/ripgrep-darwin-x64": "0.1.0",
|
|
146
|
-
"@osagent/ripgrep-linux-arm64": "0.1.0",
|
|
147
|
-
"@osagent/ripgrep-linux-x64": "0.1.0",
|
|
148
|
-
"@osagent/ripgrep-win32-x64": "0.1.0",
|
|
149
35
|
"node-pty": "^1.0.0"
|
|
150
36
|
},
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"prettier --write",
|
|
154
|
-
"eslint --fix --max-warnings 0"
|
|
155
|
-
],
|
|
156
|
-
"*.{json,md}": [
|
|
157
|
-
"prettier --write"
|
|
158
|
-
]
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=20.0.0"
|
|
159
39
|
}
|
|
160
40
|
}
|
package/dist/LICENSE
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
-
|
|
11
|
-
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
-
|
|
13
|
-
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
14
|
-
|
|
15
|
-
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
-
|
|
17
|
-
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
-
|
|
19
|
-
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
-
|
|
21
|
-
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
22
|
-
|
|
23
|
-
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
-
|
|
25
|
-
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
26
|
-
|
|
27
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
-
|
|
29
|
-
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
30
|
-
|
|
31
|
-
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
32
|
-
|
|
33
|
-
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
34
|
-
|
|
35
|
-
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
36
|
-
|
|
37
|
-
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
38
|
-
|
|
39
|
-
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
40
|
-
|
|
41
|
-
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
42
|
-
|
|
43
|
-
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
-
|
|
45
|
-
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
-
|
|
47
|
-
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
-
|
|
49
|
-
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
-
|
|
51
|
-
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
-
|
|
53
|
-
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
-
|
|
55
|
-
END OF TERMS AND CONDITIONS
|
|
56
|
-
|
|
57
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
58
|
-
|
|
59
|
-
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
|
60
|
-
|
|
61
|
-
Copyright 2025 OSA
|
|
62
|
-
|
|
63
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
64
|
-
you may not use this file except in compliance with the License.
|
|
65
|
-
You may obtain a copy of the License at
|
|
66
|
-
|
|
67
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
68
|
-
|
|
69
|
-
Unless required by applicable law or agreed to in writing, software
|
|
70
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
71
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
72
|
-
See the License for the specific language governing permissions and
|
|
73
|
-
limitations under the License.
|
package/dist/README.md
DELETED
|
@@ -1,437 +0,0 @@
|
|
|
1
|
-
# osagent
|
|
2
|
-
|
|
3
|
-
An AI-powered autonomous coding assistant CLI that runs locally with Ollama or connects to cloud AI providers. Built for developers who want full control over their AI coding assistant.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- **Smart Onboarding**: Auto-detects your system, tools, and project on first run
|
|
8
|
-
- **Local-first AI**: Works with Ollama for completely private, offline usage
|
|
9
|
-
- **Cloud support**: Connect to Ollama Cloud or OpenAI-compatible APIs
|
|
10
|
-
- **Interactive CLI**: Beautiful terminal interface with monochrome green theme
|
|
11
|
-
- **Autonomous coding**: Generate, edit, and refactor code with natural language
|
|
12
|
-
- **Multi-file editing**: Make changes across your entire project
|
|
13
|
-
- **Git integration**: Automatic commits and PR creation
|
|
14
|
-
- **Consultation mode**: AI asks clarifying questions to better understand your needs
|
|
15
|
-
- **Conversation persistence**: Resume previous sessions with `/continue`
|
|
16
|
-
- **System health checks**: Built-in diagnostics with `/doctor`
|
|
17
|
-
- **Extensible**: MCP (Model Context Protocol) support for custom tools
|
|
18
|
-
- **Custom agents**: Define your own specialized agents in `~/.osagent/agents/`
|
|
19
|
-
- **Custom commands**: Create custom slash commands in `~/.osagent/commands/`
|
|
20
|
-
- **Custom skills**: Create skill plugins for multi-step workflows
|
|
21
|
-
- **Multi-agent orchestration**: Automatic skill detection and agent dispatch
|
|
22
|
-
- **Episodic memory**: Session tracking and learning from past interactions
|
|
23
|
-
- **Vector memory**: Semantic search over session history with ChromaDB
|
|
24
|
-
- **Embeddings**: Ollama embeddings with OpenRouter fallback
|
|
25
|
-
- **Advanced hooks**: 12 subagent hooks for lifecycle, memory, and skill events
|
|
26
|
-
|
|
27
|
-
## Installation
|
|
28
|
-
|
|
29
|
-
### From npm (recommended)
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npm install -g osagent
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### From source
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
git clone https://github.com/robertohluna/osagent.git
|
|
39
|
-
cd osagent
|
|
40
|
-
npm install
|
|
41
|
-
npm run build
|
|
42
|
-
npm link
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Troubleshooting Installation
|
|
46
|
-
|
|
47
|
-
**Never use `sudo` with npm!** Using `sudo npm install -g` creates permission problems.
|
|
48
|
-
|
|
49
|
-
If you see permission errors:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
# Fix npm cache permissions
|
|
53
|
-
sudo chown -R $(whoami) ~/.npm
|
|
54
|
-
|
|
55
|
-
# If using nvm, also fix nvm directory
|
|
56
|
-
sudo chown -R $(whoami) ~/.nvm
|
|
57
|
-
|
|
58
|
-
# Clear npm cache
|
|
59
|
-
npm cache clean --force
|
|
60
|
-
|
|
61
|
-
# Now install without sudo
|
|
62
|
-
npm install -g osagent
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
If updates don't take effect (old version showing):
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
npm cache clean --force
|
|
69
|
-
npm install -g osagent@latest --force
|
|
70
|
-
osagent --version
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**Recommended: Use nvm** to avoid permission issues entirely:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
# Install nvm
|
|
77
|
-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
|
|
78
|
-
|
|
79
|
-
# Restart terminal, then:
|
|
80
|
-
nvm install 20
|
|
81
|
-
nvm use 20
|
|
82
|
-
|
|
83
|
-
# Now npm never needs sudo
|
|
84
|
-
npm install -g osagent
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Quick Start
|
|
88
|
-
|
|
89
|
-
### Option 1: Use with Ollama (Local - Recommended)
|
|
90
|
-
|
|
91
|
-
1. Install [Ollama](https://ollama.com)
|
|
92
|
-
2. Pull a coding model:
|
|
93
|
-
```bash
|
|
94
|
-
ollama pull qwen2.5-coder:32b
|
|
95
|
-
```
|
|
96
|
-
3. Run osagent:
|
|
97
|
-
```bash
|
|
98
|
-
osagent
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Option 2: Use with Ollama Cloud
|
|
102
|
-
|
|
103
|
-
1. Get an API key from [Ollama Cloud](https://ollama.com)
|
|
104
|
-
2. Set your API key:
|
|
105
|
-
```bash
|
|
106
|
-
export OLLAMA_API_KEY=your-api-key
|
|
107
|
-
```
|
|
108
|
-
3. Run osagent:
|
|
109
|
-
```bash
|
|
110
|
-
osagent
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Option 3: Use with Anthropic
|
|
114
|
-
|
|
115
|
-
1. Get an API key from [Anthropic Console](https://console.anthropic.com/settings/keys)
|
|
116
|
-
2. Set your API key:
|
|
117
|
-
```bash
|
|
118
|
-
export ANTHROPIC_API_KEY=your-api-key
|
|
119
|
-
```
|
|
120
|
-
3. Run osagent:
|
|
121
|
-
```bash
|
|
122
|
-
osagent --auth anthropic
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Option 4: Use with GROQ
|
|
126
|
-
|
|
127
|
-
1. Get an API key from [GROQ Console](https://console.groq.com)
|
|
128
|
-
2. Set your API key:
|
|
129
|
-
```bash
|
|
130
|
-
export GROQ_API_KEY=your-api-key
|
|
131
|
-
```
|
|
132
|
-
3. Run osagent:
|
|
133
|
-
```bash
|
|
134
|
-
osagent --auth groq
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Option 5: Use with OpenAI-compatible APIs
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
osagent --auth openai
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## Usage
|
|
144
|
-
|
|
145
|
-
### Basic Commands
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
# Start interactive mode
|
|
149
|
-
osagent
|
|
150
|
-
|
|
151
|
-
# Start with a prompt
|
|
152
|
-
osagent "Explain this codebase"
|
|
153
|
-
|
|
154
|
-
# Use a specific model
|
|
155
|
-
osagent --model qwen2.5-coder:32b
|
|
156
|
-
|
|
157
|
-
# Resume last conversation
|
|
158
|
-
osagent --continue
|
|
159
|
-
|
|
160
|
-
# Print a file and ask about it
|
|
161
|
-
osagent "What does this do?" < src/main.ts
|
|
162
|
-
|
|
163
|
-
# Run health check
|
|
164
|
-
osagent doctor
|
|
165
|
-
|
|
166
|
-
# Dangerous mode (auto-accept all tool executions)
|
|
167
|
-
osagent --dangerously
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### Slash Commands
|
|
171
|
-
|
|
172
|
-
Once in the interactive mode, you can use these commands:
|
|
173
|
-
|
|
174
|
-
#### General
|
|
175
|
-
|
|
176
|
-
- `/help` - Show available commands
|
|
177
|
-
- `/about` - Show version and system info
|
|
178
|
-
- `/settings` - View and edit settings
|
|
179
|
-
- `/quit` or `/q` - Exit osagent
|
|
180
|
-
|
|
181
|
-
#### Model & AI
|
|
182
|
-
|
|
183
|
-
- `/model` - Switch AI model (opens model selector)
|
|
184
|
-
- `/model list` - List available models for current provider
|
|
185
|
-
- `/model info` - Show current model details
|
|
186
|
-
- `/model <id>` - Switch to a specific model
|
|
187
|
-
- `/provider` - Switch AI provider (Ollama, Anthropic, GROQ, OpenAI)
|
|
188
|
-
- `/agents` - Manage custom agents
|
|
189
|
-
- `/consult` - Manage consultation mode (AI asks clarifying questions)
|
|
190
|
-
|
|
191
|
-
#### Conversation
|
|
192
|
-
|
|
193
|
-
- `/continue` - Resume the most recent conversation
|
|
194
|
-
- `/continue list` - List recent sessions to resume
|
|
195
|
-
- `/reset` - Clear conversation and start fresh
|
|
196
|
-
- `/clear` - Clear the screen
|
|
197
|
-
- `/chat save <tag>` - Save conversation checkpoint
|
|
198
|
-
- `/chat resume <tag>` - Resume from checkpoint
|
|
199
|
-
|
|
200
|
-
#### Safety & Permissions
|
|
201
|
-
|
|
202
|
-
- `/dangerously` or `/yolo` - Toggle auto-accept mode for tool executions
|
|
203
|
-
- `/permissions` - View and manage tool permissions
|
|
204
|
-
|
|
205
|
-
#### System
|
|
206
|
-
|
|
207
|
-
- `/doctor` - Check system health and updates
|
|
208
|
-
- `/doctor update` - Auto-update to latest version
|
|
209
|
-
- `/doctor init` - Initialize `~/.osagent/` directory structure
|
|
210
|
-
- `/view` - View system architecture and configuration
|
|
211
|
-
- `/view config` - Current configuration
|
|
212
|
-
- `/view files` - Configuration files
|
|
213
|
-
- `/view models` - Supported models
|
|
214
|
-
- `/context` or `/ctx` - View context window usage and token stats
|
|
215
|
-
|
|
216
|
-
#### Utilities
|
|
217
|
-
|
|
218
|
-
- `/copy` - Copy last response to clipboard
|
|
219
|
-
- `/memory` - View and edit project memory
|
|
220
|
-
- `/tools` - List available tools
|
|
221
|
-
- `/mcp` - Manage MCP servers
|
|
222
|
-
|
|
223
|
-
### Status Bar
|
|
224
|
-
|
|
225
|
-
While osagent works, you'll see a real-time status bar showing:
|
|
226
|
-
|
|
227
|
-
- Current activity with spinner
|
|
228
|
-
- Token usage (input ↑ / output ↓)
|
|
229
|
-
- Elapsed time
|
|
230
|
-
- Task progress and list
|
|
231
|
-
|
|
232
|
-
```
|
|
233
|
-
┌─────────────────────────────────────────────────────────┐
|
|
234
|
-
│ ◐ Writing tests for auth module... (2/5) ↑12.3k ↓8.2k 2m 15s │
|
|
235
|
-
│ ├─ ○ Create test file │
|
|
236
|
-
│ ├─ ◐ Writing unit tests │
|
|
237
|
-
│ └─ ○ Run tests and fix errors │
|
|
238
|
-
└─────────────────────────────────────────────────────────┘
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
### Consultation Mode
|
|
242
|
-
|
|
243
|
-
osagent can ask you clarifying questions as it works to better understand your requirements:
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
/consult active # Active mode - questions shown while agent works
|
|
247
|
-
/consult blocking # Blocking mode - high-priority questions pause the agent
|
|
248
|
-
/consult status # Show current consultation mode and stats
|
|
249
|
-
/consult context # View collected context
|
|
250
|
-
/consult clear # Clear collected consultation context
|
|
251
|
-
/consult demo # Run a demonstration of consultation features
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
Consultation is always enabled. Use `/consult active` or `/consult blocking` to switch between modes. Questions appear in a dedicated panel below the status bar during agent operations.
|
|
255
|
-
|
|
256
|
-
### Vector Memory (Optional)
|
|
257
|
-
|
|
258
|
-
For semantic search over session history, start ChromaDB:
|
|
259
|
-
|
|
260
|
-
```bash
|
|
261
|
-
# Start ChromaDB with Docker
|
|
262
|
-
docker compose -f docker/docker-compose.yml up -d
|
|
263
|
-
|
|
264
|
-
# Ensure Ollama has the embedding model
|
|
265
|
-
ollama pull nomic-embed-text
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
### Multi-Agent Orchestration
|
|
269
|
-
|
|
270
|
-
osagent features an intelligent orchestration system that automatically:
|
|
271
|
-
|
|
272
|
-
- **Detects skills** in your prompts (debugging, testing, refactoring, etc.)
|
|
273
|
-
- **Selects the best agent** for each task based on capabilities
|
|
274
|
-
- **Dispatches execution** to specialized subagents
|
|
275
|
-
- **Tracks progress** with real-time status updates
|
|
276
|
-
|
|
277
|
-
The orchestrator runs transparently - just describe what you want and osagent handles the rest.
|
|
278
|
-
|
|
279
|
-
### Episodic Memory
|
|
280
|
-
|
|
281
|
-
osagent learns from your sessions:
|
|
282
|
-
|
|
283
|
-
- **Records episodes** of your interactions automatically
|
|
284
|
-
- **Tracks actions** including tools used and files modified
|
|
285
|
-
- **Saves outcomes** for future reference
|
|
286
|
-
- **Enables recall** of past patterns and solutions
|
|
287
|
-
|
|
288
|
-
Episodes are stored locally in `~/.osagent/episodes/`.
|
|
289
|
-
|
|
290
|
-
### Configuration
|
|
291
|
-
|
|
292
|
-
osagent stores its configuration in `~/.osagent/` (created automatically on first run):
|
|
293
|
-
|
|
294
|
-
```
|
|
295
|
-
~/.osagent/
|
|
296
|
-
├── settings.json # User settings
|
|
297
|
-
├── agents/ # Custom agent definitions (.md, .yaml, .json)
|
|
298
|
-
├── commands/ # Custom slash commands (.toml)
|
|
299
|
-
├── skills/ # Custom skill plugins (.yaml)
|
|
300
|
-
├── prompts/ # Custom prompts
|
|
301
|
-
└── episodes/ # Episodic memory storage
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### Custom Agents
|
|
305
|
-
|
|
306
|
-
Create custom agents in `~/.osagent/agents/`:
|
|
307
|
-
|
|
308
|
-
```yaml
|
|
309
|
-
# ~/.osagent/agents/my-agent.yaml
|
|
310
|
-
name: my-agent
|
|
311
|
-
description: A specialized agent for my use case
|
|
312
|
-
systemPrompt: You are an expert in...
|
|
313
|
-
model: qwen2.5-coder:32b
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
### Project Memory
|
|
317
|
-
|
|
318
|
-
Create an `OSAGENT.md` file in your project root to give osagent context:
|
|
319
|
-
|
|
320
|
-
```bash
|
|
321
|
-
osagent /init
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
## Supported Models
|
|
325
|
-
|
|
326
|
-
### Cloud Models (Ollama Cloud)
|
|
327
|
-
|
|
328
|
-
- `qwen3-coder:480b-cloud` - Most powerful (256K context)
|
|
329
|
-
- `kimi-k2.5:cloud` - High-performance coding model (131K context)
|
|
330
|
-
- `qwen3-coder:30b` - Efficient (30B params, 3.3B active)
|
|
331
|
-
|
|
332
|
-
### GROQ (Fast Inference)
|
|
333
|
-
|
|
334
|
-
- `moonshotai/kimi-k2-instruct-0905` - Best coding model (256K context, ~200 tok/s)
|
|
335
|
-
- `moonshotai/kimi-k2-instruct` - Kimi K2 (256K context)
|
|
336
|
-
- `llama-3.3-70b-versatile` - Versatile general coding
|
|
337
|
-
- `llama-3.1-8b-instant` - Ultra-fast for simple tasks
|
|
338
|
-
|
|
339
|
-
### Anthropic
|
|
340
|
-
|
|
341
|
-
- `claude-opus-4-5-20251101` - Most powerful
|
|
342
|
-
- `claude-sonnet-4-5-20250929` - Best balance (recommended)
|
|
343
|
-
- `claude-haiku-4-5-20251001` - Fastest
|
|
344
|
-
|
|
345
|
-
### Local Models (Ollama)
|
|
346
|
-
|
|
347
|
-
- `qwen2.5-coder:32b` - Best local coding model (~20GB VRAM)
|
|
348
|
-
- `qwen2.5-coder:14b` - Great balance (~10GB VRAM)
|
|
349
|
-
- `qwen2.5-coder:7b` - Good for limited VRAM (~5GB)
|
|
350
|
-
- `codellama:34b` - Meta's coding model
|
|
351
|
-
- `deepseek-coder-v2:16b` - Efficient MoE model
|
|
352
|
-
- `llama3.2:latest` - General purpose
|
|
353
|
-
|
|
354
|
-
## Requirements
|
|
355
|
-
|
|
356
|
-
- Node.js >= 20.0.0
|
|
357
|
-
- Ollama (for local usage) or API key for cloud providers
|
|
358
|
-
|
|
359
|
-
## Development
|
|
360
|
-
|
|
361
|
-
```bash
|
|
362
|
-
# Install dependencies
|
|
363
|
-
npm install
|
|
364
|
-
|
|
365
|
-
# Build all packages
|
|
366
|
-
npm run build
|
|
367
|
-
|
|
368
|
-
# Run in development mode
|
|
369
|
-
npm run start
|
|
370
|
-
|
|
371
|
-
# Run tests
|
|
372
|
-
npm run test
|
|
373
|
-
|
|
374
|
-
# Type check
|
|
375
|
-
npm run typecheck
|
|
376
|
-
|
|
377
|
-
# Lint
|
|
378
|
-
npm run lint
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
## Architecture
|
|
382
|
-
|
|
383
|
-
osagent is a monorepo with the following packages:
|
|
384
|
-
|
|
385
|
-
```
|
|
386
|
-
packages/
|
|
387
|
-
├── cli/ # Terminal UI and user interaction (React/Ink)
|
|
388
|
-
├── core/ # AI engine, tools, and services
|
|
389
|
-
├── test-utils/ # Shared test utilities
|
|
390
|
-
└── vscode-ide-companion/ # VS Code extension
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
## Keyboard Shortcuts
|
|
394
|
-
|
|
395
|
-
### General
|
|
396
|
-
|
|
397
|
-
- `Ctrl+C` - Cancel current operation / Exit (press twice)
|
|
398
|
-
- `Ctrl+D` - Exit
|
|
399
|
-
- `Escape` - Cancel operation / Clear input
|
|
400
|
-
- `Tab` - Autocomplete commands
|
|
401
|
-
- `Up/Down` - Navigate history
|
|
402
|
-
- `?` - Show shortcuts help
|
|
403
|
-
|
|
404
|
-
### During Operations
|
|
405
|
-
|
|
406
|
-
- `Ctrl+O` - Expand/collapse output
|
|
407
|
-
- `Ctrl+Y` - Toggle todo list visibility
|
|
408
|
-
|
|
409
|
-
### Text Editing
|
|
410
|
-
|
|
411
|
-
- `Ctrl+L` - Clear screen
|
|
412
|
-
- `Ctrl+A` - Move to start of line
|
|
413
|
-
- `Ctrl+E` - Move to end of line
|
|
414
|
-
- `Ctrl+K` - Delete to end of line
|
|
415
|
-
- `Ctrl+U` - Delete to start of line
|
|
416
|
-
- `Shift+Enter` - Insert newline
|
|
417
|
-
|
|
418
|
-
## Documentation
|
|
419
|
-
|
|
420
|
-
- [ARCHITECTURE.md](ARCHITECTURE.md) - System architecture, message flow, content generators, and tool system
|
|
421
|
-
- [CHANGELOG.md](CHANGELOG.md) - Full version history and release notes
|
|
422
|
-
- [docs/](docs/) - Detailed documentation on CLI, tools, core APIs, and features
|
|
423
|
-
- [docs/reference/](docs/reference/) - System architecture deep-dive, UI/UX flow, tech stack
|
|
424
|
-
|
|
425
|
-
## License
|
|
426
|
-
|
|
427
|
-
Apache-2.0
|
|
428
|
-
|
|
429
|
-
## Contributing
|
|
430
|
-
|
|
431
|
-
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
|
|
432
|
-
|
|
433
|
-
## Links
|
|
434
|
-
|
|
435
|
-
- [GitHub](https://github.com/robertohluna/osagent)
|
|
436
|
-
- [npm](https://www.npmjs.com/package/osagent)
|
|
437
|
-
- [Issues](https://github.com/robertohluna/osagent/issues)
|
package/dist/package.json
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "osagent",
|
|
3
|
-
"version": "0.2.87",
|
|
4
|
-
"description": "OS Agent - AI-powered CLI for autonomous coding with Ollama Cloud and Qwen models",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/robertohluna/osagent.git"
|
|
8
|
-
},
|
|
9
|
-
"type": "module",
|
|
10
|
-
"main": "cli.js",
|
|
11
|
-
"bin": {
|
|
12
|
-
"osagent": "cli.js"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"cli.js",
|
|
16
|
-
"vendor",
|
|
17
|
-
"*.sb",
|
|
18
|
-
"README.md",
|
|
19
|
-
"LICENSE",
|
|
20
|
-
"locales"
|
|
21
|
-
],
|
|
22
|
-
"config": {
|
|
23
|
-
"sandboxImageUri": "ghcr.io/osagent/osagent:0.2.85"
|
|
24
|
-
},
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"punycode": "^2.3.1"
|
|
27
|
-
},
|
|
28
|
-
"optionalDependencies": {
|
|
29
|
-
"@lydell/node-pty": "1.1.0",
|
|
30
|
-
"@lydell/node-pty-darwin-arm64": "1.1.0",
|
|
31
|
-
"@lydell/node-pty-darwin-x64": "1.1.0",
|
|
32
|
-
"@lydell/node-pty-linux-x64": "1.1.0",
|
|
33
|
-
"@lydell/node-pty-win32-arm64": "1.1.0",
|
|
34
|
-
"@lydell/node-pty-win32-x64": "1.1.0",
|
|
35
|
-
"node-pty": "^1.0.0"
|
|
36
|
-
},
|
|
37
|
-
"engines": {
|
|
38
|
-
"node": ">=20.0.0"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|