@volter/twin-tunnel 0.1.37 → 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 (87) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +13 -121
  3. package/dist/generated/pack-facts.json +54 -0
  4. package/dist/journeys/coverage.json +109 -0
  5. package/dist/journeys/customer-life.json +588 -0
  6. package/dist/journeys/customer-life.outline.md +34 -0
  7. package/dist/journeys/customer-life.outline.verdict.json +42 -0
  8. package/dist/journeys/customer-life.verdict.json +51 -0
  9. package/dist/journeys/decisions.json +23 -0
  10. package/dist/journeys/demand.json +24 -0
  11. package/dist/journeys/score.json +134 -0
  12. package/dist/journeys/unreachable.json +12 -0
  13. package/dist/journeys/vendor-examples.json +7 -0
  14. package/dist/journeys/vendor-examples.verdict.json +18 -0
  15. package/dist/spec/SOURCE.md +30 -0
  16. package/dist/spec/openapi.json +50 -0
  17. package/dist/spec/sources.json +1 -0
  18. package/dist/src/cli.js +15 -53
  19. package/dist/src/fetch.d.ts +2 -0
  20. package/dist/src/fetch.js +19 -0
  21. package/dist/src/generated/surface.gen.json +1 -0
  22. package/dist/src/generated/ui.gen.json +1 -0
  23. package/dist/src/index.d.ts +5 -7
  24. package/dist/src/index.js +9 -42
  25. package/dist/src/manifest.d.ts +2 -0
  26. package/dist/src/manifest.js +49 -0
  27. package/dist/src/semantics/around.d.ts +2 -0
  28. package/dist/src/semantics/around.js +72 -0
  29. package/dist/src/semantics/doors.d.ts +3 -0
  30. package/dist/src/semantics/doors.js +18 -0
  31. package/dist/src/semantics/index.d.ts +2 -0
  32. package/dist/src/semantics/index.js +1 -0
  33. package/dist/src/semantics/shared.d.ts +22 -0
  34. package/dist/src/semantics/shared.js +73 -0
  35. package/dist/src/semantics/sockets.d.ts +2 -0
  36. package/dist/src/semantics/sockets.js +161 -0
  37. package/dist/src/semantics/states.d.ts +1 -0
  38. package/dist/src/semantics/states.js +3 -0
  39. package/dist/src/server.d.ts +7 -0
  40. package/dist/src/server.js +9 -0
  41. package/generated/pack-facts.json +54 -0
  42. package/journeys/coverage.json +109 -0
  43. package/journeys/customer-life.json +588 -0
  44. package/journeys/customer-life.outline.md +34 -0
  45. package/journeys/customer-life.outline.verdict.json +42 -0
  46. package/journeys/customer-life.verdict.json +51 -0
  47. package/journeys/decisions.json +23 -0
  48. package/journeys/demand.json +24 -0
  49. package/journeys/score.json +134 -0
  50. package/journeys/unreachable.json +12 -0
  51. package/journeys/vendor-examples.json +7 -0
  52. package/journeys/vendor-examples.verdict.json +18 -0
  53. package/package.json +17 -32
  54. package/spec/SOURCE.md +30 -0
  55. package/spec/openapi.json +50 -0
  56. package/spec/sources.json +1 -0
  57. package/src/cli.ts +15 -41
  58. package/src/fetch.ts +20 -0
  59. package/src/generated/surface.gen.json +1 -0
  60. package/src/generated/ui.gen.json +1 -0
  61. package/src/index.ts +10 -52
  62. package/src/manifest.ts +54 -0
  63. package/src/semantics/around.ts +68 -0
  64. package/src/semantics/doors.ts +21 -0
  65. package/src/semantics/index.ts +6 -0
  66. package/src/semantics/shared.ts +78 -0
  67. package/src/semantics/sockets.ts +127 -0
  68. package/src/semantics/states.ts +3 -0
  69. package/src/server.ts +10 -0
  70. package/dist/src/tunnel-budget.d.ts +0 -21
  71. package/dist/src/tunnel-budget.js +0 -26
  72. package/dist/src/tunnel-capabilities.d.ts +0 -4
  73. package/dist/src/tunnel-capabilities.js +0 -2091
  74. package/dist/src/tunnel-conformance.d.ts +0 -10
  75. package/dist/src/tunnel-conformance.js +0 -63
  76. package/dist/src/tunnel-connector.d.ts +0 -21
  77. package/dist/src/tunnel-connector.js +0 -68
  78. package/dist/src/tunnel-server.d.ts +0 -109
  79. package/dist/src/tunnel-server.js +0 -1197
  80. package/dist/src/tunnel-twin.d.ts +0 -175
  81. package/dist/src/tunnel-twin.js +0 -236
  82. package/src/tunnel-budget.ts +0 -34
  83. package/src/tunnel-capabilities.ts +0 -1770
  84. package/src/tunnel-conformance.ts +0 -62
  85. package/src/tunnel-connector.ts +0 -64
  86. package/src/tunnel-server.ts +0 -1194
  87. package/src/tunnel-twin.ts +0 -339
