@kybernesis/identity 0.1.0 → 0.1.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 +2 -1
- package/dist/instructions.js +1 -1
- package/dist/peers.d.ts +7 -0
- package/dist/peers.js +9 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -48,7 +48,8 @@ export default eveChannel({ auth: [arpAuth(), localDev()] });
|
|
|
48
48
|
- `identityChannel()` — serves `GET /eve/v1/arp/.well-known/agentid-verification`
|
|
49
49
|
(`{ did, challenge }`) and `/eve/v1/arp/health`.
|
|
50
50
|
- `arpPeers()` — on every turn, lists active connections from ARP Cloud and
|
|
51
|
-
exposes `ask_<peer
|
|
51
|
+
exposes `ask_<peer>_agent` tools (the `_agent` suffix keeps them distinct from
|
|
52
|
+
control-plane peers, which are `ask_<peer>`). Pair or revoke in the console; nothing to redeploy.
|
|
52
53
|
- `ARP_INSTRUCTIONS` — append to your instructions so the model uses the tools well.
|
|
53
54
|
|
|
54
55
|
Degrades, never throws at boot: with no credential there are simply no peer
|
package/dist/instructions.js
CHANGED
|
@@ -5,7 +5,7 @@ export const ARP_INSTRUCTIONS = `
|
|
|
5
5
|
## Your .agent identity
|
|
6
6
|
|
|
7
7
|
You have a registered name on the agent network. Other agents that are paired
|
|
8
|
-
with you appear as \`ask_<name
|
|
8
|
+
with you appear as \`ask_<name>_agent\` tools (the name is their .agent name); use them when a request belongs to that
|
|
9
9
|
agent rather than to you. When a message arrives from a paired agent, the
|
|
10
10
|
caller's identity has already been verified and the message has already been
|
|
11
11
|
checked against what its owner allowed — answer it as you would a trusted
|
package/dist/peers.d.ts
CHANGED
|
@@ -20,6 +20,13 @@ export interface ArpPeer {
|
|
|
20
20
|
export declare function discoverPeers(options?: ArpPeersOptions): Promise<ArpPeer[]>;
|
|
21
21
|
/** Send one message to a paired peer through ARP Cloud and return its reply. */
|
|
22
22
|
export declare function askPeer(options: ArpPeersOptions, peer: ArpPeer, message: string): Promise<string>;
|
|
23
|
+
/**
|
|
24
|
+
* `ask_<name>_agent` — the `_agent` suffix is the namespace. Without it the
|
|
25
|
+
* tool collides with `@kybernesis/dispatch`'s control-plane peers (also
|
|
26
|
+
* `ask_<name>`) whenever the same agent is reachable both ways, and eve
|
|
27
|
+
* refuses to run the turn at all ("Dynamic tool ... collides with dynamic
|
|
28
|
+
* resolver"). Hit live on 2026-09-18 with Sid ↔ Kyber.
|
|
29
|
+
*/
|
|
23
30
|
export declare function toolName(peerName: string): string;
|
|
24
31
|
/**
|
|
25
32
|
* Every agent this one is PAIRED with on ARP, as tools — resolved from ARP
|
package/dist/peers.js
CHANGED
|
@@ -58,8 +58,15 @@ export async function askPeer(options, peer, message) {
|
|
|
58
58
|
return `${peer.name} received the message but has not replied yet.`;
|
|
59
59
|
return body.reply;
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* `ask_<name>_agent` — the `_agent` suffix is the namespace. Without it the
|
|
63
|
+
* tool collides with `@kybernesis/dispatch`'s control-plane peers (also
|
|
64
|
+
* `ask_<name>`) whenever the same agent is reachable both ways, and eve
|
|
65
|
+
* refuses to run the turn at all ("Dynamic tool ... collides with dynamic
|
|
66
|
+
* resolver"). Hit live on 2026-09-18 with Sid ↔ Kyber.
|
|
67
|
+
*/
|
|
61
68
|
export function toolName(peerName) {
|
|
62
|
-
return `ask_${peerName.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "")}`;
|
|
69
|
+
return `ask_${peerName.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "")}_agent`;
|
|
63
70
|
}
|
|
64
71
|
/**
|
|
65
72
|
* Every agent this one is PAIRED with on ARP, as tools — resolved from ARP
|
|
@@ -76,7 +83,7 @@ export function arpPeers(options = {}) {
|
|
|
76
83
|
const tools = {};
|
|
77
84
|
for (const peer of peers) {
|
|
78
85
|
tools[toolName(peer.name)] = defineTool({
|
|
79
|
-
description: `Send a message to ${peer.name}, a separate agent paired with you, and get its reply. ` +
|
|
86
|
+
description: `Send a message to ${peer.name}.agent, a separate agent paired with you on the agent network, and get its reply. ` +
|
|
80
87
|
(peer.purpose ? `Paired for: ${peer.purpose}. ` : "") +
|
|
81
88
|
`Every message is checked against the permissions its owner granted and is logged for both sides.`,
|
|
82
89
|
inputSchema: z.object({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kybernesis/identity",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Give an eve agent its .agent identity: verify ARP Cloud push tokens, serve the verification document, and reach paired peers as tools
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Give an eve agent its .agent identity: verify ARP Cloud push tokens, serve the verification document, and reach paired peers as tools \u2014 no daemon, no socket, no key in the bundle.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"exports": {
|