@opensoftware/contracts 2.3.0 → 2.4.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/dist/index.d.ts CHANGED
@@ -11,8 +11,12 @@ export type RunRecord = Schemas["RunRecord"];
11
11
  export type EvidenceManifest = Schemas["EvidenceManifest"];
12
12
  export type Score = Schemas["Score"];
13
13
  export type WorkReceived = Schemas["WorkReceived"];
14
+ export type WorkRetryRequested = Schemas["WorkRetryRequested"];
14
15
  export type RunStarted = Schemas["RunStarted"];
15
16
  export type RunCompleted = Schemas["RunCompleted"];
17
+ export type RunBlocked = Schemas["RunBlocked"];
18
+ export type DoctorPing = Schemas["DoctorPing"];
19
+ export type DoctorPingSeen = Schemas["DoctorPingSeen"];
16
20
  export type GateRequested = Schemas["GateRequested"];
17
21
  export type GateDecided = Schemas["GateDecided"];
18
22
  export type ScoreRecorded = Schemas["ScoreRecorded"];
@@ -23,16 +27,21 @@ export type IssueLabeled = Schemas["IssueLabeled"];
23
27
  export type GateRecord = Schemas["GateRecord"];
24
28
  export type GateRequest = Schemas["GateRequest"];
25
29
  export type GateView = Schemas["GateView"];
30
+ export type GateDecisionRequest = Schemas["GateDecisionRequest"];
26
31
  export type ApiProblem = Schemas["ApiProblem"];
27
32
  export type WorkSubmission = Schemas["WorkSubmission"];
28
33
  export type WorkItemView = Schemas["WorkItemView"];
29
34
  export type WorkItemList = Schemas["WorkItemList"];
30
35
  export type WorkRequest = Schemas["WorkRequest"];
31
36
  export type RunView = Schemas["RunView"];
37
+ export type RunList = Schemas["RunList"];
32
38
  export type StageView = Schemas["StageView"];
33
39
  export type CheckView = Schemas["CheckView"];
34
40
  export type RunSignal = Schemas["RunSignal"];
41
+ export type RunRetry = Schemas["RunRetry"];
42
+ export type RunAction = Schemas["RunAction"];
35
43
  export type SandboxSpec = Schemas["SandboxSpec"];
44
+ export type FactoryLock = Schemas["FactoryLock"];
36
45
  export type Health = Schemas["Health"];
37
46
  export type HealthCheck = Schemas["HealthCheck"];
38
47
  /** One reason a document does not match its format. `path` is a JSON Pointer into the document. */
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,OAAO,EAAE,EAA2C,MAAM,kBAAkB,CAAC;AACpF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAe,WAAW,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,IAAI,IAAI,eAAe,EAAe,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,OAAO,EAAe,WAAW,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAqC,QAAQ,EAAuB,MAAM,iBAAiB,CAAC;AAwCnG,gGAAgG;AAChG,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AACjE,MAAM,UAAU,GAAG,IAAI,GAAG,EAA4B,CAAC;AAEvD,gFAAgF;AAChF,MAAM,UAAU,QAAQ,CAAC,MAAuB;IAC9C,MAAM,KAAK,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACxE,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACjE,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,KAAK,CAA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AAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;QAC7F,KAAK,UAAU;YACb,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,CAAC;QAClG,KAAK,MAAM,CAAC,CAAC,CAAC;YACZ,MAAM,OAAO,GAAI,KAAK,CAAC,MAAM,CAAC,aAA2B,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,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"}
@@ -19,6 +19,12 @@ channels:
19
19
  messages:
20
20
  WorkReceived:
21
21
  $ref: '#/components/messages/WorkReceived'
22
+ work-retry-requested:
23
+ address: osf.work.retry-requested.v1
24
+ description: A person asked to run a work item's run again.
25
+ messages:
26
+ WorkRetryRequested:
27
+ $ref: '#/components/messages/WorkRetryRequested'
22
28
  run-started:
23
29
  address: osf.run.started.v1
24
30
  description: A run started.
@@ -31,6 +37,18 @@ channels:
31
37
  messages:
32
38
  RunCompleted:
33
39
  $ref: '#/components/messages/RunCompleted'
