primitive-admin 1.2.0-alpha.8 → 1.3.0-alpha.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 (563) hide show
  1. package/README.md +258 -186
  2. package/assets/skill/skills/primitive-platform/SKILL.md +103 -29
  3. package/dist/bin/primitive.js +15 -89
  4. package/dist/bin/primitive.js.map +1 -1
  5. package/dist/src/commands/admins.js +80 -17
  6. package/dist/src/commands/admins.js.map +1 -1
  7. package/dist/src/commands/agent-sessions.d.ts +129 -0
  8. package/dist/src/commands/agent-sessions.js +532 -20
  9. package/dist/src/commands/agent-sessions.js.map +1 -1
  10. package/dist/src/commands/analytics.js +207 -155
  11. package/dist/src/commands/analytics.js.map +1 -1
  12. package/dist/src/commands/apps-children.d.ts +1 -1
  13. package/dist/src/commands/apps-children.js +56 -145
  14. package/dist/src/commands/apps-children.js.map +1 -1
  15. package/dist/src/commands/apps-transitions.d.ts +39 -0
  16. package/dist/src/commands/apps-transitions.js +198 -0
  17. package/dist/src/commands/apps-transitions.js.map +1 -0
  18. package/dist/src/commands/apps.d.ts +17 -0
  19. package/dist/src/commands/apps.js +108 -3
  20. package/dist/src/commands/apps.js.map +1 -1
  21. package/dist/src/commands/auth-sessions.js +2 -0
  22. package/dist/src/commands/auth-sessions.js.map +1 -1
  23. package/dist/src/commands/auth.js +138 -44
  24. package/dist/src/commands/auth.js.map +1 -1
  25. package/dist/src/commands/blob-buckets.js +2 -0
  26. package/dist/src/commands/blob-buckets.js.map +1 -1
  27. package/dist/src/commands/collections.js +318 -256
  28. package/dist/src/commands/collections.js.map +1 -1
  29. package/dist/src/commands/comparisons.js +2 -0
  30. package/dist/src/commands/comparisons.js.map +1 -1
  31. package/dist/src/commands/config.d.ts +2 -2
  32. package/dist/src/commands/config.js +59 -33
  33. package/dist/src/commands/config.js.map +1 -1
  34. package/dist/src/commands/connections.js +2 -0
  35. package/dist/src/commands/connections.js.map +1 -1
  36. package/dist/src/commands/database-type-configs.js +5 -3
  37. package/dist/src/commands/database-type-configs.js.map +1 -1
  38. package/dist/src/commands/database-types.js +13 -313
  39. package/dist/src/commands/database-types.js.map +1 -1
  40. package/dist/src/commands/databases.js +6 -4
  41. package/dist/src/commands/databases.js.map +1 -1
  42. package/dist/src/commands/db3-types.d.ts +15 -0
  43. package/dist/src/commands/db3-types.js +159 -0
  44. package/dist/src/commands/db3-types.js.map +1 -0
  45. package/dist/src/commands/db3.d.ts +24 -0
  46. package/dist/src/commands/db3.js +1444 -0
  47. package/dist/src/commands/db3.js.map +1 -0
  48. package/dist/src/commands/documents.d.ts +110 -10
  49. package/dist/src/commands/documents.js +1012 -748
  50. package/dist/src/commands/documents.js.map +1 -1
  51. package/dist/src/commands/email-templates.js +74 -0
  52. package/dist/src/commands/email-templates.js.map +1 -1
  53. package/dist/src/commands/env.js +8 -4
  54. package/dist/src/commands/env.js.map +1 -1
  55. package/dist/src/commands/function-trigger-commands.d.ts +28 -0
  56. package/dist/src/commands/function-trigger-commands.js +341 -0
  57. package/dist/src/commands/function-trigger-commands.js.map +1 -0
  58. package/dist/src/commands/functions.js +376 -30
  59. package/dist/src/commands/functions.js.map +1 -1
  60. package/dist/src/commands/groups.js +168 -50
  61. package/dist/src/commands/groups.js.map +1 -1
  62. package/dist/src/commands/guides.js +7 -5
  63. package/dist/src/commands/guides.js.map +1 -1
  64. package/dist/src/commands/hosting.d.ts +8 -0
  65. package/dist/src/commands/hosting.js +346 -0
  66. package/dist/src/commands/hosting.js.map +1 -0
  67. package/dist/src/commands/init.js +129 -38
  68. package/dist/src/commands/init.js.map +1 -1
  69. package/dist/src/commands/integrations.js +82 -53
  70. package/dist/src/commands/integrations.js.map +1 -1
  71. package/dist/src/commands/llm.js +9 -6
  72. package/dist/src/commands/llm.js.map +1 -1
  73. package/dist/src/commands/locks.d.ts +5 -3
  74. package/dist/src/commands/locks.js +19 -61
  75. package/dist/src/commands/locks.js.map +1 -1
  76. package/dist/src/commands/metadata-category-configs.d.ts +2 -2
  77. package/dist/src/commands/metadata-category-configs.js +4 -2
  78. package/dist/src/commands/metadata-category-configs.js.map +1 -1
  79. package/dist/src/commands/metadata.js +41 -0
  80. package/dist/src/commands/metadata.js.map +1 -1
  81. package/dist/src/commands/prompts.js +75 -52
  82. package/dist/src/commands/prompts.js.map +1 -1
  83. package/dist/src/commands/rate-counters.d.ts +19 -0
  84. package/dist/src/commands/rate-counters.js +104 -0
  85. package/dist/src/commands/rate-counters.js.map +1 -0
  86. package/dist/src/commands/rule-sets.d.ts +1 -1
  87. package/dist/src/commands/rule-sets.js +2 -1
  88. package/dist/src/commands/rule-sets.js.map +1 -1
  89. package/dist/src/commands/schemas.d.ts +15 -0
  90. package/dist/src/commands/schemas.js +122 -0
  91. package/dist/src/commands/schemas.js.map +1 -0
  92. package/dist/src/commands/scripts.d.ts +9 -17
  93. package/dist/src/commands/scripts.js +24 -479
  94. package/dist/src/commands/scripts.js.map +1 -1
  95. package/dist/src/commands/secrets.js +47 -3
  96. package/dist/src/commands/secrets.js.map +1 -1
  97. package/dist/src/commands/sessions.js +2 -0
  98. package/dist/src/commands/sessions.js.map +1 -1
  99. package/dist/src/commands/settings.d.ts +12 -9
  100. package/dist/src/commands/settings.js +31 -79
  101. package/dist/src/commands/settings.js.map +1 -1
  102. package/dist/src/commands/skill.js +2 -0
  103. package/dist/src/commands/skill.js.map +1 -1
  104. package/dist/src/commands/sync-schemas.d.ts +202 -0
  105. package/dist/src/commands/sync-schemas.js +629 -0
  106. package/dist/src/commands/sync-schemas.js.map +1 -0
  107. package/dist/src/commands/sync-user-properties.d.ts +118 -0
  108. package/dist/src/commands/sync-user-properties.js +276 -0
  109. package/dist/src/commands/sync-user-properties.js.map +1 -0
  110. package/dist/src/commands/sync.d.ts +519 -554
  111. package/dist/src/commands/sync.js +3010 -4909
  112. package/dist/src/commands/sync.js.map +1 -1
  113. package/dist/src/commands/tokens.js +5 -3
  114. package/dist/src/commands/tokens.js.map +1 -1
  115. package/dist/src/commands/transitions.d.ts +54 -0
  116. package/dist/src/commands/transitions.js +418 -0
  117. package/dist/src/commands/transitions.js.map +1 -0
  118. package/dist/src/commands/usage.d.ts +18 -0
  119. package/dist/src/commands/usage.js +343 -0
  120. package/dist/src/commands/usage.js.map +1 -0
  121. package/dist/src/commands/user-properties.d.ts +14 -0
  122. package/dist/src/commands/user-properties.js +79 -0
  123. package/dist/src/commands/user-properties.js.map +1 -0
  124. package/dist/src/commands/users.js +911 -18
  125. package/dist/src/commands/users.js.map +1 -1
  126. package/dist/src/commands/vars.js +2 -0
  127. package/dist/src/commands/vars.js.map +1 -1
  128. package/dist/src/commands/waitlist.js +39 -4
  129. package/dist/src/commands/waitlist.js.map +1 -1
  130. package/dist/src/commands/workflows.d.ts +5 -83
  131. package/dist/src/commands/workflows.js +57 -2282
  132. package/dist/src/commands/workflows.js.map +1 -1
  133. package/dist/src/lib/analytics-query.d.ts +58 -0
  134. package/dist/src/lib/analytics-query.js +134 -0
  135. package/dist/src/lib/analytics-query.js.map +1 -0
  136. package/dist/src/lib/api-client.d.ts +1830 -429
  137. package/dist/src/lib/api-client.js +1025 -546
  138. package/dist/src/lib/api-client.js.map +1 -1
  139. package/dist/src/lib/app-settings-descriptor.d.ts +1 -1
  140. package/dist/src/lib/app-settings-descriptor.js +6 -0
  141. package/dist/src/lib/app-settings-descriptor.js.map +1 -1
  142. package/dist/src/lib/auth-fixtures.d.ts +44 -0
  143. package/dist/src/lib/auth-fixtures.js +61 -0
  144. package/dist/src/lib/auth-fixtures.js.map +1 -0
  145. package/dist/src/lib/auth-flow.d.ts +34 -1
  146. package/dist/src/lib/auth-flow.js +429 -13
  147. package/dist/src/lib/auth-flow.js.map +1 -1
  148. package/dist/src/lib/block-layout.d.ts +12 -23
  149. package/dist/src/lib/block-layout.js +26 -92
  150. package/dist/src/lib/block-layout.js.map +1 -1
  151. package/dist/src/lib/block-selector.d.ts +8 -14
  152. package/dist/src/lib/block-selector.js +8 -19
  153. package/dist/src/lib/block-selector.js.map +1 -1
  154. package/dist/src/lib/child-apps-local.d.ts +3 -47
  155. package/dist/src/lib/child-apps-local.js +11 -73
  156. package/dist/src/lib/child-apps-local.js.map +1 -1
  157. package/dist/src/lib/cli-manifest.d.ts +9 -0
  158. package/dist/src/lib/cli-manifest.js +10 -1
  159. package/dist/src/lib/cli-manifest.js.map +1 -1
  160. package/dist/src/lib/cli-version.d.ts +14 -0
  161. package/dist/src/lib/cli-version.js +38 -0
  162. package/dist/src/lib/cli-version.js.map +1 -0
  163. package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
  164. package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
  165. package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
  166. package/dist/src/lib/collection-export.d.ts +76 -15
  167. package/dist/src/lib/collection-export.js +116 -23
  168. package/dist/src/lib/collection-export.js.map +1 -1
  169. package/dist/src/lib/collection-principal.d.ts +22 -0
  170. package/dist/src/lib/collection-principal.js +35 -0
  171. package/dist/src/lib/collection-principal.js.map +1 -0
  172. package/dist/src/lib/command-groups.d.ts +30 -0
  173. package/dist/src/lib/command-groups.js +109 -0
  174. package/dist/src/lib/command-groups.js.map +1 -0
  175. package/dist/src/lib/command-status.d.ts +147 -0
  176. package/dist/src/lib/command-status.js +266 -0
  177. package/dist/src/lib/command-status.js.map +1 -0
  178. package/dist/src/lib/config-object-descriptor.d.ts +9 -22
  179. package/dist/src/lib/config-object-descriptor.js +107 -276
  180. package/dist/src/lib/config-object-descriptor.js.map +1 -1
  181. package/dist/src/lib/config-surface.d.ts +3 -7
  182. package/dist/src/lib/config-surface.js +9 -13
  183. package/dist/src/lib/config-surface.js.map +1 -1
  184. package/dist/src/lib/config-toml.d.ts +11 -2
  185. package/dist/src/lib/config-toml.js +25 -2
  186. package/dist/src/lib/config-toml.js.map +1 -1
  187. package/dist/src/lib/credentials-home.d.ts +7 -0
  188. package/dist/src/lib/credentials-home.js +45 -10
  189. package/dist/src/lib/credentials-home.js.map +1 -1
  190. package/dist/src/lib/credentials-lock.d.ts +14 -6
  191. package/dist/src/lib/credentials-lock.js +90 -10
  192. package/dist/src/lib/credentials-lock.js.map +1 -1
  193. package/dist/src/lib/credentials-store.d.ts +123 -70
  194. package/dist/src/lib/credentials-store.js +358 -113
  195. package/dist/src/lib/credentials-store.js.map +1 -1
  196. package/dist/src/lib/custodian.d.ts +8 -0
  197. package/dist/src/lib/custodian.js +18 -0
  198. package/dist/src/lib/custodian.js.map +1 -0
  199. package/dist/src/lib/data-input.d.ts +1 -1
  200. package/dist/src/lib/data-input.js +1 -1
  201. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
  202. package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
  203. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
  204. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +38 -1
  205. package/dist/src/lib/db-codegen/dbTypeIR.js +29 -7
  206. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
  207. package/dist/src/lib/db-type-records.d.ts +106 -0
  208. package/dist/src/lib/db-type-records.js +224 -0
  209. package/dist/src/lib/db-type-records.js.map +1 -0
  210. package/dist/src/lib/db3-export.d.ts +287 -0
  211. package/dist/src/lib/db3-export.js +647 -0
  212. package/dist/src/lib/db3-export.js.map +1 -0
  213. package/dist/src/lib/db3-index-output.d.ts +116 -0
  214. package/dist/src/lib/db3-index-output.js +223 -0
  215. package/dist/src/lib/db3-index-output.js.map +1 -0
  216. package/dist/src/lib/db3-type-models.d.ts +134 -0
  217. package/dist/src/lib/db3-type-models.js +452 -0
  218. package/dist/src/lib/db3-type-models.js.map +1 -0
  219. package/dist/src/lib/deprecation.d.ts +2 -2
  220. package/dist/src/lib/deprecation.js +2 -2
  221. package/dist/src/lib/document-ingest-artifact.d.ts +13 -0
  222. package/dist/src/lib/document-ingest-artifact.js +36 -6
  223. package/dist/src/lib/document-ingest-artifact.js.map +1 -1
  224. package/dist/src/lib/document-ingest-format2.d.ts +36 -0
  225. package/dist/src/lib/document-ingest-format2.js +78 -0
  226. package/dist/src/lib/document-ingest-format2.js.map +1 -0
  227. package/dist/src/lib/document-ingest-input.d.ts +9 -0
  228. package/dist/src/lib/document-ingest-input.js +28 -1
  229. package/dist/src/lib/document-ingest-input.js.map +1 -1
  230. package/dist/src/lib/document-ingest.d.ts +11 -1
  231. package/dist/src/lib/document-ingest.js +16 -0
  232. package/dist/src/lib/document-ingest.js.map +1 -1
  233. package/dist/src/lib/document-schema-rows.d.ts +42 -0
  234. package/dist/src/lib/document-schema-rows.js +53 -0
  235. package/dist/src/lib/document-schema-rows.js.map +1 -0
  236. package/dist/src/lib/experimental-apis.d.ts +36 -0
  237. package/dist/src/lib/experimental-apis.js +46 -0
  238. package/dist/src/lib/experimental-apis.js.map +1 -0
  239. package/dist/src/lib/file-attachment.d.ts +24 -0
  240. package/dist/src/lib/file-attachment.js +31 -0
  241. package/dist/src/lib/file-attachment.js.map +1 -0
  242. package/dist/src/lib/function-authorize-check.d.ts +142 -0
  243. package/dist/src/lib/function-authorize-check.js +311 -0
  244. package/dist/src/lib/function-authorize-check.js.map +1 -0
  245. package/dist/src/lib/function-authorize-view.d.ts +27 -0
  246. package/dist/src/lib/function-authorize-view.js +88 -0
  247. package/dist/src/lib/function-authorize-view.js.map +1 -0
  248. package/dist/src/lib/function-bundle.d.ts +27 -5
  249. package/dist/src/lib/function-bundle.js +142 -7
  250. package/dist/src/lib/function-bundle.js.map +1 -1
  251. package/dist/src/lib/function-collect.d.ts +90 -12
  252. package/dist/src/lib/function-collect.js +482 -12
  253. package/dist/src/lib/function-collect.js.map +1 -1
  254. package/dist/src/lib/function-db-types.d.ts +65 -11
  255. package/dist/src/lib/function-db-types.js +297 -157
  256. package/dist/src/lib/function-db-types.js.map +1 -1
  257. package/dist/src/lib/function-document-types.d.ts +19 -7
  258. package/dist/src/lib/function-document-types.js +24 -12
  259. package/dist/src/lib/function-document-types.js.map +1 -1
  260. package/dist/src/lib/function-lint.d.ts +57 -0
  261. package/dist/src/lib/function-lint.js +234 -0
  262. package/dist/src/lib/function-lint.js.map +1 -0
  263. package/dist/src/lib/function-log-row.js +21 -2
  264. package/dist/src/lib/function-log-row.js.map +1 -1
  265. package/dist/src/lib/function-run.d.ts +13 -21
  266. package/dist/src/lib/function-run.js +14 -27
  267. package/dist/src/lib/function-run.js.map +1 -1
  268. package/dist/src/lib/function-schema-codegen.d.ts +86 -22
  269. package/dist/src/lib/function-schema-codegen.js +194 -88
  270. package/dist/src/lib/function-schema-codegen.js.map +1 -1
  271. package/dist/src/lib/function-schema-refs.d.ts +98 -0
  272. package/dist/src/lib/function-schema-refs.js +177 -0
  273. package/dist/src/lib/function-schema-refs.js.map +1 -0
  274. package/dist/src/lib/function-sync.d.ts +109 -6
  275. package/dist/src/lib/function-sync.js +179 -26
  276. package/dist/src/lib/function-sync.js.map +1 -1
  277. package/dist/src/lib/function-trigger-listing.d.ts +11 -6
  278. package/dist/src/lib/function-trigger-listing.js +32 -11
  279. package/dist/src/lib/function-trigger-listing.js.map +1 -1
  280. package/dist/src/lib/function-triggers.d.ts +15 -3
  281. package/dist/src/lib/function-triggers.js +72 -10
  282. package/dist/src/lib/function-triggers.js.map +1 -1
  283. package/dist/src/lib/function-typecheck.d.ts +52 -0
  284. package/dist/src/lib/function-typecheck.js +174 -54
  285. package/dist/src/lib/function-typecheck.js.map +1 -1
  286. package/dist/src/lib/function-versions.d.ts +2 -0
  287. package/dist/src/lib/function-versions.js +1 -0
  288. package/dist/src/lib/function-versions.js.map +1 -1
  289. package/dist/src/lib/generated-build-flags.d.ts +13 -0
  290. package/dist/src/lib/generated-build-flags.js +14 -0
  291. package/dist/src/lib/generated-build-flags.js.map +1 -0
  292. package/dist/src/lib/generated-command-status.d.ts +6 -0
  293. package/dist/src/lib/generated-command-status.js +469 -0
  294. package/dist/src/lib/generated-command-status.js.map +1 -0
  295. package/dist/src/lib/generated-config-surfaces.d.ts +586 -152
  296. package/dist/src/lib/generated-config-surfaces.js +1919 -1883
  297. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  298. package/dist/src/lib/generated-sdk-types.d.ts +1 -1
  299. package/dist/src/lib/generated-sdk-types.js +1 -1
  300. package/dist/src/lib/generated-sdk-types.js.map +1 -1
  301. package/dist/src/lib/generated-workflow-model-fields.d.ts +20 -0
  302. package/dist/src/lib/generated-workflow-model-fields.js +53 -0
  303. package/dist/src/lib/generated-workflow-model-fields.js.map +1 -0
  304. package/dist/src/lib/hosting-build.d.ts +97 -0
  305. package/dist/src/lib/hosting-build.js +204 -0
  306. package/dist/src/lib/hosting-build.js.map +1 -0
  307. package/dist/src/lib/hosting-client.d.ts +167 -0
  308. package/dist/src/lib/hosting-client.js +340 -0
  309. package/dist/src/lib/hosting-client.js.map +1 -0
  310. package/dist/src/lib/hosting-environments.d.ts +32 -0
  311. package/dist/src/lib/hosting-environments.js +74 -0
  312. package/dist/src/lib/hosting-environments.js.map +1 -0
  313. package/dist/src/lib/hosting-errors.d.ts +30 -0
  314. package/dist/src/lib/hosting-errors.js +43 -0
  315. package/dist/src/lib/hosting-errors.js.map +1 -0
  316. package/dist/src/lib/hosting-token.d.ts +46 -0
  317. package/dist/src/lib/hosting-token.js +60 -0
  318. package/dist/src/lib/hosting-token.js.map +1 -0
  319. package/dist/src/lib/hosting-wait.d.ts +42 -0
  320. package/dist/src/lib/hosting-wait.js +84 -0
  321. package/dist/src/lib/hosting-wait.js.map +1 -0
  322. package/dist/src/lib/hosting-wfp-upload.d.ts +86 -0
  323. package/dist/src/lib/hosting-wfp-upload.js +149 -0
  324. package/dist/src/lib/hosting-wfp-upload.js.map +1 -0
  325. package/dist/src/lib/init-assets.d.ts +2 -6
  326. package/dist/src/lib/init-assets.js +11 -27
  327. package/dist/src/lib/init-assets.js.map +1 -1
  328. package/dist/src/lib/init-ios-links.d.ts +11 -7
  329. package/dist/src/lib/init-ios-links.js +28 -22
  330. package/dist/src/lib/init-ios-links.js.map +1 -1
  331. package/dist/src/lib/init-login-note.d.ts +13 -0
  332. package/dist/src/lib/init-login-note.js +22 -0
  333. package/dist/src/lib/init-login-note.js.map +1 -0
  334. package/dist/src/lib/init-schema.d.ts +15 -0
  335. package/dist/src/lib/init-schema.js +54 -0
  336. package/dist/src/lib/init-schema.js.map +1 -1
  337. package/dist/src/lib/integration-test-request.d.ts +54 -0
  338. package/dist/src/lib/integration-test-request.js +207 -0
  339. package/dist/src/lib/integration-test-request.js.map +1 -0
  340. package/dist/src/lib/invoker-shared-enums.d.ts +35 -0
  341. package/dist/src/lib/invoker-shared-enums.js +98 -0
  342. package/dist/src/lib/invoker-shared-enums.js.map +1 -0
  343. package/dist/src/lib/json-value.d.ts +6 -0
  344. package/dist/src/lib/json-value.js +13 -0
  345. package/dist/src/lib/json-value.js.map +1 -0
  346. package/dist/src/lib/load-routes.d.ts +33 -0
  347. package/dist/src/lib/load-routes.js +35 -0
  348. package/dist/src/lib/load-routes.js.map +1 -0
  349. package/dist/src/lib/log-inspection.d.ts +23 -4
  350. package/dist/src/lib/log-inspection.js +14 -5
  351. package/dist/src/lib/log-inspection.js.map +1 -1
  352. package/dist/src/lib/login-exchange-check.d.ts +18 -0
  353. package/dist/src/lib/login-exchange-check.js +27 -0
  354. package/dist/src/lib/login-exchange-check.js.map +1 -0
  355. package/dist/src/lib/login-scope-lines.d.ts +17 -7
  356. package/dist/src/lib/login-scope-lines.js +33 -10
  357. package/dist/src/lib/login-scope-lines.js.map +1 -1
  358. package/dist/src/lib/metadata-report.d.ts +85 -0
  359. package/dist/src/lib/metadata-report.js +81 -0
  360. package/dist/src/lib/metadata-report.js.map +1 -0
  361. package/dist/src/lib/object-status-filter.d.ts +9 -1
  362. package/dist/src/lib/object-status-filter.js +9 -1
  363. package/dist/src/lib/object-status-filter.js.map +1 -1
  364. package/dist/src/lib/output.d.ts +1 -1
  365. package/dist/src/lib/output.js +3 -1
  366. package/dist/src/lib/output.js.map +1 -1
  367. package/dist/src/lib/pin-refusal-hint.d.ts +12 -0
  368. package/dist/src/lib/pin-refusal-hint.js +35 -0
  369. package/dist/src/lib/pin-refusal-hint.js.map +1 -0
  370. package/dist/src/lib/platform-owned.js +5 -0
  371. package/dist/src/lib/platform-owned.js.map +1 -1
  372. package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
  373. package/dist/src/lib/primitive-declaration-names.js +22 -0
  374. package/dist/src/lib/primitive-declaration-names.js.map +1 -0
  375. package/dist/src/lib/primitive-declaration.d.ts +174 -0
  376. package/dist/src/lib/primitive-declaration.js +792 -0
  377. package/dist/src/lib/primitive-declaration.js.map +1 -0
  378. package/dist/src/lib/primitive-env-plugin.d.ts +99 -0
  379. package/dist/src/lib/primitive-env-plugin.js +408 -0
  380. package/dist/src/lib/primitive-env-plugin.js.map +1 -0
  381. package/dist/src/lib/project-login-apps.d.ts +8 -0
  382. package/dist/src/lib/project-login-apps.js +27 -0
  383. package/dist/src/lib/project-login-apps.js.map +1 -0
  384. package/dist/src/lib/prompt-schema-codegen.d.ts +46 -15
  385. package/dist/src/lib/prompt-schema-codegen.js +142 -108
  386. package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
  387. package/dist/src/lib/prompt-schema-document.d.ts +35 -0
  388. package/dist/src/lib/prompt-schema-document.js +92 -0
  389. package/dist/src/lib/prompt-schema-document.js.map +1 -0
  390. package/dist/src/lib/prompt-schema-refs.d.ts +173 -0
  391. package/dist/src/lib/prompt-schema-refs.js +478 -0
  392. package/dist/src/lib/prompt-schema-refs.js.map +1 -0
  393. package/dist/src/lib/records-verbs.d.ts +79 -0
  394. package/dist/src/lib/records-verbs.js +45 -0
  395. package/dist/src/lib/records-verbs.js.map +1 -0
  396. package/dist/src/lib/register-commands.d.ts +36 -0
  397. package/dist/src/lib/register-commands.js +37 -0
  398. package/dist/src/lib/register-commands.js.map +1 -0
  399. package/dist/src/lib/retired-imports.d.ts +53 -0
  400. package/dist/src/lib/retired-imports.js +120 -0
  401. package/dist/src/lib/retired-imports.js.map +1 -0
  402. package/dist/src/lib/run-status.d.ts +1 -1
  403. package/dist/src/lib/run-status.generated.d.ts +2 -2
  404. package/dist/src/lib/run-status.generated.js +3 -1
  405. package/dist/src/lib/run-status.generated.js.map +1 -1
  406. package/dist/src/lib/run-status.js +1 -1
  407. package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
  408. package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
  409. package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
  410. package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
  411. package/dist/src/lib/schema-codegen/generated-db3-bridge.js +227 -0
  412. package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
  413. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
  414. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
  415. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
  416. package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +218 -0
  417. package/dist/src/lib/schema-codegen/generated-field-grammar.js +397 -0
  418. package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
  419. package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
  420. package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
  421. package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
  422. package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
  423. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
  424. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
  425. package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +258 -0
  426. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +422 -0
  427. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -0
  428. package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
  429. package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
  430. package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
  431. package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
  432. package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
  433. package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
  434. package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
  435. package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
  436. package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
  437. package/dist/src/lib/schema-codegen/generated-schema-shape.d.ts +27 -0
  438. package/dist/src/lib/schema-codegen/generated-schema-shape.js +126 -0
  439. package/dist/src/lib/schema-codegen/generated-schema-shape.js.map +1 -0
  440. package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
  441. package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
  442. package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
  443. package/dist/src/lib/schema-codegen/naming.d.ts +35 -0
  444. package/dist/src/lib/schema-codegen/naming.js +83 -0
  445. package/dist/src/lib/schema-codegen/naming.js.map +1 -0
  446. package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
  447. package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
  448. package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
  449. package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
  450. package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
  451. package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
  452. package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
  453. package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
  454. package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
  455. package/dist/src/lib/schema-codegen/schemaToTs.d.ts +109 -0
  456. package/dist/src/lib/schema-codegen/schemaToTs.js +269 -0
  457. package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -0
  458. package/dist/src/lib/schema-codegen/valuesLists.d.ts +48 -0
  459. package/dist/src/lib/schema-codegen/valuesLists.js +144 -0
  460. package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
  461. package/dist/src/lib/schema-family-index.d.ts +228 -0
  462. package/dist/src/lib/schema-family-index.js +813 -0
  463. package/dist/src/lib/schema-family-index.js.map +1 -0
  464. package/dist/src/lib/schema-pins.d.ts +82 -0
  465. package/dist/src/lib/schema-pins.js +198 -0
  466. package/dist/src/lib/schema-pins.js.map +1 -0
  467. package/dist/src/lib/schema-preview.d.ts +244 -0
  468. package/dist/src/lib/schema-preview.js +498 -0
  469. package/dist/src/lib/schema-preview.js.map +1 -0
  470. package/dist/src/lib/scope-request.d.ts +23 -11
  471. package/dist/src/lib/scope-request.js +69 -31
  472. package/dist/src/lib/scope-request.js.map +1 -1
  473. package/dist/src/lib/session-scope.d.ts +26 -0
  474. package/dist/src/lib/session-scope.js +58 -0
  475. package/dist/src/lib/session-scope.js.map +1 -0
  476. package/dist/src/lib/skill-installer.d.ts +2 -2
  477. package/dist/src/lib/skill-installer.js +2 -21
  478. package/dist/src/lib/skill-installer.js.map +1 -1
  479. package/dist/src/lib/step-run-table.d.ts +1 -2
  480. package/dist/src/lib/step-run-table.js +1 -2
  481. package/dist/src/lib/step-run-table.js.map +1 -1
  482. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +8 -3
  483. package/dist/src/lib/swift-codegen/agentGenerator.js +76 -22
  484. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
  485. package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
  486. package/dist/src/lib/swift-codegen/banners.js +12 -0
  487. package/dist/src/lib/swift-codegen/banners.js.map +1 -1
  488. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
  489. package/dist/src/lib/swift-codegen/functionGenerator.js +169 -51
  490. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
  491. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +33 -9
  492. package/dist/src/lib/swift-codegen/schemaToSwift.js +215 -179
  493. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
  494. package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +45 -0
  495. package/dist/src/lib/swift-codegen/sharedGenerator.js +165 -0
  496. package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
  497. package/dist/src/lib/swift-codegen/swiftKeys.d.ts +19 -0
  498. package/dist/src/lib/swift-codegen/swiftKeys.js +31 -0
  499. package/dist/src/lib/swift-codegen/swiftKeys.js.map +1 -0
  500. package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
  501. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
  502. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
  503. package/dist/src/lib/sync-resource-types.d.ts +117 -31
  504. package/dist/src/lib/sync-resource-types.js +197 -189
  505. package/dist/src/lib/sync-resource-types.js.map +1 -1
  506. package/dist/src/lib/sync-selectors.d.ts +7 -0
  507. package/dist/src/lib/sync-selectors.js +22 -2
  508. package/dist/src/lib/sync-selectors.js.map +1 -1
  509. package/dist/src/lib/template.d.ts +39 -3
  510. package/dist/src/lib/template.js +103 -14
  511. package/dist/src/lib/template.js.map +1 -1
  512. package/dist/src/lib/test-case-file-names.d.ts +3 -5
  513. package/dist/src/lib/test-case-file-names.js +3 -5
  514. package/dist/src/lib/test-case-file-names.js.map +1 -1
  515. package/dist/src/lib/test-runs.d.ts +45 -0
  516. package/dist/src/lib/test-runs.js +150 -0
  517. package/dist/src/lib/test-runs.js.map +1 -0
  518. package/dist/src/lib/test-users.d.ts +25 -0
  519. package/dist/src/lib/test-users.js +36 -0
  520. package/dist/src/lib/test-users.js.map +1 -0
  521. package/dist/src/lib/toml-database-config.d.ts +4 -2
  522. package/dist/src/lib/toml-database-config.js +11 -6
  523. package/dist/src/lib/toml-database-config.js.map +1 -1
  524. package/dist/src/lib/toml-scalar-edit.js +6 -4
  525. package/dist/src/lib/toml-scalar-edit.js.map +1 -1
  526. package/dist/src/lib/transition-warnings.d.ts +21 -0
  527. package/dist/src/lib/transition-warnings.js +49 -0
  528. package/dist/src/lib/transition-warnings.js.map +1 -0
  529. package/dist/src/lib/user-index.d.ts +80 -0
  530. package/dist/src/lib/user-index.js +166 -0
  531. package/dist/src/lib/user-index.js.map +1 -0
  532. package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
  533. package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
  534. package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
  535. package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
  536. package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
  537. package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
  538. package/dist/src/lib/user-walk.d.ts +31 -0
  539. package/dist/src/lib/user-walk.js +102 -0
  540. package/dist/src/lib/user-walk.js.map +1 -0
  541. package/dist/src/lib/webhook-capture.d.ts +43 -0
  542. package/dist/src/lib/webhook-capture.js +91 -0
  543. package/dist/src/lib/webhook-capture.js.map +1 -0
  544. package/dist/src/lib/webhook-deliver.d.ts +18 -20
  545. package/dist/src/lib/webhook-deliver.js +34 -89
  546. package/dist/src/lib/webhook-deliver.js.map +1 -1
  547. package/dist/src/lib/webhook-test-run.d.ts +32 -0
  548. package/dist/src/lib/webhook-test-run.js +108 -0
  549. package/dist/src/lib/webhook-test-run.js.map +1 -0
  550. package/dist/src/lib/worker-perf-format.d.ts +22 -0
  551. package/dist/src/lib/worker-perf-format.js +27 -0
  552. package/dist/src/lib/worker-perf-format.js.map +1 -0
  553. package/dist/src/lib/workflow-field-descriptor.d.ts +91 -0
  554. package/dist/src/lib/workflow-field-descriptor.js +153 -0
  555. package/dist/src/lib/workflow-field-descriptor.js.map +1 -0
  556. package/dist/src/types/index.d.ts +20 -65
  557. package/dist/src/validators.d.ts +7 -55
  558. package/dist/src/validators.js +7 -53
  559. package/dist/src/validators.js.map +1 -1
  560. package/dist/src/vite.d.ts +17 -0
  561. package/dist/src/vite.js +18 -0
  562. package/dist/src/vite.js.map +1 -0
  563. package/package.json +20 -9
