@agentlayer.tech/wallet 0.1.6 → 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 +24 -11
- package/agent-wallet/pyproject.toml +1 -1
- package/package.json +11 -1
- package/scripts/check_release_version.mjs +42 -0
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:
|
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
|
+
}
|