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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (400) hide show
  1. package/README.md +181 -73
  2. package/assets/skill/skills/primitive-platform/SKILL.md +87 -23
  3. package/dist/bin/primitive.js +11 -82
  4. package/dist/bin/primitive.js.map +1 -1
  5. package/dist/src/commands/admins.js +80 -17
  6. package/dist/src/commands/admins.js.map +1 -1
  7. package/dist/src/commands/agent-sessions.js +2 -0
  8. package/dist/src/commands/agent-sessions.js.map +1 -1
  9. package/dist/src/commands/analytics.js +181 -12
  10. package/dist/src/commands/analytics.js.map +1 -1
  11. package/dist/src/commands/apps-children.js +2 -0
  12. package/dist/src/commands/apps-children.js.map +1 -1
  13. package/dist/src/commands/apps-transitions.d.ts +39 -0
  14. package/dist/src/commands/apps-transitions.js +198 -0
  15. package/dist/src/commands/apps-transitions.js.map +1 -0
  16. package/dist/src/commands/apps.d.ts +11 -0
  17. package/dist/src/commands/apps.js +65 -3
  18. package/dist/src/commands/apps.js.map +1 -1
  19. package/dist/src/commands/auth-sessions.js +2 -0
  20. package/dist/src/commands/auth-sessions.js.map +1 -1
  21. package/dist/src/commands/auth.js +16 -1
  22. package/dist/src/commands/auth.js.map +1 -1
  23. package/dist/src/commands/blob-buckets.js +2 -0
  24. package/dist/src/commands/blob-buckets.js.map +1 -1
  25. package/dist/src/commands/collections.js +2 -0
  26. package/dist/src/commands/collections.js.map +1 -1
  27. package/dist/src/commands/comparisons.js +2 -0
  28. package/dist/src/commands/comparisons.js.map +1 -1
  29. package/dist/src/commands/config.d.ts +1 -1
  30. package/dist/src/commands/config.js +42 -9
  31. package/dist/src/commands/config.js.map +1 -1
  32. package/dist/src/commands/connections.js +2 -0
  33. package/dist/src/commands/connections.js.map +1 -1
  34. package/dist/src/commands/database-type-configs.js +5 -3
  35. package/dist/src/commands/database-type-configs.js.map +1 -1
  36. package/dist/src/commands/databases.js +6 -4
  37. package/dist/src/commands/databases.js.map +1 -1
  38. package/dist/src/commands/db3-types.js +2 -0
  39. package/dist/src/commands/db3-types.js.map +1 -1
  40. package/dist/src/commands/db3.d.ts +12 -0
  41. package/dist/src/commands/db3.js +408 -31
  42. package/dist/src/commands/db3.js.map +1 -1
  43. package/dist/src/commands/documents.d.ts +52 -12
  44. package/dist/src/commands/documents.js +120 -29
  45. package/dist/src/commands/documents.js.map +1 -1
  46. package/dist/src/commands/email-templates.js +74 -0
  47. package/dist/src/commands/email-templates.js.map +1 -1
  48. package/dist/src/commands/env.js +2 -0
  49. package/dist/src/commands/env.js.map +1 -1
  50. package/dist/src/commands/functions.js +90 -11
  51. package/dist/src/commands/functions.js.map +1 -1
  52. package/dist/src/commands/groups.js +20 -3
  53. package/dist/src/commands/groups.js.map +1 -1
  54. package/dist/src/commands/guides.js +2 -0
  55. package/dist/src/commands/guides.js.map +1 -1
  56. package/dist/src/commands/hosting.d.ts +8 -0
  57. package/dist/src/commands/hosting.js +346 -0
  58. package/dist/src/commands/hosting.js.map +1 -0
  59. package/dist/src/commands/init.js +9 -1
  60. package/dist/src/commands/init.js.map +1 -1
  61. package/dist/src/commands/integrations.js +82 -47
  62. package/dist/src/commands/integrations.js.map +1 -1
  63. package/dist/src/commands/locks.js +2 -0
  64. package/dist/src/commands/locks.js.map +1 -1
  65. package/dist/src/commands/metadata-category-configs.js +2 -0
  66. package/dist/src/commands/metadata-category-configs.js.map +1 -1
  67. package/dist/src/commands/metadata.js +41 -0
  68. package/dist/src/commands/metadata.js.map +1 -1
  69. package/dist/src/commands/prompts.js +75 -47
  70. package/dist/src/commands/prompts.js.map +1 -1
  71. package/dist/src/commands/rate-counters.d.ts +19 -0
  72. package/dist/src/commands/rate-counters.js +104 -0
  73. package/dist/src/commands/rate-counters.js.map +1 -0
  74. package/dist/src/commands/rule-sets.js +2 -0
  75. package/dist/src/commands/rule-sets.js.map +1 -1
  76. package/dist/src/commands/schemas.d.ts +15 -0
  77. package/dist/src/commands/schemas.js +122 -0
  78. package/dist/src/commands/schemas.js.map +1 -0
  79. package/dist/src/commands/secrets.js +47 -3
  80. package/dist/src/commands/secrets.js.map +1 -1
  81. package/dist/src/commands/sessions.js +2 -0
  82. package/dist/src/commands/sessions.js.map +1 -1
  83. package/dist/src/commands/skill.js +2 -0
  84. package/dist/src/commands/skill.js.map +1 -1
  85. package/dist/src/commands/sync-schemas.d.ts +202 -0
  86. package/dist/src/commands/sync-schemas.js +629 -0
  87. package/dist/src/commands/sync-schemas.js.map +1 -0
  88. package/dist/src/commands/sync-user-properties.d.ts +118 -0
  89. package/dist/src/commands/sync-user-properties.js +276 -0
  90. package/dist/src/commands/sync-user-properties.js.map +1 -0
  91. package/dist/src/commands/sync.d.ts +344 -14
  92. package/dist/src/commands/sync.js +1834 -345
  93. package/dist/src/commands/sync.js.map +1 -1
  94. package/dist/src/commands/tokens.js +2 -0
  95. package/dist/src/commands/tokens.js.map +1 -1
  96. package/dist/src/commands/transitions.d.ts +54 -0
  97. package/dist/src/commands/transitions.js +418 -0
  98. package/dist/src/commands/transitions.js.map +1 -0
  99. package/dist/src/commands/usage.d.ts +18 -0
  100. package/dist/src/commands/usage.js +343 -0
  101. package/dist/src/commands/usage.js.map +1 -0
  102. package/dist/src/commands/user-properties.d.ts +14 -0
  103. package/dist/src/commands/user-properties.js +79 -0
  104. package/dist/src/commands/user-properties.js.map +1 -0
  105. package/dist/src/commands/users.js +878 -16
  106. package/dist/src/commands/users.js.map +1 -1
  107. package/dist/src/commands/vars.js +2 -0
  108. package/dist/src/commands/vars.js.map +1 -1
  109. package/dist/src/commands/waitlist.js +39 -4
  110. package/dist/src/commands/waitlist.js.map +1 -1
  111. package/dist/src/lib/analytics-query.d.ts +58 -0
  112. package/dist/src/lib/analytics-query.js +134 -0
  113. package/dist/src/lib/analytics-query.js.map +1 -0
  114. package/dist/src/lib/api-client.d.ts +1354 -97
  115. package/dist/src/lib/api-client.js +513 -164
  116. package/dist/src/lib/api-client.js.map +1 -1
  117. package/dist/src/lib/app-settings-descriptor.d.ts +1 -1
  118. package/dist/src/lib/app-settings-descriptor.js +6 -0
  119. package/dist/src/lib/app-settings-descriptor.js.map +1 -1
  120. package/dist/src/lib/auth-flow.d.ts +33 -0
  121. package/dist/src/lib/auth-flow.js +404 -13
  122. package/dist/src/lib/auth-flow.js.map +1 -1
  123. package/dist/src/lib/block-selector.d.ts +9 -15
  124. package/dist/src/lib/block-selector.js +9 -20
  125. package/dist/src/lib/block-selector.js.map +1 -1
  126. package/dist/src/lib/cli-manifest.d.ts +9 -0
  127. package/dist/src/lib/cli-manifest.js +10 -1
  128. package/dist/src/lib/cli-manifest.js.map +1 -1
  129. package/dist/src/lib/cli-version.d.ts +14 -0
  130. package/dist/src/lib/cli-version.js +38 -0
  131. package/dist/src/lib/cli-version.js.map +1 -0
  132. package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
  133. package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
  134. package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
  135. package/dist/src/lib/command-groups.d.ts +30 -0
  136. package/dist/src/lib/command-groups.js +109 -0
  137. package/dist/src/lib/command-groups.js.map +1 -0
  138. package/dist/src/lib/command-status.d.ts +147 -0
  139. package/dist/src/lib/command-status.js +266 -0
  140. package/dist/src/lib/command-status.js.map +1 -0
  141. package/dist/src/lib/config-object-descriptor.d.ts +6 -0
  142. package/dist/src/lib/config-object-descriptor.js +71 -1
  143. package/dist/src/lib/config-object-descriptor.js.map +1 -1
  144. package/dist/src/lib/config-toml.d.ts +11 -2
  145. package/dist/src/lib/config-toml.js +25 -2
  146. package/dist/src/lib/config-toml.js.map +1 -1
  147. package/dist/src/lib/data-input.d.ts +1 -1
  148. package/dist/src/lib/data-input.js +1 -1
  149. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
  150. package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
  151. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
  152. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +18 -1
  153. package/dist/src/lib/db-codegen/dbTypeIR.js +14 -5
  154. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
  155. package/dist/src/lib/db-type-records.d.ts +106 -0
  156. package/dist/src/lib/db-type-records.js +224 -0
  157. package/dist/src/lib/db-type-records.js.map +1 -0
  158. package/dist/src/lib/db3-export.d.ts +51 -14
  159. package/dist/src/lib/db3-export.js +136 -28
  160. package/dist/src/lib/db3-export.js.map +1 -1
  161. package/dist/src/lib/db3-index-output.d.ts +92 -4
  162. package/dist/src/lib/db3-index-output.js +183 -11
  163. package/dist/src/lib/db3-index-output.js.map +1 -1
  164. package/dist/src/lib/db3-type-models.d.ts +49 -7
  165. package/dist/src/lib/db3-type-models.js +159 -28
  166. package/dist/src/lib/db3-type-models.js.map +1 -1
  167. package/dist/src/lib/deprecation.d.ts +2 -2
  168. package/dist/src/lib/deprecation.js +2 -2
  169. package/dist/src/lib/experimental-apis.d.ts +36 -0
  170. package/dist/src/lib/experimental-apis.js +46 -0
  171. package/dist/src/lib/experimental-apis.js.map +1 -0
  172. package/dist/src/lib/file-attachment.d.ts +24 -0
  173. package/dist/src/lib/file-attachment.js +31 -0
  174. package/dist/src/lib/file-attachment.js.map +1 -0
  175. package/dist/src/lib/function-authorize-check.d.ts +1 -1
  176. package/dist/src/lib/function-authorize-check.js +2 -1
  177. package/dist/src/lib/function-authorize-check.js.map +1 -1
  178. package/dist/src/lib/function-authorize-view.d.ts +12 -0
  179. package/dist/src/lib/function-authorize-view.js +38 -0
  180. package/dist/src/lib/function-authorize-view.js.map +1 -1
  181. package/dist/src/lib/function-bundle.d.ts +27 -5
  182. package/dist/src/lib/function-bundle.js +106 -7
  183. package/dist/src/lib/function-bundle.js.map +1 -1
  184. package/dist/src/lib/function-collect.d.ts +15 -0
  185. package/dist/src/lib/function-collect.js +73 -14
  186. package/dist/src/lib/function-collect.js.map +1 -1
  187. package/dist/src/lib/function-db-types.d.ts +63 -40
  188. package/dist/src/lib/function-db-types.js +289 -293
  189. package/dist/src/lib/function-db-types.js.map +1 -1
  190. package/dist/src/lib/function-document-types.d.ts +19 -7
  191. package/dist/src/lib/function-document-types.js +24 -12
  192. package/dist/src/lib/function-document-types.js.map +1 -1
  193. package/dist/src/lib/function-lint.d.ts +24 -1
  194. package/dist/src/lib/function-lint.js +123 -1
  195. package/dist/src/lib/function-lint.js.map +1 -1
  196. package/dist/src/lib/function-run.d.ts +1 -1
  197. package/dist/src/lib/function-run.js +1 -1
  198. package/dist/src/lib/function-run.js.map +1 -1
  199. package/dist/src/lib/function-schema-codegen.d.ts +85 -21
  200. package/dist/src/lib/function-schema-codegen.js +191 -85
  201. package/dist/src/lib/function-schema-codegen.js.map +1 -1
  202. package/dist/src/lib/function-schema-refs.d.ts +98 -0
  203. package/dist/src/lib/function-schema-refs.js +177 -0
  204. package/dist/src/lib/function-schema-refs.js.map +1 -0
  205. package/dist/src/lib/function-sync.d.ts +38 -4
  206. package/dist/src/lib/function-sync.js +91 -14
  207. package/dist/src/lib/function-sync.js.map +1 -1
  208. package/dist/src/lib/function-typecheck.d.ts +52 -0
  209. package/dist/src/lib/function-typecheck.js +171 -54
  210. package/dist/src/lib/function-typecheck.js.map +1 -1
  211. package/dist/src/lib/generated-build-flags.d.ts +13 -0
  212. package/dist/src/lib/generated-build-flags.js +14 -0
  213. package/dist/src/lib/generated-build-flags.js.map +1 -0
  214. package/dist/src/lib/generated-command-status.d.ts +6 -0
  215. package/dist/src/lib/generated-command-status.js +469 -0
  216. package/dist/src/lib/generated-command-status.js.map +1 -0
  217. package/dist/src/lib/generated-config-surfaces.d.ts +239 -14
  218. package/dist/src/lib/generated-config-surfaces.js +670 -85
  219. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  220. package/dist/src/lib/generated-sdk-types.d.ts +1 -1
  221. package/dist/src/lib/generated-sdk-types.js +1 -1
  222. package/dist/src/lib/generated-sdk-types.js.map +1 -1
  223. package/dist/src/lib/hosting-build.d.ts +97 -0
  224. package/dist/src/lib/hosting-build.js +204 -0
  225. package/dist/src/lib/hosting-build.js.map +1 -0
  226. package/dist/src/lib/hosting-client.d.ts +167 -0
  227. package/dist/src/lib/hosting-client.js +340 -0
  228. package/dist/src/lib/hosting-client.js.map +1 -0
  229. package/dist/src/lib/hosting-environments.d.ts +32 -0
  230. package/dist/src/lib/hosting-environments.js +74 -0
  231. package/dist/src/lib/hosting-environments.js.map +1 -0
  232. package/dist/src/lib/hosting-errors.d.ts +30 -0
  233. package/dist/src/lib/hosting-errors.js +43 -0
  234. package/dist/src/lib/hosting-errors.js.map +1 -0
  235. package/dist/src/lib/hosting-token.d.ts +46 -0
  236. package/dist/src/lib/hosting-token.js +60 -0
  237. package/dist/src/lib/hosting-token.js.map +1 -0
  238. package/dist/src/lib/hosting-wait.d.ts +42 -0
  239. package/dist/src/lib/hosting-wait.js +84 -0
  240. package/dist/src/lib/hosting-wait.js.map +1 -0
  241. package/dist/src/lib/hosting-wfp-upload.d.ts +86 -0
  242. package/dist/src/lib/hosting-wfp-upload.js +149 -0
  243. package/dist/src/lib/hosting-wfp-upload.js.map +1 -0
  244. package/dist/src/lib/integration-test-request.d.ts +54 -0
  245. package/dist/src/lib/integration-test-request.js +207 -0
  246. package/dist/src/lib/integration-test-request.js.map +1 -0
  247. package/dist/src/lib/invoker-shared-enums.d.ts +35 -0
  248. package/dist/src/lib/invoker-shared-enums.js +98 -0
  249. package/dist/src/lib/invoker-shared-enums.js.map +1 -0
  250. package/dist/src/lib/log-inspection.d.ts +4 -1
  251. package/dist/src/lib/log-inspection.js.map +1 -1
  252. package/dist/src/lib/metadata-report.d.ts +85 -0
  253. package/dist/src/lib/metadata-report.js +81 -0
  254. package/dist/src/lib/metadata-report.js.map +1 -0
  255. package/dist/src/lib/output.d.ts +1 -1
  256. package/dist/src/lib/output.js +1 -1
  257. package/dist/src/lib/platform-owned.js +5 -0
  258. package/dist/src/lib/platform-owned.js.map +1 -1
  259. package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
  260. package/dist/src/lib/primitive-declaration-names.js +22 -0
  261. package/dist/src/lib/primitive-declaration-names.js.map +1 -0
  262. package/dist/src/lib/primitive-declaration.d.ts +174 -0
  263. package/dist/src/lib/primitive-declaration.js +792 -0
  264. package/dist/src/lib/primitive-declaration.js.map +1 -0
  265. package/dist/src/lib/prompt-schema-codegen.d.ts +36 -12
  266. package/dist/src/lib/prompt-schema-codegen.js +94 -98
  267. package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
  268. package/dist/src/lib/prompt-schema-document.d.ts +35 -0
  269. package/dist/src/lib/prompt-schema-document.js +92 -0
  270. package/dist/src/lib/prompt-schema-document.js.map +1 -0
  271. package/dist/src/lib/prompt-schema-refs.d.ts +173 -0
  272. package/dist/src/lib/prompt-schema-refs.js +478 -0
  273. package/dist/src/lib/prompt-schema-refs.js.map +1 -0
  274. package/dist/src/lib/records-verbs.d.ts +12 -2
  275. package/dist/src/lib/records-verbs.js +7 -2
  276. package/dist/src/lib/records-verbs.js.map +1 -1
  277. package/dist/src/lib/register-commands.d.ts +36 -0
  278. package/dist/src/lib/register-commands.js +37 -0
  279. package/dist/src/lib/register-commands.js.map +1 -0
  280. package/dist/src/lib/retired-imports.d.ts +53 -0
  281. package/dist/src/lib/retired-imports.js +120 -0
  282. package/dist/src/lib/retired-imports.js.map +1 -0
  283. package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
  284. package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
  285. package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
  286. package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
  287. package/dist/src/lib/schema-codegen/generated-db3-bridge.js +227 -0
  288. package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
  289. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
  290. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
  291. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
  292. package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +218 -0
  293. package/dist/src/lib/schema-codegen/generated-field-grammar.js +397 -0
  294. package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
  295. package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
  296. package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
  297. package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
  298. package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
  299. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
  300. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
  301. package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +129 -0
  302. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +154 -1
  303. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -1
  304. package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
  305. package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
  306. package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
  307. package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
  308. package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
  309. package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
  310. package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
  311. package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
  312. package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
  313. package/dist/src/lib/schema-codegen/generated-schema-shape.d.ts +27 -0
  314. package/dist/src/lib/schema-codegen/generated-schema-shape.js +126 -0
  315. package/dist/src/lib/schema-codegen/generated-schema-shape.js.map +1 -0
  316. package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
  317. package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
  318. package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
  319. package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
  320. package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
  321. package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
  322. package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
  323. package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
  324. package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
  325. package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
  326. package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
  327. package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
  328. package/dist/src/lib/schema-codegen/schemaToTs.d.ts +40 -13
  329. package/dist/src/lib/schema-codegen/schemaToTs.js +124 -160
  330. package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -1
  331. package/dist/src/lib/schema-codegen/valuesLists.d.ts +48 -0
  332. package/dist/src/lib/schema-codegen/valuesLists.js +144 -0
  333. package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
  334. package/dist/src/lib/schema-family-index.d.ts +228 -0
  335. package/dist/src/lib/schema-family-index.js +813 -0
  336. package/dist/src/lib/schema-family-index.js.map +1 -0
  337. package/dist/src/lib/schema-pins.d.ts +82 -0
  338. package/dist/src/lib/schema-pins.js +198 -0
  339. package/dist/src/lib/schema-pins.js.map +1 -0
  340. package/dist/src/lib/schema-preview.d.ts +244 -0
  341. package/dist/src/lib/schema-preview.js +498 -0
  342. package/dist/src/lib/schema-preview.js.map +1 -0
  343. package/dist/src/lib/skill-installer.d.ts +2 -2
  344. package/dist/src/lib/skill-installer.js +2 -21
  345. package/dist/src/lib/skill-installer.js.map +1 -1
  346. package/dist/src/lib/step-run-table.d.ts +1 -2
  347. package/dist/src/lib/step-run-table.js +1 -2
  348. package/dist/src/lib/step-run-table.js.map +1 -1
  349. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +2 -1
  350. package/dist/src/lib/swift-codegen/agentGenerator.js +24 -22
  351. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
  352. package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
  353. package/dist/src/lib/swift-codegen/banners.js +12 -0
  354. package/dist/src/lib/swift-codegen/banners.js.map +1 -1
  355. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
  356. package/dist/src/lib/swift-codegen/functionGenerator.js +168 -50
  357. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
  358. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +31 -7
  359. package/dist/src/lib/swift-codegen/schemaToSwift.js +213 -177
  360. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
  361. package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +45 -0
  362. package/dist/src/lib/swift-codegen/sharedGenerator.js +165 -0
  363. package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
  364. package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
  365. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
  366. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
  367. package/dist/src/lib/sync-resource-types.d.ts +37 -5
  368. package/dist/src/lib/sync-resource-types.js +50 -5
  369. package/dist/src/lib/sync-resource-types.js.map +1 -1
  370. package/dist/src/lib/sync-selectors.d.ts +7 -0
  371. package/dist/src/lib/sync-selectors.js +22 -2
  372. package/dist/src/lib/sync-selectors.js.map +1 -1
  373. package/dist/src/lib/test-runs.d.ts +45 -0
  374. package/dist/src/lib/test-runs.js +150 -0
  375. package/dist/src/lib/test-runs.js.map +1 -0
  376. package/dist/src/lib/toml-database-config.d.ts +2 -1
  377. package/dist/src/lib/toml-database-config.js +7 -4
  378. package/dist/src/lib/toml-database-config.js.map +1 -1
  379. package/dist/src/lib/toml-scalar-edit.js +6 -4
  380. package/dist/src/lib/toml-scalar-edit.js.map +1 -1
  381. package/dist/src/lib/transition-warnings.d.ts +21 -0
  382. package/dist/src/lib/transition-warnings.js +49 -0
  383. package/dist/src/lib/transition-warnings.js.map +1 -0
  384. package/dist/src/lib/user-index.d.ts +80 -0
  385. package/dist/src/lib/user-index.js +166 -0
  386. package/dist/src/lib/user-index.js.map +1 -0
  387. package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
  388. package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
  389. package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
  390. package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
  391. package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
  392. package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
  393. package/dist/src/lib/user-walk.d.ts +31 -0
  394. package/dist/src/lib/user-walk.js +102 -0
  395. package/dist/src/lib/user-walk.js.map +1 -0
  396. package/dist/src/lib/worker-perf-format.d.ts +22 -0
  397. package/dist/src/lib/worker-perf-format.js +27 -0
  398. package/dist/src/lib/worker-perf-format.js.map +1 -0
  399. package/dist/src/types/index.d.ts +13 -34
  400. package/package.json +5 -3