40
+ run-blocked:
41
+ address: osf.run.blocked.v1
42
+ description: A stage of a run waits for the checks of its pull request.
43
+ messages:
44
+ RunBlocked:
45
+ $ref: '#/components/messages/RunBlocked'
46
+ doctor-ping:
47
+ address: osf.doctor.ping.v1
48
+ description: console doctor --deep checks that an event reaches the foreman.
49
+ messages:
50
+ DoctorPing:
51
+ $ref: '#/components/messages/DoctorPing'
34
52
  gate-requested:
35
53
  address: osf.gate.requested.v1
36
54
  description: A stage waits for a decision.
@@ -81,6 +99,13 @@ operations:
81
99
  $ref: '#/channels/work-received'
82
100
  messages:
83
101
  - $ref: '#/channels/work-received/messages/WorkReceived'
102
+ publishWorkRetryRequested:
103
+ action: send
104
+ summary: Published by intake.
105
+ channel:
106
+ $ref: '#/channels/work-retry-requested'
107
+ messages:
108
+ - $ref: '#/channels/work-retry-requested/messages/WorkRetryRequested'
84
109
  publishRunStarted:
85
110
  action: send
86
111
  summary: Published by foreman.
@@ -95,6 +120,20 @@ operations:
95
120
  $ref: '#/channels/run-completed'
96
121
  messages:
97
122
  - $ref: '#/channels/run-completed/messages/RunCompleted'
123
+ publishRunBlocked:
124
+ action: send
125
+ summary: Published by foreman.
126
+ channel:
127
+ $ref: '#/channels/run-blocked'
128
+ messages:
129
+ - $ref: '#/channels/run-blocked/messages/RunBlocked'
130
+ publishDoctorPing:
131
+ action: send
132
+ summary: Published by console.
133
+ channel:
134
+ $ref: '#/channels/doctor-ping'
135
+ messages:
136
+ - $ref: '#/channels/doctor-ping/messages/DoctorPing'
98
137
  publishGateRequested:
99
138
  action: send
100
139
  summary: Published by gatekeeper.
@@ -154,6 +193,14 @@ components:
154
193
  schemaFormat: application/schema+json;version=draft-2020-12
155
194
  schema:
156
195
  $ref: './work-received/work-received.schema.json'
196
+ WorkRetryRequested:
197
+ name: work.retry-requested@v1
198
+ title: work.retry-requested@v1
199
+ contentType: application/cloudevents+json
200
+ payload:
201
+ schemaFormat: application/schema+json;version=draft-2020-12
202
+ schema:
203
+ $ref: './work-retry-requested/work-retry-requested.schema.json'
157
204
  RunStarted:
158
205
  name: run.started@v1
159
206
  title: run.started@v1
@@ -170,6 +217,22 @@ components:
170
217
  schemaFormat: application/schema+json;version=draft-2020-12
171
218
  schema:
172
219
  $ref: './run-completed/run-completed.schema.json'
220
+ RunBlocked:
221
+ name: run.blocked@v1
222
+ title: run.blocked@v1
223
+ contentType: application/cloudevents+json
224
+ payload:
225
+ schemaFormat: application/schema+json;version=draft-2020-12
226
+ schema:
227
+ $ref: './run-blocked/run-blocked.schema.json'
228
+ DoctorPing:
229
+ name: doctor.ping@v1
230
+ title: doctor.ping@v1
231
+ contentType: application/cloudevents+json
232
+ payload:
233
+ schemaFormat: application/schema+json;version=draft-2020-12
234
+ schema:
235
+ $ref: './doctor-ping/doctor-ping.schema.json'
173
236
  GateRequested:
174
237
  name: gate.requested@v1