@@ -14,6 +14,7 @@
14
14
  * `cli/tests/unit/config-surface-drift-guard.test.ts`) fails if this committed
15
15
  * copy does not match the source.
16
16
  */
17
+ import { type GeminiKeywordVerdict } from "./schema-codegen/generated-schema-descriptor.js";
17
18
  /**
18
19
  * The one definition per configuration object (issue #2644).
19
20
  *
@@ -283,8 +284,7 @@ export type RuleStage = "preflight" | "apply";
283
284
  export type CrossFieldRuleStage = RuleStage;
284
285
  /**
285
286
  * One rule of a configuration object that spans more than one field — `durable
286
- * = true` beside a webhook trigger, `runAs = "system"` beside a non-empty
287
- * `accessRule`, an HMAC scheme with no `signingSecret`.
287
+ * = true` beside a webhook trigger, an HMAC scheme with no `signingSecret`.
288
288
  *
289
289
  * Such a rule belongs to no single field, so `ConfigField.validation` has
290
290
  * nowhere to put it; attaching it to one field arbitrarily would make the
@@ -362,8 +362,9 @@ export interface ConfigObjectSurface {
362
362
  * Declares that this object HAS no TOML field table, with the reason —
363
363
  * required when `tables` is empty and forbidden otherwise.
364
364
  *
365
- * `transform` is the case: a `.rhai` file's authored surface is the script
366
- * body, so there is no key/value table to define. Saying so here is the same
365
+ * `transform` was the case until it retired with the Rhai runtime (#3190): a
366
+ * `.rhai` file's authored surface was the script body, so there was no
367
+ * key/value table to define. Saying so here is the same
367
368
  * rule `notExposed` applies to a field, one level up: "absent from the
368
369
  * registry" and "deliberately fieldless" must not look the same (#2644
369
370
  * criterion 4).
@@ -455,8 +456,8 @@ export declare const DECLARED_ACCESS_MANIFEST_KEYS: Readonly<Record<string, NotE
455
456
  * accepts. What a present key MEANS stays with the per-field handler the
456
457
  * definition names (spec §Contracts, decision of record #1976): the workflow
457
458
  * `status` enum, the non-negative-integer coercion of the queue limits,
458
- * `runAs`'s caller|system check, `parseWorkflowLock`, the `capabilities` array
459
- * shape and the CEL parse of `accessRule` all stay where they are. The
459
+ * `runAs`'s caller|system check, `parseWorkflowLock` and the `capabilities`
460
+ * array shape all stay where they are. The
460
461
  * mechanical win is that a field can no longer be *absent* from the accepted
461
462
  * set.
462
463
  *
@@ -466,10 +467,11 @@ export type WriteMode = "create" | "update";
466
467
  /** The field names this table accepts on the wire in `mode`, in declaration order. */
