@nosana/types 2.14.2 → 2.21.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 (55) hide show
  1. package/dist/Common/index.d.ts +29 -7
  2. package/dist/Common/index.d.ts.map +1 -1
  3. package/dist/Common/index.js +6 -0
  4. package/dist/Common/index.js.map +1 -1
  5. package/dist/Jobs/Flows/index.d.ts +9 -5
  6. package/dist/Jobs/Flows/index.d.ts.map +1 -1
  7. package/dist/Jobs/JobDefinition/args/expose.d.ts +17 -2
  8. package/dist/Jobs/JobDefinition/args/expose.d.ts.map +1 -1
  9. package/dist/Jobs/JobDefinition/args/expose.js.map +1 -1
  10. package/dist/Jobs/JobDefinition/args/index.d.ts +38 -0
  11. package/dist/Jobs/JobDefinition/args/index.d.ts.map +1 -1
  12. package/dist/Jobs/JobDefinition/args/index.js +660 -41
  13. package/dist/Jobs/JobDefinition/args/index.js.map +1 -1
  14. package/dist/Jobs/JobDefinition/args/output.d.ts +2 -0
  15. package/dist/Jobs/JobDefinition/args/output.d.ts.map +1 -0
  16. package/dist/Jobs/JobDefinition/args/output.js +2 -0
  17. package/dist/Jobs/JobDefinition/args/output.js.map +1 -0
  18. package/dist/Jobs/JobDefinition/args/required_vram.d.ts +2 -0
  19. package/dist/Jobs/JobDefinition/args/required_vram.d.ts.map +1 -0
  20. package/dist/Jobs/JobDefinition/args/required_vram.js +2 -0
  21. package/dist/Jobs/JobDefinition/args/required_vram.js.map +1 -0
  22. package/dist/Jobs/JobDefinition/args/trusted_execution_env.d.ts +6 -0
  23. package/dist/Jobs/JobDefinition/args/trusted_execution_env.d.ts.map +1 -0
  24. package/dist/Jobs/JobDefinition/args/trusted_execution_env.js +5 -0
  25. package/dist/Jobs/JobDefinition/args/trusted_execution_env.js.map +1 -0
  26. package/dist/Jobs/JobDefinition/index.d.ts +8 -4
  27. package/dist/Jobs/JobDefinition/index.d.ts.map +1 -1
  28. package/dist/Jobs/JobDefinition/logistics/index.d.ts +2 -2
  29. package/dist/Jobs/JobDefinition/logistics/index.d.ts.map +1 -1
  30. package/dist/Jobs/JobDefinition/logistics/index.js +10 -10
  31. package/dist/Jobs/JobDefinition/meta/index.d.ts +1 -1
  32. package/dist/Jobs/JobDefinition/meta/index.d.ts.map +1 -1
  33. package/dist/Jobs/JobDefinition/meta/index.js +2 -48
  34. package/dist/Jobs/JobDefinition/meta/index.js.map +1 -1
  35. package/dist/Jobs/JobDefinition/operations/index.d.ts +18 -3
  36. package/dist/Jobs/JobDefinition/operations/index.d.ts.map +1 -1
  37. package/dist/Jobs/JobDefinition/operations/index.js +759 -201
  38. package/dist/Jobs/JobDefinition/operations/index.js.map +1 -1
  39. package/dist/Jobs/JobDefinition/operations/rules.d.ts +1 -0
  40. package/dist/Jobs/JobDefinition/operations/rules.d.ts.map +1 -1
  41. package/dist/Jobs/JobDefinition/operations/rules.js +3 -0
  42. package/dist/Jobs/JobDefinition/operations/rules.js.map +1 -1
  43. package/dist/Jobs/index.d.ts +2 -2
  44. package/dist/Jobs/index.d.ts.map +1 -1
  45. package/dist/Jobs/index.js +450 -215
  46. package/dist/Jobs/index.js.map +1 -1
  47. package/dist/Schemas/job.js +198 -85
  48. package/dist/Schemas/job.js.map +1 -1
  49. package/dist/Schemas/node.d.ts +81 -24
  50. package/dist/Schemas/node.d.ts.map +1 -1
  51. package/dist/Schemas/nodeOpenApi.d.ts.map +1 -1
  52. package/dist/Schemas/nodeOpenApi.js +234 -79
  53. package/dist/Schemas/nodeOpenApi.js.map +1 -1
  54. package/openapi/node.openapi.json +289 -97
  55. package/package.json +2 -2
@@ -1482,10 +1482,11 @@
1482
1482
  "type": "object",
