@openscout/scout 0.2.64 → 0.2.68

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
@@ -9,7 +9,7 @@ bun add -g @openscout/scout
9
9
  scout --help
10
10
  ```
11
11
 
12
- `@openscout/scout` is the published package name. It installs the `scout` command and depends on `@openscout/runtime` for the local broker service.
12
+ `@openscout/scout` is the public package name. It installs the `scout` command and carries the bundled broker/runtime and web UI. Installing it does not start services; commands such as `scout setup`, `scout up`, and `scout server start` activate them explicitly.
13
13
 
14
14
  ## Canonical Flow
15
15
 
@@ -29,11 +29,11 @@ scout ask --to dewey "can you review our docs?"
29
29
  - `~/Library/Application Support/OpenScout/relay-agents.json` for compatibility with the existing machine-local agent registry
30
30
  - `.openscout/project.json` for the current repo when needed
31
31
 
32
- It also discovers local and project-backed agents from your configured workspace roots, installs the broker service, and attempts to start it.
32
+ It also discovers local and project-backed agents from your configured workspace roots, installs the base Scout service, attempts to start it, and ensures Caddy is available for the local `scout.local` edge. On macOS, setup installs missing Caddy with `brew install caddy`; otherwise install Caddy yourself or set `OPENSCOUT_CADDY_BIN`.
33
33
 
34
34
  `scout init` writes `~/.openscout/config.json` with the broker, web, and pairing ports that every Scout component reads. Run it once after install, or with `--force` to overwrite.
35
35
 
36
- When the input is not a known subcommand and includes exactly one `@agent` mention, Scout treats it as an implicit `ask` and waits for the reply. For example:
36
+ When the input is not a known subcommand and includes exactly one `@agent` mention, Scout treats it as an implicit `ask`: it records durable work with the broker, waits for the target to acknowledge or complete immediately, and leaves later completion visible through the conversation or flight follow-up. For example:
37
37
 
38
38
  ```bash
39
39
  scout @dewey can you review our docs?
@@ -56,10 +56,22 @@ When sender, target, or recent activity is unclear, the shortest orientation loo
56
56
 
57
57
  ```bash
58
58
  scout whoami
59
+ scout inbox --latest 10 --json
59
60
  scout who
61
+ scout channel triage --latest 10 --json
60
62
  scout latest
63
+ scout latest --channel triage --messages --limit 3
61
64
  ```
62
65
 
66
+ Use `channel <name> --latest <count> --json` for the cheapest agent-facing
67
+ channel catch-up. It reads broker messages for that channel and exits. Use
68
+ `latest --channel <name>` when you want the compact activity projection instead.
69
+ Use `inbox --latest <count> --json` for direct messages addressed to the
70
+ current inferred agent identity.
71
+
72
+ CLI agents should use these commands rather than curling broker HTTP endpoints
73
+ or reading relay files directly.
74
+
63
75
  ### Sender identity
64
76
 
65
77
  `scout send`, `scout ask`, and `scout broadcast` all use the
@@ -149,6 +161,23 @@ scout ask --as premotion.master.mini --to hudson "Build the editable CodeViewer
149
161
  Use `channel.shared` only when the work is genuinely for a group, not for a
150
162
  single owner.
151
163
 
164
+ ### Label-scoped catch-up
165
+
166
+ Use labels to tie related asks together without creating a new workflow object:
167
+
168
+ ```bash
169
+ scout ask --to hudson --label release:0.2.66 "Review the package bump."
170
+ scout ask --to lattices --label release:0.2.66 "Check the install path."
171
+ scout label feed release:0.2.66 --since 10m
172
+ scout label watch release:0.2.66 --interval 2
173
+ scout label brief release:0.2.66
174
+ ```
175
+
176
+ Labels are plain metadata. They can mean a goal, release, milestone, incident,
177
+ or any local convention. `scout label watch` streams a normalized firehose of
178
+ matching Scout-owned activity; `scout label brief` gives a compact digest. Scout
179
+ does not assign a lifecycle to the label.
180
+
152
181
  ### Addressing specific agents
153
182
 
154
183
  Agent identity has six dimensions: `definitionId`, workspace qualifier, `profile`, `harness`, `model`, `node`. Canonical form:
@@ -172,11 +201,16 @@ Aliases: `runtime:` = `harness:`, `persona:` = `profile:`, `branch:` / `worktree
172
201
 
173
202
  If direct send/ask still comes back unresolved, treat that as a routing problem, not a mere "target is offline" problem. The right follow-up is to disambiguate the target, inspect broker context with `scout who` / `scout latest`, or create/register the missing identity. Do not default to pushing the bring-up step back onto the operator for a known target.
174
203
 
175
- By default, a label handoff such as `@openscout.harness:claude` should mean
176
- "use the OpenScout identity on the Claude harness in a fresh session/context."
177
- Reusing an existing session is an explicit continuity choice, not the default.
178
- The broker should keep the stable agent name as the address and record the
179
- concrete session binding in the delivery receipt/history.
204
+ Local product handoffs use the public Scout address:
205
+
206
+ ```bash
207
+ scout send --to scout "message for the local Scout inbox"
208
+ ```
209
+
210
+ Broker names and concrete node or agent ids are diagnostic details. Normal send
211
+ output should say whether the message was sent, not which broker or internal
212
+ session handled it. Reusing an existing session is an explicit continuity
213
+ choice, not the default.
180
214
 
181
215
  Session refs are separate route targets for continuing a concrete bound
182
216
  session. Use the bare `ref:<suffix>` form in receipts/history, and pass the
@@ -188,10 +222,10 @@ scout ask --ref 7f3a9c21 "continue from that handoff"
188
222
  scout send --ref 7f3a9c21 "status for that same session"
189
223
  ```
