@oddington/sdk 0.1.42 → 0.1.44
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.
|
@@ -172,11 +172,14 @@ export type RunSummary = {
|
|
|
172
172
|
detailAvailable: boolean;
|
|
173
173
|
}>;
|
|
174
174
|
result?: unknown;
|
|
175
|
-
failure?:
|
|
176
|
-
message: string;
|
|
177
|
-
};
|
|
175
|
+
failure?: RunFailure;
|
|
178
176
|
local?: LocalRunActivity;
|
|
179
177
|
};
|
|
178
|
+
export type RunFailure = {
|
|
179
|
+
message: string;
|
|
180
|
+
} & ({
|
|
181
|
+
code?: never;
|
|
182
|
+
} | import('../../../shared/routine-step-output.js').RoutineStepOutputFailure);
|
|
180
183
|
export type RunHandle = {
|
|
181
184
|
current(): Promise<RunSummary>;
|
|
182
185
|
watch(): AsyncIterable<RunSummary>;
|
|
@@ -36,7 +36,7 @@ export type File = {
|
|
|
36
36
|
sha256: string;
|
|
37
37
|
enrichments: Record<string, FileEnrichment>;
|
|
38
38
|
};
|
|
39
|
-
export type FileErrorCode = 'invalid_input' | 'unsupported_context' | 'unauthenticated' | 'access_denied' | 'request_too_large' | 'conflict' | 'local_only' | 'integrity' | 'unavailable' | 'capacity' | 'method_not_allowed';
|
|
39
|
+
export type FileErrorCode = 'invalid_input' | 'unsupported_context' | 'unauthenticated' | 'access_denied' | 'not_found' | 'request_too_large' | 'conflict' | 'local_only' | 'integrity' | 'unavailable' | 'capacity' | 'method_not_allowed';
|
|
40
40
|
declare const fileValidationReasons: {
|
|
41
41
|
invalid_metadata: string;
|
|
42
42
|
invalid_name: string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const ROUTINE_STEP_SUMMARY_BYTES: number;
|
|
2
|
+
export declare const ROUTINE_STEP_OUTPUT_BYTES: number;
|
|
3
|
+
export type RoutineStepOutputDetail = {
|
|
4
|
+
step: string;
|
|
5
|
+
sizeBytes: number;
|
|
6
|
+
limitBytes: number;
|
|
7
|
+
summaryBytes: number;
|
|
8
|
+
dataBytes: number;
|
|
9
|
+
};
|
|
10
|
+
export type RoutineStepOutputFailure = RoutineStepOutputDetail & {
|
|
11
|
+
code: 'step_output_too_large';
|
|
12
|
+
};
|
|
13
|
+
/** Only OS-measured sizes and a declared step ID may cross the failure boundary. */
|
|
14
|
+
export declare function parseRoutineStepOutputDetail(value: unknown): RoutineStepOutputDetail;
|
|
15
|
+
export declare function routineStepOutputMessage(value: RoutineStepOutputDetail): string;
|
|
16
|
+
/** Never retains the rejected values, even as a cause or ordinary JSON. */
|
|
17
|
+
export declare class RoutineStepOutputError extends Error {
|
|
18
|
+
readonly code = "step_output_too_large";
|
|
19
|
+
readonly detail: RoutineStepOutputDetail;
|
|
20
|
+
constructor(detail: RoutineStepOutputDetail);
|
|
21
|
+
}
|
|
22
|
+
/** Validate both values losslessly before capturing either as retained output.
|
|
23
|
+
* Shared by execution and the trusted transport/read admission boundaries. */
|
|
24
|
+
export declare function captureRoutineStepOutput(step: string, summary: unknown, data: unknown): {
|
|
25
|
+
summary: unknown;
|
|
26
|
+
data: unknown;
|
|
27
|
+
};
|
|
28
|
+
/** Retained historical steps may omit either value. Authored definitions still
|
|
29
|
+
* require both through captureRoutineStepOutput. */
|
|
30
|
+
export declare function captureRetainedStepOutput(step: string, value: {
|
|
31
|
+
summary?: unknown;
|
|
32
|
+
data?: unknown;
|
|
33
|
+
}): {
|
|
34
|
+
summary?: unknown;
|
|
35
|
+
data?: unknown;
|
|
36
|
+
};
|