primitive-admin 1.2.0-alpha.9 → 1.3.0-alpha.1

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 (590) hide show
  1. package/README.md +303 -186
  2. package/assets/skill/skills/primitive-platform/SKILL.md +93 -27
  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.js +3 -0
  13. package/dist/src/commands/apps-children.js.map +1 -1
  14. package/dist/src/commands/apps-transitions.d.ts +39 -0
  15. package/dist/src/commands/apps-transitions.js +198 -0
  16. package/dist/src/commands/apps-transitions.js.map +1 -0
  17. package/dist/src/commands/apps.d.ts +17 -0
  18. package/dist/src/commands/apps.js +108 -3
  19. package/dist/src/commands/apps.js.map +1 -1
  20. package/dist/src/commands/auth-sessions.js +2 -0
  21. package/dist/src/commands/auth-sessions.js.map +1 -1
  22. package/dist/src/commands/auth.js +170 -50
  23. package/dist/src/commands/auth.js.map +1 -1
  24. package/dist/src/commands/blob-buckets.js +2 -0
  25. package/dist/src/commands/blob-buckets.js.map +1 -1
  26. package/dist/src/commands/collections.js +318 -256
  27. package/dist/src/commands/collections.js.map +1 -1
  28. package/dist/src/commands/comparisons.js +2 -0
  29. package/dist/src/commands/comparisons.js.map +1 -1
  30. package/dist/src/commands/config.d.ts +2 -2
  31. package/dist/src/commands/config.js +59 -33
  32. package/dist/src/commands/config.js.map +1 -1
  33. package/dist/src/commands/connections.js +2 -0
  34. package/dist/src/commands/connections.js.map +1 -1
  35. package/dist/src/commands/database-type-configs.js +5 -3
  36. package/dist/src/commands/database-type-configs.js.map +1 -1
  37. package/dist/src/commands/databases.js +6 -4
  38. package/dist/src/commands/databases.js.map +1 -1
  39. package/dist/src/commands/db3-types.d.ts +42 -0
  40. package/dist/src/commands/db3-types.js +445 -0
  41. package/dist/src/commands/db3-types.js.map +1 -0
  42. package/dist/src/commands/db3.d.ts +38 -0
  43. package/dist/src/commands/db3.js +2053 -0
  44. package/dist/src/commands/db3.js.map +1 -0
  45. package/dist/src/commands/documents.d.ts +110 -10
  46. package/dist/src/commands/documents.js +1019 -748
  47. package/dist/src/commands/documents.js.map +1 -1
  48. package/dist/src/commands/email-templates.js +74 -0
  49. package/dist/src/commands/email-templates.js.map +1 -1
  50. package/dist/src/commands/env.js +8 -4
  51. package/dist/src/commands/env.js.map +1 -1
  52. package/dist/src/commands/function-trigger-commands.d.ts +28 -0
  53. package/dist/src/commands/function-trigger-commands.js +341 -0
  54. package/dist/src/commands/function-trigger-commands.js.map +1 -0
  55. package/dist/src/commands/functions.js +383 -32
  56. package/dist/src/commands/functions.js.map +1 -1
  57. package/dist/src/commands/groups.js +168 -50
  58. package/dist/src/commands/groups.js.map +1 -1
  59. package/dist/src/commands/guides.js +7 -5
  60. package/dist/src/commands/guides.js.map +1 -1
  61. package/dist/src/commands/hosting.d.ts +8 -0
  62. package/dist/src/commands/hosting.js +509 -0
  63. package/dist/src/commands/hosting.js.map +1 -0
  64. package/dist/src/commands/init.js +129 -38
  65. package/dist/src/commands/init.js.map +1 -1
  66. package/dist/src/commands/integrations.js +82 -53
  67. package/dist/src/commands/integrations.js.map +1 -1
  68. package/dist/src/commands/locks.d.ts +5 -3
  69. package/dist/src/commands/locks.js +19 -61
  70. package/dist/src/commands/locks.js.map +1 -1
  71. package/dist/src/commands/metadata-category-configs.d.ts +2 -2
  72. package/dist/src/commands/metadata-category-configs.js +4 -2
  73. package/dist/src/commands/metadata-category-configs.js.map +1 -1
  74. package/dist/src/commands/metadata.js +55 -6
  75. package/dist/src/commands/metadata.js.map +1 -1
  76. package/dist/src/commands/prompts.js +75 -52
  77. package/dist/src/commands/prompts.js.map +1 -1
  78. package/dist/src/commands/rate-counters.d.ts +19 -0
  79. package/dist/src/commands/rate-counters.js +104 -0
  80. package/dist/src/commands/rate-counters.js.map +1 -0
  81. package/dist/src/commands/rule-sets.d.ts +1 -1
  82. package/dist/src/commands/rule-sets.js +2 -1
  83. package/dist/src/commands/rule-sets.js.map +1 -1
  84. package/dist/src/commands/schemas.d.ts +15 -0
  85. package/dist/src/commands/schemas.js +122 -0
  86. package/dist/src/commands/schemas.js.map +1 -0
  87. package/dist/src/commands/scripts.d.ts +9 -17
  88. package/dist/src/commands/scripts.js +24 -479
  89. package/dist/src/commands/scripts.js.map +1 -1
  90. package/dist/src/commands/secrets.d.ts +38 -0
  91. package/dist/src/commands/secrets.js +148 -6
  92. package/dist/src/commands/secrets.js.map +1 -1
  93. package/dist/src/commands/sessions.js +2 -0
  94. package/dist/src/commands/sessions.js.map +1 -1
  95. package/dist/src/commands/skill.js +2 -0
  96. package/dist/src/commands/skill.js.map +1 -1
  97. package/dist/src/commands/spent-tokens.d.ts +19 -0
  98. package/dist/src/commands/spent-tokens.js +79 -0
  99. package/dist/src/commands/spent-tokens.js.map +1 -0
  100. package/dist/src/commands/sync-app-settings.d.ts +58 -0
  101. package/dist/src/commands/sync-app-settings.js +119 -2
  102. package/dist/src/commands/sync-app-settings.js.map +1 -1
  103. package/dist/src/commands/sync-schemas.d.ts +202 -0
  104. package/dist/src/commands/sync-schemas.js +629 -0
  105. package/dist/src/commands/sync-schemas.js.map +1 -0
  106. package/dist/src/commands/sync-user-properties.d.ts +118 -0
  107. package/dist/src/commands/sync-user-properties.js +276 -0
  108. package/dist/src/commands/sync-user-properties.js.map +1 -0
  109. package/dist/src/commands/sync.d.ts +578 -546
  110. package/dist/src/commands/sync.js +3516 -5134
  111. package/dist/src/commands/sync.js.map +1 -1
  112. package/dist/src/commands/tokens.js +5 -3
  113. package/dist/src/commands/tokens.js.map +1 -1
  114. package/dist/src/commands/transitions.d.ts +54 -0
  115. package/dist/src/commands/transitions.js +418 -0
  116. package/dist/src/commands/transitions.js.map +1 -0
  117. package/dist/src/commands/usage.d.ts +42 -0
  118. package/dist/src/commands/usage.js +397 -0
  119. package/dist/src/commands/usage.js.map +1 -0
  120. package/dist/src/commands/user-properties.d.ts +14 -0
  121. package/dist/src/commands/user-properties.js +79 -0
  122. package/dist/src/commands/user-properties.js.map +1 -0
  123. package/dist/src/commands/users.js +951 -18
  124. package/dist/src/commands/users.js.map +1 -1
  125. package/dist/src/commands/vars.js +2 -0
  126. package/dist/src/commands/vars.js.map +1 -1
  127. package/dist/src/commands/waitlist.js +39 -4
  128. package/dist/src/commands/waitlist.js.map +1 -1
  129. package/dist/src/commands/workflows.d.ts +5 -83
  130. package/dist/src/commands/workflows.js +57 -2282
  131. package/dist/src/commands/workflows.js.map +1 -1
  132. package/dist/src/lib/analytics-query.d.ts +58 -0
  133. package/dist/src/lib/analytics-query.js +134 -0
  134. package/dist/src/lib/analytics-query.js.map +1 -0
  135. package/dist/src/lib/api-client.d.ts +1976 -431
  136. package/dist/src/lib/api-client.js +1095 -550
  137. package/dist/src/lib/api-client.js.map +1 -1
  138. package/dist/src/lib/app-settings-descriptor.d.ts +14 -2
  139. package/dist/src/lib/app-settings-descriptor.js +55 -1
  140. package/dist/src/lib/app-settings-descriptor.js.map +1 -1
  141. package/dist/src/lib/auth-fixtures.d.ts +44 -0
  142. package/dist/src/lib/auth-fixtures.js +61 -0
  143. package/dist/src/lib/auth-fixtures.js.map +1 -0
  144. package/dist/src/lib/auth-flow.d.ts +47 -1
  145. package/dist/src/lib/auth-flow.js +451 -14
  146. package/dist/src/lib/auth-flow.js.map +1 -1
  147. package/dist/src/lib/block-layout.d.ts +12 -23
  148. package/dist/src/lib/block-layout.js +26 -92
  149. package/dist/src/lib/block-layout.js.map +1 -1
  150. package/dist/src/lib/block-selector.d.ts +8 -14
  151. package/dist/src/lib/block-selector.js +8 -19
  152. package/dist/src/lib/block-selector.js.map +1 -1
  153. package/dist/src/lib/child-apps-local.d.ts +3 -1
  154. package/dist/src/lib/child-apps-local.js +9 -1
  155. package/dist/src/lib/child-apps-local.js.map +1 -1
  156. package/dist/src/lib/cli-manifest.d.ts +9 -0
  157. package/dist/src/lib/cli-manifest.js +10 -1
  158. package/dist/src/lib/cli-manifest.js.map +1 -1
  159. package/dist/src/lib/cli-version.d.ts +14 -0
  160. package/dist/src/lib/cli-version.js +38 -0
  161. package/dist/src/lib/cli-version.js.map +1 -0
  162. package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
  163. package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
  164. package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
  165. package/dist/src/lib/collection-export.d.ts +76 -15
  166. package/dist/src/lib/collection-export.js +116 -23
  167. package/dist/src/lib/collection-export.js.map +1 -1
  168. package/dist/src/lib/collection-principal.d.ts +22 -0
  169. package/dist/src/lib/collection-principal.js +35 -0
  170. package/dist/src/lib/collection-principal.js.map +1 -0
  171. package/dist/src/lib/command-groups.d.ts +30 -0
  172. package/dist/src/lib/command-groups.js +111 -0
  173. package/dist/src/lib/command-groups.js.map +1 -0
  174. package/dist/src/lib/command-status.d.ts +147 -0
  175. package/dist/src/lib/command-status.js +266 -0
  176. package/dist/src/lib/command-status.js.map +1 -0
  177. package/dist/src/lib/config-object-descriptor.d.ts +9 -22
  178. package/dist/src/lib/config-object-descriptor.js +113 -277
  179. package/dist/src/lib/config-object-descriptor.js.map +1 -1
  180. package/dist/src/lib/config-surface.d.ts +3 -7
  181. package/dist/src/lib/config-surface.js +9 -13
  182. package/dist/src/lib/config-surface.js.map +1 -1
  183. package/dist/src/lib/config-toml.d.ts +11 -2
  184. package/dist/src/lib/config-toml.js +25 -2
  185. package/dist/src/lib/config-toml.js.map +1 -1
  186. package/dist/src/lib/credentials-home.d.ts +7 -0
  187. package/dist/src/lib/credentials-home.js +45 -10
  188. package/dist/src/lib/credentials-home.js.map +1 -1
  189. package/dist/src/lib/credentials-lock.d.ts +14 -6
  190. package/dist/src/lib/credentials-lock.js +90 -10
  191. package/dist/src/lib/credentials-lock.js.map +1 -1
  192. package/dist/src/lib/credentials-store.d.ts +142 -70
  193. package/dist/src/lib/credentials-store.js +420 -111
  194. package/dist/src/lib/credentials-store.js.map +1 -1
  195. package/dist/src/lib/custodian.d.ts +8 -0
  196. package/dist/src/lib/custodian.js +18 -0
  197. package/dist/src/lib/custodian.js.map +1 -0
  198. package/dist/src/lib/data-input.d.ts +1 -1
  199. package/dist/src/lib/data-input.js +1 -1
  200. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
  201. package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
  202. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
  203. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +40 -1
  204. package/dist/src/lib/db-codegen/dbTypeIR.js +32 -8
  205. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
  206. package/dist/src/lib/db-type-records.d.ts +125 -0
  207. package/dist/src/lib/db-type-records.js +237 -0
  208. package/dist/src/lib/db-type-records.js.map +1 -0
  209. package/dist/src/lib/db3-export.d.ts +322 -0
  210. package/dist/src/lib/db3-export.js +767 -0
  211. package/dist/src/lib/db3-export.js.map +1 -0
  212. package/dist/src/lib/db3-index-output.d.ts +116 -0
  213. package/dist/src/lib/db3-index-output.js +223 -0
  214. package/dist/src/lib/db3-index-output.js.map +1 -0
  215. package/dist/src/lib/db3-json-fields.d.ts +49 -0
  216. package/dist/src/lib/db3-json-fields.js +195 -0
  217. package/dist/src/lib/db3-json-fields.js.map +1 -0
  218. package/dist/src/lib/db3-type-archive.d.ts +59 -0
  219. package/dist/src/lib/db3-type-archive.js +95 -0
  220. package/dist/src/lib/db3-type-archive.js.map +1 -0
  221. package/dist/src/lib/db3-type-models.d.ts +148 -0
  222. package/dist/src/lib/db3-type-models.js +583 -0
  223. package/dist/src/lib/db3-type-models.js.map +1 -0
  224. package/dist/src/lib/deprecation.d.ts +2 -2
  225. package/dist/src/lib/deprecation.js +2 -2
  226. package/dist/src/lib/document-export-record-log.d.ts +7 -0
  227. package/dist/src/lib/document-export-record-log.js +9 -0
  228. package/dist/src/lib/document-export-record-log.js.map +1 -1
  229. package/dist/src/lib/document-ingest-artifact.d.ts +19 -0
  230. package/dist/src/lib/document-ingest-artifact.js +55 -6
  231. package/dist/src/lib/document-ingest-artifact.js.map +1 -1
  232. package/dist/src/lib/document-ingest-format2.d.ts +36 -0
  233. package/dist/src/lib/document-ingest-format2.js +78 -0
  234. package/dist/src/lib/document-ingest-format2.js.map +1 -0
  235. package/dist/src/lib/document-ingest-input.d.ts +9 -0
  236. package/dist/src/lib/document-ingest-input.js +28 -1
  237. package/dist/src/lib/document-ingest-input.js.map +1 -1
  238. package/dist/src/lib/document-ingest.d.ts +11 -1
  239. package/dist/src/lib/document-ingest.js +16 -0
  240. package/dist/src/lib/document-ingest.js.map +1 -1
  241. package/dist/src/lib/document-schema-rows.d.ts +42 -0
  242. package/dist/src/lib/document-schema-rows.js +53 -0
  243. package/dist/src/lib/document-schema-rows.js.map +1 -0
  244. package/dist/src/lib/experimental-apis.d.ts +36 -0
  245. package/dist/src/lib/experimental-apis.js +46 -0
  246. package/dist/src/lib/experimental-apis.js.map +1 -0
  247. package/dist/src/lib/file-attachment.d.ts +24 -0
  248. package/dist/src/lib/file-attachment.js +31 -0
  249. package/dist/src/lib/file-attachment.js.map +1 -0
  250. package/dist/src/lib/function-authorize-check.d.ts +142 -0
  251. package/dist/src/lib/function-authorize-check.js +311 -0
  252. package/dist/src/lib/function-authorize-check.js.map +1 -0
  253. package/dist/src/lib/function-authorize-view.d.ts +36 -0
  254. package/dist/src/lib/function-authorize-view.js +110 -0
  255. package/dist/src/lib/function-authorize-view.js.map +1 -0
  256. package/dist/src/lib/function-bundle.d.ts +27 -5
  257. package/dist/src/lib/function-bundle.js +142 -7
  258. package/dist/src/lib/function-bundle.js.map +1 -1
  259. package/dist/src/lib/function-collect.d.ts +112 -12
  260. package/dist/src/lib/function-collect.js +601 -12
  261. package/dist/src/lib/function-collect.js.map +1 -1
  262. package/dist/src/lib/function-db-types.d.ts +65 -11
  263. package/dist/src/lib/function-db-types.js +326 -157
  264. package/dist/src/lib/function-db-types.js.map +1 -1
  265. package/dist/src/lib/function-document-types.d.ts +19 -7
  266. package/dist/src/lib/function-document-types.js +24 -12
  267. package/dist/src/lib/function-document-types.js.map +1 -1
  268. package/dist/src/lib/function-grants-preflight.d.ts +99 -0
  269. package/dist/src/lib/function-grants-preflight.js +154 -2
  270. package/dist/src/lib/function-grants-preflight.js.map +1 -1
  271. package/dist/src/lib/function-lint.d.ts +85 -0
  272. package/dist/src/lib/function-lint.js +442 -0
  273. package/dist/src/lib/function-lint.js.map +1 -0
  274. package/dist/src/lib/function-log-row.js +21 -2
  275. package/dist/src/lib/function-log-row.js.map +1 -1
  276. package/dist/src/lib/function-run.d.ts +13 -21
  277. package/dist/src/lib/function-run.js +14 -27
  278. package/dist/src/lib/function-run.js.map +1 -1
  279. package/dist/src/lib/function-schema-codegen.d.ts +86 -22
  280. package/dist/src/lib/function-schema-codegen.js +194 -88
  281. package/dist/src/lib/function-schema-codegen.js.map +1 -1
  282. package/dist/src/lib/function-schema-refs.d.ts +98 -0
  283. package/dist/src/lib/function-schema-refs.js +177 -0
  284. package/dist/src/lib/function-schema-refs.js.map +1 -0
  285. package/dist/src/lib/function-sync.d.ts +120 -6
  286. package/dist/src/lib/function-sync.js +217 -26
  287. package/dist/src/lib/function-sync.js.map +1 -1
  288. package/dist/src/lib/function-trigger-listing.d.ts +11 -6
  289. package/dist/src/lib/function-trigger-listing.js +32 -11
  290. package/dist/src/lib/function-trigger-listing.js.map +1 -1
  291. package/dist/src/lib/function-typecheck.d.ts +52 -0
  292. package/dist/src/lib/function-typecheck.js +174 -54
  293. package/dist/src/lib/function-typecheck.js.map +1 -1
  294. package/dist/src/lib/function-versions.d.ts +2 -0
  295. package/dist/src/lib/function-versions.js +1 -0
  296. package/dist/src/lib/function-versions.js.map +1 -1
  297. package/dist/src/lib/generated-build-flags.d.ts +13 -0
  298. package/dist/src/lib/generated-build-flags.js +14 -0
  299. package/dist/src/lib/generated-build-flags.js.map +1 -0
  300. package/dist/src/lib/generated-command-status.d.ts +6 -0
  301. package/dist/src/lib/generated-command-status.js +502 -0
  302. package/dist/src/lib/generated-command-status.js.map +1 -0
  303. package/dist/src/lib/generated-config-surfaces.d.ts +804 -140
  304. package/dist/src/lib/generated-config-surfaces.js +2491 -1806
  305. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  306. package/dist/src/lib/generated-sdk-types.d.ts +1 -1
  307. package/dist/src/lib/generated-sdk-types.js +1 -1
  308. package/dist/src/lib/generated-sdk-types.js.map +1 -1
  309. package/dist/src/lib/hosting-build.d.ts +97 -0
  310. package/dist/src/lib/hosting-build.js +204 -0
  311. package/dist/src/lib/hosting-build.js.map +1 -0
  312. package/dist/src/lib/hosting-client.d.ts +167 -0
  313. package/dist/src/lib/hosting-client.js +340 -0
  314. package/dist/src/lib/hosting-client.js.map +1 -0
  315. package/dist/src/lib/hosting-environments.d.ts +32 -0
  316. package/dist/src/lib/hosting-environments.js +74 -0
  317. package/dist/src/lib/hosting-environments.js.map +1 -0
  318. package/dist/src/lib/hosting-errors.d.ts +30 -0
  319. package/dist/src/lib/hosting-errors.js +43 -0
  320. package/dist/src/lib/hosting-errors.js.map +1 -0
  321. package/dist/src/lib/hosting-token.d.ts +46 -0
  322. package/dist/src/lib/hosting-token.js +60 -0
  323. package/dist/src/lib/hosting-token.js.map +1 -0
  324. package/dist/src/lib/hosting-trust-step.d.ts +67 -0
  325. package/dist/src/lib/hosting-trust-step.js +279 -0
  326. package/dist/src/lib/hosting-trust-step.js.map +1 -0
  327. package/dist/src/lib/hosting-trust.d.ts +77 -0
  328. package/dist/src/lib/hosting-trust.js +194 -0
  329. package/dist/src/lib/hosting-trust.js.map +1 -0
  330. package/dist/src/lib/hosting-wait.d.ts +42 -0
  331. package/dist/src/lib/hosting-wait.js +84 -0
  332. package/dist/src/lib/hosting-wait.js.map +1 -0
  333. package/dist/src/lib/hosting-wfp-upload.d.ts +86 -0
  334. package/dist/src/lib/hosting-wfp-upload.js +149 -0
  335. package/dist/src/lib/hosting-wfp-upload.js.map +1 -0
  336. package/dist/src/lib/init-assets.d.ts +2 -6
  337. package/dist/src/lib/init-assets.js +11 -27
  338. package/dist/src/lib/init-assets.js.map +1 -1
  339. package/dist/src/lib/init-ios-links.d.ts +11 -7
  340. package/dist/src/lib/init-ios-links.js +28 -22
  341. package/dist/src/lib/init-ios-links.js.map +1 -1
  342. package/dist/src/lib/init-login-note.d.ts +13 -0
  343. package/dist/src/lib/init-login-note.js +22 -0
  344. package/dist/src/lib/init-login-note.js.map +1 -0
  345. package/dist/src/lib/init-schema.d.ts +15 -0
  346. package/dist/src/lib/init-schema.js +54 -0
  347. package/dist/src/lib/init-schema.js.map +1 -1
  348. package/dist/src/lib/integration-test-request.d.ts +54 -0
  349. package/dist/src/lib/integration-test-request.js +207 -0
  350. package/dist/src/lib/integration-test-request.js.map +1 -0
  351. package/dist/src/lib/invoker-shared-enums.d.ts +35 -0
  352. package/dist/src/lib/invoker-shared-enums.js +98 -0
  353. package/dist/src/lib/invoker-shared-enums.js.map +1 -0
  354. package/dist/src/lib/json-value.d.ts +6 -0
  355. package/dist/src/lib/json-value.js +13 -0
  356. package/dist/src/lib/json-value.js.map +1 -0
  357. package/dist/src/lib/load-routes.d.ts +33 -0
  358. package/dist/src/lib/load-routes.js +35 -0
  359. package/dist/src/lib/load-routes.js.map +1 -0
  360. package/dist/src/lib/log-inspection.d.ts +23 -4
  361. package/dist/src/lib/log-inspection.js +14 -5
  362. package/dist/src/lib/log-inspection.js.map +1 -1
  363. package/dist/src/lib/login-exchange-check.d.ts +18 -0
  364. package/dist/src/lib/login-exchange-check.js +27 -0
  365. package/dist/src/lib/login-exchange-check.js.map +1 -0
  366. package/dist/src/lib/login-scope-lines.d.ts +17 -7
  367. package/dist/src/lib/login-scope-lines.js +33 -10
  368. package/dist/src/lib/login-scope-lines.js.map +1 -1
  369. package/dist/src/lib/metadata-report.d.ts +85 -0
  370. package/dist/src/lib/metadata-report.js +81 -0
  371. package/dist/src/lib/metadata-report.js.map +1 -0
  372. package/dist/src/lib/object-status-filter.d.ts +9 -1
  373. package/dist/src/lib/object-status-filter.js +9 -1
  374. package/dist/src/lib/object-status-filter.js.map +1 -1
  375. package/dist/src/lib/output.d.ts +1 -1
  376. package/dist/src/lib/output.js +3 -1
  377. package/dist/src/lib/output.js.map +1 -1
  378. package/dist/src/lib/pin-refusal-hint.d.ts +12 -0
  379. package/dist/src/lib/pin-refusal-hint.js +35 -0
  380. package/dist/src/lib/pin-refusal-hint.js.map +1 -0
  381. package/dist/src/lib/platform-owned.js +5 -0
  382. package/dist/src/lib/platform-owned.js.map +1 -1
  383. package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
  384. package/dist/src/lib/primitive-declaration-names.js +22 -0
  385. package/dist/src/lib/primitive-declaration-names.js.map +1 -0
  386. package/dist/src/lib/primitive-declaration.d.ts +174 -0
  387. package/dist/src/lib/primitive-declaration.js +871 -0
  388. package/dist/src/lib/primitive-declaration.js.map +1 -0
  389. package/dist/src/lib/primitive-env-plugin.d.ts +99 -0
  390. package/dist/src/lib/primitive-env-plugin.js +408 -0
  391. package/dist/src/lib/primitive-env-plugin.js.map +1 -0
  392. package/dist/src/lib/project-login-apps.d.ts +8 -0
  393. package/dist/src/lib/project-login-apps.js +27 -0
  394. package/dist/src/lib/project-login-apps.js.map +1 -0
  395. package/dist/src/lib/prompt-schema-codegen.d.ts +36 -12
  396. package/dist/src/lib/prompt-schema-codegen.js +96 -100
  397. package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
  398. package/dist/src/lib/prompt-schema-document.d.ts +35 -0
  399. package/dist/src/lib/prompt-schema-document.js +92 -0
  400. package/dist/src/lib/prompt-schema-document.js.map +1 -0
  401. package/dist/src/lib/prompt-schema-refs.d.ts +173 -0
  402. package/dist/src/lib/prompt-schema-refs.js +478 -0
  403. package/dist/src/lib/prompt-schema-refs.js.map +1 -0
  404. package/dist/src/lib/records-verbs.d.ts +79 -0
  405. package/dist/src/lib/records-verbs.js +45 -0
  406. package/dist/src/lib/records-verbs.js.map +1 -0
  407. package/dist/src/lib/refresh-admin-credentials.d.ts +34 -4
  408. package/dist/src/lib/refresh-admin-credentials.js +85 -29
  409. package/dist/src/lib/refresh-admin-credentials.js.map +1 -1
  410. package/dist/src/lib/refresh-stored-login.d.ts +85 -0
  411. package/dist/src/lib/refresh-stored-login.js +233 -0
  412. package/dist/src/lib/refresh-stored-login.js.map +1 -0
  413. package/dist/src/lib/register-commands.d.ts +36 -0
  414. package/dist/src/lib/register-commands.js +37 -0
  415. package/dist/src/lib/register-commands.js.map +1 -0
  416. package/dist/src/lib/retired-imports.d.ts +53 -0
  417. package/dist/src/lib/retired-imports.js +120 -0
  418. package/dist/src/lib/retired-imports.js.map +1 -0
  419. package/dist/src/lib/row-field-rename.d.ts +18 -0
  420. package/dist/src/lib/row-field-rename.js +32 -0
  421. package/dist/src/lib/row-field-rename.js.map +1 -0
  422. package/dist/src/lib/run-status.d.ts +1 -1
  423. package/dist/src/lib/run-status.generated.d.ts +2 -2
  424. package/dist/src/lib/run-status.generated.js +3 -1
  425. package/dist/src/lib/run-status.generated.js.map +1 -1
  426. package/dist/src/lib/run-status.js +1 -1
  427. package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
  428. package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
  429. package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
  430. package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
  431. package/dist/src/lib/schema-codegen/generated-db3-bridge.js +227 -0
  432. package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
  433. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
  434. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
  435. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
  436. package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +229 -0
  437. package/dist/src/lib/schema-codegen/generated-field-grammar.js +420 -0
  438. package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
  439. package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
  440. package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
  441. package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
  442. package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
  443. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
  444. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
  445. package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +258 -0
  446. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +422 -0
  447. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -0
  448. package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
  449. package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
  450. package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
  451. package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
  452. package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
  453. package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
  454. package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
  455. package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
  456. package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
  457. package/dist/src/lib/schema-codegen/generated-schema-shape.d.ts +27 -0
  458. package/dist/src/lib/schema-codegen/generated-schema-shape.js +126 -0
  459. package/dist/src/lib/schema-codegen/generated-schema-shape.js.map +1 -0
  460. package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
  461. package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
  462. package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
  463. package/dist/src/lib/schema-codegen/naming.d.ts +35 -0
  464. package/dist/src/lib/schema-codegen/naming.js +83 -0
  465. package/dist/src/lib/schema-codegen/naming.js.map +1 -0
  466. package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
  467. package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
  468. package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
  469. package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
  470. package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
  471. package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
  472. package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
  473. package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
  474. package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
  475. package/dist/src/lib/schema-codegen/schemaToTs.d.ts +109 -0
  476. package/dist/src/lib/schema-codegen/schemaToTs.js +269 -0
  477. package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -0
  478. package/dist/src/lib/schema-codegen/valuesLists.d.ts +48 -0
  479. package/dist/src/lib/schema-codegen/valuesLists.js +144 -0
  480. package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
  481. package/dist/src/lib/schema-defs-module.d.ts +29 -0
  482. package/dist/src/lib/schema-defs-module.js +103 -0
  483. package/dist/src/lib/schema-defs-module.js.map +1 -0
  484. package/dist/src/lib/schema-family-index.d.ts +228 -0
  485. package/dist/src/lib/schema-family-index.js +813 -0
  486. package/dist/src/lib/schema-family-index.js.map +1 -0
  487. package/dist/src/lib/schema-pins.d.ts +82 -0
  488. package/dist/src/lib/schema-pins.js +198 -0
  489. package/dist/src/lib/schema-pins.js.map +1 -0
  490. package/dist/src/lib/schema-preview.d.ts +244 -0
  491. package/dist/src/lib/schema-preview.js +498 -0
  492. package/dist/src/lib/schema-preview.js.map +1 -0
  493. package/dist/src/lib/scope-request.d.ts +23 -11
  494. package/dist/src/lib/scope-request.js +69 -31
  495. package/dist/src/lib/scope-request.js.map +1 -1
  496. package/dist/src/lib/session-scope.d.ts +26 -0
  497. package/dist/src/lib/session-scope.js +58 -0
  498. package/dist/src/lib/session-scope.js.map +1 -0
  499. package/dist/src/lib/skill-installer.d.ts +2 -2
  500. package/dist/src/lib/skill-installer.js +2 -21
  501. package/dist/src/lib/skill-installer.js.map +1 -1
  502. package/dist/src/lib/step-run-table.d.ts +1 -2
  503. package/dist/src/lib/step-run-table.js +1 -2
  504. package/dist/src/lib/step-run-table.js.map +1 -1
  505. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +2 -1
  506. package/dist/src/lib/swift-codegen/agentGenerator.js +25 -23
  507. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
  508. package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
  509. package/dist/src/lib/swift-codegen/banners.js +12 -0
  510. package/dist/src/lib/swift-codegen/banners.js.map +1 -1
  511. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
  512. package/dist/src/lib/swift-codegen/functionGenerator.js +169 -51
  513. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
  514. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +33 -9
  515. package/dist/src/lib/swift-codegen/schemaToSwift.js +215 -179
  516. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
  517. package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +51 -0
  518. package/dist/src/lib/swift-codegen/sharedGenerator.js +239 -0
  519. package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
  520. package/dist/src/lib/swift-codegen/swiftKeys.d.ts +19 -0
  521. package/dist/src/lib/swift-codegen/swiftKeys.js +31 -0
  522. package/dist/src/lib/swift-codegen/swiftKeys.js.map +1 -0
  523. package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
  524. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
  525. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
  526. package/dist/src/lib/sync-resource-types.d.ts +117 -31
  527. package/dist/src/lib/sync-resource-types.js +197 -189
  528. package/dist/src/lib/sync-resource-types.js.map +1 -1
  529. package/dist/src/lib/sync-selectors.d.ts +7 -0
  530. package/dist/src/lib/sync-selectors.js +22 -2
  531. package/dist/src/lib/sync-selectors.js.map +1 -1
  532. package/dist/src/lib/template.d.ts +39 -3
  533. package/dist/src/lib/template.js +103 -14
  534. package/dist/src/lib/template.js.map +1 -1
  535. package/dist/src/lib/test-case-file-names.d.ts +3 -5
  536. package/dist/src/lib/test-case-file-names.js +3 -5
  537. package/dist/src/lib/test-case-file-names.js.map +1 -1
  538. package/dist/src/lib/test-runs.d.ts +45 -0
  539. package/dist/src/lib/test-runs.js +150 -0
  540. package/dist/src/lib/test-runs.js.map +1 -0
  541. package/dist/src/lib/test-users.d.ts +25 -0
  542. package/dist/src/lib/test-users.js +36 -0
  543. package/dist/src/lib/test-users.js.map +1 -0
  544. package/dist/src/lib/toml-database-config.d.ts +4 -2
  545. package/dist/src/lib/toml-database-config.js +11 -6
  546. package/dist/src/lib/toml-database-config.js.map +1 -1
  547. package/dist/src/lib/toml-list-edit.d.ts +33 -0
  548. package/dist/src/lib/toml-list-edit.js +481 -0
  549. package/dist/src/lib/toml-list-edit.js.map +1 -0
  550. package/dist/src/lib/toml-scalar-edit.d.ts +9 -0
  551. package/dist/src/lib/toml-scalar-edit.js +73 -5
  552. package/dist/src/lib/toml-scalar-edit.js.map +1 -1
  553. package/dist/src/lib/transition-warnings.d.ts +21 -0
  554. package/dist/src/lib/transition-warnings.js +49 -0
  555. package/dist/src/lib/transition-warnings.js.map +1 -0
  556. package/dist/src/lib/usage-meters.d.ts +16 -0
  557. package/dist/src/lib/usage-meters.js +52 -0
  558. package/dist/src/lib/usage-meters.js.map +1 -0
  559. package/dist/src/lib/user-index.d.ts +80 -0
  560. package/dist/src/lib/user-index.js +166 -0
  561. package/dist/src/lib/user-index.js.map +1 -0
  562. package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
  563. package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
  564. package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
  565. package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
  566. package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
  567. package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
  568. package/dist/src/lib/user-walk.d.ts +31 -0
  569. package/dist/src/lib/user-walk.js +102 -0
  570. package/dist/src/lib/user-walk.js.map +1 -0
  571. package/dist/src/lib/webhook-capture.d.ts +43 -0
  572. package/dist/src/lib/webhook-capture.js +91 -0
  573. package/dist/src/lib/webhook-capture.js.map +1 -0
  574. package/dist/src/lib/webhook-deliver.d.ts +18 -20
  575. package/dist/src/lib/webhook-deliver.js +34 -89
  576. package/dist/src/lib/webhook-deliver.js.map +1 -1
  577. package/dist/src/lib/webhook-test-run.d.ts +32 -0
  578. package/dist/src/lib/webhook-test-run.js +108 -0
  579. package/dist/src/lib/webhook-test-run.js.map +1 -0
  580. package/dist/src/lib/worker-perf-format.d.ts +22 -0
  581. package/dist/src/lib/worker-perf-format.js +27 -0
  582. package/dist/src/lib/worker-perf-format.js.map +1 -0
  583. package/dist/src/types/index.d.ts +20 -65
  584. package/dist/src/validators.d.ts +7 -55
  585. package/dist/src/validators.js +7 -53
  586. package/dist/src/validators.js.map +1 -1
  587. package/dist/src/vite.d.ts +17 -0
  588. package/dist/src/vite.js +18 -0
  589. package/dist/src/vite.js.map +1 -0
  590. package/package.json +20 -9
