primitive-admin 1.2.0-alpha.13 → 1.2.0-alpha.15

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 (324) hide show
  1. package/README.md +102 -78
  2. package/assets/skill/skills/primitive-platform/SKILL.md +87 -23
  3. package/dist/bin/primitive.js +11 -82
  4. package/dist/bin/primitive.js.map +1 -1
  5. package/dist/src/commands/admins.js +79 -17
  6. package/dist/src/commands/admins.js.map +1 -1
  7. package/dist/src/commands/agent-sessions.js +2 -0
  8. package/dist/src/commands/agent-sessions.js.map +1 -1
  9. package/dist/src/commands/analytics.js +220 -18
  10. package/dist/src/commands/analytics.js.map +1 -1
  11. package/dist/src/commands/apps-children.js +2 -0
  12. package/dist/src/commands/apps-children.js.map +1 -1
  13. package/dist/src/commands/apps.js +19 -2
  14. package/dist/src/commands/apps.js.map +1 -1
  15. package/dist/src/commands/auth.js +11 -1
  16. package/dist/src/commands/auth.js.map +1 -1
  17. package/dist/src/commands/collections.js +13 -0
  18. package/dist/src/commands/collections.js.map +1 -1
  19. package/dist/src/commands/config.d.ts +1 -1
  20. package/dist/src/commands/config.js +40 -9
  21. package/dist/src/commands/config.js.map +1 -1
  22. package/dist/src/commands/connections.js +2 -0
  23. package/dist/src/commands/connections.js.map +1 -1
  24. package/dist/src/commands/database-type-configs.js +5 -3
  25. package/dist/src/commands/database-type-configs.js.map +1 -1
  26. package/dist/src/commands/databases.js +6 -4
  27. package/dist/src/commands/databases.js.map +1 -1
  28. package/dist/src/commands/db3-types.js +2 -0
  29. package/dist/src/commands/db3-types.js.map +1 -1
  30. package/dist/src/commands/db3.d.ts +12 -0
  31. package/dist/src/commands/db3.js +345 -11
  32. package/dist/src/commands/db3.js.map +1 -1
  33. package/dist/src/commands/documents.d.ts +52 -12
  34. package/dist/src/commands/documents.js +120 -29
  35. package/dist/src/commands/documents.js.map +1 -1
  36. package/dist/src/commands/email-templates.js +72 -0
  37. package/dist/src/commands/email-templates.js.map +1 -1
  38. package/dist/src/commands/functions.js +47 -10
  39. package/dist/src/commands/functions.js.map +1 -1
  40. package/dist/src/commands/groups.js +18 -3
  41. package/dist/src/commands/groups.js.map +1 -1
  42. package/dist/src/commands/init.js +7 -1
  43. package/dist/src/commands/init.js.map +1 -1
  44. package/dist/src/commands/integrations.js +80 -47
  45. package/dist/src/commands/integrations.js.map +1 -1
  46. package/dist/src/commands/metadata-category-configs.js +2 -0
  47. package/dist/src/commands/metadata-category-configs.js.map +1 -1
  48. package/dist/src/commands/metadata.js +41 -0
  49. package/dist/src/commands/metadata.js.map +1 -1
  50. package/dist/src/commands/prompts.js +73 -47
  51. package/dist/src/commands/prompts.js.map +1 -1
  52. package/dist/src/commands/rule-sets.js +2 -0
  53. package/dist/src/commands/rule-sets.js.map +1 -1
  54. package/dist/src/commands/schemas.d.ts +15 -0
  55. package/dist/src/commands/schemas.js +122 -0
  56. package/dist/src/commands/schemas.js.map +1 -0
  57. package/dist/src/commands/secrets.js +45 -3
  58. package/dist/src/commands/secrets.js.map +1 -1
  59. package/dist/src/commands/sessions.js +2 -0
  60. package/dist/src/commands/sessions.js.map +1 -1
  61. package/dist/src/commands/sync-schemas.d.ts +202 -0
  62. package/dist/src/commands/sync-schemas.js +629 -0
  63. package/dist/src/commands/sync-schemas.js.map +1 -0
  64. package/dist/src/commands/sync-user-properties.d.ts +118 -0
  65. package/dist/src/commands/sync-user-properties.js +276 -0
  66. package/dist/src/commands/sync-user-properties.js.map +1 -0
  67. package/dist/src/commands/sync.d.ts +243 -12
  68. package/dist/src/commands/sync.js +1474 -314
  69. package/dist/src/commands/sync.js.map +1 -1
  70. package/dist/src/commands/user-properties.d.ts +14 -0
  71. package/dist/src/commands/user-properties.js +79 -0
  72. package/dist/src/commands/user-properties.js.map +1 -0
  73. package/dist/src/commands/users.js +912 -18
  74. package/dist/src/commands/users.js.map +1 -1
  75. package/dist/src/commands/waitlist.js +39 -4
  76. package/dist/src/commands/waitlist.js.map +1 -1
  77. package/dist/src/lib/analytics-query.d.ts +58 -0
  78. package/dist/src/lib/analytics-query.js +134 -0
  79. package/dist/src/lib/analytics-query.js.map +1 -0
  80. package/dist/src/lib/api-client.d.ts +779 -95
  81. package/dist/src/lib/api-client.js +369 -166
  82. package/dist/src/lib/api-client.js.map +1 -1
  83. package/dist/src/lib/block-selector.d.ts +9 -15
  84. package/dist/src/lib/block-selector.js +9 -20
  85. package/dist/src/lib/block-selector.js.map +1 -1
  86. package/dist/src/lib/cli-manifest.d.ts +8 -0
  87. package/dist/src/lib/cli-manifest.js +10 -1
  88. package/dist/src/lib/cli-manifest.js.map +1 -1
  89. package/dist/src/lib/cli-version.d.ts +14 -0
  90. package/dist/src/lib/cli-version.js +38 -0
  91. package/dist/src/lib/cli-version.js.map +1 -0
  92. package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
  93. package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
  94. package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
  95. package/dist/src/lib/command-status.d.ts +110 -0
  96. package/dist/src/lib/command-status.js +184 -0
  97. package/dist/src/lib/command-status.js.map +1 -0
  98. package/dist/src/lib/config-object-descriptor.d.ts +6 -0
  99. package/dist/src/lib/config-object-descriptor.js +71 -0
  100. package/dist/src/lib/config-object-descriptor.js.map +1 -1
  101. package/dist/src/lib/config-toml.d.ts +11 -2
  102. package/dist/src/lib/config-toml.js +25 -2
  103. package/dist/src/lib/config-toml.js.map +1 -1
  104. package/dist/src/lib/data-input.d.ts +1 -1
  105. package/dist/src/lib/data-input.js +1 -1
  106. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
  107. package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
  108. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
  109. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +11 -1
  110. package/dist/src/lib/db-codegen/dbTypeIR.js +11 -5
  111. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
  112. package/dist/src/lib/db-type-records.d.ts +95 -0
  113. package/dist/src/lib/db-type-records.js +219 -0
  114. package/dist/src/lib/db-type-records.js.map +1 -0
  115. package/dist/src/lib/db3-export.d.ts +65 -9
  116. package/dist/src/lib/db3-export.js +159 -22
  117. package/dist/src/lib/db3-export.js.map +1 -1
  118. package/dist/src/lib/db3-index-output.d.ts +69 -3
  119. package/dist/src/lib/db3-index-output.js +142 -4
  120. package/dist/src/lib/db3-index-output.js.map +1 -1
  121. package/dist/src/lib/db3-type-models.d.ts +39 -7
  122. package/dist/src/lib/db3-type-models.js +138 -27
  123. package/dist/src/lib/db3-type-models.js.map +1 -1
  124. package/dist/src/lib/deprecation.d.ts +2 -2
  125. package/dist/src/lib/deprecation.js +2 -2
  126. package/dist/src/lib/experimental-apis.d.ts +36 -0
  127. package/dist/src/lib/experimental-apis.js +46 -0
  128. package/dist/src/lib/experimental-apis.js.map +1 -0
  129. package/dist/src/lib/file-attachment.d.ts +24 -0
  130. package/dist/src/lib/file-attachment.js +31 -0
  131. package/dist/src/lib/file-attachment.js.map +1 -0
  132. package/dist/src/lib/function-authorize-check.d.ts +1 -1
  133. package/dist/src/lib/function-authorize-check.js +2 -1
  134. package/dist/src/lib/function-authorize-check.js.map +1 -1
  135. package/dist/src/lib/function-authorize-view.js +4 -0
  136. package/dist/src/lib/function-authorize-view.js.map +1 -1
  137. package/dist/src/lib/function-bundle.d.ts +27 -5
  138. package/dist/src/lib/function-bundle.js +106 -7
  139. package/dist/src/lib/function-bundle.js.map +1 -1
  140. package/dist/src/lib/function-collect.d.ts +2 -0
  141. package/dist/src/lib/function-collect.js +36 -7
  142. package/dist/src/lib/function-collect.js.map +1 -1
  143. package/dist/src/lib/function-db-types.d.ts +57 -40
  144. package/dist/src/lib/function-db-types.js +246 -285
  145. package/dist/src/lib/function-db-types.js.map +1 -1
  146. package/dist/src/lib/function-document-types.d.ts +19 -7
  147. package/dist/src/lib/function-document-types.js +24 -12
  148. package/dist/src/lib/function-document-types.js.map +1 -1
  149. package/dist/src/lib/function-run.d.ts +1 -1
  150. package/dist/src/lib/function-run.js +1 -1
  151. package/dist/src/lib/function-run.js.map +1 -1
  152. package/dist/src/lib/function-schema-codegen.d.ts +58 -18
  153. package/dist/src/lib/function-schema-codegen.js +85 -74
  154. package/dist/src/lib/function-schema-codegen.js.map +1 -1
  155. package/dist/src/lib/function-schema-refs.d.ts +98 -0
  156. package/dist/src/lib/function-schema-refs.js +177 -0
  157. package/dist/src/lib/function-schema-refs.js.map +1 -0
  158. package/dist/src/lib/function-sync.d.ts +38 -4
  159. package/dist/src/lib/function-sync.js +83 -14
  160. package/dist/src/lib/function-sync.js.map +1 -1
  161. package/dist/src/lib/function-typecheck.d.ts +52 -0
  162. package/dist/src/lib/function-typecheck.js +171 -54
  163. package/dist/src/lib/function-typecheck.js.map +1 -1
  164. package/dist/src/lib/generated-build-flags.d.ts +13 -0
  165. package/dist/src/lib/generated-build-flags.js +14 -0
  166. package/dist/src/lib/generated-build-flags.js.map +1 -0
  167. package/dist/src/lib/generated-config-surfaces.d.ts +211 -11
  168. package/dist/src/lib/generated-config-surfaces.js +579 -69
  169. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  170. package/dist/src/lib/generated-sdk-types.d.ts +1 -1
  171. package/dist/src/lib/generated-sdk-types.js +1 -1
  172. package/dist/src/lib/generated-sdk-types.js.map +1 -1
  173. package/dist/src/lib/integration-test-request.d.ts +54 -0
  174. package/dist/src/lib/integration-test-request.js +207 -0
  175. package/dist/src/lib/integration-test-request.js.map +1 -0
  176. package/dist/src/lib/log-inspection.d.ts +3 -0
  177. package/dist/src/lib/log-inspection.js +1 -0
  178. package/dist/src/lib/log-inspection.js.map +1 -1
  179. package/dist/src/lib/metadata-report.d.ts +85 -0
  180. package/dist/src/lib/metadata-report.js +81 -0
  181. package/dist/src/lib/metadata-report.js.map +1 -0
  182. package/dist/src/lib/output.d.ts +1 -1
  183. package/dist/src/lib/output.js +1 -1
  184. package/dist/src/lib/platform-owned.js +5 -0
  185. package/dist/src/lib/platform-owned.js.map +1 -1
  186. package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
  187. package/dist/src/lib/primitive-declaration-names.js +22 -0
  188. package/dist/src/lib/primitive-declaration-names.js.map +1 -0
  189. package/dist/src/lib/primitive-declaration.d.ts +143 -0
  190. package/dist/src/lib/primitive-declaration.js +658 -0
  191. package/dist/src/lib/primitive-declaration.js.map +1 -0
  192. package/dist/src/lib/prompt-schema-codegen.d.ts +36 -12
  193. package/dist/src/lib/prompt-schema-codegen.js +82 -98
  194. package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
  195. package/dist/src/lib/prompt-schema-document.d.ts +35 -0
  196. package/dist/src/lib/prompt-schema-document.js +92 -0
  197. package/dist/src/lib/prompt-schema-document.js.map +1 -0
  198. package/dist/src/lib/prompt-schema-refs.d.ts +164 -0
  199. package/dist/src/lib/prompt-schema-refs.js +452 -0
  200. package/dist/src/lib/prompt-schema-refs.js.map +1 -0
  201. package/dist/src/lib/records-verbs.d.ts +12 -2
  202. package/dist/src/lib/records-verbs.js +7 -2
  203. package/dist/src/lib/records-verbs.js.map +1 -1
  204. package/dist/src/lib/register-commands.d.ts +28 -0
  205. package/dist/src/lib/register-commands.js +101 -0
  206. package/dist/src/lib/register-commands.js.map +1 -0
  207. package/dist/src/lib/retired-imports.d.ts +53 -0
  208. package/dist/src/lib/retired-imports.js +120 -0
  209. package/dist/src/lib/retired-imports.js.map +1 -0
  210. package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
  211. package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
  212. package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
  213. package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
  214. package/dist/src/lib/schema-codegen/generated-db3-bridge.js +221 -0
  215. package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
  216. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
  217. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
  218. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
  219. package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +209 -0
  220. package/dist/src/lib/schema-codegen/generated-field-grammar.js +379 -0
  221. package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
  222. package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
  223. package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
  224. package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
  225. package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
  226. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
  227. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
  228. package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +129 -0
  229. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +154 -1
  230. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -1
  231. package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
  232. package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
  233. package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
  234. package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
  235. package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
  236. package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
  237. package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
  238. package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
  239. package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
  240. package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
  241. package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
  242. package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
  243. package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
  244. package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
  245. package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
  246. package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
  247. package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
  248. package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
  249. package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
  250. package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
  251. package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
  252. package/dist/src/lib/schema-codegen/schemaToTs.d.ts +40 -13
  253. package/dist/src/lib/schema-codegen/schemaToTs.js +124 -160
  254. package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -1
  255. package/dist/src/lib/schema-codegen/valuesLists.d.ts +35 -0
  256. package/dist/src/lib/schema-codegen/valuesLists.js +128 -0
  257. package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
  258. package/dist/src/lib/schema-family-index.d.ts +228 -0
  259. package/dist/src/lib/schema-family-index.js +813 -0
  260. package/dist/src/lib/schema-family-index.js.map +1 -0
  261. package/dist/src/lib/schema-pins.d.ts +82 -0
  262. package/dist/src/lib/schema-pins.js +198 -0
  263. package/dist/src/lib/schema-pins.js.map +1 -0
  264. package/dist/src/lib/schema-preview.d.ts +244 -0
  265. package/dist/src/lib/schema-preview.js +498 -0
  266. package/dist/src/lib/schema-preview.js.map +1 -0
  267. package/dist/src/lib/skill-installer.d.ts +2 -2
  268. package/dist/src/lib/skill-installer.js +2 -21
  269. package/dist/src/lib/skill-installer.js.map +1 -1
  270. package/dist/src/lib/step-run-table.d.ts +1 -2
  271. package/dist/src/lib/step-run-table.js +1 -2
  272. package/dist/src/lib/step-run-table.js.map +1 -1
  273. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +2 -1
  274. package/dist/src/lib/swift-codegen/agentGenerator.js +24 -22
  275. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
  276. package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
  277. package/dist/src/lib/swift-codegen/banners.js +12 -0
  278. package/dist/src/lib/swift-codegen/banners.js.map +1 -1
  279. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
  280. package/dist/src/lib/swift-codegen/functionGenerator.js +167 -50
  281. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
  282. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +31 -7
  283. package/dist/src/lib/swift-codegen/schemaToSwift.js +213 -177
  284. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
  285. package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +45 -0
  286. package/dist/src/lib/swift-codegen/sharedGenerator.js +120 -0
  287. package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
  288. package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
  289. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
  290. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
  291. package/dist/src/lib/sync-resource-types.d.ts +37 -5
  292. package/dist/src/lib/sync-resource-types.js +53 -5
  293. package/dist/src/lib/sync-resource-types.js.map +1 -1
  294. package/dist/src/lib/sync-selectors.d.ts +7 -0
  295. package/dist/src/lib/sync-selectors.js +22 -2
  296. package/dist/src/lib/sync-selectors.js.map +1 -1
  297. package/dist/src/lib/test-runs.d.ts +45 -0
  298. package/dist/src/lib/test-runs.js +150 -0
  299. package/dist/src/lib/test-runs.js.map +1 -0
  300. package/dist/src/lib/test-users.d.ts +25 -0
  301. package/dist/src/lib/test-users.js +36 -0
  302. package/dist/src/lib/test-users.js.map +1 -0
  303. package/dist/src/lib/toml-database-config.d.ts +2 -1
  304. package/dist/src/lib/toml-database-config.js +4 -3
  305. package/dist/src/lib/toml-database-config.js.map +1 -1
  306. package/dist/src/lib/toml-scalar-edit.js +6 -4
  307. package/dist/src/lib/toml-scalar-edit.js.map +1 -1
  308. package/dist/src/lib/user-index.d.ts +80 -0
  309. package/dist/src/lib/user-index.js +166 -0
  310. package/dist/src/lib/user-index.js.map +1 -0
  311. package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
  312. package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
  313. package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
  314. package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
  315. package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
  316. package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
  317. package/dist/src/lib/user-walk.d.ts +31 -0
  318. package/dist/src/lib/user-walk.js +102 -0
  319. package/dist/src/lib/user-walk.js.map +1 -0
  320. package/dist/src/lib/worker-perf-format.d.ts +22 -0
  321. package/dist/src/lib/worker-perf-format.js +27 -0
  322. package/dist/src/lib/worker-perf-format.js.map +1 -0
  323. package/dist/src/types/index.d.ts +13 -34
  324. package/package.json +5 -3
