@dougbots/avenor-core 0.15.0 → 0.16.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 +18 -6
- package/dist/index.d.ts +506 -68
- package/dist/index.js +6625 -392
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -115,15 +115,26 @@ await answerPermissionTool({ runId: 'my-run', optionId: 'allow-once' })
|
|
|
115
115
|
// { ok: true }
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
### `
|
|
118
|
+
### `messageTool`
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
One tool for every message between runs: `tell`, `ask`, `reply`, `resume`, `withdraw` and `control_reply`. It takes a bound `MessageProvider`, which supplies who the call speaks as, how a target resolves, and only the actions that surface can perform.
|
|
121
121
|
|
|
122
122
|
```ts
|
|
123
|
-
import {
|
|
123
|
+
import { messageTool } from '@dougbots/avenor-core'
|
|
124
124
|
|
|
125
|
-
await
|
|
126
|
-
// {
|
|
125
|
+
await messageTool({ action: 'resume', target: 'reverse-string', message: 'Now optimize it for speed' }, provider)
|
|
126
|
+
// { action: 'resume', outcome: 'resumed', text: '...', runId: '...', label: '...' }
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### `peersTool`
|
|
130
|
+
|
|
131
|
+
Lists connected runs, renames a run's display label, or reads a peer's last agent message. Like `messageTool`, it reads through the bound provider.
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
import { peersTool } from '@dougbots/avenor-core'
|
|
135
|
+
|
|
136
|
+
const result = await peersTool({ action: 'list' }, provider)
|
|
137
|
+
console.log(result.text)
|
|
127
138
|
```
|
|
128
139
|
|
|
129
140
|
### `eventsTool`
|
|
@@ -184,6 +195,7 @@ await shutdownTool()
|
|
|
184
195
|
| `statusTool` | function | Query run lifecycle status (single or all) |
|
|
185
196
|
| `resultTool` | function | Wait for and retrieve one run's complete final output |
|
|
186
197
|
| `answerPermissionTool` | function | Answer a pending permission request |
|
|
187
|
-
| `
|
|
198
|
+
| `peersTool` | function | List runs, rename a run's display label, or read a peer's last message |
|
|
199
|
+
| `messageTool` | function | Tell, ask, reply, resume, withdraw or answer a control message |
|
|
188
200
|
| `eventsTool` | function | Read recent events from a run's event log |
|
|
189
201
|
| `shutdownTool` | function | Stop the avenor daemon and clean up |
|