@opensoftware/contracts 1.10.0 → 2.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.
- package/README.md +30 -6
- package/dist/generated/types.d.ts +10 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/factory-definition/factory-definition.schema.json +12 -0
- package/openapi/openapi.json +17 -1
- package/package.json +2 -2
- package/typespec/factory-definition.tsp +15 -0
package/README.md
CHANGED
|
@@ -91,18 +91,41 @@ the workflow by hand with the tag. The CONTRACT check and `osf-contracts breakin
|
|
|
91
91
|
Only the TypeScript package exists (ADR 0012). A client for another language can be generated from
|
|
92
92
|
`openapi/openapi.json` with any OpenAPI generator when someone needs one.
|
|
93
93
|
|
|
94
|
+
A new package gets its publish workflow and its release-please entries with `osf release-files`; the check RELEASE
|
|
95
|
+
fails until they are current, and also when a workflow differs from `tools/scaffold/publish-workflow.yml`.
|
|
96
|
+
|
|
94
97
|
One-time setup (no credential is ever stored in the repository):
|
|
95
98
|
|
|
96
99
|
1. npm: the organization `opensoftware` owns the scope `@opensoftware`, under which every package of this
|
|
97
100
|
repository is published.
|
|
98
101
|
2. GitHub: the publish job runs in the environment `npm` (Settings → Environments; GitHub creates it on the first
|
|
99
102
|
run).
|
|
100
|
-
3. First version only: npm
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
4.
|
|
104
|
-
repository
|
|
105
|
-
|
|
103
|
+
3. First version only: npm adds a trusted publisher only to a package that exists, so a maintainer publishes the
|
|
104
|
+
first version by hand, from the release tag, with their own npm login and two-factor authentication:
|
|
105
|
+
`pnpm --filter "<package>..." build`, `pnpm --dir <folder> pack`, then `npm publish <file>.tgz --access public`.
|
|
106
|
+
4. Then add the trusted publisher, on npmjs.com (package settings → Trusted publishing) or with
|
|
107
|
+
`npm trust github <package> --file publish-<name>.yml --repository sesigl/open-software-factory --environment npm
|
|
108
|
+
--allow-publish --allow-stage-publish`. Every later version publishes through OIDC only, with a provenance
|
|
109
|
+
statement; the repository holds no npm token.
|
|
110
|
+
|
|
111
|
+
An agent can do step 4 and the checks below with the npm CLI (11.19 or later). It needs a maintainer's
|
|
112
|
+
`npm login --registry https://registry.npmjs.org`. Every `npm trust` call needs two-factor authentication, also
|
|
113
|
+
`list`. Without a terminal, the call fails with `EOTP` and prints an `authUrl` and a `doneUrl`. The maintainer
|
|
114
|
+
opens the `authUrl` and approves. Then a `GET` of the `doneUrl`, with the login's token as a bearer token, returns
|
|
115
|
+
a `token`. The agent passes it as `--otp=<token>` to the next `npm trust` calls; it stays valid for some minutes.
|
|
116
|
+
|
|
117
|
+
To check all packages, run `npm trust list <package>` for each `publish-*.yml` that publishes to npm. Each package
|
|
118
|
+
has exactly one entry: this repository, its own workflow file, the environment `npm`, and the permissions
|
|
119
|
+
`createPackage` and `createStagedPackage`.
|
|
120
|
+
|
|
121
|
+
When a publish fails with `E404 Not Found - PUT https://registry.npmjs.org/@opensoftware%2f<name>`:
|
|
122
|
+
|
|
123
|
+
- npm did not accept the job as a trusted publisher. Check that the job has `id-token: write` and
|
|
124
|
+
`environment: npm`, and compare the package's entry with the rule above.
|
|
125
|
+
- An entry can look correct and still fail. Then remove it with `npm trust revoke <package> --id=<id>`, add it
|
|
126
|
+
again with step 4 and run the workflow again with the tag.
|
|
127
|
+
- After a successful publish, npm can take some minutes before the version is available. A build that installs
|
|
128
|
+
the new version in this time fails with `ETARGET`; run it again.
|
|
106
129
|
|
|
107
130
|
## Configuration
|
|
108
131
|
|
|
@@ -125,3 +148,4 @@ None. The CLI reads no environment variables.
|
|
|
125
148
|
| SCN-CTR-009 | implemented | A tighter form of a "exactly one of" rule fails the compatibility check |
|
|
126
149
|
| SCN-CTR-010 | implemented | runSpans gives each span of a run record with its resource and decoded attributes |
|
|
127
150
|
| SCN-CTR-011 | implemented | runSpans gives no spans for a value that is not a trace export request |
|
|
151
|
+
| SCN-CTR-012 | implemented | A factory definition with an unknown effort is rejected with the allowed levels |
|
|
@@ -143,6 +143,11 @@ export type components = {
|
|
|
143
143
|
harness: components["schemas"]["Name"];
|
|
144
144
|
/** @description A model ID or a routing alias of the inference gateway, for example "routes/triage". */
|
|
145
145
|
model: string;
|
|
146
|
+
/**
|
|
147
|
+
* @description How much the model thinks before it answers. Each harness adapter maps it to its product's own setting (ADR 0078).
|
|
148
|
+
* A smart model works well at `low` or `medium`; a small model at `high` or more.
|
|
149
|
+
*/
|
|
150
|
+
effort: components["schemas"]["Effort"];
|
|
146
151
|
/** @description Path to the Markdown prompt. */
|
|
147
152
|
prompt: string;
|
|
148
153
|
/** @description Repositories the agent operates on, as clone URLs or "<owner>/<name>". */
|
|
@@ -208,6 +213,11 @@ export type components = {
|
|
|
208
213
|
};
|
|
209
214
|
/** @description A Git commit hash, abbreviated (7+) or full. The factory version is the commit of the factory definition. */
|
|
210
215
|
CommitHash: string;
|
|
216
|
+
/**
|
|
217
|
+
* @description The effort level of an agent's model, from the least to the most thinking (ADR 0078).
|
|
218
|
+
* @enum {string}
|
|
219
|
+
*/
|
|
220
|
+
Effort: "low" | "medium" | "high" | "xhigh" | "max";
|
|
211
221
|
/**
|
|
212
222
|
* @description `evidence.json` at the root of an evidence bundle: what was verified, against which scenario IDs, with which
|
|
213
223
|
* artifacts and result (P10).
|
package/dist/index.js
CHANGED
|
@@ -65,6 +65,10 @@ function describe(error) {
|
|
|
65
65
|
return { path: child(String(error.params.unevaluatedProperty)), message: "unknown field" };
|
|
66
66
|
case "required":
|
|
67
67
|
return { path: child(String(error.params.missingProperty)), message: "missing required field" };
|
|
68
|
+
case "enum": {
|
|
69
|
+
const allowed = error.params.allowedValues.map((value) => JSON.stringify(value)).join(", ");
|
|
70
|
+
return { path: error.instancePath || "/", message: `must be one of ${allowed}` };
|
|
71
|
+
}
|
|
68
72
|
case "anyOf":
|
|
69
73
|
case "oneOf":
|
|
70
74
|
return { path: error.instancePath || "/", message: "must match exactly one of the allowed forms" };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|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AC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC3G,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,IAAI,GAAG,EAAE,OAAO,EAAE,kBAAkB,OAAO,EAAE,EAAE,CAAC;QACnF,CAAC;QACD,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,IAAI,GAAG,EAAE,OAAO,EAAE,6CAA6C,EAAE,CAAC;QACrG;YACE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,IAAI,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;IACxF,CAAC;AACH,CAAC"}
|
|
@@ -151,6 +151,17 @@
|
|
|
151
151
|
"minLength": 1,
|
|
152
152
|
"description": "A model ID or a routing alias of the inference gateway, for example \"routes/triage\"."
|
|
153
153
|
},
|
|
154
|
+
"effort": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"enum": [
|
|
157
|
+
"low",
|
|
158
|
+
"medium",
|
|
159
|
+
"high",
|
|
160
|
+
"xhigh",
|
|
161
|
+
"max"
|
|
162
|
+
],
|
|
163
|
+
"description": "How much the model thinks before it answers. Each harness adapter maps it to its product's own setting (ADR 0078).\nA smart model works well at `low` or `medium`; a small model at `high` or more."
|
|
164
|
+
},
|
|
154
165
|
"prompt": {
|
|
155
166
|
"type": "string",
|
|
156
167
|
"minLength": 1,
|
|
@@ -221,6 +232,7 @@
|
|
|
221
232
|
"required": [
|
|
222
233
|
"harness",
|
|
223
234
|
"model",
|
|
235
|
+
"effort",
|
|
224
236
|
"prompt"
|
|
225
237
|
],
|
|
226
238
|
"additionalProperties": false
|
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": "2.1.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",
|
|
@@ -566,6 +566,10 @@
|
|
|
566
566
|
"minLength": 1,
|
|
567
567
|
"description": "A model ID or a routing alias of the inference gateway, for example \"routes/triage\"."
|
|
568
568
|
},
|
|
569
|
+
"effort": {
|
|
570
|
+
"$ref": "#/components/schemas/Effort",
|
|
571
|
+
"description": "How much the model thinks before it answers. Each harness adapter maps it to its product's own setting (ADR 0078).\nA smart model works well at `low` or `medium`; a small model at `high` or more."
|
|
572
|
+
},
|
|
569
573
|
"prompt": {
|
|
570
574
|
"type": "string",
|
|
571
575
|
"minLength": 1,
|
|
@@ -606,6 +610,7 @@
|
|
|
606
610
|
"required": [
|
|
607
611
|
"harness",
|
|
608
612
|
"model",
|
|
613
|
+
"effort",
|
|
609
614
|
"prompt"
|
|
610
615
|
],
|
|
611
616
|
"additionalProperties": false
|
|
@@ -779,6 +784,17 @@
|
|
|
779
784
|
"pattern": "^[0-9a-f]{7,40}$",
|
|
780
785
|
"description": "A Git commit hash, abbreviated (7+) or full. The factory version is the commit of the factory definition."
|
|
781
786
|
},
|
|
787
|
+
"Effort": {
|
|
788
|
+
"type": "string",
|
|
789
|
+
"enum": [
|
|
790
|
+
"low",
|
|
791
|
+
"medium",
|
|
792
|
+
"high",
|
|
793
|
+
"xhigh",
|
|
794
|
+
"max"
|
|
795
|
+
],
|
|
796
|
+
"description": "The effort level of an agent's model, from the least to the most thinking (ADR 0078)."
|
|
797
|
+
},
|
|
782
798
|
"EvidenceManifest": {
|
|
783
799
|
"type": "object",
|
|
784
800
|
"properties": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensoftware/contracts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.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.30.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "node scripts/build.ts",
|
|
@@ -94,6 +94,12 @@ model Agent {
|
|
|
94
94
|
@minLength(1)
|
|
95
95
|
`model`: string;
|
|
96
96
|
|
|
97
|
+
/**
|
|
98
|
+
* How much the model thinks before it answers. Each harness adapter maps it to its product's own setting (ADR 0078).
|
|
99
|
+
* A smart model works well at `low` or `medium`; a small model at `high` or more.
|
|
100
|
+
*/
|
|
101
|
+
effort: Effort;
|
|
102
|
+
|
|
97
103
|
/** Path to the Markdown prompt. */
|
|
98
104
|
@minLength(1)
|
|
99
105
|
prompt: string;
|
|
@@ -155,6 +161,15 @@ model Stage {
|
|
|
155
161
|
@minLength(1)
|
|
156
162
|
scalar CheckName extends string;
|
|
157
163
|
|
|
164
|
+
/** The effort level of an agent's model, from the least to the most thinking (ADR 0078). */
|
|
165
|
+
enum Effort {
|
|
166
|
+
low,
|
|
167
|
+
medium,
|
|
168
|
+
high,
|
|
169
|
+
xhigh,
|
|
170
|
+
max,
|
|
171
|
+
}
|
|
172
|
+
|
|
158
173
|
enum EvidenceRequirement {
|
|
159
174
|
required,
|
|
160
175
|
optional,
|