@independo/inderun-contracts 0.1.3-dev.7 → 0.2.0-dev.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.
@@ -6,5 +6,6 @@ export type { HttpResponse } from "./http-response.js";
6
6
  export type { TelemetryEvent } from "./telemetry-event.js";
7
7
  export type { RoutePlannerInput } from "./route-planner-input.js";
8
8
  export type { RoutePlan } from "./route-plan.js";
9
+ export type { ModelPackage } from "./model-package.js";
9
10
  export * from "./schemas.js";
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,cAAc,cAAc,CAAC"}
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Provider-neutral descriptor for a developer-supplied/custom local model made available to
3
+ * an IndeRun local-model provider family (for example, the ONNX Runtime family). It
4
+ * describes model identity, format, task support, source, files, integrity, licensing, and
5
+ * resource expectations. It is bootstrap/configuration metadata resolved before execution;
6
+ * it is not part of the public TaskRequest/TaskResult surface, and it must not carry raw
7
+ * secrets.
8
+ */
9
+ export type ModelPackage = {
10
+ /**
11
+ * Files that make up the model package, expressed as source-relative names/paths. The
12
+ * provider adapter and model source resolve these to concrete bytes per platform.
13
+ */
14
+ files?: Files;
15
+ /**
16
+ * Model packaging format the target runtime family must understand. 'onnx' is a plain ONNX
17
+ * graph, 'ort' is an ONNX Runtime optimized/mobile format, 'genai' is an ONNX Runtime GenAI
18
+ * model package.
19
+ */
20
+ format: Format;
21
+ /**
22
+ * Stable application-scoped identifier for the model package.
23
+ */
24
+ id: string;
25
+ /**
26
+ * Optional integrity metadata used to validate resolved files before load.
27
+ */
28
+ integrity?: Integrity;
29
+ /**
30
+ * Optional license/source metadata for the model, for developer transparency. Free-form.
31
+ */
32
+ license?: License;
33
+ /**
34
+ * Optional known resource expectations, used by capability checks to reject on constrained
35
+ * devices before load.
36
+ */
37
+ limits?: Limits;
38
+ /**
39
+ * Optional runtime compatibility expectations. Fields are advisory hints for capability
40
+ * checks; the provider adapter owns exact enforcement.
41
+ */
42
+ runtime?: Runtime;
43
+ /**
44
+ * Where the model files are obtained from. Availability of each source type is
45
+ * platform-dependent; see the ONNX Runtime provider-family specification for the
46
+ * per-platform support matrix.
47
+ */
48
+ source?: Source;
49
+ /**
50
+ * IndeRun task kinds this model package can serve (for example 'text_to_text'). Used by
51
+ * dynamic capability checks and route matching.
52
+ */
53
+ tasks?: string[];
54
+ /**
55
+ * Optional application-defined version for the model package, used for cache invalidation
56
+ * and compatibility checks.
57
+ */
58
+ version?: string;
59
+ [property: string]: unknown;
60
+ };
61
+ /**
62
+ * Files that make up the model package, expressed as source-relative names/paths. The
63
+ * provider adapter and model source resolve these to concrete bytes per platform.
64
+ */
65
+ export type Files = {
66
+ /**
67
+ * Optional model/generation config file, where the model requires one.
68
+ */
69
+ config?: string;
70
+ /**
71
+ * Optional external data files referenced by the model graph (for example ONNX external
72
+ * weights).
73
+ */
74
+ external?: string[];
75
+ /**
76
+ * Files that must be present for the package to load (for example the model graph).
77
+ */
78
+ required?: string[];
79
+ /**
80
+ * Optional tokenizer file, where the model requires one.
81
+ */
82
+ tokenizer?: string;
83
+ [property: string]: unknown;
84
+ };
85
+ /**
86
+ * Model packaging format the target runtime family must understand. 'onnx' is a plain ONNX
87
+ * graph, 'ort' is an ONNX Runtime optimized/mobile format, 'genai' is an ONNX Runtime GenAI
88
+ * model package.
89
+ */
90
+ export type Format = "onnx" | "ort" | "genai";
91
+ /**
92
+ * Optional integrity metadata used to validate resolved files before load.
93
+ */
94
+ export type Integrity = {
95
+ /**
96
+ * Map of file name to expected checksum (for example 'sha256:...'). Absence means integrity
97
+ * is not verified by IndeRun.
98
+ */
99
+ checksums?: {
100
+ [key: string]: string;
101
+ };
102
+ [property: string]: unknown;
103
+ };
104
+ /**
105
+ * Optional license/source metadata for the model, for developer transparency. Free-form.
106
+ */
107
+ export type License = {
108
+ /**
109
+ * SPDX license identifier where known (for example 'Apache-2.0').
110
+ */
111
+ spdx?: string;
112
+ /**
113
+ * License or model card URL where available.
114
+ */
115
+ url?: string;
116
+ [property: string]: unknown;
117
+ };
118
+ /**
119
+ * Optional known resource expectations, used by capability checks to reject on constrained
120
+ * devices before load.
121
+ */
122
+ export type Limits = {
123
+ /**
124
+ * Approximate on-disk size of the resolved package, where known.
125
+ */
126
+ diskBytes?: number;
127
+ /**
128
+ * Approximate peak memory required to run the model, where known.
129
+ */
130
+ memBytes?: number;
131
+ [property: string]: unknown;
132
+ };
133
+ /**
134
+ * Optional runtime compatibility expectations. Fields are advisory hints for capability
135
+ * checks; the provider adapter owns exact enforcement.
136
+ */
137
+ export type Runtime = {
138
+ /**
139
+ * Minimum ONNX opset version the model requires, where known.
140
+ */
141
+ minOpset?: number;
142
+ /**
143
+ * Minimum runtime package version required to load the model, where known.
144
+ */
145
+ minRuntimeVersion?: string;
146
+ /**
147
+ * Platforms the package is expected to run on (for example 'web', 'android', 'apple').
148
+ * Absence means unconstrained.
149
+ */
150
+ platforms?: string[];
151
+ [property: string]: unknown;
152
+ };
153
+ /**
154
+ * Where the model files are obtained from. Availability of each source type is
155
+ * platform-dependent; see the ONNX Runtime provider-family specification for the
156
+ * per-platform support matrix.
157
+ */
158
+ export type Source = {
159
+ /**
160
+ * Optional source-specific reference (for example a registry repo id or a bundled asset
161
+ * base path). Interpretation depends on 'sourceType'. Must not contain credentials: URL
162
+ * userinfo (for example 'https://user:pass@host/...') is rejected, and credentials must be
163
+ * supplied via authContextRef instead.
164
+ */
165
+ ref?: string;
166
+ /**
167
+ * Discriminator for how the host makes model files available. 'registry' is a web
168
+ * repository/registry reference (for example a Hugging Face-style repo), 'bundled' is an
169
+ * app asset/resource, 'programmatic' is supplied directly by application code, 'filesystem'
170
+ * is a local path where the platform allows it, 'app_managed' is an app-managed
171
+ * cache/storage location, 'remote' is a host-managed download.
172
+ */
173
+ sourceType: SourceType;
174
+ [property: string]: unknown;
175
+ };
176
+ /**
177
+ * Discriminator for how the host makes model files available. 'registry' is a web
178
+ * repository/registry reference (for example a Hugging Face-style repo), 'bundled' is an
179
+ * app asset/resource, 'programmatic' is supplied directly by application code, 'filesystem'
180
+ * is a local path where the platform allows it, 'app_managed' is an app-managed
181
+ * cache/storage location, 'remote' is a host-managed download.
182
+ */
183
+ export type SourceType = "registry" | "bundled" | "programmatic" | "filesystem" | "app_managed" | "remote";
184
+ //# sourceMappingURL=model-package.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-package.d.ts","sourceRoot":"","sources":["../../src/generated/model-package.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACtC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG;IACjB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,cAAc,GAAG,YAAY,GAAG,aAAa,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ /* This file was generated from JSON Schema using quicktype. Do not edit by hand. */
2
+ export {};
@@ -607,4 +607,162 @@ export declare const routePlanSchema: {
607
607
  };
