primitive-admin 1.2.0-alpha.8 → 1.3.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +258 -186
- package/assets/skill/skills/primitive-platform/SKILL.md +103 -29
- package/dist/bin/primitive.js +15 -89
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/admins.js +80 -17
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/agent-sessions.d.ts +129 -0
- package/dist/src/commands/agent-sessions.js +532 -20
- package/dist/src/commands/agent-sessions.js.map +1 -1
- package/dist/src/commands/analytics.js +207 -155
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps-children.d.ts +1 -1
- package/dist/src/commands/apps-children.js +56 -145
- package/dist/src/commands/apps-children.js.map +1 -1
- package/dist/src/commands/apps-transitions.d.ts +39 -0
- package/dist/src/commands/apps-transitions.js +198 -0
- package/dist/src/commands/apps-transitions.js.map +1 -0
- package/dist/src/commands/apps.d.ts +17 -0
- package/dist/src/commands/apps.js +108 -3
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/auth-sessions.js +2 -0
- package/dist/src/commands/auth-sessions.js.map +1 -1
- package/dist/src/commands/auth.js +138 -44
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/blob-buckets.js +2 -0
- package/dist/src/commands/blob-buckets.js.map +1 -1
- package/dist/src/commands/collections.js +318 -256
- package/dist/src/commands/collections.js.map +1 -1
- package/dist/src/commands/comparisons.js +2 -0
- package/dist/src/commands/comparisons.js.map +1 -1
- package/dist/src/commands/config.d.ts +2 -2
- package/dist/src/commands/config.js +59 -33
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/connections.js +2 -0
- package/dist/src/commands/connections.js.map +1 -1
- package/dist/src/commands/database-type-configs.js +5 -3
- package/dist/src/commands/database-type-configs.js.map +1 -1
- package/dist/src/commands/database-types.js +13 -313
- package/dist/src/commands/database-types.js.map +1 -1
- package/dist/src/commands/databases.js +6 -4
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/db3-types.d.ts +15 -0
- package/dist/src/commands/db3-types.js +159 -0
- package/dist/src/commands/db3-types.js.map +1 -0
- package/dist/src/commands/db3.d.ts +24 -0
- package/dist/src/commands/db3.js +1444 -0
- package/dist/src/commands/db3.js.map +1 -0
- package/dist/src/commands/documents.d.ts +110 -10
- package/dist/src/commands/documents.js +1012 -748
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/email-templates.js +74 -0
- package/dist/src/commands/email-templates.js.map +1 -1
- package/dist/src/commands/env.js +8 -4
- package/dist/src/commands/env.js.map +1 -1
- package/dist/src/commands/function-trigger-commands.d.ts +28 -0
- package/dist/src/commands/function-trigger-commands.js +341 -0
- package/dist/src/commands/function-trigger-commands.js.map +1 -0
- package/dist/src/commands/functions.js +376 -30
- package/dist/src/commands/functions.js.map +1 -1
- package/dist/src/commands/groups.js +168 -50
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/guides.js +7 -5
- package/dist/src/commands/guides.js.map +1 -1
- package/dist/src/commands/hosting.d.ts +8 -0
- package/dist/src/commands/hosting.js +346 -0
- package/dist/src/commands/hosting.js.map +1 -0
- package/dist/src/commands/init.js +129 -38
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.js +82 -53
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/llm.js +9 -6
- package/dist/src/commands/llm.js.map +1 -1
- package/dist/src/commands/locks.d.ts +5 -3
- package/dist/src/commands/locks.js +19 -61
- package/dist/src/commands/locks.js.map +1 -1
- package/dist/src/commands/metadata-category-configs.d.ts +2 -2
- package/dist/src/commands/metadata-category-configs.js +4 -2
- package/dist/src/commands/metadata-category-configs.js.map +1 -1
- package/dist/src/commands/metadata.js +41 -0
- package/dist/src/commands/metadata.js.map +1 -1
- package/dist/src/commands/prompts.js +75 -52
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rate-counters.d.ts +19 -0
- package/dist/src/commands/rate-counters.js +104 -0
- package/dist/src/commands/rate-counters.js.map +1 -0
- package/dist/src/commands/rule-sets.d.ts +1 -1
- package/dist/src/commands/rule-sets.js +2 -1
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/schemas.d.ts +15 -0
- package/dist/src/commands/schemas.js +122 -0
- package/dist/src/commands/schemas.js.map +1 -0
- package/dist/src/commands/scripts.d.ts +9 -17
- package/dist/src/commands/scripts.js +24 -479
- package/dist/src/commands/scripts.js.map +1 -1
- package/dist/src/commands/secrets.js +47 -3
- package/dist/src/commands/secrets.js.map +1 -1
- package/dist/src/commands/sessions.js +2 -0
- package/dist/src/commands/sessions.js.map +1 -1
- package/dist/src/commands/settings.d.ts +12 -9
- package/dist/src/commands/settings.js +31 -79
- package/dist/src/commands/settings.js.map +1 -1
- package/dist/src/commands/skill.js +2 -0
- package/dist/src/commands/skill.js.map +1 -1
- package/dist/src/commands/sync-schemas.d.ts +202 -0
- package/dist/src/commands/sync-schemas.js +629 -0
- package/dist/src/commands/sync-schemas.js.map +1 -0
- package/dist/src/commands/sync-user-properties.d.ts +118 -0
- package/dist/src/commands/sync-user-properties.js +276 -0
- package/dist/src/commands/sync-user-properties.js.map +1 -0
- package/dist/src/commands/sync.d.ts +519 -554
- package/dist/src/commands/sync.js +3010 -4909
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/tokens.js +5 -3
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/commands/transitions.d.ts +54 -0
- package/dist/src/commands/transitions.js +418 -0
- package/dist/src/commands/transitions.js.map +1 -0
- package/dist/src/commands/usage.d.ts +18 -0
- package/dist/src/commands/usage.js +343 -0
- package/dist/src/commands/usage.js.map +1 -0
- package/dist/src/commands/user-properties.d.ts +14 -0
- package/dist/src/commands/user-properties.js +79 -0
- package/dist/src/commands/user-properties.js.map +1 -0
- package/dist/src/commands/users.js +911 -18
- package/dist/src/commands/users.js.map +1 -1
- package/dist/src/commands/vars.js +2 -0
- package/dist/src/commands/vars.js.map +1 -1
- package/dist/src/commands/waitlist.js +39 -4
- package/dist/src/commands/waitlist.js.map +1 -1
- package/dist/src/commands/workflows.d.ts +5 -83
- package/dist/src/commands/workflows.js +57 -2282
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/analytics-query.d.ts +58 -0
- package/dist/src/lib/analytics-query.js +134 -0
- package/dist/src/lib/analytics-query.js.map +1 -0
- package/dist/src/lib/api-client.d.ts +1830 -429
- package/dist/src/lib/api-client.js +1025 -546
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-settings-descriptor.d.ts +1 -1
- package/dist/src/lib/app-settings-descriptor.js +6 -0
- package/dist/src/lib/app-settings-descriptor.js.map +1 -1
- package/dist/src/lib/auth-fixtures.d.ts +44 -0
- package/dist/src/lib/auth-fixtures.js +61 -0
- package/dist/src/lib/auth-fixtures.js.map +1 -0
- package/dist/src/lib/auth-flow.d.ts +34 -1
- package/dist/src/lib/auth-flow.js +429 -13
- package/dist/src/lib/auth-flow.js.map +1 -1
- package/dist/src/lib/block-layout.d.ts +12 -23
- package/dist/src/lib/block-layout.js +26 -92
- package/dist/src/lib/block-layout.js.map +1 -1
- package/dist/src/lib/block-selector.d.ts +8 -14
- package/dist/src/lib/block-selector.js +8 -19
- package/dist/src/lib/block-selector.js.map +1 -1
- package/dist/src/lib/child-apps-local.d.ts +3 -47
- package/dist/src/lib/child-apps-local.js +11 -73
- package/dist/src/lib/child-apps-local.js.map +1 -1
- package/dist/src/lib/cli-manifest.d.ts +9 -0
- package/dist/src/lib/cli-manifest.js +10 -1
- package/dist/src/lib/cli-manifest.js.map +1 -1
- package/dist/src/lib/cli-version.d.ts +14 -0
- package/dist/src/lib/cli-version.js +38 -0
- package/dist/src/lib/cli-version.js.map +1 -0
- package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
- package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
- package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
- package/dist/src/lib/collection-export.d.ts +76 -15
- package/dist/src/lib/collection-export.js +116 -23
- package/dist/src/lib/collection-export.js.map +1 -1
- package/dist/src/lib/collection-principal.d.ts +22 -0
- package/dist/src/lib/collection-principal.js +35 -0
- package/dist/src/lib/collection-principal.js.map +1 -0
- package/dist/src/lib/command-groups.d.ts +30 -0
- package/dist/src/lib/command-groups.js +109 -0
- package/dist/src/lib/command-groups.js.map +1 -0
- package/dist/src/lib/command-status.d.ts +147 -0
- package/dist/src/lib/command-status.js +266 -0
- package/dist/src/lib/command-status.js.map +1 -0
- package/dist/src/lib/config-object-descriptor.d.ts +9 -22
- package/dist/src/lib/config-object-descriptor.js +107 -276
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/config-surface.d.ts +3 -7
- package/dist/src/lib/config-surface.js +9 -13
- package/dist/src/lib/config-surface.js.map +1 -1
- package/dist/src/lib/config-toml.d.ts +11 -2
- package/dist/src/lib/config-toml.js +25 -2
- package/dist/src/lib/config-toml.js.map +1 -1
- package/dist/src/lib/credentials-home.d.ts +7 -0
- package/dist/src/lib/credentials-home.js +45 -10
- package/dist/src/lib/credentials-home.js.map +1 -1
- package/dist/src/lib/credentials-lock.d.ts +14 -6
- package/dist/src/lib/credentials-lock.js +90 -10
- package/dist/src/lib/credentials-lock.js.map +1 -1
- package/dist/src/lib/credentials-store.d.ts +123 -70
- package/dist/src/lib/credentials-store.js +358 -113
- package/dist/src/lib/credentials-store.js.map +1 -1
- package/dist/src/lib/custodian.d.ts +8 -0
- package/dist/src/lib/custodian.js +18 -0
- package/dist/src/lib/custodian.js.map +1 -0
- package/dist/src/lib/data-input.d.ts +1 -1
- package/dist/src/lib/data-input.js +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
- package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
- package/dist/src/lib/db-codegen/dbTypeIR.d.ts +38 -1
- package/dist/src/lib/db-codegen/dbTypeIR.js +29 -7
- package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
- package/dist/src/lib/db-type-records.d.ts +106 -0
- package/dist/src/lib/db-type-records.js +224 -0
- package/dist/src/lib/db-type-records.js.map +1 -0
- package/dist/src/lib/db3-export.d.ts +287 -0
- package/dist/src/lib/db3-export.js +647 -0
- package/dist/src/lib/db3-export.js.map +1 -0
- package/dist/src/lib/db3-index-output.d.ts +116 -0
- package/dist/src/lib/db3-index-output.js +223 -0
- package/dist/src/lib/db3-index-output.js.map +1 -0
- package/dist/src/lib/db3-type-models.d.ts +134 -0
- package/dist/src/lib/db3-type-models.js +452 -0
- package/dist/src/lib/db3-type-models.js.map +1 -0
- package/dist/src/lib/deprecation.d.ts +2 -2
- package/dist/src/lib/deprecation.js +2 -2
- package/dist/src/lib/document-ingest-artifact.d.ts +13 -0
- package/dist/src/lib/document-ingest-artifact.js +36 -6
- package/dist/src/lib/document-ingest-artifact.js.map +1 -1
- package/dist/src/lib/document-ingest-format2.d.ts +36 -0
- package/dist/src/lib/document-ingest-format2.js +78 -0
- package/dist/src/lib/document-ingest-format2.js.map +1 -0
- package/dist/src/lib/document-ingest-input.d.ts +9 -0
- package/dist/src/lib/document-ingest-input.js +28 -1
- package/dist/src/lib/document-ingest-input.js.map +1 -1
- package/dist/src/lib/document-ingest.d.ts +11 -1
- package/dist/src/lib/document-ingest.js +16 -0
- package/dist/src/lib/document-ingest.js.map +1 -1
- package/dist/src/lib/document-schema-rows.d.ts +42 -0
- package/dist/src/lib/document-schema-rows.js +53 -0
- package/dist/src/lib/document-schema-rows.js.map +1 -0
- package/dist/src/lib/experimental-apis.d.ts +36 -0
- package/dist/src/lib/experimental-apis.js +46 -0
- package/dist/src/lib/experimental-apis.js.map +1 -0
- package/dist/src/lib/file-attachment.d.ts +24 -0
- package/dist/src/lib/file-attachment.js +31 -0
- package/dist/src/lib/file-attachment.js.map +1 -0
- package/dist/src/lib/function-authorize-check.d.ts +142 -0
- package/dist/src/lib/function-authorize-check.js +311 -0
- package/dist/src/lib/function-authorize-check.js.map +1 -0
- package/dist/src/lib/function-authorize-view.d.ts +27 -0
- package/dist/src/lib/function-authorize-view.js +88 -0
- package/dist/src/lib/function-authorize-view.js.map +1 -0
- package/dist/src/lib/function-bundle.d.ts +27 -5
- package/dist/src/lib/function-bundle.js +142 -7
- package/dist/src/lib/function-bundle.js.map +1 -1
- package/dist/src/lib/function-collect.d.ts +90 -12
- package/dist/src/lib/function-collect.js +482 -12
- package/dist/src/lib/function-collect.js.map +1 -1
- package/dist/src/lib/function-db-types.d.ts +65 -11
- package/dist/src/lib/function-db-types.js +297 -157
- package/dist/src/lib/function-db-types.js.map +1 -1
- package/dist/src/lib/function-document-types.d.ts +19 -7
- package/dist/src/lib/function-document-types.js +24 -12
- package/dist/src/lib/function-document-types.js.map +1 -1
- package/dist/src/lib/function-lint.d.ts +57 -0
- package/dist/src/lib/function-lint.js +234 -0
- package/dist/src/lib/function-lint.js.map +1 -0
- package/dist/src/lib/function-log-row.js +21 -2
- package/dist/src/lib/function-log-row.js.map +1 -1
- package/dist/src/lib/function-run.d.ts +13 -21
- package/dist/src/lib/function-run.js +14 -27
- package/dist/src/lib/function-run.js.map +1 -1
- package/dist/src/lib/function-schema-codegen.d.ts +86 -22
- package/dist/src/lib/function-schema-codegen.js +194 -88
- package/dist/src/lib/function-schema-codegen.js.map +1 -1
- package/dist/src/lib/function-schema-refs.d.ts +98 -0
- package/dist/src/lib/function-schema-refs.js +177 -0
- package/dist/src/lib/function-schema-refs.js.map +1 -0
- package/dist/src/lib/function-sync.d.ts +109 -6
- package/dist/src/lib/function-sync.js +179 -26
- package/dist/src/lib/function-sync.js.map +1 -1
- package/dist/src/lib/function-trigger-listing.d.ts +11 -6
- package/dist/src/lib/function-trigger-listing.js +32 -11
- package/dist/src/lib/function-trigger-listing.js.map +1 -1
- package/dist/src/lib/function-triggers.d.ts +15 -3
- package/dist/src/lib/function-triggers.js +72 -10
- package/dist/src/lib/function-triggers.js.map +1 -1
- package/dist/src/lib/function-typecheck.d.ts +52 -0
- package/dist/src/lib/function-typecheck.js +174 -54
- package/dist/src/lib/function-typecheck.js.map +1 -1
- package/dist/src/lib/function-versions.d.ts +2 -0
- package/dist/src/lib/function-versions.js +1 -0
- package/dist/src/lib/function-versions.js.map +1 -1
- package/dist/src/lib/generated-build-flags.d.ts +13 -0
- package/dist/src/lib/generated-build-flags.js +14 -0
- package/dist/src/lib/generated-build-flags.js.map +1 -0
- package/dist/src/lib/generated-command-status.d.ts +6 -0
- package/dist/src/lib/generated-command-status.js +469 -0
- package/dist/src/lib/generated-command-status.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +586 -152
- package/dist/src/lib/generated-config-surfaces.js +1919 -1883
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/generated-workflow-model-fields.d.ts +20 -0
- package/dist/src/lib/generated-workflow-model-fields.js +53 -0
- package/dist/src/lib/generated-workflow-model-fields.js.map +1 -0
- package/dist/src/lib/hosting-build.d.ts +97 -0
- package/dist/src/lib/hosting-build.js +204 -0
- package/dist/src/lib/hosting-build.js.map +1 -0
- package/dist/src/lib/hosting-client.d.ts +167 -0
- package/dist/src/lib/hosting-client.js +340 -0
- package/dist/src/lib/hosting-client.js.map +1 -0
- package/dist/src/lib/hosting-environments.d.ts +32 -0
- package/dist/src/lib/hosting-environments.js +74 -0
- package/dist/src/lib/hosting-environments.js.map +1 -0
- package/dist/src/lib/hosting-errors.d.ts +30 -0
- package/dist/src/lib/hosting-errors.js +43 -0
- package/dist/src/lib/hosting-errors.js.map +1 -0
- package/dist/src/lib/hosting-token.d.ts +46 -0
- package/dist/src/lib/hosting-token.js +60 -0
- package/dist/src/lib/hosting-token.js.map +1 -0
- package/dist/src/lib/hosting-wait.d.ts +42 -0
- package/dist/src/lib/hosting-wait.js +84 -0
- package/dist/src/lib/hosting-wait.js.map +1 -0
- package/dist/src/lib/hosting-wfp-upload.d.ts +86 -0
- package/dist/src/lib/hosting-wfp-upload.js +149 -0
- package/dist/src/lib/hosting-wfp-upload.js.map +1 -0
- package/dist/src/lib/init-assets.d.ts +2 -6
- package/dist/src/lib/init-assets.js +11 -27
- package/dist/src/lib/init-assets.js.map +1 -1
- package/dist/src/lib/init-ios-links.d.ts +11 -7
- package/dist/src/lib/init-ios-links.js +28 -22
- package/dist/src/lib/init-ios-links.js.map +1 -1
- package/dist/src/lib/init-login-note.d.ts +13 -0
- package/dist/src/lib/init-login-note.js +22 -0
- package/dist/src/lib/init-login-note.js.map +1 -0
- package/dist/src/lib/init-schema.d.ts +15 -0
- package/dist/src/lib/init-schema.js +54 -0
- package/dist/src/lib/init-schema.js.map +1 -1
- package/dist/src/lib/integration-test-request.d.ts +54 -0
- package/dist/src/lib/integration-test-request.js +207 -0
- package/dist/src/lib/integration-test-request.js.map +1 -0
- package/dist/src/lib/invoker-shared-enums.d.ts +35 -0
- package/dist/src/lib/invoker-shared-enums.js +98 -0
- package/dist/src/lib/invoker-shared-enums.js.map +1 -0
- package/dist/src/lib/json-value.d.ts +6 -0
- package/dist/src/lib/json-value.js +13 -0
- package/dist/src/lib/json-value.js.map +1 -0
- package/dist/src/lib/load-routes.d.ts +33 -0
- package/dist/src/lib/load-routes.js +35 -0
- package/dist/src/lib/load-routes.js.map +1 -0
- package/dist/src/lib/log-inspection.d.ts +23 -4
- package/dist/src/lib/log-inspection.js +14 -5
- package/dist/src/lib/log-inspection.js.map +1 -1
- package/dist/src/lib/login-exchange-check.d.ts +18 -0
- package/dist/src/lib/login-exchange-check.js +27 -0
- package/dist/src/lib/login-exchange-check.js.map +1 -0
- package/dist/src/lib/login-scope-lines.d.ts +17 -7
- package/dist/src/lib/login-scope-lines.js +33 -10
- package/dist/src/lib/login-scope-lines.js.map +1 -1
- package/dist/src/lib/metadata-report.d.ts +85 -0
- package/dist/src/lib/metadata-report.js +81 -0
- package/dist/src/lib/metadata-report.js.map +1 -0
- package/dist/src/lib/object-status-filter.d.ts +9 -1
- package/dist/src/lib/object-status-filter.js +9 -1
- package/dist/src/lib/object-status-filter.js.map +1 -1
- package/dist/src/lib/output.d.ts +1 -1
- package/dist/src/lib/output.js +3 -1
- package/dist/src/lib/output.js.map +1 -1
- package/dist/src/lib/pin-refusal-hint.d.ts +12 -0
- package/dist/src/lib/pin-refusal-hint.js +35 -0
- package/dist/src/lib/pin-refusal-hint.js.map +1 -0
- package/dist/src/lib/platform-owned.js +5 -0
- package/dist/src/lib/platform-owned.js.map +1 -1
- package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
- package/dist/src/lib/primitive-declaration-names.js +22 -0
- package/dist/src/lib/primitive-declaration-names.js.map +1 -0
- package/dist/src/lib/primitive-declaration.d.ts +174 -0
- package/dist/src/lib/primitive-declaration.js +792 -0
- package/dist/src/lib/primitive-declaration.js.map +1 -0
- package/dist/src/lib/primitive-env-plugin.d.ts +99 -0
- package/dist/src/lib/primitive-env-plugin.js +408 -0
- package/dist/src/lib/primitive-env-plugin.js.map +1 -0
- package/dist/src/lib/project-login-apps.d.ts +8 -0
- package/dist/src/lib/project-login-apps.js +27 -0
- package/dist/src/lib/project-login-apps.js.map +1 -0
- package/dist/src/lib/prompt-schema-codegen.d.ts +46 -15
- package/dist/src/lib/prompt-schema-codegen.js +142 -108
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
- package/dist/src/lib/prompt-schema-document.d.ts +35 -0
- package/dist/src/lib/prompt-schema-document.js +92 -0
- package/dist/src/lib/prompt-schema-document.js.map +1 -0
- package/dist/src/lib/prompt-schema-refs.d.ts +173 -0
- package/dist/src/lib/prompt-schema-refs.js +478 -0
- package/dist/src/lib/prompt-schema-refs.js.map +1 -0
- package/dist/src/lib/records-verbs.d.ts +79 -0
- package/dist/src/lib/records-verbs.js +45 -0
- package/dist/src/lib/records-verbs.js.map +1 -0
- package/dist/src/lib/register-commands.d.ts +36 -0
- package/dist/src/lib/register-commands.js +37 -0
- package/dist/src/lib/register-commands.js.map +1 -0
- package/dist/src/lib/retired-imports.d.ts +53 -0
- package/dist/src/lib/retired-imports.js +120 -0
- package/dist/src/lib/retired-imports.js.map +1 -0
- package/dist/src/lib/run-status.d.ts +1 -1
- package/dist/src/lib/run-status.generated.d.ts +2 -2
- package/dist/src/lib/run-status.generated.js +3 -1
- package/dist/src/lib/run-status.generated.js.map +1 -1
- package/dist/src/lib/run-status.js +1 -1
- package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
- package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
- package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js +227 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +218 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.js +397 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
- package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
- package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +258 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +422 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.d.ts +27 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.js +126 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.js.map +1 -0
- package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
- package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
- package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
- package/dist/src/lib/schema-codegen/naming.d.ts +35 -0
- package/dist/src/lib/schema-codegen/naming.js +83 -0
- package/dist/src/lib/schema-codegen/naming.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
- package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
- package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
- package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
- package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
- package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
- package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaToTs.d.ts +109 -0
- package/dist/src/lib/schema-codegen/schemaToTs.js +269 -0
- package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -0
- package/dist/src/lib/schema-codegen/valuesLists.d.ts +48 -0
- package/dist/src/lib/schema-codegen/valuesLists.js +144 -0
- package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
- package/dist/src/lib/schema-family-index.d.ts +228 -0
- package/dist/src/lib/schema-family-index.js +813 -0
- package/dist/src/lib/schema-family-index.js.map +1 -0
- package/dist/src/lib/schema-pins.d.ts +82 -0
- package/dist/src/lib/schema-pins.js +198 -0
- package/dist/src/lib/schema-pins.js.map +1 -0
- package/dist/src/lib/schema-preview.d.ts +244 -0
- package/dist/src/lib/schema-preview.js +498 -0
- package/dist/src/lib/schema-preview.js.map +1 -0
- package/dist/src/lib/scope-request.d.ts +23 -11
- package/dist/src/lib/scope-request.js +69 -31
- package/dist/src/lib/scope-request.js.map +1 -1
- package/dist/src/lib/session-scope.d.ts +26 -0
- package/dist/src/lib/session-scope.js +58 -0
- package/dist/src/lib/session-scope.js.map +1 -0
- package/dist/src/lib/skill-installer.d.ts +2 -2
- package/dist/src/lib/skill-installer.js +2 -21
- package/dist/src/lib/skill-installer.js.map +1 -1
- package/dist/src/lib/step-run-table.d.ts +1 -2
- package/dist/src/lib/step-run-table.js +1 -2
- package/dist/src/lib/step-run-table.js.map +1 -1
- package/dist/src/lib/swift-codegen/agentGenerator.d.ts +8 -3
- package/dist/src/lib/swift-codegen/agentGenerator.js +76 -22
- package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
- package/dist/src/lib/swift-codegen/banners.js +12 -0
- package/dist/src/lib/swift-codegen/banners.js.map +1 -1
- package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
- package/dist/src/lib/swift-codegen/functionGenerator.js +169 -51
- package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +33 -9
- package/dist/src/lib/swift-codegen/schemaToSwift.js +215 -179
- package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
- package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +45 -0
- package/dist/src/lib/swift-codegen/sharedGenerator.js +165 -0
- package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
- package/dist/src/lib/swift-codegen/swiftKeys.d.ts +19 -0
- package/dist/src/lib/swift-codegen/swiftKeys.js +31 -0
- package/dist/src/lib/swift-codegen/swiftKeys.js.map +1 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
- package/dist/src/lib/sync-resource-types.d.ts +117 -31
- package/dist/src/lib/sync-resource-types.js +197 -189
- package/dist/src/lib/sync-resource-types.js.map +1 -1
- package/dist/src/lib/sync-selectors.d.ts +7 -0
- package/dist/src/lib/sync-selectors.js +22 -2
- package/dist/src/lib/sync-selectors.js.map +1 -1
- package/dist/src/lib/template.d.ts +39 -3
- package/dist/src/lib/template.js +103 -14
- package/dist/src/lib/template.js.map +1 -1
- package/dist/src/lib/test-case-file-names.d.ts +3 -5
- package/dist/src/lib/test-case-file-names.js +3 -5
- package/dist/src/lib/test-case-file-names.js.map +1 -1
- package/dist/src/lib/test-runs.d.ts +45 -0
- package/dist/src/lib/test-runs.js +150 -0
- package/dist/src/lib/test-runs.js.map +1 -0
- package/dist/src/lib/test-users.d.ts +25 -0
- package/dist/src/lib/test-users.js +36 -0
- package/dist/src/lib/test-users.js.map +1 -0
- package/dist/src/lib/toml-database-config.d.ts +4 -2
- package/dist/src/lib/toml-database-config.js +11 -6
- package/dist/src/lib/toml-database-config.js.map +1 -1
- package/dist/src/lib/toml-scalar-edit.js +6 -4
- package/dist/src/lib/toml-scalar-edit.js.map +1 -1
- package/dist/src/lib/transition-warnings.d.ts +21 -0
- package/dist/src/lib/transition-warnings.js +49 -0
- package/dist/src/lib/transition-warnings.js.map +1 -0
- package/dist/src/lib/user-index.d.ts +80 -0
- package/dist/src/lib/user-index.js +166 -0
- package/dist/src/lib/user-index.js.map +1 -0
- package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
- package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
- package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
- package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
- package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
- package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
- package/dist/src/lib/user-walk.d.ts +31 -0
- package/dist/src/lib/user-walk.js +102 -0
- package/dist/src/lib/user-walk.js.map +1 -0
- package/dist/src/lib/webhook-capture.d.ts +43 -0
- package/dist/src/lib/webhook-capture.js +91 -0
- package/dist/src/lib/webhook-capture.js.map +1 -0
- package/dist/src/lib/webhook-deliver.d.ts +18 -20
- package/dist/src/lib/webhook-deliver.js +34 -89
- package/dist/src/lib/webhook-deliver.js.map +1 -1
- package/dist/src/lib/webhook-test-run.d.ts +32 -0
- package/dist/src/lib/webhook-test-run.js +108 -0
- package/dist/src/lib/webhook-test-run.js.map +1 -0
- package/dist/src/lib/worker-perf-format.d.ts +22 -0
- package/dist/src/lib/worker-perf-format.js +27 -0
- package/dist/src/lib/worker-perf-format.js.map +1 -0
- package/dist/src/lib/workflow-field-descriptor.d.ts +91 -0
- package/dist/src/lib/workflow-field-descriptor.js +153 -0
- package/dist/src/lib/workflow-field-descriptor.js.map +1 -0
- package/dist/src/types/index.d.ts +20 -65
- package/dist/src/validators.d.ts +7 -55
- package/dist/src/validators.js +7 -53
- package/dist/src/validators.js.map +1 -1
- package/dist/src/vite.d.ts +17 -0
- package/dist/src/vite.js +18 -0
- package/dist/src/vite.js.map +1 -0
- package/package.json +20 -9
|
@@ -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
|
*
|
|
@@ -283,8 +284,7 @@ export type RuleStage = "preflight" | "apply";
|
|
|
283
284
|
export type CrossFieldRuleStage = RuleStage;
|
|
284
285
|
/**
|
|
285
286
|
* 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`.
|
|
287
|
+
* = true` beside a webhook trigger, an HMAC scheme with no `signingSecret`.
|
|
288
288
|
*
|
|
289
289
|
* Such a rule belongs to no single field, so `ConfigField.validation` has
|
|
290
290
|
* nowhere to put it; attaching it to one field arbitrarily would make the
|
|
@@ -362,8 +362,9 @@ export interface ConfigObjectSurface {
|
|
|
362
362
|
* Declares that this object HAS no TOML field table, with the reason —
|
|
363
363
|
* required when `tables` is empty and forbidden otherwise.
|
|
364
364
|
*
|
|
365
|
-
* `transform`
|
|
366
|
-
*
|
|
365
|
+
* `transform` was the case until it retired with the Rhai runtime (#3190): a
|
|
366
|
+
* `.rhai` file's authored surface was the script body, so there was no
|
|
367
|
+
* key/value table to define. Saying so here is the same
|
|
367
368
|
* rule `notExposed` applies to a field, one level up: "absent from the
|
|
368
369
|
* registry" and "deliberately fieldless" must not look the same (#2644
|
|
369
370
|
* criterion 4).
|
|
@@ -455,8 +456,8 @@ export declare const DECLARED_ACCESS_MANIFEST_KEYS: Readonly<Record<string, NotE
|
|
|
455
456
|
* accepts. What a present key MEANS stays with the per-field handler the
|
|
456
457
|
* definition names (spec §Contracts, decision of record #1976): the workflow
|
|
457
458
|
* `status` enum, the non-negative-integer coercion of the queue limits,
|
|
458
|
-
* `runAs`'s caller|system check, `parseWorkflowLock
|
|
459
|
-
* shape
|
|
459
|
+
* `runAs`'s caller|system check, `parseWorkflowLock` and the `capabilities`
|
|
460
|
+
* array shape all stay where they are. The
|
|
460
461
|
* mechanical win is that a field can no longer be *absent* from the accepted
|
|
461
462
|
* set.
|
|
462
463
|
*
|
|
@@ -466,10 +467,11 @@ export type WriteMode = "create" | "update";
|
|
|
466
467
|
/** The field names this table accepts on the wire in `mode`, in declaration order. */
|
|
467
468
|
export declare function writableFieldNames(table: ConfigTable, mode: WriteMode): string[];
|
|
468
469
|
/**
|
|
469
|
-
* The field names the server
|
|
470
|
-
* fields, plus the `deprecated` classifications — "still
|
|
471
|
-
*
|
|
472
|
-
* a handler still honors (`
|
|
470
|
+
* The field names the server ACCEPTS for this table in `mode`: the writable
|
|
471
|
+
* fields, plus the `deprecated` classifications — "still accepted, superseded
|
|
472
|
+
* or scheduled for removal" is what that kind means (`types.ts`), so a
|
|
473
|
+
* superseded key a handler still honors (`protected`) and a retired one it
|
|
474
|
+
* accepts and ignores (`accessRule`, #4872) belong in every accepted set, and a
|
|
473
475
|
* field that is NOT writable belongs in none of them.
|
|
474
476
|
*
|
|
475
477
|
* Stated once here because three consumers need the same answer: the generated
|
|
@@ -980,11 +982,11 @@ export declare function findUnreachedPreflightRules(surface: ConfigObjectSurface
|
|
|
980
982
|
*
|
|
981
983
|
* ── What the schema says, and what it deliberately does not ──────────────
|
|
982
984
|
* 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
|
|
985
|
+
* only the `deprecated` annotation, #1815), so no value is type-checked here.
|
|
986
|
+
* That is the decision of record (#1976, carried forward at #2644's design
|
|
987
|
+
* gate): the definition classifies, handlers behave. The `status` enum, the
|
|
988
|
+
* queue limits' integer coercion, the CEL parse of a rule set's expressions —
|
|
989
|
+
* all stay in the handlers the definition names, with their existing messages. Adding type gates here would
|
|
988
990
|
* duplicate them and start rejecting values the handlers accept.
|
|
989
991
|
*
|
|
990
992
|
* ── Which keys are in the set ────────────────────────────────────────────
|
|
@@ -1017,7 +1019,8 @@ export interface ConfigRequestSchema {
|
|
|
1017
1019
|
type: "object";
|
|
1018
1020
|
/**
|
|
1019
1021
|
* Each property is the empty schema, or `{ deprecated: true }` for a field
|
|
1020
|
-
* the definition marks `deprecated` (#1815)
|
|
1022
|
+
* the definition marks `deprecated` (#1815) or a key `notExposed` classifies
|
|
1023
|
+
* `deprecated` (#4872). `deprecated` is an OpenAPI
|
|
1021
1024
|
* annotation: it constrains no value, so the schema still states the key set
|
|
1022
1025
|
* and nothing more.
|
|
1023
1026
|
*/
|
|
@@ -1089,7 +1092,7 @@ export declare function unknownRequestKeysMessage(keys: readonly string[]): stri
|
|
|
1089
1092
|
* retired key: the TOML wording for `config push` (which can tell the author to
|
|
1090
1093
|
* delete a line) and the request wording for the API handlers (which cannot).
|
|
1091
1094
|
*
|
|
1092
|
-
* Keyed by the table's TOML path prefix (`
|
|
1095
|
+
* Keyed by the table's TOML path prefix (`integration`, `prompt`, …), because
|
|
1093
1096
|
* that is the identifier both consumers already have in hand.
|
|
1094
1097
|
*
|
|
1095
1098
|
* Pure: no models, no tenant context, no `env` (see `types.ts` §Purity).
|
|
@@ -1101,6 +1104,51 @@ export interface RetiredConfigKey {
|
|
|
1101
1104
|
request: string;
|
|
1102
1105
|
}
|
|
1103
1106
|
export declare const RETIRED_CONFIG_KEYS: Record<string, Record<string, RetiredConfigKey>>;
|
|
1107
|
+
/**
|
|
1108
|
+
* Keys DEPRECATED on a configuration object's write surface: still accepted
|
|
1109
|
+
* in TOML and on the wire, ignored, and scheduled for removal.
|
|
1110
|
+
*
|
|
1111
|
+
* A deprecated key sits between a live field and a retired one. The table
|
|
1112
|
+
* classifies it `deprecated` in both `notExposed` (so a body that still sends
|
|
1113
|
+
* it is accepted) and `tomlOnlyKeys` (so a file that still carries it
|
|
1114
|
+
* validates); this registry holds the one sentence `config push` prints for a
|
|
1115
|
+
* file that carries it, and is what `config pull` keys its forced rewrite on,
|
|
1116
|
+
* so the pull the sentence names removes the line.
|
|
1117
|
+
*
|
|
1118
|
+
* Keyed by the table's TOML path prefix, like `RETIRED_CONFIG_KEYS`. The
|
|
1119
|
+
* scheduled break moves an entry from here to that map.
|
|
1120
|
+
*/
|
|
1121
|
+
export interface DeprecatedConfigKey {
|
|
1122
|
+
/** What `config push` says, once per file, about a file that carries the key. */
|
|
1123
|
+
toml: string;
|
|
1124
|
+
}
|
|
1125
|
+
export declare const DEPRECATED_CONFIG_KEYS: Record<string, Record<string, DeprecatedConfigKey>>;
|
|
1126
|
+
/** The deprecated-key entry for `key` under `prefix`, or null when it is not deprecated. */
|
|
1127
|
+
export declare function deprecatedConfigKey(prefix: string, key: string): DeprecatedConfigKey | null;
|
|
1128
|
+
/**
|
|
1129
|
+
* Config-tree directories whose object type retired — #3190, server-functions
|
|
1130
|
+
* phase 7. The DSL engine, the Rhai runtime and the standalone webhook and
|
|
1131
|
+
* cron objects are gone, so `config push` refuses a tree that still holds one
|
|
1132
|
+
* of these directories, by name and before it writes anything, rather than
|
|
1133
|
+
* ignoring files an author still expects to take effect.
|
|
1134
|
+
*
|
|
1135
|
+
* Each entry is one sentence: what retired, what replaces it, and the docs page
|
|
1136
|
+
* that shows the replacement.
|
|
1137
|
+
*/
|
|
1138
|
+
export declare const RETIRED_CONFIG_DIRECTORIES: Record<string, string>;
|
|
1139
|
+
/**
|
|
1140
|
+
* The type-config directories a config tree no longer has (#4731, project
|
|
1141
|
+
* `role-based-groups-collections`). Groups and collections have fixed roles,
|
|
1142
|
+
* so their per-type configuration retired with its routes; `config push`
|
|
1143
|
+
* refuses a tree that still holds a file in either, naming each file, rather
|
|
1144
|
+
* than ignoring files an author still expects to take effect. The rows the
|
|
1145
|
+
* server already stored are not touched.
|
|
1146
|
+
*
|
|
1147
|
+
* Each entry is one sentence: what retired, and what replaces it.
|
|
1148
|
+
*/
|
|
1149
|
+
export declare const RETIRED_TYPE_CONFIG_DIRECTORIES: Record<string, string>;
|
|
1150
|
+
/** The retirement sentence for a config-tree directory, or null when it is live. */
|
|
1151
|
+
export declare function retiredConfigDirectory(dir: string): string | null;
|
|
1104
1152
|
/**
|
|
1105
1153
|
* Top-level TOML tables a configuration object's FILE retired — keyed by the
|
|
1106
1154
|
* surface's label, then by the table key. Only the TOML half exists: these were
|
|
@@ -1131,10 +1179,29 @@ export interface RetiredTomlSpelling {
|
|
|
1131
1179
|
*/
|
|
1132
1180
|
export declare const RETIRED_TOML_SPELLINGS: Record<string, Record<string, RetiredTomlSpelling>>;
|
|
1133
1181
|
/**
|
|
1134
|
-
*
|
|
1135
|
-
*
|
|
1182
|
+
* A key one surface refuses while another surface of the same TOML prefix
|
|
1183
|
+
* takes it: the prefix alone cannot pick the sentence.
|
|
1184
|
+
*/
|
|
1185
|
+
export interface RetiredSurfaceTomlKey extends RetiredTomlSpelling {
|
|
1186
|
+
/**
|
|
1187
|
+
* An empty string is accepted and ignored rather than refused: the
|
|
1188
|
+
* placeholder every earlier `config pull` wrote, which a refusal would turn
|
|
1189
|
+
* into a failed first push of every existing tree.
|
|
1190
|
+
*/
|
|
1191
|
+
emptyAccepted?: boolean;
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* Guidance keyed by surface label, then TOML prefix, then key — consulted
|
|
1195
|
+
* before `RETIRED_CONFIG_KEYS` and `RETIRED_TOML_SPELLINGS` when the caller
|
|
1196
|
+
* knows the surface.
|
|
1136
1197
|
*/
|
|
1137
|
-
export declare
|
|
1198
|
+
export declare const RETIRED_SURFACE_TOML_KEYS: Record<string, Record<string, Record<string, RetiredSurfaceTomlKey>>>;
|
|
1199
|
+
/**
|
|
1200
|
+
* The TOML guidance for `key` under `prefix`: the surface's own when
|
|
1201
|
+
* `surfaceLabel` names one, else a fully retired key's, else a retired
|
|
1202
|
+
* spelling's, else null when the key is simply unknown.
|
|
1203
|
+
*/
|
|
1204
|
+
export declare function retiredTomlKey(prefix: string, key: string, surfaceLabel?: string): RetiredSurfaceTomlKey | null;
|
|
1138
1205
|
/**
|
|
1139
1206
|
* The capability grammar for server functions — #3182 phase 1, rewritten by
|
|
1140
1207
|
* #3279 (project `server-functions` phase 3).
|
|
@@ -1157,7 +1224,10 @@ export declare function retiredTomlKey(prefix: string, key: string): RetiredToml
|
|
|
1157
1224
|
* `secret:<NAME>` credential least privilege — which secret VALUES may
|
|
1158
1225
|
* cross into the sandbox at all;
|
|
1159
1226
|
* the high-blast list {@link HIGH_BLAST_CAPABILITIES} — the operations
|
|
1160
|
-
* whose blast radius the intent keeps opt-in
|
|
1227
|
+
* whose blast radius the intent keeps opt-in;
|
|
1228
|
+
* the subject grants {@link SUBJECT_GRANT_CAPABILITIES} — naming another
|
|
1229
|
+
* member on a call about one user, in a run a plain
|
|
1230
|
+
* member invoked.
|
|
1161
1231
|
*
|
|
1162
1232
|
* Every other string a function used to declare is RETIRED, and the grammar
|
|
1163
1233
|
* says so by name: an author who still writes `database:orders/Order:read`
|
|
@@ -1210,15 +1280,44 @@ export declare const KEYED_GRANT_FAMILIES: readonly ["integration", "secret"];
|
|
|
1210
1280
|
* other — `databases:create` is not permission to delete a database.
|
|
1211
1281
|
*
|
|
1212
1282
|
* The database ROLE mutations are here because they hand out persistent
|
|
1213
|
-
* authority: a group grant assigns the manager role (D3279-003).
|
|
1283
|
+
* authority: a group grant assigns the manager role (D3279-003). A db3's sync
|
|
1284
|
+
* switch (`db3:setSync`, the intent's `db3-sync` grant) is here because
|
|
1285
|
+
* turning sync off suspends every grant on the db3 (#4799); a db3's transfer
|
|
1286
|
+
* and its owner-row change (`db3:transfer`, `db3:setOwnerRow`, the intent's
|
|
1287
|
+
* `db3-grant` grant) because they move who holds the db3 and its owner row
|
|
1288
|
+
* (#4800); its app access (`db3:setAppAccess`, the same grant's third string)
|
|
1289
|
+
* because it grants the db3 to every user of the app (#4801). App deletion
|
|
1214
1290
|
* and secret writes have no app-API route today; they are recorded, not gated,
|
|
1215
1291
|
* and the profile generator refuses to admit a future such route without a row
|
|
1216
1292
|
* here (`HIGH_BLAST_WATCH` in `scripts/lib/function-profile.mjs`).
|
|
1217
1293
|
*/
|
|
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
|
-
|
|
1294
|
+
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"];
|
|
1295
|
+
/**
|
|
1296
|
+
* The subject grants — #4909.
|
|
1297
|
+
*
|
|
1298
|
+
* A run a plain member invoked may name nobody but its caller on a call that
|
|
1299
|
+
* is about one user (#4142's subject rule): `SUBJECT_USER_FORBIDDEN`. A
|
|
1300
|
+
* function whose own code chooses that user — a class's teacher removing a
|
|
1301
|
+
* student and reading where else the student is enrolled — declares it here,
|
|
1302
|
+
* in a line a reviewer can find:
|
|
1303
|
+
*
|
|
1304
|
+
* `users:readAny` the user-subject READS may name another member
|
|
1305
|
+
* (memberships, a member's collections, their db3s
|
|
1306
|
+
* (owned and shared), inbox, devices, agent sessions);
|
|
1307
|
+
* `users:actAsAny` the calls that ACT as a member may name another member
|
|
1308
|
+
* (marking their notifications read, their devices, an
|
|
1309
|
+
* agent session as them, `ctx.db3` `asUser`, their
|
|
1310
|
+
* aliases).
|
|
1311
|
+
*
|
|
1312
|
+
* Each admits only its own kind. Neither changes a run with no caller, an
|
|
1313
|
+
* owner- or admin-invoked run, or a run an agent drives (refused either way),
|
|
1314
|
+
* and a nested child reads its own version's. They are not high-blast rows:
|
|
1315
|
+
* those are 1:1 with an operation id, and these name a rule, not an operation.
|
|
1316
|
+
*/
|
|
1317
|
+
export declare const SUBJECT_GRANT_CAPABILITIES: readonly ["users:readAny", "users:actAsAny"];
|
|
1318
|
+
/** The exact strings: the high-blast list and the subject grants. */
|
|
1319
|
+
export declare const EXACT_GRANT_STRINGS: readonly string[];
|
|
1320
|
+
export type GrantFamily = (typeof KEYED_GRANT_FAMILIES)[number] | "databases" | "users" | "blobBuckets" | "db3";
|
|
1222
1321
|
/**
|
|
1223
1322
|
* The retired FAMILIES (#3279), each with the reason it is gone.
|
|
1224
1323
|
*
|
|
@@ -1420,7 +1519,21 @@ export declare function validateKeyedGrantsAgainstTargets(grants: readonly Funct
|
|
|
1420
1519
|
* A version-1 manifest still parses: it records registrations only.
|
|
1421
1520
|
*/
|
|
1422
1521
|
export declare const FUNCTION_MANIFEST_SCHEMA_VERSION = 2;
|
|
1423
|
-
export declare const FUNCTION_MANIFEST_SCHEMA_VERSIONS: readonly [1, 2];
|
|
1522
|
+
export declare const FUNCTION_MANIFEST_SCHEMA_VERSIONS: readonly [1, 2, 3];
|
|
1523
|
+
/**
|
|
1524
|
+
* Version 3 (#4730) adds what a version's `authorize` admits: the
|
|
1525
|
+
* `authorize` block and the `writeFamilies` its handler reaches. Only a
|
|
1526
|
+
* FLAGGED build emits it — the manifest is inside the envelope hash, so a
|
|
1527
|
+
* universal bump would make every untouched bare-handler tree a new version
|
|
1528
|
+
* on its next push. A bare-handler tree keeps emitting version 2.
|
|
1529
|
+
*/
|
|
1530
|
+
export declare const FUNCTION_MANIFEST_AUTHORIZE_SCHEMA_VERSION = 3;
|
|
1531
|
+
/** The `auth.*` families an `authorize` can read, as the manifest names them. */
|
|
1532
|
+
export declare const AUTH_FAMILIES: readonly ["auth.user", "auth.trigger", "auth.memberships", "auth.collections", "auth.doc", "auth.db", "auth.configVar"];
|
|
1533
|
+
/** The SDK helpers that build an `authorize`, as the manifest names them. */
|
|
1534
|
+
export declare const AUTHORIZE_HELPERS: readonly ["allowAnyone", "allowCallers", "requireSignedIn", "requireRole", "requireMember", "requireCollectionRole", "requireDocumentOwner"];
|
|
1535
|
+
/** How many function keys an `allowCallers` block may list. */
|
|
1536
|
+
export declare const MAX_MANIFEST_CALLER_FUNCTIONS = 200;
|
|
1424
1537
|
/** Bounds, so a manifest cannot be a way to store an unbounded blob. */
|
|
1425
1538
|
export declare const MAX_MANIFEST_QUERIES = 200;
|
|
1426
1539
|
export declare const MAX_MANIFEST_NAME_LENGTH = 120;
|
|
@@ -1471,6 +1584,41 @@ export interface ManifestQuery {
|
|
|
1471
1584
|
/** True when a `$caller` binding scopes this registration. */
|
|
1472
1585
|
callerScoped: boolean;
|
|
1473
1586
|
}
|
|
1587
|
+
/** The doors an `allowCallers` admits, as collected (#4730). */
|
|
1588
|
+
export interface ManifestAuthorizeCallers {
|
|
1589
|
+
webhook: boolean;
|
|
1590
|
+
cron: boolean;
|
|
1591
|
+
manual: boolean;
|
|
1592
|
+
/** The parent function keys the `functions` arm names. */
|
|
1593
|
+
functions: string[];
|
|
1594
|
+
/** `true`, `false`, or `"rule"` when the arm is an authorize function. */
|
|
1595
|
+
agents: boolean | "rule";
|
|
1596
|
+
/** `"rule"` when a `users` arm is present, else false. */
|
|
1597
|
+
users: false | "rule";
|
|
1598
|
+
/**
|
|
1599
|
+
* #4803 — the db3 flush door. Optional: a manifest collected before the door
|
|
1600
|
+
* existed carries no key, and absent reads as closed.
|
|
1601
|
+
*/
|
|
1602
|
+
db3?: boolean;
|
|
1603
|
+
/**
|
|
1604
|
+
* #5393 — a users walk's batch door: `true` for every walk, or the keys of
|
|
1605
|
+
* the functions whose walks are admitted. Optional like `db3`: absent reads
|
|
1606
|
+
* as closed.
|
|
1607
|
+
*/
|
|
1608
|
+
usersBatch?: boolean | string[];
|
|
1609
|
+
}
|
|
1610
|
+
/** What a version's `authorize` admits, as collected (#4730). */
|
|
1611
|
+
export interface ManifestAuthorize {
|
|
1612
|
+
present: true;
|
|
1613
|
+
/** `allowAnyone()`, or an `allowCallers` whose users or agents rule is one. */
|
|
1614
|
+
public: boolean;
|
|
1615
|
+
/** The SDK helper that built the exported `authorize`, or null when hand-written. */
|
|
1616
|
+
helper: string | null;
|
|
1617
|
+
/** The doors, when the helper is `allowCallers`; else null. */
|
|
1618
|
+
callers: ManifestAuthorizeCallers | null;
|
|
1619
|
+
/** The `auth.*` families the authorize code reaches, sorted. */
|
|
1620
|
+
families: string[];
|
|
1621
|
+
}
|
|
1474
1622
|
export interface FunctionManifest {
|
|
1475
1623
|
schemaVersion: number;
|
|
1476
1624
|
queries: ManifestQuery[];
|
|
@@ -1489,6 +1637,13 @@ export interface FunctionManifest {
|
|
|
1489
1637
|
* empty `models` list does not.
|
|
1490
1638
|
*/
|
|
1491
1639
|
dynamicModels: boolean;
|
|
1640
|
+
/**
|
|
1641
|
+
* Version 3 only: the families on which the scan met a write or send verb.
|
|
1642
|
+
* Absent on versions 1 and 2, which readers treat as `[]`.
|
|
1643
|
+
*/
|
|
1644
|
+
writeFamilies?: string[];
|
|
1645
|
+
/** Version 3 only: the `authorize` block. Absent on 1 and 2 (read as null). */
|
|
1646
|
+
authorize?: ManifestAuthorize;
|
|
1492
1647
|
}
|
|
1493
1648
|
export interface ParsedManifest {
|
|
1494
1649
|
ok: boolean;
|
|
@@ -1503,6 +1658,64 @@ export interface ParsedManifest {
|
|
|
1503
1658
|
* and whether the author meant any of it are questions this cannot answer.
|
|
1504
1659
|
*/
|
|
1505
1660
|
export declare function parseFunctionManifest(value: unknown): ParsedManifest;
|
|
1661
|
+
/**
|
|
1662
|
+
* Whether a top-level input schema is one the closed-schema default leaves
|
|
1663
|
+
* OPEN under its union exemption — #4730, criterion 9.
|
|
1664
|
+
*
|
|
1665
|
+
* The validator closes an object against the root's OWN `properties` only,
|
|
1666
|
+
* so a root whose `anyOf` or `oneOf` members declare `properties` of their
|
|
1667
|
+
* own would, closed, refuse the very keys its members declare. Such a root is
|
|
1668
|
+
* left open, and `config push` warns its author to say `additionalProperties`
|
|
1669
|
+
* explicitly. Shared by the server (`closedInputSchemaFor`) and the CLI's
|
|
1670
|
+
* push warning, so both sides read one rule.
|
|
1671
|
+
*/
|
|
1672
|
+
export declare function inputSchemaRootLeftOpen(schema: unknown): boolean;
|
|
1673
|
+
/**
|
|
1674
|
+
* The schema a flagged version validates against — #4730, criterion 9.
|
|
1675
|
+
*
|
|
1676
|
+
* A top-level object schema that sets no `additionalProperties` reads as
|
|
1677
|
+
* closed: a shallow copy with `additionalProperties: false`. Every other
|
|
1678
|
+
* schema is answered as it is — an explicit `additionalProperties`, a
|
|
1679
|
+
* non-object root, an empty `{}`, and a root left open under
|
|
1680
|
+
* {@link inputSchemaRootLeftOpen}. Nested objects are not touched. Applied at
|
|
1681
|
+
* run time and never written to the header.
|
|
1682
|
+
*/
|
|
1683
|
+
export declare function closedObjectSchema(schema: Record<string, unknown>): Record<string, unknown>;
|
|
1684
|
+
/**
|
|
1685
|
+
* `[function] public`, read from the authored TOML's `[function]` table —
|
|
1686
|
+
* #4730, criterion 13. Absent reads as false; anything but a boolean is
|
|
1687
|
+
* refused. Read by the CLI's preflight and by the server from the envelope's
|
|
1688
|
+
* TOML, never stored.
|
|
1689
|
+
*/
|
|
1690
|
+
export declare function declaredPublicOf(functionTable: unknown): {
|
|
1691
|
+
ok: true;
|
|
1692
|
+
value: boolean;
|
|
1693
|
+
} | {
|
|
1694
|
+
ok: false;
|
|
1695
|
+
error: string;
|
|
1696
|
+
};
|
|
1697
|
+
/**
|
|
1698
|
+
* What makes a version write-capable for the public-writer lint — #4730: a
|
|
1699
|
+
* mutation registration, a family the manifest records a write or send verb
|
|
1700
|
+
* on, or a declared `integration:<key>`, high-blast or subject-grant
|
|
1701
|
+
* capability (#4909: a function anyone may invoke that names any member is
|
|
1702
|
+
* the same hazard). One phrase per reason, for the refusal to quote.
|
|
1703
|
+
*/
|
|
1704
|
+
export declare function writeCapableReasons(manifest: FunctionManifest | null, capabilities: readonly string[]): string[];
|
|
1705
|
+
/**
|
|
1706
|
+
* The public-writer refusal — #4730, criterion 13: a version whose manifest
|
|
1707
|
+
* records `authorize.public` (an `allowAnyone()`, or an `allowCallers` arm
|
|
1708
|
+
* that is one) and that is write-capable needs `public = true` under
|
|
1709
|
+
* `[function]`. The sentence names the function, what makes it write-capable
|
|
1710
|
+
* and the fix; null when the push is fine. The CLI refuses at preflight and
|
|
1711
|
+
* the server at push, from this one rule.
|
|
1712
|
+
*/
|
|
1713
|
+
export declare function publicWriterRefusal(input: {
|
|
1714
|
+
functionKey: string;
|
|
1715
|
+
manifest: FunctionManifest | null;
|
|
1716
|
+
capabilities: readonly string[];
|
|
1717
|
+
declaredPublic: boolean;
|
|
1718
|
+
}): string | null;
|
|
1506
1719
|
/**
|
|
1507
1720
|
* The runtime keys a `functions/<key>.toml` no longer decides anything with —
|
|
1508
1721
|
* #3482 retired them, and #3188 (project `server-functions` phase 5) refuses
|
|
@@ -1671,6 +1884,12 @@ export declare function hasRetiredDatabaseTriggerBlock(functionTable: unknown):
|
|
|
1671
1884
|
* as ignored by `ignoredFunctionKeys` in `function-retired-keys.ts`.
|
|
1672
1885
|
*/
|
|
1673
1886
|
/** A function's single webhook trigger, normalized. */
|
|
1887
|
+
/**
|
|
1888
|
+
* The db3 type-name prefix the platform reserves for its own types (#4882,
|
|
1889
|
+
* project `agent-sessions-db3`): no app pushes, attaches or watches a type
|
|
1890
|
+
* whose name starts with it.
|
|
1891
|
+
*/
|
|
1892
|
+
export declare const RESERVED_DB3_TYPE_PREFIX = "primitive:";
|
|
1674
1893
|
export interface WebhookTriggerDeclaration {
|
|
1675
1894
|
verificationScheme: string;
|
|
1676
1895
|
signingSecret?: string;
|
|
@@ -1681,7 +1900,28 @@ export interface WebhookTriggerDeclaration {
|
|
|
1681
1900
|
secretGracePeriodMs?: number;
|
|
1682
1901
|
/** `[function.triggers.webhook.verification]` — the row's `config`. */
|
|
1683
1902
|
verification?: Record<string, unknown>;
|
|
1903
|
+
/**
|
|
1904
|
+
* `[[function.triggers.webhook.handshakeRules]]` — a provider's setup
|
|
1905
|
+
* handshake (Slack `url_verification`, Discord PING, Microsoft Graph
|
|
1906
|
+
* `validationToken`, Meta `hub.challenge`), answered by the receiver after
|
|
1907
|
+
* verification and before the function runs (#3190).
|
|
1908
|
+
*/
|
|
1909
|
+
handshakeRules?: WebhookHandshakeRuleDeclaration[];
|
|
1910
|
+
/** `allowedIpCidrs` — the sender addresses a delivery may come from (#3190). */
|
|
1911
|
+
allowedIpCidrs?: string[];
|
|
1684
1912
|
}
|
|
1913
|
+
/** One handshake rule: a CEL `when` and the response it answers with. */
|
|
1914
|
+
export interface WebhookHandshakeRuleDeclaration {
|
|
1915
|
+
when: string;
|
|
1916
|
+
response: {
|
|
1917
|
+
status?: number;
|
|
1918
|
+
contentType?: string;
|
|
1919
|
+
body?: string;
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
/** The most handshake rules and allowlist entries one webhook block may carry. */
|
|
1923
|
+
export declare const MAX_WEBHOOK_HANDSHAKE_RULES = 10;
|
|
1924
|
+
export declare const MAX_WEBHOOK_IP_CIDRS = 50;
|
|
1685
1925
|
/** One `[[function.triggers.cron]]` entry, normalized. */
|
|
1686
1926
|
export interface CronTriggerDeclaration {
|
|
1687
1927
|
name: string;
|
|
@@ -1690,9 +1930,20 @@ export interface CronTriggerDeclaration {
|
|
|
1690
1930
|
overlapPolicy?: string;
|
|
1691
1931
|
rootInput?: unknown;
|
|
1692
1932
|
}
|
|
1933
|
+
/** One `[[function.triggers.db3]]` entry, normalized (#4803). */
|
|
1934
|
+
export interface Db3TriggerDeclaration {
|
|
1935
|
+
/** The db3 type whose flushes start the function. */
|
|
1936
|
+
type: string;
|
|
1937
|
+
}
|
|
1693
1938
|
export interface TriggerDeclaration {
|
|
1694
1939
|
webhook: WebhookTriggerDeclaration | null;
|
|
1695
1940
|
cron: CronTriggerDeclaration[];
|
|
1941
|
+
/**
|
|
1942
|
+
* `[[function.triggers.db3]]` — present only when the file declares at least
|
|
1943
|
+
* one entry, so a file written before the kind existed stores exactly the
|
|
1944
|
+
* JSON it stored before (#4803).
|
|
1945
|
+
*/
|
|
1946
|
+
db3?: Db3TriggerDeclaration[];
|
|
1696
1947
|
}
|
|
1697
1948
|
export declare const EMPTY_TRIGGER_DECLARATION: TriggerDeclaration;
|
|
1698
1949
|
/**
|
|
@@ -1704,13 +1955,19 @@ export declare const EMPTY_TRIGGER_DECLARATION: TriggerDeclaration;
|
|
|
1704
1955
|
* remaining slots for the other 40+ objects the cap is sized for.
|
|
1705
1956
|
*/
|
|
1706
1957
|
export declare const MAX_CRON_TRIGGERS_PER_FUNCTION = 10;
|
|
1958
|
+
/**
|
|
1959
|
+
* The most db3 types one function may watch — the cron cap's per-object
|
|
1960
|
+
* reasoning (#4803). The per-app ceiling is `MAX_DB3_TRIGGERS_PER_APP`, checked
|
|
1961
|
+
* at the push boundary.
|
|
1962
|
+
*/
|
|
1963
|
+
export declare const MAX_DB3_TRIGGERS_PER_FUNCTION = 10;
|
|
1707
1964
|
/**
|
|
1708
1965
|
* The rule ids this module owns — one per refusal, declared on the `function`
|
|
1709
1966
|
* surface (#3374). The union below closes `refuseTrigger`'s id parameter, so a
|
|
1710
1967
|
* twenty-seventh refusal cannot compile without a twenty-seventh id, and that
|
|
1711
1968
|
* id fails `cli-unit-tests` until the surface declares it (#3373's anchor).
|
|
1712
1969
|
*/
|
|
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"];
|
|
1970
|
+
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
1971
|
export type TriggerRuleId = (typeof TRIGGER_RULE_IDS)[number];
|
|
1715
1972
|
/**
|
|
1716
1973
|
* A broken trigger rule. `ruleId` names which one, for a reader that wants to
|
|
@@ -1751,6 +2008,18 @@ export declare function storedDatabaseTriggerTypes(stored: unknown): string[];
|
|
|
1751
2008
|
export declare function cronTriggerKeyFor(functionKey: string, name: string): string;
|
|
1752
2009
|
/** The entry name a `<functionKey>:<name>` trigger key carries. */
|
|
1753
2010
|
export declare function cronTriggerNameFrom(functionKey: string, triggerKey: string): string;
|
|
2011
|
+
/**
|
|
2012
|
+
* The `ServerFunctionTrigger.triggerKey` a db3 entry owns (#4803):
|
|
2013
|
+
* `<functionKey>:db3:<type>`. A cron name cannot hold `:`, so the key never
|
|
2014
|
+
* collides with a cron entry's `<functionKey>:<name>`.
|
|
2015
|
+
*/
|
|
2016
|
+
export declare function db3TriggerKeyFor(functionKey: string, type: string): string;
|
|
2017
|
+
/**
|
|
2018
|
+
* The type a db3 trigger key carries, or null when the key is not this
|
|
2019
|
+
* function's db3 key. Read by stripping the prefix, never by splitting: a type
|
|
2020
|
+
* name may hold `:` and `/`.
|
|
2021
|
+
*/
|
|
2022
|
+
export declare function db3TriggerTypeFrom(functionKey: string, triggerKey: string): string | null;
|
|
1754
2023
|
/**
|
|
1755
2024
|
* The `{{secrets.KEY}}` reference SHAPE, decided from the value alone.
|
|
1756
2025
|
*
|
|
@@ -1953,78 +2222,6 @@ export declare function validateSigningSecretDeclaration(input: {
|
|
|
1953
2222
|
verificationScheme: string;
|
|
1954
2223
|
signingSecret?: unknown;
|
|
1955
2224
|
}): 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
2225
|
/**
|
|
2029
2226
|
* Cron-expression and timezone VALIDITY — the half of `src/cron-parser.ts`
|
|
2030
2227
|
* both runners need (#3376, project `cli-server-rule-parity` phase 4).
|
|
@@ -2136,15 +2333,6 @@ export declare function isValidTimezone(name: unknown): boolean;
|
|
|
2136
2333
|
* pins. So the grammar and the `Intl` probe live next door in
|
|
2137
2334
|
* `cron-expression.ts`, which is a shared-predicate module rather than a rules
|
|
2138
2335
|
* 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
2336
|
*/
|
|
2149
2337
|
/** The rule ids this module owns — the union type below anchors them (#3373). */
|
|
2150
2338
|
export declare const CRON_TRIGGER_RULE_IDS: readonly ["cron-trigger-expression", "cron-trigger-timezone"];
|
|
@@ -2538,7 +2726,7 @@ export declare function resolvePromptStrictOutput(input: PromptStrictOutputInput
|
|
|
2538
2726
|
* Pure and dependency-free, like every module under `src/config-surface/`.
|
|
2539
2727
|
*/
|
|
2540
2728
|
/** The stable codes every agent agentRefusal this project adds carries. */
|
|
2541
|
-
export declare const AGENT_ERROR_CODES: readonly ["AGENT_DECLARATION_INVALID", "AGENT_TOOL_FUNCTION_MISSING", "AGENT_TOOL_FUNCTION_SCHEMA_MISSING", "AGENT_OUTPUT_SCHEMA_NOT_ALLOWED", "AGENT_CONFIG_KEY_NOT_ALLOWED", "AGENT_NOT_RUNNABLE", "AGENT_TEST_CASE_NOT_SUPPORTED", "AGENT_SCHEMA_NOT_TRANSLATABLE", "AGENT_MODEL_UNKNOWN", "AGENT_MODEL_CAPABILITY_MISSING", "AGENT_MODEL_CAPABILITIES_UNAVAILABLE", "AGENT_ROUND_NOT_AGENT", "AGENT_ROUND_INPUT_INVALID", "AGENT_TOOL_UNKNOWN", "AGENT_TOOL_ARGUMENTS_INVALID", "AGENT_ROUND_TRUNCATED", "AGENT_ROUND_EMPTY", "AGENT_TEST_CASE_INVALID"];
|
|
2729
|
+
export declare const AGENT_ERROR_CODES: readonly ["AGENT_DECLARATION_INVALID", "AGENT_TOOL_FUNCTION_MISSING", "AGENT_TOOL_FUNCTION_SCHEMA_MISSING", "AGENT_OUTPUT_SCHEMA_NOT_ALLOWED", "AGENT_CONFIG_KEY_NOT_ALLOWED", "AGENT_NOT_RUNNABLE", "AGENT_TEST_CASE_NOT_SUPPORTED", "AGENT_SCHEMA_NOT_TRANSLATABLE", "AGENT_MODEL_UNKNOWN", "AGENT_MODEL_CAPABILITY_MISSING", "AGENT_MODEL_CAPABILITIES_UNAVAILABLE", "AGENT_ROUND_NOT_AGENT", "AGENT_ROUND_INPUT_INVALID", "AGENT_TOOL_UNKNOWN", "AGENT_TOOL_ARGUMENTS_INVALID", "AGENT_ROUND_TRUNCATED", "AGENT_ROUND_EMPTY", "AGENT_TEST_CASE_INVALID", "AGENT_PRESENTATION_REFERENCE_INVALID"];
|
|
2542
2730
|
export type AgentErrorCode = (typeof AGENT_ERROR_CODES)[number];
|
|
2543
2731
|
/** One agentRefusal: the code a client branches on, and the sentence a person reads. */
|
|
2544
2732
|
export interface AgentRefusal {
|
|
@@ -2568,9 +2756,16 @@ export declare const AGENT_NAME: RegExp;
|
|
|
2568
2756
|
export declare const AGENT_ANSWERED_BY: readonly ["initiator", "participants"];
|
|
2569
2757
|
export declare const AGENT_TOOL_INVOKE: readonly ["request", "task"];
|
|
2570
2758
|
export declare const AGENT_TOOL_HISTORY_SCOPES: readonly ["session", "turn"];
|
|
2759
|
+
/**
|
|
2760
|
+
* Where a tool without a `function` runs: `client` is answered by a member's
|
|
2761
|
+
* client; `presentation` is data the model hands the client with its final
|
|
2762
|
+
* answer, which no client executes (#4549).
|
|
2763
|
+
*/
|
|
2764
|
+
export declare const AGENT_TOOL_RUNS: readonly ["client", "presentation"];
|
|
2571
2765
|
export type AgentAnsweredBy = (typeof AGENT_ANSWERED_BY)[number];
|
|
2572
2766
|
export type AgentToolInvoke = (typeof AGENT_TOOL_INVOKE)[number];
|
|
2573
2767
|
export type AgentToolHistoryScope = (typeof AGENT_TOOL_HISTORY_SCOPES)[number];
|
|
2768
|
+
export type AgentToolRuns = (typeof AGENT_TOOL_RUNS)[number];
|
|
2574
2769
|
/** A JSON Schema object, as the declaration holds one. */
|
|
2575
2770
|
export type AgentSchema = Record<string, unknown>;
|
|
2576
2771
|
/** One `[[prompt.agent.tools]]` entry, as authored. */
|
|
@@ -2580,17 +2775,26 @@ export interface AgentToolDeclaration {
|
|
|
2580
2775
|
/** A server tool: the function whose schemas are the tool's. */
|
|
2581
2776
|
function?: string;
|
|
2582
2777
|
invoke?: AgentToolInvoke;
|
|
2583
|
-
/**
|
|
2584
|
-
|
|
2778
|
+
/**
|
|
2779
|
+
* `client`: answered by a member's client, schemas in the TOML.
|
|
2780
|
+
* `presentation`: data the model hands the client with its final answer;
|
|
2781
|
+
* its call ends the turn and is never answered.
|
|
2782
|
+
*/
|
|
2783
|
+
runs?: AgentToolRuns;
|
|
2784
|
+
/**
|
|
2785
|
+
* A presentation's input properties whose integers name earlier calls of
|
|
2786
|
+
* the turn by the number the platform gave them (`callNumber`).
|
|
2787
|
+
*/
|
|
2788
|
+
references?: string[];
|
|
2585
2789
|
inputSchema?: AgentSchema;
|
|
2586
2790
|
outputSchema?: AgentSchema;
|
|
2587
2791
|
approval?: boolean;
|
|
2588
2792
|
statusText?: string;
|
|
2589
2793
|
historyScope?: AgentToolHistoryScope;
|
|
2590
2794
|
/**
|
|
2591
|
-
* A call to this tool ends the turn: once every call of its response
|
|
2592
|
-
* final, the turn settles with no further model round. A
|
|
2593
|
-
*
|
|
2795
|
+
* A call to this server tool ends the turn: once every call of its response
|
|
2796
|
+
* is final, the turn settles with no further model round. A presentation
|
|
2797
|
+
* always does.
|
|
2594
2798
|
*/
|
|
2595
2799
|
endsTurn?: boolean;
|
|
2596
2800
|
}
|
|
@@ -2623,14 +2827,14 @@ export type NormalizedAgentTool = AgentToolDeclaration & {
|
|
|
2623
2827
|
endsTurn: boolean;
|
|
2624
2828
|
};
|
|
2625
2829
|
/**
|
|
2626
|
-
* The result the platform records for a call
|
|
2627
|
-
*
|
|
2628
|
-
*
|
|
2830
|
+
* The result the platform records for a presentation call: the call is final
|
|
2831
|
+
* when its response is committed, and later rounds read this as its tool
|
|
2832
|
+
* result.
|
|
2629
2833
|
*/
|
|
2630
2834
|
export declare const AGENT_TERMINAL_CALL_OUTPUT: {
|
|
2631
2835
|
delivered: true;
|
|
2632
2836
|
};
|
|
2633
|
-
/** The schema of `AGENT_TERMINAL_CALL_OUTPUT
|
|
2837
|
+
/** The schema of `AGENT_TERMINAL_CALL_OUTPUT`, the result a presentation call is recorded with. */
|
|
2634
2838
|
export declare const AGENT_TERMINAL_CALL_OUTPUT_SCHEMA: AgentSchema;
|
|
2635
2839
|
/** The declaration with every default applied — what readers consume. */
|
|
2636
2840
|
export interface NormalizedAgentDeclaration {
|
|
@@ -2786,10 +2990,31 @@ export declare function agentRoundNotAgentRefusal(promptKey: string): AgentRefus
|
|
|
2786
2990
|
* `evaluator` is the one role left.
|
|
2787
2991
|
*/
|
|
2788
2992
|
export declare function agentTestCaseRefusal(promptKey: string, _role?: "evaluator"): AgentRefusal;
|
|
2993
|
+
/** An earlier call of the turn, as a presentation's references are checked against it. */
|
|
2994
|
+
export interface AgentReferencedCall {
|
|
2995
|
+
/** The number the platform gave the call in its turn (1 for the turn's first). */
|
|
2996
|
+
callNumber: number;
|
|
2997
|
+
toolName: string;
|
|
2998
|
+
/** The call's row state; only `output-available` may be referenced. */
|
|
2999
|
+
state: string;
|
|
3000
|
+
}
|
|
3001
|
+
/**
|
|
3002
|
+
* The refusal of a presentation call whose `references` name a number that
|
|
3003
|
+
* is not an earlier call of the turn with a result — a refused call, a number
|
|
3004
|
+
* the turn never gave, or a call of the same response — or `null`. `earlier`
|
|
3005
|
+
* is the turn's calls committed before this call's response. The message
|
|
3006
|
+
* lists the offending values by property and the numbers that may be
|
|
3007
|
+
* referenced, with their tools, so the model can correct itself next round.
|
|
3008
|
+
*/
|
|
3009
|
+
export declare function presentationReferenceRefusal(tool: {
|
|
3010
|
+
name: string;
|
|
3011
|
+
references?: readonly string[];
|
|
3012
|
+
}, args: unknown, earlier: readonly AgentReferencedCall[]): AgentRefusal | null;
|
|
2789
3013
|
/**
|
|
2790
3014
|
* The declaration with every default applied: `answeredBy = "initiator"`, the
|
|
2791
3015
|
* platform maximums for the limits, and per tool `invoke = "request"` (server
|
|
2792
|
-
* tools), `approval = false`, `historyScope = "session"` and `endsTurn = false
|
|
3016
|
+
* tools), `approval = false`, `historyScope = "session"` and `endsTurn = false`
|
|
3017
|
+
* — `endsTurn = true` for a presentation, whose call always ends the turn.
|
|
2793
3018
|
*
|
|
2794
3019
|
* The ONLY accessor for defaults — the stored value never carries them
|
|
2795
3020
|
* (DSO-3798-001). Takes a value `resolveAgentDeclaration` accepted (or `null`)
|
|
@@ -2802,11 +3027,9 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
|
|
|
2802
3027
|
*
|
|
2803
3028
|
* A tool or event schema reaches a provider only through a translation that
|
|
2804
3029
|
* preserves its meaning; anything else is refused at push, naming the path, the
|
|
2805
|
-
* keyword and the provider.
|
|
2806
|
-
* (
|
|
2807
|
-
* references and
|
|
2808
|
-
* what the model may produce. It stays where it is, for chat output schemas
|
|
2809
|
-
* (the project's non-goal: chat is unchanged).
|
|
3030
|
+
* keyword and the provider. A chat prompt's output schema goes to Gemini
|
|
3031
|
+
* through this translator too (#5538), in place of the lossy clean-up that
|
|
3032
|
+
* dropped unions and references and rewrote a free-form object as a string.
|
|
2810
3033
|
*
|
|
2811
3034
|
* ## What "lossless" means (spec §3)
|
|
2812
3035
|
*
|
|
@@ -2825,7 +3048,7 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
|
|
|
2825
3048
|
* the structured error the model sees, and a model following `properties` is
|
|
2826
3049
|
* never told it may add keys. Refusing it instead would put the platform's own
|
|
2827
3050
|
* closed-object marker — `additionalProperties: false` is how
|
|
2828
|
-
* `src/
|
|
3051
|
+
* `src/function-runs/schema-descriptor.ts` spells a closed object — outside
|
|
2829
3052
|
* Gemini's reach.
|
|
2830
3053
|
*
|
|
2831
3054
|
* The TRANSLATED schema is what the provider is sent; the ORIGINAL is what the
|
|
@@ -2847,9 +3070,14 @@ export declare function normalizeAgentDeclaration(declaration: AgentDeclaration
|
|
|
2847
3070
|
* `items`. Lowercase type names are accepted (the existing `responseSchema`
|
|
2848
3071
|
* path already sends them).
|
|
2849
3072
|
*
|
|
2850
|
-
*
|
|
2851
|
-
*
|
|
2852
|
-
*
|
|
3073
|
+
* Which keywords pass, drop, take a rule or are refused is the keyword table's
|
|
3074
|
+
* `gemini` column (`SCHEMA_KEYWORDS` in `src/function-runs/schema-descriptor.ts`,
|
|
3075
|
+
* #5529), so the translator, the validator and the push refusal list read one
|
|
3076
|
+
* classification. That module is dependency-free and vendored to the CLI whole,
|
|
3077
|
+
* so this one stays pure: the CLI artifact generator rewrites its import to the
|
|
3078
|
+
* vendored copy. This module is vendored into the CLI artifact after
|
|
3079
|
+
* `agent-declaration.ts` so the push preflight and the admin routes refuse
|
|
3080
|
+
* exactly the same schemas.
|
|
2853
3081
|
*/
|
|
2854
3082
|
/** The providers a prompt config may name. */
|
|
2855
3083
|
export type SchemaProvider = "openrouter" | "gemini";
|
|
@@ -2872,6 +3100,27 @@ export type SchemaTranslation = {
|
|
|
2872
3100
|
ok: false;
|
|
2873
3101
|
refusals: SchemaTranslationRefusal[];
|
|
2874
3102
|
};
|
|
3103
|
+
/**
|
|
3104
|
+
* What Gemini's function `Schema` does with one keyword, from the keyword
|
|
3105
|
+
* table: `pass` (spelled the same way, with the same meaning — `required`
|
|
3106
|
+
* among them, and Gemini's own `nullable`, `propertyOrdering` and `example`),
|
|
3107
|
+
* `drop` (an annotation with no value meaning, dropped in silence, spec §3),
|
|
3108
|
+
* `rule` (handled by its own rule below) or `refuse`. A key the table does not
|
|
3109
|
+
* name is refused: a keyword nobody classified could mean anything.
|
|
3110
|
+
*/
|
|
3111
|
+
export declare function geminiKeywordVerdict(keyword: string): GeminiKeywordVerdict;
|
|
3112
|
+
/**
|
|
3113
|
+
* Keywords handled by their own rule below: exactly the table's `rule` rows,
|
|
3114
|
+
* which the keyword-table conformance test holds it to.
|
|
3115
|
+
*/
|
|
3116
|
+
export declare const GEMINI_STRUCTURAL_KEYWORDS: readonly ["type", "enum", "const", "format", "properties", "items", "anyOf", "oneOf", "additionalProperties"];
|
|
3117
|
+
/**
|
|
3118
|
+
* Why Gemini's function `Schema` cannot carry a refused keyword, for the ones
|
|
3119
|
+
* with a reason of their own. Each is refused rather than dropped: dropping any
|
|
3120
|
+
* of them widens what the model may produce. A refused keyword with no entry
|
|
3121
|
+
* here gets the generic reason.
|
|
3122
|
+
*/
|
|
3123
|
+
export declare const GEMINI_REFUSAL_REASONS: Readonly<Record<string, string>>;
|
|
2875
3124
|
/** What a message calls the root. */
|
|
2876
3125
|
export declare function schemaPathLabel(path: string): string;
|
|
2877
3126
|
/**
|
|
@@ -2951,6 +3200,143 @@ export type AgentSchemaDeficit = {
|
|
|
2951
3200
|
export declare function agentSchemaTranslationDeficits(input: AgentSchemaTranslationInput): AgentSchemaDeficit[];
|
|
2952
3201
|
/** The `AGENT_SCHEMA_NOT_TRANSLATABLE` refusal one deficit renders as. */
|
|
2953
3202
|
export declare function agentSchemaDeficitRefusal(deficit: AgentSchemaDeficit): AgentRefusal;
|
|
3203
|
+
/**
|
|
3204
|
+
* What a prompt push refuses — #5536 (project `unified-schemas` phase 5)
|
|
3205
|
+
* reported it, #5538 (phase 6, intent criterion 8) refuses it.
|
|
3206
|
+
*
|
|
3207
|
+
* Two checks judge a prompt's schemas: the lossless Gemini translator
|
|
3208
|
+
* (`translateSchemaForProvider`) on the output schemas a Gemini config sends,
|
|
3209
|
+
* and the engine (the function push's rules) on every schema. A write
|
|
3210
|
+
* carrying a keyword either would refuse is refused, each keyword named with
|
|
3211
|
+
* its fix and a code: `PROMPT_SCHEMA_NOT_TRANSLATABLE` for the translator,
|
|
3212
|
+
* `PROMPT_SCHEMA_UNSUPPORTED_KEYWORD` for the engine. The admin prompt routes,
|
|
3213
|
+
* the CLI preflight (through the vendored copy), the Gemini call path and the
|
|
3214
|
+
* audit (`scripts/lib/schema-audit-core.ts`) all read this module, so they
|
|
3215
|
+
* cannot disagree about which schemas are refused.
|
|
3216
|
+
*
|
|
3217
|
+
* An agent's translator refusals are not here: they are already the push
|
|
3218
|
+
* error `AGENT_SCHEMA_NOT_TRANSLATABLE` (DSO-5536-002).
|
|
3219
|
+
*/
|
|
3220
|
+
/**
|
|
3221
|
+
* The code a prompt write is refused with for a keyword the lossless Gemini
|
|
3222
|
+
* translator cannot carry, and the code a run of a stored prompt whose output
|
|
3223
|
+
* schema it cannot carry fails with.
|
|
3224
|
+
*/
|
|
3225
|
+
export declare const PROMPT_SCHEMA_NOT_TRANSLATABLE = "PROMPT_SCHEMA_NOT_TRANSLATABLE";
|
|
3226
|
+
/** The code a prompt write is refused with for a keyword or a shape the schema check would not enforce. */
|
|
3227
|
+
export declare const PROMPT_SCHEMA_UNSUPPORTED_KEYWORD = "PROMPT_SCHEMA_UNSUPPORTED_KEYWORD";
|
|
3228
|
+
/** One keyword the engine would not enforce: where, which, and why (with its fix). */
|
|
3229
|
+
export interface EngineSchemaRefusal {
|
|
3230
|
+
/** The dotted path from the schema root; `""` is the root. */
|
|
3231
|
+
path: string;
|
|
3232
|
+
keyword: string;
|
|
3233
|
+
reason: string;
|
|
3234
|
+
}
|
|
3235
|
+
/**
|
|
3236
|
+
* The fix for each keyword the engine refuses: one entry per refused row of
|
|
3237
|
+
* the keyword table, and no other key.
|
|
3238
|
+
*/
|
|
3239
|
+
export declare const ENGINE_REFUSAL_FIXES: Readonly<Record<string, string>>;
|
|
3240
|
+
/**
|
|
3241
|
+
* The fix for a translator refusal whose reason states only what would be
|
|
3242
|
+
* lost, appended to the refusal line (DSO-5536-008: the translator's own
|
|
3243
|
+
* texts are refusal texts elsewhere and stay as they are). `"*"` is the fix
|
|
3244
|
+
* for a keyword the translator has no reason of its own for.
|
|
3245
|
+
*/
|
|
3246
|
+
export declare const TRANSLATOR_REFUSAL_FIXES: Readonly<Record<string, string>>;
|
|
3247
|
+
/**
|
|
3248
|
+
* Every keyword of `schema` the function push's rules refuse, over the nodes
|
|
3249
|
+
* they check (the root, `properties`, `items`, `anyOf`, `oneOf`; never
|
|
3250
|
+
* `$defs`): the keyword table's refused class, each reason ending with its
|
|
3251
|
+
* fix, and the shape rules. An enforced constraint (`uniqueItems`,
|
|
3252
|
+
* `multipleOf`, …) is never one: only the translator refuses those.
|
|
3253
|
+
*
|
|
3254
|
+
* The walk keeps its own work stack rather than recursing: the compiler
|
|
3255
|
+
* accepts a schema nested deeper than the call stack, and every refusal must
|
|
3256
|
+
* still be named for it.
|
|
3257
|
+
*/
|
|
3258
|
+
export declare function engineSchemaRefusals(schema: unknown, path?: string): EngineSchemaRefusal[];
|
|
3259
|
+
/**
|
|
3260
|
+
* The schemas an agent's model reads from its declaration (a table or one
|
|
3261
|
+
* JSON string): each client tool's `inputSchema` and `outputSchema`, each
|
|
3262
|
+
* event's `schema` and the turn context's. Never a server tool's: those are
|
|
3263
|
+
* its function's, judged at the function push.
|
|
3264
|
+
*/
|
|
3265
|
+
export declare function agentDeclarationSchemas(agent: unknown): Array<{
|
|
3266
|
+
subject: string;
|
|
3267
|
+
schema: unknown;
|
|
3268
|
+
}>;
|
|
3269
|
+
/** What `promptSchemaDeficits` judges: the schema fields a write carries, and the prompt's configs. */
|
|
3270
|
+
export interface PromptSchemaDeficitInput {
|
|
3271
|
+
inputSchema?: unknown;
|
|
3272
|
+
outputSchema?: unknown;
|
|
3273
|
+
/** `[prompt.agent]`: a table or one JSON string. */
|
|
3274
|
+
agent?: unknown;
|
|
3275
|
+
/** The configs that decide whether `outputSchema` targets Gemini; each config's own `outputSchema` is judged too. */
|
|
3276
|
+
configs?: ReadonlyArray<{
|
|
3277
|
+
name: string;
|
|
3278
|
+
provider: string;
|
|
3279
|
+
status?: string | null;
|
|
3280
|
+
outputSchema?: unknown;
|
|
3281
|
+
}>;
|
|
3282
|
+
}
|
|
3283
|
+
/** One keyword the translator or the engine would refuse, in one schema of a prompt. */
|
|
3284
|
+
export interface PromptSchemaDeficit {
|
|
3285
|
+
/** `inputSchema`, `outputSchema`, `config "fast" outputSchema`, `agent tool "pick" inputSchema`, … */
|
|
3286
|
+
subject: string;
|
|
3287
|
+
field: "inputSchema" | "outputSchema" | "agent";
|
|
3288
|
+
/** The config whose own `outputSchema` this is. */
|
|
3289
|
+
config?: string;
|
|
3290
|
+
check: "translator" | "engine";
|
|
3291
|
+
provider?: "gemini";
|
|
3292
|
+
/** The dotted path from the schema root; `""` is the root. */
|
|
3293
|
+
path: string;
|
|
3294
|
+
keyword: string;
|
|
3295
|
+
reason: string;
|
|
3296
|
+
}
|
|
3297
|
+
/**
|
|
3298
|
+
* `translateSchemaForProvider(schema, "gemini")`, failing closed. The
|
|
3299
|
+
* translator recurses, so a schema nested deeper than the call stack cannot be
|
|
3300
|
+
* translated: it is one refusal about the whole document (`(schema)`, the
|
|
3301
|
+
* engine's spelling), so a schema Gemini would never be sent is refused at
|
|
3302
|
+
* push and at call time rather than accepted unread. Any other error is a
|
|
3303
|
+
* fault and propagates.
|
|
3304
|
+
*/
|
|
3305
|
+
export declare function translateSchemaForGemini(schema: unknown): SchemaTranslation;
|
|
3306
|
+
/** The translator's refusals for one schema: `translateSchemaForGemini`'s, or none. */
|
|
3307
|
+
export declare function translatorRefusals(schema: unknown): SchemaTranslationRefusal[];
|
|
3308
|
+
/**
|
|
3309
|
+
* Every keyword of a prompt's schemas the translator or the engine would
|
|
3310
|
+
* refuse. The translator judges `outputSchema` when a non-archived config
|
|
3311
|
+
* names Gemini (case-insensitive), and each Gemini config's own
|
|
3312
|
+
* `outputSchema` unless that config is archived; `inputSchema` is never
|
|
3313
|
+
* translated, and an agent's schemas are judged by the engine only. Order:
|
|
3314
|
+
* `inputSchema`, `outputSchema`, the agent's schemas, then each config; per
|
|
3315
|
+
* schema the translator first. A top-level value that is no schema object
|
|
3316
|
+
* is reported once, by the engine.
|
|
3317
|
+
*/
|
|
3318
|
+
export declare function promptSchemaDeficits(input: PromptSchemaDeficitInput): PromptSchemaDeficit[];
|
|
3319
|
+
/**
|
|
3320
|
+
* The refusal line for one deficit: the subject, the path, the keyword, why,
|
|
3321
|
+
* and the fix. A translator reason with no fix of its own names what Gemini
|
|
3322
|
+
* needs instead (`properties`, `type`, the overflow's "flatten the schema").
|
|
3323
|
+
*/
|
|
3324
|
+
export declare function promptSchemaRefusalLine(deficit: PromptSchemaDeficit): string;
|
|
3325
|
+
/** The code a write is refused with for one deficit. */
|
|
3326
|
+
export declare function promptSchemaDeficitCode(deficit: PromptSchemaDeficit): typeof PROMPT_SCHEMA_NOT_TRANSLATABLE | typeof PROMPT_SCHEMA_UNSUPPORTED_KEYWORD;
|
|
3327
|
+
/** One entry of a refused write's `details.refusals`. */
|
|
3328
|
+
export interface PromptSchemaRefusalEntry {
|
|
3329
|
+
code: typeof PROMPT_SCHEMA_NOT_TRANSLATABLE | typeof PROMPT_SCHEMA_UNSUPPORTED_KEYWORD;
|
|
3330
|
+
/** `promptSchemaRefusalLine` of the deficit. */
|
|
3331
|
+
message: string;
|
|
3332
|
+
subject: string;
|
|
3333
|
+
field: PromptSchemaDeficit["field"];
|
|
3334
|
+
config?: string;
|
|
3335
|
+
path: string;
|
|
3336
|
+
keyword: string;
|
|
3337
|
+
}
|
|
3338
|
+
/** A refused write's `details.refusals`: one entry per deficit, in `promptSchemaDeficits` order. */
|
|
3339
|
+
export declare function promptSchemaRefusals(deficits: readonly PromptSchemaDeficit[]): PromptSchemaRefusalEntry[];
|
|
2954
3340
|
/**
|
|
2955
3341
|
* A change to a server function that an agent uses — issue #4441.
|
|
2956
3342
|
*
|
|
@@ -3125,8 +3511,6 @@ export type AgentTestCaseResolution = {
|
|
|
3125
3511
|
export declare function resolveAgentTestCase(input: AgentTestCaseInput): AgentTestCaseResolution;
|
|
3126
3512
|
export declare const PROMPT_SURFACE: ConfigObjectSurface;
|
|
3127
3513
|
export declare const INTEGRATION_SURFACE: ConfigObjectSurface;
|
|
3128
|
-
export declare const WEBHOOK_SURFACE: ConfigObjectSurface;
|
|
3129
|
-
export declare const CRON_TRIGGER_SURFACE: ConfigObjectSurface;
|
|
3130
3514
|
export declare const BLOB_BUCKET_SURFACE: ConfigObjectSurface;
|
|
3131
3515
|
/**
|
|
3132
3516
|
* The `email-template` configuration object's definition (issue #2644, phase 2).
|
|
@@ -3168,30 +3552,79 @@ export declare function isRetiredEmailType(emailType: string): emailType is Reti
|
|
|
3168
3552
|
export declare function retiredEmailTypeGuidance(emailType: string): string;
|
|
3169
3553
|
export declare const EMAIL_TEMPLATE_SURFACE: ConfigObjectSurface;
|
|
3170
3554
|
export declare const DATABASE_TYPE_SURFACE: ConfigObjectSurface;
|
|
3171
|
-
export declare const
|
|
3172
|
-
|
|
3173
|
-
export
|
|
3174
|
-
|
|
3555
|
+
export declare const DB3_TYPE_SURFACE: ConfigObjectSurface;
|
|
3556
|
+
/** A retired rule-set resource type: the code and sentence a refusal carries. */
|
|
3557
|
+
export interface RetiredRuleSetResourceType {
|
|
3558
|
+
code: string;
|
|
3559
|
+
message: string;
|
|
3560
|
+
}
|
|
3175
3561
|
/**
|
|
3176
|
-
*
|
|
3177
|
-
*
|
|
3178
|
-
*
|
|
3179
|
-
* `transforms/<name>.rhai`, a Rhai source file, and its whole authored surface
|
|
3180
|
-
* is the script body. `config pull` writes the active `ScriptConfig`'s body and
|
|
3181
|
-
* `config push` sends it back; there is no key/value table to define, and the
|
|
3182
|
-
* `Script` / `ScriptConfig` scalars around it (name, description, inputSchema,
|
|
3183
|
-
* limits, status) are not authorable through the sync slot today.
|
|
3562
|
+
* Rule-set resource types that no longer exist (#4959), with the one refusal
|
|
3563
|
+
* both the rule-set routes and `config push`'s preflight answer for a set of
|
|
3564
|
+
* that type, so the two cannot drift.
|
|
3184
3565
|
*
|
|
3185
|
-
*
|
|
3186
|
-
*
|
|
3187
|
-
*
|
|
3188
|
-
* is precisely the "absent from a hand-written list" failure mode this epic
|
|
3189
|
-
* exists to end.
|
|
3566
|
+
* `lock` — locks are server-function-only, and the calling function's
|
|
3567
|
+
* `authorize` decides who may lock which key. A stored row can still be listed
|
|
3568
|
+
* and deleted; nothing evaluates it.
|
|
3190
3569
|
*/
|
|
3191
|
-
export declare const
|
|
3570
|
+
export declare const RETIRED_RULE_SET_RESOURCE_TYPES: Record<string, RetiredRuleSetResourceType>;
|
|
3571
|
+
/** The retirement for `resourceType`, or `null` for a live type. */
|
|
3572
|
+
export declare function retiredRuleSetResourceType(resourceType: unknown): RetiredRuleSetResourceType | null;
|
|
3573
|
+
export declare const RULE_SET_SURFACE: ConfigObjectSurface;
|
|
3574
|
+
export declare const METADATA_CATEGORY_CONFIG_SURFACE: ConfigObjectSurface;
|
|
3192
3575
|
export declare const SERVER_FUNCTION_SURFACE: ConfigObjectSurface;
|
|
3576
|
+
/**
|
|
3577
|
+
* The refusal of a new version whose default export has no `authorize`: it
|
|
3578
|
+
* names the function and shows the object form with the function's key. A
|
|
3579
|
+
* `file` prefixes the sentence the way the CLI reports a file it refuses.
|
|
3580
|
+
*/
|
|
3581
|
+
export declare function authorizeRequiredMessage(functionKey: string, file?: string): string;
|
|
3582
|
+
/**
|
|
3583
|
+
* The refusal of a version that declares `public = true` and has no
|
|
3584
|
+
* `authorize` — #5840. `public = true` opens the function to signed-out
|
|
3585
|
+
* callers, and the version's own `authorize` is what decides about them.
|
|
3586
|
+
*/
|
|
3587
|
+
export declare function publicRequiresAuthorizeMessage(functionKey: string, file?: string): string;
|
|
3588
|
+
/**
|
|
3589
|
+
* The refusal of a new version that defines `authorize` while its TOML still
|
|
3590
|
+
* carries `access`.
|
|
3591
|
+
*/
|
|
3592
|
+
export declare function accessAmbiguousMessage(functionKey: string): string;
|
|
3593
|
+
/** The refusal of a create or update body that carries `access`. */
|
|
3594
|
+
export declare const FUNCTION_ACCESS_FROZEN_REQUEST: string;
|
|
3193
3595
|
export declare const TEST_CASE_SURFACE: ConfigObjectSurface;
|
|
3194
3596
|
export declare const APP_SETTINGS_SURFACE: ConfigObjectSurface;
|
|
3597
|
+
/**
|
|
3598
|
+
* The `user-properties` configuration object's definition (#5385, project
|
|
3599
|
+
* `user-index-properties` phase 2).
|
|
3600
|
+
*
|
|
3601
|
+
* `user-properties.toml` is a root singleton beside `app.toml`, so — like
|
|
3602
|
+
* `app-settings` and `test-case` — it is named explicitly rather than reached
|
|
3603
|
+
* through `SYNC_RESOURCE_TYPES`. Its keys are the app's own: each
|
|
3604
|
+
* `[fields.<name>]` table declares a property in the db3 field grammar plus
|
|
3605
|
+
* `client`, and each `[[unique_constraints]]` entry names two or more of them.
|
|
3606
|
+
* There is no fixed key/value table to define, so the surface declares
|
|
3607
|
+
* `noFieldTable`; the file is parsed, normalized and judged by one module,
|
|
3608
|
+
* `src/user-index/properties-schema.ts`, which the CLI vendors byte for byte
|
|
3609
|
+
* (`cli/src/lib/user-properties/generated-properties-schema.ts`) and which
|
|
3610
|
+
* `config push`'s preflight runs before anything is applied. The pushed
|
|
3611
|
+
* schema is stored on the app's `UserPropertiesConfig` row.
|
|
3612
|
+
*/
|
|
3613
|
+
export declare const USER_PROPERTIES_SURFACE: ConfigObjectSurface;
|
|
3614
|
+
/**
|
|
3615
|
+
* The `schema` configuration object's definition (#5532, project
|
|
3616
|
+
* `unified-schemas` phase 3).
|
|
3617
|
+
*
|
|
3618
|
+
* `schemas/<file>.toml` holds shared shapes: each `[defs.<Name>]` table is
|
|
3619
|
+
* one JSON Schema document, named by the file's stem and the def's name
|
|
3620
|
+
* (`schemas:<file>#/$defs/<Name>`). There is no fixed key/value table to
|
|
3621
|
+
* define, so the surface declares `noFieldTable`; the file is checked and
|
|
3622
|
+
* compiled by one module, `src/function-runs/schema-file.ts`, which the CLI
|
|
3623
|
+
* vendors (`cli/src/lib/schema-codegen/generated-schema-file.ts`), runs in
|
|
3624
|
+
* `config push`'s preflight and sends compiled with the source, and which the
|
|
3625
|
+
* push route runs again.
|
|
3626
|
+
*/
|
|
3627
|
+
export declare const SCHEMA_FILE_SURFACE: ConfigObjectSurface;
|
|
3195
3628
|
/**
|
|
3196
3629
|
* The configuration-object registry (issue #2644).
|
|
3197
3630
|
*
|
|
@@ -3208,9 +3641,10 @@ export declare const APP_SETTINGS_SURFACE: ConfigObjectSurface;
|
|
|
3208
3641
|
/**
|
|
3209
3642
|
* Every configuration object whose field surface is defined here.
|
|
3210
3643
|
*
|
|
3211
|
-
* One entry per `SYNC_RESOURCE_TYPES` label, plus the
|
|
3212
|
-
* round-trip without being a per-entity file: `app-settings` (`app.toml`)
|
|
3213
|
-
* `
|
|
3644
|
+
* One entry per `SYNC_RESOURCE_TYPES` label, plus the three surfaces that
|
|
3645
|
+
* round-trip without being a per-entity file: `app-settings` (`app.toml`),
|
|
3646
|
+
* `user-properties` (`user-properties.toml`, #5385) and `test-case`
|
|
3647
|
+
* (`<key>.tests/`). Nothing that syncs sits outside the registry —
|
|
3214
3648
|
* `PENDING_MIGRATION`, the migration's temporary exemption list, is gone as of
|
|
3215
3649
|
* phase 3, so a new synced type has nowhere to be parked and fails the registry
|
|
3216
3650
|
* guard until it is defined (#2644 criterion 3).
|