primitive-admin 1.0.62 → 1.0.64

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 (344) hide show
  1. package/README.md +132 -42
  2. package/assets/skill/skills/primitive-platform/SKILL.md +142 -661
  3. package/dist/bin/primitive.js +121 -41
  4. package/dist/bin/primitive.js.map +1 -1
  5. package/dist/src/commands/admins.js +37 -50
  6. package/dist/src/commands/admins.js.map +1 -1
  7. package/dist/src/commands/analytics.js +178 -9
  8. package/dist/src/commands/analytics.js.map +1 -1
  9. package/dist/src/commands/apps.js +17 -7
  10. package/dist/src/commands/apps.js.map +1 -1
  11. package/dist/src/commands/auth-sessions.d.ts +7 -0
  12. package/dist/src/commands/auth-sessions.js +144 -0
  13. package/dist/src/commands/auth-sessions.js.map +1 -0
  14. package/dist/src/commands/auth.js +76 -116
  15. package/dist/src/commands/auth.js.map +1 -1
  16. package/dist/src/commands/blob-buckets.js +2 -1
  17. package/dist/src/commands/blob-buckets.js.map +1 -1
  18. package/dist/src/commands/catalog.js +26 -10
  19. package/dist/src/commands/catalog.js.map +1 -1
  20. package/dist/src/commands/collection-type-configs.js +3 -10
  21. package/dist/src/commands/collection-type-configs.js.map +1 -1
  22. package/dist/src/commands/collections.js +736 -19
  23. package/dist/src/commands/collections.js.map +1 -1
  24. package/dist/src/commands/config.js +13 -27
  25. package/dist/src/commands/config.js.map +1 -1
  26. package/dist/src/commands/connections.js +8 -9
  27. package/dist/src/commands/connections.js.map +1 -1
  28. package/dist/src/commands/cron-triggers.js +2 -1
  29. package/dist/src/commands/cron-triggers.js.map +1 -1
  30. package/dist/src/commands/database-type-configs.js +5 -12
  31. package/dist/src/commands/database-type-configs.js.map +1 -1
  32. package/dist/src/commands/databases.js +59 -72
  33. package/dist/src/commands/databases.js.map +1 -1
  34. package/dist/src/commands/documents.d.ts +58 -0
  35. package/dist/src/commands/documents.js +1623 -95
  36. package/dist/src/commands/documents.js.map +1 -1
  37. package/dist/src/commands/email-templates.js +5 -4
  38. package/dist/src/commands/email-templates.js.map +1 -1
  39. package/dist/src/commands/env.d.ts +1 -1
  40. package/dist/src/commands/env.js +106 -44
  41. package/dist/src/commands/env.js.map +1 -1
  42. package/dist/src/commands/feature-flags.js +2 -1
  43. package/dist/src/commands/feature-flags.js.map +1 -1
  44. package/dist/src/commands/functions.d.ts +20 -0
  45. package/dist/src/commands/functions.js +1630 -0
  46. package/dist/src/commands/functions.js.map +1 -0
  47. package/dist/src/commands/group-type-configs.js +2 -1
  48. package/dist/src/commands/group-type-configs.js.map +1 -1
  49. package/dist/src/commands/groups.js +30 -17
  50. package/dist/src/commands/groups.js.map +1 -1
  51. package/dist/src/commands/guides.js +17 -11
  52. package/dist/src/commands/guides.js.map +1 -1
  53. package/dist/src/commands/init.d.ts +24 -12
  54. package/dist/src/commands/init.js +198 -110
  55. package/dist/src/commands/init.js.map +1 -1
  56. package/dist/src/commands/integrations.js +65 -26
  57. package/dist/src/commands/integrations.js.map +1 -1
  58. package/dist/src/commands/locks.js +17 -2
  59. package/dist/src/commands/locks.js.map +1 -1
  60. package/dist/src/commands/metadata-category-configs.js +2 -1
  61. package/dist/src/commands/metadata-category-configs.js.map +1 -1
  62. package/dist/src/commands/metadata.js +8 -1
  63. package/dist/src/commands/metadata.js.map +1 -1
  64. package/dist/src/commands/prompts.js +106 -59
  65. package/dist/src/commands/prompts.js.map +1 -1
  66. package/dist/src/commands/rule-sets.js +3 -10
  67. package/dist/src/commands/rule-sets.js.map +1 -1
  68. package/dist/src/commands/scripts.d.ts +10 -0
  69. package/dist/src/commands/scripts.js +159 -25
  70. package/dist/src/commands/scripts.js.map +1 -1
  71. package/dist/src/commands/secrets.js +2 -1
  72. package/dist/src/commands/secrets.js.map +1 -1
  73. package/dist/src/commands/sessions.js +10 -9
  74. package/dist/src/commands/sessions.js.map +1 -1
  75. package/dist/src/commands/sync-app-settings.js +3 -5
  76. package/dist/src/commands/sync-app-settings.js.map +1 -1
  77. package/dist/src/commands/sync.d.ts +391 -44
  78. package/dist/src/commands/sync.js +2622 -534
  79. package/dist/src/commands/sync.js.map +1 -1
  80. package/dist/src/commands/tokens.js +2 -1
  81. package/dist/src/commands/tokens.js.map +1 -1
  82. package/dist/src/commands/users.js +19 -10
  83. package/dist/src/commands/users.js.map +1 -1
  84. package/dist/src/commands/vars.js +2 -1
  85. package/dist/src/commands/vars.js.map +1 -1
  86. package/dist/src/commands/waitlist.js +2 -1
  87. package/dist/src/commands/waitlist.js.map +1 -1
  88. package/dist/src/commands/webhooks.d.ts +29 -0
  89. package/dist/src/commands/webhooks.js +135 -64
  90. package/dist/src/commands/webhooks.js.map +1 -1
  91. package/dist/src/commands/workflows.d.ts +1 -29
  92. package/dist/src/commands/workflows.js +113 -179
  93. package/dist/src/commands/workflows.js.map +1 -1
  94. package/dist/src/lib/api-client.d.ts +628 -14
  95. package/dist/src/lib/api-client.js +776 -70
  96. package/dist/src/lib/api-client.js.map +1 -1
  97. package/dist/src/lib/app-settings-descriptor.d.ts +1 -1
  98. package/dist/src/lib/app-settings-descriptor.js +9 -1
  99. package/dist/src/lib/app-settings-descriptor.js.map +1 -1
  100. package/dist/src/lib/block-selector.d.ts +58 -0
  101. package/dist/src/lib/block-selector.js +92 -0
  102. package/dist/src/lib/block-selector.js.map +1 -0
  103. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +24 -54
  104. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +31 -153
  105. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js.map +1 -1
  106. package/dist/src/lib/collection-export.d.ts +184 -0
  107. package/dist/src/lib/collection-export.js +252 -0
  108. package/dist/src/lib/collection-export.js.map +1 -0
  109. package/dist/src/lib/config-json-field.d.ts +28 -0
  110. package/dist/src/lib/config-json-field.js +56 -0
  111. package/dist/src/lib/config-json-field.js.map +1 -0
  112. package/dist/src/lib/config-object-descriptor.js +88 -6
  113. package/dist/src/lib/config-object-descriptor.js.map +1 -1
  114. package/dist/src/lib/config-payload.d.ts +8 -1
  115. package/dist/src/lib/config-payload.js +49 -4
  116. package/dist/src/lib/config-payload.js.map +1 -1
  117. package/dist/src/lib/config-surface.d.ts +12 -1
  118. package/dist/src/lib/config-surface.js +71 -3
  119. package/dist/src/lib/config-surface.js.map +1 -1
  120. package/dist/src/lib/config.d.ts +31 -13
  121. package/dist/src/lib/config.js +34 -70
  122. package/dist/src/lib/config.js.map +1 -1
  123. package/dist/src/lib/credentials-store.d.ts +37 -22
  124. package/dist/src/lib/credentials-store.js +103 -97
  125. package/dist/src/lib/credentials-store.js.map +1 -1
  126. package/dist/src/lib/db-codegen/dbTypeIR.js +8 -0
  127. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
  128. package/dist/src/lib/deprecation.d.ts +22 -0
  129. package/dist/src/lib/deprecation.js +43 -0
  130. package/dist/src/lib/deprecation.js.map +1 -0
  131. package/dist/src/lib/document-export-permissions.d.ts +30 -0
  132. package/dist/src/lib/document-export-permissions.js +54 -0
  133. package/dist/src/lib/document-export-permissions.js.map +1 -0
  134. package/dist/src/lib/document-ingest-artifact.d.ts +120 -0
  135. package/dist/src/lib/document-ingest-artifact.js +505 -0
  136. package/dist/src/lib/document-ingest-artifact.js.map +1 -0
  137. package/dist/src/lib/document-ingest-input.d.ts +51 -0
  138. package/dist/src/lib/document-ingest-input.js +132 -0
  139. package/dist/src/lib/document-ingest-input.js.map +1 -0
  140. package/dist/src/lib/document-ingest-rows.d.ts +137 -0
  141. package/dist/src/lib/document-ingest-rows.js +181 -0
  142. package/dist/src/lib/document-ingest-rows.js.map +1 -0
  143. package/dist/src/lib/document-ingest.d.ts +101 -0
  144. package/dist/src/lib/document-ingest.js +384 -0
  145. package/dist/src/lib/document-ingest.js.map +1 -0
  146. package/dist/src/lib/env-resolver-core.d.ts +128 -17
  147. package/dist/src/lib/env-resolver-core.js +204 -22
  148. package/dist/src/lib/env-resolver-core.js.map +1 -1
  149. package/dist/src/lib/env-resolver.d.ts +18 -3
  150. package/dist/src/lib/env-resolver.js +23 -3
  151. package/dist/src/lib/env-resolver.js.map +1 -1
  152. package/dist/src/lib/function-bundle.d.ts +147 -0
  153. package/dist/src/lib/function-bundle.js +341 -0
  154. package/dist/src/lib/function-bundle.js.map +1 -0
  155. package/dist/src/lib/function-collect.d.ts +123 -0
  156. package/dist/src/lib/function-collect.js +610 -0
  157. package/dist/src/lib/function-collect.js.map +1 -0
  158. package/dist/src/lib/function-db-types.d.ts +202 -0
  159. package/dist/src/lib/function-db-types.js +870 -0
  160. package/dist/src/lib/function-db-types.js.map +1 -0
  161. package/dist/src/lib/function-document-types.d.ts +144 -0
  162. package/dist/src/lib/function-document-types.js +370 -0
  163. package/dist/src/lib/function-document-types.js.map +1 -0
  164. package/dist/src/lib/function-grants-preflight.d.ts +64 -0
  165. package/dist/src/lib/function-grants-preflight.js +105 -0
  166. package/dist/src/lib/function-grants-preflight.js.map +1 -0
  167. package/dist/src/lib/function-log-lines.d.ts +76 -0
  168. package/dist/src/lib/function-log-lines.js +160 -0
  169. package/dist/src/lib/function-log-lines.js.map +1 -0
  170. package/dist/src/lib/function-log-row.d.ts +29 -0
  171. package/dist/src/lib/function-log-row.js +73 -0
  172. package/dist/src/lib/function-log-row.js.map +1 -0
  173. package/dist/src/lib/function-log-tail.d.ts +132 -0
  174. package/dist/src/lib/function-log-tail.js +262 -0
  175. package/dist/src/lib/function-log-tail.js.map +1 -0
  176. package/dist/src/lib/function-run.d.ts +289 -0
  177. package/dist/src/lib/function-run.js +389 -0
  178. package/dist/src/lib/function-run.js.map +1 -0
  179. package/dist/src/lib/function-schema-codegen.d.ts +143 -0
  180. package/dist/src/lib/function-schema-codegen.js +420 -0
  181. package/dist/src/lib/function-schema-codegen.js.map +1 -0
  182. package/dist/src/lib/function-sync.d.ts +459 -0
  183. package/dist/src/lib/function-sync.js +1258 -0
  184. package/dist/src/lib/function-sync.js.map +1 -0
  185. package/dist/src/lib/function-trigger-listing.d.ts +27 -0
  186. package/dist/src/lib/function-trigger-listing.js +70 -0
  187. package/dist/src/lib/function-trigger-listing.js.map +1 -0
  188. package/dist/src/lib/function-typecheck.d.ts +86 -0
  189. package/dist/src/lib/function-typecheck.js +370 -0
  190. package/dist/src/lib/function-typecheck.js.map +1 -0
  191. package/dist/src/lib/function-versions.d.ts +122 -0
  192. package/dist/src/lib/function-versions.js +182 -0
  193. package/dist/src/lib/function-versions.js.map +1 -0
  194. package/dist/src/lib/generated-allowlist.js +4 -0
  195. package/dist/src/lib/generated-allowlist.js.map +1 -1
  196. package/dist/src/lib/generated-config-surfaces.d.ts +2332 -78
  197. package/dist/src/lib/generated-config-surfaces.js +6979 -468
  198. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  199. package/dist/src/lib/generated-sdk-types.d.ts +12 -0
  200. package/dist/src/lib/generated-sdk-types.js +13 -0
  201. package/dist/src/lib/generated-sdk-types.js.map +1 -0
  202. package/dist/src/lib/init-adopt.js +2 -2
  203. package/dist/src/lib/init-adopt.js.map +1 -1
  204. package/dist/src/lib/init-assets.js +3 -3
  205. package/dist/src/lib/init-client-platforms.d.ts +14 -0
  206. package/dist/src/lib/init-client-platforms.js +71 -0
  207. package/dist/src/lib/init-client-platforms.js.map +1 -0
  208. package/dist/src/lib/init-config.d.ts +1 -1
  209. package/dist/src/lib/init-email-redirect-uris.d.ts +37 -0
  210. package/dist/src/lib/init-email-redirect-uris.js +46 -0
  211. package/dist/src/lib/init-email-redirect-uris.js.map +1 -0
  212. package/dist/src/lib/init-ios-links.d.ts +41 -0
  213. package/dist/src/lib/init-ios-links.js +67 -1
  214. package/dist/src/lib/init-ios-links.js.map +1 -1
  215. package/dist/src/lib/init-plan.d.ts +1 -1
  216. package/dist/src/lib/init-plan.js +1 -1
  217. package/dist/src/lib/init-xcode.d.ts +6 -5
  218. package/dist/src/lib/init-xcode.js +34 -10
  219. package/dist/src/lib/init-xcode.js.map +1 -1
  220. package/dist/src/lib/integration-selector.d.ts +42 -0
  221. package/dist/src/lib/integration-selector.js +46 -0
  222. package/dist/src/lib/integration-selector.js.map +1 -0
  223. package/dist/src/lib/ios-app-id.d.ts +34 -0
  224. package/dist/src/lib/ios-app-id.js +69 -0
  225. package/dist/src/lib/ios-app-id.js.map +1 -0
  226. package/dist/src/lib/list-options.d.ts +68 -0
  227. package/dist/src/lib/list-options.js +89 -0
  228. package/dist/src/lib/list-options.js.map +1 -0
  229. package/dist/src/lib/local-state.d.ts +1 -1
  230. package/dist/src/lib/local-state.js +1 -1
  231. package/dist/src/lib/local-test-cases.d.ts +63 -0
  232. package/dist/src/lib/local-test-cases.js +136 -0
  233. package/dist/src/lib/local-test-cases.js.map +1 -0
  234. package/dist/src/lib/log-inspection.d.ts +152 -5
  235. package/dist/src/lib/log-inspection.js +179 -2
  236. package/dist/src/lib/log-inspection.js.map +1 -1
  237. package/dist/src/lib/logout-admin-session.d.ts +33 -0
  238. package/dist/src/lib/logout-admin-session.js +70 -0
  239. package/dist/src/lib/logout-admin-session.js.map +1 -0
  240. package/dist/src/lib/output.d.ts +15 -0
  241. package/dist/src/lib/output.js +28 -0
  242. package/dist/src/lib/output.js.map +1 -1
  243. package/dist/src/lib/paginate.d.ts +15 -0
  244. package/dist/src/lib/paginate.js +17 -0
  245. package/dist/src/lib/paginate.js.map +1 -1
  246. package/dist/src/lib/project-config.d.ts +46 -21
  247. package/dist/src/lib/project-config.js +74 -47
  248. package/dist/src/lib/project-config.js.map +1 -1
  249. package/dist/src/lib/prompt-cost-format.d.ts +11 -0
  250. package/dist/src/lib/prompt-cost-format.js +41 -0
  251. package/dist/src/lib/prompt-cost-format.js.map +1 -0
  252. package/dist/src/lib/prompt-schema-codegen.d.ts +147 -0
  253. package/dist/src/lib/prompt-schema-codegen.js +462 -0
  254. package/dist/src/lib/prompt-schema-codegen.js.map +1 -0
  255. package/dist/src/lib/refresh-admin-credentials.d.ts +9 -1
  256. package/dist/src/lib/refresh-admin-credentials.js +22 -2
  257. package/dist/src/lib/refresh-admin-credentials.js.map +1 -1
  258. package/dist/src/lib/resolve-owner.d.ts +19 -0
  259. package/dist/src/lib/resolve-owner.js +20 -0
  260. package/dist/src/lib/resolve-owner.js.map +1 -0
  261. package/dist/src/lib/skill-installer.d.ts +49 -3
  262. package/dist/src/lib/skill-installer.js +275 -100
  263. package/dist/src/lib/skill-installer.js.map +1 -1
  264. package/dist/src/lib/snapshot-audit-source.d.ts +45 -0
  265. package/dist/src/lib/snapshot-audit-source.js +58 -0
  266. package/dist/src/lib/snapshot-audit-source.js.map +1 -0
  267. package/dist/src/lib/snapshot-audit-store.d.ts +52 -0
  268. package/dist/src/lib/snapshot-audit-store.js +196 -0
  269. package/dist/src/lib/snapshot-audit-store.js.map +1 -0
  270. package/dist/src/lib/snapshot-audit.d.ts +207 -0
  271. package/dist/src/lib/snapshot-audit.js +431 -0
  272. package/dist/src/lib/snapshot-audit.js.map +1 -0
  273. package/dist/src/lib/snapshot-build-rows.d.ts +60 -0
  274. package/dist/src/lib/snapshot-build-rows.js +87 -0
  275. package/dist/src/lib/snapshot-build-rows.js.map +1 -0
  276. package/dist/src/lib/snapshot-build.d.ts +50 -0
  277. package/dist/src/lib/snapshot-build.js +111 -0
  278. package/dist/src/lib/snapshot-build.js.map +1 -0
  279. package/dist/src/lib/snapshot-manifest-layout.d.ts +61 -0
  280. package/dist/src/lib/snapshot-manifest-layout.js +70 -0
  281. package/dist/src/lib/snapshot-manifest-layout.js.map +1 -0
  282. package/dist/src/lib/snapshots.d.ts +8 -9
  283. package/dist/src/lib/snapshots.js +20 -83
  284. package/dist/src/lib/snapshots.js.map +1 -1
  285. package/dist/src/lib/step-run-table.d.ts +43 -0
  286. package/dist/src/lib/step-run-table.js +129 -0
  287. package/dist/src/lib/step-run-table.js.map +1 -0
  288. package/dist/src/lib/storage-pending-retry.d.ts +26 -0
  289. package/dist/src/lib/storage-pending-retry.js +42 -0
  290. package/dist/src/lib/storage-pending-retry.js.map +1 -0
  291. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +42 -0
  292. package/dist/src/lib/swift-codegen/agentGenerator.js +118 -0
  293. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -0
  294. package/dist/src/lib/swift-codegen/banners.d.ts +24 -0
  295. package/dist/src/lib/swift-codegen/banners.js +25 -0
  296. package/dist/src/lib/swift-codegen/banners.js.map +1 -0
  297. package/dist/src/lib/swift-codegen/dbGenerator.js +19 -7
  298. package/dist/src/lib/swift-codegen/dbGenerator.js.map +1 -1
  299. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +139 -0
  300. package/dist/src/lib/swift-codegen/functionGenerator.js +462 -0
  301. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -0
  302. package/dist/src/lib/swift-codegen/generator.d.ts +7 -1
  303. package/dist/src/lib/swift-codegen/generator.js +28 -11
  304. package/dist/src/lib/swift-codegen/generator.js.map +1 -1
  305. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +15 -0
  306. package/dist/src/lib/swift-codegen/schemaToSwift.js +21 -4
  307. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
  308. package/dist/src/lib/sync-paths.d.ts +72 -55
  309. package/dist/src/lib/sync-paths.js +97 -100
  310. package/dist/src/lib/sync-paths.js.map +1 -1
  311. package/dist/src/lib/sync-resource-types.d.ts +23 -4
  312. package/dist/src/lib/sync-resource-types.js +106 -8
  313. package/dist/src/lib/sync-resource-types.js.map +1 -1
  314. package/dist/src/lib/sync-selectors.d.ts +45 -2
  315. package/dist/src/lib/sync-selectors.js +66 -5
  316. package/dist/src/lib/sync-selectors.js.map +1 -1
  317. package/dist/src/lib/template.d.ts +2 -2
  318. package/dist/src/lib/template.js +2 -2
  319. package/dist/src/lib/test-case-file-names.d.ts +40 -0
  320. package/dist/src/lib/test-case-file-names.js +91 -0
  321. package/dist/src/lib/test-case-file-names.js.map +1 -0
  322. package/dist/src/lib/test-case-keys.d.ts +1 -1
  323. package/dist/src/lib/test-case-keys.js +1 -1
  324. package/dist/src/lib/test-case-variables.d.ts +14 -0
  325. package/dist/src/lib/test-case-variables.js +42 -0
  326. package/dist/src/lib/test-case-variables.js.map +1 -1
  327. package/dist/src/lib/toml-database-config.js +19 -2
  328. package/dist/src/lib/toml-database-config.js.map +1 -1
  329. package/dist/src/lib/web-url.d.ts +40 -0
  330. package/dist/src/lib/web-url.js +76 -0
  331. package/dist/src/lib/web-url.js.map +1 -0
  332. package/dist/src/lib/webhook-deliver.d.ts +209 -0
  333. package/dist/src/lib/webhook-deliver.js +519 -0
  334. package/dist/src/lib/webhook-deliver.js.map +1 -0
  335. package/dist/src/lib/workflow-codegen/generator.d.ts +1 -1
  336. package/dist/src/lib/workflow-codegen/generator.js +1 -1
  337. package/dist/src/lib/workflow-toml-validator.d.ts +17 -8
  338. package/dist/src/lib/workflow-toml-validator.js +25 -12
  339. package/dist/src/lib/workflow-toml-validator.js.map +1 -1
  340. package/dist/src/lib/workflow-usage.d.ts +196 -0
  341. package/dist/src/lib/workflow-usage.js +310 -0
  342. package/dist/src/lib/workflow-usage.js.map +1 -0
  343. package/dist/src/types/index.d.ts +12 -2
  344. package/package.json +5 -4
