@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.
- package/README.md +1 -0
- package/lib/index.cjs +9613 -7069
- package/lib/index.js +7367 -4840
- package/lib/src/Ad4mClient.d.ts +12 -4
- package/lib/src/Ad4mClient.js +15 -11
- package/lib/src/Literal.js +3 -3
- package/lib/src/agent/Agent.d.ts +4 -1
- package/lib/src/agent/Agent.js +6 -0
- package/lib/src/agent/AgentClient.d.ts +9 -23
- package/lib/src/agent/AgentClient.js +68 -148
- package/lib/src/ai/AIClient.d.ts +10 -6
- package/lib/src/ai/AIClient.js +29 -27
- package/lib/src/apiClient.d.ts +54 -42
- package/lib/src/apiClient.js +279 -252
- package/lib/src/expression/Expression.d.ts +13 -4
- package/lib/src/expression/Expression.js +0 -1
- package/lib/src/expression/ExpressionClient.js +1 -1
- package/lib/src/generated/api/AIPromptExamples.d.ts +4 -0
- package/lib/src/generated/api/AIPromptExamples.js +2 -0
- package/lib/src/generated/api/AIPromptExamplesInput.d.ts +4 -0
- package/lib/src/generated/api/AIPromptExamplesInput.js +2 -0
- package/lib/src/generated/api/AITask.d.ts +11 -0
- package/lib/src/generated/api/AITaskInput.d.ts +8 -0
- package/lib/src/generated/api/AddAgentInfosRequest.d.ts +3 -0
- package/lib/src/generated/api/AddAgentInfosRequest.js +2 -0
- package/lib/src/generated/api/AddLinkExpressionRequest.d.ts +2 -2
- package/lib/src/generated/api/AddLinkRequest.d.ts +2 -2
- package/lib/src/generated/api/AddLinksBulkRequest.d.ts +2 -2
- package/lib/src/generated/api/AddSdnaRequest.d.ts +2 -2
- package/lib/src/generated/api/Agent.d.ts +6 -0
- package/lib/src/generated/api/AgentAddEntanglementProofsParams.d.ts +9 -0
- package/lib/src/generated/api/AgentByDidParams.d.ts +3 -0
- package/lib/src/generated/api/AgentByDidParams.js +2 -0
- package/lib/src/generated/api/AgentRemoveAppParams.d.ts +3 -0
- package/lib/src/generated/api/AgentRemoveAppParams.js +2 -0
- package/lib/src/generated/api/AgentRevokeTokenParams.d.ts +3 -0
- package/lib/src/generated/api/AgentRevokeTokenParams.js +2 -0
- package/lib/src/generated/api/AgentSignature.d.ts +4 -0
- package/lib/src/generated/api/AgentSignature.js +2 -0
- package/lib/src/generated/api/AgentStatus.d.ts +8 -0
- package/lib/src/generated/api/AgentStatusChangedEvent.d.ts +7 -0
- package/lib/src/generated/api/AgentUpdatedEvent.d.ts +7 -0
- package/lib/src/generated/api/AgentsByDidsRequest.d.ts +3 -0
- package/lib/src/generated/api/AgentsByDidsRequest.js +2 -0
- package/lib/src/generated/api/AiAddModelParams.d.ts +4 -0
- package/lib/src/generated/api/AiAddTaskParams.d.ts +4 -0
- package/lib/src/generated/api/AiDiscoverModelsParams.d.ts +8 -0
- package/lib/src/generated/api/AiDiscoverModelsParams.js +2 -0
- package/lib/src/generated/api/AiGetDefaultModelParams.d.ts +4 -0
- package/lib/src/generated/api/AiIdParams.d.ts +3 -0
- package/lib/src/generated/api/AiIdParams.js +2 -0
- package/lib/src/generated/api/AiModelLoadingStatusParams.d.ts +7 -0
- package/lib/src/generated/api/AiModelLoadingStatusParams.js +2 -0
- package/lib/src/generated/api/AiSetDefaultModelParams.d.ts +5 -0
- package/lib/src/generated/api/AiSetDefaultModelParams.js +1 -0
- package/lib/src/generated/api/AiTranscriptionCloseParams.d.ts +3 -0
- package/lib/src/generated/api/AiTranscriptionCloseParams.js +2 -0
- package/lib/src/generated/api/AiTranscriptionOpenParams.d.ts +5 -0
- package/lib/src/generated/api/AiTranscriptionOpenParams.js +1 -0
- package/lib/src/generated/api/AiUpdateModelParams.d.ts +5 -0
- package/lib/src/generated/api/AiUpdateModelParams.js +1 -0
- package/lib/src/generated/api/AiUpdateTaskParams.d.ts +4 -0
- package/lib/src/generated/api/AiUpdateTaskParams.js +1 -0
- package/lib/src/generated/api/Apps.d.ts +7 -0
- package/lib/src/generated/api/Apps.js +1 -0
- package/lib/src/generated/api/AuthInfo.d.ts +10 -0
- package/lib/src/generated/api/AuthInfo.js +1 -0
- package/lib/src/generated/api/AuthInfoInput.d.ts +4 -4
- package/lib/src/generated/api/AutoProcessorEvent.d.ts +89 -0
- package/lib/src/generated/api/AutoProcessorEvent.js +1 -0
- package/lib/src/generated/api/AutoProcessorNeighbourhoodState.d.ts +32 -0
- package/lib/src/generated/api/AutoProcessorNeighbourhoodState.js +1 -0
- package/lib/src/generated/api/AutoProcessorStep.d.ts +7 -0
- package/lib/src/generated/api/AutoProcessorStep.js +2 -0
- package/lib/src/generated/api/BroadcastRequest.d.ts +5 -0
- package/lib/src/generated/api/BroadcastRequest.js +2 -0
- package/lib/src/generated/api/CallSessionInfo.d.ts +23 -0
- package/lib/src/generated/api/CallSessionInfo.js +2 -0
- package/lib/src/generated/api/Capability.d.ts +5 -0
- package/lib/src/generated/api/Capability.js +1 -0
- package/lib/src/generated/api/CreateSubjectRequest.d.ts +2 -2
- package/lib/src/generated/api/CreateUserRequest.d.ts +4 -0
- package/lib/src/generated/api/CreateUserRequest.js +2 -0
- package/lib/src/generated/api/DateTime.d.ts +1 -0
- package/lib/src/generated/api/DateTime.js +2 -0
- package/lib/src/generated/api/DecoratedExpressionProof.d.ts +6 -0
- package/lib/src/generated/api/DecoratedExpressionProof.js +2 -0
- package/lib/src/generated/api/DecoratedLinkExpression.d.ts +10 -0
- package/lib/src/generated/api/DecoratedLinkExpression.js +1 -0
- package/lib/src/generated/api/DecoratedNeighbourhoodExpression.d.ts +8 -0
- package/lib/src/generated/api/DecoratedNeighbourhoodExpression.js +1 -0
- package/lib/src/generated/api/DecoratedPerspective.d.ts +4 -0
- package/lib/src/generated/api/DecoratedPerspective.js +1 -0
- package/lib/src/generated/api/DiscardBatchRequest.d.ts +3 -0
- package/lib/src/generated/api/DiscardBatchRequest.js +2 -0
- package/lib/src/generated/api/DisposeQueryRequest.d.ts +3 -0
- package/lib/src/generated/api/DisposeQueryRequest.js +2 -0
- package/lib/src/generated/api/EntanglementProof.d.ts +8 -0
- package/lib/src/generated/api/EntanglementProof.js +2 -0
- package/lib/src/generated/api/EntanglementProofInput.d.ts +1 -1
- package/lib/src/generated/api/EntanglementProofPreflightRequest.d.ts +4 -0
- package/lib/src/generated/api/EntanglementProofPreflightRequest.js +2 -0
- package/lib/src/generated/api/EntanglementProofsWrapper.d.ts +7 -0
- package/lib/src/generated/api/EntanglementProofsWrapper.js +1 -0
- package/lib/src/generated/api/Events.d.ts +56 -0
- package/lib/src/generated/api/Events.js +18 -0
- package/lib/src/generated/api/ExceptionInfo.d.ts +7 -0
- package/lib/src/generated/api/ExceptionInfo.js +1 -0
- package/lib/src/generated/api/ExceptionOccurredEvent.d.ts +7 -0
- package/lib/src/generated/api/ExceptionOccurredEvent.js +1 -0
- package/lib/src/generated/api/ExceptionType.d.ts +1 -0
- package/lib/src/generated/api/ExceptionType.js +2 -0
- package/lib/src/generated/api/ExecuteCommandsRequest.d.ts +4 -2
- package/lib/src/generated/api/ExportRequest.d.ts +1 -1
- package/lib/src/generated/api/ExpressionInteractRequest.d.ts +5 -0
- package/lib/src/generated/api/ExpressionInteractRequest.js +1 -0
- package/lib/src/generated/api/ExpressionProofInput.d.ts +4 -4
- package/lib/src/generated/api/ExpressionRendered.d.ts +11 -0
- package/lib/src/generated/api/ExpressionRendered.js +1 -0
- package/lib/src/generated/api/ExpressionUrlRequest.d.ts +3 -0
- package/lib/src/generated/api/ExpressionUrlRequest.js +2 -0
- package/lib/src/generated/api/FireOutcome.d.ts +14 -0
- package/lib/src/generated/api/FireOutcome.js +2 -0
- package/lib/src/generated/api/FlowStateChangedEvent.d.ts +38 -0
- package/lib/src/generated/api/FlowStateChangedEvent.js +2 -0
- package/lib/src/generated/api/FlowStateEntry.d.ts +18 -0
- package/lib/src/generated/api/FlowStateEntry.js +2 -0
- package/lib/src/generated/api/FriendSendMessageRequest.d.ts +1 -1
- package/lib/src/generated/api/HostRate.d.ts +7 -0
- package/lib/src/generated/api/HostRate.js +2 -0
- package/lib/src/generated/api/HostingInfoResult.d.ts +13 -0
- package/lib/src/generated/api/HostingInfoResult.js +1 -0
- package/lib/src/generated/api/HostingInfoUser.d.ts +9 -0
- package/lib/src/generated/api/HostingInfoUser.js +2 -0
- package/lib/src/generated/api/HostingRequestPaymentResult.d.ts +4 -0
- package/lib/src/generated/api/HostingRequestPaymentResult.js +2 -0
- package/lib/src/generated/api/HostingUserInfo.d.ts +6 -0
- package/lib/src/generated/api/HostingUserInfo.js +2 -0
- package/lib/src/generated/api/HostingVersionInfo.d.ts +7 -0
- package/lib/src/generated/api/HostingVersionInfo.js +2 -0
- package/lib/src/generated/api/HostingWalletResult.d.ts +8 -0
- package/lib/src/generated/api/HostingWalletResult.js +1 -0
- package/lib/src/generated/api/IceServer.d.ts +18 -0
- package/lib/src/generated/api/IceServer.js +2 -0
- package/lib/src/generated/api/Icon.d.ts +3 -0
- package/lib/src/generated/api/Icon.js +2 -0
- package/lib/src/generated/api/ImportResult.d.ts +15 -0
- package/lib/src/generated/api/ImportResult.js +1 -0
- package/lib/src/generated/api/ImportStats.d.ts +7 -0
- package/lib/src/generated/api/ImportStats.js +2 -0
- package/lib/src/generated/api/InteractionCall.d.ts +4 -0
- package/lib/src/generated/api/InteractionCall.js +2 -0
- package/lib/src/generated/api/InteractionCallWrapper.d.ts +6 -0
- package/lib/src/generated/api/InteractionCallWrapper.js +2 -0
- package/lib/src/generated/api/InteractionMeta.d.ts +6 -0
- package/lib/src/generated/api/InteractionMeta.js +1 -0
- package/lib/src/generated/api/InteractionParameter.d.ts +4 -0
- package/lib/src/generated/api/InteractionParameter.js +2 -0
- package/lib/src/generated/api/LanguageAddressParams.d.ts +3 -0
- package/lib/src/generated/api/LanguageAddressParams.js +2 -0
- package/lib/src/generated/api/LanguageHandle.d.ts +9 -0
- package/lib/src/generated/api/LanguageHandle.js +1 -0
- package/lib/src/generated/api/LanguageListParams.d.ts +3 -0
- package/lib/src/generated/api/LanguageListParams.js +2 -0
- package/lib/src/generated/api/LanguageMeta.d.ts +11 -0
- package/lib/src/generated/api/LanguageMeta.js +2 -0
- package/lib/src/generated/api/LanguageMetaInput.d.ts +2 -2
- package/lib/src/generated/api/LanguageRef.d.ts +4 -0
- package/lib/src/generated/api/LanguageRef.js +2 -0
- package/lib/src/generated/api/LanguageSettingsWrapper.d.ts +6 -0
- package/lib/src/generated/api/LanguageSettingsWrapper.js +2 -0
- package/lib/src/generated/api/LanguageWriteSettingsParams.d.ts +4 -0
- package/lib/src/generated/api/LanguageWriteSettingsParams.js +2 -0
- package/lib/src/generated/api/LinkExpressionInput.d.ts +1 -1
- package/lib/src/generated/api/LinkInput.d.ts +1 -1
- package/lib/src/generated/api/LinkMutationRequest.d.ts +12 -0
- package/lib/src/generated/api/LinkMutationRequest.js +1 -0
- package/lib/src/generated/api/LinkMutationsRequest.d.ts +5 -0
- package/lib/src/generated/api/LinkMutationsRequest.js +1 -0
- package/lib/src/generated/api/LinkStatus.d.ts +1 -1
- package/lib/src/generated/api/LinkUpdateInput.d.ts +5 -0
- package/lib/src/generated/api/LinkUpdateInput.js +1 -0
- package/lib/src/generated/api/LocalModel.d.ts +7 -0
- package/lib/src/generated/api/LocalModel.js +1 -0
- package/lib/src/generated/api/LocalModelInput.d.ts +7 -0
- package/lib/src/generated/api/LocalModelInput.js +1 -0
- package/lib/src/generated/api/MessageReceivedEvent.d.ts +7 -0
- package/lib/src/generated/api/MessageReceivedEvent.js +1 -0
- package/lib/src/generated/api/Model.d.ts +10 -0
- package/lib/src/generated/api/Model.js +1 -0
- package/lib/src/generated/api/ModelApi.d.ts +17 -0
- package/lib/src/generated/api/ModelApi.js +1 -0
- package/lib/src/generated/api/ModelApiInput.d.ts +11 -0
- package/lib/src/generated/api/ModelApiInput.js +2 -0
- package/lib/src/generated/api/ModelApiType.d.ts +1 -0
- package/lib/src/generated/api/ModelApiType.js +2 -0
- package/lib/src/generated/api/ModelInput.d.ts +9 -0
- package/lib/src/generated/api/ModelInput.js +1 -0
- package/lib/src/generated/api/ModelType.d.ts +1 -1
- package/lib/src/generated/api/Neighbourhood.d.ts +5 -0
- package/lib/src/generated/api/Neighbourhood.js +1 -0
- package/lib/src/generated/api/NeighbourhoodBroadcastParams.d.ts +7 -0
- package/lib/src/generated/api/NeighbourhoodBroadcastParams.js +1 -0
- package/lib/src/generated/api/NeighbourhoodOnlineStatusParams.d.ts +6 -0
- package/lib/src/generated/api/NeighbourhoodOnlineStatusParams.js +1 -0
- package/lib/src/generated/api/NeighbourhoodPerspectivePayload.d.ts +7 -0
- package/lib/src/generated/api/NeighbourhoodPerspectivePayload.js +1 -0
- package/lib/src/generated/api/NeighbourhoodPhase.d.ts +6 -0
- package/lib/src/generated/api/NeighbourhoodPhase.js +2 -0
- package/lib/src/generated/api/NeighbourhoodSignalFilter.d.ts +8 -0
- package/lib/src/generated/api/NeighbourhoodSignalFilter.js +1 -0
- package/lib/src/generated/api/NeighbourhoodSignalParams.d.ts +7 -0
- package/lib/src/generated/api/NeighbourhoodSignalParams.js +1 -0
- package/lib/src/generated/api/NeighbourhoodSignedPerspective.d.ts +8 -0
- package/lib/src/generated/api/NeighbourhoodSignedPerspective.js +1 -0
- package/lib/src/generated/api/NeighbourhoodUuidParams.d.ts +3 -0
- package/lib/src/generated/api/NeighbourhoodUuidParams.js +2 -0
- package/lib/src/generated/api/Notification.d.ts +16 -0
- package/lib/src/generated/api/Notification.js +2 -0
- package/lib/src/generated/api/NotificationGrantRequest.d.ts +6 -0
- package/lib/src/generated/api/NotificationGrantRequest.js +2 -0
- package/lib/src/generated/api/NotificationInput.d.ts +1 -1
- package/lib/src/generated/api/NotificationTriggeredEvent.d.ts +9 -0
- package/lib/src/generated/api/NotificationTriggeredEvent.js +1 -0
- package/lib/src/generated/api/OnlineAgent.d.ts +9 -0
- package/lib/src/generated/api/OnlineAgent.js +1 -0
- package/lib/src/generated/api/OutputRef.d.ts +12 -0
- package/lib/src/generated/api/OutputRef.js +2 -0
- package/lib/src/generated/api/OverlayView.d.ts +24 -0
- package/lib/src/generated/api/OverlayView.js +1 -0
- package/lib/src/generated/api/Perspective.d.ts +4 -0
- package/lib/src/generated/api/Perspective.js +1 -0
- package/lib/src/generated/api/PerspectiveAddAutoProcessorParams.d.ts +26 -0
- package/lib/src/generated/api/PerspectiveAddAutoProcessorParams.js +2 -0
- package/lib/src/generated/api/PerspectiveAddLinkExpressionParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveAddLinkExpressionParams.js +1 -0
- package/lib/src/generated/api/PerspectiveAddLinkParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveAddLinkParams.js +1 -0
- package/lib/src/generated/api/PerspectiveAddLinksParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveAddLinksParams.js +1 -0
- package/lib/src/generated/api/PerspectiveAddSdnaParams.d.ts +14 -0
- package/lib/src/generated/api/PerspectiveAddSdnaParams.js +1 -0
- package/lib/src/generated/api/PerspectiveAddSdnaResult.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveAddSdnaResult.js +2 -0
- package/lib/src/generated/api/PerspectiveCommitBatchParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveCommitBatchParams.js +2 -0
- package/lib/src/generated/api/PerspectiveCreateSubjectParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveCreateSubjectParams.js +2 -0
- package/lib/src/generated/api/PerspectiveDiscardBatchParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveDiscardBatchParams.js +2 -0
- package/lib/src/generated/api/PerspectiveEvaluateGettersParams.d.ts +9 -0
- package/lib/src/generated/api/PerspectiveEvaluateGettersParams.js +2 -0
- package/lib/src/generated/api/PerspectiveExecuteCommandsParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveExecuteCommandsParams.js +2 -0
- package/lib/src/generated/api/PerspectiveExpression.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveExpression.js +1 -0
- package/lib/src/generated/api/PerspectiveFlowFiredParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveFlowFiredParams.js +2 -0
- package/lib/src/generated/api/PerspectiveFlowProposalParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveFlowProposalParams.js +2 -0
- package/lib/src/generated/api/PerspectiveFlowReceiptVerdict.d.ts +12 -0
- package/lib/src/generated/api/PerspectiveFlowReceiptVerdict.js +1 -0
- package/lib/src/generated/api/PerspectiveFlowStatesParams.d.ts +11 -0
- package/lib/src/generated/api/PerspectiveFlowStatesParams.js +2 -0
- package/lib/src/generated/api/PerspectiveFlowValidOutputsParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveFlowValidOutputsParams.js +2 -0
- package/lib/src/generated/api/PerspectiveGetAllShaclParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveGetAllShaclParams.js +2 -0
- package/lib/src/generated/api/PerspectiveGetSubjectDataParams.d.ts +5 -0
- package/lib/src/generated/api/PerspectiveGetSubjectDataParams.js +2 -0
- package/lib/src/generated/api/PerspectiveHandle.d.ts +10 -0
- package/lib/src/generated/api/PerspectiveHandle.js +1 -0
- package/lib/src/generated/api/PerspectiveLinkDiff.d.ts +9 -0
- package/lib/src/generated/api/PerspectiveLinkDiff.js +1 -0
- package/lib/src/generated/api/PerspectiveLinkMutationsParams.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveLinkMutationsParams.js +1 -0
- package/lib/src/generated/api/PerspectiveLinkUpdatedWithOwner.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveLinkUpdatedWithOwner.js +1 -0
- package/lib/src/generated/api/PerspectiveLinkWithOwner.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveLinkWithOwner.js +1 -0
- package/lib/src/generated/api/PerspectiveMintFlowReceiptParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveMintFlowReceiptParams.js +2 -0
- package/lib/src/generated/api/PerspectiveMintFlowReceiptResult.d.ts +9 -0
- package/lib/src/generated/api/PerspectiveMintFlowReceiptResult.js +1 -0
- package/lib/src/generated/api/PerspectiveModelQueryParams.d.ts +13 -0
- package/lib/src/generated/api/PerspectiveModelQueryParams.js +2 -0
- package/lib/src/generated/api/PerspectiveNamedShacl.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveNamedShacl.js +1 -0
- package/lib/src/generated/api/PerspectiveProposeFlowTransitionParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveProposeFlowTransitionParams.js +1 -0
- package/lib/src/generated/api/PerspectiveQueryLinksParams.d.ts +15 -0
- package/lib/src/generated/api/PerspectiveQueryLinksParams.js +2 -0
- package/lib/src/generated/api/PerspectiveQueryParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveQueryParams.js +2 -0
- package/lib/src/generated/api/PerspectiveReceiptOutcome.d.ts +1 -0
- package/lib/src/generated/api/PerspectiveReceiptOutcome.js +2 -0
- package/lib/src/generated/api/PerspectiveRejectFlowProposalResult.d.ts +3 -0
- package/lib/src/generated/api/PerspectiveRejectFlowProposalResult.js +2 -0
- package/lib/src/generated/api/PerspectiveRemoveAutoProcessorParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveRemoveAutoProcessorParams.js +2 -0
- package/lib/src/generated/api/PerspectiveRemoveLinkParams.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveRemoveLinkParams.js +1 -0
- package/lib/src/generated/api/PerspectiveRemoveLinksParams.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveRemoveLinksParams.js +1 -0
- package/lib/src/generated/api/PerspectiveRemoveSubjectParams.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveRemoveSubjectParams.js +2 -0
- package/lib/src/generated/api/PerspectiveRemovedWithOwner.d.ts +5 -0
- package/lib/src/generated/api/PerspectiveRemovedWithOwner.js +2 -0
- package/lib/src/generated/api/PerspectiveResolveInterpretationParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveResolveInterpretationParams.js +2 -0
- package/lib/src/generated/api/PerspectiveResynced.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveResynced.js +2 -0
- package/lib/src/generated/api/PerspectiveShacl.d.ts +5 -0
- package/lib/src/generated/api/PerspectiveShacl.js +1 -0
- package/lib/src/generated/api/PerspectiveShaclNameParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveShaclNameParams.js +2 -0
- package/lib/src/generated/api/PerspectiveSparqlParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveSparqlParams.js +2 -0
- package/lib/src/generated/api/PerspectiveState.d.ts +1 -0
- package/lib/src/generated/api/PerspectiveState.js +2 -0
- package/lib/src/generated/api/PerspectiveStateFilter.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveStateFilter.js +1 -0
- package/lib/src/generated/api/PerspectiveSubjectClassesOfParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveSubjectClassesOfParams.js +2 -0
- package/lib/src/generated/api/PerspectiveSubscribed.d.ts +10 -0
- package/lib/src/generated/api/PerspectiveSubscribed.js +2 -0
- package/lib/src/generated/api/PerspectiveSubscriptionParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveSubscriptionParams.js +2 -0
- package/lib/src/generated/api/PerspectiveUnsignedInput.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveUnsignedInput.js +1 -0
- package/lib/src/generated/api/PerspectiveUpdateLinkParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveUpdateLinkParams.js +1 -0
- package/lib/src/generated/api/PerspectiveUpdateParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveUpdateParams.js +2 -0
- package/lib/src/generated/api/PerspectiveUpdateSubjectParams.d.ts +10 -0
- package/lib/src/generated/api/PerspectiveUpdateSubjectParams.js +2 -0
- package/lib/src/generated/api/PerspectiveUuidParams.d.ts +3 -0
- package/lib/src/generated/api/PerspectiveUuidParams.js +2 -0
- package/lib/src/generated/api/PerspectiveVerifyFlowReceiptParams.d.ts +9 -0
- package/lib/src/generated/api/PerspectiveVerifyFlowReceiptParams.js +1 -0
- package/lib/src/generated/api/PerspectiveWithOwner.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveWithOwner.js +1 -0
- package/lib/src/generated/api/ProposeOutcome.d.ts +45 -0
- package/lib/src/generated/api/ProposeOutcome.js +1 -0
- package/lib/src/generated/api/PublicPerspectiveInput.d.ts +4 -0
- package/lib/src/generated/api/PublicPerspectiveInput.js +1 -0
- package/lib/src/generated/api/PublishNeighbourhoodRequest.d.ts +2 -2
- package/lib/src/generated/api/QuerySubscriptionUpdate.d.ts +19 -0
- package/lib/src/generated/api/QuerySubscriptionUpdate.js +2 -0
- package/lib/src/generated/api/QuerySubscriptionUpdateEvent.d.ts +7 -0
- package/lib/src/generated/api/QuerySubscriptionUpdateEvent.js +1 -0
- package/lib/src/generated/api/QueryUpdatesLagged.d.ts +7 -0
- package/lib/src/generated/api/QueryUpdatesLagged.js +2 -0
- package/lib/src/generated/api/RemoveLinkRequest.d.ts +1 -1
- package/lib/src/generated/api/RemoveLinksBulkRequest.d.ts +1 -1
- package/lib/src/generated/api/RemoveSubjectRequest.d.ts +9 -0
- package/lib/src/generated/api/RemoveSubjectRequest.js +2 -0
- package/lib/src/generated/api/RequestCapabilityRequest.d.ts +4 -0
- package/lib/src/generated/api/RequestCapabilityRequest.js +1 -0
- package/lib/src/generated/api/RequestPaymentRequest.d.ts +3 -0
- package/lib/src/generated/api/RequestPaymentRequest.js +2 -0
- package/lib/src/generated/api/Resource.d.ts +4 -0
- package/lib/src/generated/api/Resource.js +2 -0
- package/lib/src/generated/api/ResyncSubscriptionRequest.d.ts +3 -0
- package/lib/src/generated/api/ResyncSubscriptionRequest.js +2 -0
- package/lib/src/generated/api/RpcMethods.d.ts +961 -0
- package/lib/src/generated/api/RpcMethods.js +98 -0
- package/lib/src/generated/api/RunInterpretationRequest.d.ts +27 -1
- package/lib/src/generated/api/RunInterpretationWithHarnessRequest.d.ts +52 -0
- package/lib/src/generated/api/RunInterpretationWithHarnessRequest.js +1 -0
- package/lib/src/generated/api/RuntimeComputeLogParams.d.ts +14 -0
- package/lib/src/generated/api/RuntimeComputeLogParams.js +2 -0
- package/lib/src/generated/api/RuntimeFriendStatusParams.d.ts +3 -0
- package/lib/src/generated/api/RuntimeFriendStatusParams.js +2 -0
- package/lib/src/generated/api/RuntimeGrantNotificationParams.d.ts +4 -0
- package/lib/src/generated/api/RuntimeGrantNotificationParams.js +2 -0
- package/lib/src/generated/api/RuntimeImportPerspectiveResult.d.ts +4 -0
- package/lib/src/generated/api/RuntimeImportPerspectiveResult.js +2 -0
- package/lib/src/generated/api/RuntimeImportResult.d.ts +6 -0
- package/lib/src/generated/api/RuntimeImportResult.js +1 -0
- package/lib/src/generated/api/RuntimeInfo.d.ts +5 -0
- package/lib/src/generated/api/RuntimeInfo.js +2 -0
- package/lib/src/generated/api/RuntimeNotificationIdParams.d.ts +3 -0
- package/lib/src/generated/api/RuntimeNotificationIdParams.js +2 -0
- package/lib/src/generated/api/RuntimeSendFriendMessageParams.d.ts +8 -0
- package/lib/src/generated/api/RuntimeSendFriendMessageParams.js +1 -0
- package/lib/src/generated/api/RuntimeSetFreeHostingEnabledParams.d.ts +3 -0
- package/lib/src/generated/api/RuntimeSetFreeHostingEnabledParams.js +2 -0
- package/lib/src/generated/api/RuntimeUnytSendHotParams.d.ts +4 -0
- package/lib/src/generated/api/RuntimeUnytSendHotParams.js +2 -0
- package/lib/src/generated/api/RuntimeUnytWalletHistoryParams.d.ts +4 -0
- package/lib/src/generated/api/RuntimeUnytWalletHistoryParams.js +2 -0
- package/lib/src/generated/api/RuntimeUpdateNotificationParams.d.ts +11 -0
- package/lib/src/generated/api/RuntimeUpdateNotificationParams.js +2 -0
- package/lib/src/generated/api/SentMessage.d.ts +5 -0
- package/lib/src/generated/api/SentMessage.js +1 -0
- package/lib/src/generated/api/SetHostRatesRequest.d.ts +4 -0
- package/lib/src/generated/api/SetHostRatesRequest.js +1 -0
- package/lib/src/generated/api/SetHotWalletAddressRequest.d.ts +3 -0
- package/lib/src/generated/api/SetHotWalletAddressRequest.js +2 -0
- package/lib/src/generated/api/SetOnlineStatusRequest.d.ts +4 -0
- package/lib/src/generated/api/SetOnlineStatusRequest.js +2 -0
- package/lib/src/generated/api/SetUnytMembraneProofRequest.d.ts +6 -0
- package/lib/src/generated/api/SetUnytMembraneProofRequest.js +2 -0
- package/lib/src/generated/api/SetUserFreeAccessRequest.d.ts +4 -0
- package/lib/src/generated/api/SetUserFreeAccessRequest.js +2 -0
- package/lib/src/generated/api/SfuAddIceCandidateParams.d.ts +8 -0
- package/lib/src/generated/api/SfuAddIceCandidateParams.js +2 -0
- package/lib/src/generated/api/SfuAnswerServerOfferParams.d.ts +8 -0
- package/lib/src/generated/api/SfuAnswerServerOfferParams.js +2 -0
- package/lib/src/generated/api/SfuCallJoinParams.d.ts +14 -0
- package/lib/src/generated/api/SfuCallJoinParams.js +2 -0
- package/lib/src/generated/api/SfuCallRenegotiationOffer.d.ts +30 -0
- package/lib/src/generated/api/SfuCallRenegotiationOffer.js +1 -0
- package/lib/src/generated/api/SfuCascadePipe.d.ts +4 -0
- package/lib/src/generated/api/SfuCascadePipe.js +2 -0
- package/lib/src/generated/api/SfuCascadeStatus.d.ts +8 -0
- package/lib/src/generated/api/SfuCascadeStatus.js +1 -0
- package/lib/src/generated/api/SfuConfig.d.ts +52 -0
- package/lib/src/generated/api/SfuConfig.js +1 -0
- package/lib/src/generated/api/SfuDataMessage.d.ts +24 -0
- package/lib/src/generated/api/SfuDataMessage.js +2 -0
- package/lib/src/generated/api/SfuEnsureMembershipParams.d.ts +4 -0
- package/lib/src/generated/api/SfuEnsureMembershipParams.js +2 -0
- package/lib/src/generated/api/SfuMigrateEvent.d.ts +21 -0
- package/lib/src/generated/api/SfuMigrateEvent.js +2 -0
- package/lib/src/generated/api/SfuNeighbourhoodParams.d.ts +3 -0
- package/lib/src/generated/api/SfuNeighbourhoodParams.js +2 -0
- package/lib/src/generated/api/SfuParticipantQualityPreference.d.ts +7 -0
- package/lib/src/generated/api/SfuParticipantQualityPreference.js +2 -0
- package/lib/src/generated/api/SfuPerspectiveParams.d.ts +6 -0
- package/lib/src/generated/api/SfuPerspectiveParams.js +2 -0
- package/lib/src/generated/api/SfuQualityPreferenceParams.d.ts +8 -0
- package/lib/src/generated/api/SfuQualityPreferenceParams.js +2 -0
- package/lib/src/generated/api/SfuRoomInfo.d.ts +11 -0
- package/lib/src/generated/api/SfuRoomInfo.js +1 -0
- package/lib/src/generated/api/SfuRoomParams.d.ts +4 -0
- package/lib/src/generated/api/SfuRoomParams.js +2 -0
- package/lib/src/generated/api/SfuRoomParticipantInfo.d.ts +11 -0
- package/lib/src/generated/api/SfuRoomParticipantInfo.js +2 -0
- package/lib/src/generated/api/SfuRoomRoster.d.ts +13 -0
- package/lib/src/generated/api/SfuRoomRoster.js +2 -0
- package/lib/src/generated/api/SfuSendDataParams.d.ts +10 -0
- package/lib/src/generated/api/SfuSendDataParams.js +2 -0
- package/lib/src/generated/api/SfuSetConfigParams.d.ts +5 -0
- package/lib/src/generated/api/SfuSetConfigParams.js +1 -0
- package/lib/src/generated/api/SfuStatus.d.ts +24 -0
- package/lib/src/generated/api/SfuStatus.js +2 -0
- package/lib/src/generated/api/ShaclLinkTriple.d.ts +10 -0
- package/lib/src/generated/api/ShaclLinkTriple.js +2 -0
- package/lib/src/generated/api/SignalRequest.d.ts +5 -0
- package/lib/src/generated/api/SignalRequest.js +2 -0
- package/lib/src/generated/api/SubscribeQueryRequest.d.ts +3 -0
- package/lib/src/generated/api/SubscribeQueryRequest.js +2 -0
- package/lib/src/generated/api/TokenizerSource.d.ts +5 -0
- package/lib/src/generated/api/TokenizerSource.js +2 -0
- package/lib/src/generated/api/TokenizerSourceInput.d.ts +5 -0
- package/lib/src/generated/api/TokenizerSourceInput.js +2 -0
- package/lib/src/generated/api/TrackMapEntry.d.ts +17 -0
- package/lib/src/generated/api/TrackMapEntry.js +2 -0
- package/lib/src/generated/api/TranscriptionTextFilter.d.ts +5 -0
- package/lib/src/generated/api/TranscriptionTextFilter.js +2 -0
- package/lib/src/generated/api/TriggeredNotification.d.ts +6 -0
- package/lib/src/generated/api/TriggeredNotification.js +1 -0
- package/lib/src/generated/api/TrustedAgentsWrapper.d.ts +6 -0
- package/lib/src/generated/api/TrustedAgentsWrapper.js +2 -0
- package/lib/src/generated/api/UnlockAgentRequest.d.ts +1 -1
- package/lib/src/generated/api/UnytVersionInfo.d.ts +19 -0
- package/lib/src/generated/api/UnytVersionInfo.js +2 -0
- package/lib/src/generated/api/UpdateLinkRequest.d.ts +1 -1
- package/lib/src/generated/api/UpdateProfileRequest.d.ts +5 -0
- package/lib/src/generated/api/UpdateProfileRequest.js +1 -0
- package/lib/src/generated/api/UpdateSubjectRequest.d.ts +12 -0
- package/lib/src/generated/api/UpdateSubjectRequest.js +2 -0
- package/lib/src/generated/api/UserCreationResult.d.ts +5 -0
- package/lib/src/generated/api/UserCreationResult.js +2 -0
- package/lib/src/generated/api/UserStatistics.d.ts +2 -1
- package/lib/src/generated/api/UserStatistics.js +0 -1
- package/lib/src/generated/api/UsersAppInfo.d.ts +6 -0
- package/lib/src/generated/api/UsersAppInfo.js +2 -0
- package/lib/src/generated/api/UsersEmailParams.d.ts +3 -0
- package/lib/src/generated/api/UsersEmailParams.js +2 -0
- package/lib/src/generated/api/UsersEmailTestAction.d.ts +1 -0
- package/lib/src/generated/api/UsersEmailTestAction.js +2 -0
- package/lib/src/generated/api/UsersEmailTestParams.d.ts +14 -0
- package/lib/src/generated/api/UsersEmailTestParams.js +1 -0
- package/lib/src/generated/api/UsersEmailTestResult.d.ts +5 -0
- package/lib/src/generated/api/UsersEmailTestResult.js +2 -0
- package/lib/src/generated/api/UsersLoginParams.d.ts +8 -0
- package/lib/src/generated/api/UsersLoginParams.js +2 -0
- package/lib/src/generated/api/UsersRequestVerificationParams.d.ts +5 -0
- package/lib/src/generated/api/UsersRequestVerificationParams.js +1 -0
- package/lib/src/generated/api/UsersSetCreditsParams.d.ts +4 -0
- package/lib/src/generated/api/UsersSetCreditsParams.js +2 -0
- package/lib/src/generated/api/UsersVerifyEmailParams.d.ts +12 -0
- package/lib/src/generated/api/UsersVerifyEmailParams.js +2 -0
- package/lib/src/generated/api/ValidOutput.d.ts +29 -0
- package/lib/src/generated/api/ValidOutput.js +1 -0
- package/lib/src/generated/api/VoiceActivityParamsInput.d.ts +7 -0
- package/lib/src/generated/api/VoiceActivityParamsInput.js +2 -0
- package/lib/src/generated/api/index.d.ts +11 -0
- package/lib/src/generated/api/index.js +5 -3
- package/lib/src/generated/api/serde_json/JsonValue.d.ts +3 -0
- package/lib/src/generated/api/serde_json/JsonValue.js +2 -0
- package/lib/src/index.d.ts +9 -3
- package/lib/src/index.js +5 -3
- package/lib/src/language/LanguageClient.d.ts +3 -3
- package/lib/src/language/LanguageClient.js +6 -6
- package/lib/src/language/LanguageMeta.d.ts +1 -1
- package/lib/src/links/Links.d.ts +16 -5
- package/lib/src/links/Links.js +34 -0
- package/lib/src/model/Ad4mModel.d.ts +84 -0
- package/lib/src/model/Ad4mModel.js +365 -72
- package/lib/src/model/ModelQueryBuilder.d.ts +15 -13
- package/lib/src/model/ModelQueryBuilder.js +78 -221
- package/lib/src/model/decorators.d.ts +52 -2
- package/lib/src/model/decorators.js +83 -8
- package/lib/src/model/query-sparql.js +2 -3
- package/lib/src/model/shacl-gen.d.ts +3 -1
- package/lib/src/model/shacl-gen.js +40 -10
- package/lib/src/model/types.d.ts +19 -0
- package/lib/src/neighbourhood/MeshManager.d.ts +384 -0
- package/lib/src/neighbourhood/MeshManager.js +1144 -0
- package/lib/src/neighbourhood/Neighbourhood.d.ts +1 -1
- package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +96 -5
- package/lib/src/neighbourhood/NeighbourhoodClient.js +211 -15
- package/lib/src/neighbourhood/NeighbourhoodProxy.d.ts +55 -1
- package/lib/src/neighbourhood/NeighbourhoodProxy.js +170 -3
- package/lib/src/neighbourhood/Session.d.ts +105 -0
- package/lib/src/neighbourhood/Session.js +412 -0
- package/lib/src/neighbourhood/SfuManager.d.ts +174 -0
- package/lib/src/neighbourhood/SfuManager.js +619 -0
- package/lib/src/neighbourhood/SfuTypes.d.ts +35 -0
- package/lib/src/neighbourhood/SfuTypes.js +8 -0
- package/lib/src/notifyListeners.d.ts +2 -0
- package/lib/src/notifyListeners.js +12 -0
- package/lib/src/perspectives/AutoProcessor.d.ts +12 -80
- package/lib/src/perspectives/FlowInstance.d.ts +73 -26
- package/lib/src/perspectives/FlowInstance.js +96 -31
- package/lib/src/perspectives/FlowModels.d.ts +30 -9
- package/lib/src/perspectives/FlowModels.js +43 -14
- package/lib/src/perspectives/InterpretationModels.d.ts +2 -0
- package/lib/src/perspectives/InterpretationModels.js +6 -0
- package/lib/src/perspectives/LiveQuery.d.ts +49 -0
- package/lib/src/perspectives/LiveQuery.js +169 -0
- package/lib/src/perspectives/Perspective.d.ts +8 -1
- package/lib/src/perspectives/Perspective.js +11 -0
- package/lib/src/perspectives/PerspectiveClient.d.ts +38 -65
- package/lib/src/perspectives/PerspectiveClient.js +87 -257
- package/lib/src/perspectives/PerspectiveDiff.d.ts +1 -1
- package/lib/src/perspectives/PerspectiveHandle.d.ts +15 -8
- package/lib/src/perspectives/PerspectiveHandle.js +25 -9
- package/lib/src/perspectives/PerspectiveProxy.d.ts +102 -228
- package/lib/src/perspectives/PerspectiveProxy.js +247 -673
- package/lib/src/perspectives/TextContent.d.ts +31 -0
- package/lib/src/perspectives/TextContent.js +52 -0
- package/lib/src/perspectives/WakerSubscriptionManager.d.ts +23 -0
- package/lib/src/perspectives/WakerSubscriptionManager.js +58 -21
- package/lib/src/runtime/RuntimeClient.d.ts +15 -27
- package/lib/src/runtime/RuntimeClient.js +57 -113
- package/lib/src/runtime/RuntimeTypes.d.ts +2 -2
- package/lib/src/runtime/RuntimeTypes.js +2 -2
- package/lib/src/shacl/SHACLFlow.d.ts +34 -6
- package/lib/src/shacl/SHACLFlow.js +62 -15
- package/lib/src/shacl/SHACLShape.d.ts +12 -0
- package/lib/src/shacl/SHACLShape.js +206 -321
- package/package.json +15 -16
- package/pnpm-workspace.yaml +4 -1
- package/src/Ad4mClient.test.ts +481 -144
- package/src/Ad4mClient.ts +16 -12
- package/src/Literal.test.ts +32 -0
- package/src/Literal.ts +3 -3
- package/src/agent/Agent.ts +8 -0
- package/src/agent/AgentClient.ts +87 -195
- package/src/agent/mutatePublicPerspective.test.ts +110 -0
- package/src/ai/AIClient.ts +40 -43
- package/src/ai/transcription-stream.test.ts +54 -0
- package/src/apiClient.test.ts +613 -185
- package/src/apiClient.ts +282 -288
- package/src/cache/cache.test.ts +7 -8
- package/src/expression/Expression.ts +12 -3
- package/src/expression/ExpressionClient.ts +6 -7
- package/src/generated/api/AIPromptExamples.ts +3 -0
- package/src/generated/api/AIPromptExamplesInput.ts +3 -0
- package/src/generated/api/AITask.ts +4 -0
- package/src/generated/api/AITaskInput.ts +4 -0
- package/src/generated/api/AddAgentInfosRequest.ts +3 -0
- package/src/generated/api/AddLinkExpressionRequest.ts +1 -1
- package/src/generated/api/AddLinkRequest.ts +1 -1
- package/src/generated/api/AddLinksBulkRequest.ts +1 -1
- package/src/generated/api/AddSdnaRequest.ts +1 -1
- package/src/generated/api/Agent.ts +4 -0
- package/src/generated/api/AgentAddEntanglementProofsParams.ts +8 -0
- package/src/generated/api/AgentByDidParams.ts +3 -0
- package/src/generated/api/AgentRemoveAppParams.ts +3 -0
- package/src/generated/api/AgentRevokeTokenParams.ts +3 -0
- package/src/generated/api/AgentSignature.ts +3 -0
- package/src/generated/api/AgentStatus.ts +4 -0
- package/src/generated/api/AgentStatusChangedEvent.ts +7 -0
- package/src/generated/api/AgentUpdatedEvent.ts +7 -0
- package/src/generated/api/AgentsByDidsRequest.ts +3 -0
- package/src/generated/api/AiAddModelParams.ts +4 -0
- package/src/generated/api/AiAddTaskParams.ts +4 -0
- package/src/generated/api/AiDiscoverModelsParams.ts +7 -0
- package/src/generated/api/AiGetDefaultModelParams.ts +4 -0
- package/src/generated/api/AiIdParams.ts +3 -0
- package/src/generated/api/AiModelLoadingStatusParams.ts +6 -0
- package/src/generated/api/AiSetDefaultModelParams.ts +4 -0
- package/src/generated/api/AiTranscriptionCloseParams.ts +3 -0
- package/src/generated/api/AiTranscriptionOpenParams.ts +4 -0
- package/src/generated/api/AiUpdateModelParams.ts +4 -0
- package/src/generated/api/AiUpdateTaskParams.ts +4 -0
- package/src/generated/api/Apps.ts +4 -0
- package/src/generated/api/AuthInfo.ts +4 -0
- package/src/generated/api/AuthInfoInput.ts +1 -1
- package/src/generated/api/AutoProcessorEvent.ts +90 -0
- package/src/generated/api/AutoProcessorNeighbourhoodState.ts +33 -0
- package/src/generated/api/AutoProcessorStep.ts +9 -0
- package/src/generated/api/BroadcastRequest.ts +3 -0
- package/src/generated/api/CallSessionInfo.ts +20 -0
- package/src/generated/api/Capability.ts +4 -0
- package/src/generated/api/CreateSubjectRequest.ts +1 -1
- package/src/generated/api/CreateUserRequest.ts +3 -0
- package/src/generated/api/DateTime.ts +3 -0
- package/src/generated/api/DecoratedExpressionProof.ts +3 -0
- package/src/generated/api/DecoratedLinkExpression.ts +6 -0
- package/src/generated/api/DecoratedNeighbourhoodExpression.ts +5 -0
- package/src/generated/api/DecoratedPerspective.ts +4 -0
- package/src/generated/api/DiscardBatchRequest.ts +3 -0
- package/src/generated/api/DisposeQueryRequest.ts +3 -0
- package/src/generated/api/EntanglementProof.ts +3 -0
- package/src/generated/api/EntanglementProofInput.ts +1 -1
- package/src/generated/api/EntanglementProofPreflightRequest.ts +3 -0
- package/src/generated/api/EntanglementProofsWrapper.ts +7 -0
- package/src/generated/api/Events.ts +77 -0
- package/src/generated/api/ExceptionInfo.ts +4 -0
- package/src/generated/api/ExceptionOccurredEvent.ts +7 -0
- package/src/generated/api/ExceptionType.ts +3 -0
- package/src/generated/api/ExecuteCommandsRequest.ts +1 -1
- package/src/generated/api/ExportRequest.ts +1 -1
- package/src/generated/api/ExpressionInteractRequest.ts +4 -0
- package/src/generated/api/ExpressionProofInput.ts +1 -1
- package/src/generated/api/ExpressionRendered.ts +6 -0
- package/src/generated/api/ExpressionUrlRequest.ts +3 -0
- package/src/generated/api/FireOutcome.ts +11 -0
- package/src/generated/api/FlowStateChangedEvent.ts +36 -0
- package/src/generated/api/FlowStateEntry.ts +18 -0
- package/src/generated/api/FriendSendMessageRequest.ts +1 -1
- package/src/generated/api/HostRate.ts +6 -0
- package/src/generated/api/HostingInfoResult.ts +13 -0
- package/src/generated/api/HostingInfoUser.ts +7 -0
- package/src/generated/api/HostingRequestPaymentResult.ts +3 -0
- package/src/generated/api/HostingUserInfo.ts +3 -0
- package/src/generated/api/HostingVersionInfo.ts +7 -0
- package/src/generated/api/HostingWalletResult.ts +8 -0
- package/src/generated/api/IceServer.ts +19 -0
- package/src/generated/api/Icon.ts +3 -0
- package/src/generated/api/ImportResult.ts +4 -0
- package/src/generated/api/ImportStats.ts +3 -0
- package/src/generated/api/InteractionCall.ts +3 -0
- package/src/generated/api/InteractionCallWrapper.ts +6 -0
- package/src/generated/api/InteractionMeta.ts +4 -0
- package/src/generated/api/InteractionParameter.ts +3 -0
- package/src/generated/api/LanguageAddressParams.ts +3 -0
- package/src/generated/api/LanguageHandle.ts +4 -0
- package/src/generated/api/LanguageListParams.ts +3 -0
- package/src/generated/api/LanguageMeta.ts +3 -0
- package/src/generated/api/LanguageMetaInput.ts +1 -1
- package/src/generated/api/LanguageRef.ts +3 -0
- package/src/generated/api/LanguageSettingsWrapper.ts +6 -0
- package/src/generated/api/LanguageWriteSettingsParams.ts +3 -0
- package/src/generated/api/LinkExpressionInput.ts +1 -1
- package/src/generated/api/LinkInput.ts +1 -1
- package/src/generated/api/LinkMutationRequest.ts +8 -0
- package/src/generated/api/LinkMutationsRequest.ts +4 -0
- package/src/generated/api/LinkStatus.ts +1 -1
- package/src/generated/api/LinkUpdateInput.ts +4 -0
- package/src/generated/api/LocalModel.ts +4 -0
- package/src/generated/api/LocalModelInput.ts +4 -0
- package/src/generated/api/MessageReceivedEvent.ts +7 -0
- package/src/generated/api/Model.ts +6 -0
- package/src/generated/api/ModelApi.ts +14 -0
- package/src/generated/api/ModelApiInput.ts +8 -0
- package/src/generated/api/ModelApiType.ts +3 -0
- package/src/generated/api/ModelInput.ts +6 -0
- package/src/generated/api/ModelType.ts +1 -1
- package/src/generated/api/Neighbourhood.ts +4 -0
- package/src/generated/api/NeighbourhoodBroadcastParams.ts +4 -0
- package/src/generated/api/NeighbourhoodOnlineStatusParams.ts +4 -0
- package/src/generated/api/NeighbourhoodPerspectivePayload.ts +9 -0
- package/src/generated/api/NeighbourhoodPhase.ts +8 -0
- package/src/generated/api/NeighbourhoodSignalFilter.ts +5 -0
- package/src/generated/api/NeighbourhoodSignalParams.ts +4 -0
- package/src/generated/api/NeighbourhoodSignedPerspective.ts +8 -0
- package/src/generated/api/NeighbourhoodUuidParams.ts +3 -0
- package/src/generated/api/Notification.ts +7 -0
- package/src/generated/api/NotificationGrantRequest.ts +6 -0
- package/src/generated/api/NotificationInput.ts +1 -1
- package/src/generated/api/NotificationTriggeredEvent.ts +8 -0
- package/src/generated/api/OnlineAgent.ts +9 -0
- package/src/generated/api/OutputRef.ts +11 -0
- package/src/generated/api/OverlayView.ts +25 -0
- package/src/generated/api/Perspective.ts +4 -0
- package/src/generated/api/PerspectiveAddAutoProcessorParams.ts +11 -0
- package/src/generated/api/PerspectiveAddLinkExpressionParams.ts +4 -0
- package/src/generated/api/PerspectiveAddLinkParams.ts +4 -0
- package/src/generated/api/PerspectiveAddLinksParams.ts +4 -0
- package/src/generated/api/PerspectiveAddSdnaParams.ts +7 -0
- package/src/generated/api/PerspectiveAddSdnaResult.ts +6 -0
- package/src/generated/api/PerspectiveCommitBatchParams.ts +3 -0
- package/src/generated/api/PerspectiveCreateSubjectParams.ts +3 -0
- package/src/generated/api/PerspectiveDiscardBatchParams.ts +3 -0
- package/src/generated/api/PerspectiveEvaluateGettersParams.ts +6 -0
- package/src/generated/api/PerspectiveExecuteCommandsParams.ts +3 -0
- package/src/generated/api/PerspectiveExpression.ts +5 -0
- package/src/generated/api/PerspectiveFlowFiredParams.ts +7 -0
- package/src/generated/api/PerspectiveFlowProposalParams.ts +3 -0
- package/src/generated/api/PerspectiveFlowReceiptVerdict.ts +8 -0
- package/src/generated/api/PerspectiveFlowStatesParams.ts +11 -0
- package/src/generated/api/PerspectiveFlowValidOutputsParams.ts +7 -0
- package/src/generated/api/PerspectiveGetAllShaclParams.ts +6 -0
- package/src/generated/api/PerspectiveGetSubjectDataParams.ts +3 -0
- package/src/generated/api/PerspectiveHandle.ts +5 -0
- package/src/generated/api/PerspectiveLinkDiff.ts +7 -0
- package/src/generated/api/PerspectiveLinkMutationsParams.ts +4 -0
- package/src/generated/api/PerspectiveLinkUpdatedWithOwner.ts +4 -0
- package/src/generated/api/PerspectiveLinkWithOwner.ts +4 -0
- package/src/generated/api/PerspectiveMintFlowReceiptParams.ts +3 -0
- package/src/generated/api/PerspectiveMintFlowReceiptResult.ts +9 -0
- package/src/generated/api/PerspectiveModelQueryParams.ts +10 -0
- package/src/generated/api/PerspectiveNamedShacl.ts +4 -0
- package/src/generated/api/PerspectiveProposeFlowTransitionParams.ts +4 -0
- package/src/generated/api/PerspectiveQueryLinksParams.ts +11 -0
- package/src/generated/api/PerspectiveQueryParams.ts +3 -0
- package/src/generated/api/PerspectiveReceiptOutcome.ts +3 -0
- package/src/generated/api/PerspectiveRejectFlowProposalResult.ts +3 -0
- package/src/generated/api/PerspectiveRemoveAutoProcessorParams.ts +3 -0
- package/src/generated/api/PerspectiveRemoveLinkParams.ts +4 -0
- package/src/generated/api/PerspectiveRemoveLinksParams.ts +4 -0
- package/src/generated/api/PerspectiveRemoveSubjectParams.ts +3 -0
- package/src/generated/api/PerspectiveRemovedWithOwner.ts +3 -0
- package/src/generated/api/PerspectiveResolveInterpretationParams.ts +6 -0
- package/src/generated/api/PerspectiveResynced.ts +7 -0
- package/src/generated/api/PerspectiveShacl.ts +4 -0
- package/src/generated/api/PerspectiveShaclNameParams.ts +3 -0
- package/src/generated/api/PerspectiveSparqlParams.ts +7 -0
- package/src/generated/api/PerspectiveState.ts +3 -0
- package/src/generated/api/PerspectiveStateFilter.ts +5 -0
- package/src/generated/api/PerspectiveSubjectClassesOfParams.ts +3 -0
- package/src/generated/api/PerspectiveSubscribed.ts +8 -0
- package/src/generated/api/PerspectiveSubscriptionParams.ts +3 -0
- package/src/generated/api/PerspectiveUnsignedInput.ts +4 -0
- package/src/generated/api/PerspectiveUpdateLinkParams.ts +5 -0
- package/src/generated/api/PerspectiveUpdateParams.ts +3 -0
- package/src/generated/api/PerspectiveUpdateSubjectParams.ts +7 -0
- package/src/generated/api/PerspectiveUuidParams.ts +3 -0
- package/src/generated/api/PerspectiveVerifyFlowReceiptParams.ts +9 -0
- package/src/generated/api/PerspectiveWithOwner.ts +4 -0
- package/src/generated/api/ProposeOutcome.ts +46 -0
- package/src/generated/api/PublicPerspectiveInput.ts +4 -0
- package/src/generated/api/PublishNeighbourhoodRequest.ts +2 -2
- package/src/generated/api/QuerySubscriptionUpdate.ts +10 -0
- package/src/generated/api/QuerySubscriptionUpdateEvent.ts +9 -0
- package/src/generated/api/QueryUpdatesLagged.ts +7 -0
- package/src/generated/api/RemoveLinkRequest.ts +1 -1
- package/src/generated/api/RemoveLinksBulkRequest.ts +1 -1
- package/src/generated/api/RemoveSubjectRequest.ts +7 -0
- package/src/generated/api/RequestCapabilityRequest.ts +4 -0
- package/src/generated/api/RequestPaymentRequest.ts +3 -0
- package/src/generated/api/Resource.ts +3 -0
- package/src/generated/api/ResyncSubscriptionRequest.ts +3 -0
- package/src/generated/api/RpcMethods.ts +479 -0
- package/src/generated/api/RunInterpretationRequest.ts +28 -2
- package/src/generated/api/RunInterpretationWithHarnessRequest.ts +51 -0
- package/src/generated/api/RuntimeComputeLogParams.ts +15 -0
- package/src/generated/api/RuntimeFriendStatusParams.ts +3 -0
- package/src/generated/api/RuntimeGrantNotificationParams.ts +3 -0
- package/src/generated/api/RuntimeImportPerspectiveResult.ts +3 -0
- package/src/generated/api/RuntimeImportResult.ts +8 -0
- package/src/generated/api/RuntimeInfo.ts +3 -0
- package/src/generated/api/RuntimeNotificationIdParams.ts +3 -0
- package/src/generated/api/RuntimeSendFriendMessageParams.ts +8 -0
- package/src/generated/api/RuntimeSetFreeHostingEnabledParams.ts +3 -0
- package/src/generated/api/RuntimeUnytSendHotParams.ts +3 -0
- package/src/generated/api/RuntimeUnytWalletHistoryParams.ts +3 -0
- package/src/generated/api/RuntimeUpdateNotificationParams.ts +3 -0
- package/src/generated/api/SentMessage.ts +4 -0
- package/src/generated/api/SetHostRatesRequest.ts +4 -0
- package/src/generated/api/SetHotWalletAddressRequest.ts +3 -0
- package/src/generated/api/SetOnlineStatusRequest.ts +3 -0
- package/src/generated/api/SetUnytMembraneProofRequest.ts +7 -0
- package/src/generated/api/SetUserFreeAccessRequest.ts +3 -0
- package/src/generated/api/SfuAddIceCandidateParams.ts +7 -0
- package/src/generated/api/SfuAnswerServerOfferParams.ts +7 -0
- package/src/generated/api/SfuCallJoinParams.ts +13 -0
- package/src/generated/api/SfuCallRenegotiationOffer.ts +29 -0
- package/src/generated/api/SfuCascadePipe.ts +3 -0
- package/src/generated/api/SfuCascadeStatus.ts +7 -0
- package/src/generated/api/SfuConfig.ts +53 -0
- package/src/generated/api/SfuDataMessage.ts +23 -0
- package/src/generated/api/SfuEnsureMembershipParams.ts +3 -0
- package/src/generated/api/SfuMigrateEvent.ts +20 -0
- package/src/generated/api/SfuNeighbourhoodParams.ts +3 -0
- package/src/generated/api/SfuParticipantQualityPreference.ts +6 -0
- package/src/generated/api/SfuPerspectiveParams.ts +6 -0
- package/src/generated/api/SfuQualityPreferenceParams.ts +7 -0
- package/src/generated/api/SfuRoomInfo.ts +7 -0
- package/src/generated/api/SfuRoomParams.ts +3 -0
- package/src/generated/api/SfuRoomParticipantInfo.ts +8 -0
- package/src/generated/api/SfuRoomRoster.ts +12 -0
- package/src/generated/api/SfuSendDataParams.ts +7 -0
- package/src/generated/api/SfuSetConfigParams.ts +4 -0
- package/src/generated/api/SfuStatus.ts +24 -0
- package/src/generated/api/ShaclLinkTriple.ts +8 -0
- package/src/generated/api/SignalRequest.ts +3 -0
- package/src/generated/api/SubscribeQueryRequest.ts +3 -0
- package/src/generated/api/TokenizerSource.ts +3 -0
- package/src/generated/api/TokenizerSourceInput.ts +3 -0
- package/src/generated/api/TrackMapEntry.ts +18 -0
- package/src/generated/api/TranscriptionTextFilter.ts +3 -0
- package/src/generated/api/TriggeredNotification.ts +4 -0
- package/src/generated/api/TrustedAgentsWrapper.ts +6 -0
- package/src/generated/api/UnlockAgentRequest.ts +1 -1
- package/src/generated/api/UnytVersionInfo.ts +20 -0
- package/src/generated/api/UpdateLinkRequest.ts +1 -1
- package/src/generated/api/UpdateProfileRequest.ts +4 -0
- package/src/generated/api/UpdateSubjectRequest.ts +10 -0
- package/src/generated/api/UserCreationResult.ts +3 -0
- package/src/generated/api/UserStatistics.ts +2 -1
- package/src/generated/api/UsersAppInfo.ts +6 -0
- package/src/generated/api/UsersEmailParams.ts +3 -0
- package/src/generated/api/UsersEmailTestAction.ts +3 -0
- package/src/generated/api/UsersEmailTestParams.ts +12 -0
- package/src/generated/api/UsersEmailTestResult.ts +7 -0
- package/src/generated/api/UsersLoginParams.ts +7 -0
- package/src/generated/api/UsersRequestVerificationParams.ts +4 -0
- package/src/generated/api/UsersSetCreditsParams.ts +3 -0
- package/src/generated/api/UsersVerifyEmailParams.ts +11 -0
- package/src/generated/api/ValidOutput.ts +30 -0
- package/src/generated/api/VoiceActivityParamsInput.ts +3 -0
- package/src/generated/api/index.ts +14 -2
- package/src/generated/api/serde_json/JsonValue.ts +3 -0
- package/src/index.ts +9 -3
- package/src/language/LanguageClient.ts +12 -13
- package/src/links/Links.ts +49 -3
- package/src/model/Ad4mModel.test.ts +480 -173
- package/src/model/Ad4mModel.ts +407 -77
- package/src/model/ModelQueryBuilder.ts +95 -255
- package/src/model/abstract-classes.test.ts +225 -0
- package/src/model/decorators.ts +145 -9
- package/src/model/query-sparql.ts +2 -3
- package/src/model/relation-filtering.test.ts +191 -0
- package/src/model/shacl-gen.ts +32 -9
- package/src/model/shacl-roundtrip.test.ts +52 -0
- package/src/model/types.ts +19 -0
- package/src/neighbourhood/MeshManager.test.ts +2640 -0
- package/src/neighbourhood/MeshManager.ts +1350 -0
- package/src/neighbourhood/NeighbourhoodClient.test.ts +60 -0
- package/src/neighbourhood/NeighbourhoodClient.ts +298 -27
- package/src/neighbourhood/NeighbourhoodProxy.test.ts +37 -9
- package/src/neighbourhood/NeighbourhoodProxy.ts +247 -1
- package/src/neighbourhood/Session.test.ts +800 -0
- package/src/neighbourhood/Session.ts +525 -0
- package/src/neighbourhood/SfuManager.test.ts +677 -0
- package/src/neighbourhood/SfuManager.ts +803 -0
- package/src/neighbourhood/SfuTypes.ts +40 -0
- package/src/notifyListeners.test.ts +19 -0
- package/src/notifyListeners.ts +10 -0
- package/src/perspectives/AutoProcessor.ts +13 -82
- package/src/perspectives/FlowInstance.ts +136 -32
- package/src/perspectives/FlowModels.ts +46 -11
- package/src/perspectives/InterpretationModels.ts +4 -0
- package/src/perspectives/LiveQuery.test.ts +197 -0
- package/src/perspectives/LiveQuery.ts +189 -0
- package/src/perspectives/Perspective.ts +18 -2
- package/src/perspectives/PerspectiveClient.test.ts +122 -45
- package/src/perspectives/PerspectiveClient.ts +146 -343
- package/src/perspectives/PerspectiveHandle.ts +32 -9
- package/src/perspectives/PerspectiveProxy.test.ts +216 -528
- package/src/perspectives/PerspectiveProxy.ts +259 -736
- package/src/perspectives/TextContent.test.ts +123 -0
- package/src/perspectives/TextContent.ts +36 -0
- package/src/perspectives/WakerSubscriptionManager.test.ts +136 -1
- package/src/perspectives/WakerSubscriptionManager.ts +69 -22
- package/src/perspectives/link-updated-type.test.ts +55 -0
- package/src/perspectives/listener-leaks.test.ts +204 -0
- package/src/perspectives/shacl-rpc.test.ts +22 -27
- package/src/runtime/RuntimeClient.ts +75 -157
- package/src/runtime/RuntimeTypes.ts +3 -3
- package/src/shacl/SHACLFlow.test.ts +49 -1
- package/src/shacl/SHACLFlow.ts +73 -15
- package/src/shacl/SHACLShape.test.ts +161 -16
- package/src/shacl/SHACLShape.ts +210 -439
- package/lib/shims/reflect-metadata.d.ts +0 -0
- package/lib/shims/reflect-metadata.js +0 -0
- package/lib/shims/type-graphql.d.ts +0 -32
- package/lib/shims/type-graphql.js +0 -70
- package/lib/src/PubSub.d.ts +0 -17
- package/lib/src/PubSub.js +0 -17
- package/lib/src/agent/AgentResolver.d.ts +0 -30
- package/lib/src/agent/AgentResolver.js +0 -325
- package/lib/src/ai/AIResolver.d.ts +0 -75
- package/lib/src/ai/AIResolver.js +0 -455
- package/lib/src/buildSchema.d.ts +0 -1
- package/lib/src/buildSchema.js +0 -38
- package/lib/src/expression/ExpressionResolver.d.ts +0 -10
- package/lib/src/expression/ExpressionResolver.js +0 -106
- package/lib/src/language/LanguageContext.d.ts +0 -37
- package/lib/src/language/LanguageContext.js +0 -2
- package/lib/src/language/LanguageResolver.d.ts +0 -19
- package/lib/src/language/LanguageResolver.js +0 -143
- package/lib/src/links/Links.test.js +0 -33
- package/lib/src/model/Ad4mModel.test.js +0 -2055
- package/lib/src/model/Subject.d.ts +0 -25
- package/lib/src/model/Subject.js +0 -164
- package/lib/src/model/hydration-batch.d.ts +0 -34
- package/lib/src/model/hydration-batch.js +0 -147
- package/lib/src/model/hydration-batching.test.d.ts +0 -7
- package/lib/src/model/hydration-batching.test.js +0 -456
- package/lib/src/model/model-manifest.d.ts +0 -41
- package/lib/src/model/model-manifest.js +0 -11
- package/lib/src/model/prolog-facts.d.ts +0 -37
- package/lib/src/model/prolog-facts.js +0 -134
- package/lib/src/model/query-cache.test.js +0 -43
- package/lib/src/model/query-prolog.d.ts +0 -15
- package/lib/src/model/query-prolog.js +0 -140
- package/lib/src/model/query-sparql-batch.d.ts +0 -17
- package/lib/src/model/query-sparql-batch.js +0 -260
- package/lib/src/model/query-sparql.test.js +0 -312
- package/lib/src/model/relation-filtering.test.js +0 -838
- package/lib/src/model/subscription-delta.test.d.ts +0 -24
- package/lib/src/model/subscription-delta.test.js +0 -180
- package/lib/src/model/subscription-pool.d.ts +0 -39
- package/lib/src/model/subscription-pool.js +0 -165
- package/lib/src/neighbourhood/NeighbourhoodProxy.test.js +0 -73
- package/lib/src/neighbourhood/NeighbourhoodResolver.d.ts +0 -24
- package/lib/src/neighbourhood/NeighbourhoodResolver.js +0 -182
- package/lib/src/perspectives/Perspective.test.js +0 -20
- package/lib/src/perspectives/PerspectiveClient.test.js +0 -224
- package/lib/src/perspectives/PerspectiveResolver.d.ts +0 -56
- package/lib/src/perspectives/PerspectiveResolver.js +0 -519
- package/lib/src/runtime/RuntimeResolver.d.ts +0 -173
- package/lib/src/runtime/RuntimeResolver.js +0 -1122
- package/lib/src/schema.gql +0 -631
- package/lib/src/shacl/SHACLFlow.test.js +0 -205
- package/lib/src/shacl/SHACLShape.test.js +0 -418
- package/lib/src/unwrapApolloResult.d.ts +0 -2
- package/lib/src/unwrapApolloResult.js +0 -14
- /package/lib/src/{links/Links.test.d.ts → generated/api/AITask.js} +0 -0
- /package/lib/src/{model/Ad4mModel.test.d.ts → generated/api/AITaskInput.js} +0 -0
- /package/lib/src/{model/query-cache.test.d.ts → generated/api/Agent.js} +0 -0
- /package/lib/src/{model/query-sparql.test.d.ts → generated/api/AgentAddEntanglementProofsParams.js} +0 -0
- /package/lib/src/{model/relation-filtering.test.d.ts → generated/api/AgentStatus.js} +0 -0
- /package/lib/src/{neighbourhood/NeighbourhoodProxy.test.d.ts → generated/api/AgentStatusChangedEvent.js} +0 -0
- /package/lib/src/{perspectives/Perspective.test.d.ts → generated/api/AgentUpdatedEvent.js} +0 -0
- /package/lib/src/{perspectives/PerspectiveClient.test.d.ts → generated/api/AiAddModelParams.js} +0 -0
- /package/lib/src/{shacl/SHACLFlow.test.d.ts → generated/api/AiAddTaskParams.js} +0 -0
- /package/lib/src/{shacl/SHACLShape.test.d.ts → generated/api/AiGetDefaultModelParams.js} +0 -0
|
@@ -1,73 +1,46 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ApiClient, CallOptions, EventFilter, RpcError } from '../apiClient';
|
|
2
|
+
import type { EventMap, EventName } from '../generated/api/Events';
|
|
2
3
|
import { ExpressionRendered } from "../expression/Expression";
|
|
3
4
|
import { ExpressionClient } from "../expression/ExpressionClient";
|
|
4
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
Link, LinkExpressionInput, LinkExpression, LinkMutations, LinkExpressionMutations,
|
|
7
|
+
linkExpressionInputToWire, linkExpressionToWire, linkMutationsToWire,
|
|
8
|
+
} from "../links/Links";
|
|
5
9
|
import { NeighbourhoodClient } from "../neighbourhood/NeighbourhoodClient";
|
|
6
10
|
import { NeighbourhoodProxy } from "../neighbourhood/NeighbourhoodProxy";
|
|
7
11
|
import { LinkQuery } from "./LinkQuery";
|
|
8
12
|
import { Perspective } from "./Perspective";
|
|
9
|
-
import { PerspectiveHandle
|
|
13
|
+
import { PerspectiveHandle } from "./PerspectiveHandle";
|
|
10
14
|
import { LinkStatus, PerspectiveProxy } from './PerspectiveProxy';
|
|
11
15
|
import { AIClient } from "../ai/AIClient";
|
|
12
|
-
import {
|
|
16
|
+
import type { QueryLagged, QueryUpdate, Subscribed } from "./LiveQuery";
|
|
13
17
|
import type { TranscriptTurn } from "../generated/api";
|
|
14
|
-
import type {
|
|
18
|
+
import type { PerspectiveQueryLinksParams } from "../generated/api/PerspectiveQueryLinksParams";
|
|
19
|
+
import type { JsonValue } from "../generated/api/serde_json/JsonValue";
|
|
20
|
+
import type { AddAutoProcessorConfig, InterpretationOverlayInfo, RawScope, RunInterpretationObserveOptions } from "./AutoProcessor";
|
|
15
21
|
// FlowInstance.ts owns the flow-proposal result types so they sit next to the
|
|
16
22
|
// `proposeTransition()` API they describe. `import type` keeps this out of the
|
|
17
23
|
// runtime module graph (FlowInstance → PerspectiveProxy → PerspectiveClient
|
|
18
24
|
// would otherwise be a cycle).
|
|
19
25
|
import type {
|
|
20
26
|
FlowFireOutcome, FlowMintedReceipt, FlowOutputRef, FlowProposeResult,
|
|
21
|
-
FlowReceiptVerdict, FlowValidOutput,
|
|
27
|
+
FlowReceiptVerdict, FlowStateEntry, FlowValidOutput,
|
|
22
28
|
} from "./FlowInstance";
|
|
23
29
|
|
|
24
|
-
export type PerspectiveHandleCallback = (perspective: PerspectiveHandle) => null
|
|
25
|
-
export type UuidCallback = (uuid: string) => null
|
|
26
|
-
export type LinkCallback = (link: LinkExpression) => null
|
|
27
|
-
export type SyncStateChangeCallback = (state: PerspectiveState) => null
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (typeof finalResult === 'string') {
|
|
33
|
-
try {
|
|
34
|
-
finalResult = JSON.parse(finalResult)
|
|
35
|
-
} catch (e) {
|
|
36
|
-
console.error(errorContext, e)
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return finalResult as AllInstancesResult
|
|
31
|
+
/** The wire form of a model query's classes: `class_name` for one, `class_names` for a union. */
|
|
32
|
+
function classParams(className: string | string[]): { class_name: string } | { class_names: string[] } {
|
|
33
|
+
return Array.isArray(className) ? { class_names: className } : { class_name: className }
|
|
41
34
|
}
|
|
42
35
|
|
|
43
36
|
export class PerspectiveClient {
|
|
44
37
|
#apiClient: ApiClient
|
|
45
|
-
#perspectiveAddedCallbacks: PerspectiveHandleCallback[]
|
|
46
|
-
#perspectiveUpdatedCallbacks: PerspectiveHandleCallback[]
|
|
47
|
-
#perspectiveRemovedCallbacks: UuidCallback[]
|
|
48
|
-
#perspectiveSyncStateChangeCallbacks: SyncStateChangeCallback[]
|
|
49
38
|
#expressionClient?: ExpressionClient
|
|
50
39
|
#neighbourhoodClient?: NeighbourhoodClient
|
|
51
40
|
#aiClient?: AIClient
|
|
52
|
-
#unsubscribers: (() => void)[]
|
|
53
|
-
#linkUnsubscribers: Map<string, (() => void)[]>
|
|
54
|
-
#querySubscriptionUnsubscribers: Map<string, () => void>
|
|
55
41
|
|
|
56
|
-
constructor(baseUrl: string, token?: string,
|
|
42
|
+
constructor(baseUrl: string, token?: string, sharedApiClient?: ApiClient) {
|
|
57
43
|
this.#apiClient = sharedApiClient || new ApiClient(baseUrl, token)
|
|
58
|
-
this.#perspectiveAddedCallbacks = []
|
|
59
|
-
this.#perspectiveUpdatedCallbacks = []
|
|
60
|
-
this.#perspectiveRemovedCallbacks = []
|
|
61
|
-
this.#perspectiveSyncStateChangeCallbacks = []
|
|
62
|
-
this.#unsubscribers = []
|
|
63
|
-
this.#linkUnsubscribers = new Map()
|
|
64
|
-
this.#querySubscriptionUnsubscribers = new Map()
|
|
65
|
-
|
|
66
|
-
if(subscribe) {
|
|
67
|
-
this.subscribePerspectiveAdded()
|
|
68
|
-
this.subscribePerspectiveUpdated()
|
|
69
|
-
this.subscribePerspectiveRemoved()
|
|
70
|
-
}
|
|
71
44
|
}
|
|
72
45
|
|
|
73
46
|
setExpressionClient(client: ExpressionClient) {
|
|
@@ -87,15 +60,15 @@ export class PerspectiveClient {
|
|
|
87
60
|
}
|
|
88
61
|
|
|
89
62
|
async all(): Promise<PerspectiveProxy[]> {
|
|
90
|
-
const perspectives = await this.#apiClient.call
|
|
91
|
-
return perspectives.map(handle => new PerspectiveProxy(handle, this))
|
|
63
|
+
const perspectives = await this.#apiClient.call('perspective.all', {})
|
|
64
|
+
return perspectives.map(handle => new PerspectiveProxy(PerspectiveHandle.fromWire(handle), this))
|
|
92
65
|
}
|
|
93
66
|
|
|
94
67
|
async byUUID(uuid: string): Promise<PerspectiveProxy|null> {
|
|
95
68
|
try {
|
|
96
|
-
const perspective = await this.#apiClient.call
|
|
69
|
+
const perspective = await this.#apiClient.call('perspective.get', { uuid })
|
|
97
70
|
if(!perspective) return null
|
|
98
|
-
return new PerspectiveProxy(perspective, this)
|
|
71
|
+
return new PerspectiveProxy(PerspectiveHandle.fromWire(perspective), this)
|
|
99
72
|
} catch(e) {
|
|
100
73
|
if (e instanceof RpcError && e.status === 404) return null
|
|
101
74
|
throw e
|
|
@@ -103,98 +76,69 @@ export class PerspectiveClient {
|
|
|
103
76
|
}
|
|
104
77
|
|
|
105
78
|
async snapshotByUUID(uuid: string): Promise<Perspective|null> {
|
|
106
|
-
|
|
79
|
+
const snapshot = await this.#apiClient.call('perspective.snapshot', { uuid })
|
|
80
|
+
return snapshot ? new Perspective(snapshot.links.map(LinkExpression.fromWire)) : null
|
|
107
81
|
}
|
|
108
82
|
|
|
109
83
|
async publishSnapshotByUUID(uuid: string): Promise<string|null> {
|
|
110
|
-
return this.#apiClient.call
|
|
84
|
+
return this.#apiClient.call('perspective.publishSnapshot', { uuid })
|
|
111
85
|
}
|
|
112
86
|
|
|
113
87
|
async queryLinks(uuid: string, query: LinkQuery, options?: CallOptions): Promise<LinkExpression[]> {
|
|
114
|
-
const params:
|
|
88
|
+
const params: PerspectiveQueryLinksParams = { uuid }
|
|
115
89
|
if (query.source) params.source = query.source
|
|
116
90
|
if (query.predicate) params.predicate = query.predicate
|
|
117
91
|
if (query.target) params.target = query.target
|
|
118
92
|
if (query.fromDate) params.fromDate = query.fromDate instanceof Date ? query.fromDate.toISOString() : String(query.fromDate)
|
|
119
93
|
if (query.untilDate) params.untilDate = query.untilDate instanceof Date ? query.untilDate.toISOString() : String(query.untilDate)
|
|
120
94
|
if (query.limit !== undefined) params.limit = query.limit
|
|
121
|
-
|
|
95
|
+
const links = await this.#apiClient.call('perspective.queryLinks', params, options)
|
|
96
|
+
return links.map(LinkExpression.fromWire)
|
|
122
97
|
}
|
|
123
98
|
|
|
124
99
|
async queryProlog(uuid: string, query: string, options?: CallOptions): Promise<unknown> {
|
|
125
|
-
const result = await this.#apiClient.call
|
|
100
|
+
const result = await this.#apiClient.call('perspective.queryProlog', { uuid, query }, options)
|
|
126
101
|
return JSON.parse(result)
|
|
127
102
|
}
|
|
128
103
|
|
|
129
104
|
async querySparql<T = any>(uuid: string, query: string, options?: CallOptions): Promise<T> {
|
|
130
|
-
const result = await this.#apiClient.call
|
|
105
|
+
const result = await this.#apiClient.call('perspective.querySparql', { uuid, engine: 'sparql', query }, options)
|
|
131
106
|
return JSON.parse(result) as T
|
|
132
107
|
}
|
|
133
108
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
)
|
|
138
|
-
const { subscriptionId, result } = response
|
|
139
|
-
const parsed = normalizeQueryResult(result, 'Error parsing subscribeQuery result:')
|
|
140
|
-
return { subscriptionId, result: parsed }
|
|
109
|
+
/** Open a live SPARQL query. Updates arrive through {@link onQueryUpdate}. */
|
|
110
|
+
async subscribeQuery(uuid: string, query: string): Promise<Subscribed> {
|
|
111
|
+
return this.#apiClient.call('perspective.subscribeQuery', { uuid, query })
|
|
141
112
|
}
|
|
142
113
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
)
|
|
114
|
+
/** Every `query-subscription-update` event on this client's socket. */
|
|
115
|
+
onQueryUpdate(cb: (update: QueryUpdate | QueryLagged) => void): () => void {
|
|
116
|
+
return this.#apiClient.on('query-subscription-update', cb)
|
|
147
117
|
}
|
|
148
118
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
)
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
subscribeToQueryUpdates(subscriptionId: string, onData: (result: AllInstancesResult) => void): () => void {
|
|
156
|
-
const unsub = this.#apiClient.subscribe(
|
|
157
|
-
(data) => {
|
|
158
|
-
const event = data as Record<string, unknown>
|
|
159
|
-
if (event.type !== 'query-subscription-update') return
|
|
160
|
-
|
|
161
|
-
const eventSubscriptionId = event.subscriptionId || event.subscription_id
|
|
162
|
-
if (eventSubscriptionId !== subscriptionId) return
|
|
163
|
-
|
|
164
|
-
const parsed = normalizeQueryResult(event.result, 'Error parsing query subscription:')
|
|
165
|
-
onData(parsed)
|
|
166
|
-
}
|
|
167
|
-
)
|
|
168
|
-
this.#querySubscriptionUnsubscribers.set(subscriptionId, unsub)
|
|
169
|
-
return unsub
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
async keepAliveQuery(uuid: string, subscriptionId: string): Promise<boolean> {
|
|
173
|
-
return this.#apiClient.call<boolean>(
|
|
174
|
-
'perspective.keepAliveQuery', { uuid, subscriptionId }
|
|
175
|
-
)
|
|
119
|
+
/** The current result and revision of a live query, after a revision gap. */
|
|
120
|
+
async resyncSubscription(uuid: string, subscriptionId: string): Promise<{ revision: number, result: any }> {
|
|
121
|
+
return this.#apiClient.call('perspective.resyncSubscription', { uuid, subscriptionId })
|
|
176
122
|
}
|
|
177
123
|
|
|
124
|
+
/** Ends the subscription on the executor. The caller releases its local listener
|
|
125
|
+
* with the function {@link onQueryUpdate} returned. */
|
|
178
126
|
async disposeQuerySubscription(uuid: string, subscriptionId: string): Promise<boolean> {
|
|
179
|
-
|
|
180
|
-
if (unsub) {
|
|
181
|
-
unsub()
|
|
182
|
-
this.#querySubscriptionUnsubscribers.delete(subscriptionId)
|
|
183
|
-
}
|
|
184
|
-
return this.#apiClient.call<boolean>(
|
|
127
|
+
return this.#apiClient.call(
|
|
185
128
|
'perspective.disposeQuery', { uuid, subscriptionId }
|
|
186
129
|
)
|
|
187
130
|
}
|
|
188
131
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
132
|
+
/** `className` may name several classes: one query over their union (#1238). */
|
|
133
|
+
async modelQuery(uuid: string, className: string | string[], queryJson: string, options?: CallOptions): Promise<any> {
|
|
134
|
+
const resultJson = await this.#apiClient.call(
|
|
135
|
+
'perspective.modelQuery', { uuid, ...classParams(className), query_json: queryJson }, options
|
|
192
136
|
)
|
|
193
137
|
return JSON.parse(resultJson)
|
|
194
138
|
}
|
|
195
139
|
|
|
196
140
|
async subjectClassesOf(uuid: string, uris: string[]): Promise<Record<string, string[]>> {
|
|
197
|
-
return await this.#apiClient.call
|
|
141
|
+
return await this.#apiClient.call(
|
|
198
142
|
'perspective.subjectClassesOf', { uuid, uris }
|
|
199
143
|
)
|
|
200
144
|
}
|
|
@@ -205,7 +149,7 @@ export class PerspectiveClient {
|
|
|
205
149
|
instanceIds: string[],
|
|
206
150
|
propertyNames?: string[],
|
|
207
151
|
): Promise<Record<string, Record<string, any>>> {
|
|
208
|
-
const resultJson = await this.#apiClient.call
|
|
152
|
+
const resultJson = await this.#apiClient.call(
|
|
209
153
|
'perspective.evaluateGetters', {
|
|
210
154
|
uuid,
|
|
211
155
|
class_name: className,
|
|
@@ -216,53 +160,54 @@ export class PerspectiveClient {
|
|
|
216
160
|
return JSON.parse(resultJson)
|
|
217
161
|
}
|
|
218
162
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
163
|
+
/** Open a live model query over one class or several. Updates arrive through {@link onQueryUpdate}. */
|
|
164
|
+
async modelSubscribe(uuid: string, className: string | string[], queryJson: string): Promise<Subscribed> {
|
|
165
|
+
return this.#apiClient.call(
|
|
166
|
+
'perspective.modelSubscribe', { uuid, ...classParams(className), query_json: queryJson }
|
|
222
167
|
)
|
|
223
|
-
return {
|
|
224
|
-
subscriptionId: response.subscription_id,
|
|
225
|
-
result: JSON.parse(response.result)
|
|
226
|
-
}
|
|
227
168
|
}
|
|
228
169
|
|
|
229
170
|
async add(name: string): Promise<PerspectiveProxy> {
|
|
230
|
-
const handle = await this.#apiClient.call
|
|
231
|
-
return new PerspectiveProxy(handle, this)
|
|
171
|
+
const handle = await this.#apiClient.call('perspective.create', { name })
|
|
172
|
+
return new PerspectiveProxy(PerspectiveHandle.fromWire(handle), this)
|
|
232
173
|
}
|
|
233
174
|
|
|
234
175
|
async update(uuid: string, name: string): Promise<PerspectiveProxy> {
|
|
235
|
-
const handle = await this.#apiClient.call
|
|
236
|
-
return new PerspectiveProxy(handle, this)
|
|
176
|
+
const handle = await this.#apiClient.call('perspective.update', { uuid, name })
|
|
177
|
+
return new PerspectiveProxy(PerspectiveHandle.fromWire(handle), this)
|
|
237
178
|
}
|
|
238
179
|
|
|
239
180
|
async remove(uuid: string): Promise<{perspectiveRemove: boolean}> {
|
|
240
|
-
const result = await this.#apiClient.call
|
|
181
|
+
const result = await this.#apiClient.call('perspective.remove', { uuid })
|
|
241
182
|
return { perspectiveRemove: result }
|
|
242
183
|
}
|
|
243
184
|
|
|
244
185
|
async addLink(uuid: string, link: Link, status: LinkStatus = 'shared', batchId?: string): Promise<LinkExpression> {
|
|
245
|
-
|
|
186
|
+
const added = await this.#apiClient.call(
|
|
246
187
|
'perspective.addLink', { uuid, link, status, batchId }
|
|
247
188
|
)
|
|
189
|
+
return LinkExpression.fromWire(added)
|
|
248
190
|
}
|
|
249
191
|
|
|
250
192
|
async addLinks(uuid: string, links: Link[], status: LinkStatus = 'shared', batchId?: string): Promise<LinkExpression[]> {
|
|
251
|
-
|
|
193
|
+
const added = await this.#apiClient.call(
|
|
252
194
|
'perspective.addLinks', { uuid, links, status, batchId }
|
|
253
195
|
)
|
|
196
|
+
return added.map(LinkExpression.fromWire)
|
|
254
197
|
}
|
|
255
198
|
|
|
256
199
|
async removeLinks(uuid: string, links: LinkExpressionInput[], batchId?: string): Promise<LinkExpression[]> {
|
|
257
|
-
|
|
258
|
-
'perspective.removeLinks', { uuid, links, batchId }
|
|
200
|
+
const removed = await this.#apiClient.call(
|
|
201
|
+
'perspective.removeLinks', { uuid, links: links.map(linkExpressionInputToWire), batchId }
|
|
259
202
|
)
|
|
203
|
+
return removed.map(LinkExpression.fromWire)
|
|
260
204
|
}
|
|
261
205
|
|
|
262
206
|
async linkMutations(uuid: string, mutations: LinkMutations, status?: LinkStatus): Promise<LinkExpressionMutations> {
|
|
263
|
-
|
|
264
|
-
'perspective.linkMutations', { uuid, mutations, status }
|
|
207
|
+
const diff = await this.#apiClient.call(
|
|
208
|
+
'perspective.linkMutations', { uuid, mutations: linkMutationsToWire(mutations), status }
|
|
265
209
|
)
|
|
210
|
+
return LinkExpressionMutations.fromWire(diff)
|
|
266
211
|
}
|
|
267
212
|
|
|
268
213
|
/**
|
|
@@ -273,8 +218,7 @@ export class PerspectiveClient {
|
|
|
273
218
|
*
|
|
274
219
|
* The server-side call prompts an LLM (up to `INTERPRETATION_MAX_ATTEMPTS`
|
|
275
220
|
* retries on parse failure), so it can legitimately take minutes on slower
|
|
276
|
-
* or CPU-only models
|
|
277
|
-
* (matches the CI `--timeout 1200000` for the interpretation tests).
|
|
221
|
+
* or CPU-only models, so it defaults to {@link LONG_TIMEOUT_MS}.
|
|
278
222
|
*
|
|
279
223
|
* `existingScope` and `mintScope` match the AutoProcessor semantics:
|
|
280
224
|
* `existingScope` constrains the dedup lookup to instances under a
|
|
@@ -290,22 +234,16 @@ export class PerspectiveClient {
|
|
|
290
234
|
existingScope?: RawScope,
|
|
291
235
|
mintScope?: RawScope,
|
|
292
236
|
observe?: RunInterpretationObserveOptions,
|
|
237
|
+
options?: CallOptions,
|
|
293
238
|
): Promise<string[]> {
|
|
294
|
-
|
|
295
|
-
return this.#apiClient.call<string[]>(
|
|
239
|
+
return this.#apiClient.call(
|
|
296
240
|
'perspective.runInterpretation',
|
|
297
241
|
{
|
|
298
242
|
uuid, transcript, basePrefix, classes, existingScope, mintScope,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
// the extra keys anyway; keeping the wire identical means a bug report
|
|
302
|
-
// from an older node cannot be about these.
|
|
303
|
-
...(observe ? {
|
|
304
|
-
observationId: observe.observationId,
|
|
305
|
-
emitDebugEvents: observe.emitDebugEvents ?? false,
|
|
306
|
-
} : {}),
|
|
243
|
+
observationId: observe?.observationId,
|
|
244
|
+
emitDebugEvents: observe?.emitDebugEvents,
|
|
307
245
|
},
|
|
308
|
-
|
|
246
|
+
options,
|
|
309
247
|
)
|
|
310
248
|
}
|
|
311
249
|
|
|
@@ -320,9 +258,7 @@ export class PerspectiveClient {
|
|
|
320
258
|
* the harness to a no-op final-answer step; use {@link runInterpretation}
|
|
321
259
|
* for the classic single-shot path.
|
|
322
260
|
*
|
|
323
|
-
*
|
|
324
|
-
* that calls several tools can legitimately take longer than one plain
|
|
325
|
-
* generation.
|
|
261
|
+
* Defaults to {@link LONG_TIMEOUT_MS}, like the single-shot path.
|
|
326
262
|
*/
|
|
327
263
|
async runInterpretationWithHarness(
|
|
328
264
|
uuid: string,
|
|
@@ -340,9 +276,9 @@ export class PerspectiveClient {
|
|
|
340
276
|
// (nothing to key against); the server gates on both.
|
|
341
277
|
observationId?: string,
|
|
342
278
|
emitDebugEvents?: boolean,
|
|
279
|
+
options?: CallOptions,
|
|
343
280
|
): Promise<string[]> {
|
|
344
|
-
|
|
345
|
-
return this.#apiClient.call<string[]>(
|
|
281
|
+
return this.#apiClient.call(
|
|
346
282
|
'perspective.runInterpretationWithHarness',
|
|
347
283
|
{
|
|
348
284
|
uuid,
|
|
@@ -355,7 +291,7 @@ export class PerspectiveClient {
|
|
|
355
291
|
observationId,
|
|
356
292
|
emitDebugEvents,
|
|
357
293
|
},
|
|
358
|
-
|
|
294
|
+
options,
|
|
359
295
|
)
|
|
360
296
|
}
|
|
361
297
|
|
|
@@ -364,33 +300,36 @@ export class PerspectiveClient {
|
|
|
364
300
|
* watch loop then runs interpretation automatically over new source items
|
|
365
301
|
* (like Flux per channel), coordinating which peer processes each batch via
|
|
366
302
|
* the shared-graph ProcessingClaim, and emits step signals on the events
|
|
367
|
-
* WebSocket (subscribe
|
|
303
|
+
* WebSocket (subscribe with `on('auto-processor-event', …, { perspective })`).
|
|
368
304
|
* Returns the processor id.
|
|
369
305
|
*/
|
|
370
306
|
async addAutoProcessor(uuid: string, config: AddAutoProcessorConfig): Promise<string> {
|
|
371
|
-
return this.#apiClient.call
|
|
372
|
-
'perspective.addAutoProcessor', {
|
|
307
|
+
return this.#apiClient.call(
|
|
308
|
+
'perspective.addAutoProcessor', { ...config, uuid },
|
|
373
309
|
)
|
|
374
310
|
}
|
|
375
311
|
|
|
376
312
|
/** Delete an auto-processor's config. `false` when there was none to delete. */
|
|
377
313
|
async removeAutoProcessor(uuid: string, processorId: string): Promise<boolean> {
|
|
378
|
-
return this.#apiClient.call
|
|
314
|
+
return this.#apiClient.call(
|
|
379
315
|
'perspective.removeAutoProcessor', { uuid, processorId },
|
|
380
316
|
)
|
|
381
317
|
}
|
|
382
318
|
|
|
383
319
|
/** Pending interpretation overlays (LLM suggestions awaiting human accept/reject). */
|
|
384
320
|
async interpretationOverlays(uuid: string): Promise<InterpretationOverlayInfo[]> {
|
|
385
|
-
|
|
321
|
+
const overlays = await this.#apiClient.call(
|
|
386
322
|
'perspective.interpretationOverlays', { uuid },
|
|
387
323
|
)
|
|
324
|
+
return overlays.map(({ base, kind, run, inferred }) => ({
|
|
325
|
+
base, run, inferred, kind: kind === 'create' ? 'create' : 'update',
|
|
326
|
+
}))
|
|
388
327
|
}
|
|
389
328
|
|
|
390
329
|
/** Accept an overlay's suggestion(s): the LLM value becomes the real value and
|
|
391
330
|
* the overlay is deleted. Omit `property` to accept the whole base. */
|
|
392
331
|
async acceptInterpretation(uuid: string, base: string, property?: string): Promise<boolean> {
|
|
393
|
-
return this.#apiClient.call
|
|
332
|
+
return this.#apiClient.call(
|
|
394
333
|
'perspective.acceptInterpretation', { uuid, base, property },
|
|
395
334
|
)
|
|
396
335
|
}
|
|
@@ -398,7 +337,7 @@ export class PerspectiveClient {
|
|
|
398
337
|
/** Reject an overlay's suggestion(s). Omit `property` to reject the whole base
|
|
399
338
|
* (a rejected `create` deletes the suggested instance). */
|
|
400
339
|
async rejectInterpretation(uuid: string, base: string, property?: string): Promise<boolean> {
|
|
401
|
-
return this.#apiClient.call
|
|
340
|
+
return this.#apiClient.call(
|
|
402
341
|
'perspective.rejectInterpretation', { uuid, base, property },
|
|
403
342
|
)
|
|
404
343
|
}
|
|
@@ -410,13 +349,13 @@ export class PerspectiveClient {
|
|
|
410
349
|
rationale?: string,
|
|
411
350
|
outputs?: FlowOutputRef[],
|
|
412
351
|
): Promise<FlowProposeResult> {
|
|
413
|
-
return this.#apiClient.call
|
|
352
|
+
return this.#apiClient.call(
|
|
414
353
|
'perspective.proposeFlowTransition', { uuid, instanceUri, toState, rationale, outputs },
|
|
415
354
|
)
|
|
416
355
|
}
|
|
417
356
|
|
|
418
357
|
async acceptFlowProposal(uuid: string, proposalUri: string): Promise<FlowFireOutcome[]> {
|
|
419
|
-
return this.#apiClient.call
|
|
358
|
+
return this.#apiClient.call(
|
|
420
359
|
'perspective.acceptFlowProposal', { uuid, proposalUri },
|
|
421
360
|
)
|
|
422
361
|
}
|
|
@@ -427,15 +366,15 @@ export class PerspectiveClient {
|
|
|
427
366
|
* proposal this agent opened.
|
|
428
367
|
*/
|
|
429
368
|
async rejectFlowProposal(uuid: string, proposalUri: string): Promise<number> {
|
|
430
|
-
const result = await this.#apiClient.call
|
|
369
|
+
const result = await this.#apiClient.call(
|
|
431
370
|
'perspective.rejectFlowProposal', { uuid, proposalUri },
|
|
432
371
|
)
|
|
433
372
|
return result.retractedLinks
|
|
434
373
|
}
|
|
435
374
|
|
|
436
375
|
/** Re-decide a flow receipt under this perspective's own flow catalogue. */
|
|
437
|
-
async verifyFlowReceipt(uuid: string, receipt:
|
|
438
|
-
return this.#apiClient.call
|
|
376
|
+
async verifyFlowReceipt(uuid: string, receipt: JsonValue): Promise<FlowReceiptVerdict> {
|
|
377
|
+
return this.#apiClient.call(
|
|
439
378
|
'perspective.verifyFlowReceipt', { uuid, receipt },
|
|
440
379
|
)
|
|
441
380
|
}
|
|
@@ -443,117 +382,98 @@ export class PerspectiveClient {
|
|
|
443
382
|
/** The instances that are, as they stand, valid outputs of `flow`
|
|
444
383
|
* (optionally: of runs settled into terminal state `state`). */
|
|
445
384
|
async flowValidOutputs(uuid: string, flow: string, state?: string): Promise<FlowValidOutput[]> {
|
|
446
|
-
return this.#apiClient.call
|
|
385
|
+
return this.#apiClient.call(
|
|
447
386
|
'perspective.flowValidOutputs', { uuid, flow, state },
|
|
448
387
|
)
|
|
449
388
|
}
|
|
450
389
|
|
|
451
|
-
/**
|
|
452
|
-
*
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
'perspective.mintFlowReceipt', { uuid, instanceUri },
|
|
390
|
+
/** The calling agent's recorded state of each flow instance it has
|
|
391
|
+
* derived, optionally narrowed to `instances`. */
|
|
392
|
+
async flowStates(uuid: string, instances?: string[]): Promise<FlowStateEntry[]> {
|
|
393
|
+
return this.#apiClient.call(
|
|
394
|
+
'perspective.flowStates', { uuid, instances },
|
|
457
395
|
)
|
|
458
396
|
}
|
|
459
397
|
|
|
460
|
-
/**
|
|
461
|
-
*
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
* Registered on the per-uuid `#linkUnsubscribers` map so
|
|
466
|
-
* `PerspectiveProxy.dispose()` → `removeAllListeners(uuid)` cleans the
|
|
467
|
-
* subscription up; using the global `#unsubscribers` array would leak
|
|
468
|
-
* callbacks across repeated view lifecycles (CodeRabbit #881 review).
|
|
469
|
-
*/
|
|
470
|
-
async addAutoProcessorEventListener(uuid: String, cb: (event: AutoProcessorEvent) => void): Promise<void> {
|
|
471
|
-
const unsub = this.#apiClient.subscribe(
|
|
472
|
-
(data) => {
|
|
473
|
-
if (data.type === 'auto-processor-event' && data.perspectiveUuid === uuid) {
|
|
474
|
-
cb(data as unknown as AutoProcessorEvent)
|
|
475
|
-
}
|
|
476
|
-
}
|
|
398
|
+
/** The proposals of `instance` the calling agent's replica recorded as
|
|
399
|
+
* fired, sorted. */
|
|
400
|
+
async flowFired(uuid: string, instance: string): Promise<string[]> {
|
|
401
|
+
return this.#apiClient.call(
|
|
402
|
+
'perspective.flowFired', { uuid, instance },
|
|
477
403
|
)
|
|
478
|
-
let existing = this.#linkUnsubscribers.get(uuid as string) || []
|
|
479
|
-
existing.push(unsub)
|
|
480
|
-
this.#linkUnsubscribers.set(uuid as string, existing)
|
|
481
|
-
await this.#apiClient.waitForSubscription()
|
|
482
404
|
}
|
|
483
405
|
|
|
484
|
-
/**
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
* map so `PerspectiveProxy.dispose()` sweeps it up.
|
|
491
|
-
*/
|
|
492
|
-
async addAutoProcessorNeighbourhoodStateListener(
|
|
493
|
-
uuid: String,
|
|
494
|
-
cb: (event: AutoProcessorNeighbourhoodStateEvent) => void,
|
|
495
|
-
): Promise<void> {
|
|
496
|
-
const unsub = this.#apiClient.subscribe(
|
|
497
|
-
(data) => {
|
|
498
|
-
if (data.type === 'auto-processor-neighbourhood-state' && data.perspectiveUuid === uuid) {
|
|
499
|
-
cb(data as unknown as AutoProcessorNeighbourhoodStateEvent)
|
|
500
|
-
}
|
|
501
|
-
}
|
|
406
|
+
/** Mint and store the receipt for a completed flow run. Fails while the
|
|
407
|
+
* run has not settled into a terminal state, and when an output's
|
|
408
|
+
* content no longer matches what the quorum committed to. */
|
|
409
|
+
async mintFlowReceipt(uuid: string, instanceUri: string): Promise<FlowMintedReceipt> {
|
|
410
|
+
return this.#apiClient.call(
|
|
411
|
+
'perspective.mintFlowReceipt', { uuid, instanceUri },
|
|
502
412
|
)
|
|
503
|
-
let existing = this.#linkUnsubscribers.get(uuid as string) || []
|
|
504
|
-
existing.push(unsub)
|
|
505
|
-
this.#linkUnsubscribers.set(uuid as string, existing)
|
|
506
|
-
await this.#apiClient.waitForSubscription()
|
|
507
413
|
}
|
|
508
414
|
|
|
509
415
|
async addLinkExpression(uuid: string, link: LinkExpression, status: LinkStatus = 'shared', batchId?: string): Promise<LinkExpression> {
|
|
510
|
-
|
|
511
|
-
'perspective.addLinkExpression', { uuid, link, status, batchId }
|
|
416
|
+
const added = await this.#apiClient.call(
|
|
417
|
+
'perspective.addLinkExpression', { uuid, link: linkExpressionToWire(link), status, batchId }
|
|
512
418
|
)
|
|
419
|
+
return LinkExpression.fromWire(added)
|
|
513
420
|
}
|
|
514
421
|
|
|
515
422
|
async updateLink(uuid: string, oldLink: LinkExpressionInput, newLink: Link, batchId?: string): Promise<LinkExpression> {
|
|
516
|
-
|
|
517
|
-
'perspective.updateLink', { uuid, oldLink, newLink, batchId }
|
|
423
|
+
const updated = await this.#apiClient.call(
|
|
424
|
+
'perspective.updateLink', { uuid, oldLink: linkExpressionInputToWire(oldLink), newLink, batchId }
|
|
518
425
|
)
|
|
426
|
+
return LinkExpression.fromWire(updated)
|
|
519
427
|
}
|
|
520
428
|
|
|
521
429
|
async removeLink(uuid: string, link: LinkExpressionInput, batchId?: string): Promise<boolean> {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
delete link.status
|
|
526
|
-
return this.#apiClient.call<boolean>(
|
|
527
|
-
'perspective.removeLink', { uuid, link, batchId }
|
|
430
|
+
const { status, ...wire } = linkExpressionInputToWire(link)
|
|
431
|
+
return this.#apiClient.call(
|
|
432
|
+
'perspective.removeLink', { uuid, link: wire, batchId }
|
|
528
433
|
)
|
|
529
434
|
}
|
|
530
435
|
|
|
531
436
|
async addSdna(uuid: string, name: string, sdnaCode: string | undefined, sdnaType: "subject_class" | "flow" | "custom", shaclJson?: string): Promise<boolean> {
|
|
532
|
-
|
|
437
|
+
const result = await this.#apiClient.call(
|
|
533
438
|
'perspective.addSdna', { uuid, name, sdnaCode: sdnaCode || "", sdnaType, shaclJson }
|
|
534
439
|
)
|
|
440
|
+
return typeof result === 'boolean' ? result : result.every(Boolean)
|
|
535
441
|
}
|
|
536
442
|
|
|
537
443
|
async addSdnaBatch(uuid: string, entries: { name: string; sdnaCode?: string; sdnaType: "subject_class" | "flow" | "custom"; shaclJson?: string }[]): Promise<boolean[]> {
|
|
538
|
-
|
|
444
|
+
const result = await this.#apiClient.call(
|
|
539
445
|
'perspective.addSdna', { uuid, entries: entries.map(e => ({ ...e, sdnaCode: e.sdnaCode || "" })) }
|
|
540
446
|
)
|
|
447
|
+
return typeof result === 'boolean' ? [result] : result
|
|
541
448
|
}
|
|
542
449
|
|
|
543
450
|
async executeCommands(uuid: string, commands: string, expression: string, parameters: string, batchId?: string): Promise<boolean> {
|
|
544
|
-
return this.#apiClient.call
|
|
451
|
+
return this.#apiClient.call(
|
|
545
452
|
'perspective.executeCommands', { uuid, commands, expression, parameters, batchId }
|
|
546
453
|
)
|
|
547
454
|
}
|
|
548
455
|
|
|
549
456
|
async createSubject(uuid: string, subjectClass: string, expressionAddress: string, initialValues?: string, batchId?: string): Promise<boolean> {
|
|
550
|
-
return this.#apiClient.call
|
|
457
|
+
return this.#apiClient.call(
|
|
551
458
|
'perspective.createSubject', { uuid, subjectClass, expressionAddress, initialValues, batchId }
|
|
552
459
|
)
|
|
553
460
|
}
|
|
554
461
|
|
|
462
|
+
/** Through an abstract class (#1435), the executor writes to the record's own classes. */
|
|
463
|
+
async updateSubject(uuid: string, subjectClass: string, expressionAddress: string, values: string, batchId?: string): Promise<boolean> {
|
|
464
|
+
return this.#apiClient.call(
|
|
465
|
+
'perspective.updateSubject', { uuid, subjectClass, expressionAddress, values, batchId }
|
|
466
|
+
)
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
async removeSubject(uuid: string, subjectClass: string, expressionAddress: string, batchId?: string): Promise<boolean> {
|
|
470
|
+
return this.#apiClient.call(
|
|
471
|
+
'perspective.removeSubject', { uuid, subjectClass, expressionAddress, batchId }
|
|
472
|
+
)
|
|
473
|
+
}
|
|
474
|
+
|
|
555
475
|
async getSubjectData(uuid: string, subjectClass: string, expressionAddress: string): Promise<string> {
|
|
556
|
-
return this.#apiClient.call
|
|
476
|
+
return this.#apiClient.call(
|
|
557
477
|
'perspective.getSubjectData', { uuid, subjectClass, expressionAddress }
|
|
558
478
|
)
|
|
559
479
|
}
|
|
@@ -565,7 +485,7 @@ export class PerspectiveClient {
|
|
|
565
485
|
|
|
566
486
|
/** List the names of every SHACL shape stored in a perspective (one RPC call). */
|
|
567
487
|
async getShaclNames(uuid: string): Promise<string[]> {
|
|
568
|
-
return this.#apiClient.call
|
|
488
|
+
return this.#apiClient.call('perspective.getShaclNames', { uuid })
|
|
569
489
|
}
|
|
570
490
|
|
|
571
491
|
/**
|
|
@@ -579,7 +499,7 @@ export class PerspectiveClient {
|
|
|
579
499
|
* than pushing the null one layer further up. PR #935 review r3897752023.
|
|
580
500
|
*/
|
|
581
501
|
async getShaclTargetClass(uuid: string, name: string): Promise<string | undefined> {
|
|
582
|
-
const result = await this.#apiClient.call
|
|
502
|
+
const result = await this.#apiClient.call(
|
|
583
503
|
'perspective.getShaclTargetClass',
|
|
584
504
|
{ uuid, name },
|
|
585
505
|
)
|
|
@@ -592,7 +512,7 @@ export class PerspectiveClient {
|
|
|
592
512
|
* or `null` if no shape with that name exists.
|
|
593
513
|
*/
|
|
594
514
|
async getShacl(uuid: string, name: string): Promise<{ shapeUri: string; links: Array<{source: string; predicate: string; target: string}> } | null> {
|
|
595
|
-
return this.#apiClient.call
|
|
515
|
+
return this.#apiClient.call(
|
|
596
516
|
'perspective.getShacl', { uuid, name }
|
|
597
517
|
)
|
|
598
518
|
}
|
|
@@ -602,12 +522,11 @@ export class PerspectiveClient {
|
|
|
602
522
|
* `{name, shapeUri, links}` — one entry per shape (one RPC call).
|
|
603
523
|
*/
|
|
604
524
|
async getAllShacl(uuid: string): Promise<Array<{ name: string; shapeUri: string; links: Array<{source: string; predicate: string; target: string}> }>> {
|
|
605
|
-
return this.#apiClient.call
|
|
525
|
+
return this.#apiClient.call(
|
|
606
526
|
'perspective.getAllShacl', { uuid }
|
|
607
527
|
)
|
|
608
528
|
}
|
|
609
529
|
|
|
610
|
-
|
|
611
530
|
// ExpressionClient functions, needed for Subjects:
|
|
612
531
|
async getExpression(expressionURI: string): Promise<ExpressionRendered> {
|
|
613
532
|
return await this.#expressionClient!.get(expressionURI)
|
|
@@ -617,126 +536,9 @@ export class PerspectiveClient {
|
|
|
617
536
|
return await this.#expressionClient!.create(content, languageAddress)
|
|
618
537
|
}
|
|
619
538
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
this.#
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
subscribePerspectiveAdded() {
|
|
626
|
-
const unsub = this.#apiClient.subscribe((data) => {
|
|
627
|
-
if (data.type === 'perspective-added') {
|
|
628
|
-
this.#perspectiveAddedCallbacks.forEach(cb => cb(data.perspective as PerspectiveHandle))
|
|
629
|
-
}
|
|
630
|
-
})
|
|
631
|
-
this.#unsubscribers.push(unsub)
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
addPerspectiveUpdatedListener(cb: PerspectiveHandleCallback) {
|
|
635
|
-
this.#perspectiveUpdatedCallbacks.push(cb)
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
subscribePerspectiveUpdated() {
|
|
639
|
-
const unsub = this.#apiClient.subscribe((data) => {
|
|
640
|
-
if (data.type === 'perspective-updated') {
|
|
641
|
-
this.#perspectiveUpdatedCallbacks.forEach(cb => cb(data.perspective as PerspectiveHandle))
|
|
642
|
-
}
|
|
643
|
-
})
|
|
644
|
-
this.#unsubscribers.push(unsub)
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
addPerspectiveSyncedListener(cb: SyncStateChangeCallback) {
|
|
648
|
-
this.#perspectiveSyncStateChangeCallbacks.push(cb)
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
async addPerspectiveSyncStateChangeListener(uuid: String, cb: SyncStateChangeCallback[]): Promise<void> {
|
|
652
|
-
const unsub = this.#apiClient.subscribe(
|
|
653
|
-
(data) => {
|
|
654
|
-
if (data.type === 'sync-state-change' && data.uuid === uuid) {
|
|
655
|
-
cb.forEach(c => c(data.state as PerspectiveState))
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
)
|
|
659
|
-
this.#unsubscribers.push(unsub)
|
|
660
|
-
await new Promise<void>(resolve => setTimeout(resolve, 500))
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
addPerspectiveRemovedListener(cb: UuidCallback) {
|
|
664
|
-
this.#perspectiveRemovedCallbacks.push(cb)
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
subscribePerspectiveRemoved() {
|
|
668
|
-
const unsub = this.#apiClient.subscribe((data) => {
|
|
669
|
-
if (data.type === 'perspective-removed') {
|
|
670
|
-
this.#perspectiveRemovedCallbacks.forEach(cb => cb(data.uuid as string))
|
|
671
|
-
}
|
|
672
|
-
})
|
|
673
|
-
this.#unsubscribers.push(unsub)
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
async addPerspectiveLinkAddedListener(uuid: String, cb: LinkCallback[]): Promise<void> {
|
|
677
|
-
const unsub = this.#apiClient.subscribe(
|
|
678
|
-
(data) => {
|
|
679
|
-
if (data.type === 'link-added' && data.perspectiveUuid === uuid) {
|
|
680
|
-
cb.forEach(c => c(data.link as LinkExpression))
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
)
|
|
684
|
-
let existing = this.#linkUnsubscribers.get(uuid as string) || []
|
|
685
|
-
existing.push(unsub)
|
|
686
|
-
this.#linkUnsubscribers.set(uuid as string, existing)
|
|
687
|
-
await this.#apiClient.waitForSubscription()
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
async addPerspectiveLinkRemovedListener(uuid: String, cb: LinkCallback[]): Promise<void> {
|
|
691
|
-
const unsub = this.#apiClient.subscribe(
|
|
692
|
-
(data) => {
|
|
693
|
-
if (data.type === 'link-removed' && data.perspectiveUuid === uuid) {
|
|
694
|
-
const link = data.link as LinkExpression & { status?: unknown }
|
|
695
|
-
if (!link.status) {
|
|
696
|
-
delete link.status
|
|
697
|
-
}
|
|
698
|
-
cb.forEach(c => c(link))
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
)
|
|
702
|
-
let existing = this.#linkUnsubscribers.get(uuid as string) || []
|
|
703
|
-
existing.push(unsub)
|
|
704
|
-
this.#linkUnsubscribers.set(uuid as string, existing)
|
|
705
|
-
await this.#apiClient.waitForSubscription()
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
async addPerspectiveLinkUpdatedListener(uuid: String, cb: LinkCallback[]): Promise<void> {
|
|
709
|
-
const unsub = this.#apiClient.subscribe(
|
|
710
|
-
(data) => {
|
|
711
|
-
if (data.type === 'link-updated' && data.perspectiveUuid === uuid) {
|
|
712
|
-
const newLink = data.newLink as LinkExpression & { status?: unknown }
|
|
713
|
-
const oldLink = data.oldLink as LinkExpression & { status?: unknown }
|
|
714
|
-
if (!newLink.status) {
|
|
715
|
-
delete newLink.status
|
|
716
|
-
}
|
|
717
|
-
if (!oldLink.status) {
|
|
718
|
-
delete oldLink.status
|
|
719
|
-
}
|
|
720
|
-
cb.forEach(c => c(data as unknown as LinkExpression))
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
)
|
|
724
|
-
let existing = this.#linkUnsubscribers.get(uuid as string) || []
|
|
725
|
-
existing.push(unsub)
|
|
726
|
-
this.#linkUnsubscribers.set(uuid as string, existing)
|
|
727
|
-
await this.#apiClient.waitForSubscription()
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
/** Unsubscribe all link/sync-state listeners registered for the given perspective UUID.
|
|
731
|
-
* Called by PerspectiveProxy.dispose() to prevent subscription leaks. */
|
|
732
|
-
removeAllListeners(uuid: string): void {
|
|
733
|
-
const unsubs = this.#linkUnsubscribers.get(uuid)
|
|
734
|
-
if (unsubs) {
|
|
735
|
-
for (const fn of unsubs) {
|
|
736
|
-
try { fn() } catch {}
|
|
737
|
-
}
|
|
738
|
-
this.#linkUnsubscribers.delete(uuid)
|
|
739
|
-
}
|
|
539
|
+
/** The client's event bus; see {@link ApiClient.on}. */
|
|
540
|
+
on<K extends EventName>(type: K, handler: (event: EventMap[K]) => void, filter?: EventFilter): () => void {
|
|
541
|
+
return this.#apiClient.on(type, handler, filter)
|
|
740
542
|
}
|
|
741
543
|
|
|
742
544
|
getNeighbourhoodProxy(uuid: string): NeighbourhoodProxy {
|
|
@@ -744,13 +546,14 @@ export class PerspectiveClient {
|
|
|
744
546
|
}
|
|
745
547
|
|
|
746
548
|
async createBatch(uuid: string): Promise<string> {
|
|
747
|
-
return this.#apiClient.call
|
|
549
|
+
return this.#apiClient.call('perspective.createBatch', { uuid })
|
|
748
550
|
}
|
|
749
551
|
|
|
750
552
|
async commitBatch(uuid: string, batchId: string): Promise<LinkExpressionMutations> {
|
|
751
|
-
|
|
553
|
+
const diff = await this.#apiClient.call(
|
|
752
554
|
'perspective.commitBatch', { uuid, batchId }
|
|
753
555
|
)
|
|
556
|
+
return LinkExpressionMutations.fromWire(diff)
|
|
754
557
|
}
|
|
755
558
|
|
|
756
559
|
/** Register a callback that fires after a successful WebSocket reconnect.
|