1483
1483
  "properties": {
1484
1484
  "version": {
1485
- "const": "0.1"
1485
+ "type": "string"
1486
1486
  },
1487
1487
  "type": {
1488
- "const": "container"
1488
+ "type": "string",
1489
+ "deprecated": true
1489
1490
  },
1490
1491
  "logistics": {
1491
1492
  "$ref": "#/components/schemas/Logistics"
@@ -1508,7 +1509,6 @@
1508
1509
  },
1509
1510
  "required": [
1510
1511
  "version",
1511
- "type",
1512
1512
  "ops"
1513
1513
  ]
1514
1514
  },
@@ -1522,10 +1522,7 @@
1522
1522
  "$ref": "#/components/schemas/Logistic"
1523
1523
  }
1524
1524
  },
1525
- "required": [
1526
- "send",
1527
- "receive"
1528
- ]
1525
+ "required": []
1529
1526
  },
1530
1527
  "Logistic": {
1531
1528
  "type": "object",
@@ -1586,32 +1583,7 @@
1586
1583
  }
1587
1584
  },
1588
1585
  "required": [],
1589
- "additionalProperties": {
1590
- "oneOf": [
1591
- {
1592
- "type": "string"
1593
- },
1594
- {
1595
- "type": "number"
1596
- },
1597
- {
1598
- "type": "array",
1599
- "items": {
1600
- "oneOf": [
1601
- {
1602
- "type": "string"
1603
- },
1604
- {
1605
- "type": "number"
1606
- }
1607
- ]
1608
- }
1609
- },
1610
- {
1611
- "$ref": "#/components/schemas/Recordstringstringnumber_stringnumber_"
1612
- }
1613
- ]
1614
- }
1586
+ "additionalProperties": {}
1615
1587
  },
1616
1588
  "Recordstringstringnumber": {
1617
1589
  "type": "object",
@@ -1629,35 +1601,6 @@
1629
1601
  ]
1630
1602
  }
1631
1603
  },
1632
- "Recordstringstringnumber_stringnumber_": {
1633
- "type": "object",
1634
- "properties": {},
1635
- "required": [],
1636
- "description": "Construct a type with a set of properties K of type T",
1637
- "additionalProperties": {
1638
- "oneOf": [
1639
- {
1640
- "type": "string"
1641
- },
1642
- {
1643
- "type": "number"
1644
- },
1645
- {
1646
- "type": "array",
1647
- "items": {
1648
- "oneOf": [
1649
- {
1650
- "type": "string"
1651
- },
1652
- {
1653
- "type": "number"
1654
- }
1655
- ]
1656
- }
1657
- }
1658
- ]
1659
- }
1660
- },
1661
1604
  "Global": {
1662
1605
  "type": "object",
1663
1606
  "properties": {
@@ -1727,6 +1670,12 @@
1727
1670
  },
1728
1671
  {
1729
1672
  "const": "container/create-volume"
1673
+ },
1674
+ {
1675
+ "const": "vm/run"
1676
+ },
1677
+ {
1678
+ "const": "cvm/run"
1730
1679
  }
1731
1680
  ]
1732
1681
  },
@@ -1738,6 +1687,9 @@
1738
1687
  {
1739
1688
  "$ref": "#/components/schemas/ContainerRun"
1740
1689
  },
1690
+ {
1691
+ "$ref": "#/components/schemas/VmRunArgs"
1692
+ },
1741
1693
  {
1742
1694
  "$ref": "#/components/schemas/ContainerCreateVolume"
1743
1695
  }
@@ -1796,9 +1748,6 @@
1796
1748
  {
1797
1749
  "type": "number"
1798
1750
  },
1799
- {
1800
- "$ref": "#/components/schemas/ExposedPort"
1801
- },
1802
1751
  {
1803
1752
  "$ref": "#/components/schemas/LiteralString"
1804
1753
  },
@@ -1816,6 +1765,12 @@
1816
1765
  "__spread__"
1817
1766
  ]
1818
1767
  },
1768
+ {
1769
+ "$ref": "#/components/schemas/PortRangeString"
1770
+ },
1771
+ {
1772
+ "$ref": "#/components/schemas/ExposedPort"
1773
+ },
1819
1774
  {
1820
1775
  "$ref": "#/components/schemas/UniqueExposedPorts"
1821
1776
  }
@@ -1827,6 +1782,9 @@
1827
1782
  "work_dir": {
1828
1783
  "type": "string"
1829
1784
  },
