@ericsanchezok/synergy-util 3.0.24 → 3.1.0

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.
Files changed (74) hide show
  1. package/LICENSE.codex +201 -0
  2. package/NOTICE +9 -0
  3. package/dist/activity.d.ts +9 -4
  4. package/dist/activity.js +20 -19
  5. package/dist/asset-reference.d.ts +15 -0
  6. package/dist/asset-reference.js +98 -0
  7. package/dist/atomic-file.d.ts +9 -0
  8. package/dist/atomic-file.js +86 -0
  9. package/dist/attachment-presentation.d.ts +26 -0
  10. package/dist/attachment-presentation.js +11 -0
  11. package/dist/capability.d.ts +1 -1
  12. package/dist/capability.js +5 -19
  13. package/dist/cli-command.d.ts +12 -0
  14. package/dist/cli-command.js +3 -0
  15. package/dist/encode.d.ts +3 -0
  16. package/dist/encode.js +7 -0
  17. package/dist/error.d.ts +36 -56
  18. package/dist/feature-config.d.ts +4 -0
  19. package/dist/feature-config.js +23 -0
  20. package/dist/features.d.ts +134 -0
  21. package/dist/features.js +195 -0
  22. package/dist/file-patch.d.ts +31 -0
  23. package/dist/file-patch.js +218 -0
  24. package/dist/filesystem-identity.d.ts +28 -0
  25. package/dist/filesystem-identity.js +71 -0
  26. package/dist/fn.d.ts +1 -1
  27. package/dist/fs-lock.d.ts +5 -1
  28. package/dist/fs-lock.js +14 -6
  29. package/dist/input-assistance.d.ts +51 -0
  30. package/dist/input-assistance.js +61 -0
  31. package/dist/installed-launcher.d.ts +18 -0
  32. package/dist/installed-launcher.js +39 -0
  33. package/dist/io-retry.d.ts +11 -0
  34. package/dist/io-retry.js +36 -0
  35. package/dist/json-value.d.ts +4 -0
  36. package/dist/json-value.js +12 -0
  37. package/dist/markdown-assets.d.ts +6 -0
  38. package/dist/markdown-assets.js +29 -0
  39. package/dist/markdown-link.d.ts +2 -0
  40. package/dist/markdown-link.js +8 -0
  41. package/dist/native-assets.d.ts +7 -0
  42. package/dist/native-assets.js +28 -0
  43. package/dist/network-error.d.ts +7 -0
  44. package/dist/network-error.js +111 -0
  45. package/dist/plugin-policy.d.ts +1 -1
  46. package/dist/process-group.d.ts +45 -0
  47. package/dist/process-group.js +156 -0
  48. package/dist/process-identity.js +5 -2
  49. package/dist/projection-patch.d.ts +9 -0
  50. package/dist/projection-patch.js +74 -0
  51. package/dist/reasoning-item.d.ts +1 -0
  52. package/dist/reasoning-item.js +16 -0
  53. package/dist/render-artifact.d.ts +352 -0
  54. package/dist/render-artifact.js +115 -0
  55. package/dist/render-ui.d.ts +202 -0
  56. package/dist/render-ui.js +208 -0
  57. package/dist/resource-reference.d.ts +73 -0
  58. package/dist/resource-reference.js +227 -0
  59. package/dist/retry.d.ts +4 -0
  60. package/dist/retry.js +56 -23
  61. package/dist/runtime-startup.d.ts +240 -2
  62. package/dist/runtime-startup.js +108 -9
  63. package/dist/terminal.d.ts +217 -0
  64. package/dist/terminal.js +111 -0
  65. package/dist/tool-display.d.ts +10 -0
  66. package/dist/tool-display.js +22 -1
  67. package/dist/tool-timeout.d.ts +21 -0
  68. package/dist/tool-timeout.js +1 -0
  69. package/dist/tool.d.ts +6 -7
  70. package/dist/workbench-view.d.ts +692 -0
  71. package/dist/workbench-view.js +90 -0
  72. package/dist/worker-plan.d.ts +39 -0
  73. package/dist/worker-plan.js +33 -0
  74. package/package.json +28 -4
