@openenvelope/schema 1.0.0 → 1.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/dist/index.cjs +31 -4
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +31 -4
- package/package.json +2 -2
- package/schema.json +31 -3
package/dist/index.cjs
CHANGED
|
@@ -192,19 +192,23 @@ var schema_default = {
|
|
|
192
192
|
type: "array",
|
|
193
193
|
items: { $ref: "#/$defs/PipelineStep" },
|
|
194
194
|
description: "Ordered sequence of pipeline steps. When present, the runtime executes steps in order rather than dispatching all agents concurrently."
|
|
195
|
+
},
|
|
196
|
+
metadata: {
|
|
197
|
+
$ref: "#/$defs/TeamMetadata",
|
|
198
|
+
description: "Optional team-level metadata. The generatedBy field is populated automatically by the Envelope export pipeline."
|
|
195
199
|
}
|
|
196
200
|
},
|
|
197
201
|
$defs: {
|
|
198
202
|
TeamSchedule: {
|
|
199
203
|
type: "object",
|
|
200
204
|
required: ["type"],
|
|
201
|
-
description: "Defines when the team
|
|
205
|
+
description: "Defines when and how the team is triggered. Omit for on-demand teams.",
|
|
202
206
|
additionalProperties: false,
|
|
203
207
|
properties: {
|
|
204
208
|
type: {
|
|
205
209
|
type: "string",
|
|
206
|
-
enum: ["manual", "cron"],
|
|
207
|
-
description: "'manual' \u2014 triggered by API or UI only. 'cron' \u2014 scheduled via cron expression."
|
|
210
|
+
enum: ["manual", "cron", "event", "condition", "continuous"],
|
|
211
|
+
description: "'manual' \u2014 triggered by API or UI only. 'cron' \u2014 scheduled via cron expression. 'event' \u2014 fires when an inbound webhook arrives. 'condition' \u2014 polls at a defined interval and runs only if a pre-check passes. 'continuous' \u2014 persistent observation loop, Local-only (enum declared for forward compatibility; implementation deferred)."
|
|
208
212
|
},
|
|
209
213
|
cron: {
|
|
210
214
|
type: "string",
|
|
@@ -213,6 +217,29 @@ var schema_default = {
|
|
|
213
217
|
label: {
|
|
214
218
|
type: "string",
|
|
215
219
|
description: "Human-readable description of the schedule. E.g. 'Every Monday at 9am UTC'."
|
|
220
|
+
},
|
|
221
|
+
webhookSecret: {
|
|
222
|
+
type: "string",
|
|
223
|
+
description: "HMAC-SHA256 secret used to verify inbound webhook payloads. Required when type is 'event'. Generated by Envelope \u2014 do not set manually."
|
|
224
|
+
},
|
|
225
|
+
conditionPrompt: {
|
|
226
|
+
type: "string",
|
|
227
|
+
description: "The pre-check prompt evaluated on each polling interval for 'condition'-triggered teams. The full team runs only if this prompt returns a positive signal. Plain English: describe what to look for."
|
|
228
|
+
},
|
|
229
|
+
conditionInterval: {
|
|
230
|
+
type: "string",
|
|
231
|
+
enum: ["15min", "1h", "6h", "24h"],
|
|
232
|
+
description: "How often to evaluate the condition prompt. Defaults to '1h'. Use event triggers instead for near-realtime response."
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
TeamMetadata: {
|
|
237
|
+
type: "object",
|
|
238
|
+
description: "Optional team-level metadata. Not interpreted by the runtime.",
|
|
239
|
+
properties: {
|
|
240
|
+
generatedBy: {
|
|
241
|
+
type: "string",
|
|
242
|
+
description: "Attribution string. Canonical value: 'Envelope \xB7 openenvelope.org'. Populated automatically by the Envelope export pipeline."
|
|
216
243
|
}
|
|
217
244
|
}
|
|
218
245
|
},
|
|
@@ -602,7 +629,7 @@ var schema_default = {
|
|
|
602
629
|
};
|
|
603
630
|
|
|
604
631
|
// src/validate.ts
|
|
605
|
-
var ajv = new import_ajv.default({ allErrors: true });
|
|
632
|
+
var ajv = new import_ajv.default({ allErrors: true, strict: false });
|
|
606
633
|
var _validate = ajv.compile(schema_default);
|
|
607
634
|
function validate(definition) {
|
|
608
635
|
const valid = _validate(definition);
|
package/dist/index.d.cts
CHANGED
|
@@ -92,11 +92,18 @@ interface HumanGate {
|
|
|
92
92
|
recordActions?: RecordAction[];
|
|
93
93
|
timeout?: GateTimeout;
|
|
94
94
|
}
|
|
95
|
-
type ScheduleType = 'manual' | 'cron';
|
|
95
|
+
type ScheduleType = 'manual' | 'cron' | 'event' | 'condition' | 'continuous';
|
|
96
|
+
type ConditionInterval = '15min' | '1h' | '6h' | '24h';
|
|
96
97
|
interface Schedule {
|
|
97
98
|
type: ScheduleType;
|
|
98
99
|
cron?: string;
|
|
99
100
|
label?: string;
|
|
101
|
+
webhookSecret?: string;
|
|
102
|
+
conditionPrompt?: string;
|
|
103
|
+
conditionInterval?: ConditionInterval;
|
|
104
|
+
}
|
|
105
|
+
interface TeamMetadata {
|
|
106
|
+
generatedBy?: string;
|
|
100
107
|
}
|
|
101
108
|
interface PipelineStep {
|
|
102
109
|
key: string;
|
|
@@ -128,6 +135,7 @@ interface TeamDefinition {
|
|
|
128
135
|
gates?: HumanGate[];
|
|
129
136
|
schedule?: Schedule;
|
|
130
137
|
pipeline?: PipelineStep[];
|
|
138
|
+
metadata?: TeamMetadata;
|
|
131
139
|
}
|
|
132
140
|
|
|
133
141
|
interface ValidationResult {
|
package/dist/index.d.ts
CHANGED
|
@@ -92,11 +92,18 @@ interface HumanGate {
|
|
|
92
92
|
recordActions?: RecordAction[];
|
|
93
93
|
timeout?: GateTimeout;
|
|
94
94
|
}
|
|
95
|
-
type ScheduleType = 'manual' | 'cron';
|
|
95
|
+
type ScheduleType = 'manual' | 'cron' | 'event' | 'condition' | 'continuous';
|
|
96
|
+
type ConditionInterval = '15min' | '1h' | '6h' | '24h';
|
|
96
97
|
interface Schedule {
|
|
97
98
|
type: ScheduleType;
|
|
98
99
|
cron?: string;
|
|
99
100
|
label?: string;
|
|
101
|
+
webhookSecret?: string;
|
|
102
|
+
conditionPrompt?: string;
|
|
103
|
+
conditionInterval?: ConditionInterval;
|
|
104
|
+
}
|
|
105
|
+
interface TeamMetadata {
|
|
106
|
+
generatedBy?: string;
|
|
100
107
|
}
|
|
101
108
|
interface PipelineStep {
|
|
102
109
|
key: string;
|
|
@@ -128,6 +135,7 @@ interface TeamDefinition {
|
|
|
128
135
|
gates?: HumanGate[];
|
|
129
136
|
schedule?: Schedule;
|
|
130
137
|
pipeline?: PipelineStep[];
|
|
138
|
+
metadata?: TeamMetadata;
|
|
131
139
|
}
|
|
132
140
|
|
|
133
141
|
interface ValidationResult {
|
package/dist/index.js
CHANGED
|
@@ -156,19 +156,23 @@ var schema_default = {
|
|
|
156
156
|
type: "array",
|
|
157
157
|
items: { $ref: "#/$defs/PipelineStep" },
|
|
158
158
|
description: "Ordered sequence of pipeline steps. When present, the runtime executes steps in order rather than dispatching all agents concurrently."
|
|
159
|
+
},
|
|
160
|
+
metadata: {
|
|
161
|
+
$ref: "#/$defs/TeamMetadata",
|
|
162
|
+
description: "Optional team-level metadata. The generatedBy field is populated automatically by the Envelope export pipeline."
|
|
159
163
|
}
|
|
160
164
|
},
|
|
161
165
|
$defs: {
|
|
162
166
|
TeamSchedule: {
|
|
163
167
|
type: "object",
|
|
164
168
|
required: ["type"],
|
|
165
|
-
description: "Defines when the team
|
|
169
|
+
description: "Defines when and how the team is triggered. Omit for on-demand teams.",
|
|
166
170
|
additionalProperties: false,
|
|
167
171
|
properties: {
|
|
168
172
|
type: {
|
|
169
173
|
type: "string",
|
|
170
|
-
enum: ["manual", "cron"],
|
|
171
|
-
description: "'manual' \u2014 triggered by API or UI only. 'cron' \u2014 scheduled via cron expression."
|
|
174
|
+
enum: ["manual", "cron", "event", "condition", "continuous"],
|
|
175
|
+
description: "'manual' \u2014 triggered by API or UI only. 'cron' \u2014 scheduled via cron expression. 'event' \u2014 fires when an inbound webhook arrives. 'condition' \u2014 polls at a defined interval and runs only if a pre-check passes. 'continuous' \u2014 persistent observation loop, Local-only (enum declared for forward compatibility; implementation deferred)."
|
|
172
176
|
},
|
|
173
177
|
cron: {
|
|
174
178
|
type: "string",
|
|
@@ -177,6 +181,29 @@ var schema_default = {
|
|
|
177
181
|
label: {
|
|
178
182
|
type: "string",
|
|
179
183
|
description: "Human-readable description of the schedule. E.g. 'Every Monday at 9am UTC'."
|
|
184
|
+
},
|
|
185
|
+
webhookSecret: {
|
|
186
|
+
type: "string",
|
|
187
|
+
description: "HMAC-SHA256 secret used to verify inbound webhook payloads. Required when type is 'event'. Generated by Envelope \u2014 do not set manually."
|
|
188
|
+
},
|
|
189
|
+
conditionPrompt: {
|
|
190
|
+
type: "string",
|
|
191
|
+
description: "The pre-check prompt evaluated on each polling interval for 'condition'-triggered teams. The full team runs only if this prompt returns a positive signal. Plain English: describe what to look for."
|
|
192
|
+
},
|
|
193
|
+
conditionInterval: {
|
|
194
|
+
type: "string",
|
|
195
|
+
enum: ["15min", "1h", "6h", "24h"],
|
|
196
|
+
description: "How often to evaluate the condition prompt. Defaults to '1h'. Use event triggers instead for near-realtime response."
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
TeamMetadata: {
|
|
201
|
+
type: "object",
|
|
202
|
+
description: "Optional team-level metadata. Not interpreted by the runtime.",
|
|
203
|
+
properties: {
|
|
204
|
+
generatedBy: {
|
|
205
|
+
type: "string",
|
|
206
|
+
description: "Attribution string. Canonical value: 'Envelope \xB7 openenvelope.org'. Populated automatically by the Envelope export pipeline."
|
|
180
207
|
}
|
|
181
208
|
}
|
|
182
209
|
},
|
|
@@ -566,7 +593,7 @@ var schema_default = {
|
|
|
566
593
|
};
|
|
567
594
|
|
|
568
595
|
// src/validate.ts
|
|
569
|
-
var ajv = new Ajv({ allErrors: true });
|
|
596
|
+
var ajv = new Ajv({ allErrors: true, strict: false });
|
|
570
597
|
var _validate = ajv.compile(schema_default);
|
|
571
598
|
function validate(definition) {
|
|
572
599
|
const valid = _validate(definition);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openenvelope/schema",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "JSON Schema and TypeScript types for the Envelope Team Definition",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"repository": {
|
|
44
44
|
"type": "git",
|
|
45
|
-
"url": "https://github.com/openenvelope/schema"
|
|
45
|
+
"url": "git+https://github.com/openenvelope/schema.git"
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/openenvelope/schema#readme",
|
|
48
48
|
"publishConfig": {
|
package/schema.json
CHANGED
|
@@ -152,6 +152,10 @@
|
|
|
152
152
|
"type": "array",
|
|
153
153
|
"items": { "$ref": "#/$defs/PipelineStep" },
|
|
154
154
|
"description": "Ordered sequence of pipeline steps. When present, the runtime executes steps in order rather than dispatching all agents concurrently."
|
|
155
|
+
},
|
|
156
|
+
"metadata": {
|
|
157
|
+
"$ref": "#/$defs/TeamMetadata",
|
|
158
|
+
"description": "Optional team-level metadata. The generatedBy field is populated automatically by the Envelope export pipeline."
|
|
155
159
|
}
|
|
156
160
|
},
|
|
157
161
|
|
|
@@ -159,13 +163,13 @@
|
|
|
159
163
|
"TeamSchedule": {
|
|
160
164
|
"type": "object",
|
|
161
165
|
"required": ["type"],
|
|
162
|
-
"description": "Defines when the team
|
|
166
|
+
"description": "Defines when and how the team is triggered. Omit for on-demand teams.",
|
|
163
167
|
"additionalProperties": false,
|
|
164
168
|
"properties": {
|
|
165
169
|
"type": {
|
|
166
170
|
"type": "string",
|
|
167
|
-
"enum": ["manual", "cron"],
|
|
168
|
-
"description": "'manual' — triggered by API or UI only. 'cron' — scheduled via cron expression."
|
|
171
|
+
"enum": ["manual", "cron", "event", "condition", "continuous"],
|
|
172
|
+
"description": "'manual' — triggered by API or UI only. 'cron' — scheduled via cron expression. 'event' — fires when an inbound webhook arrives. 'condition' — polls at a defined interval and runs only if a pre-check passes. 'continuous' — persistent observation loop, Local-only (enum declared for forward compatibility; implementation deferred)."
|
|
169
173
|
},
|
|
170
174
|
"cron": {
|
|
171
175
|
"type": "string",
|
|
@@ -174,6 +178,30 @@
|
|
|
174
178
|
"label": {
|
|
175
179
|
"type": "string",
|
|
176
180
|
"description": "Human-readable description of the schedule. E.g. 'Every Monday at 9am UTC'."
|
|
181
|
+
},
|
|
182
|
+
"webhookSecret": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"description": "HMAC-SHA256 secret used to verify inbound webhook payloads. Required when type is 'event'. Generated by Envelope — do not set manually."
|
|
185
|
+
},
|
|
186
|
+
"conditionPrompt": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"description": "The pre-check prompt evaluated on each polling interval for 'condition'-triggered teams. The full team runs only if this prompt returns a positive signal. Plain English: describe what to look for."
|
|
189
|
+
},
|
|
190
|
+
"conditionInterval": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"enum": ["15min", "1h", "6h", "24h"],
|
|
193
|
+
"description": "How often to evaluate the condition prompt. Defaults to '1h'. Use event triggers instead for near-realtime response."
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
"TeamMetadata": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"description": "Optional team-level metadata. Not interpreted by the runtime.",
|
|
201
|
+
"properties": {
|
|
202
|
+
"generatedBy": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"description": "Attribution string. Canonical value: 'Envelope · openenvelope.org'. Populated automatically by the Envelope export pipeline."
|
|
177
205
|
}
|
|
178
206
|
}
|
|
179
207
|
},
|