@ours.network/install 0.17.0 → 0.18.0-nightly.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 CHANGED
@@ -1,146 +1,98 @@
1
1
  # @ours.network/install — `ours-install`
2
2
 
3
- The **unified ours.network stack installer**. ONE guided ~3-minute flow that installs the WHOLE
4
- stack for someone who already has Claude Code, Codex, and/or Hermes, safely offers optional
5
- voice-message transcription, then hands back a single copy-paste prompt for remaining setup.
6
-
7
- ## Install
8
-
9
- **Recommended — a persistent, versioned, integrity-checked command on your PATH:**
3
+ The all-in-one installer for the ours.network stack. One run installs and
4
+ configures the shared daemon, MCP adapter, cowork, Telegram connector, Fleet,
5
+ and plugins for every safely detected agent harness.
10
6
 
11
7
  ```sh
12
- npm i -g @ours.network/install && ours-install
8
+ npm install --global @ours.network/install
9
+ ours-install
13
10
  ```
14
11
 
15
- Re-run (or update / add a skipped piece) any time with just `ours-install`.
16
-
17
- **One-off, no global install:**
12
+ The normal flow uses one daemon at `~/.ours` on port 3050, shows an eight-stage
13
+ progress bar, and asks only for information it cannot safely infer (normally the
14
+ Human identity's display name). Existing daemon conflicts and moving a Telegram
15
+ connector from another daemon still require explicit confirmation.
16
+
17
+ ## What the installer does
18
+
19
+ - Installs `@ours.network/cli`, `@ours.network/mcp`,
20
+ `@ours.network/tg-connector`, `@ours.network/cowork`, and
21
+ `@ours.network/fleet` on one release channel.
22
+ - Configures, starts, and enables the single shared daemon.
23
+ - Creates the daemon's Human identity (historically called the root identity),
24
+ or preserves the existing one on a re-run.
25
+ - Installs the ours plugin into safely detected Claude Code, Codex, and Hermes
26
+ installations.
27
+ - Configures and starts cowork against the shared daemon.
28
+ - Configures Telegram against the same daemon, but does **not** start it.
29
+ - Runs Fleet's host initialization and, when `~/fleet.yaml` is absent, writes a
30
+ conservative stopped starter with `FleetCoordinator`, a `fleet-health`
31
+ watchdog, and a ten-minute `coordinator_health` loop. An existing
32
+ `~/fleet.yaml` is never overwritten.
33
+
34
+ The operator CLI owns daemon configuration, lifecycle, and boot persistence.
35
+ The MCP package is only the stdio adapter spawned by agent harnesses; the
36
+ installer never asks `ours-mcp` to start a daemon.
37
+
38
+ ## What remains stopped
39
+
40
+ Telegram and Fleet are installed but intentionally not started. Review and
41
+ activate them when ready:
18
42
 
19
43
  ```sh
20
- npx @ours.network/install
44
+ # After configuring a Telegram bot and route locally:
45
+ ours-tg-connector install-service
46
+
47
+ # After reviewing ~/fleet.yaml:
48
+ ours-fleet doctor
49
+ ours-fleet config
50
+ ours-fleet up
51
+ ours-fleet ls
21
52
  ```
22
53
 
23
- **Fallback for machines without npm** (least secure pipes a script straight into your shell):
54
+ The final installer screen repeats these commands and provides a copy-paste
55
+ prompt for Claude Code, Codex, or Hermes. The agent should guide local bot-token
56
+ entry without asking the user to paste the secret into chat.
24
57
 
25
- ```sh
26
- curl -fsSL https://raw.githubusercontent.com/adapt-toolkit/ours-mcp/main/packages/installer/install.sh | bash
27
- ```
28
-
29
- The `curl … | bash` bootstrap simply gets Node.js/npm sorted, then does the `npm i -g
30
- @ours.network/install` and runs `ours-install` for you. `ours-install` is the single front door;
31
- `ours-codex-install` is kept as a **thin alias** that hands off to it (use
32
- `ours-codex-install --codex-only` for the legacy Codex-only path).
33
-
34
- The installer is a small **self-contained** Node package (Node built-ins only — no runtime
35
- dependency on the things it installs): an ASCII banner, tasteful colour (degrades under `NO_COLOR`
36
- / no-tty), and plain-language **what + why** for every step.
37
-
38
- ## The flow (what the user sees)
39
-
40
- 1. **Pre-flight** — a short checklist, not a wall of logs: platform (Linux / macOS / WSL; native
41
- Windows prints a WSL pointer and exits), Node.js, and **harness detection with alias-safety**.
42
- Before ever calling `claude` / `codex`, it confirms each resolves to a **real executable** that
43
- answers `--version` promptly. A shell alias / hanging wrapper is **never called** (that would
44
- hang the run) — it's reported plainly with a fix, and a manual-install path is always offered.
45
- If neither harness exists it says so and exits.
46
- 2. **Config-first** (first install only) — the daemon's two base settings, up front:
47
- the **broker** (end-to-end encrypted; the broker never sees message content — almost everyone
48
- just presses Enter) and the **port** (probes `3050`; only asks if it's busy; never hands out
49
- `3051`, reserved for the Telegram connector). Applied once, then the stack is built with it.
50
- 3. **Four consent gates**, each paced with a clean `✓ … No problems.` line + an explicit
51
- **Continue?** — never a start-twice-then-ask, never a silent failure:
52
- - **1/4 ours core (the daemon)** — write config → optional voice setup → install/start ONCE
53
- → boot service. On a re-run it reuses the running config (no re-ask) and only updates when
54
- you say yes. Complete voice setup is kept without prompting. Missing/incomplete setup is
55
- offered before the first start or pending update restart, then delegated to the canonical
56
- `ours-mcp voice-setup` provider selector and hidden API-key prompt. Accepted setup owns the
57
- one restart/readiness transaction; declining or already-ready setup preserves the normal
58
- core lifecycle. The secret is written atomically to mode-`0600` config; a failed daemon
59
- reload rolls back.
60
- - **2/4 harness plugins** — the installer **drives the plugin CLIs itself**
61
- (`claude plugin marketplace add …` + `claude plugin install ours@ours.network`;
62
- `codex plugin marketplace add …` + `codex plugin add ours@ours-codex-marketplace`). Choosing
63
- Codex also installs the `ours-codex` live launcher in the same step. Any failure / alias
64
- prints the exact manual commands and continues — it **never dead-ends**.
65
- - **3/4 ours-fleet** — makes your harnesses persistent, always-online agent teams that survive
66
- a reboot; runs `ours-fleet init`. Default **Yes**.
67
- - **4/4 Telegram connector** — install-only (no bot tokens here), then optionally as a
68
- boot service.
69
- 4. **Summary + hand-off** — a recap (skipped/failed rows call out the fix), then a **literal
70
- copy-paste prompt** (root identity + fleet + Telegram) with the steps for any skipped/failed
71
- component dropped out. Copied to the clipboard where supported.
72
-
73
- The human identity is created idempotently after the daemon becomes reachable. Because
74
- `curl … | bash` gives the script its input over the pipe, every prompt is read from the
75
- controlling terminal (`/dev/tty`), so the flow still works piped.
76
-
77
- ## Non-interactive / CI / safe dry-run
58
+ ## Preview and automation
78
59
 
79
60
  ```sh
80
- OURS_ASSUME_YES=1 bash install.sh # accept every default, no prompts
81
- OURS_INSTALL_DRY_RUN=1 bash install.sh # walk the WHOLE flow, install/change NOTHING
61
+ ours-install --dry-run
62
+ OURS_ASSUME_YES=1 ours-install
63
+ ours-install --state-dir /absolute/path --port 3070
82
64
  ```
83
65
 
84
- `OURS_INSTALL_DRY_RUN=1` routes every side-effecting action through a print-only seam it shows
85
- exactly the commands it *would* run (npm installs, `ours-mcp start`, plugin adds, `ours-fleet
86
- init`, service installs) without executing them. That is the safe way to preview the flow on a
87
- machine you don't want to touch, and how the integration tests drive it.
88
-
89
- Non-interactive runs never prompt for or synthesize voice credentials. Supply a complete
90
- `OURS_STT_*` environment configuration yourself, or rerun interactively later; missing setup
91
- is reported and left unchanged.
66
+ Dry-run walks the real plan without writing files, installing packages, starting
67
+ processes, or changing services. `OURS_ASSUME_YES=1` uses the OS username for a
68
+ new Human identity and asks no ordinary setup questions, but it never bypasses
69
+ selection conflicts, connector moves, or destructive safeguards.
92
70
 
93
- | var | meaning |
94
- |---|---|
95
- | `OURS_ASSUME_YES` | accept every default, never prompt (implies no tty needed) |
96
- | `OURS_INSTALL_DRY_RUN` | walk the flow without installing or changing anything |
97
- | `OURS_NPM` | npm binary to use (default `npm`) |
98
- | `OURS_CONFIG` | daemon config file location (default `~/.ours/config.json`) |
71
+ A non-default daemon must be selected coherently with a config file or matching
72
+ port and state directory. Harnesses and the generated Fleet role receive that
73
+ selection through `OURS_CONFIG`; there is no per-application daemon.
99
74
 
100
75
  ## Uninstall
101
76
 
102
- The companion `uninstall.sh` reverses what the installers created — same thin-bootstrap +
103
- Node treatment (banner, colour, a clear explanation of what will be removed). Run it from a
104
- checkout:
105
-
106
77
  ```sh
107
- bash packages/installer/uninstall.sh
78
+ ours-uninstall --state-dir "$HOME/.ours"
79
+ ours-uninstall --state-dir "$HOME/.ours" --purge
108
80
  ```
109
81
 
110
- or over the same raw-URL pattern as `install.sh` (pointing at `uninstall.sh`):
111
-
112
- ```sh
113
- curl -fsSL https://raw.githubusercontent.com/adapt-toolkit/ours-mcp/main/packages/installer/uninstall.sh | bash
114
- ```
82
+ The uninstaller delegates service and daemon removal to the `ours` CLI. Identity
83
+ state is retained by default. Purging requires the existing destructive gates and
84
+ targets only the explicit state directory.
115
85
 
116
- It uses the **same toggle UI** to pick what to remove — per-harness plugins, the ours data
117
- directory (`~/.ours`), and the `ours-mcp` daemon. It removes **only** what the installers
118
- created, and guards the two destructive items — the data directory and the daemon — behind
119
- an explicit typed `yes`.
86
+ ## Release channel
120
87
 
121
- Headless (no terminal), drive it with environment variables:
88
+ `OURS_CHANNEL=nightly` (or `OURS_INSTALL_CHANNEL`) selects the packages' nightly
89
+ dist-tags. Without an override, the installer's own version selects the channel.
122
90
 
123
- ```sh
124
- OURS_UNINSTALL="hermes codex" \
125
- OURS_UNINSTALL_DATA=yes \
126
- OURS_UNINSTALL_DAEMON=yes \
127
- bash uninstall.sh
128
- ```
91
+ ## Environment
129
92
 
130
- | var | meaning |
131
- |---|---|
132
- | `OURS_UNINSTALL` | harnesses to remove (space/comma list of `claude-code codex hermes`, or `all`) |
133
- | `OURS_UNINSTALL_DATA` | `yes` remove the ours data directory (`~/.ours`) |
134
- | `OURS_UNINSTALL_DAEMON` | `yes` remove the `ours-mcp` daemon |
135
-
136
- ## Notes
137
-
138
- - This package is **not published to npm** (`private: true`); it ships as the hosted
139
- `install.sh` bootstrap plus the `install.mjs` Node installer (and its `lib/`), and exposes the
140
- `ours-install` bin. The pieces it installs — the daemon (`@ours.network/mcp`), the harness
141
- plugins via each marketplace, `@ours.network/fleet`, and `@ours.network/tg-connector` — are the
142
- published components.
143
- - **Idempotent + safe to re-run.** A re-run adds a skipped piece, re-points the plugins, or (only
144
- when you say yes) updates a component; an already-current daemon is left untouched, its running
145
- port and complete voice setup are reused everywhere. Bot tokens and fleet roles remain in the
146
- copy-paste hand-off; provider keys never enter that prompt or agent chat.
93
+ - `OURS_ASSUME_YES=1`: accept safe defaults without prompting.
94
+ - `OURS_INSTALL_DRY_RUN=1`: preview without mutation.
95
+ - `OURS_NPM`: npm executable.
96
+ - `OURS_CONFIG`: explicit daemon configuration file.
97
+ - `OURS_STATE_DIR`: explicit daemon state directory.
98
+ - `OURS_CHANNEL`: `latest` or `nightly`.