@@ -1,8 +1,229 @@
1
1
  import { z } from "zod";
2
+ export interface RuntimeStatusRow {
3
+ label: string;
4
+ value: string;
5
+ kind?: "success" | "warning" | "error" | "pending" | "muted";
6
+ }
2
7
  export declare const RUNTIME_STARTUP_PREFIX = "SYNERGY_STARTUP_V1 ";
3
8
  export declare const RUNTIME_STARTUP_MAX_LINE_LENGTH = 1024;
4
- export declare const RuntimeStartupProgress: z.ZodDiscriminatedUnion<[z.ZodObject<{
9
+ export declare const RuntimeStartupStage: z.ZodEnum<{
10
+ configuration: "configuration";
11
+ "execution-recovery": "execution-recovery";
12
+ extensions: "extensions";
13
+ finalizing: "finalizing";
14
+ initializing: "initializing";
15
+ installation: "installation";
16
+ migrations: "migrations";
17
+ services: "services";
18
+ storage: "storage";
19
+ "storage-recovery": "storage-recovery";
20
+ transport: "transport";
21
+ }>;
22
+ export type RuntimeStartupStage = z.infer<typeof RuntimeStartupStage>;
23
+ export declare const RuntimeStartupEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
24
+ phase: z.ZodLiteral<"runtime">;
25
+ state: z.ZodLiteral<"opening">;
26
+ stage: z.ZodEnum<{
27
+ configuration: "configuration";
28
+ "execution-recovery": "execution-recovery";
29
+ extensions: "extensions";
30
+ finalizing: "finalizing";
31
+ initializing: "initializing";
32
+ installation: "installation";
33
+ migrations: "migrations";
34
+ services: "services";
35
+ storage: "storage";
36
+ "storage-recovery": "storage-recovery";
37
+ transport: "transport";
38
+ }>;
39
+ current: z.ZodOptional<z.ZodNumber>;
40
+ }, z.core.$strict>, z.ZodObject<{
41
+ phase: z.ZodLiteral<"runtime">;
42
+ state: z.ZodLiteral<"ready">;
43
+ }, z.core.$strict>, z.ZodObject<{
44
+ phase: z.ZodLiteral<"runtime">;
45
+ state: z.ZodLiteral<"failed">;
46
+ }, z.core.$strict>], "state">;
47
+ export type RuntimeStartupEvent = z.infer<typeof RuntimeStartupEvent>;
48
+ export declare const StorageMaintenanceOperation: z.ZodEnum<{
49
+ checkpoint: "checkpoint";
50
+ "create-index": "create-index";
51
+ "drop-index": "drop-index";
52
+ "integrity-check": "integrity-check";
53
+ prune: "prune";
54
+ reclaim: "reclaim";
55
+ vacuum: "vacuum";
56
+ }>;
57
+ export type StorageMaintenanceOperation = z.infer<typeof StorageMaintenanceOperation>;
58
+ export declare const StorageMaintenanceStage: z.ZodEnum<{
59
+ "checkpoint-after": "checkpoint-after";
60
+ "checkpoint-before": "checkpoint-before";
61
+ rewrite: "rewrite";
62
+ }>;
63
+ export type StorageMaintenanceStage = z.infer<typeof StorageMaintenanceStage>;
64
+ export declare const StorageMaintenanceEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
65
+ phase: z.ZodLiteral<"maintenance">;
66
+ id: z.ZodNumber;
67
+ state: z.ZodLiteral<"started">;
68
+ operation: z.ZodEnum<{
69
+ checkpoint: "checkpoint";
70
+ "create-index": "create-index";
71
+ "drop-index": "drop-index";
72
+ "integrity-check": "integrity-check";
73
+ prune: "prune";
74
+ reclaim: "reclaim";
75
+ vacuum: "vacuum";
76
+ }>;
77
+ timeoutMs: z.ZodNumber;
78
+ }, z.core.$strict>, z.ZodObject<{
79
+ phase: z.ZodLiteral<"maintenance">;
80
+ id: z.ZodNumber;
81
+ state: z.ZodLiteral<"stage">;
82
+ stage: z.ZodEnum<{
83
+ "checkpoint-after": "checkpoint-after";
84
+ "checkpoint-before": "checkpoint-before";
85
+ rewrite: "rewrite";
86
+ }>;
87
+ }, z.core.$strict>, z.ZodObject<{
88
+ phase: z.ZodLiteral<"maintenance">;
89
+ id: z.ZodNumber;
90
+ state: z.ZodEnum<{
91
+ completed: "completed";
92
+ failed: "failed";
93
+ }>;
94
+ elapsedMs: z.ZodNumber;
95
+ }, z.core.$strict>], "state">;
96
+ export type StorageMaintenanceEvent = z.infer<typeof StorageMaintenanceEvent>;
97
+ export declare const StorageStartupProgress: z.ZodObject<{
98
+ stage: z.ZodEnum<{
99
+ activate: "activate";
100
+ "archive-import": "archive-import";
101
+ "archive-verify": "archive-verify";
102
+ artifacts: "artifacts";
103
+ backup: "backup";
104
+ check: "check";
105
+ complete: "complete";
106
+ import: "import";
107
+ inventory: "inventory";
108
+ notifications: "notifications";
109
+ owners: "owners";
110
+ prepare: "prepare";
111
+ quarantine: "quarantine";
112
+ resources: "resources";
113
+ scan: "scan";
114
+ staging: "staging";
115
+ validate: "validate";
116
+ "validate-engine": "validate-engine";
117
+ verify: "verify";
118
+ }>;
119
+ current: z.ZodNumber;
120
+ total: z.ZodNumber;
121
+ bytes: z.ZodNumber;
122
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
123
+ }, z.core.$strip>;
124
+ export type StorageStartupProgress = z.infer<typeof StorageStartupProgress>;
125
+ export declare const MigrationStartupTask: z.ZodEnum<{
126
+ blueprints: "blueprints";
127
+ browser: "browser";
128
+ connections: "connections";
129
+ conversations: "conversations";
130
+ "file-history": "file-history";
131
+ notes: "notes";
132
+ "request-prices": "request-prices";
133
+ "scheduled-work": "scheduled-work";
134
+ scopes: "scopes";
135
+ settings: "settings";
136
+ storage: "storage";
137
+ "tool-history": "tool-history";
138
+ usage: "usage";
139
+ workflows: "workflows";
140
+ workspaces: "workspaces";
141
+ }>;
142
+ export type MigrationStartupTask = z.infer<typeof MigrationStartupTask>;
143
+ export declare const RuntimeStartupProgress: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
144
+ phase: z.ZodLiteral<"runtime">;
145
+ state: z.ZodLiteral<"opening">;
146
+ stage: z.ZodEnum<{
147
+ configuration: "configuration";
148
+ "execution-recovery": "execution-recovery";
149
+ extensions: "extensions";
150
+ finalizing: "finalizing";
151
+ initializing: "initializing";
152
+ installation: "installation";
153
+ migrations: "migrations";
154
+ services: "services";
155
+ storage: "storage";
156
+ "storage-recovery": "storage-recovery";
157
+ transport: "transport";
158
+ }>;
159
+ current: z.ZodOptional<z.ZodNumber>;
160
+ }, z.core.$strict>, z.ZodObject<{
161
+ phase: z.ZodLiteral<"runtime">;
162
+ state: z.ZodLiteral<"ready">;
163
+ }, z.core.$strict>, z.ZodObject<{
164
+ phase: z.ZodLiteral<"runtime">;
165
+ state: z.ZodLiteral<"failed">;
166
+ }, z.core.$strict>], "state">, z.ZodDiscriminatedUnion<[z.ZodObject<{
167
+ phase: z.ZodLiteral<"maintenance">;
168
+ id: z.ZodNumber;
169
+ state: z.ZodLiteral<"started">;
170
+ operation: z.ZodEnum<{
171
+ checkpoint: "checkpoint";
172
+ "create-index": "create-index";
173
+ "drop-index": "drop-index";
174
+ "integrity-check": "integrity-check";
175
+ prune: "prune";
176
+ reclaim: "reclaim";
177
+ vacuum: "vacuum";
178
+ }>;
179
+ timeoutMs: z.ZodNumber;
180
+ }, z.core.$strict>, z.ZodObject<{
181
+ phase: z.ZodLiteral<"maintenance">;
182
+ id: z.ZodNumber;
183
+ state: z.ZodLiteral<"stage">;
184
+ stage: z.ZodEnum<{
185
+ "checkpoint-after": "checkpoint-after";
186
+ "checkpoint-before": "checkpoint-before";
187
+ rewrite: "rewrite";
188
+ }>;
189
+ }, z.core.$strict>, z.ZodObject<{
190
+ phase: z.ZodLiteral<"maintenance">;
191
+ id: z.ZodNumber;
192
+ state: z.ZodEnum<{
193
+ completed: "completed";
194
+ failed: "failed";
195
+ }>;
196
+ elapsedMs: z.ZodNumber;
197
+ }, z.core.$strict>], "state">, z.ZodDiscriminatedUnion<[z.ZodObject<{
5
198
  phase: z.ZodLiteral<"starting">;
199
+ }, z.core.$strict>, z.ZodObject<{
200
+ stage: z.ZodEnum<{
201
+ activate: "activate";
202
+ "archive-import": "archive-import";
203
+ "archive-verify": "archive-verify";
204
+ artifacts: "artifacts";
205
+ backup: "backup";
206
+ check: "check";
207
+ complete: "complete";
208
+ import: "import";
209
+ inventory: "inventory";
210
+ notifications: "notifications";
211
+ owners: "owners";
212
+ prepare: "prepare";
213
+ quarantine: "quarantine";
214
+ resources: "resources";
215
+ scan: "scan";
216
+ staging: "staging";
217
+ validate: "validate";
218
+ "validate-engine": "validate-engine";
219
+ verify: "verify";
220
+ }>;
221
+ current: z.ZodNumber;
222
+ total: z.ZodNumber;
223
+ bytes: z.ZodNumber;
224
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
225
+ phase: z.ZodLiteral<"storage">;
226
+ step: z.ZodNumber;
6
227
  }, z.core.$strict>, z.ZodObject<{
7
228
  phase: z.ZodLiteral<"recovery">;
8
229
  current: z.ZodNumber;
@@ -11,6 +232,23 @@ export declare const RuntimeStartupProgress: z.ZodDiscriminatedUnion<[z.ZodObjec
11
232
  step: z.ZodNumber;
12
233
  current: z.ZodNumber;
13
234
  total: z.ZodNumber;
14
- }, z.core.$strict>], "phase">;
235
+ task: z.ZodOptional<z.ZodEnum<{
236
+ blueprints: "blueprints";
237
+ browser: "browser";
238
+ connections: "connections";
239
+ conversations: "conversations";
240
+ "file-history": "file-history";
241
+ notes: "notes";
242
+ "request-prices": "request-prices";
243
+ "scheduled-work": "scheduled-work";
244
+ scopes: "scopes";
245
+ settings: "settings";
246
+ storage: "storage";
247
+ "tool-history": "tool-history";
248
+ usage: "usage";
249
+ workflows: "workflows";
250
+ workspaces: "workspaces";
251
+ }>>;
252
+ }, z.core.$strict>], "phase">]>;
15
253
  export type RuntimeStartupProgress = z.infer<typeof RuntimeStartupProgress>;
