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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (590) hide show
  1. package/README.md +303 -186
  2. package/assets/skill/skills/primitive-platform/SKILL.md +93 -27
  3. package/dist/bin/primitive.js +15 -89
  4. package/dist/bin/primitive.js.map +1 -1
  5. package/dist/src/commands/admins.js +80 -17
  6. package/dist/src/commands/admins.js.map +1 -1
  7. package/dist/src/commands/agent-sessions.d.ts +129 -0
  8. package/dist/src/commands/agent-sessions.js +532 -20
  9. package/dist/src/commands/agent-sessions.js.map +1 -1
  10. package/dist/src/commands/analytics.js +207 -155
  11. package/dist/src/commands/analytics.js.map +1 -1
  12. package/dist/src/commands/apps-children.js +3 -0
  13. package/dist/src/commands/apps-children.js.map +1 -1
  14. package/dist/src/commands/apps-transitions.d.ts +39 -0
  15. package/dist/src/commands/apps-transitions.js +198 -0
  16. package/dist/src/commands/apps-transitions.js.map +1 -0
  17. package/dist/src/commands/apps.d.ts +17 -0
  18. package/dist/src/commands/apps.js +108 -3
  19. package/dist/src/commands/apps.js.map +1 -1
  20. package/dist/src/commands/auth-sessions.js +2 -0
  21. package/dist/src/commands/auth-sessions.js.map +1 -1
  22. package/dist/src/commands/auth.js +170 -50
  23. package/dist/src/commands/auth.js.map +1 -1
  24. package/dist/src/commands/blob-buckets.js +2 -0
  25. package/dist/src/commands/blob-buckets.js.map +1 -1
  26. package/dist/src/commands/collections.js +318 -256
  27. package/dist/src/commands/collections.js.map +1 -1
  28. package/dist/src/commands/comparisons.js +2 -0
  29. package/dist/src/commands/comparisons.js.map +1 -1
  30. package/dist/src/commands/config.d.ts +2 -2
  31. package/dist/src/commands/config.js +59 -33
  32. package/dist/src/commands/config.js.map +1 -1
  33. package/dist/src/commands/connections.js +2 -0
  34. package/dist/src/commands/connections.js.map +1 -1
  35. package/dist/src/commands/database-type-configs.js +5 -3
  36. package/dist/src/commands/database-type-configs.js.map +1 -1
  37. package/dist/src/commands/databases.js +6 -4
  38. package/dist/src/commands/databases.js.map +1 -1
  39. package/dist/src/commands/db3-types.d.ts +42 -0
  40. package/dist/src/commands/db3-types.js +445 -0
  41. package/dist/src/commands/db3-types.js.map +1 -0
  42. package/dist/src/commands/db3.d.ts +38 -0
  43. package/dist/src/commands/db3.js +2053 -0
  44. package/dist/src/commands/db3.js.map +1 -0
  45. package/dist/src/commands/documents.d.ts +110 -10
  46. package/dist/src/commands/documents.js +1019 -748
  47. package/dist/src/commands/documents.js.map +1 -1
  48. package/dist/src/commands/email-templates.js +74 -0
  49. package/dist/src/commands/email-templates.js.map +1 -1
  50. package/dist/src/commands/env.js +8 -4
  51. package/dist/src/commands/env.js.map +1 -1
  52. package/dist/src/commands/function-trigger-commands.d.ts +28 -0
  53. package/dist/src/commands/function-trigger-commands.js +341 -0
  54. package/dist/src/commands/function-trigger-commands.js.map +1 -0
  55. package/dist/src/commands/functions.js +383 -32
  56. package/dist/src/commands/functions.js.map +1 -1
  57. package/dist/src/commands/groups.js +168 -50
  58. package/dist/src/commands/groups.js.map +1 -1
  59. package/dist/src/commands/guides.js +7 -5
  60. package/dist/src/commands/guides.js.map +1 -1
  61. package/dist/src/commands/hosting.d.ts +8 -0
  62. package/dist/src/commands/hosting.js +509 -0
  63. package/dist/src/commands/hosting.js.map +1 -0
  64. package/dist/src/commands/init.js +129 -38
  65. package/dist/src/commands/init.js.map +1 -1
  66. package/dist/src/commands/integrations.js +82 -53
  67. package/dist/src/commands/integrations.js.map +1 -1
  68. package/dist/src/commands/locks.d.ts +5 -3
  69. package/dist/src/commands/locks.js +19 -61
  70. package/dist/src/commands/locks.js.map +1 -1
  71. package/dist/src/commands/metadata-category-configs.d.ts +2 -2
  72. package/dist/src/commands/metadata-category-configs.js +4 -2
  73. package/dist/src/commands/metadata-category-configs.js.map +1 -1
  74. package/dist/src/commands/metadata.js +55 -6
  75. package/dist/src/commands/metadata.js.map +1 -1
  76. package/dist/src/commands/prompts.js +75 -52
  77. package/dist/src/commands/prompts.js.map +1 -1
  78. package/dist/src/commands/rate-counters.d.ts +19 -0
  79. package/dist/src/commands/rate-counters.js +104 -0
  80. package/dist/src/commands/rate-counters.js.map +1 -0
  81. package/dist/src/commands/rule-sets.d.ts +1 -1
  82. package/dist/src/commands/rule-sets.js +2 -1
  83. package/dist/src/commands/rule-sets.js.map +1 -1
  84. package/dist/src/commands/schemas.d.ts +15 -0
  85. package/dist/src/commands/schemas.js +122 -0
  86. package/dist/src/commands/schemas.js.map +1 -0
  87. package/dist/src/commands/scripts.d.ts +9 -17
  88. package/dist/src/commands/scripts.js +24 -479
  89. package/dist/src/commands/scripts.js.map +1 -1
  90. package/dist/src/commands/secrets.d.ts +38 -0
  91. package/dist/src/commands/secrets.js +148 -6
  92. package/dist/src/commands/secrets.js.map +1 -1
  93. package/dist/src/commands/sessions.js +2 -0
  94. package/dist/src/commands/sessions.js.map +1 -1
  95. package/dist/src/commands/skill.js +2 -0
  96. package/dist/src/commands/skill.js.map +1 -1
  97. package/dist/src/commands/spent-tokens.d.ts +19 -0
  98. package/dist/src/commands/spent-tokens.js +79 -0
  99. package/dist/src/commands/spent-tokens.js.map +1 -0
  100. package/dist/src/commands/sync-app-settings.d.ts +58 -0
  101. package/dist/src/commands/sync-app-settings.js +119 -2
  102. package/dist/src/commands/sync-app-settings.js.map +1 -1
  103. package/dist/src/commands/sync-schemas.d.ts +202 -0
  104. package/dist/src/commands/sync-schemas.js +629 -0
  105. package/dist/src/commands/sync-schemas.js.map +1 -0
  106. package/dist/src/commands/sync-user-properties.d.ts +118 -0
  107. package/dist/src/commands/sync-user-properties.js +276 -0
  108. package/dist/src/commands/sync-user-properties.js.map +1 -0
  109. package/dist/src/commands/sync.d.ts +578 -546
  110. package/dist/src/commands/sync.js +3516 -5134
  111. package/dist/src/commands/sync.js.map +1 -1
  112. package/dist/src/commands/tokens.js +5 -3
  113. package/dist/src/commands/tokens.js.map +1 -1
  114. package/dist/src/commands/transitions.d.ts +54 -0
  115. package/dist/src/commands/transitions.js +418 -0
  116. package/dist/src/commands/transitions.js.map +1 -0
  117. package/dist/src/commands/usage.d.ts +42 -0
  118. package/dist/src/commands/usage.js +397 -0
  119. package/dist/src/commands/usage.js.map +1 -0
  120. package/dist/src/commands/user-properties.d.ts +14 -0
  121. package/dist/src/commands/user-properties.js +79 -0
  122. package/dist/src/commands/user-properties.js.map +1 -0
  123. package/dist/src/commands/users.js +951 -18
  124. package/dist/src/commands/users.js.map +1 -1
  125. package/dist/src/commands/vars.js +2 -0
  126. package/dist/src/commands/vars.js.map +1 -1
  127. package/dist/src/commands/waitlist.js +39 -4
  128. package/dist/src/commands/waitlist.js.map +1 -1
  129. package/dist/src/commands/workflows.d.ts +5 -83
  130. package/dist/src/commands/workflows.js +57 -2282
  131. package/dist/src/commands/workflows.js.map +1 -1
  132. package/dist/src/lib/analytics-query.d.ts +58 -0
  133. package/dist/src/lib/analytics-query.js +134 -0
  134. package/dist/src/lib/analytics-query.js.map +1 -0
  135. package/dist/src/lib/api-client.d.ts +1976 -431
  136. package/dist/src/lib/api-client.js +1095 -550
  137. package/dist/src/lib/api-client.js.map +1 -1
  138. package/dist/src/lib/app-settings-descriptor.d.ts +14 -2
  139. package/dist/src/lib/app-settings-descriptor.js +55 -1
  140. package/dist/src/lib/app-settings-descriptor.js.map +1 -1
  141. package/dist/src/lib/auth-fixtures.d.ts +44 -0
  142. package/dist/src/lib/auth-fixtures.js +61 -0
  143. package/dist/src/lib/auth-fixtures.js.map +1 -0
  144. package/dist/src/lib/auth-flow.d.ts +47 -1
  145. package/dist/src/lib/auth-flow.js +451 -14
  146. package/dist/src/lib/auth-flow.js.map +1 -1
  147. package/dist/src/lib/block-layout.d.ts +12 -23
  148. package/dist/src/lib/block-layout.js +26 -92
  149. package/dist/src/lib/block-layout.js.map +1 -1
  150. package/dist/src/lib/block-selector.d.ts +8 -14
  151. package/dist/src/lib/block-selector.js +8 -19
  152. package/dist/src/lib/block-selector.js.map +1 -1
  153. package/dist/src/lib/child-apps-local.d.ts +3 -1
  154. package/dist/src/lib/child-apps-local.js +9 -1
  155. package/dist/src/lib/child-apps-local.js.map +1 -1
  156. package/dist/src/lib/cli-manifest.d.ts +9 -0
  157. package/dist/src/lib/cli-manifest.js +10 -1
  158. package/dist/src/lib/cli-manifest.js.map +1 -1
  159. package/dist/src/lib/cli-version.d.ts +14 -0
  160. package/dist/src/lib/cli-version.js +38 -0
  161. package/dist/src/lib/cli-version.js.map +1 -0
  162. package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
  163. package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
  164. package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
  165. package/dist/src/lib/collection-export.d.ts +76 -15
  166. package/dist/src/lib/collection-export.js +116 -23
  167. package/dist/src/lib/collection-export.js.map +1 -1
  168. package/dist/src/lib/collection-principal.d.ts +22 -0
  169. package/dist/src/lib/collection-principal.js +35 -0
  170. package/dist/src/lib/collection-principal.js.map +1 -0
  171. package/dist/src/lib/command-groups.d.ts +30 -0
  172. package/dist/src/lib/command-groups.js +111 -0
  173. package/dist/src/lib/command-groups.js.map +1 -0
  174. package/dist/src/lib/command-status.d.ts +147 -0
  175. package/dist/src/lib/command-status.js +266 -0
  176. package/dist/src/lib/command-status.js.map +1 -0
  177. package/dist/src/lib/config-object-descriptor.d.ts +9 -22
  178. package/dist/src/lib/config-object-descriptor.js +113 -277
  179. package/dist/src/lib/config-object-descriptor.js.map +1 -1
  180. package/dist/src/lib/config-surface.d.ts +3 -7
  181. package/dist/src/lib/config-surface.js +9 -13
  182. package/dist/src/lib/config-surface.js.map +1 -1
  183. package/dist/src/lib/config-toml.d.ts +11 -2
  184. package/dist/src/lib/config-toml.js +25 -2
  185. package/dist/src/lib/config-toml.js.map +1 -1
  186. package/dist/src/lib/credentials-home.d.ts +7 -0
  187. package/dist/src/lib/credentials-home.js +45 -10
  188. package/dist/src/lib/credentials-home.js.map +1 -1
  189. package/dist/src/lib/credentials-lock.d.ts +14 -6
  190. package/dist/src/lib/credentials-lock.js +90 -10
  191. package/dist/src/lib/credentials-lock.js.map +1 -1
  192. package/dist/src/lib/credentials-store.d.ts +142 -70
  193. package/dist/src/lib/credentials-store.js +420 -111
  194. package/dist/src/lib/credentials-store.js.map +1 -1
  195. package/dist/src/lib/custodian.d.ts +8 -0
  196. package/dist/src/lib/custodian.js +18 -0
  197. package/dist/src/lib/custodian.js.map +1 -0
  198. package/dist/src/lib/data-input.d.ts +1 -1
  199. package/dist/src/lib/data-input.js +1 -1
  200. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
  201. package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
  202. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
  203. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +40 -1
  204. package/dist/src/lib/db-codegen/dbTypeIR.js +32 -8
  205. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
  206. package/dist/src/lib/db-type-records.d.ts +125 -0
  207. package/dist/src/lib/db-type-records.js +237 -0
  208. package/dist/src/lib/db-type-records.js.map +1 -0
  209. package/dist/src/lib/db3-export.d.ts +322 -0
  210. package/dist/src/lib/db3-export.js +767 -0
  211. package/dist/src/lib/db3-export.js.map +1 -0
  212. package/dist/src/lib/db3-index-output.d.ts +116 -0
  213. package/dist/src/lib/db3-index-output.js +223 -0
  214. package/dist/src/lib/db3-index-output.js.map +1 -0
  215. package/dist/src/lib/db3-json-fields.d.ts +49 -0
  216. package/dist/src/lib/db3-json-fields.js +195 -0
  217. package/dist/src/lib/db3-json-fields.js.map +1 -0
  218. package/dist/src/lib/db3-type-archive.d.ts +59 -0
  219. package/dist/src/lib/db3-type-archive.js +95 -0
  220. package/dist/src/lib/db3-type-archive.js.map +1 -0
  221. package/dist/src/lib/db3-type-models.d.ts +148 -0
  222. package/dist/src/lib/db3-type-models.js +583 -0
  223. package/dist/src/lib/db3-type-models.js.map +1 -0
  224. package/dist/src/lib/deprecation.d.ts +2 -2
  225. package/dist/src/lib/deprecation.js +2 -2
  226. package/dist/src/lib/document-export-record-log.d.ts +7 -0
  227. package/dist/src/lib/document-export-record-log.js +9 -0
  228. package/dist/src/lib/document-export-record-log.js.map +1 -1
  229. package/dist/src/lib/document-ingest-artifact.d.ts +19 -0
  230. package/dist/src/lib/document-ingest-artifact.js +55 -6
  231. package/dist/src/lib/document-ingest-artifact.js.map +1 -1
  232. package/dist/src/lib/document-ingest-format2.d.ts +36 -0
  233. package/dist/src/lib/document-ingest-format2.js +78 -0
  234. package/dist/src/lib/document-ingest-format2.js.map +1 -0
  235. package/dist/src/lib/document-ingest-input.d.ts +9 -0
  236. package/dist/src/lib/document-ingest-input.js +28 -1
  237. package/dist/src/lib/document-ingest-input.js.map +1 -1
  238. package/dist/src/lib/document-ingest.d.ts +11 -1
  239. package/dist/src/lib/document-ingest.js +16 -0
  240. package/dist/src/lib/document-ingest.js.map +1 -1
  241. package/dist/src/lib/document-schema-rows.d.ts +42 -0
  242. package/dist/src/lib/document-schema-rows.js +53 -0
  243. package/dist/src/lib/document-schema-rows.js.map +1 -0
  244. package/dist/src/lib/experimental-apis.d.ts +36 -0
  245. package/dist/src/lib/experimental-apis.js +46 -0
  246. package/dist/src/lib/experimental-apis.js.map +1 -0
  247. package/dist/src/lib/file-attachment.d.ts +24 -0
  248. package/dist/src/lib/file-attachment.js +31 -0
  249. package/dist/src/lib/file-attachment.js.map +1 -0
  250. package/dist/src/lib/function-authorize-check.d.ts +142 -0
  251. package/dist/src/lib/function-authorize-check.js +311 -0
  252. package/dist/src/lib/function-authorize-check.js.map +1 -0
  253. package/dist/src/lib/function-authorize-view.d.ts +36 -0
  254. package/dist/src/lib/function-authorize-view.js +110 -0
  255. package/dist/src/lib/function-authorize-view.js.map +1 -0
  256. package/dist/src/lib/function-bundle.d.ts +27 -5
  257. package/dist/src/lib/function-bundle.js +142 -7
  258. package/dist/src/lib/function-bundle.js.map +1 -1
  259. package/dist/src/lib/function-collect.d.ts +112 -12
  260. package/dist/src/lib/function-collect.js +601 -12
  261. package/dist/src/lib/function-collect.js.map +1 -1
  262. package/dist/src/lib/function-db-types.d.ts +65 -11
  263. package/dist/src/lib/function-db-types.js +326 -157
  264. package/dist/src/lib/function-db-types.js.map +1 -1
  265. package/dist/src/lib/function-document-types.d.ts +19 -7
  266. package/dist/src/lib/function-document-types.js +24 -12
  267. package/dist/src/lib/function-document-types.js.map +1 -1
  268. package/dist/src/lib/function-grants-preflight.d.ts +99 -0
  269. package/dist/src/lib/function-grants-preflight.js +154 -2
  270. package/dist/src/lib/function-grants-preflight.js.map +1 -1
  271. package/dist/src/lib/function-lint.d.ts +85 -0
  272. package/dist/src/lib/function-lint.js +442 -0
  273. package/dist/src/lib/function-lint.js.map +1 -0
  274. package/dist/src/lib/function-log-row.js +21 -2
  275. package/dist/src/lib/function-log-row.js.map +1 -1
  276. package/dist/src/lib/function-run.d.ts +13 -21
  277. package/dist/src/lib/function-run.js +14 -27
  278. package/dist/src/lib/function-run.js.map +1 -1
  279. package/dist/src/lib/function-schema-codegen.d.ts +86 -22
  280. package/dist/src/lib/function-schema-codegen.js +194 -88
  281. package/dist/src/lib/function-schema-codegen.js.map +1 -1
  282. package/dist/src/lib/function-schema-refs.d.ts +98 -0
  283. package/dist/src/lib/function-schema-refs.js +177 -0
  284. package/dist/src/lib/function-schema-refs.js.map +1 -0
  285. package/dist/src/lib/function-sync.d.ts +120 -6
  286. package/dist/src/lib/function-sync.js +217 -26
  287. package/dist/src/lib/function-sync.js.map +1 -1
  288. package/dist/src/lib/function-trigger-listing.d.ts +11 -6
  289. package/dist/src/lib/function-trigger-listing.js +32 -11
  290. package/dist/src/lib/function-trigger-listing.js.map +1 -1
  291. package/dist/src/lib/function-typecheck.d.ts +52 -0
  292. package/dist/src/lib/function-typecheck.js +174 -54
  293. package/dist/src/lib/function-typecheck.js.map +1 -1
  294. package/dist/src/lib/function-versions.d.ts +2 -0
  295. package/dist/src/lib/function-versions.js +1 -0
  296. package/dist/src/lib/function-versions.js.map +1 -1
  297. package/dist/src/lib/generated-build-flags.d.ts +13 -0
  298. package/dist/src/lib/generated-build-flags.js +14 -0
  299. package/dist/src/lib/generated-build-flags.js.map +1 -0
  300. package/dist/src/lib/generated-command-status.d.ts +6 -0
  301. package/dist/src/lib/generated-command-status.js +502 -0
  302. package/dist/src/lib/generated-command-status.js.map +1 -0
  303. package/dist/src/lib/generated-config-surfaces.d.ts +804 -140
  304. package/dist/src/lib/generated-config-surfaces.js +2491 -1806
  305. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  306. package/dist/src/lib/generated-sdk-types.d.ts +1 -1
  307. package/dist/src/lib/generated-sdk-types.js +1 -1
  308. package/dist/src/lib/generated-sdk-types.js.map +1 -1
  309. package/dist/src/lib/hosting-build.d.ts +97 -0
  310. package/dist/src/lib/hosting-build.js +204 -0
  311. package/dist/src/lib/hosting-build.js.map +1 -0
  312. package/dist/src/lib/hosting-client.d.ts +167 -0
  313. package/dist/src/lib/hosting-client.js +340 -0
  314. package/dist/src/lib/hosting-client.js.map +1 -0
  315. package/dist/src/lib/hosting-environments.d.ts +32 -0
  316. package/dist/src/lib/hosting-environments.js +74 -0
  317. package/dist/src/lib/hosting-environments.js.map +1 -0
  318. package/dist/src/lib/hosting-errors.d.ts +30 -0
  319. package/dist/src/lib/hosting-errors.js +43 -0
  320. package/dist/src/lib/hosting-errors.js.map +1 -0
  321. package/dist/src/lib/hosting-token.d.ts +46 -0
  322. package/dist/src/lib/hosting-token.js +60 -0
  323. package/dist/src/lib/hosting-token.js.map +1 -0
  324. package/dist/src/lib/hosting-trust-step.d.ts +67 -0
  325. package/dist/src/lib/hosting-trust-step.js +279 -0
  326. package/dist/src/lib/hosting-trust-step.js.map +1 -0
  327. package/dist/src/lib/hosting-trust.d.ts +77 -0
  328. package/dist/src/lib/hosting-trust.js +194 -0
  329. package/dist/src/lib/hosting-trust.js.map +1 -0
  330. package/dist/src/lib/hosting-wait.d.ts +42 -0
  331. package/dist/src/lib/hosting-wait.js +84 -0
  332. package/dist/src/lib/hosting-wait.js.map +1 -0
  333. package/dist/src/lib/hosting-wfp-upload.d.ts +86 -0
  334. package/dist/src/lib/hosting-wfp-upload.js +149 -0
  335. package/dist/src/lib/hosting-wfp-upload.js.map +1 -0
  336. package/dist/src/lib/init-assets.d.ts +2 -6
  337. package/dist/src/lib/init-assets.js +11 -27
  338. package/dist/src/lib/init-assets.js.map +1 -1
  339. package/dist/src/lib/init-ios-links.d.ts +11 -7
  340. package/dist/src/lib/init-ios-links.js +28 -22
  341. package/dist/src/lib/init-ios-links.js.map +1 -1
  342. package/dist/src/lib/init-login-note.d.ts +13 -0
  343. package/dist/src/lib/init-login-note.js +22 -0
  344. package/dist/src/lib/init-login-note.js.map +1 -0
  345. package/dist/src/lib/init-schema.d.ts +15 -0
  346. package/dist/src/lib/init-schema.js +54 -0
  347. package/dist/src/lib/init-schema.js.map +1 -1
  348. package/dist/src/lib/integration-test-request.d.ts +54 -0
  349. package/dist/src/lib/integration-test-request.js +207 -0
  350. package/dist/src/lib/integration-test-request.js.map +1 -0
  351. package/dist/src/lib/invoker-shared-enums.d.ts +35 -0
  352. package/dist/src/lib/invoker-shared-enums.js +98 -0
  353. package/dist/src/lib/invoker-shared-enums.js.map +1 -0
  354. package/dist/src/lib/json-value.d.ts +6 -0
  355. package/dist/src/lib/json-value.js +13 -0
  356. package/dist/src/lib/json-value.js.map +1 -0
  357. package/dist/src/lib/load-routes.d.ts +33 -0
  358. package/dist/src/lib/load-routes.js +35 -0
  359. package/dist/src/lib/load-routes.js.map +1 -0
  360. package/dist/src/lib/log-inspection.d.ts +23 -4
  361. package/dist/src/lib/log-inspection.js +14 -5
  362. package/dist/src/lib/log-inspection.js.map +1 -1
  363. package/dist/src/lib/login-exchange-check.d.ts +18 -0
  364. package/dist/src/lib/login-exchange-check.js +27 -0
  365. package/dist/src/lib/login-exchange-check.js.map +1 -0
  366. package/dist/src/lib/login-scope-lines.d.ts +17 -7
  367. package/dist/src/lib/login-scope-lines.js +33 -10
  368. package/dist/src/lib/login-scope-lines.js.map +1 -1
  369. package/dist/src/lib/metadata-report.d.ts +85 -0
  370. package/dist/src/lib/metadata-report.js +81 -0
  371. package/dist/src/lib/metadata-report.js.map +1 -0
  372. package/dist/src/lib/object-status-filter.d.ts +9 -1
  373. package/dist/src/lib/object-status-filter.js +9 -1
  374. package/dist/src/lib/object-status-filter.js.map +1 -1
  375. package/dist/src/lib/output.d.ts +1 -1
  376. package/dist/src/lib/output.js +3 -1
  377. package/dist/src/lib/output.js.map +1 -1
  378. package/dist/src/lib/pin-refusal-hint.d.ts +12 -0
  379. package/dist/src/lib/pin-refusal-hint.js +35 -0
  380. package/dist/src/lib/pin-refusal-hint.js.map +1 -0
  381. package/dist/src/lib/platform-owned.js +5 -0
  382. package/dist/src/lib/platform-owned.js.map +1 -1
  383. package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
  384. package/dist/src/lib/primitive-declaration-names.js +22 -0
  385. package/dist/src/lib/primitive-declaration-names.js.map +1 -0
  386. package/dist/src/lib/primitive-declaration.d.ts +174 -0
  387. package/dist/src/lib/primitive-declaration.js +871 -0
  388. package/dist/src/lib/primitive-declaration.js.map +1 -0
  389. package/dist/src/lib/primitive-env-plugin.d.ts +99 -0
  390. package/dist/src/lib/primitive-env-plugin.js +408 -0
  391. package/dist/src/lib/primitive-env-plugin.js.map +1 -0
  392. package/dist/src/lib/project-login-apps.d.ts +8 -0
  393. package/dist/src/lib/project-login-apps.js +27 -0
  394. package/dist/src/lib/project-login-apps.js.map +1 -0
  395. package/dist/src/lib/prompt-schema-codegen.d.ts +36 -12
  396. package/dist/src/lib/prompt-schema-codegen.js +96 -100
  397. package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
  398. package/dist/src/lib/prompt-schema-document.d.ts +35 -0
  399. package/dist/src/lib/prompt-schema-document.js +92 -0
  400. package/dist/src/lib/prompt-schema-document.js.map +1 -0
  401. package/dist/src/lib/prompt-schema-refs.d.ts +173 -0
  402. package/dist/src/lib/prompt-schema-refs.js +478 -0
  403. package/dist/src/lib/prompt-schema-refs.js.map +1 -0
  404. package/dist/src/lib/records-verbs.d.ts +79 -0
  405. package/dist/src/lib/records-verbs.js +45 -0
  406. package/dist/src/lib/records-verbs.js.map +1 -0
  407. package/dist/src/lib/refresh-admin-credentials.d.ts +34 -4
  408. package/dist/src/lib/refresh-admin-credentials.js +85 -29
  409. package/dist/src/lib/refresh-admin-credentials.js.map +1 -1
  410. package/dist/src/lib/refresh-stored-login.d.ts +85 -0
  411. package/dist/src/lib/refresh-stored-login.js +233 -0
  412. package/dist/src/lib/refresh-stored-login.js.map +1 -0
  413. package/dist/src/lib/register-commands.d.ts +36 -0
  414. package/dist/src/lib/register-commands.js +37 -0
  415. package/dist/src/lib/register-commands.js.map +1 -0
  416. package/dist/src/lib/retired-imports.d.ts +53 -0
  417. package/dist/src/lib/retired-imports.js +120 -0
  418. package/dist/src/lib/retired-imports.js.map +1 -0
  419. package/dist/src/lib/row-field-rename.d.ts +18 -0
  420. package/dist/src/lib/row-field-rename.js +32 -0
  421. package/dist/src/lib/row-field-rename.js.map +1 -0
  422. package/dist/src/lib/run-status.d.ts +1 -1
  423. package/dist/src/lib/run-status.generated.d.ts +2 -2
  424. package/dist/src/lib/run-status.generated.js +3 -1
  425. package/dist/src/lib/run-status.generated.js.map +1 -1
  426. package/dist/src/lib/run-status.js +1 -1
  427. package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
  428. package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
  429. package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
  430. package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
  431. package/dist/src/lib/schema-codegen/generated-db3-bridge.js +227 -0
  432. package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
  433. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
  434. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
  435. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
  436. package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +229 -0
  437. package/dist/src/lib/schema-codegen/generated-field-grammar.js +420 -0
  438. package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
  439. package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
  440. package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
  441. package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
  442. package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
  443. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
  444. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
  445. package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +258 -0
  446. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +422 -0
  447. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -0
  448. package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
  449. package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
  450. package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
  451. package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
  452. package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
  453. package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
  454. package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
  455. package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
  456. package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
  457. package/dist/src/lib/schema-codegen/generated-schema-shape.d.ts +27 -0
  458. package/dist/src/lib/schema-codegen/generated-schema-shape.js +126 -0
  459. package/dist/src/lib/schema-codegen/generated-schema-shape.js.map +1 -0
  460. package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
  461. package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
  462. package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
  463. package/dist/src/lib/schema-codegen/naming.d.ts +35 -0
  464. package/dist/src/lib/schema-codegen/naming.js +83 -0
  465. package/dist/src/lib/schema-codegen/naming.js.map +1 -0
  466. package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
  467. package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
  468. package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
  469. package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
  470. package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
  471. package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
  472. package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
  473. package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
  474. package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
  475. package/dist/src/lib/schema-codegen/schemaToTs.d.ts +109 -0
  476. package/dist/src/lib/schema-codegen/schemaToTs.js +269 -0
  477. package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -0
  478. package/dist/src/lib/schema-codegen/valuesLists.d.ts +48 -0
  479. package/dist/src/lib/schema-codegen/valuesLists.js +144 -0
  480. package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
  481. package/dist/src/lib/schema-defs-module.d.ts +29 -0
  482. package/dist/src/lib/schema-defs-module.js +103 -0
  483. package/dist/src/lib/schema-defs-module.js.map +1 -0
  484. package/dist/src/lib/schema-family-index.d.ts +228 -0
  485. package/dist/src/lib/schema-family-index.js +813 -0
  486. package/dist/src/lib/schema-family-index.js.map +1 -0
  487. package/dist/src/lib/schema-pins.d.ts +82 -0
  488. package/dist/src/lib/schema-pins.js +198 -0
  489. package/dist/src/lib/schema-pins.js.map +1 -0
  490. package/dist/src/lib/schema-preview.d.ts +244 -0
  491. package/dist/src/lib/schema-preview.js +498 -0
  492. package/dist/src/lib/schema-preview.js.map +1 -0
  493. package/dist/src/lib/scope-request.d.ts +23 -11
  494. package/dist/src/lib/scope-request.js +69 -31
  495. package/dist/src/lib/scope-request.js.map +1 -1
  496. package/dist/src/lib/session-scope.d.ts +26 -0
  497. package/dist/src/lib/session-scope.js +58 -0
  498. package/dist/src/lib/session-scope.js.map +1 -0
  499. package/dist/src/lib/skill-installer.d.ts +2 -2
  500. package/dist/src/lib/skill-installer.js +2 -21
  501. package/dist/src/lib/skill-installer.js.map +1 -1
  502. package/dist/src/lib/step-run-table.d.ts +1 -2
  503. package/dist/src/lib/step-run-table.js +1 -2
  504. package/dist/src/lib/step-run-table.js.map +1 -1
  505. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +2 -1
  506. package/dist/src/lib/swift-codegen/agentGenerator.js +25 -23
  507. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
  508. package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
  509. package/dist/src/lib/swift-codegen/banners.js +12 -0
  510. package/dist/src/lib/swift-codegen/banners.js.map +1 -1
  511. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
  512. package/dist/src/lib/swift-codegen/functionGenerator.js +169 -51
  513. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
  514. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +33 -9
  515. package/dist/src/lib/swift-codegen/schemaToSwift.js +215 -179
  516. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
  517. package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +51 -0
  518. package/dist/src/lib/swift-codegen/sharedGenerator.js +239 -0
  519. package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
  520. package/dist/src/lib/swift-codegen/swiftKeys.d.ts +19 -0
  521. package/dist/src/lib/swift-codegen/swiftKeys.js +31 -0
  522. package/dist/src/lib/swift-codegen/swiftKeys.js.map +1 -0
  523. package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
  524. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
  525. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
  526. package/dist/src/lib/sync-resource-types.d.ts +117 -31
  527. package/dist/src/lib/sync-resource-types.js +197 -189
  528. package/dist/src/lib/sync-resource-types.js.map +1 -1
  529. package/dist/src/lib/sync-selectors.d.ts +7 -0
  530. package/dist/src/lib/sync-selectors.js +22 -2
  531. package/dist/src/lib/sync-selectors.js.map +1 -1
  532. package/dist/src/lib/template.d.ts +39 -3
  533. package/dist/src/lib/template.js +103 -14
  534. package/dist/src/lib/template.js.map +1 -1
  535. package/dist/src/lib/test-case-file-names.d.ts +3 -5
  536. package/dist/src/lib/test-case-file-names.js +3 -5
  537. package/dist/src/lib/test-case-file-names.js.map +1 -1
  538. package/dist/src/lib/test-runs.d.ts +45 -0
  539. package/dist/src/lib/test-runs.js +150 -0
  540. package/dist/src/lib/test-runs.js.map +1 -0
  541. package/dist/src/lib/test-users.d.ts +25 -0
  542. package/dist/src/lib/test-users.js +36 -0
  543. package/dist/src/lib/test-users.js.map +1 -0
  544. package/dist/src/lib/toml-database-config.d.ts +4 -2
  545. package/dist/src/lib/toml-database-config.js +11 -6
  546. package/dist/src/lib/toml-database-config.js.map +1 -1
  547. package/dist/src/lib/toml-list-edit.d.ts +33 -0
  548. package/dist/src/lib/toml-list-edit.js +481 -0
  549. package/dist/src/lib/toml-list-edit.js.map +1 -0
  550. package/dist/src/lib/toml-scalar-edit.d.ts +9 -0
  551. package/dist/src/lib/toml-scalar-edit.js +73 -5
  552. package/dist/src/lib/toml-scalar-edit.js.map +1 -1
  553. package/dist/src/lib/transition-warnings.d.ts +21 -0
  554. package/dist/src/lib/transition-warnings.js +49 -0
  555. package/dist/src/lib/transition-warnings.js.map +1 -0
  556. package/dist/src/lib/usage-meters.d.ts +16 -0
  557. package/dist/src/lib/usage-meters.js +52 -0
  558. package/dist/src/lib/usage-meters.js.map +1 -0
  559. package/dist/src/lib/user-index.d.ts +80 -0
  560. package/dist/src/lib/user-index.js +166 -0
  561. package/dist/src/lib/user-index.js.map +1 -0
  562. package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
  563. package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
  564. package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
  565. package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
  566. package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
  567. package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
  568. package/dist/src/lib/user-walk.d.ts +31 -0
  569. package/dist/src/lib/user-walk.js +102 -0
  570. package/dist/src/lib/user-walk.js.map +1 -0
  571. package/dist/src/lib/webhook-capture.d.ts +43 -0
  572. package/dist/src/lib/webhook-capture.js +91 -0
  573. package/dist/src/lib/webhook-capture.js.map +1 -0
  574. package/dist/src/lib/webhook-deliver.d.ts +18 -20
  575. package/dist/src/lib/webhook-deliver.js +34 -89
  576. package/dist/src/lib/webhook-deliver.js.map +1 -1
  577. package/dist/src/lib/webhook-test-run.d.ts +32 -0
  578. package/dist/src/lib/webhook-test-run.js +108 -0
  579. package/dist/src/lib/webhook-test-run.js.map +1 -0
  580. package/dist/src/lib/worker-perf-format.d.ts +22 -0
  581. package/dist/src/lib/worker-perf-format.js +27 -0
  582. package/dist/src/lib/worker-perf-format.js.map +1 -0
  583. package/dist/src/types/index.d.ts +20 -65
  584. package/dist/src/validators.d.ts +7 -55
  585. package/dist/src/validators.js +7 -53
  586. package/dist/src/validators.js.map +1 -1
  587. package/dist/src/vite.d.ts +17 -0
  588. package/dist/src/vite.js +18 -0
  589. package/dist/src/vite.js.map +1 -0
  590. package/package.json +20 -9
