primitive-admin 1.2.0-alpha.9 → 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 +93 -27
- package/dist/bin/primitive.js +15 -89
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/admins.js +80 -17
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/agent-sessions.d.ts +129 -0
- package/dist/src/commands/agent-sessions.js +532 -20
- package/dist/src/commands/agent-sessions.js.map +1 -1
- package/dist/src/commands/analytics.js +207 -155
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps-children.js +3 -0
- package/dist/src/commands/apps-children.js.map +1 -1
- package/dist/src/commands/apps-transitions.d.ts +39 -0
- package/dist/src/commands/apps-transitions.js +198 -0
- package/dist/src/commands/apps-transitions.js.map +1 -0
- package/dist/src/commands/apps.d.ts +17 -0
- package/dist/src/commands/apps.js +108 -3
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/auth-sessions.js +2 -0
- package/dist/src/commands/auth-sessions.js.map +1 -1
- package/dist/src/commands/auth.js +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/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/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/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 +518 -546
- package/dist/src/commands/sync.js +3010 -4877
- 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 +1818 -438
- package/dist/src/lib/api-client.js +965 -544
- 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 -1
- package/dist/src/lib/child-apps-local.js +9 -1
- package/dist/src/lib/child-apps-local.js.map +1 -1
- package/dist/src/lib/cli-manifest.d.ts +9 -0
- package/dist/src/lib/cli-manifest.js +10 -1
- package/dist/src/lib/cli-manifest.js.map +1 -1
- package/dist/src/lib/cli-version.d.ts +14 -0
- package/dist/src/lib/cli-version.js +38 -0
- package/dist/src/lib/cli-version.js.map +1 -0
- package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
- package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
- package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
- package/dist/src/lib/collection-export.d.ts +76 -15
- package/dist/src/lib/collection-export.js +116 -23
- package/dist/src/lib/collection-export.js.map +1 -1
- package/dist/src/lib/collection-principal.d.ts +22 -0
- package/dist/src/lib/collection-principal.js +35 -0
- package/dist/src/lib/collection-principal.js.map +1 -0
- package/dist/src/lib/command-groups.d.ts +30 -0
- package/dist/src/lib/command-groups.js +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-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 +538 -141
- package/dist/src/lib/generated-config-surfaces.js +1772 -1854
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/hosting-build.d.ts +97 -0
- package/dist/src/lib/hosting-build.js +204 -0
- package/dist/src/lib/hosting-build.js.map +1 -0
- package/dist/src/lib/hosting-client.d.ts +167 -0
- package/dist/src/lib/hosting-client.js +340 -0
- package/dist/src/lib/hosting-client.js.map +1 -0
- package/dist/src/lib/hosting-environments.d.ts +32 -0
- package/dist/src/lib/hosting-environments.js +74 -0
- package/dist/src/lib/hosting-environments.js.map +1 -0
- package/dist/src/lib/hosting-errors.d.ts +30 -0
- package/dist/src/lib/hosting-errors.js +43 -0
- package/dist/src/lib/hosting-errors.js.map +1 -0
- package/dist/src/lib/hosting-token.d.ts +46 -0
- package/dist/src/lib/hosting-token.js +60 -0
- package/dist/src/lib/hosting-token.js.map +1 -0
- package/dist/src/lib/hosting-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 +36 -12
- package/dist/src/lib/prompt-schema-codegen.js +96 -100
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
- package/dist/src/lib/prompt-schema-document.d.ts +35 -0
- package/dist/src/lib/prompt-schema-document.js +92 -0
- package/dist/src/lib/prompt-schema-document.js.map +1 -0
- package/dist/src/lib/prompt-schema-refs.d.ts +173 -0
- package/dist/src/lib/prompt-schema-refs.js +478 -0
- package/dist/src/lib/prompt-schema-refs.js.map +1 -0
- package/dist/src/lib/records-verbs.d.ts +79 -0
- package/dist/src/lib/records-verbs.js +45 -0
- package/dist/src/lib/records-verbs.js.map +1 -0
- package/dist/src/lib/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 +2 -1
- package/dist/src/lib/swift-codegen/agentGenerator.js +25 -23
- package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
- package/dist/src/lib/swift-codegen/banners.js +12 -0
- package/dist/src/lib/swift-codegen/banners.js.map +1 -1
- package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
- package/dist/src/lib/swift-codegen/functionGenerator.js +169 -51
- package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +33 -9
- package/dist/src/lib/swift-codegen/schemaToSwift.js +215 -179
- package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
- package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +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/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
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED FILE — DO NOT EDIT BY HAND.
|
|
3
|
+
*
|
|
4
|
+
* Vendored from the canonical server module
|
|
5
|
+
* `src/function-runs/schema-refs.ts` — the SAME interpretation the server
|
|
6
|
+
* applies to a function's schemas. The CLI cannot import server `src/`
|
|
7
|
+
* at runtime, so the CLI imports this committed copy instead.
|
|
8
|
+
*
|
|
9
|
+
* Regenerate with:
|
|
10
|
+
* node cli/scripts/gen-schema-descriptor.mjs (runs at CLI prebuild)
|
|
11
|
+
*
|
|
12
|
+
* A CI freshness guard
|
|
13
|
+
* (`cli/scripts/gen-schema-descriptor.mjs --check`, also asserted by
|
|
14
|
+
* `cli/tests/unit/schema-codegen-descriptor-drift-guard.test.ts`) fails if
|
|
15
|
+
* this committed copy does not match the source — see issue #1442 / #998.
|
|
16
|
+
*/
|
|
17
|
+
import { SCHEMA_CANONICAL_INVALID, type SchemaProvenance } from "./generated-schema-provenance.js";
|
|
18
|
+
import { type Db3Projection } from "./generated-db3-bridge.js";
|
|
19
|
+
/** The family prefixes a `$ref` resolves through once shared shapes ship. */
|
|
20
|
+
export declare const REF_FAMILY_PREFIXES: readonly ["schemas:", "fn:", "prompt:", "db3:"];
|
|
21
|
+
/** The caps a compiled document is held to, after expansion. */
|
|
22
|
+
export interface SchemaExpansionLimits {
|
|
23
|
+
/** UTF-8 bytes of the compiled document's JSON. */
|
|
24
|
+
bytes: number;
|
|
25
|
+
/** JSON objects and arrays in the compiled document. */
|
|
26
|
+
nodes: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The caps on a compiled schema that inlined at least one ref: 160 KiB and
|
|
30
|
+
* 2048 objects and arrays. A function row holds both of its schemas inline,
|
|
31
|
+
* so the byte cap leaves room for the other schema under the row budget.
|
|
32
|
+
*/
|
|
33
|
+
export declare const SCHEMA_EXPANSION_LIMITS: Readonly<SchemaExpansionLimits>;
|
|
34
|
+
/**
|
|
35
|
+
* The bytes a function row may spend on its two compiled schemas together
|
|
36
|
+
* (320 KiB), checked when a write inlined a ref. The row is one storage item,
|
|
37
|
+
* capped at 400 KB with the rest of the function's fields.
|
|
38
|
+
*/
|
|
39
|
+
export declare const FUNCTION_SCHEMA_ROW_BUDGET_BYTES = 327680;
|
|
40
|
+
/** The refusal code for a schema over an expansion limit or the row budget. */
|
|
41
|
+
export declare const FUNCTION_SCHEMA_EXPANSION_LIMIT = "FUNCTION_SCHEMA_EXPANSION_LIMIT";
|
|
42
|
+
/** The refusal code for a constraint keyword beside a resolved `$ref`. */
|
|
43
|
+
export declare const FUNCTION_SCHEMA_REF_SIBLING = "FUNCTION_SCHEMA_REF_SIBLING";
|
|
44
|
+
/** The refusal code for a ref to a shared def that no def answers. */
|
|
45
|
+
export declare const FUNCTION_SCHEMA_REF_UNRESOLVED = "FUNCTION_SCHEMA_REF_UNRESOLVED";
|
|
46
|
+
/** The refusal code for a short ref more than one target could answer. */
|
|
47
|
+
export declare const FUNCTION_SCHEMA_REF_AMBIGUOUS = "FUNCTION_SCHEMA_REF_AMBIGUOUS";
|
|
48
|
+
/** The refusal code for a ref to a deleted (tombstoned) `schemas/` file. */
|
|
49
|
+
export declare const FUNCTION_SCHEMA_REF_TOMBSTONED = "FUNCTION_SCHEMA_REF_TOMBSTONED";
|
|
50
|
+
/** The refusal code for a ref with the reserved `platform` prefix. */
|
|
51
|
+
export declare const FUNCTION_SCHEMA_REF_RESERVED = "FUNCTION_SCHEMA_REF_RESERVED";
|
|
52
|
+
/**
|
|
53
|
+
* One `schemas/` file as a compile sees it: its current version's def names
|
|
54
|
+
* and, once read, its compiled defs.
|
|
55
|
+
*/
|
|
56
|
+
export interface SchemaFamilyFile {
|
|
57
|
+
/** The current version, for messages; absent for a file in a local tree. */
|
|
58
|
+
version?: number;
|
|
59
|
+
/** The current version is a tombstone: the file was deleted. */
|
|
60
|
+
tombstone?: boolean;
|
|
61
|
+
/** The defs the current version declares. */
|
|
62
|
+
names: readonly string[];
|
|
63
|
+
/** The compiled defs, by name. Needed to inline one. */
|
|
64
|
+
defs?: Readonly<Record<string, unknown>>;
|
|
65
|
+
/** The stored provenance of each def, rebased into a schema that inlines it. */
|
|
66
|
+
provenance?: Readonly<Record<string, SchemaProvenance>> | null;
|
|
67
|
+
/** Each def's resolutions, not yet hashed: the provenance of a def compiled in this process. */
|
|
68
|
+
resolved?: Readonly<Record<string, readonly SchemaRefResolution[]>>;
|
|
69
|
+
/** Why the file could not be compiled; a ref to it is refused naming this. */
|
|
70
|
+
error?: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* One prompt as a compile sees it (#5534): its ref targets, by target path
|
|
74
|
+
* (`input`, `output`, `tools/<name>/input|output`, `events/<kind>`), each the
|
|
75
|
+
* stored compiled schema. A server tool's targets are its function's
|
|
76
|
+
* compiled schemas, filled by whoever builds the index.
|
|
77
|
+
*/
|
|
78
|
+
export interface SchemaFamilyPrompt {
|
|
79
|
+
/** The prompt is archived: a ref to it is refused as tombstoned. */
|
|
80
|
+
tombstone?: boolean;
|
|
81
|
+
/** Each target the prompt declares, by target path. */
|
|
82
|
+
targets: ReadonlyMap<string, unknown>;
|
|
83
|
+
/** A target the prompt declares but cannot answer, and why (a server tool whose function is missing). */
|
|
84
|
+
unresolvedTargets?: ReadonlyMap<string, string>;
|
|
85
|
+
/** Each target's stored provenance, by target path, rebased into a schema that inlines it. */
|
|
86
|
+
provenance?: Readonly<Record<string, SchemaProvenance>> | null;
|
|
87
|
+
/** Each target's resolutions, not yet hashed: the provenance of a prompt compiled in this process. */
|
|
88
|
+
resolved?: Readonly<Record<string, readonly SchemaRefResolution[]>>;
|
|
89
|
+
/** Why the prompt could not be compiled; a ref to it is refused naming this. */
|
|
90
|
+
error?: string;
|
|
91
|
+
}
|
|
92
|
+
/** One function as a compile sees it (#5534): its two stored compiled schemas. */
|
|
93
|
+
export interface SchemaFamilyFunction {
|
|
94
|
+
/** The function is archived: a ref to it is refused as tombstoned. */
|
|
95
|
+
tombstone?: boolean;
|
|
96
|
+
input?: unknown;
|
|
97
|
+
output?: unknown;
|
|
98
|
+
/** Why the function's schemas could not be compiled; a ref to it is refused naming this. */
|
|
99
|
+
error?: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* One db3 type as a compile sees it (#5540): both projections of every model
|
|
103
|
+
* it can bridge, keyed `<model>/row` and `<model>/declared`, built by whoever
|
|
104
|
+
* builds the index (`db3TypeProjections`).
|
|
105
|
+
*/
|
|
106
|
+
export interface SchemaFamilyDb3Type {
|
|
107
|
+
/** The models the type declares, in declaration order. */
|
|
108
|
+
models: readonly string[];
|
|
109
|
+
/** Each bridged model's two projections. */
|
|
110
|
+
defs: Readonly<Record<string, unknown>>;
|
|
111
|
+
/** Why a model cannot be bridged, by model; a ref to it is refused naming this. */
|
|
112
|
+
modelErrors?: Readonly<Record<string, string>>;
|
|
113
|
+
/** Why the type cannot be bridged at all; a ref to it is refused naming this. */
|
|
114
|
+
error?: string;
|
|
115
|
+
}
|
|
116
|
+
/** Where the schema a compile reads sits, which picks a db3 ref's default projection (#5540). */
|
|
117
|
+
export type SchemaRefPosition = "input" | "output" | "definition";
|
|
118
|
+
/** The keys of the other families, which a two-part short ref is judged against. */
|
|
119
|
+
export interface SchemaFamilyKeys {
|
|
120
|
+
function: readonly string[];
|
|
121
|
+
prompt: readonly string[];
|
|
122
|
+
db3: readonly string[];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* What a compile resolves shared refs against: the app's `schemas/` files by
|
|
126
|
+
* stem (a file absent from `files` does not exist) and, when a short ref is
|
|
127
|
+
* written, the keys of the other families.
|
|
128
|
+
*/
|
|
129
|
+
export interface SchemaFamilyIndex {
|
|
130
|
+
files: ReadonlyMap<string, SchemaFamilyFile>;
|
|
131
|
+
keys?: SchemaFamilyKeys;
|
|
132
|
+
/**
|
|
133
|
+
* The prompt slot (#5534): the prompts a schema may ref, by key (a key absent
|
|
134
|
+
* from the map does not exist). Present only where prompt refs resolve: a
|
|
135
|
+
* prompt-level, per-config or agent schema.
|
|
136
|
+
*/
|
|
137
|
+
prompts?: ReadonlyMap<string, SchemaFamilyPrompt>;
|
|
138
|
+
/** The function slot (#5534): the functions a schema may ref, by key; present where `prompts` is. */
|
|
139
|
+
functions?: ReadonlyMap<string, SchemaFamilyFunction>;
|
|
140
|
+
/** The db3 slot (#5540): the db3 types a schema may ref, by name (a name absent from the map is not a type of the app). */
|
|
141
|
+
db3?: ReadonlyMap<string, SchemaFamilyDb3Type>;
|
|
142
|
+
}
|
|
143
|
+
/** One ref to a prompt's schema found in a document (#5534). */
|
|
144
|
+
export interface SchemaFamilyPromptEdge {
|
|
145
|
+
/** JSON pointer of the node carrying the ref. */
|
|
146
|
+
pointer: string;
|
|
147
|
+
/** The ref as written. */
|
|
148
|
+
ref: string;
|
|
149
|
+
key: string;
|
|
150
|
+
/** The target path: `input`, `output`, `tools/<name>/input|output` or `events/<kind>`. */
|
|
151
|
+
target: string;
|
|
152
|
+
}
|
|
153
|
+
/** One ref to a function's schema found in a document (#5534). */
|
|
154
|
+
export interface SchemaFamilyFunctionEdge {
|
|
155
|
+
pointer: string;
|
|
156
|
+
ref: string;
|
|
157
|
+
key: string;
|
|
158
|
+
part: "input" | "output";
|
|
159
|
+
}
|
|
160
|
+
/** One ref to a db3 model found in a document (#5540). */
|
|
161
|
+
export interface SchemaFamilyDb3Edge {
|
|
162
|
+
pointer: string;
|
|
163
|
+
ref: string;
|
|
164
|
+
type: string;
|
|
165
|
+
model: string;
|
|
166
|
+
/** The projection written on the ref, or null when the position picks it. */
|
|
167
|
+
projection: Db3Projection | null;
|
|
168
|
+
}
|
|
169
|
+
/** One ref to a shared def found in a document, and the def it names. */
|
|
170
|
+
export interface SchemaFamilyEdge {
|
|
171
|
+
/** JSON pointer of the node carrying the ref. */
|
|
172
|
+
pointer: string;
|
|
173
|
+
/** The ref as written. */
|
|
174
|
+
ref: string;
|
|
175
|
+
file: string;
|
|
176
|
+
def: string;
|
|
177
|
+
}
|
|
178
|
+
/** What `schemaFamilyRefsIn` finds. */
|
|
179
|
+
export interface SchemaFamilyScan {
|
|
180
|
+
/** The `schemas/` defs named, every spelling. */
|
|
181
|
+
edges: SchemaFamilyEdge[];
|
|
182
|
+
/** The prompt schemas named (#5534): long and explicit forms always, short forms through the index's keys. */
|
|
183
|
+
prompts: SchemaFamilyPromptEdge[];
|
|
184
|
+
/** The function schemas named (#5534), found the same way. */
|
|
185
|
+
functions: SchemaFamilyFunctionEdge[];
|
|
186
|
+
/** The db3 models named (#5540): explicit and long forms always, a short form through the index's keys. */
|
|
187
|
+
db3: SchemaFamilyDb3Edge[];
|
|
188
|
+
/** A short ref (`<Name>` or `<key>.<part>`) was written, so the keys of every family matter. */
|
|
189
|
+
shortForms: boolean;
|
|
190
|
+
/** The key of each `<key>.<part>` short ref written, whatever it resolves to, sorted: whose family the keys of every family decide. */
|
|
191
|
+
shortKeys: string[];
|
|
192
|
+
/** A ref uses the reserved `platform` prefix. */
|
|
193
|
+
reserved: boolean;
|
|
194
|
+
}
|
|
195
|
+
/** How `schemaFamilyRefsIn` scans. */
|
|
196
|
+
export interface SchemaFamilyScanOptions {
|
|
197
|
+
/**
|
|
198
|
+
* Visit only the nodes the compile reads as schemas (the root, its
|
|
199
|
+
* subschemas and its definitions), never an annotation's value such as a
|
|
200
|
+
* `default` or an `examples` entry. A dependency graph scans this way, so a
|
|
201
|
+
* value that happens to look like a ref is not an edge.
|
|
202
|
+
*/
|
|
203
|
+
schemaPositions?: boolean;
|
|
204
|
+
}
|
|
205
|
+
/** A `$ref` the compile left as written. */
|
|
206
|
+
export interface SchemaRefWarning {
|
|
207
|
+
/** JSON pointer of the node carrying the ref in the compiled document; `""` is the root. */
|
|
208
|
+
path: string;
|
|
209
|
+
ref: string;
|
|
210
|
+
/** Why it stays inert. Never includes the schema body. */
|
|
211
|
+
reason: string;
|
|
212
|
+
/** The sentence to print: `<field> #<path>: $ref "<ref>" stays inert (<reason>)`. */
|
|
213
|
+
message: string;
|
|
214
|
+
}
|
|
215
|
+
/** One node a ref was inlined at. */
|
|
216
|
+
export interface SchemaRefResolution {
|
|
217
|
+
/** JSON pointer of the inlined node in the compiled document. */
|
|
218
|
+
pointer: string;
|
|
219
|
+
/** Every ref inlined there, outermost first; a shared ref in its explicit form. */
|
|
220
|
+
chain: string[];
|
|
221
|
+
/** Under a family index: the compiled definition each step of the chain referenced. */
|
|
222
|
+
definitions?: unknown[];
|
|
223
|
+
/** Under a family index: a step's hash where a stored provenance already records it. */
|
|
224
|
+
hashes?: Array<string | undefined>;
|
|
225
|
+
}
|
|
226
|
+
/** Why a schema cannot be compiled. */
|
|
227
|
+
export interface SchemaRefRefusal {
|
|
228
|
+
code: typeof FUNCTION_SCHEMA_EXPANSION_LIMIT | typeof FUNCTION_SCHEMA_REF_SIBLING | typeof FUNCTION_SCHEMA_REF_UNRESOLVED | typeof FUNCTION_SCHEMA_REF_AMBIGUOUS | typeof FUNCTION_SCHEMA_REF_TOMBSTONED | typeof FUNCTION_SCHEMA_REF_RESERVED | typeof SCHEMA_CANONICAL_INVALID;
|
|
229
|
+
message: string;
|
|
230
|
+
/** JSON pointer of the node the refusal names. */
|
|
231
|
+
path: string;
|
|
232
|
+
/** The refs being expanded at `path`, outermost first. */
|
|
233
|
+
chain: string[];
|
|
234
|
+
}
|
|
235
|
+
/** What `compileSchemaRefs` returns. */
|
|
236
|
+
export interface SchemaRefCompileResult {
|
|
237
|
+
/** The compiled document; on a refusal, the input as given. */
|
|
238
|
+
schema: any;
|
|
239
|
+
warnings: SchemaRefWarning[];
|
|
240
|
+
refusal: SchemaRefRefusal | null;
|
|
241
|
+
resolved: SchemaRefResolution[];
|
|
242
|
+
}
|
|
243
|
+
/** Options for `compileSchemaRefs`. */
|
|
244
|
+
export interface SchemaRefCompileOptions {
|
|
245
|
+
/** The name messages give the schema, such as `inputSchema`. Defaults to `schema`. */
|
|
246
|
+
field?: string;
|
|
247
|
+
/** Caps to hold the document to instead of `SCHEMA_EXPANSION_LIMITS`. */
|
|
248
|
+
limits?: Partial<SchemaExpansionLimits>;
|
|
249
|
+
/** The shared defs refs resolve against. Without it, shared refs stay inert and `ref` is an unknown key. */
|
|
250
|
+
families?: SchemaFamilyIndex;
|
|
251
|
+
/**
|
|
252
|
+
* Under `families`, whether the compile reports what provenance hashes (each
|
|
253
|
+
* resolved entry's definitions) and holds the provenance to its budget.
|
|
254
|
+
* Defaults to true; a write that stores no provenance (a function header)
|
|
255
|
+
* passes false, so it refuses nothing it refused before.
|
|
256
|
+
*/
|
|
257
|
+
provenance?: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* A JSON pointer every reported pointer is prefixed with (#5534): an agent
|
|
260
|
+
* declaration's slot compiles as its own document and reports, and records
|
|
261
|
+
* provenance, at the slot's pointer in the declaration.
|
|
262
|
+
*/
|
|
263
|
+
pointerPrefix?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Where the schema sits (#5540): `output` (a function's, prompt's,
|
|
266
|
+
* config's or tool's `outputSchema`) defaults a db3 ref to the row,
|
|
267
|
+
* `input` (anything else, and the default) to the declared shape, and
|
|
268
|
+
* `definition` (a `schemas/` def) has no default.
|
|
269
|
+
*/
|
|
270
|
+
position?: SchemaRefPosition;
|
|
271
|
+
}
|
|
272
|
+
/** One `$ref` of a schema and what a compile does with it. */
|
|
273
|
+
export interface SchemaRefClassification {
|
|
274
|
+
/** Dotted path of the node carrying the ref (`properties.price`, `anyOf[0]`); `""` is the root. */
|
|
275
|
+
path: string;
|
|
276
|
+
/** The same location as a JSON pointer. */
|
|
277
|
+
pointer: string;
|
|
278
|
+
ref: string;
|
|
279
|
+
/** `resolved`: inlined. `family`: inert until shared shapes ship. `inert`: left as written. */
|
|
280
|
+
verdict: "resolved" | "family" | "inert";
|
|
281
|
+
reason: string;
|
|
282
|
+
}
|
|
283
|
+
/** Every `$ref` in `schema`, in document order (inside `$defs` too), with what a compile does with it. */
|
|
284
|
+
export declare function classifySchemaRefs(schema: unknown): SchemaRefClassification[];
|
|
285
|
+
/**
|
|
286
|
+
* Every ref to a shared def in a parsed document, in document order, with the
|
|
287
|
+
* file and def it names: explicit `schemas:` `$ref`s and `ref` long forms
|
|
288
|
+
* directly, short forms through `index` (a short form that does not resolve
|
|
289
|
+
* to exactly one file names nothing). This is how a push finds the files a
|
|
290
|
+
* document depends on, whichever spelling it uses: its selection closure, its
|
|
291
|
+
* order, the server's pre-read and its cycle walk.
|
|
292
|
+
*
|
|
293
|
+
* #5534 — the prompts and functions a document names are reported beside the
|
|
294
|
+
* files, the same way: long and explicit forms always, and a `<key>.input` or
|
|
295
|
+
* `<key>.output` short form whose key the index's keys give one family.
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* schemaFamilyRefsIn({ properties: { p: { ref: "schemas.common.Money" } } }).edges;
|
|
299
|
+
* // → [{ pointer: "/properties/p", ref: "schemas.common.Money", file: "common", def: "Money" }]
|
|
300
|
+
*/
|
|
301
|
+
export declare function schemaFamilyRefsIn(document: unknown, index?: SchemaFamilyIndex, options?: SchemaFamilyScanOptions): SchemaFamilyScan;
|
|
302
|
+
/**
|
|
303
|
+
* Compile `schema`'s refs: inline every local `#/$defs/` ref whose target
|
|
304
|
+
* exists (and, under `options.families`, every ref to a shared def), leave
|
|
305
|
+
* every other ref as written with a warning, and drop the root `$defs` once
|
|
306
|
+
* nothing left in the document points into it. The result is a fixed point:
|
|
307
|
+
* compiling it again changes nothing and warns about the same refs, unless an
|
|
308
|
+
* inlined shared def carries a dangling `#/$defs/<X>` that the document's root
|
|
309
|
+
* `$defs` declares, which a second compile would resolve; a compile therefore
|
|
310
|
+
* always starts from source.
|
|
311
|
+
*
|
|
312
|
+
* A refusal (a disallowed sibling, an expansion over a limit, a shared ref
|
|
313
|
+
* that does not resolve) returns the input unchanged, with no warnings and
|
|
314
|
+
* nothing resolved.
|
|
315
|
+
*
|
|
316
|
+
* Under a family index (unless `options.provenance` is false), each resolved
|
|
317
|
+
* entry carries the compiled definition of each step of its chain, for
|
|
318
|
+
* `schemaProvenanceOf`; the provenance those entries would record is held to
|
|
319
|
+
* `SCHEMA_PROVENANCE_LIMIT_BYTES` before any definition is built, and a lone
|
|
320
|
+
* surrogate the hash could not take is refused.
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* compileSchemaRefs({
|
|
324
|
+
* $defs: { Money: { type: "number", minimum: 0 } },
|
|
325
|
+
* type: "object",
|
|
326
|
+
* properties: { price: { $ref: "#/$defs/Money" } },
|
|
327
|
+
* }).schema;
|
|
328
|
+
* // → { type: "object", properties: { price: { type: "number", minimum: 0 } } }
|
|
329
|
+
*/
|
|
330
|
+
export declare function compileSchemaRefs(schema: unknown, options?: SchemaRefCompileOptions): SchemaRefCompileResult;
|
|
331
|
+
/** What a row budget sizes: the stored texts of its schema fields, what each inlined, and any other bytes the write keeps inline. */
|
|
332
|
+
export interface SchemaRowBudgetInput {
|
|
333
|
+
/** Each schema field's stored text, by field name, in the order messages name them. */
|
|
334
|
+
texts: Readonly<Record<string, string | null | undefined>>;
|
|
335
|
+
/** What each field's compile resolved; a field absent or empty inlined nothing. */
|
|
336
|
+
resolved: Readonly<Record<string, readonly SchemaRefResolution[] | undefined>>;
|
|
337
|
+
/** Bytes the row also keeps inline beside the texts (a prompt's source and provenance). */
|
|
338
|
+
extraBytes?: number;
|
|
339
|
+
budget: number;
|
|
340
|
+
/** What sits over the budget, such as `inputSchema and outputSchema together`. */
|
|
341
|
+
subject: string;
|
|
342
|
+
/** Whose budget it is, such as `a function holds for its two schemas`. */
|
|
343
|
+
holder: string;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* A row budget (#5534, generalized from the function's): when a write inlined
|
|
347
|
+
* a ref in any of `texts`, the texts plus `extraBytes` must fit `budget`. Null
|
|
348
|
+
* when they fit, or when no ref was inlined, so a write that stores today is
|
|
349
|
+
* never refused. The refusal names the longest chain inlined.
|
|
350
|
+
*/
|
|
351
|
+
export declare function schemaRowBudgetRefusal(input: SchemaRowBudgetInput): (SchemaRefRefusal & {
|
|
352
|
+
field: string;
|
|
353
|
+
}) | null;
|
|
354
|
+
/**
|
|
355
|
+
* The function row budget: when a write inlined a ref in either schema, the
|
|
356
|
+
* two compiled schemas the row will hold (`inputSchema` and `outputSchema`,
|
|
357
|
+
* as stored strings) must fit `budget` bytes together. Null when they fit, or
|
|
358
|
+
* when no ref was inlined, so a schema that stores today is never refused.
|
|
359
|
+
* The server runs it on every function write; the CLI's preflight runs it on
|
|
360
|
+
* the two compiled schemas a push sends, because the server never sees the
|
|
361
|
+
* refs of an already-compiled schema.
|
|
362
|
+
*/
|
|
363
|
+
export declare function functionSchemaRowBudgetRefusal(inputSchema: string | null | undefined, outputSchema: string | null | undefined, resolved: {
|
|
364
|
+
inputSchema?: readonly SchemaRefResolution[];
|
|
365
|
+
outputSchema?: readonly SchemaRefResolution[];
|
|
366
|
+
}, budget?: number): SchemaRefRefusal | null;
|