@agentlayer.tech/wallet 0.1.5 → 0.1.7-beta.12
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/RELEASING.md
CHANGED
|
@@ -22,38 +22,51 @@ Before publishing a tag, verify locally:
|
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
npm run check
|
|
25
|
+
npm run check:release-version
|
|
25
26
|
python3 agent-wallet/tests/smoke_npm_installer.py
|
|
26
27
|
python3 agent-wallet/tests/smoke_install_agent_wallet.py
|
|
27
28
|
npm --cache /tmp/npm-cache pack --dry-run
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
The GitHub workflow `.github/workflows/npm-installer.yml` verifies the package
|
|
31
|
-
on pull requests and publishes tagged releases to npm
|
|
32
|
-
|
|
32
|
+
on pull requests and publishes tagged releases to npm through npm Trusted
|
|
33
|
+
Publishing. Configure the npm package's trusted publisher before publishing:
|
|
33
34
|
|
|
34
35
|
```text
|
|
35
|
-
|
|
36
|
+
Provider: GitHub Actions
|
|
37
|
+
Organization or user: lopushok9
|
|
38
|
+
Repository: Agent-Layer
|
|
39
|
+
Workflow filename: npm-installer.yml
|
|
36
40
|
```
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
The `repository.url` field in `package.json` must exactly match the GitHub
|
|
43
|
+
repository URL, for example `https://github.com/lopushok9/Agent-Layer.git`.
|
|
44
|
+
Do not use the `git+https://` npm shorthand for Trusted Publishing releases.
|
|
45
|
+
|
|
46
|
+
Do not use `NPM_TOKEN` for publishing unless Trusted Publishing is unavailable.
|
|
47
|
+
Token-based publishes can fail with `EOTP` when package or account policy
|
|
48
|
+
requires two-factor authentication.
|
|
49
|
+
|
|
50
|
+
Publish stable releases from version tags. The tag must match both
|
|
51
|
+
`package.json` and `agent-wallet/pyproject.toml`:
|
|
39
52
|
|
|
40
53
|
```bash
|
|
41
|
-
git tag v0.1.
|
|
42
|
-
git push origin v0.1.
|
|
54
|
+
git tag v0.1.6
|
|
55
|
+
git push origin v0.1.6
|
|
43
56
|
```
|
|
44
57
|
|
|
45
58
|
The workflow runs:
|
|
46
59
|
|
|
47
60
|
```bash
|
|
48
|
-
npm publish --access public --
|
|
61
|
+
npm publish --access public --tag latest
|
|
49
62
|
```
|
|
50
63
|
|
|
51
|
-
For pre-release
|
|
52
|
-
|
|
64
|
+
For pre-release tags, use a semver prerelease version in both package files,
|
|
65
|
+
then push the matching tag. The workflow publishes those with npm tag `beta`:
|
|
53
66
|
|
|
54
67
|
```bash
|
|
55
|
-
|
|
56
|
-
|
|
68
|
+
git tag v0.1.7-beta.1
|
|
69
|
+
git push origin v0.1.7-beta.1
|
|
57
70
|
```
|
|
58
71
|
|
|
59
72
|
Runtime updates are versioned under:
|
|
@@ -79,7 +79,7 @@ def _default_env_example_path() -> Path:
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
def _default_config_path() -> Path:
|
|
82
|
-
return
|
|
82
|
+
return _resolve_openclaw_home() / "openclaw.json"
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
def _default_venv_path() -> Path:
|
|
@@ -345,7 +345,12 @@ def _build_next_steps(
|
|
|
345
345
|
python_bin: Path,
|
|
346
346
|
script_path: Path,
|
|
347
347
|
args: argparse.Namespace,
|
|
348
|
+
*,
|
|
349
|
+
package_root: Path | None = None,
|
|
350
|
+
extension_path: Path | None = None,
|
|
348
351
|
) -> list[str]:
|
|
352
|
+
effective_package_root = package_root or Path(args.package_root).expanduser()
|
|
353
|
+
effective_extension_path = extension_path or Path(args.extension_path).expanduser()
|
|
349
354
|
command = [
|
|
350
355
|
str(python_bin),
|
|
351
356
|
str(script_path),
|
|
@@ -365,8 +370,8 @@ def _build_next_steps(
|
|
|
365
370
|
if args.rpc_urls.strip():
|
|
366
371
|
command.extend(["--rpc-urls", args.rpc_urls.strip()])
|
|
367
372
|
command.append("--sign-only" if args.sign_only else "--no-sign-only")
|
|
368
|
-
command.extend(["--extension-path", str(
|
|
369
|
-
command.extend(["--package-root", str(
|
|
373
|
+
command.extend(["--extension-path", str(effective_extension_path)])
|
|
374
|
+
command.extend(["--package-root", str(effective_package_root)])
|
|
370
375
|
command.extend(["--python-bin", str(python_bin)])
|
|
371
376
|
return command
|
|
372
377
|
|
|
@@ -474,7 +479,13 @@ def main() -> None:
|
|
|
474
479
|
configure_stdout = ""
|
|
475
480
|
if backend_enabled and not pending_env and not args.dry_run:
|
|
476
481
|
result = subprocess.run(
|
|
477
|
-
_build_next_steps(
|
|
482
|
+
_build_next_steps(
|
|
483
|
+
python_bin,
|
|
484
|
+
install_config_script,
|
|
485
|
+
args,
|
|
486
|
+
package_root=package_root,
|
|
487
|
+
extension_path=extension_path,
|
|
488
|
+
),
|
|
478
489
|
capture_output=True,
|
|
479
490
|
text=True,
|
|
480
491
|
check=True,
|
|
@@ -502,7 +513,13 @@ def main() -> None:
|
|
|
502
513
|
"runtime_sync": runtime_sync,
|
|
503
514
|
"configured": configured,
|
|
504
515
|
"pending_env": pending_env,
|
|
505
|
-
"next_configure_command": _build_next_steps(
|
|
516
|
+
"next_configure_command": _build_next_steps(
|
|
517
|
+
python_bin,
|
|
518
|
+
install_config_script,
|
|
519
|
+
args,
|
|
520
|
+
package_root=package_root,
|
|
521
|
+
extension_path=extension_path,
|
|
522
|
+
),
|
|
506
523
|
"configure_result": json.loads(configure_stdout) if configure_stdout else None,
|
|
507
524
|
},
|
|
508
525
|
indent=2,
|
package/package.json
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentlayer.tech/wallet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7-beta.12",
|
|
4
4
|
"description": "NPM installer for the OpenClaw Agent Wallet local runtime.",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/lopushok9/Agent-Layer.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/lopushok9/Agent-Layer/issues"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/lopushok9/Agent-Layer#readme",
|
|
6
14
|
"bin": {
|
|
7
15
|
"openclaw-agent-wallet": "./bin/openclaw-agent-wallet.mjs"
|
|
8
16
|
},
|
|
9
17
|
"scripts": {
|
|
10
18
|
"check": "node --check bin/openclaw-agent-wallet.mjs",
|
|
19
|
+
"check:release-version": "node scripts/check_release_version.mjs",
|
|
11
20
|
"test:npm-installer": "python3 agent-wallet/tests/smoke_npm_installer.py",
|
|
12
21
|
"pack:dry-run": "npm pack --dry-run"
|
|
13
22
|
},
|
|
14
23
|
"files": [
|
|
15
24
|
"bin/",
|
|
25
|
+
"scripts/check_release_version.mjs",
|
|
16
26
|
"setup.sh",
|
|
17
27
|
"install-from-github.sh",
|
|
18
28
|
"README.md",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
|
|
5
|
+
const packageJson = JSON.parse(fs.readFileSync("package.json", "utf8"));
|
|
6
|
+
const pyproject = fs.readFileSync("agent-wallet/pyproject.toml", "utf8");
|
|
7
|
+
const pyVersion = pyproject.match(/^version\s*=\s*"([^"]+)"/m)?.[1] || "";
|
|
8
|
+
const packageVersion = packageJson.version;
|
|
9
|
+
const refName = process.env.GITHUB_REF_NAME || process.argv[2] || "";
|
|
10
|
+
const expectedFromTag = refName.startsWith("v") ? refName.slice(1) : "";
|
|
11
|
+
const errors = [];
|
|
12
|
+
|
|
13
|
+
if (!packageVersion) {
|
|
14
|
+
errors.push("package.json version is missing");
|
|
15
|
+
}
|
|
16
|
+
if (!pyVersion) {
|
|
17
|
+
errors.push("agent-wallet/pyproject.toml version is missing");
|
|
18
|
+
}
|
|
19
|
+
if (packageVersion && pyVersion && packageVersion !== pyVersion) {
|
|
20
|
+
errors.push(`version mismatch: package.json=${packageVersion}, pyproject=${pyVersion}`);
|
|
21
|
+
}
|
|
22
|
+
if (expectedFromTag && packageVersion !== expectedFromTag) {
|
|
23
|
+
errors.push(`tag/version mismatch: tag=${refName}, package.json=${packageVersion}`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (errors.length > 0) {
|
|
27
|
+
for (const error of errors) {
|
|
28
|
+
console.error(error);
|
|
29
|
+
}
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const npmTag = packageVersion.includes("-") ? "beta" : "latest";
|
|
34
|
+
console.log(`release_version=${packageVersion}`);
|
|
35
|
+
console.log(`npm_tag=${npmTag}`);
|
|
36
|
+
|
|
37
|
+
if (process.env.GITHUB_OUTPUT) {
|
|
38
|
+
fs.appendFileSync(
|
|
39
|
+
process.env.GITHUB_OUTPUT,
|
|
40
|
+
`release_version=${packageVersion}\nnpm_tag=${npmTag}\n`,
|
|
41
|
+
);
|
|
42
|
+
}
|