@homeflare/distilled-proxmox 0.3.0 → 0.3.1

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/README.md CHANGED
@@ -34,12 +34,18 @@ every failed write can carry) and non-retryable `BadRequest` fallback, and
34
34
  request that couldn't reach its target node) on the task-management
35
35
  operations the vendor schema itself marks `proxyto: "node"`.
36
36
 
37
- Also ships `awaitTask` (`./Task`), because a PVE POST/PUT/DELETE that
38
- queues a long-running action answers 200 with a bare task id the moment it
39
- is QUEUED, not once it finishes — `awaitTask` polls the generated
40
- `getNodeTaskStatus` operation until an `exitstatus` appears, and fails
41
- unless it is EXACTLY `"OK"` (PVE also answers `"OK (warnings)"`, which is
42
- not success).
37
+ Task polling belongs in the Alchemy provider: the SDK exports the generated
38
+ `getNodeTaskStatus` operation, and the caller owns its bound and failure policy.
39
+
40
+ Pool, backup-job and metric-server missing reads now expose precise typed tags
41
+ from vendor source at pve-manager 9.2.11. Backup-job absence uses a sole nested
42
+ `errors.id` under the parameter-verification envelope; other validation errors
43
+ retain their structured failure. PVE form arrays use repeated keys, preserving
44
+ commas within a rule/property value. Scalar comma lists and query binding are
45
+ unchanged. Protocol fixtures exercise both the accepted and rejected shapes.
46
+
47
+ `PoolNotFound` keeps a non-retryable client-error category despite PVE's wire
48
+ status 500; the patch matcher records the actual status independently.
43
49
 
44
50
  ```ts
45
51
  import * as Proxmox from '@distilled.cloud/proxmox'; // aliased onto this package — see docs/distilled-interim.md
@@ -70,13 +76,12 @@ From the distilled clone's `homeflare/proxmox` worktree:
70
76
  ```sh
71
77
  DISTILLED_SPECS_LOCAL=1 pnpm --filter @distilled.cloud/proxmox run convert
72
78
  DISTILLED_SPECS_LOCAL=1 pnpm --filter @distilled.cloud/proxmox run generate
73
- pnpm --filter @distilled.cloud/proxmox run typecheck
79
+ pnpm typecheck:ci
74
80
  pnpm format && pnpm specs:check
