@runtypelabs/sdk 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +19 -6
- package/dist/index.d.ts +19 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -62,12 +62,23 @@ interface FlowFallback extends BaseFallback {
|
|
|
62
62
|
/**
|
|
63
63
|
* A single fallback trigger - the condition that activates the fallback chain.
|
|
64
64
|
* `error` (the default) fires fallbacks when the step errors; `empty-output`
|
|
65
|
-
* fires them when the step finished successfully but produced no visible text
|
|
65
|
+
* fires them when the step finished successfully but produced no visible text;
|
|
66
|
+
* `slow` fires them when the model streams continuously but exceeds a total
|
|
67
|
+
* wall-clock duration cap (`afterMs`, in ms) — a slow-but-not-stalled call.
|
|
66
68
|
*/
|
|
67
|
-
type FallbackTriggerType = 'error' | 'empty-output';
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
type FallbackTriggerType = 'error' | 'empty-output' | 'slow';
|
|
70
|
+
/**
|
|
71
|
+
* Discriminated by `type`: the `error` / `empty-output` variants are
|
|
72
|
+
* parameter-less; `slow` carries the total-duration cap (`afterMs`).
|
|
73
|
+
*/
|
|
74
|
+
type FallbackTrigger = {
|
|
75
|
+
type: 'error';
|
|
76
|
+
} | {
|
|
77
|
+
type: 'empty-output';
|
|
78
|
+
} | {
|
|
79
|
+
type: 'slow';
|
|
80
|
+
afterMs: number;
|
|
81
|
+
};
|
|
71
82
|
/**
|
|
72
83
|
* Union of all prompt fallback types
|
|
73
84
|
*/
|
|
@@ -85,7 +96,9 @@ interface PromptErrorHandling {
|
|
|
85
96
|
/**
|
|
86
97
|
* Conditions that activate the fallback chain. Defaults to `[{ type: 'error' }]`
|
|
87
98
|
* when omitted. Add `{ type: 'empty-output' }` to also run the chain when the
|
|
88
|
-
* model finishes successfully but returns no visible text
|
|
99
|
+
* model finishes successfully but returns no visible text, or
|
|
100
|
+
* `{ type: 'slow', afterMs }` to run it when the model exceeds a total
|
|
101
|
+
* wall-clock duration cap while still streaming.
|
|
89
102
|
*/
|
|
90
103
|
triggers?: FallbackTrigger[];
|
|
91
104
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -62,12 +62,23 @@ interface FlowFallback extends BaseFallback {
|
|
|
62
62
|
/**
|
|
63
63
|
* A single fallback trigger - the condition that activates the fallback chain.
|
|
64
64
|
* `error` (the default) fires fallbacks when the step errors; `empty-output`
|
|
65
|
-
* fires them when the step finished successfully but produced no visible text
|
|
65
|
+
* fires them when the step finished successfully but produced no visible text;
|
|
66
|
+
* `slow` fires them when the model streams continuously but exceeds a total
|
|
67
|
+
* wall-clock duration cap (`afterMs`, in ms) — a slow-but-not-stalled call.
|
|
66
68
|
*/
|
|
67
|
-
type FallbackTriggerType = 'error' | 'empty-output';
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
type FallbackTriggerType = 'error' | 'empty-output' | 'slow';
|
|
70
|
+
/**
|
|
71
|
+
* Discriminated by `type`: the `error` / `empty-output` variants are
|
|
72
|
+
* parameter-less; `slow` carries the total-duration cap (`afterMs`).
|
|
73
|
+
*/
|
|
74
|
+
type FallbackTrigger = {
|
|
75
|
+
type: 'error';
|
|
76
|
+
} | {
|
|
77
|
+
type: 'empty-output';
|
|
78
|
+
} | {
|
|
79
|
+
type: 'slow';
|
|
80
|
+
afterMs: number;
|
|
81
|
+
};
|
|
71
82
|
/**
|
|
72
83
|
* Union of all prompt fallback types
|
|
73
84
|
*/
|
|
@@ -85,7 +96,9 @@ interface PromptErrorHandling {
|
|
|
85
96
|
/**
|
|
86
97
|
* Conditions that activate the fallback chain. Defaults to `[{ type: 'error' }]`
|
|
87
98
|
* when omitted. Add `{ type: 'empty-output' }` to also run the chain when the
|
|
88
|
-
* model finishes successfully but returns no visible text
|
|
99
|
+
* model finishes successfully but returns no visible text, or
|
|
100
|
+
* `{ type: 'slow', afterMs }` to run it when the model exceeds a total
|
|
101
|
+
* wall-clock duration cap while still streaming.
|
|
89
102
|
*/
|
|
90
103
|
triggers?: FallbackTrigger[];
|
|
91
104
|
}
|
package/package.json
CHANGED