primitive-admin 1.2.0-alpha.9 → 1.3.0-alpha.1
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 +303 -186
- package/assets/skill/skills/primitive-platform/SKILL.md +93 -27
- package/dist/bin/primitive.js +15 -89
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/admins.js +80 -17
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/agent-sessions.d.ts +129 -0
- package/dist/src/commands/agent-sessions.js +532 -20
- package/dist/src/commands/agent-sessions.js.map +1 -1
- package/dist/src/commands/analytics.js +207 -155
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps-children.js +3 -0
- package/dist/src/commands/apps-children.js.map +1 -1
- package/dist/src/commands/apps-transitions.d.ts +39 -0
- package/dist/src/commands/apps-transitions.js +198 -0
- package/dist/src/commands/apps-transitions.js.map +1 -0
- package/dist/src/commands/apps.d.ts +17 -0
- package/dist/src/commands/apps.js +108 -3
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/auth-sessions.js +2 -0
- package/dist/src/commands/auth-sessions.js.map +1 -1
- package/dist/src/commands/auth.js +170 -50
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/blob-buckets.js +2 -0
- package/dist/src/commands/blob-buckets.js.map +1 -1
- package/dist/src/commands/collections.js +318 -256
- package/dist/src/commands/collections.js.map +1 -1
- package/dist/src/commands/comparisons.js +2 -0
- package/dist/src/commands/comparisons.js.map +1 -1
- package/dist/src/commands/config.d.ts +2 -2
- package/dist/src/commands/config.js +59 -33
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/connections.js +2 -0
- package/dist/src/commands/connections.js.map +1 -1
- package/dist/src/commands/database-type-configs.js +5 -3
- package/dist/src/commands/database-type-configs.js.map +1 -1
- package/dist/src/commands/databases.js +6 -4
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/db3-types.d.ts +42 -0
- package/dist/src/commands/db3-types.js +445 -0
- package/dist/src/commands/db3-types.js.map +1 -0
- package/dist/src/commands/db3.d.ts +38 -0
- package/dist/src/commands/db3.js +2053 -0
- package/dist/src/commands/db3.js.map +1 -0
- package/dist/src/commands/documents.d.ts +110 -10
- package/dist/src/commands/documents.js +1019 -748
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/email-templates.js +74 -0
- package/dist/src/commands/email-templates.js.map +1 -1
- package/dist/src/commands/env.js +8 -4
- package/dist/src/commands/env.js.map +1 -1
- package/dist/src/commands/function-trigger-commands.d.ts +28 -0
- package/dist/src/commands/function-trigger-commands.js +341 -0
- package/dist/src/commands/function-trigger-commands.js.map +1 -0
- package/dist/src/commands/functions.js +383 -32
- package/dist/src/commands/functions.js.map +1 -1
- package/dist/src/commands/groups.js +168 -50
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/guides.js +7 -5
- package/dist/src/commands/guides.js.map +1 -1
- package/dist/src/commands/hosting.d.ts +8 -0
- package/dist/src/commands/hosting.js +509 -0
- package/dist/src/commands/hosting.js.map +1 -0
- package/dist/src/commands/init.js +129 -38
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.js +82 -53
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/locks.d.ts +5 -3
- package/dist/src/commands/locks.js +19 -61
- package/dist/src/commands/locks.js.map +1 -1
- package/dist/src/commands/metadata-category-configs.d.ts +2 -2
- package/dist/src/commands/metadata-category-configs.js +4 -2
- package/dist/src/commands/metadata-category-configs.js.map +1 -1
- package/dist/src/commands/metadata.js +55 -6
- package/dist/src/commands/metadata.js.map +1 -1
- package/dist/src/commands/prompts.js +75 -52
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rate-counters.d.ts +19 -0
- package/dist/src/commands/rate-counters.js +104 -0
- package/dist/src/commands/rate-counters.js.map +1 -0
- package/dist/src/commands/rule-sets.d.ts +1 -1
- package/dist/src/commands/rule-sets.js +2 -1
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/schemas.d.ts +15 -0
- package/dist/src/commands/schemas.js +122 -0
- package/dist/src/commands/schemas.js.map +1 -0
- package/dist/src/commands/scripts.d.ts +9 -17
- package/dist/src/commands/scripts.js +24 -479
- package/dist/src/commands/scripts.js.map +1 -1
- package/dist/src/commands/secrets.d.ts +38 -0
- package/dist/src/commands/secrets.js +148 -6
- package/dist/src/commands/secrets.js.map +1 -1
- package/dist/src/commands/sessions.js +2 -0
- package/dist/src/commands/sessions.js.map +1 -1
- package/dist/src/commands/skill.js +2 -0
- package/dist/src/commands/skill.js.map +1 -1
- package/dist/src/commands/spent-tokens.d.ts +19 -0
- package/dist/src/commands/spent-tokens.js +79 -0
- package/dist/src/commands/spent-tokens.js.map +1 -0
- package/dist/src/commands/sync-app-settings.d.ts +58 -0
- package/dist/src/commands/sync-app-settings.js +119 -2
- package/dist/src/commands/sync-app-settings.js.map +1 -1
- package/dist/src/commands/sync-schemas.d.ts +202 -0
- package/dist/src/commands/sync-schemas.js +629 -0
- package/dist/src/commands/sync-schemas.js.map +1 -0
- package/dist/src/commands/sync-user-properties.d.ts +118 -0
- package/dist/src/commands/sync-user-properties.js +276 -0
- package/dist/src/commands/sync-user-properties.js.map +1 -0
- package/dist/src/commands/sync.d.ts +578 -546
- package/dist/src/commands/sync.js +3516 -5134
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/tokens.js +5 -3
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/commands/transitions.d.ts +54 -0
- package/dist/src/commands/transitions.js +418 -0
- package/dist/src/commands/transitions.js.map +1 -0
- package/dist/src/commands/usage.d.ts +42 -0
- package/dist/src/commands/usage.js +397 -0
- package/dist/src/commands/usage.js.map +1 -0
- package/dist/src/commands/user-properties.d.ts +14 -0
- package/dist/src/commands/user-properties.js +79 -0
- package/dist/src/commands/user-properties.js.map +1 -0
- package/dist/src/commands/users.js +951 -18
- package/dist/src/commands/users.js.map +1 -1
- package/dist/src/commands/vars.js +2 -0
- package/dist/src/commands/vars.js.map +1 -1
- package/dist/src/commands/waitlist.js +39 -4
- package/dist/src/commands/waitlist.js.map +1 -1
- package/dist/src/commands/workflows.d.ts +5 -83
- package/dist/src/commands/workflows.js +57 -2282
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/analytics-query.d.ts +58 -0
- package/dist/src/lib/analytics-query.js +134 -0
- package/dist/src/lib/analytics-query.js.map +1 -0
- package/dist/src/lib/api-client.d.ts +1976 -431
- package/dist/src/lib/api-client.js +1095 -550
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-settings-descriptor.d.ts +14 -2
- package/dist/src/lib/app-settings-descriptor.js +55 -1
- package/dist/src/lib/app-settings-descriptor.js.map +1 -1
- package/dist/src/lib/auth-fixtures.d.ts +44 -0
- package/dist/src/lib/auth-fixtures.js +61 -0
- package/dist/src/lib/auth-fixtures.js.map +1 -0
- package/dist/src/lib/auth-flow.d.ts +47 -1
- package/dist/src/lib/auth-flow.js +451 -14
- package/dist/src/lib/auth-flow.js.map +1 -1
- package/dist/src/lib/block-layout.d.ts +12 -23
- package/dist/src/lib/block-layout.js +26 -92
- package/dist/src/lib/block-layout.js.map +1 -1
- package/dist/src/lib/block-selector.d.ts +8 -14
- package/dist/src/lib/block-selector.js +8 -19
- package/dist/src/lib/block-selector.js.map +1 -1
- package/dist/src/lib/child-apps-local.d.ts +3 -1
- package/dist/src/lib/child-apps-local.js +9 -1
- package/dist/src/lib/child-apps-local.js.map +1 -1
- package/dist/src/lib/cli-manifest.d.ts +9 -0
- package/dist/src/lib/cli-manifest.js +10 -1
- package/dist/src/lib/cli-manifest.js.map +1 -1
- package/dist/src/lib/cli-version.d.ts +14 -0
- package/dist/src/lib/cli-version.js +38 -0
- package/dist/src/lib/cli-version.js.map +1 -0
- package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
- package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
- package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
- package/dist/src/lib/collection-export.d.ts +76 -15
- package/dist/src/lib/collection-export.js +116 -23
- package/dist/src/lib/collection-export.js.map +1 -1
- package/dist/src/lib/collection-principal.d.ts +22 -0
- package/dist/src/lib/collection-principal.js +35 -0
- package/dist/src/lib/collection-principal.js.map +1 -0
- package/dist/src/lib/command-groups.d.ts +30 -0
- package/dist/src/lib/command-groups.js +111 -0
- package/dist/src/lib/command-groups.js.map +1 -0
- package/dist/src/lib/command-status.d.ts +147 -0
- package/dist/src/lib/command-status.js +266 -0
- package/dist/src/lib/command-status.js.map +1 -0
- package/dist/src/lib/config-object-descriptor.d.ts +9 -22
- package/dist/src/lib/config-object-descriptor.js +113 -277
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/config-surface.d.ts +3 -7
- package/dist/src/lib/config-surface.js +9 -13
- package/dist/src/lib/config-surface.js.map +1 -1
- package/dist/src/lib/config-toml.d.ts +11 -2
- package/dist/src/lib/config-toml.js +25 -2
- package/dist/src/lib/config-toml.js.map +1 -1
- package/dist/src/lib/credentials-home.d.ts +7 -0
- package/dist/src/lib/credentials-home.js +45 -10
- package/dist/src/lib/credentials-home.js.map +1 -1
- package/dist/src/lib/credentials-lock.d.ts +14 -6
- package/dist/src/lib/credentials-lock.js +90 -10
- package/dist/src/lib/credentials-lock.js.map +1 -1
- package/dist/src/lib/credentials-store.d.ts +142 -70
- package/dist/src/lib/credentials-store.js +420 -111
- package/dist/src/lib/credentials-store.js.map +1 -1
- package/dist/src/lib/custodian.d.ts +8 -0
- package/dist/src/lib/custodian.js +18 -0
- package/dist/src/lib/custodian.js.map +1 -0
- package/dist/src/lib/data-input.d.ts +1 -1
- package/dist/src/lib/data-input.js +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
- package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
- package/dist/src/lib/db-codegen/dbTypeIR.d.ts +40 -1
- package/dist/src/lib/db-codegen/dbTypeIR.js +32 -8
- package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
- package/dist/src/lib/db-type-records.d.ts +125 -0
- package/dist/src/lib/db-type-records.js +237 -0
- package/dist/src/lib/db-type-records.js.map +1 -0
- package/dist/src/lib/db3-export.d.ts +322 -0
- package/dist/src/lib/db3-export.js +767 -0
- package/dist/src/lib/db3-export.js.map +1 -0
- package/dist/src/lib/db3-index-output.d.ts +116 -0
- package/dist/src/lib/db3-index-output.js +223 -0
- package/dist/src/lib/db3-index-output.js.map +1 -0
- package/dist/src/lib/db3-json-fields.d.ts +49 -0
- package/dist/src/lib/db3-json-fields.js +195 -0
- package/dist/src/lib/db3-json-fields.js.map +1 -0
- package/dist/src/lib/db3-type-archive.d.ts +59 -0
- package/dist/src/lib/db3-type-archive.js +95 -0
- package/dist/src/lib/db3-type-archive.js.map +1 -0
- package/dist/src/lib/db3-type-models.d.ts +148 -0
- package/dist/src/lib/db3-type-models.js +583 -0
- package/dist/src/lib/db3-type-models.js.map +1 -0
- package/dist/src/lib/deprecation.d.ts +2 -2
- package/dist/src/lib/deprecation.js +2 -2
- package/dist/src/lib/document-export-record-log.d.ts +7 -0
- package/dist/src/lib/document-export-record-log.js +9 -0
- package/dist/src/lib/document-export-record-log.js.map +1 -1
- package/dist/src/lib/document-ingest-artifact.d.ts +19 -0
- package/dist/src/lib/document-ingest-artifact.js +55 -6
- package/dist/src/lib/document-ingest-artifact.js.map +1 -1
- package/dist/src/lib/document-ingest-format2.d.ts +36 -0
- package/dist/src/lib/document-ingest-format2.js +78 -0
- package/dist/src/lib/document-ingest-format2.js.map +1 -0
- package/dist/src/lib/document-ingest-input.d.ts +9 -0
- package/dist/src/lib/document-ingest-input.js +28 -1
- package/dist/src/lib/document-ingest-input.js.map +1 -1
- package/dist/src/lib/document-ingest.d.ts +11 -1
- package/dist/src/lib/document-ingest.js +16 -0
- package/dist/src/lib/document-ingest.js.map +1 -1
- package/dist/src/lib/document-schema-rows.d.ts +42 -0
- package/dist/src/lib/document-schema-rows.js +53 -0
- package/dist/src/lib/document-schema-rows.js.map +1 -0
- package/dist/src/lib/experimental-apis.d.ts +36 -0
- package/dist/src/lib/experimental-apis.js +46 -0
- package/dist/src/lib/experimental-apis.js.map +1 -0
- package/dist/src/lib/file-attachment.d.ts +24 -0
- package/dist/src/lib/file-attachment.js +31 -0
- package/dist/src/lib/file-attachment.js.map +1 -0
- package/dist/src/lib/function-authorize-check.d.ts +142 -0
- package/dist/src/lib/function-authorize-check.js +311 -0
- package/dist/src/lib/function-authorize-check.js.map +1 -0
- package/dist/src/lib/function-authorize-view.d.ts +36 -0
- package/dist/src/lib/function-authorize-view.js +110 -0
- package/dist/src/lib/function-authorize-view.js.map +1 -0
- package/dist/src/lib/function-bundle.d.ts +27 -5
- package/dist/src/lib/function-bundle.js +142 -7
- package/dist/src/lib/function-bundle.js.map +1 -1
- package/dist/src/lib/function-collect.d.ts +112 -12
- package/dist/src/lib/function-collect.js +601 -12
- package/dist/src/lib/function-collect.js.map +1 -1
- package/dist/src/lib/function-db-types.d.ts +65 -11
- package/dist/src/lib/function-db-types.js +326 -157
- package/dist/src/lib/function-db-types.js.map +1 -1
- package/dist/src/lib/function-document-types.d.ts +19 -7
- package/dist/src/lib/function-document-types.js +24 -12
- package/dist/src/lib/function-document-types.js.map +1 -1
- package/dist/src/lib/function-grants-preflight.d.ts +99 -0
- package/dist/src/lib/function-grants-preflight.js +154 -2
- package/dist/src/lib/function-grants-preflight.js.map +1 -1
- package/dist/src/lib/function-lint.d.ts +85 -0
- package/dist/src/lib/function-lint.js +442 -0
- package/dist/src/lib/function-lint.js.map +1 -0
- package/dist/src/lib/function-log-row.js +21 -2
- package/dist/src/lib/function-log-row.js.map +1 -1
- package/dist/src/lib/function-run.d.ts +13 -21
- package/dist/src/lib/function-run.js +14 -27
- package/dist/src/lib/function-run.js.map +1 -1
- package/dist/src/lib/function-schema-codegen.d.ts +86 -22
- package/dist/src/lib/function-schema-codegen.js +194 -88
- package/dist/src/lib/function-schema-codegen.js.map +1 -1
- package/dist/src/lib/function-schema-refs.d.ts +98 -0
- package/dist/src/lib/function-schema-refs.js +177 -0
- package/dist/src/lib/function-schema-refs.js.map +1 -0
- package/dist/src/lib/function-sync.d.ts +120 -6
- package/dist/src/lib/function-sync.js +217 -26
- package/dist/src/lib/function-sync.js.map +1 -1
- package/dist/src/lib/function-trigger-listing.d.ts +11 -6
- package/dist/src/lib/function-trigger-listing.js +32 -11
- package/dist/src/lib/function-trigger-listing.js.map +1 -1
- package/dist/src/lib/function-typecheck.d.ts +52 -0
- package/dist/src/lib/function-typecheck.js +174 -54
- package/dist/src/lib/function-typecheck.js.map +1 -1
- package/dist/src/lib/function-versions.d.ts +2 -0
- package/dist/src/lib/function-versions.js +1 -0
- package/dist/src/lib/function-versions.js.map +1 -1
- package/dist/src/lib/generated-build-flags.d.ts +13 -0
- package/dist/src/lib/generated-build-flags.js +14 -0
- package/dist/src/lib/generated-build-flags.js.map +1 -0
- package/dist/src/lib/generated-command-status.d.ts +6 -0
- package/dist/src/lib/generated-command-status.js +502 -0
- package/dist/src/lib/generated-command-status.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +804 -140
- package/dist/src/lib/generated-config-surfaces.js +2491 -1806
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/hosting-build.d.ts +97 -0
- package/dist/src/lib/hosting-build.js +204 -0
- package/dist/src/lib/hosting-build.js.map +1 -0
- package/dist/src/lib/hosting-client.d.ts +167 -0
- package/dist/src/lib/hosting-client.js +340 -0
- package/dist/src/lib/hosting-client.js.map +1 -0
- package/dist/src/lib/hosting-environments.d.ts +32 -0
- package/dist/src/lib/hosting-environments.js +74 -0
- package/dist/src/lib/hosting-environments.js.map +1 -0
- package/dist/src/lib/hosting-errors.d.ts +30 -0
- package/dist/src/lib/hosting-errors.js +43 -0
- package/dist/src/lib/hosting-errors.js.map +1 -0
- package/dist/src/lib/hosting-token.d.ts +46 -0
- package/dist/src/lib/hosting-token.js +60 -0
- package/dist/src/lib/hosting-token.js.map +1 -0
- package/dist/src/lib/hosting-trust-step.d.ts +67 -0
- package/dist/src/lib/hosting-trust-step.js +279 -0
- package/dist/src/lib/hosting-trust-step.js.map +1 -0
- package/dist/src/lib/hosting-trust.d.ts +77 -0
- package/dist/src/lib/hosting-trust.js +194 -0
- package/dist/src/lib/hosting-trust.js.map +1 -0
- package/dist/src/lib/hosting-wait.d.ts +42 -0
- package/dist/src/lib/hosting-wait.js +84 -0
- package/dist/src/lib/hosting-wait.js.map +1 -0
- package/dist/src/lib/hosting-wfp-upload.d.ts +86 -0
- package/dist/src/lib/hosting-wfp-upload.js +149 -0
- package/dist/src/lib/hosting-wfp-upload.js.map +1 -0
- package/dist/src/lib/init-assets.d.ts +2 -6
- package/dist/src/lib/init-assets.js +11 -27
- package/dist/src/lib/init-assets.js.map +1 -1
- package/dist/src/lib/init-ios-links.d.ts +11 -7
- package/dist/src/lib/init-ios-links.js +28 -22
- package/dist/src/lib/init-ios-links.js.map +1 -1
- package/dist/src/lib/init-login-note.d.ts +13 -0
- package/dist/src/lib/init-login-note.js +22 -0
- package/dist/src/lib/init-login-note.js.map +1 -0
- package/dist/src/lib/init-schema.d.ts +15 -0
- package/dist/src/lib/init-schema.js +54 -0
- package/dist/src/lib/init-schema.js.map +1 -1
- package/dist/src/lib/integration-test-request.d.ts +54 -0
- package/dist/src/lib/integration-test-request.js +207 -0
- package/dist/src/lib/integration-test-request.js.map +1 -0
- package/dist/src/lib/invoker-shared-enums.d.ts +35 -0
- package/dist/src/lib/invoker-shared-enums.js +98 -0
- package/dist/src/lib/invoker-shared-enums.js.map +1 -0
- package/dist/src/lib/json-value.d.ts +6 -0
- package/dist/src/lib/json-value.js +13 -0
- package/dist/src/lib/json-value.js.map +1 -0
- package/dist/src/lib/load-routes.d.ts +33 -0
- package/dist/src/lib/load-routes.js +35 -0
- package/dist/src/lib/load-routes.js.map +1 -0
- package/dist/src/lib/log-inspection.d.ts +23 -4
- package/dist/src/lib/log-inspection.js +14 -5
- package/dist/src/lib/log-inspection.js.map +1 -1
- package/dist/src/lib/login-exchange-check.d.ts +18 -0
- package/dist/src/lib/login-exchange-check.js +27 -0
- package/dist/src/lib/login-exchange-check.js.map +1 -0
- package/dist/src/lib/login-scope-lines.d.ts +17 -7
- package/dist/src/lib/login-scope-lines.js +33 -10
- package/dist/src/lib/login-scope-lines.js.map +1 -1
- package/dist/src/lib/metadata-report.d.ts +85 -0
- package/dist/src/lib/metadata-report.js +81 -0
- package/dist/src/lib/metadata-report.js.map +1 -0
- package/dist/src/lib/object-status-filter.d.ts +9 -1
- package/dist/src/lib/object-status-filter.js +9 -1
- package/dist/src/lib/object-status-filter.js.map +1 -1
- package/dist/src/lib/output.d.ts +1 -1
- package/dist/src/lib/output.js +3 -1
- package/dist/src/lib/output.js.map +1 -1
- package/dist/src/lib/pin-refusal-hint.d.ts +12 -0
- package/dist/src/lib/pin-refusal-hint.js +35 -0
- package/dist/src/lib/pin-refusal-hint.js.map +1 -0
- package/dist/src/lib/platform-owned.js +5 -0
- package/dist/src/lib/platform-owned.js.map +1 -1
- package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
- package/dist/src/lib/primitive-declaration-names.js +22 -0
- package/dist/src/lib/primitive-declaration-names.js.map +1 -0
- package/dist/src/lib/primitive-declaration.d.ts +174 -0
- package/dist/src/lib/primitive-declaration.js +871 -0
- package/dist/src/lib/primitive-declaration.js.map +1 -0
- package/dist/src/lib/primitive-env-plugin.d.ts +99 -0
- package/dist/src/lib/primitive-env-plugin.js +408 -0
- package/dist/src/lib/primitive-env-plugin.js.map +1 -0
- package/dist/src/lib/project-login-apps.d.ts +8 -0
- package/dist/src/lib/project-login-apps.js +27 -0
- package/dist/src/lib/project-login-apps.js.map +1 -0
- package/dist/src/lib/prompt-schema-codegen.d.ts +36 -12
- package/dist/src/lib/prompt-schema-codegen.js +96 -100
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
- package/dist/src/lib/prompt-schema-document.d.ts +35 -0
- package/dist/src/lib/prompt-schema-document.js +92 -0
- package/dist/src/lib/prompt-schema-document.js.map +1 -0
- package/dist/src/lib/prompt-schema-refs.d.ts +173 -0
- package/dist/src/lib/prompt-schema-refs.js +478 -0
- package/dist/src/lib/prompt-schema-refs.js.map +1 -0
- package/dist/src/lib/records-verbs.d.ts +79 -0
- package/dist/src/lib/records-verbs.js +45 -0
- package/dist/src/lib/records-verbs.js.map +1 -0
- package/dist/src/lib/refresh-admin-credentials.d.ts +34 -4
- package/dist/src/lib/refresh-admin-credentials.js +85 -29
- package/dist/src/lib/refresh-admin-credentials.js.map +1 -1
- package/dist/src/lib/refresh-stored-login.d.ts +85 -0
- package/dist/src/lib/refresh-stored-login.js +233 -0
- package/dist/src/lib/refresh-stored-login.js.map +1 -0
- package/dist/src/lib/register-commands.d.ts +36 -0
- package/dist/src/lib/register-commands.js +37 -0
- package/dist/src/lib/register-commands.js.map +1 -0
- package/dist/src/lib/retired-imports.d.ts +53 -0
- package/dist/src/lib/retired-imports.js +120 -0
- package/dist/src/lib/retired-imports.js.map +1 -0
- package/dist/src/lib/row-field-rename.d.ts +18 -0
- package/dist/src/lib/row-field-rename.js +32 -0
- package/dist/src/lib/row-field-rename.js.map +1 -0
- package/dist/src/lib/run-status.d.ts +1 -1
- package/dist/src/lib/run-status.generated.d.ts +2 -2
- package/dist/src/lib/run-status.generated.js +3 -1
- package/dist/src/lib/run-status.generated.js.map +1 -1
- package/dist/src/lib/run-status.js +1 -1
- package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
- package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
- package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js +227 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +229 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.js +420 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
- package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
- package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +258 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +422 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.d.ts +27 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.js +126 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.js.map +1 -0
- package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
- package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
- package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
- package/dist/src/lib/schema-codegen/naming.d.ts +35 -0
- package/dist/src/lib/schema-codegen/naming.js +83 -0
- package/dist/src/lib/schema-codegen/naming.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
- package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
- package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
- package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
- package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
- package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
- package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaToTs.d.ts +109 -0
- package/dist/src/lib/schema-codegen/schemaToTs.js +269 -0
- package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -0
- package/dist/src/lib/schema-codegen/valuesLists.d.ts +48 -0
- package/dist/src/lib/schema-codegen/valuesLists.js +144 -0
- package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
- package/dist/src/lib/schema-defs-module.d.ts +29 -0
- package/dist/src/lib/schema-defs-module.js +103 -0
- package/dist/src/lib/schema-defs-module.js.map +1 -0
- package/dist/src/lib/schema-family-index.d.ts +228 -0
- package/dist/src/lib/schema-family-index.js +813 -0
- package/dist/src/lib/schema-family-index.js.map +1 -0
- package/dist/src/lib/schema-pins.d.ts +82 -0
- package/dist/src/lib/schema-pins.js +198 -0
- package/dist/src/lib/schema-pins.js.map +1 -0
- package/dist/src/lib/schema-preview.d.ts +244 -0
- package/dist/src/lib/schema-preview.js +498 -0
- package/dist/src/lib/schema-preview.js.map +1 -0
- package/dist/src/lib/scope-request.d.ts +23 -11
- package/dist/src/lib/scope-request.js +69 -31
- package/dist/src/lib/scope-request.js.map +1 -1
- package/dist/src/lib/session-scope.d.ts +26 -0
- package/dist/src/lib/session-scope.js +58 -0
- package/dist/src/lib/session-scope.js.map +1 -0
- package/dist/src/lib/skill-installer.d.ts +2 -2
- package/dist/src/lib/skill-installer.js +2 -21
- package/dist/src/lib/skill-installer.js.map +1 -1
- package/dist/src/lib/step-run-table.d.ts +1 -2
- package/dist/src/lib/step-run-table.js +1 -2
- package/dist/src/lib/step-run-table.js.map +1 -1
- package/dist/src/lib/swift-codegen/agentGenerator.d.ts +2 -1
- package/dist/src/lib/swift-codegen/agentGenerator.js +25 -23
- package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
- package/dist/src/lib/swift-codegen/banners.js +12 -0
- package/dist/src/lib/swift-codegen/banners.js.map +1 -1
- package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
- package/dist/src/lib/swift-codegen/functionGenerator.js +169 -51
- package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +33 -9
- package/dist/src/lib/swift-codegen/schemaToSwift.js +215 -179
- package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
- package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +51 -0
- package/dist/src/lib/swift-codegen/sharedGenerator.js +239 -0
- package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
- package/dist/src/lib/swift-codegen/swiftKeys.d.ts +19 -0
- package/dist/src/lib/swift-codegen/swiftKeys.js +31 -0
- package/dist/src/lib/swift-codegen/swiftKeys.js.map +1 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
- package/dist/src/lib/sync-resource-types.d.ts +117 -31
- package/dist/src/lib/sync-resource-types.js +197 -189
- package/dist/src/lib/sync-resource-types.js.map +1 -1
- package/dist/src/lib/sync-selectors.d.ts +7 -0
- package/dist/src/lib/sync-selectors.js +22 -2
- package/dist/src/lib/sync-selectors.js.map +1 -1
- package/dist/src/lib/template.d.ts +39 -3
- package/dist/src/lib/template.js +103 -14
- package/dist/src/lib/template.js.map +1 -1
- package/dist/src/lib/test-case-file-names.d.ts +3 -5
- package/dist/src/lib/test-case-file-names.js +3 -5
- package/dist/src/lib/test-case-file-names.js.map +1 -1
- package/dist/src/lib/test-runs.d.ts +45 -0
- package/dist/src/lib/test-runs.js +150 -0
- package/dist/src/lib/test-runs.js.map +1 -0
- package/dist/src/lib/test-users.d.ts +25 -0
- package/dist/src/lib/test-users.js +36 -0
- package/dist/src/lib/test-users.js.map +1 -0
- package/dist/src/lib/toml-database-config.d.ts +4 -2
- package/dist/src/lib/toml-database-config.js +11 -6
- package/dist/src/lib/toml-database-config.js.map +1 -1
- package/dist/src/lib/toml-list-edit.d.ts +33 -0
- package/dist/src/lib/toml-list-edit.js +481 -0
- package/dist/src/lib/toml-list-edit.js.map +1 -0
- package/dist/src/lib/toml-scalar-edit.d.ts +9 -0
- package/dist/src/lib/toml-scalar-edit.js +73 -5
- package/dist/src/lib/toml-scalar-edit.js.map +1 -1
- package/dist/src/lib/transition-warnings.d.ts +21 -0
- package/dist/src/lib/transition-warnings.js +49 -0
- package/dist/src/lib/transition-warnings.js.map +1 -0
- package/dist/src/lib/usage-meters.d.ts +16 -0
- package/dist/src/lib/usage-meters.js +52 -0
- package/dist/src/lib/usage-meters.js.map +1 -0
- package/dist/src/lib/user-index.d.ts +80 -0
- package/dist/src/lib/user-index.js +166 -0
- package/dist/src/lib/user-index.js.map +1 -0
- package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
- package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
- package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
- package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
- package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
- package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
- package/dist/src/lib/user-walk.d.ts +31 -0
- package/dist/src/lib/user-walk.js +102 -0
- package/dist/src/lib/user-walk.js.map +1 -0
- package/dist/src/lib/webhook-capture.d.ts +43 -0
- package/dist/src/lib/webhook-capture.js +91 -0
- package/dist/src/lib/webhook-capture.js.map +1 -0
- package/dist/src/lib/webhook-deliver.d.ts +18 -20
- package/dist/src/lib/webhook-deliver.js +34 -89
- package/dist/src/lib/webhook-deliver.js.map +1 -1
- package/dist/src/lib/webhook-test-run.d.ts +32 -0
- package/dist/src/lib/webhook-test-run.js +108 -0
- package/dist/src/lib/webhook-test-run.js.map +1 -0
- package/dist/src/lib/worker-perf-format.d.ts +22 -0
- package/dist/src/lib/worker-perf-format.js +27 -0
- package/dist/src/lib/worker-perf-format.js.map +1 -0
- package/dist/src/types/index.d.ts +20 -65
- package/dist/src/validators.d.ts +7 -55
- package/dist/src/validators.js +7 -53
- package/dist/src/validators.js.map +1 -1
- package/dist/src/vite.d.ts +17 -0
- package/dist/src/vite.js +18 -0
- package/dist/src/vite.js.map +1 -0
- package/package.json +20 -9
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* `cli/tests/unit/config-surface-drift-guard.test.ts`) fails if this committed
|
|
15
15
|
* copy does not match the source.
|
|
16
16
|
*/
|
|
17
|
+
import { type GeminiKeywordVerdict } from "./schema-codegen/generated-schema-descriptor.js";
|
|
17
18
|
/**
|
|
18
19
|
* The one definition per configuration object (issue #2644).
|
|
19
20
|
*
|
|
@@ -195,6 +196,21 @@ export interface ConfigField {
|
|
|
195
196
|
* Only for a default the server assigns on CREATE and returns on read.
|
|
196
197
|
*/
|
|
197
198
|
serverDefault?: string | number | boolean;
|
|
199
|
+
/**
|
|
200
|
+
* The field's value is the WHOLE table at its `tomlPath`, keyed by an open
|
|
201
|
+
* set of names: each key of the table is one entry of the map (#6034).
|
|
202
|
+
*
|
|
203
|
+
* `[clients.ios]` and `[clients.web]` are two entries of one field,
|
|
204
|
+
* `clientVersions`, rather than two fields: the names are the author's
|
|
205
|
+
* (platform names), not the definition's. A statement of WHERE the value is
|
|
206
|
+
* authored, like `tomlGroup`, and nothing else: pull writes the map as the
|
|
207
|
+
* table, push reads the table as the map, and the field's handler owns the
|
|
208
|
+
* key set inside each entry. `findBadTableMapDeclarations` holds the table
|
|
209
|
+
* to one such field, with `tomlKey` equal to the table's name.
|
|
210
|
+
*/
|
|
211
|
+
tomlTableMap?: {
|
|
212
|
+
note: string;
|
|
213
|
+
};
|
|
198
214
|
}
|
|
199
215
|
export interface ConfigTable {
|
|
200
216
|
/** TOML path, e.g. ["workflow"] for [workflow], ["configs"] for [[configs]]. */
|
|
@@ -283,8 +299,7 @@ export type RuleStage = "preflight" | "apply";
|
|
|
283
299
|
export type CrossFieldRuleStage = RuleStage;
|
|
284
300
|
/**
|
|
285
301
|
* One rule of a configuration object that spans more than one field — `durable
|
|
286
|
-
* = true` beside a webhook trigger,
|
|
287
|
-
* `accessRule`, an HMAC scheme with no `signingSecret`.
|
|
302
|
+
* = true` beside a webhook trigger, an HMAC scheme with no `signingSecret`.
|
|
288
303
|
*
|
|
289
304
|
* Such a rule belongs to no single field, so `ConfigField.validation` has
|
|
290
305
|
* nowhere to put it; attaching it to one field arbitrarily would make the
|
|
@@ -362,8 +377,9 @@ export interface ConfigObjectSurface {
|
|
|
362
377
|
* Declares that this object HAS no TOML field table, with the reason —
|
|
363
378
|
* required when `tables` is empty and forbidden otherwise.
|
|
364
379
|
*
|
|
365
|
-
* `transform`
|
|
366
|
-
*
|
|
380
|
+
* `transform` was the case until it retired with the Rhai runtime (#3190): a
|
|
381
|
+
* `.rhai` file's authored surface was the script body, so there was no
|
|
382
|
+
* key/value table to define. Saying so here is the same
|
|
367
383
|
* rule `notExposed` applies to a field, one level up: "absent from the
|
|
368
384
|
* registry" and "deliberately fieldless" must not look the same (#2644
|
|
369
385
|
* criterion 4).
|
|
@@ -455,8 +471,8 @@ export declare const DECLARED_ACCESS_MANIFEST_KEYS: Readonly<Record<string, NotE
|
|
|
455
471
|
* accepts. What a present key MEANS stays with the per-field handler the
|
|
456
472
|
* definition names (spec §Contracts, decision of record #1976): the workflow
|
|
457
473
|
* `status` enum, the non-negative-integer coercion of the queue limits,
|
|
458
|
-
* `runAs`'s caller|system check, `parseWorkflowLock
|
|
459
|
-
* shape
|
|
474
|
+
* `runAs`'s caller|system check, `parseWorkflowLock` and the `capabilities`
|
|
475
|
+
* array shape all stay where they are. The
|
|
460
476
|
* mechanical win is that a field can no longer be *absent* from the accepted
|
|
461
477
|
* set.
|
|
462
478
|
*
|
|
@@ -466,10 +482,11 @@ export type WriteMode = "create" | "update";
|
|
|
466
482
|
/** The field names this table accepts on the wire in `mode`, in declaration order. */
|
|
467
483
|
export declare function writableFieldNames(table: ConfigTable, mode: WriteMode): string[];
|
|
468
484
|
/**
|
|
469
|
-
* The field names the server
|
|
470
|
-
* fields, plus the `deprecated` classifications — "still
|
|
471
|
-
*
|
|
472
|
-
* a handler still honors (`
|
|
485
|
+
* The field names the server ACCEPTS for this table in `mode`: the writable
|
|
486
|
+
* fields, plus the `deprecated` classifications — "still accepted, superseded
|
|
487
|
+
* or scheduled for removal" is what that kind means (`types.ts`), so a
|
|
488
|
+
* superseded key a handler still honors (`protected`) and a retired one it
|
|
489
|
+
* accepts and ignores (`accessRule`, #4872) belong in every accepted set, and a
|
|
473
490
|
* field that is NOT writable belongs in none of them.
|
|
474
491
|
*
|
|
475
492
|
* Stated once here because three consumers need the same answer: the generated
|
|
@@ -649,6 +666,14 @@ export declare function findUnknownGroupedTomlKeys(tomlTable: unknown, table: Co
|
|
|
649
666
|
* as a decision and is not one.
|
|
650
667
|
*/
|
|
651
668
|
export declare function findBadTomlGroupDeclarations(table: ConfigTable): string[];
|
|
669
|
+
/**
|
|
670
|
+
* Table-map declarations that do not hold together (#6034): a table whose
|
|
671
|
+
* field is the whole table must declare that field alone, no `tomlGroups`
|
|
672
|
+
* and no `tomlOnlyKeys` (the map's keys are the author's names, so no other
|
|
673
|
+
* key can share the table), its `tomlKey` must be the table's own name, and
|
|
674
|
+
* the declaration needs a reason. `[]` means the table is well formed.
|
|
675
|
+
*/
|
|
676
|
+
export declare function findBadTableMapDeclarations(table: ConfigTable): string[];
|
|
652
677
|
/** Top-level TOML keys this object's file accepts: its tables plus the extras. */
|
|
653
678
|
export declare function acceptedTomlDocumentKeys(surface: ConfigObjectSurface): Set<string>;
|
|
654
679
|
/**
|
|
@@ -980,11 +1005,11 @@ export declare function findUnreachedPreflightRules(surface: ConfigObjectSurface
|
|
|
980
1005
|
*
|
|
981
1006
|
* ── What the schema says, and what it deliberately does not ──────────────
|
|
982
1007
|
* It states the KEY SET only: each property is the empty schema (or carries
|
|
983
|
-
* only the `deprecated` annotation, #1815), so no value is type-checked here.
|
|
984
|
-
*
|
|
985
|
-
*
|
|
986
|
-
*
|
|
987
|
-
* definition names, with their existing messages. Adding type gates here would
|
|
1008
|
+
* only the `deprecated` annotation, #1815), so no value is type-checked here.
|
|
1009
|
+
* That is the decision of record (#1976, carried forward at #2644's design
|
|
1010
|
+
* gate): the definition classifies, handlers behave. The `status` enum, the
|
|
1011
|
+
* queue limits' integer coercion, the CEL parse of a rule set's expressions —
|
|
1012
|
+
* all stay in the handlers the definition names, with their existing messages. Adding type gates here would
|
|
988
1013
|
* duplicate them and start rejecting values the handlers accept.
|
|
989
1014
|
*
|
|
990
1015
|
* ── Which keys are in the set ────────────────────────────────────────────
|
|
@@ -1017,7 +1042,8 @@ export interface ConfigRequestSchema {
|
|
|
1017
1042
|
type: "object";
|
|
1018
1043
|
/**
|
|
1019
1044
|
* Each property is the empty schema, or `{ deprecated: true }` for a field
|
|
1020
|
-
* the definition marks `deprecated` (#1815)
|
|
1045
|
+
* the definition marks `deprecated` (#1815) or a key `notExposed` classifies
|
|
1046
|
+
* `deprecated` (#4872). `deprecated` is an OpenAPI
|
|
1021
1047
|
* annotation: it constrains no value, so the schema still states the key set
|
|
1022
1048
|
* and nothing more.
|
|
1023
1049
|
*/
|
|
@@ -1089,7 +1115,7 @@ export declare function unknownRequestKeysMessage(keys: readonly string[]): stri
|
|
|
1089
1115
|
* retired key: the TOML wording for `config push` (which can tell the author to
|
|
1090
1116
|
* delete a line) and the request wording for the API handlers (which cannot).
|
|
1091
1117
|
*
|
|
1092
|
-
* Keyed by the table's TOML path prefix (`
|
|
1118
|
+
* Keyed by the table's TOML path prefix (`integration`, `prompt`, …), because
|
|
1093
1119
|
* that is the identifier both consumers already have in hand.
|
|
1094
1120
|
*
|
|
1095
1121
|
* Pure: no models, no tenant context, no `env` (see `types.ts` §Purity).
|
|
@@ -1101,6 +1127,51 @@ export interface RetiredConfigKey {
|
|
|
1101
1127
|
request: string;
|
|
1102
1128
|
}
|
|
1103
1129
|
export declare const RETIRED_CONFIG_KEYS: Record<string, Record<string, RetiredConfigKey>>;
|
|
1130
|
+
/**
|
|
1131
|
+
* Keys DEPRECATED on a configuration object's write surface: still accepted
|
|
1132
|
+
* in TOML and on the wire, ignored, and scheduled for removal.
|
|
1133
|
+
*
|
|
1134
|
+
* A deprecated key sits between a live field and a retired one. The table
|
|
1135
|
+
* classifies it `deprecated` in both `notExposed` (so a body that still sends
|
|
1136
|
+
* it is accepted) and `tomlOnlyKeys` (so a file that still carries it
|
|
1137
|
+
* validates); this registry holds the one sentence `config push` prints for a
|
|
1138
|
+
* file that carries it, and is what `config pull` keys its forced rewrite on,
|
|
1139
|
+
* so the pull the sentence names removes the line.
|
|
1140
|
+
*
|
|
1141
|
+
* Keyed by the table's TOML path prefix, like `RETIRED_CONFIG_KEYS`. The
|
|
1142
|
+
* scheduled break moves an entry from here to that map.
|
|
1143
|
+
*/
|
|
1144
|
+
export interface DeprecatedConfigKey {
|
|
1145
|
+
/** What `config push` says, once per file, about a file that carries the key. */
|
|
1146
|
+
toml: string;
|
|
1147
|
+
}
|
|
1148
|
+
export declare const DEPRECATED_CONFIG_KEYS: Record<string, Record<string, DeprecatedConfigKey>>;
|
|
1149
|
+
/** The deprecated-key entry for `key` under `prefix`, or null when it is not deprecated. */
|
|
1150
|
+
export declare function deprecatedConfigKey(prefix: string, key: string): DeprecatedConfigKey | null;
|
|
1151
|
+
/**
|
|
1152
|
+
* Config-tree directories whose object type retired — #3190, server-functions
|
|
1153
|
+
* phase 7. The DSL engine, the Rhai runtime and the standalone webhook and
|
|
1154
|
+
* cron objects are gone, so `config push` refuses a tree that still holds one
|
|
1155
|
+
* of these directories, by name and before it writes anything, rather than
|
|
1156
|
+
* ignoring files an author still expects to take effect.
|
|
1157
|
+
*
|
|
1158
|
+
* Each entry is one sentence: what retired, what replaces it, and the docs page
|
|
1159
|
+
* that shows the replacement.
|
|
1160
|
+
*/
|
|
1161
|
+
export declare const RETIRED_CONFIG_DIRECTORIES: Record<string, string>;
|
|
1162
|
+
/**
|
|
1163
|
+
* The type-config directories a config tree no longer has (#4731, project
|
|
1164
|
+
* `role-based-groups-collections`). Groups and collections have fixed roles,
|
|
1165
|
+
* so their per-type configuration retired with its routes; `config push`
|
|
1166
|
+
* refuses a tree that still holds a file in either, naming each file, rather
|
|
1167
|
+
* than ignoring files an author still expects to take effect. The rows the
|
|
1168
|
+
* server already stored are not touched.
|
|
1169
|
+
*
|
|
1170
|
+
* Each entry is one sentence: what retired, and what replaces it.
|
|
1171
|
+
*/
|
|
1172
|
+
export declare const RETIRED_TYPE_CONFIG_DIRECTORIES: Record<string, string>;
|
|
1173
|
+
/** The retirement sentence for a config-tree directory, or null when it is live. */
|
|
1174
|
+
export declare function retiredConfigDirectory(dir: string): string | null;
|
|
1104
1175
|
/**
|
|
1105
1176
|
* Top-level TOML tables a configuration object's FILE retired — keyed by the
|
|
1106
1177
|
* surface's label, then by the table key. Only the TOML half exists: these were
|
|
@@ -1131,10 +1202,29 @@ export interface RetiredTomlSpelling {
|
|
|
1131
1202
|
*/
|
|
1132
1203
|
export declare const RETIRED_TOML_SPELLINGS: Record<string, Record<string, RetiredTomlSpelling>>;
|
|
1133
1204
|
/**
|
|
1134
|
-
*
|
|
1135
|
-
*
|
|
1205
|
+
* A key one surface refuses while another surface of the same TOML prefix
|
|
1206
|
+
* takes it: the prefix alone cannot pick the sentence.
|
|
1136
1207
|
*/
|
|
1137
|
-
export
|
|
1208
|
+
export interface RetiredSurfaceTomlKey extends RetiredTomlSpelling {
|
|
1209
|
+
/**
|
|
1210
|
+
* An empty string is accepted and ignored rather than refused: the
|
|
1211
|
+
* placeholder every earlier `config pull` wrote, which a refusal would turn
|
|
1212
|
+
* into a failed first push of every existing tree.
|
|
1213
|
+
*/
|
|
1214
|
+
emptyAccepted?: boolean;
|
|
1215
|
+
}
|
|
1216
|
+
/**
|
|
1217
|
+
* Guidance keyed by surface label, then TOML prefix, then key — consulted
|
|
1218
|
+
* before `RETIRED_CONFIG_KEYS` and `RETIRED_TOML_SPELLINGS` when the caller
|
|
1219
|
+
* knows the surface.
|
|
1220
|
+
*/
|
|
1221
|
+
export declare const RETIRED_SURFACE_TOML_KEYS: Record<string, Record<string, Record<string, RetiredSurfaceTomlKey>>>;
|
|
1222
|
+
/**
|
|
1223
|
+
* The TOML guidance for `key` under `prefix`: the surface's own when
|
|
1224
|
+
* `surfaceLabel` names one, else a fully retired key's, else a retired
|
|
1225
|
+
* spelling's, else null when the key is simply unknown.
|
|
1226
|
+
*/
|
|
1227
|
+
export declare function retiredTomlKey(prefix: string, key: string, surfaceLabel?: string): RetiredSurfaceTomlKey | null;
|
|
1138
1228
|
/**
|
|
1139
1229
|
* The capability grammar for server functions — #3182 phase 1, rewritten by
|
|
1140
1230
|
* #3279 (project `server-functions` phase 3).
|
|
@@ -1157,7 +1247,10 @@ export declare function retiredTomlKey(prefix: string, key: string): RetiredToml
|
|
|
1157
1247
|
* `secret:<NAME>` credential least privilege — which secret VALUES may
|
|
1158
1248
|
* cross into the sandbox at all;
|
|
1159
1249
|
* the high-blast list {@link HIGH_BLAST_CAPABILITIES} — the operations
|
|
1160
|
-
* whose blast radius the intent keeps opt-in
|
|
1250
|
+
* whose blast radius the intent keeps opt-in;
|
|
1251
|
+
* the subject grants {@link SUBJECT_GRANT_CAPABILITIES} — naming another
|
|
1252
|
+
* member on a call about one user, in a run a plain
|
|
1253
|
+
* member invoked.
|
|
1161
1254
|
*
|
|
1162
1255
|
* Every other string a function used to declare is RETIRED, and the grammar
|
|
1163
1256
|
* says so by name: an author who still writes `database:orders/Order:read`
|
|
@@ -1210,15 +1303,57 @@ export declare const KEYED_GRANT_FAMILIES: readonly ["integration", "secret"];
|
|
|
1210
1303
|
* other — `databases:create` is not permission to delete a database.
|
|
1211
1304
|
*
|
|
1212
1305
|
* The database ROLE mutations are here because they hand out persistent
|
|
1213
|
-
* authority: a group grant assigns the manager role (D3279-003).
|
|
1306
|
+
* authority: a group grant assigns the manager role (D3279-003). A db3's sync
|
|
1307
|
+
* switch (`db3:setSync`, the intent's `db3-sync` grant) is here because
|
|
1308
|
+
* turning sync off suspends every grant on the db3 (#4799); a db3's transfer
|
|
1309
|
+
* and its owner-row change (`db3:transfer`, `db3:setOwnerRow`, the intent's
|
|
1310
|
+
* `db3-grant` grant) because they move who holds the db3 and its owner row
|
|
1311
|
+
* (#4800); its app access (`db3:setAppAccess`, the same grant's third string)
|
|
1312
|
+
* because it grants the db3 to every user of the app (#4801); its public
|
|
1313
|
+
* access (`db3:setPublicAccess`) because it lets the db3 be served to callers
|
|
1314
|
+
* who hold no sharing level on it (#5842). App deletion
|
|
1214
1315
|
* and secret writes have no app-API route today; they are recorded, not gated,
|
|
1215
1316
|
* and the profile generator refuses to admit a future such route without a row
|
|
1216
1317
|
* here (`HIGH_BLAST_WATCH` in `scripts/lib/function-profile.mjs`).
|
|
1217
1318
|
*/
|
|
1218
|
-
export declare const HIGH_BLAST_CAPABILITIES: readonly ["databases:create", "databases:delete", "databases:transferOwnership", "databases:addManager", "databases:revokePermission", "databases:grantGroupPermission", "databases:revokeGroupPermission", "users:remove", "users:setRole", "blobBuckets:createBucket", "blobBuckets:deleteBucket"];
|
|
1219
|
-
/**
|
|
1220
|
-
|
|
1221
|
-
|
|
1319
|
+
export declare const HIGH_BLAST_CAPABILITIES: readonly ["databases:create", "databases:delete", "databases:transferOwnership", "databases:addManager", "databases:revokePermission", "databases:grantGroupPermission", "databases:revokeGroupPermission", "users:remove", "users:setRole", "blobBuckets:createBucket", "blobBuckets:deleteBucket", "db3:setSync", "db3:transfer", "db3:setOwnerRow", "db3:setAppAccess", "db3:setPublicAccess"];
|
|
1320
|
+
/**
|
|
1321
|
+
* The subject grants — #4909.
|
|
1322
|
+
*
|
|
1323
|
+
* A run a plain member invoked may name nobody but its caller on a call that
|
|
1324
|
+
* is about one user (#4142's subject rule): `SUBJECT_USER_FORBIDDEN`. A
|
|
1325
|
+
* function whose own code chooses that user — a class's teacher removing a
|
|
1326
|
+
* student and reading where else the student is enrolled — declares it here,
|
|
1327
|
+
* in a line a reviewer can find:
|
|
1328
|
+
*
|
|
1329
|
+
* `users:readAny` the user-subject READS may name another member
|
|
1330
|
+
* (memberships, a member's collections, their db3s
|
|
1331
|
+
* (owned and shared), inbox, devices, agent sessions);
|
|
1332
|
+
* `users:actAsAny` the calls that ACT as a member may name another member
|
|
1333
|
+
* (marking their notifications read, their devices, an
|
|
1334
|
+
* agent session as them, `ctx.db3` `asUser`, their
|
|
1335
|
+
* aliases).
|
|
1336
|
+
*
|
|
1337
|
+
* Each admits only its own kind. Neither changes a run with no caller, an
|
|
1338
|
+
* owner- or admin-invoked run, or a run an agent drives (refused either way),
|
|
1339
|
+
* and a nested child reads its own version's. They are not high-blast rows:
|
|
1340
|
+
* those are 1:1 with an operation id, and these name a rule, not an operation.
|
|
1341
|
+
*/
|
|
1342
|
+
export declare const SUBJECT_GRANT_CAPABILITIES: readonly ["users:readAny", "users:actAsAny"];
|
|
1343
|
+
/**
|
|
1344
|
+
* The gateway-reserved operations a function opts into — #5849.
|
|
1345
|
+
*
|
|
1346
|
+
* `tokens:sign` `ctx.actionTokens.sign`: mint a signed link to a function
|
|
1347
|
+
* of the app (an action token).
|
|
1348
|
+
*
|
|
1349
|
+
* Not high-blast rows: those are 1:1 with an operation id, and these name a
|
|
1350
|
+
* gateway-reserved path with no app-API route. A version declaring one is
|
|
1351
|
+
* write-capable for the public-writer lint and the cache rule.
|
|
1352
|
+
*/
|
|
1353
|
+
export declare const RESERVED_OPERATION_CAPABILITIES: readonly ["tokens:sign"];
|
|
1354
|
+
/** The exact strings: the high-blast list, the subject grants and the reserved operations. */
|
|
1355
|
+
export declare const EXACT_GRANT_STRINGS: readonly string[];
|
|
1356
|
+
export type GrantFamily = (typeof KEYED_GRANT_FAMILIES)[number] | "databases" | "users" | "blobBuckets" | "db3" | "tokens";
|
|
1222
1357
|
/**
|
|
1223
1358
|
* The retired FAMILIES (#3279), each with the reason it is gone.
|
|
1224
1359
|
*
|
|
@@ -1420,7 +1555,37 @@ export declare function validateKeyedGrantsAgainstTargets(grants: readonly Funct
|
|
|
1420
1555
|
* A version-1 manifest still parses: it records registrations only.
|
|
1421
1556
|
*/
|
|
1422
1557
|
export declare const FUNCTION_MANIFEST_SCHEMA_VERSION = 2;
|
|
1423
|
-
export declare const FUNCTION_MANIFEST_SCHEMA_VERSIONS: readonly [1, 2];
|
|
1558
|
+
export declare const FUNCTION_MANIFEST_SCHEMA_VERSIONS: readonly [1, 2, 3];
|
|
1559
|
+
/**
|
|
1560
|
+
* Version 3 (#4730) adds what a version's `authorize` admits: the
|
|
1561
|
+
* `authorize` block and the `writeFamilies` its handler reaches. Only a
|
|
1562
|
+
* FLAGGED build emits it — the manifest is inside the envelope hash, so a
|
|
1563
|
+
* universal bump would make every untouched bare-handler tree a new version
|
|
1564
|
+
* on its next push. A bare-handler tree keeps emitting version 2.
|
|
1565
|
+
*/
|
|
1566
|
+
export declare const FUNCTION_MANIFEST_AUTHORIZE_SCHEMA_VERSION = 3;
|
|
1567
|
+
/** The `auth.*` families an `authorize` can read, as the manifest names them. */
|
|
1568
|
+
export declare const AUTH_FAMILIES: readonly ["auth.user", "auth.trigger", "auth.memberships", "auth.collections", "auth.doc", "auth.db", "auth.db3", "auth.configVar", "auth.actionToken", "auth.invitation"];
|
|
1569
|
+
/**
|
|
1570
|
+
* The `auth.*` families whose admission is the caller's own — #5849: a token
|
|
1571
|
+
* admits only its holder, so a cached answer must never stand in for it.
|
|
1572
|
+
* `cacheSeconds` on a version whose manifest shows one is refused. Each maps
|
|
1573
|
+
* to the helper its refusal names.
|
|
1574
|
+
*/
|
|
1575
|
+
export declare const UNCACHEABLE_AUTH_FAMILIES: readonly ["auth.actionToken"];
|
|
1576
|
+
/** The SDK helpers that build an `authorize`, as the manifest names them. */
|
|
1577
|
+
export declare const AUTHORIZE_HELPERS: readonly ["allowAnyone", "allowCallers", "requireSignedIn", "requireRole", "requireMember", "requireCollectionRole", "requireDocumentOwner", "requirePublicDb3", "requireDb3Level", "requireToken", "requireInvitation"];
|
|
1578
|
+
/**
|
|
1579
|
+
* The helpers that admit by a token the caller presents (#5848): what admits
|
|
1580
|
+
* is the token alone, so their answers are never cached, and push refuses
|
|
1581
|
+
* `cacheSeconds` on a version whose manifest shows one. `requireToken` is
|
|
1582
|
+
* refused by its family instead, through {@link UNCACHEABLE_AUTH_FAMILIES}.
|
|
1583
|
+
*/
|
|
1584
|
+
export declare const TOKEN_ADMITTING_HELPERS: readonly string[];
|
|
1585
|
+
/** The `auth.*` families only a token-admitting helper reads (#5848). */
|
|
1586
|
+
export declare const TOKEN_ADMITTING_AUTH_FAMILIES: readonly string[];
|
|
1587
|
+
/** How many function keys an `allowCallers` block may list. */
|
|
1588
|
+
export declare const MAX_MANIFEST_CALLER_FUNCTIONS = 200;
|
|
1424
1589
|
/** Bounds, so a manifest cannot be a way to store an unbounded blob. */
|
|
1425
1590
|
export declare const MAX_MANIFEST_QUERIES = 200;
|
|
1426
1591
|
export declare const MAX_MANIFEST_NAME_LENGTH = 120;
|
|
@@ -1471,6 +1636,41 @@ export interface ManifestQuery {
|
|
|
1471
1636
|
/** True when a `$caller` binding scopes this registration. */
|
|
1472
1637
|
callerScoped: boolean;
|
|
1473
1638
|
}
|
|
1639
|
+
/** The doors an `allowCallers` admits, as collected (#4730). */
|
|
1640
|
+
export interface ManifestAuthorizeCallers {
|
|
1641
|
+
webhook: boolean;
|
|
1642
|
+
cron: boolean;
|
|
1643
|
+
manual: boolean;
|
|
1644
|
+
/** The parent function keys the `functions` arm names. */
|
|
1645
|
+
functions: string[];
|
|
1646
|
+
/** `true`, `false`, or `"rule"` when the arm is an authorize function. */
|
|
1647
|
+
agents: boolean | "rule";
|
|
1648
|
+
/** `"rule"` when a `users` arm is present, else false. */
|
|
1649
|
+
users: false | "rule";
|
|
1650
|
+
/**
|
|
1651
|
+
* #4803 — the db3 flush door. Optional: a manifest collected before the door
|
|
1652
|
+
* existed carries no key, and absent reads as closed.
|
|
1653
|
+
*/
|
|
1654
|
+
db3?: boolean;
|
|
1655
|
+
/**
|
|
1656
|
+
* #5393 — a users walk's batch door: `true` for every walk, or the keys of
|
|
1657
|
+
* the functions whose walks are admitted. Optional like `db3`: absent reads
|
|
1658
|
+
* as closed.
|
|
1659
|
+
*/
|
|
1660
|
+
usersBatch?: boolean | string[];
|
|
1661
|
+
}
|
|
1662
|
+
/** What a version's `authorize` admits, as collected (#4730). */
|
|
1663
|
+
export interface ManifestAuthorize {
|
|
1664
|
+
present: true;
|
|
1665
|
+
/** `allowAnyone()`, or an `allowCallers` whose users or agents rule is one. */
|
|
1666
|
+
public: boolean;
|
|
1667
|
+
/** The SDK helper that built the exported `authorize`, or null when hand-written. */
|
|
1668
|
+
helper: string | null;
|
|
1669
|
+
/** The doors, when the helper is `allowCallers`; else null. */
|
|
1670
|
+
callers: ManifestAuthorizeCallers | null;
|
|
1671
|
+
/** The `auth.*` families the authorize code reaches, sorted. */
|
|
1672
|
+
families: string[];
|
|
1673
|
+
}
|
|
1474
1674
|
export interface FunctionManifest {
|
|
1475
1675
|
schemaVersion: number;
|
|
1476
1676
|
queries: ManifestQuery[];
|
|
@@ -1489,6 +1689,13 @@ export interface FunctionManifest {
|
|
|
1489
1689
|
* empty `models` list does not.
|
|
1490
1690
|
*/
|
|
1491
1691
|
dynamicModels: boolean;
|
|
1692
|
+
/**
|
|
1693
|
+
* Version 3 only: the families on which the scan met a write or send verb.
|
|
1694
|
+
* Absent on versions 1 and 2, which readers treat as `[]`.
|
|
1695
|
+
*/
|
|
1696
|
+
writeFamilies?: string[];
|
|
1697
|
+
/** Version 3 only: the `authorize` block. Absent on 1 and 2 (read as null). */
|
|
1698
|
+
authorize?: ManifestAuthorize;
|
|
1492
1699
|
}
|
|
1493
1700
|
export interface ParsedManifest {
|
|
1494
1701
|
ok: boolean;
|
|
@@ -1503,6 +1710,139 @@ export interface ParsedManifest {
|
|
|
1503
1710
|
* and whether the author meant any of it are questions this cannot answer.
|
|
1504
1711
|
*/
|
|
1505
1712
|
export declare function parseFunctionManifest(value: unknown): ParsedManifest;
|
|
1713
|
+
/**
|
|
1714
|
+
* Whether a top-level input schema is one the closed-schema default leaves
|
|
1715
|
+
* OPEN under its union exemption — #4730, criterion 9.
|
|
1716
|
+
*
|
|
1717
|
+
* The validator closes an object against the root's OWN `properties` only,
|
|
1718
|
+
* so a root whose `anyOf` or `oneOf` members declare `properties` of their
|
|
1719
|
+
* own would, closed, refuse the very keys its members declare. Such a root is
|
|
1720
|
+
* left open, and `config push` warns its author to say `additionalProperties`
|
|
1721
|
+
* explicitly. Shared by the server (`closedInputSchemaFor`) and the CLI's
|
|
1722
|
+
* push warning, so both sides read one rule.
|
|
1723
|
+
*/
|
|
1724
|
+
export declare function inputSchemaRootLeftOpen(schema: unknown): boolean;
|
|
1725
|
+
/**
|
|
1726
|
+
* The schema a flagged version validates against — #4730, criterion 9.
|
|
1727
|
+
*
|
|
1728
|
+
* A top-level object schema that sets no `additionalProperties` reads as
|
|
1729
|
+
* closed: a shallow copy with `additionalProperties: false`. Every other
|
|
1730
|
+
* schema is answered as it is — an explicit `additionalProperties`, a
|
|
1731
|
+
* non-object root, an empty `{}`, and a root left open under
|
|
1732
|
+
* {@link inputSchemaRootLeftOpen}. Nested objects are not touched. Applied at
|
|
1733
|
+
* run time and never written to the header.
|
|
1734
|
+
*/
|
|
1735
|
+
export declare function closedObjectSchema(schema: Record<string, unknown>): Record<string, unknown>;
|
|
1736
|
+
/** The `rate` tiers a public function may name under `[function] public`. */
|
|
1737
|
+
export declare const PUBLIC_RATE_TIERS: readonly ["low", "medium", "high"];
|
|
1738
|
+
/** The most seconds `public.cacheSeconds` may name. */
|
|
1739
|
+
export declare const PUBLIC_CACHE_SECONDS_MAX = 300;
|
|
1740
|
+
/**
|
|
1741
|
+
* The normalized options of `[function] public` written as a table. Only the
|
|
1742
|
+
* options the table sets are present; `turnstile = false` is dropped.
|
|
1743
|
+
*/
|
|
1744
|
+
export interface PublicOptions {
|
|
1745
|
+
/** Signed-out answers are cached for this many seconds, 1 to 300. */
|
|
1746
|
+
cacheSeconds?: number;
|
|
1747
|
+
/** Signed-out calls may come from any origin. */
|
|
1748
|
+
cors?: "*";
|
|
1749
|
+
/** Signed-out calls carry a Turnstile token. */
|
|
1750
|
+
turnstile?: true;
|
|
1751
|
+
/** The per-IP tier signed-out calls are held to. */
|
|
1752
|
+
rate?: (typeof PUBLIC_RATE_TIERS)[number];
|
|
1753
|
+
}
|
|
1754
|
+
/** The code every refusal of a malformed `public` answers. */
|
|
1755
|
+
export declare const PUBLIC_OPTIONS_INVALID_CODE = "FUNCTION_PUBLIC_OPTIONS_INVALID";
|
|
1756
|
+
/**
|
|
1757
|
+
* `[function] public`, read from the authored TOML's `[function]` table, with
|
|
1758
|
+
* its options: `true`, `false`, or a table of
|
|
1759
|
+
* `{ cacheSeconds, cors, turnstile, rate }`. A table means public exactly as
|
|
1760
|
+
* `true` does. `options` holds what the table sets, normalized, and is null
|
|
1761
|
+
* when it sets nothing. A value outside the grammar is refused with a
|
|
1762
|
+
* sentence naming the key, the value and what is allowed. Read by the CLI's
|
|
1763
|
+
* preflight and by the server from the envelope's TOML.
|
|
1764
|
+
*/
|
|
1765
|
+
export declare function declaredPublicOptionsOf(functionTable: unknown): {
|
|
1766
|
+
ok: true;
|
|
1767
|
+
declared: boolean;
|
|
1768
|
+
options: PublicOptions | null;
|
|
1769
|
+
} | {
|
|
1770
|
+
ok: false;
|
|
1771
|
+
error: string;
|
|
1772
|
+
code: typeof PUBLIC_OPTIONS_INVALID_CODE;
|
|
1773
|
+
};
|
|
1774
|
+
/**
|
|
1775
|
+
* `[function] public`, read from the authored TOML's `[function]` table —
|
|
1776
|
+
* #4730, criterion 13. Absent reads as false; a valid table of options reads
|
|
1777
|
+
* as true; anything else is refused. Read by the CLI's preflight and by the
|
|
1778
|
+
* server from the envelope's TOML.
|
|
1779
|
+
*/
|
|
1780
|
+
export declare function declaredPublicOf(functionTable: unknown): {
|
|
1781
|
+
ok: true;
|
|
1782
|
+
value: boolean;
|
|
1783
|
+
} | {
|
|
1784
|
+
ok: false;
|
|
1785
|
+
error: string;
|
|
1786
|
+
};
|
|
1787
|
+
/**
|
|
1788
|
+
* The options string push stores on the version: the normalized options as
|
|
1789
|
+
* JSON, or null when the table sets none (nothing is written then).
|
|
1790
|
+
*/
|
|
1791
|
+
export declare function serializePublicOptions(options: PublicOptions | null): string | null;
|
|
1792
|
+
/**
|
|
1793
|
+
* The options a version stores, read back from its string. Absent reads as
|
|
1794
|
+
* null. A string that is not JSON, not an object, or holds anything push
|
|
1795
|
+
* would not have written throws, so a reader refuses it rather than reading
|
|
1796
|
+
* it as no options.
|
|
1797
|
+
*/
|
|
1798
|
+
export declare function parseStoredPublicOptions(stored: unknown): PublicOptions | null;
|
|
1799
|
+
/**
|
|
1800
|
+
* What makes a version write-capable for the public-writer lint — #4730: a
|
|
1801
|
+
* mutation registration, a family the manifest records a write or send verb
|
|
1802
|
+
* on, or a declared `integration:<key>`, high-blast or subject-grant
|
|
1803
|
+
* capability (#4909: a function anyone may invoke that names any member is
|
|
1804
|
+
* the same hazard). One phrase per reason, for the refusal to quote.
|
|
1805
|
+
*/
|
|
1806
|
+
export declare function writeCapableReasons(manifest: FunctionManifest | null, capabilities: readonly string[]): string[];
|
|
1807
|
+
/**
|
|
1808
|
+
* The public-writer refusal — #4730, criterion 13: a version whose manifest
|
|
1809
|
+
* records `authorize.public` (an `allowAnyone()`, or an `allowCallers` arm
|
|
1810
|
+
* that is one) and that is write-capable needs `public = true` under
|
|
1811
|
+
* `[function]`. The sentence names the function, what makes it write-capable
|
|
1812
|
+
* and the fix; null when the push is fine. The CLI refuses at preflight and
|
|
1813
|
+
* the server at push, from this one rule.
|
|
1814
|
+
*/
|
|
1815
|
+
export declare function publicWriterRefusal(input: {
|
|
1816
|
+
functionKey: string;
|
|
1817
|
+
manifest: FunctionManifest | null;
|
|
1818
|
+
capabilities: readonly string[];
|
|
1819
|
+
declaredPublic: boolean;
|
|
1820
|
+
}): string | null;
|
|
1821
|
+
/** The codes {@link publicOptionsRefusal} answers. */
|
|
1822
|
+
export type PublicOptionsRefusalCode = "FUNCTION_PUBLIC_CACHE_WRITE_CAPABLE" | "FUNCTION_PUBLIC_CACHE_WITH_TURNSTILE" | "FUNCTION_PUBLIC_CACHE_TOKEN_ADMITTED" | "FUNCTION_PUBLIC_CACHE_UNCACHEABLE_HELPER";
|
|
1823
|
+
/**
|
|
1824
|
+
* The push rules on `[function] public` options: `cacheSeconds` on a
|
|
1825
|
+
* write-capable version (the public-writer lint's reasons) is refused,
|
|
1826
|
+
* because a cached answer would stand in for a run that writes; and
|
|
1827
|
+
* `cacheSeconds` with `turnstile = true` is refused, because a cached answer
|
|
1828
|
+
* would be served without the check; and `cacheSeconds` on a version whose
|
|
1829
|
+
* manifest shows a token-admitting helper (`requireInvitation`, by helper or
|
|
1830
|
+
* by its `auth.invitation` family) is refused, because its answers are never
|
|
1831
|
+
* cached (#5848); and `cacheSeconds` on a version whose manifest shows an
|
|
1832
|
+
* uncacheable family (#5849: `requireToken`'s `auth.actionToken`) is
|
|
1833
|
+
* refused, because each answer belongs to the caller the helper admitted.
|
|
1834
|
+
* The CLI refuses at preflight and the server at push, from this one rule;
|
|
1835
|
+
* null when the options are fine.
|
|
1836
|
+
*/
|
|
1837
|
+
export declare function publicOptionsRefusal(input: {
|
|
1838
|
+
functionKey: string;
|
|
1839
|
+
options: PublicOptions | null;
|
|
1840
|
+
manifest: FunctionManifest | null;
|
|
1841
|
+
capabilities: readonly string[];
|
|
1842
|
+
}): {
|
|
1843
|
+
code: PublicOptionsRefusalCode;
|
|
1844
|
+
message: string;
|
|
1845
|
+
} | null;
|
|
1506
1846
|
/**
|
|
1507
1847
|
* The runtime keys a `functions/<key>.toml` no longer decides anything with —
|
|
1508
1848
|
* #3482 retired them, and #3188 (project `server-functions` phase 5) refuses
|
|
@@ -1671,6 +2011,12 @@ export declare function hasRetiredDatabaseTriggerBlock(functionTable: unknown):
|
|
|
1671
2011
|
* as ignored by `ignoredFunctionKeys` in `function-retired-keys.ts`.
|
|
1672
2012
|
*/
|
|
1673
2013
|
/** A function's single webhook trigger, normalized. */
|
|
2014
|
+
/**
|
|
2015
|
+
* The db3 type-name prefix the platform reserves for its own types (#4882,
|
|
2016
|
+
* project `agent-sessions-db3`): no app pushes, attaches or watches a type
|
|
2017
|
+
* whose name starts with it.
|
|
2018
|
+
*/
|
|
2019
|
+
export declare const RESERVED_DB3_TYPE_PREFIX = "primitive:";
|
|
1674
2020
|
export interface WebhookTriggerDeclaration {
|
|
1675
2021
|
verificationScheme: string;
|
|
1676
2022
|
signingSecret?: string;
|
|
@@ -1681,7 +2027,28 @@ export interface WebhookTriggerDeclaration {
|
|
|
1681
2027
|
secretGracePeriodMs?: number;
|
|
1682
2028
|
/** `[function.triggers.webhook.verification]` — the row's `config`. */
|
|
1683
2029
|
verification?: Record<string, unknown>;
|
|
2030
|
+
/**
|
|
2031
|
+
* `[[function.triggers.webhook.handshakeRules]]` — a provider's setup
|
|
2032
|
+
* handshake (Slack `url_verification`, Discord PING, Microsoft Graph
|
|
2033
|
+
* `validationToken`, Meta `hub.challenge`), answered by the receiver after
|
|
2034
|
+
* verification and before the function runs (#3190).
|
|
2035
|
+
*/
|
|
2036
|
+
handshakeRules?: WebhookHandshakeRuleDeclaration[];
|
|
2037
|
+
/** `allowedIpCidrs` — the sender addresses a delivery may come from (#3190). */
|
|
2038
|
+
allowedIpCidrs?: string[];
|
|
1684
2039
|
}
|
|
2040
|
+
/** One handshake rule: a CEL `when` and the response it answers with. */
|
|
2041
|
+
export interface WebhookHandshakeRuleDeclaration {
|
|
2042
|
+
when: string;
|
|
2043
|
+
response: {
|
|
2044
|
+
status?: number;
|
|
2045
|
+
contentType?: string;
|
|
2046
|
+
body?: string;
|
|
2047
|
+
};
|
|
2048
|
+
}
|
|
2049
|
+
/** The most handshake rules and allowlist entries one webhook block may carry. */
|
|
2050
|
+
export declare const MAX_WEBHOOK_HANDSHAKE_RULES = 10;
|
|
2051
|
+
export declare const MAX_WEBHOOK_IP_CIDRS = 50;
|
|
1685
2052
|
/** One `[[function.triggers.cron]]` entry, normalized. */
|
|
1686
2053
|
export interface CronTriggerDeclaration {
|
|
1687
2054
|
name: string;
|
|
@@ -1690,9 +2057,20 @@ export interface CronTriggerDeclaration {
|
|
|
1690
2057
|
overlapPolicy?: string;
|
|
1691
2058
|
rootInput?: unknown;
|
|
1692
2059
|
}
|
|
2060
|
+
/** One `[[function.triggers.db3]]` entry, normalized (#4803). */
|
|
2061
|
+
export interface Db3TriggerDeclaration {
|
|
2062
|
+
/** The db3 type whose flushes start the function. */
|
|
2063
|
+
type: string;
|
|
2064
|
+
}
|
|
1693
2065
|
export interface TriggerDeclaration {
|
|
1694
2066
|
webhook: WebhookTriggerDeclaration | null;
|
|
1695
2067
|
cron: CronTriggerDeclaration[];
|
|
2068
|
+
/**
|
|
2069
|
+
* `[[function.triggers.db3]]` — present only when the file declares at least
|
|
2070
|
+
* one entry, so a file written before the kind existed stores exactly the
|
|
2071
|
+
* JSON it stored before (#4803).
|
|
2072
|
+
*/
|
|
2073
|
+
db3?: Db3TriggerDeclaration[];
|
|
1696
2074
|
}
|
|
1697
2075
|
export declare const EMPTY_TRIGGER_DECLARATION: TriggerDeclaration;
|
|
1698
2076
|
/**
|
|
@@ -1704,13 +2082,19 @@ export declare const EMPTY_TRIGGER_DECLARATION: TriggerDeclaration;
|
|
|
1704
2082
|
* remaining slots for the other 40+ objects the cap is sized for.
|
|
1705
2083
|
*/
|
|
1706
2084
|
export declare const MAX_CRON_TRIGGERS_PER_FUNCTION = 10;
|
|
2085
|
+
/**
|
|
2086
|
+
* The most db3 types one function may watch — the cron cap's per-object
|
|
2087
|
+
* reasoning (#4803). The per-app ceiling is `MAX_DB3_TRIGGERS_PER_APP`, checked
|
|
2088
|
+
* at the push boundary.
|
|
2089
|
+
*/
|
|
2090
|
+
export declare const MAX_DB3_TRIGGERS_PER_FUNCTION = 10;
|
|
1707
2091
|
/**
|
|
1708
2092
|
* The rule ids this module owns — one per refusal, declared on the `function`
|
|
1709
2093
|
* surface (#3374). The union below closes `refuseTrigger`'s id parameter, so a
|
|
1710
2094
|
* twenty-seventh refusal cannot compile without a twenty-seventh id, and that
|
|
1711
2095
|
* id fails `cli-unit-tests` until the surface declares it (#3373's anchor).
|
|
1712
2096
|
*/
|
|
1713
|
-
export declare const TRIGGER_RULE_IDS: readonly ["triggers-table", "trigger-kind", "database-trigger-removed", "webhook-trigger-single", "webhook-trigger-table", "webhook-trigger-keys", "webhook-trigger-scheme-required", "webhook-trigger-scheme-none", "webhook-trigger-number", "webhook-trigger-dedup-boolean", "webhook-trigger-verification-table", "cron-trigger-cap", "cron-trigger-entry", "cron-trigger-keys", "cron-trigger-name-required", "cron-trigger-name-charset", "cron-trigger-duplicate", "cron-trigger-expression-required", "cron-trigger-overlap-policy"];
|
|
2097
|
+
export declare const TRIGGER_RULE_IDS: readonly ["triggers-table", "trigger-kind", "database-trigger-removed", "webhook-trigger-single", "webhook-trigger-table", "webhook-trigger-keys", "webhook-trigger-scheme-required", "webhook-trigger-scheme-none", "webhook-trigger-number", "webhook-trigger-dedup-boolean", "webhook-trigger-verification-table", "webhook-trigger-handshake-rules", "webhook-trigger-ip-allowlist", "cron-trigger-cap", "cron-trigger-entry", "cron-trigger-keys", "cron-trigger-name-required", "cron-trigger-name-charset", "cron-trigger-duplicate", "cron-trigger-expression-required", "cron-trigger-overlap-policy", "db3-trigger-cap", "db3-trigger-entry", "db3-trigger-keys", "db3-trigger-type-required", "db3-trigger-type-reserved", "db3-trigger-duplicate"];
|
|
1714
2098
|
export type TriggerRuleId = (typeof TRIGGER_RULE_IDS)[number];
|
|
1715
2099
|
/**
|
|
1716
2100
|
* A broken trigger rule. `ruleId` names which one, for a reader that wants to
|
|
@@ -1751,6 +2135,18 @@ export declare function storedDatabaseTriggerTypes(stored: unknown): string[];
|
|
|
1751
2135
|
export declare function cronTriggerKeyFor(functionKey: string, name: string): string;
|
|
1752
2136
|
/** The entry name a `<functionKey>:<name>` trigger key carries. */
|
|
1753
2137
|
export declare function cronTriggerNameFrom(functionKey: string, triggerKey: string): string;
|
|
2138
|
+
/**
|
|
2139
|
+
* The `ServerFunctionTrigger.triggerKey` a db3 entry owns (#4803):
|
|
2140
|
+
* `<functionKey>:db3:<type>`. A cron name cannot hold `:`, so the key never
|
|
2141
|
+
* collides with a cron entry's `<functionKey>:<name>`.
|
|
2142
|
+
*/
|
|
2143
|
+
export declare function db3TriggerKeyFor(functionKey: string, type: string): string;
|
|
2144
|
+
/**
|
|
2145
|
+
* The type a db3 trigger key carries, or null when the key is not this
|
|
2146
|
+
* function's db3 key. Read by stripping the prefix, never by splitting: a type
|
|
2147
|
+
* name may hold `:` and `/`.
|
|
2148
|
+
*/
|
|
2149
|
+
export declare function db3TriggerTypeFrom(functionKey: string, triggerKey: string): string | null;
|
|
1754
2150
|
/**
|
|
1755
2151
|
* The `{{secrets.KEY}}` reference SHAPE, decided from the value alone.
|
|
1756
2152
|
*
|
|
@@ -1953,78 +2349,6 @@ export declare function validateSigningSecretDeclaration(input: {
|
|
|
1953
2349
|
verificationScheme: string;
|
|
1954
2350
|
signingSecret?: unknown;
|
|
1955
2351
|
}): SigningSecretRuleError | null;
|
|
1956
|
-
/**
|
|
1957
|
-
* The workflow rules two runners share (#3374, project `cli-server-rule-parity`
|
|
1958
|
-
* phase 2; intent §Success criteria 3).
|
|
1959
|
-
*
|
|
1960
|
-
* ── One predicate, two messages ──────────────────────────────────────────
|
|
1961
|
-
*
|
|
1962
|
-
* `runAs = "system"` beside a non-empty `accessRule` is dead config: a system
|
|
1963
|
-
* run can only be started by the system and never evaluates its access rule
|
|
1964
|
-
* (#1258, broadening #1172). The server refused it at save time
|
|
1965
|
-
* (`validateWorkflowIdentityConfig`) and the CLI refused it in the push
|
|
1966
|
-
* preflight (`validateWorkflowIdentity`), and the two carried the conjunction
|
|
1967
|
-
* byte-for-byte as separate copies kept in step by a comment. This module is
|
|
1968
|
-
* the one copy: it decides, and returns a STRUCTURED violation — the rule id
|
|
1969
|
-
* and the server's sentence — that each site renders in its own words. The
|
|
1970
|
-
* server pushes the sentence into its `string[]`; the CLI keeps its own hint,
|
|
1971
|
-
* which names the preflight remedy. Neither message changed.
|
|
1972
|
-
*
|
|
1973
|
-
* ── Why a `*-rules.ts` module ────────────────────────────────────────────
|
|
1974
|
-
*
|
|
1975
|
-
* The registry's unclaimed-export check (`findUnclaimedRuleModuleExports`)
|
|
1976
|
-
* keys on this name under `src/config-surface/`: every exported function here
|
|
1977
|
-
* is a rule, so one no surface declares fails `cli-unit-tests`. Shared
|
|
1978
|
-
* predicates that are not rules live elsewhere (`webhook-signing-secret.ts`).
|
|
1979
|
-
* The module is vendored into the CLI artifact like the rest of the
|
|
1980
|
-
* directory, which is what lets `workflow`'s declaration call the rule
|
|
1981
|
-
* `preflight`.
|
|
1982
|
-
*/
|
|
1983
|
-
/** The rule ids this module owns — the union type below anchors them (#3373). */
|
|
1984
|
-
export declare const WORKFLOW_RULE_IDS: readonly ["system-access-rule", "retired-database-step-kind"];
|
|
1985
|
-
type WorkflowRuleId = (typeof WORKFLOW_RULE_IDS)[number];
|
|
1986
|
-
/** A violation of one of this module's rules, for a site to render. */
|
|
1987
|
-
export interface WorkflowRuleViolation extends RuleRefusal<WorkflowRuleId> {
|
|
1988
|
-
}
|
|
1989
|
-
/**
|
|
1990
|
-
* `runAs = "system"` with a non-empty string `accessRule`, or null.
|
|
1991
|
-
*
|
|
1992
|
-
* Exactly the conjunction both sites carried: a default, unset, empty or
|
|
1993
|
-
* whitespace-only rule is no rule, and a non-string one (`accessRule = false`)
|
|
1994
|
-
* is malformed input for another check to name, not dead config. The message
|
|
1995
|
-
* is the server's save-time sentence; the CLI renders its own hint from the
|
|
1996
|
-
* same answer.
|
|
1997
|
-
*/
|
|
1998
|
-
export declare function checkWorkflowSystemAccessRule(input: {
|
|
1999
|
-
runAs?: unknown;
|
|
2000
|
-
accessRule?: unknown;
|
|
2001
|
-
}): WorkflowRuleViolation | null;
|
|
2002
|
-
/**
|
|
2003
|
-
* The DSL step kinds that executed a registered database operation (#3189,
|
|
2004
|
-
* phase 6 of project `server-functions`, matrix row M8).
|
|
2005
|
-
*
|
|
2006
|
-
* Every `database.*` runner except `database.syncIndexes` called
|
|
2007
|
-
* `DatabaseOperationsController.execute`, so retiring database operations
|
|
2008
|
-
* retires these fourteen kinds with them: the seven base kinds and their seven
|
|
2009
|
-
* `*ForUser` twins. `database.syncIndexes` (which calls the records index
|
|
2010
|
-
* route), `database.create` and `database.delete` (resource lifecycle) are not
|
|
2011
|
-
* here and keep running until the engine retires.
|
|
2012
|
-
*/
|
|
2013
|
-
export declare const RETIRED_DATABASE_STEP_KINDS: readonly ["database.query", "database.mutate", "database.count", "database.aggregate", "database.pipeline", "database.applyToQuery", "database.batch", "database.queryForUser", "database.mutateForUser", "database.countForUser", "database.aggregateForUser", "database.pipelineForUser", "database.applyToQueryForUser", "database.batchForUser"];
|
|
2014
|
-
/**
|
|
2015
|
-
* Every step in a definition — or the one step a run has reached — whose kind
|
|
2016
|
-
* is a retired database kind, with the sentence naming the replacement.
|
|
2017
|
-
*
|
|
2018
|
-
* Walks the top-level `steps` and a `collect` step's nested `step`, the one
|
|
2019
|
-
* place a step definition nests another. Push (the CLI preflight), save, the
|
|
2020
|
-
* activation lint and the engine all ask this one question, so a definition is
|
|
2021
|
-
* refused by the same words wherever it is caught, and a run that reaches such
|
|
2022
|
-
* a step fails with them.
|
|
2023
|
-
*/
|
|
2024
|
-
export declare function checkWorkflowRetiredStepKinds(input: {
|
|
2025
|
-
steps?: unknown;
|
|
2026
|
-
}): WorkflowRuleViolation[];
|
|
2027
|
-
export declare const WORKFLOW_SURFACE: ConfigObjectSurface;
|
|
2028
2352
|
/**
|
|
2029
2353
|
* Cron-expression and timezone VALIDITY — the half of `src/cron-parser.ts`
|
|
2030
2354
|
* both runners need (#3376, project `cli-server-rule-parity` phase 4).
|
|
@@ -2136,15 +2460,6 @@ export declare function isValidTimezone(name: unknown): boolean;
|
|
|
2136
2460
|
* pins. So the grammar and the `Intl` probe live next door in
|
|
2137
2461
|
* `cron-expression.ts`, which is a shared-predicate module rather than a rules
|
|
2138
2462
|
* module, and this one only decides and renders.
|
|
2139
|
-
*
|
|
2140
|
-
* ── What is NOT shared ───────────────────────────────────────────────────
|
|
2141
|
-
*
|
|
2142
|
-
* The standalone cron routes ask the same two predicates and render their own
|
|
2143
|
-
* `Invalid cron expression: …` / `Invalid timezone: …`, with their own
|
|
2144
|
-
* defaulting (create reads an absent timezone as UTC, update does not). That
|
|
2145
|
-
* is intent assumption 2 in the form its own fallback describes, and the shape
|
|
2146
|
-
* `workflow-rules.ts` set in phase 2: one predicate, each site's message and
|
|
2147
|
-
* defaulting preserved. No refusal message changed anywhere.
|
|
2148
2463
|
*/
|
|
2149
2464
|
/** The rule ids this module owns — the union type below anchors them (#3373). */
|
|
2150
2465
|
export declare const CRON_TRIGGER_RULE_IDS: readonly ["cron-trigger-expression", "cron-trigger-timezone"];
|
|
@@ -2164,6 +2479,62 @@ export declare function checkCronTriggerEntry(entry: {
|
|
|
2164
2479
|
cron: string;
|
|
2165
2480
|
timezone?: string;
|
|
2166
2481
|
}): CronTriggerRuleRefusal | null;
|
|
2482
|
+
/**
|
|
2483
|
+
* App-secret names the platform reserves — #5845, project `public-access`
|
|
2484
|
+
* phase 4 (intent criterion 9).
|
|
2485
|
+
*
|
|
2486
|
+
* `PRIMITIVE_TURNSTILE_SECRET` holds an app's Turnstile secret, which the
|
|
2487
|
+
* signed-out door reads to verify a `turnstile` function's token. An app sets,
|
|
2488
|
+
* replaces and deletes it like any other secret, but no new function
|
|
2489
|
+
* capability, CEL manifest, integration template, webhook trigger or Google
|
|
2490
|
+
* client may reference it, so its value never reaches a function, a rule or a
|
|
2491
|
+
* third party.
|
|
2492
|
+
*
|
|
2493
|
+
* "New" is judged against the stored value a write replaces: a write is
|
|
2494
|
+
* refused when what it submits names a reserved secret and what it replaces
|
|
2495
|
+
* does not. A reference stored before the reservation keeps working, and an
|
|
2496
|
+
* unchanged re-push or re-save answers as before.
|
|
2497
|
+
*
|
|
2498
|
+
* Pure by construction (no models, no `env`), like the rest of
|
|
2499
|
+
* `src/config-surface/`.
|
|
2500
|
+
*/
|
|
2501
|
+
/** The reserved app-secret names. */
|
|
2502
|
+
export declare const RESERVED_APP_SECRETS: readonly string[];
|
|
2503
|
+
/** The code every refusal of a new reserved reference answers. */
|
|
2504
|
+
export declare const RESERVED_SECRET_REFERENCE_CODE = "RESERVED_SECRET_REFERENCE";
|
|
2505
|
+
/** A refusal of a new reserved reference. */
|
|
2506
|
+
export interface ReservedSecretRefusal {
|
|
2507
|
+
code: typeof RESERVED_SECRET_REFERENCE_CODE;
|
|
2508
|
+
message: string;
|
|
2509
|
+
}
|
|
2510
|
+
/**
|
|
2511
|
+
* Whether `key` is a reserved app-secret name.
|
|
2512
|
+
*
|
|
2513
|
+
* @param key A secret key.
|
|
2514
|
+
* @returns True for `PRIMITIVE_TURNSTILE_SECRET`.
|
|
2515
|
+
*/
|
|
2516
|
+
export declare function isReservedAppSecret(key: string): boolean;
|
|
2517
|
+
/**
|
|
2518
|
+
* Refuse a write whose submitted value newly references a reserved secret.
|
|
2519
|
+
*
|
|
2520
|
+
* @param input The secret keys the submitted value names, the keys the stored value it replaces names, and what is written (for the message).
|
|
2521
|
+
* @returns The refusal, or null when every reserved key submitted is also stored.
|
|
2522
|
+
*/
|
|
2523
|
+
export declare function reservedSecretRefusal(input: {
|
|
2524
|
+
submittedKeys: Iterable<string>;
|
|
2525
|
+
storedKeys: Iterable<string>;
|
|
2526
|
+
what: string;
|
|
2527
|
+
}): ReservedSecretRefusal | null;
|
|
2528
|
+
/** The `secrets` a CEL manifest declares; empty for anything else. */
|
|
2529
|
+
export declare function manifestSecretKeys(manifest: unknown): string[];
|
|
2530
|
+
/**
|
|
2531
|
+
* Refuse a CEL manifest whose `secrets` newly list a reserved name.
|
|
2532
|
+
*
|
|
2533
|
+
* @param submitted The manifest the write carries (an object or its JSON).
|
|
2534
|
+
* @param stored The manifest it replaces (an object, its JSON, or null for none).
|
|
2535
|
+
* @returns The refusal, or null.
|
|
2536
|
+
*/
|
|
2537
|
+
export declare function manifestReservedSecretRefusal(submitted: unknown, stored: unknown): ReservedSecretRefusal | null;
|
|
2167
2538
|
/**
|
|
2168
2539
|
* The prompt config's reasoning controls, resolved onto each provider's own
|
|
2169
2540
|
* spelling — issue #3358.
|
|
@@ -2839,11 +3210,9 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
|
|
|
2839
3210
|
*
|
|
2840
3211
|
* A tool or event schema reaches a provider only through a translation that
|
|
2841
3212
|
* preserves its meaning; anything else is refused at push, naming the path, the
|
|
2842
|
-
* keyword and the provider.
|
|
2843
|
-
* (
|
|
2844
|
-
* references and
|
|
2845
|
-
* what the model may produce. It stays where it is, for chat output schemas
|
|
2846
|
-
* (the project's non-goal: chat is unchanged).
|
|
3213
|
+
* keyword and the provider. A chat prompt's output schema goes to Gemini
|
|
3214
|
+
* through this translator too (#5538), in place of the lossy clean-up that
|
|
3215
|
+
* dropped unions and references and rewrote a free-form object as a string.
|
|
2847
3216
|
*
|
|
2848
3217
|
* ## What "lossless" means (spec §3)
|
|
2849
3218
|
*
|
|
@@ -2862,7 +3231,7 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
|
|
|
2862
3231
|
* the structured error the model sees, and a model following `properties` is
|
|
2863
3232
|
* never told it may add keys. Refusing it instead would put the platform's own
|
|
2864
3233
|
* closed-object marker — `additionalProperties: false` is how
|
|
2865
|
-
* `src/
|
|
3234
|
+
* `src/function-runs/schema-descriptor.ts` spells a closed object — outside
|
|
2866
3235
|
* Gemini's reach.
|
|
2867
3236
|
*
|
|
2868
3237
|
* The TRANSLATED schema is what the provider is sent; the ORIGINAL is what the
|
|
@@ -2884,9 +3253,14 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
|
|
|
2884
3253
|
* `items`. Lowercase type names are accepted (the existing `responseSchema`
|
|
2885
3254
|
* path already sends them).
|
|
2886
3255
|
*
|
|
2887
|
-
*
|
|
2888
|
-
*
|
|
2889
|
-
*
|
|
3256
|
+
* Which keywords pass, drop, take a rule or are refused is the keyword table's
|
|
3257
|
+
* `gemini` column (`SCHEMA_KEYWORDS` in `src/function-runs/schema-descriptor.ts`,
|
|
3258
|
+
* #5529), so the translator, the validator and the push refusal list read one
|
|
3259
|
+
* classification. That module is dependency-free and vendored to the CLI whole,
|
|
3260
|
+
* so this one stays pure: the CLI artifact generator rewrites its import to the
|
|
3261
|
+
* vendored copy. This module is vendored into the CLI artifact after
|
|
3262
|
+
* `agent-declaration.ts` so the push preflight and the admin routes refuse
|
|
3263
|
+
* exactly the same schemas.
|
|
2890
3264
|
*/
|
|
2891
3265
|
/** The providers a prompt config may name. */
|
|
2892
3266
|
export type SchemaProvider = "openrouter" | "gemini";
|
|
@@ -2909,6 +3283,27 @@ export type SchemaTranslation = {
|
|
|
2909
3283
|
ok: false;
|
|
2910
3284
|
refusals: SchemaTranslationRefusal[];
|
|
2911
3285
|
};
|
|
3286
|
+
/**
|
|
3287
|
+
* What Gemini's function `Schema` does with one keyword, from the keyword
|
|
3288
|
+
* table: `pass` (spelled the same way, with the same meaning — `required`
|
|
3289
|
+
* among them, and Gemini's own `nullable`, `propertyOrdering` and `example`),
|
|
3290
|
+
* `drop` (an annotation with no value meaning, dropped in silence, spec §3),
|
|
3291
|
+
* `rule` (handled by its own rule below) or `refuse`. A key the table does not
|
|
3292
|
+
* name is refused: a keyword nobody classified could mean anything.
|
|
3293
|
+
*/
|
|
3294
|
+
export declare function geminiKeywordVerdict(keyword: string): GeminiKeywordVerdict;
|
|
3295
|
+
/**
|
|
3296
|
+
* Keywords handled by their own rule below: exactly the table's `rule` rows,
|
|
3297
|
+
* which the keyword-table conformance test holds it to.
|
|
3298
|
+
*/
|
|
3299
|
+
export declare const GEMINI_STRUCTURAL_KEYWORDS: readonly ["type", "enum", "const", "format", "properties", "items", "anyOf", "oneOf", "additionalProperties"];
|
|
3300
|
+
/**
|
|
3301
|
+
* Why Gemini's function `Schema` cannot carry a refused keyword, for the ones
|
|
3302
|
+
* with a reason of their own. Each is refused rather than dropped: dropping any
|
|
3303
|
+
* of them widens what the model may produce. A refused keyword with no entry
|
|
3304
|
+
* here gets the generic reason.
|
|
3305
|
+
*/
|
|
3306
|
+
export declare const GEMINI_REFUSAL_REASONS: Readonly<Record<string, string>>;
|
|
2912
3307
|
/** What a message calls the root. */
|
|
2913
3308
|
export declare function schemaPathLabel(path: string): string;
|
|
2914
3309
|
/**
|
|
@@ -2988,6 +3383,143 @@ export type AgentSchemaDeficit = {
|
|
|
2988
3383
|
export declare function agentSchemaTranslationDeficits(input: AgentSchemaTranslationInput): AgentSchemaDeficit[];
|
|
2989
3384
|
/** The `AGENT_SCHEMA_NOT_TRANSLATABLE` refusal one deficit renders as. */
|
|
2990
3385
|
export declare function agentSchemaDeficitRefusal(deficit: AgentSchemaDeficit): AgentRefusal;
|
|
3386
|
+
/**
|
|
3387
|
+
* What a prompt push refuses — #5536 (project `unified-schemas` phase 5)
|
|
3388
|
+
* reported it, #5538 (phase 6, intent criterion 8) refuses it.
|
|
3389
|
+
*
|
|
3390
|
+
* Two checks judge a prompt's schemas: the lossless Gemini translator
|
|
3391
|
+
* (`translateSchemaForProvider`) on the output schemas a Gemini config sends,
|
|
3392
|
+
* and the engine (the function push's rules) on every schema. A write
|
|
3393
|
+
* carrying a keyword either would refuse is refused, each keyword named with
|
|
3394
|
+
* its fix and a code: `PROMPT_SCHEMA_NOT_TRANSLATABLE` for the translator,
|
|
3395
|
+
* `PROMPT_SCHEMA_UNSUPPORTED_KEYWORD` for the engine. The admin prompt routes,
|
|
3396
|
+
* the CLI preflight (through the vendored copy), the Gemini call path and the
|
|
3397
|
+
* audit (`scripts/lib/schema-audit-core.ts`) all read this module, so they
|
|
3398
|
+
* cannot disagree about which schemas are refused.
|
|
3399
|
+
*
|
|
3400
|
+
* An agent's translator refusals are not here: they are already the push
|
|
3401
|
+
* error `AGENT_SCHEMA_NOT_TRANSLATABLE` (DSO-5536-002).
|
|
3402
|
+
*/
|
|
3403
|
+
/**
|
|
3404
|
+
* The code a prompt write is refused with for a keyword the lossless Gemini
|
|
3405
|
+
* translator cannot carry, and the code a run of a stored prompt whose output
|
|
3406
|
+
* schema it cannot carry fails with.
|
|
3407
|
+
*/
|
|
3408
|
+
export declare const PROMPT_SCHEMA_NOT_TRANSLATABLE = "PROMPT_SCHEMA_NOT_TRANSLATABLE";
|
|
3409
|
+
/** The code a prompt write is refused with for a keyword or a shape the schema check would not enforce. */
|
|
3410
|
+
export declare const PROMPT_SCHEMA_UNSUPPORTED_KEYWORD = "PROMPT_SCHEMA_UNSUPPORTED_KEYWORD";
|
|
3411
|
+
/** One keyword the engine would not enforce: where, which, and why (with its fix). */
|
|
3412
|
+
export interface EngineSchemaRefusal {
|
|
3413
|
+
/** The dotted path from the schema root; `""` is the root. */
|
|
3414
|
+
path: string;
|
|
3415
|
+
keyword: string;
|
|
3416
|
+
reason: string;
|
|
3417
|
+
}
|
|
3418
|
+
/**
|
|
3419
|
+
* The fix for each keyword the engine refuses: one entry per refused row of
|
|
3420
|
+
* the keyword table, and no other key.
|
|
3421
|
+
*/
|
|
3422
|
+
export declare const ENGINE_REFUSAL_FIXES: Readonly<Record<string, string>>;
|
|
3423
|
+
/**
|
|
3424
|
+
* The fix for a translator refusal whose reason states only what would be
|
|
3425
|
+
* lost, appended to the refusal line (DSO-5536-008: the translator's own
|
|
3426
|
+
* texts are refusal texts elsewhere and stay as they are). `"*"` is the fix
|
|
3427
|
+
* for a keyword the translator has no reason of its own for.
|
|
3428
|
+
*/
|
|
3429
|
+
export declare const TRANSLATOR_REFUSAL_FIXES: Readonly<Record<string, string>>;
|
|
3430
|
+
/**
|
|
3431
|
+
* Every keyword of `schema` the function push's rules refuse, over the nodes
|
|
3432
|
+
* they check (the root, `properties`, `items`, `anyOf`, `oneOf`; never
|
|
3433
|
+
* `$defs`): the keyword table's refused class, each reason ending with its
|
|
3434
|
+
* fix, and the shape rules. An enforced constraint (`uniqueItems`,
|
|
3435
|
+
* `multipleOf`, …) is never one: only the translator refuses those.
|
|
3436
|
+
*
|
|
3437
|
+
* The walk keeps its own work stack rather than recursing: the compiler
|
|
3438
|
+
* accepts a schema nested deeper than the call stack, and every refusal must
|
|
3439
|
+
* still be named for it.
|
|
3440
|
+
*/
|
|
3441
|
+
export declare function engineSchemaRefusals(schema: unknown, path?: string): EngineSchemaRefusal[];
|
|
3442
|
+
/**
|
|
3443
|
+
* The schemas an agent's model reads from its declaration (a table or one
|
|
3444
|
+
* JSON string): each client tool's `inputSchema` and `outputSchema`, each
|
|
3445
|
+
* event's `schema` and the turn context's. Never a server tool's: those are
|
|
3446
|
+
* its function's, judged at the function push.
|
|
3447
|
+
*/
|
|
3448
|
+
export declare function agentDeclarationSchemas(agent: unknown): Array<{
|
|
3449
|
+
subject: string;
|
|
3450
|
+
schema: unknown;
|
|
3451
|
+
}>;
|
|
3452
|
+
/** What `promptSchemaDeficits` judges: the schema fields a write carries, and the prompt's configs. */
|
|
3453
|
+
export interface PromptSchemaDeficitInput {
|
|
3454
|
+
inputSchema?: unknown;
|
|
3455
|
+
outputSchema?: unknown;
|
|
3456
|
+
/** `[prompt.agent]`: a table or one JSON string. */
|
|
3457
|
+
agent?: unknown;
|
|
3458
|
+
/** The configs that decide whether `outputSchema` targets Gemini; each config's own `outputSchema` is judged too. */
|
|
3459
|
+
configs?: ReadonlyArray<{
|
|
3460
|
+
name: string;
|
|
3461
|
+
provider: string;
|
|
3462
|
+
status?: string | null;
|
|
3463
|
+
outputSchema?: unknown;
|
|
3464
|
+
}>;
|
|
3465
|
+
}
|
|
3466
|
+
/** One keyword the translator or the engine would refuse, in one schema of a prompt. */
|
|
3467
|
+
export interface PromptSchemaDeficit {
|
|
3468
|
+
/** `inputSchema`, `outputSchema`, `config "fast" outputSchema`, `agent tool "pick" inputSchema`, … */
|
|
3469
|
+
subject: string;
|
|
3470
|
+
field: "inputSchema" | "outputSchema" | "agent";
|
|
3471
|
+
/** The config whose own `outputSchema` this is. */
|
|
3472
|
+
config?: string;
|
|
3473
|
+
check: "translator" | "engine";
|
|
3474
|
+
provider?: "gemini";
|
|
3475
|
+
/** The dotted path from the schema root; `""` is the root. */
|
|
3476
|
+
path: string;
|
|
3477
|
+
keyword: string;
|
|
3478
|
+
reason: string;
|
|
3479
|
+
}
|
|
3480
|
+
/**
|
|
3481
|
+
* `translateSchemaForProvider(schema, "gemini")`, failing closed. The
|
|
3482
|
+
* translator recurses, so a schema nested deeper than the call stack cannot be
|
|
3483
|
+
* translated: it is one refusal about the whole document (`(schema)`, the
|
|
3484
|
+
* engine's spelling), so a schema Gemini would never be sent is refused at
|
|
3485
|
+
* push and at call time rather than accepted unread. Any other error is a
|
|
3486
|
+
* fault and propagates.
|
|
3487
|
+
*/
|
|
3488
|
+
export declare function translateSchemaForGemini(schema: unknown): SchemaTranslation;
|
|
3489
|
+
/** The translator's refusals for one schema: `translateSchemaForGemini`'s, or none. */
|
|
3490
|
+
export declare function translatorRefusals(schema: unknown): SchemaTranslationRefusal[];
|
|
3491
|
+
/**
|
|
3492
|
+
* Every keyword of a prompt's schemas the translator or the engine would
|
|
3493
|
+
* refuse. The translator judges `outputSchema` when a non-archived config
|
|
3494
|
+
* names Gemini (case-insensitive), and each Gemini config's own
|
|
3495
|
+
* `outputSchema` unless that config is archived; `inputSchema` is never
|
|
3496
|
+
* translated, and an agent's schemas are judged by the engine only. Order:
|
|
3497
|
+
* `inputSchema`, `outputSchema`, the agent's schemas, then each config; per
|
|
3498
|
+
* schema the translator first. A top-level value that is no schema object
|
|
3499
|
+
* is reported once, by the engine.
|
|
3500
|
+
*/
|
|
3501
|
+
export declare function promptSchemaDeficits(input: PromptSchemaDeficitInput): PromptSchemaDeficit[];
|
|
3502
|
+
/**
|
|
3503
|
+
* The refusal line for one deficit: the subject, the path, the keyword, why,
|
|
3504
|
+
* and the fix. A translator reason with no fix of its own names what Gemini
|
|
3505
|
+
* needs instead (`properties`, `type`, the overflow's "flatten the schema").
|
|
3506
|
+
*/
|
|
3507
|
+
export declare function promptSchemaRefusalLine(deficit: PromptSchemaDeficit): string;
|
|
3508
|
+
/** The code a write is refused with for one deficit. */
|
|
3509
|
+
export declare function promptSchemaDeficitCode(deficit: PromptSchemaDeficit): typeof PROMPT_SCHEMA_NOT_TRANSLATABLE | typeof PROMPT_SCHEMA_UNSUPPORTED_KEYWORD;
|
|
3510
|
+
/** One entry of a refused write's `details.refusals`. */
|
|
3511
|
+
export interface PromptSchemaRefusalEntry {
|
|
3512
|
+
code: typeof PROMPT_SCHEMA_NOT_TRANSLATABLE | typeof PROMPT_SCHEMA_UNSUPPORTED_KEYWORD;
|
|
3513
|
+
/** `promptSchemaRefusalLine` of the deficit. */
|
|
3514
|
+
message: string;
|
|
3515
|
+
subject: string;
|
|
3516
|
+
field: PromptSchemaDeficit["field"];
|
|
3517
|
+
config?: string;
|
|
3518
|
+
path: string;
|
|
3519
|
+
keyword: string;
|
|
3520
|
+
}
|
|
3521
|
+
/** A refused write's `details.refusals`: one entry per deficit, in `promptSchemaDeficits` order. */
|
|
3522
|
+
export declare function promptSchemaRefusals(deficits: readonly PromptSchemaDeficit[]): PromptSchemaRefusalEntry[];
|
|
2991
3523
|
/**
|
|
2992
3524
|
* A change to a server function that an agent uses — issue #4441.
|
|
2993
3525
|
*
|
|
@@ -3162,8 +3694,6 @@ export type AgentTestCaseResolution = {
|
|
|
3162
3694
|
export declare function resolveAgentTestCase(input: AgentTestCaseInput): AgentTestCaseResolution;
|
|
3163
3695
|
export declare const PROMPT_SURFACE: ConfigObjectSurface;
|
|
3164
3696
|
export declare const INTEGRATION_SURFACE: ConfigObjectSurface;
|
|
3165
|
-
export declare const WEBHOOK_SURFACE: ConfigObjectSurface;
|
|
3166
|
-
export declare const CRON_TRIGGER_SURFACE: ConfigObjectSurface;
|
|
3167
3697
|
export declare const BLOB_BUCKET_SURFACE: ConfigObjectSurface;
|
|
3168
3698
|
/**
|
|
3169
3699
|
* The `email-template` configuration object's definition (issue #2644, phase 2).
|
|
@@ -3205,30 +3735,163 @@ export declare function isRetiredEmailType(emailType: string): emailType is Reti
|
|
|
3205
3735
|
export declare function retiredEmailTypeGuidance(emailType: string): string;
|
|
3206
3736
|
export declare const EMAIL_TEMPLATE_SURFACE: ConfigObjectSurface;
|
|
3207
3737
|
export declare const DATABASE_TYPE_SURFACE: ConfigObjectSurface;
|
|
3738
|
+
export declare const DB3_TYPE_SURFACE: ConfigObjectSurface;
|
|
3739
|
+
/** A retired rule-set resource type: the code and sentence a refusal carries. */
|
|
3740
|
+
export interface RetiredRuleSetResourceType {
|
|
3741
|
+
code: string;
|
|
3742
|
+
message: string;
|
|
3743
|
+
}
|
|
3744
|
+
/**
|
|
3745
|
+
* Rule-set resource types that no longer exist (#4959), with the one refusal
|
|
3746
|
+
* both the rule-set routes and `config push`'s preflight answer for a set of
|
|
3747
|
+
* that type, so the two cannot drift.
|
|
3748
|
+
*
|
|
3749
|
+
* `lock` — locks are server-function-only, and the calling function's
|
|
3750
|
+
* `authorize` decides who may lock which key. A stored row can still be listed
|
|
3751
|
+
* and deleted; nothing evaluates it.
|
|
3752
|
+
*/
|
|
3753
|
+
export declare const RETIRED_RULE_SET_RESOURCE_TYPES: Record<string, RetiredRuleSetResourceType>;
|
|
3754
|
+
/** The retirement for `resourceType`, or `null` for a live type. */
|
|
3755
|
+
export declare function retiredRuleSetResourceType(resourceType: unknown): RetiredRuleSetResourceType | null;
|
|
3208
3756
|
export declare const RULE_SET_SURFACE: ConfigObjectSurface;
|
|
3209
|
-
export declare const GROUP_TYPE_CONFIG_SURFACE: ConfigObjectSurface;
|
|
3210
|
-
export declare const COLLECTION_TYPE_CONFIG_SURFACE: ConfigObjectSurface;
|
|
3211
3757
|
export declare const METADATA_CATEGORY_CONFIG_SURFACE: ConfigObjectSurface;
|
|
3758
|
+
export declare const SERVER_FUNCTION_SURFACE: ConfigObjectSurface;
|
|
3759
|
+
/**
|
|
3760
|
+
* The refusal of a new version whose default export has no `authorize`: it
|
|
3761
|
+
* names the function and shows the object form with the function's key. A
|
|
3762
|
+
* `file` prefixes the sentence the way the CLI reports a file it refuses.
|
|
3763
|
+
*/
|
|
3764
|
+
export declare function authorizeRequiredMessage(functionKey: string, file?: string): string;
|
|
3212
3765
|
/**
|
|
3213
|
-
* The
|
|
3766
|
+
* The refusal of a version that declares `public = true` and has no
|
|
3767
|
+
* `authorize` — #5840. `public = true` opens the function to signed-out
|
|
3768
|
+
* callers, and the version's own `authorize` is what decides about them.
|
|
3769
|
+
*/
|
|
3770
|
+
export declare function publicRequiresAuthorizeMessage(functionKey: string, file?: string): string;
|
|
3771
|
+
/**
|
|
3772
|
+
* The refusal of a new version that defines `authorize` while its TOML still
|
|
3773
|
+
* carries `access`.
|
|
3774
|
+
*/
|
|
3775
|
+
export declare function accessAmbiguousMessage(functionKey: string): string;
|
|
3776
|
+
/** The refusal of a create or update body that carries `access`. */
|
|
3777
|
+
export declare const FUNCTION_ACCESS_FROZEN_REQUEST: string;
|
|
3778
|
+
export declare const TEST_CASE_SURFACE: ConfigObjectSurface;
|
|
3779
|
+
/**
|
|
3780
|
+
* The client version policy's rules (#6034, project `client-version-policy`).
|
|
3781
|
+
*
|
|
3782
|
+
* An app states, per platform, which versions of its own client are current,
|
|
3783
|
+
* recommended and required, in `[clients.<platform>]` tables of `app.toml`.
|
|
3784
|
+
* The whole map is ONE `App` field, `clientVersions`. This module decides what
|
|
3785
|
+
* that map may say, and is the one place that does: the server's
|
|
3786
|
+
* `PUT settings` calls `checkClientVersions` before it stores anything, and
|
|
3787
|
+
* the CLI's push preflight runs the same function through the vendored
|
|
3788
|
+
* artifact, so both refuse with the same sentence, in TOML spelling.
|
|
3214
3789
|
*
|
|
3215
|
-
*
|
|
3216
|
-
*
|
|
3217
|
-
*
|
|
3218
|
-
*
|
|
3219
|
-
* `Script` / `ScriptConfig` scalars around it (name, description, inputSchema,
|
|
3220
|
-
* limits, status) are not authorable through the sync slot today.
|
|
3790
|
+
* A single-field handler, not a rules module: the checks span the keys of one
|
|
3791
|
+
* field's value, so the file is not named `*-rules.ts` and exports no rule-id
|
|
3792
|
+
* list (the registry's rule ids are keyed by a surface's `crossFieldRules`).
|
|
3793
|
+
* Every refusal is still built through one constructor, `clientVersionsRefusal`.
|
|
3221
3794
|
*
|
|
3222
|
-
*
|
|
3223
|
-
*
|
|
3224
|
-
*
|
|
3225
|
-
*
|
|
3226
|
-
* exists to end.
|
|
3795
|
+
* Maps are read with own-property iteration only, so a platform named
|
|
3796
|
+
* `constructor` is an entry like any other.
|
|
3797
|
+
*
|
|
3798
|
+
* Pure: no models, no tenant context, no `env` (see `types.ts` §Purity).
|
|
3227
3799
|
*/
|
|
3228
|
-
|
|
3229
|
-
export declare const
|
|
3230
|
-
|
|
3800
|
+
/** The keys a `[clients.<platform>]` table may carry. */
|
|
3801
|
+
export declare const CLIENT_VERSION_ENTRY_KEYS: readonly ["latest", "minRecommended", "minRequired", "updateUrl"];
|
|
3802
|
+
/** One key of a `[clients.<platform>]` table. */
|
|
3803
|
+
export type ClientVersionEntryKey = (typeof CLIENT_VERSION_ENTRY_KEYS)[number];
|
|
3804
|
+
/** A legal platform name: a lowercase identifier of at most 32 characters. */
|
|
3805
|
+
export declare const CLIENT_PLATFORM_NAME_PATTERN: RegExp;
|
|
3806
|
+
/** A legal version: one to three dot-separated parts of one to six digits. */
|
|
3807
|
+
export declare const CLIENT_VERSION_PATTERN: RegExp;
|
|
3808
|
+
/** The schemes an `updateUrl` may use. */
|
|
3809
|
+
export declare const CLIENT_UPDATE_URL_SCHEMES: readonly string[];
|
|
3810
|
+
/** The most platforms one policy may declare. */
|
|
3811
|
+
export declare const MAX_CLIENT_PLATFORMS = 20;
|
|
3812
|
+
/** The longest `updateUrl` accepted, in characters. */
|
|
3813
|
+
export declare const MAX_CLIENT_UPDATE_URL_LENGTH = 2048;
|
|
3814
|
+
/** One platform's entry, as stored and served. */
|
|
3815
|
+
export interface ClientVersionsEntry {
|
|
3816
|
+
latest?: string;
|
|
3817
|
+
minRecommended?: string;
|
|
3818
|
+
minRequired?: string;
|
|
3819
|
+
updateUrl?: string;
|
|
3820
|
+
}
|
|
3821
|
+
/** The whole policy: platform name to entry. */
|
|
3822
|
+
export type ClientVersionsMap = Record<string, ClientVersionsEntry>;
|
|
3823
|
+
/** Why a policy was refused. */
|
|
3824
|
+
type ClientVersionsRefusalCode = "not-a-map" | "too-many-platforms" | "platform-name" | "entry-not-a-table" | "entry-empty" | "unknown-key" | "enforce-not-accepted" | "version-not-a-string" | "version-format" | "update-url" | "order";
|
|
3825
|
+
/** A refused policy: what was wrong and the sentence that says so. */
|
|
3826
|
+
export interface ClientVersionsRefusal {
|
|
3827
|
+
code: ClientVersionsRefusalCode;
|
|
3828
|
+
/** The TOML spelling of the table or key, `[clients.ios].latest`. */
|
|
3829
|
+
key: string;
|
|
3830
|
+
message: string;
|
|
3831
|
+
}
|
|
3832
|
+
/**
|
|
3833
|
+
* A version's numeric parts, padded to three with zeros, or null when the
|
|
3834
|
+
* value is not a legal version string.
|
|
3835
|
+
*/
|
|
3836
|
+
export declare function parseClientVersion(value: unknown): [number, number, number] | null;
|
|
3837
|
+
/**
|
|
3838
|
+
* Compare two legal versions numerically, missing parts zero: -1 when `a` is
|
|
3839
|
+
* lower, 0 when equal, 1 when higher. A value that is not a legal version
|
|
3840
|
+
* compares as `0.0.0`.
|
|
3841
|
+
*/
|
|
3842
|
+
export declare function compareClientVersions(a: string, b: string): -1 | 0 | 1;
|
|
3843
|
+
/**
|
|
3844
|
+
* The first refusal of a client version policy, or null when it may be
|
|
3845
|
+
* stored. `null` and an empty map are legal: they clear the policy.
|
|
3846
|
+
*/
|
|
3847
|
+
export declare function checkClientVersions(value: unknown): ClientVersionsRefusal | null;
|
|
3848
|
+
/** A stored minimum a policy change lowers or removes. */
|
|
3849
|
+
export interface LoweredClientMinimum {
|
|
3850
|
+
platform: string;
|
|
3851
|
+
key: "minRequired" | "minRecommended";
|
|
3852
|
+
from: string;
|
|
3853
|
+
/** The new value, or null when the key or its table is removed. */
|
|
3854
|
+
to: string | null;
|
|
3855
|
+
}
|
|
3856
|
+
/**
|
|
3857
|
+
* Every stored `minRequired` and `minRecommended` that `next` lowers
|
|
3858
|
+
* numerically, removes, or drops with its table — what `config push` asks the
|
|
3859
|
+
* developer to confirm. A stored value that is not a map reads as no policy.
|
|
3860
|
+
* Ordered by platform name, then `minRequired` before `minRecommended`.
|
|
3861
|
+
*/
|
|
3862
|
+
export declare function loweredClientMinimums(stored: unknown, next: unknown): LoweredClientMinimum[];
|
|
3231
3863
|
export declare const APP_SETTINGS_SURFACE: ConfigObjectSurface;
|
|
3864
|
+
/**
|
|
3865
|
+
* The `user-properties` configuration object's definition (#5385, project
|
|
3866
|
+
* `user-index-properties` phase 2).
|
|
3867
|
+
*
|
|
3868
|
+
* `user-properties.toml` is a root singleton beside `app.toml`, so — like
|
|
3869
|
+
* `app-settings` and `test-case` — it is named explicitly rather than reached
|
|
3870
|
+
* through `SYNC_RESOURCE_TYPES`. Its keys are the app's own: each
|
|
3871
|
+
* `[fields.<name>]` table declares a property in the db3 field grammar plus
|
|
3872
|
+
* `client`, and each `[[unique_constraints]]` entry names two or more of them.
|
|
3873
|
+
* There is no fixed key/value table to define, so the surface declares
|
|
3874
|
+
* `noFieldTable`; the file is parsed, normalized and judged by one module,
|
|
3875
|
+
* `src/user-index/properties-schema.ts`, which the CLI vendors byte for byte
|
|
3876
|
+
* (`cli/src/lib/user-properties/generated-properties-schema.ts`) and which
|
|
3877
|
+
* `config push`'s preflight runs before anything is applied. The pushed
|
|
3878
|
+
* schema is stored on the app's `UserPropertiesConfig` row.
|
|
3879
|
+
*/
|
|
3880
|
+
export declare const USER_PROPERTIES_SURFACE: ConfigObjectSurface;
|
|
3881
|
+
/**
|
|
3882
|
+
* The `schema` configuration object's definition (#5532, project
|
|
3883
|
+
* `unified-schemas` phase 3).
|
|
3884
|
+
*
|
|
3885
|
+
* `schemas/<file>.toml` holds shared shapes: each `[defs.<Name>]` table is
|
|
3886
|
+
* one JSON Schema document, named by the file's stem and the def's name
|
|
3887
|
+
* (`schemas:<file>#/$defs/<Name>`). There is no fixed key/value table to
|
|
3888
|
+
* define, so the surface declares `noFieldTable`; the file is checked and
|
|
3889
|
+
* compiled by one module, `src/function-runs/schema-file.ts`, which the CLI
|
|
3890
|
+
* vendors (`cli/src/lib/schema-codegen/generated-schema-file.ts`), runs in
|
|
3891
|
+
* `config push`'s preflight and sends compiled with the source, and which the
|
|
3892
|
+
* push route runs again.
|
|
3893
|
+
*/
|
|
3894
|
+
export declare const SCHEMA_FILE_SURFACE: ConfigObjectSurface;
|
|
3232
3895
|
/**
|
|
3233
3896
|
* The configuration-object registry (issue #2644).
|
|
3234
3897
|
*
|
|
@@ -3245,9 +3908,10 @@ export declare const APP_SETTINGS_SURFACE: ConfigObjectSurface;
|
|
|
3245
3908
|
/**
|
|
3246
3909
|
* Every configuration object whose field surface is defined here.
|
|
3247
3910
|
*
|
|
3248
|
-
* One entry per `SYNC_RESOURCE_TYPES` label, plus the
|
|
3249
|
-
* round-trip without being a per-entity file: `app-settings` (`app.toml`)
|
|
3250
|
-
* `
|
|
3911
|
+
* One entry per `SYNC_RESOURCE_TYPES` label, plus the three surfaces that
|
|
3912
|
+
* round-trip without being a per-entity file: `app-settings` (`app.toml`),
|
|
3913
|
+
* `user-properties` (`user-properties.toml`, #5385) and `test-case`
|
|
3914
|
+
* (`<key>.tests/`). Nothing that syncs sits outside the registry —
|
|
3251
3915
|
* `PENDING_MIGRATION`, the migration's temporary exemption list, is gone as of
|
|
3252
3916
|
* phase 3, so a new synced type has nowhere to be parked and fails the registry
|
|
3253
3917
|
* guard until it is defined (#2644 criterion 3).
|