75
81
  ```
76
82
 
77
- Then copy `src/` here verbatim, bump this package's own `version` (a patch
78
- release — the generated content changed, not this package's own shape), add
79
- a changeset, and let the kit's normal release flow publish it.
83
+ Then copy `src/` here verbatim and add a changeset. The normal release flow
84
+ versions and publishes the package.
80
85
 
81
86
  ## License
82
87
 
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=config-not-found.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-not-found.test.d.ts","sourceRoot":"","sources":["../src/config-not-found.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,96 @@
1
+ /** PVE 9.2.11 vendor-source fixtures; missing BackupJob GET also measured 2026-09-24. */
2
+ import { describe, expect, test } from "bun:test";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Layer from "effect/Layer";
5
+ import * as HttpClient from "effect/unstable/http/HttpClient";
6
+ import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
7
+ import { credentials } from "./credentials.js";
8
+ import * as Retry from "./retry.js";
9
+ import * as pools from "./services/pools.js";
10
+ import * as cluster from "./services/cluster.js";
11
+ const call = (op, status, body) => Effect.runPromise(op.pipe(Retry.none, Effect.provide(credentials({
12
+ baseUrl: "https://pve.test:8006",
13
+ tokenId: "test@pve!test",
14
+ secret: "fake",
15
+ })), Effect.provide(Layer.succeed(HttpClient.HttpClient, HttpClient.make((request) => Effect.succeed(HttpClientResponse.fromWeb(request, Response.json(body, { status })))))), Effect.flip));
16
+ describe("precise config absence tags", () => {
17
+ for (const [name, op] of [
18
+ ["item read", pools.getPool({ poolid: "absent" })],
19
+ ["index read", pools.listPools({ poolid: "absent" })],
20
+ ["item update", pools.putPool({ poolid: "absent" })],
21
+ ["collection update", pools.putPools({ poolid: "absent" })],
22
+ ["item delete", pools.deletePool({ poolid: "absent" })],
23
+ ["collection delete", pools.deletePools({ poolid: "absent" })],
24
+ ]) {
25
+ test(`Pool ${name}`, async () => {
26
+ expect(await call(op, 500, {
27
+ data: null,
28
+ message: "pool 'absent' does not exist\n",
29
+ })).toMatchObject({ _tag: "PoolNotFound" });
30
+ });
31
+ }
32
+ for (const [name, op] of [
33
+ ["read", cluster.getClusterBackup({ id: "absent" })],
34
+ ["delete", cluster.deleteClusterBackup({ id: "absent" })],
35
+ ["volumes", cluster.getClusterBackupIncludedVolumes({ id: "absent" })],
36
+ ]) {
37
+ test(`BackupJob ${name}`, async () => {
38
+ expect(await call(op, 400, {
39
+ data: null,
40
+ message: "Parameter verification failed.\n",
41
+ errors: { id: "No such job 'absent'" },
42
+ })).toMatchObject({ _tag: "BackupJobNotFound" });
43
+ });
44
+ }
45
+ test("common HTTP failures remain in every operation's typed error union", async () => {
46
+ const op = pools.getPool({ poolid: "absent" }).pipe(Effect.catchTag("NotFound", () => Effect.fail({ _tag: "HandledNotFound" })), Effect.catchTag("Forbidden", () => Effect.fail({ _tag: "HandledForbidden" })));
47
+ expect(await call(op, 404, { message: "missing", data: null })).toMatchObject({ _tag: "HandledNotFound" });
48
+ expect(await call(op, 403, { message: "denied", data: null })).toMatchObject({ _tag: "HandledForbidden" });
49
+ });
50
+ test("MetricServer read and update have distinct absence messages", async () => {
51
+ expect(await call(cluster.getClusterMetricsServer({ id: "absent" }), 500, {
52
+ data: null,
53
+ message: "status server entry 'absent' does not exist\n",
54
+ })).toMatchObject({ _tag: "MetricServerNotFound" });
55
+ expect(await call(cluster.putClusterMetricsServer({
56
+ id: "absent",
57
+ server: "localhost",
58
+ port: "8086",
59
+ }), 500, {
60
+ data: null,
61
+ message: "no such server 'absent'\n",
62
+ })).toMatchObject({ _tag: "MetricServerNotFound" });
63
+ });
64
+ test("unrelated, multi-field, and differently named validation are not absence", async () => {
65
+ for (const errors of [
66
+ { id: "invalid configuration ID" },
67
+ { id: "No such job 'absent'", schedule: "invalid schedule" },
68
+ { comment: "No such job 'absent'" },
69
+ ]) {
70
+ expect(await call(cluster.getClusterBackup({ id: "absent" }), 400, {
71
+ data: null,
72
+ message: "Parameter verification failed.\n",
73
+ errors,
74
+ })).toMatchObject({ _tag: "ParameterVerificationFailed", errors });
75
+ }
76
+ });
77
+ test("a pool containing guests and a generic server failure propagate", async () => {
78
+ for (const message of [
79
+ "pool 'absent' is not empty (contains VM 100)\n",
80
+ "unrelated failure",
81
+ ]) {
82
+ expect(await call(pools.deletePool({ poolid: "absent" }), 500, {
83
+ data: null,
84
+ message,
85
+ })).toMatchObject({ _tag: "InternalServerError" });
86
+ }
87
+ });
88
+ test("missing backup text is not attached to unrelated operations", async () => {
89
+ expect(await call(cluster.deleteClusterMetricsServer({ id: "absent" }), 400, {
90
+ data: null,
91
+ message: "Parameter verification failed.\n",
92
+ errors: { id: "No such job 'absent'" },
93
+ })).toMatchObject({ _tag: "ParameterVerificationFailed" });
94
+ });
95
+ });
96
+ //# sourceMappingURL=config-not-found.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-not-found.test.js","sourceRoot":"","sources":["../src/config-not-found.test.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,kBAAkB,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,qBAAqB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AAEjD,MAAM,IAAI,GAAG,CACX,EAAyC,EACzC,MAAc,EACd,IAAa,EACb,EAAE,CACF,MAAM,CAAC,UAAU,CACf,EAAE,CAAC,IAAI,CACL,KAAK,CAAC,IAAI,EACV,MAAM,CAAC,OAAO,CACZ,WAAW,CAAC;IACV,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,e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F,MAAM,CACJ,MAAM,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE;gBAC1D,IAAI,EAAE,IAAI;gBACV,OAAO,EAAE,kCAAkC;gBAC3C,MAAM;aACP,CAAC,CACH,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,MAAM,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,iEAAiE,EAAE,KAAK,IAAI,EAAE;QACjF,KAAK,MAAM,OAAO,IAAI;YACpB,gDAAgD;YAChD,mBAAmB;SACpB,EAAE,CAAC;YACF,MAAM,CACJ,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE;gBACtD,IAAI,EAAE,IAAI;gBACV,OAAO;aACR,CAAC,CACH,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,6DAA6D,EAAE,KAAK,IAAI,EAAE;QAC7E,MAAM,CACJ,MAAM,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE;YACpE,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,kCAAkC;YAC3C,MAAM,EAAE,EAAE,EAAE,EAAE,sBAAsB,EAAE;SACvC,CAAC,CACH,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/dist/errors.d.ts CHANGED
@@ -35,7 +35,7 @@
35
35
  * see the patch file).
36
36
  */
37
37
  export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
38
- import type { BadRequest, DefaultErrors as CoreDefaultErrors } from "@distilled.cloud/core/errors";
38
+ import type { API_ERRORS } from "@distilled.cloud/core/errors";
39
39
  import * as Schema from "effect/Schema";
40
40
  import * as Category from "@distilled.cloud/core/category";
41
41
  declare const ParameterVerificationFailed_base: Schema.Class<ParameterVerificationFailed, Schema.TaggedStruct<"ParameterVerificationFailed", {
@@ -131,5 +131,5 @@ export type ClientErrors = UnknownProxmoxError | ProxmoxParseError;
131
131
  * header: it rides only the specific operations `patches/nodes/