@@ -4,7 +4,11 @@ import { type OperationFormHints } from "../lib/toml-database-config.js";
4
4
  import { type FieldForm } from "../lib/toml-native-form.js";
5
5
  import { type PushMode } from "../lib/config-payload.js";
6
6
  import { type ConfigObjectSurface, type ConfigTable } from "../lib/generated-config-surfaces.js";
7
+ import { type PromptKind } from "../lib/generated-config-surfaces.js";
8
+ import { type AgentFunctionFacts } from "../lib/generated-config-surfaces.js";
9
+ import { type DocumentSchemaResolution } from "../lib/function-document-types.js";
7
10
  import { type PresenceOutcome, type TestBlockType } from "../lib/sync-resource-types.js";
11
+ export { resolveSlugCollisions, slugifyTestCaseName, testCaseFileBasenames, } from "../lib/test-case-file-names.js";
8
12
  import type { SyncState } from "../types/index.js";
9
13
  import { type SyncSelection } from "../lib/sync-selectors.js";
10
14
  /**
@@ -334,6 +338,20 @@ export declare function validateVarsFile(parsedVars: Record<string, unknown>, op
334
338
  * edit — reported as a conflict instead. `force` skips the conflict guard,
335
339
  * matching `config push --force` for every other entity.
336
340
  *
341
+ * A var only the SERVER moved is the other half of the same comparison, and it
342
+ * is reported rather than skipped (issue #3714). Its local value still equals
343
+ * the baseline, so there is nothing to push and no conflict — but the skip that
344
+ * follows from "local is unchanged" used to be taken before the snapshot was
345
+ * consulted at all, so the push said nothing about a var edited in the Admin
346
+ * Console and counted it among the skipped-unchanged. The `drifted[]` keys are
347
+ * what every other synced type reaches through `classifyPushChange` →
348
+ * `server-drifted`: the caller prints `DRIFT var: <key>` under "Server drift —
349
+ * not pushed", writes nothing, and leaves the exit code alone. A baseline key
350
+ * the snapshot no longer holds at all is the same one-sided move (the server
351
+ * deleted the row; the local file stands still) and is reported the same way.
352
+ * `--force` is the resolution that keeps the local value, `config pull` the one
353
+ * that takes the server's.
354
+ *
337
355
  * Pure and side-effect-free (the caller owns the API calls and sync-state
338
356
  * updates) so the guard is unit-testable without a live server. Assumes
339
357
  * `parsedVars` has already passed `validateVarsFile` (values are strings). The
@@ -363,6 +381,11 @@ export declare function planVarsPush(parsedVars: Record<string, string>, baselin
363
381
  serverModifiedAt: string;
364
382
  localModifiedAt: string;
365
383
  }>;
384
+ /** Keys the SERVER alone moved — reported, never written (issue #3714). */
385
+ drifted: Array<{
386
+ key: string;
387
+ serverModifiedAt: string;
388
+ }>;
366
389
  skippedCount: number;
