Fixes
- [BREAKING CHANGE] Renamed the
SquirrelsProject.datasetmethod toSquirrelsProject.dataset_resultto avoid confusion with theDashboardArgs.datasetmethod. Although the two methods had the same name, they had different purposes and return different types.
New features
[BREAKING CHANGE] Mounting Squirrels APIs into an existing FastAPI application- Added the
SquirrelsProject.get_fastapi_componentsmethod to get the FastAPI components for the Squirrels project including mount path, lifespan, and FastAPI app. This allows you to mount the Squirrels APIs into an existing FastAPI application. - Since the project name and version are now included in the mount path, they have been removed from the rest of the API path for all endpoints. THIS IS A BREAKING CHANGE. See the /docs endpoint of the Squirrels API server for the updated API endpoints.
- Running with
sqrl run(i.e., in “standalone mode”) is equivalent to mounting the Squirrels APIs to the default mount path of/analytics/{project_name}/v{project_version}and running the main FastAPI app.
- Column conditions are now defined as a list of strings instead of a single string. This allows for multiple conditions to be specified for a single column where each condition can be concise and easily understood.
- Example:
auth_strategy: external)
- Added
project_variables.auth_strategyinsquirrels.yml, allowing you to choose between:managed(default): Squirrels-managed users, passwords, and API keysexternal: Trust an external OAuth authorization server and validate provider-issued Bearer tokens
- When
auth_strategyisexternal:auth_typedefaults torequiredandauth_type: optionalis not allowed.- You must define exactly one auth provider in
pyconfigs/user.py, and that provider should support Dynamic Client Registration (DCR). - Provider-issued Bearer tokens may be JWTs (validated via JWKS) or opaque tokens (validated via
userinfo_endpoint, with fallback tointrospection_endpointwhen available). - Certain Squirrels-managed auth endpoints are disabled (e.g., username/password login, API keys, user management).
- Environment variables used for managed auth (such as
SQRL_SECRET__ADMIN_PASSWORD,SQRL_AUTH__DB_FILE_PATH, andSQRL_AUTH__TOKEN_EXPIRE_MINUTES) do not apply.
- Added
/.well-known/oauth-protected-resource(OAuth 2.1 Protected Resource Metadata, RFC 9728) to help OAuth-aware clients discover the authorization server(s) when running in standalone mode. - MCP server auth: when
auth_strategyisexternalandauth_typeisrequired, the MCP server requiresAuthorization: Bearer <token>and responds with HTTP 401 +WWW-Authenticatepointing to the protected resource metadata endpoint.
_meta field for configurables
- It is now possible to pass configurables to MCP tools by specifying them in the
_metafield of the tool call. More details on the_metafield can be found in the MCP specifications here. - Just like before, the user must have elevated access level to pass configurables to MCP tools. This usually means the user is an admin unless the
SQRL_PERMISSIONS__ELEVATED_ACCESS_LEVELenvironment variable is set to a lower value. - For example, if you have a configurable called
schema_namein your project, you can pass it as a_metafield in the tool call with the keyschema_name. Support for the request header formatx-config-schema-nameis also available for backwards compatibility. - Example JSON-RPC request body:
- Dashboards now have access to context variables defined in
context.py. This allows dashboards to use dynamic logic based on parameter selections and user attributes, similar to how datasets work. - The
sqrlargument in the dashboard’smainfunction now includes actxdictionary containing the context variables. - Dashboards can now override project-level configurables in their
.ymlconfiguration files using theconfigurableskey. - These overrides are automatically merged with project-level defaults and are accessible via
sqrl.configurablesin the dashboard logic.
- Static files can now be served from the
resources/public/directory. - For example, if you have an image in
resources/public/images/logo.png, you can access it using the{mount_path}/public/images/logo.pngroute. When running in standalone mode (i.e., usingsqrl run), the mount path is/analytics/{project_name}/v{project_version}. - When specifying the icon for an authentication provider in
pyconfigs/user.py, you can now use a path starting with/public/to indicate a file in theresources/public/directory.