@atalk/openclaw 0.1.0-alpha.4

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 ADDED
@@ -0,0 +1,21 @@
1
+ # @atalk/openclaw
2
+
3
+ Native OpenClaw channel for aTalk. Incoming encrypted messages start an OpenClaw turn automatically and the generated answer is sent back inside the same aTalk conversation.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ openclaw plugins install @atalk/openclaw@next
9
+ ```
10
+
11
+ For the first start:
12
+
13
+ ```bash
14
+ export ATALK_AGENT_TOKEN="one-time-activation-token"
15
+ export ATALK_CREDENTIAL_PATH="$HOME/.atalk/openclaw-agent.json"
16
+ openclaw gateway restart
17
+ ```
18
+
19
+ After activation, remove `ATALK_AGENT_TOKEN` and keep only the credential path. `ATALK_BASE_URL` defaults to `https://api.atalk.ar`.
20
+
21
+ The aTalk backend remains authoritative for who may contact the agent. Identity policy, temporary authorizations, supervision and revocation are managed by the owner in the aTalk app.
@@ -0,0 +1,14 @@
1
+ import type { ChannelPlugin, OpenClawConfig } from "openclaw/plugin-sdk/channel-core";
2
+ interface ResolvedAtalkAccount {
3
+ accountId: string;
4
+ enabled: boolean;
5
+ configured: boolean;
6
+ token?: string;
7
+ baseUrl: string;
8
+ credentialPath: string;
9
+ }
10
+ export declare function resolveAtalkAccount(_cfg: OpenClawConfig, accountId?: string | null): ResolvedAtalkAccount;
11
+ export declare function normalizeAtalkTarget(value: string): string;
12
+ export declare const atalkPlugin: ChannelPlugin<ResolvedAtalkAccount>;
13
+ export {};
14
+ //# sourceMappingURL=channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGtF,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;CACxB;AAQD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,oBAAoB,CAWzG;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAG1D;AA2JD,eAAO,MAAM,WAAW,qCAAS,CAAC"}
@@ -0,0 +1,156 @@
1
+ import { existsSync } from "node:fs";
2
+ import { homedir } from "node:os";
3
+ import { join } from "node:path";
4
+ import { Agent } from "@atalk/sdk";
5
+ import { getAtalkRuntime } from "./runtime.js";
6
+ const activeAgents = new Map();
7
+ export function resolveAtalkAccount(_cfg, accountId) {
8
+ const credentialPath = process.env.ATALK_CREDENTIAL_PATH ?? join(homedir(), ".atalk", "openclaw-agent.json");
9
+ const token = process.env.ATALK_AGENT_TOKEN;
10
+ return {
11
+ accountId: accountId || "default",
12
+ enabled: process.env.ATALK_ENABLED !== "false",
13
+ configured: Boolean(token || existsSync(credentialPath)),
14
+ token,
15
+ baseUrl: process.env.ATALK_BASE_URL ?? "https://api.atalk.ar",
16
+ credentialPath,
17
+ };
18
+ }
19
+ export function normalizeAtalkTarget(value) {
20
+ const target = value.replace(/^atalk:/u, "").trim();
21
+ return target.startsWith("@") ? target : `@${target}`;
22
+ }
23
+ async function dispatchIncoming(cfg, account, agent, message) {
24
+ const runtime = getAtalkRuntime();
25
+ const channel = runtime.channel;
26
+ const route = channel.routing.resolveAgentRoute({
27
+ cfg,
28
+ channel: "atalk",
29
+ accountId: account.accountId,
30
+ peer: { kind: "direct", id: message.sender.id },
31
+ });
32
+ const senderHandle = message.sender.handle;
33
+ const ctx = channel.reply.finalizeInboundContext({
34
+ Body: message.text,
35
+ BodyForAgent: message.text,
36
+ RawBody: message.text,
37
+ CommandBody: message.text,
38
+ From: `atalk:${senderHandle}`,
39
+ To: `atalk:${agent.peer?.handle ?? account.accountId}`,
40
+ SenderId: message.sender.id,
41
+ SenderName: message.sender.displayName,
42
+ SenderUsername: senderHandle,
43
+ Provider: "atalk",
44
+ Surface: "atalk",
45
+ ChatType: "direct",
46
+ AccountId: route.accountId,
47
+ AgentId: route.agentId,
48
+ SessionKey: route.sessionKey,
49
+ MessageSid: message.id,
50
+ MessageSidFull: message.id,
51
+ Timestamp: message.receivedAt.getTime(),
52
+ OriginatingChannel: "atalk",
53
+ OriginatingTo: senderHandle,
54
+ });
55
+ await message.markRead();
56
+ await channel.reply.dispatchReplyWithBufferedBlockDispatcher({
57
+ ctx,
58
+ cfg,
59
+ dispatcherOptions: {
60
+ deliver: async (payload) => {
61
+ const text = payload.text?.trim();
62
+ if (text)
63
+ await (message.isSupervisor ? message.relay(text) : message.reply(text));
64
+ },
65
+ },
66
+ });
67
+ }
68
+ const plugin = {
69
+ id: "atalk",
70
+ meta: {
71
+ id: "atalk",
72
+ label: "aTalk",
73
+ selectionLabel: "aTalk (encrypted agent network)",
74
+ docsPath: "https://github.com/atalk-network/atalk-developers/tree/main/integrations/openclaw",
75
+ docsLabel: "aTalk",
76
+ blurb: "End-to-end encrypted messaging between people and AI agents.",
77
+ aliases: ["atalk"],
78
+ markdownCapable: false,
79
+ },
80
+ capabilities: {
81
+ chatTypes: ["direct"],
82
+ reply: true,
83
+ media: false,
84
+ blockStreaming: true,
85
+ },
86
+ config: {
87
+ listAccountIds: () => ["default"],
88
+ resolveAccount: resolveAtalkAccount,
89
+ isEnabled: (account) => account.enabled,
90
+ isConfigured: (account) => account.configured,
91
+ describeAccount: (account) => ({
92
+ accountId: account.accountId,
93
+ enabled: account.enabled,
94
+ configured: account.configured,
95
+ connected: activeAgents.get(account.accountId)?.connected ?? false,
96
+ credentialSource: account.token ? "activation-token" : "credential-file",
97
+ baseUrl: account.baseUrl,
98
+ }),
99
+ },
100
+ setup: {
101
+ applyAccountConfig: ({ cfg }) => cfg,
102
+ },
103
+ gateway: {
104
+ startAccount: async (ctx) => {
105
+ if (!ctx.account.configured) {
106
+ throw new Error("Set ATALK_AGENT_TOKEN for first activation or ATALK_CREDENTIAL_PATH for persisted credentials");
107
+ }
108
+ const agent = new Agent({
109
+ ...(ctx.account.token ? { token: ctx.account.token } : {}),
110
+ baseUrl: ctx.account.baseUrl,
111
+ credentialPath: ctx.account.credentialPath,
112
+ });
113
+ activeAgents.set(ctx.accountId, agent);
114
+ agent.on("error", (error) => ctx.log?.error(error.message));
115
+ agent.on("message", (message) => dispatchIncoming(ctx.cfg, ctx.account, agent, message));
116
+ try {
117
+ await agent.start();
118
+ ctx.setStatus({
119
+ ...ctx.getStatus(),
120
+ accountId: ctx.accountId,
121
+ running: true,
122
+ connected: true,
123
+ lastConnectedAt: Date.now(),
124
+ });
125
+ ctx.log?.info(`connected as ${agent.peer?.handle ?? "unknown"}`);
126
+ await new Promise((resolve) => ctx.abortSignal.addEventListener("abort", () => resolve(), { once: true }));
127
+ }
128
+ finally {
129
+ activeAgents.delete(ctx.accountId);
130
+ await agent.stop();
131
+ ctx.setStatus({ ...ctx.getStatus(), accountId: ctx.accountId, running: false, connected: false });
132
+ }
133
+ },
134
+ },
135
+ outbound: {
136
+ deliveryMode: "direct",
137
+ textChunkLimit: 32_000,
138
+ resolveTarget: ({ to }) => to
139
+ ? { ok: true, to: normalizeAtalkTarget(to) }
140
+ : { ok: false, error: new Error("An aTalk recipient handle is required") },
141
+ sendText: async ({ accountId, to, text }) => {
142
+ const id = accountId ?? "default";
143
+ const agent = activeAgents.get(id);
144
+ if (!agent)
145
+ throw new Error(`aTalk account ${id} is not connected`);
146
+ const sent = await agent.sendWithDetails(normalizeAtalkTarget(to), text);
147
+ return {
148
+ channel: "atalk",
149
+ messageId: sent.messageId,
150
+ conversationId: sent.conversationId,
151
+ };
152
+ },
153
+ },
154
+ };
155
+ export const atalkPlugin = plugin;
156
+ //# sourceMappingURL=channel.js.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,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,KAAK,CAAC,uCAAuC,CAAC,EAAE;QAC5E,QAAQ,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAC1C,MAAM,EAAE,GAAG,SAAS,IAAI,SAAS,CAAC;YAClC,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACnC,IAAI,CAAC,KAAK;gBAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;YACpE,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,eAAe,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;YACzE,OAAO;gBACL,OAAO,EAAE,OAAO;gBAChB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,cAAc,EAAE,IAAI,CAAC,cAAc;aACpC,CAAC;QACJ,CAAC;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC"}
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ id: string;
3
+ name: string;
4
+ description: string;
5
+ register(api: unknown): void;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"wBAcwB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;CAC9B;AALD,wBAKE"}
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ import { defineChannelPluginEntry } from "openclaw/plugin-sdk/channel-core";
2
+ import { atalkPlugin } from "./channel.js";
3
+ import { setAtalkRuntime } from "./runtime.js";
4
+ const entry = defineChannelPluginEntry({
5
+ id: "atalk",
6
+ name: "aTalk",
7
+ description: "Native end-to-end encrypted aTalk messaging channel",
8
+ plugin: atalkPlugin,
9
+ setRuntime: setAtalkRuntime,
10
+ });
11
+ // Keep the generated public declaration independent from OpenClaw's hashed
12
+ // internal declaration modules while preserving the full runtime value.
13
+ export default entry;
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,KAAK,GAAG,wBAAwB,CAAC;IACrC,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,qDAAqD;IAClE,MAAM,EAAE,WAAW;IACnB,UAAU,EAAE,eAAe;CAC5B,CAAC,CAAC;AAEH,2EAA2E;AAC3E,wEAAwE;AACxE,eAAe,KAKd,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { PluginRuntime } from "openclaw/plugin-sdk/channel-core";
2
+ export declare function setAtalkRuntime(value: PluginRuntime): void;
3
+ export declare function getAtalkRuntime(): PluginRuntime;
4
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAItE,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAE1D;AAED,wBAAgB,eAAe,IAAI,aAAa,CAG/C"}
@@ -0,0 +1,10 @@
1
+ let runtime;
2
+ export function setAtalkRuntime(value) {
3
+ runtime = value;
4
+ }
5
+ export function getAtalkRuntime() {
6
+ if (!runtime)
7
+ throw new Error("OpenClaw did not initialize the aTalk plugin runtime");
8
+ return runtime;
9
+ }
10
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAEA,IAAI,OAAkC,CAAC;AAEvC,MAAM,UAAU,eAAe,CAAC,KAAoB;IAClD,OAAO,GAAG,KAAK,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACtF,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "atalk",
3
+ "name": "aTalk",
4
+ "description": "Native end-to-end encrypted aTalk messaging channel.",
5
+ "channels": ["atalk"],
6
+ "activation": {
7
+ "onStartup": false
8
+ },
9
+ "configSchema": {
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "properties": {}
13
+ }
14
+ }
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@atalk/openclaw",
3
+ "version": "0.1.0-alpha.4",
4
+ "description": "Native aTalk messaging channel for OpenClaw",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "openclaw.plugin.json",
11
+ "README.md"
12
+ ],
13
+ "scripts": {
14
+ "build": "pnpm clean && tsc -p tsconfig.json",
15
+ "clean": "node --input-type=module -e \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true })\"",
16
+ "prepack": "pnpm build",
17
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json",
18
+ "test": "vitest run"
19
+ },
20
+ "engines": {
21
+ "node": ">=24.15 <25 || >=25.9"
22
+ },
23
+ "license": "Apache-2.0",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/atalk-network/atalk-developers.git",
27
+ "directory": "integrations/openclaw"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public",
31
+ "provenance": true,
32
+ "registry": "https://registry.npmjs.org/"
33
+ },
34
+ "dependencies": {
35
+ "@atalk/sdk": "workspace:*"
36
+ },
37
+ "peerDependencies": {
38
+ "openclaw": ">=2026.7.1-2"
39
+ },
40
+ "peerDependenciesMeta": {
41
+ "openclaw": {
42
+ "optional": true
43
+ }
44
+ },
45
+ "devDependencies": {
46
+ "@types/node": "^24.0.0",
47
+ "openclaw": "2026.7.1-2",
48
+ "typescript": "^5.9.0",
49
+ "vitest": "^4.0.0"
50
+ },
51
+ "openclaw": {
52
+ "extensions": ["./dist/index.js"],
53
+ "channel": {
54
+ "id": "atalk",
55
+ "label": "aTalk",
56
+ "selectionLabel": "aTalk (encrypted agent network)",
57
+ "detailLabel": "aTalk",
58
+ "docsPath": "https://github.com/atalk-network/atalk-developers/tree/main/integrations/openclaw",
59
+ "blurb": "End-to-end encrypted messaging between people and AI agents.",
60
+ "configuredState": {
61
+ "env": {
62
+ "anyOf": ["ATALK_AGENT_TOKEN", "ATALK_CREDENTIAL_PATH"]
63
+ }
64
+ }
65
+ },
66
+ "install": {
67
+ "npmSpec": "@atalk/openclaw",
68
+ "defaultChoice": "npm",
69
+ "minHostVersion": ">=2026.7.1-2"
70
+ }
71
+ }
72
+ }