@@ -0,0 +1,129 @@
1
+ /**
2
+ * The TypeScript types of `user-properties.toml` (#5385, project
3
+ * `user-index-properties` phase 2).
4
+ *
5
+ * Two renderings of one schema, read with the server's own parser (the
6
+ * vendored `generated-properties-schema.ts`):
7
+ *
8
+ * - the `UserProperties` namespace of `functions/primitive.d.ts` (#5544),
9
+ * whose interfaces augment the SDK's empty `UserProperties`,
10
+ * `ClientUserProperties` and `UserUniqueProperties`, so a server function
11
+ * reads a user's properties typed;
12
+ * - `functions/generated/user-properties.generated.ts`, the same two
13
+ * interfaces for the app's own client code, beside the function invokers.
14
+ *
15
+ * Each field's type comes from the db3 field grammar's TypeScript mapping
16
+ * (`tsTypeForDbFieldType`), an `enum` field as its string-literal union, and
17
+ * every member is optional: a property a user has not set is absent.
18
+ * `ClientUserProperties` holds the fields whose `client` is not `none`.
19
+ */
20
+ import { existsSync, readFileSync } from "fs";
21
+ import { join } from "path";
22
+ import { parseUserPropertiesToml } from "./generated-properties-schema.js";
23
+ import { FunctionSchemaCodegenError } from "../function-schema-codegen.js";
24
+ import { tsTypeForDbFieldType } from "../db-codegen/dbTsTypes.js";
25
+ import { fingerprintToml } from "../db-codegen/dbFingerprint.js";
26
+ import { atom, renderMember, tsStringLiteral, union } from "../codegen-shared/prettierStable.js";
27
+ import { renderValuesList } from "../schema-codegen/valuesLists.js";
28
+ import { pascalCase } from "../db-codegen/dbNaming.js";
29
+ /** The file the schema is authored in, at the tree's root. */
30
+ export const USER_PROPERTIES_FILE = "user-properties.toml";
31
+ /** The app's client types, beside the function invokers. */
32
+ export const USER_PROPERTIES_CLIENT_FILE = "user-properties.generated.ts";
33
+ /** Whether the tree declares user properties at all. */
34
+ export function treeHasUserProperties(configDir) {
35
+ return existsSync(join(configDir, USER_PROPERTIES_FILE));
36
+ }
37
+ /**
38
+ * The tree's `user-properties.toml`, parsed; null when it has none. A file
39
+ * that does not parse throws a `FunctionSchemaCodegenError` naming it, the
40
+ * failure every other generator's malformed source raises.
41
+ */
42
+ export function userPropertiesSource(configDir) {
43
+ const path = join(configDir, USER_PROPERTIES_FILE);
44
+ if (!existsSync(path))
45
+ return null;
46
+ const text = readFileSync(path, "utf-8");
47
+ const parsed = parseUserPropertiesToml(text);
48
+ if ("reasons" in parsed) {
49
+ throw new FunctionSchemaCodegenError(`${USER_PROPERTIES_FILE}: ${parsed.reasons.map((r) => `${r.path ? `${r.path}: ` : ""}${r.reason}`).join("; ")}`);
50
+ }
51
+ return { text, schema: parsed.schema };
52
+ }
53
+ /** A field's TypeScript type: its enum as a string-literal union (quoted as Prettier quotes), else the field grammar's type. */
54
+ function userPropertyTypeNode(field) {
55
+ if (field.type === "string" && field.enum && field.enum.length > 0)
56
+ return union(field.enum.map((value) => atom(tsStringLiteral(value))));
57
+ return atom(tsTypeForDbFieldType(field.type));
58
+ }
59
+ /**
60
+ * One interface, every member optional; `{}` with none. Members go through
61
+ * the shared Prettier-stable printer (#1565), so a long enum union wraps the
62
+ * way Prettier would and `--check` never reports a formatted file stale.
63
+ */
64
+ function renderInterface(name, fields, exported) {
65
+ if (fields.length === 0)
66
+ return `${exported}interface ${name} {}`;
67
+ return [`${exported}interface ${name} {`, ...fields.map(([key, field]) => renderMember(1, key, true, userPropertyTypeNode(field))), "}"].join("\n");
68
+ }
69
+ const fieldsOf = (schema) => Object.entries(schema?.fields ?? {});
70
+ /** The names `ctx.users.getBy` takes: each unique field, then each named constraint, as `name: true` members. */
71
+ function renderUniqueNames(name, schema) {
72
+ const names = [...fieldsOf(schema).filter(([, field]) => field.unique).map(([key]) => key), ...(schema?.uniqueConstraints ?? []).map((c) => c.name)];
73
+ if (names.length === 0)
74
+ return `export interface ${name} {}`;
75
+ return [`export interface ${name} {`, ...names.map((key) => renderMember(1, key, false, atom("true"))), "}"].join("\n");
76
+ }
77
+ const clientFieldsOf = (schema) => fieldsOf(schema).filter(([, field]) => field.client !== "none");
78
+ /**
79
+ * The `UserProperties` namespace's declarations of `functions/primitive.d.ts`
80
+ * (#5544): every field, the client-visible ones, and the unique names
81
+ * `ctx.users.getBy` looks up (#5386); all empty with no schema.
82
+ */
83
+ export function renderUserPropertiesDeclarations(schema, names) {
84
+ return [
85
+ `/** A user's properties, as ${USER_PROPERTIES_FILE} declares them. Every field is optional: a property a user has not set is absent. */\n${renderInterface(names.userProperties, fieldsOf(schema), "export ")}`,
86
+ `/** The properties a client session may reach: the fields whose \`client\` is not \`none\`. */\n${renderInterface(names.clientUserProperties, clientFieldsOf(schema), "export ")}`,
87
+ `/** The unique fields and constraints \`ctx.users.getBy\` looks up. */\n${renderUniqueNames(names.uniqueUserProperties, schema)}`,
88
+ ];
89
+ }
90
+ /**
91
+ * The value list of each enum field an interface declares (#5544):
92
+ * `<Interface><Field>Values`, two fields resolving to one name refused naming
93
+ * both.
94
+ */
95
+ function valuesLists(interfaceName, fields) {
96
+ const byName = new Map();
97
+ const out = [];
98
+ for (const [key, field] of fields) {
99
+ if (field.type !== "string" || !field.enum || field.enum.length === 0)
100
+ continue;
101
+ const name = `${interfaceName}${pascalCase(key)}Values`;
102
+ const prior = byName.get(name);
103
+ if (prior !== undefined) {
104
+ throw new FunctionSchemaCodegenError(`${USER_PROPERTIES_FILE}: the value lists of \`fields.${prior}\` and \`fields.${key}\` both name \`${name}\` — rename one field so the two do not collide`);
105
+ }
106
+ byName.set(name, key);
107
+ out.push(renderValuesList({ name, path: `fields.${key}`, values: field.enum }));
108
+ }
109
+ return out;
110
+ }
111
+ /**
112
+ * `functions/generated/user-properties.generated.ts`: the app's client types,
113
+ * fingerprinted by the TOML they came from, each interface followed by the
114
+ * value list of every enum field it declares (#5544).
115
+ */
116
+ export function renderUserPropertiesClientTypes(source) {
117
+ return ([
118
+ [
119
+ `// AUTO-GENERATED FROM ${USER_PROPERTIES_FILE} — DO NOT EDIT.`,
120
+ "// Run `primitive functions codegen` to regenerate.",
121
+ `// fingerprint: ${fingerprintToml(source.text)}`,
122
+ ].join("\n"),
123
+ `/** A user's properties, as ${USER_PROPERTIES_FILE} declares them. Every field is optional. */\n${renderInterface("UserProperties", fieldsOf(source.schema), "export ")}`,
124
+ ...valuesLists("UserProperties", fieldsOf(source.schema)),
125
+ `/** The properties a client session may reach: the fields whose \`client\` is not \`none\`. */\n${renderInterface("ClientUserProperties", clientFieldsOf(source.schema), "export ")}`,
126
+ ...valuesLists("ClientUserProperties", clientFieldsOf(source.schema)),
127
+ ].join("\n\n") + "\n");
128
+ }
129
+ //# sourceMappingURL=user-properties-codegen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-properties-codegen.js","sourceRoot":"","sources":["../../../../src/lib/user-properties/user-properties-codegen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAA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,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,EAAE;QAC1K,GAAG,WAAW,CAAC,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACzD,mGAAmG,eAAe,CAAC,sBAAsB,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,EAAE;QACtL,GAAG,WAAW,CAAC,sBAAsB,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;KACtE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CACtB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * The parts of `primitive users walk` that need no server: the start's flag
3
+ * parsing, the wait loop, and the status's human form.
4
+ */
5
+ import type { UserWalkStartBody } from "./api-client.js";
6
+ /** A walk's terminal statuses. */
7
+ export declare const USER_WALK_TERMINAL: string[];
8
+ /** How long `--wait` retries a 404 after the start it made: the run index may lag the start. */
9
+ export declare const USER_WALK_INDEX_GRACE_MS = 10000;
10
+ /** A JSON flag's value, or a refusal naming the flag; `undefined` when absent. */
11
+ export declare function parseWalkJsonFlag(flag: string, raw: string | undefined): unknown;
12
+ /**
13
+ * The body of `users walk start` from its flags (the filter already read by
14
+ * `parseFilterOptions`). Refuses a malformed number or JSON value before any
15
+ * request; `--sort` without `--snapshot` is the server's to refuse.
16
+ */
17
+ export declare function walkStartBodyOf(options: Record<string, any>, filter: Record<string, unknown> | undefined): UserWalkStartBody;
18
+ /**
19
+ * Poll `read` once a second until the walk is terminal; answers the last
20
+ * read, or null when `timeoutMs` passed first. A 404 within
21
+ * {@link USER_WALK_INDEX_GRACE_MS} of `startedAt` is retried (the run index
22
+ * may not have the row yet); any later one is thrown.
23
+ */
24
+ export declare function waitForUserWalk(read: () => Promise<any>, timeoutMs: number, startedAt: number, intervalMs?: number): Promise<any | null>;
25
+ /** `done` and `failed` of a walk's status answer. */
26
+ export declare function walkCounts(answer: any): {
27
+ done: number;
28
+ failed: number;
29
+ };
30
+ /** The status's human form, label and value. */
31
+ export declare function walkStatusLines(answer: any): Array<[string, string | null]>;
@@ -0,0 +1,102 @@
1
+ /**
2
+ * The parts of `primitive users walk` that need no server: the start's flag
3
+ * parsing, the wait loop, and the status's human form.
4
+ */
5
+ import { formatDate } from "./output.js";
6
+ import { parsePositiveIntegerFlag, UserIndexFlagError } from "./user-index.js";
7
+ /** A walk's terminal statuses. */
8
+ export const USER_WALK_TERMINAL = ["completed", "failed", "terminated"];
9
+ /** How long `--wait` retries a 404 after the start it made: the run index may lag the start. */
10
+ export const USER_WALK_INDEX_GRACE_MS = 10_000;
11
+ /** A JSON flag's value, or a refusal naming the flag; `undefined` when absent. */
12
+ export function parseWalkJsonFlag(flag, raw) {
13
+ if (raw === undefined)
14
+ return undefined;
15
+ try {
16
+ return JSON.parse(raw);
17
+ }
18
+ catch {
19
+ throw new UserIndexFlagError(`Invalid ${flag} JSON.`);
20
+ }
21
+ }
22
+ /**
23
+ * The body of `users walk start` from its flags (the filter already read by
24
+ * `parseFilterOptions`). Refuses a malformed number or JSON value before any
25
+ * request; `--sort` without `--snapshot` is the server's to refuse.
26
+ */
27
+ export function walkStartBodyOf(options, filter) {
28
+ const sort = parseWalkJsonFlag("--sort", options.sort);
29
+ const input = parseWalkJsonFlag("--input", options.input);
30
+ const batchSize = options.batchSize !== undefined ? parsePositiveIntegerFlag("batch-size", String(options.batchSize)) : undefined;
31
+ const concurrency = options.concurrency !== undefined ? parsePositiveIntegerFlag("concurrency", String(options.concurrency)) : undefined;
32
+ return {
33
+ function: String(options.function),
34
+ key: String(options.key),
35
+ ...(filter !== undefined ? { filter } : {}),
36
+ ...(sort !== undefined ? { sort: sort } : {}),
37
+ ...(input !== undefined ? { input } : {}),
38
+ ...(batchSize !== undefined ? { batchSize } : {}),
39
+ ...(concurrency !== undefined ? { concurrency } : {}),
40
+ ...(options.snapshot ? { snapshot: true } : {}),
41
+ };
42
+ }
43
+ /**
44
+ * Poll `read` once a second until the walk is terminal; answers the last
45
+ * read, or null when `timeoutMs` passed first. A 404 within
46
+ * {@link USER_WALK_INDEX_GRACE_MS} of `startedAt` is retried (the run index
47
+ * may not have the row yet); any later one is thrown.
48
+ */
49
+ export async function waitForUserWalk(read, timeoutMs, startedAt, intervalMs = 1000) {
50
+ const deadline = Date.now() + timeoutMs;
51
+ for (;;) {
52
+ let answer = null;
53
+ try {
54
+ answer = await read();
55
+ }
56
+ catch (err) {
57
+ if (!(err?.statusCode === 404 && Date.now() - startedAt < USER_WALK_INDEX_GRACE_MS))
58
+ throw err;
59
+ }
60
+ if (answer && USER_WALK_TERMINAL.includes(String(answer.status?.status)))
61
+ return answer;
62
+ if (Date.now() + intervalMs > deadline)
63
+ return null;
64
+ await new Promise((resolve) => setTimeout(resolve, intervalMs));
65
+ }
66
+ }
67
+ /** `done` and `failed` of a walk's status answer. */
68
+ export function walkCounts(answer) {
69
+ const batches = answer?.status?.walk?.batches ?? {};
70
+ return { done: Number(batches.done ?? 0), failed: Number(batches.failed ?? 0) };
71
+ }
72
+ const count = (value) => (value === null || value === undefined ? "?" : String(value));
73
+ /** The status's human form, label and value. */
74
+ export function walkStatusLines(answer) {
75
+ const walk = answer?.status?.walk ?? null;
76
+ const run = answer?.run ?? {};
77
+ const batches = walk?.batches ?? null;
78
+ const partitions = Array.isArray(walk?.partitions) ? walk.partitions : [];
79
+ const lines = [
80
+ ["Status", String(answer?.status?.status ?? run.status ?? "")],
81
+ ["Run", String(run.runId ?? walk?.runId ?? "")],
82
+ ["Walk", String(walk?.walkId ?? run.walkId ?? "")],
83
+ ["Function", String(walk?.functionKey ?? run.functionKey ?? "")],
84
+ ["Key", String(walk?.key ?? run.key ?? "")],
85
+ ["Matched", walk?.matched ? `${count(walk.matched.count)}${walk.matched.exact === false ? " (so far)" : ""}` : null],
86
+ [
87
+ "Batches",
88
+ batches
89
+ ? `${count(batches.done)} done / ${count(batches.failed)} failed / ${count(batches.inFlight)} in flight / ` +
90
+ `${count(batches.retrying)} retrying / ${count(batches.remaining)} remaining of ${count(batches.total)}`
91
+ : null,
92
+ ],
93
+ ["Partitions", walk ? `${partitions.filter((p) => p.done === true).length} done of ${partitions.length}` : null],
94
+ ["Started", run.startedAt ?? walk?.startedAt ? formatDate(run.startedAt ?? walk?.startedAt) : null],
95
+ ["Ended", run.endedAt ?? walk?.endedAt ? formatDate(run.endedAt ?? walk?.endedAt) : null],
96
+ ];
97
+ const errorText = walk?.lastError ?? run.errorMessage ?? null;
98
+ if (errorText)
99
+ lines.push(["Error", String(errorText)]);
100
+ return lines;
101
+ }
102
+ //# sourceMappingURL=user-walk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-walk.js","sourceRoot":"","sources":["../../../src/lib/user-walk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG/E,kCAAkC;AAClC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;AAExE,gGAAgG;AAChG,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE/C,kFAAkF;AAClF,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,GAAuB;IACrE,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACxC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,kBAAkB,CAAC,WAAW,IAAI,QAAQ,CAAC,CAAC;IACxD,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,OAA4B,EAAE,MAA2C;IACvG,MAAM,IAAI,GAAG,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC,IA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cells for `analytics db3-queries` and `analytics requests` (#5244). The
3
+ * console's Database Queries tab formats the same rows the same way
4
+ * (`web-admin/src/lib/db3Queries.ts`).
5
+ */
6
+ /** Printed for a figure the server answered `null` (a per-returned ratio when nothing was returned). */
7
+ export declare const NO_FIGURE = "\u2014";
8
+ /** `--order-by` values and the `orderBy` each sends. */
9
+ export declare const DB3_QUERIES_ORDER_BY: Record<string, "rowsRead" | "rowsPerReturned">;
10
+ /** Who issued a query shape: the function's key, else its id, else the endpoint. */
11
+ export declare function db3QueryCaller(row: {
12
+ function_key?: string | null;
13
+ function_id?: string | null;
14
+ endpoint?: string;
15
+ }): string;
16
+ /** A request row's function: its key, else its id, else `—`. */
17
+ export declare function requestFunction(row: {
18
+ function_key?: string | null;
19
+ function_id?: string | null;
20
+ }): string;
21
+ /** A figure with thousands separators and at most one decimal, or `—` for `null`. */
22
+ export declare function formatFigure(value: number | null | undefined): string;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Cells for `analytics db3-queries` and `analytics requests` (#5244). The
3
+ * console's Database Queries tab formats the same rows the same way
4
+ * (`web-admin/src/lib/db3Queries.ts`).
5
+ */
6
+ /** Printed for a figure the server answered `null` (a per-returned ratio when nothing was returned). */
7
+ export const NO_FIGURE = "—";
8
+ /** `--order-by` values and the `orderBy` each sends. */
9
+ export const DB3_QUERIES_ORDER_BY = {
10
+ "rows-read": "rowsRead",
11
+ "rows-per-returned": "rowsPerReturned",
12
+ };
13
+ /** Who issued a query shape: the function's key, else its id, else the endpoint. */
14
+ export function db3QueryCaller(row) {
15
+ return row.function_key || row.function_id || row.endpoint || NO_FIGURE;
16
+ }
17
+ /** A request row's function: its key, else its id, else `—`. */
18
+ export function requestFunction(row) {
19
+ return row.function_key || row.function_id || NO_FIGURE;
20
+ }
21
+ /** A figure with thousands separators and at most one decimal, or `—` for `null`. */
22
+ export function formatFigure(value) {
23
+ if (value === null || value === undefined || !Number.isFinite(value))
24
+ return NO_FIGURE;
25
+ return value.toLocaleString("en-US", { maximumFractionDigits: 1 });
26
+ }
27
+ //# sourceMappingURL=worker-perf-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-perf-format.js","sourceRoot":"","sources":["../../../src/lib/worker-perf-format.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wGAAwG;AACxG,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAC;AAE7B,wDAAwD;AACxD,MAAM,CAAC,MAAM,oBAAoB,GAAmD;IAClF,WAAW,EAAE,UAAU;IACvB,mBAAmB,EAAE,iBAAiB;CACvC,CAAC;AAEF,oFAAoF;AACpF,MAAM,UAAU,cAAc,CAAC,GAI9B;IACC,OAAO,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,QAAQ,IAAI,SAAS,CAAC;AAC1E,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,eAAe,CAAC,GAAkE;IAChG,OAAO,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,WAAW,IAAI,SAAS,CAAC;AAC1D,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,YAAY,CAAC,KAAgC;IAC3D,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACvF,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,qBAAqB,EAAE,CAAC,EAAE,CAAC,CAAC;AACrE,CAAC"}
@@ -421,40 +421,6 @@ export interface AdminInvitation {
421
421
  appName?: string;
422
422
  appCreationLimit?: number;
423
423
  }
424
- export interface PromptCatalogItem {
425
- catalogId: string;
426
- catalogKey: string;
427
- displayName: string;
428
- description?: string | null;
429
- category?: string | null;
430
- provider: "openrouter" | "gemini";
431
- model: string;
432
- systemPrompt?: string | null;
433
- userPromptTemplate: string;
434
- inputSchema?: string | null;
435
- outputSchema?: string | null;
436
- temperature?: string | null;
437
- topP?: string | null;
438
- maxTokens?: number | null;
439
- status: "draft" | "active" | "deprecated";
440
- createdBy?: string;
441
- createdAt?: string;
442
- modifiedAt?: string;
443
- }
444
- export interface IntegrationCatalogItem {
445
- catalogId: string;
446
- catalogKey: string;
447
- displayName: string;
448
- description?: string | null;
449
- category?: string | null;
450
- requestConfig: string;
451
- docUrl?: string | null;
452
- logoUrl?: string | null;
453
- status: "draft" | "active" | "deprecated";
454
- createdBy?: string;
455
- createdAt?: string;
456
- modifiedAt?: string;
457
- }
458
424
  export interface WorkflowConfiguration {
459
425
  configId: string;
460
426
  workflowId: string;
@@ -491,6 +457,12 @@ export interface SyncState {
491
457
  */
492
458
  excludedName?: unknown;
493
459
  };
460
+ userProperties?: {
461
+ modifiedAt: string;
462
+ contentHash?: string;
463
+ semanticHash?: string;
464
+ version?: number;
465
+ };
494
466
  integrations?: Record<string, {
495
467
  id: string;
496
468
  modifiedAt: string;
@@ -504,6 +476,7 @@ export interface SyncState {
504
476
  contentHash?: string;
505
477
  semanticHash?: string;
506
478
  ruleFreeSemanticHash?: string;
479
+ evaluatorFreeSemanticHash?: string;
507
480
  }>;
508
481
  emailTemplates?: Record<string, {
509
482
  id: string;
@@ -555,6 +528,12 @@ export interface SyncState {
555
528
  contentHash?: string;
556
529
  semanticHash?: string;
557
530
  }>;
531
+ schemas?: Record<string, {
532
+ version: number;
533
+ modifiedAt: string;
534
+ contentHash?: string;
535
+ sourceHash?: string;
536
+ }>;
558
537
  vars?: Record<string, {
559
538
  modifiedAt: string;
560
539
  contentHash?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primitive-admin",
3
- "version": "1.2.0-alpha.14",
3
+ "version": "1.2.0-alpha.16",
4
4
  "description": "CLI for administering Primitive applications",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,9 +26,11 @@
26
26
  "gen:schema-descriptor:check": "node scripts/gen-schema-descriptor.mjs --check",
27
27
  "gen:config-surfaces": "node scripts/gen-config-surfaces.mjs",
28
28
  "gen:config-surfaces:check": "node scripts/gen-config-surfaces.mjs --check",
29
+ "gen:user-properties-schema": "node scripts/gen-user-properties-schema.mjs",
30
+ "gen:user-properties-schema:check": "node scripts/gen-user-properties-schema.mjs --check",
29
31
  "gen:config-write-surface": "node scripts/gen-config-write-surface.mjs",
30
32
  "gen:config-write-surface:check": "node scripts/gen-config-write-surface.mjs --check",
31
- "prebuild": "node scripts/gen-schema-descriptor.mjs && node scripts/gen-config-surfaces.mjs && node scripts/gen-primitive-env-resolver.mjs && node scripts/gen-sdk-types.mjs",
33
+ "prebuild": "node scripts/gen-schema-descriptor.mjs && node scripts/gen-config-surfaces.mjs && node scripts/gen-primitive-env-resolver.mjs && node scripts/gen-sdk-types.mjs && node scripts/gen-user-properties-schema.mjs && node scripts/gen-build-flags.mjs",
32
34
  "build": "tsc",
33
35
  "typecheck": "tsc --noEmit",
34
36
  "prepublishOnly": "pnpm run build",
@@ -58,7 +60,7 @@
58
60
  "commander": "^12.1.0",
59
61
  "esbuild": "0.25.12",
60
62
  "inquirer": "^9.2.12",
61
- "js-bao": "0.12.0-alpha.14",
63
+ "js-bao": "0.12.0-alpha.16",
62
64
  "mime-types": "^2.1.35",
63
65
  "open": "^10.0.3",
64
66
  "smol-toml": "1.7.0",