primitive-admin 1.1.0-alpha.6 → 1.1.0-alpha.61

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 (387) hide show
  1. package/README.md +389 -71
  2. package/assets/skill/skills/primitive-platform/SKILL.md +670 -0
  3. package/dist/bin/primitive.d.ts +2 -0
  4. package/dist/bin/primitive.js +287 -17
  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 +138 -19
  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 +554 -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 +27 -80
  14. package/dist/src/commands/apps.js.map +1 -1
  15. package/dist/src/commands/auth.d.ts +2 -0
  16. package/dist/src/commands/auth.js +177 -7
  17. package/dist/src/commands/auth.js.map +1 -1
  18. package/dist/src/commands/blob-buckets.d.ts +2 -0
  19. package/dist/src/commands/blob-buckets.js +330 -0
  20. package/dist/src/commands/blob-buckets.js.map +1 -0
  21. package/dist/src/commands/catalog.d.ts +2 -0
  22. package/dist/src/commands/catalog.js +37 -38
  23. package/dist/src/commands/catalog.js.map +1 -1
  24. package/dist/src/commands/collection-type-configs.d.ts +2 -0
  25. package/dist/src/commands/collection-type-configs.js +92 -0
  26. package/dist/src/commands/collection-type-configs.js.map +1 -0
  27. package/dist/src/commands/collections.d.ts +2 -0
  28. package/dist/src/commands/collections.js +526 -0
  29. package/dist/src/commands/collections.js.map +1 -0
  30. package/dist/src/commands/comparisons.d.ts +2 -0
  31. package/dist/src/commands/comparisons.js +6 -6
  32. package/dist/src/commands/comparisons.js.map +1 -1
  33. package/dist/src/commands/config.d.ts +35 -0
  34. package/dist/src/commands/config.js +437 -0
  35. package/dist/src/commands/config.js.map +1 -0
  36. package/dist/src/commands/connections.d.ts +2 -0
  37. package/dist/src/commands/connections.js +100 -0
  38. package/dist/src/commands/connections.js.map +1 -0
  39. package/dist/src/commands/cron-triggers.d.ts +2 -0
  40. package/dist/src/commands/cron-triggers.js +204 -0
  41. package/dist/src/commands/cron-triggers.js.map +1 -0
  42. package/dist/src/commands/database-types.d.ts +2 -0
  43. package/dist/src/commands/database-types.js +171 -0
  44. package/dist/src/commands/database-types.js.map +1 -0
  45. package/dist/src/commands/databases.d.ts +65 -0
  46. package/dist/src/commands/databases.js +2153 -96
  47. package/dist/src/commands/databases.js.map +1 -1
  48. package/dist/src/commands/documents.d.ts +2 -0
  49. package/dist/src/commands/documents.js +1230 -19
  50. package/dist/src/commands/documents.js.map +1 -1
  51. package/dist/src/commands/email-templates.d.ts +2 -0
  52. package/dist/src/commands/email-templates.js +174 -0
  53. package/dist/src/commands/email-templates.js.map +1 -0
  54. package/dist/src/commands/env.d.ts +12 -0
  55. package/dist/src/commands/env.js +260 -0
  56. package/dist/src/commands/env.js.map +1 -0
  57. package/dist/src/commands/group-type-configs.d.ts +2 -0
  58. package/dist/src/commands/group-type-configs.js +86 -0
  59. package/dist/src/commands/group-type-configs.js.map +1 -0
  60. package/dist/src/commands/groups.d.ts +2 -0
  61. package/dist/src/commands/groups.js +38 -99
  62. package/dist/src/commands/groups.js.map +1 -1
  63. package/dist/src/commands/guides.d.ts +223 -0
  64. package/dist/src/commands/guides.js +617 -65
  65. package/dist/src/commands/guides.js.map +1 -1
  66. package/dist/src/commands/init.d.ts +17 -0
  67. package/dist/src/commands/init.js +964 -202
  68. package/dist/src/commands/init.js.map +1 -1
  69. package/dist/src/commands/integrations.d.ts +2 -0
  70. package/dist/src/commands/integrations.js +484 -205
  71. package/dist/src/commands/integrations.js.map +1 -1
  72. package/dist/src/commands/llm.d.ts +2 -0
  73. package/dist/src/commands/llm.js +13 -8
  74. package/dist/src/commands/llm.js.map +1 -1
  75. package/dist/src/commands/locks.d.ts +8 -0
  76. package/dist/src/commands/locks.js +160 -0
  77. package/dist/src/commands/locks.js.map +1 -0
  78. package/dist/src/commands/metadata.d.ts +2 -0
  79. package/dist/src/commands/metadata.js +406 -0
  80. package/dist/src/commands/metadata.js.map +1 -0
  81. package/dist/src/commands/prompts.d.ts +2 -0
  82. package/dist/src/commands/prompts.js +135 -355
  83. package/dist/src/commands/prompts.js.map +1 -1
  84. package/dist/src/commands/rule-sets.d.ts +3 -0
  85. package/dist/src/commands/rule-sets.js +271 -0
  86. package/dist/src/commands/rule-sets.js.map +1 -0
  87. package/dist/src/commands/scripts.d.ts +20 -0
  88. package/dist/src/commands/scripts.js +739 -0
  89. package/dist/src/commands/scripts.js.map +1 -0
  90. package/dist/src/commands/secrets.d.ts +2 -0
  91. package/dist/src/commands/secrets.js +108 -0
  92. package/dist/src/commands/secrets.js.map +1 -0
  93. package/dist/src/commands/sessions.d.ts +2 -0
  94. package/dist/src/commands/sessions.js +75 -0
  95. package/dist/src/commands/sessions.js.map +1 -0
  96. package/dist/src/commands/settings.d.ts +18 -0
  97. package/dist/src/commands/settings.js +54 -0
  98. package/dist/src/commands/settings.js.map +1 -0
  99. package/dist/src/commands/skill.d.ts +2 -0
  100. package/dist/src/commands/skill.js +29 -0
  101. package/dist/src/commands/skill.js.map +1 -0
  102. package/dist/src/commands/sync-app-settings.d.ts +125 -0
  103. package/dist/src/commands/sync-app-settings.js +380 -0
  104. package/dist/src/commands/sync-app-settings.js.map +1 -0
  105. package/dist/src/commands/sync.d.ts +958 -0
  106. package/dist/src/commands/sync.js +8954 -812
  107. package/dist/src/commands/sync.js.map +1 -1
  108. package/dist/src/commands/tokens.d.ts +2 -0
  109. package/dist/src/commands/tokens.js +130 -21
  110. package/dist/src/commands/tokens.js.map +1 -1
  111. package/dist/src/commands/users.d.ts +2 -0
  112. package/dist/src/commands/users.js +440 -22
  113. package/dist/src/commands/users.js.map +1 -1
  114. package/dist/src/commands/vars.d.ts +8 -0
  115. package/dist/src/commands/vars.js +96 -0
  116. package/dist/src/commands/vars.js.map +1 -0
  117. package/dist/src/commands/waitlist.d.ts +2 -0
  118. package/dist/src/commands/waitlist.js +10 -10
  119. package/dist/src/commands/waitlist.js.map +1 -1
  120. package/dist/src/commands/webhooks.d.ts +2 -0
  121. package/dist/src/commands/webhooks.js +442 -0
  122. package/dist/src/commands/webhooks.js.map +1 -0
  123. package/dist/src/commands/workflows.d.ts +94 -0
  124. package/dist/src/commands/workflows.js +1581 -448
  125. package/dist/src/commands/workflows.js.map +1 -1
  126. package/dist/src/lib/api-client.d.ts +1814 -0
  127. package/dist/src/lib/api-client.js +1655 -103
  128. package/dist/src/lib/api-client.js.map +1 -1
  129. package/dist/src/lib/app-settings-descriptor.d.ts +130 -0
  130. package/dist/src/lib/app-settings-descriptor.js +262 -0
  131. package/dist/src/lib/app-settings-descriptor.js.map +1 -0
  132. package/dist/src/lib/auth-flow.d.ts +8 -0
  133. package/dist/src/lib/batch.d.ts +26 -0
  134. package/dist/src/lib/batch.js +32 -0
  135. package/dist/src/lib/batch.js.map +1 -0
  136. package/dist/src/lib/block-layout.d.ts +160 -0
  137. package/dist/src/lib/block-layout.js +451 -0
  138. package/dist/src/lib/block-layout.js.map +1 -0
  139. package/dist/src/lib/canonical-json.d.ts +12 -0
  140. package/dist/src/lib/canonical-json.js +35 -0
  141. package/dist/src/lib/canonical-json.js.map +1 -0
  142. package/dist/src/lib/channel.d.ts +30 -0
  143. package/dist/src/lib/channel.js +68 -0
  144. package/dist/src/lib/channel.js.map +1 -0
  145. package/dist/src/lib/cli-manifest.d.ts +68 -0
  146. package/dist/src/lib/cli-manifest.js +71 -0
  147. package/dist/src/lib/cli-manifest.js.map +1 -0
  148. package/dist/src/lib/codegen-shared/generatedFiles.d.ts +97 -0
  149. package/dist/src/lib/codegen-shared/generatedFiles.js +184 -0
  150. package/dist/src/lib/codegen-shared/generatedFiles.js.map +1 -0
  151. package/dist/src/lib/codegen-shared/prettierStable.d.ts +262 -0
  152. package/dist/src/lib/codegen-shared/prettierStable.js +610 -0
  153. package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -0
  154. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +68 -0
  155. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +168 -0
  156. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js.map +1 -0
  157. package/dist/src/lib/config-object-descriptor.d.ts +108 -0
  158. package/dist/src/lib/config-object-descriptor.js +607 -0
  159. package/dist/src/lib/config-object-descriptor.js.map +1 -0
  160. package/dist/src/lib/config-payload.d.ts +85 -0
  161. package/dist/src/lib/config-payload.js +105 -0
  162. package/dist/src/lib/config-payload.js.map +1 -0
  163. package/dist/src/lib/config-surface.d.ts +93 -0
  164. package/dist/src/lib/config-surface.js +178 -0
  165. package/dist/src/lib/config-surface.js.map +1 -0
  166. package/dist/src/lib/config-toml.d.ts +10 -0
  167. package/dist/src/lib/config-toml.js +42 -0
  168. package/dist/src/lib/config-toml.js.map +1 -0
  169. package/dist/src/lib/config.d.ts +53 -0
  170. package/dist/src/lib/config.js +92 -53
  171. package/dist/src/lib/config.js.map +1 -1
  172. package/dist/src/lib/confirm-prompt.d.ts +83 -0
  173. package/dist/src/lib/confirm-prompt.js +110 -0
  174. package/dist/src/lib/confirm-prompt.js.map +1 -0
  175. package/dist/src/lib/constants.d.ts +11 -0
  176. package/dist/src/lib/constants.js +12 -0
  177. package/dist/src/lib/constants.js.map +1 -0
  178. package/dist/src/lib/crash-handlers.d.ts +20 -0
  179. package/dist/src/lib/crash-handlers.js +49 -0
  180. package/dist/src/lib/crash-handlers.js.map +1 -0
  181. package/dist/src/lib/credentials-store.d.ts +89 -0
  182. package/dist/src/lib/credentials-store.js +330 -0
  183. package/dist/src/lib/credentials-store.js.map +1 -0
  184. package/dist/src/lib/csv.d.ts +47 -0
  185. package/dist/src/lib/csv.js +172 -0
  186. package/dist/src/lib/csv.js.map +1 -0
  187. package/dist/src/lib/data-input.d.ts +23 -0
  188. package/dist/src/lib/data-input.js +50 -0
  189. package/dist/src/lib/data-input.js.map +1 -0
  190. package/dist/src/lib/db-codegen/dbFingerprint.d.ts +10 -0
  191. package/dist/src/lib/db-codegen/dbFingerprint.js +17 -0
  192. package/dist/src/lib/db-codegen/dbFingerprint.js.map +1 -0
  193. package/dist/src/lib/db-codegen/dbGenerator.d.ts +67 -0
  194. package/dist/src/lib/db-codegen/dbGenerator.js +170 -0
  195. package/dist/src/lib/db-codegen/dbGenerator.js.map +1 -0
  196. package/dist/src/lib/db-codegen/dbNaming.d.ts +87 -0
  197. package/dist/src/lib/db-codegen/dbNaming.js +180 -0
  198. package/dist/src/lib/db-codegen/dbNaming.js.map +1 -0
  199. package/dist/src/lib/db-codegen/dbTemplates.d.ts +272 -0
  200. package/dist/src/lib/db-codegen/dbTemplates.js +480 -0
  201. package/dist/src/lib/db-codegen/dbTemplates.js.map +1 -0
  202. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +73 -0
  203. package/dist/src/lib/db-codegen/dbTsTypes.js +139 -0
  204. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -0
  205. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +146 -0
  206. package/dist/src/lib/db-codegen/dbTypeIR.js +517 -0
  207. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -0
  208. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.d.ts +112 -0
  209. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js +211 -0
  210. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js.map +1 -0
  211. package/dist/src/lib/env-resolver.d.ts +62 -0
  212. package/dist/src/lib/env-resolver.js +121 -0
  213. package/dist/src/lib/env-resolver.js.map +1 -0
  214. package/dist/src/lib/fetch.d.ts +5 -0
  215. package/dist/src/lib/generated-allowlist.d.ts +28 -0
  216. package/dist/src/lib/generated-allowlist.js +266 -0
  217. package/dist/src/lib/generated-allowlist.js.map +1 -0
  218. package/dist/src/lib/generated-config-surfaces.d.ts +578 -0
  219. package/dist/src/lib/generated-config-surfaces.js +3630 -0
  220. package/dist/src/lib/generated-config-surfaces.js.map +1 -0
  221. package/dist/src/lib/generated-template-lint.d.ts +206 -0
  222. package/dist/src/lib/generated-template-lint.js +589 -0
  223. package/dist/src/lib/generated-template-lint.js.map +1 -0
  224. package/dist/src/lib/generated-workflow-model-fields.d.ts +20 -0
  225. package/dist/src/lib/generated-workflow-model-fields.js +53 -0
  226. package/dist/src/lib/generated-workflow-model-fields.js.map +1 -0
  227. package/dist/src/lib/google-client-secret-status.d.ts +35 -0
  228. package/dist/src/lib/google-client-secret-status.js +56 -0
  229. package/dist/src/lib/google-client-secret-status.js.map +1 -0
  230. package/dist/src/lib/init-config.d.ts +81 -0
  231. package/dist/src/lib/init-config.js +149 -0
  232. package/dist/src/lib/init-config.js.map +1 -0
  233. package/dist/src/lib/log-inspection.d.ts +568 -0
  234. package/dist/src/lib/log-inspection.js +639 -0
  235. package/dist/src/lib/log-inspection.js.map +1 -0
  236. package/dist/src/lib/migration-nag.d.ts +49 -0
  237. package/dist/src/lib/migration-nag.js +163 -0
  238. package/dist/src/lib/migration-nag.js.map +1 -0
  239. package/dist/src/lib/output.d.ts +109 -0
  240. package/dist/src/lib/output.js +191 -8
  241. package/dist/src/lib/output.js.map +1 -1
  242. package/dist/src/lib/package-manager.d.ts +140 -0
  243. package/dist/src/lib/package-manager.js +305 -0
  244. package/dist/src/lib/package-manager.js.map +1 -0
  245. package/dist/src/lib/paginate.d.ts +83 -0
  246. package/dist/src/lib/paginate.js +95 -0
  247. package/dist/src/lib/paginate.js.map +1 -0
  248. package/dist/src/lib/platform-owned.d.ts +51 -0
  249. package/dist/src/lib/platform-owned.js +64 -0
  250. package/dist/src/lib/platform-owned.js.map +1 -0
  251. package/dist/src/lib/project-config.d.ts +97 -0
  252. package/dist/src/lib/project-config.js +219 -0
  253. package/dist/src/lib/project-config.js.map +1 -0
  254. package/dist/src/lib/query-operators.d.ts +43 -0
  255. package/dist/src/lib/query-operators.js +80 -0
  256. package/dist/src/lib/query-operators.js.map +1 -0
  257. package/dist/src/lib/record-filter.d.ts +18 -0
  258. package/dist/src/lib/record-filter.js +55 -0
  259. package/dist/src/lib/record-filter.js.map +1 -0
  260. package/dist/src/lib/refresh-admin-credentials.d.ts +65 -0
  261. package/dist/src/lib/refresh-admin-credentials.js +103 -0
  262. package/dist/src/lib/refresh-admin-credentials.js.map +1 -0
  263. package/dist/src/lib/resolve-init-dev-port.d.ts +56 -0
  264. package/dist/src/lib/resolve-init-dev-port.js +55 -0
  265. package/dist/src/lib/resolve-init-dev-port.js.map +1 -0
  266. package/dist/src/lib/resolve-init-server.d.ts +71 -0
  267. package/dist/src/lib/resolve-init-server.js +94 -0
  268. package/dist/src/lib/resolve-init-server.js.map +1 -0
  269. package/dist/src/lib/resolve-platform.d.ts +45 -0
  270. package/dist/src/lib/resolve-platform.js +43 -0
  271. package/dist/src/lib/resolve-platform.js.map +1 -0
  272. package/dist/src/lib/run-status.d.ts +19 -0
  273. package/dist/src/lib/run-status.generated.d.ts +39 -0
  274. package/dist/src/lib/run-status.generated.js +66 -0
  275. package/dist/src/lib/run-status.generated.js.map +1 -0
  276. package/dist/src/lib/run-status.js +19 -0
  277. package/dist/src/lib/run-status.js.map +1 -0
  278. package/dist/src/lib/signing-secret-status.d.ts +81 -0
  279. package/dist/src/lib/signing-secret-status.js +116 -0
  280. package/dist/src/lib/signing-secret-status.js.map +1 -0
  281. package/dist/src/lib/skill-installer.d.ts +25 -0
  282. package/dist/src/lib/skill-installer.js +266 -0
  283. package/dist/src/lib/skill-installer.js.map +1 -0
  284. package/dist/src/lib/snapshots.d.ts +99 -0
  285. package/dist/src/lib/snapshots.js +357 -0
  286. package/dist/src/lib/snapshots.js.map +1 -0
  287. package/dist/src/lib/swift-codegen/dbGenerator.d.ts +100 -0
  288. package/dist/src/lib/swift-codegen/dbGenerator.js +682 -0
  289. package/dist/src/lib/swift-codegen/dbGenerator.js.map +1 -0
  290. package/dist/src/lib/swift-codegen/dbSwiftTypes.d.ts +42 -0
  291. package/dist/src/lib/swift-codegen/dbSwiftTypes.js +100 -0
  292. package/dist/src/lib/swift-codegen/dbSwiftTypes.js.map +1 -0
  293. package/dist/src/lib/swift-codegen/generator.d.ts +85 -0
  294. package/dist/src/lib/swift-codegen/generator.js +266 -0
  295. package/dist/src/lib/swift-codegen/generator.js.map +1 -0
  296. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +72 -0
  297. package/dist/src/lib/swift-codegen/schemaToSwift.js +644 -0
  298. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -0
  299. package/dist/src/lib/swift-codegen/siblingSymbols.d.ts +90 -0
  300. package/dist/src/lib/swift-codegen/siblingSymbols.js +152 -0
  301. package/dist/src/lib/swift-codegen/siblingSymbols.js.map +1 -0
  302. package/dist/src/lib/swift-codegen/swiftNaming.d.ts +85 -0
  303. package/dist/src/lib/swift-codegen/swiftNaming.js +198 -0
  304. package/dist/src/lib/swift-codegen/swiftNaming.js.map +1 -0
  305. package/dist/src/lib/sync-paths.d.ts +72 -0
  306. package/dist/src/lib/sync-paths.js +130 -0
  307. package/dist/src/lib/sync-paths.js.map +1 -0
  308. package/dist/src/lib/sync-resource-types.d.ts +445 -0
  309. package/dist/src/lib/sync-resource-types.js +812 -0
  310. package/dist/src/lib/sync-resource-types.js.map +1 -0
  311. package/dist/src/lib/sync-selectors.d.ts +95 -0
  312. package/dist/src/lib/sync-selectors.js +228 -0
  313. package/dist/src/lib/sync-selectors.js.map +1 -0
  314. package/dist/src/lib/template.d.ts +121 -0
  315. package/dist/src/lib/template.js +447 -67
  316. package/dist/src/lib/template.js.map +1 -1
  317. package/dist/src/lib/token-inject.d.ts +56 -0
  318. package/dist/src/lib/token-inject.js +204 -0
  319. package/dist/src/lib/token-inject.js.map +1 -0
  320. package/dist/src/lib/toml-database-config.d.ts +123 -0
  321. package/dist/src/lib/toml-database-config.js +527 -0
  322. package/dist/src/lib/toml-database-config.js.map +1 -0
  323. package/dist/src/lib/toml-metadata-config.d.ts +151 -0
  324. package/dist/src/lib/toml-metadata-config.js +476 -0
  325. package/dist/src/lib/toml-metadata-config.js.map +1 -0
  326. package/dist/src/lib/toml-native-form.d.ts +46 -0
  327. package/dist/src/lib/toml-native-form.js +78 -0
  328. package/dist/src/lib/toml-native-form.js.map +1 -0
  329. package/dist/src/lib/toml-params-validator.d.ts +129 -0
  330. package/dist/src/lib/toml-params-validator.js +298 -0
  331. package/dist/src/lib/toml-params-validator.js.map +1 -0
  332. package/dist/src/lib/toml-scalar-edit.d.ts +43 -0
  333. package/dist/src/lib/toml-scalar-edit.js +283 -0
  334. package/dist/src/lib/toml-scalar-edit.js.map +1 -0
  335. package/dist/src/lib/user-selector.d.ts +24 -0
  336. package/dist/src/lib/user-selector.js +33 -0
  337. package/dist/src/lib/user-selector.js.map +1 -0
  338. package/dist/src/lib/version-check.d.ts +35 -0
  339. package/dist/src/lib/version-check.js +241 -0
  340. package/dist/src/lib/version-check.js.map +1 -0
  341. package/dist/src/lib/watch.d.ts +121 -0
  342. package/dist/src/lib/watch.js +169 -0
  343. package/dist/src/lib/watch.js.map +1 -0
  344. package/dist/src/lib/workflow-apply.d.ts +51 -0
  345. package/dist/src/lib/workflow-apply.js +89 -0
  346. package/dist/src/lib/workflow-apply.js.map +1 -0
  347. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.d.ts +129 -0
  348. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js +269 -0
  349. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js.map +1 -0
  350. package/dist/src/lib/workflow-codegen/generator.d.ts +96 -0
  351. package/dist/src/lib/workflow-codegen/generator.js +361 -0
  352. package/dist/src/lib/workflow-codegen/generator.js.map +1 -0
  353. package/dist/src/lib/workflow-codegen/invokerIR.d.ts +83 -0
  354. package/dist/src/lib/workflow-codegen/invokerIR.js +71 -0
  355. package/dist/src/lib/workflow-codegen/invokerIR.js.map +1 -0
  356. package/dist/src/lib/workflow-codegen/naming.d.ts +33 -0
  357. package/dist/src/lib/workflow-codegen/naming.js +81 -0
  358. package/dist/src/lib/workflow-codegen/naming.js.map +1 -0
  359. package/dist/src/lib/workflow-codegen/schemaToTs.d.ts +80 -0
  360. package/dist/src/lib/workflow-codegen/schemaToTs.js +303 -0
  361. package/dist/src/lib/workflow-codegen/schemaToTs.js.map +1 -0
  362. package/dist/src/lib/workflow-config-apply.d.ts +70 -0
  363. package/dist/src/lib/workflow-config-apply.js +137 -0
  364. package/dist/src/lib/workflow-config-apply.js.map +1 -0
  365. package/dist/src/lib/workflow-config-sidecar.d.ts +63 -0
  366. package/dist/src/lib/workflow-config-sidecar.js +96 -0
  367. package/dist/src/lib/workflow-config-sidecar.js.map +1 -0
  368. package/dist/src/lib/workflow-field-descriptor.d.ts +91 -0
  369. package/dist/src/lib/workflow-field-descriptor.js +153 -0
  370. package/dist/src/lib/workflow-field-descriptor.js.map +1 -0
  371. package/dist/src/lib/workflow-fragments.d.ts +64 -0
  372. package/dist/src/lib/workflow-fragments.js +342 -0
  373. package/dist/src/lib/workflow-fragments.js.map +1 -0
  374. package/dist/src/lib/workflow-include-preserve.d.ts +71 -0
  375. package/dist/src/lib/workflow-include-preserve.js +153 -0
  376. package/dist/src/lib/workflow-include-preserve.js.map +1 -0
  377. package/dist/src/lib/workflow-payload.d.ts +86 -0
  378. package/dist/src/lib/workflow-payload.js +168 -0
  379. package/dist/src/lib/workflow-payload.js.map +1 -0
  380. package/dist/src/lib/workflow-toml-validator.d.ts +199 -0
  381. package/dist/src/lib/workflow-toml-validator.js +754 -0
  382. package/dist/src/lib/workflow-toml-validator.js.map +1 -0
  383. package/dist/src/types/index.d.ts +533 -0
  384. package/dist/src/validators.d.ts +65 -0
  385. package/dist/src/validators.js +64 -0
  386. package/dist/src/validators.js.map +1 -0
  387. package/package.json +32 -6
