@query-farm/vgi 0.43.0 → 0.45.0
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/README.md +5 -2
- package/dist/arrow/impl-arrowjs/index.d.ts +1 -1
- package/dist/arrow/impl-arrowjs/ipc.d.ts +6 -0
- package/dist/arrow/impl-flechette/build.d.ts +2 -2
- package/dist/arrow/impl-flechette/canonical.d.ts +1 -1
- package/dist/arrow/impl-flechette/index.d.ts +1 -1
- package/dist/arrow/impl-flechette/ipc.d.ts +6 -0
- package/dist/arrow/index.d.ts +1 -1
- package/dist/attach-ticket.d.ts +18 -7
- package/dist/catalog/contents-codec.d.ts +7 -0
- package/dist/catalog/contents-digest.d.ts +2 -1
- package/dist/catalog/interface.d.ts +3 -0
- package/dist/catalog/publication-envelope.d.ts +1 -0
- package/dist/catalog/publication.d.ts +142 -0
- package/dist/catalog/s3-publication.d.ts +38 -0
- package/dist/client-entry.js +349 -114
- package/dist/client-entry.js.map +16 -14
- package/dist/codec/asd.d.ts +7 -1
- package/dist/codec/conform.d.ts +51 -0
- package/dist/errors.d.ts +5 -1
- package/dist/generated/vgi-client.d.ts +6 -14
- package/dist/generated/vgi-protocol-schemas.d.ts +2 -0
- package/dist/generated/vgi-protocol-types.d.ts +26 -3
- package/dist/generated/vgi-service.d.ts +3 -3
- package/dist/index.core.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +955 -118
- package/dist/index.js.map +33 -28
- package/dist/protocol/dispatch.d.ts +1 -1
- package/dist/protocol/handlers/catalog/contents.d.ts +4 -4
- package/dist/protocol/handlers/shared.d.ts +2 -1
- package/dist/protocol/serializers/shared.d.ts +2 -1
- package/dist/rpc-server.d.ts +2 -2
- package/dist/serve-entry.js +867 -165
- package/dist/serve-entry.js.map +26 -22
- package/dist/worker-cf-entry.js +825 -114
- package/dist/worker-cf-entry.js.map +31 -27
- package/package.json +3 -3
- package/src/arrow/impl-arrowjs/index.ts +1 -0
- package/src/arrow/impl-arrowjs/ipc.ts +23 -0
- package/src/arrow/impl-flechette/build.ts +4 -2
- package/src/arrow/impl-flechette/canonical.ts +7 -2
- package/src/arrow/impl-flechette/index.ts +1 -0
- package/src/arrow/impl-flechette/ipc.ts +19 -0
- package/src/arrow/index.ts +1 -1
- package/src/attach-ticket.ts +41 -13
- package/src/catalog/composite.ts +2 -1
- package/src/catalog/contents-codec.ts +77 -0
- package/src/catalog/contents-digest.ts +20 -17
- package/src/catalog/interface.ts +8 -4
- package/src/catalog/publication-envelope.ts +62 -0
- package/src/catalog/publication.ts +290 -0
- package/src/catalog/read-only.ts +8 -8
- package/src/catalog/s3-publication.ts +81 -0
- package/src/client/client.ts +15 -24
- package/src/codec/asd.ts +45 -3
- package/src/codec/conform.ts +194 -0
- package/src/errors.ts +27 -7
- package/src/functions/registry.ts +3 -2
- package/src/generated/vgi-client.ts +7 -16
- package/src/generated/vgi-protocol-schemas.ts +13 -6
- package/src/generated/vgi-protocol-types.ts +39 -5
- package/src/generated/vgi-service.ts +4 -3
- package/src/http/fetch.ts +1 -1
- package/src/index.core.ts +3 -1
- package/src/index.ts +5 -0
- package/src/protocol/dispatch.ts +1 -1
- package/src/protocol/handlers/catalog/admin.ts +7 -4
- package/src/protocol/handlers/catalog/contents.ts +50 -35
- package/src/protocol/handlers/shared.ts +8 -2
- package/src/protocol/serializers/bind.ts +3 -1
- package/src/protocol/serializers/shared.ts +5 -2
- package/src/rpc-server.ts +7 -7
|
@@ -50,7 +50,7 @@ export { VGI_PROTOCOL_NAME };
|
|
|
50
50
|
* hash covers method names, types and the params/result/header schemas only
|
|
51
51
|
* (WIRE_PROTOCOL.md §14).
|
|
52
52
|
*
|
|
53
|
-
* It changes only with vgi.v2's protocol version (currently 2.
|
|
53
|
+
* It changes only with vgi.v2's protocol version (currently 2.2.0). Asserted
|
|
54
54
|
* by src/protocol/__tests__/vgi-v2-hash.test.ts; if that test fails, the
|
|
55
55
|
* surface drifted from the reference -- fix the schemas, do not bump this.
|
|
56
56
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CatalogContentsResponse } from "../../../generated/vgi-protocol-types.js";
|
|
2
|
+
import { ExternalRef, type CallContext } from "@query-farm/vgi-rpc";
|
|
2
3
|
import type { AttachOpaqueData, CatalogInterface } from "../../../catalog/interface.js";
|
|
3
4
|
type Wire = {
|
|
4
5
|
result: Uint8Array;
|
|
@@ -9,9 +10,8 @@ type Wire = {
|
|
|
9
10
|
* Enforces the revalidation rules: `not_modified` needs an etag equal to
|
|
10
11
|
* `ifNoneMatch` and no schemas; a catalog with no etag never yields
|
|
11
12
|
* `not_modified` (and so ignores `ifNoneMatch`). Validates the schema paths
|
|
12
|
-
* (unique, parent present) and orders them parent-first.
|
|
13
|
-
*
|
|
14
|
-
* byte-identical to catalog_schemas / catalog_schema_contents_* items.
|
|
13
|
+
* (unique, parent present) and orders them parent-first. The six collection
|
|
14
|
+
* streams retain the fields used by the existing per-schema RPC metadata.
|
|
15
15
|
*/
|
|
16
16
|
export declare function buildCatalogContents(cat: CatalogInterface, owner: CatalogInterface, attach: AttachOpaqueData, version: number, ifNoneMatch: string | null): Promise<CatalogContentsResponse>;
|
|
17
17
|
/**
|
|
@@ -23,5 +23,5 @@ export declare function buildCatalogContents(cat: CatalogInterface, owner: Catal
|
|
|
23
23
|
* serialized response bytes. A conditional call matching the cached etag is
|
|
24
24
|
* answered `not_modified` without touching the snapshot.
|
|
25
25
|
*/
|
|
26
|
-
export declare function serveCatalogContents(cat: CatalogInterface, attach: AttachOpaqueData, ifNoneMatch: string | null): Promise<Wire>;
|
|
26
|
+
export declare function serveCatalogContents(cat: CatalogInterface, attach: AttachOpaqueData, ifNoneMatch: string | null, callContext?: CallContext, sealedAttach?: Uint8Array): Promise<Wire | ExternalRef>;
|
|
27
27
|
export {};
|
|
@@ -11,7 +11,8 @@ export declare function unwrapRequest(requestBytes: any): Record<string, any>;
|
|
|
11
11
|
export declare function normalizeRequestSchemaPaths(params: Record<string, any>): void;
|
|
12
12
|
/**
|
|
13
13
|
* Wrap a dict of values into a single "result" Binary column.
|
|
14
|
-
* Builds a 1-row batch from the values using the given schema
|
|
14
|
+
* Builds a 1-row batch from the values using the given schema (conformed to
|
|
15
|
+
* the protocol's container rules, see `conformRecord`),
|
|
15
16
|
* serializes it to IPC bytes, and returns { result: bytes }.
|
|
16
17
|
*/
|
|
17
18
|
export declare function wrapResult(values: Record<string, any>, innerSchema: VgiSchema | import("../../arrow/index.js").VgiSchema): {
|
|
@@ -7,6 +7,7 @@ import { type VgiSchema, type VgiBatch } from "../../arrow/index.js";
|
|
|
7
7
|
export declare function toUint8Array(val: any): Uint8Array;
|
|
8
8
|
/**
|
|
9
9
|
* Build a single-row RecordBatch from a {fieldName: value} dict matching the
|
|
10
|
-
* given schema. Auto-coerces JS numbers to BigInt for Int64 fields
|
|
10
|
+
* given schema. Auto-coerces JS numbers to BigInt for Int64 fields, and
|
|
11
|
+
* applies the protocol's container rules (`conformRecord`).
|
|
11
12
|
*/
|
|
12
13
|
export declare function buildSingleRowBatch(schema: VgiSchema, values: Record<string, any>): VgiBatch;
|
package/dist/rpc-server.d.ts
CHANGED
|
@@ -31,13 +31,13 @@ export interface HostingOptions {
|
|
|
31
31
|
*
|
|
32
32
|
* Each needs a distinct wire name, which may not be `vgi.v2` and may not
|
|
33
33
|
* use the reserved `vgi_rpc.` prefix: reflection is hosted automatically and
|
|
34
|
-
* `vgi_rpc.Identity.
|
|
34
|
+
* `vgi_rpc.Identity.v2` is enabled through {@link resolveToken} /
|
|
35
35
|
* {@link mintGrant}. Violations are a startup error naming this hook.
|
|
36
36
|
*/
|
|
37
37
|
hostedProtocols?: () => Iterable<Protocol>;
|
|
38
38
|
/**
|
|
39
39
|
* Resolve an opaque bearer credential to the identity it authenticates as.
|
|
40
|
-
* Supplying it hosts `vgi_rpc.Identity.
|
|
40
|
+
* Supplying it hosts `vgi_rpc.Identity.v2`'s `introspect_token` -- on HTTP,
|
|
41
41
|
* the transport that authenticates callers. Absent, the method is absent
|
|
42
42
|
* (not hosted-and-refusing), which keeps a dependency upgrade from growing a
|
|
43
43
|
* credential-to-identity oracle on every existing worker.
|