175
238
  title: gate.requested@v1
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/events/doctor-ping/doctor-ping.schema.json",
4
+ "title": "DoctorPing",
5
+ "$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
6
+ "type": "object",
7
+ "properties": {
8
+ "specversion": {
9
+ "type": "string",
10
+ "const": "1.0"
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 128,
16
+ "description": "Unique per source. A consumer that sees the same source and id twice handles the event once."
17
+ },
18
+ "source": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "description": "The producing module, for example \"/osf/intake\"."
22
+ },
23
+ "type": {
24
+ "type": "string",
25
+ "const": "doctor.ping@v1"
26
+ },
27
+ "time": {
28
+ "type": "string",
29
+ "format": "date-time"
30
+ },
31
+ "subject": {
32
+ "type": "string",
33
+ "description": "The ID of the thing the event is about: work item, gate, run, score or pull request."
34
+ },
35
+ "datacontenttype": {
36
+ "type": "string",
37
+ "const": "application/json"
38
+ },
39
+ "dataschema": {
40
+ "type": "string",
41
+ "format": "uri"
42
+ },
43
+ "traceparent": {
44
+ "type": "string",
45
+ "description": "W3C trace context (CloudEvents distributed tracing extension)."
46
+ },
47
+ "data": {
48
+ "type": "object",
49
+ "properties": {},
50
+ "description": "A ping carries nothing but its ID."
51
+ }
52
+ },
53
+ "required": [
54
+ "specversion",
55
+ "id",
56
+ "source",
57
+ "type",
58
+ "time",
59
+ "data"
60
+ ],
61
+ "description": "console: `console doctor --deep` checks that an event reaches the foreman (ADR 0120). The ID is fresh and random;\nthe foreman shows it on `GET /v1/doctor/pings/{id}` and acts on nothing else."
62
+ }
@@ -0,0 +1,138 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/events/run-blocked/run-blocked.schema.json",
4
+ "title": "RunBlocked",
5
+ "$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
6
+ "type": "object",
7
+ "properties": {
8
+ "specversion": {
9
+ "type": "string",
10
+ "const": "1.0"
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 128,
16
+ "description": "Unique per source. A consumer that sees the same source and id twice handles the event once."
17
+ },
18
+ "source": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "description": "The producing module, for example \"/osf/intake\"."
22
+ },
23
+ "type": {
24
+ "type": "string",
25
+ "const": "run.blocked@v1"
26
+ },
27
+ "time": {
28
+ "type": "string",
29
+ "format": "date-time"
30
+ },
31
+ "subject": {
32
+ "type": "string",
33
+ "description": "The ID of the thing the event is about: work item, gate, run, score or pull request."
34
+ },
35
+ "datacontenttype": {
36
+ "type": "string",
37
+ "const": "application/json"
38
+ },
39
+ "dataschema": {
40
+ "type": "string",
41
+ "format": "uri"
42
+ },
43
+ "traceparent": {
44
+ "type": "string",
45
+ "description": "W3C trace context (CloudEvents distributed tracing extension)."
46
+ },
47
+ "data": {
48
+ "type": "object",
49
+ "properties": {
50
+ "runId": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "maxLength": 128,
54
+ "description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
55
+ },
56
+ "workItemId": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "maxLength": 128,
60
+ "description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
61
+ },
62
+ "stage": {
63
+ "type": "string",
64
+ "pattern": "^[a-z][a-z0-9-]{0,62}$",
65
+ "description": "The stage that waits."
66
+ },
67
+ "waitsFor": {
68
+ "type": "string",
69
+ "enum": [
70
+ "checks"
71
+ ],
72
+ "description": "What a blocked stage waits for: the checks of the run's pull request. A gate has its own `gate.requested@v1`."
73
+ },
74
+ "pullRequest": {
75
+ "type": "string",
76
+ "format": "uri",
77
+ "description": "The pull request whose checks the stage waits for."
78
+ },
79
+ "checks": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "string"
83
+ },
84
+ "description": "The names of the checks the stage waits for."
85
+ },
86
+ "requester": {
87
+ "type": "object",
88
+ "properties": {
89
+ "kind": {
90
+ "type": "string",
91
+ "enum": [
92
+ "person",
93
+ "trigger"
94
+ ],
95
+ "description": "Who caused something: a person, or an automated trigger such as a cron rule or an alert."
96
+ },
97
+ "id": {
98
+ "type": "string",
99
+ "minLength": 1,
100
+ "description": "Stable ID in the source system, prefixed with the source, for example \"slack:U024BE7LH\"."
101
+ },
102
+ "displayName": {
103
+ "type": "string",
104
+ "description": "Shown to people, for example \"Varun\"."
105
+ }
106
+ },
107
+ "required": [
108
+ "kind",
109
+ "id"
110
+ ],
111
+ "description": "A person or trigger. RUNTIME-008: every run is attributed to one."
112
+ },
113
+ "source": {
114
+ "type": "string",
115
+ "pattern": "^[a-z][a-z0-9-]{0,62}$",
116
+ "description": "A lowercase name: letters, digits and hyphens, starting with a letter. Agents, stages, adapters, sources."
117
+ }
118
+ },
119
+ "required": [
120
+ "runId",
121
+ "workItemId",
122
+ "stage",
123
+ "waitsFor",
124
+ "requester",
125
+ "source"
126
+ ]
127
+ }
128
+ },
129
+ "required": [
130
+ "specversion",
131
+ "id",
132
+ "source",
133
+ "type",
134
+ "time",
135
+ "data"
136
+ ],
137
+ "description": "foreman: a stage of a run waits for the checks of its pull request (ADR 0127). The ID is `<run ID>.blocked.<stage>`."
138
+ }
@@ -137,6 +137,16 @@
137
137
  "evidenceBundle": {
138
138
  "type": "string",
139
139
  "format": "uri"
140
+ },
141
+ "retryOf": {
142
+ "type": "string",
143
+ "minLength": 1,
144
+ "maxLength": 128,
145
+ "description": "The run before, when this run runs a work item again (ADR 0105)."
146
+ },
147
+ "reason": {
148
+ "type": "string",
149
+ "description": "Why the stage the run ended at failed, when the foreman knows it (ADR 0127)."
140
150
  }