1785
+ "output": {
1786
+ "type": "string"
1787
+ },
1830
1788
  "entrypoint": {
1831
1789
  "oneOf": [
1832
1790
  {
@@ -1842,6 +1800,9 @@
1842
1800
  },
1843
1801
  "restart_policy": {
1844
1802
  "oneOf": [
1803
+ {
1804
+ "const": "on-failure"
1805
+ },
1845
1806
  {
1846
1807
  "const": "no"
1847
1808
  },
@@ -1851,9 +1812,6 @@
1851
1812
  {
1852
1813
  "const": "unless-stopped"
1853
1814
  },
1854
- {
1855
- "const": "on-failure"
1856
- },
1857
1815
  {
1858
1816
  "type": "object",
1859
1817
  "properties": {
@@ -1870,6 +1828,9 @@
1870
1828
  }
1871
1829
  ]
1872
1830
  },
1831
+ "required_vram": {
1832
+ "type": "number"
1833
+ },
1873
1834
  "private": {
1874
1835
  "type": "boolean"
1875
1836
  },
@@ -1878,6 +1839,16 @@
1878
1839
  },
1879
1840
  "authentication": {
1880
1841
  "$ref": "#/components/schemas/Authentication"
1842
+ },
1843
+ "trusted_execution_env": {
1844
+ "oneOf": [
1845
+ {
1846
+ "const": "SEV-SNP"
1847
+ },
1848
+ {
1849
+ "const": "SEV-GUEST"
1850
+ }
1851
+ ]
1881
1852
  }
1882
1853
  },
1883
1854
  "required": [
@@ -1905,11 +1876,24 @@
1905
1876
  "dest"
1906
1877
  ]
1907
1878
  },
1879
+ "LiteralString": {
1880
+ "type": "string"
1881
+ },
1882
+ "PortRangeString": {
1883
+ "type": "string"
1884
+ },
1908
1885
  "ExposedPort": {
1909
1886
  "type": "object",
1910
1887
  "properties": {
1911
1888
  "port": {
1912
- "type": "number"
1889
+ "oneOf": [
1890
+ {
1891
+ "type": "number"
1892
+ },
1893
+ {
1894
+ "$ref": "#/components/schemas/PortRangeString"
1895
+ }
1896
+ ]
1913
1897
  },
1914
1898
  "type": {
1915
1899
  "oneOf": [
@@ -1920,10 +1904,10 @@
1920
1904
  "const": "web"
1921
1905
  },
1922
1906
  {
1923
- "const": "webapi"
1907
+ "const": "websocket"
1924
1908
  },
1925
1909
  {
1926
- "const": "websocket"
1910
+ "const": "webapi"
1927
1911
  },
1928
1912
  {
1929
1913
  "const": "none"
@@ -2023,9 +2007,6 @@
2023
2007
  "continuous"
2024
2008
  ]
2025
2009
  },
2026
- "LiteralString": {
2027
- "type": "string"
2028
- },
2029
2010
  "UniqueExposedPorts": {
2030
2011
  "type": "array",
2031
2012
  "items": {
@@ -2037,9 +2018,6 @@
2037
2018
  {
2038
2019
  "type": "number"
2039
2020
  },
2040
- {
2041
- "$ref": "#/components/schemas/ExposedPort"
2042
- },
2043
2021
  {
2044
2022
  "$ref": "#/components/schemas/LiteralString"
2045
2023
  },
@@ -2056,6 +2034,12 @@
2056
2034
  "required": [
2057
2035
  "__spread__"
2058
2036
  ]
2037
+ },
2038
+ {
2039
+ "$ref": "#/components/schemas/PortRangeString"
2040
+ },
2041
+ {
2042
+ "$ref": "#/components/schemas/ExposedPort"
2059
2043
  }
2060
2044
  ]
2061
2045
  },
@@ -2296,6 +2280,136 @@
2296
2280
  },
2297
2281
  "required": []
2298
2282
  },
