Conversation
…nd comprehensive QA test plans Integration & MCP: - Add multi-account support for integration settings and MCP servers (account_alias, is_default columns with composite unique keys) - Expand IntegrationController with full CRUD for multi-account setups - Update IntegrationSettingCredentialResolver to resolve by account alias - Refactor McpServerRegistrar and McpToolProvider for improved registration - Split composer path repo: ../integrations/core + ../integrations/packages/* Provider & config: - Update DynamicProviderResolver and GlmPrismGateway for latest relay - Update config/integrations.php and config/prism.php with new provider entries - Clean up AppServiceProvider registration Services: - Update LuaApiDocGenerator with improved catalog building - Update AgentChatService and OpenCompanyLuaToolInvoker - Add workspace-scoped tool meta lookup in LuaBridge Docs: - Add comprehensive docs/ecosystem/ with integration docs, iris analysis, and kosmokrator architecture/audit/research/proposal docs - Add QA test strategy and feature test map covering the full git tree: integration refactor, file management, automations, chat UI, Telegram forwarding, LLM providers, security hardening, and uncommitted changes Tests: - Update ChannelConversationLoaderTest and DynamicProviderResolverTest
This was referenced Apr 10, 2026
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.
Summary
This PR merges the current
devbranch intomainand consolidates three layers of work that were previously split across separate branches and PRs:In practical terms, this PR replaces the previous incremental branch-by-branch review flow with a single integration branch that represents the combined product direction.
This PR supersedes:
feat: Integration ecosystem refactor — monorepo, shared core, multi-account[codex] Implement runtime memory alignment pipelineWhy this PR exists
The repo had two meaningful active lines of work:
feat/integration-refactorThis changed how integrations, MCP tools, provider metadata, Lua docs, and multi-account configuration are structured.
codex/runtime-memory-alignmentThis changed how agent prompts are shaped, cached, compacted, truncated, and tested under context pressure.
Reviewing or merging them independently no longer made much sense because they overlap in runtime wiring, provider resolution, docs, and dependency layout. The
devbranch was created to integrate both branches, resolve conflicts, and then fix the branch-combination regressions discovered during validation.High-level outcome
After this PR:
../integrationsmonorepo and sharedintegration-coreBranch history included in this PR
This PR contains these branch-level steps:
c4bbbfcfeat: multi-account integrations, MCP improvements, ecosystem docs, and comprehensive QA test plans2d76d65merge offeat/integration-refactorintodeva216b36merge ofcodex/runtime-memory-alignmentintodev234ed7fFix integration path repositories in composer.lock50370d1Fix provider resolution on dev mergeDetailed change breakdown
1. Integration ecosystem refactor
This PR lands the app-side part of the larger integration ecosystem reorganization.
Key changes:
../integrations/core../integrations/packages/*integration-corecontracts and shared infrastructure more directlyWhy this matters:
Representative files:
composer.jsoncomposer.lockapp/Http/Controllers/Api/IntegrationController.phpapp/Models/IntegrationSetting.phpapp/Models/McpServer.phpapp/Services/IntegrationSettingCredentialResolver.phpapp/Services/Mcp/McpServerRegistrar.phpapp/Services/Mcp/McpToolProvider.phpconfig/integrations.phproutes/api.phpdatabase/migrations/2026_04_05_000001_add_multi_account_to_integration_settings.php2. Runtime memory-alignment pipeline
This PR also lands the runtime memory work that makes prompt construction and context pressure handling much more explicit.
New memory/runtime pieces include:
ContextBudgetContextPrunerPromptFrameBuilderToolResultDeduplicatorOutputTruncatorCompactionPlanCompactionMemoryExtractorExisting memory services were updated to use that pipeline more coherently:
ConversationCompactionServiceMemoryFlushServiceModelContextRegistryOpenCompanyAgentOther support changes include:
config/memory.phpWhy this matters:
Representative files:
app/Agents/OpenCompanyAgent.phpapp/Jobs/AgentRespondJob.phpapp/Jobs/ExecuteAgentTaskJob.phpapp/Jobs/RunAutomationJob.phpapp/Listeners/CheckpointToolCall.phpapp/Services/Memory/*config/memory.phpdatabase/migrations/2026_04_09_120000_add_compaction_failure_tracking_to_conversation_summaries_table.phptests/Unit/ContextPrunerTest.phptests/Unit/OutputTruncatorTest.phptests/Unit/PromptFrameBuilderTest.phptests/Unit/ToolResultDeduplicatorTest.php3. Provider and gateway runtime alignment
Because the two branches touched provider wiring from different angles, this PR also contains the merged runtime/provider alignment work.
What changed:
AiManagerprovider wiring is overridden so providers run through prompt-cache-aware Prism gateway behaviorDynamicProviderResolverwas fixed after the merge so built-in providers such asanthropicandopenairesolve through the built-in path before relay classificationcomposer.lockwas refreshed so the integration path repositories point to the real../integrations/...paths instead of the oldertmp/integrations/...pathsWhy this matters:
composer installon the merged branch failsRepresentative files:
app/Providers/AppServiceProvider.phpapp/Agents/Providers/DynamicProviderResolver.phpapp/Agents/Providers/GlmPrismGateway.phpapp/Agents/Providers/CodexPrismGateway.phpcomposer.locktests/Feature/DynamicProviderResolverTest.php4. Tool-call and tool-result history regression follow-up
The runtime-memory branch exposed an important conversion problem in the Laravel AI -> Prism bridge used by the caching gateway path: assistant tool calls and tool-result messages were not being preserved the way the merged runtime now expects.
In this repo, that follow-up is represented by:
tests/Unit/PrismMessagesTest.phpWhy this matters:
Important note:
prism-relaybridge behavior is aligned in the path dependency used during development5. Lua/runtime documentation alignment
This PR includes a broad documentation refresh around the integration ecosystem, runtime alignment, and Lua/tooling docs.
What changed:
docs/ecosystem/tree was addedWhy this matters:
Representative files:
docs/architecture/kosmokrator-reuse-audit.mddocs/architecture/runtime-alignment-implementation-audit.mddocs/ecosystem/**docs/planning/kosmokrator-runtime-alignment-checklist.mddocs/planning/memory-implementation.mddocs/testing/qa-strategy.mddocs/external-channel-sync.mdresources/lua-docs/_overview.md6. Repo guidance cleanup
The repo guidance files were normalized and simplified.
What changed:
AGENTS.mdwas added in mirrored form withCLAUDE.mdOC-1investigation pointerWhy this matters:
Representative files:
AGENTS.mdCLAUDE.mdConflict resolution and dev-branch follow-up work
This branch is not a raw merge of the two parent branches. It includes explicit merge conflict resolution and follow-up fixes made on
dev.The most important overlap points were:
The
devbranch then added two important follow-up fixes:Validation
What I validated on the merged branch:
Executed:
vendor/bin/phpunit tests/Unit/PrismMessagesTest.php tests/Feature/DynamicProviderResolverTest.phpResult:
OK (7 tests, 21 assertions)Additional context:
devbranch is the integrated result of those validations, not just the direct union of the two source branchesRisks and review guidance
This is a large integration PR. Review it by area rather than trying to read it as one flat diff.
Suggested review order:
Specific risks to keep in mind:
../integrationsmonorepo structurePost-merge impact
If merged,
maingains:Superseded PRs
This PR is intended to replace and close: