primitive-admin 1.1.0-alpha.9 → 1.1.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 (591) hide show
  1. package/README.md +523 -109
  2. package/assets/skill/skills/primitive-platform/SKILL.md +289 -0
  3. package/dist/bin/primitive.d.ts +2 -0
  4. package/dist/bin/primitive.js +372 -21
  5. package/dist/bin/primitive.js.map +1 -1
  6. package/dist/src/commands/admins.d.ts +2 -0
  7. package/dist/src/commands/admins.js +136 -30
  8. package/dist/src/commands/admins.js.map +1 -1
  9. package/dist/src/commands/analytics.d.ts +2 -0
  10. package/dist/src/commands/analytics.js +713 -55
  11. package/dist/src/commands/analytics.js.map +1 -1
  12. package/dist/src/commands/apps.d.ts +2 -0
  13. package/dist/src/commands/apps.js +65 -100
  14. package/dist/src/commands/apps.js.map +1 -1
  15. package/dist/src/commands/auth-sessions.d.ts +7 -0
  16. package/dist/src/commands/auth-sessions.js +144 -0
  17. package/dist/src/commands/auth-sessions.js.map +1 -0
  18. package/dist/src/commands/auth.d.ts +2 -0
  19. package/dist/src/commands/auth.js +238 -108
  20. package/dist/src/commands/auth.js.map +1 -1
  21. package/dist/src/commands/blob-buckets.d.ts +2 -0
  22. package/dist/src/commands/blob-buckets.js +331 -0
  23. package/dist/src/commands/blob-buckets.js.map +1 -0
  24. package/dist/src/commands/catalog.d.ts +2 -0
  25. package/dist/src/commands/catalog.js +63 -48
  26. package/dist/src/commands/catalog.js.map +1 -1
  27. package/dist/src/commands/collection-type-configs.d.ts +2 -0
  28. package/dist/src/commands/collection-type-configs.js +85 -0
  29. package/dist/src/commands/collection-type-configs.js.map +1 -0
  30. package/dist/src/commands/collections.d.ts +2 -0
  31. package/dist/src/commands/collections.js +1282 -0
  32. package/dist/src/commands/collections.js.map +1 -0
  33. package/dist/src/commands/comparisons.d.ts +2 -0
  34. package/dist/src/commands/comparisons.js +6 -6
  35. package/dist/src/commands/comparisons.js.map +1 -1
  36. package/dist/src/commands/config.d.ts +46 -0
  37. package/dist/src/commands/config.js +465 -0
  38. package/dist/src/commands/config.js.map +1 -0
  39. package/dist/src/commands/connections.d.ts +2 -0
  40. package/dist/src/commands/connections.js +99 -0
  41. package/dist/src/commands/connections.js.map +1 -0
  42. package/dist/src/commands/cron-triggers.d.ts +2 -0
  43. package/dist/src/commands/cron-triggers.js +266 -0
  44. package/dist/src/commands/cron-triggers.js.map +1 -0
  45. package/dist/src/commands/database-type-configs.d.ts +2 -0
  46. package/dist/src/commands/database-type-configs.js +164 -0
  47. package/dist/src/commands/database-type-configs.js.map +1 -0
  48. package/dist/src/commands/database-types.d.ts +2 -0
  49. package/dist/src/commands/database-types.js +471 -0
  50. package/dist/src/commands/database-types.js.map +1 -0
  51. package/dist/src/commands/databases.d.ts +65 -0
  52. package/dist/src/commands/databases.js +1887 -243
  53. package/dist/src/commands/databases.js.map +1 -1
  54. package/dist/src/commands/documents.d.ts +60 -0
  55. package/dist/src/commands/documents.js +2888 -22
  56. package/dist/src/commands/documents.js.map +1 -1
  57. package/dist/src/commands/email-templates.d.ts +2 -0
  58. package/dist/src/commands/email-templates.js +175 -0
  59. package/dist/src/commands/email-templates.js.map +1 -0
  60. package/dist/src/commands/env.d.ts +23 -0
  61. package/dist/src/commands/env.js +395 -0
  62. package/dist/src/commands/env.js.map +1 -0
  63. package/dist/src/commands/feature-flags.d.ts +14 -0
  64. package/dist/src/commands/feature-flags.js +117 -0
  65. package/dist/src/commands/feature-flags.js.map +1 -0
  66. package/dist/src/commands/functions.d.ts +20 -0
  67. package/dist/src/commands/functions.js +1630 -0
  68. package/dist/src/commands/functions.js.map +1 -0
  69. package/dist/src/commands/group-type-configs.d.ts +2 -0
  70. package/dist/src/commands/group-type-configs.js +87 -0
  71. package/dist/src/commands/group-type-configs.js.map +1 -0
  72. package/dist/src/commands/groups.d.ts +2 -0
  73. package/dist/src/commands/groups.js +65 -113
  74. package/dist/src/commands/groups.js.map +1 -1
  75. package/dist/src/commands/guides.d.ts +223 -0
  76. package/dist/src/commands/guides.js +627 -69
  77. package/dist/src/commands/guides.js.map +1 -1
  78. package/dist/src/commands/init.d.ts +37 -0
  79. package/dist/src/commands/init.js +1693 -208
  80. package/dist/src/commands/init.js.map +1 -1
  81. package/dist/src/commands/integrations.d.ts +2 -0
  82. package/dist/src/commands/integrations.js +428 -187
  83. package/dist/src/commands/integrations.js.map +1 -1
  84. package/dist/src/commands/llm.d.ts +2 -0
  85. package/dist/src/commands/llm.js +4 -2
  86. package/dist/src/commands/llm.js.map +1 -1
  87. package/dist/src/commands/locks.d.ts +8 -0
  88. package/dist/src/commands/locks.js +175 -0
  89. package/dist/src/commands/locks.js.map +1 -0
  90. package/dist/src/commands/metadata-category-configs.d.ts +12 -0
  91. package/dist/src/commands/metadata-category-configs.js +113 -0
  92. package/dist/src/commands/metadata-category-configs.js.map +1 -0
  93. package/dist/src/commands/metadata.d.ts +2 -0
  94. package/dist/src/commands/metadata.js +288 -0
  95. package/dist/src/commands/metadata.js.map +1 -0
  96. package/dist/src/commands/prompts.d.ts +2 -0
  97. package/dist/src/commands/prompts.js +322 -634
  98. package/dist/src/commands/prompts.js.map +1 -1
  99. package/dist/src/commands/rule-sets.d.ts +3 -0
  100. package/dist/src/commands/rule-sets.js +139 -148
  101. package/dist/src/commands/rule-sets.js.map +1 -1
  102. package/dist/src/commands/scripts.d.ts +30 -0
  103. package/dist/src/commands/scripts.js +688 -0
  104. package/dist/src/commands/scripts.js.map +1 -0
  105. package/dist/src/commands/secrets.d.ts +2 -0
  106. package/dist/src/commands/secrets.js +109 -0
  107. package/dist/src/commands/secrets.js.map +1 -0
  108. package/dist/src/commands/sessions.d.ts +2 -0
  109. package/dist/src/commands/sessions.js +76 -0
  110. package/dist/src/commands/sessions.js.map +1 -0
  111. package/dist/src/commands/skill.d.ts +2 -0
  112. package/dist/src/commands/skill.js +29 -0
  113. package/dist/src/commands/skill.js.map +1 -0
  114. package/dist/src/commands/sync-app-settings.d.ts +158 -0
  115. package/dist/src/commands/sync-app-settings.js +328 -0
  116. package/dist/src/commands/sync-app-settings.js.map +1 -0
  117. package/dist/src/commands/sync.d.ts +2670 -0
  118. package/dist/src/commands/sync.js +17144 -834
  119. package/dist/src/commands/sync.js.map +1 -1
  120. package/dist/src/commands/tokens.d.ts +2 -0
  121. package/dist/src/commands/tokens.js +132 -22
  122. package/dist/src/commands/tokens.js.map +1 -1
  123. package/dist/src/commands/users.d.ts +2 -0
  124. package/dist/src/commands/users.js +542 -24
  125. package/dist/src/commands/users.js.map +1 -1
  126. package/dist/src/commands/vars.d.ts +8 -0
  127. package/dist/src/commands/vars.js +97 -0
  128. package/dist/src/commands/vars.js.map +1 -0
  129. package/dist/src/commands/waitlist.d.ts +2 -0
  130. package/dist/src/commands/waitlist.js +12 -11
  131. package/dist/src/commands/waitlist.js.map +1 -1
  132. package/dist/src/commands/webhooks.d.ts +31 -0
  133. package/dist/src/commands/webhooks.js +633 -0
  134. package/dist/src/commands/webhooks.js.map +1 -0
  135. package/dist/src/commands/workflows.d.ts +88 -0
  136. package/dist/src/commands/workflows.js +1568 -742
  137. package/dist/src/commands/workflows.js.map +1 -1
  138. package/dist/src/lib/access-rule-display.d.ts +21 -0
  139. package/dist/src/lib/access-rule-display.js +34 -0
  140. package/dist/src/lib/access-rule-display.js.map +1 -0
  141. package/dist/src/lib/api-client.d.ts +2550 -0
  142. package/dist/src/lib/api-client.js +2503 -160
  143. package/dist/src/lib/api-client.js.map +1 -1
  144. package/dist/src/lib/app-settings-descriptor.d.ts +263 -0
  145. package/dist/src/lib/app-settings-descriptor.js +583 -0
  146. package/dist/src/lib/app-settings-descriptor.js.map +1 -0
  147. package/dist/src/lib/auth-flow.d.ts +8 -0
  148. package/dist/src/lib/batch.d.ts +26 -0
  149. package/dist/src/lib/batch.js +32 -0
  150. package/dist/src/lib/batch.js.map +1 -0
  151. package/dist/src/lib/block-layout.d.ts +160 -0
  152. package/dist/src/lib/block-layout.js +451 -0
  153. package/dist/src/lib/block-layout.js.map +1 -0
  154. package/dist/src/lib/block-selector.d.ts +58 -0
  155. package/dist/src/lib/block-selector.js +92 -0
  156. package/dist/src/lib/block-selector.js.map +1 -0
  157. package/dist/src/lib/canonical-json.d.ts +12 -0
  158. package/dist/src/lib/canonical-json.js +35 -0
  159. package/dist/src/lib/canonical-json.js.map +1 -0
  160. package/dist/src/lib/channel.d.ts +30 -0
  161. package/dist/src/lib/channel.js +68 -0
  162. package/dist/src/lib/channel.js.map +1 -0
  163. package/dist/src/lib/cli-manifest.d.ts +68 -0
  164. package/dist/src/lib/cli-manifest.js +71 -0
  165. package/dist/src/lib/cli-manifest.js.map +1 -0
  166. package/dist/src/lib/codegen-shared/generatedFiles.d.ts +101 -0
  167. package/dist/src/lib/codegen-shared/generatedFiles.js +191 -0
  168. package/dist/src/lib/codegen-shared/generatedFiles.js.map +1 -0
  169. package/dist/src/lib/codegen-shared/prettierStable.d.ts +262 -0
  170. package/dist/src/lib/codegen-shared/prettierStable.js +610 -0
  171. package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -0
  172. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +38 -0
  173. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +46 -0
  174. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js.map +1 -0
  175. package/dist/src/lib/collection-export.d.ts +184 -0
  176. package/dist/src/lib/collection-export.js +252 -0
  177. package/dist/src/lib/collection-export.js.map +1 -0
  178. package/dist/src/lib/config-json-field.d.ts +28 -0
  179. package/dist/src/lib/config-json-field.js +56 -0
  180. package/dist/src/lib/config-json-field.js.map +1 -0
  181. package/dist/src/lib/config-object-descriptor.d.ts +127 -0
  182. package/dist/src/lib/config-object-descriptor.js +740 -0
  183. package/dist/src/lib/config-object-descriptor.js.map +1 -0
  184. package/dist/src/lib/config-payload.d.ts +92 -0
  185. package/dist/src/lib/config-payload.js +161 -0
  186. package/dist/src/lib/config-payload.js.map +1 -0
  187. package/dist/src/lib/config-surface.d.ts +141 -0
  188. package/dist/src/lib/config-surface.js +368 -0
  189. package/dist/src/lib/config-surface.js.map +1 -0
  190. package/dist/src/lib/config-toml.d.ts +10 -0
  191. package/dist/src/lib/config-toml.js +42 -0
  192. package/dist/src/lib/config-toml.js.map +1 -0
  193. package/dist/src/lib/config.d.ts +71 -0
  194. package/dist/src/lib/config.js +71 -68
  195. package/dist/src/lib/config.js.map +1 -1
  196. package/dist/src/lib/confirm-prompt.d.ts +83 -0
  197. package/dist/src/lib/confirm-prompt.js +110 -0
  198. package/dist/src/lib/confirm-prompt.js.map +1 -0
  199. package/dist/src/lib/constants.d.ts +11 -0
  200. package/dist/src/lib/constants.js +12 -0
  201. package/dist/src/lib/constants.js.map +1 -0
  202. package/dist/src/lib/crash-handlers.d.ts +20 -0
  203. package/dist/src/lib/crash-handlers.js +49 -0
  204. package/dist/src/lib/crash-handlers.js.map +1 -0
  205. package/dist/src/lib/credentials-store.d.ts +104 -0
  206. package/dist/src/lib/credentials-store.js +336 -0
  207. package/dist/src/lib/credentials-store.js.map +1 -0
  208. package/dist/src/lib/csv.d.ts +47 -0
  209. package/dist/src/lib/csv.js +172 -0
  210. package/dist/src/lib/csv.js.map +1 -0
  211. package/dist/src/lib/data-input.d.ts +23 -0
  212. package/dist/src/lib/data-input.js +50 -0
  213. package/dist/src/lib/data-input.js.map +1 -0
  214. package/dist/src/lib/db-codegen/dbFingerprint.d.ts +10 -0
  215. package/dist/src/lib/db-codegen/dbFingerprint.js +17 -0
  216. package/dist/src/lib/db-codegen/dbFingerprint.js.map +1 -0
  217. package/dist/src/lib/db-codegen/dbGenerator.d.ts +67 -0
  218. package/dist/src/lib/db-codegen/dbGenerator.js +170 -0
  219. package/dist/src/lib/db-codegen/dbGenerator.js.map +1 -0
  220. package/dist/src/lib/db-codegen/dbNaming.d.ts +87 -0
  221. package/dist/src/lib/db-codegen/dbNaming.js +180 -0
  222. package/dist/src/lib/db-codegen/dbNaming.js.map +1 -0
  223. package/dist/src/lib/db-codegen/dbTemplates.d.ts +272 -0
  224. package/dist/src/lib/db-codegen/dbTemplates.js +480 -0
  225. package/dist/src/lib/db-codegen/dbTemplates.js.map +1 -0
  226. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +73 -0
  227. package/dist/src/lib/db-codegen/dbTsTypes.js +139 -0
  228. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -0
  229. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +146 -0
  230. package/dist/src/lib/db-codegen/dbTypeIR.js +525 -0
  231. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -0
  232. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.d.ts +112 -0
  233. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js +211 -0
  234. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js.map +1 -0
  235. package/dist/src/lib/deprecation.d.ts +22 -0
  236. package/dist/src/lib/deprecation.js +43 -0
  237. package/dist/src/lib/deprecation.js.map +1 -0
  238. package/dist/src/lib/document-export-permissions.d.ts +30 -0
  239. package/dist/src/lib/document-export-permissions.js +54 -0
  240. package/dist/src/lib/document-export-permissions.js.map +1 -0
  241. package/dist/src/lib/document-ingest-artifact.d.ts +120 -0
  242. package/dist/src/lib/document-ingest-artifact.js +505 -0
  243. package/dist/src/lib/document-ingest-artifact.js.map +1 -0
  244. package/dist/src/lib/document-ingest-input.d.ts +51 -0
  245. package/dist/src/lib/document-ingest-input.js +132 -0
  246. package/dist/src/lib/document-ingest-input.js.map +1 -0
  247. package/dist/src/lib/document-ingest-rows.d.ts +137 -0
  248. package/dist/src/lib/document-ingest-rows.js +181 -0
  249. package/dist/src/lib/document-ingest-rows.js.map +1 -0
  250. package/dist/src/lib/document-ingest.d.ts +101 -0
  251. package/dist/src/lib/document-ingest.js +384 -0
  252. package/dist/src/lib/document-ingest.js.map +1 -0
  253. package/dist/src/lib/env-resolver-core.d.ts +258 -0
  254. package/dist/src/lib/env-resolver-core.js +447 -0
  255. package/dist/src/lib/env-resolver-core.js.map +1 -0
  256. package/dist/src/lib/env-resolver.d.ts +99 -0
  257. package/dist/src/lib/env-resolver.js +153 -0
  258. package/dist/src/lib/env-resolver.js.map +1 -0
  259. package/dist/src/lib/fetch.d.ts +5 -0
  260. package/dist/src/lib/function-bundle.d.ts +147 -0
  261. package/dist/src/lib/function-bundle.js +341 -0
  262. package/dist/src/lib/function-bundle.js.map +1 -0
  263. package/dist/src/lib/function-collect.d.ts +123 -0
  264. package/dist/src/lib/function-collect.js +610 -0
  265. package/dist/src/lib/function-collect.js.map +1 -0
  266. package/dist/src/lib/function-db-types.d.ts +202 -0
  267. package/dist/src/lib/function-db-types.js +870 -0
  268. package/dist/src/lib/function-db-types.js.map +1 -0
  269. package/dist/src/lib/function-document-types.d.ts +144 -0
  270. package/dist/src/lib/function-document-types.js +370 -0
  271. package/dist/src/lib/function-document-types.js.map +1 -0
  272. package/dist/src/lib/function-grants-preflight.d.ts +64 -0
  273. package/dist/src/lib/function-grants-preflight.js +105 -0
  274. package/dist/src/lib/function-grants-preflight.js.map +1 -0
  275. package/dist/src/lib/function-log-lines.d.ts +76 -0
  276. package/dist/src/lib/function-log-lines.js +160 -0
  277. package/dist/src/lib/function-log-lines.js.map +1 -0
  278. package/dist/src/lib/function-log-row.d.ts +29 -0
  279. package/dist/src/lib/function-log-row.js +73 -0
  280. package/dist/src/lib/function-log-row.js.map +1 -0
  281. package/dist/src/lib/function-log-tail.d.ts +132 -0
  282. package/dist/src/lib/function-log-tail.js +262 -0
  283. package/dist/src/lib/function-log-tail.js.map +1 -0
  284. package/dist/src/lib/function-run.d.ts +289 -0
  285. package/dist/src/lib/function-run.js +389 -0
  286. package/dist/src/lib/function-run.js.map +1 -0
  287. package/dist/src/lib/function-schema-codegen.d.ts +143 -0
  288. package/dist/src/lib/function-schema-codegen.js +420 -0
  289. package/dist/src/lib/function-schema-codegen.js.map +1 -0
  290. package/dist/src/lib/function-sync.d.ts +459 -0
  291. package/dist/src/lib/function-sync.js +1258 -0
  292. package/dist/src/lib/function-sync.js.map +1 -0
  293. package/dist/src/lib/function-trigger-listing.d.ts +27 -0
  294. package/dist/src/lib/function-trigger-listing.js +70 -0
  295. package/dist/src/lib/function-trigger-listing.js.map +1 -0
  296. package/dist/src/lib/function-typecheck.d.ts +86 -0
  297. package/dist/src/lib/function-typecheck.js +370 -0
  298. package/dist/src/lib/function-typecheck.js.map +1 -0
  299. package/dist/src/lib/function-versions.d.ts +122 -0
  300. package/dist/src/lib/function-versions.js +182 -0
  301. package/dist/src/lib/function-versions.js.map +1 -0
  302. package/dist/src/lib/generated-allowlist.d.ts +28 -0
  303. package/dist/src/lib/generated-allowlist.js +281 -0
  304. package/dist/src/lib/generated-allowlist.js.map +1 -0
  305. package/dist/src/lib/generated-config-surfaces.d.ts +2936 -0
  306. package/dist/src/lib/generated-config-surfaces.js +10569 -0
  307. package/dist/src/lib/generated-config-surfaces.js.map +1 -0
  308. package/dist/src/lib/generated-sdk-types.d.ts +12 -0
  309. package/dist/src/lib/generated-sdk-types.js +13 -0
  310. package/dist/src/lib/generated-sdk-types.js.map +1 -0
  311. package/dist/src/lib/generated-template-lint.d.ts +212 -0
  312. package/dist/src/lib/generated-template-lint.js +624 -0
  313. package/dist/src/lib/generated-template-lint.js.map +1 -0
  314. package/dist/src/lib/init-adopt.d.ts +16 -0
  315. package/dist/src/lib/init-adopt.js +34 -0
  316. package/dist/src/lib/init-adopt.js.map +1 -0
  317. package/dist/src/lib/init-assets.d.ts +39 -0
  318. package/dist/src/lib/init-assets.js +97 -0
  319. package/dist/src/lib/init-assets.js.map +1 -0
  320. package/dist/src/lib/init-client-platforms.d.ts +14 -0
  321. package/dist/src/lib/init-client-platforms.js +71 -0
  322. package/dist/src/lib/init-client-platforms.js.map +1 -0
  323. package/dist/src/lib/init-config.d.ts +98 -0
  324. package/dist/src/lib/init-config.js +186 -0
  325. package/dist/src/lib/init-config.js.map +1 -0
  326. package/dist/src/lib/init-email-redirect-uris.d.ts +37 -0
  327. package/dist/src/lib/init-email-redirect-uris.js +46 -0
  328. package/dist/src/lib/init-email-redirect-uris.js.map +1 -0
  329. package/dist/src/lib/init-ios-links.d.ts +91 -0
  330. package/dist/src/lib/init-ios-links.js +219 -0
  331. package/dist/src/lib/init-ios-links.js.map +1 -0
  332. package/dist/src/lib/init-plan.d.ts +80 -0
  333. package/dist/src/lib/init-plan.js +95 -0
  334. package/dist/src/lib/init-plan.js.map +1 -0
  335. package/dist/src/lib/init-production-env.d.ts +48 -0
  336. package/dist/src/lib/init-production-env.js +59 -0
  337. package/dist/src/lib/init-production-env.js.map +1 -0
  338. package/dist/src/lib/init-schema.d.ts +74 -0
  339. package/dist/src/lib/init-schema.js +358 -0
  340. package/dist/src/lib/init-schema.js.map +1 -0
  341. package/dist/src/lib/init-xcode.d.ts +34 -0
  342. package/dist/src/lib/init-xcode.js +138 -0
  343. package/dist/src/lib/init-xcode.js.map +1 -0
  344. package/dist/src/lib/integration-request-config.d.ts +30 -0
  345. package/dist/src/lib/integration-request-config.js +145 -0
  346. package/dist/src/lib/integration-request-config.js.map +1 -0
  347. package/dist/src/lib/integration-selector.d.ts +42 -0
  348. package/dist/src/lib/integration-selector.js +46 -0
  349. package/dist/src/lib/integration-selector.js.map +1 -0
  350. package/dist/src/lib/ios-app-id.d.ts +34 -0
  351. package/dist/src/lib/ios-app-id.js +69 -0
  352. package/dist/src/lib/ios-app-id.js.map +1 -0
  353. package/dist/src/lib/list-options.d.ts +68 -0
  354. package/dist/src/lib/list-options.js +89 -0
  355. package/dist/src/lib/list-options.js.map +1 -0
  356. package/dist/src/lib/local-state.d.ts +55 -0
  357. package/dist/src/lib/local-state.js +167 -0
  358. package/dist/src/lib/local-state.js.map +1 -0
  359. package/dist/src/lib/local-test-cases.d.ts +63 -0
  360. package/dist/src/lib/local-test-cases.js +136 -0
  361. package/dist/src/lib/local-test-cases.js.map +1 -0
  362. package/dist/src/lib/log-inspection.d.ts +715 -0
  363. package/dist/src/lib/log-inspection.js +816 -0
  364. package/dist/src/lib/log-inspection.js.map +1 -0
  365. package/dist/src/lib/logout-admin-session.d.ts +33 -0
  366. package/dist/src/lib/logout-admin-session.js +70 -0
  367. package/dist/src/lib/logout-admin-session.js.map +1 -0
  368. package/dist/src/lib/migration-nag.d.ts +49 -0
  369. package/dist/src/lib/migration-nag.js +163 -0
  370. package/dist/src/lib/migration-nag.js.map +1 -0
  371. package/dist/src/lib/object-status-filter.d.ts +22 -0
  372. package/dist/src/lib/object-status-filter.js +45 -0
  373. package/dist/src/lib/object-status-filter.js.map +1 -0
  374. package/dist/src/lib/output.d.ts +124 -0
  375. package/dist/src/lib/output.js +219 -8
  376. package/dist/src/lib/output.js.map +1 -1
  377. package/dist/src/lib/package-manager.d.ts +140 -0
  378. package/dist/src/lib/package-manager.js +305 -0
  379. package/dist/src/lib/package-manager.js.map +1 -0
  380. package/dist/src/lib/paginate.d.ts +98 -0
  381. package/dist/src/lib/paginate.js +112 -0
  382. package/dist/src/lib/paginate.js.map +1 -0
  383. package/dist/src/lib/platform-owned.d.ts +63 -0
  384. package/dist/src/lib/platform-owned.js +85 -0
  385. package/dist/src/lib/platform-owned.js.map +1 -0
  386. package/dist/src/lib/project-config.d.ts +122 -0
  387. package/dist/src/lib/project-config.js +244 -0
  388. package/dist/src/lib/project-config.js.map +1 -0
  389. package/dist/src/lib/prompt-cost-format.d.ts +11 -0
  390. package/dist/src/lib/prompt-cost-format.js +41 -0
  391. package/dist/src/lib/prompt-cost-format.js.map +1 -0
  392. package/dist/src/lib/prompt-schema-codegen.d.ts +147 -0
  393. package/dist/src/lib/prompt-schema-codegen.js +462 -0
  394. package/dist/src/lib/prompt-schema-codegen.js.map +1 -0
  395. package/dist/src/lib/query-operators.d.ts +43 -0
  396. package/dist/src/lib/query-operators.js +80 -0
  397. package/dist/src/lib/query-operators.js.map +1 -0
  398. package/dist/src/lib/record-filter.d.ts +18 -0
  399. package/dist/src/lib/record-filter.js +55 -0
  400. package/dist/src/lib/record-filter.js.map +1 -0
  401. package/dist/src/lib/refresh-admin-credentials.d.ts +73 -0
  402. package/dist/src/lib/refresh-admin-credentials.js +123 -0
  403. package/dist/src/lib/refresh-admin-credentials.js.map +1 -0
  404. package/dist/src/lib/resolve-init-dev-port.d.ts +56 -0
  405. package/dist/src/lib/resolve-init-dev-port.js +55 -0
  406. package/dist/src/lib/resolve-init-dev-port.js.map +1 -0
  407. package/dist/src/lib/resolve-init-server.d.ts +64 -0
  408. package/dist/src/lib/resolve-init-server.js +77 -0
  409. package/dist/src/lib/resolve-init-server.js.map +1 -0
  410. package/dist/src/lib/resolve-owner.d.ts +19 -0
  411. package/dist/src/lib/resolve-owner.js +20 -0
  412. package/dist/src/lib/resolve-owner.js.map +1 -0
  413. package/dist/src/lib/resolve-platform.d.ts +74 -0
  414. package/dist/src/lib/resolve-platform.js +105 -0
  415. package/dist/src/lib/resolve-platform.js.map +1 -0
  416. package/dist/src/lib/run-status.d.ts +19 -0
  417. package/dist/src/lib/run-status.generated.d.ts +39 -0
  418. package/dist/src/lib/run-status.generated.js +66 -0
  419. package/dist/src/lib/run-status.generated.js.map +1 -0
  420. package/dist/src/lib/run-status.js +19 -0
  421. package/dist/src/lib/run-status.js.map +1 -0
  422. package/dist/src/lib/server-text-normalization.d.ts +51 -0
  423. package/dist/src/lib/server-text-normalization.js +90 -0
  424. package/dist/src/lib/server-text-normalization.js.map +1 -0
  425. package/dist/src/lib/server-url.d.ts +22 -0
  426. package/dist/src/lib/server-url.js +33 -0
  427. package/dist/src/lib/server-url.js.map +1 -0
  428. package/dist/src/lib/signing-secret-status.d.ts +81 -0
  429. package/dist/src/lib/signing-secret-status.js +116 -0
  430. package/dist/src/lib/signing-secret-status.js.map +1 -0
  431. package/dist/src/lib/skill-installer.d.ts +71 -0
  432. package/dist/src/lib/skill-installer.js +441 -0
  433. package/dist/src/lib/skill-installer.js.map +1 -0
  434. package/dist/src/lib/snapshot-audit-source.d.ts +45 -0
  435. package/dist/src/lib/snapshot-audit-source.js +58 -0
  436. package/dist/src/lib/snapshot-audit-source.js.map +1 -0
  437. package/dist/src/lib/snapshot-audit-store.d.ts +52 -0
  438. package/dist/src/lib/snapshot-audit-store.js +196 -0
  439. package/dist/src/lib/snapshot-audit-store.js.map +1 -0
  440. package/dist/src/lib/snapshot-audit.d.ts +207 -0
  441. package/dist/src/lib/snapshot-audit.js +431 -0
  442. package/dist/src/lib/snapshot-audit.js.map +1 -0
  443. package/dist/src/lib/snapshot-build-rows.d.ts +60 -0
  444. package/dist/src/lib/snapshot-build-rows.js +87 -0
  445. package/dist/src/lib/snapshot-build-rows.js.map +1 -0
  446. package/dist/src/lib/snapshot-build.d.ts +50 -0
  447. package/dist/src/lib/snapshot-build.js +111 -0
  448. package/dist/src/lib/snapshot-build.js.map +1 -0
  449. package/dist/src/lib/snapshot-manifest-layout.d.ts +61 -0
  450. package/dist/src/lib/snapshot-manifest-layout.js +70 -0
  451. package/dist/src/lib/snapshot-manifest-layout.js.map +1 -0
  452. package/dist/src/lib/snapshots.d.ts +98 -0
  453. package/dist/src/lib/snapshots.js +294 -0
  454. package/dist/src/lib/snapshots.js.map +1 -0
  455. package/dist/src/lib/step-run-table.d.ts +43 -0
  456. package/dist/src/lib/step-run-table.js +129 -0
  457. package/dist/src/lib/step-run-table.js.map +1 -0
  458. package/dist/src/lib/storage-pending-retry.d.ts +26 -0
  459. package/dist/src/lib/storage-pending-retry.js +42 -0
  460. package/dist/src/lib/storage-pending-retry.js.map +1 -0
  461. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +42 -0
  462. package/dist/src/lib/swift-codegen/agentGenerator.js +118 -0
  463. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -0
  464. package/dist/src/lib/swift-codegen/banners.d.ts +24 -0
  465. package/dist/src/lib/swift-codegen/banners.js +25 -0
  466. package/dist/src/lib/swift-codegen/banners.js.map +1 -0
  467. package/dist/src/lib/swift-codegen/dbGenerator.d.ts +113 -0
  468. package/dist/src/lib/swift-codegen/dbGenerator.js +926 -0
  469. package/dist/src/lib/swift-codegen/dbGenerator.js.map +1 -0
  470. package/dist/src/lib/swift-codegen/dbSwiftTypes.d.ts +42 -0
  471. package/dist/src/lib/swift-codegen/dbSwiftTypes.js +100 -0
  472. package/dist/src/lib/swift-codegen/dbSwiftTypes.js.map +1 -0
  473. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +139 -0
  474. package/dist/src/lib/swift-codegen/functionGenerator.js +462 -0
  475. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -0
  476. package/dist/src/lib/swift-codegen/generator.d.ts +100 -0
  477. package/dist/src/lib/swift-codegen/generator.js +457 -0
  478. package/dist/src/lib/swift-codegen/generator.js.map +1 -0
  479. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +87 -0
  480. package/dist/src/lib/swift-codegen/schemaToSwift.js +661 -0
  481. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -0
  482. package/dist/src/lib/swift-codegen/siblingSymbols.d.ts +94 -0
  483. package/dist/src/lib/swift-codegen/siblingSymbols.js +155 -0
  484. package/dist/src/lib/swift-codegen/siblingSymbols.js.map +1 -0
  485. package/dist/src/lib/swift-codegen/swiftNaming.d.ts +85 -0
  486. package/dist/src/lib/swift-codegen/swiftNaming.js +198 -0
  487. package/dist/src/lib/swift-codegen/swiftNaming.js.map +1 -0
  488. package/dist/src/lib/sync-dir-selector.d.ts +21 -0
  489. package/dist/src/lib/sync-dir-selector.js +30 -0
  490. package/dist/src/lib/sync-dir-selector.js.map +1 -0
  491. package/dist/src/lib/sync-paths.d.ts +128 -0
  492. package/dist/src/lib/sync-paths.js +195 -0
  493. package/dist/src/lib/sync-paths.js.map +1 -0
  494. package/dist/src/lib/sync-resource-types.d.ts +563 -0
  495. package/dist/src/lib/sync-resource-types.js +1073 -0
  496. package/dist/src/lib/sync-resource-types.js.map +1 -0
  497. package/dist/src/lib/sync-selectors.d.ts +138 -0
  498. package/dist/src/lib/sync-selectors.js +289 -0
  499. package/dist/src/lib/sync-selectors.js.map +1 -0
  500. package/dist/src/lib/template.d.ts +170 -0
  501. package/dist/src/lib/template.js +484 -68
  502. package/dist/src/lib/template.js.map +1 -1
  503. package/dist/src/lib/test-case-file-names.d.ts +40 -0
  504. package/dist/src/lib/test-case-file-names.js +91 -0
  505. package/dist/src/lib/test-case-file-names.js.map +1 -0
  506. package/dist/src/lib/test-case-keys.d.ts +29 -0
  507. package/dist/src/lib/test-case-keys.js +55 -0
  508. package/dist/src/lib/test-case-keys.js.map +1 -0
  509. package/dist/src/lib/test-case-variables.d.ts +29 -0
  510. package/dist/src/lib/test-case-variables.js +71 -0
  511. package/dist/src/lib/test-case-variables.js.map +1 -0
  512. package/dist/src/lib/token-inject.d.ts +56 -0
  513. package/dist/src/lib/token-inject.js +204 -0
  514. package/dist/src/lib/token-inject.js.map +1 -0
  515. package/dist/src/lib/toml-database-config.d.ts +123 -0
  516. package/dist/src/lib/toml-database-config.js +544 -0
  517. package/dist/src/lib/toml-database-config.js.map +1 -0
  518. package/dist/src/lib/toml-metadata-config.d.ts +151 -0
  519. package/dist/src/lib/toml-metadata-config.js +476 -0
  520. package/dist/src/lib/toml-metadata-config.js.map +1 -0
  521. package/dist/src/lib/toml-native-form.d.ts +46 -0
  522. package/dist/src/lib/toml-native-form.js +78 -0
  523. package/dist/src/lib/toml-native-form.js.map +1 -0
  524. package/dist/src/lib/toml-params-validator.d.ts +129 -0
  525. package/dist/src/lib/toml-params-validator.js +298 -0
  526. package/dist/src/lib/toml-params-validator.js.map +1 -0
  527. package/dist/src/lib/toml-scalar-edit.d.ts +43 -0
  528. package/dist/src/lib/toml-scalar-edit.js +283 -0
  529. package/dist/src/lib/toml-scalar-edit.js.map +1 -0
  530. package/dist/src/lib/user-selector.d.ts +24 -0
  531. package/dist/src/lib/user-selector.js +33 -0
  532. package/dist/src/lib/user-selector.js.map +1 -0
  533. package/dist/src/lib/version-check.d.ts +35 -0
  534. package/dist/src/lib/version-check.js +241 -0
  535. package/dist/src/lib/version-check.js.map +1 -0
  536. package/dist/src/lib/watch.d.ts +121 -0
  537. package/dist/src/lib/watch.js +169 -0
  538. package/dist/src/lib/watch.js.map +1 -0
  539. package/dist/src/lib/web-url.d.ts +40 -0
  540. package/dist/src/lib/web-url.js +76 -0
  541. package/dist/src/lib/web-url.js.map +1 -0
  542. package/dist/src/lib/webhook-deliver.d.ts +209 -0
  543. package/dist/src/lib/webhook-deliver.js +519 -0
  544. package/dist/src/lib/webhook-deliver.js.map +1 -0
  545. package/dist/src/lib/workflow-apply.d.ts +110 -0
  546. package/dist/src/lib/workflow-apply.js +164 -0
  547. package/dist/src/lib/workflow-apply.js.map +1 -0
  548. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.d.ts +129 -0
  549. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js +269 -0
  550. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js.map +1 -0
  551. package/dist/src/lib/workflow-codegen/generator.d.ts +96 -0
  552. package/dist/src/lib/workflow-codegen/generator.js +361 -0
  553. package/dist/src/lib/workflow-codegen/generator.js.map +1 -0
  554. package/dist/src/lib/workflow-codegen/invokerIR.d.ts +94 -0
  555. package/dist/src/lib/workflow-codegen/invokerIR.js +76 -0
  556. package/dist/src/lib/workflow-codegen/invokerIR.js.map +1 -0
  557. package/dist/src/lib/workflow-codegen/naming.d.ts +33 -0
  558. package/dist/src/lib/workflow-codegen/naming.js +81 -0
  559. package/dist/src/lib/workflow-codegen/naming.js.map +1 -0
  560. package/dist/src/lib/workflow-codegen/schemaToTs.d.ts +80 -0
  561. package/dist/src/lib/workflow-codegen/schemaToTs.js +303 -0
  562. package/dist/src/lib/workflow-codegen/schemaToTs.js.map +1 -0
  563. package/dist/src/lib/workflow-config-apply.d.ts +70 -0
  564. package/dist/src/lib/workflow-config-apply.js +137 -0
  565. package/dist/src/lib/workflow-config-apply.js.map +1 -0
  566. package/dist/src/lib/workflow-config-sidecar.d.ts +63 -0
  567. package/dist/src/lib/workflow-config-sidecar.js +96 -0
  568. package/dist/src/lib/workflow-config-sidecar.js.map +1 -0
  569. package/dist/src/lib/workflow-defaults.d.ts +29 -0
  570. package/dist/src/lib/workflow-defaults.js +41 -0
  571. package/dist/src/lib/workflow-defaults.js.map +1 -0
  572. package/dist/src/lib/workflow-fragments.d.ts +64 -0
  573. package/dist/src/lib/workflow-fragments.js +342 -0
  574. package/dist/src/lib/workflow-fragments.js.map +1 -0
  575. package/dist/src/lib/workflow-include-preserve.d.ts +76 -0
  576. package/dist/src/lib/workflow-include-preserve.js +286 -0
  577. package/dist/src/lib/workflow-include-preserve.js.map +1 -0
  578. package/dist/src/lib/workflow-payload.d.ts +98 -0
  579. package/dist/src/lib/workflow-payload.js +178 -0
  580. package/dist/src/lib/workflow-payload.js.map +1 -0
  581. package/dist/src/lib/workflow-toml-validator.d.ts +211 -0
  582. package/dist/src/lib/workflow-toml-validator.js +770 -0
  583. package/dist/src/lib/workflow-toml-validator.js.map +1 -0
  584. package/dist/src/lib/workflow-usage.d.ts +196 -0
  585. package/dist/src/lib/workflow-usage.js +310 -0
  586. package/dist/src/lib/workflow-usage.js.map +1 -0
  587. package/dist/src/types/index.d.ts +591 -0
  588. package/dist/src/validators.d.ts +65 -0
  589. package/dist/src/validators.js +64 -0
  590. package/dist/src/validators.js.map +1 -0
  591. package/package.json +34 -9
