@ours.network/install 2.1.9 → 2.2.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 +11 -1
- package/assets/images.json +16 -16
- package/assets/release-lock.json +103 -29
- package/assets/release.json +9 -9
- package/assets/sources.json +13 -13
- package/lib/effects.mjs +4 -4
- package/lib/native-sessions.mjs +110 -0
- package/lib/orchestrate.mjs +7 -0
- package/lib/plan.mjs +1 -1
- package/lib/removal-plan.mjs +2 -1
- package/lib/removal.mjs +17 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,7 +102,17 @@ This permanent command contains no tunnel credentials or enrollment expiry. `--s
|
|
|
102
102
|
|
|
103
103
|
### Fleet task commands from a harness command sandbox
|
|
104
104
|
|
|
105
|
-
After Fleet configuration, and again on update, the installer asks the exact Fleet it installed to run `ours-fleet managed-cli setup`. Fleet owns that policy;
|
|
105
|
+
After Fleet configuration, and again on update, the installer asks the exact Fleet it installed to run `ours-fleet managed-cli setup`. Fleet owns that policy; this step writes no Codex rule or Claude setting itself, and starts no agent session and no model. It runs only when the installed Fleet declares the `managed-cli.setup-v1` capability; the Fleet release this installer pins does. With an earlier Fleet (a retained or development installation) it is skipped (and `--fleet-task-workflow` reports that it was not applied), and it never fails an installation: an unsupported combination is printed with Fleet's reason and left exactly as sandboxed as before.
|
|
106
|
+
|
|
107
|
+
### Terminal sessions
|
|
108
|
+
|
|
109
|
+
Client/all setup automatically connects terminal sessions when Claude Code and/or Codex are selected, including unattended setup. Fleet is installed as the terminal-session component without requiring its persistent-agent wizard. The installer reads the Human identity from the saved workspace profile; it does not ask for a CID or an extra permission. Terminal sessions provide visible history, browser input and peer-mail wake. A missing or ambiguous Human identity produces an actionable setup error.
|
|
110
|
+
|
|
111
|
+
Setup uses the installed Fleet's participation commands and local native plugin. It merges participation hooks while retaining Ours identity hooks and other settings. Existing Claude sessions need a plugin reload. For Codex, setup starts its App Server once with `codex app-server daemon start`. A start failure is reported directly; setup does not retry. Linux setup installs the user service `ours-fleet-native-codex.service` with `Restart=no`. Errors stop the watcher; inspect `journalctl --user -u ours-fleet-native-codex.service`, correct the reported problem and start it manually. Automatic service setup for other platforms is not provided.
|
|
112
|
+
|
|
113
|
+
Inspect sessions with `ours-fleet participation ls --json`. Revoke access with `ours-fleet participation disable`; stop discovery with `systemctl --user disable --now ours-fleet-native-codex.service`. Existing identity creation and retirement remain owned by the native Ours hooks.
|
|
114
|
+
|
|
115
|
+
Each terminal session must already have an Ours identity bound through its native integration. Fleet does not create one. Fresh automatic identity creation was not observed with the default 2.0.5 hook packages; use their existing identity tools before participation. Existing customized hooks are retained.
|
|
106
116
|
|
|
107
117
|
Nothing is prepared unless an Agent declares `managed_cli: [task-workflow]`. To opt agents in from the installer, name them:
|
|
108
118
|
|
package/assets/images.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"channel": "stable",
|
|
4
|
-
"installerVersion": "2.1
|
|
5
|
-
"commit": "
|
|
4
|
+
"installerVersion": "2.2.1",
|
|
5
|
+
"commit": "ed01bb606a9c7860c75249d6e688de9e857e2a6a",
|
|
6
6
|
"platform": "linux/amd64",
|
|
7
7
|
"variants": {
|
|
8
8
|
"server": {
|
|
9
|
-
"policySha256": "
|
|
9
|
+
"policySha256": "e8859809ca5ad4e767962bd1cadcba7e3a2399a99cf5bf81d85370630aef6473",
|
|
10
10
|
"runtime": {
|
|
11
11
|
"repository": "docker.io/adaptframework/ours-runtime",
|
|
12
|
-
"index": "sha256:
|
|
13
|
-
"manifest": "sha256:
|
|
14
|
-
"config": "sha256:
|
|
12
|
+
"index": "sha256:89b602cd365ed082065c62ff8ef77bed9445d724a84e739e5991b0f7622847b5",
|
|
13
|
+
"manifest": "sha256:08cac75b18f694452500215b5e0e4b7958eeab874fb6fc37ebb8a6aadadb3cf7",
|
|
14
|
+
"config": "sha256:78fbaf74acbdb25d58cb685cf142b0cfa1ae5d49c6e0c490ac9ef7f86f8bc73c"
|
|
15
15
|
},
|
|
16
16
|
"maintenance": {
|
|
17
17
|
"repository": "docker.io/adaptframework/ours-maintenance",
|
|
18
|
-
"index": "sha256:
|
|
19
|
-
"manifest": "sha256:
|
|
20
|
-
"config": "sha256:
|
|
18
|
+
"index": "sha256:d5c245ac858bc6921e8fa103219f1d655440bb8248d998e2b3beb7bdba5bba9b",
|
|
19
|
+
"manifest": "sha256:1783e913e2edc9db69b2937a3a187cb7e181e052d58249315b8944ac9ff53d2b",
|
|
20
|
+
"config": "sha256:e594fa5f9d110f7bb719aee8a242288ba93d0d43f86ec1f4be1b04e1761eb573"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"daemon": {
|
|
24
|
-
"policySha256": "
|
|
24
|
+
"policySha256": "73adab783b20fcb4d37ba7cbc176bec9ba8ba7556c732c78b48c6baeb25e0e8a",
|
|
25
25
|
"runtime": {
|
|
26
26
|
"repository": "docker.io/adaptframework/ours-runtime",
|
|
27
|
-
"index": "sha256:
|
|
28
|
-
"manifest": "sha256:
|
|
29
|
-
"config": "sha256:
|
|
27
|
+
"index": "sha256:7467716fcf79c28d9cbe5aaad62639d5b714462b9d87e40939e029d9eb5c3e5f",
|
|
28
|
+
"manifest": "sha256:1e972c676f607922184318d6ae9dd9ab6d49a40ba8fd82c3df10e5aee1929460",
|
|
29
|
+
"config": "sha256:b12e5295b1e6e63d427384c2857d40c9988c2f77ce98e7e5485503551dadc73a"
|
|
30
30
|
},
|
|
31
31
|
"maintenance": {
|
|
32
32
|
"repository": "docker.io/adaptframework/ours-maintenance",
|
|
33
|
-
"index": "sha256:
|
|
34
|
-
"manifest": "sha256:
|
|
35
|
-
"config": "sha256:
|
|
33
|
+
"index": "sha256:f0e155a196d231a02ffa7fe253eff4d101272a3e0ef9810cb203bad6fa394f73",
|
|
34
|
+
"manifest": "sha256:e648ea4ab4f24afd54df700104c79ed6bae113febc7be12d6497582bc578a9c9",
|
|
35
|
+
"config": "sha256:f51a1ac603e84d8cf71473815b29a7be50115a1ee15c3c4bb4b5b84a7cc8a753"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
package/assets/release-lock.json
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"name": "ours-release-set-verification",
|
|
9
9
|
"version": "0.0.0",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@ours.network/claude-code": "2.0.
|
|
11
|
+
"@ours.network/claude-code": "2.0.6",
|
|
12
12
|
"@ours.network/cli": "5.1.0",
|
|
13
|
-
"@ours.network/codex": "2.0.
|
|
13
|
+
"@ours.network/codex": "2.0.6",
|
|
14
14
|
"@ours.network/cowork": "2.0.4",
|
|
15
15
|
"@ours.network/daemon": "6.1.0",
|
|
16
|
-
"@ours.network/fleet": "2.4.
|
|
17
|
-
"@ours.network/mcp": "2.0.
|
|
16
|
+
"@ours.network/fleet": "2.4.2",
|
|
17
|
+
"@ours.network/mcp": "2.0.6",
|
|
18
18
|
"@ours.network/messenger-server": "2.0.4",
|
|
19
19
|
"@ours.network/notifications": "1.0.2",
|
|
20
20
|
"@ours.network/sdk": "6.1.0",
|
|
@@ -606,9 +606,9 @@
|
|
|
606
606
|
}
|
|
607
607
|
},
|
|
608
608
|
"node_modules/@babel/runtime": {
|
|
609
|
-
"version": "7.29.
|
|
610
|
-
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.
|
|
611
|
-
"integrity": "sha512-
|
|
609
|
+
"version": "7.29.17",
|
|
610
|
+
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.17.tgz",
|
|
611
|
+
"integrity": "sha512-CvlZdpED5dsu21yK0DfpXksJWt1zeW09lY49hp7P9cA5Qedx/QkwEs1PfluSJjijH9i94oT9LmtgGWlPY8ISzw==",
|
|
612
612
|
"license": "MIT",
|
|
613
613
|
"optional": true,
|
|
614
614
|
"peer": true,
|
|
@@ -976,13 +976,13 @@
|
|
|
976
976
|
}
|
|
977
977
|
},
|
|
978
978
|
"node_modules/@ours.network/claude-code": {
|
|
979
|
-
"version": "2.0.
|
|
980
|
-
"resolved": "https://registry.npmjs.org/@ours.network/claude-code/-/claude-code-2.0.
|
|
981
|
-
"integrity": "sha512-
|
|
979
|
+
"version": "2.0.6",
|
|
980
|
+
"resolved": "https://registry.npmjs.org/@ours.network/claude-code/-/claude-code-2.0.6.tgz",
|
|
981
|
+
"integrity": "sha512-yyqAK/1EhTFSTcnmxrM1nXbvjRFJWZjxd7gVRniOXzKC6P8YpDNcWXvEE5HGK8ShEL12fJIfSkm6M3WsEqu6ag==",
|
|
982
982
|
"license": "FSL-1.1-Apache-2.0",
|
|
983
983
|
"dependencies": {
|
|
984
984
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
985
|
-
"@ours.network/mcp": "2.0.
|
|
985
|
+
"@ours.network/mcp": "2.0.6",
|
|
986
986
|
"@ours.network/sdk": "6.1.0",
|
|
987
987
|
"ws": "^8.21.0",
|
|
988
988
|
"zod": "^3.25.76"
|
|
@@ -1007,13 +1007,13 @@
|
|
|
1007
1007
|
}
|
|
1008
1008
|
},
|
|
1009
1009
|
"node_modules/@ours.network/codex": {
|
|
1010
|
-
"version": "2.0.
|
|
1011
|
-
"resolved": "https://registry.npmjs.org/@ours.network/codex/-/codex-2.0.
|
|
1012
|
-
"integrity": "sha512-
|
|
1010
|
+
"version": "2.0.6",
|
|
1011
|
+
"resolved": "https://registry.npmjs.org/@ours.network/codex/-/codex-2.0.6.tgz",
|
|
1012
|
+
"integrity": "sha512-SzWBnfQrecvBvyqknusqbGaW5NnLrdUc1ieTzWGlGCP6Z0iV5NcnL4u6rovuwEoJF3732b2tow6JXHZ9jZuGRA==",
|
|
1013
1013
|
"license": "FSL-1.1-Apache-2.0",
|
|
1014
1014
|
"dependencies": {
|
|
1015
1015
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
1016
|
-
"@ours.network/mcp": "2.0.
|
|
1016
|
+
"@ours.network/mcp": "2.0.6",
|
|
1017
1017
|
"@ours.network/sdk": "6.1.0",
|
|
1018
1018
|
"ws": "^8.21.0",
|
|
1019
1019
|
"zod": "^3.25.76"
|
|
@@ -1070,15 +1070,15 @@
|
|
|
1070
1070
|
}
|
|
1071
1071
|
},
|
|
1072
1072
|
"node_modules/@ours.network/fleet": {
|
|
1073
|
-
"version": "2.4.
|
|
1074
|
-
"resolved": "https://registry.npmjs.org/@ours.network/fleet/-/fleet-2.4.
|
|
1075
|
-
"integrity": "sha512-
|
|
1073
|
+
"version": "2.4.2",
|
|
1074
|
+
"resolved": "https://registry.npmjs.org/@ours.network/fleet/-/fleet-2.4.2.tgz",
|
|
1075
|
+
"integrity": "sha512-RTaeiK1jTXkgBBi9tEzCjW4LDHo69ggENjy0O8sY0AG9KkKPSIQWrQYgBNhWBI5fRF6uOyo39jOQy3YhzBHbnQ==",
|
|
1076
1076
|
"license": "FSL-1.1-Apache-2.0",
|
|
1077
1077
|
"dependencies": {
|
|
1078
1078
|
"@agentclientprotocol/sdk": "^1.3.0",
|
|
1079
1079
|
"@fastify/websocket": "^11.2.0",
|
|
1080
1080
|
"@ours.network/cli": "5.1.0",
|
|
1081
|
-
"@ours.network/mcp": "2.0.
|
|
1081
|
+
"@ours.network/mcp": "2.0.6",
|
|
1082
1082
|
"@ours.network/sdk": "6.1.0",
|
|
1083
1083
|
"commander": "^12.1.0",
|
|
1084
1084
|
"fastify": "^5.4.0",
|
|
@@ -1109,9 +1109,9 @@
|
|
|
1109
1109
|
}
|
|
1110
1110
|
},
|
|
1111
1111
|
"node_modules/@ours.network/mcp": {
|
|
1112
|
-
"version": "2.0.
|
|
1113
|
-
"resolved": "https://registry.npmjs.org/@ours.network/mcp/-/mcp-2.0.
|
|
1114
|
-
"integrity": "sha512-
|
|
1112
|
+
"version": "2.0.6",
|
|
1113
|
+
"resolved": "https://registry.npmjs.org/@ours.network/mcp/-/mcp-2.0.6.tgz",
|
|
1114
|
+
"integrity": "sha512-JORF6vWgRoEQ+hwKxlhCC2usZ1LFr1WI5yeUJHGLPdY0SONoXYp778aQ3gl+7s7HTqwv6qKcJPhI154phfdIrg==",
|
|
1115
1115
|
"license": "FSL-1.1-Apache-2.0",
|
|
1116
1116
|
"dependencies": {
|
|
1117
1117
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
@@ -1224,6 +1224,79 @@
|
|
|
1224
1224
|
"optional": true,
|
|
1225
1225
|
"peer": true
|
|
1226
1226
|
},
|
|
1227
|
+
"node_modules/@stablelib/binary": {
|
|
1228
|
+
"version": "1.0.1",
|
|
1229
|
+
"resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz",
|
|
1230
|
+
"integrity": "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==",
|
|
1231
|
+
"license": "MIT",
|
|
1232
|
+
"optional": true,
|
|
1233
|
+
"peer": true,
|
|
1234
|
+
"dependencies": {
|
|
1235
|
+
"@stablelib/int": "^1.0.1"
|
|
1236
|
+
}
|
|
1237
|
+
},
|
|
1238
|
+
"node_modules/@stablelib/ed25519": {
|
|
1239
|
+
"version": "1.0.3",
|
|
1240
|
+
"resolved": "https://registry.npmjs.org/@stablelib/ed25519/-/ed25519-1.0.3.tgz",
|
|
1241
|
+
"integrity": "sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg==",
|
|
1242
|
+
"license": "MIT",
|
|
1243
|
+
"optional": true,
|
|
1244
|
+
"peer": true,
|
|
1245
|
+
"dependencies": {
|
|
1246
|
+
"@stablelib/random": "^1.0.2",
|
|
1247
|
+
"@stablelib/sha512": "^1.0.1",
|
|
1248
|
+
"@stablelib/wipe": "^1.0.1"
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
"node_modules/@stablelib/hash": {
|
|
1252
|
+
"version": "1.0.1",
|
|
1253
|
+
"resolved": "https://registry.npmjs.org/@stablelib/hash/-/hash-1.0.1.tgz",
|
|
1254
|
+
"integrity": "sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==",
|
|
1255
|
+
"license": "MIT",
|
|
1256
|
+
"optional": true,
|
|
1257
|
+
"peer": true
|
|
1258
|
+
},
|
|
1259
|
+
"node_modules/@stablelib/int": {
|
|
1260
|
+
"version": "1.0.1",
|
|
1261
|
+
"resolved": "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz",
|
|
1262
|
+
"integrity": "sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==",
|
|
1263
|
+
"license": "MIT",
|
|
1264
|
+
"optional": true,
|
|
1265
|
+
"peer": true
|
|
1266
|
+
},
|
|
1267
|
+
"node_modules/@stablelib/random": {
|
|
1268
|
+
"version": "1.0.2",
|
|
1269
|
+
"resolved": "https://registry.npmjs.org/@stablelib/random/-/random-1.0.2.tgz",
|
|
1270
|
+
"integrity": "sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==",
|
|
1271
|
+
"license": "MIT",
|
|
1272
|
+
"optional": true,
|
|
1273
|
+
"peer": true,
|
|
1274
|
+
"dependencies": {
|
|
1275
|
+
"@stablelib/binary": "^1.0.1",
|
|
1276
|
+
"@stablelib/wipe": "^1.0.1"
|
|
1277
|
+
}
|
|
1278
|
+
},
|
|
1279
|
+
"node_modules/@stablelib/sha512": {
|
|
1280
|
+
"version": "1.0.1",
|
|
1281
|
+
"resolved": "https://registry.npmjs.org/@stablelib/sha512/-/sha512-1.0.1.tgz",
|
|
1282
|
+
"integrity": "sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw==",
|
|
1283
|
+
"license": "MIT",
|
|
1284
|
+
"optional": true,
|
|
1285
|
+
"peer": true,
|
|
1286
|
+
"dependencies": {
|
|
1287
|
+
"@stablelib/binary": "^1.0.1",
|
|
1288
|
+
"@stablelib/hash": "^1.0.1",
|
|
1289
|
+
"@stablelib/wipe": "^1.0.1"
|
|
1290
|
+
}
|
|
1291
|
+
},
|
|
1292
|
+
"node_modules/@stablelib/wipe": {
|
|
1293
|
+
"version": "1.0.1",
|
|
1294
|
+
"resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz",
|
|
1295
|
+
"integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==",
|
|
1296
|
+
"license": "MIT",
|
|
1297
|
+
"optional": true,
|
|
1298
|
+
"peer": true
|
|
1299
|
+
},
|
|
1227
1300
|
"node_modules/abstract-logging": {
|
|
1228
1301
|
"version": "2.0.1",
|
|
1229
1302
|
"resolved": "https://registry.npmjs.org/abstract-logging/-/abstract-logging-2.0.1.tgz",
|
|
@@ -1943,9 +2016,9 @@
|
|
|
1943
2016
|
"license": "MIT"
|
|
1944
2017
|
},
|
|
1945
2018
|
"node_modules/fast-json-stringify": {
|
|
1946
|
-
"version": "7.3.
|
|
1947
|
-
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-7.3.
|
|
1948
|
-
"integrity": "sha512-
|
|
2019
|
+
"version": "7.3.12",
|
|
2020
|
+
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-7.3.12.tgz",
|
|
2021
|
+
"integrity": "sha512-o8lgW909IPeH9nontTtODLFYu18/YwyF8oJwuqtTj4mgOSXdYj5gcOR3Z4qqL9GCrxfL9xkfHj16mI0c90zXlQ==",
|
|
1949
2022
|
"funding": [
|
|
1950
2023
|
{
|
|
1951
2024
|
"type": "github",
|
|
@@ -3563,14 +3636,15 @@
|
|
|
3563
3636
|
}
|
|
3564
3637
|
},
|
|
3565
3638
|
"node_modules/standardwebhooks": {
|
|
3566
|
-
"version": "1.
|
|
3567
|
-
"resolved": "https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.
|
|
3568
|
-
"integrity": "sha512-
|
|
3639
|
+
"version": "1.4.1",
|
|
3640
|
+
"resolved": "https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.4.1.tgz",
|
|
3641
|
+
"integrity": "sha512-K1p/g4/3BBh3lQE/u9F3Oa5Do2+pN35JUaxJf2UL8I13tZpV22SZ+JPbgelyD/pikkjrRj9cNBB2rbKwpg0GFA==",
|
|
3569
3642
|
"license": "MIT",
|
|
3570
3643
|
"optional": true,
|
|
3571
3644
|
"peer": true,
|
|
3572
3645
|
"dependencies": {
|
|
3573
|
-
"@stablelib/base64": "^1.0.
|
|
3646
|
+
"@stablelib/base64": "^1.0.1",
|
|
3647
|
+
"@stablelib/ed25519": "^1.0.3",
|
|
3574
3648
|
"fast-sha256": "^1.3.0"
|
|
3575
3649
|
}
|
|
3576
3650
|
},
|
package/assets/release.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"channel": "stable",
|
|
4
|
-
"installerVersion": "2.1
|
|
4
|
+
"installerVersion": "2.2.1",
|
|
5
5
|
"packages": {
|
|
6
6
|
"@ours.network/sdk": {
|
|
7
7
|
"version": "6.1.0",
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
"integrity": "sha512-jqGvgzgyaYVqkROLZyzno6NzQyb6oszXATwmtukQ+ZrHVik86jQHGKvBDwa9ZvOVZEefmm+OhnQoLkXGcA/mwQ=="
|
|
29
29
|
},
|
|
30
30
|
"@ours.network/fleet": {
|
|
31
|
-
"version": "2.4.
|
|
32
|
-
"integrity": "sha512-
|
|
31
|
+
"version": "2.4.2",
|
|
32
|
+
"integrity": "sha512-RTaeiK1jTXkgBBi9tEzCjW4LDHo69ggENjy0O8sY0AG9KkKPSIQWrQYgBNhWBI5fRF6uOyo39jOQy3YhzBHbnQ=="
|
|
33
33
|
},
|
|
34
34
|
"@ours.network/mcp": {
|
|
35
|
-
"version": "2.0.
|
|
36
|
-
"integrity": "sha512-
|
|
35
|
+
"version": "2.0.6",
|
|
36
|
+
"integrity": "sha512-JORF6vWgRoEQ+hwKxlhCC2usZ1LFr1WI5yeUJHGLPdY0SONoXYp778aQ3gl+7s7HTqwv6qKcJPhI154phfdIrg=="
|
|
37
37
|
},
|
|
38
38
|
"@ours.network/codex": {
|
|
39
|
-
"version": "2.0.
|
|
40
|
-
"integrity": "sha512-
|
|
39
|
+
"version": "2.0.6",
|
|
40
|
+
"integrity": "sha512-SzWBnfQrecvBvyqknusqbGaW5NnLrdUc1ieTzWGlGCP6Z0iV5NcnL4u6rovuwEoJF3732b2tow6JXHZ9jZuGRA=="
|
|
41
41
|
},
|
|
42
42
|
"@ours.network/claude-code": {
|
|
43
|
-
"version": "2.0.
|
|
44
|
-
"integrity": "sha512-
|
|
43
|
+
"version": "2.0.6",
|
|
44
|
+
"integrity": "sha512-yyqAK/1EhTFSTcnmxrM1nXbvjRFJWZjxd7gVRniOXzKC6P8YpDNcWXvEE5HGK8ShEL12fJIfSkm6M3WsEqu6ag=="
|
|
45
45
|
},
|
|
46
46
|
"@ours.network/daemon": {
|
|
47
47
|
"version": "6.1.0",
|
package/assets/sources.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"release": {
|
|
3
3
|
"schema": 1,
|
|
4
4
|
"channel": "stable",
|
|
5
|
-
"installerVersion": "2.1
|
|
5
|
+
"installerVersion": "2.2.1",
|
|
6
6
|
"packages": {
|
|
7
7
|
"@ours.network/sdk": {
|
|
8
8
|
"version": "6.1.0",
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
"integrity": "sha512-jqGvgzgyaYVqkROLZyzno6NzQyb6oszXATwmtukQ+ZrHVik86jQHGKvBDwa9ZvOVZEefmm+OhnQoLkXGcA/mwQ=="
|
|
30
30
|
},
|
|
31
31
|
"@ours.network/fleet": {
|
|
32
|
-
"version": "2.4.
|
|
33
|
-
"integrity": "sha512-
|
|
32
|
+
"version": "2.4.2",
|
|
33
|
+
"integrity": "sha512-RTaeiK1jTXkgBBi9tEzCjW4LDHo69ggENjy0O8sY0AG9KkKPSIQWrQYgBNhWBI5fRF6uOyo39jOQy3YhzBHbnQ=="
|
|
34
34
|
},
|
|
35
35
|
"@ours.network/mcp": {
|
|
36
|
-
"version": "2.0.
|
|
37
|
-
"integrity": "sha512-
|
|
36
|
+
"version": "2.0.6",
|
|
37
|
+
"integrity": "sha512-JORF6vWgRoEQ+hwKxlhCC2usZ1LFr1WI5yeUJHGLPdY0SONoXYp778aQ3gl+7s7HTqwv6qKcJPhI154phfdIrg=="
|
|
38
38
|
},
|
|
39
39
|
"@ours.network/codex": {
|
|
40
|
-
"version": "2.0.
|
|
41
|
-
"integrity": "sha512-
|
|
40
|
+
"version": "2.0.6",
|
|
41
|
+
"integrity": "sha512-SzWBnfQrecvBvyqknusqbGaW5NnLrdUc1ieTzWGlGCP6Z0iV5NcnL4u6rovuwEoJF3732b2tow6JXHZ9jZuGRA=="
|
|
42
42
|
},
|
|
43
43
|
"@ours.network/claude-code": {
|
|
44
|
-
"version": "2.0.
|
|
45
|
-
"integrity": "sha512-
|
|
44
|
+
"version": "2.0.6",
|
|
45
|
+
"integrity": "sha512-yyqAK/1EhTFSTcnmxrM1nXbvjRFJWZjxd7gVRniOXzKC6P8YpDNcWXvEE5HGK8ShEL12fJIfSkm6M3WsEqu6ag=="
|
|
46
46
|
},
|
|
47
47
|
"@ours.network/daemon": {
|
|
48
48
|
"version": "6.1.0",
|
|
@@ -87,19 +87,19 @@
|
|
|
87
87
|
},
|
|
88
88
|
"@ours.network/fleet": {
|
|
89
89
|
"type": "npm",
|
|
90
|
-
"version": "2.4.
|
|
90
|
+
"version": "2.4.2"
|
|
91
91
|
},
|
|
92
92
|
"@ours.network/mcp": {
|
|
93
93
|
"type": "npm",
|
|
94
|
-
"version": "2.0.
|
|
94
|
+
"version": "2.0.6"
|
|
95
95
|
},
|
|
96
96
|
"@ours.network/codex": {
|
|
97
97
|
"type": "npm",
|
|
98
|
-
"version": "2.0.
|
|
98
|
+
"version": "2.0.6"
|
|
99
99
|
},
|
|
100
100
|
"@ours.network/claude-code": {
|
|
101
101
|
"type": "npm",
|
|
102
|
-
"version": "2.0.
|
|
102
|
+
"version": "2.0.6"
|
|
103
103
|
},
|
|
104
104
|
"@ours.network/daemon": {
|
|
105
105
|
"type": "npm",
|
package/lib/effects.mjs
CHANGED
|
@@ -1414,7 +1414,7 @@ export function networkEffects(effects) {
|
|
|
1414
1414
|
// Every client installation includes the native CLI and its SDK dependency.
|
|
1415
1415
|
const selected = clientPackageNames(integrations);
|
|
1416
1416
|
const packages = selectSourcePackages(manifest, 'client', selected);
|
|
1417
|
-
const selectionKey = JSON.stringify([hostCliOnly ? 'host-cli-private-v1' : 'host-cli-v1', configPath, ...(hostCliOnly ? [manifest] : []), ...(refresh ? [manifest, integrations] : [])]);
|
|
1417
|
+
const selectionKey = JSON.stringify([hostCliOnly ? 'host-cli-private-v1' : 'host-cli-v1', configPath, selected, ...(hostCliOnly ? [manifest] : []), ...(refresh ? [manifest, integrations] : [])]);
|
|
1418
1418
|
const root = join(home, '.ours-client-install', createHash('sha256').update(selectionKey).digest('hex').slice(0, 16));
|
|
1419
1419
|
const hasGit = Object.values(packages).some(selection => selection.source);
|
|
1420
1420
|
await effects.run('npm', ['--version']);
|
|
@@ -1455,7 +1455,7 @@ export function networkEffects(effects) {
|
|
|
1455
1455
|
writePrivateNew(join(root, '.packages-ready'), 'ready\n');
|
|
1456
1456
|
}
|
|
1457
1457
|
verifyReleaseGraph(root, manifest, { requiredPackages: Object.keys(packages) });
|
|
1458
|
-
if (
|
|
1458
|
+
if (selected.includes('fleet') && (gatewayServerUrl || readHostProfileFile(configPath)?.serverUrl)) {
|
|
1459
1459
|
let info;
|
|
1460
1460
|
try { info = JSON.parse(readFileSync(join(root, 'node_modules/@ours.network/fleet/dist/build-info.json'), 'utf8')); } catch {}
|
|
1461
1461
|
if (!Array.isArray(info?.capabilities) || !info.capabilities.includes('cowork.http-management-v1'))
|
|
@@ -1465,7 +1465,7 @@ export function networkEffects(effects) {
|
|
|
1465
1465
|
const cliPolicy = hostCliOnly ? null : hostCliPolicy(manifest);
|
|
1466
1466
|
// Local acquisition alone does not publish native commands. Use the user's
|
|
1467
1467
|
// configured npm prefix and retained dependency closure, including on retry.
|
|
1468
|
-
for (const name of
|
|
1468
|
+
for (const name of selected.filter(name => name === 'fleet' || name === 'codex')) {
|
|
1469
1469
|
await effects.run('npm', ['install', '--global', '--install-links=false', '--offline', '--ignore-scripts', '--no-audit', '--no-fund', join(root, 'node_modules', '@ours.network', name)]);
|
|
1470
1470
|
}
|
|
1471
1471
|
let cliBin = join(root, 'node_modules/.bin/ours');
|
|
@@ -1481,7 +1481,7 @@ export function networkEffects(effects) {
|
|
|
1481
1481
|
await publishClientCli(effects, join(root, 'node_modules', '@ours.network/cli'), { policy: manifest, isolated: hostCliOnly });
|
|
1482
1482
|
}
|
|
1483
1483
|
const localPackages = Object.fromEntries(integrations.filter(n => n !== 'fleet').map(name => [name, join(root, 'node_modules', '@ours.network', name)]));
|
|
1484
|
-
return { localPackages, packages: {}, cliBin, fleetBin:
|
|
1484
|
+
return { localPackages, packages: {}, cliBin, fleetBin: selected.includes('fleet') ? join(root, 'node_modules/.bin/ours-fleet') : null };
|
|
1485
1485
|
},
|
|
1486
1486
|
/** Capability tokens the given Fleet executable reports for itself; [] when it reports none. */
|
|
1487
1487
|
async fleetCapabilities(fleetBin, env = null) {
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { dirname, join, isAbsolute } from 'node:path';
|
|
2
|
+
import { installerFailure } from './diagnostics.mjs';
|
|
3
|
+
import { info, ok } from './ui.mjs';
|
|
4
|
+
import { shellQuote } from './extras.mjs';
|
|
5
|
+
|
|
6
|
+
export const NATIVE_CODEX_SERVICE = 'ours-fleet-native-codex.service';
|
|
7
|
+
const marker = '# Ours Fleet native terminal discovery';
|
|
8
|
+
const object = value => value && typeof value === 'object' && !Array.isArray(value);
|
|
9
|
+
const unitQuote = value => '"' + String(value).replaceAll('\\', '\\\\').replaceAll('"', '\\"').replaceAll('%', '%%') + '"';
|
|
10
|
+
|
|
11
|
+
// Replace only Fleet's generated participation hooks. Ours identity hooks and
|
|
12
|
+
// unrelated user hooks retain their order and content.
|
|
13
|
+
export function mergeNativeHooks(settings, addition) {
|
|
14
|
+
if (!object(settings) || !object(addition?.hooks) || (settings.hooks !== undefined && !object(settings.hooks)))
|
|
15
|
+
throw new Error('Claude settings or Fleet hook output is invalid; existing settings were retained.');
|
|
16
|
+
const hooks = { ...settings.hooks };
|
|
17
|
+
for (const [event, entries] of Object.entries(addition.hooks)) {
|
|
18
|
+
if (!Array.isArray(entries) || (hooks[event] !== undefined && !Array.isArray(hooks[event])))
|
|
19
|
+
throw new Error(`Claude ${event} hooks are invalid; existing settings were retained.`);
|
|
20
|
+
const retained = (hooks[event] ?? []).flatMap(entry => {
|
|
21
|
+
if (!Array.isArray(entry?.hooks)) return [entry];
|
|
22
|
+
const keep = entry.hooks.filter(hook => !(hook.type === 'command' && Array.isArray(hook.args)
|
|
23
|
+
&& hook.args.length === 3 && hook.args[1] === 'participation' && hook.args[2] === 'hook'));
|
|
24
|
+
return keep.length ? [{ ...entry, hooks: keep }] : [];
|
|
25
|
+
});
|
|
26
|
+
hooks[event] = [...retained, ...entries];
|
|
27
|
+
}
|
|
28
|
+
return { ...settings, hooks };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function nativeCodexUnit({ fleetEntry, profile, env = {} }) {
|
|
32
|
+
const selected = { ...env, OURS_CONFIG: profile };
|
|
33
|
+
if ([fleetEntry, ...Object.values(selected)].some(value => /[\r\n\0]/.test(String(value)))) throw new Error('Invalid newline in native discovery service configuration.');
|
|
34
|
+
return `${marker}\n# Profile: ${profile}\n[Unit]\nDescription=Ours Fleet terminal session discovery\n[Service]\nType=simple\n`
|
|
35
|
+
+ Object.entries(selected).map(([key, value]) => `Environment=${unitQuote(`${key}=${value}`)}\n`).join('')
|
|
36
|
+
+ `ExecStart=${unitQuote(process.execPath).replaceAll('$', () => '$$')} ${unitQuote(fleetEntry).replaceAll('$', () => '$$')} participation serve-codex\nRestart=no\n[Install]\nWantedBy=default.target\n`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Called after a complete client installation. Resolve the Human from the same
|
|
40
|
+
// installed profile; users never need to find or enter an internal CID.
|
|
41
|
+
export async function setupNativeSessions(command, effects, { fleetBin, cliBin, configPath, integrations }) {
|
|
42
|
+
const selected = integrations.filter(name => name === 'claude-code' || name === 'codex');
|
|
43
|
+
if (!selected.length) return { state: 'skipped' };
|
|
44
|
+
let identities;
|
|
45
|
+
try {
|
|
46
|
+
const result = await effects.run(cliBin, ['identity', 'list', '--json'], { env: { OURS_CONFIG: configPath } });
|
|
47
|
+
if (result.code !== undefined && result.code !== 0) throw new Error('identity lookup failed');
|
|
48
|
+
identities = JSON.parse(result.stdout);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
throw new Error(`Cannot read the Human identity for terminal sessions from ${configPath}: ${installerFailure(error)}. Check the saved workspace connection and complete workspace setup, then run the installer again.`);
|
|
51
|
+
}
|
|
52
|
+
if (!Array.isArray(identities)) throw new Error('The saved workspace returned an invalid identity list. Check the workspace connection, then run the installer again.');
|
|
53
|
+
const roots = identities.filter(row => row?.kind === 'root');
|
|
54
|
+
if (roots.length !== 1 || typeof roots[0].cid !== 'string' || !/^[0-9a-f]{64}$/i.test(roots[0].cid))
|
|
55
|
+
throw new Error(`Terminal sessions require one Human identity in the saved workspace; found ${roots.length}. Complete Human identity setup for this workspace, then run the installer again.`);
|
|
56
|
+
const humanCid = roots[0].cid;
|
|
57
|
+
const fleetEntry = effects.realpath(fleetBin);
|
|
58
|
+
if (!fleetEntry || !isAbsolute(fleetEntry)) throw new Error('Cannot locate the installed Fleet executable for native session setup.');
|
|
59
|
+
const env = { OURS_CONFIG: configPath };
|
|
60
|
+
const cli = (args, options = {}) => effects.run(fleetBin, args, { env, ...options });
|
|
61
|
+
const codex = selected.includes('codex');
|
|
62
|
+
const claude = selected.includes('claude-code');
|
|
63
|
+
let unitPath, unit;
|
|
64
|
+
if (codex) {
|
|
65
|
+
if (effects.platform.platform !== 'linux') throw new Error('Automatic Codex discovery service setup currently supports Linux. Run ours-fleet participation serve-codex manually on this platform.');
|
|
66
|
+
await effects.run('systemctl', ['--user', 'show-environment']);
|
|
67
|
+
// Starting the selected App Server is an installation action, not a
|
|
68
|
+
// response to a failed health check. Execute once; surface any failure.
|
|
69
|
+
try { await effects.run('codex', ['app-server', 'daemon', 'start'], { timeout: 30_000 }); }
|
|
70
|
+
catch (error) { throw new Error(`Could not start the Codex App Server: ${installerFailure(error)}. Check codex app-server daemon start, then run the installer again.`); }
|
|
71
|
+
unitPath = join(effects.home, '.config/systemd/user', NATIVE_CODEX_SERVICE);
|
|
72
|
+
const previous = effects.readText(unitPath);
|
|
73
|
+
if (previous !== null && (!previous.startsWith(marker + '\n') || !previous.includes(`# Profile: ${configPath}\n`)))
|
|
74
|
+
throw new Error(`${unitPath} belongs to another configuration; it was retained. Configure its discovery service manually.`);
|
|
75
|
+
const serviceEnv = Object.fromEntries(['PATH', 'CODEX_HOME', 'OURS_MCP_CONFIG'].filter(key => effects.env[key]).map(key => [key, effects.env[key]]));
|
|
76
|
+
unit = nativeCodexUnit({ fleetEntry, profile: configPath, env: serviceEnv });
|
|
77
|
+
}
|
|
78
|
+
let settingsPath, generatedHooks;
|
|
79
|
+
if (claude) {
|
|
80
|
+
settingsPath = join(effects.env.CLAUDE_CONFIG_DIR || join(effects.home, '.claude'), 'settings.json');
|
|
81
|
+
const existing = effects.readText(settingsPath);
|
|
82
|
+
generatedHooks = JSON.parse((await cli(['participation', 'hooks', 'claude'])).stdout);
|
|
83
|
+
mergeNativeHooks(existing === null ? {} : JSON.parse(existing), generatedHooks);
|
|
84
|
+
}
|
|
85
|
+
// Fleet validates the selected root through the existing daemon. It owns the
|
|
86
|
+
// participation grant; the installer does not create an identity.
|
|
87
|
+
await cli(['participation', 'enable', '--human-cid', humanCid, '--authorize-registration-and-wake', ...(codex ? ['--codex'] : [])]);
|
|
88
|
+
try {
|
|
89
|
+
if (claude) {
|
|
90
|
+
await effects.run('claude', ['plugin', 'install', 'ours-fleet-native', '--marketplace', join(dirname(dirname(fleetEntry)), 'contrib'), '--scope', 'user', '--json']);
|
|
91
|
+
// Plugin installation updates enabledPlugins in this same file. Merge into
|
|
92
|
+
// its current contents so that the newly installed plugin stays enabled.
|
|
93
|
+
const installed = effects.readText(settingsPath);
|
|
94
|
+
const settings = mergeNativeHooks(installed === null ? {} : JSON.parse(installed), generatedHooks);
|
|
95
|
+
effects.writeJson(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
96
|
+
effects.out(ok('Native Claude plugin and participation hooks installed. Existing identity hooks were retained. Reload existing Claude sessions.'));
|
|
97
|
+
}
|
|
98
|
+
if (codex) {
|
|
99
|
+
effects.writeJson(unitPath, unit);
|
|
100
|
+
await effects.run('systemctl', ['--user', 'daemon-reload']);
|
|
101
|
+
await effects.run('systemctl', ['--user', 'enable', NATIVE_CODEX_SERVICE]);
|
|
102
|
+
await effects.run('systemctl', ['--user', 'restart', NATIVE_CODEX_SERVICE]);
|
|
103
|
+
effects.out(ok(`Codex discovery service enabled. Errors stop it; inspect with journalctl --user -u ${NATIVE_CODEX_SERVICE}.`));
|
|
104
|
+
}
|
|
105
|
+
} catch (error) {
|
|
106
|
+
throw new Error(`Terminal sharing remains authorized, but setup did not complete: ${installerFailure(error)}. Re-run the same setup command to finish, or revoke sharing with OURS_CONFIG=${shellQuote(configPath)} ${shellQuote(fleetBin)} participation disable. No automatic recovery was attempted.`);
|
|
107
|
+
}
|
|
108
|
+
effects.out(info('Inspect terminal sessions with ours-fleet participation ls --json. Revoke sharing with ours-fleet participation disable.'));
|
|
109
|
+
return { state: 'configured' };
|
|
110
|
+
}
|
package/lib/orchestrate.mjs
CHANGED
|
@@ -48,6 +48,7 @@ import {
|
|
|
48
48
|
} from './marketplace.mjs';
|
|
49
49
|
import { USAGE } from './usage.mjs';
|
|
50
50
|
import { installerFailure } from './diagnostics.mjs';
|
|
51
|
+
import { setupNativeSessions } from './native-sessions.mjs';
|
|
51
52
|
import { ok, info, warn, heading, banner, box, c, progress } from './ui.mjs';
|
|
52
53
|
|
|
53
54
|
export const EXIT_OK = 0;
|
|
@@ -1761,6 +1762,12 @@ export async function runClientCommand(command, effects) {
|
|
|
1761
1762
|
summary.push(await runFleetPhase(args, effects, { target, isDefaultStateDir: false }));
|
|
1762
1763
|
}
|
|
1763
1764
|
const incomplete = integrations.filter(name => !summary.some(row => row.key === name && row.state === 'installed'));
|
|
1765
|
+
if (incomplete.length && integrations.some(name => ['codex', 'claude-code'].includes(name)))
|
|
1766
|
+
effects.out(warn(`Terminal session setup could not finish because these integrations are incomplete: ${incomplete.join(', ')}. Existing sharing settings were retained; finish those integrations, then re-run the same setup command.`));
|
|
1767
|
+
if (!incomplete.length && integrations.some(name => ['codex', 'claude-code'].includes(name))) {
|
|
1768
|
+
phase = 'Configure terminal session sharing';
|
|
1769
|
+
await setupNativeSessions(command, effects, { fleetBin: exactSuite.fleetBin, cliBin: exactSuite.cliBin, configPath: imported.configPath, integrations });
|
|
1770
|
+
}
|
|
1764
1771
|
if (effects.env.OURS_CONFIG && resolve(effects.env.OURS_CONFIG) !== imported.configPath)
|
|
1765
1772
|
effects.out(warn('This shell has an explicit OURS_CONFIG override. Unset it for new clients to use the saved default; installer did not edit your shell.'));
|
|
1766
1773
|
if (incomplete.length) {
|
package/lib/plan.mjs
CHANGED
|
@@ -477,5 +477,5 @@ export function consumerServiceState(text, service, platform) {
|
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
export function clientPackageNames(integrations) {
|
|
480
|
-
return [...new Set(['sdk', 'cli', ...(integrations.some(name => ['codex', 'claude-code'].includes(name)) ? ['mcp'] : []), ...integrations])];
|
|
480
|
+
return [...new Set(['sdk', 'cli', ...(integrations.some(name => ['codex', 'claude-code'].includes(name)) ? ['mcp', 'fleet'] : []), ...integrations])];
|
|
481
481
|
}
|
package/lib/removal-plan.mjs
CHANGED
|
@@ -32,7 +32,7 @@ export const CLAUDE_PLUGIN = 'ours@ours.network';
|
|
|
32
32
|
export const CLAUDE_MARKETPLACE = 'ours.network';
|
|
33
33
|
export const CODEX_PLUGIN = 'ours@ours-codex-marketplace';
|
|
34
34
|
export const CODEX_MARKETPLACE = 'ours-codex-marketplace';
|
|
35
|
-
export const FLEET_UNITS = ['ours-fleet.service', 'ours-fleet-web.service', 'ours-fleet-watchdogs.service'];
|
|
35
|
+
export const FLEET_UNITS = ['ours-fleet.service', 'ours-fleet-web.service', 'ours-fleet-watchdogs.service', 'ours-fleet-native-codex.service'];
|
|
36
36
|
const UUID = /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/;
|
|
37
37
|
const PROJECT = /^ours-[a-z0-9]+$/;
|
|
38
38
|
const GENERATION = /^[0-9a-f]{16}$/;
|
|
@@ -305,6 +305,7 @@ export function planRemoval(found, { home }) {
|
|
|
305
305
|
const claude = found.claude;
|
|
306
306
|
if (claude?.marketplace && !ownedMarketplace(claude.marketplace.path)) kept.push({ group: 'apps', label: `Claude Code marketplace "${CLAUDE_MARKETPLACE}"`, reason: `it points to ${claude.marketplace.path}, which this installer did not create` });
|
|
307
307
|
else if (claude) {
|
|
308
|
+
if (claude.nativePlugin) apps.push({ id: 'claude-native-plugin', group: 'apps', label: 'Fleet terminal plugin in Claude Code', type: 'command', command: ['claude', 'plugin', 'uninstall', 'ours-fleet-native@ours-fleet-experiment', '--scope', 'user'] });
|
|
308
309
|
if (claude.plugin) apps.push({ id: 'claude-plugin', group: 'apps', label: 'Ours plugin in Claude Code', type: 'command', command: ['claude', 'plugin', 'uninstall', CLAUDE_PLUGIN, '--scope', 'user'] });
|
|
309
310
|
if (claude.marketplace) apps.push({ id: 'claude-marketplace', group: 'apps', label: 'Ours plugin source in Claude Code', type: 'command', command: ['claude', 'plugin', 'marketplace', 'remove', CLAUDE_MARKETPLACE], after: ['claude-plugin'] });
|
|
310
311
|
if (claude.settingsEntries?.length) apps.push({ id: 'claude-settings', group: 'apps', label: `Ours entries in ${claude.settingsPath}`, type: 'claude-settings', path: claude.settingsPath, entries: claude.settingsEntries, after: ['claude-plugin', 'claude-marketplace'] });
|
package/lib/removal.mjs
CHANGED
|
@@ -170,12 +170,27 @@ export async function discoverFootprint(effects, { stateDirs = [], journal = nul
|
|
|
170
170
|
} catch { keep('programs', 'Global npm commands', 'npm is not available to check them', true); }
|
|
171
171
|
|
|
172
172
|
// Claude Code and Codex registrations.
|
|
173
|
-
const claudeSettingsPath = join(home, '.claude', 'settings.json');
|
|
173
|
+
const claudeSettingsPath = join(effects.env?.CLAUDE_CONFIG_DIR || join(home, '.claude'), 'settings.json');
|
|
174
174
|
const settingsText = effects.readText(claudeSettingsPath);
|
|
175
175
|
const settings = settingsText === null ? null : parseJsonc(settingsText, [], { allowTrailingComma: true });
|
|
176
176
|
const settingsEntries = [];
|
|
177
177
|
if (settings?.enabledPlugins && Object.hasOwn(settings.enabledPlugins, CLAUDE_PLUGIN)) settingsEntries.push(['enabledPlugins', CLAUDE_PLUGIN]);
|
|
178
178
|
if (settings?.extraKnownMarketplaces && Object.hasOwn(settings.extraKnownMarketplaces, CLAUDE_MARKETPLACE)) settingsEntries.push(['extraKnownMarketplaces', CLAUDE_MARKETPLACE]);
|
|
179
|
+
// Only the generated single-hook entries pointing into this installation.
|
|
180
|
+
// Descending indexes preserve the remaining entries during JSONC removal.
|
|
181
|
+
let nativeHooks = false;
|
|
182
|
+
for (const [event, entries] of Object.entries(settings?.hooks ?? {})) {
|
|
183
|
+
if (!Array.isArray(entries)) continue;
|
|
184
|
+
for (let index = entries.length - 1; index >= 0; index--) {
|
|
185
|
+
const hook = entries[index]?.hooks?.length === 1 ? entries[index].hooks[0] : null;
|
|
186
|
+
if (hook?.type === 'command' && hook.args?.length === 3 && hook.args[1] === 'participation'
|
|
187
|
+
&& hook.args[2] === 'hook' && within(hook.args[0], installRoot)) {
|
|
188
|
+
settingsEntries.push(['hooks', event, index]); nativeHooks = true;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (nativeHooks && settings?.enabledPlugins && Object.hasOwn(settings.enabledPlugins, 'ours-fleet-native@ours-fleet-experiment'))
|
|
193
|
+
settingsEntries.push(['enabledPlugins', 'ours-fleet-native@ours-fleet-experiment']);
|
|
179
194
|
const settingsMarketplacePath = settings?.extraKnownMarketplaces?.[CLAUDE_MARKETPLACE]?.source?.path ?? null;
|
|
180
195
|
let claude = null;
|
|
181
196
|
try {
|
|
@@ -186,7 +201,7 @@ export async function discoverFootprint(effects, { stateDirs = [], journal = nul
|
|
|
186
201
|
// Claude Code keeps its copy of the plugin after uninstalling it.
|
|
187
202
|
const cache = effects.stat(join(home, '.claude', 'plugins', 'cache', 'ours-network'))?.type === 'dir' ? join(home, '.claude', 'plugins', 'cache', 'ours-network') : null;
|
|
188
203
|
if (plugin || market || settingsEntries.length || cache) {
|
|
189
|
-
claude = { plugin: Boolean(plugin), marketplace: market || settingsMarketplacePath ? { path: market?.path ?? market?.installLocation ?? settingsMarketplacePath } : null, settingsPath: claudeSettingsPath, settingsEntries, cache };
|
|
204
|
+
claude = { plugin: Boolean(plugin), nativePlugin: nativeHooks && plugins.some(p => p?.id === 'ours-fleet-native@ours-fleet-experiment'), marketplace: market || settingsMarketplacePath ? { path: market?.path ?? market?.installLocation ?? settingsMarketplacePath } : null, settingsPath: claudeSettingsPath, settingsEntries, cache };
|
|
190
205
|
}
|
|
191
206
|
} catch {
|
|
192
207
|
if (settingsEntries.length || effects.stat(join(home, '.claude/plugins/cache/ours-network')))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ours.network/install",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The all-in-one ours.network installer: one shared daemon, MCP, cowork, Telegram, Fleet initialization, harness plugins, Human identity, progress UI, and guided next steps.",
|
|
6
6
|
"type": "module",
|