@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
|
@@ -71,65 +71,6 @@ export type RawScope = {
|
|
|
71
71
|
* - `processed` → `bases[]` = new/updated instance URIs
|
|
72
72
|
*/
|
|
73
73
|
export type AutoProcessorStep = "batchReady" | "claimed" | "backedOff" | "awaitingAuthor" | "notCandidate" | "gatheringTranscript" | "runningInterpretation" | "llmRequestSent" | "llmResponseReceived" | "toolCall" | "toolResult" | "processed" | "shapesMissing" | "emptyTranscript" | "failed";
|
|
74
|
-
/** A single step-signal from one auto-processor pass on one perspective. */
|
|
75
|
-
export interface AutoProcessorEvent {
|
|
76
|
-
type: "auto-processor-event";
|
|
77
|
-
perspectiveUuid: string;
|
|
78
|
-
processorId: string;
|
|
79
|
-
/** DID of the agent that ran the pass (which peer claimed/processed/backed off). */
|
|
80
|
-
agentDid?: string;
|
|
81
|
-
step: AutoProcessorStep;
|
|
82
|
-
/** The batch's source item ids (present from `batchReady` onward). */
|
|
83
|
-
itemIds: string[];
|
|
84
|
-
/**
|
|
85
|
-
* Content hash of the batch — the same value
|
|
86
|
-
* {@link AutoProcessorNeighbourhoodStateEvent.batchKey} carries, and the
|
|
87
|
-
* key that joins the two streams.
|
|
88
|
-
*
|
|
89
|
-
* A UI that renders one row per pass subscribes to both: the
|
|
90
|
-
* perspective-scoped neighbourhood stream opens the row (and names the
|
|
91
|
-
* claimant), while this DID-scoped stream fills in the fine-grained
|
|
92
|
-
* steps and LLM I/O for the pass this agent is running. Matching them on
|
|
93
|
-
* `processorId` alone breaks as soon as a processor runs a second pass;
|
|
94
|
-
* matching on `itemIds` means re-implementing the Rust SHA-256 and its
|
|
95
|
-
* exact serialization. So both streams carry the same key.
|
|
96
|
-
*
|
|
97
|
-
* Present from `batchReady` onward. Optional on the type because a
|
|
98
|
-
* pre-#903 executor does not send it — treat its absence as "cannot
|
|
99
|
-
* correlate", not as an error.
|
|
100
|
-
*/
|
|
101
|
-
batchKey?: string;
|
|
102
|
-
/** Instance base URIs written by the pass (present on `processed`). */
|
|
103
|
-
bases: string[];
|
|
104
|
-
/** Free-form context for the step (a holder/elected DID, an error, …). */
|
|
105
|
-
detail?: string;
|
|
106
|
-
/** Raw LLM prompt this pass fed the model. Present ONLY on
|
|
107
|
-
* `llmRequestSent` events, and only when the processor was configured
|
|
108
|
-
* with `emitDebugEvents: true`. Never carried on `processed`. */
|
|
109
|
-
llmInput?: string;
|
|
110
|
-
/** Raw LLM response this pass received. Present ONLY on
|
|
111
|
-
* `llmResponseReceived` events, and only when the processor was
|
|
112
|
-
* configured with `emitDebugEvents: true`. Never carried on `processed`. */
|
|
113
|
-
llmOutput?: string;
|
|
114
|
-
/**
|
|
115
|
-
* Name of the tool the harness LLM invoked (or that just returned).
|
|
116
|
-
* Present on `toolCall` + `toolResult` events (harness path only).
|
|
117
|
-
*/
|
|
118
|
-
toolName?: string;
|
|
119
|
-
/**
|
|
120
|
-
* JSON-encoded arguments the LLM sent to the tool. Present ONLY on
|
|
121
|
-
* `toolCall`; absent on `toolResult` where {@link toolResult} carries
|
|
122
|
-
* the return text instead.
|
|
123
|
-
*/
|
|
124
|
-
toolArgsJson?: string;
|
|
125
|
-
/**
|
|
126
|
-
* The tool's return text. Present ONLY on `toolResult`; may be
|
|
127
|
-
* pre-truncated by the emitter with an `…[truncated for event]`
|
|
128
|
-
* marker when the tool returns a large payload (e.g. a `_query`
|
|
129
|
-
* result). Consumers wanting the full text can re-run the tool.
|
|
130
|
-
*/
|
|
131
|
-
toolResult?: string;
|
|
132
|
-
}
|
|
133
74
|
/**
|
|
134
75
|
* Coarse-grained phase of a neighbourhood-state event.
|
|
135
76
|
*
|
|
@@ -139,27 +80,6 @@ export interface AutoProcessorEvent {
|
|
|
139
80
|
* error); the claim will TTL-expire.
|
|
140
81
|
*/
|
|
141
82
|
export type NeighbourhoodPhase = "claimed" | "finished" | "abandoned";
|
|
142
|
-
/**
|
|
143
|
-
* `auto-processor-neighbourhood-state` — perspective-scoped observability
|
|
144
|
-
* event. Fires when THIS executor claims, finishes, or abandons a batch.
|
|
145
|
-
* Anyone with perspective read access sees it, so a UI can render "someone
|
|
146
|
-
* is auto-processing this" without receiving the batch payload or LLM I/O.
|
|
147
|
-
*
|
|
148
|
-
* Cross-executor visibility (peer's claim reaching us via Holochain sync) is
|
|
149
|
-
* NOT covered here; consumers who need that subscribe to `link-added` and
|
|
150
|
-
* filter for the `has_claim` predicate on the shared perspective.
|
|
151
|
-
*/
|
|
152
|
-
export interface AutoProcessorNeighbourhoodStateEvent {
|
|
153
|
-
type: "auto-processor-neighbourhood-state";
|
|
154
|
-
perspectiveUuid: string;
|
|
155
|
-
processorId: string;
|
|
156
|
-
/** DID that claimed the batch — the pass owner's DID. */
|
|
157
|
-
claimantDid: string;
|
|
158
|
-
/** SHA-256 hex of the batch's item-id set — merge `claimed` + `finished`
|
|
159
|
-
* for the same key to render a single row in a UI. */
|
|
160
|
-
batchKey: string;
|
|
161
|
-
phase: NeighbourhoodPhase;
|
|
162
|
-
}
|
|
163
83
|
/**
|
|
164
84
|
* Opt a one-shot `runInterpretation` call into the same event streams a
|
|
165
85
|
* standing watch produces.
|
|
@@ -266,6 +186,13 @@ export interface AddAutoProcessorConfig {
|
|
|
266
186
|
* see `RawScope`; the Rust watcher rejects `Model` scopes at runtime.
|
|
267
187
|
*/
|
|
268
188
|
mintScope?: RawScope;
|
|
189
|
+
/**
|
|
190
|
+
* Tool-call budget for the interpretation-pass harness this processor
|
|
191
|
+
* runs. Omit / `0` → single-shot LLM path. `N > 0` → engage the
|
|
192
|
+
* tool-calling harness with a cap of N calls per pass. Round-tripped
|
|
193
|
+
* through the SDNA via `AutoProcessorConfig.maxToolCalls`.
|
|
194
|
+
*/
|
|
195
|
+
maxToolCalls?: number;
|
|
269
196
|
/**
|
|
270
197
|
* Enable full debug observability: persists the raw LLM prompt + response
|
|
271
198
|
* on the pass's `InterpretationRun` (`debugPrompt` / `debugResponse`) AND
|
|
@@ -291,3 +218,8 @@ export interface InterpretationOverlayInfo {
|
|
|
291
218
|
/** `[realPredicate, stagedValue]` pairs — the model's proposed values. */
|
|
292
219
|
inferred: [string, any][];
|
|
293
220
|
}
|
|
221
|
+
/** A step signal from one auto-processor pass (`auto-processor-event`). */
|
|
222
|
+
export type { AutoProcessorEvent } from "../generated/api/AutoProcessorEvent";
|
|
223
|
+
/** This executor claimed, finished or abandoned a batch
|
|
224
|
+
* (`auto-processor-neighbourhood-state`). */
|
|
225
|
+
export type { AutoProcessorNeighbourhoodState as AutoProcessorNeighbourhoodStateEvent } from "../generated/api/AutoProcessorNeighbourhoodState";
|
|
@@ -6,12 +6,18 @@
|
|
|
6
6
|
* Wraps two on-graph objects:
|
|
7
7
|
*
|
|
8
8
|
* - `FlowInstanceRecord` — the raw @Model row minted by
|
|
9
|
-
* {@link FlowInstance.start}; carries `
|
|
10
|
-
*
|
|
9
|
+
* {@link FlowInstance.start}; carries `flowUri`, `subject` and
|
|
10
|
+
* Ad4mModel's synthesised `createdAt`. Not the state: see below.
|
|
11
11
|
* - `SHACLFlow` — the flow definition the record is bound to. Held so
|
|
12
12
|
* `availableTransitions` / `currentState` object lookups don't require
|
|
13
13
|
* a per-call round-trip.
|
|
14
14
|
*
|
|
15
|
+
* The state is derived by the executor from the signed proposals and kept
|
|
16
|
+
* per agent outside the graph (#1424). The factories read it with one
|
|
17
|
+
* batched `PerspectiveProxy.flowStates` call, so `currentStateName` is the
|
|
18
|
+
* state as **this agent's** executor last derived it, at load time.
|
|
19
|
+
* Subscribe with `PerspectiveProxy.onFlowStateChanged` to follow it.
|
|
20
|
+
*
|
|
15
21
|
* Construct via the class factories — {@link FlowInstance.start} for the
|
|
16
22
|
* mint path and {@link FlowInstance.findAll} for the read path — rather
|
|
17
23
|
* than the `wrap` escape hatch, which exists for tests that already own
|
|
@@ -23,7 +29,7 @@
|
|
|
23
29
|
* - `uri`, `subject`, `flowName`, `currentStateName`, `startedAtMillis`
|
|
24
30
|
* accessors.
|
|
25
31
|
* - `currentState` — resolves the `FlowState` on the shape whose name
|
|
26
|
-
* matches `
|
|
32
|
+
* matches `currentStateName`.
|
|
27
33
|
* - `availableTransitions` — filters `shape.transitions` by `fromState`.
|
|
28
34
|
* - `proposals()` — queries `FlowTransitionProposal` records that
|
|
29
35
|
* target this instance's URI.
|
|
@@ -41,9 +47,9 @@
|
|
|
41
47
|
* Its `FlowProposeResult` is what tells queued from no-op from stalled.
|
|
42
48
|
*
|
|
43
49
|
* Still absent (rather than shipped as `throw new Error("not yet")`
|
|
44
|
-
* stubs): `fireAction`, and
|
|
45
|
-
* `
|
|
46
|
-
*
|
|
50
|
+
* stubs): `fireAction`, and per-instance subscriptions (`onProposalAdded`,
|
|
51
|
+
* `onProposalResolved`). State changes are perspective-wide:
|
|
52
|
+
* `PerspectiveProxy.onFlowStateChanged`.
|
|
47
53
|
*
|
|
48
54
|
* ## The guard-free rule
|
|
49
55
|
*
|
|
@@ -57,6 +63,19 @@
|
|
|
57
63
|
import { PerspectiveProxy } from "./PerspectiveProxy";
|
|
58
64
|
import { FlowInstanceRecord, FlowTransitionProposal } from "./FlowModels";
|
|
59
65
|
import { SHACLFlow, FlowState, FlowTransition } from "../shacl/SHACLFlow";
|
|
66
|
+
import type { JsonValue } from "../generated/api/serde_json/JsonValue";
|
|
67
|
+
/** One instance this agent's executor keeps bookkeeping for — an entry of
|
|
68
|
+
* `PerspectiveProxy.flowStates()`. An instance with no entry has never been
|
|
69
|
+
* derived nor minted by this agent here. */
|
|
70
|
+
export interface FlowStateEntry {
|
|
71
|
+
instance: string;
|
|
72
|
+
/** The state this agent's executor last derived, or `null` for an instance
|
|
73
|
+
* this agent minted here and has not derived yet: it stands at its flow's
|
|
74
|
+
* first state. */
|
|
75
|
+
currentState: string | null;
|
|
76
|
+
/** RFC 3339 time of the derivation that wrote `currentState`; `null` with it. */
|
|
77
|
+
derivedAt: string | null;
|
|
78
|
+
}
|
|
60
79
|
/** One fired flow transition, as returned by {@link FlowInstance.acceptProposal}
|
|
61
80
|
* (and, engine-side, by every consensus pass). */
|
|
62
81
|
export interface FlowFireOutcome {
|
|
@@ -163,26 +182,36 @@ export interface FlowReceiptVerdict {
|
|
|
163
182
|
* `verifyFlowReceipt`, never by inspection). */
|
|
164
183
|
export interface FlowMintedReceipt {
|
|
165
184
|
receiptUri: string;
|
|
166
|
-
|
|
185
|
+
/** The serialized `FlowReceipt`; pass it back to `verifyFlowReceipt`. */
|
|
186
|
+
receipt: JsonValue;
|
|
167
187
|
}
|
|
168
188
|
export declare class FlowInstance {
|
|
169
189
|
private readonly perspective;
|
|
170
190
|
/** The flow definition this instance was minted against. */
|
|
171
191
|
readonly shape: SHACLFlow;
|
|
172
192
|
/**
|
|
173
|
-
* The on-graph record — carries `
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
193
|
+
* The on-graph record — carries `flowUri`, `subject` and Ad4mModel's
|
|
194
|
+
* synthesised `createdAt`. Callers can reach into it for anything the
|
|
195
|
+
* wrapper doesn't expose directly, but should prefer the wrapper
|
|
196
|
+
* accessors so future refactors of the underlying shape don't ripple
|
|
197
|
+
* through their code.
|
|
178
198
|
*/
|
|
179
199
|
readonly record: FlowInstanceRecord;
|
|
200
|
+
/** See {@link currentStateName}. */
|
|
201
|
+
private readonly stateName;
|
|
180
202
|
/**
|
|
181
203
|
* Private constructor — construct via {@link FlowInstance.start} or
|
|
182
204
|
* {@link FlowInstance.findAll}. {@link FlowInstance.wrap} is the
|
|
183
205
|
* escape hatch for tests / direct construction cases.
|
|
184
206
|
*/
|
|
185
207
|
private constructor();
|
|
208
|
+
/** The state to show for `record`, from this agent's `flowStates` entries:
|
|
209
|
+
* the recorded derivation; the flow's first state for an instance this
|
|
210
|
+
* agent minted and has not derived yet; `undefined` for one with no entry
|
|
211
|
+
* — synced in, and not derived by this agent yet. */
|
|
212
|
+
private static stateOf;
|
|
213
|
+
/** One `flowStates` round-trip for every record in `records`. */
|
|
214
|
+
private static recordedStates;
|
|
186
215
|
/**
|
|
187
216
|
* Escape hatch used by {@link FlowInstance.start} and
|
|
188
217
|
* {@link FlowInstance.findAll} — not meant for general use, but public
|
|
@@ -190,9 +219,15 @@ export declare class FlowInstance {
|
|
|
190
219
|
* (e.g. from pre-populated fixtures) can build a wrapper without
|
|
191
220
|
* going through the mint path.
|
|
192
221
|
*/
|
|
193
|
-
static wrap(perspective: PerspectiveProxy, shape: SHACLFlow, record: FlowInstanceRecord): FlowInstance;
|
|
222
|
+
static wrap(perspective: PerspectiveProxy, shape: SHACLFlow, record: FlowInstanceRecord, currentStateName?: string): FlowInstance;
|
|
194
223
|
/**
|
|
195
|
-
*
|
|
224
|
+
* Start `flowName` on `baseExpression`: mint a new `FlowInstance` on the
|
|
225
|
+
* given perspective (design doc §4.3), or return the one already running
|
|
226
|
+
* there. Calling it twice, or from two clients, does not leave two runs;
|
|
227
|
+
* where two mints raced, every caller gets the earliest.
|
|
228
|
+
*
|
|
229
|
+
* A flow runs on a subject once: a run that has reached its last state is
|
|
230
|
+
* returned too, not replaced by a new one.
|
|
196
231
|
*
|
|
197
232
|
* Idempotently registers the hardwired `FlowInstanceRecord` +
|
|
198
233
|
* `FlowTransitionProposal` @Model classes on first call — the on-graph
|
|
@@ -203,13 +238,12 @@ export declare class FlowInstance {
|
|
|
203
238
|
* on-graph record, so `currentState` / `availableTransitions` /
|
|
204
239
|
* `proposals` accessors work without further round-trips.
|
|
205
240
|
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* flow's state.
|
|
241
|
+
* `currentStateName` is the state this agent's executor last derived
|
|
242
|
+
* (`PerspectiveProxy.flowStates`) — a display value, **never authority**:
|
|
243
|
+
* anything that decides something (the fold, the mint pass) derives state
|
|
244
|
+
* from the signed links present now. A run started by this call stands at
|
|
245
|
+
* the flow's first state; an existing run this agent has not derived yet
|
|
246
|
+
* reads `undefined` (see {@link currentStateName}).
|
|
213
247
|
*
|
|
214
248
|
* @param perspective - The perspective the flow instance lives on
|
|
215
249
|
* @param flowName - Name of a `SHACLFlow` already registered on the perspective
|
|
@@ -284,8 +318,19 @@ export declare class FlowInstance {
|
|
|
284
318
|
get flowName(): string;
|
|
285
319
|
/** Flow URI — the on-graph discriminator, collision-free across modules. */
|
|
286
320
|
get flowUri(): string;
|
|
287
|
-
/**
|
|
288
|
-
|
|
321
|
+
/**
|
|
322
|
+
* Name of the state this instance is in, as this agent's executor last
|
|
323
|
+
* derived it when the wrapper was loaded (`PerspectiveProxy.flowStates`).
|
|
324
|
+
* An instance this agent minted and has not derived yet reads as its
|
|
325
|
+
* flow's first state.
|
|
326
|
+
*
|
|
327
|
+
* `undefined` means **not derived by this agent yet**: the run synced in
|
|
328
|
+
* (or the executor was upgraded) and no pass of this agent's has covered it.
|
|
329
|
+
* Show it as pending, not as the first state. The catch-up pass that
|
|
330
|
+
* derives it publishes `flow-state-changed` with `caughtUp: true`. A
|
|
331
|
+
* snapshot: reload, or follow `PerspectiveProxy.onFlowStateChanged`.
|
|
332
|
+
*/
|
|
333
|
+
get currentStateName(): string | undefined;
|
|
289
334
|
/**
|
|
290
335
|
* ISO-8601 (epoch millis after Ad4mModel hydration) start time.
|
|
291
336
|
* Returns `undefined` when hydration didn't produce a `createdAt`
|
|
@@ -293,17 +338,19 @@ export declare class FlowInstance {
|
|
|
293
338
|
*/
|
|
294
339
|
get startedAtMillis(): number | undefined;
|
|
295
340
|
/**
|
|
296
|
-
* The `FlowState` object on the shape matching `currentStateName
|
|
341
|
+
* The `FlowState` object on the shape matching `currentStateName`, or
|
|
342
|
+
* `undefined` when that is (not derived by this agent yet).
|
|
297
343
|
* Throws when the record's state name is not declared on the flow —
|
|
298
344
|
* that's a "stale FlowInstance whose flow was edited under it" bug,
|
|
299
345
|
* not a silent-fail case.
|
|
300
346
|
*/
|
|
301
|
-
get currentState(): FlowState;
|
|
347
|
+
get currentState(): FlowState | undefined;
|
|
302
348
|
/**
|
|
303
349
|
* Every `FlowTransition` on the shape whose `fromState` matches
|
|
304
350
|
* `currentStateName`. Order preserved from the shape.
|
|
305
351
|
*
|
|
306
|
-
* Empty when the current state is terminal (no outgoing transitions)
|
|
352
|
+
* Empty when the current state is terminal (no outgoing transitions), or
|
|
353
|
+
* not derived by this agent yet.
|
|
307
354
|
*/
|
|
308
355
|
get availableTransitions(): FlowTransition[];
|
|
309
356
|
/**
|
|
@@ -6,12 +6,18 @@
|
|
|
6
6
|
* Wraps two on-graph objects:
|
|
7
7
|
*
|
|
8
8
|
* - `FlowInstanceRecord` — the raw @Model row minted by
|
|
9
|
-
* {@link FlowInstance.start}; carries `
|
|
10
|
-
*
|
|
9
|
+
* {@link FlowInstance.start}; carries `flowUri`, `subject` and
|
|
10
|
+
* Ad4mModel's synthesised `createdAt`. Not the state: see below.
|
|
11
11
|
* - `SHACLFlow` — the flow definition the record is bound to. Held so
|
|
12
12
|
* `availableTransitions` / `currentState` object lookups don't require
|
|
13
13
|
* a per-call round-trip.
|
|
14
14
|
*
|
|
15
|
+
* The state is derived by the executor from the signed proposals and kept
|
|
16
|
+
* per agent outside the graph (#1424). The factories read it with one
|
|
17
|
+
* batched `PerspectiveProxy.flowStates` call, so `currentStateName` is the
|
|
18
|
+
* state as **this agent's** executor last derived it, at load time.
|
|
19
|
+
* Subscribe with `PerspectiveProxy.onFlowStateChanged` to follow it.
|
|
20
|
+
*
|
|
15
21
|
* Construct via the class factories — {@link FlowInstance.start} for the
|
|
16
22
|
* mint path and {@link FlowInstance.findAll} for the read path — rather
|
|
17
23
|
* than the `wrap` escape hatch, which exists for tests that already own
|
|
@@ -23,7 +29,7 @@
|
|
|
23
29
|
* - `uri`, `subject`, `flowName`, `currentStateName`, `startedAtMillis`
|
|
24
30
|
* accessors.
|
|
25
31
|
* - `currentState` — resolves the `FlowState` on the shape whose name
|
|
26
|
-
* matches `
|
|
32
|
+
* matches `currentStateName`.
|
|
27
33
|
* - `availableTransitions` — filters `shape.transitions` by `fromState`.
|
|
28
34
|
* - `proposals()` — queries `FlowTransitionProposal` records that
|
|
29
35
|
* target this instance's URI.
|
|
@@ -41,9 +47,9 @@
|
|
|
41
47
|
* Its `FlowProposeResult` is what tells queued from no-op from stalled.
|
|
42
48
|
*
|
|
43
49
|
* Still absent (rather than shipped as `throw new Error("not yet")`
|
|
44
|
-
* stubs): `fireAction`, and
|
|
45
|
-
* `
|
|
46
|
-
*
|
|
50
|
+
* stubs): `fireAction`, and per-instance subscriptions (`onProposalAdded`,
|
|
51
|
+
* `onProposalResolved`). State changes are perspective-wide:
|
|
52
|
+
* `PerspectiveProxy.onFlowStateChanged`.
|
|
47
53
|
*
|
|
48
54
|
* ## The guard-free rule
|
|
49
55
|
*
|
|
@@ -86,16 +92,35 @@ export class FlowInstance {
|
|
|
86
92
|
/** The flow definition this instance was minted against. */
|
|
87
93
|
shape,
|
|
88
94
|
/**
|
|
89
|
-
* The on-graph record — carries `
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
95
|
+
* The on-graph record — carries `flowUri`, `subject` and Ad4mModel's
|
|
96
|
+
* synthesised `createdAt`. Callers can reach into it for anything the
|
|
97
|
+
* wrapper doesn't expose directly, but should prefer the wrapper
|
|
98
|
+
* accessors so future refactors of the underlying shape don't ripple
|
|
99
|
+
* through their code.
|
|
94
100
|
*/
|
|
95
|
-
record
|
|
101
|
+
record,
|
|
102
|
+
/** See {@link currentStateName}. */
|
|
103
|
+
stateName) {
|
|
96
104
|
this.perspective = perspective;
|
|
97
105
|
this.shape = shape;
|
|
98
106
|
this.record = record;
|
|
107
|
+
this.stateName = stateName;
|
|
108
|
+
}
|
|
109
|
+
/** The state to show for `record`, from this agent's `flowStates` entries:
|
|
110
|
+
* the recorded derivation; the flow's first state for an instance this
|
|
111
|
+
* agent minted and has not derived yet; `undefined` for one with no entry
|
|
112
|
+
* — synced in, and not derived by this agent yet. */
|
|
113
|
+
static stateOf(shape, record, recorded) {
|
|
114
|
+
if (!recorded.has(record.id))
|
|
115
|
+
return undefined;
|
|
116
|
+
return recorded.get(record.id) ?? shape.states[0]?.name;
|
|
117
|
+
}
|
|
118
|
+
/** One `flowStates` round-trip for every record in `records`. */
|
|
119
|
+
static async recordedStates(perspective, records) {
|
|
120
|
+
if (records.length === 0)
|
|
121
|
+
return new Map();
|
|
122
|
+
const entries = await perspective.flowStates(records.map((r) => r.id));
|
|
123
|
+
return new Map(entries.map((e) => [e.instance, e.currentState]));
|
|
99
124
|
}
|
|
100
125
|
/**
|
|
101
126
|
* Escape hatch used by {@link FlowInstance.start} and
|
|
@@ -104,11 +129,17 @@ export class FlowInstance {
|
|
|
104
129
|
* (e.g. from pre-populated fixtures) can build a wrapper without
|
|
105
130
|
* going through the mint path.
|
|
106
131
|
*/
|
|
107
|
-
static wrap(perspective, shape, record) {
|
|
108
|
-
return new FlowInstance(perspective, shape, record);
|
|
132
|
+
static wrap(perspective, shape, record, currentStateName) {
|
|
133
|
+
return new FlowInstance(perspective, shape, record, currentStateName ?? FlowInstance.stateOf(shape, record, new Map()));
|
|
109
134
|
}
|
|
110
135
|
/**
|
|
111
|
-
*
|
|
136
|
+
* Start `flowName` on `baseExpression`: mint a new `FlowInstance` on the
|
|
137
|
+
* given perspective (design doc §4.3), or return the one already running
|
|
138
|
+
* there. Calling it twice, or from two clients, does not leave two runs;
|
|
139
|
+
* where two mints raced, every caller gets the earliest.
|
|
140
|
+
*
|
|
141
|
+
* A flow runs on a subject once: a run that has reached its last state is
|
|
142
|
+
* returned too, not replaced by a new one.
|
|
112
143
|
*
|
|
113
144
|
* Idempotently registers the hardwired `FlowInstanceRecord` +
|
|
114
145
|
* `FlowTransitionProposal` @Model classes on first call — the on-graph
|
|
@@ -119,13 +150,12 @@ export class FlowInstance {
|
|
|
119
150
|
* on-graph record, so `currentState` / `availableTransitions` /
|
|
120
151
|
* `proposals` accessors work without further round-trips.
|
|
121
152
|
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* flow's state.
|
|
153
|
+
* `currentStateName` is the state this agent's executor last derived
|
|
154
|
+
* (`PerspectiveProxy.flowStates`) — a display value, **never authority**:
|
|
155
|
+
* anything that decides something (the fold, the mint pass) derives state
|
|
156
|
+
* from the signed links present now. A run started by this call stands at
|
|
157
|
+
* the flow's first state; an existing run this agent has not derived yet
|
|
158
|
+
* reads `undefined` (see {@link currentStateName}).
|
|
129
159
|
*
|
|
130
160
|
* @param perspective - The perspective the flow instance lives on
|
|
131
161
|
* @param flowName - Name of a `SHACLFlow` already registered on the perspective
|
|
@@ -154,14 +184,32 @@ export class FlowInstance {
|
|
|
154
184
|
// flow author who wants a specific state as the entry point must give
|
|
155
185
|
// it the lowest `value` in the set.
|
|
156
186
|
//
|
|
187
|
+
// A run already on this subject for this flow is the one to return:
|
|
188
|
+
// minting another would leave two runs, each with its own state, and
|
|
189
|
+
// every reader choosing between them. Two clients starting at the same
|
|
190
|
+
// moment can still both mint; the earliest run (then the lowest id) is
|
|
191
|
+
// the one each of them gets back from here on.
|
|
192
|
+
const existing = await FlowInstanceRecord.findAll(perspective, {
|
|
193
|
+
where: { flowUri: flow.flowUri, subject: baseExpression },
|
|
194
|
+
});
|
|
195
|
+
if (existing.length > 0) {
|
|
196
|
+
const startedAt = (r) => {
|
|
197
|
+
const v = r.createdAt;
|
|
198
|
+
return typeof v === "number" ? v : Number.POSITIVE_INFINITY;
|
|
199
|
+
};
|
|
200
|
+
const [first] = [...existing].sort((a, b) => startedAt(a) - startedAt(b) || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
|
|
201
|
+
const recorded = await FlowInstance.recordedStates(perspective, [first]);
|
|
202
|
+
return FlowInstance.wrap(perspective, flow, first, FlowInstance.stateOf(flow, first, recorded));
|
|
203
|
+
}
|
|
157
204
|
// Store the flow's URI, not the bare name — see FlowInstanceRecord's
|
|
158
205
|
// docstring for the collision-across-modules argument (James PR #929 R5).
|
|
206
|
+
// No state on the record: the executor seeds this agent's bookkeeping
|
|
207
|
+
// from this write, so its first settle is reported (#1424).
|
|
159
208
|
const record = await FlowInstanceRecord.create(perspective, {
|
|
160
209
|
flowUri: flow.flowUri,
|
|
161
210
|
subject: baseExpression,
|
|
162
|
-
currentState: flow.states[0].name,
|
|
163
211
|
});
|
|
164
|
-
return FlowInstance.wrap(perspective, flow, record);
|
|
212
|
+
return FlowInstance.wrap(perspective, flow, record, flow.states[0].name);
|
|
165
213
|
}
|
|
166
214
|
/**
|
|
167
215
|
* Return every live `FlowInstance` on the perspective (design doc §4.3).
|
|
@@ -256,7 +304,7 @@ export class FlowInstance {
|
|
|
256
304
|
// means stripping the namespace + the `Flow` suffix. Records that
|
|
257
305
|
// don't parse this way are treated as stale and skipped.
|
|
258
306
|
const shapesByUri = new Map();
|
|
259
|
-
const
|
|
307
|
+
const paired = [];
|
|
260
308
|
for (const record of records) {
|
|
261
309
|
let shape = shapesByUri.get(record.flowUri);
|
|
262
310
|
if (!shape) {
|
|
@@ -272,9 +320,11 @@ export class FlowInstance {
|
|
|
272
320
|
shape = loaded;
|
|
273
321
|
shapesByUri.set(record.flowUri, shape);
|
|
274
322
|
}
|
|
275
|
-
|
|
323
|
+
paired.push([record, shape]);
|
|
276
324
|
}
|
|
277
|
-
|
|
325
|
+
// Every state in one round-trip, not one per instance.
|
|
326
|
+
const recorded = await FlowInstance.recordedStates(perspective, paired.map(([record]) => record));
|
|
327
|
+
return paired.map(([record, shape]) => FlowInstance.wrap(perspective, shape, record, FlowInstance.stateOf(shape, record, recorded)));
|
|
278
328
|
}
|
|
279
329
|
// ── Read accessors ────────────────────────────────────────────────────
|
|
280
330
|
/**
|
|
@@ -307,9 +357,20 @@ export class FlowInstance {
|
|
|
307
357
|
get flowUri() {
|
|
308
358
|
return this.record.flowUri;
|
|
309
359
|
}
|
|
310
|
-
/**
|
|
360
|
+
/**
|
|
361
|
+
* Name of the state this instance is in, as this agent's executor last
|
|
362
|
+
* derived it when the wrapper was loaded (`PerspectiveProxy.flowStates`).
|
|
363
|
+
* An instance this agent minted and has not derived yet reads as its
|
|
364
|
+
* flow's first state.
|
|
365
|
+
*
|
|
366
|
+
* `undefined` means **not derived by this agent yet**: the run synced in
|
|
367
|
+
* (or the executor was upgraded) and no pass of this agent's has covered it.
|
|
368
|
+
* Show it as pending, not as the first state. The catch-up pass that
|
|
369
|
+
* derives it publishes `flow-state-changed` with `caughtUp: true`. A
|
|
370
|
+
* snapshot: reload, or follow `PerspectiveProxy.onFlowStateChanged`.
|
|
371
|
+
*/
|
|
311
372
|
get currentStateName() {
|
|
312
|
-
return this.
|
|
373
|
+
return this.stateName;
|
|
313
374
|
}
|
|
314
375
|
/**
|
|
315
376
|
* ISO-8601 (epoch millis after Ad4mModel hydration) start time.
|
|
@@ -321,12 +382,15 @@ export class FlowInstance {
|
|
|
321
382
|
return typeof v === "number" ? v : undefined;
|
|
322
383
|
}
|
|
323
384
|
/**
|
|
324
|
-
* The `FlowState` object on the shape matching `currentStateName
|
|
385
|
+
* The `FlowState` object on the shape matching `currentStateName`, or
|
|
386
|
+
* `undefined` when that is (not derived by this agent yet).
|
|
325
387
|
* Throws when the record's state name is not declared on the flow —
|
|
326
388
|
* that's a "stale FlowInstance whose flow was edited under it" bug,
|
|
327
389
|
* not a silent-fail case.
|
|
328
390
|
*/
|
|
329
391
|
get currentState() {
|
|
392
|
+
if (this.currentStateName === undefined)
|
|
393
|
+
return undefined;
|
|
330
394
|
const s = this.shape.states.find((x) => x.name === this.currentStateName);
|
|
331
395
|
if (!s) {
|
|
332
396
|
throw new Error(`FlowInstance ${this.uri}: currentState "${this.currentStateName}" is not declared on flow "${this.flowName}". ` +
|
|
@@ -338,7 +402,8 @@ export class FlowInstance {
|
|
|
338
402
|
* Every `FlowTransition` on the shape whose `fromState` matches
|
|
339
403
|
* `currentStateName`. Order preserved from the shape.
|
|
340
404
|
*
|
|
341
|
-
* Empty when the current state is terminal (no outgoing transitions)
|
|
405
|
+
* Empty when the current state is terminal (no outgoing transitions), or
|
|
406
|
+
* not derived by this agent yet.
|
|
342
407
|
*/
|
|
343
408
|
get availableTransitions() {
|
|
344
409
|
return this.shape.transitions.filter((t) => t.fromState === this.currentStateName);
|
|
@@ -19,6 +19,21 @@
|
|
|
19
19
|
* `rust-executor/src/perspectives/hardwired_sdna/flow_transition_proposal.json`.
|
|
20
20
|
*/
|
|
21
21
|
import { Ad4mModel } from "../model/Ad4mModel";
|
|
22
|
+
/**
|
|
23
|
+
* The engine's proposer rule (`self_authored_proposer`: a `proposer` link
|
|
24
|
+
* signed by the DID it names) as a getter. Must match the `proposer` getter in
|
|
25
|
+
* `hardwired_sdna/flow_transition_proposal.json` byte for byte, as
|
|
26
|
+
* `ACCEPTED_BY_GETTER` must.
|
|
27
|
+
*/
|
|
28
|
+
export declare const PROPOSER_GETTER = "SELECT ?target WHERE { ?source <ad4m://flow/proposer> ?target . FILTER EXISTS { ?_claim <http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies> <<( ?source <ad4m://flow/proposer> ?target )>> ; <ad4m://ontology/author> ?_author ; <ad4m://ontology/proofValid> ?_valid . FILTER(STR(?_author) = STR(?target) && STR(?_valid) = \"true\") } }";
|
|
29
|
+
/**
|
|
30
|
+
* The engine's vote rule (`signed_by`: the link's author is the DID it names,
|
|
31
|
+
* and its signature verified) as a getter over the link's reifier. Must match
|
|
32
|
+
* the `acceptedBy` getter in `hardwired_sdna/flow_transition_proposal.json`
|
|
33
|
+
* byte for byte: whichever side registers the class first decides the stored
|
|
34
|
+
* shape.
|
|
35
|
+
*/
|
|
36
|
+
export declare const ACCEPTED_BY_GETTER = "SELECT ?target WHERE { ?source <ad4m://acceptedBy> ?target . FILTER EXISTS { ?_vote <http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies> <<( ?source <ad4m://acceptedBy> ?target )>> ; <ad4m://ontology/author> ?_author ; <ad4m://ontology/proofValid> ?_valid . FILTER(STR(?_author) = STR(?target) && STR(?_valid) = \"true\") } }";
|
|
22
37
|
export declare class FlowTransitionProposal extends Ad4mModel {
|
|
23
38
|
/**
|
|
24
39
|
* URI of the running `FlowInstance` this proposal targets. First-declared
|
|
@@ -32,7 +47,12 @@ export declare class FlowTransitionProposal extends Ad4mModel {
|
|
|
32
47
|
fromState: string;
|
|
33
48
|
/** Name of the state the proposal wants to transition to. */
|
|
34
49
|
toState: string;
|
|
35
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* DID of the agent that issued the proposal, read the way the engine reads
|
|
52
|
+
* it: only from a `proposer` link signed by the DID it names. Any member
|
|
53
|
+
* can write a `proposer` link naming someone else, and an unchecked read
|
|
54
|
+
* would show that DID instead (and drop the real proposer from the voters).
|
|
55
|
+
*/
|
|
36
56
|
proposer: string;
|
|
37
57
|
/**
|
|
38
58
|
* URIs of instances offered as evidence that `toState.requires` is now
|
|
@@ -87,6 +107,15 @@ export declare class FlowTransitionProposal extends Ad4mModel {
|
|
|
87
107
|
* `requires`; the UI shows it to reviewers.
|
|
88
108
|
*/
|
|
89
109
|
rationale?: string;
|
|
110
|
+
/**
|
|
111
|
+
* DIDs that accepted this proposal, as the consensus engine counts them:
|
|
112
|
+
* an `ad4m://acceptedBy` link counts only when it is signed by the DID it
|
|
113
|
+
* names, since anyone can write one naming someone else, and each DID once.
|
|
114
|
+
* The proposer's vote is implicit and the proposer may also accept, so the
|
|
115
|
+
* voters are the *set* `{ proposer } ∪ acceptedBy`, not its sum.
|
|
116
|
+
* Read-only: vote with `acceptProposal`, withdraw with `rejectProposal`.
|
|
117
|
+
*/
|
|
118
|
+
acceptedBy: string[];
|
|
90
119
|
}
|
|
91
120
|
export declare class FlowInstanceRecord extends Ad4mModel {
|
|
92
121
|
/**
|
|
@@ -114,12 +143,4 @@ export declare class FlowInstanceRecord extends Ad4mModel {
|
|
|
114
143
|
* on read.
|
|
115
144
|
*/
|
|
116
145
|
subject: string;
|
|
117
|
-
/**
|
|
118
|
-
* The state name this replica's executor last derived for the flow — a
|
|
119
|
-
* per-replica cache written as a `local` link, never the authority (the
|
|
120
|
-
* fold over the signed proposals is). Optional on the shape: a row that
|
|
121
|
-
* synced in from a peer carries no value until the local consensus pass
|
|
122
|
-
* has run, so an empty string means "not yet derived here".
|
|
123
|
-
*/
|
|
124
|
-
currentState: string;
|
|
125
146
|
}
|