@buda-ai/connector 0.1.7 → 0.1.9

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
@@ -50,13 +50,22 @@ an OAuth token with `--launch-config-stdin`.
50
50
  Desktop can start the sidecar with:
51
51
 
52
52
  ```bash
53
- printf '{"serverUrl":"https://buda.im","oauthToken":"..."}\n' \
54
- | buda-connector daemon --launch-config-stdin
53
+ printf '{"serverUrl":"https://buda.im","spaceId":"spc_...","oauthToken":"..."}\n' \
54
+ | buda-connector daemon --desktop --launch-config-stdin --plain
55
55
  ```
56
56
 
57
+ The Desktop controller keeps stdin open as its transient lease. Closing Desktop closes the
58
+ lease and stops a transient daemon. If the standalone CLI takes the same daemon over as
59
+ persistent, closing Desktop no longer stops it.
60
+
61
+ Packaged Desktop launches also set `BUDA_CONNECTOR_BUNDLED_RUNTIME_ROOT`,
62
+ `BUDA_CONNECTOR_RUNTIME_ENTRYPOINT`, and `BUDA_CONNECTOR_RUNTIME_NODE` so the detached runtime is
63
+ copied out of the application bundle without requiring network access.
64
+
57
65
  Supported launch config fields:
58
66
 
59
67
  - `serverUrl`
68
+ - `spaceId`
60
69
  - `token`
61
70
  - `workdirRoot`
62
71
  - `oauthToken`
@@ -72,13 +81,32 @@ The token selects that Space's independent local connector profile:
72
81
  npx -y @buda-ai/connector@latest daemon --token "cet_..."
73
82
  ```
74
83
 
75
- Desktop and other authenticated clients should use OAuth token launch config
76
- instead:
77
-
78
- ```bash
79
- printf '%s\n' '{"serverUrl":"https://buda.im","oauthToken":"..."}' \
80
- | npx -y @buda-ai/connector@latest daemon --launch-config-stdin
81
- ```
84
+ The command installs the runtime into a stable, platform-specific directory under `~/.buda`,
85
+ starts or reuses one detached daemon for the device/Space identity, and attaches the terminal
86
+ Dashboard. The Dashboard lists every local Connector identity stored in `~/.buda/device.json`
87
+ across servers and Spaces, and also discovers running daemons from their authenticated local
88
+ control records if a stored identity is missing. It opens before registration finishes and shows a
89
+ token-scoped `Connecting / New Connector / Resolving Space` row until the server returns the
90
+ canonical identity. The Connector resolved by the invocation token is selected first.
91
+
92
+ Dashboard controls:
93
+
94
+ - `Up` / `Down` (or `K` / `J`): select a local Connector when the Connectors section is active.
95
+ - `Tab`: switch between the Connectors, Activity, and Agent Debug sections.
96
+ - Mouse wheel: scroll the Activity or Agent Debug pane under the pointer.
97
+ - `S`: ask for confirmation, then gracefully stop the selected Connector. The Dashboard remains
98
+ open so another local Connector can be selected.
99
+ - `Escape`: exit the Dashboard only. Every Connector daemon keeps running in the background.
100
+ - `Ctrl+C`: open an exit menu. **Exit Dashboard only** is the safe default. Stopping every local
101
+ Connector requires choosing **Stop all local Connectors and exit** and confirming a second
102
+ warning because running Agent tasks will be interrupted.
103
+
104
+ The manager sends stop requests through each daemon's existing authenticated local control
105
+ channel. Local control requests time out instead of blocking the Dashboard indefinitely. When a
106
+ missing local profile recovers an existing canonical Connector ID, an idle stale daemon is stopped
107
+ cleanly before the new credential takes over; active Agent work is never force-stopped. The manager
108
+ never prints Connector or device tokens. `--plain` and non-TTY launches retain their existing
109
+ log/background behavior.
82
110
 
83
111
  You can also pass launch options directly:
84
112
 
@@ -88,15 +116,18 @@ buda-connector daemon --token "cet_..." --workdir "$HOME/.buda/agents"
88
116
 
89
117
  ## Local Files
90
118
 
91
- - `~/.buda/device.json` (versioned device profiles keyed by server origin and token fingerprint)
119
+ - `~/.buda/device.json` (canonical identities keyed by device, normalized server origin, and Space)
120
+ - `~/.buda/daemons/` (owner-only local control metadata and process locks)
121
+ - `~/.buda/runtime/<platform>-<arch>-node<ABI>/<version>/` (stable detached runtimes)
92
122
  - `~/.buda/logs/connector.log`
93
123
  - `~/.buda/agents/`
94
124
 
95
125
  Existing `~/.buda/connector.log` files are left in place as historical logs after upgrading.
96
126
 
97
127
  Server URL paths and query strings do not create a new identity. Scheme and non-default port
98
- changes do. Connector tokens for different Spaces on the same server select independent profiles,
99
- so their daemons can run concurrently. Raw tokens are never used in profile keys or lock paths.
128
+ changes do. Connector tokens for different Spaces on the same server resolve independent canonical
129
+ identities, so their daemons can run concurrently. Raw tokens are never used in identity keys or
130
+ lock paths.
100
131
  The installation-level physical device ID remains shared across profiles.
101
132
 
102
133
  New server profiles share a privacy-preserving device ID derived by hashing the operating