@loams/client 0.1.0 → 0.1.1

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 (45) hide show
  1. package/README.md +78 -2
  2. package/dist/app.d.ts +149 -0
  3. package/dist/app.js +317 -0
  4. package/dist/builders/filter.d.ts +96 -0
  5. package/dist/builders/filter.js +190 -0
  6. package/dist/builders/schema.d.ts +50 -0
  7. package/dist/builders/schema.js +92 -0
  8. package/dist/builders/search.d.ts +159 -0
  9. package/dist/builders/search.js +307 -0
  10. package/dist/gen/facade.d.ts +267 -2
  11. package/dist/gen/facade.js +194 -0
  12. package/dist/handle.d.ts +67 -0
  13. package/dist/handle.js +107 -0
  14. package/dist/index.d.ts +12 -5
  15. package/dist/index.js +12 -3
  16. package/dist/loams.d.ts +77 -2
  17. package/dist/loams.js +84 -6
  18. package/dist/runtime/batch.d.ts +29 -0
  19. package/dist/runtime/batch.js +95 -0
  20. package/dist/runtime/call.d.ts +63 -9
  21. package/dist/runtime/call.js +243 -41
  22. package/dist/runtime/consistency.d.ts +65 -11
  23. package/dist/runtime/consistency.js +212 -46
  24. package/dist/runtime/errors.d.ts +29 -2
  25. package/dist/runtime/errors.js +26 -0
  26. package/dist/runtime/pagination.js +8 -2
  27. package/dist/runtime/subscribe.d.ts +37 -0
  28. package/dist/runtime/subscribe.js +128 -0
  29. package/dist/vendor/proto/collection-v1.d.ts +3 -0
  30. package/dist/vendor/proto/collection-v1.js +7 -0
  31. package/dist/vendor/proto/gen/loams/collection/v1/collection_pb.d.ts +1610 -0
  32. package/dist/vendor/proto/gen/loams/collection/v1/collection_pb.js +399 -0
  33. package/dist/vendor/proto/gen/loams/collection/v1/document_pb.d.ts +1054 -0
  34. package/dist/vendor/proto/gen/loams/collection/v1/document_pb.js +327 -0
  35. package/dist/vendor/proto/gen/loams/collection/v1/query_pb.d.ts +2101 -0
  36. package/dist/vendor/proto/gen/loams/collection/v1/query_pb.js +608 -0
  37. package/dist/vendor/proto/gen/loams/graph/v1/graph_pb.d.ts +2299 -0
  38. package/dist/vendor/proto/gen/loams/graph/v1/graph_pb.js +596 -0
  39. package/dist/vendor/proto/gen/loams/operations/v1/operations_pb.d.ts +399 -0
  40. package/dist/vendor/proto/gen/loams/operations/v1/operations_pb.js +118 -0
  41. package/dist/vendor/proto/gen/loams/sql/v1/sql_pb.d.ts +182 -0
  42. package/dist/vendor/proto/gen/loams/sql/v1/sql_pb.js +72 -0
  43. package/dist/vendor/proto/gen/loams/stream/v1/stream_pb.d.ts +688 -0
  44. package/dist/vendor/proto/gen/loams/stream/v1/stream_pb.js +180 -0
  45. package/package.json +2 -2
