@perkos/perkos-a2a 0.12.12 → 0.12.14
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.
|
@@ -22,6 +22,29 @@ import type { ChatDeliverFrame, ChatMessageInboundFrame } from "./chat-types.js"
|
|
|
22
22
|
* existing co-located deploy keeps its byte-identical behavior — both the
|
|
23
23
|
* skipped body-read and the same throw-on-non-2xx path.
|
|
24
24
|
*/
|
|
25
|
+
/**
|
|
26
|
+
* Build the Hermes delivery URL, inserting the multiplex profile prefix for a
|
|
27
|
+
* CO-RESIDENT agent (Phase 1 multi-agent). Hermes serves the default profile at
|
|
28
|
+
* the root and each named profile under `/p/<profile>/`, so a co-resident's
|
|
29
|
+
* bridge posts to `.../p/<profile>/<endpoint>`. No profile → the default
|
|
30
|
+
* profile at the root (single-agent, unchanged). Pure — unit-testable.
|
|
31
|
+
*/
|
|
32
|
+
export declare function hermesDeliveryUrl(baseUrl: string, endpoint: string, profile?: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* The agent's SOUL / persona, passed by the bridge as the request-level system
|
|
35
|
+
* prompt (Phase 1 multi-agent). Hermes appends `instructions` (Responses API) /
|
|
36
|
+
* `system_message` to the base system prompt (conversation_loop appends, never
|
|
37
|
+
* replaces), so the persona is applied WITHOUT dropping tool instructions.
|
|
38
|
+
*
|
|
39
|
+
* Why the bridge carries it: the Hermes `api_server` platform is NOT
|
|
40
|
+
* multiplex-aware — it has no `/p/<profile>/` route and never enters
|
|
41
|
+
* `_profile_runtime_scope`, so a co-resident's `/v1/responses` turn loads the
|
|
42
|
+
* DEFAULT profile's home and misses the co-resident's `SOUL.md`. Carrying the
|
|
43
|
+
* SOUL in the request makes each co-resident (and the host) reply in-persona
|
|
44
|
+
* regardless of the runtime's profile home-scoping. Empty → omitted (byte-
|
|
45
|
+
* identical single-agent body). Base64 so the multi-line SOUL survives the env.
|
|
46
|
+
*/
|
|
47
|
+
export declare function personaInstructions(): string;
|
|
25
48
|
export declare function deliverToHermes(config: A2APluginConfig, message: string, wantResponse?: boolean): Promise<unknown>;
|
|
26
49
|
/** Whether the standalone bridge should auto-deliver Hermes replies back through chat. */
|
|
27
50
|
export declare function autoReplyEnabled(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-chat-reply.d.ts","sourceRoot":"","sources":["../src/bridge-chat-reply.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAEjF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,MAAM,EACf,YAAY,UAAQ,GACnB,OAAO,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"bridge-chat-reply.d.ts","sourceRoot":"","sources":["../src/bridge-chat-reply.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAEjF;;;;;;;;;;;;;GAaG;AACH;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAK7F;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAQ5C;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,MAAM,EACf,YAAY,UAAQ,GACnB,OAAO,CAAC,OAAO,CAAC,CAiDlB;AAED,0FAA0F;AAC1F,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;;;;;;;;GASG;AACH,wBAA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 +20,54 @@
|
|
|
20
20
|
* existing co-located deploy keeps its byte-identical behavior — both the
|
|
21
21
|
* skipped body-read and the same throw-on-non-2xx path.
|
|
22
22
|
*/
|
|
23
|
+
/**
|
|
24
|
+
* Build the Hermes delivery URL, inserting the multiplex profile prefix for a
|
|
25
|
+
* CO-RESIDENT agent (Phase 1 multi-agent). Hermes serves the default profile at
|
|
26
|
+
* the root and each named profile under `/p/<profile>/`, so a co-resident's
|
|
27
|
+
* bridge posts to `.../p/<profile>/<endpoint>`. No profile → the default
|
|
28
|
+
* profile at the root (single-agent, unchanged). Pure — unit-testable.
|
|
29
|
+
*/
|
|
30
|
+
export function hermesDeliveryUrl(baseUrl, endpoint, profile) {
|
|
31
|
+
const base = baseUrl.replace(/\/+$/, "");
|
|
32
|
+
const prefix = profile ? `/p/${encodeURIComponent(profile)}` : "";
|
|
33
|
+
const ep = endpoint.startsWith("/") ? endpoint : `/${endpoint}`;
|
|
34
|
+
return `${base}${prefix}${ep}`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The agent's SOUL / persona, passed by the bridge as the request-level system
|
|
38
|
+
* prompt (Phase 1 multi-agent). Hermes appends `instructions` (Responses API) /
|
|
39
|
+
* `system_message` to the base system prompt (conversation_loop appends, never
|
|
40
|
+
* replaces), so the persona is applied WITHOUT dropping tool instructions.
|
|
41
|
+
*
|
|
42
|
+
* Why the bridge carries it: the Hermes `api_server` platform is NOT
|
|
43
|
+
* multiplex-aware — it has no `/p/<profile>/` route and never enters
|
|
44
|
+
* `_profile_runtime_scope`, so a co-resident's `/v1/responses` turn loads the
|
|
45
|
+
* DEFAULT profile's home and misses the co-resident's `SOUL.md`. Carrying the
|
|
46
|
+
* SOUL in the request makes each co-resident (and the host) reply in-persona
|
|
47
|
+
* regardless of the runtime's profile home-scoping. Empty → omitted (byte-
|
|
48
|
+
* identical single-agent body). Base64 so the multi-line SOUL survives the env.
|
|
49
|
+
*/
|
|
50
|
+
export function personaInstructions() {
|
|
51
|
+
const b64 = process.env.PERKOS_AGENT_SOUL_B64 || "";
|
|
52
|
+
if (!b64.trim())
|
|
53
|
+
return "";
|
|
54
|
+
try {
|
|
55
|
+
return Buffer.from(b64, "base64").toString("utf8").trim();
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return "";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
23
61
|
export async function deliverToHermes(config, message, wantResponse = false) {
|
|
24
62
|
const runtime = config.runtime || {};
|
|
25
63
|
const baseUrl = (runtime.hermesUrl || process.env.HERMES_API_URL || process.env.HERMES_WORKSPACE_URL || "http://127.0.0.1:8642").replace(/\/+$/, "");
|
|
26
64
|
const endpoint = runtime.hermesEndpoint || process.env.HERMES_API_ENDPOINT || process.env.HERMES_WORKSPACE_ENDPOINT || "/v1/responses";
|
|
27
65
|
const sessionKey = runtime.sessionKey || process.env.HERMES_SESSION_ID || process.env.HERMES_SESSION_KEY || "a2a";
|
|
28
66
|
const token = runtime.hermesToken || process.env.API_SERVER_KEY || process.env.HERMES_API_KEY || process.env.HERMES_WORKSPACE_TOKEN || process.env.HERMES_SESSION_TOKEN;
|
|
29
|
-
|
|
67
|
+
// Co-resident routing: a named Hermes profile is reached via /p/<profile>/.
|
|
68
|
+
// Set per co-resident bridge sidecar (env PERKOS_HERMES_PROFILE or config).
|
|
69
|
+
const profile = runtime.hermesProfile || process.env.PERKOS_HERMES_PROFILE || "";
|
|
70
|
+
const url = hermesDeliveryUrl(baseUrl, endpoint, profile);
|
|
30
71
|
const headers = {
|
|
31
72
|
"content-type": "application/json",
|
|
32
73
|
"x-hermes-session-id": sessionKey,
|
|
@@ -35,12 +76,23 @@ export async function deliverToHermes(config, message, wantResponse = false) {
|
|
|
35
76
|
if (token)
|
|
36
77
|
headers.authorization = `Bearer ${token}`;
|
|
37
78
|
const normalizedEndpoint = endpoint.replace(/^\/?/, "/");
|
|
79
|
+
// Persona (SOUL) as the request-level system prompt — Hermes appends it to
|
|
80
|
+
// the base prompt, so the agent stays in-character even when the api_server
|
|
81
|
+
// platform can't resolve the co-resident's profile home. See personaInstructions().
|
|
82
|
+
const persona = personaInstructions();
|
|
38
83
|
const body = normalizedEndpoint.startsWith("/v1/chat/completions")
|
|
39
|
-
? {
|
|
84
|
+
? {
|
|
85
|
+
model: process.env.HERMES_MODEL || "hermes-agent",
|
|
86
|
+
messages: [
|
|
87
|
+
...(persona ? [{ role: "system", content: persona }] : []),
|
|
88
|
+
{ role: "user", content: message },
|
|
89
|
+
],
|
|
90
|
+
stream: false,
|
|
91
|
+
}
|
|
40
92
|
: normalizedEndpoint.startsWith("/v1/runs")
|
|
41
|
-
? { input: message, session_id: sessionKey }
|
|
93
|
+
? { input: message, session_id: sessionKey, ...(persona ? { instructions: persona } : {}) }
|
|
42
94
|
: normalizedEndpoint.startsWith("/v1/responses")
|
|
43
|
-
? { model: process.env.HERMES_MODEL || "hermes-agent", input: message, store: true }
|
|
95
|
+
? { model: process.env.HERMES_MODEL || "hermes-agent", input: message, store: true, ...(persona ? { instructions: persona } : {}) }
|
|
44
96
|
: { sessionKey, message };
|
|
45
97
|
const response = await fetch(url, { method: "POST", headers, body: JSON.stringify(body) });
|
|
46
98
|
if (!response.ok) {
|
|
@@ -133,6 +185,18 @@ export async function handleChatDeliver(opts) {
|
|
|
133
185
|
const wallet = parseWalletFromIdentity(frame.from);
|
|
134
186
|
if (wallet)
|
|
135
187
|
convRegistry.touch(frame.convId, wallet, "user");
|
|
188
|
+
// Auto-reply mode with no user wallet on the frame — e.g. an
|
|
189
|
+
// agent-to-agent message in a shared channel. A `chat_reply` REQUIRES a
|
|
190
|
+
// `walletAddress` to route, so we could never deliver a reply anyway.
|
|
191
|
+
// Skip BEFORE the Hermes call so we don't spend an LLM turn producing a
|
|
192
|
+
// reply we'd immediately discard (real cost + noise on a busy fleet).
|
|
193
|
+
// This is the expected shape of channel chatter, not a fault — log at
|
|
194
|
+
// info, not error. The flag-off (co-located callback) path is untouched:
|
|
195
|
+
// it still delivers every frame to Hermes, byte-identically.
|
|
196
|
+
if (autoReply && !wallet) {
|
|
197
|
+
logger.info?.(`[perkos-chat] no user wallet on frame from ${frame.from}; skipping auto-reply (LLM not invoked)`);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
136
200
|
const hermesResp = await deliverToHermes(config, buildMessage(frame), autoReply);
|
|
137
201
|
if (!autoReply)
|
|
138
202
|
return;
|
|
@@ -141,13 +205,9 @@ export async function handleChatDeliver(opts) {
|
|
|
141
205
|
logger.error(`[perkos-chat] no assistant text in Hermes response for conv ${frame.convId}`);
|
|
142
206
|
return;
|
|
143
207
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
// address a chat_reply without a wallet, so just log and bail rather
|
|
147
|
-
// than silently dropping the text.
|
|
148
|
-
logger.error(`[perkos-chat] auto-reply skipped: no wallet parsed from ${frame.from}`);
|
|
208
|
+
// `autoReply` is true here, so the guard above guarantees a wallet.
|
|
209
|
+
if (!wallet)
|
|
149
210
|
return;
|
|
150
|
-
}
|
|
151
211
|
const chat = getChat();
|
|
152
212
|
if (!chat) {
|
|
153
213
|
logger.error(`[perkos-chat] auto-reply skipped: chat client not initialized`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-chat-reply.js","sourceRoot":"","sources":["../src/bridge-chat-reply.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAuB,EACvB,OAAe,EACf,YAAY,GAAG,KAAK;IAEpB,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;IACrC,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,uBAAuB,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACrJ,MAAM,QAAQ,GAAG,OAAO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