@kadi.build/deploy-ability 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 (198) hide show
  1. package/README.md +523 -0
  2. package/dist/constants.d.ts +82 -0
  3. package/dist/constants.d.ts.map +1 -0
  4. package/dist/constants.js +82 -0
  5. package/dist/constants.js.map +1 -0
  6. package/dist/errors/certificate-error.d.ts +95 -0
  7. package/dist/errors/certificate-error.d.ts.map +1 -0
  8. package/dist/errors/certificate-error.js +111 -0
  9. package/dist/errors/certificate-error.js.map +1 -0
  10. package/dist/errors/deployment-error.d.ts +122 -0
  11. package/dist/errors/deployment-error.d.ts.map +1 -0
  12. package/dist/errors/deployment-error.js +185 -0
  13. package/dist/errors/deployment-error.js.map +1 -0
  14. package/dist/errors/index.d.ts +13 -0
  15. package/dist/errors/index.d.ts.map +1 -0
  16. package/dist/errors/index.js +18 -0
  17. package/dist/errors/index.js.map +1 -0
  18. package/dist/errors/profile-error.d.ts +106 -0
  19. package/dist/errors/profile-error.d.ts.map +1 -0
  20. package/dist/errors/profile-error.js +127 -0
  21. package/dist/errors/profile-error.js.map +1 -0
  22. package/dist/errors/provider-error.d.ts +104 -0
  23. package/dist/errors/provider-error.d.ts.map +1 -0
  24. package/dist/errors/provider-error.js +120 -0
  25. package/dist/errors/provider-error.js.map +1 -0
  26. package/dist/errors/wallet-error.d.ts +131 -0
  27. package/dist/errors/wallet-error.d.ts.map +1 -0
  28. package/dist/errors/wallet-error.js +154 -0
  29. package/dist/errors/wallet-error.js.map +1 -0
  30. package/dist/index.d.ts +49 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +53 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/targets/akash/bid-selectors.d.ts +251 -0
  35. package/dist/targets/akash/bid-selectors.d.ts.map +1 -0
  36. package/dist/targets/akash/bid-selectors.js +322 -0
  37. package/dist/targets/akash/bid-selectors.js.map +1 -0
  38. package/dist/targets/akash/bid-types.d.ts +297 -0
  39. package/dist/targets/akash/bid-types.d.ts.map +1 -0
  40. package/dist/targets/akash/bid-types.js +89 -0
  41. package/dist/targets/akash/bid-types.js.map +1 -0
  42. package/dist/targets/akash/blockchain-client.d.ts +577 -0
  43. package/dist/targets/akash/blockchain-client.d.ts.map +1 -0
  44. package/dist/targets/akash/blockchain-client.js +803 -0
  45. package/dist/targets/akash/blockchain-client.js.map +1 -0
  46. package/dist/targets/akash/certificate-manager.d.ts +228 -0
  47. package/dist/targets/akash/certificate-manager.d.ts.map +1 -0
  48. package/dist/targets/akash/certificate-manager.js +395 -0
  49. package/dist/targets/akash/certificate-manager.js.map +1 -0
  50. package/dist/targets/akash/constants.d.ts +231 -0
  51. package/dist/targets/akash/constants.d.ts.map +1 -0
  52. package/dist/targets/akash/constants.js +225 -0
  53. package/dist/targets/akash/constants.js.map +1 -0
  54. package/dist/targets/akash/deployer.d.ts +136 -0
  55. package/dist/targets/akash/deployer.d.ts.map +1 -0
  56. package/dist/targets/akash/deployer.js +599 -0
  57. package/dist/targets/akash/deployer.js.map +1 -0
  58. package/dist/targets/akash/environment.d.ts +241 -0
  59. package/dist/targets/akash/environment.d.ts.map +1 -0
  60. package/dist/targets/akash/environment.js +245 -0
  61. package/dist/targets/akash/environment.js.map +1 -0
  62. package/dist/targets/akash/index.d.ts +1113 -0
  63. package/dist/targets/akash/index.d.ts.map +1 -0
  64. package/dist/targets/akash/index.js +909 -0
  65. package/dist/targets/akash/index.js.map +1 -0
  66. package/dist/targets/akash/lease-monitor.d.ts +51 -0
  67. package/dist/targets/akash/lease-monitor.d.ts.map +1 -0
  68. package/dist/targets/akash/lease-monitor.js +110 -0
  69. package/dist/targets/akash/lease-monitor.js.map +1 -0
  70. package/dist/targets/akash/logs.d.ts +71 -0
  71. package/dist/targets/akash/logs.d.ts.map +1 -0
  72. package/dist/targets/akash/logs.js +311 -0
  73. package/dist/targets/akash/logs.js.map +1 -0
  74. package/dist/targets/akash/logs.types.d.ts +102 -0
  75. package/dist/targets/akash/logs.types.d.ts.map +1 -0
  76. package/dist/targets/akash/logs.types.js +9 -0
  77. package/dist/targets/akash/logs.types.js.map +1 -0
  78. package/dist/targets/akash/pricing.d.ts +247 -0
  79. package/dist/targets/akash/pricing.d.ts.map +1 -0
  80. package/dist/targets/akash/pricing.js +246 -0
  81. package/dist/targets/akash/pricing.js.map +1 -0
  82. package/dist/targets/akash/provider-client.d.ts +114 -0
  83. package/dist/targets/akash/provider-client.d.ts.map +1 -0
  84. package/dist/targets/akash/provider-client.js +318 -0
  85. package/dist/targets/akash/provider-client.js.map +1 -0
  86. package/dist/targets/akash/provider-metadata.d.ts +228 -0
  87. package/dist/targets/akash/provider-metadata.d.ts.map +1 -0
  88. package/dist/targets/akash/provider-metadata.js +14 -0
  89. package/dist/targets/akash/provider-metadata.js.map +1 -0
  90. package/dist/targets/akash/provider-service.d.ts +133 -0
  91. package/dist/targets/akash/provider-service.d.ts.map +1 -0
  92. package/dist/targets/akash/provider-service.js +391 -0
  93. package/dist/targets/akash/provider-service.js.map +1 -0
  94. package/dist/targets/akash/query-client.d.ts +125 -0
  95. package/dist/targets/akash/query-client.d.ts.map +1 -0
  96. package/dist/targets/akash/query-client.js +332 -0
  97. package/dist/targets/akash/query-client.js.map +1 -0
  98. package/dist/targets/akash/sdl-generator.d.ts +31 -0
  99. package/dist/targets/akash/sdl-generator.d.ts.map +1 -0
  100. package/dist/targets/akash/sdl-generator.js +279 -0
  101. package/dist/targets/akash/sdl-generator.js.map +1 -0
  102. package/dist/targets/akash/types.d.ts +285 -0
  103. package/dist/targets/akash/types.d.ts.map +1 -0
  104. package/dist/targets/akash/types.js +54 -0
  105. package/dist/targets/akash/types.js.map +1 -0
  106. package/dist/targets/akash/wallet-manager.d.ts +526 -0
  107. package/dist/targets/akash/wallet-manager.d.ts.map +1 -0
  108. package/dist/targets/akash/wallet-manager.js +953 -0
  109. package/dist/targets/akash/wallet-manager.js.map +1 -0
  110. package/dist/targets/local/compose-generator.d.ts +244 -0
  111. package/dist/targets/local/compose-generator.d.ts.map +1 -0
  112. package/dist/targets/local/compose-generator.js +324 -0
  113. package/dist/targets/local/compose-generator.js.map +1 -0
  114. package/dist/targets/local/deployer.d.ts +82 -0
  115. package/dist/targets/local/deployer.d.ts.map +1 -0
  116. package/dist/targets/local/deployer.js +367 -0
  117. package/dist/targets/local/deployer.js.map +1 -0
  118. package/dist/targets/local/engine-manager.d.ts +155 -0
  119. package/dist/targets/local/engine-manager.d.ts.map +1 -0
  120. package/dist/targets/local/engine-manager.js +250 -0
  121. package/dist/targets/local/engine-manager.js.map +1 -0
  122. package/dist/targets/local/index.d.ts +40 -0
  123. package/dist/targets/local/index.d.ts.map +1 -0
  124. package/dist/targets/local/index.js +43 -0
  125. package/dist/targets/local/index.js.map +1 -0
  126. package/dist/targets/local/network-manager.d.ts +160 -0
  127. package/dist/targets/local/network-manager.d.ts.map +1 -0
  128. package/dist/targets/local/network-manager.js +337 -0
  129. package/dist/targets/local/network-manager.js.map +1 -0
  130. package/dist/targets/local/types.d.ts +327 -0
  131. package/dist/targets/local/types.d.ts.map +1 -0
  132. package/dist/targets/local/types.js +9 -0
  133. package/dist/targets/local/types.js.map +1 -0
  134. package/dist/types/common.d.ts +585 -0
  135. package/dist/types/common.d.ts.map +1 -0
  136. package/dist/types/common.js +13 -0
  137. package/dist/types/common.js.map +1 -0
  138. package/dist/types/index.d.ts +15 -0
  139. package/dist/types/index.d.ts.map +1 -0
  140. package/dist/types/index.js +12 -0
  141. package/dist/types/index.js.map +1 -0
  142. package/dist/types/options.d.ts +329 -0
  143. package/dist/types/options.d.ts.map +1 -0
  144. package/dist/types/options.js +10 -0
  145. package/dist/types/options.js.map +1 -0
  146. package/dist/types/profiles.d.ts +329 -0
  147. package/dist/types/profiles.d.ts.map +1 -0
  148. package/dist/types/profiles.js +27 -0
  149. package/dist/types/profiles.js.map +1 -0
  150. package/dist/types/results.d.ts +443 -0
  151. package/dist/types/results.d.ts.map +1 -0
  152. package/dist/types/results.js +64 -0
  153. package/dist/types/results.js.map +1 -0
  154. package/dist/types/validators.d.ts +118 -0
  155. package/dist/types/validators.d.ts.map +1 -0
  156. package/dist/types/validators.js +198 -0
  157. package/dist/types/validators.js.map +1 -0
  158. package/dist/utils/command-runner.d.ts +128 -0
  159. package/dist/utils/command-runner.d.ts.map +1 -0
  160. package/dist/utils/command-runner.js +210 -0
  161. package/dist/utils/command-runner.js.map +1 -0
  162. package/dist/utils/index.d.ts +10 -0
  163. package/dist/utils/index.d.ts.map +1 -0
  164. package/dist/utils/index.js +10 -0
  165. package/dist/utils/index.js.map +1 -0
  166. package/dist/utils/logger.d.ts +68 -0
  167. package/dist/utils/logger.d.ts.map +1 -0
  168. package/dist/utils/logger.js +93 -0
  169. package/dist/utils/logger.js.map +1 -0
  170. package/dist/utils/profile-loader.d.ts +76 -0
  171. package/dist/utils/profile-loader.d.ts.map +1 -0
  172. package/dist/utils/profile-loader.js +194 -0
  173. package/dist/utils/profile-loader.js.map +1 -0
  174. package/dist/utils/registry/index.d.ts +27 -0
  175. package/dist/utils/registry/index.d.ts.map +1 -0
  176. package/dist/utils/registry/index.js +29 -0
  177. package/dist/utils/registry/index.js.map +1 -0
  178. package/dist/utils/registry/manager.d.ts +319 -0
  179. package/dist/utils/registry/manager.d.ts.map +1 -0
  180. package/dist/utils/registry/manager.js +671 -0
  181. package/dist/utils/registry/manager.js.map +1 -0
  182. package/dist/utils/registry/setup.d.ts +135 -0
  183. package/dist/utils/registry/setup.d.ts.map +1 -0
  184. package/dist/utils/registry/setup.js +207 -0
  185. package/dist/utils/registry/setup.js.map +1 -0
  186. package/dist/utils/registry/transformer.d.ts +92 -0
  187. package/dist/utils/registry/transformer.d.ts.map +1 -0
  188. package/dist/utils/registry/transformer.js +131 -0
  189. package/dist/utils/registry/transformer.js.map +1 -0
  190. package/dist/utils/registry/types.d.ts +241 -0
  191. package/dist/utils/registry/types.d.ts.map +1 -0
  192. package/dist/utils/registry/types.js +10 -0
  193. package/dist/utils/registry/types.js.map +1 -0
  194. package/docs/EXAMPLES.md +293 -0
  195. package/docs/PLACEMENT.md +433 -0
  196. package/docs/STORAGE.md +318 -0
  197. package/docs/building-provider-reliability-tracker.md +2581 -0
  198. package/package.json +109 -0
