@spencerboucher/switchyard 0.17.0 → 0.18.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/README.md +37 -23
- package/dist/policies/worker.js +884 -784
- package/dist/switchyard.mjs +27792 -26700
- package/package.json +1 -1
- package/web-dist/assets/AutomationView-DU4GvjqD.js +2 -0
- package/web-dist/assets/{AutomationView-BMQuTl3j.js.map → AutomationView-DU4GvjqD.js.map} +1 -1
- package/web-dist/assets/Checkbox-BmiLcC-z.js +2 -0
- package/web-dist/assets/Checkbox-BmiLcC-z.js.map +1 -0
- package/web-dist/assets/Copy-CdlOSzns.js +2 -0
- package/web-dist/assets/Copy-CdlOSzns.js.map +1 -0
- package/web-dist/assets/InteractionCard-C3H45DAY.js +4 -0
- package/web-dist/assets/{InteractionCard-CdBv3Sm7.js.map → InteractionCard-C3H45DAY.js.map} +1 -1
- package/web-dist/assets/Markdown-Bo-ScAiV.js +184 -0
- package/web-dist/assets/Markdown-Bo-ScAiV.js.map +1 -0
- package/web-dist/assets/Priority-f7KceEZQ.js +2 -0
- package/web-dist/assets/{Priority-aNWh1i4H.js.map → Priority-f7KceEZQ.js.map} +1 -1
- package/web-dist/assets/{SegmentedControl-D2kj3j7u.js → SegmentedControl-Ca8Fsw-g.js} +2 -2
- package/web-dist/assets/SegmentedControl-Ca8Fsw-g.js.map +1 -0
- package/web-dist/assets/Select-B04kPhBs.js +2 -0
- package/web-dist/assets/{Select-Dv-F-HZR.js.map → Select-B04kPhBs.js.map} +1 -1
- package/web-dist/assets/Tabs-BgpFIjqW.js +2 -0
- package/web-dist/assets/Tabs-BgpFIjqW.js.map +1 -0
- package/web-dist/assets/{UINodeRenderer-GbSP56mL.js → UINodeRenderer-CHlMHtMT.js} +3 -3
- package/web-dist/assets/{UINodeRenderer-GbSP56mL.js.map → UINodeRenderer-CHlMHtMT.js.map} +1 -1
- package/web-dist/assets/UnfilteredNote-DzKbzrjZ.js +2 -0
- package/web-dist/assets/UnfilteredNote-DzKbzrjZ.js.map +1 -0
- package/web-dist/assets/ViewSelect-Dz7vh4fq.js +2 -0
- package/web-dist/assets/ViewSelect-Dz7vh4fq.js.map +1 -0
- package/web-dist/assets/api-C9NJpI9q.js +2 -0
- package/web-dist/assets/api-C9NJpI9q.js.map +1 -0
- package/web-dist/assets/attention-BMxYQaCW.js +2 -0
- package/web-dist/assets/attention-BMxYQaCW.js.map +1 -0
- package/web-dist/assets/automations-DTTGHyoo.js +2 -0
- package/web-dist/assets/{automations-DQMWPvqT.js.map → automations-DTTGHyoo.js.map} +1 -1
- package/web-dist/assets/board-Blv0pC_z.js +6 -0
- package/web-dist/assets/board-Blv0pC_z.js.map +1 -0
- package/web-dist/assets/check-DTN2VHtE.js +2 -0
- package/web-dist/assets/check-DTN2VHtE.js.map +1 -0
- package/web-dist/assets/code-BsVbn6T3.js +25 -0
- package/web-dist/assets/code-BsVbn6T3.js.map +1 -0
- package/web-dist/assets/core.esm-DZMOHGS9.js +6 -0
- package/web-dist/assets/core.esm-DZMOHGS9.js.map +1 -0
- package/web-dist/assets/{describe-ype6dIHS.js → describe-Q2nvYHjg.js} +2 -2
- package/web-dist/assets/{describe-ype6dIHS.js.map → describe-Q2nvYHjg.js.map} +1 -1
- package/web-dist/assets/enroll-wAPt550I.js +2 -0
- package/web-dist/assets/{enroll-BTNVVoWB.js.map → enroll-wAPt550I.js.map} +1 -1
- package/web-dist/assets/index-9TW72kVM.css +2 -0
- package/web-dist/assets/index-Du1kfnPp.js +17 -0
- package/web-dist/assets/index-Du1kfnPp.js.map +1 -0
- package/web-dist/assets/keyboardLayers-CpCxpJ43.js +2 -0
- package/web-dist/assets/keyboardLayers-CpCxpJ43.js.map +1 -0
- package/web-dist/assets/more-D1YpQrbP.js +2 -0
- package/web-dist/assets/more-D1YpQrbP.js.map +1 -0
- package/web-dist/assets/pencil-BtK08_f_.js +2 -0
- package/web-dist/assets/pencil-BtK08_f_.js.map +1 -0
- package/web-dist/assets/{policyLogic-AZSVROoe.js → policyLogic-Dk_rwjQS.js} +2 -2
- package/web-dist/assets/{policyLogic-AZSVROoe.js.map → policyLogic-Dk_rwjQS.js.map} +1 -1
- package/web-dist/assets/queue-CdBAajey.js +2 -0
- package/web-dist/assets/queue-CdBAajey.js.map +1 -0
- package/web-dist/assets/{repo-CRmEGTNk.js → repo-CTLrFN0k.js} +2 -2
- package/web-dist/assets/{repo-CRmEGTNk.js.map → repo-CTLrFN0k.js.map} +1 -1
- package/web-dist/assets/rotate-ccw-mfO3Crkq.js +2 -0
- package/web-dist/assets/rotate-ccw-mfO3Crkq.js.map +1 -0
- package/web-dist/assets/search-DdgUAUi7.js +2 -0
- package/web-dist/assets/search-DdgUAUi7.js.map +1 -0
- package/web-dist/assets/selection-DDKGpSXL.js +7 -0
- package/web-dist/assets/selection-DDKGpSXL.js.map +1 -0
- package/web-dist/assets/settings-C3rhTyqj.js +12 -0
- package/web-dist/assets/settings-C3rhTyqj.js.map +1 -0
- package/web-dist/assets/states-f_A68-u-.js +58 -0
- package/web-dist/assets/states-f_A68-u-.js.map +1 -0
- package/web-dist/assets/terminal-login-eMNouLWh.js +2 -0
- package/web-dist/assets/{terminal-login-B20sSCfk.js.map → terminal-login-eMNouLWh.js.map} +1 -1
- package/web-dist/assets/timer-CDGYPIoD.js +2 -0
- package/web-dist/assets/timer-CDGYPIoD.js.map +1 -0
- package/web-dist/assets/trackers-BKCB5pxU.js +2 -0
- package/web-dist/assets/trackers-BKCB5pxU.js.map +1 -0
- package/web-dist/assets/useNow-CjCVyQra.js +2 -0
- package/web-dist/assets/useNow-CjCVyQra.js.map +1 -0
- package/web-dist/assets/{useResource-CFaJYaSY.js → useResource-BvhL-G6a.js} +2 -2
- package/web-dist/assets/{useResource-CFaJYaSY.js.map → useResource-BvhL-G6a.js.map} +1 -1
- package/web-dist/assets/workboard-Btp-KIzn.js +3 -0
- package/web-dist/assets/workboard-Btp-KIzn.js.map +1 -0
- package/web-dist/index.html +6 -6
- package/web-dist/sw.js +1 -1
- package/web-dist/sw.js.map +1 -1
- package/web-dist/assets/AutomationView-BMQuTl3j.js +0 -2
- package/web-dist/assets/Checkbox-D18Ch0n4.js +0 -2
- package/web-dist/assets/Checkbox-D18Ch0n4.js.map +0 -1
- package/web-dist/assets/Copy-D6U5ewFc.js +0 -2
- package/web-dist/assets/Copy-D6U5ewFc.js.map +0 -1
- package/web-dist/assets/InteractionCard-CdBv3Sm7.js +0 -4
- package/web-dist/assets/Overlay-Cv0SIpoa.js +0 -2
- package/web-dist/assets/Overlay-Cv0SIpoa.js.map +0 -1
- package/web-dist/assets/Priority-aNWh1i4H.js +0 -2
- package/web-dist/assets/SegmentedControl-D2kj3j7u.js.map +0 -1
- package/web-dist/assets/Select-Dv-F-HZR.js +0 -2
- package/web-dist/assets/Tabs-DPj-rKor.js +0 -184
- package/web-dist/assets/Tabs-DPj-rKor.js.map +0 -1
- package/web-dist/assets/ViewSelect-DTXqcHvg.js +0 -2
- package/web-dist/assets/ViewSelect-DTXqcHvg.js.map +0 -1
- package/web-dist/assets/attention-eEYmUIPZ.js +0 -2
- package/web-dist/assets/attention-eEYmUIPZ.js.map +0 -1
- package/web-dist/assets/auth-e3n8h2VO.js +0 -2
- package/web-dist/assets/auth-e3n8h2VO.js.map +0 -1
- package/web-dist/assets/automations-DQMWPvqT.js +0 -2
- package/web-dist/assets/board-CxPUJBjR.js +0 -10
- package/web-dist/assets/board-CxPUJBjR.js.map +0 -1
- package/web-dist/assets/code-BfD33VCt.js +0 -25
- package/web-dist/assets/code-BfD33VCt.js.map +0 -1
- package/web-dist/assets/enroll-BTNVVoWB.js +0 -2
- package/web-dist/assets/index-BE-Sxt6h.css +0 -2
- package/web-dist/assets/index-xw7YOYjs.js +0 -23
- package/web-dist/assets/index-xw7YOYjs.js.map +0 -1
- package/web-dist/assets/more-AZ4rHFG5.js +0 -2
- package/web-dist/assets/more-AZ4rHFG5.js.map +0 -1
- package/web-dist/assets/queue-LyV9HFK4.js +0 -2
- package/web-dist/assets/queue-LyV9HFK4.js.map +0 -1
- package/web-dist/assets/selection-BgO3-HZn.js +0 -2
- package/web-dist/assets/selection-BgO3-HZn.js.map +0 -1
- package/web-dist/assets/settings-CK-9B48D.js +0 -12
- package/web-dist/assets/settings-CK-9B48D.js.map +0 -1
- package/web-dist/assets/states-D7g0-4EY.js +0 -58
- package/web-dist/assets/states-D7g0-4EY.js.map +0 -1
- package/web-dist/assets/terminal-login-B20sSCfk.js +0 -2
- package/web-dist/assets/timer-CyFp7DQs.js +0 -2
- package/web-dist/assets/timer-CyFp7DQs.js.map +0 -1
- package/web-dist/assets/useNow-DvXAU3dJ.js +0 -2
- package/web-dist/assets/useNow-DvXAU3dJ.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
A coding agent has to run where your repositories, toolchains and logins are: your laptop, a workstation, a home server. You, on the other hand, are not always sitting in front of that machine. Switchyard keeps the agents where the work is and lets you follow along from anywhere: start a session from your phone, answer the question it asks while you are on your laptop, take over from a terminal, and get a notification when the result is ready for review. Every client looks at the same live session, and closing one never stops the work.
|
|
6
6
|
|
|
7
|
-
On top of
|
|
7
|
+
Switchyard tracks what you are working on as branches: each has a worktree and one agent session, wherever it runs, and the issues, pull requests and board columns that go with it. On top of that it adds GitHub trackers, scheduled automations and a review flow, so an agent can work through a backlog while you are away and hand everything back for you to accept. Switchyard aims to preserve continuity with your evolving Pi setup: plugins own their workflows and optional adapters translate supported interactions, not arbitrary custom terminal UIs. See [plugin ownership](docs/plugin-boundaries.md).
|
|
8
8
|
|
|
9
9
|
## How it fits together
|
|
10
10
|
|
|
@@ -37,12 +37,14 @@ There are three kinds of parts:
|
|
|
37
37
|
|
|
38
38
|
- **The coordinator** is the one always-on service. It keeps tasks, schedules, notifications, devices and the shared view of every session, and it decides what runs where. It never runs an agent and never holds your provider credentials, so it can live anywhere: a container, a small server, or your laptop.
|
|
39
39
|
- **Hosts** are your machines. A host agent runs Pi as your OS user, with your repositories, worktrees, Pi packages and model logins, and connects *outbound* to the coordinator. A host needs no open ports, and a laptop can come and go: its sessions keep running while the coordinator is down, and the events catch up when it returns.
|
|
40
|
-
- **Clients**
|
|
40
|
+
- **Clients** show views: a view is a saved filter over branches, and a terminal mirror (herdr, tmux) is a surface bound to one view. The web app works on desktop and as an installed app on a phone; in a terminal you get Pi's own TUI for any session (`switchyard tui`, or a whole herdr session mirroring Switchyard), and the scriptable CLI works over the same API. Any client can watch, answer and steer a session; none of them owns it.
|
|
41
41
|
|
|
42
42
|
For a single machine, `switchyard up` runs the coordinator and a host in one process. For more, run the coordinator as a server and enroll each machine as a host. The protocol is the same either way.
|
|
43
43
|
|
|
44
44
|
## A piece of work, start to finish
|
|
45
45
|
|
|
46
|
+
Switchyard tracks your work as **branches**: a repository on a branch, with its worktree and one agent session, wherever it runs. See [the model](docs/model.md).
|
|
47
|
+
|
|
46
48
|
```mermaid
|
|
47
49
|
sequenceDiagram
|
|
48
50
|
actor You
|
|
@@ -51,34 +53,38 @@ sequenceDiagram
|
|
|
51
53
|
participant Coord as Coordinator
|
|
52
54
|
participant Host as Host (Pi)
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
Phone
|
|
56
|
-
Coord
|
|
57
|
-
|
|
56
|
+
Coord->>Coord: A tracker finds an issue assigned to you (Not started)
|
|
57
|
+
You->>Phone: Start it on the Board
|
|
58
|
+
Phone->>Coord: Open its branch
|
|
59
|
+
Coord->>Host: Create the worktree, start Pi
|
|
58
60
|
Host-->>Coord: A plugin asks a question
|
|
59
61
|
Coord-->>Phone: Notification: needs input
|
|
60
62
|
You->>Laptop: Answer
|
|
61
63
|
Laptop->>Coord: Answer
|
|
62
64
|
Coord->>Host: Deliver the answer to Pi
|
|
63
|
-
Host-->>Coord:
|
|
64
|
-
Coord
|
|
65
|
-
|
|
65
|
+
Host-->>Coord: Pull request opened (In review)
|
|
66
|
+
Host-->>Coord: Pull request merged (Merged)
|
|
67
|
+
Coord->>Host: Archive the sessions, remove the worktree
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
1. **
|
|
69
|
-
2. **
|
|
70
|
-
3. **
|
|
71
|
-
4. **
|
|
72
|
-
5. **
|
|
73
|
-
|
|
70
|
+
1. **Work arrives or you start it.** A [tracker](docs/trackers.md) lists the GitHub issues assigned to you in the Board's Not started column. Starting one, or opening any branch from New session, makes its git worktree inside the repository (`<repo>/.worktrees/<branch>` by default) and its primary session. A branch that already has a session opens that session instead.
|
|
71
|
+
2. **The agent asks, you answer anywhere.** Questions and approvals from Pi and its plugins appear as cards in every client and as a notification on the device you are most likely to see. Answer once; every client shows the result.
|
|
72
|
+
3. **You can step in.** Join from any client to watch and send messages, steer the current turn or queue a follow-up, or open Pi's own terminal for the session. A second session on the same branch is possible when you ask for it; it nests under the first.
|
|
73
|
+
4. **The branch moves with its pull request.** Working, In review when the pull request opens, Merged when it merges. With write-back on, the tracker moves the issue's card on your GitHub Projects board too.
|
|
74
|
+
5. **Cleanup follows the merge.** With "Remove merged worktrees" on, a merged, clean, idle worktree is removed and its sessions archived.
|
|
75
|
+
|
|
76
|
+
**Automations use tasks.** A task has an objective, acceptance criteria, dependencies and a priority; an automation (a schedule, a webhook, another task finishing) or the task board makes it ready, and Switchyard dispatches it once to a host, where it gets its own worktree and session, runs your checks, and waits in Review with its diff for you to accept. See [the specification](docs/spec.md).
|
|
74
77
|
|
|
75
78
|
## Features
|
|
76
79
|
|
|
77
80
|
| Area | What you get |
|
|
78
81
|
|---|---|
|
|
82
|
+
| **Branches** | One row per branch with its primary session; extra sessions and subagents nested under it; open a new or existing branch in one step; the same branch on two hosts is one row |
|
|
83
|
+
| **Board** | Branches by stage (Not started, Working, In review, Merged), or by a GitHub Projects board's columns for a tracker's view |
|
|
84
|
+
| **Trackers** | The GitHub issues assigned to you, or every open issue on a Projects board, worktrees for their branches, and card moves on your Projects board ([trackers.md](docs/trackers.md)) |
|
|
79
85
|
| **Sessions** | Persistent Pi conversations on any host; the same live session in every client; steer or queue follow-ups; take over and return to automation; resume after crashes with the same conversation (never a silent new one); import existing Pi sessions; switch model and effort, see context use and compact, a slash-command picker |
|
|
80
|
-
| **Workspaces** | A git worktree per
|
|
81
|
-
| **Tasks and
|
|
86
|
+
| **Workspaces** | A git worktree per branch inside the repository, discovery of worktrees you made yourself, setup commands, `.worktreeinclude` to copy ignored files such as `.env` into new worktrees, removal that refuses to lose uncommitted or unmerged work, and project folders per host whose repositories are added automatically |
|
|
87
|
+
| **Tasks and automations** | A task board (Backlog, Ready, In progress, Review, Done) for dispatched work; dependencies with cycle detection; priorities; per-project concurrency limits; a Queue view explaining why queued work waits |
|
|
82
88
|
| **Review** | Changed files and diffs on desktop and phone, line comments sent as one follow-up, request changes, accept |
|
|
83
89
|
| **Bounded continuation** | Optional: keep the agent working toward an objective, within a maximum number of continuations, a time limit and token or cost caps, ending in your checks and your review |
|
|
84
90
|
| **Automations** | Cron (time-zone aware), one-time, webhook and dependency triggers; fresh, continue or watch modes; skip, queue or append when work overlaps; skip or catch up missed runs; a preview of the resulting task |
|
|
@@ -93,11 +99,17 @@ sequenceDiagram
|
|
|
93
99
|
|---|---|
|
|
94
100
|
| **Host** | A machine that runs Pi for Switchyard, through its host agent |
|
|
95
101
|
| **Project** | A repository Switchyard knows about; a project can have a checkout on several hosts |
|
|
96
|
-
| **
|
|
97
|
-
| **
|
|
98
|
-
| **
|
|
99
|
-
| **
|
|
102
|
+
| **Branch** | A project on a branch: the unit of work, listed on Sessions and the Board. Derived from its workspaces and sessions |
|
|
103
|
+
| **Workspace** | A branch's checkout on one host: the main checkout or a git worktree |
|
|
104
|
+
| **Session** | One persistent Pi conversation in a workspace. Each branch has a **primary** session; others are **extras**; **subagents** belong to the session that started them |
|
|
105
|
+
| **Tracker** | The GitHub issues assigned to you (or a board's open issues) in one owner, optionally with a Projects board |
|
|
106
|
+
| **Issue** | One issue a tracker follows, attached to the branch it is worked on |
|
|
107
|
+
| **Stage** | Where a branch is: Not started, Working, In review, Merged |
|
|
108
|
+
| **View** | A saved filter over branches: projects, hosts, pins, and an optional source |
|
|
100
109
|
| **Device** | A signed-in client: a browser, an installed web app or a terminal |
|
|
110
|
+
| **Surface** | A herdr or tmux session showing a view, under the device it is signed in with |
|
|
111
|
+
| **Task** | A unit of dispatched work, with an objective and acceptance criteria, on the task board |
|
|
112
|
+
| **Run** | One attempt at a task, carried out in a session |
|
|
101
113
|
| **Adapter** | Code that renders a specific Pi plugin's questions and state as structured UI |
|
|
102
114
|
|
|
103
115
|
A seeded **Vanilla** profile runs stock Pi (no extensions, skills or prompt templates).
|
|
@@ -118,7 +130,7 @@ switchyard up
|
|
|
118
130
|
```sh
|
|
119
131
|
docker run -d --name switchyard -p 127.0.0.1:7400:7400 -v switchyard-data:/data \
|
|
120
132
|
-e SWITCHYARD_PUBLIC_URL=https://switchyard.example.com \
|
|
121
|
-
ghcr.io/justmytwospence/switchyard:0.
|
|
133
|
+
ghcr.io/justmytwospence/switchyard:0.18.0
|
|
122
134
|
# Single sign-on is required off localhost: see docs/auth.md
|
|
123
135
|
```
|
|
124
136
|
|
|
@@ -148,12 +160,14 @@ Details: [docs/auth.md](docs/auth.md) and the [privilege model](docs/deployment.
|
|
|
148
160
|
License: [MIT](LICENSE).
|
|
149
161
|
|
|
150
162
|
|
|
151
|
-
Switchyard is young and moving quickly. It is tested against Pi `>=1.4.0 <1.
|
|
163
|
+
Switchyard is young and moving quickly. It is tested against Pi `>=1.4.0 <1.7.0` (see [docs/compatibility.md](docs/compatibility.md) for supported and unsupported Pi capabilities) and runs on macOS and Linux hosts. What has and has not been verified is recorded in [docs/acceptance-report.md](docs/acceptance-report.md).
|
|
152
164
|
|
|
153
165
|
## Documentation
|
|
154
166
|
|
|
155
167
|
| Guide | Covers |
|
|
156
168
|
|---|---|
|
|
169
|
+
| [Model](docs/model.md) | Branches, sessions, trackers, views, devices and surfaces, and how they fit together |
|
|
170
|
+
| [Trackers](docs/trackers.md) | GitHub issues, worktrees for their branches, Projects board write-back |
|
|
157
171
|
| [Deployment](docs/deployment.md) | Single machine, server, reverse proxies, VPNs, hosts, environment reference, privilege model |
|
|
158
172
|
| [Sign-in and devices](docs/auth.md) | The owner model, single sign-on, passkeys, terminal approval, single sign-on, host enrollment, revocation |
|
|
159
173
|
| [CLI](docs/cli.md) | Every `switchyard` command and credentials |
|