agentainer 0.1.7 → 2.0.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.
Files changed (44) hide show
  1. package/README.md +248 -677
  2. package/agentainer +16 -18
  3. package/agentainer.example.yaml +86 -0
  4. package/bin/agentainer.js +9 -8
  5. package/examples/brainstorm.yaml +27 -128
  6. package/examples/bug-hunt.yaml +51 -96
  7. package/examples/code-review.yaml +73 -0
  8. package/examples/debate.yaml +16 -90
  9. package/examples/incident-response.yaml +52 -109
  10. package/examples/localization.yaml +56 -123
  11. package/examples/quickstart.yaml +48 -0
  12. package/examples/research.yaml +25 -0
  13. package/examples/software-company.yaml +71 -128
  14. package/examples/tdd-pingpong.yaml +36 -68
  15. package/examples/writers-room.yaml +49 -111
  16. package/hooks/claude_stop.sh +5 -3
  17. package/hooks/codex_notify.sh +4 -3
  18. package/lib/cli.py +929 -0
  19. package/lib/config.py +247 -305
  20. package/lib/hooks.py +246 -0
  21. package/lib/lock.py +75 -0
  22. package/lib/log.py +64 -0
  23. package/lib/mail.py +634 -0
  24. package/lib/minyaml.py +1 -39
  25. package/lib/reconcile.py +473 -0
  26. package/lib/sessions.py +223 -0
  27. package/lib/supervisor.py +216 -0
  28. package/lib/telegram.py +372 -0
  29. package/lib/tmux.py +355 -0
  30. package/lib/turn.py +159 -0
  31. package/lib/ui.py +1020 -0
  32. package/llms.txt +145 -429
  33. package/package.json +9 -7
  34. package/scripts/check-deps.js +18 -61
  35. package/ui/app.js +869 -0
  36. package/ui/index.html +348 -0
  37. package/agents.example.yaml +0 -257
  38. package/examples/code-review-broadcast.yaml +0 -109
  39. package/examples/existing-repo.yaml +0 -74
  40. package/examples/multi-language-broadcast.yaml +0 -127
  41. package/examples/ping-pong.yaml +0 -89
  42. package/examples/red-team.yaml +0 -117
  43. package/examples/research-swarm.yaml +0 -129
  44. package/lib/swarm.py +0 -2461
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentainer",
3
- "version": "0.1.7",
4
- "description": "Zero-dependency multi-agent orchestrator: run a team of AI coding agents (Claude Code, Codex, Gemini, Hermes) side by side in tmux with a YAML-defined ACL.",
3
+ "version": "2.0.0",
4
+ "description": "Zero-dependency multi-agent orchestrator with a file-based mail model for AI coding agents (Claude Code, Codex, Gemini, Hermes). Agents talk by reading and writing files; the orchestrator routes the mail.",
5
5
  "keywords": [
6
6
  "agents",
7
7
  "ai-agents",
@@ -16,17 +16,17 @@
16
16
  "tmux",
17
17
  "orchestration",
18
18
  "multi-agent",
19
- "swarm",
19
+ "mailbox",
20
20
  "prompt-routing",
21
21
  "python"
22
22
  ],
23
- "homepage": "https://github.com/mehmetcanfarsak/AgentSwarm#readme",
23
+ "homepage": "https://github.com/mehmetcanfarsak/Agentainer#readme",
24
24
  "bugs": {
25
- "url": "https://github.com/mehmetcanfarsak/AgentSwarm/issues"
25
+ "url": "https://github.com/mehmetcanfarsak/Agentainer/issues"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",
29
- "url": "git+https://github.com/mehmetcanfarsak/AgentSwarm.git"
29
+ "url": "git+https://github.com/mehmetcanfarsak/Agentainer.git"
30
30
  },
31
31
  "license": "MIT",
32
32
  "author": "mehmetcanfarsak",
@@ -37,11 +37,13 @@
37
37
  "files": [
38
38
  "bin/agentainer.js",
39
39
  "lib/*.py",
40
+ "ui/*.html",
41
+ "ui/*.js",
40
42
  "hooks/*.sh",
41
43
  "scripts/check-deps.js",
42
44
  "agentainer",
43
45
  "examples/*.yaml",
44
- "agents.example.yaml",
46
+ "agentainer.example.yaml",
45
47
  "README.md",
46
48
  "llms.txt"
47
49
  ],
@@ -1,76 +1,33 @@
1
1
  #!/usr/bin/env node
2
- // Dependency doctor for Agentainer.
2
+ // Agentainer dependency doctor (npm postinstall + `agentainer doctor`).
3
3
  //
