primitive-admin 1.2.0-alpha.14 → 1.2.0-alpha.16

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 (400) hide show
  1. package/README.md +181 -73
  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 +80 -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 +181 -12
  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-transitions.d.ts +39 -0
  14. package/dist/src/commands/apps-transitions.js +198 -0
  15. package/dist/src/commands/apps-transitions.js.map +1 -0
  16. package/dist/src/commands/apps.d.ts +11 -0
  17. package/dist/src/commands/apps.js +65 -3
  18. package/dist/src/commands/apps.js.map +1 -1
  19. package/dist/src/commands/auth-sessions.js +2 -0
  20. package/dist/src/commands/auth-sessions.js.map +1 -1
  21. package/dist/src/commands/auth.js +16 -1
  22. package/dist/src/commands/auth.js.map +1 -1
  23. package/dist/src/commands/blob-buckets.js +2 -0
  24. package/dist/src/commands/blob-buckets.js.map +1 -1
  25. package/dist/src/commands/collections.js +2 -0
  26. package/dist/src/commands/collections.js.map +1 -1
  27. package/dist/src/commands/comparisons.js +2 -0
  28. package/dist/src/commands/comparisons.js.map +1 -1
  29. package/dist/src/commands/config.d.ts +1 -1
  30. package/dist/src/commands/config.js +42 -9
  31. package/dist/src/commands/config.js.map +1 -1
  32. package/dist/src/commands/connections.js +2 -0
  33. package/dist/src/commands/connections.js.map +1 -1
  34. package/dist/src/commands/database-type-configs.js +5 -3
  35. package/dist/src/commands/database-type-configs.js.map +1 -1
  36. package/dist/src/commands/databases.js +6 -4
  37. package/dist/src/commands/databases.js.map +1 -1
  38. package/dist/src/commands/db3-types.js +2 -0
  39. package/dist/src/commands/db3-types.js.map +1 -1
  40. package/dist/src/commands/db3.d.ts +12 -0
  41. package/dist/src/commands/db3.js +408 -31
  42. package/dist/src/commands/db3.js.map +1 -1
  43. package/dist/src/commands/documents.d.ts +52 -12
  44. package/dist/src/commands/documents.js +120 -29
  45. package/dist/src/commands/documents.js.map +1 -1
  46. package/dist/src/commands/email-templates.js +74 -0
  47. package/dist/src/commands/email-templates.js.map +1 -1
  48. package/dist/src/commands/env.js +2 -0
  49. package/dist/src/commands/env.js.map +1 -1
  50. package/dist/src/commands/functions.js +90 -11
  51. package/dist/src/commands/functions.js.map +1 -1
  52. package/dist/src/commands/groups.js +20 -3
  53. package/dist/src/commands/groups.js.map +1 -1
  54. package/dist/src/commands/guides.js +2 -0
  55. package/dist/src/commands/guides.js.map +1 -1
  56. package/dist/src/commands/hosting.d.ts +8 -0
  57. package/dist/src/commands/hosting.js +346 -0
  58. package/dist/src/commands/hosting.js.map +1 -0
  59. package/dist/src/commands/init.js +9 -1
  60. package/dist/src/commands/init.js.map +1 -1
  61. package/dist/src/commands/integrations.js +82 -47
  62. package/dist/src/commands/integrations.js.map +1 -1
  63. package/dist/src/commands/locks.js +2 -0
  64. package/dist/src/commands/locks.js.map +1 -1
  65. package/dist/src/commands/metadata-category-configs.js +2 -0
  66. package/dist/src/commands/metadata-category-configs.js.map +1 -1
  67. package/dist/src/commands/metadata.js +41 -0
  68. package/dist/src/commands/metadata.js.map +1 -1
  69. package/dist/src/commands/prompts.js +75 -47
  70. package/dist/src/commands/prompts.js.map +1 -1
  71. package/dist/src/commands/rate-counters.d.ts +19 -0
  72. package/dist/src/commands/rate-counters.js +104 -0
  73. package/dist/src/commands/rate-counters.js.map +1 -0
  74. package/dist/src/commands/rule-sets.js +2 -0
  75. package/dist/src/commands/rule-sets.js.map +1 -1
  76. package/dist/src/commands/schemas.d.ts +15 -0
  77. package/dist/src/commands/schemas.js +122 -0
  78. package/dist/src/commands/schemas.js.map +1 -0
  79. package/dist/src/commands/secrets.js +47 -3
  80. package/dist/src/commands/secrets.js.map +1 -1
  81. package/dist/src/commands/sessions.js +2 -0
  82. package/dist/src/commands/sessions.js.map +1 -1
  83. package/dist/src/commands/skill.js +2 -0
  84. package/dist/src/commands/skill.js.map +1 -1
  85. package/dist/src/commands/sync-schemas.d.ts +202 -0
  86. package/dist/src/commands/sync-schemas.js +629 -0
  87. package/dist/src/commands/sync-schemas.js.map +1 -0
  88. package/dist/src/commands/sync-user-properties.d.ts +118 -0
  89. package/dist/src/commands/sync-user-properties.js +276 -0
  90. package/dist/src/commands/sync-user-properties.js.map +1 -0
  91. package/dist/src/commands/sync.d.ts +344 -14
  92. package/dist/src/commands/sync.js +1834 -345
  93. package/dist/src/commands/sync.js.map +1 -1
  94. package/dist/src/commands/tokens.js +2 -0
  95. package/dist/src/commands/tokens.js.map +1 -1
  96. package/dist/src/commands/transitions.d.ts +54 -0
  97. package/dist/src/commands/transitions.js +418 -0
  98. package/dist/src/commands/transitions.js.map +1 -0
  99. package/dist/src/commands/usage.d.ts +18 -0
  100. package/dist/src/commands/usage.js +343 -0
  101. package/dist/src/commands/usage.js.map +1 -0
  102. package/dist/src/commands/user-properties.d.ts +14 -0
  103. package/dist/src/commands/user-properties.js +79 -0
  104. package/dist/src/commands/user-properties.js.map +1 -0
  105. package/dist/src/commands/users.js +878 -16
  106. package/dist/src/commands/users.js.map +1 -1
  107. package/dist/src/commands/vars.js +2 -0
  108. package/dist/src/commands/vars.js.map +1 -1
  109. package/dist/src/commands/waitlist.js +39 -4
  110. package/dist/src/commands/waitlist.js.map +1 -1
  111. package/dist/src/lib/analytics-query.d.ts +58 -0
  112. package/dist/src/lib/analytics-query.js +134 -0
  113. package/dist/src/lib/analytics-query.js.map +1 -0
  114. package/dist/src/lib/api-client.d.ts +1354 -97
  115. package/dist/src/lib/api-client.js +513 -164
  116. package/dist/src/lib/api-client.js.map +1 -1
  117. package/dist/src/lib/app-settings-descriptor.d.ts +1 -1
  118. package/dist/src/lib/app-settings-descriptor.js +6 -0
  119. package/dist/src/lib/app-settings-descriptor.js.map +1 -1
  120. package/dist/src/lib/auth-flow.d.ts +33 -0
  121. package/dist/src/lib/auth-flow.js +404 -13
  122. package/dist/src/lib/auth-flow.js.map +1 -1
  123. package/dist/src/lib/block-selector.d.ts +9 -15
  124. package/dist/src/lib/block-selector.js +9 -20
  125. package/dist/src/lib/block-selector.js.map +1 -1
  126. package/dist/src/lib/cli-manifest.d.ts +9 -0
  127. package/dist/src/lib/cli-manifest.js +10 -1
  128. package/dist/src/lib/cli-manifest.js.map +1 -1
  129. package/dist/src/lib/cli-version.d.ts +14 -0
  130. package/dist/src/lib/cli-version.js +38 -0
  131. package/dist/src/lib/cli-version.js.map +1 -0
  132. package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
  133. package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
  134. package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
  135. package/dist/src/lib/command-groups.d.ts +30 -0
  136. package/dist/src/lib/command-groups.js +109 -0
  137. package/dist/src/lib/command-groups.js.map +1 -0
  138. package/dist/src/lib/command-status.d.ts +147 -0
  139. package/dist/src/lib/command-status.js +266 -0
  140. package/dist/src/lib/command-status.js.map +1 -0
  141. package/dist/src/lib/config-object-descriptor.d.ts +6 -0
  142. package/dist/src/lib/config-object-descriptor.js +71 -1
  143. package/dist/src/lib/config-object-descriptor.js.map +1 -1
  144. package/dist/src/lib/config-toml.d.ts +11 -2
  145. package/dist/src/lib/config-toml.js +25 -2
  146. package/dist/src/lib/config-toml.js.map +1 -1
  147. package/dist/src/lib/data-input.d.ts +1 -1
  148. package/dist/src/lib/data-input.js +1 -1
  149. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
  150. package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
  151. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
  152. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +18 -1
  153. package/dist/src/lib/db-codegen/dbTypeIR.js +14 -5
  154. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
  155. package/dist/src/lib/db-type-records.d.ts +106 -0
  156. package/dist/src/lib/db-type-records.js +224 -0
  157. package/dist/src/lib/db-type-records.js.map +1 -0
  158. package/dist/src/lib/db3-export.d.ts +51 -14
  159. package/dist/src/lib/db3-export.js +136 -28
  160. package/dist/src/lib/db3-export.js.map +1 -1
  161. package/dist/src/lib/db3-index-output.d.ts +92 -4
  162. package/dist/src/lib/db3-index-output.js +183 -11
  163. package/dist/src/lib/db3-index-output.js.map +1 -1
  164. package/dist/src/lib/db3-type-models.d.ts +49 -7
  165. package/dist/src/lib/db3-type-models.js +159 -28
  166. package/dist/src/lib/db3-type-models.js.map +1 -1
  167. package/dist/src/lib/deprecation.d.ts +2 -2
  168. package/dist/src/lib/deprecation.js +2 -2
  169. package/dist/src/lib/experimental-apis.d.ts +36 -0
  170. package/dist/src/lib/experimental-apis.js +46 -0
  171. package/dist/src/lib/experimental-apis.js.map +1 -0
  172. package/dist/src/lib/file-attachment.d.ts +24 -0
  173. package/dist/src/lib/file-attachment.js +31 -0
  174. package/dist/src/lib/file-attachment.js.map +1 -0
  175. package/dist/src/lib/function-authorize-check.d.ts +1 -1
  176. package/dist/src/lib/function-authorize-check.js +2 -1
  177. package/dist/src/lib/function-authorize-check.js.map +1 -1
  178. package/dist/src/lib/function-authorize-view.d.ts +12 -0
  179. package/dist/src/lib/function-authorize-view.js +38 -0
  180. package/dist/src/lib/function-authorize-view.js.map +1 -1
  181. package/dist/src/lib/function-bundle.d.ts +27 -5
  182. package/dist/src/lib/function-bundle.js +106 -7
  183. package/dist/src/lib/function-bundle.js.map +1 -1
  184. package/dist/src/lib/function-collect.d.ts +15 -0
  185. package/dist/src/lib/function-collect.js +73 -14
  186. package/dist/src/lib/function-collect.js.map +1 -1
  187. package/dist/src/lib/function-db-types.d.ts +63 -40
  188. package/dist/src/lib/function-db-types.js +289 -293
  189. package/dist/src/lib/function-db-types.js.map +1 -1
  190. package/dist/src/lib/function-document-types.d.ts +19 -7
  191. package/dist/src/lib/function-document-types.js +24 -12
  192. package/dist/src/lib/function-document-types.js.map +1 -1
  193. package/dist/src/lib/function-lint.d.ts +24 -1
  194. package/dist/src/lib/function-lint.js +123 -1
  195. package/dist/src/lib/function-lint.js.map +1 -1
  196. package/dist/src/lib/function-run.d.ts +1 -1
  197. package/dist/src/lib/function-run.js +1 -1
  198. package/dist/src/lib/function-run.js.map +1 -1
  199. package/dist/src/lib/function-schema-codegen.d.ts +85 -21
  200. package/dist/src/lib/function-schema-codegen.js +191 -85
  201. package/dist/src/lib/function-schema-codegen.js.map +1 -1
  202. package/dist/src/lib/function-schema-refs.d.ts +98 -0
  203. package/dist/src/lib/function-schema-refs.js +177 -0
  204. package/dist/src/lib/function-schema-refs.js.map +1 -0
  205. package/dist/src/lib/function-sync.d.ts +38 -4
  206. package/dist/src/lib/function-sync.js +91 -14
  207. package/dist/src/lib/function-sync.js.map +1 -1
  208. package/dist/src/lib/function-typecheck.d.ts +52 -0
  209. package/dist/src/lib/function-typecheck.js +171 -54
  210. package/dist/src/lib/function-typecheck.js.map +1 -1
  211. package/dist/src/lib/generated-build-flags.d.ts +13 -0
  212. package/dist/src/lib/generated-build-flags.js +14 -0
  213. package/dist/src/lib/generated-build-flags.js.map +1 -0
  214. package/dist/src/lib/generated-command-status.d.ts +6 -0
  215. package/dist/src/lib/generated-command-status.js +469 -0
  216. package/dist/src/lib/generated-command-status.js.map +1 -0
  217. package/dist/src/lib/generated-config-surfaces.d.ts +239 -14
  218. package/dist/src/lib/generated-config-surfaces.js +670 -85
  219. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  220. package/dist/src/lib/generated-sdk-types.d.ts +1 -1
  221. package/dist/src/lib/generated-sdk-types.js +1 -1
  222. package/dist/src/lib/generated-sdk-types.js.map +1 -1
  223. package/dist/src/lib/hosting-build.d.ts +97 -0
  224. package/dist/src/lib/hosting-build.js +204 -0
  225. package/dist/src/lib/hosting-build.js.map +1 -0
  226. package/dist/src/lib/hosting-client.d.ts +167 -0
  227. package/dist/src/lib/hosting-client.js +340 -0
  228. package/dist/src/lib/hosting-client.js.map +1 -0
  229. package/dist/src/lib/hosting-environments.d.ts +32 -0
  230. package/dist/src/lib/hosting-environments.js +74 -0
  231. package/dist/src/lib/hosting-environments.js.map +1 -0
  232. package/dist/src/lib/hosting-errors.d.ts +30 -0
  233. package/dist/src/lib/hosting-errors.js +43 -0
  234. package/dist/src/lib/hosting-errors.js.map +1 -0
  235. package/dist/src/lib/hosting-token.d.ts +46 -0
  236. package/dist/src/lib/hosting-token.js +60 -0
  237. package/dist/src/lib/hosting-token.js.map +1 -0
  238. package/dist/src/lib/hosting-wait.d.ts +42 -0
  239. package/dist/src/lib/hosting-wait.js +84 -0
  240. package/dist/src/lib/hosting-wait.js.map +1 -0
  241. package/dist/src/lib/hosting-wfp-upload.d.ts +86 -0
  242. package/dist/src/lib/hosting-wfp-upload.js +149 -0
  243. package/dist/src/lib/hosting-wfp-upload.js.map +1 -0
  244. package/dist/src/lib/integration-test-request.d.ts +54 -0
  245. package/dist/src/lib/integration-test-request.js +207 -0
  246. package/dist/src/lib/integration-test-request.js.map +1 -0
  247. package/dist/src/lib/invoker-shared-enums.d.ts +35 -0
  248. package/dist/src/lib/invoker-shared-enums.js +98 -0
  249. package/dist/src/lib/invoker-shared-enums.js.map +1 -0
  250. package/dist/src/lib/log-inspection.d.ts +4 -1
  251. package/dist/src/lib/log-inspection.js.map +1 -1
  252. package/dist/src/lib/metadata-report.d.ts +85 -0
  253. package/dist/src/lib/metadata-report.js +81 -0
  254. package/dist/src/lib/metadata-report.js.map +1 -0
  255. package/dist/src/lib/output.d.ts +1 -1
  256. package/dist/src/lib/output.js +1 -1
  257. package/dist/src/lib/platform-owned.js +5 -0
  258. package/dist/src/lib/platform-owned.js.map +1 -1
  259. package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
  260. package/dist/src/lib/primitive-declaration-names.js +22 -0
  261. package/dist/src/lib/primitive-declaration-names.js.map +1 -0
  262. package/dist/src/lib/primitive-declaration.d.ts +174 -0
  263. package/dist/src/lib/primitive-declaration.js +792 -0
  264. package/dist/src/lib/primitive-declaration.js.map +1 -0
  265. package/dist/src/lib/prompt-schema-codegen.d.ts +36 -12
  266. package/dist/src/lib/prompt-schema-codegen.js +94 -98
  267. package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
  268. package/dist/src/lib/prompt-schema-document.d.ts +35 -0
  269. package/dist/src/lib/prompt-schema-document.js +92 -0
  270. package/dist/src/lib/prompt-schema-document.js.map +1 -0
  271. package/dist/src/lib/prompt-schema-refs.d.ts +173 -0
  272. package/dist/src/lib/prompt-schema-refs.js +478 -0
  273. package/dist/src/lib/prompt-schema-refs.js.map +1 -0
  274. package/dist/src/lib/records-verbs.d.ts +12 -2
  275. package/dist/src/lib/records-verbs.js +7 -2
  276. package/dist/src/lib/records-verbs.js.map +1 -1
  277. package/dist/src/lib/register-commands.d.ts +36 -0
  278. package/dist/src/lib/register-commands.js +37 -0
  279. package/dist/src/lib/register-commands.js.map +1 -0
  280. package/dist/src/lib/retired-imports.d.ts +53 -0
  281. package/dist/src/lib/retired-imports.js +120 -0
  282. package/dist/src/lib/retired-imports.js.map +1 -0
  283. package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
  284. package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
  285. package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
  286. package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
  287. package/dist/src/lib/schema-codegen/generated-db3-bridge.js +227 -0
  288. package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
  289. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
  290. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
  291. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
  292. package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +218 -0
  293. package/dist/src/lib/schema-codegen/generated-field-grammar.js +397 -0
  294. package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
  295. package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
  296. package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
  297. package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
  298. package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
  299. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
  300. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
  301. package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +129 -0
  302. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +154 -1
  303. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -1
  304. package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
  305. package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
  306. package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
  307. package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
  308. package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
  309. package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
  310. package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
  311. package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
  312. package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
  313. package/dist/src/lib/schema-codegen/generated-schema-shape.d.ts +27 -0
  314. package/dist/src/lib/schema-codegen/generated-schema-shape.js +126 -0
  315. package/dist/src/lib/schema-codegen/generated-schema-shape.js.map +1 -0
  316. package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
  317. package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
  318. package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
  319. package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
  320. package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
  321. package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
  322. package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
  323. package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
  324. package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
  325. package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
  326. package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
  327. package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
  328. package/dist/src/lib/schema-codegen/schemaToTs.d.ts +40 -13
  329. package/dist/src/lib/schema-codegen/schemaToTs.js +124 -160
  330. package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -1
  331. package/dist/src/lib/schema-codegen/valuesLists.d.ts +48 -0
  332. package/dist/src/lib/schema-codegen/valuesLists.js +144 -0
  333. package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
  334. package/dist/src/lib/schema-family-index.d.ts +228 -0
  335. package/dist/src/lib/schema-family-index.js +813 -0
  336. package/dist/src/lib/schema-family-index.js.map +1 -0
  337. package/dist/src/lib/schema-pins.d.ts +82 -0
  338. package/dist/src/lib/schema-pins.js +198 -0
  339. package/dist/src/lib/schema-pins.js.map +1 -0
  340. package/dist/src/lib/schema-preview.d.ts +244 -0
  341. package/dist/src/lib/schema-preview.js +498 -0
  342. package/dist/src/lib/schema-preview.js.map +1 -0
  343. package/dist/src/lib/skill-installer.d.ts +2 -2
  344. package/dist/src/lib/skill-installer.js +2 -21
  345. package/dist/src/lib/skill-installer.js.map +1 -1
  346. package/dist/src/lib/step-run-table.d.ts +1 -2
  347. package/dist/src/lib/step-run-table.js +1 -2
  348. package/dist/src/lib/step-run-table.js.map +1 -1
  349. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +2 -1
  350. package/dist/src/lib/swift-codegen/agentGenerator.js +24 -22
  351. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
  352. package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
  353. package/dist/src/lib/swift-codegen/banners.js +12 -0
  354. package/dist/src/lib/swift-codegen/banners.js.map +1 -1
  355. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
  356. package/dist/src/lib/swift-codegen/functionGenerator.js +168 -50
  357. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
  358. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +31 -7
  359. package/dist/src/lib/swift-codegen/schemaToSwift.js +213 -177
  360. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
  361. package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +45 -0
  362. package/dist/src/lib/swift-codegen/sharedGenerator.js +165 -0
  363. package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
  364. package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
  365. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
  366. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
  367. package/dist/src/lib/sync-resource-types.d.ts +37 -5
  368. package/dist/src/lib/sync-resource-types.js +50 -5
  369. package/dist/src/lib/sync-resource-types.js.map +1 -1
  370. package/dist/src/lib/sync-selectors.d.ts +7 -0
  371. package/dist/src/lib/sync-selectors.js +22 -2
  372. package/dist/src/lib/sync-selectors.js.map +1 -1
  373. package/dist/src/lib/test-runs.d.ts +45 -0
  374. package/dist/src/lib/test-runs.js +150 -0
  375. package/dist/src/lib/test-runs.js.map +1 -0
  376. package/dist/src/lib/toml-database-config.d.ts +2 -1
  377. package/dist/src/lib/toml-database-config.js +7 -4
  378. package/dist/src/lib/toml-database-config.js.map +1 -1
  379. package/dist/src/lib/toml-scalar-edit.js +6 -4
  380. package/dist/src/lib/toml-scalar-edit.js.map +1 -1
  381. package/dist/src/lib/transition-warnings.d.ts +21 -0
  382. package/dist/src/lib/transition-warnings.js +49 -0
  383. package/dist/src/lib/transition-warnings.js.map +1 -0
  384. package/dist/src/lib/user-index.d.ts +80 -0
  385. package/dist/src/lib/user-index.js +166 -0
  386. package/dist/src/lib/user-index.js.map +1 -0
  387. package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
  388. package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
  389. package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
  390. package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
  391. package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
  392. package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
  393. package/dist/src/lib/user-walk.d.ts +31 -0
  394. package/dist/src/lib/user-walk.js +102 -0
  395. package/dist/src/lib/user-walk.js.map +1 -0
  396. package/dist/src/lib/worker-perf-format.d.ts +22 -0
  397. package/dist/src/lib/worker-perf-format.js +27 -0
  398. package/dist/src/lib/worker-perf-format.js.map +1 -0
  399. package/dist/src/types/index.d.ts +13 -34
  400. package/package.json +5 -3