608
608
  };
609
609
  };
610
+ export declare const modelPackageSchema: {
611
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
612
+ readonly $id: "https://schemas.inderun.dev/1.0/model-package.schema.json";
613
+ readonly title: "ModelPackage";
614
+ readonly description: "Provider-neutral descriptor for a developer-supplied/custom local model made available to an IndeRun local-model provider family (for example, the ONNX Runtime family). It describes model identity, format, task support, source, files, integrity, licensing, and resource expectations. It is bootstrap/configuration metadata resolved before execution; it is not part of the public TaskRequest/TaskResult surface, and it must not carry raw secrets.";
615
+ readonly type: "object";
616
+ readonly additionalProperties: true;
617
+ readonly required: readonly ["id", "format"];
618
+ readonly properties: {
619
+ readonly id: {
620
+ readonly description: "Stable application-scoped identifier for the model package.";
621
+ readonly type: "string";
622
+ readonly minLength: 1;
623
+ };
624
+ readonly version: {
625
+ readonly description: "Optional application-defined version for the model package, used for cache invalidation and compatibility checks.";
626
+ readonly type: "string";
627
+ readonly minLength: 1;
628
+ };
629
+ readonly format: {
630
+ readonly description: "Model packaging format the target runtime family must understand. 'onnx' is a plain ONNX graph, 'ort' is an ONNX Runtime optimized/mobile format, 'genai' is an ONNX Runtime GenAI model package.";
631
+ readonly enum: readonly ["onnx", "ort", "genai"];
632
+ };
633
+ readonly tasks: {
634
+ readonly description: "IndeRun task kinds this model package can serve (for example 'text_to_text'). Used by dynamic capability checks and route matching.";
635
+ readonly type: "array";
636
+ readonly items: {
637
+ readonly type: "string";
638
+ readonly minLength: 1;
639
+ };
640
+ };
641
+ readonly runtime: {
642
+ readonly description: "Optional runtime compatibility expectations. Fields are advisory hints for capability checks; the provider adapter owns exact enforcement.";
643
+ readonly type: "object";
644
+ readonly additionalProperties: true;
645
+ readonly properties: {
646
+ readonly minOpset: {
647
+ readonly description: "Minimum ONNX opset version the model requires, where known.";
648
+ readonly type: "integer";
649
+ readonly minimum: 1;
650
+ };
651
+ readonly minRuntimeVersion: {
652
+ readonly description: "Minimum runtime package version required to load the model, where known.";
653
+ readonly type: "string";
654
+ readonly minLength: 1;
655
+ };
656
+ readonly platforms: {
657
+ readonly description: "Platforms the package is expected to run on (for example 'web', 'android', 'apple'). Absence means unconstrained.";
658
+ readonly type: "array";
659
+ readonly items: {
660
+ readonly type: "string";
661
+ readonly minLength: 1;
662
+ };
663
+ };
664
+ };
665
+ };
666
+ readonly files: {
667
+ readonly description: "Files that make up the model package, expressed as source-relative names/paths. The provider adapter and model source resolve these to concrete bytes per platform.";
668
+ readonly type: "object";
669
+ readonly additionalProperties: true;
670
+ readonly properties: {
671
+ readonly required: {
672
+ readonly description: "Files that must be present for the package to load (for example the model graph).";
673
+ readonly type: "array";
674
+ readonly items: {
675
+ readonly type: "string";
676
+ readonly minLength: 1;
677
+ };
678
+ };
679
+ readonly tokenizer: {
680
+ readonly description: "Optional tokenizer file, where the model requires one.";
681
+ readonly type: "string";
682
+ readonly minLength: 1;
683
+ };
684
+ readonly config: {
685
+ readonly description: "Optional model/generation config file, where the model requires one.";
686
+ readonly type: "string";
687
+ readonly minLength: 1;
688
+ };
689
+ readonly external: {
690
+ readonly description: "Optional external data files referenced by the model graph (for example ONNX external weights).";
691
+ readonly type: "array";
692
+ readonly items: {
693
+ readonly type: "string";
694
+ readonly minLength: 1;
695
+ };
696
+ };
697
+ };
698
+ };
699
+ readonly integrity: {
700
+ readonly description: "Optional integrity metadata used to validate resolved files before load.";
701
+ readonly type: "object";
702
+ readonly additionalProperties: true;
703
+ readonly properties: {
704
+ readonly checksums: {
705
+ readonly description: "Map of file name to expected checksum (for example 'sha256:...'). Absence means integrity is not verified by IndeRun.";
706
+ readonly type: "object";
707
+ readonly additionalProperties: {
708
+ readonly type: "string";
709
+ readonly minLength: 1;
710
+ };
711
+ };
712
+ };
713
+ };
714
+ readonly license: {
715
+ readonly description: "Optional license/source metadata for the model, for developer transparency. Free-form.";
716
+ readonly type: "object";
717
+ readonly additionalProperties: true;
718
+ readonly properties: {
719
+ readonly spdx: {
720
+ readonly description: "SPDX license identifier where known (for example 'Apache-2.0').";
721
+ readonly type: "string";
722
+ readonly minLength: 1;
723
+ };
724
+ readonly url: {
725
+ readonly description: "License or model card URL where available.";
726
+ readonly type: "string";
727
+ readonly minLength: 1;
728
+ };
729
+ };
730
+ };
731
+ readonly source: {
732
+ readonly description: "Where the model files are obtained from. Availability of each source type is platform-dependent; see the ONNX Runtime provider-family specification for the per-platform support matrix.";
733
+ readonly type: "object";
734
+ readonly additionalProperties: true;
735
+ readonly required: readonly ["sourceType"];
736
+ readonly properties: {
737
+ readonly sourceType: {
738
+ readonly description: "Discriminator for how the host makes model files available. 'registry' is a web repository/registry reference (for example a Hugging Face-style repo), 'bundled' is an app asset/resource, 'programmatic' is supplied directly by application code, 'filesystem' is a local path where the platform allows it, 'app_managed' is an app-managed cache/storage location, 'remote' is a host-managed download.";
739
+ readonly enum: readonly ["registry", "bundled", "programmatic", "filesystem", "app_managed", "remote"];
740
+ };
741
+ readonly ref: {
742
+ readonly description: "Optional source-specific reference (for example a registry repo id or a bundled asset base path). Interpretation depends on 'sourceType'. Must not contain credentials: URL userinfo (for example 'https://user:pass@host/...') is rejected, and credentials must be supplied via authContextRef instead.";
743
+ readonly type: "string";
744
+ readonly minLength: 1;
745
+ readonly pattern: "^(?![\\s\\S]*://[^/@]*@)[\\s\\S]*$";
746
+ };
747
+ };
748
+ };
749
+ readonly limits: {
750
+ readonly description: "Optional known resource expectations, used by capability checks to reject on constrained devices before load.";
751
+ readonly type: "object";
752
+ readonly additionalProperties: true;
753
+ readonly properties: {
754
+ readonly diskBytes: {
755
+ readonly description: "Approximate on-disk size of the resolved package, where known.";
756
+ readonly type: "integer";
757
+ readonly minimum: 0;
758
+ };
759
+ readonly memBytes: {
760
+ readonly description: "Approximate peak memory required to run the model, where known.";
761
+ readonly type: "integer";
762
+ readonly minimum: 0;
763
+ };
764
+ };
765
+ };
766
+ };
767
+ };
610
768
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/generated/schemas.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;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schema",
776
+ "$id": "https://schemas.inderun.dev/1.0/model-package.schema.json",
777
+ "title": "ModelPackage",
778
+ "description": "Provider-neutral descriptor for a developer-supplied/custom local model made available to an IndeRun local-model provider family (for example, the ONNX Runtime family). It describes model identity, format, task support, source, files, integrity, licensing, and resource expectations. It is bootstrap/configuration metadata resolved before execution; it is not part of the public TaskRequest/TaskResult surface, and it must not carry raw secrets.",
779
+ "type": "object",
780
+ "additionalProperties": true,
781
+ "required": [
782
+ "id",
783
+ "format"
784
+ ],
785
+ "properties": {
786
+ "id": {
787
+ "description": "Stable application-scoped identifier for the model package.",
788
+ "type": "string",
789
+ "minLength": 1
790
+ },
791
+ "version": {
792
+ "description": "Optional application-defined version for the model package, used for cache invalidation and compatibility checks.",
793
+ "type": "string",
794
+ "minLength": 1
795
+ },
796
+ "format": {
797
+ "description": "Model packaging format the target runtime family must understand. 'onnx' is a plain ONNX graph, 'ort' is an ONNX Runtime optimized/mobile format, 'genai' is an ONNX Runtime GenAI model package.",
798
+ "enum": [
799
+ "onnx",
800
+ "ort",
801
+ "genai"
802
+ ]
803
+ },
804
+ "tasks": {
805
+ "description": "IndeRun task kinds this model package can serve (for example 'text_to_text'). Used by dynamic capability checks and route matching.",
806
+ "type": "array",
807
+ "items": {
808
+ "type": "string",
809
+ "minLength": 1
810
+ }
811
+ },
812
+ "runtime": {
813
+ "description": "Optional runtime compatibility expectations. Fields are advisory hints for capability checks; the provider adapter owns exact enforcement.",
814
+ "type": "object",
815
+ "additionalProperties": true,
816
+ "properties": {
817
+ "minOpset": {
818
+ "description": "Minimum ONNX opset version the model requires, where known.",
819
+ "type": "integer",
820
+ "minimum": 1
821
+ },
822
+ "minRuntimeVersion": {
823
+ "description": "Minimum runtime package version required to load the model, where known.",
824
+ "type": "string",
825
+ "minLength": 1
826
+ },
827
+ "platforms": {
828
+ "description": "Platforms the package is expected to run on (for example 'web', 'android', 'apple'). Absence means unconstrained.",
829
+ "type": "array",
830
+ "items": {
831
+ "type": "string",
832
+ "minLength": 1
833
+ }
834
+ }
835
+ }
836
+ },
837
+ "files": {
838
+ "description": "Files that make up the model package, expressed as source-relative names/paths. The provider adapter and model source resolve these to concrete bytes per platform.",
839
+ "type": "object",
840
+ "additionalProperties": true,
841
+ "properties": {
842
+ "required": {
843
+ "description": "Files that must be present for the package to load (for example the model graph).",
844
+ "type": "array",
845
+ "items": {
846
+ "type": "string",
847
+ "minLength": 1
848
+ }
849
+ },
850
+ "tokenizer": {
851
+ "description": "Optional tokenizer file, where the model requires one.",
852
+ "type": "string",
853
+ "minLength": 1
854
+ },
855
+ "config": {
856
+ "description": "Optional model/generation config file, where the model requires one.",
857
+ "type": "string",
858
+ "minLength": 1
859
+ },
860
+ "external": {
861
+ "description": "Optional external data files referenced by the model graph (for example ONNX external weights).",
862
+ "type": "array",
863
+ "items": {
864
+ "type": "string",
865
+ "minLength": 1
866
+ }
867
+ }
868
+ }
869
+ },
870
+ "integrity": {
871
+ "description": "Optional integrity metadata used to validate resolved files before load.",
872
+ "type": "object",
873
+ "additionalProperties": true,
874
+ "properties": {
875
+ "checksums": {
876
+ "description": "Map of file name to expected checksum (for example 'sha256:...'). Absence means integrity is not verified by IndeRun.",
877
+ "type": "object",
878
+ "additionalProperties": {
879
+ "type": "string",
880
+ "minLength": 1
881
+ }
882
+ }
883
+ }
884
+ },
885
+ "license": {
886
+ "description": "Optional license/source metadata for the model, for developer transparency. Free-form.",
887
+ "type": "object",
888
+ "additionalProperties": true,
889
+ "properties": {
890
+ "spdx": {
891
+ "description": "SPDX license identifier where known (for example 'Apache-2.0').",
892
+ "type": "string",
893
+ "minLength": 1
894
+ },
895
+ "url": {
896
+ "description": "License or model card URL where available.",
897
+ "type": "string",
898
+ "minLength": 1
899
+ }
900
+ }
901
+ },
902
+ "source": {
903
+ "description": "Where the model files are obtained from. Availability of each source type is platform-dependent; see the ONNX Runtime provider-family specification for the per-platform support matrix.",
904
+ "type": "object",
905
+ "additionalProperties": true,
906
+ "required": [
907
+ "sourceType"
908
+ ],
909
+ "properties": {
910
+ "sourceType": {
911
+ "description": "Discriminator for how the host makes model files available. 'registry' is a web repository/registry reference (for example a Hugging Face-style repo), 'bundled' is an app asset/resource, 'programmatic' is supplied directly by application code, 'filesystem' is a local path where the platform allows it, 'app_managed' is an app-managed cache/storage location, 'remote' is a host-managed download.",
912
+ "enum": [
913
+ "registry",
914
+ "bundled",
915
+ "programmatic",
916
+ "filesystem",
917
+ "app_managed",
918
+ "remote"
919
+ ]
920
+ },
921
+ "ref": {
922
+ "description": "Optional source-specific reference (for example a registry repo id or a bundled asset base path). Interpretation depends on 'sourceType'. Must not contain credentials: URL userinfo (for example 'https://user:pass@host/...') is rejected, and credentials must be supplied via authContextRef instead.",
923
+ "type": "string",
924
+ "minLength": 1,
925
+ "pattern": "^(?![\\s\\S]*://[^/@]*@)[\\s\\S]*$"
926
+ }
927
+ }
928
+ },
929
+ "limits": {
930
+ "description": "Optional known resource expectations, used by capability checks to reject on constrained devices before load.",
931
+ "type": "object",
932
+ "additionalProperties": true,
933
+ "properties": {
934
+ "diskBytes": {
935
+ "description": "Approximate on-disk size of the resolved package, where known.",
936
+ "type": "integer",
937
+ "minimum": 0
938
+ },
939
+ "memBytes": {
940
+ "description": "Approximate peak memory required to run the model, where known.",
941
+ "type": "integer",
942
+ "minimum": 0
943
+ }
944
+ }
945
+ }
946
+ }
947
+ };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export type * from "./generated/index.js";
2
- export { httpRequestSchema, httpResponseSchema, inderunErrorSchema, routePlanSchema, routePlannerInputSchema, taskRequestSchema, taskResultSchema, telemetryEventSchema } from "./generated/index.js";
3
- export { getHttpRequestValidationIssues, getHttpResponseValidationIssues, getIndeRunErrorValidationIssues, getRoutePlanValidationIssues, getRoutePlannerInputValidationIssues, getTaskRequestValidationIssues, getTaskResultValidationIssues, getTelemetryEventValidationIssues, validateHttpRequest, validateHttpResponse, validateIndeRunError, validateRoutePlan, validateRoutePlannerInput, validateTaskRequest, validateTaskResult, validateTelemetryEvent, type ValidationIssue } from "./validators.js";
2
+ export { httpRequestSchema, httpResponseSchema, inderunErrorSchema, modelPackageSchema, routePlanSchema, routePlannerInputSchema, taskRequestSchema, taskResultSchema, telemetryEventSchema } from "./generated/index.js";
3
+ export { getHttpRequestValidationIssues, getHttpResponseValidationIssues, getIndeRunErrorValidationIssues, getModelPackageValidationIssues, getRoutePlanValidationIssues, getRoutePlannerInputValidationIssues, getTaskRequestValidationIssues, getTaskResultValidationIssues, getTelemetryEventValidationIssues, validateHttpRequest, validateHttpResponse, validateIndeRunError, validateModelPackage, validateRoutePlan, validateRoutePlannerInput, validateTaskRequest, validateTaskResult, validateTelemetryEvent, type ValidationIssue } from "./validators.js";
4
4
  export type { FinishReason, IndeRunErrorClass, SchemaVersion, SharedRoutePlan, SharedRoutePlannerInput, TaskKind, RoutingConstraints, RoutingPreferences } from "./types.js";