367
390
  };
368
391
  /**
@@ -661,6 +684,21 @@ export declare function serializeBlobBucket(bucket: any, logger?: (message: stri
661
684
  * drift.
662
685
  */
663
686
  export declare function buildBlobBucketUpdatePayload(bucket: any): any;
687
+ /**
688
+ * #3201's post-create status patch is RETIRED — #3799 (DSO-3799-005).
689
+ *
690
+ * `status` was update-only, so `POST /prompts` and `POST /prompts/:id/configs`
691
+ * both assigned `active` whatever the body said, and an authored
692
+ * `status = "archived"` needed a follow-up PATCH ordered after the activation of
693
+ * the entry the file marks live. Both create paths honor the key now
694
+ * (`writableOn: BOTH`, validated by one rule on all three paths), so the entry
695
+ * lands retired on its own create: the same end state, two fewer calls per
696
+ * retired config, and no window in which the server holds a status the file
697
+ * never asked for. That window is what made a pulled tree unpushable into a
698
+ * fresh environment once an agent's schemas are checked against each
699
+ * non-archived config's provider — the check fired on the transient active
700
+ * state.
701
+ */
664
702
  /**
665
703
  * Which `[[configs]]` entry a prompt file marks as live (issue #2645).
666
704
  *
@@ -766,6 +804,12 @@ export declare function buildPromptCreatePayload(key: string, tomlData: any): Re
766
804
  * `seededConfigName` is what the server called it — read from the create
767
805
  * response rather than assumed, so a handler that one day honors the name
768
806
  * produces no needless PATCH.
807
+ *
808
+ * #3201 — the entry's `status` was deferred the OTHER way, to a patch after the
809
+ * activation, because the create pointed the prompt's `activeConfigId` at a
810
+ * config it had forced live. #3799 (DSO-3799-005) — the create carries the
811
+ * entry's `status` itself now, so there is no deferral either way and this patch
812
+ * is the two fields `POST /prompts` cannot express, nothing more.
769
813
  */