@@ -0,0 +1,9 @@
1
+ // FETCH-FIRST (runtime contract R12b): a fixed file, the kernel's serve seam around the pack's fetch (./fetch.ts).
2
+ import { serveHttp } from '@volter/world-core';
3
+ import { createTunnelFetch } from "./fetch.js";
4
+ export async function createTunnelTwinServer(options = {}) {
5
+ const fetch = createTunnelFetch(options);
6
+ // the vendor's sockets, when its manifest declares any (the kernel's sockets.ts)
7
+ const server = await serveHttp({ port: options.port ?? 0, idleTimeout: 60, fetch, ...(fetch.upgrade ? { upgrade: fetch.upgrade } : {}) });
8
+ return { port: server.port ?? options.port ?? 0, stop: () => server.stop(true) };
9
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "//": "GENERATED by scripts/pack-facts.ts — current pack descriptors and explicit world-runtime server backings; no prior-artifact entries are retained.",
3
+ "packs": {
4
+ "tunnel": {
5
+ "adoption": {
6
+ "sdks": [
7
+ "@volter/tunnel"
8
+ ],
9
+ "envStems": [
10
+ "TUNNEL",
11
+ "VOLTERTUNNEL"
12
+ ]
13
+ },
14
+ "hosts": [
15
+ {
16
+ "host": "voltertest.xyz"
17
+ },
18
+ {
19
+ "suffix": ".voltertest.xyz"
20
+ },
21
+ {
22
+ "host": "www.voltertest.xyz",
23
+ "exclude": true
24
+ },
25
+ {
26
+ "host": "twins.voltertest.xyz",
27
+ "exclude": true
28
+ }
29
+ ],
30
+ "archetype": "proxy",
31
+ "protocol": {
32
+ "declared": "3",
33
+ "major": 3,
34
+ "standing": "current"
35
+ },
36
+ "transport": "rest",
37
+ "resources": [],
38
+ "endpointEnvNone": "the relay URL is the credential door's (TUNNEL_SERVER_URL, SUPERCODE_TUNNEL_SERVER_URL), the World claiming voltertest.xyz",
39
+ "credentialDoor": {
40
+ "path": "/_twin/accounts",
41
+ "body": {
42
+ "slug": "world"
43
+ },
44
+ "fill": {
45
+ "TUNNEL_SECRET": "token",
46
+ "TUNNEL_SERVER_URL": "server",
47
+ "SUPERCODE_TUNNEL_SERVER_URL": "server"
48
+ }
49
+ },
50
+ "serveExport": "createTunnelTwinServer"
51
+ }
52
+ },
53
+ "undeclared": []
54
+ }
@@ -0,0 +1,109 @@
1
+ {
2
+ "vendor": "tunnel",
3
+ "missing": 9,
4
+ "stale": [],
5
+ "code": {
6
+ "lines": 255,
7
+ "run": 242,
8
+ "recorded": 4,
9
+ "missing": 9
10
+ },
11
+ "state": {
12
+ "declared": 0,
13
+ "reached": 0,
14
+ "recorded": 0,
15
+ "missing": [],
16
+ "undeclared": []
17
+ },
18
+ "files": [
19
+ {
20
+ "file": "semantics/doors.ts",
21
+ "lines": {
22
+ "found": 13,
23
+ "hit": 13
24
+ },
25
+ "missing": []
26
+ },
27
+ {
28
+ "file": "semantics/sockets.ts",
29
+ "lines": {
30
+ "found": 82,
31
+ "hit": 74
32
+ },
33
+ "missing": [
34
+ {
35
+ "from": 114,
36
+ "to": 118,
37
+ "fn": "expireStream"
38
+ },
39
+ {
40
+ "from": 123,
41
+ "to": 125,
42
+ "fn": "cancelStream"
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "file": "semantics/shared.ts",
48
+ "lines": {
49
+ "found": 46,
50
+ "hit": 46
51
+ },
52
+ "missing": []
53
+ },
54
+ {
55
+ "file": "semantics/around.ts",
56
+ "lines": {
57
+ "found": 40,
58
+ "hit": 39
59
+ },
60
+ "missing": [
61
+ {
62
+ "from": 66,
63
+ "to": 66,
64
+ "fn": "timeout"
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "file": "semantics/index.ts",
70
+ "lines": {
71
+ "found": 2,
72
+ "hit": 2
73
+ },
74
+ "missing": []
75
+ },
76
+ {
77
+ "file": "manifest.ts",
78
+ "lines": {
79
+ "found": 43,
80
+ "hit": 43
81
+ },
82
+ "missing": []
83
+ },
84
+ {
85
+ "file": "index.ts",
86
+ "lines": {
87
+ "found": 7,
88
+ "hit": 7
89
+ },
90
+ "missing": []
91
+ },
92
+ {
93
+ "file": "server.ts",
94
+ "lines": {
95
+ "found": 6,
96
+ "hit": 2
97
+ },
98
+ "missing": []
99
+ },
100
+ {
101
+ "file": "fetch.ts",
102
+ "lines": {
103
+ "found": 16,
104
+ "hit": 16
105
+ },
106
+ "missing": []
107
+ }
108
+ ]
109
+ }