@coasys/ad4m 0.13.1-staging.11 → 0.13.1-staging.13
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 +547 -72
- package/lib/index.js +547 -72
- package/lib/src/apiClient.d.ts +7 -2
- package/lib/src/apiClient.js +3 -2
- package/lib/src/generated/api/AISessionMessage.d.ts +4 -3
- package/lib/src/generated/api/AiEndpoint.d.ts +3 -2
- package/lib/src/generated/api/Cardinality.d.ts +7 -0
- package/lib/src/generated/api/Cardinality.js +2 -0
- package/lib/src/generated/api/CascadeStep.d.ts +12 -0
- package/lib/src/generated/api/CascadeStep.js +2 -0
- package/lib/src/generated/api/CollectionItemAdded.d.ts +14 -0
- package/lib/src/generated/api/CollectionItemAdded.js +2 -0
- package/lib/src/generated/api/CollectionItemRemoved.d.ts +12 -0
- package/lib/src/generated/api/CollectionItemRemoved.js +2 -0
- package/lib/src/generated/api/CollectionItems.d.ts +7 -0
- package/lib/src/generated/api/CollectionItems.js +2 -0
- package/lib/src/generated/api/ConfigChanged.d.ts +8 -0
- package/lib/src/generated/api/ConfigChanged.js +2 -0
- package/lib/src/generated/api/ConfigKeyInfo.d.ts +10 -0
- package/lib/src/generated/api/ConfigKeyInfo.js +1 -0
- package/lib/src/generated/api/ConfigRefusal.d.ts +6 -0
- package/lib/src/generated/api/ConfigRefusal.js +1 -0
- package/lib/src/generated/api/DeviceKeys.d.ts +9 -0
- package/lib/src/generated/api/DeviceKeys.js +2 -0
- package/lib/src/generated/api/Events.d.ts +2 -0
- package/lib/src/generated/api/InstanceAddToCollection.d.ts +16 -0
- package/lib/src/generated/api/InstanceAddToCollection.js +2 -0
- package/lib/src/generated/api/InstanceCreate.d.ts +31 -0
- package/lib/src/generated/api/InstanceCreate.js +2 -0
- package/lib/src/generated/api/InstanceCreated.d.ts +17 -0
- package/lib/src/generated/api/InstanceCreated.js +1 -0
- package/lib/src/generated/api/InstanceError.d.ts +55 -0
- package/lib/src/generated/api/InstanceError.js +1 -0
- package/lib/src/generated/api/InstanceRemove.d.ts +12 -0
- package/lib/src/generated/api/InstanceRemove.js +2 -0
- package/lib/src/generated/api/InstanceRemoveFromCollection.d.ts +16 -0
- package/lib/src/generated/api/InstanceRemoveFromCollection.js +2 -0
- package/lib/src/generated/api/InstanceRemoved.d.ts +10 -0
- package/lib/src/generated/api/InstanceRemoved.js +2 -0
- package/lib/src/generated/api/InstanceUpdate.d.ts +15 -0
- package/lib/src/generated/api/InstanceUpdate.js +2 -0
- package/lib/src/generated/api/InstanceUpdated.d.ts +5 -0
- package/lib/src/generated/api/InstanceUpdated.js +2 -0
- package/lib/src/generated/api/KeyClass.d.ts +4 -0
- package/lib/src/generated/api/KeyClass.js +2 -0
- package/lib/src/generated/api/LogTail.d.ts +6 -0
- package/lib/src/generated/api/LogTail.js +2 -0
- package/lib/src/generated/api/LogTailParams.d.ts +9 -0
- package/lib/src/generated/api/LogTailParams.js +2 -0
- package/lib/src/generated/api/PerspectiveInstanceAddToCollectionParams.d.ts +14 -0
- package/lib/src/generated/api/PerspectiveInstanceAddToCollectionParams.js +2 -0
- package/lib/src/generated/api/PerspectiveInstanceCreateParams.d.ts +29 -0
- package/lib/src/generated/api/PerspectiveInstanceCreateParams.js +2 -0
- package/lib/src/generated/api/PerspectiveInstanceRemoveFromCollectionParams.d.ts +14 -0
- package/lib/src/generated/api/PerspectiveInstanceRemoveFromCollectionParams.js +2 -0
- package/lib/src/generated/api/PerspectiveInstanceRemoveParams.d.ts +9 -0
- package/lib/src/generated/api/PerspectiveInstanceRemoveParams.js +2 -0
- package/lib/src/generated/api/PerspectiveInstanceUpdateParams.d.ts +13 -0
- package/lib/src/generated/api/PerspectiveInstanceUpdateParams.js +2 -0
- package/lib/src/generated/api/Pinned.d.ts +5 -0
- package/lib/src/generated/api/Pinned.js +2 -0
- package/lib/src/generated/api/ReadOnlyReason.d.ts +4 -0
- package/lib/src/generated/api/ReadOnlyReason.js +2 -0
- package/lib/src/generated/api/RefusalReason.d.ts +4 -0
- package/lib/src/generated/api/RefusalReason.js +2 -0
- package/lib/src/generated/api/RpcMethods.d.ts +60 -0
- package/lib/src/generated/api/RpcMethods.js +3 -0
- package/lib/src/generated/api/RuntimeConfig.d.ts +23 -0
- package/lib/src/generated/api/RuntimeConfig.js +1 -0
- package/lib/src/generated/api/SetConfigParams.d.ts +7 -0
- package/lib/src/generated/api/SetConfigParams.js +2 -0
- package/lib/src/generated/api/SetConfigResult.d.ts +8 -0
- package/lib/src/generated/api/SetConfigResult.js +1 -0
- package/lib/src/generated/api/ValidationError.d.ts +34 -0
- package/lib/src/generated/api/ValidationError.js +1 -0
- package/lib/src/generated/api/ValidationProblem.d.ts +34 -0
- package/lib/src/generated/api/ValidationProblem.js +1 -0
- package/lib/src/generated/api/WriteStep.d.ts +37 -0
- package/lib/src/generated/api/WriteStep.js +2 -0
- package/lib/src/generated/api/index.d.ts +30 -0
- package/lib/src/identity/IdentityClient.d.ts +14 -0
- package/lib/src/identity/IdentityClient.js +17 -0
- package/lib/src/model/shacl-gen.js +4 -2
- package/lib/src/neighbourhood/MeshManager.d.ts +17 -1
- package/lib/src/neighbourhood/MeshManager.js +17 -0
- package/lib/src/neighbourhood/NeighbourhoodProxy.d.ts +7 -2
- package/lib/src/neighbourhood/NeighbourhoodProxy.js +7 -2
- package/lib/src/neighbourhood/Session.d.ts +5 -3
- package/lib/src/neighbourhood/Session.js +171 -26
- package/lib/src/perspectives/PerspectiveClient.d.ts +34 -0
- package/lib/src/perspectives/PerspectiveClient.js +45 -0
- package/lib/src/perspectives/PerspectiveProxy.d.ts +33 -0
- package/lib/src/perspectives/PerspectiveProxy.js +67 -2
- package/lib/src/perspectives/WakerSubscriptionManager.d.ts +23 -1
- package/lib/src/perspectives/WakerSubscriptionManager.js +187 -36
- package/lib/src/runtime/RuntimeClient.d.ts +13 -1
- package/lib/src/runtime/RuntimeClient.js +20 -0
- package/lib/src/shacl/SHACLShape.js +6 -2
- package/package.json +2 -2
- package/src/Ad4mClient.test.ts +118 -2
- package/src/apiClient.ts +10 -4
- package/src/generated/api/AISessionMessage.ts +4 -3
- package/src/generated/api/AiEndpoint.ts +3 -2
- package/src/generated/api/Cardinality.ts +6 -0
- package/src/generated/api/CascadeStep.ts +6 -0
- package/src/generated/api/CollectionItemAdded.ts +11 -0
- package/src/generated/api/CollectionItemRemoved.ts +9 -0
- package/src/generated/api/CollectionItems.ts +6 -0
- package/src/generated/api/ConfigChanged.ts +7 -0
- package/src/generated/api/ConfigKeyInfo.ts +8 -0
- package/src/generated/api/ConfigRefusal.ts +4 -0
- package/src/generated/api/DeviceKeys.ts +8 -0
- package/src/generated/api/Events.ts +2 -0
- package/src/generated/api/InstanceAddToCollection.ts +14 -0
- package/src/generated/api/InstanceCreate.ts +32 -0
- package/src/generated/api/InstanceCreated.ts +16 -0
- package/src/generated/api/InstanceError.ts +10 -0
- package/src/generated/api/InstanceRemove.ts +11 -0
- package/src/generated/api/InstanceRemoveFromCollection.ts +14 -0
- package/src/generated/api/InstanceRemoved.ts +9 -0
- package/src/generated/api/InstanceUpdate.ts +14 -0
- package/src/generated/api/InstanceUpdated.ts +3 -0
- package/src/generated/api/KeyClass.ts +6 -0
- package/src/generated/api/LogTail.ts +6 -0
- package/src/generated/api/LogTailParams.ts +10 -0
- package/src/generated/api/PerspectiveInstanceAddToCollectionParams.ts +11 -0
- package/src/generated/api/PerspectiveInstanceCreateParams.ts +29 -0
- package/src/generated/api/PerspectiveInstanceRemoveFromCollectionParams.ts +11 -0
- package/src/generated/api/PerspectiveInstanceRemoveParams.ts +7 -0
- package/src/generated/api/PerspectiveInstanceUpdateParams.ts +11 -0
- package/src/generated/api/Pinned.ts +7 -0
- package/src/generated/api/ReadOnlyReason.ts +6 -0
- package/src/generated/api/RefusalReason.ts +6 -0
- package/src/generated/api/RpcMethods.ts +30 -0
- package/src/generated/api/RuntimeConfig.ts +24 -0
- package/src/generated/api/SetConfigParams.ts +6 -0
- package/src/generated/api/SetConfigResult.ts +7 -0
- package/src/generated/api/ValidationError.ts +34 -0
- package/src/generated/api/ValidationProblem.ts +7 -0
- package/src/generated/api/WriteStep.ts +6 -0
- package/src/generated/api/index.ts +34 -0
- package/src/identity/IdentityClient.ts +20 -0
- package/src/model/shacl-gen.ts +4 -2
- package/src/neighbourhood/MeshManager.test.ts +57 -0
- package/src/neighbourhood/MeshManager.ts +26 -0
- package/src/neighbourhood/NeighbourhoodProxy.ts +7 -2
- package/src/neighbourhood/Session.test.ts +355 -3
- package/src/neighbourhood/Session.ts +170 -28
- package/src/perspectives/PerspectiveClient.ts +56 -0
- package/src/perspectives/PerspectiveProxy.test.ts +34 -0
- package/src/perspectives/PerspectiveProxy.ts +76 -2
- package/src/perspectives/WakerSubscriptionManager.test.ts +379 -1
- package/src/perspectives/WakerSubscriptionManager.ts +189 -41
- package/src/runtime/RuntimeClient.ts +25 -1
- package/src/shacl/SHACLFlow.test.ts +4 -2
- package/src/shacl/SHACLShape.test.ts +10 -3
- package/src/shacl/SHACLShape.ts +6 -2
|
@@ -38,6 +38,8 @@ import type { Apps } from "./Apps";
|
|
|
38
38
|
import type { CallSessionInfo } from "./CallSessionInfo";
|
|
39
39
|
import type { ClaimOfferParams } from "./ClaimOfferParams";
|
|
40
40
|
import type { ClaimOfferResult } from "./ClaimOfferResult";
|
|
41
|
+
import type { CollectionItemAdded } from "./CollectionItemAdded";
|
|
42
|
+
import type { CollectionItemRemoved } from "./CollectionItemRemoved";
|
|
41
43
|
import type { ComputeLogEntry } from "./ComputeLogEntry";
|
|
42
44
|
import type { CosignInceptParams } from "./CosignInceptParams";
|
|
43
45
|
import type { CreateExpressionRequest } from "./CreateExpressionRequest";
|
|
@@ -46,6 +48,7 @@ import type { CreateUserRequest } from "./CreateUserRequest";
|
|
|
46
48
|
import type { DecoratedLinkExpression } from "./DecoratedLinkExpression";
|
|
47
49
|
import type { DecoratedPerspective } from "./DecoratedPerspective";
|
|
48
50
|
import type { DetectedEndpoint } from "./DetectedEndpoint";
|
|
51
|
+
import type { DeviceKeys } from "./DeviceKeys";
|
|
49
52
|
import type { DeviceView } from "./DeviceView";
|
|
50
53
|
import type { DidResolutionResult } from "./DidResolutionResult";
|
|
51
54
|
import type { DiscoveredModel } from "./DiscoveredModel";
|
|
@@ -72,6 +75,9 @@ import type { IdentityLog } from "./IdentityLog";
|
|
|
72
75
|
import type { IdentityStatus } from "./IdentityStatus";
|
|
73
76
|
import type { ImportAgentRequest } from "./ImportAgentRequest";
|
|
74
77
|
import type { ImportRequest } from "./ImportRequest";
|
|
78
|
+
import type { InstanceCreated } from "./InstanceCreated";
|
|
79
|
+
import type { InstanceRemoved } from "./InstanceRemoved";
|
|
80
|
+
import type { InstanceUpdated } from "./InstanceUpdated";
|
|
75
81
|
import type { InteractionMeta } from "./InteractionMeta";
|
|
76
82
|
import type { JoinNeighbourhoodRequest } from "./JoinNeighbourhoodRequest";
|
|
77
83
|
import type { JoinStatus } from "./JoinStatus";
|
|
@@ -91,6 +97,8 @@ import type { LocalAiRemoveParams } from "./LocalAiRemoveParams";
|
|
|
91
97
|
import type { LocalAiStatus } from "./LocalAiStatus";
|
|
92
98
|
import type { LockAgentRequest } from "./LockAgentRequest";
|
|
93
99
|
import type { LogParams } from "./LogParams";
|
|
100
|
+
import type { LogTail } from "./LogTail";
|
|
101
|
+
import type { LogTailParams } from "./LogTailParams";
|
|
94
102
|
import type { Model } from "./Model";
|
|
95
103
|
import type { ModelStatus } from "./ModelStatus";
|
|
96
104
|
import type { NeighbourhoodBroadcastParams } from "./NeighbourhoodBroadcastParams";
|
|
@@ -127,6 +135,11 @@ import type { PerspectiveFlowValidOutputsParams } from "./PerspectiveFlowValidOu
|
|
|
127
135
|
import type { PerspectiveGetAllShaclParams } from "./PerspectiveGetAllShaclParams";
|
|
128
136
|
import type { PerspectiveGetSubjectDataParams } from "./PerspectiveGetSubjectDataParams";
|
|
129
137
|
import type { PerspectiveHandle } from "./PerspectiveHandle";
|
|
138
|
+
import type { PerspectiveInstanceAddToCollectionParams } from "./PerspectiveInstanceAddToCollectionParams";
|
|
139
|
+
import type { PerspectiveInstanceCreateParams } from "./PerspectiveInstanceCreateParams";
|
|
140
|
+
import type { PerspectiveInstanceRemoveFromCollectionParams } from "./PerspectiveInstanceRemoveFromCollectionParams";
|
|
141
|
+
import type { PerspectiveInstanceRemoveParams } from "./PerspectiveInstanceRemoveParams";
|
|
142
|
+
import type { PerspectiveInstanceUpdateParams } from "./PerspectiveInstanceUpdateParams";
|
|
130
143
|
import type { PerspectiveLinkDiff } from "./PerspectiveLinkDiff";
|
|
131
144
|
import type { PerspectiveLinkMutationsParams } from "./PerspectiveLinkMutationsParams";
|
|
132
145
|
import type { PerspectiveMintFlowReceiptParams } from "./PerspectiveMintFlowReceiptParams";
|
|
@@ -169,6 +182,7 @@ import type { RunAgentRequest } from "./RunAgentRequest";
|
|
|
169
182
|
import type { RunInterpretationRequest } from "./RunInterpretationRequest";
|
|
170
183
|
import type { RunInterpretationWithHarnessRequest } from "./RunInterpretationWithHarnessRequest";
|
|
171
184
|
import type { RuntimeComputeLogParams } from "./RuntimeComputeLogParams";
|
|
185
|
+
import type { RuntimeConfig } from "./RuntimeConfig";
|
|
172
186
|
import type { RuntimeFriendStatusParams } from "./RuntimeFriendStatusParams";
|
|
173
187
|
import type { RuntimeGrantNotificationParams } from "./RuntimeGrantNotificationParams";
|
|
174
188
|
import type { RuntimeImportResult } from "./RuntimeImportResult";
|
|
@@ -180,6 +194,8 @@ import type { RuntimeUnytSendHotParams } from "./RuntimeUnytSendHotParams";
|
|
|
180
194
|
import type { RuntimeUnytWalletHistoryParams } from "./RuntimeUnytWalletHistoryParams";
|
|
181
195
|
import type { RuntimeUpdateNotificationParams } from "./RuntimeUpdateNotificationParams";
|
|
182
196
|
import type { SentMessage } from "./SentMessage";
|
|
197
|
+
import type { SetConfigParams } from "./SetConfigParams";
|
|
198
|
+
import type { SetConfigResult } from "./SetConfigResult";
|
|
183
199
|
import type { SetHostRatesRequest } from "./SetHostRatesRequest";
|
|
184
200
|
import type { SetHotWalletAddressRequest } from "./SetHotWalletAddressRequest";
|
|
185
201
|
import type { SetMultiUserRequest } from "./SetMultiUserRequest";
|
|
@@ -532,6 +548,10 @@ export interface RpcMethods {
|
|
|
532
548
|
params: CosignInceptParams;
|
|
533
549
|
result: JsonValue;
|
|
534
550
|
};
|
|
551
|
+
"identity.custodyStatus": {
|
|
552
|
+
params: Record<string, never>;
|
|
553
|
+
result: DeviceKeys;
|
|
554
|
+
};
|
|
535
555
|
"identity.devices": {
|
|
536
556
|
params: Record<string, never>;
|
|
537
557
|
result: Array<DeviceView>;
|
|
@@ -556,6 +576,10 @@ export interface RpcMethods {
|
|
|
556
576
|
params: PublishParams;
|
|
557
577
|
result: SignedHead;
|
|
558
578
|
};
|
|
579
|
+
"identity.rekey": {
|
|
580
|
+
params: Record<string, never>;
|
|
581
|
+
result: DeviceKeys;
|
|
582
|
+
};
|
|
559
583
|
"identity.resetLog": {
|
|
560
584
|
params: ResetLogParams;
|
|
561
585
|
result: boolean;
|
|
@@ -740,6 +764,26 @@ export interface RpcMethods {
|
|
|
740
764
|
params: PerspectiveGetSubjectDataParams;
|
|
741
765
|
result: string;
|
|
742
766
|
};
|
|
767
|
+
"perspective.instanceAddToCollection": {
|
|
768
|
+
params: PerspectiveInstanceAddToCollectionParams;
|
|
769
|
+
result: CollectionItemAdded;
|
|
770
|
+
};
|
|
771
|
+
"perspective.instanceCreate": {
|
|
772
|
+
params: PerspectiveInstanceCreateParams;
|
|
773
|
+
result: InstanceCreated;
|
|
774
|
+
};
|
|
775
|
+
"perspective.instanceRemove": {
|
|
776
|
+
params: PerspectiveInstanceRemoveParams;
|
|
777
|
+
result: InstanceRemoved;
|
|
778
|
+
};
|
|
779
|
+
"perspective.instanceRemoveFromCollection": {
|
|
780
|
+
params: PerspectiveInstanceRemoveFromCollectionParams;
|
|
781
|
+
result: CollectionItemRemoved;
|
|
782
|
+
};
|
|
783
|
+
"perspective.instanceUpdate": {
|
|
784
|
+
params: PerspectiveInstanceUpdateParams;
|
|
785
|
+
result: InstanceUpdated;
|
|
786
|
+
};
|
|
743
787
|
"perspective.interpretationOverlays": {
|
|
744
788
|
params: PerspectiveUuidParams;
|
|
745
789
|
result: Array<OverlayView>;
|
|
@@ -874,6 +918,10 @@ export interface RpcMethods {
|
|
|
874
918
|
params: RuntimeComputeLogParams;
|
|
875
919
|
result: Array<ComputeLogEntry>;
|
|
876
920
|
};
|
|
921
|
+
"runtime.config": {
|
|
922
|
+
params: Record<string, never>;
|
|
923
|
+
result: RuntimeConfig;
|
|
924
|
+
};
|
|
877
925
|
"runtime.createNotification": {
|
|
878
926
|
params: NotificationInput;
|
|
879
927
|
result: string;
|
|
@@ -926,6 +974,10 @@ export interface RpcMethods {
|
|
|
926
974
|
params: Record<string, never>;
|
|
927
975
|
result: Array<LanguageMeta>;
|
|
928
976
|
};
|
|
977
|
+
"runtime.logTail": {
|
|
978
|
+
params: LogTailParams;
|
|
979
|
+
result: LogTail;
|
|
980
|
+
};
|
|
929
981
|
"runtime.networkMetrics": {
|
|
930
982
|
params: Record<string, never>;
|
|
931
983
|
result: string;
|
|
@@ -954,6 +1006,10 @@ export interface RpcMethods {
|
|
|
954
1006
|
params: LinkLanguageTemplatesRequest;
|
|
955
1007
|
result: Array<string>;
|
|
956
1008
|
};
|
|
1009
|
+
"runtime.restart": {
|
|
1010
|
+
params: Record<string, never>;
|
|
1011
|
+
result: boolean;
|
|
1012
|
+
};
|
|
957
1013
|
"runtime.restartHolochain": {
|
|
958
1014
|
params: Record<string, never>;
|
|
959
1015
|
result: boolean;
|
|
@@ -962,6 +1018,10 @@ export interface RpcMethods {
|
|
|
962
1018
|
params: RuntimeSendFriendMessageParams;
|
|
963
1019
|
result: boolean;
|
|
964
1020
|
};
|
|
1021
|
+
"runtime.setConfig": {
|
|
1022
|
+
params: SetConfigParams;
|
|
1023
|
+
result: SetConfigResult;
|
|
1024
|
+
};
|
|
965
1025
|
"runtime.setFreeHostingEnabled": {
|
|
966
1026
|
params: RuntimeSetFreeHostingEnabledParams;
|
|
967
1027
|
result: boolean;
|
|
@@ -31,6 +31,7 @@ export const READ_METHODS = new Set([
|
|
|
31
31
|
"hosting.info",
|
|
32
32
|
"hosting.wallet",
|
|
33
33
|
"hosting.walletHistory",
|
|
34
|
+
"identity.custodyStatus",
|
|
34
35
|
"identity.devices",
|
|
35
36
|
"identity.joinStatus",
|
|
36
37
|
"identity.log",
|
|
@@ -65,6 +66,7 @@ export const READ_METHODS = new Set([
|
|
|
65
66
|
"perspective.subjectClassesOf",
|
|
66
67
|
"perspective.verifyFlowReceipt",
|
|
67
68
|
"runtime.computeLog",
|
|
69
|
+
"runtime.config",
|
|
68
70
|
"runtime.freeHostingEnabled",
|
|
69
71
|
"runtime.friendStatus",
|
|
70
72
|
"runtime.friends",
|
|
@@ -73,6 +75,7 @@ export const READ_METHODS = new Set([
|
|
|
73
75
|
"runtime.inbox",
|
|
74
76
|
"runtime.info",
|
|
75
77
|
"runtime.linkLanguageTemplates",
|
|
78
|
+
"runtime.logTail",
|
|
76
79
|
"runtime.networkMetrics",
|
|
77
80
|
"runtime.notifications",
|
|
78
81
|
"runtime.outbox",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ConfigKeyInfo } from "./ConfigKeyInfo";
|
|
2
|
+
/**
|
|
3
|
+
* `runtime.config` result.
|
|
4
|
+
*/
|
|
5
|
+
export type RuntimeConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* The file's keys and values: what the next start reads. The file holds no secret (a
|
|
8
|
+
* secret is named by a `*_file` path), and a secret pasted into it is left out.
|
|
9
|
+
*/
|
|
10
|
+
values: Record<string, unknown>;
|
|
11
|
+
/**
|
|
12
|
+
* Every key `runtime.setConfig` knows, with its class.
|
|
13
|
+
*/
|
|
14
|
+
keys: Array<ConfigKeyInfo>;
|
|
15
|
+
/**
|
|
16
|
+
* A write since this start waits for the next start.
|
|
17
|
+
*/
|
|
18
|
+
restartPending: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The file the executor started with, `null` without `--config`.
|
|
21
|
+
*/
|
|
22
|
+
file: string | null;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Cardinality } from "./Cardinality";
|
|
2
|
+
import type { ValidationProblem } from "./ValidationProblem";
|
|
3
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
4
|
+
/**
|
|
5
|
+
* One rejected property.
|
|
6
|
+
*/
|
|
7
|
+
export type ValidationError = {
|
|
8
|
+
/**
|
|
9
|
+
* The property as the class names it, or as the caller wrote it when the class has none.
|
|
10
|
+
*/
|
|
11
|
+
property: string;
|
|
12
|
+
problem: ValidationProblem;
|
|
13
|
+
/**
|
|
14
|
+
* The property's type: `string`, `boolean`, `integer`, `number`, `datetime`, `reference`,
|
|
15
|
+
* or a custom datatype's local name. `None` for an unknown property.
|
|
16
|
+
*/
|
|
17
|
+
expectedType: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* `None` for an unknown property.
|
|
20
|
+
*/
|
|
21
|
+
cardinality: Cardinality | null;
|
|
22
|
+
/**
|
|
23
|
+
* The property's `sh:in` values, in declared order, when it has a list.
|
|
24
|
+
*/
|
|
25
|
+
allowedValues: Array<JsonValue> | null;
|
|
26
|
+
/**
|
|
27
|
+
* The value the caller sent, when there was one.
|
|
28
|
+
*/
|
|
29
|
+
received: JsonValue | null;
|
|
30
|
+
/**
|
|
31
|
+
* For a collection item, its index in the array the caller sent.
|
|
32
|
+
*/
|
|
33
|
+
item: number | null;
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReadOnlyReason } from "./ReadOnlyReason";
|
|
2
|
+
/**
|
|
3
|
+
* What is wrong with a property.
|
|
4
|
+
*/
|
|
5
|
+
export type ValidationProblem = {
|
|
6
|
+
"kind": "unknownProperty";
|
|
7
|
+
class: string;
|
|
8
|
+
available: Array<string>;
|
|
9
|
+
} | {
|
|
10
|
+
"kind": "unknownCollection";
|
|
11
|
+
class: string;
|
|
12
|
+
available: Array<string>;
|
|
13
|
+
} | {
|
|
14
|
+
"kind": "readOnly";
|
|
15
|
+
reason: ReadOnlyReason;
|
|
16
|
+
} | {
|
|
17
|
+
"kind": "collectionNotSettable";
|
|
18
|
+
} | {
|
|
19
|
+
"kind": "notACollection";
|
|
20
|
+
} | {
|
|
21
|
+
"kind": "arrayForScalar";
|
|
22
|
+
length: number;
|
|
23
|
+
} | {
|
|
24
|
+
"kind": "null";
|
|
25
|
+
} | {
|
|
26
|
+
"kind": "notAReference";
|
|
27
|
+
targetClass: string;
|
|
28
|
+
} | {
|
|
29
|
+
"kind": "wrongType";
|
|
30
|
+
} | {
|
|
31
|
+
"kind": "notAllowed";
|
|
32
|
+
} | {
|
|
33
|
+
"kind": "missingRequired";
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a write was doing when the store failed.
|
|
3
|
+
*/
|
|
4
|
+
export type WriteStep = {
|
|
5
|
+
"step": "readShape";
|
|
6
|
+
} | {
|
|
7
|
+
"step": "readInstance";
|
|
8
|
+
} | {
|
|
9
|
+
"step": "checkExisting";
|
|
10
|
+
baseUri: string;
|
|
11
|
+
} | {
|
|
12
|
+
"step": "resolveCollection";
|
|
13
|
+
collection: string;
|
|
14
|
+
} | {
|
|
15
|
+
"step": "readCollection";
|
|
16
|
+
collection: string;
|
|
17
|
+
} | {
|
|
18
|
+
"step": "createSubject";
|
|
19
|
+
} | {
|
|
20
|
+
"step": "updateSubject";
|
|
21
|
+
} | {
|
|
22
|
+
"step": "removeSubject";
|
|
23
|
+
} | {
|
|
24
|
+
"step": "addCollectionItem";
|
|
25
|
+
collection: string;
|
|
26
|
+
item: string;
|
|
27
|
+
} | {
|
|
28
|
+
"step": "removeCollectionItem";
|
|
29
|
+
collection: string;
|
|
30
|
+
item: string;
|
|
31
|
+
removed: number;
|
|
32
|
+
} | {
|
|
33
|
+
"step": "addToParent";
|
|
34
|
+
parent: string;
|
|
35
|
+
} | {
|
|
36
|
+
"step": "commit";
|
|
37
|
+
};
|
|
@@ -72,6 +72,17 @@ export type { UpdateLinkRequest } from "./UpdateLinkRequest";
|
|
|
72
72
|
export type { UpdatePerspectiveRequest } from "./UpdatePerspectiveRequest";
|
|
73
73
|
export type { VerifySignatureRequest } from "./VerifySignatureRequest";
|
|
74
74
|
export type { WriteSettingsRequest } from "./WriteSettingsRequest";
|
|
75
|
+
export type { ConfigChanged } from "./ConfigChanged";
|
|
76
|
+
export type { ConfigKeyInfo } from "./ConfigKeyInfo";
|
|
77
|
+
export type { ConfigRefusal } from "./ConfigRefusal";
|
|
78
|
+
export type { KeyClass } from "./KeyClass";
|
|
79
|
+
export type { LogTail } from "./LogTail";
|
|
80
|
+
export type { LogTailParams } from "./LogTailParams";
|
|
81
|
+
export type { Pinned } from "./Pinned";
|
|
82
|
+
export type { RefusalReason } from "./RefusalReason";
|
|
83
|
+
export type { RuntimeConfig } from "./RuntimeConfig";
|
|
84
|
+
export type { SetConfigParams } from "./SetConfigParams";
|
|
85
|
+
export type { SetConfigResult } from "./SetConfigResult";
|
|
75
86
|
export type { AiCapability } from "./AiCapability";
|
|
76
87
|
export type { AiDiscoverModelsParams } from "./AiDiscoverModelsParams";
|
|
77
88
|
export type { AiEndpoint } from "./AiEndpoint";
|
|
@@ -93,6 +104,7 @@ export type { ClaimOfferParams } from "./ClaimOfferParams";
|
|
|
93
104
|
export type { ClaimOfferResult } from "./ClaimOfferResult";
|
|
94
105
|
export type { ClaimView } from "./ClaimView";
|
|
95
106
|
export type { CosignInceptParams } from "./CosignInceptParams";
|
|
107
|
+
export type { DeviceKeys } from "./DeviceKeys";
|
|
96
108
|
export type { DeviceView } from "./DeviceView";
|
|
97
109
|
export type { DidBotScope } from "./DidBotScope";
|
|
98
110
|
export type { DidDocument } from "./DidDocument";
|
|
@@ -125,6 +137,24 @@ export type { SignedRequest } from "./SignedRequest";
|
|
|
125
137
|
export type { SkippedSource } from "./SkippedSource";
|
|
126
138
|
export type { StoreBehind } from "./StoreBehind";
|
|
127
139
|
export type { StoreInfo } from "./StoreInfo";
|
|
140
|
+
export type { InstanceCreate } from "./InstanceCreate";
|
|
141
|
+
export type { InstanceUpdate } from "./InstanceUpdate";
|
|
142
|
+
export type { InstanceRemove } from "./InstanceRemove";
|
|
143
|
+
export type { InstanceAddToCollection } from "./InstanceAddToCollection";
|
|
144
|
+
export type { InstanceRemoveFromCollection } from "./InstanceRemoveFromCollection";
|
|
145
|
+
export type { InstanceCreated } from "./InstanceCreated";
|
|
146
|
+
export type { InstanceUpdated } from "./InstanceUpdated";
|
|
147
|
+
export type { InstanceRemoved } from "./InstanceRemoved";
|
|
148
|
+
export type { CollectionItemAdded } from "./CollectionItemAdded";
|
|
149
|
+
export type { CollectionItemRemoved } from "./CollectionItemRemoved";
|
|
150
|
+
export type { CollectionItems } from "./CollectionItems";
|
|
151
|
+
export type { InstanceError } from "./InstanceError";
|
|
152
|
+
export type { ValidationError } from "./ValidationError";
|
|
153
|
+
export type { ValidationProblem } from "./ValidationProblem";
|
|
154
|
+
export type { ReadOnlyReason } from "./ReadOnlyReason";
|
|
155
|
+
export type { Cardinality } from "./Cardinality";
|
|
156
|
+
export type { WriteStep } from "./WriteStep";
|
|
157
|
+
export type { CascadeStep } from "./CascadeStep";
|
|
128
158
|
export { READ_METHODS, LONG_METHODS, OPENS_METHODS } from "./RpcMethods";
|
|
129
159
|
export type { RpcMethods, RpcMethod } from "./RpcMethods";
|
|
130
160
|
export { SCOPED_EVENTS } from "./Events";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ApiClient } from "../apiClient";
|
|
2
2
|
import type { ClaimOfferResult } from "../generated/api/ClaimOfferResult";
|
|
3
|
+
import type { DeviceKeys } from "../generated/api/DeviceKeys";
|
|
3
4
|
import type { DeviceView } from "../generated/api/DeviceView";
|
|
4
5
|
import type { DidResolutionResult } from "../generated/api/DidResolutionResult";
|
|
5
6
|
import type { IdentityLog } from "../generated/api/IdentityLog";
|
|
@@ -67,4 +68,17 @@ export declare class IdentityClient {
|
|
|
67
68
|
joinStatus(offerId: string): Promise<JoinStatus>;
|
|
68
69
|
/** The identity's device keys, from its log. */
|
|
69
70
|
devices(): Promise<DeviceView[]>;
|
|
71
|
+
/**
|
|
72
|
+
* A new main wallet key for this executor, so a revoked executor can link again. The old
|
|
73
|
+
* key stays for history. Only the operator on the executor's machine (the admin credential
|
|
74
|
+
* on a loopback listener). A caller without the admin credential gets 403 "Admin credential
|
|
75
|
+
* required"; the admin credential on a network listener gets 403 `local-only`.
|
|
76
|
+
*/
|
|
77
|
+
rekey(): Promise<DeviceKeys>;
|
|
78
|
+
/**
|
|
79
|
+
* The custody channel: the main agent's device keys (public keys only), the keys a master
|
|
80
|
+
* key sent to this computer is sealed to. Only the admin credential on a loopback listener
|
|
81
|
+
* of an executor started with `--custody-channel`; any other caller gets 403.
|
|
82
|
+
*/
|
|
83
|
+
custodyStatus(): Promise<DeviceKeys>;
|
|
70
84
|
}
|
|
@@ -93,5 +93,22 @@ export class IdentityClient {
|
|
|
93
93
|
async devices() {
|
|
94
94
|
return __classPrivateFieldGet(this, _IdentityClient_apiClient, "f").call("identity.devices", {});
|
|
95
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* A new main wallet key for this executor, so a revoked executor can link again. The old
|
|
98
|
+
* key stays for history. Only the operator on the executor's machine (the admin credential
|
|
99
|
+
* on a loopback listener). A caller without the admin credential gets 403 "Admin credential
|
|
100
|
+
* required"; the admin credential on a network listener gets 403 `local-only`.
|
|
101
|
+
*/
|
|
102
|
+
async rekey() {
|
|
103
|
+
return __classPrivateFieldGet(this, _IdentityClient_apiClient, "f").call("identity.rekey", {});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The custody channel: the main agent's device keys (public keys only), the keys a master
|
|
107
|
+
* key sent to this computer is sealed to. Only the admin credential on a loopback listener
|
|
108
|
+
* of an executor started with `--custody-channel`; any other caller gets 403.
|
|
109
|
+
*/
|
|
110
|
+
async custodyStatus() {
|
|
111
|
+
return __classPrivateFieldGet(this, _IdentityClient_apiClient, "f").call("identity.custodyStatus", {});
|
|
112
|
+
}
|
|
96
113
|
}
|
|
97
114
|
_IdentityClient_apiClient = new WeakMap();
|
|
@@ -181,8 +181,10 @@ isAbstract) {
|
|
|
181
181
|
if (propMeta.flag && propMeta.initial) {
|
|
182
182
|
propShape.hasValue = propMeta.initial;
|
|
183
183
|
}
|
|
184
|
-
// sh:in — allowed values (enum constraint)
|
|
185
|
-
|
|
184
|
+
// sh:in — allowed values (enum constraint). An explicit empty list
|
|
185
|
+
// is kept: it denies every value, which dropping would widen to
|
|
186
|
+
// unconstrained.
|
|
187
|
+
if (propMeta.options !== undefined) {
|
|
186
188
|
propShape.in = propMeta.options;
|
|
187
189
|
}
|
|
188
190
|
// AD4M-specific metadata
|
|
@@ -111,6 +111,14 @@ export type CallBody =
|
|
|
111
111
|
label: string;
|
|
112
112
|
data: string;
|
|
113
113
|
binary: boolean;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The sender is still in the call: sent to all on a timer by the session
|
|
117
|
+
* (`MeshManager.beat`), reported as the `beat` event. Not persisted. An SDK
|
|
118
|
+
* from before it parses it to nothing and drops it without a word.
|
|
119
|
+
*/
|
|
120
|
+
| {
|
|
121
|
+
kind: "beat";
|
|
114
122
|
};
|
|
115
123
|
export interface CallEnvelope extends CallGenerations {
|
|
116
124
|
v: number;
|
|
@@ -193,7 +201,9 @@ export type MeshEvent = "participant-joined" | "participant-left"
|
|
|
193
201
|
/** `(did, RTCPeerConnectionState)` */
|
|
194
202
|
| "peer-state"
|
|
195
203
|
/** `(did, { rung, attempts })` — a repair was attempted on this pair. */
|
|
196
|
-
| "peer-recovery"
|
|
204
|
+
| "peer-recovery"
|
|
205
|
+
/** `(did)` — a peer of this call beat ({@link MeshManager.beat}), listed in the roster or not. */
|
|
206
|
+
| "beat" | "error";
|
|
197
207
|
export type MeshEventCallback = (...args: any[]) => void;
|
|
198
208
|
/** Which rung of the recovery ladder an attempt was on. */
|
|
199
209
|
export type RecoveryRung = "ice-restart" | "resend" | "rebuild";
|
|
@@ -338,6 +348,12 @@ export declare class MeshManager {
|
|
|
338
348
|
* telepresence broadcast the SDP/ICE messages use.
|
|
339
349
|
*/
|
|
340
350
|
sendData(label: string, data: string, binary?: boolean): void;
|
|
351
|
+
/**
|
|
352
|
+
* Tell every peer of the call that this one is still in it. Through
|
|
353
|
+
* {@link publish}, so a beat's publish result is counted like any other
|
|
354
|
+
* send. Nothing once the mesh has left.
|
|
355
|
+
*/
|
|
356
|
+
beat(): void;
|
|
341
357
|
subscribeDataChannel(callback: (msg: SfuDataMessage) => void): () => void;
|
|
342
358
|
private handleData;
|
|
343
359
|
/** Every publish goes through here, so {@link outstanding} counts exactly the reported ones. */
|
|
@@ -121,6 +121,8 @@ export function parseCallMessage(payload) {
|
|
|
121
121
|
}
|
|
122
122
|
if (msg.kind === "reset")
|
|
123
123
|
return { ...envelope, kind: "reset" };
|
|
124
|
+
if (msg.kind === "beat")
|
|
125
|
+
return { ...envelope, kind: "beat" };
|
|
124
126
|
if (msg.kind === "data") {
|
|
125
127
|
const { label, data, binary } = msg;
|
|
126
128
|
if (typeof label !== "string" || typeof data !== "string")
|
|
@@ -440,6 +442,11 @@ export class MeshManager {
|
|
|
440
442
|
const to = payload.to;
|
|
441
443
|
if (typeof to === "string" && to !== TARGET_ALL && to !== this.selfId)
|
|
442
444
|
return;
|
|
445
|
+
// Liveness, not signalling: reported for any sender, never held.
|
|
446
|
+
if (message.kind === "beat") {
|
|
447
|
+
this.emit("beat", from);
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
443
450
|
// Only peers the roster placed in the call. Without this, anyone on
|
|
444
451
|
// the channel could open a connection by sending an offer.
|
|
445
452
|
const slot = this.slots.get(from);
|
|
@@ -611,6 +618,16 @@ export class MeshManager {
|
|
|
611
618
|
sendData(label, data, binary = false) {
|
|
612
619
|
this.publish({ v: CALL_PROTOCOL_VERSION, call: this.callId, to: TARGET_ALL, kind: "data", label, data, binary });
|
|
613
620
|
}
|
|
621
|
+
/**
|
|
622
|
+
* Tell every peer of the call that this one is still in it. Through
|
|
623
|
+
* {@link publish}, so a beat's publish result is counted like any other
|
|
624
|
+
* send. Nothing once the mesh has left.
|
|
625
|
+
*/
|
|
626
|
+
beat() {
|
|
627
|
+
if (this.closed)
|
|
628
|
+
return;
|
|
629
|
+
this.publish({ v: CALL_PROTOCOL_VERSION, call: this.callId, to: TARGET_ALL, kind: "beat" });
|
|
630
|
+
}
|
|
614
631
|
subscribeDataChannel(callback) {
|
|
615
632
|
this.dataListeners.add(callback);
|
|
616
633
|
return () => this.dataListeners.delete(callback);
|
|
@@ -23,9 +23,14 @@ export declare class NeighbourhoodProxy {
|
|
|
23
23
|
sendSignal(remoteAgentDid: string, payload: Perspective): Promise<boolean>;
|
|
24
24
|
/** Send an unsigned signal to a specific remote agent via the link language. */
|
|
25
25
|
sendSignalU(remoteAgentDid: string, payload: PerspectiveUnsignedInput): Promise<boolean>;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Broadcast a signed signal to all agents in the neighbourhood. The
|
|
28
|
+
* sender's own agent gets it too (its other clients hear it), so a handler
|
|
29
|
+
* that must not act on its own messages drops them by author or device;
|
|
30
|
+
* `loopback` adds a second copy for the sender's executor.
|
|
31
|
+
*/
|
|
27
32
|
sendBroadcast(payload: Perspective, loopback?: boolean): Promise<boolean>;
|
|
28
|
-
/** Broadcast an unsigned signal to all agents in the neighbourhood. */
|
|
33
|
+
/** Broadcast an unsigned signal to all agents in the neighbourhood; delivered as {@link sendBroadcast}. */
|
|
29
34
|
sendBroadcastU(payload: PerspectiveUnsignedInput, loopback?: boolean): Promise<boolean>;
|
|
30
35
|
/** Register a handler for incoming telepresence signals. */
|
|
31
36
|
addSignalHandler(handler: (payload: PerspectiveExpression) => void): Promise<void>;
|
|
@@ -63,11 +63,16 @@ export class NeighbourhoodProxy {
|
|
|
63
63
|
async sendSignalU(remoteAgentDid, payload) {
|
|
64
64
|
return await __classPrivateFieldGet(this, _NeighbourhoodProxy_client, "f").sendSignalU(__classPrivateFieldGet(this, _NeighbourhoodProxy_pID, "f"), remoteAgentDid, payload);
|
|
65
65
|
}
|
|
66
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Broadcast a signed signal to all agents in the neighbourhood. The
|
|
68
|
+
* sender's own agent gets it too (its other clients hear it), so a handler
|
|
69
|
+
* that must not act on its own messages drops them by author or device;
|
|
70
|
+
* `loopback` adds a second copy for the sender's executor.
|
|
71
|
+
*/
|
|
67
72
|
async sendBroadcast(payload, loopback = false) {
|
|
68
73
|
return await __classPrivateFieldGet(this, _NeighbourhoodProxy_client, "f").sendBroadcast(__classPrivateFieldGet(this, _NeighbourhoodProxy_pID, "f"), payload, loopback);
|
|
69
74
|
}
|
|
70
|
-
/** Broadcast an unsigned signal to all agents in the neighbourhood. */
|
|
75
|
+
/** Broadcast an unsigned signal to all agents in the neighbourhood; delivered as {@link sendBroadcast}. */
|
|
71
76
|
async sendBroadcastU(payload, loopback = false) {
|
|
72
77
|
return await __classPrivateFieldGet(this, _NeighbourhoodProxy_client, "f").sendBroadcastU(__classPrivateFieldGet(this, _NeighbourhoodProxy_pID, "f"), payload, loopback);
|
|
73
78
|
}
|
|
@@ -94,9 +94,11 @@ interface SessionImplConfig {
|
|
|
94
94
|
links: StatusLink[];
|
|
95
95
|
}) => Promise<boolean>;
|
|
96
96
|
/** This agent's current online status. The session adds its presence
|
|
97
|
-
* link to it and takes
|
|
98
|
-
* the presence of this agent's other
|
|
99
|
-
* reads from here too.
|
|
97
|
+
* link and marker to it at join and takes them out again at leave,
|
|
98
|
+
* leaving the app's own links and the presence of this agent's other
|
|
99
|
+
* live devices — which the mesh roster reads from here too. A device of
|
|
100
|
+
* this agent that stopped beating is taken out once, by the poll that
|
|
101
|
+
* finds it stale. */
|
|
100
102
|
ownOnlineStatus?: () => Promise<{
|
|
101
103
|
data?: {
|
|
102
104
|
links?: {
|