132
132
  * task-polling.json` adds it to.
133
133
  */
134
- export type DefaultErrors = CoreDefaultErrors | BadRequest | ParameterVerificationFailed | ClientErrors;
134
+ export type DefaultErrors = InstanceType<(typeof API_ERRORS)[number]> | ParameterVerificationFailed | ClientErrors;
135
135
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAOtC,OAAO,KAAK,EACV,UAAU,EACV,aAAa,IAAI,iBAAiB,EACnC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;;;;;;;;;AAE3D;;;;;;;;GAQG;AACH,qBAAa,2BAA4B,SAAQ,gCAMb;CAAG;;;;;;;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MAAM,CAAC,MAAM;CAC1B,CACF;CAAG"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * PVE's form arrays use repeated keys, never Stripe's indexed fields.
3
+ *
4
+ * PVE 9.2.11 notification schemas declare arrays (mailto, header, target,
5
+ * match-field, delete). The vendor UI submits repeated keys; its Perl
6
+ * URL-encoded decoder joins them with NUL before schema validation. The
7
+ * existing kit notification-target-form.ts records that decoder/UI evidence
8
+ * (2026-09-14); no production multi-header write was made for this fix.
9
+ *
10
+ * Keep core's credentials, labels, schema key mapping, and query encoding.
11
+ * Only top-level scalar list entries in a form body change: header[0]=a
12
+ * becomes header=a. A property-string item's commas remain inside the item.
13
+ * A scalar comma list, an embedded NUL, or a GET/DELETE query is unchanged.
14
+ */
15
+ import * as API from "@distilled.cloud/core/api";
16
+ import * as Layer from "effect/Layer";
17
+ export declare const withPveFormArrays: (base: Layer.Layer<API.Protocol>) => Layer.Layer<API.Protocol>;
18
+ //# sourceMappingURL=protocol-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-form.d.ts","sourceRoot":"","sources":["../src/protocol-form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAmBtC,eAAO,MAAM,iBAAiB,SACtB,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,KAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAWE,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * PVE's form arrays use repeated keys, never Stripe's indexed fields.
3
+ *
4
+ * PVE 9.2.11 notification schemas declare arrays (mailto, header, target,
5
+ * match-field, delete). The vendor UI submits repeated keys; its Perl
6
+ * URL-encoded decoder joins them with NUL before schema validation. The
7
+ * existing kit notification-target-form.ts records that decoder/UI evidence
8
+ * (2026-09-14); no production multi-header write was made for this fix.
9
+ *
10
+ * Keep core's credentials, labels, schema key mapping, and query encoding.
11
+ * Only top-level scalar list entries in a form body change: header[0]=a
12
+ * becomes header=a. A property-string item's commas remain inside the item.
13
+ * A scalar comma list, an embedded NUL, or a GET/DELETE query is unchanged.
14
+ */
15
+ import * as API from "@distilled.cloud/core/api";
16
+ import * as Effect from "effect/Effect";
17
+ import * as Layer from "effect/Layer";
18
+ import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest";
19
+ const repeatedFormKeys = (request) => {
20
+ if (request.body._tag !== "Uint8Array" ||
21
+ request.body.contentType !== "application/x-www-form-urlencoded")
22
+ return request;
23
+ const fields = new URLSearchParams(new TextDecoder().decode(request.body.body));
24
+ const repeated = [];
25
+ for (const [key, value] of fields) {
26
+ repeated.push([key.replace(/^([^\[\]]+)\[\d+\]$/, "$1"), value]);
27
+ }
28
+ return HttpClientRequest.bodyUrlParams(request, repeated);
29
+ };
30
+ export const withPveFormArrays = (base) => Layer.effect(API.Protocol, Effect.gen(function* () {
31
+ const protocol = yield* API.Protocol;
32
+ return API.Protocol.of({
33
+ ...protocol,
34
+ encode: (args) => protocol.encode(args).pipe(Effect.map(repeatedFormKeys)),
35
+ });
36
+ })).pipe(Layer.provide(base));
37
+ //# sourceMappingURL=protocol-form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-form.js","sourceRoot":"","sources":["../src/protocol-form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,iBAAiB,MAAM,wCAAwC,CAAC;AAE5E,MAAM,gBAAgB,GAAG,CAAC,OAA4C,EAAE,EAAE;IACxE,IACE,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,YAAY;QAClC,OAAO,CAAC,IAAI,CAAC,WAAW,KAAK,mCAAmC;QAEhE,OAAO,OAAO,CAAC;IACjB,MAAM,MAAM,GAAG,IAAI,eAAe,CAChC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAC5C,CAAC;IACF,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;QAClC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,iBAAiB,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,IAA+B,EACJ,EAAE,CAC7B,KAAK,CAAC,MAAM,CACV,GAAG,CAAC,QAAQ,EACZ,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;IACrC,OAAO,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrB,GAAG,QAAQ;QACX,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;KAC3D,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=protocol-form.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-form.test.d.ts","sourceRoot":"","sources":["../src/protocol-form.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,68 @@
1
+ /** PVE 9.2.11 schema arrays must survive the vendor's repeated-key decoder. */
2
+ import { expect, test } from "bun:test";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Layer from "effect/Layer";
5
+ import * as HttpClient from "effect/unstable/http/HttpClient";
6
+ import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest";
7
+ import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
8
+ import { credentials } from "./credentials.js";
9
+ import * as Retry from "./retry.js";
10
+ import * as cluster from "./services/cluster.js";
11
+ import * as nodes from "./services/nodes.js";
12
+ const capture = async (op) => {
13
+ const requests = [];
14
+ await Effect.runPromise(op.pipe(Retry.none, Effect.provide(credentials({
15
+ baseUrl: "https://pve.test:8006",
16
+ tokenId: "test@pve!test",
17
+ secret: "fake",
18
+ })), Effect.provide(Layer.succeed(HttpClient.HttpClient, HttpClient.make((request) => {
19
+ requests.push(request);
20
+ return Effect.succeed(HttpClientResponse.fromWeb(request, Response.json({ data: null })));
21
+ })))));
22
+ const request = requests[0];
23
+ const form = request.body._tag === "Uint8Array"
24
+ ? new URLSearchParams(new TextDecoder().decode(request.body.body))
25
+ : new URLSearchParams();
26
+ return { request, form };
27
+ };
28
+ test("matcher arrays repeat the wire key; commas within a rule stay inside that item", async () => {
29
+ const { request, form } = await capture(cluster.createClusterNotificationMatcher({
30
+ name: "matcher",
31
+ target: ["mail", "webhook"],
32
+ match_field: ["exact:type=vzdump", "regex:hostname=one,two"],
33
+ }));
34
+ expect(request.method).toBe("POST");
35
+ expect(form.getAll("target")).toEqual(["mail", "webhook"]);
36
+ expect(form.getAll("match-field")).toEqual([
37
+ "exact:type=vzdump",
38
+ "regex:hostname=one,two",
39
+ ]);
40
+ expect([...form.keys()].some((key) => key.includes("["))).toBe(false);
41
+ });
42
+ test("webhook property-string headers remain separate values", async () => {
43
+ const headers = ["name=X-One,value=YQ==", "name=X-Two,value=Yg=="];
44
+ const { form } = await capture(cluster.createClusterNotificationEndpointWebhook({
45
+ name: "webhook",
46
+ method: "post",
47
+ url: "https://example.com/hook",
48
+ header: headers,
49
+ }));
50
+ expect(form.getAll("header")).toEqual(headers);
51
+ });
52
+ test("array delete fields repeat while scalar comma lists remain scalar", async () => {
53
+ const { form } = await capture(cluster.putClusterNotificationMatcher({
54
+ name: "matcher",
55
+ delete: ["match-field", "match-calendar"],
56
+ }));
57
+ expect(form.getAll("delete")).toEqual(["match-field", "match-calendar"]);
58
+ const scalar = await capture(cluster.putClusterBackup({ id: "job", vmid: "100,101" }));
59
+ expect(scalar.form.getAll("vmid")).toEqual(["100,101"]);
60
+ });
61
+ test("DELETE stays bodyless and its flags stay query parameters", async () => {
62
+ const { request, form } = await capture(nodes.deleteNodeCephFs({ node: "node", name: "fs", remove_pools: "1" }));
63
+ expect(request.method).toBe("DELETE");
64
+ expect(request.body._tag).toBe("Empty");
65
+ expect(new URL(request.url).searchParams.get("remove-pools")).toBe("1");
66
+ expect([...form]).toEqual([]);
67
+ });
68
+ //# sourceMappingURL=protocol-form.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-form.test.js","sourceRoot":"","sources":["../src/protocol-form.test.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,iBAAiB,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,kBAAkB,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,qBAAqB,CAAC;AAE7C,MAAM,OAAO,GAAG,KAAK,EAAQ,EAAyC,EAAE,EAA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C,GAAG,CAAC,QAAQ,CA4ErD,CAAC"}
package/dist/protocol.js CHANGED
@@ -70,6 +70,7 @@ import * as Redacted from "effect/Redacted";
70
70
  import { BadRequest, HTTP_STATUS_MAP, } from "@distilled.cloud/core/errors";
71
71
  import { makeRestProtocol, } from "@distilled.cloud/core/protocol-rest";
72
72
  import { Credentials } from "./credentials.js";
73
+ import { withPveFormArrays } from "./protocol-form.js";
73
74
  import { ParameterVerificationFailed, UnknownProxmoxError, } from "./errors.js";
74
75
  /**
75
76
  * PVE's failure envelope is `{"data": null, "message": "...", "errors"?:
@@ -83,6 +84,22 @@ const errorEnvelope = (body) => {
83
84
  if (body === null || typeof body !== "object")
84
85
  return undefined;
85
86
  const b = body;
87
+ // PVE's backup read/delete missing-id exception is a 400 with the useful
88
+ // message in errors.id (Backup.pm:406,458 at pve-manager 9.2.11). Expose
89
+ // ONLY that exact sole-field detail to the operation's typed matcher.
90
+ // Multiple errors, other fields, and unrelated validation stay unchanged.
91
+ const errors = b.errors;
92
+ if ((b.message === "Parameter verification failed." ||
93
+ b.message === "Parameter verification failed.\n") &&
94
+ errors !== null &&
95
+ typeof errors === "object" &&
96
+ !Array.isArray(errors) &&
97
+ Object.keys(errors).length === 1 &&
98
+ "id" in errors &&
99
+ typeof errors.id === "string" &&
100
+ /^No such job '[^']+'$/.test(errors.id)) {
101
+ return { message: errors.id };
102
+ }
86
103
  return { message: typeof b.message === "string" ? b.message : undefined };
87
104
  };
