rhachet-brains-anthropic 0.1.1 → 0.1.3

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.
Files changed (2) hide show
  1. package/package.json +5 -2
  2. package/readme.md +5 -5
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "rhachet-brains-anthropic",
3
3
  "author": "ehmpathy",
4
- "description": "rhachet brain.atom and brain.repl adapter for openai",
5
- "version": "0.1.1",
4
+ "description": "rhachet brain.atom and brain.repl adapter for anthropic",
5
+ "version": "0.1.3",
6
6
  "repository": "ehmpathy/rhachet-brains-anthropic",
7
7
  "homepage": "https://github.com/ehmpathy/rhachet-brains-anthropic",
8
8
  "keywords": [
@@ -56,6 +56,9 @@
56
56
  "prepare:rhachet": "rhachet init --mode upsert && rhachet roles link --repo ehmpathy --role mechanic && rhachet roles link --repo bhuild --role behaver && rhachet roles link --repo bhrain --role reviewer && rhachet roles init --role mechanic && rhachet roles init --role behaver",
57
57
  "prepare": "if [ -e .git ] && [ -z $CI ]; then npm run prepare:husky && npm run prepare:rhachet; fi"
58
58
  },
59
+ "peerDependencies": {
60
+ "rhachet": ">=1.21.4"
61
+ },
59
62
  "dependencies": {
60
63
  "@anthropic-ai/claude-agent-sdk": "0.1.76",
61
64
  "@anthropic-ai/sdk": "0.71.2",
package/readme.md CHANGED
@@ -18,7 +18,7 @@ import { z } from 'zod';
18
18
  const brainAtom = genBrainAtom({ slug: 'claude/sonnet' });
19
19
 
20
20
  // simple string output
21
- const response = await brainAtom.ask({
21
+ const explanation = await brainAtom.ask({
22
22
  role: { briefs: [] },
23
23
  prompt: 'explain this code',
24
24
  schema: { output: z.string() },
@@ -35,17 +35,17 @@ const { summary, issues } = await brainAtom.ask({
35
35
  const brainRepl = genBrainRepl({ slug: 'claude/code' });
36
36
 
37
37
  // use ask() for read-only operations
38
- const analysis = await brainRepl.ask({
38
+ const { analysis } = await brainRepl.ask({
39
39
  role: { briefs: [] },
40
40
  prompt: 'analyze this codebase',
41
- schema: { output: z.object({ content: z.string() }) },
41
+ schema: { output: z.object({ analysis: z.string() }) },
42
42
  });
43
43
 
44
44
  // use act() for read+write operations
45
- const refactor = await brainRepl.act({
45
+ const { proposal } = await brainRepl.act({
46
46
  role: { briefs: [] },
47
47
  prompt: 'refactor this module',
48
- schema: { output: z.object({ content: z.string() }) },
48
+ schema: { output: z.object({ proposal: z.string() }) },
49
49
  });
50
50
  ```
51
51