@ours.network/install 0.11.0
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/LICENSE +98 -0
- package/README.md +136 -0
- package/install.mjs +604 -0
- package/install.sh +92 -0
- package/lib/logic.mjs +192 -0
- package/lib/prompt.mjs +139 -0
- package/lib/ui.mjs +126 -0
- package/package.json +33 -0
- package/uninstall.mjs +198 -0
- package/uninstall.sh +71 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, Apache 2.0 Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Adapt Framework Solutions Ltd
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to use,
|
|
27
|
+
copy, modify, create derivative works, publicly perform, publicly display and
|
|
28
|
+
redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or service
|
|
34
|
+
that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software that
|
|
39
|
+
exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee using
|
|
52
|
+
the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to the
|
|
59
|
+
infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software, you
|
|
68
|
+
must include a copy of or a link to these Terms and Conditions and not remove any
|
|
69
|
+
copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, INCLUDING
|
|
74
|
+
WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, NON-INFRINGEMENT, OR THAT THE SOFTWARE IS FREE OF DEFECTS. IN NO EVENT
|
|
76
|
+
WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE SOFTWARE,
|
|
77
|
+
INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF WE HAVE
|
|
78
|
+
BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
79
|
+
|
|
80
|
+
### Grant of Future License
|
|
81
|
+
|
|
82
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
83
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
84
|
+
the date we make the Software available. On or after that date, you may use the
|
|
85
|
+
Software under the Apache License, Version 2.0, in which case the following will
|
|
86
|
+
apply:
|
|
87
|
+
|
|
88
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
89
|
+
this file except in compliance with the License.
|
|
90
|
+
|
|
91
|
+
You may obtain a copy of the License at
|
|
92
|
+
|
|
93
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
94
|
+
|
|
95
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
96
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
97
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
98
|
+
specific language governing permissions and limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# @ours.network/install — `ours-install`
|
|
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 and/or Codex, then hands back a single copy-paste
|
|
5
|
+
prompt to finish setup conversationally.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
**Recommended — a persistent, versioned, integrity-checked command on your PATH:**
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm i -g @ours.network/install && ours-install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Re-run (or update / add a skipped piece) any time with just `ours-install`.
|
|
16
|
+
|
|
17
|
+
**One-off, no global install:**
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npx @ours.network/install
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Fallback for machines without npm** (least secure — pipes a script straight into your shell):
|
|
24
|
+
|
|
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 only two settings the user ever types, 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 → install/start ONCE → boot service. On a
|
|
53
|
+
re-run it reuses the running config (no re-ask) and only updates when you say yes.
|
|
54
|
+
- **2/4 harness plugins** — the installer **drives the plugin CLIs itself**
|
|
55
|
+
(`claude plugin marketplace add …` + `claude plugin install ours@ours.network`;
|
|
56
|
+
`codex plugin marketplace add …` + `codex plugin add ours@ours-codex-marketplace`). Choosing
|
|
57
|
+
Codex also installs the `ours-codex` live launcher in the same step. Any failure / alias
|
|
58
|
+
prints the exact manual commands and continues — it **never dead-ends**.
|
|
59
|
+
- **3/4 ours-fleet** — makes your harnesses persistent, always-online agent teams that survive
|
|
60
|
+
a reboot; runs `ours-fleet init`. Default **Yes**.
|
|
61
|
+
- **4/4 Telegram connector** — install-only (no bot tokens here), then optionally as a
|
|
62
|
+
boot service.
|
|
63
|
+
4. **Summary + hand-off** — a recap (skipped/failed rows call out the fix), then a **literal
|
|
64
|
+
copy-paste prompt** (root identity + fleet + Telegram) with the steps for any skipped/failed
|
|
65
|
+
component dropped out. Copied to the clipboard where supported.
|
|
66
|
+
|
|
67
|
+
The root identity is **deferred to the hand-off** — zero identity typing during install. Because
|
|
68
|
+
`curl … | bash` gives the script its input over the pipe, every prompt is read from the
|
|
69
|
+
controlling terminal (`/dev/tty`), so the flow still works piped.
|
|
70
|
+
|
|
71
|
+
## Non-interactive / CI / safe dry-run
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
OURS_ASSUME_YES=1 bash install.sh # accept every default, no prompts
|
|
75
|
+
OURS_INSTALL_DRY_RUN=1 bash install.sh # walk the WHOLE flow, install/change NOTHING
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`OURS_INSTALL_DRY_RUN=1` routes every side-effecting action through a print-only seam — it shows
|
|
79
|
+
exactly the commands it *would* run (npm installs, `ours-mcp start`, plugin adds, `ours-fleet
|
|
80
|
+
init`, service installs) without executing them. That is the safe way to preview the flow on a
|
|
81
|
+
machine you don't want to touch, and how the integration tests drive it.
|
|
82
|
+
|
|
83
|
+
| var | meaning |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `OURS_ASSUME_YES` | accept every default, never prompt (implies no tty needed) |
|
|
86
|
+
| `OURS_INSTALL_DRY_RUN` | walk the flow without installing or changing anything |
|
|
87
|
+
| `OURS_NPM` | npm binary to use (default `npm`) |
|
|
88
|
+
| `OURS_CONFIG` | daemon config file location (default `~/.ours/config.json`) |
|
|
89
|
+
|
|
90
|
+
## Uninstall
|
|
91
|
+
|
|
92
|
+
The companion `uninstall.sh` reverses what the installers created — same thin-bootstrap +
|
|
93
|
+
Node treatment (banner, colour, a clear explanation of what will be removed). Run it from a
|
|
94
|
+
checkout:
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
bash packages/installer/uninstall.sh
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
or over the same raw-URL pattern as `install.sh` (pointing at `uninstall.sh`):
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
curl -fsSL https://raw.githubusercontent.com/adapt-toolkit/ours-mcp/main/packages/installer/uninstall.sh | bash
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
It uses the **same toggle UI** to pick what to remove — per-harness plugins, the ours data
|
|
107
|
+
directory (`~/.ours`), and the `ours-mcp` daemon. It removes **only** what the installers
|
|
108
|
+
created, and guards the two destructive items — the data directory and the daemon — behind
|
|
109
|
+
an explicit typed `yes`.
|
|
110
|
+
|
|
111
|
+
Headless (no terminal), drive it with environment variables:
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
OURS_UNINSTALL="hermes codex" \
|
|
115
|
+
OURS_UNINSTALL_DATA=yes \
|
|
116
|
+
OURS_UNINSTALL_DAEMON=yes \
|
|
117
|
+
bash uninstall.sh
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
| var | meaning |
|
|
121
|
+
|---|---|
|
|
122
|
+
| `OURS_UNINSTALL` | harnesses to remove (space/comma list of `claude-code codex hermes`, or `all`) |
|
|
123
|
+
| `OURS_UNINSTALL_DATA` | `yes` — remove the ours data directory (`~/.ours`) |
|
|
124
|
+
| `OURS_UNINSTALL_DAEMON` | `yes` — remove the `ours-mcp` daemon |
|
|
125
|
+
|
|
126
|
+
## Notes
|
|
127
|
+
|
|
128
|
+
- This package is **not published to npm** (`private: true`); it ships as the hosted
|
|
129
|
+
`install.sh` bootstrap plus the `install.mjs` Node installer (and its `lib/`), and exposes the
|
|
130
|
+
`ours-install` bin. The pieces it installs — the daemon (`@ours.network/mcp`), the harness
|
|
131
|
+
plugins via each marketplace, `@ours.network/fleet`, and `@ours.network/tg-connector` — are the
|
|
132
|
+
published components.
|
|
133
|
+
- **Idempotent + safe to re-run.** A re-run adds a skipped piece, re-points the plugins, or (only
|
|
134
|
+
when you say yes) updates a component; an already-current daemon is left untouched, its running
|
|
135
|
+
port reused everywhere. Deep configuration (identities, bot tokens, fleet roles) is intentionally
|
|
136
|
+
**not** done here — it's the copy-paste hand-off's job.
|