770
814
  export declare function seededOnlyPromptConfigFields(firstConfig: any, seededConfigName?: string): Record<string, any> | null;
771
815
  /**
@@ -851,21 +895,175 @@ export interface ConfigFileValidationError {
851
895
  messages: string[];
852
896
  }
853
897
  /**
854
- * Every per-entity config file whose TOML `config push` would refuse (#2880
855
- * criterion 1, symmetry).
898
+ * `config push`'s preflight — every check the authored files decide on their
899
+ * own, run before the FIRST mutating call (#976 fix A, #3320, #3375).
900
+ *
901
+ * The block below was inline inside the push command's `.action()` callback
902
+ * until #3375 lifted it here unchanged. It had to become an exported symbol
903
+ * for the registry's promise to be checkable at all: a rule declared
904
+ * `preflight` says it runs before `config push` mutates anything, and
905
+ * `src/config-surface/preflight-reachability.ts` resolves that claim
906
+ * statically from the declared `<module>#<export>` against exactly this entry
907
+ * point. With the preflight anonymous, "reached from the preflight" had
908
+ * nothing to resolve against, and the stage string was satisfied by typing it.
909
+ *
910
+ * Its boundary is therefore precise and load-bearing: this function is what
911
+ * contributes to `preflightValidationErrors` and aborts. The advisory reads
912
+ * that follow the abort in the action — the remote vars snapshot and both caps
913
+ * — stay there and are declared `apply`, because the server is what enforces
914
+ * them (`intent` §Non-goals, "Emptying the apply stage").
915
+ *
916
+ * A network call inside a preflight is not disqualifying: `listIntegrations`
917
+ * was already here, answering "will this `integration:` grant have a target?"
918
+ * against the live listing merged with the tree, and falling back to the tree
919
+ * alone when the listing cannot be fetched.
920
+ *
921
+ * `input` names what the block used to close over. `client` is narrowed to the
922
+ * one method it calls, so an apply call cannot drift in here later without
923
+ * that being a visible change to this signature.
924
+ */
925
+ export declare function runConfigPushPreflight(input: {
926
+ configDir: string;
927
+ resolvedAppId: string;
928
+ pushSelection: SyncSelection | null;
929
+ syncState: SyncState | null;
930
+ force: boolean;
931
+ isCrossAppPush: boolean;
932
+ client: Pick<ApiClient, "listIntegrations" | "listFunctions">;
933
+ }): Promise<{
934
+ parsedVars: Record<string, unknown> | null;
935
+ }>;
936
+ export declare function promptKindFileErrors(filePath: string, tomlData: any): string[];
937
+ /**
938
+ * The functions an agent's references are checked against at push — #3798,
939
+ * DSO-3798-002.
940
+ *
941
+ * `config push` applies prompts, then (for agents) the server functions leg,
942
+ * so a reference may be satisfied by a function that is live already or by one
943
+ * this push creates. What the push BELIEVES is therefore the live listing
944
+ * overlaid by the function files this push SELECTS (`--only`, every file when
945
+ * unscoped): a selected file's schemas are what the server will hold after the
946
+ * push, so it wins over the live row. An UNSELECTED file is not read at all —
947
+ * its edits will not be applied, and a function only it declares will not
948
+ * exist afterwards.
949
+ *
950
+ * `live` is `null` when the listing could not be fetched: the selected files
951
+ * still count, and `liveListed` lets the refusal say why every other reference
952
+ * could not be confirmed. A live row that is archived is a tombstone, not a
953
+ * function; an inactive one is accepted (the turn engine re-checks
954
+ * availability on every call).
955
+ */
956
+ export declare function agentFunctionFactsForPush(input: {
957
+ configDir: string;
958
+ pushSelection: SyncSelection | null;
959
+ live: ReadonlyArray<Record<string, unknown>> | null;
960
+ }): {
961
+ facts: AgentFunctionFacts;
962
+ liveListed: boolean;
963
+ };
964
+ /**
965
+ * The function half of an agent's declaration — #3798: every tool, turn
966
+ * context and history function that the functions this push believes
967
+ * (`agentFunctionFactsForPush`) do not have, and every tool function lacking an
968
+ * input or output schema. The same `resolveAgentDeclaration` the admin routes
969
+ * run; only its function refusals are reported here, because the collector
970
+ * (`promptKindFileErrors`) already reported the file-decidable ones.
971
+ */
972
+ export declare function promptAgentFunctionErrors(filePath: string, tomlData: any, known: {
973
+ facts: AgentFunctionFacts;
974
+ liveListed: boolean;
975
+ }): string[];
976
+ /**
977
+ * The order `config push` applies prompt files in — #3798. An agent names
978
+ * server functions that must exist when it is created, and the push applies
979
+ * prompts before functions, so agent files go AFTER the server-functions leg;
980
+ * every other file keeps its place. A file that does not parse stays first, so
981
+ * the leg reports it where it always has.
982
+ */
983
+ export declare function partitionPromptFilesForPush(promptsDir: string, files: readonly string[]): {
984
+ beforeFunctions: string[];
985
+ afterFunctions: string[];
986
+ };
987
+ /**
988
+ * Every `prompts/<key>.tests/*.toml` sidecar whose prompt is an agent — #3798
989
+ * (§D1: prompt test cases are refused for the kind in v1). The admin test-case
990
+ * routes refuse the same case with `AGENT_TEST_CASE_NOT_SUPPORTED`; this says
991
+ * so before anything is applied.
992
+ */
993
+ export declare function promptAgentSidecarErrors(configDir: string): string[];
994
+ /**
995
+ * The immutable-`kind` refusal for a prompt update the comparison gate did not
996
+ * decide — #3626, CR3626-001.
997
+ *
998
+ * `kind` is create-only (D3626-008), and the gate refuses a change to it on
999
+ * every path that compares the two sides. Two update paths do not compare: a
1000
+ * prompt whose DETAIL read failed falls back to the manifest byte-hash gate,
1001
+ * which `--force` writes straight through, and a prompt ADOPTED after a
1002
+ * create's 409 is re-issued as an update without a comparison at all. Both
1003
+ * would otherwise PATCH the file's schemas, access rule and metadata onto a
1004
+ * row of the other kind, and only then have its configs refused against the
1005
+ * kind the update cannot change.
1006
+ *
1007
+ * Returns the gate's own outcome shape, so `recordDeclined` prints the same
1008
+ * two values and the same remedy — create the prompt under a new key.
856
1009
  *
857
- * One collector, two commands. Push aborts on the messages before issuing a
858
- * request; `config diff` renders them as their own rows, because the failure
859
- * this closes is a file diff calls Synced and push then rejects — the state the
860
- * issue's reporter hit after #2803 retired `[prompt].status`, where a local key
861
- * with no server counterpart is invisible to a comparison and fatal to a push.
1010
+ * `null` when the kinds agree and when the server's kind is simply not KNOWN:
1011
+ * a push that could not read live state at all has nothing to compare, and
1012
+ * that path's contract (`decideDegradedPush`, #2880) is already "decline
1013
+ * unless the operator forces it", stated for every field at once.
1014
+ */
1015
+ export declare function promptKindImmutableOutcome(storedKind: PromptKind | undefined, localDoc: any): Extract<PushGateOutcome, {
1016
+ action: "immutable";
1017
+ }> | null;
1018
+ /**
1019
+ * The one deprecation notice a prompt file using the FLAT chat spelling earns
1020
+ * — #3626 §4, beside the `celContextAccess` notice's precedent.
862
1021
  *
863
- * Three checks, all definition-driven: the document's table shape, keys no
864
- * definition declares (retired keys among them), and — since #2880 — values
865
- * whose spelling is not the declared type. A file that does not parse is left
866
- * to the per-type loop that reads it, which names the parse error itself.
1022
+ * Advisory: the push continues and the keys are applied. `null` when the file
1023
+ * is already written in the grouped spelling, so a migrated tree is silent.
867
1024
  */
