@volter/twin-tunnel 1.0.0 → 1.0.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.
Files changed (43) hide show
  1. package/README.md +3 -1
  2. package/dist/journeys/coverage.json +109 -0
  3. package/dist/journeys/customer-life.json +588 -0
  4. package/dist/journeys/customer-life.outline.md +34 -0
  5. package/dist/journeys/customer-life.outline.verdict.json +42 -0
  6. package/dist/journeys/customer-life.verdict.json +51 -0
  7. package/dist/journeys/decisions.json +23 -0
  8. package/dist/journeys/demand.json +24 -0
  9. package/dist/journeys/score.json +134 -0
  10. package/dist/journeys/unreachable.json +12 -0
  11. package/dist/journeys/vendor-examples.json +7 -0
  12. package/dist/journeys/vendor-examples.verdict.json +18 -0
  13. package/dist/spec/SOURCE.md +30 -14
  14. package/dist/spec/openapi.json +47 -15
  15. package/dist/spec/sources.json +1 -0
  16. package/dist/src/index.js +4 -3
  17. package/dist/src/manifest.js +7 -0
  18. package/dist/src/semantics/around.js +42 -9
  19. package/dist/src/semantics/doors.js +2 -2
  20. package/dist/src/semantics/shared.d.ts +8 -3
  21. package/dist/src/semantics/shared.js +61 -3
  22. package/dist/src/semantics/sockets.js +97 -16
  23. package/journeys/coverage.json +109 -0
  24. package/journeys/customer-life.json +588 -0
  25. package/journeys/customer-life.outline.md +34 -0
  26. package/journeys/customer-life.outline.verdict.json +42 -0
  27. package/journeys/customer-life.verdict.json +51 -0
  28. package/journeys/decisions.json +23 -0
  29. package/journeys/demand.json +24 -0
  30. package/journeys/score.json +134 -0
  31. package/journeys/unreachable.json +12 -0
  32. package/journeys/vendor-examples.json +7 -0
  33. package/journeys/vendor-examples.verdict.json +18 -0
  34. package/package.json +3 -2
  35. package/spec/SOURCE.md +30 -14
  36. package/spec/openapi.json +47 -15
  37. package/spec/sources.json +1 -0
  38. package/src/index.ts +5 -4
  39. package/src/manifest.ts +7 -0
  40. package/src/semantics/around.ts +37 -10
  41. package/src/semantics/doors.ts +2 -2
  42. package/src/semantics/shared.ts +56 -4
  43. package/src/semantics/sockets.ts +72 -14