2283
+ "VmRunArgs": {
2284
+ "type": "object",
2285
+ "properties": {
2286
+ "image": {
2287
+ "type": "string",
2288
+ "description": "Disk image to fetch and boot (OCI artifact, URL, or IPFS CID). Required."
2289
+ },
2290
+ "cpu": {
2291
+ "type": "number",
2292
+ "description": "vCPU count."
2293
+ },
2294
+ "memory": {
2295
+ "oneOf": [
2296
+ {
2297
+ "type": "string"
2298
+ },
2299
+ {
2300
+ "type": "number"
2301
+ }
2302
+ ],
2303
+ "description": "Memory — MiB as a number, or a human string like \"4G\"."
2304
+ },
2305
+ "disk": {
2306
+ "oneOf": [
2307
+ {
2308
+ "type": "string"
2309
+ },
2310
+ {
2311
+ "type": "number"
2312
+ }
2313
+ ],
2314
+ "description": "Root disk size — MiB as a number, or a human string like \"20G\"."
2315
+ },
2316
+ "gpu": {
2317
+ "type": "boolean",
2318
+ "description": "Pass a GPU through to the guest (VFIO)."
2319
+ },
2320
+ "cmd": {
2321
+ "oneOf": [
2322
+ {
2323
+ "type": "string"
2324
+ },
2325
+ {
2326
+ "type": "array",
2327
+ "items": {
2328
+ "type": "string"
2329
+ }
2330
+ }
2331
+ ],
2332
+ "description": "Command to run on boot (delivered via cloud-init / the guest agent)."
2333
+ },
2334
+ "env": {
2335
+ "$ref": "#/components/schemas/Env",
2336
+ "description": "Environment variables injected into the guest."
2337
+ },
2338
+ "expose": {
2339
+ "oneOf": [
2340
+ {
2341
+ "type": "number"
2342
+ },
2343
+ {
2344
+ "$ref": "#/components/schemas/LiteralString"
2345
+ },
2346
+ {
2347
+ "type": "object",
2348
+ "properties": {
2349
+ "__spread__": {
2350
+ "$ref": "#/components/schemas/LiteralString"
2351
+ },
2352
+ "chunked": {
2353
+ "type": "boolean"
2354
+ }
2355
+ },
2356
+ "required": [
2357
+ "__spread__"
2358
+ ]
2359
+ },
2360
+ {
2361
+ "$ref": "#/components/schemas/PortRangeString"
2362
+ },
2363
+ {
2364
+ "$ref": "#/components/schemas/ExposedPort"
2365
+ },
2366
+ {
2367
+ "$ref": "#/components/schemas/UniqueExposedPorts"
2368
+ }
2369
+ ],
2370
+ "description": "Ports to expose — same grammar as `container/run`."
2371
+ },
2372
+ "private": {
2373
+ "type": "boolean",
2374
+ "description": "Publish exposed URLs privately (auth-gated) rather than publicly."
2375
+ },
2376
+ "restart_policy": {
2377
+ "oneOf": [
2378
+ {
2379
+ "const": "on-failure"
2380
+ },
2381
+ {
2382
+ "const": "no"
2383
+ },
2384
+ {
2385
+ "const": "always"
2386
+ },
2387
+ {
2388
+ "const": "unless-stopped"
2389
+ },
2390
+ {
2391
+ "type": "object",
2392
+ "properties": {
2393
+ "policy": {
2394
+ "const": "on-failure"
2395
+ },
2396
+ "restart_tries": {
2397
+ "type": "number"
2398
+ }
2399
+ },
2400
+ "required": [
2401
+ "policy"
2402
+ ]
2403
+ }
2404
+ ],
2405
+ "description": "Restart policy — same grammar as `container/run`."
2406
+ }
2407
+ },
2408
+ "required": [
2409
+ "image"
2410
+ ],
2411
+ "description": "Arguments for a `vm/run` / `cvm/run` hypervisor operation — a declarative\nfaçade over the VM orchestrator that mirrors `container/run` (the QEMU knobs\nare hidden). `cvm/run` is the confidential (SEV-SNP) variant and shares this\nexact arg shape: the operation *key* selects confidentiality, not an argument."
2412
+ },
2299
2413
  "ContainerCreateVolume": {
2300
2414
  "type": "object",
2301
2415
  "properties": {
@@ -2517,23 +2631,16 @@
2517
2631
  ]
2518
2632
  }
2519
2633
  },
2520
- "error": {
2521
- "type": "object",
2522
- "properties": {
2523
- "event": {
2524
- "type": "string"
2525
- },
2526
- "message": {
2527
- "type": "string"
2528
- },
2529
- "code": {
2530
- "type": "number"
2531
- }
2634
+ "errors": {
2635
+ "type": "array",
2636
+ "items": {
2637
+ "$ref": "#/components/schemas/OpStateError"
2532
2638
  },
2533
- "required": [
2534
- "event",
2535
- "message"
2536
- ]
2639
+ "description": "Every error the operation hit, in order."
2640
+ },
2641
+ "error": {
2642
+ "$ref": "#/components/schemas/OpStateError",
2643
+ "description": "Single-error form; the node records each error in `errors`."
2537
2644
  },
2538
2645
  "diagnostics": {
2539
2646
  "type": "object",
@@ -2559,6 +2666,7 @@
2559
2666
  "endTime",
2560
2667
  "exitCode",
2561
2668
  "logs",
2669
+ "errors",
2562
2670
  "diagnostics"
2563
2671
  ]
2564
2672
  },
@@ -2580,6 +2688,24 @@
2580
2688
  "timestamp"
2581
2689
  ]
