@independo/inderun-contracts 0.2.0-dev.14 → 0.2.0-dev.16

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.
@@ -1,5 +1,7 @@
1
1
  /**
2
- * Normalized Milestone-1 error contract.
2
+ * The error shape thrown by run() (wrapped in an IndeRunException) when execution fails —
3
+ * via validation, routing (no eligible provider), or every attempted provider failing.
4
+ * Never returned as part of a successful TaskResult.
3
5
  */
4
6
  export type IndeRunError = {
5
7
  /**
@@ -9,7 +11,11 @@ export type IndeRunError = {
9
11
  [key: string]: unknown;
10
12
  };
11
13
  /**
12
- * Normalized error taxonomy class.
14
+ * Normalized error taxonomy, shared with TaskResult.telemetry.errorClass:
15
+ * CapabilityMismatch (request needs something no eligible provider supports),
16
+ * Offline/Unavailable (provider unreachable or not ready), AuthError (credential/auth
17
+ * failure), RateLimited (provider throttled the request), Timeout (provider exceeded its
18
+ * execution budget), Internal (unexpected engine-side failure).
13
19
  */
14
20
  errorClass: ErrorClass;
15
21
  /**
@@ -39,7 +45,11 @@ export type IndeRunError = {
39
45
  [property: string]: unknown;
40
46
  };
41
47
  /**
42
- * Normalized error taxonomy class.
48
+ * Normalized error taxonomy, shared with TaskResult.telemetry.errorClass:
49
+ * CapabilityMismatch (request needs something no eligible provider supports),
50
+ * Offline/Unavailable (provider unreachable or not ready), AuthError (credential/auth
51
+ * failure), RateLimited (provider throttled the request), Timeout (provider exceeded its
52
+ * execution budget), Internal (unexpected engine-side failure).
43
53
  */
44
54
  export type ErrorClass = "CapabilityMismatch" | "Offline" | "AuthError" | "RateLimited" | "Timeout" | "Unavailable" | "Internal";
45
55
  //# sourceMappingURL=inderun-error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inderun-error.d.ts","sourceRoot":"","sources":["../../src/generated/inderun-error.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACrC;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,oBAAoB,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC"}
1
+ {"version":3,"file":"inderun-error.d.ts","sourceRoot":"","sources":["../../src/generated/inderun-error.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACrC;;;;;;OAMG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,oBAAoB,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC"}
@@ -2,7 +2,7 @@ export declare const taskRequestSchema: {
2
2
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
3
3
  readonly $id: "https://schemas.inderun.dev/1.0/task-request.schema.json";
4
4
  readonly title: "TaskRequest";
5
- readonly description: "The standard request payload for initiating a text-to-text execution task within the IndeRun framework.";
5
+ readonly description: "The request payload for a Mode 1 (request/response) text-to-text execution. At least one of `prompt` (single-turn) or `messages` (multi-turn) must be present — both may be present together, though callers should typically supply just one; `constraints`/`preferences` steer routing but never select a provider directly.";
6
6
  readonly type: "object";
7
7
  readonly additionalProperties: true;
8
8
  readonly required: readonly ["schemaVersion", "task"];
@@ -159,7 +159,7 @@ export declare const taskResultSchema: {
159
159
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
160
160
  readonly $id: "https://schemas.inderun.dev/1.0/task-result.schema.json";
161
161
  readonly title: "TaskResult";
162
- readonly description: "The standard response payload for completed text-to-text execution within the IndeRun framework.";
162
+ readonly description: "The response payload for a completed text-to-text execution. A full execution failure (validation, routing, or every attempted provider failing) is surfaced by run() throwing an IndeRunError instead of returning a TaskResult; finishReason and telemetry.errorClass are reserved for a provider reporting a non-fatal, degraded outcome on an otherwise-successful result (not currently produced by any provider in this codebase).";
163
163
  readonly type: "object";
164
164
  readonly additionalProperties: true;
165
165
  readonly required: readonly ["schemaVersion", "runId", "output", "finishReason", "telemetry"];
@@ -190,7 +190,7 @@ export declare const taskResultSchema: {
190
190
  };
191
191
  };
192
192
  readonly finishReason: {
193
- readonly description: "Standardized reason describing how generation concluded (e.g., 'stop', 'length', 'cancelled', or 'error').";
193
+ readonly description: "How generation ended: 'stop' (natural end), 'length' (hit maxOutputTokens), or 'cancelled'. 'error' is reserved for a provider reporting a non-fatal issue on an otherwise-returned result — no provider in this codebase currently produces it, since a full execution failure is instead surfaced by run() throwing an IndeRunError.";
194
194
  readonly enum: readonly ["stop", "length", "cancelled", "error"];
195
195
  };
196
196
  readonly usage: {
@@ -232,7 +232,7 @@ export declare const taskResultSchema: {
232
232
  readonly minimum: 0;
233
233
  };
234
234
  readonly errorClass: {
235
- readonly description: "Included if the request resulted in a provider-level error (e.g., 'CapabilityMismatch' or 'Unavailable').";
235
+ readonly description: "Present only if a provider reports a degraded outcome on an otherwise-successful result; no provider in this codebase currently sets this. Distinct from run() throwing — a thrown IndeRunError never produces a TaskResult at all.";
236
236
  readonly enum: readonly ["CapabilityMismatch", "Offline", "AuthError", "RateLimited", "Timeout", "Unavailable", "Internal"];
237
237
  };
238
238
  };
@@ -243,7 +243,7 @@ export declare const inderunErrorSchema: {
243
243
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
244
244
  readonly $id: "https://schemas.inderun.dev/1.0/inderun-error.schema.json";
245
245
  readonly title: "IndeRunError";
246
- readonly description: "Normalized Milestone-1 error contract.";
246
+ readonly description: "The error shape thrown by run() (wrapped in an IndeRunException) when execution fails — via validation, routing (no eligible provider), or every attempted provider failing. Never returned as part of a successful TaskResult.";
247
247
  readonly type: "object";
248
248
  readonly additionalProperties: true;
249
249
  readonly required: readonly ["schemaVersion", "errorClass", "message"];
@@ -253,7 +253,7 @@ export declare const inderunErrorSchema: {
253
253
  readonly const: "1.0";
254
254
  };
255
255
  readonly errorClass: {
256
- readonly description: "Normalized error taxonomy class.";
256
+ readonly description: "Normalized error taxonomy, shared with TaskResult.telemetry.errorClass: CapabilityMismatch (request needs something no eligible provider supports), Offline/Unavailable (provider unreachable or not ready), AuthError (credential/auth failure), RateLimited (provider throttled the request), Timeout (provider exceeded its execution budget), Internal (unexpected engine-side failure).";
257
257
  readonly enum: readonly ["CapabilityMismatch", "Offline", "AuthError", "RateLimited", "Timeout", "Unavailable", "Internal"];
258
258
  };
259
259
  readonly message: {
@@ -3,7 +3,7 @@ export const taskRequestSchema = {
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "$id": "https://schemas.inderun.dev/1.0/task-request.schema.json",
5
5
  "title": "TaskRequest",
6
- "description": "The standard request payload for initiating a text-to-text execution task within the IndeRun framework.",
6
+ "description": "The request payload for a Mode 1 (request/response) text-to-text execution. At least one of `prompt` (single-turn) or `messages` (multi-turn) must be present — both may be present together, though callers should typically supply just one; `constraints`/`preferences` steer routing but never select a provider directly.",
7
7
  "type": "object",
8
8
  "additionalProperties": true,
9
9
  "required": [
@@ -197,7 +197,7 @@ export const taskResultSchema = {
197
197
  "$schema": "https://json-schema.org/draft/2020-12/schema",
198
198
  "$id": "https://schemas.inderun.dev/1.0/task-result.schema.json",
199
199
  "title": "TaskResult",
200
- "description": "The standard response payload for completed text-to-text execution within the IndeRun framework.",
200
+ "description": "The response payload for a completed text-to-text execution. A full execution failure (validation, routing, or every attempted provider failing) is surfaced by run() throwing an IndeRunError instead of returning a TaskResult; finishReason and telemetry.errorClass are reserved for a provider reporting a non-fatal, degraded outcome on an otherwise-successful result (not currently produced by any provider in this codebase).",
201
201
  "type": "object",
202
202
  "additionalProperties": true,
203
203
  "required": [
@@ -237,7 +237,7 @@ export const taskResultSchema = {
237
237
  }
238
238
  },
239
239
  "finishReason": {
240
- "description": "Standardized reason describing how generation concluded (e.g., 'stop', 'length', 'cancelled', or 'error').",
240
+ "description": "How generation ended: 'stop' (natural end), 'length' (hit maxOutputTokens), or 'cancelled'. 'error' is reserved for a provider reporting a non-fatal issue on an otherwise-returned result — no provider in this codebase currently produces it, since a full execution failure is instead surfaced by run() throwing an IndeRunError.",
241
241
  "enum": [
242
242
  "stop",
243
243
  "length",
@@ -287,7 +287,7 @@ export const taskResultSchema = {
287
287
  "minimum": 0
288
288
  },
289
289
  "errorClass": {
290
- "description": "Included if the request resulted in a provider-level error (e.g., 'CapabilityMismatch' or 'Unavailable').",
290
+ "description": "Present only if a provider reports a degraded outcome on an otherwise-successful result; no provider in this codebase currently sets this. Distinct from run() throwing — a thrown IndeRunError never produces a TaskResult at all.",
291
291
  "enum": [
292
292
  "CapabilityMismatch",
293
293
  "Offline",
@@ -306,7 +306,7 @@ export const inderunErrorSchema = {
306
306
  "$schema": "https://json-schema.org/draft/2020-12/schema",
307
307
  "$id": "https://schemas.inderun.dev/1.0/inderun-error.schema.json",
308
308
  "title": "IndeRunError",
309
- "description": "Normalized Milestone-1 error contract.",
309
+ "description": "The error shape thrown by run() (wrapped in an IndeRunException) when execution fails — via validation, routing (no eligible provider), or every attempted provider failing. Never returned as part of a successful TaskResult.",
310
310
  "type": "object",
311
311
  "additionalProperties": true,
312
312
  "required": [
@@ -320,7 +320,7 @@ export const inderunErrorSchema = {
320
320
  "const": "1.0"
321
321
  },
322
322
  "errorClass": {
323
- "description": "Normalized error taxonomy class.",
323
+ "description": "Normalized error taxonomy, shared with TaskResult.telemetry.errorClass: CapabilityMismatch (request needs something no eligible provider supports), Offline/Unavailable (provider unreachable or not ready), AuthError (credential/auth failure), RateLimited (provider throttled the request), Timeout (provider exceeded its execution budget), Internal (unexpected engine-side failure).",
324
324
  "enum": [
325
325
  "CapabilityMismatch",
326
326
  "Offline",
@@ -1,6 +1,8 @@
1
1
  /**
2
- * The standard request payload for initiating a text-to-text execution task within the
3
- * IndeRun framework.
2
+ * The request payload for a Mode 1 (request/response) text-to-text execution. At least one
3
+ * of `prompt` (single-turn) or `messages` (multi-turn) must be present — both may be
4
+ * present together, though callers should typically supply just one;
5
+ * `constraints`/`preferences` steer routing but never select a provider directly.
4
6
  */
5
7
  export type TaskRequest = {
6
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"task-request.d.ts","sourceRoot":"","sources":["../../src/generated/task-request.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,C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AAG;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtE;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG;IACf;;;OAGG;IACH,IAAI,EAAE,cAAc,CAAC;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACjC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC"}
@@ -1,11 +1,16 @@
1
1
  /**
2
- * The standard response payload for completed text-to-text execution within the IndeRun
3
- * framework.
2
+ * The response payload for a completed text-to-text execution. A full execution failure
3
+ * (validation, routing, or every attempted provider failing) is surfaced by run() throwing
4
+ * an IndeRunError instead of returning a TaskResult; finishReason and telemetry.errorClass
5
+ * are reserved for a provider reporting a non-fatal, degraded outcome on an
6
+ * otherwise-successful result (not currently produced by any provider in this codebase).
4
7
  */
5
8
  export type TaskResult = {
6
9
  /**
7
- * Standardized reason describing how generation concluded (e.g., 'stop', 'length',
8
- * 'cancelled', or 'error').
10
+ * How generation ended: 'stop' (natural end), 'length' (hit maxOutputTokens), or
11
+ * 'cancelled'. 'error' is reserved for a provider reporting a non-fatal issue on an
12
+ * otherwise-returned result — no provider in this codebase currently produces it, since a
13
+ * full execution failure is instead surfaced by run() throwing an IndeRunError.
9
14
  */
10
15
  finishReason: FinishReason;
11
16
  /**
@@ -31,8 +36,10 @@ export type TaskResult = {
31
36
  [property: string]: unknown;
32
37
  };
33
38
  /**
34
- * Standardized reason describing how generation concluded (e.g., 'stop', 'length',
35
- * 'cancelled', or 'error').
39
+ * How generation ended: 'stop' (natural end), 'length' (hit maxOutputTokens), or
40
+ * 'cancelled'. 'error' is reserved for a provider reporting a non-fatal issue on an
41
+ * otherwise-returned result — no provider in this codebase currently produces it, since a
42
+ * full execution failure is instead surfaced by run() throwing an IndeRunError.
36
43
  */
37
44
  export type FinishReason = "stop" | "length" | "cancelled" | "error";
38
45
  /**
@@ -54,8 +61,9 @@ export type Output = {
54
61
  */
55
62
  export type Telemetry = {
56
63
  /**
57
- * Included if the request resulted in a provider-level error (e.g., 'CapabilityMismatch' or
58
- * 'Unavailable').
64
+ * Present only if a provider reports a degraded outcome on an otherwise-successful result;
65
+ * no provider in this codebase currently sets this. Distinct from run() throwing — a thrown
66
+ * IndeRunError never produces a TaskResult at all.
59
67
  */
60
68
  errorClass?: ErrorClass;
61
69
  /**
@@ -71,8 +79,9 @@ export type Telemetry = {
71
79
  [property: string]: unknown;
72
80
  };
73
81
  /**
74
- * Included if the request resulted in a provider-level error (e.g., 'CapabilityMismatch' or
75
- * 'Unavailable').
82
+ * Present only if a provider reports a degraded outcome on an otherwise-successful result;
83
+ * no provider in this codebase currently sets this. Distinct from run() throwing — a thrown
84
+ * IndeRunError never produces a TaskResult at all.
76
85
  */
77
86
  export type ErrorClass = "CapabilityMismatch" | "Offline" | "AuthError" | "RateLimited" | "Timeout" | "Unavailable" | "Internal";
78
87
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"task-result.d.ts","sourceRoot":"","sources":["../../src/generated/task-result.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB;;;OAGG;IACH,YAAY,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC;IACrB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,oBAAoB,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AAEjI;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA"}
1
+ {"version":3,"file":"task-result.d.ts","sourceRoot":"","sources":["../../src/generated/task-result.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB;;;;;OAKG;IACH,YAAY,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC;IACrB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,oBAAoB,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AAEjI;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@independo/inderun-contracts",
3
- "version": "0.2.0-dev.14",
3
+ "version": "0.2.0-dev.16",
4
4
  "description": "Canonical JSON Schemas, generated TypeScript types, and validators for IndeRun contracts.",
5
5
  "license": "MIT",
6
6
  "author": {