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
|
@@ -16,18 +16,25 @@
|
|
|
16
16
|
* (#2803's resurrection guard) — otherwise shipping a fix would silently put
|
|
17
17
|
* an endpoint an operator had taken down back in service.
|
|
18
18
|
*/
|
|
19
|
-
import { existsSync, readdirSync } from "fs";
|
|
19
|
+
import { existsSync, readdirSync, readFileSync } from "fs";
|
|
20
20
|
import { join, relative as relativePath } from "path";
|
|
21
21
|
import { ApiClient } from "../lib/api-client.js";
|
|
22
22
|
import { resolveAppId } from "../lib/config.js";
|
|
23
23
|
import { resolveSyncDir } from "../lib/sync-paths.js";
|
|
24
|
+
import { requireCurrentEnvironment } from "../lib/env-resolver.js";
|
|
25
|
+
import { AUTH_CASE_FILE_SUFFIX, authFixturesPathFor, readAuthFixtures, } from "../lib/auth-fixtures.js";
|
|
26
|
+
import { caseFilesInTree, caseSummary, checkRequestBody, exitCodeForCheck, judgeCase, parseAuthorizeCaseFile, parseRuntimeFlag, parseTriggerFlag, renderCaseTable, renderCheckLine, resolveAliases, } from "../lib/function-authorize-check.js";
|
|
24
27
|
import { FunctionSchemaCodegenError, functionSchemaSources, } from "../lib/function-schema-codegen.js";
|
|
25
|
-
import {
|
|
28
|
+
import { USER_PROPERTIES_CLIENT_FILE, treeHasUserProperties, userPropertiesSource, } from "../lib/user-properties/user-properties-codegen.js";
|
|
29
|
+
import { USER_PROPERTIES_SWIFT_FILE } from "../lib/swift-codegen/userPropertiesGenerator.js";
|
|
30
|
+
import { SHARED_SWIFT_FILE, treeDeclaresSharedSwiftTypes } from "../lib/swift-codegen/sharedGenerator.js";
|
|
31
|
+
import { describeTreeTypes, primitiveDeclarationInputs, refuseTreeSchemasPushRefuses } from "../lib/primitive-declaration.js";
|
|
32
|
+
import { functionTypeWiringProblems, applyFunctionTypeArtifacts, functionTypeRemovalLine, staleFunctionTypeArtifacts, } from "../lib/function-db-types.js";
|
|
26
33
|
import { AGENT_CLIENT_FILE_SUFFIX, promptSchemaSources, treeDeclaresAgentPrompt, } from "../lib/prompt-schema-codegen.js";
|
|
27
34
|
import { generateFunctionSwiftTypes } from "../lib/swift-codegen/functionGenerator.js";
|
|
28
35
|
import { AGENT_SWIFT_FILE_SUFFIX } from "../lib/swift-codegen/agentGenerator.js";
|
|
29
36
|
import { SwiftCodegenError } from "../lib/swift-codegen/schemaToSwift.js";
|
|
30
|
-
import { success, error, info, warn, keyValue, result as printResult, formatTable, formatDate, formatStatus, json, jsonLine, divider, } from "../lib/output.js";
|
|
37
|
+
import { success, error, info, warn, keyValue, result as printResult, formatTable, formatDate, formatDuration, formatStatus, json, jsonLine, divider, flushOutput, } from "../lib/output.js";
|
|
31
38
|
import { confirmPrompt } from "../lib/confirm-prompt.js";
|
|
32
39
|
import { FUNCTION_LOG_COLUMNS, functionLogCells, functionLogLine, } from "../lib/function-log-row.js";
|
|
33
40
|
import { activatedLine, activationOutput, activationPrompt, activationRefusalLine, functionVersionRows, newerVersionLine, versionLine, } from "../lib/function-versions.js";
|
|
@@ -35,12 +42,15 @@ import { parseStatusFilter } from "../lib/object-status-filter.js";
|
|
|
35
42
|
import { renderStepRunTable } from "../lib/step-run-table.js";
|
|
36
43
|
import { triggerKindsCell, triggerTableRows, } from "../lib/function-trigger-listing.js";
|
|
37
44
|
import { renderRunLogs } from "../lib/function-log-lines.js";
|
|
38
|
-
import { buildWorkflowStepEnvelope } from "../lib/log-inspection.js";
|
|
45
|
+
import { buildIntegrationEnvelope, buildWorkflowStepEnvelope, formatIntegrationStepCell, } from "../lib/log-inspection.js";
|
|
39
46
|
import { followLoop } from "../lib/watch.js";
|
|
40
47
|
import { buildLogFollowSource } from "../lib/function-log-tail.js";
|
|
41
48
|
import { toFunctionLogInspectionRow } from "../lib/log-inspection.js";
|
|
42
|
-
import { decidePageContinuation, describeIdentity, exitCodeForInvokeStatus, exitCodeForRunStatus, invokeIdLines, logsFlagConflict, refusalLines, renderIdLines, resolveRunFlags, runRuntimeCell, runSliceCells,
|
|
49
|
+
import { decidePageContinuation, describeIdentity, exitCodeForInvokeStatus, exitCodeForRunStatus, invokeIdLines, logsFlagConflict, refusalLines, renderIdLines, resolveRunFlags, runRuntime, runRuntimeCell, runSliceCells, resumeCommand, startIdLines, userTokenName, waitDelayMs, withMintedToken, EXIT_INTERRUPTED, EXIT_TIMED_OUT, USER_TOKEN_TTL, WAIT_DEFAULT_TIMEOUT_SECONDS, } from "../lib/function-run.js";
|
|
43
50
|
import { wholeListEnvelope } from "../lib/paginate.js";
|
|
51
|
+
import { authorizeSection, handlerInputRows } from "../lib/function-authorize-view.js";
|
|
52
|
+
import { registerFunctionTriggersCommands } from "./function-trigger-commands.js";
|
|
53
|
+
import { commandStatus } from "../lib/command-status.js";
|
|
44
54
|
/**
|
|
45
55
|
* How far back one `--follow` tick will page to meet its high-water mark.
|
|
46
56
|
*
|
|
@@ -86,6 +96,7 @@ Examples:
|
|
|
86
96
|
$ primitive functions disable 01HXY... # out of service; pushes still land
|
|
87
97
|
$ primitive functions archive 01HXY... # retire it (soft delete)
|
|
88
98
|
`);
|
|
99
|
+
commandStatus(functions, { stability: "production" });
|
|
89
100
|
// Configuration is authored in TOML and applied with `config push` (#2645):
|
|
90
101
|
// this group carries no config-setting flags, and the code the function runs
|
|
91
102
|
// is the TypeScript beside its file rather than anything a verb can send.
|
|
@@ -126,10 +137,8 @@ Configuration lives in functions/<key>.toml, and the code beside it:
|
|
|
126
137
|
info("No functions found.");
|
|
127
138
|
return;
|
|
128
139
|
}
|
|
129
|
-
// #3690 — which functions a webhook or a schedule reaches, in one call
|
|
130
|
-
//
|
|
131
|
-
// rows a function owns (#3181), so without this the only way to find
|
|
132
|
-
// an app's triggers was `functions get`, one function at a time.
|
|
140
|
+
// #3690 — which functions a webhook or a schedule reaches, in one call,
|
|
141
|
+
// rather than `functions get` one function at a time.
|
|
133
142
|
console.log(formatTable(filtered.map((f) => ({
|
|
134
143
|
...f,
|
|
135
144
|
triggersCell: triggerKindsCell(f.triggers),
|
|
@@ -241,6 +250,20 @@ Configuration lives in functions/<key>.toml, and the code beside it:
|
|
|
241
250
|
printResult(" Config ID", active.configId);
|
|
242
251
|
printResult(" Entry", active.entry);
|
|
243
252
|
printResult(" Content Hash", active.contentHash || "-");
|
|
253
|
+
// #4717 — whether this version carries `authorize`, as the server's
|
|
254
|
+
// push probe recorded it. A legacy version runs the header's
|
|
255
|
+
// `access` rule above.
|
|
256
|
+
printResult(" Authorize", active.authorize === true ? "yes" : "no (legacy)");
|
|
257
|
+
// #5904 — the input list this version recorded at push, and that
|
|
258
|
+
// trigger doors hand the whole input; nothing for a legacy version
|
|
259
|
+
// or an answer without the field.
|
|
260
|
+
for (const [label, value] of handlerInputRows(active)) {
|
|
261
|
+
printResult(` ${label}`, value);
|
|
262
|
+
}
|
|
263
|
+
// #4730 — what the push collected about it, from the manifest.
|
|
264
|
+
const section = authorizeSection(record.manifest && typeof record.manifest === "object" ? record.manifest : null, active.authorize === true);
|
|
265
|
+
for (const [label, value] of section ?? [])
|
|
266
|
+
printResult(` ${label}`, value);
|
|
244
267
|
// #3482 — no Mode line. The config says nothing about how a
|
|
245
268
|
// function runs: `invoke` runs it inside the request, `start` runs
|
|
246
269
|
// it as a task, and every function takes both.
|
|
@@ -276,22 +299,21 @@ Configuration lives in functions/<key>.toml, and the code beside it:
|
|
|
276
299
|
? documentSchemaModels.join(", ")
|
|
277
300
|
: "declares no models");
|
|
278
301
|
}
|
|
279
|
-
// #3181 —
|
|
280
|
-
//
|
|
281
|
-
// `webhooks list`, `cron-triggers list` and `config pull` by design, so
|
|
282
|
-
// without this an operator could not find the receiver URL a provider
|
|
283
|
-
// must be pointed at, or the schedule the platform actually holds.
|
|
302
|
+
// #3181 — where an operator finds the receiver URL a provider must be
|
|
303
|
+
// pointed at, and the schedule the platform actually holds.
|
|
284
304
|
divider();
|
|
285
305
|
info("Triggers:");
|
|
286
306
|
const triggers = record.triggers ?? { webhook: null, cron: [] };
|
|
287
307
|
const cronEntries = Array.isArray(triggers.cron)
|
|
288
308
|
? triggers.cron
|
|
289
309
|
: [];
|
|
310
|
+
// #4803 — the db3 types this function watches; absent when none.
|
|
311
|
+
const db3Entries = Array.isArray(triggers.db3) ? triggers.db3 : [];
|
|
290
312
|
// #3483 — an OLDER server still answers a `databases` key, and this
|
|
291
313
|
// command ignores it rather than branching on it: the trigger it
|
|
292
314
|
// described was removed, so a section about it would tell an operator
|
|
293
315
|
// that a write runs this function when nothing does.
|
|
294
|
-
if (!triggers.webhook && cronEntries.length === 0) {
|
|
316
|
+
if (!triggers.webhook && cronEntries.length === 0 && db3Entries.length === 0) {
|
|
295
317
|
printResult(" Triggers", "none — this function is invoked over HTTP only");
|
|
296
318
|
}
|
|
297
319
|
if (triggers.webhook) {
|
|
@@ -319,6 +341,21 @@ Configuration lives in functions/<key>.toml, and the code beside it:
|
|
|
319
341
|
{ header: "LAST RUN", key: "lastTriggeredRunId" },
|
|
320
342
|
]));
|
|
321
343
|
}
|
|
344
|
+
if (db3Entries.length > 0) {
|
|
345
|
+
info("DB3 TRIGGERS (one run per flush of a db3 of the type):");
|
|
346
|
+
console.log(formatTable(db3Entries, [
|
|
347
|
+
{ header: "TYPE", key: "type" },
|
|
348
|
+
{ header: "ID", key: "triggerId" },
|
|
349
|
+
{ header: "STATUS", key: "status", format: formatStatus },
|
|
350
|
+
{
|
|
351
|
+
header: "LAST FIRED",
|
|
352
|
+
key: "lastTriggeredAt",
|
|
353
|
+
format: (value) => (value ? formatDate(value) : "never"),
|
|
354
|
+
},
|
|
355
|
+
{ header: "LAST RUN", key: "lastTriggeredRunId" },
|
|
356
|
+
{ header: "LAST ERROR", key: "lastError" },
|
|
357
|
+
]));
|
|
358
|
+
}
|
|
322
359
|
// #3187 / #3279 — the ACTIVE version's manifest: what it registered
|
|
323
360
|
// and what it TOUCHES, from the push-time collection. Documentation,
|
|
324
361
|
// never authorization — function code acts as the system, and this
|
|
@@ -431,6 +468,9 @@ Configuration lives in functions/<key>.toml, and the code beside it:
|
|
|
431
468
|
{ header: "ENVELOPE", key: "envelope" },
|
|
432
469
|
{ header: "TRIGGERS", key: "triggers" },
|
|
433
470
|
{ header: "BY", key: "by" },
|
|
471
|
+
// #4717 — last, so every column a reader already parses keeps
|
|
472
|
+
// its place.
|
|
473
|
+
{ header: "AUTHORIZE", key: "authorize" },
|
|
434
474
|
]));
|
|
435
475
|
if (nextCursor) {
|
|
436
476
|
info(`More versions: --cursor ${nextCursor}`);
|
|
@@ -499,9 +539,8 @@ What activating a version does, and does not:
|
|
|
499
539
|
process.exit(1);
|
|
500
540
|
}
|
|
501
541
|
});
|
|
502
|
-
// #3181 — a trigger-fired invocation writes a run row, and
|
|
503
|
-
//
|
|
504
|
-
// the only way to inspect what a webhook or a schedule actually did
|
|
542
|
+
// #3181 — a trigger-fired invocation writes a run row, and this verb is the
|
|
543
|
+
// only way to inspect what a webhook or a schedule actually did
|
|
505
544
|
// (principle 8).
|
|
506
545
|
const runs = functions
|
|
507
546
|
.command("runs")
|
|
@@ -526,7 +565,7 @@ What activating a version does, and does not:
|
|
|
526
565
|
// empty string that sorts beside real ones.
|
|
527
566
|
const withRuntime = (items ?? []).map((run) => ({
|
|
528
567
|
...run,
|
|
529
|
-
runtime:
|
|
568
|
+
runtime: runRuntime(run),
|
|
530
569
|
}));
|
|
531
570
|
if (options.json) {
|
|
532
571
|
json({ items: withRuntime, nextCursor });
|
|
@@ -545,8 +584,8 @@ What activating a version does, and does not:
|
|
|
545
584
|
items.map((run) => ({
|
|
546
585
|
...run,
|
|
547
586
|
// #3482 — which RUNTIME this run used, from the row's own
|
|
548
|
-
// `
|
|
549
|
-
//
|
|
587
|
+
// `runtime` (#3190). One reader, so the word an operator reads
|
|
588
|
+
// here is the word `ctx.runtime` gave the code.
|
|
550
589
|
runtime: runRuntimeCell(run),
|
|
551
590
|
...runSliceCells(run),
|
|
552
591
|
})), [
|
|
@@ -640,6 +679,53 @@ What activating a version does, and does not:
|
|
|
640
679
|
process.exit(1);
|
|
641
680
|
}
|
|
642
681
|
});
|
|
682
|
+
// #3190 — the integration calls one run made. The run → integration-logs
|
|
683
|
+
// pivot was `workflows/runs/{runId}/integration-logs` on the admin API and
|
|
684
|
+
// had no CLI verb; a function run is addressed by the function that owns it,
|
|
685
|
+
// as `runs steps` is.
|
|
686
|
+
runs
|
|
687
|
+
.command("integration-logs")
|
|
688
|
+
.description("List the integration calls a function run made")
|
|
689
|
+
.argument("<function-id>", "Function ID")
|
|
690
|
+
.argument("<run-id>", "Run ID")
|
|
691
|
+
.option("--app <app-id>", "App ID (uses current app if not specified)")
|
|
692
|
+
.option("--limit <n>", "Number of calls to show (at most 200)", "100")
|
|
693
|
+
.option("--json", "Output as JSON")
|
|
694
|
+
.action(async (functionId, runId, _options, command) => {
|
|
695
|
+
// See `runs steps` above: `runs` parses its own `--app`/`--json` out of
|
|
696
|
+
// the argv before dispatching here, so the merged view is the real one.
|
|
697
|
+
const options = command.optsWithGlobals();
|
|
698
|
+
const resolvedAppId = resolveAppId(undefined, options);
|
|
699
|
+
const client = new ApiClient();
|
|
700
|
+
try {
|
|
701
|
+
const { items } = await client.listFunctionRunIntegrationLogs(resolvedAppId, functionId, runId, { limit: parseInt(options.limit, 10) });
|
|
702
|
+
if (options.json) {
|
|
703
|
+
json(buildIntegrationEnvelope(items));
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
if (!items || items.length === 0) {
|
|
707
|
+
info("No integration calls found for this run.");
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
710
|
+
const rows = items.map((log) => ({
|
|
711
|
+
...log,
|
|
712
|
+
stepCell: formatIntegrationStepCell(log),
|
|
713
|
+
}));
|
|
714
|
+
console.log(formatTable(rows, [
|
|
715
|
+
{ header: "TIME", key: "timestamp", format: formatDate },
|
|
716
|
+
{ header: "INTEGRATION", key: "integrationKey", format: (v) => v || "" },
|
|
717
|
+
{ header: "METHOD", key: "method" },
|
|
718
|
+
{ header: "PATH", key: "path" },
|
|
719
|
+
{ header: "STATUS", key: "status" },
|
|
720
|
+
{ header: "DURATION", key: "durationMs", format: formatDuration },
|
|
721
|
+
{ header: "STEP", key: "stepCell" },
|
|
722
|
+
]));
|
|
723
|
+
}
|
|
724
|
+
catch (err) {
|
|
725
|
+
error(err.message);
|
|
726
|
+
process.exit(1);
|
|
727
|
+
}
|
|
728
|
+
});
|
|
643
729
|
// #3348 — end a run that will not settle.
|
|
644
730
|
//
|
|
645
731
|
// `client.functions.terminate` has existed in the SDK since #3186 and nothing
|
|
@@ -933,15 +1019,39 @@ What activating a version does, and does not:
|
|
|
933
1019
|
error(`Config directory not found: ${configDir}`);
|
|
934
1020
|
process.exit(1);
|
|
935
1021
|
}
|
|
1022
|
+
// #5894 — a schema `config push` refuses, in a function, prompt or
|
|
1023
|
+
// `schemas/` file, is refused here with push's message before anything
|
|
1024
|
+
// decides there is nothing to generate: a tree with no `functions/`
|
|
1025
|
+
// directory must not pass `--check` over a file push refuses.
|
|
1026
|
+
try {
|
|
1027
|
+
refuseTreeSchemasPushRefuses(configDir);
|
|
1028
|
+
}
|
|
1029
|
+
catch (err) {
|
|
1030
|
+
if (!(err instanceof FunctionSchemaCodegenError))
|
|
1031
|
+
throw err;
|
|
1032
|
+
if (options.json) {
|
|
1033
|
+
json(options.check || lang === "swift"
|
|
1034
|
+
? { ok: false, stale: [], problems: [err.message] }
|
|
1035
|
+
: { written: [], removed: [], problems: [err.message] });
|
|
1036
|
+
}
|
|
1037
|
+
else
|
|
1038
|
+
error(err.message);
|
|
1039
|
+
process.exit(1);
|
|
1040
|
+
}
|
|
936
1041
|
if (!existsSync(join(configDir, "functions")) &&
|
|
937
1042
|
!treeDeclaresAgentPrompt(configDir) &&
|
|
1043
|
+
!treeHasUserProperties(configDir) &&
|
|
1044
|
+
!(lang === "swift" && treeHasSharedSwiftTypes(configDir)) &&
|
|
938
1045
|
!holdsAgentArtifacts(options.out ? String(options.out) : join(configDir, "functions", "generated"))) {
|
|
939
1046
|
// Nothing to type: the artifacts exist to serve function sources, and
|
|
940
1047
|
// a tree with none needs no compiler wiring. Not a failure — a tree
|
|
941
1048
|
// may legitimately have no functions. #3798 (DSO-3798-005) — unless
|
|
942
1049
|
// it declares an agent, whose client-side types are generated with or
|
|
943
1050
|
// without functions, or (CSO-3798-003) a removed agent's artifacts are
|
|
944
|
-
// still there to sweep and for `--check` to report.
|
|
1051
|
+
// still there to sweep and for `--check` to report. #5385 — the same
|
|
1052
|
+
// for user-properties.toml, whose client types an app needs with or
|
|
1053
|
+
// without functions. #5544 — and, in Swift, for the shared file's
|
|
1054
|
+
// defs and prompt output types.
|
|
945
1055
|
if (options.json)
|
|
946
1056
|
json({ ok: true, stale: [], problems: [] });
|
|
947
1057
|
else
|
|
@@ -964,11 +1074,17 @@ What activating a version does, and does not:
|
|
|
964
1074
|
const relative = (filePath) => relativePath(configDir, filePath);
|
|
965
1075
|
let outcome;
|
|
966
1076
|
try {
|
|
1077
|
+
// #5385 — the user property structs, when the tree declares them.
|
|
1078
|
+
const userProperties = userPropertiesSource(configDir);
|
|
967
1079
|
outcome = await generateFunctionSwiftTypes({
|
|
968
1080
|
inputs: functionSchemaSources(configDir),
|
|
969
1081
|
// #3798 — each agent prompt's Swift types, in the same run.
|
|
970
1082
|
agentInputs: promptSchemaSources(configDir),
|
|
1083
|
+
userProperties: userProperties?.schema ?? null,
|
|
1084
|
+
...(userProperties ? { userPropertiesText: userProperties.text } : {}),
|
|
971
1085
|
outputDir,
|
|
1086
|
+
// #5544 — the tree whose schemas/ files and db3 types the shared file declares.
|
|
1087
|
+
configDir,
|
|
972
1088
|
check: Boolean(options.check),
|
|
973
1089
|
});
|
|
974
1090
|
}
|
|
@@ -1075,18 +1191,39 @@ What activating a version does, and does not:
|
|
|
1075
1191
|
}
|
|
1076
1192
|
process.exit(1);
|
|
1077
1193
|
}
|
|
1078
|
-
|
|
1194
|
+
let written;
|
|
1195
|
+
let removed;
|
|
1196
|
+
try {
|
|
1197
|
+
({ written, removed } = applyFunctionTypeArtifacts(configDir, undefined, artifactOptions));
|
|
1198
|
+
}
|
|
1199
|
+
catch (err) {
|
|
1200
|
+
// A schema push refuses (#5894) or one that cannot be typed: nothing
|
|
1201
|
+
// is written, and the message is push's own, naming the file.
|
|
1202
|
+
if (!(err instanceof FunctionSchemaCodegenError))
|
|
1203
|
+
throw err;
|
|
1204
|
+
if (options.json)
|
|
1205
|
+
json({ written: [], removed: [], problems: [err.message] });
|
|
1206
|
+
else
|
|
1207
|
+
error(err.message);
|
|
1208
|
+
process.exit(1);
|
|
1209
|
+
}
|
|
1079
1210
|
if (options.json) {
|
|
1080
|
-
json({ written, problems });
|
|
1211
|
+
json({ written, removed, problems });
|
|
1081
1212
|
return;
|
|
1082
1213
|
}
|
|
1083
1214
|
success(`Wrote ${written.length} file(s) into ${configDir}/functions/.`);
|
|
1084
1215
|
for (const relative of written)
|
|
1085
1216
|
keyValue(" wrote", relative);
|
|
1217
|
+
// #5208 — what the write removed, each with its own line. No drop
|
|
1218
|
+
// warning here: codegen has no view of what the server runs.
|
|
1219
|
+
for (const relative of removed)
|
|
1220
|
+
warn(functionTypeRemovalLine(relative));
|
|
1086
1221
|
for (const problem of problems) {
|
|
1087
1222
|
warn(`functions/tsconfig.json: ${problem}`);
|
|
1088
1223
|
}
|
|
1089
1224
|
});
|
|
1225
|
+
// #3190 — the operational verbs of a function's webhook and cron triggers.
|
|
1226
|
+
registerFunctionTriggersCommands(functions);
|
|
1090
1227
|
// #2803 — the operational verb pair, and the only writers of `status` besides
|
|
1091
1228
|
// the delete flow. `config push` is deliberately not one: see the module note.
|
|
1092
1229
|
functions
|
|
@@ -1393,10 +1530,6 @@ Reclaiming the key means hard-deleting the row:
|
|
|
1393
1530
|
}
|
|
1394
1531
|
const body = {
|
|
1395
1532
|
rootInput: flags.input,
|
|
1396
|
-
// #3482 — `--as system` is the ONE door that is a single route for
|
|
1397
|
-
// both runtimes, so it keeps the deprecated body selector; every
|
|
1398
|
-
// other call says it with the route.
|
|
1399
|
-
...(identity.asSystem ? { mode: "task" } : {}),
|
|
1400
1533
|
...(contextDocId ? { contextDocId } : {}),
|
|
1401
1534
|
...(options.runKey ? { runKey: options.runKey } : {}),
|
|
1402
1535
|
};
|
|
@@ -1461,6 +1594,200 @@ Reclaiming the key means hard-deleting the row:
|
|
|
1461
1594
|
process.exit(1);
|
|
1462
1595
|
}
|
|
1463
1596
|
});
|
|
1597
|
+
// ── authorize (#4732) ───────────────────────────────────────────────
|
|
1598
|
+
//
|
|
1599
|
+
// Runs a function's `authorize` alone, through the admin endpoint, so a
|
|
1600
|
+
// gate can be checked without running the handler. The app, the fixture
|
|
1601
|
+
// map and the case files all come from the one environment `--env`
|
|
1602
|
+
// resolves, so the verb takes no `--app` (#3154's one-tree rule).
|
|
1603
|
+
functions
|
|
1604
|
+
.command("authorize")
|
|
1605
|
+
.allowExcessArguments(false)
|
|
1606
|
+
.description("Run only a function's authorize for a user, door, runtime and input, and print the decision; --cases runs its case file")
|
|
1607
|
+
.argument("[key]", "Function key (as written in functions/<key>.toml)")
|
|
1608
|
+
.option("--user <id>", "auth.user: an app user id or an @fixture alias (default: no user)")
|
|
1609
|
+
.option("--role <role>", "Replace auth.user's role for the check; memberships stay the user's")
|
|
1610
|
+
.option("--trigger <door>", "http (default), webhook, cron, manual, context, history, db3, users-batch, function:<key>, tool[:<name>]")
|
|
1611
|
+
.option("--runtime <runtime>", "request or task (default: the door's own)")
|
|
1612
|
+
.option("--input <json>", "The input, as JSON; @fixture aliases resolve inside it (default {})")
|
|
1613
|
+
.option("--cases", "Run the function's case file, functions/<key>.auth.json")
|
|
1614
|
+
.option("--all", "With --cases, run every case file in the tree")
|
|
1615
|
+
.option("--json", "Output as JSON")
|
|
1616
|
+
.action(async (functionKey, options) => {
|
|
1617
|
+
const refuse = (message) => {
|
|
1618
|
+
error(message);
|
|
1619
|
+
process.exit(2);
|
|
1620
|
+
};
|
|
1621
|
+
const singleFlags = ["user", "role", "trigger", "runtime", "input"].filter((flag) => options[flag] !== undefined);
|
|
1622
|
+
if (options.all && !options.cases)
|
|
1623
|
+
refuse("--all runs every case file: use it with --cases");
|
|
1624
|
+
if (options.cases && singleFlags.length > 0) {
|
|
1625
|
+
refuse(`--cases runs each case as its file states it: drop ${singleFlags.map((f) => `--${f}`).join(", ")}`);
|
|
1626
|
+
}
|
|
1627
|
+
if (options.all && functionKey)
|
|
1628
|
+
refuse("--cases --all runs every case file: name no function with it");
|
|
1629
|
+
if (!functionKey && !options.all) {
|
|
1630
|
+
refuse(options.cases ? "Name the function whose case file to run, or use --all" : "Name the function to check");
|
|
1631
|
+
}
|
|
1632
|
+
let env;
|
|
1633
|
+
let configDir;
|
|
1634
|
+
try {
|
|
1635
|
+
env = requireCurrentEnvironment();
|
|
1636
|
+
configDir = resolveSyncDir();
|
|
1637
|
+
}
|
|
1638
|
+
catch (err) {
|
|
1639
|
+
return refuse(err.message);
|
|
1640
|
+
}
|
|
1641
|
+
const appId = env.config.appId;
|
|
1642
|
+
const fixturesPath = authFixturesPathFor(env);
|
|
1643
|
+
const fixturesLabel = relativePath(env.projectRoot, fixturesPath);
|
|
1644
|
+
const fixtures = readAuthFixtures(fixturesPath);
|
|
1645
|
+
if (fixtures.ok === false)
|
|
1646
|
+
return refuse(fixtures.error.replace(fixturesPath, fixturesLabel));
|
|
1647
|
+
/** A case's or the flags' user and input, with the aliases resolved. */
|
|
1648
|
+
const resolveSubject = (user, input) => {
|
|
1649
|
+
const resolvedUser = resolveAliases(user, fixtures.fixtures, fixturesLabel, "user");
|
|
1650
|
+
if (resolvedUser.ok === false)
|
|
1651
|
+
return resolvedUser;
|
|
1652
|
+
if (resolvedUser.value !== null && typeof resolvedUser.value !== "string") {
|
|
1653
|
+
return { ok: false, error: `user ${user} must resolve to a user id or null in ${fixturesLabel}` };
|
|
1654
|
+
}
|
|
1655
|
+
const resolvedInput = resolveAliases(input, fixtures.fixtures, fixturesLabel, "$");
|
|
1656
|
+
if (resolvedInput.ok === false)
|
|
1657
|
+
return resolvedInput;
|
|
1658
|
+
return { ok: true, user: resolvedUser.value, input: resolvedInput.value };
|
|
1659
|
+
};
|
|
1660
|
+
const client = new ApiClient();
|
|
1661
|
+
if (!options.cases) {
|
|
1662
|
+
const trigger = parseTriggerFlag(options.trigger ?? "http");
|
|
1663
|
+
if (trigger.ok === false)
|
|
1664
|
+
return refuse(trigger.error);
|
|
1665
|
+
let runtime = null;
|
|
1666
|
+
if (options.runtime !== undefined) {
|
|
1667
|
+
const parsed = parseRuntimeFlag(options.runtime);
|
|
1668
|
+
if (parsed.ok === false)
|
|
1669
|
+
return refuse(parsed.error);
|
|
1670
|
+
runtime = parsed.runtime;
|
|
1671
|
+
}
|
|
1672
|
+
let input = {};
|
|
1673
|
+
if (options.input !== undefined) {
|
|
1674
|
+
try {
|
|
1675
|
+
input = JSON.parse(options.input);
|
|
1676
|
+
}
|
|
1677
|
+
catch {
|
|
1678
|
+
return refuse(`--input is not valid JSON: ${options.input}`);
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
const subject = resolveSubject(options.user ?? null, input);
|
|
1682
|
+
if (subject.ok === false)
|
|
1683
|
+
return refuse(subject.error);
|
|
1684
|
+
let outcome;
|
|
1685
|
+
try {
|
|
1686
|
+
const target = await resolveFunctionByKey(client, appId, functionKey);
|
|
1687
|
+
outcome = await client.authorizeFunction(appId, target.functionId, checkRequestBody({
|
|
1688
|
+
user: subject.user,
|
|
1689
|
+
role: options.role ?? null,
|
|
1690
|
+
trigger: trigger.trigger,
|
|
1691
|
+
runtime,
|
|
1692
|
+
input: subject.input,
|
|
1693
|
+
}));
|
|
1694
|
+
}
|
|
1695
|
+
catch (err) {
|
|
1696
|
+
return refuse(err.message);
|
|
1697
|
+
}
|
|
1698
|
+
const exitCode = exitCodeForCheck(outcome);
|
|
1699
|
+
if (options.json) {
|
|
1700
|
+
json({
|
|
1701
|
+
...(outcome.httpStatus >= 400 ? { httpStatus: outcome.httpStatus } : {}),
|
|
1702
|
+
...(outcome.body ?? {}),
|
|
1703
|
+
functionKey,
|
|
1704
|
+
exitCode,
|
|
1705
|
+
});
|
|
1706
|
+
await flushOutput();
|
|
1707
|
+
process.exit(exitCode);
|
|
1708
|
+
}
|
|
1709
|
+
if (outcome.httpStatus >= 400) {
|
|
1710
|
+
const body = outcome.body ?? {};
|
|
1711
|
+
error(`${body.error ?? "The check was refused"}` +
|
|
1712
|
+
`${body.code ? ` (${body.code}${body.reason ? `, ${body.reason}` : ""})` : ""}`);
|
|
1713
|
+
await flushOutput();
|
|
1714
|
+
process.exit(exitCode);
|
|
1715
|
+
}
|
|
1716
|
+
console.log(renderCheckLine(outcome.body));
|
|
1717
|
+
await flushOutput();
|
|
1718
|
+
process.exit(exitCode);
|
|
1719
|
+
}
|
|
1720
|
+
// ── cases ──
|
|
1721
|
+
const functionsDir = join(configDir, "functions");
|
|
1722
|
+
const keys = options.all ? caseFilesInTree(functionsDir) : [functionKey];
|
|
1723
|
+
if (keys.length === 0) {
|
|
1724
|
+
if (options.json)
|
|
1725
|
+
json({ items: [], passed: 0, failed: 0 });
|
|
1726
|
+
else
|
|
1727
|
+
console.log("No case files");
|
|
1728
|
+
await flushOutput();
|
|
1729
|
+
process.exit(0);
|
|
1730
|
+
}
|
|
1731
|
+
let listed;
|
|
1732
|
+
try {
|
|
1733
|
+
listed = (await client.listFunctions(appId)).items ?? [];
|
|
1734
|
+
}
|
|
1735
|
+
catch (err) {
|
|
1736
|
+
return refuse(err.message);
|
|
1737
|
+
}
|
|
1738
|
+
const rows = [];
|
|
1739
|
+
for (const key of keys) {
|
|
1740
|
+
const filePath = join(functionsDir, `${key}${AUTH_CASE_FILE_SUFFIX}`);
|
|
1741
|
+
const fileLabel = relativePath(env.projectRoot, filePath);
|
|
1742
|
+
if (!existsSync(filePath))
|
|
1743
|
+
refuse(`No case file ${fileLabel}`);
|
|
1744
|
+
const parsed = parseAuthorizeCaseFile(readFileSync(filePath, "utf-8"), fileLabel);
|
|
1745
|
+
if (parsed.ok === false) {
|
|
1746
|
+
if (!options.all)
|
|
1747
|
+
refuse(parsed.error);
|
|
1748
|
+
rows.push({ ...judgeCase(key, { name: "(case file)", expect: "-", code: null }, { error: parsed.error }) });
|
|
1749
|
+
continue;
|
|
1750
|
+
}
|
|
1751
|
+
const match = listed.find((item) => String(item.functionKey ?? "").toLowerCase() === key.toLowerCase());
|
|
1752
|
+
for (const testCase of parsed.cases) {
|
|
1753
|
+
if (!match) {
|
|
1754
|
+
rows.push(judgeCase(key, testCase, { error: `no function '${key}' in this app` }));
|
|
1755
|
+
continue;
|
|
1756
|
+
}
|
|
1757
|
+
const subject = resolveSubject(testCase.user, testCase.input);
|
|
1758
|
+
if (subject.ok === false) {
|
|
1759
|
+
rows.push(judgeCase(key, testCase, { error: `case "${testCase.name}": ${subject.error}` }));
|
|
1760
|
+
continue;
|
|
1761
|
+
}
|
|
1762
|
+
const trigger = parseTriggerFlag(testCase.trigger);
|
|
1763
|
+
let outcome;
|
|
1764
|
+
try {
|
|
1765
|
+
outcome = await client.authorizeFunction(appId, String(match.functionId), checkRequestBody({
|
|
1766
|
+
user: subject.user,
|
|
1767
|
+
role: testCase.role,
|
|
1768
|
+
trigger: trigger.ok ? trigger.trigger : { kind: "http" },
|
|
1769
|
+
runtime: testCase.runtime,
|
|
1770
|
+
input: subject.input,
|
|
1771
|
+
}));
|
|
1772
|
+
}
|
|
1773
|
+
catch (err) {
|
|
1774
|
+
outcome = { error: err.message };
|
|
1775
|
+
}
|
|
1776
|
+
rows.push(judgeCase(key, testCase, outcome));
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
const summary = caseSummary(rows);
|
|
1780
|
+
if (options.json) {
|
|
1781
|
+
json({ items: rows, passed: summary.passed, failed: summary.failed });
|
|
1782
|
+
}
|
|
1783
|
+
else {
|
|
1784
|
+
console.log(renderCaseTable(rows, { withFunction: !!options.all }));
|
|
1785
|
+
console.log(summary.line);
|
|
1786
|
+
}
|
|
1787
|
+
// A report past the pipe buffer is cut off by an exit that does not wait.
|
|
1788
|
+
await flushOutput();
|
|
1789
|
+
process.exit(summary.failed > 0 ? 1 : 0);
|
|
1790
|
+
});
|
|
1464
1791
|
runs
|
|
1465
1792
|
.command("wait")
|
|
1466
1793
|
.allowExcessArguments(false)
|
|
@@ -1510,13 +1837,32 @@ Reclaiming the key means hard-deleting the row:
|
|
|
1510
1837
|
* Whether a directory still holds an agent's generated artifact (either
|
|
1511
1838
|
* language) — #3798, CSO-3798-003: a tree whose last agent was removed has
|
|
1512
1839
|
* nothing left to generate, and those files still need sweeping (and
|
|
1513
|
-
* reporting under `--check`).
|
|
1840
|
+
* reporting under `--check`). #5385 — likewise the user property types once
|
|
1841
|
+
* user-properties.toml is gone.
|
|
1842
|
+
*/
|
|
1843
|
+
/**
|
|
1844
|
+
* #5544 — whether a Swift run has shared types to declare (a `schemas/` def,
|
|
1845
|
+
* a prompt output type) though the tree has no function; a tree that cannot be
|
|
1846
|
+
* described is left to the commands that push it.
|
|
1514
1847
|
*/
|
|
1848
|
+
function treeHasSharedSwiftTypes(configDir) {
|
|
1849
|
+
try {
|
|
1850
|
+
return treeDeclaresSharedSwiftTypes(describeTreeTypes(primitiveDeclarationInputs(configDir), "swift"));
|
|
1851
|
+
}
|
|
1852
|
+
catch {
|
|
1853
|
+
return false;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1515
1856
|
function holdsAgentArtifacts(dir) {
|
|
1516
1857
|
if (!existsSync(dir))
|
|
1517
1858
|
return false;
|
|
1518
1859
|
try {
|
|
1519
|
-
return readdirSync(dir).some((file) => file.endsWith(AGENT_CLIENT_FILE_SUFFIX) ||
|
|
1860
|
+
return readdirSync(dir).some((file) => file.endsWith(AGENT_CLIENT_FILE_SUFFIX) ||
|
|
1861
|
+
file.endsWith(AGENT_SWIFT_FILE_SUFFIX) ||
|
|
1862
|
+
file === USER_PROPERTIES_CLIENT_FILE ||
|
|
1863
|
+
file === USER_PROPERTIES_SWIFT_FILE ||
|
|
1864
|
+
// #5544 — the shared Swift types, swept once nothing writes them.
|
|
1865
|
+
file === SHARED_SWIFT_FILE);
|
|
1520
1866
|
}
|
|
1521
1867
|
catch {
|
|
1522
1868
|
return false;
|