foldkit-agent-a2a 0.3.0 → 0.4.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 +10 -10
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -41,17 +41,11 @@ pnpm add foldkit-agent foldkit-agent-a2a
|
|
|
41
41
|
|
|
42
42
|
## Sixty seconds: card + task handler
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Start with the [Agent contract and host guide](../agent/README.md#usage).
|
|
45
|
+
The integration below assumes `AssistantAgent` is your declared contract and
|
|
46
|
+
`AgentBuilder` is its application-specialized builder. `agentRuntime` is the
|
|
47
|
+
result of binding that contract to your live host and verified principal.
|
|
45
48
|
|
|
46
|
-
```ts
|
|
47
|
-
const AgentBuilder = Agent.forApplication(App).withPrincipal<Principal>()
|
|
48
|
-
const AssistantAgent = AgentBuilder.make({ ... })
|
|
49
|
-
|
|
50
|
-
const agentRuntime = AgentBuilder.bind({
|
|
51
|
-
definition: AssistantAgent,
|
|
52
|
-
host,
|
|
53
|
-
})
|
|
54
|
-
```
|
|
55
49
|
|
|
56
50
|
Generate the static Agent Card from the contract:
|
|
57
51
|
|
|
@@ -70,6 +64,8 @@ const card = AgentA2a.agentCard(AssistantAgent, {
|
|
|
70
64
|
```
|
|
71
65
|
|
|
72
66
|
Serve it from `AgentA2a.AGENT_CARD_PATH` (`/.well-known/agent-card.json`).
|
|
67
|
+
Generating the card starts no HTTP server. Its security declaration describes
|
|
68
|
+
your endpoint; your HTTP layer must authenticate requests and bind the principal.
|
|
73
69
|
|
|
74
70
|
Then serve task calls through the bound runtime:
|
|
75
71
|
|
|
@@ -99,6 +95,10 @@ await served.handle({
|
|
|
99
95
|
})
|
|
100
96
|
```
|
|
101
97
|
|
|
98
|
+
Call `served.close()` when the host shuts down. The handler keeps tasks in
|
|
99
|
+
memory; it is not a durable workflow store or a replacement for the application
|
|
100
|
+
journal.
|
|
101
|
+
|
|
102
102
|
One A2A skill maps to one exposed capability. The request still goes through the
|
|
103
103
|
same runtime checks as WebMCP, MCP, Agent Native, or an in-process caller.
|
|
104
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foldkit-agent-a2a",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "A2A adapter for foldkit-agent. Serves a Foldkit agent contract as an A2A agent.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"foldkit",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
+
"foldkit-plus:source": "./src/index.ts",
|
|
29
30
|
"types": "./dist/index.d.mts",
|
|
30
31
|
"import": "./dist/index.mjs"
|
|
31
32
|
}
|
|
@@ -36,16 +37,17 @@
|
|
|
36
37
|
"LICENSE"
|
|
37
38
|
],
|
|
38
39
|
"peerDependencies": {
|
|
39
|
-
"effect": "
|
|
40
|
-
"foldkit": "^0.
|
|
41
|
-
"foldkit-agent": "^0.
|
|
40
|
+
"effect": ">=4.0.0-rc.116 <4.0.0-rc.118",
|
|
41
|
+
"foldkit": "^0.163.0",
|
|
42
|
+
"foldkit-agent": "^0.5.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"effect": "4.0.0-rc.
|
|
45
|
-
"
|
|
45
|
+
"@effect/platform-browser": "4.0.0-rc.116",
|
|
46
|
+
"effect": "4.0.0-rc.116",
|
|
47
|
+
"foldkit": "0.163.0",
|
|
46
48
|
"tsdown": "^0.23.0",
|
|
47
|
-
"typescript": "
|
|
48
|
-
"foldkit-agent": "0.
|
|
49
|
+
"typescript": "5.9.3",
|
|
50
|
+
"foldkit-agent": "0.5.0"
|
|
49
51
|
},
|
|
50
52
|
"scripts": {
|
|
51
53
|
"build": "tsdown",
|