@@ -0,0 +1,329 @@
1
+ /**
2
+ * Options type definitions for deployment operations
3
+ *
4
+ * This module defines configuration options for different deployment targets.
5
+ * All options use readonly properties to ensure immutability.
6
+ *
7
+ * @module types/options
8
+ */
9
+ import type { DeploymentLogger, Network, ContainerEngine, ProgressCallback } from './common.js';
10
+ import type { LoadedProfile, AkashDeploymentProfile } from './profiles.js';
11
+ /**
12
+ * Base deployment options shared across all targets
13
+ *
14
+ * These options apply regardless of deployment target
15
+ */
16
+ export interface BaseDeploymentOptions {
17
+ /**
18
+ * Path to project root directory containing agent.json
19
+ *
20
+ * @example '/path/to/my-project'
21
+ * @example process.cwd()
22
+ */
23
+ readonly projectRoot: string;
24
+ /**
25
+ * Deployment profile name from agent.json
26
+ *
27
+ * References a profile defined in agent.json's deploy section
28
+ *
29
+ * @example 'production'
30
+ * @example 'staging'
31
+ * @example 'local-dev'
32
+ */
33
+ readonly profile: string;
34
+ /**
35
+ * Custom logger implementation
36
+ *
37
+ * If not provided, uses console-based default logger
38
+ *
39
+ * @example
40
+ * {
41
+ * log: (msg) => winston.info(msg),
42
+ * error: (msg) => winston.error(msg),
43
+ * warn: (msg) => winston.warn(msg),
44
+ * debug: (msg) => winston.debug(msg)
45
+ * }
46
+ */
47
+ readonly logger?: DeploymentLogger;
48
+ /**
49
+ * Enable verbose debug logging
50
+ *
51
+ * @default false
52
+ */
53
+ readonly verbose?: boolean;
54
+ /**
55
+ * Dry run mode - preview without deploying
56
+ *
57
+ * When true, generates deployment artifacts but doesn't execute deployment
58
+ *
59
+ * @default false
60
+ */
61
+ readonly dryRun?: boolean;
62
+ /**
63
+ * Progress callback for real-time updates
64
+ *
65
+ * Called periodically during deployment to report progress
66
+ *
67
+ * @example
68
+ * onProgress: (event) => {
69
+ * console.log(`${event.phase}: ${event.message}`);
70
+ * if (event.progress) {
71
+ * updateProgressBar(event.progress);
72
+ * }
73
+ * }
74
+ */
75
+ readonly onProgress?: ProgressCallback;
76
+ }
77
+ /**
78
+ * Akash Network deployment options
79
+ *
80
+ * Configuration specific to deploying on Akash Network
81
+ */
82
+ export interface AkashDeploymentOptions extends BaseDeploymentOptions {
83
+ /**
84
+ * Pre-loaded profile with transformations applied
85
+ *
86
+ * Allows callers to modify the profile before deployment (e.g., replace
87
+ * local images with registry URLs). When provided, skips loading from disk.
88
+ */
89
+ readonly loadedProfile?: LoadedProfile<AkashDeploymentProfile>;
90
+ /**
91
+ * Akash network to deploy to
92
+ *
93
+ * @default 'mainnet'
94
+ */
95
+ readonly network?: Network;
96
+ /**
97
+ * Path to existing certificate JSON file
98
+ *
99
+ * If not provided, will attempt to create a new certificate
100
+ * or load from default location (~/.akash/certificate.json)
101
+ *
102
+ * @example '/path/to/certificate.json'
103
+ */
104
+ readonly certificatePath?: string;
105
+ /**
106
+ * WalletConnect project ID
107
+ *
108
+ * Required for WalletConnect integration.
109
+ * Get one at https://cloud.walletconnect.com
110
+ *
111
+ * @example 'abc123def456...'
112
+ */
113
+ readonly walletConnectProjectId?: string;
114
+ /**
115
+ * Auto-accept first bid without user confirmation
116
+ *
117
+ * Useful for automated deployments. Use with caution in production.
118
+ *
119
+ * @default false
120
+ */
121
+ readonly autoAcceptBid?: boolean;
122
+ /**
123
+ * Provider blacklist
124
+ *
125
+ * List of provider addresses to exclude from bidding
126
+ *
127
+ * @example ['akash1abc...', 'akash1def...']
128
+ */
129
+ readonly blacklist?: readonly string[];
130
+ /**
131
+ * Maximum price per block in uAKT
132
+ *
133
+ * Bids above this price will be rejected
134
+ *
135
+ * @example 1000
136
+ */
137
+ readonly maxPrice?: number;
138
+ /**
139
+ * Deployment deposit in uAKT
140
+ *
141
+ * Amount to deposit for the deployment
142
+ * If not specified, uses minimum required amount
143
+ *
144
+ * @example 5000000
145
+ */
146
+ readonly deposit?: number;
147
+ /**
148
+ * Use remote container registry instead of temporary local registry
149
+ *
150
+ * @default false
151
+ */
152
+ readonly useRemoteRegistry?: boolean;
153
+ /**
154
+ * Timeout for waiting for lease (milliseconds)
155
+ *
156
+ * @default 300000 (5 minutes)
157
+ */
158
+ readonly leaseTimeout?: number;
159
+ /**
160
+ * Timeout for waiting for containers to run (milliseconds)
161
+ *
162
+ * @default 600000 (10 minutes)
163
+ */
164
+ readonly containerTimeout?: number;
165
+ }
166
+ /**
167
+ * Local deployment options
168
+ *
169
+ * Configuration specific to local Docker/Podman deployment
170
+ */
171
+ export interface LocalDeploymentOptions extends BaseDeploymentOptions {
172
+ /**
173
+ * Container orchestration engine
174
+ *
175
+ * @default 'docker'
176
+ */
177
+ readonly engine?: ContainerEngine;
178
+ /**
179
+ * Docker network name for inter-service communication
180
+ *
181
+ * @default 'kadi-net'
182
+ */
183
+ readonly network?: string;
184
+ /**
185
+ * Path where docker-compose.yml should be generated
186
+ *
187
+ * @default '{projectRoot}/docker-compose.yml'
188
+ */
189
+ readonly composeOutputPath?: string;
190
+ /**
191
+ * Pull images before deploying
192
+ *
193
+ * Forces pull of latest image versions
194
+ *
195
+ * @default false
196
+ */
197
+ readonly pullImages?: boolean;
198
+ /**
199
+ * Force recreate containers even if configuration unchanged
200
+ *
201
+ * @default false
202
+ */
203
+ readonly forceRecreate?: boolean;
204
+ /**
205
+ * Build missing images before deploying
206
+ *
207
+ * If true, will attempt to build images that don't exist locally
208
+ *
209
+ * @default false
210
+ */
211
+ readonly buildMissing?: boolean;
212
+ /**
213
+ * Remove orphaned containers
214
+ *
215
+ * Removes containers for services not defined in current compose file
216
+ *
217
+ * @default true
218
+ */
219
+ readonly removeOrphans?: boolean;
220
+ /**
221
+ * Timeout for container startup (seconds)
222
+ *
223
+ * @default 60
224
+ */
225
+ readonly startupTimeout?: number;
226
+ }
227
+ /**
228
+ * Wallet connection options
229
+ */
230
+ export interface WalletConnectionOptions {
231
+ /**
232
+ * Network to connect to
233
+ */
234
+ readonly network: Network;
235
+ /**
236
+ * WalletConnect project ID
237
+ *
238
+ * Required if using WalletConnect instead of Keplr
239
+ */
240
+ readonly walletConnectProjectId?: string;
241
+ /**
242
+ * Preferred wallet type
243
+ *
244
+ * If not specified, will try Keplr first, then WalletConnect
245
+ */
246
+ readonly preferredWallet?: 'keplr' | 'walletconnect';
247
+ /**
248
+ * Custom logger
249
+ */
250
+ readonly logger?: DeploymentLogger;
251
+ }
252
+ /**
253
+ * Certificate loading/creation options
254
+ */
255
+ export interface CertificateOptions {
256
+ /**
257
+ * Path to existing certificate file
258
+ *
259
+ * If not provided, will look in default locations
260
+ */
261
+ readonly certificatePath?: string;
262
+ /**
263
+ * Wallet address (for certificate subject)
264
+ */
265
+ readonly walletAddress: string;
266
+ /**
267
+ * Force creation of new certificate even if one exists
268
+ *
269
+ * @default false
270
+ */
271
+ readonly forceNew?: boolean;
272
+ /**
273
+ * Where to save the certificate
274
+ *
275
+ * @default '~/.akash/certificate.json'
276
+ */
277
+ readonly savePath?: string;
278
+ /**
279
+ * Custom logger
280
+ */
281
+ readonly logger?: DeploymentLogger;
282
+ }
283
+ /**
284
+ * Options for monitoring deployment status
285
+ */
286
+ export interface MonitoringOptions {
287
+ /**
288
+ * Lease ID to monitor
289
+ */
290
+ readonly leaseId: {
291
+ readonly dseq: number;
292
+ readonly gseq: number;
293
+ readonly oseq: number;
294
+ readonly owner: string;
295
+ readonly provider: string;
296
+ };
297
+ /**
298
+ * Provider URI
299
+ */
300
+ readonly providerUri: string;
301
+ /**
302
+ * Certificate for provider communication
303
+ */
304
+ readonly certificate: {
305
+ readonly cert: string;
306
+ readonly privateKey: string;
307
+ };
308
+ /**
309
+ * Polling interval in milliseconds
310
+ *
311
+ * @default 5000
312
+ */
313
+ readonly pollInterval?: number;
314
+ /**
315
+ * Maximum time to wait in milliseconds
316
+ *
317
+ * @default 600000 (10 minutes)
318
+ */
319
+ readonly maxWaitTime?: number;
320
+ /**
321
+ * Progress callback
322
+ */
323
+ readonly onProgress?: ProgressCallback;
324
+ /**
325
+ * Custom logger
326
+ */
327
+ readonly logger?: DeploymentLogger;
328
+ }
329
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,OAAO,EACP,eAAe,EACf,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;;;;;;;OAQG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAEnC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CACxC;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAE/D;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAElC;;;;;;;OAOG;IACH,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEzC;;;;;;OAMG;IACH,QAAQ,CAAC,aA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gB,CAAC;CACpC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Options type definitions for deployment operations
3
+ *
4
+ * This module defines configuration options for different deployment targets.
5
+ * All options use readonly properties to ensure immutability.
6
+ *
7
+ * @module types/options
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -0,0 +1,329 @@
1
+ /**
2
+ * Profile type definitions from agent.json
3
+ *
4
+ * These types represent the structure of deployment profiles
5
+ * as defined in an agent's agent.json configuration file.
6
+ *
7
+ * @module types/profiles
8
+ */
9
+ import type { BaseServiceConfig, DeploymentTarget, Network, ContainerEngine } from './common.js';
10
+ import type { AkashRegion, AkashTier } from '../targets/akash/constants.js';
11
+ /**
12
+ * Agent configuration from agent.json
13
+ *
14
+ * Root structure of the agent.json file
15
+ */
16
+ export interface AgentConfig {
17
+ /**
18
+ * Agent name
19
+ */
20
+ readonly name: string;
21
+ /**
22
+ * Agent version
23
+ */
24
+ readonly version: string;
25
+ /**
26
+ * Agent description
27
+ */
28
+ readonly description?: string;
29
+ /**
30
+ * Agent license
31
+ */
32
+ readonly license?: string;
33
+ /**
34
+ * Build profiles
35
+ */
36
+ readonly build?: Readonly<Record<string, BuildProfile>>;
37
+ /**
38
+ * Deployment profiles
39
+ */
40
+ readonly deploy?: Readonly<Record<string, DeploymentProfile>>;
41
+ /**
42
+ * Scripts
43
+ */
44
+ readonly scripts?: Readonly<Record<string, string>>;
45
+ /**
46
+ * Broker configurations
47
+ */
48
+ readonly brokers?: Readonly<Record<string, string>>;
49
+ /**
50
+ * Abilities
51
+ */
52
+ readonly abilities?: Readonly<Record<string, string>>;
53
+ }
54
+ /**
55
+ * Build profile configuration
56
+ *
57
+ * Defines how to build a container image
58
+ */
59
+ export interface BuildProfile {
60
+ /**
61
+ * Image name and tag to build
62
+ */
63
+ readonly image: string;
64
+ /**
65
+ * Build engine
66
+ */
67
+ readonly engine: ContainerEngine;
68
+ /**
69
+ * Build platform
70
+ */
71
+ readonly platform: 'local' | 'akash';
72
+ /**
73
+ * Base image to use
74
+ */
75
+ readonly baseImage?: string;
76
+ /**
77
+ * Build as CLI tool
78
+ */
79
+ readonly cli?: boolean;
80
+ }
81
+ /**
82
+ * Base deployment profile
83
+ *
84
+ * Common fields across all deployment profiles
85
+ */
86
+ export interface BaseDeploymentProfile {
87
+ /**
88
+ * Deployment target
89
+ */
90
+ readonly target: DeploymentTarget;
91
+ /**
92
+ * Services to deploy
93
+ */
94
+ readonly services: Readonly<Record<string, BaseServiceConfig>>;
95
+ /**
96
+ * Enable verbose logging
97
+ */
98
+ readonly verbose?: boolean;
99
+ /**
100
+ * Show underlying commands
101
+ */
102
+ readonly showCommands?: boolean;
103
+ /**
104
+ * Skip confirmation prompts
105
+ */
106
+ readonly yes?: boolean;
107
+ /**
108
+ * Dry run mode
109
+ */
110
+ readonly dryRun?: boolean;
111
+ }
112
+ /**
113
+ * Local deployment profile
114
+ *
115
+ * Profile for local Docker/Podman deployment
116
+ */
117
+ export interface LocalDeploymentProfile extends BaseDeploymentProfile {
118
+ readonly target: 'local';
119
+ /**
120
+ * Container engine
121
+ */
122
+ readonly engine: ContainerEngine;
123
+ /**
124
+ * Docker network name
125
+ */
126
+ readonly network?: string;
127
+ }
128
+ /**
129
+ * Akash placement attributes for geographic targeting
130
+ *
131
+ * Based on **actual provider usage** on Akash mainnet (not the official schema).
132
+ * Only includes attributes that providers actually use and advertise.
133
+ *
134
+ * **Available Attributes:**
135
+ * - `region`: Geographic location (33 providers use this)
136
+ * - `tier`: Provider quality level (37 providers use this)
137
+ *
138
+ * @example
139
+ * ```typescript
140
+ * // Deploy to premium providers in Central US
141
+ * const placement: AkashPlacementAttributes = {
142
+ * region: 'us-central',
143
+ * tier: 'premium'
144
+ * };
145
+ * ```
146
+ *
147
+ * @example
148
+ * ```typescript
149
+ * // Deploy to community providers in Europe (cost-optimized)
150
+ * const placement: AkashPlacementAttributes = {
151
+ * region: 'eu-central',
152
+ * tier: 'community'
153
+ * };
154
+ * ```
155
+ */
156
+ export interface AkashPlacementAttributes {
157
+ /**
158
+ * Geographic region
159
+ *
160
+ * Providers advertise their 'region' attribute to indicate location.
161
+ * 33 providers use this attribute.
162
+ *
163
+ * **Most Common Regions:**
164
+ * - 'us-west': Western US (5 providers)
165
+ * - 'us-central': Central US/Texas (4 providers)
166
+ * - 'us-east': Eastern US (3 providers)
167
+ * - 'eu-central': Central Europe (2 providers)
168
+ *
169
+ * @example 'us-west' for Western United States
170
+ * @example 'us-central' for Central US / Texas area
171
+ * @example 'eu-central' for Central Europe
172
+ */
173
+ readonly region?: AkashRegion;
174
+ /**
175
+ * Provider tier classification
176
+ *
177
+ * Indicates service level and reliability.
178
+ * 37 providers advertise this attribute.
179
+ *
180
+ * **Provider Tiers:**
181
+ * - 'community': Standard community providers (35 providers)
182
+ * - 'premium': Premium providers with higher SLAs (2 providers)
183
+ *
184
+ * @example 'premium' for production workloads
185
+ * @example 'community' for development/testing
186
+ */
187
+ readonly tier?: AkashTier;
188
+ }
189
+ /**
190
+ * Akash deployment profile
191
+ *
192
+ * Profile for Akash Network deployment
193
+ */
194
+ export interface AkashDeploymentProfile extends BaseDeploymentProfile {
195
+ readonly target: 'akash';
196
+ /**
197
+ * Akash network
198
+ */
199
+ readonly network: Network;
200
+ /**
201
+ * Path to certificate file
202
+ */
203
+ readonly cert?: string;
204
+ /**
205
+ * Use remote container registry
206
+ */
207
+ readonly useRemoteRegistry?: boolean;
208
+ /**
209
+ * Provider blacklist
210
+ */
211
+ readonly blacklist?: readonly string[];
212
+ /**
213
+ * Maximum price per block
214
+ */
215
+ readonly maxPrice?: number;
216
+ /**
217
+ * Deployment deposit
218
+ */
219
+ readonly deposit?: number;
220
+ /**
221
+ * Pricing configuration per service
222
+ *
223
+ * Maps service name to pricing config
224
+ */
225
+ readonly pricing?: Readonly<Record<string, {
226
+ readonly amount: string;
227
+ readonly denom: 'uakt' | 'akt';
228
+ }>>;
229
+ /**
230
+ * Geographic and facility placement constraints
231
+ *
232
+ * Specify where your deployment should run using **actual provider attributes**
233
+ * from Akash mainnet. All fields are optional - only specify what matters.
234
+ *
235
+ * **Most Effective Attributes:**
236
+ * - `region`: Geographic location (us-west, us-central, eu-central) - 33 providers use this
237
+ * - `tier`: Provider quality level (community, premium) - 37 providers use this
238
+ *
239
+ * **Less Effective Attributes:**
240
+ * - `location-type`: Only 7 providers advertise this
241
+ * - `timezone`: Rarely used by providers
242
+ * - `country`, `city`: Inconsistently formatted
243
+ *
244
+ * **Recommendation:** Start with `region` and/or `tier` for best results.
245
+ *
246
+ * @example
247
+ * ```typescript
248
+ * // Deploy to premium providers in Central US (Dallas/Texas area)
249
+ * placement: {
250
+ * region: 'us-central',
251
+ * tier: 'premium'
252
+ * }
253
+ * ```
254
+ *
255
+ * @example
256
+ * ```typescript
257
+ * // Deploy to community providers in EU (cost-optimized)
258
+ * placement: {
259
+ * region: 'eu-central',
260
+ * tier: 'community'
261
+ * }
262
+ * ```
263
+ */
264
+ readonly placement?: AkashPlacementAttributes;
265
+ /**
266
+ * Provider placement constraints (legacy/advanced)
267
+ *
268
+ * Generic provider attributes for advanced filtering.
269
+ * For geographic targeting, prefer using the `placement` field instead.
270
+ *
271
+ * This field is for custom provider attributes not covered by placement.
272
+ */
273
+ readonly attributes?: Readonly<Record<string, string | number | boolean>>;
274
+ /**
275
+ * Auditor signature requirements
276
+ *
277
+ * Provider attributes must be signed by these auditors
278
+ */
279
+ readonly signedBy?: {
280
+ readonly allOf?: readonly string[];
281
+ readonly anyOf?: readonly string[];
282
+ };
283
+ }
284
+ /**
285
+ * Deployment profile union type
286
+ *
287
+ * Can be either local or Akash profile
288
+ */
289
+ export type DeploymentProfile = LocalDeploymentProfile | AkashDeploymentProfile;
290
+ /**
291
+ * Loaded deployment profile with metadata
292
+ *
293
+ * Represents a profile that has been loaded and resolved from agent.json
294
+ *
295
+ * @template TProfile - The specific profile type
296
+ */
297
+ export interface LoadedProfile<TProfile extends DeploymentProfile> {
298
+ /**
299
+ * Profile name (key from agent.json)
300
+ */
301
+ readonly name: string;
302
+ /**
303
+ * Profile configuration
304
+ */
305
+ readonly profile: TProfile;
306
+ /**
307
+ * Agent configuration source
308
+ */
309
+ readonly agent: AgentConfig;
310
+ /**
311
+ * Project root directory
312
+ */
313
+ readonly projectRoot: string;
314
+ }
315
+ /**
316
+ * Type guard to check if profile is for local deployment
317
+ *
318
+ * @param profile - The profile to check
319
+ * @returns True if profile targets local deployment
320
+ */
321
+ export declare function isLocalProfile(profile: DeploymentProfile): profile is LocalDeploymentProfile;
322
+ /**
323
+ * Type guard to check if profile is for Akash deployment
324
+ *
325
+ * @param profile - The profile to check
326
+ * @returns True if profile targets Akash deployment
327
+ */
328
+ export declare function isAkashProfile(profile: DeploymentProfile): profile is AkashDeploymentProfile;
329
+ //# sourceMappingURL=profiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/types/profiles.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,OAAO,EACP,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACV,MAAM,+BAA+B,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAA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