@homeflare/distilled-proxmox 0.2.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.
Files changed (71) hide show
  1. package/README.md +15 -10
  2. package/dist/config-not-found.test.d.ts +2 -0
  3. package/dist/config-not-found.test.d.ts.map +1 -0
  4. package/dist/config-not-found.test.js +96 -0
  5. package/dist/config-not-found.test.js.map +1 -0
  6. package/dist/delete-query-binding.test.d.ts +2 -0
  7. package/dist/delete-query-binding.test.d.ts.map +1 -0
  8. package/dist/delete-query-binding.test.js +49 -0
  9. package/dist/delete-query-binding.test.js.map +1 -0
  10. package/dist/errors.d.ts +14 -7
  11. package/dist/errors.d.ts.map +1 -1
  12. package/dist/errors.js +12 -5
  13. package/dist/errors.js.map +1 -1
  14. package/dist/index.d.ts +0 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +0 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/not-found-errors.test.d.ts +2 -0
  19. package/dist/not-found-errors.test.d.ts.map +1 -0
  20. package/dist/not-found-errors.test.js +59 -0
  21. package/dist/not-found-errors.test.js.map +1 -0
  22. package/dist/protocol-form.d.ts +18 -0
  23. package/dist/protocol-form.d.ts.map +1 -0
  24. package/dist/protocol-form.js +37 -0
  25. package/dist/protocol-form.js.map +1 -0
  26. package/dist/protocol-form.test.d.ts +2 -0
  27. package/dist/protocol-form.test.d.ts.map +1 -0
  28. package/dist/protocol-form.test.js +68 -0
  29. package/dist/protocol-form.test.js.map +1 -0
  30. package/dist/protocol.d.ts.map +1 -1
  31. package/dist/protocol.js +28 -9
  32. package/dist/protocol.js.map +1 -1
  33. package/dist/services/access.d.ts +22 -2
  34. package/dist/services/access.d.ts.map +1 -1
  35. package/dist/services/access.js +17 -9
  36. package/dist/services/access.js.map +1 -1
  37. package/dist/services/cluster.d.ts +25 -5
  38. package/dist/services/cluster.d.ts.map +1 -1
  39. package/dist/services/cluster.js +56 -82
  40. package/dist/services/cluster.js.map +1 -1
  41. package/dist/services/nodes.d.ts +22 -2
  42. package/dist/services/nodes.d.ts.map +1 -1
  43. package/dist/services/nodes.js +60 -72
  44. package/dist/services/nodes.js.map +1 -1
  45. package/dist/services/pools.d.ts +16 -6
  46. package/dist/services/pools.d.ts.map +1 -1
  47. package/dist/services/pools.js +20 -13
  48. package/dist/services/pools.js.map +1 -1
  49. package/dist/services/storage.d.ts +11 -1
  50. package/dist/services/storage.d.ts.map +1 -1
  51. package/dist/services/storage.js +8 -1
  52. package/dist/services/storage.js.map +1 -1
  53. package/package.json +1 -7
  54. package/src/config-not-found.test.ts +153 -0
  55. package/src/delete-query-binding.test.ts +65 -0
  56. package/src/errors.ts +16 -17
  57. package/src/index.ts +0 -1
  58. package/src/not-found-errors.test.ts +112 -0
  59. package/src/protocol-form.test.ts +102 -0
  60. package/src/protocol-form.ts +49 -0
  61. package/src/protocol.ts +31 -9
  62. package/src/services/access.ts +25 -11
  63. package/src/services/cluster.ts +76 -89
  64. package/src/services/nodes.ts +71 -74
  65. package/src/services/pools.ts +29 -21
  66. package/src/services/storage.ts +12 -2
  67. package/dist/task.d.ts +0 -51
  68. package/dist/task.d.ts.map +0 -1
  69. package/dist/task.js +0 -60
  70. package/dist/task.js.map +0 -1
  71. package/src/task.ts +0 -87
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"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AAE;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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=delete-query-binding.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-query-binding.test.d.ts","sourceRoot":"","sources":["../src/delete-query-binding.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * WI-1's runtime half: `convert-endpoint.test.ts` proves the Smithy model
3
+ * binds a DELETE's non-label params to the query string; this file proves
4
+ * the generated, wire-level request actually built from that model does
5
+ * the same — a real `DeleteNodeCephFs` call must produce `?remove-pools=1`
6
+ * in the URL and carry NO body. Before the WI-1 fix, `remove_pools` was a
7
+ * body member on a form-urlencoded DELETE, which PVE's server silently
8
+ * ignores (`errors.ts`'s header cites the measurement).
9
+ */
10
+ import { describe, expect, test } from "bun:test";
11
+ import * as Effect from "effect/Effect";
12
+ import * as Layer from "effect/Layer";
13
+ import * as HttpClient from "effect/unstable/http/HttpClient";
14
+ import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
15
+ import { credentials } from "./credentials.js";
16
+ import * as Retry from "./retry.js";
17
+ import { deleteNodeCephFs } from "./services/nodes.js";
18
+ const testCredentials = credentials({
19
+ tokenId: "root@pam!test",
20
+ secret: "test-secret",
21
+ baseUrl: "https://pve.test:8006",
22
+ });
23
+ describe("DeleteNodeCephFs — non-label params are query, not body (WI-1)", () => {
24
+ test("?remove-pools=1 is in the URL; the request body is empty", async () => {
25
+ let capturedUrl;
26
+ let capturedBodyTag;
27
+ const fakePve = Layer.succeed(HttpClient.HttpClient, HttpClient.make((request) => Effect.sync(() => {
28
+ capturedUrl = request.url;
29
+ capturedBodyTag = request.body._tag;
30
+ return HttpClientResponse.fromWeb(request, new Response(JSON.stringify({ data: "UPID:pve1:task" }), {
31
+ status: 200,
32
+ }));
33
+ })));
34
+ await Effect.runPromise(deleteNodeCephFs({
35
+ node: "pve1",
36
+ name: "cephfs1",
37
+ remove_pools: "1",
38
+ }).pipe(Retry.none, Effect.provide(Layer.mergeAll(fakePve, testCredentials))));
39
+ expect(capturedUrl).toBeDefined();
40
+ const url = new URL(capturedUrl);
41
+ expect(url.pathname).toBe("/api2/json/nodes/pve1/ceph/fs/cephfs1");
42
+ expect(url.searchParams.get("remove-pools")).toBe("1");
43
+ // No body member remains on the request at all (`remove_storages` was
44
+ // omitted from this call), so there is nothing to form-urlencode — the
45
+ // WI-1 bug would have made this "Raw" (a form-urlencoded body) instead.
46
+ expect(capturedBodyTag).toBe("Empty");
47
+ });
48
+ });
49
+ //# sourceMappingURL=delete-query-binding.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-query-binding.test.js","sourceRoot":"","sources":["../src/delete-query-binding.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,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,K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W,CAAC,CAAC,WAAW,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAY,CAAC,CAAC;QAClC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;QACnE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvD,sEAAsE;QACtE,uEAAuE;QACvE,wEAAwE;QACxE,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/dist/errors.d.ts CHANGED
@@ -23,7 +23,11 @@
23
23
  * - `ClusterNodeUnreachable` is added via an ACTUAL RFC-6902 patch —
24
24
  * `patches/nodes/task-polling.json` — to the four `/nodes/{node}/
25
25
  * tasks/…` operations the vendor schema itself marks `proxyto: "node"`
26
- * (this package's own `src/task.ts` polls one of them). It is NOT
26
+ * (a caller polling `GetNodeTaskStatus` — this package's own generated
27
+ * operation — can hit any of the four; task polling itself is
28
+ * provider-side, not this package's, per P13/Q3 of the 2026-09-24
29
+ * walk-down: no distilled precedent for a package-level poll helper).
30
+ * It is NOT
27
31
  * global: most PVE calls are answered by the node you connected to
28
32
  * directly and never proxy at all, so declaring a 595 possible on
29
33
  * every operation would be a claim the schema does not support for
@@ -31,7 +35,7 @@
31
35
  * see the patch file).
32
36
  */
33
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";
34
- import type { BadRequest, DefaultErrors as CoreDefaultErrors } from "@distilled.cloud/core/errors";
38
+ import type { API_ERRORS } from "@distilled.cloud/core/errors";
35
39
  import * as Schema from "effect/Schema";
36
40
  import * as Category from "@distilled.cloud/core/category";
37
41
  declare const ParameterVerificationFailed_base: Schema.Class<ParameterVerificationFailed, Schema.TaggedStruct<"ParameterVerificationFailed", {
@@ -105,10 +109,13 @@ declare const ProxmoxTaskFailed_base: Schema.Class<ProxmoxTaskFailed, Schema.Tag
105
109
  readonly exitstatus: Schema.String;
106
110
  }>, import("effect/Cause").YieldableError>;
107
111
  /**
108
- * A polled task ended with an `exitstatus` other than exactly `"OK"` — see
109
- * `src/task.ts`. `exitstatus` carries PVE's own failure text verbatim
110
- * (e.g. `"job errors"`, `"OK (warnings)"` — the latter is why the compare
111
- * is exact-equality against `"OK"`, never a prefix/substring check).
112
+ * A polled task ended with an `exitstatus` other than exactly `"OK"`.
113
+ * `exitstatus` carries PVE's own failure text verbatim (e.g. `"job
114
+ * errors"`, `"OK (warnings)"` — the latter is why a caller's compare must
115
+ * be exact-equality against `"OK"`, never a prefix/substring check).
116
+ * Exported for a provider-side poll to construct: this package no longer
117
+ * ships its own `awaitTask` helper (removed 2026-09-24 — polling belongs
118
+ * in the provider, P13; no distilled precedent for a package-level poll).
112
119
  */
113
120
  export declare class ProxmoxTaskFailed extends ProxmoxTaskFailed_base {
114
121
  }
@@ -124,5 +131,5 @@ export type ClientErrors = UnknownProxmoxError | ProxmoxParseError;
124
131
  * header: it rides only the specific operations `patches/nodes/
125
132
  * task-polling.json` adds it to.
126
133
  */
127
- export type DefaultErrors = CoreDefaultErrors | BadRequest | ParameterVerificationFailed | ClientErrors;
134
+ export type DefaultErrors = InstanceType<(typeof API_ERRORS)[number]> | ParameterVerificationFailed | ClientErrors;
128
135
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,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,MAAM,8BAA8B,CAAC;AAE/D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;;;;;;;;;AAE3D;;;;;;;;GAQG;AACH,qBAAa,2BAA4B,SAAQ,gCAMb;CAAG;;;;;;;;;;AAEvC;;;;;;;;GAQG;AACH,qBAAa,sBAAuB,SAAQ,2BAKc;CAAG;;;;;;;;;;AAE7D;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,wBAOT;CAAG;;;;;;;;;AAEnC,kCAAkC;AAClC,qBAAa,iBAAkB,SAAQ,sBAMR;CAAG;;;;;;AAElC;;;;;;;;GAQG;AACH,qBAAa,iBAAkB,SAAQ,sBAOtC;CAAG;AAEJ;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GACrB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,2BAA2B,GAC3B,YAAY,CAAC"}
package/dist/errors.js CHANGED
@@ -23,7 +23,11 @@
23
23
  * - `ClusterNodeUnreachable` is added via an ACTUAL RFC-6902 patch —
24
24
  * `patches/nodes/task-polling.json` — to the four `/nodes/{node}/
25
25
  * tasks/…` operations the vendor schema itself marks `proxyto: "node"`
26
- * (this package's own `src/task.ts` polls one of them). It is NOT
26
+ * (a caller polling `GetNodeTaskStatus` — this package's own generated
27
+ * operation — can hit any of the four; task polling itself is
28
+ * provider-side, not this package's, per P13/Q3 of the 2026-09-24
29
+ * walk-down: no distilled precedent for a package-level poll helper).
30
+ * It is NOT
27
31
  * global: most PVE calls are answered by the node you connected to
28
32
  * directly and never proxy at all, so declaring a 595 possible on
29
33
  * every operation would be a claim the schema does not support for
@@ -77,10 +81,13 @@ export class ProxmoxParseError extends Schema.TaggedError()("ProxmoxParseError",
77
81
  }).pipe(Category.withParseError) {
78
82
  }
79
83
  /**
80
- * A polled task ended with an `exitstatus` other than exactly `"OK"` — see
81
- * `src/task.ts`. `exitstatus` carries PVE's own failure text verbatim
82
- * (e.g. `"job errors"`, `"OK (warnings)"` — the latter is why the compare
83
- * is exact-equality against `"OK"`, never a prefix/substring check).
84
+ * A polled task ended with an `exitstatus` other than exactly `"OK"`.
85
+ * `exitstatus` carries PVE's own failure text verbatim (e.g. `"job
86
+ * errors"`, `"OK (warnings)"` — the latter is why a caller's compare must
87
+ * be exact-equality against `"OK"`, never a prefix/substring check).
88
+ * Exported for a provider-side poll to construct: this package no longer
89
+ * ships its own `awaitTask` helper (removed 2026-09-24 — polling belongs
90
+ * in the provider, P13; no distilled precedent for a package-level poll).
84
91
  */
85
92
  export class ProxmoxTaskFailed extends Schema.TaggedError()("ProxmoxTaskFailed", {
86
93
  node: Schema.String,
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;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;AAYtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,OAAO,2BAA4B,SAAQ,MAAM,CAAC,WAAW,EAA+B,CAChG,6BAA6B,EAC7B;IACE,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;CACpD,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,C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,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CAAG;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,iBAAkB,SAAQ,MAAM,CAAC,WAAW,EAAqB,CAC5E,mBAAmB,EACnB;IACE,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,UAAU,EAAE,MAAM,CAAC,MAAM;CAC1B,CACF;CAAG"}
package/dist/index.d.ts CHANGED
@@ -26,5 +26,4 @@ export * as T from "./traits.ts";
26
26
  export { ProxmoxProtocol, type ProxmoxOpError, type ProxmoxOpContext, } from "./protocol.ts";
27
27
  export * as Retry from "./retry.ts";
28
28
  export * as Services from "./services/index.ts";
29
- export { awaitTask, type TaskRef, type AwaitTaskOptions } from "./task.ts";
30
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,KAAK,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -26,5 +26,4 @@ export * as T from "./traits.js";
26
26
  export { ProxmoxProtocol, } from "./protocol.js";
27
27
  export * as Retry from "./retry.js";
28
28
  export * as Services from "./services/index.js";
29
- export { awaitTask } from "./task.js";
30
29
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,eAAe,GAGhB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAuC,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,eAAe,GAGhB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=not-found-errors.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not-found-errors.test.d.ts","sourceRoot":"","sources":["../src/not-found-errors.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * WI-3: proves each resource-specific not-found shape actually decodes
3
+ * from PVE's real wire response — not just that the class exists and
4
+ * carries a non-transient category (checked separately, by hand, with
5
+ * `Category.isTransientError` against one instance of each class; see the
6
+ * WI-3 report). Each fixture here is the literal or closely-paraphrased
7
+ * text cited in the corresponding `patches/<segment>/_errors.json`
8
+ * patch's own description.
9
+ */
10
+ import { describe, expect, test } from "bun:test";
11
+ import * as Effect from "effect/Effect";
12
+ import * as Layer from "effect/Layer";
13
+ import * as HttpClient from "effect/unstable/http/HttpClient";
14
+ import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
15
+ import { credentials } from "./credentials.js";
16
+ import * as Retry from "./retry.js";
17
+ import { getAccessGroup, getAccessUser, GroupNotFound, UserNotFound, } from "./services/access.js";
18
+ import { CephFsNotFound, CephPoolNotFound, deleteNodeCephFs, getNodeCephPoolStatus, } from "./services/nodes.js";
19
+ import { getStorage, StorageNotFound } from "./services/storage.js";
20
+ const testCredentials = credentials({
21
+ tokenId: "root@pam!test",
22
+ secret: "test-secret",
23
+ baseUrl: "https://pve.test:8006",
24
+ });
25
+ const fakePve = (status, body) => Layer.succeed(HttpClient.HttpClient, HttpClient.make((request) => Effect.sync(() => HttpClientResponse.fromWeb(request, new Response(JSON.stringify(body), { status })))));
26
+ const flipped = (effect, status, body) => Effect.runPromise(effect.pipe(Retry.none, Effect.provide(Layer.mergeAll(fakePve(status, body), testCredentials)), Effect.flip));
27
+ describe("WI-3 typed not-found errors decode from PVE's real wire shape", () => {
28
+ test("a missing user's 500 decodes to UserNotFound", async () => {
29
+ const error = await flipped(getAccessUser({ userid: "x@pve" }), 500, {
30
+ message: "no such user ('x@pve')",
31
+ });
32
+ expect(error).toBeInstanceOf(UserNotFound);
33
+ });
34
+ test("a missing group's 500 decodes to GroupNotFound", async () => {
35
+ const error = await flipped(getAccessGroup({ groupid: "ghosts" }), 500, {
36
+ message: "group 'ghosts' does not exist",
37
+ });
38
+ expect(error).toBeInstanceOf(GroupNotFound);
39
+ });
40
+ test("a missing storage's 500 decodes to StorageNotFound", async () => {
41
+ const error = await flipped(getStorage({ storage: "hf-measure-nonexistent-probe" }), 500, {
42
+ message: "storage 'hf-measure-nonexistent-probe' does not exist\n",
43
+ data: null,
44
+ });
45
+ expect(error).toBeInstanceOf(StorageNotFound);
46
+ });
47
+ test("a missing Ceph pool's 500 decodes to CephPoolNotFound", async () => {
48
+ const error = await flipped(getNodeCephPoolStatus({ node: "n2", name: "ghost-pool" }), 500, {
49
+ data: null,
50
+ message: "error with 'osd pool get': mon_cmd failed - unrecognized pool 'ghost-pool'\n",
51
+ });
52
+ expect(error).toBeInstanceOf(CephPoolNotFound);
53
+ });
54
+ test("a missing Ceph filesystem's 500 (on destroy) decodes to CephFsNotFound", async () => {
55
+ const error = await flipped(deleteNodeCephFs({ node: "n2", name: "ghost-fs" }), 500, { message: "no such cephfs 'ghost-fs'\n" });
56
+ expect(error).toBeInstanceOf(CephFsNotFound);
57
+ });
58
+ });
59
+ //# sourceMappingURL=not-found-errors.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not-found-errors.test.js","sourceRoot":"","sources":["../src/not-found-errors.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,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,EACL,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,gBAAgB,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c,CAAC,cAAc,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -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,C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@ -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,OAA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