@appport/sdk 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 (387) hide show
  1. package/LICENSE +126 -0
  2. package/README.md +39 -0
  3. package/dist/index.d.ts +14 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +14 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/node.d.ts +3 -0
  8. package/dist/node.d.ts.map +1 -0
  9. package/dist/node.js +3 -0
  10. package/dist/node.js.map +1 -0
  11. package/node_modules/@appport/authorization/README.md +28 -0
  12. package/node_modules/@appport/authorization/dist/index.d.ts +94 -0
  13. package/node_modules/@appport/authorization/dist/index.d.ts.map +1 -0
  14. package/node_modules/@appport/authorization/dist/index.js +131 -0
  15. package/node_modules/@appport/authorization/dist/index.js.map +1 -0
  16. package/node_modules/@appport/authorization/package.json +28 -0
  17. package/node_modules/@appport/client/README.md +35 -0
  18. package/node_modules/@appport/client/dist/channel.d.ts +14 -0
  19. package/node_modules/@appport/client/dist/channel.d.ts.map +1 -0
  20. package/node_modules/@appport/client/dist/channel.js +58 -0
  21. package/node_modules/@appport/client/dist/channel.js.map +1 -0
  22. package/node_modules/@appport/client/dist/client.d.ts +61 -0
  23. package/node_modules/@appport/client/dist/client.d.ts.map +1 -0
  24. package/node_modules/@appport/client/dist/client.js +214 -0
  25. package/node_modules/@appport/client/dist/client.js.map +1 -0
  26. package/node_modules/@appport/client/dist/contract.d.ts +55 -0
  27. package/node_modules/@appport/client/dist/contract.d.ts.map +1 -0
  28. package/node_modules/@appport/client/dist/contract.js +12 -0
  29. package/node_modules/@appport/client/dist/contract.js.map +1 -0
  30. package/node_modules/@appport/client/dist/discovery.d.ts +17 -0
  31. package/node_modules/@appport/client/dist/discovery.d.ts.map +1 -0
  32. package/node_modules/@appport/client/dist/discovery.js +56 -0
  33. package/node_modules/@appport/client/dist/discovery.js.map +1 -0
  34. package/node_modules/@appport/client/dist/duplex.d.ts +25 -0
  35. package/node_modules/@appport/client/dist/duplex.d.ts.map +1 -0
  36. package/node_modules/@appport/client/dist/duplex.js +194 -0
  37. package/node_modules/@appport/client/dist/duplex.js.map +1 -0
  38. package/node_modules/@appport/client/dist/index.d.ts +13 -0
  39. package/node_modules/@appport/client/dist/index.d.ts.map +1 -0
  40. package/node_modules/@appport/client/dist/index.js +13 -0
  41. package/node_modules/@appport/client/dist/index.js.map +1 -0
  42. package/node_modules/@appport/client/dist/transport.d.ts +42 -0
  43. package/node_modules/@appport/client/dist/transport.d.ts.map +1 -0
  44. package/node_modules/@appport/client/dist/transport.js +2 -0
  45. package/node_modules/@appport/client/dist/transport.js.map +1 -0
  46. package/node_modules/@appport/client/package.json +32 -0
  47. package/node_modules/@appport/core/README.md +91 -0
  48. package/node_modules/@appport/core/dist/appboundry-contract.d.ts +80 -0
  49. package/node_modules/@appport/core/dist/appboundry-contract.d.ts.map +1 -0
  50. package/node_modules/@appport/core/dist/appboundry-contract.js +160 -0
  51. package/node_modules/@appport/core/dist/appboundry-contract.js.map +1 -0
  52. package/node_modules/@appport/core/dist/application-implementation.d.ts +125 -0
  53. package/node_modules/@appport/core/dist/application-implementation.d.ts.map +1 -0
  54. package/node_modules/@appport/core/dist/application-implementation.js +220 -0
  55. package/node_modules/@appport/core/dist/application-implementation.js.map +1 -0
  56. package/node_modules/@appport/core/dist/application-lifecycle.d.ts +150 -0
  57. package/node_modules/@appport/core/dist/application-lifecycle.d.ts.map +1 -0
  58. package/node_modules/@appport/core/dist/application-lifecycle.js +70 -0
  59. package/node_modules/@appport/core/dist/application-lifecycle.js.map +1 -0
  60. package/node_modules/@appport/core/dist/application-source.d.ts +109 -0
  61. package/node_modules/@appport/core/dist/application-source.d.ts.map +1 -0
  62. package/node_modules/@appport/core/dist/application-source.js +186 -0
  63. package/node_modules/@appport/core/dist/application-source.js.map +1 -0
  64. package/node_modules/@appport/core/dist/application.d.ts +122 -0
  65. package/node_modules/@appport/core/dist/application.d.ts.map +1 -0
  66. package/node_modules/@appport/core/dist/application.js +515 -0
  67. package/node_modules/@appport/core/dist/application.js.map +1 -0
  68. package/node_modules/@appport/core/dist/artifact.d.ts +395 -0
  69. package/node_modules/@appport/core/dist/artifact.d.ts.map +1 -0
  70. package/node_modules/@appport/core/dist/artifact.js +392 -0
  71. package/node_modules/@appport/core/dist/artifact.js.map +1 -0
  72. package/node_modules/@appport/core/dist/assembly.d.ts +237 -0
  73. package/node_modules/@appport/core/dist/assembly.d.ts.map +1 -0
  74. package/node_modules/@appport/core/dist/assembly.js +458 -0
  75. package/node_modules/@appport/core/dist/assembly.js.map +1 -0
  76. package/node_modules/@appport/core/dist/authority-attestation.d.ts +34 -0
  77. package/node_modules/@appport/core/dist/authority-attestation.d.ts.map +1 -0
  78. package/node_modules/@appport/core/dist/authority-attestation.js +72 -0
  79. package/node_modules/@appport/core/dist/authority-attestation.js.map +1 -0
  80. package/node_modules/@appport/core/dist/authorization-grant.d.ts +107 -0
  81. package/node_modules/@appport/core/dist/authorization-grant.d.ts.map +1 -0
  82. package/node_modules/@appport/core/dist/authorization-grant.js +131 -0
  83. package/node_modules/@appport/core/dist/authorization-grant.js.map +1 -0
  84. package/node_modules/@appport/core/dist/binding.d.ts +294 -0
  85. package/node_modules/@appport/core/dist/binding.d.ts.map +1 -0
  86. package/node_modules/@appport/core/dist/binding.js +263 -0
  87. package/node_modules/@appport/core/dist/binding.js.map +1 -0
  88. package/node_modules/@appport/core/dist/builtins.d.ts +18 -0
  89. package/node_modules/@appport/core/dist/builtins.d.ts.map +1 -0
  90. package/node_modules/@appport/core/dist/builtins.js +38 -0
  91. package/node_modules/@appport/core/dist/builtins.js.map +1 -0
  92. package/node_modules/@appport/core/dist/capability.d.ts +94 -0
  93. package/node_modules/@appport/core/dist/capability.d.ts.map +1 -0
  94. package/node_modules/@appport/core/dist/capability.js +85 -0
  95. package/node_modules/@appport/core/dist/capability.js.map +1 -0
  96. package/node_modules/@appport/core/dist/concurrency.d.ts +16 -0
  97. package/node_modules/@appport/core/dist/concurrency.d.ts.map +1 -0
  98. package/node_modules/@appport/core/dist/concurrency.js +46 -0
  99. package/node_modules/@appport/core/dist/concurrency.js.map +1 -0
  100. package/node_modules/@appport/core/dist/context.d.ts +59 -0
  101. package/node_modules/@appport/core/dist/context.d.ts.map +1 -0
  102. package/node_modules/@appport/core/dist/context.js +14 -0
  103. package/node_modules/@appport/core/dist/context.js.map +1 -0
  104. package/node_modules/@appport/core/dist/contract-artifact.d.ts +15 -0
  105. package/node_modules/@appport/core/dist/contract-artifact.d.ts.map +1 -0
  106. package/node_modules/@appport/core/dist/contract-artifact.js +152 -0
  107. package/node_modules/@appport/core/dist/contract-artifact.js.map +1 -0
  108. package/node_modules/@appport/core/dist/contract-attestation.d.ts +68 -0
  109. package/node_modules/@appport/core/dist/contract-attestation.d.ts.map +1 -0
  110. package/node_modules/@appport/core/dist/contract-attestation.js +76 -0
  111. package/node_modules/@appport/core/dist/contract-attestation.js.map +1 -0
  112. package/node_modules/@appport/core/dist/crash-injection.d.ts +3 -0
  113. package/node_modules/@appport/core/dist/crash-injection.d.ts.map +1 -0
  114. package/node_modules/@appport/core/dist/crash-injection.js +8 -0
  115. package/node_modules/@appport/core/dist/crash-injection.js.map +1 -0
  116. package/node_modules/@appport/core/dist/events.d.ts +33 -0
  117. package/node_modules/@appport/core/dist/events.d.ts.map +1 -0
  118. package/node_modules/@appport/core/dist/events.js +79 -0
  119. package/node_modules/@appport/core/dist/events.js.map +1 -0
  120. package/node_modules/@appport/core/dist/execution-barrier.d.ts +13 -0
  121. package/node_modules/@appport/core/dist/execution-barrier.d.ts.map +1 -0
  122. package/node_modules/@appport/core/dist/execution-barrier.js +33 -0
  123. package/node_modules/@appport/core/dist/execution-barrier.js.map +1 -0
  124. package/node_modules/@appport/core/dist/execution-ledger.d.ts +81 -0
  125. package/node_modules/@appport/core/dist/execution-ledger.d.ts.map +1 -0
  126. package/node_modules/@appport/core/dist/execution-ledger.js +173 -0
  127. package/node_modules/@appport/core/dist/execution-ledger.js.map +1 -0
  128. package/node_modules/@appport/core/dist/execution.d.ts +387 -0
  129. package/node_modules/@appport/core/dist/execution.d.ts.map +1 -0
  130. package/node_modules/@appport/core/dist/execution.js +165 -0
  131. package/node_modules/@appport/core/dist/execution.js.map +1 -0
  132. package/node_modules/@appport/core/dist/idempotency.d.ts +36 -0
  133. package/node_modules/@appport/core/dist/idempotency.d.ts.map +1 -0
  134. package/node_modules/@appport/core/dist/idempotency.js +36 -0
  135. package/node_modules/@appport/core/dist/idempotency.js.map +1 -0
  136. package/node_modules/@appport/core/dist/implementation.d.ts +110 -0
  137. package/node_modules/@appport/core/dist/implementation.d.ts.map +1 -0
  138. package/node_modules/@appport/core/dist/implementation.js +65 -0
  139. package/node_modules/@appport/core/dist/implementation.js.map +1 -0
  140. package/node_modules/@appport/core/dist/index.d.ts +44 -0
  141. package/node_modules/@appport/core/dist/index.d.ts.map +1 -0
  142. package/node_modules/@appport/core/dist/index.js +44 -0
  143. package/node_modules/@appport/core/dist/index.js.map +1 -0
  144. package/node_modules/@appport/core/dist/invocation.d.ts +253 -0
  145. package/node_modules/@appport/core/dist/invocation.d.ts.map +1 -0
  146. package/node_modules/@appport/core/dist/invocation.js +258 -0
  147. package/node_modules/@appport/core/dist/invocation.js.map +1 -0
  148. package/node_modules/@appport/core/dist/manifest.d.ts +157 -0
  149. package/node_modules/@appport/core/dist/manifest.d.ts.map +1 -0
  150. package/node_modules/@appport/core/dist/manifest.js +255 -0
  151. package/node_modules/@appport/core/dist/manifest.js.map +1 -0
  152. package/node_modules/@appport/core/dist/memory-application-data-store.d.ts +19 -0
  153. package/node_modules/@appport/core/dist/memory-application-data-store.d.ts.map +1 -0
  154. package/node_modules/@appport/core/dist/memory-application-data-store.js +161 -0
  155. package/node_modules/@appport/core/dist/memory-application-data-store.js.map +1 -0
  156. package/node_modules/@appport/core/dist/operations.d.ts +61 -0
  157. package/node_modules/@appport/core/dist/operations.d.ts.map +1 -0
  158. package/node_modules/@appport/core/dist/operations.js +210 -0
  159. package/node_modules/@appport/core/dist/operations.js.map +1 -0
  160. package/node_modules/@appport/core/dist/public.d.ts +19 -0
  161. package/node_modules/@appport/core/dist/public.d.ts.map +1 -0
  162. package/node_modules/@appport/core/dist/public.js +18 -0
  163. package/node_modules/@appport/core/dist/public.js.map +1 -0
  164. package/node_modules/@appport/core/dist/registration.d.ts +165 -0
  165. package/node_modules/@appport/core/dist/registration.d.ts.map +1 -0
  166. package/node_modules/@appport/core/dist/registration.js +253 -0
  167. package/node_modules/@appport/core/dist/registration.js.map +1 -0
  168. package/node_modules/@appport/core/dist/registry.d.ts +29 -0
  169. package/node_modules/@appport/core/dist/registry.d.ts.map +1 -0
  170. package/node_modules/@appport/core/dist/registry.js +148 -0
  171. package/node_modules/@appport/core/dist/registry.js.map +1 -0
  172. package/node_modules/@appport/core/dist/repository-connection.d.ts +100 -0
  173. package/node_modules/@appport/core/dist/repository-connection.d.ts.map +1 -0
  174. package/node_modules/@appport/core/dist/repository-connection.js +57 -0
  175. package/node_modules/@appport/core/dist/repository-connection.js.map +1 -0
  176. package/node_modules/@appport/core/dist/resolver.d.ts +130 -0
  177. package/node_modules/@appport/core/dist/resolver.d.ts.map +1 -0
  178. package/node_modules/@appport/core/dist/resolver.js +252 -0
  179. package/node_modules/@appport/core/dist/resolver.js.map +1 -0
  180. package/node_modules/@appport/core/dist/runtime-manifest.d.ts +68 -0
  181. package/node_modules/@appport/core/dist/runtime-manifest.d.ts.map +1 -0
  182. package/node_modules/@appport/core/dist/runtime-manifest.js +84 -0
  183. package/node_modules/@appport/core/dist/runtime-manifest.js.map +1 -0
  184. package/node_modules/@appport/core/dist/sanitize.d.ts +14 -0
  185. package/node_modules/@appport/core/dist/sanitize.d.ts.map +1 -0
  186. package/node_modules/@appport/core/dist/sanitize.js +49 -0
  187. package/node_modules/@appport/core/dist/sanitize.js.map +1 -0
  188. package/node_modules/@appport/core/dist/server-internal.d.ts +5 -0
  189. package/node_modules/@appport/core/dist/server-internal.d.ts.map +1 -0
  190. package/node_modules/@appport/core/dist/server-internal.js +4 -0
  191. package/node_modules/@appport/core/dist/server-internal.js.map +1 -0
  192. package/node_modules/@appport/core/dist/sessions.d.ts +29 -0
  193. package/node_modules/@appport/core/dist/sessions.d.ts.map +1 -0
  194. package/node_modules/@appport/core/dist/sessions.js +39 -0
  195. package/node_modules/@appport/core/dist/sessions.js.map +1 -0
  196. package/node_modules/@appport/core/dist/sha256.d.ts +3 -0
  197. package/node_modules/@appport/core/dist/sha256.d.ts.map +1 -0
  198. package/node_modules/@appport/core/dist/sha256.js +46 -0
  199. package/node_modules/@appport/core/dist/sha256.js.map +1 -0
  200. package/node_modules/@appport/core/dist/source-verification.d.ts +53 -0
  201. package/node_modules/@appport/core/dist/source-verification.d.ts.map +1 -0
  202. package/node_modules/@appport/core/dist/source-verification.js +92 -0
  203. package/node_modules/@appport/core/dist/source-verification.js.map +1 -0
  204. package/node_modules/@appport/core/dist/state-context.d.ts +312 -0
  205. package/node_modules/@appport/core/dist/state-context.d.ts.map +1 -0
  206. package/node_modules/@appport/core/dist/state-context.js +100 -0
  207. package/node_modules/@appport/core/dist/state-context.js.map +1 -0
  208. package/node_modules/@appport/core/dist/state.d.ts +96 -0
  209. package/node_modules/@appport/core/dist/state.d.ts.map +1 -0
  210. package/node_modules/@appport/core/dist/state.js +89 -0
  211. package/node_modules/@appport/core/dist/state.js.map +1 -0
  212. package/node_modules/@appport/core/dist/streams.d.ts +38 -0
  213. package/node_modules/@appport/core/dist/streams.d.ts.map +1 -0
  214. package/node_modules/@appport/core/dist/streams.js +123 -0
  215. package/node_modules/@appport/core/dist/streams.js.map +1 -0
  216. package/node_modules/@appport/core/dist/telemetry.d.ts +42 -0
  217. package/node_modules/@appport/core/dist/telemetry.d.ts.map +1 -0
  218. package/node_modules/@appport/core/dist/telemetry.js +32 -0
  219. package/node_modules/@appport/core/dist/telemetry.js.map +1 -0
  220. package/node_modules/@appport/core/dist/wasm-engine.d.ts +22 -0
  221. package/node_modules/@appport/core/dist/wasm-engine.d.ts.map +1 -0
  222. package/node_modules/@appport/core/dist/wasm-engine.js +367 -0
  223. package/node_modules/@appport/core/dist/wasm-engine.js.map +1 -0
  224. package/node_modules/@appport/core/package.json +58 -0
  225. package/node_modules/@appport/mobile/README.md +10 -0
  226. package/node_modules/@appport/mobile/dist/index.d.ts +66 -0
  227. package/node_modules/@appport/mobile/dist/index.d.ts.map +1 -0
  228. package/node_modules/@appport/mobile/dist/index.js +182 -0
  229. package/node_modules/@appport/mobile/dist/index.js.map +1 -0
  230. package/node_modules/@appport/mobile/package.json +33 -0
  231. package/node_modules/@appport/protocol/README.md +41 -0
  232. package/node_modules/@appport/protocol/dist/blob.d.ts +46 -0
  233. package/node_modules/@appport/protocol/dist/blob.d.ts.map +1 -0
  234. package/node_modules/@appport/protocol/dist/blob.js +23 -0
  235. package/node_modules/@appport/protocol/dist/blob.js.map +1 -0
  236. package/node_modules/@appport/protocol/dist/compatibility.d.ts +25 -0
  237. package/node_modules/@appport/protocol/dist/compatibility.d.ts.map +1 -0
  238. package/node_modules/@appport/protocol/dist/compatibility.js +189 -0
  239. package/node_modules/@appport/protocol/dist/compatibility.js.map +1 -0
  240. package/node_modules/@appport/protocol/dist/envelopes.d.ts +175 -0
  241. package/node_modules/@appport/protocol/dist/envelopes.d.ts.map +1 -0
  242. package/node_modules/@appport/protocol/dist/envelopes.js +97 -0
  243. package/node_modules/@appport/protocol/dist/envelopes.js.map +1 -0
  244. package/node_modules/@appport/protocol/dist/errors.d.ts +74 -0
  245. package/node_modules/@appport/protocol/dist/errors.d.ts.map +1 -0
  246. package/node_modules/@appport/protocol/dist/errors.js +91 -0
  247. package/node_modules/@appport/protocol/dist/errors.js.map +1 -0
  248. package/node_modules/@appport/protocol/dist/ids.d.ts +12 -0
  249. package/node_modules/@appport/protocol/dist/ids.d.ts.map +1 -0
  250. package/node_modules/@appport/protocol/dist/ids.js +50 -0
  251. package/node_modules/@appport/protocol/dist/ids.js.map +1 -0
  252. package/node_modules/@appport/protocol/dist/index.d.ts +20 -0
  253. package/node_modules/@appport/protocol/dist/index.d.ts.map +1 -0
  254. package/node_modules/@appport/protocol/dist/index.js +20 -0
  255. package/node_modules/@appport/protocol/dist/index.js.map +1 -0
  256. package/node_modules/@appport/protocol/dist/jsonschema.d.ts +50 -0
  257. package/node_modules/@appport/protocol/dist/jsonschema.d.ts.map +1 -0
  258. package/node_modules/@appport/protocol/dist/jsonschema.js +6 -0
  259. package/node_modules/@appport/protocol/dist/jsonschema.js.map +1 -0
  260. package/node_modules/@appport/protocol/dist/manifest.d.ts +131 -0
  261. package/node_modules/@appport/protocol/dist/manifest.d.ts.map +1 -0
  262. package/node_modules/@appport/protocol/dist/manifest.js +20 -0
  263. package/node_modules/@appport/protocol/dist/manifest.js.map +1 -0
  264. package/node_modules/@appport/protocol/dist/names.d.ts +26 -0
  265. package/node_modules/@appport/protocol/dist/names.d.ts.map +1 -0
  266. package/node_modules/@appport/protocol/dist/names.js +85 -0
  267. package/node_modules/@appport/protocol/dist/names.js.map +1 -0
  268. package/node_modules/@appport/protocol/dist/operations.d.ts +34 -0
  269. package/node_modules/@appport/protocol/dist/operations.d.ts.map +1 -0
  270. package/node_modules/@appport/protocol/dist/operations.js +9 -0
  271. package/node_modules/@appport/protocol/dist/operations.js.map +1 -0
  272. package/node_modules/@appport/protocol/dist/session.d.ts +27 -0
  273. package/node_modules/@appport/protocol/dist/session.d.ts.map +1 -0
  274. package/node_modules/@appport/protocol/dist/session.js +7 -0
  275. package/node_modules/@appport/protocol/dist/session.js.map +1 -0
  276. package/node_modules/@appport/protocol/dist/validate.d.ts +37 -0
  277. package/node_modules/@appport/protocol/dist/validate.d.ts.map +1 -0
  278. package/node_modules/@appport/protocol/dist/validate.js +321 -0
  279. package/node_modules/@appport/protocol/dist/validate.js.map +1 -0
  280. package/node_modules/@appport/protocol/dist/version.d.ts +27 -0
  281. package/node_modules/@appport/protocol/dist/version.d.ts.map +1 -0
  282. package/node_modules/@appport/protocol/dist/version.js +26 -0
  283. package/node_modules/@appport/protocol/dist/version.js.map +1 -0
  284. package/node_modules/@appport/protocol/package.json +25 -0
  285. package/node_modules/@appport/schema/README.md +32 -0
  286. package/node_modules/@appport/schema/dist/builder.d.ts +85 -0
  287. package/node_modules/@appport/schema/dist/builder.d.ts.map +1 -0
  288. package/node_modules/@appport/schema/dist/builder.js +278 -0
  289. package/node_modules/@appport/schema/dist/builder.js.map +1 -0
  290. package/node_modules/@appport/schema/dist/from-json-schema.d.ts +12 -0
  291. package/node_modules/@appport/schema/dist/from-json-schema.d.ts.map +1 -0
  292. package/node_modules/@appport/schema/dist/from-json-schema.js +186 -0
  293. package/node_modules/@appport/schema/dist/from-json-schema.js.map +1 -0
  294. package/node_modules/@appport/schema/dist/index.d.ts +23 -0
  295. package/node_modules/@appport/schema/dist/index.d.ts.map +1 -0
  296. package/node_modules/@appport/schema/dist/index.js +22 -0
  297. package/node_modules/@appport/schema/dist/index.js.map +1 -0
  298. package/node_modules/@appport/schema/dist/standard.d.ts +46 -0
  299. package/node_modules/@appport/schema/dist/standard.d.ts.map +1 -0
  300. package/node_modules/@appport/schema/dist/standard.js +42 -0
  301. package/node_modules/@appport/schema/dist/standard.js.map +1 -0
  302. package/node_modules/@appport/schema/dist/types.d.ts +40 -0
  303. package/node_modules/@appport/schema/dist/types.d.ts.map +1 -0
  304. package/node_modules/@appport/schema/dist/types.js +19 -0
  305. package/node_modules/@appport/schema/dist/types.js.map +1 -0
  306. package/node_modules/@appport/schema/package.json +28 -0
  307. package/node_modules/@appport/server/README.md +39 -0
  308. package/node_modules/@appport/server/dist/connection.d.ts +45 -0
  309. package/node_modules/@appport/server/dist/connection.d.ts.map +1 -0
  310. package/node_modules/@appport/server/dist/connection.js +217 -0
  311. package/node_modules/@appport/server/dist/connection.js.map +1 -0
  312. package/node_modules/@appport/server/dist/fetch.d.ts +10 -0
  313. package/node_modules/@appport/server/dist/fetch.d.ts.map +1 -0
  314. package/node_modules/@appport/server/dist/fetch.js +50 -0
  315. package/node_modules/@appport/server/dist/fetch.js.map +1 -0
  316. package/node_modules/@appport/server/dist/http.d.ts +80 -0
  317. package/node_modules/@appport/server/dist/http.d.ts.map +1 -0
  318. package/node_modules/@appport/server/dist/http.js +306 -0
  319. package/node_modules/@appport/server/dist/http.js.map +1 -0
  320. package/node_modules/@appport/server/dist/index.d.ts +11 -0
  321. package/node_modules/@appport/server/dist/index.d.ts.map +1 -0
  322. package/node_modules/@appport/server/dist/index.js +11 -0
  323. package/node_modules/@appport/server/dist/index.js.map +1 -0
  324. package/node_modules/@appport/server/dist/node-entry.d.ts +4 -0
  325. package/node_modules/@appport/server/dist/node-entry.d.ts.map +1 -0
  326. package/node_modules/@appport/server/dist/node-entry.js +4 -0
  327. package/node_modules/@appport/server/dist/node-entry.js.map +1 -0
  328. package/node_modules/@appport/server/dist/node.d.ts +45 -0
  329. package/node_modules/@appport/server/dist/node.d.ts.map +1 -0
  330. package/node_modules/@appport/server/dist/node.js +190 -0
  331. package/node_modules/@appport/server/dist/node.js.map +1 -0
  332. package/node_modules/@appport/server/dist/server.d.ts +83 -0
  333. package/node_modules/@appport/server/dist/server.d.ts.map +1 -0
  334. package/node_modules/@appport/server/dist/server.js +114 -0
  335. package/node_modules/@appport/server/dist/server.js.map +1 -0
  336. package/node_modules/@appport/server/dist/websocket.d.ts +25 -0
  337. package/node_modules/@appport/server/dist/websocket.d.ts.map +1 -0
  338. package/node_modules/@appport/server/dist/websocket.js +221 -0
  339. package/node_modules/@appport/server/dist/websocket.js.map +1 -0
  340. package/node_modules/@appport/server/package.json +34 -0
  341. package/node_modules/@appport/transport-electron/README.md +56 -0
  342. package/node_modules/@appport/transport-electron/dist/index.d.ts +11 -0
  343. package/node_modules/@appport/transport-electron/dist/index.d.ts.map +1 -0
  344. package/node_modules/@appport/transport-electron/dist/index.js +11 -0
  345. package/node_modules/@appport/transport-electron/dist/index.js.map +1 -0
  346. package/node_modules/@appport/transport-electron/dist/main.d.ts +31 -0
  347. package/node_modules/@appport/transport-electron/dist/main.d.ts.map +1 -0
  348. package/node_modules/@appport/transport-electron/dist/main.js +61 -0
  349. package/node_modules/@appport/transport-electron/dist/main.js.map +1 -0
  350. package/node_modules/@appport/transport-electron/dist/preload.d.ts +22 -0
  351. package/node_modules/@appport/transport-electron/dist/preload.d.ts.map +1 -0
  352. package/node_modules/@appport/transport-electron/dist/preload.js +29 -0
  353. package/node_modules/@appport/transport-electron/dist/preload.js.map +1 -0
  354. package/node_modules/@appport/transport-electron/dist/renderer.d.ts +16 -0
  355. package/node_modules/@appport/transport-electron/dist/renderer.d.ts.map +1 -0
  356. package/node_modules/@appport/transport-electron/dist/renderer.js +36 -0
  357. package/node_modules/@appport/transport-electron/dist/renderer.js.map +1 -0
  358. package/node_modules/@appport/transport-electron/dist/types.d.ts +49 -0
  359. package/node_modules/@appport/transport-electron/dist/types.d.ts.map +1 -0
  360. package/node_modules/@appport/transport-electron/dist/types.js +5 -0
  361. package/node_modules/@appport/transport-electron/dist/types.js.map +1 -0
  362. package/node_modules/@appport/transport-electron/package.json +46 -0
  363. package/node_modules/@appport/transport-http/README.md +24 -0
  364. package/node_modules/@appport/transport-http/dist/index.d.ts +18 -0
  365. package/node_modules/@appport/transport-http/dist/index.d.ts.map +1 -0
  366. package/node_modules/@appport/transport-http/dist/index.js +223 -0
  367. package/node_modules/@appport/transport-http/dist/index.js.map +1 -0
  368. package/node_modules/@appport/transport-http/package.json +29 -0
  369. package/node_modules/@appport/transport-inprocess/README.md +24 -0
  370. package/node_modules/@appport/transport-inprocess/dist/index.d.ts +16 -0
  371. package/node_modules/@appport/transport-inprocess/dist/index.d.ts.map +1 -0
  372. package/node_modules/@appport/transport-inprocess/dist/index.js +30 -0
  373. package/node_modules/@appport/transport-inprocess/dist/index.js.map +1 -0
  374. package/node_modules/@appport/transport-inprocess/package.json +30 -0
  375. package/node_modules/@appport/transport-tauri/README.md +45 -0
  376. package/node_modules/@appport/transport-tauri/dist/index.d.ts +23 -0
  377. package/node_modules/@appport/transport-tauri/dist/index.d.ts.map +1 -0
  378. package/node_modules/@appport/transport-tauri/dist/index.js +44 -0
  379. package/node_modules/@appport/transport-tauri/dist/index.js.map +1 -0
  380. package/node_modules/@appport/transport-tauri/package.json +29 -0
  381. package/node_modules/@appport/transport-websocket/README.md +22 -0
  382. package/node_modules/@appport/transport-websocket/dist/index.d.ts +26 -0
  383. package/node_modules/@appport/transport-websocket/dist/index.d.ts.map +1 -0
  384. package/node_modules/@appport/transport-websocket/dist/index.js +72 -0
  385. package/node_modules/@appport/transport-websocket/dist/index.js.map +1 -0
  386. package/node_modules/@appport/transport-websocket/package.json +29 -0
  387. package/package.json +79 -0
