foldkit-agent-a2a 0.2.0 → 0.2.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 +34 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
# `foldkit-agent-a2a`
|
|
2
2
|
|
|
3
|
-
Serves a [`foldkit-agent`](
|
|
4
|
-
can use the capabilities an application already exposes.
|
|
3
|
+
Serves a [`foldkit-agent`](https://github.com/doeixd/foldkit-plus/tree/main/packages/agent) contract as an A2A
|
|
4
|
+
agent, so another agent can use the capabilities an application already exposes.
|
|
5
|
+
|
|
6
|
+
[A2A](https://a2a-protocol.org) is a protocol for agents calling other agents.
|
|
7
|
+
An A2A server publishes an **Agent Card** describing its skills, and a client
|
|
8
|
+
sends it work as **tasks** it can poll and cancel. This package derives the card
|
|
9
|
+
from the contract and turns each `message/send` into one dispatch, so another
|
|
10
|
+
agent's request becomes a Foldkit Message and nothing else.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
5
13
|
|
|
6
14
|
```bash
|
|
7
15
|
pnpm add foldkit-agent foldkit-agent-a2a
|
|
8
16
|
```
|
|
9
17
|
|
|
18
|
+
`foldkit`, `effect`, and `foldkit-agent` are peer dependencies. `agentRuntime`
|
|
19
|
+
below is what `Agent.bind({ definition, host })` returns.
|
|
20
|
+
|
|
10
21
|
## The Agent Card
|
|
11
22
|
|
|
12
23
|
One exposed capability is one skill:
|
|
@@ -77,3 +88,24 @@ Message arrives — which is why completion tracking had to come first.
|
|
|
77
88
|
`message/stream` is refused rather than answered with something a client cannot
|
|
78
89
|
consume. Multi-turn conversations, `input-required`, `auth-required`, file parts
|
|
79
90
|
and artifacts are also out of scope for now.
|
|
91
|
+
|
|
92
|
+
## Choosing an adapter
|
|
93
|
+
|
|
94
|
+
All four serve the same contract, so serving two at once is two calls, not two
|
|
95
|
+
definitions.
|
|
96
|
+
|
|
97
|
+
| Where the agent runs | Adapter |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| In the page, beside the user | [`foldkit-agent-webmcp`](https://github.com/doeixd/foldkit-plus/tree/main/packages/agent-webmcp) |
|
|
100
|
+
| An external MCP client, over stdio or HTTP | [`foldkit-agent-mcp`](https://github.com/doeixd/foldkit-plus/tree/main/packages/agent-mcp) |
|
|
101
|
+
| Another agent, over A2A | [`foldkit-agent-a2a`](https://github.com/doeixd/foldkit-plus/tree/main/packages/agent-a2a) |
|
|
102
|
+
| An Agent Native host | [`foldkit-agent-native`](https://github.com/doeixd/foldkit-plus/tree/main/packages/agent-native) |
|
|
103
|
+
|
|
104
|
+
## See also
|
|
105
|
+
|
|
106
|
+
- [The agents guide](https://github.com/doeixd/foldkit-plus/blob/main/docs/agents.md) — what an agent may see and
|
|
107
|
+
do, and why a capability is a Message.
|
|
108
|
+
- [`foldkit-agent`](https://github.com/doeixd/foldkit-plus/tree/main/packages/agent) — the contract this adapter
|
|
109
|
+
serves, and where `Agent.bind` produces the runtime it takes.
|
|
110
|
+
- [`examples/todo`](https://github.com/doeixd/foldkit-plus/tree/main/examples/todo) — a worked contract with a
|
|
111
|
+
hand-written host.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foldkit-agent-a2a",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A2A adapter for foldkit-agent. Serves a Foldkit agent contract as an A2A agent.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"foldkit",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"effect": "^4.0.0-rc.112",
|
|
40
40
|
"foldkit": "^0.158.2",
|
|
41
|
-
"foldkit-agent": "^0.2.
|
|
41
|
+
"foldkit-agent": "^0.2.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"effect": "4.0.0-rc.112",
|
|
45
45
|
"foldkit": "0.158.2",
|
|
46
46
|
"tsdown": "^0.23.0",
|
|
47
47
|
"typescript": "^5.7.2",
|
|
48
|
-
"foldkit-agent": "0.2.
|
|
48
|
+
"foldkit-agent": "0.2.1"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsdown",
|