@coasys/ad4m 0.13.0-test-flows-1 → 0.13.1-staging.2

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 (958) hide show
  1. package/README.md +1 -0
  2. package/lib/index.cjs +9613 -7069
  3. package/lib/index.js +7367 -4840
  4. package/lib/src/Ad4mClient.d.ts +12 -4
  5. package/lib/src/Ad4mClient.js +15 -11
  6. package/lib/src/Literal.js +3 -3
  7. package/lib/src/agent/Agent.d.ts +4 -1
  8. package/lib/src/agent/Agent.js +6 -0
  9. package/lib/src/agent/AgentClient.d.ts +9 -23
  10. package/lib/src/agent/AgentClient.js +68 -148
  11. package/lib/src/ai/AIClient.d.ts +10 -6
  12. package/lib/src/ai/AIClient.js +29 -27
  13. package/lib/src/apiClient.d.ts +54 -42
  14. package/lib/src/apiClient.js +279 -252
  15. package/lib/src/expression/Expression.d.ts +13 -4
  16. package/lib/src/expression/Expression.js +0 -1
  17. package/lib/src/expression/ExpressionClient.js +1 -1
  18. package/lib/src/generated/api/AIPromptExamples.d.ts +4 -0
  19. package/lib/src/generated/api/AIPromptExamples.js +2 -0
  20. package/lib/src/generated/api/AIPromptExamplesInput.d.ts +4 -0
  21. package/lib/src/generated/api/AIPromptExamplesInput.js +2 -0
  22. package/lib/src/generated/api/AITask.d.ts +11 -0
  23. package/lib/src/generated/api/AITaskInput.d.ts +8 -0
  24. package/lib/src/generated/api/AddAgentInfosRequest.d.ts +3 -0
  25. package/lib/src/generated/api/AddAgentInfosRequest.js +2 -0
  26. package/lib/src/generated/api/AddLinkExpressionRequest.d.ts +2 -2
  27. package/lib/src/generated/api/AddLinkRequest.d.ts +2 -2
  28. package/lib/src/generated/api/AddLinksBulkRequest.d.ts +2 -2
  29. package/lib/src/generated/api/AddSdnaRequest.d.ts +2 -2
  30. package/lib/src/generated/api/Agent.d.ts +6 -0
  31. package/lib/src/generated/api/AgentAddEntanglementProofsParams.d.ts +9 -0
  32. package/lib/src/generated/api/AgentByDidParams.d.ts +3 -0
  33. package/lib/src/generated/api/AgentByDidParams.js +2 -0
  34. package/lib/src/generated/api/AgentRemoveAppParams.d.ts +3 -0
  35. package/lib/src/generated/api/AgentRemoveAppParams.js +2 -0
  36. package/lib/src/generated/api/AgentRevokeTokenParams.d.ts +3 -0
  37. package/lib/src/generated/api/AgentRevokeTokenParams.js +2 -0
  38. package/lib/src/generated/api/AgentSignature.d.ts +4 -0
  39. package/lib/src/generated/api/AgentSignature.js +2 -0
  40. package/lib/src/generated/api/AgentStatus.d.ts +8 -0
  41. package/lib/src/generated/api/AgentStatusChangedEvent.d.ts +7 -0
  42. package/lib/src/generated/api/AgentUpdatedEvent.d.ts +7 -0
  43. package/lib/src/generated/api/AgentsByDidsRequest.d.ts +3 -0
  44. package/lib/src/generated/api/AgentsByDidsRequest.js +2 -0
  45. package/lib/src/generated/api/AiAddModelParams.d.ts +4 -0
  46. package/lib/src/generated/api/AiAddTaskParams.d.ts +4 -0
  47. package/lib/src/generated/api/AiDiscoverModelsParams.d.ts +8 -0
  48. package/lib/src/generated/api/AiDiscoverModelsParams.js +2 -0
  49. package/lib/src/generated/api/AiGetDefaultModelParams.d.ts +4 -0
  50. package/lib/src/generated/api/AiIdParams.d.ts +3 -0
  51. package/lib/src/generated/api/AiIdParams.js +2 -0
  52. package/lib/src/generated/api/AiModelLoadingStatusParams.d.ts +7 -0
  53. package/lib/src/generated/api/AiModelLoadingStatusParams.js +2 -0
  54. package/lib/src/generated/api/AiSetDefaultModelParams.d.ts +5 -0
  55. package/lib/src/generated/api/AiSetDefaultModelParams.js +1 -0
  56. package/lib/src/generated/api/AiTranscriptionCloseParams.d.ts +3 -0
  57. package/lib/src/generated/api/AiTranscriptionCloseParams.js +2 -0
  58. package/lib/src/generated/api/AiTranscriptionOpenParams.d.ts +5 -0
  59. package/lib/src/generated/api/AiTranscriptionOpenParams.js +1 -0
  60. package/lib/src/generated/api/AiUpdateModelParams.d.ts +5 -0
  61. package/lib/src/generated/api/AiUpdateModelParams.js +1 -0
  62. package/lib/src/generated/api/AiUpdateTaskParams.d.ts +4 -0
  63. package/lib/src/generated/api/AiUpdateTaskParams.js +1 -0
  64. package/lib/src/generated/api/Apps.d.ts +7 -0
  65. package/lib/src/generated/api/Apps.js +1 -0
  66. package/lib/src/generated/api/AuthInfo.d.ts +10 -0
  67. package/lib/src/generated/api/AuthInfo.js +1 -0
  68. package/lib/src/generated/api/AuthInfoInput.d.ts +4 -4
  69. package/lib/src/generated/api/AutoProcessorEvent.d.ts +89 -0
  70. package/lib/src/generated/api/AutoProcessorEvent.js +1 -0
  71. package/lib/src/generated/api/AutoProcessorNeighbourhoodState.d.ts +32 -0
  72. package/lib/src/generated/api/AutoProcessorNeighbourhoodState.js +1 -0
  73. package/lib/src/generated/api/AutoProcessorStep.d.ts +7 -0
  74. package/lib/src/generated/api/AutoProcessorStep.js +2 -0
  75. package/lib/src/generated/api/BroadcastRequest.d.ts +5 -0
  76. package/lib/src/generated/api/BroadcastRequest.js +2 -0
  77. package/lib/src/generated/api/CallSessionInfo.d.ts +23 -0
  78. package/lib/src/generated/api/CallSessionInfo.js +2 -0
  79. package/lib/src/generated/api/Capability.d.ts +5 -0
  80. package/lib/src/generated/api/Capability.js +1 -0
  81. package/lib/src/generated/api/CreateSubjectRequest.d.ts +2 -2
  82. package/lib/src/generated/api/CreateUserRequest.d.ts +4 -0
  83. package/lib/src/generated/api/CreateUserRequest.js +2 -0
  84. package/lib/src/generated/api/DateTime.d.ts +1 -0
  85. package/lib/src/generated/api/DateTime.js +2 -0
  86. package/lib/src/generated/api/DecoratedExpressionProof.d.ts +6 -0
  87. package/lib/src/generated/api/DecoratedExpressionProof.js +2 -0
  88. package/lib/src/generated/api/DecoratedLinkExpression.d.ts +10 -0
  89. package/lib/src/generated/api/DecoratedLinkExpression.js +1 -0
  90. package/lib/src/generated/api/DecoratedNeighbourhoodExpression.d.ts +8 -0
  91. package/lib/src/generated/api/DecoratedNeighbourhoodExpression.js +1 -0
  92. package/lib/src/generated/api/DecoratedPerspective.d.ts +4 -0
  93. package/lib/src/generated/api/DecoratedPerspective.js +1 -0
  94. package/lib/src/generated/api/DiscardBatchRequest.d.ts +3 -0
  95. package/lib/src/generated/api/DiscardBatchRequest.js +2 -0
  96. package/lib/src/generated/api/DisposeQueryRequest.d.ts +3 -0
  97. package/lib/src/generated/api/DisposeQueryRequest.js +2 -0
  98. package/lib/src/generated/api/EntanglementProof.d.ts +8 -0
  99. package/lib/src/generated/api/EntanglementProof.js +2 -0
  100. package/lib/src/generated/api/EntanglementProofInput.d.ts +1 -1
  101. package/lib/src/generated/api/EntanglementProofPreflightRequest.d.ts +4 -0
  102. package/lib/src/generated/api/EntanglementProofPreflightRequest.js +2 -0
  103. package/lib/src/generated/api/EntanglementProofsWrapper.d.ts +7 -0
  104. package/lib/src/generated/api/EntanglementProofsWrapper.js +1 -0
  105. package/lib/src/generated/api/Events.d.ts +56 -0
  106. package/lib/src/generated/api/Events.js +18 -0
  107. package/lib/src/generated/api/ExceptionInfo.d.ts +7 -0
  108. package/lib/src/generated/api/ExceptionInfo.js +1 -0
  109. package/lib/src/generated/api/ExceptionOccurredEvent.d.ts +7 -0
  110. package/lib/src/generated/api/ExceptionOccurredEvent.js +1 -0
  111. package/lib/src/generated/api/ExceptionType.d.ts +1 -0
  112. package/lib/src/generated/api/ExceptionType.js +2 -0
  113. package/lib/src/generated/api/ExecuteCommandsRequest.d.ts +4 -2
  114. package/lib/src/generated/api/ExportRequest.d.ts +1 -1
  115. package/lib/src/generated/api/ExpressionInteractRequest.d.ts +5 -0
  116. package/lib/src/generated/api/ExpressionInteractRequest.js +1 -0
  117. package/lib/src/generated/api/ExpressionProofInput.d.ts +4 -4
  118. package/lib/src/generated/api/ExpressionRendered.d.ts +11 -0
  119. package/lib/src/generated/api/ExpressionRendered.js +1 -0
  120. package/lib/src/generated/api/ExpressionUrlRequest.d.ts +3 -0
  121. package/lib/src/generated/api/ExpressionUrlRequest.js +2 -0
  122. package/lib/src/generated/api/FireOutcome.d.ts +14 -0
  123. package/lib/src/generated/api/FireOutcome.js +2 -0
  124. package/lib/src/generated/api/FlowStateChangedEvent.d.ts +38 -0
  125. package/lib/src/generated/api/FlowStateChangedEvent.js +2 -0
  126. package/lib/src/generated/api/FlowStateEntry.d.ts +18 -0
  127. package/lib/src/generated/api/FlowStateEntry.js +2 -0
  128. package/lib/src/generated/api/FriendSendMessageRequest.d.ts +1 -1
  129. package/lib/src/generated/api/HostRate.d.ts +7 -0
  130. package/lib/src/generated/api/HostRate.js +2 -0
  131. package/lib/src/generated/api/HostingInfoResult.d.ts +13 -0
  132. package/lib/src/generated/api/HostingInfoResult.js +1 -0
  133. package/lib/src/generated/api/HostingInfoUser.d.ts +9 -0
  134. package/lib/src/generated/api/HostingInfoUser.js +2 -0
  135. package/lib/src/generated/api/HostingRequestPaymentResult.d.ts +4 -0
  136. package/lib/src/generated/api/HostingRequestPaymentResult.js +2 -0
  137. package/lib/src/generated/api/HostingUserInfo.d.ts +6 -0
  138. package/lib/src/generated/api/HostingUserInfo.js +2 -0
  139. package/lib/src/generated/api/HostingVersionInfo.d.ts +7 -0
  140. package/lib/src/generated/api/HostingVersionInfo.js +2 -0
  141. package/lib/src/generated/api/HostingWalletResult.d.ts +8 -0
  142. package/lib/src/generated/api/HostingWalletResult.js +1 -0
  143. package/lib/src/generated/api/IceServer.d.ts +18 -0
  144. package/lib/src/generated/api/IceServer.js +2 -0
  145. package/lib/src/generated/api/Icon.d.ts +3 -0
  146. package/lib/src/generated/api/Icon.js +2 -0
  147. package/lib/src/generated/api/ImportResult.d.ts +15 -0
  148. package/lib/src/generated/api/ImportResult.js +1 -0
  149. package/lib/src/generated/api/ImportStats.d.ts +7 -0
  150. package/lib/src/generated/api/ImportStats.js +2 -0
  151. package/lib/src/generated/api/InteractionCall.d.ts +4 -0
  152. package/lib/src/generated/api/InteractionCall.js +2 -0
  153. package/lib/src/generated/api/InteractionCallWrapper.d.ts +6 -0
  154. package/lib/src/generated/api/InteractionCallWrapper.js +2 -0
  155. package/lib/src/generated/api/InteractionMeta.d.ts +6 -0
  156. package/lib/src/generated/api/InteractionMeta.js +1 -0
  157. package/lib/src/generated/api/InteractionParameter.d.ts +4 -0
  158. package/lib/src/generated/api/InteractionParameter.js +2 -0
  159. package/lib/src/generated/api/LanguageAddressParams.d.ts +3 -0
  160. package/lib/src/generated/api/LanguageAddressParams.js +2 -0
  161. package/lib/src/generated/api/LanguageHandle.d.ts +9 -0
  162. package/lib/src/generated/api/LanguageHandle.js +1 -0
  163. package/lib/src/generated/api/LanguageListParams.d.ts +3 -0
  164. package/lib/src/generated/api/LanguageListParams.js +2 -0
  165. package/lib/src/generated/api/LanguageMeta.d.ts +11 -0
  166. package/lib/src/generated/api/LanguageMeta.js +2 -0
  167. package/lib/src/generated/api/LanguageMetaInput.d.ts +2 -2
  168. package/lib/src/generated/api/LanguageRef.d.ts +4 -0
  169. package/lib/src/generated/api/LanguageRef.js +2 -0
  170. package/lib/src/generated/api/LanguageSettingsWrapper.d.ts +6 -0
  171. package/lib/src/generated/api/LanguageSettingsWrapper.js +2 -0
  172. package/lib/src/generated/api/LanguageWriteSettingsParams.d.ts +4 -0
  173. package/lib/src/generated/api/LanguageWriteSettingsParams.js +2 -0
  174. package/lib/src/generated/api/LinkExpressionInput.d.ts +1 -1
  175. package/lib/src/generated/api/LinkInput.d.ts +1 -1
  176. package/lib/src/generated/api/LinkMutationRequest.d.ts +12 -0
  177. package/lib/src/generated/api/LinkMutationRequest.js +1 -0
  178. package/lib/src/generated/api/LinkMutationsRequest.d.ts +5 -0
  179. package/lib/src/generated/api/LinkMutationsRequest.js +1 -0
  180. package/lib/src/generated/api/LinkStatus.d.ts +1 -1
  181. package/lib/src/generated/api/LinkUpdateInput.d.ts +5 -0
  182. package/lib/src/generated/api/LinkUpdateInput.js +1 -0
  183. package/lib/src/generated/api/LocalModel.d.ts +7 -0
  184. package/lib/src/generated/api/LocalModel.js +1 -0
  185. package/lib/src/generated/api/LocalModelInput.d.ts +7 -0
  186. package/lib/src/generated/api/LocalModelInput.js +1 -0
  187. package/lib/src/generated/api/MessageReceivedEvent.d.ts +7 -0
  188. package/lib/src/generated/api/MessageReceivedEvent.js +1 -0
  189. package/lib/src/generated/api/Model.d.ts +10 -0
  190. package/lib/src/generated/api/Model.js +1 -0
  191. package/lib/src/generated/api/ModelApi.d.ts +17 -0
  192. package/lib/src/generated/api/ModelApi.js +1 -0
  193. package/lib/src/generated/api/ModelApiInput.d.ts +11 -0
  194. package/lib/src/generated/api/ModelApiInput.js +2 -0
  195. package/lib/src/generated/api/ModelApiType.d.ts +1 -0
  196. package/lib/src/generated/api/ModelApiType.js +2 -0
  197. package/lib/src/generated/api/ModelInput.d.ts +9 -0
  198. package/lib/src/generated/api/ModelInput.js +1 -0
  199. package/lib/src/generated/api/ModelType.d.ts +1 -1
  200. package/lib/src/generated/api/Neighbourhood.d.ts +5 -0
  201. package/lib/src/generated/api/Neighbourhood.js +1 -0
  202. package/lib/src/generated/api/NeighbourhoodBroadcastParams.d.ts +7 -0
  203. package/lib/src/generated/api/NeighbourhoodBroadcastParams.js +1 -0
  204. package/lib/src/generated/api/NeighbourhoodOnlineStatusParams.d.ts +6 -0
  205. package/lib/src/generated/api/NeighbourhoodOnlineStatusParams.js +1 -0
  206. package/lib/src/generated/api/NeighbourhoodPerspectivePayload.d.ts +7 -0
  207. package/lib/src/generated/api/NeighbourhoodPerspectivePayload.js +1 -0
  208. package/lib/src/generated/api/NeighbourhoodPhase.d.ts +6 -0
  209. package/lib/src/generated/api/NeighbourhoodPhase.js +2 -0
  210. package/lib/src/generated/api/NeighbourhoodSignalFilter.d.ts +8 -0
  211. package/lib/src/generated/api/NeighbourhoodSignalFilter.js +1 -0
  212. package/lib/src/generated/api/NeighbourhoodSignalParams.d.ts +7 -0
  213. package/lib/src/generated/api/NeighbourhoodSignalParams.js +1 -0
  214. package/lib/src/generated/api/NeighbourhoodSignedPerspective.d.ts +8 -0
  215. package/lib/src/generated/api/NeighbourhoodSignedPerspective.js +1 -0
  216. package/lib/src/generated/api/NeighbourhoodUuidParams.d.ts +3 -0
  217. package/lib/src/generated/api/NeighbourhoodUuidParams.js +2 -0
  218. package/lib/src/generated/api/Notification.d.ts +16 -0
  219. package/lib/src/generated/api/Notification.js +2 -0
  220. package/lib/src/generated/api/NotificationGrantRequest.d.ts +6 -0
  221. package/lib/src/generated/api/NotificationGrantRequest.js +2 -0
  222. package/lib/src/generated/api/NotificationInput.d.ts +1 -1
  223. package/lib/src/generated/api/NotificationTriggeredEvent.d.ts +9 -0
  224. package/lib/src/generated/api/NotificationTriggeredEvent.js +1 -0
  225. package/lib/src/generated/api/OnlineAgent.d.ts +9 -0
  226. package/lib/src/generated/api/OnlineAgent.js +1 -0
  227. package/lib/src/generated/api/OutputRef.d.ts +12 -0
  228. package/lib/src/generated/api/OutputRef.js +2 -0
  229. package/lib/src/generated/api/OverlayView.d.ts +24 -0
  230. package/lib/src/generated/api/OverlayView.js +1 -0
  231. package/lib/src/generated/api/Perspective.d.ts +4 -0
  232. package/lib/src/generated/api/Perspective.js +1 -0
  233. package/lib/src/generated/api/PerspectiveAddAutoProcessorParams.d.ts +26 -0
  234. package/lib/src/generated/api/PerspectiveAddAutoProcessorParams.js +2 -0
  235. package/lib/src/generated/api/PerspectiveAddLinkExpressionParams.d.ts +7 -0
  236. package/lib/src/generated/api/PerspectiveAddLinkExpressionParams.js +1 -0
  237. package/lib/src/generated/api/PerspectiveAddLinkParams.d.ts +7 -0
  238. package/lib/src/generated/api/PerspectiveAddLinkParams.js +1 -0
  239. package/lib/src/generated/api/PerspectiveAddLinksParams.d.ts +7 -0
  240. package/lib/src/generated/api/PerspectiveAddLinksParams.js +1 -0
  241. package/lib/src/generated/api/PerspectiveAddSdnaParams.d.ts +14 -0
  242. package/lib/src/generated/api/PerspectiveAddSdnaParams.js +1 -0
  243. package/lib/src/generated/api/PerspectiveAddSdnaResult.d.ts +4 -0
  244. package/lib/src/generated/api/PerspectiveAddSdnaResult.js +2 -0
  245. package/lib/src/generated/api/PerspectiveCommitBatchParams.d.ts +4 -0
  246. package/lib/src/generated/api/PerspectiveCommitBatchParams.js +2 -0
  247. package/lib/src/generated/api/PerspectiveCreateSubjectParams.d.ts +7 -0
  248. package/lib/src/generated/api/PerspectiveCreateSubjectParams.js +2 -0
  249. package/lib/src/generated/api/PerspectiveDiscardBatchParams.d.ts +4 -0
  250. package/lib/src/generated/api/PerspectiveDiscardBatchParams.js +2 -0
  251. package/lib/src/generated/api/PerspectiveEvaluateGettersParams.d.ts +9 -0
  252. package/lib/src/generated/api/PerspectiveEvaluateGettersParams.js +2 -0
  253. package/lib/src/generated/api/PerspectiveExecuteCommandsParams.d.ts +7 -0
  254. package/lib/src/generated/api/PerspectiveExecuteCommandsParams.js +2 -0
  255. package/lib/src/generated/api/PerspectiveExpression.d.ts +8 -0
  256. package/lib/src/generated/api/PerspectiveExpression.js +1 -0
  257. package/lib/src/generated/api/PerspectiveFlowFiredParams.d.ts +8 -0
  258. package/lib/src/generated/api/PerspectiveFlowFiredParams.js +2 -0
  259. package/lib/src/generated/api/PerspectiveFlowProposalParams.d.ts +4 -0
  260. package/lib/src/generated/api/PerspectiveFlowProposalParams.js +2 -0
  261. package/lib/src/generated/api/PerspectiveFlowReceiptVerdict.d.ts +12 -0
  262. package/lib/src/generated/api/PerspectiveFlowReceiptVerdict.js +1 -0
  263. package/lib/src/generated/api/PerspectiveFlowStatesParams.d.ts +11 -0
  264. package/lib/src/generated/api/PerspectiveFlowStatesParams.js +2 -0
  265. package/lib/src/generated/api/PerspectiveFlowValidOutputsParams.d.ts +8 -0
  266. package/lib/src/generated/api/PerspectiveFlowValidOutputsParams.js +2 -0
  267. package/lib/src/generated/api/PerspectiveGetAllShaclParams.d.ts +7 -0
  268. package/lib/src/generated/api/PerspectiveGetAllShaclParams.js +2 -0
  269. package/lib/src/generated/api/PerspectiveGetSubjectDataParams.d.ts +5 -0
  270. package/lib/src/generated/api/PerspectiveGetSubjectDataParams.js +2 -0
  271. package/lib/src/generated/api/PerspectiveHandle.d.ts +10 -0
  272. package/lib/src/generated/api/PerspectiveHandle.js +1 -0
  273. package/lib/src/generated/api/PerspectiveLinkDiff.d.ts +9 -0
  274. package/lib/src/generated/api/PerspectiveLinkDiff.js +1 -0
  275. package/lib/src/generated/api/PerspectiveLinkMutationsParams.d.ts +6 -0
  276. package/lib/src/generated/api/PerspectiveLinkMutationsParams.js +1 -0
  277. package/lib/src/generated/api/PerspectiveLinkUpdatedWithOwner.d.ts +7 -0
  278. package/lib/src/generated/api/PerspectiveLinkUpdatedWithOwner.js +1 -0
  279. package/lib/src/generated/api/PerspectiveLinkWithOwner.d.ts +6 -0
  280. package/lib/src/generated/api/PerspectiveLinkWithOwner.js +1 -0
  281. package/lib/src/generated/api/PerspectiveMintFlowReceiptParams.d.ts +4 -0
  282. package/lib/src/generated/api/PerspectiveMintFlowReceiptParams.js +2 -0
  283. package/lib/src/generated/api/PerspectiveMintFlowReceiptResult.d.ts +9 -0
  284. package/lib/src/generated/api/PerspectiveMintFlowReceiptResult.js +1 -0
  285. package/lib/src/generated/api/PerspectiveModelQueryParams.d.ts +13 -0
  286. package/lib/src/generated/api/PerspectiveModelQueryParams.js +2 -0
  287. package/lib/src/generated/api/PerspectiveNamedShacl.d.ts +6 -0
  288. package/lib/src/generated/api/PerspectiveNamedShacl.js +1 -0
  289. package/lib/src/generated/api/PerspectiveProposeFlowTransitionParams.d.ts +8 -0
  290. package/lib/src/generated/api/PerspectiveProposeFlowTransitionParams.js +1 -0
  291. package/lib/src/generated/api/PerspectiveQueryLinksParams.d.ts +15 -0
  292. package/lib/src/generated/api/PerspectiveQueryLinksParams.js +2 -0
  293. package/lib/src/generated/api/PerspectiveQueryParams.d.ts +4 -0
  294. package/lib/src/generated/api/PerspectiveQueryParams.js +2 -0
  295. package/lib/src/generated/api/PerspectiveReceiptOutcome.d.ts +1 -0
  296. package/lib/src/generated/api/PerspectiveReceiptOutcome.js +2 -0
  297. package/lib/src/generated/api/PerspectiveRejectFlowProposalResult.d.ts +3 -0
  298. package/lib/src/generated/api/PerspectiveRejectFlowProposalResult.js +2 -0
  299. package/lib/src/generated/api/PerspectiveRemoveAutoProcessorParams.d.ts +4 -0
  300. package/lib/src/generated/api/PerspectiveRemoveAutoProcessorParams.js +2 -0
  301. package/lib/src/generated/api/PerspectiveRemoveLinkParams.d.ts +6 -0
  302. package/lib/src/generated/api/PerspectiveRemoveLinkParams.js +1 -0
  303. package/lib/src/generated/api/PerspectiveRemoveLinksParams.d.ts +6 -0
  304. package/lib/src/generated/api/PerspectiveRemoveLinksParams.js +1 -0
  305. package/lib/src/generated/api/PerspectiveRemoveSubjectParams.d.ts +6 -0
  306. package/lib/src/generated/api/PerspectiveRemoveSubjectParams.js +2 -0
  307. package/lib/src/generated/api/PerspectiveRemovedWithOwner.d.ts +5 -0
  308. package/lib/src/generated/api/PerspectiveRemovedWithOwner.js +2 -0
  309. package/lib/src/generated/api/PerspectiveResolveInterpretationParams.d.ts +8 -0
  310. package/lib/src/generated/api/PerspectiveResolveInterpretationParams.js +2 -0
  311. package/lib/src/generated/api/PerspectiveResynced.d.ts +8 -0
  312. package/lib/src/generated/api/PerspectiveResynced.js +2 -0
  313. package/lib/src/generated/api/PerspectiveShacl.d.ts +5 -0
  314. package/lib/src/generated/api/PerspectiveShacl.js +1 -0
  315. package/lib/src/generated/api/PerspectiveShaclNameParams.d.ts +4 -0
  316. package/lib/src/generated/api/PerspectiveShaclNameParams.js +2 -0
  317. package/lib/src/generated/api/PerspectiveSparqlParams.d.ts +8 -0
  318. package/lib/src/generated/api/PerspectiveSparqlParams.js +2 -0
  319. package/lib/src/generated/api/PerspectiveState.d.ts +1 -0
  320. package/lib/src/generated/api/PerspectiveState.js +2 -0
  321. package/lib/src/generated/api/PerspectiveStateFilter.d.ts +7 -0
  322. package/lib/src/generated/api/PerspectiveStateFilter.js +1 -0
  323. package/lib/src/generated/api/PerspectiveSubjectClassesOfParams.d.ts +4 -0
  324. package/lib/src/generated/api/PerspectiveSubjectClassesOfParams.js +2 -0
  325. package/lib/src/generated/api/PerspectiveSubscribed.d.ts +10 -0
  326. package/lib/src/generated/api/PerspectiveSubscribed.js +2 -0
  327. package/lib/src/generated/api/PerspectiveSubscriptionParams.d.ts +4 -0
  328. package/lib/src/generated/api/PerspectiveSubscriptionParams.js +2 -0
  329. package/lib/src/generated/api/PerspectiveUnsignedInput.d.ts +4 -0
  330. package/lib/src/generated/api/PerspectiveUnsignedInput.js +1 -0
  331. package/lib/src/generated/api/PerspectiveUpdateLinkParams.d.ts +8 -0
  332. package/lib/src/generated/api/PerspectiveUpdateLinkParams.js +1 -0
  333. package/lib/src/generated/api/PerspectiveUpdateParams.d.ts +4 -0
  334. package/lib/src/generated/api/PerspectiveUpdateParams.js +2 -0
  335. package/lib/src/generated/api/PerspectiveUpdateSubjectParams.d.ts +10 -0
  336. package/lib/src/generated/api/PerspectiveUpdateSubjectParams.js +2 -0
  337. package/lib/src/generated/api/PerspectiveUuidParams.d.ts +3 -0
  338. package/lib/src/generated/api/PerspectiveUuidParams.js +2 -0
  339. package/lib/src/generated/api/PerspectiveVerifyFlowReceiptParams.d.ts +9 -0
  340. package/lib/src/generated/api/PerspectiveVerifyFlowReceiptParams.js +1 -0
  341. package/lib/src/generated/api/PerspectiveWithOwner.d.ts +6 -0
  342. package/lib/src/generated/api/PerspectiveWithOwner.js +1 -0
  343. package/lib/src/generated/api/ProposeOutcome.d.ts +45 -0
  344. package/lib/src/generated/api/ProposeOutcome.js +1 -0
  345. package/lib/src/generated/api/PublicPerspectiveInput.d.ts +4 -0
  346. package/lib/src/generated/api/PublicPerspectiveInput.js +1 -0
  347. package/lib/src/generated/api/PublishNeighbourhoodRequest.d.ts +2 -2
  348. package/lib/src/generated/api/QuerySubscriptionUpdate.d.ts +19 -0
  349. package/lib/src/generated/api/QuerySubscriptionUpdate.js +2 -0
  350. package/lib/src/generated/api/QuerySubscriptionUpdateEvent.d.ts +7 -0
  351. package/lib/src/generated/api/QuerySubscriptionUpdateEvent.js +1 -0
  352. package/lib/src/generated/api/QueryUpdatesLagged.d.ts +7 -0
  353. package/lib/src/generated/api/QueryUpdatesLagged.js +2 -0
  354. package/lib/src/generated/api/RemoveLinkRequest.d.ts +1 -1
  355. package/lib/src/generated/api/RemoveLinksBulkRequest.d.ts +1 -1
  356. package/lib/src/generated/api/RemoveSubjectRequest.d.ts +9 -0
  357. package/lib/src/generated/api/RemoveSubjectRequest.js +2 -0
  358. package/lib/src/generated/api/RequestCapabilityRequest.d.ts +4 -0
  359. package/lib/src/generated/api/RequestCapabilityRequest.js +1 -0
  360. package/lib/src/generated/api/RequestPaymentRequest.d.ts +3 -0
  361. package/lib/src/generated/api/RequestPaymentRequest.js +2 -0
  362. package/lib/src/generated/api/Resource.d.ts +4 -0
  363. package/lib/src/generated/api/Resource.js +2 -0
  364. package/lib/src/generated/api/ResyncSubscriptionRequest.d.ts +3 -0
  365. package/lib/src/generated/api/ResyncSubscriptionRequest.js +2 -0
  366. package/lib/src/generated/api/RpcMethods.d.ts +961 -0
  367. package/lib/src/generated/api/RpcMethods.js +98 -0
  368. package/lib/src/generated/api/RunInterpretationRequest.d.ts +27 -1
  369. package/lib/src/generated/api/RunInterpretationWithHarnessRequest.d.ts +52 -0
  370. package/lib/src/generated/api/RunInterpretationWithHarnessRequest.js +1 -0
  371. package/lib/src/generated/api/RuntimeComputeLogParams.d.ts +14 -0
  372. package/lib/src/generated/api/RuntimeComputeLogParams.js +2 -0
  373. package/lib/src/generated/api/RuntimeFriendStatusParams.d.ts +3 -0
  374. package/lib/src/generated/api/RuntimeFriendStatusParams.js +2 -0
  375. package/lib/src/generated/api/RuntimeGrantNotificationParams.d.ts +4 -0
  376. package/lib/src/generated/api/RuntimeGrantNotificationParams.js +2 -0
  377. package/lib/src/generated/api/RuntimeImportPerspectiveResult.d.ts +4 -0
  378. package/lib/src/generated/api/RuntimeImportPerspectiveResult.js +2 -0
  379. package/lib/src/generated/api/RuntimeImportResult.d.ts +6 -0
  380. package/lib/src/generated/api/RuntimeImportResult.js +1 -0
  381. package/lib/src/generated/api/RuntimeInfo.d.ts +5 -0
  382. package/lib/src/generated/api/RuntimeInfo.js +2 -0
  383. package/lib/src/generated/api/RuntimeNotificationIdParams.d.ts +3 -0
  384. package/lib/src/generated/api/RuntimeNotificationIdParams.js +2 -0
  385. package/lib/src/generated/api/RuntimeSendFriendMessageParams.d.ts +8 -0
  386. package/lib/src/generated/api/RuntimeSendFriendMessageParams.js +1 -0
  387. package/lib/src/generated/api/RuntimeSetFreeHostingEnabledParams.d.ts +3 -0
  388. package/lib/src/generated/api/RuntimeSetFreeHostingEnabledParams.js +2 -0
  389. package/lib/src/generated/api/RuntimeUnytSendHotParams.d.ts +4 -0
  390. package/lib/src/generated/api/RuntimeUnytSendHotParams.js +2 -0
  391. package/lib/src/generated/api/RuntimeUnytWalletHistoryParams.d.ts +4 -0
  392. package/lib/src/generated/api/RuntimeUnytWalletHistoryParams.js +2 -0
  393. package/lib/src/generated/api/RuntimeUpdateNotificationParams.d.ts +11 -0
  394. package/lib/src/generated/api/RuntimeUpdateNotificationParams.js +2 -0
  395. package/lib/src/generated/api/SentMessage.d.ts +5 -0
  396. package/lib/src/generated/api/SentMessage.js +1 -0
  397. package/lib/src/generated/api/SetHostRatesRequest.d.ts +4 -0
  398. package/lib/src/generated/api/SetHostRatesRequest.js +1 -0
  399. package/lib/src/generated/api/SetHotWalletAddressRequest.d.ts +3 -0
  400. package/lib/src/generated/api/SetHotWalletAddressRequest.js +2 -0
  401. package/lib/src/generated/api/SetOnlineStatusRequest.d.ts +4 -0
  402. package/lib/src/generated/api/SetOnlineStatusRequest.js +2 -0
  403. package/lib/src/generated/api/SetUnytMembraneProofRequest.d.ts +6 -0
  404. package/lib/src/generated/api/SetUnytMembraneProofRequest.js +2 -0
  405. package/lib/src/generated/api/SetUserFreeAccessRequest.d.ts +4 -0
  406. package/lib/src/generated/api/SetUserFreeAccessRequest.js +2 -0
  407. package/lib/src/generated/api/SfuAddIceCandidateParams.d.ts +8 -0
  408. package/lib/src/generated/api/SfuAddIceCandidateParams.js +2 -0
  409. package/lib/src/generated/api/SfuAnswerServerOfferParams.d.ts +8 -0
  410. package/lib/src/generated/api/SfuAnswerServerOfferParams.js +2 -0
  411. package/lib/src/generated/api/SfuCallJoinParams.d.ts +14 -0
  412. package/lib/src/generated/api/SfuCallJoinParams.js +2 -0
  413. package/lib/src/generated/api/SfuCallRenegotiationOffer.d.ts +30 -0
  414. package/lib/src/generated/api/SfuCallRenegotiationOffer.js +1 -0
  415. package/lib/src/generated/api/SfuCascadePipe.d.ts +4 -0
  416. package/lib/src/generated/api/SfuCascadePipe.js +2 -0
  417. package/lib/src/generated/api/SfuCascadeStatus.d.ts +8 -0
  418. package/lib/src/generated/api/SfuCascadeStatus.js +1 -0
  419. package/lib/src/generated/api/SfuConfig.d.ts +52 -0
  420. package/lib/src/generated/api/SfuConfig.js +1 -0
  421. package/lib/src/generated/api/SfuDataMessage.d.ts +24 -0
  422. package/lib/src/generated/api/SfuDataMessage.js +2 -0
  423. package/lib/src/generated/api/SfuEnsureMembershipParams.d.ts +4 -0
  424. package/lib/src/generated/api/SfuEnsureMembershipParams.js +2 -0
  425. package/lib/src/generated/api/SfuMigrateEvent.d.ts +21 -0
  426. package/lib/src/generated/api/SfuMigrateEvent.js +2 -0
  427. package/lib/src/generated/api/SfuNeighbourhoodParams.d.ts +3 -0
  428. package/lib/src/generated/api/SfuNeighbourhoodParams.js +2 -0
  429. package/lib/src/generated/api/SfuParticipantQualityPreference.d.ts +7 -0
  430. package/lib/src/generated/api/SfuParticipantQualityPreference.js +2 -0
  431. package/lib/src/generated/api/SfuPerspectiveParams.d.ts +6 -0
  432. package/lib/src/generated/api/SfuPerspectiveParams.js +2 -0
  433. package/lib/src/generated/api/SfuQualityPreferenceParams.d.ts +8 -0
  434. package/lib/src/generated/api/SfuQualityPreferenceParams.js +2 -0
  435. package/lib/src/generated/api/SfuRoomInfo.d.ts +11 -0
  436. package/lib/src/generated/api/SfuRoomInfo.js +1 -0
  437. package/lib/src/generated/api/SfuRoomParams.d.ts +4 -0
  438. package/lib/src/generated/api/SfuRoomParams.js +2 -0
  439. package/lib/src/generated/api/SfuRoomParticipantInfo.d.ts +11 -0
  440. package/lib/src/generated/api/SfuRoomParticipantInfo.js +2 -0
  441. package/lib/src/generated/api/SfuRoomRoster.d.ts +13 -0
  442. package/lib/src/generated/api/SfuRoomRoster.js +2 -0
  443. package/lib/src/generated/api/SfuSendDataParams.d.ts +10 -0
  444. package/lib/src/generated/api/SfuSendDataParams.js +2 -0
  445. package/lib/src/generated/api/SfuSetConfigParams.d.ts +5 -0
  446. package/lib/src/generated/api/SfuSetConfigParams.js +1 -0
  447. package/lib/src/generated/api/SfuStatus.d.ts +24 -0
  448. package/lib/src/generated/api/SfuStatus.js +2 -0
  449. package/lib/src/generated/api/ShaclLinkTriple.d.ts +10 -0
  450. package/lib/src/generated/api/ShaclLinkTriple.js +2 -0
  451. package/lib/src/generated/api/SignalRequest.d.ts +5 -0
  452. package/lib/src/generated/api/SignalRequest.js +2 -0
  453. package/lib/src/generated/api/SubscribeQueryRequest.d.ts +3 -0
  454. package/lib/src/generated/api/SubscribeQueryRequest.js +2 -0
  455. package/lib/src/generated/api/TokenizerSource.d.ts +5 -0
  456. package/lib/src/generated/api/TokenizerSource.js +2 -0
  457. package/lib/src/generated/api/TokenizerSourceInput.d.ts +5 -0
  458. package/lib/src/generated/api/TokenizerSourceInput.js +2 -0
  459. package/lib/src/generated/api/TrackMapEntry.d.ts +17 -0
  460. package/lib/src/generated/api/TrackMapEntry.js +2 -0
  461. package/lib/src/generated/api/TranscriptionTextFilter.d.ts +5 -0
  462. package/lib/src/generated/api/TranscriptionTextFilter.js +2 -0
  463. package/lib/src/generated/api/TriggeredNotification.d.ts +6 -0
  464. package/lib/src/generated/api/TriggeredNotification.js +1 -0
  465. package/lib/src/generated/api/TrustedAgentsWrapper.d.ts +6 -0
  466. package/lib/src/generated/api/TrustedAgentsWrapper.js +2 -0
  467. package/lib/src/generated/api/UnlockAgentRequest.d.ts +1 -1
  468. package/lib/src/generated/api/UnytVersionInfo.d.ts +19 -0
  469. package/lib/src/generated/api/UnytVersionInfo.js +2 -0
  470. package/lib/src/generated/api/UpdateLinkRequest.d.ts +1 -1
  471. package/lib/src/generated/api/UpdateProfileRequest.d.ts +5 -0
  472. package/lib/src/generated/api/UpdateProfileRequest.js +1 -0
  473. package/lib/src/generated/api/UpdateSubjectRequest.d.ts +12 -0
  474. package/lib/src/generated/api/UpdateSubjectRequest.js +2 -0
  475. package/lib/src/generated/api/UserCreationResult.d.ts +5 -0
  476. package/lib/src/generated/api/UserCreationResult.js +2 -0
  477. package/lib/src/generated/api/UserStatistics.d.ts +2 -1
  478. package/lib/src/generated/api/UserStatistics.js +0 -1
  479. package/lib/src/generated/api/UsersAppInfo.d.ts +6 -0
  480. package/lib/src/generated/api/UsersAppInfo.js +2 -0
  481. package/lib/src/generated/api/UsersEmailParams.d.ts +3 -0
  482. package/lib/src/generated/api/UsersEmailParams.js +2 -0
  483. package/lib/src/generated/api/UsersEmailTestAction.d.ts +1 -0
  484. package/lib/src/generated/api/UsersEmailTestAction.js +2 -0
  485. package/lib/src/generated/api/UsersEmailTestParams.d.ts +14 -0
  486. package/lib/src/generated/api/UsersEmailTestParams.js +1 -0
  487. package/lib/src/generated/api/UsersEmailTestResult.d.ts +5 -0
  488. package/lib/src/generated/api/UsersEmailTestResult.js +2 -0
  489. package/lib/src/generated/api/UsersLoginParams.d.ts +8 -0
  490. package/lib/src/generated/api/UsersLoginParams.js +2 -0
  491. package/lib/src/generated/api/UsersRequestVerificationParams.d.ts +5 -0
  492. package/lib/src/generated/api/UsersRequestVerificationParams.js +1 -0
  493. package/lib/src/generated/api/UsersSetCreditsParams.d.ts +4 -0
  494. package/lib/src/generated/api/UsersSetCreditsParams.js +2 -0
  495. package/lib/src/generated/api/UsersVerifyEmailParams.d.ts +12 -0
  496. package/lib/src/generated/api/UsersVerifyEmailParams.js +2 -0
  497. package/lib/src/generated/api/ValidOutput.d.ts +29 -0
  498. package/lib/src/generated/api/ValidOutput.js +1 -0
  499. package/lib/src/generated/api/VoiceActivityParamsInput.d.ts +7 -0
  500. package/lib/src/generated/api/VoiceActivityParamsInput.js +2 -0
  501. package/lib/src/generated/api/index.d.ts +11 -0
  502. package/lib/src/generated/api/index.js +5 -3
  503. package/lib/src/generated/api/serde_json/JsonValue.d.ts +3 -0
  504. package/lib/src/generated/api/serde_json/JsonValue.js +2 -0
  505. package/lib/src/index.d.ts +9 -3
  506. package/lib/src/index.js +5 -3
  507. package/lib/src/language/LanguageClient.d.ts +3 -3
  508. package/lib/src/language/LanguageClient.js +6 -6
  509. package/lib/src/language/LanguageMeta.d.ts +1 -1
  510. package/lib/src/links/Links.d.ts +16 -5
  511. package/lib/src/links/Links.js +34 -0
  512. package/lib/src/model/Ad4mModel.d.ts +84 -0
  513. package/lib/src/model/Ad4mModel.js +365 -72
  514. package/lib/src/model/ModelQueryBuilder.d.ts +15 -13
  515. package/lib/src/model/ModelQueryBuilder.js +78 -221
  516. package/lib/src/model/decorators.d.ts +52 -2
  517. package/lib/src/model/decorators.js +83 -8
  518. package/lib/src/model/query-sparql.js +2 -3
  519. package/lib/src/model/shacl-gen.d.ts +3 -1
  520. package/lib/src/model/shacl-gen.js +40 -10
  521. package/lib/src/model/types.d.ts +19 -0
  522. package/lib/src/neighbourhood/MeshManager.d.ts +384 -0
  523. package/lib/src/neighbourhood/MeshManager.js +1144 -0
  524. package/lib/src/neighbourhood/Neighbourhood.d.ts +1 -1
  525. package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +96 -5
  526. package/lib/src/neighbourhood/NeighbourhoodClient.js +211 -15
  527. package/lib/src/neighbourhood/NeighbourhoodProxy.d.ts +55 -1
  528. package/lib/src/neighbourhood/NeighbourhoodProxy.js +170 -3
  529. package/lib/src/neighbourhood/Session.d.ts +105 -0
  530. package/lib/src/neighbourhood/Session.js +412 -0
  531. package/lib/src/neighbourhood/SfuManager.d.ts +174 -0
  532. package/lib/src/neighbourhood/SfuManager.js +619 -0
  533. package/lib/src/neighbourhood/SfuTypes.d.ts +35 -0
  534. package/lib/src/neighbourhood/SfuTypes.js +8 -0
  535. package/lib/src/notifyListeners.d.ts +2 -0
  536. package/lib/src/notifyListeners.js +12 -0
  537. package/lib/src/perspectives/AutoProcessor.d.ts +12 -80
  538. package/lib/src/perspectives/FlowInstance.d.ts +73 -26
  539. package/lib/src/perspectives/FlowInstance.js +96 -31
  540. package/lib/src/perspectives/FlowModels.d.ts +30 -9
  541. package/lib/src/perspectives/FlowModels.js +43 -14
  542. package/lib/src/perspectives/InterpretationModels.d.ts +2 -0
  543. package/lib/src/perspectives/InterpretationModels.js +6 -0
  544. package/lib/src/perspectives/LiveQuery.d.ts +49 -0
  545. package/lib/src/perspectives/LiveQuery.js +169 -0
  546. package/lib/src/perspectives/Perspective.d.ts +8 -1
  547. package/lib/src/perspectives/Perspective.js +11 -0
  548. package/lib/src/perspectives/PerspectiveClient.d.ts +38 -65
  549. package/lib/src/perspectives/PerspectiveClient.js +87 -257
  550. package/lib/src/perspectives/PerspectiveDiff.d.ts +1 -1
  551. package/lib/src/perspectives/PerspectiveHandle.d.ts +15 -8
  552. package/lib/src/perspectives/PerspectiveHandle.js +25 -9
  553. package/lib/src/perspectives/PerspectiveProxy.d.ts +102 -228
  554. package/lib/src/perspectives/PerspectiveProxy.js +247 -673
  555. package/lib/src/perspectives/TextContent.d.ts +31 -0
  556. package/lib/src/perspectives/TextContent.js +52 -0
  557. package/lib/src/perspectives/WakerSubscriptionManager.d.ts +23 -0
  558. package/lib/src/perspectives/WakerSubscriptionManager.js +58 -21
  559. package/lib/src/runtime/RuntimeClient.d.ts +15 -27
  560. package/lib/src/runtime/RuntimeClient.js +57 -113
  561. package/lib/src/runtime/RuntimeTypes.d.ts +2 -2
  562. package/lib/src/runtime/RuntimeTypes.js +2 -2
  563. package/lib/src/shacl/SHACLFlow.d.ts +34 -6
  564. package/lib/src/shacl/SHACLFlow.js +62 -15
  565. package/lib/src/shacl/SHACLShape.d.ts +12 -0
  566. package/lib/src/shacl/SHACLShape.js +206 -321
  567. package/package.json +15 -16
  568. package/pnpm-workspace.yaml +4 -1
  569. package/src/Ad4mClient.test.ts +481 -144
  570. package/src/Ad4mClient.ts +16 -12
  571. package/src/Literal.test.ts +32 -0
  572. package/src/Literal.ts +3 -3
  573. package/src/agent/Agent.ts +8 -0
  574. package/src/agent/AgentClient.ts +87 -195
  575. package/src/agent/mutatePublicPerspective.test.ts +110 -0
  576. package/src/ai/AIClient.ts +40 -43
  577. package/src/ai/transcription-stream.test.ts +54 -0
  578. package/src/apiClient.test.ts +613 -185
  579. package/src/apiClient.ts +282 -288
  580. package/src/cache/cache.test.ts +7 -8
  581. package/src/expression/Expression.ts +12 -3
  582. package/src/expression/ExpressionClient.ts +6 -7
  583. package/src/generated/api/AIPromptExamples.ts +3 -0
  584. package/src/generated/api/AIPromptExamplesInput.ts +3 -0
  585. package/src/generated/api/AITask.ts +4 -0
  586. package/src/generated/api/AITaskInput.ts +4 -0
  587. package/src/generated/api/AddAgentInfosRequest.ts +3 -0
  588. package/src/generated/api/AddLinkExpressionRequest.ts +1 -1
  589. package/src/generated/api/AddLinkRequest.ts +1 -1
  590. package/src/generated/api/AddLinksBulkRequest.ts +1 -1
  591. package/src/generated/api/AddSdnaRequest.ts +1 -1
  592. package/src/generated/api/Agent.ts +4 -0
  593. package/src/generated/api/AgentAddEntanglementProofsParams.ts +8 -0
  594. package/src/generated/api/AgentByDidParams.ts +3 -0
  595. package/src/generated/api/AgentRemoveAppParams.ts +3 -0
  596. package/src/generated/api/AgentRevokeTokenParams.ts +3 -0
  597. package/src/generated/api/AgentSignature.ts +3 -0
  598. package/src/generated/api/AgentStatus.ts +4 -0
  599. package/src/generated/api/AgentStatusChangedEvent.ts +7 -0
  600. package/src/generated/api/AgentUpdatedEvent.ts +7 -0
  601. package/src/generated/api/AgentsByDidsRequest.ts +3 -0
  602. package/src/generated/api/AiAddModelParams.ts +4 -0
  603. package/src/generated/api/AiAddTaskParams.ts +4 -0
  604. package/src/generated/api/AiDiscoverModelsParams.ts +7 -0
  605. package/src/generated/api/AiGetDefaultModelParams.ts +4 -0
  606. package/src/generated/api/AiIdParams.ts +3 -0
  607. package/src/generated/api/AiModelLoadingStatusParams.ts +6 -0
  608. package/src/generated/api/AiSetDefaultModelParams.ts +4 -0
  609. package/src/generated/api/AiTranscriptionCloseParams.ts +3 -0
  610. package/src/generated/api/AiTranscriptionOpenParams.ts +4 -0
  611. package/src/generated/api/AiUpdateModelParams.ts +4 -0
  612. package/src/generated/api/AiUpdateTaskParams.ts +4 -0
  613. package/src/generated/api/Apps.ts +4 -0
  614. package/src/generated/api/AuthInfo.ts +4 -0
  615. package/src/generated/api/AuthInfoInput.ts +1 -1
  616. package/src/generated/api/AutoProcessorEvent.ts +90 -0
  617. package/src/generated/api/AutoProcessorNeighbourhoodState.ts +33 -0
  618. package/src/generated/api/AutoProcessorStep.ts +9 -0
  619. package/src/generated/api/BroadcastRequest.ts +3 -0
  620. package/src/generated/api/CallSessionInfo.ts +20 -0
  621. package/src/generated/api/Capability.ts +4 -0
  622. package/src/generated/api/CreateSubjectRequest.ts +1 -1
  623. package/src/generated/api/CreateUserRequest.ts +3 -0
  624. package/src/generated/api/DateTime.ts +3 -0
  625. package/src/generated/api/DecoratedExpressionProof.ts +3 -0
  626. package/src/generated/api/DecoratedLinkExpression.ts +6 -0
  627. package/src/generated/api/DecoratedNeighbourhoodExpression.ts +5 -0
  628. package/src/generated/api/DecoratedPerspective.ts +4 -0
  629. package/src/generated/api/DiscardBatchRequest.ts +3 -0
  630. package/src/generated/api/DisposeQueryRequest.ts +3 -0
  631. package/src/generated/api/EntanglementProof.ts +3 -0
  632. package/src/generated/api/EntanglementProofInput.ts +1 -1
  633. package/src/generated/api/EntanglementProofPreflightRequest.ts +3 -0
  634. package/src/generated/api/EntanglementProofsWrapper.ts +7 -0
  635. package/src/generated/api/Events.ts +77 -0
  636. package/src/generated/api/ExceptionInfo.ts +4 -0
  637. package/src/generated/api/ExceptionOccurredEvent.ts +7 -0
  638. package/src/generated/api/ExceptionType.ts +3 -0
  639. package/src/generated/api/ExecuteCommandsRequest.ts +1 -1
  640. package/src/generated/api/ExportRequest.ts +1 -1
  641. package/src/generated/api/ExpressionInteractRequest.ts +4 -0
  642. package/src/generated/api/ExpressionProofInput.ts +1 -1
  643. package/src/generated/api/ExpressionRendered.ts +6 -0
  644. package/src/generated/api/ExpressionUrlRequest.ts +3 -0
  645. package/src/generated/api/FireOutcome.ts +11 -0
  646. package/src/generated/api/FlowStateChangedEvent.ts +36 -0
  647. package/src/generated/api/FlowStateEntry.ts +18 -0
  648. package/src/generated/api/FriendSendMessageRequest.ts +1 -1
  649. package/src/generated/api/HostRate.ts +6 -0
  650. package/src/generated/api/HostingInfoResult.ts +13 -0
  651. package/src/generated/api/HostingInfoUser.ts +7 -0
  652. package/src/generated/api/HostingRequestPaymentResult.ts +3 -0
  653. package/src/generated/api/HostingUserInfo.ts +3 -0
  654. package/src/generated/api/HostingVersionInfo.ts +7 -0
  655. package/src/generated/api/HostingWalletResult.ts +8 -0
  656. package/src/generated/api/IceServer.ts +19 -0
  657. package/src/generated/api/Icon.ts +3 -0
  658. package/src/generated/api/ImportResult.ts +4 -0
  659. package/src/generated/api/ImportStats.ts +3 -0
  660. package/src/generated/api/InteractionCall.ts +3 -0
  661. package/src/generated/api/InteractionCallWrapper.ts +6 -0
  662. package/src/generated/api/InteractionMeta.ts +4 -0
  663. package/src/generated/api/InteractionParameter.ts +3 -0
  664. package/src/generated/api/LanguageAddressParams.ts +3 -0
  665. package/src/generated/api/LanguageHandle.ts +4 -0
  666. package/src/generated/api/LanguageListParams.ts +3 -0
  667. package/src/generated/api/LanguageMeta.ts +3 -0
  668. package/src/generated/api/LanguageMetaInput.ts +1 -1
  669. package/src/generated/api/LanguageRef.ts +3 -0
  670. package/src/generated/api/LanguageSettingsWrapper.ts +6 -0
  671. package/src/generated/api/LanguageWriteSettingsParams.ts +3 -0
  672. package/src/generated/api/LinkExpressionInput.ts +1 -1
  673. package/src/generated/api/LinkInput.ts +1 -1
  674. package/src/generated/api/LinkMutationRequest.ts +8 -0
  675. package/src/generated/api/LinkMutationsRequest.ts +4 -0
  676. package/src/generated/api/LinkStatus.ts +1 -1
  677. package/src/generated/api/LinkUpdateInput.ts +4 -0
  678. package/src/generated/api/LocalModel.ts +4 -0
  679. package/src/generated/api/LocalModelInput.ts +4 -0
  680. package/src/generated/api/MessageReceivedEvent.ts +7 -0
  681. package/src/generated/api/Model.ts +6 -0
  682. package/src/generated/api/ModelApi.ts +14 -0
  683. package/src/generated/api/ModelApiInput.ts +8 -0
  684. package/src/generated/api/ModelApiType.ts +3 -0
  685. package/src/generated/api/ModelInput.ts +6 -0
  686. package/src/generated/api/ModelType.ts +1 -1
  687. package/src/generated/api/Neighbourhood.ts +4 -0
  688. package/src/generated/api/NeighbourhoodBroadcastParams.ts +4 -0
  689. package/src/generated/api/NeighbourhoodOnlineStatusParams.ts +4 -0
  690. package/src/generated/api/NeighbourhoodPerspectivePayload.ts +9 -0
  691. package/src/generated/api/NeighbourhoodPhase.ts +8 -0
  692. package/src/generated/api/NeighbourhoodSignalFilter.ts +5 -0
  693. package/src/generated/api/NeighbourhoodSignalParams.ts +4 -0
  694. package/src/generated/api/NeighbourhoodSignedPerspective.ts +8 -0
  695. package/src/generated/api/NeighbourhoodUuidParams.ts +3 -0
  696. package/src/generated/api/Notification.ts +7 -0
  697. package/src/generated/api/NotificationGrantRequest.ts +6 -0
  698. package/src/generated/api/NotificationInput.ts +1 -1
  699. package/src/generated/api/NotificationTriggeredEvent.ts +8 -0
  700. package/src/generated/api/OnlineAgent.ts +9 -0
  701. package/src/generated/api/OutputRef.ts +11 -0
  702. package/src/generated/api/OverlayView.ts +25 -0
  703. package/src/generated/api/Perspective.ts +4 -0
  704. package/src/generated/api/PerspectiveAddAutoProcessorParams.ts +11 -0
  705. package/src/generated/api/PerspectiveAddLinkExpressionParams.ts +4 -0
  706. package/src/generated/api/PerspectiveAddLinkParams.ts +4 -0
  707. package/src/generated/api/PerspectiveAddLinksParams.ts +4 -0
  708. package/src/generated/api/PerspectiveAddSdnaParams.ts +7 -0
  709. package/src/generated/api/PerspectiveAddSdnaResult.ts +6 -0
  710. package/src/generated/api/PerspectiveCommitBatchParams.ts +3 -0
  711. package/src/generated/api/PerspectiveCreateSubjectParams.ts +3 -0
  712. package/src/generated/api/PerspectiveDiscardBatchParams.ts +3 -0
  713. package/src/generated/api/PerspectiveEvaluateGettersParams.ts +6 -0
  714. package/src/generated/api/PerspectiveExecuteCommandsParams.ts +3 -0
  715. package/src/generated/api/PerspectiveExpression.ts +5 -0
  716. package/src/generated/api/PerspectiveFlowFiredParams.ts +7 -0
  717. package/src/generated/api/PerspectiveFlowProposalParams.ts +3 -0
  718. package/src/generated/api/PerspectiveFlowReceiptVerdict.ts +8 -0
  719. package/src/generated/api/PerspectiveFlowStatesParams.ts +11 -0
  720. package/src/generated/api/PerspectiveFlowValidOutputsParams.ts +7 -0
  721. package/src/generated/api/PerspectiveGetAllShaclParams.ts +6 -0
  722. package/src/generated/api/PerspectiveGetSubjectDataParams.ts +3 -0
  723. package/src/generated/api/PerspectiveHandle.ts +5 -0
  724. package/src/generated/api/PerspectiveLinkDiff.ts +7 -0
  725. package/src/generated/api/PerspectiveLinkMutationsParams.ts +4 -0
  726. package/src/generated/api/PerspectiveLinkUpdatedWithOwner.ts +4 -0
  727. package/src/generated/api/PerspectiveLinkWithOwner.ts +4 -0
  728. package/src/generated/api/PerspectiveMintFlowReceiptParams.ts +3 -0
  729. package/src/generated/api/PerspectiveMintFlowReceiptResult.ts +9 -0
  730. package/src/generated/api/PerspectiveModelQueryParams.ts +10 -0
  731. package/src/generated/api/PerspectiveNamedShacl.ts +4 -0
  732. package/src/generated/api/PerspectiveProposeFlowTransitionParams.ts +4 -0
  733. package/src/generated/api/PerspectiveQueryLinksParams.ts +11 -0
  734. package/src/generated/api/PerspectiveQueryParams.ts +3 -0
  735. package/src/generated/api/PerspectiveReceiptOutcome.ts +3 -0
  736. package/src/generated/api/PerspectiveRejectFlowProposalResult.ts +3 -0
  737. package/src/generated/api/PerspectiveRemoveAutoProcessorParams.ts +3 -0
  738. package/src/generated/api/PerspectiveRemoveLinkParams.ts +4 -0
  739. package/src/generated/api/PerspectiveRemoveLinksParams.ts +4 -0
  740. package/src/generated/api/PerspectiveRemoveSubjectParams.ts +3 -0
  741. package/src/generated/api/PerspectiveRemovedWithOwner.ts +3 -0
  742. package/src/generated/api/PerspectiveResolveInterpretationParams.ts +6 -0
  743. package/src/generated/api/PerspectiveResynced.ts +7 -0
  744. package/src/generated/api/PerspectiveShacl.ts +4 -0
  745. package/src/generated/api/PerspectiveShaclNameParams.ts +3 -0
  746. package/src/generated/api/PerspectiveSparqlParams.ts +7 -0
  747. package/src/generated/api/PerspectiveState.ts +3 -0
  748. package/src/generated/api/PerspectiveStateFilter.ts +5 -0
  749. package/src/generated/api/PerspectiveSubjectClassesOfParams.ts +3 -0
  750. package/src/generated/api/PerspectiveSubscribed.ts +8 -0
  751. package/src/generated/api/PerspectiveSubscriptionParams.ts +3 -0
  752. package/src/generated/api/PerspectiveUnsignedInput.ts +4 -0
  753. package/src/generated/api/PerspectiveUpdateLinkParams.ts +5 -0
  754. package/src/generated/api/PerspectiveUpdateParams.ts +3 -0
  755. package/src/generated/api/PerspectiveUpdateSubjectParams.ts +7 -0
  756. package/src/generated/api/PerspectiveUuidParams.ts +3 -0
  757. package/src/generated/api/PerspectiveVerifyFlowReceiptParams.ts +9 -0
  758. package/src/generated/api/PerspectiveWithOwner.ts +4 -0
  759. package/src/generated/api/ProposeOutcome.ts +46 -0
  760. package/src/generated/api/PublicPerspectiveInput.ts +4 -0
  761. package/src/generated/api/PublishNeighbourhoodRequest.ts +2 -2
  762. package/src/generated/api/QuerySubscriptionUpdate.ts +10 -0
  763. package/src/generated/api/QuerySubscriptionUpdateEvent.ts +9 -0
  764. package/src/generated/api/QueryUpdatesLagged.ts +7 -0
  765. package/src/generated/api/RemoveLinkRequest.ts +1 -1
  766. package/src/generated/api/RemoveLinksBulkRequest.ts +1 -1
  767. package/src/generated/api/RemoveSubjectRequest.ts +7 -0
  768. package/src/generated/api/RequestCapabilityRequest.ts +4 -0
  769. package/src/generated/api/RequestPaymentRequest.ts +3 -0
  770. package/src/generated/api/Resource.ts +3 -0
  771. package/src/generated/api/ResyncSubscriptionRequest.ts +3 -0
  772. package/src/generated/api/RpcMethods.ts +479 -0
  773. package/src/generated/api/RunInterpretationRequest.ts +28 -2
  774. package/src/generated/api/RunInterpretationWithHarnessRequest.ts +51 -0
  775. package/src/generated/api/RuntimeComputeLogParams.ts +15 -0
  776. package/src/generated/api/RuntimeFriendStatusParams.ts +3 -0
  777. package/src/generated/api/RuntimeGrantNotificationParams.ts +3 -0
  778. package/src/generated/api/RuntimeImportPerspectiveResult.ts +3 -0
  779. package/src/generated/api/RuntimeImportResult.ts +8 -0
  780. package/src/generated/api/RuntimeInfo.ts +3 -0
  781. package/src/generated/api/RuntimeNotificationIdParams.ts +3 -0
  782. package/src/generated/api/RuntimeSendFriendMessageParams.ts +8 -0
  783. package/src/generated/api/RuntimeSetFreeHostingEnabledParams.ts +3 -0
  784. package/src/generated/api/RuntimeUnytSendHotParams.ts +3 -0
  785. package/src/generated/api/RuntimeUnytWalletHistoryParams.ts +3 -0
  786. package/src/generated/api/RuntimeUpdateNotificationParams.ts +3 -0
  787. package/src/generated/api/SentMessage.ts +4 -0
  788. package/src/generated/api/SetHostRatesRequest.ts +4 -0
  789. package/src/generated/api/SetHotWalletAddressRequest.ts +3 -0
  790. package/src/generated/api/SetOnlineStatusRequest.ts +3 -0
  791. package/src/generated/api/SetUnytMembraneProofRequest.ts +7 -0
  792. package/src/generated/api/SetUserFreeAccessRequest.ts +3 -0
  793. package/src/generated/api/SfuAddIceCandidateParams.ts +7 -0
  794. package/src/generated/api/SfuAnswerServerOfferParams.ts +7 -0
  795. package/src/generated/api/SfuCallJoinParams.ts +13 -0
  796. package/src/generated/api/SfuCallRenegotiationOffer.ts +29 -0
  797. package/src/generated/api/SfuCascadePipe.ts +3 -0
  798. package/src/generated/api/SfuCascadeStatus.ts +7 -0
  799. package/src/generated/api/SfuConfig.ts +53 -0
  800. package/src/generated/api/SfuDataMessage.ts +23 -0
  801. package/src/generated/api/SfuEnsureMembershipParams.ts +3 -0
  802. package/src/generated/api/SfuMigrateEvent.ts +20 -0
  803. package/src/generated/api/SfuNeighbourhoodParams.ts +3 -0
  804. package/src/generated/api/SfuParticipantQualityPreference.ts +6 -0
  805. package/src/generated/api/SfuPerspectiveParams.ts +6 -0
  806. package/src/generated/api/SfuQualityPreferenceParams.ts +7 -0
  807. package/src/generated/api/SfuRoomInfo.ts +7 -0
  808. package/src/generated/api/SfuRoomParams.ts +3 -0
  809. package/src/generated/api/SfuRoomParticipantInfo.ts +8 -0
  810. package/src/generated/api/SfuRoomRoster.ts +12 -0
  811. package/src/generated/api/SfuSendDataParams.ts +7 -0
  812. package/src/generated/api/SfuSetConfigParams.ts +4 -0
  813. package/src/generated/api/SfuStatus.ts +24 -0
  814. package/src/generated/api/ShaclLinkTriple.ts +8 -0
  815. package/src/generated/api/SignalRequest.ts +3 -0
  816. package/src/generated/api/SubscribeQueryRequest.ts +3 -0
  817. package/src/generated/api/TokenizerSource.ts +3 -0
  818. package/src/generated/api/TokenizerSourceInput.ts +3 -0
  819. package/src/generated/api/TrackMapEntry.ts +18 -0
  820. package/src/generated/api/TranscriptionTextFilter.ts +3 -0
  821. package/src/generated/api/TriggeredNotification.ts +4 -0
  822. package/src/generated/api/TrustedAgentsWrapper.ts +6 -0
  823. package/src/generated/api/UnlockAgentRequest.ts +1 -1
  824. package/src/generated/api/UnytVersionInfo.ts +20 -0
  825. package/src/generated/api/UpdateLinkRequest.ts +1 -1
  826. package/src/generated/api/UpdateProfileRequest.ts +4 -0
  827. package/src/generated/api/UpdateSubjectRequest.ts +10 -0
  828. package/src/generated/api/UserCreationResult.ts +3 -0
  829. package/src/generated/api/UserStatistics.ts +2 -1
  830. package/src/generated/api/UsersAppInfo.ts +6 -0
  831. package/src/generated/api/UsersEmailParams.ts +3 -0
  832. package/src/generated/api/UsersEmailTestAction.ts +3 -0
  833. package/src/generated/api/UsersEmailTestParams.ts +12 -0
  834. package/src/generated/api/UsersEmailTestResult.ts +7 -0
  835. package/src/generated/api/UsersLoginParams.ts +7 -0
  836. package/src/generated/api/UsersRequestVerificationParams.ts +4 -0
  837. package/src/generated/api/UsersSetCreditsParams.ts +3 -0
  838. package/src/generated/api/UsersVerifyEmailParams.ts +11 -0
  839. package/src/generated/api/ValidOutput.ts +30 -0
  840. package/src/generated/api/VoiceActivityParamsInput.ts +3 -0
  841. package/src/generated/api/index.ts +14 -2
  842. package/src/generated/api/serde_json/JsonValue.ts +3 -0
  843. package/src/index.ts +9 -3
  844. package/src/language/LanguageClient.ts +12 -13
  845. package/src/links/Links.ts +49 -3
  846. package/src/model/Ad4mModel.test.ts +480 -173
  847. package/src/model/Ad4mModel.ts +407 -77
  848. package/src/model/ModelQueryBuilder.ts +95 -255
  849. package/src/model/abstract-classes.test.ts +225 -0
  850. package/src/model/decorators.ts +145 -9
  851. package/src/model/query-sparql.ts +2 -3
  852. package/src/model/relation-filtering.test.ts +191 -0
  853. package/src/model/shacl-gen.ts +32 -9
  854. package/src/model/shacl-roundtrip.test.ts +52 -0
  855. package/src/model/types.ts +19 -0
  856. package/src/neighbourhood/MeshManager.test.ts +2640 -0
  857. package/src/neighbourhood/MeshManager.ts +1350 -0
  858. package/src/neighbourhood/NeighbourhoodClient.test.ts +60 -0
  859. package/src/neighbourhood/NeighbourhoodClient.ts +298 -27
  860. package/src/neighbourhood/NeighbourhoodProxy.test.ts +37 -9
  861. package/src/neighbourhood/NeighbourhoodProxy.ts +247 -1
  862. package/src/neighbourhood/Session.test.ts +800 -0
  863. package/src/neighbourhood/Session.ts +525 -0
  864. package/src/neighbourhood/SfuManager.test.ts +677 -0
  865. package/src/neighbourhood/SfuManager.ts +803 -0
  866. package/src/neighbourhood/SfuTypes.ts +40 -0
  867. package/src/notifyListeners.test.ts +19 -0
  868. package/src/notifyListeners.ts +10 -0
  869. package/src/perspectives/AutoProcessor.ts +13 -82
  870. package/src/perspectives/FlowInstance.ts +136 -32
  871. package/src/perspectives/FlowModels.ts +46 -11
  872. package/src/perspectives/InterpretationModels.ts +4 -0
  873. package/src/perspectives/LiveQuery.test.ts +197 -0
  874. package/src/perspectives/LiveQuery.ts +189 -0
  875. package/src/perspectives/Perspective.ts +18 -2
  876. package/src/perspectives/PerspectiveClient.test.ts +122 -45
  877. package/src/perspectives/PerspectiveClient.ts +146 -343
  878. package/src/perspectives/PerspectiveHandle.ts +32 -9
  879. package/src/perspectives/PerspectiveProxy.test.ts +216 -528
  880. package/src/perspectives/PerspectiveProxy.ts +259 -736
  881. package/src/perspectives/TextContent.test.ts +123 -0
  882. package/src/perspectives/TextContent.ts +36 -0
  883. package/src/perspectives/WakerSubscriptionManager.test.ts +136 -1
  884. package/src/perspectives/WakerSubscriptionManager.ts +69 -22
  885. package/src/perspectives/link-updated-type.test.ts +55 -0
  886. package/src/perspectives/listener-leaks.test.ts +204 -0
  887. package/src/perspectives/shacl-rpc.test.ts +22 -27
  888. package/src/runtime/RuntimeClient.ts +75 -157
  889. package/src/runtime/RuntimeTypes.ts +3 -3
  890. package/src/shacl/SHACLFlow.test.ts +49 -1
  891. package/src/shacl/SHACLFlow.ts +73 -15
  892. package/src/shacl/SHACLShape.test.ts +161 -16
  893. package/src/shacl/SHACLShape.ts +210 -439
  894. package/lib/shims/reflect-metadata.d.ts +0 -0
  895. package/lib/shims/reflect-metadata.js +0 -0
  896. package/lib/shims/type-graphql.d.ts +0 -32
  897. package/lib/shims/type-graphql.js +0 -70
  898. package/lib/src/PubSub.d.ts +0 -17
  899. package/lib/src/PubSub.js +0 -17
  900. package/lib/src/agent/AgentResolver.d.ts +0 -30
  901. package/lib/src/agent/AgentResolver.js +0 -325
  902. package/lib/src/ai/AIResolver.d.ts +0 -75
  903. package/lib/src/ai/AIResolver.js +0 -455
  904. package/lib/src/buildSchema.d.ts +0 -1
  905. package/lib/src/buildSchema.js +0 -38
  906. package/lib/src/expression/ExpressionResolver.d.ts +0 -10
  907. package/lib/src/expression/ExpressionResolver.js +0 -106
  908. package/lib/src/language/LanguageContext.d.ts +0 -37
  909. package/lib/src/language/LanguageContext.js +0 -2
  910. package/lib/src/language/LanguageResolver.d.ts +0 -19
  911. package/lib/src/language/LanguageResolver.js +0 -143
  912. package/lib/src/links/Links.test.js +0 -33
  913. package/lib/src/model/Ad4mModel.test.js +0 -2055
  914. package/lib/src/model/Subject.d.ts +0 -25
  915. package/lib/src/model/Subject.js +0 -164
  916. package/lib/src/model/hydration-batch.d.ts +0 -34
  917. package/lib/src/model/hydration-batch.js +0 -147
  918. package/lib/src/model/hydration-batching.test.d.ts +0 -7
  919. package/lib/src/model/hydration-batching.test.js +0 -456
  920. package/lib/src/model/model-manifest.d.ts +0 -41
  921. package/lib/src/model/model-manifest.js +0 -11
  922. package/lib/src/model/prolog-facts.d.ts +0 -37
  923. package/lib/src/model/prolog-facts.js +0 -134
  924. package/lib/src/model/query-cache.test.js +0 -43
  925. package/lib/src/model/query-prolog.d.ts +0 -15
  926. package/lib/src/model/query-prolog.js +0 -140
  927. package/lib/src/model/query-sparql-batch.d.ts +0 -17
  928. package/lib/src/model/query-sparql-batch.js +0 -260
  929. package/lib/src/model/query-sparql.test.js +0 -312
  930. package/lib/src/model/relation-filtering.test.js +0 -838
  931. package/lib/src/model/subscription-delta.test.d.ts +0 -24
  932. package/lib/src/model/subscription-delta.test.js +0 -180
  933. package/lib/src/model/subscription-pool.d.ts +0 -39
  934. package/lib/src/model/subscription-pool.js +0 -165
  935. package/lib/src/neighbourhood/NeighbourhoodProxy.test.js +0 -73
  936. package/lib/src/neighbourhood/NeighbourhoodResolver.d.ts +0 -24
  937. package/lib/src/neighbourhood/NeighbourhoodResolver.js +0 -182
  938. package/lib/src/perspectives/Perspective.test.js +0 -20
  939. package/lib/src/perspectives/PerspectiveClient.test.js +0 -224
  940. package/lib/src/perspectives/PerspectiveResolver.d.ts +0 -56
  941. package/lib/src/perspectives/PerspectiveResolver.js +0 -519
  942. package/lib/src/runtime/RuntimeResolver.d.ts +0 -173
  943. package/lib/src/runtime/RuntimeResolver.js +0 -1122
  944. package/lib/src/schema.gql +0 -631
  945. package/lib/src/shacl/SHACLFlow.test.js +0 -205
  946. package/lib/src/shacl/SHACLShape.test.js +0 -418
  947. package/lib/src/unwrapApolloResult.d.ts +0 -2
  948. package/lib/src/unwrapApolloResult.js +0 -14
  949. /package/lib/src/{links/Links.test.d.ts → generated/api/AITask.js} +0 -0
  950. /package/lib/src/{model/Ad4mModel.test.d.ts → generated/api/AITaskInput.js} +0 -0
  951. /package/lib/src/{model/query-cache.test.d.ts → generated/api/Agent.js} +0 -0
  952. /package/lib/src/{model/query-sparql.test.d.ts → generated/api/AgentAddEntanglementProofsParams.js} +0 -0
  953. /package/lib/src/{model/relation-filtering.test.d.ts → generated/api/AgentStatus.js} +0 -0
  954. /package/lib/src/{neighbourhood/NeighbourhoodProxy.test.d.ts → generated/api/AgentStatusChangedEvent.js} +0 -0
  955. /package/lib/src/{perspectives/Perspective.test.d.ts → generated/api/AgentUpdatedEvent.js} +0 -0
  956. /package/lib/src/{perspectives/PerspectiveClient.test.d.ts → generated/api/AiAddModelParams.js} +0 -0
  957. /package/lib/src/{shacl/SHACLFlow.test.d.ts → generated/api/AiAddTaskParams.js} +0 -0
  958. /package/lib/src/{shacl/SHACLShape.test.d.ts → generated/api/AiGetDefaultModelParams.js} +0 -0
