@orkestrel/agent 0.0.19 → 0.0.21
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 -14
- package/dist/src/core/index.cjs +1435 -1010
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +1832 -1222
- package/dist/src/core/index.d.ts +1832 -1222
- package/dist/src/core/index.js +1421 -1011
- package/dist/src/core/index.js.map +1 -1
- package/package.json +22 -24
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# @orkestrel/agent
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
> The conversation runtime for the `@orkestrel` line: a pluggable `ProviderInterface`
|
|
4
|
+
> inference boundary, the conversation layer that feeds it — messages, compaction,
|
|
5
|
+
> instructions, scopes, and prompt assembly — and the bounded context → provider → tools →
|
|
6
|
+
> repeat loop that carries a turn to its end.
|
|
7
|
+
|
|
8
|
+
Build an agent with the `createAgent` function over your own `ProviderInterface`
|
|
9
|
+
implementation, seed the conversation through `agent.context.messages`, then run the turn
|
|
10
|
+
as a one-shot `generate` or a live `stream`. Callable tools come from `@orkestrel/tool`
|
|
11
|
+
and documents from `@orkestrel/workspace`. Part of the `@orkestrel` line.
|
|
12
12
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
@@ -42,18 +42,18 @@ agent.context.messages.add({ role: 'user', content: 'Say hi.' })
|
|
|
42
42
|
|
|
43
43
|
const stream = agent.stream()
|
|
44
44
|
for await (const chunk of stream.events) {
|
|
45
|
-
if (chunk.
|
|
45
|
+
if (chunk.category === 'token') process.stdout.write(chunk.content)
|
|
46
46
|
}
|
|
47
47
|
const result = await stream.result // { content, usage?, partial }
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## Guide
|
|
51
51
|
|
|
52
|
-
[`guides/
|
|
52
|
+
[`guides/agent.md`](guides/agent.md) documents the agent-owned surface:
|
|
53
53
|
the provider boundary, conversations, instructions, scopes, authority, durable
|
|
54
|
-
jobs, the loop, and `AgentContext`. The
|
|
55
|
-
alongside it — [`guides/
|
|
56
|
-
[`guides/
|
|
54
|
+
jobs, the loop, and `AgentContext`. The packages it consumes are mirrored
|
|
55
|
+
alongside it — [`guides/tool.md`](guides/tool.md) for callable tools and
|
|
56
|
+
[`guides/workspace.md`](guides/workspace.md) for files.
|
|
57
57
|
|
|
58
58
|
## Package
|
|
59
59
|
|