@masons/agent-network 0.6.8 → 0.6.10
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.d.ts +2 -50
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +7 -8
- package/dist/plugin.d.ts.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +5 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +16 -13
- package/skills/agent-network/SKILL.md +7 -1
package/dist/channel.d.ts
CHANGED
|
@@ -1,58 +1,10 @@
|
|
|
1
|
+
import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
1
2
|
import type { AgentNetworkAccount } from "./config-schema.js";
|
|
2
3
|
export declare function getOwnerPassportAddress(): string | null;
|
|
3
4
|
export declare function consumeIdentityLinkingNudge(): boolean;
|
|
4
5
|
export declare function _setNudgePendingForTesting(value: boolean): void;
|
|
5
|
-
interface ChannelMeta {
|
|
6
|
-
name: string;
|
|
7
|
-
description: string;
|
|
8
|
-
icon: string;
|
|
9
|
-
}
|
|
10
|
-
interface ChannelCapabilities {
|
|
11
|
-
outbound: boolean;
|
|
12
|
-
inbound: boolean;
|
|
13
|
-
groups: boolean;
|
|
14
|
-
attachments: boolean;
|
|
15
|
-
}
|
|
16
|
-
interface ChannelConfigAdapter<T> {
|
|
17
|
-
listAccountIds(cfg: Record<string, unknown>): string[];
|
|
18
|
-
resolveAccount(cfg: Record<string, unknown>, accountId?: string): T;
|
|
19
|
-
isConfigured?(account: T, cfg: Record<string, unknown>): boolean;
|
|
20
|
-
isEnabled?(account: T, cfg: Record<string, unknown>): boolean;
|
|
21
|
-
}
|
|
22
|
-
interface OutboundDeliveryResult {
|
|
23
|
-
channel: string;
|
|
24
|
-
messageId: string;
|
|
25
|
-
}
|
|
26
|
-
interface ChannelOutboundContext {
|
|
27
|
-
text: string;
|
|
28
|
-
to: string;
|
|
29
|
-
accountId: string;
|
|
30
|
-
}
|
|
31
|
-
interface ChannelOutboundAdapter {
|
|
32
|
-
deliveryMode: "direct" | "gateway" | "hybrid";
|
|
33
|
-
sendText?(ctx: ChannelOutboundContext): Promise<OutboundDeliveryResult>;
|
|
34
|
-
}
|
|
35
|
-
interface ChannelGatewayContext<T = unknown> {
|
|
36
|
-
cfg: Record<string, unknown>;
|
|
37
|
-
accountId: string;
|
|
38
|
-
account: T;
|
|
39
|
-
runtime: unknown;
|
|
40
|
-
abortSignal: AbortSignal;
|
|
41
|
-
}
|
|
42
6
|
declare function withAgentNetworkSilentReplyPolicy(cfg: Record<string, unknown>): Record<string, unknown>;
|
|
43
7
|
export declare const _withAgentNetworkSilentReplyPolicyForTesting: typeof withAgentNetworkSilentReplyPolicy;
|
|
44
|
-
|
|
45
|
-
startAccount?(ctx: ChannelGatewayContext<T>): Promise<unknown>;
|
|
46
|
-
stopAccount?(ctx: ChannelGatewayContext<T>): Promise<void>;
|
|
47
|
-
}
|
|
48
|
-
interface AgentNetworkChannelPlugin {
|
|
49
|
-
id: string;
|
|
50
|
-
meta: ChannelMeta;
|
|
51
|
-
capabilities: ChannelCapabilities;
|
|
52
|
-
config: ChannelConfigAdapter<AgentNetworkAccount>;
|
|
53
|
-
outbound: ChannelOutboundAdapter;
|
|
54
|
-
gateway: ChannelGatewayAdapter<AgentNetworkAccount>;
|
|
55
|
-
}
|
|
56
|
-
export declare const agentNetworkChannel: AgentNetworkChannelPlugin;
|
|
8
|
+
export declare const agentNetworkChannel: ChannelPlugin<AgentNetworkAccount>;
|
|
57
9
|
export {};
|
|
58
10
|
//# sourceMappingURL=channel.d.ts.map
|
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,kCAAkC,CAAC;AAa1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAyC9D,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAEvD;AAOD,wBAAgB,2BAA2B,IAAI,OAAO,CAIrD;AAGD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAE/D;AAaD,iBAAS,iCAAiC,CACxC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA6BzB;AAED,eAAO,MAAM,4CAA4C,0CACtB,CAAC;AAobpC,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,mBAAmB,CAqOlE,CAAC"}
|
package/dist/channel.js
CHANGED
|
@@ -267,15 +267,14 @@ const accounts = new Map();
|
|
|
267
267
|
export const agentNetworkChannel = {
|
|
268
268
|
id: "agent-network",
|
|
269
269
|
meta: {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
id: "agent-network",
|
|
271
|
+
label: "Agent Network",
|
|
272
|
+
selectionLabel: "MASONS Agent Network",
|
|
273
|
+
docsPath: "https://masons.ai",
|
|
274
|
+
blurb: "Connect your agent to the MASONS Agent Network for real-time agent-to-agent communication.",
|
|
273
275
|
},
|
|
274
276
|
capabilities: {
|
|
275
|
-
|
|
276
|
-
inbound: true,
|
|
277
|
-
groups: false,
|
|
278
|
-
attachments: false,
|
|
277
|
+
chatTypes: ["direct"],
|
|
279
278
|
},
|
|
280
279
|
config: {
|
|
281
280
|
listAccountIds() {
|
|
@@ -315,7 +314,7 @@ export const agentNetworkChannel = {
|
|
|
315
314
|
outbound: {
|
|
316
315
|
deliveryMode: "direct",
|
|
317
316
|
async sendText(ctx) {
|
|
318
|
-
const state = accounts.get(ctx.accountId);
|
|
317
|
+
const state = ctx.accountId ? accounts.get(ctx.accountId) : undefined;
|
|
319
318
|
if (!state)
|
|
320
319
|
return { channel: "agent-network", messageId: "" };
|
|
321
320
|
const result = await state.conversationManager.send(ctx.to, ctx.text);
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAqJA,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACjD,YAAY,CACV,IAAI,EAAE,OAAO,EACb,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAC3C,IAAI,CAAC;IACR,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,GAAG,IAAI,CAAC;CACnE;AAED,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAaI,iBAAiB;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAqJA,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACjD,YAAY,CACV,IAAI,EAAE,OAAO,EACb,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAC3C,IAAI,CAAC;IACR,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,GAAG,IAAI,CAAC;CACnE;AAED,QAAA,MAAM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ot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAuEA,UAAU,WAAW;IACnB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,CACP,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3B;AAED,UAAU,WAAW;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,KAAK,WAAW,GAAG,CAAC,GAAG,EAAE,WAAW,KAAK,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3E,UAAU,OAAO;IACf,YAAY,CACV,IAAI,EAAE,cAAc,GAAG,WAAW,EAWlC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAC7D,IAAI,CAAC;CACT;AAoDD,wBAAgB,qBAAqB,IAAI,IAAI,CAG5C;AAwSD,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CA41BhD"}
|
package/dist/tools.js
CHANGED
|
@@ -396,7 +396,11 @@ export function registerTools(api) {
|
|
|
396
396
|
description: "List connection requests — incoming from other agents, outgoing ones you sent, or all.",
|
|
397
397
|
parameters: Type.Object({
|
|
398
398
|
status: Type.Optional(Type.String({
|
|
399
|
-
description: 'Filter by status: "pending" (default), "accepted", "declined", "withdrawn", or "all"'
|
|
399
|
+
description: 'Filter by status: "pending" (default), "accepted", "declined", "withdrawn", or "all". ' +
|
|
400
|
+
'Note: "declined" only ever matches requests YOU declined (incoming). ' +
|
|
401
|
+
"A recipient's refusal of your outgoing request is never disclosed — " +
|
|
402
|
+
'outgoing requests stay "pending" until accepted or withdrawn, so ' +
|
|
403
|
+
'filtering outgoing by "declined" always returns empty.',
|
|
400
404
|
})),
|
|
401
405
|
direction: Type.Optional(Type.String({
|
|
402
406
|
description: '"incoming" (default) — requests from others; "outgoing" — requests you sent; "all" — both directions',
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PLUGIN_VERSION = "0.6.
|
|
1
|
+
export declare const PLUGIN_VERSION = "0.6.10";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,WAAW,CAAC"}
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PLUGIN_VERSION = "0.6.
|
|
1
|
+
export const PLUGIN_VERSION = "0.6.10";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masons/agent-network",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"description": "MASONS Agent Network — OpenClaw channel plugin for connecting agent runtimes to the Agent Network over MSTP.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "MASONS.ai <hello@masons.ai> (https://masons.ai)",
|
|
@@ -21,22 +21,15 @@
|
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc",
|
|
26
|
-
"dev": "tsc --watch",
|
|
27
|
-
"test": "node ../../scripts/sync-vendored-trace-context.mjs && tsc -p test/tsconfig.json && node --test --loader ts-node/esm 'test/**/*.test.ts'",
|
|
28
|
-
"biome:check": "biome check .",
|
|
29
|
-
"biome:fix": "biome check . --write",
|
|
30
|
-
"biome:ci": "biome ci .",
|
|
31
|
-
"prepublishOnly": "node ../../scripts/sync-vendored-trace-context.mjs && bash scripts/check-version.sh && npm run build && npm run test",
|
|
32
|
-
"release": "pnpm publish --access public"
|
|
33
|
-
},
|
|
34
24
|
"files": [
|
|
35
25
|
"dist/",
|
|
36
26
|
"openclaw.plugin.json",
|
|
37
27
|
"skills/agent-network/"
|
|
38
28
|
],
|
|
39
29
|
"openclaw": {
|
|
30
|
+
"compat": {
|
|
31
|
+
"pluginApi": ">=2026.3.28"
|
|
32
|
+
},
|
|
40
33
|
"extensions": [
|
|
41
34
|
"./dist/plugin.js"
|
|
42
35
|
]
|
|
@@ -91,7 +84,17 @@
|
|
|
91
84
|
"@types/debug": "^4.1.12",
|
|
92
85
|
"@types/node": "^25",
|
|
93
86
|
"@types/ws": "^8",
|
|
87
|
+
"openclaw": "2026.6.11",
|
|
94
88
|
"ts-node": "^10",
|
|
95
|
-
"typescript": "
|
|
89
|
+
"typescript": "6.0.3"
|
|
90
|
+
},
|
|
91
|
+
"scripts": {
|
|
92
|
+
"build": "tsc",
|
|
93
|
+
"dev": "tsc --watch",
|
|
94
|
+
"test": "node ../../scripts/sync-vendored-trace-context.mjs && tsc -p test/tsconfig.json && node --test --loader ts-node/esm 'test/**/*.test.ts'",
|
|
95
|
+
"biome:check": "biome check .",
|
|
96
|
+
"biome:fix": "biome check . --write",
|
|
97
|
+
"biome:ci": "biome ci .",
|
|
98
|
+
"release": "pnpm publish --access public"
|
|
96
99
|
}
|
|
97
|
-
}
|
|
100
|
+
}
|
|
@@ -256,7 +256,13 @@ If the user asks "did they accept my request?" or wants to check sent requests:
|
|
|
256
256
|
|
|
257
257
|
**Then:** Call `masons_list_requests` with `direction: "outgoing"`.
|
|
258
258
|
|
|
259
|
-
**Say to user:** "Your request to [name] (@[handle]) is [status]." (pending / accepted /
|
|
259
|
+
**Say to user:** "Your request to [name] (@[handle]) is [status]." (pending / accepted / withdrawn)
|
|
260
|
+
|
|
261
|
+
A request you sent stays **pending** until the recipient accepts it or you
|
|
262
|
+
withdraw it — refusals are never disclosed to the sender, so never tell
|
|
263
|
+
your user a request was declined. If it has been pending a long time, the
|
|
264
|
+
honest framing is "still awaiting a response; you can withdraw it and try
|
|
265
|
+
another channel."
|
|
260
266
|
|
|
261
267
|
### Acting on Requests
|
|
262
268
|
|