@@ -120,6 +120,106 @@ function applyPolymorphicIncludeDefaults(includes, ctor) {
120
120
  applyPolymorphicIncludeDefaults(nested, TargetClass);
121
121
  }
122
122
  }
123
+ /**
124
+ * Split an include map into its relations and its `$`-prefixed projections.
125
+ *
126
+ * The two travel in different fields: a relation is hydrated, a projection is
127
+ * computed over one. Both halves are new objects, so the caller's query is left
128
+ * as it was written and can be sent again.
129
+ */
130
+ function splitIncludeProjections(include) {
131
+ const includes = {};
132
+ const projections = {};
133
+ for (const [key, val] of Object.entries(include)) {
134
+ if (key.startsWith('$')) {
135
+ projections[key] = { ...val };
136
+ }
137
+ else {
138
+ includes[key] = val;
139
+ }
140
+ }
141
+ return { includes, projections };
142
+ }
143
+ /**
144
+ * Tag each projection with its target class name, so the executor can resolve
145
+ * the target shape through its in-memory cache when applying a projection's
146
+ * where-clause. `ctor` is the class the projections are read against; without
147
+ * one (the members of a polymorphic relation) nothing is tagged, and the
148
+ * executor resolves each projection against each member's own class.
149
+ */
150
+ function tagProjectionTargets(projections, ctor) {
151
+ if (!ctor)
152
+ return;
153
+ const allRelMeta = getRelationsMetadata(ctor);
154
+ for (const proj of Object.values(projections)) {
155
+ const relMeta = allRelMeta[proj.from];
156
+ if (!proj.targetClassName && relMeta?.target) {
157
+ try {
158
+ const TargetClass = relMeta.target();
159
+ const targetMeta = TargetClass.getModelMetadata?.();
160
+ if (targetMeta?.className) {
161
+ proj.targetClassName = targetMeta.className;
162
+ }
163
+ }
164
+ catch (e) {
165
+ console.debug(`prepareModelQueryParams: target class unavailable for projection:`, e);
166
+ }
167
+ }
168
+ }
169
+ }
170
+ /**
171
+ * Move the `$`-prefixed keys of every nested include into that sub-query's own
172
+ * `projections`, at every depth.
173
+ *
174
+ * The executor reads a sub-query exactly as it reads a top-level query, so a
175
+ * projection on related records belongs in the sub-query's `projections` field,
176
+ * as it does at the top. Left inside `include` it named a relation that does not
177
+ * exist and was skipped: the query succeeded and the field was simply absent, so
178
+ * `include: { posts: { include: { $likeCount: … } } }` came back without counts
179
+ * and said nothing.
180
+ *
181
+ * Copies every sub-query it changes rather than editing it, so a query object
182
+ * the caller keeps (a subscription re-preparing its query, say) still says what
183
+ * it said.
184
+ */
185
+ function liftNestedProjections(includes, ctor) {
186
+ const relMeta = ctor ? getRelationsMetadata(ctor) : {};
187
+ const out = {};
188
+ for (const [relName, val] of Object.entries(includes)) {
189
+ if (typeof val !== 'object' || val === null || relName.startsWith('$')) {
190
+ out[relName] = val;
191
+ continue;
192
+ }
193
+ const subQuery = { ...val };
194
+ // The class the nested keys are read against. A polymorphic relation's
195
+ // members are of several classes, so there is none to name: its nested
196
+ // projections go untagged and the executor resolves them per member class.
197
+ let TargetClass;
198
+ if (!subQuery.polymorphic) {
199
+ try {
200
+ TargetClass = relMeta[relName]?.target?.();
201
+ }
202
+ catch (e) {
203
+ console.debug(`prepareModelQueryParams: target class unavailable for include '${relName}':`, e);
204
+ }
205
+ }
206
+ if (subQuery.include && typeof subQuery.include === 'object') {
207
+ const { includes: nestedIncludes, projections } = splitIncludeProjections(subQuery.include);
208
+ if (Object.keys(nestedIncludes).length > 0) {
209
+ subQuery.include = liftNestedProjections(nestedIncludes, TargetClass);
210
+ }
211
+ else {
212
+ delete subQuery.include;
213
+ }
214
+ if (Object.keys(projections).length > 0) {
215
+ tagProjectionTargets(projections, TargetClass);
216
+ subQuery.projections = { ...(subQuery.projections ?? {}), ...projections };
217
+ }
218
+ }
219
+ out[relName] = subQuery;
220
+ }
221
+ return out;
222
+ }
123
223
  function jsonToModelInstance(ModelClass, perspective, json, include, properties) {
124
224
  const instance = new ModelClass(perspective, json.id || json.baseExpression);
125
225
  // When a properties projection is active, remove own properties set by the
@@ -484,6 +584,7 @@ export class Ad4mModel {
484
584
  predicate: options.predicate || "",
485
585
  ...(options.local !== undefined && { local: options.local }),
486
586
  ...(options.getter !== undefined && { getter: options.getter }),
587
+ ...(options.readOnly && { readOnly: true }),
487
588
  direction: (options.kind === 'belongsToMany' || options.kind === 'belongsToOne') ? 'reverse' : 'forward',
488
589
  ...(options.kind !== undefined && { kind: options.kind }),
489
590
  ...(options.maxCount !== undefined && { maxCount: options.maxCount }),
@@ -879,9 +980,19 @@ export class Ad4mModel {
879
980
  * Shape resolution happens server-side from the perspective's SHACL triples.
880
981
  * @internal
881
982
  */
983
+ /**
984
+ * The name the executor knows this class by: its class name, or a
985
+ * built-in abstract class's URI (`ad4m://TextContent`, #1446). The URI is
986
+ * the class's own static only: a subclass is a class of its own.
987
+ * @internal
988
+ */
989
+ static queriedAs() {
990
+ const builtinUri = Object.prototype.hasOwnProperty.call(this, 'builtinUri') ? this.builtinUri : undefined;
991
+ return builtinUri || this.getModelMetadata().className;
992
+ }
882
993
  static prepareModelQueryParams(query = {}, classNameOverride) {
883
994
  const metadata = this.getModelMetadata();
884
- const className = classNameOverride || metadata.className;
995
+ const className = classNameOverride || this.queriedAs();
885
996
  // Expand includeAll: true to a full IncludeMap covering every forward relation.
886
997
  if (query.includeAll) {
887
998
  const allRelMeta = getRelationsMetadata(this);
@@ -927,18 +1038,9 @@ export class Ad4mModel {
927
1038
  if (query.properties)
928
1039
  queryInput.properties = query.properties;
929
1040
  if (query.include) {
930
- // Split include keys: $-prefixed / IncludeProjection values → queryInput.projections
931
- // All other keys (boolean | RelationSubQuery) → queryInput.include
932
- const normalIncludes = {};
933
- const projections = {};
934
- for (const [key, val] of Object.entries(query.include)) {
935
- if (key.startsWith('$')) {
936
- projections[key] = val;
937
- }
938
- else {
939
- normalIncludes[key] = val;
940
- }
941
- }
1041
+ // $-prefixed keys → queryInput.projections; all other keys (boolean |
1042
+ // RelationSubQuery) → queryInput.include.
1043
+ const { includes: normalIncludes, projections } = splitIncludeProjections(query.include);
942
1044
  // A relation declared `polymorphic` reads that way by default, so the
943
1045
  // caller writes `include: { children: true }` and still gets each child
944
1046
  // hydrated as the class it actually is. Declaring it on the model rather
@@ -948,28 +1050,10 @@ export class Ad4mModel {
948
1050
  // every depth, since a nested include is a fact about the data too.
949
1051
  if (Object.keys(normalIncludes).length > 0) {
950
1052
  applyPolymorphicIncludeDefaults(normalIncludes, this);
951
- queryInput.include = normalIncludes;
1053
+ queryInput.include = liftNestedProjections(normalIncludes, this);
952
1054
  }
953
1055
  if (Object.keys(projections).length > 0) {
954
- // Tag each projection with its target class name so the executor can
955
- // resolve the target shape through its in-memory cache when applying
956
- // projection where-clause filters.
957
- const allRelMeta = getRelationsMetadata(this);
958
- for (const [, proj] of Object.entries(projections)) {
959
- const relMeta = allRelMeta[proj.from];
960
- if (!proj.targetClassName && relMeta?.target) {
961
- try {
962
- const TargetClass = relMeta.target();
963
- const targetMeta = TargetClass.getModelMetadata?.();
964
- if (targetMeta?.className) {
965
- proj.targetClassName = targetMeta.className;
966
- }
967
- }
968
- catch (e) {
969
- console.debug(`prepareModelQueryParams: target class unavailable for projection:`, e);
970
- }
971
- }
972
- }
1056
+ tagProjectionTargets(projections, this);
973
1057
  queryInput.projections = projections;
974
1058
  }
975
1059
  }
@@ -1012,6 +1096,159 @@ export class Ad4mModel {
1012
1096
  return [];
1013
1097
  return arr.map((json) => jsonToModelInstance(this, perspective, json, include, properties));
1014
1098
  }
1099
+ // ── One query over several classes (#1238) ────────────────────────────────
1100
+ /**
1101
+ * Build the wire parameters for one query over several classes.
1102
+ *
1103
+ * Each class normalises the query as it would for itself — its polymorphic
1104
+ * include defaults, its `$` projections, its parent predicate — and the
1105
+ * results are merged: includes and projections by key (the first class that
1106
+ * declares a key decides its form; a projection two classes tag with
1107
+ * different target classes is refused), the parent scope only when every
1108
+ * class that can resolve it resolves it to the same predicate.
1109
+ * @internal
1110
+ */
1111
+ static prepareUnionQueryParams(classes, query = {}) {
1112
+ if (!classes.length)
1113
+ throw new Error('A query over several classes needs at least one class');
1114
+ const { parent, preferClasses, ...rest } = query;
1115
+ const inputs = classes.map((c) => JSON.parse(c.prepareModelQueryParams(rest).queryJson));
1116
+ // A projection is tagged with its relation's target class, at every depth,
1117
+ // and the executor hydrates a list projection (and resolves its `where`)
1118
+ // as that class. Two classes that tag the same key differently cannot share
1119
+ // one form of it, so the key is refused rather than read as the first's.
1120
+ const tags = new Map();
1121
+ const collectTags = (node, path) => {
1122
+ if (!node || typeof node !== 'object')
1123
+ return;
1124
+ for (const [k, v] of Object.entries(node)) {
1125
+ if (k === 'targetClassName' && typeof v === 'string') {
1126
+ const seen = tags.get(path);
1127
+ if (seen !== undefined && seen !== v) {
1128
+ throw new Error(`projection '${path}': the classes resolve it to different target classes ` +
1129
+ `(${seen}, ${v}); query those classes separately`);
1130
+ }
1131
+ tags.set(path, v);
1132
+ }
1133
+ else {
1134
+ collectTags(v, path ? `${path}.${k}` : k);
1135
+ }
1136
+ }
1137
+ };
1138
+ for (const input of inputs) {
1139
+ collectTags(input.include, 'include');
1140
+ collectTags(input.projections, 'projections');
1141
+ }
1142
+ const merged = { ...inputs[0] };
1143
+ if (preferClasses)
1144
+ merged.preferClasses = preferClasses;
1145
+ for (const key of ['include', 'projections']) {
1146
+ const combined = Object.assign({}, ...inputs.map((i) => i[key] ?? {}).reverse());
1147
+ if (Object.keys(combined).length)
1148
+ merged[key] = combined;
1149
+ else
1150
+ delete merged[key];
1151
+ }
1152
+ if (parent) {
1153
+ // A model-form scope names its predicate through the relation that
1154
+ // targets the queried class, so each class may resolve it differently
1155
+ // or not at all. One query has one scope.
1156
+ const scopes = [];
1157
+ let firstError;
1158
+ for (const c of classes) {
1159
+ try {
1160
+ scopes.push(JSON.stringify(JSON.parse(c.prepareModelQueryParams({ parent }).queryJson).parent));
1161
+ }
1162
+ catch (e) {
1163
+ firstError ?? (firstError = e);
1164
+ }
1165
+ }
1166
+ if (!scopes.length)
1167
+ throw firstError;
1168
+ if (new Set(scopes).size > 1) {
1169
+ throw new Error('parent(): the classes resolve the parent scope to different predicates; ' +
1170
+ 'pass the predicate itself (or a `field`) so they share one scope');
1171
+ }
1172
+ merged.parent = JSON.parse(scopes[0]);
1173
+ }
1174
+ return {
1175
+ classNames: classes.map((c) => c.queriedAs()),
1176
+ queryJson: JSON.stringify(merged),
1177
+ };
1178
+ }
1179
+ /**
1180
+ * Build each row of a union result as the class the executor hydrated it as
1181
+ * (`__subjectClass`). A row of a class not in `classes` stays plain JSON.
1182
+ * @internal
1183
+ */
1184
+ static parseUnionResult(classes, perspective, raw, include, properties) {
1185
+ const data = typeof raw === 'string' ? JSON.parse(raw) : raw;
1186
+ const arr = data.instances || data;
1187
+ if (!Array.isArray(arr))
1188
+ return [];
1189
+ const byName = new Map(classes.map((c) => [c.getModelMetadata().className, c]));
1190
+ return arr.map((json) => {
1191
+ const cls = byName.get(json?.[SUBJECT_CLASS_KEY]);
1192
+ return cls ? jsonToModelInstance(cls, perspective, json, include, properties) : json;
1193
+ });
1194
+ }
1195
+ /** @internal */
1196
+ static async executeUnionQuery(perspective, classes, query = {}, options) {
1197
+ const { classNames, queryJson } = Ad4mModel.prepareUnionQueryParams(classes, query);
1198
+ const result = await perspective.modelQuery(classNames, queryJson, options);
1199
+ const results = Ad4mModel.parseUnionResult(classes, perspective, result, query.include, query.properties);
1200
+ const snapshotRelations = query.include
1201
+ ? Object.fromEntries(Object.entries(query.include).filter(([k]) => !k.startsWith('$')))
1202
+ : undefined;
1203
+ for (const inst of results) {
1204
+ inst.takeSnapshot?.(snapshotRelations && Object.keys(snapshotRelations).length > 0 ? snapshotRelations : undefined);
1205
+ }
1206
+ return { results, totalCount: result.totalCount };
1207
+ }
1208
+ /**
1209
+ * One query over several model classes (#1238).
1210
+ *
1211
+ * `where`, `order`, `limit` and `offset` apply once, over the union. Each
1212
+ * result is an instance of the class the executor hydrated it as: the first
1213
+ * `preferClasses` entry it conforms to, otherwise the most specific of
1214
+ * `classes` it conforms to. A record that is several of them is returned
1215
+ * once; `__subjectClasses` on it names every class it conforms to.
1216
+ *
1217
+ * - `where` on a property a class does not declare excludes that class's rows.
1218
+ * - `order` on such a property sorts those rows last, in both directions,
1219
+ * then by id.
1220
+ *
1221
+ * @example
1222
+ * ```typescript
1223
+ * const items = await Ad4mModel.findAllOf(perspective, [Placement, EdgeRoute], {
1224
+ * parent: { id: canvas.id, predicate: "canvas://item" },
1225
+ * order: { zIndex: "ASC" },
1226
+ * limit: 50,
1227
+ * });
1228
+ * for (const item of items) {
1229
+ * if (item instanceof Placement) { ... }
1230
+ * }
1231
+ * ```
1232
+ */
1233
+ static async findAllOf(perspective, classes, query, options) {
1234
+ const { results } = await Ad4mModel.executeUnionQuery(perspective, classes, query ?? {}, options);
1235
+ return results;
1236
+ }
1237
+ /**
1238
+ * A {@link ModelQueryBuilder} over several model classes: the builder form of
1239
+ * {@link findAllOf}. `subscribe()` registers one subscription, which re-runs
1240
+ * when any of the classes changes.
1241
+ *
1242
+ * @example
1243
+ * ```typescript
1244
+ * const builder = Ad4mModel.queryOf(perspective, [Placement, EdgeRoute])
1245
+ * .parent(canvas.id, "canvas://item");
1246
+ * await builder.subscribe((items) => render(items));
1247
+ * ```
1248
+ */
1249
+ static queryOf(perspective, classes, query) {
1250
+ return new ModelQueryBuilder(perspective, Ad4mModel, query, classes);
1251
+ }
1015
1252
  // instancesFromQueryResult — removed (superseded by Rust executeModelQuery pipeline)
1016
1253
  /**
1017
1254
  * Execute a model query via the executor-side endpoint.
@@ -1207,12 +1444,26 @@ export class Ad4mModel {
1207
1444
  return value.id;
1208
1445
  return String(value);
1209
1446
  }
1447
+ /** A relation write on a row read through an abstract class (#1435). The
1448
+ * relation's predicate is the abstract class's, which no record's class
1449
+ * reads: the executor runs the adder, remover or setter of each of the
1450
+ * record's classes for the relation answering to `key`. */
1451
+ async relationThroughAbstract(abstractName, key, action, value, batchId) {
1452
+ const ids = (Array.isArray(value) ? value : [value]).map((v) => this.resolveRelationId(v));
1453
+ await this._perspective.updateSubject(abstractName, this._baseExpression, { [key]: { action, value: ids } }, batchId);
1454
+ }
1210
1455
  async setRelationValues(key, value, batchId) {
1211
1456
  const metadata = this.getRelationOptions(key);
1212
1457
  if (!metadata) {
1213
1458
  console.warn(`Relation "${key}" has no metadata, skipping`);
1214
1459
  return;
1215
1460
  }
1461
+ const abstractName = this.abstractName();
1462
+ if (abstractName) {
1463
+ if (value != null)
1464
+ await this.relationThroughAbstract(abstractName, key, 'setter', value, batchId);
1465
+ return;
1466
+ }
1216
1467
  // Generate actions from metadata (replaces Prolog query)
1217
1468
  const actions = this.generateRelationAction(key, 'setter');
1218
1469
  if (value != null) {
@@ -1230,6 +1481,12 @@ export class Ad4mModel {
1230
1481
  console.warn(`Relation "${key}" has no metadata, skipping`);
1231
1482
  return;
1232
1483
  }
1484
+ const abstractName = this.abstractName();
1485
+ if (abstractName) {
1486
+ if (value != null)
1487
+ await this.relationThroughAbstract(abstractName, key, 'adder', value, batchId);
1488
+ return;
1489
+ }
1233
1490
  // Generate actions from metadata (replaces Prolog query)
1234
1491
  const actions = this.generateRelationAction(key, 'adder');
1235
1492
  if (value != null) {
@@ -1247,6 +1504,12 @@ export class Ad4mModel {
1247
1504
  console.warn(`Relation "${key}" has no metadata, skipping`);
1248
1505
  return;
1249
1506
  }
1507
+ const abstractName = this.abstractName();
1508
+ if (abstractName) {
1509
+ if (value != null)
1510
+ await this.relationThroughAbstract(abstractName, key, 'remover', value, batchId);
1511
+ return;
1512
+ }
1250
1513
  // Generate actions from metadata (replaces Prolog query)
1251
1514
  const actions = this.generateRelationAction(key, 'remover');
1252
1515
  if (value != null) {
@@ -1287,7 +1550,13 @@ export class Ad4mModel {
1287
1550
  async save(batchId) {
1288
1551
  // Existing instance → update path (has been fetched / hydrated before)
1289
1552
  if (this._snapshot) {
1290
- await this.innerUpdate(true, batchId);
1553
+ const abstractName = this.abstractName();
1554
+ if (abstractName) {
1555
+ await this.perspective.updateSubject(abstractName, this._baseExpression, this.changedValuesForDispatch(), batchId);
1556
+ }
1557
+ else {
1558
+ await this.innerUpdate(true, batchId);
1559
+ }
1291
1560
  if (batchId) {
1292
1561
  // Batch hasn't been committed yet — getData() would fetch stale data
1293
1562
  // and overwrite in-memory values. Just refresh the snapshot so further
@@ -1299,54 +1568,48 @@ export class Ad4mModel {
1299
1568
  }
1300
1569
  return;
1301
1570
  }
1302
- // New instance → create path
1571
+ // New instance → create path. The executor refuses an abstract class
1572
+ // too; refusing here keeps the error ahead of the batch.
1573
+ const abstractName = this.abstractName();
1574
+ if (abstractName) {
1575
+ throw new Error(`'${abstractName}' is an abstract class and cannot be created. Create an instance of ` +
1576
+ `a class that has its properties; querying '${abstractName}' reads it.`);
1577
+ }
1303
1578
  let batchCreatedHere = false;
1304
1579
  if (!batchId) {
1305
1580
  batchId = await this.perspective.createBatch();
1306
1581
  batchCreatedHere = true;
1307
1582
  }
1308
- // Check if the model has any constructor actions (required properties,
1309
- // flags, or properties with initial values). Models whose properties are
1310
- // all optional, have no @Flag, and have no initial values produce an empty
1311
- // SHACL constructor, so calling createSubject would fail on the Rust side
1312
- // ("No SHACL constructor found"). In that case we skip createSubject
1313
- // entirely and let innerUpdate write the links directly.
1314
1583
  const metadata = this.constructor.getModelMetadata();
1315
- const hasConstructor = Object.values(metadata.properties).some((p) => p.required || p.flag || p.initial !== undefined);
1316
1584
  // Track properties resolved through expression_create — a signed literal
1317
1585
  // envelope or a custom (non-"literal") resolveLanguage. These may fail
1318
1586
  // inside a batch context, so defer them to setProperty after createSubject.
1319
1587
  const deferredExpressionProps = [];
1320
- if (hasConstructor) {
1321
- const initialValues = {};
1322
- for (const [key, value] of Object.entries(this)) {
1323
- if (value !== undefined && value !== null && !(Array.isArray(value) && value.length > 0) && !value?.action) {
1324
- const propMeta = metadata.properties[key];
1325
- // Only offer keys with a declared, settable model property. This
1326
- // excludes ORM bookkeeping fields (_baseExpression, _perspective —
1327
- // enumerable instance fields, not model properties), HasMany
1328
- // relations (tracked in a separate registry, never in
1329
- // `metadata.properties`), and read-only properties/flags
1330
- // (readOnly: true). None of these have an `ad4m://setter` on the
1331
- // Rust side, which otherwise logs a "declares no setter" warning
1332
- // per key on every save().
1333
- if (!propMeta || propMeta.readOnly) {
1334
- continue;
1335
- }
1336
- if (effectiveLiteralStorage(propMeta).kind !== "deterministic") {
1337
- deferredExpressionProps.push(key);
1338
- continue;
1339
- }
1340
- initialValues[key] = value;
1588
+ const initialValues = {};
1589
+ for (const [key, value] of Object.entries(this)) {
1590
+ if (value !== undefined && value !== null && !(Array.isArray(value) && value.length > 0) && !value?.action) {
1591
+ const propMeta = metadata.properties[key];
1592
+ // Only offer keys with a declared, settable model property. This
1593
+ // excludes ORM bookkeeping fields (_baseExpression, _perspective —
1594
+ // enumerable instance fields, not model properties), relations
1595
+ // (@HasOne also registers a property, but innerUpdate writes it as a
1596
+ // relation), and read-only properties/flags (readOnly: true). None of
1597
+ // these have an `ad4m://setter` on the Rust side, which otherwise logs
1598
+ // a "declares no setter" warning per key on every save().
1599
+ if (!propMeta || propMeta.readOnly || metadata.relations[key]) {
1600
+ continue;
1341
1601
  }
1602
+ if (effectiveLiteralStorage(propMeta).kind !== "deterministic") {
1603
+ deferredExpressionProps.push(key);
1604
+ continue;
1605
+ }
1606
+ initialValues[key] = value;
1342
1607
  }
1343
- const className = await this.perspective.stringOrTemplateObjectToSubjectClassName(this);
1344
- await this.perspective.createSubject(className, this._baseExpression, initialValues, batchId);
1345
1608
  }
1346
- // Set properties and relations via innerUpdate.
1347
- // When createSubject was skipped (no constructor actions), we must enable
1348
- // property writing so that scalar values are persisted as links.
1349
- await this.innerUpdate(!hasConstructor, batchId);
1609
+ const className = await this.perspective.stringOrTemplateObjectToSubjectClassName(this);
1610
+ await this.perspective.createSubject(className, this._baseExpression, initialValues, batchId);
1611
+ // Relations via innerUpdate; createSubject wrote the scalar properties.
1612
+ await this.innerUpdate(false, batchId);
1350
1613
  for (const key of deferredExpressionProps) {
1351
1614
  const value = this[key];
1352
1615
  if (value !== undefined && value !== null) {
@@ -1367,6 +1630,33 @@ export class Ad4mModel {
1367
1630
  this.takeSnapshot();
1368
1631
  }
1369
1632
  }
1633
+ /** The name the executor knows the class by when it is abstract (#1435):
1634
+ * a built-in's URI (#1446). Through an abstract class, the executor
1635
+ * writes to the record's own classes. */
1636
+ abstractName() {
1637
+ const ctor = this.constructor;
1638
+ return ctor.isAbstract ? ctor.queriedAs() : undefined;
1639
+ }
1640
+ changedValues() {
1641
+ return Object.fromEntries(this.changedFields().map((key) => [key, this[key]]));
1642
+ }
1643
+ /** `changedValues()` with each relation's members as IDs, as the relation
1644
+ * helpers send them: a member may be a model instance. An action envelope
1645
+ * (`{ action: "adder", value }`) keeps its action, as `innerUpdate()` runs
1646
+ * it; an action it does not know is a setter there, so it is one here. */
1647
+ changedValuesForDispatch() {
1648
+ const relations = this.constructor.getModelMetadata().relations;
1649
+ const ids = (value) => Array.isArray(value) ? value.map((v) => this.resolveRelationId(v)) : this.resolveRelationId(value);
1650
+ return Object.fromEntries(Object.entries(this.changedValues()).map(([key, value]) => {
1651
+ if (!relations[key] || value == null)
1652
+ return [key, value];
1653
+ if (value.action) {
1654
+ const action = ["adder", "remover", "setter"].includes(value.action) ? value.action : "setter";
1655
+ return [key, { action, value: ids(value.value) }];
1656
+ }
1657
+ return [key, ids(value)];
1658
+ }));
1659
+ }
1370
1660
  cleanCopy() {
1371
1661
  const ctor = this.constructor;
1372
1662
  const metadata = ctor.getModelMetadata();
@@ -1404,13 +1694,14 @@ export class Ad4mModel {
1404
1694
  // Skip unchanged fields when a snapshot is available
1405
1695
  if (dirty && !dirty.has(key))
1406
1696
  continue;
1407
- // Skip read-only computed relations — explicit getters never write links.
1697
+ // Skip read-only relations — explicit getters never write links, and
1698
+ // neither does a relation declared `readOnly`.
1408
1699
  // For target+filter relations, skip only when another relation on this
1409
1700
  // model claims the same predicate (i.e., this is a filtered *view* of a
1410
1701
  // base relation and writing would collide).
1411
1702
  const relMeta = metadata.relations[key];
1412
1703
  if (relMeta) {
1413
- if (relMeta.getter)
1704
+ if (relMeta.getter || relMeta.readOnly)
1414
1705
  continue;
1415
1706
  if (relMeta.target && relMeta.filter !== false) {
1416
1707
  // Check for predicate collision with a sibling relation
@@ -1606,7 +1897,9 @@ export class Ad4mModel {
1606
1897
  */
1607
1898
  async delete(batchId) {
1608
1899
  const metadata = this.constructor.getModelMetadata();
1609
- const hasDestructor = Object.values(metadata.properties).some((p) => p.required || p.flag || p.initial !== undefined);
1900
+ // Through an abstract class (#1435), `removeSubject` runs the destructors
1901
+ // of the record's own classes.
1902
+ const hasDestructor = !!this.abstractName() || Object.values(metadata.properties).some((p) => p.required || p.flag || p.initial !== undefined);
1610
1903
  if (hasDestructor) {
1611
1904
  // Remove the subject itself (destructor actions)
1612
1905
  await this._perspective.removeSubject(this, this._baseExpression, batchId);
@@ -33,20 +33,22 @@ export declare class ModelQueryBuilder<T extends Ad4mModel> {
33
33
  private modelClassName;
34
34
  private ctor;
35
35
  private currentSubscription?;
36
- constructor(perspective: PerspectiveProxy, ctor: typeof Ad4mModel, query?: Query);
37
- /**
38
- * Disposes of the current subscription if one exists.
39
- *
40
- * This method:
41
- * 1. Stops the keepalive signals to the subscription
42
- * 2. Unsubscribes from subscription updates
43
- * 3. Notifies the backend to clean up subscription resources
44
- * 4. Clears the subscription reference
45
- *
46
- * You should call this method when you're done with a subscription
47
- * to prevent memory leaks and ensure proper cleanup.
48
- */
36
+ /** Set for a query over several classes (`Ad4mModel.queryOf`, #1238). */
37
+ private unionClasses?;
38
+ constructor(perspective: PerspectiveProxy, ctor: typeof Ad4mModel, query?: Query, unionClasses?: (typeof Ad4mModel)[]);
39
+ /** The wire parameters for `params`: one class, or the union's class list. */
40
+ private prepare;
41
+ /** Run `params` once and build model instances from the rows. */
42
+ private execute;
43
+ /** Build model instances from a raw result pushed by a subscription. */
44
+ private parse;
45
+ /** Ends the current subscription, if any, on the client and the executor. */
49
46
  dispose(): void;
47
+ /** Open a live model query for `params` as the current subscription.
48
+ * Resolves with it and the raw initial result; `onResult` gets every later one.
49
+ * A failed open ends only its own query: a later call may already own
50
+ * `currentSubscription`. */
51
+ private live;
50
52
  /**
51
53
  * Adds where conditions to the query.
52
54
  *