467
468
  export declare function writableFieldNames(table: ConfigTable, mode: WriteMode): string[];
468
469
  /**
469
- * The field names the server PERSISTS for this table in `mode`: the writable
470
- * fields, plus the `deprecated` classifications — "still writable, superseded
471
- * by another field" is what that kind means (`types.ts`), so a superseded key
472
- * a handler still honors (`passkeyRpId`) belongs in every accepted set, and a
470
+ * The field names the server ACCEPTS for this table in `mode`: the writable
471
+ * fields, plus the `deprecated` classifications — "still accepted, superseded
472
+ * or scheduled for removal" is what that kind means (`types.ts`), so a
473
+ * superseded key a handler still honors (`protected`) and a retired one it
474
+ * accepts and ignores (`accessRule`, #4872) belong in every accepted set, and a
473
475
  * field that is NOT writable belongs in none of them.
474
476
  *
475
477
  * Stated once here because three consumers need the same answer: the generated
@@ -980,11 +982,11 @@ export declare function findUnreachedPreflightRules(surface: ConfigObjectSurface
980
982
  *
981
983
  * ── What the schema says, and what it deliberately does not ──────────────
982
984
  * It states the KEY SET only: each property is the empty schema (or carries
983
- * only the `deprecated` annotation, #1815), so no value is type-checked here. That is the decision of record (#1976, carried forward at
984
- * #2644's design gate): the definition classifies, handlers behave. The
985
- * `status` enum, the queue limits' integer coercion, `runAs`'s caller|system
986
- * check, the CEL parse of `accessRule` — all stay in the handlers the
987
- * definition names, with their existing messages. Adding type gates here would
985
+ * only the `deprecated` annotation, #1815), so no value is type-checked here.
986
+ * That is the decision of record (#1976, carried forward at #2644's design
987
+ * gate): the definition classifies, handlers behave. The `status` enum, the
988
+ * queue limits' integer coercion, the CEL parse of a rule set's expressions —
989
+ * all stay in the handlers the definition names, with their existing messages. Adding type gates here would
988
990
  * duplicate them and start rejecting values the handlers accept.
989
991
  *
990
992
  * ── Which keys are in the set ────────────────────────────────────────────
@@ -1017,7 +1019,8 @@ export interface ConfigRequestSchema {
1017
1019
  type: "object";
1018
1020
  /**
1019
1021
  * Each property is the empty schema, or `{ deprecated: true }` for a field
1020
- * the definition marks `deprecated` (#1815). `deprecated` is an OpenAPI
1022
+ * the definition marks `deprecated` (#1815) or a key `notExposed` classifies
1023
+ * `deprecated` (#4872). `deprecated` is an OpenAPI
1021
1024
  * annotation: it constrains no value, so the schema still states the key set
1022
1025
  * and nothing more.
1023
1026
  */
