@sqlanvil/core 1.19.0 → 1.20.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.
package/configs.proto CHANGED
@@ -888,6 +888,57 @@ message ActionConfig {
888
888
  }
889
889
  }
890
890
 
891
+ // Configuration for a script action: an execution-time user script (Python in v1) that stages
892
+ // files / runs glue steps as a first-class DAG node. Language-neutral by design — `language`
893
+ // selects the per-language resolver in the CLI; the friendly `python:` actions.yaml key is
894
+ // sugar that normalizes to `script: { language: "python", ... }`. Scripts never receive
895
+ // warehouse credentials; they produce files, and `type: "import"` is the loading boundary.
896
+ message ScriptConfig {
897
+ // The name of the script action (how downstream actions depend on it).
898
+ string name = 1;
899
+
900
+ // The dataset (schema) used to qualify the script's target name.
901
+ string dataset = 2;
902
+
903
+ // The project (database) used to qualify the script's target name.
904
+ string project = 3;
905
+
906
+ // Targets of actions that this action is dependent on.
907
+ repeated Target dependency_targets = 4;
908
+
909
+ // Path to the script file to execute, relative to the project root.
910
+ string filename = 5;
911
+
912
+ // A list of user-defined tags with which the action should be labeled.
913
+ repeated string tags = 6;
914
+
915
+ // If set to true, this action will not be executed.
916
+ bool disabled = 7;
917
+
918
+ // Description of the script action.
919
+ string description = 8;
920
+
921
+ // Script language ("python" in v1). Set automatically by the `python:` sugar.
922
+ string language = 9;
923
+
924
+ // Arguments passed verbatim to the script.
925
+ repeated string args = 10;
926
+
927
+ // Declared dependency manifest, relative to the project root (requirements.txt for
928
+ // python). sqlanvil validates the environment against it but never installs anything.
929
+ string deps_file = 11;
930
+
931
+ // Runtime version specifier (a PEP 440 specifier for python, e.g. ">=3.11").
932
+ string runtime_version = 12;
933
+
934
+ // Environment root directory, relative to the project root (a venv for python) — its
935
+ // interpreter runs the script. When unset, the interpreter is resolved from PATH.
936
+ string env_root = 13;
937
+
938
+ // Per-action timeout in milliseconds. 0 means the default (30 minutes).
939
+ int32 timeout_millis = 14;
940
+ }
941
+
891
942
  oneof action {
892
943
  TableConfig table = 1;
893
944
  ViewConfig view = 2;
@@ -903,6 +954,7 @@ message ActionConfig {
903
954
  VectorIndexConfig vector_index = 12;
904
955
  ExportConfig export = 13;
905
956
  ImportConfig import = 14;
957
+ ScriptConfig script = 15;
906
958
  }
907
959
 
908
960
  message RlsPolicyConfig {
package/core.proto CHANGED
@@ -341,6 +341,40 @@ message Extract {
341
341
  string database = 16;
342
342
  }
343
343
 
344
+ // An execution-time script action (user code — Python in v1): file-staging and glue steps as
345
+ // first-class DAG nodes, ordered by dependencies and covered by run history. The script runs
346
+ // runner-side (a spawned interpreter with cwd = project dir), never on the warehouse, and no
347
+ // warehouse credentials are ever injected — scripts produce files; `type: "import"` loads them.
348
+ // Language-neutral by design: `language` selects the per-language resolver in the CLI, so a new
349
+ // language is a resolver + config sugar, not a proto migration.
350
+ message Script {
351
+ Target target = 1;
352
+ Target canonical_target = 2;
353
+ repeated Target dependency_targets = 3;
354
+ ActionHermeticity hermeticity = 4;
355
+ bool disabled = 5;
356
+ repeated string tags = 6;
357
+ ActionDescriptor action_descriptor = 7;
358
+ // Script language ("python" in v1).
359
+ string language = 8;
360
+ // Script path relative to the project root.
361
+ string script_filename = 9;
362
+ // Arguments passed verbatim to the script.
363
+ repeated string args = 10;
364
+ // Declared dependency manifest relative to the project root (requirements.txt for python).
365
+ // Validated by `sqlanvil validate`, never installed.
366
+ string deps_file = 11;
367
+ // Runtime version specifier (PEP 440 for python).
368
+ string runtime_version = 12;
369
+ // Environment root relative to the project root (a venv for python) whose interpreter runs
370
+ // the script. Empty = resolve the interpreter from PATH.
371
+ string env_root = 13;
372
+ // Per-action timeout in milliseconds. 0 = the default (30 minutes).
373
+ int32 timeout_millis = 14;
374
+ // Source config file path (actions.yaml) (generated).
375
+ string file_name = 15;
376
+ }
377
+
344
378
  message Assertion {
345
379
  Target target = 8;
346
380
  Target canonical_target = 13;
@@ -512,6 +546,7 @@ message CompiledGraph {
512
546
  repeated Export exports = 14;
513
547
  repeated Import imports = 16;
514
548
  repeated Extract extracts = 17;
549
+ repeated Script scripts = 18;
515
550
 
516
551
  GraphErrors graph_errors = 7;
517
552
 
package/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "version": "1.19.0",
37
+ "version": "1.20.1",
38
38
  "name": "@sqlanvil/core",
39
39
  "description": "sqlanvil core API.",
40
40
  "main": "bundle.js"