@query-farm/vgi 0.50.1 → 0.52.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.
Files changed (84) hide show
  1. package/README.md +45 -3
  2. package/dist/client-entry.js +833 -775
  3. package/dist/client-entry.js.map +10 -10
  4. package/dist/functions/aggregate.d.ts +25 -21
  5. package/dist/functions/execution-cache.d.ts +11 -0
  6. package/dist/functions/storage-blobs.d.ts +173 -0
  7. package/dist/functions/storage-cf-do.d.ts +50 -0
  8. package/dist/functions/storage-seal.d.ts +27 -0
  9. package/dist/functions/storage.d.ts +71 -1
  10. package/dist/functions/table-buffering.d.ts +30 -0
  11. package/dist/functions/table.d.ts +6 -1
  12. package/dist/generated/vgi-client.d.ts +7 -1
  13. package/dist/generated/vgi-protocol-schemas.d.ts +10 -9
  14. package/dist/generated/vgi-protocol-types.d.ts +244 -2
  15. package/dist/generated/vgi-service.d.ts +1 -1
  16. package/dist/hosted.d.ts +117 -0
  17. package/dist/http/blob-vendor.d.ts +33 -0
  18. package/dist/http/fetch.d.ts +60 -2
  19. package/dist/http/hosted-auth.d.ts +45 -0
  20. package/dist/index.core.d.ts +11 -3
  21. package/dist/index.js +8661 -6677
  22. package/dist/index.js.map +52 -34
  23. package/dist/protocol/arguments-ref.d.ts +107 -0
  24. package/dist/protocol/dispatch.d.ts +12 -2
  25. package/dist/protocol/handlers/aggregate.d.ts +1 -1
  26. package/dist/protocol/handlers/catalog/shared.d.ts +10 -0
  27. package/dist/protocol/handlers/function.d.ts +23 -0
  28. package/dist/protocol/handlers/table-buffering.d.ts +1 -1
  29. package/dist/protocol/serialize.d.ts +1 -1
  30. package/dist/protocol/serializers/bind.d.ts +27 -1
  31. package/dist/protocol/serializers/cardinality.d.ts +1 -1
  32. package/dist/protocol/serializers/splits.d.ts +7 -0
  33. package/dist/protocol/state-serializer.d.ts +8 -7
  34. package/dist/protocol/stream-init.d.ts +17 -0
  35. package/dist/protocol/types.d.ts +32 -0
  36. package/dist/secrets/lookups.d.ts +31 -0
  37. package/dist/serve-entry.d.ts +41 -6
  38. package/dist/serve-entry.js +8531 -6302
  39. package/dist/serve-entry.js.map +52 -35
  40. package/dist/worker-cf-entry.d.ts +5 -0
  41. package/dist/worker-cf-entry.js +7191 -4990
  42. package/dist/worker-cf-entry.js.map +59 -41
  43. package/package.json +5 -4
  44. package/src/functions/aggregate.ts +101 -152
  45. package/src/functions/copy-from.ts +2 -2
  46. package/src/functions/execution-cache.ts +59 -0
  47. package/src/functions/storage-blobs.ts +654 -0
  48. package/src/functions/storage-cf-do.ts +176 -22
  49. package/src/functions/storage-seal.ts +208 -0
  50. package/src/functions/storage.ts +174 -8
  51. package/src/functions/table-buffering.ts +104 -18
  52. package/src/functions/table-in-out.ts +3 -1
  53. package/src/functions/table.ts +12 -8
  54. package/src/generated/vgi-client.ts +9 -2
  55. package/src/generated/vgi-protocol-schemas.ts +115 -107
  56. package/src/generated/vgi-protocol-types.ts +640 -3
  57. package/src/generated/vgi-service.ts +2 -2
  58. package/src/hosted.ts +254 -0
  59. package/src/http/blob-vendor.ts +80 -0
  60. package/src/http/fetch.ts +179 -8
  61. package/src/http/hosted-auth.ts +326 -0
  62. package/src/index.core.ts +66 -1
  63. package/src/protocol/arguments-ref.ts +260 -0
  64. package/src/protocol/dispatch.ts +15 -4
  65. package/src/protocol/handlers/aggregate.ts +123 -82
  66. package/src/protocol/handlers/catalog/shared.ts +20 -0
  67. package/src/protocol/handlers/function.ts +135 -59
  68. package/src/protocol/handlers/table-buffering.ts +49 -32
  69. package/src/protocol/serialize.ts +3 -0
  70. package/src/protocol/serializers/bind.ts +96 -69
  71. package/src/protocol/serializers/cardinality.ts +4 -7
  72. package/src/protocol/serializers/init.ts +5 -11
  73. package/src/protocol/serializers/splits.ts +31 -4
  74. package/src/protocol/state-serializer.ts +27 -39
  75. package/src/protocol/stream-init.ts +87 -0
  76. package/src/protocol/types.ts +33 -0
  77. package/src/secrets/lookups.ts +53 -0
  78. package/src/serve-entry.ts +138 -11
  79. package/src/worker-cf-entry.ts +33 -0
  80. package/src/worker.ts +25 -0
  81. package/dist/protocol/carried-init-request.d.ts +0 -28
  82. package/dist/util/zstd-sync.d.ts +0 -7
  83. package/src/protocol/carried-init-request.ts +0 -139
  84. package/src/util/zstd-sync.ts +0 -50