5
5
  export type { ConnectivityService, ThermalState, DeviceConstraintsService, SecureStorageService, ClockService, HttpClientService, TelemetryEventType, TelemetryService, HostServices } from "./host.js";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,sBAAsB,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,EAC5B,oCAAoC,EACpC,8BAA8B,EAC9B,6BAA6B,EAC7B,iCAAiC,EACjC,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,uBAAuB,EACvB,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACb,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,sBAAsB,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,EAC5B,oCAAoC,EACpC,8BAA8B,EAC9B,6BAA6B,EAC7B,iCAAiC,EACjC,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,uBAAuB,EACvB,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACb,MAAM,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { httpRequestSchema, httpResponseSchema, inderunErrorSchema, routePlanSchema, routePlannerInputSchema, taskRequestSchema, taskResultSchema, telemetryEventSchema } from "./generated/index.js";
2
- export { getHttpRequestValidationIssues, getHttpResponseValidationIssues, getIndeRunErrorValidationIssues, getRoutePlanValidationIssues, getRoutePlannerInputValidationIssues, getTaskRequestValidationIssues, getTaskResultValidationIssues, getTelemetryEventValidationIssues, validateHttpRequest, validateHttpResponse, validateIndeRunError, validateRoutePlan, validateRoutePlannerInput, validateTaskRequest, validateTaskResult, validateTelemetryEvent } from "./validators.js";
1
+ export { httpRequestSchema, httpResponseSchema, inderunErrorSchema, modelPackageSchema, routePlanSchema, routePlannerInputSchema, taskRequestSchema, taskResultSchema, telemetryEventSchema } from "./generated/index.js";
2
+ export { getHttpRequestValidationIssues, getHttpResponseValidationIssues, getIndeRunErrorValidationIssues, getModelPackageValidationIssues, getRoutePlanValidationIssues, getRoutePlannerInputValidationIssues, getTaskRequestValidationIssues, getTaskResultValidationIssues, getTelemetryEventValidationIssues, validateHttpRequest, validateHttpResponse, validateIndeRunError, validateModelPackage, validateRoutePlan, validateRoutePlannerInput, validateTaskRequest, validateTaskResult, validateTelemetryEvent } from "./validators.js";
@@ -1,6 +1,7 @@
1
1
  import type { IndeRunError } from "./generated/inderun-error.js";
