@secemp/elwood 0.1.0 → 0.1.1
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/README.md +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ This gives you the same API as `@anthropic-ai/claude-agent-sdk` with lower laten
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
npm install elwood
|
|
20
|
+
npm install @secemp/elwood
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Requires Claude Code to be installed:
|
|
@@ -28,7 +28,7 @@ npm install -g @anthropic-ai/claude-code
|
|
|
28
28
|
## Quick start
|
|
29
29
|
|
|
30
30
|
```js
|
|
31
|
-
import { query } from 'elwood';
|
|
31
|
+
import { query } from '@secemp/elwood';
|
|
32
32
|
|
|
33
33
|
for await (const message of query({
|
|
34
34
|
prompt: 'What files are in this directory?',
|
|
@@ -74,7 +74,7 @@ conversation.close(); // cleanup
|
|
|
74
74
|
### tool(name, description, schema, handler)
|
|
75
75
|
|
|
76
76
|
```js
|
|
77
|
-
import { tool, createSdkMcpServer, query } from 'elwood';
|
|
77
|
+
import { tool, createSdkMcpServer, query } from '@secemp/elwood';
|
|
78
78
|
|
|
79
79
|
const weather = tool('get_weather', 'Get weather',
|
|
80
80
|
{ type: 'object', properties: { city: { type: 'string' } } },
|
|
@@ -92,7 +92,7 @@ for await (const msg of query({
|
|
|
92
92
|
### Session utilities
|
|
93
93
|
|
|
94
94
|
```js
|
|
95
|
-
import { listSessions, getSessionMessages, getSessionInfo } from 'elwood';
|
|
95
|
+
import { listSessions, getSessionMessages, getSessionInfo } from '@secemp/elwood';
|
|
96
96
|
|
|
97
97
|
const sessions = await listSessions();
|
|
98
98
|
const messages = await getSessionMessages(sessions[0].id);
|
|
@@ -101,7 +101,7 @@ const messages = await getSessionMessages(sessions[0].id);
|
|
|
101
101
|
### V2 Session API
|
|
102
102
|
|
|
103
103
|
```js
|
|
104
|
-
import { unstable_v2_createSession, unstable_v2_prompt } from 'elwood';
|
|
104
|
+
import { unstable_v2_createSession, unstable_v2_prompt } from '@secemp/elwood';
|
|
105
105
|
|
|
106
106
|
const result = await unstable_v2_prompt('Explain recursion');
|
|
107
107
|
```
|
|
@@ -109,7 +109,7 @@ const result = await unstable_v2_prompt('Explain recursion');
|
|
|
109
109
|
### Low-level AST access
|
|
110
110
|
|
|
111
111
|
```js
|
|
112
|
-
import { locate, load, instrument, parseBundle } from 'elwood';
|
|
112
|
+
import { locate, load, instrument, parseBundle } from '@secemp/elwood';
|
|
113
113
|
|
|
114
114
|
const { cliPath, version } = await locate();
|
|
115
115
|
const ast = parseBundle(cliPath);
|