2582
2690
  },
2691
+ "OpStateError": {
2692
+ "type": "object",
2693
+ "properties": {
2694
+ "event": {
2695
+ "type": "string"
2696
+ },
2697
+ "message": {
2698
+ "type": "string"
2699
+ },
2700
+ "code": {
2701
+ "type": "number"
2702
+ }
2703
+ },
2704
+ "required": [
2705
+ "event",
2706
+ "message"
2707
+ ]
2708
+ },
2583
2709
  "DiagnosticsReason": {
2584
2710
  "type": "object",
2585
2711
  "properties": {
@@ -2712,10 +2838,10 @@
2712
2838
  "urlmode": {
2713
2839
  "oneOf": [
2714
2840
  {
2715
- "const": "public"
2841
+ "const": "private"
2716
2842
  },
2717
2843
  {
2718
- "const": "private"
2844
+ "const": "public"
2719
2845
  }
2720
2846
  ]
2721
2847
  }
@@ -2724,10 +2850,10 @@
2724
2850
  "additionalProperties": {
2725
2851
  "oneOf": [
2726
2852
  {
2727
- "const": "public"
2853
+ "const": "private"
2728
2854
  },
2729
2855
  {
2730
- "const": "private"
2856
+ "const": "public"
2731
2857
  },
2732
2858
  {
2733
2859
  "$ref": "#/components/schemas/JobExposeSecrets"
@@ -2981,6 +3107,12 @@
2981
3107
  }
2982
3108
  }
2983
3109
  },
3110
+ "errors": {
3111
+ "type": "array",
3112
+ "items": {
3113
+ "$ref": "#/components/schemas/OpStateError"
3114
+ }
3115
+ },
2984
3116
  "diagnostics": {
2985
3117
  "type": "object",
2986
3118
  "required": [
@@ -3189,6 +3321,66 @@
3189
3321
  "type": "number"
3190
3322
  }
3191
3323
  }
3324
+ },
3325
+ "gpu": {
3326
+ "$ref": "#/components/schemas/TaskGpuStat",
3327
+ "description": "The container's share of the node's GPUs, attributed by the processes it owns. Only on GPU operations, absent when the reading is unavailable, and only from the job's runtime sidecar: the node's own stats never carry it."
3328
+ }
3329
+ }
3330
+ },
3331
+ "TaskGpuStat": {
3332
+ "type": "object",
3333
+ "description": "GPU load and VRAM in total and per device. Memory is in MiB (usage) and GiB (limit), like `memory`.",
3334
+ "required": [
3335
+ "gpu_percent",
3336
+ "memory_usage",
3337
+ "memory_limit",
3338
+ "memory_percent",
3339
+ "devices"
3340
+ ],
3341
+ "properties": {
3342
+ "gpu_percent": {
3343
+ "type": "number"
3344
+ },
3345
+ "memory_usage": {
3346
+ "type": "number"
3347
+ },
3348
+ "memory_limit": {
3349
+ "type": "number"
3350
+ },
3351
+ "memory_percent": {
3352
+ "type": "number"
3353
+ },
3354
+ "devices": {
3355
+ "type": "array",
3356
+ "items": {
3357
+ "type": "object",
3358
+ "required": [
3359
+ "index",
3360
+ "gpu_percent",
3361
+ "memory_usage",
3362
+ "memory_limit",
3363
+ "memory_percent"
3364
+ ],
3365
+ "properties": {
3366
+ "index": {
3367
+ "type": "integer",
3368
+ "description": "The device's index on the node."
3369
+ },
3370
+ "gpu_percent": {
3371
+ "type": "number"
3372
+ },
3373
+ "memory_usage": {
3374
+ "type": "number"
3375
+ },
3376
+ "memory_limit": {
3377
+ "type": "number"
3378
+ },
3379
+ "memory_percent": {
3380
+ "type": "number"
3381
+ }
3382
+ }
3383
+ }
3192
3384
  }
3193
3385
  }
3194
3386
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/types",
3
- "version": "2.14.2",
3
+ "version": "2.21.0",
4
4
  "author": "Nosana",
5
5
  "description": "Nosana Types Module",
6
6
  "type": "module",
@@ -56,5 +56,5 @@
56
56
  "engines": {
57
57
  "node": ">=20.18.0"
58
58
  },
59
- "gitHead": "8ffd23d23dd4d554ef229b6ba74dba47240e266a"
59
+ "gitHead": "0c1e54f03008209d713f3f52392541ff2c952270"
60
60
  }