@@ -0,0 +1,578 @@
1
+ /**
2
+ * GENERATED FILE — DO NOT EDIT BY HAND.
3
+ *
4
+ * Vendored from the canonical server modules under `src/config-surface/` — the
5
+ * ONE definition per configuration object (issue #2644). The server's
6
+ * create/update handlers and this copy read the same field surface, so the CLI's
7
+ * push payloads, pull serializers and TOML key validation cannot drift from what
8
+ * the server accepts.
9
+ *
10
+ * Regenerate with:
11
+ * node cli/scripts/gen-config-surfaces.mjs (runs automatically at CLI prebuild)
12
+ *
13
+ * A freshness guard (`gen-config-surfaces.mjs --check`, asserted by
14
+ * `cli/tests/unit/config-surface-drift-guard.test.ts`) fails if this committed
15
+ * copy does not match the source.
16
+ */
17
+ /**
18
+ * The one definition per configuration object (issue #2644).
19
+ *
20
+ * A "configuration object" is anything `primitive sync` round-trips as
21
+ * config-as-code: workflows, prompts, integrations, webhooks, cron triggers,
22
+ * blob buckets, database types, rule sets, email templates, and the type
23
+ * configs. Every one of them used to write its field surface out by hand in at
24
+ * least three places — the server's create/update handler, the CLI's push
25
+ * payload builder, and the CLI's pull serializer — so adding a field to one and
26
+ * not the others failed silently: the field was simply absent, `sync diff` could
27
+ * not see it, and a pull → push cycle cleared it server-side (#571, #807, #1081,
28
+ * #1172, #1177, #1972, #2635).
29
+ *
30
+ * These types describe that surface ONCE. The definitions live here on the
31
+ * server; the CLI vendors them at build time into
32
+ * `cli/src/lib/generated-config-surfaces.ts`
33
+ * (`cli/scripts/gen-config-surfaces.mjs`), the same server→CLI vendoring
34
+ * `gen-operation-def-descriptor.mjs` (#1544) already uses, so the published CLI
35
+ * still imports no server code at runtime.
36
+ *
37
+ * ── Scope: declarative classification and coverage ONLY ──────────────────
38
+ * Decision of record (#1976, 2026-07-23, carried forward at #2644's design
39
+ * gate): a definition records WHICH fields exist, whether each is part of the
40
+ * TOML surface, which modes the server accepts it in, and — for a field with
41
+ * real behavior — the NAME of the handler that owns that behavior. It never
42
+ * encodes the behavior itself, and no handler source is ever regex-scanned for
43
+ * field names. `pickWritableFields` replaces the key list, not the validation.
44
+ *
45
+ * ── Purity ───────────────────────────────────────────────────────────────
46
+ * Everything under `src/config-surface/` must stay importable by a build-time
47
+ * Node script with no Workers runtime: no `getAppModels`, no `withAppContext`,
48
+ * no `src/do-routing.ts`, no `env`. `cli/tests/unit/config-surface-drift-guard.test.ts`
49
+ * asserts the directory's import graph stays empty of those modules.
50
+ */
51
+ /** Value shape of a field on the wire and in TOML. Descriptive, not a parser. */
52
+ export type FieldType = "string" | "number" | "boolean" | "string[]" | "json";
53
+ /**
54
+ * Why a persisted field is not part of the TOML surface. `note` is required —
55
+ * absence from a hand-written list is never a decision (#2644 criterion 4).
56
+ */
57
+ export type NotExposed = {
58
+ kind: "server-owned";
59
+ note: string;
60
+ } | {
61
+ kind: "structural";
62
+ note: string;
63
+ /**
64
+ * Which create/update modes carry this key IN THE REQUEST BODY — the same
65
+ * statement `ConfigField.writableOn` makes about a field, for a key that
66
+ * is not part of the TOML field surface.
67
+ *
68
+ * Omitted means both, the common case for a sub-tree the body always
69
+ * carries (`rules`, `metadataManifest`, `config`). `[]` says the key
70
+ * never travels in the body at all: it is in the URL path or comes from
71
+ * the file name, so no request schema admits it. Being structural is a
72
+ * statement about the TOML surface and does not by itself make a key
73
+ * writable — a mode whose handler never reads the key is not declared
74
+ * for it, or the schema would accept a key the handler drops, which is
75
+ * the silent 200 criterion 9 exists to end.
76
+ */
77
+ requestModes?: readonly ("create" | "update")[];
78
+ } | {
79
+ kind: "secret";
80
+ note: string;
81
+ } | {
82
+ kind: "deprecated";
83
+ note: string;
84
+ };
85
+ export interface ConfigField {
86
+ /** `models.yaml` field name === the wire key on create/update. */
87
+ field: string;
88
+ /** Key inside the TOML table (often identical to `field`). */
89
+ tomlKey: string;
90
+ type: FieldType;
91
+ /** "whenSet" omits the key on pull when the value is empty; see #1033's `emit`. */
92
+ emit: "always" | "whenSet";
93
+ /**
94
+ * Modes the SERVER accepts the field in — a statement about the handler's
95
+ * `hasOwnProperty` branches and nothing else. `["create"]` means update
96
+ * genuinely rejects/ignores it (e.g. an immutable key). It is NOT a place to
97
+ * record CLI call ordering: `syncCallable` is accepted on both create and
98
+ * update (`src/admin-api.ts` `createAppWorkflow` / `updateAppWorkflow`); the
99
+ * CLI's create-only send is a *sequencing* invariant owned by
100
+ * `applyWorkflowBody` (#807 — the deferred second PATCH is itself an update
101
+ * call, and would break if update rejected the field).
102
+ */
103
+ writableOn: readonly ("create" | "update")[];
104
+ /**
105
+ * Classification, not dispatch. "passthrough" = the accepted value is stored
106
+ * as-is. Otherwise the named handler owns validation, normalization and
107
+ * serialization for this field; the guard only asserts the export exists.
108
+ *
109
+ * A handler is named `"<repo-relative module path>#<exported name>"`, e.g.
110
+ * `"src/workflows/config/workflow-field-handlers.ts#normalizeWorkflowStatus"`.
111
+ * `cli/tests/unit/config-surface-drift-guard.test.ts` fails when the module or
112
+ * the export is missing (#2644 behavior 2b).
113
+ */
114
+ validation: "passthrough" | {
115
+ handler: string;
116
+ };
117
+ }
118
+ export interface ConfigTable {
119
+ /** TOML path, e.g. ["workflow"] for [workflow], ["configs"] for [[configs]]. */
120
+ tomlPath: readonly string[];
121
+ repeated: boolean;
122
+ /** The `models.yaml` model backing this table — the coverage anchor. */
123
+ model: string;
124
+ fields: readonly ConfigField[];
125
+ /** Every model field not in `fields`, with its reason. Coverage is exhaustive. */
126
+ notExposed: Readonly<Record<string, NotExposed>>;
127
+ /**
128
+ * TOML keys accepted inside this table that are NOT part of the write field
129
+ * surface — an author writes them, but some other machinery consumes them.
130
+ * Declared here so `sync push`'s unrecognized-key rejection (#2644 criterion
131
+ * 6) does not reject a key the CLI itself emits, and so the reason is visible
132
+ * rather than implied.
133
+ */
134
+ tomlOnlyKeys: Readonly<Record<string, NotExposed>>;
135
+ /**
136
+ * Keys the create/update BODY carries that are not `models.yaml` fields at
137
+ * all — protocol keys such as the `expectedModifiedAt` optimistic-concurrency
138
+ * token. Declared here so phase 5's generated request schemas
139
+ * (`request-schema.ts`) accept them, with the reason visible rather than
140
+ * implied. Optional: most objects have none.
141
+ *
142
+ * `modes` records which handlers actually read the key, the same statement
143
+ * `ConfigField.writableOn` makes about a field. Omitted means both — the
144
+ * common case. A key the handler in this mode does not read is NOT declared
145
+ * for that mode: the schema would accept it and the handler would drop it,
146
+ * which is the silent 200 criterion 9 exists to end.
147
+ */
148
+ requestOnlyKeys?: Readonly<Record<string, {
149
+ note: string;
150
+ modes?: readonly ("create" | "update")[];
151
+ }>>;
152
+ /**
153
+ * Keys the server's GET response carries that are not `models.yaml` fields —
154
+ * derived flags and related payloads. Declared here so `sync pull`'s
155
+ * unrecognized-key warning (#2644 criterion 6) reports genuinely unknown keys
156
+ * rather than every computed one.
157
+ */
158
+ responseOnlyKeys: Readonly<Record<string, NotExposed>>;
159
+ }
160
+ export interface ConfigObjectSurface {
161
+ /** Matches the CLI's `SyncResourceType.label` — e.g. "workflow", "prompt". */
162
+ label: string;
163
+ tables: readonly ConfigTable[];
164
+ /**
165
+ * Top-level TOML keys the object's FILE carries besides its field tables —
166
+ * the authored sub-trees that travel on their own channel (`[[steps]]`,
167
+ * `[requestConfig]`, `[rules]`, `[models.*]`) and the declared-access
168
+ * manifest's `[metadata]` / `secrets` / `vars` fragments.
169
+ *
170
+ * `tomlOnlyKeys` says which keys are accepted INSIDE a table; this says which
171
+ * keys are accepted at the document root. Together they make `sync push`'s
172
+ * rejection total (design gate, 2026-08-12: push rejects everything
173
+ * unrecognized): without it a typo'd table header — `[integraton]` — parsed
174
+ * to a root key nothing checked, so the file pushed as though the real table
175
+ * were empty and the TOML-owned fields inside it were CLEARED server-side.
176
+ *
177
+ * Every entry carries its reason, the same rule `notExposed` follows: a table
178
+ * that is simply absent from this map must not read as a decision.
179
+ */
180
+ tomlDocumentKeys: Readonly<Record<string, NotExposed>>;
181
+ /**
182
+ * Declares that this object HAS no TOML field table, with the reason —
183
+ * required when `tables` is empty and forbidden otherwise.
184
+ *
185
+ * `transform` is the case: a `.rhai` file's authored surface is the script
186
+ * body, so there is no key/value table to define. Saying so here is the same
187
+ * rule `notExposed` applies to a field, one level up: "absent from the
188
+ * registry" and "deliberately fieldless" must not look the same (#2644
189
+ * criterion 4).
190
+ */
191
+ noFieldTable?: {
192
+ note: string;
193
+ };
194
+ }
195
+ /**
196
+ * Shared spellings used by every configuration-object definition (issue #2644).
197
+ *
198
+ * These live in one module for a mechanical reason as much as a stylistic one:
199
+ * `cli/scripts/gen-config-surfaces.mjs` concatenates the whole directory into a
200
+ * single vendored artifact, so a `const handler = …` declared per definition
201
+ * module would collide as a duplicate identifier the moment a second object was
202
+ * migrated.
203
+ *
204
+ * Pure: no models, no tenant context, no `env` (see `types.ts` §Purity).
205
+ */
206
+ /** Both write modes — the common case, spelled once. */
207
+ export declare const BOTH: readonly ("create" | "update")[];
208
+ /** Create only: an immutable key or a field the update handler ignores. */
209
+ export declare const CREATE_ONLY: readonly ("create" | "update")[];
210
+ /** Update only: a field the create handler assigns itself. */
211
+ export declare const UPDATE_ONLY: readonly ("create" | "update")[];
212
+ /**
213
+ * Name the handler that owns a field's validation, normalization and
214
+ * serialization, as `"<repo-relative module>#<export>"`. Classification only —
215
+ * the definition never dispatches through it (#1976 decision of record); the
216
+ * guard asserts the export exists so a renamed handler fails the CLI unit suite
217
+ * instead of leaving a dangling reference (#2644 behavior 2b).
218
+ */
219
+ export declare function handledBy(modulePath: string, exportName: string): ConfigField["validation"];
220
+ /**
221
+ * The declared-access manifest's top-level TOML keys (#1304, #1364).
222
+ *
223
+ * Five objects carry the same three-key fragment beside their field table —
224
+ * workflows, database types, and the group / collection / metadata-category
225
+ * configs — parsed by the one `parseDeclaredAccessManifestToml`. Spelling it
226
+ * once here keeps `sync push`'s document-level rejection from disagreeing with
227
+ * itself object by object.
228
+ */
229
+ export declare const DECLARED_ACCESS_MANIFEST_KEYS: Readonly<Record<string, NotExposed>>;
230
+ /**
231
+ * The accepted-key half of a configuration object's definition (issue #2644).
232
+ *
233
+ * `pickWritableFields` answers exactly one question — "is this key writable on
234
+ * this object in this mode" — so a server handler stops naming the keys it
235
+ * accepts. What a present key MEANS stays with the per-field handler the
236
+ * definition names (spec §Contracts, decision of record #1976): the workflow
237
+ * `status` enum, the non-negative-integer coercion of the queue limits,
238
+ * `runAs`'s caller|system check, `parseWorkflowLock`, the `capabilities` array
239
+ * shape and the CEL parse of `accessRule` all stay where they are. The
240
+ * mechanical win is that a field can no longer be *absent* from the accepted
241
+ * set.
242
+ *
243
+ * Pure: no models, no tenant context, no `env` (see `types.ts` §Purity).
244
+ */
245
+ export type WriteMode = "create" | "update";
246
+ /** The field names this table accepts on the wire in `mode`, in declaration order. */
247
+ export declare function writableFieldNames(table: ConfigTable, mode: WriteMode): string[];
248
+ /**
249
+ * The field names the server PERSISTS for this table in `mode`: the writable
250
+ * fields, plus the `deprecated` classifications — "still writable, superseded
251
+ * by another field" is what that kind means (`types.ts`), so a superseded key
252
+ * a handler still honors (`accessPolicy`, `passkeyRpId`) belongs in every
253
+ * accepted set, and a field that is NOT writable belongs in none of them.
254
+ *
255
+ * Stated once here because three consumers need the same answer: the generated
256
+ * request schemas, `PUT /settings`'s write allow-list, and the guards.
257
+ */
258
+ export declare function acceptedWriteFieldNames(table: ConfigTable, mode: WriteMode): string[];
259
+ /**
260
+ * Split a request body into the keys this table accepts in `mode` and the keys
261
+ * it does not.
262
+ *
263
+ * `accepted` preserves the caller's values verbatim — including an explicit
264
+ * `null` or `false`, which are meaningful (clear / opt-out) and must not be
265
+ * coalesced away. Only keys the body actually carries appear, so a handler can
266
+ * keep using presence (`hasOwnProperty`) to distinguish "leave unset" from
267
+ * "set to null".
268
+ *
269
+ * `rejected` is every other key the body carried. Today it is informational;
270
+ * #2644 phase 5 turns it into a 400 through the generated request schemas.
271
+ */
272
+ export declare function pickWritableFields(body: Record<string, unknown>, table: ConfigTable, mode: WriteMode): {
273
+ accepted: Record<string, unknown>;
274
+ rejected: string[];
275
+ };
276
+ /**
277
+ * The PASSTHROUGH half of the accepted body: the keys this table declares
278
+ * `validation: "passthrough"`, writable in `mode`, that the body actually
279
+ * carries — with their values verbatim.
280
+ *
281
+ * This is what makes criterion 1 true rather than aspirational. A handler that
282
+ * only picked its accepted set still had to name each field again when it built
283
+ * the row to persist, so a scalar field added to a definition alone was
284
+ * accepted on the wire and then dropped on the floor. Handlers spread this into
285
+ * the create/update payload FIRST, so a field with real behavior still lands
286
+ * through its named handler (whose assignment comes after and wins), and a
287
+ * plain scalar needs no handler edit at all.
288
+ *
289
+ * Values are passed through untouched — including an explicit `null` or
290
+ * `false`, which are meaningful (clear / opt-out). "Stored as-is" is exactly
291
+ * what the `passthrough` classification promises.
292
+ */
293
+ export declare function passthroughFields(body: Record<string, unknown>, table: ConfigTable, mode: WriteMode, options?: {
294
+ /**
295
+ * Fields whose PRESENCE semantics this handler owns — it decides, per
296
+ * value, whether the key is written at all (a falsy `displayName` that
297
+ * means "leave the stored name alone"). Listing one here keeps the generic
298
+ * copy from changing what it means.
299
+ *
300
+ * This is never a place to list a field the handler does not assign: a
301
+ * field named here and dropped by the handler is written nowhere, which is
302
+ * the silent loss the definition exists to prevent. A NEW field needs no
303
+ * entry — omission is what makes it flow through.
304
+ */
305
+ handledHere?: readonly string[];
306
+ }): Record<string, unknown>;
307
+ /** `true` when the body carries `field` and this table accepts it in `mode`. */
308
+ export declare function hasWritableField(accepted: Record<string, unknown>, field: string): boolean;
309
+ /**
310
+ * Coverage checks over a configuration object's definition (issue #2644,
311
+ * criteria 2 and 4).
312
+ *
313
+ * A definition claims to describe its model's WHOLE field surface. These
314
+ * functions are what make that claim mean something: every `models.yaml` field
315
+ * is either exposed in TOML or classified `notExposed` with a reason, in both
316
+ * directions — a new field nobody classified, and a classification for a field
317
+ * that no longer exists. `cli/tests/unit/config-surface-drift-guard.test.ts`
318
+ * asserts them over every registered object, so coverage follows from being a
319
+ * configuration object rather than from someone adding a per-type guard.
320
+ *
321
+ * Pure: no models, no tenant context, no `env` (see `types.ts` §Purity).
322
+ */
323
+ /**
324
+ * `models.yaml` field names per model — the coverage anchor, passed in rather
325
+ * than read here so this module stays pure (the CLI's vendored artifact carries
326
+ * it as `GENERATED_CONFIG_MODEL_FIELDS`).
327
+ */
328
+ export type ModelFieldMap = Readonly<Record<string, readonly string[]>>;
329
+ /**
330
+ * Whether a value counts as unset for an `emit: "whenSet"` field, so `sync pull`
331
+ * omits the key instead of writing a noisy empty one (and `sync diff` does not
332
+ * report a difference that is not there).
333
+ *
334
+ * Carried over verbatim from #1033's shipped app-settings descriptor
335
+ * (`cli/src/lib/app-settings-descriptor.ts`): an empty array and an empty
336
+ * object are unset, while `false` and `0` are meaningful values and never are.
337
+ */
338
+ export declare function isEmptyForEmit(value: unknown, type: ConfigField["type"]): boolean;
339
+ /**
340
+ * A field name whose shape says it carries a credential. Such a field must be
341
+ * classified explicitly — exposed with a stated reference-only contract, or
342
+ * `notExposed: { kind: "secret" }` — because a mechanical generalization that
343
+ * merely omits it would read as "not decided" (#2254, #2256).
344
+ */
345
+ export declare const SECRETISH_FIELD: RegExp;
346
+ /** Model fields the table neither exposes nor classifies. Non-empty is a failure. */
347
+ export declare function findUnclassifiedFields(table: ConfigTable, modelFields: readonly string[]): string[];
348
+ /**
349
+ * Classifications that no longer correspond to a model field — i.e. a field
350
+ * removed from `models.yaml` while the definition still names it. Also a
351
+ * failure: a stale classification must not silently pass, or the coverage claim
352
+ * quietly stops meaning anything.
353
+ */
354
+ export declare function findStaleClassifications(table: ConfigTable, modelFields: readonly string[]): string[];
355
+ /** The models this surface's tables project, in declaration order, deduped. */
356
+ export declare function surfaceModels(surface: ConfigObjectSurface): string[];
357
+ /**
358
+ * Model fields the whole surface neither exposes nor classifies. Non-empty is
359
+ * a failure: the CLI would silently ignore them and a pull → push cycle would
360
+ * clear them (#2644 criterion 2).
361
+ */
362
+ export declare function findUnclassifiedSurfaceFields(surface: ConfigObjectSurface, modelFields: ModelFieldMap): string[];
363
+ /**
364
+ * Classifications naming a field the model no longer has — the other direction,
365
+ * and equally a failure: a stale entry quietly stops meaning anything.
366
+ */
367
+ export declare function findStaleSurfaceClassifications(surface: ConfigObjectSurface, modelFields: ModelFieldMap): string[];
368
+ /** Fields the surface both exposes and classifies `notExposed`. Ambiguous. */
369
+ export declare function findDoubleClassifiedSurfaceFields(surface: ConfigObjectSurface): string[];
370
+ /**
371
+ * Secret-adjacent model fields the surface leaves undecided — neither exposed
372
+ * with a stated contract nor classified `notExposed` (#2254, #2256).
373
+ */
374
+ export declare function findUnclassifiedSecretishSurfaceFields(surface: ConfigObjectSurface, modelFields: ModelFieldMap): string[];
375
+ /** Fields classified twice — exposed AND `notExposed`. Ambiguous, so a failure. */
376
+ export declare function findDoubleClassifiedFields(table: ConfigTable): string[];
377
+ /**
378
+ * `notExposed` / `tomlOnlyKeys` / `responseOnlyKeys` entries whose `note` is
379
+ * missing or blank. A reason is the whole point of the classification.
380
+ */
381
+ export declare function findReasonlessClassifications(table: ConfigTable): string[];
382
+ /**
383
+ * Secret-adjacent model fields with no explicit decision — neither an exposed
384
+ * entry nor a `notExposed` classification. A bare omission is the failure mode
385
+ * this catches.
386
+ */
387
+ export declare function findUnclassifiedSecretishFields(table: ConfigTable, modelFields: readonly string[]): string[];
388
+ /**
389
+ * Every distinct handler reference the table names, as
390
+ * `"<repo-relative module>#<export>"`. The guard resolves each one and fails
391
+ * when the module or the export is missing (#2644 behavior 2b).
392
+ */
393
+ export declare function handlerReferences(table: ConfigTable): string[];
394
+ /** TOML keys this table accepts: the exposed fields plus the declared extras. */
395
+ export declare function acceptedTomlKeys(table: ConfigTable): Set<string>;
396
+ /** Top-level TOML keys this object's file accepts: its tables plus the extras. */
397
+ export declare function acceptedTomlDocumentKeys(surface: ConfigObjectSurface): Set<string>;
398
+ /**
399
+ * `tomlDocumentKeys` entries with no reason, and any that merely restate a
400
+ * field table. Both are failures: a reason is the whole point of the
401
+ * classification, and a duplicate would let a table's shape check be bypassed
402
+ * by declaring it twice.
403
+ */
404
+ export declare function findBadDocumentKeyDeclarations(surface: ConfigObjectSurface): string[];
405
+ /** Root keys of `tomlData` the surface does not declare. `sync push` rejects these. */
406
+ export declare function findUnknownTomlDocumentKeys(surface: ConfigObjectSurface, tomlData: unknown): string[];
407
+ export declare function findMisshapenTomlTables(surface: ConfigObjectSurface, tomlData: unknown): Array<{
408
+ key: string;
409
+ expected: "table" | "array of tables";
410
+ }>;
411
+ /**
412
+ * Server-response keys this table recognizes: every model field (exposed or
413
+ * not) plus the declared response-only keys. `sync pull` warns about anything
414
+ * else instead of dropping it silently (#2644 criterion 6).
415
+ */
416
+ export declare function recognizedResponseKeys(table: ConfigTable, modelFields: readonly string[]): Set<string>;
417
+ /**
418
+ * Request schemas generated from the configuration-object definitions
419
+ * (issue #2644, phase 5 / criterion 9).
420
+ *
421
+ * Every create/update handler in this family used to drop, in silence, any body
422
+ * key it did not read. A client sending `timoutMs` for `timeoutMs` got a 200 and
423
+ * no timeout change. These schemas close that: one per object and mode,
424
+ * `additionalProperties: false`, properties = the keys that object accepts on
425
+ * the wire in that mode, so an unknown key is a 400 naming it.
426
+ *
427
+ * **Breaking change, named**: a client that sends a stray key and gets a 200
428
+ * today will get a 400. The CLI never hits it — `sync push` already rejects
429
+ * unrecognized TOML keys locally (criterion 6).
430
+ *
431
+ * ── What the schema says, and what it deliberately does not ──────────────
432
+ * It states the KEY SET only: each property is the empty schema, so no value is
433
+ * type-checked here. That is the decision of record (#1976, carried forward at
434
+ * #2644's design gate): the definition classifies, handlers behave. The
435
+ * `status` enum, the queue limits' integer coercion, `runAs`'s caller|system
436
+ * check, the CEL parse of `accessRule` — all stay in the handlers the
437
+ * definition names, with their existing messages. Adding type gates here would
438
+ * duplicate them and start rejecting values the handlers accept.
439
+ *
440
+ * ── Which keys are in the set ────────────────────────────────────────────
441
+ * Derived, not listed:
442
+ *
443
+ * - every field the definition says is writable in this mode;
444
+ * - every field classified `structural` — the authored sub-trees that travel
445
+ * on their own channel (`rules`, `steps`, `metadataManifest`, `schema`,
446
+ * `triggers`) but are still sent in the body — in the modes that entry
447
+ * declares (`requestModes`; omitted means both, `[]` means the key travels
448
+ * in the URL path and no schema admits it);
449
+ * - every field classified `deprecated` — still writable server-side, by
450
+ * definition of that classification;
451
+ * - the table's `requestOnlyKeys`, in the modes each declares: protocol keys
452
+ * that are not model fields at all, such as the `expectedModifiedAt`
453
+ * optimistic-concurrency token or a create-only alias.
454
+ *
455
+ * `server-owned` and `secret` classifications are the two the schema excludes:
456
+ * the first is assigned by the server, the second never travels in readable
457
+ * form.
458
+ *
459
+ * Pure: no models, no tenant context, no `env` (see `types.ts` §Purity).
460
+ */
461
+ /**
462
+ * A generated request schema. Shaped for the app API's `meta.request` slot and
463
+ * the runtime validator it feeds (`src/app-api/request-validation.ts`), which
464
+ * reports an unknown key as `value.<key> is not allowed`.
465
+ */
466
+ export interface ConfigRequestSchema {
467
+ type: "object";
468
+ properties: Record<string, Record<string, never>>;
469
+ additionalProperties: false;
470
+ /**
471
+ * Structural-typing escape hatch: the app API's `meta.request` slot is a
472
+ * `Record<string, unknown>` (`JsonSchema`), and an interface with no index
473
+ * signature is not assignable to one. Declaring the index here keeps the
474
+ * generated schema usable as a route schema without an `as any` at every
475
+ * call site.
476
+ */
477
+ [key: string]: unknown;
478
+ }
479
+ /**
480
+ * Protocol keys every config UPDATE accepts, whichever object it is.
481
+ *
482
+ * `expectedModifiedAt` is the optimistic-concurrency token `sync push` attaches
483
+ * to an update body when it has a baseline from the last pull; a handler that
484
+ * does not implement conflict detection ignores it. It is a property of the
485
+ * sync protocol rather than of any one object, which is why it is stated once
486
+ * here instead of in thirteen definitions.
487
+ */
488
+ export declare const UPDATE_PROTOCOL_KEYS: readonly string[];
489
+ /** The body keys this table accepts in `mode`, in a stable order. */
490
+ export declare function requestSchemaKeys(table: ConfigTable, mode: "create" | "update"): string[];
491
+ /**
492
+ * The request schema for one object and mode. Generated from the definition, so
493
+ * a schema permitting a key the definition does not is unrepresentable: there
494
+ * is no place to write one.
495
+ */
496
+ export declare function configRequestSchema(table: ConfigTable, mode: "create" | "update"): ConfigRequestSchema;
497
+ /**
498
+ * One schema for an endpoint whose body spans MORE than one table.
499
+ *
500
+ * `POST …/prompts` is the case: it creates the prompt AND seeds its first
501
+ * config, so the body carries `[prompt]` fields and `[[configs]]` fields
502
+ * together. Both halves still come from their definitions — this only says the
503
+ * endpoint accepts the union, in the one place that is true.
504
+ */
505
+ export declare function mergeRequestSchemas(...schemas: readonly ConfigRequestSchema[]): ConfigRequestSchema;
506
+ /**
507
+ * The body keys `table` does not accept in `mode` — the 400's subject.
508
+ *
509
+ * Used by the admin API, which has no request-schema middleware: its handlers
510
+ * call this directly so both APIs reject the same key set for the same object.
511
+ */
512
+ export declare function unknownRequestKeys(body: unknown, table: ConfigTable, mode: "create" | "update"): string[];
513
+ /** The 400 message naming the unknown key(s), shared by both APIs. */
514
+ export declare function unknownRequestKeysMessage(keys: readonly string[]): string;
515
+ export declare const WORKFLOW_SURFACE: ConfigObjectSurface;
516
+ export declare const PROMPT_SURFACE: ConfigObjectSurface;
517
+ export declare const INTEGRATION_SURFACE: ConfigObjectSurface;
518
+ export declare const WEBHOOK_SURFACE: ConfigObjectSurface;
519
+ export declare const CRON_TRIGGER_SURFACE: ConfigObjectSurface;
520
+ export declare const BLOB_BUCKET_SURFACE: ConfigObjectSurface;
521
+ export declare const EMAIL_TEMPLATE_SURFACE: ConfigObjectSurface;
522
+ export declare const DATABASE_TYPE_SURFACE: ConfigObjectSurface;
523
+ export declare const RULE_SET_SURFACE: ConfigObjectSurface;
524
+ export declare const GROUP_TYPE_CONFIG_SURFACE: ConfigObjectSurface;
525
+ export declare const COLLECTION_TYPE_CONFIG_SURFACE: ConfigObjectSurface;
526
+ export declare const METADATA_CATEGORY_CONFIG_SURFACE: ConfigObjectSurface;
527
+ /**
528
+ * The `transform` configuration object's definition (issue #2644, phase 3).
529
+ *
530
+ * Transforms are the one synced type with NO TOML field table: a transform is
531
+ * `transforms/<name>.rhai`, a Rhai source file, and its whole authored surface
532
+ * is the script body. `sync pull` writes the active `ScriptConfig`'s body and
533
+ * `sync push` sends it back; there is no key/value table to define, and the
534
+ * `Script` / `ScriptConfig` scalars around it (name, description, inputSchema,
535
+ * limits, status) are not authorable through the sync slot today.
536
+ *
537
+ * The entry exists so that is a DECISION rather than an absence. Criterion 3's
538
+ * registry guard reads `SYNC_RESOURCE_TYPES` and requires a surface per label;
539
+ * without this module `transform` would have to sit in an exemption list, which
540
+ * is precisely the "absent from a hand-written list" failure mode this epic
541
+ * exists to end.
542
+ */
543
+ export declare const TRANSFORM_SURFACE: ConfigObjectSurface;
544
+ export declare const TEST_CASE_SURFACE: ConfigObjectSurface;
545
+ export declare const APP_SETTINGS_SURFACE: ConfigObjectSurface;
546
+ /**
547
+ * The configuration-object registry (issue #2644).
548
+ *
549
+ * `CONFIG_SURFACES` holds one entry per synced configuration object type. The
550
+ * registry — not a per-type test — is what makes coverage follow from existing:
551
+ * `cli/tests/unit/config-surface-drift-guard.test.ts` reads the CLI's
552
+ * `SYNC_RESOURCE_TYPES` labels and fails when a label has no surface here.
553
+ *
554
+ * `CONFIG_SURFACES` is the write authority. `SYNC_RESOURCE_TYPES` keeps its
555
+ * documented role — directory/state/prune/diff layout metadata, explicitly "not
556
+ * a write framework" — and gains no write-surface fields; the two are
557
+ * cross-checked, not merged.
558
+ */
559
+ /**
560
+ * Every configuration object whose field surface is defined here.
561
+ *
562
+ * One entry per `SYNC_RESOURCE_TYPES` label, plus the two surfaces that
563
+ * round-trip without being a per-entity file: `app-settings` (`app.toml`) and
564
+ * `test-case` (`<key>.tests/`). Nothing that syncs sits outside the registry —
565
+ * `PENDING_MIGRATION`, the migration's temporary exemption list, is gone as of
566
+ * phase 3, so a new synced type has nowhere to be parked and fails the registry
567
+ * guard until it is defined (#2644 criterion 3).
568
+ */
569
+ export declare const CONFIG_SURFACES: readonly ConfigObjectSurface[];
570
+ /** The surface for a `SyncResourceType.label`, or undefined when unmigrated. */
571
+ export declare function getConfigSurface(label: string): ConfigObjectSurface | undefined;
572
+ /** One table of one surface, addressed by its TOML path. */
573
+ export declare function getConfigTable(label: string, tomlPath: readonly string[]): ConfigTable | undefined;
574
+ /**
575
+ * Every field of every `models.yaml` model a configuration-object definition
576
+ * names, in declaration order — the coverage guard's anchor (#2644 criterion 2).
577
+ */
578
+ export declare const GENERATED_CONFIG_MODEL_FIELDS: Readonly<Record<string, readonly string[]>>;