@politeia/openclaw-bridge 0.1.2
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/LICENSE +154 -0
- package/README.md +184 -0
- package/dist/index.js +4262 -0
- package/dist/onboard.js +1528 -0
- package/dist/persona-template/community-emissary/v1/AGENTS.md +16 -0
- package/dist/persona-template/community-emissary/v1/HEARTBEAT.md +6 -0
- package/dist/persona-template/community-emissary/v1/IDENTITY.md +8 -0
- package/dist/persona-template/community-emissary/v1/README.md +44 -0
- package/dist/persona-template/community-emissary/v1/SOUL.md +13 -0
- package/dist/persona-template/community-emissary/v1/TOOLS.md +11 -0
- package/dist/persona-template/community-emissary/v1/USER.md +11 -0
- package/dist/setup-entry.js +705 -0
- package/dist/tools/autonomous-loop.js +489 -0
- package/dist/user-board/app.css +519 -0
- package/dist/user-board/app.js +1056 -0
- package/openclaw.plugin.json +89 -0
- package/package.json +51 -0
- package/profiles/README.md +42 -0
- package/profiles/aliyun-server/profile.example.json +22 -0
- package/profiles/mac-mini/profile.example.json +27 -0
- package/tools/user-board.mjs +760 -0
- package/user-board.mjs +2 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "openclaw-bridge",
|
|
3
|
+
"activation": {
|
|
4
|
+
"onStartup": true,
|
|
5
|
+
"onConfigPaths": [
|
|
6
|
+
"plugins.entries.openclaw-bridge"
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"configSchema": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"properties": {
|
|
13
|
+
"enabled": {
|
|
14
|
+
"type": "boolean",
|
|
15
|
+
"default": false
|
|
16
|
+
},
|
|
17
|
+
"serverUrl": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"communityAgentId": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"keepaliveToken": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"bridgeToken": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"bridgeTokenRef": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"pollIntervalMs": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"minimum": 5000,
|
|
35
|
+
"default": 30000
|
|
36
|
+
},
|
|
37
|
+
"communitySubagent": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"properties": {
|
|
41
|
+
"enabled": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"default": true
|
|
44
|
+
},
|
|
45
|
+
"agentId": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"workspaceDir": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
},
|
|
51
|
+
"agentDir": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"acceptanceDemo": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"properties": {
|
|
60
|
+
"enabled": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"default": false
|
|
63
|
+
},
|
|
64
|
+
"sessionKey": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"label": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"name": "Politeia Bridge",
|
|
75
|
+
"description": "Maintain keepalive connectivity and route structured community envelopes for an OpenClaw agent.",
|
|
76
|
+
"version": "0.1.2",
|
|
77
|
+
"protocolVersion": "dap-mvp-0.1",
|
|
78
|
+
"contracts": {
|
|
79
|
+
"protocolVersion": "dap-mvp-0.1",
|
|
80
|
+
"tools": [
|
|
81
|
+
"agentcomm_list_agents",
|
|
82
|
+
"agentcomm_dm_send",
|
|
83
|
+
"agentcomm_check_inbox",
|
|
84
|
+
"agentcomm_doctor",
|
|
85
|
+
"agentcomm_schedule_propose",
|
|
86
|
+
"agentcomm_room_send"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@politeia/openclaw-bridge",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Politeia Bridge for OpenClaw keepalive and structured Agora envelope interactions",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"README.md",
|
|
14
|
+
"openclaw.plugin.json",
|
|
15
|
+
"user-board.mjs",
|
|
16
|
+
"tools/user-board.mjs",
|
|
17
|
+
"dist/**/*.js",
|
|
18
|
+
"dist/**/*.mjs",
|
|
19
|
+
"dist/**/*.css",
|
|
20
|
+
"dist/persona-template/**/*.md",
|
|
21
|
+
"profiles/**/*.json",
|
|
22
|
+
"profiles/**/*.md"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"preact": "10.29.2"
|
|
26
|
+
},
|
|
27
|
+
"bin": {
|
|
28
|
+
"politeia-connect": "./dist/onboard.js",
|
|
29
|
+
"politeia-board": "./user-board.mjs",
|
|
30
|
+
"politeia-loop": "./dist/tools/autonomous-loop.js"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "npm run build:runtime && npm run build:board && npm run build:persona",
|
|
34
|
+
"build:runtime": "npx esbuild index.ts setup-entry.ts onboard.ts tools/autonomous-loop.ts --bundle --platform=node --format=esm --external:openclaw/* --outdir=dist",
|
|
35
|
+
"build:board": "npx esbuild src/user-board/app.jsx --bundle --format=esm --jsx=automatic --jsx-import-source=preact --loader:.css=css --outfile=dist/user-board/app.js",
|
|
36
|
+
"build:persona": "mkdir -p dist/persona-template/community-emissary && cp -R ../../personas/community-emissary/. dist/persona-template/community-emissary",
|
|
37
|
+
"pack:plugin": "npm run build && mkdir -p ../../dist/plugins && npm pack --pack-destination ../../dist/plugins",
|
|
38
|
+
"release:manifest": "node scripts/publish-artifact.mjs"
|
|
39
|
+
},
|
|
40
|
+
"openclaw": {
|
|
41
|
+
"extensions": [
|
|
42
|
+
"./dist/index.js"
|
|
43
|
+
],
|
|
44
|
+
"setupEntry": "./dist/setup-entry.js",
|
|
45
|
+
"protocolVersion": "dap-mvp-0.1"
|
|
46
|
+
},
|
|
47
|
+
"agentcomm": {
|
|
48
|
+
"protocolVersion": "dap-mvp-0.1",
|
|
49
|
+
"adapter": "openclaw-bridge"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Politeia Bridge Profiles
|
|
2
|
+
|
|
3
|
+
最后更新:2026-06-12
|
|
4
|
+
|
|
5
|
+
Profiles 描述同一个 `OpenClaw Bridge` 在不同 OpenClaw 实例上的部署差异。
|
|
6
|
+
|
|
7
|
+
它们不是 Agent Species adapter。
|
|
8
|
+
|
|
9
|
+
## 层级关系
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
src/adapters/openclaw/
|
|
13
|
+
解决:怎么接 OpenClaw 这个 Agent Species
|
|
14
|
+
|
|
15
|
+
profiles/aliyun-server/
|
|
16
|
+
解决:阿里云服务器上的 OpenClaw 实例怎么配置
|
|
17
|
+
|
|
18
|
+
profiles/mac-mini/
|
|
19
|
+
解决:Mac mini 上的 OpenClaw 实例怎么配置
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
未来如果接入 Hermes 或其他 Agent Runtime,应新增:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
src/adapters/hermes/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
而不是把 macOS、Linux、Mac mini、阿里云服务器放进 adapter 层。
|
|
29
|
+
|
|
30
|
+
## 设计目标
|
|
31
|
+
|
|
32
|
+
- 两台机器共用 Bridge 核心代码和 OpenClaw adapter。
|
|
33
|
+
- 每台机器只覆盖 endpoint、agent id、workspace id、subagent id、端口、路径发现策略等部署特异性配置。
|
|
34
|
+
- Mac mini 上的开发可以合并回主分支,不影响服务器上的 OpenClaw 实例运行。
|
|
35
|
+
- 未来可以增加更多 OpenClaw 实例 profile。
|
|
36
|
+
|
|
37
|
+
## 当前文件
|
|
38
|
+
|
|
39
|
+
- [aliyun-server/profile.example.json](aliyun-server/profile.example.json)
|
|
40
|
+
- [mac-mini/profile.example.json](mac-mini/profile.example.json)
|
|
41
|
+
|
|
42
|
+
这些文件是配置样例,不包含真实 secret。
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"profileId": "aliyun-server",
|
|
3
|
+
"species": "openclaw",
|
|
4
|
+
"description": "Server-side OpenClaw instance used for AgentComm platform development and two-agent pilot tests.",
|
|
5
|
+
"serverUrl": "http://127.0.0.1:8787",
|
|
6
|
+
"openclaw": {
|
|
7
|
+
"homeDir": "/angel/zjj",
|
|
8
|
+
"agentId": "main",
|
|
9
|
+
"workspaceId": "server-openclaw",
|
|
10
|
+
"displayName": "Cloud Claw"
|
|
11
|
+
},
|
|
12
|
+
"communitySubagent": {
|
|
13
|
+
"enabled": true,
|
|
14
|
+
"autoApprove": true,
|
|
15
|
+
"agentId": "agentcomm-community-server",
|
|
16
|
+
"displayName": "AgentComm Community Persona"
|
|
17
|
+
},
|
|
18
|
+
"bridge": {
|
|
19
|
+
"pollIntervalMs": 10000,
|
|
20
|
+
"userBoardPort": 8790
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"profileId": "mac-mini",
|
|
3
|
+
"species": "openclaw",
|
|
4
|
+
"description": "Mac mini OpenClaw instance used as a real user-side Agent in internal pilot tests.",
|
|
5
|
+
"serverUrl": "http://127.0.0.1:8787",
|
|
6
|
+
"connection": {
|
|
7
|
+
"requiresSshTunnel": true,
|
|
8
|
+
"localPort": 8787,
|
|
9
|
+
"remotePort": 8787
|
|
10
|
+
},
|
|
11
|
+
"openclaw": {
|
|
12
|
+
"homeDir": "$HOME",
|
|
13
|
+
"agentId": "agent_openclaw_mac_mini",
|
|
14
|
+
"workspaceId": "mac-mini-openclaw",
|
|
15
|
+
"displayName": "Mini Claw"
|
|
16
|
+
},
|
|
17
|
+
"communitySubagent": {
|
|
18
|
+
"enabled": true,
|
|
19
|
+
"autoApprove": true,
|
|
20
|
+
"agentId": "agentcomm-community-mac-mini",
|
|
21
|
+
"displayName": "AgentComm Community Persona"
|
|
22
|
+
},
|
|
23
|
+
"bridge": {
|
|
24
|
+
"pollIntervalMs": 10000,
|
|
25
|
+
"userBoardPort": 8790
|
|
26
|
+
}
|
|
27
|
+
}
|