@openvole/paw-claude 0.2.0 → 0.4.0
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/BRAIN.md +32 -0
- package/README.md +6 -0
- package/dist/index.js +15 -34
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/BRAIN.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
You are an AI agent powered by OpenVole. You accomplish tasks by using tools step by step.
|
|
2
|
+
|
|
3
|
+
## How to Work
|
|
4
|
+
1. Read the conversation history first — short user messages like an email or "yes" are answers to your previous questions
|
|
5
|
+
2. Break complex tasks into clear steps and execute them one at a time
|
|
6
|
+
3. After each tool call, examine the result carefully before deciding the next action
|
|
7
|
+
4. Never repeat the same tool call if it already succeeded — move to the next step
|
|
8
|
+
5. If a tool returns an error, try a different approach or different parameters
|
|
9
|
+
6. When you read important information (API docs, instructions, credentials), save it to workspace or memory immediately
|
|
10
|
+
7. When you have enough information to respond, do so directly — don't keep searching
|
|
11
|
+
8. If you cannot complete a task (missing credentials, access denied), explain exactly what you need and stop
|
|
12
|
+
9. Your responses are for the user only — never include tool calls, function names, system commands, JSON, or any technical execution details in your response text. Execute tools silently via function calling, then respond with the human-readable result.
|
|
13
|
+
10. Complete all tool calls before responding. If you need to save data, fetch a URL, or perform any action — do it as a tool call first, then respond after the results are in.
|
|
14
|
+
11. ALWAYS include a response when you are done. Never complete a task silently — the user is waiting for confirmation of what you did.
|
|
15
|
+
|
|
16
|
+
## Data Management
|
|
17
|
+
- **Vault** (vault_store/get): ALL sensitive data — emails, passwords, API keys, tokens, credentials, usernames, handles, personal identifiers. ALWAYS use vault for these, NEVER memory or workspace.
|
|
18
|
+
- **Memory** (memory_write/read): General knowledge, non-sensitive facts, preferences, summaries
|
|
19
|
+
- **Workspace** (workspace_write/read): Files, documents, downloaded content, API docs, drafts
|
|
20
|
+
- **Session history**: Recent conversation — automatically available, review it before each response
|
|
21
|
+
|
|
22
|
+
## Recurring Tasks
|
|
23
|
+
When the user asks you to do something regularly, repeatedly, or on a schedule:
|
|
24
|
+
- **schedule_task**: Use this for tasks with a specific interval (e.g. "post every 6 hours", "check every 30 minutes"). Creates an automatic timer — no heartbeat needed.
|
|
25
|
+
- **heartbeat_write**: Use this ONLY for open-ended checks with no specific interval (e.g. "keep an eye on server status"). These run on the global heartbeat timer.
|
|
26
|
+
- Use ONE or the OTHER — never both for the same task. If you use schedule_task, do NOT also add it to HEARTBEAT.md.
|
|
27
|
+
- Do NOT just save recurring task requests to memory — that won't make them happen.
|
|
28
|
+
|
|
29
|
+
## Safety
|
|
30
|
+
- Never attempt to bypass access controls or escalate permissions
|
|
31
|
+
- Always ask for confirmation before performing destructive or irreversible actions
|
|
32
|
+
- Store credentials and personal identifiers ONLY in the vault — never in memory or workspace
|
package/README.md
CHANGED
|
@@ -36,6 +36,12 @@ npm install @openvole/paw-claude
|
|
|
36
36
|
|
|
37
37
|
Implements the Think phase — receives the conversation context and registered tools, returns the next assistant message and any tool calls. Connects to the Anthropic API.
|
|
38
38
|
|
|
39
|
+
## BRAIN.md
|
|
40
|
+
|
|
41
|
+
The system prompt is loaded from `.openvole/paws/paw-claude/BRAIN.md`. On first startup, the paw scaffolds a default prompt there. Edit this file to customize how the Brain reasons and responds.
|
|
42
|
+
|
|
43
|
+
The old `.openvole/BRAIN.md` path is no longer used.
|
|
44
|
+
|
|
39
45
|
## License
|
|
40
46
|
|
|
41
47
|
[MIT](https://github.com/openvole/pawhub/blob/main/LICENSE)
|
package/dist/index.js
CHANGED
|
@@ -10,13 +10,22 @@ var model = "claude-sonnet-4-20250514";
|
|
|
10
10
|
var identityContext;
|
|
11
11
|
var customBrainPrompt;
|
|
12
12
|
async function loadBrainPrompt() {
|
|
13
|
+
const brainPath = path.resolve(process.cwd(), ".openvole", "paws", "paw-claude", "BRAIN.md");
|
|
13
14
|
try {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
await fs.access(brainPath);
|
|
16
|
+
} catch {
|
|
17
|
+
try {
|
|
18
|
+
const pkgPath = path.resolve(path.dirname(new URL(import.meta.url).pathname), "..", "BRAIN.md");
|
|
19
|
+
const defaultContent = await fs.readFile(pkgPath, "utf-8");
|
|
20
|
+
await fs.mkdir(path.dirname(brainPath), { recursive: true });
|
|
21
|
+
await fs.writeFile(brainPath, defaultContent, "utf-8");
|
|
22
|
+
console.log("[paw-claude] scaffolded BRAIN.md to .openvole/paws/paw-claude/");
|
|
23
|
+
} catch {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const content = await fs.readFile(brainPath, "utf-8");
|
|
18
28
|
if (content.trim()) {
|
|
19
|
-
console.log("[paw-claude] loaded custom BRAIN.md prompt");
|
|
20
29
|
return content.trim();
|
|
21
30
|
}
|
|
22
31
|
} catch {
|
|
@@ -62,35 +71,7 @@ function buildSystemPrompt(activeSkills, availableTools, metadata, identityCtx,
|
|
|
62
71
|
- Time: ${now.toLocaleTimeString("en-US", { hour12: true })}
|
|
63
72
|
- Platform: ${process.platform}
|
|
64
73
|
- Model: ${model}`;
|
|
65
|
-
const basePrompt = customBrain ??
|
|
66
|
-
|
|
67
|
-
## How to Work
|
|
68
|
-
1. Read the conversation history first \u2014 short user messages like an email or "yes" are answers to your previous questions
|
|
69
|
-
2. Break complex tasks into clear steps and execute them one at a time
|
|
70
|
-
3. After each tool call, examine the result carefully before deciding the next action
|
|
71
|
-
4. Never repeat the same tool call if it already succeeded \u2014 move to the next step
|
|
72
|
-
5. If a tool returns an error, try a different approach or different parameters
|
|
73
|
-
6. When you read important information (API docs, instructions, credentials), save it to workspace or memory immediately
|
|
74
|
-
7. When you have enough information to respond, do so directly \u2014 don't keep searching
|
|
75
|
-
8. If you cannot complete a task (missing credentials, access denied), explain exactly what you need and stop
|
|
76
|
-
|
|
77
|
-
## Data Management
|
|
78
|
-
- **Vault** (vault_store/get): ALL sensitive data \u2014 emails, passwords, API keys, tokens, credentials, usernames, handles, personal identifiers. ALWAYS use vault for these, NEVER memory or workspace.
|
|
79
|
-
- **Memory** (memory_write/read): General knowledge, non-sensitive facts, preferences, summaries
|
|
80
|
-
- **Workspace** (workspace_write/read): Files, documents, downloaded content, API docs, drafts
|
|
81
|
-
- **Session history**: Recent conversation \u2014 automatically available, review it before each response
|
|
82
|
-
|
|
83
|
-
## Recurring Tasks
|
|
84
|
-
When the user asks you to do something regularly, repeatedly, or on a schedule:
|
|
85
|
-
- **schedule_task**: Use this for tasks with a specific interval (e.g. "post every 6 hours", "check every 30 minutes"). Creates an automatic timer \u2014 no heartbeat needed.
|
|
86
|
-
- **heartbeat_write**: Use this ONLY for open-ended checks with no specific interval (e.g. "keep an eye on server status"). These run on the global heartbeat timer.
|
|
87
|
-
- Use ONE or the OTHER \u2014 never both for the same task. If you use schedule_task, do NOT also add it to HEARTBEAT.md.
|
|
88
|
-
- Do NOT just save recurring task requests to memory \u2014 that won't make them happen.
|
|
89
|
-
|
|
90
|
-
## Safety
|
|
91
|
-
- Never attempt to bypass access controls or escalate permissions
|
|
92
|
-
- Always ask for confirmation before performing destructive or irreversible actions
|
|
93
|
-
- Store credentials and personal identifiers ONLY in the vault \u2014 never in memory or workspace`;
|
|
74
|
+
const basePrompt = customBrain ?? "You are an AI agent powered by OpenVole. You accomplish tasks by using tools step by step.";
|
|
94
75
|
const parts = [basePrompt, "", runtimeContext];
|
|
95
76
|
if (identityCtx) {
|
|
96
77
|
parts.push("");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/paw.ts"],"sourcesContent":["import { definePaw } from '@openvole/paw-sdk'\nimport { paw } from './paw.js'\n\nexport default definePaw(paw)\n","import * as fs from 'node:fs/promises'\nimport * as path from 'node:path'\nimport Anthropic from '@anthropic-ai/sdk'\nimport type {\n\tPawDefinition,\n\tAgentContext,\n\tAgentPlan,\n\tAgentMessage,\n\tActiveSkill,\n\tPlannedAction,\n\tToolSummary,\n} from '@openvole/paw-sdk'\n\nlet client: Anthropic | undefined\nlet model: string = 'claude-sonnet-4-20250514'\n\n/** Cached identity files — loaded once on startup */\nlet identityContext: string | undefined\n\n/** Custom brain prompt from BRAIN.md — overrides default system prompt if present */\nlet customBrainPrompt: string | undefined\n\n/** Load BRAIN.md from .openvole/ — if it exists, it replaces the default system prompt */\nasync function loadBrainPrompt(): Promise<string | undefined> {\n\ttry {\n\t\tconst content = await fs.readFile(\n\t\t\tpath.resolve(process.cwd(), '.openvole', 'BRAIN.md'),\n\t\t\t'utf-8',\n\t\t)\n\t\tif (content.trim()) {\n\t\t\tconsole.log('[paw-claude] loaded custom BRAIN.md prompt')\n\t\t\treturn content.trim()\n\t\t}\n\t} catch {\n\t\t// No BRAIN.md — use default\n\t}\n\treturn undefined\n}\n\n/** Load identity files from .openvole/ (AGENT.md, USER.md, SOUL.md) */\nasync function loadIdentityFiles(): Promise<string> {\n\tconst openvoleDir = path.resolve(process.cwd(), '.openvole')\n\tconst files = [\n\t\t{ name: 'SOUL.md', section: 'Agent Identity' },\n\t\t{ name: 'USER.md', section: 'User Profile' },\n\t\t{ name: 'AGENT.md', section: 'Agent Rules' },\n\t]\n\n\tconst parts: string[] = []\n\tfor (const file of files) {\n\t\ttry {\n\t\t\tconst content = await fs.readFile(path.join(openvoleDir, file.name), 'utf-8')\n\t\t\tif (content.trim()) {\n\t\t\t\tparts.push(`## ${file.section}\\n${content.trim()}`)\n\t\t\t}\n\t\t} catch {\n\t\t\t// File doesn't exist — skip\n\t\t}\n\t}\n\n\treturn parts.join('\\n\\n')\n}\n\nfunction getClient(): Anthropic {\n\tif (!client) {\n\t\tconst apiKey = process.env.ANTHROPIC_API_KEY\n\t\tconst baseURL = process.env.ANTHROPIC_BASE_URL\n\t\tmodel = process.env.ANTHROPIC_MODEL || 'claude-sonnet-4-20250514'\n\t\tclient = new Anthropic({\n\t\t\tapiKey,\n\t\t\t...(baseURL ? { baseURL } : {}),\n\t\t})\n\t}\n\treturn client\n}\n\nfunction buildSystemPrompt(\n\tactiveSkills: ActiveSkill[],\n\tavailableTools: ToolSummary[],\n\tmetadata?: Record<string, unknown>,\n\tidentityCtx?: string,\n\tcustomBrain?: string,\n): string {\n\tconst now = new Date()\n\tconst runtimeContext = `## Current Context\n- Date: ${now.toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })}\n- Time: ${now.toLocaleTimeString('en-US', { hour12: true })}\n- Platform: ${process.platform}\n- Model: ${model}`\n\n\t// Use custom BRAIN.md if provided, otherwise use default prompt\n\tconst basePrompt = customBrain ?? `You are an AI agent powered by OpenVole. You accomplish tasks by using tools step by step.\n\n## How to Work\n1. Read the conversation history first — short user messages like an email or \"yes\" are answers to your previous questions\n2. Break complex tasks into clear steps and execute them one at a time\n3. After each tool call, examine the result carefully before deciding the next action\n4. Never repeat the same tool call if it already succeeded — move to the next step\n5. If a tool returns an error, try a different approach or different parameters\n6. When you read important information (API docs, instructions, credentials), save it to workspace or memory immediately\n7. When you have enough information to respond, do so directly — don't keep searching\n8. If you cannot complete a task (missing credentials, access denied), explain exactly what you need and stop\n\n## Data Management\n- **Vault** (vault_store/get): ALL sensitive data — emails, passwords, API keys, tokens, credentials, usernames, handles, personal identifiers. ALWAYS use vault for these, NEVER memory or workspace.\n- **Memory** (memory_write/read): General knowledge, non-sensitive facts, preferences, summaries\n- **Workspace** (workspace_write/read): Files, documents, downloaded content, API docs, drafts\n- **Session history**: Recent conversation — automatically available, review it before each response\n\n## Recurring Tasks\nWhen the user asks you to do something regularly, repeatedly, or on a schedule:\n- **schedule_task**: Use this for tasks with a specific interval (e.g. \"post every 6 hours\", \"check every 30 minutes\"). Creates an automatic timer — no heartbeat needed.\n- **heartbeat_write**: Use this ONLY for open-ended checks with no specific interval (e.g. \"keep an eye on server status\"). These run on the global heartbeat timer.\n- Use ONE or the OTHER — never both for the same task. If you use schedule_task, do NOT also add it to HEARTBEAT.md.\n- Do NOT just save recurring task requests to memory — that won't make them happen.\n\n## Safety\n- Never attempt to bypass access controls or escalate permissions\n- Always ask for confirmation before performing destructive or irreversible actions\n- Store credentials and personal identifiers ONLY in the vault — never in memory or workspace`\n\n\tconst parts: string[] = [basePrompt, '', runtimeContext]\n\n\t// Inject identity context (SOUL.md, USER.md, AGENT.md) if available\n\tif (identityCtx) {\n\t\tparts.push('')\n\t\tparts.push(identityCtx)\n\t}\n\n\t// Inject session history if available — this is critical for conversation continuity\n\tif (metadata?.sessionHistory && typeof metadata.sessionHistory === 'string') {\n\t\tparts.push('')\n\t\tparts.push('## Conversation History')\n\t\tparts.push('Previous messages in this session. Use this to understand the current context and follow-up messages:')\n\t\tparts.push(metadata.sessionHistory)\n\t}\n\n\t// Inject memory if available\n\tif (metadata?.memory && typeof metadata.memory === 'string') {\n\t\tparts.push('')\n\t\tparts.push('## Agent Memory')\n\t\tparts.push(metadata.memory)\n\t}\n\n\tif (activeSkills.length > 0) {\n\t\tparts.push('')\n\t\tparts.push('## Available Skills')\n\t\tparts.push(\n\t\t\t'The following skills are available. Use the skill_read tool to load full instructions when a skill is relevant to the current task.',\n\t\t)\n\t\tfor (const skill of activeSkills) {\n\t\t\tparts.push(`- **${skill.name}**: ${skill.description}`)\n\t\t}\n\t}\n\n\tif (availableTools.length > 0) {\n\t\tparts.push('')\n\t\tparts.push('## Available Tools')\n\t\tparts.push(\n\t\t\t'You have access to the following tools. Use function calling to invoke them when needed.',\n\t\t)\n\t\tfor (const tool of availableTools) {\n\t\t\tparts.push(`- **${tool.name}** (from ${tool.pawName}): ${tool.description}`)\n\t\t}\n\t}\n\n\treturn parts.join('\\n')\n}\n\nfunction convertMessages(\n\tmessages: AgentMessage[],\n): Anthropic.MessageParam[] {\n\tconst result: Anthropic.MessageParam[] = []\n\n\tfor (const msg of messages) {\n\t\tswitch (msg.role) {\n\t\t\tcase 'user':\n\t\t\t\tresult.push({ role: 'user', content: msg.content })\n\t\t\t\tbreak\n\t\t\tcase 'brain':\n\t\t\t\tresult.push({ role: 'assistant', content: msg.content })\n\t\t\t\tbreak\n\t\t\tcase 'tool_result':\n\t\t\t\tresult.push({\n\t\t\t\t\trole: 'user',\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: 'tool_result',\n\t\t\t\t\t\t\ttool_use_id: (msg as any).toolUseId || 'unknown',\n\t\t\t\t\t\t\tcontent: msg.content,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tbreak\n\t\t\tcase 'error':\n\t\t\t\tresult.push({\n\t\t\t\t\trole: 'user',\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: 'tool_result',\n\t\t\t\t\t\t\ttool_use_id: (msg as any).toolUseId || 'unknown',\n\t\t\t\t\t\t\tcontent: `Error: ${msg.content}`,\n\t\t\t\t\t\t\tis_error: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\treturn result\n}\n\nfunction convertTools(\n\ttools: ToolSummary[],\n): Anthropic.Tool[] {\n\treturn tools.map((tool) => ({\n\t\tname: tool.name,\n\t\tdescription: tool.description,\n\t\tinput_schema: {\n\t\t\ttype: 'object' as const,\n\t\t\tproperties: {},\n\t\t},\n\t}))\n}\n\nfunction parseToolCalls(\n\tresponse: Anthropic.Message,\n): PlannedAction[] {\n\tconst actions: PlannedAction[] = []\n\n\tfor (const block of response.content) {\n\t\tif (block.type === 'tool_use') {\n\t\t\tactions.push({\n\t\t\t\ttool: block.name,\n\t\t\t\tparams: block.input as Record<string, unknown>,\n\t\t\t})\n\t\t}\n\t}\n\n\treturn actions\n}\n\nexport const paw: PawDefinition = {\n\tname: '@openvole/paw-claude',\n\tversion: '0.1.0',\n\tdescription: 'Brain Paw powered by Anthropic Claude',\n\tbrain: true,\n\n\tasync think(context: AgentContext): Promise<AgentPlan> {\n\t\tconst anthropic = getClient()\n\t\tconst start = Date.now()\n\n\t\ttry {\n\t\t\tconst systemPrompt = buildSystemPrompt(\n\t\t\t\tcontext.activeSkills,\n\t\t\t\tcontext.availableTools,\n\t\t\t\tcontext.metadata,\n\t\t\t\tidentityContext,\n\t\t\t\tcustomBrainPrompt,\n\t\t\t)\n\n\t\t\tconst anthropicMessages = convertMessages(context.messages)\n\t\t\tconst anthropicTools = convertTools(context.availableTools)\n\n\t\t\tconst response = await anthropic.messages.create({\n\t\t\t\tmodel,\n\t\t\t\tmax_tokens: 4096,\n\t\t\t\tsystem: systemPrompt,\n\t\t\t\tmessages: anthropicMessages,\n\t\t\t\t...(anthropicTools.length > 0 ? { tools: anthropicTools } : {}),\n\t\t\t})\n\n\t\t\tconst durationMs = Date.now() - start\n\t\t\tconsole.log(\n\t\t\t\t`[paw-claude] think completed in ${durationMs}ms (model: ${model})`,\n\t\t\t)\n\n\t\t\tconst actions = parseToolCalls(response)\n\n\t\t\tif (actions.length > 0) {\n\t\t\t\treturn {\n\t\t\t\t\tactions,\n\t\t\t\t\texecution: 'sequential',\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Extract text response\n\t\t\tconst text = response.content\n\t\t\t\t.filter((block): block is Anthropic.TextBlock => block.type === 'text')\n\t\t\t\t.map((block) => block.text)\n\t\t\t\t.join('')\n\n\t\t\treturn {\n\t\t\t\tactions: [],\n\t\t\t\tresponse: text,\n\t\t\t\tdone: response.stop_reason === 'end_turn',\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst durationMs = Date.now() - start\n\t\t\tconst message =\n\t\t\t\terror instanceof Error ? error.message : String(error)\n\t\t\tconsole.error(\n\t\t\t\t`[paw-claude] think failed after ${durationMs}ms: ${message}`,\n\t\t\t)\n\n\t\t\treturn {\n\t\t\t\tactions: [],\n\t\t\t\tresponse: `Error communicating with Anthropic API: ${message}`,\n\t\t\t\tdone: true,\n\t\t\t}\n\t\t}\n\t},\n\n\tasync onLoad() {\n\t\tgetClient()\n\t\tcustomBrainPrompt = await loadBrainPrompt()\n\t\tidentityContext = await loadIdentityFiles()\n\t\tif (identityContext) {\n\t\t\tconsole.log('[paw-claude] loaded identity files (SOUL.md, USER.md, AGENT.md)')\n\t\t}\n\t\tconsole.log(\n\t\t\t`[paw-claude] loaded — model: ${model}`,\n\t\t)\n\t},\n\n\tasync onUnload() {\n\t\tclient = undefined\n\t\tconsole.log('[paw-claude] unloaded')\n\t},\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;;;ACA1B,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,OAAO,eAAe;AAWtB,IAAI;AACJ,IAAI,QAAgB;AAGpB,IAAI;AAGJ,IAAI;AAGJ,eAAe,kBAA+C;AAC7D,MAAI;AACH,UAAM,UAAU,MAAS;AAAA,MACnB,aAAQ,QAAQ,IAAI,GAAG,aAAa,UAAU;AAAA,MACnD;AAAA,IACD;AACA,QAAI,QAAQ,KAAK,GAAG;AACnB,cAAQ,IAAI,4CAA4C;AACxD,aAAO,QAAQ,KAAK;AAAA,IACrB;AAAA,EACD,QAAQ;AAAA,EAER;AACA,SAAO;AACR;AAGA,eAAe,oBAAqC;AACnD,QAAM,cAAmB,aAAQ,QAAQ,IAAI,GAAG,WAAW;AAC3D,QAAM,QAAQ;AAAA,IACb,EAAE,MAAM,WAAW,SAAS,iBAAiB;AAAA,IAC7C,EAAE,MAAM,WAAW,SAAS,eAAe;AAAA,IAC3C,EAAE,MAAM,YAAY,SAAS,cAAc;AAAA,EAC5C;AAEA,QAAM,QAAkB,CAAC;AACzB,aAAW,QAAQ,OAAO;AACzB,QAAI;AACH,YAAM,UAAU,MAAS,YAAc,UAAK,aAAa,KAAK,IAAI,GAAG,OAAO;AAC5E,UAAI,QAAQ,KAAK,GAAG;AACnB,cAAM,KAAK,MAAM,KAAK,OAAO;AAAA,EAAK,QAAQ,KAAK,CAAC,EAAE;AAAA,MACnD;AAAA,IACD,QAAQ;AAAA,IAER;AAAA,EACD;AAEA,SAAO,MAAM,KAAK,MAAM;AACzB;AAEA,SAAS,YAA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C,MAAM,SAAS,MAAM,EACrE,IAAI,CAAC,UAAU,MAAM,IAAI,EACzB,KAAK,EAAE;AAET,aAAO;AAAA,QACN,SAAS,CAAC;AAAA,QACV,UAAU;AAAA,QACV,MAAM,SAAS,gBAAgB;AAAA,MAChC;AAAA,IACD,SAAS,OAAO;AACf,YAAM,aAAa,KAAK,IAAI,IAAI;AAChC,YAAM,UACL,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AACtD,cAAQ;AAAA,QACP,mCAAmC,UAAU,OAAO,OAAO;AAAA,MAC5D;AAEA,aAAO;AAAA,QACN,SAAS,CAAC;AAAA,QACV,UAAU,2CAA2C,OAAO;AAAA,QAC5D,MAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD;AAAA,EAEA,MAAM,SAAS;AACd,cAAU;AACV,wBAAoB,MAAM,gBAAgB;AAC1C,sBAAkB,MAAM,kBAAkB;AAC1C,QAAI,iBAAiB;AACpB,cAAQ,IAAI,iEAAiE;AAAA,IAC9E;AACA,YAAQ;AAAA,MACP,qCAAgC,KAAK;AAAA,IACtC;AAAA,EACD;AAAA,EAEA,MAAM,WAAW;AAChB,aAAS;AACT,YAAQ,IAAI,uBAAuB;AAAA,EACpC;AACD;;;ADvUA,IAAO,gBAAQ,UAAU,GAAG;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/paw.ts"],"sourcesContent":["import { definePaw } from '@openvole/paw-sdk'\nimport { paw } from './paw.js'\n\nexport default definePaw(paw)\n","import * as fs from 'node:fs/promises'\nimport * as path from 'node:path'\nimport Anthropic from '@anthropic-ai/sdk'\nimport type {\n\tPawDefinition,\n\tAgentContext,\n\tAgentPlan,\n\tAgentMessage,\n\tActiveSkill,\n\tPlannedAction,\n\tToolSummary,\n} from '@openvole/paw-sdk'\n\nlet client: Anthropic | undefined\nlet model: string = 'claude-sonnet-4-20250514'\n\n/** Cached identity files — loaded once on startup */\nlet identityContext: string | undefined\n\n/** Custom brain prompt from BRAIN.md — overrides default system prompt if present */\nlet customBrainPrompt: string | undefined\n\n/** Load BRAIN.md from .openvole/paws/paw-claude/BRAIN.md — scaffolds from packaged default on first run */\nasync function loadBrainPrompt(): Promise<string | undefined> {\n\tconst brainPath = path.resolve(process.cwd(), '.openvole', 'paws', 'paw-claude', 'BRAIN.md')\n\n\t// Scaffold on first run: copy packaged BRAIN.md to local paw data dir\n\ttry {\n\t\tawait fs.access(brainPath)\n\t} catch {\n\t\ttry {\n\t\t\tconst pkgPath = path.resolve(path.dirname(new URL(import.meta.url).pathname), '..', 'BRAIN.md')\n\t\t\tconst defaultContent = await fs.readFile(pkgPath, 'utf-8')\n\t\t\tawait fs.mkdir(path.dirname(brainPath), { recursive: true })\n\t\t\tawait fs.writeFile(brainPath, defaultContent, 'utf-8')\n\t\t\tconsole.log('[paw-claude] scaffolded BRAIN.md to .openvole/paws/paw-claude/')\n\t\t} catch {\n\t\t\t// No packaged BRAIN.md available\n\t\t}\n\t}\n\n\t// Always read from the local paw data dir\n\ttry {\n\t\tconst content = await fs.readFile(brainPath, 'utf-8')\n\t\tif (content.trim()) {\n\t\t\treturn content.trim()\n\t\t}\n\t} catch {\n\t\t// No BRAIN.md\n\t}\n\n\treturn undefined\n}\n\n/** Load identity files from .openvole/ (AGENT.md, USER.md, SOUL.md) */\nasync function loadIdentityFiles(): Promise<string> {\n\tconst openvoleDir = path.resolve(process.cwd(), '.openvole')\n\tconst files = [\n\t\t{ name: 'SOUL.md', section: 'Agent Identity' },\n\t\t{ name: 'USER.md', section: 'User Profile' },\n\t\t{ name: 'AGENT.md', section: 'Agent Rules' },\n\t]\n\n\tconst parts: string[] = []\n\tfor (const file of files) {\n\t\ttry {\n\t\t\tconst content = await fs.readFile(path.join(openvoleDir, file.name), 'utf-8')\n\t\t\tif (content.trim()) {\n\t\t\t\tparts.push(`## ${file.section}\\n${content.trim()}`)\n\t\t\t}\n\t\t} catch {\n\t\t\t// File doesn't exist — skip\n\t\t}\n\t}\n\n\treturn parts.join('\\n\\n')\n}\n\nfunction getClient(): Anthropic {\n\tif (!client) {\n\t\tconst apiKey = process.env.ANTHROPIC_API_KEY\n\t\tconst baseURL = process.env.ANTHROPIC_BASE_URL\n\t\tmodel = process.env.ANTHROPIC_MODEL || 'claude-sonnet-4-20250514'\n\t\tclient = new Anthropic({\n\t\t\tapiKey,\n\t\t\t...(baseURL ? { baseURL } : {}),\n\t\t})\n\t}\n\treturn client\n}\n\nfunction buildSystemPrompt(\n\tactiveSkills: ActiveSkill[],\n\tavailableTools: ToolSummary[],\n\tmetadata?: Record<string, unknown>,\n\tidentityCtx?: string,\n\tcustomBrain?: string,\n): string {\n\tconst now = new Date()\n\tconst runtimeContext = `## Current Context\n- Date: ${now.toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })}\n- Time: ${now.toLocaleTimeString('en-US', { hour12: true })}\n- Platform: ${process.platform}\n- Model: ${model}`\n\n\t// Use custom BRAIN.md if provided, otherwise use default prompt\n\tconst basePrompt = customBrain ?? 'You are an AI agent powered by OpenVole. You accomplish tasks by using tools step by step.'\n\n\tconst parts: string[] = [basePrompt, '', runtimeContext]\n\n\t// Inject identity context (SOUL.md, USER.md, AGENT.md) if available\n\tif (identityCtx) {\n\t\tparts.push('')\n\t\tparts.push(identityCtx)\n\t}\n\n\t// Inject session history if available — this is critical for conversation continuity\n\tif (metadata?.sessionHistory && typeof metadata.sessionHistory === 'string') {\n\t\tparts.push('')\n\t\tparts.push('## Conversation History')\n\t\tparts.push('Previous messages in this session. Use this to understand the current context and follow-up messages:')\n\t\tparts.push(metadata.sessionHistory)\n\t}\n\n\t// Inject memory if available\n\tif (metadata?.memory && typeof metadata.memory === 'string') {\n\t\tparts.push('')\n\t\tparts.push('## Agent Memory')\n\t\tparts.push(metadata.memory)\n\t}\n\n\tif (activeSkills.length > 0) {\n\t\tparts.push('')\n\t\tparts.push('## Available Skills')\n\t\tparts.push(\n\t\t\t'The following skills are available. Use the skill_read tool to load full instructions when a skill is relevant to the current task.',\n\t\t)\n\t\tfor (const skill of activeSkills) {\n\t\t\tparts.push(`- **${skill.name}**: ${skill.description}`)\n\t\t}\n\t}\n\n\tif (availableTools.length > 0) {\n\t\tparts.push('')\n\t\tparts.push('## Available Tools')\n\t\tparts.push(\n\t\t\t'You have access to the following tools. Use function calling to invoke them when needed.',\n\t\t)\n\t\tfor (const tool of availableTools) {\n\t\t\tparts.push(`- **${tool.name}** (from ${tool.pawName}): ${tool.description}`)\n\t\t}\n\t}\n\n\treturn parts.join('\\n')\n}\n\nfunction convertMessages(\n\tmessages: AgentMessage[],\n): Anthropic.MessageParam[] {\n\tconst result: Anthropic.MessageParam[] = []\n\n\tfor (const msg of messages) {\n\t\tswitch (msg.role) {\n\t\t\tcase 'user':\n\t\t\t\tresult.push({ role: 'user', content: msg.content })\n\t\t\t\tbreak\n\t\t\tcase 'brain':\n\t\t\t\tresult.push({ role: 'assistant', content: msg.content })\n\t\t\t\tbreak\n\t\t\tcase 'tool_result':\n\t\t\t\tresult.push({\n\t\t\t\t\trole: 'user',\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: 'tool_result',\n\t\t\t\t\t\t\ttool_use_id: (msg as any).toolUseId || 'unknown',\n\t\t\t\t\t\t\tcontent: msg.content,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tbreak\n\t\t\tcase 'error':\n\t\t\t\tresult.push({\n\t\t\t\t\trole: 'user',\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: 'tool_result',\n\t\t\t\t\t\t\ttool_use_id: (msg as any).toolUseId || 'unknown',\n\t\t\t\t\t\t\tcontent: `Error: ${msg.content}`,\n\t\t\t\t\t\t\tis_error: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\treturn result\n}\n\nfunction convertTools(\n\ttools: ToolSummary[],\n): Anthropic.Tool[] {\n\treturn tools.map((tool) => ({\n\t\tname: tool.name,\n\t\tdescription: tool.description,\n\t\tinput_schema: {\n\t\t\ttype: 'object' as const,\n\t\t\tproperties: {},\n\t\t},\n\t}))\n}\n\nfunction parseToolCalls(\n\tresponse: Anthropic.Message,\n): PlannedAction[] {\n\tconst actions: PlannedAction[] = []\n\n\tfor (const block of response.content) {\n\t\tif (block.type === 'tool_use') {\n\t\t\tactions.push({\n\t\t\t\ttool: block.name,\n\t\t\t\tparams: block.input as Record<string, unknown>,\n\t\t\t})\n\t\t}\n\t}\n\n\treturn actions\n}\n\nexport const paw: PawDefinition = {\n\tname: '@openvole/paw-claude',\n\tversion: '0.1.0',\n\tdescription: 'Brain Paw powered by Anthropic Claude',\n\tbrain: true,\n\n\tasync think(context: AgentContext): Promise<AgentPlan> {\n\t\tconst anthropic = getClient()\n\t\tconst start = Date.now()\n\n\t\ttry {\n\t\t\tconst systemPrompt = buildSystemPrompt(\n\t\t\t\tcontext.activeSkills,\n\t\t\t\tcontext.availableTools,\n\t\t\t\tcontext.metadata,\n\t\t\t\tidentityContext,\n\t\t\t\tcustomBrainPrompt,\n\t\t\t)\n\n\t\t\tconst anthropicMessages = convertMessages(context.messages)\n\t\t\tconst anthropicTools = convertTools(context.availableTools)\n\n\t\t\tconst response = await anthropic.messages.create({\n\t\t\t\tmodel,\n\t\t\t\tmax_tokens: 4096,\n\t\t\t\tsystem: systemPrompt,\n\t\t\t\tmessages: anthropicMessages,\n\t\t\t\t...(anthropicTools.length > 0 ? { tools: anthropicTools } : {}),\n\t\t\t})\n\n\t\t\tconst durationMs = Date.now() - start\n\t\t\tconsole.log(\n\t\t\t\t`[paw-claude] think completed in ${durationMs}ms (model: ${model})`,\n\t\t\t)\n\n\t\t\tconst actions = parseToolCalls(response)\n\n\t\t\tif (actions.length > 0) {\n\t\t\t\treturn {\n\t\t\t\t\tactions,\n\t\t\t\t\texecution: 'sequential',\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Extract text response\n\t\t\tconst text = response.content\n\t\t\t\t.filter((block): block is Anthropic.TextBlock => block.type === 'text')\n\t\t\t\t.map((block) => block.text)\n\t\t\t\t.join('')\n\n\t\t\treturn {\n\t\t\t\tactions: [],\n\t\t\t\tresponse: text,\n\t\t\t\tdone: response.stop_reason === 'end_turn',\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst durationMs = Date.now() - start\n\t\t\tconst message =\n\t\t\t\terror instanceof Error ? error.message : String(error)\n\t\t\tconsole.error(\n\t\t\t\t`[paw-claude] think failed after ${durationMs}ms: ${message}`,\n\t\t\t)\n\n\t\t\treturn {\n\t\t\t\tactions: [],\n\t\t\t\tresponse: `Error communicating with Anthropic API: ${message}`,\n\t\t\t\tdone: true,\n\t\t\t}\n\t\t}\n\t},\n\n\tasync onLoad() {\n\t\tgetClient()\n\t\tcustomBrainPrompt = await loadBrainPrompt()\n\t\tidentityContext = await loadIdentityFiles()\n\t\tif (identityContext) {\n\t\t\tconsole.log('[paw-claude] loaded identity files (SOUL.md, USER.md, AGENT.md)')\n\t\t}\n\t\tconsole.log(\n\t\t\t`[paw-claude] loaded — model: ${model}`,\n\t\t)\n\t},\n\n\tasync onUnload() {\n\t\tclient = undefined\n\t\tconsole.log('[paw-claude] unloaded')\n\t},\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;;;ACA1B,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,OAAO,eAAe;AAWtB,IAAI;AACJ,IAAI,QAAgB;AAGpB,IAAI;AAGJ,IAAI;AAGJ,eAAe,kBAA+C;AAC7D,QAAM,YAAiB,aAAQ,QAAQ,IAAI,GAAG,aAAa,QAAQ,cAAc,UAAU;AAG3F,MAAI;AACH,UAAS,UAAO,SAAS;AAAA,EAC1B,QAAQ;AACP,QAAI;AACH,YAAM,UAAe,aAAa,aAAQ,IAAI,IAAI,YAAY,GAAG,EAAE,QAAQ,GAAG,MAAM,UAAU;AAC9F,YAAM,iBAAiB,MAAS,YAAS,SAAS,OA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AACd,cAAU;AACV,wBAAoB,MAAM,gBAAgB;AAC1C,sBAAkB,MAAM,kBAAkB;AAC1C,QAAI,iBAAiB;AACpB,cAAQ,IAAI,iEAAiE;AAAA,IAC9E;AACA,YAAQ;AAAA,MACP,qCAAgC,KAAK;AAAA,IACtC;AAAA,EACD;AAAA,EAEA,MAAM,WAAW;AAChB,aAAS;AACT,YAAQ,IAAI,uBAAuB;AAAA,EACpC;AACD;;;AD1TA,IAAO,gBAAQ,UAAU,GAAG;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openvole/paw-claude",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Brain Paw powered by Anthropic Claude",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@types/node": "^22.0.0",
|
|
23
23
|
"tsup": "^8.3.0",
|
|
24
24
|
"typescript": "^5.6.0",
|
|
25
|
-
"@openvole/paw-sdk": "^0.
|
|
25
|
+
"@openvole/paw-sdk": "^0.3.0"
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
28
|
"node": ">=20.0.0"
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|
|
32
32
|
"vole-paw.json",
|
|
33
|
+
"BRAIN.md",
|
|
33
34
|
"README.md"
|
|
34
35
|
],
|
|
35
36
|
"license": "MIT",
|
|
@@ -47,6 +48,6 @@
|
|
|
47
48
|
"llm"
|
|
48
49
|
],
|
|
49
50
|
"peerDependencies": {
|
|
50
|
-
"@openvole/paw-sdk": "^0.
|
|
51
|
+
"@openvole/paw-sdk": "^0.3.0"
|
|
51
52
|
}
|
|
52
53
|
}
|