osai-agent 4.2.4 → 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()) {
|
|
@@ -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`;
|