@agentlayer.tech/wallet 0.1.13 → 0.1.15
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/.openclaw/AGENTS.md +10 -1
- package/.openclaw/extensions/agent-wallet/README.md +20 -0
- package/.openclaw/extensions/agent-wallet/dist/index.js +1963 -0
- package/.openclaw/extensions/agent-wallet/index.ts +8 -1
- package/.openclaw/extensions/agent-wallet/package.json +44 -5
- package/.openclaw/extensions/pay-bridge/README.md +38 -0
- package/.openclaw/extensions/pay-bridge/core.mjs +287 -0
- package/.openclaw/extensions/pay-bridge/dist/core.mjs +287 -0
- package/.openclaw/extensions/pay-bridge/dist/index.js +196 -0
- package/.openclaw/extensions/pay-bridge/index.ts +196 -0
- package/.openclaw/extensions/pay-bridge/openclaw.plugin.json +34 -0
- package/.openclaw/extensions/pay-bridge/package.json +49 -0
- package/.openclaw/extensions/pay-bridge/skills/pay-operator/SKILL.md +20 -0
- package/.openclaw/extensions/pay-bridge/smoke_pay_bridge.mjs +38 -0
- package/CHANGELOG.md +29 -0
- package/README.md +33 -1
- package/RELEASING.md +70 -0
- package/agent-wallet/README.md +14 -0
- package/agent-wallet/pyproject.toml +1 -1
- package/agent-wallet/scripts/install_openclaw_local_config.py +53 -2
- package/package.json +5 -2
package/RELEASING.md
CHANGED
|
@@ -12,6 +12,13 @@ The public install command is:
|
|
|
12
12
|
npx @agentlayer.tech/wallet install --yes
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
The repo also ships two native OpenClaw plugin packages for ClawHub:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
@agentlayertech/agent-wallet-plugin
|
|
19
|
+
@agentlayertech/pay-bridge-plugin
|
|
20
|
+
```
|
|
21
|
+
|
|
15
22
|
## When npm Publishes
|
|
16
23
|
|
|
17
24
|
Normal commits and pushes do not publish new npm versions. They only run the
|
|
@@ -31,6 +38,9 @@ agent-wallet/pyproject.toml
|
|
|
31
38
|
```
|
|
32
39
|
|
|
33
40
|
If those versions do not match the tag, the workflow fails before publishing.
|
|
41
|
+
The same `v*` tag can also trigger the ClawHub plugin publish workflow, so keep
|
|
42
|
+
the root installer versions aligned with the ClawHub plugin package versions
|
|
43
|
+
when you want one GitHub release to ship both surfaces together.
|
|
34
44
|
|
|
35
45
|
## Stable Release
|
|
36
46
|
|
|
@@ -174,6 +184,66 @@ OpenClaw secrets
|
|
|
174
184
|
|
|
175
185
|
The package allowlist lives in `package.json` under `files`.
|
|
176
186
|
|
|
187
|
+
## ClawHub Plugin Packages
|
|
188
|
+
|
|
189
|
+
The OpenClaw plugin packages are published separately from the npm installer.
|
|
190
|
+
They are additive and do not replace `@agentlayer.tech/wallet`.
|
|
191
|
+
|
|
192
|
+
Before publishing either package, build and validate the runtime artifacts:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
npm run build:openclaw-plugins
|
|
196
|
+
npm run check:openclaw-plugins
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Dry-run the package contents from each plugin directory:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
(cd .openclaw/extensions/agent-wallet && npm pack --dry-run)
|
|
203
|
+
(cd .openclaw/extensions/pay-bridge && npm pack --dry-run)
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Publish to ClawHub with the package-specific command documented by OpenClaw:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
clawhub package publish .openclaw/extensions/agent-wallet --dry-run
|
|
210
|
+
clawhub package publish .openclaw/extensions/agent-wallet
|
|
211
|
+
|
|
212
|
+
clawhub package publish .openclaw/extensions/pay-bridge --dry-run
|
|
213
|
+
clawhub package publish .openclaw/extensions/pay-bridge
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Users then install them natively through OpenClaw:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
openclaw plugins install clawhub:@agentlayertech/agent-wallet-plugin
|
|
220
|
+
openclaw plugins install clawhub:@agentlayertech/pay-bridge-plugin
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
GitHub Actions can publish the same packages automatically from tags and manual
|
|
224
|
+
dispatch through `.github/workflows/clawhub-plugins.yml`.
|
|
225
|
+
|
|
226
|
+
Required repository secret:
|
|
227
|
+
|
|
228
|
+
```text
|
|
229
|
+
CLAWHUB_TOKEN
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Workflow behavior:
|
|
233
|
+
|
|
234
|
+
- `pull_request`: packs both plugins and runs ClawHub `--dry-run`
|
|
235
|
+
- `workflow_dispatch`: publishes or dry-runs based on the `dry_run` input
|
|
236
|
+
- `push` on `v*` tags: publishes both plugins automatically
|
|
237
|
+
|
|
238
|
+
The workflow currently publishes:
|
|
239
|
+
|
|
240
|
+
- `.openclaw/extensions/agent-wallet` as `bundle-plugin`
|
|
241
|
+
- `.openclaw/extensions/pay-bridge` as `code-plugin`
|
|
242
|
+
|
|
243
|
+
`agent-wallet` stays on `bundle-plugin` because that package name was first
|
|
244
|
+
published to ClawHub with that family, and ClawHub does not allow family
|
|
245
|
+
changes for an existing package record.
|
|
246
|
+
|
|
177
247
|
## Runtime Layout
|
|
178
248
|
|
|
179
249
|
Installer releases are copied into the user's OpenClaw home:
|
package/agent-wallet/README.md
CHANGED
|
@@ -558,6 +558,20 @@ It forwards tool execution to the Python bridge CLI:
|
|
|
558
558
|
|
|
559
559
|
This keeps the official OpenClaw-facing layer in TypeScript while the actual wallet/security logic remains in the Python backend.
|
|
560
560
|
|
|
561
|
+
If you want OpenClaw to install the plugin through ClawHub instead of a repo-local path, use:
|
|
562
|
+
|
|
563
|
+
```bash
|
|
564
|
+
openclaw plugins install clawhub:@agentlayertech/agent-wallet-plugin
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
That native plugin package is additive. Keep the existing runtime installer for the actual wallet backend:
|
|
568
|
+
|
|
569
|
+
```bash
|
|
570
|
+
npx @agentlayer.tech/wallet install --yes
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
The ClawHub plugin package auto-checks `~/.openclaw/agent-wallet-runtime/current/agent-wallet` before it falls back to a local workspace checkout.
|
|
574
|
+
|
|
561
575
|
Public-safe helper scripts are available in `agent-wallet/scripts/`:
|
|
562
576
|
|
|
563
577
|
- `install_openclaw_local_config.py`
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
"""Patch an OpenClaw config file for the
|
|
1
|
+
"""Patch an OpenClaw config file for the AgentLayer OpenClaw plugins."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import argparse
|
|
6
6
|
import json
|
|
7
7
|
import os
|
|
8
|
+
import shutil
|
|
8
9
|
import sys
|
|
9
10
|
from datetime import datetime, timezone
|
|
10
11
|
from pathlib import Path
|
|
@@ -44,6 +45,15 @@ OPTIONAL_TOOLS = [
|
|
|
44
45
|
"request_devnet_airdrop",
|
|
45
46
|
]
|
|
46
47
|
|
|
48
|
+
PAY_BRIDGE_PLUGIN_ID = "pay-bridge"
|
|
49
|
+
PAY_BRIDGE_TOOLS = [
|
|
50
|
+
"pay_status",
|
|
51
|
+
"pay_wallet_info",
|
|
52
|
+
"pay_search_services",
|
|
53
|
+
"pay_get_service_endpoints",
|
|
54
|
+
"pay_api_request",
|
|
55
|
+
]
|
|
56
|
+
|
|
47
57
|
|
|
48
58
|
def _default_config_path() -> Path:
|
|
49
59
|
return Path(os.path.expanduser("~/.openclaw/openclaw.json"))
|
|
@@ -83,6 +93,13 @@ def _default_extension_path() -> Path:
|
|
|
83
93
|
return _repo_root() / ".openclaw" / "extensions" / "agent-wallet"
|
|
84
94
|
|
|
85
95
|
|
|
96
|
+
def _default_pay_bridge_extension_path() -> Path:
|
|
97
|
+
runtime_root = _trusted_runtime_root()
|
|
98
|
+
if runtime_root is not None:
|
|
99
|
+
return runtime_root / ".openclaw" / "extensions" / PAY_BRIDGE_PLUGIN_ID
|
|
100
|
+
return _repo_root() / ".openclaw" / "extensions" / PAY_BRIDGE_PLUGIN_ID
|
|
101
|
+
|
|
102
|
+
|
|
86
103
|
def _default_package_root() -> Path:
|
|
87
104
|
runtime_root = _trusted_runtime_root()
|
|
88
105
|
if runtime_root is not None:
|
|
@@ -105,6 +122,14 @@ def _default_python_bin() -> str:
|
|
|
105
122
|
return sys.executable
|
|
106
123
|
|
|
107
124
|
|
|
125
|
+
def _default_pay_binary() -> str:
|
|
126
|
+
explicit = os.getenv("OPENCLAW_PAY_BINARY", "").strip()
|
|
127
|
+
if explicit:
|
|
128
|
+
return explicit
|
|
129
|
+
resolved = shutil.which("pay")
|
|
130
|
+
return resolved or "pay"
|
|
131
|
+
|
|
132
|
+
|
|
108
133
|
def _default_user_id() -> str:
|
|
109
134
|
return f"{os.getenv('USER', 'openclaw-user')}-local"
|
|
110
135
|
|
|
@@ -142,8 +167,10 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
142
167
|
default=True,
|
|
143
168
|
)
|
|
144
169
|
parser.add_argument("--extension-path", default=str(_default_extension_path()))
|
|
170
|
+
parser.add_argument("--pay-bridge-extension-path", default=str(_default_pay_bridge_extension_path()))
|
|
145
171
|
parser.add_argument("--package-root", default=str(_default_package_root()))
|
|
146
172
|
parser.add_argument("--python-bin", default=_default_python_bin())
|
|
173
|
+
parser.add_argument("--pay-binary", default=_default_pay_binary())
|
|
147
174
|
parser.add_argument("--write-master-key", action=argparse.BooleanOptionalAction, default=False)
|
|
148
175
|
return parser
|
|
149
176
|
|
|
@@ -214,12 +241,20 @@ def main() -> None:
|
|
|
214
241
|
|
|
215
242
|
plugins = data.setdefault("plugins", {})
|
|
216
243
|
plugins["enabled"] = True
|
|
244
|
+
allow = plugins.setdefault("allow", [])
|
|
245
|
+
if args.plugin_id not in allow:
|
|
246
|
+
allow.append(args.plugin_id)
|
|
247
|
+
if PAY_BRIDGE_PLUGIN_ID not in allow:
|
|
248
|
+
allow.append(PAY_BRIDGE_PLUGIN_ID)
|
|
217
249
|
|
|
218
250
|
load = plugins.setdefault("load", {})
|
|
219
251
|
paths = load.setdefault("paths", [])
|
|
220
252
|
extension_path_text = str(Path(args.extension_path).expanduser().resolve())
|
|
221
253
|
if extension_path_text not in paths:
|
|
222
254
|
paths.append(extension_path_text)
|
|
255
|
+
pay_bridge_extension_path_text = str(Path(args.pay_bridge_extension_path).expanduser().resolve())
|
|
256
|
+
if pay_bridge_extension_path_text not in paths:
|
|
257
|
+
paths.append(pay_bridge_extension_path_text)
|
|
223
258
|
|
|
224
259
|
entries = plugins.setdefault("entries", {})
|
|
225
260
|
effective_network = _normalize_network(args.backend, args.network)
|
|
@@ -272,10 +307,25 @@ def main() -> None:
|
|
|
272
307
|
"enabled": True,
|
|
273
308
|
"config": plugin_config,
|
|
274
309
|
}
|
|
310
|
+
existing_pay_entry = entries.get(PAY_BRIDGE_PLUGIN_ID) if isinstance(entries.get(PAY_BRIDGE_PLUGIN_ID), dict) else {}
|
|
311
|
+
existing_pay_config = (
|
|
312
|
+
dict(existing_pay_entry.get("config"))
|
|
313
|
+
if isinstance(existing_pay_entry.get("config"), dict)
|
|
314
|
+
else {}
|
|
315
|
+
)
|
|
316
|
+
pay_bridge_config = {
|
|
317
|
+
**existing_pay_config,
|
|
318
|
+
"payBinary": args.pay_binary.strip() or _default_pay_binary(),
|
|
319
|
+
"requireHttps": bool(existing_pay_config.get("requireHttps", True)),
|
|
320
|
+
}
|
|
321
|
+
entries[PAY_BRIDGE_PLUGIN_ID] = {
|
|
322
|
+
"enabled": True,
|
|
323
|
+
"config": pay_bridge_config,
|
|
324
|
+
}
|
|
275
325
|
|
|
276
326
|
tools = data.setdefault("tools", {})
|
|
277
327
|
also_allow = tools.setdefault("alsoAllow", [])
|
|
278
|
-
for tool_name in OPTIONAL_TOOLS:
|
|
328
|
+
for tool_name in OPTIONAL_TOOLS + PAY_BRIDGE_TOOLS:
|
|
279
329
|
if tool_name not in also_allow:
|
|
280
330
|
also_allow.append(tool_name)
|
|
281
331
|
|
|
@@ -291,6 +341,7 @@ def main() -> None:
|
|
|
291
341
|
"config_path": str(config_path),
|
|
292
342
|
"backup_path": str(backup_path),
|
|
293
343
|
"extension_path": extension_path_text,
|
|
344
|
+
"pay_bridge_extension_path": pay_bridge_extension_path_text,
|
|
294
345
|
"python_bin": args.python_bin,
|
|
295
346
|
"package_root": plugin_config["packageRoot"],
|
|
296
347
|
"plugin_id": args.plugin_id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentlayer.tech/wallet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "NPM installer for the OpenClaw Agent Wallet local runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"bin": "./bin/openclaw-agent-wallet.mjs",
|
|
15
15
|
"scripts": {
|
|
16
16
|
"check": "node --check bin/openclaw-agent-wallet.mjs",
|
|
17
|
+
"build:openclaw-plugins": "node scripts/manage_openclaw_plugin_packages.mjs build",
|
|
18
|
+
"check:openclaw-plugins": "node scripts/manage_openclaw_plugin_packages.mjs check",
|
|
17
19
|
"check:release-version": "node scripts/check_release_version.mjs",
|
|
18
20
|
"test:npm-installer": "python3 agent-wallet/tests/smoke_npm_installer.py",
|
|
19
21
|
"pack:dry-run": "npm pack --dry-run"
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
"agent-wallet/pyproject.toml",
|
|
39
41
|
".openclaw/AGENTS.md",
|
|
40
42
|
".openclaw/extensions/agent-wallet/",
|
|
43
|
+
".openclaw/extensions/pay-bridge/",
|
|
41
44
|
"hermes/plugins/agent_wallet/",
|
|
42
45
|
"wdk-btc-wallet/src/",
|
|
43
46
|
"wdk-btc-wallet/bootstrap.sh",
|
|
@@ -69,4 +72,4 @@
|
|
|
69
72
|
"evm"
|
|
70
73
|
],
|
|
71
74
|
"license": "SEE LICENSE IN LICENSE"
|
|
72
|
-
}
|
|
75
|
+
}
|