@@ -0,0 +1,583 @@
1
+ /**
2
+ * Shared field descriptor for app-settings TOML sync (issue #1033).
3
+ *
4
+ * A single source of truth describing every app setting that round-trips
5
+ * through `app.toml`. It drives BOTH directions:
6
+ * - pull (`serializeAppSettingsToToml`): server settings -> `app.toml` object
7
+ * - push (`parseTomlToAppSettings`): `app.toml` object -> settings payload
8
+ *
9
+ * Driving serializer and parser from one table means the two can never drift
10
+ * apart, and a single drift test can assert the descriptor stays in step with
11
+ * the server's `GET /settings` response and `PUT /settings` allow-list. This
12
+ * generalizes the earlier hand-maintained `AUTH_BOOLEAN_KEYS` /
13
+ * `RECOGNIZED_AUTH_KEYS` pattern to every section, and fully replaces it.
14
+ *
15
+ * Design decisions of record (issue #1033):
16
+ * - Google is a typed client MAP (#2891): `googleClients` renders as
17
+ * `[auth.google.clients.<type>]`, and each entry's `clientSecret` holds a
18
+ * whole `{{secrets.KEY}}` reference rather than the secret itself, so the
19
+ * map round-trips through `app.toml` like any other setting.
20
+ * - `[cors]` is always emitted (the `mode` key is `emit: "always"`), even in
21
+ * universal mode. A one-time diff on the next pull for existing apps is
22
+ * acceptable.
23
+ * - `[invitations]` is an additive table for the member-invitation fields.
24
+ * - Nothing is writable-but-excluded any more (#2891). The legacy passkey
25
+ * pair and the three Google/redirect scalars are RETIRED: not writable, not
26
+ * synced, and refused by name with their own guidance when an old
27
+ * `app.toml` still carries them.
28
+ * - Push type mismatches are field-named validation errors — no silent
29
+ * coercion of a mistyped TOML value.
30
+ * - THE FILE IS THE WHOLE TRUTH (#2880, sponsor 2026-08-21). `app.toml` used
31
+ * to be the one surface where an omitted key preserved the server's value,
32
+ * while every other type follows "the local file is the source of truth"
33
+ * (#1567). That exception is gone: push emits a value for EVERY writable
34
+ * field, and a key the file does not carry clears the field or resets it to
35
+ * its declared default (`APP_SETTINGS_ABSENT_VALUES`). `[app].name` and
36
+ * `[app].mode` are the two exceptions — no default, identity-critical, and
37
+ * `mode: null` is a 400 — so their absence is a validation error instead.
38
+ */
39
+ import { findUnknownDocumentKeys, requireConfigSurface, } from "./config-surface.js";
40
+ import { retiredConfigKey } from "./generated-config-surfaces.js";
41
+ import { canonicalizeSecretReference } from "./server-text-normalization.js";
42
+ /**
43
+ * The vendored `app-settings` definition (#2644) this module projects. Read
44
+ * once at load; a missing definition fails loudly rather than yielding an
45
+ * empty descriptor that would silently sync nothing.
46
+ */
47
+ const APP_SETTINGS_SURFACE = requireConfigSurface("app-settings");
48
+ /**
49
+ * Every field that round-trips through `app.toml` — DERIVED from the
50
+ * `app-settings` configuration-object definition (#2644), not listed.
51
+ *
52
+ * The definition already states each field's section (its table's TOML path),
53
+ * its `app.toml` key, its type and its `emit` rule, and the coverage guard
54
+ * holds it against the `App` model. Restating those 26 entries here made
55
+ * adding a setting two edits that a parity test then compared — the "two lists
56
+ * and a test they agree" shape the design gate rejected (2026-08-12). One edit
57
+ * in the definition now reaches the server allow-list
58
+ * (`settings-fields.ts`), this descriptor, and both directions of the sync.
59
+ *
60
+ * `json` in the definition is this module's `object` — the same shape under the
61
+ * name each side has always used for it.
62
+ */
63
+ export const APP_SETTINGS_DESCRIPTOR = APP_SETTINGS_SURFACE.tables.flatMap((table) => table.fields.map((field) => ({
64
+ field: field.field,
65
+ section: table.tomlPath[0],
66
+ key: field.tomlKey,
67
+ type: (field.type === "json" ? "object" : field.type),
68
+ emit: field.emit,
69
+ })));
70
+ /**
71
+ * Section render order for a stable, diff-friendly `app.toml` — the
72
+ * definition's table order (#2644), so a new section is rendered by being
73
+ * declared there.
74
+ */
75
+ export const APP_SETTINGS_SECTIONS = APP_SETTINGS_SURFACE.tables.map((table) => table.tomlPath[0]);
76
+ /**
77
+ * `GET /settings` keys that are computed/read-only and never sync (no server
78
+ * setter). The external coverage drift test classifies these here.
79
+ */
80
+ export const IGNORED_GET_KEYS = new Set([
81
+ "appId",
82
+ // `hasGoogleAuth`, `googleClientSecretSet` and `googleClientSecretStatus` are
83
+ // GONE (#2891), not ignored: the first could not describe a per-platform
84
+ // configuration, and the other two existed only to report a value the server
85
+ // refused to send back. The map states availability per entry and the stored
86
+ // reference is echoed, so a response still carrying any of them is a server
87
+ // this CLI does not understand — worth failing the drift guard over.
88
+ //
89
+ // `hasAppleAuth` / `hasPasskey` stay: the asymmetry is deliberate, since
90
+ // Apple and passkeys have no map to derive per-platform truth from.
91
+ "hasAppleAuth",
92
+ "hasPasskey",
93
+ // #2884 — compatibility fields DERIVED from the one email sign-in flow; the
94
+ // tenant PUT and app.toml retired them, GET still emits both for older
95
+ // clients. Computed, never synced.
96
+ "magicLinkEnabled",
97
+ "otpEnabled",
98
+ "createdAt",
99
+ "modifiedAt",
100
+ ]);
101
+ /**
102
+ * Fields that ARE still writable server-side (present in the `PUT /settings`
103
+ * allow-list) but are deliberately excluded from TOML because a newer field
104
+ * supersedes them. Kept distinct from `IGNORED_GET_KEYS` so the coverage test's
105
+ * "every allow-listed field is covered" claim stays true — these are excluded,
106
+ * not read-only. (Codex design-review concern #1.)
107
+ */
108
+ export const DEPRECATED_WRITABLE_EXCLUDED = new Set(
109
+ // Derived (#2644): `deprecated` is exactly "still writable, superseded by
110
+ // another field", which is what this set has always meant.
111
+ APP_SETTINGS_SURFACE.tables.flatMap((table) => Object.entries(table.notExposed)
112
+ .filter(([, classification]) => classification.kind === "deprecated")
113
+ .map(([field]) => field)));
114
+ export const APP_SETTINGS_ABSENT_VALUES = {
115
+ // [app]
116
+ name: { required: true },
117
+ mode: { required: true },
118
+ baseUrl: { value: null },
119
+ waitlistEnabled: { value: false },
120
+ waitlistNotifyAdmins: { value: true },
121
+ allowedDomains: { value: null },
122
+ testAccountBaseEmails: { value: null },
123
+ // #2816: absent ⇒ cleared, which puts the app back on the DEPLOYMENT's
124
+ // large-document window rather than on a number of its own. There is no
125
+ // default to reset to for the same reason the field has none.
126
+ largeDocumentWindowDays: { value: null },
127
+ // [auth]
128
+ googleOAuthEnabled: { value: null },
129
+ googleClients: { value: null },
130
+ passkeyEnabled: { value: false },
131
+ // #2884: the one email sign-in setting, absent ⇒ `true` because that is what
132
+ // `GET /settings` reports for a row storing none of the three fields
133
+ // (`isEmailSignInEnabled`) — the equality the table above exists to hold.
134
+ // Stated consequence: a hand-authored file that never carried the key pushes
135
+ // email sign-in ON, exactly as omitting `magicLinkEnabled` / `otpEnabled`
136
+ // did before the collapse. A pulled file always states the setting
137
+ // (`emit: "always"`), so this only bites a file authored without it.
138
+ emailSignInEnabled: { value: true },
139
+ appleSignInEnabled: { value: null },
140
+ appleAudiences: { value: null },
141
+ emailRedirectUris: { value: null },
142
+ passkeyRpConfig: { value: null },
143
+ // #3027 — absent means the default "preferred" policy, which is what
144
+ // `GET /settings` reports (`app.passkeyUserVerification ?? null`) for a row
145
+ // that stores none. A file without the key pushes null, not "preferred", so
146
+ // the app keeps following the default rather than pinning today's value.
147
+ passkeyUserVerification: { value: null },
148
+ // [cors]
149
+ corsMode: { value: "universal" },
150
+ corsAllowedOrigins: { value: null },
151
+ corsAllowCredentials: { value: false },
152
+ corsAllowedMethods: { value: null },
153
+ corsAllowedHeaders: { value: null },
154
+ corsExposedHeaders: { value: null },
155
+ corsMaxAge: { value: null },
156
+ // [invitations]
157
+ memberInvitationsEnabled: { value: false },
158
+ memberInvitationLimit: { value: 5 },
159
+ };
160
+ /**
161
+ * The absent-key rule for one field, or a loud failure.
162
+ *
163
+ * Deliberately a throw rather than a `?? null` fallback: under whole-truth push
164
+ * an unlisted field would be CLEARED on every push by a table nobody updated.
165
+ */
166
+ export function appSettingAbsentValue(field) {
167
+ const entry = APP_SETTINGS_ABSENT_VALUES[field];
168
+ if (!entry) {
169
+ throw new Error(`app.toml: no absent-key rule declared for the setting \`${field}\`. ` +
170
+ `Add it to APP_SETTINGS_ABSENT_VALUES (cli/src/lib/app-settings-descriptor.ts) ` +
171
+ `— push sends a value for every writable field (#2880).`);
172
+ }
173
+ return entry;
174
+ }
175
+ /** Fields whose absence is a validation error rather than a clear (#2880). */
176
+ export const REQUIRED_APP_SETTING_FIELDS = APP_SETTINGS_DESCRIPTOR.filter((d) => APP_SETTINGS_ABSENT_VALUES[d.field]?.required === true).map((d) => d.field);
177
+ /**
178
+ * The value the SERVER would hold after accepting this one (#2880 DSO-003).
179
+ *
180
+ * The comparison runs on the local side only: push forwards what the file says
181
+ * and the server normalizes it, so without this an authored-but-noncanonical
182
+ * value (`baseUrl` with a trailing slash, a mixed-case test-account email)
183
+ * differs from the record the server returns FOREVER — and baseline restamping
184
+ * cannot save it, because after an apply the remote hash matches the new
185
+ * baseline while the local hash still does not, re-classifying `local-edited`
186
+ * on every run.
187
+ *
188
+ * Mirrors the rules in `settings-controller.ts` (`baseUrl` trim + trailing
189
+ * slash), `validateTestAccountBaseEmails` (trim, lower-case, dedupe) and
190
+ * `validateRedirectUris` (trim, dedupe). Only the NORMALIZATION is mirrored,
191
+ * never the rejection: an entry the server would refuse stays as authored so
192
+ * the server's own 400 is what the operator sees.
193
+ */
194
+ export function canonicalizeAppSettingValue(field, value) {
195
+ if (value === null || value === undefined)
196
+ return value;
197
+ if (field === "baseUrl") {
198
+ if (typeof value !== "string")
199
+ return value;
200
+ const trimmed = value.trim().replace(/\/+$/, "");
201
+ return trimmed === "" ? null : trimmed;
202
+ }
203
+ if (field === "testAccountBaseEmails" || field === "emailRedirectUris") {
204
+ if (!Array.isArray(value))
205
+ return value;
206
+ const lower = field === "testAccountBaseEmails";
207
+ const seen = new Set();
208
+ const out = [];
209
+ for (const entry of value) {
210
+ if (typeof entry !== "string") {
211
+ out.push(entry);
212
+ continue;
213
+ }
214
+ const normalized = lower ? entry.trim().toLowerCase() : entry.trim();
215
+ if (seen.has(normalized))
216
+ continue;
217
+ seen.add(normalized);
218
+ out.push(normalized);
219
+ }
220
+ return out;
221
+ }
222
+ if (field === "appleAudiences") {
223
+ if (!Array.isArray(value))
224
+ return value;
225
+ // The controller filters non-empty strings and stores `null` for an empty
226
+ // result, so a list of blanks is the same state as no list at all.
227
+ return value.filter((v) => typeof v === "string" && v.length > 0);
228
+ }
229
+ if (field === "googleClients")
230
+ return canonicalizeGoogleClients(value);
231
+ return value;
232
+ }
233
+ /**
234
+ * The typed Google client map as the server STORES it (#2880 DSO-003).
235
+ *
236
+ * `validateGoogleClientsWrite` (`src/services/google-clients.ts`) rewrites each
237
+ * accepted entry: the `clientId` is trimmed, the `clientSecret` is stored as
238
+ * the canonical `{{secrets.KEY}}` reference, the redirect URIs are trimmed and
239
+ * de-duplicated (`validateRedirectUris`), and an entry that states none at all
240
+ * stores the empty list. Without mirroring that, an authored
241
+ * `clientId = " 123.apps... "` — or a `{{ secrets.KEY }}` written with the
242
+ * spacing TOML makes easy — is a `Modified` row on every run against a value
243
+ * push already applied.
244
+ *
245
+ * Normalization only, never rejection: an entry the server would refuse (a
246
+ * `clientSecret` that is not a reference, a URI it will not take) is left as
247
+ * authored so the `PUT`'s own 400 is what the operator sees.
248
+ */
249
+ function canonicalizeGoogleClients(value) {
250
+ if (!value || typeof value !== "object" || Array.isArray(value))
251
+ return value;
252
+ const clients = value.clients;
253
+ if (!clients || typeof clients !== "object" || Array.isArray(clients)) {
254
+ return value;
255
+ }
256
+ const out = {};
257
+ for (const [type, entry] of Object.entries(clients)) {
258
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
259
+ out[type] = entry;
260
+ continue;
261
+ }
262
+ const source = entry;
263
+ const canonical = { ...source };
264
+ if (typeof source.clientId === "string") {
265
+ canonical.clientId = source.clientId.trim();
266
+ }
267
+ if (source.clientSecret !== undefined) {
268
+ canonical.clientSecret = canonicalizeSecretReference(source.clientSecret);
269
+ }
270
+ // Trimmed and de-duplicated, and materialized when the entry states none —
271
+ // the server stores `[]` either way, so "no key" and "empty list" are one
272
+ // state rather than a difference no push can close.
273
+ canonical.redirectUris = Array.isArray(source.redirectUris)
274
+ ? [
275
+ ...new Set(source.redirectUris.map((uri) => typeof uri === "string" ? uri.trim() : uri)),
276
+ ]
277
+ : [];
278
+ out[type] = canonical;
279
+ }
280
+ return { clients: out };
281
+ }
282
+ /**
283
+ * One field's comparable value — what `config diff` and the push gate both read.
284
+ *
285
+ * Canonicalized as above, then flattened to `null` when the value is "empty"
286
+ * under an `emit: "whenSet"` field's own rule. That second step is the
287
+ * app-settings copy of what `projectConfigForComparison` does for every other
288
+ * type (#2731): pull OMITS an empty `whenSet` value, so the file it round-trips
289
+ * to has no key, and comparing `[]` against "no key" would be a difference no
290
+ * push could ever converge.
291
+ */
292
+ export function comparableAppSettingValue(descriptor, value) {
293
+ const canonical = canonicalizeAppSettingValue(descriptor.field, value);
294
+ if (canonical === undefined)
295
+ return null;
296
+ if (descriptor.emit === "whenSet" && isEmptyForEmit(canonical, descriptor.type)) {
297
+ return null;
298
+ }
299
+ return canonical ?? null;
300
+ }
301
+ /**
302
+ * Project a settings record (either side) onto the full writable field set.
303
+ *
304
+ * `excludeName` is the cross-app rule (#2880 DSO-001): while a cross-app push's
305
+ * name exclusion is active, BOTH sides and the stamped baseline are hashed
306
+ * without `name`, so `classifyPushChange`'s `remoteHash === baselineHash ⇒
307
+ * local-edited` arithmetic stays valid.
308
+ */
309
+ export function projectAppSettingsForComparison(settings, options = {}) {
310
+ const projected = {};
311
+ for (const d of APP_SETTINGS_DESCRIPTOR) {
312
+ if (options.excludeName && d.field === "name")
313
+ continue;
314
+ const raw = settings?.[d.field];
315
+ const absent = APP_SETTINGS_ABSENT_VALUES[d.field];
316
+ projected[d.field] = comparableAppSettingValue(d, raw === undefined && absent && absent.required !== true
317
+ ? absent.value
318
+ : raw);
319
+ }
320
+ return projected;
321
+ }
322
+ const DESCRIPTOR_BY_SECTION = (() => {
323
+ const m = new Map();
324
+ for (const d of APP_SETTINGS_DESCRIPTOR) {
325
+ const list = m.get(d.section) ?? [];
326
+ list.push(d);
327
+ m.set(d.section, list);
328
+ }
329
+ return m;
330
+ })();
331
+ /** Descriptor `field` names, for parity/coverage tests. */
332
+ export const DESCRIPTOR_FIELDS = new Set(APP_SETTINGS_DESCRIPTOR.map((d) => d.field));
333
+ function typeOfValue(value) {
334
+ if (value === null || value === undefined)
335
+ return "null";
336
+ if (typeof value === "boolean")
337
+ return "boolean";
338
+ if (typeof value === "number")
339
+ return "number";
340
+ if (typeof value === "string")
341
+ return "string";
342
+ if (Array.isArray(value))
343
+ return "string[]";
344
+ if (typeof value === "object")
345
+ return "object";
346
+ return "unknown";
347
+ }
348
+ /** True if a value should be omitted under `emit: "whenSet"`. */
349
+ function isEmptyForEmit(value, type) {
350
+ if (value === null || value === undefined)
351
+ return true;
352
+ if (type === "string")
353
+ return value === "";
354
+ if (type === "string[]")
355
+ return !Array.isArray(value) || value.length === 0;
356
+ if (type === "object")
357
+ return (typeof value !== "object" ||
358
+ value === null ||
359
+ Object.keys(value).length === 0);
360
+ return false; // booleans (false) and numbers (0) are meaningful, never empty
361
+ }
362
+ /**
363
+ * Validate a push value against its descriptor type. Returns an error string
364
+ * (field-named) on mismatch, or `null` when the value is acceptable. Arrays are
365
+ * checked element-by-element so a `["a", 1]` mistype is caught.
366
+ */
367
+ function typeError(descriptor, value) {
368
+ const actual = typeOfValue(value);
369
+ if (actual === "null")
370
+ return null; // null clears; server owns clear semantics
371
+ if (descriptor.type === "string[]") {
372
+ if (!Array.isArray(value) || !value.every((v) => typeof v === "string")) {
373
+ return `[${descriptor.section}].${descriptor.key} must be an array of strings (got ${actual})`;
374
+ }
375
+ return null;
376
+ }
377
+ if (descriptor.type === "object") {
378
+ if (actual !== "object") {
379
+ return `[${descriptor.section}].${descriptor.key} must be a table (got ${actual})`;
380
+ }
381
+ return null;
382
+ }
383
+ if (actual !== descriptor.type) {
384
+ return `[${descriptor.section}].${descriptor.key} must be a ${descriptor.type} (got ${actual})`;
385
+ }
386
+ return null;
387
+ }
388
+ /**
389
+ * Build one `app.toml` section object from server settings (pull direction).
390
+ * Applies each field's `emit` rule; a `null` value is always omitted (TOML
391
+ * cannot encode null).
392
+ */
393
+ export function serializeSection(settings, section) {
394
+ const out = {};
395
+ for (const d of DESCRIPTOR_BY_SECTION.get(section) ?? []) {
396
+ const value = settings[d.field];
397
+ if (value === null || value === undefined)
398
+ continue;
399
+ if (d.emit === "whenSet" && isEmptyForEmit(value, d.type))
400
+ continue;
401
+ out[d.key] = value;
402
+ }
403
+ return out;
404
+ }
405
+ /**
406
+ * Build the full `app.toml` data object (all sections) from server settings.
407
+ * Empty sections are omitted, though in practice every section has at least one
408
+ * `emit: "always"` key so all four are present.
409
+ */
410
+ export function serializeAppSettingsToToml(settings) {
411
+ const data = {};
412
+ for (const section of APP_SETTINGS_SECTIONS) {
413
+ const obj = serializeSection(settings, section);
414
+ if (Object.keys(obj).length > 0)
415
+ data[section] = obj;
416
+ }
417
+ return data;
418
+ }
419
+ /**
420
+ * Is `[app].name` out of this call entirely? ONE reading of the two spellings
421
+ * the callers use (#2936), so the parse and the payload can never disagree
422
+ * about whether the field is in play: `isCrossAppPush` is the raw cross-app
423
+ * determination, `excludeName` the already-computed answer from
424
+ * `appSettingsNameExcluded` (which also covers the recorded-exclusion case).
425
+ */
426
+ function appSettingsNameStripped(options) {
427
+ return !!(options.isCrossAppPush || options.excludeName);
428
+ }
429
+ /**
430
+ * Translate a parsed `app.toml` object into the settings the FILE STATES —
431
+ * only the keys it carries. This is the parse half; `buildAppSettingsPayload`
432
+ * below turns it into the whole-truth `PUT /settings` body by filling in what
433
+ * the file omits. An unrecognized key or table and a type
434
+ * mismatch are both hard errors the caller must treat as abort-before-PUT
435
+ * (#2644 criterion 6: push rejects what it does not recognize, for every
436
+ * configuration surface, so a typo fails locally instead of being ignored).
437
+ *
438
+ * A per-entry `clientSecret` that is not a whole `{{secrets.KEY}}` reference is
439
+ * the server's rejection to make (#2256): the push forwards the map and the
440
+ * `PUT` answers 400 with `GOOGLE_CLIENT_SECRET_MUST_BE_SECRET_REF`. Duplicating
441
+ * the shape rule here would put two definitions of "valid reference" in play.
442
+ *
443
+ * A RETIRED key (#2891) is different: it is not a value the server can judge,
444
+ * it is a line that has to be deleted, so the parser refuses it locally with
445
+ * the guidance that names its replacement.
446
+ *
447
+ * `isCrossAppPush` — or `excludeName`, the same rule as the caller computed it
448
+ * (#2880 DSO-001, `appSettingsNameExcluded`) — strips `name` so a cross-app
449
+ * push never overwrites the target app's name. The strip has to happen HERE and
450
+ * not only in the payload builder below (#2936): a field the body will not
451
+ * carry is not a field this file gets to refuse, or a slot bound to another app
452
+ * aborts diff and push over a `[app].name` neither of them was going to send.
453
+ */
454
+ export function parseTomlToAppSettings(tomlData, options = {}) {
455
+ const excludeName = appSettingsNameStripped(options);
456
+ const settings = {};
457
+ const warnings = [];
458
+ const errors = [];
459
+ // #2644 criterion 6 — a top-level table the definition does not declare is a
460
+ // hard error, the same posture every per-entity file has. Silently ignoring
461
+ // it made a typo'd header (`[curs]`) push as though the section it meant were
462
+ // absent, so the settings it carried were never applied.
463
+ for (const key of findUnknownDocumentKeys(tomlData, APP_SETTINGS_SURFACE)) {
464
+ errors.push(`app.toml: unrecognized top-level table [${key}]. Check the spelling ` +
465
+ `against the tables app.toml accepts (${APP_SETTINGS_SECTIONS.map((s) => `[${s}]`).join(", ")}), or upgrade the CLI if the server is newer than this one.`);
466
+ }
467
+ for (const section of APP_SETTINGS_SECTIONS) {
468
+ const sectionData = tomlData?.[section];
469
+ if (sectionData === undefined || sectionData === null)
470
+ continue;
471
+ if (typeof sectionData !== "object" || Array.isArray(sectionData)) {
472
+ errors.push(`[${section}] must be a table`);
473
+ continue;
474
+ }
475
+ const descriptors = DESCRIPTOR_BY_SECTION.get(section) ?? [];
476
+ const byKey = new Map(descriptors.map((d) => [d.key, d]));
477
+ for (const key of Object.keys(sectionData)) {
478
+ const d = byKey.get(key);
479
+ if (!d) {
480
+ // A RETIRED key is not an unknown key (#2803's rule, extended to
481
+ // app-settings by #2891/DSO-2891-005). "Check the spelling, or upgrade
482
+ // the CLI" is exactly backwards for a key the platform removed on
483
+ // purpose, and every pre-reshape `app.toml` still carries these lines —
484
+ // so the parser consults the shared retired set directly and says where
485
+ // the value moved to. Keyed under `app`, the app-settings surface's
486
+ // identifier, whichever section the key was authored in.
487
+ const retired = retiredConfigKey("app", key);
488
+ if (retired) {
489
+ errors.push(`app.toml: [${section}].${key} — ${retired.toml}`);
490
+ continue;
491
+ }
492
+ // #2644 criterion 6 — REJECTED, not warned-and-ignored. `app.toml` is a
493
+ // registered configuration surface like every other file, and an
494
+ // ignored key is a setting the author believes they changed.
495
+ errors.push(`app.toml: unrecognized key [${section}].${key}. Remove it or ` +
496
+ `upgrade the CLI if the server is newer than this one. ` +
497
+ `Recognized keys: ${descriptors.map((x) => x.key).join(", ")}.`);
498
+ continue;
499
+ }
500
+ if (excludeName && d.field === "name")
501
+ continue;
502
+ const value = sectionData[key];
503
+ const err = typeError(d, value);
504
+ if (err) {
505
+ errors.push(err);
506
+ continue;
507
+ }
508
+ settings[d.field] = value;
509
+ }
510
+ }
511
+ return { settings, warnings, errors };
512
+ }
513
+ /**
514
+ * `[app].name` / `[app].mode` absent — the two keys whole-truth push refuses to
515
+ * fill in for the author (#2880).
516
+ *
517
+ * Read from the DOCUMENT rather than the parse result, so a cross-app push
518
+ * (which strips `name` before validating) still requires the file to state one.
519
+ * `mode` has no default and `mode: null` is a 400; more to the point, a deleted
520
+ * `mode` line silently resetting an invite-only app to public is the wrong
521
+ * failure to choose.
522
+ */
523
+ export function missingRequiredKeyErrors(tomlData) {
524
+ const errors = [];
525
+ for (const field of REQUIRED_APP_SETTING_FIELDS) {
526
+ const d = APP_SETTINGS_DESCRIPTOR.find((x) => x.field === field);
527
+ if (!d)
528
+ continue;
529
+ const section = tomlData?.[d.section];
530
+ const present = section !== null &&
531
+ typeof section === "object" &&
532
+ !Array.isArray(section) &&
533
+ section[d.key] !== undefined;
534
+ if (present)
535
+ continue;
536
+ errors.push(`app.toml: [${d.section}].${d.key} is required — \`config push\` applies ` +
537
+ `app.toml as the whole truth, and this field has no default to fall ` +
538
+ `back to. Add the line (\`config pull --only app\` writes it).`);
539
+ }
540
+ return errors;
541
+ }
542
+ /**
543
+ * The whole-truth `PUT /settings` body (#2880 criterion 4).
544
+ *
545
+ * Every writable field gets a value: the authored one where the file carries
546
+ * the key, its `APP_SETTINGS_ABSENT_VALUES` entry where it does not. That is
547
+ * what makes `app.toml` mean what every other configuration file means — the
548
+ * local file is the state, not a patch over whatever the server happens to
549
+ * hold (#1567). The controller applies only the keys in the body (`if (field in
550
+ * updates)`), so the completeness has to come from here.
551
+ *
552
+ * Values are forwarded AS AUTHORED, never canonicalized: the server owns its
553
+ * own normalization, and a CLI that rewrote the value before sending it would
554
+ * be pushing something the operator did not write. The canonicalization in
555
+ * `canonicalizeAppSettingValue` is for the local COMPARISON only.
556
+ *
557
+ * `excludeName` (and `isCrossAppPush`, which implies it) leaves `name` out of
558
+ * the body entirely, so a cross-app push never renames the target app.
559
+ */
560
+ export function buildAppSettingsPayload(tomlData, options = {}) {
561
+ const parsed = parseTomlToAppSettings(tomlData, options);
562
+ const errors = [...parsed.errors, ...missingRequiredKeyErrors(tomlData)];
563
+ if (errors.length > 0) {
564
+ return { settings: {}, warnings: parsed.warnings, errors };
565
+ }
566
+ const excludeName = appSettingsNameStripped(options);
567
+ const settings = {};
568
+ for (const d of APP_SETTINGS_DESCRIPTOR) {
569
+ if (excludeName && d.field === "name")
570
+ continue;
571
+ if (d.field in parsed.settings) {
572
+ settings[d.field] = parsed.settings[d.field];
573
+ continue;
574
+ }
575
+ const absent = appSettingAbsentValue(d.field);
576
+ // Required fields never reach here — their absence already errored above.
577
+ if (absent.required === true)
578
+ continue;
579
+ settings[d.field] = absent.value;
580
+ }
581
+ return { settings, warnings: parsed.warnings, errors: [] };
582
+ }
583
+ //# sourceMappingURL=app-settings-descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-settings-descriptor.js","sourceRoot":"","sources":["../../../src/lib/app-settings-descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAE7E;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAC;AA8BlE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAClC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAC5C,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;IAClB,OAAO,EAAE,KAAK,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C,CAAC,CAAC;IACzE,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC7D,CAAC;IAED,MAAM,WAAW,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACrD,MAAM,QAAQ,GAAwB,EAAE,CAAC;IACzC,KAAK,MAAM,CAAC,IAAI,uBAAuB,EAAE,CAAC;QACxC,IAAI,WAAW,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM;YAAE,SAAS;QAChD,IAAI,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAC/B,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC7C,SAAS;QACX,CAAC;QACD,MAAM,MAAM,GAAG,qBAAqB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC9C,0EAA0E;QAC1E,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI;YAAE,SAAS;QACvC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;IACnC,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Credentials } from "../types/index.js";
2
+ interface AuthResult {
3
+ success: boolean;
4
+ credentials?: Credentials;
5
+ error?: string;
6
+ }
7
+ export declare function browserLogin(serverUrl: string): Promise<AuthResult>;
8
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Shared helpers for the CLI's batch-import commands
3
+ * (`databases import` and `databases import-csv`).
4
+ */
5
+ /** Split an array into fixed-size chunks. */
6
+ export declare function chunk<T>(items: T[], size: number): T[][];
7
+ export interface ParseBatchSizeOptions {
8
+ /** Largest batch size the caller will accept. */
9
+ max: number;
10
+ /** Message shown when the value exceeds `max`. */
11
+ overMaxMessage: string;
12
+ }
13
+ /**
14
+ * Parse and validate a `--batch-size` flag value.
15
+ *
16
+ * Returns the parsed integer on success, or a human-readable error message
17
+ * on failure (non-integer, `< 1`, or over the caller's ceiling). Callers
18
+ * decide how to surface the error — typically `error(msg); process.exit(1)`.
19
+ * Validating up front means a bad `--batch-size` fails before any write, so
20
+ * there are no partial imports.
21
+ */
22
+ export declare function parseBatchSize(raw: string, opts: ParseBatchSizeOptions): {
23
+ value: number;
24
+ } | {
25
+ error: string;
26
+ };