@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
@@ -7,11 +7,16 @@ export interface WsEvent {
7
7
  }
8
8
  /** Error thrown by ApiClient when an RPC call fails. */
9
9
  export declare class RpcError extends Error {
10
- /** Error code (maps to HTTP status semantics: 400, 401, 403, 404, 500). */
10
+ /** Error code (maps to HTTP status semantics: 400, 401, 403, 404, 422, 500). */
11
11
  readonly status: number;
12
12
  /** Raw error message from server. */
13
13
  readonly body: string;
14
- constructor(status: number, body: string);
14
+ /**
15
+ * Structured detail the executor attached (`error.data`), when it did: e.g. the
16
+ * `InstanceError` of a refused `perspective.instance*` write.
17
+ */
18
+ readonly data?: unknown;
19
+ constructor(status: number, body: string, data?: unknown);
15
20
  }
16
21
  /** Options accepted by [`ApiClient.call`]. */
17
22
  export interface CallOptions {
@@ -2,11 +2,12 @@ import { callSafely } from './notifyListeners';
2
2
  import { LONG_METHODS, OPENS_METHODS, READ_METHODS } from './generated/api/RpcMethods';
3
3
  /** Error thrown by ApiClient when an RPC call fails. */
4
4
  export class RpcError extends Error {
5
- constructor(status, body) {
5
+ constructor(status, body, data) {
6
6
  super(`RPC error ${status}: ${body}`);
7
7
  this.name = "RpcError";
8
8
  this.status = status;
9
9
  this.body = body;
10
+ this.data = data;
10
11
  }
11
12
  }
12
13
  const DEFAULT_TIMEOUT_MS = 30000;
@@ -192,7 +193,7 @@ export class ApiClient {
192
193
  pending.resolve(parsed.result);
193
194
  return;
194
195
  }
195
- const rpcError = new RpcError(error.code ?? 500, error.message ?? 'Unknown error');
196
+ const rpcError = new RpcError(error.code ?? 500, error.message ?? 'Unknown error', error.data);
196
197
  pending.reject(rpcError);
197
198
  // The executor answers 401 only when the token stopped working, then closes the socket.
198
199
  if (rpcError.status === 401)
@@ -14,9 +14,10 @@ export type AISessionMessage = {
14
14
  /**
15
15
  * The transcript entry: `{"text": ..}` for user and assistant turns;
16
16
  * `{"name", "arguments", "target"?, "writes", "result"? | "error"?}` for a
17
- * tool step. `writes` is the executor's own read of the call's side effect
18
- * (`agent_session::tool_writes`), so a client marking the steps that
19
- * changed something does not have to guess from the name.
17
+ * tool step. `writes` is the tool's declared intent
18
+ * (`agent_session::tool_writes`), recorded before the call runs. It does
19
+ * not say the call changed anything: a refused or failed write still has
20
+ * `writes: true`.
20
21
  */
21
22
  content: unknown;
22
23
  /**
@@ -14,8 +14,9 @@ export type AiEndpoint = {
14
14
  maxNumCtx?: number | null;
15
15
  /**
16
16
  * How long a request to this endpoint may take, queueing included. Unset: 300 s for
17
- * chat `/v1` forwards, 600 s for chat the executor answers (Anthropic, Ollama, tools as
18
- * text; not bounded here when streamed), 60 s for embeddings, 120 s for speech.
17
+ * chat `/v1` forwards, 600 s for chat the executor answers, 60 s for embeddings, 120 s
18
+ * for speech. An OpenAI-protocol chat client uses this value for a stream too. A value
19
+ * above 600 s is kept. A stream has no second timer in `within_endpoint_limits`.
19
20
  */
20
21
  requestTimeoutSecs?: number | null;
21
22
  /**
@@ -0,0 +1,7 @@
1
+ /**
2
+ * How many values a property takes: `min` 0 or 1, `max` 1 or none (a collection).
3
+ */
4
+ export type Cardinality = {
5
+ min: number;
6
+ max: number | null;
7
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * What a remove's link cascade was doing when the store failed.
3
+ */
4
+ export type CascadeStep = {
5
+ "step": "list";
6
+ uri: string;
7
+ } | {
8
+ "step": "remove";
9
+ source: string;
10
+ predicate: string | null;
11
+ target: string;
12
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,14 @@
1
+ export type CollectionItemAdded = {
2
+ className: string;
3
+ baseUri: string;
4
+ /**
5
+ * The collection's canonical name.
6
+ */
7
+ collection: string;
8
+ itemUri: string;
9
+ /**
10
+ * 0 when the item was in the collection already (as the batch's effective graph has it).
11
+ */
12
+ linksAdded: number;
13
+ alreadyMember: boolean;
14
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,12 @@
1
+ export type CollectionItemRemoved = {
2
+ className: string;
3
+ baseUri: string;
4
+ collection: string;
5
+ itemUri: string;
6
+ /**
7
+ * 0 when the item was not in the collection (as the batch's effective graph has it).
8
+ * Inside a batch, a member that only the batch had added counts too — it leaves by
9
+ * cancelling the staged addition.
10
+ */
11
+ linksRemoved: number;
12
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The items a create put into one collection.
3
+ */
4
+ export type CollectionItems = {
5
+ collection: string;
6
+ items: Array<string>;
7
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * `config-changed`: keys written to the config file. No values: the operator reads them with
3
+ * `runtime.config`.
4
+ */
5
+ export type ConfigChanged = {
6
+ keys: Array<string>;
7
+ restartPending: boolean;
8
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { KeyClass } from "./KeyClass";
2
+ import type { Pinned } from "./Pinned";
3
+ /**
4
+ * One key `runtime.config` lists.
5
+ */
6
+ export type ConfigKeyInfo = {
7
+ key: string;
8
+ class: KeyClass;
9
+ pinned?: Pinned;
10
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { RefusalReason } from "./RefusalReason";
2
+ export type ConfigRefusal = {
3
+ key: string;
4
+ reason: RefusalReason;
5
+ detail?: string;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * An executor's device keys from its one wallet key: the `did:key` it signs with, and the
3
+ * X25519 multikey (`z6LS…`) a sender seals to. `identity.rekey` answers the new ones;
4
+ * `identity.custodyStatus` the current ones.
5
+ */
6
+ export type DeviceKeys = {
7
+ sign: string;
8
+ enc: string;
9
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -5,6 +5,7 @@ import type { AiEndpointStatusEvent } from "./AiEndpointStatusEvent";
5
5
  import type { Apps } from "./Apps";
6
6
  import type { AutoProcessorEvent } from "./AutoProcessorEvent";
7
7
  import type { AutoProcessorNeighbourhoodState } from "./AutoProcessorNeighbourhoodState";
8
+ import type { ConfigChanged } from "./ConfigChanged";
8
9
  import type { ExceptionOccurredEvent } from "./ExceptionOccurredEvent";
9
10
  import type { FlowStateChangedEvent } from "./FlowStateChangedEvent";
10
11
  import type { HostingUserInfo } from "./HostingUserInfo";
@@ -56,6 +57,7 @@ export interface EventMap {
56
57
  "sfu-session-replaced": SfuSessionReplaced;
57
58
  "flow-state-changed": FlowStateChangedEvent;
58
59
  "identity-fork": IdentityForkEvent;
60
+ "config-changed": ConfigChanged;
59
61
  }
60
62
  export type EventName = keyof EventMap;
61
63
  /** Events about one perspective: they carry `perspectiveUuid`. */
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Add an item to a collection of an instance.
3
+ */
4
+ export type InstanceAddToCollection = {
5
+ className: string;
6
+ baseUri: string;
7
+ collection: string;
8
+ /**
9
+ * The item, usually another instance's URI.
10
+ */
11
+ itemUri: string;
12
+ /**
13
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
14
+ */
15
+ batchId?: string;
16
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Create an instance of a subject class.
3
+ */
4
+ export type InstanceCreate = {
5
+ /**
6
+ * The subject class, as the perspective names it (matched case-insensitively).
7
+ */
8
+ className: string;
9
+ /**
10
+ * Values by property name: one JSON value per single-valued property (of the property's
11
+ * type), an array of item URIs per collection. Required properties must be present.
12
+ */
13
+ properties?: Record<string, unknown>;
14
+ /**
15
+ * The new instance's URI. A random `ad4m://obj/…` one when absent; a bare string becomes a
16
+ * literal URI.
17
+ */
18
+ baseUri?: string;
19
+ /**
20
+ * A node to put the new instance under, through the parent class's own `children` relation
21
+ * when it has one, else `ad4m://has_child`.
22
+ */
23
+ parent?: string;
24
+ /**
25
+ * An open batch (`perspective.createBatch`) to stage the write into; it lands on the
26
+ * batch's commit. Absent: the create commits on its own. On a non-validation error the
27
+ * batch may hold a partial write — discard it (`perspective.discardBatch`), don't commit
28
+ * it.
29
+ */
30
+ batchId?: string;
31
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { CollectionItems } from "./CollectionItems";
2
+ export type InstanceCreated = {
3
+ /**
4
+ * The class's canonical name.
5
+ */
6
+ className: string;
7
+ /**
8
+ * The new instance's URI (its id).
9
+ */
10
+ baseUri: string;
11
+ propertiesSet: Array<string>;
12
+ collectionsSet: Array<CollectionItems>;
13
+ /**
14
+ * The parent it was put under, when one was named.
15
+ */
16
+ parent: string | null;
17
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,55 @@
1
+ import type { CascadeStep } from "./CascadeStep";
2
+ import type { ValidationError } from "./ValidationError";
3
+ import type { WriteStep } from "./WriteStep";
4
+ /**
5
+ * A refused or failed instance write. Serialized (camelCase, tagged by `kind`) as the data of
6
+ * the RPC error; MCP writes its own text from it.
7
+ */
8
+ export type InstanceError = {
9
+ "kind": "unknownClass";
10
+ className: string;
11
+ registered: Array<string>;
12
+ } | {
13
+ "kind": "abstractClass";
14
+ className: string;
15
+ } | {
16
+ "kind": "invalidUri";
17
+ field: string;
18
+ value: string;
19
+ } | {
20
+ "kind": "emptyProperties";
21
+ } | {
22
+ "kind": "batchNotFound";
23
+ batchId: string;
24
+ } | {
25
+ "kind": "validation";
26
+ className: string;
27
+ errors: Array<ValidationError>;
28
+ } | {
29
+ "kind": "notFound";
30
+ className: string;
31
+ baseUri: string;
32
+ } | {
33
+ "kind": "alreadyExists";
34
+ className: string;
35
+ baseUri: string;
36
+ } | {
37
+ "kind": "storedAsExpressions";
38
+ className: string;
39
+ collection: string;
40
+ itemUri: string;
41
+ language: string;
42
+ members: Array<string>;
43
+ } | {
44
+ "kind": "failed";
45
+ className: string;
46
+ step: WriteStep;
47
+ error: string;
48
+ } | {
49
+ "kind": "partiallyRemoved";
50
+ className: string;
51
+ baseUri: string;
52
+ removed: number;
53
+ step: CascadeStep;
54
+ error: string;
55
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Remove an instance: every link from and to it. Through an abstract class (#1435), the
3
+ * destructor of each of the record's classes it reads.
4
+ */
5
+ export type InstanceRemove = {
6
+ className: string;
7
+ baseUri: string;
8
+ /**
9
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
10
+ */
11
+ batchId?: string;
12
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Remove an item from a collection of an instance (the membership link only).
3
+ */
4
+ export type InstanceRemoveFromCollection = {
5
+ className: string;
6
+ baseUri: string;
7
+ collection: string;
8
+ /**
9
+ * The item as a read of the instance lists it.
10
+ */
11
+ itemUri: string;
12
+ /**
13
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
14
+ */
15
+ batchId?: string;
16
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ export type InstanceRemoved = {
2
+ className: string;
3
+ 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;
10
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Set single-valued properties of an instance; the others stay as they are.
3
+ */
4
+ export type InstanceUpdate = {
5
+ className: string;
6
+ 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;
15
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export type InstanceUpdated = {
2
+ className: string;
3
+ baseUri: string;
4
+ updatedProperties: Array<string>;
5
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Who may write a key.
3
+ */
4
+ export type KeyClass = "restart" | "machine";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * `runtime.logTail` result: the newest lines of this run's log file, oldest first.
3
+ */
4
+ export type LogTail = {
5
+ lines: Array<string>;
6
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * `runtime.logTail` params.
3
+ */
4
+ export type LogTailParams = {
5
+ /**
6
+ * How many of the newest lines; at most 2000 are returned.
7
+ */
8
+ lines: number;
9
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,14 @@
1
+ export type PerspectiveInstanceAddToCollectionParams = {
2
+ uuid: string;
3
+ className: string;
4
+ baseUri: string;
5
+ collection: string;
6
+ /**
7
+ * The item, usually another instance's URI.
8
+ */
9
+ itemUri: string;
10
+ /**
11
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
12
+ */
13
+ batchId?: string;
14
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,29 @@
1
+ export type PerspectiveInstanceCreateParams = {
2
+ uuid: string;
3
+ /**
4
+ * The subject class, as the perspective names it (matched case-insensitively).
5
+ */
6
+ className: string;
7
+ /**
8
+ * Values by property name: one JSON value per single-valued property (of the property's
9
+ * type), an array of item URIs per collection. Required properties must be present.
10
+ */
11
+ properties?: Record<string, unknown>;
12
+ /**
13
+ * The new instance's URI. A random `ad4m://obj/…` one when absent; a bare string becomes a
14
+ * literal URI.
15
+ */
16
+ baseUri?: string;
17
+ /**
18
+ * A node to put the new instance under, through the parent class's own `children` relation
19
+ * when it has one, else `ad4m://has_child`.
20
+ */
21
+ parent?: string;
22
+ /**
23
+ * An open batch (`perspective.createBatch`) to stage the write into; it lands on the
24
+ * batch's commit. Absent: the create commits on its own. On a non-validation error the
25
+ * batch may hold a partial write — discard it (`perspective.discardBatch`), don't commit
26
+ * it.
27
+ */
28
+ batchId?: string;
29
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,14 @@
1
+ export type PerspectiveInstanceRemoveFromCollectionParams = {
2
+ uuid: string;
3
+ className: string;
4
+ baseUri: string;
5
+ collection: string;
6
+ /**
7
+ * The item as a read of the instance lists it.
8
+ */
9
+ itemUri: string;
10
+ /**
11
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
12
+ */
13
+ batchId?: string;
14
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ export type PerspectiveInstanceRemoveParams = {
2
+ uuid: string;
3
+ className: string;
4
+ baseUri: string;
5
+ /**
6
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
7
+ */
8
+ batchId?: string;
9
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,13 @@
1
+ export type PerspectiveInstanceUpdateParams = {
2
+ uuid: string;
3
+ className: string;
4
+ baseUri: string;
5
+ /**
6
+ * Values by property name, at least one; single-valued properties only.
7
+ */
8
+ properties: Record<string, unknown>;
9
+ /**
10
+ * An open batch to stage the write into; see `InstanceCreate`'s `batchId`.
11
+ */
12
+ batchId?: string;
13
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Why a key's value in the file is not what runs: a flag or an environment variable of this
3
+ * start overrides it.
4
+ */
5
+ export type Pinned = "config";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Why a property cannot be written.
3
+ */
4
+ export type ReadOnlyReason = "classMarker" | "reverseRelation" | "computed" | "noSetter";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Why `runtime.setConfig` did not write a key.
3
+ */
4
+ export type RefusalReason = "local-only" | "pinned-by-config" | "invalid" | "unknown-key";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};