@codesona/runner 0.1.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.
Files changed (3) hide show
  1. package/README.md +34 -2
  2. package/dist/cli.js +671 -116
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -10,6 +10,9 @@ machine, with your own account and your own model choice.
10
10
  - Node.js 20.9 or later
11
11
  - Claude Code 2.1.306 or later, installed and logged in. Codex and Cursor are detected, and will be
12
12
  supported later.
13
+ - For a Developer agent: git, with a credential helper that can reach your repositories over https,
14
+ and the toolchain your product builds with (.NET SDK, Node.js), installed by you. See
15
+ [Developer agents](#developer-agents).
13
16
 
14
17
  ## Getting started
15
18
 
@@ -38,8 +41,9 @@ again, and `restart` says so; `codesona-runner doctor --fix` sets the service up
38
41
  |---|---|
39
42
  | `codesona-runner start --machine-key <key>` | Pairs this machine with your workspace and sets up the background service. Options: `--url <url>` (an `https://` address), `--name <name>` (defaults to the machine's host name), `--no-service` (pair only; take sessions with `codesona-runner run`) |
40
43
  | `codesona-runner run` | Keeps the machine connected and runs the sessions Codesona hands it, until you stop it (Ctrl-C). One per machine: not while the background service runs |
41
- | `codesona-runner doctor` | Checks what this machine needs to run sessions: Node.js, the coding agent CLIs and Claude Code's login, Claude Code settings that would switch off Codesona's checks, the connection to Codesona, the clock, sleep settings and the background service. `--fix` puts right what needs no administrator (the background service only while it runs no session) and prints the exact `sudo` command for the rest |
44
+ | `codesona-runner doctor` | Checks what this machine needs to run sessions: Node.js, the coding agent CLIs and Claude Code's login, Claude Code settings that would switch off Codesona's checks, git (its credential helper, commit signing, SSH remotes the background service cannot use), the connection to Codesona, the clock, sleep settings and the background service. `--fix` puts right what needs no administrator (the background service only while it runs no session) and prints the exact `sudo` command for the rest |
42
45
  | `codesona-runner status` | Shows whether this machine is connected, its agents and its sessions |
46
+ | `codesona-runner prune` | Removes the Developer agents' repository worktrees and local task branches nobody touched for 14 days whose branch your repository's origin already has (at the same commit or a later one). It never removes work that was not pushed: a worktree with uncommitted changes, or a branch with commits origin lacks, is kept and listed. Not while the Runner runs sessions |
43
47
  | `codesona-runner restart` | Restarts the background service (`launchctl kickstart -k`), so it runs the Codesona Runner installed now and connects anew, and waits until it is connected. Not while it runs sessions: it says how many and leaves it alone; `--force` restarts it all the same, ending them. With no background service set up, it says so: stop `codesona-runner run` (Ctrl-C) and run it again |
44
48
  | `codesona-runner logout` | Disconnects this machine from Codesona, removes the background service and the Runner's files. If Codesona cannot be told, nothing is removed; `--local` removes this machine's side anyway (then disconnect it in Factory) |
45
49
  | `codesona-runner --version` | Shows the version |
@@ -49,6 +53,32 @@ them to Codesona first. While a session runs it keeps the Mac awake; an idle Mac
49
53
  and its agents' runs wait for it. `codesona-runner doctor` says which power settings would let it
50
54
  sleep or stay off, and the command that changes them.
51
55
 
56
+ ## Developer agents
57
+
58
+ A Developer agent's sessions work in your product's repositories on this machine (Codesona Runner
59
+ 0.2.0 or later). Before such a session starts, the Runner checks that this machine's git can reach
60
+ each repository (`git ls-remote`); if it cannot, the run is not taken and Factory shows why. Then it
61
+ checks the repositories out: one bare clone per repository under `~/.codesona-runner/repos/`, and one
62
+ worktree per agent at `~/.codesona-runner/agents/<agent>/repos/<repository>`, on the task's branch.
63
+ The agent builds and tests there with the tools you installed, commits, and pushes with your git.
64
+
65
+ - **Git and your credentials.** git runs as you, with your `~/.gitconfig` and your credential helper;
66
+ Codesona sends no token to this machine, and the repositories' URLs carry none. Set up a credential
67
+ helper and sign in once in a terminal: Git Credential Manager
68
+ (`brew install --cask git-credential-manager`), or `gh auth setup-git` for GitHub. The background
69
+ service has no SSH agent, so use https remotes; `codesona-runner doctor` warns of an SSH remote,
70
+ including one an `insteadOf` rule in your git config makes.
71
+ - **Commit signing.** Sessions run with `commit.gpgsign` and `tag.gpgsign` off, so a signing setup
72
+ never waits for a PIN in the background and the agent's commits are not signed with your key.
73
+ `codesona-runner doctor` says when your git config signs commits.
74
+ - **Your work and the agent's.** A worktree is the agent's: when it moves to another task its
75
+ uncommitted changes are cleared (build caches such as `node_modules`, `bin`, `obj`, `.nuget`,
76
+ `.gradle`, `target` and `dist` are kept), and its commits stay on their own branch. The Runner never
77
+ deletes a branch with commits origin lacks. `codesona-runner prune` clears worktrees and branches
78
+ that are done with.
79
+ - **Toolchain.** The Runner does not install SDKs. It reports git, the .NET SDKs and Node.js it finds
80
+ to Codesona; a session that needs one you do not have says so.
81
+
52
82
  ## What it keeps on the machine
53
83
 
54
84
  Everything is under `~/.codesona-runner/` (only you can read it):
@@ -57,7 +87,9 @@ Everything is under `~/.codesona-runner/` (only you can read it):
57
87
  a day). The keys for the connection, for each agent and for each session live only in the running
58
88
  Runner's memory.
59
89
  - `agents/<agent>/`: each agent's working directory, with the instructions, skills and settings of
60
- its sessions. Your coding agent CLI keeps its transcripts where it always does (`~/.claude`).
90
+ its sessions, and a Developer's worktrees under `repos/`. Your coding agent CLI keeps its transcripts
91
+ where it always does (`~/.claude`).
92
+ - `repos/`: a bare clone of each repository a Developer agent works in, shared by its worktrees.
61
93
  - `outbox/`, `spool/`, `state/`: results and activity not yet delivered to Codesona, and what
62
94
  `codesona-runner status` shows. The background service's log is `state/runner.log`.
63
95