@appport/sdk 1.1.18 → 1.1.19

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 (479) hide show
  1. package/README.md +9 -86
  2. package/dist/index.d.ts +13 -18
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +13 -18
  5. package/dist/index.js.map +1 -1
  6. package/dist/node.d.ts +1 -1
  7. package/dist/node.js +1 -1
  8. package/package.json +22 -32
  9. package/LICENSE +0 -126
  10. package/dist/application-onboarding.d.ts +0 -52
  11. package/dist/application-onboarding.d.ts.map +0 -1
  12. package/dist/application-onboarding.js +0 -50
  13. package/dist/application-onboarding.js.map +0 -1
  14. package/dist/external-compatibility.d.ts +0 -142
  15. package/dist/external-compatibility.d.ts.map +0 -1
  16. package/dist/external-compatibility.js +0 -132
  17. package/dist/external-compatibility.js.map +0 -1
  18. package/dist/provider-lifecycle.d.ts +0 -247
  19. package/dist/provider-lifecycle.d.ts.map +0 -1
  20. package/dist/provider-lifecycle.js +0 -314
  21. package/dist/provider-lifecycle.js.map +0 -1
  22. package/dist/resolution-policy.d.ts +0 -81
  23. package/dist/resolution-policy.d.ts.map +0 -1
  24. package/dist/resolution-policy.js +0 -131
  25. package/dist/resolution-policy.js.map +0 -1
  26. package/vendor/@appport/authorization/README.md +0 -28
  27. package/vendor/@appport/authorization/dist/index.d.ts +0 -94
  28. package/vendor/@appport/authorization/dist/index.d.ts.map +0 -1
  29. package/vendor/@appport/authorization/dist/index.js +0 -131
  30. package/vendor/@appport/authorization/dist/index.js.map +0 -1
  31. package/vendor/@appport/authorization/package.json +0 -28
  32. package/vendor/@appport/client/README.md +0 -35
  33. package/vendor/@appport/client/dist/channel.d.ts +0 -14
  34. package/vendor/@appport/client/dist/channel.d.ts.map +0 -1
  35. package/vendor/@appport/client/dist/channel.js +0 -58
  36. package/vendor/@appport/client/dist/channel.js.map +0 -1
  37. package/vendor/@appport/client/dist/client.d.ts +0 -61
  38. package/vendor/@appport/client/dist/client.d.ts.map +0 -1
  39. package/vendor/@appport/client/dist/client.js +0 -214
  40. package/vendor/@appport/client/dist/client.js.map +0 -1
  41. package/vendor/@appport/client/dist/contract.d.ts +0 -55
  42. package/vendor/@appport/client/dist/contract.d.ts.map +0 -1
  43. package/vendor/@appport/client/dist/contract.js +0 -12
  44. package/vendor/@appport/client/dist/contract.js.map +0 -1
  45. package/vendor/@appport/client/dist/discovery.d.ts +0 -17
  46. package/vendor/@appport/client/dist/discovery.d.ts.map +0 -1
  47. package/vendor/@appport/client/dist/discovery.js +0 -56
  48. package/vendor/@appport/client/dist/discovery.js.map +0 -1
  49. package/vendor/@appport/client/dist/duplex.d.ts +0 -25
  50. package/vendor/@appport/client/dist/duplex.d.ts.map +0 -1
  51. package/vendor/@appport/client/dist/duplex.js +0 -194
  52. package/vendor/@appport/client/dist/duplex.js.map +0 -1
  53. package/vendor/@appport/client/dist/host.d.ts +0 -62
  54. package/vendor/@appport/client/dist/host.d.ts.map +0 -1
  55. package/vendor/@appport/client/dist/host.js +0 -139
  56. package/vendor/@appport/client/dist/host.js.map +0 -1
  57. package/vendor/@appport/client/dist/index.d.ts +0 -14
  58. package/vendor/@appport/client/dist/index.d.ts.map +0 -1
  59. package/vendor/@appport/client/dist/index.js +0 -14
  60. package/vendor/@appport/client/dist/index.js.map +0 -1
  61. package/vendor/@appport/client/dist/transport.d.ts +0 -42
  62. package/vendor/@appport/client/dist/transport.d.ts.map +0 -1
  63. package/vendor/@appport/client/dist/transport.js +0 -2
  64. package/vendor/@appport/client/dist/transport.js.map +0 -1
  65. package/vendor/@appport/client/package.json +0 -32
  66. package/vendor/@appport/core/README.md +0 -91
  67. package/vendor/@appport/core/dist/appboundry-capability-catalog.d.ts +0 -930
  68. package/vendor/@appport/core/dist/appboundry-capability-catalog.d.ts.map +0 -1
  69. package/vendor/@appport/core/dist/appboundry-capability-catalog.js +0 -352
  70. package/vendor/@appport/core/dist/appboundry-capability-catalog.js.map +0 -1
  71. package/vendor/@appport/core/dist/appboundry-composition.d.ts +0 -93
  72. package/vendor/@appport/core/dist/appboundry-composition.d.ts.map +0 -1
  73. package/vendor/@appport/core/dist/appboundry-composition.js +0 -184
  74. package/vendor/@appport/core/dist/appboundry-composition.js.map +0 -1
  75. package/vendor/@appport/core/dist/appboundry-contract.d.ts +0 -80
  76. package/vendor/@appport/core/dist/appboundry-contract.d.ts.map +0 -1
  77. package/vendor/@appport/core/dist/appboundry-contract.js +0 -160
  78. package/vendor/@appport/core/dist/appboundry-contract.js.map +0 -1
  79. package/vendor/@appport/core/dist/appboundry-diagnostics.d.ts +0 -107
  80. package/vendor/@appport/core/dist/appboundry-diagnostics.d.ts.map +0 -1
  81. package/vendor/@appport/core/dist/appboundry-diagnostics.js +0 -358
  82. package/vendor/@appport/core/dist/appboundry-diagnostics.js.map +0 -1
  83. package/vendor/@appport/core/dist/appboundry-discovery.d.ts +0 -110
  84. package/vendor/@appport/core/dist/appboundry-discovery.d.ts.map +0 -1
  85. package/vendor/@appport/core/dist/appboundry-discovery.js +0 -141
  86. package/vendor/@appport/core/dist/appboundry-discovery.js.map +0 -1
  87. package/vendor/@appport/core/dist/appboundry-entitlements.d.ts +0 -128
  88. package/vendor/@appport/core/dist/appboundry-entitlements.d.ts.map +0 -1
  89. package/vendor/@appport/core/dist/appboundry-entitlements.js +0 -312
  90. package/vendor/@appport/core/dist/appboundry-entitlements.js.map +0 -1
  91. package/vendor/@appport/core/dist/appboundry-execution.d.ts +0 -84
  92. package/vendor/@appport/core/dist/appboundry-execution.d.ts.map +0 -1
  93. package/vendor/@appport/core/dist/appboundry-execution.js +0 -150
  94. package/vendor/@appport/core/dist/appboundry-execution.js.map +0 -1
  95. package/vendor/@appport/core/dist/appboundry-exercise.d.ts +0 -152
  96. package/vendor/@appport/core/dist/appboundry-exercise.d.ts.map +0 -1
  97. package/vendor/@appport/core/dist/appboundry-exercise.js +0 -416
  98. package/vendor/@appport/core/dist/appboundry-exercise.js.map +0 -1
  99. package/vendor/@appport/core/dist/appboundry-materialization.d.ts +0 -222
  100. package/vendor/@appport/core/dist/appboundry-materialization.d.ts.map +0 -1
  101. package/vendor/@appport/core/dist/appboundry-materialization.js +0 -494
  102. package/vendor/@appport/core/dist/appboundry-materialization.js.map +0 -1
  103. package/vendor/@appport/core/dist/appboundry-migration.d.ts +0 -195
  104. package/vendor/@appport/core/dist/appboundry-migration.d.ts.map +0 -1
  105. package/vendor/@appport/core/dist/appboundry-migration.js +0 -227
  106. package/vendor/@appport/core/dist/appboundry-migration.js.map +0 -1
  107. package/vendor/@appport/core/dist/appboundry-onboarding.d.ts +0 -70
  108. package/vendor/@appport/core/dist/appboundry-onboarding.d.ts.map +0 -1
  109. package/vendor/@appport/core/dist/appboundry-onboarding.js +0 -232
  110. package/vendor/@appport/core/dist/appboundry-onboarding.js.map +0 -1
  111. package/vendor/@appport/core/dist/appboundry-operation-discovery.d.ts +0 -93
  112. package/vendor/@appport/core/dist/appboundry-operation-discovery.d.ts.map +0 -1
  113. package/vendor/@appport/core/dist/appboundry-operation-discovery.js +0 -89
  114. package/vendor/@appport/core/dist/appboundry-operation-discovery.js.map +0 -1
  115. package/vendor/@appport/core/dist/appboundry-resolution.d.ts +0 -160
  116. package/vendor/@appport/core/dist/appboundry-resolution.d.ts.map +0 -1
  117. package/vendor/@appport/core/dist/appboundry-resolution.js +0 -218
  118. package/vendor/@appport/core/dist/appboundry-resolution.js.map +0 -1
  119. package/vendor/@appport/core/dist/appboundry-surface.d.ts +0 -96
  120. package/vendor/@appport/core/dist/appboundry-surface.d.ts.map +0 -1
  121. package/vendor/@appport/core/dist/appboundry-surface.js +0 -223
  122. package/vendor/@appport/core/dist/appboundry-surface.js.map +0 -1
  123. package/vendor/@appport/core/dist/appboundry-usage.d.ts +0 -94
  124. package/vendor/@appport/core/dist/appboundry-usage.d.ts.map +0 -1
  125. package/vendor/@appport/core/dist/appboundry-usage.js +0 -80
  126. package/vendor/@appport/core/dist/appboundry-usage.js.map +0 -1
  127. package/vendor/@appport/core/dist/application-implementation.d.ts +0 -125
  128. package/vendor/@appport/core/dist/application-implementation.d.ts.map +0 -1
  129. package/vendor/@appport/core/dist/application-implementation.js +0 -220
  130. package/vendor/@appport/core/dist/application-implementation.js.map +0 -1
  131. package/vendor/@appport/core/dist/application-lifecycle.d.ts +0 -150
  132. package/vendor/@appport/core/dist/application-lifecycle.d.ts.map +0 -1
  133. package/vendor/@appport/core/dist/application-lifecycle.js +0 -70
  134. package/vendor/@appport/core/dist/application-lifecycle.js.map +0 -1
  135. package/vendor/@appport/core/dist/application-package.d.ts +0 -105
  136. package/vendor/@appport/core/dist/application-package.d.ts.map +0 -1
  137. package/vendor/@appport/core/dist/application-package.js +0 -349
  138. package/vendor/@appport/core/dist/application-package.js.map +0 -1
  139. package/vendor/@appport/core/dist/application-source.d.ts +0 -109
  140. package/vendor/@appport/core/dist/application-source.d.ts.map +0 -1
  141. package/vendor/@appport/core/dist/application-source.js +0 -186
  142. package/vendor/@appport/core/dist/application-source.js.map +0 -1
  143. package/vendor/@appport/core/dist/application.d.ts +0 -124
  144. package/vendor/@appport/core/dist/application.d.ts.map +0 -1
  145. package/vendor/@appport/core/dist/application.js +0 -518
  146. package/vendor/@appport/core/dist/application.js.map +0 -1
  147. package/vendor/@appport/core/dist/artifact.d.ts +0 -395
  148. package/vendor/@appport/core/dist/artifact.d.ts.map +0 -1
  149. package/vendor/@appport/core/dist/artifact.js +0 -392
  150. package/vendor/@appport/core/dist/artifact.js.map +0 -1
  151. package/vendor/@appport/core/dist/assembly.d.ts +0 -237
  152. package/vendor/@appport/core/dist/assembly.d.ts.map +0 -1
  153. package/vendor/@appport/core/dist/assembly.js +0 -458
  154. package/vendor/@appport/core/dist/assembly.js.map +0 -1
  155. package/vendor/@appport/core/dist/authority-attestation.d.ts +0 -34
  156. package/vendor/@appport/core/dist/authority-attestation.d.ts.map +0 -1
  157. package/vendor/@appport/core/dist/authority-attestation.js +0 -72
  158. package/vendor/@appport/core/dist/authority-attestation.js.map +0 -1
  159. package/vendor/@appport/core/dist/authorization-grant.d.ts +0 -107
  160. package/vendor/@appport/core/dist/authorization-grant.d.ts.map +0 -1
  161. package/vendor/@appport/core/dist/authorization-grant.js +0 -131
  162. package/vendor/@appport/core/dist/authorization-grant.js.map +0 -1
  163. package/vendor/@appport/core/dist/binding.d.ts +0 -294
  164. package/vendor/@appport/core/dist/binding.d.ts.map +0 -1
  165. package/vendor/@appport/core/dist/binding.js +0 -263
  166. package/vendor/@appport/core/dist/binding.js.map +0 -1
  167. package/vendor/@appport/core/dist/builtins.d.ts +0 -18
  168. package/vendor/@appport/core/dist/builtins.d.ts.map +0 -1
  169. package/vendor/@appport/core/dist/builtins.js +0 -38
  170. package/vendor/@appport/core/dist/builtins.js.map +0 -1
  171. package/vendor/@appport/core/dist/capability.d.ts +0 -94
  172. package/vendor/@appport/core/dist/capability.d.ts.map +0 -1
  173. package/vendor/@appport/core/dist/capability.js +0 -85
  174. package/vendor/@appport/core/dist/capability.js.map +0 -1
  175. package/vendor/@appport/core/dist/concurrency.d.ts +0 -16
  176. package/vendor/@appport/core/dist/concurrency.d.ts.map +0 -1
  177. package/vendor/@appport/core/dist/concurrency.js +0 -46
  178. package/vendor/@appport/core/dist/concurrency.js.map +0 -1
  179. package/vendor/@appport/core/dist/context.d.ts +0 -59
  180. package/vendor/@appport/core/dist/context.d.ts.map +0 -1
  181. package/vendor/@appport/core/dist/context.js +0 -14
  182. package/vendor/@appport/core/dist/context.js.map +0 -1
  183. package/vendor/@appport/core/dist/contract-artifact.d.ts +0 -15
  184. package/vendor/@appport/core/dist/contract-artifact.d.ts.map +0 -1
  185. package/vendor/@appport/core/dist/contract-artifact.js +0 -161
  186. package/vendor/@appport/core/dist/contract-artifact.js.map +0 -1
  187. package/vendor/@appport/core/dist/contract-attestation.d.ts +0 -68
  188. package/vendor/@appport/core/dist/contract-attestation.d.ts.map +0 -1
  189. package/vendor/@appport/core/dist/contract-attestation.js +0 -76
  190. package/vendor/@appport/core/dist/contract-attestation.js.map +0 -1
  191. package/vendor/@appport/core/dist/crash-injection.d.ts +0 -3
  192. package/vendor/@appport/core/dist/crash-injection.d.ts.map +0 -1
  193. package/vendor/@appport/core/dist/crash-injection.js +0 -8
  194. package/vendor/@appport/core/dist/crash-injection.js.map +0 -1
  195. package/vendor/@appport/core/dist/events.d.ts +0 -33
  196. package/vendor/@appport/core/dist/events.d.ts.map +0 -1
  197. package/vendor/@appport/core/dist/events.js +0 -79
  198. package/vendor/@appport/core/dist/events.js.map +0 -1
  199. package/vendor/@appport/core/dist/execution-barrier.d.ts +0 -13
  200. package/vendor/@appport/core/dist/execution-barrier.d.ts.map +0 -1
  201. package/vendor/@appport/core/dist/execution-barrier.js +0 -33
  202. package/vendor/@appport/core/dist/execution-barrier.js.map +0 -1
  203. package/vendor/@appport/core/dist/execution-ledger.d.ts +0 -81
  204. package/vendor/@appport/core/dist/execution-ledger.d.ts.map +0 -1
  205. package/vendor/@appport/core/dist/execution-ledger.js +0 -173
  206. package/vendor/@appport/core/dist/execution-ledger.js.map +0 -1
  207. package/vendor/@appport/core/dist/execution.d.ts +0 -387
  208. package/vendor/@appport/core/dist/execution.d.ts.map +0 -1
  209. package/vendor/@appport/core/dist/execution.js +0 -165
  210. package/vendor/@appport/core/dist/execution.js.map +0 -1
  211. package/vendor/@appport/core/dist/idempotency.d.ts +0 -36
  212. package/vendor/@appport/core/dist/idempotency.d.ts.map +0 -1
  213. package/vendor/@appport/core/dist/idempotency.js +0 -36
  214. package/vendor/@appport/core/dist/idempotency.js.map +0 -1
  215. package/vendor/@appport/core/dist/implementation.d.ts +0 -110
  216. package/vendor/@appport/core/dist/implementation.d.ts.map +0 -1
  217. package/vendor/@appport/core/dist/implementation.js +0 -65
  218. package/vendor/@appport/core/dist/implementation.js.map +0 -1
  219. package/vendor/@appport/core/dist/index.d.ts +0 -61
  220. package/vendor/@appport/core/dist/index.d.ts.map +0 -1
  221. package/vendor/@appport/core/dist/index.js +0 -60
  222. package/vendor/@appport/core/dist/index.js.map +0 -1
  223. package/vendor/@appport/core/dist/invocation.d.ts +0 -253
  224. package/vendor/@appport/core/dist/invocation.d.ts.map +0 -1
  225. package/vendor/@appport/core/dist/invocation.js +0 -258
  226. package/vendor/@appport/core/dist/invocation.js.map +0 -1
  227. package/vendor/@appport/core/dist/manifest.d.ts +0 -157
  228. package/vendor/@appport/core/dist/manifest.d.ts.map +0 -1
  229. package/vendor/@appport/core/dist/manifest.js +0 -255
  230. package/vendor/@appport/core/dist/manifest.js.map +0 -1
  231. package/vendor/@appport/core/dist/memory-application-data-store.d.ts +0 -19
  232. package/vendor/@appport/core/dist/memory-application-data-store.d.ts.map +0 -1
  233. package/vendor/@appport/core/dist/memory-application-data-store.js +0 -161
  234. package/vendor/@appport/core/dist/memory-application-data-store.js.map +0 -1
  235. package/vendor/@appport/core/dist/operations.d.ts +0 -61
  236. package/vendor/@appport/core/dist/operations.d.ts.map +0 -1
  237. package/vendor/@appport/core/dist/operations.js +0 -210
  238. package/vendor/@appport/core/dist/operations.js.map +0 -1
  239. package/vendor/@appport/core/dist/provider-contract.d.ts +0 -89
  240. package/vendor/@appport/core/dist/provider-contract.d.ts.map +0 -1
  241. package/vendor/@appport/core/dist/provider-contract.js +0 -40
  242. package/vendor/@appport/core/dist/provider-contract.js.map +0 -1
  243. package/vendor/@appport/core/dist/public.d.ts +0 -20
  244. package/vendor/@appport/core/dist/public.d.ts.map +0 -1
  245. package/vendor/@appport/core/dist/public.js +0 -19
  246. package/vendor/@appport/core/dist/public.js.map +0 -1
  247. package/vendor/@appport/core/dist/registration.d.ts +0 -165
  248. package/vendor/@appport/core/dist/registration.d.ts.map +0 -1
  249. package/vendor/@appport/core/dist/registration.js +0 -253
  250. package/vendor/@appport/core/dist/registration.js.map +0 -1
  251. package/vendor/@appport/core/dist/registry.d.ts +0 -30
  252. package/vendor/@appport/core/dist/registry.d.ts.map +0 -1
  253. package/vendor/@appport/core/dist/registry.js +0 -149
  254. package/vendor/@appport/core/dist/registry.js.map +0 -1
  255. package/vendor/@appport/core/dist/repository-connection.d.ts +0 -100
  256. package/vendor/@appport/core/dist/repository-connection.d.ts.map +0 -1
  257. package/vendor/@appport/core/dist/repository-connection.js +0 -57
  258. package/vendor/@appport/core/dist/repository-connection.js.map +0 -1
  259. package/vendor/@appport/core/dist/resolver.d.ts +0 -130
  260. package/vendor/@appport/core/dist/resolver.d.ts.map +0 -1
  261. package/vendor/@appport/core/dist/resolver.js +0 -252
  262. package/vendor/@appport/core/dist/resolver.js.map +0 -1
  263. package/vendor/@appport/core/dist/runtime-manifest.d.ts +0 -68
  264. package/vendor/@appport/core/dist/runtime-manifest.d.ts.map +0 -1
  265. package/vendor/@appport/core/dist/runtime-manifest.js +0 -84
  266. package/vendor/@appport/core/dist/runtime-manifest.js.map +0 -1
  267. package/vendor/@appport/core/dist/sanitize.d.ts +0 -14
  268. package/vendor/@appport/core/dist/sanitize.d.ts.map +0 -1
  269. package/vendor/@appport/core/dist/sanitize.js +0 -49
  270. package/vendor/@appport/core/dist/sanitize.js.map +0 -1
  271. package/vendor/@appport/core/dist/server-internal.d.ts +0 -5
  272. package/vendor/@appport/core/dist/server-internal.d.ts.map +0 -1
  273. package/vendor/@appport/core/dist/server-internal.js +0 -4
  274. package/vendor/@appport/core/dist/server-internal.js.map +0 -1
  275. package/vendor/@appport/core/dist/sessions.d.ts +0 -29
  276. package/vendor/@appport/core/dist/sessions.d.ts.map +0 -1
  277. package/vendor/@appport/core/dist/sessions.js +0 -39
  278. package/vendor/@appport/core/dist/sessions.js.map +0 -1
  279. package/vendor/@appport/core/dist/sha256.d.ts +0 -3
  280. package/vendor/@appport/core/dist/sha256.d.ts.map +0 -1
  281. package/vendor/@appport/core/dist/sha256.js +0 -46
  282. package/vendor/@appport/core/dist/sha256.js.map +0 -1
  283. package/vendor/@appport/core/dist/source-verification.d.ts +0 -53
  284. package/vendor/@appport/core/dist/source-verification.d.ts.map +0 -1
  285. package/vendor/@appport/core/dist/source-verification.js +0 -92
  286. package/vendor/@appport/core/dist/source-verification.js.map +0 -1
  287. package/vendor/@appport/core/dist/state-context.d.ts +0 -312
  288. package/vendor/@appport/core/dist/state-context.d.ts.map +0 -1
  289. package/vendor/@appport/core/dist/state-context.js +0 -100
  290. package/vendor/@appport/core/dist/state-context.js.map +0 -1
  291. package/vendor/@appport/core/dist/state.d.ts +0 -96
  292. package/vendor/@appport/core/dist/state.d.ts.map +0 -1
  293. package/vendor/@appport/core/dist/state.js +0 -89
  294. package/vendor/@appport/core/dist/state.js.map +0 -1
  295. package/vendor/@appport/core/dist/streams.d.ts +0 -38
  296. package/vendor/@appport/core/dist/streams.d.ts.map +0 -1
  297. package/vendor/@appport/core/dist/streams.js +0 -123
  298. package/vendor/@appport/core/dist/streams.js.map +0 -1
  299. package/vendor/@appport/core/dist/telemetry.d.ts +0 -42
  300. package/vendor/@appport/core/dist/telemetry.d.ts.map +0 -1
  301. package/vendor/@appport/core/dist/telemetry.js +0 -32
  302. package/vendor/@appport/core/dist/telemetry.js.map +0 -1
  303. package/vendor/@appport/core/dist/wasm-engine.d.ts +0 -24
  304. package/vendor/@appport/core/dist/wasm-engine.d.ts.map +0 -1
  305. package/vendor/@appport/core/dist/wasm-engine.js +0 -376
  306. package/vendor/@appport/core/dist/wasm-engine.js.map +0 -1
  307. package/vendor/@appport/core/package.json +0 -58
  308. package/vendor/@appport/mcp/README.md +0 -29
  309. package/vendor/@appport/mcp/dist/index.d.ts +0 -58
  310. package/vendor/@appport/mcp/dist/index.d.ts.map +0 -1
  311. package/vendor/@appport/mcp/dist/index.js +0 -69
  312. package/vendor/@appport/mcp/dist/index.js.map +0 -1
  313. package/vendor/@appport/mcp/package.json +0 -29
  314. package/vendor/@appport/mobile/README.md +0 -10
  315. package/vendor/@appport/mobile/dist/index.d.ts +0 -66
  316. package/vendor/@appport/mobile/dist/index.d.ts.map +0 -1
  317. package/vendor/@appport/mobile/dist/index.js +0 -182
  318. package/vendor/@appport/mobile/dist/index.js.map +0 -1
  319. package/vendor/@appport/mobile/package.json +0 -33
  320. package/vendor/@appport/protocol/README.md +0 -41
  321. package/vendor/@appport/protocol/dist/blob.d.ts +0 -46
  322. package/vendor/@appport/protocol/dist/blob.d.ts.map +0 -1
  323. package/vendor/@appport/protocol/dist/blob.js +0 -23
  324. package/vendor/@appport/protocol/dist/blob.js.map +0 -1
  325. package/vendor/@appport/protocol/dist/compatibility.d.ts +0 -25
  326. package/vendor/@appport/protocol/dist/compatibility.d.ts.map +0 -1
  327. package/vendor/@appport/protocol/dist/compatibility.js +0 -189
  328. package/vendor/@appport/protocol/dist/compatibility.js.map +0 -1
  329. package/vendor/@appport/protocol/dist/envelopes.d.ts +0 -175
  330. package/vendor/@appport/protocol/dist/envelopes.d.ts.map +0 -1
  331. package/vendor/@appport/protocol/dist/envelopes.js +0 -97
  332. package/vendor/@appport/protocol/dist/envelopes.js.map +0 -1
  333. package/vendor/@appport/protocol/dist/errors.d.ts +0 -74
  334. package/vendor/@appport/protocol/dist/errors.d.ts.map +0 -1
  335. package/vendor/@appport/protocol/dist/errors.js +0 -92
  336. package/vendor/@appport/protocol/dist/errors.js.map +0 -1
  337. package/vendor/@appport/protocol/dist/ids.d.ts +0 -12
  338. package/vendor/@appport/protocol/dist/ids.d.ts.map +0 -1
  339. package/vendor/@appport/protocol/dist/ids.js +0 -50
  340. package/vendor/@appport/protocol/dist/ids.js.map +0 -1
  341. package/vendor/@appport/protocol/dist/index.d.ts +0 -21
  342. package/vendor/@appport/protocol/dist/index.d.ts.map +0 -1
  343. package/vendor/@appport/protocol/dist/index.js +0 -21
  344. package/vendor/@appport/protocol/dist/index.js.map +0 -1
  345. package/vendor/@appport/protocol/dist/jsonschema.d.ts +0 -50
  346. package/vendor/@appport/protocol/dist/jsonschema.d.ts.map +0 -1
  347. package/vendor/@appport/protocol/dist/jsonschema.js +0 -6
  348. package/vendor/@appport/protocol/dist/jsonschema.js.map +0 -1
  349. package/vendor/@appport/protocol/dist/manifest.d.ts +0 -134
  350. package/vendor/@appport/protocol/dist/manifest.d.ts.map +0 -1
  351. package/vendor/@appport/protocol/dist/manifest.js +0 -20
  352. package/vendor/@appport/protocol/dist/manifest.js.map +0 -1
  353. package/vendor/@appport/protocol/dist/materialization.d.ts +0 -59
  354. package/vendor/@appport/protocol/dist/materialization.d.ts.map +0 -1
  355. package/vendor/@appport/protocol/dist/materialization.js +0 -2
  356. package/vendor/@appport/protocol/dist/materialization.js.map +0 -1
  357. package/vendor/@appport/protocol/dist/names.d.ts +0 -26
  358. package/vendor/@appport/protocol/dist/names.d.ts.map +0 -1
  359. package/vendor/@appport/protocol/dist/names.js +0 -85
  360. package/vendor/@appport/protocol/dist/names.js.map +0 -1
  361. package/vendor/@appport/protocol/dist/operations.d.ts +0 -34
  362. package/vendor/@appport/protocol/dist/operations.d.ts.map +0 -1
  363. package/vendor/@appport/protocol/dist/operations.js +0 -9
  364. package/vendor/@appport/protocol/dist/operations.js.map +0 -1
  365. package/vendor/@appport/protocol/dist/session.d.ts +0 -27
  366. package/vendor/@appport/protocol/dist/session.d.ts.map +0 -1
  367. package/vendor/@appport/protocol/dist/session.js +0 -7
  368. package/vendor/@appport/protocol/dist/session.js.map +0 -1
  369. package/vendor/@appport/protocol/dist/validate.d.ts +0 -37
  370. package/vendor/@appport/protocol/dist/validate.d.ts.map +0 -1
  371. package/vendor/@appport/protocol/dist/validate.js +0 -321
  372. package/vendor/@appport/protocol/dist/validate.js.map +0 -1
  373. package/vendor/@appport/protocol/dist/version.d.ts +0 -27
  374. package/vendor/@appport/protocol/dist/version.d.ts.map +0 -1
  375. package/vendor/@appport/protocol/dist/version.js +0 -26
  376. package/vendor/@appport/protocol/dist/version.js.map +0 -1
  377. package/vendor/@appport/protocol/package.json +0 -25
  378. package/vendor/@appport/schema/README.md +0 -32
  379. package/vendor/@appport/schema/dist/builder.d.ts +0 -85
  380. package/vendor/@appport/schema/dist/builder.d.ts.map +0 -1
  381. package/vendor/@appport/schema/dist/builder.js +0 -278
  382. package/vendor/@appport/schema/dist/builder.js.map +0 -1
  383. package/vendor/@appport/schema/dist/from-json-schema.d.ts +0 -12
  384. package/vendor/@appport/schema/dist/from-json-schema.d.ts.map +0 -1
  385. package/vendor/@appport/schema/dist/from-json-schema.js +0 -186
  386. package/vendor/@appport/schema/dist/from-json-schema.js.map +0 -1
  387. package/vendor/@appport/schema/dist/index.d.ts +0 -23
  388. package/vendor/@appport/schema/dist/index.d.ts.map +0 -1
  389. package/vendor/@appport/schema/dist/index.js +0 -22
  390. package/vendor/@appport/schema/dist/index.js.map +0 -1
  391. package/vendor/@appport/schema/dist/standard.d.ts +0 -46
  392. package/vendor/@appport/schema/dist/standard.d.ts.map +0 -1
  393. package/vendor/@appport/schema/dist/standard.js +0 -42
  394. package/vendor/@appport/schema/dist/standard.js.map +0 -1
  395. package/vendor/@appport/schema/dist/types.d.ts +0 -40
  396. package/vendor/@appport/schema/dist/types.d.ts.map +0 -1
  397. package/vendor/@appport/schema/dist/types.js +0 -19
  398. package/vendor/@appport/schema/dist/types.js.map +0 -1
  399. package/vendor/@appport/schema/package.json +0 -28
  400. package/vendor/@appport/server/README.md +0 -39
  401. package/vendor/@appport/server/dist/connection.d.ts +0 -45
  402. package/vendor/@appport/server/dist/connection.d.ts.map +0 -1
  403. package/vendor/@appport/server/dist/connection.js +0 -217
  404. package/vendor/@appport/server/dist/connection.js.map +0 -1
  405. package/vendor/@appport/server/dist/fetch.d.ts +0 -10
  406. package/vendor/@appport/server/dist/fetch.d.ts.map +0 -1
  407. package/vendor/@appport/server/dist/fetch.js +0 -50
  408. package/vendor/@appport/server/dist/fetch.js.map +0 -1
  409. package/vendor/@appport/server/dist/http.d.ts +0 -80
  410. package/vendor/@appport/server/dist/http.d.ts.map +0 -1
  411. package/vendor/@appport/server/dist/http.js +0 -307
  412. package/vendor/@appport/server/dist/http.js.map +0 -1
  413. package/vendor/@appport/server/dist/index.d.ts +0 -11
  414. package/vendor/@appport/server/dist/index.d.ts.map +0 -1
  415. package/vendor/@appport/server/dist/index.js +0 -11
  416. package/vendor/@appport/server/dist/index.js.map +0 -1
  417. package/vendor/@appport/server/dist/node-entry.d.ts +0 -4
  418. package/vendor/@appport/server/dist/node-entry.d.ts.map +0 -1
  419. package/vendor/@appport/server/dist/node-entry.js +0 -4
  420. package/vendor/@appport/server/dist/node-entry.js.map +0 -1
  421. package/vendor/@appport/server/dist/node.d.ts +0 -45
  422. package/vendor/@appport/server/dist/node.d.ts.map +0 -1
  423. package/vendor/@appport/server/dist/node.js +0 -190
  424. package/vendor/@appport/server/dist/node.js.map +0 -1
  425. package/vendor/@appport/server/dist/server.d.ts +0 -83
  426. package/vendor/@appport/server/dist/server.d.ts.map +0 -1
  427. package/vendor/@appport/server/dist/server.js +0 -114
  428. package/vendor/@appport/server/dist/server.js.map +0 -1
  429. package/vendor/@appport/server/dist/websocket.d.ts +0 -25
  430. package/vendor/@appport/server/dist/websocket.d.ts.map +0 -1
  431. package/vendor/@appport/server/dist/websocket.js +0 -221
  432. package/vendor/@appport/server/dist/websocket.js.map +0 -1
  433. package/vendor/@appport/server/package.json +0 -34
  434. package/vendor/@appport/transport-electron/README.md +0 -56
  435. package/vendor/@appport/transport-electron/dist/index.d.ts +0 -11
  436. package/vendor/@appport/transport-electron/dist/index.d.ts.map +0 -1
  437. package/vendor/@appport/transport-electron/dist/index.js +0 -11
  438. package/vendor/@appport/transport-electron/dist/index.js.map +0 -1
  439. package/vendor/@appport/transport-electron/dist/main.d.ts +0 -31
  440. package/vendor/@appport/transport-electron/dist/main.d.ts.map +0 -1
  441. package/vendor/@appport/transport-electron/dist/main.js +0 -61
  442. package/vendor/@appport/transport-electron/dist/main.js.map +0 -1
  443. package/vendor/@appport/transport-electron/dist/preload.d.ts +0 -22
  444. package/vendor/@appport/transport-electron/dist/preload.d.ts.map +0 -1
  445. package/vendor/@appport/transport-electron/dist/preload.js +0 -29
  446. package/vendor/@appport/transport-electron/dist/preload.js.map +0 -1
  447. package/vendor/@appport/transport-electron/dist/renderer.d.ts +0 -16
  448. package/vendor/@appport/transport-electron/dist/renderer.d.ts.map +0 -1
  449. package/vendor/@appport/transport-electron/dist/renderer.js +0 -36
  450. package/vendor/@appport/transport-electron/dist/renderer.js.map +0 -1
  451. package/vendor/@appport/transport-electron/dist/types.d.ts +0 -49
  452. package/vendor/@appport/transport-electron/dist/types.d.ts.map +0 -1
  453. package/vendor/@appport/transport-electron/dist/types.js +0 -5
  454. package/vendor/@appport/transport-electron/dist/types.js.map +0 -1
  455. package/vendor/@appport/transport-electron/package.json +0 -46
  456. package/vendor/@appport/transport-http/README.md +0 -24
  457. package/vendor/@appport/transport-http/dist/index.d.ts +0 -18
  458. package/vendor/@appport/transport-http/dist/index.d.ts.map +0 -1
  459. package/vendor/@appport/transport-http/dist/index.js +0 -223
  460. package/vendor/@appport/transport-http/dist/index.js.map +0 -1
  461. package/vendor/@appport/transport-http/package.json +0 -29
  462. package/vendor/@appport/transport-inprocess/README.md +0 -24
  463. package/vendor/@appport/transport-inprocess/dist/index.d.ts +0 -16
  464. package/vendor/@appport/transport-inprocess/dist/index.d.ts.map +0 -1
  465. package/vendor/@appport/transport-inprocess/dist/index.js +0 -30
  466. package/vendor/@appport/transport-inprocess/dist/index.js.map +0 -1
  467. package/vendor/@appport/transport-inprocess/package.json +0 -30
  468. package/vendor/@appport/transport-tauri/README.md +0 -45
  469. package/vendor/@appport/transport-tauri/dist/index.d.ts +0 -23
  470. package/vendor/@appport/transport-tauri/dist/index.d.ts.map +0 -1
  471. package/vendor/@appport/transport-tauri/dist/index.js +0 -44
  472. package/vendor/@appport/transport-tauri/dist/index.js.map +0 -1
  473. package/vendor/@appport/transport-tauri/package.json +0 -29
  474. package/vendor/@appport/transport-websocket/README.md +0 -22
  475. package/vendor/@appport/transport-websocket/dist/index.d.ts +0 -26
  476. package/vendor/@appport/transport-websocket/dist/index.d.ts.map +0 -1
  477. package/vendor/@appport/transport-websocket/dist/index.js +0 -72
  478. package/vendor/@appport/transport-websocket/dist/index.js.map +0 -1
  479. package/vendor/@appport/transport-websocket/package.json +0 -29