@@ -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
  *
@@ -1580,6 +1581,12 @@ export interface ManifestAuthorizeCallers {
1580
1581
  * existed carries no key, and absent reads as closed.
1581
1582
  */
1582
1583
  db3?: boolean;
1584
+ /**
1585
+ * #5393 — a users walk's batch door: `true` for every walk, or the keys of
1586
+ * the functions whose walks are admitted. Optional like `db3`: absent reads
1587
+ * as closed.
1588
+ */
1589
+ usersBatch?: boolean | string[];
1583
1590
  }
1584
1591
  /** What a version's `authorize` admits, as collected (#4730). */
1585
1592
  export interface ManifestAuthorize {
@@ -3001,11 +3008,9 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
3001
3008
  *
3002
3009
  * A tool or event schema reaches a provider only through a translation that
3003
3010
  * preserves its meaning; anything else is refused at push, naming the path, the
3004
- * keyword and the provider. The lossy `sanitizeSchemaForGemini` clean-up
3005
- * (`src/services/block-executor.ts`) is NOT reused here: it drops unions and
3006
- * references and rewrites a free-form object as a string, all of which change
3007
- * what the model may produce. It stays where it is, for chat output schemas
3008
- * (the project's non-goal: chat is unchanged).
3011
+ * keyword and the provider. A chat prompt's output schema goes to Gemini
3012
+ * through this translator too (#5538), in place of the lossy clean-up that
3013
+ * dropped unions and references and rewrote a free-form object as a string.
3009
3014
  *
3010
3015
  * ## What "lossless" means (spec §3)
3011
3016
  *
@@ -3046,9 +3051,14 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
3046
3051
  * `items`. Lowercase type names are accepted (the existing `responseSchema`
3047
3052
  * path already sends them).
3048
3053
  *
3049
- * Pure and dependency-free, like every module under `src/config-surface/`, and
3050
- * vendored into the CLI artifact after `agent-declaration.ts` so the push
3051
- * preflight and the admin routes refuse exactly the same schemas.
3054
+ * Which keywords pass, drop, take a rule or are refused is the keyword table's
3055
+ * `gemini` column (`SCHEMA_KEYWORDS` in `src/function-runs/schema-descriptor.ts`,
3056
+ * #5529), so the translator, the validator and the push refusal list read one
3057
+ * classification. That module is dependency-free and vendored to the CLI whole,
3058
+ * so this one stays pure: the CLI artifact generator rewrites its import to the
3059
+ * vendored copy. This module is vendored into the CLI artifact after
3060
+ * `agent-declaration.ts` so the push preflight and the admin routes refuse
3061
+ * exactly the same schemas.
3052
3062
  */
3053
3063
  /** The providers a prompt config may name. */
3054
3064
  export type SchemaProvider = "openrouter" | "gemini";
@@ -3071,6 +3081,27 @@ export type SchemaTranslation = {
3071
3081
  ok: false;
3072
3082
  refusals: SchemaTranslationRefusal[];
3073
3083
  };
3084
+ /**
3085
+ * What Gemini's function `Schema` does with one keyword, from the keyword
3086
+ * table: `pass` (spelled the same way, with the same meaning — `required`
3087
+ * among them, and Gemini's own `nullable`, `propertyOrdering` and `example`),
3088
+ * `drop` (an annotation with no value meaning, dropped in silence, spec §3),
3089
+ * `rule` (handled by its own rule below) or `refuse`. A key the table does not
3090
+ * name is refused: a keyword nobody classified could mean anything.
3091
+ */
3092
+ export declare function geminiKeywordVerdict(keyword: string): GeminiKeywordVerdict;
3093
+ /**
3094
+ * Keywords handled by their own rule below: exactly the table's `rule` rows,
3095
+ * which the keyword-table conformance test holds it to.
3096
+ */
3097
+ export declare const GEMINI_STRUCTURAL_KEYWORDS: readonly ["type", "enum", "const", "format", "properties", "items", "anyOf", "oneOf", "additionalProperties"];
3098
+ /**
3099
+ * Why Gemini's function `Schema` cannot carry a refused keyword, for the ones
3100
+ * with a reason of their own. Each is refused rather than dropped: dropping any
3101
+ * of them widens what the model may produce. A refused keyword with no entry
3102
+ * here gets the generic reason.
3103
+ */
3104
+ export declare const GEMINI_REFUSAL_REASONS: Readonly<Record<string, string>>;
3074
3105
  /** What a message calls the root. */
3075
3106
  export declare function schemaPathLabel(path: string): string;
3076
3107
  /**
@@ -3150,6 +3181,143 @@ export type AgentSchemaDeficit = {
3150
3181
  export declare function agentSchemaTranslationDeficits(input: AgentSchemaTranslationInput): AgentSchemaDeficit[];
3151
3182
  /** The `AGENT_SCHEMA_NOT_TRANSLATABLE` refusal one deficit renders as. */
3152
3183
  export declare function agentSchemaDeficitRefusal(deficit: AgentSchemaDeficit): AgentRefusal;
3184
+ /**
3185
+ * What a prompt push refuses — #5536 (project `unified-schemas` phase 5)
3186
+ * reported it, #5538 (phase 6, intent criterion 8) refuses it.
3187
+ *
3188
+ * Two checks judge a prompt's schemas: the lossless Gemini translator
3189
+ * (`translateSchemaForProvider`) on the output schemas a Gemini config sends,
3190
+ * and the engine (the function push's rules) on every schema. A write
3191
+ * carrying a keyword either would refuse is refused, each keyword named with
3192
+ * its fix and a code: `PROMPT_SCHEMA_NOT_TRANSLATABLE` for the translator,
3193
+ * `PROMPT_SCHEMA_UNSUPPORTED_KEYWORD` for the engine. The admin prompt routes,
3194
+ * the CLI preflight (through the vendored copy), the Gemini call path and the
3195
+ * audit (`scripts/lib/schema-audit-core.ts`) all read this module, so they
3196
+ * cannot disagree about which schemas are refused.
3197
+ *
3198
+ * An agent's translator refusals are not here: they are already the push
3199
+ * error `AGENT_SCHEMA_NOT_TRANSLATABLE` (DSO-5536-002).
3200
+ */
3201
+ /**
3202
+ * The code a prompt write is refused with for a keyword the lossless Gemini
3203
+ * translator cannot carry, and the code a run of a stored prompt whose output
3204
+ * schema it cannot carry fails with.
3205
+ */
3206
+ export declare const PROMPT_SCHEMA_NOT_TRANSLATABLE = "PROMPT_SCHEMA_NOT_TRANSLATABLE";
3207
+ /** The code a prompt write is refused with for a keyword or a shape the schema check would not enforce. */
3208
+ export declare const PROMPT_SCHEMA_UNSUPPORTED_KEYWORD = "PROMPT_SCHEMA_UNSUPPORTED_KEYWORD";
3209
+ /** One keyword the engine would not enforce: where, which, and why (with its fix). */
3210
+ export interface EngineSchemaRefusal {
3211
+ /** The dotted path from the schema root; `""` is the root. */
3212
+ path: string;
3213
+ keyword: string;
3214
+ reason: string;
3215
+ }
3216
+ /**
3217
+ * The fix for each keyword the engine refuses: one entry per refused row of
3218
+ * the keyword table, and no other key.
3219
+ */
3220
+ export declare const ENGINE_REFUSAL_FIXES: Readonly<Record<string, string>>;
3221
+ /**
3222
+ * The fix for a translator refusal whose reason states only what would be
3223
+ * lost, appended to the refusal line (DSO-5536-008: the translator's own
3224
+ * texts are refusal texts elsewhere and stay as they are). `"*"` is the fix
3225
+ * for a keyword the translator has no reason of its own for.
3226
+ */
3227
+ export declare const TRANSLATOR_REFUSAL_FIXES: Readonly<Record<string, string>>;
3228
+ /**
3229
+ * Every keyword of `schema` the function push's rules refuse, over the nodes
3230
+ * they check (the root, `properties`, `items`, `anyOf`, `oneOf`; never
3231
+ * `$defs`): the keyword table's refused class, each reason ending with its
3232
+ * fix, and the shape rules. An enforced constraint (`uniqueItems`,
3233
+ * `multipleOf`, …) is never one: only the translator refuses those.
3234
+ *
3235
+ * The walk keeps its own work stack rather than recursing: the compiler
3236
+ * accepts a schema nested deeper than the call stack, and every refusal must
3237
+ * still be named for it.
3238
+ */
3239
+ export declare function engineSchemaRefusals(schema: unknown, path?: string): EngineSchemaRefusal[];
3240
+ /**
3241
+ * The schemas an agent's model reads from its declaration (a table or one
3242
+ * JSON string): each client tool's `inputSchema` and `outputSchema`, each
3243
+ * event's `schema` and the turn context's. Never a server tool's: those are
3244
+ * its function's, judged at the function push.
3245
+ */
3246
+ export declare function agentDeclarationSchemas(agent: unknown): Array<{
3247
+ subject: string;
3248
+ schema: unknown;
3249
+ }>;
3250
+ /** What `promptSchemaDeficits` judges: the schema fields a write carries, and the prompt's configs. */
3251
+ export interface PromptSchemaDeficitInput {
3252
+ inputSchema?: unknown;
3253
+ outputSchema?: unknown;
3254
+ /** `[prompt.agent]`: a table or one JSON string. */
3255
+ agent?: unknown;
3256
+ /** The configs that decide whether `outputSchema` targets Gemini; each config's own `outputSchema` is judged too. */
3257
+ configs?: ReadonlyArray<{
3258
+ name: string;
3259
+ provider: string;
3260
+ status?: string | null;
3261
+ outputSchema?: unknown;
3262
+ }>;
3263
+ }
3264
+ /** One keyword the translator or the engine would refuse, in one schema of a prompt. */
3265
+ export interface PromptSchemaDeficit {
3266
+ /** `inputSchema`, `outputSchema`, `config "fast" outputSchema`, `agent tool "pick" inputSchema`, … */
3267
+ subject: string;
3268
+ field: "inputSchema" | "outputSchema" | "agent";
3269
+ /** The config whose own `outputSchema` this is. */
3270
+ config?: string;
3271
+ check: "translator" | "engine";
3272
+ provider?: "gemini";
3273
+ /** The dotted path from the schema root; `""` is the root. */
3274
+ path: string;
3275
+ keyword: string;
3276
+ reason: string;
3277
+ }
3278
+ /**
3279
+ * `translateSchemaForProvider(schema, "gemini")`, failing closed. The
3280
+ * translator recurses, so a schema nested deeper than the call stack cannot be
3281
+ * translated: it is one refusal about the whole document (`(schema)`, the
3282
+ * engine's spelling), so a schema Gemini would never be sent is refused at
3283
+ * push and at call time rather than accepted unread. Any other error is a
3284
+ * fault and propagates.
3285
+ */
3286
+ export declare function translateSchemaForGemini(schema: unknown): SchemaTranslation;
3287
+ /** The translator's refusals for one schema: `translateSchemaForGemini`'s, or none. */
3288
+ export declare function translatorRefusals(schema: unknown): SchemaTranslationRefusal[];
3289
+ /**
3290
+ * Every keyword of a prompt's schemas the translator or the engine would
3291
+ * refuse. The translator judges `outputSchema` when a non-archived config
3292
+ * names Gemini (case-insensitive), and each Gemini config's own
3293
+ * `outputSchema` unless that config is archived; `inputSchema` is never
3294
+ * translated, and an agent's schemas are judged by the engine only. Order:
3295
+ * `inputSchema`, `outputSchema`, the agent's schemas, then each config; per
3296
+ * schema the translator first. A top-level value that is no schema object
3297
+ * is reported once, by the engine.
3298
+ */
3299
+ export declare function promptSchemaDeficits(input: PromptSchemaDeficitInput): PromptSchemaDeficit[];
3300
+ /**
3301
+ * The refusal line for one deficit: the subject, the path, the keyword, why,
3302
+ * and the fix. A translator reason with no fix of its own names what Gemini
3303
+ * needs instead (`properties`, `type`, the overflow's "flatten the schema").
3304
+ */
3305
+ export declare function promptSchemaRefusalLine(deficit: PromptSchemaDeficit): string;
3306
+ /** The code a write is refused with for one deficit. */
3307
+ export declare function promptSchemaDeficitCode(deficit: PromptSchemaDeficit): typeof PROMPT_SCHEMA_NOT_TRANSLATABLE | typeof PROMPT_SCHEMA_UNSUPPORTED_KEYWORD;
3308
+ /** One entry of a refused write's `details.refusals`. */
3309
+ export interface PromptSchemaRefusalEntry {
3310
+ code: typeof PROMPT_SCHEMA_NOT_TRANSLATABLE | typeof PROMPT_SCHEMA_UNSUPPORTED_KEYWORD;
3311
+ /** `promptSchemaRefusalLine` of the deficit. */
3312
+ message: string;
3313
+ subject: string;
3314
+ field: PromptSchemaDeficit["field"];
3315
+ config?: string;
3316
+ path: string;
3317
+ keyword: string;
3318
+ }
3319
+ /** A refused write's `details.refusals`: one entry per deficit, in `promptSchemaDeficits` order. */
3320
+ export declare function promptSchemaRefusals(deficits: readonly PromptSchemaDeficit[]): PromptSchemaRefusalEntry[];
3153
3321
  /**
3154
3322
  * A change to a server function that an agent uses — issue #4441.
3155
3323
  *
@@ -3401,6 +3569,37 @@ export declare function accessAmbiguousMessage(functionKey: string): string;
3401
3569
  export declare const FUNCTION_ACCESS_FROZEN_REQUEST: string;
3402
3570
  export declare const TEST_CASE_SURFACE: ConfigObjectSurface;
3403
3571
  export declare const APP_SETTINGS_SURFACE: ConfigObjectSurface;
3572
+ /**
3573
+ * The `user-properties` configuration object's definition (#5385, project
3574
+ * `user-index-properties` phase 2).
3575
+ *
3576
+ * `user-properties.toml` is a root singleton beside `app.toml`, so — like
3577
+ * `app-settings` and `test-case` — it is named explicitly rather than reached
3578
+ * through `SYNC_RESOURCE_TYPES`. Its keys are the app's own: each
3579
+ * `[fields.<name>]` table declares a property in the db3 field grammar plus
3580
+ * `client`, and each `[[unique_constraints]]` entry names two or more of them.
3581
+ * There is no fixed key/value table to define, so the surface declares
3582
+ * `noFieldTable`; the file is parsed, normalized and judged by one module,
3583
+ * `src/user-index/properties-schema.ts`, which the CLI vendors byte for byte
3584
+ * (`cli/src/lib/user-properties/generated-properties-schema.ts`) and which
3585
+ * `config push`'s preflight runs before anything is applied. The pushed
3586
+ * schema is stored on the app's `UserPropertiesConfig` row.
3587
+ */
3588
+ export declare const USER_PROPERTIES_SURFACE: ConfigObjectSurface;
3589
+ /**
3590
+ * The `schema` configuration object's definition (#5532, project
3591
+ * `unified-schemas` phase 3).
3592
+ *
3593
+ * `schemas/<file>.toml` holds shared shapes: each `[defs.<Name>]` table is
3594
+ * one JSON Schema document, named by the file's stem and the def's name
3595
+ * (`schemas:<file>#/$defs/<Name>`). There is no fixed key/value table to
3596
+ * define, so the surface declares `noFieldTable`; the file is checked and
3597
+ * compiled by one module, `src/function-runs/schema-file.ts`, which the CLI
3598
+ * vendors (`cli/src/lib/schema-codegen/generated-schema-file.ts`), runs in
3599
+ * `config push`'s preflight and sends compiled with the source, and which the
3600
+ * push route runs again.
3601
+ */
3602
+ export declare const SCHEMA_FILE_SURFACE: ConfigObjectSurface;
3404
3603
  /**
3405
3604
  * The configuration-object registry (issue #2644).
3406
3605
  *
@@ -3417,9 +3616,10 @@ export declare const APP_SETTINGS_SURFACE: ConfigObjectSurface;
3417
3616
  /**
3418
3617
  * Every configuration object whose field surface is defined here.
3419
3618
  *
3420
- * One entry per `SYNC_RESOURCE_TYPES` label, plus the two surfaces that
3421
- * round-trip without being a per-entity file: `app-settings` (`app.toml`) and
3422
- * `test-case` (`<key>.tests/`). Nothing that syncs sits outside the registry —
3619
+ * One entry per `SYNC_RESOURCE_TYPES` label, plus the three surfaces that
3620
+ * round-trip without being a per-entity file: `app-settings` (`app.toml`),
3621
+ * `user-properties` (`user-properties.toml`, #5385) and `test-case`
3622
+ * (`<key>.tests/`). Nothing that syncs sits outside the registry —
3423
3623
  * `PENDING_MIGRATION`, the migration's temporary exemption list, is gone as of
3424
3624
  * phase 3, so a new synced type has nowhere to be parked and fails the registry
3425
3625
  * guard until it is defined (#2644 criterion 3).