@@ -1089,7 +1092,7 @@ export declare function unknownRequestKeysMessage(keys: readonly string[]): stri
1089
1092
  * retired key: the TOML wording for `config push` (which can tell the author to
1090
1093
  * delete a line) and the request wording for the API handlers (which cannot).
1091
1094
  *
1092
- * Keyed by the table's TOML path prefix (`workflow`, `cronTrigger`, …), because
1095
+ * Keyed by the table's TOML path prefix (`integration`, `prompt`, …), because
1093
1096
  * that is the identifier both consumers already have in hand.
1094
1097
  *
1095
1098
  * Pure: no models, no tenant context, no `env` (see `types.ts` §Purity).
@@ -1101,6 +1104,51 @@ export interface RetiredConfigKey {
1101
1104
  request: string;
1102
1105
  }
1103
1106
  export declare const RETIRED_CONFIG_KEYS: Record<string, Record<string, RetiredConfigKey>>;
1107
+ /**
1108
+ * Keys DEPRECATED on a configuration object's write surface: still accepted
1109
+ * in TOML and on the wire, ignored, and scheduled for removal.
1110
+ *
1111
+ * A deprecated key sits between a live field and a retired one. The table
1112
+ * classifies it `deprecated` in both `notExposed` (so a body that still sends
1113
+ * it is accepted) and `tomlOnlyKeys` (so a file that still carries it
1114
+ * validates); this registry holds the one sentence `config push` prints for a
1115
+ * file that carries it, and is what `config pull` keys its forced rewrite on,
1116
+ * so the pull the sentence names removes the line.
1117
+ *
1118
+ * Keyed by the table's TOML path prefix, like `RETIRED_CONFIG_KEYS`. The
1119
+ * scheduled break moves an entry from here to that map.
1120
+ */
1121
+ export interface DeprecatedConfigKey {
1122
+ /** What `config push` says, once per file, about a file that carries the key. */
1123
+ toml: string;
1124
+ }
1125
+ export declare const DEPRECATED_CONFIG_KEYS: Record<string, Record<string, DeprecatedConfigKey>>;
1126
+ /** The deprecated-key entry for `key` under `prefix`, or null when it is not deprecated. */
1127
+ export declare function deprecatedConfigKey(prefix: string, key: string): DeprecatedConfigKey | null;
1128
+ /**
1129
+ * Config-tree directories whose object type retired — #3190, server-functions
1130
+ * phase 7. The DSL engine, the Rhai runtime and the standalone webhook and
1131
+ * cron objects are gone, so `config push` refuses a tree that still holds one
1132
+ * of these directories, by name and before it writes anything, rather than
1133
+ * ignoring files an author still expects to take effect.
1134
+ *
1135
+ * Each entry is one sentence: what retired, what replaces it, and the docs page
1136
+ * that shows the replacement.
1137
+ */
1138
+ export declare const RETIRED_CONFIG_DIRECTORIES: Record<string, string>;
1139
+ /**
1140
+ * The type-config directories a config tree no longer has (#4731, project
1141
+ * `role-based-groups-collections`). Groups and collections have fixed roles,
1142
+ * so their per-type configuration retired with its routes; `config push`
1143
+ * refuses a tree that still holds a file in either, naming each file, rather
1144
+ * than ignoring files an author still expects to take effect. The rows the
1145
+ * server already stored are not touched.
1146
+ *
1147
+ * Each entry is one sentence: what retired, and what replaces it.
1148
+ */
1149
+ export declare const RETIRED_TYPE_CONFIG_DIRECTORIES: Record<string, string>;
1150
+ /** The retirement sentence for a config-tree directory, or null when it is live. */
1151
+ export declare function retiredConfigDirectory(dir: string): string | null;
1104
1152
  /**
1105
1153
  * Top-level TOML tables a configuration object's FILE retired — keyed by the
1106
1154
  * surface's label, then by the table key. Only the TOML half exists: these were
@@ -1131,10 +1179,29 @@ export interface RetiredTomlSpelling {
1131
1179
  */
1132
1180
  export declare const RETIRED_TOML_SPELLINGS: Record<string, Record<string, RetiredTomlSpelling>>;
1133
1181
  /**
1134
- * The TOML guidance for `key` under `prefix`: a fully retired key's, else a
1135
- * retired spelling's, else null when the key is simply unknown.
1182
+ * A key one surface refuses while another surface of the same TOML prefix
1183
+ * takes it: the prefix alone cannot pick the sentence.
1184
+ */
1185
+ export interface RetiredSurfaceTomlKey extends RetiredTomlSpelling {
1186
+ /**
1187
+ * An empty string is accepted and ignored rather than refused: the
1188
+ * placeholder every earlier `config pull` wrote, which a refusal would turn
1189
+ * into a failed first push of every existing tree.
1190
+ */
1191
+ emptyAccepted?: boolean;
1192
+ }
1193
+ /**
1194
+ * Guidance keyed by surface label, then TOML prefix, then key — consulted
1195
+ * before `RETIRED_CONFIG_KEYS` and `RETIRED_TOML_SPELLINGS` when the caller
1196
+ * knows the surface.
1136
1197
  */
1137
- export declare function retiredTomlKey(prefix: string, key: string): RetiredTomlSpelling | null;
1198
+ export declare const RETIRED_SURFACE_TOML_KEYS: Record<string, Record<string, Record<string, RetiredSurfaceTomlKey>>>;
1199
+ /**
1200
+ * The TOML guidance for `key` under `prefix`: the surface's own when
1201
+ * `surfaceLabel` names one, else a fully retired key's, else a retired
1202
+ * spelling's, else null when the key is simply unknown.
1203
+ */
1204
+ export declare function retiredTomlKey(prefix: string, key: string, surfaceLabel?: string): RetiredSurfaceTomlKey | null;
1138
1205
  /**
1139
1206
  * The capability grammar for server functions — #3182 phase 1, rewritten by
1140
1207
  * #3279 (project `server-functions` phase 3).
@@ -1157,7 +1224,10 @@ export declare function retiredTomlKey(prefix: string, key: string): RetiredToml
1157
1224
  * `secret:<NAME>` credential least privilege — which secret VALUES may
1158
1225
  * cross into the sandbox at all;
1159
1226
  * the high-blast list {@link HIGH_BLAST_CAPABILITIES} — the operations
1160
- * whose blast radius the intent keeps opt-in.
1227
+ * whose blast radius the intent keeps opt-in;
1228
+ * the subject grants {@link SUBJECT_GRANT_CAPABILITIES} — naming another
1229
+ * member on a call about one user, in a run a plain
1230
+ * member invoked.
1161
1231
  *
1162
1232
  * Every other string a function used to declare is RETIRED, and the grammar
1163
1233
  * says so by name: an author who still writes `database:orders/Order:read`
@@ -1210,15 +1280,44 @@ export declare const KEYED_GRANT_FAMILIES: readonly ["integration", "secret"];
1210
1280
  * other — `databases:create` is not permission to delete a database.
1211
1281
  *
1212
1282
  * The database ROLE mutations are here because they hand out persistent
1213
- * authority: a group grant assigns the manager role (D3279-003). App deletion
1283
+ * authority: a group grant assigns the manager role (D3279-003). A db3's sync
1284
+ * switch (`db3:setSync`, the intent's `db3-sync` grant) is here because
1285
+ * turning sync off suspends every grant on the db3 (#4799); a db3's transfer
1286
+ * and its owner-row change (`db3:transfer`, `db3:setOwnerRow`, the intent's
1287
+ * `db3-grant` grant) because they move who holds the db3 and its owner row
1288
+ * (#4800); its app access (`db3:setAppAccess`, the same grant's third string)
1289
+ * because it grants the db3 to every user of the app (#4801). App deletion
1214
1290
  * and secret writes have no app-API route today; they are recorded, not gated,
1215
1291
  * and the profile generator refuses to admit a future such route without a row
1216
1292
  * here (`HIGH_BLAST_WATCH` in `scripts/lib/function-profile.mjs`).
1217
1293
  */
1218
- export declare const HIGH_BLAST_CAPABILITIES: readonly ["databases:create", "databases:delete", "databases:transferOwnership", "databases:addManager", "databases:revokePermission", "databases:grantGroupPermission", "databases:revokeGroupPermission", "users:remove", "users:setRole", "blobBuckets:createBucket", "blobBuckets:deleteBucket"];
1219
- /** The exact strings, which since #3279 are exactly the high-blast list. */
1220
- export declare const EXACT_GRANT_STRINGS: readonly ["databases:create", "databases:delete", "databases:transferOwnership", "databases:addManager", "databases:revokePermission", "databases:grantGroupPermission", "databases:revokeGroupPermission", "users:remove", "users:setRole", "blobBuckets:createBucket", "blobBuckets:deleteBucket"];
1221
- export type GrantFamily = (typeof KEYED_GRANT_FAMILIES)[number] | "databases" | "users" | "blobBuckets";
1294
+ export declare const HIGH_BLAST_CAPABILITIES: readonly ["databases:create", "databases:delete", "databases:transferOwnership", "databases:addManager", "databases:revokePermission", "databases:grantGroupPermission", "databases:revokeGroupPermission", "users:remove", "users:setRole", "blobBuckets:createBucket", "blobBuckets:deleteBucket", "db3:setSync", "db3:transfer", "db3:setOwnerRow", "db3:setAppAccess"];
1295
+ /**
1296
+ * The subject grants — #4909.
1297
+ *
1298
+ * A run a plain member invoked may name nobody but its caller on a call that
1299
+ * is about one user (#4142's subject rule): `SUBJECT_USER_FORBIDDEN`. A
1300
+ * function whose own code chooses that user — a class's teacher removing a
1301
+ * student and reading where else the student is enrolled — declares it here,
1302
+ * in a line a reviewer can find:
1303
+ *
1304
+ * `users:readAny` the user-subject READS may name another member
1305
+ * (memberships, a member's collections, their db3s
1306
+ * (owned and shared), inbox, devices, agent sessions);
1307
+ * `users:actAsAny` the calls that ACT as a member may name another member
1308
+ * (marking their notifications read, their devices, an
1309
+ * agent session as them, `ctx.db3` `asUser`, their
1310
+ * aliases).
1311
+ *
1312
+ * Each admits only its own kind. Neither changes a run with no caller, an
1313
+ * owner- or admin-invoked run, or a run an agent drives (refused either way),
1314
+ * and a nested child reads its own version's. They are not high-blast rows:
1315
+ * those are 1:1 with an operation id, and these name a rule, not an operation.
1316
+ */
1317
+ export declare const SUBJECT_GRANT_CAPABILITIES: readonly ["users:readAny", "users:actAsAny"];
1318
+ /** The exact strings: the high-blast list and the subject grants. */
1319
+ export declare const EXACT_GRANT_STRINGS: readonly string[];
1320
+ export type GrantFamily = (typeof KEYED_GRANT_FAMILIES)[number] | "databases" | "users" | "blobBuckets" | "db3";
1222
1321
  /**
1223
1322
  * The retired FAMILIES (#3279), each with the reason it is gone.
1224
1323
  *
@@ -1420,7 +1519,21 @@ export declare function validateKeyedGrantsAgainstTargets(grants: readonly Funct
1420
1519
  * A version-1 manifest still parses: it records registrations only.
1421
1520
  */
1422
1521
  export declare const FUNCTION_MANIFEST_SCHEMA_VERSION = 2;
