@treestructuredplanning/gateway 0.2.0 → 0.3.2
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 +19 -87
- package/dist/cli.js +249 -125
- package/dist/{shared-IOW65S5G.js → shared-SSP3A5QQ.js} +795 -432
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# TSP gateway
|
|
2
2
|
|
|
3
3
|
The TSP gateway lets the [Tree-Structured Planning](https://treestructuredplanning.com)
|
|
4
|
-
(TSP) canvas start, stop and
|
|
4
|
+
(TSP) canvas start, stop and continue Claude Code, Codex and Cursor sessions on your computer, in the
|
|
5
5
|
repository folders you register. It runs in the background under your own user account and
|
|
6
6
|
only connects outward to TSP.
|
|
7
7
|
|
|
@@ -17,81 +17,28 @@ only connects outward to TSP.
|
|
|
17
17
|
count for a repository inside it.
|
|
18
18
|
- On Linux, a running Secret Service such as GNOME Keyring or KWallet. The gateway will not
|
|
19
19
|
run without an OS credential store.
|
|
20
|
-
- Build must be available for your TSP account.
|
|
21
20
|
|
|
22
21
|
`connect` and `tsp-gateway status` say which harnesses can build in each folder and what is left to
|
|
23
22
|
you: installing or signing in to a harness, or accepting its trust prompt. Once one harness is ready
|
|
24
23
|
in a folder, steps for your other harnesses are optional.
|
|
25
24
|
|
|
26
|
-
## Connect
|
|
25
|
+
## Connect, disconnect and commands
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
Connecting, turning the gateway off, disconnecting, every command, what leaves your computer, and
|
|
28
|
+
stopping and continuing agents are documented on one page:
|
|
29
|
+
[Build on your machine](https://treestructuredplanning.com/docs/drive-with-your-agent/build-on-your-machine). Start there.
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
npx -y @treestructuredplanning/gateway@latest connect
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
`connect [folder]` (the folder defaults to the current one) does the whole setup, and running
|
|
35
|
-
it again is safe:
|
|
36
|
-
|
|
37
|
-
1. It checks that the folder is a clone with a GitHub remote, so a wrong folder fails before
|
|
38
|
-
anything changes.
|
|
39
|
-
2. It pairs this computer with your TSP account, only after you approve in the browser window
|
|
40
|
-
it opens. It also prints the approval link in case no browser opens. A working pairing is
|
|
41
|
-
kept.
|
|
42
|
-
3. It registers the folder.
|
|
43
|
-
4. It installs a login item that starts the gateway when you log in.
|
|
44
|
-
5. It prints a short summary: which harnesses are ready in each folder, and the steps only you can
|
|
45
|
-
take (install a harness, sign in, or run it there once to accept its trust prompt). They are
|
|
46
|
-
required until one harness is ready, and optional after that.
|
|
47
|
-
|
|
48
|
-
Run outside any clone, `connect` keeps the folders already registered and repairs the rest,
|
|
49
|
-
so it also fixes a stopped, outdated or revoked gateway. If TSP cannot be reached, nothing
|
|
50
|
-
changes; try again later. The login item runs the copy of the gateway that `connect` ran
|
|
51
|
-
from. With `npx` that is npm's cache, so if you clear that cache, run `connect` again.
|
|
52
|
-
|
|
53
|
-
For Build to carry a change all the way, your agent needs to be able to commit, push and open a pull request. If your setup doesn't allow that, Build stops where your agent stops and you land the change yourself.
|
|
54
|
-
|
|
55
|
-
## Disconnect and uninstall
|
|
56
|
-
|
|
57
|
-
```sh
|
|
58
|
-
npx -y @treestructuredplanning/gateway@latest disconnect
|
|
59
|
-
```
|
|
31
|
+
## Remove it completely
|
|
60
32
|
|
|
61
|
-
`disconnect
|
|
62
|
-
its stored credential. Registered folders stay in the config file. If TSP cannot be reached,
|
|
63
|
-
the pairing is kept; run `disconnect` again. If the credential was already missing, the
|
|
64
|
-
computer may still be listed in TSP; remove it from Settings there.
|
|
65
|
-
|
|
66
|
-
To leave nothing behind, also delete the config and state folders listed under
|
|
33
|
+
After `disconnect`, delete the config and state folders listed under
|
|
67
34
|
[What it stores](#what-it-stores), and if you installed globally:
|
|
68
35
|
|
|
69
36
|
```sh
|
|
70
37
|
npm uninstall --global @treestructuredplanning/gateway
|
|
71
38
|
```
|
|
72
39
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
With a global install (`npm install --global @treestructuredplanning/gateway@latest`) the
|
|
76
|
-
command is `tsp-gateway`; with `npx`, use `npx -y @treestructuredplanning/gateway@latest`
|
|
77
|
-
in its place.
|
|
78
|
-
|
|
79
|
-
| Command | What it does |
|
|
80
|
-
| ----------------------------- | ------------------------------------------------------------------------------- |
|
|
81
|
-
| `connect [folder]` | Pair if needed, register the folder, install the login item, print a summary. |
|
|
82
|
-
| `disconnect` | Remove the login item, then unpair. |
|
|
83
|
-
| `pair` | Pair this computer with your TSP account (replaces any existing pairing). |
|
|
84
|
-
| `add <folder>` | Register a repository folder. |
|
|
85
|
-
| `remove <host/owner/name>` | Unregister a repository. |
|
|
86
|
-
| `configure-launch '<json>'` | Set how sessions get your shell environment (see below). |
|
|
87
|
-
| `configure-reporting <level>` | `activity` (default) or `off`: whether session activity is sent to TSP. |
|
|
88
|
-
| `status [--json]` | Show pairing, connection and each folder's next steps; `--json` is for scripts. |
|
|
89
|
-
| `start` | Run the gateway in the foreground. Ctrl-C stops it, not your sessions. |
|
|
90
|
-
| `install` | Install or refresh the login item. Run it again after upgrading the gateway. |
|
|
91
|
-
| `uninstall` | Remove the login item; keep the pairing and folders. |
|
|
92
|
-
| `unpair` | Revoke this computer's pairing in TSP and delete the stored credential. |
|
|
93
|
-
|
|
94
|
-
Registering or removing a folder takes effect in the running gateway without a restart.
|
|
40
|
+
The login item runs the copy of the gateway that `connect` ran from. With `npx` that is npm's
|
|
41
|
+
cache, so if you clear that cache, run `connect` again.
|
|
95
42
|
|
|
96
43
|
## What TSP can ask it to do
|
|
97
44
|
|
|
@@ -100,14 +47,14 @@ TSP can ask the gateway for exactly four things, and only in folders you registe
|
|
|
100
47
|
- **Launch** a Claude Code, Codex or Cursor session, with a prompt describing the TSP work you
|
|
101
48
|
started from the canvas.
|
|
102
49
|
- **Stop** that session.
|
|
103
|
-
- **
|
|
104
|
-
|
|
105
|
-
|
|
50
|
+
- **Continue** that session. A stopped session gets the fixed prompt
|
|
51
|
+
`Continue where you left off.`; a done or failed session reopens without a prompt and
|
|
52
|
+
waits for you.
|
|
106
53
|
- **Report status**: which harnesses are installed, signed in and trust each registered
|
|
107
54
|
folder, and how each launched session is doing.
|
|
108
55
|
|
|
109
56
|
Only your own clicks in TSP send a prompt. Claude Code and Codex sessions keep running if the
|
|
110
|
-
gateway stops; a Cursor session ends with the gateway, and
|
|
57
|
+
gateway stops; a Cursor session ends with the gateway, and Continue reopens its chat. A
|
|
111
58
|
session that finishes does not mean TSP has reviewed or accepted its work. Keep the
|
|
112
59
|
[TSP plugin](https://github.com/WebifyServices/tsp-plugin) installed so launched sessions
|
|
113
60
|
have TSP's tools.
|
|
@@ -134,22 +81,6 @@ child process for each running turn. It sends no mode, model, permission or sign
|
|
|
134
81
|
Cursor applies your own settings and permission rules, and the gateway starts a session only in a
|
|
135
82
|
folder you have already trusted.
|
|
136
83
|
|
|
137
|
-
## What leaves your computer
|
|
138
|
-
|
|
139
|
-
The gateway sends TSP only repository names (`owner/name`), which harnesses are available,
|
|
140
|
-
signed in and trusted per folder, and session status, including any waiting message with
|
|
141
|
-
folder paths removed. For each launched session it also sends what the session is doing
|
|
142
|
-
(reading, editing, running a command), when it was last active, and counts of files edited
|
|
143
|
-
and commands run; never file names or commands. When a Cursor turn finishes it also sends what
|
|
144
|
-
Cursor last said, trimmed to 240 characters with folder paths removed, so TSP can show it; no
|
|
145
|
-
other transcript text is sent. Folder paths, environment variables, command lines, transcripts
|
|
146
|
-
and raw error output stay on your computer. Run
|
|
147
|
-
`tsp-gateway configure-reporting off` to stop sending activity (`activity` turns it back on).
|
|
148
|
-
|
|
149
|
-
The gateway only connects outward, to TSP, and accepts no inbound connections. The only
|
|
150
|
-
exception is pairing: while you approve in the browser, it listens briefly on `127.0.0.1`
|
|
151
|
-
(your computer only) for the browser's reply, then stops.
|
|
152
|
-
|
|
153
84
|
## How sessions get your environment
|
|
154
85
|
|
|
155
86
|
By default, Claude Code sessions start through your login shell, so variables your shell
|
|
@@ -215,11 +146,6 @@ or choose `direct`. Changes apply to sessions started afterwards, not to running
|
|
|
215
146
|
On Windows, access to these folders follows your user profile's permissions. Delete the state
|
|
216
147
|
folder only after `disconnect`, once no gateway is running.
|
|
217
148
|
|
|
218
|
-
## Help
|
|
219
|
-
|
|
220
|
-
See the [TSP documentation](https://treestructuredplanning.com/docs) or email
|
|
221
|
-
`support@treestructuredplanning.com`.
|
|
222
|
-
|
|
223
149
|
Repository advertisements and launches use protocol 2, with an explicit host, owner and name. Upgrade a protocol 1 gateway when TSP shows the update state. Only `github.com` launches are supported. Existing local GitHub registrations are expanded and rewritten on the next config read.
|
|
224
150
|
|
|
225
151
|
## Attempt checkouts
|
|
@@ -260,3 +186,9 @@ refuses before copying it. Tracked destination files are never written. A local
|
|
|
260
186
|
named `tsp` blocks the `tsp/<attempt-id>` namespace and must be renamed by the user.
|
|
261
187
|
TSP never deletes worktrees or branches. Reusing an attempt never rebases its
|
|
262
188
|
branch; the reported base is its shared ancestor with the fetched landing line.
|
|
189
|
+
|
|
190
|
+
## Help
|
|
191
|
+
|
|
192
|
+
See the
|
|
193
|
+
[TSP documentation](https://treestructuredplanning.com/docs/drive-with-your-agent/build-on-your-machine)
|
|
194
|
+
or email `support@treestructuredplanning.com`.
|