Skip to content

Commit 6f81db2

Browse files
feat: update schema
1 parent 02134bb commit 6f81db2

File tree

5 files changed

+142
-8
lines changed

5 files changed

+142
-8
lines changed

.changeset/long-squids-scream.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@json-types/compose": minor
3+
---
4+
5+
Update schema

packages/compose/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ import schema from "@json-types/compose/schema.json";
2222

2323
TypeScript types generated automatically every night and published when there are changes.
2424

25-
- Last change: 2025-05-07T01:58:57.784Z
25+
- Last change: 2025-07-01T02:22:29.986Z
2626
- Source URL: https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json

packages/compose/index.d.ts

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,12 @@ export interface Compose {
951951
services?: {
952952
[k: string]: Service;
953953
};
954+
/**
955+
* Language models that will be used by your application.
956+
*/
957+
models?: {
958+
[k: string]: Model;
959+
};
954960
/**
955961
* Networks that are shared among multiple services.
956962
*/
@@ -1363,7 +1369,7 @@ export interface Service {
13631369
/**
13641370
* External component used by Compose to manage setup and teardown lifecycle of the service.
13651371
*/
1366-
type?: string;
1372+
type: string;
13671373
/**
13681374
* Provider-specific options.
13691375
*/
@@ -1372,7 +1378,7 @@ export interface Service {
13721378
* This interface was referenced by `undefined`'s JSON-Schema definition
13731379
* via the `patternProperty` "^.+$".
13741380
*/
1375-
[k: string]: string | number | null;
1381+
[k: string]: (string | number | boolean) | (string | number | boolean)[];
13761382
};
13771383
};
13781384
/**
@@ -1509,6 +1515,23 @@ export interface Service {
15091515
* Network mode. Values can be 'bridge', 'host', 'none', 'service:[service name]', or 'container:[container name]'.
15101516
*/
15111517
network_mode?: string;
1518+
/**
1519+
* AI Models to use, referencing entries under the top-level models key.
1520+
*/
1521+
models?:
1522+
| ListOfStrings3
1523+
| {
1524+
/**
1525+
* This interface was referenced by `undefined`'s JSON-Schema definition
1526+
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
1527+
*/
1528+
[k: string]: {
1529+
/**
1530+
* Environment variable set to AI model endpoint.
1531+
*/
1532+
endpoint_var?: string;
1533+
};
1534+
};
15121535
/**
15131536
* Networks to join, referencing entries under the top-level networks key. Can be a list of network names or a mapping of network name to network configuration.
15141537
*/
@@ -1702,6 +1725,10 @@ export interface Service {
17021725
*/
17031726
tty?: boolean | string;
17041727
ulimits?: Ulimits1;
1728+
/**
1729+
* Bind mount Docker API socket and required auth.
1730+
*/
1731+
use_api_socket?: boolean;
17051732
/**
17061733
* Username or UID to run the container process as.
17071734
*/
@@ -1998,6 +2025,27 @@ export interface Ulimits1 {
19982025
soft: number | string;
19992026
};
20002027
}
2028+
/**
2029+
* Language Model for the Compose application.
2030+
*
2031+
* This interface was referenced by `undefined`'s JSON-Schema definition
2032+
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
2033+
*/
2034+
export interface Model {
2035+
/**
2036+
* Custom name for this model.
2037+
*/
2038+
name?: string;
2039+
/**
2040+
* Language Model to run.
2041+
*/
2042+
model: string;
2043+
context_size?: number;
2044+
/**
2045+
* Raw runtime flags to pass to the inference engine.
2046+
*/
2047+
runtime_flags?: string[];
2048+
}
20012049
/**
20022050
* Secret configuration for the Compose application.
20032051
*

packages/compose/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"compose-spec"
1515
],
1616
"x-json-types": {
17-
"lastChangeDate": "2025-05-07T01:58:57.784Z"
17+
"lastChangeDate": "2025-07-01T02:22:29.986Z"
1818
},
1919
"homepage": "https://github.com/swordev/json-types/tree/main/packages/compose",
2020
"bugs": {

packages/compose/schema.json

Lines changed: 85 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@
3131
"additionalProperties": false,
3232
"description": "The services that will be used by your application."
3333
},
34+
"models": {
35+
"type": "object",
36+
"patternProperties": {
37+
"^[a-zA-Z0-9._-]+$": {
38+
"$ref": "#/definitions/model"
39+
}
40+
},
41+
"description": "Language models that will be used by your application."
42+
},
3443
"networks": {
3544
"type": "object",
3645
"patternProperties": {
@@ -556,6 +565,9 @@
556565
"provider": {
557566
"type": "object",
558567
"description": "Specify a service which will not be manage by Compose directly, and delegate its management to an external provider.",
568+
"required": [
569+
"type"
570+
],
559571
"properties": {
560572
"type": {
561573
"type": "string",
@@ -566,10 +578,24 @@
566578
"description": "Provider-specific options.",
567579
"patternProperties": {
568580
"^.+$": {
569-
"type": [
570-
"string",
571-
"number",
572-
"null"
581+
"oneOf": [
582+
{
583+
"type": [
584+
"string",
585+
"number",
586+
"boolean"
587+
]
588+
},
589+
{
590+
"type": "array",
591+
"items": {
592+
"type": [
593+
"string",
594+
"number",
595+
"boolean"
596+
]
597+
}
598+
}
573599
]
574600
}
575601
}
@@ -703,6 +729,29 @@
703729
"type": "string",
704730
"description": "Network mode. Values can be 'bridge', 'host', 'none', 'service:[service name]', or 'container:[container name]'."
705731
},
732+
"models": {
733+
"oneOf": [
734+
{
735+
"$ref": "#/definitions/list_of_strings"
736+
},
737+
{
738+
"type": "object",
739+
"patternProperties": {
740+
"^[a-zA-Z0-9._-]+$": {
741+
"type": "object",
742+
"properties": {
743+
"endpoint_var": {
744+
"type": "string",
745+
"description": "Environment variable set to AI model endpoint."
746+
}
747+
},
748+
"additionalProperties": false
749+
}
750+
}
751+
}
752+
],
753+
"description": "AI Models to use, referencing entries under the top-level models key."
754+
},
706755
"networks": {
707756
"oneOf": [
708757
{
@@ -980,6 +1029,10 @@
9801029
"$ref": "#/definitions/ulimits",
9811030
"description": "Override the default ulimits for a container."
9821031
},
1032+
"use_api_socket": {
1033+
"type": "boolean",
1034+
"description": "Bind mount Docker API socket and required auth."
1035+
},
9831036
"user": {
9841037
"type": "string",
9851038
"description": "Username or UID to run the container process as."
@@ -1908,6 +1961,34 @@
19081961
},
19091962
"additionalProperties": false
19101963
},
1964+
"model": {
1965+
"type": "object",
1966+
"description": "Language Model for the Compose application.",
1967+
"properties": {
1968+
"name": {
1969+
"type": "string",
1970+
"description": "Custom name for this model."
1971+
},
1972+
"model": {
1973+
"type": "string",
1974+
"description": "Language Model to run."
1975+
},
1976+
"context_size": {
1977+
"type": "integer"
1978+
},
1979+
"runtime_flags": {
1980+
"type": "array",
1981+
"items": {
1982+
"type": "string"
1983+
},
1984+
"description": "Raw runtime flags to pass to the inference engine."
1985+
}
1986+
},
1987+
"required": [
1988+
"model"
1989+
],
1990+
"additionalProperties": false
1991+
},
19111992
"command": {
19121993
"oneOf": [
19131994
{

0 commit comments

Comments
 (0)