@homeflare/alchemy 0.37.2 → 0.37.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.
- package/dist/linux/directory-lifecycle.d.ts.map +1 -1
- package/dist/linux/directory.d.ts +5 -3
- package/dist/linux/directory.d.ts.map +1 -1
- package/dist/linux/index.js +4 -3
- package/dist/linux/index.js.map +4 -4
- package/dist/litellm/fake-stack.d.ts +7 -7
- package/dist/litellm/fake-stack.d.ts.map +1 -1
- package/dist/litellm/index.js +2 -2
- package/dist/litellm/index.js.map +4 -4
- package/dist/litellm/pass-through-endpoint.d.ts +9 -8
- package/dist/litellm/pass-through-endpoint.d.ts.map +1 -1
- package/dist/litellm/providers.d.ts +8 -2
- package/dist/litellm/providers.d.ts.map +1 -1
- package/dist/proxmox/backup-job-config.d.ts +95 -0
- package/dist/proxmox/backup-job-config.d.ts.map +1 -0
- package/dist/proxmox/backup-job-distilled.d.ts +46 -0
- package/dist/proxmox/backup-job-distilled.d.ts.map +1 -0
- package/dist/proxmox/backup-job.d.ts +9 -26
- package/dist/proxmox/backup-job.d.ts.map +1 -1
- package/dist/proxmox/distilled-pbs.d.ts +12 -0
- package/dist/proxmox/distilled-pbs.d.ts.map +1 -0
- package/dist/proxmox/fake-pbs-jobs.d.ts +23 -0
- package/dist/proxmox/fake-pbs-jobs.d.ts.map +1 -0
- package/dist/proxmox/fake-pbs-notify.d.ts.map +1 -1
- package/dist/proxmox/fake-pve.d.ts +1 -1
- package/dist/proxmox/fake-pve.d.ts.map +1 -1
- package/dist/proxmox/index.js +1501 -607
- package/dist/proxmox/index.js.map +48 -24
- package/dist/proxmox/live-core-fixtures.d.ts +40 -0
- package/dist/proxmox/live-core-fixtures.d.ts.map +1 -0
- package/dist/proxmox/metric-server-config.d.ts +49 -0
- package/dist/proxmox/metric-server-config.d.ts.map +1 -0
- package/dist/proxmox/metric-server-distilled.d.ts +43 -0
- package/dist/proxmox/metric-server-distilled.d.ts.map +1 -0
- package/dist/proxmox/metric-server.d.ts +2 -10
- package/dist/proxmox/metric-server.d.ts.map +1 -1
- package/dist/proxmox/notification-matcher-distilled.d.ts +9 -0
- package/dist/proxmox/notification-matcher-distilled.d.ts.map +1 -0
- package/dist/proxmox/notification-matcher-lifecycle.d.ts +27 -0
- package/dist/proxmox/notification-matcher-lifecycle.d.ts.map +1 -0
- package/dist/proxmox/notification-matcher.d.ts +5 -5
- package/dist/proxmox/notification-matcher.d.ts.map +1 -1
- package/dist/proxmox/notification-sdk-input.d.ts +22 -0
- package/dist/proxmox/notification-sdk-input.d.ts.map +1 -0
- package/dist/proxmox/notification-target-distilled.d.ts +12 -0
- package/dist/proxmox/notification-target-distilled.d.ts.map +1 -0
- package/dist/proxmox/notification-target-form.d.ts +2 -0
- package/dist/proxmox/notification-target-form.d.ts.map +1 -1
- package/dist/proxmox/notification-target-lifecycle.d.ts +29 -0
- package/dist/proxmox/notification-target-lifecycle.d.ts.map +1 -0
- package/dist/proxmox/notification-target-spec.d.ts +5 -0
- package/dist/proxmox/notification-target-spec.d.ts.map +1 -0
- package/dist/proxmox/notification-target.d.ts +4 -5
- package/dist/proxmox/notification-target.d.ts.map +1 -1
- package/dist/proxmox/pbs-datastore-endpoint.d.ts +1 -1
- package/dist/proxmox/pbs-datastore-form.d.ts +18 -42
- package/dist/proxmox/pbs-datastore-form.d.ts.map +1 -1
- package/dist/proxmox/pbs-datastore-guard.d.ts +7 -4
- package/dist/proxmox/pbs-datastore-guard.d.ts.map +1 -1
- package/dist/proxmox/pbs-datastore-lifecycle.d.ts +56 -0
- package/dist/proxmox/pbs-datastore-lifecycle.d.ts.map +1 -0
- package/dist/proxmox/pbs-datastore-wire.d.ts +21 -0
- package/dist/proxmox/pbs-datastore-wire.d.ts.map +1 -0
- package/dist/proxmox/pbs-datastore.d.ts +5 -6
- package/dist/proxmox/pbs-datastore.d.ts.map +1 -1
- package/dist/proxmox/pbs-notification-input.d.ts +18 -0
- package/dist/proxmox/pbs-notification-input.d.ts.map +1 -0
- package/dist/proxmox/pbs-notification-matcher-distilled.d.ts +11 -0
- package/dist/proxmox/pbs-notification-matcher-distilled.d.ts.map +1 -0
- package/dist/proxmox/pbs-notification-matcher.d.ts +4 -3
- package/dist/proxmox/pbs-notification-matcher.d.ts.map +1 -1
- package/dist/proxmox/pbs-notification-target-distilled.d.ts +20 -0
- package/dist/proxmox/pbs-notification-target-distilled.d.ts.map +1 -0
- package/dist/proxmox/pbs-notification-target-lifecycle.d.ts +4 -4
- package/dist/proxmox/pbs-notification-target-lifecycle.d.ts.map +1 -1
- package/dist/proxmox/pbs-notification-target.d.ts +1 -1
- package/dist/proxmox/pbs-prune-job-lifecycle.d.ts +22 -0
- package/dist/proxmox/pbs-prune-job-lifecycle.d.ts.map +1 -0
- package/dist/proxmox/pbs-prune-job-spec.d.ts +5 -0
- package/dist/proxmox/pbs-prune-job-spec.d.ts.map +1 -0
- package/dist/proxmox/pbs-prune-job-wire.d.ts +11 -0
- package/dist/proxmox/pbs-prune-job-wire.d.ts.map +1 -0
- package/dist/proxmox/pbs-prune-job.d.ts +9 -8
- package/dist/proxmox/pbs-prune-job.d.ts.map +1 -1
- package/dist/proxmox/pbs-sync-job-attributes.d.ts +34 -0
- package/dist/proxmox/pbs-sync-job-attributes.d.ts.map +1 -0
- package/dist/proxmox/pbs-sync-job-form.d.ts +21 -22
- package/dist/proxmox/pbs-sync-job-form.d.ts.map +1 -1
- package/dist/proxmox/pbs-sync-job-lifecycle.d.ts +22 -0
- package/dist/proxmox/pbs-sync-job-lifecycle.d.ts.map +1 -0
- package/dist/proxmox/pbs-sync-job-wire.d.ts +11 -0
- package/dist/proxmox/pbs-sync-job-wire.d.ts.map +1 -0
- package/dist/proxmox/pbs-sync-job.d.ts +9 -39
- package/dist/proxmox/pbs-sync-job.d.ts.map +1 -1
- package/dist/proxmox/pbs-verify-job-lifecycle.d.ts +22 -0
- package/dist/proxmox/pbs-verify-job-lifecycle.d.ts.map +1 -0
- package/dist/proxmox/pbs-verify-job-spec.d.ts +16 -0
- package/dist/proxmox/pbs-verify-job-spec.d.ts.map +1 -0
- package/dist/proxmox/pbs-verify-job-wire.d.ts +11 -0
- package/dist/proxmox/pbs-verify-job-wire.d.ts.map +1 -0
- package/dist/proxmox/pbs-verify-job.d.ts +12 -12
- package/dist/proxmox/pbs-verify-job.d.ts.map +1 -1
- package/dist/proxmox/pool.d.ts +10 -1
- package/dist/proxmox/pool.d.ts.map +1 -1
- package/dist/release/archive.d.ts.map +1 -1
- package/dist/release/index.js.map +2 -2
- package/docs/pbs-distilled-jobs.md +31 -0
- package/docs/pbs-notifications.md +8 -2
- package/docs/proxmox-notification-sdk.md +28 -0
- package/docs/proxmox-sdk-migration.md +60 -0
- package/docs/upstream-conformance-families.md +6 -2
- package/package.json +1 -1
- package/src/linux/directory-lifecycle.ts +14 -2
- package/src/linux/directory.test.ts +24 -0
- package/src/linux/directory.ts +5 -3
- package/src/litellm/fake-stack.ts +13 -10
- package/src/litellm/pass-through-endpoint.ts +5 -6
- package/src/litellm/pass-through-stack.test.ts +54 -0
- package/src/litellm/providers.ts +8 -2
- package/src/proxmox/adopt-noop.test.ts +4 -5
- package/src/proxmox/backup-job-config.ts +95 -0
- package/src/proxmox/backup-job-distilled.ts +86 -0
- package/src/proxmox/backup-job.ts +78 -116
- package/src/proxmox/constraints.test.ts +9 -8
- package/src/proxmox/distilled-pbs.test.ts +87 -0
- package/src/proxmox/distilled-pbs.ts +50 -0
- package/src/proxmox/fake-pbs-jobs.ts +99 -0
- package/src/proxmox/fake-pbs-notify.ts +4 -1
- package/src/proxmox/fake-pve.ts +3 -2
- package/src/proxmox/live-core-fixtures.ts +126 -0
- package/src/proxmox/live-core-lifecycle.test.ts +115 -0
- package/src/proxmox/live-core-wire.test.ts +190 -0
- package/src/proxmox/metric-server-config.ts +87 -0
- package/src/proxmox/metric-server-distilled.ts +81 -0
- package/src/proxmox/metric-server.ts +77 -88
- package/src/proxmox/notification-distilled.test.ts +162 -0
- package/src/proxmox/notification-matcher-distilled.ts +60 -0
- package/src/proxmox/notification-matcher-lifecycle.ts +71 -0
- package/src/proxmox/notification-matcher.ts +9 -26
- package/src/proxmox/notification-replacement.test.ts +190 -0
- package/src/proxmox/notification-sdk-input.ts +39 -0
- package/src/proxmox/notification-target-distilled.ts +160 -0
- package/src/proxmox/notification-target-form.ts +2 -0
- package/src/proxmox/notification-target-lifecycle.ts +75 -0
- package/src/proxmox/notification-target-spec.ts +68 -0
- package/src/proxmox/notification-target.ts +6 -68
- package/src/proxmox/pbs-datastore-endpoint.ts +1 -1
- package/src/proxmox/pbs-datastore-form.ts +18 -49
- package/src/proxmox/pbs-datastore-guard.ts +7 -4
- package/src/proxmox/pbs-datastore-lifecycle.ts +114 -0
- package/src/proxmox/pbs-datastore-wire.ts +94 -0
- package/src/proxmox/pbs-datastore.ts +7 -133
- package/src/proxmox/pbs-jobs-delete.test.ts +40 -0
- package/src/proxmox/pbs-jobs-sdk.test.ts +215 -0
- package/src/proxmox/pbs-notification-errors.test.ts +93 -0
- package/src/proxmox/pbs-notification-input.ts +25 -0
- package/src/proxmox/pbs-notification-mail.test.ts +64 -0
- package/src/proxmox/pbs-notification-matcher-distilled.ts +65 -0
- package/src/proxmox/pbs-notification-matcher.ts +70 -17
- package/src/proxmox/pbs-notification-target-distilled.ts +124 -0
- package/src/proxmox/pbs-notification-target-lifecycle.ts +26 -17
- package/src/proxmox/pbs-notification-target.ts +1 -1
- package/src/proxmox/pbs-notifications-stack.test.ts +25 -0
- package/src/proxmox/pbs-prune-job-lifecycle.ts +52 -0
- package/src/proxmox/pbs-prune-job-spec.ts +53 -0
- package/src/proxmox/pbs-prune-job-wire.ts +68 -0
- package/src/proxmox/pbs-prune-job.ts +10 -58
- package/src/proxmox/pbs-sync-job-attributes.ts +33 -0
- package/src/proxmox/pbs-sync-job-form.ts +7 -6
- package/src/proxmox/pbs-sync-job-lifecycle.ts +46 -0
- package/src/proxmox/pbs-sync-job-wire.ts +71 -0
- package/src/proxmox/pbs-sync-job.ts +10 -41
- package/src/proxmox/pbs-verify-job-lifecycle.ts +52 -0
- package/src/proxmox/pbs-verify-job-spec.ts +76 -0
- package/src/proxmox/pbs-verify-job-wire.ts +58 -0
- package/src/proxmox/pbs-verify-job.ts +13 -85
- package/src/proxmox/pool.ts +92 -10
- package/src/release/archive.ts +5 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Test-only declarations and vendor-shaped responses for the three migrated PVE families. */
|
|
2
|
+
import type * as Effect from 'effect/Effect';
|
|
3
|
+
import type * as HttpClient from 'effect/unstable/http/HttpClient';
|
|
4
|
+
import { type FakeEngine } from '../verify/fake-engine.ts';
|
|
5
|
+
import { type FakePve } from './fake-pve.ts';
|
|
6
|
+
export declare const poolProps: {
|
|
7
|
+
poolid: string;
|
|
8
|
+
comment: string;
|
|
9
|
+
target: import("./credentials.ts").PveTarget;
|
|
10
|
+
};
|
|
11
|
+
export declare const backupProps: {
|
|
12
|
+
id: string;
|
|
13
|
+
schedule: string;
|
|
14
|
+
vmid: number[];
|
|
15
|
+
'prune-backups': string;
|
|
16
|
+
target: import("./credentials.ts").PveTarget;
|
|
17
|
+
};
|
|
18
|
+
export declare const metricProps: {
|
|
19
|
+
id: string;
|
|
20
|
+
type: 'influxdb';
|
|
21
|
+
server: string;
|
|
22
|
+
port: number;
|
|
23
|
+
target: import("./credentials.ts").PveTarget;
|
|
24
|
+
};
|
|
25
|
+
export interface CoreCase {
|
|
26
|
+
name: string;
|
|
27
|
+
path: string;
|
|
28
|
+
declare: () => Effect.Effect<unknown, never, unknown>;
|
|
29
|
+
engine: (fake: FakePve) => FakeEngine;
|
|
30
|
+
read: () => Effect.Effect<unknown, unknown, HttpClient.HttpClient>;
|
|
31
|
+
remove: () => Effect.Effect<unknown, unknown, HttpClient.HttpClient>;
|
|
32
|
+
live: Record<string, unknown>;
|
|
33
|
+
drift: Record<string, unknown>;
|
|
34
|
+
missing: () => Response;
|
|
35
|
+
createPath: string;
|
|
36
|
+
/** Actual form fields, including defaults, without SDK identifier spelling leaking onto wire. */
|
|
37
|
+
createForm: Record<string, string>;
|
|
38
|
+
}
|
|
39
|
+
export declare const coreCases: CoreCase[];
|
|
40
|
+
//# sourceMappingURL=live-core-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-core-fixtures.d.ts","sourceRoot":"","sources":["../../src/proxmox/live-core-fixtures.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAE7C,OAAO,KAAK,KAAK,UAAU,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,0BAA0B,CAAC;AAGvE,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAK1D,eAAO,MAAM,SAAS;IAAK,MAAM;IAAS,OAAO;IAAa,MAAM;CAAe,CAAC;AACpF,eAAO,MAAM,WAAW;IACtB,EAAE;IACF,QAAQ;IACR,IAAI;IACJ,eAAe;IACf,MAAM;CACP,CAAC;AACF,eAAO,MAAM,WAAW;IACtB,EAAE;IACF,IAAI,EAAE,UAAU;IAChB,MAAM;IACN,IAAI;IACJ,MAAM;CACP,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACtD,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,UAAU,CAAC;IACtC,IAAI,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACnE,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACrE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,OAAO,EAAE,MAAM,QAAQ,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AACD,eAAO,MAAM,SAAS,EAAE,QAAQ,EAmF/B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Pure existing forms, normalization and equality, shared by plan and SDK lifecycle. */
|
|
2
|
+
import type { MetricServerAttributes, MetricServerProps } from './metric-server.ts';
|
|
3
|
+
import { createBody, update } from './metric-server-form.ts';
|
|
4
|
+
export declare const metricServerSpec: {
|
|
5
|
+
attributes: (live: Record<string, unknown>, props: MetricServerProps) => {
|
|
6
|
+
'otel-compression': string;
|
|
7
|
+
'otel-max-body-size': number;
|
|
8
|
+
'otel-path': string;
|
|
9
|
+
'otel-protocol': string;
|
|
10
|
+
'otel-timeout': number;
|
|
11
|
+
'otel-verify-ssl': boolean;
|
|
12
|
+
'api-path-prefix': string;
|
|
13
|
+
bucket: string;
|
|
14
|
+
disable: boolean;
|
|
15
|
+
id: string;
|
|
16
|
+
influxdbproto: string;
|
|
17
|
+
'max-body-size': number;
|
|
18
|
+
mtu: number;
|
|
19
|
+
organization: string;
|
|
20
|
+
path: string;
|
|
21
|
+
port: number;
|
|
22
|
+
server: string;
|
|
23
|
+
timeout: number;
|
|
24
|
+
type: import("./metric-server.ts").MetricServerType;
|
|
25
|
+
'verify-certificate': boolean;
|
|
26
|
+
} | undefined;
|
|
27
|
+
/** ⛔ THE SAME STRING AS `path`, DELIBERATELY — see the ⛔ in the header. */
|
|
28
|
+
collection: (props: MetricServerProps) => string;
|
|
29
|
+
/** ⚠️ `type` IS REQUIRED ON CREATE; `id` IS NOT SENT, because the id is the path. */
|
|
30
|
+
createForm: typeof createBody;
|
|
31
|
+
/**
|
|
32
|
+
* The vendor rules both forms are checked against at plan time — resource-spec.ts.
|
|
33
|
+
* ⚠️ POST AND PUT ARE THE SAME PATH HERE, and they are still two different tables: only the
|
|
34
|
+
* POST marks `type` required, and only the PUT accepts `delete` and `digest`.
|
|
35
|
+
*/
|
|
36
|
+
endpoint: {
|
|
37
|
+
create: string;
|
|
38
|
+
update: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* ⛔ `id` and `type` are absent: one is the key the object was read by, the other is refused
|
|
42
|
+
* rather than updated. Everything type-specific is `matchesType`'s, above.
|
|
43
|
+
*/
|
|
44
|
+
matches: (attributes: MetricServerAttributes, props: MetricServerProps) => boolean;
|
|
45
|
+
path: (props: MetricServerProps) => string;
|
|
46
|
+
/** The form and its clear-list, from the one table in metric-server-form.ts. */
|
|
47
|
+
updateForm: typeof update;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=metric-server-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric-server-config.d.ts","sourceRoot":"","sources":["../../src/proxmox/metric-server-config.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEpF,OAAO,EAAS,UAAU,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AA6BpE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;IA6B3B,2EAA2E;;IAE3E,qFAAqF;;IAErF;;;;OAIG;;QAED,MAAM;QACN,MAAM;;IAER;;;OAGG;;;IAOH,gFAAgF;;CAEpB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Metric-server SDK transport; pve-manager 9.2.11, no change to managed/secret fields. */
|
|
2
|
+
import * as cluster from '@distilled.cloud/proxmox/cluster';
|
|
3
|
+
import * as Effect from 'effect/Effect';
|
|
4
|
+
import type { MetricServerProps } from './metric-server.ts';
|
|
5
|
+
/**
|
|
6
|
+
* The vendor intentionally leaves this plugin-dependent response unstructured in its
|
|
7
|
+
* schema. Decode only the object envelope, then use the existing per-plugin normalization.
|
|
8
|
+
* A malformed response fails without including header credentials in a schema diagnostic.
|
|
9
|
+
*/
|
|
10
|
+
export declare const readMetricServerRow: (props: MetricServerProps) => Effect.Effect<{
|
|
11
|
+
readonly [x: string]: unknown;
|
|
12
|
+
} | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").BadRequest | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/caddy").Conflict | Error | import("@distilled.cloud/caddy").Forbidden | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/unstable/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | import("@distilled.cloud/caddy").Locked | import("@distilled.cloud/proxmox/Errors").ParameterVerificationFailed | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("@distilled.cloud/caddy").ServiceUnavailable | import("effect/Cause").TimeoutError | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/caddy").UnprocessableEntity | import("@distilled.cloud/proxmox/Errors").ClientErrors, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
13
|
+
export declare const readMetricServer: (props: MetricServerProps) => Effect.Effect<{
|
|
14
|
+
'otel-compression': string;
|
|
15
|
+
'otel-max-body-size': number;
|
|
16
|
+
'otel-path': string;
|
|
17
|
+
'otel-protocol': string;
|
|
18
|
+
'otel-timeout': number;
|
|
19
|
+
'otel-verify-ssl': boolean;
|
|
20
|
+
'api-path-prefix': string;
|
|
21
|
+
bucket: string;
|
|
22
|
+
disable: boolean;
|
|
23
|
+
id: string;
|
|
24
|
+
influxdbproto: string;
|
|
25
|
+
'max-body-size': number;
|
|
26
|
+
mtu: number;
|
|
27
|
+
organization: string;
|
|
28
|
+
path: string;
|
|
29
|
+
port: number;
|
|
30
|
+
server: string;
|
|
31
|
+
timeout: number;
|
|
32
|
+
type: import("./metric-server.ts").MetricServerType;
|
|
33
|
+
'verify-certificate': boolean;
|
|
34
|
+
} | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").BadRequest | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/caddy").Conflict | Error | import("@distilled.cloud/caddy").Forbidden | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/unstable/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | import("@distilled.cloud/caddy").Locked | import("@distilled.cloud/proxmox/Errors").ParameterVerificationFailed | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("@distilled.cloud/caddy").ServiceUnavailable | import("effect/Cause").TimeoutError | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/caddy").UnprocessableEntity | import("@distilled.cloud/proxmox/Errors").ClientErrors, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
35
|
+
/** Map only the existing form's declared keys; token and otel-headers never enter this map. */
|
|
36
|
+
export declare const metricServerRequest: (props: MetricServerProps, form: Record<string, string>) => cluster.PutClusterMetricsServerRequest;
|
|
37
|
+
/**
|
|
38
|
+
* Vendor DELETE dereferences the plugin without an absent-row check (MetricServer.pm:293).
|
|
39
|
+
* A typed GET miss therefore skips DELETE. A race or any other SDK error still propagates;
|
|
40
|
+
* never reinterpret an arbitrary 500 from deleting an invalid section as success.
|
|
41
|
+
*/
|
|
42
|
+
export declare const deleteMetricServer: (props: MetricServerProps) => Effect.Effect<void, Error | import("effect/unstable/http/HttpClientError").HttpClientError | import("./credential-errors.ts").PveCredentialDenied, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
43
|
+
//# sourceMappingURL=metric-server-distilled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric-server-distilled.d.ts","sourceRoot":"","sources":["../../src/proxmox/metric-server-distilled.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAE5D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,UAAW,iBAAiB;;o+BAezD,CAAC;AAEJ,eAAO,MAAM,gBAAgB,UAAW,iBAAiB;;;;;;;;;;;;;;;;;;;;;o+BAGtD,CAAC;AAEJ,+FAA+F;AAC/F,eAAO,MAAM,mBAAmB,UACvB,iBAAiB,QAClB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC3B,OAAO,CAAC,8BAuBT,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,UAAW,iBAAiB,6MASvD,CAAC"}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
import { Resource } from 'alchemy';
|
|
32
32
|
import * as Provider from 'alchemy/Provider';
|
|
33
33
|
import { type MetricServerOtelAttributes, type MetricServerOtelProps } from './metric-server-otel.ts';
|
|
34
|
-
import {
|
|
34
|
+
import type { PveRequirements, WithTarget } from './resource-spec.ts';
|
|
35
35
|
/**
|
|
36
36
|
* PVE's status plugins. Which one a server is decides which fields it will even accept.
|
|
37
37
|
*
|
|
@@ -110,14 +110,6 @@ export interface MetricServerAttributes extends MetricServerOtelAttributes {
|
|
|
110
110
|
export interface ProxmoxMetricServer extends Resource<'Proxmox.MetricServer', MetricServerProps, MetricServerAttributes, never, PveRequirements> {
|
|
111
111
|
}
|
|
112
112
|
export declare const ProxmoxMetricServer: import("alchemy").ResourceClass<ProxmoxMetricServer>;
|
|
113
|
-
/**
|
|
114
|
-
* ⛔ THE EMPTY `list` FROM `pveHandlers` EARNS ITS KEEP HERE. `GET cluster/metrics/server` answers
|
|
115
|
-
* with every target the cluster already ships to, including the one somebody configured by hand
|
|
116
|
-
* years ago; adopting that is how a later `alchemy destroy` silences a graph nobody declared.
|
|
117
|
-
* ⚠️ AND NOTHING BRAKES THIS DESTROY. A pool refuses while it holds guests, a container while it
|
|
118
|
-
* runs; a metric server just leaves `status.cfg`, the cluster stops shipping on the next
|
|
119
|
-
* interval, and no guest or task is affected. The plan diff is the only warning anyone gets —
|
|
120
|
-
* the top of this file again, this time caused by a deploy.
|
|
121
|
-
*/
|
|
113
|
+
/** SDK lifecycle walked against pve-manager 9.2.11; failed reads never imply create. */
|
|
122
114
|
export declare const ProxmoxMetricServerProvider: () => import("effect/Layer").Layer<Provider.Provider<ProxmoxMetricServer>, never, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
123
115
|
//# sourceMappingURL=metric-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metric-server.d.ts","sourceRoot":"","sources":["../../src/proxmox/metric-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"metric-server.d.ts","sourceRoot":"","sources":["../../src/proxmox/metric-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAanC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,UAAU,GAAG,eAAe,CAAC;AAEzE,MAAM,WAAW,iBAAkB,SAAQ,UAAU,EAAE,qBAAqB;IAC1E;qGACiG;IACjG,EAAE,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0FAA0F;IAC1F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wFAAwF;IACxF,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAuB,SAAQ,0BAA0B;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAoB,SAAQ,QAAQ,CACnD,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,EACL,eAAe,CAChB;CAAG;AAEJ,eAAO,MAAM,mBAAmB,sDAAwD,CAAC;AAazF,wFAAwF;AACxF,eAAO,MAAM,2BAA2B,yIA4DrC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** PVE 9.2.11 matchers through distilled; 404 is measured absence, other failures propagate. */
|
|
2
|
+
import * as cluster from '@distilled.cloud/proxmox/cluster';
|
|
3
|
+
import * as Effect from 'effect/Effect';
|
|
4
|
+
import type { NotificationMatcherProps } from './notification-matcher.ts';
|
|
5
|
+
export declare const readMatcher: (props: NotificationMatcherProps) => Effect.Effect<import("./notification-matcher-form.ts").NotificationMatcherAttributes | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").BadRequest | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/caddy").Conflict | Error | import("@distilled.cloud/caddy").Forbidden | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/unstable/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | import("@distilled.cloud/caddy").Locked | import("@distilled.cloud/proxmox/Errors").ParameterVerificationFailed | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("@distilled.cloud/caddy").ServiceUnavailable | import("effect/Cause").TimeoutError | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/caddy").UnprocessableEntity | import("@distilled.cloud/proxmox/Errors").ClientErrors, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
6
|
+
export declare const createMatcher: (props: NotificationMatcherProps) => Effect.Effect<void, Error | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("effect/Cause").TimeoutError | cluster.ProxmoxOpError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
7
|
+
export declare const updateMatcher: (props: NotificationMatcherProps) => Effect.Effect<void, Error | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("effect/Cause").TimeoutError | cluster.ProxmoxOpError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
8
|
+
export declare const deleteMatcher: (props: NotificationMatcherProps) => Effect.Effect<void | cluster.DeleteClusterNotificationMatcherResponse, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").BadRequest | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/caddy").Conflict | Error | import("@distilled.cloud/caddy").Forbidden | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/unstable/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | import("@distilled.cloud/caddy").Locked | import("@distilled.cloud/proxmox/Errors").ParameterVerificationFailed | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("@distilled.cloud/caddy").ServiceUnavailable | import("effect/Cause").TimeoutError | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/caddy").UnprocessableEntity | import("@distilled.cloud/proxmox/Errors").ClientErrors, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
9
|
+
//# sourceMappingURL=notification-matcher-distilled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-matcher-distilled.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-matcher-distilled.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAS1E,eAAO,MAAM,WAAW,UAAW,wBAAwB,4jCAqBxD,CAAC;AAEJ,eAAO,MAAM,aAAa,UAAW,wBAAwB,8PAOzD,CAAC;AAEL,eAAO,MAAM,aAAa,UAAW,wBAAwB,8PAOzD,CAAC;AAEL,eAAO,MAAM,aAAa,UAAW,wBAAwB,iiCAML,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Input } from 'alchemy/Input';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import type { NotificationMatcherProps as Props } from './notification-matcher.ts';
|
|
4
|
+
import { type NotificationMatcherAttributes as Attributes } from './notification-matcher-form.ts';
|
|
5
|
+
export declare const matcherHandlers: {
|
|
6
|
+
/** Built-ins and human-created matchers are not auto-enrolled; adoption is explicit. */
|
|
7
|
+
list: () => Effect.Effect<never[], never, never>;
|
|
8
|
+
read: ({ olds }: {
|
|
9
|
+
olds: Props;
|
|
10
|
+
}) => Effect.Effect<Attributes | undefined, Error | import("effect/unstable/http/HttpClientError").HttpClientError | import("./credential-errors.ts").PveCredentialDenied, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
11
|
+
diff: ({ news, olds, output, }: {
|
|
12
|
+
news: Input<Props>;
|
|
13
|
+
olds: Props;
|
|
14
|
+
output: Attributes | undefined;
|
|
15
|
+
}) => Effect.Effect<{
|
|
16
|
+
readonly action: 'replace';
|
|
17
|
+
} | {
|
|
18
|
+
readonly action: "noop" | "update";
|
|
19
|
+
} | undefined, Error | import("effect/unstable/http/HttpClientError").HttpClientError | import("./credential-errors.ts").PveCredentialDenied, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
20
|
+
reconcile: ({ news }: {
|
|
21
|
+
news: Props;
|
|
22
|
+
}) => Effect.Effect<Attributes, Error | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("effect/Cause").TimeoutError | import("@distilled.cloud/proxmox/Protocol").ProxmoxOpError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
23
|
+
delete: ({ olds }: {
|
|
24
|
+
olds: Props;
|
|
25
|
+
}) => Effect.Effect<void | import("@distilled.cloud/proxmox/cluster").DeleteClusterNotificationMatcherResponse, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").BadRequest | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/caddy").Conflict | Error | import("@distilled.cloud/caddy").Forbidden | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/unstable/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | import("@distilled.cloud/caddy").Locked | import("@distilled.cloud/proxmox/Errors").ParameterVerificationFailed | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("@distilled.cloud/caddy").ServiceUnavailable | import("effect/Cause").TimeoutError | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/caddy").UnprocessableEntity | import("@distilled.cloud/proxmox/Errors").ClientErrors, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=notification-matcher-lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-matcher-lifecycle.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-matcher-lifecycle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,wBAAwB,IAAI,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EACL,KAAK,6BAA6B,IAAI,UAAU,EAIjD,MAAM,gCAAgC,CAAC;AAgBxC,eAAO,MAAM,eAAe;IAC1B,wFAAwF;IACxF,IAAI;IACJ,IAAI,aAAa;QAAE,IAAI,EAAE,KAAK,CAAA;KAAE;IAMhC,IAAI,4BAID;QACD,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACnB,IAAI,EAAE,KAAK,CAAC;QACZ,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;KAChC;yBAGiD,SAAS;;;;IAU3D,SAAS,aAAa;QAAE,IAAI,EAAE,KAAK,CAAA;KAAE;IAarC,MAAM,aAAa;QAAE,IAAI,EAAE,KAAK,CAAA;KAAE;CACnC,CAAC"}
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
* ⛔ `Mapping.Use` IS NOT ENOUGH, though the COLLECTION GET accepts it: the per-object read this
|
|
25
25
|
* family makes lists only Audit and Modify (pve-manager API2/Cluster/Notifications.pm
|
|
26
26
|
* `get_matcher`, read at HEAD 2026-09-22 — corrected here; PR 95 said Use sufficed).
|
|
27
|
-
* ⛔ A MISSING READ PRIVILEGE
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* ⛔ THE OLD HAND CLIENT FOLDED A MISSING READ PRIVILEGE INTO "ABSENT", planning a duplicate
|
|
28
|
+
* create. The distilled read now catches only NotFound: a refused read fails the plan.
|
|
29
|
+
* The noop still requires a read lease holding Mapping.Audit.
|
|
30
30
|
*/
|
|
31
31
|
import { Resource } from 'alchemy';
|
|
32
32
|
import * as Provider from 'alchemy/Provider';
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
33
|
+
import type { NotificationMatcherAttributes, NotificationMatcherFields } from './notification-matcher-form.ts';
|
|
34
|
+
import type { PveRequirements, WithTarget } from './resource-spec.ts';
|
|
35
35
|
export interface NotificationMatcherProps extends NotificationMatcherFields, WithTarget {
|
|
36
36
|
}
|
|
37
37
|
export interface ProxmoxNotificationMatcher extends Resource<'Proxmox.NotificationMatcher', NotificationMatcherProps, NotificationMatcherAttributes, never, PveRequirements> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-matcher.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-matcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,
|
|
1
|
+
{"version":3,"file":"notification-matcher.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-matcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGtE,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB,EAAE,UAAU;CAAG;AAE1F,MAAM,WAAW,0BAA2B,SAAQ,QAAQ,CAC1D,6BAA6B,EAC7B,wBAAwB,EACxB,6BAA6B,EAC7B,KAAK,EACL,eAAe,CAChB;CAAG;AAEJ;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,6DAEtC,CAAC;AAEF,eAAO,MAAM,kCAAkC,gJAI5C,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** PVE 9.2.11 form names mapped to the generated SDK's TypeScript field names. */
|
|
2
|
+
import { ProxmoxParseError } from '@distilled.cloud/proxmox/Errors';
|
|
3
|
+
import * as Effect from 'effect/Effect';
|
|
4
|
+
import * as Schema from 'effect/Schema';
|
|
5
|
+
declare const NotificationRequestInvalid_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6
|
+
readonly _tag: "NotificationRequestInvalid";
|
|
7
|
+
} & Readonly<A>;
|
|
8
|
+
/** Local schema refusal names the operation, never a form value (headers may be sensitive). */
|
|
9
|
+
export declare class NotificationRequestInvalid extends NotificationRequestInvalid_base<{
|
|
10
|
+
readonly operation: string;
|
|
11
|
+
}> {
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The provider's forms already enforce vendor constraints. This final generated-schema
|
|
15
|
+
* check validates the translated Type-side fields without a cast. Unexpected family fields
|
|
16
|
+
* fail explicitly instead of disappearing through the decoder's default excess-property stripping.
|
|
17
|
+
*/
|
|
18
|
+
export declare const notificationRequest: <S extends Schema.Top>(schema: S, fields: object) => Effect.Effect<S["Type"], NotificationRequestInvalid, never>;
|
|
19
|
+
/** Validate required response fields with the SDK schema without discarding vendor extras. */
|
|
20
|
+
export declare const notificationResponse: <S extends Schema.Top>(schema: S) => (body: S['Type']) => Effect.Effect<S["Type"], ProxmoxParseError, never>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=notification-sdk-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-sdk-input.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-sdk-input.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;AAExC,+FAA+F;AAC/F,qBAAa,0BAA2B,SAAQ,gCAA+C;IAC7F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;CAAG;AAEL;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,MAAM,CAAC,GAAG,UAAU,CAAC,UAAU,MAAM,gEAOhF,CAAC;AAEJ,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,GAC9B,CAAC,SAAS,MAAM,CAAC,GAAG,UAAU,CAAC,YACzB,CAAC,CAAC,MAAM,CAAC,uDAUb,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** PVE 9.2.11 target operations. Named SDK calls retain each endpoint's own request schema. */
|
|
2
|
+
import * as cluster from '@distilled.cloud/proxmox/cluster';
|
|
3
|
+
import type { ProxmoxOpError } from '@distilled.cloud/proxmox/Protocol';
|
|
4
|
+
import * as Effect from 'effect/Effect';
|
|
5
|
+
import type { NotificationTargetProps as Props } from './notification-target.ts';
|
|
6
|
+
export declare const readTarget: (props: Props) => Effect.Effect<import("./notification-target.ts").NotificationTargetAttributes | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").BadRequest | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/caddy").Conflict | Error | import("@distilled.cloud/caddy").Forbidden | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/unstable/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | import("@distilled.cloud/caddy").Locked | import("@distilled.cloud/proxmox/Errors").ParameterVerificationFailed | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("@distilled.cloud/caddy").ServiceUnavailable | import("effect/Cause").TimeoutError | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/caddy").UnprocessableEntity | import("@distilled.cloud/proxmox/Errors").ClientErrors, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
7
|
+
/** No request: replacement planning must reject SDK-only input errors before any DELETE. */
|
|
8
|
+
export declare const validateTargetWrite: (props: Props, create: boolean) => Effect.Effect<void, import("./notification-sdk-input.ts").NotificationRequestInvalid, never>;
|
|
9
|
+
export declare const createTarget: (props: Props) => Effect.Effect<cluster.CreateClusterNotificationEndpointGotifyResponse, Error | import("./notification-sdk-input.ts").NotificationRequestInvalid | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("effect/Cause").TimeoutError | ProxmoxOpError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
10
|
+
export declare const updateTarget: (props: Props) => Effect.Effect<cluster.PutClusterNotificationEndpointGotifyResponse, Error | import("./notification-sdk-input.ts").NotificationRequestInvalid | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("effect/Cause").TimeoutError | ProxmoxOpError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
11
|
+
export declare const deleteTarget: (props: Props) => Effect.Effect<void | cluster.DeleteClusterNotificationEndpointGotifyResponse, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").BadRequest | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/caddy").Conflict | Error | import("@distilled.cloud/caddy").Forbidden | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/unstable/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | import("@distilled.cloud/caddy").Locked | import("@distilled.cloud/proxmox/Errors").ParameterVerificationFailed | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("@distilled.cloud/caddy").ServiceUnavailable | import("effect/Cause").TimeoutError | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/caddy").UnprocessableEntity | import("@distilled.cloud/proxmox/Errors").ClientErrors, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
12
|
+
//# sourceMappingURL=notification-target-distilled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-target-distilled.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-target-distilled.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,EAAoB,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC1F,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,uBAAuB,IAAI,KAAK,EAAE,MAAM,0BAA0B,CAAC;AA2CjF,eAAO,MAAM,UAAU,UAAW,KAAK,qjCAIpC,CAAC;AAkCJ,4FAA4F;AAC5F,eAAO,MAAM,mBAAmB,UAAW,KAAK,UAAU,OAAO,iGAehE,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,KAAK,4WAmBxC,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,KAAK,yWAmBxC,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,KAAK,wiCAaxC,CAAC"}
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* one metric-server uses: this file turns a declaration into a form, and the resource file says
|
|
7
7
|
* what a target IS and when it has changed. The `import type` back is erased, so it is a cycle
|
|
8
8
|
* on paper only.
|
|
9
|
+
* ★ These shapes still feed specGuards and preserve scalar/default/omission mapping. The
|
|
10
|
+
* distilled adapter replaces list fields with typed arrays; the SDK owns their wire encoding.
|
|
9
11
|
*/
|
|
10
12
|
import type { NotificationTargetProps } from './notification-target.ts';
|
|
11
13
|
/** ⚠️ `0` is "PVE holds no port". Integers have come back as strings elsewhere, so parse both. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-target-form.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-target-form.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"notification-target-form.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-target-form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAoBxE,kGAAkG;AAClG,eAAO,MAAM,MAAM,UAAW,OAAO,KAAG,MAGvC,CAAC;AASF;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,UAAW,OAAO,KAAG,MAO1C,CAAC;AAEJ,mGAAmG;AACnG,eAAO,MAAM,UAAU,UAAW,OAAO,KAAG,MAC+C,CAAC;AAK5F;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,KAAK,UAAW,uBAAuB,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAkB1E,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,WAAW,UAAW,uBAAuB,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAGhF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Input } from 'alchemy/Input';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import type { NotificationTargetAttributes as Attributes, NotificationTargetProps as Props } from './notification-target.ts';
|
|
4
|
+
export declare const targetHandlers: {
|
|
5
|
+
/** Targets include built-ins and human-owned endpoints; enrollment remains explicit. */
|
|
6
|
+
list: () => Effect.Effect<never[], never, never>;
|
|
7
|
+
read: ({ olds }: {
|
|
8
|
+
olds: Props;
|
|
9
|
+
}) => Effect.Effect<Attributes | undefined, Error | import("effect/unstable/http/HttpClientError").HttpClientError | import("./credential-errors.ts").PveCredentialDenied, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
10
|
+
diff: ({ news, olds, output, }: {
|
|
11
|
+
news: Input<Props>;
|
|
12
|
+
olds: Props;
|
|
13
|
+
output: Attributes | undefined;
|
|
14
|
+
}) => Effect.Effect<{
|
|
15
|
+
readonly action: 'replace';
|
|
16
|
+
readonly deleteFirst: boolean;
|
|
17
|
+
} | {
|
|
18
|
+
readonly deleteFirst?: never;
|
|
19
|
+
readonly action: "noop" | "update";
|
|
20
|
+
} | undefined, Error | import("effect/unstable/http/HttpClientError").HttpClientError | import("./credential-errors.ts").PveCredentialDenied, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
21
|
+
reconcile: ({ news }: {
|
|
22
|
+
news: Props;
|
|
23
|
+
}) => Effect.Effect<Attributes, Error | import("effect/unstable/http/HttpClientError").HttpClientError | import("./credential-errors.ts").PveCredentialDenied, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
24
|
+
/** Vendor DELETE reverts built-ins; SDK NotFound makes an absent custom target idempotent. */
|
|
25
|
+
delete: ({ olds }: {
|
|
26
|
+
olds: Props;
|
|
27
|
+
}) => Effect.Effect<void | import("@distilled.cloud/proxmox/cluster").DeleteClusterNotificationEndpointGotifyResponse, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").BadRequest | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/caddy").Conflict | Error | import("@distilled.cloud/caddy").Forbidden | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/unstable/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | import("@distilled.cloud/caddy").Locked | import("@distilled.cloud/proxmox/Errors").ParameterVerificationFailed | import("./distilled-pve.ts").PveClusterExhausted | import("./credential-errors.ts").PveCredentialDenied | import("@distilled.cloud/caddy").ServiceUnavailable | import("effect/Cause").TimeoutError | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/caddy").UnprocessableEntity | import("@distilled.cloud/proxmox/Errors").ClientErrors, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=notification-target-lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-target-lifecycle.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-target-lifecycle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EACV,4BAA4B,IAAI,UAAU,EAC1C,uBAAuB,IAAI,KAAK,EACjC,MAAM,0BAA0B,CAAC;AAclC,eAAO,MAAM,cAAc;IACzB,wFAAwF;IACxF,IAAI;IACJ,IAAI,aAAa;QAAE,IAAI,EAAE,KAAK,CAAA;KAAE;IAMhC,IAAI,4BAID;QACD,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACnB,IAAI,EAAE,KAAK,CAAC;QACZ,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;KAChC;yBAUsB,SAAS;;;;;;IAWhC,SAAS,aAAa;QAAE,IAAI,EAAE,KAAK,CAAA;KAAE;IAarC,8FAA8F;IAC9F,MAAM,aAAa;QAAE,IAAI,EAAE,KAAK,CAAA;KAAE;CACnC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Pure target state and vendor guards, kept separate from the SDK lifecycle. */
|
|
2
|
+
import type { NotificationTargetAttributes, NotificationTargetProps } from './notification-target.ts';
|
|
3
|
+
import type { PveSpec } from './resource-spec.ts';
|
|
4
|
+
export declare const targetSpec: PveSpec<NotificationTargetProps, NotificationTargetAttributes>;
|
|
5
|
+
//# sourceMappingURL=notification-target-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-target-spec.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-target-spec.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,KAAK,EACV,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,uBAAuB,EAAE,4BAA4B,CAyDrF,CAAC"}
|
|
@@ -45,14 +45,13 @@
|
|
|
45
45
|
* ⚠️ PREFER A SECOND ROLE GRANTED AT `/mapping/notifications` OVER WIDENING THE PROVISIONING ROLE
|
|
46
46
|
* ON `/`. `/mapping` also holds the PCI and USB passthrough maps, so Mapping.Modify at the root
|
|
47
47
|
* lets a credential scoped to make containers rewire somebody's hardware.
|
|
48
|
-
* ⛔
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* is the signature — grant Mapping.Audit to the READ role before changing anything else.
|
|
48
|
+
* ⛔ THE OLD HAND CLIENT FOLDED 403 INTO "ABSENT": the plan said create, PVE refused the
|
|
49
|
+
* duplicate, and the fault was an ACL all along. Distilled now propagates that failure.
|
|
50
|
+
* Grant Mapping.Audit to the READ role before adopting; only typed NotFound means absent.
|
|
52
51
|
*/
|
|
53
52
|
import { Resource } from 'alchemy';
|
|
54
53
|
import * as Provider from 'alchemy/Provider';
|
|
55
|
-
import {
|
|
54
|
+
import type { PveRequirements, WithTarget } from './resource-spec.ts';
|
|
56
55
|
/** The four families PVE ships. `GET /cluster/notifications/endpoints` lists exactly these. */
|
|
57
56
|
export type NotificationTargetType = 'gotify' | 'sendmail' | 'smtp' | 'webhook';
|
|
58
57
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-target.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-target.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"notification-target.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGtE,+FAA+F;AAC/F,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhF;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAwB,SAAQ,UAAU;IACzD,gFAAgF;IAChF,IAAI,EAAE,sBAAsB,CAAC;IAC7B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,iFAAiF;IACjF,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,uFAAuF;IACvF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,KAAK,CAAC;IACvC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;IAChC;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,8FAA8F;IAC9F,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,4FAA4F;IAC5F,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAA0B,SAAQ,QAAQ,CACzD,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,KAAK,EACL,eAAe,CAChB;CAAG;AAEJ,eAAO,MAAM,yBAAyB,4DAErC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,+IAI3C,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* `Pbs.Datastore`'s two vendor endpoints, and the plan-time check over its two forms.
|
|
3
3
|
*
|
|
4
4
|
* ★ A FILE OF ITS OWN BECAUSE THIS FAMILY DOES NOT USE `pveHandlers`. It writes its own `diff` and
|
|
5
|
-
* `reconcile` (
|
|
5
|
+
* `reconcile` (bounded readback handles settling after a write; create returns no task id), so
|
|
6
6
|
* it cannot inherit the guard from resource.ts — and a copy of the two calls inside that already
|
|
7
7
|
* long file is exactly the per-resource copy-paste the shared handler exists to prevent.
|
|
8
8
|
*
|
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A PBS datastore
|
|
3
|
-
*
|
|
2
|
+
* A PBS datastore's pure vendor forms and coercion back to comparable state. SDK transport is
|
|
3
|
+
* in pbs-datastore-wire.ts; lifecycle behavior is in pbs-datastore-lifecycle.ts.
|
|
4
4
|
*
|
|
5
5
|
* ★ SPLIT OUT OF pbs-datastore.ts FOR THE 250-LINE CAP, the seam notification-target-form.ts uses:
|
|
6
|
-
* this file
|
|
7
|
-
* and
|
|
6
|
+
* this file originally held PBS encoding beside forms, while the resource held its declaration
|
|
7
|
+
* and five handlers. The `import type` back is erased, so it is a cycle on paper only.
|
|
8
8
|
*
|
|
9
|
-
* ⛔ THIS FILE
|
|
9
|
+
* ⛔ HISTORICAL EXTRACTION NOTE: THIS FILE EXCEEDED THE 250-LINE CAP IN THE ORIGINAL DRAFT. `PbsTarget`,
|
|
10
10
|
* `PbsRole`, `PbsError`, `pbsAuthorization`, `PveForm`, `encode`, `pbs` and `settle` — about 150
|
|
11
11
|
* lines — are a PBS CLIENT, not a datastore form, and belong in `pbs-client.ts`. Lifting them
|
|
12
12
|
* leaves this file near 200 and costs nothing but a move. It was not done here only because the
|
|
13
13
|
* family was commissioned as a two-file split; ceph-pool is the in-package precedent for three
|
|
14
14
|
* (ceph-pool.ts + ceph-pool-form.ts + ceph-pool-settle.ts, 532 lines for one family). Everything
|
|
15
15
|
* in that list is also what Pbs.SyncJob, Pbs.PruneJob and Pbs.Remote will each need unchanged,
|
|
16
|
-
* so the second PBS family
|
|
16
|
+
* so the second PBS family forced that move. The SDK and focused siblings now own these seams.
|
|
17
|
+
* ⛔ DO NOT MEET THE CAP BY CUTTING COMMENTS.
|
|
17
18
|
*/
|
|
18
|
-
import * as Effect from 'effect/Effect';
|
|
19
|
-
import { type PveForm } from './client.ts';
|
|
20
19
|
import type { PbsTarget as ApiPbsTarget } from './credentials.ts';
|
|
21
20
|
import type { PbsDatastoreProps } from './pbs-datastore.ts';
|
|
22
21
|
/**
|
|
23
|
-
* ★ PBS
|
|
24
|
-
* own `PbsTarget`, `PbsError`, `pbsAuthorization`, form encoder and `pve()` — a near-copy of
|
|
25
|
-
* client.ts differing in one header.
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
22
|
+
* ★ PBS ORIGINALLY REUSED THE PVE CLIENT RATHER THAN OWNING ANOTHER. An earlier draft carried
|
|
23
|
+
* its own `PbsTarget`, `PbsError`, `pbsAuthorization`, form encoder and `pve()` — a near-copy of
|
|
24
|
+
* client.ts differing in one header. The shared target's `scheme` replaced that copy. This
|
|
25
|
+
* family now uses the distilled PBS SDK through `distilled-pbs.ts`, retaining the same leased
|
|
26
|
+
* credentials and PBS authorization scheme. The important encoding distinction survives:
|
|
27
|
+
* PBS decodes a multi-valued field from repeated keys where PVE wants a comma string. The SDK
|
|
28
|
+
* protocol owns that behavior; these pure forms describe only this datastore's scalar fields.
|
|
30
29
|
*
|
|
31
30
|
* 🔴 THIS ALIAS SAID `= PveTarget` AND IT WAS WRONG — Pbs.Datastore REQUIRED A PVE TARGET. When
|
|
32
31
|
* `credentials.ts` grew a real `PbsTarget` with `scheme: 'pbs'`, this line was left pointing at
|
|
33
32
|
* the PVE type, which pins `scheme: 'pve'`. So the one family that most needs the discriminant
|
|
34
33
|
* was the one family that refused the correct value: declaring a datastore against the PBS host
|
|
35
34
|
* failed to compile with `Type '"pbs"' is not assignable to type 'Input<"pve">'`, and passing a
|
|
36
|
-
* PVE target compiled fine and would have 401'd every call — which `read`
|
|
37
|
-
* so the plan would say CREATE for a datastore holding the estate's backups.
|
|
35
|
+
* PVE target compiled fine and would have 401'd every call — which the old `read` folded into
|
|
36
|
+
* "absent", so the plan would say CREATE for a datastore holding the estate's backups.
|
|
38
37
|
* ⛔ IT SURVIVED BECAUSE NOTHING EVER DECLARED ONE. The provider was registered in
|
|
39
38
|
* alchemy.run.ts from the day it was written and `pveHandlers`' `list` answers empty, so
|
|
40
39
|
* registration exercises no call site at all. Three sibling families import `PbsTarget` from
|
|
@@ -99,7 +98,7 @@ export declare const matches: (live: PbsDatastoreAttributes, props: PbsDatastore
|
|
|
99
98
|
* slot, not of the declaration; one that could re-point it is one that can send backups to the
|
|
100
99
|
* wrong drive.
|
|
101
100
|
*/
|
|
102
|
-
export declare const createForm: (props: PbsDatastoreProps) =>
|
|
101
|
+
export declare const createForm: (props: PbsDatastoreProps) => Record<string, string>;
|
|
103
102
|
/**
|
|
104
103
|
* ⛔ THERE IS NO `delete` LIST HERE, AND THAT IS A CHOICE ABOUT BACKUPS RATHER THAN AN OMISSION.
|
|
105
104
|
* sdn-vnet.ts derives one from absent props, which is right for an alias and wrong for a
|
|
@@ -119,29 +118,6 @@ export declare const createForm: (props: PbsDatastoreProps) => PveForm;
|
|
|
119
118
|
* element that fails the enum check. `PveForm` and `encode` already carry arrays for exactly
|
|
120
119
|
* this. ⚠️ REASONED FROM THE PUBLISHED SCHEMA, NOT PROVEN ON A WIRE.
|
|
121
120
|
*/
|
|
122
|
-
export declare const updateForm: (props: PbsDatastoreProps) =>
|
|
121
|
+
export declare const updateForm: (props: PbsDatastoreProps) => Record<string, string>;
|
|
123
122
|
export declare const object: (props: PbsDatastoreProps) => string;
|
|
124
|
-
/**
|
|
125
|
-
* The live datastore, or undefined.
|
|
126
|
-
*
|
|
127
|
-
* ⛔ `name` IS THE PRESENCE TEST, NOT THE STATUS CODE — PBS does not answer 404 for a section that
|
|
128
|
-
* is missing from `datastore.cfg`, it answers a generic error, so there is no code to key off.
|
|
129
|
-
* ⛔ A MISSING READ PRIVILEGE THEREFORE LOOKS EXACTLY LIKE ABSENCE, because the fold below cannot
|
|
130
|
-
* tell them apart. The signature is a plan that says CREATE followed by PBS answering
|
|
131
|
-
* "datastore '<name>' already exists." — that pair means Datastore.Audit, not a missing
|
|
132
|
-
* datastore. It is loud and non-destructive, which is the only reason the fold is tolerable here;
|
|
133
|
-
* see the ⛔ on `readRole` in resource.ts for the PVE families where it is not.
|
|
134
|
-
* ⛔ ON THE DELETE PATH THE SAME FOLD IS A LIE, AND THIS IS THE ONE HAZARD IN THIS FAMILY I COULD
|
|
135
|
-
* NOT CLOSE. `delete` settles by polling this read until it answers `undefined` — and a `read`
|
|
136
|
-
* role that lacks `Datastore.Audit` answers `undefined` from the very first poll, so EVERY delete
|
|
137
|
-
* would report success while the datastore stood. Worse, the two lanes are different leases: the
|
|
138
|
-
* DELETE goes out under `provision` and may genuinely fail, and this read cannot see that it did.
|
|
139
|
-
* ★ THE SHAPE OF THE FIX IS ALREADY IN THIS PACKAGE: `confirmAbsent` in ceph-pool-settle.ts asks
|
|
140
|
-
* a SECOND, DIFFERENT question — does the collection LIST this object? — and lets a failure
|
|
141
|
-
* PROPAGATE rather than folding it, so "I could not ask" fails the deploy instead of passing
|
|
142
|
-
* it. Add the same over `GET /config/datastore` before anyone relies on a reported deletion.
|
|
143
|
-
* ⚠️ UNTIL THEN THE PRECONDITION IS EXPLICIT: the `read` role MUST hold `Datastore.Audit` on the
|
|
144
|
-
* datastore, or this provider cannot tell a deletion from a refusal.
|
|
145
|
-
*/
|
|
146
|
-
export declare const readOne: (props: PbsDatastoreProps) => Effect.Effect<PbsDatastoreAttributes | undefined, never, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
147
123
|
//# sourceMappingURL=pbs-datastore-form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pbs-datastore-form.d.ts","sourceRoot":"","sources":["../../src/proxmox/pbs-datastore-form.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pbs-datastore-form.d.ts","sourceRoot":"","sources":["../../src/proxmox/pbs-datastore-form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC;AAErC,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,4FAA4F;IAC5F,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB,wBAAwB,EAAE,MAAM,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SACf,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,SACtB,iBAAiB,KACvB,sBAoBD,CAAC;AAIH;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,SAAU,sBAAsB,SAAS,iBAAiB,YAkBK,CAAC;AAqCpF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,UAAW,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CASzE,CAAC;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,UAAW,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAmB,CAAC;AAE/F,eAAO,MAAM,MAAM,UAAW,iBAAiB,WAAqC,CAAC"}
|
|
@@ -33,13 +33,15 @@ export declare const guardBackend: (live: PbsDatastoreAttributes, props: PbsData
|
|
|
33
33
|
/**
|
|
34
34
|
* Wait for PBS to finish, then answer the last thing it said.
|
|
35
35
|
*
|
|
36
|
-
* ⛔
|
|
36
|
+
* ⛔ THE ORIGINAL CREATE-WORKER ASSUMPTION BELOW WAS REASONED, NOT MEASURED.
|
|
37
37
|
* `POST /config/datastore` answers with a UPID while a `create-datastore` task builds the chunk
|
|
38
38
|
* store's 65536 directories; only when that finishes does the section reach `datastore.cfg`. An
|
|
39
39
|
* immediate read-back therefore sees a datastore that is not there yet, and the factory's "the
|
|
40
40
|
* write returned no error but the object is still absent" would fire on a create going perfectly.
|
|
41
41
|
* The DELETE forks a worker too. ⚠️ DOCUMENTED FROM THE PUBLISHED SCHEMA, NOT MEASURED — I hold
|
|
42
|
-
* no PBS token.
|
|
42
|
+
* no PBS token. The pinned PBS 4.2.6-1 schema actually declares a NULL create response,
|
|
43
|
+
* while DELETE declares a UPID. We preserve bounded readback for both; a synchronous create
|
|
44
|
+
* succeeds at the first poll rather than depending on the old UPID assumption.
|
|
43
45
|
* ★ IT TAKES THE READ AS AN EFFECT RATHER THAN A FUNCTION — the one simplification over
|
|
44
46
|
* ceph-pool-settle.ts: an Effect is a description, so re-running it re-reads and no dependency
|
|
45
47
|
* has to be threaded back in to avoid a cycle.
|
|
@@ -48,8 +50,9 @@ export declare const guardBackend: (live: PbsDatastoreAttributes, props: PbsData
|
|
|
48
50
|
* Anything still unsettled after two minutes is a fault to surface, not a wait to lengthen, and
|
|
49
51
|
* the caller's message points at the task log, which is where the real answer is. `Effect.sleep`
|
|
50
52
|
* yields between polls; nothing here parks a call on one long wait.
|
|
51
|
-
* ⚠️
|
|
52
|
-
*
|
|
53
|
+
* ⚠️ THE ORIGINAL TRANSPORT MINTED A TOKEN PER CALL, making task-owner polling unreliable.
|
|
54
|
+
* The SDK runner now reuses leases, but create has no task id in its measured response schema.
|
|
55
|
+
* This migration therefore preserves bounded readback rather than inventing a task handle.
|
|
53
56
|
*/
|
|
54
57
|
export declare const settle: <A, E, R>(read: Effect.Effect<A, E, R>, done: (live: A) => boolean) => Effect.Effect<A, E, R>;
|
|
55
58
|
//# sourceMappingURL=pbs-datastore-guard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pbs-datastore-guard.d.ts","sourceRoot":"","sources":["../../src/proxmox/pbs-datastore-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,sBAAsB,EAAU,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmB5D;;;;GAIG;AACH,eAAO,MAAM,SAAS,SAAU,sBAAsB,SAAS,iBAAiB,sCAWzE,CAAC;AAER;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,SAAU,sBAAsB,SAAS,iBAAiB,sCAY5E,CAAC;AAER
|
|
1
|
+
{"version":3,"file":"pbs-datastore-guard.d.ts","sourceRoot":"","sources":["../../src/proxmox/pbs-datastore-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,sBAAsB,EAAU,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmB5D;;;;GAIG;AACH,eAAO,MAAM,SAAS,SAAU,sBAAsB,SAAS,iBAAiB,sCAWzE,CAAC;AAER;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,SAAU,sBAAsB,SAAS,iBAAiB,sCAY5E,CAAC;AAER;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,2BAQpF,CAAC"}
|