@oxygen-agent/cli 1.46.0 → 1.64.5

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.
@@ -0,0 +1,277 @@
1
+ /**
2
+ * Shared cell display formatter for CLI, MCP widgets, and the web app.
3
+ *
4
+ * One source of truth for how a stored cell value should look to a human.
5
+ * Storage stays untouched — this only decides what to render.
6
+ *
7
+ * Three responsibilities:
8
+ * 1. Format known-typed values consistently (numeric → 1,154; timestamp → ISO/short).
9
+ * 2. Rescue numeric-looking values that landed in a `text` column. Headcount
10
+ * and similar fields routinely arrive as text from CSV imports, AI columns,
11
+ * and provider adapters, so a `text` column whose values parse cleanly as
12
+ * numbers still gets thousands grouping at display time.
13
+ * 3. Refuse to "rescue" things that aren't actually numbers (IP addresses,
14
+ * version strings, phone numbers, URLs), via {@link looksLikeNumericText}.
15
+ */
16
+ const DEFAULT_LOCALE = "en-US";
17
+ const INTEGER_RE = /^-?\d{1,15}$/;
18
+ const DECIMAL_RE = /^-?\d{1,15}(?:\.\d{1,9})?$/;
19
+ const GROUPED_RE = /^-?\d{1,3}(?:,\d{3})+(?:\.\d+)?$/;
20
+ // Matches strings that contain only digits and dots with at least two dots
21
+ // (e.g. "0.0.1.154", "192.168.1.1"). Used to *detect*, not classify; the
22
+ // numeric-rescue path then decides whether the parts can be safely joined.
23
+ const DOTTED_NUMERIC_RE = /^[+-]?\d+(?:\.\d+){2,}$/;
24
+ const ENRICHMENT_VALUE_KEYS = ["value", "text", "result"];
25
+ // Column kinds whose cell shape is a wrapper object emitted by an enrichment,
26
+ // tool, AI, action, or formula run — for these we unwrap the carried value.
27
+ // Manual/source columns can also legitimately hold `{value: …, source: …}`
28
+ // JSON data the user typed themselves; we leave those untouched.
29
+ const WRAPPER_COLUMN_KINDS = new Set([
30
+ "enrichment",
31
+ "tool",
32
+ "tool_enrichment",
33
+ "ai",
34
+ "action",
35
+ "formula",
36
+ "relation",
37
+ ]);
38
+ // Digit-only strings of this length or longer are far more likely to be
39
+ // identifiers (US phone = 10, SSN/EIN/DUNS = 9, account numbers) than
40
+ // headcount/revenue/etc. Headcount and similar fit comfortably under this.
41
+ const IDENTIFIER_DIGIT_LENGTH = 10;
42
+ // Column hints that strongly suggest the column holds identifiers (where
43
+ // applying thousands grouping or stripping leading zeros would corrupt the
44
+ // displayed value). Matched against `label`, `key`, and `semantic*` fields.
45
+ // We use explicit non-alphanumeric boundaries rather than `\b` because `_` is
46
+ // a JS word character, so `\bphone\b` would not match a `phone_number` key.
47
+ const IDENTIFIER_COLUMN_RE = /(?:^|[^a-z0-9])(phone|mobile|tel(?:ephone)?|fax|zip|postal|postcode|ssn|ein|tin|vat|gst|iban|swift|duns|sku|upc|ean|isbn|imei|customer[_ -]?(?:no|number|id)|account[_ -]?(?:no|number|id))(?:$|[^a-z0-9])/i;
48
+ /**
49
+ * Canonical display string for a single cell.
50
+ *
51
+ * Returns `""` for null/undefined/empty so callers can treat the absence of
52
+ * a value as the absence of a string. Surface-specific concerns (HTML
53
+ * escaping, ellipsis budgets) belong outside this function.
54
+ */
55
+ // skipcq: JS-R1005 — dispatches across cell types + surfaces; branches are intrinsic
56
+ export function formatCellForDisplay(value, column, options) {
57
+ if (value === null || value === undefined || value === "")
58
+ return "";
59
+ const dataType = readDataType(column);
60
+ const locale = options.locale ?? DEFAULT_LOCALE;
61
+ if (dataType === "boolean")
62
+ return formatBoolean(value, options.surface);
63
+ if (dataType === "timestamptz")
64
+ return formatTimestamp(value, options.surface);
65
+ if (dataType === "numeric")
66
+ return formatNumeric(value, locale, options.surface);
67
+ if (isEnrichmentPayload(value) && columnHasWrapperKind(column)) {
68
+ const wrapped = readEnrichmentValue(value);
69
+ if (wrapped !== undefined) {
70
+ return formatCellForDisplay(wrapped, column, options);
71
+ }
72
+ }
73
+ if (typeof value === "number") {
74
+ return Number.isFinite(value) ? formatNumberValue(value, locale) : String(value);
75
+ }
76
+ if (typeof value === "string") {
77
+ const rescue = rescueNumericText(value);
78
+ if (rescue !== null
79
+ && shouldRescueColumn(column)
80
+ && !looksLikeBareIdentifierDigits(value.trim())) {
81
+ options.onRescued?.(rescue);
82
+ return formatNumberValue(rescue, locale);
83
+ }
84
+ return value;
85
+ }
86
+ if (typeof value === "object") {
87
+ try {
88
+ return JSON.stringify(value);
89
+ }
90
+ catch {
91
+ return String(value);
92
+ }
93
+ }
94
+ return String(value);
95
+ }
96
+ /**
97
+ * Best-effort parse of a string that looks numeric (with or without thousands
98
+ * grouping, with or without dotted IP-style separators) into a finite number.
99
+ * Returns `null` when the string is clearly *not* a single number — IP
100
+ * addresses, version strings, phone numbers, anything alphabetic.
101
+ */
102
+ export function rescueNumericText(raw) {
103
+ const trimmed = raw.trim();
104
+ if (!trimmed)
105
+ return null;
106
+ if (INTEGER_RE.test(trimmed)) {
107
+ const n = Number(trimmed);
108
+ return Number.isFinite(n) ? n : null;
109
+ }
110
+ if (DECIMAL_RE.test(trimmed)) {
111
+ const n = Number(trimmed);
112
+ return Number.isFinite(n) ? n : null;
113
+ }
114
+ if (GROUPED_RE.test(trimmed)) {
115
+ const n = Number(trimmed.replace(/,/g, ""));
116
+ return Number.isFinite(n) ? n : null;
117
+ }
118
+ if (DOTTED_NUMERIC_RE.test(trimmed)) {
119
+ return decodeDottedNumeric(trimmed);
120
+ }
121
+ return null;
122
+ }
123
+ /**
124
+ * True when a digit-only string is shaped like an identifier — phone number,
125
+ * ZIP code with a preserved leading zero, SSN/EIN/DUNS, account or customer
126
+ * number. We refuse to rescue these even in numeric-looking text columns,
127
+ * because thousands-grouping (4155550123 → "4,155,550,123") or leading-zero
128
+ * stripping ("02101" → "2101") corrupts the displayed value.
129
+ */
130
+ function looksLikeBareIdentifierDigits(trimmed) {
131
+ if (!/^\d+$/.test(trimmed))
132
+ return false;
133
+ if (trimmed.startsWith("0"))
134
+ return true;
135
+ return trimmed.length >= IDENTIFIER_DIGIT_LENGTH;
136
+ }
137
+ /**
138
+ * Decide whether a dotted-numeric string like `0.0.1.154` is a mangled integer
139
+ * (return 1154) or a real address/version (return null).
140
+ *
141
+ * Signature of a mangled number: ≥2 leading parts that are literally "0".
142
+ * That excludes real IPv4 ("192.168.1.1"), semver ("1.2.3"), and partial IPs
143
+ * ("10.0.0.1"), all of which have at most one leading zero group.
144
+ *
145
+ * Real headcount/revenue/employee values almost never start with multiple
146
+ * leading zeros — so this guard is conservative on the "don't break real IPs"
147
+ * side, while still recovering the screenshot's `0.0.1.154` shape.
148
+ */
149
+ function decodeDottedNumeric(raw) {
150
+ const sign = raw.startsWith("-") ? -1 : 1;
151
+ const body = raw.replace(/^[+-]/, "");
152
+ const parts = body.split(".");
153
+ if (parts.length < 3)
154
+ return null;
155
+ let leadingZeros = 0;
156
+ for (const part of parts) {
157
+ if (part === "0")
158
+ leadingZeros += 1;
159
+ else
160
+ break;
161
+ }
162
+ if (leadingZeros < 2)
163
+ return null;
164
+ const concatenated = parts.join("");
165
+ if (!/^\d+$/.test(concatenated))
166
+ return null;
167
+ const normalized = concatenated.replace(/^0+(?=\d)/, "");
168
+ const n = Number(normalized || "0");
169
+ return Number.isFinite(n) ? sign * n : null;
170
+ }
171
+ /**
172
+ * True when a string is unambiguously numeric (integer, decimal, grouped, or
173
+ * a mangled dotted form we can recover). Exported for callers that want to
174
+ * highlight rescue cases without re-running the formatter.
175
+ */
176
+ export function looksLikeNumericText(value) {
177
+ return rescueNumericText(value) !== null;
178
+ }
179
+ function readDataType(column) {
180
+ const raw = column?.dataType ?? column?.data_type ?? null;
181
+ if (!raw)
182
+ return null;
183
+ if (raw === "text" || raw === "numeric" || raw === "boolean" || raw === "timestamptz") {
184
+ return raw;
185
+ }
186
+ return null;
187
+ }
188
+ /**
189
+ * Rescue only applies to columns that are reasonable to interpret numerically.
190
+ * Allowlist `text` and `numeric` explicitly — JSONB / unknown data types fall
191
+ * through (a stored string like `"123456789"` in a payload column shouldn't
192
+ * be silently regrouped). Also skip identifier-shaped columns (phone, ZIP,
193
+ * DUNS, etc.) where formatting would corrupt the displayed value, and skip
194
+ * when the column has no metadata at all.
195
+ */
196
+ function shouldRescueColumn(column) {
197
+ if (!column)
198
+ return false;
199
+ const dataType = readDataType(column);
200
+ if (dataType !== "text" && dataType !== "numeric")
201
+ return false;
202
+ return !columnLooksLikeIdentifier(column);
203
+ }
204
+ /**
205
+ * Decide whether the same value-level + column-level guards used inside
206
+ * `formatCellForDisplay`'s text path should rescue this string. Exposed so
207
+ * non-formatter callers (web grid, etc.) can stay in lockstep without
208
+ * duplicating the heuristic.
209
+ */
210
+ export function tryRescueTextCell(value, column) {
211
+ const trimmed = value.trim();
212
+ if (!trimmed)
213
+ return null;
214
+ if (!shouldRescueColumn(column))
215
+ return null;
216
+ if (looksLikeBareIdentifierDigits(trimmed))
217
+ return null;
218
+ return rescueNumericText(trimmed);
219
+ }
220
+ function columnHasWrapperKind(column) {
221
+ const kind = column?.kind;
222
+ return typeof kind === "string" && WRAPPER_COLUMN_KINDS.has(kind);
223
+ }
224
+ function columnLooksLikeIdentifier(column) {
225
+ const hints = [column.label, column.key, column.semanticType, column.semantic_type];
226
+ for (const hint of hints) {
227
+ if (typeof hint === "string" && IDENTIFIER_COLUMN_RE.test(hint))
228
+ return true;
229
+ }
230
+ return false;
231
+ }
232
+ function formatNumberValue(value, locale) {
233
+ // `Intl.NumberFormat` defaults to `maximumFractionDigits: 3` which silently
234
+ // truncates real precision on financial / scientific values. Lift the cap
235
+ // so cells render exactly the digits the user stored.
236
+ return new Intl.NumberFormat(locale, { maximumFractionDigits: 20 }).format(value);
237
+ }
238
+ function formatNumeric(value, locale, _surface) {
239
+ if (typeof value === "number" && Number.isFinite(value)) {
240
+ return formatNumberValue(value, locale);
241
+ }
242
+ if (typeof value === "string") {
243
+ const rescue = rescueNumericText(value);
244
+ if (rescue !== null)
245
+ return formatNumberValue(rescue, locale);
246
+ return value;
247
+ }
248
+ return String(value);
249
+ }
250
+ function formatBoolean(value, surface) {
251
+ const truthy = value === true || value === "true" || value === 1 || value === "1";
252
+ if (surface === "cli")
253
+ return truthy ? "true" : "false";
254
+ return truthy ? "Yes" : "No";
255
+ }
256
+ function formatTimestamp(value, surface) {
257
+ if (value instanceof Date) {
258
+ return surface === "web" ? value.toISOString().slice(0, 10) : value.toISOString();
259
+ }
260
+ if (typeof value !== "string")
261
+ return String(value);
262
+ const trimmed = value.trim();
263
+ const date = new Date(trimmed);
264
+ if (!Number.isFinite(date.getTime()))
265
+ return trimmed;
266
+ return surface === "web" ? date.toISOString().slice(0, 10) : date.toISOString();
267
+ }
268
+ function isEnrichmentPayload(value) {
269
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
270
+ }
271
+ function readEnrichmentValue(payload) {
272
+ for (const key of ENRICHMENT_VALUE_KEYS) {
273
+ if (key in payload)
274
+ return payload[key];
275
+ }
276
+ return undefined;
277
+ }
@@ -51,4 +51,5 @@ export type CoercionResult = {
51
51
  * Used by column retype: every value must coerce or the retype is rejected so
52
52
  * the table is never left half-converted.
53
53
  */
54
- export declare function coerceValueForDataType(value: unknown, dataType: RetypeableDataType): CoercionResult;
54
+ export declare function coerceValueForDataType(// skipcq: JS-0045
55
+ value: unknown, dataType: RetypeableDataType): CoercionResult;
@@ -127,11 +127,12 @@ function isExcelSerialValue(value) {
127
127
  * Used by column retype: every value must coerce or the retype is rejected so
128
128
  * the table is never left half-converted.
129
129
  */
130
- export function coerceValueForDataType(value, dataType) {
130
+ export function coerceValueForDataType(// skipcq: JS-0045
131
+ value, dataType) {
131
132
  if (value === null || value === undefined || value === "") {
132
133
  return { ok: true, value: null };
133
134
  }
134
- switch (dataType) {
135
+ switch (dataType) { // skipcq: JS-0047
135
136
  case "text":
136
137
  return { ok: true, value: typeof value === "string" ? value : String(value) };
137
138
  case "timestamptz": {
@@ -92,7 +92,7 @@ export function normalizeRowsForNewTable(rows) {
92
92
  export function normalizeImportColumnKey(value) {
93
93
  const normalized = value
94
94
  .normalize("NFKD")
95
- .replace(/[\u0300-\u036f]/g, "")
95
+ .replace(/[\u0300-\u036f]/g, "") // skipcq: JS-0117
96
96
  .toLowerCase()
97
97
  .replace(/[^a-z0-9]+/g, "_")
98
98
  .replace(/^_+|_+$/g, "")
@@ -1,8 +1,10 @@
1
1
  export { OXYGEN_VERSION } from "./version.js";
2
2
  export * from "./billing.js";
3
+ export * from "./cell-format.js";
3
4
  export * from "./column-types.js";
4
5
  export * from "./credit-guidance.js";
5
6
  export * from "./log.js";
7
+ export * from "./provider-request-outcomes.js";
6
8
  export * from "./telemetry.js";
7
9
  export type JsonValue = string | number | boolean | null | JsonValue[] | {
8
10
  [key: string]: JsonValue;
@@ -1,9 +1,11 @@
1
1
  import { OXYGEN_VERSION } from "./version.js";
2
2
  export { OXYGEN_VERSION } from "./version.js";
3
3
  export * from "./billing.js";
4
+ export * from "./cell-format.js";
4
5
  export * from "./column-types.js";
5
6
  export * from "./credit-guidance.js";
6
7
  export * from "./log.js";
8
+ export * from "./provider-request-outcomes.js";
7
9
  export * from "./telemetry.js";
8
10
  export class OxygenError extends Error {
9
11
  code;
@@ -41,7 +41,7 @@ function hashErrorKey(input) {
41
41
  let h1 = 0x811c9dc5 >>> 0;
42
42
  let h2 = 0xcbf29ce4 >>> 0;
43
43
  for (let i = 0; i < input.length; i++) {
44
- const c = input.charCodeAt(i);
44
+ const c = input.charCodeAt(i); // skipcq: JS-C1002
45
45
  h1 = Math.imul(h1 ^ c, 16777619) >>> 0;
46
46
  h2 = Math.imul(h2 ^ c, 1099511628211 & 0xffffffff) >>> 0;
47
47
  }
@@ -0,0 +1,3 @@
1
+ export declare const PROVIDER_REQUEST_OUTCOMES: readonly ["success", "error", "blocked"];
2
+ export type ProviderRequestOutcome = (typeof PROVIDER_REQUEST_OUTCOMES)[number];
3
+ export declare function isProviderRequestOutcome(value: unknown): value is ProviderRequestOutcome;
@@ -0,0 +1,5 @@
1
+ export const PROVIDER_REQUEST_OUTCOMES = ["success", "error", "blocked"];
2
+ const PROVIDER_REQUEST_OUTCOME_SET = new Set(PROVIDER_REQUEST_OUTCOMES);
3
+ export function isProviderRequestOutcome(value) {
4
+ return typeof value === "string" && PROVIDER_REQUEST_OUTCOME_SET.has(value);
5
+ }
@@ -1 +1 @@
1
- export declare const OXYGEN_VERSION = "1.46.0";
1
+ export declare const OXYGEN_VERSION = "1.64.5";
@@ -1 +1 @@
1
- export const OXYGEN_VERSION = "1.46.0";
1
+ export const OXYGEN_VERSION = "1.64.5";
@@ -223,8 +223,10 @@ export declare function buildRecipeManifest(input: {
223
223
  sourceHash?: string;
224
224
  createdAt?: Date;
225
225
  }): RecipeManifest;
226
- export declare function lintWorkflowManifest(value: unknown, options?: WorkflowManifestValidationOptions): WorkflowLintResult;
227
- export declare function lintRecipeManifest(value: unknown, options?: WorkflowManifestValidationOptions): WorkflowLintResult;
226
+ export declare function lintWorkflowManifest(// skipcq: JS-R1005
227
+ value: unknown, options?: WorkflowManifestValidationOptions): WorkflowLintResult;
228
+ export declare function lintRecipeManifest(// skipcq: JS-R1005
229
+ value: unknown, options?: WorkflowManifestValidationOptions): WorkflowLintResult;
228
230
  export declare function assertRecipeManifest(value: unknown, options?: WorkflowManifestValidationOptions): asserts value is RecipeManifest;
229
231
  export declare function assertWorkflowManifest(value: unknown, options?: WorkflowManifestValidationOptions): asserts value is WorkflowManifest;
230
232
  export declare function validateJsonSchemaValue(value: unknown, schema: JsonSchema | undefined, path?: string): JsonSchemaValidationIssue[];
@@ -236,6 +238,147 @@ export declare function runPureWorkflowFunction(input: {
236
238
  timeoutMs?: number;
237
239
  maxOutputBytes?: number;
238
240
  }): Promise<unknown>;
241
+ export declare const workflowApplySchema: {
242
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
243
+ readonly title: "OXYGEN Workflow Apply Input";
244
+ readonly type: "object";
245
+ readonly additionalProperties: false;
246
+ readonly properties: {
247
+ readonly manifest: {
248
+ readonly $ref: "#/$defs/manifest";
249
+ };
250
+ };
251
+ readonly required: readonly ["manifest"];
252
+ readonly $defs: {
253
+ readonly manifest: {
254
+ readonly type: "object";
255
+ readonly additionalProperties: true;
256
+ };
257
+ };
258
+ };
259
+ export declare const workflowCallSchema: {
260
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
261
+ readonly title: "OXYGEN Workflow Call Input";
262
+ readonly type: "object";
263
+ readonly additionalProperties: false;
264
+ readonly properties: {
265
+ readonly workflow_id: {
266
+ readonly type: "string";
267
+ };
268
+ readonly workflow_name: {
269
+ readonly type: "string";
270
+ };
271
+ readonly input: {
272
+ readonly type: "object";
273
+ readonly additionalProperties: true;
274
+ };
275
+ readonly mode: {
276
+ readonly enum: readonly ["dry_run", "live", "smoke_test"];
277
+ };
278
+ readonly idempotency_key: {
279
+ readonly type: "string";
280
+ };
281
+ };
282
+ };
283
+ export declare const workflowEventEmitSchema: {
284
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
285
+ readonly title: "OXYGEN Workflow Event Emit Input";
286
+ readonly type: "object";
287
+ readonly additionalProperties: false;
288
+ readonly properties: {
289
+ readonly source: {
290
+ readonly type: "string";
291
+ };
292
+ readonly event: {
293
+ readonly type: "string";
294
+ };
295
+ readonly payload: {
296
+ readonly type: "object";
297
+ readonly additionalProperties: true;
298
+ };
299
+ readonly raw_payload: {
300
+ readonly type: "object";
301
+ readonly additionalProperties: true;
302
+ };
303
+ readonly headers: {
304
+ readonly type: "object";
305
+ readonly additionalProperties: true;
306
+ };
307
+ readonly external_event_id: {
308
+ readonly type: "string";
309
+ };
310
+ readonly idempotency_key: {
311
+ readonly type: "string";
312
+ };
313
+ readonly mode: {
314
+ readonly enum: readonly ["dry_run", "live", "smoke_test"];
315
+ };
316
+ };
317
+ readonly required: readonly ["source", "event", "payload"];
318
+ };
319
+ export declare const workflowTriggerSchema: {
320
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
321
+ readonly title: "OXYGEN Workflow Trigger";
322
+ readonly type: "object";
323
+ readonly additionalProperties: false;
324
+ readonly properties: {
325
+ readonly type: {
326
+ readonly enum: readonly ["api", "webhook", "cron"];
327
+ };
328
+ readonly trigger_id: {
329
+ readonly type: "string";
330
+ };
331
+ readonly trigger_name: {
332
+ readonly type: readonly ["string", "null"];
333
+ };
334
+ readonly secret_required: {
335
+ readonly type: "boolean";
336
+ };
337
+ readonly idempotency_key_path: {
338
+ readonly type: readonly ["string", "null"];
339
+ };
340
+ readonly cron: {
341
+ readonly type: "string";
342
+ };
343
+ readonly timezone: {
344
+ readonly type: readonly ["string", "null"];
345
+ };
346
+ readonly source: {
347
+ readonly type: "string";
348
+ };
349
+ readonly event: {
350
+ readonly type: "string";
351
+ };
352
+ readonly filters: {
353
+ readonly type: "array";
354
+ readonly items: {
355
+ readonly type: "object";
356
+ readonly additionalProperties: false;
357
+ readonly properties: {
358
+ readonly path: {
359
+ readonly type: "string";
360
+ };
361
+ readonly op: {
362
+ readonly enum: readonly ["eq", "neq", "exists", "not_exists"];
363
+ };
364
+ readonly value: {};
365
+ };
366
+ readonly required: readonly ["path", "op"];
367
+ };
368
+ };
369
+ readonly status: {
370
+ readonly enum: readonly ["active", "disabled"];
371
+ };
372
+ };
373
+ readonly required: readonly ["type"];
374
+ };
375
+ export declare const workflowManifestSchema: {
376
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
377
+ readonly title: "OXYGEN Workflow Manifest";
378
+ readonly type: "object";
379
+ readonly additionalProperties: true;
380
+ readonly required: readonly ["manifest_version", "workflow", "steps", "source_hash", "compiler_version"];
381
+ };
239
382
  export declare function getWorkflowApplySchema(): {
240
383
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
241
384
  readonly title: "OXYGEN Workflow Apply Input";
@@ -535,145 +678,4 @@ export declare function getWorkflowSchema(subject?: "apply" | "call" | "event" |
535
678
  };
536
679
  };
537
680
  };
538
- export declare const workflowApplySchema: {
539
- readonly $schema: "https://json-schema.org/draft/2020-12/schema";
540
- readonly title: "OXYGEN Workflow Apply Input";
541
- readonly type: "object";
542
- readonly additionalProperties: false;
543
- readonly properties: {
544
- readonly manifest: {
545
- readonly $ref: "#/$defs/manifest";
546
- };
547
- };
548
- readonly required: readonly ["manifest"];
549
- readonly $defs: {
550
- readonly manifest: {
551
- readonly type: "object";
552
- readonly additionalProperties: true;
553
- };
554
- };
555
- };
556
- export declare const workflowCallSchema: {
557
- readonly $schema: "https://json-schema.org/draft/2020-12/schema";
558
- readonly title: "OXYGEN Workflow Call Input";
559
- readonly type: "object";
560
- readonly additionalProperties: false;
561
- readonly properties: {
562
- readonly workflow_id: {
563
- readonly type: "string";
564
- };
565
- readonly workflow_name: {
566
- readonly type: "string";
567
- };
568
- readonly input: {
569
- readonly type: "object";
570
- readonly additionalProperties: true;
571
- };
572
- readonly mode: {
573
- readonly enum: readonly ["dry_run", "live", "smoke_test"];
574
- };
575
- readonly idempotency_key: {
576
- readonly type: "string";
577
- };
578
- };
579
- };
580
- export declare const workflowEventEmitSchema: {
581
- readonly $schema: "https://json-schema.org/draft/2020-12/schema";
582
- readonly title: "OXYGEN Workflow Event Emit Input";
583
- readonly type: "object";
584
- readonly additionalProperties: false;
585
- readonly properties: {
586
- readonly source: {
587
- readonly type: "string";
588
- };
589
- readonly event: {
590
- readonly type: "string";
591
- };
592
- readonly payload: {
593
- readonly type: "object";
594
- readonly additionalProperties: true;
595
- };
596
- readonly raw_payload: {
597
- readonly type: "object";
598
- readonly additionalProperties: true;
599
- };
600
- readonly headers: {
601
- readonly type: "object";
602
- readonly additionalProperties: true;
603
- };
604
- readonly external_event_id: {
605
- readonly type: "string";
606
- };
607
- readonly idempotency_key: {
608
- readonly type: "string";
609
- };
610
- readonly mode: {
611
- readonly enum: readonly ["dry_run", "live", "smoke_test"];
612
- };
613
- };
614
- readonly required: readonly ["source", "event", "payload"];
615
- };
616
- export declare const workflowTriggerSchema: {
617
- readonly $schema: "https://json-schema.org/draft/2020-12/schema";
618
- readonly title: "OXYGEN Workflow Trigger";
619
- readonly type: "object";
620
- readonly additionalProperties: false;
621
- readonly properties: {
622
- readonly type: {
623
- readonly enum: readonly ["api", "webhook", "cron"];
624
- };
625
- readonly trigger_id: {
626
- readonly type: "string";
627
- };
628
- readonly trigger_name: {
629
- readonly type: readonly ["string", "null"];
630
- };
631
- readonly secret_required: {
632
- readonly type: "boolean";
633
- };
634
- readonly idempotency_key_path: {
635
- readonly type: readonly ["string", "null"];
636
- };
637
- readonly cron: {
638
- readonly type: "string";
639
- };
640
- readonly timezone: {
641
- readonly type: readonly ["string", "null"];
642
- };
643
- readonly source: {
644
- readonly type: "string";
645
- };
646
- readonly event: {
647
- readonly type: "string";
648
- };
649
- readonly filters: {
650
- readonly type: "array";
651
- readonly items: {
652
- readonly type: "object";
653
- readonly additionalProperties: false;
654
- readonly properties: {
655
- readonly path: {
656
- readonly type: "string";
657
- };
658
- readonly op: {
659
- readonly enum: readonly ["eq", "neq", "exists", "not_exists"];
660
- };
661
- readonly value: {};
662
- };
663
- readonly required: readonly ["path", "op"];
664
- };
665
- };
666
- readonly status: {
667
- readonly enum: readonly ["active", "disabled"];
668
- };
669
- };
670
- readonly required: readonly ["type"];
671
- };
672
- export declare const workflowManifestSchema: {
673
- readonly $schema: "https://json-schema.org/draft/2020-12/schema";
674
- readonly title: "OXYGEN Workflow Manifest";
675
- readonly type: "object";
676
- readonly additionalProperties: true;
677
- readonly required: readonly ["manifest_version", "workflow", "steps", "source_hash", "compiler_version"];
678
- };
679
681
  export {};