@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.
Files changed (157) hide show
  1. package/lib/index.cjs +547 -72
  2. package/lib/index.js +547 -72
  3. package/lib/src/apiClient.d.ts +7 -2
  4. package/lib/src/apiClient.js +3 -2
  5. package/lib/src/generated/api/AISessionMessage.d.ts +4 -3
  6. package/lib/src/generated/api/AiEndpoint.d.ts +3 -2
  7. package/lib/src/generated/api/Cardinality.d.ts +7 -0
  8. package/lib/src/generated/api/Cardinality.js +2 -0
  9. package/lib/src/generated/api/CascadeStep.d.ts +12 -0
  10. package/lib/src/generated/api/CascadeStep.js +2 -0
  11. package/lib/src/generated/api/CollectionItemAdded.d.ts +14 -0
  12. package/lib/src/generated/api/CollectionItemAdded.js +2 -0
  13. package/lib/src/generated/api/CollectionItemRemoved.d.ts +12 -0
  14. package/lib/src/generated/api/CollectionItemRemoved.js +2 -0
  15. package/lib/src/generated/api/CollectionItems.d.ts +7 -0
  16. package/lib/src/generated/api/CollectionItems.js +2 -0
  17. package/lib/src/generated/api/ConfigChanged.d.ts +8 -0
  18. package/lib/src/generated/api/ConfigChanged.js +2 -0
  19. package/lib/src/generated/api/ConfigKeyInfo.d.ts +10 -0
  20. package/lib/src/generated/api/ConfigKeyInfo.js +1 -0
  21. package/lib/src/generated/api/ConfigRefusal.d.ts +6 -0
  22. package/lib/src/generated/api/ConfigRefusal.js +1 -0
  23. package/lib/src/generated/api/DeviceKeys.d.ts +9 -0
  24. package/lib/src/generated/api/DeviceKeys.js +2 -0
  25. package/lib/src/generated/api/Events.d.ts +2 -0
  26. package/lib/src/generated/api/InstanceAddToCollection.d.ts +16 -0
  27. package/lib/src/generated/api/InstanceAddToCollection.js +2 -0
  28. package/lib/src/generated/api/InstanceCreate.d.ts +31 -0
  29. package/lib/src/generated/api/InstanceCreate.js +2 -0
  30. package/lib/src/generated/api/InstanceCreated.d.ts +17 -0
  31. package/lib/src/generated/api/InstanceCreated.js +1 -0
  32. package/lib/src/generated/api/InstanceError.d.ts +55 -0
  33. package/lib/src/generated/api/InstanceError.js +1 -0
  34. package/lib/src/generated/api/InstanceRemove.d.ts +12 -0
  35. package/lib/src/generated/api/InstanceRemove.js +2 -0
  36. package/lib/src/generated/api/InstanceRemoveFromCollection.d.ts +16 -0
  37. package/lib/src/generated/api/InstanceRemoveFromCollection.js +2 -0
  38. package/lib/src/generated/api/InstanceRemoved.d.ts +10 -0
  39. package/lib/src/generated/api/InstanceRemoved.js +2 -0
  40. package/lib/src/generated/api/InstanceUpdate.d.ts +15 -0
  41. package/lib/src/generated/api/InstanceUpdate.js +2 -0
  42. package/lib/src/generated/api/InstanceUpdated.d.ts +5 -0
  43. package/lib/src/generated/api/InstanceUpdated.js +2 -0
  44. package/lib/src/generated/api/KeyClass.d.ts +4 -0
  45. package/lib/src/generated/api/KeyClass.js +2 -0
  46. package/lib/src/generated/api/LogTail.d.ts +6 -0
  47. package/lib/src/generated/api/LogTail.js +2 -0
  48. package/lib/src/generated/api/LogTailParams.d.ts +9 -0
  49. package/lib/src/generated/api/LogTailParams.js +2 -0
  50. package/lib/src/generated/api/PerspectiveInstanceAddToCollectionParams.d.ts +14 -0
  51. package/lib/src/generated/api/PerspectiveInstanceAddToCollectionParams.js +2 -0
  52. package/lib/src/generated/api/PerspectiveInstanceCreateParams.d.ts +29 -0
  53. package/lib/src/generated/api/PerspectiveInstanceCreateParams.js +2 -0
  54. package/lib/src/generated/api/PerspectiveInstanceRemoveFromCollectionParams.d.ts +14 -0
  55. package/lib/src/generated/api/PerspectiveInstanceRemoveFromCollectionParams.js +2 -0
  56. package/lib/src/generated/api/PerspectiveInstanceRemoveParams.d.ts +9 -0
  57. package/lib/src/generated/api/PerspectiveInstanceRemoveParams.js +2 -0
  58. package/lib/src/generated/api/PerspectiveInstanceUpdateParams.d.ts +13 -0
  59. package/lib/src/generated/api/PerspectiveInstanceUpdateParams.js +2 -0
  60. package/lib/src/generated/api/Pinned.d.ts +5 -0
  61. package/lib/src/generated/api/Pinned.js +2 -0
  62. package/lib/src/generated/api/ReadOnlyReason.d.ts +4 -0
  63. package/lib/src/generated/api/ReadOnlyReason.js +2 -0
  64. package/lib/src/generated/api/RefusalReason.d.ts +4 -0
  65. package/lib/src/generated/api/RefusalReason.js +2 -0
  66. package/lib/src/generated/api/RpcMethods.d.ts +60 -0
  67. package/lib/src/generated/api/RpcMethods.js +3 -0
  68. package/lib/src/generated/api/RuntimeConfig.d.ts +23 -0
  69. package/lib/src/generated/api/RuntimeConfig.js +1 -0
  70. package/lib/src/generated/api/SetConfigParams.d.ts +7 -0
  71. package/lib/src/generated/api/SetConfigParams.js +2 -0
  72. package/lib/src/generated/api/SetConfigResult.d.ts +8 -0
  73. package/lib/src/generated/api/SetConfigResult.js +1 -0
  74. package/lib/src/generated/api/ValidationError.d.ts +34 -0
  75. package/lib/src/generated/api/ValidationError.js +1 -0
  76. package/lib/src/generated/api/ValidationProblem.d.ts +34 -0
  77. package/lib/src/generated/api/ValidationProblem.js +1 -0
  78. package/lib/src/generated/api/WriteStep.d.ts +37 -0
  79. package/lib/src/generated/api/WriteStep.js +2 -0
  80. package/lib/src/generated/api/index.d.ts +30 -0
  81. package/lib/src/identity/IdentityClient.d.ts +14 -0
  82. package/lib/src/identity/IdentityClient.js +17 -0
  83. package/lib/src/model/shacl-gen.js +4 -2
  84. package/lib/src/neighbourhood/MeshManager.d.ts +17 -1
  85. package/lib/src/neighbourhood/MeshManager.js +17 -0
  86. package/lib/src/neighbourhood/NeighbourhoodProxy.d.ts +7 -2
  87. package/lib/src/neighbourhood/NeighbourhoodProxy.js +7 -2
  88. package/lib/src/neighbourhood/Session.d.ts +5 -3
  89. package/lib/src/neighbourhood/Session.js +171 -26
  90. package/lib/src/perspectives/PerspectiveClient.d.ts +34 -0
  91. package/lib/src/perspectives/PerspectiveClient.js +45 -0
  92. package/lib/src/perspectives/PerspectiveProxy.d.ts +33 -0
  93. package/lib/src/perspectives/PerspectiveProxy.js +67 -2
  94. package/lib/src/perspectives/WakerSubscriptionManager.d.ts +23 -1
  95. package/lib/src/perspectives/WakerSubscriptionManager.js +187 -36
  96. package/lib/src/runtime/RuntimeClient.d.ts +13 -1
  97. package/lib/src/runtime/RuntimeClient.js +20 -0
  98. package/lib/src/shacl/SHACLShape.js +6 -2
  99. package/package.json +2 -2
  100. package/src/Ad4mClient.test.ts +118 -2
  101. package/src/apiClient.ts +10 -4
  102. package/src/generated/api/AISessionMessage.ts +4 -3
  103. package/src/generated/api/AiEndpoint.ts +3 -2
  104. package/src/generated/api/Cardinality.ts +6 -0
  105. package/src/generated/api/CascadeStep.ts +6 -0
  106. package/src/generated/api/CollectionItemAdded.ts +11 -0
  107. package/src/generated/api/CollectionItemRemoved.ts +9 -0
  108. package/src/generated/api/CollectionItems.ts +6 -0
  109. package/src/generated/api/ConfigChanged.ts +7 -0
  110. package/src/generated/api/ConfigKeyInfo.ts +8 -0
  111. package/src/generated/api/ConfigRefusal.ts +4 -0
  112. package/src/generated/api/DeviceKeys.ts +8 -0
  113. package/src/generated/api/Events.ts +2 -0
  114. package/src/generated/api/InstanceAddToCollection.ts +14 -0
  115. package/src/generated/api/InstanceCreate.ts +32 -0
  116. package/src/generated/api/InstanceCreated.ts +16 -0
  117. package/src/generated/api/InstanceError.ts +10 -0
  118. package/src/generated/api/InstanceRemove.ts +11 -0
  119. package/src/generated/api/InstanceRemoveFromCollection.ts +14 -0
  120. package/src/generated/api/InstanceRemoved.ts +9 -0
  121. package/src/generated/api/InstanceUpdate.ts +14 -0
  122. package/src/generated/api/InstanceUpdated.ts +3 -0
  123. package/src/generated/api/KeyClass.ts +6 -0
  124. package/src/generated/api/LogTail.ts +6 -0
  125. package/src/generated/api/LogTailParams.ts +10 -0
  126. package/src/generated/api/PerspectiveInstanceAddToCollectionParams.ts +11 -0
  127. package/src/generated/api/PerspectiveInstanceCreateParams.ts +29 -0
  128. package/src/generated/api/PerspectiveInstanceRemoveFromCollectionParams.ts +11 -0
  129. package/src/generated/api/PerspectiveInstanceRemoveParams.ts +7 -0
  130. package/src/generated/api/PerspectiveInstanceUpdateParams.ts +11 -0
  131. package/src/generated/api/Pinned.ts +7 -0
  132. package/src/generated/api/ReadOnlyReason.ts +6 -0
  133. package/src/generated/api/RefusalReason.ts +6 -0
  134. package/src/generated/api/RpcMethods.ts +30 -0
  135. package/src/generated/api/RuntimeConfig.ts +24 -0
  136. package/src/generated/api/SetConfigParams.ts +6 -0
  137. package/src/generated/api/SetConfigResult.ts +7 -0
  138. package/src/generated/api/ValidationError.ts +34 -0
  139. package/src/generated/api/ValidationProblem.ts +7 -0
  140. package/src/generated/api/WriteStep.ts +6 -0
  141. package/src/generated/api/index.ts +34 -0
  142. package/src/identity/IdentityClient.ts +20 -0
  143. package/src/model/shacl-gen.ts +4 -2
  144. package/src/neighbourhood/MeshManager.test.ts +57 -0
  145. package/src/neighbourhood/MeshManager.ts +26 -0
  146. package/src/neighbourhood/NeighbourhoodProxy.ts +7 -2
  147. package/src/neighbourhood/Session.test.ts +355 -3
  148. package/src/neighbourhood/Session.ts +170 -28
  149. package/src/perspectives/PerspectiveClient.ts +56 -0
  150. package/src/perspectives/PerspectiveProxy.test.ts +34 -0
  151. package/src/perspectives/PerspectiveProxy.ts +76 -2
  152. package/src/perspectives/WakerSubscriptionManager.test.ts +379 -1
  153. package/src/perspectives/WakerSubscriptionManager.ts +189 -41
  154. package/src/runtime/RuntimeClient.ts +25 -1
  155. package/src/shacl/SHACLFlow.test.ts +4 -2
  156. package/src/shacl/SHACLShape.test.ts +10 -3
  157. package/src/shacl/SHACLShape.ts +6 -2
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * How many values a property takes: `min` 0 or 1, `max` 1 or none (a collection).
5
+ */
6
+ export type Cardinality = { min: number, max: number | null, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * What a remove's link cascade was doing when the store failed.
5
+ */
6
+ export type CascadeStep = { "step": "list", uri: string, } | { "step": "remove", source: string, predicate: string | null, target: string, };
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type CollectionItemAdded = { className: string, baseUri: string,
4
+ /**
5
+ * The collection's canonical name.
6
+ */
7
+ collection: string, itemUri: string,
8
+ /**
9
+ * 0 when the item was in the collection already (as the batch's effective graph has it).
10
+ */
11
+ linksAdded: number, alreadyMember: boolean, };
@@ -0,0 +1,9 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type CollectionItemRemoved = { className: string, baseUri: string, collection: string, itemUri: string,
4
+ /**
5
+ * 0 when the item was not in the collection (as the batch's effective graph has it).
6
+ * Inside a batch, a member that only the batch had added counts too — it leaves by
7
+ * cancelling the staged addition.
8
+ */
9
+ linksRemoved: number, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The items a create put into one collection.
5
+ */
6
+ export type CollectionItems = { collection: string, items: Array<string>, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `config-changed`: keys written to the config file. No values: the operator reads them with
5
+ * `runtime.config`.
6
+ */
7
+ export type ConfigChanged = { keys: Array<string>, restartPending: boolean, };
@@ -0,0 +1,8 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { KeyClass } from "./KeyClass";
3
+ import type { Pinned } from "./Pinned";
4
+
5
+ /**
6
+ * One key `runtime.config` lists.
7
+ */
8
+ export type ConfigKeyInfo = { key: string, class: KeyClass, pinned?: Pinned, };
@@ -0,0 +1,4 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RefusalReason } from "./RefusalReason";
3
+
4
+ export type ConfigRefusal = { key: string, reason: RefusalReason, detail?: string, };
@@ -0,0 +1,8 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * An executor's device keys from its one wallet key: the `did:key` it signs with, and the
5
+ * X25519 multikey (`z6LS…`) a sender seals to. `identity.rekey` answers the new ones;
6
+ * `identity.custodyStatus` the current ones.
7
+ */
8
+ export type DeviceKeys = { sign: string, enc: string, };
@@ -8,6 +8,7 @@ import type { AiEndpointStatusEvent } from "./AiEndpointStatusEvent";
8
8
  import type { Apps } from "./Apps";
9
9
  import type { AutoProcessorEvent } from "./AutoProcessorEvent";
10
10
  import type { AutoProcessorNeighbourhoodState } from "./AutoProcessorNeighbourhoodState";
11
+ import type { ConfigChanged } from "./ConfigChanged";
11
12
  import type { ExceptionOccurredEvent } from "./ExceptionOccurredEvent";
12
13
  import type { FlowStateChangedEvent } from "./FlowStateChangedEvent";
13
14
  import type { HostingUserInfo } from "./HostingUserInfo";
@@ -60,6 +61,7 @@ export interface EventMap {
60
61
  "sfu-session-replaced": SfuSessionReplaced;
61
62
  "flow-state-changed": FlowStateChangedEvent;
62
63
  "identity-fork": IdentityForkEvent;
64
+ "config-changed": ConfigChanged;
63
65
  }
64
66
 
65
67
  export type EventName = keyof EventMap;
@@ -0,0 +1,14 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Add an item to a collection of an instance.
5
+ */
6
+ export type InstanceAddToCollection = { className: string, baseUri: string, collection: string,
7
+ /**
8
+ * The item, usually another instance's URI.
9
+ */
10
+ itemUri: string,
11
+ /**
12
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
13
+ */
14
+ batchId?: string, };
@@ -0,0 +1,32 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Create an instance of a subject class.
5
+ */
6
+ export type InstanceCreate = {
7
+ /**
8
+ * The subject class, as the perspective names it (matched case-insensitively).
9
+ */
10
+ className: string,
11
+ /**
12
+ * Values by property name: one JSON value per single-valued property (of the property's
13
+ * type), an array of item URIs per collection. Required properties must be present.
14
+ */
15
+ properties?: Record<string, unknown>,
16
+ /**
17
+ * The new instance's URI. A random `ad4m://obj/…` one when absent; a bare string becomes a
18
+ * literal URI.
19
+ */
20
+ baseUri?: string,
21
+ /**
22
+ * A node to put the new instance under, through the parent class's own `children` relation
23
+ * when it has one, else `ad4m://has_child`.
24
+ */
25
+ parent?: string,
26
+ /**
27
+ * An open batch (`perspective.createBatch`) to stage the write into; it lands on the
28
+ * batch's commit. Absent: the create commits on its own. On a non-validation error the
29
+ * batch may hold a partial write — discard it (`perspective.discardBatch`), don't commit
30
+ * it.
31
+ */
32
+ batchId?: string, };
@@ -0,0 +1,16 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { CollectionItems } from "./CollectionItems";
3
+
4
+ export type InstanceCreated = {
5
+ /**
6
+ * The class's canonical name.
7
+ */
8
+ className: string,
9
+ /**
10
+ * The new instance's URI (its id).
11
+ */
12
+ baseUri: string, propertiesSet: Array<string>, collectionsSet: Array<CollectionItems>,
13
+ /**
14
+ * The parent it was put under, when one was named.
15
+ */
16
+ parent: string | null, };
@@ -0,0 +1,10 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { CascadeStep } from "./CascadeStep";
3
+ import type { ValidationError } from "./ValidationError";
4
+ import type { WriteStep } from "./WriteStep";
5
+
6
+ /**
7
+ * A refused or failed instance write. Serialized (camelCase, tagged by `kind`) as the data of
8
+ * the RPC error; MCP writes its own text from it.
9
+ */
10
+ export type InstanceError = { "kind": "unknownClass", className: string, registered: Array<string>, } | { "kind": "abstractClass", className: string, } | { "kind": "invalidUri", field: string, value: string, } | { "kind": "emptyProperties" } | { "kind": "batchNotFound", batchId: string, } | { "kind": "validation", className: string, errors: Array<ValidationError>, } | { "kind": "notFound", className: string, baseUri: string, } | { "kind": "alreadyExists", className: string, baseUri: string, } | { "kind": "storedAsExpressions", className: string, collection: string, itemUri: string, language: string, members: Array<string>, } | { "kind": "failed", className: string, step: WriteStep, error: string, } | { "kind": "partiallyRemoved", className: string, baseUri: string, removed: number, step: CascadeStep, error: string, };
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Remove an instance: every link from and to it. Through an abstract class (#1435), the
5
+ * destructor of each of the record's classes it reads.
6
+ */
7
+ export type InstanceRemove = { className: string, baseUri: string,
8
+ /**
9
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
10
+ */
11
+ batchId?: string, };
@@ -0,0 +1,14 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Remove an item from a collection of an instance (the membership link only).
5
+ */
6
+ export type InstanceRemoveFromCollection = { className: string, baseUri: string, collection: string,
7
+ /**
8
+ * The item as a read of the instance lists it.
9
+ */
10
+ itemUri: string,
11
+ /**
12
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
13
+ */
14
+ batchId?: string, };
@@ -0,0 +1,9 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type InstanceRemoved = { className: string, baseUri: string,
4
+ /**
5
+ * The links the cascade removed from the effective graph; `None` through an abstract
6
+ * class, whose classes' destructors ran. Inside a caller's batch they are staged, not
7
+ * committed — including staged additions the call cancelled.
8
+ */
9
+ linksRemoved: number | null, };
@@ -0,0 +1,14 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Set single-valued properties of an instance; the others stay as they are.
5
+ */
6
+ export type InstanceUpdate = { className: string, baseUri: string,
7
+ /**
8
+ * Values by property name, at least one; single-valued properties only.
9
+ */
10
+ properties: Record<string, unknown>,
11
+ /**
12
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
13
+ */
14
+ batchId?: string, };
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type InstanceUpdated = { className: string, baseUri: string, updatedProperties: Array<string>, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Who may write a key.
5
+ */
6
+ export type KeyClass = "restart" | "machine";
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `runtime.logTail` result: the newest lines of this run's log file, oldest first.
5
+ */
6
+ export type LogTail = { lines: Array<string>, };
@@ -0,0 +1,10 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `runtime.logTail` params.
5
+ */
6
+ export type LogTailParams = {
7
+ /**
8
+ * How many of the newest lines; at most 2000 are returned.
9
+ */
10
+ lines: number, };
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type PerspectiveInstanceAddToCollectionParams = { uuid: string, className: string, baseUri: string, collection: string,
4
+ /**
5
+ * The item, usually another instance's URI.
6
+ */
7
+ itemUri: string,
8
+ /**
9
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
10
+ */
11
+ batchId?: string, };
@@ -0,0 +1,29 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type PerspectiveInstanceCreateParams = { uuid: string,
4
+ /**
5
+ * The subject class, as the perspective names it (matched case-insensitively).
6
+ */
7
+ className: string,
8
+ /**
9
+ * Values by property name: one JSON value per single-valued property (of the property's
10
+ * type), an array of item URIs per collection. Required properties must be present.
11
+ */
12
+ properties?: Record<string, unknown>,
13
+ /**
14
+ * The new instance's URI. A random `ad4m://obj/…` one when absent; a bare string becomes a
15
+ * literal URI.
16
+ */
17
+ baseUri?: string,
18
+ /**
19
+ * A node to put the new instance under, through the parent class's own `children` relation
20
+ * when it has one, else `ad4m://has_child`.
21
+ */
22
+ parent?: string,
23
+ /**
24
+ * An open batch (`perspective.createBatch`) to stage the write into; it lands on the
25
+ * batch's commit. Absent: the create commits on its own. On a non-validation error the
26
+ * batch may hold a partial write — discard it (`perspective.discardBatch`), don't commit
27
+ * it.
28
+ */
29
+ batchId?: string, };
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type PerspectiveInstanceRemoveFromCollectionParams = { uuid: string, className: string, baseUri: string, collection: string,
4
+ /**
5
+ * The item as a read of the instance lists it.
6
+ */
7
+ itemUri: string,
8
+ /**
9
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
10
+ */
11
+ batchId?: string, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type PerspectiveInstanceRemoveParams = { uuid: string, className: string, baseUri: string,
4
+ /**
5
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
6
+ */
7
+ batchId?: string, };
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type PerspectiveInstanceUpdateParams = { uuid: string, className: string, baseUri: string,
4
+ /**
5
+ * Values by property name, at least one; single-valued properties only.
6
+ */
7
+ properties: Record<string, unknown>,
8
+ /**
9
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
10
+ */
11
+ batchId?: string, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Why a key's value in the file is not what runs: a flag or an environment variable of this
5
+ * start overrides it.
6
+ */
7
+ export type Pinned = "config";
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Why a property cannot be written.
5
+ */
6
+ export type ReadOnlyReason = "classMarker" | "reverseRelation" | "computed" | "noSetter";
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Why `runtime.setConfig` did not write a key.
5
+ */
6
+ export type RefusalReason = "local-only" | "pinned-by-config" | "invalid" | "unknown-key";
@@ -41,6 +41,8 @@ import type { Apps } from "./Apps";
41
41
  import type { CallSessionInfo } from "./CallSessionInfo";
42
42
  import type { ClaimOfferParams } from "./ClaimOfferParams";
43
43
  import type { ClaimOfferResult } from "./ClaimOfferResult";
44
+ import type { CollectionItemAdded } from "./CollectionItemAdded";
45
+ import type { CollectionItemRemoved } from "./CollectionItemRemoved";
44
46
  import type { ComputeLogEntry } from "./ComputeLogEntry";
45
47
  import type { CosignInceptParams } from "./CosignInceptParams";
46
48
  import type { CreateExpressionRequest } from "./CreateExpressionRequest";
@@ -49,6 +51,7 @@ import type { CreateUserRequest } from "./CreateUserRequest";
49
51
  import type { DecoratedLinkExpression } from "./DecoratedLinkExpression";
50
52
  import type { DecoratedPerspective } from "./DecoratedPerspective";
51
53
  import type { DetectedEndpoint } from "./DetectedEndpoint";
54
+ import type { DeviceKeys } from "./DeviceKeys";
52
55
  import type { DeviceView } from "./DeviceView";
53
56
  import type { DidResolutionResult } from "./DidResolutionResult";
54
57
  import type { DiscoveredModel } from "./DiscoveredModel";
@@ -75,6 +78,9 @@ import type { IdentityLog } from "./IdentityLog";
75
78
  import type { IdentityStatus } from "./IdentityStatus";
76
79
  import type { ImportAgentRequest } from "./ImportAgentRequest";
77
80
  import type { ImportRequest } from "./ImportRequest";
81
+ import type { InstanceCreated } from "./InstanceCreated";
82
+ import type { InstanceRemoved } from "./InstanceRemoved";
83
+ import type { InstanceUpdated } from "./InstanceUpdated";
78
84
  import type { InteractionMeta } from "./InteractionMeta";
79
85
  import type { JoinNeighbourhoodRequest } from "./JoinNeighbourhoodRequest";
80
86
  import type { JoinStatus } from "./JoinStatus";
@@ -94,6 +100,8 @@ import type { LocalAiRemoveParams } from "./LocalAiRemoveParams";
94
100
  import type { LocalAiStatus } from "./LocalAiStatus";
95
101
  import type { LockAgentRequest } from "./LockAgentRequest";
96
102
  import type { LogParams } from "./LogParams";
103
+ import type { LogTail } from "./LogTail";
104
+ import type { LogTailParams } from "./LogTailParams";
97
105
  import type { Model } from "./Model";
98
106
  import type { ModelStatus } from "./ModelStatus";
99
107
  import type { NeighbourhoodBroadcastParams } from "./NeighbourhoodBroadcastParams";
@@ -130,6 +138,11 @@ import type { PerspectiveFlowValidOutputsParams } from "./PerspectiveFlowValidOu
130
138
  import type { PerspectiveGetAllShaclParams } from "./PerspectiveGetAllShaclParams";
131
139
  import type { PerspectiveGetSubjectDataParams } from "./PerspectiveGetSubjectDataParams";
132
140
  import type { PerspectiveHandle } from "./PerspectiveHandle";
141
+ import type { PerspectiveInstanceAddToCollectionParams } from "./PerspectiveInstanceAddToCollectionParams";
142
+ import type { PerspectiveInstanceCreateParams } from "./PerspectiveInstanceCreateParams";
143
+ import type { PerspectiveInstanceRemoveFromCollectionParams } from "./PerspectiveInstanceRemoveFromCollectionParams";
144
+ import type { PerspectiveInstanceRemoveParams } from "./PerspectiveInstanceRemoveParams";
145
+ import type { PerspectiveInstanceUpdateParams } from "./PerspectiveInstanceUpdateParams";
133
146
  import type { PerspectiveLinkDiff } from "./PerspectiveLinkDiff";
134
147
  import type { PerspectiveLinkMutationsParams } from "./PerspectiveLinkMutationsParams";
135
148
  import type { PerspectiveMintFlowReceiptParams } from "./PerspectiveMintFlowReceiptParams";
@@ -172,6 +185,7 @@ import type { RunAgentRequest } from "./RunAgentRequest";
172
185
  import type { RunInterpretationRequest } from "./RunInterpretationRequest";
173
186
  import type { RunInterpretationWithHarnessRequest } from "./RunInterpretationWithHarnessRequest";
174
187
  import type { RuntimeComputeLogParams } from "./RuntimeComputeLogParams";
188
+ import type { RuntimeConfig } from "./RuntimeConfig";
175
189
  import type { RuntimeFriendStatusParams } from "./RuntimeFriendStatusParams";
176
190
  import type { RuntimeGrantNotificationParams } from "./RuntimeGrantNotificationParams";
177
191
  import type { RuntimeImportResult } from "./RuntimeImportResult";
@@ -183,6 +197,8 @@ import type { RuntimeUnytSendHotParams } from "./RuntimeUnytSendHotParams";
183
197
  import type { RuntimeUnytWalletHistoryParams } from "./RuntimeUnytWalletHistoryParams";
184
198
  import type { RuntimeUpdateNotificationParams } from "./RuntimeUpdateNotificationParams";
185
199
  import type { SentMessage } from "./SentMessage";
200
+ import type { SetConfigParams } from "./SetConfigParams";
201
+ import type { SetConfigResult } from "./SetConfigResult";
186
202
  import type { SetHostRatesRequest } from "./SetHostRatesRequest";
187
203
  import type { SetHotWalletAddressRequest } from "./SetHotWalletAddressRequest";
188
204
  import type { SetMultiUserRequest } from "./SetMultiUserRequest";
@@ -305,12 +321,14 @@ export interface RpcMethods {
305
321
  "hosting.walletHistory": { params: Record<string, never>; result: JsonValue };
306
322
  "identity.claimOffer": { params: ClaimOfferParams; result: ClaimOfferResult };
307
323
  "identity.cosignIncept": { params: CosignInceptParams; result: JsonValue };
324
+ "identity.custodyStatus": { params: Record<string, never>; result: DeviceKeys };
308
325
  "identity.devices": { params: Record<string, never>; result: Array<DeviceView> };
309
326
  "identity.joinStatus": { params: JoinStatusParams; result: JoinStatus };
310
327
  "identity.log": { params: LogParams; result: IdentityLog };
311
328
  "identity.offers": { params: OffersParams; result: Array<OfferListing> };
312
329
  "identity.openOffer": { params: OpenOfferParams; result: OfferOpened };
313
330
  "identity.publish": { params: PublishParams; result: SignedHead };
331
+ "identity.rekey": { params: Record<string, never>; result: DeviceKeys };
314
332
  "identity.resetLog": { params: ResetLogParams; result: boolean };
315
333
  "identity.resolve": { params: ResolveParams; result: DidResolutionResult };
316
334
  "identity.status": { params: Record<string, never>; result: IdentityStatus };
@@ -357,6 +375,11 @@ export interface RpcMethods {
357
375
  "perspective.getShaclNames": { params: PerspectiveUuidParams; result: Array<string> };
358
376
  "perspective.getShaclTargetClass": { params: PerspectiveShaclNameParams; result: string | null };
359
377
  "perspective.getSubjectData": { params: PerspectiveGetSubjectDataParams; result: string };
378
+ "perspective.instanceAddToCollection": { params: PerspectiveInstanceAddToCollectionParams; result: CollectionItemAdded };
379
+ "perspective.instanceCreate": { params: PerspectiveInstanceCreateParams; result: InstanceCreated };
380
+ "perspective.instanceRemove": { params: PerspectiveInstanceRemoveParams; result: InstanceRemoved };
381
+ "perspective.instanceRemoveFromCollection": { params: PerspectiveInstanceRemoveFromCollectionParams; result: CollectionItemRemoved };
382
+ "perspective.instanceUpdate": { params: PerspectiveInstanceUpdateParams; result: InstanceUpdated };
360
383
  "perspective.interpretationOverlays": { params: PerspectiveUuidParams; result: Array<OverlayView> };
361
384
  "perspective.linkMutations": { params: PerspectiveLinkMutationsParams; result: PerspectiveLinkDiff };
362
385
  "perspective.mintFlowReceipt": { params: PerspectiveMintFlowReceiptParams; result: PerspectiveMintFlowReceiptResult };
@@ -390,6 +413,7 @@ export interface RpcMethods {
390
413
  "runtime.addHcAgentInfos": { params: AddAgentInfosRequest; result: boolean };
391
414
  "runtime.addLinkLanguageTemplates": { params: LinkLanguageTemplatesRequest; result: Array<string> };
392
415
  "runtime.computeLog": { params: RuntimeComputeLogParams; result: Array<ComputeLogEntry> };
416
+ "runtime.config": { params: Record<string, never>; result: RuntimeConfig };
393
417
  "runtime.createNotification": { params: NotificationInput; result: string };
394
418
  "runtime.deleteNotification": { params: RuntimeNotificationIdParams; result: boolean };
395
419
  "runtime.exportData": { params: ExportRequest; result: boolean };
@@ -403,6 +427,7 @@ export interface RpcMethods {
403
427
  "runtime.inbox": { params: Record<string, never>; result: Array<PerspectiveExpression> };
404
428
  "runtime.info": { params: Record<string, never>; result: RuntimeInfo };
405
429
  "runtime.linkLanguageTemplates": { params: Record<string, never>; result: Array<LanguageMeta> };
430
+ "runtime.logTail": { params: LogTailParams; result: LogTail };
406
431
  "runtime.networkMetrics": { params: Record<string, never>; result: string };
407
432
  "runtime.notifications": { params: Record<string, never>; result: Array<Notification> };
408
433
  "runtime.openLink": { params: OpenLinkRequest; result: boolean };
@@ -410,8 +435,10 @@ export interface RpcMethods {
410
435
  "runtime.quit": { params: Record<string, never>; result: boolean };
411
436
  "runtime.removeFriends": { params: FriendsListRequest; result: Array<string> };
412
437
  "runtime.removeLinkLanguageTemplates": { params: LinkLanguageTemplatesRequest; result: Array<string> };
438
+ "runtime.restart": { params: Record<string, never>; result: boolean };
413
439
  "runtime.restartHolochain": { params: Record<string, never>; result: boolean };
414
440
  "runtime.sendFriendMessage": { params: RuntimeSendFriendMessageParams; result: boolean };
441
+ "runtime.setConfig": { params: SetConfigParams; result: SetConfigResult };
415
442
  "runtime.setFreeHostingEnabled": { params: RuntimeSetFreeHostingEnabledParams; result: boolean };
416
443
  "runtime.setHostRates": { params: SetHostRatesRequest; result: boolean };
417
444
  "runtime.setStatus": { params: SetStatusRequest; result: boolean };
@@ -493,6 +520,7 @@ export const READ_METHODS: ReadonlySet<RpcMethod> = new Set<RpcMethod>([
493
520
  "hosting.info",
494
521
  "hosting.wallet",
495
522
  "hosting.walletHistory",
523
+ "identity.custodyStatus",
496
524
  "identity.devices",
497
525
  "identity.joinStatus",
498
526
  "identity.log",
@@ -527,6 +555,7 @@ export const READ_METHODS: ReadonlySet<RpcMethod> = new Set<RpcMethod>([
527
555
  "perspective.subjectClassesOf",
528
556
  "perspective.verifyFlowReceipt",
529
557
  "runtime.computeLog",
558
+ "runtime.config",
530
559
  "runtime.freeHostingEnabled",
531
560
  "runtime.friendStatus",
532
561
  "runtime.friends",
@@ -535,6 +564,7 @@ export const READ_METHODS: ReadonlySet<RpcMethod> = new Set<RpcMethod>([
535
564
  "runtime.inbox",
536
565
  "runtime.info",
537
566
  "runtime.linkLanguageTemplates",
567
+ "runtime.logTail",
538
568
  "runtime.networkMetrics",
539
569
  "runtime.notifications",
540
570
  "runtime.outbox",
@@ -0,0 +1,24 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ConfigKeyInfo } from "./ConfigKeyInfo";
3
+
4
+ /**
5
+ * `runtime.config` result.
6
+ */
7
+ export type RuntimeConfig = {
8
+ /**
9
+ * The file's keys and values: what the next start reads. The file holds no secret (a
10
+ * secret is named by a `*_file` path), and a secret pasted into it is left out.
11
+ */
12
+ values: Record<string, unknown>,
13
+ /**
14
+ * Every key `runtime.setConfig` knows, with its class.
15
+ */
16
+ keys: Array<ConfigKeyInfo>,
17
+ /**
18
+ * A write since this start waits for the next start.
19
+ */
20
+ restartPending: boolean,
21
+ /**
22
+ * The file the executor started with, `null` without `--config`.
23
+ */
24
+ file: string | null, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `runtime.setConfig` params: keys to write, keys to remove (each then takes its default).
5
+ */
6
+ export type SetConfigParams = { set?: Record<string, unknown>, unset?: Array<string>, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ConfigRefusal } from "./ConfigRefusal";
3
+
4
+ /**
5
+ * `runtime.setConfig` result. The keys not in `refused` are written.
6
+ */
7
+ export type SetConfigResult = { restartPending: boolean, refused: Array<ConfigRefusal>, };
@@ -0,0 +1,34 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Cardinality } from "./Cardinality";
3
+ import type { ValidationProblem } from "./ValidationProblem";
4
+ import type { JsonValue } from "./serde_json/JsonValue";
5
+
6
+ /**
7
+ * One rejected property.
8
+ */
9
+ export type ValidationError = {
10
+ /**
11
+ * The property as the class names it, or as the caller wrote it when the class has none.
12
+ */
13
+ property: string, problem: ValidationProblem,
14
+ /**
15
+ * The property's type: `string`, `boolean`, `integer`, `number`, `datetime`, `reference`,
16
+ * or a custom datatype's local name. `None` for an unknown property.
17
+ */
18
+ expectedType: string | null,
19
+ /**
20
+ * `None` for an unknown property.
21
+ */
22
+ cardinality: Cardinality | null,
23
+ /**
24
+ * The property's `sh:in` values, in declared order, when it has a list.
25
+ */
26
+ allowedValues: Array<JsonValue> | null,
27
+ /**
28
+ * The value the caller sent, when there was one.
29
+ */
30
+ received: JsonValue | null,
31
+ /**
32
+ * For a collection item, its index in the array the caller sent.
33
+ */
34
+ item: number | null, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ReadOnlyReason } from "./ReadOnlyReason";
3
+
4
+ /**
5
+ * What is wrong with a property.
6
+ */
7
+ export type ValidationProblem = { "kind": "unknownProperty", class: string, available: Array<string>, } | { "kind": "unknownCollection", class: string, available: Array<string>, } | { "kind": "readOnly", reason: ReadOnlyReason, } | { "kind": "collectionNotSettable" } | { "kind": "notACollection" } | { "kind": "arrayForScalar", length: number, } | { "kind": "null" } | { "kind": "notAReference", targetClass: string, } | { "kind": "wrongType" } | { "kind": "notAllowed" } | { "kind": "missingRequired" };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * What a write was doing when the store failed.
5
+ */
6
+ export type WriteStep = { "step": "readShape" } | { "step": "readInstance" } | { "step": "checkExisting", baseUri: string, } | { "step": "resolveCollection", collection: string, } | { "step": "readCollection", collection: string, } | { "step": "createSubject" } | { "step": "updateSubject" } | { "step": "removeSubject" } | { "step": "addCollectionItem", collection: string, item: string, } | { "step": "removeCollectionItem", collection: string, item: string, removed: number, } | { "step": "addToParent", parent: string, } | { "step": "commit" };