@openparachute/hub 0.7.6 → 0.7.7-rc.13
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 +7 -7
- package/package.json +8 -13
- package/src/__tests__/account-api.test.ts +798 -0
- package/src/__tests__/account-session.test.ts +252 -0
- package/src/__tests__/account-token.test.ts +316 -0
- package/src/__tests__/admin-connections-credentials.test.ts +41 -0
- package/src/__tests__/admin-handlers.test.ts +25 -0
- package/src/__tests__/admin-lock.test.ts +3 -14
- package/src/__tests__/admin-module-token.test.ts +10 -30
- package/src/__tests__/admin-surfaces.test.ts +21 -0
- package/src/__tests__/api-hub-upgrade.test.ts +11 -0
- package/src/__tests__/api-mint-token.test.ts +25 -0
- package/src/__tests__/api-modules-ops.test.ts +34 -29
- package/src/__tests__/api-modules.test.ts +50 -58
- package/src/__tests__/api-revoke-token.test.ts +23 -0
- package/src/__tests__/api-settings-hub-origin.test.ts +12 -0
- package/src/__tests__/api-settings-root-redirect.test.ts +159 -4
- package/src/__tests__/api-tokens.test.ts +44 -0
- package/src/__tests__/audience-gate.test.ts +24 -0
- package/src/__tests__/bearer-scheme-casing.test.ts +110 -0
- package/src/__tests__/chrome-strip.test.ts +18 -1
- package/src/__tests__/doctor.test.ts +10 -17
- package/src/__tests__/door-contract-parity.test.ts +46 -0
- package/src/__tests__/hub-command.test.ts +70 -2
- package/src/__tests__/hub-server.test.ts +322 -1
- package/src/__tests__/hub-settings.test.ts +110 -6
- package/src/__tests__/hub.test.ts +29 -0
- package/src/__tests__/install.test.ts +359 -5
- package/src/__tests__/migrate.test.ts +3 -1
- package/src/__tests__/notes-serve.test.ts +216 -0
- package/src/__tests__/oauth-handlers.test.ts +19 -8
- package/src/__tests__/operator-token.test.ts +1 -2
- package/src/__tests__/port-assign.test.ts +37 -17
- package/src/__tests__/root-serve.test.ts +139 -0
- package/src/__tests__/scope-explanations.test.ts +22 -2
- package/src/__tests__/serve-boot.test.ts +25 -36
- package/src/__tests__/service-spec-discovery.test.ts +30 -35
- package/src/__tests__/services-manifest.test.ts +372 -132
- package/src/__tests__/sessions.test.ts +75 -28
- package/src/__tests__/setup-wizard.test.ts +7 -10
- package/src/__tests__/setup.test.ts +13 -14
- package/src/__tests__/status.test.ts +0 -5
- package/src/__tests__/surface-notes-alias.test.ts +296 -0
- package/src/account-api.ts +677 -0
- package/src/account-session.ts +132 -0
- package/src/account-token.ts +200 -0
- package/src/admin-connections.ts +4 -2
- package/src/admin-lock.ts +1 -2
- package/src/admin-module-token.ts +13 -8
- package/src/admin-surfaces.ts +2 -1
- package/src/api-hub-upgrade.ts +2 -1
- package/src/api-invites.ts +19 -0
- package/src/api-mint-token.ts +2 -1
- package/src/api-modules-ops.ts +2 -1
- package/src/api-modules.ts +10 -8
- package/src/api-revoke-token.ts +2 -1
- package/src/api-settings-hub-origin.ts +2 -1
- package/src/api-settings-root-redirect.ts +97 -20
- package/src/api-tokens.ts +2 -1
- package/src/audience-gate.ts +2 -1
- package/src/chrome-strip.ts +16 -4
- package/src/commands/hub.ts +104 -0
- package/src/commands/install.ts +97 -8
- package/src/commands/migrate.ts +5 -1
- package/src/commands/setup.ts +9 -6
- package/src/help.ts +6 -6
- package/src/hub-server.ts +318 -55
- package/src/hub-settings.ts +162 -1
- package/src/hub.ts +64 -31
- package/src/invites.ts +42 -0
- package/src/module-ops-client.ts +2 -1
- package/src/notes-serve.ts +73 -31
- package/src/oauth-handlers.ts +1 -11
- package/src/operator-token.ts +0 -1
- package/src/origin-check.ts +2 -2
- package/src/root-serve.ts +156 -0
- package/src/scope-explanations.ts +35 -5
- package/src/service-spec.ts +129 -74
- package/src/services-manifest.ts +112 -52
- package/src/sessions.ts +66 -30
- package/src/surface-notes-alias.ts +126 -0
- package/src/__tests__/admin-agent-token.test.ts +0 -173
- package/src/admin-agent-token.ts +0 -147
package/README.md
CHANGED
|
@@ -342,23 +342,23 @@ Parachute services reserve a block of loopback ports in the canonical range **19
|
|
|
342
342
|
| ---- | ------------------ |
|
|
343
343
|
| 1939 | parachute-hub (internal proxy + static) |
|
|
344
344
|
| 1940 | parachute-vault |
|
|
345
|
-
| 1941 |
|
|
346
|
-
| 1942 |
|
|
345
|
+
| 1941 | *unassigned (released when parachute-agent retired)* |
|
|
346
|
+
| 1942 | parachute-notes *(archived, reservation retained)* |
|
|
347
347
|
| 1943 | parachute-scribe |
|
|
348
|
-
| 1944 |
|
|
349
|
-
| 1945 |
|
|
348
|
+
| 1944 | parachute-app |
|
|
349
|
+
| 1945 | *unassigned (CLI fallback)* |
|
|
350
350
|
| 1946 | parachute-surface *(committed core; UI host — bundles Notes, hosts custom surfaces)* |
|
|
351
351
|
| 1947–1949 | *unassigned (CLI fallback range)* |
|
|
352
352
|
|
|
353
353
|
The hub pins 1939 — no fallback. If something else is on 1939 when you run `parachute expose`, the command fails with a pointer to `lsof -iTCP:1939` rather than walking up into another service's slot.
|
|
354
354
|
|
|
355
|
-
**The CLI is the port authority.** `parachute install <svc>`
|
|
355
|
+
**The CLI is the port authority.** `parachute install <svc>` selects the service port and persists it in `~/.parachute/services.json`. On supervised boot, that manifest entry is authoritative: the hub injects its port into the child environment and ignores a stale per-module `.env` `PORT`. The algorithm:
|
|
356
356
|
|
|
357
357
|
1. Prefer the canonical slot (e.g. vault → 1940).
|
|
358
|
-
2. On collision, walk the unassigned range
|
|
358
|
+
2. On collision, walk the unassigned canonical range starting at 1941.
|
|
359
359
|
3. Range exhausted: assign past 1949 with a warning.
|
|
360
360
|
|
|
361
|
-
|
|
361
|
+
The resulting `services.json` entry is authoritative for supervised starts. Services retain compiled-in defaults for stand-alone execution without a Hub-managed manifest.
|
|
362
362
|
|
|
363
363
|
`parachute expose` probes every service's port at bringup. A service that isn't responding still gets exposed, but you get a `⚠ parachute-<svc> (port …) is not responding` line so proxied requests never silently 502 without explanation.
|
|
364
364
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openparachute/hub",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7-rc.13",
|
|
4
4
|
"description": "parachute — the local hub for the Parachute ecosystem (discovery, ports, lifecycle, soon OAuth).",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,16 +11,8 @@
|
|
|
11
11
|
"bin": {
|
|
12
12
|
"parachute": "src/cli.ts"
|
|
13
13
|
},
|
|
14
|
-
"workspaces": [
|
|
15
|
-
|
|
16
|
-
],
|
|
17
|
-
"files": [
|
|
18
|
-
"src",
|
|
19
|
-
"web/ui/dist",
|
|
20
|
-
"scripts/git-credential-parachute",
|
|
21
|
-
"README.md",
|
|
22
|
-
"LICENSE"
|
|
23
|
-
],
|
|
14
|
+
"workspaces": ["packages/*"],
|
|
15
|
+
"files": ["src", "web/ui/dist", "scripts/git-credential-parachute", "README.md", "LICENSE"],
|
|
24
16
|
"repository": {
|
|
25
17
|
"type": "git",
|
|
26
18
|
"url": "https://github.com/ParachuteComputer/parachute-hub.git"
|
|
@@ -28,8 +20,10 @@
|
|
|
28
20
|
"scripts": {
|
|
29
21
|
"start": "bun src/cli.ts",
|
|
30
22
|
"build:depcheck": "[ ! -f packages/depcheck/package.json ] || [ -f packages/depcheck/dist/index.js ] || bun run --cwd packages/depcheck build",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
23
|
+
"build:door-contract": "[ ! -f packages/door-contract/package.json ] || [ -f packages/door-contract/dist/index.js ] || bun run --cwd packages/door-contract build",
|
|
24
|
+
"build:packages": "bun run build:depcheck && bun run build:door-contract",
|
|
25
|
+
"prepare": "bun run build:packages",
|
|
26
|
+
"pretest": "bun run build:packages",
|
|
33
27
|
"test": "bun test ./src",
|
|
34
28
|
"lint": "biome check .",
|
|
35
29
|
"lint:fix": "biome check --write .",
|
|
@@ -40,6 +34,7 @@
|
|
|
40
34
|
},
|
|
41
35
|
"devDependencies": {
|
|
42
36
|
"@biomejs/biome": "^1.9.4",
|
|
37
|
+
"@openparachute/door-contract": "workspace:*",
|
|
43
38
|
"@types/bun": "latest",
|
|
44
39
|
"@types/qrcode": "^1.5.6"
|
|
45
40
|
},
|