feat: multi-tenant server with path-based routing and task isolation#19
Open
zeroasterisk wants to merge 1 commit intoactioncard:mainfrom
Open
feat: multi-tenant server with path-based routing and task isolation#19zeroasterisk wants to merge 1 commit intoactioncard:mainfrom
zeroasterisk wants to merge 1 commit intoactioncard:mainfrom
Conversation
- A2A.Plug.MultiTenant: path-based /:tenant/:agent/* routing - A2A.TaskStore.ETS.tenant_ref/2: tenant-namespaced ETS keys for isolation - Task isolation: tenant A cannot see tenant B's tasks - Per-tenant agent card URLs - Registry-based or static agent map lookup - Backward compatible: single-tenant A2A.Plug unchanged - 11 ETS tenant tests + 15 multi-tenant plug tests
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.
Part of #13 (A2A v1.0 Protocol Support)
Adds an optional
A2A.Plug.MultiTenantfor multi-tenant A2A deployments with path-based routing and per-tenant task isolation.Changes
New:
A2A.Plug.MultiTenant(lib/a2a/plug/multi_tenant.ex)/:tenant/:agent/*pathto the correct agent processconn.assigns(:a2a_tenant,:a2a_agent_name)base_urlfor agent cards (e.g.,http://host/acme/echo)tenant_idinto task metadata viaA2A.Plug.put_metadata/2A2A.Registry-based dynamic lookupA2A.Plug— no duplication of JSON-RPC handlingUpdated:
A2A.TaskStore.ETS(lib/a2a/task_store/ets.ex)tenant_ref/2function creates namespaced store referencesget,put,delete,list,list_all) support tenant-scoped refsTests (24 new, 413 total, 0 failures)
Design Decisions
A2A.Plugusage is completely unchangedMultiTenantwrapsA2A.Plug, doesn't replace itFixes part of #13