@vibesdotdev/secrets 0.0.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 (208) hide show
  1. package/README.md +59 -0
  2. package/SPEC.md +47 -0
  3. package/dist/cli/check/schemas/check-result.d.ts +9 -0
  4. package/dist/cli/check/schemas/check-result.d.ts.map +1 -0
  5. package/dist/cli/check/schemas/check-result.js +2 -0
  6. package/dist/cli/check/schemas/check-result.js.map +1 -0
  7. package/dist/cli/check/secrets.check.cli-command.descriptor.d.ts +4 -0
  8. package/dist/cli/check/secrets.check.cli-command.descriptor.d.ts.map +1 -0
  9. package/dist/cli/check/secrets.check.cli-command.descriptor.js +19 -0
  10. package/dist/cli/check/secrets.check.cli-command.descriptor.js.map +1 -0
  11. package/dist/cli/check/secrets.check.cli-command.impl.d.ts +5 -0
  12. package/dist/cli/check/secrets.check.cli-command.impl.d.ts.map +1 -0
  13. package/dist/cli/check/secrets.check.cli-command.impl.js +135 -0
  14. package/dist/cli/check/secrets.check.cli-command.impl.js.map +1 -0
  15. package/dist/cli/export/secrets.export.cli-command.descriptor.d.ts +4 -0
  16. package/dist/cli/export/secrets.export.cli-command.descriptor.d.ts.map +1 -0
  17. package/dist/cli/export/secrets.export.cli-command.descriptor.js +20 -0
  18. package/dist/cli/export/secrets.export.cli-command.descriptor.js.map +1 -0
  19. package/dist/cli/export/secrets.export.cli-command.impl.d.ts +5 -0
  20. package/dist/cli/export/secrets.export.cli-command.impl.d.ts.map +1 -0
  21. package/dist/cli/export/secrets.export.cli-command.impl.js +104 -0
  22. package/dist/cli/export/secrets.export.cli-command.impl.js.map +1 -0
  23. package/dist/cli/hooks/pre-commit-secrets.d.ts +2 -0
  24. package/dist/cli/hooks/pre-commit-secrets.d.ts.map +1 -0
  25. package/dist/cli/hooks/pre-commit-secrets.js +68 -0
  26. package/dist/cli/hooks/pre-commit-secrets.js.map +1 -0
  27. package/dist/cli/import/secrets.import.cli-command.descriptor.d.ts +4 -0
  28. package/dist/cli/import/secrets.import.cli-command.descriptor.d.ts.map +1 -0
  29. package/dist/cli/import/secrets.import.cli-command.descriptor.js +19 -0
  30. package/dist/cli/import/secrets.import.cli-command.descriptor.js.map +1 -0
  31. package/dist/cli/import/secrets.import.cli-command.impl.d.ts +5 -0
  32. package/dist/cli/import/secrets.import.cli-command.impl.d.ts.map +1 -0
  33. package/dist/cli/import/secrets.import.cli-command.impl.js +155 -0
  34. package/dist/cli/import/secrets.import.cli-command.impl.js.map +1 -0
  35. package/dist/cli/list/secrets.list.cli-command.descriptor.d.ts +4 -0
  36. package/dist/cli/list/secrets.list.cli-command.descriptor.d.ts.map +1 -0
  37. package/dist/cli/list/secrets.list.cli-command.descriptor.js +18 -0
  38. package/dist/cli/list/secrets.list.cli-command.descriptor.js.map +1 -0
  39. package/dist/cli/list/secrets.list.cli-command.impl.d.ts +5 -0
  40. package/dist/cli/list/secrets.list.cli-command.impl.d.ts.map +1 -0
  41. package/dist/cli/list/secrets.list.cli-command.impl.js +61 -0
  42. package/dist/cli/list/secrets.list.cli-command.impl.js.map +1 -0
  43. package/dist/cli/pre-commit/secrets.pre-commit-check.cli-command.descriptor.d.ts +4 -0
  44. package/dist/cli/pre-commit/secrets.pre-commit-check.cli-command.descriptor.d.ts.map +1 -0
  45. package/dist/cli/pre-commit/secrets.pre-commit-check.cli-command.descriptor.js +16 -0
  46. package/dist/cli/pre-commit/secrets.pre-commit-check.cli-command.descriptor.js.map +1 -0
  47. package/dist/cli/pre-commit/secrets.pre-commit-check.cli-command.impl.d.ts +5 -0
  48. package/dist/cli/pre-commit/secrets.pre-commit-check.cli-command.impl.d.ts.map +1 -0
  49. package/dist/cli/pre-commit/secrets.pre-commit-check.cli-command.impl.js +10 -0
  50. package/dist/cli/pre-commit/secrets.pre-commit-check.cli-command.impl.js.map +1 -0
  51. package/dist/cli/pull/secrets.pull.cli-command.descriptor.d.ts +4 -0
  52. package/dist/cli/pull/secrets.pull.cli-command.descriptor.d.ts.map +1 -0
  53. package/dist/cli/pull/secrets.pull.cli-command.descriptor.js +20 -0
  54. package/dist/cli/pull/secrets.pull.cli-command.descriptor.js.map +1 -0
  55. package/dist/cli/pull/secrets.pull.cli-command.impl.d.ts +5 -0
  56. package/dist/cli/pull/secrets.pull.cli-command.impl.d.ts.map +1 -0
  57. package/dist/cli/pull/secrets.pull.cli-command.impl.js +76 -0
  58. package/dist/cli/pull/secrets.pull.cli-command.impl.js.map +1 -0
  59. package/dist/cli/push/secrets.push.cli-command.descriptor.d.ts +4 -0
  60. package/dist/cli/push/secrets.push.cli-command.descriptor.d.ts.map +1 -0
  61. package/dist/cli/push/secrets.push.cli-command.descriptor.js +22 -0
  62. package/dist/cli/push/secrets.push.cli-command.descriptor.js.map +1 -0
  63. package/dist/cli/push/secrets.push.cli-command.impl.d.ts +5 -0
  64. package/dist/cli/push/secrets.push.cli-command.impl.d.ts.map +1 -0
  65. package/dist/cli/push/secrets.push.cli-command.impl.js +109 -0
  66. package/dist/cli/push/secrets.push.cli-command.impl.js.map +1 -0
  67. package/dist/cli/reveal/secrets.reveal.cli-command.descriptor.d.ts +4 -0
  68. package/dist/cli/reveal/secrets.reveal.cli-command.descriptor.d.ts.map +1 -0
  69. package/dist/cli/reveal/secrets.reveal.cli-command.descriptor.js +19 -0
  70. package/dist/cli/reveal/secrets.reveal.cli-command.descriptor.js.map +1 -0
  71. package/dist/cli/reveal/secrets.reveal.cli-command.impl.d.ts +5 -0
  72. package/dist/cli/reveal/secrets.reveal.cli-command.impl.d.ts.map +1 -0
  73. package/dist/cli/reveal/secrets.reveal.cli-command.impl.js +85 -0
  74. package/dist/cli/reveal/secrets.reveal.cli-command.impl.js.map +1 -0
  75. package/dist/cli/secrets.cli-group.descriptor.d.ts +4 -0
  76. package/dist/cli/secrets.cli-group.descriptor.d.ts.map +1 -0
  77. package/dist/cli/secrets.cli-group.descriptor.js +11 -0
  78. package/dist/cli/secrets.cli-group.descriptor.js.map +1 -0
  79. package/dist/cli/set/secrets.set.cli-command.descriptor.d.ts +4 -0
  80. package/dist/cli/set/secrets.set.cli-command.descriptor.d.ts.map +1 -0
  81. package/dist/cli/set/secrets.set.cli-command.descriptor.js +21 -0
  82. package/dist/cli/set/secrets.set.cli-command.descriptor.js.map +1 -0
  83. package/dist/cli/set/secrets.set.cli-command.impl.d.ts +5 -0
  84. package/dist/cli/set/secrets.set.cli-command.impl.d.ts.map +1 -0
  85. package/dist/cli/set/secrets.set.cli-command.impl.js +59 -0
  86. package/dist/cli/set/secrets.set.cli-command.impl.js.map +1 -0
  87. package/dist/cli/shared/resolve-environment.d.ts +14 -0
  88. package/dist/cli/shared/resolve-environment.d.ts.map +1 -0
  89. package/dist/cli/shared/resolve-environment.js +45 -0
  90. package/dist/cli/shared/resolve-environment.js.map +1 -0
  91. package/dist/cli/unset/secrets.unset.cli-command.descriptor.d.ts +4 -0
  92. package/dist/cli/unset/secrets.unset.cli-command.descriptor.d.ts.map +1 -0
  93. package/dist/cli/unset/secrets.unset.cli-command.descriptor.js +20 -0
  94. package/dist/cli/unset/secrets.unset.cli-command.descriptor.js.map +1 -0
  95. package/dist/cli/unset/secrets.unset.cli-command.impl.d.ts +5 -0
  96. package/dist/cli/unset/secrets.unset.cli-command.impl.d.ts.map +1 -0
  97. package/dist/cli/unset/secrets.unset.cli-command.impl.js +31 -0
  98. package/dist/cli/unset/secrets.unset.cli-command.impl.js.map +1 -0
  99. package/dist/docs/backends.docs.descriptor.d.ts +4 -0
  100. package/dist/docs/backends.docs.descriptor.d.ts.map +1 -0
  101. package/dist/docs/backends.docs.descriptor.js +149 -0
  102. package/dist/docs/backends.docs.descriptor.js.map +1 -0
  103. package/dist/docs/encryption.docs.descriptor.d.ts +4 -0
  104. package/dist/docs/encryption.docs.descriptor.d.ts.map +1 -0
  105. package/dist/docs/encryption.docs.descriptor.js +163 -0
  106. package/dist/docs/encryption.docs.descriptor.js.map +1 -0
  107. package/dist/docs/env-file.docs.descriptor.d.ts +4 -0
  108. package/dist/docs/env-file.docs.descriptor.d.ts.map +1 -0
  109. package/dist/docs/env-file.docs.descriptor.js +207 -0
  110. package/dist/docs/env-file.docs.descriptor.js.map +1 -0
  111. package/dist/index.d.ts +13 -0
  112. package/dist/index.d.ts.map +1 -0
  113. package/dist/index.js +13 -0
  114. package/dist/index.js.map +1 -0
  115. package/dist/kinds/index.d.ts +4 -0
  116. package/dist/kinds/index.d.ts.map +1 -0
  117. package/dist/kinds/index.js +3 -0
  118. package/dist/kinds/index.js.map +1 -0
  119. package/dist/kinds/schemas/store.schema.d.ts +49 -0
  120. package/dist/kinds/schemas/store.schema.d.ts.map +1 -0
  121. package/dist/kinds/schemas/store.schema.js +34 -0
  122. package/dist/kinds/schemas/store.schema.js.map +1 -0
  123. package/dist/kinds/schemas/store.types.d.ts +28 -0
  124. package/dist/kinds/schemas/store.types.d.ts.map +1 -0
  125. package/dist/kinds/schemas/store.types.js +2 -0
  126. package/dist/kinds/schemas/store.types.js.map +1 -0
  127. package/dist/kinds/store.interface.d.ts +2 -0
  128. package/dist/kinds/store.interface.d.ts.map +1 -0
  129. package/dist/kinds/store.interface.js +2 -0
  130. package/dist/kinds/store.interface.js.map +1 -0
  131. package/dist/kinds/store.kind.d.ts +10 -0
  132. package/dist/kinds/store.kind.d.ts.map +1 -0
  133. package/dist/kinds/store.kind.js +36 -0
  134. package/dist/kinds/store.kind.js.map +1 -0
  135. package/dist/kinds/store.schema.d.ts +2 -0
  136. package/dist/kinds/store.schema.d.ts.map +1 -0
  137. package/dist/kinds/store.schema.js +2 -0
  138. package/dist/kinds/store.schema.js.map +1 -0
  139. package/dist/manifest/canonical.d.ts +30 -0
  140. package/dist/manifest/canonical.d.ts.map +1 -0
  141. package/dist/manifest/canonical.js +313 -0
  142. package/dist/manifest/canonical.js.map +1 -0
  143. package/dist/manifest/import-manifest.schema.d.ts +77 -0
  144. package/dist/manifest/import-manifest.schema.d.ts.map +1 -0
  145. package/dist/manifest/import-manifest.schema.js +55 -0
  146. package/dist/manifest/import-manifest.schema.js.map +1 -0
  147. package/dist/manifest/index.d.ts +3 -0
  148. package/dist/manifest/index.d.ts.map +1 -0
  149. package/dist/manifest/index.js +3 -0
  150. package/dist/manifest/index.js.map +1 -0
  151. package/dist/requirements/index.d.ts +2 -0
  152. package/dist/requirements/index.d.ts.map +1 -0
  153. package/dist/requirements/index.js +2 -0
  154. package/dist/requirements/index.js.map +1 -0
  155. package/dist/requirements/resolver.d.ts +52 -0
  156. package/dist/requirements/resolver.d.ts.map +1 -0
  157. package/dist/requirements/resolver.js +196 -0
  158. package/dist/requirements/resolver.js.map +1 -0
  159. package/dist/requirements/schemas/requirements.d.ts +27 -0
  160. package/dist/requirements/schemas/requirements.d.ts.map +1 -0
  161. package/dist/requirements/schemas/requirements.js +2 -0
  162. package/dist/requirements/schemas/requirements.js.map +1 -0
  163. package/dist/secrets.plugin.d.ts +8 -0
  164. package/dist/secrets.plugin.d.ts.map +1 -0
  165. package/dist/secrets.plugin.js +59 -0
  166. package/dist/secrets.plugin.js.map +1 -0
  167. package/package.json +108 -0
  168. package/src/cli/check/schemas/check-result.ts +8 -0
  169. package/src/cli/check/secrets.check.cli-command.descriptor.ts +21 -0
  170. package/src/cli/check/secrets.check.cli-command.impl.ts +163 -0
  171. package/src/cli/export/secrets.export.cli-command.descriptor.ts +22 -0
  172. package/src/cli/export/secrets.export.cli-command.impl.ts +139 -0
  173. package/src/cli/hooks/pre-commit-secrets.ts +73 -0
  174. package/src/cli/import/secrets.import.cli-command.descriptor.ts +21 -0
  175. package/src/cli/import/secrets.import.cli-command.impl.ts +178 -0
  176. package/src/cli/list/secrets.list.cli-command.descriptor.ts +21 -0
  177. package/src/cli/list/secrets.list.cli-command.impl.ts +79 -0
  178. package/src/cli/pre-commit/secrets.pre-commit-check.cli-command.descriptor.ts +18 -0
  179. package/src/cli/pre-commit/secrets.pre-commit-check.cli-command.impl.ts +11 -0
  180. package/src/cli/pull/secrets.pull.cli-command.descriptor.ts +22 -0
  181. package/src/cli/pull/secrets.pull.cli-command.impl.ts +103 -0
  182. package/src/cli/push/secrets.push.cli-command.descriptor.ts +24 -0
  183. package/src/cli/push/secrets.push.cli-command.impl.ts +149 -0
  184. package/src/cli/reveal/secrets.reveal.cli-command.descriptor.ts +21 -0
  185. package/src/cli/reveal/secrets.reveal.cli-command.impl.ts +108 -0
  186. package/src/cli/secrets.cli-group.descriptor.ts +13 -0
  187. package/src/cli/set/secrets.set.cli-command.descriptor.ts +23 -0
  188. package/src/cli/set/secrets.set.cli-command.impl.ts +77 -0
  189. package/src/cli/shared/resolve-environment.ts +57 -0
  190. package/src/cli/unset/secrets.unset.cli-command.descriptor.ts +22 -0
  191. package/src/cli/unset/secrets.unset.cli-command.impl.ts +41 -0
  192. package/src/docs/backends.docs.descriptor.ts +151 -0
  193. package/src/docs/encryption.docs.descriptor.ts +165 -0
  194. package/src/docs/env-file.docs.descriptor.ts +209 -0
  195. package/src/index.ts +35 -0
  196. package/src/kinds/index.ts +12 -0
  197. package/src/kinds/schemas/store.schema.ts +47 -0
  198. package/src/kinds/schemas/store.types.ts +35 -0
  199. package/src/kinds/store.interface.ts +1 -0
  200. package/src/kinds/store.kind.ts +52 -0
  201. package/src/kinds/store.schema.ts +8 -0
  202. package/src/manifest/canonical.ts +324 -0
  203. package/src/manifest/import-manifest.schema.ts +63 -0
  204. package/src/manifest/index.ts +12 -0
  205. package/src/requirements/index.ts +6 -0
  206. package/src/requirements/resolver.ts +216 -0
  207. package/src/requirements/schemas/requirements.ts +29 -0
  208. package/src/secrets.plugin.ts +65 -0