@@ -0,0 +1,327 @@
1
+ // Documents: the write, the three reads and the two filter writes (design §44
2
+ // §5.1, D602; API1 Task 3).
3
+ //
4
+ // This package replaces the M1.2/M1.5 native REST routes under
5
+ // `/v1/namespaces/{ns}/collections/{c}/documents` with RPCs on the one port
6
+ // (design §44 §4), and the plan's rulings are visible on the wire:
7
+ //
8
+ // - **Names are fields, not path segments.** A Connect path is
9
+ // `/<package>.<Service>/<Method>`, so `namespace` and `collection` travel
10
+ // in every request message and one path serves every collection (plan
11
+ // ruling 4). A collection is named by its name or by an alias, exactly as
12
+ // the REST route named it.
13
+ // - **proto3 JSON is the wire form**: field names are `lowerCamelCase`
14
+ // (`report_existence` is `reportExistence`, `max_rows` is `maxRows`), an
15
+ // enum answers its proto name in `UPPER_SNAKE`, a 64-bit integer answers a
16
+ // decimal string (so it stays lossless in JavaScript), and a field at its
17
+ // default is *absent* rather than `0`, `false`, `""` or `[]`.
18
+ // - **Unknown fields are ignored, not refused.** proto3 JSON says to skip a
19
+ // field the message does not declare, so the REST routes' `deny_unknown_fields`
20
+ // refusal (`{"patch": {}}` on a delete) has no spelling here. What a caller
21
+ // can still be refused for is a *known* field of the wrong JSON type, and the
22
+ // codec answers `invalid_argument` for it before a handler runs.
23
+ // - **Every failure carries a reason.** A failed RPC carries one
24
+ // `loams.errors.v1.ErrorInfo` in its details whose `reason` is registered
25
+ // in `docs/api/reasons.md`; a caller branches on the reason, never on the
26
+ // message (D611). `index` names the op of a rejected write and `matched`
27
+ // and `limit` the numbers a filter write refused on, so neither needs the
28
+ // prose. Every reason this package raises is a registry row already.
29
+ //
30
+ // ## `WriteDocuments` is the first RPC that needs an idempotency key
31
+ //
32
+ // Every RPC in `loams.collection.v1` is idempotent by construction, so none
33
+ // of them carries one (plan ruling 2.4). A write is not: a client that
34
+ // retries after a lost answer would write twice. `idempotency_key` makes the
35
+ // retry a *replay* — the same token, the same per-op results and the same
36
+ // positions, which is what makes the operation safe to repeat at all (D610).
37
+ // The window is the immediate retry, and it is documented as such in
38
+ // `crates/loams/src/api/connect_documents.rs`; a caller that needs a longer
39
+ // window than the server keeps gets a `not_found`-shaped miss (a fresh write),
40
+ // not a wrong answer.
41
+ //
42
+ // ## The payload is JSON, deliberately
43
+ //
44
+ // A document's `source` is `google.protobuf.Struct`, and its vectors are
45
+ // `map<string, google.protobuf.Value>`. A document's payload is an open
46
+ // document: a new source key per application, and a vector shape no proto can
47
+ // enumerate (dense, sparse, multi-vector, learned). A `Struct` and a `Value`
48
+ // keep the native REST route's document JSON exactly, so moving a caller onto
49
+ // this RPC changes the envelope it posts in, not the document it posts — the
50
+ // same call `loams.collection.v1` made for a schema (plan ruling 2.1). The
51
+ // one cost is a `null`: a patch removes a vector by writing
52
+ // `{"embedding": null}`, and that is representable at all only because the
53
+ // value is a `Value` rather than a `ListValue`.
54
+ //
55
+ // `Document.fields` is a `Value` per name for the same reason: a field value
56
+ // is one of a string, a bool, an integer, a float or `{"date": "…"}` (Ruling
57
+ // 9), and the REST JSON already spells all five.
58
+ //
59
+ // ## A document id is a typed oneof
60
+ //
61
+ // `DocumentId` is a oneof of `uint` / `string` / `uuid`, not a
62
+ // `google.protobuf.Value`. A `Value` holds every number in a `double`, so a
63
+ // `u64` id would come back as `18446744073709552000` — a different document.
64
+ // The three arms are the three `PrimaryKey` variants, and `uuid` keeps the
65
+ // REST spelling `{"uuid": "0190f5c4-…"}` verbatim, which is why it is a
66
+ // separate arm rather than the `string` one.
67
+ //
68
+ // The proto3 JSON of a oneof is `{"uint": "1"}` / `{"string": "k-str"}` /
69
+ // `{"uuid": "…"}`: a bare JSON `1` has no oneof spelling, so each arm is named
70
+ // on the wire. Setting two arms at once is a decode failure.
71
+ //
72
+ // ## `filter` is a `Value`, not the typed IR
73
+ //
74
+ // The typed filter IR is API1 Task 4. Until it lands, `filter` is the native
75
+ // query JSON verbatim (`{"term": {"field": "tenant", "value": "c"}}`,
76
+ // `"match_all"`), which is what the REST route took and what a caller already
77
+ // has. `select` is a `Struct` for the same reason and because a projection's
78
+ // `source` has a JSON object form (`{"include": [], "exclude": []}`) that a
79
+ // `string` cannot hold.
80
+ //
81
+ // ## Where the tokens and the backlog live
82
+ //
83
+ // A write answers its consistency token in `token` and in the
84
+ // `loams-consistency-token` response header; a read answers `readToken` and
85
+ // the same header. The unapplied-data backlog (`loams-unapplied-records`,
86
+ // `loams-unapplied-bytes`) stays response headers, because that is the REST
87
+ // behaviour and a response half is headers by rule (design §44 §7.4). The one
88
+ // request header that stays is `loams-backpressure: off`, the write-budget
89
+ // override (M1.3 Task 15 rule 5): it is a transport-level switch with no
90
+ // message-level meaning, and an unrecognised value is `invalid_argument`.
91
+ //
92
+ // ## The handlers are thin
93
+ //
94
+ // Each one calls the same `CollectionService` entry point the REST route it
95
+ // replaces calls — `write`, `get_with_token`, `scroll_with_token`,
96
+ // `count_with_token`, `delete_by_filter`, `patch_by_filter` — and reuses the
97
+ // REST request's own parsing (`op_from_json`, `patch_spec_from_json`) by
98
+ // turning the request message back into the JSON those parse, so the two
99
+ // surfaces cannot drift. The behaviour is the behaviour
100
+ // `crates/loams/tests/it/` already pins; the REST routes stay until Task 9.
101
+ //
102
+ // ## Why this is a second file in `loams.collection.v1`, not its own package
103
+ //
104
+ // §44 §7.2's module catalogue puts both services in one package —
105
+ // `loams.collections`, `loams.documents` ⇢ `loams.collection.v1`
106
+ // `CollectionService`, `DocumentService` — and §8's `New protos:` sentence
107
+ // enumerates `loams.collection.v1` as covering Namespace, Collection,
108
+ // **Document** and Query. One package, four concerns, several files: the same
109
+ // shape `proto/loams/live/v1/` already uses with its five files. An earlier
110
+ // draft gave documents a `loams.document.v1` of their own, which no design
111
+ // section mentions; `crates/loams/tests/route_map.rs` now fails if any proto or
112
+ // `CATALOGUE` row declares a package §44 does not enumerate.
113
+ //
114
+ // Splitting the files still matters — `collection.proto` is the schema and scan
115
+ // plan, this file is the document data path, and they are read separately — but
116
+ // the package is the unit on the wire, in the SDK stubs and in `CATALOGUE`, and
117
+ // §44 fixes it.
118
+ //
119
+ // ## The SDK module, and why no method is in the SDK facade yet
120
+ //
121
+ // The service carries `loams.options.v1.ModuleOptions` (`loams.documents`),
122
+ // which is what §44 §7.3 asks of every public package. Note this file is in
123
+ // `loams.collection.v1`, so the module a caller reaches is named by the
124
+ // `module` option here, not by the package name.
125
+ //
126
+ // No method carries `FacadeOptions`, which is plan ruling 2.5's shape again:
127
+ // a `facade` option makes `protoc-gen-loams-facade` emit a call, and the call
128
+ // imports the package's message types from the generated stubs, which means
129
+ // every SDK mirror has to generate `loams.collection.v1` first. That is SDK1's
130
+ // stub task. Sharing the package also means the generated facades barely move:
131
+ // `PROTO_PACKAGES` already listed `loams.collection.v1`, so what changed is that
132
+ // a `loams.document.v1` line went away. `facade.ts`, `facade.py`, `facade.rs`
133
+ // and the three goldens are regenerated with it.
134
+ import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
135
+ import { file_google_protobuf_struct } from "@bufbuild/protobuf/wkt";
136
+ import { file_loams_options_v1_options } from "../../options/v1/options_pb.js";
137
+ /**
138
+ * Describes the file loams/collection/v1/document.proto.
139
+ */
140
+ export const file_loams_collection_v1_document = /*@__PURE__*/ fileDesc("CiJsb2Ftcy9jb2xsZWN0aW9uL3YxL2RvY3VtZW50LnByb3RvEhNsb2Ftcy5jb2xsZWN0aW9uL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V3JpdGVSZXNwb25zZSIVkrUYERIPcGF0Y2hfYnlfZmlsdGVyGlyKtRhYCglkb2N1bWVudHMSS0RvY3VtZW50czogd3JpdGUsIGdldCwgc2Nyb2xsLCBjb3VudCwgZGVsZXRlIGJ5IGZpbHRlciBhbmQgcGF0Y2ggYnkgZmlsdGVyLmIGcHJvdG8z", [file_google_protobuf_struct, file_loams_options_v1_options]);
141
+ /**
142
+ * Describes the message loams.collection.v1.WriteDocumentsRequest.
143
+ * Use `create(WriteDocumentsRequestSchema)` to create a new message.
144
+ */
145
+ export const WriteDocumentsRequestSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 0);
146
+ /**
147
+ * Describes the message loams.collection.v1.WriteDocumentsResponse.
148
+ * Use `create(WriteDocumentsResponseSchema)` to create a new message.
149
+ */
150
+ export const WriteDocumentsResponseSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 1);
151
+ /**
152
+ * Describes the message loams.collection.v1.WriteOp.
153
+ * Use `create(WriteOpSchema)` to create a new message.
154
+ */
155
+ export const WriteOpSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 2);
156
+ /**
157
+ * Describes the message loams.collection.v1.WriteDocument.
158
+ * Use `create(WriteDocumentSchema)` to create a new message.
159
+ */
160
+ export const WriteDocumentSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 3);
161
+ /**
162
+ * Describes the message loams.collection.v1.DeleteDocument.
163
+ * Use `create(DeleteDocumentSchema)` to create a new message.
164
+ */
165
+ export const DeleteDocumentSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 4);
166
+ /**
167
+ * Describes the message loams.collection.v1.Patch.
168
+ * Use `create(PatchSchema)` to create a new message.
169
+ */
170
+ export const PatchSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 5);
171
+ /**
172
+ * Describes the message loams.collection.v1.DocumentId.
173
+ * Use `create(DocumentIdSchema)` to create a new message.
174
+ */
175
+ export const DocumentIdSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 6);
176
+ /**
177
+ * Describes the message loams.collection.v1.OpPosition.
178
+ * Use `create(OpPositionSchema)` to create a new message.
179
+ */
180
+ export const OpPositionSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 7);
181
+ /**
182
+ * Describes the message loams.collection.v1.GetDocumentsRequest.
183
+ * Use `create(GetDocumentsRequestSchema)` to create a new message.
184
+ */
185
+ export const GetDocumentsRequestSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 8);
186
+ /**
187
+ * Describes the message loams.collection.v1.GetDocumentsResponse.
188
+ * Use `create(GetDocumentsResponseSchema)` to create a new message.
189
+ */
190
+ export const GetDocumentsResponseSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 9);
191
+ /**
192
+ * Describes the message loams.collection.v1.ScrollDocumentsRequest.
193
+ * Use `create(ScrollDocumentsRequestSchema)` to create a new message.
194
+ */
195
+ export const ScrollDocumentsRequestSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 10);
196
+ /**
197
+ * Describes the message loams.collection.v1.ScrollDocumentsResponse.
198
+ * Use `create(ScrollDocumentsResponseSchema)` to create a new message.
199
+ */
200
+ export const ScrollDocumentsResponseSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 11);
201
+ /**
202
+ * Describes the message loams.collection.v1.CountDocumentsRequest.
203
+ * Use `create(CountDocumentsRequestSchema)` to create a new message.
204
+ */
205
+ export const CountDocumentsRequestSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 12);
206
+ /**
207
+ * Describes the message loams.collection.v1.CountDocumentsResponse.
208
+ * Use `create(CountDocumentsResponseSchema)` to create a new message.
209
+ */
210
+ export const CountDocumentsResponseSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 13);
211
+ /**
212
+ * Describes the message loams.collection.v1.DeleteByFilterRequest.
213
+ * Use `create(DeleteByFilterRequestSchema)` to create a new message.
214
+ */
215
+ export const DeleteByFilterRequestSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 14);
216
+ /**
217
+ * Describes the message loams.collection.v1.PatchByFilterRequest.
218
+ * Use `create(PatchByFilterRequestSchema)` to create a new message.
219
+ */
220
+ export const PatchByFilterRequestSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 15);
221
+ /**
222
+ * Describes the message loams.collection.v1.FilterWriteResponse.
223
+ * Use `create(FilterWriteResponseSchema)` to create a new message.
224
+ */
225
+ export const FilterWriteResponseSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 16);
226
+ /**
227
+ * Describes the message loams.collection.v1.FilterWriteCursor.
228
+ * Use `create(FilterWriteCursorSchema)` to create a new message.
229
+ */
230
+ export const FilterWriteCursorSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 17);
231
+ /**
232
+ * Describes the message loams.collection.v1.Document.
233
+ * Use `create(DocumentSchema)` to create a new message.
234
+ */
235
+ export const DocumentSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 18);
236
+ /**
237
+ * Describes the message loams.collection.v1.Consistency.
238
+ * Use `create(ConsistencySchema)` to create a new message.
239
+ */
240
+ export const ConsistencySchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 19);
241
+ /**
242
+ * Describes the message loams.collection.v1.Pin.
243
+ * Use `create(PinSchema)` to create a new message.
244
+ */
245
+ export const PinSchema = /*@__PURE__*/ messageDesc(file_loams_collection_v1_document, 20);
246
+ /**
247
+ * The outcome of one op (Ruling 10).
248
+ *
249
+ * @generated from enum loams.collection.v1.OpResult
250
+ */
251
+ export var OpResult;
252
+ (function (OpResult) {
253
+ /**
254
+ * @generated from enum value: OP_RESULT_UNSPECIFIED = 0;
255
+ */
256
+ OpResult[OpResult["UNSPECIFIED"] = 0] = "UNSPECIFIED";
257
+ /**
258
+ * The document was not there and now is.
259
+ *
260
+ * @generated from enum value: OP_RESULT_CREATED = 1;
261
+ */
262
+ OpResult[OpResult["CREATED"] = 1] = "CREATED";
263
+ /**
264
+ * The document was there and now holds this write.
265
+ *
266
+ * @generated from enum value: OP_RESULT_UPDATED = 2;
267
+ */
268
+ OpResult[OpResult["UPDATED"] = 2] = "UPDATED";
269
+ /**
270
+ * The document was there and now is not.
271
+ *
272
+ * @generated from enum value: OP_RESULT_DELETED = 3;
273
+ */
274
+ OpResult[OpResult["DELETED"] = 3] = "DELETED";
275
+ /**
276
+ * There was no such document (only reported with `report_existence`).
277
+ *
278
+ * @generated from enum value: OP_RESULT_NOT_FOUND = 4;
279
+ */
280
+ OpResult[OpResult["NOT_FOUND"] = 4] = "NOT_FOUND";
281
+ /**
282
+ * A patch whose result equals the document that is already there.
283
+ *
284
+ * @generated from enum value: OP_RESULT_NOOP = 5;
285
+ */
286
+ OpResult[OpResult["NOOP"] = 5] = "NOOP";
287
+ /**
288
+ * Written, without existence reporting.
289
+ *
290
+ * @generated from enum value: OP_RESULT_ACCEPTED = 6;
291
+ */
292
+ OpResult[OpResult["ACCEPTED"] = 6] = "ACCEPTED";
293
+ })(OpResult || (OpResult = {}));
294
+ /**
295
+ * Describes the enum loams.collection.v1.OpResult.
296
+ */
297
+ export const OpResultSchema = /*@__PURE__*/ enumDesc(file_loams_collection_v1_document, 0);
298
+ /**
299
+ * @generated from enum loams.collection.v1.Freshness
300
+ */
301
+ export var Freshness;
302
+ (function (Freshness) {
303
+ /**
304
+ * @generated from enum value: FRESHNESS_UNSPECIFIED = 0;
305
+ */
306
+ Freshness[Freshness["UNSPECIFIED"] = 0] = "UNSPECIFIED";
307
+ /**
308
+ * Every write acknowledged before the read began.
309
+ *
310
+ * @generated from enum value: FRESHNESS_STRONG = 1;
311
+ */
312
+ Freshness[Freshness["STRONG"] = 1] = "STRONG";
313
+ /**
314
+ * Whatever the tail holds right now.
315
+ *
316
+ * @generated from enum value: FRESHNESS_EVENTUAL = 2;
317
+ */
318
+ Freshness[Freshness["EVENTUAL"] = 2] = "EVENTUAL";
319
+ })(Freshness || (Freshness = {}));
320
+ /**
321
+ * Describes the enum loams.collection.v1.Freshness.
322
+ */
323
+ export const FreshnessSchema = /*@__PURE__*/ enumDesc(file_loams_collection_v1_document, 1);
324
+ /**
325
+ * @generated from service loams.collection.v1.DocumentService
326
+ */
327
+ export const DocumentService = /*@__PURE__*/ serviceDesc(file_loams_collection_v1_document, 0);