rhachet-brains-anthropic 0.1.2 → 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.
- package/package.json +1 -1
- package/readme.md +5 -5
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "rhachet-brains-anthropic",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "rhachet brain.atom and brain.repl adapter for anthropic",
|
|
5
|
-
"version": "0.1.
|
|
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": [
|
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
|
|
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({
|
|
41
|
+
schema: { output: z.object({ analysis: z.string() }) },
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
// use act() for read+write operations
|
|
45
|
-
const
|
|
45
|
+
const { proposal } = await brainRepl.act({
|
|
46
46
|
role: { briefs: [] },
|
|
47
47
|
prompt: 'refactor this module',
|
|
48
|
-
schema: { output: z.object({
|
|
48
|
+
schema: { output: z.object({ proposal: z.string() }) },
|
|
49
49
|
});
|
|
50
50
|
```
|
|
51
51
|
|