1025
+ export declare function promptFlatChatKeyWarning(filePath: string, tomlData: any): string | null;
868
1026
  export declare function collectConfigFileValidationErrors(configDir: string): ConfigFileValidationError[];
1027
+ /**
1028
+ * Every `functions/<key>.toml` whose file-decidable errors `config push` would
1029
+ * refuse (#3320).
1030
+ *
1031
+ * A second collector rather than a branch inside
1032
+ * `collectConfigFileValidationErrors`, and deliberately so: push calls that one
1033
+ * UNBOUNDED over the whole tree, which is right for the checks it runs (a
1034
+ * mistyped key anywhere means the tree is not pushable) and wrong for these — a
1035
+ * `config push --only webhook/<key>` must not be blocked by a broken function
1036
+ * the operator did not select (#2645). The push path therefore runs these
1037
+ * inside its own `selectFiles`-bounded function loop, and `config diff`, which
1038
+ * compares the whole tree by construction, runs them from here.
1039
+ *
1040
+ * A file that does not parse is skipped: the per-type loop that reads it names
1041
+ * the parse error itself, and reporting it twice helps nobody.
1042
+ */
1043
+ export declare function collectFunctionTomlValidationErrors(configDir: string): ConfigFileValidationError[];
1044
+ /**
1045
+ * The retired runtime keys every `functions/*.toml` in the tree still carries
1046
+ * — #3482, the warning half of the collector above.
1047
+ *
1048
+ * Separate from the errors because it IS separate: a file carrying one of
1049
+ * these pushes, with every other key applied, so it is not a row `config diff`
1050
+ * calls invalid. It is a line an author reads on stderr from both commands, so
1051
+ * the two keep reading identically (the #2880 symmetry the errors collector
1052
+ * exists for, applied to advice rather than refusals).
1053
+ */
1054
+ export declare function collectFunctionTomlIgnoredKeyWarnings(configDir: string): string[];
1055
+ /**
1056
+ * The collectors' rows, one per diff row (#2880 symmetry, #3320).
1057
+ *
1058
+ * Two collectors reach the same function file — the definition-driven one
1059
+ * every per-entity type runs, and the function preflight — and a file can
1060
+ * break both at once (a mistyped `entrty`, which then leaves no `entry`).
1061
+ * Push reports every message from both, so an overlay that let one row's
1062
+ * messages REPLACE the other's would drop a diagnostic push prints, which is
1063
+ * exactly the asymmetry #2880 forbids. Merging by row keeps the two commands
1064
+ * reading identically.
1065
+ */
1066
+ export declare function mergeConfigFileValidationErrors(collected: ConfigFileValidationError[]): ConfigFileValidationError[];
869
1067
  /**
870
1068
  * Every `<key>.tests/*.toml` sidecar under a config directory.
871
1069
  *
@@ -939,6 +1137,15 @@ export declare function workflowPushSendsUpdate(configDir: string, key: string,
939
1137
  *
940
1138
  * Returns `null` when the name is present.
941
1139
  */
