primitive-admin 1.2.0-alpha.8 → 1.3.0-alpha.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.
- package/README.md +258 -186
- package/assets/skill/skills/primitive-platform/SKILL.md +103 -29
- package/dist/bin/primitive.js +15 -89
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/admins.js +80 -17
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/agent-sessions.d.ts +129 -0
- package/dist/src/commands/agent-sessions.js +532 -20
- package/dist/src/commands/agent-sessions.js.map +1 -1
- package/dist/src/commands/analytics.js +207 -155
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps-children.d.ts +1 -1
- package/dist/src/commands/apps-children.js +56 -145
- package/dist/src/commands/apps-children.js.map +1 -1
- package/dist/src/commands/apps-transitions.d.ts +39 -0
- package/dist/src/commands/apps-transitions.js +198 -0
- package/dist/src/commands/apps-transitions.js.map +1 -0
- package/dist/src/commands/apps.d.ts +17 -0
- package/dist/src/commands/apps.js +108 -3
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/auth-sessions.js +2 -0
- package/dist/src/commands/auth-sessions.js.map +1 -1
- package/dist/src/commands/auth.js +138 -44
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/blob-buckets.js +2 -0
- package/dist/src/commands/blob-buckets.js.map +1 -1
- package/dist/src/commands/collections.js +318 -256
- package/dist/src/commands/collections.js.map +1 -1
- package/dist/src/commands/comparisons.js +2 -0
- package/dist/src/commands/comparisons.js.map +1 -1
- package/dist/src/commands/config.d.ts +2 -2
- package/dist/src/commands/config.js +59 -33
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/connections.js +2 -0
- package/dist/src/commands/connections.js.map +1 -1
- package/dist/src/commands/database-type-configs.js +5 -3
- package/dist/src/commands/database-type-configs.js.map +1 -1
- package/dist/src/commands/database-types.js +13 -313
- package/dist/src/commands/database-types.js.map +1 -1
- package/dist/src/commands/databases.js +6 -4
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/db3-types.d.ts +15 -0
- package/dist/src/commands/db3-types.js +159 -0
- package/dist/src/commands/db3-types.js.map +1 -0
- package/dist/src/commands/db3.d.ts +24 -0
- package/dist/src/commands/db3.js +1444 -0
- package/dist/src/commands/db3.js.map +1 -0
- package/dist/src/commands/documents.d.ts +110 -10
- package/dist/src/commands/documents.js +1012 -748
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/email-templates.js +74 -0
- package/dist/src/commands/email-templates.js.map +1 -1
- package/dist/src/commands/env.js +8 -4
- package/dist/src/commands/env.js.map +1 -1
- package/dist/src/commands/function-trigger-commands.d.ts +28 -0
- package/dist/src/commands/function-trigger-commands.js +341 -0
- package/dist/src/commands/function-trigger-commands.js.map +1 -0
- package/dist/src/commands/functions.js +376 -30
- package/dist/src/commands/functions.js.map +1 -1
- package/dist/src/commands/groups.js +168 -50
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/guides.js +7 -5
- package/dist/src/commands/guides.js.map +1 -1
- package/dist/src/commands/hosting.d.ts +8 -0
- package/dist/src/commands/hosting.js +346 -0
- package/dist/src/commands/hosting.js.map +1 -0
- package/dist/src/commands/init.js +129 -38
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.js +82 -53
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/llm.js +9 -6
- package/dist/src/commands/llm.js.map +1 -1
- package/dist/src/commands/locks.d.ts +5 -3
- package/dist/src/commands/locks.js +19 -61
- package/dist/src/commands/locks.js.map +1 -1
- package/dist/src/commands/metadata-category-configs.d.ts +2 -2
- package/dist/src/commands/metadata-category-configs.js +4 -2
- package/dist/src/commands/metadata-category-configs.js.map +1 -1
- package/dist/src/commands/metadata.js +41 -0
- package/dist/src/commands/metadata.js.map +1 -1
- package/dist/src/commands/prompts.js +75 -52
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rate-counters.d.ts +19 -0
- package/dist/src/commands/rate-counters.js +104 -0
- package/dist/src/commands/rate-counters.js.map +1 -0
- package/dist/src/commands/rule-sets.d.ts +1 -1
- package/dist/src/commands/rule-sets.js +2 -1
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/schemas.d.ts +15 -0
- package/dist/src/commands/schemas.js +122 -0
- package/dist/src/commands/schemas.js.map +1 -0
- package/dist/src/commands/scripts.d.ts +9 -17
- package/dist/src/commands/scripts.js +24 -479
- package/dist/src/commands/scripts.js.map +1 -1
- package/dist/src/commands/secrets.js +47 -3
- package/dist/src/commands/secrets.js.map +1 -1
- package/dist/src/commands/sessions.js +2 -0
- package/dist/src/commands/sessions.js.map +1 -1
- package/dist/src/commands/settings.d.ts +12 -9
- package/dist/src/commands/settings.js +31 -79
- package/dist/src/commands/settings.js.map +1 -1
- package/dist/src/commands/skill.js +2 -0
- package/dist/src/commands/skill.js.map +1 -1
- package/dist/src/commands/sync-schemas.d.ts +202 -0
- package/dist/src/commands/sync-schemas.js +629 -0
- package/dist/src/commands/sync-schemas.js.map +1 -0
- package/dist/src/commands/sync-user-properties.d.ts +118 -0
- package/dist/src/commands/sync-user-properties.js +276 -0
- package/dist/src/commands/sync-user-properties.js.map +1 -0
- package/dist/src/commands/sync.d.ts +519 -554
- package/dist/src/commands/sync.js +3010 -4909
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/tokens.js +5 -3
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/commands/transitions.d.ts +54 -0
- package/dist/src/commands/transitions.js +418 -0
- package/dist/src/commands/transitions.js.map +1 -0
- package/dist/src/commands/usage.d.ts +18 -0
- package/dist/src/commands/usage.js +343 -0
- package/dist/src/commands/usage.js.map +1 -0
- package/dist/src/commands/user-properties.d.ts +14 -0
- package/dist/src/commands/user-properties.js +79 -0
- package/dist/src/commands/user-properties.js.map +1 -0
- package/dist/src/commands/users.js +911 -18
- package/dist/src/commands/users.js.map +1 -1
- package/dist/src/commands/vars.js +2 -0
- package/dist/src/commands/vars.js.map +1 -1
- package/dist/src/commands/waitlist.js +39 -4
- package/dist/src/commands/waitlist.js.map +1 -1
- package/dist/src/commands/workflows.d.ts +5 -83
- package/dist/src/commands/workflows.js +57 -2282
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/analytics-query.d.ts +58 -0
- package/dist/src/lib/analytics-query.js +134 -0
- package/dist/src/lib/analytics-query.js.map +1 -0
- package/dist/src/lib/api-client.d.ts +1830 -429
- package/dist/src/lib/api-client.js +1025 -546
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-settings-descriptor.d.ts +1 -1
- package/dist/src/lib/app-settings-descriptor.js +6 -0
- package/dist/src/lib/app-settings-descriptor.js.map +1 -1
- package/dist/src/lib/auth-fixtures.d.ts +44 -0
- package/dist/src/lib/auth-fixtures.js +61 -0
- package/dist/src/lib/auth-fixtures.js.map +1 -0
- package/dist/src/lib/auth-flow.d.ts +34 -1
- package/dist/src/lib/auth-flow.js +429 -13
- package/dist/src/lib/auth-flow.js.map +1 -1
- package/dist/src/lib/block-layout.d.ts +12 -23
- package/dist/src/lib/block-layout.js +26 -92
- package/dist/src/lib/block-layout.js.map +1 -1
- package/dist/src/lib/block-selector.d.ts +8 -14
- package/dist/src/lib/block-selector.js +8 -19
- package/dist/src/lib/block-selector.js.map +1 -1
- package/dist/src/lib/child-apps-local.d.ts +3 -47
- package/dist/src/lib/child-apps-local.js +11 -73
- package/dist/src/lib/child-apps-local.js.map +1 -1
- package/dist/src/lib/cli-manifest.d.ts +9 -0
- package/dist/src/lib/cli-manifest.js +10 -1
- package/dist/src/lib/cli-manifest.js.map +1 -1
- package/dist/src/lib/cli-version.d.ts +14 -0
- package/dist/src/lib/cli-version.js +38 -0
- package/dist/src/lib/cli-version.js.map +1 -0
- package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
- package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
- package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
- package/dist/src/lib/collection-export.d.ts +76 -15
- package/dist/src/lib/collection-export.js +116 -23
- package/dist/src/lib/collection-export.js.map +1 -1
- package/dist/src/lib/collection-principal.d.ts +22 -0
- package/dist/src/lib/collection-principal.js +35 -0
- package/dist/src/lib/collection-principal.js.map +1 -0
- package/dist/src/lib/command-groups.d.ts +30 -0
- package/dist/src/lib/command-groups.js +109 -0
- package/dist/src/lib/command-groups.js.map +1 -0
- package/dist/src/lib/command-status.d.ts +147 -0
- package/dist/src/lib/command-status.js +266 -0
- package/dist/src/lib/command-status.js.map +1 -0
- package/dist/src/lib/config-object-descriptor.d.ts +9 -22
- package/dist/src/lib/config-object-descriptor.js +107 -276
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/config-surface.d.ts +3 -7
- package/dist/src/lib/config-surface.js +9 -13
- package/dist/src/lib/config-surface.js.map +1 -1
- package/dist/src/lib/config-toml.d.ts +11 -2
- package/dist/src/lib/config-toml.js +25 -2
- package/dist/src/lib/config-toml.js.map +1 -1
- package/dist/src/lib/credentials-home.d.ts +7 -0
- package/dist/src/lib/credentials-home.js +45 -10
- package/dist/src/lib/credentials-home.js.map +1 -1
- package/dist/src/lib/credentials-lock.d.ts +14 -6
- package/dist/src/lib/credentials-lock.js +90 -10
- package/dist/src/lib/credentials-lock.js.map +1 -1
- package/dist/src/lib/credentials-store.d.ts +123 -70
- package/dist/src/lib/credentials-store.js +358 -113
- package/dist/src/lib/credentials-store.js.map +1 -1
- package/dist/src/lib/custodian.d.ts +8 -0
- package/dist/src/lib/custodian.js +18 -0
- package/dist/src/lib/custodian.js.map +1 -0
- package/dist/src/lib/data-input.d.ts +1 -1
- package/dist/src/lib/data-input.js +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
- package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
- package/dist/src/lib/db-codegen/dbTypeIR.d.ts +38 -1
- package/dist/src/lib/db-codegen/dbTypeIR.js +29 -7
- package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
- package/dist/src/lib/db-type-records.d.ts +106 -0
- package/dist/src/lib/db-type-records.js +224 -0
- package/dist/src/lib/db-type-records.js.map +1 -0
- package/dist/src/lib/db3-export.d.ts +287 -0
- package/dist/src/lib/db3-export.js +647 -0
- package/dist/src/lib/db3-export.js.map +1 -0
- package/dist/src/lib/db3-index-output.d.ts +116 -0
- package/dist/src/lib/db3-index-output.js +223 -0
- package/dist/src/lib/db3-index-output.js.map +1 -0
- package/dist/src/lib/db3-type-models.d.ts +134 -0
- package/dist/src/lib/db3-type-models.js +452 -0
- package/dist/src/lib/db3-type-models.js.map +1 -0
- package/dist/src/lib/deprecation.d.ts +2 -2
- package/dist/src/lib/deprecation.js +2 -2
- package/dist/src/lib/document-ingest-artifact.d.ts +13 -0
- package/dist/src/lib/document-ingest-artifact.js +36 -6
- package/dist/src/lib/document-ingest-artifact.js.map +1 -1
- package/dist/src/lib/document-ingest-format2.d.ts +36 -0
- package/dist/src/lib/document-ingest-format2.js +78 -0
- package/dist/src/lib/document-ingest-format2.js.map +1 -0
- package/dist/src/lib/document-ingest-input.d.ts +9 -0
- package/dist/src/lib/document-ingest-input.js +28 -1
- package/dist/src/lib/document-ingest-input.js.map +1 -1
- package/dist/src/lib/document-ingest.d.ts +11 -1
- package/dist/src/lib/document-ingest.js +16 -0
- package/dist/src/lib/document-ingest.js.map +1 -1
- package/dist/src/lib/document-schema-rows.d.ts +42 -0
- package/dist/src/lib/document-schema-rows.js +53 -0
- package/dist/src/lib/document-schema-rows.js.map +1 -0
- package/dist/src/lib/experimental-apis.d.ts +36 -0
- package/dist/src/lib/experimental-apis.js +46 -0
- package/dist/src/lib/experimental-apis.js.map +1 -0
- package/dist/src/lib/file-attachment.d.ts +24 -0
- package/dist/src/lib/file-attachment.js +31 -0
- package/dist/src/lib/file-attachment.js.map +1 -0
- package/dist/src/lib/function-authorize-check.d.ts +142 -0
- package/dist/src/lib/function-authorize-check.js +311 -0
- package/dist/src/lib/function-authorize-check.js.map +1 -0
- package/dist/src/lib/function-authorize-view.d.ts +27 -0
- package/dist/src/lib/function-authorize-view.js +88 -0
- package/dist/src/lib/function-authorize-view.js.map +1 -0
- package/dist/src/lib/function-bundle.d.ts +27 -5
- package/dist/src/lib/function-bundle.js +142 -7
- package/dist/src/lib/function-bundle.js.map +1 -1
- package/dist/src/lib/function-collect.d.ts +90 -12
- package/dist/src/lib/function-collect.js +482 -12
- package/dist/src/lib/function-collect.js.map +1 -1
- package/dist/src/lib/function-db-types.d.ts +65 -11
- package/dist/src/lib/function-db-types.js +297 -157
- package/dist/src/lib/function-db-types.js.map +1 -1
- package/dist/src/lib/function-document-types.d.ts +19 -7
- package/dist/src/lib/function-document-types.js +24 -12
- package/dist/src/lib/function-document-types.js.map +1 -1
- package/dist/src/lib/function-lint.d.ts +57 -0
- package/dist/src/lib/function-lint.js +234 -0
- package/dist/src/lib/function-lint.js.map +1 -0
- package/dist/src/lib/function-log-row.js +21 -2
- package/dist/src/lib/function-log-row.js.map +1 -1
- package/dist/src/lib/function-run.d.ts +13 -21
- package/dist/src/lib/function-run.js +14 -27
- package/dist/src/lib/function-run.js.map +1 -1
- package/dist/src/lib/function-schema-codegen.d.ts +86 -22
- package/dist/src/lib/function-schema-codegen.js +194 -88
- package/dist/src/lib/function-schema-codegen.js.map +1 -1
- package/dist/src/lib/function-schema-refs.d.ts +98 -0
- package/dist/src/lib/function-schema-refs.js +177 -0
- package/dist/src/lib/function-schema-refs.js.map +1 -0
- package/dist/src/lib/function-sync.d.ts +109 -6
- package/dist/src/lib/function-sync.js +179 -26
- package/dist/src/lib/function-sync.js.map +1 -1
- package/dist/src/lib/function-trigger-listing.d.ts +11 -6
- package/dist/src/lib/function-trigger-listing.js +32 -11
- package/dist/src/lib/function-trigger-listing.js.map +1 -1
- package/dist/src/lib/function-triggers.d.ts +15 -3
- package/dist/src/lib/function-triggers.js +72 -10
- package/dist/src/lib/function-triggers.js.map +1 -1
- package/dist/src/lib/function-typecheck.d.ts +52 -0
- package/dist/src/lib/function-typecheck.js +174 -54
- package/dist/src/lib/function-typecheck.js.map +1 -1
- package/dist/src/lib/function-versions.d.ts +2 -0
- package/dist/src/lib/function-versions.js +1 -0
- package/dist/src/lib/function-versions.js.map +1 -1
- package/dist/src/lib/generated-build-flags.d.ts +13 -0
- package/dist/src/lib/generated-build-flags.js +14 -0
- package/dist/src/lib/generated-build-flags.js.map +1 -0
- package/dist/src/lib/generated-command-status.d.ts +6 -0
- package/dist/src/lib/generated-command-status.js +469 -0
- package/dist/src/lib/generated-command-status.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +586 -152
- package/dist/src/lib/generated-config-surfaces.js +1919 -1883
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/generated-workflow-model-fields.d.ts +20 -0
- package/dist/src/lib/generated-workflow-model-fields.js +53 -0
- package/dist/src/lib/generated-workflow-model-fields.js.map +1 -0
- package/dist/src/lib/hosting-build.d.ts +97 -0
- package/dist/src/lib/hosting-build.js +204 -0
- package/dist/src/lib/hosting-build.js.map +1 -0
- package/dist/src/lib/hosting-client.d.ts +167 -0
- package/dist/src/lib/hosting-client.js +340 -0
- package/dist/src/lib/hosting-client.js.map +1 -0
- package/dist/src/lib/hosting-environments.d.ts +32 -0
- package/dist/src/lib/hosting-environments.js +74 -0
- package/dist/src/lib/hosting-environments.js.map +1 -0
- package/dist/src/lib/hosting-errors.d.ts +30 -0
- package/dist/src/lib/hosting-errors.js +43 -0
- package/dist/src/lib/hosting-errors.js.map +1 -0
- package/dist/src/lib/hosting-token.d.ts +46 -0
- package/dist/src/lib/hosting-token.js +60 -0
- package/dist/src/lib/hosting-token.js.map +1 -0
- package/dist/src/lib/hosting-wait.d.ts +42 -0
- package/dist/src/lib/hosting-wait.js +84 -0
- package/dist/src/lib/hosting-wait.js.map +1 -0
- package/dist/src/lib/hosting-wfp-upload.d.ts +86 -0
- package/dist/src/lib/hosting-wfp-upload.js +149 -0
- package/dist/src/lib/hosting-wfp-upload.js.map +1 -0
- package/dist/src/lib/init-assets.d.ts +2 -6
- package/dist/src/lib/init-assets.js +11 -27
- package/dist/src/lib/init-assets.js.map +1 -1
- package/dist/src/lib/init-ios-links.d.ts +11 -7
- package/dist/src/lib/init-ios-links.js +28 -22
- package/dist/src/lib/init-ios-links.js.map +1 -1
- package/dist/src/lib/init-login-note.d.ts +13 -0
- package/dist/src/lib/init-login-note.js +22 -0
- package/dist/src/lib/init-login-note.js.map +1 -0
- package/dist/src/lib/init-schema.d.ts +15 -0
- package/dist/src/lib/init-schema.js +54 -0
- package/dist/src/lib/init-schema.js.map +1 -1
- package/dist/src/lib/integration-test-request.d.ts +54 -0
- package/dist/src/lib/integration-test-request.js +207 -0
- package/dist/src/lib/integration-test-request.js.map +1 -0
- package/dist/src/lib/invoker-shared-enums.d.ts +35 -0
- package/dist/src/lib/invoker-shared-enums.js +98 -0
- package/dist/src/lib/invoker-shared-enums.js.map +1 -0
- package/dist/src/lib/json-value.d.ts +6 -0
- package/dist/src/lib/json-value.js +13 -0
- package/dist/src/lib/json-value.js.map +1 -0
- package/dist/src/lib/load-routes.d.ts +33 -0
- package/dist/src/lib/load-routes.js +35 -0
- package/dist/src/lib/load-routes.js.map +1 -0
- package/dist/src/lib/log-inspection.d.ts +23 -4
- package/dist/src/lib/log-inspection.js +14 -5
- package/dist/src/lib/log-inspection.js.map +1 -1
- package/dist/src/lib/login-exchange-check.d.ts +18 -0
- package/dist/src/lib/login-exchange-check.js +27 -0
- package/dist/src/lib/login-exchange-check.js.map +1 -0
- package/dist/src/lib/login-scope-lines.d.ts +17 -7
- package/dist/src/lib/login-scope-lines.js +33 -10
- package/dist/src/lib/login-scope-lines.js.map +1 -1
- package/dist/src/lib/metadata-report.d.ts +85 -0
- package/dist/src/lib/metadata-report.js +81 -0
- package/dist/src/lib/metadata-report.js.map +1 -0
- package/dist/src/lib/object-status-filter.d.ts +9 -1
- package/dist/src/lib/object-status-filter.js +9 -1
- package/dist/src/lib/object-status-filter.js.map +1 -1
- package/dist/src/lib/output.d.ts +1 -1
- package/dist/src/lib/output.js +3 -1
- package/dist/src/lib/output.js.map +1 -1
- package/dist/src/lib/pin-refusal-hint.d.ts +12 -0
- package/dist/src/lib/pin-refusal-hint.js +35 -0
- package/dist/src/lib/pin-refusal-hint.js.map +1 -0
- package/dist/src/lib/platform-owned.js +5 -0
- package/dist/src/lib/platform-owned.js.map +1 -1
- package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
- package/dist/src/lib/primitive-declaration-names.js +22 -0
- package/dist/src/lib/primitive-declaration-names.js.map +1 -0
- package/dist/src/lib/primitive-declaration.d.ts +174 -0
- package/dist/src/lib/primitive-declaration.js +792 -0
- package/dist/src/lib/primitive-declaration.js.map +1 -0
- package/dist/src/lib/primitive-env-plugin.d.ts +99 -0
- package/dist/src/lib/primitive-env-plugin.js +408 -0
- package/dist/src/lib/primitive-env-plugin.js.map +1 -0
- package/dist/src/lib/project-login-apps.d.ts +8 -0
- package/dist/src/lib/project-login-apps.js +27 -0
- package/dist/src/lib/project-login-apps.js.map +1 -0
- package/dist/src/lib/prompt-schema-codegen.d.ts +46 -15
- package/dist/src/lib/prompt-schema-codegen.js +142 -108
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
- package/dist/src/lib/prompt-schema-document.d.ts +35 -0
- package/dist/src/lib/prompt-schema-document.js +92 -0
- package/dist/src/lib/prompt-schema-document.js.map +1 -0
- package/dist/src/lib/prompt-schema-refs.d.ts +173 -0
- package/dist/src/lib/prompt-schema-refs.js +478 -0
- package/dist/src/lib/prompt-schema-refs.js.map +1 -0
- package/dist/src/lib/records-verbs.d.ts +79 -0
- package/dist/src/lib/records-verbs.js +45 -0
- package/dist/src/lib/records-verbs.js.map +1 -0
- package/dist/src/lib/register-commands.d.ts +36 -0
- package/dist/src/lib/register-commands.js +37 -0
- package/dist/src/lib/register-commands.js.map +1 -0
- package/dist/src/lib/retired-imports.d.ts +53 -0
- package/dist/src/lib/retired-imports.js +120 -0
- package/dist/src/lib/retired-imports.js.map +1 -0
- package/dist/src/lib/run-status.d.ts +1 -1
- package/dist/src/lib/run-status.generated.d.ts +2 -2
- package/dist/src/lib/run-status.generated.js +3 -1
- package/dist/src/lib/run-status.generated.js.map +1 -1
- package/dist/src/lib/run-status.js +1 -1
- package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
- package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
- package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js +227 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +218 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.js +397 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
- package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
- package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +258 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +422 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.d.ts +27 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.js +126 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.js.map +1 -0
- package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
- package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
- package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
- package/dist/src/lib/schema-codegen/naming.d.ts +35 -0
- package/dist/src/lib/schema-codegen/naming.js +83 -0
- package/dist/src/lib/schema-codegen/naming.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
- package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
- package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
- package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
- package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
- package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
- package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaToTs.d.ts +109 -0
- package/dist/src/lib/schema-codegen/schemaToTs.js +269 -0
- package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -0
- package/dist/src/lib/schema-codegen/valuesLists.d.ts +48 -0
- package/dist/src/lib/schema-codegen/valuesLists.js +144 -0
- package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
- package/dist/src/lib/schema-family-index.d.ts +228 -0
- package/dist/src/lib/schema-family-index.js +813 -0
- package/dist/src/lib/schema-family-index.js.map +1 -0
- package/dist/src/lib/schema-pins.d.ts +82 -0
- package/dist/src/lib/schema-pins.js +198 -0
- package/dist/src/lib/schema-pins.js.map +1 -0
- package/dist/src/lib/schema-preview.d.ts +244 -0
- package/dist/src/lib/schema-preview.js +498 -0
- package/dist/src/lib/schema-preview.js.map +1 -0
- package/dist/src/lib/scope-request.d.ts +23 -11
- package/dist/src/lib/scope-request.js +69 -31
- package/dist/src/lib/scope-request.js.map +1 -1
- package/dist/src/lib/session-scope.d.ts +26 -0
- package/dist/src/lib/session-scope.js +58 -0
- package/dist/src/lib/session-scope.js.map +1 -0
- package/dist/src/lib/skill-installer.d.ts +2 -2
- package/dist/src/lib/skill-installer.js +2 -21
- package/dist/src/lib/skill-installer.js.map +1 -1
- package/dist/src/lib/step-run-table.d.ts +1 -2
- package/dist/src/lib/step-run-table.js +1 -2
- package/dist/src/lib/step-run-table.js.map +1 -1
- package/dist/src/lib/swift-codegen/agentGenerator.d.ts +8 -3
- package/dist/src/lib/swift-codegen/agentGenerator.js +76 -22
- package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
- package/dist/src/lib/swift-codegen/banners.js +12 -0
- package/dist/src/lib/swift-codegen/banners.js.map +1 -1
- package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
- package/dist/src/lib/swift-codegen/functionGenerator.js +169 -51
- package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +33 -9
- package/dist/src/lib/swift-codegen/schemaToSwift.js +215 -179
- package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
- package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +45 -0
- package/dist/src/lib/swift-codegen/sharedGenerator.js +165 -0
- package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
- package/dist/src/lib/swift-codegen/swiftKeys.d.ts +19 -0
- package/dist/src/lib/swift-codegen/swiftKeys.js +31 -0
- package/dist/src/lib/swift-codegen/swiftKeys.js.map +1 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
- package/dist/src/lib/sync-resource-types.d.ts +117 -31
- package/dist/src/lib/sync-resource-types.js +197 -189
- package/dist/src/lib/sync-resource-types.js.map +1 -1
- package/dist/src/lib/sync-selectors.d.ts +7 -0
- package/dist/src/lib/sync-selectors.js +22 -2
- package/dist/src/lib/sync-selectors.js.map +1 -1
- package/dist/src/lib/template.d.ts +39 -3
- package/dist/src/lib/template.js +103 -14
- package/dist/src/lib/template.js.map +1 -1
- package/dist/src/lib/test-case-file-names.d.ts +3 -5
- package/dist/src/lib/test-case-file-names.js +3 -5
- package/dist/src/lib/test-case-file-names.js.map +1 -1
- package/dist/src/lib/test-runs.d.ts +45 -0
- package/dist/src/lib/test-runs.js +150 -0
- package/dist/src/lib/test-runs.js.map +1 -0
- package/dist/src/lib/test-users.d.ts +25 -0
- package/dist/src/lib/test-users.js +36 -0
- package/dist/src/lib/test-users.js.map +1 -0
- package/dist/src/lib/toml-database-config.d.ts +4 -2
- package/dist/src/lib/toml-database-config.js +11 -6
- package/dist/src/lib/toml-database-config.js.map +1 -1
- package/dist/src/lib/toml-scalar-edit.js +6 -4
- package/dist/src/lib/toml-scalar-edit.js.map +1 -1
- package/dist/src/lib/transition-warnings.d.ts +21 -0
- package/dist/src/lib/transition-warnings.js +49 -0
- package/dist/src/lib/transition-warnings.js.map +1 -0
- package/dist/src/lib/user-index.d.ts +80 -0
- package/dist/src/lib/user-index.js +166 -0
- package/dist/src/lib/user-index.js.map +1 -0
- package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
- package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
- package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
- package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
- package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
- package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
- package/dist/src/lib/user-walk.d.ts +31 -0
- package/dist/src/lib/user-walk.js +102 -0
- package/dist/src/lib/user-walk.js.map +1 -0
- package/dist/src/lib/webhook-capture.d.ts +43 -0
- package/dist/src/lib/webhook-capture.js +91 -0
- package/dist/src/lib/webhook-capture.js.map +1 -0
- package/dist/src/lib/webhook-deliver.d.ts +18 -20
- package/dist/src/lib/webhook-deliver.js +34 -89
- package/dist/src/lib/webhook-deliver.js.map +1 -1
- package/dist/src/lib/webhook-test-run.d.ts +32 -0
- package/dist/src/lib/webhook-test-run.js +108 -0
- package/dist/src/lib/webhook-test-run.js.map +1 -0
- package/dist/src/lib/worker-perf-format.d.ts +22 -0
- package/dist/src/lib/worker-perf-format.js +27 -0
- package/dist/src/lib/worker-perf-format.js.map +1 -0
- package/dist/src/lib/workflow-field-descriptor.d.ts +91 -0
- package/dist/src/lib/workflow-field-descriptor.js +153 -0
- package/dist/src/lib/workflow-field-descriptor.js.map +1 -0
- package/dist/src/types/index.d.ts +20 -65
- package/dist/src/validators.d.ts +7 -55
- package/dist/src/validators.js +7 -53
- package/dist/src/validators.js.map +1 -1
- package/dist/src/vite.d.ts +17 -0
- package/dist/src/vite.js +18 -0
- package/dist/src/vite.js.map +1 -0
- package/package.json +20 -9
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# primitive-admin CLI
|
|
2
2
|
|
|
3
|
-
Command-line interface for administering Primitive applications. This CLI provides full control over your Primitive apps, including user management, integrations, prompts,
|
|
3
|
+
Command-line interface for administering Primitive applications. This CLI provides full control over your Primitive apps, including user management, integrations, prompts, server functions, and configuration sync.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -82,7 +82,7 @@ primitive -e prod login
|
|
|
82
82
|
# Login to a custom server from outside a project
|
|
83
83
|
PRIMITIVE_SERVER_URL=https://api.example.com primitive login
|
|
84
84
|
|
|
85
|
-
# View current session
|
|
85
|
+
# View current session, including your app-creation limit
|
|
86
86
|
primitive whoami
|
|
87
87
|
|
|
88
88
|
# Get access token for scripting
|
|
@@ -99,9 +99,9 @@ environment's `apiUrl`. In a linked git worktree the file is the main
|
|
|
99
99
|
worktree's for the same project, so every worktree shares one login (and one
|
|
100
100
|
`logout`). A `login` run outside a project writes
|
|
101
101
|
`~/.primitive/credentials.json`. Both are mode 0600. Only `login`,
|
|
102
|
-
`logout`, `bootstrap` and `
|
|
103
|
-
stops with an error naming the missing `primitive/config.json`,
|
|
104
|
-
reading the global file (see [Outside a project](#outside-a-project)).
|
|
102
|
+
`logout`, `bootstrap`, `init` and `apps delete` work outside a project — every
|
|
103
|
+
other command stops with an error naming the missing `primitive/config.json`,
|
|
104
|
+
rather than reading the global file (see [Outside a project](#outside-a-project)).
|
|
105
105
|
|
|
106
106
|
## App Context
|
|
107
107
|
|
|
@@ -127,19 +127,32 @@ primitive users list 01HXYZ...
|
|
|
127
127
|
|
|
128
128
|
Commands with other required arguments use `--app`:
|
|
129
129
|
```bash
|
|
130
|
-
primitive
|
|
130
|
+
primitive prompts get <prompt-id> --app 01HXYZ...
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
### Outside a project
|
|
134
134
|
|
|
135
135
|
With no project config up the directory tree there is no environment, so there
|
|
136
136
|
is nothing for an app-scoped command to target. Only `login`, `logout`,
|
|
137
|
-
`bootstrap` and `
|
|
138
|
-
`env add`, `config pull`, …) exits non-zero with an
|
|
139
|
-
missing `primitive/config.json` and points at
|
|
140
|
-
falls back to `~/.primitive/credentials.json`
|
|
141
|
-
redirects a command at another project's tree
|
|
142
|
-
whose environment names the app.
|
|
137
|
+
`bootstrap`, `init`, `apps delete` and `whoami` work there; everything else
|
|
138
|
+
(`apps list`, `apps get`, `env add`, `config pull`, …) exits non-zero with an
|
|
139
|
+
error that names the missing `primitive/config.json` and points at
|
|
140
|
+
`primitive init`. The CLI never falls back to `~/.primitive/credentials.json`
|
|
141
|
+
for those commands, and no flag redirects a command at another project's tree
|
|
142
|
+
— run it from inside the project whose environment names the app.
|
|
143
|
+
|
|
144
|
+
`apps delete <app-id>` deletes an app by id with the login and step-up held
|
|
145
|
+
for the server `PRIMITIVE_SERVER_URL` names, or the default server when it is
|
|
146
|
+
unset — the server `login` signs in to there. A stored login another server
|
|
147
|
+
issued is refused and its tokens are not sent. `whoami` reports that server,
|
|
148
|
+
where it came from, and the login or `PRIMITIVE_TOKEN` it would use:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
PRIMITIVE_SERVER_URL=https://api.example.com primitive login --app all
|
|
152
|
+
PRIMITIVE_SERVER_URL=https://api.example.com primitive login --step-up --scope admin --app 01HXY...
|
|
153
|
+
PRIMITIVE_SERVER_URL=https://api.example.com primitive whoami
|
|
154
|
+
PRIMITIVE_SERVER_URL=https://api.example.com primitive apps delete 01HXY... --confirm "My App"
|
|
155
|
+
```
|
|
143
156
|
|
|
144
157
|
## Commands
|
|
145
158
|
|
|
@@ -150,7 +163,7 @@ Manage applications (requires admin access).
|
|
|
150
163
|
```bash
|
|
151
164
|
primitive apps list # List all accessible apps
|
|
152
165
|
primitive apps create "My App" # Create a new app (mints the app id)
|
|
153
|
-
primitive apps get <app-id> # Get app details
|
|
166
|
+
primitive apps get <app-id> # Get app details (a child's parent and lineage too)
|
|
154
167
|
primitive apps delete <app-id> # Delete an app
|
|
155
168
|
```
|
|
156
169
|
|
|
@@ -180,7 +193,8 @@ primitive users set-role [app-id] <user-id> <role> # Change role
|
|
|
180
193
|
primitive users set-profile [app-id] <user-id> [--name <name>] [--avatar-url <url> | --clear-avatar] # Set display name/avatar
|
|
181
194
|
primitive users transfer-owner [app-id] <new-owner-id> # Transfer ownership
|
|
182
195
|
primitive users mint-jwt <user-id> [--role <role>] # Mint test JWT (dev/test only)
|
|
183
|
-
primitive users invitations [app-id]
|
|
196
|
+
primitive users invitations list [app-id] [--limit <n>] [--cursor <c>] # List invitations with status and accept link
|
|
197
|
+
primitive users invitations revoke <invitation-id> # Revoke an invitation (and an admin's console invitation)
|
|
184
198
|
```
|
|
185
199
|
|
|
186
200
|
### Waitlist
|
|
@@ -190,7 +204,8 @@ Manage waitlist entries for apps in waitlist mode.
|
|
|
190
204
|
```bash
|
|
191
205
|
primitive waitlist list [app-id] # List waitlist entries
|
|
192
206
|
primitive waitlist invite [app-id] <waitlist-id> # Invite from waitlist
|
|
193
|
-
primitive waitlist bulk-invite [app-id] -n 10 # Bulk invite
|
|
207
|
+
primitive waitlist bulk-invite [app-id] -n 10 # Bulk invite the next 10 in line
|
|
208
|
+
primitive waitlist bulk-invite [app-id] --ids <id,...> # Bulk invite the named entries
|
|
194
209
|
primitive waitlist remove [app-id] <waitlist-id> # Remove from waitlist
|
|
195
210
|
```
|
|
196
211
|
|
|
@@ -202,6 +217,9 @@ Manage HTTP integrations (external API connections).
|
|
|
202
217
|
primitive integrations list [app-id] # List integrations
|
|
203
218
|
primitive integrations get <integration-id> # Get details
|
|
204
219
|
primitive integrations test <id> # Test connection
|
|
220
|
+
primitive integrations test <id> --method POST --path /upload \
|
|
221
|
+
--header 'X-Request-Id: abc' --field title=Report --file document=@./report.pdf
|
|
222
|
+
# --form, --raw-body <path|-> [--content-type] also
|
|
205
223
|
primitive integrations logs <id> # View invocation logs
|
|
206
224
|
```
|
|
207
225
|
|
|
@@ -214,6 +232,19 @@ primitive config create integration weather-api # scaffold the file
|
|
|
214
232
|
primitive config push --only integration/weather-api
|
|
215
233
|
```
|
|
216
234
|
|
|
235
|
+
**Tests** take the integration's key or ID:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
primitive integrations tests list <integration> [--limit <n>] [--cursor <cursor>]
|
|
239
|
+
primitive integrations tests run-all <integration>
|
|
240
|
+
primitive integrations tests runs <integration> [--limit <n>] [--cursor <cursor>] # One page of runs
|
|
241
|
+
primitive integrations tests runs get <integration> <run-id> # One run: output and checks
|
|
242
|
+
primitive comparisons get <group> # Every run of one run-all batch
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
`tests runs` no longer takes `--group`; read a batch's runs with
|
|
246
|
+
`comparisons get <group>`. An integration keyed `get` is listed by its ID.
|
|
247
|
+
|
|
217
248
|
**Secrets management:**
|
|
218
249
|
|
|
219
250
|
Integration-scoped secrets are **retired** — the `primitive integrations secrets`
|
|
@@ -228,6 +259,7 @@ Manage encrypted app secrets (API keys, tokens, credentials). Values are encrypt
|
|
|
228
259
|
```bash
|
|
229
260
|
primitive secrets list [--app <app-id>] # List secrets (values never shown)
|
|
230
261
|
primitive secrets set <KEY> --value <value> [--summary <text>] # Create or update a secret
|
|
262
|
+
primitive secrets set <KEY> --summary <text> | --clear-summary # Change a summary; the value is unchanged
|
|
231
263
|
primitive secrets delete <KEY> # Delete a secret
|
|
232
264
|
```
|
|
233
265
|
|
|
@@ -239,7 +271,7 @@ primitive secrets list --json
|
|
|
239
271
|
primitive secrets delete STRIPE_SECRET
|
|
240
272
|
```
|
|
241
273
|
|
|
242
|
-
Keys must be uppercase letters, digits, and underscores (e.g., `OPENAI_API_KEY`). Max 100 secrets per app, 2 KB per value. The `set` command is an upsert — it creates or updates automatically. Use `{{secrets.KEY}}` in
|
|
274
|
+
Keys must be uppercase letters, digits, and underscores (e.g., `OPENAI_API_KEY`). Max 100 secrets per app, 2 KB per value. The `set` command is an upsert — it creates or updates automatically. Use `{{secrets.KEY}}` in integration request templates and `secrets.KEY` in CEL rules.
|
|
243
275
|
|
|
244
276
|
### Prompts
|
|
245
277
|
|
|
@@ -249,6 +281,7 @@ Manage LLM prompt configurations.
|
|
|
249
281
|
primitive prompts list [app-id] # List prompts
|
|
250
282
|
primitive prompts get <prompt-id> # Get details
|
|
251
283
|
primitive prompts execute <id> --vars '{}' # Execute prompt
|
|
284
|
+
primitive prompts execute <id> --attach ./report.pdf # Execute with a file attachment (repeatable)
|
|
252
285
|
primitive prompts preview <id> --vars '{}' # Preview rendered template
|
|
253
286
|
```
|
|
254
287
|
|
|
@@ -268,108 +301,37 @@ primitive prompts configs list <prompt-id>
|
|
|
268
301
|
primitive prompts configs get <prompt> <config>
|
|
269
302
|
```
|
|
270
303
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
Manage multi-step workflow definitions.
|
|
304
|
+
**Tests** take the prompt's key or ID:
|
|
274
305
|
|
|
275
306
|
```bash
|
|
276
|
-
primitive
|
|
277
|
-
primitive
|
|
278
|
-
primitive
|
|
279
|
-
primitive
|
|
280
|
-
primitive
|
|
307
|
+
primitive prompts tests list <prompt> [--limit <n>] [--cursor <cursor>]
|
|
308
|
+
primitive prompts tests run-all <prompt>
|
|
309
|
+
primitive prompts tests runs <prompt> [--limit <n>] [--cursor <cursor>] # One page of runs
|
|
310
|
+
primitive prompts tests runs get <prompt> <run-id> # One run: output and checks
|
|
311
|
+
primitive comparisons get <group> # Every run of one run-all batch
|
|
281
312
|
```
|
|
282
313
|
|
|
283
|
-
|
|
284
|
-
`
|
|
314
|
+
`tests runs` no longer takes `--group`; read a batch's runs with
|
|
315
|
+
`comparisons get <group>`. A prompt keyed `get` is listed by its ID.
|
|
285
316
|
|
|
286
|
-
|
|
287
|
-
primitive config create workflow process-doc
|
|
288
|
-
primitive config push --only workflow/process-doc
|
|
289
|
-
```
|
|
317
|
+
### Email Templates
|
|
290
318
|
|
|
291
|
-
|
|
292
|
-
`workflows publish` and its endpoint are gone). A workflow created before the
|
|
293
|
-
configuration model — one with no active config — is migrated by authoring
|
|
294
|
-
`workflows/<key>.configs/<name>.toml`, setting `activeConfigName = "<name>"` in
|
|
295
|
-
`workflows/<key>.toml`, and pushing.
|
|
319
|
+
Read and preview the emails Primitive sends for an app.
|
|
296
320
|
|
|
297
|
-
**Run management:**
|
|
298
321
|
```bash
|
|
299
|
-
primitive
|
|
300
|
-
primitive
|
|
322
|
+
primitive email-templates list [app-id] # Email types and override status
|
|
323
|
+
primitive email-templates get <type> # Current template for a type
|
|
324
|
+
primitive email-templates variables <type> # Variables the type substitutes
|
|
325
|
+
primitive email-templates preview <type> [--vars '<json>'] # Render without sending
|
|
326
|
+
primitive email-templates test <type> # Send a test email
|
|
301
327
|
```
|
|
302
328
|
|
|
303
|
-
|
|
304
|
-
the only command that sends a workflow TOML since #2645 — runs the
|
|
305
|
-
file through `cli/src/lib/workflow-toml-validator.ts` before sending it to
|
|
306
|
-
the server. For a step whose `kind` the CLI knows about, the validator
|
|
307
|
-
rejects any top-level field outside the allowlist — most commonly catching
|
|
308
|
-
the footgun where `[steps.<id>.request]` is written under `[[steps]]` (TOML
|
|
309
|
-
places the sub-table under `steps[N][<id>]`, not the intended
|
|
310
|
-
`steps[N].request`, so the runtime silently runs the step with an empty
|
|
311
|
-
`request` block). The correct form for the most-recent step is
|
|
312
|
-
`[steps.request]`. For a step whose `kind` the CLI does NOT know (an older
|
|
313
|
-
CLI run against a newer server that registered a new step kind), the
|
|
314
|
-
per-field check is skipped — so a valid new-kind field is never falsely
|
|
315
|
-
rejected — while the kind-agnostic misnested-header footgun detector still
|
|
316
|
-
fires (issue #998).
|
|
317
|
-
|
|
318
|
-
**The allowlist is generated, not hand-maintained (issue #998):** The field
|
|
319
|
-
union and the known-kind set live in the committed artifact
|
|
320
|
-
`cli/src/lib/generated-allowlist.ts`, generated from the server step runners
|
|
321
|
-
(`src/workflows/steps/*.ts`) and the universal `BaseStepDefinition` shape by
|
|
322
|
-
`cli/scripts/gen-allowlist.mjs`. The generator runs automatically at CLI
|
|
323
|
-
`prebuild`; regenerate manually with `node cli/scripts/gen-allowlist.mjs`
|
|
324
|
-
(or `pnpm -C cli gen:allowlist`). The union is derived from what each runner
|
|
325
|
-
*reads* off the step config — not from what the `*StepDefinition` type
|
|
326
|
-
declares (types over-declare and would weaken the footgun detector). A
|
|
327
|
-
freshness guard (`node cli/scripts/gen-allowlist.mjs --check`, also asserted
|
|
328
|
-
by `cli/tests/unit/workflow-toml-validator-drift-guard.test.ts`) fails if the
|
|
329
|
-
committed artifact drifts from a fresh scan, so the historical hand-edit
|
|
330
|
-
drift (#685/#802/#971) cannot recur. When you add a new step kind or a runner
|
|
331
|
-
starts reading a new field, just regenerate and commit the artifact — there is
|
|
332
|
-
no hand-maintained list to update.
|
|
333
|
-
|
|
334
|
-
**A configuration object's field surface has ONE definition (issue #2644):**
|
|
335
|
-
`src/config-surface/` on the server records, per configuration object, which
|
|
336
|
-
`models.yaml` fields exist, which TOML key each carries, which modes the server
|
|
337
|
-
accepts it in, and — for a field with real behavior — the handler that owns it.
|
|
338
|
-
The server's create/update handlers take their accepted key set from it
|
|
339
|
-
(`pickWritableFields`), and `cli/scripts/gen-config-surfaces.mjs` vendors the
|
|
340
|
-
same modules into the committed artifact
|
|
341
|
-
`cli/src/lib/generated-config-surfaces.ts`, which the CLI's push builder, pull
|
|
342
|
-
serializer and TOML key validation read. The generator runs automatically at CLI
|
|
343
|
-
`prebuild`; regenerate manually with `node cli/scripts/gen-config-surfaces.mjs`
|
|
344
|
-
(or `pnpm -C cli gen:config-surfaces`).
|
|
345
|
-
|
|
346
|
-
Three hard-fail checks live in `cli/tests/unit/config-surface-drift-guard.test.ts`:
|
|
347
|
-
freshness (`--check`, a byte comparison), coverage (every model field of every
|
|
348
|
-
registered object is either exposed or classified `notExposed` **with a
|
|
349
|
-
reason**), and registry existence (every `SYNC_RESOURCE_TYPES` label has a
|
|
350
|
-
definition — the migration's `PENDING_MIGRATION` exemption list is gone, so
|
|
351
|
-
there is nowhere to park one). Add a
|
|
352
|
-
field to `models.yaml` and the CLI unit suite fails until you regenerate and
|
|
353
|
-
classify it — so the CLI can no longer silently drop a new server-side field.
|
|
354
|
-
This supersedes the workflow-only descriptor and generator from #2326.
|
|
355
|
-
|
|
356
|
-
**Template expressions are linted at push time (issue #2689):** the validator
|
|
357
|
-
also inspects every `{{ }}` expression on a step and rejects the ones that can
|
|
358
|
-
never resolve — an unknown root (`{{ inputs.userId }}`; the valid roots are
|
|
359
|
-
`input`, `steps`, `outputs`, `meta`, `secrets`, `vars`, plus the contextual
|
|
360
|
-
`selected`/`user`/`md`, the built-ins `now`/`today`/`uuid`/`ulid`, and — inside a
|
|
361
|
-
forEach step's body only — `iteration`/`loop` and the loop's binding name) or a
|
|
362
|
-
reference to a `steps.<id>` / `outputs.<name>` the file does not declare. An
|
|
363
|
-
expression that is only sometimes present is marked optional with
|
|
364
|
-
`| default: ''` or a trailing `|| ''`, and anything statically undecidable (a
|
|
365
|
-
dynamic bracket key) is left to the run-time check. The lint itself is a
|
|
366
|
-
verbatim generated copy of the server module
|
|
367
|
-
`src/workflows/runner/template-static-lint.ts` at
|
|
368
|
-
`cli/src/lib/generated-template-lint.ts` (`cli/scripts/gen-template-lint.mjs`,
|
|
369
|
-
run at `prebuild`, with a `--check` freshness mode asserted by
|
|
370
|
-
`cli/tests/unit/template-lint-drift-guard.test.ts`), so the CLI's push-time
|
|
371
|
-
verdict and the server's save-time verdict come from the same code.
|
|
329
|
+
`preview` renders the server's saved template (or the built-in default) with the type's sample values; `--vars` overrides them, e.g. `--vars '{"appName":"Acme"}'`. An override is authored in `email-templates/<emailType>.toml` and applied with `config push`:
|
|
372
330
|
|
|
331
|
+
```bash
|
|
332
|
+
primitive config create email-template email-sign-in
|
|
333
|
+
primitive config push --only email-template/email-sign-in
|
|
334
|
+
```
|
|
373
335
|
|
|
374
336
|
### Tokens
|
|
375
337
|
|
|
@@ -390,7 +352,14 @@ primitive tokens revoke <token-id> [app-id] # Revoke t
|
|
|
390
352
|
|
|
391
353
|
### Databases
|
|
392
354
|
|
|
393
|
-
|
|
355
|
+
A database is a `db3` on the CLI:
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
primitive db3 list --custodian <app|user:<user-id>> [--limit <n>] [--cursor <c>] # Databases one custodian holds
|
|
359
|
+
primitive db3 list --user-id <user-id> [--via held,shared,app] # Every database a user can open, sync-off included
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
Legacy online databases and their permissions: `list` returns databases the user has direct access to; group-shared databases are listed via `primitive groups databases`.
|
|
394
363
|
|
|
395
364
|
```bash
|
|
396
365
|
primitive databases list [app-id] # List databases (direct access)
|
|
@@ -415,17 +384,6 @@ primitive metadata set database <database-id> <category> --data '{"key":"value"}
|
|
|
415
384
|
primitive metadata get database <database-id> <category> # Read it back
|
|
416
385
|
```
|
|
417
386
|
|
|
418
|
-
**Operations:**
|
|
419
|
-
```bash
|
|
420
|
-
primitive databases operations list <database-id> [--app <app-id>] # List registered operations
|
|
421
|
-
primitive databases operations execute <database-id> <op-name> --params '{}' # Execute operation
|
|
422
|
-
primitive databases operations execute <database-id> <op-name> --token <jwt> # Execute as specific user
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
The `--token` flag lets you execute an operation as a specific user using a test JWT from `users mint-jwt`. Useful for testing access rules.
|
|
426
|
-
|
|
427
|
-
Under `--json`, the printed shape is the operation's own. A `query` — and a `pipeline` whose `returnField` names a query step — prints the CLI's list envelope `{ items, hasMore, nextCursor? }`, the same shape as `databases records query --json`. Every other operation type prints unchanged: `count` → `{ count }`, `aggregate` → `{ result }`, mutation → `{ results }`, `applyToQuery` → `{ matched, affected, failed, … }`, and a `returnField = "all"` pipeline → `{ steps: { … } }` with each step's own keys left alone. `--timing` adds `_timing` alongside whichever shape you get.
|
|
428
|
-
|
|
429
387
|
**Records (schema introspection):**
|
|
430
388
|
```bash
|
|
431
389
|
primitive databases records models <database-id> [--app <app-id>] # List model names
|
|
@@ -445,7 +403,7 @@ primitive databases export [app-id] <database-id> --output <dir> # Export r
|
|
|
445
403
|
primitive databases import [app-id] <path> --overwrite --dry-run # Import from export directory
|
|
446
404
|
```
|
|
447
405
|
|
|
448
|
-
Export creates a directory with `metadata.json`, `records.jsonl`, `indexes.json`, and `constraints.json`. Import restores records, indexes, and constraints into a new or existing database; it reads every file first, so a malformed export fails without creating a database. Database type config (
|
|
406
|
+
Export creates a directory with `metadata.json`, `records.jsonl`, `indexes.json`, and `constraints.json`. Import restores records, indexes, and constraints into a new or existing database; it reads every file first, so a malformed export fails without creating a database. Database type config (triggers, access rules) is managed separately via `primitive config` — run `config push` on the target app before importing.
|
|
449
407
|
|
|
450
408
|
A database the target app doesn't have is created with a new id. `databases import --json` lists each database in `databases[]` with `sourceDatabaseId`, `title`, `action` (`created`, `updated`, `skipped`), `targetDatabaseId` (the id written to; absent for skipped entries and under `--dry-run`), and `reason` for a skip (`exists`, `no metadata.json`). The human output prints `Imported database <source> (<title>) as <target>` when the id changed.
|
|
451
409
|
|
|
@@ -485,16 +443,16 @@ primitive collections create <name> --description <text> # --owner <userId-or-e
|
|
|
485
443
|
primitive collections get <collection-id>
|
|
486
444
|
primitive collections update <collection-id> --name <name>
|
|
487
445
|
primitive collections delete <collection-id> # documents are preserved
|
|
488
|
-
primitive collections
|
|
446
|
+
primitive collections transfer <collection-id> user:<user-id> # or "app"; the owner role moves with it
|
|
489
447
|
primitive collections for-document <document-id>
|
|
490
448
|
```
|
|
491
449
|
|
|
492
|
-
**Documents
|
|
450
|
+
**Documents and members** (a member is a user id, or `group:<group-id>` for a whole group):
|
|
493
451
|
```bash
|
|
494
|
-
primitive collections documents list|add|remove <collection-id> [document-id]
|
|
495
|
-
primitive collections members list|
|
|
496
|
-
primitive collections
|
|
497
|
-
primitive collections
|
|
452
|
+
primitive collections documents {list|add|remove} <collection-id> [document-id]
|
|
453
|
+
primitive collections members {list|remove} <collection-id> [principal]
|
|
454
|
+
primitive collections members add <collection-id> <principal> --role contributor # viewer, contributor, editor or manager
|
|
455
|
+
primitive collections members set-role <collection-id> <principal> editor
|
|
498
456
|
```
|
|
499
457
|
|
|
500
458
|
**Export / Import:**
|
|
@@ -509,34 +467,36 @@ primitive collections import <path> --owner <userId-or-email> # one owner for e
|
|
|
509
467
|
|
|
510
468
|
Both verbs are for admin tokens. Owners and members are recorded as emails, because app users are scoped to their app and a source app's user id means nothing in the target. The import reads before it writes: it resolves every owner, member, document and group, plans `create`/`merge`/`skip`/`refused` per collection, then applies group grants, members and documents in that order. Matching is by name; `--overwrite` merges only into a collection whose owner, type and context id match, since none of those can change after creation. A group grant the target holds at another level is updated to the level the file records, and effective access follows it — except above 200 documents, where the server refuses a collection-wide group change whole (`COLLECTION_FANOUT_LIMIT`) and the import reports it as a `group` problem. Per-item problems go to stderr and to `--json.problems`; the exit code is 1 when any was reported. Collection ids are not preserved, and the groups themselves, collection resource metadata and pending member invitations do not travel.
|
|
511
469
|
|
|
470
|
+
A group grant is resolved by the `groupId` the file records. Into the app it was exported from, that is the same group. Into another app, create the groups there first — each create returns that app's own id — then set each `groups[].groupId` in `collections.json` to the id the target app returned before you import; a grant whose group the target lacks is reported as a `group` problem and skipped.
|
|
471
|
+
|
|
512
472
|
### Groups
|
|
513
473
|
|
|
514
|
-
Manage groups, members, and memberships.
|
|
474
|
+
Manage groups, members, and memberships. A group is named by its id, which the server assigns on `create` and prints (`--json` answers it as `groupId`); its custodian is the app or the user who holds its `owner` membership.
|
|
515
475
|
|
|
516
476
|
```bash
|
|
517
|
-
primitive groups list [app-id]
|
|
518
|
-
primitive groups create
|
|
519
|
-
primitive groups get <group-
|
|
520
|
-
primitive groups update <group-
|
|
521
|
-
primitive groups delete <group-
|
|
477
|
+
primitive groups list [app-id] [--custodian app|user:<user-id>] # List groups, or one custodian's
|
|
478
|
+
primitive groups create --name <name> [--owner <user-id>] [--member-list members|managers] # Create group
|
|
479
|
+
primitive groups get <group-id> # Get details
|
|
480
|
+
primitive groups update <group-id> [--name] [--description] [--member-list] # Update group
|
|
481
|
+
primitive groups delete <group-id> # Delete group
|
|
522
482
|
```
|
|
523
483
|
|
|
524
484
|
**Members:**
|
|
525
485
|
```bash
|
|
526
|
-
primitive groups members list <group-
|
|
527
|
-
primitive groups members add <group-
|
|
528
|
-
primitive groups members
|
|
529
|
-
primitive groups members
|
|
486
|
+
primitive groups members list <group-id> # With each member's role
|
|
487
|
+
primitive groups members add <group-id> <user-id|email> [--role manager|member] # An email names an existing app user
|
|
488
|
+
primitive groups members set-role <group-id> <user-id> <role>
|
|
489
|
+
primitive groups members remove <group-id> <user-id>
|
|
530
490
|
```
|
|
531
491
|
|
|
532
492
|
**Memberships:**
|
|
533
493
|
```bash
|
|
534
|
-
primitive groups memberships <user-id> [app-id] # List user's group memberships
|
|
494
|
+
primitive groups memberships <user-id> [app-id] # List user's group memberships, with roles
|
|
535
495
|
```
|
|
536
496
|
|
|
537
497
|
**Group resource access:**
|
|
538
498
|
```bash
|
|
539
|
-
primitive groups documents <group-
|
|
499
|
+
primitive groups documents <group-id> # List documents a group can access
|
|
540
500
|
```
|
|
541
501
|
|
|
542
502
|
Group permissions on documents are managed via `primitive documents group-permissions` (see [Documents](#documents) above).
|
|
@@ -556,25 +516,91 @@ primitive analytics cohort-retention [app-id] # Weekly cohort retention
|
|
|
556
516
|
primitive analytics top-users [app-id] # Most active users
|
|
557
517
|
primitive analytics user-search [app-id] --query <q> # Search by email or ULID
|
|
558
518
|
primitive analytics user-detail <user-ulid> [app-id] # User activity breakdown
|
|
519
|
+
primitive analytics user-detail --anonymous [app-id] # Activity with no signed-in user
|
|
559
520
|
primitive analytics user-snapshot <user-ulid> [app-id] # Latest context snapshot
|
|
560
521
|
|
|
561
522
|
# Events
|
|
562
523
|
primitive analytics events [app-id] # Paginated event feed
|
|
563
524
|
primitive analytics events-grouped [app-id] # Events grouped by dimension
|
|
525
|
+
primitive analytics events --where action=login --where country!=US # Only matching events
|
|
526
|
+
primitive analytics errors-groups --where source!=integration # Leave out a source
|
|
527
|
+
|
|
528
|
+
# Recompute instead of reading the analytics cache (any command)
|
|
529
|
+
primitive analytics overview --fresh
|
|
564
530
|
|
|
565
531
|
# Features
|
|
566
532
|
primitive analytics integrations [app-id] # Integration usage metrics
|
|
567
|
-
primitive analytics workflows [app-id] # Top workflows by runs
|
|
568
533
|
primitive analytics prompts [app-id] # Top prompts by executions
|
|
569
534
|
```
|
|
570
535
|
|
|
571
536
|
**Common options:**
|
|
572
537
|
- `--window-days <n>` - Time window in days (default varies per command)
|
|
573
|
-
- `--limit <n>` - Result limit (top-users,
|
|
538
|
+
- `--limit <n>` - Result limit (top-users, prompts)
|
|
574
539
|
- `--group-by <dim>` - Dimension for events-grouped (action, feature, route, country, deviceType, plan, day)
|
|
575
540
|
- `--page <n>` - Page number for events feed (0-based)
|
|
541
|
+
- `--where <field><op><value>` - Filter events, events-grouped and errors-groups; op is `=`, `!=`, `~` (contains) or `^=` (starts with). Repeatable; all must match
|
|
542
|
+
- `--fresh` - Bypass the analytics cache (every command)
|
|
543
|
+
- `--anonymous` - user-detail: anonymous activity in place of a user
|
|
544
|
+
- `--json` - Output raw JSON
|
|
545
|
+
|
|
546
|
+
### Usage
|
|
547
|
+
|
|
548
|
+
Read an app's usage and estimated cost (beta). Costs are estimates from list
|
|
549
|
+
prices, printed in dollars; `--json` prints millionths of a dollar.
|
|
550
|
+
|
|
551
|
+
```bash
|
|
552
|
+
primitive usage get [app-id] # This month by meter and by day, bytes held now
|
|
553
|
+
primitive usage get [app-id] --month 2026-09 # A closed month
|
|
554
|
+
primitive usage top-users [app-id] # Top users by api.request
|
|
555
|
+
primitive usage top-users --meter llm.tokens.in # Top users by another meter
|
|
556
|
+
primitive usage top-users --by cost # Top users by estimated cost
|
|
557
|
+
primitive usage user <user-id> [app-id] # One user's usage and the bytes they own
|
|
558
|
+
primitive usage system [app-id] # System usage by origin, source and resource
|
|
559
|
+
|
|
560
|
+
# Super-admin only
|
|
561
|
+
primitive usage top-apps # Top apps by cost, month to date
|
|
562
|
+
primitive usage top-developers # Top developers by cost, month to date
|
|
563
|
+
primitive usage jobs # The daily close, storage baseline and DynamoDB scan
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
**Common options:**
|
|
567
|
+
- `--since <date>` / `--until <date>` - The window, ISO 8601, UTC (default the last 30 days; at most 90 days back)
|
|
568
|
+
- `--limit <n>` - Result limit
|
|
576
569
|
- `--json` - Output raw JSON
|
|
577
570
|
|
|
571
|
+
### Hosting
|
|
572
|
+
|
|
573
|
+
Publish the app's static front end at `https://<slug>.primitive.app` (beta).
|
|
574
|
+
Every deploy uploads only the files that changed, activates the deployment,
|
|
575
|
+
and returns once the origin serves it (at most 120 seconds).
|
|
576
|
+
|
|
577
|
+
```bash
|
|
578
|
+
primitive hosting deploy dist --slug my-app # First deploy: claims the slug
|
|
579
|
+
primitive hosting deploy # Later deploys of dist find the slug by app id
|
|
580
|
+
primitive hosting deploy out --routing static # Clean URLs and 404.html instead of the SPA fallback
|
|
581
|
+
primitive hosting get # Slug, origin, state and active deployment
|
|
582
|
+
primitive hosting deployments # Deployments, newest first, the active one marked
|
|
583
|
+
primitive hosting activate <deploy-id> # Serve an earlier deployment again
|
|
584
|
+
primitive hosting disable # The origin answers 404; slug and deployments are kept
|
|
585
|
+
primitive hosting enable # Serve the last active deployment again
|
|
586
|
+
primitive hosting rename <slug> # Move to a new slug; the old origin redirects for 90 days
|
|
587
|
+
|
|
588
|
+
# Super-admin only
|
|
589
|
+
primitive hosting suspend <app-id> # Answer 451 on every hostname the app owns
|
|
590
|
+
primitive hosting unsuspend <app-id>
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
`activate`, `disable`, `enable`, `rename`, `suspend` and `unsuspend` ask for
|
|
594
|
+
confirmation; `-y` skips it. Hosting receives a short-lived `write`-only token
|
|
595
|
+
derived from your login, never the login itself, or a CI token as it is.
|
|
596
|
+
In production and on agent, `deploy` uploads the changed files straight to
|
|
597
|
+
`api.cloudflare.com` with an upload session the hosting service opens for the
|
|
598
|
+
app; an `upload_session_expired` error means running the deploy again.
|
|
599
|
+
Before uploading anything, `deploy` refuses a build of more than 99,999 files
|
|
600
|
+
(`too_many_files`), a path over 768 bytes or a manifest over 88 MiB.
|
|
601
|
+
`primitive apps delete` tells hosting the app is gone, so its origin answers
|
|
602
|
+
410.
|
|
603
|
+
|
|
578
604
|
### Admins (Super-Admin Only)
|
|
579
605
|
|
|
580
606
|
Manage the admin directory.
|
|
@@ -582,34 +608,41 @@ Manage the admin directory.
|
|
|
582
608
|
```bash
|
|
583
609
|
primitive admins list # List all admins
|
|
584
610
|
primitive admins search <email> # Search by email
|
|
611
|
+
primitive admins get <email> # Show an admin and their assigned apps
|
|
612
|
+
primitive admins reindex <admin-id> # Rebuild an admin's index entries
|
|
585
613
|
primitive admins invite <email> # Create invitation
|
|
586
614
|
primitive admins update <admin-id> [options] # Update settings
|
|
587
615
|
primitive admins disable <admin-id> # Disable account
|
|
588
616
|
primitive admins enable <admin-id> # Enable account
|
|
589
|
-
primitive admins invitations list
|
|
617
|
+
primitive admins invitations list --email <email> # List an address's pending invitations
|
|
590
618
|
primitive admins invitations delete <invitation-id>
|
|
591
619
|
```
|
|
592
620
|
|
|
593
|
-
###
|
|
621
|
+
### Transitions (Super-Admin Only)
|
|
594
622
|
|
|
595
|
-
|
|
623
|
+
Read the platform transitions across every app (beta), and who still calls a
|
|
624
|
+
deprecated HTTP operation or sends a deprecated WebSocket message.
|
|
596
625
|
|
|
597
626
|
```bash
|
|
598
|
-
#
|
|
599
|
-
primitive
|
|
600
|
-
primitive
|
|
601
|
-
primitive
|
|
602
|
-
primitive
|
|
603
|
-
primitive
|
|
604
|
-
|
|
605
|
-
# Integration catalog
|
|
606
|
-
primitive catalog integrations list
|
|
607
|
-
primitive catalog integrations create --from-file integration.toml
|
|
608
|
-
primitive catalog integrations get <catalog-id>
|
|
609
|
-
primitive catalog integrations update <catalog-id> [options]
|
|
610
|
-
primitive catalog integrations delete <catalog-id>
|
|
627
|
+
primitive transitions list # Every transition, its defaults and apps per value
|
|
628
|
+
primitive transitions report <transition> # Each app's state, use by call site and eligible date
|
|
629
|
+
primitive transitions report <transition> --in-use # Only apps that used the old path in the window
|
|
630
|
+
primitive transitions deprecated-calls # Calls to deprecated operations, last 14 days
|
|
631
|
+
primitive transitions deprecated-calls --days 90 --app <app-id>
|
|
632
|
+
primitive transitions deprecated-calls --operation "ws:subscribe"
|
|
611
633
|
```
|
|
612
634
|
|
|
635
|
+
`deprecated-calls` lists one row per app, operation, source (`api`, `fn` or
|
|
636
|
+
`ws`) and client (`js`, `swift`, `cli`, `fn` or `unknown`), most calls first.
|
|
637
|
+
An operation is `<surface>:<METHOD> /<route>` for HTTP, such as
|
|
638
|
+
`app:GET /documents/:documentId`, and `ws:<type>` for a WebSocket message.
|
|
639
|
+
`cli` and `fn` are certain; `js` and `swift` are inferred from the
|
|
640
|
+
`User-Agent`, so a hand-written caller counts as the client it resembles. A
|
|
641
|
+
call on an admin surface for no app is listed as `(platform)`. On a deployed
|
|
642
|
+
server counts are sampled estimates. When the answer is cut at `--limit`
|
|
643
|
+
(default 200, at most 1000) the command says so: narrow it with `--app` or
|
|
644
|
+
`--operation`.
|
|
645
|
+
|
|
613
646
|
### Config (TOML Configuration)
|
|
614
647
|
|
|
615
648
|
Author app configuration as TOML files and reconcile them with the server.
|
|
@@ -629,6 +662,31 @@ another app: select a different environment with `--env <name>` (#3154).
|
|
|
629
662
|
- `--dry-run` - Show changes without applying (push only)
|
|
630
663
|
- `--force` - Overwrite remote changes (push only)
|
|
631
664
|
|
|
665
|
+
A config tree that still holds `workflows/` or `transforms/` is refused by
|
|
666
|
+
`config push` and reported by `config diff`, naming the migration page.
|
|
667
|
+
|
|
668
|
+
**A configuration object's field surface has ONE definition (issue #2644):**
|
|
669
|
+
`src/config-surface/` on the server records, per configuration object, which
|
|
670
|
+
`models.yaml` fields exist, which TOML key each carries, which modes the server
|
|
671
|
+
accepts it in, and — for a field with real behavior — the handler that owns it.
|
|
672
|
+
The server's create/update handlers take their accepted key set from it
|
|
673
|
+
(`pickWritableFields`), and `cli/scripts/gen-config-surfaces.mjs` vendors the
|
|
674
|
+
same modules into the committed artifact
|
|
675
|
+
`cli/src/lib/generated-config-surfaces.ts`, which the CLI's push builder, pull
|
|
676
|
+
serializer and TOML key validation read. The generator runs automatically at CLI
|
|
677
|
+
`prebuild`; regenerate manually with `node cli/scripts/gen-config-surfaces.mjs`
|
|
678
|
+
(or `pnpm -C cli gen:config-surfaces`).
|
|
679
|
+
|
|
680
|
+
Three hard-fail checks live in `cli/tests/unit/config-surface-drift-guard.test.ts`:
|
|
681
|
+
freshness (`--check`, a byte comparison), coverage (every model field of every
|
|
682
|
+
registered object is either exposed or classified `notExposed` **with a
|
|
683
|
+
reason**), and registry existence (every `SYNC_RESOURCE_TYPES` label has a
|
|
684
|
+
definition — the migration's `PENDING_MIGRATION` exemption list is gone, so
|
|
685
|
+
there is nowhere to park one). Add a
|
|
686
|
+
field to `models.yaml` and the CLI unit suite fails until you regenerate and
|
|
687
|
+
classify it — so the CLI can no longer silently drop a new server-side field.
|
|
688
|
+
This supersedes the workflow-only descriptor and generator from #2326.
|
|
689
|
+
|
|
632
690
|
## TOML Configuration Format
|
|
633
691
|
|
|
634
692
|
The sync commands use TOML files for configuration. Here's the directory structure:
|
|
@@ -641,8 +699,9 @@ primitive/<env>/
|
|
|
641
699
|
weather-api.toml # Integration configs
|
|
642
700
|
prompts/
|
|
643
701
|
summarizer.toml # Prompt configs with all variations
|
|
644
|
-
|
|
645
|
-
process-doc.toml #
|
|
702
|
+
functions/
|
|
703
|
+
process-doc.toml # Server function declarations
|
|
704
|
+
process-doc.ts # …and the TypeScript their `entry` reaches
|
|
646
705
|
```
|
|
647
706
|
|
|
648
707
|
### Example: app.toml
|
|
@@ -861,47 +920,59 @@ CLI).
|
|
|
861
920
|
|
|
862
921
|
### `primitive-admin/validators` — TOML validators
|
|
863
922
|
|
|
864
|
-
The
|
|
923
|
+
The operations validator that `config push` runs as its load-bearing gate is exported
|
|
865
924
|
from the `primitive-admin/validators` subpath (ESM-only, with types) so external
|
|
866
925
|
tooling can validate exactly the way the published CLI does — instead of
|
|
867
926
|
re-implementing the flow and silently drifting.
|
|
868
927
|
|
|
869
928
|
```ts
|
|
870
929
|
import {
|
|
871
|
-
validateWorkflowTomlSource, // source-level wrapper (parse → expand → validate)
|
|
872
|
-
validateWorkflowToml, // raw: pure fn over already-parsed TOML
|
|
873
|
-
formatWorkflowTomlErrors,
|
|
874
930
|
validateOperations, // raw: pure fn over already-parsed operations[]
|
|
875
931
|
formatIssue,
|
|
876
932
|
} from "primitive-admin/validators";
|
|
877
933
|
```
|
|
878
934
|
|
|
879
|
-
|
|
935
|
+
Both are **pure functions over already-parsed TOML** — they do *not* read files
|
|
936
|
+
or parse TOML. The consumer parses (e.g. with `smol-toml`); there is **no
|
|
937
|
+
coupling on a specific TOML parser version**: pass whatever `operations[]` you
|
|
938
|
+
already have. (The workflow validators the subpath also exported retired with
|
|
939
|
+
DSL workflows, #3190.)
|
|
880
940
|
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
`expandWorkflowTomlData()` (`include` fragment expansion) → `validateWorkflowToml`
|
|
884
|
-
→ `formatWorkflowTomlErrors` path that `config push` runs, so it cannot diverge
|
|
885
|
-
from `config push` on workflow `include` fragments. Returns
|
|
886
|
-
`{ errors, formatted }` (`formatted` is `null` when valid). Fragment files
|
|
887
|
-
resolve relative to `<filePath>/../../workflow-fragments/`, matching the CLI.
|
|
941
|
+
Internal helpers (`collectParamRefs`, `declaredParamNames`,
|
|
942
|
+
`locateOperationLine`) are intentionally **not** exported.
|
|
888
943
|
|
|
889
|
-
-
|
|
890
|
-
`formatWorkflowTomlErrors`, `formatIssue`) are **pure functions over
|
|
891
|
-
already-parsed TOML** — they do *not* read files or parse TOML. The consumer
|
|
892
|
-
parses (e.g. with `smol-toml`) and, for workflows, performs any `include`
|
|
893
|
-
expansion itself. There is **no coupling on a specific TOML parser version**:
|
|
894
|
-
pass whatever parsed object / `operations[]` you already have.
|
|
944
|
+
### `primitive-admin/vite` — the Primitive environment Vite plugin
|
|
895
945
|
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
if (errs.length) throw new Error(formatWorkflowTomlErrors(path, errs));
|
|
901
|
-
```
|
|
946
|
+
`primitiveEnv()` resolves the project's Primitive environment at Vite config
|
|
947
|
+
time, in the same order every `primitive` command uses (`--primitive-env` /
|
|
948
|
+
`PRIMITIVE_ENV`, then `primitive env use`, then `defaultEnvironment`, then the
|
|
949
|
+
sole environment), and fills the identity a web app reads:
|
|
902
950
|
|
|
903
|
-
|
|
904
|
-
|
|
951
|
+
```ts
|
|
952
|
+
// vite.config.ts
|
|
953
|
+
import { defineConfig } from "vite";
|
|
954
|
+
import vue from "@vitejs/plugin-vue";
|
|
955
|
+
import { primitiveEnv } from "primitive-admin/vite";
|
|
956
|
+
|
|
957
|
+
export default defineConfig({
|
|
958
|
+
plugins: [primitiveEnv(), vue()],
|
|
959
|
+
});
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
- It defines `import.meta.env.VITE_APP_ID`, `VITE_API_URL`, `VITE_WS_URL`,
|
|
963
|
+
`VITE_APP_NAME` and `VITE_PRIMITIVE_ENV`, and publishes the same keys into
|
|
964
|
+
`process.env` so vitest sees them too.
|
|
965
|
+
- An explicit `VITE_*` identity key in a `.env` file or the shell wins, with a
|
|
966
|
+
warning naming it.
|
|
967
|
+
- `VITE_EXPECTED_PRIMITIVE_ENV` in `.env.<mode>` pins that mode to one
|
|
968
|
+
Primitive environment; a run that resolves another stops at config time.
|
|
969
|
+
|
|
970
|
+
The subpath exports `primitiveEnv`, `resolvePrimitiveEnv` (the same resolution
|
|
971
|
+
for a script: `resolvePrimitiveEnv({ root, env, primitiveEnv })`) and
|
|
972
|
+
`PrimitiveEnvError` (its `kind` says what was wrong). It is built on the CLI's
|
|
973
|
+
own resolver, so the plugin and the `primitive` binary of one install always
|
|
974
|
+
agree. `vite` is an optional peer dependency: the plugin imports only its
|
|
975
|
+
types and never loads it at runtime.
|
|
905
976
|
|
|
906
977
|
## Exit Codes
|
|
907
978
|
|
|
@@ -911,7 +982,8 @@ Internal helpers (`collectParamRefs`, `declaredParamNames`,
|
|
|
911
982
|
|
|
912
983
|
## Environment Variables
|
|
913
984
|
|
|
914
|
-
- `PRIMITIVE_SERVER_URL` - Server URL for `login` outside a project (defaults to `https://primitiveapi.com`)
|
|
985
|
+
- `PRIMITIVE_SERVER_URL` - Server URL for `login` and `apps delete` outside a project (defaults to `https://primitiveapi.com`); ignored inside a project
|
|
986
|
+
- `PRIMITIVE_HOSTING_URL` - The hosting service `primitive hosting` and `apps delete` use, such as a local `http://hosting-api.localhost:8788`; production and agent are found from the API URL
|
|
915
987
|
|
|
916
988
|
**Login server resolution:**
|
|
917
989
|
1. Project mode (`primitive/config.json` present): the active environment's
|
|
@@ -939,7 +1011,7 @@ It is internal maintainer guidance and is not published.
|
|
|
939
1011
|
# Run without building (uses tsx)
|
|
940
1012
|
pnpm run cli:dev -- login
|
|
941
1013
|
|
|
942
|
-
# Type check
|
|
1014
|
+
# Type check (builds packages/js-bao first; the CLI reads its dist types)
|
|
943
1015
|
pnpm run cli:typecheck
|
|
944
1016
|
|
|
945
1017
|
# Build
|