88
105
  /**
@@ -97,7 +114,7 @@ const PROXMOX_STATUS_MAP = {
97
114
  ...HTTP_STATUS_MAP,
98
115
  };
99
116
  delete PROXMOX_STATUS_MAP[400];
100
- export const ProxmoxProtocol = makeRestProtocol({
117
+ export const ProxmoxProtocol = withPveFormArrays(makeRestProtocol({
101
118
  // Resolved on the CALLING fiber per request (the layer is memoized per
102
119
  // process); the Credentials service holds an effect, so a token rotated
103
120
  // between calls is picked up without rebuilding the layer.
@@ -165,5 +182,5 @@ export const ProxmoxProtocol = makeRestProtocol({
165
182
  }
166
183
  return new UnknownProxmoxError({ status, message, body });
167
184
  },
168
- });
185
+ }));
169
186
  //# sourceMappingURL=protocol.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EACL,UAAU,EACV,eAAe,GAEhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,gBAAgB,GAEjB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,GAEpB,MAAM,aAAa,CAAC;AAgBrB;;;;;;;GAOG;AACH,MAAM,aAAa,GAAG,CAAC,IAAa,EAAiC,EAAE;IACrE,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChE,MAAM,CAAC,GAAG,IAA+B,CAAC;IAC1C,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;AAC5E,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAA+C;IACrE,GAAG,eAAe;CACnB,CAAC;AACF,OAAQ,kBAA8C,CAAC,GAAG,CAAC,CAAC;AAE5D,MAAM,CAAC,MAAM,eAAe,GAC1B,gBAAgB,CAAS;IACvB,uEAAuE;IACvE,wEAAwE;IACxE,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC/B,MAAM,OA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,MAAM,WAAW,GAAG,CAAC,EAAE,MAAM,CAAC;QAC9B,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;YACnB,IACE,WAAW,KAAK,IAAI;gBACpB,OAAO,WAAW,KAAK,QAAQ;gBAC/B,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAC3B,CAAC;gBACD,MAAM,MAAM,GAA2B,EAAE,CAAC;gBAC1C,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CACjC,WAAsC,CACvC,EAAE,CAAC;oBACF,IAAI,OAAO,CAAC,KAAK,QAAQ;wBAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBAC3C,CAAC;gBACD,OAAO,IAAI,2BAA2B,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;YAC9D,CAAC;YACD,OAAO,IAAI,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,IAAI,mBAAmB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF,CAAC,CACH,CAAC"}
@@ -2,6 +2,26 @@ import * as S from "@distilled.cloud/core/schema";
2
2
  import * as API from "@distilled.cloud/core/api";
3
3
  import { type ProxmoxOpError, type ProxmoxOpContext } from "../protocol.ts";
4
4
  export type { ProxmoxOpError, ProxmoxOpContext };
5
+ declare const BackupJobNotFound_base: S.Class<BackupJobNotFound, S.TaggedStruct<"BackupJobNotFound", {
6
+ readonly message: any;
7
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
8
+ "@distilled.cloud/error/categories": {
9
+ BadRequestError: true;
10
+ };
11
+ });
12
+ /** The backup job does not exist. pve-manager 9.2.11, f6997e698c7933ea8e62319e2bf1bf7262daa56a, PVE/API2/Backup.pm:406,458,755 raises a 400 parameter exception with exactly errors.id = No such job '<id>'. The Proxmox protocol extracts that sole precise detail for matching; unrelated or multi-field validation errors never become absence. Update uses a different exception and is deliberately not attached. */
13
+ export declare class BackupJobNotFound extends /*@__PURE__*/ BackupJobNotFound_base {
14
+ }
15
+ declare const MetricServerNotFound_base: S.Class<MetricServerNotFound, S.TaggedStruct<"MetricServerNotFound", {
16
+ readonly message: any;
17
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
18
+ "@distilled.cloud/error/categories": {
19
+ BadRequestError: true;
20
+ };
21
+ });
22
+ /** The metrics server does not exist. pve-manager 9.2.11, f6997e698c7933ea8e62319e2bf1bf7262daa56a, PVE/API2/Cluster/MetricServer.pm:136 throws status server entry '<id>' does not exist on GET, and line 228 throws no such server '<id>' on PUT. Both are wire 500. DELETE dereferences the plugin config without an explicit absence check and is not declared to return this tag. */
23
+ export declare class MetricServerNotFound extends /*@__PURE__*/ MetricServerNotFound_base {
24
+ }
5
25
  export interface CreateClusterAcmeAccountRequest {
6
26
  /** Contact email addresses. */
7
27
  contact: string;
@@ -5271,7 +5291,7 @@ export declare const deleteClusterAcmeAccount: API.OperationMethod<DeleteCluster
5271
5291
  export type DeleteClusterAcmePluginError = ProxmoxOpError;
5272
5292
  /** Delete ACME plugin configuration. (root-privileged endpoint) */
5273
5293
  export declare const deleteClusterAcmePlugin: API.OperationMethod<DeleteClusterAcmePluginRequest, DeleteClusterAcmePluginResponse, DeleteClusterAcmePluginError, ProxmoxOpContext>;
5274
- export type DeleteClusterBackupError = ProxmoxOpError;
5294
+ export type DeleteClusterBackupError = BackupJobNotFound | ProxmoxOpError;
5275
5295
  /** Delete vzdump backup job definition. (root-privileged endpoint) */
5276
5296
  export declare const deleteClusterBackup: API.OperationMethod<DeleteClusterBackupRequest, DeleteClusterBackupResponse, DeleteClusterBackupError, ProxmoxOpContext>;
5277
5297
  export type DeleteClusterConfigNodeError = ProxmoxOpError;
@@ -5394,10 +5414,10 @@ export declare const getClusterAcmePlugin: API.OperationMethod<GetClusterAcmePlu
5394
5414
  export type GetClusterAcmeTosError = ProxmoxOpError;
5395
5415
  /** Retrieve ACME TermsOfService URL from CA. Deprecated, please use /cluster/acme/meta. */
5396
5416
  export declare const getClusterAcmeTos: API.OperationMethod<GetClusterAcmeTosRequest, GetClusterAcmeTosResponse, GetClusterAcmeTosError, ProxmoxOpContext>;
5397
- export type GetClusterBackupError = ProxmoxOpError;
5417
+ export type GetClusterBackupError = BackupJobNotFound | ProxmoxOpError;
5398
5418
  /** Read vzdump backup job definition. */
5399
5419
  export declare const getClusterBackup: API.OperationMethod<GetClusterBackupRequest, GetClusterBackupResponse, GetClusterBackupError, ProxmoxOpContext>;
5400
- export type GetClusterBackupIncludedVolumesError = ProxmoxOpError;
5420
+ export type GetClusterBackupIncludedVolumesError = BackupJobNotFound | ProxmoxOpError;
5401
5421
  /** Returns included guests and the backup status of their disks. Optimized to be used in ExtJS tree views. (root-privileged endpoint) */
5402
5422
  export declare const getClusterBackupIncludedVolumes: API.OperationMethod<GetClusterBackupIncludedVolumesRequest, GetClusterBackupIncludedVolumesResponse, GetClusterBackupIncludedVolumesError, ProxmoxOpContext>;
5403
5423
  export type GetClusterCephFlagError = ProxmoxOpError;
@@ -5469,7 +5489,7 @@ export declare const getClusterMappingUsb: API.OperationMethod<GetClusterMapping
5469
5489
  export type GetClusterMetricsExportError = ProxmoxOpError;
5470
5490
  /** Retrieve metrics of the cluster. */
5471
5491
  export declare const getClusterMetricsExport: API.OperationMethod<GetClusterMetricsExportRequest, GetClusterMetricsExportResponse, GetClusterMetricsExportError, ProxmoxOpContext>;
5472
- export type GetClusterMetricsServerError = ProxmoxOpError;
5492
+ export type GetClusterMetricsServerError = MetricServerNotFound | ProxmoxOpError;
5473
5493
  /** Read metric server configuration. */
5474
5494
  export declare const getClusterMetricsServer: API.OperationMethod<GetClusterMetricsServerRequest, GetClusterMetricsServerResponse, GetClusterMetricsServerError, ProxmoxOpContext>;
5475
5495
  export type GetClusterNextidError = ProxmoxOpError;
@@ -5835,7 +5855,7 @@ export declare const putClusterMappingPci: API.OperationMethod<PutClusterMapping
5835
5855
  export type PutClusterMappingUsbError = ProxmoxOpError;
5836
5856
  /** Update a hardware mapping. (root-privileged endpoint) */
5837
5857
  export declare const putClusterMappingUsb: API.OperationMethod<PutClusterMappingUsbRequest, PutClusterMappingUsbResponse, PutClusterMappingUsbError, ProxmoxOpContext>;
5838
- export type PutClusterMetricsServerError = ProxmoxOpError;
5858
+ export type PutClusterMetricsServerError = MetricServerNotFound | ProxmoxOpError;
5839
5859
  /** Update metric server configuration. (root-privileged endpoint) */
5840
5860
  export declare const putClusterMetricsServer: API.OperationMethod<PutClusterMetricsServerRequest, PutClusterMetricsServerResponse, PutClusterMetricsServerError, ProxmoxOpContext>;
5841
5861
  export type PutClusterNotificationEndpointGotifyError = ProxmoxOpError;