@opensoftware/contracts 1.8.0 → 1.9.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.
|
@@ -252,6 +252,8 @@ export type components = {
|
|
|
252
252
|
description?: string;
|
|
253
253
|
/** @description Adapters per port with a version range, pinned in `factory.lock` by `factory plan`. */
|
|
254
254
|
providers?: components["schemas"]["Providers"];
|
|
255
|
+
/** @description The inference gateway of the adapter under `providers.inference` (ADR 0070). */
|
|
256
|
+
inference?: components["schemas"]["Inference"];
|
|
255
257
|
/** @description Agents by name. */
|
|
256
258
|
agents: {
|
|
257
259
|
[key: string]: components["schemas"]["Agent"];
|
|
@@ -430,6 +432,13 @@ export type components = {
|
|
|
430
432
|
Hostname: string;
|
|
431
433
|
/** @description An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque. */
|
|
432
434
|
Identifier: string;
|
|
435
|
+
/** @description The inference gateway: the adapter's config and the most a run may spend (ADR 0070). */
|
|
436
|
+
Inference: {
|
|
437
|
+
/** @description Path to the inference adapter's config, for example a LiteLLM proxy config. */
|
|
438
|
+
config: string;
|
|
439
|
+
/** @description The most a run may spend on model calls, in USD. */
|
|
440
|
+
budget?: number;
|
|
441
|
+
};
|
|
433
442
|
/** @description forge adapters: a label was added to an issue. */
|
|
434
443
|
IssueLabeled: {
|
|
435
444
|
/** @constant */
|
|
@@ -707,7 +716,10 @@ export type components = {
|
|
|
707
716
|
"osf.harness.name": components["schemas"]["Name"];
|
|
708
717
|
"osf.harness.version"?: string;
|
|
709
718
|
};
|
|
710
|
-
/**
|
|
719
|
+
/**
|
|
720
|
+
* @description foreman: a signal to a run: "steer" with a message for the running stage's agent, "cancel", "take-over" of the running
|
|
721
|
+
* stage by a person, or "hand-back" of that stage (ADR 0070).
|
|
722
|
+
*/
|
|
711
723
|
RunSignal: {
|
|
712
724
|
type: components["schemas"]["RunSignalType"];
|
|
713
725
|
/** @description The steering message. Required with "steer". */
|
|
@@ -717,7 +729,7 @@ export type components = {
|
|
|
717
729
|
* @description foreman: what a person tells a run.
|
|
718
730
|
* @enum {string}
|
|
719
731
|
*/
|
|
720
|
-
RunSignalType: "steer" | "cancel";
|
|
732
|
+
RunSignalType: "steer" | "cancel" | "take-over" | "hand-back";
|
|
721
733
|
/** @description Attributes of the root span of the run. GenAI names where a convention exists. */
|
|
722
734
|
RunSpan: {
|
|
723
735
|
/** @constant */
|
|
@@ -807,6 +819,8 @@ export type components = {
|
|
|
807
819
|
* @description The last pull request link that an agent of the run wrote (ADR 0069).
|
|
808
820
|
*/
|
|
809
821
|
pullRequest?: string;
|
|
822
|
+
/** @description The run's folder on the foreman's machine, where a person who took over a stage goes on (ADR 0070). */
|
|
823
|
+
folder?: string;
|
|
810
824
|
/** Format: date-time */
|
|
811
825
|
startedAt: string;
|
|
812
826
|
/** Format: date-time */
|
|
@@ -973,6 +987,11 @@ export type components = {
|
|
|
973
987
|
gateId?: string;
|
|
974
988
|
/** @description The checks the stage waits for, once the foreman read them (ADR 0069). */
|
|
975
989
|
checks?: components["schemas"]["CheckView"][];
|
|
990
|
+
/**
|
|
991
|
+
* Format: date-time
|
|
992
|
+
* @description When a person took the stage over from its agent (ADR 0070).
|
|
993
|
+
*/
|
|
994
|
+
takenOverAt?: string;
|
|
976
995
|
/** @description Why the stage ended without success, when the foreman knows. */
|
|
977
996
|
reason?: string;
|
|
978
997
|
/** Format: date-time */
|
|
@@ -112,6 +112,26 @@
|
|
|
112
112
|
"description": "Adapters per port with a version range, pinned in `factory.lock` by `factory plan`.",
|
|
113
113
|
"additionalProperties": false
|
|
114
114
|
},
|
|
115
|
+
"inference": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {
|
|
118
|
+
"config": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"minLength": 1,
|
|
121
|
+
"description": "Path to the inference adapter's config, for example a LiteLLM proxy config."
|
|
122
|
+
},
|
|
123
|
+
"budget": {
|
|
124
|
+
"type": "number",
|
|
125
|
+
"minimum": 0,
|
|
126
|
+
"description": "The most a run may spend on model calls, in USD."
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"required": [
|
|
130
|
+
"config"
|
|
131
|
+
],
|
|
132
|
+
"description": "The inference gateway of the adapter under `providers.inference` (ADR 0070).",
|
|
133
|
+
"additionalProperties": false
|
|
134
|
+
},
|
|
115
135
|
"agents": {
|
|
116
136
|
"type": "object",
|
|
117
137
|
"properties": {},
|
package/openapi/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Open Software Factory contracts",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.9.0",
|
|
6
6
|
"description": "The shared formats as named models, and the HTTP APIs of the modules. Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "Apache-2.0",
|
|
@@ -838,6 +838,10 @@
|
|
|
838
838
|
"$ref": "#/components/schemas/Providers",
|
|
839
839
|
"description": "Adapters per port with a version range, pinned in `factory.lock` by `factory plan`."
|
|
840
840
|
},
|
|
841
|
+
"inference": {
|
|
842
|
+
"$ref": "#/components/schemas/Inference",
|
|
843
|
+
"description": "The inference gateway of the adapter under `providers.inference` (ADR 0070)."
|
|
844
|
+
},
|
|
841
845
|
"agents": {
|
|
842
846
|
"type": "object",
|
|
843
847
|
"properties": {},
|
|
@@ -1332,6 +1336,26 @@
|
|
|
1332
1336
|
"maxLength": 128,
|
|
1333
1337
|
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
1334
1338
|
},
|
|
1339
|
+
"Inference": {
|
|
1340
|
+
"type": "object",
|
|
1341
|
+
"properties": {
|
|
1342
|
+
"config": {
|
|
1343
|
+
"type": "string",
|
|
1344
|
+
"minLength": 1,
|
|
1345
|
+
"description": "Path to the inference adapter's config, for example a LiteLLM proxy config."
|
|
1346
|
+
},
|
|
1347
|
+
"budget": {
|
|
1348
|
+
"type": "number",
|
|
1349
|
+
"minimum": 0,
|
|
1350
|
+
"description": "The most a run may spend on model calls, in USD."
|
|
1351
|
+
}
|
|
1352
|
+
},
|
|
1353
|
+
"required": [
|
|
1354
|
+
"config"
|
|
1355
|
+
],
|
|
1356
|
+
"description": "The inference gateway: the adapter's config and the most a run may spend (ADR 0070).",
|
|
1357
|
+
"additionalProperties": false
|
|
1358
|
+
},
|
|
1335
1359
|
"IssueLabeled": {
|
|
1336
1360
|
"type": "object",
|
|
1337
1361
|
"properties": {
|
|
@@ -2069,13 +2093,15 @@
|
|
|
2069
2093
|
"required": [
|
|
2070
2094
|
"type"
|
|
2071
2095
|
],
|
|
2072
|
-
"description": "foreman: a signal to a run: \"steer\" with a message for the running stage's agent, or \"
|
|
2096
|
+
"description": "foreman: a signal to a run: \"steer\" with a message for the running stage's agent, \"cancel\", \"take-over\" of the running\nstage by a person, or \"hand-back\" of that stage (ADR 0070)."
|
|
2073
2097
|
},
|
|
2074
2098
|
"RunSignalType": {
|
|
2075
2099
|
"type": "string",
|
|
2076
2100
|
"enum": [
|
|
2077
2101
|
"steer",
|
|
2078
|
-
"cancel"
|
|
2102
|
+
"cancel",
|
|
2103
|
+
"take-over",
|
|
2104
|
+
"hand-back"
|
|
2079
2105
|
],
|
|
2080
2106
|
"description": "foreman: what a person tells a run."
|
|
2081
2107
|
},
|
|
@@ -2306,6 +2332,11 @@
|
|
|
2306
2332
|
"format": "uri",
|
|
2307
2333
|
"description": "The last pull request link that an agent of the run wrote (ADR 0069)."
|
|
2308
2334
|
},
|
|
2335
|
+
"folder": {
|
|
2336
|
+
"type": "string",
|
|
2337
|
+
"minLength": 1,
|
|
2338
|
+
"description": "The run's folder on the foreman's machine, where a person who took over a stage goes on (ADR 0070)."
|
|
2339
|
+
},
|
|
2309
2340
|
"startedAt": {
|
|
2310
2341
|
"type": "string",
|
|
2311
2342
|
"format": "date-time"
|
|
@@ -2751,6 +2782,11 @@
|
|
|
2751
2782
|
},
|
|
2752
2783
|
"description": "The checks the stage waits for, once the foreman read them (ADR 0069)."
|
|
2753
2784
|
},
|
|
2785
|
+
"takenOverAt": {
|
|
2786
|
+
"type": "string",
|
|
2787
|
+
"format": "date-time",
|
|
2788
|
+
"description": "When a person took the stage over from its agent (ADR 0070)."
|
|
2789
|
+
},
|
|
2754
2790
|
"reason": {
|
|
2755
2791
|
"type": "string",
|
|
2756
2792
|
"minLength": 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensoftware/contracts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "The shared formats of the open software factory: JSON Schemas, TypeScript types and the osf-contracts CLI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@typespec/openapi": "1.17.0",
|
|
45
45
|
"@typespec/openapi3": "1.17.0",
|
|
46
46
|
"openapi-typescript": "7.13.0",
|
|
47
|
-
"@opensoftware/testkit": "0.
|
|
47
|
+
"@opensoftware/testkit": "0.24.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "node scripts/build.ts",
|
|
@@ -29,6 +29,9 @@ model FactoryDefinition {
|
|
|
29
29
|
/** Adapters per port with a version range, pinned in `factory.lock` by `factory plan`. */
|
|
30
30
|
providers?: Providers;
|
|
31
31
|
|
|
32
|
+
/** The inference gateway of the adapter under `providers.inference` (ADR 0070). */
|
|
33
|
+
inference?: Inference;
|
|
34
|
+
|
|
32
35
|
/** Agents by name. */
|
|
33
36
|
@minProperties(1)
|
|
34
37
|
agents: Record<Agent>;
|
|
@@ -64,6 +67,18 @@ model Providers {
|
|
|
64
67
|
policy?: Record<VersionRange>;
|
|
65
68
|
}
|
|
66
69
|
|
|
70
|
+
/** The inference gateway: the adapter's config and the most a run may spend (ADR 0070). */
|
|
71
|
+
@extension("additionalProperties", Json<false>)
|
|
72
|
+
model Inference {
|
|
73
|
+
/** Path to the inference adapter's config, for example a LiteLLM proxy config. */
|
|
74
|
+
@minLength(1)
|
|
75
|
+
config: string;
|
|
76
|
+
|
|
77
|
+
/** The most a run may spend on model calls, in USD. */
|
|
78
|
+
@minValue(0)
|
|
79
|
+
budget?: float64;
|
|
80
|
+
}
|
|
81
|
+
|
|
67
82
|
/** A reference to a secret, resolved at the egress proxy, never in the sandbox: "ref:<provider>/<name>". */
|
|
68
83
|
@pattern("^ref:[a-z][a-z0-9-]*/[A-Za-z0-9_./-]+$")
|
|
69
84
|
scalar SecretReference extends string;
|
package/typespec/foreman.tsp
CHANGED
|
@@ -60,6 +60,9 @@ model StageView {
|
|
|
60
60
|
/** The checks the stage waits for, once the foreman read them (ADR 0069). */
|
|
61
61
|
checks?: CheckView[];
|
|
62
62
|
|
|
63
|
+
/** When a person took the stage over from its agent (ADR 0070). */
|
|
64
|
+
takenOverAt?: utcDateTime;
|
|
65
|
+
|
|
63
66
|
/** Why the stage ended without success, when the foreman knows. */
|
|
64
67
|
@minLength(1)
|
|
65
68
|
reason?: string;
|
|
@@ -87,6 +90,10 @@ model RunView {
|
|
|
87
90
|
/** The last pull request link that an agent of the run wrote (ADR 0069). */
|
|
88
91
|
pullRequest?: url;
|
|
89
92
|
|
|
93
|
+
/** The run's folder on the foreman's machine, where a person who took over a stage goes on (ADR 0070). */
|
|
94
|
+
@minLength(1)
|
|
95
|
+
folder?: string;
|
|
96
|
+
|
|
90
97
|
startedAt: utcDateTime;
|
|
91
98
|
endedAt?: utcDateTime;
|
|
92
99
|
|
|
@@ -98,9 +105,14 @@ model RunView {
|
|
|
98
105
|
enum RunSignalType {
|
|
99
106
|
steer,
|
|
100
107
|
cancel,
|
|
108
|
+
`take-over`,
|
|
109
|
+
`hand-back`,
|
|
101
110
|
}
|
|
102
111
|
|
|
103
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* foreman: a signal to a run: "steer" with a message for the running stage's agent, "cancel", "take-over" of the running
|
|
114
|
+
* stage by a person, or "hand-back" of that stage (ADR 0070).
|
|
115
|
+
*/
|
|
104
116
|
model RunSignal {
|
|
105
117
|
type: RunSignalType;
|
|
106
118
|
|