@nosana/types 0.1.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 (101) hide show
  1. package/README.md +45 -0
  2. package/dist/Accounts/index.d.ts +3 -0
  3. package/dist/Accounts/index.js +4 -0
  4. package/dist/Accounts/index.js.map +1 -0
  5. package/dist/Accounts/job.d.ts +17 -0
  6. package/dist/Accounts/job.js +2 -0
  7. package/dist/Accounts/job.js.map +1 -0
  8. package/dist/Accounts/market.d.ts +24 -0
  9. package/dist/Accounts/market.js +6 -0
  10. package/dist/Accounts/market.js.map +1 -0
  11. package/dist/Accounts/run.d.ts +14 -0
  12. package/dist/Accounts/run.js +2 -0
  13. package/dist/Accounts/run.js.map +1 -0
  14. package/dist/Deployments/index.d.ts +15 -0
  15. package/dist/Deployments/index.js +17 -0
  16. package/dist/Deployments/index.js.map +1 -0
  17. package/dist/Jobs/Flows/index.d.ts +43 -0
  18. package/dist/Jobs/Flows/index.js +2 -0
  19. package/dist/Jobs/Flows/index.js.map +1 -0
  20. package/dist/Jobs/JobDefinition/args/aliases.d.ts +2 -0
  21. package/dist/Jobs/JobDefinition/args/aliases.js +2 -0
  22. package/dist/Jobs/JobDefinition/args/aliases.js.map +1 -0
  23. package/dist/Jobs/JobDefinition/args/authentication.d.ts +9 -0
  24. package/dist/Jobs/JobDefinition/args/authentication.js +2 -0
  25. package/dist/Jobs/JobDefinition/args/authentication.js.map +1 -0
  26. package/dist/Jobs/JobDefinition/args/cmd.d.ts +3 -0
  27. package/dist/Jobs/JobDefinition/args/cmd.js +2 -0
  28. package/dist/Jobs/JobDefinition/args/cmd.js.map +1 -0
  29. package/dist/Jobs/JobDefinition/args/env.d.ts +1 -0
  30. package/dist/Jobs/JobDefinition/args/env.js +2 -0
  31. package/dist/Jobs/JobDefinition/args/env.js.map +1 -0
  32. package/dist/Jobs/JobDefinition/args/expose.d.ts +44 -0
  33. package/dist/Jobs/JobDefinition/args/expose.js +2 -0
  34. package/dist/Jobs/JobDefinition/args/expose.js.map +1 -0
  35. package/dist/Jobs/JobDefinition/args/gpu.d.ts +1 -0
  36. package/dist/Jobs/JobDefinition/args/gpu.js +2 -0
  37. package/dist/Jobs/JobDefinition/args/gpu.js.map +1 -0
  38. package/dist/Jobs/JobDefinition/args/image.d.ts +1 -0
  39. package/dist/Jobs/JobDefinition/args/image.js +2 -0
  40. package/dist/Jobs/JobDefinition/args/image.js.map +1 -0
  41. package/dist/Jobs/JobDefinition/args/index.d.ts +38 -0
  42. package/dist/Jobs/JobDefinition/args/index.js +13 -0
  43. package/dist/Jobs/JobDefinition/args/index.js.map +1 -0
  44. package/dist/Jobs/JobDefinition/args/literals.d.ts +28 -0
  45. package/dist/Jobs/JobDefinition/args/literals.js +2 -0
  46. package/dist/Jobs/JobDefinition/args/literals.js.map +1 -0
  47. package/dist/Jobs/JobDefinition/args/resources.d.ts +70 -0
  48. package/dist/Jobs/JobDefinition/args/resources.js +6 -0
  49. package/dist/Jobs/JobDefinition/args/resources.js.map +1 -0
  50. package/dist/Jobs/JobDefinition/args/variables.d.ts +1 -0
  51. package/dist/Jobs/JobDefinition/args/variables.js +2 -0
  52. package/dist/Jobs/JobDefinition/args/variables.js.map +1 -0
  53. package/dist/Jobs/JobDefinition/args/volumes.d.ts +4 -0
  54. package/dist/Jobs/JobDefinition/args/volumes.js +2 -0
  55. package/dist/Jobs/JobDefinition/args/volumes.js.map +1 -0
  56. package/dist/Jobs/JobDefinition/args/work_dir.d.ts +1 -0
  57. package/dist/Jobs/JobDefinition/args/work_dir.js +2 -0
  58. package/dist/Jobs/JobDefinition/args/work_dir.js.map +1 -0
  59. package/dist/Jobs/JobDefinition/execution/index.d.ts +11 -0
  60. package/dist/Jobs/JobDefinition/execution/index.js +2 -0
  61. package/dist/Jobs/JobDefinition/execution/index.js.map +1 -0
  62. package/dist/Jobs/JobDefinition/global/index.d.ts +9 -0
  63. package/dist/Jobs/JobDefinition/global/index.js +2 -0
  64. package/dist/Jobs/JobDefinition/global/index.js.map +1 -0
  65. package/dist/Jobs/JobDefinition/index.d.ts +23 -0
  66. package/dist/Jobs/JobDefinition/index.js +8 -0
  67. package/dist/Jobs/JobDefinition/index.js.map +1 -0
  68. package/dist/Jobs/JobDefinition/logistics/index.d.ts +17 -0
  69. package/dist/Jobs/JobDefinition/logistics/index.js +9 -0
  70. package/dist/Jobs/JobDefinition/logistics/index.js.map +1 -0
  71. package/dist/Jobs/JobDefinition/meta/index.d.ts +4 -0
  72. package/dist/Jobs/JobDefinition/meta/index.js +2 -0
  73. package/dist/Jobs/JobDefinition/meta/index.js.map +1 -0
  74. package/dist/Jobs/JobDefinition/operations/index.d.ts +16 -0
  75. package/dist/Jobs/JobDefinition/operations/index.js +2 -0
  76. package/dist/Jobs/JobDefinition/operations/index.js.map +1 -0
  77. package/dist/Jobs/JobDefinition/results/index.d.ts +6 -0
  78. package/dist/Jobs/JobDefinition/results/index.js +2 -0
  79. package/dist/Jobs/JobDefinition/results/index.js.map +1 -0
  80. package/dist/Jobs/Logs/index.d.ts +32 -0
  81. package/dist/Jobs/Logs/index.js +7 -0
  82. package/dist/Jobs/Logs/index.js.map +1 -0
  83. package/dist/Jobs/index.d.ts +26 -0
  84. package/dist/Jobs/index.js +1361 -0
  85. package/dist/Jobs/index.js.map +1 -0
  86. package/dist/Schemas/api.d.ts +3551 -0
  87. package/dist/Schemas/api.js +2 -0
  88. package/dist/Schemas/api.js.map +1 -0
  89. package/dist/Schemas/index.d.ts +2 -0
  90. package/dist/Schemas/index.js +3 -0
  91. package/dist/Schemas/index.js.map +1 -0
  92. package/dist/Schemas/job.d.ts +3 -0
  93. package/dist/Schemas/job.js +889 -0
  94. package/dist/Schemas/job.js.map +1 -0
  95. package/dist/index.d.ts +8 -0
  96. package/dist/index.js +5 -0
  97. package/dist/index.js.map +1 -0
  98. package/dist/utils.d.ts +7 -0
  99. package/dist/utils.js +2 -0
  100. package/dist/utils.js.map +1 -0
  101. package/package.json +46 -0
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # @nosana/types
2
+
3
+ Shared TypeScript types for Nosana SDKs.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @nosana/types
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Import types directly:
14
+
15
+ ```typescript
16
+ import { Job, Market, JobDefinition } from '@nosana/types';
17
+ ```
18
+
19
+ ## Solana Integration
20
+
21
+ Configure Solana types in your `types.ts` or `index.d.ts` file.
22
+
23
+ ### Using @solana/kit
24
+
25
+ ```typescript
26
+ import type { Address as SolanaAddress } from '@solana/kit';
27
+
28
+ declare module '@nosana/types' {
29
+ interface PublicKey {
30
+ _type: SolanaAddress<string>;
31
+ }
32
+ }
33
+ ```
34
+
35
+ ### Using @solana/web3.js
36
+
37
+ ```typescript
38
+ import type { PublicKey as SolanaPublicKey } from '@solana/web3.js';
39
+
40
+ declare module '@nosana/types' {
41
+ interface PublicKey {
42
+ _type: SolanaPublicKey;
43
+ }
44
+ }
45
+ ```
@@ -0,0 +1,3 @@
1
+ export * from "./job.js";
2
+ export * from "./market.js";
3
+ export * from "./run.js";
@@ -0,0 +1,4 @@
1
+ export * from "./job.js";
2
+ export * from "./market.js";
3
+ export * from "./run.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Accounts/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { PublicKey, Address } from "../index.js";
2
+ import type { GetPublicKeyOrAddress } from "../utils.js";
3
+ type PublicKeyOrAddress = GetPublicKeyOrAddress<PublicKey, Address>;
4
+ export type Job = {
5
+ ipfsJob: string;
6
+ ipfsResult: string;
7
+ market: PublicKeyOrAddress;
8
+ node: string;
9
+ payer: PublicKeyOrAddress;
10
+ price: number;
11
+ project: PublicKeyOrAddress;
12
+ state: string | number;
13
+ timeEnd: number;
14
+ timeStart: number;
15
+ timeout: number;
16
+ };
17
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=job.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"job.js","sourceRoot":"","sources":["../../src/Accounts/job.ts"],"names":[],"mappings":""}
@@ -0,0 +1,24 @@
1
+ import type { PublicKey, Address } from "../index.js";
2
+ import type { GetPublicKeyOrAddress, EnumValues } from "../utils.js";
3
+ type PublicKeyOrAddress = GetPublicKeyOrAddress<PublicKey, Address>;
4
+ export declare const MarketQueue: {
5
+ readonly JOB_QUEUE: 0;
6
+ readonly NODE_QUEUE: 1;
7
+ readonly EMPTY: undefined;
8
+ };
9
+ export type MarketQueue = EnumValues<typeof MarketQueue>;
10
+ export type Market = {
11
+ address: PublicKeyOrAddress;
12
+ authority: PublicKeyOrAddress;
13
+ jobExpiration: number;
14
+ jobPrice: number;
15
+ jobTimeout: number;
16
+ jobType: number;
17
+ vault: PublicKeyOrAddress;
18
+ vaultBump: number;
19
+ nodeAccessKey: PublicKeyOrAddress;
20
+ nodeXnosMinimum: number;
21
+ queueType: MarketQueue;
22
+ queue: Array<PublicKeyOrAddress>;
23
+ };
24
+ export {};
@@ -0,0 +1,6 @@
1
+ export const MarketQueue = {
2
+ "JOB_QUEUE": 0,
3
+ "NODE_QUEUE": 1,
4
+ "EMPTY": undefined
5
+ };
6
+ //# sourceMappingURL=market.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"market.js","sourceRoot":"","sources":["../../src/Accounts/market.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;IACf,OAAO,EAAE,SAAS;CACV,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { PublicKey, Address } from "../index.js";
2
+ import type { GetPublicKeyOrAddress } from "../utils.js";
3
+ type PublicKeyOrAddress = GetPublicKeyOrAddress<PublicKey, Address>;
4
+ export type Run = {
5
+ account: {
6
+ job: PublicKeyOrAddress;
7
+ node: PublicKeyOrAddress;
8
+ payer: PublicKeyOrAddress;
9
+ state: number;
10
+ time: number;
11
+ };
12
+ publicKey: PublicKeyOrAddress;
13
+ };
14
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/Accounts/run.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import type { components } from "../Schemas";
2
+ export type DeploymentId = string;
3
+ export type Deployment = components["schemas"]["Deployment"];
4
+ export type Revision = components["schemas"]["Revision"];
5
+ export type Task = components["schemas"]["Task"];
6
+ export type Events = components["schemas"]["Events"];
7
+ export type Vault = components["schemas"]["Vault"];
8
+ export declare const DeploymentStatus: {
9
+ [key in components['schemas']['DeploymentStatus']]: components['schemas']['DeploymentStatus'];
10
+ };
11
+ export declare const DeploymentStrategy: {
12
+ [key in components['schemas']['DeploymentStrategy']]: components['schemas']['DeploymentStrategy'];
13
+ };
14
+ export type DeploymentStatus = components['schemas']['DeploymentStatus'];
15
+ export type DeploymentStrategy = components['schemas']['DeploymentStrategy'];
@@ -0,0 +1,17 @@
1
+ export const DeploymentStatus = {
2
+ DRAFT: 'DRAFT',
3
+ ERROR: 'ERROR',
4
+ STARTING: 'STARTING',
5
+ RUNNING: 'RUNNING',
6
+ STOPPING: 'STOPPING',
7
+ STOPPED: 'STOPPED',
8
+ INSUFFICIENT_FUNDS: 'INSUFFICIENT_FUNDS',
9
+ ARCHIVED: 'ARCHIVED',
10
+ };
11
+ export const DeploymentStrategy = {
12
+ SIMPLE: 'SIMPLE',
13
+ 'SIMPLE-EXTEND': 'SIMPLE-EXTEND',
14
+ SCHEDULED: 'SCHEDULED',
15
+ INFINITE: 'INFINITE',
16
+ };
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Deployments/index.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,gBAAgB,GAEzB;IACF,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,kBAAkB,EAAE,oBAAoB;IACxC,QAAQ,EAAE,UAAU;CACZ,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAE3B;IACF,MAAM,EAAE,QAAQ;IAChB,eAAe,EAAE,eAAe;IAChC,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;CACZ,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { JobDefinition } from "../JobDefinition/index.js";
2
+ import { Log } from "../Logs/index.js";
3
+ export type FlowState = {
4
+ status: string;
5
+ startTime: number;
6
+ endTime: number | null;
7
+ errors?: Array<unknown>;
8
+ opStates: Array<OpState>;
9
+ secrets?: FlowSecrets;
10
+ };
11
+ export type Flow = {
12
+ id: string;
13
+ jobDefinition: JobDefinition;
14
+ project: string;
15
+ state: FlowState;
16
+ };
17
+ export interface JobExposeSecrets {
18
+ [exposeId: string]: EndpointSecret;
19
+ }
20
+ export type EndpointStatus = 'ONLINE' | 'OFFLINE' | 'UNKNOWN';
21
+ export type EndpointSecret = {
22
+ opID: string;
23
+ port: number | string;
24
+ url: string;
25
+ status: EndpointStatus;
26
+ };
27
+ export type FlowSecrets = {
28
+ urlmode?: 'private' | 'public';
29
+ [jobId: string]: JobExposeSecrets | 'private' | 'public' | undefined;
30
+ };
31
+ export type OpState = {
32
+ providerId: string | null;
33
+ operationId: string | null;
34
+ group: string | null;
35
+ status: string | null;
36
+ startTime: number | null;
37
+ endTime: number | null;
38
+ exitCode: number | null;
39
+ logs: Array<Log>;
40
+ results?: {
41
+ [key: string]: string | string[];
42
+ };
43
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Jobs/Flows/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type Alias = string;
2
+ export type Aliases = Alias[];
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=aliases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/aliases.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export type DockerAuth = {
2
+ username?: string;
3
+ password?: string;
4
+ email?: string;
5
+ server?: string;
6
+ };
7
+ export type Authentication = {
8
+ docker?: DockerAuth;
9
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=authentication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/authentication.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { RemoveIfEmptyMarker } from "./literals.js";
2
+ export type CMDString = string;
3
+ export type CMDArray = Array<string | RemoveIfEmptyMarker>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmd.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/cmd.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type Env = Record<string, string>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/env.ts"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
1
+ import type { tags } from "typia";
2
+ import type { LiteralString, SpreadMarker } from "./literals.js";
3
+ export type UniqueExposedPorts = Array<ExposeBase> & tags.TagBase<{
4
+ kind: 'uniqueExposedPorts';
5
+ target: 'array';
6
+ value: 'uniqueExposedPorts';
7
+ validate: `
8
+ (() => {
9
+ if (!Array.isArray($input)) return true;
10
+ const numbers = new Set();
11
+ const ranges = [];
12
+ for (const el of $input) {
13
+ // Skip dynamic placeholders and spread markers for uniqueness check
14
+ if (typeof el === "string" && /^%%(ops|global).[^%]+%%$/.test(el)) continue;
15
+ if (el && typeof el === "object" && !Array.isArray(el) && el.__spread__) continue;
16
+
17
+ const port = typeof el === "object" ? el.port : el;
18
+ if (typeof port === "number") {
19
+ if (numbers.has(port)) return false;
20
+ numbers.add(port);
21
+ } else if (typeof port === "string") {
22
+ // Enforce range format for concrete range strings
23
+ const match = /^([0-9]+)-([0-9]+)$/.exec(port);
24
+ if (!match) return false;
25
+ const start = Number(match[1]), end = Number(match[2]);
26
+ for (const [rStart, rEnd] of ranges) {
27
+ if (start <= rEnd && end >= rStart) return false;
28
+ }
29
+ ranges.push([start, end]);
30
+ }
31
+ }
32
+ for (const port of numbers) {
33
+ for (const [start, end] of ranges) {
34
+ if (port >= start && port <= end) return false;
35
+ }
36
+ }
37
+ return true;
38
+ })()
39
+ `;
40
+ message: 'Exposed ports must be unique, number ports must not fall within any defined port range, and port ranges must not overlap or be adjacent.';
41
+ }>;
42
+ export type Port = number;
43
+ export type ExposeBase = Port | LiteralString | SpreadMarker;
44
+ export type Expose = ExposeBase | UniqueExposedPorts;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=expose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expose.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/expose.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type GPU = boolean;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=gpu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpu.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/gpu.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type Image = string;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/image.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ import type { Alias, Aliases } from "./aliases.js";
2
+ import type { Authentication } from "./authentication.js";
3
+ import type { CMDArray, CMDString } from "./cmd.js";
4
+ import type { Env } from "./env.js";
5
+ import type { Expose } from "./expose.js";
6
+ import type { GPU } from "./gpu.js";
7
+ import type { Image } from "./image.js";
8
+ import type { Resources } from "./resources.js";
9
+ import type { Volume } from "./volumes.js";
10
+ import type { WorkDir } from "./work_dir.js";
11
+ export * from "./aliases.js";
12
+ export * from "./authentication.js";
13
+ export * from "./cmd.js";
14
+ export * from "./env.js";
15
+ export * from "./expose.js";
16
+ export * from "./gpu.js";
17
+ export * from "./image.js";
18
+ export * from "./literals.js";
19
+ export * from "./resources.js";
20
+ export * from "./variables.js";
21
+ export * from "./volumes.js";
22
+ export * from "./work_dir.js";
23
+ export interface ContainerRun {
24
+ image: Image;
25
+ aliases?: Alias | Aliases;
26
+ cmd?: CMDString | CMDArray;
27
+ volumes?: Volume[];
28
+ expose?: Expose;
29
+ gpu?: GPU;
30
+ work_dir?: WorkDir;
31
+ entrypoint?: CMDString | CMDArray;
32
+ env?: Env;
33
+ resources?: Resources;
34
+ authentication?: Authentication;
35
+ }
36
+ export interface ContainerCreateVolume {
37
+ name: string;
38
+ }
@@ -0,0 +1,13 @@
1
+ export * from "./aliases.js";
2
+ export * from "./authentication.js";
3
+ export * from "./cmd.js";
4
+ export * from "./env.js";
5
+ export * from "./expose.js";
6
+ export * from "./gpu.js";
7
+ export * from "./image.js";
8
+ export * from "./literals.js";
9
+ export * from "./resources.js";
10
+ export * from "./variables.js";
11
+ export * from "./volumes.js";
12
+ export * from "./work_dir.js";
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/index.ts"],"names":[],"mappings":"AAWA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { tags } from "typia";
2
+ export type RemoveIfEmptyMarker = '__remove-if-empty__';
3
+ export type LiteralString = string & tags.TagBase<{
4
+ kind: 'literalString';
5
+ target: 'string';
6
+ value: 'literalString';
7
+ validate: `
8
+ typeof $input === "string" &&
9
+ /^%%(ops|global).[^%]+%%$/.test($input)
10
+ `;
11
+ message: 'Must be a literal string like %%ops.template.results.expose%%';
12
+ }>;
13
+ export type SpreadMarker = {
14
+ __spread__: LiteralString;
15
+ } & tags.TagBase<{
16
+ kind: 'spreadMarker';
17
+ target: 'object';
18
+ value: 'spreadMarker';
19
+ validate: `
20
+ typeof $input === "object" &&
21
+ $input !== null &&
22
+ !Array.isArray($input) &&
23
+ Object.keys($input).length === 1 &&
24
+ typeof $input.__spread__ === "string" &&
25
+ /^%%(ops|global).[^%]+%%$/.test($input.__spread__)
26
+ `;
27
+ message: '__spread__ must be a placeholder string';
28
+ }>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=literals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literals.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/literals.ts"],"names":[],"mappings":""}
@@ -0,0 +1,70 @@
1
+ import type { RemoveIfEmptyMarker, SpreadMarker } from "./literals.js";
2
+ type Target = string;
3
+ type URL = string;
4
+ type AllowWrite = boolean;
5
+ type File = string;
6
+ type Model = string;
7
+ type Bucket = string;
8
+ type Revision = string;
9
+ type Repo = string;
10
+ export declare const ResourceTypeEnum: {
11
+ readonly S3: "S3";
12
+ readonly HF: "HF";
13
+ readonly Ollama: "Ollama";
14
+ };
15
+ export type ResourceType = typeof ResourceTypeEnum[keyof typeof ResourceTypeEnum];
16
+ export type S3Base = {
17
+ type: typeof ResourceTypeEnum.S3;
18
+ target: Target;
19
+ url?: URL;
20
+ allowWrite?: AllowWrite;
21
+ files?: File[];
22
+ IAM?: S3Auth;
23
+ };
24
+ export type S3WithBucket = {
25
+ type: typeof ResourceTypeEnum.S3;
26
+ target: Target;
27
+ bucket: Bucket;
28
+ url?: URL;
29
+ allowWrite?: AllowWrite;
30
+ IAM?: S3Auth;
31
+ };
32
+ export type S3WithBuckets = {
33
+ type: typeof ResourceTypeEnum.S3;
34
+ target: Target;
35
+ buckets: {
36
+ url: URL;
37
+ files?: File[];
38
+ }[];
39
+ url?: URL;
40
+ allowWrite?: AllowWrite;
41
+ IAM?: S3Auth;
42
+ };
43
+ export type S3Unsecure = S3Base | S3WithBucket | S3WithBuckets;
44
+ export type S3Auth = {
45
+ REGION: string;
46
+ ACCESS_KEY_ID: string;
47
+ SECRET_ACCESS_KEY: string;
48
+ };
49
+ export type ResourceBase = {
50
+ type: typeof ResourceTypeEnum[keyof typeof ResourceTypeEnum];
51
+ target: Target;
52
+ };
53
+ export type HFResource = {
54
+ type: typeof ResourceTypeEnum.HF;
55
+ target: Target;
56
+ repo: Repo;
57
+ revision?: Revision;
58
+ files?: File[];
59
+ accessToken?: string;
60
+ };
61
+ export type OllamaResource = {
62
+ type: typeof ResourceTypeEnum.Ollama;
63
+ model: Model;
64
+ target?: Target;
65
+ };
66
+ export type S3Resource = S3Unsecure;
67
+ export type Resource = S3Resource | HFResource | OllamaResource;
68
+ export type RequiredResource = Omit<Resource, 'target'>;
69
+ export type Resources = Array<Resource | SpreadMarker | RemoveIfEmptyMarker>;
70
+ export {};
@@ -0,0 +1,6 @@
1
+ export const ResourceTypeEnum = {
2
+ S3: 'S3',
3
+ HF: 'HF',
4
+ Ollama: 'Ollama',
5
+ };
6
+ //# sourceMappingURL=resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/resources.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,QAAQ;CACR,CAAA"}
@@ -0,0 +1 @@
1
+ export type Variables = Record<string, string>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=variables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variables.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/variables.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type Volume = {
2
+ name: string;
3
+ dest: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=volumes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"volumes.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/volumes.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type WorkDir = string;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=work_dir.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work_dir.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/work_dir.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ type GroupDependencies = {
2
+ depends_on?: never;
3
+ stop_if_dependent_stops?: never;
4
+ } | {
5
+ depends_on: string[];
6
+ stop_if_dependent_stops?: boolean;
7
+ };
8
+ export type Execution = {
9
+ group?: string;
10
+ } & GroupDependencies;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/execution/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import type { CMDArray, CMDString, Env, GPU, Image, Variables, WorkDir } from "../args/index.js";
2
+ export interface Global {
3
+ image?: Image;
4
+ gpu?: GPU;
5
+ entrypoint?: CMDString | CMDArray;
6
+ env?: Env;
7
+ work_dir?: WorkDir;
8
+ variables?: Variables;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/global/index.ts"],"names":[],"mappings":""}