primitive-admin 1.1.0-alpha.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +523 -109
- package/assets/skill/skills/primitive-platform/SKILL.md +289 -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 +1282 -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 +471 -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 +1887 -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 +65 -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 +4 -2
- 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/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 +2670 -0
- package/dist/src/commands/sync.js +17144 -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 +2550 -0
- package/dist/src/lib/api-client.js +2503 -160
- package/dist/src/lib/api-client.js.map +1 -1
- 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 +184 -0
- package/dist/src/lib/collection-export.js +252 -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-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 +281 -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 +10569 -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/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 +715 -0
- package/dist/src/lib/log-inspection.js +816 -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 +163 -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 +98 -0
- package/dist/src/lib/paginate.js +112 -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-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
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: primitive-platform
|
|
3
|
+
description: >
|
|
4
|
+
Fetches the Primitive platform's agent guides and applies them. MUST be used whenever the user
|
|
5
|
+
is writing or reviewing code that uses js-bao, js-bao-wss-client, primitive-app,
|
|
6
|
+
primitive-functions, or any Primitive platform feature (documents, databases, server functions,
|
|
7
|
+
prompts, integrations, blobs, authentication, users/groups), and before running any `primitive`
|
|
8
|
+
CLI command. All development guidance lives in the guides this skill fetches; after writing or
|
|
9
|
+
modifying code that touches Primitive APIs, it cross-references the code against those guides
|
|
10
|
+
and corrects mistakes. Use this skill even if the user doesn't explicitly ask for it. Also use it
|
|
11
|
+
when something looks like a platform bug or missing platform capability, to record the platform
|
|
12
|
+
feedback in the app's PRIMITIVE-FEEDBACK.md. Also trigger whenever the user wants to upgrade or
|
|
13
|
+
update the app to a newer platform version — bumping js-bao, js-bao-wss-client, primitive-app, or
|
|
14
|
+
the primitive CLI — which follows the "Upgrading Platform Libraries" workflow below.
|
|
15
|
+
allowed-tools: Bash, Read, Edit, Write, Glob, Grep, Agent
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Primitive Platform
|
|
19
|
+
|
|
20
|
+
Everything about how to build on Primitive — APIs, configuration, the CLI, patterns and
|
|
21
|
+
pitfalls — lives in the **agent guides** the `primitive` CLI serves. This skill tells you how to
|
|
22
|
+
get the right guides and when to read them. It deliberately teaches nothing about the platform
|
|
23
|
+
itself: never write Primitive code, answer a Primitive question, or run a Primitive command from
|
|
24
|
+
memory or from this file. Fetch the guide.
|
|
25
|
+
|
|
26
|
+
## Getting the guides
|
|
27
|
+
|
|
28
|
+
`primitive guides` works anywhere, inside a Primitive project or not.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
primitive guides list # every topic: description, keywords, use cases, variants
|
|
32
|
+
primitive guides get <topic> --language <ts|swift> --platform <web|ios|macos>
|
|
33
|
+
primitive guides get <topic> # the topic's default variant
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- **Which topics.** Read the `list` output and fetch every guide whose topic the task touches.
|
|
37
|
+
A feature usually spans several (a server function that writes a database and runs a prompt
|
|
38
|
+
needs all three guides). Fetch them BEFORE writing code.
|
|
39
|
+
- **Which variant.** Pass the project's language and platform. A `Package.swift`,
|
|
40
|
+
`*.xcodeproj`, or `project.yml` means `--language swift` with `--platform ios` or `macos`; a
|
|
41
|
+
web app with `package.json` and `js-bao-wss-client` means `--language ts --platform web`. The
|
|
42
|
+
`COMBINATIONS` column of `list` shows what each guide offers. The flags never fail: an unknown
|
|
43
|
+
value or unavailable combination falls back to the default variant, so pass your best guess,
|
|
44
|
+
or omit them when you can't tell. `--language` accepts `typescript`/`javascript`/`js` for `ts`.
|
|
45
|
+
- **Which channel.** Outside a project the CLI serves the production guides. Inside a project it
|
|
46
|
+
serves the guides matching the server the project's current environment points at, so an app
|
|
47
|
+
on the alpha environment reads the alpha guides. The version follows the installed
|
|
48
|
+
`js-bao-wss-client`.
|
|
49
|
+
- **Freshness.** Guides are cached under `~/.primitive/guides/` for 24 hours. After upgrading the
|
|
50
|
+
CLI or the libraries, pass `--refresh` on the first `list` and `get`.
|
|
51
|
+
- **Where to start.** `configuration` covers projects, environments, and pushing config;
|
|
52
|
+
`data-modeling` covers choosing where data lives; `inspecting-and-debugging` covers reading a
|
|
53
|
+
running app. For a CLI command you have not used, fetch the guide for its feature first.
|
|
54
|
+
|
|
55
|
+
## Writing code
|
|
56
|
+
|
|
57
|
+
1. Fetch the guides for every feature the change touches.
|
|
58
|
+
2. Follow them exactly: method names, argument order, lifecycle, configuration shapes, and the
|
|
59
|
+
follow-up steps they name (codegen, pushing config, typechecking).
|
|
60
|
+
3. Never guess an API. If the guide you have does not answer the question, fetch the related
|
|
61
|
+
guides it links before inventing anything. If none does, it is a platform gap: see "The
|
|
62
|
+
platform feedback doc" below.
|
|
63
|
+
4. Before running a `primitive` command that changes server state, read the `Env | App | Server`
|
|
64
|
+
header every command prints and confirm it names the environment you intend. The
|
|
65
|
+
`configuration` guide explains projects and environments.
|
|
66
|
+
|
|
67
|
+
## Reviewing code (automatic, after every change)
|
|
68
|
+
|
|
69
|
+
After writing or modifying code that touches Primitive, review it without being asked:
|
|
70
|
+
|
|
71
|
+
1. **Identify the features touched.** Imports from `js-bao`, `js-bao-wss-client`,
|
|
72
|
+
`primitive-app`, or `primitive-functions`; files in the project's configuration tree; model
|
|
73
|
+
definitions and schemas.
|
|
74
|
+
2. **Fetch those guides** in the project's language and platform.
|
|
75
|
+
3. **Compare the code against them.** API usage, lifecycle, access and authorization, anything
|
|
76
|
+
the guide warns against, and any follow-up step the guide requires that the change skipped.
|
|
77
|
+
4. **Fix what's wrong.** Cite the guide section, edit the file (don't just suggest), and name any
|
|
78
|
+
command the user still needs to run. If nothing is wrong, say so briefly.
|
|
79
|
+
|
|
80
|
+
## When the user is starting a new feature
|
|
81
|
+
|
|
82
|
+
1. Run `primitive guides list` and pick every relevant topic.
|
|
83
|
+
2. Fetch those guides in the project's language and platform.
|
|
84
|
+
3. Recommend a data model from the guides. If requirements are ambiguous, ask clarifying
|
|
85
|
+
questions first: a data model is much easier to get right up front than to migrate.
|
|
86
|
+
4. Outline the implementation, citing the guide patterns it follows.
|
|
87
|
+
5. Write the code, then review it as above.
|
|
88
|
+
|
|
89
|
+
## When the user asks "How do I…?"
|
|
90
|
+
|
|
91
|
+
1. Find the topic with `primitive guides list`, then fetch it.
|
|
92
|
+
2. Answer from the guide, with its examples. Don't guess or invent APIs.
|
|
93
|
+
3. Point the user at the guide for more: `primitive guides get <topic>`.
|
|
94
|
+
|
|
95
|
+
## When the user is moving an app's data to another app
|
|
96
|
+
|
|
97
|
+
Fetch the `documents` guide and follow its export/import sections. A migration is two
|
|
98
|
+
exports into one directory and two imports out of it, in a fixed order — the documents
|
|
99
|
+
bundle, then the collections those documents sit in — and the guide has the commands, the
|
|
100
|
+
order they must run in, and what does not travel. Don't run a single export or import from
|
|
101
|
+
memory: the wrong order silently loses every collection's document membership.
|
|
102
|
+
|
|
103
|
+
## Upgrading Platform Libraries
|
|
104
|
+
|
|
105
|
+
When the user asks to upgrade the app to a newer platform version, follow this workflow.
|
|
106
|
+
An upgrade is not just a version bump: after the libraries move, workarounds built for old
|
|
107
|
+
platform bugs should come out, the starter template the app was scaffolded from has usually
|
|
108
|
+
moved too, and new platform capabilities should be considered. The refreshed guides are the
|
|
109
|
+
source of truth for what the platform can do now.
|
|
110
|
+
|
|
111
|
+
The backend is upgraded by the platform team, not by the app — the app only chooses which
|
|
112
|
+
environment it points at (see the `configuration` guide). A library upgrade against the production environment
|
|
113
|
+
needs no server-side changes.
|
|
114
|
+
|
|
115
|
+
### 1. Snapshot the current state
|
|
116
|
+
|
|
117
|
+
- Read `package.json` and note the installed versions of the platform packages the app
|
|
118
|
+
uses: `js-bao`, `js-bao-wss-client`, `primitive-app`, and `primitive-admin` (the CLI).
|
|
119
|
+
- Check what's available: `pnpm view <pkg> dist-tags` for each. Compare the target tag's
|
|
120
|
+
version against what's installed — a dist-tag can lag (or even point behind another
|
|
121
|
+
tag), so confirm the upgrade actually moves forward before proceeding.
|
|
122
|
+
- Locate the app's platform feedback doc (convention below). Note its upgrade stamp and
|
|
123
|
+
the tracked workarounds — Step 5 revisits each one.
|
|
124
|
+
|
|
125
|
+
### 2. Upgrade the CLI first
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
pnpm add -g primitive-admin@latest # pnpm preferred; use npm if that's how the CLI was installed
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Upgrading the CLI first matters for two reasons:
|
|
132
|
+
|
|
133
|
+
- The CLI bundles this skill and silently refreshes the installed copy on its next run.
|
|
134
|
+
After upgrading, **re-read this skill file** — the guidance itself may have changed.
|
|
135
|
+
- The CLI serves the guides, and guides are cached at `~/.primitive/guides/` with a
|
|
136
|
+
24-hour TTL. Nothing invalidates that cache when packages update, so after any upgrade
|
|
137
|
+
pass `--refresh` on the first `primitive guides list` / `primitive guides get` calls
|
|
138
|
+
(or clear the cache: `rm -rf ~/.primitive/guides`). Otherwise you may be reading
|
|
139
|
+
yesterday's guides against today's libraries.
|
|
140
|
+
|
|
141
|
+
### 3. Upgrade the app's libraries
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# pnpm by default (use npm only if the app already uses npm), for the packages the app uses:
|
|
145
|
+
pnpm add js-bao@latest js-bao-wss-client@latest primitive-app@latest
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Upgrade the libraries **before** fetching guides: the guides system selects its version
|
|
149
|
+
channel from the *installed* `js-bao-wss-client` major, so fetching first returns guides
|
|
150
|
+
for the old version. Then refetch the guides for every feature area the app uses,
|
|
151
|
+
passing `--refresh` on the first call.
|
|
152
|
+
|
|
153
|
+
### 4. Fix breaking changes, then scan for deprecated API use
|
|
154
|
+
|
|
155
|
+
Run the app's typecheck/build. For every error, consult the refreshed guide for that
|
|
156
|
+
feature area and migrate the code to the current API — don't pin back or suppress. A
|
|
157
|
+
major version bump means breaking changes are expected; treat the migration as part of
|
|
158
|
+
the upgrade, not an optional follow-up.
|
|
159
|
+
|
|
160
|
+
Once it builds, find every platform API the app still uses that the platform has
|
|
161
|
+
deprecated. A deprecated surface works today and is removed in a later major, so this
|
|
162
|
+
is the moment to warn the user, not the moment it breaks. Each surface marks its
|
|
163
|
+
deprecations where the toolchain already looks, so the scan is a lint or a build, not
|
|
164
|
+
a grep:
|
|
165
|
+
|
|
166
|
+
- **TypeScript (web) apps.** Every deprecated member of the platform packages carries
|
|
167
|
+
a `@deprecated` note in its typings, and the `@typescript-eslint/no-deprecated` lint
|
|
168
|
+
rule reports each use together with that note. The Vue starter template enables it
|
|
169
|
+
for `src/`, so `pnpm lint` in an app on the current template lists them. An app
|
|
170
|
+
whose lint config predates the rule reports nothing: pull the template's
|
|
171
|
+
`eslint.config.ts` forward first (Step 6 covers the rest of the template; take that
|
|
172
|
+
one file now), then lint.
|
|
173
|
+
- **Swift apps.** The client marks deprecations with `@available(*, deprecated,
|
|
174
|
+
message:)`, so the compiler reports each use as a warning that names the
|
|
175
|
+
replacement. Build the app and read the `is deprecated` warnings for the app's own
|
|
176
|
+
sources, not its dependencies.
|
|
177
|
+
- **The configuration tree.** A deprecated key or spelling in the app's `primitive/`
|
|
178
|
+
TOML is reported when the tree is pushed; the `configuration` guide explains how to
|
|
179
|
+
check a tree without applying it.
|
|
180
|
+
|
|
181
|
+
Report every hit to the user as a list: file and line, the deprecated API, and the
|
|
182
|
+
replacement its note names (the `changelog` guide has the entry that deprecated it
|
|
183
|
+
and what replaced it). Don't migrate them unasked — some replacements change
|
|
184
|
+
behavior — but say which ones are a mechanical rename and offer to do those in the
|
|
185
|
+
same upgrade. A use the app keeps on purpose gets a lint suppression with the reason
|
|
186
|
+
beside it, so the next upgrade's scan does not report it again.
|
|
187
|
+
|
|
188
|
+
### 5. Retire resolved workarounds
|
|
189
|
+
|
|
190
|
+
For each workaround tracked in the feedback doc, re-test the underlying platform
|
|
191
|
+
behavior against the upgraded libraries (a small repro, or the app test that covers it).
|
|
192
|
+
If the platform now behaves correctly, remove the workaround code and move the item to
|
|
193
|
+
Resolved. If not, keep it and note the version it was last checked against. Stale
|
|
194
|
+
workarounds are a real cost — they mask platform behavior and confuse later readers —
|
|
195
|
+
so default to removing them the moment they're unnecessary.
|
|
196
|
+
|
|
197
|
+
### 6. Adopt template updates
|
|
198
|
+
|
|
199
|
+
The app was scaffolded by `primitive init` from a starter template —
|
|
200
|
+
`Primitive-Labs/primitive-vue-template` for web apps, `Primitive-Labs/primitive-swift-template`
|
|
201
|
+
for iOS. Those templates keep moving with the platform: config, setup, and wiring fixes
|
|
202
|
+
land there and never reach an app generated months earlier. Scan the template the app came
|
|
203
|
+
from (both, if the app has a web and an iOS client) and pull forward what applies. Fetch
|
|
204
|
+
the branch matching the channel you're upgrading to — `main` for production, `alpha` for
|
|
205
|
+
alpha:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Vue
|
|
209
|
+
curl -sL https://github.com/Primitive-Labs/primitive-vue-template/archive/refs/heads/main.tar.gz \
|
|
210
|
+
| tar -xz -C /tmp
|
|
211
|
+
# Swift
|
|
212
|
+
gh api repos/Primitive-Labs/primitive-swift-template/tarball/main > /tmp/swift-template.tgz
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Then compare the template against the app file by file:
|
|
216
|
+
|
|
217
|
+
- **The app never changed it → move it over.** Where the app still carries the template's
|
|
218
|
+
version unchanged, take the newer one. That includes files the template has added since
|
|
219
|
+
the app was scaffolded. No need to ask.
|
|
220
|
+
- **The app removed it → leave it removed.** A file or block the app deleted was deleted
|
|
221
|
+
on purpose. Never restore it.
|
|
222
|
+
- **Both changed it → ask.** Where the app has its own edits to something the template
|
|
223
|
+
also changed, don't overwrite. Say what the template's change does and why it landed,
|
|
224
|
+
then ask whether to merge it in. Ask once per coherent change, not per hunk.
|
|
225
|
+
|
|
226
|
+
Telling those three cases apart needs a baseline: the template commit the app last synced
|
|
227
|
+
from, recorded in the feedback doc (below). With it, diff baseline→template to see what
|
|
228
|
+
the template changed and baseline→app to see what the app changed; only files in both
|
|
229
|
+
sets need a question. Without a stamp you can't tell an app edit from a template edit, so
|
|
230
|
+
treat every differing file as "ask" — and record the stamp this time.
|
|
231
|
+
|
|
232
|
+
### 7. Adopt and suggest new features
|
|
233
|
+
|
|
234
|
+
Re-run `primitive guides list` (topics appear and grow over time) and skim the refreshed
|
|
235
|
+
guides for the app's feature areas. Compare against what the app actually does:
|
|
236
|
+
|
|
237
|
+
- Where a new platform capability clearly replaces app-level code (less code, same
|
|
238
|
+
behavior), adopt it as part of the upgrade.
|
|
239
|
+
- Where a capability opens something new but needs a product decision, don't build it —
|
|
240
|
+
report it as a suggestion with a pointer to the relevant guide section.
|
|
241
|
+
|
|
242
|
+
### 8. Verify and stamp
|
|
243
|
+
|
|
244
|
+
Run the app's tests, apply the post-change review above to everything modified, and
|
|
245
|
+
update the feedback doc's upgrade stamp (date, channel, versions, and the template
|
|
246
|
+
commit synced in Step 6).
|
|
247
|
+
|
|
248
|
+
### The platform feedback doc
|
|
249
|
+
|
|
250
|
+
Convention: a `PRIMITIVE-FEEDBACK.md` at the app root tracks the app's relationship to the
|
|
251
|
+
platform — when it was last upgraded, which workarounds exist for platform problems, and
|
|
252
|
+
what the app found missing or broken. This is what makes upgrades mechanical instead of
|
|
253
|
+
archaeological, and it is also how platform feedback reaches the platform team: **the
|
|
254
|
+
platform team reads this document. No issue is filed from an app.** If the app doesn't
|
|
255
|
+
have one, create it the first time there is something to record:
|
|
256
|
+
|
|
257
|
+
```markdown
|
|
258
|
+
# Platform Feedback
|
|
259
|
+
|
|
260
|
+
## Upgrade stamp
|
|
261
|
+
- Last upgraded: 2026-07-21
|
|
262
|
+
- Channel: production
|
|
263
|
+
- Versions: js-bao-wss-client 2.0.6, primitive-app 3.0.5, js-bao 0.5.1, primitive-admin 1.0.55
|
|
264
|
+
- Template: primitive-vue-template @ main 0f1c2d3
|
|
265
|
+
|
|
266
|
+
## Open items
|
|
267
|
+
- Symptom or missing capability. Evidence: `POST /app/x/api/databases` returns 500
|
|
268
|
+
(error text below). Workaround: `src/lib/foo.ts:42` (retry loop). Remove when: the
|
|
269
|
+
create returns 201 on the first call.
|
|
270
|
+
|
|
271
|
+
## Resolved
|
|
272
|
+
- Symptom. Workaround removed 2026-07-21.
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**When something looks like a platform problem** — a bug in js-bao, the client library,
|
|
276
|
+
the CLI, or a capability the platform doesn't have — rather than a problem in the user's
|
|
277
|
+
app, write it into this document under **Open items**. That is the whole of what to do
|
|
278
|
+
with it; help the user work around the problem in the app, and record:
|
|
279
|
+
|
|
280
|
+
- **The symptom**: one line, what goes wrong or what is missing.
|
|
281
|
+
- **The evidence**: the exact call, config, or command and the verbatim error or
|
|
282
|
+
response, in a fenced block if it is more than a line. Precision here is what lets the
|
|
283
|
+
platform team reproduce it.
|
|
284
|
+
- **The workaround location**: `file:line` of the code the app carries because of it.
|
|
285
|
+
- **The condition for removing the workaround**: the observable platform behavior that
|
|
286
|
+
means the workaround can come out. A later upgrade re-tests exactly this (Step 5).
|
|
287
|
+
|
|
288
|
+
Entries sometimes carry a platform issue number (Primitive-Labs members add them); items
|
|
289
|
+
without one are just as useful — the document is the feedback channel, not the tracker.
|