@homeflare/alchemy 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/README.md +26 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/launchd/fake-runner.d.ts +36 -0
  5. package/dist/launchd/fake-runner.d.ts.map +1 -0
  6. package/dist/launchd/host-effect.d.ts +19 -0
  7. package/dist/launchd/host-effect.d.ts.map +1 -0
  8. package/dist/launchd/host-file-form.d.ts +24 -0
  9. package/dist/launchd/host-file-form.d.ts.map +1 -0
  10. package/dist/launchd/host-file-lifecycle.d.ts +29 -0
  11. package/dist/launchd/host-file-lifecycle.d.ts.map +1 -0
  12. package/dist/launchd/host-file.d.ts +25 -0
  13. package/dist/launchd/host-file.d.ts.map +1 -0
  14. package/dist/launchd/host-lookup.d.ts +27 -0
  15. package/dist/launchd/host-lookup.d.ts.map +1 -0
  16. package/dist/launchd/index.d.ts +21 -0
  17. package/dist/launchd/index.d.ts.map +1 -0
  18. package/dist/launchd/index.js +969 -0
  19. package/dist/launchd/index.js.map +25 -0
  20. package/dist/launchd/job-form.d.ts +90 -0
  21. package/dist/launchd/job-form.d.ts.map +1 -0
  22. package/dist/launchd/job-lifecycle.d.ts +34 -0
  23. package/dist/launchd/job-lifecycle.d.ts.map +1 -0
  24. package/dist/launchd/job-preflight.d.ts +50 -0
  25. package/dist/launchd/job-preflight.d.ts.map +1 -0
  26. package/dist/launchd/job-validate.d.ts +25 -0
  27. package/dist/launchd/job-validate.d.ts.map +1 -0
  28. package/dist/launchd/job.d.ts +34 -0
  29. package/dist/launchd/job.d.ts.map +1 -0
  30. package/dist/launchd/launchctl.d.ts +62 -0
  31. package/dist/launchd/launchctl.d.ts.map +1 -0
  32. package/dist/launchd/local-runner.d.ts +7 -0
  33. package/dist/launchd/local-runner.d.ts.map +1 -0
  34. package/dist/launchd/plist.d.ts +41 -0
  35. package/dist/launchd/plist.d.ts.map +1 -0
  36. package/dist/launchd/providers.d.ts +15 -0
  37. package/dist/launchd/providers.d.ts.map +1 -0
  38. package/dist/launchd/runner.d.ts +91 -0
  39. package/dist/launchd/runner.d.ts.map +1 -0
  40. package/dist/launchd/secret-tripwire.d.ts +23 -0
  41. package/dist/launchd/secret-tripwire.d.ts.map +1 -0
  42. package/dist/openbao/approle-login-form.d.ts +72 -0
  43. package/dist/openbao/approle-login-form.d.ts.map +1 -0
  44. package/dist/openbao/approle-login-result.d.ts +39 -0
  45. package/dist/openbao/approle-login-result.d.ts.map +1 -0
  46. package/dist/openbao/approle-login.d.ts +77 -0
  47. package/dist/openbao/approle-login.d.ts.map +1 -0
  48. package/dist/openbao/auth-method-form.d.ts +7 -0
  49. package/dist/openbao/auth-method-form.d.ts.map +1 -1
  50. package/dist/openbao/auth-method-reconcile.d.ts +15 -0
  51. package/dist/openbao/auth-method-reconcile.d.ts.map +1 -0
  52. package/dist/openbao/auth-method.d.ts +6 -0
  53. package/dist/openbao/auth-method.d.ts.map +1 -1
  54. package/dist/openbao/auth-role-form.d.ts +9 -0
  55. package/dist/openbao/auth-role-form.d.ts.map +1 -1
  56. package/dist/openbao/auth-role.d.ts.map +1 -1
  57. package/dist/openbao/auth-token-form.d.ts +48 -0
  58. package/dist/openbao/auth-token-form.d.ts.map +1 -0
  59. package/dist/openbao/bao-http.d.ts +2 -0
  60. package/dist/openbao/bao-http.d.ts.map +1 -1
  61. package/dist/openbao/bao-identity.d.ts +81 -0
  62. package/dist/openbao/bao-identity.d.ts.map +1 -0
  63. package/dist/openbao/bao-namespace.d.ts +20 -0
  64. package/dist/openbao/bao-namespace.d.ts.map +1 -0
  65. package/dist/openbao/cloudflare-roles-expand.d.ts.map +1 -1
  66. package/dist/openbao/host-approles.d.ts +62 -0
  67. package/dist/openbao/host-approles.d.ts.map +1 -0
  68. package/dist/openbao/index.d.ts +26 -0
  69. package/dist/openbao/index.d.ts.map +1 -1
  70. package/dist/openbao/index.js +1889 -477
  71. package/dist/openbao/index.js.map +46 -17
  72. package/dist/openbao/jwt-config-form.d.ts +51 -0
  73. package/dist/openbao/jwt-config-form.d.ts.map +1 -0
  74. package/dist/openbao/jwt-config.d.ts +25 -0
  75. package/dist/openbao/jwt-config.d.ts.map +1 -0
  76. package/dist/openbao/jwt-role-form.d.ts +91 -0
  77. package/dist/openbao/jwt-role-form.d.ts.map +1 -0
  78. package/dist/openbao/jwt-role.d.ts +31 -0
  79. package/dist/openbao/jwt-role.d.ts.map +1 -0
  80. package/dist/openbao/kubernetes-role-form.d.ts +68 -0
  81. package/dist/openbao/kubernetes-role-form.d.ts.map +1 -0
  82. package/dist/openbao/kubernetes-role.d.ts +25 -0
  83. package/dist/openbao/kubernetes-role.d.ts.map +1 -0
  84. package/dist/openbao/mfa-enforcement-form.d.ts +46 -0
  85. package/dist/openbao/mfa-enforcement-form.d.ts.map +1 -0
  86. package/dist/openbao/mfa-enforcement.d.ts +41 -0
  87. package/dist/openbao/mfa-enforcement.d.ts.map +1 -0
  88. package/dist/openbao/mfa-totp-form.d.ts +52 -0
  89. package/dist/openbao/mfa-totp-form.d.ts.map +1 -0
  90. package/dist/openbao/mfa-totp.d.ts +33 -0
  91. package/dist/openbao/mfa-totp.d.ts.map +1 -0
  92. package/dist/openbao/mfa-wire.d.ts +63 -0
  93. package/dist/openbao/mfa-wire.d.ts.map +1 -0
  94. package/dist/openbao/mount-form.d.ts +7 -0
  95. package/dist/openbao/mount-form.d.ts.map +1 -1
  96. package/dist/openbao/mount-move.d.ts +49 -0
  97. package/dist/openbao/mount-move.d.ts.map +1 -0
  98. package/dist/openbao/mount-path.d.ts +18 -0
  99. package/dist/openbao/mount-path.d.ts.map +1 -0
  100. package/dist/openbao/mount-reconcile.d.ts +16 -0
  101. package/dist/openbao/mount-reconcile.d.ts.map +1 -0
  102. package/dist/openbao/mount.d.ts +9 -0
  103. package/dist/openbao/mount.d.ts.map +1 -1
  104. package/dist/openbao/pki-role-canonical.d.ts +46 -0
  105. package/dist/openbao/pki-role-canonical.d.ts.map +1 -0
  106. package/dist/openbao/pki-role-form.d.ts +38 -30
  107. package/dist/openbao/pki-role-form.d.ts.map +1 -1
  108. package/dist/openbao/pki-role.d.ts.map +1 -1
  109. package/dist/openbao/plugin-form.d.ts +60 -0
  110. package/dist/openbao/plugin-form.d.ts.map +1 -0
  111. package/dist/openbao/plugin-reconcile.d.ts +18 -0
  112. package/dist/openbao/plugin-reconcile.d.ts.map +1 -0
  113. package/dist/openbao/plugin-wire.d.ts +45 -0
  114. package/dist/openbao/plugin-wire.d.ts.map +1 -0
  115. package/dist/openbao/plugin.d.ts +31 -0
  116. package/dist/openbao/plugin.d.ts.map +1 -0
  117. package/dist/openbao/remount-wire.d.ts +44 -0
  118. package/dist/openbao/remount-wire.d.ts.map +1 -0
  119. package/dist/openbao/role-reconcile.d.ts +40 -0
  120. package/dist/openbao/role-reconcile.d.ts.map +1 -0
  121. package/dist/openbao/ssh-role-form.d.ts +6 -5
  122. package/dist/openbao/ssh-role-form.d.ts.map +1 -1
  123. package/dist/openbao/ssh-role.d.ts.map +1 -1
  124. package/docs/launchd.md +167 -0
  125. package/package.json +7 -2
  126. package/src/index.ts +1 -0
  127. package/src/launchd/fake-runner.ts +176 -0
  128. package/src/launchd/host-effect.ts +28 -0
  129. package/src/launchd/host-file-form.ts +71 -0
  130. package/src/launchd/host-file-lifecycle.test.ts +198 -0
  131. package/src/launchd/host-file-lifecycle.ts +164 -0
  132. package/src/launchd/host-file.ts +64 -0
  133. package/src/launchd/host-lookup.test.ts +92 -0
  134. package/src/launchd/host-lookup.ts +94 -0
  135. package/src/launchd/index.ts +26 -0
  136. package/src/launchd/job-form.test.ts +171 -0
  137. package/src/launchd/job-form.ts +180 -0
  138. package/src/launchd/job-identity.test.ts +147 -0
  139. package/src/launchd/job-lifecycle.test.ts +220 -0
  140. package/src/launchd/job-lifecycle.ts +194 -0
  141. package/src/launchd/job-preflight.ts +152 -0
  142. package/src/launchd/job-validate.ts +134 -0
  143. package/src/launchd/job.ts +96 -0
  144. package/src/launchd/launchctl.test.ts +181 -0
  145. package/src/launchd/launchctl.ts +188 -0
  146. package/src/launchd/local-runner.test.ts +125 -0
  147. package/src/launchd/local-runner.ts +143 -0
  148. package/src/launchd/plist.test.ts +186 -0
  149. package/src/launchd/plist.ts +156 -0
  150. package/src/launchd/providers.test.ts +222 -0
  151. package/src/launchd/providers.ts +21 -0
  152. package/src/launchd/runner.ts +95 -0
  153. package/src/launchd/secret-tripwire.test.ts +110 -0
  154. package/src/launchd/secret-tripwire.ts +81 -0
  155. package/src/openbao/README.md +181 -0
  156. package/src/openbao/REPLACE.md +87 -0
  157. package/src/openbao/approle-login-form.test.ts +64 -0
  158. package/src/openbao/approle-login-form.ts +153 -0
  159. package/src/openbao/approle-login-result.ts +96 -0
  160. package/src/openbao/approle-login.test.ts +200 -0
  161. package/src/openbao/approle-login.ts +156 -0
  162. package/src/openbao/auth-method-form.ts +7 -0
  163. package/src/openbao/auth-method-reconcile.ts +74 -0
  164. package/src/openbao/auth-method.ts +20 -41
  165. package/src/openbao/auth-role-form.test.ts +57 -0
  166. package/src/openbao/auth-role-form.ts +11 -0
  167. package/src/openbao/auth-role.ts +12 -0
  168. package/src/openbao/auth-token-form.ts +161 -0
  169. package/src/openbao/bao-http.ts +2 -0
  170. package/src/openbao/bao-identity.test.ts +131 -0
  171. package/src/openbao/bao-identity.ts +188 -0
  172. package/src/openbao/bao-namespace.ts +32 -0
  173. package/src/openbao/cloudflare-roles-expand.ts +2 -5
  174. package/src/openbao/host-approles.test.ts +121 -0
  175. package/src/openbao/host-approles.ts +126 -0
  176. package/src/openbao/index.ts +32 -0
  177. package/src/openbao/jwt-config-form.ts +161 -0
  178. package/src/openbao/jwt-config.ts +85 -0
  179. package/src/openbao/jwt-role-form.test.ts +130 -0
  180. package/src/openbao/jwt-role-form.ts +231 -0
  181. package/src/openbao/jwt-role.ts +102 -0
  182. package/src/openbao/kubernetes-role-form.test.ts +82 -0
  183. package/src/openbao/kubernetes-role-form.ts +149 -0
  184. package/src/openbao/kubernetes-role.ts +94 -0
  185. package/src/openbao/mfa-enforcement-form.ts +147 -0
  186. package/src/openbao/mfa-enforcement.ts +143 -0
  187. package/src/openbao/mfa-totp-form.ts +155 -0
  188. package/src/openbao/mfa-totp.ts +118 -0
  189. package/src/openbao/mfa-wire.ts +117 -0
  190. package/src/openbao/mfa.test.ts +200 -0
  191. package/src/openbao/mount-form.ts +9 -1
  192. package/src/openbao/mount-move.test.ts +164 -0
  193. package/src/openbao/mount-move.ts +113 -0
  194. package/src/openbao/mount-path.test.ts +33 -0
  195. package/src/openbao/mount-path.ts +31 -0
  196. package/src/openbao/mount-reconcile.ts +75 -0
  197. package/src/openbao/mount-wire.test.ts +13 -0
  198. package/src/openbao/mount.ts +26 -43
  199. package/src/openbao/pki-role-canonical.ts +163 -0
  200. package/src/openbao/pki-role-form.test.ts +112 -0
  201. package/src/openbao/pki-role-form.ts +76 -110
  202. package/src/openbao/pki-role.ts +12 -27
  203. package/src/openbao/plugin-form.test.ts +86 -0
  204. package/src/openbao/plugin-form.ts +164 -0
  205. package/src/openbao/plugin-reconcile.ts +92 -0
  206. package/src/openbao/plugin-wire.test.ts +146 -0
  207. package/src/openbao/plugin-wire.ts +65 -0
  208. package/src/openbao/plugin.ts +100 -0
  209. package/src/openbao/remount-wire.test.ts +87 -0
  210. package/src/openbao/remount-wire.ts +112 -0
  211. package/src/openbao/role-reconcile.test.ts +104 -0
  212. package/src/openbao/role-reconcile.ts +84 -0
  213. package/src/openbao/ssh-role-form.test.ts +105 -0
  214. package/src/openbao/ssh-role-form.ts +18 -16
  215. package/src/openbao/ssh-role.ts +3 -4
