@appport/sdk 1.1.17 → 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,392 +0,0 @@
1
- /**
2
- * Executable WASM Artifact Model (PR25)
3
- *
4
- * The executable artifact layer between verified application contracts and
5
- * eventual host-mediated execution. This layer ensures:
6
- *
7
- * - Artifact identity is distinct from contract identity
8
- * - Contract fingerprint is embedded and canonical
9
- * - Artifact is content-addressable (SHA256)
10
- * - Compilation is deterministic where toolchain permits
11
- * - Exports are derived from verified provided capabilities
12
- * - Requirements remain external (not embedded)
13
- * - No secrets, credentials, or handlers in artifacts
14
- * - Artifact inspection does not execute code
15
- *
16
- * CRITICAL INVARIANT:
17
- * A verified application produces an executable artifact.
18
- * An invalid application cannot produce an artifact.
19
- * The artifact references the contract's canonical fingerprint.
20
- * The artifact bytes are immutable and content-addressed.
21
- */
22
- import { createHash } from "crypto";
23
- import { generateManifest, fingerprintManifest } from "./manifest.js";
24
- /**
25
- * Compile a verified application into an executable WASM artifact.
26
- *
27
- * CRITICAL INVARIANT:
28
- * Only verified applications can compile to artifacts.
29
- * Invalid applications fail at the verify() step, before compilation.
30
- *
31
- * Flow:
32
- * ```
33
- * defineApplication()
34
- * ↓
35
- * verifyApplication() // Must succeed
36
- * ↓
37
- * compileArtifact() // Produces ExecutableArtifact
38
- * ```
39
- *
40
- * @param assembly - The application assembly (must be verified)
41
- * @param verification - The verification result (must have ready: true)
42
- * @param options - Optional compilation options
43
- * @returns The executable artifact
44
- * @throws Error if assembly is not verified and ready
45
- */
46
- export function compileArtifact(assembly, verification, options) {
47
- // Require verification
48
- if (!verification.ready) {
49
- throw new Error("Cannot compile artifact: application is not verified and ready. Call assembly.verify() first.");
50
- }
51
- // Generate manifest
52
- const manifest = generateManifest(assembly, verification);
53
- // Calculate contract fingerprint
54
- const contractFingerprint = fingerprintManifest(manifest);
55
- // Build exports from provided capabilities
56
- const exports = manifest.provides.map((cap) => ({
57
- name: cap.name,
58
- version: cap.version,
59
- kind: cap.kind,
60
- inputSchema: cap.inputSchema,
61
- outputSchema: cap.outputSchema,
62
- authorization: cap.authorization,
63
- ...(cap.idempotency ? { idempotency: cap.idempotency } : {}),
64
- ...(cap.concurrency ? { concurrency: cap.concurrency } : {}),
65
- ...(cap.timeoutMs ? { timeoutMs: cap.timeoutMs } : {}),
66
- emits: cap.emits,
67
- deprecated: cap.deprecated
68
- }));
69
- // Build requires from manifest
70
- const requires = manifest.requires.map((req) => ({
71
- name: req.name,
72
- version: req.version,
73
- ...(req.versionConstraint ? { versionConstraint: req.versionConstraint } : {}),
74
- ...(req.provider ? { provider: req.provider } : {})
75
- }));
76
- // Create compiler metadata
77
- const compiler = {
78
- format: "wasm/1",
79
- target: "wasm32-unknown-unknown",
80
- compiler: options?.compiler ?? "tsc-to-wasm",
81
- compilerVersion: options?.compilerVersion ?? "1.0.0",
82
- optimizationLevel: options?.optimizationLevel ?? 2
83
- };
84
- // Create metadata
85
- const metadata = {
86
- protocol: "AppPort/1",
87
- version: "artifact/1",
88
- application: {
89
- id: assembly.identity.id,
90
- name: assembly.identity.name,
91
- version: assembly.identity.version
92
- },
93
- contractFingerprint,
94
- manifest,
95
- exports,
96
- requires,
97
- compiler,
98
- createdAt: new Date().toISOString(),
99
- ...(options?.description ? { description: options.description } : {})
100
- };
101
- // Generate artifact bytes
102
- // The artifact includes:
103
- // 1. Metadata (contract, exports, requirements) - EXCLUDING timestamps for determinism
104
- // 2. Implementation code (represented as source code hashes for determinism)
105
- //
106
- // This ensures:
107
- // - Same contract + same implementation → same artifact bytes
108
- // - Same contract + different implementation → different artifact bytes
109
- // - Timestamps do not affect artifact identity (per spec §6, §7)
110
- // Create canonical metadata for hashing (exclude timestamps)
111
- const canonicalMetadata = {
112
- protocol: metadata.protocol,
113
- version: metadata.version,
114
- application: metadata.application,
115
- contractFingerprint: metadata.contractFingerprint,
116
- manifest: metadata.manifest,
117
- exports: metadata.exports,
118
- requires: metadata.requires,
119
- compiler: metadata.compiler,
120
- ...(metadata.description ? { description: metadata.description } : {})
121
- // Note: createdAt is intentionally excluded for determinism
122
- };
123
- // Hash each implementation to create a deterministic representation
124
- // LIMITATION: In JavaScript, the implementation's execute method is always a wrapper,
125
- // and the actual handler is captured in a closure that's not accessible via toString().
126
- // Therefore, different JavaScript implementations may produce identical hashes.
127
- // This is a known limitation of the JavaScript prototype and would be addressed in
128
- // a real WASM compiler that has access to the source TypeScript/Rust/etc.
129
- //
130
- // For determinism, we include:
131
- // - The execute method source
132
- // - The key (which is deterministic from the assembly)
133
- //
134
- // A real WASM compiler would:
135
- // - Compile TypeScript/Rust source to WASM bytecode
136
- // - Use bytecode hashing instead of function source hashing
137
- // - Guarantee distinct implementations produce distinct bytecode
138
- const implementationHashes = {};
139
- for (const [key, impl] of assembly.implementations) {
140
- if (impl && impl.execute) {
141
- // Create a hash from the implementation key and execute method
142
- // In a real compiler, this would hash the compiled WASM bytecode
143
- const source = impl.execute.toString();
144
- const combined = `${key}|${source}`;
145
- const hash = createHash("sha256").update(combined).digest("hex");
146
- implementationHashes[key] = hash;
147
- }
148
- }
149
- // Create the canonical payload for hashing (deterministic)
150
- const canonicalPayload = {
151
- metadata: canonicalMetadata,
152
- implementations: implementationHashes
153
- };
154
- // Serialize for content hash calculation (deterministic JSON)
155
- const canonicalJson = JSON.stringify(canonicalPayload);
156
- // Calculate content hash from canonical (deterministic) representation
157
- const contentHash = createHash("sha256").update(canonicalJson).digest("hex");
158
- // Create full artifact bytes (including timestamps for informational purposes)
159
- const fullPayload = {
160
- metadata: metadata,
161
- implementations: implementationHashes
162
- };
163
- const fullJson = JSON.stringify(fullPayload, null, 2);
164
- const bytes = Buffer.from(fullJson, "utf-8");
165
- // Validate artifact
166
- const validation = validateArtifactInternal(metadata, bytes, contractFingerprint);
167
- return {
168
- metadata,
169
- bytes,
170
- contentHash,
171
- validation
172
- };
173
- }
174
- /**
175
- * Inspect an artifact's metadata without executing it.
176
- *
177
- * Provides complete artifact information for observation and validation
178
- * without running any code.
179
- *
180
- * Returned information:
181
- * - Application identity
182
- * - Contract fingerprint
183
- * - Artifact content hash
184
- * - Capability exports
185
- * - Required capabilities
186
- * - Compiler metadata
187
- * - Validation results
188
- *
189
- * @param artifact - The artifact to inspect
190
- * @returns Artifact inspection report
191
- */
192
- export function inspectArtifact(artifact) {
193
- return {
194
- application: artifact.metadata.application,
195
- contractFingerprint: artifact.metadata.contractFingerprint,
196
- contentHash: artifact.contentHash,
197
- format: artifact.metadata.compiler.format,
198
- exports: artifact.metadata.exports.map((exp) => ({
199
- name: exp.name,
200
- version: exp.version,
201
- kind: exp.kind
202
- })),
203
- requires: artifact.metadata.requires.map((req) => ({
204
- name: req.name,
205
- version: req.version
206
- })),
207
- compiler: artifact.metadata.compiler,
208
- validation: artifact.validation,
209
- createdAt: artifact.metadata.createdAt,
210
- description: artifact.metadata.description
211
- };
212
- }
213
- /**
214
- * Validate an artifact.
215
- *
216
- * Checks:
217
- * - WASM format validity (structural)
218
- * - Contract fingerprint consistency
219
- * - Export/capability matching
220
- * - Metadata completeness
221
- * - Absence of forbidden content where statically detectable
222
- *
223
- * Does NOT check:
224
- * - Runtime safety (runtime sandboxing in PR26)
225
- * - Execution outcomes
226
- * - Performance characteristics
227
- *
228
- * @param artifact - The artifact to validate
229
- * @returns Validation result
230
- */
231
- export function validateArtifact(artifact) {
232
- // Recalculate validation to ensure consistency
233
- return validateArtifactInternal(artifact.metadata, artifact.bytes, artifact.metadata.contractFingerprint);
234
- }
235
- /**
236
- * Serialize artifact metadata to JSON.
237
- *
238
- * The serialized representation is:
239
- * - Deterministic
240
- * - Portable
241
- * - JSON-safe
242
- * - Free of executable functions
243
- * - Free of runtime handles
244
- * - Free of secrets
245
- *
246
- * @param metadata - The metadata to serialize
247
- * @returns JSON string
248
- */
249
- export function serializeArtifactMetadata(metadata) {
250
- return JSON.stringify(metadata, null, 2);
251
- }
252
- /**
253
- * Deserialize artifact metadata from JSON.
254
- *
255
- * @param json - The JSON string
256
- * @returns The deserialized metadata
257
- * @throws Error if JSON is invalid or doesn't match schema
258
- */
259
- export function deserializeArtifactMetadata(json) {
260
- const data = JSON.parse(json);
261
- // Basic validation
262
- if (!data.protocol || data.protocol !== "AppPort/1") {
263
- throw new Error("Invalid artifact metadata: missing or incorrect protocol identifier");
264
- }
265
- if (!data.version || data.version !== "artifact/1") {
266
- throw new Error("Invalid artifact metadata: missing or incorrect version");
267
- }
268
- if (!data.application || !data.application.id) {
269
- throw new Error("Invalid artifact metadata: missing application identity");
270
- }
271
- if (!data.contractFingerprint) {
272
- throw new Error("Invalid artifact metadata: missing contract fingerprint");
273
- }
274
- return data;
275
- }
276
- /**
277
- * Internal: Validate artifact consistency.
278
- *
279
- * Checks for contract/artifact relationship validity.
280
- */
281
- function validateArtifactInternal(metadata, bytes, expectedFingerprint) {
282
- const errors = [];
283
- const warnings = [];
284
- // Check protocol and version
285
- if (metadata.protocol !== "AppPort/1") {
286
- errors.push({
287
- code: "INVALID_PROTOCOL",
288
- message: `Invalid protocol: expected "AppPort/1", got "${metadata.protocol}"`
289
- });
290
- }
291
- if (metadata.version !== "artifact/1") {
292
- errors.push({
293
- code: "INVALID_VERSION",
294
- message: `Invalid version: expected "artifact/1", got "${metadata.version}"`
295
- });
296
- }
297
- // Check contract fingerprint matches manifest
298
- const calculatedFingerprint = fingerprintManifest(metadata.manifest);
299
- if (metadata.contractFingerprint !== calculatedFingerprint) {
300
- errors.push({
301
- code: "FINGERPRINT_MISMATCH",
302
- message: `Contract fingerprint mismatch: declared "${metadata.contractFingerprint}", calculated "${calculatedFingerprint}"`,
303
- context: {
304
- declared: metadata.contractFingerprint,
305
- calculated: calculatedFingerprint
306
- }
307
- });
308
- }
309
- // Check application identity is present
310
- if (!metadata.application.id || !metadata.application.name || !metadata.application.version) {
311
- errors.push({
312
- code: "INVALID_APPLICATION_IDENTITY",
313
- message: "Invalid application identity: missing id, name, or version"
314
- });
315
- }
316
- // Check exports match manifest provides
317
- const manifestNames = new Set(metadata.manifest.provides.map((p) => `${p.name}@${p.version}`));
318
- const exportNames = new Set(metadata.exports.map((e) => `${e.name}@${e.version}`));
319
- if (manifestNames.size !== exportNames.size) {
320
- errors.push({
321
- code: "EXPORT_COUNT_MISMATCH",
322
- message: `Export count mismatch: manifest has ${manifestNames.size}, exports has ${exportNames.size}`
323
- });
324
- }
325
- for (const name of manifestNames) {
326
- if (!exportNames.has(name)) {
327
- errors.push({
328
- code: "MISSING_EXPORT",
329
- message: `Export missing from artifact: ${name}`
330
- });
331
- }
332
- }
333
- for (const name of exportNames) {
334
- if (!manifestNames.has(name)) {
335
- errors.push({
336
- code: "EXTRA_EXPORT",
337
- message: `Extra export not in manifest: ${name}`
338
- });
339
- }
340
- }
341
- // Check bytes are non-empty
342
- if (!bytes || bytes.length === 0) {
343
- errors.push({
344
- code: "EMPTY_ARTIFACT",
345
- message: "Artifact bytes are empty"
346
- });
347
- }
348
- // Check metadata has required fields
349
- if (!metadata.compiler || !metadata.compiler.format) {
350
- errors.push({
351
- code: "INVALID_COMPILER_METADATA",
352
- message: "Compiler metadata is incomplete"
353
- });
354
- }
355
- if (!metadata.createdAt) {
356
- errors.push({
357
- code: "MISSING_TIMESTAMP",
358
- message: "Missing creation timestamp"
359
- });
360
- }
361
- return {
362
- valid: errors.length === 0,
363
- errors,
364
- warnings
365
- };
366
- }
367
- /**
368
- * Check if two artifacts are equivalent in contract and exports.
369
- *
370
- * Two artifacts are equivalent if they have the same contract fingerprint
371
- * and the same exported capabilities, regardless of artifact content hash.
372
- *
373
- * This is useful for detecting duplicate contract implementations.
374
- *
375
- * @param artifact1 - First artifact
376
- * @param artifact2 - Second artifact
377
- * @returns true if artifacts are contract-equivalent
378
- */
379
- export function artifactsAreEquivalent(artifact1, artifact2) {
380
- return artifact1.metadata.contractFingerprint === artifact2.metadata.contractFingerprint;
381
- }
382
- /**
383
- * Check if two artifacts have identical bytes (and thus same content hash).
384
- *
385
- * @param artifact1 - First artifact
386
- * @param artifact2 - Second artifact
387
- * @returns true if artifacts have identical bytes
388
- */
389
- export function artifactsAreIdentical(artifact1, artifact2) {
390
- return artifact1.contentHash === artifact2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ACtC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC1B,MAAM;QACN,QAAQ;KACT,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,sBAAsB,CAAC,SAA6B,EAAE,SAA6B;IACjG,OAAO,SAAS,CAAC,QAAQ,CAAC,mBAAmB,KAAK,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC;AAC3F,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAA6B,EAAE,SAA6B;IAChG,OAAO,SAAS,CAAC,WAAW,KAAK,SAAS,CAAC,WAAW,CAAC;AACzD,CAAC"}
@@ -1,237 +0,0 @@
1
- /**
2
- * Application Assembly & Verification (PR18)
3
- *
4
- * An application's assembly model contains:
5
- * - Identity (id, name, version)
6
- * - Provided capabilities contract
7
- * - Required capabilities contract
8
- * - Implementation bindings
9
- * - Verification/readiness state
10
- *
11
- * This separates declarative contract from business logic bindings,
12
- * and provides deterministic verification before runtime execution.
13
- */
14
- import type { AnyCapability, CapabilityDefinition } from "./capability.js";
15
- import type { CapabilityImplementation } from "./implementation.js";
16
- import type { ApplicationManifest } from "./manifest.js";
17
- import type { JsonValue } from "../../protocol/dist/index.d.ts";
18
- /**
19
- * Reference to a capability by name and version.
20
- * Used for both provided and required capabilities.
21
- *
22
- * For required capabilities, supports version constraints (e.g., "^1", "~1.2")
23
- * and provider constraints for deterministic dependency resolution (PR22).
24
- */
25
- export interface CapabilityReference {
26
- readonly name: string;
27
- readonly version: number;
28
- readonly versionConstraint?: string;
29
- readonly provider?: {
30
- readonly applicationId?: string;
31
- };
32
- }
33
- /**
34
- * Application assembly: the declarative model of an application's
35
- * contract, implementations, and dependencies.
36
- */
37
- export interface ApplicationAssembly {
38
- /** Application identity. */
39
- readonly identity: {
40
- /** Unique application identifier. */
41
- readonly id: string;
42
- /** Human-readable application name. */
43
- readonly name: string;
44
- /** Semantic version. */
45
- readonly version: string;
46
- };
47
- /** Serializable application contract metadata; never executable authority. */
48
- readonly metadata?: Readonly<Record<string, JsonValue>>;
49
- /** Capabilities this application provides. */
50
- readonly provides: readonly CapabilityDefinition[];
51
- /** Capabilities this application requires from other providers. */
52
- readonly requires: readonly CapabilityReference[];
53
- /** Implementation bindings for provided capabilities. */
54
- readonly implementations: ReadonlyMap<string, CapabilityImplementation>;
55
- }
56
- /**
57
- * A single verification issue: an error or warning.
58
- */
59
- export interface VerificationIssue {
60
- /** Issue severity: 'error' or 'warning'. */
61
- readonly severity: "error" | "warning";
62
- /** Human-readable issue message. */
63
- readonly message: string;
64
- /** Optional capability reference (if issue is capability-related). */
65
- readonly capability?: CapabilityReference;
66
- }
67
- /**
68
- * Verification result: structural validation of an application assembly.
69
- * This is NOT a runtime health check—it validates the assembly contract.
70
- */
71
- export interface VerificationResult {
72
- /** Whether the application is ready to run. */
73
- readonly ready: boolean;
74
- /** All detected errors (prevents readiness). */
75
- readonly errors: readonly VerificationIssue[];
76
- /** All detected warnings (does not prevent readiness). */
77
- readonly warnings: readonly VerificationIssue[];
78
- /** Provided capabilities (verified). */
79
- readonly provides: readonly CapabilityReference[];
80
- /** Required capabilities (verified). */
81
- readonly requires: readonly CapabilityReference[];
82
- /** Implementation status for each provided capability. */
83
- readonly implementations: ReadonlyMap<string, "bound" | "missing" | "orphan">;
84
- }
85
- /**
86
- * Options for defining an application assembly.
87
- */
88
- export interface DefineApplicationOptions {
89
- /** Application identity. */
90
- identity: {
91
- id: string;
92
- name: string;
93
- version: string;
94
- };
95
- metadata?: Readonly<Record<string, JsonValue>>;
96
- /** Capabilities this application provides. */
97
- provides: readonly CapabilityDefinition[];
98
- /** Capabilities this application requires. */
99
- requires?: readonly CapabilityReference[];
100
- /** Implementation bindings for provided capabilities. */
101
- implementations?: ReadonlyMap<string, CapabilityImplementation> | Record<string, CapabilityImplementation>;
102
- }
103
- /** Ergonomic developer-authored application contract. */
104
- export interface AuthorApplicationOptions {
105
- /** Stable application identity; never inferred from a path or process. */
106
- id: string;
107
- /** Human-readable name. Defaults to `id`. */
108
- name?: string;
109
- /** Semantic application version. */
110
- version: string;
111
- /** Descriptive, serializable contract metadata. */
112
- metadata?: Readonly<Record<string, JsonValue>>;
113
- /** Capability contracts offered by this application. */
114
- provides?: readonly AnyCapability[];
115
- /** Capability requirements; these never select a provider. */
116
- requires?: readonly CapabilityReference[];
117
- }
118
- export interface AuthoredApplication extends ApplicationAssembly {
119
- verify(): VerificationResult;
120
- manifest(): ApplicationManifest;
121
- manifestUnchecked(): ApplicationManifest;
122
- fingerprint(): string;
123
- fingerprintUnchecked(): string;
124
- /** Register through the supplied authoritative ApplicationRegistry boundary. */
125
- register<Result>(registry: {
126
- registerWithValidation(options: {
127
- identity: ApplicationAssembly["identity"];
128
- manifest: ApplicationManifest;
129
- fingerprint: string;
130
- verification: VerificationResult;
131
- }): Promise<Result>;
132
- }): Promise<Result>;
133
- }
134
- /** A role is derived per capability; it is never application identity. */
135
- export type ApplicationCapabilityRole = "PROVIDER" | "CONSUMER" | "BOTH" | "NONE";
136
- export interface ApplicationCapabilityDeclarations {
137
- readonly provides: readonly {
138
- readonly name: string;
139
- }[];
140
- readonly requires: readonly {
141
- readonly name: string;
142
- }[];
143
- }
144
- export declare function applicationCapabilityRole(application: ApplicationCapabilityDeclarations, capabilityName: string): ApplicationCapabilityRole;
145
- export declare function applicationCapabilityRoles(application: ApplicationCapabilityDeclarations): Readonly<Record<string, Exclude<ApplicationCapabilityRole, "NONE">>>;
146
- /** Declare a capability dependency without naming or selecting a provider. */
147
- export declare function defineRequirement(options: {
148
- capability: string;
149
- version: string | number;
150
- }): CapabilityReference;
151
- /**
152
- * Defines an application assembly: identity, contract, and implementations.
153
- *
154
- * Usage:
155
- *
156
- * ```typescript
157
- * const assembly = defineApplication({
158
- * identity: { id: "invoicing", name: "Invoicing", version: "1.0.0" },
159
- * provides: [invoiceCreate, invoiceSend, invoiceRefund],
160
- * requires: [{ name: "payments.charge", version: 1 }],
161
- * implementations: {
162
- * "invoice.create@1": createInvoiceImpl,
163
- * "invoice.send@1": sendInvoiceImpl,
164
- * "invoice.refund@1": refundInvoiceImpl,
165
- * }
166
- * });
167
- * ```
168
- *
169
- * The assembly is purely declarative. Call `assembly.verify()` to validate
170
- * that all contracts are internally coherent and implementations are complete.
171
- */
172
- export declare function defineApplication(options: DefineApplicationOptions | AuthorApplicationOptions): AuthoredApplication;
173
- /**
174
- * Verifies an application assembly for coherence and completeness.
175
- *
176
- * Checks:
177
- * - All provided capabilities are structurally valid
178
- * - All required capabilities are structurally valid
179
- * - All provided capabilities have explicit implementation bindings
180
- * - No orphan implementations (implementations for undeclared capabilities)
181
- * - All requirements pass existing PR16 validation
182
- *
183
- * Returns a VerificationResult with ready state and detailed issues.
184
- *
185
- * NOTE: This function checks for explicit implementation bindings only.
186
- * Legacy handlers (PR17 pattern) are NOT considered implementations for
187
- * verification purposes. Use `AppPortApplication.verify()` for runtime
188
- * verification that includes handler compatibility.
189
- *
190
- * CRITICAL INVARIANT: Verification never executes business logic.
191
- * It is purely structural/contractual validation.
192
- */
193
- export declare function verifyApplication(assembly: ApplicationAssembly): VerificationResult;
194
- /**
195
- * Runtime verification of an application assembly with backward compatibility.
196
- *
197
- * This variant is used by AppPortApplication.verify() and accepts both:
198
- * - Explicit implementation bindings (PR18)
199
- * - Legacy handlers attached to capabilities (PR17/backward compat)
200
- *
201
- * A capability is considered "bound" if it has either:
202
- * 1. An explicit implementation binding in the assembly, OR
203
- * 2. An implementation attached to the capability definition (PR17), OR
204
- * 3. A fallback handler in the capability definition (legacy)
205
- */
206
- export declare function verifyApplicationWithHandlers(assembly: ApplicationAssembly): VerificationResult;
207
- /**
208
- * Format a verification result as a human-readable string.
209
- *
210
- * Example output:
211
- *
212
- * ```
213
- * AppPort Application Verification
214
- * Application: invoicing
215
- * Version: 1.0.0
216
- *
217
- * PROVIDES
218
- * ✓ invoice.create@1
219
- * ✓ invoice.send@1
220
- * ✗ invoice.refund@1
221
- *
222
- * REQUIRES
223
- * ✓ payments.charge@1
224
- *
225
- * IMPLEMENTATIONS
226
- * ✓ invoice.create@1
227
- * ✓ invoice.send@1
228
- *
229
- * ERRORS
230
- * ✗ invoice.refund@1 has no implementation
231
- *
232
- * STATUS
233
- * NOT READY
234
- * ```
235
- */
236
- export declare function formatVerificationResult(assembly: ApplicationAssembly, result: VerificationResult): string;
237
- //# sourceMappingURL=assembly.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assembly.d.ts","sourceRoot":"","sources":["../src/assembly.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAGzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;KACjC,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,4BAA4B;IAC5B,QAAQ,CAAC,QAAQ,EAAE;QACjB,qCAAqC;QACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QACpB,uCAAuC;QACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,wBAAwB;QACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1B,CAAC;IAEF,8EAA8E;IAC9E,QAAQ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