4
- // Runs on `npm install` (postinstall) and on demand via `agentainer doctor`.
5
- // It only checks the things Agentainer itself needs -- python3 and tmux -- and
6
- // reports on optional agent CLIs (claude, codex, gemini, ...) without ever
7
- // treating their absence as an error: a user may only ever run one of them.
8
- //
9
- // This script NEVER fails the install. Missing tools are reported with hints;
10
- // the exit code stays 0 so `npm install -g agentainer` always succeeds.
4
+ // Verifies the two runtime dependencies that are not Python: a Python 3
5
+ // interpreter and tmux. PyYAML is intentionally NOT required -- Agentainer
6
+ // ships a bundled fallback parser so it runs on a bare stdlib Python.
11
7
  "use strict";
12
8
 
13
9
  const { spawnSync } = require("child_process");
14
- const os = require("os");
15
-
16
- function has(cmd, args) {
17
- const probe = spawnSync(cmd, args, { stdio: "ignore" });
18
- return !probe.error && probe.status === 0;
19
- }
20
10
 
21
- const platform = os.platform();
22
- function installHint(pkg) {
23
- if (platform === "darwin") return `brew install ${pkg}`;
24
- if (platform === "linux")
25
- return `sudo apt install ${pkg} (or your distro's package manager)`;
26
- if (platform === "win32")
27
- return `${pkg} is not natively supported on Windows; use WSL2`;
28
- return `install ${pkg} with your package manager`;
11
+ function present(cmd) {
12
+ const r = spawnSync(cmd, ["--version"], { stdio: "ignore" });
13
+ return !r.error && r.status === 0;
29
14
  }
30
15
 
31
- // --- Required: Agentainer cannot run without these -------------------------
32
- const required = [
33
- { name: "python3", ok: has("python3", ["--version"]) || has("python", ["--version"]), hint: installHint("python3") },
34
- { name: "tmux", ok: has("tmux", ["-V"]), hint: installHint("tmux") },
35
- ];
36
-
37
- // --- Optional: at least one agent CLI, but which one is up to the user ------
38
- const optional = [
39
- { name: "claude", label: "Claude Code", ok: has("claude", ["--version"]) },
40
- { name: "codex", label: "Codex CLI", ok: has("codex", ["--version"]) },
41
- { name: "gemini", label: "Gemini CLI", ok: has("gemini", ["--version"]) },
42
- ];
43
-
44
- const missingRequired = required.filter((r) => !r.ok);
16
+ const python = present("python3") || present("python");
17
+ const tmux = present("tmux");
45
18
 
46
- process.stdout.write("\nAgentainer -- checking dependencies\n");
47
- process.stdout.write("-----------------------------------\n");
48
-
49
- for (const r of required) {
50
- process.stdout.write(` [${r.ok ? "ok" : "--"}] ${r.name}${r.ok ? "" : ` -> ${r.hint}`}\n`);
51
- }
52
-
53
- process.stdout.write("\n Agent CLIs (install whichever you'll actually use):\n");
54
- for (const o of optional) {
55
- process.stdout.write(` [${o.ok ? "ok" : " "}] ${o.name.padEnd(8)} ${o.label}\n`);
19
+ if (!python) {
20
+ process.stderr.write(
21
+ "xx Agentainer needs python3 on PATH (or set AGENTAINER_PYTHON).\n"
22
+ );
23
+ process.exit(1);
56
24
  }
57
25
 
58
- if (missingRequired.length) {
59
- process.stdout.write(
60
- "\n!! Missing required tools: " +
61
- missingRequired.map((r) => r.name).join(", ") +
62
- "\n Install them, then re-check with: agentainer doctor\n"
63
- );
64
- } else {
65
- const anyAgent = optional.some((o) => o.ok);
66
- process.stdout.write(
67
- "\nok Core dependencies satisfied." +
68
- (anyAgent ? "" : " (No agent CLI detected yet -- install one to start a swarm.)") +
69
- "\n"
26
+ if (!tmux) {
27
+ process.stderr.write(
28
+ "!! tmux was not found on PATH; every command except 'validate' will fail.\n" +
29
+ " Install tmux (apt-get install tmux / brew install tmux) before `up`.\n"
70
30
  );
71
31
  }
72
- process.stdout.write("\n");
73
32
 
74
- // Always succeed: never abort an npm install over a missing optional (or even
75
- // required) tool. The launcher re-checks at runtime and fails clearly there.
76
33
  process.exit(0);