@@ -2,7 +2,7 @@
2
2
  // GENERATED by vgi.codegen.ts_schemas. DO NOT EDIT BY HAND.
3
3
  //
4
4
  // Generator: vgi-gen-ts-schemas v2
5
- // Content hash: f5e8b0f6823e
5
+ // Content hash: 928fcc1dcce0
6
6
  //
7
7
  // To regenerate:
8
8
  // uv run --project ~/Development/vgi-python vgi-gen-ts-schemas \
@@ -458,6 +458,120 @@ export const RequiredFilterPathsSchema = schema([
458
458
  field("groups", list(field("item", list(field("item", list(field("item", utf8(), true)), true)), true)), false),
459
459
  ]);
460
460
 
461
+ // Origin: CopyFromContext
462
+ export const CopyFromContextSchema = schema([
463
+ field("format", utf8(), false),
464
+ field("file_path", utf8(), false),
465
+ field("expected_schema", binary(), false),
466
+ ]);
467
+
468
+ // Origin: CopyToContext
469
+ export const CopyToContextSchema = schema([
470
+ field("format", utf8(), false),
471
+ field("file_path", utf8(), false),
472
+ ]);
473
+
474
+ // Origin: ArgumentsLocation
475
+ export const ArgumentsLocationSchema = schema([
476
+ field("ref", binary(), false),
477
+ field("size", int64(), false),
478
+ field("sha256", utf8(), false),
479
+ ]);
480
+
481
+ // Origin: BindRequest
482
+ export const BindRequestSchema = schema([
483
+ field("function_name", utf8(), false),
484
+ field("arguments", binary(), true),
485
+ field("function_type", dictionary(utf8(), int16()), false),
486
+ field("input_schema", binary(), true),
487
+ field("settings", binary(), true),
488
+ field("secrets", binary(), true),
489
+ field("attach_opaque_data", binary(), true),
490
+ field("transaction_opaque_data", binary(), true),
491
+ field("resolved_secrets_provided", bool(), false),
492
+ field("at_unit", utf8(), true),
493
+ field("at_value", utf8(), true),
494
+ field("copy_from", struct([field("format", utf8(), false), field("file_path", utf8(), false), field("expected_schema", binary(), false)]), true),
495
+ field("copy_to", struct([field("format", utf8(), false), field("file_path", utf8(), false)]), true),
496
+ field("schema_path", list(field("item", utf8(), true)), true),
497
+ field("argument_names", list(field("item", utf8(), true)), true),
498
+ field("arguments_location", struct([field("ref", binary(), false), field("size", int64(), false), field("sha256", utf8(), false)]), true),
499
+ ]);
500
+
501
+ // Origin: InitRequest
502
+ export const InitRequestSchema = schema([
503
+ field("bind_call", binary(), false),
504
+ field("output_schema", binary(), false),
505
+ field("bind_opaque_data", binary(), true),
506
+ field("projection_ids", list(field("item", int64(), true)), true),
507
+ field("pushdown_filters", largeBinary(), true),
508
+ field("join_keys", list(field("item", largeBinary(), true)), true),
509
+ field("split_tokens", list(field("item", largeBinary(), true)), true),
510
+ field("row_limit", int64(), true),
511
+ field("phase", dictionary(utf8(), int16()), true),
512
+ field("finalize_state_id", binary(), true),
513
+ field("execution_id", binary(), true),
514
+ field("init_opaque_data", binary(), true),
515
+ field("substream_id", binary(), true),
516
+ field("order_by_column_name", utf8(), true),
517
+ field("order_by_direction", dictionary(utf8(), int16()), true),
518
+ field("order_by_null_order", dictionary(utf8(), int16()), true),
519
+ field("order_by_limit", int64(), true),
520
+ field("tablesample_percentage", float64(), true),
521
+ field("tablesample_seed", int64(), true),
522
+ ]);
523
+
524
+ // Origin: TableFunctionCardinalityRequest
525
+ export const TableFunctionCardinalityRequestSchema = schema([
526
+ field("bind_call", binary(), false),
527
+ field("bind_opaque_data", binary(), true),
528
+ ]);
529
+
530
+ // Origin: TableFunctionStatisticsRequest
531
+ export const TableFunctionStatisticsRequestSchema = schema([
532
+ field("bind_call", binary(), false),
533
+ field("bind_opaque_data", binary(), true),
534
+ ]);
535
+
536
+ // Origin: TableFunctionDynamicToStringRequest
537
+ export const TableFunctionDynamicToStringRequestSchema = schema([
538
+ field("bind_call", binary(), false),
539
+ field("bind_opaque_data", binary(), true),
540
+ field("global_execution_id", binary(), false),
541
+ ]);
542
+
543
+ // Origin: TableFunctionPlanRequest
544
+ export const TableFunctionPlanRequestSchema = schema([
545
+ field("bind_call", binary(), false),
546
+ field("bind_opaque_data", binary(), true),
547
+ field("projection_ids", list(field("item", int64(), true)), true),
548
+ field("pushdown_filters", largeBinary(), true),
549
+ field("join_keys", list(field("item", largeBinary(), true)), true),
550
+ field("row_limit", int64(), true),
551
+ field("target_split_bytes", int64(), true),
552
+ field("min_splits", int64(), true),
553
+ field("max_splits_per_response", int64(), true),
554
+ field("cursor", binary(), true),
555
+ field("refined_filters", largeBinary(), true),
556
+ field("filters_complete", bool(), false),
557
+ field("start_position", binary(), true),
558
+ field("end_position", binary(), true),
559
+ field("order_by_column_name", utf8(), true),
560
+ field("order_by_direction", dictionary(utf8(), int16()), true),
561
+ field("order_by_null_order", dictionary(utf8(), int16()), true),
562
+ field("order_by_limit", int64(), true),
563
+ field("tablesample_percentage", float64(), true),
564
+ field("tablesample_seed", int64(), true),
565
+ ]);
566
+
567
+ // Origin: TableFunctionProjectionRequest
568
+ export const TableFunctionProjectionRequestSchema = schema([
569
+ field("bind_call", binary(), false),
570
+ field("bind_result", binary(), false),
571
+ field("expressions", list(field("item", largeBinary(), true)), false),
572
+ field("result_schema", binary(), false),
573
+ ]);
574
+
461
575
  // Origin: ScanFunctionResult