@@ -16,18 +16,25 @@
16
16
  * (#2803's resurrection guard) — otherwise shipping a fix would silently put
17
17
  * an endpoint an operator had taken down back in service.
18
18
  */
19
- import { existsSync, readdirSync } from "fs";
19
+ import { existsSync, readdirSync, readFileSync } from "fs";
20
20
  import { join, relative as relativePath } from "path";
21
21
  import { ApiClient } from "../lib/api-client.js";
22
22
  import { resolveAppId } from "../lib/config.js";
23
23
  import { resolveSyncDir } from "../lib/sync-paths.js";
24
+ import { requireCurrentEnvironment } from "../lib/env-resolver.js";
25
+ import { AUTH_CASE_FILE_SUFFIX, authFixturesPathFor, readAuthFixtures, } from "../lib/auth-fixtures.js";
26
+ import { caseFilesInTree, caseSummary, checkRequestBody, exitCodeForCheck, judgeCase, parseAuthorizeCaseFile, parseRuntimeFlag, parseTriggerFlag, renderCaseTable, renderCheckLine, resolveAliases, } from "../lib/function-authorize-check.js";
24
27
  import { FunctionSchemaCodegenError, functionSchemaSources, } from "../lib/function-schema-codegen.js";
25
- import { functionTypeWiringProblems, staleFunctionTypeArtifacts, writeFunctionTypeArtifacts, } from "../lib/function-db-types.js";
28
+ import { USER_PROPERTIES_CLIENT_FILE, treeHasUserProperties, userPropertiesSource, } from "../lib/user-properties/user-properties-codegen.js";
29
+ import { USER_PROPERTIES_SWIFT_FILE } from "../lib/swift-codegen/userPropertiesGenerator.js";
30
+ import { SHARED_SWIFT_FILE, treeDeclaresSharedSwiftTypes } from "../lib/swift-codegen/sharedGenerator.js";
31
+ import { describeTreeTypes, primitiveDeclarationInputs, refuseTreeSchemasPushRefuses } from "../lib/primitive-declaration.js";
32
+ import { functionTypeWiringProblems, applyFunctionTypeArtifacts, functionTypeRemovalLine, staleFunctionTypeArtifacts, } from "../lib/function-db-types.js";
26
33
  import { AGENT_CLIENT_FILE_SUFFIX, promptSchemaSources, treeDeclaresAgentPrompt, } from "../lib/prompt-schema-codegen.js";
27
34
  import { generateFunctionSwiftTypes } from "../lib/swift-codegen/functionGenerator.js";
28
35
  import { AGENT_SWIFT_FILE_SUFFIX } from "../lib/swift-codegen/agentGenerator.js";
29
36
  import { SwiftCodegenError } from "../lib/swift-codegen/schemaToSwift.js";
30
- import { success, error, info, warn, keyValue, result as printResult, formatTable, formatDate, formatStatus, json, jsonLine, divider, } from "../lib/output.js";
37
+ import { success, error, info, warn, keyValue, result as printResult, formatTable, formatDate, formatDuration, formatStatus, json, jsonLine, divider, flushOutput, } from "../lib/output.js";
31
38
  import { confirmPrompt } from "../lib/confirm-prompt.js";
32
39
  import { FUNCTION_LOG_COLUMNS, functionLogCells, functionLogLine, } from "../lib/function-log-row.js";
33
40
  import { activatedLine, activationOutput, activationPrompt, activationRefusalLine, functionVersionRows, newerVersionLine, versionLine, } from "../lib/function-versions.js";
@@ -35,12 +42,15 @@ import { parseStatusFilter } from "../lib/object-status-filter.js";
35
42
  import { renderStepRunTable } from "../lib/step-run-table.js";
36
43
  import { triggerKindsCell, triggerTableRows, } from "../lib/function-trigger-listing.js";
37
44
  import { renderRunLogs } from "../lib/function-log-lines.js";
38
- import { buildWorkflowStepEnvelope } from "../lib/log-inspection.js";
45
+ import { buildIntegrationEnvelope, buildWorkflowStepEnvelope, formatIntegrationStepCell, } from "../lib/log-inspection.js";
39
46
  import { followLoop } from "../lib/watch.js";
40
47
  import { buildLogFollowSource } from "../lib/function-log-tail.js";
41
48
  import { toFunctionLogInspectionRow } from "../lib/log-inspection.js";
42
- import { decidePageContinuation, describeIdentity, exitCodeForInvokeStatus, exitCodeForRunStatus, invokeIdLines, logsFlagConflict, refusalLines, renderIdLines, resolveRunFlags, runRuntimeCell, runSliceCells, runtimeForExecutionMode, resumeCommand, startIdLines, userTokenName, waitDelayMs, withMintedToken, EXIT_INTERRUPTED, EXIT_TIMED_OUT, USER_TOKEN_TTL, WAIT_DEFAULT_TIMEOUT_SECONDS, } from "../lib/function-run.js";
49
+ import { decidePageContinuation, describeIdentity, exitCodeForInvokeStatus, exitCodeForRunStatus, invokeIdLines, logsFlagConflict, refusalLines, renderIdLines, resolveRunFlags, runRuntime, runRuntimeCell, runSliceCells, resumeCommand, startIdLines, userTokenName, waitDelayMs, withMintedToken, EXIT_INTERRUPTED, EXIT_TIMED_OUT, USER_TOKEN_TTL, WAIT_DEFAULT_TIMEOUT_SECONDS, } from "../lib/function-run.js";
43
50
  import { wholeListEnvelope } from "../lib/paginate.js";
51
+ import { authorizeSection, handlerInputRows, publicOptionsRows } from "../lib/function-authorize-view.js";
52
+ import { registerFunctionTriggersCommands } from "./function-trigger-commands.js";
53
+ import { commandStatus } from "../lib/command-status.js";
44
54
  /**
45
55
  * How far back one `--follow` tick will page to meet its high-water mark.
46
56
  *
@@ -86,6 +96,7 @@ Examples:
86
96
  $ primitive functions disable 01HXY... # out of service; pushes still land
87
97
  $ primitive functions archive 01HXY... # retire it (soft delete)
88
98
  `);
99
+ commandStatus(functions, { stability: "production" });
89
100
  // Configuration is authored in TOML and applied with `config push` (#2645):
90
101
  // this group carries no config-setting flags, and the code the function runs
91
102
  // is the TypeScript beside its file rather than anything a verb can send.
@@ -126,10 +137,8 @@ Configuration lives in functions/<key>.toml, and the code beside it:
126
137
  info("No functions found.");
127
138
  return;
128
139
  }
129
- // #3690 — which functions a webhook or a schedule reaches, in one call.
130
- // The standalone `webhooks list` and `cron-triggers list` hide the
131
- // rows a function owns (#3181), so without this the only way to find
132
- // an app's triggers was `functions get`, one function at a time.
140
+ // #3690 — which functions a webhook or a schedule reaches, in one call,
141
+ // rather than `functions get` one function at a time.
133
142
  console.log(formatTable(filtered.map((f) => ({
134
143
  ...f,
135
144
  triggersCell: triggerKindsCell(f.triggers),
@@ -241,6 +250,25 @@ Configuration lives in functions/<key>.toml, and the code beside it:
241
250
  printResult(" Config ID", active.configId);
242
251
  printResult(" Entry", active.entry);
243
252
  printResult(" Content Hash", active.contentHash || "-");
253
+ // #4717 — whether this version carries `authorize`, as the server's
254
+ // push probe recorded it. A legacy version runs the header's
255
+ // `access` rule above.
256
+ printResult(" Authorize", active.authorize === true ? "yes" : "no (legacy)");
257
+ // #5904 — the input list this version recorded at push, and that
258
+ // trigger doors hand the whole input; nothing for a legacy version
259
+ // or an answer without the field.
260
+ for (const [label, value] of handlerInputRows(active)) {
261
+ printResult(` ${label}`, value);
262
+ }
263
+ // #5844 — the `public` options this version stores; nothing for a
264
+ // version without them.
265
+ for (const [label, value] of publicOptionsRows(active)) {
266
+ printResult(` ${label}`, value);
267
+ }
268
+ // #4730 — what the push collected about it, from the manifest.
269
+ const section = authorizeSection(record.manifest && typeof record.manifest === "object" ? record.manifest : null, active.authorize === true);
270
+ for (const [label, value] of section ?? [])
271
+ printResult(` ${label}`, value);
244
272
  // #3482 — no Mode line. The config says nothing about how a
245
273
  // function runs: `invoke` runs it inside the request, `start` runs
246
274
  // it as a task, and every function takes both.
@@ -276,22 +304,21 @@ Configuration lives in functions/<key>.toml, and the code beside it:
276
304
  ? documentSchemaModels.join(", ")
277
305
  : "declares no models");
278
306
  }
279
- // #3181 — the ONE surface a function's triggers are visible on. The
280
- // hidden `AppWebhook` and `CronTrigger` rows are omitted from
281
- // `webhooks list`, `cron-triggers list` and `config pull` by design, so
282
- // without this an operator could not find the receiver URL a provider
283
- // must be pointed at, or the schedule the platform actually holds.
307
+ // #3181 — where an operator finds the receiver URL a provider must be
308
+ // pointed at, and the schedule the platform actually holds.
284
309
  divider();
285
310
  info("Triggers:");
286
311
  const triggers = record.triggers ?? { webhook: null, cron: [] };
287
312
  const cronEntries = Array.isArray(triggers.cron)
288
313
  ? triggers.cron
289
314
  : [];
315
+ // #4803 — the db3 types this function watches; absent when none.
316
+ const db3Entries = Array.isArray(triggers.db3) ? triggers.db3 : [];
290
317
  // #3483 — an OLDER server still answers a `databases` key, and this
291
318
  // command ignores it rather than branching on it: the trigger it
292
319
  // described was removed, so a section about it would tell an operator
293
320
  // that a write runs this function when nothing does.
294
- if (!triggers.webhook && cronEntries.length === 0) {
321
+ if (!triggers.webhook && cronEntries.length === 0 && db3Entries.length === 0) {
295
322
  printResult(" Triggers", "none — this function is invoked over HTTP only");
296
323
  }
297
324
  if (triggers.webhook) {
@@ -319,6 +346,21 @@ Configuration lives in functions/<key>.toml, and the code beside it:
319
346
  { header: "LAST RUN", key: "lastTriggeredRunId" },
320
347
  ]));
321
348
  }
349
+ if (db3Entries.length > 0) {
350
+ info("DB3 TRIGGERS (one run per flush of a db3 of the type):");
351
+ console.log(formatTable(db3Entries, [
352
+ { header: "TYPE", key: "type" },
353
+ { header: "ID", key: "triggerId" },
354
+ { header: "STATUS", key: "status", format: formatStatus },
355
+ {
356
+ header: "LAST FIRED",
357
+ key: "lastTriggeredAt",
358
+ format: (value) => (value ? formatDate(value) : "never"),
359
+ },
360
+ { header: "LAST RUN", key: "lastTriggeredRunId" },
361
+ { header: "LAST ERROR", key: "lastError" },
362
+ ]));
363
+ }
322
364
  // #3187 / #3279 — the ACTIVE version's manifest: what it registered
323
365
  // and what it TOUCHES, from the push-time collection. Documentation,
324
366
  // never authorization — function code acts as the system, and this
@@ -431,6 +473,9 @@ Configuration lives in functions/<key>.toml, and the code beside it:
431
473
  { header: "ENVELOPE", key: "envelope" },
432
474
  { header: "TRIGGERS", key: "triggers" },
433
475
  { header: "BY", key: "by" },
476
+ // #4717 — last, so every column a reader already parses keeps
477
+ // its place.
478
+ { header: "AUTHORIZE", key: "authorize" },
434
479
  ]));
435
480
  if (nextCursor) {
436
481
  info(`More versions: --cursor ${nextCursor}`);
@@ -499,9 +544,8 @@ What activating a version does, and does not:
499
544
  process.exit(1);
500
545
  }
501
546
  });
502
- // #3181 — a trigger-fired invocation writes a run row, and a function run has
503
- // no `workflowId`, so `primitive workflows runs` cannot see it. This verb is
504
- // the only way to inspect what a webhook or a schedule actually did
547
+ // #3181 — a trigger-fired invocation writes a run row, and this verb is the
548
+ // only way to inspect what a webhook or a schedule actually did
505
549
  // (principle 8).
506
550
  const runs = functions
507
551
  .command("runs")
@@ -526,7 +570,7 @@ What activating a version does, and does not:
526
570
  // empty string that sorts beside real ones.
527
571
  const withRuntime = (items ?? []).map((run) => ({
528
572
  ...run,
529
- runtime: runtimeForExecutionMode(run?.executionMode),
573
+ runtime: runRuntime(run),
530
574
  }));
531
575
  if (options.json) {
532
576
  json({ items: withRuntime, nextCursor });
@@ -545,8 +589,8 @@ What activating a version does, and does not:
545
589
  items.map((run) => ({
546
590
  ...run,
547
591
  // #3482 — which RUNTIME this run used, from the row's own
548
- // `executionMode`. One pure mapping, so the word an operator
549
- // reads here is the word `ctx.runtime` gave the code.
592
+ // `runtime` (#3190). One reader, so the word an operator reads
593
+ // here is the word `ctx.runtime` gave the code.
550
594
  runtime: runRuntimeCell(run),
551
595
  ...runSliceCells(run),
552
596
  })), [
@@ -640,6 +684,53 @@ What activating a version does, and does not:
640
684
  process.exit(1);
641
685
  }
642
686
  });
687
+ // #3190 — the integration calls one run made. The run → integration-logs
688
+ // pivot was `workflows/runs/{runId}/integration-logs` on the admin API and
689
+ // had no CLI verb; a function run is addressed by the function that owns it,
690
+ // as `runs steps` is.
691
+ runs
692
+ .command("integration-logs")
693
+ .description("List the integration calls a function run made")
694
+ .argument("<function-id>", "Function ID")
695
+ .argument("<run-id>", "Run ID")
696
+ .option("--app <app-id>", "App ID (uses current app if not specified)")
697
+ .option("--limit <n>", "Number of calls to show (at most 200)", "100")
698
+ .option("--json", "Output as JSON")
699
+ .action(async (functionId, runId, _options, command) => {
700
+ // See `runs steps` above: `runs` parses its own `--app`/`--json` out of
701
+ // the argv before dispatching here, so the merged view is the real one.
702
+ const options = command.optsWithGlobals();
703
+ const resolvedAppId = resolveAppId(undefined, options);
704
+ const client = new ApiClient();
705
+ try {
706
+ const { items } = await client.listFunctionRunIntegrationLogs(resolvedAppId, functionId, runId, { limit: parseInt(options.limit, 10) });
707
+ if (options.json) {
708
+ json(buildIntegrationEnvelope(items));
709
+ return;
710
+ }
711
+ if (!items || items.length === 0) {
712
+ info("No integration calls found for this run.");
713
+ return;
714
+ }
715
+ const rows = items.map((log) => ({
716
+ ...log,
717
+ stepCell: formatIntegrationStepCell(log),
718
+ }));
719
+ console.log(formatTable(rows, [
720
+ { header: "TIME", key: "timestamp", format: formatDate },
721
+ { header: "INTEGRATION", key: "integrationKey", format: (v) => v || "" },
722
+ { header: "METHOD", key: "method" },
723
+ { header: "PATH", key: "path" },
724
+ { header: "STATUS", key: "status" },
725
+ { header: "DURATION", key: "durationMs", format: formatDuration },
726
+ { header: "STEP", key: "stepCell" },
727
+ ]));
728
+ }
729
+ catch (err) {
730
+ error(err.message);
731
+ process.exit(1);
732
+ }
733
+ });
643
734
  // #3348 — end a run that will not settle.
644
735
  //
645
736
  // `client.functions.terminate` has existed in the SDK since #3186 and nothing
@@ -707,8 +798,8 @@ What activating a version does, and does not:
707
798
  .option("--cursor <cursor>", "Continue from a previous page")
708
799
  .option("--follow", "Append new invocations as they are recorded (tail)")
709
800
  .option("--interval <seconds>", "Poll interval for --follow (default 2)")
710
- .option("--run <run-id>", "Only this run's records (#3448)")
711
- .option("--invocation <invocation-id>", "One record, by the id an invoke answered with (#3448)")
801
+ .option("--run <run-id>", "Only this run's records")
802
+ .option("--invocation <invocation-id>", "One record, by the id an invoke answered with")
712
803
  .option("--json", "Output as JSON")
713
804
  .action(async (functionId, options) => {
714
805
  const resolvedAppId = resolveAppId(undefined, options);
@@ -933,15 +1024,39 @@ What activating a version does, and does not:
933
1024
  error(`Config directory not found: ${configDir}`);
934
1025
  process.exit(1);
935
1026
  }
1027
+ // #5894 — a schema `config push` refuses, in a function, prompt or
1028
+ // `schemas/` file, is refused here with push's message before anything
1029
+ // decides there is nothing to generate: a tree with no `functions/`
1030
+ // directory must not pass `--check` over a file push refuses.
1031
+ try {
1032
+ refuseTreeSchemasPushRefuses(configDir);
1033
+ }
1034
+ catch (err) {
1035
+ if (!(err instanceof FunctionSchemaCodegenError))
1036
+ throw err;
1037
+ if (options.json) {
1038
+ json(options.check || lang === "swift"
1039
+ ? { ok: false, stale: [], problems: [err.message] }
1040
+ : { written: [], removed: [], problems: [err.message] });
1041
+ }
1042
+ else
1043
+ error(err.message);
1044
+ process.exit(1);
1045
+ }
936
1046
  if (!existsSync(join(configDir, "functions")) &&
937
1047
  !treeDeclaresAgentPrompt(configDir) &&
1048
+ !treeHasUserProperties(configDir) &&
1049
+ !(lang === "swift" && treeHasSharedSwiftTypes(configDir)) &&
938
1050
  !holdsAgentArtifacts(options.out ? String(options.out) : join(configDir, "functions", "generated"))) {
939
1051
  // Nothing to type: the artifacts exist to serve function sources, and
940
1052
  // a tree with none needs no compiler wiring. Not a failure — a tree
941
1053
  // may legitimately have no functions. #3798 (DSO-3798-005) — unless
942
1054
  // it declares an agent, whose client-side types are generated with or
943
1055
  // without functions, or (CSO-3798-003) a removed agent's artifacts are
944
- // still there to sweep and for `--check` to report.
1056
+ // still there to sweep and for `--check` to report. #5385 — the same
1057
+ // for user-properties.toml, whose client types an app needs with or
1058
+ // without functions. #5544 — and, in Swift, for the shared file's
1059
+ // defs and prompt output types.
945
1060
  if (options.json)
946
1061
  json({ ok: true, stale: [], problems: [] });
947
1062
  else
@@ -964,11 +1079,17 @@ What activating a version does, and does not:
964
1079
  const relative = (filePath) => relativePath(configDir, filePath);
965
1080
  let outcome;
966
1081
  try {
1082
+ // #5385 — the user property structs, when the tree declares them.
1083
+ const userProperties = userPropertiesSource(configDir);
967
1084
  outcome = await generateFunctionSwiftTypes({
968
1085
  inputs: functionSchemaSources(configDir),
969
1086
  // #3798 — each agent prompt's Swift types, in the same run.
970
1087
  agentInputs: promptSchemaSources(configDir),
1088
+ userProperties: userProperties?.schema ?? null,
1089
+ ...(userProperties ? { userPropertiesText: userProperties.text } : {}),
971
1090
  outputDir,
1091
+ // #5544 — the tree whose schemas/ files and db3 types the shared file declares.
1092
+ configDir,
972
1093
  check: Boolean(options.check),
973
1094
  });
974
1095
  }
@@ -1075,18 +1196,39 @@ What activating a version does, and does not:
1075
1196
  }
1076
1197
  process.exit(1);
1077
1198
  }
1078
- const written = writeFunctionTypeArtifacts(configDir, undefined, artifactOptions);
1199
+ let written;
1200
+ let removed;
1201
+ try {
1202
+ ({ written, removed } = applyFunctionTypeArtifacts(configDir, undefined, artifactOptions));
1203
+ }
1204
+ catch (err) {
1205
+ // A schema push refuses (#5894) or one that cannot be typed: nothing
1206
+ // is written, and the message is push's own, naming the file.
1207
+ if (!(err instanceof FunctionSchemaCodegenError))
1208
+ throw err;
1209
+ if (options.json)
1210
+ json({ written: [], removed: [], problems: [err.message] });
1211
+ else
1212
+ error(err.message);
1213
+ process.exit(1);
1214
+ }
1079
1215
  if (options.json) {
1080
- json({ written, problems });
1216
+ json({ written, removed, problems });
1081
1217
  return;
1082
1218
  }
1083
1219
  success(`Wrote ${written.length} file(s) into ${configDir}/functions/.`);
1084
1220
  for (const relative of written)
1085
1221
  keyValue(" wrote", relative);
1222
+ // #5208 — what the write removed, each with its own line. No drop
1223
+ // warning here: codegen has no view of what the server runs.
1224
+ for (const relative of removed)
1225
+ warn(functionTypeRemovalLine(relative));
1086
1226
  for (const problem of problems) {
1087
1227
  warn(`functions/tsconfig.json: ${problem}`);
1088
1228
  }
1089
1229
  });
1230
+ // #3190 — the operational verbs of a function's webhook and cron triggers.
1231
+ registerFunctionTriggersCommands(functions);
1090
1232
  // #2803 — the operational verb pair, and the only writers of `status` besides
1091
1233
  // the delete flow. `config push` is deliberately not one: see the module note.
1092
1234
  functions
@@ -1393,10 +1535,6 @@ Reclaiming the key means hard-deleting the row:
1393
1535
  }
1394
1536
  const body = {
1395
1537
  rootInput: flags.input,
1396
- // #3482 — `--as system` is the ONE door that is a single route for
1397
- // both runtimes, so it keeps the deprecated body selector; every
1398
- // other call says it with the route.
1399
- ...(identity.asSystem ? { mode: "task" } : {}),
1400
1538
  ...(contextDocId ? { contextDocId } : {}),
1401
1539
  ...(options.runKey ? { runKey: options.runKey } : {}),
1402
1540
  };
@@ -1461,6 +1599,200 @@ Reclaiming the key means hard-deleting the row:
1461
1599
  process.exit(1);
1462
1600
  }
1463
1601
  });
1602
+ // ── authorize (#4732) ───────────────────────────────────────────────
1603
+ //
1604
+ // Runs a function's `authorize` alone, through the admin endpoint, so a
1605
+ // gate can be checked without running the handler. The app, the fixture
1606
+ // map and the case files all come from the one environment `--env`
1607
+ // resolves, so the verb takes no `--app` (#3154's one-tree rule).
1608
+ functions
1609
+ .command("authorize")
1610
+ .allowExcessArguments(false)
1611
+ .description("Run only a function's authorize for a user, door, runtime and input, and print the decision; --cases runs its case file")
1612
+ .argument("[key]", "Function key (as written in functions/<key>.toml)")
1613
+ .option("--user <id>", "auth.user: an app user id or an @fixture alias (default: no user)")
1614
+ .option("--role <role>", "Replace auth.user's role for the check; memberships stay the user's")
1615
+ .option("--trigger <door>", "http (default), webhook, cron, manual, context, history, db3, users-batch, function:<key>, tool[:<name>]")
1616
+ .option("--runtime <runtime>", "request or task (default: the door's own)")
1617
+ .option("--input <json>", "The input, as JSON; @fixture aliases resolve inside it (default {})")
1618
+ .option("--cases", "Run the function's case file, functions/<key>.auth.json")
1619
+ .option("--all", "With --cases, run every case file in the tree")
1620
+ .option("--json", "Output as JSON")
1621
+ .action(async (functionKey, options) => {
1622
+ const refuse = (message) => {
1623
+ error(message);
1624
+ process.exit(2);
1625
+ };
1626
+ const singleFlags = ["user", "role", "trigger", "runtime", "input"].filter((flag) => options[flag] !== undefined);
1627
+ if (options.all && !options.cases)
1628
+ refuse("--all runs every case file: use it with --cases");
1629
+ if (options.cases && singleFlags.length > 0) {
1630
+ refuse(`--cases runs each case as its file states it: drop ${singleFlags.map((f) => `--${f}`).join(", ")}`);
1631
+ }
1632
+ if (options.all && functionKey)
1633
+ refuse("--cases --all runs every case file: name no function with it");
1634
+ if (!functionKey && !options.all) {
1635
+ refuse(options.cases ? "Name the function whose case file to run, or use --all" : "Name the function to check");
1636
+ }
1637
+ let env;
1638
+ let configDir;
1639
+ try {
1640
+ env = requireCurrentEnvironment();
1641
+ configDir = resolveSyncDir();
1642
+ }
1643
+ catch (err) {
1644
+ return refuse(err.message);
1645
+ }
1646
+ const appId = env.config.appId;
1647
+ const fixturesPath = authFixturesPathFor(env);
1648
+ const fixturesLabel = relativePath(env.projectRoot, fixturesPath);
1649
+ const fixtures = readAuthFixtures(fixturesPath);
1650
+ if (fixtures.ok === false)
1651
+ return refuse(fixtures.error.replace(fixturesPath, fixturesLabel));
1652
+ /** A case's or the flags' user and input, with the aliases resolved. */
1653
+ const resolveSubject = (user, input) => {
1654
+ const resolvedUser = resolveAliases(user, fixtures.fixtures, fixturesLabel, "user");
1655
+ if (resolvedUser.ok === false)
1656
+ return resolvedUser;
1657
+ if (resolvedUser.value !== null && typeof resolvedUser.value !== "string") {
1658
+ return { ok: false, error: `user ${user} must resolve to a user id or null in ${fixturesLabel}` };
1659
+ }
1660
+ const resolvedInput = resolveAliases(input, fixtures.fixtures, fixturesLabel, "$");
1661
+ if (resolvedInput.ok === false)
1662
+ return resolvedInput;
1663
+ return { ok: true, user: resolvedUser.value, input: resolvedInput.value };
1664
+ };
1665
+ const client = new ApiClient();
1666
+ if (!options.cases) {
1667
+ const trigger = parseTriggerFlag(options.trigger ?? "http");
1668
+ if (trigger.ok === false)
1669
+ return refuse(trigger.error);
1670
+ let runtime = null;
1671
+ if (options.runtime !== undefined) {
1672
+ const parsed = parseRuntimeFlag(options.runtime);
1673
+ if (parsed.ok === false)
1674
+ return refuse(parsed.error);
1675
+ runtime = parsed.runtime;
1676
+ }
1677
+ let input = {};
1678
+ if (options.input !== undefined) {
1679
+ try {
1680
+ input = JSON.parse(options.input);
1681
+ }
1682
+ catch {
1683
+ return refuse(`--input is not valid JSON: ${options.input}`);
1684
+ }
1685
+ }
1686
+ const subject = resolveSubject(options.user ?? null, input);
1687
+ if (subject.ok === false)
1688
+ return refuse(subject.error);
1689
+ let outcome;
1690
+ try {
1691
+ const target = await resolveFunctionByKey(client, appId, functionKey);
1692
+ outcome = await client.authorizeFunction(appId, target.functionId, checkRequestBody({
1693
+ user: subject.user,
1694
+ role: options.role ?? null,
1695
+ trigger: trigger.trigger,
1696
+ runtime,
1697
+ input: subject.input,
1698
+ }));
1699
+ }
1700
+ catch (err) {
1701
+ return refuse(err.message);
1702
+ }
1703
+ const exitCode = exitCodeForCheck(outcome);
1704
+ if (options.json) {
1705
+ json({
1706
+ ...(outcome.httpStatus >= 400 ? { httpStatus: outcome.httpStatus } : {}),
1707
+ ...(outcome.body ?? {}),
1708
+ functionKey,
1709
+ exitCode,
1710
+ });
1711
+ await flushOutput();
1712
+ process.exit(exitCode);
1713
+ }
1714
+ if (outcome.httpStatus >= 400) {
1715
+ const body = outcome.body ?? {};
1716
+ error(`${body.error ?? "The check was refused"}` +
1717
+ `${body.code ? ` (${body.code}${body.reason ? `, ${body.reason}` : ""})` : ""}`);
1718
+ await flushOutput();
1719
+ process.exit(exitCode);
1720
+ }
1721
+ console.log(renderCheckLine(outcome.body));
1722
+ await flushOutput();
1723
+ process.exit(exitCode);
1724
+ }
1725
+ // ── cases ──
1726
+ const functionsDir = join(configDir, "functions");
1727
+ const keys = options.all ? caseFilesInTree(functionsDir) : [functionKey];
1728
+ if (keys.length === 0) {
1729
+ if (options.json)
1730
+ json({ items: [], passed: 0, failed: 0 });
1731
+ else
1732
+ console.log("No case files");
1733
+ await flushOutput();
1734
+ process.exit(0);
1735
+ }
1736
+ let listed;
1737
+ try {
1738
+ listed = (await client.listFunctions(appId)).items ?? [];
1739
+ }
1740
+ catch (err) {
1741
+ return refuse(err.message);
1742
+ }
1743
+ const rows = [];
1744
+ for (const key of keys) {
1745
+ const filePath = join(functionsDir, `${key}${AUTH_CASE_FILE_SUFFIX}`);
1746
+ const fileLabel = relativePath(env.projectRoot, filePath);
1747
+ if (!existsSync(filePath))
1748
+ refuse(`No case file ${fileLabel}`);
1749
+ const parsed = parseAuthorizeCaseFile(readFileSync(filePath, "utf-8"), fileLabel);
1750
+ if (parsed.ok === false) {
1751
+ if (!options.all)
1752
+ refuse(parsed.error);
1753
+ rows.push({ ...judgeCase(key, { name: "(case file)", expect: "-", code: null }, { error: parsed.error }) });
1754
+ continue;
1755
+ }
1756
+ const match = listed.find((item) => String(item.functionKey ?? "").toLowerCase() === key.toLowerCase());
1757
+ for (const testCase of parsed.cases) {
1758
+ if (!match) {
1759
+ rows.push(judgeCase(key, testCase, { error: `no function '${key}' in this app` }));
1760
+ continue;
1761
+ }
1762
+ const subject = resolveSubject(testCase.user, testCase.input);
1763
+ if (subject.ok === false) {
1764
+ rows.push(judgeCase(key, testCase, { error: `case "${testCase.name}": ${subject.error}` }));
1765
+ continue;
1766
+ }
1767
+ const trigger = parseTriggerFlag(testCase.trigger);
1768
+ let outcome;
1769
+ try {
1770
+ outcome = await client.authorizeFunction(appId, String(match.functionId), checkRequestBody({
1771
+ user: subject.user,
1772
+ role: testCase.role,
1773
+ trigger: trigger.ok ? trigger.trigger : { kind: "http" },
1774
+ runtime: testCase.runtime,
1775
+ input: subject.input,
1776
+ }));
1777
+ }
1778
+ catch (err) {
1779
+ outcome = { error: err.message };
1780
+ }
1781
+ rows.push(judgeCase(key, testCase, outcome));
1782
+ }
1783
+ }
1784
+ const summary = caseSummary(rows);
1785
+ if (options.json) {
1786
+ json({ items: rows, passed: summary.passed, failed: summary.failed });
1787
+ }
1788
+ else {
1789
+ console.log(renderCaseTable(rows, { withFunction: !!options.all }));
1790
+ console.log(summary.line);
1791
+ }
1792
+ // A report past the pipe buffer is cut off by an exit that does not wait.
1793
+ await flushOutput();
1794
+ process.exit(summary.failed > 0 ? 1 : 0);
1795
+ });
1464
1796
  runs
