@ours.network/install 0.17.0 → 0.18.0-nightly.1
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 -122
- package/install.mjs +23 -790
- package/lib/components.mjs +360 -0
- package/lib/detect.mjs +169 -0
- package/lib/effects.mjs +349 -0
- package/lib/extras.mjs +320 -0
- package/lib/journal.mjs +158 -0
- package/lib/logic.mjs +351 -25
- package/lib/orchestrate-uninstall.mjs +379 -0
- package/lib/orchestrate.mjs +1051 -0
- package/lib/plan.mjs +270 -0
- package/lib/rerun.mjs +119 -0
- package/lib/target.mjs +390 -0
- package/lib/uninstall.mjs +736 -0
- package/lib/usage.mjs +47 -0
- package/package.json +1 -1
- package/uninstall.mjs +23 -194
- package/uninstall.sh +13 -4
package/README.md
CHANGED
|
@@ -1,146 +1,61 @@
|
|
|
1
1
|
# @ours.network/install — `ours-install`
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
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 guided installer for the ours shared daemon, MCP adapter, harness plugins,
|
|
4
|
+
ours-fleet, and optional connectors.
|
|
10
5
|
|
|
11
6
|
```sh
|
|
12
|
-
npm
|
|
7
|
+
npm install --global @ours.network/install
|
|
8
|
+
ours-install
|
|
13
9
|
```
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
The installer treats the operator CLI and the MCP adapter as separate packages:
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
npx @ours.network/install
|
|
21
|
-
```
|
|
13
|
+
- `@ours.network/cli` owns daemon configuration, lifecycle, and boot services.
|
|
14
|
+
- `@ours.network/mcp` is the stdio MCP adapter spawned by agent harnesses.
|
|
22
15
|
|
|
23
|
-
|
|
16
|
+
It configures a selected state directory, installs both packages, starts the
|
|
17
|
+
daemon with `ours daemon start`, installs its service with
|
|
18
|
+
`ours daemon install-service`, and uses `ours identity create-root` for the Human
|
|
19
|
+
identity. It never asks ours-mcp to boot or configure a daemon.
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
The default is one shared daemon at `~/.ours` on port 3050. A non-default daemon
|
|
22
|
+
must be selected coherently with a config file or matching port and state
|
|
23
|
+
directory. Harnesses receive that selection through `OURS_CONFIG`; there is no
|
|
24
|
+
separate per-harness daemon registry.
|
|
28
25
|
|
|
29
|
-
|
|
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
|
|
26
|
+
## Preview and automation
|
|
78
27
|
|
|
79
28
|
```sh
|
|
80
|
-
|
|
81
|
-
|
|
29
|
+
ours-install --dry-run
|
|
30
|
+
OURS_ASSUME_YES=1 ours-install
|
|
31
|
+
ours-install --state-dir /absolute/path --port 3070
|
|
82
32
|
```
|
|
83
33
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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.
|
|
92
|
-
|
|
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`) |
|
|
34
|
+
Dry-run walks the real plan without writing files, installing packages, starting
|
|
35
|
+
processes, or changing services. Non-interactive runs accept defaults but never
|
|
36
|
+
bypass selection conflicts or destructive safeguards.
|
|
99
37
|
|
|
100
38
|
## Uninstall
|
|
101
39
|
|
|
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
40
|
```sh
|
|
107
|
-
|
|
41
|
+
ours-uninstall --state-dir "$HOME/.ours"
|
|
42
|
+
ours-uninstall --state-dir "$HOME/.ours" --purge
|
|
108
43
|
```
|
|
109
44
|
|
|
110
|
-
|
|
45
|
+
The uninstaller delegates service and daemon removal to the `ours` CLI. Identity
|
|
46
|
+
state is retained by default. Purging requires the existing destructive gates and
|
|
47
|
+
targets only the explicit state directory.
|
|
111
48
|
|
|
112
|
-
|
|
113
|
-
curl -fsSL https://raw.githubusercontent.com/adapt-toolkit/ours-mcp/main/packages/installer/uninstall.sh | bash
|
|
114
|
-
```
|
|
49
|
+
## Release channel
|
|
115
50
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
created, and guards the two destructive items — the data directory and the daemon — behind
|
|
119
|
-
an explicit typed `yes`.
|
|
51
|
+
`OURS_CHANNEL=nightly` (or `OURS_INSTALL_CHANNEL`) selects the packages' nightly
|
|
52
|
+
dist-tags. Without an override, the installer's own version selects the channel.
|
|
120
53
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
```sh
|
|
124
|
-
OURS_UNINSTALL="hermes codex" \
|
|
125
|
-
OURS_UNINSTALL_DATA=yes \
|
|
126
|
-
OURS_UNINSTALL_DAEMON=yes \
|
|
127
|
-
bash uninstall.sh
|
|
128
|
-
```
|
|
54
|
+
## Environment
|
|
129
55
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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.
|
|
56
|
+
- `OURS_ASSUME_YES=1`: accept defaults without prompting.
|
|
57
|
+
- `OURS_INSTALL_DRY_RUN=1`: preview without mutation.
|
|
58
|
+
- `OURS_NPM`: npm executable.
|
|
59
|
+
- `OURS_CONFIG`: explicit daemon configuration file.
|
|
60
|
+
- `OURS_STATE_DIR`: explicit daemon state directory.
|
|
61
|
+
- `OURS_CHANNEL`: `latest` or `nightly`.
|