@@ -0,0 +1,149 @@
1
+ const descriptor = {
2
+ kind: 'docs/topic',
3
+ id: 'secrets.backends',
4
+ title: 'Secret Backends',
5
+ summary: 'Pluggable secret storage backends (vault, wrangler, encrypted-local)',
6
+ body: {
7
+ type: 'markdown',
8
+ sourceType: 'raw',
9
+ source: `---
10
+ title: Secret Backends
11
+ summary: Pluggable secret storage backends for different environments
12
+ tags: [secrets, backends, vault, wrangler, encryption]
13
+ parent: secrets
14
+ order: 1
15
+ surfaces: [cli, web, in-app]
16
+ hardware: [consumer, cloud]
17
+ ---
18
+
19
+ The secrets package uses a **pluggable backend architecture** to support different secret storage mechanisms across environments. Backends register themselves as \`secrets/store\` descriptors with the runtime.
20
+
21
+ ## Available backends
22
+
23
+ ### Vault backend (production cloud)
24
+
25
+ HashiCorp Vault backend for production cloud deployments:
26
+
27
+ \`\`\`ts
28
+ import { vaultBackend } from '@vibesdotdev/secrets-backend-vault';
29
+
30
+ await runtime.registerPlugin(vaultBackend.plugin({
31
+ address: process.env.VAULT_ADDR,
32
+ token: process.env.VAULT_TOKEN
33
+ }));
34
+ \`\`\`
35
+
36
+ **Use when:** Running in production cloud environments with Vault infrastructure.
37
+
38
+ ### Wrangler secrets (Cloudflare Workers)
39
+
40
+ Cloudflare Workers secrets via Wrangler:
41
+
42
+ \`\`\`ts
43
+ import { wranglerBackend } from '@vibesdotdev/secrets-backend-wrangler';
44
+
45
+ await runtime.registerPlugin(wranglerBackend.plugin());
46
+ \`\`\`
47
+
48
+ **Use when:** Deploying to Cloudflare Workers edge runtime.
49
+
50
+ ### Encrypted local backend (development)
51
+
52
+ Local development with encryption at rest:
53
+
54
+ \`\`\`ts
55
+ import { encryptedLocalBackend } from '@vibesdotdev/secrets-backend-encrypted-local';
56
+
57
+ await runtime.registerPlugin(encryptedLocalBackend.plugin({
58
+ keyPath: '.vibes/secrets.key',
59
+ dataPath: '.vibes/secrets.enc.json'
60
+ }));
61
+ \`\`\`
62
+
63
+ **Use when:** Local development, testing, or single-user consumer apps.
64
+
65
+ ## Backend resolution
66
+
67
+ The runtime selects backends based on **environment tier** and **priority**:
68
+
69
+ \`\`\`ts
70
+ const store = await runtime.query('secrets/store')
71
+ .forHardware('consumer')
72
+ .resolve();
73
+
74
+ // Resolution logic:
75
+ // 1. Filter by environment tier (from scope qualifiers)
76
+ // 2. Sort by priority (higher = preferred)
77
+ // 3. Return first match
78
+ \`\`\`
79
+
80
+ Environment tiers:
81
+ - \`local\` — Development environments
82
+ - \`staging\` — Staging/pre-production
83
+ - \`production\` — Production cloud
84
+
85
+ ## WRONG: Hardcoding backend selection
86
+
87
+ \`\`\`ts
88
+ // ❌ NEVER — bypasses tier-based resolution
89
+ const store = await runtime.query('secrets/store')
90
+ .withId('encrypted-local')
91
+ .resolve();
92
+ \`\`\`
93
+
94
+ ## RIGHT: Hardware-scoped resolution
95
+
96
+ \`\`\`ts
97
+ // ✅ Let runtime select based on tier + priority
98
+ const store = await runtime.query('secrets/store')
99
+ .forHardware('consumer')
100
+ .resolve();
101
+ \`\`\`
102
+
103
+ ## Backend registration
104
+
105
+ Backends register as \`secrets/store\` descriptors:
106
+
107
+ \`\`\`ts
108
+ export const vaultBackend = createRuntimePlugin({
109
+ id: 'secrets-backend-vault',
110
+ descriptors: [{
111
+ kind: 'secrets/store',
112
+ id: 'vault',
113
+ title: 'HashiCorp Vault',
114
+ tiers: ['production'],
115
+ priority: 100, // highest priority for production
116
+ implementation: VaultStoreImplementation
117
+ }]
118
+ });
119
+ \`\`\`
120
+
121
+ ## Missing backend behavior
122
+
123
+ **Hard rule:** Missing backends cause hard failure. The \`resolve()\` method throws if no backend has registered for the current scope.
124
+
125
+ \`\`\`ts
126
+ try {
127
+ const store = await runtime.query('secrets/store').resolve();
128
+ } catch (error) {
129
+ // No backend registered for current tier/hardware
130
+ console.error('No secrets backend available');
131
+ }
132
+ \`\`\`
133
+
134
+ :::card{title="See also"}
135
+ - [\`secrets.encryption\`](secrets.encryption) — Encryption at rest, key management
136
+ - [\`secrets.env-file\`](secrets.env-file) — .env file handling
137
+ - [\`config/environment\`](config.environment) — Environment tier configuration
138
+ :::
139
+ `
140
+ },
141
+ parent: 'secrets',
142
+ order: 1,
143
+ tags: ['secrets', 'backends', 'vault', 'wrangler', 'encryption'],
144
+ surfaces: ['cli', 'web', 'in-app'],
145
+ hardware: ['consumer', 'cloud'],
146
+ enabled: true
147
+ };
148
+ export default descriptor;
149
+ //# sourceMappingURL=backends.docs.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backends.docs.descriptor.js","sourceRoot":"","sources":["../../src/docs/backends.docs.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAwB;IACtC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,kBAAkB;IACtB,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE,sEAAsE;IAC/E,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkIX;KACE;IACD,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC;IAChE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC;IAClC,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { DocsTopicDescriptor } from '@vibesdotdev/docs';
2
+ declare const descriptor: DocsTopicDescriptor;
3
+ export default descriptor;
4
+ //# sourceMappingURL=encryption.docs.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encryption.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/docs/encryption.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,QAAA,MAAM,UAAU,EAAE,mBAgKjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,163 @@
1
+ const descriptor = {
2
+ kind: 'docs/topic',
3
+ id: 'secrets.encryption',
4
+ title: 'Encryption at Rest',
5
+ summary: 'Secret encryption, key management, and rotation strategies',
6
+ body: {
7
+ type: 'markdown',
8
+ sourceType: 'raw',
9
+ source: `---
10
+ title: Encryption at Rest
11
+ summary: Secret encryption, key management, and rotation strategies
12
+ tags: [secrets, encryption, key-management, rotation, security]
13
+ parent: secrets
14
+ order: 2
15
+ surfaces: [cli, web, in-app]
16
+ hardware: [consumer, cloud]
17
+ ---
18
+
19
+ Secrets are **encrypted at rest** using industry-standard algorithms. Encryption is handled automatically by backends — applications never see plaintext encryption keys.
20
+
21
+ ## Encryption algorithms
22
+
23
+ ### AES-256-GCM (symmetric)
24
+
25
+ Default algorithm for secret encryption:
26
+
27
+ - **Key size:** 256 bits
28
+ - **Mode:** GCM (Galois/Counter Mode)
29
+ - **IV:** 96-bit random nonce per encryption
30
+ - **Tag:** 128-bit authentication tag
31
+
32
+ \`\`\`ts
33
+ import { encrypt, decrypt } from '@vibesdotdev/secrets/encryption';
34
+
35
+ const key = await deriveKeyFromMasterKey(masterKey, salt);
36
+ const ciphertext = await encrypt(plaintext, key);
37
+ // ciphertext = { iv, tag, data }
38
+ \`\`\`
39
+
40
+ ### Key derivation (PBKDF2)
41
+
42
+ Master keys are derived from user-provided passphrases:
43
+
44
+ - **Algorithm:** PBKDF2-HMAC-SHA256
45
+ - **Iterations:** 100,000 (adjusts with hardware)
46
+ - **Salt:** 32-byte random per key
47
+
48
+ \`\`\`ts
49
+ import { deriveKeyFromPassphrase } from '@vibesdotdev/secrets/encryption';
50
+
51
+ const masterKey = await deriveKeyFromPassphrase(passphrase, salt, {
52
+ iterations: 100_000,
53
+ keyLength: 32
54
+ });
55
+ \`\`\`
56
+
57
+ ## Key management
58
+
59
+ ### Master key storage
60
+
61
+ Master keys are stored **separately** from encrypted data:
62
+
63
+ 1. **Hardware security module (HSM)** — Production cloud
64
+ 2. **OS keychain** — Local development (macOS Keychain, Windows Credential Manager)
65
+ 3. **Environment variable** — CI/CD (never committed)
66
+
67
+ ### Key rotation
68
+
69
+ Keys can be rotated without decrypting data:
70
+
71
+ \`\`\`ts
72
+ import { rotateKey, reEncryptSecrets } from '@vibesdotdev/secrets/encryption';
73
+
74
+ // Generate new key
75
+ const newKey = await generateRandomKey(32);
76
+
77
+ // Re-encrypt all secrets with new key
78
+ await reEncryptSecrets(oldKey, newKey);
79
+
80
+ // Update key storage
81
+ await storeMasterKey(newKey);
82
+ \`\`\`
83
+
84
+ **Rotation triggers:**
85
+ - Scheduled rotation (every 90 days)
86
+ - Suspected compromise
87
+ - Employee offboarding
88
+ - Compliance requirements
89
+
90
+ ## Encryption envelope
91
+
92
+ Encrypted secrets use a standard envelope format:
93
+
94
+ \`\`\`json
95
+ {
96
+ "version": 1,
97
+ "algorithm": "aes-256-gcm",
98
+ "kdf": "pbkdf2-hmac-sha256",
99
+ "salt": "base64-encoded-salt",
100
+ "iv": "base64-encoded-iv",
101
+ "tag": "base64-encoded-tag",
102
+ "ciphertext": "base64-encoded-ciphertext"
103
+ }
104
+ \`\`\`
105
+
106
+ ## WRONG: Manual encryption
107
+
108
+ \`\`\`ts
109
+ // ❌ NEVER — use backend APIs instead
110
+ import { encrypt } from '@vibesdotdev/secrets/encryption';
111
+
112
+ const encrypted = await encrypt(secret, key);
113
+ await fs.writeFile('.secrets.enc.json', JSON.stringify(encrypted));
114
+ \`\`\`
115
+
116
+ ## RIGHT: Backend-managed encryption
117
+
118
+ \`\`\`ts
119
+ // ✅ Backend handles encryption automatically
120
+ const store = await runtime.query('secrets/store').resolve();
121
+ await store.set('API_KEY', '<api-key>');
122
+ // Encryption happens transparently
123
+ \`\`\`
124
+
125
+ ## Compliance considerations
126
+
127
+ ### SOC 2 Type II
128
+
129
+ - ✅ Encryption at rest (AES-256)
130
+ - ✅ Key rotation policies
131
+ - ✅ Access logging and auditing
132
+ - ✅ Separation of duties (key custodians)
133
+
134
+ ### GDPR
135
+
136
+ - ✅ Data minimization (encrypt only what's needed)
137
+ - ✅ Right to erasure (delete keys = delete data)
138
+ - ✅ Data processing records (audit logs)
139
+
140
+ ## Key backup
141
+
142
+ **Critical:** Losing the master key means **permanent data loss**. Backups are essential:
143
+
144
+ 1. **Shamir's Secret Sharing** — Split key into N shares, require M to reconstruct
145
+ 2. **Geographic distribution** — Store shares in different regions
146
+ 3. **Hardware tokens** — YubiKey, smartcards for key storage
147
+
148
+ :::card{title="See also"}
149
+ - [\`secrets.backends\`](secrets.backends) — Secret backend implementations
150
+ - [\`secrets.env-file\`](secrets.env-file) — Encrypted .env files
151
+ - [\`config/secrets\`](config.secrets) — Secret requirements and validation
152
+ :::
153
+ `
154
+ },
155
+ parent: 'secrets',
156
+ order: 2,
157
+ tags: ['secrets', 'encryption', 'key-management', 'rotation', 'security'],
158
+ surfaces: ['cli', 'web', 'in-app'],
159
+ hardware: ['consumer', 'cloud'],
160
+ enabled: true
161
+ };
162
+ export default descriptor;
163
+ //# sourceMappingURL=encryption.docs.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encryption.docs.descriptor.js","sourceRoot":"","sources":["../../src/docs/encryption.docs.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAwB;IACtC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,oBAAoB;IACxB,KAAK,EAAE,oBAAoB;IAC3B,OAAO,EAAE,4DAA4D;IACrE,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgJX;KACE;IACD,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,CAAC;IACzE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC;IAClC,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { DocsTopicDescriptor } from '@vibesdotdev/docs';
2
+ declare const descriptor: DocsTopicDescriptor;
3
+ export default descriptor;
4
+ //# sourceMappingURL=env-file.docs.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-file.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/docs/env-file.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,QAAA,MAAM,UAAU,EAAE,mBA4MjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,207 @@
1
+ const descriptor = {
2
+ kind: 'docs/topic',
3
+ id: 'secrets.env-file',
4
+ title: 'Encrypted Environment Files',
5
+ summary: '.env file encryption, decryption, and secure handling',
6
+ body: {
7
+ type: 'markdown',
8
+ sourceType: 'raw',
9
+ source: `---
10
+ title: Encrypted Environment Files
11
+ summary: Secure .env file handling with encryption at rest
12
+ tags: [secrets, env, dotenv, encryption, configuration]
13
+ parent: secrets
14
+ order: 3
15
+ surfaces: [cli, web, in-app]
16
+ hardware: [consumer, cloud]
17
+ man:
18
+ name: "secrets.env-file — Encrypted environment files"
19
+ section: 1
20
+ synopsis: "vibes man secrets.env-file"
21
+ seeAlso: ["secrets.set", "secrets.reveal", "config.environment"]
22
+ ---
23
+
24
+ Environment files (\`.env\`) can be **encrypted at rest** to protect secrets in version control and local storage.
25
+
26
+ ## File formats
27
+
28
+ ### Plaintext .env (development only)
29
+
30
+ \`\`\`bash
31
+ # .env (development only — never commit)
32
+ DATABASE_URL=postgres://localhost/mydb
33
+ API_KEY=sk-test-123456789
34
+ \`\`\`
35
+
36
+ **Security:** ❌ No encryption — suitable for local development only.
37
+
38
+ ### Encrypted .env.enc
39
+
40
+ \`\`\`bash
41
+ # .env.enc (safe to commit)
42
+ {
43
+ "version": 1,
44
+ "algorithm": "aes-256-gcm",
45
+ "salt": "...",
46
+ "iv": "...",
47
+ "tag": "...",
48
+ "ciphertext": "..."
49
+ }
50
+ \`\`\`
51
+
52
+ **Security:** ✅ Encrypted — safe to commit to version control.
53
+
54
+ ## CLI commands
55
+
56
+ ### Encrypt a .env file
57
+
58
+ \`\`\`bash
59
+ vibes secrets encrypt .env --output .env.enc
60
+ \`\`\`
61
+
62
+ Prompts for encryption passphrase (or uses \`VIBES_SECRET_PASSPHRASE\` env var).
63
+
64
+ ### Decrypt a .env.enc file
65
+
66
+ \`\`\`bash
67
+ vibes secrets decrypt .env.enc --output .env
68
+ \`\`\`
69
+
70
+ Creates decrypted file in memory only — never writes plaintext to disk.
71
+
72
+ ### Reveal secrets (one-time)
73
+
74
+ \`\`\`bash
75
+ vibes secrets reveal --format export
76
+ # Output:
77
+ # export DATABASE_URL="postgres://..."
78
+ # export API_KEY="<api-key>"
79
+ \`\`\`
80
+
81
+ ## Programmatic usage
82
+
83
+ ### Load encrypted .env
84
+
85
+ \`\`\`ts
86
+ import { loadEncryptedEnv } from '@vibesdotdev/secrets/env-file';
87
+
88
+ const secrets = await loadEncryptedEnv('.env.enc', {
89
+ passphrase: process.env.VIBES_SECRET_PASSPHRASE
90
+ });
91
+
92
+ // Secrets available in memory only
93
+ console.log(secrets.DATABASE_URL);
94
+ \`\`\`
95
+
96
+ ### Write encrypted .env
97
+
98
+ \`\`\`ts
99
+ import { writeEncryptedEnv } from '@vibesdotdev/secrets/env-file';
100
+
101
+ await writeEncryptedEnv('.env.enc', {
102
+ DATABASE_URL: 'postgres://...',
103
+ API_KEY: '<api-key>'
104
+ }, {
105
+ passphrase: 'your-passphrase'
106
+ });
107
+ \`\`\`
108
+
109
+ ## Integration with backends
110
+
111
+ Encrypted .env files can **sync** with secret backends:
112
+
113
+ ### Push to backend
114
+
115
+ \`\`\`bash
116
+ vibes secrets push --from .env.enc
117
+ \`\`\`
118
+
119
+ Decrypts and uploads secrets to the configured backend (Vault, Wrangler, etc.).
120
+
121
+ ### Pull from backend
122
+
123
+ \`\`\`bash
124
+ vibes secrets pull --to .env.enc
125
+ \`\`\`
126
+
127
+ Downloads secrets from backend and writes encrypted file.
128
+
129
+ ## WRONG: Committing plaintext .env
130
+
131
+ \`\`\`bash
132
+ # ❌ NEVER — add to .gitignore immediately
133
+ echo ".env" >> .gitignore
134
+ git add .env # DON'T DO THIS
135
+ \`\`\`
136
+
137
+ ## RIGHT: Commit encrypted version
138
+
139
+ \`\`\`bash
140
+ # ✅ Safe to commit
141
+ vibes secrets encrypt .env --output .env.enc
142
+ git add .env.enc
143
+ git commit -m "Add encrypted environment"
144
+ \`\`\`
145
+
146
+ ## Pre-commit hook
147
+
148
+ The pre-commit hook **blocks** plaintext secrets:
149
+
150
+ \`\`\`bash
151
+ # .git/hooks/pre-commit
152
+ vibes secrets pre-commit-check
153
+ \`\`\`
154
+
155
+ Scans staged files for:
156
+ - AWS access keys (\`AKIA...\`)
157
+ - PEM private-key headers
158
+ - API tokens (Stripe, GitHub, etc.)
159
+ - High-entropy strings (potential secrets)
160
+
161
+ ## Environment variable injection
162
+
163
+ Decrypted secrets are injected as environment variables:
164
+
165
+ \`\`\`ts
166
+ // apps/my-app/src/server/hooks/env.ts
167
+ import { loadEncryptedEnv } from '@vibesdotdev/secrets/env-file';
168
+
169
+ export async function handle(): Promise<void> {
170
+ const secrets = await loadEncryptedEnv('.env.enc');
171
+ Object.entries(secrets).forEach(([key, value]) => {
172
+ process.env[key] = value;
173
+ });
174
+ }
175
+ \`\`\`
176
+
177
+ ## File permissions
178
+
179
+ Encrypted files should have restrictive permissions:
180
+
181
+ \`\`\`bash
182
+ chmod 600 .env.enc # Owner read/write only
183
+ chmod 600 .vibes/ # Secrets directory
184
+ \`\`\`
185
+
186
+ :::card{title="See also"}
187
+ - [\`secrets.backends\`](secrets.backends) — Secret storage backends
188
+ - [\`secrets.encryption\`](secrets.encryption) — Encryption algorithms
189
+ - [\`secrets.check\`](secrets.check) — Secret scanning and validation
190
+ :::
191
+ `
192
+ },
193
+ parent: 'secrets',
194
+ order: 3,
195
+ tags: ['secrets', 'env', 'dotenv', 'encryption', 'configuration'],
196
+ surfaces: ['cli', 'web', 'in-app'],
197
+ hardware: ['consumer', 'cloud'],
198
+ man: {
199
+ name: 'secrets.env-file — Encrypted environment files',
200
+ section: 1,
201
+ synopsis: 'vibes man secrets.env-file',
202
+ seeAlso: ['secrets.set', 'secrets.reveal', 'config.environment']
203
+ },
204
+ enabled: true
205
+ };
206
+ export default descriptor;
207
+ //# sourceMappingURL=env-file.docs.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-file.docs.descriptor.js","sourceRoot":"","sources":["../../src/docs/env-file.docs.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAwB;IACtC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,kBAAkB;IACtB,KAAK,EAAE,6BAA6B;IACpC,OAAO,EAAE,uDAAuD;IAChE,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsLX;KACE;IACD,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,CAAC;IACjE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC;IAClC,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,GAAG,EAAE;QACH,IAAI,EAAE,gDAAgD;QACtD,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,4BAA4B;QACtC,OAAO,EAAE,CAAC,aAAa,EAAE,gBAAgB,EAAE,oBAAoB,CAAC;KACjE;IACD,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @vibesdotdev/secrets
3
+ *
4
+ * Environment-aware secrets management with pluggable backends.
5
+ * Provides the secrets/store runtime kind. Backends live in sibling packages.
6
+ *
7
+ * Hard rule: missing-backend means hard failure. resolve() throws if no
8
+ * backend has registered for the current scope.
9
+ */
10
+ export { SecretsStoreDescriptorSchema, EnvironmentTierSchema, SecretsBackendSchema, type SecretsStoreDescriptor, type EnvironmentTier, type SecretsBackend, type SecretEntry, type SecretsStoreImplementation, secretsStoreKind } from './kinds/index';
11
+ export { SecretsImportManifestSchema, SecretManifestEntrySchema, SecretSourceSchema, SecretCategorySchema, canonicalImportManifest, type SecretsImportManifest, type SecretManifestEntry, type SecretSource, type SecretCategory } from './manifest/index';
12
+ export { default as secretsPlugin } from './secrets.plugin';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACN,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,0BAA0B,EAC/B,gBAAgB,EAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACN,2BAA2B,EAC3B,yBAAyB,EACzB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @vibesdotdev/secrets
3
+ *
4
+ * Environment-aware secrets management with pluggable backends.
5
+ * Provides the secrets/store runtime kind. Backends live in sibling packages.
6
+ *
7
+ * Hard rule: missing-backend means hard failure. resolve() throws if no
8
+ * backend has registered for the current scope.
9
+ */
10
+ export { SecretsStoreDescriptorSchema, EnvironmentTierSchema, SecretsBackendSchema, secretsStoreKind } from './kinds/index.js';
11
+ export { SecretsImportManifestSchema, SecretManifestEntrySchema, SecretSourceSchema, SecretCategorySchema, canonicalImportManifest } from './manifest/index.js';
12
+ export { default as secretsPlugin } from './secrets.plugin.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACN,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EAMpB,gBAAgB,EAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACN,2BAA2B,EAC3B,yBAAyB,EACzB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EAKvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { SecretsStoreDescriptorSchema, EnvironmentTierSchema, SecretsBackendSchema, type SecretsStoreDescriptor, type EnvironmentTier, type SecretsBackend } from './store.schema';
2
+ export type { SecretEntry, SecretsStoreImplementation } from './store.interface';
3
+ export { secretsStoreKind } from './store.kind';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kinds/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAEjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { SecretsStoreDescriptorSchema, EnvironmentTierSchema, SecretsBackendSchema } from './store.schema.js';
2
+ export { secretsStoreKind } from './store.kind.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/kinds/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EAIpB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Secrets Store Descriptor Schema
3
+ *
4
+ * Defines the structure for secrets/store kind descriptors.
5
+ * Each descriptor represents a secrets storage backend
6
+ * (env-file, encrypted-local, cloudflare-api, vault).
7
+ */
8
+ import * as z from 'zod/v4';
9
+ export declare const EnvironmentTierSchema: z.ZodEnum<{
10
+ local: "local";
11
+ dev: "dev";
12
+ staging: "staging";
13
+ production: "production";
14
+ }>;
15
+ export type EnvironmentTier = z.infer<typeof EnvironmentTierSchema>;
16
+ export declare const SecretsBackendSchema: z.ZodEnum<{
17
+ "env-file": "env-file";
18
+ "encrypted-local": "encrypted-local";
19
+ "cloudflare-api": "cloudflare-api";
20
+ "cloudflare-secrets-store": "cloudflare-secrets-store";
21
+ vault: "vault";
22
+ }>;
23
+ export type SecretsBackend = z.infer<typeof SecretsBackendSchema>;
24
+ export declare const SecretsStoreDescriptorSchema: z.ZodObject<{
25
+ id: z.ZodString;
26
+ kind: z.ZodLiteral<"secrets/store">;
27
+ name: z.ZodOptional<z.ZodString>;
28
+ description: z.ZodOptional<z.ZodString>;
29
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
+ enabled: z.ZodOptional<z.ZodBoolean>;
31
+ hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
32
+ backend: z.ZodEnum<{
33
+ "env-file": "env-file";
34
+ "encrypted-local": "encrypted-local";
35
+ "cloudflare-api": "cloudflare-api";
36
+ "cloudflare-secrets-store": "cloudflare-secrets-store";
37
+ vault: "vault";
38
+ }>;
39
+ tiers: z.ZodArray<z.ZodEnum<{
40
+ local: "local";
41
+ dev: "dev";
42
+ staging: "staging";
43
+ production: "production";
44
+ }>>;
45
+ priority: z.ZodDefault<z.ZodNumber>;
46
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
47
+ }, z.core.$strip>;
48
+ export type SecretsStoreDescriptor = z.infer<typeof SecretsStoreDescriptorSchema>;
49
+ //# sourceMappingURL=store.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.schema.d.ts","sourceRoot":"","sources":["../../../src/kinds/schemas/store.schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,qBAAqB;;;;;EAAoD,CAAC;AAEvF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,oBAAoB;;;;;;EAM/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;iBAoBvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}