1465
1797
  .command("wait")
1466
1798
  .allowExcessArguments(false)
@@ -1510,13 +1842,32 @@ Reclaiming the key means hard-deleting the row:
1510
1842
  * Whether a directory still holds an agent's generated artifact (either
1511
1843
  * language) — #3798, CSO-3798-003: a tree whose last agent was removed has
1512
1844
  * nothing left to generate, and those files still need sweeping (and
1513
- * reporting under `--check`).
1845
+ * reporting under `--check`). #5385 — likewise the user property types once
1846
+ * user-properties.toml is gone.
1847
+ */
1848
+ /**
1849
+ * #5544 — whether a Swift run has shared types to declare (a `schemas/` def,
1850
+ * a prompt output type) though the tree has no function; a tree that cannot be
1851
+ * described is left to the commands that push it.
1514
1852
  */
1853
+ function treeHasSharedSwiftTypes(configDir) {
1854
+ try {
1855
+ return treeDeclaresSharedSwiftTypes(describeTreeTypes(primitiveDeclarationInputs(configDir), "swift"));
1856
+ }
1857
+ catch {
1858
+ return false;
1859
+ }
1860
+ }
1515
1861
  function holdsAgentArtifacts(dir) {
1516
1862
  if (!existsSync(dir))
1517
1863
  return false;
1518
1864
  try {
1519
- return readdirSync(dir).some((file) => file.endsWith(AGENT_CLIENT_FILE_SUFFIX) || file.endsWith(AGENT_SWIFT_FILE_SUFFIX));
1865
+ return readdirSync(dir).some((file) => file.endsWith(AGENT_CLIENT_FILE_SUFFIX) ||
1866
+ file.endsWith(AGENT_SWIFT_FILE_SUFFIX) ||
1867
+ file === USER_PROPERTIES_CLIENT_FILE ||
1868
+ file === USER_PROPERTIES_SWIFT_FILE ||
1869
+ // #5544 — the shared Swift types, swept once nothing writes them.
1870
+ file === SHARED_SWIFT_FILE);
1520
1871
  }
1521
1872
  catch {
1522
1873
  return false;