@@ -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";
@@ -38,15 +39,6 @@ export declare function wrapEntityError(err: unknown, action: "create" | "update
38
39
  */
39
40
  export declare function wrapPromptConfigError(err: unknown, action: "create" | "update" | "activate", promptKey: string, configName: string | undefined): Error;
40
41
  export declare function computeFileHash(filePath: string): string;
41
- /**
42
- * A transform's comparison hash: the script body itself (#2731 B7).
43
- *
44
- * Unlike the config types there is no projection to do — the `.rhai` bytes are
45
- * exactly what push sends and exactly what diff compares — so the "semantic"
46
- * hash is just a stable hash of the body, computable from a server response
47
- * without going through the file.
48
- */
49
- export declare function computeScriptBodyHash(body: string): string;
50
42
  export declare function shouldPushFile(filePath: string, storedHash: string | undefined): boolean;
51
43
  /**
52
44
  * Hash the *expanded* (post-fragment-splice) content of a workflow TOML.
@@ -69,125 +61,6 @@ export declare function computeExpandedContentHash(parsed: any): string;
69
61
  * push-skip cache for any workflow that references them.
70
62
  */
71
63
  export declare function shouldPushExpandedFile(parsed: any, storedHash: string | undefined): boolean;
72
- /**
73
- * The `[workflow].activeConfigName` a file actually states, trimmed — or
74
- * `undefined` when the file has no opinion about activation.
75
- *
76
- * Push reads the key the same way: `applyWorkflowConfigSidecars` activates a
77
- * configuration only for a truthy name and otherwise leaves the running one
78
- * alone (`cli/src/lib/workflow-config-apply.ts`). Every diff decision about
79
- * activation keys off this one predicate so the comparison cannot claim a
80
- * difference push has no way to reconcile (#2743, review follow-up).
81
- */
82
- export declare function authoredActiveConfigName(parsed: any): string | undefined;
83
- /**
84
- * The configuration a server workflow is RUNNING — its `activeConfigId`, or the
85
- * first config as the fallback `serializeWorkflow` has always used, so pull's
86
- * `activeConfigName` and the diff's reading of it can never disagree.
87
- */
88
- export declare function resolveActiveWorkflowConfig(workflow: any, configs: any[]): any;
89
- /**
90
- * Normalize a parsed workflow TOML object into the form the SERVER would hold
91
- * after a `config push` of that file. Used by `diff` so a hand-authored workflow
92
- * compares equal to the running state it already describes — while a server
93
- * value that genuinely differs still shows as Modified.
94
- *
95
- * In order:
96
- * 1. Trim the fields the server trims (`name`, `description`).
97
- * 2. Drop explicit-empty authored values — a `""` string or an empty
98
- * `capabilities` array. Push sends these as `null` (or the model default),
99
- * and the pull serializer omits the key for a cleared field, so "spelled
100
- * out as empty" and "absent" have to hash the same (#2743).
101
- * 3. Lowercase the two enums and floor the five queue limits, mirroring the
102
- * server's accepted-value canonicalization
103
- * (`src/workflows/config/workflow-field-handlers.ts`). A value the server
104
- * would REJECT is left alone: push fails loudly for those, so there is
105
- * nothing to preview. #2743 — without this, `dequeueOrder = "LIFO"` or
106
- * `perUserMaxRunning = 4.9` pushes fine and then reports Modified forever.
107
- * 4. Fill the model defaults (`WORKFLOW_MODEL_DEFAULTS`) for what the file
108
- * omits. `perAppMax*` / `queueTtlSeconds` joined that list in #1177: once
109
- * the pull serializer emitted them (a GET always returns them, they carry
110
- * a non-null model default), an unchanged workflow hashed unequal to a
111
- * local TOML that omits them — a false `modified` that made `config pull`
112
- * rewrite the file just to inject defaults. (`status` was on this list
113
- * until #2803 took availability off the config wire entirely.)
114
- * 5. Fill `activeConfigName` with the name the server itself creates
115
- * (`default`), so a hand-authored file that never named a config compares
116
- * equal to the workflow that pushing it produces (#2743). This is the
117
- * compare-BY-NAME case only: when the local file names no configuration at
118
- * all, `config diff` hashes both sides with `compareActivation: false` and
119
- * the fill never decides anything.
120
- * 6. Fill `key` from `resolvedKey` when the file omits it. `[workflow].key`
121
- * is optional — push and diff both resolve it from the FILENAME
122
- * (`tomlData.workflow?.key || basename(file, ".toml")`) — while the pull
123
- * serializer always emits it. Without this a file relying on the filename
124
- * hashes unequal to the very workflow it describes and reports Modified
125
- * forever, which is exactly the non-convergence #2743 removes. Callers
126
- * that already know the resolved key pass it; the rest leave the key as
127
- * authored.
128
- *
129
- * Only the DIFF-hash path (`hashWorkflowTomlForDiff`) normalizes; the stored
130
- * content-hash path that push's skip check compares is untouched, so upgrading
131
- * forces no one-time re-push (same note as #1446's schema canonicalization).
132
- *
133
- * Returns a shallow clone with a normalized `workflow` table; the input is
134
- * not mutated. Non-workflow TOML (no `workflow` table) is returned unchanged.
135
- */
136
- export declare function normalizeWorkflowTomlDefaults(parsed: any, resolvedKey?: string): any;
137
- /**
138
- * Canonical content hash of a workflow TOML for `diff`'s content comparison.
139
- * Applies `normalizeWorkflowTomlDefaults` first so omitted-vs-defaulted fields
140
- * don't spuriously diff, then runs the same `computeExpandedContentHash` that
141
- * pull stores and push compares. Both the local file and the
142
- * `serializeWorkflow`-produced remote form flow through this single function,
143
- * so the two sides are normalized identically by construction.
144
- *
145
- * `resolvedKey` is the key the caller already paired the two sides on (the
146
- * `[workflow].key`, or the filename when the file omits it). Passing it lets a
147
- * file that relies on the filename fallback hash equal to the remote form,
148
- * which always spells the key out — see `normalizeWorkflowTomlDefaults`.
149
- *
150
- * `compareActivation: false` drops `activeConfigName` from the hash. `config diff`
151
- * passes it when the local file names no configuration: push activates nothing
152
- * for such a file, so the configuration the server happens to be running is not
153
- * a difference push could ever reconcile, and hashing it in would report the
154
- * workflow Modified after every successful push — the non-convergence #2743
155
- * exists to remove (review follow-up). The remote name stays visible as a hint
156
- * on the Synced row instead. Defaults to comparing, so the include-reconcile
157
- * path (`reconcileWorkflowIncludes`, which asks whether the local file already
158
- * expands to the running state) keeps seeing activation as content.
159
- */
160
- export declare function hashWorkflowTomlForDiff(parsed: any, resolvedKey?: string, options?: {
161
- compareActivation?: boolean;
162
- }): string;
163
- /**
164
- * Build the canonical content hash for a *server* workflow (as returned by
165
- * `getWorkflow` + active `getWorkflowConfig`), mirroring exactly what a fresh
166
- * `config pull` would write to disk. Serializes via `serializeWorkflow`, parses
167
- * the resulting TOML (remote serialized TOML never carries `include`s, so a
168
- * plain `parseConfigToml` is sufficient — no fragment path needed), then hashes
169
- * through `hashWorkflowTomlForDiff` so it lines up with the local-file hash.
170
- *
171
- * `logger` is optional but `config diff` passes it: the serializer's
172
- * unrecognized-server-key warning (#2644) is the only signal that this CLI
173
- * version cannot represent a field the server holds, and a diff that swallowed
174
- * it would report the workflow as in sync with no hint that anything is
175
- * missing.
176
- */
177
- export declare function hashRemoteWorkflowForDiff(workflow: any, draft: any, configs: any[], logger?: (message: string) => void, options?: {
178
- compareActivation?: boolean;
179
- }): string;
180
- /**
181
- * Whether a workflow file already describes the workflow `remoteToml`
182
- * serializes (#4160), by `config diff`'s comparison: the normalized hash, with
183
- * activation compared only when the file names a configuration.
184
- *
185
- * Three shapes never match, because pull has work to do on them: a file with
186
- * `[[include]]` fragments (`reconcileWorkflowIncludes` owns those), one still
187
- * carrying the retired inline `[[configs]]` list, and any other file push
188
- * refuses (`pullMustRewrite`).
189
- */
190
- export declare function sameWorkflowAs(workflowKey: string, remoteToml: string): (localContent: string) => boolean;
191
64
  export interface ParsedAuthSettings {
192
65
  settings: Record<string, any>;
193
66
  warnings: string[];
@@ -264,44 +137,6 @@ export declare function planScopedVarsPull(serverVars: Array<{
264
137
  content: string;
265
138
  varEntities: Record<string, VarEntity>;
266
139
  };
267
- /**
268
- * Validate a `config push`'s webhook writes against the server's per-app cap.
269
- * Returns a list of human-readable errors (empty when the push may proceed).
270
- *
271
- * Run in `config push`'s up-front preflight (the `planVarsPush` cap pattern) so a
272
- * push that would run past the cap aborts BEFORE any mutation. Without it the
273
- * push creates webhooks one at a time until the server rejects one at the cap,
274
- * leaving a partial push.
275
- *
276
- * **Only creates are capped.** The server grandfathers apps that already hold
277
- * more webhooks than the cap: it refuses new creates and nothing else. A plain
278
- * file count would break that — `config pull` writes one toml per webhook, so a
279
- * grandfathered app pulls more files than the cap and could then never push
280
- * again, its workflows, databases and vars included. So the check compares the
281
- * local keys against the keys already on the server: a push that creates
282
- * nothing new is always allowed, however far over the cap the app is, and a
283
- * push that does create is rejected only when the resulting row count would
284
- * exceed the cap.
285
- *
286
- * The remote key list this runs against comes from `GET
287
- * /admin/api/apps/{appId}/webhooks`, which applies no default status filter, so
288
- * archived rows are in `remoteKeys` exactly as they are in the server's count.
289
- * The two therefore agree on what is already on the server.
290
- *
291
- * Still advisory rather than authoritative: this counts creates the way the
292
- * *config dir* implies, while the apply loop decides create-vs-update from
293
- * local sync state, so a checkout with missing sync state issues creates this
294
- * check did not predict. Those creates name keys the server already holds, and
295
- * the server does not cap a create that adds no row — it answers 409
296
- * `WEBHOOK_KEY_EXISTS`, which `adoptByKeyOnCreate409` converges on. A push
297
- * allowed here can still be rejected server-side (concurrent writes, a stale
298
- * list); that rejection carries `WEBHOOK_LIMIT_REACHED` and names the limit.
299
- *
300
- * Planned prunes are deliberately NOT netted out of the count: `--prune` runs
301
- * after the webhook create loop, so a push that only fits once its prunes land
302
- * would still fail mid-apply. Prune first, then push the additions.
303
- */
304
- export declare function validateWebhookCapForPush(localKeys: string[], remoteKeys: string[]): string[];
305
140
  /**
306
141
  * Validate a parsed `vars.toml` table against the same key/value constraints
307
142
  * the server enforces (key format, string type, non-empty, size cap) plus the
@@ -444,108 +279,6 @@ pullTargetFile?: string): Array<{
444
279
  status: string;
445
280
  hint?: string;
446
281
  }>;
447
- /**
448
- * Which of a workflow's configs `config pull` writes as sidecar files
449
- * (issue #2645, spec §Contracts/Named configs).
450
- *
451
- * Every config EXCEPT the active one. The active config's body is already the
452
- * `steps` at the top of `workflows/<key>.toml` — that is where authors edit it
453
- * and where `applyWorkflowBody` writes it — so emitting it again as a sidecar
454
- * would put the same body in two files and create a mismatch to adjudicate on
455
- * the next push. Two declarations of one piece of state is the shape of problem
456
- * this whole issue removes; it would be perverse to introduce one here.
457
- *
458
- * A config whose steps were not fetched is SKIPPED rather than written empty.
459
- * A sidecar is a claim about the server, and `steps = []` is a claim that would
460
- * tell the next push to blank a live configuration.
461
- *
462
- * Pure, so the selection is unit-testable without a live server.
463
- */
464
- export declare function workflowConfigSidecarsToWrite(workflow: any, configs: any[]): Array<{
465
- name: string;
466
- content: string;
467
- }>;
468
- /**
469
- * The names a workflow's configs occupy on the server, whatever their body.
470
- *
471
- * `workflowConfigSidecarsToWrite` deliberately skips a config whose steps were
472
- * not fetched, so it cannot answer "which sidecar files are stale". This can:
473
- * a local file whose name is absent HERE names a config the server no longer
474
- * has, which is the only safe basis for deleting it (issue #2645, review
475
- * follow-up).
476
- */
477
- export declare function workflowConfigNamesOnServer(workflow: any, configs: any[]): Set<string>;
478
- /**
479
- * Delete the sidecars naming a config the server no longer has (#2645).
480
- *
481
- * Pull is what makes the repo describe the server, and a sidecar left behind
482
- * after its config was archived — or after that config became the active one,
483
- * whose body is the workflow file's `steps` — is a file that would RE-CREATE it
484
- * on the next push. The repo would then be silently undoing the archive.
485
- *
486
- * Returns the file names removed, so pull can say what it did.
487
- */
488
- export declare function removeStaleWorkflowConfigSidecars(configDir: string, key: string, namesOnServer: Set<string>): string[];
489
- /**
490
- * The content hash `config push` skips a workflow on — sidecars included.
491
- *
492
- * The stored hash used to cover `workflows/<key>.toml` alone, so editing or
493
- * adding a named config sidecar without touching the workflow file left the
494
- * hash unchanged: push reported success and made no call at all, which is
495
- * worse than failing (issue #2645, review follow-up). The named configs are
496
- * part of what push applies, so they are part of what push compares.
497
- *
498
- * A workflow with no sidecars hashes exactly as before, so the common case
499
- * does not re-push once on upgrade. An unreadable sidecar hashes to a distinct
500
- * value rather than throwing: a hash is a comparison, and the parse error
501
- * belongs to the apply path, which raises it with the file name attached.
502
- */
503
- export declare function workflowHashInput(configDir: string, key: string, parsedWorkflowToml: any): any;
504
- /** See `workflowHashInput`. */
505
- export declare function computeWorkflowContentHash(configDir: string, key: string, parsedWorkflowToml: any): string;
506
- /**
507
- * Canonical hash of a named config sidecar, for `config diff` (#2645).
508
- *
509
- * Hashes the parsed body rather than the bytes so comment and key-order
510
- * differences do not read as drift — the same semantic comparison `config diff`
511
- * makes everywhere else (spec criterion 3).
512
- */
513
- export declare function hashWorkflowConfigSidecar(parsed: any): string;
514
- /**
515
- * Does the file's `[workflow].activeConfigName` name a configuration that the
516
- * push could actually activate (#2743, review follow-up)?
517
- *
518
- * The diff normalizer equates an omitted `activeConfigName` with `default` —
519
- * the name the server itself gives the config it creates — so a file that
520
- * spells `default` out hashes equal to the omitted form. For a workflow with no
521
- * configuration at all (a legacy row the GET's auto-migration could not heal),
522
- * the remote side serializes an EMPTY active config name and normalizes to
523
- * `default` too, so the pair hashes equal while `config push` would stop on
524
- * `activeConfigName "default" names no configuration`. Reporting Synced for a
525
- * file whose next push fails is the one drift a change gate must not skip.
526
- *
527
- * A name the repo carries as a sidecar resolves: push creates that config and
528
- * activates it (and the sidecar comparison already reports the difference).
529
- * Read-only and non-throwing, like every other diff predicate.
530
- */
531
- export declare function workflowActiveConfigNameUnresolvable(configDir: string, key: string, localParsed: any, configs: any[]): boolean;
532
- /**
533
- * The `config diff` note for a workflow whose file names no configuration while
534
- * the server runs one other than the `default` it creates itself (#2743, review
535
- * follow-up).
536
- *
537
- * Such a file is not drift push can act on: activation is preserved, not
538
- * converged, so the row is Synced — the alternative, reporting Modified,
539
- * repeats forever because no push changes it. But the repo does not describe
540
- * which configuration is live, and only `config pull` records it, so the fact is
541
- * carried as a hint on the Synced row — the same way an operational disable is
542
- * (`outOfServiceHint`). The server-created `default` is the shape a
543
- * hand-authored file already means, so it is silent.
544
- *
545
- * Pure and non-throwing, like every other diff predicate. Returns the existing
546
- * hint untouched when there is nothing to add.
547
- */
548
- export declare function unmanagedActiveConfigHint(localParsed: any, workflow: any, configs: any[], existingHint?: string): string | undefined;
549
282
  /**
550
283
  * Drop the archived rows from a pull listing (#2803).
551
284
  *
@@ -644,52 +377,20 @@ export declare function outOfServiceHint(remote: any, existingHint?: string): st
644
377
  /**
645
378
  * Serialize an integration DETAIL response to its `integrations/<key>.toml`.
646
379
  *
647
- * #2631: `accessRule` is the CEL expression gating who may call the
648
- * integration. It comes back on the detail only (not the list summary), and it
649
- * is written to TOML so `config pull` → `config push` round-trips the rule instead
650
- * of clearing it. A null/empty rule has no TOML representation and is simply
651
- * omitted; the push path sends `null` for an omitted rule, which matches the
652
- * server state it came from.
380
+ * The `[integration]` keys come from the vendored definition, so the
381
+ * deprecated `accessRule` (#4872) is never written, even from a server that
382
+ * still returns it.
653
383
  */
654
384
  export declare function serializeIntegration(integration: any, logger?: (message: string) => void): string;
655
385
  /**
656
386
  * Build the `config push` body for one integration TOML.
657
387
  *
658
- * `accessRule` follows the #1567 TOML-owned rule: send value-or-`null` so
659
- * removing the line from the file clears the rule server-side rather than
660
- * leaving a stale one live. There is deliberately NO local "rule is required"
661
- * check here — a remote integration missing from local sync state is pushed as
662
- * a create, expected to 409, and adopted by key (#1006); a local check would
663
- * strand that path. The server decides (#2631).
388
+ * The deprecated `accessRule` line (#4872) is accepted in the file and never
389
+ * sent: the body carries the definition's fields only.
664
390
  */
665
391
  export declare function buildIntegrationPushPayload(key: string, tomlData: any, { mode }?: {
666
392
  mode?: PushMode;
667
393
  }): Record<string, any>;
668
- export declare function webhookConfigToTomlTable(scheme: string, config: any): Record<string, any> | undefined;
669
- export declare function tomlTableToWebhookConfig(scheme: string, table: any): Record<string, any> | undefined;
670
- export declare function serializeWebhook(webhook: any, logger?: (message: string) => void): string;
671
- /**
672
- * Build the `config push` body for one webhook TOML.
673
- *
674
- * The `[webhook]`-derived half comes from the vendored definition; the four
675
- * structural tables the file also carries (`[allowedIps]`, `[inputMapping]`,
676
- * `[metadata]`, `[verification.<scheme>]`) keep their own conversion, which is
677
- * why the definition declares them `structural` rather than as fields.
678
- */
679
- export declare function buildWebhookPushPayload(key: string, tomlData: any, { mode }?: {
680
- mode?: PushMode;
681
- }): Record<string, any>;
682
- export declare function serializeCronTrigger(trigger: any, logger?: (message: string) => void): string;
683
- /**
684
- * Build the `config push` body for one cron-trigger TOML.
685
- *
686
- * `state` is absent from the create body because the definition says the create
687
- * handler assigns it (`writableOn: ["update"]`) — the CLI used to send it and
688
- * the server used to drop it silently.
689
- */
690
- export declare function buildCronTriggerPushPayload(key: string, tomlData: any, { mode }?: {
691
- mode?: PushMode;
692
- }): Record<string, any>;
693
394
  export declare function serializeBlobBucket(bucket: any, ruleSetIdToName?: Map<string, string>, logger?: (message: string) => void): string;
694
395
  /**
695
396
  * The entity a `blob-buckets/<key>.toml` describes (#4116) — the parse
@@ -766,41 +467,83 @@ export declare function promptConfigPayload(tomlConfig: any, options?: {
766
467
  * so (`writableOn: ["create"]`) — the retention tier is fixed at creation.
767
468
  */
768
469
  export declare function buildBlobBucketCreatePayload(key: string, bucket: any): Record<string, any>;
769
- export declare function serializePrompt(prompt: any, logger?: (message: string) => void): string;
770
- /**
771
- * The `config push` warning for a caller workflow pushed with no `accessRule`
772
- * (#2652).
773
- *
774
- * Returns `null` when a rule is declared — and for a `runAs = "system"`
775
- * workflow, which rejects any rule and cannot be started by a member at all.
776
- * Otherwise it names the workflow, the consequence, and the one-line restore,
777
- * because after the #2652 flip a ruleless caller workflow denies every
778
- * non-admin caller from the deploy onward.
779
- *
780
- * A prompt gets no warning (#4368): a server function runs it on its
781
- * `prompt:<key>` grant, which never consults the rule, so a ruleless prompt is
782
- * the ordinary case, not a lockout.
783
- *
784
- * The workflow pushes `accessRule` as value-or-`null` since #2743's
785
- * always-send conversion, so an omitted key really does leave it ruleless on
786
- * the server. The wording says so explicitly, because it used to say the
787
- * opposite (the update path preserved a stored rule) and an operator who
788
- * learned that caveat needs to see it retracted.
789
- */
790
- export declare function missingAccessRuleWarning(opts: {
791
- key: string;
792
- accessRule: unknown;
793
- runAs?: unknown;
794
- }): string | null;
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;
795
491
  /**
796
492
  * Build the `config push` body for one prompt TOML's `[prompt]` table.
797
493
  *
798
494
  * The prompt's own fields only — its `[[configs]]` entries are separate
799
495
  * requests, built by `buildPromptConfigPayload`.
800
496
  */
801
- export declare function buildPromptPushPayload(key: string, tomlData: any, { mode }?: {
497
+ export declare function buildPromptPushPayload(key: string, tomlData: any, { mode, schemas, }?: {
802
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;
803
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
+ }>;
804
547
  /**
805
548
  * Build the POST body for a prompt create.
806
549
  *
@@ -822,7 +565,7 @@ export declare function buildPromptPushPayload(key: string, tomlData: any, { mod
822
565
  * Every other config field rides along from the definition, so a new LLM
823
566
  * setting reaches a brand-new prompt without an edit at this call site.
824
567
  */
825
- 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>;
826
569
  /**
827
570
  * The PATCH body reconciling the seeded config with the first `[[configs]]`
828
571
  * entry, or `null` when the entry needs none of it.
@@ -845,7 +588,7 @@ export declare function buildPromptCreatePayload(key: string, tomlData: any): Re
845
588
  * entry's `status` itself now, so there is no deferral either way and this patch
846
589
  * is the two fields `POST /prompts` cannot express, nothing more.
847
590
  */
848
- 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;
849
592
  /**
850
593
  * Build the create/update body for ONE `[[configs]]` entry.
851
594
  *
@@ -853,28 +596,11 @@ export declare function seededOnlyPromptConfigFields(firstConfig: any, seededCon
853
596
  * update those defaults must NOT be applied, or editing an unrelated key would
854
597
  * silently re-point a config at the default model.
855
598
  */
856
- export declare function buildPromptConfigPayload(tomlConfig: any, { mode }?: {
599
+ export declare function buildPromptConfigPayload(tomlConfig: any, { mode, schemas, }?: {
857
600
  mode?: PushMode;
601
+ /** #5534 — the entry's compile (`promptConfigSchemaPayload`), attached beside its `outputSchema`. */
602
+ schemas?: PromptConfigSchemaPayload | null;
858
603
  }): Record<string, any>;
859
- /**
860
- * Rewrite a workflow TOML file's string-form `inputSchema` / `outputSchema` to
861
- * native object form for `config migrate-toml` (issue #1446).
862
- *
863
- * Purely local, no server fetch. Parses the raw source WITHOUT expanding
864
- * fragment `include`s (so those directives survive the rewrite), swaps a
865
- * JSON-string schema for its parsed object when it round-trips faithfully
866
- * (`canEmitNative === null`), and re-serializes via `stringifyConfigToml`.
867
- *
868
- * Only rewrites when a field is actually converted: a file whose schemas are
869
- * already native, absent, or un-representable (a `null` default) is returned
870
- * with `changed: false` and its original bytes untouched — so migrate is
871
- * idempotent and never reports a spurious migration or reformats a file it
872
- * didn't need to touch.
873
- */
874
- export declare function rewriteWorkflowSchemasToNative(rawToml: string, workflowKey?: string, log?: (message: string) => void): {
875
- content: string;
876
- changed: boolean;
877
- };
878
604
  /**
879
605
  * #2644 — `config push` rejects any key the vendored definition does not
880
606
  * recognize, so a mistyped or newer-server key fails locally instead of being
@@ -885,7 +611,14 @@ export declare function rewriteWorkflowSchemasToNative(rawToml: string, workflow
885
611
  * are checked one by one and the unknown keys reported together, so a typo in
886
612
  * the third `[[configs]]` block is as loud as one in the first.
887
613
  */
888
- 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;
615
+ /**
616
+ * The warnings `config push` prints for one file that still carries a
617
+ * DEPRECATED key (#4872): the registry's dated sentence per key, prefixed with
618
+ * the file. The key is accepted and ignored, so these never fail the push;
619
+ * `[]` for a file that carries none.
620
+ */
621
+ export declare function configDeprecatedKeyWarnings(filePath: string, tomlData: any, table: ConfigTable): string[];
889
622
  /**
890
623
  * #2644 — the document-level half of the same rejection: a top-level table the
891
624
  * object's definition does not declare, or a field table written with the wrong
@@ -895,7 +628,7 @@ export declare function configUnknownKeyError(filePath: string, tomlData: any, t
895
628
  * Unrecognized keys INSIDE a table were already rejected; a mistyped table
896
629
  * HEADER was not, and it is the more destructive of the two — `[integraton]`
897
630
  * leaves `[integration]` absent, so the push builder reads an empty table and
898
- * sends `description: null` / `accessRule: null`, CLEARING them server-side.
631
+ * sends `description: null`, CLEARING it server-side.
899
632
  * The design gate settled the posture (2026-08-12): push rejects everything
900
633
  * unknown, tables included.
901
634
  */
@@ -912,8 +645,11 @@ export declare function configDocumentShapeErrors(filePath: string, tomlData: an
912
645
  * message per file, but nothing checked a workflow file's top-level tables —
913
646
  * so the surface is listed here for the document-level check and skipped for
914
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.
915
651
  */
916
- export declare function unknownKeyPreflightTargets(): Array<{
652
+ export declare function unknownKeyPreflightTargets(experimental?: boolean): Array<{
917
653
  dir: string;
918
654
  surface: ConfigObjectSurface;
919
655
  tables: ConfigTable[];
@@ -928,6 +664,32 @@ export interface ConfigFileValidationError {
928
664
  /** The messages, verbatim — the same text `config push` aborts with. */
929
665
  messages: string[];
930
666
  }
667
+ /**
668
+ * The `SyncState.entities` slots of the object types #3190 retired. A state
669
+ * file written before the retirement still carries them; `config pull` drops
670
+ * them and says so once (`retiredSyncStateSlots`).
671
+ */
672
+ export declare const RETIRED_SYNC_STATE_SLOTS: readonly ["workflows", "scripts", "webhooks", "cronTriggers"];
673
+ /** The retired slots a prior state holds records in, in declaration order. */
674
+ export declare function retiredSyncStateSlots(entities: unknown): string[];
675
+ /**
676
+ * The retirement sentences for every retired object directory a config tree
677
+ * still holds (#3190), in the table's order. `config push` refuses the tree on
678
+ * any of them and `config diff` reports the same rows.
679
+ */
680
+ export declare function retiredConfigDirectoriesIn(configDir: string): string[];
681
+ /**
682
+ * The files a config tree still holds under a retired type-config directory
683
+ * (#4731), as one refusal per directory naming each file. An empty directory
684
+ * an older pull left behind holds nothing to apply and is not refused.
685
+ */
686
+ export declare function retiredTypeConfigFilesIn(configDir: string): string[];
687
+ /**
688
+ * Every `rule-sets/*.toml` whose `[ruleSet] resourceType` is retired (#4959:
689
+ * `lock`), as `<file>: ruleSet.resourceType = "<type>" — <sentence>`. A file
690
+ * that does not parse is left to the rule-set validators.
691
+ */
692
+ export declare function retiredRuleSetFilesIn(configDir: string): string[];
931
693
  /**
932
694
  * `config push`'s preflight — every check the authored files decide on their
933
695
  * own, run before the FIRST mutating call (#976 fix A, #3320, #3375).
@@ -968,9 +730,20 @@ export declare function runConfigPushPreflight(input: {
968
730
  * tree's, never this app's, so it is out of the validated body.
969
731
  */
970
732
  localEnvironment?: boolean;
971
- client: Pick<ApiClient, "listIntegrations" | "listFunctions" | "listPrompts" | "listPromptConfigs">;
733
+ /** #5249 `getPrompt`: a prompt read. #6119 `getFunctionConfigEnvelope`: an active version read. */
734
+ client: Pick<ApiClient, "listIntegrations" | "listFunctions" | "listPrompts" | "listPromptConfigs" | "getPrompt" | "listSchemaFiles" | "listDatabaseTypeConfigs" | "getFunctionConfigEnvelope">;
972
735
  /** #4485 — the environment's vars override file, layered over vars.toml. */
973
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;
974
747
  }): Promise<{
975
748
  parsedVars: Record<string, unknown> | null;
976
749
  /** #4441 — agent files to apply before the functions leg. */
@@ -980,6 +753,14 @@ export declare function runConfigPushPreflight(input: {
980
753
  overridingKeys: string[];
981
754
  addedKeys: string[];
982
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[];
983
764
  }>;
984
765
  export declare function promptKindFileErrors(filePath: string, tomlData: any): string[];
985
766
  /**
@@ -1113,7 +894,7 @@ export declare function promptAgentFunctionErrors(filePath: string, tomlData: an
1113
894
  * the leg reports it where it always has. #4441 — the agent files in
1114
895
  * `agentFilesFirst` (`functionChangePreflight`) go before the leg instead.
1115
896
  */
1116
- 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): {
1117
898
  beforeFunctions: string[];
1118
899
  afterFunctions: string[];
1119
900
  };
@@ -1125,7 +906,7 @@ export declare function partitionPromptFilesForPush(promptsDir: string, files: r
1125
906
  * the cause; the function's own failure row says why. A file that does not
1126
907
  * parse is left for the prompt leg to report.
1127
908
  */
1128
- 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): {
1129
910
  apply: string[];
1130
911
  held: Array<{
1131
912
  key: string;
@@ -1180,9 +961,19 @@ export declare function configFileValidationMessages(filePath: string, tomlData:
1180
961
  * Whether `config pull` must rewrite a local file whatever it says (#4160):
1181
962
  * `config push` would refuse it. Keeping such a file because its VALUES match
1182
963
  * would leave the tree unpushable after a pull that reported success.
964
+ *
965
+ * #4872 — or it still carries a DEPRECATED key. The key compares as nothing,
966
+ * so the file would be kept, and the pull the push warning names would not
967
+ * remove the line.
1183
968
  */
1184
969
  export declare function pullMustRewrite(label: string, tomlData: any): boolean;
1185
- export declare function collectConfigFileValidationErrors(configDir: string): ConfigFileValidationError[];
970
+ export declare function collectConfigFileValidationErrors(configDir: string, experimental?: boolean): ConfigFileValidationError[];
971
+ /**
972
+ * The deprecated-key warnings for every file `collectConfigFileValidationErrors`
973
+ * reads (#4872), one line per file and key. Advisory: the keys are accepted and
974
+ * ignored, so these are printed and never refuse a push.
975
+ */
976
+ export declare function collectConfigDeprecatedKeyWarnings(configDir: string): string[];
1186
977
  /**
1187
978
  * Every `functions/<key>.toml` whose file-decidable errors `config push` would
1188
979
  * refuse (#3320).
@@ -1217,8 +1008,7 @@ export declare function mergeConfigFileValidationErrors(collected: ConfigFileVal
1217
1008
  *
1218
1009
  * Test cases are a registered surface (#2644 phase 3) but they are not a
1219
1010
  * `SYNC_RESOURCE_TYPES` directory — they live beside the block they test, in
1220
- * `prompts/<key>.tests/`, `workflows/<key>.tests/`, `transforms/<name>.tests/`
1221
- * and (since #2769) `integrations/<key>.tests/` — so
1011
+ * `prompts/<key>.tests/` and (since #2769) `integrations/<key>.tests/` — so
1222
1012
  * `unknownKeyPreflightTargets`, which crosses
1223
1013
  * the registry with that table, never reaches them. Listing them here gives the
1224
1014
  * sidecars the same unrecognized-key rejection every per-entity file has
@@ -1226,42 +1016,6 @@ export declare function mergeConfigFileValidationErrors(collected: ConfigFileVal
1226
1016
  * dropped on the way to the server.
1227
1017
  */
1228
1018
  export declare function testCaseTomlFiles(configDir: string): string[];
1229
- /** The `[workflow]` case of `configUnknownKeyError` (#2644 phase 1). */
1230
- export declare function workflowUnknownKeyError(filePath: string, tomlData: any): string | null;
1231
- /**
1232
- * Will `config push` reach this workflow key through its UPDATE path?
1233
- *
1234
- * The push takes that path when sync state already holds an id for the key —
1235
- * the `existingId` the apply loop reads. Everything else is a create (including
1236
- * a create that 409s and adopts by key, which cannot be known before the server
1237
- * answers). Exported so the front-loaded preflight can decide, before the first
1238
- * mutating call, which files the update-only `name` pre-check applies to.
1239
- */
1240
- export declare function isWorkflowUpdateTarget(key: string, syncState: {
1241
- entities?: {
1242
- workflows?: Record<string, any>;
1243
- };
1244
- } | null): boolean;
1245
- /**
1246
- * Will the apply loop actually SEND this workflow, or skip it as unchanged?
1247
- *
1248
- * Mirrors the loop's skip condition (`!force && existingId &&
1249
- * !shouldPushExpandedFile(...)`): a create always sends, `--force` always
1250
- * sends, and an update sends only when the expanded content (workflow file plus
1251
- * its config sidecars) differs from the hash sync state recorded for it.
1252
- *
1253
- * Exported so the front-loaded preflight can scope the update-only `name`
1254
- * pre-check to the files this push will really update. Without that scoping a
1255
- * workflow created through the manifest-key `name` fallback — an authoring
1256
- * shape the create path deliberately supports — would push once and then fail
1257
- * every later push, including a no-change one and its `--dry-run`, on a file
1258
- * the push was never going to send (#2743, review follow-up).
1259
- */
1260
- export declare function workflowPushSendsUpdate(configDir: string, key: string, parsedWorkflowToml: any, syncState: {
1261
- entities?: {
1262
- workflows?: Record<string, any>;
1263
- };
1264
- } | null, force?: boolean): boolean;
1265
1019
  /**
1266
1020
  * The UPDATE path's `name` pre-check (#2743).
1267
1021
  *
@@ -1294,12 +1048,36 @@ export declare function workflowPushSendsUpdate(configDir: string, key: string,
1294
1048
  * other unusable-schema case stays the apply loop's warning (D3455-004).
1295
1049
  */
1296
1050
  export declare function documentSchemaPreflightError(resolution: DocumentSchemaResolution): string | null;
1297
- export declare function workflowUpdateNameError(filePath: string, workflow: any): string | null;
1298
- export declare function serializeWorkflow(workflow: any, draft: any, configs: any[], logger?: (message: string) => void): string;
1299
1051
  export declare function serializeDatabaseType(typeConfig: any, ruleSetIdToName: Map<string, string>, options?: {
1300
1052
  /** Sink for human-readable messages (logged via `info`). */
1301
1053
  logger?: (message: string) => void;
1302
1054
  }): string;
1055
+ /**
1056
+ * #4802 — the `db3-types/<name>.toml` a type row is pulled as: the database
1057
+ * type file's content, its `[type]` table naming the type `name`.
1058
+ */
1059
+ export declare function serializeDb3Type(typeConfig: any, ruleSetIdToName: Map<string, string>, options?: {
1060
+ logger?: (message: string) => void;
1061
+ }): string;
1062
+ /**
1063
+ * #4802 — a `db3-types/<name>.toml` file as the payload `PUT db3-types/:name`
1064
+ * takes: the database type file's, its type read from `[type] name`.
1065
+ * #6020 — `[type] archived = true` reads as `archived: true`; `false` and an
1066
+ * absent key both read as active (no key), the spelling a pull writes.
1067
+ */
1068
+ export declare function parseDb3TypeToml(tomlData: any): {
1069
+ typeConfig: any;
1070
+ };
1071
+ /**
1072
+ * #5998 — the preflight refusal of a `db3-types/` file whose `[type] create`
1073
+ * is not `"admins"` or `"members"`, or `null` when it is one or absent.
1074
+ */
1075
+ export declare function db3TypeCreateKeyError(filePath: string, tomlData: any): string | null;
1076
+ /**
1077
+ * #6020 — the preflight refusal of a `db3-types/` file whose `[type]
1078
+ * archived` is not a boolean, or `null` when it is one or absent.
1079
+ */
1080
+ export declare function db3TypeArchivedKeyError(filePath: string, tomlData: any): string | null;
1303
1081
  /**
1304
1082
  * Flatten an email-template detail response onto its field surface.
1305
1083
  *
@@ -1337,18 +1115,6 @@ export declare function serializeRuleSet(ruleSet: any, logger?: (message: string
1337
1115
  * push would "succeed", change nothing, and be planned again on every run.
1338
1116
  */
1339
1117
  export declare function buildRuleSetPushPayload(tomlData: any, mode: PushMode): Record<string, any>;
1340
- export declare function serializeGroupTypeConfig(config: any, ruleSetIdToName: Map<string, string>, logger?: (message: string) => void): string;
1341
- /**
1342
- * The create/update body for one group-type config (#2644).
1343
- *
1344
- * Takes the entity `parseGroupTypeConfigToml` produced, AFTER the rule-set
1345
- * name → id resolution: the definition says which fields the server accepts in
1346
- * each mode, so `groupType` rides the create body and the URL on update.
1347
- */
1348
- export declare function buildGroupTypeConfigPayload(configData: any, mode: PushMode): Record<string, any>;
1349
- export declare function serializeCollectionTypeConfig(config: any, ruleSetIdToName: Map<string, string>, logger?: (message: string) => void): string;
1350
- /** The create/update body for one collection-type config (#2644). */
1351
- export declare function buildCollectionTypeConfigPayload(configData: any, mode: PushMode): Record<string, any>;
1352
1118
  /**
1353
1119
  * The upsert body for one metadata-category config (#2644).
1354
1120
  *
@@ -1376,6 +1142,11 @@ export declare function buildMetadataCategoryPayload(configData: any): Record<st
1376
1142
  */
1377
1143
  export declare function dbTypeOwnedScalars(table?: ConfigTable): string[];
1378
1144
  export declare const DB_TYPE_OWNED_SCALARS: readonly string[];
1145
+ /**
1146
+ * #5993 — the fields a `db3-types/` file owns: the db3 type table's, which
1147
+ * declares no rule set, so a db3 push body carries no `ruleSetId` at all.
1148
+ */
1149
+ export declare const DB3_TYPE_OWNED_SCALARS: readonly string[];
1379
1150
  /** The user-facing TOML key for a wire field (for push output). */
1380
1151
  export declare function dbTypeFieldLabel(key: string): string;
1381
1152
  /**
@@ -1391,10 +1162,9 @@ export declare function hasMeaningfulValue(v: any): boolean;
1391
1162
  * The server PATCH endpoint distinguishes an omitted key (preserve) from an
1392
1163
  * explicit `null` (clear), so sending every owned scalar as `value ?? null`
1393
1164
  * converges the server to the local TOML: a field removed from the file lands
1394
- * as `null` and is cleared. Matches the always-send pattern the sibling
1395
- * `collection-type-config` push already uses.
1165
+ * as `null` and is cleared.
1396
1166
  */
1397
- export declare function buildOwnedScalarUpdate(typeConfig: any): Record<string, any>;
1167
+ export declare function buildOwnedScalarUpdate(typeConfig: any, ownedFields?: readonly string[]): Record<string, any>;
1398
1168
  /**
1399
1169
  * Issue #1567 — the owned scalars this push genuinely clears: the outgoing
1400
1170
  * value is empty but the server currently holds a real value (a non-null →
@@ -1405,7 +1175,7 @@ export declare function buildOwnedScalarUpdate(typeConfig: any): Record<string,
1405
1175
  * GET; without it (fresh type or a failed fetch) nothing is reported cleared.
1406
1176
  */
1407
1177
  export declare function ownedScalarsBeingCleared(updateData: Record<string, any>, serverConfig: any): string[];
1408
- export declare function parseDatabaseTypeToml(tomlData: any): {
1178
+ export declare function parseDatabaseTypeToml(tomlData: any, table?: ConfigTable): {
1409
1179
  typeConfig: any;
1410
1180
  };
1411
1181
  /**
@@ -1414,8 +1184,6 @@ export declare function parseDatabaseTypeToml(tomlData: any): {
1414
1184
  * `config diff` hashes both sides through.
1415
1185
  */
1416
1186
  export declare function parseRuleSetToml(tomlData: any): any;
1417
- export declare function parseGroupTypeConfigToml(tomlData: any): any;
1418
- export declare function parseCollectionTypeConfigToml(tomlData: any): any;
1419
1187
  /**
1420
1188
  * `config diff`'s hash for one configuration object, over the field set its
1421
1189
  * DEFINITION declares (#2644 criterion 8).
@@ -1599,6 +1367,190 @@ export interface ConfigDiffSpec {
1599
1367
  /** How the type names itself in the rule-set resolution message. */
1600
1368
  describe(entity: any): string;
1601
1369
  }
1370
+ /**
1371
+ * #4802 — the comparison a `db3-types/<name>.toml` file goes through: the
1372
+ * database type's, read off its own table. Kept out of `CONFIG_DIFF_SPECS`
1373
+ * (the shared comparator's registry, whose round-trip bar requires a fixture
1374
+ * per entry): it is the database type spec with another `[type]` table, and
1375
+ * its own suite covers the round trip.
1376
+ */
1377
+ export declare const DB3_TYPE_DIFF_SPEC: ConfigDiffSpec;
1378
+ /**
1379
+ * `config push`'s gate for one `db3-types/` file: `decidePushForConfig` over
1380
+ * `DB3_TYPE_DIFF_SPEC`.
1381
+ *
1382
+ * #5993 — a baseline an earlier CLI stamped was hashed with the rule set, so
1383
+ * for a row with a stored binding it equals no projection this CLI makes, and
1384
+ * an ordinary edit would read as both sides having moved. A baseline that
1385
+ * equals the live row under that earlier projection says the server has not
1386
+ * moved since: it is read as the live row's current hash.
1387
+ */
1388
+ export declare function decideDb3TypePush(input: Omit<Parameters<typeof decidePushForConfig>[0], "spec">): PushGateOutcome;
1389
+ /**
1390
+ * The body `PUT db3-types/:name` is sent for one parsed `db3-types/` file,
1391
+ * before its concurrency guard. The file owns every field: an absent one is
1392
+ * sent as null and cleared (#1567). #5993 — no `ruleSetId`: a db3 type takes
1393
+ * none.
1394
+ */
1395
+ export declare function buildDb3TypePushBody(typeConfig: any, options: {
1396
+ serverHasSchema: boolean;
1397
+ }): Record<string, any>;
1398
+ /** One type a push's preflight found the append-only rule refuses (#6019). */
1399
+ export interface AppendOnlyRefusal {
1400
+ /** The type's name. */
1401
+ type: string;
1402
+ /** Each change refused, as the server listed it. */
1403
+ reasons: Array<{
1404
+ path: string;
1405
+ change?: string;
1406
+ reason: string;
1407
+ }>;
1408
+ }
1409
+ /** `<type>: <path>: <reason>`, one line per change the append-only rule refused or let through (#6019). */
1410
+ export declare function appendOnlyReasonLines(type: string, reasons: Array<{
1411
+ path: string;
1412
+ reason: string;
1413
+ }>): string[];
1414
+ /**
1415
+ * What a type write's answer says about the type's field lifecycle, as
1416
+ * `config push` prints it: `deprecatedFields` as a reminder, and
1417
+ * `unclearedFields` as a warning that the return is partial.
1418
+ */
1419
+ export declare function fieldLifecycleLines(type: string, answer: any): {
1420
+ info: string[];
1421
+ warn: string[];
1422
+ };
1423
+ /** The reasons of a `409 DB3_TYPE_NOT_APPEND_ONLY`, or `null` for any other error. */
1424
+ export declare function appendOnlyReasonsOf(err: unknown): AppendOnlyRefusal["reasons"] | null;
1425
+ /**
1426
+ * #6019 — whether a failed preflight request says nothing about the write it
1427
+ * asked about: no HTTP answer at all, a 5xx, a timeout (408) or a throttle
1428
+ * (429). Any other 4xx is the server's final answer for that body.
1429
+ */
1430
+ export declare function preflightFailureIsInconclusive(err: unknown): boolean;
1431
+ /**
1432
+ * One preflight request, retried while its failure is inconclusive
1433
+ * ({@link preflightFailureIsInconclusive}), up to `attempts` tries. Answers the
1434
+ * value, or the last error.
1435
+ */
1436
+ export declare function preflightCall<T>(send: () => Promise<T>, retryDelayMs?: number, attempts?: number): Promise<{
1437
+ ok: boolean;
1438
+ value?: T;
1439
+ error?: unknown;
1440
+ }>;
1441
+ /**
1442
+ * #6019 — the append-only preflight of `config push`: before any type row is
1443
+ * written, dry-run every schema update the run is about to make to an
1444
+ * existing type, from `db3-types/` and `database-type-configs/` alike, and
1445
+ * answer every type the server refuses `DB3_TYPE_NOT_APPEND_ONLY`. A file the
1446
+ * run would not write (unchanged, drifted, in conflict, or a create) is not
1447
+ * asked; a legacy file skipped as its selected db3 twin's duplicate is not
1448
+ * asked twice. A `DB3_TYPE_FIELD_REMOVAL_NOT_ENABLED` answer is thrown. Any
1449
+ * other server refusal (a 4xx) is final for that write, so it is left to the
1450
+ * apply loops, which meet it again as before. A failure that says nothing
1451
+ * about the write (no answer, a 5xx, 408, 429), on the dry run or the type
1452
+ * listing, is retried; if it persists the preflight throws, so no type row is
1453
+ * written by a run whose types were not all validated.
1454
+ */
1455
+ export declare function preflightDb3TypeAppendOnly(input: {
1456
+ client: Pick<ApiClient, "listDatabaseTypeConfigs" | "pushDb3Type" | "updateDatabaseTypeConfig">;
1457
+ appId: string;
1458
+ configDir: string;
1459
+ selectFiles: (label: string, dir: string, files: string[]) => string[];
1460
+ maps: ConfigDiffMaps;
1461
+ syncState: SyncState | null;
1462
+ force: boolean;
1463
+ allowFieldRemoval: boolean;
1464
+ /** Wait before each retry of an inconclusive request (tests pass 0). */
1465
+ retryDelayMs?: number;
1466
+ }): Promise<AppendOnlyRefusal[]>;
1467
+ /**
1468
+ * #5993 — whether a `database-type-configs/` file whose db3 twin agrees with
1469
+ * it must still go through the database type push: its rule set, which the
1470
+ * twin comparison leaves out, differs from the live row's. Empty and null
1471
+ * read alike. Without live rows there is nothing to compare against, and the
1472
+ * twin is skipped as before.
1473
+ */
1474
+ export declare function legacyTwinPushesItsRuleSet(input: {
1475
+ /** The legacy file's rule set id, resolved from its `ruleSetName`. */
1476
+ localRuleSetId: unknown;
1477
+ liveAvailable: boolean;
1478
+ /** The live row of the type, when the server has one. */
1479
+ live?: any;
1480
+ }): boolean;
1481
+ /**
1482
+ * #5025 — what a `config push` conflict on `db3-types/<name>.toml` says when
1483
+ * the server holds a type of that name this tree never pulled: a database
1484
+ * type (`POST databases/types`), or a db3 type pushed from another tree.
1485
+ */
1486
+ export declare function db3TypeConflictHint(name: string): string;
1487
+ /**
1488
+ * #5025 — the baseline a successful `PUT db3-types/:name` stamps: the semantic
1489
+ * hash of the row its answer carries, read as the live listing spells it. A
1490
+ * file naming shared models reads differently whenever the declaring file
1491
+ * moves, while its own bytes stand still, so the byte hash alone would read
1492
+ * the next such edit as both sides having changed.
1493
+ */
1494
+ export declare function db3TypeWriteBaseline(answerType: any, name: string, maps: ConfigDiffMaps): string | undefined;
1495
+ /**
1496
+ * #6020 — the environment variable naming the file `config push`'s db3 type
1497
+ * step writes each type's outcome to. Set only by `db3-types archive` and
1498
+ * `unarchive`, which run `config push --only db3-type/<type>` and must tell a
1499
+ * refusal from a write whose answer was lost.
1500
+ */
1501
+ export declare const DB3_TYPE_PUSH_REPORT_ENV = "PRIMITIVE_INTERNAL_DB3_TYPE_PUSH_REPORT";
1502
+ /** What `config push` did with one db3 type file (#6020), as the report file holds it. */
1503
+ export type Db3TypePushReport = {
1504
+ outcome: "applied";
1505
+ answer: any;
1506
+ } | {
1507
+ outcome: "skipped";
1508
+ } | {
1509
+ outcome: "declined";
1510
+ action: string;
1511
+ } | {
1512
+ outcome: "failed";
1513
+ failure: {
1514
+ name?: string;
1515
+ message: string;
1516
+ statusCode?: number;
1517
+ code?: string;
1518
+ };
1519
+ };
1520
+ /**
1521
+ * The sync baseline of one `db3-types/` file: the row's `modifiedAt`, the
1522
+ * file's bytes, the semantic hash of the row and whether it holds a schema.
1523
+ * The legacy twin's baseline moves with the row, so its prune and its next
1524
+ * push read no drift. Shared by `config push` and `db3-types archive` (#6020).
1525
+ */
1526
+ export declare function recordDb3TypeBaseline(syncState: SyncState, name: string, filePath: string, modifiedAt: string, semanticHash?: string, hasSchema?: boolean): void;
1527
+ /**
1528
+ * #6020 — stamp the sync baseline of one `db3-types/` file from a type read
1529
+ * back from `GET db3-types/:name` (the db3 type answer), as a push's answer
1530
+ * stamps it: used when the push's own answer was lost and the read confirmed
1531
+ * the write. Writes nothing when this tree has no sync state for the app.
1532
+ */
1533
+ export declare function stampDb3TypeBaselineFromRead(name: string, filePath: string, type: any): void;
1534
+ /**
1535
+ * #5025 — the hint a declined `db3-types/` push carries: the conflict hint
1536
+ * when the row is live but this tree holds no baseline for it, none otherwise.
1537
+ */
1538
+ export declare function db3TypeDeclineHint(name: string, outcome: {
1539
+ action: string;
1540
+ direction?: string;
1541
+ }): string | undefined;
1542
+ /**
1543
+ * #4802 — the names a config tree holds in BOTH `db3-types/` and
1544
+ * `database-type-configs/`, each one resource. Twins whose files read the same
1545
+ * type are `agreeing`: the db3 file is pushed and the legacy one is synced
1546
+ * with it. Twins that read differently are refused before anything is
1547
+ * applied, naming both files.
1548
+ */
1549
+ export declare function classifyDb3TypeTwins(configDir: string, maps?: ConfigDiffMaps): {
1550
+ agreeing: string[];
1551
+ refusals: string[];
1552
+ refusedNames: string[];
1553
+ };
1602
1554
  /**
1603
1555
  * Every type the shared comparator serves — the types `config diff` compares
1604
1556
  * field-for-field, and that `config push` gates on the same projection
@@ -1678,6 +1630,177 @@ export declare function hashLocalConfigForDiff(spec: ConfigDiffSpec, parsedToml:
1678
1630
  * `extra` carries the sibling rows a type's file also holds: a database type's
1679
1631
  * operations and subscriptions, which the list response does not include.
1680
1632
  */
1633
+ /**
1634
+ * The baseline `config pull` records for a function with a pushed version —
1635
+ * #4717, F4717-CODE-003. #4738 — `access` is on neither side of any function
1636
+ * comparison, so this is the one hash every function's baseline is read by.
1637
+ */
1638
+ export declare function pulledFunctionSemanticHash(record: any, active: any): string;
1639
+ /**
1640
+ * The function baseline with `access` out — #4717, F4717-CODE-004.
1641
+ *
1642
+ * Still recorded beside `semanticHash` at every baseline write. Since #4738
1643
+ * the two are equal; a baseline written between #4717 and #4738 carries a
1644
+ * `semanticHash` with the header's rule hashed in, and this is the one the
1645
+ * next push reads.
1646
+ */
1647
+ export declare function functionAccessFreeSemanticHash(record: any, active: any, maps?: ConfigDiffMaps): string;
1648
+ /**
1649
+ * The manifest entry a function's push gate reads (#4717, #4738): the
1650
+ * access-free baseline for every function, bare or flagged. An entry written
1651
+ * before that hash existed keeps its one hash.
1652
+ */
1653
+ export declare function functionPushBaselineEntry<E extends {
1654
+ semanticHash?: string;
1655
+ accessFreeSemanticHash?: string;
1656
+ }>(entry: E | null | undefined): E | null | undefined;
1657
+ /**
1658
+ * The manifest entry a prompt's or an integration's push gate reads (#4872).
1659
+ *
1660
+ * A baseline recorded before the retirement hashed `accessRule` into
1661
+ * `semanticHash`, and the live projection no longer carries it, so that hash
1662
+ * matches neither side and would turn an ordinary local edit into a false
1663
+ * `both-changed`. Every baseline written since records `ruleFreeSemanticHash`
1664
+ * beside it, and that is the one read.
1665
+ *
1666
+ * An entry without it is a pre-retirement entry, and its hash is translated
1667
+ * rather than trusted or thrown away. The old projection was the current one
1668
+ * plus `accessRule` (a `whenSet` string; canonical JSON sorts keys), and the
1669
+ * file still carries the rule it was synced with, so the old hash of either
1670
+ * side is recomputable: the side whose old hash IS the baseline did not move,
1671
+ * and its rule-free hash becomes the baseline. Only when neither side
1672
+ * reproduces it — the rule line was edited or removed, or the baseline is from
1673
+ * an older projection still — does the fallback apply:
1674
+ *
1675
+ * - an integration drops the hash, so `classifyPushChange` reads the #2731
1676
+ * legacy signals; its header `modifiedAt` covers everything it projects;
1677
+ * - a prompt keeps the stale hash, which matches neither side and so declines
1678
+ * as `both-changed`. Its `[[configs]]` rows are not covered by the header
1679
+ * timestamp, so the legacy inference would read a remote template edit as
1680
+ * "server unchanged" and overwrite it.
1681
+ */
1682
+ export declare function ruleFreePushBaselineEntry<E extends {
1683
+ semanticHash?: string;
1684
+ ruleFreeSemanticHash?: string;
1685
+ }>(entry: E | null | undefined, legacy: {
1686
+ label: "prompt" | "integration";
1687
+ maps: ConfigDiffMaps;
1688
+ localParsed: any;
1689
+ liveRecord: any;
1690
+ }): E | null | undefined;
1691
+ /** The baseline hashes a prompt manifest entry records (#4872, #5249). */
1692
+ export interface PromptBaselineHashes {
1693
+ semanticHash?: string;
1694
+ ruleFreeSemanticHash?: string;
1695
+ /**
1696
+ * The same projection without `defaultEvaluatorPromptKey` (#5249): what a
1697
+ * file that leaves the link unmanaged is classified against, so a link
1698
+ * changed in the web admin never decides which side such a file moved.
1699
+ */
1700
+ evaluatorFreeSemanticHash?: string;
1701
+ }
1702
+ /**
1703
+ * The baseline a prompt entry records for a server record (#5249): its
1704
+ * comparison projection, with the link named through `extra`'s id→key
1705
+ * lookup, hashed whole and without the link. Empty when the record cannot be
1706
+ * projected, so the entry is left with no baseline rather than a wrong one.
1707
+ */
1708
+ export declare function promptBaselineHashes(record: any, maps: ConfigDiffMaps, extra?: any): PromptBaselineHashes;
1709
+ /**
1710
+ * `config push`'s gate for one prompt file (#2869, #4872, #5249):
1711
+ * `decidePushForConfig` over the prompt spec, with the link compared by name
1712
+ * and the direction classified around it.
1713
+ *
1714
+ * A file that leaves `defaultEvaluatorPromptKey` unmanaged is classified
1715
+ * without it, against `evaluatorFreeSemanticHash`. An entry written before the
1716
+ * key joined the projection has only `semanticHash`, which never carried it,
1717
+ * so it is classified key-free whatever the file says; a file that manages
1718
+ * the key against an entry that records both is classified whole.
1719
+ */
1720
+ export declare function decidePromptPushForConfig(input: {
1721
+ localParsed: any;
1722
+ live?: {
1723
+ record: any;
1724
+ modifiedAt?: string;
1725
+ } | null;
1726
+ entry?: (PushBaselineEntry & PromptBaselineHashes & {
1727
+ ruleFreeSemanticHash?: string;
1728
+ }) | null;
1729
+ maps: ConfigDiffMaps;
1730
+ /** The app's prompt ids by key, this push's creates included. */
1731
+ promptIdToKey: ReadonlyMap<string, string>;
1732
+ localFileHash?: string;
1733
+ force?: boolean;
1734
+ }): PushGateOutcome;
1735
+ /** A prompt this push created or updated, as the link pass needs it (#5249). */
1736
+ export interface AppliedPromptForLink {
1737
+ /** Absent for a create under `--dry-run`, which made nothing. */
1738
+ promptId?: string;
1739
+ /** The link the server held when push read it; `undefined` when unread. */
1740
+ currentLinkId?: string | null;
1741
+ }
1742
+ /**
1743
+ * Apply the evaluator links push resolved, after every prompt it creates or
1744
+ * updates (#5249), so a prompt can name an evaluator created in the same push
1745
+ * — either way round.
1746
+ *
1747
+ * Only the prompts this push applied are visited. A link that already holds
1748
+ * sends nothing; a different one is sent through the update route as the id
1749
+ * the key resolves to (`null` for `""`), with the concurrency token push holds
1750
+ * for the prompt, and the prompt's baseline is re-stamped from a refetch so
1751
+ * the next push reads the file as unchanged. An evaluator that was declined
1752
+ * this run, or that no prompt answers to, is an apply failure naming both
1753
+ * keys — never a silent skip.
1754
+ */
1755
+ export declare function linkPromptEvaluators(input: {
1756
+ client: Pick<ApiClient, "updatePrompt" | "getPrompt">;
1757
+ appId: string;
1758
+ links: readonly PromptEvaluatorLink[];
1759
+ applied: ReadonlyMap<string, AppliedPromptForLink>;
1760
+ /** Every prompt id by key once the creates have run: live plus created. */
1761
+ promptKeyToId: ReadonlyMap<string, string>;
1762
+ /** The prompts this run declined or failed to apply. */
1763
+ declinedKeys: ReadonlySet<string>;
1764
+ syncState: SyncState | null;
1765
+ maps: ConfigDiffMaps;
1766
+ dryRun: boolean;
1767
+ force: boolean;
1768
+ changes: Array<{
1769
+ type: string;
1770
+ action: string;
1771
+ key: string;
1772
+ }>;
1773
+ failures: Array<{
1774
+ type: string;
1775
+ key: string;
1776
+ message: string;
1777
+ }>;
1778
+ info: (message: string) => void;
1779
+ }): Promise<void>;
1780
+ /**
1781
+ * What `config pull` writes and records for one prompt (#5249).
1782
+ *
1783
+ * `content` names the evaluator by key, or leaves out a link the listing
1784
+ * cannot name — the file is still written, so the link stays unmanaged, and
1785
+ * `warn` is told once. `keep` is the keep-or-write check: a file that says
1786
+ * what the server says is kept, unless the server's file names a link the
1787
+ * kept file would leave out, which is how a link made in the web admin
1788
+ * reaches an existing tree. `baseline` is the server's comparison projection,
1789
+ * with a dangling link spelled as its id, whatever the file says — so
1790
+ * clearing that link with `""` afterwards reads as the local edit it is.
1791
+ */
1792
+ export declare function promptPullPlan(prompt: any, options: {
1793
+ promptIdToKey: ReadonlyMap<string, string>;
1794
+ filePath: string;
1795
+ maps: ConfigDiffMaps;
1796
+ logger?: (message: string) => void;
1797
+ warn?: (message: string) => void;
1798
+ }): {
1799
+ content: string;
1800
+ keep: (localContent: string) => boolean;
1801
+ baseline: PromptBaselineHashes;
1802
+ unresolvedEvaluatorId?: string;
1803
+ };
1681
1804
  export declare function hashRemoteConfigForDiff(spec: ConfigDiffSpec, record: any, maps: ConfigDiffMaps, extra?: any): string;
1682
1805
  /** One field's disagreement between the local file and the live server entity. */
1683
1806
  export interface PushFieldDiff {
@@ -1869,6 +1992,23 @@ export declare function decidePushForConfig(input: {
1869
1992
  * strand — is one an update cannot repair.
1870
1993
  */
1871
1994
  adoptsUntrackedByKey?: boolean;
1995
+ /**
1996
+ * Classify WHICH side moved with these projected keys left out, against
1997
+ * `baselineHash` (#5249).
1998
+ *
1999
+ * For a present-only key the file leaves unmanaged, the local side inherits
2000
+ * the server's value, so a change made to it out of band moves both hashes
2001
+ * away from a baseline that recorded it — and an ordinary local edit to
2002
+ * another field would read as `both-changed`. A key the file does not manage
2003
+ * never says which side moved. The fields reported, and the
2004
+ * unchanged-versus-different answer, still come from the full projections:
2005
+ * a direction of `unchanged` with the full projections still differing
2006
+ * (only these keys differ) is the local file's change.
2007
+ */
2008
+ directionWithoutKeys?: {
2009
+ keys: readonly string[];
2010
+ baselineHash?: string;
2011
+ };
1872
2012
  }): PushGateOutcome;
1873
2013
  /**
1874
2014
  * The identity a file may leave to its name, written back into the parsed
@@ -1914,7 +2054,7 @@ export declare function resolveExistingId(input: {
1914
2054
  * the file spells;
1915
2055
  * - `nameToId` — how a referencing file's `ruleSetName` resolves to something
1916
2056
  * push can send. Seeding it from live is what lets `--only
1917
- * group-type-config/team` resolve a rule set that exists on the server but
2057
+ * database-type-config/orders` resolve a rule set that exists on the server but
1918
2058
  * was never recorded locally, instead of failing as an unresolved
1919
2059
  * reference.
1920
2060
  */
@@ -1955,63 +2095,6 @@ export declare function remoteSemanticBaseline(input: {
1955
2095
  */
1956
2096
  isStoredRecord?: (returned: any) => boolean;
1957
2097
  }): string | undefined;
1958
- /** What `config push` decides for one transform (#2731 B7). */
1959
- export type ScriptPushOutcome = {
1960
- action: "skip";
1961
- localHash: string;
1962
- remoteHash: string;
1963
- } | {
1964
- action: "update";
1965
- direction: "local-edited" | "forced" | "no-active-body";
1966
- localHash: string;
1967
- } | {
1968
- action: "drift";
1969
- localHash: string;
1970
- remoteHash: string;
1971
- } | {
1972
- action: "conflict";
1973
- direction: "both-changed" | "unknown-direction";
1974
- localHash: string;
1975
- remoteHash: string;
1976
- };
1977
- /**
1978
- * `config push`'s change decision for one transform (#2731 B7).
1979
- *
1980
- * A transform's comparator IS its bytes: the body push sends is the body diff
1981
- * compares, so there is no projection to reconcile — only the same three
1982
- * questions every converted type asks. Local versus the LIVE active body, with
1983
- * the manifest demoted to the baseline that says which side moved.
1984
- *
1985
- * A script the manifest has never seen reaches here too (adopted by name from
1986
- * the live index). It has no baseline and no legacy signal, so an unequal body
1987
- * classifies as `unknown-direction` — a conflict to report rather than a server
1988
- * body to overwrite on a guess.
1989
- */
1990
- export declare function decidePushForScript(input: {
1991
- localBody: string;
1992
- /** Byte hash of the local file — the legacy direction signal. */
1993
- localFileHash?: string;
1994
- /**
1995
- * The live active body, and the script row's timestamp beside it — the other
1996
- * legacy direction signal (#2731 B4). Activating a config updates the script
1997
- * row, so a timestamp still equal to the manifest's proves the server body
1998
- * has not moved: an upgraded installation's first push applies a genuine
1999
- * local edit instead of reporting a direction it could have known.
2000
- *
2001
- * `null` is an ANSWER, not a failed read: the script row exists and nothing
2002
- * is active on it. See below.
2003
- */
2004
- live: {
2005
- body: string;
2006
- modifiedAt?: string;
2007
- } | null;
2008
- entry?: {
2009
- contentHash?: string;
2010
- semanticHash?: string;
2011
- modifiedAt?: string;
2012
- } | null;
2013
- force?: boolean;
2014
- }): ScriptPushOutcome;
2015
2098
  /**
2016
2099
  * One side of a field diff, rendered for a conflict report (#2731 B5).
2017
2100
  *
@@ -2100,6 +2183,11 @@ export declare function configSemanticHash(label: string, filePath: string, maps
2100
2183
  * (`pulledSemanticHash`), never the file's own.
2101
2184
  */
2102
2185
  export declare function sameConfigAs(label: string, serverContent: string, filePath: string, maps: ConfigDiffMaps, extra?: any): (localContent: string) => boolean;
2186
+ /**
2187
+ * #4802 — `sameConfigAs` for a `db3-types/` file: a local file that reads the
2188
+ * same type as the server's rendering is left as it is.
2189
+ */
2190
+ export declare function sameDb3TypeAs(serverContent: string, maps: ConfigDiffMaps): (localContent: string) => boolean;
2103
2191
  /**
2104
2192
  * The semantic baseline `config pull` stamps for a config file (#4160): the
2105
2193
  * projection of what the server serializes, whether the file was written or
@@ -2127,6 +2215,13 @@ export declare function sameTomlAs(serverContent: string): (localContent: string
2127
2215
  * end-of-push and catch-path saves persist what the push actually did.
2128
2216
  */
2129
2217
  export declare function ensurePushSyncState(existing: SyncState | null, appId: string, serverUrl: string): SyncState;
2218
+ /**
2219
+ * `parseTomlFile`, or null for a file whose field table does not compile
2220
+ * (#5541): the validation collector reports that file, with every problem, so
2221
+ * a reader that compares the tree skips it rather than stopping. Any other
2222
+ * parse error is thrown as before.
2223
+ */
2224
+ export declare function parseTomlFileUnlessFieldTableError(filePath: string): any;
2130
2225
  export declare function parseTomlFile(filePath: string): any;
2131
2226
  /**
2132
2227
  * Paginate through a list endpoint, collecting all items.
@@ -2263,71 +2358,6 @@ export declare function serializeTestCase(testCase: any, lookupMaps?: TestCaseLo
2263
2358
  */
2264
2359
  export declare function serializeTestCaseForComparison(testCase: any, lookupMaps?: TestCaseLookupMaps): string;
2265
2360
  export declare function parseTestCaseToml(tomlData: any): any;
2266
- /**
2267
- * Pull server-side `Script` rows into `transforms/*.rhai` and record
2268
- * each in the returned sync-state map. Issue #892 slice 7 + codex
2269
- * follow-up on PR #893; body materialization fixed in issue #1196.
2270
- * Exported so the unit test can drive it against stubbed
2271
- * `client.listScripts` / `client.getScript`.
2272
- *
2273
- * Two-call contract: `listScripts` returns the `Script` HEADER only
2274
- * (no `body` — see `serializeScript` in `src/admin-api.ts`). The Rhai
2275
- * source lives on a versioned `ScriptConfig`. So for each listed
2276
- * script we fetch the full record with `getScript`, which returns the
2277
- * header plus serialized `configs` (each carrying its `body`), and
2278
- * write the ACTIVE config's body. Reading the body off the list shape
2279
- * (the old behavior) always produced 0-byte files.
2280
- *
2281
- * Idempotency: every call writes the active-config body the server
2282
- * returned, so re-running `config pull` on an unchanged server overwrites
2283
- * with the same bytes and produces the same `contentHash`. The result
2284
- * map always reflects the current server state for the writes performed.
2285
- *
2286
- * `count` is the number of files actually written, not the number of
2287
- * scripts listed: scripts with no active config and scripts whose
2288
- * config fetch fails are skipped (we never clobber a `.rhai` with an
2289
- * empty file).
2290
- *
2291
- * Older-server graceful path: if `listScripts` rejects (e.g. older
2292
- * server without the route), the caller catches and treats it as
2293
- * "no scripts to pull", leaving the directory empty. A per-script
2294
- * `getScript` failure is caught and that one script is skipped without
2295
- * aborting the rest of the pull.
2296
- */
2297
- export declare function pullScripts(client: ApiClient, appId: string, configDir: string, logger?: (msg: string) => void,
2298
- /**
2299
- * `config pull --only` (issue #2645): which transform names this pull may
2300
- * write. Defaults to every one the server lists.
2301
- */
2302
- selects?: (name: string) => boolean,
2303
- /** Counts each transform as written or left unchanged (#4160). */
2304
- writes?: PullWriteTally): Promise<{
2305
- scriptEntities: Record<string, {
2306
- id: string;
2307
- modifiedAt: string;
2308
- contentHash?: string;
2309
- semanticHash?: string;
2310
- }>;
2311
- count: number;
2312
- /**
2313
- * Which scripts the server listed, for the #1659 prune pass. `ok: false` when
2314
- * the listing failed (an older server without the route, or a transient
2315
- * error) or when any per-script fetch failed — in either case this pull's
2316
- * picture of the type is incomplete and must not drive deletions. Scripts
2317
- * skipped for having no active config are still *present*, so their keys stay
2318
- * in the set and their local `.rhai` survives.
2319
- */
2320
- presence: PresenceOutcome;
2321
- /**
2322
- * Whether the script LISTING succeeded. Distinct from `presence`: a failed
2323
- * per-script fetch blocks pruning but still leaves the other scripts written,
2324
- * so their fresh state entries must be kept. Only a failed listing means
2325
- * nothing was written and the prior state slot should be preserved whole.
2326
- */
2327
- listOk: boolean;
2328
- /** Names the server listed, empty when the listing failed. */
2329
- serverKeys: string[];
2330
- }>;
2331
2361
  /**
2332
2362
  * The manifest row `config push` records for a function it just pushed
2333
2363
  * (#3317), and whether the server had already moved past that push.
@@ -2365,6 +2395,7 @@ export declare function pushedFunctionBaseline(input: {
2365
2395
  modifiedAt: string;
2366
2396
  contentHash: string;
2367
2397
  semanticHash?: string;
2398
+ accessFreeSemanticHash?: string;
2368
2399
  envelopeHash: string;
2369
2400
  activeConfigId?: string;
2370
2401
  sources: string[];
@@ -2398,6 +2429,7 @@ writes?: PullWriteTally): Promise<{
2398
2429
  modifiedAt: string;
2399
2430
  contentHash?: string;
2400
2431
  semanticHash?: string;
2432
+ accessFreeSemanticHash?: string;
2401
2433
  envelopeHash?: string;
2402
2434
  activeConfigId?: string;
2403
2435
  sources?: string[];
@@ -2549,8 +2581,6 @@ export declare function pullTestCasesForBlocks(params: {
2549
2581
  interface PushResolutionMaps {
2550
2582
  promptKeyToId: Map<string, string>;
2551
2583
  promptConfigNameToId: Map<string, string>;
2552
- workflowConfigNameToId: Map<string, string>;
2553
- scriptConfigNameToId?: Map<string, string>;
2554
2584
  integrationConfigNameToId?: Map<string, string>;
2555
2585
  /**
2556
2586
  * Fill one block's config name→id entries from the server on demand (#2769),
@@ -2873,4 +2903,6 @@ export declare function applyTestCasePrune(params: {
2873
2903
  * `resolveSyncDir`, the sync-state baseline and `primitive/<env>/`
2874
2904
  * are internal identifiers, deliberately left alone (#2759 scope).
2875
2905
  */
2876
- export declare function registerConfigSyncCommands(sync: Command): void;
2906
+ export declare function registerConfigSyncCommands(sync: Command, options?: {
2907
+ experimental?: boolean;
2908
+ }): void;