wireal-run 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.
- package/LICENSE +55 -0
- package/README.md +75 -0
- package/bin/mcp-stdio.mjs +2567 -0
- package/bin/wireal-run.mjs +5519 -0
- package/hooks/event.cjs +11 -0
- package/hooks/permission.cjs +98 -0
- package/hooks/record.cjs +34 -0
- package/hooks/statusline.cjs +6 -0
- package/package.json +29 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# PolyForm Internal Use License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/internal-use/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
8
|
+
|
|
9
|
+
## Copyright License
|
|
10
|
+
|
|
11
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license), and you may not distribute the software.
|
|
12
|
+
|
|
13
|
+
## Changes and New Works License
|
|
14
|
+
|
|
15
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
16
|
+
|
|
17
|
+
## Patent License
|
|
18
|
+
|
|
19
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
20
|
+
|
|
21
|
+
## Fair Use
|
|
22
|
+
|
|
23
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
24
|
+
|
|
25
|
+
## Internal Business Use
|
|
26
|
+
|
|
27
|
+
Use of the software for the internal business operations of you and your company is use for a permitted purpose.
|
|
28
|
+
|
|
29
|
+
## No Other Rights
|
|
30
|
+
|
|
31
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
32
|
+
|
|
33
|
+
## Patent Defense
|
|
34
|
+
|
|
35
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
36
|
+
|
|
37
|
+
## Violations
|
|
38
|
+
|
|
39
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
40
|
+
|
|
41
|
+
## No Liability
|
|
42
|
+
|
|
43
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
44
|
+
|
|
45
|
+
## Definitions
|
|
46
|
+
|
|
47
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
48
|
+
|
|
49
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
50
|
+
|
|
51
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
52
|
+
|
|
53
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
54
|
+
|
|
55
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# wireal-run
|
|
2
|
+
|
|
3
|
+
The Wireal runner. It watches one folder on your machine, claims the tasks your
|
|
4
|
+
[Wireal](https://wireal.co) workspace has made ready, and runs Claude Code or
|
|
5
|
+
the Codex CLI on each one in its own git worktree.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx wireal-run login
|
|
9
|
+
npx wireal-run run
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The first command signs this machine in. The second binds the folder you are in
|
|
13
|
+
to a workspace and starts the agents your workspace's roster names — the ones
|
|
14
|
+
whose CLI it finds on your PATH.
|
|
15
|
+
|
|
16
|
+
| Command | What it does |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| `wireal-run login` | Sign in to Wireal on this machine |
|
|
19
|
+
| `wireal-run run` | Claim ready tasks and run an agent on each |
|
|
20
|
+
| `wireal-run usage` | Show what is left of each agent's limits |
|
|
21
|
+
| `wireal-run rename [name]` | Rename this folder's runner |
|
|
22
|
+
| `wireal-run status` | Show this folder's runner binding |
|
|
23
|
+
| `wireal-run unbind` | Remove this folder's runner binding |
|
|
24
|
+
| `wireal-run logout` | Forget the saved session |
|
|
25
|
+
|
|
26
|
+
Useful flags on `run`: `--workspace <name>` to bind a folder the first time,
|
|
27
|
+
`--agents <n>` to cap how many run at once (`0` only reports in), `--repo
|
|
28
|
+
<path>` to work on another folder, `--once` to take one round and stop.
|
|
29
|
+
|
|
30
|
+
The saved sign-in refreshes itself: the runner rotates its token a minute
|
|
31
|
+
before it runs out, so a run left going overnight keeps working. Rotation is
|
|
32
|
+
one token at a time across every `wireal-run` on the machine, and a refresh
|
|
33
|
+
that cannot take the lock waits rather than racing, because the server treats a
|
|
34
|
+
token used twice as stolen and revokes the whole sign-in. If that does happen,
|
|
35
|
+
`wireal-run login` is the only way back, and the runner says so once and stops
|
|
36
|
+
instead of retrying for hours.
|
|
37
|
+
|
|
38
|
+
One runner to a folder: a second `run` in a folder another runner already
|
|
39
|
+
holds names the process holding it and stops rather than claiming the same
|
|
40
|
+
tasks twice. A runner that died without cleaning up is taken over on the next
|
|
41
|
+
start, as is one whose note predates the last boot, and `--force` takes the
|
|
42
|
+
folder from a runner that is still going. It works the same on macOS, Linux
|
|
43
|
+
and Windows; folders are matched as Windows compares them there.
|
|
44
|
+
|
|
45
|
+
On Windows the runner finds `claude` and `codex` through `PATHEXT`, starts an
|
|
46
|
+
`npm` shim through the shell that can run it, and takes its name from the
|
|
47
|
+
console title or the ConEmu task. Nothing here needs Orca: the Orca tab is
|
|
48
|
+
read only when Orca itself started the terminal.
|
|
49
|
+
|
|
50
|
+
While it runs, `1`–`9` attaches to an agent's screen, `ctrl-g` detaches, and
|
|
51
|
+
`q` quits. The machine is kept awake for as long as the runner is up, so an
|
|
52
|
+
agent is never cut off by the lid or the idle timer; the cup in the header
|
|
53
|
+
steams while that hold is in place, and `--allow-sleep` starts without it. The
|
|
54
|
+
tab takes the runner's name while it holds it, and gives the name back when you
|
|
55
|
+
quit.
|
|
56
|
+
|
|
57
|
+
A new binding is named after the terminal it was made in — the tmux window, the
|
|
58
|
+
screen session or the Orca tab — and falls back to the folder. `wireal-run
|
|
59
|
+
rename <name>` renames it later; `wireal-run rename` with no name takes the
|
|
60
|
+
terminal's name again. A runner already running picks the new name up on its
|
|
61
|
+
next heartbeat, so the app follows without a restart.
|
|
62
|
+
|
|
63
|
+
The runner reads each signed-in CLI's own usage limits without starting an
|
|
64
|
+
agent: Codex every few minutes, Claude about once an hour, which is as often as
|
|
65
|
+
Anthropic gives them out. Between reads it falls back to what is already on
|
|
66
|
+
disk — the last figures it read, kept beside its session file, and the ones
|
|
67
|
+
Codex writes into its own rollouts — so the 5-hour and 7-day columns are filled
|
|
68
|
+
in before you hand out work, here and in the app. An agent whose window is over
|
|
69
|
+
the workspace's pause limit is held back rather than claiming a task.
|
|
70
|
+
|
|
71
|
+
Agents are configured in the app, not here: the roster, the model each one
|
|
72
|
+
uses, the merge policy and the checks to run before a merge all live in your
|
|
73
|
+
workspace. Full setup at [wireal.co/docs](https://wireal.co/docs).
|
|
74
|
+
|
|
75
|
+
Requires Node 22 or newer, git, and the agent CLIs you want to host.
|