16
254
  export declare function runtimeStartupLine(progress: RuntimeStartupProgress): string;
@@ -2,18 +2,117 @@ import { z } from "zod";
2
2
  export const RUNTIME_STARTUP_PREFIX = "SYNERGY_STARTUP_V1 ";
3
3
  export const RUNTIME_STARTUP_MAX_LINE_LENGTH = 1024;
4
4
  const count = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
5
- export const RuntimeStartupProgress = z.discriminatedUnion("phase", [
6
- z.object({ phase: z.literal("starting") }).strict(),
7
- z.object({ phase: z.literal("recovery"), current: count }).strict(),
5
+ const timeout = z.number().int().positive().max(2_147_483_647);
6
+ export const RuntimeStartupStage = z.enum([
7
+ "installation",
8
+ "initializing",
9
+ "storage",
10
+ "migrations",
11
+ "storage-recovery",
12
+ "configuration",
13
+ "execution-recovery",
14
+ "extensions",
15
+ "transport",
16
+ "services",
17
+ "finalizing",
18
+ ]);
19
+ export const RuntimeStartupEvent = z.discriminatedUnion("state", [
8
20
  z
9
21
  .object({
10
- phase: z.literal("migration"),
11
- step: count.positive(),
12
- current: count,
13
- total: count,
22
+ phase: z.literal("runtime"),
23
+ state: z.literal("opening"),
24
+ stage: RuntimeStartupStage,
25
+ current: count.optional(),
14
26
  })
15
- .strict()
16
- .refine((value) => value.current <= value.total),
27
+ .strict(),
28
+ z.object({ phase: z.literal("runtime"), state: z.literal("ready") }).strict(),
29
+ z.object({ phase: z.literal("runtime"), state: z.literal("failed") }).strict(),
30
+ ]);
31
+ export const StorageMaintenanceOperation = z.enum([
32
+ "checkpoint",
33
+ "vacuum",
34
+ "reclaim",
35
+ "prune",
36
+ "integrity-check",
37
+ "create-index",
38
+ "drop-index",
39
+ ]);
40
+ export const StorageMaintenanceStage = z.enum(["checkpoint-before", "rewrite", "checkpoint-after"]);
41
+ const maintenance = { phase: z.literal("maintenance"), id: count.positive() };
42
+ export const StorageMaintenanceEvent = z.discriminatedUnion("state", [
43
+ z
44
+ .object({ ...maintenance, state: z.literal("started"), operation: StorageMaintenanceOperation, timeoutMs: timeout })
45
+ .strict(),
46
+ z.object({ ...maintenance, state: z.literal("stage"), stage: StorageMaintenanceStage }).strict(),
47
+ z.object({ ...maintenance, state: z.enum(["completed", "failed"]), elapsedMs: count }).strict(),
48
+ ]);
49
+ export const StorageStartupProgress = z.object({
50
+ stage: z.enum([
51
+ "prepare",
52
+ "staging",
53
+ "scan",
54
+ "backup",
55
+ "inventory",
56
+ "owners",
57
+ "import",
58
+ "verify",
59
+ "archive-verify",
60
+ "archive-import",
61
+ "validate-engine",
62
+ "validate",
63
+ "activate",
64
+ "check",
65
+ "artifacts",
66
+ "resources",
67
+ "quarantine",
68
+ "notifications",
69
+ "complete",
70
+ ]),
71
+ current: count,
72
+ total: count,
73
+ bytes: count,
74
+ timeoutMs: z.number().int().positive().max(2_147_483_647).optional(),
75
+ });
76
+ export const MigrationStartupTask = z.enum([
77
+ "scheduled-work",
78
+ "blueprints",
79
+ "browser",
80
+ "connections",
81
+ "settings",
82
+ "notes",
83
+ "conversations",
84
+ "request-prices",
85
+ "file-history",
86
+ "tool-history",
87
+ "usage",
88
+ "workflows",
89
+ "scopes",
90
+ "workspaces",
91
+ "storage",
92
+ ]);
93
+ export const RuntimeStartupProgress = z.union([
94
+ RuntimeStartupEvent,
95
+ StorageMaintenanceEvent,
96
+ z.discriminatedUnion("phase", [
97
+ z.object({ phase: z.literal("starting") }).strict(),
98
+ StorageStartupProgress.extend({ phase: z.literal("storage"), step: count.positive() })
99
+ .strict()
100
+ .refine((value) => value.total === 0 || value.current <= value.total)
101
+ .refine((value) => value.stage === "validate-engine"
102
+ ? value.timeoutMs !== undefined && value.current === 0 && value.total === 0 && value.bytes === 0
103
+ : value.timeoutMs === undefined),
104
+ z.object({ phase: z.literal("recovery"), current: count }).strict(),
105
+ z
106
+ .object({
107
+ phase: z.literal("migration"),
108
+ step: count.positive(),
109
+ current: count,
110
+ total: count,
111
+ task: MigrationStartupTask.optional(),
112
+ })
113
+ .strict()
114
+ .refine((value) => value.total === 0 || value.current <= value.total),
115
+ ]),
17
116
  ]);
18
117
  export function runtimeStartupLine(progress) {
19
118
  return RUNTIME_STARTUP_PREFIX + JSON.stringify(RuntimeStartupProgress.parse(progress)) + "\n";
@@ -0,0 +1,217 @@
1
+ import z from "zod";
2
+ export declare namespace UI {
3
+ const CancelledError: {
4
+ new (data: void, options?: ErrorOptions): {
5
+ cause?: unknown;
6
+ readonly name: "UICancelledError";
7
+ readonly data: void;
8
+ schema(): z.ZodObject<{
9
+ name: z.ZodLiteral<"UICancelledError">;
10
+ data: z.ZodVoid;
11
+ }, z.core.$strip>;
12
+ toObject(): {
13
+ name: "UICancelledError";
14
+ data: void;
15
+ };
16
+ message: string;
17
+ stack?: string;
18
+ };
19
+ isError(error: unknown): error is Error;
20
+ isError(value: unknown): value is Error;
21
+ readonly Schema: z.ZodObject<{
22
+ name: z.ZodLiteral<"UICancelledError">;
23
+ data: z.ZodVoid;
24
+ }, z.core.$strip>;
25
+ isInstance(input: any): input is import("./error.js").NamedErrorInstance<"UICancelledError", z.ZodVoid>;
26
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): {
27
+ new (data: z.input<Data>, options?: ErrorOptions): {
28
+ cause?: unknown;
29
+ readonly name: Name;
30
+ readonly data: z.core.input<Data>;
31
+ schema(): z.ZodObject<{
32
+ name: z.ZodLiteral<Name>;
33
+ data: Data;
34
+ }, z.core.$strip>;
35
+ toObject(): {
36
+ name: Name;
37
+ data: z.core.input<Data>;
38
+ };
39
+ message: string;
40
+ stack?: string;
41
+ };
42
+ isError(error: unknown): error is Error;
43
+ isError(value: unknown): value is Error;
44
+ readonly Schema: z.ZodObject<{
45
+ name: z.ZodLiteral<Name>;
46
+ data: Data;
47
+ }, z.core.$strip>;
48
+ isInstance(input: any): input is import("./error.js").NamedErrorInstance<Name, Data>;
49
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): /*elided*/ any;
50
+ readonly Unknown: {
51
+ new (data: {
52
+ message: string;
53
+ }, options?: ErrorOptions): {
54
+ cause?: unknown;
55
+ readonly name: "UnknownError";
56
+ readonly data: {
57
+ message: string;
58
+ };
59
+ schema(): z.ZodObject<{
60
+ name: z.ZodLiteral<"UnknownError">;
61
+ data: z.ZodObject<{
62
+ message: z.ZodString;
63
+ }, z.core.$strip>;
64
+ }, z.core.$strip>;
65
+ toObject(): {
66
+ name: "UnknownError";
67
+ data: {
68
+ message: string;
69
+ };
70
+ };
71
+ message: string;
72
+ stack?: string;
73
+ };
74
+ isError(error: unknown): error is Error;
75
+ isError(value: unknown): value is Error;
76
+ readonly Schema: z.ZodObject<{
77
+ name: z.ZodLiteral<"UnknownError">;
78
+ data: z.ZodObject<{
79
+ message: z.ZodString;
80
+ }, z.core.$strip>;
81
+ }, z.core.$strip>;
82
+ isInstance(input: any): input is import("./error.js").NamedErrorInstance<"UnknownError", z.ZodObject<{
83
+ message: z.ZodString;
84
+ }, z.core.$strip>>;
85
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): /*elided*/ any;
86
+ readonly Unknown: /*elided*/ any;
87
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
88
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
89
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
90
+ stackTraceLimit: number;
91
+ };
92
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
93
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
94
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
95
+ stackTraceLimit: number;
96
+ };
97
+ readonly Unknown: {
98
+ new (data: {
99
+ message: string;
100
+ }, options?: ErrorOptions): {
101
+ cause?: unknown;
102
+ readonly name: "UnknownError";
103
+ readonly data: {
104
+ message: string;
105
+ };
106
+ schema(): z.ZodObject<{
107
+ name: z.ZodLiteral<"UnknownError">;
108
+ data: z.ZodObject<{
109
+ message: z.ZodString;
110
+ }, z.core.$strip>;
111
+ }, z.core.$strip>;
112
+ toObject(): {
113
+ name: "UnknownError";
114
+ data: {
115
+ message: string;
116
+ };
117
+ };
118
+ message: string;
119
+ stack?: string;
120
+ };
121
+ isError(error: unknown): error is Error;
122
+ isError(value: unknown): value is Error;
123
+ readonly Schema: z.ZodObject<{
124
+ name: z.ZodLiteral<"UnknownError">;
125
+ data: z.ZodObject<{
126
+ message: z.ZodString;
127
+ }, z.core.$strip>;
128
+ }, z.core.$strip>;
129
+ isInstance(input: any): input is import("./error.js").NamedErrorInstance<"UnknownError", z.ZodObject<{
130
+ message: z.ZodString;
131
+ }, z.core.$strip>>;
132
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): {
133
+ new (data: z.input<Data>, options?: ErrorOptions): {
134
+ cause?: unknown;
135
+ readonly name: Name;
136
+ readonly data: z.core.input<Data>;
137
+ schema(): z.ZodObject<{
138
+ name: z.ZodLiteral<Name>;
139
+ data: Data;
140
+ }, z.core.$strip>;
141
+ toObject(): {
142
+ name: Name;
143
+ data: z.core.input<Data>;
144
+ };
145
+ message: string;
146
+ stack?: string;
147
+ };
148
+ isError(error: unknown): error is Error;
149
+ isError(value: unknown): value is Error;
150
+ readonly Schema: z.ZodObject<{
151
+ name: z.ZodLiteral<Name>;
152
+ data: Data;
153
+ }, z.core.$strip>;
154
+ isInstance(input: any): input is import("./error.js").NamedErrorInstance<Name, Data>;
155
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): /*elided*/ any;
156
+ readonly Unknown: /*elided*/ any;
157
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
158
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
159
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
160
+ stackTraceLimit: number;
161
+ };
162
+ readonly Unknown: /*elided*/ any;
163
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
164
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
165
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
166
+ stackTraceLimit: number;
167
+ };
168
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
169
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
170
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
171
+ stackTraceLimit: number;
172
+ };
173
+ const Style: {
174
+ TEXT_HIGHLIGHT: string;
175
+ TEXT_HIGHLIGHT_BOLD: string;
176
+ TEXT_DIM: string;
177
+ TEXT_DIM_BOLD: string;
178
+ TEXT_NORMAL: string;
179
+ TEXT_NORMAL_BOLD: string;
180
+ TEXT_WARNING: string;
181
+ TEXT_WARNING_BOLD: string;
182
+ TEXT_DANGER: string;
183
+ TEXT_DANGER_BOLD: string;
184
+ TEXT_SUCCESS: string;
185
+ TEXT_SUCCESS_BOLD: string;
186
+ TEXT_INFO: string;
187
+ TEXT_INFO_BOLD: string;
188
+ };
189
+ function println(...message: string[]): void;
190
+ function print(...message: string[]): void;
191
+ function empty(): void;
192
+ function input(prompt: string): Promise<string>;
193
+ function error(message: string): void;
194
+ function markdown(text: string): string;
195
+ function progressBar(opts: {
196
+ ratio: number;
197
+ width?: number;
198
+ filledChar?: string;
199
+ emptyChar?: string;
200
+ filledStyle?: string;
201
+ emptyStyle?: string;
202
+ brackets?: boolean;
203
+ }): string;
204
+ interface CardRow {
205
+ label: string;
206
+ value: string;
207
+ valueStyle?: string;
208
+ }
209
+ function card(opts: {
210
+ title: string;
211
+ titleStyle?: string;
212
+ description?: string;
213
+ rows: CardRow[];
214
+ footer?: string;
215
+ minWidth?: number;
216
+ }): string;
217
+ }