feat: Production release 2025‑08‑18 — Admin console (chatflows & org credentials), chatflow versioning, settings API, stricter auth, Lacework ops, and release automation - #475
Merged
Conversation
- Fix JSX element return in homepage component - Remove path restriction from redirect hook - Add timeout protection and enhanced error handling - Ensure all error scenarios fallback to /chat Resolves AAI-489
- Fix JSX element return in homepage component - Remove path restriction from redirect hook - Add timeout protection and enhanced error handling - Update related page components for consistency - Ensure all error scenarios fallback to /chat Resolves AAI-489
…edirect-handler-not-working-properly Aai 489 bug homepage chat redirect handler not working properly
- Enhance clarity and structure of local development instructions - Add steps for cloning the repository, setting up environment variables, initializing git submodules, and running the application - Include optional steps for faster startup and database tool installation
- Add step for installing Docker Desktop and ensuring it is running - Reorder steps for clarity, including building and migrating the initial database - Update instructions for running the application and accessing it - Enhance guidance for development with fast reload instructions
…me-updates docs: update README for local development setup
…rovements This comprehensive update addresses GitHub issue #391 and Jira ticket AAI-487 by implementing multi-tenant template management with proper organization scoping and critical security fixes. ## 🆕 New Features ### Multi-Tenant Template System - **Organization Scoping**: Templates now belong to specific organizations - **Template Sharing**: Option to share templates within organization - **Template Lineage**: Track parent-child relationships and template origins - **Answer Agent Framework**: Added support for Answer Agent framework detection ### Enhanced UI Experience - **Organization Templates Tab**: New tab showing organization-shared templates - **Template Segregation**: Answer Agent templates filtered from Example Templates - **Share Toggle**: UI option to share templates with organization members - **Improved Template Export**: Better framework detection and metadata handling ## 🔧 Database Schema Updates ### New Migrations - `AddOrganizationToCustomTemplate`: Adds organization and user scoping - `AddParentIdToCustomTemplate`: Enables template lineage tracking - `AddTemplateIdToChatFlow`: Links chatflows to their template origins ### Enhanced Entities - **CustomTemplate**: Added userId, organizationId, shareWithOrg, parentId fields - **ChatFlow**: Added templateId field for template tracking - **Soft Delete**: Implemented for data integrity and audit trails ## 🛡️ Critical Security Fixes ### Authentication & Authorization - **Mandatory Authentication**: All marketplace endpoints now require authentication - **Ownership Validation**: Proper user/organization ownership checks - **Permission System**: Role-based access control for templates ### Chatflow Deletion Security - **Authorization Logic**: Fixed flawed permission checking in deleteChatflow - **Route Security**: Removed vulnerable DELETE pattern allowing deletion without ID - **Transaction Safety**: Wrapped deletion operations in database transactions ### Migration Resilience - **No-Organization Handling**: Migration handles environments without organizations - **System Templates**: Orphaned templates become system-wide instead of failing ## 🎯 API Improvements ### New Endpoints - `GET /marketplaces/organization`: Retrieve organization-shared templates - Enhanced marketplace endpoints with proper authentication middleware ### Enhanced Services - **Template Service**: Improved filtering, validation, and framework detection - **Chatflow Service**: Better authorization and cleanup procedures - **Error Handling**: Consistent error responses and proper status codes ## 📊 Frontend Enhancements ### Template Management - **Filtered Views**: Answer Agent templates excluded from Example Templates - **Organization Tab**: Dedicated view for organization-shared templates - **Enhanced Metadata**: Better template information display and searching ### User Experience - **Template Sharing**: Easy organization sharing toggle - **Framework Detection**: Automatic framework classification - **Improved Navigation**: Better template organization and discovery ## 🔍 Technical Details ### Framework Detection - Automatic detection of Answer Agent templates based on MCP Tools usage - Enhanced framework categorization (Langchain, LlamaIndex, Answer Agent) - Better template metadata extraction and processing ### Data Integrity - Soft delete implementation across all related entities - Proper cleanup of chatflow dependencies (messages, feedback, history) - Transaction-safe operations with rollback capabilities ### Performance Optimizations - Efficient query patterns with proper indexing - Optimized filtering and search operations - Reduced database roundtrips through better query design ## 🚀 New MCP Sidekick Templates - Answer Agent MCP Sidekick - BraveSearch MCP Sidekick - Confluence MCP Sidekick - Contentful MCP Sidekick - Jira MCP Sidekick - PostgreSQL MCP Sidekick - Salesforce MCP Sidekick - Slack MCP Sidekick - YouTube MCP Sidekick Fixes: #391 Jira: AAI-487
- Fixed orphaned object literals after commented console.log statements - Properly commented out object properties in MarketplaceCanvas.jsx - Properly commented out object properties in MarketplaceLanding.jsx - Properly commented out object properties in canvas/index.jsx - Resolves build errors while preserving debug information for future use
- Removed the `update_ui_env.sh` script from the Dockerfile as it is no longer needed for application startup. - Updated the ENTRYPOINT to use the default CMD for starting the application.
Feeature/aai vector postgres
- Changed the DBClusterParameterGroup Family from 'aurora-postgresql14' to 'aurora-postgresql16'. - Updated the EngineVersion from '14.4' to '16.9' for compatibility with the latest features.
…coping-and-security feat: implement organization-scoped custom templates
Fix Sidekicks Loading Issues and Enhance UI Navigation
added deep linking to creds
…anization (#413) * feat: move pgvector scripts to AAIPostgres package for better organization * fix: update script references in AAIPostgres component to use new package location * fix: update pgvector script references in server migration to use new package location * chore: update tsconfig to include AAIPostgres scripts in compilation * chore: remove old root-level pgvector scripts and documentation
replaced API_BASE_URL with API_HOST in passport
fixed typo in url
* error handling in salesforce route * some better logging --------- Co-authored-by: Jaime Morales <jaime@lastrev.com>
…ct ID support, and minimal config refresh throttling (#488) ## Title feat: add BWS configuration controls, suppression flags, direct project ID support, and minimal config refresh throttling ## Description This update significantly enhances Bitwarden Secrets (BWS) integration by introducing new environment variables, improving configuration handling, and adding granular control over output. It also introduces minimal throttling for configuration updates to keep `.env` and `bwsconfig.json` accurate without overloading the update process. ### Documentation (`README.md`) - Added new environment variables: - **`BWS_PROJECT_ID`** — Directly specify a BWS project UUID to bypass project selection. - **`BWS_NO_OVERRIDE`** — Prevent automatic refresh of `bwsconfig.json` from BWS secrets. - **`BWS_SUPPRESS_ALL`** — Suppress all secure-run logging while preserving wrapped command output (errors always shown). - **`BWS_SUPPRESS_MISSING`** — Suppress missing environment variable warnings during validation. - Included practical examples for local development and CI/CD usage. ### Git Ignore & Installation (`.gitignore`, `install.sh`) - Added `.bwsconfig.cache` to `.gitignore` to exclude the config refresh marker file. - Updated `install.sh`: - Ensures `.bwsconfig.cache` is ignored by default. - Chooses `yargs` and `glob` dependency versions dynamically based on Node.js version. - Improved inline comments for clarity. ### Environment Validation (`env_validator.js`) - Added `BWS_SUPPRESS_MISSING` support to optionally silence missing variable logs. - Adjusted warning logic to respect suppression settings without affecting build continuation. ### Project Selection Logic (`project-selector.js`) - Handles missing or empty project configurations: - Logs instructions to use `BWS_PROJECT_ID` when no projects are available. - Throws a descriptive error when configuration is empty. - Improved invalid project detection: - Warns when a configured project no longer exists. - Avoids unnecessary `.env` updates if the existing project is still valid. ### Secure Run Enhancements (`secureRun.js`) - **Global Suppression Mode (`BWS_SUPPRESS_ALL`)** - Mutes all secure-run console output except errors. - Applies suppression to child process `stdio` as well. - **Direct Project ID Bypass (`BWS_PROJECT_ID`)** - Loads and decrypts secrets directly for the given UUID, skipping config file and selection logic. - Requires only `BWS_ACCESS_TOKEN` and `BWS_PROJECT_ID` to function — ideal for CI/CD pipelines. - Avoids downloading the full configuration unless explicitly required, making it possible to operate without a `bwsconfig.json` file in some workflows. - **Configuration Override Control (`BWS_NO_OVERRIDE`)** - Skips Bitwarden config refresh entirely, relying only on local `bwsconfig.json`. - **Minimal Config Refresh Throttling (`.bwsconfig.cache`)** - Adds a 5-minute refresh window for `_bwsconfig_json`-based updates. - Prevents redundant config pulls that could repeatedly rewrite `.env` while ensuring updates are applied when `_bwsconfig_json` changes. - Not a secrets cache — it only tracks the last refresh time to avoid unnecessary API calls. - **Enhanced Config Merge Logic** - Merges multiple `_bwsconfig_json` secrets into a unified configuration, combining project IDs when overlaps exist. - Writes merged configuration to `bwsconfig.json` and updates the refresh marker file. - **Resilient Project Matching** - If `BWS_PROJECT` does not match any configured project, automatically switches to the first available and updates `.env`. - Only fails when no projects exist at all. ### Expected Impact - **Developer Productivity** - Faster, more predictable startup by skipping unnecessary prompts and refreshes. - **CI/CD Stability** - Minimal refresh throttling avoids `.env` churn while still applying new `_bwsconfig_json` updates promptly. - Cleaner logs with suppression flags. - **Configuration Accuracy** - Ensures local `.env` and `bwsconfig.json` stay in sync with BWS secrets. - **Resilience** - Auto-recovery for invalid or missing project references.
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Cameron Taylor <50385537+ct3685@users.noreply.github.com>
#478) … cost calculator, and usage events ## Overview This commit introduces a new billing page in the main UI, enhancing the user experience with dynamic loading of key components. ## Changes Made - Created a new billing page at `apps/web/app/(Main UI)/billing/page.tsx` - Integrated dynamic imports for: - BillingDashboard - CostCalculator - UsageEventsTable ## Impact - Provides a centralized billing interface for users, improving accessibility to billing-related features. - Utilizes dynamic imports to optimize performance by loading components only when needed. --------- Co-authored-by: Cameron Taylor <50385537+ct3685@users.noreply.github.com>
ct3685
marked this pull request as ready for review
August 15, 2025 20:54
maxtechera
temporarily deployed
to
staging - theanswer-iek0
August 15, 2025 21:17 — with
Render
Inactive
…HA weekly (#489) chore(dependabot): schedule w/ timezone, group minor+patch, ignore majors; make GHA weekly **What changed** - **npm (root `/`)** - Runs **daily at 09:00**. - **Ignores semver major** updates by default. - Adds a **`npm-minor-patch` group** to bundle **minor + patch** bumps into a single PR when possible. - Keeps `target-branch: staging` and `open-pull-requests-limit: 10`. - **GitHub Actions (root `/`)** - Moves schedule to **weekly on Monday at 09:00**. - **Ignores semver major** updates by default. - Adds a **`gha-minor-patch` group** to bundle **minor + patch** bumps. - Keeps `target-branch: staging` and `open-pull-requests-limit: 10`. - **Docs/structure** - Clarifies that pnpm users still use the `"npm"` ecosystem. - Adds inline comments and normalizes YAML formatting/quoting. - Provides a **commented-out template** for routing **major npm updates** to a separate branch (`release/majors`) on a **monthly** cadence (only majors allowed). **Why** - Reduce update noise by grouping safe changes, while **preventing automatic major bumps**. - Make updates more predictable with explicit **time + timezone**. - Slow down GitHub Actions dependency churn to a **weekly** cadence.
- Added JSON -LD - Updated references to AnswerAI to be AnswerAgentAI
maxtechera
previously approved these changes
Aug 18, 2025
… `production` + manual dry-run) (#491) Github Release
|
maxtechera
temporarily deployed
to
staging - theanswer-iek0
August 18, 2025 18:24 — with
Render
Inactive
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Title
feat: Production release 2025‑08‑18 — Admin console (chatflows & org credentials), chatflow versioning, settings API, stricter auth, Lacework ops, and release automation
Description
This release promotes the current staging state to production (2025‑08‑18). It introduces an Admin area (UI + API), organization‑level credential gating, chatflow versioning (with new DB columns & endpoints), a user/org settings API, stricter organization‑based authentication, optional Lacework sidecar integration for Fargate/Copilot deployments, and release automation (semantic‑release + CI). Motivation is inferred from the diff; no explicit issue references were found.
Highlights
apps/web/app/(Main UI)/sidekick-studio/(main-layout)/admin/for Dashboard and Org Credentials; pages render@ui/Adminand@ui/OrgCredentials/OrgCredentialsManagerand enforce admin role in SSR, returning an access‑denied message otherwise.enforceAbility.getAdminChatflows,getDefaultChatflowTemplate,bulkUpdateChatflows,getChatflowVersions,getChatflowVersion,rollbackChatflowToVersion, and org credential APIsgetOrgCredentials/updateOrgCredentials.ChatFlowaddscurrentVersion int default 1ands3Location text(migrations for Postgres, MySQL, MariaDB, SQLite).chatflowsService.getChatflowForPrediction(replacing direct repository calls); delete cleans up versioned storage viachatflowStorageService.deleteChatflowStorage.Organizationentity addsenabledIntegrations jsonb(+ Postgres migration).credentialName,label, andenabled. :contentReference[oaicite:16]{index=16}/app/api/settings/route.ts:GETreturns{ userSettings, orgSettings };POSTupdatesuser.appSettingsvia Prisma; both require authenticated session.permissions(addsorg:managefor Admin role), and enforces allowedAUTH0_ORGANIZATION_IDlist; unauthorized org yields 401./chatnow redirect to login with a return URL. :contentReference[oaicite:21]{index=21}copilot/flowise/manifest.ymladds sidecar,depends_on, andtaskdef_overridesto run the Lacework entrypoint script before starting the app;LaceworkVerbosesurfaced..releaserc.jsontargets theproductionbranch with semantic‑release..github/workflows/release.ymltriggers on push toproduction(plus aworkflow_dispatchdry run)..github/dependabot.ymlrevamped: daily npm checks tostagingwith minor/patch grouping and majors ignored; weekly GitHub Actions updates.UI
apps/web/app/(Main UI)/sidekick-studio/(main-layout)/admin/page.tsxrenders@ui/Admin.OrgCredentialsManager./admin/chatflows) and Org Credentials.useFlags) and new/admin/organizations/credentialsAPIs.agentflowVersion === 'v2'./api/auth/login?redirect_uri=/chat. :contentReference[oaicite:35]{index=35}API
GET /api/settings: returnsuserSettingsandorgSettingsfor the current user (via Prisma include).POST /api/settings: updatesuser.appSettings. Both require session.GET /admin/chatflows,GET /admin/chatflows/default-template,GET /admin/chatflows/:id/versions,PUT /admin/chatflows/bulk-update,POST /admin/chatflows/:id/rollback/:version.GET /admin/organizations/credentials,PUT /admin/organizations/credentials.GET /chatflows/:id/versions,GET /chatflows/:id/versions/:version,POST /chatflows/:id/rollback/:version.createPredictionandutilBuildChatflownow usechatflowsService.getChatflowForPrediction, with a comment noting it gets the published version for predictions.Data
ChatFlow: addscurrentVersion?: number(default 1),s3Location?: string.Organization: addsenabledIntegrations?: string(jsonb).currentVersion+s3Location, andenabledIntegrationscolumns; registered in migration index.currentVersion+s3Location; indexes updated.Auth & Security
permissions(e.g.,org:managefor Admin) and validates user’s org againstAUTH0_ORGANIZATION_IDlist, rejecting mismatches with 401.organizationIdprior to updates; returns appropriate errors otherwise.Build/CI
productionbranch with GitHub plugin; tags asv${version}.production, with a manual dry‑run job..bwsconfig.cachein root and inscripts/bws-secure/.Ops & Scripts
sidecars.datacollector-sidecar,depends_on, andtaskdef_overrides(entrypoint + volume mount).BWS_PROJECT_ID,BWS_NO_OVERRIDE, suppression flags;.bwsconfig.cacheignored.Docs
disableSwitch: true).pgvectoris absent.tags.ymlextended (e.g.,release,platform,ai-ethics, etc.).Expected Impact
/chatavoids anonymous sessions in the main chat UI. :contentReference[oaicite:72]{index=72}Breaking Changes / Risks
AUTH0_ORGANIZATION_IDwill now get401 Unauthorized. Ensure this env var lists all permitted org IDs.chat_flowandorganizationtables. Migrations must be applied before app start.Migrations / Deployment Notes
pgvectorwill now see warnings with installation steps; the migration does not hard‑fail.Environment / Config Changes
AUTH0_ORGANIZATION_ID(comma‑separated) includes your production org(s).LaceworkAccessToken(and optionallyLaceworkServerUrl,LaceworkConfig) incopilot.{env}.env;LaceworkVerbosedefaults totruein manifest.BWS_PROJECT_ID,BWS_NO_OVERRIDE,BWS_SUPPRESS_ALL,BWS_SUPPRESS_MISSINGfor local/CI ergonomics.Testing Notes
GET /admin/organizations/credentialsreturns current enabled integrations.PUT /admin/organizations/credentialsenforces validation; confirm changes affect non‑Admin credential visibility in UI.GET /admin/chatflows/:id/versions, retrieve a specific version via/chatflows/:id/versions/:version, and test rollback.getChatflowForPrediction.GET/POST /api/settingsreturns/updatesuser.appSettings(and includesorgSettingson GET)./chatunauthenticated → expect redirect to login withredirect_uri=/chat. :contentReference[oaicite:97]{index=97}No new external issue references were found in the diff. If anything above is unclear, it is because the motivation is not explicitly evident from the code changes alone.