@nelsonlongxiang/dsh-open-a2a-net 0.6.41 → 0.6.42
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 +1 -1
- package/README_zh.md +1 -1
- package/assets/stageDist/assets/index-Bj7S2pA1.css +1 -1
- package/assets/stageDist/assets/index-C-28k_o5.js +974 -974
- package/assets/stageDist/index.html +12 -12
- package/lib/client.js +64 -64
- package/lib/client.js.map +1 -1
- package/lib/index.js +57 -9
- package/lib/origin-claim.js +4 -0
- package/lib/skill/SKILL.md +117 -117
- package/lib/skill/references/collaboration.md +428 -428
- package/lib/skill/references/discovery.md +78 -78
- package/lib/skill/references/intake.md +107 -107
- package/lib/skill/references/membership.md +73 -73
- package/lib/skill/references/pitfalls.md +51 -51
- package/lib/skill/references/router.md +96 -96
- package/lib/skill/references/routing.md +65 -65
- package/lib/types/origin-claim.d.ts +2 -0
- package/nexus-stage/package.json +21 -21
- package/nexus-stage/scripts/mockhost.py +261 -261
- package/nexus-stage/src/canvas-ops.ts +191 -191
- package/nexus-stage/src/canvas-wire.ts +164 -164
- package/nexus-stage/src/cli-home-picker.ts +42 -42
- package/nexus-stage/src/fault.ts +56 -56
- package/nexus-stage/src/federation-overlay.ts +103 -103
- package/nexus-stage/src/federation.ts +241 -241
- package/nexus-stage/src/layout-doc.ts +145 -145
- package/nexus-stage/src/main.ts +513 -513
- package/nexus-stage/src/planning-card-text.ts +73 -73
- package/nexus-stage/src/planning-card.ts +63 -63
- package/nexus-stage/src/planning-edges.ts +26 -26
- package/nexus-stage/src/planning-fit.ts +45 -45
- package/nexus-stage/src/planning-frame-hue.ts +13 -13
- package/nexus-stage/src/planning-legend.ts +39 -39
- package/nexus-stage/src/planning-member-handles.ts +61 -61
- package/nexus-stage/src/planning-menus.ts +422 -422
- package/nexus-stage/src/planning-mirror.ts +75 -75
- package/nexus-stage/src/planning-nodelist.ts +294 -294
- package/nexus-stage/src/planning-overlap.ts +159 -159
- package/nexus-stage/src/planning-reachability.ts +28 -28
- package/nexus-stage/src/planning-relayout.ts +121 -121
- package/nexus-stage/src/planning-roster.ts +15 -15
- package/nexus-stage/src/planning-search.ts +168 -168
- package/nexus-stage/src/planning-types.ts +115 -115
- package/nexus-stage/src/planning-undo.ts +68 -68
- package/nexus-stage/src/planning-view.ts +1499 -1499
- package/nexus-stage/src/planning.css +340 -340
- package/nexus-stage/src/seat-name-editor.ts +31 -31
- package/nexus-stage/src/session-drag.ts +64 -64
- package/nexus-stage/src/viewport.ts +106 -106
- package/nexus-stage/src/wb-chat.ts +684 -684
- package/nexus-stage/src/wb-directory.ts +237 -237
- package/nexus-stage/src/wb-ledger.ts +279 -279
- package/nexus-stage/src/wb-names.ts +43 -43
- package/nexus-stage/src/wb-rail.ts +147 -147
- package/nexus-stage/src/workbench.css +388 -388
- package/nexus-stage/src/workbench.ts +1272 -1272
- package/nexus-stage/src/world.ts +509 -509
- package/nexus-stage/tsconfig.json +24 -24
- package/nexus-stage/vite.config.ts +15 -15
- package/package.json +1 -1
package/lib/skill/SKILL.md
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: a2a-network
|
|
3
|
-
description: Use when a task needs cross-session or cross-node collaboration over the DSH A2A network — setting it up (install, config, apiKey, peers, canvas links for one host, two peers, or hosts that cannot reach each other), joining and teaming, routing work to remote teams and agents, reconciling receipts and the task ledger, and reading the A2A workbench (/__dsh_a2a_nexus/). Covers admission rules, the receipt contract, and the failure shapes that look like bugs but are contract semantics.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# DSH A2A Network
|
|
7
|
-
|
|
8
|
-
Drive the decentralized A2A network: sessions publish agent cards, join a
|
|
9
|
-
membership layer, form canvas teams, and route work to each other through
|
|
10
|
-
`a2a_route`. One plugin (`@nelsonlongxiang/dsh-open-a2a-net`) owns the whole
|
|
11
|
-
surface on every node.
|
|
12
|
-
|
|
13
|
-
## Objects
|
|
14
|
-
|
|
15
|
-
- **Node** — one DSH host process exposing `/.well-known/agent-card.json` and
|
|
16
|
-
the `__dsh_a2a/state` face. Peers discover each other through cards.
|
|
17
|
-
- **Session node** — a live DSH session on a node. Visibility follows
|
|
18
|
-
membership: an unjoined session is invisible to peer discovery AND refused
|
|
19
|
-
at the routing admission gate.
|
|
20
|
-
- **Team** — a routable identity. Two kinds: the node's process team
|
|
21
|
-
(`<zone>/<id8>` from the session id) and canvas teams
|
|
22
|
-
(`<zone>/canvas/<name>`, user-composed multi-member groups).
|
|
23
|
-
- **Task** — one routed round. Carries a task id, an idempotency fingerprint,
|
|
24
|
-
and a receipt contract.
|
|
25
|
-
- **CLI identity** — a transient caller outside any session (the `a2a-net`
|
|
26
|
-
command, 0.6.27+): its own Ed25519 key and a handle `<name>/<16 hex>`,
|
|
27
|
-
deposited on ONE home host for up to 4h, with a mailbox instead of a
|
|
28
|
-
wakeable session. See [cli.md](references/cli.md).
|
|
29
|
-
|
|
30
|
-
## Setting up
|
|
31
|
-
|
|
32
|
-
Start with [setup.md](references/setup.md). It is a checked path for three
|
|
33
|
-
network shapes:
|
|
34
|
-
- **one host**: install, join the sessions, give them a shared team;
|
|
35
|
-
- **two hosts that reach each other**: one shared `apiKey`, `announce` plus
|
|
36
|
-
peers seeded both ways, and a canvas team naming both handles;
|
|
37
|
-
- **hosts that cannot reach each other**: host forwarding is not shipped
|
|
38
|
-
yet (#57), so tunnel or delegate per hop.
|
|
39
|
-
|
|
40
|
-
The owner does the gestures (install, config, join, allowlist, canvas). The
|
|
41
|
-
agent prepares the exact config and verifies each step with `a2a_whoami`,
|
|
42
|
-
`a2a_probe`, `a2a_teams` and one round with a receipt.
|
|
43
|
-
|
|
44
|
-
## Routing (a2a_route)
|
|
45
|
-
|
|
46
|
-
```text
|
|
47
|
-
a2a_route { team: "<zone>/<id8 or canvas name>", message, context_id?, async? }
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
- `async: true` delivers without waiting (`delivered:true` + task id); the
|
|
51
|
-
target routes a receipt — a message starting `[A2A receipt] task <id>` —
|
|
52
|
-
back to your team.
|
|
53
|
-
- Sync (default) waits for the round's final answer. A target on this host
|
|
54
|
-
gets up to 180s; past that the tool answers the delivered shape
|
|
55
|
-
(`TASK_STATE_DELIVERED`) and the receipt contract carries the rest. A
|
|
56
|
-
remote peer's delivery rides a 15s transport budget; if it fires first, the
|
|
57
|
-
result is **-32005 DELIVERED-UNSETTLED**: the delivery landed and the peer
|
|
58
|
-
keeps executing. Either way, **never re-dispatch blindly** — reconcile via
|
|
59
|
-
the task id (the receipt, `a2a_status` activity, or `a2a_tasks`) instead.
|
|
60
|
-
- Model tools cannot route to the bare process team (`<zone>` alone, the
|
|
61
|
-
host's own mailbox): target a session handle or a canvas team.
|
|
62
|
-
- `context_id` from a previous reply continues that conversation.
|
|
63
|
-
|
|
64
|
-
## Membership rules
|
|
65
|
-
|
|
66
|
-
- An unjoined session has NO network: `a2a_route` and `a2a_teams` refuse it
|
|
67
|
-
(join gate), and discovery does not list it. The session that originates a
|
|
68
|
-
task is exempt from the gate.
|
|
69
|
-
- Join through the GUI sidebar (A2A 网络) or the join gate prompt; leave
|
|
70
|
-
through the same surface. Membership is visible; leaving removes you from
|
|
71
|
-
discovery too.
|
|
72
|
-
- Inbound deliveries from a caller with no `caller_session` are refused
|
|
73
|
-
(anonymous injection is a closed hole).
|
|
74
|
-
|
|
75
|
-
## Reading the state
|
|
76
|
-
|
|
77
|
-
`__dsh_a2a/state` (per node, key-gated like every control route) carries
|
|
78
|
-
`sessions` (live/joined, with their teams), `canvas` (canvas teams; remote
|
|
79
|
-
members show `remote: true`), `remote` (peer session rows with `origin` =
|
|
80
|
-
node label + LAN IP and `via` = the peer URL), `activity` (routing ring),
|
|
81
|
-
and the ledger: `tasks` (pending, each with `settleable`),
|
|
82
|
-
`tasksStaleCount`, `tasksDead`, and `archived` (newest 64 settled rows, each
|
|
83
|
-
with `outcome`, `endedBy` and `late`) plus `archivedCount` /
|
|
84
|
-
`archivedSplit`. `sessionTeams` is a card field, not a state field. The A2A
|
|
85
|
-
workbench (`/__dsh_a2a_nexus/`, merged responsive
|
|
86
|
-
shell since 0.6.2 — the 2D planning board is the stage, directory / ledger /
|
|
87
|
-
activity / plan ride a collapsible rail, narrow screens get a drawer)
|
|
88
|
-
renders the same data for humans.
|
|
89
|
-
|
|
90
|
-
## Failure shapes that are contract semantics
|
|
91
|
-
|
|
92
|
-
- `-32000` with "declares no team membership" — the admission gate working
|
|
93
|
-
as designed; join (or route through a teamed member).
|
|
94
|
-
- `-32000` with "caller_session is required" — the delivery had no caller
|
|
95
|
-
identity; the protocol contract requires it.
|
|
96
|
-
- `-32005` — sync wait budget fired; delivery landed, reconcile the task id.
|
|
97
|
-
- "No live DSH session node accepts team X" — no session node on the host
|
|
98
|
-
that received the delivery accepted the round. Either the target session is
|
|
99
|
-
not live/joined there, or X lives on ANOTHER host and the caller delivered
|
|
100
|
-
straight to this host's `/a2a/direct` (the `a2a-net` CLI does this):
|
|
101
|
-
direct delivery never relays to peers — `a2a_route` from a session does.
|
|
102
|
-
- `[PATTERN_NO_MINT]` / `[ALLOWLIST_DENY]` on `a2a_team_join` — only an EXACT
|
|
103
|
-
allowlisted name joins; adding that name is the owner's act of creating
|
|
104
|
-
the team. `[CANVAS_TEAM]` — canvas membership is assigned in the workbench,
|
|
105
|
-
never by the roster tool.
|
|
106
|
-
|
|
107
|
-
## Details
|
|
108
|
-
|
|
109
|
-
- [setup.md](references/setup.md) — setup and checks: one host, two peers, beyond direct peers
|
|
110
|
-
- [routing.md](references/routing.md) — receipts, idempotency, ledger anatomy
|
|
111
|
-
- [discovery.md](references/discovery.md) — cards, peer boundary model, invisibility
|
|
112
|
-
- [membership.md](references/membership.md) — join/leave, allowlist, canvas teams
|
|
113
|
-
- [pitfalls.md](references/pitfalls.md) — operational pitfalls observed in production
|
|
114
|
-
- [cli.md](references/cli.md) — the `a2a-net` CLI: deposit, mailbox, inbox hooks, limits
|
|
115
|
-
- [collaboration.md](references/collaboration.md) — collaboration norm (Chinese): single-seat first, decide-then-report with no pre-authorization (a high-tier change needs one non-self node's review PASS on the same SHA), release tiers, stuck gates, credentials, receipts
|
|
116
|
-
- [intake.md](references/intake.md) — intake node (Chinese): handling `workbench-event` deliveries from workbench-market — accept/decline/ask with a reason, open a GitHub issue on accept, write the decision back with the reply token
|
|
117
|
-
- [router.md](references/router.md) — the chief's system prompt (Chinese), self-contained: route workbench events and owner requests to the right project's dev, order cross-project resource conflicts (it authorizes nothing since collaboration v1.18); immutable layer + self-kept mutable layer
|
|
1
|
+
---
|
|
2
|
+
name: a2a-network
|
|
3
|
+
description: Use when a task needs cross-session or cross-node collaboration over the DSH A2A network — setting it up (install, config, apiKey, peers, canvas links for one host, two peers, or hosts that cannot reach each other), joining and teaming, routing work to remote teams and agents, reconciling receipts and the task ledger, and reading the A2A workbench (/__dsh_a2a_nexus/). Covers admission rules, the receipt contract, and the failure shapes that look like bugs but are contract semantics.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# DSH A2A Network
|
|
7
|
+
|
|
8
|
+
Drive the decentralized A2A network: sessions publish agent cards, join a
|
|
9
|
+
membership layer, form canvas teams, and route work to each other through
|
|
10
|
+
`a2a_route`. One plugin (`@nelsonlongxiang/dsh-open-a2a-net`) owns the whole
|
|
11
|
+
surface on every node.
|
|
12
|
+
|
|
13
|
+
## Objects
|
|
14
|
+
|
|
15
|
+
- **Node** — one DSH host process exposing `/.well-known/agent-card.json` and
|
|
16
|
+
the `__dsh_a2a/state` face. Peers discover each other through cards.
|
|
17
|
+
- **Session node** — a live DSH session on a node. Visibility follows
|
|
18
|
+
membership: an unjoined session is invisible to peer discovery AND refused
|
|
19
|
+
at the routing admission gate.
|
|
20
|
+
- **Team** — a routable identity. Two kinds: the node's process team
|
|
21
|
+
(`<zone>/<id8>` from the session id) and canvas teams
|
|
22
|
+
(`<zone>/canvas/<name>`, user-composed multi-member groups).
|
|
23
|
+
- **Task** — one routed round. Carries a task id, an idempotency fingerprint,
|
|
24
|
+
and a receipt contract.
|
|
25
|
+
- **CLI identity** — a transient caller outside any session (the `a2a-net`
|
|
26
|
+
command, 0.6.27+): its own Ed25519 key and a handle `<name>/<16 hex>`,
|
|
27
|
+
deposited on ONE home host for up to 4h, with a mailbox instead of a
|
|
28
|
+
wakeable session. See [cli.md](references/cli.md).
|
|
29
|
+
|
|
30
|
+
## Setting up
|
|
31
|
+
|
|
32
|
+
Start with [setup.md](references/setup.md). It is a checked path for three
|
|
33
|
+
network shapes:
|
|
34
|
+
- **one host**: install, join the sessions, give them a shared team;
|
|
35
|
+
- **two hosts that reach each other**: one shared `apiKey`, `announce` plus
|
|
36
|
+
peers seeded both ways, and a canvas team naming both handles;
|
|
37
|
+
- **hosts that cannot reach each other**: host forwarding is not shipped
|
|
38
|
+
yet (#57), so tunnel or delegate per hop.
|
|
39
|
+
|
|
40
|
+
The owner does the gestures (install, config, join, allowlist, canvas). The
|
|
41
|
+
agent prepares the exact config and verifies each step with `a2a_whoami`,
|
|
42
|
+
`a2a_probe`, `a2a_teams` and one round with a receipt.
|
|
43
|
+
|
|
44
|
+
## Routing (a2a_route)
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
a2a_route { team: "<zone>/<id8 or canvas name>", message, context_id?, async? }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- `async: true` delivers without waiting (`delivered:true` + task id); the
|
|
51
|
+
target routes a receipt — a message starting `[A2A receipt] task <id>` —
|
|
52
|
+
back to your team.
|
|
53
|
+
- Sync (default) waits for the round's final answer. A target on this host
|
|
54
|
+
gets up to 180s; past that the tool answers the delivered shape
|
|
55
|
+
(`TASK_STATE_DELIVERED`) and the receipt contract carries the rest. A
|
|
56
|
+
remote peer's delivery rides a 15s transport budget; if it fires first, the
|
|
57
|
+
result is **-32005 DELIVERED-UNSETTLED**: the delivery landed and the peer
|
|
58
|
+
keeps executing. Either way, **never re-dispatch blindly** — reconcile via
|
|
59
|
+
the task id (the receipt, `a2a_status` activity, or `a2a_tasks`) instead.
|
|
60
|
+
- Model tools cannot route to the bare process team (`<zone>` alone, the
|
|
61
|
+
host's own mailbox): target a session handle or a canvas team.
|
|
62
|
+
- `context_id` from a previous reply continues that conversation.
|
|
63
|
+
|
|
64
|
+
## Membership rules
|
|
65
|
+
|
|
66
|
+
- An unjoined session has NO network: `a2a_route` and `a2a_teams` refuse it
|
|
67
|
+
(join gate), and discovery does not list it. The session that originates a
|
|
68
|
+
task is exempt from the gate.
|
|
69
|
+
- Join through the GUI sidebar (A2A 网络) or the join gate prompt; leave
|
|
70
|
+
through the same surface. Membership is visible; leaving removes you from
|
|
71
|
+
discovery too.
|
|
72
|
+
- Inbound deliveries from a caller with no `caller_session` are refused
|
|
73
|
+
(anonymous injection is a closed hole).
|
|
74
|
+
|
|
75
|
+
## Reading the state
|
|
76
|
+
|
|
77
|
+
`__dsh_a2a/state` (per node, key-gated like every control route) carries
|
|
78
|
+
`sessions` (live/joined, with their teams), `canvas` (canvas teams; remote
|
|
79
|
+
members show `remote: true`), `remote` (peer session rows with `origin` =
|
|
80
|
+
node label + LAN IP and `via` = the peer URL), `activity` (routing ring),
|
|
81
|
+
and the ledger: `tasks` (pending, each with `settleable`),
|
|
82
|
+
`tasksStaleCount`, `tasksDead`, and `archived` (newest 64 settled rows, each
|
|
83
|
+
with `outcome`, `endedBy` and `late`) plus `archivedCount` /
|
|
84
|
+
`archivedSplit`. `sessionTeams` is a card field, not a state field. The A2A
|
|
85
|
+
workbench (`/__dsh_a2a_nexus/`, merged responsive
|
|
86
|
+
shell since 0.6.2 — the 2D planning board is the stage, directory / ledger /
|
|
87
|
+
activity / plan ride a collapsible rail, narrow screens get a drawer)
|
|
88
|
+
renders the same data for humans.
|
|
89
|
+
|
|
90
|
+
## Failure shapes that are contract semantics
|
|
91
|
+
|
|
92
|
+
- `-32000` with "declares no team membership" — the admission gate working
|
|
93
|
+
as designed; join (or route through a teamed member).
|
|
94
|
+
- `-32000` with "caller_session is required" — the delivery had no caller
|
|
95
|
+
identity; the protocol contract requires it.
|
|
96
|
+
- `-32005` — sync wait budget fired; delivery landed, reconcile the task id.
|
|
97
|
+
- "No live DSH session node accepts team X" — no session node on the host
|
|
98
|
+
that received the delivery accepted the round. Either the target session is
|
|
99
|
+
not live/joined there, or X lives on ANOTHER host and the caller delivered
|
|
100
|
+
straight to this host's `/a2a/direct` (the `a2a-net` CLI does this):
|
|
101
|
+
direct delivery never relays to peers — `a2a_route` from a session does.
|
|
102
|
+
- `[PATTERN_NO_MINT]` / `[ALLOWLIST_DENY]` on `a2a_team_join` — only an EXACT
|
|
103
|
+
allowlisted name joins; adding that name is the owner's act of creating
|
|
104
|
+
the team. `[CANVAS_TEAM]` — canvas membership is assigned in the workbench,
|
|
105
|
+
never by the roster tool.
|
|
106
|
+
|
|
107
|
+
## Details
|
|
108
|
+
|
|
109
|
+
- [setup.md](references/setup.md) — setup and checks: one host, two peers, beyond direct peers
|
|
110
|
+
- [routing.md](references/routing.md) — receipts, idempotency, ledger anatomy
|
|
111
|
+
- [discovery.md](references/discovery.md) — cards, peer boundary model, invisibility
|
|
112
|
+
- [membership.md](references/membership.md) — join/leave, allowlist, canvas teams
|
|
113
|
+
- [pitfalls.md](references/pitfalls.md) — operational pitfalls observed in production
|
|
114
|
+
- [cli.md](references/cli.md) — the `a2a-net` CLI: deposit, mailbox, inbox hooks, limits
|
|
115
|
+
- [collaboration.md](references/collaboration.md) — collaboration norm (Chinese): single-seat first, decide-then-report with no pre-authorization (a high-tier change needs one non-self node's review PASS on the same SHA), release tiers, stuck gates, credentials, receipts
|
|
116
|
+
- [intake.md](references/intake.md) — intake node (Chinese): handling `workbench-event` deliveries from workbench-market — accept/decline/ask with a reason, open a GitHub issue on accept, write the decision back with the reply token
|
|
117
|
+
- [router.md](references/router.md) — the chief's system prompt (Chinese), self-contained: route workbench events and owner requests to the right project's dev, order cross-project resource conflicts (it authorizes nothing since collaboration v1.18); immutable layer + self-kept mutable layer
|