@ash-ai/sdk 0.0.1 → 0.0.2
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 +38 -0
- package/package.json +5 -4
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @ash-ai/sdk
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for interacting with [Ash](https://github.com/ash-ai-org/ash-ai) agent servers.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ash-ai/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { AshClient } from '@ash-ai/sdk';
|
|
15
|
+
|
|
16
|
+
const client = new AshClient({ serverUrl: 'http://localhost:4100' });
|
|
17
|
+
|
|
18
|
+
// Create a session
|
|
19
|
+
const session = await client.createSession('my-agent');
|
|
20
|
+
|
|
21
|
+
// Stream messages
|
|
22
|
+
for await (const event of client.sendMessageStream(session.id, 'Hello!')) {
|
|
23
|
+
if (event.type === 'message') {
|
|
24
|
+
process.stdout.write(event.data);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// End session
|
|
29
|
+
await client.endSession(session.id);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Documentation
|
|
33
|
+
|
|
34
|
+
See the [Ash README](https://github.com/ash-ai-org/ash-ai) for full documentation, including the [Python SDK](https://pypi.org/project/ash-ai/).
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
[MIT](https://github.com/ash-ai-org/ash-ai/blob/main/LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ash-ai/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,14 +11,15 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
-
"dist"
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
15
16
|
],
|
|
16
17
|
"publishConfig": {
|
|
17
18
|
"access": "public"
|
|
18
19
|
},
|
|
19
20
|
"repository": {
|
|
20
21
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/ash-ai/ash.git",
|
|
22
|
+
"url": "https://github.com/ash-ai-org/ash-ai.git",
|
|
22
23
|
"directory": "packages/sdk"
|
|
23
24
|
},
|
|
24
25
|
"license": "MIT",
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"claude"
|
|
32
33
|
],
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@ash-ai/shared": "0.0.
|
|
35
|
+
"@ash-ai/shared": "0.0.2"
|
|
35
36
|
},
|
|
36
37
|
"scripts": {
|
|
37
38
|
"build": "tsc",
|