primitive-admin 1.1.0-alpha.9 → 1.1.0

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 (591) hide show
  1. package/README.md +523 -109
  2. package/assets/skill/skills/primitive-platform/SKILL.md +289 -0
  3. package/dist/bin/primitive.d.ts +2 -0
  4. package/dist/bin/primitive.js +372 -21
  5. package/dist/bin/primitive.js.map +1 -1
  6. package/dist/src/commands/admins.d.ts +2 -0
  7. package/dist/src/commands/admins.js +136 -30
  8. package/dist/src/commands/admins.js.map +1 -1
  9. package/dist/src/commands/analytics.d.ts +2 -0
  10. package/dist/src/commands/analytics.js +713 -55
  11. package/dist/src/commands/analytics.js.map +1 -1
  12. package/dist/src/commands/apps.d.ts +2 -0
  13. package/dist/src/commands/apps.js +65 -100
  14. package/dist/src/commands/apps.js.map +1 -1
  15. package/dist/src/commands/auth-sessions.d.ts +7 -0
  16. package/dist/src/commands/auth-sessions.js +144 -0
  17. package/dist/src/commands/auth-sessions.js.map +1 -0
  18. package/dist/src/commands/auth.d.ts +2 -0
  19. package/dist/src/commands/auth.js +238 -108
  20. package/dist/src/commands/auth.js.map +1 -1
  21. package/dist/src/commands/blob-buckets.d.ts +2 -0
  22. package/dist/src/commands/blob-buckets.js +331 -0
  23. package/dist/src/commands/blob-buckets.js.map +1 -0
  24. package/dist/src/commands/catalog.d.ts +2 -0
  25. package/dist/src/commands/catalog.js +63 -48
  26. package/dist/src/commands/catalog.js.map +1 -1
  27. package/dist/src/commands/collection-type-configs.d.ts +2 -0
  28. package/dist/src/commands/collection-type-configs.js +85 -0
  29. package/dist/src/commands/collection-type-configs.js.map +1 -0
  30. package/dist/src/commands/collections.d.ts +2 -0
  31. package/dist/src/commands/collections.js +1282 -0
  32. package/dist/src/commands/collections.js.map +1 -0
  33. package/dist/src/commands/comparisons.d.ts +2 -0
  34. package/dist/src/commands/comparisons.js +6 -6
  35. package/dist/src/commands/comparisons.js.map +1 -1
  36. package/dist/src/commands/config.d.ts +46 -0
  37. package/dist/src/commands/config.js +465 -0
  38. package/dist/src/commands/config.js.map +1 -0
  39. package/dist/src/commands/connections.d.ts +2 -0
  40. package/dist/src/commands/connections.js +99 -0
  41. package/dist/src/commands/connections.js.map +1 -0
  42. package/dist/src/commands/cron-triggers.d.ts +2 -0
  43. package/dist/src/commands/cron-triggers.js +266 -0
  44. package/dist/src/commands/cron-triggers.js.map +1 -0
  45. package/dist/src/commands/database-type-configs.d.ts +2 -0
  46. package/dist/src/commands/database-type-configs.js +164 -0
  47. package/dist/src/commands/database-type-configs.js.map +1 -0
  48. package/dist/src/commands/database-types.d.ts +2 -0
  49. package/dist/src/commands/database-types.js +471 -0
  50. package/dist/src/commands/database-types.js.map +1 -0
  51. package/dist/src/commands/databases.d.ts +65 -0
  52. package/dist/src/commands/databases.js +1887 -243
  53. package/dist/src/commands/databases.js.map +1 -1
  54. package/dist/src/commands/documents.d.ts +60 -0
  55. package/dist/src/commands/documents.js +2888 -22
  56. package/dist/src/commands/documents.js.map +1 -1
  57. package/dist/src/commands/email-templates.d.ts +2 -0
  58. package/dist/src/commands/email-templates.js +175 -0
  59. package/dist/src/commands/email-templates.js.map +1 -0
  60. package/dist/src/commands/env.d.ts +23 -0
  61. package/dist/src/commands/env.js +395 -0
  62. package/dist/src/commands/env.js.map +1 -0
  63. package/dist/src/commands/feature-flags.d.ts +14 -0
  64. package/dist/src/commands/feature-flags.js +117 -0
  65. package/dist/src/commands/feature-flags.js.map +1 -0
  66. package/dist/src/commands/functions.d.ts +20 -0
  67. package/dist/src/commands/functions.js +1630 -0
  68. package/dist/src/commands/functions.js.map +1 -0
  69. package/dist/src/commands/group-type-configs.d.ts +2 -0
  70. package/dist/src/commands/group-type-configs.js +87 -0
  71. package/dist/src/commands/group-type-configs.js.map +1 -0
  72. package/dist/src/commands/groups.d.ts +2 -0
  73. package/dist/src/commands/groups.js +65 -113
  74. package/dist/src/commands/groups.js.map +1 -1
  75. package/dist/src/commands/guides.d.ts +223 -0
  76. package/dist/src/commands/guides.js +627 -69
  77. package/dist/src/commands/guides.js.map +1 -1
  78. package/dist/src/commands/init.d.ts +37 -0
  79. package/dist/src/commands/init.js +1693 -208
  80. package/dist/src/commands/init.js.map +1 -1
  81. package/dist/src/commands/integrations.d.ts +2 -0
  82. package/dist/src/commands/integrations.js +428 -187
  83. package/dist/src/commands/integrations.js.map +1 -1
  84. package/dist/src/commands/llm.d.ts +2 -0
  85. package/dist/src/commands/llm.js +4 -2
  86. package/dist/src/commands/llm.js.map +1 -1
  87. package/dist/src/commands/locks.d.ts +8 -0
  88. package/dist/src/commands/locks.js +175 -0
  89. package/dist/src/commands/locks.js.map +1 -0
  90. package/dist/src/commands/metadata-category-configs.d.ts +12 -0
  91. package/dist/src/commands/metadata-category-configs.js +113 -0
  92. package/dist/src/commands/metadata-category-configs.js.map +1 -0
  93. package/dist/src/commands/metadata.d.ts +2 -0
  94. package/dist/src/commands/metadata.js +288 -0
  95. package/dist/src/commands/metadata.js.map +1 -0
  96. package/dist/src/commands/prompts.d.ts +2 -0
  97. package/dist/src/commands/prompts.js +322 -634
  98. package/dist/src/commands/prompts.js.map +1 -1
  99. package/dist/src/commands/rule-sets.d.ts +3 -0
  100. package/dist/src/commands/rule-sets.js +139 -148
  101. package/dist/src/commands/rule-sets.js.map +1 -1
  102. package/dist/src/commands/scripts.d.ts +30 -0
  103. package/dist/src/commands/scripts.js +688 -0
  104. package/dist/src/commands/scripts.js.map +1 -0
  105. package/dist/src/commands/secrets.d.ts +2 -0
  106. package/dist/src/commands/secrets.js +109 -0
  107. package/dist/src/commands/secrets.js.map +1 -0
  108. package/dist/src/commands/sessions.d.ts +2 -0
  109. package/dist/src/commands/sessions.js +76 -0
  110. package/dist/src/commands/sessions.js.map +1 -0
  111. package/dist/src/commands/skill.d.ts +2 -0
  112. package/dist/src/commands/skill.js +29 -0
  113. package/dist/src/commands/skill.js.map +1 -0
  114. package/dist/src/commands/sync-app-settings.d.ts +158 -0
  115. package/dist/src/commands/sync-app-settings.js +328 -0
  116. package/dist/src/commands/sync-app-settings.js.map +1 -0
  117. package/dist/src/commands/sync.d.ts +2670 -0
  118. package/dist/src/commands/sync.js +17144 -834
  119. package/dist/src/commands/sync.js.map +1 -1
  120. package/dist/src/commands/tokens.d.ts +2 -0
  121. package/dist/src/commands/tokens.js +132 -22
  122. package/dist/src/commands/tokens.js.map +1 -1
  123. package/dist/src/commands/users.d.ts +2 -0
  124. package/dist/src/commands/users.js +542 -24
  125. package/dist/src/commands/users.js.map +1 -1
  126. package/dist/src/commands/vars.d.ts +8 -0
  127. package/dist/src/commands/vars.js +97 -0
  128. package/dist/src/commands/vars.js.map +1 -0
  129. package/dist/src/commands/waitlist.d.ts +2 -0
  130. package/dist/src/commands/waitlist.js +12 -11
  131. package/dist/src/commands/waitlist.js.map +1 -1
  132. package/dist/src/commands/webhooks.d.ts +31 -0
  133. package/dist/src/commands/webhooks.js +633 -0
  134. package/dist/src/commands/webhooks.js.map +1 -0
  135. package/dist/src/commands/workflows.d.ts +88 -0
  136. package/dist/src/commands/workflows.js +1568 -742
  137. package/dist/src/commands/workflows.js.map +1 -1
  138. package/dist/src/lib/access-rule-display.d.ts +21 -0
  139. package/dist/src/lib/access-rule-display.js +34 -0
  140. package/dist/src/lib/access-rule-display.js.map +1 -0
  141. package/dist/src/lib/api-client.d.ts +2550 -0
  142. package/dist/src/lib/api-client.js +2503 -160
  143. package/dist/src/lib/api-client.js.map +1 -1
  144. package/dist/src/lib/app-settings-descriptor.d.ts +263 -0
  145. package/dist/src/lib/app-settings-descriptor.js +583 -0
  146. package/dist/src/lib/app-settings-descriptor.js.map +1 -0
  147. package/dist/src/lib/auth-flow.d.ts +8 -0
  148. package/dist/src/lib/batch.d.ts +26 -0
  149. package/dist/src/lib/batch.js +32 -0
  150. package/dist/src/lib/batch.js.map +1 -0
  151. package/dist/src/lib/block-layout.d.ts +160 -0
  152. package/dist/src/lib/block-layout.js +451 -0
  153. package/dist/src/lib/block-layout.js.map +1 -0
  154. package/dist/src/lib/block-selector.d.ts +58 -0
  155. package/dist/src/lib/block-selector.js +92 -0
  156. package/dist/src/lib/block-selector.js.map +1 -0
  157. package/dist/src/lib/canonical-json.d.ts +12 -0
  158. package/dist/src/lib/canonical-json.js +35 -0
  159. package/dist/src/lib/canonical-json.js.map +1 -0
  160. package/dist/src/lib/channel.d.ts +30 -0
  161. package/dist/src/lib/channel.js +68 -0
  162. package/dist/src/lib/channel.js.map +1 -0
  163. package/dist/src/lib/cli-manifest.d.ts +68 -0
  164. package/dist/src/lib/cli-manifest.js +71 -0
  165. package/dist/src/lib/cli-manifest.js.map +1 -0
  166. package/dist/src/lib/codegen-shared/generatedFiles.d.ts +101 -0
  167. package/dist/src/lib/codegen-shared/generatedFiles.js +191 -0
  168. package/dist/src/lib/codegen-shared/generatedFiles.js.map +1 -0
  169. package/dist/src/lib/codegen-shared/prettierStable.d.ts +262 -0
  170. package/dist/src/lib/codegen-shared/prettierStable.js +610 -0
  171. package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -0
  172. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +38 -0
  173. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +46 -0
  174. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js.map +1 -0
  175. package/dist/src/lib/collection-export.d.ts +184 -0
  176. package/dist/src/lib/collection-export.js +252 -0
  177. package/dist/src/lib/collection-export.js.map +1 -0
  178. package/dist/src/lib/config-json-field.d.ts +28 -0
  179. package/dist/src/lib/config-json-field.js +56 -0
  180. package/dist/src/lib/config-json-field.js.map +1 -0
  181. package/dist/src/lib/config-object-descriptor.d.ts +127 -0
  182. package/dist/src/lib/config-object-descriptor.js +740 -0
  183. package/dist/src/lib/config-object-descriptor.js.map +1 -0
  184. package/dist/src/lib/config-payload.d.ts +92 -0
  185. package/dist/src/lib/config-payload.js +161 -0
  186. package/dist/src/lib/config-payload.js.map +1 -0
  187. package/dist/src/lib/config-surface.d.ts +141 -0
  188. package/dist/src/lib/config-surface.js +368 -0
  189. package/dist/src/lib/config-surface.js.map +1 -0
  190. package/dist/src/lib/config-toml.d.ts +10 -0
  191. package/dist/src/lib/config-toml.js +42 -0
  192. package/dist/src/lib/config-toml.js.map +1 -0
  193. package/dist/src/lib/config.d.ts +71 -0
  194. package/dist/src/lib/config.js +71 -68
  195. package/dist/src/lib/config.js.map +1 -1
  196. package/dist/src/lib/confirm-prompt.d.ts +83 -0
  197. package/dist/src/lib/confirm-prompt.js +110 -0
  198. package/dist/src/lib/confirm-prompt.js.map +1 -0
  199. package/dist/src/lib/constants.d.ts +11 -0
  200. package/dist/src/lib/constants.js +12 -0
  201. package/dist/src/lib/constants.js.map +1 -0
  202. package/dist/src/lib/crash-handlers.d.ts +20 -0
  203. package/dist/src/lib/crash-handlers.js +49 -0
  204. package/dist/src/lib/crash-handlers.js.map +1 -0
  205. package/dist/src/lib/credentials-store.d.ts +104 -0
  206. package/dist/src/lib/credentials-store.js +336 -0
  207. package/dist/src/lib/credentials-store.js.map +1 -0
  208. package/dist/src/lib/csv.d.ts +47 -0
  209. package/dist/src/lib/csv.js +172 -0
  210. package/dist/src/lib/csv.js.map +1 -0
  211. package/dist/src/lib/data-input.d.ts +23 -0
  212. package/dist/src/lib/data-input.js +50 -0
  213. package/dist/src/lib/data-input.js.map +1 -0
  214. package/dist/src/lib/db-codegen/dbFingerprint.d.ts +10 -0
  215. package/dist/src/lib/db-codegen/dbFingerprint.js +17 -0
  216. package/dist/src/lib/db-codegen/dbFingerprint.js.map +1 -0
  217. package/dist/src/lib/db-codegen/dbGenerator.d.ts +67 -0
  218. package/dist/src/lib/db-codegen/dbGenerator.js +170 -0
  219. package/dist/src/lib/db-codegen/dbGenerator.js.map +1 -0
  220. package/dist/src/lib/db-codegen/dbNaming.d.ts +87 -0
  221. package/dist/src/lib/db-codegen/dbNaming.js +180 -0
  222. package/dist/src/lib/db-codegen/dbNaming.js.map +1 -0
  223. package/dist/src/lib/db-codegen/dbTemplates.d.ts +272 -0
  224. package/dist/src/lib/db-codegen/dbTemplates.js +480 -0
  225. package/dist/src/lib/db-codegen/dbTemplates.js.map +1 -0
  226. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +73 -0
  227. package/dist/src/lib/db-codegen/dbTsTypes.js +139 -0
  228. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -0
  229. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +146 -0
  230. package/dist/src/lib/db-codegen/dbTypeIR.js +525 -0
  231. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -0
  232. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.d.ts +112 -0
  233. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js +211 -0
  234. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js.map +1 -0
  235. package/dist/src/lib/deprecation.d.ts +22 -0
  236. package/dist/src/lib/deprecation.js +43 -0
  237. package/dist/src/lib/deprecation.js.map +1 -0
  238. package/dist/src/lib/document-export-permissions.d.ts +30 -0
  239. package/dist/src/lib/document-export-permissions.js +54 -0
  240. package/dist/src/lib/document-export-permissions.js.map +1 -0
  241. package/dist/src/lib/document-ingest-artifact.d.ts +120 -0
  242. package/dist/src/lib/document-ingest-artifact.js +505 -0
  243. package/dist/src/lib/document-ingest-artifact.js.map +1 -0
  244. package/dist/src/lib/document-ingest-input.d.ts +51 -0
  245. package/dist/src/lib/document-ingest-input.js +132 -0
  246. package/dist/src/lib/document-ingest-input.js.map +1 -0
  247. package/dist/src/lib/document-ingest-rows.d.ts +137 -0
  248. package/dist/src/lib/document-ingest-rows.js +181 -0
  249. package/dist/src/lib/document-ingest-rows.js.map +1 -0
  250. package/dist/src/lib/document-ingest.d.ts +101 -0
  251. package/dist/src/lib/document-ingest.js +384 -0
  252. package/dist/src/lib/document-ingest.js.map +1 -0
  253. package/dist/src/lib/env-resolver-core.d.ts +258 -0
  254. package/dist/src/lib/env-resolver-core.js +447 -0
  255. package/dist/src/lib/env-resolver-core.js.map +1 -0
  256. package/dist/src/lib/env-resolver.d.ts +99 -0
  257. package/dist/src/lib/env-resolver.js +153 -0
  258. package/dist/src/lib/env-resolver.js.map +1 -0
  259. package/dist/src/lib/fetch.d.ts +5 -0
  260. package/dist/src/lib/function-bundle.d.ts +147 -0
  261. package/dist/src/lib/function-bundle.js +341 -0
  262. package/dist/src/lib/function-bundle.js.map +1 -0
  263. package/dist/src/lib/function-collect.d.ts +123 -0
  264. package/dist/src/lib/function-collect.js +610 -0
  265. package/dist/src/lib/function-collect.js.map +1 -0
  266. package/dist/src/lib/function-db-types.d.ts +202 -0
  267. package/dist/src/lib/function-db-types.js +870 -0
  268. package/dist/src/lib/function-db-types.js.map +1 -0
  269. package/dist/src/lib/function-document-types.d.ts +144 -0
  270. package/dist/src/lib/function-document-types.js +370 -0
  271. package/dist/src/lib/function-document-types.js.map +1 -0
  272. package/dist/src/lib/function-grants-preflight.d.ts +64 -0
  273. package/dist/src/lib/function-grants-preflight.js +105 -0
  274. package/dist/src/lib/function-grants-preflight.js.map +1 -0
  275. package/dist/src/lib/function-log-lines.d.ts +76 -0
  276. package/dist/src/lib/function-log-lines.js +160 -0
  277. package/dist/src/lib/function-log-lines.js.map +1 -0
  278. package/dist/src/lib/function-log-row.d.ts +29 -0
  279. package/dist/src/lib/function-log-row.js +73 -0
  280. package/dist/src/lib/function-log-row.js.map +1 -0
  281. package/dist/src/lib/function-log-tail.d.ts +132 -0
  282. package/dist/src/lib/function-log-tail.js +262 -0
  283. package/dist/src/lib/function-log-tail.js.map +1 -0
  284. package/dist/src/lib/function-run.d.ts +289 -0
  285. package/dist/src/lib/function-run.js +389 -0
  286. package/dist/src/lib/function-run.js.map +1 -0
  287. package/dist/src/lib/function-schema-codegen.d.ts +143 -0
  288. package/dist/src/lib/function-schema-codegen.js +420 -0
  289. package/dist/src/lib/function-schema-codegen.js.map +1 -0
  290. package/dist/src/lib/function-sync.d.ts +459 -0
  291. package/dist/src/lib/function-sync.js +1258 -0
  292. package/dist/src/lib/function-sync.js.map +1 -0
  293. package/dist/src/lib/function-trigger-listing.d.ts +27 -0
  294. package/dist/src/lib/function-trigger-listing.js +70 -0
  295. package/dist/src/lib/function-trigger-listing.js.map +1 -0
  296. package/dist/src/lib/function-typecheck.d.ts +86 -0
  297. package/dist/src/lib/function-typecheck.js +370 -0
  298. package/dist/src/lib/function-typecheck.js.map +1 -0
  299. package/dist/src/lib/function-versions.d.ts +122 -0
  300. package/dist/src/lib/function-versions.js +182 -0
  301. package/dist/src/lib/function-versions.js.map +1 -0
  302. package/dist/src/lib/generated-allowlist.d.ts +28 -0
  303. package/dist/src/lib/generated-allowlist.js +281 -0
  304. package/dist/src/lib/generated-allowlist.js.map +1 -0
  305. package/dist/src/lib/generated-config-surfaces.d.ts +2936 -0
  306. package/dist/src/lib/generated-config-surfaces.js +10569 -0
  307. package/dist/src/lib/generated-config-surfaces.js.map +1 -0
  308. package/dist/src/lib/generated-sdk-types.d.ts +12 -0
  309. package/dist/src/lib/generated-sdk-types.js +13 -0
  310. package/dist/src/lib/generated-sdk-types.js.map +1 -0
  311. package/dist/src/lib/generated-template-lint.d.ts +212 -0
  312. package/dist/src/lib/generated-template-lint.js +624 -0
  313. package/dist/src/lib/generated-template-lint.js.map +1 -0
  314. package/dist/src/lib/init-adopt.d.ts +16 -0
  315. package/dist/src/lib/init-adopt.js +34 -0
  316. package/dist/src/lib/init-adopt.js.map +1 -0
  317. package/dist/src/lib/init-assets.d.ts +39 -0
  318. package/dist/src/lib/init-assets.js +97 -0
  319. package/dist/src/lib/init-assets.js.map +1 -0
  320. package/dist/src/lib/init-client-platforms.d.ts +14 -0
  321. package/dist/src/lib/init-client-platforms.js +71 -0
  322. package/dist/src/lib/init-client-platforms.js.map +1 -0
  323. package/dist/src/lib/init-config.d.ts +98 -0
  324. package/dist/src/lib/init-config.js +186 -0
  325. package/dist/src/lib/init-config.js.map +1 -0
  326. package/dist/src/lib/init-email-redirect-uris.d.ts +37 -0
  327. package/dist/src/lib/init-email-redirect-uris.js +46 -0
  328. package/dist/src/lib/init-email-redirect-uris.js.map +1 -0
  329. package/dist/src/lib/init-ios-links.d.ts +91 -0
  330. package/dist/src/lib/init-ios-links.js +219 -0
  331. package/dist/src/lib/init-ios-links.js.map +1 -0
  332. package/dist/src/lib/init-plan.d.ts +80 -0
  333. package/dist/src/lib/init-plan.js +95 -0
  334. package/dist/src/lib/init-plan.js.map +1 -0
  335. package/dist/src/lib/init-production-env.d.ts +48 -0
  336. package/dist/src/lib/init-production-env.js +59 -0
  337. package/dist/src/lib/init-production-env.js.map +1 -0
  338. package/dist/src/lib/init-schema.d.ts +74 -0
  339. package/dist/src/lib/init-schema.js +358 -0
  340. package/dist/src/lib/init-schema.js.map +1 -0
  341. package/dist/src/lib/init-xcode.d.ts +34 -0
  342. package/dist/src/lib/init-xcode.js +138 -0
  343. package/dist/src/lib/init-xcode.js.map +1 -0
  344. package/dist/src/lib/integration-request-config.d.ts +30 -0
  345. package/dist/src/lib/integration-request-config.js +145 -0
  346. package/dist/src/lib/integration-request-config.js.map +1 -0
  347. package/dist/src/lib/integration-selector.d.ts +42 -0
  348. package/dist/src/lib/integration-selector.js +46 -0
  349. package/dist/src/lib/integration-selector.js.map +1 -0
  350. package/dist/src/lib/ios-app-id.d.ts +34 -0
  351. package/dist/src/lib/ios-app-id.js +69 -0
  352. package/dist/src/lib/ios-app-id.js.map +1 -0
  353. package/dist/src/lib/list-options.d.ts +68 -0
  354. package/dist/src/lib/list-options.js +89 -0
  355. package/dist/src/lib/list-options.js.map +1 -0
  356. package/dist/src/lib/local-state.d.ts +55 -0
  357. package/dist/src/lib/local-state.js +167 -0
  358. package/dist/src/lib/local-state.js.map +1 -0
  359. package/dist/src/lib/local-test-cases.d.ts +63 -0
  360. package/dist/src/lib/local-test-cases.js +136 -0
  361. package/dist/src/lib/local-test-cases.js.map +1 -0
  362. package/dist/src/lib/log-inspection.d.ts +715 -0
  363. package/dist/src/lib/log-inspection.js +816 -0
  364. package/dist/src/lib/log-inspection.js.map +1 -0
  365. package/dist/src/lib/logout-admin-session.d.ts +33 -0
  366. package/dist/src/lib/logout-admin-session.js +70 -0
  367. package/dist/src/lib/logout-admin-session.js.map +1 -0
  368. package/dist/src/lib/migration-nag.d.ts +49 -0
  369. package/dist/src/lib/migration-nag.js +163 -0
  370. package/dist/src/lib/migration-nag.js.map +1 -0
  371. package/dist/src/lib/object-status-filter.d.ts +22 -0
  372. package/dist/src/lib/object-status-filter.js +45 -0
  373. package/dist/src/lib/object-status-filter.js.map +1 -0
  374. package/dist/src/lib/output.d.ts +124 -0
  375. package/dist/src/lib/output.js +219 -8
  376. package/dist/src/lib/output.js.map +1 -1
  377. package/dist/src/lib/package-manager.d.ts +140 -0
  378. package/dist/src/lib/package-manager.js +305 -0
  379. package/dist/src/lib/package-manager.js.map +1 -0
  380. package/dist/src/lib/paginate.d.ts +98 -0
  381. package/dist/src/lib/paginate.js +112 -0
  382. package/dist/src/lib/paginate.js.map +1 -0
  383. package/dist/src/lib/platform-owned.d.ts +63 -0
  384. package/dist/src/lib/platform-owned.js +85 -0
  385. package/dist/src/lib/platform-owned.js.map +1 -0
  386. package/dist/src/lib/project-config.d.ts +122 -0
  387. package/dist/src/lib/project-config.js +244 -0
  388. package/dist/src/lib/project-config.js.map +1 -0
  389. package/dist/src/lib/prompt-cost-format.d.ts +11 -0
  390. package/dist/src/lib/prompt-cost-format.js +41 -0
  391. package/dist/src/lib/prompt-cost-format.js.map +1 -0
  392. package/dist/src/lib/prompt-schema-codegen.d.ts +147 -0
  393. package/dist/src/lib/prompt-schema-codegen.js +462 -0
  394. package/dist/src/lib/prompt-schema-codegen.js.map +1 -0
  395. package/dist/src/lib/query-operators.d.ts +43 -0
  396. package/dist/src/lib/query-operators.js +80 -0
  397. package/dist/src/lib/query-operators.js.map +1 -0
  398. package/dist/src/lib/record-filter.d.ts +18 -0
  399. package/dist/src/lib/record-filter.js +55 -0
  400. package/dist/src/lib/record-filter.js.map +1 -0
  401. package/dist/src/lib/refresh-admin-credentials.d.ts +73 -0
  402. package/dist/src/lib/refresh-admin-credentials.js +123 -0
  403. package/dist/src/lib/refresh-admin-credentials.js.map +1 -0
  404. package/dist/src/lib/resolve-init-dev-port.d.ts +56 -0
  405. package/dist/src/lib/resolve-init-dev-port.js +55 -0
  406. package/dist/src/lib/resolve-init-dev-port.js.map +1 -0
  407. package/dist/src/lib/resolve-init-server.d.ts +64 -0
  408. package/dist/src/lib/resolve-init-server.js +77 -0
  409. package/dist/src/lib/resolve-init-server.js.map +1 -0
  410. package/dist/src/lib/resolve-owner.d.ts +19 -0
  411. package/dist/src/lib/resolve-owner.js +20 -0
  412. package/dist/src/lib/resolve-owner.js.map +1 -0
  413. package/dist/src/lib/resolve-platform.d.ts +74 -0
  414. package/dist/src/lib/resolve-platform.js +105 -0
  415. package/dist/src/lib/resolve-platform.js.map +1 -0
  416. package/dist/src/lib/run-status.d.ts +19 -0
  417. package/dist/src/lib/run-status.generated.d.ts +39 -0
  418. package/dist/src/lib/run-status.generated.js +66 -0
  419. package/dist/src/lib/run-status.generated.js.map +1 -0
  420. package/dist/src/lib/run-status.js +19 -0
  421. package/dist/src/lib/run-status.js.map +1 -0
  422. package/dist/src/lib/server-text-normalization.d.ts +51 -0
  423. package/dist/src/lib/server-text-normalization.js +90 -0
  424. package/dist/src/lib/server-text-normalization.js.map +1 -0
  425. package/dist/src/lib/server-url.d.ts +22 -0
  426. package/dist/src/lib/server-url.js +33 -0
  427. package/dist/src/lib/server-url.js.map +1 -0
  428. package/dist/src/lib/signing-secret-status.d.ts +81 -0
  429. package/dist/src/lib/signing-secret-status.js +116 -0
  430. package/dist/src/lib/signing-secret-status.js.map +1 -0
  431. package/dist/src/lib/skill-installer.d.ts +71 -0
  432. package/dist/src/lib/skill-installer.js +441 -0
  433. package/dist/src/lib/skill-installer.js.map +1 -0
  434. package/dist/src/lib/snapshot-audit-source.d.ts +45 -0
  435. package/dist/src/lib/snapshot-audit-source.js +58 -0
  436. package/dist/src/lib/snapshot-audit-source.js.map +1 -0
  437. package/dist/src/lib/snapshot-audit-store.d.ts +52 -0
  438. package/dist/src/lib/snapshot-audit-store.js +196 -0
  439. package/dist/src/lib/snapshot-audit-store.js.map +1 -0
  440. package/dist/src/lib/snapshot-audit.d.ts +207 -0
  441. package/dist/src/lib/snapshot-audit.js +431 -0
  442. package/dist/src/lib/snapshot-audit.js.map +1 -0
  443. package/dist/src/lib/snapshot-build-rows.d.ts +60 -0
  444. package/dist/src/lib/snapshot-build-rows.js +87 -0
  445. package/dist/src/lib/snapshot-build-rows.js.map +1 -0
  446. package/dist/src/lib/snapshot-build.d.ts +50 -0
  447. package/dist/src/lib/snapshot-build.js +111 -0
  448. package/dist/src/lib/snapshot-build.js.map +1 -0
  449. package/dist/src/lib/snapshot-manifest-layout.d.ts +61 -0
  450. package/dist/src/lib/snapshot-manifest-layout.js +70 -0
  451. package/dist/src/lib/snapshot-manifest-layout.js.map +1 -0
  452. package/dist/src/lib/snapshots.d.ts +98 -0
  453. package/dist/src/lib/snapshots.js +294 -0
  454. package/dist/src/lib/snapshots.js.map +1 -0
  455. package/dist/src/lib/step-run-table.d.ts +43 -0
  456. package/dist/src/lib/step-run-table.js +129 -0
  457. package/dist/src/lib/step-run-table.js.map +1 -0
  458. package/dist/src/lib/storage-pending-retry.d.ts +26 -0
  459. package/dist/src/lib/storage-pending-retry.js +42 -0
  460. package/dist/src/lib/storage-pending-retry.js.map +1 -0
  461. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +42 -0
  462. package/dist/src/lib/swift-codegen/agentGenerator.js +118 -0
  463. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -0
  464. package/dist/src/lib/swift-codegen/banners.d.ts +24 -0
  465. package/dist/src/lib/swift-codegen/banners.js +25 -0
  466. package/dist/src/lib/swift-codegen/banners.js.map +1 -0
  467. package/dist/src/lib/swift-codegen/dbGenerator.d.ts +113 -0
  468. package/dist/src/lib/swift-codegen/dbGenerator.js +926 -0
  469. package/dist/src/lib/swift-codegen/dbGenerator.js.map +1 -0
  470. package/dist/src/lib/swift-codegen/dbSwiftTypes.d.ts +42 -0
  471. package/dist/src/lib/swift-codegen/dbSwiftTypes.js +100 -0
  472. package/dist/src/lib/swift-codegen/dbSwiftTypes.js.map +1 -0
  473. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +139 -0
  474. package/dist/src/lib/swift-codegen/functionGenerator.js +462 -0
  475. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -0
  476. package/dist/src/lib/swift-codegen/generator.d.ts +100 -0
  477. package/dist/src/lib/swift-codegen/generator.js +457 -0
  478. package/dist/src/lib/swift-codegen/generator.js.map +1 -0
  479. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +87 -0
  480. package/dist/src/lib/swift-codegen/schemaToSwift.js +661 -0
  481. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -0
  482. package/dist/src/lib/swift-codegen/siblingSymbols.d.ts +94 -0
  483. package/dist/src/lib/swift-codegen/siblingSymbols.js +155 -0
  484. package/dist/src/lib/swift-codegen/siblingSymbols.js.map +1 -0
  485. package/dist/src/lib/swift-codegen/swiftNaming.d.ts +85 -0
  486. package/dist/src/lib/swift-codegen/swiftNaming.js +198 -0
  487. package/dist/src/lib/swift-codegen/swiftNaming.js.map +1 -0
  488. package/dist/src/lib/sync-dir-selector.d.ts +21 -0
  489. package/dist/src/lib/sync-dir-selector.js +30 -0
  490. package/dist/src/lib/sync-dir-selector.js.map +1 -0
  491. package/dist/src/lib/sync-paths.d.ts +128 -0
  492. package/dist/src/lib/sync-paths.js +195 -0
  493. package/dist/src/lib/sync-paths.js.map +1 -0
  494. package/dist/src/lib/sync-resource-types.d.ts +563 -0
  495. package/dist/src/lib/sync-resource-types.js +1073 -0
  496. package/dist/src/lib/sync-resource-types.js.map +1 -0
  497. package/dist/src/lib/sync-selectors.d.ts +138 -0
  498. package/dist/src/lib/sync-selectors.js +289 -0
  499. package/dist/src/lib/sync-selectors.js.map +1 -0
  500. package/dist/src/lib/template.d.ts +170 -0
  501. package/dist/src/lib/template.js +484 -68
  502. package/dist/src/lib/template.js.map +1 -1
  503. package/dist/src/lib/test-case-file-names.d.ts +40 -0
  504. package/dist/src/lib/test-case-file-names.js +91 -0
  505. package/dist/src/lib/test-case-file-names.js.map +1 -0
  506. package/dist/src/lib/test-case-keys.d.ts +29 -0
  507. package/dist/src/lib/test-case-keys.js +55 -0
  508. package/dist/src/lib/test-case-keys.js.map +1 -0
  509. package/dist/src/lib/test-case-variables.d.ts +29 -0
  510. package/dist/src/lib/test-case-variables.js +71 -0
  511. package/dist/src/lib/test-case-variables.js.map +1 -0
  512. package/dist/src/lib/token-inject.d.ts +56 -0
  513. package/dist/src/lib/token-inject.js +204 -0
  514. package/dist/src/lib/token-inject.js.map +1 -0
  515. package/dist/src/lib/toml-database-config.d.ts +123 -0
  516. package/dist/src/lib/toml-database-config.js +544 -0
  517. package/dist/src/lib/toml-database-config.js.map +1 -0
  518. package/dist/src/lib/toml-metadata-config.d.ts +151 -0
  519. package/dist/src/lib/toml-metadata-config.js +476 -0
  520. package/dist/src/lib/toml-metadata-config.js.map +1 -0
  521. package/dist/src/lib/toml-native-form.d.ts +46 -0
  522. package/dist/src/lib/toml-native-form.js +78 -0
  523. package/dist/src/lib/toml-native-form.js.map +1 -0
  524. package/dist/src/lib/toml-params-validator.d.ts +129 -0
  525. package/dist/src/lib/toml-params-validator.js +298 -0
  526. package/dist/src/lib/toml-params-validator.js.map +1 -0
  527. package/dist/src/lib/toml-scalar-edit.d.ts +43 -0
  528. package/dist/src/lib/toml-scalar-edit.js +283 -0
  529. package/dist/src/lib/toml-scalar-edit.js.map +1 -0
  530. package/dist/src/lib/user-selector.d.ts +24 -0
  531. package/dist/src/lib/user-selector.js +33 -0
  532. package/dist/src/lib/user-selector.js.map +1 -0
  533. package/dist/src/lib/version-check.d.ts +35 -0
  534. package/dist/src/lib/version-check.js +241 -0
  535. package/dist/src/lib/version-check.js.map +1 -0
  536. package/dist/src/lib/watch.d.ts +121 -0
  537. package/dist/src/lib/watch.js +169 -0
  538. package/dist/src/lib/watch.js.map +1 -0
  539. package/dist/src/lib/web-url.d.ts +40 -0
  540. package/dist/src/lib/web-url.js +76 -0
  541. package/dist/src/lib/web-url.js.map +1 -0
  542. package/dist/src/lib/webhook-deliver.d.ts +209 -0
  543. package/dist/src/lib/webhook-deliver.js +519 -0
  544. package/dist/src/lib/webhook-deliver.js.map +1 -0
  545. package/dist/src/lib/workflow-apply.d.ts +110 -0
  546. package/dist/src/lib/workflow-apply.js +164 -0
  547. package/dist/src/lib/workflow-apply.js.map +1 -0
  548. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.d.ts +129 -0
  549. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js +269 -0
  550. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js.map +1 -0
  551. package/dist/src/lib/workflow-codegen/generator.d.ts +96 -0
  552. package/dist/src/lib/workflow-codegen/generator.js +361 -0
  553. package/dist/src/lib/workflow-codegen/generator.js.map +1 -0
  554. package/dist/src/lib/workflow-codegen/invokerIR.d.ts +94 -0
  555. package/dist/src/lib/workflow-codegen/invokerIR.js +76 -0
  556. package/dist/src/lib/workflow-codegen/invokerIR.js.map +1 -0
  557. package/dist/src/lib/workflow-codegen/naming.d.ts +33 -0
  558. package/dist/src/lib/workflow-codegen/naming.js +81 -0
  559. package/dist/src/lib/workflow-codegen/naming.js.map +1 -0
  560. package/dist/src/lib/workflow-codegen/schemaToTs.d.ts +80 -0
  561. package/dist/src/lib/workflow-codegen/schemaToTs.js +303 -0
  562. package/dist/src/lib/workflow-codegen/schemaToTs.js.map +1 -0
  563. package/dist/src/lib/workflow-config-apply.d.ts +70 -0
  564. package/dist/src/lib/workflow-config-apply.js +137 -0
  565. package/dist/src/lib/workflow-config-apply.js.map +1 -0
  566. package/dist/src/lib/workflow-config-sidecar.d.ts +63 -0
  567. package/dist/src/lib/workflow-config-sidecar.js +96 -0
  568. package/dist/src/lib/workflow-config-sidecar.js.map +1 -0
  569. package/dist/src/lib/workflow-defaults.d.ts +29 -0
  570. package/dist/src/lib/workflow-defaults.js +41 -0
  571. package/dist/src/lib/workflow-defaults.js.map +1 -0
  572. package/dist/src/lib/workflow-fragments.d.ts +64 -0
  573. package/dist/src/lib/workflow-fragments.js +342 -0
  574. package/dist/src/lib/workflow-fragments.js.map +1 -0
  575. package/dist/src/lib/workflow-include-preserve.d.ts +76 -0
  576. package/dist/src/lib/workflow-include-preserve.js +286 -0
  577. package/dist/src/lib/workflow-include-preserve.js.map +1 -0
  578. package/dist/src/lib/workflow-payload.d.ts +98 -0
  579. package/dist/src/lib/workflow-payload.js +178 -0
  580. package/dist/src/lib/workflow-payload.js.map +1 -0
  581. package/dist/src/lib/workflow-toml-validator.d.ts +211 -0
  582. package/dist/src/lib/workflow-toml-validator.js +770 -0
  583. package/dist/src/lib/workflow-toml-validator.js.map +1 -0
  584. package/dist/src/lib/workflow-usage.d.ts +196 -0
  585. package/dist/src/lib/workflow-usage.js +310 -0
  586. package/dist/src/lib/workflow-usage.js.map +1 -0
  587. package/dist/src/types/index.d.ts +591 -0
  588. package/dist/src/validators.d.ts +65 -0
  589. package/dist/src/validators.js +64 -0
  590. package/dist/src/validators.js.map +1 -0
  591. package/package.json +34 -9