@@ -0,0 +1,48 @@
1
+ export type BaoTokenType = 'batch' | 'default' | 'service';
2
+ export interface BaoTokenProps {
3
+ /** Policies on tokens this role issues. Names only. */
4
+ tokenPolicies: readonly string[];
5
+ /** Token TTL (`15m`). Default `0` — the mount's default. */
6
+ tokenTtl?: string;
7
+ /** Token max TTL (`1h`). Default `0` — the mount's max. */
8
+ tokenMaxTtl?: string;
9
+ /** Hard ceiling that renewal cannot pass. Default `0` (none). */
10
+ tokenExplicitMaxTtl?: string;
11
+ /** Periodic tokens renew forever within this period. Default `0` (not periodic). */
12
+ tokenPeriod?: string;
13
+ /** Leave the `default` policy off. Default false. */
14
+ tokenNoDefaultPolicy?: boolean;
15
+ /** CIDRs a token may be USED from. Default none. */
16
+ tokenBoundCidrs?: readonly string[];
17
+ /** Uses before the token dies; `0` is unlimited. Default 0. */
18
+ tokenNumUses?: number;
19
+ /** Default `default` — the mount decides, which means service tokens unless it says otherwise. */
20
+ tokenType?: BaoTokenType;
21
+ }
22
+ /** The token fields as seconds and sorted sets — both sides of a diff are built by `tokenForm`. */
23
+ export interface BaoTokenForm {
24
+ tokenBoundCidrs: readonly string[];
25
+ tokenExplicitMaxTtlSeconds: number;
26
+ tokenMaxTtlSeconds: number;
27
+ tokenNoDefaultPolicy: boolean;
28
+ tokenNumUses: number;
29
+ tokenPeriodSeconds: number;
30
+ tokenPolicies: readonly string[];
31
+ tokenTtlSeconds: number;
32
+ tokenType: string;
33
+ }
34
+ /**
35
+ * The token fields of an already-normalised form, in one fixed key order — what a role family's own
36
+ * canonical literal spreads, so its digest cannot depend on how the object was assembled.
37
+ */
38
+ export declare const tokenFields: (input: BaoTokenForm) => BaoTokenForm;
39
+ export declare const tokenFormOfProps: (props: BaoTokenProps) => BaoTokenForm;
40
+ export declare const tokenFormOfLive: (live: Record<string, unknown>) => BaoTokenForm;
41
+ /**
42
+ * The token half of a role write — every field, defaults included (the merge ⚠️ above). Durations
43
+ * go over as the author's own strings; lists as JSON arrays, which a comma-string-slice accepts.
44
+ */
45
+ export declare const tokenBody: (props: BaoTokenProps) => Record<string, unknown>;
46
+ /** Refusals the token half can know without a server. */
47
+ export declare const tokenProblems: (props: BaoTokenProps) => readonly string[];
48
+ //# sourceMappingURL=auth-token-form.d.ts.map
@@ -0,0 +1 @@
1
+ {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L;;;GAGG;AACH,eAAO,MAAM,SAAS,UAAW,aAAa,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAUrE,CAAC;AAEH,yDAAyD;AACzD,eAAO,MAAM,aAAa,UAAW,aAAa,KAAG,SAAS,MAAM,EAqBnE,CAAC"}
@@ -64,6 +64,8 @@ export declare const baoRead: (path: string) => Effect.Effect<Record<string, unk
64
64
  * ⚠️ ROLE BODIES STAY ALL-STRING ON PURPOSE. `bao write k=v` put every value in the JSON body as a
65
65
  * string — MEASURED with `-output-curl-string`, see ssh-role-form.ts — and the form files still
66
66
  * build exactly that body, so the server parses the same request it was always sent.
67
+ * ⛔ EXCEPT A MAP FIELD: sdk v2.6.2 refuses a string for a TypeMap with a 400, so Bao.SshRole
68
+ * sends its two maps as objects (the ⛔ on mapValue in ssh-role-form.ts, measured 2026-09-21).
67
69
  */
68
70
  export declare const baoWrite: (method: 'POST' | 'PUT', path: string, body: Readonly<Record<string, unknown>>) => Effect.Effect<void, BaoError, HttpClient.HttpClient>;
69
71
  /** A delete: idempotent — already gone (404) is success — and refused (403, 5xx) is a failure. */
@@ -1 +1 @@
1
- {"version":3,"file":"bao-http.d.ts","sourceRoot":"","sources":["../../src/openbao/bao-http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAG9C,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAG9D,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAU,MAAM,iBAAiB,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,MAAM,iEAEjB,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,OAAO,wCAElB,CAAC;AAiEH,mGAAmG;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L;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,WACX,MAAM,GAAG,KAAK,QAChB,MAAM,QACN,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,yDACe,CAAC;AAEzD,kGAAkG;AAClG,eAAO,MAAM,SAAS,SAAU,MAAM,yDAAqD,CAAC"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Refuse to plan against the wrong vault: assert the `cluster_name` and namespace a stack expects
3
+ * BEFORE any Bao.* resource reads or writes.
4
+ *
5
+ * ⛔ WHY IT EXISTS. A `BAO_ADDR` left exported for one vault (or a `BAO_AGENT_ADDR`, which wins)
6
+ * would otherwise apply a stack written for another vault to it, and every family here would
7
+ * plan CREATEs against the wrong server with a clean conscience (the estate's site-config plan,
8
+ * "Identity checks on every live plan").
9
+ * A missing `BAO_NAMESPACE` does the same thing one level down: the stack lands in root.
10
+ *
11
+ * ★ `sys/health`, UNAUTHENTICATED, WITH NO TOKEN AND NO NAMESPACE HEADER. READ FROM openbao v2.6.2:
12
+ * · http/sys_health.go:143-165 — `cluster_name` and `cluster_id` are filled ONLY while unsealed,
13
+ * and the body is top-level JSON, not wrapped in `data`.
14
+ * · http/handler.go:108-124, :405-411 — `health` is a root-only API: a request carrying
15
+ * `X-Vault-Namespace` is answered 400 "operation unavailable in namespaces". So the header is
16
+ * stripped for this one call, whatever BAO_NAMESPACE says.
17
+ * · The query asks for 200 when sealed, uninitialised or standby (`sealedcode`, `uninitcode`,
18
+ * `standbyok`, :78-110), so the body is always there to read and the refusal can say WHICH.
19
+ * ⛔ NO TOKEN IS SENT. Until this check passes, the server has not even claimed to be ours, and a
20
+ * token sent to the wrong server is a token handed over.
21
+ * ⚠️ IT CATCHES A MISTARGET, NOT AN IMPOSTOR (review 2026-09-21). `cluster_name` is answered to
22
+ * anyone, unauthenticated, so a hostile server can echo the expected one; passing proves the
23
+ * address is configured right, never who answers. TLS to a trusted certificate is what
24
+ * authenticates the server — keep an https BAO_ADDR on anything that is not loopback or a socket.
25
+ * ★ THE NAMESPACE IS CHECKED TWICE. Locally first: the namespace every later call will send (the
26
+ * same bao-address.ts resolution) must BE the expected one. Then remotely: unauthenticated
27
+ * `sys/internal/ui/mounts` with that namespace header answers 200 when the namespace exists and
28
+ * 404 "namespace not found" when it does not (vault/request_handling.go:607-612; the path is in
29
+ * the system backend's Unauthenticated list, vault/logical_system.go:95). Only the status is read.
30
+ * REASONED FROM SOURCE, not measured against a live server.
31
+ * ⚠️ IT PROVES THE CLUSTER, NOT THE NODE. A standby answers with the cluster's name, which is the
32
+ * point: a standby forwards to the same vault.
33
+ */
34
+ import * as Effect from 'effect/Effect';
35
+ import type * as HttpClient from 'effect/unstable/http/HttpClient';
36
+ import { type BaoEnvironment } from './bao-address.ts';
37
+ /** `input` a blank expectation · `mismatch` the wrong vault · `unconfirmed` could not tell · `unreachable` no answer. */
38
+ export type BaoIdentityFailure = 'input' | 'mismatch' | 'unconfirmed' | 'unreachable';
39
+ /** ⛔ Every message starts `REFUSING:`, and none carries a token — only the address and names. */
40
+ export declare class BaoIdentityError extends Error {
41
+ readonly reason: BaoIdentityFailure;
42
+ constructor(reason: BaoIdentityFailure, detail: string);
43
+ }
44
+ export interface BaoIdentityExpected {
45
+ /** The vault's `cluster_name` (server config `cluster_name`, or the one generated at init). */
46
+ readonly clusterName: string;
47
+ /** The namespace the stack targets: `team-a`, or `''` / `root` for the root namespace. */
48
+ readonly namespace: string;
49
+ }
50
+ /** What the vault said about itself once every check passed. */
51
+ export interface BaoIdentity {
52
+ /** The resolved address, without any token. */
53
+ readonly address: string;
54
+ readonly clusterName: string;
55
+ readonly clusterId: string;
56
+ readonly version: string;
57
+ /** Canonical: `''` is root. */
58
+ readonly namespace: string;
59
+ }
60
+ export declare const HEALTH_PATH = "sys/health?standbyok=true&sealedcode=200&uninitcode=200";
61
+ export declare const NAMESPACE_PROBE_PATH = "sys/internal/ui/mounts";
62
+ /** Read a health body into the one question asked of it. Pure, for the tests. */
63
+ export declare const checkHealth: (address: string, expectedCluster: string, body: Record<string, unknown> | undefined) => {
64
+ readonly clusterId: string;
65
+ readonly version: string;
66
+ } | BaoIdentityError;
67
+ /**
68
+ * The check, as an Effect under BaoEnv (process.env unless provided). Fails with BaoIdentityError
69
+ * and nothing else.
70
+ */
71
+ export declare const assertBaoIdentityEffect: (expected: BaoIdentityExpected) => Effect.Effect<BaoIdentity, BaoIdentityError, HttpClient.HttpClient>;
72
+ /**
73
+ * `assertBaoIdentityEffect` for a plain script. `env` defaults to `process.env`, read at call time.
74
+ * ★ Rejects with the BaoIdentityError itself (Effect.runPromise, as in approle-login.ts).
75
+ *
76
+ * await assertBaoIdentity({ clusterName: 'vault-example', namespace: 'team-a' });
77
+ */
78
+ export declare const assertBaoIdentity: (input: BaoIdentityExpected & {
79
+ readonly env?: BaoEnvironment;
80
+ }) => Promise<BaoIdentity>;
81
+ //# sourceMappingURL=bao-identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bao-identity.d.ts","sourceRoot":"","sources":["../../src/openbao/bao-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,KAAK,UAAU,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,kBAAkB,CAAC;AAKvE,yHAAyH;AACzH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,GAAG,aAAa,CAAC;AAEtF,iGAAiG;AACjG,qBAAa,gBAAiB,SAAQ,KAAK;IAEvC,QAAQ,CAAC,MAAM,EAAE,kBAAkB;IADrC,YACW,MAAM,EAAE,kBAAkB,EACnC,MAAM,EAAE,MAAM,EAIf;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,+FAA+F;IAC/F,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,0FAA0F;IAC1F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,gEAAgE;AAChE,MAAM,WAAW,WAAW;IAC1B,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,+BAA+B;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,4DAA4D,CAAC;AACrF,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAc7D,iFAAiF;AACjF,eAAO,MAAM,WAAW,YACb,MAAM,mBACE,MAAM,QACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,KACxC;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,gBAyB7D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,aACxB,mBAAmB,KAC5B,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,gBAAgB,EAAE,UAAU,CAAC,UAAU,CA8CjE,CAAC;AAEL;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,UACrB,mBAAmB,GAAG;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAA;CAAE,KAC7D,OAAO,CAAC,WAAW,CAKrB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Namespace spellings, made comparable. `homeflare`, `/homeflare/` and `homeflare/` are one
3
+ * namespace to OpenBao, and `root` (or nothing) is the root namespace.
4
+ *
5
+ * ★ READ FROM openbao v2.6.2: namespace.Canonicalize trims the leading slash and appends a trailing
6
+ * one, and ResolveNamespaceFromRequest (vault/namespace_store.go:1573-1598) re-routes a header
7
+ * that is literally `root/` to the root namespace. A namespace's own `namespace_path` in an API
8
+ * answer is that canonical form: `''` for root, `a/b/` below it (vault/login_mfa.go
9
+ * mfaConfigToMap and mfaLoginEnforcementConfigToMap).
10
+ */
11
+ import { type BaoEnvironment } from './bao-address.ts';
12
+ /** The bare name: no leading or trailing slash, and `''` for the root namespace. */
13
+ export declare const canonicalNamespace: (namespace: string | undefined) => string;
14
+ /** OpenBao's `namespace_path` rendering of the same namespace: `''` or `a/b/`. */
15
+ export declare const namespacePath: (namespace: string | undefined) => string;
16
+ /** The namespace every call under `env` targets, canonical. */
17
+ export declare const envNamespace: (env: BaoEnvironment) => string;
18
+ /** How a namespace reads in a message: `root` rather than an empty pair of backticks. */
19
+ export declare const namespaceLabel: (namespace: string) => string;
20
+ //# sourceMappingURL=bao-namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bao-namespace.d.ts","sourceRoot":"","sources":["../../src/openbao/bao-namespace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,kBAAkB,CAAC;AAGvE,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,cAAe,MAAM,GAAG,SAAS,KAAG,MAGlE,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,aAAa,cAAe,MAAM,GAAG,SAAS,KAAG,MAG7D,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,YAAY,QAAS,cAAc,KAAG,MACA,CAAC;AAEpD,yFAAyF;AACzF,eAAO,MAAM,cAAc,cAAe,MAAM,KAAG,MACZ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cloudflare-roles-expand.d.ts","sourceRoot":"","sources":["../../src/openbao/cloudflare-roles-expand.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAgB,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3F,6FAA6F;AAC7F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,C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CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * One AppRole role per host, generated from a host list and a few class definitions — pure, so a
3
+ * scaffold test can render every role from one site config and assert on it without a vault.
4
+ *
5
+ * ★ WHY PER HOST, NOT PER CLASS. OpenBao sets an AppRole login's entity alias to the role_id, so
6
+ * every host sharing a class role is ONE identity: one entity in every audit line, and one cached
7
+ * token when two hosts send the same login through a caching proxy (vault consolidation plan,
8
+ * decision 8 as amended 2026-09-21; not re-measured here). The CLASS carries the policies and
9
+ * TTLs; the ROLE carries the host.
10
+ *
11
+ * ★ THE NAMING RULE: `<class>--<host>`, e.g. `pve-node--node-a`.
12
+ * · Class and host names are lowercase letters, digits and SINGLE hyphens, so `--` can only ever
13
+ * be the separator and a name splits back into exactly one (class, host) pair.
14
+ * · Class first, so one class's roles share a prefix a reader (or a policy path glob,
15
+ * `auth/approle/role/pve-node--*`) can select — and no hand-made role (`deploy`,
16
+ * `approle-rotator`) can match it, because none of them contains `--`.
17
+ * · Lowercase because AppRole stores role names lowercased (builtin/credential/approle stores
18
+ * `role/<lowercased name>`); a mixed-case name would read back as a different string.
19
+ *
20
+ * ⛔ NO ROLE WITHOUT AN EXPIRING SECRET_ID. `secretIdTtl` must parse to MORE than zero: `0` is a
21
+ * secret_id that never expires, which is the `deploy` credential the plan is retiring. The plan's
22
+ * class default is 90 days (`2160h`, which auth-role-form.test.ts shows OpenBao accepts).
23
+ * ⛔ `bindSecretId` IS ALWAYS TRUE. A role that logs in on role_id alone makes the role_id — which
24
+ * is not treated as a secret — the whole credential.
25
+ * ⚠️ A RENAMED HOST OR CLASS IS A NEW ROLE: a new role_id, and a new secret_id to push to the host
26
+ * in the same change. What Alchemy calls it depends on the logical id. Keyed by the role name (as
27
+ * the README does), the old id VANISHES from the stack, so it is an orphan delete, not a
28
+ * `replace`. Keyed by something stable, Bao.AuthRole plans a `replace`. Either way the default
29
+ * `retain` leaves the old role LIVE, its secret_ids still logging in (alchemy Plan.ts:2040 and
30
+ * Apply.ts:2152-2173 honour retain on both paths) — see the ⚠️ in auth-role.ts before renaming.
31
+ */
32
+ import type { BaoAuthRoleProps } from './auth-role-form.ts';
33
+ /** What every host of one class gets. */
34
+ export interface HostRoleClass {
35
+ /** Policy names. ⛔ Never empty, never `root`. */
36
+ readonly policies: readonly string[];
37
+ readonly tokenTtl: string;
38
+ readonly tokenMaxTtl: string;
39
+ /** ⛔ Must be more than zero — e.g. `2160h` (90 days). */
40
+ readonly secretIdTtl: string;
41
+ /** `0` (the default) means unlimited uses, which a host that logs in repeatedly needs. */
42
+ readonly secretIdNumUses?: number;
43
+ }
44
+ export interface HostRoleHost {
45
+ /** Short host name, e.g. `node-a`. */
46
+ readonly name: string;
47
+ /** Key into `classes`. */
48
+ readonly class: string;
49
+ }
50
+ export interface HostAppRolesInput {
51
+ readonly hosts: readonly HostRoleHost[];
52
+ readonly classes: Readonly<Record<string, HostRoleClass>>;
53
+ }
54
+ export declare const HOST_ROLE_SEPARATOR = "--";
55
+ /** The naming rule, in one place: `<class>--<host>`. */
56
+ export declare const hostRoleName: (className: string, host: string) => string;
57
+ /**
58
+ * Every host's role props, sorted by role name. Throws, naming every problem at once, on a class or
59
+ * host that breaks a rule above — this runs when a stack is defined, so a throw stops the plan.
60
+ */
61
+ export declare const hostAppRoles: (input: HostAppRolesInput) => readonly BaoAuthRoleProps[];
62
+ //# sourceMappingURL=host-approles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-approles.d.ts","sourceRoot":"","sources":["../../src/openbao/host-approles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,yCAAyC;AACzC,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,yDAAyD;IACzD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,0FAA0F;IAC1F,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0BAA0B;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;CAC3D;AAKD,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC,wDAAwD;AACxD,eAAO,MAAM,YAAY,cAAe,MAAM,QAAQ,MAAM,KAAG,MAClB,CAAC;AAyB9C;;;GAGG;AACH,eAAO,MAAM,YAAY,UAAW,iBAAiB,KAAG,SAAS,gBAAgB,EA+BhF,CAAC"}
@@ -7,17 +7,43 @@
7
7
  * every helper as API and make the next refactor a breaking change.
8
8
  * ★ Anything unlisted is still reachable by path if you genuinely need it — that is a
9
9
  * deliberate, visible act rather than an accident of barrelling.
10
+ * ★ THE APPROLE LOGIN IS HERE FOR SCRIPTS, NOT STACKS (approle-login.ts). A wrapper that logs in
11
+ * and revokes on exit needs it, and giving it the families' own transport is what keeps a script
12
+ * and a stack from disagreeing about which server BAO_ADDR means.
13
+ * ★ SO IS THE IDENTITY GUARD (bao-identity.ts), for the opposite reason: a stack calls it FIRST, so
14
+ * no family plans against a vault that is not the one the stack was written for.
15
+ * ★ hostAppRoles IS PURE — no provider, no call — so a scaffold test can render every per-host
16
+ * AppRole from one site config.
10
17
  */
18
+ export type { AppRoleLogin, AppRoleLoginInput, BaoLoginFailure } from './approle-login.ts';
19
+ export { BaoLoginError, appRoleLogin, appRoleLoginEffect, revokeSelf, revokeSelfEffect, } from './approle-login.ts';
11
20
  export { BaoAuthMethod, BaoAuthMethodProvider } from './auth-method.ts';
21
+ export type { BaoAuthRoleProps } from './auth-role.ts';
12
22
  export { BaoAuthRole, BaoAuthRoleProvider } from './auth-role.ts';
23
+ export type { BaoIdentity, BaoIdentityExpected, BaoIdentityFailure } from './bao-identity.ts';
24
+ export { BaoIdentityError, assertBaoIdentity, assertBaoIdentityEffect } from './bao-identity.ts';
13
25
  export { BaoCloudflareRole, BaoCloudflareRoleProvider } from './cloudflare-role.ts';
14
26
  export { CloudflarePermissionGroups, permissionGroupsFromEngine, permissionGroupsFromLiveRoles, } from './cloudflare-permission-groups.ts';
15
27
  export type { CloudflareZone, ExpandedRole } from './cloudflare-roles-expand.ts';
16
28
  export { expandAccount, expandAll, mountName } from './cloudflare-roles-expand.ts';
17
29
  export type { RolesConfig, SurfaceSpec } from './cloudflare-roles-config.ts';
18
30
  export { parseRolesConfig } from './cloudflare-roles-config.ts';
31
+ export type { HostAppRolesInput, HostRoleClass, HostRoleHost } from './host-approles.ts';
32
+ export { HOST_ROLE_SEPARATOR, hostAppRoles, hostRoleName } from './host-approles.ts';
33
+ export type { BaoJwtAuthConfigProps } from './jwt-config.ts';
34
+ export { BaoJwtAuthConfig, BaoJwtAuthConfigProvider } from './jwt-config.ts';
35
+ export type { BaoJwtRoleProps, BaoJwtRoleType } from './jwt-role.ts';
36
+ export { BaoJwtRole, BaoJwtRoleProvider } from './jwt-role.ts';
37
+ export type { BaoKubernetesAliasSource, BaoKubernetesRoleProps } from './kubernetes-role.ts';
38
+ export { BaoKubernetesRole, BaoKubernetesRoleProvider } from './kubernetes-role.ts';
39
+ export type { BaoMfaLoginEnforcementProps } from './mfa-enforcement.ts';
40
+ export { BaoMfaLoginEnforcement, BaoMfaLoginEnforcementProvider } from './mfa-enforcement.ts';
41
+ export type { BaoMfaTotpMethodProps, BaoTotpAlgorithm } from './mfa-totp.ts';
42
+ export { BaoMfaTotpMethod, BaoMfaTotpMethodProvider } from './mfa-totp.ts';
19
43
  export { BaoMount, BaoMountProvider } from './mount.ts';
20
44
  export { BaoPkiRole, BaoPkiRoleProvider } from './pki-role.ts';
45
+ export type { BaoPluginProps, BaoPluginType } from './plugin.ts';
46
+ export { BaoPlugin, BaoPluginProvider } from './plugin.ts';
21
47
  export { BaoPolicy, BaoPolicyProvider } from './policy.ts';
22
48
  export { BaoProxmoxRole, BaoProxmoxRoleProvider } from './proxmox-role.ts';
23
49
  export { BaoSshRole, BaoSshRoleProvider } from './ssh-role.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/openbao/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACnF,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,sBAAsB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