@agentlayer.tech/wallet 0.1.4 → 0.1.6
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.
|
@@ -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:
|
|
@@ -308,11 +308,12 @@ def _ensure_node_runtime(npm_bin: str, project_root: Path) -> dict[str, object]:
|
|
|
308
308
|
package_lock = project_root / "package-lock.json"
|
|
309
309
|
command = [npm_bin, "ci"] if package_lock.exists() else [npm_bin, "install"]
|
|
310
310
|
env = dict(os.environ)
|
|
311
|
-
cache_dir =
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
311
|
+
cache_dir = (
|
|
312
|
+
env.get("OPENCLAW_AGENT_WALLET_NPM_CACHE")
|
|
313
|
+
or str(_resolve_openclaw_home() / "npm-cache")
|
|
314
|
+
)
|
|
315
|
+
env["NPM_CONFIG_CACHE"] = cache_dir
|
|
316
|
+
env["npm_config_cache"] = cache_dir
|
|
316
317
|
Path(cache_dir).expanduser().mkdir(parents=True, exist_ok=True)
|
|
317
318
|
subprocess.run(command, cwd=project_root, check=True, env=env)
|
|
318
319
|
return {
|
|
@@ -344,7 +345,12 @@ def _build_next_steps(
|
|
|
344
345
|
python_bin: Path,
|
|
345
346
|
script_path: Path,
|
|
346
347
|
args: argparse.Namespace,
|
|
348
|
+
*,
|
|
349
|
+
package_root: Path | None = None,
|
|
350
|
+
extension_path: Path | None = None,
|
|
347
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()
|
|
348
354
|
command = [
|
|
349
355
|
str(python_bin),
|
|
350
356
|
str(script_path),
|
|
@@ -364,8 +370,8 @@ def _build_next_steps(
|
|
|
364
370
|
if args.rpc_urls.strip():
|
|
365
371
|
command.extend(["--rpc-urls", args.rpc_urls.strip()])
|
|
366
372
|
command.append("--sign-only" if args.sign_only else "--no-sign-only")
|
|
367
|
-
command.extend(["--extension-path", str(
|
|
368
|
-
command.extend(["--package-root", str(
|
|
373
|
+
command.extend(["--extension-path", str(effective_extension_path)])
|
|
374
|
+
command.extend(["--package-root", str(effective_package_root)])
|
|
369
375
|
command.extend(["--python-bin", str(python_bin)])
|
|
370
376
|
return command
|
|
371
377
|
|
|
@@ -473,7 +479,13 @@ def main() -> None:
|
|
|
473
479
|
configure_stdout = ""
|
|
474
480
|
if backend_enabled and not pending_env and not args.dry_run:
|
|
475
481
|
result = subprocess.run(
|
|
476
|
-
_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
|
+
),
|
|
477
489
|
capture_output=True,
|
|
478
490
|
text=True,
|
|
479
491
|
check=True,
|
|
@@ -501,7 +513,13 @@ def main() -> None:
|
|
|
501
513
|
"runtime_sync": runtime_sync,
|
|
502
514
|
"configured": configured,
|
|
503
515
|
"pending_env": pending_env,
|
|
504
|
-
"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
|
+
),
|
|
505
523
|
"configure_result": json.loads(configure_stdout) if configure_stdout else None,
|
|
506
524
|
},
|
|
507
525
|
indent=2,
|