@phala/cloud 0.6.3 → 0.6.4

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.
@@ -6,7 +6,7 @@ export { resolveLogTimeWindow } from "./log-time";
6
6
  export declare const CVM_LOGS_INFO_API_VERSION = "2026-01-21";
7
7
  export type CvmLogChannel = "serial" | "stdout" | "stderr";
8
8
  export type CvmLogFormat = "text" | "ndjson";
9
- export type LogChannel = "stdout" | "stderr";
9
+ export type LogChannel = "stdout" | "stderr" | "stdin" | "console";
10
10
  export type CvmLogSource = {
11
11
  type: "node";
12
12
  channel: CvmLogChannel;
@@ -35,16 +35,26 @@ export declare class LogAccessError extends ResourceError {
35
35
  readonly suggestions: string[];
36
36
  /** True when the error was parsed from a 200 stream body, not an HTTP status. */
37
37
  readonly fromStreamBody: boolean;
38
+ /** Gateway in-stream error (retried like a network failure). */
39
+ readonly gatewayStream: boolean;
38
40
  constructor(options: {
39
41
  message: string;
40
42
  code?: string;
41
43
  httpStatus?: number;
42
44
  suggestions?: readonly string[];
43
45
  fromStreamBody?: boolean;
46
+ gatewayStream?: boolean;
47
+ requestId?: string;
48
+ details?: ResourceError["structuredDetails"];
49
+ links?: ResourceError["links"];
44
50
  });
45
51
  }
52
+ /** 250 ms doubling to 5 s; the attempt is clamped before the power so it never overflows. */
53
+ export declare function backoffDelayMs(attempt: number): number;
46
54
  /** Get a presigned CVM-level log URL for a given node channel. */
47
- export declare function getCvmLogEndpoint(client: Client, id: CvmIdInput | string, channel: CvmLogChannel): Promise<string>;
55
+ export declare function getCvmLogEndpoint(client: Client, id: CvmIdInput | string, channel: CvmLogChannel, signal?: AbortSignal): Promise<string>;
56
+ /** Idle connections longer than this that end cleanly are not treated as a stopped container. */
57
+ export declare const EMPTY_STREAM_QUIET_MS = 10000;
48
58
  export declare function fetchCvmChannelLogs(client: Client, id: CvmIdInput | string, channel: CvmLogChannel, options?: CvmLogsOptions): Promise<string>;
49
59
  export declare function streamCvmChannelLogs(client: Client, id: CvmIdInput | string, channel: CvmLogChannel, onData: (data: string) => void, options?: CvmLogsOptions, signal?: AbortSignal): Promise<void>;
50
60
  export declare function fetchContainerLogsEntries(client: Client, id: CvmIdInput | string, options?: CvmLogsOptions & {