@ours.network/install 1.2.1-nightly.54 → 1.2.1-nightly.56
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/GATEWAY_SETUP.md +4 -4
- package/README.md +22 -10
- package/assets/release-lock.json +63 -63
- package/assets/release.json +27 -27
- package/assets/sources.json +38 -38
- package/lib/workspace-setup.mjs +24 -10
- package/package.json +1 -1
package/GATEWAY_SETUP.md
CHANGED
|
@@ -10,10 +10,10 @@ control local processes; they do not carry server management requests.
|
|
|
10
10
|
## Release availability
|
|
11
11
|
|
|
12
12
|
The nightly manifest selects one published dependency graph: SDK
|
|
13
|
-
`
|
|
14
|
-
Fleet `1.2.0-nightly.
|
|
15
|
-
Telegram `1.0.1-nightly.
|
|
16
|
-
`0.3.1-nightly.
|
|
13
|
+
`4.1.1-nightly.1`, CLI `3.1.1-nightly.1`, daemon `4.1.1-nightly.1`,
|
|
14
|
+
Fleet `1.2.0-nightly.73`, MCP/Codex/Claude Code `1.2.0-nightly.15`,
|
|
15
|
+
Telegram `1.0.1-nightly.13`, Messenger `1.0.31-nightly.22`, Notifications
|
|
16
|
+
`0.3.1-nightly.6`, and Cowork `1.3.4-nightly.20261017.1109a5a`. Exact archive checksums are retained in
|
|
17
17
|
`releases/nightly.json`; the host CLI uses the same SDK/CLI pair.
|
|
18
18
|
|
|
19
19
|
The coordinated installer release must include these pins before using the
|
package/README.md
CHANGED
|
@@ -182,12 +182,13 @@ runs beside the harnesses on the client machine and calls the daemon HTTP API.
|
|
|
182
182
|
Client commands report an unavailable server and never start one automatically.
|
|
183
183
|
|
|
184
184
|
The checked-in source policy and packed installer retain the existing server
|
|
185
|
-
release set (SDK `
|
|
186
|
-
`
|
|
187
|
-
`
|
|
185
|
+
release set (SDK `4.1.1-nightly.1`, CLI `3.1.1-nightly.1`, daemon
|
|
186
|
+
`4.1.1-nightly.1`). The isolated host CLI uses published SDK
|
|
187
|
+
`4.1.1-nightly.1` and CLI `3.1.1-nightly.1`, including the shared gateway
|
|
188
188
|
profile resolver. `releases/nightly.json` binds both selections to verified
|
|
189
|
-
SHA512 integrities.
|
|
190
|
-
|
|
189
|
+
SHA512 integrities. Fleet and the MCP harness packages are selected on the
|
|
190
|
+
same SDK/CLI graph; installer publication and rollout are separate steps, see
|
|
191
|
+
[GATEWAY_SETUP.md](GATEWAY_SETUP.md). Mixed or unselected nested ours
|
|
191
192
|
versions remain rejected within each selected graph. An explicit `--sources`
|
|
192
193
|
override remains available for development.
|
|
193
194
|
|
|
@@ -690,6 +691,8 @@ Fleet and Messenger task builds. Do not advertise it as available in `@latest`.
|
|
|
690
691
|
Use an owned private directory and a 0600 downloaded payload:
|
|
691
692
|
|
|
692
693
|
```sh
|
|
694
|
+
OURS_ACCOUNT_ORIGIN=https://accounts.example.com \
|
|
695
|
+
OURS_WORKSPACE_HOST=alice-home.workspaces.example.com \
|
|
693
696
|
node /absolute/task-ours-network/packages/installer/install.mjs \
|
|
694
697
|
--setup-workspace-file /absolute/private/workspace.payload \
|
|
695
698
|
--workspace-fleet-bin /absolute/task-ours-fleet/dist/cli.js \
|
|
@@ -719,9 +722,18 @@ Google/Cloudflare prerequisites and account-server setup. On uncertain enrollmen
|
|
|
719
722
|
check account status before requesting a new payload; do not reset identities or
|
|
720
723
|
replay a consumed invitation.
|
|
721
724
|
|
|
722
|
-
Workspace setup
|
|
723
|
-
account origin
|
|
724
|
-
the
|
|
725
|
+
Workspace setup requires the trusted invocation configuration `OURS_ACCOUNT_ORIGIN`
|
|
726
|
+
to name the exact HTTPS account origin. The generated App command also carries
|
|
727
|
+
`OURS_WORKSPACE_HOST`, the exact account-record hostname; it takes precedence over
|
|
728
|
+
`OURS_WORKSPACE_DOMAIN`. An operator bootstrap without an exact host may instead
|
|
729
|
+
configure `OURS_WORKSPACE_DOMAIN`, accepting one DNS label under that suffix. A
|
|
730
|
+
missing configuration has no historical-domain fallback. Never obtain these trust
|
|
731
|
+
values from a grant, redeemed envelope, or query. Grant origins are checked before
|
|
732
|
+
redemption; envelope origins and hosts are checked before setup/enrollment, and
|
|
733
|
+
the same trusted configuration is forwarded to Fleet. A v2 grant has no hostname.
|
|
734
|
+
|
|
735
|
+
To move an existing same workspace to another configured origin, obtain a fresh
|
|
736
|
+
payload from the moved account server, select that trusted origin explicitly, and add
|
|
725
737
|
`--workspace-migrate-app-origin`. Fleet verifies the signed binding receipt before
|
|
726
738
|
changing local origin trust, preserves identities/config/device records, and
|
|
727
739
|
restarts the runtime. An implicit origin change is rejected. Browser account
|
|
@@ -745,7 +757,7 @@ Existing installation records keep their ports and identities. A listener acquir
|
|
|
745
757
|
by another process after preflight still causes startup to fail safely; no foreign
|
|
746
758
|
process is stopped and no retained installation is silently moved.
|
|
747
759
|
|
|
748
|
-
Workspace setup pins Fleet `1.2.0-nightly.
|
|
760
|
+
Workspace setup pins Fleet `1.2.0-nightly.73` with its recorded registry integrity. This release includes first-time Fleet setup through the host API for the account App, direct App access to the workspace services with the device credential, v2 positional one-use grants and automatic QR/connection-code output from `ours-fleet setup-tunnel`, optional private file/stdin inputs for legacy v1 payloads, a separate `ours-fleet link-device` command for additional devices, host prerequisite checks before the one-time workspace proof (`setup-tunnel --check`), `setup-tunnel --resume` to finish a setup that stopped after the host saved its private pending setup record (not when the proof's answer was lost, or after the setup window expired with an unconfirmed non-default port), and persists the available Fleet loopback port used by the workspace tunnel. It also accepts a setup-generated configuration left behind after the host enrollment state was removed, runs the host Codex when it is at least as new as the packaged one, offers only the Codex models the signed-in account can use, and removes the temporary setup contact after confirmation. Fleet serves no pages and opens no browser: every screen is in the App. Fleet also serves the workspace notification routes, produces notifications through the server gateway with the imported producer credential, accepts the App's device credential on the notification presence socket so an open App receives no push, and defaults agent wakes to `monitor.interrupt: after_tool` (Hermes: no interrupt; role snapshots saved before this default keep no interrupt). Existing installation identities and configured ports remain retained; a retained-port collision fails safely.
|
|
749
761
|
|
|
750
762
|
### App tunnel setup prerelease sequencing
|
|
751
763
|
|
|
@@ -762,7 +774,7 @@ connection code automatically; the App checks readiness and opens the code field
|
|
|
762
774
|
Private `--file`/`--stdin` transports remain optional and are the only transports
|
|
763
775
|
for legacy v1 payloads with long-lived credentials.
|
|
764
776
|
|
|
765
|
-
The nightly installer release manifest selects published Fleet `1.2.0-nightly.
|
|
777
|
+
The nightly installer release manifest selects published Fleet `1.2.0-nightly.73`
|
|
766
778
|
and its actual registry integrity through the normal release manifest/source-policy
|
|
767
779
|
generators. This release includes v2 argument and private-input support. The former
|
|
768
780
|
nightly.41 selection predates this capability. Merge and publish the repinned
|
package/assets/release-lock.json
CHANGED
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
"name": "ours-release-set-verification",
|
|
9
9
|
"version": "0.0.0",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@ours.network/claude-code": "1.2.0-nightly.
|
|
12
|
-
"@ours.network/cli": "
|
|
13
|
-
"@ours.network/codex": "1.2.0-nightly.
|
|
14
|
-
"@ours.network/cowork": "1.3.4-nightly.
|
|
15
|
-
"@ours.network/daemon": "
|
|
16
|
-
"@ours.network/fleet": "1.2.0-nightly.
|
|
17
|
-
"@ours.network/mcp": "1.2.0-nightly.
|
|
18
|
-
"@ours.network/messenger-server": "1.0.31-nightly.
|
|
19
|
-
"@ours.network/notifications": "0.3.1-nightly.
|
|
20
|
-
"@ours.network/sdk": "
|
|
21
|
-
"@ours.network/tg-connector": "1.0.1-nightly.
|
|
11
|
+
"@ours.network/claude-code": "1.2.0-nightly.15",
|
|
12
|
+
"@ours.network/cli": "3.1.1-nightly.1",
|
|
13
|
+
"@ours.network/codex": "1.2.0-nightly.15",
|
|
14
|
+
"@ours.network/cowork": "1.3.4-nightly.20261017.1109a5a",
|
|
15
|
+
"@ours.network/daemon": "4.1.1-nightly.1",
|
|
16
|
+
"@ours.network/fleet": "1.2.0-nightly.73",
|
|
17
|
+
"@ours.network/mcp": "1.2.0-nightly.15",
|
|
18
|
+
"@ours.network/messenger-server": "1.0.31-nightly.22",
|
|
19
|
+
"@ours.network/notifications": "0.3.1-nightly.6",
|
|
20
|
+
"@ours.network/sdk": "4.1.1-nightly.1",
|
|
21
|
+
"@ours.network/tg-connector": "1.0.1-nightly.13"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"node_modules/@adapt-toolkit/sdk": {
|
|
@@ -936,14 +936,14 @@
|
|
|
936
936
|
}
|
|
937
937
|
},
|
|
938
938
|
"node_modules/@ours.network/claude-code": {
|
|
939
|
-
"version": "1.2.0-nightly.
|
|
940
|
-
"resolved": "https://registry.npmjs.org/@ours.network/claude-code/-/claude-code-1.2.0-nightly.
|
|
941
|
-
"integrity": "sha512-
|
|
939
|
+
"version": "1.2.0-nightly.15",
|
|
940
|
+
"resolved": "https://registry.npmjs.org/@ours.network/claude-code/-/claude-code-1.2.0-nightly.15.tgz",
|
|
941
|
+
"integrity": "sha512-ajMKFPuRGDXZgNx4yLfsxnf46g2yKJJ/zorO4PBIUK4MK8YINXPgiSqNPeWrHzvSEJPKRJdJxE0M5qz7BQ1IAg==",
|
|
942
942
|
"license": "FSL-1.1-Apache-2.0",
|
|
943
943
|
"dependencies": {
|
|
944
944
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
945
|
-
"@ours.network/mcp": "1.2.0-nightly.
|
|
946
|
-
"@ours.network/sdk": "
|
|
945
|
+
"@ours.network/mcp": "1.2.0-nightly.15",
|
|
946
|
+
"@ours.network/sdk": "4.1.1-nightly.1",
|
|
947
947
|
"ws": "^8.21.0",
|
|
948
948
|
"zod": "^3.25.76"
|
|
949
949
|
},
|
|
@@ -952,12 +952,12 @@
|
|
|
952
952
|
}
|
|
953
953
|
},
|
|
954
954
|
"node_modules/@ours.network/cli": {
|
|
955
|
-
"version": "
|
|
956
|
-
"resolved": "https://registry.npmjs.org/@ours.network/cli/-/cli-
|
|
957
|
-
"integrity": "sha512-
|
|
955
|
+
"version": "3.1.1-nightly.1",
|
|
956
|
+
"resolved": "https://registry.npmjs.org/@ours.network/cli/-/cli-3.1.1-nightly.1.tgz",
|
|
957
|
+
"integrity": "sha512-4LhkIlZWh6+V38Qd/PTaTvAfzY7PYu+q3yRAnjRef+Cgk6HEZatMpk1wL0ZbcrZrxhSvrHR0C82R0OyiXvChIg==",
|
|
958
958
|
"license": "FSL-1.1-Apache-2.0",
|
|
959
959
|
"dependencies": {
|
|
960
|
-
"@ours.network/sdk": "
|
|
960
|
+
"@ours.network/sdk": "4.1.1-nightly.1"
|
|
961
961
|
},
|
|
962
962
|
"bin": {
|
|
963
963
|
"ours": "dist/cli.js"
|
|
@@ -967,14 +967,14 @@
|
|
|
967
967
|
}
|
|
968
968
|
},
|
|
969
969
|
"node_modules/@ours.network/codex": {
|
|
970
|
-
"version": "1.2.0-nightly.
|
|
971
|
-
"resolved": "https://registry.npmjs.org/@ours.network/codex/-/codex-1.2.0-nightly.
|
|
972
|
-
"integrity": "sha512-
|
|
970
|
+
"version": "1.2.0-nightly.15",
|
|
971
|
+
"resolved": "https://registry.npmjs.org/@ours.network/codex/-/codex-1.2.0-nightly.15.tgz",
|
|
972
|
+
"integrity": "sha512-kw397GnjUCWSDBdgZV5R04hsTBt6qud2uczJXT79vk5Ui3AaINpCARzfFvEGprGBaIirKShgrWuCk+DpCXH46w==",
|
|
973
973
|
"license": "FSL-1.1-Apache-2.0",
|
|
974
974
|
"dependencies": {
|
|
975
975
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
976
|
-
"@ours.network/mcp": "1.2.0-nightly.
|
|
977
|
-
"@ours.network/sdk": "
|
|
976
|
+
"@ours.network/mcp": "1.2.0-nightly.15",
|
|
977
|
+
"@ours.network/sdk": "4.1.1-nightly.1",
|
|
978
978
|
"ws": "^8.21.0",
|
|
979
979
|
"zod": "^3.25.76"
|
|
980
980
|
},
|
|
@@ -987,12 +987,12 @@
|
|
|
987
987
|
}
|
|
988
988
|
},
|
|
989
989
|
"node_modules/@ours.network/cowork": {
|
|
990
|
-
"version": "1.3.4-nightly.
|
|
991
|
-
"resolved": "https://registry.npmjs.org/@ours.network/cowork/-/cowork-1.3.4-nightly.
|
|
992
|
-
"integrity": "sha512-
|
|
990
|
+
"version": "1.3.4-nightly.20261017.1109a5a",
|
|
991
|
+
"resolved": "https://registry.npmjs.org/@ours.network/cowork/-/cowork-1.3.4-nightly.20261017.1109a5a.tgz",
|
|
992
|
+
"integrity": "sha512-yOH/uL4vpp4bABmtfazO787epUNX6DX16J9yzLlx3y6DXEKF+kpqfLe2cD4xP1fVL+8LAZgIKCDTnzYk7Kfp3g==",
|
|
993
993
|
"license": "FSL-1.1-Apache-2.0",
|
|
994
994
|
"dependencies": {
|
|
995
|
-
"@ours.network/sdk": "
|
|
995
|
+
"@ours.network/sdk": "4.1.1-nightly.1",
|
|
996
996
|
"ajv": "8.20.0",
|
|
997
997
|
"better-sqlite3": "13.0.3",
|
|
998
998
|
"react": "18.3.1",
|
|
@@ -1007,14 +1007,14 @@
|
|
|
1007
1007
|
}
|
|
1008
1008
|
},
|
|
1009
1009
|
"node_modules/@ours.network/daemon": {
|
|
1010
|
-
"version": "
|
|
1011
|
-
"resolved": "https://registry.npmjs.org/@ours.network/daemon/-/daemon-
|
|
1012
|
-
"integrity": "sha512-
|
|
1010
|
+
"version": "4.1.1-nightly.1",
|
|
1011
|
+
"resolved": "https://registry.npmjs.org/@ours.network/daemon/-/daemon-4.1.1-nightly.1.tgz",
|
|
1012
|
+
"integrity": "sha512-MpY4asvoA5Elwh17bJr3q4xYV4dAAQ1v4QKHvlT9guq1Zyp3iPLb5kFu3MacEHhIGK6reZrn8lTzmrkg5rq5cA==",
|
|
1013
1013
|
"license": "FSL-1.1-Apache-2.0",
|
|
1014
1014
|
"dependencies": {
|
|
1015
1015
|
"@adapt-toolkit/sdk": "0.12.1",
|
|
1016
1016
|
"@adapt-toolkit/sdk-native": "0.12.1",
|
|
1017
|
-
"@ours.network/sdk": "
|
|
1017
|
+
"@ours.network/sdk": "4.1.1-nightly.1",
|
|
1018
1018
|
"ajv": "^8.20.0",
|
|
1019
1019
|
"pg": "^8.16.3",
|
|
1020
1020
|
"ws": "^8.22.0"
|
|
@@ -1030,16 +1030,16 @@
|
|
|
1030
1030
|
}
|
|
1031
1031
|
},
|
|
1032
1032
|
"node_modules/@ours.network/fleet": {
|
|
1033
|
-
"version": "1.2.0-nightly.
|
|
1034
|
-
"resolved": "https://registry.npmjs.org/@ours.network/fleet/-/fleet-1.2.0-nightly.
|
|
1035
|
-
"integrity": "sha512-
|
|
1033
|
+
"version": "1.2.0-nightly.73",
|
|
1034
|
+
"resolved": "https://registry.npmjs.org/@ours.network/fleet/-/fleet-1.2.0-nightly.73.tgz",
|
|
1035
|
+
"integrity": "sha512-x7KslH1al/oOjf43R90ksna7fQ0LGclAnuOdKdHUtjmPxX0ZzOCygbNsga2Ll7zEjSfbA91o0iVINJAcOhVQcg==",
|
|
1036
1036
|
"license": "FSL-1.1-Apache-2.0",
|
|
1037
1037
|
"dependencies": {
|
|
1038
1038
|
"@agentclientprotocol/sdk": "^1.3.0",
|
|
1039
1039
|
"@fastify/websocket": "^11.2.0",
|
|
1040
|
-
"@ours.network/cli": "
|
|
1041
|
-
"@ours.network/mcp": "1.2.0-nightly.
|
|
1042
|
-
"@ours.network/sdk": "
|
|
1040
|
+
"@ours.network/cli": "3.1.1-nightly.1",
|
|
1041
|
+
"@ours.network/mcp": "1.2.0-nightly.15",
|
|
1042
|
+
"@ours.network/sdk": "4.1.1-nightly.1",
|
|
1043
1043
|
"commander": "^12.1.0",
|
|
1044
1044
|
"fastify": "^5.4.0",
|
|
1045
1045
|
"qrcode": "1.5.4",
|
|
@@ -1069,13 +1069,13 @@
|
|
|
1069
1069
|
}
|
|
1070
1070
|
},
|
|
1071
1071
|
"node_modules/@ours.network/mcp": {
|
|
1072
|
-
"version": "1.2.0-nightly.
|
|
1073
|
-
"resolved": "https://registry.npmjs.org/@ours.network/mcp/-/mcp-1.2.0-nightly.
|
|
1074
|
-
"integrity": "sha512-
|
|
1072
|
+
"version": "1.2.0-nightly.15",
|
|
1073
|
+
"resolved": "https://registry.npmjs.org/@ours.network/mcp/-/mcp-1.2.0-nightly.15.tgz",
|
|
1074
|
+
"integrity": "sha512-FBdXrQqOdYr/dL31oWuMk10L9Wt8OILi3nHBoaxzxdwaGCsEy5Twq3lgOA96aUimuSNOO2a8Tek85rA/EDUnbg==",
|
|
1075
1075
|
"license": "FSL-1.1-Apache-2.0",
|
|
1076
1076
|
"dependencies": {
|
|
1077
1077
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
1078
|
-
"@ours.network/sdk": "
|
|
1078
|
+
"@ours.network/sdk": "4.1.1-nightly.1",
|
|
1079
1079
|
"zod": "^3.23.8"
|
|
1080
1080
|
},
|
|
1081
1081
|
"bin": {
|
|
@@ -1086,13 +1086,13 @@
|
|
|
1086
1086
|
}
|
|
1087
1087
|
},
|
|
1088
1088
|
"node_modules/@ours.network/messenger-server": {
|
|
1089
|
-
"version": "1.0.31-nightly.
|
|
1090
|
-
"resolved": "https://registry.npmjs.org/@ours.network/messenger-server/-/messenger-server-1.0.31-nightly.
|
|
1091
|
-
"integrity": "sha512-
|
|
1089
|
+
"version": "1.0.31-nightly.22",
|
|
1090
|
+
"resolved": "https://registry.npmjs.org/@ours.network/messenger-server/-/messenger-server-1.0.31-nightly.22.tgz",
|
|
1091
|
+
"integrity": "sha512-XpRgKfyspyB6uQyLNmBee00zHTHP3usJvAO1e1zQXHQbpWuuj1YSAXVVr3cfrGqXdcYbDDZ27Y4pUbjzQ55mUg==",
|
|
1092
1092
|
"license": "FSL-1.1-Apache-2.0",
|
|
1093
1093
|
"dependencies": {
|
|
1094
1094
|
"@eslint-community/regexpp": "4.12.2",
|
|
1095
|
-
"@ours.network/sdk": "
|
|
1095
|
+
"@ours.network/sdk": "4.1.1-nightly.1",
|
|
1096
1096
|
"parse5": "^8.0.1",
|
|
1097
1097
|
"web-push": "^3.6.7",
|
|
1098
1098
|
"ws": "^8.21.0"
|
|
@@ -1105,9 +1105,9 @@
|
|
|
1105
1105
|
}
|
|
1106
1106
|
},
|
|
1107
1107
|
"node_modules/@ours.network/notifications": {
|
|
1108
|
-
"version": "0.3.1-nightly.
|
|
1109
|
-
"resolved": "https://registry.npmjs.org/@ours.network/notifications/-/notifications-0.3.1-nightly.
|
|
1110
|
-
"integrity": "sha512-
|
|
1108
|
+
"version": "0.3.1-nightly.6",
|
|
1109
|
+
"resolved": "https://registry.npmjs.org/@ours.network/notifications/-/notifications-0.3.1-nightly.6.tgz",
|
|
1110
|
+
"integrity": "sha512-ydLGi7RpJkrSis2Q3youemilwTEJB3xR9h7SzNJxb3q3PDCw9wJpCIQjDylYjGNwVHRKoxqxzybi1+xUyARz1w==",
|
|
1111
1111
|
"license": "FSL-1.1-Apache-2.0",
|
|
1112
1112
|
"dependencies": {
|
|
1113
1113
|
"web-push": "3.6.7",
|
|
@@ -1121,9 +1121,9 @@
|
|
|
1121
1121
|
}
|
|
1122
1122
|
},
|
|
1123
1123
|
"node_modules/@ours.network/sdk": {
|
|
1124
|
-
"version": "
|
|
1125
|
-
"resolved": "https://registry.npmjs.org/@ours.network/sdk/-/sdk-
|
|
1126
|
-
"integrity": "sha512-
|
|
1124
|
+
"version": "4.1.1-nightly.1",
|
|
1125
|
+
"resolved": "https://registry.npmjs.org/@ours.network/sdk/-/sdk-4.1.1-nightly.1.tgz",
|
|
1126
|
+
"integrity": "sha512-IL9n7mP6CjXCms4gaJYHWdQ/Ube75i4dY7qpcYPhBA9CWZd2NVF1ZCtQam/FWa8KZKmwNPDec2xZ/vHAaJ7rcg==",
|
|
1127
1127
|
"license": "FSL-1.1-Apache-2.0",
|
|
1128
1128
|
"workspaces": [
|
|
1129
1129
|
".",
|
|
@@ -1134,12 +1134,12 @@
|
|
|
1134
1134
|
}
|
|
1135
1135
|
},
|
|
1136
1136
|
"node_modules/@ours.network/tg-connector": {
|
|
1137
|
-
"version": "1.0.1-nightly.
|
|
1138
|
-
"resolved": "https://registry.npmjs.org/@ours.network/tg-connector/-/tg-connector-1.0.1-nightly.
|
|
1139
|
-
"integrity": "sha512-
|
|
1137
|
+
"version": "1.0.1-nightly.13",
|
|
1138
|
+
"resolved": "https://registry.npmjs.org/@ours.network/tg-connector/-/tg-connector-1.0.1-nightly.13.tgz",
|
|
1139
|
+
"integrity": "sha512-GbE9LRVPpoY9EsNoRpybBJqFYOOM/ZPYzxpUeKgAmT2hVucZZof5VnO17UAUK934AVW4VGNLB9BNMx9Dk3Onkg==",
|
|
1140
1140
|
"license": "FSL-1.1-Apache-2.0",
|
|
1141
1141
|
"dependencies": {
|
|
1142
|
-
"@ours.network/sdk": "
|
|
1142
|
+
"@ours.network/sdk": "4.1.1-nightly.1",
|
|
1143
1143
|
"undici": "^7.28.0"
|
|
1144
1144
|
},
|
|
1145
1145
|
"bin": {
|
|
@@ -3168,9 +3168,9 @@
|
|
|
3168
3168
|
"license": "ISC"
|
|
3169
3169
|
},
|
|
3170
3170
|
"node_modules/ret": {
|
|
3171
|
-
"version": "0.5.
|
|
3172
|
-
"resolved": "https://registry.npmjs.org/ret/-/ret-0.5.
|
|
3173
|
-
"integrity": "sha512-
|
|
3171
|
+
"version": "0.5.1",
|
|
3172
|
+
"resolved": "https://registry.npmjs.org/ret/-/ret-0.5.1.tgz",
|
|
3173
|
+
"integrity": "sha512-Z/nyvABwcRnRD2mMP7Kz6G1dFZZqX1mNErOnxF42OCQKE07b9k9hK9SQxHL3LFEZUdzQaLM4dId1E/E6Vm4WhA==",
|
|
3174
3174
|
"license": "MIT",
|
|
3175
3175
|
"engines": {
|
|
3176
3176
|
"node": ">=10"
|
|
@@ -3367,9 +3367,9 @@
|
|
|
3367
3367
|
"license": "ISC"
|
|
3368
3368
|
},
|
|
3369
3369
|
"node_modules/set-cookie-parser": {
|
|
3370
|
-
"version": "3.1.
|
|
3371
|
-
"resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-3.1.
|
|
3372
|
-
"integrity": "sha512-
|
|
3370
|
+
"version": "3.1.4",
|
|
3371
|
+
"resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-3.1.4.tgz",
|
|
3372
|
+
"integrity": "sha512-iEmdEew+Tn1BwMGMP8LzGBEPC7Mf1sySjglCeEPb/Vchm9bnGezePvacYcId+fGprQzIng+TBkzqfJ/qS7AsBg==",
|
|
3373
3373
|
"license": "MIT"
|
|
3374
3374
|
},
|
|
3375
3375
|
"node_modules/setprototypeof": {
|
package/assets/release.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"channel": "nightly",
|
|
4
|
-
"installerVersion": "1.2.1-nightly.
|
|
4
|
+
"installerVersion": "1.2.1-nightly.56",
|
|
5
5
|
"packages": {
|
|
6
6
|
"@ours.network/sdk": {
|
|
7
|
-
"version": "
|
|
8
|
-
"integrity": "sha512-
|
|
7
|
+
"version": "4.1.1-nightly.1",
|
|
8
|
+
"integrity": "sha512-IL9n7mP6CjXCms4gaJYHWdQ/Ube75i4dY7qpcYPhBA9CWZd2NVF1ZCtQam/FWa8KZKmwNPDec2xZ/vHAaJ7rcg=="
|
|
9
9
|
},
|
|
10
10
|
"@ours.network/cli": {
|
|
11
|
-
"version": "
|
|
12
|
-
"integrity": "sha512-
|
|
11
|
+
"version": "3.1.1-nightly.1",
|
|
12
|
+
"integrity": "sha512-4LhkIlZWh6+V38Qd/PTaTvAfzY7PYu+q3yRAnjRef+Cgk6HEZatMpk1wL0ZbcrZrxhSvrHR0C82R0OyiXvChIg=="
|
|
13
13
|
},
|
|
14
14
|
"@ours.network/tg-connector": {
|
|
15
|
-
"version": "1.0.1-nightly.
|
|
16
|
-
"integrity": "sha512-
|
|
15
|
+
"version": "1.0.1-nightly.13",
|
|
16
|
+
"integrity": "sha512-GbE9LRVPpoY9EsNoRpybBJqFYOOM/ZPYzxpUeKgAmT2hVucZZof5VnO17UAUK934AVW4VGNLB9BNMx9Dk3Onkg=="
|
|
17
17
|
},
|
|
18
18
|
"@ours.network/cowork": {
|
|
19
|
-
"version": "1.3.4-nightly.
|
|
20
|
-
"integrity": "sha512-
|
|
19
|
+
"version": "1.3.4-nightly.20261017.1109a5a",
|
|
20
|
+
"integrity": "sha512-yOH/uL4vpp4bABmtfazO787epUNX6DX16J9yzLlx3y6DXEKF+kpqfLe2cD4xP1fVL+8LAZgIKCDTnzYk7Kfp3g=="
|
|
21
21
|
},
|
|
22
22
|
"@ours.network/messenger-server": {
|
|
23
|
-
"version": "1.0.31-nightly.
|
|
24
|
-
"integrity": "sha512-
|
|
23
|
+
"version": "1.0.31-nightly.22",
|
|
24
|
+
"integrity": "sha512-XpRgKfyspyB6uQyLNmBee00zHTHP3usJvAO1e1zQXHQbpWuuj1YSAXVVr3cfrGqXdcYbDDZ27Y4pUbjzQ55mUg=="
|
|
25
25
|
},
|
|
26
26
|
"@ours.network/notifications": {
|
|
27
|
-
"version": "0.3.1-nightly.
|
|
28
|
-
"integrity": "sha512-
|
|
27
|
+
"version": "0.3.1-nightly.6",
|
|
28
|
+
"integrity": "sha512-ydLGi7RpJkrSis2Q3youemilwTEJB3xR9h7SzNJxb3q3PDCw9wJpCIQjDylYjGNwVHRKoxqxzybi1+xUyARz1w=="
|
|
29
29
|
},
|
|
30
30
|
"@ours.network/fleet": {
|
|
31
|
-
"version": "1.2.0-nightly.
|
|
32
|
-
"integrity": "sha512-
|
|
31
|
+
"version": "1.2.0-nightly.73",
|
|
32
|
+
"integrity": "sha512-x7KslH1al/oOjf43R90ksna7fQ0LGclAnuOdKdHUtjmPxX0ZzOCygbNsga2Ll7zEjSfbA91o0iVINJAcOhVQcg=="
|
|
33
33
|
},
|
|
34
34
|
"@ours.network/mcp": {
|
|
35
|
-
"version": "1.2.0-nightly.
|
|
36
|
-
"integrity": "sha512-
|
|
35
|
+
"version": "1.2.0-nightly.15",
|
|
36
|
+
"integrity": "sha512-FBdXrQqOdYr/dL31oWuMk10L9Wt8OILi3nHBoaxzxdwaGCsEy5Twq3lgOA96aUimuSNOO2a8Tek85rA/EDUnbg=="
|
|
37
37
|
},
|
|
38
38
|
"@ours.network/codex": {
|
|
39
|
-
"version": "1.2.0-nightly.
|
|
40
|
-
"integrity": "sha512-
|
|
39
|
+
"version": "1.2.0-nightly.15",
|
|
40
|
+
"integrity": "sha512-kw397GnjUCWSDBdgZV5R04hsTBt6qud2uczJXT79vk5Ui3AaINpCARzfFvEGprGBaIirKShgrWuCk+DpCXH46w=="
|
|
41
41
|
},
|
|
42
42
|
"@ours.network/claude-code": {
|
|
43
|
-
"version": "1.2.0-nightly.
|
|
44
|
-
"integrity": "sha512-
|
|
43
|
+
"version": "1.2.0-nightly.15",
|
|
44
|
+
"integrity": "sha512-ajMKFPuRGDXZgNx4yLfsxnf46g2yKJJ/zorO4PBIUK4MK8YINXPgiSqNPeWrHzvSEJPKRJdJxE0M5qz7BQ1IAg=="
|
|
45
45
|
},
|
|
46
46
|
"@ours.network/daemon": {
|
|
47
|
-
"version": "
|
|
48
|
-
"integrity": "sha512-
|
|
47
|
+
"version": "4.1.1-nightly.1",
|
|
48
|
+
"integrity": "sha512-MpY4asvoA5Elwh17bJr3q4xYV4dAAQ1v4QKHvlT9guq1Zyp3iPLb5kFu3MacEHhIGK6reZrn8lTzmrkg5rq5cA=="
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"hostCli": {
|
|
52
52
|
"@ours.network/sdk": {
|
|
53
|
-
"version": "
|
|
54
|
-
"integrity": "sha512-
|
|
53
|
+
"version": "4.1.1-nightly.1",
|
|
54
|
+
"integrity": "sha512-IL9n7mP6CjXCms4gaJYHWdQ/Ube75i4dY7qpcYPhBA9CWZd2NVF1ZCtQam/FWa8KZKmwNPDec2xZ/vHAaJ7rcg=="
|
|
55
55
|
},
|
|
56
56
|
"@ours.network/cli": {
|
|
57
|
-
"version": "
|
|
58
|
-
"integrity": "sha512-
|
|
57
|
+
"version": "3.1.1-nightly.1",
|
|
58
|
+
"integrity": "sha512-4LhkIlZWh6+V38Qd/PTaTvAfzY7PYu+q3yRAnjRef+Cgk6HEZatMpk1wL0ZbcrZrxhSvrHR0C82R0OyiXvChIg=="
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
package/assets/sources.json
CHANGED
|
@@ -2,108 +2,108 @@
|
|
|
2
2
|
"release": {
|
|
3
3
|
"schema": 1,
|
|
4
4
|
"channel": "nightly",
|
|
5
|
-
"installerVersion": "1.2.1-nightly.
|
|
5
|
+
"installerVersion": "1.2.1-nightly.56",
|
|
6
6
|
"packages": {
|
|
7
7
|
"@ours.network/sdk": {
|
|
8
|
-
"version": "
|
|
9
|
-
"integrity": "sha512-
|
|
8
|
+
"version": "4.1.1-nightly.1",
|
|
9
|
+
"integrity": "sha512-IL9n7mP6CjXCms4gaJYHWdQ/Ube75i4dY7qpcYPhBA9CWZd2NVF1ZCtQam/FWa8KZKmwNPDec2xZ/vHAaJ7rcg=="
|
|
10
10
|
},
|
|
11
11
|
"@ours.network/cli": {
|
|
12
|
-
"version": "
|
|
13
|
-
"integrity": "sha512-
|
|
12
|
+
"version": "3.1.1-nightly.1",
|
|
13
|
+
"integrity": "sha512-4LhkIlZWh6+V38Qd/PTaTvAfzY7PYu+q3yRAnjRef+Cgk6HEZatMpk1wL0ZbcrZrxhSvrHR0C82R0OyiXvChIg=="
|
|
14
14
|
},
|
|
15
15
|
"@ours.network/tg-connector": {
|
|
16
|
-
"version": "1.0.1-nightly.
|
|
17
|
-
"integrity": "sha512-
|
|
16
|
+
"version": "1.0.1-nightly.13",
|
|
17
|
+
"integrity": "sha512-GbE9LRVPpoY9EsNoRpybBJqFYOOM/ZPYzxpUeKgAmT2hVucZZof5VnO17UAUK934AVW4VGNLB9BNMx9Dk3Onkg=="
|
|
18
18
|
},
|
|
19
19
|
"@ours.network/cowork": {
|
|
20
|
-
"version": "1.3.4-nightly.
|
|
21
|
-
"integrity": "sha512-
|
|
20
|
+
"version": "1.3.4-nightly.20261017.1109a5a",
|
|
21
|
+
"integrity": "sha512-yOH/uL4vpp4bABmtfazO787epUNX6DX16J9yzLlx3y6DXEKF+kpqfLe2cD4xP1fVL+8LAZgIKCDTnzYk7Kfp3g=="
|
|
22
22
|
},
|
|
23
23
|
"@ours.network/messenger-server": {
|
|
24
|
-
"version": "1.0.31-nightly.
|
|
25
|
-
"integrity": "sha512-
|
|
24
|
+
"version": "1.0.31-nightly.22",
|
|
25
|
+
"integrity": "sha512-XpRgKfyspyB6uQyLNmBee00zHTHP3usJvAO1e1zQXHQbpWuuj1YSAXVVr3cfrGqXdcYbDDZ27Y4pUbjzQ55mUg=="
|
|
26
26
|
},
|
|
27
27
|
"@ours.network/notifications": {
|
|
28
|
-
"version": "0.3.1-nightly.
|
|
29
|
-
"integrity": "sha512-
|
|
28
|
+
"version": "0.3.1-nightly.6",
|
|
29
|
+
"integrity": "sha512-ydLGi7RpJkrSis2Q3youemilwTEJB3xR9h7SzNJxb3q3PDCw9wJpCIQjDylYjGNwVHRKoxqxzybi1+xUyARz1w=="
|
|
30
30
|
},
|
|
31
31
|
"@ours.network/fleet": {
|
|
32
|
-
"version": "1.2.0-nightly.
|
|
33
|
-
"integrity": "sha512-
|
|
32
|
+
"version": "1.2.0-nightly.73",
|
|
33
|
+
"integrity": "sha512-x7KslH1al/oOjf43R90ksna7fQ0LGclAnuOdKdHUtjmPxX0ZzOCygbNsga2Ll7zEjSfbA91o0iVINJAcOhVQcg=="
|
|
34
34
|
},
|
|
35
35
|
"@ours.network/mcp": {
|
|
36
|
-
"version": "1.2.0-nightly.
|
|
37
|
-
"integrity": "sha512-
|
|
36
|
+
"version": "1.2.0-nightly.15",
|
|
37
|
+
"integrity": "sha512-FBdXrQqOdYr/dL31oWuMk10L9Wt8OILi3nHBoaxzxdwaGCsEy5Twq3lgOA96aUimuSNOO2a8Tek85rA/EDUnbg=="
|
|
38
38
|
},
|
|
39
39
|
"@ours.network/codex": {
|
|
40
|
-
"version": "1.2.0-nightly.
|
|
41
|
-
"integrity": "sha512-
|
|
40
|
+
"version": "1.2.0-nightly.15",
|
|
41
|
+
"integrity": "sha512-kw397GnjUCWSDBdgZV5R04hsTBt6qud2uczJXT79vk5Ui3AaINpCARzfFvEGprGBaIirKShgrWuCk+DpCXH46w=="
|
|
42
42
|
},
|
|
43
43
|
"@ours.network/claude-code": {
|
|
44
|
-
"version": "1.2.0-nightly.
|
|
45
|
-
"integrity": "sha512-
|
|
44
|
+
"version": "1.2.0-nightly.15",
|
|
45
|
+
"integrity": "sha512-ajMKFPuRGDXZgNx4yLfsxnf46g2yKJJ/zorO4PBIUK4MK8YINXPgiSqNPeWrHzvSEJPKRJdJxE0M5qz7BQ1IAg=="
|
|
46
46
|
},
|
|
47
47
|
"@ours.network/daemon": {
|
|
48
|
-
"version": "
|
|
49
|
-
"integrity": "sha512-
|
|
48
|
+
"version": "4.1.1-nightly.1",
|
|
49
|
+
"integrity": "sha512-MpY4asvoA5Elwh17bJr3q4xYV4dAAQ1v4QKHvlT9guq1Zyp3iPLb5kFu3MacEHhIGK6reZrn8lTzmrkg5rq5cA=="
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"hostCli": {
|
|
53
53
|
"@ours.network/sdk": {
|
|
54
|
-
"version": "
|
|
55
|
-
"integrity": "sha512-
|
|
54
|
+
"version": "4.1.1-nightly.1",
|
|
55
|
+
"integrity": "sha512-IL9n7mP6CjXCms4gaJYHWdQ/Ube75i4dY7qpcYPhBA9CWZd2NVF1ZCtQam/FWa8KZKmwNPDec2xZ/vHAaJ7rcg=="
|
|
56
56
|
},
|
|
57
57
|
"@ours.network/cli": {
|
|
58
|
-
"version": "
|
|
59
|
-
"integrity": "sha512-
|
|
58
|
+
"version": "3.1.1-nightly.1",
|
|
59
|
+
"integrity": "sha512-4LhkIlZWh6+V38Qd/PTaTvAfzY7PYu+q3yRAnjRef+Cgk6HEZatMpk1wL0ZbcrZrxhSvrHR0C82R0OyiXvChIg=="
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"packages": {
|
|
64
64
|
"@ours.network/sdk": {
|
|
65
65
|
"type": "npm",
|
|
66
|
-
"version": "
|
|
66
|
+
"version": "4.1.1-nightly.1"
|
|
67
67
|
},
|
|
68
68
|
"@ours.network/cli": {
|
|
69
69
|
"type": "npm",
|
|
70
|
-
"version": "
|
|
70
|
+
"version": "3.1.1-nightly.1"
|
|
71
71
|
},
|
|
72
72
|
"@ours.network/tg-connector": {
|
|
73
73
|
"type": "npm",
|
|
74
|
-
"version": "1.0.1-nightly.
|
|
74
|
+
"version": "1.0.1-nightly.13"
|
|
75
75
|
},
|
|
76
76
|
"@ours.network/cowork": {
|
|
77
77
|
"type": "npm",
|
|
78
|
-
"version": "1.3.4-nightly.
|
|
78
|
+
"version": "1.3.4-nightly.20261017.1109a5a"
|
|
79
79
|
},
|
|
80
80
|
"@ours.network/messenger-server": {
|
|
81
81
|
"type": "npm",
|
|
82
|
-
"version": "1.0.31-nightly.
|
|
82
|
+
"version": "1.0.31-nightly.22"
|
|
83
83
|
},
|
|
84
84
|
"@ours.network/notifications": {
|
|
85
85
|
"type": "npm",
|
|
86
|
-
"version": "0.3.1-nightly.
|
|
86
|
+
"version": "0.3.1-nightly.6"
|
|
87
87
|
},
|
|
88
88
|
"@ours.network/fleet": {
|
|
89
89
|
"type": "npm",
|
|
90
|
-
"version": "1.2.0-nightly.
|
|
90
|
+
"version": "1.2.0-nightly.73"
|
|
91
91
|
},
|
|
92
92
|
"@ours.network/mcp": {
|
|
93
93
|
"type": "npm",
|
|
94
|
-
"version": "1.2.0-nightly.
|
|
94
|
+
"version": "1.2.0-nightly.15"
|
|
95
95
|
},
|
|
96
96
|
"@ours.network/codex": {
|
|
97
97
|
"type": "npm",
|
|
98
|
-
"version": "1.2.0-nightly.
|
|
98
|
+
"version": "1.2.0-nightly.15"
|
|
99
99
|
},
|
|
100
100
|
"@ours.network/claude-code": {
|
|
101
101
|
"type": "npm",
|
|
102
|
-
"version": "1.2.0-nightly.
|
|
102
|
+
"version": "1.2.0-nightly.15"
|
|
103
103
|
},
|
|
104
104
|
"@ours.network/daemon": {
|
|
105
105
|
"type": "npm",
|
|
106
|
-
"version": "
|
|
106
|
+
"version": "4.1.1-nightly.1"
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
package/lib/workspace-setup.mjs
CHANGED
|
@@ -2,12 +2,25 @@ import { chmodSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync,
|
|
|
2
2
|
import { join,resolve } from 'node:path';
|
|
3
3
|
import {parseSetupArgs} from './setup-options.mjs';
|
|
4
4
|
import {preflightSetup} from './setup.mjs';
|
|
5
|
+
// Invocation configuration is trusted; an incoming grant/envelope never selects its authority.
|
|
6
|
+
const dnsName=value=>typeof value==='string' && value.length<=253 && value.includes('.') && value.split('.').every(label=>/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/.test(label));
|
|
7
|
+
function configuredOrigin(value,env) {
|
|
8
|
+
const configured=env.OURS_ACCOUNT_ORIGIN;
|
|
9
|
+
let url;try{url=new URL(configured);}catch{return false;}
|
|
10
|
+
return typeof configured==='string' && url.protocol==='https:' && url.origin===configured && !url.username && !url.password && !url.hostname.includes('*') && value===configured;
|
|
11
|
+
}
|
|
12
|
+
function configuredHost(value,env) {
|
|
13
|
+
if(!dnsName(value))return false;
|
|
14
|
+
if(env.OURS_WORKSPACE_HOST!==undefined)return dnsName(env.OURS_WORKSPACE_HOST) && value===env.OURS_WORKSPACE_HOST;
|
|
15
|
+
const domain=env.OURS_WORKSPACE_DOMAIN;
|
|
16
|
+
return dnsName(domain) && value.endsWith('.'+domain) && !value.slice(0,-domain.length-1).includes('.');
|
|
17
|
+
}
|
|
5
18
|
/** Base64 is transport, not encryption. Broad provider credentials are never accepted. */
|
|
6
|
-
export function decodeWorkspacePayload(encoded,now=Date.now()) {
|
|
19
|
+
export function decodeWorkspacePayload(encoded,now=Date.now(),env={}) {
|
|
7
20
|
if(typeof encoded!=='string' || encoded.length>32768 || !/^[A-Za-z0-9_-]+$/.test(encoded.trim()))throw Error('Invalid private workspace payload');
|
|
8
21
|
let p;try{p=JSON.parse(Buffer.from(encoded.trim(),'base64url'));}catch{throw Error('Invalid private workspace payload');}
|
|
9
22
|
const allowed=['version','appOrigin','hostname','rootName','fullName','name','surname','connectorToken','invitation','serverCid','challenge','renewal'];
|
|
10
|
-
if(!p || typeof p!=='object' || Array.isArray(p) || Object.keys(p).some(k=>!allowed.includes(k)) || p.version!==1 || !
|
|
23
|
+
if(!p || typeof p!=='object' || Array.isArray(p) || Object.keys(p).some(k=>!allowed.includes(k)) || p.version!==1 || !configuredOrigin(p.appOrigin,env) || !configuredHost(p.hostname,env) || !/^[a-z0-9-]{2,30}@[a-z0-9-]{2,30}$/.test(p.rootName) || !/^[a-f0-9]{64}$/i.test(p.serverCid))throw Error('Invalid workspace payload boundary');
|
|
11
24
|
for(const key of ['fullName','name','surname']){const value=p[key];if(value==null || value===''){p[key]=null;continue;}if(typeof value!=='string' || value.length>8192 || /[\x00-\x1f\x7f]/.test(value))throw Error('Invalid private workspace profile');p[key]=value.trim()||null;}
|
|
12
25
|
if(p.renewal!==undefined && typeof p.renewal!=='boolean')throw Error('Invalid workspace renewal');
|
|
13
26
|
for(const key of ['connectorToken','invitation'])if(!(key==='connectorToken' && p[key]===undefined && p.renewal===true) && (typeof p[key]!=='string' || !p[key].trim() || p[key].length>8192 || /[\x00-\x1f\x7f]/.test(p[key])))throw Error('Invalid private workspace payload');
|
|
@@ -17,19 +30,19 @@ export function decodeWorkspacePayload(encoded,now=Date.now()) {
|
|
|
17
30
|
// A v1 envelope is local. A v2 grant is one-use, so it is parsed here and redeemed only after the
|
|
18
31
|
// payload-independent checks in runWorkspaceSetup (arguments, host state, read-only setup and Fleet
|
|
19
32
|
// settings preflight, Fleet/tunnel availability, dry run) pass.
|
|
20
|
-
function workspaceGrant(input){
|
|
33
|
+
function workspaceGrant(input,env){
|
|
21
34
|
if(typeof input!=='string' || !/^[A-Za-z0-9_-]{1,32768}$/.test(input.trim()))throw Error('Invalid workspace setup input');
|
|
22
35
|
let grant;try{grant=JSON.parse(Buffer.from(input.trim(),'base64url'));}catch{throw Error('Invalid workspace setup input');}
|
|
23
36
|
if(grant?.version===1)return null;
|
|
24
37
|
const now=Date.now();
|
|
25
38
|
if(grant?.version!==2 || Object.keys(grant).sort().join(',')!=='appOrigin,code,expiresAt,version'
|
|
26
|
-
|| !
|
|
39
|
+
|| !configuredOrigin(grant.appOrigin,env)
|
|
27
40
|
|| !/^[A-Za-z0-9_-]{43}$/.test(grant.code) || !Number.isSafeInteger(grant.expiresAt) || grant.expiresAt<=now || grant.expiresAt>now+16*60000)
|
|
28
41
|
throw Error('Workspace setup grant is invalid or expired; get a fresh command from the App');
|
|
29
42
|
return grant;
|
|
30
43
|
}
|
|
31
44
|
// Redeem only the minimal public grant; the private envelope stays in process/file transport.
|
|
32
|
-
async function redeemWorkspaceGrant(grant,request){
|
|
45
|
+
async function redeemWorkspaceGrant(grant,request,env){
|
|
33
46
|
let response;
|
|
34
47
|
try{response=await request(grant.appOrigin+'/account-api/workspace-install-redeem',{method:'POST',redirect:'error',credentials:'omit',signal:AbortSignal.timeout(30000),headers:{'Content-Type':'application/json',Origin:grant.appOrigin},body:JSON.stringify({code:grant.code})});}
|
|
35
48
|
catch{throw Error('Workspace grant redemption could not be confirmed; check the App before requesting a fresh command');}
|
|
@@ -42,7 +55,7 @@ async function redeemWorkspaceGrant(grant,request){
|
|
|
42
55
|
result=JSON.parse(Buffer.concat(chunks).toString('utf8'));
|
|
43
56
|
}catch{throw Error('Invalid workspace setup response; get a fresh command from the App');}
|
|
44
57
|
if(typeof result?.payload!=='string' || !/^[A-Za-z0-9_-]{1,32768}$/.test(result.payload))throw Error('Invalid workspace setup response');
|
|
45
|
-
const payload=decodeWorkspacePayload(result.payload);
|
|
58
|
+
const payload=decodeWorkspacePayload(result.payload,Date.now(),env);
|
|
46
59
|
if(payload.appOrigin!==grant.appOrigin)throw Error('Workspace setup response origin mismatch');
|
|
47
60
|
return result.payload;
|
|
48
61
|
}
|
|
@@ -59,8 +72,9 @@ export async function runWorkspaceSetup(args,effects,runSetup,request=fetch){
|
|
|
59
72
|
if(values['--setup-workspace-file']){const path=resolve(values['--setup-workspace-file']),stat=lstatSync(path);if(!stat.isFile() || stat.isSymbolicLink() || stat.nlink!==1 || stat.uid!==process.getuid?.() || stat.size>32768 || (stat.mode&0o077)!==0)throw Error('Setup file must be owned and private (chmod 600)');encoded=readFileSync(path,'utf8').trim();}
|
|
60
73
|
else if(values['--setup-workspace']==='-'){const chunks=[];let bytes=0;for await(const chunk of process.stdin){bytes+=chunk.length;if(bytes>32768)throw Error('Private payload too large');chunks.push(chunk);}encoded=Buffer.concat(chunks).toString().trim();}
|
|
61
74
|
else encoded=values['--setup-workspace'];
|
|
62
|
-
const
|
|
63
|
-
|
|
75
|
+
const authority={OURS_ACCOUNT_ORIGIN:effects.env?.OURS_ACCOUNT_ORIGIN,OURS_WORKSPACE_HOST:effects.env?.OURS_WORKSPACE_HOST,OURS_WORKSPACE_DOMAIN:effects.env?.OURS_WORKSPACE_DOMAIN};
|
|
76
|
+
const grant=workspaceGrant(encoded,authority);
|
|
77
|
+
let p=grant?null:decodeWorkspacePayload(encoded,Date.now(),authority);const fleetBin=values['--workspace-fleet-bin'] || 'ours-fleet';
|
|
64
78
|
const parsed=parseSetupArgs(rest,{home:effects.home,validate:false});
|
|
65
79
|
if(parsed.scope==='server')throw Error('Workspace setup requires all or client scope');
|
|
66
80
|
if(parsed.identityName!==undefined || parsed.integrations!==undefined)throw Error('Workspace setup supplies identity and client integration selection');
|
|
@@ -115,7 +129,7 @@ export async function runWorkspaceSetup(args,effects,runSetup,request=fetch){
|
|
|
115
129
|
}
|
|
116
130
|
if(grant){
|
|
117
131
|
// Checks below depend on the private envelope, so a failure here leaves the grant spent.
|
|
118
|
-
encoded=await redeemWorkspaceGrant(grant,request);p=decodeWorkspacePayload(encoded);
|
|
132
|
+
encoded=await redeemWorkspaceGrant(grant,request,authority);p=decodeWorkspacePayload(encoded,Date.now(),authority);
|
|
119
133
|
resumable();
|
|
120
134
|
parseSetupArgs(setupOptions(p.rootName),{home:effects.home});
|
|
121
135
|
await requireOptionalProfile();
|
|
@@ -125,7 +139,7 @@ export async function runWorkspaceSetup(args,effects,runSetup,request=fetch){
|
|
|
125
139
|
const result=await runSetup(setupOptions(p.rootName),effects);if(result!==0)return result;
|
|
126
140
|
}
|
|
127
141
|
const selected=existingProfile || effects.readManagedClientProfile();if(!selected)throw Error('Workspace client profile was not installed');
|
|
128
|
-
const env={OURS_CONFIG:existingProfile || managedPath};
|
|
142
|
+
const env={...authority,OURS_CONFIG:existingProfile || managedPath};
|
|
129
143
|
for(const key of ['OURS_PORT','OURS_STATE_DIR','OURS_API_TOKEN','OURS_DAEMON_ID','OURS_DAEMON_URL','OURS_DAEMON_CREDENTIAL_PATH'])env[key]=undefined;
|
|
130
144
|
if(!existsSync(fleetConfig)){
|
|
131
145
|
const initArgs=['init',...(fleetSettings?['--settings',fleetSettings]:[])];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ours.network/install",
|
|
3
|
-
"version": "1.2.1-nightly.
|
|
3
|
+
"version": "1.2.1-nightly.56",
|
|
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",
|