@superjackfruitlabs/treaty-event-schemas 0.0.11 → 0.0.13
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/package.json +1 -1
- package/schemas/README.md +27 -7
- package/schemas/catalog.json +60 -0
- package/schemas/superpipeline/attention.pending.v1.json +161 -0
- package/schemas/superpipeline/card.ready.v1.json +44 -0
- package/schemas/superpipeline/check.failed.v1.json +72 -0
- package/schemas/superpipeline/check.overridden.v1.json +73 -0
- package/schemas/superpipeline/decision.pulled_back.v1.json +48 -0
- package/schemas/superpipeline/decision.released.v1.json +55 -0
- package/schemas/superpipeline/decision.timeout.v1.json +96 -0
- package/schemas/superpipeline/delivery.pending.v1.json +219 -0
- package/schemas/superpipeline/gate.approval_recorded.v1.json +67 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superjackfruitlabs/treaty-event-schemas",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "JSON Schemas for the events Super Jackfruit Labs products send, and the catalogue that names their CloudEvents types.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/schemas/README.md
CHANGED
|
@@ -6,11 +6,20 @@ names each event's CloudEvents `type` and the `dataschema` it points at, which i
|
|
|
6
6
|
|
|
7
7
|
## SuperPipeline (`superpipeline/`)
|
|
8
8
|
|
|
9
|
-
| Schema
|
|
10
|
-
|
|
|
11
|
-
| `gate.pending.v1.json`
|
|
12
|
-
| `elicitation.pending.v1.json`
|
|
13
|
-
| `record.v1.json`
|
|
9
|
+
| Schema | Events | Mirrors |
|
|
10
|
+
| -------------------------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
|
11
|
+
| `gate.pending.v1.json` | `gate.pending` | `GatePendingBody`, `apps/api/src/board/views.ts` |
|
|
12
|
+
| `elicitation.pending.v1.json` | `elicitation.pending` | `ElicitationPendingBody`, same file |
|
|
13
|
+
| `record.v1.json` | the 15 record events, `gate.resolved` among them | `RecordPushBody`, `apps/api/src/push/events.ts` |
|
|
14
|
+
| `delivery.pending.v1.json` | `delivery.pending` | `DeliveryPendingBody`, `apps/api/src/board/views.ts` |
|
|
15
|
+
| `attention.pending.v1.json` | `attention.pending` | `AttentionPendingBody`, same file |
|
|
16
|
+
| `decision.timeout.v1.json` | `decision.reminded`, `decision.escalated` | `DecisionNoticeBody`, `apps/api/src/board/decision-timeouts.ts` |
|
|
17
|
+
| `gate.approval_recorded.v1.json` | `gate.approval_recorded` | `GateApprovalRecordedBody`, `apps/api/src/board/views.ts` |
|
|
18
|
+
| `decision.released.v1.json` | `decision.released` | `DecisionReleasedBody`, same file |
|
|
19
|
+
| `decision.pulled_back.v1.json` | `decision.pulled_back` | `DecisionPulledBackBody`, same file |
|
|
20
|
+
| `check.failed.v1.json` | `check.failed` | `CheckFailedBody`, same file |
|
|
21
|
+
| `check.overridden.v1.json` | `check.overridden` | `CheckOverriddenBody`, same file |
|
|
22
|
+
| `card.ready.v1.json` | `card.ready` | `CardReadyBody`, `apps/api/src/board/placement-window.ts` |
|
|
14
23
|
|
|
15
24
|
The schemas are written from SuperPipeline's types. SuperPipeline's own test validates the bodies
|
|
16
25
|
its builders produce against them, so a type that moves without its schema fails there.
|
|
@@ -20,13 +29,21 @@ producer can add an optional field without a new version. Removing or renaming a
|
|
|
20
29
|
changing what one means, is a new version published beside the old one.
|
|
21
30
|
|
|
22
31
|
`fixtures/superpipeline-events/examples.json` holds bodies each schema must accept and refuse.
|
|
32
|
+
Every body a schema accepts there must also pass the carrier's own check in
|
|
33
|
+
`@superjackfruitlabs/treaty-matrix-events` (`isDeliveryPending`, `isCheckFailed` and the rest),
|
|
34
|
+
except `boardId: null`: SuperPipeline's type allows it and the carrier refuses it, as it cannot
|
|
35
|
+
route an event to no board.
|
|
36
|
+
|
|
37
|
+
`card.ready` is not a chat event: no carrier reads it. A board opted into scheduling sends it
|
|
38
|
+
when a card becomes ready to claim, so a placement service can place the card inside the board's
|
|
39
|
+
placement window instead of waiting for its next sweep.
|
|
23
40
|
|
|
24
41
|
## Not here
|
|
25
42
|
|
|
26
43
|
- **Run reports** go to SuperWitness (`POST /v1/runs`), which owns and publishes their schema at
|
|
27
44
|
`https://docs.superwitness.dev/schemas/run-report.schema.json`. The catalogue points at it.
|
|
28
|
-
-
|
|
29
|
-
|
|
45
|
+
- **`work.available` and `cards.stale`**, SuperPipeline's pushes to an agent's own endpoint, are
|
|
46
|
+
not decision events and have no schema here yet.
|
|
30
47
|
|
|
31
48
|
## Matrix (`matrix/`)
|
|
32
49
|
|
|
@@ -40,6 +57,9 @@ TypeScript that builds and reads them.
|
|
|
40
57
|
- Three files describe a card that rides inside a prose message under a content key rather than as
|
|
41
58
|
an event of its own: `dev.superpipeline.gate`, `dev.superpipeline.elicitation` and
|
|
42
59
|
`dev.agentpod.permission`.
|
|
60
|
+
- `subject.expires_at` (gate.v2, question.v2, delivery.v2, permission.v2) is an RFC 3339 date-time with
|
|
61
|
+
seconds and an explicit offset, or null. It carries both `"format": "date-time"` and a `pattern`,
|
|
62
|
+
because a validator need not assert `format`; `isSubjectExpiry` is the same rule in TypeScript.
|
|
43
63
|
- `x-uniqueBy` lists the paths whose values must not repeat, the one rule JSON Schema cannot state:
|
|
44
64
|
`options[].id` is the `id` of every option.
|
|
45
65
|
- `fixtures/matrix-events/examples.json` is the corpus they are checked against, built by
|
package/schemas/catalog.json
CHANGED
|
@@ -15,6 +15,60 @@
|
|
|
15
15
|
"type": "com.superjackfruit.superpipeline.elicitation.pending.v1",
|
|
16
16
|
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/elicitation.pending.v1.json"
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
"producer": "superpipeline",
|
|
20
|
+
"pushName": "delivery.pending",
|
|
21
|
+
"type": "com.superjackfruit.superpipeline.delivery.pending.v1",
|
|
22
|
+
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/delivery.pending.v1.json"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"producer": "superpipeline",
|
|
26
|
+
"pushName": "attention.pending",
|
|
27
|
+
"type": "com.superjackfruit.superpipeline.attention.pending.v1",
|
|
28
|
+
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/attention.pending.v1.json"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"producer": "superpipeline",
|
|
32
|
+
"pushName": "decision.reminded",
|
|
33
|
+
"type": "com.superjackfruit.superpipeline.decision.reminded.v1",
|
|
34
|
+
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/decision.timeout.v1.json"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"producer": "superpipeline",
|
|
38
|
+
"pushName": "decision.escalated",
|
|
39
|
+
"type": "com.superjackfruit.superpipeline.decision.escalated.v1",
|
|
40
|
+
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/decision.timeout.v1.json"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"producer": "superpipeline",
|
|
44
|
+
"pushName": "gate.approval_recorded",
|
|
45
|
+
"type": "com.superjackfruit.superpipeline.gate.approval_recorded.v1",
|
|
46
|
+
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/gate.approval_recorded.v1.json"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"producer": "superpipeline",
|
|
50
|
+
"pushName": "decision.released",
|
|
51
|
+
"type": "com.superjackfruit.superpipeline.decision.released.v1",
|
|
52
|
+
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/decision.released.v1.json"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"producer": "superpipeline",
|
|
56
|
+
"pushName": "decision.pulled_back",
|
|
57
|
+
"type": "com.superjackfruit.superpipeline.decision.pulled_back.v1",
|
|
58
|
+
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/decision.pulled_back.v1.json"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"producer": "superpipeline",
|
|
62
|
+
"pushName": "check.failed",
|
|
63
|
+
"type": "com.superjackfruit.superpipeline.check.failed.v1",
|
|
64
|
+
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/check.failed.v1.json"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"producer": "superpipeline",
|
|
68
|
+
"pushName": "check.overridden",
|
|
69
|
+
"type": "com.superjackfruit.superpipeline.check.overridden.v1",
|
|
70
|
+
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/check.overridden.v1.json"
|
|
71
|
+
},
|
|
18
72
|
{
|
|
19
73
|
"producer": "superpipeline",
|
|
20
74
|
"pushName": "card.created",
|
|
@@ -104,6 +158,12 @@
|
|
|
104
158
|
"pushName": "link.removed",
|
|
105
159
|
"type": "com.superjackfruit.superpipeline.link.removed.v1",
|
|
106
160
|
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/record.v1.json"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"producer": "superpipeline",
|
|
164
|
+
"pushName": "card.ready",
|
|
165
|
+
"type": "com.superjackfruit.superpipeline.card.ready.v1",
|
|
166
|
+
"dataschema": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/card.ready.v1.json"
|
|
107
167
|
}
|
|
108
168
|
],
|
|
109
169
|
"elsewhere": [
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/attention.pending.v1.json",
|
|
4
|
+
"title": "SuperPipeline attention.pending",
|
|
5
|
+
"description": "A card has come to rest on a person for a reason that is neither a question nor a review (charter: waiting cards and broker approvals reach chat \u00a71-2). Pushed when the card parks, and read back by the carrier's sweep from GET /v1/boards/:id/attention/pending, from one builder. Mirrors SuperPipeline's AttentionPendingBody (apps/api/src/board/views.ts). It has no subject: nothing is frozen, so nothing is bound. Readers ignore properties they do not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"event",
|
|
9
|
+
"boardId",
|
|
10
|
+
"boardName",
|
|
11
|
+
"cardId",
|
|
12
|
+
"cardTitle",
|
|
13
|
+
"stageKey",
|
|
14
|
+
"stageName",
|
|
15
|
+
"waitId",
|
|
16
|
+
"reason",
|
|
17
|
+
"detail",
|
|
18
|
+
"summary",
|
|
19
|
+
"failureCount",
|
|
20
|
+
"earlierStages",
|
|
21
|
+
"options",
|
|
22
|
+
"ts"
|
|
23
|
+
],
|
|
24
|
+
"properties": {
|
|
25
|
+
"event": {
|
|
26
|
+
"const": "attention.pending"
|
|
27
|
+
},
|
|
28
|
+
"boardId": {
|
|
29
|
+
"type": ["string", "null"],
|
|
30
|
+
"description": "Null only on a board not yet initialised; a carrier needs it to route the event."
|
|
31
|
+
},
|
|
32
|
+
"boardName": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Empty string when the board has no name, never absent."
|
|
35
|
+
},
|
|
36
|
+
"cardId": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"cardTitle": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"stageKey": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"stageName": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "The stage's name, or its key when the board no longer has that stage."
|
|
48
|
+
},
|
|
49
|
+
"waitId": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "Names this wait. A card that parks again is a new wait; an answer naming an ended one is refused."
|
|
52
|
+
},
|
|
53
|
+
"reason": {
|
|
54
|
+
"enum": ["repeated-failure", "blocked", "not-authorised"]
|
|
55
|
+
},
|
|
56
|
+
"detail": {
|
|
57
|
+
"type": ["string", "null"],
|
|
58
|
+
"description": "The run's own words; null when the park gave none."
|
|
59
|
+
},
|
|
60
|
+
"summary": {
|
|
61
|
+
"type": ["string", "null"]
|
|
62
|
+
},
|
|
63
|
+
"failureCount": {
|
|
64
|
+
"type": ["integer", "null"],
|
|
65
|
+
"minimum": 0,
|
|
66
|
+
"description": "How many attempts failed, when the breaker tripped; null otherwise."
|
|
67
|
+
},
|
|
68
|
+
"earlierStages": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"description": "The stages before this one, in order.",
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"required": ["key", "name"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"key": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"name": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"options": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"description": "resume_here (approve), one resume_at:<stageKey> (choose) per earlier stage, archive (reject).",
|
|
87
|
+
"items": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"required": ["id", "label", "meaning", "needsComment"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"id": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"label": {
|
|
95
|
+
"type": "string"
|
|
96
|
+
},
|
|
97
|
+
"meaning": {
|
|
98
|
+
"$ref": "#/$defs/meaning"
|
|
99
|
+
},
|
|
100
|
+
"needsComment": {
|
|
101
|
+
"const": false
|
|
102
|
+
},
|
|
103
|
+
"input": {
|
|
104
|
+
"$ref": "#/$defs/input"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"deadline": {
|
|
110
|
+
"$ref": "#/$defs/deadline"
|
|
111
|
+
},
|
|
112
|
+
"ts": {
|
|
113
|
+
"$ref": "#/$defs/timestamp",
|
|
114
|
+
"description": "When the card came to rest."
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"$defs": {
|
|
118
|
+
"timestamp": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"format": "date-time"
|
|
121
|
+
},
|
|
122
|
+
"meaning": {
|
|
123
|
+
"enum": ["approve", "reject", "revise", "choose", "defer"],
|
|
124
|
+
"description": "What choosing the option does (gate.v2 \u00a72)."
|
|
125
|
+
},
|
|
126
|
+
"input": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"description": "What choosing the option asks the person to type.",
|
|
129
|
+
"required": ["kind", "label", "required", "maxLength"],
|
|
130
|
+
"properties": {
|
|
131
|
+
"kind": {
|
|
132
|
+
"enum": ["text", "url"]
|
|
133
|
+
},
|
|
134
|
+
"label": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"required": {
|
|
138
|
+
"type": "boolean"
|
|
139
|
+
},
|
|
140
|
+
"maxLength": {
|
|
141
|
+
"type": "integer",
|
|
142
|
+
"minimum": 1
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"deadline": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"description": "When the decision is reminded about and escalated. Absent when its stage sets no timeout.",
|
|
149
|
+
"properties": {
|
|
150
|
+
"remindAt": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"format": "date-time"
|
|
153
|
+
},
|
|
154
|
+
"escalateAt": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"format": "date-time"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/card.ready.v1.json",
|
|
4
|
+
"title": "SuperPipeline card.ready",
|
|
5
|
+
"description": "A card became ready to be claimed on a board opted into scheduling: it reached a stage an agent may claim from in a claimable state, or was resumed or returned there. A placement service reacts to it at once instead of waiting for its sweep; it is a hint, and the board read stays the truth. Sent only by a board with a placement window (charter: SuperDispatch owns the scheduler). Mirrors SuperPipeline's CardReadyBody (apps/api/src/board/placement-window.ts). Readers ignore properties they do not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["event", "boardId", "cardId", "stageKey", "readyAt", "ts"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"event": {
|
|
10
|
+
"const": "card.ready"
|
|
11
|
+
},
|
|
12
|
+
"boardId": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"description": "Never null: the event is routed by its board."
|
|
16
|
+
},
|
|
17
|
+
"cardId": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1
|
|
20
|
+
},
|
|
21
|
+
"stageKey": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"description": "The stage the card is ready at."
|
|
25
|
+
},
|
|
26
|
+
"readyAt": {
|
|
27
|
+
"$ref": "#/$defs/timestamp",
|
|
28
|
+
"description": "When the card became ready: where its placement window starts."
|
|
29
|
+
},
|
|
30
|
+
"placementWindowUntil": {
|
|
31
|
+
"$ref": "#/$defs/timestamp",
|
|
32
|
+
"description": "Until when the board holds the card back from pull so it can be placed. Absent when the board has no window. A hold made inside the window is claimable by its agent at once."
|
|
33
|
+
},
|
|
34
|
+
"ts": {
|
|
35
|
+
"$ref": "#/$defs/timestamp"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"$defs": {
|
|
39
|
+
"timestamp": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"format": "date-time"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/check.failed.v1.json",
|
|
4
|
+
"title": "SuperPipeline check.failed",
|
|
5
|
+
"description": "A check on a card's arrival at a stage failed, and the card went back to returnedTo (charter 2026-11-09, a gate may be decided by checks). One per failed check. Mirrors SuperPipeline's CheckFailedBody (apps/api/src/board/views.ts). Readers ignore properties they do not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"event",
|
|
9
|
+
"boardId",
|
|
10
|
+
"cardId",
|
|
11
|
+
"cardTitle",
|
|
12
|
+
"stageKey",
|
|
13
|
+
"arrivalId",
|
|
14
|
+
"check",
|
|
15
|
+
"returnedTo"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"event": {
|
|
19
|
+
"const": "check.failed"
|
|
20
|
+
},
|
|
21
|
+
"boardId": {
|
|
22
|
+
"type": ["string", "null"],
|
|
23
|
+
"description": "Null only on a board not yet initialised; a carrier needs it to route the event."
|
|
24
|
+
},
|
|
25
|
+
"cardId": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"cardTitle": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"stageKey": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"arrivalId": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "The card's arrival at the stage this check belongs to: one per arrival, so a carrier says each once."
|
|
37
|
+
},
|
|
38
|
+
"check": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"required": ["name", "provider", "status"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"name": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"provider": {
|
|
46
|
+
"enum": ["ci", "verdict"]
|
|
47
|
+
},
|
|
48
|
+
"status": {
|
|
49
|
+
"const": "failed"
|
|
50
|
+
},
|
|
51
|
+
"detail": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "What the result said."
|
|
54
|
+
},
|
|
55
|
+
"url": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "Where the result is."
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"returnedTo": {
|
|
62
|
+
"type": ["string", "null"],
|
|
63
|
+
"description": "The stage the card went back to; null when it could not go back and waits for a person."
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"$defs": {
|
|
67
|
+
"timestamp": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"format": "date-time"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/check.overridden.v1.json",
|
|
4
|
+
"title": "SuperPipeline check.overridden",
|
|
5
|
+
"description": "A workspace owner or admin passed a check by hand (charter 2026-11-09, a gate may be decided by checks \u00a75). by is a principal id. Mirrors SuperPipeline's CheckOverriddenBody (apps/api/src/board/views.ts). Readers ignore properties they do not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"event",
|
|
9
|
+
"boardId",
|
|
10
|
+
"cardId",
|
|
11
|
+
"cardTitle",
|
|
12
|
+
"stageKey",
|
|
13
|
+
"arrivalId",
|
|
14
|
+
"check",
|
|
15
|
+
"by",
|
|
16
|
+
"comment",
|
|
17
|
+
"at"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"event": {
|
|
21
|
+
"const": "check.overridden"
|
|
22
|
+
},
|
|
23
|
+
"boardId": {
|
|
24
|
+
"type": ["string", "null"],
|
|
25
|
+
"description": "Null only on a board not yet initialised; a carrier needs it to route the event."
|
|
26
|
+
},
|
|
27
|
+
"cardId": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"cardTitle": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"stageKey": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"arrivalId": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "The card's arrival at the stage this check belongs to: one per arrival, so a carrier says each once."
|
|
39
|
+
},
|
|
40
|
+
"check": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"required": ["name", "provider", "status"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"name": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"provider": {
|
|
48
|
+
"enum": ["ci", "verdict"]
|
|
49
|
+
},
|
|
50
|
+
"status": {
|
|
51
|
+
"const": "overridden"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"by": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"comment": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "\\S",
|
|
61
|
+
"description": "Why, as the person wrote it; the board refuses a blank one."
|
|
62
|
+
},
|
|
63
|
+
"at": {
|
|
64
|
+
"$ref": "#/$defs/timestamp"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"$defs": {
|
|
68
|
+
"timestamp": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"format": "date-time"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/decision.pulled_back.v1.json",
|
|
4
|
+
"title": "SuperPipeline decision.pulled_back",
|
|
5
|
+
"description": "A held approval was pulled back before its release time, as request changes (charter 2026-11-09, an approval may wait for its release time \u00a74). pulledBackBy is a principal id. Mirrors SuperPipeline's DecisionPulledBackBody (apps/api/src/board/views.ts). Readers ignore properties they do not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"event",
|
|
9
|
+
"boardId",
|
|
10
|
+
"cardId",
|
|
11
|
+
"gateId",
|
|
12
|
+
"pulledBackBy",
|
|
13
|
+
"at",
|
|
14
|
+
"comment"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"event": {
|
|
18
|
+
"const": "decision.pulled_back"
|
|
19
|
+
},
|
|
20
|
+
"boardId": {
|
|
21
|
+
"type": ["string", "null"],
|
|
22
|
+
"description": "Null only on a board not yet initialised; a carrier needs it to route the event."
|
|
23
|
+
},
|
|
24
|
+
"cardId": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"gateId": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"pulledBackBy": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"at": {
|
|
34
|
+
"$ref": "#/$defs/timestamp"
|
|
35
|
+
},
|
|
36
|
+
"comment": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"pattern": "\\S",
|
|
39
|
+
"description": "Why, as the person wrote it; the board refuses a blank one."
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"$defs": {
|
|
43
|
+
"timestamp": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"format": "date-time"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/decision.released.v1.json",
|
|
4
|
+
"title": "SuperPipeline decision.released",
|
|
5
|
+
"description": "A held approval reached its release time and acted, or was blocked (charter 2026-11-09, an approval may wait for its release time \u00a75-7). Mirrors SuperPipeline's DecisionReleasedBody (apps/api/src/board/views.ts). Readers ignore properties they do not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"event",
|
|
9
|
+
"boardId",
|
|
10
|
+
"cardId",
|
|
11
|
+
"gateId",
|
|
12
|
+
"decision",
|
|
13
|
+
"releaseAt",
|
|
14
|
+
"releasedAt",
|
|
15
|
+
"outcome"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"event": {
|
|
19
|
+
"const": "decision.released"
|
|
20
|
+
},
|
|
21
|
+
"boardId": {
|
|
22
|
+
"type": ["string", "null"],
|
|
23
|
+
"description": "Null only on a board not yet initialised; a carrier needs it to route the event."
|
|
24
|
+
},
|
|
25
|
+
"cardId": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"gateId": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"decision": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The gate's decision that was held, such as approve_automatic."
|
|
34
|
+
},
|
|
35
|
+
"releaseAt": {
|
|
36
|
+
"$ref": "#/$defs/timestamp"
|
|
37
|
+
},
|
|
38
|
+
"releasedAt": {
|
|
39
|
+
"$ref": "#/$defs/timestamp"
|
|
40
|
+
},
|
|
41
|
+
"outcome": {
|
|
42
|
+
"enum": ["released", "blocked"]
|
|
43
|
+
},
|
|
44
|
+
"reason": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Why a release was blocked; only on outcome blocked."
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"$defs": {
|
|
50
|
+
"timestamp": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"format": "date-time"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/decision.timeout.v1.json",
|
|
4
|
+
"title": "SuperPipeline decision.reminded and decision.escalated",
|
|
5
|
+
"description": "A waiting decision passed its stage's timeout (charter: unanswered decisions remind, then escalate \u00a72-3). Each is sent at most once per wait: remindedAt rides on decision.reminded, escalatedAt on decision.escalated. Mirrors SuperPipeline's DecisionNoticeBody (apps/api/src/board/decision-timeouts.ts). Readers ignore properties they do not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"event",
|
|
9
|
+
"boardId",
|
|
10
|
+
"boardName",
|
|
11
|
+
"cardId",
|
|
12
|
+
"cardTitle",
|
|
13
|
+
"stageKey",
|
|
14
|
+
"stageName",
|
|
15
|
+
"decisionKind",
|
|
16
|
+
"decisionId",
|
|
17
|
+
"waitingSince",
|
|
18
|
+
"ts"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"event": {
|
|
22
|
+
"enum": ["decision.reminded", "decision.escalated"]
|
|
23
|
+
},
|
|
24
|
+
"boardId": {
|
|
25
|
+
"type": ["string", "null"],
|
|
26
|
+
"description": "Null only on a board not yet initialised; a carrier needs it to route the event."
|
|
27
|
+
},
|
|
28
|
+
"boardName": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Empty string when the board has no name, never absent."
|
|
31
|
+
},
|
|
32
|
+
"cardId": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"cardTitle": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"stageKey": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"stageName": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"decisionKind": {
|
|
45
|
+
"enum": ["gate", "question", "delivery", "attention", "checks"]
|
|
46
|
+
},
|
|
47
|
+
"decisionId": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "The gate id (gate, delivery), the elicitation id (question), the wait id (attention) or the check set's arrival id (checks)."
|
|
50
|
+
},
|
|
51
|
+
"waitingSince": {
|
|
52
|
+
"$ref": "#/$defs/timestamp"
|
|
53
|
+
},
|
|
54
|
+
"remindedAt": {
|
|
55
|
+
"$ref": "#/$defs/timestamp"
|
|
56
|
+
},
|
|
57
|
+
"escalatedAt": {
|
|
58
|
+
"$ref": "#/$defs/timestamp"
|
|
59
|
+
},
|
|
60
|
+
"ts": {
|
|
61
|
+
"$ref": "#/$defs/timestamp"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"allOf": [
|
|
65
|
+
{
|
|
66
|
+
"if": {
|
|
67
|
+
"properties": {
|
|
68
|
+
"event": {
|
|
69
|
+
"const": "decision.reminded"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"then": {
|
|
74
|
+
"required": ["remindedAt"]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"if": {
|
|
79
|
+
"properties": {
|
|
80
|
+
"event": {
|
|
81
|
+
"const": "decision.escalated"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"then": {
|
|
86
|
+
"required": ["escalatedAt"]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"$defs": {
|
|
91
|
+
"timestamp": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"format": "date-time"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/delivery.pending.v1.json",
|
|
4
|
+
"title": "SuperPipeline delivery.pending",
|
|
5
|
+
"description": "A post approved for manual delivery still owes the board its live link (charter: the decision envelope covers questions and follow-ups \u00a73). Pushed when the gate is resolved approve_manual, and read back by the carrier's sweep from GET /v1/boards/:id/deliveries/pending, from one builder. Mirrors SuperPipeline's DeliveryPendingBody (apps/api/src/board/views.ts). Readers ignore properties they do not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"event",
|
|
9
|
+
"boardId",
|
|
10
|
+
"boardName",
|
|
11
|
+
"cardId",
|
|
12
|
+
"cardTitle",
|
|
13
|
+
"gateId",
|
|
14
|
+
"stageKey",
|
|
15
|
+
"approvalSubject",
|
|
16
|
+
"options",
|
|
17
|
+
"ts"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"event": {
|
|
21
|
+
"const": "delivery.pending"
|
|
22
|
+
},
|
|
23
|
+
"boardId": {
|
|
24
|
+
"type": ["string", "null"],
|
|
25
|
+
"description": "Null only on a board not yet initialised; a carrier needs it to route the event."
|
|
26
|
+
},
|
|
27
|
+
"boardName": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Empty string when the board has no name, never absent."
|
|
30
|
+
},
|
|
31
|
+
"cardId": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"cardTitle": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"gateId": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"stageKey": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"approvalSubject": {
|
|
44
|
+
"$ref": "#/$defs/subject"
|
|
45
|
+
},
|
|
46
|
+
"options": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"description": "record_live_url always; switch_to_automatic only when the subject's preview was complete.",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": ["id", "label", "meaning", "needsComment"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"id": {
|
|
54
|
+
"enum": ["record_live_url", "switch_to_automatic"]
|
|
55
|
+
},
|
|
56
|
+
"label": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"meaning": {
|
|
60
|
+
"$ref": "#/$defs/meaning"
|
|
61
|
+
},
|
|
62
|
+
"needsComment": {
|
|
63
|
+
"const": false
|
|
64
|
+
},
|
|
65
|
+
"input": {
|
|
66
|
+
"$ref": "#/$defs/input"
|
|
67
|
+
},
|
|
68
|
+
"delivery": {
|
|
69
|
+
"const": "automatic"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"deadline": {
|
|
75
|
+
"$ref": "#/$defs/deadline"
|
|
76
|
+
},
|
|
77
|
+
"ts": {
|
|
78
|
+
"$ref": "#/$defs/timestamp",
|
|
79
|
+
"description": "When the gate was resolved."
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"$defs": {
|
|
83
|
+
"timestamp": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"format": "date-time"
|
|
86
|
+
},
|
|
87
|
+
"meaning": {
|
|
88
|
+
"enum": ["approve", "reject", "revise", "choose", "defer"],
|
|
89
|
+
"description": "What choosing the option does (gate.v2 \u00a72)."
|
|
90
|
+
},
|
|
91
|
+
"input": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"description": "What choosing the option asks the person to type.",
|
|
94
|
+
"required": ["kind", "label", "required", "maxLength"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"kind": {
|
|
97
|
+
"enum": ["text", "url"]
|
|
98
|
+
},
|
|
99
|
+
"label": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"required": {
|
|
103
|
+
"type": "boolean"
|
|
104
|
+
},
|
|
105
|
+
"maxLength": {
|
|
106
|
+
"type": "integer",
|
|
107
|
+
"minimum": 1
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"previewBlock": {
|
|
112
|
+
"oneOf": [
|
|
113
|
+
{
|
|
114
|
+
"type": "object",
|
|
115
|
+
"required": ["type", "text"],
|
|
116
|
+
"properties": {
|
|
117
|
+
"type": {
|
|
118
|
+
"const": "text"
|
|
119
|
+
},
|
|
120
|
+
"label": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"text": {
|
|
124
|
+
"type": "string"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "object",
|
|
130
|
+
"required": ["type", "label", "value"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"type": {
|
|
133
|
+
"const": "field"
|
|
134
|
+
},
|
|
135
|
+
"label": {
|
|
136
|
+
"type": "string"
|
|
137
|
+
},
|
|
138
|
+
"value": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"type": "object",
|
|
145
|
+
"required": ["type", "label", "url"],
|
|
146
|
+
"properties": {
|
|
147
|
+
"type": {
|
|
148
|
+
"const": "link"
|
|
149
|
+
},
|
|
150
|
+
"label": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
"url": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"subject": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"description": "A subject as a decision envelope carries it (gate.v2 \u00a73): identity, expiry and the kind's bounded preview. The canonical payload stays behind the authenticated route.",
|
|
163
|
+
"required": [
|
|
164
|
+
"id",
|
|
165
|
+
"digest",
|
|
166
|
+
"schema",
|
|
167
|
+
"revision",
|
|
168
|
+
"expiresAt",
|
|
169
|
+
"preview",
|
|
170
|
+
"previewComplete"
|
|
171
|
+
],
|
|
172
|
+
"properties": {
|
|
173
|
+
"id": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"digest": {
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
"schema": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
"revision": {
|
|
183
|
+
"type": "integer",
|
|
184
|
+
"minimum": 0
|
|
185
|
+
},
|
|
186
|
+
"expiresAt": {
|
|
187
|
+
"type": ["string", "null"],
|
|
188
|
+
"format": "date-time",
|
|
189
|
+
"pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$",
|
|
190
|
+
"description": "RFC 3339 with seconds and an explicit offset, or null. The pattern states it for a validator that does not assert format."
|
|
191
|
+
},
|
|
192
|
+
"preview": {
|
|
193
|
+
"type": "array",
|
|
194
|
+
"items": {
|
|
195
|
+
"$ref": "#/$defs/previewBlock"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"previewComplete": {
|
|
199
|
+
"type": "boolean",
|
|
200
|
+
"description": "False when the preview was cut to its bounds; no approving option may then be offered."
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"deadline": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"description": "When the decision is reminded about and escalated. Absent when its stage sets no timeout.",
|
|
207
|
+
"properties": {
|
|
208
|
+
"remindAt": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"format": "date-time"
|
|
211
|
+
},
|
|
212
|
+
"escalateAt": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"format": "date-time"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/SuperJackfruitLabs/treaty/main/schemas/superpipeline/gate.approval_recorded.v1.json",
|
|
4
|
+
"title": "SuperPipeline gate.approval_recorded",
|
|
5
|
+
"description": "An approval on a quorum gate that did not yet reach its quorum (charter 2026-11-09, a gate may need more than one approver \u00a77). The gate is still pending; the approval that reaches the quorum resolves it and sends none. Mirrors SuperPipeline's GateApprovalRecordedBody (apps/api/src/board/views.ts). Readers ignore properties they do not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["event", "boardId", "cardId", "gateId", "approval", "quorum"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"event": {
|
|
10
|
+
"const": "gate.approval_recorded"
|
|
11
|
+
},
|
|
12
|
+
"boardId": {
|
|
13
|
+
"type": ["string", "null"],
|
|
14
|
+
"description": "Null only on a board not yet initialised; a carrier needs it to route the event."
|
|
15
|
+
},
|
|
16
|
+
"cardId": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"gateId": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"approval": {
|
|
23
|
+
"$ref": "#/$defs/approval"
|
|
24
|
+
},
|
|
25
|
+
"quorum": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"description": "The gate's quorum after this approval; approvals oldest first, this one among them.",
|
|
28
|
+
"required": ["required", "from", "approvals"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"required": {
|
|
31
|
+
"type": "integer",
|
|
32
|
+
"minimum": 1
|
|
33
|
+
},
|
|
34
|
+
"from": {
|
|
35
|
+
"enum": ["deciders", "admins"]
|
|
36
|
+
},
|
|
37
|
+
"approvals": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"$ref": "#/$defs/approval"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"$defs": {
|
|
47
|
+
"timestamp": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"format": "date-time"
|
|
50
|
+
},
|
|
51
|
+
"approval": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["principalId", "at"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"principalId": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"at": {
|
|
59
|
+
"$ref": "#/$defs/timestamp"
|
|
60
|
+
},
|
|
61
|
+
"variantId": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|