@@ -0,0 +1,175 @@
1
+ import type { AppErrorObject, JsonValue } from "./errors.js";
2
+ import { type ProtocolId } from "./version.js";
3
+ /** A capability reference: name plus the requested capability version (§42). */
4
+ export interface CapabilityRef {
5
+ name: string;
6
+ version: number;
7
+ }
8
+ /**
9
+ * Transport-neutral request metadata (§10).
10
+ *
11
+ * Metadata never carries transport primitives (HTTP headers, IPC handles).
12
+ * A transport MAY populate `transport` and `receivedAt`; everything else is
13
+ * supplied by the application.
14
+ */
15
+ export interface RequestMetadata {
16
+ /** Kind of the transport that carried the request, e.g. `http`, `ipc`. */
17
+ transport?: string;
18
+ /** ISO-8601 timestamp assigned when the server accepted the envelope. */
19
+ receivedAt?: string;
20
+ /** BCP-47 locale hint. */
21
+ locale?: string;
22
+ /** Free-form, non-sensitive application metadata. */
23
+ attributes?: Record<string, JsonValue>;
24
+ }
25
+ /** Fields shared by every envelope. */
26
+ export interface EnvelopeBase {
27
+ protocol: ProtocolId;
28
+ type: EnvelopeType;
29
+ /** Correlation identifier propagated across process boundaries (§54). */
30
+ traceId?: string;
31
+ /** Namespaced protocol extensions (§71). Unknown extensions are ignored. */
32
+ extensions?: Record<string, JsonValue>;
33
+ }
34
+ export declare const ENVELOPE_TYPES: readonly ["request", "response", "event", "subscribe", "unsubscribe", "stream.request", "stream.start", "stream.chunk", "stream.end", "stream.cancel"];
35
+ export type EnvelopeType = (typeof ENVELOPE_TYPES)[number];
36
+ /** Request → response (§11). */
37
+ export interface AppRequest<Input = unknown> extends EnvelopeBase {
38
+ type: "request";
39
+ requestId: string;
40
+ capability: CapabilityRef;
41
+ input: Input;
42
+ /** Deduplication key for mutating capabilities (§44). */
43
+ idempotencyKey?: string;
44
+ /** Client-requested deadline in milliseconds (§46). Servers MAY clamp it. */
45
+ timeoutMs?: number;
46
+ metadata?: RequestMetadata;
47
+ }
48
+ /** Request → sequence of values (§20). Same shape as {@link AppRequest}. */
49
+ export interface AppStreamRequest<Input = unknown> extends Omit<AppRequest<Input>, "type"> {
50
+ type: "stream.request";
51
+ }
52
+ export interface AppSuccessResponse<Output = unknown> extends EnvelopeBase {
53
+ type: "response";
54
+ requestId: string;
55
+ ok: true;
56
+ output: Output;
57
+ }
58
+ export interface AppErrorResponse extends EnvelopeBase {
59
+ type: "response";
60
+ requestId: string;
61
+ ok: false;
62
+ error: AppErrorObject;
63
+ }
64
+ export type AppResponse<Output = unknown> = AppSuccessResponse<Output> | AppErrorResponse;
65
+ /** Publisher → subscribers (§17). Events are one-way and never answered. */
66
+ export interface AppEventEnvelope<Payload = unknown> extends EnvelopeBase {
67
+ type: "event";
68
+ event: CapabilityRef;
69
+ eventId: string;
70
+ /** ISO-8601 timestamp of publication. */
71
+ timestamp: string;
72
+ payload: Payload;
73
+ /** Set when the event is delivered against a specific subscription (§18). */
74
+ subscriptionId?: string;
75
+ }
76
+ /** Client → server subscription control (§18). */
77
+ export interface AppSubscribeRequest extends EnvelopeBase {
78
+ type: "subscribe";
79
+ requestId: string;
80
+ subscriptionId: string;
81
+ /** Event name, or `*` for every event the session may observe. */
82
+ event: {
83
+ name: string;
84
+ version?: number;
85
+ };
86
+ }
87
+ export interface AppUnsubscribeRequest extends EnvelopeBase {
88
+ type: "unsubscribe";
89
+ requestId: string;
90
+ subscriptionId: string;
91
+ }
92
+ export interface AppStreamStart extends EnvelopeBase {
93
+ type: "stream.start";
94
+ requestId: string;
95
+ streamId: string;
96
+ }
97
+ export interface AppStreamChunk<Payload = unknown> extends EnvelopeBase {
98
+ type: "stream.chunk";
99
+ streamId: string;
100
+ /** Zero-based, strictly increasing within a stream. */
101
+ sequence: number;
102
+ payload: Payload;
103
+ }
104
+ export interface AppStreamEnd extends EnvelopeBase {
105
+ type: "stream.end";
106
+ streamId: string;
107
+ /** Present when the stream terminated abnormally (`STREAM_ERROR`, `CANCELLED`). */
108
+ error?: AppErrorObject;
109
+ }
110
+ /** Client → server stream cancellation (§21). */
111
+ export interface AppStreamCancel extends EnvelopeBase {
112
+ type: "stream.cancel";
113
+ streamId: string;
114
+ reason?: string;
115
+ }
116
+ export type AppEnvelope = AppRequest | AppStreamRequest | AppResponse | AppEventEnvelope | AppSubscribeRequest | AppUnsubscribeRequest | AppStreamStart | AppStreamChunk | AppStreamEnd | AppStreamCancel;
117
+ /** Envelopes a client sends to a server. */
118
+ export type ClientEnvelope = AppRequest | AppStreamRequest | AppSubscribeRequest | AppUnsubscribeRequest | AppStreamCancel;
119
+ /** Envelopes a server sends to a client. */
120
+ export type ServerEnvelope = AppResponse | AppEventEnvelope | AppStreamStart | AppStreamChunk | AppStreamEnd;
121
+ export interface CreateRequestOptions {
122
+ requestId: string;
123
+ capability: CapabilityRef;
124
+ input: unknown;
125
+ idempotencyKey?: string;
126
+ timeoutMs?: number;
127
+ traceId?: string;
128
+ metadata?: RequestMetadata;
129
+ extensions?: Record<string, JsonValue>;
130
+ }
131
+ export declare function createRequest(options: CreateRequestOptions): AppRequest;
132
+ export declare function createStreamRequest(options: CreateRequestOptions): AppStreamRequest;
133
+ export declare function createSuccessResponse<Output>(requestId: string, output: Output, extra?: {
134
+ traceId?: string;
135
+ extensions?: Record<string, JsonValue>;
136
+ }): AppSuccessResponse<Output>;
137
+ export declare function createErrorResponse(requestId: string, error: AppErrorObject, extra?: {
138
+ traceId?: string;
139
+ extensions?: Record<string, JsonValue>;
140
+ }): AppErrorResponse;
141
+ export declare function createEvent<Payload>(options: {
142
+ name: string;
143
+ version: number;
144
+ eventId: string;
145
+ payload: Payload;
146
+ timestamp?: string;
147
+ subscriptionId?: string;
148
+ traceId?: string;
149
+ extensions?: Record<string, JsonValue>;
150
+ }): AppEventEnvelope<Payload>;
151
+ export declare function createStreamStart(requestId: string, streamId: string, traceId?: string): AppStreamStart;
152
+ export declare function createStreamChunk<Payload>(streamId: string, sequence: number, payload: Payload): AppStreamChunk<Payload>;
153
+ export declare function createStreamEnd(streamId: string, error?: AppErrorObject): AppStreamEnd;
154
+ export declare function createStreamCancel(streamId: string, reason?: string): AppStreamCancel;
155
+ export declare function createSubscribe(requestId: string, subscriptionId: string, event: {
156
+ name: string;
157
+ version?: number;
158
+ }): AppSubscribeRequest;
159
+ export declare function createUnsubscribe(requestId: string, subscriptionId: string): AppUnsubscribeRequest;
160
+ declare function isEnvelopeLike(value: unknown): value is EnvelopeBase;
161
+ export declare const isEnvelope: typeof isEnvelopeLike;
162
+ export declare const isRequest: (v: unknown) => v is AppRequest;
163
+ export declare const isStreamRequest: (v: unknown) => v is AppStreamRequest;
164
+ export declare const isResponse: (v: unknown) => v is AppResponse;
165
+ export declare const isEventEnvelope: (v: unknown) => v is AppEventEnvelope;
166
+ export declare const isSubscribeRequest: (v: unknown) => v is AppSubscribeRequest;
167
+ export declare const isUnsubscribeRequest: (v: unknown) => v is AppUnsubscribeRequest;
168
+ export declare const isStreamStart: (v: unknown) => v is AppStreamStart;
169
+ export declare const isStreamChunk: (v: unknown) => v is AppStreamChunk;
170
+ export declare const isStreamEnd: (v: unknown) => v is AppStreamEnd;
171
+ export declare const isStreamCancel: (v: unknown) => v is AppStreamCancel;
172
+ export declare const isSuccessResponse: <O>(v: AppResponse<O>) => v is AppSuccessResponse<O>;
173
+ export declare const isErrorResponse: (v: AppResponse<unknown>) => v is AppErrorResponse;
174
+ export {};
175
+ //# sourceMappingURL=envelopes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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C;AAC9C,eAAO,MAAM,oBAAoB,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,qBACR,CAAC;AAChD,eAAO,MAAM,aAAa,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,cAAgE,CAAC;AACjH,eAAO,MAAM,aAAa,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,cAAgE,CAAC;AACjH,eAAO,MAAM,WAAW,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,YAA4D,CAAC;AAC3G,eAAO,MAAM,cAAc,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,eAAkE,CAAC;AAEpH,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAkB,CAAC;AACrG,eAAO,MAAM,eAAe,GAAI,GAAG,WAAW,CAAC,OAAO,CAAC,KAAG,CAAC,IAAI,gBAAkC,CAAC"}
@@ -0,0 +1,97 @@
1
+ import { PROTOCOL_ID } from "./version.js";
2
+ export const ENVELOPE_TYPES = [
3
+ "request",
4
+ "response",
5
+ "event",
6
+ "subscribe",
7
+ "unsubscribe",
8
+ "stream.request",
9
+ "stream.start",
10
+ "stream.chunk",
11
+ "stream.end",
12
+ "stream.cancel"
13
+ ];
14
+ function withOptional(base, optional) {
15
+ for (const [key, value] of Object.entries(optional)) {
16
+ if (value !== undefined)
17
+ base[key] = value;
18
+ }
19
+ return base;
20
+ }
21
+ export function createRequest(options) {
22
+ return withOptional({
23
+ protocol: PROTOCOL_ID,
24
+ type: "request",
25
+ requestId: options.requestId,
26
+ capability: options.capability,
27
+ input: options.input
28
+ }, {
29
+ idempotencyKey: options.idempotencyKey,
30
+ timeoutMs: options.timeoutMs,
31
+ traceId: options.traceId,
32
+ metadata: options.metadata,
33
+ extensions: options.extensions
34
+ });
35
+ }
36
+ export function createStreamRequest(options) {
37
+ return { ...createRequest(options), type: "stream.request" };
38
+ }
39
+ export function createSuccessResponse(requestId, output, extra = {}) {
40
+ return withOptional({ protocol: PROTOCOL_ID, type: "response", requestId, ok: true, output }, extra);
41
+ }
42
+ export function createErrorResponse(requestId, error, extra = {}) {
43
+ return withOptional({ protocol: PROTOCOL_ID, type: "response", requestId, ok: false, error }, extra);
44
+ }
45
+ export function createEvent(options) {
46
+ return withOptional({
47
+ protocol: PROTOCOL_ID,
48
+ type: "event",
49
+ event: { name: options.name, version: options.version },
50
+ eventId: options.eventId,
51
+ timestamp: options.timestamp ?? new Date().toISOString(),
52
+ payload: options.payload
53
+ }, { subscriptionId: options.subscriptionId, traceId: options.traceId, extensions: options.extensions });
54
+ }
55
+ export function createStreamStart(requestId, streamId, traceId) {
56
+ return withOptional({ protocol: PROTOCOL_ID, type: "stream.start", requestId, streamId }, {
57
+ traceId
58
+ });
59
+ }
60
+ export function createStreamChunk(streamId, sequence, payload) {
61
+ return { protocol: PROTOCOL_ID, type: "stream.chunk", streamId, sequence, payload };
62
+ }
63
+ export function createStreamEnd(streamId, error) {
64
+ return withOptional({ protocol: PROTOCOL_ID, type: "stream.end", streamId }, { error });
65
+ }
66
+ export function createStreamCancel(streamId, reason) {
67
+ return withOptional({ protocol: PROTOCOL_ID, type: "stream.cancel", streamId }, { reason });
68
+ }
69
+ export function createSubscribe(requestId, subscriptionId, event) {
70
+ return { protocol: PROTOCOL_ID, type: "subscribe", requestId, subscriptionId, event };
71
+ }
72
+ export function createUnsubscribe(requestId, subscriptionId) {
73
+ return { protocol: PROTOCOL_ID, type: "unsubscribe", requestId, subscriptionId };
74
+ }
75
+ // ---------------------------------------------------------------------------
76
+ // Guards
77
+ // ---------------------------------------------------------------------------
78
+ function isEnvelopeLike(value) {
79
+ return (typeof value === "object" &&
80
+ value !== null &&
81
+ value.protocol === PROTOCOL_ID &&
82
+ typeof value.type === "string");
83
+ }
84
+ export const isEnvelope = isEnvelopeLike;
85
+ export const isRequest = (v) => isEnvelopeLike(v) && v.type === "request";
86
+ export const isStreamRequest = (v) => isEnvelopeLike(v) && v.type === "stream.request";
87
+ export const isResponse = (v) => isEnvelopeLike(v) && v.type === "response";
88
+ export const isEventEnvelope = (v) => isEnvelopeLike(v) && v.type === "event";
89
+ export const isSubscribeRequest = (v) => isEnvelopeLike(v) && v.type === "subscribe";
90
+ export const isUnsubscribeRequest = (v) => isEnvelopeLike(v) && v.type === "unsubscribe";
91
+ export const isStreamStart = (v) => isEnvelopeLike(v) && v.type === "stream.start";
92
+ export const isStreamChunk = (v) => isEnvelopeLike(v) && v.type === "stream.chunk";
93
+ export const isStreamEnd = (v) => isEnvelopeLike(v) && v.type === "stream.end";
94
+ export const isStreamCancel = (v) => isEnvelopeLike(v) && v.type === "stream.cancel";
95
+ export const isSuccessResponse = (v) => v.ok === true;
96
+ export const isErrorResponse = (v) => v.ok === false;
97
+ //# sourceMappingURL=envelopes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envelopes.js","sourceRoot":"","sources":["../src/envelopes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAmB,MAAM,cAAc,CAAC;AAoC5D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS;IACT,UAAU;IACV,OAAO;IACP,WAAW;IACX,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,YAAY;IACZ,eAAe;CACP,CAAC;AAwIX,SAAS,YAAY,CAAmB,IAAO,EAAE,QAAiC;IAChF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,IAAI,KAAK,KAAK,SAAS;YAAG,IAAgC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC1E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAA6B;IACzD,OAAO,YAAY,CACjB;QACE,QAAQ,EAAE,WAAW;QACrB,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,OAAO,CAAC,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CAAC,CAAU,EAAuB,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC;AACjH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAU,EAAuB,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC;AACjH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAU,EAAqB,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC;AAC3G,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAU,EAAwB,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,eAAe,CAAC;AAEpH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAI,CAAiB,EAA8B,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC;AACrG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAuB,EAAyB,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Standard AppPort error codes (specification §15).
3
+ *
4
+ * Implementations MAY define extension codes; extension codes MUST be
5
+ * namespaced (`feltdb.CAUSAL_TIMEOUT`).
6
+ */
7
+ export declare const ERROR_CODES: readonly ["INVALID_PROTOCOL", "UNSUPPORTED_VERSION", "INVALID_REQUEST", "INVALID_INPUT", "UNKNOWN_CAPABILITY", "UNSUPPORTED_CAPABILITY_VERSION", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "RATE_LIMITED", "TIMEOUT", "CANCELLED", "PAYLOAD_TOO_LARGE", "STREAM_ERROR", "INTERNAL_ERROR"];
8
+ export type StandardErrorCode = (typeof ERROR_CODES)[number];
9
+ /** A standard code, or a namespaced extension code such as `feltdb.CAUSAL_TIMEOUT`. */
10
+ export type ErrorCode = StandardErrorCode | (string & {});
11
+ export declare function isStandardErrorCode(code: unknown): code is StandardErrorCode;
12
+ export declare function isExtensionErrorCode(code: unknown): boolean;
13
+ export declare function isErrorCode(code: unknown): code is ErrorCode;
14
+ /** The wire representation of a failure. */
15
+ export interface AppErrorObject {
16
+ code: ErrorCode;
17
+ message: string;
18
+ /**
19
+ * Optional structured, non-sensitive detail (for example the list of input
20
+ * fields that failed validation). Never carries stack traces, filesystem
21
+ * paths, credentials or raw driver errors (specification §16).
22
+ */
23
+ details?: JsonValue;
24
+ /** Hint that the same request may succeed if retried. */
25
+ retryable?: boolean;
26
+ }
27
+ export type JsonPrimitive = string | number | boolean | null;
28
+ export type JsonValue = JsonPrimitive | JsonValue[] | {
29
+ [key: string]: JsonValue;
30
+ };
31
+ /**
32
+ * An error that carries an AppPort error code across the dispatch pipeline.
33
+ *
34
+ * Handlers throw `AppPortError` to produce a specific protocol error; any other
35
+ * thrown value is sanitized into `INTERNAL_ERROR`.
36
+ */
37
+ export declare class AppPortError extends Error {
38
+ readonly code: ErrorCode;
39
+ readonly details?: JsonValue;
40
+ readonly retryable: boolean;
41
+ /** Detail retained for logs/telemetry but never serialized onto the wire. */
42
+ readonly internal?: unknown;
43
+ constructor(code: ErrorCode, message: string, options?: {
44
+ details?: JsonValue;
45
+ retryable?: boolean;
46
+ cause?: unknown;
47
+ internal?: unknown;
48
+ });
49
+ toErrorObject(): AppErrorObject;
50
+ static is(value: unknown): value is AppPortError;
51
+ }
52
+ /** Convenience constructors for the standard codes. */
53
+ export declare const errors: {
54
+ readonly invalidProtocol: (message?: string, details?: JsonValue) => AppPortError;
55
+ readonly unsupportedVersion: (message?: string, details?: JsonValue) => AppPortError;
56
+ readonly invalidRequest: (message?: string, details?: JsonValue) => AppPortError;
57
+ readonly invalidInput: (message?: string, details?: JsonValue) => AppPortError;
58
+ readonly unknownCapability: (name: string) => AppPortError;
59
+ readonly unsupportedCapabilityVersion: (name: string, version: number, supported: number[]) => AppPortError;
60
+ readonly unauthorized: (message?: string) => AppPortError;
61
+ readonly forbidden: (message?: string, details?: JsonValue) => AppPortError;
62
+ readonly notFound: (message?: string, details?: JsonValue) => AppPortError;
63
+ readonly conflict: (message?: string, details?: JsonValue) => AppPortError;
64
+ readonly rateLimited: (message?: string, details?: JsonValue) => AppPortError;
65
+ readonly timeout: (message?: string, details?: JsonValue) => AppPortError;
66
+ readonly cancelled: (message?: string) => AppPortError;
67
+ readonly payloadTooLarge: (message?: string, details?: JsonValue) => AppPortError;
68
+ readonly streamError: (message?: string, details?: JsonValue) => AppPortError;
69
+ readonly internal: (message?: string, options?: {
70
+ cause?: unknown;
71
+ internal?: unknown;
72
+ }) => AppPortError;
73
+ };
74
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,uSAiBd,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,uFAAuF;AACvF,MAAM,MAAM,SAAS,GAAG,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAI1D,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,iBAAiB,CAE5E;AAQD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAE3D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,SAAS,CAE5D;AAED,4CAA4C;AAC5C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,aA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IMEOUT`).
6
+ */
7
+ export const ERROR_CODES = [
8
+ "INVALID_PROTOCOL",
9
+ "UNSUPPORTED_VERSION",
10
+ "INVALID_REQUEST",
11
+ "INVALID_INPUT",
12
+ "UNKNOWN_CAPABILITY",
13
+ "UNSUPPORTED_CAPABILITY_VERSION",
14
+ "UNAUTHORIZED",
15
+ "FORBIDDEN",
16
+ "NOT_FOUND",
17
+ "CONFLICT",
18
+ "RATE_LIMITED",
19
+ "TIMEOUT",
20
+ "CANCELLED",
21
+ "PAYLOAD_TOO_LARGE",
22
+ "STREAM_ERROR",
23
+ "INTERNAL_ERROR"
24
+ ];
25
+ const STANDARD = new Set(ERROR_CODES);
26
+ export function isStandardErrorCode(code) {
27
+ return typeof code === "string" && STANDARD.has(code);
28
+ }
29
+ /**
30
+ * Extension error codes are `<namespace>.<CODE>` where the namespace is a
31
+ * lowercase dotted identifier and the code is upper snake case.
32
+ */
33
+ const EXTENSION_CODE = /^[a-z][a-z0-9]*(\.[a-z0-9]+)*\.[A-Z][A-Z0-9_]*$/;
34
+ export function isExtensionErrorCode(code) {
35
+ return typeof code === "string" && EXTENSION_CODE.test(code);
36
+ }
37
+ export function isErrorCode(code) {
38
+ return isStandardErrorCode(code) || isExtensionErrorCode(code);
39
+ }
40
+ /**
41
+ * An error that carries an AppPort error code across the dispatch pipeline.
42
+ *
43
+ * Handlers throw `AppPortError` to produce a specific protocol error; any other
44
+ * thrown value is sanitized into `INTERNAL_ERROR`.
45
+ */
46
+ export class AppPortError extends Error {
47
+ code;
48
+ details;
49
+ retryable;
50
+ /** Detail retained for logs/telemetry but never serialized onto the wire. */
51
+ internal;
52
+ constructor(code, message, options = {}) {
53
+ super(message, options.cause === undefined ? undefined : { cause: options.cause });
54
+ this.name = "AppPortError";
55
+ this.code = code;
56
+ this.details = options.details;
57
+ this.retryable = options.retryable ?? false;
58
+ this.internal = options.internal;
59
+ }
60
+ toErrorObject() {
61
+ const error = { code: this.code, message: this.message };
62
+ if (this.details !== undefined)
63
+ error.details = this.details;
64
+ if (this.retryable)
65
+ error.retryable = true;
66
+ return error;
67
+ }
68
+ static is(value) {
69
+ return value instanceof AppPortError;
70
+ }
71
+ }
72
+ /** Convenience constructors for the standard codes. */
73
+ export const errors = {
74
+ invalidProtocol: (message = "Unsupported AppPort protocol identifier", details) => new AppPortError("INVALID_PROTOCOL", message, { details }),
75
+ unsupportedVersion: (message = "Unsupported protocol version", details) => new AppPortError("UNSUPPORTED_VERSION", message, { details }),
76
+ invalidRequest: (message = "Malformed AppPort request", details) => new AppPortError("INVALID_REQUEST", message, { details }),
77
+ invalidInput: (message = "Input failed capability validation", details) => new AppPortError("INVALID_INPUT", message, { details }),
78
+ unknownCapability: (name) => new AppPortError("UNKNOWN_CAPABILITY", `Unknown capability: ${name}`, { details: { capability: name } }),
79
+ unsupportedCapabilityVersion: (name, version, supported) => new AppPortError("UNSUPPORTED_CAPABILITY_VERSION", `Capability ${name} does not support version ${version}`, { details: { capability: name, requested: version, supported } }),
80
+ unauthorized: (message = "Authentication is required") => new AppPortError("UNAUTHORIZED", message),
81
+ forbidden: (message = "Capability is not authorized", details) => new AppPortError("FORBIDDEN", message, { details }),
82
+ notFound: (message = "Resource not found", details) => new AppPortError("NOT_FOUND", message, { details }),
83
+ conflict: (message = "Conflicting state", details) => new AppPortError("CONFLICT", message, { details }),
84
+ rateLimited: (message = "Rate limit exceeded", details) => new AppPortError("RATE_LIMITED", message, { details, retryable: true }),
85
+ timeout: (message = "Request timed out", details) => new AppPortError("TIMEOUT", message, { details, retryable: true }),
86
+ cancelled: (message = "Operation cancelled") => new AppPortError("CANCELLED", message),
87
+ payloadTooLarge: (message = "Payload exceeds the configured limit", details) => new AppPortError("PAYLOAD_TOO_LARGE", message, { details }),
88
+ streamError: (message = "Stream failed", details) => new AppPortError("STREAM_ERROR", message, { details }),
89
+ internal: (message = "Internal error", options = {}) => new AppPortError("INTERNAL_ERROR", message, options)
90
+ };
91
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1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CAC9D,IAAI,YAAY,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IACpE,SAAS,EAAE,CAAC,OAAO,GAAG,qBAAqB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC;IACtF,eAAe,EAAE,CAAC,OAAO,GAAG,sCAAsC,EAAE,OAAmB,EAAE,EAAE,CACzF,IAAI,YAAY,CAAC,mBAAmB,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC;IAC7D,WAAW,EAAE,CAAC,OAAO,GAAG,eAAe,EAAE,OAAmB,EAAE,EAAE,CAC9D,IAAI,YAAY,CAAC,cAAc,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC;IACxD,QAAQ,EAAE,CAAC,OAAO,GAAG,gBAAgB,EAAE,UAAmD,EAAE,EAAE,EAAE,CAC9F,IAAI,YAAY,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC;CAC9C,CAAC"}
@@ -0,0 +1,12 @@
1
+ /** Generates a monotonic-ish ULID string (26 Crockford base32 characters). */
2
+ export declare function ulid(now?: number): string;
3
+ export type IdPrefix = "req" | "evt" | "str" | "sub" | "ses" | "op" | "trace" | "blob" | "idem";
4
+ export declare function createId(prefix: IdPrefix): string;
5
+ export declare const newRequestId: () => string;
6
+ export declare const newEventId: () => string;
7
+ export declare const newStreamId: () => string;
8
+ export declare const newSubscriptionId: () => string;
9
+ export declare const newSessionId: () => string;
10
+ export declare const newOperationId: () => string;
11
+ export declare const newTraceId: () => string;
12
+ //# sourceMappingURL=ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAqCA,8EAA8E;AAC9E,wBAAgB,IAAI,CAAC,GAAG,GAAE,MAAmB,GAAG,MAAM,CAErD;AAED,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEhG,wBAAgB,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,CAEjD;AAED,eAAO,MAAM,YAAY,QAAO,MAAyB,CAAC;AAC1D,eAAO,MAAM,UAAU,QAAO,MAAyB,CAAC;AACxD,eAAO,MAAM,WAAW,QAAO,MAAyB,CAAC;AACzD,eAAO,MAAM,iBAAiB,QAAO,MAAyB,CAAC;AAC/D,eAAO,MAAM,YAAY,QAAO,MAAyB,CAAC;AAC1D,eAAO,MAAM,cAAc,QAAO,MAAwB,CAAC;AAC3D,eAAO,MAAM,UAAU,QAAO,MAA2B,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Identifier helpers (specification §12).
3
+ *
4
+ * The protocol does not mandate ULID; any value unique within a session is
5
+ * valid. The reference implementation emits `<prefix>_<ULID>` because ULIDs
6
+ * sort lexicographically by creation time, which makes logs readable.
7
+ */
8
+ const CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
9
+ function randomBytes(length) {
10
+ const bytes = new Uint8Array(length);
11
+ const cryptoRef = globalThis.crypto;
12
+ if (cryptoRef && typeof cryptoRef.getRandomValues === "function") {
13
+ cryptoRef.getRandomValues(bytes);
14
+ return bytes;
15
+ }
16
+ for (let i = 0; i < length; i += 1)
17
+ bytes[i] = Math.floor(Math.random() * 256);
18
+ return bytes;
19
+ }
20
+ function encodeTime(time) {
21
+ let out = "";
22
+ let remaining = time;
23
+ for (let i = 0; i < 10; i += 1) {
24
+ out = CROCKFORD[remaining % 32] + out;
25
+ remaining = Math.floor(remaining / 32);
26
+ }
27
+ return out;
28
+ }
29
+ function encodeRandom() {
30
+ const bytes = randomBytes(16);
31
+ let out = "";
32
+ for (let i = 0; i < 16; i += 1)
33
+ out += CROCKFORD[bytes[i] % 32];
34
+ return out;
35
+ }
36
+ /** Generates a monotonic-ish ULID string (26 Crockford base32 characters). */
37
+ export function ulid(now = Date.now()) {
38
+ return encodeTime(now) + encodeRandom();
39
+ }
40
+ export function createId(prefix) {
41
+ return `${prefix}_${ulid()}`;
42
+ }
43
+ export const newRequestId = () => createId("req");
44
+ export const newEventId = () => createId("evt");
45
+ export const newStreamId = () => createId("str");
46
+ export const newSubscriptionId = () => createId("sub");
47
+ export const newSessionId = () => createId("ses");
48
+ export const newOperationId = () => createId("op");
49
+ export const newTraceId = () => createId("trace");
50
+ //# sourceMappingURL=ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.js","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,SAAS,GAAG,kCAAkC,CAAC;AAErD,SAAS,WAAW,CAAC,MAAc;IACjC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,SAAS,GAAuB,UAAU,CAAC,MAAM,CAAC;IACxD,IAAI,SAAS,IAAI,OAAO,SAAS,CAAC,eAAe,KAAK,UAAU,EAAE,CAAC;QACjE,SAAS,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACjC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC;QAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IAC/E,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,SAAS,GAAG,IAAI,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,GAAG,GAAG,SAAS,CAAC,SAAS,GAAG,EA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M,CAAC,MAAM,UAAU,GAAG,GAAW,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * `@appport/protocol` — the AppPort wire contract.
3
+ *
4
+ * This package is pure: envelope types, error codes, naming rules, manifest
5
+ * shapes and structural validation. It has no runtime dependencies and knows
6
+ * nothing about transports, servers or clients.
7
+ */
8
+ export * from "./version.js";
9
+ export * from "./errors.js";
10
+ export * from "./names.js";
11
+ export * from "./ids.js";
12
+ export * from "./envelopes.js";
13
+ export * from "./validate.js";
14
+ export * from "./jsonschema.js";
15
+ export * from "./manifest.js";
16
+ export * from "./session.js";
17
+ export * from "./blob.js";
18
+ export * from "./operations.js";
19
+ export * from "./compatibility.js";
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * `@appport/protocol` — the AppPort wire contract.
3
+ *
4
+ * This package is pure: envelope types, error codes, naming rules, manifest
5
+ * shapes and structural validation. It has no runtime dependencies and knows
6
+ * nothing about transports, servers or clients.
7
+ */
8
+ export * from "./version.js";
9
+ export * from "./errors.js";
10
+ export * from "./names.js";
11
+ export * from "./ids.js";
12
+ export * from "./envelopes.js";
13
+ export * from "./validate.js";
14
+ export * from "./jsonschema.js";
15
+ export * from "./manifest.js";
16
+ export * from "./session.js";
17
+ export * from "./blob.js";
18
+ export * from "./operations.js";
19
+ export * from "./compatibility.js";
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}