From bb7282fa1987ddaf7a9e68f4dacb9094f6ab96a3 Mon Sep 17 00:00:00 2001 From: use-the-fork Date: Tue, 22 Oct 2024 17:21:21 -0400 Subject: [PATCH 1/3] docs(changelog): add comprehensive changelog for version 0.1.0 and 0.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Documented all notable changes, including new features, bug fixes, refactorings, and miscellaneous tasks. - Provided clear organization with sections for features, fixes, refactors, documentation, style, testing, and other tasks. - Added versions 0.1.0 and 0.2.0 with detailed descriptions and improvements. - Introduced emojis for highlights πŸš€βœ¨πŸ“š. --- CHANGELOG.md | 285 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 285 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..c11b050 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,285 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## \[0.2.0\] - 2024-10-22 + +### πŸš€ Features + +- _(helpers)_ Add dedent method to remove common leading whitespace +- _(agent)_ Enhance integration resolution mechanism πŸ“¦ +- _(commands)_ Add SynapseArtisan command and agent πŸš€ +- _(api)_ Introduce new endpoint for user management ✨ +- _(sql-tool)_ Introduce SQLToolAgent with documentation and tests πŸŽ‰ +- _(traits)_ Introduce configurable agents and conditionable utilities πŸ› οΈ +- _(integrations)_ Add Ollama integration and tests πŸ› οΈ +- _(ollama)_ Implement embedding creation functionality +- _(validation)_ Improve response format handling and validation prompts πŸ› οΈ +- _(integrations)_ Add Ollama integration 🌟 +- + +### πŸ› Bug Fixes + +- _(validation)_ Enhance JSON response handling in output schema πŸ› οΈ +- _(integrations)_ Replace OllamaAIConnector with ClaudeAIConnector and improve ChatRequest handling ✨ + +### 🚜 Refactor + +- _(docs)_ Update references from Laravel Synapse to Synapse πŸš€ +- _(agent)_ πŸ› οΈ streamline tool management logic by rearranging methods +- _(SynapseArtisan)_ Enhance command execution flow and update documentation πŸ› οΈ +- _(agents)_ Remove direct OpenAI integrations +- _(agent)_ Separate `use` statements for better readability and maintainability + +### πŸ“š Documentation + +- _(README)_ Update usage instructions and add prebuilt agents info πŸš€ +- Correct package inspiration reference in documentation + +### 🎨 Styling + +- _(tests)_ Adjust indentation in ClaudeIntegrationTest.php πŸ“ + +### πŸ§ͺ Testing + +- _(SQLToolAgent)_ Add new JSON fixtures and update test verification logic +- _(SQLToolAgentTest)_ Simplify content assertion using multiple contains +- _(integrations)_ Update tests with improved output assertions and fixture usage ♻️ +- _(tests)_ Update test expectations and improve readability πŸ§ͺ +- _(memory)_ Update conversation test summaries for clearer content verification πŸ§ͺ + +### βš™οΈ Miscellaneous Tasks + +- _(tests)_ Remove outdated fixtures for clearbit, crunchbase, and firecrawl +- _(ci)_ Update checkout action to v4 +- _(workflows)_ Update branch name and add OpenAI API key to tests.yml + +## \[0.1.0\] - 2024-10-12 + +### πŸš€ Features + +- _(nix)_ Introduce snow-blower configuration with PHP and Composer setups +- _(workbench)_ Initialize Laravel project structure with essential configurations +- _(tests)_ Add initial test infrastructure and setup +- _(synapse)_ Introduce tools for handling AI-generated tasks and enhanced project management +- _(agents)_ Enhance tool handling with new Service and ValueObject refactor +- _(parsers)_ Implement output parsing for JSON and string +- _(services)_ Add Clearbit company search tool and related tests +- _(toolList)_ Add tool list view and enhance tool handling +- _(agent)_ Support multi-message prompts and improve parsing +- _(flake)_ Add publicKeys and enable agenix for .env secrets +- _(memory)_ Add asString method to serialize agent messages +- _(provider)_ Add migration publishing to SynapseServiceProvider +- _(crunchbase)_ Add Crunchbase service and tool for organization data handling +- _(FirecrawlTool)_ Introduce FirecrawlTool for webpage content scraping +- _(agent)_ Add SearchAndScrapeAgent with error handling and new view template +- _(agent)_ Add SearchAndScrapeAgent with error handling and new view template +- _(chat-rephrase)_ Add Chat Rephrase Agent with prompt and test +- _(openai)_ Add support for extra agent arguments in handle methods +- _(FirecrawlTool)_ Enhance URL scraping with extraction prompts and add tests +- _(tool)_ Enhance SerperTool, add test coverage +- _(tools)_ Add SerpAPI Google search capability +- _(SerpAPIGoogleNewsTool)_ Add tool for Google News searches, update agent and tests +- _(logging)_ Add event logging to Agent class +- _(memory)_ Add set and clear methods for agent memory management +- _(memory)_ Add set and clear methods to CollectionMemory class +- _(memory)_ Expand payload structure and add new tests +- _(output-rules)_ Improve validation error handling and messaging +- _(VectorStores)_ Add new contract and base implementation for vector store +- _(exceptions)_ Add MissingApiKeyException class for handling missing API key errors +- _(integration)_ Add support for Claude AI integration and improve tool handling +- _(openai)_ Add validation request for output formatting in OpenAI integration +- _(integrations)_ Update model configuration and add embeddings support +- _(embeddings)_ Add embedding creation support +- _(output-rules)_ Enhance validation prompt handling and add error view +- _(tools)_ Enhance tool handling with better parameter description and validation +- _(tools)_ Add AI integration capability with Saloon Connector +- _(tests)_ Enhance ChatRephraseAgent tests with mock client, add message handling, and fixture data +- _(image input)_ Update message type, improve test structure for ImageAgent +- _(agent)_ Add custom exception for unknown finish reasons +- _(linting)_ Add `refactor-file` command to flake.nix and composer.json +- _(docs)_ Revamp documentation structure and add VitePress for better dev experience +- _(agent)_ Add KnowledgeGraphExtractionAgent with prompt and test +- _(agent)_ Add ContextualRetrievalPreprocessingAgent with fixtures and tests +- _(Synapse)_ Add installation command and refine publishing logic +- _(agent)_ Add ContextualRetrievalPreprocessingAgent with fixtures and tests +- _(logging)_ Add comprehensive logging to middleware pipelines and agent tasks +- _(agent)_ Add maximum iteration limit to prevent infinite loops +- _(agent)_ Introduce HasOutputSchema interface for output schema validation +- _(agents)_ Introduce boot agent pipeline and update memory management +- _(memory)_ Enhance database memory functionality and add tests +- _(agent)_ Introduce event handling and new Agent event classes +- _(agent)_ Enhance agent functionality and documentation 🌟 +- _(validation)_ Implement output schema validation for agents πŸš€ +- _(memory)_ Add DatabaseMemory implementation and improve documentation πŸ’ΎπŸ“š +- _(agents)_ Add prebuilt MultiQueryRetrieverAgent and documentation πŸ› οΈ +- _(agent)_ Enhance memory management and update schemas πŸŽ‰ +- _(contextual-retrieval-preprocessing-agent)_ Add new Contextual Retrieval Preprocessing Agent with tests and documentation πŸš€ +- _(logging)_ Enhance agent activity logging and add unit tests πŸ“ +- _(tests)_ Add SQL tools and integration tests πŸŽ‰ + +### πŸ› Bug Fixes + +- _(memory)_ Correct array keys to prevent improper payload handling +- _(models)_ Update relationship in Message to use AgentMemory instead of Assistant +- _(memory)_ Ensure proper formatting of message payloads with newlines +- _(BaseTool)_ Correct class name retrieval in log method +- _(FirecrawlService)_ Improve extraction prompt for content relevance +- _(logging)_ Remove redundant results logging in tools and set default context in BaseTool +- _(FirecrawlService)_ Improve clarity of extraction prompt +- _(FirecrawlService)_ Improve clarity of extraction prompt +- _(FirecrawlService)_ Correct grammar in extraction prompt for clarity +- _(tests)_ Remove unused Serper service configuration in TestCase +- _(views)_ Correct order of includes and message sorting +- _(OpenAI)_ Remove debugging code and correct response data handling in EmbeddingsRequest +- _(agent)_ Add memory and integration resolver exception handling πŸš€ +- _(memory)_ Correct input key and debug statements in CollectionMemoryTest +- _(agent)_ Correct middleware method for tool initialization +- _(agent)_ Correct middleware method for tool initialization +- _(tests)_ Remove outdated memory fixture files πŸ—‘οΈ +- _(tests)_ Update assertions for messages and standalone_question + +### 🚜 Refactor + +- _(agent)_ Streamline agent implementation, enhance OpenAI integration +- _(core)_ Update tool call handling and Google search feature +- _(memory)_ Implement new agent executor, enhance tool handling and OpenAI integration +- _(SystemPrompts)_ Convert BaseSystemPrompt to abstract class and clean up imports in tests +- _(prompts)_ Standardize prompt architecture and update invocation flow +- _(core)_ Remove obsolete classes and decouple concerns +- _(Message)_ Rename MessageValueObject to Message +- _(messages)_ Update prompt syntax and improve parsing logic +- _(SerperService)_ Inject apiKey via constructor, enhance SearchGoogleTool output format +- _(output)_ Convert Message object to array for prompt handling +- _(api)_ Replace Message with Response for better encapsulation +- _(memory)_ Split memory into two formats, update prompts to use new memory format +- _(models)_ Remove unused Eloquent models +- _(Message)_ Flatten tool attributes in value object and remove unused method +- _(tools)_ Extract common logic to BaseTool and remove unused method from Tool contract +- _(events)_ Rename model event methods to agent event methods and update related logic +- _(FirecrawlTool)_ Remove unused imports and adjust indentation +- _(logging)_ Consolidate logging logic into BaseTool class +- _(SimpleAgent)_ Replace SearchGoogleTool with SerperTool +- _(search)_ Streamline SerpAPIService parameter handling and update method signature +- _(test)_ Remove unused 'serper' config from TestCase setup +- _(migrations)_ Change `agent_memory_id` to UUID in `messages` table migration +- _(tools)_ Simplify query parameter descriptions in search tools +- _(SynapseServiceProvider)_ Replace publishesMigrations with loadMigrationsFrom +- _(tools)_ Standardize API key retrieval using config files +- _(config)_ Restructure API key and model configurations +- _(openai)_ Replace direct integration calls with Saloon for OpenAI interactions +- _(serper)_ Modularize Serper integration and update usage +- _(services)_ Modularize ClearbitService into separate request and connector classes +- _(crunchbase)_ Modularize and enhance Crunchbase integration +- _(Firecrawl)_ Modernize Firecrawl service architecture +- _(serpapi)_ Integrate new SerpApiConnector, remove deprecated service, and enhance API key handling +- _(SerpAPI)_ Streamline Google News tool handling; update tests and fixtures +- _(integrations)_ Reorganize OpenAI integration structure +- _(tests)_ Remove redundant `only` call in ClaudeIntegrationTest +- _(connectors/claude)_ Remove unused import in ValidateOutputRequest +- _(integrations)_ Update message formatting and tool handling +- _(integrations)_ Relocate Integration contract for better organization +- _(ValueObjects)_ Update comment to accurately reflect the Message validator +- _(agent)_ Streamline constructor and optimize methods for clarity and efficiency +- _(integrations)_ Update docblocks in HasIntegration.php for clarity +- _(memory)_ Reorganize memory methods and improve doc comments +- _(memory)_ Improve method visibility and documentation in memory classes +- _(logging)_ Consolidate logging functionality into HasLogging trait +- _(models)_ Reorganize memory-related models to improve structure +- _(tests)_ Relocate and update MultiQueryRetrieverAgent tests for improved structure and mocking +- _(agent)_ Remove ProfessionalEditorAgent and associated tests and resources +- _(SearchAndScrapeAgent)_ Remove deprecated agent and related files +- _(codebase)_ Optimize null/empty checks and type hints across various classes +- _(codebase)_ Optimize null/empty checks and type hints across various classes +- _(src)_ Standardize variable names and signatures +- _(schema)_ Rename OutputRules to OutputSchema across the codebase +- _(tests)_ Reorganize CollectionMemoryTest directory structure +- _(agent)_ Enhance PendingAgentTask and integration handling +- _(agents)_ Restructure traits for better organization and functionality +- _(integrations)_ Remove unused Message import and method +- _(agent)_ Move Agent class to base namespace πŸ› οΈ +- _(project)_ Restructure namespaces and traits for consistency ♻️ +- _(agent)_ Standardize namespaces and manage memory/tools +- _(value-objects)_ Reorganize Message and EmbeddingResponse namespaces πŸ”„ +- _(memory)_ Move Memory contract to new namespace ♻️ +- _(integrations)_ Relocate `Response` value object to new namespace ♻️ +- _(integration)_ Rename OpenAiIntegration to OpenAIIntegration and update methods +- _(integration)_ Rename OpenAiIntegration to OpenAIIntegration and update methods +- _(agent)_ Rename traits for clarity 🌟 +- _(models)_ 🦊 relocate models to a new namespace for better organization +- _(tools)_ Remove ToolCallValueObject and update references πŸ’… +- _(tool)_ Modify BaseTool to initialize with PendingAgentTask +- _(tools)_ Improve tool handling and integration +- _(agent)_ Rename Agent namespace to AgentTask for clarity +- _(agents)_ Move agent classes from Templates to Agents namespace +- _(agent)_ Streamline integration management and tool handling +- _(memory)_ Unify memory management and enhance tool initialization 🌟✨ +- _(agent/memory)_ Synchronize memory management with middleware pipeline and integrate new interfaces 🧠 +- _(tests)_ Rename fixture files for OpenAi integration tests for better organization +- _(tests)_ Streamline fixture paths and remove unused imports +- _(SerpAPIGoogleSearchTool)_ Streamline API key handling and enhance tests +- _(SerpAPIGoogleNewsTool)_ Streamline API key handling and enhance test coverage +- _(firecrawl)_ Update endpoint and extraction schema handling +- _(CrunchbaseTool)_ Simplify initialization and enhance boot method +- _(clearbit)_ Streamline ClearbitCompanyTool logic, update tests +- _(Message)_ Update content return type to mixed +- _(agent-hooks)_ Split and enhance hook interfaces, add testsπŸ› +- _(agent-hooks)_ Split and enhance hook interfaces, add testsπŸ› +- _(memory)_ Remove deprecated memory trait and methods πŸ’Ύ +- _(tools)_ Streamline API key handling and remove unnecessary boot method πŸ”§ +- _(tools)_ Streamline API key handling and remove unnecessary boot method πŸ”§ +- _(KnowledgeGraphExtractionAgent)_ Implement HasOutputSchema interface and update schema validation 🎯 +- _(command)_ Streamline SynapseInstall.php structure + +### πŸ“š Documentation + +- _(getting-started)_ Add installation guide for Laravel Synapse +- _(Response)_ Correct annotation for validationRules method +- _(agent)_ Add detailed docblocks for methods +- _(ClearbitCompanyTool)_ Add missing docblocks and exceptions, improve method annotations +- _(OutputRule)_ Add PHPDoc comments for better code clarity and documentation +- _(SynapseServiceProvider)_ Enhance boot method docblock for clarity and detail +- _(vitepress)_ Add initial VitePress configuration for documentation +- _(agents)_ Add comprehensive documentation for agent memory and collection memory 🍱 +- _(agent-traits)_ Add `HasHooks` contract and `ManagesHooks` trait ✍️ +- Reorganize and add new sections to documentation πŸ“„ +- _(prompt)_ Enhance documentation with new prompt parts and examples ✍️ +- _(agents)_ Add integration setup documentation for OpenAI and Claude πŸš€ +- _(prompts)_ Enhance documentation for clarity and consistency βœ¨πŸ“š +- _(traits)_ Add documentation for events and log traits πŸ“ +- _(agent-lifecycle)_ Fix broken link to message tags πŸ“š +- _(license)_ Add MIT License to the repository πŸ“„ + +### 🎨 Styling + +- _(codebase)_ Adhere to strict type declarations and coding standards +- _(output-rules)_ Refine prompt formatting for better readability +- _(provider)_ Specify return type and update doc comment in SynapseServiceProvider +- _(docblocks)_ Add comprehensive docblocks for constructors and methods +- _(codebase)_ Improve code formatting and consistency across files +- _(agent, tests)_ ⭐️ Ensure consistent code indentation 🌟 + +### πŸ§ͺ Testing + +- _(agent)_ Add SearchAndScrapeAgentTest and cleanup existing tests +- _(ImageAgent)_ Add basic test structure for scraping functionality +- _(SerperTool)_ Enhance coverage and restructure tests with mocking +- _(OpenAiIntegration)_ Add test for Connects With OutputSchema +- _(memory)_ Update and reorganize CollectionMemory test fixtures +- _(ImageAgent)_ Add new fixture for image agent test πŸ€– +- _(memory)_ Add new CollectionMemory test and fixture πŸš€ + +### βš™οΈ Miscellaneous Tasks + +- _(dependencies)_ Remove unused dependencies 'saloonphp/saloon' and 'spatie/laravel-data' +- _(tests)_ Restructure OpenAiIntegrationTest.php directory +- _(config)_ Add .editorconfig for consistent code formatting +- _(secrets)_ Update encrypted environment variables +- _(docs)_ Add GitHub Actions workflow to deploy VitePress site to Pages πŸš€ +- _(ci)_ Cleanup workflow and add funding configuration 🧹 +- _(workflows)_ Add GitHub Actions workflow for running tests πŸš€ +- _(workflow)_ Add GitHub Action to automate changelog updates upon release πŸš€ +- _(workflows)_ Update CI config to use PHP 8.2 and streamline testing process πŸ›  +- _(workflow)_ Add environment API keys for workflows πŸ› οΈ + + From 1d8d833ac1ddc1049c0447c211cecf277dbe1a52 Mon Sep 17 00:00:00 2001 From: use-the-fork Date: Tue, 22 Oct 2024 17:21:41 -0400 Subject: [PATCH 2/3] =?UTF-8?q?chore(workflows):=20remove=20unused=20`upda?= =?UTF-8?q?te-changelog.yml`=20workflow=20file=20=F0=9F=97=91=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Deleted `.github/workflows/update-changelog.yml` to clean up workflow configurations. --- .github/workflows/update-changelog.yml | 29 -------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .github/workflows/update-changelog.yml diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml deleted file mode 100644 index 42d4b27..0000000 --- a/.github/workflows/update-changelog.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: 'Update Changelog' - -on: - release: - types: [released] - -jobs: - update: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: main - token: ${{ secrets.COMMIT_TOKEN }} - - - name: Update Changelog - uses: stefanzweifel/changelog-updater-action@v1 - with: - latest-version: ${{ github.event.release.name }} - release-notes: ${{ github.event.release.body }} - - - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v4 - with: - branch: main - commit_message: Update CHANGELOG - file_pattern: CHANGELOG.md From f70264438656114c3618fb1157102ebdf41479f4 Mon Sep 17 00:00:00 2001 From: use-the-fork Date: Tue, 22 Oct 2024 17:22:34 -0400 Subject: [PATCH 3/3] =?UTF-8?q?docs(README):=20update=20project=20descript?= =?UTF-8?q?ion=20and=20references=20=F0=9F=93=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Simplified introduction by removing "Laravel" from "Synapse". - Removed "Laravel" reference in the description for a broader scope. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 39dc9f7..9f33871 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # 🧠 Synapse -Start building AI-driven applications with Laravel Synapse today! +Start building AI-driven applications with Synapse today! ![Build Status](https://github.com/use-the-fork/laravel-synapse/actions/workflows/tests.yml/badge.svg) ![Downloads](https://img.shields.io/packagist/dm/use-the-fork/synapse) @@ -11,7 +11,7 @@ Start building AI-driven applications with Laravel Synapse today! -Synapse allows you to seamlessly integrate and manage AI agents in your Laravel applications. Inspired by Langchain and Laravel Saloon, this package simplifies AI agent creation and management, giving you the tools to run them at scale. +Synapse allows you to seamlessly integrate and manage AI agents in your Laravel applications. Inspired by Langchain and Saloon, this package simplifies AI agent creation and management, giving you the tools to run them at scale. ## Features