@ninedeploy/schemas 0.3.4 → 0.5.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.
- package/dist/auth.d.ts +44 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +97 -1
- package/dist/auth.js.map +1 -1
- package/dist/doctor.d.ts +270 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +99 -0
- package/dist/doctor.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/kernel.d.ts +14 -0
- package/dist/kernel.d.ts.map +1 -1
- package/dist/kernel.js +28 -1
- package/dist/kernel.js.map +1 -1
- package/dist/management.d.ts +61 -0
- package/dist/management.d.ts.map +1 -1
- package/dist/management.js +43 -2
- package/dist/management.js.map +1 -1
- package/dist/ninedeployManifest.d.ts.map +1 -1
- package/dist/ninedeployManifest.js +5 -3
- package/dist/ninedeployManifest.js.map +1 -1
- package/dist/secretScan.d.ts.map +1 -1
- package/dist/secretScan.js +29 -16
- package/dist/secretScan.js.map +1 -1
- package/dist/service.d.ts +188 -3
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +95 -4
- package/dist/service.js.map +1 -1
- package/dist/workspaces.d.ts +11 -2
- package/dist/workspaces.d.ts.map +1 -1
- package/dist/workspaces.js +8 -2
- package/dist/workspaces.js.map +1 -1
- package/package.json +1 -1
package/dist/auth.d.ts
CHANGED
|
@@ -56,6 +56,31 @@ export declare const passwordReset: z.ZodObject<{
|
|
|
56
56
|
newPassword: z.ZodString;
|
|
57
57
|
}, z.core.$strip>;
|
|
58
58
|
export type PasswordReset = z.infer<typeof passwordReset>;
|
|
59
|
+
export declare const apiTokenScope: z.ZodUnion<readonly [z.ZodEnum<{
|
|
60
|
+
operator: "operator";
|
|
61
|
+
read: "read";
|
|
62
|
+
write: "write";
|
|
63
|
+
}>, z.ZodString]>;
|
|
64
|
+
export type ApiTokenScope = z.infer<typeof apiTokenScope>;
|
|
65
|
+
/** All known resource names. The auth plugin checks these
|
|
66
|
+
* literally — adding a new resource is a one-line change
|
|
67
|
+
* in the auth plugin's resource map. Listed here so the
|
|
68
|
+
* CLI can suggest completions and the Zod regex can
|
|
69
|
+
* cross-check. */
|
|
70
|
+
export declare const KNOWN_SCOPE_RESOURCES: readonly ['services', 'databases', 'domains', 'deploys', 'alerts', 'webhooks', 'env', 'backups', 'volumes', 'projects', 'users', 'tokens', 'notifications', 'config', 'topology', 'health', 'settings', 'manifests', 'domains_transfer', 'backup_drill', 'images', 'audit', 'firewall', 'sso', 'egress', 'orchestrators', 'housekeeping'];
|
|
71
|
+
export type ScopeResource = (typeof KNOWN_SCOPE_RESOURCES)[number];
|
|
72
|
+
/**
|
|
73
|
+
* Grant or revoke the INSTANCE-operator flag (`PATCH /v1/users/:id/operator`).
|
|
74
|
+
*
|
|
75
|
+
* This is not a workspace role. It gates the operator-only routes and the
|
|
76
|
+
* host-privilege boundary (PM2/compose deploys, lifecycle hooks, docker-socket
|
|
77
|
+
* templates), so it can only be changed by an existing operator, and the last
|
|
78
|
+
* one cannot revoke itself.
|
|
79
|
+
*/
|
|
80
|
+
export declare const operatorGrant: z.ZodObject<{
|
|
81
|
+
isOperator: z.ZodBoolean;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export type OperatorGrant = z.infer<typeof operatorGrant>;
|
|
59
84
|
/** Forgot-password request. Always answers 200 (no user enumeration). */
|
|
60
85
|
export declare const forgotPassword: z.ZodObject<{
|
|
61
86
|
email: z.ZodEmail;
|
|
@@ -111,13 +136,28 @@ export declare const session: z.ZodObject<{
|
|
|
111
136
|
}, z.core.$strip>;
|
|
112
137
|
export type Session = z.infer<typeof session>;
|
|
113
138
|
export declare const createApiToken: z.ZodObject<{
|
|
114
|
-
name: z.ZodOptional<z.ZodString
|
|
115
|
-
|
|
139
|
+
name: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string, string | undefined>>;
|
|
140
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
141
|
+
operator: "operator";
|
|
142
|
+
read: "read";
|
|
143
|
+
write: "write";
|
|
144
|
+
}>, z.ZodString]>>>;
|
|
145
|
+
expiresInDays: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
/** Parsed shape (post-defaults) — what the route handler works with. */
|
|
116
148
|
export type CreateApiToken = z.infer<typeof createApiToken>;
|
|
149
|
+
/**
|
|
150
|
+
* Caller-facing shape: `name` and `scopes` are optional on the wire and filled
|
|
151
|
+
* in by the schema's defaults. The SDK takes this so `tokens.create()` and
|
|
152
|
+
* `tokens.create({ name: 'ci' })` both stay valid.
|
|
153
|
+
*/
|
|
154
|
+
export type CreateApiTokenInput = z.input<typeof createApiToken>;
|
|
117
155
|
export declare const apiToken: z.ZodObject<{
|
|
118
156
|
id: z.ZodNumber;
|
|
119
157
|
name: z.ZodString;
|
|
158
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
120
159
|
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
160
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
121
161
|
createdAt: z.ZodString;
|
|
122
162
|
}, z.core.$strip>;
|
|
123
163
|
export type ApiToken = z.infer<typeof apiToken>;
|
|
@@ -126,6 +166,8 @@ export declare const createdApiToken: z.ZodObject<{
|
|
|
126
166
|
id: z.ZodNumber;
|
|
127
167
|
name: z.ZodString;
|
|
128
168
|
token: z.ZodString;
|
|
169
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
170
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
129
171
|
createdAt: z.ZodString;
|
|
130
172
|
}, z.core.$strip>;
|
|
131
173
|
export type CreatedApiToken = z.infer<typeof createdApiToken>;
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.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cAAc,CAAC,CAAC;AAC5D;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEjE,eAAO,MAAM,QAAQ;;;;;;;iBAQnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,iFAAiF;AACjF,eAAO,MAAM,eAAe;;;;;;;iBAO1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAG9D,gGAAgG;AAChG,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,iGAAiG;AACjG,eAAO,MAAM,kBAAkB;;iBAE7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAGlE,eAAO,MAAM,aAAa;;;;;;;iBAOxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
package/dist/auth.js
CHANGED
|
@@ -40,6 +40,87 @@ export const userCreate = z.object({
|
|
|
40
40
|
export const passwordReset = z.object({
|
|
41
41
|
newPassword: z.string().min(8).max(128),
|
|
42
42
|
});
|
|
43
|
+
/**
|
|
44
|
+
* API-token scopes.
|
|
45
|
+
*
|
|
46
|
+
* Until 0.3.5 the `api_tokens.scopes` column existed but was never written
|
|
47
|
+
* (always `[]`) and never read, so every token carried its owner's FULL
|
|
48
|
+
* authority — including the instance-operator flag, which gates host-privileged
|
|
49
|
+
* deploys. A CI or MCP token was therefore an instance-root credential.
|
|
50
|
+
*
|
|
51
|
+
* The vocabulary is deliberately tiny and method-based, so it can be enforced
|
|
52
|
+
* in one place (`plugins/auth.ts`) instead of being annotated onto 51 route
|
|
53
|
+
* modules:
|
|
54
|
+
*
|
|
55
|
+
* read → safe methods only (GET / HEAD / OPTIONS)
|
|
56
|
+
* write → every method, but the request runs as a NON-operator even if
|
|
57
|
+
* the owner is one
|
|
58
|
+
* operator → no restriction beyond the owner's own authority
|
|
59
|
+
*
|
|
60
|
+
* An EMPTY scope list means "unrestricted" and is what every pre-0.3.5 token
|
|
61
|
+
* has. That is deliberate back-compat: silently downgrading tokens already
|
|
62
|
+
* deployed in someone's CI would break their pipeline on upgrade. New tokens
|
|
63
|
+
* should always be created with an explicit scope.
|
|
64
|
+
*/
|
|
65
|
+
// ── API-token scopes (G-08 fine-grained) ──────────────────────────────────
|
|
66
|
+
// The pre-0.3.5 enum (`read` | `write` | `operator`) was a coarse
|
|
67
|
+
// binary/ternary. G-08 adds per-resource URI scopes
|
|
68
|
+
// (`nd://scope/{read,write,admin}/<resource>`) so an MCP / CI token
|
|
69
|
+
// can be limited to, say, `nd://scope/read/services +
|
|
70
|
+
// nd://scope/read/databases` and nothing else.
|
|
71
|
+
//
|
|
72
|
+
// The two forms are accepted in the same array; the old enum
|
|
73
|
+
// continues to be a valid shorthand (a `write` token expands to
|
|
74
|
+
// "any write" at the auth plugin, which is the pre-0.3.5
|
|
75
|
+
// behaviour for backwards compat).
|
|
76
|
+
const LEGACY_SCOPE = z.enum(['read', 'write', 'operator']);
|
|
77
|
+
const RESOURCE_SCOPE = z.string().regex(/^nd:\/\/scope\/(read|write|admin)\/[a-z][a-z0-9_]{0,63}$/, 'expected nd://scope/{read,write,admin}/<resource>');
|
|
78
|
+
export const apiTokenScope = z.union([LEGACY_SCOPE, RESOURCE_SCOPE]);
|
|
79
|
+
/** All known resource names. The auth plugin checks these
|
|
80
|
+
* literally — adding a new resource is a one-line change
|
|
81
|
+
* in the auth plugin's resource map. Listed here so the
|
|
82
|
+
* CLI can suggest completions and the Zod regex can
|
|
83
|
+
* cross-check. */
|
|
84
|
+
export const KNOWN_SCOPE_RESOURCES = [
|
|
85
|
+
'services',
|
|
86
|
+
'databases',
|
|
87
|
+
'domains',
|
|
88
|
+
'deploys',
|
|
89
|
+
'alerts',
|
|
90
|
+
'webhooks',
|
|
91
|
+
'env',
|
|
92
|
+
'backups',
|
|
93
|
+
'volumes',
|
|
94
|
+
'projects',
|
|
95
|
+
'users',
|
|
96
|
+
'tokens',
|
|
97
|
+
'notifications',
|
|
98
|
+
'config',
|
|
99
|
+
'topology',
|
|
100
|
+
'health',
|
|
101
|
+
'settings',
|
|
102
|
+
'manifests',
|
|
103
|
+
'domains_transfer',
|
|
104
|
+
'backup_drill',
|
|
105
|
+
'images',
|
|
106
|
+
'audit',
|
|
107
|
+
'firewall',
|
|
108
|
+
'sso',
|
|
109
|
+
'egress',
|
|
110
|
+
'orchestrators',
|
|
111
|
+
'housekeeping',
|
|
112
|
+
];
|
|
113
|
+
/**
|
|
114
|
+
* Grant or revoke the INSTANCE-operator flag (`PATCH /v1/users/:id/operator`).
|
|
115
|
+
*
|
|
116
|
+
* This is not a workspace role. It gates the operator-only routes and the
|
|
117
|
+
* host-privilege boundary (PM2/compose deploys, lifecycle hooks, docker-socket
|
|
118
|
+
* templates), so it can only be changed by an existing operator, and the last
|
|
119
|
+
* one cannot revoke itself.
|
|
120
|
+
*/
|
|
121
|
+
export const operatorGrant = z.object({
|
|
122
|
+
isOperator: z.boolean(),
|
|
123
|
+
});
|
|
43
124
|
/** Forgot-password request. Always answers 200 (no user enumeration). */
|
|
44
125
|
export const forgotPassword = z.object({
|
|
45
126
|
email: z.email(),
|
|
@@ -81,12 +162,25 @@ export const session = z.object({
|
|
|
81
162
|
});
|
|
82
163
|
// ── API tokens (for the CLI / CI) ─────────────────────────────────────────
|
|
83
164
|
export const createApiToken = z.object({
|
|
84
|
-
|
|
165
|
+
// Lenient on purpose: this endpoint historically accepted any string, sliced
|
|
166
|
+
// it to 100 chars and fell back to "cli" when empty. Rejecting outright would
|
|
167
|
+
// break CLI/CI callers on upgrade.
|
|
168
|
+
name: z
|
|
169
|
+
.string()
|
|
170
|
+
.optional()
|
|
171
|
+
.transform((v) => (v ?? '').slice(0, 100) || 'cli'),
|
|
172
|
+
/** Empty = unrestricted (legacy behaviour). See `apiTokenScope`. */
|
|
173
|
+
scopes: z.array(apiTokenScope).max(3).default([]),
|
|
174
|
+
/** Optional lifetime; omitted = never expires (the pre-0.3.5 behaviour). */
|
|
175
|
+
expiresInDays: z.number().int().min(1).max(3650).optional(),
|
|
85
176
|
});
|
|
86
177
|
export const apiToken = z.object({
|
|
87
178
|
id: z.number().int(),
|
|
88
179
|
name: z.string(),
|
|
180
|
+
/** Empty array = a legacy, unrestricted token. The UI should flag those. */
|
|
181
|
+
scopes: z.array(z.string()),
|
|
89
182
|
lastUsedAt: z.string().datetime().nullable(),
|
|
183
|
+
expiresAt: z.string().datetime().nullable(),
|
|
90
184
|
createdAt: z.string().datetime(),
|
|
91
185
|
});
|
|
92
186
|
/** Returned once at creation time — the raw token is never retrievable again. */
|
|
@@ -94,6 +188,8 @@ export const createdApiToken = z.object({
|
|
|
94
188
|
id: z.number().int(),
|
|
95
189
|
name: z.string(),
|
|
96
190
|
token: z.string(),
|
|
191
|
+
scopes: z.array(z.string()),
|
|
192
|
+
expiresAt: z.string().datetime().nullable(),
|
|
97
193
|
createdAt: z.string().datetime(),
|
|
98
194
|
});
|
|
99
195
|
// ── passkeys (WebAuthn) ────────────────────────────────────────────────────
|
package/dist/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CA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,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC"}
|
package/dist/doctor.d.ts
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One actionable observation from a Doctor scan. `id` is deterministic
|
|
3
|
+
* (`kind:target`) so a fix request can re-scan, re-locate the finding against
|
|
4
|
+
* FRESH state and only then execute — a stale report can never drive a
|
|
5
|
+
* destructive action against a target that stopped qualifying in between. */
|
|
6
|
+
export declare const doctorSeverity: z.ZodEnum<{
|
|
7
|
+
critical: "critical";
|
|
8
|
+
info: "info";
|
|
9
|
+
warn: "warn";
|
|
10
|
+
}>;
|
|
11
|
+
export type DoctorSeverity = z.infer<typeof doctorSeverity>;
|
|
12
|
+
export declare const doctorTargetType: z.ZodEnum<{
|
|
13
|
+
container: "container";
|
|
14
|
+
database: "database";
|
|
15
|
+
deployment: "deployment";
|
|
16
|
+
host: "host";
|
|
17
|
+
image: "image";
|
|
18
|
+
network: "network";
|
|
19
|
+
service: "service";
|
|
20
|
+
volume: "volume";
|
|
21
|
+
}>;
|
|
22
|
+
export type DoctorTargetType = z.infer<typeof doctorTargetType>;
|
|
23
|
+
export declare const doctorFindingKind: z.ZodEnum<{
|
|
24
|
+
build_cache: "build_cache";
|
|
25
|
+
dangling_images: "dangling_images";
|
|
26
|
+
database_down: "database_down";
|
|
27
|
+
database_stuck: "database_stuck";
|
|
28
|
+
disk_pressure: "disk_pressure";
|
|
29
|
+
exited_container: "exited_container";
|
|
30
|
+
orphan_network: "orphan_network";
|
|
31
|
+
orphan_volume: "orphan_volume";
|
|
32
|
+
service_runtime_desync: "service_runtime_desync";
|
|
33
|
+
stuck_deployment: "stuck_deployment";
|
|
34
|
+
}>;
|
|
35
|
+
export type DoctorFindingKind = z.infer<typeof doctorFindingKind>;
|
|
36
|
+
/** Executable repair actions. Every one re-validates its precondition against
|
|
37
|
+
* current state inside the fix path; the enum is the full surface. */
|
|
38
|
+
export declare const doctorActionKind: z.ZodEnum<{
|
|
39
|
+
cancel_deployment: "cancel_deployment";
|
|
40
|
+
delete_volume: "delete_volume";
|
|
41
|
+
mark_database_error: "mark_database_error";
|
|
42
|
+
prune_build_cache: "prune_build_cache";
|
|
43
|
+
prune_dangling_images: "prune_dangling_images";
|
|
44
|
+
remove_container: "remove_container";
|
|
45
|
+
remove_network: "remove_network";
|
|
46
|
+
run_autoprune: "run_autoprune";
|
|
47
|
+
start_database: "start_database";
|
|
48
|
+
sync_service: "sync_service";
|
|
49
|
+
}>;
|
|
50
|
+
export type DoctorActionKind = z.infer<typeof doctorActionKind>;
|
|
51
|
+
export declare const doctorFinding: z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
kind: z.ZodEnum<{
|
|
54
|
+
build_cache: "build_cache";
|
|
55
|
+
dangling_images: "dangling_images";
|
|
56
|
+
database_down: "database_down";
|
|
57
|
+
database_stuck: "database_stuck";
|
|
58
|
+
disk_pressure: "disk_pressure";
|
|
59
|
+
exited_container: "exited_container";
|
|
60
|
+
orphan_network: "orphan_network";
|
|
61
|
+
orphan_volume: "orphan_volume";
|
|
62
|
+
service_runtime_desync: "service_runtime_desync";
|
|
63
|
+
stuck_deployment: "stuck_deployment";
|
|
64
|
+
}>;
|
|
65
|
+
severity: z.ZodEnum<{
|
|
66
|
+
critical: "critical";
|
|
67
|
+
info: "info";
|
|
68
|
+
warn: "warn";
|
|
69
|
+
}>;
|
|
70
|
+
title: z.ZodString;
|
|
71
|
+
detail: z.ZodString;
|
|
72
|
+
target: z.ZodObject<{
|
|
73
|
+
type: z.ZodEnum<{
|
|
74
|
+
container: "container";
|
|
75
|
+
database: "database";
|
|
76
|
+
deployment: "deployment";
|
|
77
|
+
host: "host";
|
|
78
|
+
image: "image";
|
|
79
|
+
network: "network";
|
|
80
|
+
service: "service";
|
|
81
|
+
volume: "volume";
|
|
82
|
+
}>;
|
|
83
|
+
name: z.ZodNullable<z.ZodString>;
|
|
84
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
action: z.ZodNullable<z.ZodEnum<{
|
|
87
|
+
cancel_deployment: "cancel_deployment";
|
|
88
|
+
delete_volume: "delete_volume";
|
|
89
|
+
mark_database_error: "mark_database_error";
|
|
90
|
+
prune_build_cache: "prune_build_cache";
|
|
91
|
+
prune_dangling_images: "prune_dangling_images";
|
|
92
|
+
remove_container: "remove_container";
|
|
93
|
+
remove_network: "remove_network";
|
|
94
|
+
run_autoprune: "run_autoprune";
|
|
95
|
+
start_database: "start_database";
|
|
96
|
+
sync_service: "sync_service";
|
|
97
|
+
}>>;
|
|
98
|
+
sizeBytes: z.ZodNullable<z.ZodNumber>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export type DoctorFinding = z.infer<typeof doctorFinding>;
|
|
101
|
+
export declare const doctorHostFacts: z.ZodObject<{
|
|
102
|
+
diskUsedPercent: z.ZodNumber;
|
|
103
|
+
diskTotalBytes: z.ZodNumber;
|
|
104
|
+
diskFreeBytes: z.ZodNumber;
|
|
105
|
+
dockerImagesBytes: z.ZodNullable<z.ZodNumber>;
|
|
106
|
+
dockerVolumesBytes: z.ZodNullable<z.ZodNumber>;
|
|
107
|
+
dockerBuildCacheBytes: z.ZodNullable<z.ZodNumber>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
export type DoctorHostFacts = z.infer<typeof doctorHostFacts>;
|
|
110
|
+
export declare const doctorReport: z.ZodObject<{
|
|
111
|
+
generatedAt: z.ZodString;
|
|
112
|
+
healthy: z.ZodBoolean;
|
|
113
|
+
totals: z.ZodObject<{
|
|
114
|
+
findings: z.ZodNumber;
|
|
115
|
+
critical: z.ZodNumber;
|
|
116
|
+
warn: z.ZodNumber;
|
|
117
|
+
info: z.ZodNumber;
|
|
118
|
+
reclaimableBytes: z.ZodNumber;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
host: z.ZodObject<{
|
|
121
|
+
diskUsedPercent: z.ZodNumber;
|
|
122
|
+
diskTotalBytes: z.ZodNumber;
|
|
123
|
+
diskFreeBytes: z.ZodNumber;
|
|
124
|
+
dockerImagesBytes: z.ZodNullable<z.ZodNumber>;
|
|
125
|
+
dockerVolumesBytes: z.ZodNullable<z.ZodNumber>;
|
|
126
|
+
dockerBuildCacheBytes: z.ZodNullable<z.ZodNumber>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
129
|
+
id: z.ZodString;
|
|
130
|
+
kind: z.ZodEnum<{
|
|
131
|
+
build_cache: "build_cache";
|
|
132
|
+
dangling_images: "dangling_images";
|
|
133
|
+
database_down: "database_down";
|
|
134
|
+
database_stuck: "database_stuck";
|
|
135
|
+
disk_pressure: "disk_pressure";
|
|
136
|
+
exited_container: "exited_container";
|
|
137
|
+
orphan_network: "orphan_network";
|
|
138
|
+
orphan_volume: "orphan_volume";
|
|
139
|
+
service_runtime_desync: "service_runtime_desync";
|
|
140
|
+
stuck_deployment: "stuck_deployment";
|
|
141
|
+
}>;
|
|
142
|
+
severity: z.ZodEnum<{
|
|
143
|
+
critical: "critical";
|
|
144
|
+
info: "info";
|
|
145
|
+
warn: "warn";
|
|
146
|
+
}>;
|
|
147
|
+
title: z.ZodString;
|
|
148
|
+
detail: z.ZodString;
|
|
149
|
+
target: z.ZodObject<{
|
|
150
|
+
type: z.ZodEnum<{
|
|
151
|
+
container: "container";
|
|
152
|
+
database: "database";
|
|
153
|
+
deployment: "deployment";
|
|
154
|
+
host: "host";
|
|
155
|
+
image: "image";
|
|
156
|
+
network: "network";
|
|
157
|
+
service: "service";
|
|
158
|
+
volume: "volume";
|
|
159
|
+
}>;
|
|
160
|
+
name: z.ZodNullable<z.ZodString>;
|
|
161
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
action: z.ZodNullable<z.ZodEnum<{
|
|
164
|
+
cancel_deployment: "cancel_deployment";
|
|
165
|
+
delete_volume: "delete_volume";
|
|
166
|
+
mark_database_error: "mark_database_error";
|
|
167
|
+
prune_build_cache: "prune_build_cache";
|
|
168
|
+
prune_dangling_images: "prune_dangling_images";
|
|
169
|
+
remove_container: "remove_container";
|
|
170
|
+
remove_network: "remove_network";
|
|
171
|
+
run_autoprune: "run_autoprune";
|
|
172
|
+
start_database: "start_database";
|
|
173
|
+
sync_service: "sync_service";
|
|
174
|
+
}>>;
|
|
175
|
+
sizeBytes: z.ZodNullable<z.ZodNumber>;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
export type DoctorReport = z.infer<typeof doctorReport>;
|
|
179
|
+
export declare const doctorFixRequest: z.ZodObject<{
|
|
180
|
+
findingId: z.ZodString;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
export type DoctorFixRequest = z.infer<typeof doctorFixRequest>;
|
|
183
|
+
export type DoctorFixRequestInput = DoctorFixRequest;
|
|
184
|
+
export declare const doctorFixResponse: z.ZodObject<{
|
|
185
|
+
fixed: z.ZodBoolean;
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
action: z.ZodEnum<{
|
|
188
|
+
cancel_deployment: "cancel_deployment";
|
|
189
|
+
delete_volume: "delete_volume";
|
|
190
|
+
mark_database_error: "mark_database_error";
|
|
191
|
+
prune_build_cache: "prune_build_cache";
|
|
192
|
+
prune_dangling_images: "prune_dangling_images";
|
|
193
|
+
remove_container: "remove_container";
|
|
194
|
+
remove_network: "remove_network";
|
|
195
|
+
run_autoprune: "run_autoprune";
|
|
196
|
+
start_database: "start_database";
|
|
197
|
+
sync_service: "sync_service";
|
|
198
|
+
}>;
|
|
199
|
+
log: z.ZodArray<z.ZodString>;
|
|
200
|
+
report: z.ZodObject<{
|
|
201
|
+
generatedAt: z.ZodString;
|
|
202
|
+
healthy: z.ZodBoolean;
|
|
203
|
+
totals: z.ZodObject<{
|
|
204
|
+
findings: z.ZodNumber;
|
|
205
|
+
critical: z.ZodNumber;
|
|
206
|
+
warn: z.ZodNumber;
|
|
207
|
+
info: z.ZodNumber;
|
|
208
|
+
reclaimableBytes: z.ZodNumber;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
host: z.ZodObject<{
|
|
211
|
+
diskUsedPercent: z.ZodNumber;
|
|
212
|
+
diskTotalBytes: z.ZodNumber;
|
|
213
|
+
diskFreeBytes: z.ZodNumber;
|
|
214
|
+
dockerImagesBytes: z.ZodNullable<z.ZodNumber>;
|
|
215
|
+
dockerVolumesBytes: z.ZodNullable<z.ZodNumber>;
|
|
216
|
+
dockerBuildCacheBytes: z.ZodNullable<z.ZodNumber>;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
219
|
+
id: z.ZodString;
|
|
220
|
+
kind: z.ZodEnum<{
|
|
221
|
+
build_cache: "build_cache";
|
|
222
|
+
dangling_images: "dangling_images";
|
|
223
|
+
database_down: "database_down";
|
|
224
|
+
database_stuck: "database_stuck";
|
|
225
|
+
disk_pressure: "disk_pressure";
|
|
226
|
+
exited_container: "exited_container";
|
|
227
|
+
orphan_network: "orphan_network";
|
|
228
|
+
orphan_volume: "orphan_volume";
|
|
229
|
+
service_runtime_desync: "service_runtime_desync";
|
|
230
|
+
stuck_deployment: "stuck_deployment";
|
|
231
|
+
}>;
|
|
232
|
+
severity: z.ZodEnum<{
|
|
233
|
+
critical: "critical";
|
|
234
|
+
info: "info";
|
|
235
|
+
warn: "warn";
|
|
236
|
+
}>;
|
|
237
|
+
title: z.ZodString;
|
|
238
|
+
detail: z.ZodString;
|
|
239
|
+
target: z.ZodObject<{
|
|
240
|
+
type: z.ZodEnum<{
|
|
241
|
+
container: "container";
|
|
242
|
+
database: "database";
|
|
243
|
+
deployment: "deployment";
|
|
244
|
+
host: "host";
|
|
245
|
+
image: "image";
|
|
246
|
+
network: "network";
|
|
247
|
+
service: "service";
|
|
248
|
+
volume: "volume";
|
|
249
|
+
}>;
|
|
250
|
+
name: z.ZodNullable<z.ZodString>;
|
|
251
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
action: z.ZodNullable<z.ZodEnum<{
|
|
254
|
+
cancel_deployment: "cancel_deployment";
|
|
255
|
+
delete_volume: "delete_volume";
|
|
256
|
+
mark_database_error: "mark_database_error";
|
|
257
|
+
prune_build_cache: "prune_build_cache";
|
|
258
|
+
prune_dangling_images: "prune_dangling_images";
|
|
259
|
+
remove_container: "remove_container";
|
|
260
|
+
remove_network: "remove_network";
|
|
261
|
+
run_autoprune: "run_autoprune";
|
|
262
|
+
start_database: "start_database";
|
|
263
|
+
sync_service: "sync_service";
|
|
264
|
+
}>>;
|
|
265
|
+
sizeBytes: z.ZodNullable<z.ZodNumber>;
|
|
266
|
+
}, z.core.$strip>>;
|
|
267
|
+
}, z.core.$strip>;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
export type DoctorFixResponse = z.infer<typeof doctorFixResponse>;
|
|
270
|
+
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;8EAG8E;AAC9E,eAAO,MAAM,cAAc;;;;EAAuC,CAAC;AACnE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,gBAAgB;;;;;;;;;EAS3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,iBAAi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One actionable observation from a Doctor scan. `id` is deterministic
|
|
3
|
+
* (`kind:target`) so a fix request can re-scan, re-locate the finding against
|
|
4
|
+
* FRESH state and only then execute — a stale report can never drive a
|
|
5
|
+
* destructive action against a target that stopped qualifying in between. */
|
|
6
|
+
export const doctorSeverity = z.enum(['info', 'warn', 'critical']);
|
|
7
|
+
export const doctorTargetType = z.enum([
|
|
8
|
+
'container',
|
|
9
|
+
'volume',
|
|
10
|
+
'network',
|
|
11
|
+
'image',
|
|
12
|
+
'database',
|
|
13
|
+
'service',
|
|
14
|
+
'deployment',
|
|
15
|
+
'host',
|
|
16
|
+
]);
|
|
17
|
+
export const doctorFindingKind = z.enum([
|
|
18
|
+
/** A Hub-family container sat exited with no live row claiming it. */
|
|
19
|
+
'exited_container',
|
|
20
|
+
/** A managed volume (nd-svc-/nd-db-) no row owns any more. */
|
|
21
|
+
'orphan_volume',
|
|
22
|
+
/** A per-slug bridge or compose-project network nothing uses any more. */
|
|
23
|
+
'orphan_network',
|
|
24
|
+
/** Dangling `<none>` images (safe, uncontroversial reclaim). */
|
|
25
|
+
'dangling_images',
|
|
26
|
+
/** Builder cache beyond the noise threshold. */
|
|
27
|
+
'build_cache',
|
|
28
|
+
/** Disk usage crossed the warning / critical line. */
|
|
29
|
+
'disk_pressure',
|
|
30
|
+
/** Database row says running, the container disagrees. */
|
|
31
|
+
'database_down',
|
|
32
|
+
/** Database stuck in `creating` — provisioning never finished. */
|
|
33
|
+
'database_stuck',
|
|
34
|
+
/** Service row says running, its runtime container is gone or exited. */
|
|
35
|
+
'service_runtime_desync',
|
|
36
|
+
/** A deploy row stuck in queued/building far past any live window. */
|
|
37
|
+
'stuck_deployment',
|
|
38
|
+
]);
|
|
39
|
+
/** Executable repair actions. Every one re-validates its precondition against
|
|
40
|
+
* current state inside the fix path; the enum is the full surface. */
|
|
41
|
+
export const doctorActionKind = z.enum([
|
|
42
|
+
'remove_container',
|
|
43
|
+
'delete_volume',
|
|
44
|
+
'remove_network',
|
|
45
|
+
'prune_dangling_images',
|
|
46
|
+
'prune_build_cache',
|
|
47
|
+
'run_autoprune',
|
|
48
|
+
'start_database',
|
|
49
|
+
'mark_database_error',
|
|
50
|
+
'sync_service',
|
|
51
|
+
'cancel_deployment',
|
|
52
|
+
]);
|
|
53
|
+
export const doctorFinding = z.object({
|
|
54
|
+
id: z.string(),
|
|
55
|
+
kind: doctorFindingKind,
|
|
56
|
+
severity: doctorSeverity,
|
|
57
|
+
title: z.string(),
|
|
58
|
+
detail: z.string(),
|
|
59
|
+
target: z.object({
|
|
60
|
+
type: doctorTargetType,
|
|
61
|
+
name: z.string().nullable(),
|
|
62
|
+
id: z.number().nullable(),
|
|
63
|
+
}),
|
|
64
|
+
/** Null when the finding is advisory only (no automated repair). */
|
|
65
|
+
action: doctorActionKind.nullable(),
|
|
66
|
+
sizeBytes: z.number().nullable(),
|
|
67
|
+
});
|
|
68
|
+
export const doctorHostFacts = z.object({
|
|
69
|
+
diskUsedPercent: z.number(),
|
|
70
|
+
diskTotalBytes: z.number(),
|
|
71
|
+
diskFreeBytes: z.number(),
|
|
72
|
+
dockerImagesBytes: z.number().nullable(),
|
|
73
|
+
dockerVolumesBytes: z.number().nullable(),
|
|
74
|
+
dockerBuildCacheBytes: z.number().nullable(),
|
|
75
|
+
});
|
|
76
|
+
export const doctorReport = z.object({
|
|
77
|
+
generatedAt: z.string().datetime(),
|
|
78
|
+
healthy: z.boolean(),
|
|
79
|
+
totals: z.object({
|
|
80
|
+
findings: z.number(),
|
|
81
|
+
critical: z.number(),
|
|
82
|
+
warn: z.number(),
|
|
83
|
+
info: z.number(),
|
|
84
|
+
reclaimableBytes: z.number(),
|
|
85
|
+
}),
|
|
86
|
+
host: doctorHostFacts,
|
|
87
|
+
findings: z.array(doctorFinding),
|
|
88
|
+
});
|
|
89
|
+
export const doctorFixRequest = z.object({
|
|
90
|
+
findingId: z.string().min(1),
|
|
91
|
+
});
|
|
92
|
+
export const doctorFixResponse = z.object({
|
|
93
|
+
fixed: z.boolean(),
|
|
94
|
+
id: z.string(),
|
|
95
|
+
action: doctorActionKind,
|
|
96
|
+
log: z.array(z.string()),
|
|
97
|
+
report: doctorReport,
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;8EAG8E;AAC9E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAGnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IACrC,WAAW;IACX,QAAQ;IACR,SAAS;IACT,OAAO;IACP,UAAU;IACV,SAAS;IACT,YAAY;IACZ,MAAM;CACP,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC;IACtC,sEAAsE;IACtE,kBAAkB;IAClB,8DAA8D;IAC9D,eAAe;IACf,0EAA0E;IAC1E,gBAAgB;IAChB,gEAAgE;IAChE,iBAAiB;IACjB,gDAAgD;IAChD,aAAa;IACb,sDAAsD;IACtD,eAAe;IACf,0DAA0D;IAC1D,eAAe;IACf,kEAAkE;IAClE,gBAAgB;IAChB,yEAAyE;IACzE,wBAAwB;IACxB,sEAAsE;IACtE,kBAAkB;CACnB,CAAC,CAAC;AAGH;uEACuE;AACvE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IACrC,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IAChB,uBAAuB;IACvB,mBAAmB;IACnB,eAAe;IACf,gBAAgB;IAChB,qBAAqB;IACrB,cAAc;IACd,mBAAmB;CACpB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,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
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC"}
|