@masons/agent-network 0.6.19 → 0.6.21
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/channel-setup.d.ts.map +1 -1
- package/dist/channel-setup.js +2 -1
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +54 -44
- package/dist/cli-setup.d.ts.map +1 -1
- package/dist/cli-setup.js +18 -4
- package/dist/config-fs.d.ts +1 -1
- package/dist/config-fs.d.ts.map +1 -1
- package/dist/config-fs.js +2 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +8 -2
- package/dist/connector-client.d.ts +35 -4
- package/dist/connector-client.d.ts.map +1 -1
- package/dist/connector-client.js +126 -19
- package/dist/conversation-manager-context.d.ts +4 -0
- package/dist/conversation-manager-context.d.ts.map +1 -0
- package/dist/conversation-manager-context.js +8 -0
- package/dist/conversation-manager.d.ts +29 -4
- package/dist/conversation-manager.d.ts.map +1 -1
- package/dist/conversation-manager.js +163 -14
- package/dist/handoff-deadline.d.ts +4 -0
- package/dist/handoff-deadline.d.ts.map +1 -0
- package/dist/handoff-deadline.js +7 -0
- package/dist/handoff.d.ts +1 -2
- package/dist/handoff.d.ts.map +1 -1
- package/dist/handoff.js +20 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/platform-client.d.ts +1 -0
- package/dist/platform-client.d.ts.map +1 -1
- package/dist/platform-client.js +12 -0
- package/dist/plugin.d.ts +2 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +49 -30
- package/dist/sent-message-buffer.d.ts +2 -3
- package/dist/sent-message-buffer.d.ts.map +1 -1
- package/dist/sent-message-buffer.js +8 -11
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +101 -7
- package/dist/turn-context.d.ts +0 -4
- package/dist/turn-context.d.ts.map +1 -1
- package/dist/turn-context.js +0 -18
- package/dist/types.d.ts +10 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/ws-heartbeat.d.ts +23 -0
- package/dist/ws-heartbeat.d.ts.map +1 -0
- package/dist/ws-heartbeat.js +63 -0
- package/openclaw.plugin.json +2 -1
- package/package.json +1 -1
- package/skills/agent-network/SKILL.md +9 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-setup.d.ts","sourceRoot":"","sources":["../src/channel-setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"channel-setup.d.ts","sourceRoot":"","sources":["../src/channel-setup.ts"],"names":[],"mappings":"AAiBA,UAAU,wBAAwB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IAMnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuBD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAKD,wBAAgB,6BAA6B,IAAI,wBAAwB,CAKxE;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAqC7B;AAED,wBAAgB,qBAAqB,IAAI,kBAAkB,GAAG,IAAI,CAejE;AAED,wBAAgB,yBAAyB,IAAI,kBAAkB,GAAG,IAAI,CAMrE;AAmED,wBAAgB,4BAA4B,IAAI,IAAI,CAGnD;AAED,eAAO,MAAM,oBAAoB,QAAqB,CAAC"}
|
package/dist/channel-setup.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readExistingConnectorUrl, writeCredentials, } from "./config.js";
|
|
2
2
|
import { resolveConnectorUrlForSetup } from "./connector-url-boundary.js";
|
|
3
3
|
import { beginBridgeHandoff, completeBridgeHandoff, DEFAULT_IDP_BASE_URL, HANDOFF_TIMEOUT_MS, SetupFlowError, } from "./handoff.js";
|
|
4
|
+
import { assertHandoffDeadlineActive } from "./handoff-deadline.js";
|
|
4
5
|
import { DEFAULT_API_HOST } from "./platform-client.js";
|
|
5
6
|
let pendingSetup = null;
|
|
6
7
|
let lastSetupStatus = null;
|
|
@@ -91,7 +92,7 @@ async function completePendingSetup(record) {
|
|
|
91
92
|
connectorUrl: record.connectorUrl,
|
|
92
93
|
token: handoff.token,
|
|
93
94
|
};
|
|
94
|
-
await writeCredentials(creds, record.apiHost, record.idpBaseUrl, record.invitedBy);
|
|
95
|
+
await writeCredentials(creds, record.apiHost, record.idpBaseUrl, record.invitedBy, () => assertHandoffDeadlineActive(record.session.expiresAt));
|
|
95
96
|
lastSetupStatus = {
|
|
96
97
|
status: "completed",
|
|
97
98
|
agentHandle: handoff.agent.handle,
|
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACd,MAAM,kCAAkC,CAAC;AAa1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACd,MAAM,kCAAkC,CAAC;AAa1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAwD9D,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAEvD;AAOD,wBAAgB,2BAA2B,IAAI,OAAO,CAIrD;AAGD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAE/D;AAeD,wBAAgB,sCAAsC,CACpD,oBAAoB,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,sBAAsB,CAAC,EACjF,MAAM,EAAE;IACN,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,GACA,MAAM,CAiBR;AAED,iBAAS,iCAAiC,CACxC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,gBAAgB,UAAQ,GACvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA8CzB;AAED,eAAO,MAAM,4CAA4C,0CACtB,CAAC;AAkkBpC,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,mBAAmB,CAkSlE,CAAC"}
|
package/dist/channel.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createHash, randomUUID } from "node:crypto";
|
|
2
2
|
import createDebug from "debug";
|
|
3
3
|
import { clearConnectorClient, clearConversationManager, extractNetworkConfig, getDmScope, initConnectorClient, initConversationManager, initToolConfig, isIdentityLinksConfigured, requirePlatformConfig, requirePluginRuntime, } from "./config.js";
|
|
4
|
-
import { ConnectorClient } from "./connector-client.js";
|
|
4
|
+
import { ConnectorClient, ConnectorError, SendOutcomeUnknownError, } from "./connector-client.js";
|
|
5
5
|
import { ConversationManager } from "./conversation-manager.js";
|
|
6
|
+
import { runWithConversationManagerContext } from "./conversation-manager-context.js";
|
|
6
7
|
import { clearEnvironmentContext } from "./environment-context.js";
|
|
7
8
|
import { extractHandleFromAddress } from "./handle-utils.js";
|
|
8
9
|
import { clearOwnerState, isOwnerAddress, markOwnerAddress, setCurrentTurnIsOwner, setCurrentTurnOwnerSignal, } from "./owner-session-state.js";
|
|
@@ -10,7 +11,6 @@ import { ServicesRetainedRecipientConsumer, } from "./services-retained-recipien
|
|
|
10
11
|
import { isServicesRetainedReplyContext, runWithServicesRetainedReplyContext, } from "./services-retained-reply-context.js";
|
|
11
12
|
import { runWithServicesRetainedToolPolicy } from "./services-retained-tool-policy.js";
|
|
12
13
|
import { createReplyTraceMetadata, ensureTraceMetadata, } from "./trace-metadata.js";
|
|
13
|
-
import { setCurrentTurnSender, setCurrentTurnSenderAddress, } from "./turn-context.js";
|
|
14
14
|
import { checkForUpdate } from "./update-check.js";
|
|
15
15
|
const dbg = createDebug("agent-network:channel");
|
|
16
16
|
const SERVICES_RETAINED_INBOX_PEER = "agent-network:services-retained-node-inbox";
|
|
@@ -115,34 +115,27 @@ function deriveSenderName(event) {
|
|
|
115
115
|
if (visitorName && typeof visitorName === "string") {
|
|
116
116
|
return visitorName;
|
|
117
117
|
}
|
|
118
|
-
return
|
|
118
|
+
return event.from;
|
|
119
119
|
}
|
|
120
120
|
function deriveNodeName(nodeRef, fromAddress) {
|
|
121
121
|
if (nodeRef.displayName)
|
|
122
122
|
return nodeRef.displayName;
|
|
123
123
|
if (nodeRef.handle)
|
|
124
124
|
return nodeRef.handle;
|
|
125
|
-
return
|
|
125
|
+
return fromAddress;
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
if (recentMessages.size > 200) {
|
|
140
|
-
for (const [k, ts] of recentMessages) {
|
|
141
|
-
if (now - ts > DEDUP_WINDOW_MS)
|
|
142
|
-
recentMessages.delete(k);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return false;
|
|
127
|
+
function agentReadableAddressedBody(event) {
|
|
128
|
+
const facts = [
|
|
129
|
+
...(event.messageId === undefined
|
|
130
|
+
? []
|
|
131
|
+
: [`message_id=${JSON.stringify(event.messageId)}`]),
|
|
132
|
+
...(event.sentAt === undefined
|
|
133
|
+
? []
|
|
134
|
+
: [`sent_at=${JSON.stringify(event.sentAt)}`]),
|
|
135
|
+
];
|
|
136
|
+
if (facts.length === 0)
|
|
137
|
+
return event.content;
|
|
138
|
+
return [`[MASONS message facts: ${facts.join("; ")}]`, event.content].join("\n\n");
|
|
146
139
|
}
|
|
147
140
|
async function handleAddressedMessage(event, conversationManager, client, ctx, options = {}) {
|
|
148
141
|
const fromAddress = event.from;
|
|
@@ -155,11 +148,6 @@ async function handleAddressedMessage(event, conversationManager, client, ctx, o
|
|
|
155
148
|
console.warn(`[agent-network:channel] invalid traceparent from=${fromAddress} traceId=${inboundTrace.traceId} spanName=receive`);
|
|
156
149
|
}
|
|
157
150
|
}
|
|
158
|
-
if (options.servicesRetained === undefined &&
|
|
159
|
-
isDuplicate(fromAddress, event.content, event.sentAt)) {
|
|
160
|
-
dbg("duplicate message suppressed from=%s sentAt=%s", fromAddress, event.sentAt);
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
151
|
const inboundCorrelationId = typeof metadata.correlation_id === "string"
|
|
164
152
|
? metadata.correlation_id
|
|
165
153
|
: undefined;
|
|
@@ -204,11 +192,10 @@ async function handleAddressedMessage(event, conversationManager, client, ctx, o
|
|
|
204
192
|
(nodeRef ? deriveNodeName(nodeRef, fromAddress) : deriveSenderName(event));
|
|
205
193
|
const replyAddress = options.routableReplyAddress ??
|
|
206
194
|
(options.servicesRetained ? undefined : fromAddress);
|
|
207
|
-
if (replyAddress &&
|
|
195
|
+
if (replyAddress &&
|
|
196
|
+
!conversationManager.refreshInboundPortrayal(contact, replyAddress)) {
|
|
208
197
|
conversationManager.registerInbound(contact, replyAddress);
|
|
209
198
|
}
|
|
210
|
-
setCurrentTurnSender(contact);
|
|
211
|
-
setCurrentTurnSenderAddress(replyAddress ?? null);
|
|
212
199
|
let runtime;
|
|
213
200
|
try {
|
|
214
201
|
runtime = requirePluginRuntime();
|
|
@@ -247,7 +234,9 @@ async function handleAddressedMessage(event, conversationManager, client, ctx, o
|
|
|
247
234
|
})
|
|
248
235
|
: route.sessionKey;
|
|
249
236
|
const msgCtx = runtime.channel.reply.finalizeInboundContext({
|
|
250
|
-
Body:
|
|
237
|
+
Body: options.servicesRetained === undefined
|
|
238
|
+
? agentReadableAddressedBody(event)
|
|
239
|
+
: event.content,
|
|
251
240
|
RawBody: event.content,
|
|
252
241
|
CommandBody: event.content,
|
|
253
242
|
From: senderId,
|
|
@@ -321,25 +310,39 @@ async function handleAddressedMessage(event, conversationManager, client, ctx, o
|
|
|
321
310
|
messageId: inboundMessageId,
|
|
322
311
|
});
|
|
323
312
|
const deliverResult = await conversationManager.send(replyAddress, text, replyTrace.metadata);
|
|
313
|
+
dbg("deliver reply senderId=%s status=%s ackStatus=%s contentLength=%d traceId=%s originalTraceId=%s spanName=send", senderId, deliverResult.status, deliverResult.status === "sent"
|
|
314
|
+
? deliverResult.acknowledgementStatus
|
|
315
|
+
: "(none)", text.length, replyTrace.traceId, replyTrace.originalTraceId ?? "(absent)");
|
|
324
316
|
if (deliverResult.status === "sent") {
|
|
325
317
|
replyRouted = true;
|
|
326
318
|
}
|
|
319
|
+
else if (deliverResult.status === "unknown") {
|
|
320
|
+
throw new SendOutcomeUnknownError(deliverResult.messageId, deliverResult.reason);
|
|
321
|
+
}
|
|
327
322
|
else {
|
|
328
|
-
|
|
323
|
+
throw new ConnectorError(deliverResult.error ?? "Agent Network send failed", deliverResult.errorCode ?? "SEND_FAILED", replyAddress);
|
|
329
324
|
}
|
|
330
|
-
dbg("deliver reply senderId=%s status=%s contentLength=%d traceId=%s originalTraceId=%s spanName=send", senderId, deliverResult.status, text.length, replyTrace.traceId, replyTrace.originalTraceId ?? "(absent)");
|
|
331
325
|
},
|
|
332
326
|
onError: (err) => {
|
|
333
327
|
dispatchError = err;
|
|
334
|
-
|
|
328
|
+
if (err instanceof SendOutcomeUnknownError) {
|
|
329
|
+
console.warn(`[agent-network:${ctx.accountId}] reply send OUTCOME UNKNOWN to=${senderId} messageId=${err.messageId} reason=${err.reason}`);
|
|
330
|
+
}
|
|
331
|
+
else if (err instanceof ConnectorError) {
|
|
332
|
+
console.warn(`[agent-network:${ctx.accountId}] reply send FAILED to=${senderId} code=${err.code} error=${err.message}`);
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
console.error(`[agent-network:${ctx.accountId}] dispatch error:`, err);
|
|
336
|
+
}
|
|
335
337
|
},
|
|
336
338
|
},
|
|
337
339
|
});
|
|
340
|
+
const dispatchInConversationManagerContext = () => runWithConversationManagerContext(conversationManager, dispatch);
|
|
338
341
|
if (options.servicesRetained) {
|
|
339
|
-
await runWithServicesRetainedToolPolicy(runtimeSessionKey, () => runWithServicesRetainedReplyContext(
|
|
342
|
+
await runWithServicesRetainedToolPolicy(runtimeSessionKey, () => runWithServicesRetainedReplyContext(dispatchInConversationManagerContext));
|
|
340
343
|
}
|
|
341
344
|
else {
|
|
342
|
-
await
|
|
345
|
+
await dispatchInConversationManagerContext();
|
|
343
346
|
}
|
|
344
347
|
if (dispatchError)
|
|
345
348
|
throw dispatchError;
|
|
@@ -383,8 +386,9 @@ function servicesRetainedBody(message) {
|
|
|
383
386
|
const sender = servicesRetainedSenderName(message);
|
|
384
387
|
const displayName = message.envelope.sender.display_name;
|
|
385
388
|
const handle = message.envelope.sender.handle;
|
|
389
|
+
const sentAt = message.envelope.sent_at;
|
|
386
390
|
return [
|
|
387
|
-
`[MASONS canonical message_ref=${JSON.stringify(message.envelope.message_ref)}; sender_display_name=${displayName === undefined ? "absent" : JSON.stringify(displayName)}; sender_handle=${handle === undefined ? "absent" : JSON.stringify(handle)}; sender_label=${JSON.stringify(sender)}; content_type=${JSON.stringify(message.contentType)}]`,
|
|
391
|
+
`[MASONS canonical message_ref=${JSON.stringify(message.envelope.message_ref)}; sent_at=${sentAt === undefined ? "absent" : JSON.stringify(sentAt)}; sender_display_name=${displayName === undefined ? "absent" : JSON.stringify(displayName)}; sender_handle=${handle === undefined ? "absent" : JSON.stringify(handle)}; sender_label=${JSON.stringify(sender)}; content_type=${JSON.stringify(message.contentType)}]`,
|
|
388
392
|
message.envelope.content,
|
|
389
393
|
].join("\n\n");
|
|
390
394
|
}
|
|
@@ -444,13 +448,19 @@ export const agentNetworkChannel = {
|
|
|
444
448
|
}
|
|
445
449
|
const state = ctx.accountId ? accounts.get(ctx.accountId) : undefined;
|
|
446
450
|
if (!state)
|
|
447
|
-
|
|
451
|
+
throw new Error("Agent Network account unavailable");
|
|
448
452
|
const result = await state.conversationManager.send(ctx.to, ctx.text);
|
|
449
|
-
dbg("sendText to=%s status=%s contentLength=%d", ctx.to, result.status, ctx.text.length);
|
|
450
|
-
|
|
451
|
-
channel: "agent-network",
|
|
452
|
-
|
|
453
|
-
|
|
453
|
+
dbg("sendText to=%s status=%s ackStatus=%s contentLength=%d", ctx.to, result.status, result.status === "sent" ? result.acknowledgementStatus : "(none)", ctx.text.length);
|
|
454
|
+
if (result.status === "sent") {
|
|
455
|
+
return { channel: "agent-network", messageId: result.messageId };
|
|
456
|
+
}
|
|
457
|
+
if (result.status === "unknown") {
|
|
458
|
+
throw new SendOutcomeUnknownError(result.messageId, result.reason);
|
|
459
|
+
}
|
|
460
|
+
if (result.errorCode) {
|
|
461
|
+
throw new ConnectorError(result.error ?? result.errorCode, result.errorCode, ctx.to);
|
|
462
|
+
}
|
|
463
|
+
throw new Error(result.error ?? "Agent Network send failed");
|
|
454
464
|
},
|
|
455
465
|
},
|
|
456
466
|
gateway: {
|
package/dist/cli-setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-setup.d.ts","sourceRoot":"","sources":["../src/cli-setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-setup.d.ts","sourceRoot":"","sources":["../src/cli-setup.ts"],"names":[],"mappings":"AA0FA,UAAU,eAAe;IACvB,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAC9B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChD,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAOD,UAAU,gBAAgB;IACxB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAwFD,wBAAsB,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+EhE"}
|
package/dist/cli-setup.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readExistingConnectorUrl, writeCredentials } from "./config.js";
|
|
2
2
|
import { ConnectorUrlConfigurationError, resolveConnectorUrlForSetup, } from "./connector-url-boundary.js";
|
|
3
3
|
import { beginBridgeHandoff, completeBridgeHandoff, DEFAULT_IDP_BASE_URL, SetupFlowError, } from "./handoff.js";
|
|
4
|
+
import { assertHandoffDeadlineActive } from "./handoff-deadline.js";
|
|
4
5
|
import { DEFAULT_API_HOST, DEFAULT_CONNECTOR_URL, PlatformApiError, } from "./platform-client.js";
|
|
5
6
|
async function serverBridgeHandoffFlow(apiHost, idpBaseUrl, runtime, channelInput) {
|
|
6
7
|
const session = await beginBridgeHandoff({
|
|
@@ -16,16 +17,19 @@ async function serverBridgeHandoffFlow(apiHost, idpBaseUrl, runtime, channelInpu
|
|
|
16
17
|
"Waiting for the runtime key to be issued and delivered…",
|
|
17
18
|
"",
|
|
18
19
|
].join("\n"));
|
|
19
|
-
return
|
|
20
|
+
return {
|
|
21
|
+
handoff: await completeBridgeHandoff(session),
|
|
22
|
+
expiresAt: session.expiresAt,
|
|
23
|
+
};
|
|
20
24
|
}
|
|
21
25
|
export async function login(ctx) {
|
|
22
26
|
const apiHost = typeof ctx.cfg.apiHost === "string" ? ctx.cfg.apiHost : DEFAULT_API_HOST;
|
|
23
27
|
const idpBaseUrl = typeof ctx.cfg.idpBaseUrl === "string"
|
|
24
28
|
? ctx.cfg.idpBaseUrl
|
|
25
29
|
: DEFAULT_IDP_BASE_URL;
|
|
26
|
-
let
|
|
30
|
+
let completed;
|
|
27
31
|
try {
|
|
28
|
-
|
|
32
|
+
completed = await serverBridgeHandoffFlow(apiHost, idpBaseUrl, ctx.runtime, ctx.channelInput);
|
|
29
33
|
}
|
|
30
34
|
catch (err) {
|
|
31
35
|
if (err instanceof SetupFlowError) {
|
|
@@ -38,6 +42,7 @@ export async function login(ctx) {
|
|
|
38
42
|
}
|
|
39
43
|
throw err;
|
|
40
44
|
}
|
|
45
|
+
const { handoff } = completed;
|
|
41
46
|
const existingConnectorUrl = await readExistingConnectorUrl();
|
|
42
47
|
const configuredConnectorUrl = typeof ctx.cfg.connectorUrl === "string" ? ctx.cfg.connectorUrl : undefined;
|
|
43
48
|
let connectorUrl;
|
|
@@ -56,6 +61,15 @@ export async function login(ctx) {
|
|
|
56
61
|
}
|
|
57
62
|
throw err;
|
|
58
63
|
}
|
|
59
|
-
|
|
64
|
+
try {
|
|
65
|
+
await writeCredentials({ connectorUrl, token: handoff.token }, apiHost, idpBaseUrl, undefined, () => assertHandoffDeadlineActive(completed.expiresAt));
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
if (err instanceof SetupFlowError) {
|
|
69
|
+
ctx.runtime.error(err.message);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
throw err;
|
|
73
|
+
}
|
|
60
74
|
ctx.runtime.log(`✓ Connected as @${handoff.agent.handle}`);
|
|
61
75
|
}
|
package/dist/config-fs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function getOpenClawHome(): string;
|
|
2
2
|
export declare function readConfig(): Promise<Record<string, unknown>>;
|
|
3
|
-
export declare function persistConfig(config: Record<string, unknown
|
|
3
|
+
export declare function persistConfig(config: Record<string, unknown>, assertCanPersist?: () => void): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=config-fs.d.ts.map
|
package/dist/config-fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-fs.d.ts","sourceRoot":"","sources":["../src/config-fs.ts"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAMD,wBAAsB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAOnE;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"config-fs.d.ts","sourceRoot":"","sources":["../src/config-fs.ts"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAMD,wBAAsB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAOnE;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,gBAAgB,CAAC,EAAE,MAAM,IAAI,GAC5B,OAAO,CAAC,IAAI,CAAC,CAKf"}
|
package/dist/config-fs.js
CHANGED
|
@@ -16,8 +16,9 @@ export async function readConfig() {
|
|
|
16
16
|
return {};
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
export async function persistConfig(config) {
|
|
19
|
+
export async function persistConfig(config, assertCanPersist) {
|
|
20
20
|
const configPath = getConfigPath();
|
|
21
21
|
await mkdir(dirname(configPath), { recursive: true });
|
|
22
|
+
assertCanPersist?.();
|
|
22
23
|
await writeFile(configPath, JSON.stringify(config, null, 2), "utf-8");
|
|
23
24
|
}
|
package/dist/config.d.ts
CHANGED
|
@@ -18,15 +18,17 @@ export declare function clearPluginRuntime(): void;
|
|
|
18
18
|
export declare function requirePluginRuntime(): unknown;
|
|
19
19
|
export declare function requirePlatformConfig(): PlatformClientConfig;
|
|
20
20
|
export declare function requireApiKey(): string;
|
|
21
|
+
export declare function hasApiKey(): boolean;
|
|
21
22
|
export declare function getPendingTarget(): string | null;
|
|
22
23
|
export declare function isProfileNeeded(): boolean;
|
|
23
24
|
export declare function requireConnectorClient(): ConnectorClient;
|
|
25
|
+
export declare function getConnectorClient(): ConnectorClient | null;
|
|
24
26
|
export interface NetworkCredentials {
|
|
25
27
|
connectorUrl: string;
|
|
26
28
|
token: string;
|
|
27
29
|
}
|
|
28
30
|
export declare function readExistingConnectorUrl(): Promise<string | undefined>;
|
|
29
|
-
export declare function writeCredentials(creds: NetworkCredentials, apiHost?: string, idpBaseUrl?: string, pendingTarget?: string): Promise<void>;
|
|
31
|
+
export declare function writeCredentials(creds: NetworkCredentials, apiHost?: string, idpBaseUrl?: string, pendingTarget?: string, assertCanPersist?: () => void): Promise<void>;
|
|
30
32
|
export declare function writeTargetHandle(handle: string): Promise<void>;
|
|
31
33
|
export declare function clearTargetHandle(): Promise<void>;
|
|
32
34
|
export declare function markProfileNeeded(): Promise<void>;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAoCjD,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAsBD,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,M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|
return storedApiKey;
|
|
110
110
|
}
|
|
111
|
+
export function hasApiKey() {
|
|
112
|
+
return Boolean(storedApiKey);
|
|
113
|
+
}
|
|
111
114
|
export function getPendingTarget() {
|
|
112
115
|
return storedPendingTarget;
|
|
113
116
|
}
|
|
@@ -120,6 +123,9 @@ export function requireConnectorClient() {
|
|
|
120
123
|
}
|
|
121
124
|
return storedConnectorClient;
|
|
122
125
|
}
|
|
126
|
+
export function getConnectorClient() {
|
|
127
|
+
return storedConnectorClient;
|
|
128
|
+
}
|
|
123
129
|
function ensureNetworkSection(config) {
|
|
124
130
|
if (typeof config.channels !== "object" || config.channels === null) {
|
|
125
131
|
config.channels = {};
|
|
@@ -141,7 +147,7 @@ export async function readExistingConnectorUrl() {
|
|
|
141
147
|
? connectorUrl
|
|
142
148
|
: undefined;
|
|
143
149
|
}
|
|
144
|
-
export async function writeCredentials(creds, apiHost, idpBaseUrl, pendingTarget) {
|
|
150
|
+
export async function writeCredentials(creds, apiHost, idpBaseUrl, pendingTarget, assertCanPersist) {
|
|
145
151
|
const config = await readConfig();
|
|
146
152
|
const section = ensureNetworkSection(config);
|
|
147
153
|
section.enabled = true;
|
|
@@ -163,7 +169,7 @@ export async function writeCredentials(creds, apiHost, idpBaseUrl, pendingTarget
|
|
|
163
169
|
if (pendingTarget) {
|
|
164
170
|
section.pendingTarget = pendingTarget;
|
|
165
171
|
}
|
|
166
|
-
await persistConfig(config);
|
|
172
|
+
await persistConfig(config, assertCanPersist);
|
|
167
173
|
storedApiKey = creds.token;
|
|
168
174
|
if (pendingTarget) {
|
|
169
175
|
storedPendingTarget = pendingTarget;
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { EventEmitter } from "node:events";
|
|
2
|
-
import { type AddressedMessageEvent, type CustodyPendingEvent, type DeliveryPendingEvent, type DeliveryStatusEvent, type
|
|
2
|
+
import { type AddressedMessageEvent, type CustodyPendingEvent, type DeliveryPendingEvent, type DeliveryStatusEvent, type ObservedSendAckEvent, type StructuredErrorEvent } from "./types.js";
|
|
3
|
+
import { type WsHeartbeatOptions } from "./ws-heartbeat.js";
|
|
3
4
|
export declare class ConnectorError extends Error {
|
|
4
5
|
readonly code: string;
|
|
5
6
|
readonly to?: string;
|
|
6
7
|
constructor(message: string, code: string, to?: string);
|
|
7
8
|
}
|
|
9
|
+
export type SendOutcomeUnknownReason = "ack_timeout" | "connection_closed";
|
|
10
|
+
export declare class SendOutcomeUnknownError extends Error {
|
|
11
|
+
readonly code: "SEND_OUTCOME_UNKNOWN";
|
|
12
|
+
readonly retryable: false;
|
|
13
|
+
readonly attempts: 1;
|
|
14
|
+
readonly messageId: string;
|
|
15
|
+
readonly reason: SendOutcomeUnknownReason;
|
|
16
|
+
constructor(messageId: string, reason: SendOutcomeUnknownReason);
|
|
17
|
+
}
|
|
8
18
|
type ConnectorClientEvents = {
|
|
9
19
|
message_received: (event: AddressedMessageEvent) => void;
|
|
10
20
|
custody_pending: (event: CustodyPendingEvent) => void;
|
|
11
|
-
send_ack: (event:
|
|
21
|
+
send_ack: (event: ObservedSendAckEvent) => void;
|
|
12
22
|
delivery_pending: (event: DeliveryPendingEvent) => void;
|
|
13
23
|
delivery_status: (event: DeliveryStatusEvent) => void;
|
|
14
24
|
structured_error: (event: StructuredErrorEvent) => void;
|
|
@@ -16,6 +26,20 @@ type ConnectorClientEvents = {
|
|
|
16
26
|
connected: () => void;
|
|
17
27
|
disconnected: () => void;
|
|
18
28
|
};
|
|
29
|
+
export interface ConnectorClientOptions {
|
|
30
|
+
keepalive?: Pick<WsHeartbeatOptions, "intervalMs" | "probeTimeoutMs" | "missesBeforeDisconnect">;
|
|
31
|
+
}
|
|
32
|
+
export type ChannelState = "connecting" | "connected" | "reconnecting" | "disconnected";
|
|
33
|
+
export type RegistrationOutcome = {
|
|
34
|
+
state: "accepted";
|
|
35
|
+
} | {
|
|
36
|
+
state: "refused";
|
|
37
|
+
reason: string;
|
|
38
|
+
} | {
|
|
39
|
+
state: "replaced";
|
|
40
|
+
} | {
|
|
41
|
+
state: "none";
|
|
42
|
+
};
|
|
19
43
|
export declare class ConnectorClient extends EventEmitter {
|
|
20
44
|
private readonly url;
|
|
21
45
|
private readonly token;
|
|
@@ -24,18 +48,24 @@ export declare class ConnectorClient extends EventEmitter {
|
|
|
24
48
|
private backoffMs;
|
|
25
49
|
private alreadyConnectedRetries;
|
|
26
50
|
private reconnectTimer;
|
|
51
|
+
private keepalive;
|
|
52
|
+
private readonly keepaliveOptions;
|
|
27
53
|
private registerResolve;
|
|
28
54
|
private registerReject;
|
|
29
55
|
private registerTimer;
|
|
56
|
+
private registration;
|
|
57
|
+
private everDropped;
|
|
30
58
|
private lastKnownSeq;
|
|
31
59
|
private readonly pendingSeqMessages;
|
|
32
60
|
private readonly seenPayloadIds;
|
|
33
61
|
private readonly seenPayloadIdOrder;
|
|
34
62
|
private pendingSends;
|
|
35
|
-
constructor(url: string, token: string);
|
|
63
|
+
constructor(url: string, token: string, options?: ConnectorClientOptions);
|
|
36
64
|
connect(): Promise<void>;
|
|
37
65
|
disconnect(): void;
|
|
38
|
-
|
|
66
|
+
getChannelState(): ChannelState;
|
|
67
|
+
getRegistration(): RegistrationOutcome;
|
|
68
|
+
send(to: string, content: string, contentType?: string, metadata?: Record<string, unknown>): Promise<ObservedSendAckEvent>;
|
|
39
69
|
sendTyping(to: string, isTyping: boolean): boolean;
|
|
40
70
|
ackDelivery(upToSeq: number): boolean;
|
|
41
71
|
requestGapFill(sinceSeq: number): boolean;
|
|
@@ -70,6 +100,7 @@ export declare class ConnectorClient extends EventEmitter {
|
|
|
70
100
|
private clearReconnectTimer;
|
|
71
101
|
private cleanupConnection;
|
|
72
102
|
private sendEvent;
|
|
103
|
+
private sendSerializedEvent;
|
|
73
104
|
}
|
|
74
105
|
export {};
|
|
75
106
|
//# sourceMappingURL=connector-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector-client.d.ts","sourceRoot":"","sources":["../src/connector-client.ts"],"names":[],"m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