catherd-cli 0.1.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 (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +83 -0
  3. package/catalog/catalog.json +112 -0
  4. package/catalog/models-dev.json +56453 -0
  5. package/package.json +52 -0
  6. package/plugin/.claude-plugin/plugin.json +13 -0
  7. package/plugin/.mcp.json +8 -0
  8. package/plugin/commands/catherd-setup.md +8 -0
  9. package/plugin/commands/catherd.md +10 -0
  10. package/plugin/skills/catherd/SKILL.md +301 -0
  11. package/plugin/skills/catherd-setup/SKILL.md +65 -0
  12. package/src/cli.ts +28 -0
  13. package/src/core/codex-events.ts +49 -0
  14. package/src/core/codex.ts +166 -0
  15. package/src/core/harness.ts +89 -0
  16. package/src/core/lanes.ts +67 -0
  17. package/src/core/lock.ts +111 -0
  18. package/src/core/opencode.ts +207 -0
  19. package/src/core/reconcile.ts +26 -0
  20. package/src/core/reply.ts +54 -0
  21. package/src/core/runstore.ts +163 -0
  22. package/src/core/spawn.ts +89 -0
  23. package/src/core/status.ts +193 -0
  24. package/src/files.ts +19 -0
  25. package/src/mcp/commands.ts +7 -0
  26. package/src/mcp/dispatch.ts +154 -0
  27. package/src/mcp/lane-tools.ts +200 -0
  28. package/src/mcp/out.ts +6 -0
  29. package/src/mcp/preflight.ts +69 -0
  30. package/src/mcp/run-tools.ts +121 -0
  31. package/src/mcp/runs.ts +118 -0
  32. package/src/mcp/server.ts +26 -0
  33. package/src/mcp/setup-tools.ts +175 -0
  34. package/src/paths.ts +20 -0
  35. package/src/profile/agents.ts +118 -0
  36. package/src/profile/profile.ts +228 -0
  37. package/src/profile/role-prompts.ts +129 -0
  38. package/src/routing/catalog.ts +227 -0
  39. package/src/routing/commands.ts +22 -0
  40. package/src/routing/jev.ts +181 -0
  41. package/src/routing/route.ts +155 -0
  42. package/src/routing/select.ts +90 -0
  43. package/src/tui/backends.ts +57 -0
  44. package/src/tui/commands.ts +51 -0
  45. package/src/tui/editor.tsx +221 -0
  46. package/src/tui/init.tsx +221 -0
  47. package/src/tui/matrix-model.ts +211 -0
  48. package/src/tui/matrix.tsx +350 -0
  49. package/src/tui/profiles.ts +38 -0
  50. package/src/tui/theme.ts +140 -0
  51. package/src/tui/ui.tsx +104 -0
  52. package/src/tui/watch-model.ts +83 -0
  53. package/src/tui/watch.tsx +258 -0
  54. package/src/types.ts +184 -0
  55. package/src/version.ts +7 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vigen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # catherd
2
+
3
+ ```
4
+ /\_/\ . catherd
5
+ (=^.^=)/ herds coding agents
6
+ (")(")
7
+ ```
8
+
9
+ Autopilot builds from your own Claude Code session. Claude plans and verifies, Codex and opencode
10
+ workers write the code, and [Jev](https://typesafe.ai) picks the model and effort for each piece
11
+ of work, climbing a ladder only when a cheaper rung falls short.
12
+
13
+ - **Your harness, as you set it up.** Every role runs in its vendor's own CLI with your config,
14
+ hooks, skills and `AGENTS.md`. Isolation is an opt-in toggle per profile and harness, for when
15
+ you'd rather save the tokens your customizations cost.
16
+ - **Claude roles stay native.** Claude models run as ordinary Claude Code subagents; Codex and
17
+ opencode run through catherd's MCP server.
18
+ - **Survives restarts.** Workers are detached processes writing straight to disk, so a dropped
19
+ MCP server never loses a run.
20
+ - **Guard rails for autopilot.** Quota failover to another backend, a preflight check before any
21
+ worker starts, per-repo knowledge carried between runs, and a run budget.
22
+
23
+ ## Requirements
24
+
25
+ - [Bun](https://bun.sh) ≥ 1.4
26
+ - [Claude Code](https://claude.com/claude-code) (desktop app or CLI)
27
+ - At least one worker backend: [Codex CLI](https://github.com/openai/codex) and/or
28
+ [opencode](https://opencode.ai), logged in
29
+ - A TypeSafe API key for Jev, in `TYPESAFE_API_KEY` or `~/.config/typesafe/api_key`
30
+
31
+ ## Install
32
+
33
+ ```sh
34
+ bunx catherd-cli init
35
+ ```
36
+
37
+ The npm package is `catherd-cli`; the command it installs is `catherd`. `init` asks for the Jev key, finds your backends, and builds your first profile. Then add the
38
+ plugin to Claude Code:
39
+
40
+ ```sh
41
+ claude plugin marketplace add 47vigen/catherd
42
+ claude plugin install catherd@catherd
43
+ ```
44
+
45
+ Start a new Claude Code session so the plugin, its MCP server and the agent files load.
46
+
47
+ ## Use
48
+
49
+ In Claude Code:
50
+
51
+ - `/catherd <task>` runs a task on autopilot; `/catherd` alone resumes the latest run.
52
+ - `/catherd-setup` tunes your profile in conversation: which models and efforts each role may
53
+ use, cost or speed, isolation, budget and failover.
54
+
55
+ In a terminal:
56
+
57
+ | Command | What it does |
58
+ | ---------------------------------- | ---------------------------------------------------------------- |
59
+ | `bunx catherd-cli` | Profile editor: models and efforts per role, with paw checkboxes |
60
+ | `bunx catherd-cli watch` | Live view of running and recent runs |
61
+ | `bunx catherd-cli lock -- <cmd>` | Runs a heavy command behind the machine-wide semaphore |
62
+ | `bunx catherd-cli catalog refresh` | Refreshes the models.dev snapshot |
63
+
64
+ `--plain` and `--reduced-motion` work everywhere.
65
+
66
+ Run data lives in `~/.local/share/catherd/`, config in `~/.config/catherd/` (both follow
67
+ `XDG_*`).
68
+
69
+ ## Develop
70
+
71
+ ```sh
72
+ bun install
73
+ bun test
74
+ bun run typecheck && bun run lint && bun run format:check
75
+ ```
76
+
77
+ Design: [`docs/specs/2026-09-24-catherd-design.md`](docs/specs/2026-09-24-catherd-design.md).
78
+ Releases go through [Changesets](https://github.com/changesets/changesets): add one with
79
+ `bunx changeset`.
80
+
81
+ ## License
82
+
83
+ MIT
@@ -0,0 +1,112 @@
1
+ {
2
+ "version": "2026-09-24",
3
+ "sources": {
4
+ "repo_code": "DeepSWE-style resolution of real repository issues, per model and effort, from the published results collected in spec §5 on 2026-09-24",
5
+ "terminal": "Terminal-Bench-style terminal, ops and environment work, per model and effort, from the same collection",
6
+ "honesty": "100 minus the rate of failing to disclose a broken tool, from the system cards: gpt-6-luna 71.3, gpt-6-sol 95.1, claude-opus-5-5 not published",
7
+ "secs_per_task": "median seconds per task in the same benchmark runs",
8
+ "costRank": "catherd's own order of what one run costs a user on a ChatGPT plan and a Claude plan, lowest first; subscription quota counts"
9
+ },
10
+ "notes": {
11
+ "gpt-6-sol": "context 400000 is unverified for the ChatGPT-login id",
12
+ "gpt-6-luna": "context 400000 is unverified for the ChatGPT-login id",
13
+ "claude-opus-5-5": "context 1000000 is unverified",
14
+ "unscored on purpose": "gpt-6-luna#xhigh was dominated; gpt-6-luna#max took 958 s a task, slower than gpt-6-sol#xhigh at an equal score"
15
+ },
16
+ "models": [
17
+ {
18
+ "id": "gpt-6-luna",
19
+ "backend": "codex",
20
+ "efforts": ["low", "medium", "high", "xhigh", "max"],
21
+ "capabilities": {
22
+ "toolCall": true,
23
+ "imageIn": true,
24
+ "imageOut": true,
25
+ "reasoning": true,
26
+ "context": 400000
27
+ }
28
+ },
29
+ {
30
+ "id": "gpt-6-sol",
31
+ "backend": "codex",
32
+ "efforts": ["low", "medium", "high", "xhigh"],
33
+ "capabilities": {
34
+ "toolCall": true,
35
+ "imageIn": true,
36
+ "imageOut": true,
37
+ "reasoning": true,
38
+ "context": 400000
39
+ }
40
+ },
41
+ {
42
+ "id": "claude-opus-5-5",
43
+ "backend": "claude",
44
+ "efforts": ["low", "medium", "high"],
45
+ "capabilities": {
46
+ "toolCall": true,
47
+ "imageIn": true,
48
+ "imageOut": false,
49
+ "reasoning": true,
50
+ "context": 1000000
51
+ }
52
+ }
53
+ ],
54
+ "entries": [
55
+ {
56
+ "rung": "gpt-6-luna#high",
57
+ "scores": { "repo_code": 59.3, "terminal": 4.5, "honesty": 71.3, "secs_per_task": 563 },
58
+ "costRank": 1
59
+ },
60
+ {
61
+ "rung": "gpt-6-sol#medium",
62
+ "scores": { "repo_code": 56.6, "terminal": 18.7, "honesty": 95.1, "secs_per_task": 264 },
63
+ "costRank": 2
64
+ },
65
+ {
66
+ "rung": "gpt-6-sol#high",
67
+ "scores": { "repo_code": 65.3, "terminal": 26.3, "honesty": 95.1, "secs_per_task": 391 },
68
+ "costRank": 3
69
+ },
70
+ {
71
+ "rung": "gpt-6-sol#xhigh",
72
+ "scores": { "repo_code": 66.6, "terminal": 30.3, "honesty": 95.1, "secs_per_task": 496 },
73
+ "costRank": 4
74
+ },
75
+ { "rung": "claude-opus-5-5#low", "scores": { "terminal": 31.3 }, "costRank": 5 },
76
+ { "rung": "claude-opus-5-5#medium", "scores": { "terminal": 52.5 }, "costRank": 6 },
77
+ { "rung": "claude-opus-5-5#high", "scores": { "terminal": 56.6 }, "costRank": 7 }
78
+ ],
79
+ "bars": {
80
+ "repo_code": {
81
+ "copy": { "repo_code": 55 },
82
+ "build": { "repo_code": 55 },
83
+ "logic": { "repo_code": 55, "terminal": 15 },
84
+ "hard": { "repo_code": 56, "terminal": 18 }
85
+ },
86
+ "terminal": {
87
+ "copy": { "terminal": 15 },
88
+ "build": { "terminal": 15 },
89
+ "logic": { "terminal": 15 },
90
+ "hard": { "terminal": 15 }
91
+ },
92
+ "ui": {
93
+ "copy": { "repo_code": 55 },
94
+ "build": { "repo_code": 55 },
95
+ "logic": { "repo_code": 55, "terminal": 15 },
96
+ "hard": { "repo_code": 56, "terminal": 18 }
97
+ },
98
+ "prose": {
99
+ "copy": { "repo_code": 55 },
100
+ "build": { "repo_code": 55 },
101
+ "logic": { "repo_code": 55, "terminal": 15 },
102
+ "hard": { "repo_code": 56, "terminal": 18 }
103
+ },
104
+ "research": {
105
+ "copy": { "repo_code": 55 },
106
+ "build": { "repo_code": 55 },
107
+ "logic": { "repo_code": 55, "terminal": 15 },
108
+ "hard": { "repo_code": 56, "terminal": 18 }
109
+ }
110
+ },
111
+ "treatLike": {}
112
+ }