@superblocksteam/mcp-server 2.0.0-SNAPSHOT.795155fdae4a2ac9
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/LICENSE.txt +87 -0
- package/README.md +266 -0
- package/dist/application/commit-history.d.ts +27 -0
- package/dist/application/commit-history.d.ts.map +1 -0
- package/dist/application/commit-history.js +36 -0
- package/dist/application/commit-history.js.map +1 -0
- package/dist/application/directory-tree.d.ts +11 -0
- package/dist/application/directory-tree.d.ts.map +1 -0
- package/dist/application/directory-tree.js +37 -0
- package/dist/application/directory-tree.js.map +1 -0
- package/dist/application/materialize-application.d.ts +16 -0
- package/dist/application/materialize-application.d.ts.map +1 -0
- package/dist/application/materialize-application.js +47 -0
- package/dist/application/materialize-application.js.map +1 -0
- package/dist/application/summary.d.ts +25 -0
- package/dist/application/summary.d.ts.map +1 -0
- package/dist/application/summary.js +42 -0
- package/dist/application/summary.js.map +1 -0
- package/dist/auth/commands.d.ts +3 -0
- package/dist/auth/commands.d.ts.map +1 -0
- package/dist/auth/commands.js +71 -0
- package/dist/auth/commands.js.map +1 -0
- package/dist/auth/context.d.ts +7 -0
- package/dist/auth/context.d.ts.map +1 -0
- package/dist/auth/context.js +9 -0
- package/dist/auth/context.js.map +1 -0
- package/dist/auth/login.d.ts +10 -0
- package/dist/auth/login.d.ts.map +1 -0
- package/dist/auth/login.js +48 -0
- package/dist/auth/login.js.map +1 -0
- package/dist/auth/resolve-auth.d.ts +15 -0
- package/dist/auth/resolve-auth.d.ts.map +1 -0
- package/dist/auth/resolve-auth.js +75 -0
- package/dist/auth/resolve-auth.js.map +1 -0
- package/dist/auth/resolve-current-organization.d.ts +6 -0
- package/dist/auth/resolve-current-organization.d.ts.map +1 -0
- package/dist/auth/resolve-current-organization.js +15 -0
- package/dist/auth/resolve-current-organization.js.map +1 -0
- package/dist/auth/store.d.ts +11 -0
- package/dist/auth/store.d.ts.map +1 -0
- package/dist/auth/store.js +63 -0
- package/dist/auth/store.js.map +1 -0
- package/dist/entitlement-wrapper.d.ts +3 -0
- package/dist/entitlement-wrapper.d.ts.map +1 -0
- package/dist/entitlement-wrapper.js +49 -0
- package/dist/entitlement-wrapper.js.map +1 -0
- package/dist/entitlement.d.ts +55 -0
- package/dist/entitlement.d.ts.map +1 -0
- package/dist/entitlement.js +246 -0
- package/dist/entitlement.js.map +1 -0
- package/dist/http.d.ts +9 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +299 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -0
- package/dist/jsonrpc.d.ts +25 -0
- package/dist/jsonrpc.d.ts.map +1 -0
- package/dist/jsonrpc.js +102 -0
- package/dist/jsonrpc.js.map +1 -0
- package/dist/profile.d.ts +3 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +7 -0
- package/dist/profile.js.map +1 -0
- package/dist/sdk/create-sdk.d.ts +3 -0
- package/dist/sdk/create-sdk.d.ts.map +1 -0
- package/dist/sdk/create-sdk.js +6 -0
- package/dist/sdk/create-sdk.js.map +1 -0
- package/dist/setup/commands.d.ts +7 -0
- package/dist/setup/commands.d.ts.map +1 -0
- package/dist/setup/commands.js +58 -0
- package/dist/setup/commands.js.map +1 -0
- package/dist/setup/index.d.ts +5 -0
- package/dist/setup/index.d.ts.map +1 -0
- package/dist/setup/index.js +3 -0
- package/dist/setup/index.js.map +1 -0
- package/dist/setup/setup-config.d.ts +27 -0
- package/dist/setup/setup-config.d.ts.map +1 -0
- package/dist/setup/setup-config.js +100 -0
- package/dist/setup/setup-config.js.map +1 -0
- package/dist/target/resolve-app-target.d.ts +102 -0
- package/dist/target/resolve-app-target.d.ts.map +1 -0
- package/dist/target/resolve-app-target.js +176 -0
- package/dist/target/resolve-app-target.js.map +1 -0
- package/dist/target/resolve-base-url-target.d.ts +128 -0
- package/dist/target/resolve-base-url-target.d.ts.map +1 -0
- package/dist/target/resolve-base-url-target.js +125 -0
- package/dist/target/resolve-base-url-target.js.map +1 -0
- package/dist/target/resolve-organization-target.d.ts +23 -0
- package/dist/target/resolve-organization-target.d.ts.map +1 -0
- package/dist/target/resolve-organization-target.js +50 -0
- package/dist/target/resolve-organization-target.js.map +1 -0
- package/dist/test-setup.d.ts +2 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/test-setup.js +9 -0
- package/dist/test-setup.js.map +1 -0
- package/dist/tool-call-result.d.ts +12 -0
- package/dist/tool-call-result.d.ts.map +1 -0
- package/dist/tool-call-result.js +32 -0
- package/dist/tool-call-result.js.map +1 -0
- package/dist/tools/aggregate-audit-events.d.ts +3 -0
- package/dist/tools/aggregate-audit-events.d.ts.map +1 -0
- package/dist/tools/aggregate-audit-events.js +60 -0
- package/dist/tools/aggregate-audit-events.js.map +1 -0
- package/dist/tools/assign-builder-seat.d.ts +3 -0
- package/dist/tools/assign-builder-seat.d.ts.map +1 -0
- package/dist/tools/assign-builder-seat.js +45 -0
- package/dist/tools/assign-builder-seat.js.map +1 -0
- package/dist/tools/billing-usage-limits.d.ts +5 -0
- package/dist/tools/billing-usage-limits.d.ts.map +1 -0
- package/dist/tools/billing-usage-limits.js +191 -0
- package/dist/tools/billing-usage-limits.js.map +1 -0
- package/dist/tools/checkout-application.d.ts +3 -0
- package/dist/tools/checkout-application.d.ts.map +1 -0
- package/dist/tools/checkout-application.js +65 -0
- package/dist/tools/checkout-application.js.map +1 -0
- package/dist/tools/create-folder.d.ts +3 -0
- package/dist/tools/create-folder.d.ts.map +1 -0
- package/dist/tools/create-folder.js +39 -0
- package/dist/tools/create-folder.js.map +1 -0
- package/dist/tools/create-integration.d.ts +10 -0
- package/dist/tools/create-integration.d.ts.map +1 -0
- package/dist/tools/create-integration.js +93 -0
- package/dist/tools/create-integration.js.map +1 -0
- package/dist/tools/datasource-configuration-by-type.schema.json +2619 -0
- package/dist/tools/deactivate-user.d.ts +3 -0
- package/dist/tools/deactivate-user.d.ts.map +1 -0
- package/dist/tools/deactivate-user.js +95 -0
- package/dist/tools/deactivate-user.js.map +1 -0
- package/dist/tools/delete-folder.d.ts +3 -0
- package/dist/tools/delete-folder.d.ts.map +1 -0
- package/dist/tools/delete-folder.js +42 -0
- package/dist/tools/delete-folder.js.map +1 -0
- package/dist/tools/delete-group-org-role.d.ts +3 -0
- package/dist/tools/delete-group-org-role.d.ts.map +1 -0
- package/dist/tools/delete-group-org-role.js +54 -0
- package/dist/tools/delete-group-org-role.js.map +1 -0
- package/dist/tools/delete-integration.d.ts +3 -0
- package/dist/tools/delete-integration.d.ts.map +1 -0
- package/dist/tools/delete-integration.js +39 -0
- package/dist/tools/delete-integration.js.map +1 -0
- package/dist/tools/deploy-application.d.ts +3 -0
- package/dist/tools/deploy-application.d.ts.map +1 -0
- package/dist/tools/deploy-application.js +142 -0
- package/dist/tools/deploy-application.js.map +1 -0
- package/dist/tools/find-apps-by-integration.d.ts +3 -0
- package/dist/tools/find-apps-by-integration.d.ts.map +1 -0
- package/dist/tools/find-apps-by-integration.js +135 -0
- package/dist/tools/find-apps-by-integration.js.map +1 -0
- package/dist/tools/find-apps-by-package.d.ts +3 -0
- package/dist/tools/find-apps-by-package.d.ts.map +1 -0
- package/dist/tools/find-apps-by-package.js +88 -0
- package/dist/tools/find-apps-by-package.js.map +1 -0
- package/dist/tools/get-app-sbom.d.ts +3 -0
- package/dist/tools/get-app-sbom.d.ts.map +1 -0
- package/dist/tools/get-app-sbom.js +54 -0
- package/dist/tools/get-app-sbom.js.map +1 -0
- package/dist/tools/get-application-access.d.ts +3 -0
- package/dist/tools/get-application-access.d.ts.map +1 -0
- package/dist/tools/get-application-access.js +35 -0
- package/dist/tools/get-application-access.js.map +1 -0
- package/dist/tools/get-application-commit-history.d.ts +3 -0
- package/dist/tools/get-application-commit-history.d.ts.map +1 -0
- package/dist/tools/get-application-commit-history.js +55 -0
- package/dist/tools/get-application-commit-history.js.map +1 -0
- package/dist/tools/get-application-deployment-history.d.ts +3 -0
- package/dist/tools/get-application-deployment-history.d.ts.map +1 -0
- package/dist/tools/get-application-deployment-history.js +45 -0
- package/dist/tools/get-application-deployment-history.js.map +1 -0
- package/dist/tools/get-application-policy-run-findings.d.ts +3 -0
- package/dist/tools/get-application-policy-run-findings.d.ts.map +1 -0
- package/dist/tools/get-application-policy-run-findings.js +62 -0
- package/dist/tools/get-application-policy-run-findings.js.map +1 -0
- package/dist/tools/get-application-publish-pipeline.d.ts +3 -0
- package/dist/tools/get-application-publish-pipeline.d.ts.map +1 -0
- package/dist/tools/get-application-publish-pipeline.js +47 -0
- package/dist/tools/get-application-publish-pipeline.js.map +1 -0
- package/dist/tools/get-application-publish-readiness.d.ts +3 -0
- package/dist/tools/get-application-publish-readiness.d.ts.map +1 -0
- package/dist/tools/get-application-publish-readiness.js +47 -0
- package/dist/tools/get-application-publish-readiness.js.map +1 -0
- package/dist/tools/get-application-structure.d.ts +3 -0
- package/dist/tools/get-application-structure.d.ts.map +1 -0
- package/dist/tools/get-application-structure.js +98 -0
- package/dist/tools/get-application-structure.js.map +1 -0
- package/dist/tools/get-application-summary.d.ts +3 -0
- package/dist/tools/get-application-summary.d.ts.map +1 -0
- package/dist/tools/get-application-summary.js +46 -0
- package/dist/tools/get-application-summary.js.map +1 -0
- package/dist/tools/get-audit-events.d.ts +3 -0
- package/dist/tools/get-audit-events.d.ts.map +1 -0
- package/dist/tools/get-audit-events.js +55 -0
- package/dist/tools/get-audit-events.js.map +1 -0
- package/dist/tools/get-auth-status.d.ts +3 -0
- package/dist/tools/get-auth-status.d.ts.map +1 -0
- package/dist/tools/get-auth-status.js +34 -0
- package/dist/tools/get-auth-status.js.map +1 -0
- package/dist/tools/get-billing-plan-summary.d.ts +3 -0
- package/dist/tools/get-billing-plan-summary.d.ts.map +1 -0
- package/dist/tools/get-billing-plan-summary.js +32 -0
- package/dist/tools/get-billing-plan-summary.js.map +1 -0
- package/dist/tools/get-billing-usage-daily.d.ts +3 -0
- package/dist/tools/get-billing-usage-daily.d.ts.map +1 -0
- package/dist/tools/get-billing-usage-daily.js +37 -0
- package/dist/tools/get-billing-usage-daily.js.map +1 -0
- package/dist/tools/get-billing-usage-records.d.ts +3 -0
- package/dist/tools/get-billing-usage-records.d.ts.map +1 -0
- package/dist/tools/get-billing-usage-records.js +246 -0
- package/dist/tools/get-billing-usage-records.js.map +1 -0
- package/dist/tools/get-chat-messages.d.ts +3 -0
- package/dist/tools/get-chat-messages.d.ts.map +1 -0
- package/dist/tools/get-chat-messages.js +51 -0
- package/dist/tools/get-chat-messages.js.map +1 -0
- package/dist/tools/get-current-user.d.ts +3 -0
- package/dist/tools/get-current-user.d.ts.map +1 -0
- package/dist/tools/get-current-user.js +66 -0
- package/dist/tools/get-current-user.js.map +1 -0
- package/dist/tools/get-dependency-scan-summary.d.ts +3 -0
- package/dist/tools/get-dependency-scan-summary.d.ts.map +1 -0
- package/dist/tools/get-dependency-scan-summary.js +42 -0
- package/dist/tools/get-dependency-scan-summary.js.map +1 -0
- package/dist/tools/get-integration-access.d.ts +3 -0
- package/dist/tools/get-integration-access.d.ts.map +1 -0
- package/dist/tools/get-integration-access.js +41 -0
- package/dist/tools/get-integration-access.js.map +1 -0
- package/dist/tools/get-integration-config-schema.d.ts +3 -0
- package/dist/tools/get-integration-config-schema.d.ts.map +1 -0
- package/dist/tools/get-integration-config-schema.js +34 -0
- package/dist/tools/get-integration-config-schema.js.map +1 -0
- package/dist/tools/get-integration.d.ts +3 -0
- package/dist/tools/get-integration.d.ts.map +1 -0
- package/dist/tools/get-integration.js +39 -0
- package/dist/tools/get-integration.js.map +1 -0
- package/dist/tools/get-job-access.d.ts +3 -0
- package/dist/tools/get-job-access.d.ts.map +1 -0
- package/dist/tools/get-job-access.js +41 -0
- package/dist/tools/get-job-access.js.map +1 -0
- package/dist/tools/get-knowledge.d.ts +3 -0
- package/dist/tools/get-knowledge.d.ts.map +1 -0
- package/dist/tools/get-knowledge.js +48 -0
- package/dist/tools/get-knowledge.js.map +1 -0
- package/dist/tools/get-organization-summary.d.ts +3 -0
- package/dist/tools/get-organization-summary.d.ts.map +1 -0
- package/dist/tools/get-organization-summary.js +48 -0
- package/dist/tools/get-organization-summary.js.map +1 -0
- package/dist/tools/get-review-policy-run-report.d.ts +3 -0
- package/dist/tools/get-review-policy-run-report.d.ts.map +1 -0
- package/dist/tools/get-review-policy-run-report.js +60 -0
- package/dist/tools/get-review-policy-run-report.js.map +1 -0
- package/dist/tools/get-review-policy-summary.d.ts +3 -0
- package/dist/tools/get-review-policy-summary.d.ts.map +1 -0
- package/dist/tools/get-review-policy-summary.js +47 -0
- package/dist/tools/get-review-policy-summary.js.map +1 -0
- package/dist/tools/get-review-policy.d.ts +3 -0
- package/dist/tools/get-review-policy.d.ts.map +1 -0
- package/dist/tools/get-review-policy.js +43 -0
- package/dist/tools/get-review-policy.js.map +1 -0
- package/dist/tools/get-user-permissions.d.ts +3 -0
- package/dist/tools/get-user-permissions.d.ts.map +1 -0
- package/dist/tools/get-user-permissions.js +68 -0
- package/dist/tools/get-user-permissions.js.map +1 -0
- package/dist/tools/get-workflow-access.d.ts +3 -0
- package/dist/tools/get-workflow-access.d.ts.map +1 -0
- package/dist/tools/get-workflow-access.js +41 -0
- package/dist/tools/get-workflow-access.js.map +1 -0
- package/dist/tools/grant-resource-access.d.ts +3 -0
- package/dist/tools/grant-resource-access.d.ts.map +1 -0
- package/dist/tools/grant-resource-access.js +64 -0
- package/dist/tools/grant-resource-access.js.map +1 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +148 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/integration-mention.d.ts +2 -0
- package/dist/tools/integration-mention.d.ts.map +1 -0
- package/dist/tools/integration-mention.js +8 -0
- package/dist/tools/integration-mention.js.map +1 -0
- package/dist/tools/list-applications.d.ts +3 -0
- package/dist/tools/list-applications.d.ts.map +1 -0
- package/dist/tools/list-applications.js +115 -0
- package/dist/tools/list-applications.js.map +1 -0
- package/dist/tools/list-audit-event-types.d.ts +3 -0
- package/dist/tools/list-audit-event-types.d.ts.map +1 -0
- package/dist/tools/list-audit-event-types.js +41 -0
- package/dist/tools/list-audit-event-types.js.map +1 -0
- package/dist/tools/list-builder-seats.d.ts +3 -0
- package/dist/tools/list-builder-seats.d.ts.map +1 -0
- package/dist/tools/list-builder-seats.js +42 -0
- package/dist/tools/list-builder-seats.js.map +1 -0
- package/dist/tools/list-dependency-scan-findings.d.ts +3 -0
- package/dist/tools/list-dependency-scan-findings.d.ts.map +1 -0
- package/dist/tools/list-dependency-scan-findings.js +69 -0
- package/dist/tools/list-dependency-scan-findings.js.map +1 -0
- package/dist/tools/list-distinct-packages-in-org.d.ts +3 -0
- package/dist/tools/list-distinct-packages-in-org.d.ts.map +1 -0
- package/dist/tools/list-distinct-packages-in-org.js +117 -0
- package/dist/tools/list-distinct-packages-in-org.js.map +1 -0
- package/dist/tools/list-folders.d.ts +3 -0
- package/dist/tools/list-folders.d.ts.map +1 -0
- package/dist/tools/list-folders.js +39 -0
- package/dist/tools/list-folders.js.map +1 -0
- package/dist/tools/list-integrations.d.ts +3 -0
- package/dist/tools/list-integrations.d.ts.map +1 -0
- package/dist/tools/list-integrations.js +65 -0
- package/dist/tools/list-integrations.js.map +1 -0
- package/dist/tools/list-knowledge.d.ts +3 -0
- package/dist/tools/list-knowledge.d.ts.map +1 -0
- package/dist/tools/list-knowledge.js +56 -0
- package/dist/tools/list-knowledge.js.map +1 -0
- package/dist/tools/list-organization-agents.d.ts +3 -0
- package/dist/tools/list-organization-agents.d.ts.map +1 -0
- package/dist/tools/list-organization-agents.js +49 -0
- package/dist/tools/list-organization-agents.js.map +1 -0
- package/dist/tools/list-packages-by-app.d.ts +3 -0
- package/dist/tools/list-packages-by-app.d.ts.map +1 -0
- package/dist/tools/list-packages-by-app.js +97 -0
- package/dist/tools/list-packages-by-app.js.map +1 -0
- package/dist/tools/list-rbac-assignments.d.ts +3 -0
- package/dist/tools/list-rbac-assignments.d.ts.map +1 -0
- package/dist/tools/list-rbac-assignments.js +57 -0
- package/dist/tools/list-rbac-assignments.js.map +1 -0
- package/dist/tools/list-review-policies.d.ts +3 -0
- package/dist/tools/list-review-policies.d.ts.map +1 -0
- package/dist/tools/list-review-policies.js +42 -0
- package/dist/tools/list-review-policies.js.map +1 -0
- package/dist/tools/list-review-policy-runs.d.ts +3 -0
- package/dist/tools/list-review-policy-runs.d.ts.map +1 -0
- package/dist/tools/list-review-policy-runs.js +80 -0
- package/dist/tools/list-review-policy-runs.js.map +1 -0
- package/dist/tools/list-roles.d.ts +3 -0
- package/dist/tools/list-roles.d.ts.map +1 -0
- package/dist/tools/list-roles.js +61 -0
- package/dist/tools/list-roles.js.map +1 -0
- package/dist/tools/list-users-by-role.d.ts +3 -0
- package/dist/tools/list-users-by-role.d.ts.map +1 -0
- package/dist/tools/list-users-by-role.js +74 -0
- package/dist/tools/list-users-by-role.js.map +1 -0
- package/dist/tools/list-users.d.ts +3 -0
- package/dist/tools/list-users.d.ts.map +1 -0
- package/dist/tools/list-users.js +69 -0
- package/dist/tools/list-users.js.map +1 -0
- package/dist/tools/lookup-package-vulnerabilities.d.ts +3 -0
- package/dist/tools/lookup-package-vulnerabilities.d.ts.map +1 -0
- package/dist/tools/lookup-package-vulnerabilities.js +57 -0
- package/dist/tools/lookup-package-vulnerabilities.js.map +1 -0
- package/dist/tools/map-rbac-assignments.d.ts +35 -0
- package/dist/tools/map-rbac-assignments.d.ts.map +1 -0
- package/dist/tools/map-rbac-assignments.js +22 -0
- package/dist/tools/map-rbac-assignments.js.map +1 -0
- package/dist/tools/org-user-types.d.ts +16 -0
- package/dist/tools/org-user-types.d.ts.map +1 -0
- package/dist/tools/org-user-types.js +2 -0
- package/dist/tools/org-user-types.js.map +1 -0
- package/dist/tools/pagination.d.ts +14 -0
- package/dist/tools/pagination.d.ts.map +1 -0
- package/dist/tools/pagination.js +21 -0
- package/dist/tools/pagination.js.map +1 -0
- package/dist/tools/plugin-configuration-schema.d.ts +3 -0
- package/dist/tools/plugin-configuration-schema.d.ts.map +1 -0
- package/dist/tools/plugin-configuration-schema.js +95 -0
- package/dist/tools/plugin-configuration-schema.js.map +1 -0
- package/dist/tools/registry.d.ts +36 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +32 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/revoke-resource-access.d.ts +3 -0
- package/dist/tools/revoke-resource-access.d.ts.map +1 -0
- package/dist/tools/revoke-resource-access.js +39 -0
- package/dist/tools/revoke-resource-access.js.map +1 -0
- package/dist/tools/schemas.d.ts +147 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/schemas.js +1320 -0
- package/dist/tools/schemas.js.map +1 -0
- package/dist/tools/server-api.d.ts +33 -0
- package/dist/tools/server-api.d.ts.map +1 -0
- package/dist/tools/server-api.js +96 -0
- package/dist/tools/server-api.js.map +1 -0
- package/dist/tools/unassign-builder-seat.d.ts +3 -0
- package/dist/tools/unassign-builder-seat.d.ts.map +1 -0
- package/dist/tools/unassign-builder-seat.js +44 -0
- package/dist/tools/unassign-builder-seat.js.map +1 -0
- package/dist/tools/undeploy-application.d.ts +3 -0
- package/dist/tools/undeploy-application.d.ts.map +1 -0
- package/dist/tools/undeploy-application.js +56 -0
- package/dist/tools/undeploy-application.js.map +1 -0
- package/dist/tools/update-folder.d.ts +3 -0
- package/dist/tools/update-folder.d.ts.map +1 -0
- package/dist/tools/update-folder.js +42 -0
- package/dist/tools/update-folder.js.map +1 -0
- package/dist/tools/update-group-org-role.d.ts +3 -0
- package/dist/tools/update-group-org-role.d.ts.map +1 -0
- package/dist/tools/update-group-org-role.js +55 -0
- package/dist/tools/update-group-org-role.js.map +1 -0
- package/dist/tools/update-integration.d.ts +3 -0
- package/dist/tools/update-integration.d.ts.map +1 -0
- package/dist/tools/update-integration.js +40 -0
- package/dist/tools/update-integration.js.map +1 -0
- package/dist/tools/update-resource-access.d.ts +3 -0
- package/dist/tools/update-resource-access.d.ts.map +1 -0
- package/dist/tools/update-resource-access.js +44 -0
- package/dist/tools/update-resource-access.js.map +1 -0
- package/dist/tools/update-user-org-role.d.ts +3 -0
- package/dist/tools/update-user-org-role.d.ts.map +1 -0
- package/dist/tools/update-user-org-role.js +55 -0
- package/dist/tools/update-user-org-role.js.map +1 -0
- package/dist/tools/validation.d.ts +3 -0
- package/dist/tools/validation.d.ts.map +1 -0
- package/dist/tools/validation.js +10 -0
- package/dist/tools/validation.js.map +1 -0
- package/dist/urls.d.ts +4 -0
- package/dist/urls.d.ts.map +1 -0
- package/dist/urls.js +33 -0
- package/dist/urls.js.map +1 -0
- package/dist/utils/args.d.ts +3 -0
- package/dist/utils/args.d.ts.map +1 -0
- package/dist/utils/args.js +15 -0
- package/dist/utils/args.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +75 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Superblocks Community Software License
|
|
2
|
+
|
|
3
|
+
This Superblocks Community License Agreement (the “Agreement”) sets forth the terms on which DayZero
|
|
4
|
+
Software, Inc. d/b/a Superblocks (“Superblocks”) makes available certain software made available by Superblocks
|
|
5
|
+
under this Agreement (the “Software”). BY INSTALLING, DOWNLOADING, ACCESSING, USING OR
|
|
6
|
+
DISTRIBUTING ANY OF THE SOFTWARE, YOU AGREE TO THE TERMS AND CONDITIONS OF THIS
|
|
7
|
+
AGREEMENT.IF YOU DO NOT AGREE TO SUCH TERMS AND CONDITIONS, YOU MUST NOT USE THE
|
|
8
|
+
SOFTWARE. IF YOU ARE RECEIVING THE SOFTWARE ON BEHALF OF A LEGAL ENTITY, YOU
|
|
9
|
+
REPRESENT AND WARRANT THAT YOU HAVE THE ACTUAL AUTHORITY TO AGREE TO THE
|
|
10
|
+
TERMS AND CONDITIONS OF THIS AGREEMENT ON BEHALF OF SUCH ENTITY. “Licensee” means you,
|
|
11
|
+
an individual, or the entity on whose behalf you are receiving the Software.
|
|
12
|
+
|
|
13
|
+
1. LICENSE GRANT AND CONDITIONS.
|
|
14
|
+
|
|
15
|
+
1.1 License. Subject to the terms and conditions of this Agreement, Superblocks hereby grants to Licensee a
|
|
16
|
+
non-exclusive, royalty-free, worldwide, non-transferable, non-sublicenseable license during the term of this
|
|
17
|
+
Agreement to: (a) use the Software; (b) prepare modifications and derivative works of the Software; (c)
|
|
18
|
+
distribute the Software (including without limitation in source code or object code form); and (d) reproduce
|
|
19
|
+
copies of the Software (the “License”). Licensee is not granted the right to, and Licensee shall not, exercise the
|
|
20
|
+
License for an Excluded Purpose. For purposes of this Agreement, “Excluded Purpose” means making
|
|
21
|
+
available any software-as-a-service, platform-as-a-service, infrastructure-as-a-service or other similar online
|
|
22
|
+
service that competes with Superblocks’ products or services.
|
|
23
|
+
|
|
24
|
+
1.2 Conditions. In consideration of the License, Licensee’s distribution of the Software is subject to the
|
|
25
|
+
following conditions:
|
|
26
|
+
|
|
27
|
+
a. Licensee must cause any Software modified by Licensee to carry prominent notices stating that Licensee
|
|
28
|
+
modified the Software.
|
|
29
|
+
b. On each Software copy, Licensee shall reproduce and not remove or alter all Superblocks or third party
|
|
30
|
+
copyright or other proprietary notices contained in the Software, and Licensee must provide the notice
|
|
31
|
+
below with each copy.
|
|
32
|
+
|
|
33
|
+
“This software is made available by DayZero Software, Inc. d/b/a Superblocks, under the terms of the
|
|
34
|
+
Superblocks Community License Agreement. © 2022 DayZero Software, Inc.”
|
|
35
|
+
|
|
36
|
+
1.3 Licensee Modifications. Licensee may add its own copyright notices to modifications made by Licensee
|
|
37
|
+
and may provide additional or different license terms and conditions for use, reproduction, or distribution of
|
|
38
|
+
Licensee’s modifications. While redistributing the Software or modifications thereof, Licensee may choose to
|
|
39
|
+
offer, for a fee or free of charge, support, warranty, indemnity, or other obligations. Licensee, and not
|
|
40
|
+
Superblocks, will be responsible for any such obligations.
|
|
41
|
+
|
|
42
|
+
1.4 No Sublicensing. The License does not include the right to sublicense the Software, however, each recipient
|
|
43
|
+
to which Licensee provides the Software may exercise the Licenses so long as such recipient agrees to the terms
|
|
44
|
+
and conditions of this Agreement.
|
|
45
|
+
|
|
46
|
+
2. TERM AND TERMINATION. This Agreement will continue unless and until earlier terminated as set forth
|
|
47
|
+
herein. If Licensee breaches any of its conditions or obligations under this Agreement, this Agreement will
|
|
48
|
+
terminate automatically and the License will terminate automatically and permanently.
|
|
49
|
+
|
|
50
|
+
3. INTELLECTUAL PROPERTY. As between the parties, Superblocks will retain all right, title, and interest in
|
|
51
|
+
the Software, and all intellectual property rights therein. Superblocks hereby reserves all rights not expressly
|
|
52
|
+
granted to Licensee in this Agreement. Superblocks hereby reserves all rights in its trademarks and service
|
|
53
|
+
marks, and no licenses therein are granted in this Agreement.
|
|
54
|
+
|
|
55
|
+
4. DISCLAIMER. SUPERBLOCKS HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND
|
|
56
|
+
CONDITIONS, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, AND SPECIFICALLY
|
|
57
|
+
DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
|
58
|
+
PURPOSE, WITH RESPECT TO THE SOFTWARE.
|
|
59
|
+
|
|
60
|
+
5. LIMITATION OF LIABILITY. SUPERBLOCKS WILL NOT BE LIABLE FOR ANY DAMAGES OF
|
|
61
|
+
ANY KIND, INCLUDING BUT NOT LIMITED TO, LOST PROFITS OR ANY CONSEQUENTIAL,
|
|
62
|
+
SPECIAL, INCIDENTAL, INDIRECT, OR DIRECT DAMAGES, HOWEVER CAUSED AND ON ANY
|
|
63
|
+
THEORY OF LIABILITY, ARISING OUT OF THIS AGREEMENT. THE FOREGOING SHALL APPLY TO
|
|
64
|
+
THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
65
|
+
|
|
66
|
+
6. GENERAL.
|
|
67
|
+
|
|
68
|
+
6.1 Governing Law. This Agreement will be governed by and interpreted in accordance with the laws of the
|
|
69
|
+
state of California, without reference to its conflict of laws principles. If Licensee is located within the United
|
|
70
|
+
States, all disputes arising out of this Agreement are subject to the exclusive jurisdiction of courts located in San
|
|
71
|
+
Mateo County, California. USA. If Licensee is located outside of the United States, any dispute, controversy or
|
|
72
|
+
claim arising out of or relating to this Agreement will be referred to and finally determined by arbitration in
|
|
73
|
+
accordance with the JAMS International Arbitration Rules. The tribunal will consist of one neutral arbitrator.
|
|
74
|
+
The place of arbitration will be Palo Alto, California. The language to be used in the arbitral proceedings will be
|
|
75
|
+
English. Judgment upon the award rendered by the arbitrator may be entered in any court having jurisdiction
|
|
76
|
+
thereof.
|
|
77
|
+
|
|
78
|
+
6.2. Assignment. Licensee may not assign its rights under this Agreement to any third party. Superblocks may
|
|
79
|
+
freely assign its rights under this Agreement to any third party.
|
|
80
|
+
|
|
81
|
+
6.3. Other. This Agreement is the entire agreement between the parties regarding the subject matter hereof.
|
|
82
|
+
No amendment or modification of this Agreement will be valid or binding upon the parties unless made in
|
|
83
|
+
writing and signed by the duly authorized representatives of both parties. In the event that any provision,
|
|
84
|
+
including without limitation any condition, of this Agreement is held to be unenforceable, this Agreement and
|
|
85
|
+
all licenses and rights granted hereunder will immediately terminate. Waiver by Superblocks of a breach of any
|
|
86
|
+
provision of this Agreement or the failure by Superblocks to exercise any right hereunder will not be construed
|
|
87
|
+
as a waiver of any subsequent breach of that right or as a waiver of any other right.
|
package/README.md
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# Superblocks MCP Server
|
|
2
|
+
|
|
3
|
+
A [Model Context Protocol](https://modelcontextprotocol.io/) server that connects AI assistants (Claude, ChatGPT, Cursor, and other MCP clients) to the Superblocks platform. It lets AI agents inspect, create, and manage Superblocks applications on your behalf.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
For a beginner-friendly walkthrough, see [`QUICKSTART.md`](./QUICKSTART.md).
|
|
8
|
+
|
|
9
|
+
### Via the Superblocks CLI (recommended)
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Install the Superblocks CLI
|
|
13
|
+
npm install -g @superblocksteam/cli
|
|
14
|
+
|
|
15
|
+
# Authenticate
|
|
16
|
+
superblocks login
|
|
17
|
+
|
|
18
|
+
# Start the MCP server (stdio, for Cursor / Claude Desktop)
|
|
19
|
+
superblocks mcp serve
|
|
20
|
+
|
|
21
|
+
# Generate configuration for your MCP client
|
|
22
|
+
superblocks mcp setup --client cursor
|
|
23
|
+
superblocks mcp setup --client claude
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Standalone (development)
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# From the superblocks repo root
|
|
30
|
+
pnpm install
|
|
31
|
+
pnpm turbo run build --filter @superblocksteam/mcp-server...
|
|
32
|
+
|
|
33
|
+
# Run directly
|
|
34
|
+
node packages/cli/packages/mcp-server/dist/index.js
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Client Configuration
|
|
38
|
+
|
|
39
|
+
### Cursor
|
|
40
|
+
|
|
41
|
+
Add to `~/.cursor/mcp.json`:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"mcpServers": {
|
|
46
|
+
"superblocks": {
|
|
47
|
+
"command": "superblocks",
|
|
48
|
+
"args": ["mcp", "serve"]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Claude Desktop
|
|
55
|
+
|
|
56
|
+
Add to `~/.claude/mcp.json`:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"mcpServers": {
|
|
61
|
+
"superblocks": {
|
|
62
|
+
"command": "superblocks",
|
|
63
|
+
"args": ["mcp", "serve"]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### ChatGPT (HTTP transport)
|
|
70
|
+
|
|
71
|
+
ChatGPT requires an HTTPS endpoint. Start the server with the HTTP transport:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
superblocks mcp serve --transport http --port 8484 --http-token <token>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Then expose it via a tunnel (e.g., ngrok) and configure it as a ChatGPT connector pointing to `https://<your-tunnel>/mcp`, sending `Authorization: Bearer <token>`.
|
|
78
|
+
|
|
79
|
+
## Authentication
|
|
80
|
+
|
|
81
|
+
The MCP server uses the same authentication as the Superblocks CLI. After running `superblocks login`, the MCP server can access the same environment automatically.
|
|
82
|
+
|
|
83
|
+
For multiple environments, you can add tokens directly:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
superblocks-mcp auth add --base-url https://staging.superblocks.com --token <api-key>
|
|
87
|
+
superblocks-mcp auth list
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Auth resolution order:
|
|
91
|
+
|
|
92
|
+
1. CLI auth (`~/.superblocks/auth.json`) -- checked first
|
|
93
|
+
2. MCP auth store (`~/.superblocks/mcp-auth.json`) -- multi-environment extension
|
|
94
|
+
|
|
95
|
+
## Available Tools
|
|
96
|
+
|
|
97
|
+
### `get_auth_status`
|
|
98
|
+
|
|
99
|
+
Check whether you are authenticated for a Superblocks environment.
|
|
100
|
+
|
|
101
|
+
### `get_current_user`
|
|
102
|
+
|
|
103
|
+
Get the currently authenticated user for a given `base_url`: their identity, the organizations they belong to, and their permissions.
|
|
104
|
+
|
|
105
|
+
`/users/me` also serves the browser UI, so this tool returns a projection of it rather than the whole payload, which exceeded MCP client result-size limits. Omitted: the LaunchDarkly `flagBootstrap` blob and onboarding-gate state (browser-only), the organization API key and per-agent keys (credentials do not belong in an LLM transcript), and the agent, profile, group, and billing lists (unbounded in size). Use `list_organization_agents` for agent details.
|
|
106
|
+
|
|
107
|
+
### `get_application_summary`
|
|
108
|
+
|
|
109
|
+
Fetch application metadata: ID, name, organization, app mode (1.0 / 2.0), deployed commit, environment.
|
|
110
|
+
|
|
111
|
+
### `get_application_commit_history`
|
|
112
|
+
|
|
113
|
+
Paginated, reverse-chronological commit history with committer details and DBFS hashes.
|
|
114
|
+
|
|
115
|
+
### `get_audit_events`
|
|
116
|
+
|
|
117
|
+
Fetch v2 audit events in OCSF format with cursor pagination. Supports filters for class, status, severity, actor, resource, and full-text search.
|
|
118
|
+
|
|
119
|
+
### Audit tool guidance
|
|
120
|
+
|
|
121
|
+
- **Use `get_audit_events`** for all audit investigations.
|
|
122
|
+
- `get_audit_events` covers a broad set of operations, including:
|
|
123
|
+
- Applications
|
|
124
|
+
- APIs / Workflows
|
|
125
|
+
- Folders
|
|
126
|
+
- Integrations
|
|
127
|
+
- Users & Groups
|
|
128
|
+
- RBAC
|
|
129
|
+
- SCIM
|
|
130
|
+
- Tokens
|
|
131
|
+
- Billing
|
|
132
|
+
- OAuth
|
|
133
|
+
- Organization settings
|
|
134
|
+
- Files
|
|
135
|
+
- Profiles
|
|
136
|
+
- Repositories
|
|
137
|
+
- Knowledge
|
|
138
|
+
- Credentials
|
|
139
|
+
|
|
140
|
+
### `get_integration_access`
|
|
141
|
+
|
|
142
|
+
List all users and groups that have access to an integration, including assigned roles and effective permissions.
|
|
143
|
+
|
|
144
|
+
### `get_application_structure`
|
|
145
|
+
|
|
146
|
+
Lightweight application view. For 1.0 apps: page and API summary. For 2.0 apps: directory tree and checkout metadata (`checkout_path` is null when a temporary checkout is used and cleaned up).
|
|
147
|
+
|
|
148
|
+
### `checkout_application`
|
|
149
|
+
|
|
150
|
+
Materialize an application to disk. Supports historical snapshots via `commit_id`.
|
|
151
|
+
|
|
152
|
+
### Deployment
|
|
153
|
+
|
|
154
|
+
- `deploy_application` - deploy an application using either `app_url` or `application_id` + `base_url` (optionally with `commit_id`)
|
|
155
|
+
|
|
156
|
+
### Integration Management
|
|
157
|
+
|
|
158
|
+
- `get_integration` - fetch an integration by ID
|
|
159
|
+
- `get_integration_config_schema` - JSON schema for a plugin's configuration
|
|
160
|
+
- `create_integration` - create an integration from name, plugin_id, and configuration; returns `integration_url` when the dashboard shares the API origin
|
|
161
|
+
- `update_integration` - update an integration by ID
|
|
162
|
+
- `delete_integration` - delete an integration by ID
|
|
163
|
+
- `get_integration_access` - list users/groups with integration access
|
|
164
|
+
|
|
165
|
+
### Folder Management
|
|
166
|
+
|
|
167
|
+
- `list_folders` - list folders
|
|
168
|
+
- `create_folder` - create a folder
|
|
169
|
+
- `update_folder` - rename a folder
|
|
170
|
+
- `delete_folder` - delete a folder
|
|
171
|
+
|
|
172
|
+
### RBAC Assignment Management
|
|
173
|
+
|
|
174
|
+
- `get_workflow_access` - list users/groups with access to a workflow
|
|
175
|
+
- `get_job_access` - list users/groups with access to a scheduled job
|
|
176
|
+
- `list_rbac_assignments` - list RBAC assignments for a specific resource
|
|
177
|
+
- `grant_resource_access` - create RBAC assignments
|
|
178
|
+
- `update_resource_access` - update a specific assignment
|
|
179
|
+
- `revoke_resource_access` - delete a specific assignment
|
|
180
|
+
|
|
181
|
+
### Billing Management
|
|
182
|
+
|
|
183
|
+
- `list_builder_seats` - list builder seat assignments
|
|
184
|
+
- `assign_builder_seat` - assign a seat to a user
|
|
185
|
+
- `unassign_builder_seat` - remove a seat from a user
|
|
186
|
+
- `update_subscription` - update subscription settings (payload passthrough)
|
|
187
|
+
- `create_checkout_session` - create a checkout session (payload passthrough)
|
|
188
|
+
- `create_billing_intent` - initialize a billing/payment intent
|
|
189
|
+
- `submit_payment` - submit payment details (payload passthrough)
|
|
190
|
+
- `check_promo` - validate a promo code
|
|
191
|
+
- `downgrade_plan` - downgrade to free plan
|
|
192
|
+
- `contact_sales` - submit a sales-contact request (payload passthrough)
|
|
193
|
+
|
|
194
|
+
### Agent + Git Helpers
|
|
195
|
+
|
|
196
|
+
- `list_organization_agents` - list organization agents
|
|
197
|
+
- `get_git_fresh_token` - get a fresh Git credential token for app + host
|
|
198
|
+
|
|
199
|
+
### Derived Analytics and Search
|
|
200
|
+
|
|
201
|
+
- `find_apps_by_package` - query app package usage index for declared `package.json` dependency usage
|
|
202
|
+
- `list_packages_by_app` - reverse of `find_apps_by_package`: given an application_id, list the indexed packages used by that app
|
|
203
|
+
- `list_distinct_packages_in_org` - org-wide aggregate sibling: returns one row per distinct `package_name` across the org's package-usage index, with `versions[]`, `app_count`, `deployed_app_count`, and a bounded `sample_app_ids[]` (≤10). Use this to enumerate the org's full package footprint in a single call (e.g. reconciling against a CVE feed or external registry) instead of paging `find_apps_by_package` per package.
|
|
204
|
+
|
|
205
|
+
### App Mode Coverage Notes
|
|
206
|
+
|
|
207
|
+
- **Multi-page (1.0)** apps expose structured page/API metadata directly.
|
|
208
|
+
- **Code-mode (2.0)** apps are file-based; some tools query server indexes instead of local checkout scans.
|
|
209
|
+
- `find_apps_by_package`, `list_packages_by_app`, and `list_distinct_packages_in_org` all query the same `package-usage` index and support optional `deployed` filtering:
|
|
210
|
+
- omitted: search all indexed commits
|
|
211
|
+
- `true`: deployed commits only
|
|
212
|
+
- `false`: non-deployed commits only
|
|
213
|
+
- `find_apps_by_package` returns commit-level matches (`commit_id`, `is_deployed`) and does exact declared-string matching; it does not represent resolved lockfile versions.
|
|
214
|
+
- `list_packages_by_app` returns one row per (commit_id, package_name) for the given app. Use `commit_id` to scope to a single commit, or `deployed=true` to limit to the currently-deployed bundle's packages. Supports optional `package_name`, `package_version`, `package_version_resolved`, and `dependency_source` filters.
|
|
215
|
+
- `list_distinct_packages_in_org` collapses to one row per `package_name` (no per-app or per-commit fan-out). Supports `package_name_prefix` (literal prefix via Postgres `starts_with()` — `%` and `_` are not wildcards), `dependency_source` (`root` / `direct` / `transitive`), and `deployed`. `sample_app_ids` is a deterministic, bounded sample (≤10, ordered by `application_id`); use `find_apps_by_package` to enumerate the full app set for a given package.
|
|
216
|
+
|
|
217
|
+
## Tool Annotations
|
|
218
|
+
|
|
219
|
+
All tools include [MCP tool annotations](https://spec.modelcontextprotocol.io/) so clients can make informed decisions about auto-approval:
|
|
220
|
+
|
|
221
|
+
- Read-only tools (`get_auth_status`, `get_application_summary`, etc.) are marked with `readOnlyHint: true`
|
|
222
|
+
- `checkout_application` writes to disk but is non-destructive (`destructiveHint: false`)
|
|
223
|
+
|
|
224
|
+
## Transports
|
|
225
|
+
|
|
226
|
+
| Transport | Use case | Command |
|
|
227
|
+
| ------------------- | ----------------------------------------- | ------------------------------------------------------------------------- |
|
|
228
|
+
| **stdio** (default) | Cursor, Claude Desktop, local MCP clients | `superblocks mcp serve` |
|
|
229
|
+
| **HTTP** | ChatGPT, remote clients | `superblocks mcp serve --transport http --port 8484 --http-token <token>` |
|
|
230
|
+
|
|
231
|
+
The HTTP transport binds to `127.0.0.1` by default.
|
|
232
|
+
For security, HTTP transport requires an authentication token. Provide it via `--http-token` or `SUPERBLOCKS_MCP_HTTP_TOKEN`.
|
|
233
|
+
|
|
234
|
+
## Environment Hints
|
|
235
|
+
|
|
236
|
+
The server recognizes these Superblocks environments from URLs:
|
|
237
|
+
|
|
238
|
+
- `app.superblocks.com` / `app.superblockshq.com` → `prod`
|
|
239
|
+
- `eu.superblocks.com` / `prod-eu.superblocks.com` → `prod-eu`
|
|
240
|
+
- `staging.superblocks.com` → `staging`
|
|
241
|
+
- `dev.superblocks.com` → `dev`
|
|
242
|
+
- `pr-*.superblocks.dev` → `ephemeral`
|
|
243
|
+
- `localhost` / `127.0.0.1` → `local`
|
|
244
|
+
|
|
245
|
+
Unknown URLs still work as long as auth is configured for that base URL.
|
|
246
|
+
|
|
247
|
+
## Troubleshooting
|
|
248
|
+
|
|
249
|
+
### "Not authenticated" errors
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
# Check which environments are configured
|
|
253
|
+
superblocks-mcp auth list
|
|
254
|
+
|
|
255
|
+
# Re-authenticate via CLI
|
|
256
|
+
superblocks login
|
|
257
|
+
|
|
258
|
+
# Or add a token for a specific environment
|
|
259
|
+
superblocks-mcp auth add --base-url <url> --token <api-key>
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Server won't start
|
|
263
|
+
|
|
264
|
+
- Ensure `node` is on your PATH (Node.js >= 24)
|
|
265
|
+
- Rebuild: `pnpm turbo run build --filter @superblocksteam/mcp-server...`
|
|
266
|
+
- Test standalone: `superblocks mcp serve --help`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { GetApplicationCommitsResponseBody } from "@superblocksteam/shared";
|
|
2
|
+
type ApplicationCommitHistoryItem = {
|
|
3
|
+
autosave_type: string | null;
|
|
4
|
+
branch: string | null;
|
|
5
|
+
commit_id: string;
|
|
6
|
+
commit_message: string;
|
|
7
|
+
commit_type: "autosave" | "commit";
|
|
8
|
+
committed_at: string;
|
|
9
|
+
committer_email: string;
|
|
10
|
+
committer_name: string | null;
|
|
11
|
+
directory_contents_hash: string | null;
|
|
12
|
+
external_commit_id: string | null;
|
|
13
|
+
external_committed_at: string | null;
|
|
14
|
+
};
|
|
15
|
+
type SummarizeApplicationCommitHistoryPageParams = {
|
|
16
|
+
offset: number;
|
|
17
|
+
pageLimit: number;
|
|
18
|
+
response: GetApplicationCommitsResponseBody;
|
|
19
|
+
};
|
|
20
|
+
export declare function summarizeApplicationCommitHistoryPage({ offset, pageLimit, response, }: SummarizeApplicationCommitHistoryPageParams): {
|
|
21
|
+
commits: ApplicationCommitHistoryItem[];
|
|
22
|
+
has_more: boolean;
|
|
23
|
+
next_offset: number | null;
|
|
24
|
+
returned_count: number;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=commit-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-history.d.ts","sourceRoot":"","sources":["../../src/application/commit-history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iCAAiC,EAClC,MAAM,yBAAyB,CAAC;AAEjC,KAAK,4BAA4B,GAAG;IAClC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,UAAU,GAAG,QAAQ,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC,CAAC;AAEF,KAAK,2CAA2C,GAAG;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,iCAAiC,CAAC;CAC7C,CAAC;AA6BF,wBAAgB,qCAAqC,CAAC,EACpD,MAAM,EACN,SAAS,EACT,QAAQ,GACT,EAAE,2CAA2C;;;;;EAa7C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function compareCommits(left, right) {
|
|
2
|
+
const commitDateDifference = right.commitDate - left.commitDate;
|
|
3
|
+
if (commitDateDifference !== 0) {
|
|
4
|
+
return commitDateDifference;
|
|
5
|
+
}
|
|
6
|
+
return right.commitId.localeCompare(left.commitId);
|
|
7
|
+
}
|
|
8
|
+
function summarizeCommit(commit) {
|
|
9
|
+
return {
|
|
10
|
+
autosave_type: commit.autosaveType ?? null,
|
|
11
|
+
branch: commit.branch ?? null,
|
|
12
|
+
commit_id: commit.commitId,
|
|
13
|
+
commit_message: commit.commitMessage,
|
|
14
|
+
commit_type: commit.autosave ? "autosave" : "commit",
|
|
15
|
+
committed_at: new Date(commit.commitDate).toISOString(),
|
|
16
|
+
committer_email: commit.committer.email,
|
|
17
|
+
committer_name: commit.committer.name ?? null,
|
|
18
|
+
directory_contents_hash: commit.directoryContentsHash ?? null,
|
|
19
|
+
external_commit_id: commit.externalCommitId ?? null,
|
|
20
|
+
external_committed_at: commit.externalCommitDate
|
|
21
|
+
? new Date(commit.externalCommitDate).toISOString()
|
|
22
|
+
: null,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function summarizeApplicationCommitHistoryPage({ offset, pageLimit, response, }) {
|
|
26
|
+
const orderedCommits = [...response.autosaves, ...response.commits].sort(compareCommits);
|
|
27
|
+
const hasMore = orderedCommits.length > pageLimit;
|
|
28
|
+
const pageItems = orderedCommits.slice(0, pageLimit).map(summarizeCommit);
|
|
29
|
+
return {
|
|
30
|
+
commits: pageItems,
|
|
31
|
+
has_more: hasMore,
|
|
32
|
+
next_offset: hasMore ? offset + pageLimit : null,
|
|
33
|
+
returned_count: pageItems.length,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=commit-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-history.js","sourceRoot":"","sources":["../../src/application/commit-history.ts"],"names":[],"mappings":"AAyBA,SAAS,cAAc,CAAC,IAAe,EAAE,KAAgB;IACvD,MAAM,oBAAoB,GAAG,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IAChE,IAAI,oBAAoB,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED,OAAO,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,eAAe,CAAC,MAAiB;IACxC,OAAO;QACL,aAAa,EAAE,MAAM,CAAC,YAAY,IAAI,IAAI;QAC1C,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,IAAI;QAC7B,SAAS,EAAE,MAAM,CAAC,QAAQ;QAC1B,cAAc,EAAE,MAAM,CAAC,aAAa;QACpC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ;QACpD,YAAY,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE;QACvD,eAAe,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK;QACvC,cAAc,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,IAAI,IAAI;QAC7C,uBAAuB,EAAE,MAAM,CAAC,qBAAqB,IAAI,IAAI;QAC7D,kBAAkB,EAAE,MAAM,CAAC,gBAAgB,IAAI,IAAI;QACnD,qBAAqB,EAAE,MAAM,CAAC,kBAAkB;YAC9C,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,WAAW,EAAE;YACnD,CAAC,CAAC,IAAI;KACT,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qCAAqC,CAAC,EACpD,MAAM,EACN,SAAS,EACT,QAAQ,GACoC;IAC5C,MAAM,cAAc,GAAG,CAAC,GAAG,QAAQ,CAAC,SAAS,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,CACtE,cAAc,CACf,CAAC;IACF,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC;IAClD,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAE1E,OAAO;QACL,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,OAAO;QACjB,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI;QAChD,cAAc,EAAE,SAAS,CAAC,MAAM;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type DirectoryTreeSummary = {
|
|
2
|
+
entries: string[];
|
|
3
|
+
truncated: boolean;
|
|
4
|
+
};
|
|
5
|
+
type BuildDirectoryTreeSummaryOptions = {
|
|
6
|
+
exclude?: Set<string>;
|
|
7
|
+
maxEntries: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function buildDirectoryTreeSummary(rootPath: string, options: BuildDirectoryTreeSummaryOptions): Promise<DirectoryTreeSummary>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=directory-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory-tree.d.ts","sourceRoot":"","sources":["../../src/application/directory-tree.ts"],"names":[],"mappings":"AAIA,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,KAAK,gCAAgC,GAAG;IACtC,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,oBAAoB,CAAC,CA+C/B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import fs from "fs-extra";
|
|
3
|
+
export async function buildDirectoryTreeSummary(rootPath, options) {
|
|
4
|
+
const entries = [];
|
|
5
|
+
let truncated = false;
|
|
6
|
+
async function visit(currentPath, relativePath = "") {
|
|
7
|
+
if (entries.length >= options.maxEntries) {
|
|
8
|
+
truncated = true;
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const directoryEntries = (await fs.readdir(currentPath, { withFileTypes: true })).sort((left, right) => left.name.localeCompare(right.name));
|
|
12
|
+
for (const directoryEntry of directoryEntries) {
|
|
13
|
+
if (entries.length >= options.maxEntries) {
|
|
14
|
+
truncated = true;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (options.exclude?.has(directoryEntry.name)) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
const entryRelativePath = relativePath
|
|
21
|
+
? path.posix.join(relativePath, directoryEntry.name)
|
|
22
|
+
: directoryEntry.name;
|
|
23
|
+
if (directoryEntry.isDirectory()) {
|
|
24
|
+
entries.push(`${entryRelativePath}/`);
|
|
25
|
+
await visit(path.join(currentPath, directoryEntry.name), entryRelativePath);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
entries.push(entryRelativePath);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
await visit(rootPath);
|
|
32
|
+
return {
|
|
33
|
+
entries,
|
|
34
|
+
truncated,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=directory-tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory-tree.js","sourceRoot":"","sources":["../../src/application/directory-tree.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAY1B,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,QAAgB,EAChB,OAAyC;IAEzC,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,IAAI,SAAS,GAAG,KAAK,CAAC;IAEtB,KAAK,UAAU,KAAK,CAAC,WAAmB,EAAE,YAAY,GAAG,EAAE;QACzD,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YACzC,SAAS,GAAG,IAAI,CAAC;YACjB,OAAO;QACT,CAAC;QAED,MAAM,gBAAgB,GAAG,CACvB,MAAM,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CACvD,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAE7D,KAAK,MAAM,cAAc,IAAI,gBAAgB,EAAE,CAAC;YAC9C,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gBACzC,SAAS,GAAG,IAAI,CAAC;gBACjB,OAAO;YACT,CAAC;YAED,IAAI,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC9C,SAAS;YACX,CAAC;YAED,MAAM,iBAAiB,GAAG,YAAY;gBACpC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,CAAC;gBACpD,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC;YAExB,IAAI,cAAc,CAAC,WAAW,EAAE,EAAE,CAAC;gBACjC,OAAO,CAAC,IAAI,CAAC,GAAG,iBAAiB,GAAG,CAAC,CAAC;gBACtC,MAAM,KAAK,CACT,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,IAAI,CAAC,EAC3C,iBAAiB,CAClB,CAAC;gBACF,SAAS;YACX,CAAC;YAED,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAED,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;IAEtB,OAAO;QACL,OAAO;QACP,SAAS;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CodeModeApplicationWrapper, type MultiPageApplicationWrapperWithComponents, type SuperblocksSdk } from "@superblocksteam/sdk";
|
|
2
|
+
type MaterializeApplicationParams = {
|
|
3
|
+
sdk: SuperblocksSdk;
|
|
4
|
+
application: CodeModeApplicationWrapper | MultiPageApplicationWrapperWithComponents;
|
|
5
|
+
branch: string;
|
|
6
|
+
directoryContentsHash?: string;
|
|
7
|
+
destinationPath?: string;
|
|
8
|
+
};
|
|
9
|
+
type MaterializedApplication = {
|
|
10
|
+
checkoutPath: string;
|
|
11
|
+
isTemporary: boolean;
|
|
12
|
+
temporaryRootPath?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function materializeApplication({ sdk, application, branch, directoryContentsHash, destinationPath, }: MaterializeApplicationParams): Promise<MaterializedApplication>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=materialize-application.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"materialize-application.d.ts","sourceRoot":"","sources":["../../src/application/materialize-application.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,yCAAyC,EAC9C,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAE9B,KAAK,4BAA4B,GAAG;IAClC,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EACP,0BAA0B,GAC1B,yCAAyC,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,wBAAsB,sBAAsB,CAAC,EAC3C,GAAG,EACH,WAAW,EACX,MAAM,EACN,qBAAqB,EACrB,eAAe,GAChB,EAAE,4BAA4B,GAAG,OAAO,CAAC,uBAAuB,CAAC,CA+CjE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import os from "node:os";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import fs from "fs-extra";
|
|
4
|
+
import { writeApplicationToDisk, } from "@superblocksteam/sdk";
|
|
5
|
+
export async function materializeApplication({ sdk, application, branch, directoryContentsHash, destinationPath, }) {
|
|
6
|
+
const resolvedDestinationPath = destinationPath
|
|
7
|
+
? path.resolve(destinationPath)
|
|
8
|
+
: undefined;
|
|
9
|
+
if (resolvedDestinationPath &&
|
|
10
|
+
resolvedDestinationPath === path.parse(resolvedDestinationPath).root) {
|
|
11
|
+
throw new Error(`destination_path must not resolve to a filesystem root: ${resolvedDestinationPath}`);
|
|
12
|
+
}
|
|
13
|
+
const featureFlags = await sdk.getFeatureFlagsForCurrentUser();
|
|
14
|
+
const projectRootFolder = resolvedDestinationPath
|
|
15
|
+
? path.dirname(resolvedDestinationPath)
|
|
16
|
+
: await fs.mkdtemp(path.join(os.tmpdir(), "superblocks-mcp-"));
|
|
17
|
+
const appRelativePath = resolvedDestinationPath
|
|
18
|
+
? path.basename(resolvedDestinationPath)
|
|
19
|
+
: undefined;
|
|
20
|
+
let resourceConfig;
|
|
21
|
+
try {
|
|
22
|
+
resourceConfig = await writeApplicationToDisk({
|
|
23
|
+
sdk,
|
|
24
|
+
resource: application,
|
|
25
|
+
projectRootFolder,
|
|
26
|
+
appRelativePath,
|
|
27
|
+
directoryContentsHash,
|
|
28
|
+
featureFlags,
|
|
29
|
+
branch,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
if (!resolvedDestinationPath) {
|
|
34
|
+
// Best-effort cleanup for temporary materialization roots.
|
|
35
|
+
await fs.remove(projectRootFolder);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
checkoutPath: path.resolve(projectRootFolder, resourceConfig.location),
|
|
41
|
+
isTemporary: !resolvedDestinationPath,
|
|
42
|
+
...(resolvedDestinationPath
|
|
43
|
+
? {}
|
|
44
|
+
: { temporaryRootPath: projectRootFolder }),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=materialize-application.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"materialize-application.js","sourceRoot":"","sources":["../../src/application/materialize-application.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1B,OAAO,EACL,sBAAsB,GAIvB,MAAM,sBAAsB,CAAC;AAkB9B,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,GAAG,EACH,WAAW,EACX,MAAM,EACN,qBAAqB,EACrB,eAAe,GACc;IAC7B,MAAM,uBAAuB,GAAG,eAAe;QAC7C,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC;QAC/B,CAAC,CAAC,SAAS,CAAC;IACd,IACE,uBAAuB;QACvB,uBAAuB,KAAK,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,IAAI,EACpE,CAAC;QACD,MAAM,IAAI,KAAK,CACb,2DAA2D,uBAAuB,EAAE,CACrF,CAAC;IACJ,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,GAAG,CAAC,6BAA6B,EAAE,CAAC;IAC/D,MAAM,iBAAiB,GAAG,uBAAuB;QAC/C,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC;QACvC,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC,CAAC;IACjE,MAAM,eAAe,GAAG,uBAAuB;QAC7C,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QACxC,CAAC,CAAC,SAAS,CAAC;IAEd,IAAI,cAAoC,CAAC;IACzC,IAAI,CAAC;QACH,cAAc,GAAG,MAAM,sBAAsB,CAAC;YAC5C,GAAG;YACH,QAAQ,EAAE,WAAW;YACrB,iBAAiB;YACjB,eAAe;YACf,qBAAqB;YACrB,YAAY;YACZ,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,uBAAuB,EAAE,CAAC;YAC7B,2DAA2D;YAC3D,MAAM,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACrC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO;QACL,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,QAAQ,CAAC;QACtE,WAAW,EAAE,CAAC,uBAAuB;QACrC,GAAG,CAAC,uBAAuB;YACzB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;KAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MultiPageApplicationWrapper, MultiPageApplicationWrapperWithComponents } from "@superblocksteam/sdk";
|
|
2
|
+
type ApplicationMode = "1.0" | "2.0";
|
|
3
|
+
type ApplicationModeLabel = "Legacy Low Code Apps" | "Clark AI Apps";
|
|
4
|
+
export declare function applicationModeLabel(mode: ApplicationMode): ApplicationModeLabel;
|
|
5
|
+
export declare function applicationModeNote(mode: ApplicationMode): string;
|
|
6
|
+
export declare function summarizeApplication(applicationWrapper: MultiPageApplicationWrapper): {
|
|
7
|
+
application_id: any;
|
|
8
|
+
application_mode: ApplicationMode;
|
|
9
|
+
deployed_commit_id: string | null;
|
|
10
|
+
name: any;
|
|
11
|
+
organization_id: any;
|
|
12
|
+
};
|
|
13
|
+
export declare function summarizeMultiPageApplicationStructure(applicationWrapper: MultiPageApplicationWrapperWithComponents): {
|
|
14
|
+
application_mode: "1.0";
|
|
15
|
+
app_api_count: number;
|
|
16
|
+
app_api_names: string[];
|
|
17
|
+
page_count: number;
|
|
18
|
+
pages: {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
api_names: string[];
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../src/application/summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,yCAAyC,EAC1C,MAAM,sBAAsB,CAAC;AAE9B,KAAK,eAAe,GAAG,KAAK,GAAG,KAAK,CAAC;AACrC,KAAK,oBAAoB,GAAG,sBAAsB,GAAG,eAAe,CAAC;AAoBrE,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,eAAe,GACpB,oBAAoB,CAEtB;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAIjE;AAED,wBAAgB,oBAAoB,CAClC,kBAAkB,EAAE,2BAA2B;;;;;;EAUhD;AAED,wBAAgB,sCAAsC,CACpD,kBAAkB,EAAE,yCAAyC;;;;;;;;;;EAqB9D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
function getApiName(api) {
|
|
2
|
+
return api.apiPb?.metadata?.name ?? "Unnamed API";
|
|
3
|
+
}
|
|
4
|
+
function inferApplicationMode(application) {
|
|
5
|
+
return application.devEnvEnabled ? "2.0" : "1.0";
|
|
6
|
+
}
|
|
7
|
+
export function applicationModeLabel(mode) {
|
|
8
|
+
return mode === "1.0" ? "Legacy Low Code Apps" : "Clark AI Apps";
|
|
9
|
+
}
|
|
10
|
+
export function applicationModeNote(mode) {
|
|
11
|
+
return mode === "1.0"
|
|
12
|
+
? "Legacy Low Code Apps are the legacy multi-page app model (1.0)."
|
|
13
|
+
: "Clark AI Apps are the code-mode app model (2.0).";
|
|
14
|
+
}
|
|
15
|
+
export function summarizeApplication(applicationWrapper) {
|
|
16
|
+
const application = applicationWrapper.application;
|
|
17
|
+
return {
|
|
18
|
+
application_id: application.id,
|
|
19
|
+
application_mode: inferApplicationMode(application),
|
|
20
|
+
deployed_commit_id: applicationWrapper.deployedCommitId ?? null,
|
|
21
|
+
name: application.name,
|
|
22
|
+
organization_id: application.organizationId,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function summarizeMultiPageApplicationStructure(applicationWrapper) {
|
|
26
|
+
const pages = applicationWrapper.pages.map((page) => ({
|
|
27
|
+
id: page.id,
|
|
28
|
+
name: page.name,
|
|
29
|
+
api_names: [...page.apis.map((api) => getApiName(api))].sort((left, right) => left.localeCompare(right)),
|
|
30
|
+
}));
|
|
31
|
+
const appApiNames = [
|
|
32
|
+
...applicationWrapper.apis.map((api) => getApiName(api)),
|
|
33
|
+
].sort((left, right) => left.localeCompare(right));
|
|
34
|
+
return {
|
|
35
|
+
application_mode: "1.0",
|
|
36
|
+
app_api_count: applicationWrapper.apis.length,
|
|
37
|
+
app_api_names: appApiNames,
|
|
38
|
+
page_count: applicationWrapper.pages.length,
|
|
39
|
+
pages,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../../src/application/summary.ts"],"names":[],"mappings":"AAgBA,SAAS,UAAU,CAAC,GAAa;IAC/B,OAAO,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,aAAa,CAAC;AACpD,CAAC;AAED,SAAS,oBAAoB,CAC3B,WAAgC;IAEhC,OAAO,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAqB;IAErB,OAAO,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,eAAe,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAqB;IACvD,OAAO,IAAI,KAAK,KAAK;QACnB,CAAC,CAAC,iEAAiE;QACnE,CAAC,CAAC,kDAAkD,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,kBAA+C;IAE/C,MAAM,WAAW,GAAG,kBAAkB,CAAC,WAAW,CAAC;IACnD,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,EAAE;QAC9B,gBAAgB,EAAE,oBAAoB,CAAC,WAAW,CAAC;QACnD,kBAAkB,EAAE,kBAAkB,CAAC,gBAAgB,IAAI,IAAI;QAC/D,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,eAAe,EAAE,WAAW,CAAC,cAAc;KAC5C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,kBAA6D;IAE7D,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACpD,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,SAAS,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAC1D,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAC3C;KACF,CAAC,CAAC,CAAC;IAEJ,MAAM,WAAW,GAAG;QAClB,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;KACzD,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAEnD,OAAO;QACL,gBAAgB,EAAE,KAAc;QAChC,aAAa,EAAE,kBAAkB,CAAC,IAAI,CAAC,MAAM;QAC7C,aAAa,EAAE,WAAW;QAC1B,UAAU,EAAE,kBAAkB,CAAC,KAAK,CAAC,MAAM;QAC3C,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/auth/commands.ts"],"names":[],"mappings":"AAsEA,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAyB1E;AAED,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
|