141
151
  },
142
152
  "required": [
@@ -113,6 +113,12 @@
113
113
  "type": "string",
114
114
  "pattern": "^[a-z][a-z0-9-]{0,62}$",
115
115
  "description": "A lowercase name: letters, digits and hyphens, starting with a letter. Agents, stages, adapters, sources."
116
+ },
117
+ "retryOf": {
118
+ "type": "string",
119
+ "minLength": 1,
120
+ "maxLength": 128,
121
+ "description": "The run before, when this run runs a work item again (ADR 0105)."
116
122
  }
117
123
  },
118
124
  "required": [
@@ -0,0 +1,106 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/events/work-retry-requested/work-retry-requested.schema.json",
4
+ "title": "WorkRetryRequested",
5
+ "$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
6
+ "type": "object",
7
+ "properties": {
8
+ "specversion": {
9
+ "type": "string",
10
+ "const": "1.0"
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 128,
16
+ "description": "Unique per source. A consumer that sees the same source and id twice handles the event once."
17
+ },
18
+ "source": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "description": "The producing module, for example \"/osf/intake\"."
22
+ },
23
+ "type": {
24
+ "type": "string",
25
+ "const": "work.retry-requested@v1"
26
+ },
27
+ "time": {
28
+ "type": "string",
29
+ "format": "date-time"
30
+ },
31
+ "subject": {
32
+ "type": "string",
33
+ "description": "The ID of the thing the event is about: work item, gate, run, score or pull request."
34
+ },
35
+ "datacontenttype": {
36
+ "type": "string",
37
+ "const": "application/json"
38
+ },
39
+ "dataschema": {
40
+ "type": "string",
41
+ "format": "uri"
42
+ },
43
+ "traceparent": {
44
+ "type": "string",
45
+ "description": "W3C trace context (CloudEvents distributed tracing extension)."
46
+ },
47
+ "data": {
48
+ "type": "object",
49
+ "properties": {
50
+ "workItemId": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "maxLength": 128,
54
+ "description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
55
+ },
56
+ "runId": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "maxLength": 128,
60
+ "description": "The run to run again: the run the work item follows."
61
+ },
62
+ "requester": {
63
+ "type": "object",
64
+ "properties": {
65
+ "kind": {
66
+ "type": "string",
67
+ "enum": [
68
+ "person",
69
+ "trigger"
70
+ ],
71
+ "description": "Who caused something: a person, or an automated trigger such as a cron rule or an alert."
72
+ },
73
+ "id": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "description": "Stable ID in the source system, prefixed with the source, for example \"slack:U024BE7LH\"."
77
+ },
78
+ "displayName": {
79
+ "type": "string",
80
+ "description": "Shown to people, for example \"Varun\"."
81
+ }
82
+ },
83
+ "required": [
84
+ "kind",
85
+ "id"
86
+ ],
87
+ "description": "The person who asked."
88
+ }
89
+ },
90
+ "required": [
91
+ "workItemId",
92
+ "runId",
93
+ "requester"
94
+ ]
95
+ }
96
+ },
97
+ "required": [
98
+ "specversion",
99
+ "id",
100
+ "source",
101
+ "type",
102
+ "time",
103
+ "data"
104
+ ],
105
+ "description": "intake: a person asked to run a work item's run again (ADR 0105). The ID is `<run ID>.retry`."
106
+ }
@@ -295,6 +295,10 @@
295
295
  "optional"
