@sma1lboy/kobe 0.5.22 → 0.5.25

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
@@ -33,6 +33,21 @@ You need two things on `PATH`:
33
33
  - [**Bun**](https://bun.sh) ≥ 1.0 — kobe's renderer is opentui, which uses Bun-FFI.
34
34
  - [**`claude`** CLI](https://docs.anthropic.com/en/docs/claude-code) — the engine kobe drives. Run `claude --version` to confirm it's installed and signed in.
35
35
 
36
+ Optional but recommended (preview pane shows graceful fallbacks otherwise):
37
+
38
+ - **`chafa`** ≥ 1.8 + **`ffmpeg`** / **`ffprobe`** — image preview (sixel + character grid + animated GIF). Without these, image files show a metadata card with a "preview not supported" hint.
39
+ - **`rsvg-convert`** (`librsvg2-bin`) — SVG → rasterized image preview. Without it, SVGs fall back to syntax-highlighted XML source.
40
+
41
+ | Platform | Install command |
42
+ |---|---|
43
+ | Debian / Ubuntu | `sudo apt install chafa ffmpeg librsvg2-bin` |
44
+ | Fedora | `sudo dnf install chafa ffmpeg librsvg2-tools` |
45
+ | Arch | `sudo pacman -S chafa ffmpeg librsvg` |
46
+ | macOS | `brew install chafa ffmpeg librsvg` |
47
+ | Windows | `winget install hpjansson.chafa Gyan.FFmpeg` |
48
+
49
+ `bun install` runs a postinstall check and prints any missing pieces with the install command. Set `KOBE_SKIP_DEP_CHECK=1` to silence it in CI.
50
+
36
51
  Then:
37
52
 
38
53
  ```bash
@@ -173,6 +188,88 @@ an exec bit. The behavior-test driver fixes it lazily on first spawn (see
173
188
  validates the repo path before creating; if it's complaining, check that
174
189
  `git status` runs cleanly inside the path you typed.
175
190
 
191
+ ## Driving kobe from another agent
192
+
193
+ Inside kobe, the `claude` (or `codex`, etc.) you are talking to can call back
194
+ out and spawn more kobe tasks — useful when you ask it to "try three approaches
195
+ in parallel" instead of doing them sequentially in one chat. The mechanism is a
196
+ small CLI surface; design rationale lives in [`docs/design/cli-api.md`](../../docs/design/cli-api.md).
197
+
198
+ ### Daemon lifecycle
199
+
200
+ A `kobe daemon` process holds your tasks and chat sessions. The TUI auto-starts
201
+ one on first launch; in scripts you may want to manage it explicitly.
202
+
203
+ ```bash
204
+ kobe daemon start # spawn detached, listen on the unix socket
205
+ kobe daemon status # JSON status (pid, uptime, attached clients, task count)
206
+ kobe daemon restart # graceful stop + start
207
+ kobe daemon stop # tell the daemon to drain and exit
208
+ ```
209
+
210
+ > Pre-0.6 builds shipped a separate `kobed` binary for the same commands. It
211
+ > was removed in favor of the single-bin surface (KOB-136); any script with
212
+ > `kobed restart` needs a one-time rename to `kobe daemon restart`.
213
+
214
+ ### `kobe api <verb>` — five shell verbs
215
+
216
+ Each call is a short-lived process: open the daemon socket, do one RPC, print
217
+ JSON to stdout, exit. Any tool with a `Bash` capability (Claude Code, Codex,
218
+ Cursor, a custom agent) can drive it.
219
+
220
+ | verb | flags | what it does |
221
+ |---|---|---|
222
+ | `spawn-task` | `--repo PATH --prompt TEXT [--title T] [--base-branch B]` | Create a new task + worktree + chat session. |
223
+ | `create-tab` | `--task-id ID [--title T]` | Open an extra chat tab on an existing task. |
224
+ | `send` | `--task-id ID --prompt TEXT [--tab-id TID]` | Resume the task's session with a new prompt. |
225
+ | `get-task` | `--task-id ID` | Read task metadata (status, branch, worktree, tabs). |
226
+ | `get-tab` | `--task-id ID --tab-id TID` | Read a single tab off the task. |
227
+
228
+ Output is one JSON object on stdout, `\n` terminated, exit 0. Errors land on
229
+ stderr as `{"error":{"message":"...","code":"..."}}` with a non-zero exit.
230
+ Add `--pretty` for human inspection.
231
+
232
+ Fan-out from a shell:
233
+
234
+ ```bash
235
+ T1=$(kobe api spawn-task --repo "$PWD" --prompt "Approach A: state machine" | jq -r .taskId)
236
+ T2=$(kobe api spawn-task --repo "$PWD" --prompt "Approach B: event sourcing" | jq -r .taskId)
237
+ T3=$(kobe api spawn-task --repo "$PWD" --prompt "Approach C: reducer pattern" | jq -r .taskId)
238
+
239
+ # Tell the user three tasks are running — they'll appear in the sidebar.
240
+ echo "Spawned $T1 $T2 $T3"
241
+
242
+ # Poll until each settles.
243
+ for ID in $T1 $T2 $T3; do
244
+ until [ "$(kobe api get-task --task-id "$ID" | jq -r .task.status)" = "idle" ]; do
245
+ sleep 10
246
+ done
247
+ done
248
+ ```
249
+
250
+ If the daemon isn't running, `kobe api ...` exits 2 with
251
+ `{"error":{"code":"BAD_DAEMON",...}}` on stderr. Start it with
252
+ `kobe daemon start` (or just launch the TUI).
253
+
254
+ ### Install the agent skill
255
+
256
+ `kobe api` gives the *capability*. The bundled SKILL.md gives the model the
257
+ *intent* — when to fan out, how to scope subtask prompts, how to read results
258
+ back. Install it once:
259
+
260
+ ```bash
261
+ kobe skill install # writes ~/.claude/skills/kobe/SKILL.md
262
+ kobe skill install --yes # overwrite an existing copy
263
+ kobe skill uninstall # remove it
264
+ ```
265
+
266
+ After install, Claude Code automatically picks up the skill on its next launch.
267
+ For project-level overrides, copy the file to `<repo>/.claude/skills/kobe/SKILL.md`
268
+ and customise — Claude Code's discovery order is project > user > none.
269
+
270
+ `kobe diagnose` reports whether the skill is installed, which is the
271
+ fastest way to confirm.
272
+
176
273
  ## Coming later
177
274
 
178
275
  - Homebrew tap (mirroring [`sma1lboy/homebrew-codefox`](https://github.com/sma1lboy/homebrew-codefox)) so you can `brew install kobe` without touching Bun directly.
@@ -190,22 +287,22 @@ bun run dev # boots the 5-pane TUI under KOBE_DEV=1 (no update chip, et
190
287
  bun run test # normal suite: fast tests + serial socket tests
191
288
  bun run test:behavior # slow PTY suite; only run for user-visible TUI behavior
192
289
  bun run typecheck # strict tsc
193
- bun run build # produces ./dist/index.js for `npm publish`
290
+ bun run build # produces ./dist/cli/index.js for npm
194
291
  ```
195
292
 
196
293
  Architecture, design philosophy, and the team-of-agents operating model live in:
197
294
 
198
- - [`docs/DESIGN.md`](./docs/DESIGN.md) — design philosophy, tech stack lock-in.
199
- - [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md) — module map and current state.
200
- - [`docs/HARNESS.md`](./docs/HARNESS.md) — the agent self-test contract.
201
- - [`docs/PLAN.md`](./docs/PLAN.md) — phase / wave plan.
202
- - [`HANDOFF.md`](./HANDOFF.md) — current direction + what just shipped.
295
+ - [`docs/DESIGN.md`](../../docs/DESIGN.md) — design philosophy, tech stack lock-in.
296
+ - [`docs/ARCHITECTURE.md`](../../docs/ARCHITECTURE.md) — module map and current state.
297
+ - [`docs/HARNESS.md`](../../docs/HARNESS.md) — the agent self-test contract.
298
+ - [`docs/PLAN.md`](../../docs/PLAN.md) — phase / wave plan.
299
+ - [`HANDOFF.md`](../../HANDOFF.md) — latest session state and follow-ups.
203
300
 
204
301
  ### Releasing
205
302
 
206
303
  Bump `package.json`, move `## [Unreleased]` in `CHANGELOG.md` to the new
207
304
  version section, commit, then push the matching `vX.Y.Z` tag. The release
208
- workflow ([`.github/workflows/release.yml`](./.github/workflows/release.yml))
305
+ workflow ([`.github/workflows/release.yml`](../../.github/workflows/release.yml))
209
306
  runs typecheck + unit tests + build, asserts the tag matches `package.json`,
210
307
  then `npm publish --provenance` and creates a GitHub release with the
211
308
  changelog section as the body.