Repository navigation
feat: add contact book and agent discovery hooks - #153
Open
yarolegovich wants to merge 1 commit into
Open
yarolegovich wants to merge 1 commit into
yarolegovich wants to merge 1 commit into
Conversation
Keep trusted agents in an AI Catalog owned by a2a-cli and register it in the shared ai-catalog store, so other tools see contacts too. Tell coding agents about contacts and about agents discovered on sites mentioned in the conversation through harness hooks. - a2a contact add/remove/get/list; add accepts any -a reference and copies catalog entries with their identifier, publisher and trust manifest - -a <name> resolves a contact, and a contact's identifier takes precedence over registered catalogs - hidden a2a hook / hook probe for SessionStart, UserPromptSubmit and PostToolBatch, shipped in the agent plugin Fixes #138
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.
Stacked on #152; review only the last commit.
a2a contact add/remove/get/list. The contact book is an AI Catalog at~/.config/a2a-cli/catalog.jsonthat only a2a-cli writes, registered in the shared~/.ai-catalogstore asa2a-contactsafter every change, soai-catalog search/showsees contacts. If the store can't be updated, the contact is still saved and a2a warns.contact addaccepts anything-aaccepts (host, card URL, file, catalog identifier,--catalog <name|url>, a single-agent catalog URL). Catalog entries are copied as listed, with identifier, publisher and trust manifest, so signatures stay verifiable; a relative entry URL is made absolute. A plain card getsurn:ai-catalog:a2a-cli:<name>. The name and note live under theorg.a2aproject.a2a-clientry extension.-a <name>resolves a contact, and a contact's identifier takes precedence over registered catalogs, so an identifier that's ambiguous across catalogs resolves once it's a contact. The registered copy of the contact book is skipped in those lookups.a2a hookanda2a hook probe, and the agent plugin shipshooks/hooks.jsonforSessionStart,UserPromptSubmitandPostToolBatch. The hook injects contacts and agents discovered on sites in the conversation, never entries of registered catalogs; the skill points agents toa2a catalog searchfor those.HTTPS_PROXY/NO_PROXY(best-effort check on the locally resolved target), connection failures, 5xx and 429 aren't cached as misses, a JSON document without a name and interface isn't treated as a card, injected text drops Unicode control and bidi characters, and contacts and discovered blocks are capped so one event stays under the 10,000-character hook limit.internal/atomicfile, used by the AI Catalog store, the contact book, the card cache and session state.Fixes #138