bounded-loops 0.0.0 → 0.2.0

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/README.md CHANGED
@@ -1,5 +1,29 @@
1
- # bounded-loops
1
+ # bounded-loops (npm launcher)
2
2
 
3
- Runnable, bounded AI-agent loops by [Qualixar](https://qualixar.com).
3
+ This npm package is a **thin launcher** for [**bounded-loops**](https://github.com/qualixar/bounded-loops)
4
+ — runnable, bounded AI-agent loops where every safety bound is enforced in engine
5
+ code, not described in a checklist.
4
6
 
5
- **This name is reserved. The full release is coming soon.**
7
+ The engine itself is a **Python 3.11+** package. This wrapper lets you run it with
8
+ one command:
9
+
10
+ ```bash
11
+ npx bounded-loops list
12
+ npx bounded-loops run loops/bug-fix-red-green --yes
13
+ ```
14
+
15
+ On first run it detects Python 3.11+, installs the `bounded-loops` Python package
16
+ if it isn't already present, and hands off to the real CLI. It does **not**
17
+ reimplement the tool in Node — **Python 3.11+ must be on your PATH**.
18
+
19
+ Prefer the native install if you already have Python:
20
+
21
+ ```bash
22
+ pip install bounded-loops
23
+ bl list
24
+ ```
25
+
26
+ Full documentation, the 63 runnable loops, the nine bounds, and the architecture
27
+ docs live in the [main repository](https://github.com/qualixar/bounded-loops).
28
+
29
+ Apache-2.0.
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ // Thin launcher for bounded-loops.
5
+ //
6
+ // bounded-loops is a Python package (the engine is Python). This npm wrapper
7
+ // exists so `npx bounded-loops <args>` works: it finds Python 3.11+, installs
8
+ // the engine on first run if it isn't already present, then hands off to the
9
+ // real CLI (`python -m bounded_loops.cli`). It does NOT reimplement the tool in
10
+ // Node — Python 3.11+ must be available on your PATH.
11
+
12
+ const { spawnSync } = require('child_process');
13
+
14
+ const args = process.argv.slice(2);
15
+
16
+ function findPython() {
17
+ for (const candidate of ['python3', 'python']) {
18
+ const probe = spawnSync(
19
+ candidate,
20
+ ['-c', 'import sys; sys.exit(0 if sys.version_info >= (3, 11) else 1)'],
21
+ { stdio: 'ignore' }
22
+ );
23
+ if (probe.status === 0) return candidate;
24
+ }
25
+ return null;
26
+ }
27
+
28
+ function runCli(python) {
29
+ const run = spawnSync(python, ['-m', 'bounded_loops.cli', ...args], {
30
+ stdio: 'inherit',
31
+ });
32
+ process.exit(run.status === null ? 1 : run.status);
33
+ }
34
+
35
+ const python = findPython();
36
+ if (!python) {
37
+ console.error('bounded-loops requires Python 3.11+ on your PATH.');
38
+ console.error(' → Install Python 3.11+, then re-run.');
39
+ console.error(' → Native install (recommended): pip install bounded-loops');
40
+ process.exit(1);
41
+ }
42
+
43
+ // Already installed? Run it.
44
+ const installed = spawnSync(python, ['-c', 'import bounded_loops'], { stdio: 'ignore' });
45
+ if (installed.status === 0) {
46
+ runCli(python);
47
+ }
48
+
49
+ // First run: bootstrap the Python engine via pip, then run.
50
+ console.error('bounded-loops: installing the Python engine (first run)…');
51
+ const install = spawnSync(
52
+ python,
53
+ ['-m', 'pip', 'install', '--quiet', 'bounded-loops'],
54
+ { stdio: 'inherit' }
55
+ );
56
+ if (install.status !== 0) {
57
+ console.error('Auto-install failed. Install it manually: pip install bounded-loops');
58
+ process.exit(1);
59
+ }
60
+ runCli(python);
package/package.json CHANGED
@@ -1,10 +1,34 @@
1
1
  {
2
2
  "name": "bounded-loops",
3
- "version": "0.0.0",
4
- "description": "Runnable, bounded AI-agent loops. Name reserved by Qualixar release coming soon.",
3
+ "version": "0.2.0",
4
+ "description": "npx launcher for bounded-loops — runnable, bounded AI-agent loops. The engine is a Python 3.11+ package; this wrapper detects Python, installs it on first run, and runs it.",
5
+ "bin": {
6
+ "bounded-loops": "bin/bounded-loops.js"
7
+ },
8
+ "files": [
9
+ "bin/",
10
+ "README.md"
11
+ ],
12
+ "keywords": [
13
+ "ai-agents",
14
+ "agent-loops",
15
+ "loop-engineering",
16
+ "bounded-loops",
17
+ "ai-reliability",
18
+ "gate",
19
+ "mcp"
20
+ ],
21
+ "homepage": "https://github.com/qualixar/bounded-loops#readme",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/qualixar/bounded-loops.git"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/qualixar/bounded-loops/issues"
28
+ },
5
29
  "license": "Apache-2.0",
6
- "author": "Qualixar <varun.pratap.bhardwaj@gmail.com> (https://qualixar.com)",
7
- "homepage": "https://qualixar.com",
8
- "keywords": ["ai", "agents", "agent-loops", "reliability", "qualixar"],
9
- "files": ["README.md"]
30
+ "author": "Varun Pratap Bhardwaj",
31
+ "engines": {
32
+ "node": ">=18"
33
+ }
10
34
  }