polymath-nodeos 1.0.0__tar.gz → 1.0.2__tar.gz

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.
Files changed (27) hide show
  1. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/PKG-INFO +7 -7
  2. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/README.md +6 -6
  3. polymath_nodeos-1.0.2/polymath_nodeos/cli.py +106 -0
  4. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/daemon.py +0 -16
  5. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos.egg-info/PKG-INFO +7 -7
  6. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos.egg-info/SOURCES.txt +1 -0
  7. polymath_nodeos-1.0.2/polymath_nodeos.egg-info/entry_points.txt +2 -0
  8. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/pyproject.toml +2 -4
  9. polymath_nodeos-1.0.0/polymath_nodeos.egg-info/entry_points.txt +0 -4
  10. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/__init__.py +0 -0
  11. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/graph_manager.py +0 -0
  12. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/jage_engine.py +0 -0
  13. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/nodes_engine.py +0 -0
  14. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/__init__.py +0 -0
  15. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/agy_invoke.py +0 -0
  16. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/blast_radius_engine.py +0 -0
  17. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/dead_code_engine.py +0 -0
  18. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/domino_engine.py +0 -0
  19. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/ghost_writer_engine.py +0 -0
  20. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/intent_injector.py +0 -0
  21. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/intent_stopper.py +0 -0
  22. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/ipc_hook.py +0 -0
  23. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/legacy_math.py +0 -0
  24. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos/scripts/telemetry.py +0 -0
  25. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos.egg-info/dependency_links.txt +0 -0
  26. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/polymath_nodeos.egg-info/top_level.txt +0 -0
  27. {polymath_nodeos-1.0.0 → polymath_nodeos-1.0.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polymath-nodeos
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: A zero-dependency Autonomous Agentic Swarm Operating System.
5
5
  Author: Polymath Void
6
6
  License: MIT
@@ -50,14 +50,14 @@ Polymath-NodeOS is designed for frictionless installation.
50
50
  If you are using the Antigravity IDE, simply cloning this repository and opening the workspace will automatically trigger the `.agents/hooks.json` script. The system will seamlessly install itself into your global environment.
51
51
 
52
52
  ### Method 2: Manual Installation
53
- Navigate to the repository root and run:
53
+ Install the package globally via pip:
54
54
  ```bash
55
- python install.py
55
+ pip install polymath-nodeos
56
56
  ```
57
57
  **What this does:**
58
- 1. Installs the `nodeos_standard.md` rule globally.
59
- 2. Deploys the `agy-nodeos-installer` skill.
60
- 3. Grants your AGY agents immediate global awareness of the NodeOS interaction paradigm.
58
+ 1. Installs the `nodeos` CLI globally.
59
+ 2. Allows you to instantly boot the Swarm OS in any folder.
60
+ 3. Automatically triggers your swarm agents to read `workflow.json`.
61
61
 
62
62
  ---
63
63
 
@@ -68,7 +68,7 @@ Polymath-NodeOS works silently in the background to empower your AI agents.
68
68
  ### Starting the OS
69
69
  To initialize NodeOS in a project directory, you or your agent can start the background daemon:
70
70
  ```bash
71
- polymath-nodeos-daemon
71
+ nodeos -d
72
72
  ```
73
73
  *Note: In properly configured workspaces, the daemon automatically boots when the agent initializes thanks to the AGY Customization Engine (`PreInvocation` hook).*
74
74
 
@@ -38,14 +38,14 @@ Polymath-NodeOS is designed for frictionless installation.
38
38
  If you are using the Antigravity IDE, simply cloning this repository and opening the workspace will automatically trigger the `.agents/hooks.json` script. The system will seamlessly install itself into your global environment.
39
39
 
40
40
  ### Method 2: Manual Installation
41
- Navigate to the repository root and run:
41
+ Install the package globally via pip:
42
42
  ```bash
43
- python install.py
43
+ pip install polymath-nodeos
44
44
  ```
45
45
  **What this does:**
46
- 1. Installs the `nodeos_standard.md` rule globally.
47
- 2. Deploys the `agy-nodeos-installer` skill.
48
- 3. Grants your AGY agents immediate global awareness of the NodeOS interaction paradigm.
46
+ 1. Installs the `nodeos` CLI globally.
47
+ 2. Allows you to instantly boot the Swarm OS in any folder.
48
+ 3. Automatically triggers your swarm agents to read `workflow.json`.
49
49
 
50
50
  ---
51
51
 
@@ -56,7 +56,7 @@ Polymath-NodeOS works silently in the background to empower your AI agents.
56
56
  ### Starting the OS
57
57
  To initialize NodeOS in a project directory, you or your agent can start the background daemon:
58
58
  ```bash
59
- polymath-nodeos-daemon
59
+ nodeos -d
60
60
  ```
61
61
  *Note: In properly configured workspaces, the daemon automatically boots when the agent initializes thanks to the AGY Customization Engine (`PreInvocation` hook).*
62
62
 
@@ -0,0 +1,106 @@
1
+ #!/usr/bin/env python3
2
+ import argparse
3
+ import sys
4
+ import os
5
+ import subprocess
6
+ import runpy
7
+
8
+ def run_daemon(run_as_daemon=False):
9
+ """Boot the Polymath-NodeOS background daemon."""
10
+ if run_as_daemon:
11
+ # Load heavy dependencies only when actually starting the daemon
12
+ from polymath_nodeos.daemon import AGYDaemon
13
+ target_workspace = os.getcwd()
14
+ daemon = AGYDaemon(target_workspace)
15
+ daemon.run()
16
+ else:
17
+ print("[System] Detaching Polymath-NodeOS Daemon (Zero-Dependency) to background process...")
18
+ if os.name == 'nt':
19
+ CREATE_NO_WINDOW = 0x08000000
20
+ subprocess.Popen([sys.executable, sys.argv[0], '--run-as-daemon'], creationflags=CREATE_NO_WINDOW)
21
+ else:
22
+ log_file = open(os.path.join(os.getcwd(), 'daemon.log'), 'a')
23
+ subprocess.Popen(
24
+ [sys.executable, '-u', sys.argv[0], '--run-as-daemon'],
25
+ start_new_session=True,
26
+ stdout=log_file,
27
+ stderr=log_file
28
+ )
29
+ sys.exit(0)
30
+
31
+ def run_script(script_name, script_args):
32
+ """Run a specific script or engine from polymath_nodeos.scripts."""
33
+ script_module = f"polymath_nodeos.scripts.{script_name}"
34
+ try:
35
+ # Patch sys.argv so the target script parses arguments correctly
36
+ sys.argv = [script_name] + script_args
37
+ runpy.run_module(script_module, run_name="__main__")
38
+ except ImportError as e:
39
+ print(f"[Error] Could not find or load script '{script_name}'.")
40
+ print(f"Details: {e}")
41
+ sys.exit(1)
42
+ except Exception as e:
43
+ print(f"[Error] Execution of '{script_name}' failed: {e}")
44
+ sys.exit(1)
45
+
46
+ def execute_command(command, command_args):
47
+ """Execute internal function calls or specific internal commands."""
48
+ commands = {
49
+ "ping": lambda args: _ping_daemon(),
50
+ # Add future internal commands here
51
+ }
52
+
53
+ if command in commands:
54
+ commands[command](command_args)
55
+ else:
56
+ print(f"[Error] Unknown command '{command}'.")
57
+ print(f"Available commands: {', '.join(commands.keys())}")
58
+ sys.exit(1)
59
+
60
+ def _ping_daemon():
61
+ """Helper command to check if the IPC daemon is alive."""
62
+ from multiprocessing.connection import Client
63
+ try:
64
+ with Client(('localhost', 6000), authkey=b'agy-nodeos-secret') as conn:
65
+ conn.send('ping')
66
+ response = conn.recv()
67
+ print(f"[Daemon Status] {response}")
68
+ except ConnectionRefusedError:
69
+ print("[Daemon Status] Offline or not running.")
70
+
71
+ def main():
72
+ parser = argparse.ArgumentParser(
73
+ prog="nodeos",
74
+ description="🧠 Polymath-NodeOS: The Autonomous Swarm Operating System CLI",
75
+ formatter_class=argparse.RawTextHelpFormatter
76
+ )
77
+
78
+ parser.add_argument('-v', '--version', action='version', version='Polymath-NodeOS 1.0.1')
79
+
80
+ # Core actions must be mutually exclusive (choose one mode of operation)
81
+ group = parser.add_mutually_exclusive_group(required=True)
82
+
83
+ group.add_argument('-d', '--daemon', action='store_true',
84
+ help='Boot the NodeOS background daemon.')
85
+ group.add_argument('--run-as-daemon', action='store_true',
86
+ help=argparse.SUPPRESS) # Internal synchronous start
87
+
88
+ group.add_argument('-s', '--script', type=str, metavar='SCRIPT',
89
+ help='Run a specific script or engine (e.g., intent_injector, intent_stopper).')
90
+ group.add_argument('-c', '--command', type=str, metavar='CMD',
91
+ help='Execute an internal command (e.g., ping).')
92
+
93
+ # parse_known_args permits forwarding remaining arbitrary flags directly to the underlying scripts
94
+ args, unknown = parser.parse_known_args()
95
+
96
+ if args.daemon:
97
+ run_daemon(run_as_daemon=False)
98
+ elif args.run_as_daemon:
99
+ run_daemon(run_as_daemon=True)
100
+ elif args.script:
101
+ run_script(args.script, unknown)
102
+ elif args.command:
103
+ execute_command(args.command, unknown)
104
+
105
+ if __name__ == "__main__":
106
+ main()
@@ -282,20 +282,4 @@ Whenever operating inside this NodeOS-managed workspace, you MUST follow these c
282
282
  finally:
283
283
  self.loop.close()
284
284
 
285
- def daemonize_and_run():
286
- if len(sys.argv) > 1 and sys.argv[-1] == '--run-as-daemon':
287
- target_workspace = os.getcwd()
288
- daemon = AGYDaemon(target_workspace)
289
- daemon.run()
290
- else:
291
- print("[System] Detaching AGY-NodeOS Daemon (Zero-Dependency) to background process...")
292
- if os.name == 'nt':
293
- CREATE_NO_WINDOW = 0x08000000
294
- subprocess.Popen([sys.executable, __file__, '--run-as-daemon'], creationflags=CREATE_NO_WINDOW)
295
- else:
296
- log_file = open(os.path.join(os.getcwd(), 'daemon.log'), 'a')
297
- subprocess.Popen([sys.executable, '-u', __file__, '--run-as-daemon'], start_new_session=True, stdout=log_file, stderr=log_file)
298
- sys.exit(0)
299
285
 
300
- if __name__ == "__main__":
301
- daemonize_and_run()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polymath-nodeos
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: A zero-dependency Autonomous Agentic Swarm Operating System.
5
5
  Author: Polymath Void
6
6
  License: MIT
@@ -50,14 +50,14 @@ Polymath-NodeOS is designed for frictionless installation.
50
50
  If you are using the Antigravity IDE, simply cloning this repository and opening the workspace will automatically trigger the `.agents/hooks.json` script. The system will seamlessly install itself into your global environment.
51
51
 
52
52
  ### Method 2: Manual Installation
53
- Navigate to the repository root and run:
53
+ Install the package globally via pip:
54
54
  ```bash
55
- python install.py
55
+ pip install polymath-nodeos
56
56
  ```
57
57
  **What this does:**
58
- 1. Installs the `nodeos_standard.md` rule globally.
59
- 2. Deploys the `agy-nodeos-installer` skill.
60
- 3. Grants your AGY agents immediate global awareness of the NodeOS interaction paradigm.
58
+ 1. Installs the `nodeos` CLI globally.
59
+ 2. Allows you to instantly boot the Swarm OS in any folder.
60
+ 3. Automatically triggers your swarm agents to read `workflow.json`.
61
61
 
62
62
  ---
63
63
 
@@ -68,7 +68,7 @@ Polymath-NodeOS works silently in the background to empower your AI agents.
68
68
  ### Starting the OS
69
69
  To initialize NodeOS in a project directory, you or your agent can start the background daemon:
70
70
  ```bash
71
- polymath-nodeos-daemon
71
+ nodeos -d
72
72
  ```
73
73
  *Note: In properly configured workspaces, the daemon automatically boots when the agent initializes thanks to the AGY Customization Engine (`PreInvocation` hook).*
74
74
 
@@ -1,6 +1,7 @@
1
1
  README.md
2
2
  pyproject.toml
3
3
  polymath_nodeos/__init__.py
4
+ polymath_nodeos/cli.py
4
5
  polymath_nodeos/daemon.py
5
6
  polymath_nodeos/graph_manager.py
6
7
  polymath_nodeos/jage_engine.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ nodeos = polymath_nodeos.cli:main
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "polymath-nodeos"
7
- version = "1.0.0"
7
+ version = "1.0.2"
8
8
  description = "A zero-dependency Autonomous Agentic Swarm Operating System."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -19,9 +19,7 @@ classifiers = [
19
19
  ]
20
20
 
21
21
  [project.scripts]
22
- polymath-nodeos-daemon = "polymath_nodeos.daemon:daemonize_and_run"
23
- polymath-nodeos-injector = "polymath_nodeos.scripts.intent_injector:main"
24
- polymath-nodeos-stopper = "polymath_nodeos.scripts.intent_stopper:main"
22
+ nodeos = "polymath_nodeos.cli:main"
25
23
 
26
24
  [tool.setuptools.packages.find]
27
25
  include = ["polymath_nodeos*"]
@@ -1,4 +0,0 @@
1
- [console_scripts]
2
- polymath-nodeos-daemon = polymath_nodeos.daemon:daemonize_and_run
3
- polymath-nodeos-injector = polymath_nodeos.scripts.intent_injector:main
4
- polymath-nodeos-stopper = polymath_nodeos.scripts.intent_stopper:main