@kybernesis/dispatch 0.6.4 → 0.8.0
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/dist/governed-peers.js +8 -0
- package/dist/remote-peer.d.ts +0 -6
- package/dist/remote-peer.js +1 -2
- package/package.json +7 -6
package/dist/governed-peers.js
CHANGED
|
@@ -149,6 +149,14 @@ async function ask(options, peer, message, asker) {
|
|
|
149
149
|
const detail = event.data?.message;
|
|
150
150
|
throw new Error(`${peer.name} failed to answer${detail ? `: ${detail}` : "."}`);
|
|
151
151
|
}
|
|
152
|
+
// eve ≥0.69 holds the peer's turn open at a question from inside one of
|
|
153
|
+
// its tools instead of ending it. Nobody on this side can answer it, so
|
|
154
|
+
// say so now rather than waiting out the whole timeout.
|
|
155
|
+
if (event.type === "turn.waiting" && event.data?.on === "input") {
|
|
156
|
+
await reader.cancel().catch(() => { });
|
|
157
|
+
reply = ""; // what it said before the question is not its answer
|
|
158
|
+
throw new Error(`${peer.name} is waiting for someone on its side to answer a question or approve a step, so it cannot reply yet.`);
|
|
159
|
+
}
|
|
152
160
|
if (event.type === "session.waiting" || event.type === "turn.completed") {
|
|
153
161
|
await reader.cancel().catch(() => { });
|
|
154
162
|
if (reply)
|
package/dist/remote-peer.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { defineRemoteAgent } from "eve";
|
|
2
1
|
import { type GovernedOptions } from "./governed.js";
|
|
3
2
|
/** Options for {@link remotePeer}. */
|
|
4
3
|
export interface RemotePeerOptions {
|
|
@@ -42,11 +41,6 @@ export interface RemotePeerOptions {
|
|
|
42
41
|
* app itself (service identity) rather than from the human behind it.
|
|
43
42
|
*/
|
|
44
43
|
forwardPrincipal?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* JSON Schema for task-mode structured output. When set, the peer returns
|
|
47
|
-
* one validated result object instead of free text.
|
|
48
|
-
*/
|
|
49
|
-
outputSchema?: Parameters<typeof defineRemoteAgent>[0]["outputSchema"];
|
|
50
44
|
}
|
|
51
45
|
/**
|
|
52
46
|
* Declares a separately deployed eve agent as a callable peer of this agent.
|
package/dist/remote-peer.js
CHANGED
|
@@ -32,7 +32,7 @@ import { createA2ASessionSource } from "./governed.js";
|
|
|
32
32
|
* refuses → dispatches 403 within the token TTL.
|
|
33
33
|
*/
|
|
34
34
|
export function remotePeer(options) {
|
|
35
|
-
const { envVar, fallbackUrl, description,
|
|
35
|
+
const { envVar, fallbackUrl, description, callee, governed } = options;
|
|
36
36
|
if (governed && !callee) {
|
|
37
37
|
throw new Error("remotePeer: governed mode requires `callee` (the peer's registered control-plane name).");
|
|
38
38
|
}
|
|
@@ -74,6 +74,5 @@ export function remotePeer(options) {
|
|
|
74
74
|
description,
|
|
75
75
|
auth,
|
|
76
76
|
forwardPrincipal: options.forwardPrincipal ?? true,
|
|
77
|
-
...(outputSchema !== undefined ? { outputSchema } : {}),
|
|
78
77
|
});
|
|
79
78
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kybernesis/dispatch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Agent-to-agent dispatch for eve agents: declared remote-peer edges with principal forwarding on by default, and a receiver channel that makes trusting the wrong caller hard to express.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"prepublishOnly": "node ../../scripts/prepublish.mjs"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@kybernesis/enterprise": "^0.
|
|
34
|
+
"@kybernesis/enterprise": "^0.10.0",
|
|
35
35
|
"@types/node": "24.x",
|
|
36
|
-
"eve": "
|
|
36
|
+
"eve": "0.81.1",
|
|
37
37
|
"typescript": "7.0.2"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@kybernesis/enterprise": "
|
|
41
|
-
"eve": ">=0.
|
|
40
|
+
"@kybernesis/enterprise": "^0.10.0",
|
|
41
|
+
"eve": ">=0.81.1 <0.82.0"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=20"
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"directory": "packages/dispatch"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
|
-
"access": "public"
|
|
52
|
+
"access": "public",
|
|
53
|
+
"tag": "eve-0.81"
|
|
53
54
|
},
|
|
54
55
|
"peerDependenciesMeta": {
|
|
55
56
|
"@kybernesis/enterprise": {
|