@@ -0,0 +1,465 @@
1
+ /**
2
+ * `primitive config` — the whole TOML configuration tree (issues #2645, #2759).
3
+ *
4
+ * #2645 replaced the eleven config-setting flags with three local verbs:
5
+ * `fields` documents the surface that per-flag `--help` used to, `create`
6
+ * scaffolds an object, and `set` edits one key from a script. It put them under
7
+ * `config` rather than under `sync` because none of them touches the network.
8
+ *
9
+ * #2759 removed the other side of that line. Splitting by "does this call the
10
+ * API?" is a transport distinction, not one users think in: authoring was
11
+ * `config` and applying was `sync`, so every real workflow crossed the boundary
12
+ * and this group's own help had to end its example sequence by switching nouns.
13
+ * `config` now carries the reconciliation verbs too (`init`, `pull`, `push`,
14
+ * `diff`, `revert`, `migrate-toml`, `migrate-v2`), registered onto the group
15
+ * returned below by `registerConfigSyncCommands` in `sync.ts` — that module
16
+ * keeps its name and exports; only where its verbs hang changed.
17
+ *
18
+ * The split that remains is the one users do think in: the per-surface groups
19
+ * (`workflows`, `webhooks`, …) read and operate on live objects, `config` owns
20
+ * the files that define them.
21
+ */
22
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
23
+ import { join, basename } from "path";
24
+ import chalk from "chalk";
25
+ import { resolveSyncDir } from "../lib/sync-paths.js";
26
+ import { CONFIG_OBJECT_DESCRIPTORS, getConfigObjectDescriptor, } from "../lib/config-object-descriptor.js";
27
+ import { PUSH_PRUNE_SPECS, isSafeSyncFilename, } from "../lib/sync-resource-types.js";
28
+ import { configAuthoringError } from "../lib/platform-owned.js";
29
+ import { filesDeclaringKey } from "../lib/sync-selectors.js";
30
+ import { setTomlScalar, parseScalarLiteral, TomlEditError, } from "../lib/toml-scalar-edit.js";
31
+ import { success, error, info, keyValue, divider, json } from "../lib/output.js";
32
+ function ensureDir(dirPath) {
33
+ if (!existsSync(dirPath)) {
34
+ mkdirSync(dirPath, { recursive: true });
35
+ }
36
+ }
37
+ /**
38
+ * The config slot for a LOCAL command (issue #2645).
39
+ *
40
+ * `config create`, `config set` and `config fields` never call the API, so
41
+ * they must not need a login: scaffolding a file before you have credentials
42
+ * is exactly the order the TOML-only path asks for (`config create`, edit,
43
+ * `config push`). They resolve the environment's tree like every other
44
+ * `config` verb and stop there — no `resolveAppId`, and since #3154 no `--dir`
45
+ * to name a directory of their own.
46
+ */
47
+ function resolveLocalSyncDir() {
48
+ const configDir = resolveSyncDir();
49
+ info(`Using per-environment config directory: ${configDir}`);
50
+ return configDir;
51
+ }
52
+ /**
53
+ * The `--only` selector key for a file — the key `config push` itself derives.
54
+ *
55
+ * Not always the file name: a metadata-category config lives at
56
+ * `<resourceType>.<category>.toml` but is keyed by the `resourceType#category`
57
+ * pair, so telling the user to push `--only metadata-category-config/<basename>`
58
+ * would print a command that resolves to nothing.
59
+ */
60
+ function pushSelectorKey(descriptor, filePath) {
61
+ const spec = PUSH_PRUNE_SPECS.find((s) => s.resourceType.label === descriptor.type);
62
+ return spec ? spec.keyFromFile(filePath) : basename(filePath, ".toml");
63
+ }
64
+ /** Every configurable type name, for an error message. */
65
+ function configTypeList() {
66
+ return CONFIG_OBJECT_DESCRIPTORS.map((d) => d.type).join(", ");
67
+ }
68
+ function requireConfigDescriptor(type) {
69
+ const descriptor = getConfigObjectDescriptor(type);
70
+ if (!descriptor) {
71
+ error(`Unknown configuration type '${type}'. Configurable types: ${configTypeList()}`);
72
+ process.exit(1);
73
+ }
74
+ return descriptor;
75
+ }
76
+ /**
77
+ * Whether `path` names something the type declares.
78
+ *
79
+ * An exact field match is obvious. A declared `table` / `table[]` / `json`
80
+ * field also covers everything BELOW it — `requestConfig.method`,
81
+ * `verification.jwt.header`, `vars.API_BASE_URL` — because those subtrees are
82
+ * free-form by design and enumerating them would be a second, always-stale
83
+ * copy of the server's shape.
84
+ */
85
+ function isDeclaredFieldPath(descriptor, path) {
86
+ // `vars.toml` is a flat table of the app's own keys — every root-level key is
87
+ // legitimate, and the key format is validated by the push preflight.
88
+ if (descriptor.freeFormRootKeys && !path.includes("."))
89
+ return true;
90
+ for (const field of descriptor.fields) {
91
+ if (field.path === path)
92
+ return true;
93
+ if ((field.type === "table" || field.type === "table[]" || field.type === "json") &&
94
+ path.startsWith(`${field.path}.`)) {
95
+ return true;
96
+ }
97
+ }
98
+ return false;
99
+ }
100
+ /**
101
+ * Why `value` cannot be what `path` declares, or `null` when it can.
102
+ *
103
+ * `config set` used to check only that a path was DECLARED, so
104
+ * `integration.timeoutMs=fast` wrote a string into a number field and the
105
+ * mistake surfaced as a server error on the next push. The descriptor exists to
106
+ * carry what per-flag `--help` used to carry (criterion 7), and that has to
107
+ * include the type — otherwise removing the flags traded a fast local error for
108
+ * a slow remote one.
109
+ *
110
+ * Deliberately silent about anything it cannot judge: an undeclared path (the
111
+ * declared-path check owns that message — two errors for one mistake is worse
112
+ * than one), the interior of a `table` / `table[]` / `json` field, and a var
113
+ * file's own keys. Those shapes belong to the server, and mirroring them here
114
+ * would be a second copy that goes stale.
115
+ */
116
+ export function fieldTypeMismatch(descriptor, path, value) {
117
+ const field = descriptor.fields.find((f) => f.path === path);
118
+ if (!field)
119
+ return null;
120
+ const expected = field.type === "number" || field.type === "boolean" || field.type === "string"
121
+ ? field.type
122
+ : null;
123
+ if (!expected || typeof value === expected)
124
+ return null;
125
+ return (`'${path}' is declared ${expected}, but '${value}' is a ${typeof value}. ` +
126
+ `Run 'primitive config fields ${descriptor.type}' to see the surface.`);
127
+ }
128
+ /**
129
+ * Resolve a `config set` target to the file it edits.
130
+ *
131
+ * Accepts `<type>/<key>` for the 13 per-entity types, plus the two root
132
+ * singletons by name: `app` (`app.toml`) and `vars` (`vars.toml`, whose keys
133
+ * are addressed as `vars.<KEY>`).
134
+ *
135
+ * The key is resolved the way `config push --only` resolves it — by the identity
136
+ * the local files DECLARE, falling back to the conventional file name when no
137
+ * file declares it. `config set` and the push that follows it have to agree about
138
+ * which object `<type>/<key>` is; resolving by file name alone meant a renamed
139
+ * file (`custom.toml` declaring `workflow.key = "greeting"`) could not be
140
+ * edited as `workflow/greeting` at all, while `workflow/custom` edited a file
141
+ * push would apply under a different key (issue #2645, review follow-up).
142
+ */
143
+ function resolveSetTarget(selector, configDir) {
144
+ if (selector === "app") {
145
+ return {
146
+ descriptor: requireConfigDescriptor("app"),
147
+ filePath: join(configDir, "app.toml"),
148
+ };
149
+ }
150
+ if (selector === "vars" || selector === "var") {
151
+ return {
152
+ descriptor: requireConfigDescriptor("var"),
153
+ filePath: join(configDir, "vars.toml"),
154
+ };
155
+ }
156
+ const slash = selector.indexOf("/");
157
+ if (slash === -1) {
158
+ error(`'${selector}' is not a configuration object. Use <type>/<key>, app, or vars. Types: ${configTypeList()}`);
159
+ process.exit(1);
160
+ }
161
+ const type = selector.slice(0, slash);
162
+ const key = selector.slice(slash + 1);
163
+ const descriptor = requireConfigDescriptor(type);
164
+ if (!descriptor.resourceType) {
165
+ error(`'${type}' is a single file — use '${type === "app" ? "app" : "vars"}' with no key`);
166
+ process.exit(1);
167
+ }
168
+ if (!key) {
169
+ error(`'${selector}': name the object, e.g. ${type}/<key>`);
170
+ process.exit(1);
171
+ }
172
+ const refusal = configAuthoringError(type, key);
173
+ if (refusal) {
174
+ error(refusal);
175
+ process.exit(1);
176
+ }
177
+ const filename = descriptor.resourceType.fileFromKey(key);
178
+ // The key is a command-line argument, so it must never be able to steer the
179
+ // edit out of the type's directory — `workflow/../app` would otherwise let
180
+ // `config set` rewrite a file the operator did not name. Same guard `config create`
181
+ // applies before a write and prune applies before an unlink. Checked before
182
+ // the directory scan below so a traversing key never reaches the filesystem.
183
+ if (!isSafeSyncFilename(filename)) {
184
+ error(`'${key}' is not a usable key — it would edit outside ${descriptor.resourceType.dir}/.`);
185
+ process.exit(1);
186
+ }
187
+ const declaring = filesDeclaringKey(configDir, descriptor.type, key);
188
+ if (declaring.length > 1) {
189
+ error(`'${selector}' is declared by ${declaring.length} files (${declaring
190
+ .map((p) => basename(p))
191
+ .join(", ")}) — one key, one file. Remove or re-key the duplicates, then retry.`);
192
+ process.exit(1);
193
+ }
194
+ // No local file declares the key: fall back to the conventional path, so the
195
+ // "no local file at …" error names where `config pull` / `config create` would put it.
196
+ const filePath = declaring[0] ?? join(configDir, descriptor.resourceType.dir, filename);
197
+ // A file may declare a key other than its name, including a platform-owned
198
+ // one. Push skips those (#1660), so editing one is an edit that can never be
199
+ // applied — refuse it by the key the file DECLARES, not only by the one the
200
+ // operator typed.
201
+ const declaredKey = pushSelectorKey(descriptor, filePath);
202
+ const declaredRefusal = declaredKey === key
203
+ ? null
204
+ : configAuthoringError(descriptor.type, declaredKey);
205
+ if (declaredRefusal) {
206
+ error(declaredRefusal);
207
+ process.exit(1);
208
+ }
209
+ return { descriptor, filePath };
210
+ }
211
+ /**
212
+ * Register the `config` group and its local authoring verbs, and return the
213
+ * group so `registerConfigSyncCommands` can hang the server-reconciling verbs
214
+ * off the same noun (issue #2759).
215
+ */
216
+ export function registerConfigCommands(program) {
217
+ const config = program
218
+ .command("config")
219
+ .description("Manage app configuration as TOML files — author locally, then pull/diff/push against the server")
220
+ .addHelpText("after", `
221
+ Configuration is authored in TOML and applied with 'primitive config push'.
222
+ 'fields', 'create' and 'set' only read and write local files — nothing there
223
+ contacts the server, so they work before you have an app, and a script can edit
224
+ a file without a login. 'init', 'pull', 'push', 'diff' and 'revert' reconcile
225
+ those files with the server.
226
+
227
+ Examples:
228
+ $ primitive config fields workflow
229
+ $ primitive config create workflow order-intake
230
+ $ primitive config set workflow/order-intake workflow.description="Intake"
231
+ $ primitive config push --only workflow/order-intake
232
+
233
+ Availability is not configuration: a workflow's status is server-owned, so it
234
+ is not a settable key here. Take one out of service with
235
+ 'primitive workflows disable' (and back with 'enable').
236
+
237
+ Directory Structure:
238
+ primitive/<env>/
239
+ .sync-state.json # Sync state baseline (committed)
240
+ app.toml # App settings
241
+ integrations/*.toml # Integration configs
242
+ integrations/{key}.tests/*.toml # Integration test cases
243
+ webhooks/*.toml # Webhook configs
244
+ cron-triggers/*.toml # Cron trigger configs
245
+ blob-buckets/*.toml # Blob bucket configs
246
+ prompts/*.toml # Prompt configs
247
+ prompts/{key}.tests/*.toml # Prompt test cases
248
+ workflows/*.toml # Workflow definitions
249
+ workflows/{key}.tests/*.toml # Workflow test cases
250
+ transforms/*.rhai # Rhai transform bodies
251
+ transforms/{name}.tests/*.toml # Transform test cases
252
+ database-type-configs/*.toml # Database type configs + operations
253
+ rule-sets/*.toml # Access rule sets
254
+ group-type-configs/*.toml # Group type configs
255
+ collection-type-configs/*.toml # Collection type configs
256
+ metadata-category-configs/*.toml # Resource-metadata category configs
257
+ email-templates/*.toml # Email template overrides
258
+ `);
259
+ // ── The TOML authoring surface (issue #2645) ─────────────────────────────
260
+ //
261
+ // Server-side configuration is authored in TOML and applied with
262
+ // `config push`. These three commands are what replaced the config-setting
263
+ // flags: `fields` documents the surface that per-flag `--help` used to,
264
+ // `create` scaffolds an object without an API call, and `set` edits one key
265
+ // from a script. None of them touches the network.
266
+ config
267
+ .command("fields")
268
+ .description("List a configuration type's TOML keys, types, required and default")
269
+ .argument("<type>", `Configuration type (${CONFIG_OBJECT_DESCRIPTORS.length} available)`)
270
+ .option("--json", "Output as JSON")
271
+ .addHelpText("after", `
272
+ Types:
273
+ ${CONFIG_OBJECT_DESCRIPTORS.map((d) => `${d.type} — ${d.description}`).join("\n ")}
274
+
275
+ Examples:
276
+ $ primitive config fields workflow
277
+ $ primitive config fields webhook --json
278
+ `)
279
+ .action(async (type, options) => {
280
+ const descriptor = requireConfigDescriptor(type);
281
+ const asJson = (f) => ({
282
+ path: f.path,
283
+ type: f.type,
284
+ required: f.required,
285
+ default: f.default ?? null,
286
+ description: f.description,
287
+ });
288
+ if (options.json) {
289
+ json({
290
+ type: descriptor.type,
291
+ file: descriptor.fileHint,
292
+ description: descriptor.description,
293
+ identity: descriptor.identity ?? null,
294
+ fields: descriptor.fields.map(asJson),
295
+ // A type authored across more than one file reports the other files
296
+ // too — the workflow's named-config sidecars are the whole of what
297
+ // the removed `workflows configs` verbs used to set (issue #2645).
298
+ companionFiles: (descriptor.companionFiles ?? []).map((companion) => ({
299
+ file: companion.fileHint,
300
+ description: companion.description,
301
+ fields: companion.fields.map(asJson),
302
+ })),
303
+ });
304
+ return;
305
+ }
306
+ keyValue("Type", descriptor.type);
307
+ keyValue("File", descriptor.fileHint);
308
+ keyValue("About", descriptor.description);
309
+ divider();
310
+ if (descriptor.freeFormRootKeys) {
311
+ info(`${descriptor.fileHint} is a flat table of your own keys — KEY = "value" at the root, matching ^[A-Z][A-Z0-9_]{0,63}$. There is no fixed field surface.`);
312
+ return;
313
+ }
314
+ if (descriptor.fields.length === 0) {
315
+ info(`${descriptor.fileHint} is a script body, not a table of keys — there is no field surface to list.`);
316
+ return;
317
+ }
318
+ const printField = (field) => {
319
+ const flags = [
320
+ field.required ? "required" : "optional",
321
+ field.default === undefined ? null : `default ${JSON.stringify(field.default)}`,
322
+ ]
323
+ .filter(Boolean)
324
+ .join(", ");
325
+ console.log(` ${chalk.cyan(field.path)} ${chalk.dim(field.type)} ${chalk.dim(`(${flags})`)}`);
326
+ console.log(` ${field.description}`);
327
+ };
328
+ for (const field of descriptor.fields) {
329
+ printField(field);
330
+ }
331
+ // The rest of the object's surface, where it spans more than one file.
332
+ // `config set` addresses the main file only, so these are listed rather
333
+ // than folded in — but leaving them out would under-report exactly what
334
+ // the removed `workflows configs` flags used to document (issue #2645).
335
+ for (const companion of descriptor.companionFiles ?? []) {
336
+ divider();
337
+ keyValue("File", companion.fileHint);
338
+ info(companion.description);
339
+ for (const field of companion.fields) {
340
+ printField(field);
341
+ }
342
+ }
343
+ divider();
344
+ info(`Edit ${descriptor.fileHint}, then run 'primitive config push'.`);
345
+ });
346
+ config
347
+ .command("create")
348
+ .description("Scaffold a configuration file locally (no API call)")
349
+ .argument("<type>", "Configuration type — see 'primitive config fields'")
350
+ .argument("<key>", "The object's key; it becomes the file name")
351
+ .addHelpText("after", `
352
+ Creates the file from the type's defaults and stops there — nothing is sent to
353
+ the server until you edit the file and run 'primitive config push'.
354
+
355
+ Examples:
356
+ $ primitive config create workflow order-intake
357
+ $ primitive config create webhook stripe-events
358
+ $ primitive config push --only workflow/order-intake
359
+ `)
360
+ .action(async (type, key, options) => {
361
+ const descriptor = requireConfigDescriptor(type);
362
+ if (!descriptor.resourceType) {
363
+ error(`${descriptor.type} is a root singleton (${descriptor.fileHint}) — it is not created per key. Run 'primitive config pull' to write it.`);
364
+ process.exit(1);
365
+ }
366
+ const refusal = configAuthoringError(descriptor.type, key);
367
+ if (refusal) {
368
+ error(refusal);
369
+ process.exit(1);
370
+ }
371
+ const configDir = resolveLocalSyncDir();
372
+ const dir = join(configDir, descriptor.resourceType.dir);
373
+ const filename = descriptor.resourceType.fileFromKey(key);
374
+ // The key comes from the command line, so it must never be able to steer
375
+ // a write out of the slot — the same guard the prune path applies before
376
+ // an unlink.
377
+ if (!isSafeSyncFilename(filename)) {
378
+ error(`'${key}' is not a usable key — it would write outside ${dir}.`);
379
+ process.exit(1);
380
+ }
381
+ const filePath = join(dir, filename);
382
+ if (existsSync(filePath)) {
383
+ error(`${descriptor.resourceType.dir}/${descriptor.resourceType.fileFromKey(key)} already exists — edit it, or pick another key.`);
384
+ process.exit(1);
385
+ }
386
+ ensureDir(dir);
387
+ writeFileSync(filePath, descriptor.scaffold(key));
388
+ success(`Created ${filePath}`);
389
+ info(`Next: edit it, then 'primitive config push --only ${descriptor.type}/${pushSelectorKey(descriptor, filePath)}'.`);
390
+ });
391
+ config
392
+ .command("set")
393
+ .description("Set a field in a configuration file locally (no API call)")
394
+ .argument("<object>", "<type>/<key>, app, or vars")
395
+ .argument("<assignments...>", "One or more <path>=<value>, e.g. workflow.description=\"Intake\"")
396
+ .addHelpText("after", `
397
+ Edits the file in place, preserving comments and key order, and writes nothing
398
+ to the server. Only scalars are settable — a table or an array is edited in the
399
+ file directly.
400
+
401
+ 'true'/'false' and numeric values are written with those types; wrap a value in
402
+ double quotes to force a string.
403
+
404
+ Examples:
405
+ $ primitive config set workflow/order-intake workflow.description="Intake"
406
+ $ primitive config push --only workflow/order-intake
407
+
408
+ A server-owned key such as status is not settable: availability is changed
409
+ with 'primitive <noun> enable|disable', never through a file.
410
+ `)
411
+ .action(async (object, assignments, options) => {
412
+ const configDir = resolveLocalSyncDir();
413
+ const { descriptor, filePath } = resolveSetTarget(object, configDir);
414
+ if (!existsSync(filePath)) {
415
+ error(`No local file at ${filePath}. Run 'primitive config pull' to fetch it, or 'primitive config create ${descriptor.type} <key>' to create one.`);
416
+ process.exit(1);
417
+ }
418
+ let text = readFileSync(filePath, "utf-8");
419
+ const applied = [];
420
+ for (const assignment of assignments) {
421
+ const eq = assignment.indexOf("=");
422
+ if (eq <= 0) {
423
+ error(`'${assignment}' is not <path>=<value>, e.g. workflow.name="Order intake"`);
424
+ process.exit(1);
425
+ }
426
+ const path = assignment.slice(0, eq).trim();
427
+ const raw = assignment.slice(eq + 1);
428
+ if (!isDeclaredFieldPath(descriptor, path)) {
429
+ error(`'${path}' is not a ${descriptor.type} field. Run 'primitive config fields ${descriptor.type}' to see the surface.`);
430
+ process.exit(1);
431
+ }
432
+ const value = parseScalarLiteral(raw);
433
+ const typeError = fieldTypeMismatch(descriptor, path, value);
434
+ if (typeError) {
435
+ error(typeError);
436
+ process.exit(1);
437
+ }
438
+ try {
439
+ text = setTomlScalar(text, path, value);
440
+ }
441
+ catch (e) {
442
+ if (e instanceof TomlEditError) {
443
+ error(`${filePath}: ${e.message}`);
444
+ process.exit(1);
445
+ }
446
+ throw e;
447
+ }
448
+ applied.push(path);
449
+ }
450
+ writeFileSync(filePath, text);
451
+ success(`Updated ${filePath} (${applied.join(", ")})`);
452
+ // The follow-up has to be a command that actually runs: `--only` takes
453
+ // `app`, `var/<KEY>` per var, or `<type>/<key>` where the key is the one
454
+ // push derives from the file — for a metadata-category config that is the
455
+ // `resourceType#category` pair, not the file name.
456
+ const pushTargets = descriptor.type === "app"
457
+ ? ["app"]
458
+ : descriptor.type === "var"
459
+ ? applied.map((path) => `var/${path}`)
460
+ : [`${descriptor.type}/${pushSelectorKey(descriptor, filePath)}`];
461
+ info(`Next: 'primitive config push --only ${pushTargets.join(",")}' to apply it.`);
462
+ });
463
+ return config;
464
+ }
465
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/commands/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC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IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC;gBACtC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,IAAI,IAAI,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;QACxE,IAAI,CACF,uCAAuC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC7E,CAAC;IACJ,CAAC,CAAC,CAAC;IAEL,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function registerConnectionsCommands(program: Command): void;
@@ -0,0 +1,99 @@
1
+ import { Option } from "commander";
2
+ import { ApiClient } from "../lib/api-client.js";
3
+ import { resolveAppId } from "../lib/config.js";
4
+ import { error, info, formatTable, formatDate, json, } from "../lib/output.js";
5
+ import { resolveUserSelector } from "../lib/user-selector.js";
6
+ import { normalizeCliListEnvelope } from "../lib/paginate.js";
7
+ import { parsePageLimit } from "../lib/list-options.js";
8
+ export function registerConnectionsCommands(program) {
9
+ const connections = program
10
+ .command("connections")
11
+ .description("Inspect the live WebSocket connections the server believes exist")
12
+ .addHelpText("after", `
13
+ Freshness: these are the connections the server believes are live — exact when a
14
+ client disconnects gracefully, otherwise bounded by each row's EXPIRES time.
15
+
16
+ Each row is a single connection-to-subscription binding, so the same CONNECTION
17
+ can appear on more than one row (one per document/database subscription plus the
18
+ user notification channel).
19
+
20
+ Examples:
21
+ $ primitive connections list --document 01HXY...
22
+ $ primitive connections list --user-id 01HXY...
23
+ $ primitive connections list --database 01HXY... --limit 50
24
+ $ primitive connections list --user-id 01HXY... --json
25
+ `);
26
+ connections
27
+ .command("list")
28
+ .description("List live connections for exactly one of a document, user, or database")
29
+ .option("--app <app-id>", "App ID (uses current app if not specified)")
30
+ .option("--document <document-id>", "List connections for this document")
31
+ .option("--user-id <user-id>", "List connections for this user")
32
+ // Deprecated alias of --user-id, kept accepted but out of --help (#2357).
33
+ .addOption(new Option("--user <user-id>", "Deprecated alias of --user-id").hideHelp())
34
+ .option("--database <database-id>", "List database subscriptions for this database")
35
+ .option("--limit <n>", "Maximum rows to return (default 25, max 100)")
36
+ .option("--cursor <cursor>", "Pagination cursor from a previous page")
37
+ .option("--json", "Output as JSON")
38
+ .action(async (options) => {
39
+ const userId = resolveUserSelector(options, "connections list");
40
+ const selectors = [
41
+ options.document ? "document" : null,
42
+ userId ? "user" : null,
43
+ options.database ? "database" : null,
44
+ ].filter(Boolean);
45
+ if (selectors.length === 0) {
46
+ error("Provide exactly one selector: --document, --user-id, or --database.");
47
+ process.exit(1);
48
+ }
49
+ if (selectors.length > 1) {
50
+ error("Provide only one selector: --document, --user-id, or --database (not more than one).");
51
+ process.exit(1);
52
+ }
53
+ const resolvedAppId = resolveAppId(undefined, options);
54
+ const client = new ApiClient();
55
+ const limit = parsePageLimit(options.limit);
56
+ try {
57
+ const page = normalizeCliListEnvelope(await client.listConnections(resolvedAppId, {
58
+ documentId: options.document,
59
+ userId,
60
+ databaseId: options.database,
61
+ }, { limit, cursor: options.cursor }));
62
+ const { items, nextCursor } = page;
63
+ if (options.json) {
64
+ json(page);
65
+ return;
66
+ }
67
+ if (items.length === 0) {
68
+ info("No live connections found.");
69
+ return;
70
+ }
71
+ // `formatTable`'s per-column `format` receives only the cell value, so
72
+ // derive the composite TARGET column onto each display row up front.
73
+ const rows = items.map((row) => ({
74
+ ...row,
75
+ target: row.kind === "document"
76
+ ? row.documentId
77
+ : row.kind === "database-subscription"
78
+ ? `${row.databaseId} / ${row.subscriptionKey}`
79
+ : "(user channel)",
80
+ }));
81
+ console.log(formatTable(rows, [
82
+ { header: "CONNECTION", key: "connectionId" },
83
+ { header: "KIND", key: "kind" },
84
+ { header: "USER", key: "userId" },
85
+ { header: "TARGET", key: "target" },
86
+ { header: "CONNECTED", key: "connectedAt", format: formatDate },
87
+ { header: "EXPIRES", key: "expiresAt", format: formatDate },
88
+ ]));
89
+ if (nextCursor) {
90
+ info(`More results available. Re-run with --cursor ${nextCursor}`);
91
+ }
92
+ }
93
+ catch (err) {
94
+ error(err.message);
95
+ process.exit(1);
96
+ }
97
+ });
98
+ }
99
+ //# sourceMappingURL=connections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connections.js","sourceRoot":"","sources":["../../../src/commands/connections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,KAAK,EACL,IAAI,EACJ,WAAW,EACX,UAAU,EACV,IAAI,GACL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,UAAU,2BAA2B,CAAC,OAAgB;IAC1D,MAAM,WAAW,GAAG,OAAO;SACxB,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,kEAAkE,CAAC;SAC/E,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;CAaL,CACI,CAAC;IAEJ,WAAW;SACR,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CACV,wEAAwE,CACzE;SACA,MAAM,CAAC,gBAAgB,EAAE,4CAA4C,CAAC;SACtE,MAAM,CAAC,0BAA0B,EAAE,oCAAoC,CAAC;SACxE,MAAM,CAAC,qBAAqB,EAAE,gCAAgC,CAAC;QAChE,0EAA0E;SACzE,SAAS,CAAC,IAAI,MAAM,CAAC,kBAAkB,EAAE,+BAA+B,CAAC,CAAC,QAAQ,EAAE,CAAC;SACrF,MAAM,CAAC,0BAA0B,EAAE,+CAA+C,CAAC;SACnF,MAAM,CAAC,aAAa,EAAE,8CAA8C,CAAC;SACrE,MAAM,CAAC,mBAAmB,E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