1140
+ /**
1141
+ * The preflight error a project's document schema contributes, or `null` —
1142
+ * #3719.
1143
+ *
1144
+ * Only a `refusal` counts: a unique constraint on a stringset field, which no
1145
+ * writer can key consistently, so the push stops before any mutation. Every
1146
+ * other unusable-schema case stays the apply loop's warning (D3455-004).
1147
+ */
1148
+ export declare function documentSchemaPreflightError(resolution: DocumentSchemaResolution): string | null;
942
1149
  export declare function workflowUpdateNameError(filePath: string, workflow: any): string | null;
943
1150
  export declare function serializeWorkflow(workflow: any, draft: any, configs: any[], logger?: (message: string) => void): string;
944
1151
  export declare function serializeDatabaseType(typeConfig: any, operations: any[], ruleSetIdToName: Map<string, string>, options?: {
@@ -1141,6 +1348,31 @@ export declare function diffProjectedRecords(local: Record<string, any>, remote:
1141
1348
  local: any;
1142
1349
  server: any;
1143
1350
  }>;
1351
+ /**
1352
+ * The paths at which two projected records disagree, named the way the FILE
1353
+ * spells them (#3267) — what a `config diff` Modified row prints.
1354
+ *
1355
+ * `diffProjectedRecords` answers at the granularity of the projection, and
1356
+ * for a database type that is too coarse to act on: the 27 operations arrive
1357
+ * as one `operations` extra, the whole `[models.*]` tree as one `schema`
1358
+ * string. A row that read Modified for a reason the operator could not see —
1359
+ * an empty params set spelled two ways, an operation block the file declares
1360
+ * twice — was undiagnosable from the CLI. So this walks INTO each differing
1361
+ * field: a keyed child collection (`spec.childKeys`) is compared row by row
1362
+ * and named `operations["getInstitution"].params`, with a row only one side
1363
+ * has or that the file repeats named as such; a TOML-string field
1364
+ * (`spec.tomlFields`) is parsed on both sides and named by the path inside it
1365
+ * (`schema (models.Institution.fields.name.required)`); everything else is
1366
+ * walked as a value to its first differing leaf.
1367
+ *
1368
+ * Paths come back in projected-key order, keyed rows in key order, so the
1369
+ * list is stable across runs, and every leaf is its own entry — a schema
1370
+ * that differs in seven model fields is seven paths, so the caller's "+N
1371
+ * more" cap counts them the way it counts operations. A value the walk
1372
+ * cannot descend into (an array of a different length, a scalar against an
1373
+ * object) is named at the level it stopped.
1374
+ */
1375
+ export declare function describeProjectedDifferences(spec: Pick<ConfigDiffSpec, "childKeys" | "tomlFields">, local: Record<string, any>, remote: Record<string, any>): string[];
1144
1376
  /**
1145
1377
  * The differing fields the definition says an UPDATE does not accept (#2731 B8).
1146
1378
  *
@@ -1171,6 +1403,19 @@ export declare function classifyPushChange(input: {
1171
1403
  localHash: string;
1172
1404
  remoteHash: string;
1173
1405
  baselineHash?: string;
1406
+ /**
1407
+ * The server record has NOT been written since the last sync (#3317).
1408
+ *
1409
+ * Its own `modifiedAt` is what says so, and that is evidence no hash can
1410
+ * contradict: a record nothing has written cannot have drifted, so the local
1411
+ * file is the only side that can have moved. A baseline hash disagreeing
1412
+ * with the current remote projection then says something about the BASELINE
1413
+ * — recorded by a CLI whose projection of the same record differed — and not
1414
+ * about the server. Left false by callers whose row timestamp does not cover
1415
+ * everything the projection compares; `decidePushForConfig` owns that
1416
+ * judgement.
1417
+ */
1418
+ serverUnchangedSinceSync?: boolean;
1174
1419
  legacy?: {
1175
1420
  localBytesMatchStoredContentHash?: boolean;
1176
1421
  liveModifiedAtMatchesStored?: boolean;
@@ -1231,6 +1476,20 @@ export interface ConfigDiffSpec {
1231
1476
  * that there is nothing to do.
1232
1477
  */
1233
1478
  unmanaged?(doc: any): string[];
1479
+ /**
1480
+ * The projected extras that are KEYED child collections, by the key each
1481
+ * row carries (#3267) — a database type's `operations` by `name`. The
1482
+ * comparison already sorts these by key (`byKey`); this is what lets a
1483
+ * difference in one be NAMED as the row and the sub-field it is in, rather
1484
+ * than as the whole collection.
1485
+ */
1486
+ childKeys?: Record<string, string>;
1487
+ /**
1488
+ * The projected extras that are TOML documents held as strings (#3267) —
1489
+ * a database type's `[models.*]` `schema`. Named as the path inside the
1490
+ * document that differs, when both sides parse.
1491
+ */
1492
+ tomlFields?: string[];
1234
1493
  /** Whether the entity carries a rule-set reference needing resolution. */
1235
1494
  ruleSetRef?: boolean;
1236
1495
  /** How the type names itself in the rule-set resolution message. */
@@ -1353,6 +1612,13 @@ export interface PushBaselineEntry {
1353
1612
  modifiedAt?: string;
1354
1613
  contentHash?: string;
1355
1614
  semanticHash?: string;
1615
+ /**
1616
+ * The version the manifest last saw active, for a versioned type (#3317).
1617
+ * Read only beside `serverModifiedAtCoversProjection`: a recorded pointer
1618
+ * that is not the live one denies the timestamp's claim that the server
1619
+ * stood still.
1620
+ */
1621
+ activeConfigId?: string;
1356
1622
  }
1357
1623
  /**
1358
1624
  * `config push`'s change decision for one configuration file (#2731 B1/B3/B4/B8).
@@ -1432,6 +1698,33 @@ export declare function decidePushForConfig(input: {
1432
1698
  */
1433
1699
  localExtra?: any;
1434
1700
  force?: boolean;
1701
+ /**
1702
+ * Whether the live record's `modifiedAt` covers EVERYTHING this type's
1703
+ * projection compares (#3317).
1704
+ *
1705
+ * Opt-in, because it is a claim about the data model rather than about this
1706
+ * push. A server function's header row carries its fields and the
1707
+ * `activeConfigId` pointer, and a version is immutable, so any change to
1708
+ * what the comparison reads moves that one timestamp — an equal timestamp
1709
+ * therefore PROVES the server stood still, and a baseline hash that
1710
+ * disagrees is stale rather than evidence of drift (the reporter's conflict,
1711
+ * printed over two identical timestamps).
1712
+ *
1713
+ * A database type's is the counter-example and the reason this is not the
1714
+ * default: its operations and subscriptions are rows of their own, so an
1715
+ * out-of-band edit to one changes the projection while the type's own
1716
+ * `modifiedAt` stands still. Claiming coverage there would turn a real
1717
+ * server change into a silent overwrite.
1718
+ *
1719
+ * The timestamp is trusted only alongside the version pointer: when the
1720
+ * manifest recorded an `activeConfigId`, the live record must still point at
1721
+ * it. The baseline is written from a header refetched AFTER the push, and a
1722
+ * concurrent activation landing in that window leaves the manifest carrying
1723
+ * the other operator's timestamp beside the version this push activated —
1724
+ * two timestamps that agree about a server that moved to a version the local
1725
+ * file never saw. The pointer is what moved, so it is what settles it.
1726
+ */
1727
+ serverModifiedAtCoversProjection?: boolean;
1435
1728
  /**
1436
1729
  * Whether this type's push path ADOPTS an existing object by key (#2909).
1437
1730
  *
@@ -1699,7 +1992,7 @@ export declare function configSemanticHash(label: string, filePath: string, maps
1699
1992
  /**
1700
1993
  * The sync state `config push` writes into (#2731 B6, closing #2374).
1701
1994
  *
1702
- * `loadSyncState` answers `null` for an absent `.primitive-sync.json`, and
1995
+ * `loadSyncState` answers `null` for an absent sync-state baseline, and
1703
1996
  * every per-entity state write in the push loops is guarded by `if (syncState)`
1704
1997
  * — so a first push created every resource and recorded none of them. The next
1705
1998
  * push then re-entered the create path for everything and depended on 409
@@ -1806,17 +2099,6 @@ export declare function unselectedRuleSetIds(params: {
1806
2099
  /** The `ruleSet.name` a file declares — the name references use. */
1807
2100
  nameForFile: (file: string) => string | undefined;
1808
2101
  }): Map<string, string>;
1809
- export declare function slugifyTestCaseName(name: string): string;
1810
- /**
1811
- * The name to use for `slug`, given the names already taken.
1812
- *
1813
- * `occupy` decides what "already taken" means, and `usedSlugs` holds names in
1814
- * that form (#2896): a file name is occupied CASE-INSENSITIVELY on the
1815
- * filesystems most of these trees live on, so `Foo` and `foo` are one file even
1816
- * though they are two strings. The returned name keeps its own casing — only
1817
- * the occupancy check is normalized.
1818
- */
1819
- export declare function resolveSlugCollisions(slug: string, usedSlugs: Set<string>, occupy?: (name: string) => string): string;
1820
2102
  export declare function getTestsDir(configDir: string, blockType: string, blockKey: string): string;
1821
2103
  export interface TestCaseLookupMaps {
1822
2104
  configIdToName: Map<string, string>;
@@ -1891,6 +2173,91 @@ selects?: (name: string) => boolean): Promise<{
1891
2173
  /** Names the server listed, empty when the listing failed. */
1892
2174
  serverKeys: string[];
1893
2175
  }>;
2176
+ /**
2177
+ * The manifest row `config push` records for a function it just pushed
2178
+ * (#3317), and whether the server had already moved past that push.
2179
+ *
2180
+ * The header is refetched AFTER the version push, so the row's `modifiedAt`
2181
+ * is the live timestamp — but the version pointer and the envelope are the
2182
+ * push's own: the manifest names what THIS run activated, not whatever the
2183
+ * refetch happened to find. A concurrent activation landing between the push
2184
+ * and the refetch is exactly the case those two must not be conflated in:
2185
+ * recording the refetched pointer would make the other operator's version the
2186
+ * baseline the local file is then read as a plain edit of, and the next push
2187
+ * would roll it back without `--force`. Recording the pushed pointer beside
2188
+ * the live timestamp is what `decidePushForConfig` reads as "the pointer
2189
+ * moved" — a refusal, until the operator pulls or forces.
2190
+ *
2191
+ * `movedTo` names the version the refetched header points at when it is not
2192
+ * the pushed one, so the caller can say so at the moment it is known rather
2193
+ * than leaving it for the next push to report.
2194
+ */
2195
+ export declare function pushedFunctionBaseline(input: {
2196
+ functionId: string;
2197
+ /** The header refetched after the push, or the pre-push listing row. */
2198
+ refreshed: any;
2199
+ existingModifiedAt?: string;
2200
+ contentHash: string;
2201
+ /** The version the push activated (created, or the matched no-op). */
2202
+ pushedVersion: any;
2203
+ envelopeHash: string;
2204
+ sources: string[];
2205
+ spec: ConfigDiffSpec;
2206
+ maps: ConfigDiffMaps;
2207
+ }): {
2208
+ entity: {
2209
+ id: string;
2210
+ modifiedAt: string;
2211
+ contentHash: string;
2212
+ semanticHash?: string;
2213
+ envelopeHash: string;
2214
+ activeConfigId?: string;
2215
+ sources: string[];
2216
+ };
2217
+ movedTo: string | null;
2218
+ };
2219
+ /**
2220
+ * Pull server-side `ServerFunction` rows into `functions/` (#3179).
2221
+ *
2222
+ * Two things make this different from every other type's pull:
2223
+ *
2224
+ * 1. **A function is more than its file.** The active config VERSION holds an
2225
+ * envelope with the authored TOML bytes and every source file, so the pull
2226
+ * writes `functions/<key>.toml` plus the TypeScript beside it, and records
2227
+ * the source paths so prune can remove the code with the function.
2228
+ * 2. **Bytes, not a re-serialization.** The stored TOML is written verbatim,
2229
+ * so comments, key order and line endings survive the round trip (F-009).
2230
+ * A function that has never had code pushed has no stored bytes; that one
2231
+ * gets a canonical serialization of its header, which is still a pushable
2232
+ * file.
2233
+ *
2234
+ * A stored source path is never trusted: `planFunctionPull` refuses one that
2235
+ * normalizes outside the tree, and the refusals are reported rather than
2236
+ * swallowed.
2237
+ */
2238
+ export declare function pullFunctions(client: ApiClient, appId: string, configDir: string, logger?: (msg: string) => void, selects?: (key: string) => boolean): Promise<{
2239
+ functionEntities: Record<string, {
2240
+ id: string;
2241
+ modifiedAt: string;
2242
+ contentHash?: string;
2243
+ semanticHash?: string;
2244
+ envelopeHash?: string;
2245
+ activeConfigId?: string;
2246
+ sources?: string[];
2247
+ }>;
2248
+ count: number;
2249
+ presence: PresenceOutcome;
2250
+ listOk: boolean;
2251
+ serverKeys: string[];
2252
+ /**
2253
+ * Everything the server listed, archived rows included. Pull exports no file
2254
+ * for a tombstone, so without the row here the archived function would be
2255
+ * stranded: no file to delete and no managed key to prune, and its key would
2256
+ * go on blocking the app's whole namespace with nothing able to reclaim it.
2257
+ * The caller folds these into the state through `archivedTombstoneEntries`.
2258
+ */
2259
+ items: any[];
2260
+ }>;
1894
2261
  /** The outcome of one block's test-case pull (#2769). */
1895
2262
  export type TestCasePullOutcome =
1896
2263
  /** The listing succeeded; `count` cases were written and stale files removed. */
@@ -2091,25 +2458,6 @@ export declare function pushTestCasesForBlock(params: {
2091
2458
  }): Promise<{
2092
2459
  skipped: number;
2093
2460
  }>;
2094
- /**
2095
- * The file name each live test case belongs in (#2896).
2096
- *
2097
- * A KEYED case is named by its key: that is what the key is — the basename the
2098
- * committed tree carries. An unkeyed one (created by web-admin, an older CLI or
2099
- * the raw API) keeps the slug-of-name naming, with the collision suffixes
2100
- * resolved only AFTER the keys have claimed theirs, so a slug can never take a
2101
- * name a key owns.
2102
- *
2103
- * One function for pull, for pairing's adoption pass and for the diff's
2104
- * remote-only rows, because three commands that name a case's file differently
2105
- * is the disagreement this issue reports.
2106
- *
2107
- * Two names that differ only by CASE are one file on a case-insensitive
2108
- * filesystem, so occupancy is tracked the way the server's key constraint
2109
- * normalizes: a keyed `Foo` and an unkeyed case named "foo" get `Foo.toml` and
2110
- * `foo-2.toml`, rather than one pull silently overwriting the other's sidecar.
2111
- */
2112
- export declare function testCaseFileBasenames(liveCases: any[], onUnusableKey?: (live: any, reason: string) => void, isSafeName?: (name: string) => boolean): Map<any, string>;
2113
2461
  /**
2114
2462
  * Whether a sidecar and a live case say the same thing (#2896).
2115
2463
  *
@@ -2316,8 +2664,7 @@ export declare function applyTestCasePrune(params: {
2316
2664
  * `registerConfigCommands` created rather than making one of its own.
2317
2665
  *
2318
2666
  * The module keeps its name and its ~50 exported helpers: `sync.ts`,
2319
- * `resolveSyncDir`, `.primitive-sync.json` and `.primitive/sync/<env>/<appId>/`
2667
+ * `resolveSyncDir`, the sync-state baseline and `primitive/<env>/`
2320
2668
  * are internal identifiers, deliberately left alone (#2759 scope).
2321
2669
  */
2322
2670
  export declare function registerConfigSyncCommands(sync: Command): void;
2323
- export {};