neuralnode 2.2.3__py3-none-any.whl → 2.2.4__py3-none-any.whl

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.
neuralnode/__init__.py CHANGED
@@ -42,7 +42,7 @@ Quick Start::
42
42
  text = sr.listen()
43
43
  """
44
44
 
45
- __version__ = "2.2.3"
45
+ __version__ = "2.2.4"
46
46
  __author__ = "NeuralNode Contributors"
47
47
 
48
48
  # ── Core types ────────────────────────────────────────────────────────────────
@@ -14,6 +14,7 @@ import logging
14
14
  import threading
15
15
  import subprocess
16
16
  import shutil
17
+ import json
17
18
  from pathlib import Path
18
19
  from typing import Any, Dict, List, Optional, Union, Generator
19
20
 
@@ -372,14 +373,39 @@ class OpenClawManager:
372
373
  pm_cmd = ["npm", "install"]
373
374
  else:
374
375
  raise RuntimeError("npm or pnpm is required to install OpenClaw dependencies. Install Node.js and retry.")
375
- subprocess.run(
376
+ install_result = subprocess.run(
376
377
  pm_cmd,
377
378
  cwd=str(repo_dir),
378
379
  check=True,
379
380
  capture_output=True
380
381
  )
381
382
  except subprocess.CalledProcessError as e:
382
- raise RuntimeError(f"Failed to install node dependencies: {e.stderr.decode()}")
383
+ output = (e.stdout or b"").decode(errors="replace") + (e.stderr or b"").decode(errors="replace")
384
+ raise RuntimeError(f"Failed to install node dependencies: {output.strip()}")
385
+
386
+ package_json_path = repo_dir / "package.json"
387
+ dist_entry_exists = (repo_dir / "dist" / "entry.mjs").exists() or (repo_dir / "dist" / "entry.js").exists()
388
+ if package_json_path.exists() and not dist_entry_exists:
389
+ try:
390
+ with open(package_json_path, "r", encoding="utf-8") as f:
391
+ package_json = json.load(f)
392
+ scripts = package_json.get("scripts", {})
393
+ except Exception:
394
+ scripts = {}
395
+
396
+ if "build" in scripts:
397
+ build_cmd = [pm_cmd[0], "run", "build"]
398
+ logger.info(f"Building OpenClaw via: {' '.join(build_cmd)}")
399
+ try:
400
+ subprocess.run(
401
+ build_cmd,
402
+ cwd=str(repo_dir),
403
+ check=True,
404
+ capture_output=True,
405
+ )
406
+ except subprocess.CalledProcessError as e:
407
+ output = (e.stdout or b"").decode(errors="replace") + (e.stderr or b"").decode(errors="replace")
408
+ raise RuntimeError(f"Failed to build OpenClaw source tree: {output.strip()}")
383
409
 
384
410
  # Step 3: Write configuration pointing to NeuralNode API server
385
411
  self.configure()
@@ -434,7 +460,7 @@ class OpenClawManager:
434
460
 
435
461
  # Find starting command
436
462
  # Use node openclaw.mjs gateway or npm run dev/start
437
- startup_cmd = ["node", "openclaw.mjs", "gateway"]
463
+ startup_cmd = ["node", "openclaw.mjs", "gateway", "--allow-unconfigured"]
438
464
 
439
465
  # Fallback to dev command if js build not present
440
466
  if not (repo_dir / "openclaw.mjs").exists():
@@ -447,9 +473,21 @@ class OpenClawManager:
447
473
  raise RuntimeError("npm or pnpm is required to start OpenClaw. Install Node.js and retry.")
448
474
 
449
475
  logger.info(f"Starting OpenClaw Gateway via: {' '.join(startup_cmd)}")
476
+ process_env = os.environ.copy()
477
+ process_env.update(
478
+ {
479
+ "PORT": str(self.gateway_port),
480
+ "GATEWAY_HOST": self.gateway_host,
481
+ "GATEWAY_TOKEN": self.api_key or "neuralnode-secret-key",
482
+ "OPENAI_BASE_URL": f"http://127.0.0.1:{self.api_server_port}/v1",
483
+ "OPENAI_API_KEY": "neuralnode-secret-key",
484
+ "OPENAI_MODEL": getattr(self.node, "model", "neuralnode-model") or "neuralnode-model",
485
+ }
486
+ )
450
487
  self.process = subprocess.Popen(
451
488
  startup_cmd,
452
489
  cwd=str(repo_dir),
490
+ env=process_env,
453
491
  stdout=subprocess.PIPE,
454
492
  stderr=subprocess.PIPE,
455
493
  text=True
@@ -468,7 +506,10 @@ class OpenClawManager:
468
506
  # Check process state
469
507
  if self.process.poll() is not None:
470
508
  stdout, stderr = self.process.communicate()
471
- raise RuntimeError(f"OpenClaw process exited immediately with code {self.process.returncode}. Error: {stderr}")
509
+ raise RuntimeError(
510
+ f"OpenClaw process exited immediately with code {self.process.returncode}. "
511
+ f"Output: {(stdout or '') + (stderr or '')}"
512
+ )
472
513
 
473
514
  logger.warning("OpenClaw Gateway start timed out, but process is still running.")
474
515
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neuralnode
3
- Version: 2.2.3
3
+ Version: 2.2.4
4
4
  Summary: Comprehensive AI Framework with 50+ LLM Providers, Advanced Agents, Chains, Memory, RAG, and 100+ Tools
5
5
  Project-URL: Homepage, https://assem.cloud/
6
6
  Project-URL: Documentation, https://neuralnode.readthedocs.io
@@ -1,4 +1,4 @@
1
- neuralnode/__init__.py,sha256=Zf4b-xXoaACFN3Vg_jxyBW8O8ZFkRQV8vhRDU7_lPBk,25360
1
+ neuralnode/__init__.py,sha256=l_ziDzLMzafX4x93mwwhDGorLr2Qzx0m1zSDPrPLn78,25360
2
2
  neuralnode/replica.py,sha256=QlvR3tfLt0Y7XSsUsB5wiKI_EO7oUFM-8XH0wsrrvls,7995
3
3
  neuralnode/thinking.py,sha256=iBfCfBrLkD6AaHf2WaWfmzhFeV6zcXEZDjzLxmYt4VY,12614
4
4
  neuralnode/turboquant.py,sha256=bRKsUbniJrtxvQ8mQqlSK-N6M2PltJJxd5H4lBW7kDc,18340
@@ -10,7 +10,7 @@ neuralnode/core/openai_blocker.py,sha256=NyMH5aXBF5toSfc_eObr3L7qHszWiOoCwDVrbOn
10
10
  neuralnode/diagnostics/__init__.py,sha256=22U_NVNN3Y9FhheUXxwDLx1LGELxiN75ehHrH0t_QkM,25622
11
11
  neuralnode/integrations/__init__.py,sha256=lB3CU5Inw5JQYiIMHzZgJtygxtsaQp_5_AefnU1lQh0,711
12
12
  neuralnode/integrations/discord.py,sha256=_xneToa06BFcvvaXWjG4G3w6iRtCJ_dwtfFz7pjtBZA,6465
13
- neuralnode/integrations/openclaw.py,sha256=z1BIwy1PvO8HdYR-9jUqBa6zeT9R1FqL8lCIAGcFGeM,18691
13
+ neuralnode/integrations/openclaw.py,sha256=qmI-dda-28t7wBwT1RmjsQXyjU36iCxkjHTDGU5CCLA,20651
14
14
  neuralnode/integrations/slack.py,sha256=phgr4_fS2uMFkY7FeDOuzOagY2wQxhNDlqHK2KbtLGw,6259
15
15
  neuralnode/integrations/telegram.py,sha256=re9Off7zT_Rxm7yR4FOYN3JrjYqth4UQJ3O5AIJXKMU,26632
16
16
  neuralnode/integrations/whatsapp.py,sha256=dVDFA-IhkE6AGBEvIViIrL2rY-D0OoPDfgQM7Ft_B3U,14670
@@ -407,7 +407,7 @@ neuralnode/utils/logger.py,sha256=vh0K2JYqqgwdtyYjtNbPK9QW6ZhOEqpp_NOHghl94e8,86
407
407
  neuralnode/utils/metrics.py,sha256=z5JHDV-I5foOiY8j7vQE-GYyTSM5p04_EcWBP7qJlY4,7389
408
408
  neuralnode/vectorstores/__init__.py,sha256=vCQ-L7jbhTVEQPrLehpzhm6K3SQIprUicF1X7BOF8w8,28172
409
409
  neuralnode/vision/__init__.py,sha256=MepTSuvOBXjGJK1i2zxZLSGlBm-WOV1ylu4Xa-pAObw,5756
410
- neuralnode-2.2.3.dist-info/METADATA,sha256=rLAgT8M5CdxIqslRiFbxM3WyPigPeMMSHP7M31lWVjY,14175
411
- neuralnode-2.2.3.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
412
- neuralnode-2.2.3.dist-info/licenses/LICENSE,sha256=Pwd03UGSoleqoehkTRuTj6FwLzMknjSiVDuLOD2sfts,1067
413
- neuralnode-2.2.3.dist-info/RECORD,,
410
+ neuralnode-2.2.4.dist-info/METADATA,sha256=pqift6g64Q3ZRUOPlviWPfiKHZ_q7RTYKRKraq6ygY8,14175
411
+ neuralnode-2.2.4.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
412
+ neuralnode-2.2.4.dist-info/licenses/LICENSE,sha256=Pwd03UGSoleqoehkTRuTj6FwLzMknjSiVDuLOD2sfts,1067
413
+ neuralnode-2.2.4.dist-info/RECORD,,