462
576
  export const ScanFunctionResultSchema = schema([
463
577
  field("function_name", utf8(), false),
@@ -669,25 +783,6 @@ export const AggregateWindowRequestSchema = schema([
669
783
  field("schema_path", list(field("item", utf8(), true)), true),
670
784
  ]);
671
785
 
672
- // Origin: BindRequest
673
- export const BindRequestSchema = schema([
674
- field("function_name", utf8(), false),
675
- field("arguments", binary(), false),
676
- field("function_type", dictionary(utf8(), int16()), false),
677
- field("input_schema", binary(), true),
678
- field("settings", binary(), true),
679
- field("secrets", binary(), true),
680
- field("attach_opaque_data", binary(), true),
681
- field("transaction_opaque_data", binary(), true),
682
- field("resolved_secrets_provided", bool(), false),
683
- field("at_unit", utf8(), true),
684
- field("at_value", utf8(), true),
685
- field("copy_from", struct([field("format", utf8(), false), field("file_path", utf8(), false), field("expected_schema", binary(), false)]), true),
686
- field("copy_to", struct([field("format", utf8(), false), field("file_path", utf8(), false)]), true),
687
- field("schema_path", list(field("item", utf8(), true)), true),
688
- field("argument_names", list(field("item", utf8(), true)), true),
689
- ]);
690
-
691
786
  // Origin: CatalogAttachRequest
692
787
  export const CatalogAttachRequestSchema = schema([
693
788
  field("name", utf8(), false),
@@ -715,19 +810,6 @@ export const ClientCapabilitiesSchema = schema([
715
810
  field("query_pushdown", struct([field("encodings", list(field("item", utf8(), true)), false), field("semantic_profiles", list(field("item", utf8(), true)), false), field("engine_version", utf8(), false), field("max_query_bytes", int64(), false)]), true),
716
811
  ]);
717
812
 
718
- // Origin: CopyFromContext
719
- export const CopyFromContextSchema = schema([
720
- field("format", utf8(), false),
721
- field("file_path", utf8(), false),
722
- field("expected_schema", binary(), false),
723
- ]);
724
-
725
- // Origin: CopyToContext
726
- export const CopyToContextSchema = schema([
727
- field("format", utf8(), false),
728
- field("file_path", utf8(), false),
729
- ]);
730
-
731
813
  // Origin: GlobalInitResponse
732
814
  export const GlobalInitResponseSchema = schema([
733
815
  field("execution_id", binary(), false),
@@ -745,29 +827,6 @@ export const IndexCreateRequestSchema = schema([
745
827
  field("transaction_opaque_data", binary(), true),
746
828
  ]);
747
829
 
748
- // Origin: InitRequest
749
- export const InitRequestSchema = schema([
750
- field("bind_call", binary(), false),
751
- field("output_schema", binary(), false),
752
- field("bind_opaque_data", binary(), true),
753
- field("projection_ids", list(field("item", int64(), true)), true),
754
- field("pushdown_filters", largeBinary(), true),
755
- field("join_keys", list(field("item", largeBinary(), true)), true),
756
- field("split_tokens", list(field("item", largeBinary(), true)), true),
757
- field("row_limit", int64(), true),
758
- field("phase", dictionary(utf8(), int16()), true),
759
- field("finalize_state_id", binary(), true),
760
- field("execution_id", binary(), true),
761
- field("init_opaque_data", binary(), true),
762
- field("substream_id", binary(), true),
763
- field("order_by_column_name", utf8(), true),
764
- field("order_by_direction", dictionary(utf8(), int16()), true),
765
- field("order_by_null_order", dictionary(utf8(), int16()), true),
766
- field("order_by_limit", int64(), true),
767
- field("tablesample_percentage", float64(), true),
768
- field("tablesample_seed", int64(), true),
769
- ]);
770
-
771
830
  // Origin: MacroCreateRequest
772
831
  export const MacroCreateRequestSchema = schema([
773
832
  field("attach_opaque_data", binary(), false),
@@ -824,57 +883,6 @@ export const TableBufferingProcessRequestSchema = schema([
824
883
  field("schema_path", list(field("item", utf8(), true)), true),
825
884
  ]);
826
885
 
827
- // Origin: TableFunctionCardinalityRequest
828
- export const TableFunctionCardinalityRequestSchema = schema([
829
- field("bind_call", binary(), false),
830
- field("bind_opaque_data", binary(), true),
831
- ]);
832
-
833
- // Origin: TableFunctionDynamicToStringRequest
834
- export const TableFunctionDynamicToStringRequestSchema = schema([
835
- field("bind_call", binary(), false),
836
- field("bind_opaque_data", binary(), true),
837
- field("global_execution_id", binary(), false),
838
- ]);
839
-
840
- // Origin: TableFunctionPlanRequest
841
- export const TableFunctionPlanRequestSchema = schema([
842
- field("bind_call", binary(), false),
843
- field("bind_opaque_data", binary(), true),
844
- field("projection_ids", list(field("item", int64(), true)), true),
845
- field("pushdown_filters", largeBinary(), true),
846
- field("join_keys", list(field("item", largeBinary(), true)), true),
847
- field("row_limit", int64(), true),
848
- field("target_split_bytes", int64(), true),
849
- field("min_splits", int64(), true),
850
- field("max_splits_per_response", int64(), true),
851
- field("cursor", binary(), true),
852
- field("refined_filters", largeBinary(), true),
853
- field("filters_complete", bool(), false),
854
- field("start_position", binary(), true),
855
- field("end_position", binary(), true),
856
- field("order_by_column_name", utf8(), true),
857
- field("order_by_direction", dictionary(utf8(), int16()), true),
858
- field("order_by_null_order", dictionary(utf8(), int16()), true),
859
- field("order_by_limit", int64(), true),
860
- field("tablesample_percentage", float64(), true),
861
- field("tablesample_seed", int64(), true),
862
- ]);
863
-
864
- // Origin: TableFunctionProjectionRequest
865
- export const TableFunctionProjectionRequestSchema = schema([
866
- field("bind_call", binary(), false),
867
- field("bind_result", binary(), false),
868
- field("expressions", list(field("item", largeBinary(), true)), false),
869
- field("result_schema", binary(), false),
870
- ]);
871
-
872
- // Origin: TableFunctionStatisticsRequest
873
- export const TableFunctionStatisticsRequestSchema = schema([
874
- field("bind_call", binary(), false),
875
- field("bind_opaque_data", binary(), true),
876
- ]);
877
-
878
886
  // Origin: method 'aggregate_bind' result
879
887
  export const AggregateBindResultSchema = schema([
880
888
  field("output_schema", binary(), false),