190
224
 
191
- Receipts should name both layers, for example:
225
+ Diagnostic views may show both layers, for example:
192
226
 
193
227
  ```text
194
- sent to @openscout#claude via DM (ref:7f3a9c21)
228
+ sent to Scout via DM (ref:7f3a9c21)
195
229
  ```
196
230
 
197
231
  ## Current Commands
@@ -249,13 +283,20 @@ scout server open
249
283
  scout server start
250
284
  scout server start --port 3200
251
285
  scout server open --path /agents/arc-codex-2.master.mini
252
- scout server start --public-origin https://scout.my-mac.local
286
+ scout server start --public-origin http://scout.local
287
+ scout server edge --local-name m1
253
288
  scout server start --vite-url http://127.0.0.1:43173 # SPA dev server
254
289
  scout server start --static --static-root /custom/client
255
290
  ```
256
291
 
257
292
  `scout server open` reuses an already-running matching Scout server on that port, or starts one in the background and opens the browser for you. Use `scout server` or `scout server help` for full flags.
258
293
 
259
- The application server derives the LAN hostname `scout.<machine>.local` by default. For a Caddy or other edge proxy, set `--public-origin https://scout.<machine>.local` (or `OPENSCOUT_WEB_PUBLIC_ORIGIN`) so browser origins match the app server's trusted host model.
294
+ The application server binds to `0.0.0.0` by default, treats `scout.local` as the local portal name, and derives the node URL as `<machine>.scout.local` unless the user configures a short alias such as `m1`. `scout server edge` publishes `scout.local` plus the node host with Bonjour/mDNS and runs Caddy against the active web port. The managed edge defaults to HTTP on port `80` for zero-cert local browsing. HTTPS remains an explicit opt-in via `--edge-scheme https` or `--edge-scheme both` plus `scout server trust`.
295
+
296
+ `scout setup` verifies Caddy for this path. The setup command installs it with Homebrew on macOS when `caddy` is not already available, but Scout still runs Caddy directly with the generated `~/.scout/local-edge/Caddyfile` instead of registering a separate Homebrew service. The base LaunchAgent is labelled `dev.openscout` in source/dev installs and supervises the broker, local edge, web startup, and menu bar app; `scout doctor` prints the exact `launchctl bootout ...` command for the current mode.
297
+
298
+ When the edge is up but the web app is down, Caddy serves a same-origin "Start Scout" page. The button calls Caddy's internal `/__openscout/web/start` path, which proxies to the always-on broker and starts the web server while keeping the user-facing URL at `scout.local` or `<name>.scout.local`.
299
+
300
+ `packages/web` remains the internal web workspace. Published installs get that same server and client through `@openscout/scout`.
260
301
 
261
- For the same web UI without the full `scout` CLI package, use **`@openscout/web`** (`openscout-web`): it ships its own `dist/client`, bundled Bun server, and pairing supervisor.
302
+ For source development, `bun run dev:edge -- --local-name m1` starts the web dev stack and the local edge together. It generates Caddy config against the actual selected dev port, so worktree-specific ports and busy-port fallback still route through `scout.local`.
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env bun
2
+
3
+ import { spawn } from "node:child_process";
4
+ import { existsSync } from "node:fs";
5
+ import { dirname, resolve } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const binDir = dirname(fileURLToPath(import.meta.url));
9
+ const runtimeDistDir = resolve(binDir, "../dist/runtime");
10
+
11
+ const entrypoints = {
12
+ broker: resolve(runtimeDistDir, "broker-daemon.mjs"),
13
+ service: resolve(runtimeDistDir, "broker-process-manager.mjs"),
14
+ discover: resolve(runtimeDistDir, "mesh-discover.mjs"),
15
+ };
16
+
17
+ const [, , command = "service", ...args] = process.argv;
18
+ const entrypoint = entrypoints[command];
19
+
20
+ if (!entrypoint) {
21
+ console.error(`Unknown openscout-runtime command: ${command}`);
22
+ process.exit(1);
23
+ }
24
+
25
+ if (!existsSync(entrypoint)) {
26
+ console.error(
27
+ "Scout runtime dist entry is missing. Reinstall @openscout/scout or rebuild the package.",
28
+ );
29
+ process.exit(1);
30
+ }
31
+
32
+ const child = spawn(process.execPath, [entrypoint, ...args], {
33
+ stdio: "inherit",
34
+ });
35
+
36
+ child.on("exit", (code, signal) => {
37
+ if (signal) {
38
+ process.kill(process.pid, signal);
39
+ } else {
40
+ process.exit(code ?? 0);
41
+ }
42
+ });
@@ -0,0 +1 @@
1
+ const o={};throw new Error('Could not resolve "@xterm/addon-fit" imported by "hudsonkit".');export{o as default};
@@ -0,0 +1 @@
1
+ const o={};throw new Error('Could not resolve "@xterm/addon-webgl" imported by "hudsonkit".');export{o as default};