liagent 0.0.0-stage → 0.9.0-zero

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/bin/liagent.js ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ // `npx liagent`: runs agent.py with Python 3.8+. liagent uses the Python standard library only, so there is
3
+ // nothing to install.
4
+ "use strict";
5
+ const { spawnSync } = require("child_process");
6
+ const path = require("path");
7
+
8
+ const WIN = process.platform === "win32";
9
+ const AGENT = path.join(__dirname, "..", "agent.py");
10
+ const ok = (cmd, args) => spawnSync(cmd, args, { stdio: "ignore" }).status === 0;
11
+
12
+ function findPython() {
13
+ if (process.env.LIAGENT_PYTHON) return [process.env.LIAGENT_PYTHON]; // e.g. a specific python3.11
14
+ const candidates = WIN ? [["py", "-3"], ["python"], ["python3"]] : [["python3"], ["python"]];
15
+ return candidates.find((c) => ok(c[0], [...c.slice(1), "-c", "import sys; sys.exit(sys.version_info < (3, 8))"]));
16
+ }
17
+
18
+ const py = findPython();
19
+ if (!py) {
20
+ console.error("liagent: needs Python 3.8+ — https://www.python.org/downloads/ (Raspberry Pi: sudo apt install python3)");
21
+ process.exit(1);
22
+ }
23
+ // ctrl+c belongs to the agent (it stops a reply); keep this wrapper alive until the agent exits
24
+ process.on("SIGINT", () => {});
25
+ const r = spawnSync(py[0], [...py.slice(1), AGENT, ...process.argv.slice(2)], { stdio: "inherit" });
26
+ process.exit(r.status === null ? 1 : r.status);
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "liagent",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.9.0-zero",
4
+ "description": "Tiny terminal AI agent for Raspberry Pi cyberdecks: shell, files, GPIO, voice, web UI, Discord bot, calculators/LoRa/SMS. One Python file, zero dependencies.",
5
+ "bin": {
6
+ "liagent": "bin/liagent.js"
7
+ },
8
+ "files": [
9
+ "agent.py",
10
+ "bin/",
11
+ "DEVICES.md",
12
+ "samples/"
13
+ ],
14
+ "engines": {
15
+ "node": ">=16"
16
+ },
17
+ "keywords": [
18
+ "ai",
19
+ "agent",
20
+ "cli",
21
+ "terminal",
22
+ "raspberry-pi",
23
+ "cyberdeck",
24
+ "llm",
25
+ "groq",
26
+ "ollama",
27
+ "discord-bot",
28
+ "gpio",
29
+ "lora"
30
+ ],
31
+ "homepage": "https://github.com/Kuloka/liagent",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/Kuloka/liagent.git"
35
+ },
36
+ "bugs": "https://github.com/Kuloka/liagent/issues",
37
+ "author": "Kuloka",
38
+ "license": "MIT"
39
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file