@coasys/ad4m 0.13.1-staging.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/lib/index.cjs +3789 -1192
- package/lib/index.js +3783 -1193
- package/lib/src/generated/api/AgentsByDidsRequest.d.ts +3 -0
- package/lib/src/generated/api/CallSessionInfo.d.ts +23 -0
- package/lib/src/generated/api/DiscardBatchRequest.d.ts +3 -0
- package/lib/src/generated/api/Events.d.ts +13 -3
- package/lib/src/generated/api/Events.js +1 -0
- package/lib/src/generated/api/FlowStateChangedEvent.d.ts +38 -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/IceServer.d.ts +18 -0
- package/lib/src/generated/api/IceServer.js +2 -0
- package/lib/src/generated/api/OnlineAgent.d.ts +4 -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/PerspectiveFlowFiredParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveFlowFiredParams.js +2 -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/PerspectiveGetAllShaclParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveGetAllShaclParams.js +2 -0
- package/lib/src/generated/api/PerspectiveModelQueryParams.d.ts +6 -1
- package/lib/src/generated/api/PerspectiveRemoveSubjectParams.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveRemoveSubjectParams.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/PerspectiveSubscribed.d.ts +10 -0
- package/lib/src/generated/api/PerspectiveSubscribed.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/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/RemoveSubjectRequest.d.ts +9 -0
- package/lib/src/generated/api/RemoveSubjectRequest.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 +134 -14
- package/lib/src/generated/api/RpcMethods.js +12 -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/TrackMapEntry.d.ts +17 -0
- package/lib/src/generated/api/TrackMapEntry.js +2 -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/index.d.ts +3 -0
- package/lib/src/index.d.ts +7 -0
- package/lib/src/index.js +4 -0
- package/lib/src/model/Ad4mModel.d.ts +84 -0
- package/lib/src/model/Ad4mModel.js +234 -4
- package/lib/src/model/ModelQueryBuilder.d.ts +16 -35
- package/lib/src/model/ModelQueryBuilder.js +88 -270
- package/lib/src/model/decorators.d.ts +32 -0
- package/lib/src/model/decorators.js +40 -1
- package/lib/src/model/shacl-gen.d.ts +3 -1
- package/lib/src/model/shacl-gen.js +13 -1
- package/lib/src/model/types.d.ts +7 -0
- package/lib/src/neighbourhood/MeshManager.d.ts +384 -0
- package/lib/src/neighbourhood/MeshManager.js +1144 -0
- package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +91 -0
- package/lib/src/neighbourhood/NeighbourhoodClient.js +196 -0
- 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/perspectives/FlowInstance.d.ts +63 -24
- package/lib/src/perspectives/FlowInstance.js +74 -31
- package/lib/src/perspectives/FlowModels.d.ts +0 -16
- package/lib/src/perspectives/FlowModels.js +8 -16
- package/lib/src/perspectives/LiveQuery.d.ts +49 -0
- package/lib/src/perspectives/LiveQuery.js +169 -0
- package/lib/src/perspectives/PerspectiveClient.d.ts +24 -15
- package/lib/src/perspectives/PerspectiveClient.js +33 -36
- package/lib/src/perspectives/PerspectiveProxy.d.ts +67 -167
- package/lib/src/perspectives/PerspectiveProxy.js +121 -475
- 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 -17
- package/lib/src/shacl/SHACLFlow.d.ts +7 -4
- package/lib/src/shacl/SHACLFlow.js +7 -4
- package/lib/src/shacl/SHACLShape.d.ts +9 -0
- package/lib/src/shacl/SHACLShape.js +37 -0
- package/package.json +2 -2
- package/pnpm-workspace.yaml +4 -1
- package/src/Ad4mClient.test.ts +89 -17
- package/src/generated/api/AgentsByDidsRequest.ts +3 -0
- package/src/generated/api/CallSessionInfo.ts +20 -0
- package/src/generated/api/DiscardBatchRequest.ts +3 -0
- package/src/generated/api/Events.ts +14 -3
- package/src/generated/api/FlowStateChangedEvent.ts +36 -0
- package/src/generated/api/FlowStateEntry.ts +18 -0
- package/src/generated/api/IceServer.ts +19 -0
- package/src/generated/api/OnlineAgent.ts +6 -1
- package/src/generated/api/PerspectiveDiscardBatchParams.ts +3 -0
- package/src/generated/api/PerspectiveFlowFiredParams.ts +7 -0
- package/src/generated/api/PerspectiveFlowStatesParams.ts +11 -0
- package/src/generated/api/PerspectiveGetAllShaclParams.ts +6 -0
- package/src/generated/api/PerspectiveModelQueryParams.ts +5 -1
- package/src/generated/api/PerspectiveRemoveSubjectParams.ts +3 -0
- package/src/generated/api/PerspectiveResynced.ts +7 -0
- package/src/generated/api/PerspectiveSubscribed.ts +8 -0
- package/src/generated/api/PerspectiveUpdateSubjectParams.ts +7 -0
- 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/RemoveSubjectRequest.ts +7 -0
- package/src/generated/api/ResyncSubscriptionRequest.ts +3 -0
- package/src/generated/api/RpcMethods.ts +68 -8
- 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/{KeepAliveQueryRequest.ts → SfuNeighbourhoodParams.ts} +1 -1
- package/src/generated/api/SfuParticipantQualityPreference.ts +6 -0
- package/src/generated/api/{PerspectiveSubscribeQueryResult.ts → SfuPerspectiveParams.ts} +4 -1
- 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/TrackMapEntry.ts +18 -0
- package/src/generated/api/UpdateSubjectRequest.ts +10 -0
- package/src/generated/api/index.ts +3 -0
- package/src/index.ts +7 -0
- package/src/model/Ad4mModel.test.ts +255 -231
- package/src/model/Ad4mModel.ts +271 -4
- package/src/model/ModelQueryBuilder.ts +103 -310
- package/src/model/abstract-classes.test.ts +225 -0
- package/src/model/decorators.ts +81 -0
- package/src/model/shacl-gen.ts +13 -0
- package/src/model/types.ts +7 -0
- package/src/neighbourhood/MeshManager.test.ts +2640 -0
- package/src/neighbourhood/MeshManager.ts +1350 -0
- package/src/neighbourhood/NeighbourhoodClient.ts +271 -0
- package/src/neighbourhood/NeighbourhoodProxy.test.ts +23 -0
- 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/perspectives/FlowInstance.ts +108 -31
- package/src/perspectives/FlowModels.ts +8 -18
- package/src/perspectives/LiveQuery.test.ts +197 -0
- package/src/perspectives/LiveQuery.ts +189 -0
- package/src/perspectives/PerspectiveClient.ts +51 -51
- package/src/perspectives/PerspectiveProxy.test.ts +85 -401
- package/src/perspectives/PerspectiveProxy.ts +126 -536
- package/src/perspectives/TextContent.test.ts +123 -0
- package/src/perspectives/TextContent.ts +36 -0
- package/src/perspectives/WakerSubscriptionManager.test.ts +88 -6
- package/src/perspectives/WakerSubscriptionManager.ts +69 -18
- package/src/shacl/SHACLFlow.ts +7 -4
- package/src/shacl/SHACLShape.test.ts +2 -1
- package/src/shacl/SHACLShape.ts +49 -0
- package/lib/src/generated/api/KeepAliveQueryRequest.d.ts +0 -3
- package/lib/src/generated/api/PerspectiveModelSubscribeResult.d.ts +0 -7
- package/lib/src/generated/api/PerspectiveQuerySubscriptionFilter.d.ts +0 -6
- package/lib/src/generated/api/PerspectiveSubscribeQueryResult.d.ts +0 -4
- package/src/generated/api/PerspectiveModelSubscribeResult.ts +0 -6
- package/src/generated/api/PerspectiveQuerySubscriptionFilter.ts +0 -3
- /package/lib/src/generated/api/{KeepAliveQueryRequest.js → AgentsByDidsRequest.js} +0 -0
- /package/lib/src/generated/api/{PerspectiveModelSubscribeResult.js → CallSessionInfo.js} +0 -0
- /package/lib/src/generated/api/{PerspectiveQuerySubscriptionFilter.js → DiscardBatchRequest.js} +0 -0
- /package/lib/src/generated/api/{PerspectiveSubscribeQueryResult.js → FlowStateChangedEvent.js} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result of a `call_join` — SDP answer + optional cascade redirect +
|
|
3
|
+
* stream mapping for the joining peer.
|
|
4
|
+
*/
|
|
5
|
+
export type CallSessionInfo = {
|
|
6
|
+
roomName: string;
|
|
7
|
+
neighbourhoodUrl: string;
|
|
8
|
+
participantId: string;
|
|
9
|
+
sdpAnswer: string;
|
|
10
|
+
/**
|
|
11
|
+
* When set, the join was not served here: the caller should join this
|
|
12
|
+
* DID's SFU node instead (cascade load redirect). Only a `callJoin` with
|
|
13
|
+
* `acceptRedirect` gets one.
|
|
14
|
+
*/
|
|
15
|
+
redirectTo?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Roster of existing participants at join time, format:
|
|
18
|
+
* `"participantId:did"` (local) or `"remote-did:did"` (cascade).
|
|
19
|
+
* For track-to-DID attribution, use the `track_mapping` field on
|
|
20
|
+
* each renegotiation offer — the SDP mids are assigned there.
|
|
21
|
+
*/
|
|
22
|
+
streamMapping: Array<string>;
|
|
23
|
+
};
|
|
@@ -5,16 +5,21 @@ import type { Apps } from "./Apps";
|
|
|
5
5
|
import type { AutoProcessorEvent } from "./AutoProcessorEvent";
|
|
6
6
|
import type { AutoProcessorNeighbourhoodState } from "./AutoProcessorNeighbourhoodState";
|
|
7
7
|
import type { ExceptionOccurredEvent } from "./ExceptionOccurredEvent";
|
|
8
|
+
import type { FlowStateChangedEvent } from "./FlowStateChangedEvent";
|
|
8
9
|
import type { HostingUserInfo } from "./HostingUserInfo";
|
|
9
10
|
import type { MessageReceivedEvent } from "./MessageReceivedEvent";
|
|
10
11
|
import type { NeighbourhoodSignalFilter } from "./NeighbourhoodSignalFilter";
|
|
11
12
|
import type { NotificationTriggeredEvent } from "./NotificationTriggeredEvent";
|
|
12
13
|
import type { PerspectiveLinkUpdatedWithOwner } from "./PerspectiveLinkUpdatedWithOwner";
|
|
13
14
|
import type { PerspectiveLinkWithOwner } from "./PerspectiveLinkWithOwner";
|
|
14
|
-
import type { PerspectiveQuerySubscriptionFilter } from "./PerspectiveQuerySubscriptionFilter";
|
|
15
15
|
import type { PerspectiveRemovedWithOwner } from "./PerspectiveRemovedWithOwner";
|
|
16
16
|
import type { PerspectiveStateFilter } from "./PerspectiveStateFilter";
|
|
17
17
|
import type { PerspectiveWithOwner } from "./PerspectiveWithOwner";
|
|
18
|
+
import type { QuerySubscriptionUpdateEvent } from "./QuerySubscriptionUpdateEvent";
|
|
19
|
+
import type { SfuCallRenegotiationOffer } from "./SfuCallRenegotiationOffer";
|
|
20
|
+
import type { SfuDataMessage } from "./SfuDataMessage";
|
|
21
|
+
import type { SfuMigrateEvent } from "./SfuMigrateEvent";
|
|
22
|
+
import type { SfuRoomRoster } from "./SfuRoomRoster";
|
|
18
23
|
import type { TranscriptionTextFilter } from "./TranscriptionTextFilter";
|
|
19
24
|
/** Every event the executor emits: its payload (the message without `type`). */
|
|
20
25
|
export interface EventMap {
|
|
@@ -35,12 +40,17 @@ export interface EventMap {
|
|
|
35
40
|
"exception-occurred": ExceptionOccurredEvent;
|
|
36
41
|
"transcription-text": TranscriptionTextFilter;
|
|
37
42
|
"model-loading-status": AIModelLoadingStatus;
|
|
38
|
-
"query-subscription-update":
|
|
43
|
+
"query-subscription-update": QuerySubscriptionUpdateEvent;
|
|
39
44
|
"auto-processor-event": AutoProcessorEvent;
|
|
40
45
|
"auto-processor-neighbourhood-state": AutoProcessorNeighbourhoodState;
|
|
46
|
+
"sfu-call-renegotiation-offer": SfuCallRenegotiationOffer;
|
|
47
|
+
"sfu-migrate": SfuMigrateEvent;
|
|
48
|
+
"sfu-data": SfuDataMessage;
|
|
49
|
+
"sfu-room-roster": SfuRoomRoster;
|
|
50
|
+
"flow-state-changed": FlowStateChangedEvent;
|
|
41
51
|
}
|
|
42
52
|
export type EventName = keyof EventMap;
|
|
43
53
|
/** Events about one perspective: they carry `perspectiveUuid`. */
|
|
44
|
-
export type ScopedEventName = "perspective-added" | "perspective-removed" | "perspective-updated" | "sync-state-change" | "link-added" | "link-removed" | "link-updated" | "signal" | "notification-triggered" | "query-subscription-update" | "auto-processor-event" | "auto-processor-neighbourhood-state";
|
|
54
|
+
export type ScopedEventName = "perspective-added" | "perspective-removed" | "perspective-updated" | "sync-state-change" | "link-added" | "link-removed" | "link-updated" | "signal" | "notification-triggered" | "query-subscription-update" | "auto-processor-event" | "auto-processor-neighbourhood-state" | "flow-state-changed";
|
|
45
55
|
/** {@link ScopedEventName} as a set. */
|
|
46
56
|
export declare const SCOPED_EVENTS: ReadonlySet<EventName>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An instance's derived state moved, or an edge settled, on one agent's
|
|
3
|
+
* replica. Published once per change by that agent's pass, and delivered
|
|
4
|
+
* only to that agent's sockets.
|
|
5
|
+
*
|
|
6
|
+
* A catch-up pass (this agent's first over an instance here) publishes one
|
|
7
|
+
* too, with `caught_up` set: it reports no settles — whatever settled
|
|
8
|
+
* before this replica watched is not news — but it is the first state this
|
|
9
|
+
* agent's clients can show, and the only signal they get of it.
|
|
10
|
+
*/
|
|
11
|
+
export type FlowStateChangedEvent = {
|
|
12
|
+
perspectiveUuid: string;
|
|
13
|
+
/**
|
|
14
|
+
* The agent whose replica derived this. The delivery filter matches it
|
|
15
|
+
* against the socket's agent; nobody else receives the event.
|
|
16
|
+
*/
|
|
17
|
+
agentDid: string;
|
|
18
|
+
instance: string;
|
|
19
|
+
/**
|
|
20
|
+
* The state this agent had recorded before; for a seeded row, the
|
|
21
|
+
* flow's first state. `None` exactly when `caught_up`: this agent had no
|
|
22
|
+
* row, so its clients had no state to show (`currentStateName` is
|
|
23
|
+
* `undefined`), and naming the first state would claim a move nobody saw.
|
|
24
|
+
*/
|
|
25
|
+
from: string | null;
|
|
26
|
+
to: string;
|
|
27
|
+
/**
|
|
28
|
+
* Proposals this pass marked fired: the atoms of every edge that settled
|
|
29
|
+
* since the previous pass. Empty when the state moved without a new
|
|
30
|
+
* settle, e.g. back, after a vote was withdrawn — and on a catch-up,
|
|
31
|
+
* whose marks record history rather than report it.
|
|
32
|
+
*/
|
|
33
|
+
firedProposals: Array<string>;
|
|
34
|
+
/**
|
|
35
|
+
* This was the agent's first pass over the instance here.
|
|
36
|
+
*/
|
|
37
|
+
caughtUp: boolean;
|
|
38
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One row of this agent's bookkeeping, as `perspective.flowStates` returns
|
|
3
|
+
* it. An instance with no entry is one this agent has neither derived nor
|
|
4
|
+
* minted here: a client must not guess its state.
|
|
5
|
+
*/
|
|
6
|
+
export type FlowStateEntry = {
|
|
7
|
+
instance: string;
|
|
8
|
+
/**
|
|
9
|
+
* The state this agent's pass last derived. `None` for a row seeded at
|
|
10
|
+
* mint and not derived yet: the instance stands at its flow's first
|
|
11
|
+
* state, which only the flow definition names.
|
|
12
|
+
*/
|
|
13
|
+
currentState: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* RFC 3339 time of the pass that last wrote this state; `None` with it.
|
|
16
|
+
*/
|
|
17
|
+
derivedAt: string | null;
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One ICE server entry as understood by browser `RTCConfiguration` —
|
|
3
|
+
* mirrors the WebIDL shape so clients can pass it through unchanged.
|
|
4
|
+
*/
|
|
5
|
+
export type IceServer = {
|
|
6
|
+
/**
|
|
7
|
+
* One or more URLs (`stun:`, `turn:`, `turns:`).
|
|
8
|
+
*/
|
|
9
|
+
urls: Array<string>;
|
|
10
|
+
/**
|
|
11
|
+
* TURN username, when applicable.
|
|
12
|
+
*/
|
|
13
|
+
username?: string;
|
|
14
|
+
/**
|
|
15
|
+
* TURN long-term credential, when applicable.
|
|
16
|
+
*/
|
|
17
|
+
credential?: string;
|
|
18
|
+
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { PerspectiveExpression } from "./PerspectiveExpression";
|
|
2
2
|
export type OnlineAgent = {
|
|
3
3
|
did: string;
|
|
4
|
+
/**
|
|
5
|
+
* Empty when the agent has not set a status: the link language reports
|
|
6
|
+
* such an agent with a `null` status.
|
|
7
|
+
*/
|
|
4
8
|
status: PerspectiveExpression;
|
|
5
9
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `perspective.flowStates`: the calling agent's recorded state of each flow
|
|
3
|
+
* instance (#1424). Instances it has not derived yet are absent.
|
|
4
|
+
*/
|
|
5
|
+
export type PerspectiveFlowStatesParams = {
|
|
6
|
+
uuid: string;
|
|
7
|
+
/**
|
|
8
|
+
* Narrow to these instance URIs; all of the agent's instances if absent.
|
|
9
|
+
*/
|
|
10
|
+
instances?: Array<string>;
|
|
11
|
+
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Wire names stay snake_case, as the handlers read them.
|
|
3
|
+
*
|
|
4
|
+
* Exactly one of `class_name` and `class_names`: one class, or one query over
|
|
5
|
+
* the union of several (#1238), whose rows carry `__subjectClass` and
|
|
6
|
+
* `__subjectClasses`.
|
|
3
7
|
*/
|
|
4
8
|
export type PerspectiveModelQueryParams = {
|
|
5
9
|
uuid: string;
|
|
6
|
-
class_name
|
|
10
|
+
class_name?: string;
|
|
11
|
+
class_names?: Array<string>;
|
|
7
12
|
query_json: string;
|
|
8
13
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reply to `perspective.subscribeQuery` / `perspective.modelSubscribe`:
|
|
3
|
+
* the first result, as JSON, at its revision (0 unless a change was
|
|
4
|
+
* published while it was computed).
|
|
5
|
+
*/
|
|
6
|
+
export type PerspectiveSubscribed = {
|
|
7
|
+
subscriptionId: string;
|
|
8
|
+
result: any;
|
|
9
|
+
revision: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The change from revision `revision - 1` to `revision` (see
|
|
3
|
+
* `perspective_instance::subscriptions::result_delta`): model results
|
|
4
|
+
* carry `ids`, `upsert` and `totalCount`; query results carry `added` and
|
|
5
|
+
* `removed` rows; a result that could not be diffed comes whole as
|
|
6
|
+
* `result`.
|
|
7
|
+
*/
|
|
8
|
+
export type QuerySubscriptionUpdate = {
|
|
9
|
+
perspectiveUuid: string;
|
|
10
|
+
uuid: string;
|
|
11
|
+
subscriptionId: string;
|
|
12
|
+
revision: number;
|
|
13
|
+
ids?: Array<string>;
|
|
14
|
+
upsert?: Array<any>;
|
|
15
|
+
totalCount?: number;
|
|
16
|
+
added?: Array<any>;
|
|
17
|
+
removed?: Array<any>;
|
|
18
|
+
result?: any;
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { QuerySubscriptionUpdate } from "./QuerySubscriptionUpdate";
|
|
2
|
+
import type { QueryUpdatesLagged } from "./QueryUpdatesLagged";
|
|
3
|
+
/**
|
|
4
|
+
* `query-subscription-update`: one change to a live query, delivered only
|
|
5
|
+
* to the connection that opened it, or [`QueryUpdatesLagged`].
|
|
6
|
+
*/
|
|
7
|
+
export type QuerySubscriptionUpdateEvent = QuerySubscriptionUpdate | QueryUpdatesLagged;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|