@superblocksteam/shared 0.9619.10 → 0.9620.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bindings/utils.d.ts.map +1 -1
- package/dist/bindings/utils.js +1 -1
- package/dist/bindings/utils.js.map +1 -1
- package/dist/constants.d.ts +10 -8
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +12 -12
- package/dist/constants.js.map +1 -1
- package/dist/database-lifecycle/appDatabaseCompatibility.d.ts +2 -2
- package/dist/database-lifecycle/appDatabaseCompatibility.d.ts.map +1 -1
- package/dist/database-lifecycle/appDatabaseImport.d.ts +18 -2
- package/dist/database-lifecycle/appDatabaseImport.d.ts.map +1 -1
- package/dist/database-lifecycle/appDatabaseImport.js.map +1 -1
- package/dist/database-lifecycle/appDatabaseStatus.d.ts +12 -2
- package/dist/database-lifecycle/appDatabaseStatus.d.ts.map +1 -1
- package/dist/database-lifecycle/appDatabaseStatus.js +8 -2
- package/dist/database-lifecycle/appDatabaseStatus.js.map +1 -1
- package/dist/database-lifecycle/appDatabaseStatus.test.js +2 -0
- package/dist/database-lifecycle/appDatabaseStatus.test.js.map +1 -1
- package/dist/database-lifecycle/capacityPolicy.d.ts +2 -2
- package/dist/database-lifecycle/capacityPolicy.d.ts.map +1 -1
- package/dist/database-lifecycle/capacityPolicy.js.map +1 -1
- package/dist/database-lifecycle/dataImport.d.ts +7 -4
- package/dist/database-lifecycle/dataImport.d.ts.map +1 -1
- package/dist/database-lifecycle/dataImport.js.map +1 -1
- package/dist/database-lifecycle/destructiveMigrations.d.ts +3 -3
- package/dist/database-lifecycle/destructiveMigrations.js.map +1 -1
- package/dist/database-lifecycle/importCompatibility.d.ts +15 -2
- package/dist/database-lifecycle/importCompatibility.d.ts.map +1 -1
- package/dist/database-lifecycle/importCompatibility.js +33 -0
- package/dist/database-lifecycle/importCompatibility.js.map +1 -1
- package/dist/database-lifecycle/importCompatibility.test.js +47 -1
- package/dist/database-lifecycle/importCompatibility.test.js.map +1 -1
- package/dist/database-lifecycle/index.d.ts +18 -14
- package/dist/database-lifecycle/index.d.ts.map +1 -1
- package/dist/database-lifecycle/index.js +4 -0
- package/dist/database-lifecycle/index.js.map +1 -1
- package/dist/database-lifecycle/physicalPoolIdentity.d.ts.map +1 -1
- package/dist/database-lifecycle/physicalPoolIdentity.js.map +1 -1
- package/dist/errors/git.d.ts.map +1 -1
- package/dist/errors/http.d.ts.map +1 -1
- package/dist/errors/integration.d.ts.map +1 -1
- package/dist/errors/integration.js +1 -1
- package/dist/errors/integration.js.map +1 -1
- package/dist/headers.d.ts +9 -0
- package/dist/headers.d.ts.map +1 -0
- package/dist/headers.js +12 -0
- package/dist/headers.js.map +1 -0
- package/dist/jwt/verifier.d.ts.map +1 -1
- package/dist/jwt/verifier.js +1 -1
- package/dist/jwt/verifier.js.map +1 -1
- package/dist/observability/index.d.ts +1 -0
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +1 -0
- package/dist/observability/index.js.map +1 -1
- package/dist/org-features/index.d.ts +2 -2
- package/dist/org-features/index.d.ts.map +1 -1
- package/dist/package.json +1 -1
- package/dist/pageMigrations/migrations/v4to5.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v5to6.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v5to6.js +6 -1
- package/dist/pageMigrations/migrations/v5to6.js.map +1 -1
- package/dist/pageMigrations/migrations/v5to6.test.js +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.js +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.js.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.test.js +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.js +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.js.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.test.js +2 -2
- package/dist/pageMigrations/migrations/v6to7/migrateToSections.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/v6to7.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v7to8.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v7to8.js +2 -1
- package/dist/pageMigrations/migrations/v7to8.js.map +1 -1
- package/dist/pageMigrations/migrations/v7to8.test.js +1 -1
- package/dist/pages/pageV6.d.ts.map +1 -1
- package/dist/pages/pageV7.d.ts.map +1 -1
- package/dist/pages/pageV8.d.ts.map +1 -1
- package/dist/pages/pageV8.js +1 -1
- package/dist/pages/pageV8.js.map +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/templates/constants.d.ts +1 -1
- package/dist/plugins/templates/constants.d.ts.map +1 -1
- package/dist/plugins/templates/graphql.d.ts.map +1 -1
- package/dist/plugins/templates/gsheets.d.ts.map +1 -1
- package/dist/plugins/templates/lakebase.d.ts.map +1 -1
- package/dist/plugins/templates/mcp.d.ts.map +1 -1
- package/dist/plugins/templates/mcp.test.js +13 -0
- package/dist/plugins/templates/mcp.test.js.map +1 -1
- package/dist/plugins/templates/salesforce.d.ts.map +1 -1
- package/dist/plugins/templates/shared/auth.d.ts.map +1 -1
- package/dist/plugins/templates/shared/auth.js +16 -0
- package/dist/plugins/templates/shared/auth.js.map +1 -1
- package/dist/plugins/templates/shared/aws.d.ts.map +1 -1
- package/dist/plugins/templates/shared/db.d.ts.map +1 -1
- package/dist/plugins/templates/shared/openapi.d.ts.map +1 -1
- package/dist/plugins/templates/shared/openapi.js +1 -1
- package/dist/plugins/templates/shared/openapi.js.map +1 -1
- package/dist/plugins/templates/shared/restapiintegration.d.ts.map +1 -1
- package/dist/plugins/templates/shared/sql.d.ts.map +1 -1
- package/dist/plugins/templates/shared/sshtunnel.d.ts.map +1 -1
- package/dist/plugins/templates/snowflakepostgres.d.ts.map +1 -1
- package/dist/plugins/unsupported-integration-types.d.ts +10 -0
- package/dist/plugins/unsupported-integration-types.d.ts.map +1 -0
- package/dist/plugins/unsupported-integration-types.js +29 -0
- package/dist/plugins/unsupported-integration-types.js.map +1 -0
- package/dist/refactoring/application.d.ts.map +1 -1
- package/dist/refactoring/application.js +2 -1
- package/dist/refactoring/application.js.map +1 -1
- package/dist/refactoring/refactor.d.ts.map +1 -1
- package/dist/refactoring/refactor.js +4 -1
- package/dist/refactoring/refactor.js.map +1 -1
- package/dist/refactoring/refactor.test.js +274 -260
- package/dist/refactoring/refactor.test.js.map +1 -1
- package/dist/refactoring/rename.js +1 -1
- package/dist/refactoring/rename.js.map +1 -1
- package/dist/refactoring/updates.d.ts.map +1 -1
- package/dist/refactoring/updates.js +3 -1
- package/dist/refactoring/updates.js.map +1 -1
- package/dist/relay/builder.d.ts.map +1 -1
- package/dist/signing/JSON/portable.js +2 -2
- package/dist/signing/index.js +1 -1
- package/dist/signing/index.js.map +1 -1
- package/dist/socket/dist-entry.test.js +10 -2
- package/dist/socket/dist-entry.test.js.map +1 -1
- package/dist/socket/heartbeat.d.ts.map +1 -1
- package/dist/socket/heartbeat.js.map +1 -1
- package/dist/socket/heartbeat.test.js.map +1 -1
- package/dist/socket/protocol.d.ts +26 -0
- package/dist/socket/protocol.d.ts.map +1 -1
- package/dist/socket/socket.d.ts +1 -1
- package/dist/socket/socket.d.ts.map +1 -1
- package/dist/socket/socket.js +2 -2
- package/dist/socket/socketWithClientAuth.d.ts.map +1 -1
- package/dist/socket/tracedSocket.d.ts.map +1 -1
- package/dist/socket/types.d.ts.map +1 -1
- package/dist/socket/util.js.map +1 -1
- package/dist/tracing/methodTracing.js +1 -1
- package/dist/types/ai/builder-caller.d.ts +16 -0
- package/dist/types/ai/builder-caller.d.ts.map +1 -0
- package/dist/types/ai/builder-caller.js +64 -0
- package/dist/types/ai/builder-caller.js.map +1 -0
- package/dist/types/ai/builder-caller.test.d.ts +2 -0
- package/dist/types/ai/builder-caller.test.d.ts.map +1 -0
- package/dist/types/ai/builder-caller.test.js +40 -0
- package/dist/types/ai/builder-caller.test.js.map +1 -0
- package/dist/types/ai/index.d.ts +25 -3
- package/dist/types/ai/index.d.ts.map +1 -1
- package/dist/types/ai/index.js +3 -0
- package/dist/types/ai/index.js.map +1 -1
- package/dist/types/ai/native-builder-model.d.ts +21 -0
- package/dist/types/ai/native-builder-model.d.ts.map +1 -0
- package/dist/types/ai/native-builder-model.js +26 -0
- package/dist/types/ai/native-builder-model.js.map +1 -0
- package/dist/types/ai/native-builder-model.test.d.ts +2 -0
- package/dist/types/ai/native-builder-model.test.d.ts.map +1 -0
- package/dist/types/ai/native-builder-model.test.js +30 -0
- package/dist/types/ai/native-builder-model.test.js.map +1 -0
- package/dist/types/ai/provider-credential.d.ts +1 -1
- package/dist/types/ai/provider-credential.d.ts.map +1 -1
- package/dist/types/ai/quota-paywall.d.ts.map +1 -1
- package/dist/types/ai/safety-classification.d.ts +1 -1
- package/dist/types/ai/safety-classification.d.ts.map +1 -1
- package/dist/types/api/control-flow.d.ts +12 -12
- package/dist/types/api/control-flow.d.ts.map +1 -1
- package/dist/types/api/control-flow.js.map +1 -1
- package/dist/types/api/execution.d.ts.map +1 -1
- package/dist/types/api/execution.js +4 -1
- package/dist/types/api/execution.js.map +1 -1
- package/dist/types/api/global.d.ts.map +1 -1
- package/dist/types/api/global.js +2 -3
- package/dist/types/api/global.js.map +1 -1
- package/dist/types/api/index.d.ts +1 -1
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/schedule.d.ts.map +1 -1
- package/dist/types/application/index.d.ts +3 -0
- package/dist/types/application/index.d.ts.map +1 -1
- package/dist/types/application/index.js.map +1 -1
- package/dist/types/application/index.test.js.map +1 -1
- package/dist/types/audit/ocsf.d.ts.map +1 -1
- package/dist/types/audit/ocsf.js +1 -0
- package/dist/types/audit/ocsf.js.map +1 -1
- package/dist/types/branch/index.d.ts +107 -0
- package/dist/types/branch/index.d.ts.map +1 -1
- package/dist/types/codeSecurity/index.d.ts +3 -3
- package/dist/types/codeSecurity/index.d.ts.map +1 -1
- package/dist/types/common/env.d.ts.map +1 -1
- package/dist/types/common/response.d.ts +3 -0
- package/dist/types/common/response.d.ts.map +1 -1
- package/dist/types/common/response.js +2 -0
- package/dist/types/common/response.js.map +1 -1
- package/dist/types/credentials/index.d.ts +3 -3
- package/dist/types/credentials/index.d.ts.map +1 -1
- package/dist/types/customAgents.d.ts +2 -3
- package/dist/types/customAgents.d.ts.map +1 -1
- package/dist/types/datasource/auth.d.ts.map +1 -1
- package/dist/types/datasource/auth.js +1 -1
- package/dist/types/datasource/auth.js.map +1 -1
- package/dist/types/datasource/index.d.ts.map +1 -1
- package/dist/types/datasource/metadata/database.d.ts.map +1 -1
- package/dist/types/event/index.d.ts +4 -3
- package/dist/types/event/index.d.ts.map +1 -1
- package/dist/types/event/index.js +1 -0
- package/dist/types/event/index.js.map +1 -1
- package/dist/types/group/index.d.ts.map +1 -1
- package/dist/types/integration/index.d.ts.map +1 -1
- package/dist/types/integration/index.js +2 -2
- package/dist/types/metadata/index.d.ts.map +1 -1
- package/dist/types/organization/agent.d.ts.map +1 -1
- package/dist/types/organization/token.d.ts.map +1 -1
- package/dist/types/page/Dimension.d.ts +7 -7
- package/dist/types/page/Dimension.d.ts.map +1 -1
- package/dist/types/page/Dimension.js +1 -1
- package/dist/types/page/Dimension.js.map +1 -1
- package/dist/types/page/Dimension.test.js +1 -1
- package/dist/types/page/Padding.d.ts +2 -2
- package/dist/types/page/Padding.d.ts.map +1 -1
- package/dist/types/page/Padding.js +1 -1
- package/dist/types/page/event.d.ts.map +1 -1
- package/dist/types/page/event.js +2 -1
- package/dist/types/page/event.js.map +1 -1
- package/dist/types/plugin/evaluation.d.ts +12 -5
- package/dist/types/plugin/evaluation.d.ts.map +1 -1
- package/dist/types/plugin/evaluation.js +8 -6
- package/dist/types/plugin/evaluation.js.map +1 -1
- package/dist/types/plugin/form.d.ts +1 -1
- package/dist/types/plugin/form.d.ts.map +1 -1
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/plugin/integration.d.ts.map +1 -1
- package/dist/types/plugin/js-tokenizer.d.ts +14 -0
- package/dist/types/plugin/js-tokenizer.d.ts.map +1 -0
- package/dist/types/plugin/js-tokenizer.js +97 -0
- package/dist/types/plugin/js-tokenizer.js.map +1 -0
- package/dist/types/plugin/js-tokenizer.test.d.ts +2 -0
- package/dist/types/plugin/js-tokenizer.test.d.ts.map +1 -0
- package/dist/types/plugin/js-tokenizer.test.js +126 -0
- package/dist/types/plugin/js-tokenizer.test.js.map +1 -0
- package/dist/types/policyGate/errors.d.ts +23 -23
- package/dist/types/policyGate/errors.d.ts.map +1 -1
- package/dist/types/profile/index.d.ts.map +1 -1
- package/dist/types/publishPipeline/index.d.ts +6 -6
- package/dist/types/publishPipeline/index.d.ts.map +1 -1
- package/dist/types/publishPipeline/policyStatus.js.map +1 -1
- package/dist/types/rbac/index.d.ts +4 -0
- package/dist/types/rbac/index.d.ts.map +1 -1
- package/dist/types/rbac/index.js +4 -0
- package/dist/types/rbac/index.js.map +1 -1
- package/dist/types/repository/index.d.ts.map +1 -1
- package/dist/types/repository/index.js.map +1 -1
- package/dist/types/reviewPolicy/index.d.ts +24 -24
- package/dist/types/reviewPolicy/index.d.ts.map +1 -1
- package/dist/types/user/analytics.d.ts +1 -1
- package/dist/types/user/analytics.d.ts.map +1 -1
- package/dist/utils/apiv2.d.ts.map +1 -1
- package/dist/utils/apiv2.js +1 -1
- package/dist/utils/apiv2.test.js +10 -10
- package/dist/utils/appDSL.d.ts.map +1 -1
- package/dist/utils/attachment-upload.d.ts +1 -1
- package/dist/utils/attachment-upload.d.ts.map +1 -1
- package/dist/utils/attachment-upload.js +3 -1
- package/dist/utils/attachment-upload.js.map +1 -1
- package/dist/utils/attachment-validation.d.ts +6 -6
- package/dist/utils/attachment-validation.d.ts.map +1 -1
- package/dist/utils/attachment-validation.js +5 -4
- package/dist/utils/attachment-validation.js.map +1 -1
- package/dist/utils/azure-devops-workflow.js.map +1 -1
- package/dist/utils/bitbucket-workflow.js.map +1 -1
- package/dist/utils/bytestring.d.ts.map +1 -1
- package/dist/utils/bytestring.js +5 -4
- package/dist/utils/bytestring.js.map +1 -1
- package/dist/utils/bytestring.test.d.ts +2 -0
- package/dist/utils/bytestring.test.d.ts.map +1 -0
- package/dist/utils/bytestring.test.js +23 -0
- package/dist/utils/bytestring.test.js.map +1 -0
- package/dist/utils/configuration.d.ts.map +1 -1
- package/dist/utils/configuration.js +3 -1
- package/dist/utils/configuration.js.map +1 -1
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +4 -4
- package/dist/utils/github-workflow.js.map +1 -1
- package/dist/utils/gitlab-workflow.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/localNativeBuilderFlags.d.ts +9 -0
- package/dist/utils/localNativeBuilderFlags.d.ts.map +1 -0
- package/dist/utils/localNativeBuilderFlags.js +26 -0
- package/dist/utils/localNativeBuilderFlags.js.map +1 -0
- package/dist/utils/localNativeBuilderFlags.test.d.ts +2 -0
- package/dist/utils/localNativeBuilderFlags.test.d.ts.map +1 -0
- package/dist/utils/localNativeBuilderFlags.test.js +35 -0
- package/dist/utils/localNativeBuilderFlags.test.js.map +1 -0
- package/dist/utils/maskCredential.d.ts.map +1 -1
- package/dist/utils/openApiSpecRef.d.ts +3 -0
- package/dist/utils/openApiSpecRef.d.ts.map +1 -0
- package/dist/utils/openApiSpecRef.js +27 -0
- package/dist/utils/openApiSpecRef.js.map +1 -0
- package/dist/utils/openApiSpecRef.test.d.ts +2 -0
- package/dist/utils/openApiSpecRef.test.d.ts.map +1 -0
- package/dist/utils/openApiSpecRef.test.js +16 -0
- package/dist/utils/openApiSpecRef.test.js.map +1 -0
- package/dist/utils/page.js +1 -1
- package/dist/utils/page.js.map +1 -1
- package/dist/utils/pageFixtures/v4/container.d.ts +346 -346
- package/dist/utils/pageFixtures/v4/container.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/empty.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/form.d.ts +11 -11
- package/dist/utils/pageFixtures/v4/form.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/grid.d.ts +9 -9
- package/dist/utils/pageFixtures/v4/grid.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/slideout.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/tabs.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v5/codeTrigger.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v5/complexTriggers.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v5/duplicateTriggers.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v5/missingTriggers.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/initial_app.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/nested_modal.d.ts +32 -32
- package/dist/utils/pageFixtures/v6/nested_modal.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/slideout_without_child.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/with_2_modals.d.ts +30 -30
- package/dist/utils/pageFixtures/v6/with_2_modals.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/with_main_canvas_children.d.ts +97 -97
- package/dist/utils/pageFixtures/v6/with_main_canvas_children.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/with_slideouts.d.ts +42 -42
- package/dist/utils/pageFixtures/v6/with_slideouts.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/with_widgets_named_page.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v7/canvases.d.ts +29 -29
- package/dist/utils/pageFixtures/v7/canvases.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v7/grids_and_forms.d.ts +56 -56
- package/dist/utils/pageFixtures/v7/grids_and_forms.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v7/images.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v7/initial_app.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v7/nested_containers.d.ts +2 -2
- package/dist/utils/pageFixtures/v7/nested_containers.d.ts.map +1 -1
- package/dist/utils/platform-mcp-server-routes.d.ts +23 -0
- package/dist/utils/platform-mcp-server-routes.d.ts.map +1 -0
- package/dist/utils/platform-mcp-server-routes.js +59 -0
- package/dist/utils/platform-mcp-server-routes.js.map +1 -0
- package/dist/utils/platform-mcp-server-routes.test.d.ts +2 -0
- package/dist/utils/platform-mcp-server-routes.test.d.ts.map +1 -0
- package/dist/utils/platform-mcp-server-routes.test.js +21 -0
- package/dist/utils/platform-mcp-server-routes.test.js.map +1 -0
- package/dist/utils/string.d.ts.map +1 -1
- package/dist/utils/string.js +1 -1
- package/dist/utils/tracedEventEmitter.d.ts.map +1 -1
- package/dist/utils/tracedEventEmitter.js +3 -3
- package/dist/utils/truncate.d.ts.map +1 -1
- package/dist/utils/truncate.test.js +1 -1
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js +1 -1
- package/dist/utils/url.js.map +1 -1
- package/package.json +25 -19
- package/src/bindings/utils.ts +1 -1
- package/src/constants.ts +15 -12
- package/src/database-lifecycle/appDatabaseImport.ts +34 -0
- package/src/database-lifecycle/appDatabaseStatus.test.ts +2 -0
- package/src/database-lifecycle/appDatabaseStatus.ts +19 -3
- package/src/database-lifecycle/dataImport.ts +6 -0
- package/src/database-lifecycle/importCompatibility.test.ts +60 -1
- package/src/database-lifecycle/importCompatibility.ts +52 -0
- package/src/database-lifecycle/index.ts +6 -0
- package/src/errors/integration.ts +1 -1
- package/src/headers.ts +11 -0
- package/src/jwt/verifier.ts +1 -1
- package/src/observability/index.ts +1 -0
- package/src/pageMigrations/migrations/v4to5.ts +1 -1
- package/src/pageMigrations/migrations/v5to6.test.ts +1 -1
- package/src/pageMigrations/migrations/v5to6.ts +6 -1
- package/src/pageMigrations/migrations/v6to7/adjustModalCanvases.test.ts +1 -1
- package/src/pageMigrations/migrations/v6to7/adjustModalCanvases.ts +1 -1
- package/src/pageMigrations/migrations/v6to7/migrateToDimensions.test.ts +2 -2
- package/src/pageMigrations/migrations/v6to7/migrateToDimensions.ts +1 -1
- package/src/pageMigrations/migrations/v7to8.test.ts +1 -1
- package/src/pageMigrations/migrations/v7to8.ts +2 -1
- package/src/pages/pageV8.ts +1 -1
- package/src/plugins/index.ts +1 -0
- package/src/plugins/templates/mcp.test.ts +17 -0
- package/src/plugins/templates/shared/auth.ts +16 -0
- package/src/plugins/templates/shared/openapi.ts +1 -1
- package/src/plugins/unsupported-integration-types.ts +30 -0
- package/src/refactoring/application.ts +2 -1
- package/src/refactoring/refactor.test.ts +306 -287
- package/src/refactoring/refactor.ts +4 -1
- package/src/refactoring/rename.ts +1 -1
- package/src/refactoring/updates.ts +3 -1
- package/src/signing/JSON/portable.ts +2 -2
- package/src/signing/index.ts +1 -1
- package/src/socket/dist-entry.test.ts +14 -2
- package/src/socket/protocol.ts +17 -0
- package/src/socket/socket.ts +2 -2
- package/src/socket/types.ts +1 -1
- package/src/tracing/methodTracing.ts +1 -1
- package/src/types/ai/builder-caller.test.ts +45 -0
- package/src/types/ai/builder-caller.ts +63 -0
- package/src/types/ai/index.ts +24 -0
- package/src/types/ai/native-builder-model.test.ts +33 -0
- package/src/types/ai/native-builder-model.ts +28 -0
- package/src/types/api/execution.ts +4 -1
- package/src/types/api/global.ts +2 -4
- package/src/types/application/index.ts +3 -0
- package/src/types/audit/ocsf.ts +1 -0
- package/src/types/branch/index.ts +101 -0
- package/src/types/common/response.ts +3 -0
- package/src/types/customAgents.ts +2 -3
- package/src/types/datasource/auth.ts +1 -1
- package/src/types/datasource/metadata/index.ts +4 -4
- package/src/types/event/index.ts +2 -1
- package/src/types/integration/index.ts +3 -3
- package/src/types/page/Dimension.test.ts +1 -1
- package/src/types/page/Dimension.ts +1 -1
- package/src/types/page/Padding.ts +1 -1
- package/src/types/page/event.ts +2 -1
- package/src/types/plugin/evaluation.ts +20 -13
- package/src/types/plugin/form.ts +1 -1
- package/src/types/plugin/js-tokenizer.test.ts +139 -0
- package/src/types/plugin/js-tokenizer.ts +98 -0
- package/src/types/rbac/index.ts +4 -0
- package/src/utils/apiv2.test.ts +10 -10
- package/src/utils/apiv2.ts +1 -1
- package/src/utils/attachment-upload.ts +4 -1
- package/src/utils/attachment-validation.ts +8 -4
- package/src/utils/bytestring.test.ts +31 -0
- package/src/utils/bytestring.ts +7 -4
- package/src/utils/configuration.ts +3 -1
- package/src/utils/env.ts +5 -5
- package/src/utils/index.ts +3 -0
- package/src/utils/localNativeBuilderFlags.test.ts +39 -0
- package/src/utils/localNativeBuilderFlags.ts +27 -0
- package/src/utils/openApiSpecRef.test.ts +20 -0
- package/src/utils/openApiSpecRef.ts +30 -0
- package/src/utils/page.ts +2 -2
- package/src/utils/platform-mcp-server-routes.test.ts +27 -0
- package/src/utils/platform-mcp-server-routes.ts +65 -0
- package/src/utils/string.ts +1 -1
- package/src/utils/tracedEventEmitter.ts +5 -5
- package/src/utils/truncate.test.ts +1 -1
- package/src/utils/url.ts +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import get from 'lodash-es/get.js';
|
|
2
|
+
import isArray from 'lodash-es/isArray.js';
|
|
3
|
+
import isEqual from 'lodash-es/isEqual.js';
|
|
2
4
|
|
|
3
5
|
import { type PageDSL, isValidStepDef, type ValidMultiStepDef, type StepDef } from '../types/index.js';
|
|
4
6
|
import type { FlattenedWidgetProps } from '../utils/normalize.js';
|
|
@@ -36,7 +36,7 @@ function escapeChar(char: string): string {
|
|
|
36
36
|
// * surrogate code points (U+D800 through U+DFFF), which should only match when unpaired, which is are actually invalid in unicode, but RFC 8259 suggests to escape them when they appear because of errors
|
|
37
37
|
// We use the `u` flag to match surrogates only when they are unpaired
|
|
38
38
|
// Note: this is one of the rare occasions where we do want control characters in a regex, so we disable the eslint rule
|
|
39
|
-
//
|
|
39
|
+
// oxlint-disable-next-line no-control-regex
|
|
40
40
|
const charsToEscape = /[\u0000-\u001f\ud800-\udfff"\\]/gu;
|
|
41
41
|
|
|
42
42
|
function JSONStringifyString(str: string) {
|
|
@@ -63,7 +63,7 @@ function compareObjectKeys(a: string, b: string): number {
|
|
|
63
63
|
export function stableJSONStringify_portable(data: unknown): string | undefined {
|
|
64
64
|
// track the objects being serialized, so that we don't get into an infinite cycle
|
|
65
65
|
const seen = new Set<unknown>();
|
|
66
|
-
//
|
|
66
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
67
67
|
return (function stringify(node: any) {
|
|
68
68
|
if (typeof node?.toJSON === 'function') {
|
|
69
69
|
node = node.toJSON();
|
package/src/signing/index.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
1
2
|
import { existsSync } from 'node:fs';
|
|
2
3
|
import { createRequire } from 'node:module';
|
|
3
4
|
import path from 'node:path';
|
|
5
|
+
import { pathToFileURL } from 'node:url';
|
|
6
|
+
import { promisify } from 'node:util';
|
|
4
7
|
|
|
5
8
|
import { describe, expect, it } from 'vitest';
|
|
6
9
|
|
|
@@ -23,7 +26,16 @@ describe('Node package entry', () => {
|
|
|
23
26
|
if (!existsSync(entry)) {
|
|
24
27
|
return;
|
|
25
28
|
}
|
|
26
|
-
const
|
|
27
|
-
|
|
29
|
+
const { stdout } = await promisify(execFile)(
|
|
30
|
+
process.execPath,
|
|
31
|
+
[
|
|
32
|
+
'--input-type=module',
|
|
33
|
+
'-e',
|
|
34
|
+
'const shared = await import(process.argv[1]); console.log(typeof shared.SocketHeartbeat);',
|
|
35
|
+
pathToFileURL(entry).href
|
|
36
|
+
],
|
|
37
|
+
{ timeout: 4_000, killSignal: 'SIGKILL' }
|
|
38
|
+
);
|
|
39
|
+
expect(stdout.trim()).toBe('function');
|
|
28
40
|
});
|
|
29
41
|
});
|
package/src/socket/protocol.ts
CHANGED
|
@@ -153,8 +153,23 @@ export interface ServerMethods {
|
|
|
153
153
|
{ chatSessionId: string; messages: AiChatMessageDto[] }
|
|
154
154
|
>;
|
|
155
155
|
/** Id of the active chat session, created if the app has none yet. Reads no messages. */
|
|
156
|
+
resolveBuilderBinding: ServerMethodSchema<
|
|
157
|
+
{ applicationId: string; branchName: string; preferredHarness: 'clark' | 'codex' | 'claude_code' },
|
|
158
|
+
import('../types/ai/index.js').AiBuilderBinding
|
|
159
|
+
>;
|
|
160
|
+
/** Workspace placement for an app branch from the primary chat's existing binding. Creates nothing. */
|
|
161
|
+
resolveWorkspacePlacement: ServerMethodSchema<
|
|
162
|
+
{ applicationId: string; branchName: string },
|
|
163
|
+
import('../types/ai/index.js').WorkspaceBinding
|
|
164
|
+
>;
|
|
165
|
+
saveBuilderSession: ServerMethodSchema<
|
|
166
|
+
{ applicationId: string; branchName: string; chatSessionId: string; runtimeSessionId: string; nativeSessionId: string },
|
|
167
|
+
void
|
|
168
|
+
>;
|
|
156
169
|
getActiveSessionId: ServerMethodSchema<{ applicationId: string }, { chatSessionId: string }>;
|
|
157
170
|
new: ServerMethodSchema<{ applicationId: string; branchName?: string | null }, { chatSessionId: string }>;
|
|
171
|
+
/** Makes an existing chat of the caller's branch the active one. */
|
|
172
|
+
switch: ServerMethodSchema<{ applicationId: string; chatSessionId: string }, { chatSessionId: string }>;
|
|
158
173
|
truncateAfterTimestamp: ServerMethodSchema<{ applicationId: string; sinceTimestamp: number }, void>;
|
|
159
174
|
};
|
|
160
175
|
billing: {
|
|
@@ -275,6 +290,7 @@ export interface ServerMethods {
|
|
|
275
290
|
applicationId: string;
|
|
276
291
|
branchName?: string;
|
|
277
292
|
hash: string;
|
|
293
|
+
baseHash?: string;
|
|
278
294
|
source?: string;
|
|
279
295
|
targetTemplateName?: string;
|
|
280
296
|
migrationGeneration?: number;
|
|
@@ -285,6 +301,7 @@ export interface ServerMethods {
|
|
|
285
301
|
commitId?: string;
|
|
286
302
|
commitMessage?: string;
|
|
287
303
|
checkpointSkipped?: CheckpointSkipReason;
|
|
304
|
+
conflicts?: string[];
|
|
288
305
|
}
|
|
289
306
|
>;
|
|
290
307
|
};
|
package/src/socket/socket.ts
CHANGED
|
@@ -248,7 +248,7 @@ export class ISocket<ImplementedMethods, CallableMethods, RequestContext extends
|
|
|
248
248
|
this.clearPendingRequestState(message.response.id);
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
251
|
-
//
|
|
251
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
252
252
|
responseHandler.resolve(message.response.payload as any);
|
|
253
253
|
this.clearPendingRequestState(message.response.id);
|
|
254
254
|
} else {
|
|
@@ -500,7 +500,7 @@ export function createISocketClient<CallableMethods, ImplementedMethods, Request
|
|
|
500
500
|
return {
|
|
501
501
|
close: (reason?: string) => socket.close(reason),
|
|
502
502
|
closeAndRejectPendingRequests: (reason?: string) => socket.closeAndRejectPendingRequests(reason),
|
|
503
|
-
//
|
|
503
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
504
504
|
call: createIsocketProxy(socket, undefined) as any,
|
|
505
505
|
requestWithTracing: <Params, Result>(
|
|
506
506
|
method: string,
|
package/src/socket/types.ts
CHANGED
|
@@ -12,7 +12,7 @@ export type MethodHandler<Params, Result, PeerMethods, RequestContext> = (
|
|
|
12
12
|
) => Promise<Result>;
|
|
13
13
|
|
|
14
14
|
// A generic middleware is a method handler that can be chained with any other method handler, so it uses `any` for the params and result types
|
|
15
|
-
//
|
|
15
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
16
|
export type GenericMiddleware<PeerMethods, RequestContext> = MethodHandler<any, any, PeerMethods, RequestContext>;
|
|
17
17
|
|
|
18
18
|
type NonEmptyArray<T> = [...T[], T];
|
|
@@ -12,7 +12,7 @@ import { sanitizeError } from './errorSanitizer.js';
|
|
|
12
12
|
export function traceMethod(className: string, methodName: string, descriptor: PropertyDescriptor, tracer: Tracer): PropertyDescriptor {
|
|
13
13
|
const originalMethod = descriptor.value;
|
|
14
14
|
|
|
15
|
-
//
|
|
15
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
16
|
descriptor.value = function (...args: any[]) {
|
|
17
17
|
// Potentially, we can pass this from tracing middleware to req and then to ActionHandler
|
|
18
18
|
const parentSpan = trace.getActiveSpan() as Span | undefined;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import { BuilderCaller } from './builder-caller.js';
|
|
4
|
+
|
|
5
|
+
describe('BuilderCaller', () => {
|
|
6
|
+
it('attributes a gateway prompt to its MCP host', () => {
|
|
7
|
+
const caller = BuilderCaller.fromPeer('gateway', 'claude-ai');
|
|
8
|
+
|
|
9
|
+
expect(caller.metadata).toEqual({ callerChannel: 'mcp', mcpClient: 'claude' });
|
|
10
|
+
expect(caller.spanTags).toEqual({ 'builder.caller_channel': 'mcp', 'builder.mcp_client': 'claude' });
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it.each([
|
|
14
|
+
['claude-code', 'claude_code'],
|
|
15
|
+
['local-agent-mode-plugin:superblocks', 'cowork'],
|
|
16
|
+
['local-agent-mode-superblocks', 'cowork'],
|
|
17
|
+
['Cursor', 'cursor'],
|
|
18
|
+
['codex', 'codex'],
|
|
19
|
+
['my-private-host@example.com', 'other'],
|
|
20
|
+
[undefined, 'unknown'],
|
|
21
|
+
[{ name: 'claude-ai' }, 'unknown']
|
|
22
|
+
])('bounds the reported host %j to %s', (name, expected) => {
|
|
23
|
+
expect(BuilderCaller.fromPeer('gateway', name).metadata.mcpClient).toBe(expected);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('uses the current peer instead of client-supplied host claims on editor and library turns', () => {
|
|
27
|
+
expect(BuilderCaller.fromPeer('editor', 'claude-ai').metadata).toEqual({ callerChannel: 'editor' });
|
|
28
|
+
expect(BuilderCaller.fromPeer('library', 'claude-ai').metadata).toEqual({ callerChannel: 'library' });
|
|
29
|
+
expect(BuilderCaller.fromPeer(undefined).metadata).toEqual({ callerChannel: 'unknown' });
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('reads only bounded caller fields from inference metadata', () => {
|
|
33
|
+
expect(BuilderCaller.fromMetadata({ callerChannel: 'mcp', mcpClient: 'cowork' })?.spanTags).toEqual({
|
|
34
|
+
'builder.caller_channel': 'mcp',
|
|
35
|
+
'builder.mcp_client': 'cowork'
|
|
36
|
+
});
|
|
37
|
+
expect(BuilderCaller.fromMetadata({ callerChannel: 'editor', mcpClient: 'cowork' })?.metadata).toEqual({ callerChannel: 'editor' });
|
|
38
|
+
expect(BuilderCaller.fromMetadata({ callerChannel: 'mcp', mcpClient: 'private@example.com' })?.metadata).toEqual({
|
|
39
|
+
callerChannel: 'mcp',
|
|
40
|
+
mcpClient: 'unknown'
|
|
41
|
+
});
|
|
42
|
+
expect(BuilderCaller.fromMetadata({ callerChannel: 'private@example.com' })).toBeUndefined();
|
|
43
|
+
expect(BuilderCaller.fromMetadata(undefined)).toBeUndefined();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export type BuilderCallerChannel = 'editor' | 'mcp' | 'library' | 'unknown';
|
|
2
|
+
export type BuilderMcpClient = 'claude' | 'claude_code' | 'cowork' | 'cursor' | 'codex' | 'other' | 'unknown';
|
|
3
|
+
|
|
4
|
+
export class BuilderCaller {
|
|
5
|
+
private constructor(
|
|
6
|
+
readonly channel: BuilderCallerChannel,
|
|
7
|
+
readonly client?: BuilderMcpClient
|
|
8
|
+
) {}
|
|
9
|
+
|
|
10
|
+
static fromPeer(kind: string | undefined, clientName?: unknown): BuilderCaller {
|
|
11
|
+
if (kind === 'gateway') return new BuilderCaller('mcp', BuilderCaller.clientName(clientName));
|
|
12
|
+
return new BuilderCaller(kind === 'editor' || kind === 'library' ? kind : 'unknown');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Metadata arrives after normalization, so an MCP client value outside the bounded set is
|
|
16
|
+
// reported as 'unknown' (cannot be trusted) rather than 'other' (a recognized but unlisted host
|
|
17
|
+
// name from clientName below). Both values are members of BuilderMcpClient.
|
|
18
|
+
static fromMetadata(value: unknown): BuilderCaller | undefined {
|
|
19
|
+
if (!value || typeof value !== 'object' || !('callerChannel' in value)) return undefined;
|
|
20
|
+
const channel = value.callerChannel;
|
|
21
|
+
if (channel !== 'editor' && channel !== 'mcp' && channel !== 'library' && channel !== 'unknown') return undefined;
|
|
22
|
+
if (channel !== 'mcp') return new BuilderCaller(channel);
|
|
23
|
+
const client = 'mcpClient' in value ? value.mcpClient : undefined;
|
|
24
|
+
switch (client) {
|
|
25
|
+
case 'claude':
|
|
26
|
+
case 'claude_code':
|
|
27
|
+
case 'cowork':
|
|
28
|
+
case 'cursor':
|
|
29
|
+
case 'codex':
|
|
30
|
+
case 'other':
|
|
31
|
+
return new BuilderCaller(channel, client);
|
|
32
|
+
default:
|
|
33
|
+
return new BuilderCaller(channel, 'unknown');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private static clientName(value: unknown): BuilderMcpClient {
|
|
38
|
+
if (typeof value !== 'string' || !value.trim()) return 'unknown';
|
|
39
|
+
const name = value.trim().toLowerCase();
|
|
40
|
+
if (name === 'local-agent-mode-superblocks' || name.startsWith('local-agent-mode-plugin:')) return 'cowork';
|
|
41
|
+
switch (name) {
|
|
42
|
+
case 'claude':
|
|
43
|
+
case 'claude-ai':
|
|
44
|
+
return 'claude';
|
|
45
|
+
case 'claude-code':
|
|
46
|
+
return 'claude_code';
|
|
47
|
+
case 'cursor':
|
|
48
|
+
return 'cursor';
|
|
49
|
+
case 'codex':
|
|
50
|
+
return 'codex';
|
|
51
|
+
default:
|
|
52
|
+
return 'other';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
get metadata(): { callerChannel: BuilderCallerChannel; mcpClient?: BuilderMcpClient } {
|
|
57
|
+
return { callerChannel: this.channel, ...(this.client ? { mcpClient: this.client } : {}) };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
get spanTags(): Record<string, string> {
|
|
61
|
+
return { 'builder.caller_channel': this.channel, ...(this.client ? { 'builder.mcp_client': this.client } : {}) };
|
|
62
|
+
}
|
|
63
|
+
}
|
package/src/types/ai/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './native-builder-model.js';
|
|
2
|
+
export * from './builder-caller.js';
|
|
1
3
|
import type { DeploymentTypeEnum, RegionEnum } from '../common/index.js';
|
|
2
4
|
|
|
3
5
|
export type AiChatMessagePayload = Record<string, unknown>;
|
|
@@ -70,6 +72,7 @@ export enum AiSystemTriggerType {
|
|
|
70
72
|
API_USAGE_SUMMARY = 'api_usage_summary',
|
|
71
73
|
APP_NAME = 'app_name',
|
|
72
74
|
ATTACHMENT_LABEL = 'attachment_label',
|
|
75
|
+
CHAT_TITLE = 'chat_title',
|
|
73
76
|
COMMIT_MESSAGE = 'commit_message',
|
|
74
77
|
DASHBOARD_CHAT = 'dashboard_chat',
|
|
75
78
|
DESTRUCTIVE_MIGRATION_SUMMARY = 'destructive_migration_summary',
|
|
@@ -179,3 +182,24 @@ export interface AiPromptCostResponse {
|
|
|
179
182
|
export * from './provider-credential.js';
|
|
180
183
|
export * from './quota-paywall.js';
|
|
181
184
|
export * from './safety-classification.js';
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Where an app branch's working tree and dev-server run. `sessionKey` is set only for `agentcore`
|
|
188
|
+
* and is an opaque AgentCore session id shared by every chat on the branch; never parse it.
|
|
189
|
+
*/
|
|
190
|
+
export interface WorkspaceBinding {
|
|
191
|
+
placement: 'live-edit' | 'agentcore';
|
|
192
|
+
sessionKey?: string;
|
|
193
|
+
harness?: AiBuilderBinding['harness'];
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface AiBuilderBinding {
|
|
197
|
+
actorId: string;
|
|
198
|
+
chatSessionId: string;
|
|
199
|
+
harness: 'clark' | 'codex' | 'claude_code';
|
|
200
|
+
model?: string;
|
|
201
|
+
/** Per-chat conversation id. */
|
|
202
|
+
runtimeSessionId: string;
|
|
203
|
+
nativeSessionId?: string;
|
|
204
|
+
workspace: WorkspaceBinding;
|
|
205
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import { NativeBuilderModel, NATIVE_BUILDER_MODELS } from './native-builder-model.js';
|
|
4
|
+
|
|
5
|
+
describe('NativeBuilderModel', () => {
|
|
6
|
+
it.each([
|
|
7
|
+
['codex', 'gpt-5.5'],
|
|
8
|
+
['claude_code', 'claude-opus-5-5'],
|
|
9
|
+
['clark', undefined]
|
|
10
|
+
] as const)('keeps the default for %s', (harness, expected) => {
|
|
11
|
+
expect(NativeBuilderModel.resolve(harness)).toBe(expected);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('accepts every advertised model only for its harness', () => {
|
|
15
|
+
for (const [harness, models] of Object.entries(NATIVE_BUILDER_MODELS)) {
|
|
16
|
+
for (const { id } of models) {
|
|
17
|
+
expect(NativeBuilderModel.resolve(harness as 'codex' | 'claude_code', id)).toBe(id);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it.each([
|
|
23
|
+
['codex', 'claude-sonnet-4-6'],
|
|
24
|
+
['claude_code', 'gpt-5.5'],
|
|
25
|
+
['claude_code', 'sonnet'],
|
|
26
|
+
['claude_code', ''],
|
|
27
|
+
['claude_code', null],
|
|
28
|
+
['claude_code', {}],
|
|
29
|
+
['clark', 'claude-opus-4-6']
|
|
30
|
+
] as const)('rejects %s model selection %j', (harness, model) => {
|
|
31
|
+
expect(() => NativeBuilderModel.resolve(harness, model)).toThrow('Unsupported builder model');
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BadRequestError } from '../../errors/http.js';
|
|
2
|
+
|
|
3
|
+
export const NATIVE_BUILDER_MODELS = {
|
|
4
|
+
codex: [{ id: 'gpt-5.5', label: 'GPT-5.5' }],
|
|
5
|
+
claude_code: [
|
|
6
|
+
{ id: 'claude-opus-5-5', label: 'Opus 5.5' },
|
|
7
|
+
{ id: 'claude-opus-4-6', label: 'Opus 4.6' },
|
|
8
|
+
{ id: 'claude-sonnet-4-6', label: 'Sonnet 4.6' }
|
|
9
|
+
]
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export type NativeBuilderModelId =
|
|
13
|
+
| (typeof NATIVE_BUILDER_MODELS.codex)[number]['id']
|
|
14
|
+
| (typeof NATIVE_BUILDER_MODELS.claude_code)[number]['id'];
|
|
15
|
+
|
|
16
|
+
export class NativeBuilderModel {
|
|
17
|
+
static resolve(harness: keyof typeof NATIVE_BUILDER_MODELS | 'clark', preferredModel?: unknown): NativeBuilderModelId | undefined {
|
|
18
|
+
if (harness === 'clark') {
|
|
19
|
+
if (preferredModel !== undefined) throw new BadRequestError('Unsupported builder model for Clark');
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const models = NATIVE_BUILDER_MODELS[harness];
|
|
23
|
+
if (preferredModel === undefined) return models[0].id;
|
|
24
|
+
const selected = models.find(({ id }) => id === preferredModel);
|
|
25
|
+
if (!selected) throw new BadRequestError('Unsupported builder model for this harness');
|
|
26
|
+
return selected.id;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import cloneDeep from 'lodash-es/cloneDeep.js';
|
|
2
|
+
import isArray from 'lodash-es/isArray.js';
|
|
3
|
+
import isEmpty from 'lodash-es/isEmpty.js';
|
|
4
|
+
import mergeWith from 'lodash-es/mergeWith.js';
|
|
2
5
|
|
|
3
6
|
import type { Code } from '@superblocksteam/types';
|
|
4
7
|
|
package/src/types/api/global.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
/* eslint @typescript-eslint/explicit-module-boundary-types: 0 */
|
|
1
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
* Global variables which can be reference during runtime.
|
|
7
5
|
*/
|
|
8
6
|
|
|
9
|
-
import
|
|
7
|
+
import merge from 'lodash-es/merge.js';
|
|
10
8
|
|
|
11
9
|
export class Global {
|
|
12
10
|
private payloads: Record<string, any> = {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ApplicationSignatureTreeSigned, Signature } from '../../signing/index.js';
|
|
2
|
+
import type { AiBuilderBinding, NativeBuilderModelId } from '../ai/index.js';
|
|
2
3
|
import type {
|
|
3
4
|
ApplicationUserDto,
|
|
4
5
|
BaseBlock,
|
|
@@ -535,6 +536,8 @@ export type PostApplicationCreateRequestBody = {
|
|
|
535
536
|
templateName?: string;
|
|
536
537
|
/** When provided, server generates an AI app name from this prompt */
|
|
537
538
|
initialPrompt?: string;
|
|
539
|
+
builderHarness?: AiBuilderBinding['harness'];
|
|
540
|
+
builderModel?: NativeBuilderModelId;
|
|
538
541
|
};
|
|
539
542
|
export interface ApplicationPageClonePayload {
|
|
540
543
|
applicationId: string;
|
package/src/types/audit/ocsf.ts
CHANGED
|
@@ -258,6 +258,7 @@ export const AUDIT_EVENT_TYPE_CATALOG: AuditEventTypeEntry[] = [
|
|
|
258
258
|
category_name: 'APPLICATION_ACTIVITY',
|
|
259
259
|
resource_type: 'Organization',
|
|
260
260
|
operations: [
|
|
261
|
+
'organization.mcp_allowed_clients.update',
|
|
261
262
|
'organization.npm_allow_install_scripts_changed',
|
|
262
263
|
'organization.npm_registry.create',
|
|
263
264
|
'organization.npm_registry.delete',
|
|
@@ -7,3 +7,104 @@ export interface BranchDto {
|
|
|
7
7
|
checkedOut?: boolean;
|
|
8
8
|
baseBranchName?: string;
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
export type BranchStatusCommit = { id: string; message: string | null; authorId: string | null; authorName: string | null };
|
|
12
|
+
|
|
13
|
+
export type BranchStatus = {
|
|
14
|
+
branch: string;
|
|
15
|
+
branchHead: string | null;
|
|
16
|
+
mainHead: string | null;
|
|
17
|
+
/** Until an editor turns branching on, everyone edits main directly. */
|
|
18
|
+
branchingEnabled: boolean;
|
|
19
|
+
/** The default target of Pull and Merge. Null on main. */
|
|
20
|
+
upstream: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Counted against the upstream, only commits since the merge base that changed the tree. Merge commits do not count.
|
|
23
|
+
*/
|
|
24
|
+
ahead: number;
|
|
25
|
+
/** The commits counted in ahead, newest first, at most 10. */
|
|
26
|
+
aheadCommits: BranchStatusCommit[];
|
|
27
|
+
behind: number;
|
|
28
|
+
/** The commits counted in behind, newest first, at most 10. */
|
|
29
|
+
behindCommits: BranchStatusCommit[];
|
|
30
|
+
/** A merge with conflicts waits for the checkpoint that resolves it. */
|
|
31
|
+
pendingMerge: boolean;
|
|
32
|
+
/** The number of conflict paths in the open merge. 0 when none is open. */
|
|
33
|
+
conflictCount: number;
|
|
34
|
+
/** The conflict paths in the open merge, for the conflict handoff to Clark. */
|
|
35
|
+
conflictPaths: string[];
|
|
36
|
+
/** The branch lands on its merge target by itself when that checkpoint is saved. */
|
|
37
|
+
landPending: boolean;
|
|
38
|
+
hasUncommittedChanges: boolean;
|
|
39
|
+
/** Another user's publish going out for this app. Publishing waits until it finishes. */
|
|
40
|
+
otherPublish?: { userId: string; userName: string | null } | null;
|
|
41
|
+
/** The app's user branches. A branch with a holder is locked to that user until they leave. */
|
|
42
|
+
branches?: UserBranchSummary[];
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type UserBranchSummary = {
|
|
46
|
+
name: string;
|
|
47
|
+
ownerId: string | null;
|
|
48
|
+
ownerName: string | null;
|
|
49
|
+
holderId: string | null;
|
|
50
|
+
holderName: string | null;
|
|
51
|
+
upstream: string | null;
|
|
52
|
+
/** Commits not yet in the upstream. */
|
|
53
|
+
ahead: number;
|
|
54
|
+
/** Upstream commits not yet on the branch. */
|
|
55
|
+
behind: number;
|
|
56
|
+
/** Everything on the branch is already in its upstream. */
|
|
57
|
+
merged: boolean;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** Returned by a Clark branch tool when the editor must move. null opens main in view-only mode. */
|
|
61
|
+
export type BranchNavigation = { branch: string | null };
|
|
62
|
+
|
|
63
|
+
/** Set on connect when the user's last branch is held by someone else and the editor opened main instead. */
|
|
64
|
+
export type BranchLanding = { branch: string; holderName: string | null };
|
|
65
|
+
|
|
66
|
+
export type BranchIncomingCommit = {
|
|
67
|
+
commitId: string;
|
|
68
|
+
committerId: string | null;
|
|
69
|
+
committerName: string | null;
|
|
70
|
+
message: string | null;
|
|
71
|
+
paths: string[];
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export type BranchConflict = { path: string; kind: string };
|
|
75
|
+
|
|
76
|
+
export type BranchUpdateResult = {
|
|
77
|
+
outcome: 'up-to-date' | 'clean' | 'conflict';
|
|
78
|
+
/** The new branch head. Set only for a clean outcome. */
|
|
79
|
+
commitId?: string;
|
|
80
|
+
conflicts: BranchConflict[];
|
|
81
|
+
incoming: BranchIncomingCommit[];
|
|
82
|
+
/** The note for Clark: commit count and changed paths, no authors or messages. Empty when nothing came in. */
|
|
83
|
+
contextNote: string;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export type BranchLandResult = {
|
|
87
|
+
/**
|
|
88
|
+
* 'contended' means main moved during every land attempt. 'migrating' means the app database is applying migrations
|
|
89
|
+
* before main moves: land again to finish. 'migration-failed' means one of the branch's migrations failed.
|
|
90
|
+
*/
|
|
91
|
+
outcome: 'landed' | 'up-to-date' | 'conflict' | 'contended' | 'migrating' | 'migration-failed';
|
|
92
|
+
/** The worker's error, for 'migration-failed'. */
|
|
93
|
+
migrationError?: string;
|
|
94
|
+
/** The head of the merge target, which is main unless the land named another target. */
|
|
95
|
+
mainHead: string;
|
|
96
|
+
update?: BranchUpdateResult;
|
|
97
|
+
contextNote: string;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// Lands only a branch's new migration files on main, once the user confirms. 'collision' means a file's number is not
|
|
101
|
+
// above every migration main or the database has. 'migrating' means main takes the files once every data tag's
|
|
102
|
+
// database reports them ready.
|
|
103
|
+
export type BranchMigrationLandResult = {
|
|
104
|
+
outcome: 'landed' | 'migrating' | 'migration-failed' | 'collision' | 'busy' | 'nothing-to-land';
|
|
105
|
+
mainHead: string;
|
|
106
|
+
/** The main commit that carries the files, once one exists. */
|
|
107
|
+
commitId?: string;
|
|
108
|
+
migrationError?: string;
|
|
109
|
+
collisions?: { path: string; nextVersion: string }[];
|
|
110
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DestructiveMigrationFinding } from '../../database-lifecycle/destructiveMigrations.js';
|
|
1
2
|
import type { DatasourceConfiguration } from '../datasource/index.js';
|
|
2
3
|
import type { Timing } from './timing.js';
|
|
3
4
|
|
|
@@ -72,6 +73,8 @@ export class ErrorDto {
|
|
|
72
73
|
superblocksError?: SuperblocksError;
|
|
73
74
|
reauth?: ReauthDetails;
|
|
74
75
|
signInRefusal?: SignInRefusal;
|
|
76
|
+
/** What a refused migration would delete, so the client can ask about exactly these. */
|
|
77
|
+
findings?: DestructiveMigrationFinding[];
|
|
75
78
|
|
|
76
79
|
constructor({ code, message, type }: { code: number | string; message: string; type?: SuperblocksError }) {
|
|
77
80
|
this.code = code;
|
|
@@ -19,13 +19,12 @@ export interface CustomAgentConfiguration {
|
|
|
19
19
|
retentionDays: number;
|
|
20
20
|
};
|
|
21
21
|
filesystem: {
|
|
22
|
-
type: 'session'
|
|
22
|
+
type: 'session';
|
|
23
23
|
mountPath: string;
|
|
24
|
-
accessPointArn?: string;
|
|
25
24
|
}[];
|
|
26
25
|
environment: {
|
|
27
26
|
containerUri?: string;
|
|
28
|
-
networkMode: 'public'
|
|
27
|
+
networkMode: 'public';
|
|
29
28
|
subnetIds: string[];
|
|
30
29
|
securityGroupIds: string[];
|
|
31
30
|
idleTimeoutSeconds: number;
|
|
@@ -17,13 +17,13 @@ export interface DatasourceMetadataDto {
|
|
|
17
17
|
// NOTE(joey): each integration type should have their own field here for metadata
|
|
18
18
|
dbSchema?: DatabaseSchemaMetadata;
|
|
19
19
|
buckets?: BucketMetadata[];
|
|
20
|
-
//
|
|
20
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
21
|
graphql?: any;
|
|
22
22
|
couchbase?: CouchbasePluginV1.Metadata;
|
|
23
23
|
kafka?: KafkaV1.Metadata; // NOTE(frank): Why do we use a much different pattern here than we do for action and datasource configurations?
|
|
24
24
|
kinesis?: KinesisPluginV1.Metadata;
|
|
25
25
|
integrationId?: string;
|
|
26
|
-
//
|
|
26
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
27
|
openApiSpec?: any;
|
|
28
28
|
dynamodb?: DynamoDbV1.Metadata;
|
|
29
29
|
connectedUserTokens?: Record<string, ConnectedUserTokenDto[]>;
|
|
@@ -44,7 +44,7 @@ export interface DatasourceMetadataV2Dto {
|
|
|
44
44
|
bucketsMetadata?: {
|
|
45
45
|
buckets: BucketMetadata[];
|
|
46
46
|
};
|
|
47
|
-
//
|
|
47
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
48
|
graphql?: any;
|
|
49
49
|
couchbase?: CouchbasePluginV1.Metadata;
|
|
50
50
|
kafka?: KafkaV1.Metadata;
|
|
@@ -52,7 +52,7 @@ export interface DatasourceMetadataV2Dto {
|
|
|
52
52
|
cosmosdb?: CosmosDbPluginV1.Plugin_Metadata;
|
|
53
53
|
adls?: AdlsPluginV1.Plugin_Metadata;
|
|
54
54
|
integrationId?: string;
|
|
55
|
-
//
|
|
55
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
56
|
openApiSpec?: any;
|
|
57
57
|
gSheetsNextPageToken?: string | undefined | null;
|
|
58
58
|
}
|
package/src/types/event/index.ts
CHANGED
|
@@ -36,6 +36,7 @@ export enum EventEntityType {
|
|
|
36
36
|
COMPONENT = 'component',
|
|
37
37
|
REPOSITORY = 'repository',
|
|
38
38
|
AI = 'ai',
|
|
39
|
+
BUILDER_MCP = 'builder_mcp',
|
|
39
40
|
/** App Databases logical DB (one per data tag / database_binding). */
|
|
40
41
|
APP_DATABASE = 'app_database',
|
|
41
42
|
CVE = 'cve',
|
|
@@ -144,7 +145,7 @@ export interface UserEvent {
|
|
|
144
145
|
entityType?: EventEntityType;
|
|
145
146
|
entityName?: string;
|
|
146
147
|
// properties is a field for event specific fields
|
|
147
|
-
//
|
|
148
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
148
149
|
properties?: Record<string, any>;
|
|
149
150
|
createdAt: Date;
|
|
150
151
|
region?: RegionEnum;
|
|
@@ -8,7 +8,7 @@ export class IntegrationConfigurationDto {
|
|
|
8
8
|
// Created date could be used for sorting
|
|
9
9
|
created: Date;
|
|
10
10
|
integrationId: string;
|
|
11
|
-
//
|
|
11
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
12
|
configuration: Record<string, any>; // DatasourceConfiguration;
|
|
13
13
|
isDefault: boolean;
|
|
14
14
|
|
|
@@ -51,7 +51,7 @@ export class IntegrationConfigurationDtoProtobuf {
|
|
|
51
51
|
// Created date could be used for sorting
|
|
52
52
|
created: Date;
|
|
53
53
|
integrationId: string;
|
|
54
|
-
//
|
|
54
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
55
|
configuration: Record<string, any>;
|
|
56
56
|
isDefault: boolean;
|
|
57
57
|
|
|
@@ -70,7 +70,7 @@ export class IntegrationConfigurationDtoProtobuf {
|
|
|
70
70
|
id: string;
|
|
71
71
|
created: Date;
|
|
72
72
|
integrationId: string;
|
|
73
|
-
//
|
|
73
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
74
74
|
configuration: Record<string, any>;
|
|
75
75
|
isDefault: boolean;
|
|
76
76
|
profileIds?: string[];
|
|
@@ -309,7 +309,7 @@ describe('Dimension math functions', () => {
|
|
|
309
309
|
});
|
|
310
310
|
});
|
|
311
311
|
|
|
312
|
-
//
|
|
312
|
+
// oxlint-disable-next-line
|
|
313
313
|
const typeTest = () => {
|
|
314
314
|
// This should cause typescript error because if we're mixing px with non px then parentColumnSpace should be required
|
|
315
315
|
// @ts-expect-error
|