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,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one server-URL validator the CLI shares (issue #2927).
|
|
3
|
+
*
|
|
4
|
+
* It returns the `string | true` shape `@inquirer/prompts` expects from a
|
|
5
|
+
* `validate` callback, so the same function backs the `primitive init` prompt,
|
|
6
|
+
* the `--server` flag check and init-config validation, `project-config.ts`'s
|
|
7
|
+
* `apiUrl` check, and `env add --api-url`. It used to live in the
|
|
8
|
+
* init-specific `resolve-init-server.ts` while the last two hand-rolled their
|
|
9
|
+
* own `try { new URL(x) } catch`.
|
|
10
|
+
*
|
|
11
|
+
* The parse deliberately runs on the *raw* string: JavaScript `trim()` strips
|
|
12
|
+
* Unicode whitespace (U+00A0, U+2028, U+FEFF, …) that the WHATWG URL parser
|
|
13
|
+
* does not, so trimming first would accept values like `" https://x"`
|
|
14
|
+
* that later URL construction cannot use — and `env add` would persist them.
|
|
15
|
+
* `trim()` is therefore used only to decide whether the input is empty; the
|
|
16
|
+
* URL parser already ignores the ASCII padding it is willing to strip.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Validates a server URL. Returns `true` when valid, otherwise the message to
|
|
20
|
+
* show the user.
|
|
21
|
+
*/
|
|
22
|
+
export function validateServerUrl(url) {
|
|
23
|
+
if (typeof url !== "string" || !url.trim())
|
|
24
|
+
return "Server URL cannot be empty";
|
|
25
|
+
try {
|
|
26
|
+
new URL(url);
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return "Please enter a valid URL (e.g., https://example.com)";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=server-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-url.js","sourceRoot":"","sources":["../../../src/lib/server-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;QAAE,OAAO,4BAA4B,CAAC;IAChF,IAAI,CAAC;QACH,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,sDAAsD,CAAC;IAChE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform ceiling on a webhook's `secretGracePeriodMs`, mirrored from the
|
|
3
|
+
* server's `MAX_SECRET_GRACE_PERIOD_MS` (#2383). Read-only now: the field is
|
|
4
|
+
* authored as `webhook.secretGracePeriodMs` and applied by `config push` (#2645),
|
|
5
|
+
* so this ceiling is used to RENDER a stored value, not to pre-validate a flag.
|
|
6
|
+
* The server remains the authority and returns
|
|
7
|
+
* `SECRET_GRACE_PERIOD_OUT_OF_RANGE` on a bad push.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MAX_SECRET_GRACE_PERIOD_MS: number;
|
|
10
|
+
/**
|
|
11
|
+
* The platform default applied when a webhook stores no `secretGracePeriodMs`,
|
|
12
|
+
* mirrored from the server's `DEFAULT_SECRET_GRACE_PERIOD_MS` (#2383). Only
|
|
13
|
+
* used to label the unset case on a read surface — nothing is computed from it
|
|
14
|
+
* CLI-side.
|
|
15
|
+
*/
|
|
16
|
+
export declare const DEFAULT_SECRET_GRACE_PERIOD_MS: number;
|
|
17
|
+
/**
|
|
18
|
+
* Render a webhook's stored `secretGracePeriodMs` for a read surface.
|
|
19
|
+
*
|
|
20
|
+
* A stored `0` and an absent field mean opposite things — immediate cutover vs
|
|
21
|
+
* the 24 h platform default — so they must not render the same. Naming the
|
|
22
|
+
* default explicitly matches how `Max Body Bytes` reports its own unset case.
|
|
23
|
+
*/
|
|
24
|
+
export declare function formatGracePeriodMs(value: number | null | undefined): string;
|
|
25
|
+
/**
|
|
26
|
+
* The operator-facing warning for a webhook whose stored `signingSecret` is not
|
|
27
|
+
* a `{{secrets.KEY}}` reference (#2332).
|
|
28
|
+
*
|
|
29
|
+
* Two commands report it — `webhooks get` on a single row and `config pull` on
|
|
30
|
+
* every pulled row — and each has two statuses to describe. Those four strings
|
|
31
|
+
* were written out in full and had already drifted twice, so the wording lives
|
|
32
|
+
* here once and the call sites supply only what genuinely differs: how the
|
|
33
|
+
* field is named in that context, and what the un-migrated value blocks.
|
|
34
|
+
*
|
|
35
|
+
* Returns `null` for a status that needs no warning (`reference`, `unset`, or
|
|
36
|
+
* anything a newer server adds), so a call site is one `if` rather than two.
|
|
37
|
+
*/
|
|
38
|
+
export declare function signingSecretStatusWarning(status: string | null | undefined, context: {
|
|
39
|
+
/** How to name the field, e.g. `"Signing secret"`. Starts the sentence. */
|
|
40
|
+
subject: string;
|
|
41
|
+
/** What an un-migrated value blocks, e.g. `"this webhook cannot be updated"`. */
|
|
42
|
+
blocks: string;
|
|
43
|
+
}): string | null;
|
|
44
|
+
/**
|
|
45
|
+
* The operator-facing warning for a stored signing secret whose HEALTH is not
|
|
46
|
+
* `ok` — the second axis the server reports alongside the status (#2383).
|
|
47
|
+
*
|
|
48
|
+
* Written as "anything that is not `ok` needs attention" rather than as a list
|
|
49
|
+
* of known members, so a member a newer server adds is surfaced rather than
|
|
50
|
+
* silently read as fine. `signingSecretStatusWarning` above deliberately keeps
|
|
51
|
+
* the opposite rule for the STATUS axis, whose union is closed.
|
|
52
|
+
*
|
|
53
|
+
* Returns `null` for `ok`, for an absent field (a server that predates the
|
|
54
|
+
* health axis), and when the slot holds nothing to assess.
|
|
55
|
+
*/
|
|
56
|
+
export declare function signingSecretHealthWarning(health: string | null | undefined, context: {
|
|
57
|
+
/** How to name the field, e.g. `"Signing secret"`. Starts the sentence. */
|
|
58
|
+
subject: string;
|
|
59
|
+
}): string | null;
|
|
60
|
+
/**
|
|
61
|
+
* The warning for the GRACE SLOT — a value in `previousSigningSecret` that the
|
|
62
|
+
* receiver still accepts until the rotation window closes.
|
|
63
|
+
*
|
|
64
|
+
* Split from the current-slot wording because the remediation differs: there is
|
|
65
|
+
* nothing to migrate here, the value simply has to stop being accepted.
|
|
66
|
+
*
|
|
67
|
+
* The two statuses need separate wording, because only one of them describes
|
|
68
|
+
* live credential material. A `legacy-literal` in this slot is grandfathered
|
|
69
|
+
* and really does keep verifying deliveries until the window closes, so
|
|
70
|
+
* `secretGracePeriodMs` is the operator's lever. A `malformed-reference` is
|
|
71
|
+
* dropped by the receiver before it reaches the verifier
|
|
72
|
+
* (`webhook-receiver.ts`: an unresolved previous reference yields no grace
|
|
73
|
+
* key), so it verifies nothing and lowering the grace period does nothing to
|
|
74
|
+
* it — telling the operator otherwise points them at a knob with no effect.
|
|
75
|
+
* This is the same distinction `signingSecretStatusWarning` draws for the
|
|
76
|
+
* current slot.
|
|
77
|
+
*/
|
|
78
|
+
export declare function previousSigningSecretWarning(status: string | null | undefined, context: {
|
|
79
|
+
/** How to name the row, e.g. `"webhooks/foo.toml: 'foo'"`. */
|
|
80
|
+
subject: string;
|
|
81
|
+
}): string | null;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform ceiling on a webhook's `secretGracePeriodMs`, mirrored from the
|
|
3
|
+
* server's `MAX_SECRET_GRACE_PERIOD_MS` (#2383). Read-only now: the field is
|
|
4
|
+
* authored as `webhook.secretGracePeriodMs` and applied by `config push` (#2645),
|
|
5
|
+
* so this ceiling is used to RENDER a stored value, not to pre-validate a flag.
|
|
6
|
+
* The server remains the authority and returns
|
|
7
|
+
* `SECRET_GRACE_PERIOD_OUT_OF_RANGE` on a bad push.
|
|
8
|
+
*/
|
|
9
|
+
export const MAX_SECRET_GRACE_PERIOD_MS = 30 * 24 * 60 * 60 * 1000;
|
|
10
|
+
/**
|
|
11
|
+
* The platform default applied when a webhook stores no `secretGracePeriodMs`,
|
|
12
|
+
* mirrored from the server's `DEFAULT_SECRET_GRACE_PERIOD_MS` (#2383). Only
|
|
13
|
+
* used to label the unset case on a read surface — nothing is computed from it
|
|
14
|
+
* CLI-side.
|
|
15
|
+
*/
|
|
16
|
+
export const DEFAULT_SECRET_GRACE_PERIOD_MS = 24 * 60 * 60 * 1000;
|
|
17
|
+
/**
|
|
18
|
+
* Render a webhook's stored `secretGracePeriodMs` for a read surface.
|
|
19
|
+
*
|
|
20
|
+
* A stored `0` and an absent field mean opposite things — immediate cutover vs
|
|
21
|
+
* the 24 h platform default — so they must not render the same. Naming the
|
|
22
|
+
* default explicitly matches how `Max Body Bytes` reports its own unset case.
|
|
23
|
+
*/
|
|
24
|
+
export function formatGracePeriodMs(value) {
|
|
25
|
+
if (value === undefined || value === null) {
|
|
26
|
+
return `default (${DEFAULT_SECRET_GRACE_PERIOD_MS}ms, 24 h)`;
|
|
27
|
+
}
|
|
28
|
+
return `${value}ms`;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The operator-facing warning for a webhook whose stored `signingSecret` is not
|
|
32
|
+
* a `{{secrets.KEY}}` reference (#2332).
|
|
33
|
+
*
|
|
34
|
+
* Two commands report it — `webhooks get` on a single row and `config pull` on
|
|
35
|
+
* every pulled row — and each has two statuses to describe. Those four strings
|
|
36
|
+
* were written out in full and had already drifted twice, so the wording lives
|
|
37
|
+
* here once and the call sites supply only what genuinely differs: how the
|
|
38
|
+
* field is named in that context, and what the un-migrated value blocks.
|
|
39
|
+
*
|
|
40
|
+
* Returns `null` for a status that needs no warning (`reference`, `unset`, or
|
|
41
|
+
* anything a newer server adds), so a call site is one `if` rather than two.
|
|
42
|
+
*/
|
|
43
|
+
export function signingSecretStatusWarning(status, context) {
|
|
44
|
+
const remediation = 'Store the value with `primitive secrets set KEY --value <value>` and set signingSecret = "{{secrets.KEY}}".';
|
|
45
|
+
if (status === "legacy-literal") {
|
|
46
|
+
return (`${context.subject} still holds a raw value. Deliveries still verify, but ` +
|
|
47
|
+
`${context.blocks} until it is migrated. ${remediation}`);
|
|
48
|
+
}
|
|
49
|
+
// Not a working legacy literal: the stored value carries reference syntax
|
|
50
|
+
// that resolves to nothing, so it is not a usable signing key and every
|
|
51
|
+
// signed delivery is already being rejected.
|
|
52
|
+
if (status === "malformed-reference") {
|
|
53
|
+
return (`${context.subject} is neither a {{secrets.KEY}} reference nor a plain stored value — ` +
|
|
54
|
+
"it carries reference syntax that does not resolve, so every signed delivery is being REJECTED. " +
|
|
55
|
+
`${remediation}`);
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The operator-facing warning for a stored signing secret whose HEALTH is not
|
|
61
|
+
* `ok` — the second axis the server reports alongside the status (#2383).
|
|
62
|
+
*
|
|
63
|
+
* Written as "anything that is not `ok` needs attention" rather than as a list
|
|
64
|
+
* of known members, so a member a newer server adds is surfaced rather than
|
|
65
|
+
* silently read as fine. `signingSecretStatusWarning` above deliberately keeps
|
|
66
|
+
* the opposite rule for the STATUS axis, whose union is closed.
|
|
67
|
+
*
|
|
68
|
+
* Returns `null` for `ok`, for an absent field (a server that predates the
|
|
69
|
+
* health axis), and when the slot holds nothing to assess.
|
|
70
|
+
*/
|
|
71
|
+
export function signingSecretHealthWarning(health, context) {
|
|
72
|
+
if (health === undefined || health === null || health === "ok")
|
|
73
|
+
return null;
|
|
74
|
+
if (health === "weak-literal") {
|
|
75
|
+
return (`${context.subject} is a short raw value — too short to be a strong ` +
|
|
76
|
+
"HMAC key, so a sender's signature is easier to forge. Deliveries still " +
|
|
77
|
+
"verify; replace it with a strong value stored as a secret: " +
|
|
78
|
+
'`primitive secrets set KEY --value <value>`, then set signingSecret = "{{secrets.KEY}}".');
|
|
79
|
+
}
|
|
80
|
+
return (`${context.subject} was reported as '${health}' by the server, which this ` +
|
|
81
|
+
"CLI does not recognize — upgrade the CLI for the full explanation.");
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The warning for the GRACE SLOT — a value in `previousSigningSecret` that the
|
|
85
|
+
* receiver still accepts until the rotation window closes.
|
|
86
|
+
*
|
|
87
|
+
* Split from the current-slot wording because the remediation differs: there is
|
|
88
|
+
* nothing to migrate here, the value simply has to stop being accepted.
|
|
89
|
+
*
|
|
90
|
+
* The two statuses need separate wording, because only one of them describes
|
|
91
|
+
* live credential material. A `legacy-literal` in this slot is grandfathered
|
|
92
|
+
* and really does keep verifying deliveries until the window closes, so
|
|
93
|
+
* `secretGracePeriodMs` is the operator's lever. A `malformed-reference` is
|
|
94
|
+
* dropped by the receiver before it reaches the verifier
|
|
95
|
+
* (`webhook-receiver.ts`: an unresolved previous reference yields no grace
|
|
96
|
+
* key), so it verifies nothing and lowering the grace period does nothing to
|
|
97
|
+
* it — telling the operator otherwise points them at a knob with no effect.
|
|
98
|
+
* This is the same distinction `signingSecretStatusWarning` draws for the
|
|
99
|
+
* current slot.
|
|
100
|
+
*/
|
|
101
|
+
export function previousSigningSecretWarning(status, context) {
|
|
102
|
+
if (status === "legacy-literal") {
|
|
103
|
+
return (`${context.subject}: the ROTATED-OUT signing secret is a raw stored value, ` +
|
|
104
|
+
"not a {{secrets.KEY}} reference. It keeps verifying deliveries until the " +
|
|
105
|
+
"rotation grace window closes (secretRotatedAt + secretGracePeriodMs). To " +
|
|
106
|
+
"stop accepting it sooner, lower secretGracePeriodMs (0 cuts over immediately).");
|
|
107
|
+
}
|
|
108
|
+
if (status === "malformed-reference") {
|
|
109
|
+
return (`${context.subject}: the ROTATED-OUT signing secret carries reference syntax ` +
|
|
110
|
+
"that does not resolve, so it verifies nothing — it is inert, not a live " +
|
|
111
|
+
"grace key, and secretGracePeriodMs has no effect on it. No action is " +
|
|
112
|
+
"required; it clears on the next rotation.");
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=signing-secret-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signing-secret-status.js","sourceRoot":"","sources":["../../../src/lib/signing-secret-status.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAGlE;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAgC;IAEhC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1C,OAAO,YAAY,8BAA8B,WAAW,CAAC;IAC/D,CAAC;IACD,OAAO,GAAG,KAAK,IAAI,CAAC;AACtB,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,0BAA0B,CACxC,MAAiC,EACjC,OAKC;IAED,MAAM,WAAW,GACf,6GAA6G,CAAC;IAChH,IAAI,MAAM,KAAK,gBAAgB,EAAE,CAAC;QAChC,OAAO,CACL,GAAG,OAAO,CAAC,OAAO,yDAAyD;YAC3E,GAAG,OAAO,CAAC,MAAM,0BAA0B,WAAW,EAAE,CACzD,CAAC;IACJ,CAAC;IACD,0EAA0E;IAC1E,wEAAwE;IACxE,6CAA6C;IAC7C,IAAI,MAAM,KAAK,qBAAqB,EAAE,CAAC;QACrC,OAAO,CACL,GAAG,OAAO,CAAC,OAAO,qEAAqE;YACvF,iGAAiG;YACjG,GAAG,WAAW,EAAE,CACjB,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,0BAA0B,CACxC,MAAiC,EACjC,OAGC;IAED,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC5E,IAAI,MAAM,KAAK,cAAc,EAAE,CAAC;QAC9B,OAAO,CACL,GAAG,OAAO,CAAC,OAAO,mDAAmD;YACrE,yEAAyE;YACzE,6DAA6D;YAC7D,0FAA0F,CAC3F,CAAC;IACJ,CAAC;IACD,OAAO,CACL,GAAG,OAAO,CAAC,OAAO,qBAAqB,MAAM,8BAA8B;QAC3E,oEAAoE,CACrE,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAAiC,EACjC,OAGC;IAED,IAAI,MAAM,KAAK,gBAAgB,EAAE,CAAC;QAChC,OAAO,CACL,GAAG,OAAO,CAAC,OAAO,0DAA0D;YAC5E,2EAA2E;YAC3E,2EAA2E;YAC3E,gFAAgF,CACjF,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,KAAK,qBAAqB,EAAE,CAAC;QACrC,OAAO,CACL,GAAG,OAAO,CAAC,OAAO,4DAA4D;YAC9E,0EAA0E;YAC1E,uEAAuE;YACvE,2CAA2C,CAC5C,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills for Primitive-Labs members only. Not bundled with the CLI — fetched
|
|
3
|
+
* from the private js-bao-wss repo via `gh`, so repo access is the gate.
|
|
4
|
+
*
|
|
5
|
+
* Each entry lists every file the installed skill needs, as (repo path,
|
|
6
|
+
* path inside the installed skill directory). A skill is installed
|
|
7
|
+
* all-or-nothing: one missing file and the existing copy is kept.
|
|
8
|
+
*/
|
|
9
|
+
interface FetchedFile {
|
|
10
|
+
/** Path inside Primitive-Labs/js-bao-wss (main branch). */
|
|
11
|
+
repoPath: string;
|
|
12
|
+
/** Path relative to the installed skill directory. */
|
|
13
|
+
localPath: string;
|
|
14
|
+
}
|
|
15
|
+
interface FetchedSkill {
|
|
16
|
+
name: string;
|
|
17
|
+
files: FetchedFile[];
|
|
18
|
+
}
|
|
19
|
+
export declare const FETCHED_SKILLS: FetchedSkill[];
|
|
20
|
+
export declare function getCliVersion(): string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Returns true if the skill is currently installed.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isSkillInstalled(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Read one file of the private js-bao-wss repo (main branch) via the GitHub
|
|
27
|
+
* contents API through `gh`. Returns null if gh is missing, unauthenticated,
|
|
28
|
+
* or the caller lacks access to the repo — access failure is how non-members
|
|
29
|
+
* are gated.
|
|
30
|
+
*
|
|
31
|
+
* `PRIMITIVE_SKILL_SOURCE_DIR` reads the same repo paths from a local
|
|
32
|
+
* checkout instead, to try a skill edit before it is merged (and for the
|
|
33
|
+
* unit tests, which install from this repo's own files).
|
|
34
|
+
*/
|
|
35
|
+
export declare function fetchRepoFile(repoPath: string): Promise<string | null>;
|
|
36
|
+
/**
|
|
37
|
+
* Auto-update an already-installed skill if a newer version is bundled.
|
|
38
|
+
* Called after command execution for non-init, non-skill commands.
|
|
39
|
+
* If the skill is not installed, shows a non-blocking hint instead.
|
|
40
|
+
* Never throws — fails silently like version-check.
|
|
41
|
+
*/
|
|
42
|
+
export declare function checkSkillStatus(): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Explicitly install or reinstall the skill. Shows output.
|
|
45
|
+
* Also installs the members' skills (primitive-platform-internal and
|
|
46
|
+
* file-issue) when the caller has access to the private repo
|
|
47
|
+
* (Primitive-Labs members); silently skipped otherwise.
|
|
48
|
+
*/
|
|
49
|
+
export declare function installSkillExplicit(): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Uninstall the skill (and the members' skills, if present).
|
|
52
|
+
*/
|
|
53
|
+
export declare function uninstallSkill(): boolean;
|
|
54
|
+
export interface SkillStatusReport {
|
|
55
|
+
installedHash: string | null;
|
|
56
|
+
bundledHash: string | null;
|
|
57
|
+
location: string;
|
|
58
|
+
/** One entry per members' skill: hash and the CLI version that fetched it, or null when not installed. */
|
|
59
|
+
fetched: Record<string, {
|
|
60
|
+
hash: string;
|
|
61
|
+
cliVersion: string;
|
|
62
|
+
location: string;
|
|
63
|
+
} | null>;
|
|
64
|
+
}
|
|
65
|
+
/** The data `skillStatus()` prints; exported so tests can read it directly. */
|
|
66
|
+
export declare function getSkillStatus(): SkillStatusReport;
|
|
67
|
+
/**
|
|
68
|
+
* Show current skill installation status.
|
|
69
|
+
*/
|
|
70
|
+
export declare function skillStatus(): void;
|
|
71
|
+
export {};
|