primitive-admin 1.1.0-alpha.9 → 1.2.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 +530 -116
- package/assets/skill/skills/primitive-platform/SKILL.md +295 -0
- package/dist/bin/primitive.d.ts +2 -0
- package/dist/bin/primitive.js +372 -21
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/admins.d.ts +2 -0
- package/dist/src/commands/admins.js +136 -30
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/analytics.d.ts +2 -0
- package/dist/src/commands/analytics.js +713 -55
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps.d.ts +2 -0
- package/dist/src/commands/apps.js +65 -100
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/auth-sessions.d.ts +7 -0
- package/dist/src/commands/auth-sessions.js +144 -0
- package/dist/src/commands/auth-sessions.js.map +1 -0
- package/dist/src/commands/auth.d.ts +2 -0
- package/dist/src/commands/auth.js +238 -108
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/blob-buckets.d.ts +2 -0
- package/dist/src/commands/blob-buckets.js +331 -0
- package/dist/src/commands/blob-buckets.js.map +1 -0
- package/dist/src/commands/catalog.d.ts +2 -0
- package/dist/src/commands/catalog.js +63 -48
- package/dist/src/commands/catalog.js.map +1 -1
- package/dist/src/commands/collection-type-configs.d.ts +2 -0
- package/dist/src/commands/collection-type-configs.js +85 -0
- package/dist/src/commands/collection-type-configs.js.map +1 -0
- package/dist/src/commands/collections.d.ts +2 -0
- package/dist/src/commands/collections.js +1285 -0
- package/dist/src/commands/collections.js.map +1 -0
- package/dist/src/commands/comparisons.d.ts +2 -0
- package/dist/src/commands/comparisons.js +6 -6
- package/dist/src/commands/comparisons.js.map +1 -1
- package/dist/src/commands/config.d.ts +46 -0
- package/dist/src/commands/config.js +465 -0
- package/dist/src/commands/config.js.map +1 -0
- package/dist/src/commands/connections.d.ts +2 -0
- package/dist/src/commands/connections.js +99 -0
- package/dist/src/commands/connections.js.map +1 -0
- package/dist/src/commands/cron-triggers.d.ts +2 -0
- package/dist/src/commands/cron-triggers.js +266 -0
- package/dist/src/commands/cron-triggers.js.map +1 -0
- package/dist/src/commands/database-type-configs.d.ts +2 -0
- package/dist/src/commands/database-type-configs.js +164 -0
- package/dist/src/commands/database-type-configs.js.map +1 -0
- package/dist/src/commands/database-types.d.ts +2 -0
- package/dist/src/commands/database-types.js +171 -0
- package/dist/src/commands/database-types.js.map +1 -0
- package/dist/src/commands/databases.d.ts +65 -0
- package/dist/src/commands/databases.js +1868 -243
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/documents.d.ts +60 -0
- package/dist/src/commands/documents.js +2888 -22
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/email-templates.d.ts +2 -0
- package/dist/src/commands/email-templates.js +175 -0
- package/dist/src/commands/email-templates.js.map +1 -0
- package/dist/src/commands/env.d.ts +23 -0
- package/dist/src/commands/env.js +395 -0
- package/dist/src/commands/env.js.map +1 -0
- package/dist/src/commands/feature-flags.d.ts +14 -0
- package/dist/src/commands/feature-flags.js +117 -0
- package/dist/src/commands/feature-flags.js.map +1 -0
- package/dist/src/commands/functions.d.ts +20 -0
- package/dist/src/commands/functions.js +1630 -0
- package/dist/src/commands/functions.js.map +1 -0
- package/dist/src/commands/group-type-configs.d.ts +2 -0
- package/dist/src/commands/group-type-configs.js +87 -0
- package/dist/src/commands/group-type-configs.js.map +1 -0
- package/dist/src/commands/groups.d.ts +2 -0
- package/dist/src/commands/groups.js +81 -113
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/guides.d.ts +223 -0
- package/dist/src/commands/guides.js +627 -69
- package/dist/src/commands/guides.js.map +1 -1
- package/dist/src/commands/init.d.ts +37 -0
- package/dist/src/commands/init.js +1693 -208
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.d.ts +2 -0
- package/dist/src/commands/integrations.js +428 -187
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/llm.d.ts +2 -0
- package/dist/src/commands/llm.js +13 -8
- package/dist/src/commands/llm.js.map +1 -1
- package/dist/src/commands/locks.d.ts +8 -0
- package/dist/src/commands/locks.js +175 -0
- package/dist/src/commands/locks.js.map +1 -0
- package/dist/src/commands/metadata-category-configs.d.ts +12 -0
- package/dist/src/commands/metadata-category-configs.js +113 -0
- package/dist/src/commands/metadata-category-configs.js.map +1 -0
- package/dist/src/commands/metadata.d.ts +2 -0
- package/dist/src/commands/metadata.js +288 -0
- package/dist/src/commands/metadata.js.map +1 -0
- package/dist/src/commands/prompts.d.ts +2 -0
- package/dist/src/commands/prompts.js +322 -634
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rule-sets.d.ts +3 -0
- package/dist/src/commands/rule-sets.js +139 -148
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/scripts.d.ts +30 -0
- package/dist/src/commands/scripts.js +688 -0
- package/dist/src/commands/scripts.js.map +1 -0
- package/dist/src/commands/secrets.d.ts +2 -0
- package/dist/src/commands/secrets.js +109 -0
- package/dist/src/commands/secrets.js.map +1 -0
- package/dist/src/commands/sessions.d.ts +2 -0
- package/dist/src/commands/sessions.js +76 -0
- package/dist/src/commands/sessions.js.map +1 -0
- package/dist/src/commands/settings.d.ts +18 -0
- package/dist/src/commands/settings.js +54 -0
- package/dist/src/commands/settings.js.map +1 -0
- package/dist/src/commands/skill.d.ts +2 -0
- package/dist/src/commands/skill.js +29 -0
- package/dist/src/commands/skill.js.map +1 -0
- package/dist/src/commands/sync-app-settings.d.ts +158 -0
- package/dist/src/commands/sync-app-settings.js +328 -0
- package/dist/src/commands/sync-app-settings.js.map +1 -0
- package/dist/src/commands/sync.d.ts +2667 -0
- package/dist/src/commands/sync.js +17141 -834
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/tokens.d.ts +2 -0
- package/dist/src/commands/tokens.js +132 -22
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/commands/users.d.ts +2 -0
- package/dist/src/commands/users.js +542 -24
- package/dist/src/commands/users.js.map +1 -1
- package/dist/src/commands/vars.d.ts +8 -0
- package/dist/src/commands/vars.js +97 -0
- package/dist/src/commands/vars.js.map +1 -0
- package/dist/src/commands/waitlist.d.ts +2 -0
- package/dist/src/commands/waitlist.js +12 -11
- package/dist/src/commands/waitlist.js.map +1 -1
- package/dist/src/commands/webhooks.d.ts +31 -0
- package/dist/src/commands/webhooks.js +633 -0
- package/dist/src/commands/webhooks.js.map +1 -0
- package/dist/src/commands/workflows.d.ts +88 -0
- package/dist/src/commands/workflows.js +1568 -742
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/access-rule-display.d.ts +21 -0
- package/dist/src/lib/access-rule-display.js +34 -0
- package/dist/src/lib/access-rule-display.js.map +1 -0
- package/dist/src/lib/api-client.d.ts +2513 -0
- package/dist/src/lib/api-client.js +2456 -162
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-match-guard.d.ts +44 -0
- package/dist/src/lib/app-match-guard.js +72 -0
- package/dist/src/lib/app-match-guard.js.map +1 -0
- package/dist/src/lib/app-settings-descriptor.d.ts +263 -0
- package/dist/src/lib/app-settings-descriptor.js +583 -0
- package/dist/src/lib/app-settings-descriptor.js.map +1 -0
- package/dist/src/lib/auth-flow.d.ts +8 -0
- package/dist/src/lib/batch.d.ts +26 -0
- package/dist/src/lib/batch.js +32 -0
- package/dist/src/lib/batch.js.map +1 -0
- package/dist/src/lib/block-layout.d.ts +160 -0
- package/dist/src/lib/block-layout.js +451 -0
- package/dist/src/lib/block-layout.js.map +1 -0
- package/dist/src/lib/block-selector.d.ts +58 -0
- package/dist/src/lib/block-selector.js +92 -0
- package/dist/src/lib/block-selector.js.map +1 -0
- package/dist/src/lib/canonical-json.d.ts +12 -0
- package/dist/src/lib/canonical-json.js +35 -0
- package/dist/src/lib/canonical-json.js.map +1 -0
- package/dist/src/lib/channel.d.ts +30 -0
- package/dist/src/lib/channel.js +68 -0
- package/dist/src/lib/channel.js.map +1 -0
- package/dist/src/lib/cli-manifest.d.ts +68 -0
- package/dist/src/lib/cli-manifest.js +71 -0
- package/dist/src/lib/cli-manifest.js.map +1 -0
- package/dist/src/lib/codegen-shared/generatedFiles.d.ts +101 -0
- package/dist/src/lib/codegen-shared/generatedFiles.js +191 -0
- package/dist/src/lib/codegen-shared/generatedFiles.js.map +1 -0
- package/dist/src/lib/codegen-shared/prettierStable.d.ts +262 -0
- package/dist/src/lib/codegen-shared/prettierStable.js +610 -0
- package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -0
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +38 -0
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +46 -0
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js.map +1 -0
- package/dist/src/lib/collection-export.d.ts +212 -0
- package/dist/src/lib/collection-export.js +288 -0
- package/dist/src/lib/collection-export.js.map +1 -0
- package/dist/src/lib/config-json-field.d.ts +28 -0
- package/dist/src/lib/config-json-field.js +56 -0
- package/dist/src/lib/config-json-field.js.map +1 -0
- package/dist/src/lib/config-object-descriptor.d.ts +127 -0
- package/dist/src/lib/config-object-descriptor.js +740 -0
- package/dist/src/lib/config-object-descriptor.js.map +1 -0
- package/dist/src/lib/config-payload.d.ts +92 -0
- package/dist/src/lib/config-payload.js +161 -0
- package/dist/src/lib/config-payload.js.map +1 -0
- package/dist/src/lib/config-surface.d.ts +141 -0
- package/dist/src/lib/config-surface.js +368 -0
- package/dist/src/lib/config-surface.js.map +1 -0
- package/dist/src/lib/config-toml.d.ts +10 -0
- package/dist/src/lib/config-toml.js +42 -0
- package/dist/src/lib/config-toml.js.map +1 -0
- package/dist/src/lib/config.d.ts +71 -0
- package/dist/src/lib/config.js +71 -68
- package/dist/src/lib/config.js.map +1 -1
- package/dist/src/lib/confirm-prompt.d.ts +83 -0
- package/dist/src/lib/confirm-prompt.js +110 -0
- package/dist/src/lib/confirm-prompt.js.map +1 -0
- package/dist/src/lib/constants.d.ts +11 -0
- package/dist/src/lib/constants.js +12 -0
- package/dist/src/lib/constants.js.map +1 -0
- package/dist/src/lib/crash-handlers.d.ts +20 -0
- package/dist/src/lib/crash-handlers.js +49 -0
- package/dist/src/lib/crash-handlers.js.map +1 -0
- package/dist/src/lib/credentials-store.d.ts +104 -0
- package/dist/src/lib/credentials-store.js +336 -0
- package/dist/src/lib/credentials-store.js.map +1 -0
- package/dist/src/lib/csv.d.ts +47 -0
- package/dist/src/lib/csv.js +172 -0
- package/dist/src/lib/csv.js.map +1 -0
- package/dist/src/lib/data-input.d.ts +23 -0
- package/dist/src/lib/data-input.js +50 -0
- package/dist/src/lib/data-input.js.map +1 -0
- package/dist/src/lib/db-codegen/dbFingerprint.d.ts +10 -0
- package/dist/src/lib/db-codegen/dbFingerprint.js +17 -0
- package/dist/src/lib/db-codegen/dbFingerprint.js.map +1 -0
- package/dist/src/lib/db-codegen/dbGenerator.d.ts +67 -0
- package/dist/src/lib/db-codegen/dbGenerator.js +170 -0
- package/dist/src/lib/db-codegen/dbGenerator.js.map +1 -0
- package/dist/src/lib/db-codegen/dbNaming.d.ts +87 -0
- package/dist/src/lib/db-codegen/dbNaming.js +180 -0
- package/dist/src/lib/db-codegen/dbNaming.js.map +1 -0
- package/dist/src/lib/db-codegen/dbTemplates.d.ts +272 -0
- package/dist/src/lib/db-codegen/dbTemplates.js +480 -0
- package/dist/src/lib/db-codegen/dbTemplates.js.map +1 -0
- package/dist/src/lib/db-codegen/dbTsTypes.d.ts +73 -0
- package/dist/src/lib/db-codegen/dbTsTypes.js +139 -0
- package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -0
- package/dist/src/lib/db-codegen/dbTypeIR.d.ts +146 -0
- package/dist/src/lib/db-codegen/dbTypeIR.js +525 -0
- package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -0
- package/dist/src/lib/db-codegen/generated-operation-def-descriptor.d.ts +112 -0
- package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js +211 -0
- package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js.map +1 -0
- package/dist/src/lib/deprecation.d.ts +22 -0
- package/dist/src/lib/deprecation.js +43 -0
- package/dist/src/lib/deprecation.js.map +1 -0
- package/dist/src/lib/document-export-permissions.d.ts +30 -0
- package/dist/src/lib/document-export-permissions.js +54 -0
- package/dist/src/lib/document-export-permissions.js.map +1 -0
- package/dist/src/lib/document-ingest-artifact.d.ts +120 -0
- package/dist/src/lib/document-ingest-artifact.js +505 -0
- package/dist/src/lib/document-ingest-artifact.js.map +1 -0
- package/dist/src/lib/document-ingest-input.d.ts +51 -0
- package/dist/src/lib/document-ingest-input.js +132 -0
- package/dist/src/lib/document-ingest-input.js.map +1 -0
- package/dist/src/lib/document-ingest-rows.d.ts +137 -0
- package/dist/src/lib/document-ingest-rows.js +181 -0
- package/dist/src/lib/document-ingest-rows.js.map +1 -0
- package/dist/src/lib/document-ingest.d.ts +101 -0
- package/dist/src/lib/document-ingest.js +384 -0
- package/dist/src/lib/document-ingest.js.map +1 -0
- package/dist/src/lib/env-resolver-core.d.ts +258 -0
- package/dist/src/lib/env-resolver-core.js +447 -0
- package/dist/src/lib/env-resolver-core.js.map +1 -0
- package/dist/src/lib/env-resolver.d.ts +99 -0
- package/dist/src/lib/env-resolver.js +153 -0
- package/dist/src/lib/env-resolver.js.map +1 -0
- package/dist/src/lib/fetch.d.ts +5 -0
- package/dist/src/lib/function-bundle.d.ts +147 -0
- package/dist/src/lib/function-bundle.js +341 -0
- package/dist/src/lib/function-bundle.js.map +1 -0
- package/dist/src/lib/function-collect.d.ts +123 -0
- package/dist/src/lib/function-collect.js +610 -0
- package/dist/src/lib/function-collect.js.map +1 -0
- package/dist/src/lib/function-db-types.d.ts +202 -0
- package/dist/src/lib/function-db-types.js +870 -0
- package/dist/src/lib/function-db-types.js.map +1 -0
- package/dist/src/lib/function-document-types.d.ts +144 -0
- package/dist/src/lib/function-document-types.js +370 -0
- package/dist/src/lib/function-document-types.js.map +1 -0
- package/dist/src/lib/function-grants-preflight.d.ts +64 -0
- package/dist/src/lib/function-grants-preflight.js +105 -0
- package/dist/src/lib/function-grants-preflight.js.map +1 -0
- package/dist/src/lib/function-log-lines.d.ts +76 -0
- package/dist/src/lib/function-log-lines.js +160 -0
- package/dist/src/lib/function-log-lines.js.map +1 -0
- package/dist/src/lib/function-log-row.d.ts +29 -0
- package/dist/src/lib/function-log-row.js +73 -0
- package/dist/src/lib/function-log-row.js.map +1 -0
- package/dist/src/lib/function-log-tail.d.ts +132 -0
- package/dist/src/lib/function-log-tail.js +262 -0
- package/dist/src/lib/function-log-tail.js.map +1 -0
- package/dist/src/lib/function-run.d.ts +289 -0
- package/dist/src/lib/function-run.js +389 -0
- package/dist/src/lib/function-run.js.map +1 -0
- package/dist/src/lib/function-schema-codegen.d.ts +143 -0
- package/dist/src/lib/function-schema-codegen.js +420 -0
- package/dist/src/lib/function-schema-codegen.js.map +1 -0
- package/dist/src/lib/function-sync.d.ts +459 -0
- package/dist/src/lib/function-sync.js +1258 -0
- package/dist/src/lib/function-sync.js.map +1 -0
- package/dist/src/lib/function-trigger-listing.d.ts +27 -0
- package/dist/src/lib/function-trigger-listing.js +70 -0
- package/dist/src/lib/function-trigger-listing.js.map +1 -0
- package/dist/src/lib/function-triggers.d.ts +66 -0
- package/dist/src/lib/function-triggers.js +285 -0
- package/dist/src/lib/function-triggers.js.map +1 -0
- package/dist/src/lib/function-typecheck.d.ts +86 -0
- package/dist/src/lib/function-typecheck.js +370 -0
- package/dist/src/lib/function-typecheck.js.map +1 -0
- package/dist/src/lib/function-versions.d.ts +122 -0
- package/dist/src/lib/function-versions.js +182 -0
- package/dist/src/lib/function-versions.js.map +1 -0
- package/dist/src/lib/generated-allowlist.d.ts +28 -0
- package/dist/src/lib/generated-allowlist.js +280 -0
- package/dist/src/lib/generated-allowlist.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +2936 -0
- package/dist/src/lib/generated-config-surfaces.js +10593 -0
- package/dist/src/lib/generated-config-surfaces.js.map +1 -0
- package/dist/src/lib/generated-sdk-types.d.ts +12 -0
- package/dist/src/lib/generated-sdk-types.js +13 -0
- package/dist/src/lib/generated-sdk-types.js.map +1 -0
- package/dist/src/lib/generated-template-lint.d.ts +212 -0
- package/dist/src/lib/generated-template-lint.js +624 -0
- package/dist/src/lib/generated-template-lint.js.map +1 -0
- 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/google-client-secret-status.d.ts +35 -0
- package/dist/src/lib/google-client-secret-status.js +56 -0
- package/dist/src/lib/google-client-secret-status.js.map +1 -0
- package/dist/src/lib/init-adopt.d.ts +16 -0
- package/dist/src/lib/init-adopt.js +34 -0
- package/dist/src/lib/init-adopt.js.map +1 -0
- package/dist/src/lib/init-assets.d.ts +39 -0
- package/dist/src/lib/init-assets.js +97 -0
- package/dist/src/lib/init-assets.js.map +1 -0
- package/dist/src/lib/init-client-platforms.d.ts +14 -0
- package/dist/src/lib/init-client-platforms.js +71 -0
- package/dist/src/lib/init-client-platforms.js.map +1 -0
- package/dist/src/lib/init-config.d.ts +98 -0
- package/dist/src/lib/init-config.js +186 -0
- package/dist/src/lib/init-config.js.map +1 -0
- package/dist/src/lib/init-email-redirect-uris.d.ts +37 -0
- package/dist/src/lib/init-email-redirect-uris.js +46 -0
- package/dist/src/lib/init-email-redirect-uris.js.map +1 -0
- package/dist/src/lib/init-ios-links.d.ts +91 -0
- package/dist/src/lib/init-ios-links.js +219 -0
- package/dist/src/lib/init-ios-links.js.map +1 -0
- package/dist/src/lib/init-plan.d.ts +80 -0
- package/dist/src/lib/init-plan.js +95 -0
- package/dist/src/lib/init-plan.js.map +1 -0
- package/dist/src/lib/init-production-env.d.ts +48 -0
- package/dist/src/lib/init-production-env.js +59 -0
- package/dist/src/lib/init-production-env.js.map +1 -0
- package/dist/src/lib/init-schema.d.ts +74 -0
- package/dist/src/lib/init-schema.js +358 -0
- package/dist/src/lib/init-schema.js.map +1 -0
- package/dist/src/lib/init-xcode.d.ts +34 -0
- package/dist/src/lib/init-xcode.js +138 -0
- package/dist/src/lib/init-xcode.js.map +1 -0
- package/dist/src/lib/integration-request-config.d.ts +30 -0
- package/dist/src/lib/integration-request-config.js +145 -0
- package/dist/src/lib/integration-request-config.js.map +1 -0
- package/dist/src/lib/integration-selector.d.ts +42 -0
- package/dist/src/lib/integration-selector.js +46 -0
- package/dist/src/lib/integration-selector.js.map +1 -0
- package/dist/src/lib/ios-app-id.d.ts +34 -0
- package/dist/src/lib/ios-app-id.js +69 -0
- package/dist/src/lib/ios-app-id.js.map +1 -0
- package/dist/src/lib/list-options.d.ts +68 -0
- package/dist/src/lib/list-options.js +89 -0
- package/dist/src/lib/list-options.js.map +1 -0
- package/dist/src/lib/local-state.d.ts +55 -0
- package/dist/src/lib/local-state.js +167 -0
- package/dist/src/lib/local-state.js.map +1 -0
- package/dist/src/lib/local-test-cases.d.ts +63 -0
- package/dist/src/lib/local-test-cases.js +136 -0
- package/dist/src/lib/local-test-cases.js.map +1 -0
- package/dist/src/lib/log-inspection.d.ts +710 -0
- package/dist/src/lib/log-inspection.js +814 -0
- package/dist/src/lib/log-inspection.js.map +1 -0
- package/dist/src/lib/logout-admin-session.d.ts +33 -0
- package/dist/src/lib/logout-admin-session.js +70 -0
- package/dist/src/lib/logout-admin-session.js.map +1 -0
- package/dist/src/lib/migration-nag.d.ts +49 -0
- package/dist/src/lib/migration-nag.js +164 -0
- package/dist/src/lib/migration-nag.js.map +1 -0
- package/dist/src/lib/object-status-filter.d.ts +22 -0
- package/dist/src/lib/object-status-filter.js +45 -0
- package/dist/src/lib/object-status-filter.js.map +1 -0
- package/dist/src/lib/output.d.ts +124 -0
- package/dist/src/lib/output.js +219 -8
- package/dist/src/lib/output.js.map +1 -1
- package/dist/src/lib/package-manager.d.ts +140 -0
- package/dist/src/lib/package-manager.js +305 -0
- package/dist/src/lib/package-manager.js.map +1 -0
- package/dist/src/lib/paginate.d.ts +82 -0
- package/dist/src/lib/paginate.js +99 -0
- package/dist/src/lib/paginate.js.map +1 -0
- package/dist/src/lib/platform-owned.d.ts +63 -0
- package/dist/src/lib/platform-owned.js +85 -0
- package/dist/src/lib/platform-owned.js.map +1 -0
- package/dist/src/lib/project-config.d.ts +122 -0
- package/dist/src/lib/project-config.js +244 -0
- package/dist/src/lib/project-config.js.map +1 -0
- package/dist/src/lib/prompt-cost-format.d.ts +11 -0
- package/dist/src/lib/prompt-cost-format.js +41 -0
- package/dist/src/lib/prompt-cost-format.js.map +1 -0
- package/dist/src/lib/prompt-schema-codegen.d.ts +147 -0
- package/dist/src/lib/prompt-schema-codegen.js +462 -0
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -0
- package/dist/src/lib/query-operators.d.ts +43 -0
- package/dist/src/lib/query-operators.js +80 -0
- package/dist/src/lib/query-operators.js.map +1 -0
- package/dist/src/lib/record-filter.d.ts +18 -0
- package/dist/src/lib/record-filter.js +55 -0
- package/dist/src/lib/record-filter.js.map +1 -0
- package/dist/src/lib/refresh-admin-credentials.d.ts +73 -0
- package/dist/src/lib/refresh-admin-credentials.js +123 -0
- package/dist/src/lib/refresh-admin-credentials.js.map +1 -0
- package/dist/src/lib/resolve-init-dev-port.d.ts +56 -0
- package/dist/src/lib/resolve-init-dev-port.js +55 -0
- package/dist/src/lib/resolve-init-dev-port.js.map +1 -0
- package/dist/src/lib/resolve-init-server.d.ts +64 -0
- package/dist/src/lib/resolve-init-server.js +77 -0
- package/dist/src/lib/resolve-init-server.js.map +1 -0
- package/dist/src/lib/resolve-owner.d.ts +19 -0
- package/dist/src/lib/resolve-owner.js +20 -0
- package/dist/src/lib/resolve-owner.js.map +1 -0
- package/dist/src/lib/resolve-platform.d.ts +74 -0
- package/dist/src/lib/resolve-platform.js +105 -0
- package/dist/src/lib/resolve-platform.js.map +1 -0
- package/dist/src/lib/run-status.d.ts +19 -0
- package/dist/src/lib/run-status.generated.d.ts +39 -0
- package/dist/src/lib/run-status.generated.js +66 -0
- package/dist/src/lib/run-status.generated.js.map +1 -0
- package/dist/src/lib/run-status.js +19 -0
- package/dist/src/lib/run-status.js.map +1 -0
- package/dist/src/lib/server-text-normalization.d.ts +51 -0
- package/dist/src/lib/server-text-normalization.js +90 -0
- package/dist/src/lib/server-text-normalization.js.map +1 -0
- package/dist/src/lib/server-url.d.ts +22 -0
- package/dist/src/lib/server-url.js +33 -0
- package/dist/src/lib/server-url.js.map +1 -0
- package/dist/src/lib/signing-secret-status.d.ts +81 -0
- package/dist/src/lib/signing-secret-status.js +116 -0
- package/dist/src/lib/signing-secret-status.js.map +1 -0
- package/dist/src/lib/skill-installer.d.ts +71 -0
- package/dist/src/lib/skill-installer.js +441 -0
- package/dist/src/lib/skill-installer.js.map +1 -0
- package/dist/src/lib/snapshot-audit-source.d.ts +45 -0
- package/dist/src/lib/snapshot-audit-source.js +58 -0
- package/dist/src/lib/snapshot-audit-source.js.map +1 -0
- package/dist/src/lib/snapshot-audit-store.d.ts +52 -0
- package/dist/src/lib/snapshot-audit-store.js +196 -0
- package/dist/src/lib/snapshot-audit-store.js.map +1 -0
- package/dist/src/lib/snapshot-audit.d.ts +207 -0
- package/dist/src/lib/snapshot-audit.js +431 -0
- package/dist/src/lib/snapshot-audit.js.map +1 -0
- package/dist/src/lib/snapshot-build-rows.d.ts +60 -0
- package/dist/src/lib/snapshot-build-rows.js +87 -0
- package/dist/src/lib/snapshot-build-rows.js.map +1 -0
- package/dist/src/lib/snapshot-build.d.ts +50 -0
- package/dist/src/lib/snapshot-build.js +111 -0
- package/dist/src/lib/snapshot-build.js.map +1 -0
- package/dist/src/lib/snapshot-manifest-layout.d.ts +61 -0
- package/dist/src/lib/snapshot-manifest-layout.js +70 -0
- package/dist/src/lib/snapshot-manifest-layout.js.map +1 -0
- package/dist/src/lib/snapshots.d.ts +98 -0
- package/dist/src/lib/snapshots.js +294 -0
- package/dist/src/lib/snapshots.js.map +1 -0
- package/dist/src/lib/step-run-table.d.ts +43 -0
- package/dist/src/lib/step-run-table.js +129 -0
- package/dist/src/lib/step-run-table.js.map +1 -0
- package/dist/src/lib/storage-pending-retry.d.ts +26 -0
- package/dist/src/lib/storage-pending-retry.js +42 -0
- package/dist/src/lib/storage-pending-retry.js.map +1 -0
- package/dist/src/lib/swift-codegen/agentGenerator.d.ts +42 -0
- package/dist/src/lib/swift-codegen/agentGenerator.js +118 -0
- package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -0
- package/dist/src/lib/swift-codegen/banners.d.ts +24 -0
- package/dist/src/lib/swift-codegen/banners.js +25 -0
- package/dist/src/lib/swift-codegen/banners.js.map +1 -0
- package/dist/src/lib/swift-codegen/dbGenerator.d.ts +113 -0
- package/dist/src/lib/swift-codegen/dbGenerator.js +926 -0
- package/dist/src/lib/swift-codegen/dbGenerator.js.map +1 -0
- package/dist/src/lib/swift-codegen/dbSwiftTypes.d.ts +42 -0
- package/dist/src/lib/swift-codegen/dbSwiftTypes.js +100 -0
- package/dist/src/lib/swift-codegen/dbSwiftTypes.js.map +1 -0
- package/dist/src/lib/swift-codegen/functionGenerator.d.ts +139 -0
- package/dist/src/lib/swift-codegen/functionGenerator.js +462 -0
- package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -0
- package/dist/src/lib/swift-codegen/generator.d.ts +100 -0
- package/dist/src/lib/swift-codegen/generator.js +457 -0
- package/dist/src/lib/swift-codegen/generator.js.map +1 -0
- package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +87 -0
- package/dist/src/lib/swift-codegen/schemaToSwift.js +661 -0
- package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -0
- package/dist/src/lib/swift-codegen/siblingSymbols.d.ts +94 -0
- package/dist/src/lib/swift-codegen/siblingSymbols.js +155 -0
- package/dist/src/lib/swift-codegen/siblingSymbols.js.map +1 -0
- package/dist/src/lib/swift-codegen/swiftNaming.d.ts +85 -0
- package/dist/src/lib/swift-codegen/swiftNaming.js +198 -0
- package/dist/src/lib/swift-codegen/swiftNaming.js.map +1 -0
- package/dist/src/lib/sync-dir-selector.d.ts +21 -0
- package/dist/src/lib/sync-dir-selector.js +30 -0
- package/dist/src/lib/sync-dir-selector.js.map +1 -0
- package/dist/src/lib/sync-paths.d.ts +128 -0
- package/dist/src/lib/sync-paths.js +195 -0
- package/dist/src/lib/sync-paths.js.map +1 -0
- package/dist/src/lib/sync-resource-types.d.ts +563 -0
- package/dist/src/lib/sync-resource-types.js +1073 -0
- package/dist/src/lib/sync-resource-types.js.map +1 -0
- package/dist/src/lib/sync-selectors.d.ts +138 -0
- package/dist/src/lib/sync-selectors.js +289 -0
- package/dist/src/lib/sync-selectors.js.map +1 -0
- package/dist/src/lib/template.d.ts +170 -0
- package/dist/src/lib/template.js +484 -68
- package/dist/src/lib/template.js.map +1 -1
- package/dist/src/lib/test-case-file-names.d.ts +40 -0
- package/dist/src/lib/test-case-file-names.js +91 -0
- package/dist/src/lib/test-case-file-names.js.map +1 -0
- package/dist/src/lib/test-case-keys.d.ts +29 -0
- package/dist/src/lib/test-case-keys.js +55 -0
- package/dist/src/lib/test-case-keys.js.map +1 -0
- package/dist/src/lib/test-case-variables.d.ts +29 -0
- package/dist/src/lib/test-case-variables.js +71 -0
- package/dist/src/lib/test-case-variables.js.map +1 -0
- package/dist/src/lib/token-inject.d.ts +56 -0
- package/dist/src/lib/token-inject.js +204 -0
- package/dist/src/lib/token-inject.js.map +1 -0
- package/dist/src/lib/toml-database-config.d.ts +123 -0
- package/dist/src/lib/toml-database-config.js +544 -0
- package/dist/src/lib/toml-database-config.js.map +1 -0
- package/dist/src/lib/toml-metadata-config.d.ts +151 -0
- package/dist/src/lib/toml-metadata-config.js +476 -0
- package/dist/src/lib/toml-metadata-config.js.map +1 -0
- package/dist/src/lib/toml-native-form.d.ts +46 -0
- package/dist/src/lib/toml-native-form.js +78 -0
- package/dist/src/lib/toml-native-form.js.map +1 -0
- package/dist/src/lib/toml-params-validator.d.ts +129 -0
- package/dist/src/lib/toml-params-validator.js +298 -0
- package/dist/src/lib/toml-params-validator.js.map +1 -0
- package/dist/src/lib/toml-scalar-edit.d.ts +43 -0
- package/dist/src/lib/toml-scalar-edit.js +283 -0
- package/dist/src/lib/toml-scalar-edit.js.map +1 -0
- package/dist/src/lib/user-selector.d.ts +24 -0
- package/dist/src/lib/user-selector.js +33 -0
- package/dist/src/lib/user-selector.js.map +1 -0
- package/dist/src/lib/version-check.d.ts +35 -0
- package/dist/src/lib/version-check.js +241 -0
- package/dist/src/lib/version-check.js.map +1 -0
- package/dist/src/lib/watch.d.ts +121 -0
- package/dist/src/lib/watch.js +169 -0
- package/dist/src/lib/watch.js.map +1 -0
- package/dist/src/lib/web-url.d.ts +40 -0
- package/dist/src/lib/web-url.js +76 -0
- package/dist/src/lib/web-url.js.map +1 -0
- package/dist/src/lib/webhook-deliver.d.ts +209 -0
- package/dist/src/lib/webhook-deliver.js +519 -0
- package/dist/src/lib/webhook-deliver.js.map +1 -0
- package/dist/src/lib/workflow-apply.d.ts +110 -0
- package/dist/src/lib/workflow-apply.js +164 -0
- package/dist/src/lib/workflow-apply.js.map +1 -0
- package/dist/src/lib/workflow-codegen/generated-schema-descriptor.d.ts +129 -0
- package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js +269 -0
- package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js.map +1 -0
- package/dist/src/lib/workflow-codegen/generator.d.ts +96 -0
- package/dist/src/lib/workflow-codegen/generator.js +361 -0
- package/dist/src/lib/workflow-codegen/generator.js.map +1 -0
- package/dist/src/lib/workflow-codegen/invokerIR.d.ts +94 -0
- package/dist/src/lib/workflow-codegen/invokerIR.js +76 -0
- package/dist/src/lib/workflow-codegen/invokerIR.js.map +1 -0
- package/dist/src/lib/workflow-codegen/naming.d.ts +33 -0
- package/dist/src/lib/workflow-codegen/naming.js +81 -0
- package/dist/src/lib/workflow-codegen/naming.js.map +1 -0
- package/dist/src/lib/workflow-codegen/schemaToTs.d.ts +80 -0
- package/dist/src/lib/workflow-codegen/schemaToTs.js +303 -0
- package/dist/src/lib/workflow-codegen/schemaToTs.js.map +1 -0
- package/dist/src/lib/workflow-config-apply.d.ts +70 -0
- package/dist/src/lib/workflow-config-apply.js +137 -0
- package/dist/src/lib/workflow-config-apply.js.map +1 -0
- package/dist/src/lib/workflow-config-sidecar.d.ts +63 -0
- package/dist/src/lib/workflow-config-sidecar.js +96 -0
- package/dist/src/lib/workflow-config-sidecar.js.map +1 -0
- package/dist/src/lib/workflow-defaults.d.ts +29 -0
- package/dist/src/lib/workflow-defaults.js +41 -0
- package/dist/src/lib/workflow-defaults.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/lib/workflow-fragments.d.ts +64 -0
- package/dist/src/lib/workflow-fragments.js +342 -0
- package/dist/src/lib/workflow-fragments.js.map +1 -0
- package/dist/src/lib/workflow-include-preserve.d.ts +76 -0
- package/dist/src/lib/workflow-include-preserve.js +286 -0
- package/dist/src/lib/workflow-include-preserve.js.map +1 -0
- package/dist/src/lib/workflow-payload.d.ts +98 -0
- package/dist/src/lib/workflow-payload.js +178 -0
- package/dist/src/lib/workflow-payload.js.map +1 -0
- package/dist/src/lib/workflow-toml-validator.d.ts +211 -0
- package/dist/src/lib/workflow-toml-validator.js +770 -0
- package/dist/src/lib/workflow-toml-validator.js.map +1 -0
- package/dist/src/lib/workflow-usage.d.ts +196 -0
- package/dist/src/lib/workflow-usage.js +310 -0
- package/dist/src/lib/workflow-usage.js.map +1 -0
- package/dist/src/types/index.d.ts +591 -0
- package/dist/src/validators.d.ts +65 -0
- package/dist/src/validators.js +64 -0
- package/dist/src/validators.js.map +1 -0
- package/package.json +34 -9
package/README.md
CHANGED
|
@@ -5,9 +5,13 @@ Command-line interface for administering Primitive applications. This CLI provid
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
pnpm add -g primitive-admin
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
pnpm is the recommended package manager. If you use npm instead, run
|
|
12
|
+
`npm install -g primitive-admin` — install with one manager only, or you end up
|
|
13
|
+
with two global copies.
|
|
14
|
+
|
|
11
15
|
### Development Setup
|
|
12
16
|
|
|
13
17
|
From the **worklet root directory**:
|
|
@@ -55,10 +59,7 @@ The globally linked `primitive` command uses the compiled files in `cli/dist/`,
|
|
|
55
59
|
# Login via browser OAuth
|
|
56
60
|
primitive login
|
|
57
61
|
|
|
58
|
-
#
|
|
59
|
-
primitive use "My App"
|
|
60
|
-
|
|
61
|
-
# List users in the current app
|
|
62
|
+
# List users in the app this project's environment names
|
|
62
63
|
primitive users list
|
|
63
64
|
|
|
64
65
|
# View help for any command
|
|
@@ -71,11 +72,15 @@ primitive apps --help
|
|
|
71
72
|
The CLI uses browser-based OAuth for authentication. When you run `primitive login`, it opens your browser to authenticate via Google OAuth and stores credentials locally.
|
|
72
73
|
|
|
73
74
|
```bash
|
|
74
|
-
# Login to the
|
|
75
|
+
# Login to the environment resolved from the project config, or — outside a
|
|
76
|
+
# project — to the default/PRIMITIVE_SERVER_URL server
|
|
75
77
|
primitive login
|
|
76
78
|
|
|
77
|
-
# Login to a
|
|
78
|
-
primitive
|
|
79
|
+
# Login to a specific named environment
|
|
80
|
+
primitive -e prod login
|
|
81
|
+
|
|
82
|
+
# Login to a custom server from outside a project
|
|
83
|
+
PRIMITIVE_SERVER_URL=https://api.example.com primitive login
|
|
79
84
|
|
|
80
85
|
# View current session
|
|
81
86
|
primitive whoami
|
|
@@ -87,39 +92,50 @@ primitive token
|
|
|
87
92
|
primitive logout
|
|
88
93
|
```
|
|
89
94
|
|
|
90
|
-
|
|
95
|
+
Inside a project, credentials are stored per environment in the gitignored
|
|
96
|
+
`<projectRoot>/.primitive/credentials.json`; a `login` run outside a project
|
|
97
|
+
writes `~/.primitive/credentials.json`. Both are mode 0600. Only `login`,
|
|
98
|
+
`logout`, `bootstrap` and `init` work outside a project — every other command
|
|
99
|
+
stops with an error naming the missing `primitive/config.json`, rather than
|
|
100
|
+
reading the global file (see [Outside a project](#outside-a-project)).
|
|
91
101
|
|
|
92
102
|
## App Context
|
|
93
103
|
|
|
94
|
-
|
|
104
|
+
Every environment names exactly one app, via `"appId"` in
|
|
105
|
+
`primitive/config.json`. Selecting an environment selects its app, so most
|
|
106
|
+
commands need no app argument at all — and there is no separate, per-machine
|
|
107
|
+
"current app" that could point somewhere else.
|
|
95
108
|
|
|
96
|
-
|
|
97
|
-
|
|
109
|
+
```bash
|
|
110
|
+
# The app the selected environment names
|
|
111
|
+
primitive whoami
|
|
112
|
+
primitive env show
|
|
98
113
|
|
|
99
|
-
|
|
114
|
+
# Point an environment at a different app: edit its "appId" in
|
|
115
|
+
# primitive/config.json.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Commands that read across apps still take an explicit one. Those that only need
|
|
119
|
+
an app ID (like `list`) accept it as a positional argument:
|
|
100
120
|
```bash
|
|
101
121
|
primitive users list 01HXYZ...
|
|
102
122
|
```
|
|
103
123
|
|
|
104
|
-
Commands with other required arguments use
|
|
124
|
+
Commands with other required arguments use `--app`:
|
|
105
125
|
```bash
|
|
106
126
|
primitive workflows get <workflow-id> --app 01HXYZ...
|
|
107
127
|
```
|
|
108
128
|
|
|
109
|
-
|
|
110
|
-
# Interactive app selection
|
|
111
|
-
primitive use
|
|
112
|
-
|
|
113
|
-
# Set by name or ID
|
|
114
|
-
primitive use "My App"
|
|
115
|
-
primitive use 01HXYZ...
|
|
129
|
+
### Outside a project
|
|
116
130
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
primitive
|
|
122
|
-
|
|
131
|
+
With no project config up the directory tree there is no environment, so there
|
|
132
|
+
is nothing for an app-scoped command to target. Only `login`, `logout`,
|
|
133
|
+
`bootstrap` and `init` work there; everything else (`whoami`, `apps list`,
|
|
134
|
+
`env add`, `config pull`, …) exits non-zero with an error that names the
|
|
135
|
+
missing `primitive/config.json` and points at `primitive init`. The CLI never
|
|
136
|
+
falls back to `~/.primitive/credentials.json` for those commands, and no flag
|
|
137
|
+
redirects a command at another project's tree — run it from inside the project
|
|
138
|
+
whose environment names the app.
|
|
123
139
|
|
|
124
140
|
## Commands
|
|
125
141
|
|
|
@@ -129,17 +145,20 @@ Manage applications (requires admin access).
|
|
|
129
145
|
|
|
130
146
|
```bash
|
|
131
147
|
primitive apps list # List all accessible apps
|
|
132
|
-
primitive apps create "My App" # Create a new app
|
|
148
|
+
primitive apps create "My App" # Create a new app (mints the app id)
|
|
133
149
|
primitive apps get <app-id> # Get app details
|
|
134
|
-
primitive apps update <app-id> [opts] # Update app settings
|
|
135
150
|
primitive apps delete <app-id> # Delete an app
|
|
136
151
|
```
|
|
137
152
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
153
|
+
App settings are configuration, so they are authored in `app.toml` and applied
|
|
154
|
+
with `config push` (issue #2645) — there is no `apps update`:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
primitive apps get # what the server is running
|
|
158
|
+
primitive config pull --only app # write those settings into app.toml
|
|
159
|
+
primitive config set app app.mode=invite-only
|
|
160
|
+
primitive config push --only app # apply the edit
|
|
161
|
+
```
|
|
143
162
|
- `--google-oauth` / `--no-google-oauth` - Enable/disable Google OAuth
|
|
144
163
|
- `--passkey` / `--no-passkey` - Enable/disable passkey auth
|
|
145
164
|
- `--magic-link` / `--no-magic-link` - Enable/disable magic link auth
|
|
@@ -150,12 +169,13 @@ Manage users within an app.
|
|
|
150
169
|
|
|
151
170
|
```bash
|
|
152
171
|
primitive users list [app-id] # List users
|
|
172
|
+
primitive users create <email> [--role admin|member] # Create/add user by email
|
|
153
173
|
primitive users invite [app-id] <email> [--role admin] # Invite user
|
|
154
174
|
primitive users remove [app-id] <user-id> # Remove user
|
|
155
175
|
primitive users set-role [app-id] <user-id> <role> # Change role
|
|
156
176
|
primitive users transfer-owner [app-id] <new-owner-id> # Transfer ownership
|
|
157
|
-
primitive users
|
|
158
|
-
primitive users invitations
|
|
177
|
+
primitive users mint-jwt <user-id> [--role <role>] # Mint test JWT (dev/test only)
|
|
178
|
+
primitive users invitations [app-id] # List pending invitations
|
|
159
179
|
```
|
|
160
180
|
|
|
161
181
|
### Waitlist
|
|
@@ -175,57 +195,72 @@ Manage HTTP integrations (external API connections).
|
|
|
175
195
|
|
|
176
196
|
```bash
|
|
177
197
|
primitive integrations list [app-id] # List integrations
|
|
178
|
-
primitive integrations create [app-id] [options] # Create integration
|
|
179
198
|
primitive integrations get <integration-id> # Get details
|
|
180
|
-
primitive integrations update <id> [options] # Update integration
|
|
181
|
-
primitive integrations delete <id> # Soft delete
|
|
182
199
|
primitive integrations test <id> # Test connection
|
|
183
200
|
primitive integrations logs <id> # View invocation logs
|
|
184
201
|
```
|
|
185
202
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
203
|
+
An integration is authored in `integrations/<key>.toml` and applied with
|
|
204
|
+
`config push` — creating, updating and deleting one are all edits to that file:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
primitive config fields integration # its keys, types, defaults
|
|
208
|
+
primitive config create integration weather-api # scaffold the file
|
|
209
|
+
primitive config push --only integration/weather-api
|
|
210
|
+
```
|
|
192
211
|
|
|
193
212
|
**Secrets management:**
|
|
213
|
+
|
|
214
|
+
Integration-scoped secrets are **retired** — the `primitive integrations secrets`
|
|
215
|
+
command group no longer exists. Use app-level secrets instead
|
|
216
|
+
(`primitive secrets set <KEY> --value <value>`) and reference them in integration
|
|
217
|
+
config via `{{secrets.KEY}}`. See the **Secrets** section below.
|
|
218
|
+
|
|
219
|
+
### Secrets
|
|
220
|
+
|
|
221
|
+
Manage encrypted app secrets (API keys, tokens, credentials). Values are encrypted at rest and never displayed after creation.
|
|
222
|
+
|
|
194
223
|
```bash
|
|
195
|
-
primitive
|
|
196
|
-
primitive
|
|
197
|
-
primitive
|
|
224
|
+
primitive secrets list [--app <app-id>] # List secrets (values never shown)
|
|
225
|
+
primitive secrets set <KEY> --value <value> [--summary <text>] # Create or update a secret
|
|
226
|
+
primitive secrets delete <KEY> # Delete a secret
|
|
198
227
|
```
|
|
199
228
|
|
|
229
|
+
**Examples:**
|
|
230
|
+
```bash
|
|
231
|
+
primitive secrets set OPENAI_API_KEY --value "sk-..." --summary "Production key"
|
|
232
|
+
primitive secrets set STRIPE_SECRET --value "sk_live_..."
|
|
233
|
+
primitive secrets list --json
|
|
234
|
+
primitive secrets delete STRIPE_SECRET
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
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 workflows and `secrets.KEY` in CEL rules.
|
|
238
|
+
|
|
200
239
|
### Prompts
|
|
201
240
|
|
|
202
241
|
Manage LLM prompt configurations.
|
|
203
242
|
|
|
204
243
|
```bash
|
|
205
244
|
primitive prompts list [app-id] # List prompts
|
|
206
|
-
primitive prompts create [app-id] [options] # Create prompt
|
|
207
245
|
primitive prompts get <prompt-id> # Get details
|
|
208
|
-
primitive prompts update <id> [options] # Update prompt
|
|
209
|
-
primitive prompts delete <id> # Soft delete
|
|
210
246
|
primitive prompts execute <id> --vars '{}' # Execute prompt
|
|
211
247
|
primitive prompts preview <id> --vars '{}' # Preview rendered template
|
|
212
248
|
```
|
|
213
249
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
250
|
+
A prompt is authored in `prompts/<key>.toml` and applied with `config push`:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
primitive config create prompt summarizer
|
|
254
|
+
primitive config push --only prompt/summarizer
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**Configs (prompt variations)** are `[[configs]]` entries in that same file —
|
|
258
|
+
`active = true` marks the live one, `status = "archived"` retires one, and
|
|
259
|
+
duplicating is copying the block under a new `name`. The CLI reads them:
|
|
222
260
|
|
|
223
|
-
**Configs (prompt variations):**
|
|
224
261
|
```bash
|
|
225
262
|
primitive prompts configs list <prompt-id>
|
|
226
|
-
primitive prompts configs
|
|
227
|
-
primitive prompts configs activate <prompt-id> <config-id>
|
|
228
|
-
primitive prompts configs duplicate <prompt-id> <config-id>
|
|
263
|
+
primitive prompts configs get <prompt> <config>
|
|
229
264
|
```
|
|
230
265
|
|
|
231
266
|
### Workflows
|
|
@@ -234,20 +269,103 @@ Manage multi-step workflow definitions.
|
|
|
234
269
|
|
|
235
270
|
```bash
|
|
236
271
|
primitive workflows list [app-id] # List workflows
|
|
237
|
-
primitive workflows create [app-id] --from-file wf.toml # Create workflow
|
|
238
272
|
primitive workflows get <workflow-id> # Get details
|
|
239
|
-
primitive workflows update <id> [options] # Update metadata
|
|
240
|
-
primitive workflows draft update <id> --from-file wf.toml # Update draft
|
|
241
|
-
primitive workflows publish <id> # Publish draft
|
|
242
273
|
primitive workflows preview <id> --input '{}' # Preview execution
|
|
274
|
+
primitive workflows disable <id> # Take it out of service now
|
|
275
|
+
primitive workflows enable <id> # Put it back
|
|
243
276
|
```
|
|
244
277
|
|
|
278
|
+
A workflow is authored in `workflows/<key>.toml` (named config bodies in
|
|
279
|
+
`workflows/<key>.configs/<name>.toml`) and applied with `config push`:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
primitive config create workflow process-doc
|
|
283
|
+
primitive config push --only workflow/process-doc
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Revisions are read-only history from the retired legacy path (issue #2768:
|
|
287
|
+
`workflows publish` and its endpoint are gone). A workflow created before the
|
|
288
|
+
configuration model — one with no active config — is migrated by authoring
|
|
289
|
+
`workflows/<key>.configs/<name>.toml`, setting `activeConfigName = "<name>"` in
|
|
290
|
+
`workflows/<key>.toml`, and pushing.
|
|
291
|
+
|
|
245
292
|
**Run management:**
|
|
246
293
|
```bash
|
|
247
294
|
primitive workflows runs list <workflow-id>
|
|
248
295
|
primitive workflows runs status <workflow-id> <run-id>
|
|
249
296
|
```
|
|
250
297
|
|
|
298
|
+
**Workflow TOML push-time validation (issue #685):** `primitive config push` —
|
|
299
|
+
the only command that sends a workflow TOML since #2645 — runs the
|
|
300
|
+
file through `cli/src/lib/workflow-toml-validator.ts` before sending it to
|
|
301
|
+
the server. For a step whose `kind` the CLI knows about, the validator
|
|
302
|
+
rejects any top-level field outside the allowlist — most commonly catching
|
|
303
|
+
the footgun where `[steps.<id>.request]` is written under `[[steps]]` (TOML
|
|
304
|
+
places the sub-table under `steps[N][<id>]`, not the intended
|
|
305
|
+
`steps[N].request`, so the runtime silently runs the step with an empty
|
|
306
|
+
`request` block). The correct form for the most-recent step is
|
|
307
|
+
`[steps.request]`. For a step whose `kind` the CLI does NOT know (an older
|
|
308
|
+
CLI run against a newer server that registered a new step kind), the
|
|
309
|
+
per-field check is skipped — so a valid new-kind field is never falsely
|
|
310
|
+
rejected — while the kind-agnostic misnested-header footgun detector still
|
|
311
|
+
fires (issue #998).
|
|
312
|
+
|
|
313
|
+
**The allowlist is generated, not hand-maintained (issue #998):** The field
|
|
314
|
+
union and the known-kind set live in the committed artifact
|
|
315
|
+
`cli/src/lib/generated-allowlist.ts`, generated from the server step runners
|
|
316
|
+
(`src/workflows/steps/*.ts`) and the universal `BaseStepDefinition` shape by
|
|
317
|
+
`cli/scripts/gen-allowlist.mjs`. The generator runs automatically at CLI
|
|
318
|
+
`prebuild`; regenerate manually with `node cli/scripts/gen-allowlist.mjs`
|
|
319
|
+
(or `pnpm -C cli gen:allowlist`). The union is derived from what each runner
|
|
320
|
+
*reads* off the step config — not from what the `*StepDefinition` type
|
|
321
|
+
declares (types over-declare and would weaken the footgun detector). A
|
|
322
|
+
freshness guard (`node cli/scripts/gen-allowlist.mjs --check`, also asserted
|
|
323
|
+
by `cli/tests/unit/workflow-toml-validator-drift-guard.test.ts`) fails if the
|
|
324
|
+
committed artifact drifts from a fresh scan, so the historical hand-edit
|
|
325
|
+
drift (#685/#802/#971) cannot recur. When you add a new step kind or a runner
|
|
326
|
+
starts reading a new field, just regenerate and commit the artifact — there is
|
|
327
|
+
no hand-maintained list to update.
|
|
328
|
+
|
|
329
|
+
**A configuration object's field surface has ONE definition (issue #2644):**
|
|
330
|
+
`src/config-surface/` on the server records, per configuration object, which
|
|
331
|
+
`models.yaml` fields exist, which TOML key each carries, which modes the server
|
|
332
|
+
accepts it in, and — for a field with real behavior — the handler that owns it.
|
|
333
|
+
The server's create/update handlers take their accepted key set from it
|
|
334
|
+
(`pickWritableFields`), and `cli/scripts/gen-config-surfaces.mjs` vendors the
|
|
335
|
+
same modules into the committed artifact
|
|
336
|
+
`cli/src/lib/generated-config-surfaces.ts`, which the CLI's push builder, pull
|
|
337
|
+
serializer and TOML key validation read. The generator runs automatically at CLI
|
|
338
|
+
`prebuild`; regenerate manually with `node cli/scripts/gen-config-surfaces.mjs`
|
|
339
|
+
(or `pnpm -C cli gen:config-surfaces`).
|
|
340
|
+
|
|
341
|
+
Three hard-fail checks live in `cli/tests/unit/config-surface-drift-guard.test.ts`:
|
|
342
|
+
freshness (`--check`, a byte comparison), coverage (every model field of every
|
|
343
|
+
registered object is either exposed or classified `notExposed` **with a
|
|
344
|
+
reason**), and registry existence (every `SYNC_RESOURCE_TYPES` label has a
|
|
345
|
+
definition — the migration's `PENDING_MIGRATION` exemption list is gone, so
|
|
346
|
+
there is nowhere to park one). Add a
|
|
347
|
+
field to `models.yaml` and the CLI unit suite fails until you regenerate and
|
|
348
|
+
classify it — so the CLI can no longer silently drop a new server-side field.
|
|
349
|
+
This supersedes the workflow-only descriptor and generator from #2326.
|
|
350
|
+
|
|
351
|
+
**Template expressions are linted at push time (issue #2689):** the validator
|
|
352
|
+
also inspects every `{{ }}` expression on a step and rejects the ones that can
|
|
353
|
+
never resolve — an unknown root (`{{ inputs.userId }}`; the valid roots are
|
|
354
|
+
`input`, `steps`, `outputs`, `meta`, `secrets`, `vars`, plus the contextual
|
|
355
|
+
`selected`/`user`/`md`, the built-ins `now`/`today`/`uuid`/`ulid`, and — inside a
|
|
356
|
+
forEach step's body only — `iteration`/`loop` and the loop's binding name) or a
|
|
357
|
+
reference to a `steps.<id>` / `outputs.<name>` the file does not declare. An
|
|
358
|
+
expression that is only sometimes present is marked optional with
|
|
359
|
+
`| default: ''` or a trailing `|| ''`, and anything statically undecidable (a
|
|
360
|
+
dynamic bracket key) is left to the run-time check. The lint itself is a
|
|
361
|
+
verbatim generated copy of the server module
|
|
362
|
+
`src/workflows/runner/template-static-lint.ts` at
|
|
363
|
+
`cli/src/lib/generated-template-lint.ts` (`cli/scripts/gen-template-lint.mjs`,
|
|
364
|
+
run at `prebuild`, with a `--check` freshness mode asserted by
|
|
365
|
+
`cli/tests/unit/template-lint-drift-guard.test.ts`), so the CLI's push-time
|
|
366
|
+
verdict and the server's save-time verdict come from the same code.
|
|
367
|
+
|
|
368
|
+
|
|
251
369
|
### Tokens
|
|
252
370
|
|
|
253
371
|
Manage long-lived API access tokens for headless/server authentication.
|
|
@@ -263,38 +381,69 @@ primitive tokens revoke <token-id> [app-id] # Revoke t
|
|
|
263
381
|
**Create options:**
|
|
264
382
|
- `--name <name>` - Token name (required)
|
|
265
383
|
- `--user <user-id>` - App user ID to associate the token with (required)
|
|
266
|
-
- `--ttl <duration>` - Token lifetime (e.g., 7d, 30d, 4w,
|
|
384
|
+
- `--ttl <duration>` - Token lifetime (e.g., 30m, 2h, 7d, 30d, 4w, 3mo, 1y). Omit for never-expiring. Units: `m`/`min`=minutes (≤1440), `h`=hours (≤24), `d`=days, `w`=weeks, `mo`=months, `y`=years. **Note:** as of #420 `m` means minutes (was months); use `mo` for months.
|
|
267
385
|
|
|
268
386
|
### Databases
|
|
269
387
|
|
|
270
388
|
Manage online databases and permissions. `list` returns databases the user has direct access to; group-shared databases are listed via `primitive groups databases`.
|
|
271
389
|
|
|
272
390
|
```bash
|
|
273
|
-
primitive databases list [app-id]
|
|
274
|
-
primitive databases create <title> [app-id]
|
|
275
|
-
primitive databases get <database-id> [app-id]
|
|
276
|
-
primitive databases
|
|
391
|
+
primitive databases list [app-id] # List databases (direct access)
|
|
392
|
+
primitive databases create <title> [--app <app-id>] # Create database
|
|
393
|
+
primitive databases get <database-id> [--app <app-id>] # Get details
|
|
394
|
+
primitive databases update <database-id> [options] # Update title or type
|
|
395
|
+
primitive databases delete <database-id> [--app <app-id>] # Delete database
|
|
277
396
|
```
|
|
278
397
|
|
|
279
398
|
**Permissions:**
|
|
280
399
|
```bash
|
|
281
|
-
primitive databases permissions list <database-id> [app-id]
|
|
282
|
-
primitive databases permissions
|
|
283
|
-
primitive databases permissions
|
|
400
|
+
primitive databases permissions list <database-id> [--app <app-id>]
|
|
401
|
+
primitive databases permissions add-manager <database-id> --user-id <uid> [--app <app-id>]
|
|
402
|
+
primitive databases permissions remove-manager <database-id> <user-id> [--app <app-id>]
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
Permission values: `owner` (set at creation), `manager`
|
|
406
|
+
|
|
407
|
+
**Metadata:**
|
|
408
|
+
```bash
|
|
409
|
+
primitive databases metadata update <database-id> --data '{"key":"value"}' # Merge-update metadata
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
**Operations:**
|
|
413
|
+
```bash
|
|
414
|
+
primitive databases operations list <database-id> [--app <app-id>] # List registered operations
|
|
415
|
+
primitive databases operations execute <database-id> <op-name> --params '{}' # Execute operation
|
|
416
|
+
primitive databases operations execute <database-id> <op-name> --token <jwt> # Execute as specific user
|
|
284
417
|
```
|
|
285
418
|
|
|
286
|
-
|
|
419
|
+
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.
|
|
420
|
+
|
|
421
|
+
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.
|
|
422
|
+
|
|
423
|
+
**Records (schema introspection):**
|
|
287
424
|
```bash
|
|
288
|
-
primitive databases
|
|
289
|
-
primitive databases
|
|
290
|
-
primitive databases group-permissions revoke <database-id> <group-type> <group-id>
|
|
425
|
+
primitive databases records models <database-id> [--app <app-id>] # List model names
|
|
426
|
+
primitive databases records describe <database-id> <model> [--app <app-id>] # Show inferred schema
|
|
291
427
|
```
|
|
292
428
|
|
|
293
|
-
|
|
429
|
+
**Indexes:**
|
|
430
|
+
```bash
|
|
431
|
+
primitive databases indexes list <database-id> [--model <name>] # List indexes
|
|
432
|
+
primitive databases indexes create <database-id> <model> <field> [options] # Create index
|
|
433
|
+
primitive databases indexes drop <database-id> <model> <field> # Drop index
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
**Export / Import:**
|
|
437
|
+
```bash
|
|
438
|
+
primitive databases export [app-id] <database-id> --output <dir> # Export records, indexes, constraints
|
|
439
|
+
primitive databases import [app-id] <path> --overwrite --dry-run # Import from export directory
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
Export creates a directory with `metadata.json`, `records.jsonl`, `indexes.json`, and `constraints.json`. Import restores records and indexes into a new or existing database. Database type config (operations, triggers, access rules) is managed separately via `primitive config` — run `config push` on the target app before importing.
|
|
294
443
|
|
|
295
444
|
### Documents
|
|
296
445
|
|
|
297
|
-
Manage document ownership
|
|
446
|
+
Manage document ownership, group permissions, and export/import.
|
|
298
447
|
|
|
299
448
|
```bash
|
|
300
449
|
primitive documents transfer-owner [app-id] <document-id> <new-owner-id> # Transfer ownership
|
|
@@ -309,6 +458,49 @@ primitive documents group-permissions revoke <document-id> <group-type> <group-i
|
|
|
309
458
|
|
|
310
459
|
Permission values: `read-write`, `reader`
|
|
311
460
|
|
|
461
|
+
**Export / Import:**
|
|
462
|
+
```bash
|
|
463
|
+
primitive documents export [app-id] <document-id> --output <dir> # Export Yjs state, blobs, permissions, aliases
|
|
464
|
+
primitive documents export-all [app-id] --user-id <id> --owned-only # Export all docs for a user
|
|
465
|
+
primitive documents import [app-id] <path> --overwrite --aliases overwrite|skip --dry-run # Import from export
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
Export creates a directory per document with `metadata.json`, `document.yjs` (Yjs state), `permissions.json` (for reference), and `blobs/` (attachments). Permissions are exported for reference but not restored during import — the importing admin is the new owner and manages sharing in the target app. Document IDs are preserved across import. User-scoped aliases can be restored with `--aliases overwrite` (update existing) or `--aliases skip` (keep existing, default).
|
|
469
|
+
|
|
470
|
+
### Collections
|
|
471
|
+
|
|
472
|
+
Group documents into a named set and share the whole set at once.
|
|
473
|
+
|
|
474
|
+
```bash
|
|
475
|
+
primitive collections list [app-id] --all # --all: every collection (admin)
|
|
476
|
+
primitive collections create <name> --description <text> # --owner <userId-or-email> (admin)
|
|
477
|
+
primitive collections get <collection-id>
|
|
478
|
+
primitive collections update <collection-id> --name <name>
|
|
479
|
+
primitive collections delete <collection-id> # documents are preserved
|
|
480
|
+
primitive collections access <collection-id> # groups + members in one view
|
|
481
|
+
primitive collections for-document <document-id>
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**Documents, members and group grants:**
|
|
485
|
+
```bash
|
|
486
|
+
primitive collections documents list|add|remove <collection-id> [document-id]
|
|
487
|
+
primitive collections members list|add|remove <collection-id> [user-id] --permission reader
|
|
488
|
+
primitive collections share <collection-id> --group <type>/<id> --permission read-write
|
|
489
|
+
primitive collections unshare <collection-id> --group <type>/<id>
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
**Export / Import:**
|
|
493
|
+
```bash
|
|
494
|
+
primitive collections export --output <dir> # writes <dir>/collections.json
|
|
495
|
+
primitive collections import <path> --dry-run # plan and problems, writes nothing
|
|
496
|
+
primitive collections import <path> --overwrite # merge into an existing same-named collection
|
|
497
|
+
primitive collections import <path> --owner <userId-or-email> # one owner for every collection
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
`collections export` writes `collections.json` beside the `manifest.json` and `documents/` directory a document export leaves there, so one directory is one app's migration: per collection its name, description, type, context id, owner, group grants, direct members with their level, and which documents it holds. Run `documents import` **before** `collections import` — the file refers to documents by the ids that import preserves.
|
|
501
|
+
|
|
502
|
+
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.
|
|
503
|
+
|
|
312
504
|
### Groups
|
|
313
505
|
|
|
314
506
|
Manage groups, members, and memberships.
|
|
@@ -336,26 +528,44 @@ primitive groups memberships <user-id> [app-id] # List user's group mem
|
|
|
336
528
|
|
|
337
529
|
**Group resource access:**
|
|
338
530
|
```bash
|
|
339
|
-
primitive groups databases <group-type> <group-id> # List databases a group can access
|
|
340
531
|
primitive groups documents <group-type> <group-id> # List documents a group can access
|
|
341
532
|
```
|
|
342
533
|
|
|
343
|
-
Group permissions on
|
|
534
|
+
Group permissions on documents are managed via `primitive documents group-permissions` (see [Documents](#documents) above).
|
|
344
535
|
|
|
345
536
|
### Analytics
|
|
346
537
|
|
|
347
538
|
View usage analytics for an app.
|
|
348
539
|
|
|
349
540
|
```bash
|
|
350
|
-
|
|
351
|
-
primitive analytics
|
|
352
|
-
primitive analytics
|
|
353
|
-
primitive analytics
|
|
541
|
+
# Overview & active users
|
|
542
|
+
primitive analytics overview [app-id] # DAU / WAU / MAU + growth
|
|
543
|
+
primitive analytics daily-active [app-id] # Daily active users time series
|
|
544
|
+
primitive analytics rolling-active [app-id] # Rolling active users (28 points)
|
|
545
|
+
primitive analytics cohort-retention [app-id] # Weekly cohort retention matrix
|
|
546
|
+
|
|
547
|
+
# Users
|
|
548
|
+
primitive analytics top-users [app-id] # Most active users
|
|
549
|
+
primitive analytics user-search [app-id] --query <q> # Search by email or ULID
|
|
550
|
+
primitive analytics user-detail <user-ulid> [app-id] # User activity breakdown
|
|
551
|
+
primitive analytics user-snapshot <user-ulid> [app-id] # Latest context snapshot
|
|
552
|
+
|
|
553
|
+
# Events
|
|
554
|
+
primitive analytics events [app-id] # Paginated event feed
|
|
555
|
+
primitive analytics events-grouped [app-id] # Events grouped by dimension
|
|
556
|
+
|
|
557
|
+
# Features
|
|
558
|
+
primitive analytics integrations [app-id] # Integration usage metrics
|
|
559
|
+
primitive analytics workflows [app-id] # Top workflows by runs
|
|
560
|
+
primitive analytics prompts [app-id] # Top prompts by executions
|
|
354
561
|
```
|
|
355
562
|
|
|
356
|
-
**
|
|
357
|
-
- `--window-days <n>` - Time window (default
|
|
358
|
-
- `--limit <n>` - Result limit
|
|
563
|
+
**Common options:**
|
|
564
|
+
- `--window-days <n>` - Time window in days (default varies per command)
|
|
565
|
+
- `--limit <n>` - Result limit (top-users, workflows, prompts)
|
|
566
|
+
- `--group-by <dim>` - Dimension for events-grouped (action, feature, route, country, deviceType, plan, day)
|
|
567
|
+
- `--page <n>` - Page number for events feed (0-based)
|
|
568
|
+
- `--json` - Output raw JSON
|
|
359
569
|
|
|
360
570
|
### Admins (Super-Admin Only)
|
|
361
571
|
|
|
@@ -392,19 +602,22 @@ primitive catalog integrations update <catalog-id> [options]
|
|
|
392
602
|
primitive catalog integrations delete <catalog-id>
|
|
393
603
|
```
|
|
394
604
|
|
|
395
|
-
###
|
|
605
|
+
### Config (TOML Configuration)
|
|
396
606
|
|
|
397
|
-
|
|
607
|
+
Author app configuration as TOML files and reconcile them with the server.
|
|
398
608
|
|
|
399
609
|
```bash
|
|
400
|
-
primitive
|
|
401
|
-
primitive
|
|
402
|
-
primitive
|
|
403
|
-
primitive
|
|
610
|
+
primitive config init # Scaffold the environment's config directory
|
|
611
|
+
primitive config pull # Pull remote config into it
|
|
612
|
+
primitive config push # Push it to the server
|
|
613
|
+
primitive config diff # Show differences
|
|
404
614
|
```
|
|
405
615
|
|
|
616
|
+
The directory is the selected environment's committed tree,
|
|
617
|
+
`primitive/<env>/`, and there is no flag that relocates it or points it at
|
|
618
|
+
another app: select a different environment with `--env <name>` (#3154).
|
|
619
|
+
|
|
406
620
|
**Options:**
|
|
407
|
-
- `--dir <path>` - Config directory (default: ./config)
|
|
408
621
|
- `--dry-run` - Show changes without applying (push only)
|
|
409
622
|
- `--force` - Overwrite remote changes (push only)
|
|
410
623
|
|
|
@@ -413,8 +626,8 @@ primitive sync diff [app-id] --dir ./config # Show differences
|
|
|
413
626
|
The sync commands use TOML files for configuration. Here's the directory structure:
|
|
414
627
|
|
|
415
628
|
```
|
|
416
|
-
|
|
417
|
-
.
|
|
629
|
+
primitive/<env>/
|
|
630
|
+
.sync-state.json # Sync state (auto-generated, committed)
|
|
418
631
|
app.toml # App settings
|
|
419
632
|
integrations/
|
|
420
633
|
weather-api.toml # Integration configs
|
|
@@ -436,7 +649,9 @@ baseUrl = "https://myapp.com"
|
|
|
436
649
|
[auth]
|
|
437
650
|
googleOAuthEnabled = true
|
|
438
651
|
passkeyEnabled = true
|
|
439
|
-
|
|
652
|
+
emailSignInEnabled = true # one email carrying a code and a link
|
|
653
|
+
appleSignInEnabled = true # Sign in with Apple
|
|
654
|
+
appleAudiences = ["com.example.MyApp"] # allowed Apple audiences
|
|
440
655
|
|
|
441
656
|
[cors]
|
|
442
657
|
mode = "custom"
|
|
@@ -444,6 +659,19 @@ allowedOrigins = ["https://myapp.com"]
|
|
|
444
659
|
allowCredentials = true
|
|
445
660
|
```
|
|
446
661
|
|
|
662
|
+
Notes on `[auth]`:
|
|
663
|
+
|
|
664
|
+
- Only keys you actually list are pushed. Omitting a key leaves the server's
|
|
665
|
+
current value untouched — it is **not** reset to `false`. To turn a method
|
|
666
|
+
off, set it explicitly (e.g. `emailSignInEnabled = false`).
|
|
667
|
+
- An unrecognized `[auth]` key (for example a typo like `googleOauthEnabled`)
|
|
668
|
+
produces a warning on `push` and is ignored, rather than being silently
|
|
669
|
+
dropped. The push still applies the recognized keys.
|
|
670
|
+
- `appleAudiences = []` and an omitted `appleAudiences` both mean "no
|
|
671
|
+
audiences" (the server stores them the same way), so `pull` omits the key
|
|
672
|
+
when there are no audiences. A `[] ` round-trip reading back as an omitted
|
|
673
|
+
key is expected, not data loss.
|
|
674
|
+
|
|
447
675
|
### Example: integrations/weather-api.toml
|
|
448
676
|
|
|
449
677
|
```toml
|
|
@@ -451,7 +679,6 @@ allowCredentials = true
|
|
|
451
679
|
key = "weather-api"
|
|
452
680
|
displayName = "Weather API"
|
|
453
681
|
description = "OpenWeatherMap integration"
|
|
454
|
-
status = "active"
|
|
455
682
|
timeoutMs = 30000
|
|
456
683
|
|
|
457
684
|
[requestConfig]
|
|
@@ -464,15 +691,17 @@ allowedPaths = ["/weather", "/forecast"]
|
|
|
464
691
|
|
|
465
692
|
```toml
|
|
466
693
|
[prompt]
|
|
694
|
+
kind = "chat"
|
|
467
695
|
key = "summarizer"
|
|
468
696
|
displayName = "Text Summarizer"
|
|
469
697
|
description = "Summarizes input text"
|
|
470
|
-
status = "active"
|
|
471
698
|
|
|
472
699
|
[[configs]]
|
|
473
700
|
name = "default"
|
|
474
701
|
provider = "openrouter"
|
|
475
702
|
model = "google/gemini-2.0-flash-001"
|
|
703
|
+
|
|
704
|
+
[configs.chat]
|
|
476
705
|
temperature = "0.7"
|
|
477
706
|
maxTokens = 500
|
|
478
707
|
systemPrompt = "You are a helpful assistant."
|
|
@@ -482,6 +711,8 @@ userPromptTemplate = "Summarize: {{ input.text }}"
|
|
|
482
711
|
name = "concise"
|
|
483
712
|
provider = "openrouter"
|
|
484
713
|
model = "google/gemini-2.0-flash-001"
|
|
714
|
+
|
|
715
|
+
[configs.chat]
|
|
485
716
|
temperature = "0.3"
|
|
486
717
|
maxTokens = 200
|
|
487
718
|
systemPrompt = "You create very brief summaries."
|
|
@@ -497,9 +728,173 @@ All list/get commands support `--json` for machine-readable output:
|
|
|
497
728
|
primitive apps list
|
|
498
729
|
|
|
499
730
|
# JSON output for scripting
|
|
500
|
-
primitive apps list --json | jq '.[0].
|
|
731
|
+
primitive apps list --json | jq '.items[0].id'
|
|
501
732
|
```
|
|
502
733
|
|
|
734
|
+
### The list envelope
|
|
735
|
+
|
|
736
|
+
**Every** `<noun> list --json` prints the same object — no exceptions, and
|
|
737
|
+
never a bare array. It is `{ items, hasMore, nextCursor? }`, the envelope
|
|
738
|
+
#2357 named, and #3646 made universal:
|
|
739
|
+
|
|
740
|
+
```jsonc
|
|
741
|
+
{
|
|
742
|
+
"items": [ /* the rows */ ],
|
|
743
|
+
"hasMore": false, // is there another page?
|
|
744
|
+
"nextCursor": "01HXY..." // present only when hasMore is true
|
|
745
|
+
}
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
So `jq '.items[]'` works against any noun, and a script never has to know which
|
|
749
|
+
one it asked about. A `list` whose subject carries context that is not a row —
|
|
750
|
+
`env list`'s current selection, `guides list`'s resolved docs version — prints
|
|
751
|
+
those as extra keys beside these three; the three always mean the same thing.
|
|
752
|
+
|
|
753
|
+
Pagination follows the **route**, not the verb:
|
|
754
|
+
|
|
755
|
+
- A `list` backed by a paged server route carries `--limit <n>` and
|
|
756
|
+
`--cursor <cursor>`, prints exactly one page, and reports that page's
|
|
757
|
+
`hasMore`/`nextCursor`. It never walks the chain for you.
|
|
758
|
+
- A `list` backed by a route that does not paginate carries neither flag and
|
|
759
|
+
prints the whole set as `{ "items": [...], "hasMore": false }`.
|
|
760
|
+
|
|
761
|
+
```bash
|
|
762
|
+
# One page, then the next
|
|
763
|
+
primitive users list --json --limit 50
|
|
764
|
+
primitive users list --json --limit 50 --cursor "$(primitive users list --json --limit 50 | jq -r .nextCursor)"
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
`primitive help --json` reports which flags a given `list` carries. The rules
|
|
768
|
+
themselves, and the guard that enforces them across the whole command manifest,
|
|
769
|
+
are in [`docs/cli-design.md`](../docs/cli-design.md).
|
|
770
|
+
|
|
771
|
+
### Stdout vs. stderr
|
|
772
|
+
|
|
773
|
+
The CLI follows the same convention as `git`, `kubectl`, `aws`, and `gh`:
|
|
774
|
+
|
|
775
|
+
- **stdout** carries the *data* the command produced — JSON documents under
|
|
776
|
+
`--json`, tabular listings (`apps list`), raw values (`primitive token`),
|
|
777
|
+
and the primary `label: value` fields a `get` / `show` / `describe` command
|
|
778
|
+
emits (e.g. `primitive integrations get <id>`).
|
|
779
|
+
- **stderr** carries *diagnostics* — status text (`✓ Created…`,
|
|
780
|
+
`i Waiting for completion...`), warnings (`!` markers), progress lines, and
|
|
781
|
+
the `key: value` summaries shown *after* a side-effecting command runs
|
|
782
|
+
(e.g. the `Webhook ID: …` confirmation printed by `webhooks create`).
|
|
783
|
+
|
|
784
|
+
This means `primitive <cmd> --json | jq` always works, regardless of any
|
|
785
|
+
status / warning / progress text the command may print along the way.
|
|
786
|
+
It also means `primitive integrations get <id> > out.txt` writes the
|
|
787
|
+
integration's fields to `out.txt` while the status diagnostics still appear
|
|
788
|
+
on the terminal via stderr.
|
|
789
|
+
|
|
790
|
+
Conversely, redirecting stderr (`primitive <cmd> 2>/dev/null`) silences
|
|
791
|
+
diagnostics — including success checkmarks like `✓ Pushed 3 changes` — so
|
|
792
|
+
prefer `2>&1 >file.txt` if you want the full transcript.
|
|
793
|
+
|
|
794
|
+
For contributors writing new commands, the output helpers in
|
|
795
|
+
`cli/src/lib/output.ts` make the data-vs-diagnostic split explicit: use
|
|
796
|
+
`json()` and `result(label, value)` for data the caller asked for, and
|
|
797
|
+
`success()` / `info()` / `warn()` / `keyValue()` / `divider()` / `heading()`
|
|
798
|
+
for diagnostics about what the command did.
|
|
799
|
+
|
|
800
|
+
## Programmatic surfaces
|
|
801
|
+
|
|
802
|
+
### `primitive help --json` — command manifest
|
|
803
|
+
|
|
804
|
+
`primitive help --json` prints a machine-readable manifest of the full command
|
|
805
|
+
tree (commands, subcommands, positional args, options, aliases, global options,
|
|
806
|
+
and the CLI version) to **stdout** as a single JSON document, then exits `0`. It
|
|
807
|
+
is hidden/undocumented in human `--help` output, auth-free, and runs entirely
|
|
808
|
+
offline (no project config, no credentials, no network) — so it works in any
|
|
809
|
+
directory, including one with no `.primitive/`.
|
|
810
|
+
|
|
811
|
+
```bash
|
|
812
|
+
primitive help --json | jq '.commands[] | select(.name=="sync") | .commands[].name'
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
Shape (`schemaVersion: 1`):
|
|
816
|
+
|
|
817
|
+
```jsonc
|
|
818
|
+
{
|
|
819
|
+
"schemaVersion": 1,
|
|
820
|
+
"name": "primitive",
|
|
821
|
+
"version": "1.0.49",
|
|
822
|
+
"globalOptions": [ { "flags": "-e, --env <name>", "description": "…", "required": true, "defaultValue": null, "hidden": false } ],
|
|
823
|
+
"commands": [
|
|
824
|
+
{
|
|
825
|
+
"name": "sync",
|
|
826
|
+
"description": "…",
|
|
827
|
+
"aliases": [],
|
|
828
|
+
"args": [],
|
|
829
|
+
"options": [],
|
|
830
|
+
"commands": [
|
|
831
|
+
{
|
|
832
|
+
"name": "push",
|
|
833
|
+
"description": "…",
|
|
834
|
+
"aliases": [],
|
|
835
|
+
"args": [],
|
|
836
|
+
"options": [ { "flags": "--dry-run", "description": "…", "required": false, "defaultValue": null, "hidden": false } ],
|
|
837
|
+
"commands": []
|
|
838
|
+
}
|
|
839
|
+
]
|
|
840
|
+
}
|
|
841
|
+
]
|
|
842
|
+
}
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
`hidden` marks a deprecated alias that still works but is not part of the
|
|
846
|
+
supported surface (it is omitted from human `--help` too). Tooling that treats
|
|
847
|
+
the manifest as an allowlist — the docs CLI gate does — should skip those flags.
|
|
848
|
+
|
|
849
|
+
`schemaVersion` is the contract knob: consumers assert the shape they understand
|
|
850
|
+
and fail loud if a future CLI bumps it (a breaking change for downstream tooling
|
|
851
|
+
such as docs CI that drift-gates documented invocations against the published
|
|
852
|
+
CLI).
|
|
853
|
+
|
|
854
|
+
### `primitive-admin/validators` — TOML validators
|
|
855
|
+
|
|
856
|
+
The TOML validators that `config push` runs as its load-bearing gate are exported
|
|
857
|
+
from the `primitive-admin/validators` subpath (ESM-only, with types) so external
|
|
858
|
+
tooling can validate exactly the way the published CLI does — instead of
|
|
859
|
+
re-implementing the flow and silently drifting.
|
|
860
|
+
|
|
861
|
+
```ts
|
|
862
|
+
import {
|
|
863
|
+
validateWorkflowTomlSource, // source-level wrapper (parse → expand → validate)
|
|
864
|
+
validateWorkflowToml, // raw: pure fn over already-parsed TOML
|
|
865
|
+
formatWorkflowTomlErrors,
|
|
866
|
+
validateOperations, // raw: pure fn over already-parsed operations[]
|
|
867
|
+
formatIssue,
|
|
868
|
+
} from "primitive-admin/validators";
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
Two contracts:
|
|
872
|
+
|
|
873
|
+
- **`validateWorkflowTomlSource(raw, filePath)`** — pass the **raw TOML source
|
|
874
|
+
string** and the workflow's path. It runs the *identical* parse →
|
|
875
|
+
`expandWorkflowTomlData()` (`include` fragment expansion) → `validateWorkflowToml`
|
|
876
|
+
→ `formatWorkflowTomlErrors` path that `config push` runs, so it cannot diverge
|
|
877
|
+
from `config push` on workflow `include` fragments. Returns
|
|
878
|
+
`{ errors, formatted }` (`formatted` is `null` when valid). Fragment files
|
|
879
|
+
resolve relative to `<filePath>/../../workflow-fragments/`, matching the CLI.
|
|
880
|
+
|
|
881
|
+
- **The raw validators** (`validateWorkflowToml`, `validateOperations`,
|
|
882
|
+
`formatWorkflowTomlErrors`, `formatIssue`) are **pure functions over
|
|
883
|
+
already-parsed TOML** — they do *not* read files or parse TOML. The consumer
|
|
884
|
+
parses (e.g. with `smol-toml`) and, for workflows, performs any `include`
|
|
885
|
+
expansion itself. There is **no coupling on a specific TOML parser version**:
|
|
886
|
+
pass whatever parsed object / `operations[]` you already have.
|
|
887
|
+
|
|
888
|
+
```ts
|
|
889
|
+
import * as TOML from "smol-toml";
|
|
890
|
+
const data = TOML.parse(raw);
|
|
891
|
+
const errs = validateWorkflowToml(data);
|
|
892
|
+
if (errs.length) throw new Error(formatWorkflowTomlErrors(path, errs));
|
|
893
|
+
```
|
|
894
|
+
|
|
895
|
+
Internal helpers (`collectParamRefs`, `declaredParamNames`,
|
|
896
|
+
`locateOperationLine`) are intentionally **not** exported.
|
|
897
|
+
|
|
503
898
|
## Exit Codes
|
|
504
899
|
|
|
505
900
|
- `0` - Success
|
|
@@ -508,15 +903,30 @@ primitive apps list --json | jq '.[0].appId'
|
|
|
508
903
|
|
|
509
904
|
## Environment Variables
|
|
510
905
|
|
|
511
|
-
- `PRIMITIVE_SERVER_URL` - Server URL for login (defaults to `https://primitiveapi.com`)
|
|
906
|
+
- `PRIMITIVE_SERVER_URL` - Server URL for `login` outside a project (defaults to `https://primitiveapi.com`)
|
|
512
907
|
|
|
513
|
-
**
|
|
514
|
-
1.
|
|
515
|
-
|
|
516
|
-
|
|
908
|
+
**Login server resolution:**
|
|
909
|
+
1. Project mode (`primitive/config.json` present): the active environment's
|
|
910
|
+
`apiUrl`. Select the environment with `-e <name>`, `PRIMITIVE_ENV`,
|
|
911
|
+
`primitive env use <name>` (this machine's selection, stored in the
|
|
912
|
+
gitignored `.primitive/local.json`), or the committed `defaultEnvironment`
|
|
913
|
+
— in that order. An unresolvable environment fails loudly — `login`
|
|
914
|
+
never silently falls back to production.
|
|
915
|
+
2. Outside a project (no project config): `PRIMITIVE_SERVER_URL`, else the
|
|
916
|
+
default `https://primitiveapi.com`.
|
|
917
|
+
|
|
918
|
+
> `login` no longer accepts `-s/--server` (removed in a breaking change). Use
|
|
919
|
+
> `-e <env>` in a project, or `PRIMITIVE_SERVER_URL` for local dev / scripts.
|
|
920
|
+
> `init` and `bootstrap` keep their own `-s/--server` (they run before a
|
|
921
|
+
> project config exists).
|
|
517
922
|
|
|
518
923
|
## Development
|
|
519
924
|
|
|
925
|
+
Before adding or changing a command, read [`docs/cli-design.md`](../docs/cli-design.md)
|
|
926
|
+
in the repo root — the CLI's design rules (which verbs each kind of noun carries,
|
|
927
|
+
TOML-only authoring, deletion and naming rules, what a breaking change obliges).
|
|
928
|
+
It is internal maintainer guidance and is not published.
|
|
929
|
+
|
|
520
930
|
```bash
|
|
521
931
|
# Run without building (uses tsx)
|
|
522
932
|
pnpm run cli:dev -- login
|
|
@@ -570,12 +980,13 @@ cli/tests/
|
|
|
570
980
|
config.test.ts # Credentials and config management
|
|
571
981
|
output.test.ts # Output formatting functions
|
|
572
982
|
integration/
|
|
573
|
-
api-client.test.ts
|
|
574
|
-
commands.test.ts
|
|
575
|
-
tokens.test.ts
|
|
576
|
-
databases.test.ts
|
|
577
|
-
documents.test.ts
|
|
578
|
-
groups.test.ts
|
|
983
|
+
api-client.test.ts # API client HTTP tests
|
|
984
|
+
commands.test.ts # CLI command tests
|
|
985
|
+
tokens.test.ts # Token lifecycle tests
|
|
986
|
+
databases.test.ts # Database CRUD, permissions, group permissions tests
|
|
987
|
+
documents.test.ts # Document group permissions, group resource listing tests
|
|
988
|
+
groups.test.ts # Group CRUD, members, memberships tests
|
|
989
|
+
classroom-e2e.test.ts # End-to-end classroom app workflow (types, rules, operations, access)
|
|
579
990
|
```
|
|
580
991
|
|
|
581
992
|
## Troubleshooting
|
|
@@ -583,8 +994,11 @@ cli/tests/
|
|
|
583
994
|
### "Not logged in" error
|
|
584
995
|
Run `primitive login` to authenticate.
|
|
585
996
|
|
|
586
|
-
### "No
|
|
587
|
-
|
|
997
|
+
### "No primitive/config.json found" error
|
|
998
|
+
The command ran outside a Primitive project. Every app-scoped command reads its
|
|
999
|
+
server, app and configuration tree from the project's environment, so `cd` into
|
|
1000
|
+
the project (any subdirectory works) or create one with `primitive init`. There
|
|
1001
|
+
is no global fallback and no flag that points the command elsewhere.
|
|
588
1002
|
|
|
589
1003
|
### Token expired
|
|
590
1004
|
The CLI automatically refreshes tokens. If issues persist, try `primitive logout` then `primitive login`.
|