Skip to content

Commit 23c4e9d

Browse files
pedrofrxncxviktormarinhoviniciusventura29tlgimenesmcandeia
authored
Durable mcp (#50)
* init * Add drizzle ORM and related configurations - Introduced drizzle ORM as a dependency in package.json and updated zod version. - Added drizzle configuration file and SQL migration scripts for the 'agents' table. - Implemented database connection logic in server/db.ts and created CRUD tools for the agents collection. - Updated wrangler.toml to include new database bindings and added a .gitignore file for sensitive variables. - Enhanced the shared types in deco.gen.ts to accommodate new database operations and structures. * wip * init * Add drizzle ORM and related configurations - Introduced drizzle ORM as a dependency in package.json and updated zod version. - Added drizzle configuration file and SQL migration scripts for the 'agents' table. - Implemented database connection logic in server/db.ts and created CRUD tools for the agents collection. - Updated wrangler.toml to include new database bindings and added a .gitignore file for sensitive variables. - Enhanced the shared types in deco.gen.ts to accommodate new database operations and structures. * wip * Refactor database integration and remove unused drizzle configurations - Removed drizzle ORM configurations and related files, including SQL migration scripts and schema definitions for the 'agents' table. - Introduced PostgreSQL connection handling with automatic table creation for agents. - Updated server tools to implement CRUD operations for agents using PostgreSQL. - Enhanced the state schema to include a PostgreSQL connection string for better database management. - Adjusted package dependencies and versions in package.json and bun.lock to reflect the changes. * Update wrangler.toml and deco.gen.ts for enhanced Deco Chat integration - Removed unused database bindings from wrangler.toml. - Refactored deco.gen.ts to introduce new interfaces and types for Deco Chat operations, including input and output structures for agent management. - Added CRUD operation interfaces for agents, enhancing the overall structure and clarity of the type definitions. - Updated StateSchema to reflect changes in the data model, ensuring better alignment with the new agent management features. * assume postgres binding * Merge branch 'vibecoding-toolkit' of https://github.com/decocms/mcps into vibecoding-toolkit * fmt * Implement CF Sandbox package for secure JavaScript execution - Introduced a new package `@deco/cf-sandbox` for executing JavaScript code securely in Cloudflare Workers using QuickJS. - Added essential files including `package.json`, `bun.lock`, and TypeScript configuration for the new package. - Implemented core functionalities such as context creation, console logging, and fetch API support within the sandbox environment. - Updated `vibecoding-toolkit` to include the new package as a dependency and adjusted related configurations. - Enhanced README documentation for the CF Sandbox, detailing usage and features for developers. * Enhance workflow execution with input resolution and context management - Added support for resolving @refs in workflow inputs, allowing for dynamic input referencing across steps. - Updated `handleSandboxStep` to accept a context parameter, enabling better state management during execution. - Refactored input handling in `runWorkflowTool` to parse and merge step inputs, improving flexibility and error handling. - Made input and output schemas optional in the StepSchema, accommodating steps that do not require them. - Updated TypeScript definitions in `deco.gen.ts` to reflect changes in the workflow structure, ensuring type safety and clarity. * init * Add drizzle ORM and related configurations - Introduced drizzle ORM as a dependency in package.json and updated zod version. - Added drizzle configuration file and SQL migration scripts for the 'agents' table. - Implemented database connection logic in server/db.ts and created CRUD tools for the agents collection. - Updated wrangler.toml to include new database bindings and added a .gitignore file for sensitive variables. - Enhanced the shared types in deco.gen.ts to accommodate new database operations and structures. * wip * Refactor database integration and remove unused drizzle configurations - Removed drizzle ORM configurations and related files, including SQL migration scripts and schema definitions for the 'agents' table. - Introduced PostgreSQL connection handling with automatic table creation for agents. - Updated server tools to implement CRUD operations for agents using PostgreSQL. - Enhanced the state schema to include a PostgreSQL connection string for better database management. - Adjusted package dependencies and versions in package.json and bun.lock to reflect the changes. * Update wrangler.toml and deco.gen.ts for enhanced Deco Chat integration - Removed unused database bindings from wrangler.toml. - Refactored deco.gen.ts to introduce new interfaces and types for Deco Chat operations, including input and output structures for agent management. - Added CRUD operation interfaces for agents, enhancing the overall structure and clarity of the type definitions. - Updated StateSchema to reflect changes in the data model, ensuring better alignment with the new agent management features. * assume postgres binding * Add cfm workspace and update dependencies - Introduced a new workspace for 'cfm' in package.json, enhancing project structure. - Updated bun.lock to include 'cfm' dependencies and devDependencies for improved functionality. - Refactored DataForSEO tools to utilize updated state management for API credentials, replacing 'DATAFORSEO_LOGIN' and 'DATAFORSEO_PASSWORD' with 'login' and 'password' for consistency. * Refactor DataForSEO tools to utilize environment-based client creation - Removed the 'cfm' workspace from package.json and corresponding entries from bun.lock to streamline project structure. - Introduced a new helper function, getClientFromEnv, to simplify client creation for DataForSEO tools, enhancing code maintainability and readability. - Updated multiple tool files to replace direct client instantiation with the new helper function, ensuring consistent handling of API credentials. * init * Add drizzle ORM and related configurations - Introduced drizzle ORM as a dependency in package.json and updated zod version. - Added drizzle configuration file and SQL migration scripts for the 'agents' table. - Implemented database connection logic in server/db.ts and created CRUD tools for the agents collection. - Updated wrangler.toml to include new database bindings and added a .gitignore file for sensitive variables. - Enhanced the shared types in deco.gen.ts to accommodate new database operations and structures. * Refactor database integration and remove unused drizzle configurations - Removed drizzle ORM configurations and related files, including SQL migration scripts and schema definitions for the 'agents' table. - Introduced PostgreSQL connection handling with automatic table creation for agents. - Updated server tools to implement CRUD operations for agents using PostgreSQL. - Enhanced the state schema to include a PostgreSQL connection string for better database management. - Adjusted package dependencies and versions in package.json and bun.lock to reflect the changes. * wi * Add workflow execution enhancements and new documentation - Updated `.gitignore` to include `packages/` directory. - Added `sucrase` as a dependency in `package.json` and updated `typescript` version. - Introduced a new `script.ts` for TypeScript to JavaScript conversion using `sucrase`. - Created comprehensive documentation for workflow patterns, implementation guides, and scheduler architecture. - Implemented a durable queue handler to process all messages in a batch with error isolation and retry logic. - Refactored workflow execution logic to support phase-based execution and improved error handling. - Added database utility functions for retry mechanisms and workflow execution tracking. * fmt * Enhance workflow execution and database integration - Added new tools for managing workflows, including CRUD operations and execution handling. - Introduced a new `tools` collection with schemas for tool definitions and dependencies. - Refactored workflow execution logic to improve error handling and support for phase-based execution. - Updated database queries to utilize epoch timestamps for locking mechanisms. - Cleaned up unused code and improved type definitions for better clarity and maintainability. - Enhanced the queue handler to support batch processing with improved error isolation and retry logic. * Refactor database utility functions and update imports - Moved database utility functions to a new file `db-utils.ts` under the `workflow` directory for better organization. - Updated import paths in `index.ts` to reflect the new location of the database utilities. - Introduced retry logic for database operations to enhance resilience against transient errors. * Add use-sync-external-store dependency and enhance workflow components - Introduced `use-sync-external-store` as a dependency in `package.json` to improve state management. - Updated `vite.config.ts` to include the new dependency for optimization. - Refactored workflow components, including `ExecutionCard`, `StepCard`, and `WorkflowEditor`, to enhance their structure and maintainability. - Added new components for better handling of workflow steps and execution details. - Improved error handling and output display in workflow components for better user experience. * bun.lock * bump deps * wip * Refactor collection tool naming convention - Updated the naming convention for collection tools by removing the 'DECO_' prefix from the generated tool names, simplifying the format to 'COLLECTION_{collectionName}_{operation}'. * Use new runtime version Signed-off-by: Marcos Candeia <[email protected]> * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * fmt * wip * rm * wip * wip * wip * wip * wip * wip * wip * wip2 * wip * wip * wip * a * wip * wip * wip * wip * wip * wip * clean * wip * wi * wip * wip * wip * wip * Refactor execution update logic and error handling in workflow execution. Simplified SQL execution and improved error message handling in the error handler. Enhanced step execution to return error results without throwing exceptions, allowing for better error management. * wip * a * fix assistant table creation * Update dependencies and refactor execution logic - Added `@ai-sdk/mcp` and updated `@modelcontextprotocol/sdk` to version `1.25.1` in `package.json`. - Refactored execution logic to replace `workflow_id` with `gateway_id` in execution-related functions and database queries. - Enhanced `ExecutionContext` to include `gatewayId`. - Updated tool execution to utilize the new gateway transport for MCP calls. - Improved database schema for `workflow_execution` to accommodate `gateway_id`. - Cleaned up unused code and improved validation logic for workflow steps. * binding compliant * wip * Refactor step execution logic by removing timeout handling from `executeToolStepWithTimeout` and directly invoking `executeToolStep`. This simplifies the code and improves readability. * wip * feat: enhance Discord Bot functionality with new command routes and configuration * refactor(meta-ads): replace OAuth with direct token authentication - Remove OAuth PKCE flow from main.ts - Update getMetaAccessToken to use META_ACCESS_TOKEN environment variable - Update README with token-based authentication instructions - Update GitHub Actions workflows to use META_ACCESS_TOKEN secret - Update SECRETS.md documentation for token-based auth - Remove OAuth-related constants and comments * feat(meta-ads): add state configuration for access token - Replace OAuth with configuration-based state schema - Add StateSchema to allow users to configure access token during MCP installation - Update getMetaAccessToken to read from env.state.accessToken - Add shared/deco.gen.ts for StateSchema support - Add types.d.ts to handle runtime dependency type issues - Update check script to use oxlint instead of tsc - Update tsconfig.json to exclude dist directory * wip * wip * merge * merge * rvert * wip * Fixing warning/errors Signed-off-by: Marcos Candeia <[email protected]> * Fixed response error Signed-off-by: Marcos Candeia <[email protected]> * Bump MCP protocol sdk version Signed-off-by: Marcos Candeia <[email protected]> * Fix formatting Signed-off-by: Marcos Candeia <[email protected]> --------- Signed-off-by: Marcos Candeia <[email protected]> Co-authored-by: viktormarinho <[email protected]> Co-authored-by: viniciusventura29 <[email protected]> Co-authored-by: gimenes <[email protected]> Co-authored-by: Marcos Candeia <[email protected]> Co-authored-by: Jonas Jesus <[email protected]>
1 parent 2915110 commit 23c4e9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+5234
-435
lines changed

.github/workflows/SECRETS.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ This document lists all secrets required to deploy MCPs via GitHub Actions.
3434
- **`PINECONE_INDEX`**: Pinecone index name (if required)
3535

3636
### MCP: `meta-ads`
37-
- **`META_APP_ID`**: Facebook App ID for Meta Ads
38-
- Obtain at: https://developers.facebook.com/apps/
39-
- **`META_APP_SECRET`**: Facebook App Secret for Meta Ads
40-
- Obtain at: https://developers.facebook.com/apps/ (Settings > Basic)
37+
- **`META_ACCESS_TOKEN`**: Facebook Access Token for Meta Ads API
38+
- Obtain at: https://developers.facebook.com/tools/explorer/
39+
- Select your app and generate token with required permissions:
40+
- `ads_read` - Read ad information
41+
- `ads_management` - Manage ads
42+
- `pages_read_engagement` - Read associated pages
43+
- `business_management` - Access business accounts
4144

4245
## How to Add Secrets on GitHub
4346

.github/workflows/deploy-preview.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ jobs:
8080
APIFY_API_TOKEN: ${{ secrets.APIFY_API_TOKEN }}
8181
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
8282
PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }}
83-
META_APP_ID: ${{ secrets.META_APP_ID }}
84-
META_APP_SECRET: ${{ secrets.META_APP_SECRET }}
83+
META_ACCESS_TOKEN: ${{ secrets.META_ACCESS_TOKEN }}
8584

8685
- name: Save deployment info
8786
if: steps.deploy.outputs.preview_url

.github/workflows/deploy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ jobs:
7474
APIFY_API_TOKEN: ${{ secrets.APIFY_API_TOKEN }}
7575
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
7676
PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }}
77-
META_APP_ID: ${{ secrets.META_APP_ID }}
78-
META_APP_SECRET: ${{ secrets.META_APP_SECRET }}
77+
META_ACCESS_TOKEN: ${{ secrets.META_ACCESS_TOKEN }}
7978

8079
- name: Notify success
8180
if: success()

bun.lock

Lines changed: 170 additions & 69 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)