296
296
  ],
297
297
  "description": "Whether the stage must produce an evidence bundle."
298
+ },
299
+ "wait": {
300
+ "type": "boolean",
301
+ "description": "The stage runs no agent: it only waits for its checks, its evidence and its gate, then succeeds (ADR 0107). It\nnames no agent and at least one of checks, evidence \"required\" or gate."
298
302
  }
299
303
  },
300
304
  "required": [
@@ -302,7 +306,7 @@
302
306
  ],
303
307
  "additionalProperties": false
304
308
  },
305
- "description": "Stages in order. Each stage runs one agent; the agent defaults to the stage name."
309
+ "description": "Stages in order. Each stage runs one agent, which defaults to the stage name, or only waits (ADR 0107)."
306
310
  },
307
311
  "automations": {
308
312
  "type": "array",
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/factory-lock/factory-lock.schema.json",
4
+ "title": "FactoryLock",
5
+ "$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
6
+ "type": "object",
7
+ "properties": {
8
+ "version": {
9
+ "type": "number",
10
+ "const": 1,
11
+ "description": "The version of the lock's format."
12
+ },
13
+ "mcp": {
14
+ "type": "object",
15
+ "properties": {},
16
+ "unevaluatedProperties": {
17
+ "type": "object",
18
+ "properties": {
19
+ "name": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "version": {
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "package": {
28
+ "type": "object",
29
+ "properties": {
30
+ "registryType": {
31
+ "type": "string",
32
+ "const": "npm"
33
+ },
34
+ "identifier": {
35
+ "type": "string",
36
+ "minLength": 1
37
+ },
38
+ "version": {
39
+ "type": "string",
40
+ "minLength": 1
41
+ }
42
+ },
43
+ "required": [
44
+ "registryType",
45
+ "identifier",
46
+ "version"
47
+ ]
48
+ },
49
+ "remote": {
50
+ "type": "object",
51
+ "properties": {
52
+ "type": {
53
+ "type": "string",
54
+ "minLength": 1
55
+ },
56
+ "url": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ }
60
+ },
61
+ "required": [
62
+ "type",
63
+ "url"
64
+ ]
65
+ }
66
+ },
67
+ "required": [
68
+ "name",
69
+ "version"
70
+ ],
71
+ "description": "One registry MCP server at its exact version, with the npm package or the remote it starts."
72
+ },
73
+ "description": "The registry MCP servers, by their reference in factory.yaml, for example `registry:io.github.acme/tracker@1.4`."
74
+ },
75
+ "adapters": {
76
+ "type": "object",
77
+ "properties": {},
78
+ "unevaluatedProperties": {
79
+ "type": "object",
80
+ "properties": {},
81
+ "unevaluatedProperties": {
82
+ "type": "object",
83
+ "properties": {
84
+ "range": {
85
+ "type": "string",
86
+ "minLength": 1,
87
+ "description": "The range under `providers` that the pin was resolved from, for example \"^2\"."
88
+ },
89
+ "version": {
90
+ "type": "string",
91
+ "minLength": 1,
92
+ "description": "The exact version, for example \"2.3.1\"."
93
+ }
94
+ },
95
+ "required": [
96
+ "range",
97
+ "version"
98
+ ],
99
+ "description": "One adapter's npm package `@opensoftware/<port>-<name>` at the newest version inside its range.",
100
+ "additionalProperties": false
101
+ }
102
+ },
103
+ "description": "The adapters under `providers` that `factory plan --adapters` pinned, per port and adapter name (ADR 0125). A pin\ncounts only while its `range` is the range factory.yaml declares."
104
+ }
105
+ },
106
+ "required": [
107
+ "version",
108
+ "mcp"
109
+ ],
110
+ "description": "factory.lock next to factory.yaml (ADR 0020, ADR 0125): the exact versions that `factory plan` pinned. factory-spec\nwrites it; the foreman reads the pins of its adapters."
111
+ }