1423
- export declare const FUNCTION_MANIFEST_SCHEMA_VERSIONS: readonly [1, 2];
1522
+ export declare const FUNCTION_MANIFEST_SCHEMA_VERSIONS: readonly [1, 2, 3];
1523
+ /**
1524
+ * Version 3 (#4730) adds what a version's `authorize` admits: the
1525
+ * `authorize` block and the `writeFamilies` its handler reaches. Only a
1526
+ * FLAGGED build emits it — the manifest is inside the envelope hash, so a
1527
+ * universal bump would make every untouched bare-handler tree a new version
1528
+ * on its next push. A bare-handler tree keeps emitting version 2.
1529
+ */
1530
+ export declare const FUNCTION_MANIFEST_AUTHORIZE_SCHEMA_VERSION = 3;
1531
+ /** The `auth.*` families an `authorize` can read, as the manifest names them. */
1532
+ export declare const AUTH_FAMILIES: readonly ["auth.user", "auth.trigger", "auth.memberships", "auth.collections", "auth.doc", "auth.db", "auth.configVar"];
1533
+ /** The SDK helpers that build an `authorize`, as the manifest names them. */
1534
+ export declare const AUTHORIZE_HELPERS: readonly ["allowAnyone", "allowCallers", "requireSignedIn", "requireRole", "requireMember", "requireCollectionRole", "requireDocumentOwner"];
1535
+ /** How many function keys an `allowCallers` block may list. */
1536
+ export declare const MAX_MANIFEST_CALLER_FUNCTIONS = 200;
1424
1537
  /** Bounds, so a manifest cannot be a way to store an unbounded blob. */
1425
1538
  export declare const MAX_MANIFEST_QUERIES = 200;
1426
1539
  export declare const MAX_MANIFEST_NAME_LENGTH = 120;
@@ -1471,6 +1584,41 @@ export interface ManifestQuery {
1471
1584
  /** True when a `$caller` binding scopes this registration. */
1472
1585
  callerScoped: boolean;
1473
1586
  }