2
2
  import type { HttpRequest } from "./generated/http-request.js";
3
3
  import type { HttpResponse } from "./generated/http-response.js";
4
+ import type { ModelPackage } from "./generated/model-package.js";
4
5
  import type { RoutePlan } from "./generated/route-plan.js";
5
6
  import type { RoutePlannerInput } from "./generated/route-planner-input.js";
6
7
  import type { TaskRequest } from "./generated/task-request.js";
@@ -19,6 +20,7 @@ export declare function validateHttpResponse(value: unknown): value is HttpRespo
19
20
  export declare function validateTelemetryEvent(value: unknown): value is TelemetryEvent;
20
21
  export declare function validateRoutePlannerInput(value: unknown): value is RoutePlannerInput;
21
22
  export declare function validateRoutePlan(value: unknown): value is RoutePlan;
23
+ export declare function validateModelPackage(value: unknown): value is ModelPackage;
22
24
  export declare function getTaskRequestValidationIssues(value: unknown): ValidationIssue[];
23
25
  export declare function getTaskResultValidationIssues(value: unknown): ValidationIssue[];
24
26
  export declare function getIndeRunErrorValidationIssues(value: unknown): ValidationIssue[];
@@ -27,4 +29,5 @@ export declare function getHttpResponseValidationIssues(value: unknown): Validat
27
29
  export declare function getTelemetryEventValidationIssues(value: unknown): ValidationIssue[];