@@ -0,0 +1,34 @@
1
+ # A shared Harness demo
2
+
3
+ Ada runs Harness on her laptop. Her relay account's token grants her connector
4
+ the right to register her demo tunnel. Bob first visits its public URL without a
5
+ relay credential: Ada deliberately shares an unauthenticated remote-access demo.
6
+ Later Bob creates his own account, whose token can register his own tunnel but
7
+ cannot take Ada's reserved name. The story takes place in one sitting; it uses
8
+ neither metered quotas nor a credential with a limited grant.
9
+
10
+ 1. Ada signs up and gives Harness the account token she was shown. Harness
11
+ connects its named tunnel and shares the visitor URL returned by the relay.
12
+ 2. Bob mistypes the tunnel name from Ada's invitation and cannot reach a
13
+ connector there. He follows the actual shared URL to correct the mistake. Harness receives the page request and answers it with
14
+ the page from Ada's local server. Bob's remote viewer asks permission to send its command headers and runs a demo command;
15
+ Harness streams progress and completion, and Bob receives the complete output.
16
+ 3. While setting up a second Harness connector for the demo, Ada first uses a
17
+ separate diagnostic client speaking the relay's documented control protocol.
18
+ It registers the existing name without requesting replacement and is refused.
19
+ She then starts the actual Harness connector, whose SDK requests replacement
20
+ automatically; the previous connector closes, the URL stays stable, and Bob
21
+ checks that the restarted local server answers.
22
+ 4. Bob creates his own relay account. He copied Ada's tunnel name and discovers
23
+ that his account cannot claim it. He corrects the name but pastes an incomplete
24
+ token. After that is rejected, he reconnects using the token actually returned
25
+ by his account and receives his own demo URL.
26
+ 5. Bob requests a final command just as Ada closes the connector at the end of
27
+ the demonstration. The pending command reports the disconnect. Bob uses the local relay's direct
28
+ addressing diagnostic to check his separate connector still answers, then
29
+ closes his own connector.
30
+
31
+ The account act uses the World account door. Registration and reconnection use
32
+ the control socket. A visitor's request is started while the local client answers
33
+ its control frame, then its completed HTTP response is checked. Both buffered
34
+ and streamed replies therefore occur in the executable story.
@@ -0,0 +1,42 @@
1
+ {
2
+ "sha256": "fd151bd1155b27b8cf5a0503e5dd0ce08fdcc442264417ce2e95fa2c49c783de",
3
+ "plausible": true,
4
+ "bar": "829132787d94a2d4",
5
+ "judge": {
6
+ "name": "Contributor 44",
7
+ "agent": "Contributor 20"
8
+ },
9
+ "authors": [
10
+ "Contributor 43",
11
+ "Contributor 1"
12
+ ],
13
+ "rounds": 1,
14
+ "rulings": [
15
+ {
16
+ "id": "R1",
17
+ "acts": [
18
+ 3
19
+ ],
20
+ "required": "Identify separate protocol diagnostic and SDK automatic replacement"
21
+ }
22
+ ],
23
+ "doubts": [
24
+ "See independent exhaustive report in the retained independent review"
25
+ ],
26
+ "applied": {
27
+ "from": "e68d21e7aa7caceefff49ebbd2b1b7d7be2130188cc92b3e4fe63083ff0a0d83",
28
+ "wasPlausible": false,
29
+ "steps": [
30
+ "3"
31
+ ],
32
+ "rulings": [
33
+ {
34
+ "id": "R1",
35
+ "acts": [
36
+ 3
37
+ ],
38
+ "required": "Identify separate protocol diagnostic and SDK automatic replacement"
39
+ }
40
+ ]
41
+ }
42
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "sha256": "02196737197b84f01e56a4d431cfc09afb99a180ec2f9df96ce7bdf6fc08fbe8",
3
+ "plausible": true,
4
+ "bar": "829132787d94a2d4",
5
+ "judge": {
6
+ "name": "Contributor 44",
7
+ "agent": "Contributor 20"
8
+ },
9
+ "authors": [
10
+ "Contributor 43",
11
+ "Contributor 1"
12
+ ],
13
+ "rounds": 1,
14
+ "rulings": [
15
+ {
16
+ "id": "R1",
17
+ "steps": [
18
+ 15,
19
+ 16,
20
+ 17,
21
+ 18
22
+ ],
23
+ "required": "Identify diagnostic and actual SDK actors; judge report uses human 1-based steps 16–19"
24
+ }
25
+ ],
26
+ "doubts": [
27
+ "See independent exhaustive report in the retained independent review"
28
+ ],
29
+ "applied": {
30
+ "from": "f9de0bd56dbfc8921cfc34a03df6c7382d6859c71b5fc06f84ad47800206c506",
31
+ "wasPlausible": false,
32
+ "steps": [
33
+ "15",
34
+ "16",
35
+ "17",
36
+ "18"
37
+ ],
38
+ "rulings": [
39
+ {
40
+ "id": "R1",
41
+ "steps": [
42
+ 15,
43
+ 16,
44
+ 17,
45
+ 18
46
+ ],
47
+ "required": "Identify diagnostic and actual SDK actors; judge report uses human 1-based steps 16–19"
48
+ }
49
+ ]
50
+ }
51
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "about": "tunnel's decision table (the P3 procedure). The relay is a protocol, not an API: a client's control socket (the manifest's socket `control`, semantics/sockets.ts) and the public requests the relay sends down it (the pack's front, semantics/around.ts, over the kernel's request-answered-by-a-session mechanism). The spec's one operation, the apex's status, is called by nothing and answers the gap. An account and its token are the World's door.",
3
+ "decisions": [
4
+ {
5
+ "operation": "door:accounts",
6
+ "demand": "Volter Harness's TUNNEL_SECRET",
7
+ "mechanism": "door",
8
+ "why": "an account and its token are made on the relay's signup, not through its protocol"
9
+ },
10
+ {
11
+ "operation": "socket:control",
12
+ "demand": "Volter Harness createTunnel",
13
+ "mechanism": "handler",
14
+ "why": "the declared socket engine speaks the vendor control protocol"
15
+ },
16
+ {
17
+ "operation": "front:public-request",
18
+ "demand": "a visitor opens Harness remote-access URL",
19
+ "mechanism": "handler",
20
+ "why": "around sends the request to the registered client and awaits its response frames"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "measured": "the demand scan (twin-world scripts/demand-scan.ts, the products volter.ai names) finds the tunnel in Volter Harness (volter-ai/supercode @ 62620578c014c4c0b1d4c34e1268e4112c9dd331): its remote access, given a stable relay (SUPERCODE_TUNNEL_SERVER_URL or TUNNEL_SERVER_URL), opens a tunnel with @volter/tunnel's client for a loopback port, with TUNNEL_SECRET when set, a stable tunnel id and authRequired false, and shares the tunnel URL's origin. The client (volter-ai/volter-tunnel @ c14b6e3, client/tunnel-client.ts) opens the control WebSocket at <host>/ws?id=<tunnelId>, registers, and answers each request frame from the local server; the public side is whoever opens the shared URL. The relay's own /api/status is called by nothing: it answers the gap.",
3
+ "applications": [
4
+ {
5
+ "name": "volter-ai/supercode (Volter Harness)",
6
+ "commit": "62620578c014c4c0b1d4c34e1268e4112c9dd331",
7
+ "client": "@volter/tunnel's createTunnel (the control WebSocket), and whoever opens the tunnel's URL; configuration read at sdk/remote-access/index.mjs:324,343",
8
+ "backend": [
9
+ {
10
+ "call": "the control WebSocket at <relay>/ws?id=<tunnelId>: register (tunnelId, secret, authRequired false), then each request frame answered with the local server's response",
11
+ "operation": "socket:control",
12
+ "evidence": "sdk/remote-access/index.mjs:348"
13
+ }
14
+ ],
15
+ "frontend": [
16
+ {
17
+ "call": "a person opens the shared remote-access URL: every request forwarded to the Harness's local server through the control socket",
18
+ "operation": "front:public-request",
19
+ "evidence": "sdk/remote-access/index.mjs:362"
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,134 @@
1
+ {
2
+ "vendor": "tunnel",
3
+ "life": {
4
+ "steps": 40,
5
+ "verdict": "plausible",
6
+ "judge": "Contributor 20",
7
+ "authors": [
8
+ "Contributor 43",
9
+ "Contributor 1"
10
+ ]
11
+ },
12
+ "failures": [],
13
+ "flags": [],
14
+ "coverage": {
15
+ "vendor": "tunnel",
16
+ "missing": 9,
17
+ "stale": [],
18
+ "code": {
19
+ "lines": 255,
20
+ "run": 242,
21
+ "recorded": 4,
22
+ "missing": 9
23
+ },
24
+ "state": {
25
+ "declared": 0,
26
+ "reached": 0,
27
+ "recorded": 0,
28
+ "missing": [],
29
+ "undeclared": []
30
+ },
31
+ "files": [
32
+ {
33
+ "file": "semantics/doors.ts",
34
+ "lines": {
35
+ "found": 13,
36
+ "hit": 13
37
+ },
38
+ "missing": []
39
+ },
40
+ {
41
+ "file": "semantics/sockets.ts",
42
+ "lines": {
43
+ "found": 82,
44
+ "hit": 74
45
+ },
46
+ "missing": [
47
+ {
48
+ "from": 114,
49
+ "to": 118,
50
+ "fn": "expireStream"
51
+ },
52
+ {
53
+ "from": 123,
54
+ "to": 125,
55
+ "fn": "cancelStream"
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ "file": "semantics/shared.ts",
61
+ "lines": {
62
+ "found": 46,
63
+ "hit": 46
64
+ },
65
+ "missing": []
66
+ },
67
+ {
68
+ "file": "semantics/around.ts",
69
+ "lines": {
70
+ "found": 40,
71
+ "hit": 39
72
+ },
73
+ "missing": [
74
+ {
75
+ "from": 66,
76
+ "to": 66,
77
+ "fn": "timeout"
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "file": "semantics/index.ts",
83
+ "lines": {
84
+ "found": 2,
85
+ "hit": 2
86
+ },
87
+ "missing": []
88
+ },
89
+ {
90
+ "file": "manifest.ts",
91
+ "lines": {
92
+ "found": 43,
93
+ "hit": 43
94
+ },
95
+ "missing": []
96
+ },
97
+ {
98
+ "file": "index.ts",
99
+ "lines": {
100
+ "found": 7,
101
+ "hit": 7
102
+ },
103
+ "missing": []
104
+ },
105
+ {
106
+ "file": "server.ts",
107
+ "lines": {
108
+ "found": 6,
109
+ "hit": 2
110
+ },
111
+ "missing": []
112
+ },
113
+ {
114
+ "file": "fetch.ts",
115
+ "lines": {
116
+ "found": 16,
117
+ "hit": 16
118
+ },
119
+ "missing": []
120
+ }
121
+ ]
122
+ },
123
+ "examples": {
124
+ "done": true,
125
+ "replayed": true,
126
+ "verdict": "plausible",
127
+ "failures": [],
128
+ "line": "examples: 0 published, 0 of patch-removed operations, 0 of operations the twin does not serve, 0 replayed, 0 recorded; 0 failing done: yes"
129
+ },
130
+ "breadth": {
131
+ "operations": 1,
132
+ "gap": 1
133
+ }
134
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "code": [
3
+ {
4
+ "file": "server.ts",
5
+ "declarations": [
6
+ "createTunnelTwinServer"
7
+ ],
8
+ "world": "host-process",
9
+ "why": "The in-memory life invokes the pack fetch, not its HTTP listener factory. Standalone and served-life conformance exercise this factory separately."
10
+ }
11
+ ]
12
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "vendor": "tunnel",
3
+ "author": "Contributor 71",
4
+ "host": "voltertest.xyz",
5
+ "about": "No request/response examples exist for a served HTTP spec operation: getStatus is unmodeled. Upstream README createTunnel is a client program; its control protocol and visitor round trip are walked by customer-life.json. See spec/SOURCE.md for the pages read.",
6
+ "steps": []
7
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "sha256": "d92b8e9a39a133ab6c07149d3f75795ea5c14ecba53b0bb60e2fa06d59419ace",
3
+ "plausible": true,
4
+ "bar": "829132787d94a2d4",
5
+ "judge": {
6
+ "name": "Contributor 44",
7
+ "agent": "Contributor 20"
8
+ },
9
+ "authors": [
10
+ "Contributor 43",
11
+ "Contributor 1"
12
+ ],
13
+ "rounds": 1,
14
+ "rulings": [],
15
+ "doubts": [
16
+ "See independent exhaustive report in the retained independent review"
17
+ ]
18
+ }
@@ -1,14 +1,30 @@
1
- # volter-tunnel relay spec — provenance
2
-
3
- - **Why this document:** the relay publishes no OpenAPI document. Its contract is volter-ai/volter-tunnel at
4
- `c14b6e3` (2026-09-28): `packages/core/src/protocol.ts` (the control channel's frames, "the single source of truth
5
- for the messages exchanged over the control WebSocket between a client and the relay") and the Cloudflare relay,
6
- `server-cf/src/worker.ts` (routing: the control channel at `/ws?id=<tunnelId>`; a tunnel at `<tunnelId>.<domain>`,
7
- or `?__tunnel=<id>` on a direct host such as localhost; `/api/status` at the apex) and `server-cf/src/tunnel-do.ts`
8
- (registration: `registered` with `url: https://<tunnelId>.<domain>`, a rejected credential `{type:"error"}` then
9
- close 4003, a replaced client closed 4001 "Replaced by new client"; a public request: 502 "Tunnel not connected",
10
- 504 "Tunnel timeout" after 30 s, 413 over 750000 bytes of body; the reply frames `response`, `response-start`,
11
- `response-chunk`, `response-end`). The domain is `voltertest.xyz` (`server-cf/wrangler.jsonc`, `TUNNEL_DOMAIN`).
12
- - **Corrections:** none.
13
- - **Read by:** the twin orchestrator, 2026-09-30.
14
- - **Vendored bytes (sha256):** `openapi.json` `b4fcdc3d599026bef687c946cea3c8837c63ff982e5d899df1425e585832aebd`.
1
+ # Relay contract provenance
2
+
3
+ The relay publishes no OpenAPI document. `openapi.json` describes its HTTP status
4
+ operation and carries the verbatim upstream reference sources under `x-reference`.
5
+ These sources were read with GitHub's contents API at
6
+ `c14b6e36722b20cbb3ee7245c7f555b5c12b376e`, on 2026-10-01.
7
+
8
+ Upstream: https://github.com/volter-ai/volter-tunnel/tree/c14b6e36722b20cbb3ee7245c7f555b5c12b376e
9
+
10
+ - `packages/core/src/protocol.ts`: control-channel frames.
11
+ - `server-cf/src/worker.ts`: control and visitor routing, reserved hosts and status.
12
+ - `server-cf/src/tunnel-do.ts`: registration, refusals, forwarding, buffering and streaming.
13
+ - `server-cf/src/credits.ts`: account-slug validation.
14
+ - `server-cf/src/auth.ts`: visitor cookie and query sanitization.
15
+ - `server-cf/wrangler.jsonc`: relay domain.
16
+ - `README.md` and `client/tunnel-client.ts`: the published client usage and its relay connection.
17
+
18
+ Version: relay protocol 2. Corrections: none. The HTTP document was written
19
+ from these sources; the reference strings preserve the upstream bytes, without
20
+ changing the vendor's contract to match the twin.
21
+
22
+ Vendored bytes (sha256): `openapi.json` `e9dc4d9a6396473c3f1e1d14b5fbfb4567e0fbe23fb16e2f47fc3bf3b9b5ea73`.
23
+
24
+ The served contract is Harness's public, unauthenticated HTTP relay. The management
25
+ API, visitor WebSocket bridging, quotas, JWT/basic-auth gates, inspector, usage
26
+ snapshots and reservation expiry are outside the demand represented here.
27
+ No HTTP API operation is served; the status operation is an explicit gap.
28
+ The vendor publishes no request/answer examples for a served HTTP operation:
29
+ the client sample is a program, not an HTTP request/answer example the replay tool
30
+ can route. The customer life exercises the control frames and visitor responses.