1587
+ /** The doors an `allowCallers` admits, as collected (#4730). */
1588
+ export interface ManifestAuthorizeCallers {
1589
+ webhook: boolean;
1590
+ cron: boolean;
1591
+ manual: boolean;
1592
+ /** The parent function keys the `functions` arm names. */
1593
+ functions: string[];
1594
+ /** `true`, `false`, or `"rule"` when the arm is an authorize function. */
1595
+ agents: boolean | "rule";
1596
+ /** `"rule"` when a `users` arm is present, else false. */
1597
+ users: false | "rule";
1598
+ /**
1599
+ * #4803 — the db3 flush door. Optional: a manifest collected before the door
1600
+ * existed carries no key, and absent reads as closed.
1601
+ */
1602
+ db3?: boolean;
1603
+ /**
1604
+ * #5393 — a users walk's batch door: `true` for every walk, or the keys of
1605
+ * the functions whose walks are admitted. Optional like `db3`: absent reads
1606
+ * as closed.
1607
+ */
1608
+ usersBatch?: boolean | string[];
1609
+ }
1610
+ /** What a version's `authorize` admits, as collected (#4730). */
1611
+ export interface ManifestAuthorize {
1612
+ present: true;
1613
+ /** `allowAnyone()`, or an `allowCallers` whose users or agents rule is one. */
1614
+ public: boolean;
1615
+ /** The SDK helper that built the exported `authorize`, or null when hand-written. */
1616
+ helper: string | null;
1617
+ /** The doors, when the helper is `allowCallers`; else null. */
1618
+ callers: ManifestAuthorizeCallers | null;
1619
+ /** The `auth.*` families the authorize code reaches, sorted. */
1620
+ families: string[];
1621
+ }
1474
1622
  export interface FunctionManifest {
1475
1623
  schemaVersion: number;
1476
1624
  queries: ManifestQuery[];
@@ -1489,6 +1637,13 @@ export interface FunctionManifest {
1489
1637
  * empty `models` list does not.
1490
1638
  */
1491
1639
  dynamicModels: boolean;
1640
+ /**
1641
+ * Version 3 only: the families on which the scan met a write or send verb.
1642
+ * Absent on versions 1 and 2, which readers treat as `[]`.
1643
+ */
1644
+ writeFamilies?: string[];
1645
+ /** Version 3 only: the `authorize` block. Absent on 1 and 2 (read as null). */
1646
+ authorize?: ManifestAuthorize;
1492
1647
  }
1493
1648
  export interface ParsedManifest {
1494
1649
  ok: boolean;
@@ -1503,6 +1658,64 @@ export interface ParsedManifest {
1503
1658
  * and whether the author meant any of it are questions this cannot answer.
1504
1659
  */
1505
1660
  export declare function parseFunctionManifest(value: unknown): ParsedManifest;
1661
+ /**
1662
+ * Whether a top-level input schema is one the closed-schema default leaves
1663
+ * OPEN under its union exemption — #4730, criterion 9.
1664
+ *
1665
+ * The validator closes an object against the root's OWN `properties` only,
1666
+ * so a root whose `anyOf` or `oneOf` members declare `properties` of their
1667
+ * own would, closed, refuse the very keys its members declare. Such a root is
1668
+ * left open, and `config push` warns its author to say `additionalProperties`
1669
+ * explicitly. Shared by the server (`closedInputSchemaFor`) and the CLI's
1670
+ * push warning, so both sides read one rule.
1671
+ */
1672
+ export declare function inputSchemaRootLeftOpen(schema: unknown): boolean;
1673
+ /**
1674
+ * The schema a flagged version validates against — #4730, criterion 9.
1675
+ *
1676
+ * A top-level object schema that sets no `additionalProperties` reads as
1677
+ * closed: a shallow copy with `additionalProperties: false`. Every other
1678
+ * schema is answered as it is — an explicit `additionalProperties`, a
1679
+ * non-object root, an empty `{}`, and a root left open under
1680
+ * {@link inputSchemaRootLeftOpen}. Nested objects are not touched. Applied at
1681
+ * run time and never written to the header.
1682
+ */
1683
+ export declare function closedObjectSchema(schema: Record<string, unknown>): Record<string, unknown>;
1684
+ /**
1685
+ * `[function] public`, read from the authored TOML's `[function]` table —
1686
+ * #4730, criterion 13. Absent reads as false; anything but a boolean is
1687
+ * refused. Read by the CLI's preflight and by the server from the envelope's
1688
+ * TOML, never stored.
1689
+ */
1690
+ export declare function declaredPublicOf(functionTable: unknown): {
1691
+ ok: true;
1692
+ value: boolean;
1693
+ } | {
1694
+ ok: false;
1695
+ error: string;
1696
+ };
1697
+ /**
1698
+ * What makes a version write-capable for the public-writer lint — #4730: a
1699
+ * mutation registration, a family the manifest records a write or send verb
1700
+ * on, or a declared `integration:<key>`, high-blast or subject-grant
1701
+ * capability (#4909: a function anyone may invoke that names any member is
1702
+ * the same hazard). One phrase per reason, for the refusal to quote.
1703
+ */
1704
+ export declare function writeCapableReasons(manifest: FunctionManifest | null, capabilities: readonly string[]): string[];
1705
+ /**
1706
+ * The public-writer refusal — #4730, criterion 13: a version whose manifest
1707
+ * records `authorize.public` (an `allowAnyone()`, or an `allowCallers` arm
1708
+ * that is one) and that is write-capable needs `public = true` under
1709
+ * `[function]`. The sentence names the function, what makes it write-capable
1710
+ * and the fix; null when the push is fine. The CLI refuses at preflight and
1711
+ * the server at push, from this one rule.
1712
+ */
1713
+ export declare function publicWriterRefusal(input: {
1714
+ functionKey: string;
1715
+ manifest: FunctionManifest | null;
1716
+ capabilities: readonly string[];
1717
+ declaredPublic: boolean;
1718
+ }): string | null;
1506
1719
  /**
1507
1720
  * The runtime keys a `functions/<key>.toml` no longer decides anything with —
1508
1721
  * #3482 retired them, and #3188 (project `server-functions` phase 5) refuses
@@ -1671,6 +1884,12 @@ export declare function hasRetiredDatabaseTriggerBlock(functionTable: unknown):
1671
1884
  * as ignored by `ignoredFunctionKeys` in `function-retired-keys.ts`.
1672
1885
  */
1673
1886
  /** A function's single webhook trigger, normalized. */
1887
+ /**
1888
+ * The db3 type-name prefix the platform reserves for its own types (#4882,
1889
+ * project `agent-sessions-db3`): no app pushes, attaches or watches a type
1890
+ * whose name starts with it.
1891
+ */
1892
+ export declare const RESERVED_DB3_TYPE_PREFIX = "primitive:";
1674
1893
  export interface WebhookTriggerDeclaration {
1675
1894
  verificationScheme: string;
1676
1895
  signingSecret?: string;
@@ -1681,7 +1900,28 @@ export interface WebhookTriggerDeclaration {
1681
1900
  secretGracePeriodMs?: number;
1682
1901
  /** `[function.triggers.webhook.verification]` — the row's `config`. */
1683
1902
  verification?: Record<string, unknown>;
1903
+ /**
1904
+ * `[[function.triggers.webhook.handshakeRules]]` — a provider's setup
1905
+ * handshake (Slack `url_verification`, Discord PING, Microsoft Graph
1906
+ * `validationToken`, Meta `hub.challenge`), answered by the receiver after
1907
+ * verification and before the function runs (#3190).
1908
+ */
1909
+ handshakeRules?: WebhookHandshakeRuleDeclaration[];
1910
+ /** `allowedIpCidrs` — the sender addresses a delivery may come from (#3190). */
1911
+ allowedIpCidrs?: string[];
1684
1912
  }
1913
+ /** One handshake rule: a CEL `when` and the response it answers with. */
1914
+ export interface WebhookHandshakeRuleDeclaration {
1915
+ when: string;
1916
+ response: {
1917
+ status?: number;
1918
+ contentType?: string;
1919
+ body?: string;
1920
+ };
1921
+ }
1922
+ /** The most handshake rules and allowlist entries one webhook block may carry. */
1923
+ export declare const MAX_WEBHOOK_HANDSHAKE_RULES = 10;
1924
+ export declare const MAX_WEBHOOK_IP_CIDRS = 50;
1685
1925
  /** One `[[function.triggers.cron]]` entry, normalized. */
1686
1926
  export interface CronTriggerDeclaration {
1687
1927
  name: string;
@@ -1690,9 +1930,20 @@ export interface CronTriggerDeclaration {
1690
1930
  overlapPolicy?: string;
1691
1931
  rootInput?: unknown;
1692
1932
  }
1933
+ /** One `[[function.triggers.db3]]` entry, normalized (#4803). */
1934
+ export interface Db3TriggerDeclaration {
1935
+ /** The db3 type whose flushes start the function. */
1936
+ type: string;
1937
+ }
1693
1938
  export interface TriggerDeclaration {
1694
1939
  webhook: WebhookTriggerDeclaration | null;
1695
1940
  cron: CronTriggerDeclaration[];
1941
+ /**
1942
+ * `[[function.triggers.db3]]` — present only when the file declares at least
1943
+ * one entry, so a file written before the kind existed stores exactly the
1944
+ * JSON it stored before (#4803).
1945
+ */
1946
+ db3?: Db3TriggerDeclaration[];
1696
1947
  }
1697
1948
  export declare const EMPTY_TRIGGER_DECLARATION: TriggerDeclaration;
1698
1949
  /**
@@ -1704,13 +1955,19 @@ export declare const EMPTY_TRIGGER_DECLARATION: TriggerDeclaration;
1704
1955
  * remaining slots for the other 40+ objects the cap is sized for.
1705
1956
  */
1706
1957
  export declare const MAX_CRON_TRIGGERS_PER_FUNCTION = 10;
1958
+ /**
1959
+ * The most db3 types one function may watch — the cron cap's per-object
1960
+ * reasoning (#4803). The per-app ceiling is `MAX_DB3_TRIGGERS_PER_APP`, checked
1961
+ * at the push boundary.
1962
+ */
1963
+ export declare const MAX_DB3_TRIGGERS_PER_FUNCTION = 10;
1707
1964
  /**
1708
1965
  * The rule ids this module owns — one per refusal, declared on the `function`
1709
1966
  * surface (#3374). The union below closes `refuseTrigger`'s id parameter, so a
1710
1967
  * twenty-seventh refusal cannot compile without a twenty-seventh id, and that
1711
1968
  * id fails `cli-unit-tests` until the surface declares it (#3373's anchor).
1712
1969
  */
1713
- export declare const TRIGGER_RULE_IDS: readonly ["triggers-table", "trigger-kind", "database-trigger-removed", "webhook-trigger-single", "webhook-trigger-table", "webhook-trigger-keys", "webhook-trigger-scheme-required", "webhook-trigger-scheme-none", "webhook-trigger-number", "webhook-trigger-dedup-boolean", "webhook-trigger-verification-table", "cron-trigger-cap", "cron-trigger-entry", "cron-trigger-keys", "cron-trigger-name-required", "cron-trigger-name-charset", "cron-trigger-duplicate", "cron-trigger-expression-required", "cron-trigger-overlap-policy"];
1970
+ export declare const TRIGGER_RULE_IDS: readonly ["triggers-table", "trigger-kind", "database-trigger-removed", "webhook-trigger-single", "webhook-trigger-table", "webhook-trigger-keys", "webhook-trigger-scheme-required", "webhook-trigger-scheme-none", "webhook-trigger-number", "webhook-trigger-dedup-boolean", "webhook-trigger-verification-table", "webhook-trigger-handshake-rules", "webhook-trigger-ip-allowlist", "cron-trigger-cap", "cron-trigger-entry", "cron-trigger-keys", "cron-trigger-name-required", "cron-trigger-name-charset", "cron-trigger-duplicate", "cron-trigger-expression-required", "cron-trigger-overlap-policy", "db3-trigger-cap", "db3-trigger-entry", "db3-trigger-keys", "db3-trigger-type-required", "db3-trigger-type-reserved", "db3-trigger-duplicate"];
1714
1971
  export type TriggerRuleId = (typeof TRIGGER_RULE_IDS)[number];
1715
1972
  /**
1716
1973
  * A broken trigger rule. `ruleId` names which one, for a reader that wants to
@@ -1751,6 +2008,18 @@ export declare function storedDatabaseTriggerTypes(stored: unknown): string[];
1751
2008
  export declare function cronTriggerKeyFor(functionKey: string, name: string): string;
1752
2009
  /** The entry name a `<functionKey>:<name>` trigger key carries. */
1753
2010
  export declare function cronTriggerNameFrom(functionKey: string, triggerKey: string): string;
2011
+ /**
2012
+ * The `ServerFunctionTrigger.triggerKey` a db3 entry owns (#4803):
2013
+ * `<functionKey>:db3:<type>`. A cron name cannot hold `:`, so the key never
2014
+ * collides with a cron entry's `<functionKey>:<name>`.
2015
+ */
2016
+ export declare function db3TriggerKeyFor(functionKey: string, type: string): string;
2017
+ /**
2018
+ * The type a db3 trigger key carries, or null when the key is not this
2019
+ * function's db3 key. Read by stripping the prefix, never by splitting: a type
2020
+ * name may hold `:` and `/`.
2021
+ */
2022
+ export declare function db3TriggerTypeFrom(functionKey: string, triggerKey: string): string | null;
1754
2023
  /**
1755
2024
  * The `{{secrets.KEY}}` reference SHAPE, decided from the value alone.
1756
2025
  *
@@ -1953,78 +2222,6 @@ export declare function validateSigningSecretDeclaration(input: {
1953
2222
  verificationScheme: string;
1954
2223
  signingSecret?: unknown;
1955
2224
  }): SigningSecretRuleError | null;
1956
- /**
1957
- * The workflow rules two runners share (#3374, project `cli-server-rule-parity`
1958
- * phase 2; intent §Success criteria 3).
1959
- *
1960
- * ── One predicate, two messages ──────────────────────────────────────────
1961
- *
1962
- * `runAs = "system"` beside a non-empty `accessRule` is dead config: a system
1963
- * run can only be started by the system and never evaluates its access rule
1964
- * (#1258, broadening #1172). The server refused it at save time
1965
- * (`validateWorkflowIdentityConfig`) and the CLI refused it in the push
1966
- * preflight (`validateWorkflowIdentity`), and the two carried the conjunction
1967
- * byte-for-byte as separate copies kept in step by a comment. This module is
1968
- * the one copy: it decides, and returns a STRUCTURED violation — the rule id
1969
- * and the server's sentence — that each site renders in its own words. The
1970
- * server pushes the sentence into its `string[]`; the CLI keeps its own hint,
1971
- * which names the preflight remedy. Neither message changed.
1972
- *
1973
- * ── Why a `*-rules.ts` module ────────────────────────────────────────────
1974
- *
1975
- * The registry's unclaimed-export check (`findUnclaimedRuleModuleExports`)
1976
- * keys on this name under `src/config-surface/`: every exported function here
1977
- * is a rule, so one no surface declares fails `cli-unit-tests`. Shared
1978
- * predicates that are not rules live elsewhere (`webhook-signing-secret.ts`).
1979
- * The module is vendored into the CLI artifact like the rest of the
1980
- * directory, which is what lets `workflow`'s declaration call the rule
1981
- * `preflight`.
1982
- */
1983
- /** The rule ids this module owns — the union type below anchors them (#3373). */
1984
- export declare const WORKFLOW_RULE_IDS: readonly ["system-access-rule", "retired-database-step-kind"];
1985
- type WorkflowRuleId = (typeof WORKFLOW_RULE_IDS)[number];
1986
- /** A violation of one of this module's rules, for a site to render. */
1987
- export interface WorkflowRuleViolation extends RuleRefusal<WorkflowRuleId> {
1988
- }
1989
- /**
1990
- * `runAs = "system"` with a non-empty string `accessRule`, or null.
1991
- *
1992
- * Exactly the conjunction both sites carried: a default, unset, empty or
1993
- * whitespace-only rule is no rule, and a non-string one (`accessRule = false`)
1994
- * is malformed input for another check to name, not dead config. The message
1995
- * is the server's save-time sentence; the CLI renders its own hint from the
1996
- * same answer.
1997
- */
1998
- export declare function checkWorkflowSystemAccessRule(input: {
1999
- runAs?: unknown;
2000
- accessRule?: unknown;
2001
- }): WorkflowRuleViolation | null;
2002
- /**
2003
- * The DSL step kinds that executed a registered database operation (#3189,
2004
- * phase 6 of project `server-functions`, matrix row M8).
2005
- *
2006
- * Every `database.*` runner except `database.syncIndexes` called
2007
- * `DatabaseOperationsController.execute`, so retiring database operations
2008
- * retires these fourteen kinds with them: the seven base kinds and their seven
2009
- * `*ForUser` twins. `database.syncIndexes` (which calls the records index
2010
- * route), `database.create` and `database.delete` (resource lifecycle) are not
2011
- * here and keep running until the engine retires.
2012
- */
2013
- export declare const RETIRED_DATABASE_STEP_KINDS: readonly ["database.query", "database.mutate", "database.count", "database.aggregate", "database.pipeline", "database.applyToQuery", "database.batch", "database.queryForUser", "database.mutateForUser", "database.countForUser", "database.aggregateForUser", "database.pipelineForUser", "database.applyToQueryForUser", "database.batchForUser"];
2014
- /**
2015
- * Every step in a definition — or the one step a run has reached — whose kind
2016
- * is a retired database kind, with the sentence naming the replacement.
2017
- *
2018
- * Walks the top-level `steps` and a `collect` step's nested `step`, the one
2019
- * place a step definition nests another. Push (the CLI preflight), save, the
2020
- * activation lint and the engine all ask this one question, so a definition is
2021
- * refused by the same words wherever it is caught, and a run that reaches such
2022
- * a step fails with them.
2023
- */
2024
- export declare function checkWorkflowRetiredStepKinds(input: {
2025
- steps?: unknown;
2026
- }): WorkflowRuleViolation[];
2027
- export declare const WORKFLOW_SURFACE: ConfigObjectSurface;
2028
2225
  /**
2029
2226
  * Cron-expression and timezone VALIDITY — the half of `src/cron-parser.ts`
2030
2227
  * both runners need (#3376, project `cli-server-rule-parity` phase 4).
@@ -2136,15 +2333,6 @@ export declare function isValidTimezone(name: unknown): boolean;
2136
2333
  * pins. So the grammar and the `Intl` probe live next door in
2137
2334
  * `cron-expression.ts`, which is a shared-predicate module rather than a rules
2138
2335
  * module, and this one only decides and renders.
2139
- *
2140
- * ── What is NOT shared ───────────────────────────────────────────────────
2141
- *
2142
- * The standalone cron routes ask the same two predicates and render their own
2143
- * `Invalid cron expression: …` / `Invalid timezone: …`, with their own
2144
- * defaulting (create reads an absent timezone as UTC, update does not). That
2145
- * is intent assumption 2 in the form its own fallback describes, and the shape
2146
- * `workflow-rules.ts` set in phase 2: one predicate, each site's message and
2147
- * defaulting preserved. No refusal message changed anywhere.
2148
2336
  */
2149
2337
  /** The rule ids this module owns — the union type below anchors them (#3373). */
2150
2338
  export declare const CRON_TRIGGER_RULE_IDS: readonly ["cron-trigger-expression", "cron-trigger-timezone"];
@@ -2538,7 +2726,7 @@ export declare function resolvePromptStrictOutput(input: PromptStrictOutputInput
2538
2726
  * Pure and dependency-free, like every module under `src/config-surface/`.
2539
2727
  */
2540
2728
  /** The stable codes every agent agentRefusal this project adds carries. */
2541
- export declare const AGENT_ERROR_CODES: readonly ["AGENT_DECLARATION_INVALID", "AGENT_TOOL_FUNCTION_MISSING", "AGENT_TOOL_FUNCTION_SCHEMA_MISSING", "AGENT_OUTPUT_SCHEMA_NOT_ALLOWED", "AGENT_CONFIG_KEY_NOT_ALLOWED", "AGENT_NOT_RUNNABLE", "AGENT_TEST_CASE_NOT_SUPPORTED", "AGENT_SCHEMA_NOT_TRANSLATABLE", "AGENT_MODEL_UNKNOWN", "AGENT_MODEL_CAPABILITY_MISSING", "AGENT_MODEL_CAPABILITIES_UNAVAILABLE", "AGENT_ROUND_NOT_AGENT", "AGENT_ROUND_INPUT_INVALID", "AGENT_TOOL_UNKNOWN", "AGENT_TOOL_ARGUMENTS_INVALID", "AGENT_ROUND_TRUNCATED", "AGENT_ROUND_EMPTY", "AGENT_TEST_CASE_INVALID"];
2729
+ export declare const AGENT_ERROR_CODES: readonly ["AGENT_DECLARATION_INVALID", "AGENT_TOOL_FUNCTION_MISSING", "AGENT_TOOL_FUNCTION_SCHEMA_MISSING", "AGENT_OUTPUT_SCHEMA_NOT_ALLOWED", "AGENT_CONFIG_KEY_NOT_ALLOWED", "AGENT_NOT_RUNNABLE", "AGENT_TEST_CASE_NOT_SUPPORTED", "AGENT_SCHEMA_NOT_TRANSLATABLE", "AGENT_MODEL_UNKNOWN", "AGENT_MODEL_CAPABILITY_MISSING", "AGENT_MODEL_CAPABILITIES_UNAVAILABLE", "AGENT_ROUND_NOT_AGENT", "AGENT_ROUND_INPUT_INVALID", "AGENT_TOOL_UNKNOWN", "AGENT_TOOL_ARGUMENTS_INVALID", "AGENT_ROUND_TRUNCATED", "AGENT_ROUND_EMPTY", "AGENT_TEST_CASE_INVALID", "AGENT_PRESENTATION_REFERENCE_INVALID"];
2542
2730
  export type AgentErrorCode = (typeof AGENT_ERROR_CODES)[number];
2543
2731
  /** One agentRefusal: the code a client branches on, and the sentence a person reads. */
2544
2732
  export interface AgentRefusal {
@@ -2568,9 +2756,16 @@ export declare const AGENT_NAME: RegExp;
2568
2756
  export declare const AGENT_ANSWERED_BY: readonly ["initiator", "participants"];
2569
2757
  export declare const AGENT_TOOL_INVOKE: readonly ["request", "task"];
2570
2758
  export declare const AGENT_TOOL_HISTORY_SCOPES: readonly ["session", "turn"];
2759
+ /**
2760
+ * Where a tool without a `function` runs: `client` is answered by a member's
2761
+ * client; `presentation` is data the model hands the client with its final
2762
+ * answer, which no client executes (#4549).
2763
+ */
2764
+ export declare const AGENT_TOOL_RUNS: readonly ["client", "presentation"];
2571
2765
  export type AgentAnsweredBy = (typeof AGENT_ANSWERED_BY)[number];
2572
2766
  export type AgentToolInvoke = (typeof AGENT_TOOL_INVOKE)[number];
2573
2767
  export type AgentToolHistoryScope = (typeof AGENT_TOOL_HISTORY_SCOPES)[number];
2768
+ export type AgentToolRuns = (typeof AGENT_TOOL_RUNS)[number];
2574
2769
  /** A JSON Schema object, as the declaration holds one. */
2575
2770
  export type AgentSchema = Record<string, unknown>;
2576
2771
  /** One `[[prompt.agent.tools]]` entry, as authored. */
@@ -2580,17 +2775,26 @@ export interface AgentToolDeclaration {
2580
2775
  /** A server tool: the function whose schemas are the tool's. */
2581
2776
  function?: string;
2582
2777
  invoke?: AgentToolInvoke;
2583
- /** A client tool: answered by a member's client, schemas in the TOML. */
2584
- runs?: "client";
2778
+ /**
2779
+ * `client`: answered by a member's client, schemas in the TOML.
2780
+ * `presentation`: data the model hands the client with its final answer;
2781
+ * its call ends the turn and is never answered.
2782
+ */
2783
+ runs?: AgentToolRuns;
2784
+ /**
2785
+ * A presentation's input properties whose integers name earlier calls of
2786
+ * the turn by the number the platform gave them (`callNumber`).
2787
+ */
2788
+ references?: string[];
2585
2789
  inputSchema?: AgentSchema;
2586
2790
  outputSchema?: AgentSchema;
2587
2791
  approval?: boolean;
2588
2792
  statusText?: string;
2589
2793
  historyScope?: AgentToolHistoryScope;
2590
2794
  /**
2591
- * A call to this tool ends the turn: once every call of its response is
2592
- * final, the turn settles with no further model round. A client tool with
2593
- * it is never answered — the platform records its result.
2795
+ * A call to this server tool ends the turn: once every call of its response
2796
+ * is final, the turn settles with no further model round. A presentation
2797
+ * always does.
2594
2798
  */
2595
2799
  endsTurn?: boolean;
2596
2800
  }
@@ -2623,14 +2827,14 @@ export type NormalizedAgentTool = AgentToolDeclaration & {
2623
2827
  endsTurn: boolean;
2624
2828
  };
2625
2829
  /**
2626
- * The result the platform records for a call to a client tool with
2627
- * `endsTurn = true`: the call is final when its response is committed, and
2628
- * later rounds read this as its tool result.
2830
+ * The result the platform records for a presentation call: the call is final
2831
+ * when its response is committed, and later rounds read this as its tool
2832
+ * result.
2629
2833
  */
2630
2834
  export declare const AGENT_TERMINAL_CALL_OUTPUT: {
2631
2835
  delivered: true;
2632
2836
  };
2633
- /** The schema of `AGENT_TERMINAL_CALL_OUTPUT`: a terminal client tool's output type. */
2837
+ /** The schema of `AGENT_TERMINAL_CALL_OUTPUT`, the result a presentation call is recorded with. */
2634
2838
  export declare const AGENT_TERMINAL_CALL_OUTPUT_SCHEMA: AgentSchema;
2635
2839
  /** The declaration with every default applied — what readers consume. */
2636
2840
  export interface NormalizedAgentDeclaration {
@@ -2786,10 +2990,31 @@ export declare function agentRoundNotAgentRefusal(promptKey: string): AgentRefus
2786
2990
  * `evaluator` is the one role left.
2787
2991
  */
2788
2992
  export declare function agentTestCaseRefusal(promptKey: string, _role?: "evaluator"): AgentRefusal;
2993
+ /** An earlier call of the turn, as a presentation's references are checked against it. */
2994
+ export interface AgentReferencedCall {
2995
+ /** The number the platform gave the call in its turn (1 for the turn's first). */
2996
+ callNumber: number;
2997
+ toolName: string;
2998
+ /** The call's row state; only `output-available` may be referenced. */
2999
+ state: string;
3000
+ }
3001
+ /**
3002
+ * The refusal of a presentation call whose `references` name a number that
3003
+ * is not an earlier call of the turn with a result — a refused call, a number
3004
+ * the turn never gave, or a call of the same response — or `null`. `earlier`
3005
+ * is the turn's calls committed before this call's response. The message
3006
+ * lists the offending values by property and the numbers that may be
3007
+ * referenced, with their tools, so the model can correct itself next round.
3008
+ */
3009
+ export declare function presentationReferenceRefusal(tool: {
3010
+ name: string;
3011
+ references?: readonly string[];
3012
+ }, args: unknown, earlier: readonly AgentReferencedCall[]): AgentRefusal | null;
2789
3013
  /**
2790
3014
  * The declaration with every default applied: `answeredBy = "initiator"`, the
2791
3015
  * platform maximums for the limits, and per tool `invoke = "request"` (server
2792
- * tools), `approval = false`, `historyScope = "session"` and `endsTurn = false`.
3016
+ * tools), `approval = false`, `historyScope = "session"` and `endsTurn = false`
3017
+ * — `endsTurn = true` for a presentation, whose call always ends the turn.
2793
3018
  *
2794
3019
  * The ONLY accessor for defaults — the stored value never carries them
2795
3020
  * (DSO-3798-001). Takes a value `resolveAgentDeclaration` accepted (or `null`)
@@ -2802,11 +3027,9 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
2802
3027
  *
2803
3028
  * A tool or event schema reaches a provider only through a translation that
2804
3029
  * preserves its meaning; anything else is refused at push, naming the path, the
2805
- * keyword and the provider. The lossy `sanitizeSchemaForGemini` clean-up
2806
- * (`src/services/block-executor.ts`) is NOT reused here: it drops unions and
2807
- * references and rewrites a free-form object as a string, all of which change
2808
- * what the model may produce. It stays where it is, for chat output schemas
2809
- * (the project's non-goal: chat is unchanged).
3030
+ * keyword and the provider. A chat prompt's output schema goes to Gemini
3031
+ * through this translator too (#5538), in place of the lossy clean-up that
3032
+ * dropped unions and references and rewrote a free-form object as a string.
2810
3033
  *
2811
3034
  * ## What "lossless" means (spec §3)
2812
3035
  *
@@ -2825,7 +3048,7 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
2825
3048
  * the structured error the model sees, and a model following `properties` is
2826
3049
  * never told it may add keys. Refusing it instead would put the platform's own
2827
3050
  * closed-object marker — `additionalProperties: false` is how
2828
- * `src/workflows/schema-descriptor.ts` spells a closed object — outside
3051
+ * `src/function-runs/schema-descriptor.ts` spells a closed object — outside
2829
3052
  * Gemini's reach.
2830
3053
  *
2831
3054
  * The TRANSLATED schema is what the provider is sent; the ORIGINAL is what the
@@ -2847,9 +3070,14 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
2847
3070
  * `items`. Lowercase type names are accepted (the existing `responseSchema`
2848
3071
  * path already sends them).
2849
3072
  *
2850
- * Pure and dependency-free, like every module under `src/config-surface/`, and
2851
- * vendored into the CLI artifact after `agent-declaration.ts` so the push
2852
- * preflight and the admin routes refuse exactly the same schemas.
3073
+ * Which keywords pass, drop, take a rule or are refused is the keyword table's
3074
+ * `gemini` column (`SCHEMA_KEYWORDS` in `src/function-runs/schema-descriptor.ts`,
3075
+ * #5529), so the translator, the validator and the push refusal list read one
3076
+ * classification. That module is dependency-free and vendored to the CLI whole,
3077
+ * so this one stays pure: the CLI artifact generator rewrites its import to the
3078
+ * vendored copy. This module is vendored into the CLI artifact after
3079
+ * `agent-declaration.ts` so the push preflight and the admin routes refuse
3080
+ * exactly the same schemas.
2853
3081
  */
2854
3082
  /** The providers a prompt config may name. */
2855
3083
  export type SchemaProvider = "openrouter" | "gemini";
@@ -2872,6 +3100,27 @@ export type SchemaTranslation = {
2872
3100
  ok: false;
2873
3101
  refusals: SchemaTranslationRefusal[];
2874
3102
  };
3103
+ /**
3104
+ * What Gemini's function `Schema` does with one keyword, from the keyword
3105
+ * table: `pass` (spelled the same way, with the same meaning — `required`
3106
+ * among them, and Gemini's own `nullable`, `propertyOrdering` and `example`),
3107
+ * `drop` (an annotation with no value meaning, dropped in silence, spec §3),
3108
+ * `rule` (handled by its own rule below) or `refuse`. A key the table does not
3109
+ * name is refused: a keyword nobody classified could mean anything.
3110
+ */
3111
+ export declare function geminiKeywordVerdict(keyword: string): GeminiKeywordVerdict;
3112
+ /**
3113
+ * Keywords handled by their own rule below: exactly the table's `rule` rows,
3114
+ * which the keyword-table conformance test holds it to.
3115
+ */
3116
+ export declare const GEMINI_STRUCTURAL_KEYWORDS: readonly ["type", "enum", "const", "format", "properties", "items", "anyOf", "oneOf", "additionalProperties"];
3117
+ /**
3118
+ * Why Gemini's function `Schema` cannot carry a refused keyword, for the ones
3119
+ * with a reason of their own. Each is refused rather than dropped: dropping any
3120
+ * of them widens what the model may produce. A refused keyword with no entry
3121
+ * here gets the generic reason.
3122
+ */
3123
+ export declare const GEMINI_REFUSAL_REASONS: Readonly<Record<string, string>>;
2875
3124
  /** What a message calls the root. */
2876
3125
  export declare function schemaPathLabel(path: string): string;
2877
3126
  /**
@@ -2951,6 +3200,143 @@ export type AgentSchemaDeficit = {
2951
3200
  export declare function agentSchemaTranslationDeficits(input: AgentSchemaTranslationInput): AgentSchemaDeficit[];
2952
3201
  /** The `AGENT_SCHEMA_NOT_TRANSLATABLE` refusal one deficit renders as. */
2953
3202
  export declare function agentSchemaDeficitRefusal(deficit: AgentSchemaDeficit): AgentRefusal;
3203
+ /**
3204
+ * What a prompt push refuses — #5536 (project `unified-schemas` phase 5)
3205
+ * reported it, #5538 (phase 6, intent criterion 8) refuses it.
3206
+ *
3207
+ * Two checks judge a prompt's schemas: the lossless Gemini translator
3208
+ * (`translateSchemaForProvider`) on the output schemas a Gemini config sends,
3209
+ * and the engine (the function push's rules) on every schema. A write
3210
+ * carrying a keyword either would refuse is refused, each keyword named with
3211
+ * its fix and a code: `PROMPT_SCHEMA_NOT_TRANSLATABLE` for the translator,
3212
+ * `PROMPT_SCHEMA_UNSUPPORTED_KEYWORD` for the engine. The admin prompt routes,
3213
+ * the CLI preflight (through the vendored copy), the Gemini call path and the
3214
+ * audit (`scripts/lib/schema-audit-core.ts`) all read this module, so they
3215
+ * cannot disagree about which schemas are refused.
3216
+ *
3217
+ * An agent's translator refusals are not here: they are already the push
3218
+ * error `AGENT_SCHEMA_NOT_TRANSLATABLE` (DSO-5536-002).
3219
+ */
3220
+ /**
3221
+ * The code a prompt write is refused with for a keyword the lossless Gemini
3222
+ * translator cannot carry, and the code a run of a stored prompt whose output
3223
+ * schema it cannot carry fails with.
3224
+ */
3225
+ export declare const PROMPT_SCHEMA_NOT_TRANSLATABLE = "PROMPT_SCHEMA_NOT_TRANSLATABLE";
3226
+ /** The code a prompt write is refused with for a keyword or a shape the schema check would not enforce. */
3227
+ export declare const PROMPT_SCHEMA_UNSUPPORTED_KEYWORD = "PROMPT_SCHEMA_UNSUPPORTED_KEYWORD";
3228
+ /** One keyword the engine would not enforce: where, which, and why (with its fix). */
3229
+ export interface EngineSchemaRefusal {
3230
+ /** The dotted path from the schema root; `""` is the root. */
3231
+ path: string;
3232
+ keyword: string;
3233
+ reason: string;
3234
+ }
3235
+ /**
3236
+ * The fix for each keyword the engine refuses: one entry per refused row of
3237
+ * the keyword table, and no other key.
3238
+ */
3239
+ export declare const ENGINE_REFUSAL_FIXES: Readonly<Record<string, string>>;
3240
+ /**
3241
+ * The fix for a translator refusal whose reason states only what would be
3242
+ * lost, appended to the refusal line (DSO-5536-008: the translator's own
3243
+ * texts are refusal texts elsewhere and stay as they are). `"*"` is the fix
3244
+ * for a keyword the translator has no reason of its own for.
3245
+ */
3246
+ export declare const TRANSLATOR_REFUSAL_FIXES: Readonly<Record<string, string>>;
3247
+ /**
3248
+ * Every keyword of `schema` the function push's rules refuse, over the nodes
3249
+ * they check (the root, `properties`, `items`, `anyOf`, `oneOf`; never
3250
+ * `$defs`): the keyword table's refused class, each reason ending with its
3251
+ * fix, and the shape rules. An enforced constraint (`uniqueItems`,
3252
+ * `multipleOf`, …) is never one: only the translator refuses those.
3253
+ *
3254
+ * The walk keeps its own work stack rather than recursing: the compiler
3255
+ * accepts a schema nested deeper than the call stack, and every refusal must
3256
+ * still be named for it.
3257
+ */
3258
+ export declare function engineSchemaRefusals(schema: unknown, path?: string): EngineSchemaRefusal[];
3259
+ /**
3260
+ * The schemas an agent's model reads from its declaration (a table or one
3261
+ * JSON string): each client tool's `inputSchema` and `outputSchema`, each
3262
+ * event's `schema` and the turn context's. Never a server tool's: those are
3263
+ * its function's, judged at the function push.
3264
+ */
3265
+ export declare function agentDeclarationSchemas(agent: unknown): Array<{
3266
+ subject: string;
3267
+ schema: unknown;
3268
+ }>;
3269
+ /** What `promptSchemaDeficits` judges: the schema fields a write carries, and the prompt's configs. */
3270
+ export interface PromptSchemaDeficitInput {
3271
+ inputSchema?: unknown;
3272
+ outputSchema?: unknown;
3273
+ /** `[prompt.agent]`: a table or one JSON string. */
3274
+ agent?: unknown;
3275
+ /** The configs that decide whether `outputSchema` targets Gemini; each config's own `outputSchema` is judged too. */
3276
+ configs?: ReadonlyArray<{
3277
+ name: string;
3278
+ provider: string;
3279
+ status?: string | null;
3280
+ outputSchema?: unknown;
3281
+ }>;
3282
+ }
3283
+ /** One keyword the translator or the engine would refuse, in one schema of a prompt. */
3284
+ export interface PromptSchemaDeficit {
3285
+ /** `inputSchema`, `outputSchema`, `config "fast" outputSchema`, `agent tool "pick" inputSchema`, … */
3286
+ subject: string;
3287
+ field: "inputSchema" | "outputSchema" | "agent";
3288
+ /** The config whose own `outputSchema` this is. */
3289
+ config?: string;
3290
+ check: "translator" | "engine";
3291
+ provider?: "gemini";
3292
+ /** The dotted path from the schema root; `""` is the root. */
3293
+ path: string;
3294
+ keyword: string;
3295
+ reason: string;
3296
+ }
3297
+ /**
3298
+ * `translateSchemaForProvider(schema, "gemini")`, failing closed. The
3299
+ * translator recurses, so a schema nested deeper than the call stack cannot be
3300
+ * translated: it is one refusal about the whole document (`(schema)`, the
3301
+ * engine's spelling), so a schema Gemini would never be sent is refused at
3302
+ * push and at call time rather than accepted unread. Any other error is a
3303
+ * fault and propagates.
3304
+ */
3305
+ export declare function translateSchemaForGemini(schema: unknown): SchemaTranslation;
3306
+ /** The translator's refusals for one schema: `translateSchemaForGemini`'s, or none. */
3307
+ export declare function translatorRefusals(schema: unknown): SchemaTranslationRefusal[];
3308
+ /**
3309
+ * Every keyword of a prompt's schemas the translator or the engine would
3310
+ * refuse. The translator judges `outputSchema` when a non-archived config
3311
+ * names Gemini (case-insensitive), and each Gemini config's own
3312
+ * `outputSchema` unless that config is archived; `inputSchema` is never
3313
+ * translated, and an agent's schemas are judged by the engine only. Order:
3314
+ * `inputSchema`, `outputSchema`, the agent's schemas, then each config; per
3315
+ * schema the translator first. A top-level value that is no schema object
3316
+ * is reported once, by the engine.
3317
+ */
3318
+ export declare function promptSchemaDeficits(input: PromptSchemaDeficitInput): PromptSchemaDeficit[];
3319
+ /**
3320
+ * The refusal line for one deficit: the subject, the path, the keyword, why,
3321
+ * and the fix. A translator reason with no fix of its own names what Gemini
3322
+ * needs instead (`properties`, `type`, the overflow's "flatten the schema").
3323
+ */
3324
+ export declare function promptSchemaRefusalLine(deficit: PromptSchemaDeficit): string;
3325
+ /** The code a write is refused with for one deficit. */
3326
+ export declare function promptSchemaDeficitCode(deficit: PromptSchemaDeficit): typeof PROMPT_SCHEMA_NOT_TRANSLATABLE | typeof PROMPT_SCHEMA_UNSUPPORTED_KEYWORD;
3327
+ /** One entry of a refused write's `details.refusals`. */
3328
+ export interface PromptSchemaRefusalEntry {
3329
+ code: typeof PROMPT_SCHEMA_NOT_TRANSLATABLE | typeof PROMPT_SCHEMA_UNSUPPORTED_KEYWORD;
3330
+ /** `promptSchemaRefusalLine` of the deficit. */
3331
+ message: string;
3332
+ subject: string;
3333
+ field: PromptSchemaDeficit["field"];
3334
+ config?: string;
3335
+ path: string;
3336
+ keyword: string;
3337
+ }
3338
+ /** A refused write's `details.refusals`: one entry per deficit, in `promptSchemaDeficits` order. */
3339
+ export declare function promptSchemaRefusals(deficits: readonly PromptSchemaDeficit[]): PromptSchemaRefusalEntry[];
2954
3340
  /**
2955
3341
  * A change to a server function that an agent uses — issue #4441.
2956
3342
  *
@@ -3125,8 +3511,6 @@ export type AgentTestCaseResolution = {
3125
3511
  export declare function resolveAgentTestCase(input: AgentTestCaseInput): AgentTestCaseResolution;
3126
3512
  export declare const PROMPT_SURFACE: ConfigObjectSurface;
3127
3513
  export declare const INTEGRATION_SURFACE: ConfigObjectSurface;
3128
- export declare const WEBHOOK_SURFACE: ConfigObjectSurface;
3129
- export declare const CRON_TRIGGER_SURFACE: ConfigObjectSurface;
3130
3514
  export declare const BLOB_BUCKET_SURFACE: ConfigObjectSurface;
3131
3515
  /**
3132
3516
  * The `email-template` configuration object's definition (issue #2644, phase 2).
@@ -3168,30 +3552,79 @@ export declare function isRetiredEmailType(emailType: string): emailType is Reti
3168
3552
  export declare function retiredEmailTypeGuidance(emailType: string): string;
3169
3553
  export declare const EMAIL_TEMPLATE_SURFACE: ConfigObjectSurface;
3170
3554
  export declare const DATABASE_TYPE_SURFACE: ConfigObjectSurface;
3171
- export declare const RULE_SET_SURFACE: ConfigObjectSurface;
3172
- export declare const GROUP_TYPE_CONFIG_SURFACE: ConfigObjectSurface;
3173
- export declare const COLLECTION_TYPE_CONFIG_SURFACE: ConfigObjectSurface;
3174
- export declare const METADATA_CATEGORY_CONFIG_SURFACE: ConfigObjectSurface;
3555
+ export declare const DB3_TYPE_SURFACE: ConfigObjectSurface;
3556
+ /** A retired rule-set resource type: the code and sentence a refusal carries. */
3557
+ export interface RetiredRuleSetResourceType {
3558
+ code: string;
3559
+ message: string;
3560
+ }
3175
3561
  /**
3176
- * The `transform` configuration object's definition (issue #2644, phase 3).
3177
- *
3178
- * Transforms are the one synced type with NO TOML field table: a transform is
3179
- * `transforms/<name>.rhai`, a Rhai source file, and its whole authored surface
3180
- * is the script body. `config pull` writes the active `ScriptConfig`'s body and
3181
- * `config push` sends it back; there is no key/value table to define, and the
3182
- * `Script` / `ScriptConfig` scalars around it (name, description, inputSchema,
3183
- * limits, status) are not authorable through the sync slot today.
3562
+ * Rule-set resource types that no longer exist (#4959), with the one refusal
3563
+ * both the rule-set routes and `config push`'s preflight answer for a set of
3564
+ * that type, so the two cannot drift.
3184
3565
  *
3185
- * The entry exists so that is a DECISION rather than an absence. Criterion 3's
3186
- * registry guard reads `SYNC_RESOURCE_TYPES` and requires a surface per label;
3187
- * without this module `transform` would have to sit in an exemption list, which
3188
- * is precisely the "absent from a hand-written list" failure mode this epic
3189
- * exists to end.
3566
+ * `lock` — locks are server-function-only, and the calling function's
3567
+ * `authorize` decides who may lock which key. A stored row can still be listed
3568
+ * and deleted; nothing evaluates it.
3190
3569
  */
3191
- export declare const TRANSFORM_SURFACE: ConfigObjectSurface;
3570
+ export declare const RETIRED_RULE_SET_RESOURCE_TYPES: Record<string, RetiredRuleSetResourceType>;
3571
+ /** The retirement for `resourceType`, or `null` for a live type. */
3572
+ export declare function retiredRuleSetResourceType(resourceType: unknown): RetiredRuleSetResourceType | null;
3573
+ export declare const RULE_SET_SURFACE: ConfigObjectSurface;
3574
+ export declare const METADATA_CATEGORY_CONFIG_SURFACE: ConfigObjectSurface;
3192
3575
  export declare const SERVER_FUNCTION_SURFACE: ConfigObjectSurface;
3576
+ /**
3577
+ * The refusal of a new version whose default export has no `authorize`: it
3578
+ * names the function and shows the object form with the function's key. A
3579
+ * `file` prefixes the sentence the way the CLI reports a file it refuses.
3580
+ */
3581
+ export declare function authorizeRequiredMessage(functionKey: string, file?: string): string;
3582
+ /**
3583
+ * The refusal of a version that declares `public = true` and has no
3584
+ * `authorize` — #5840. `public = true` opens the function to signed-out
3585
+ * callers, and the version's own `authorize` is what decides about them.
3586
+ */
3587
+ export declare function publicRequiresAuthorizeMessage(functionKey: string, file?: string): string;
3588
+ /**
3589
+ * The refusal of a new version that defines `authorize` while its TOML still
3590
+ * carries `access`.
3591
+ */
3592
+ export declare function accessAmbiguousMessage(functionKey: string): string;
3593
+ /** The refusal of a create or update body that carries `access`. */
3594
+ export declare const FUNCTION_ACCESS_FROZEN_REQUEST: string;
3193
3595
  export declare const TEST_CASE_SURFACE: ConfigObjectSurface;
3194
3596
  export declare const APP_SETTINGS_SURFACE: ConfigObjectSurface;
3597
+ /**
3598
+ * The `user-properties` configuration object's definition (#5385, project
3599
+ * `user-index-properties` phase 2).
3600
+ *
3601
+ * `user-properties.toml` is a root singleton beside `app.toml`, so — like
3602
+ * `app-settings` and `test-case` — it is named explicitly rather than reached
3603
+ * through `SYNC_RESOURCE_TYPES`. Its keys are the app's own: each
3604
+ * `[fields.<name>]` table declares a property in the db3 field grammar plus
3605
+ * `client`, and each `[[unique_constraints]]` entry names two or more of them.
3606
+ * There is no fixed key/value table to define, so the surface declares
3607
+ * `noFieldTable`; the file is parsed, normalized and judged by one module,
3608
+ * `src/user-index/properties-schema.ts`, which the CLI vendors byte for byte
3609
+ * (`cli/src/lib/user-properties/generated-properties-schema.ts`) and which
3610
+ * `config push`'s preflight runs before anything is applied. The pushed
3611
+ * schema is stored on the app's `UserPropertiesConfig` row.
3612
+ */
3613
+ export declare const USER_PROPERTIES_SURFACE: ConfigObjectSurface;
3614
+ /**
3615
+ * The `schema` configuration object's definition (#5532, project
3616
+ * `unified-schemas` phase 3).
3617
+ *
3618
+ * `schemas/<file>.toml` holds shared shapes: each `[defs.<Name>]` table is
3619
+ * one JSON Schema document, named by the file's stem and the def's name
3620
+ * (`schemas:<file>#/$defs/<Name>`). There is no fixed key/value table to
3621
+ * define, so the surface declares `noFieldTable`; the file is checked and
3622
+ * compiled by one module, `src/function-runs/schema-file.ts`, which the CLI
3623
+ * vendors (`cli/src/lib/schema-codegen/generated-schema-file.ts`), runs in
3624
+ * `config push`'s preflight and sends compiled with the source, and which the
3625
+ * push route runs again.
3626
+ */
3627
+ export declare const SCHEMA_FILE_SURFACE: ConfigObjectSurface;
3195
3628
  /**
3196
3629
  * The configuration-object registry (issue #2644).
3197
3630
  *
@@ -3208,9 +3641,10 @@ export declare const APP_SETTINGS_SURFACE: ConfigObjectSurface;
3208
3641
  /**
3209
3642
  * Every configuration object whose field surface is defined here.
3210
3643
  *
3211
- * One entry per `SYNC_RESOURCE_TYPES` label, plus the two surfaces that
3212
- * round-trip without being a per-entity file: `app-settings` (`app.toml`) and
3213
- * `test-case` (`<key>.tests/`). Nothing that syncs sits outside the registry —
3644
+ * One entry per `SYNC_RESOURCE_TYPES` label, plus the three surfaces that
3645
+ * round-trip without being a per-entity file: `app-settings` (`app.toml`),
3646
+ * `user-properties` (`user-properties.toml`, #5385) and `test-case`
3647
+ * (`<key>.tests/`). Nothing that syncs sits outside the registry —
3214
3648
  * `PENDING_MIGRATION`, the migration's temporary exemption list, is gone as of
3215
3649
  * phase 3, so a new synced type has nowhere to be parked and fails the registry
3216
3650
  * guard until it is defined (#2644 criterion 3).