28
30
  export declare function getRoutePlannerInputValidationIssues(value: unknown): ValidationIssue[];
29
31
  export declare function getRoutePlanValidationIssues(value: unknown): ValidationIssue[];
32
+ export declare function getModelPackageValidationIssues(value: unknown): ValidationIssue[];
30
33
  //# sourceMappingURL=validators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAW5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAoBF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAExE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAA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Y,CAE1E;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,CAOhF;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,CAI/E;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,CAIjF;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,CAEhF;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,CAEjF;AAED,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,CAInF;AAED,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,CAEtF;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,CAE9E;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,CAIjF"}
@@ -1,5 +1,5 @@
1
1
  import Ajv2020 from "ajv/dist/2020.js";
2
- import { httpRequestSchema, httpResponseSchema, inderunErrorSchema, routePlanSchema, routePlannerInputSchema, taskRequestSchema, taskResultSchema, telemetryEventSchema } from "./generated/index.js";
2
+ import { httpRequestSchema, httpResponseSchema, inderunErrorSchema, modelPackageSchema, routePlanSchema, routePlannerInputSchema, taskRequestSchema, taskResultSchema, telemetryEventSchema } from "./generated/index.js";
3
3
  const Ajv2020Constructor = Ajv2020;
4
4
  const ajv = new Ajv2020Constructor({
5
5
  allErrors: true,
@@ -15,6 +15,7 @@ const validateHttpResponseSchema = ajv.compile(httpResponseSchema);
15
15
  const validateTelemetryEventSchema = ajv.compile(telemetryEventSchema);
16
16
  const validateRoutePlannerInputSchema = ajv.compile(routePlannerInputSchema);
17
17
  const validateRoutePlanSchema = ajv.compile(routePlanSchema);
18
+ const validateModelPackageSchema = ajv.compile(modelPackageSchema);
18
19
  export function validateTaskRequest(value) {
19
20
  return getTaskRequestValidationIssues(value).length === 0;
20
21
  }
@@ -39,6 +40,9 @@ export function validateRoutePlannerInput(value) {
39
40
  export function validateRoutePlan(value) {
40
41
  return getRoutePlanValidationIssues(value).length === 0;
41
42
  }
43
+ export function validateModelPackage(value) {
44
+ return getModelPackageValidationIssues(value).length === 0;
45
+ }
42
46
  export function getTaskRequestValidationIssues(value) {
43
47
  const issues = getValidationIssues(validateTaskRequestSchema, value, {
44
48
  forbidInlineSecrets: true
@@ -73,6 +77,11 @@ export function getRoutePlannerInputValidationIssues(value) {
73
77
  export function getRoutePlanValidationIssues(value) {
74
78
  return getValidationIssues(validateRoutePlanSchema, value);
75
79
  }
80
+ export function getModelPackageValidationIssues(value) {
81
+ return getValidationIssues(validateModelPackageSchema, value, {
82
+ forbidInlineSecrets: true
83
+ });
84
+ }
76
85
  function getValidationIssues(validateSchema, value, options = {}) {
77
86
  const issues = [];
78
87
  if (!validateSchema(value)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@independo/inderun-contracts",
3
- "version": "0.1.3-dev.7",
3
+ "version": "0.2.0-dev.1",
4
4
  "description": "Canonical JSON Schemas, generated TypeScript types, and validators for IndeRun contracts.",
5
5
  "license": "MIT",
6
6
  "author": {