@@ -1,263 +0,0 @@
1
- /**
2
- * Authorization-Aware Capability Binding (PR23)
3
- *
4
- * Builds on PR22's deterministic dependency resolver to introduce a clean
5
- * authorization boundary: resolved requirements are evaluated for authorization,
6
- * and only authorized requirements produce bindings.
7
- *
8
- * Key architectural invariant:
9
- * DISCOVER → COMPATIBLE → RESOLVED → AUTHORIZED → BOUND → [STOP, don't invoke]
10
- *
11
- * Authorization is a policy-driven decision applied to resolved requirements only.
12
- * Unresolved and ambiguous requirements bypass authorization entirely.
13
- */
14
- import { transferAuthorizationAttestation, transferResolutionAttestation } from "./authority-attestation.js";
15
- // Runtime attestation is deliberately module-private. TypeScript interfaces are
16
- // structural and disappear at runtime; without an issuance check, a caller could
17
- // manufacture `{ authorization: { kind: "authorized" } }` and bypass the binder.
18
- const issuedBindings = new WeakSet();
19
- /** Throws unless the exact binding object was issued by CapabilityBinder. */
20
- export function assertIssuedAuthorizedBinding(binding) {
21
- if (typeof binding !== "object" || binding === null || !issuedBindings.has(binding)) {
22
- throw new Error("Authorized capability binding was not issued by CapabilityBinder");
23
- }
24
- }
25
- /**
26
- * Default Authorization Policy: permits all authorized consumers.
27
- *
28
- * This policy checks the consumer's authorization profile against the capability's
29
- * authorization requirements. It reuses the canonical AppPort permission semantics.
30
- *
31
- * For simple use cases and testing, this is often sufficient.
32
- * For complex policies (trust services, scope-aware rules, etc.), provide a custom policy.
33
- */
34
- export function defaultAuthorizationPolicy() {
35
- return {
36
- evaluate(_context) {
37
- // Default: permit all bindings
38
- // This is appropriate for local single-user runtimes and tests
39
- // but not for networked multi-principal deployments.
40
- return { kind: "authorized" };
41
- }
42
- };
43
- }
44
- /**
45
- * Allow-all Authorization Policy: permits every binding.
46
- *
47
- * Appropriate for local single-user runtimes and tests.
48
- * Never appropriate for multi-principal deployments.
49
- */
50
- export function allowAllAuthorizationPolicy() {
51
- return {
52
- evaluate() {
53
- return { kind: "authorized" };
54
- }
55
- };
56
- }
57
- /**
58
- * Permission-based Authorization Policy: consumer must have required permissions.
59
- *
60
- * Reuses the canonical @appport/authorization permission semantics.
61
- * A consumer has a set of granted permissions. A capability declares required permissions.
62
- * The consumer must have all required permissions.
63
- *
64
- * Supports wildcard permissions (e.g., "documents.*" matches "documents.read").
65
- */
66
- export function permissionAuthorizationPolicy(options) {
67
- return {
68
- async evaluate(context) {
69
- const permissions = await options.resolvePermissions(context.consumer, context.provider);
70
- // All bindings permitted if consumer has any permission
71
- // In practice, this would check specific capability requirements
72
- if (permissions.length > 0) {
73
- return { kind: "authorized", grantedScopes: permissions };
74
- }
75
- return {
76
- kind: "denied",
77
- reason: "capability_not_permitted",
78
- message: `Consumer "${context.consumer.id}" has no permissions to use capability "${context.capabilityName}" from provider "${context.provider.id}"`
79
- };
80
- }
81
- };
82
- }
83
- /**
84
- * Deterministic Binding Identity
85
- *
86
- * Generates a deterministic identifier for a binding based on its semantic participants.
87
- * Used to detect when the same binding would be created multiple times.
88
- *
89
- * Binding identity is deterministically derived from:
90
- * - Consumer application ID
91
- * - Requirement name
92
- * - Provider application ID
93
- * - Capability name + version
94
- *
95
- * Does NOT use:
96
- * - Object identity
97
- * - Process ID
98
- * - Timestamp
99
- * - Random UUID
100
- * - Handler identity
101
- */
102
- export function computeBindingId(binding) {
103
- const parts = [
104
- binding.consumer.id,
105
- binding.requirement.name,
106
- binding.provider.id,
107
- `${binding.capabilityName}@${binding.capabilityVersion}`
108
- ];
109
- return parts.join("::");
110
- }
111
- /**
112
- * Authority follows the consumer's own contract: the existence of a provider
113
- * must not create authority for a capability the consumer never declared.
114
- *
115
- * Only consumers whose authoritative manifest is available can be checked;
116
- * a consumer identity without a registered contract carries no declaration
117
- * to evaluate.
118
- */
119
- function undeclaredRequirementDenial(consumer, result) {
120
- const declared = consumer?.manifest?.requires;
121
- if (!declared)
122
- return undefined;
123
- const requirement = result.requirement;
124
- if (declared.some((entry) => entry.name === requirement.name && entry.version === requirement.version)) {
125
- return undefined;
126
- }
127
- return {
128
- kind: "denied",
129
- reason: "capability_not_permitted",
130
- message: `Consumer "${consumer.id}" does not declare requirement "${requirement.name}@${requirement.version}" in its contract`
131
- };
132
- }
133
- /**
134
- * Capability Binder: Orchestrates authorization-aware capability binding.
135
- *
136
- * Flow:
137
- * 1. Accept resolution results from ApplicationDependencyResolver
138
- * 2. For each resolved requirement, evaluate authorization policy
139
- * 3. Produce authorized bindings or explicit denials
140
- * 4. Preserve unresolved/ambiguous as-is (they bypass authorization)
141
- *
142
- * The binder is:
143
- * - Policy-driven: authorization logic is injected
144
- * - Side-effect free: no DB, handlers, or runtime invocation
145
- * - Deterministic: same input produces same binding
146
- * - Stateless: receives all context as parameters
147
- */
148
- export class CapabilityBinder {
149
- #policy;
150
- constructor(policy = defaultAuthorizationPolicy()) {
151
- this.#policy = policy;
152
- }
153
- /**
154
- * Bind a single resolved requirement.
155
- *
156
- * Returns either an authorized binding or an explicit denial.
157
- *
158
- * Precondition: result must be a resolved requirement.
159
- * This binder does not handle unresolved/ambiguous requirements.
160
- */
161
- async bindResolution(consumer, result) {
162
- const undeclared = undeclaredRequirementDenial(consumer, result);
163
- if (undeclared) {
164
- return {
165
- kind: "denied",
166
- requirement: result.requirement,
167
- provider: result.provider,
168
- authorization: undeclared
169
- };
170
- }
171
- const context = {
172
- consumer,
173
- provider: result.provider,
174
- capabilityName: result.requirement.name,
175
- capabilityVersion: result.capability.version
176
- };
177
- const authResult = await this.#policy.evaluate(context);
178
- if (authResult.kind === "authorized") {
179
- const binding = {
180
- consumer,
181
- requirement: result.requirement,
182
- provider: result.provider,
183
- capability: {
184
- name: result.capability.name,
185
- version: result.capability.version
186
- },
187
- authorization: authResult,
188
- bindingId: computeBindingId({
189
- consumer,
190
- requirement: result.requirement,
191
- provider: result.provider,
192
- capabilityName: result.capability.name,
193
- capabilityVersion: result.capability.version
194
- })
195
- };
196
- issuedBindings.add(binding);
197
- transferResolutionAttestation(result, binding);
198
- // Authorization is durable authority, not a one-time decision: carry the
199
- // authorization's own revalidation onto the binding so every later
200
- // execution boundary observes a revocation.
201
- transferAuthorizationAttestation(authResult, binding);
202
- return { kind: "authorized", binding };
203
- }
204
- return {
205
- kind: "denied",
206
- requirement: result.requirement,
207
- provider: result.provider,
208
- authorization: authResult
209
- };
210
- }
211
- /**
212
- * Bind all resolvable requirements for an application.
213
- *
214
- * Accepts the results from ApplicationDependencyResolver and produces
215
- * a complete application binding result.
216
- *
217
- * Flow for each requirement:
218
- * - resolved → evaluate authorization → authorized binding or explicit denial
219
- * - unresolved → pass through as-is (nothing to authorize)
220
- * - ambiguous → pass through as-is (nothing to authorize)
221
- *
222
- * Returns a complete ApplicationBindingResult preserving all states.
223
- */
224
- async bindApplication(consumer, resolutionResults) {
225
- const authorized = [];
226
- const denied = [];
227
- const unresolved = [];
228
- const ambiguous = [];
229
- const results = [];
230
- for (const result of resolutionResults) {
231
- if (result.kind === "resolved") {
232
- // Evaluate authorization for resolved requirements
233
- const bindingResult = await this.bindResolution(consumer, result);
234
- results.push(bindingResult);
235
- if (bindingResult.kind === "authorized") {
236
- authorized.push(bindingResult.binding);
237
- }
238
- else {
239
- denied.push(bindingResult);
240
- }
241
- }
242
- else if (result.kind === "unresolved") {
243
- // Pass through: no provider to authorize
244
- unresolved.push(result);
245
- results.push(result);
246
- }
247
- else if (result.kind === "ambiguous") {
248
- // Pass through: cannot select provider to authorize
249
- ambiguous.push(result);
250
- results.push(result);
251
- }
252
- }
253
- return {
254
- application: consumer,
255
- authorized,
256
- denied,
257
- unresolved,
258
- ambiguous,
259
- results
260
- };
261
- }
262
- }
263
- //# sourceMappingURL=binding.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"binding.js","sourceRoot":"","sources":["../src/binding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,gCAAgC,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAwH7G,gFAAgF;AAChF,iFAAiF;AACjF,iFAAiF;AACjF,MAAM,cAAc,GAAG,IAAI,O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M,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;gBACvC,oDAAoD;gBACpD,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACvB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;QAED,OAAO;YACL,WAAW,EAAE,QAAQ;YACrB,UAAU;YACV,MAAM;YACN,UAAU;YACV,SAAS;YACT,OAAO;SACR,CAAC;IACJ,CAAC;CACF"}
@@ -1,18 +0,0 @@
1
- import type { JsonValue } from "../../protocol/dist/index.d.ts";
2
- import { type AnyCapability } from "./capability.js";
3
- /**
4
- * Reserved `appport.*` capabilities.
5
- *
6
- * Discovery over HTTP is a well-known URL (§39), but IPC and in-process
7
- * runtimes have no URLs. Exposing the manifest as a capability makes discovery
8
- * work identically on every transport, which is the whole point of the
9
- * protocol.
10
- */
11
- export interface BuiltinOptions {
12
- manifest: () => JsonValue;
13
- /** Permissions required to read the manifest. Public by default. */
14
- authorization?: readonly string[];
15
- }
16
- export declare function createBuiltinCapabilities(options: BuiltinOptions): AnyCapability[];
17
- export declare const BUILTIN_CAPABILITY_NAMES: readonly ["appport.manifest", "appport.ping"];
18
- //# sourceMappingURL=builtins.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../src/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,SAAS,CAAC;IAC1B,oEAAoE;IACpE,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,EAAE,CA0ClF;AAED,eAAO,MAAM,wBAAwB,+CAAgD,CAAC"}
@@ -1,38 +0,0 @@
1
- import { s } from "../../schema/dist/index.js";
2
- import { defineCapability } from "./capability.js";
3
- export function createBuiltinCapabilities(options) {
4
- const authorization = options.authorization ?? [];
5
- const manifest = defineCapability({
6
- name: "appport.manifest",
7
- version: 1,
8
- description: "Returns the application manifest for this deployment.",
9
- authorization,
10
- input: s.object({}),
11
- // The manifest is described structurally rather than as an opaque value, so
12
- // a consumer in any language can validate what discovery returns (§32).
13
- output: s.object({
14
- protocol: s.string(),
15
- application: s.object({ id: s.string(), name: s.string(), version: s.string() }, { additionalProperties: true }),
16
- capabilities: s.array(s.record(s.unknown())),
17
- events: s.array(s.record(s.unknown())),
18
- transports: s.array(s.record(s.unknown()))
19
- }, { title: "AppPortManifest", additionalProperties: true }),
20
- handler() {
21
- return options.manifest();
22
- }
23
- });
24
- const ping = defineCapability({
25
- name: "appport.ping",
26
- version: 1,
27
- description: "Liveness probe. Returns the server time.",
28
- authorization,
29
- input: s.object({}),
30
- output: s.object({ timestamp: s.timestamp() }),
31
- handler() {
32
- return { timestamp: new Date().toISOString() };
33
- }
34
- });
35
- return [manifest, ping];
36
- }
37
- export const BUILTIN_CAPABILITY_NAMES = ["appport.manifest", "appport.ping"];
38
- //# sourceMappingURL=builtins.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"builtins.js","sourceRoot":"","sources":["../src/builtins.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,iBAAiB,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAsB,MAAM,iBAAiB,CAAC;AAgBvE,MAAM,UAAU,yBAAyB,CAAC,OAAuB;IAC/D,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,EAAE,CAAC;IAElD,MAAM,QAAQ,GAAG,gBAAgB,CAAC;QAChC,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,uDAAuD;QACpE,aAAa;QACb,KAAK,EAAE,CAAC,CAAC,MA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QAAQ,EAAE,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,kBAAkB,EAAE,cAAc,CAAU,CAAC"}
@@ -1,94 +0,0 @@
1
- import { type CapabilityKind, type ConcurrencyPolicy, type IdempotencySupport, type JsonValue } from "../../protocol/dist/index.d.ts";
2
- import { type Schema, type SchemaInput } from "../../schema/dist/index.d.ts";
3
- import type { CapabilityContext } from "./context.js";
4
- import type { CapabilityImplementation } from "./implementation.js";
5
- /** A capability handler: validated input in, output out (§9). */
6
- export type CapabilityHandler<Input, Output> = (input: Input, context: CapabilityContext) => Output | Promise<Output>;
7
- /** A stream capability handler: validated input in, a sequence of chunks out (§20). */
8
- export type StreamHandler<Input, Chunk> = (input: Input, context: CapabilityContext) => AsyncIterable<Chunk> | Promise<AsyncIterable<Chunk>>;
9
- export interface CapabilityOptions<Input, Output> {
10
- /** `<namespace>.<operation>`, never transport-flavoured (§8). */
11
- name: string;
12
- /** Capability version; part of the capability's identity (§42). */
13
- version: number;
14
- description?: string;
15
- input: SchemaInput<Input>;
16
- output: SchemaInput<Output>;
17
- /** Permissions required to invoke this capability (§34). */
18
- authorization?: readonly string[];
19
- /** Declares support for `idempotencyKey` (§44). */
20
- idempotency?: IdempotencySupport;
21
- /** Execution policy (§45). Defaults to `parallel`. */
22
- concurrency?: ConcurrencyPolicy;
23
- /** Server-enforced maximum duration in milliseconds (§46). */
24
- timeoutMs?: number;
25
- /** Events this capability may emit, for the manifest (§30). */
26
- emits?: readonly string[];
27
- deprecated?: boolean;
28
- attributes?: Record<string, JsonValue>;
29
- handler: CapabilityHandler<Input, Output>;
30
- /** Optional implementation binding for this capability (PR17). */
31
- implementation?: CapabilityImplementation<Input, Output>;
32
- }
33
- export interface StreamCapabilityOptions<Input, Chunk> extends Omit<CapabilityOptions<Input, Chunk>, "handler" | "output" | "idempotency"> {
34
- /** Schema of a single stream chunk. */
35
- output: SchemaInput<Chunk>;
36
- handler: StreamHandler<Input, Chunk>;
37
- }
38
- /** The normalized capability definition held by the registry. */
39
- export interface CapabilityDefinition<Input = unknown, Output = unknown> {
40
- readonly name: string;
41
- readonly version: number;
42
- readonly kind: CapabilityKind;
43
- readonly description?: string;
44
- readonly input: Schema<Input>;
45
- readonly output: Schema<Output>;
46
- readonly authorization: readonly string[];
47
- readonly idempotency: IdempotencySupport;
48
- readonly concurrency: ConcurrencyPolicy;
49
- readonly timeoutMs?: number;
50
- readonly emits: readonly string[];
51
- readonly deprecated: boolean;
52
- readonly attributes?: Record<string, JsonValue>;
53
- readonly handler: CapabilityHandler<Input, Output> | StreamHandler<Input, Output>;
54
- /** Optional implementation binding for this capability (PR17). */
55
- readonly implementation?: CapabilityImplementation<Input, Output>;
56
- }
57
- /**
58
- * Defines a request/response capability.
59
- *
60
- * The definition is transport-neutral by construction: nothing in it can
61
- * reference HTTP, IPC or any other carrier.
62
- */
63
- export declare function defineCapability<Input, Output>(options: CapabilityOptions<Input, Output>): CapabilityDefinition<Input, Output>;
64
- /** Defines a capability that answers with a sequence of values (§20). */
65
- export declare function defineStreamCapability<Input, Chunk>(options: StreamCapabilityOptions<Input, Chunk>): CapabilityDefinition<Input, Chunk>;
66
- export interface EventOptions<Payload> {
67
- name: string;
68
- version: number;
69
- description?: string;
70
- payload: SchemaInput<Payload>;
71
- /** Permissions a session must hold to observe the event. */
72
- authorization?: readonly string[];
73
- deprecated?: boolean;
74
- }
75
- export interface EventDefinition<Payload = unknown> {
76
- readonly name: string;
77
- readonly version: number;
78
- readonly description?: string;
79
- readonly payload: Schema<Payload>;
80
- readonly authorization: readonly string[];
81
- readonly deprecated: boolean;
82
- }
83
- /** Defines an event the application may publish (§17). */
84
- export declare function defineEvent<Payload>(options: EventOptions<Payload>): EventDefinition<Payload>;
85
- /**
86
- * A capability of unspecified shape.
87
- *
88
- * Collections of capabilities are heterogeneous, and `Schema<T>` is invariant
89
- * in `T`, so registries and application options work in terms of this alias.
90
- */
91
- export type AnyCapability = CapabilityDefinition<any, any>;
92
- export type AnyEvent = EventDefinition<any>;
93
- export declare const isStreamCapability: (definition: AnyCapability) => boolean;
94
- //# sourceMappingURL=capability.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAY,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,iEAAiE;AACjE,MAAM,MAAM,iBAAiB,CAAC,KAAK,EAAE,MAAM,IAAI,CAC7C,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,KACvB,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE9B,uFAAuF;AACvF,MAAM,MAAM,aAAa,CAAC,KAAK,EAAE,KAAK,IAAI,CACxC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,KACvB,aAAa,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAE1D,MAAM,WAAW,iBAAiB,CAAC,KAAK,EAAE,MAAM;IAC9C,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC1B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5B,4DAA4D;IAC5D,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,mDAAmD;IACnD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QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,0DAA0D;AAC1D,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,CAW7F;AAED;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,oBAAoB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAE3D,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;AAE5C,eAAO,MAAM,kBAAkB,GAAI,YAAY,aAAa,KAAG,OAAuC,CAAC"}
@@ -1,85 +0,0 @@
1
- import { errors, validateName } from "../../protocol/dist/index.js";
2
- import { toSchema } from "../../schema/dist/index.js";
3
- function assertName(name) {
4
- const result = validateName(name);
5
- if (!result.valid) {
6
- throw errors.invalidRequest(`Invalid capability name "${name}": ${result.reason}`);
7
- }
8
- }
9
- function assertVersion(name, version) {
10
- if (!Number.isInteger(version) || version < 1) {
11
- throw errors.invalidRequest(`Capability ${name} must declare a positive integer version`);
12
- }
13
- }
14
- function normalizeConcurrency(policy) {
15
- if (!policy)
16
- return { mode: "parallel" };
17
- if (policy.mode === "keyed" && !policy.key) {
18
- throw errors.invalidRequest("Keyed concurrency requires a key field name");
19
- }
20
- return policy;
21
- }
22
- /**
23
- * Defines a request/response capability.
24
- *
25
- * The definition is transport-neutral by construction: nothing in it can
26
- * reference HTTP, IPC or any other carrier.
27
- */
28
- export function defineCapability(options) {
29
- assertName(options.name);
30
- assertVersion(options.name, options.version);
31
- return {
32
- name: options.name,
33
- version: options.version,
34
- kind: "request",
35
- ...(options.description ? { description: options.description } : {}),
36
- input: toSchema(options.input),
37
- output: toSchema(options.output),
38
- authorization: options.authorization ?? [],
39
- idempotency: options.idempotency ?? "unsupported",
40
- concurrency: normalizeConcurrency(options.concurrency),
41
- ...(options.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}),
42
- emits: options.emits ?? [],
43
- deprecated: options.deprecated ?? false,
44
- ...(options.attributes ? { attributes: options.attributes } : {}),
45
- handler: options.handler,
46
- ...(options.implementation ? { implementation: options.implementation } : {})
47
- };
48
- }
49
- /** Defines a capability that answers with a sequence of values (§20). */
50
- export function defineStreamCapability(options) {
51
- assertName(options.name);
52
- assertVersion(options.name, options.version);
53
- return {
54
- name: options.name,
55
- version: options.version,
56
- kind: "stream",
57
- ...(options.description ? { description: options.description } : {}),
58
- input: toSchema(options.input),
59
- output: toSchema(options.output),
60
- authorization: options.authorization ?? [],
61
- idempotency: "unsupported",
62
- concurrency: normalizeConcurrency(options.concurrency),
63
- ...(options.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}),
64
- emits: options.emits ?? [],
65
- deprecated: options.deprecated ?? false,
66
- ...(options.attributes ? { attributes: options.attributes } : {}),
67
- handler: options.handler,
68
- ...(options.implementation ? { implementation: options.implementation } : {})
69
- };
70
- }
71
- /** Defines an event the application may publish (§17). */
72
- export function defineEvent(options) {
73
- assertName(options.name);
74
- assertVersion(options.name, options.version);
75
- return {
76
- name: options.name,
77
- version: options.version,
78
- ...(options.description ? { description: options.description } : {}),
79
- payload: toSchema(options.payload),
80
- authorization: options.authorization ?? [],
81
- deprecated: options.deprecated ?? false
82
- };
83
- }
84
- export const isStreamCapability = (definition) => definition.kind === "stream";
85
- //# sourceMappingURL=capability.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capability.js","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,YAAY,EAKb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAA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C,aAAa,IAAI,EAAE;QAC1C,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,KAAK;KACxC,CAAC;AACJ,CAAC;AAYD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAAyB,EAAW,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,QAAQ,CAAC"}
@@ -1,16 +0,0 @@
1
- import { type ConcurrencyPolicy } from "../../protocol/dist/index.d.ts";
2
- /**
3
- * Capability concurrency policies (specification §45).
4
- *
5
- * `parallel` is the default: requests run concurrently. `serialized` runs one
6
- * request at a time for the capability. `keyed(field)` serializes per input key
7
- * value, so `documents.save` never interleaves writes to the same document
8
- * while staying parallel across different documents.
9
- */
10
- export declare class ConcurrencyGate {
11
- #private;
12
- run<T>(policy: ConcurrencyPolicy, scope: string, input: unknown, fn: () => Promise<T>): Promise<T>;
13
- /** Number of keys currently holding queued work. */
14
- get activeKeys(): number;
15
- }
16
- //# sourceMappingURL=concurrency.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"concurrency.d.ts","sourceRoot":"","sources":["../src/concurrency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAOnE;;;;;;;GAOG;AACH,qBAAa,eAAe;;IAGpB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAuBxG,oDAAoD;IACpD,IAAI,UAAU,IAAI,MAAM,CAEvB;CACF"}
@@ -1,46 +0,0 @@
1
- import { errors } from "../../protocol/dist/index.js";
2
- /**
3
- * Capability concurrency policies (specification §45).
4
- *
5
- * `parallel` is the default: requests run concurrently. `serialized` runs one
6
- * request at a time for the capability. `keyed(field)` serializes per input key
7
- * value, so `documents.save` never interleaves writes to the same document
8
- * while staying parallel across different documents.
9
- */
10
- export class ConcurrencyGate {
11
- #queues = new Map();
12
- async run(policy, scope, input, fn) {
13
- if (policy.mode === "parallel")
14
- return fn();
15
- const key = policy.mode === "serialized" ? scope : `${scope}:${keyValue(policy.key, input)}`;
16
- const queue = this.#queues.get(key) ?? { tail: Promise.resolve(), waiting: 0 };
17
- queue.waiting += 1;
18
- this.#queues.set(key, queue);
19
- const run = queue.tail.then(fn, fn);
20
- // The tail never rejects, so a failing request does not poison the queue.
21
- queue.tail = run.then(() => undefined, () => undefined);
22
- try {
23
- return await run;
24
- }
25
- finally {
26
- queue.waiting -= 1;
27
- if (queue.waiting === 0 && this.#queues.get(key) === queue)
28
- this.#queues.delete(key);
29
- }
30
- }
31
- /** Number of keys currently holding queued work. */
32
- get activeKeys() {
33
- return this.#queues.size;
34
- }
35
- }
36
- function keyValue(field, input) {
37
- if (typeof input !== "object" || input === null) {
38
- throw errors.invalidRequest(`Keyed concurrency requires an object input with "${field}"`);
39
- }
40
- const value = input[field];
41
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
42
- return String(value);
43
- }
44
- throw errors.invalidRequest(`Keyed concurrency requires a scalar "${field}" in the input`);
45
- }
46
- //# sourceMappingURL=concurrency.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"concurrency.js","sourceRoot":"","sources":["../src/concurrency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0B,MAAM,mBAAmB,CAAC;AAOnE;;;;;;;GAOG;AACH,MAAM,OAAO,eAAe;IACjB,OAAO,GAAG,IAAI,GAAG,EAAiB,CAAC;IAE5C,KAAK,CAAC,GAAG,CAAI,MAAyB,EAAE,KAAa,EAAE,KAAc,EAAE,EAAoB;QACzF,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU;YAAE,OAAO,EAAE,EAAE,CAAC;QAE5C,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,K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