@@ -6,8 +6,9 @@ import { type ConfigObjectSurface, type ConfigTable } from "../lib/generated-con
6
6
  import { type PromptKind } from "../lib/generated-config-surfaces.js";
7
7
  import { type AgentFunctionFact, type AgentFunctionFacts } from "../lib/generated-config-surfaces.js";
8
8
  import { type AgentSchemaConfigFact } from "../lib/generated-config-surfaces.js";
9
+ import { type PromptConfigSchemaPayload, type PromptPushDependencies, type PromptSchemaPayload } from "../lib/prompt-schema-refs.js";
9
10
  import { type DocumentSchemaResolution } from "../lib/function-document-types.js";
10
- import { type PresenceOutcome, type TestBlockType } from "../lib/sync-resource-types.js";
11
+ import { type PushPrunePlanItem, type PresenceOutcome, type TestBlockType } from "../lib/sync-resource-types.js";
11
12
  export { resolveSlugCollisions, slugifyTestCaseName, testCaseFileBasenames, } from "../lib/test-case-file-names.js";
12
13
  import type { SyncState } from "../types/index.js";
13
14
  import { type SyncSelection } from "../lib/sync-selectors.js";
@@ -466,16 +467,83 @@ export declare function promptConfigPayload(tomlConfig: any, options?: {
466
467
  * so (`writableOn: ["create"]`) — the retention tier is fixed at creation.
467
468
  */
468
469
  export declare function buildBlobBucketCreatePayload(key: string, bucket: any): Record<string, any>;
469
- export declare function serializePrompt(prompt: any, logger?: (message: string) => void): string;
470
+ export declare function serializePrompt(prompt: any, logger?: (message: string) => void, options?: {
471
+ /**
472
+ * #5249 — the app's prompt ids by key, through which the stored
473
+ * `defaultEvaluatorPromptId` is written as `defaultEvaluatorPromptKey`.
474
+ */
475
+ promptIdToKey?: ReadonlyMap<string, string>;
476
+ /**
477
+ * An id the map cannot name: left out of the file (`"omit"`, the default,
478
+ * reported through `onUnresolved`), or written as the id itself
479
+ * (`"raw-id"`), which is how the comparison keeps a dangling link a
480
+ * difference rather than hiding it.
481
+ */
482
+ unresolvedSpelling?: "omit" | "raw-id";
483
+ onUnresolved?: (id: string) => void;
484
+ /**
485
+ * #5534 — write the authored schemas the detail's `source` (and each
486
+ * config's) keeps, rather than the compiled ones: what `config pull`
487
+ * writes. The comparison projects the compiled fields, as stored.
488
+ */
489
+ source?: boolean;
490
+ }): string;
470
491
  /**
471
492
  * Build the `config push` body for one prompt TOML's `[prompt]` table.
472
493
  *
473
494
  * The prompt's own fields only — its `[[configs]]` entries are separate
474
495
  * requests, built by `buildPromptConfigPayload`.
475
496
  */
476
- export declare function buildPromptPushPayload(key: string, tomlData: any, { mode }?: {
497
+ export declare function buildPromptPushPayload(key: string, tomlData: any, { mode, schemas, }?: {
477
498
  mode?: PushMode;
499
+ /**
500
+ * #5534 — the file's compile (`promptSchemaPayload`): attached as
501
+ * `compiled` and `provenance` for each schema field the body carries.
502
+ */
503
+ schemas?: PromptSchemaPayload | null;
478
504
  }): Record<string, any>;
505
+ /**
506
+ * The evaluator link a prompt file authors (#5249): the evaluator's prompt
507
+ * key, `""` to clear the stored link, or `undefined` when the file leaves the
508
+ * link alone. A non-string value is the declared-type refusal's, so it
509
+ * authors nothing here.
510
+ */
511
+ export declare function promptEvaluatorLink(tomlData: any): string | undefined;
512
+ /** The `[prompt]` TOML key that names a prompt's default evaluator (#5249). */
513
+ export declare const PROMPT_EVALUATOR_KEY = "defaultEvaluatorPromptKey";
514
+ /** One prompt file's resolved evaluator link (#5249). */
515
+ export interface PromptEvaluatorLink {
516
+ /** The prompt file, as the preflight names it. */
517
+ filePath: string;
518
+ promptKey: string;
519
+ /** The evaluator's prompt key, or `""` to clear the link. */
520
+ evaluatorKey: string;
521
+ }
522
+ /**
523
+ * Resolve every selected prompt file's `defaultEvaluatorPromptKey` before
524
+ * anything is written (#5249).
525
+ *
526
+ * A key resolves when it names a prompt file this push selects (created or
527
+ * updated by it), or a prompt the app already has — archived included, since
528
+ * the server links to one — minus the prompts this push's `--prune` will
529
+ * hard-delete. A local file `--only` excludes is not pulled in: a prompt that
530
+ * exists only as that file is not a target. The live listing is read only when
531
+ * a key names no selected file.
532
+ *
533
+ * Returns the links push applies after its creates, and one refusal per file
534
+ * whose key resolves to nothing; the preflight aborts on those.
535
+ */
536
+ export declare function resolvePromptEvaluatorLinks(input: {
537
+ configDir: string;
538
+ pushSelection: SyncSelection | null;
539
+ /** The app's prompt keys, every status. Throws when the listing fails. */
540
+ livePromptKeys: () => Promise<ReadonlySet<string>>;
541
+ /** The prompt keys whose `--prune` decision is `delete`. */
542
+ prunedPromptKeys: ReadonlySet<string>;
543
+ }): Promise<{
544
+ links: PromptEvaluatorLink[];
545
+ errors: string[];
546
+ }>;
479
547
  /**
480
548
  * Build the POST body for a prompt create.
481
549
  *
@@ -497,7 +565,7 @@ export declare function buildPromptPushPayload(key: string, tomlData: any, { mod
497
565
  * Every other config field rides along from the definition, so a new LLM
498
566
  * setting reaches a brand-new prompt without an edit at this call site.
499
567
  */
500
- export declare function buildPromptCreatePayload(key: string, tomlData: any): Record<string, any>;
568
+ export declare function buildPromptCreatePayload(key: string, tomlData: any, schemas?: PromptSchemaPayload | null): Record<string, any>;
501
569
  /**
502
570
  * The PATCH body reconciling the seeded config with the first `[[configs]]`
503
571
  * entry, or `null` when the entry needs none of it.
@@ -520,7 +588,7 @@ export declare function buildPromptCreatePayload(key: string, tomlData: any): Re
520
588
  * entry's `status` itself now, so there is no deferral either way and this patch
521
589
  * is the two fields `POST /prompts` cannot express, nothing more.
522
590
  */
523
- export declare function seededOnlyPromptConfigFields(firstConfig: any, seededConfigName?: string): Record<string, any> | null;
591
+ export declare function seededOnlyPromptConfigFields(firstConfig: any, seededConfigName?: string, schemas?: PromptConfigSchemaPayload | null): Record<string, any> | null;
524
592
  /**
525
593
  * Build the create/update body for ONE `[[configs]]` entry.
526
594
  *
@@ -528,8 +596,10 @@ export declare function seededOnlyPromptConfigFields(firstConfig: any, seededCon
528
596
  * update those defaults must NOT be applied, or editing an unrelated key would
529
597
  * silently re-point a config at the default model.
530
598
  */
531
- export declare function buildPromptConfigPayload(tomlConfig: any, { mode }?: {
599
+ export declare function buildPromptConfigPayload(tomlConfig: any, { mode, schemas, }?: {
532
600
  mode?: PushMode;
601
+ /** #5534 — the entry's compile (`promptConfigSchemaPayload`), attached beside its `outputSchema`. */
602
+ schemas?: PromptConfigSchemaPayload | null;
533
603
  }): Record<string, any>;
534
604
  /**
535
605
  * #2644 — `config push` rejects any key the vendored definition does not
@@ -541,7 +611,7 @@ export declare function buildPromptConfigPayload(tomlConfig: any, { mode }?: {
541
611
  * are checked one by one and the unknown keys reported together, so a typo in
542
612
  * the third `[[configs]]` block is as loud as one in the first.
543
613
  */
544
- export declare function configUnknownKeyError(filePath: string, tomlData: any, table: ConfigTable): string | null;
614
+ export declare function configUnknownKeyError(filePath: string, tomlData: any, table: ConfigTable, surfaceLabel?: string): string | null;
545
615
  /**
546
616
  * The warnings `config push` prints for one file that still carries a
547
617
  * DEPRECATED key (#4872): the registry's dated sentence per key, prefixed with
@@ -575,8 +645,11 @@ export declare function configDocumentShapeErrors(filePath: string, tomlData: an
575
645
  * message per file, but nothing checked a workflow file's top-level tables —
576
646
  * so the surface is listed here for the document-level check and skipped for
577
647
  * the per-table one.
648
+ *
649
+ * A production build (`experimental` false) leaves out the families it does
650
+ * not manage (`configFamilyServed`), so their files are never validated.
578
651
  */
579
- export declare function unknownKeyPreflightTargets(): Array<{
652
+ export declare function unknownKeyPreflightTargets(experimental?: boolean): Array<{
580
653
  dir: string;
581
654
  surface: ConfigObjectSurface;
582
655
  tables: ConfigTable[];
@@ -657,9 +730,20 @@ export declare function runConfigPushPreflight(input: {
657
730
  * tree's, never this app's, so it is out of the validated body.
658
731
  */
659
732
  localEnvironment?: boolean;
660
- client: Pick<ApiClient, "listIntegrations" | "listFunctions" | "listPrompts" | "listPromptConfigs">;
733
+ /** #5249 — `getPrompt` is the `--prune` plan's point read of a prompt. */
734
+ client: Pick<ApiClient, "listIntegrations" | "listFunctions" | "listPrompts" | "listPromptConfigs" | "getPrompt" | "listSchemaFiles" | "listDatabaseTypeConfigs">;
661
735
  /** #4485 — the environment's vars override file, layered over vars.toml. */
662
736
  varsOverridePath?: string | null;
737
+ /**
738
+ * #5249 — `--prune` is set: the prompts it will hard-delete are planned here
739
+ * (reads only), so an evaluator link cannot name one.
740
+ */
741
+ prune?: boolean;
742
+ /**
743
+ * Whether the build manages the experimental families; a production build
744
+ * does not validate their files.
745
+ */
746
+ experimental?: boolean;
663
747
  }): Promise<{
664
748
  parsedVars: Record<string, unknown> | null;
665
749
  /** #4441 — agent files to apply before the functions leg. */
@@ -669,6 +753,14 @@ export declare function runConfigPushPreflight(input: {
669
753
  overridingKeys: string[];
670
754
  addedKeys: string[];
671
755
  } | null;
756
+ /** #5249 — the evaluator links the link pass applies after the creates. */
757
+ promptEvaluatorLinks: PromptEvaluatorLink[];
758
+ /**
759
+ * #5249 — the prompt items of the `--prune` plan (empty without it). The
760
+ * apply pass acts on these rather than re-planning, so the deletes the
761
+ * links were resolved against are the deletes made.
762
+ */
763
+ promptPruneItems: PushPrunePlanItem[];
672
764
  }>;
673
765
  export declare function promptKindFileErrors(filePath: string, tomlData: any): string[];
674
766
  /**
@@ -802,7 +894,7 @@ export declare function promptAgentFunctionErrors(filePath: string, tomlData: an
802
894
  * the leg reports it where it always has. #4441 — the agent files in
803
895
  * `agentFilesFirst` (`functionChangePreflight`) go before the leg instead.
804
896
  */
805
- export declare function partitionPromptFilesForPush(promptsDir: string, files: readonly string[], agentFilesFirst?: readonly string[]): {
897
+ export declare function partitionPromptFilesForPush(promptsDir: string, files: readonly string[], agentFilesFirst?: readonly string[], dependencies?: PromptPushDependencies): {
806
898
  beforeFunctions: string[];
807
899
  afterFunctions: string[];
808
900
  };
@@ -814,7 +906,7 @@ export declare function partitionPromptFilesForPush(promptsDir: string, files: r
814
906
  * the cause; the function's own failure row says why. A file that does not
815
907
  * parse is left for the prompt leg to report.
816
908
  */
817
- export declare function holdAgentPromptFilesForUnappliedFunctions(promptsDir: string, files: readonly string[], unappliedFunctionKeys: ReadonlySet<string>): {
909
+ export declare function holdAgentPromptFilesForUnappliedFunctions(promptsDir: string, files: readonly string[], unappliedFunctionKeys: ReadonlySet<string>, dependencies?: PromptPushDependencies): {
818
910
  apply: string[];
819
911
  held: Array<{
820
912
  key: string;
@@ -875,7 +967,7 @@ export declare function configFileValidationMessages(filePath: string, tomlData:
875
967
  * remove the line.
876
968
  */
877
969
  export declare function pullMustRewrite(label: string, tomlData: any): boolean;
878
- export declare function collectConfigFileValidationErrors(configDir: string): ConfigFileValidationError[];
970
+ export declare function collectConfigFileValidationErrors(configDir: string, experimental?: boolean): ConfigFileValidationError[];
879
971
  /**
880
972
  * The deprecated-key warnings for every file `collectConfigFileValidationErrors`
881
973
  * reads (#4872), one line per file and key. Advisory: the keys are accepted and
@@ -1038,6 +1130,11 @@ export declare function buildMetadataCategoryPayload(configData: any): Record<st
1038
1130
  */
1039
1131
  export declare function dbTypeOwnedScalars(table?: ConfigTable): string[];
1040
1132
  export declare const DB_TYPE_OWNED_SCALARS: readonly string[];
1133
+ /**
1134
+ * #5993 — the fields a `db3-types/` file owns: the db3 type table's, which
1135
+ * declares no rule set, so a db3 push body carries no `ruleSetId` at all.
1136
+ */
1137
+ export declare const DB3_TYPE_OWNED_SCALARS: readonly string[];
1041
1138
  /** The user-facing TOML key for a wire field (for push output). */
1042
1139
  export declare function dbTypeFieldLabel(key: string): string;
1043
1140
  /**
@@ -1055,7 +1152,7 @@ export declare function hasMeaningfulValue(v: any): boolean;
1055
1152
  * converges the server to the local TOML: a field removed from the file lands
1056
1153
  * as `null` and is cleared.
1057
1154
  */
1058
- export declare function buildOwnedScalarUpdate(typeConfig: any): Record<string, any>;
1155
+ export declare function buildOwnedScalarUpdate(typeConfig: any, ownedFields?: readonly string[]): Record<string, any>;
1059
1156
  /**
1060
1157
  * Issue #1567 — the owned scalars this push genuinely clears: the outgoing
1061
1158
  * value is empty but the server currently holds a real value (a non-null →
@@ -1266,6 +1363,100 @@ export interface ConfigDiffSpec {
1266
1363
  * its own suite covers the round trip.
1267
1364
  */
1268
1365
  export declare const DB3_TYPE_DIFF_SPEC: ConfigDiffSpec;
1366
+ /**
1367
+ * `config push`'s gate for one `db3-types/` file: `decidePushForConfig` over
1368
+ * `DB3_TYPE_DIFF_SPEC`.
1369
+ *
1370
+ * #5993 — a baseline an earlier CLI stamped was hashed with the rule set, so
1371
+ * for a row with a stored binding it equals no projection this CLI makes, and
1372
+ * an ordinary edit would read as both sides having moved. A baseline that
1373
+ * equals the live row under that earlier projection says the server has not
1374
+ * moved since: it is read as the live row's current hash.
1375
+ */
1376
+ export declare function decideDb3TypePush(input: Omit<Parameters<typeof decidePushForConfig>[0], "spec">): PushGateOutcome;
1377
+ /**
1378
+ * The body `PUT db3-types/:name` is sent for one parsed `db3-types/` file,
1379
+ * before its concurrency guard. The file owns every field: an absent one is
1380
+ * sent as null and cleared (#1567). #5993 — no `ruleSetId`: a db3 type takes
1381
+ * none.
1382
+ */
1383
+ export declare function buildDb3TypePushBody(typeConfig: any, options: {
1384
+ serverHasSchema: boolean;
1385
+ }): Record<string, any>;
1386
+ /** One type a push's preflight found the append-only rule refuses (#6019). */
1387
+ export interface AppendOnlyRefusal {
1388
+ /** The type's name. */
1389
+ type: string;
1390
+ /** Each change refused, as the server listed it. */
1391
+ reasons: Array<{
1392
+ path: string;
1393
+ change?: string;
1394
+ reason: string;
1395
+ }>;
1396
+ }
1397
+ /** `<type>: <path>: <reason>`, one line per change the append-only rule refused or let through (#6019). */
1398
+ export declare function appendOnlyReasonLines(type: string, reasons: Array<{
1399
+ path: string;
1400
+ reason: string;
1401
+ }>): string[];
1402
+ /** The reasons of a `409 DB3_TYPE_NOT_APPEND_ONLY`, or `null` for any other error. */
1403
+ export declare function appendOnlyReasonsOf(err: unknown): AppendOnlyRefusal["reasons"] | null;
1404
+ /**
1405
+ * #6019 — whether a failed preflight request says nothing about the write it
1406
+ * asked about: no HTTP answer at all, a 5xx, a timeout (408) or a throttle
1407
+ * (429). Any other 4xx is the server's final answer for that body.
1408
+ */
1409
+ export declare function preflightFailureIsInconclusive(err: unknown): boolean;
1410
+ /**
1411
+ * One preflight request, retried while its failure is inconclusive
1412
+ * ({@link preflightFailureIsInconclusive}), up to `attempts` tries. Answers the
1413
+ * value, or the last error.
1414
+ */
1415
+ export declare function preflightCall<T>(send: () => Promise<T>, retryDelayMs?: number, attempts?: number): Promise<{
1416
+ ok: boolean;
1417
+ value?: T;
1418
+ error?: unknown;
1419
+ }>;
1420
+ /**
1421
+ * #6019 — the append-only preflight of `config push`: before any type row is
1422
+ * written, dry-run every schema update the run is about to make to an
1423
+ * existing type, from `db3-types/` and `database-type-configs/` alike, and
1424
+ * answer every type the server refuses `DB3_TYPE_NOT_APPEND_ONLY`. A file the
1425
+ * run would not write (unchanged, drifted, in conflict, or a create) is not
1426
+ * asked; a legacy file skipped as its selected db3 twin's duplicate is not
1427
+ * asked twice. A `DB3_TYPE_FIELD_REMOVAL_NOT_ENABLED` answer is thrown. Any
1428
+ * other server refusal (a 4xx) is final for that write, so it is left to the
1429
+ * apply loops, which meet it again as before. A failure that says nothing
1430
+ * about the write (no answer, a 5xx, 408, 429), on the dry run or the type
1431
+ * listing, is retried; if it persists the preflight throws, so no type row is
1432
+ * written by a run whose types were not all validated.
1433
+ */
1434
+ export declare function preflightDb3TypeAppendOnly(input: {
1435
+ client: Pick<ApiClient, "listDatabaseTypeConfigs" | "pushDb3Type" | "updateDatabaseTypeConfig">;
1436
+ appId: string;
1437
+ configDir: string;
1438
+ selectFiles: (label: string, dir: string, files: string[]) => string[];
1439
+ maps: ConfigDiffMaps;
1440
+ syncState: SyncState | null;
1441
+ force: boolean;
1442
+ allowFieldRemoval: boolean;
1443
+ /** Wait before each retry of an inconclusive request (tests pass 0). */
1444
+ retryDelayMs?: number;
1445
+ }): Promise<AppendOnlyRefusal[]>;
1446
+ /**
1447
+ * #5993 — whether a `database-type-configs/` file whose db3 twin agrees with
1448
+ * it must still go through the database type push: its rule set, which the
1449
+ * twin comparison leaves out, differs from the live row's. Empty and null
1450
+ * read alike. Without live rows there is nothing to compare against, and the
1451
+ * twin is skipped as before.
1452
+ */
1453
+ export declare function legacyTwinPushesItsRuleSet(input: {
1454
+ /** The legacy file's rule set id, resolved from its `ruleSetName`. */
1455
+ localRuleSetId: unknown;
1456
+ liveAvailable: boolean;
1457
+ /** The live row of the type, when the server has one. */
1458
+ live?: any;
1459
+ }): boolean;
1269
1460
  /**
1270
1461
  * #5025 — what a `config push` conflict on `db3-types/<name>.toml` says when
1271
1462
  * the server holds a type of that name this tree never pulled: a database
@@ -1437,6 +1628,119 @@ export declare function ruleFreePushBaselineEntry<E extends {
1437
1628
  localParsed: any;
1438
1629
  liveRecord: any;
1439
1630
  }): E | null | undefined;
1631
+ /** The baseline hashes a prompt manifest entry records (#4872, #5249). */
1632
+ export interface PromptBaselineHashes {
1633
+ semanticHash?: string;
1634
+ ruleFreeSemanticHash?: string;
1635
+ /**
1636
+ * The same projection without `defaultEvaluatorPromptKey` (#5249): what a
1637
+ * file that leaves the link unmanaged is classified against, so a link
1638
+ * changed in the web admin never decides which side such a file moved.
1639
+ */
1640
+ evaluatorFreeSemanticHash?: string;
1641
+ }
1642
+ /**
1643
+ * The baseline a prompt entry records for a server record (#5249): its
1644
+ * comparison projection, with the link named through `extra`'s id→key
1645
+ * lookup, hashed whole and without the link. Empty when the record cannot be
1646
+ * projected, so the entry is left with no baseline rather than a wrong one.
1647
+ */
1648
+ export declare function promptBaselineHashes(record: any, maps: ConfigDiffMaps, extra?: any): PromptBaselineHashes;
1649
+ /**
1650
+ * `config push`'s gate for one prompt file (#2869, #4872, #5249):
1651
+ * `decidePushForConfig` over the prompt spec, with the link compared by name
1652
+ * and the direction classified around it.
1653
+ *
1654
+ * A file that leaves `defaultEvaluatorPromptKey` unmanaged is classified
1655
+ * without it, against `evaluatorFreeSemanticHash`. An entry written before the
1656
+ * key joined the projection has only `semanticHash`, which never carried it,
1657
+ * so it is classified key-free whatever the file says; a file that manages
1658
+ * the key against an entry that records both is classified whole.
1659
+ */
1660
+ export declare function decidePromptPushForConfig(input: {
1661
+ localParsed: any;
1662
+ live?: {
1663
+ record: any;
1664
+ modifiedAt?: string;
1665
+ } | null;
1666
+ entry?: (PushBaselineEntry & PromptBaselineHashes & {
1667
+ ruleFreeSemanticHash?: string;
1668
+ }) | null;
1669
+ maps: ConfigDiffMaps;
1670
+ /** The app's prompt ids by key, this push's creates included. */
1671
+ promptIdToKey: ReadonlyMap<string, string>;
1672
+ localFileHash?: string;
1673
+ force?: boolean;
1674
+ }): PushGateOutcome;
1675
+ /** A prompt this push created or updated, as the link pass needs it (#5249). */
1676
+ export interface AppliedPromptForLink {
1677
+ /** Absent for a create under `--dry-run`, which made nothing. */
1678
+ promptId?: string;
1679
+ /** The link the server held when push read it; `undefined` when unread. */
1680
+ currentLinkId?: string | null;
1681
+ }
1682
+ /**
1683
+ * Apply the evaluator links push resolved, after every prompt it creates or
1684
+ * updates (#5249), so a prompt can name an evaluator created in the same push
1685
+ * — either way round.
1686
+ *
1687
+ * Only the prompts this push applied are visited. A link that already holds
1688
+ * sends nothing; a different one is sent through the update route as the id
1689
+ * the key resolves to (`null` for `""`), with the concurrency token push holds
1690
+ * for the prompt, and the prompt's baseline is re-stamped from a refetch so
1691
+ * the next push reads the file as unchanged. An evaluator that was declined
1692
+ * this run, or that no prompt answers to, is an apply failure naming both
1693
+ * keys — never a silent skip.
1694
+ */
1695
+ export declare function linkPromptEvaluators(input: {
1696
+ client: Pick<ApiClient, "updatePrompt" | "getPrompt">;
1697
+ appId: string;
1698
+ links: readonly PromptEvaluatorLink[];
1699
+ applied: ReadonlyMap<string, AppliedPromptForLink>;
1700
+ /** Every prompt id by key once the creates have run: live plus created. */
1701
+ promptKeyToId: ReadonlyMap<string, string>;
1702
+ /** The prompts this run declined or failed to apply. */
1703
+ declinedKeys: ReadonlySet<string>;
1704
+ syncState: SyncState | null;
1705
+ maps: ConfigDiffMaps;
1706
+ dryRun: boolean;
1707
+ force: boolean;
1708
+ changes: Array<{
1709
+ type: string;
1710
+ action: string;
1711
+ key: string;
1712
+ }>;
1713
+ failures: Array<{
1714
+ type: string;
1715
+ key: string;
1716
+ message: string;
1717
+ }>;
1718
+ info: (message: string) => void;
1719
+ }): Promise<void>;
1720
+ /**
1721
+ * What `config pull` writes and records for one prompt (#5249).
1722
+ *
1723
+ * `content` names the evaluator by key, or leaves out a link the listing
1724
+ * cannot name — the file is still written, so the link stays unmanaged, and
1725
+ * `warn` is told once. `keep` is the keep-or-write check: a file that says
1726
+ * what the server says is kept, unless the server's file names a link the
1727
+ * kept file would leave out, which is how a link made in the web admin
1728
+ * reaches an existing tree. `baseline` is the server's comparison projection,
1729
+ * with a dangling link spelled as its id, whatever the file says — so
1730
+ * clearing that link with `""` afterwards reads as the local edit it is.
1731
+ */
1732
+ export declare function promptPullPlan(prompt: any, options: {
1733
+ promptIdToKey: ReadonlyMap<string, string>;
1734
+ filePath: string;
1735
+ maps: ConfigDiffMaps;
1736
+ logger?: (message: string) => void;
1737
+ warn?: (message: string) => void;
1738
+ }): {
1739
+ content: string;
1740
+ keep: (localContent: string) => boolean;
1741
+ baseline: PromptBaselineHashes;
1742
+ unresolvedEvaluatorId?: string;
1743
+ };
1440
1744
  export declare function hashRemoteConfigForDiff(spec: ConfigDiffSpec, record: any, maps: ConfigDiffMaps, extra?: any): string;
1441
1745
  /** One field's disagreement between the local file and the live server entity. */
1442
1746
  export interface PushFieldDiff {
@@ -1628,6 +1932,23 @@ export declare function decidePushForConfig(input: {
1628
1932
  * strand — is one an update cannot repair.
1629
1933
  */
1630
1934
  adoptsUntrackedByKey?: boolean;
1935
+ /**
1936
+ * Classify WHICH side moved with these projected keys left out, against
1937
+ * `baselineHash` (#5249).
1938
+ *
1939
+ * For a present-only key the file leaves unmanaged, the local side inherits
1940
+ * the server's value, so a change made to it out of band moves both hashes
1941
+ * away from a baseline that recorded it — and an ordinary local edit to
1942
+ * another field would read as `both-changed`. A key the file does not manage
1943
+ * never says which side moved. The fields reported, and the
1944
+ * unchanged-versus-different answer, still come from the full projections:
1945
+ * a direction of `unchanged` with the full projections still differing
1946
+ * (only these keys differ) is the local file's change.
1947
+ */
1948
+ directionWithoutKeys?: {
1949
+ keys: readonly string[];
1950
+ baselineHash?: string;
1951
+ };
1631
1952
  }): PushGateOutcome;
1632
1953
  /**
1633
1954
  * The identity a file may leave to its name, written back into the parsed
@@ -1834,6 +2155,13 @@ export declare function sameTomlAs(serverContent: string): (localContent: string
1834
2155
  * end-of-push and catch-path saves persist what the push actually did.
1835
2156
  */
1836
2157
  export declare function ensurePushSyncState(existing: SyncState | null, appId: string, serverUrl: string): SyncState;
2158
+ /**
2159
+ * `parseTomlFile`, or null for a file whose field table does not compile
2160
+ * (#5541): the validation collector reports that file, with every problem, so
2161
+ * a reader that compares the tree skips it rather than stopping. Any other
2162
+ * parse error is thrown as before.
2163
+ */
2164
+ export declare function parseTomlFileUnlessFieldTableError(filePath: string): any;
1837
2165
  export declare function parseTomlFile(filePath: string): any;
1838
2166
  /**
1839
2167
  * Paginate through a list endpoint, collecting all items.
@@ -2515,4 +2843,6 @@ export declare function applyTestCasePrune(params: {
2515
2843
  * `resolveSyncDir`, the sync-state baseline and `primitive/<env>/`
2516
2844
  * are internal identifiers, deliberately left alone (#2759 scope).
2517
2845
  */
2518
- export declare function registerConfigSyncCommands(sync: Command): void;
2846
+ export declare function registerConfigSyncCommands(sync: Command, options?: {
2847
+ experimental?: boolean;
2848
+ }): void;