@query-farm/vgi 0.29.1 → 0.31.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 +1 -1
- package/dist/client-entry.js +20 -5
- package/dist/client-entry.js.map +5 -5
- package/dist/generated/vgi-client.d.ts +1 -4
- package/dist/index.js +24 -11
- package/dist/index.js.map +8 -8
- package/dist/protocol/dispatch.d.ts +26 -0
- package/dist/serve-entry.js +9 -8
- package/dist/serve-entry.js.map +7 -7
- package/dist/worker-cf-entry.js +10 -12
- package/dist/worker-cf-entry.js.map +8 -8
- package/package.json +5 -4
- package/src/catalog/read-only.ts +1 -4
- package/src/client/errors.ts +19 -0
- package/src/generated/vgi-client.ts +2 -5
- package/src/generated/vgi-protocol-schemas.ts +2 -5
- package/src/http/client-bundle.ts +1 -1
- package/src/http/fetch.ts +10 -3
- package/src/protocol/dispatch.ts +28 -1
|
@@ -20,4 +20,30 @@ export interface ProtocolConfig {
|
|
|
20
20
|
*/
|
|
21
21
|
signingKey?: Uint8Array;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Wire name of the VGI protocol: the `vgi_rpc.protocol` routing key and the
|
|
25
|
+
* `{protocol}` HTTP path segment.
|
|
26
|
+
*
|
|
27
|
+
* The name carries the major version, so an incompatible major is a
|
|
28
|
+
* *different* protocol and therefore a 404 — an answer every proxy, WAF and
|
|
29
|
+
* load balancer understands without an Arrow parser, and one that lets
|
|
30
|
+
* `vgi.v2` and a future `vgi.v3` be served side by side while clients migrate.
|
|
31
|
+
* That matters for this consumer specifically: the DuckDB extension ships to
|
|
32
|
+
* users and cannot be flag-dayed.
|
|
33
|
+
*
|
|
34
|
+
* Declared rather than derived. Until the transports made the routing key
|
|
35
|
+
* required, each implementation's wire name defaulted to whatever its local
|
|
36
|
+
* type was called, which left the six ports disagreeing four ways — Python
|
|
37
|
+
* `VgiProtocol`, Java and C# `VgiService`, Go the framework default `Service`,
|
|
38
|
+
* this port `vgi` — so no client could address them all. The canonical name is
|
|
39
|
+
* decided in vgi-python and emitted by the DuckDB extension; this is that same
|
|
40
|
+
* string, not an independent choice.
|
|
41
|
+
*
|
|
42
|
+
* Since `@query-farm/vgi-rpc` 0.24.0 the name is also bound into the AEAD
|
|
43
|
+
* associated data of every state and call token (`TokenScope.protocol`), so a
|
|
44
|
+
* caller that opens a token minted by this protocol has to name it. Exported
|
|
45
|
+
* so the HTTP entry points build that scope from the same constant the
|
|
46
|
+
* protocol is registered under rather than a second copy of the literal.
|
|
47
|
+
*/
|
|
48
|
+
export declare const VGI_PROTOCOL_NAME = "vgi.v2";
|
|
23
49
|
export declare function buildVgiProtocol(config: ProtocolConfig): Protocol;
|