@toren-run/client 0.1.0 → 0.1.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 +14 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @toren-run/client
|
|
2
|
+
|
|
3
|
+
Typed, zero-dependency client for a [Toren](https://toren.run) deployment's HTTP API. Trigger durable agent runs, poll them, resolve approvals, upload files, and hold sessions, from any Node or edge runtime with global `fetch`.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { TorenClient } from "@toren-run/client";
|
|
7
|
+
|
|
8
|
+
const client = new TorenClient({ url: "https://agents.example.com", token: process.env.TOREN_API_TOKEN! });
|
|
9
|
+
const { runId } = await client.startRun({ input: JSON.stringify(["solar shipping"]), process: "weekly-report" });
|
|
10
|
+
const done = await client.waitForRun(runId);
|
|
11
|
+
console.log(done.run.output);
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The full surface (runs, sessions, approvals, files, errors) is half a page: [toren.run/docs/reference/client](https://toren.run/docs/reference/client). Apache-2.0.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toren-run/client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"zod": "^3.23.0",
|
|
13
|
-
"
|
|
14
|
-
"toren-run": "^0.1.
|
|
13
|
+
"toren-run": "^0.1.2",
|
|
14
|
+
"@toren-run/core": "^0.1.2"
|
|
15
15
|
},
|
|
16
16
|
"description": "TypeScript client SDK for the Toren HTTP API.",
|
|
17
17
|
"license": "Apache-2.0",
|