osai-agent 4.2.3 → 4.2.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/package.json
CHANGED
package/src/agent/loop/local.js
CHANGED
|
@@ -44,14 +44,15 @@ export default {
|
|
|
44
44
|
? `${this.device.name} (${this.device.ip}:${this.device.port || 22})`
|
|
45
45
|
: '';
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
const systemPrompt = buildSystemPrompt(this._userOS, this.mode, {
|
|
48
|
+
provider: provider.type,
|
|
49
|
+
executionMode: this.executionMode,
|
|
50
|
+
mcpTools,
|
|
51
|
+
skills: skillsCatalog.map(s => ({ name: s.name, description: s.description, source: s.source })),
|
|
52
|
+
isSubagent: this.isSubagent,
|
|
53
|
+
deviceInfo,
|
|
54
|
+
...(memoryContext ? { memoryContext } : {}),
|
|
55
|
+
});
|
|
55
56
|
|
|
56
57
|
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
57
58
|
if (this._shouldCancel()) {
|
package/src/commands/provider.js
CHANGED
|
@@ -430,7 +430,7 @@ export const showProvider = async () => {
|
|
|
430
430
|
console.log(` ${chalk.white('Model :')} ${chalk.gray('auto')}`);
|
|
431
431
|
console.log(` ${chalk.white('API Key :')} ${chalk.gray('N/A (OS AI managed)')}`);
|
|
432
432
|
console.log(` ${chalk.white('Free tier :')} ${chalk.green('Yes')}`);
|
|
433
|
-
|
|
433
|
+
console.log(` ${chalk.white('Quota :')} ${chalk.yellow('200 commands/day (free plan)')}`);
|
|
434
434
|
} else {
|
|
435
435
|
const catalogResponse = await fetch(`${getServer()}/api/provider/catalog`, { headers: getHeaders() });
|
|
436
436
|
const catalog = catalogResponse.ok ? await catalogResponse.json() : [];
|
|
@@ -63,7 +63,14 @@ export const buildSystemPrompt = (os = 'linux', mode = 'GENERAL', options = {})
|
|
|
63
63
|
prompt += `You can also create skills at runtime with CREATE_SKILL.\n`;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
if (
|
|
66
|
+
if (options.provider === 'osai' || options.provider === 'auto') {
|
|
67
|
+
prompt += `\n\n## IDENTITY\n`;
|
|
68
|
+
prompt += `You are OS AI Agent, created by the OS AI team.\n`;
|
|
69
|
+
prompt += `Do not reveal or mention any other company or model name (Anthropic, OpenAI, Google, Claude, GPT, etc.).\n`;
|
|
70
|
+
prompt += `If asked who created you or what your name is, answer: "I am OS AI Agent, created by the OS AI team."\n`;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!isSubagent) {
|
|
67
74
|
prompt += `\n\n### Subagent (exploration — max 1 at a time)\n`;
|
|
68
75
|
prompt += `You can delegate read-only exploration to a subagent. You will receive a [SUBAGENT_RESULT] when it finishes.\n`;
|
|
69
76
|
prompt += `{"tool":"TASK","prompt":"<detailed task>","description":"<short label>"}\n`;
|
package/src/ui/App.js
CHANGED
|
@@ -1304,7 +1304,7 @@ export function App({ createAgentLoop, agentConfig, initialSession = null, onExi
|
|
|
1304
1304
|
const data = await res.json();
|
|
1305
1305
|
let content;
|
|
1306
1306
|
if (data.type === 'osai') {
|
|
1307
|
-
content = '**Current provider:** OS AI Agent\nModel: auto\nQuota:
|
|
1307
|
+
content = '**Current provider:** OS AI Agent\nModel: auto\nQuota: 200 commands/day\n\n_Switch to your own provider with /provider to remove quota limits._';
|
|
1308
1308
|
} else {
|
|
1309
1309
|
content = `**Current provider:** ${data.type}\nModel: ${data.model || 'N/A'}\nKey: ${data.key || 'N/A'}\nBase URL: ${data.base_url || 'N/A'}\n\n_Using your own API key — no quota limits apply._`;
|
|
1310
1310
|
}
|