@inflatable-cookie/longhorn 0.1.0

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 (178) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -0
  3. package/package.json +205 -0
  4. package/src/agent-control/index.ts +20 -0
  5. package/src/agent-control/inject.ts +4 -0
  6. package/src/agent-control/shim.ts +722 -0
  7. package/src/bridge/direct.ts +22 -0
  8. package/src/bridge/generated/fields.ts +32 -0
  9. package/src/bridge/generated/protocol.ts +218 -0
  10. package/src/bridge/generated/variant-fields.ts +10 -0
  11. package/src/bridge/index.ts +15 -0
  12. package/src/bridge/job.ts +51 -0
  13. package/src/bridge/loopback.ts +84 -0
  14. package/src/bridge/operation.ts +166 -0
  15. package/src/bridge/router.ts +71 -0
  16. package/src/bridge/runtime/connection.ts +318 -0
  17. package/src/bridge/runtime/policy.ts +89 -0
  18. package/src/bridge/runtime/retry.ts +60 -0
  19. package/src/bridge/runtime.ts +3 -0
  20. package/src/bridge/session.ts +67 -0
  21. package/src/bridge/stream/connection.ts +146 -0
  22. package/src/bridge/stream/source.ts +61 -0
  23. package/src/bridge/stream/tracker.ts +109 -0
  24. package/src/bridge/stream.ts +6 -0
  25. package/src/bridge/supervision.ts +204 -0
  26. package/src/bridge/validation/base.ts +164 -0
  27. package/src/bridge/validation/jobs.ts +105 -0
  28. package/src/bridge/validation/negotiation.ts +242 -0
  29. package/src/bridge/validation/operations.ts +213 -0
  30. package/src/bridge/validation/streams.ts +47 -0
  31. package/src/bridge/validation.ts +5 -0
  32. package/src/commands/client.ts +124 -0
  33. package/src/commands/controller.ts +411 -0
  34. package/src/commands/generated/fields.ts +43 -0
  35. package/src/commands/generated/protocol.ts +876 -0
  36. package/src/commands/generated/variant-fields.ts +88 -0
  37. package/src/commands/index.ts +13 -0
  38. package/src/commands/keyboard.ts +361 -0
  39. package/src/commands/ports.ts +82 -0
  40. package/src/commands/projectors.ts +306 -0
  41. package/src/commands/validation.ts +444 -0
  42. package/src/config/client.ts +215 -0
  43. package/src/config/generated/base.ts +714 -0
  44. package/src/config/generated/fields.ts +54 -0
  45. package/src/config/generated/label-template.ts +14 -0
  46. package/src/config/generated/labels.ts +30 -0
  47. package/src/config/generated/protocol.ts +3 -0
  48. package/src/config/generated/restore.ts +658 -0
  49. package/src/config/generated/variant-fields.ts +129 -0
  50. package/src/config/index.ts +12 -0
  51. package/src/config/names.ts +19 -0
  52. package/src/config/validation/commands.ts +155 -0
  53. package/src/config/validation/outcomes.ts +243 -0
  54. package/src/config/validation/primitives.ts +174 -0
  55. package/src/config/validation/projection.ts +351 -0
  56. package/src/config/validation.ts +7 -0
  57. package/src/core/connection.ts +252 -0
  58. package/src/core/index.ts +2 -0
  59. package/src/core/transport.ts +24 -0
  60. package/src/history/client.ts +65 -0
  61. package/src/history/controller.ts +385 -0
  62. package/src/history/direct.ts +21 -0
  63. package/src/history/generated/fields.ts +18 -0
  64. package/src/history/generated/protocol.ts +389 -0
  65. package/src/history/generated/variant-fields.ts +27 -0
  66. package/src/history/index.ts +13 -0
  67. package/src/history/ports.ts +31 -0
  68. package/src/history/serialized.ts +38 -0
  69. package/src/history/validation.ts +334 -0
  70. package/src/history-tree/client.ts +16 -0
  71. package/src/history-tree/controller.ts +199 -0
  72. package/src/history-tree/direct.ts +3 -0
  73. package/src/history-tree/generated/fields.ts +26 -0
  74. package/src/history-tree/generated/protocol.ts +711 -0
  75. package/src/history-tree/generated/variant-fields.ts +39 -0
  76. package/src/history-tree/index.ts +13 -0
  77. package/src/history-tree/ports.ts +43 -0
  78. package/src/history-tree/serialized.ts +15 -0
  79. package/src/history-tree/validation.ts +269 -0
  80. package/src/layout/generated/protocol.ts +289 -0
  81. package/src/layout/index.ts +4 -0
  82. package/src/layout/ratio.ts +22 -0
  83. package/src/layout/validation.ts +110 -0
  84. package/src/layout/visibility.ts +30 -0
  85. package/src/licence/client.ts +32 -0
  86. package/src/licence/controller.ts +301 -0
  87. package/src/licence/direct.ts +3 -0
  88. package/src/licence/generated/fields.ts +17 -0
  89. package/src/licence/generated/key-conformance.json +42 -0
  90. package/src/licence/generated/protocol.ts +249 -0
  91. package/src/licence/generated/variant-fields.ts +34 -0
  92. package/src/licence/index.ts +14 -0
  93. package/src/licence/key.ts +125 -0
  94. package/src/licence/ports.ts +39 -0
  95. package/src/licence/serialized.ts +13 -0
  96. package/src/licence/validation.ts +226 -0
  97. package/src/native-content/client.ts +474 -0
  98. package/src/native-content/direct.ts +16 -0
  99. package/src/native-content/generated/fields.ts +32 -0
  100. package/src/native-content/generated/protocol.ts +498 -0
  101. package/src/native-content/generated/variant-fields.ts +77 -0
  102. package/src/native-content/index.ts +12 -0
  103. package/src/native-content/ports.ts +46 -0
  104. package/src/native-content/serialized.ts +50 -0
  105. package/src/native-content/validation/base.ts +194 -0
  106. package/src/native-content/validation/messages.ts +192 -0
  107. package/src/native-content/validation/state.ts +404 -0
  108. package/src/native-content/validation.ts +7 -0
  109. package/src/notifications/client.ts +106 -0
  110. package/src/notifications/controller.ts +240 -0
  111. package/src/notifications/direct.ts +12 -0
  112. package/src/notifications/generated/fields.ts +19 -0
  113. package/src/notifications/generated/labels.ts +20 -0
  114. package/src/notifications/generated/protocol.ts +522 -0
  115. package/src/notifications/generated/variant-fields.ts +37 -0
  116. package/src/notifications/index.ts +16 -0
  117. package/src/notifications/ports.ts +22 -0
  118. package/src/notifications/serialized.ts +27 -0
  119. package/src/notifications/toast.ts +41 -0
  120. package/src/notifications/tone.ts +27 -0
  121. package/src/notifications/validation.ts +246 -0
  122. package/src/operation/bridge.ts +168 -0
  123. package/src/operation/client.ts +167 -0
  124. package/src/operation/controller.ts +321 -0
  125. package/src/operation/direct.ts +15 -0
  126. package/src/operation/generated/fields.ts +20 -0
  127. package/src/operation/generated/labels.ts +15 -0
  128. package/src/operation/generated/protocol.ts +762 -0
  129. package/src/operation/generated/variant-fields.ts +60 -0
  130. package/src/operation/index.ts +14 -0
  131. package/src/operation/ports.ts +29 -0
  132. package/src/operation/serialized.ts +39 -0
  133. package/src/operation/validation.ts +479 -0
  134. package/src/settings/client.ts +142 -0
  135. package/src/settings/connection.ts +246 -0
  136. package/src/settings/generated/fields.ts +34 -0
  137. package/src/settings/generated/protocol.ts +668 -0
  138. package/src/settings/generated/variant-fields.ts +26 -0
  139. package/src/settings/index.ts +12 -0
  140. package/src/settings/names.ts +8 -0
  141. package/src/settings/registry.ts +141 -0
  142. package/src/settings/validation/authority.ts +66 -0
  143. package/src/settings/validation/command.ts +165 -0
  144. package/src/settings/validation/error.ts +33 -0
  145. package/src/settings/validation/primitives.ts +203 -0
  146. package/src/settings/validation/projection.ts +50 -0
  147. package/src/settings/validation/registry.ts +170 -0
  148. package/src/settings/validation.ts +4 -0
  149. package/src/surface-transfer/client.ts +54 -0
  150. package/src/surface-transfer/generated/fields.ts +12 -0
  151. package/src/surface-transfer/generated/protocol.ts +61 -0
  152. package/src/surface-transfer/generated/variant-fields.ts +30 -0
  153. package/src/surface-transfer/index.ts +9 -0
  154. package/src/surface-transfer/validation.ts +209 -0
  155. package/src/surfaces/client.ts +140 -0
  156. package/src/surfaces/generated/fields.ts +19 -0
  157. package/src/surfaces/generated/protocol.ts +217 -0
  158. package/src/surfaces/generated/variant-fields.ts +42 -0
  159. package/src/surfaces/index.ts +9 -0
  160. package/src/surfaces/validation.ts +199 -0
  161. package/src/transfer/client.ts +133 -0
  162. package/src/transfer/connection.ts +87 -0
  163. package/src/transfer/generated/fields.ts +23 -0
  164. package/src/transfer/generated/protocol.ts +171 -0
  165. package/src/transfer/generated/variant-fields.ts +45 -0
  166. package/src/transfer/index.ts +11 -0
  167. package/src/transfer/payload.ts +71 -0
  168. package/src/transfer/validation.ts +282 -0
  169. package/src/update/client.ts +29 -0
  170. package/src/update/controller.ts +255 -0
  171. package/src/update/direct.ts +3 -0
  172. package/src/update/generated/fields.ts +14 -0
  173. package/src/update/generated/protocol.ts +238 -0
  174. package/src/update/generated/variant-fields.ts +44 -0
  175. package/src/update/index.ts +14 -0
  176. package/src/update/ports.ts +36 -0
  177. package/src/update/serialized.ts +12 -0
  178. package/src/update/validation.ts +191 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 inflatable-cookie
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # @inflatable-cookie/longhorn
2
+
3
+ The framework-neutral tier: fourteen domains behind one package, with no
4
+ dependencies and no peers. Rust serde types are authoritative; the generated
5
+ protocol modules are checked against them.
6
+
7
+ ```sh
8
+ effigy check:bindings
9
+ effigy test:ts
10
+ ```
11
+
12
+ Every domain is a subpath. `@inflatable-cookie/longhorn` itself resolves to
13
+ `core`, the base every other domain builds on.
14
+
15
+ | Subpath | Domain |
16
+ | --- | --- |
17
+ | `/core` | identity, opaque values, transports, diagnostics |
18
+ | `/agent-control` | in-page semantic shim (dev control surface, contract 022). Synthetic events are untrusted (`isTrusted` stays false); `wait_for` is DOM-relative. |
19
+ | `/config` | configuration store, backup, restore, recovery |
20
+ | `/layout` | containers, regions, panels, sizing |
21
+ | `/surfaces`, `/surface-transfer` | optional Surface documents and their transfer |
22
+ | `/transfer` | cross-window drag sessions |
23
+ | `/native-content` | native content islands |
24
+ | `/bridge` | typed bridge and optional backend topology |
25
+ | `/commands` | registry, keymaps, palette |
26
+ | `/settings` | settings authority and registry projection |
27
+ | `/notifications`, `/operation` | async operations and their notifications |
28
+ | `/history`, `/history-tree` | history kernel and optional forkable tree |
29
+
30
+ Each domain with a Rust authority also exposes `/<domain>/protocol` — the
31
+ generated types and compatibility guards on their own, for consumers that want
32
+ the wire contract without the client.
33
+
34
+ Nothing here imports a UI framework, a host runtime, or Poodle. That is
35
+ enforced, not merely intended: `tests/boundary.test.ts` fails the build if any
36
+ source file in this package acquires such an edge. The reactive bindings live
37
+ in `@inflatable-cookie/longhorn-poodle-svelte` and the host edges in
38
+ `@inflatable-cookie/longhorn-tauri`, both of which peer on this package.
package/package.json ADDED
@@ -0,0 +1,205 @@
1
+ {
2
+ "name": "@inflatable-cookie/longhorn",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/inflatable-cookie/longhorn.git",
8
+ "directory": "packages/longhorn"
9
+ },
10
+ "homepage": "https://github.com/inflatable-cookie/longhorn#readme",
11
+ "type": "module",
12
+ "types": "./src/core/index.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./src/core/index.ts",
16
+ "import": "./src/core/index.ts",
17
+ "default": "./src/core/index.ts"
18
+ },
19
+ "./agent-control": {
20
+ "types": "./src/agent-control/index.ts",
21
+ "import": "./src/agent-control/index.ts",
22
+ "default": "./src/agent-control/index.ts"
23
+ },
24
+ "./bridge": {
25
+ "types": "./src/bridge/index.ts",
26
+ "import": "./src/bridge/index.ts",
27
+ "default": "./src/bridge/index.ts"
28
+ },
29
+ "./bridge/protocol": {
30
+ "types": "./src/bridge/generated/protocol.ts",
31
+ "import": "./src/bridge/generated/protocol.ts",
32
+ "default": "./src/bridge/generated/protocol.ts"
33
+ },
34
+ "./bridge/stream": {
35
+ "types": "./src/bridge/stream.ts",
36
+ "import": "./src/bridge/stream.ts",
37
+ "default": "./src/bridge/stream.ts"
38
+ },
39
+ "./bridge/supervision": {
40
+ "types": "./src/bridge/supervision.ts",
41
+ "import": "./src/bridge/supervision.ts",
42
+ "default": "./src/bridge/supervision.ts"
43
+ },
44
+ "./commands": {
45
+ "types": "./src/commands/index.ts",
46
+ "import": "./src/commands/index.ts",
47
+ "default": "./src/commands/index.ts"
48
+ },
49
+ "./commands/protocol": {
50
+ "types": "./src/commands/generated/protocol.ts",
51
+ "import": "./src/commands/generated/protocol.ts",
52
+ "default": "./src/commands/generated/protocol.ts"
53
+ },
54
+ "./config": {
55
+ "types": "./src/config/index.ts",
56
+ "import": "./src/config/index.ts",
57
+ "default": "./src/config/index.ts"
58
+ },
59
+ "./config/protocol": {
60
+ "types": "./src/config/generated/protocol.ts",
61
+ "import": "./src/config/generated/protocol.ts",
62
+ "default": "./src/config/generated/protocol.ts"
63
+ },
64
+ "./core": {
65
+ "types": "./src/core/index.ts",
66
+ "import": "./src/core/index.ts",
67
+ "default": "./src/core/index.ts"
68
+ },
69
+ "./history": {
70
+ "types": "./src/history/index.ts",
71
+ "import": "./src/history/index.ts",
72
+ "default": "./src/history/index.ts"
73
+ },
74
+ "./history-tree": {
75
+ "types": "./src/history-tree/index.ts",
76
+ "import": "./src/history-tree/index.ts",
77
+ "default": "./src/history-tree/index.ts"
78
+ },
79
+ "./history-tree/protocol": {
80
+ "types": "./src/history-tree/generated/protocol.ts",
81
+ "import": "./src/history-tree/generated/protocol.ts",
82
+ "default": "./src/history-tree/generated/protocol.ts"
83
+ },
84
+ "./history/protocol": {
85
+ "types": "./src/history/generated/protocol.ts",
86
+ "import": "./src/history/generated/protocol.ts",
87
+ "default": "./src/history/generated/protocol.ts"
88
+ },
89
+ "./layout": {
90
+ "types": "./src/layout/index.ts",
91
+ "import": "./src/layout/index.ts",
92
+ "default": "./src/layout/index.ts"
93
+ },
94
+ "./layout/protocol": {
95
+ "types": "./src/layout/generated/protocol.ts",
96
+ "import": "./src/layout/generated/protocol.ts",
97
+ "default": "./src/layout/generated/protocol.ts"
98
+ },
99
+ "./licence": {
100
+ "types": "./src/licence/index.ts",
101
+ "import": "./src/licence/index.ts",
102
+ "default": "./src/licence/index.ts"
103
+ },
104
+ "./licence/protocol": {
105
+ "types": "./src/licence/generated/protocol.ts",
106
+ "import": "./src/licence/generated/protocol.ts",
107
+ "default": "./src/licence/generated/protocol.ts"
108
+ },
109
+ "./native-content": {
110
+ "types": "./src/native-content/index.ts",
111
+ "import": "./src/native-content/index.ts",
112
+ "default": "./src/native-content/index.ts"
113
+ },
114
+ "./native-content/protocol": {
115
+ "types": "./src/native-content/generated/protocol.ts",
116
+ "import": "./src/native-content/generated/protocol.ts",
117
+ "default": "./src/native-content/generated/protocol.ts"
118
+ },
119
+ "./notifications": {
120
+ "types": "./src/notifications/index.ts",
121
+ "import": "./src/notifications/index.ts",
122
+ "default": "./src/notifications/index.ts"
123
+ },
124
+ "./notifications/protocol": {
125
+ "types": "./src/notifications/generated/protocol.ts",
126
+ "import": "./src/notifications/generated/protocol.ts",
127
+ "default": "./src/notifications/generated/protocol.ts"
128
+ },
129
+ "./operation": {
130
+ "types": "./src/operation/index.ts",
131
+ "import": "./src/operation/index.ts",
132
+ "default": "./src/operation/index.ts"
133
+ },
134
+ "./operation/bridge": {
135
+ "types": "./src/operation/bridge.ts",
136
+ "import": "./src/operation/bridge.ts",
137
+ "default": "./src/operation/bridge.ts"
138
+ },
139
+ "./operation/protocol": {
140
+ "types": "./src/operation/generated/protocol.ts",
141
+ "import": "./src/operation/generated/protocol.ts",
142
+ "default": "./src/operation/generated/protocol.ts"
143
+ },
144
+ "./package.json": "./package.json",
145
+ "./settings": {
146
+ "types": "./src/settings/index.ts",
147
+ "import": "./src/settings/index.ts",
148
+ "default": "./src/settings/index.ts"
149
+ },
150
+ "./settings/protocol": {
151
+ "types": "./src/settings/generated/protocol.ts",
152
+ "import": "./src/settings/generated/protocol.ts",
153
+ "default": "./src/settings/generated/protocol.ts"
154
+ },
155
+ "./surface-transfer": {
156
+ "types": "./src/surface-transfer/index.ts",
157
+ "import": "./src/surface-transfer/index.ts",
158
+ "default": "./src/surface-transfer/index.ts"
159
+ },
160
+ "./surface-transfer/protocol": {
161
+ "types": "./src/surface-transfer/generated/protocol.ts",
162
+ "import": "./src/surface-transfer/generated/protocol.ts",
163
+ "default": "./src/surface-transfer/generated/protocol.ts"
164
+ },
165
+ "./surfaces": {
166
+ "types": "./src/surfaces/index.ts",
167
+ "import": "./src/surfaces/index.ts",
168
+ "default": "./src/surfaces/index.ts"
169
+ },
170
+ "./surfaces/protocol": {
171
+ "types": "./src/surfaces/generated/protocol.ts",
172
+ "import": "./src/surfaces/generated/protocol.ts",
173
+ "default": "./src/surfaces/generated/protocol.ts"
174
+ },
175
+ "./transfer": {
176
+ "types": "./src/transfer/index.ts",
177
+ "import": "./src/transfer/index.ts",
178
+ "default": "./src/transfer/index.ts"
179
+ },
180
+ "./transfer/protocol": {
181
+ "types": "./src/transfer/generated/protocol.ts",
182
+ "import": "./src/transfer/generated/protocol.ts",
183
+ "default": "./src/transfer/generated/protocol.ts"
184
+ },
185
+ "./update": {
186
+ "types": "./src/update/index.ts",
187
+ "import": "./src/update/index.ts",
188
+ "default": "./src/update/index.ts"
189
+ },
190
+ "./update/protocol": {
191
+ "types": "./src/update/generated/protocol.ts",
192
+ "import": "./src/update/generated/protocol.ts",
193
+ "default": "./src/update/generated/protocol.ts"
194
+ }
195
+ },
196
+ "files": [
197
+ "src",
198
+ "README.md",
199
+ "LICENSE"
200
+ ],
201
+ "sideEffects": false,
202
+ "publishConfig": {
203
+ "access": "public"
204
+ }
205
+ }
@@ -0,0 +1,20 @@
1
+ export {
2
+ EVENT_BUFFER_LIMIT,
3
+ MAX_DEPTH,
4
+ MAX_NODES,
5
+ REF_ATTR,
6
+ REF_PREFIX_GLOBAL,
7
+ REF_SEQ_ATTR,
8
+ SHIM_GLOBAL,
9
+ TRUNCATED_REF,
10
+ TRUNCATED_ROLE,
11
+ installAgentControlShim,
12
+ type AgentControlApi,
13
+ type PageEvent,
14
+ type PageState,
15
+ type SemanticNode,
16
+ type ShimResult,
17
+ type ShimWorld,
18
+ type ToolErrorBody,
19
+ type WaitPredicate,
20
+ } from "./shim.ts";
@@ -0,0 +1,4 @@
1
+ import { installAgentControlShim, type ShimWorld } from "./shim.ts";
2
+
3
+ const target = globalThis as unknown as ShimWorld;
4
+ installAgentControlShim(target);