Expose a cached agent model and configuration discovery API
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.6k
- Forks
- 251
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 34
Description
Problem
AgentOS callers can discover an ACP agent's models and configuration options only by creating a complete disposable session. That makes catalog discovery pay the full adapter spawn, ACP initialize, and session/new cost, and it couples a metadata request to session resources and credentials.
The current probe lifecycle also closes the disposable session without an awaited teardown boundary. A failed or slow probe can leave an adapter process, pending I/O, or VM resources behind and race a real foreground session for the same harness.
GigaCode has had to implement background catalog refresh, probe serialization, cached/default catalogs, per-harness configuration preparation, startup progress, and probe isolation around this lower-level behavior. Provider-response shaping belongs in GigaCode, but the expensive discovery lifecycle does not.
Proposed API
Expose a standard high-level operation that returns the agent's metadata and configuration catalog without requiring every caller to manage a disposable session, conceptually:
discoverAgentCatalog({
agent,
environment,
configuration,
software,
}) -> {
agentInfo,
models,
configOptions,
capabilities,
fingerprint,
source: "fresh" | "cache",
}
The exact name and shape should follow AgentOS conventions.
Required semantics
- Cache results by an AgentOS-owned fingerprint of the agent package plus configuration inputs that affect the advertised catalog.
- Deduplicate concurrent discovery for the same fingerprint.
- Keep discovery isolated from foreground sessions and their live adapter processes.
- If an adapter session is required internally, await its complete teardown before resolving.
- On failure, leave no adapter process, session record, prompt/event pump, or VM resource behind.
- Return structured stage errors such as adapter spawn failure, ACP initialize timeout,
session/newtimeout, adapter exit, and invalid package/configuration. - Allow explicit invalidation/refresh while making cached reads cheap.
- Preserve the full stable ACP
configOptionsshape, including model and thought/reasoning selectors. - Provide equivalent Rust, TypeScript, and actor-backed behavior.
Acceptance tests
- Two concurrent calls for one fingerprint launch at most one probe.
- A cached call creates no adapter process and performs no ACP bootstrap.
- A package/configuration fingerprint change causes one fresh discovery.
- Successful and failed fresh discovery both leave process/session counts at baseline after return.
- An initialize or
session/newtimeout reports its real structured stage and performs awaited cleanup. - Manual invalidation forces a fresh result without affecting a foreground session.
Outcome
Products can render a model/configuration catalog without owning ACP probe sessions, retry actors, or cleanup workarounds, while retaining their own provider-specific response shaping and refresh UX.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or test paths are named. Start by tracing the existing disposable probe and session lifecycle across the Rust, TypeScript, and actor-backed implementations. Use the listed acceptance tests as the definition of done, including deduplication, caching, structured failures, and cleanup isolation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, typescript
- Domain
- backend, backend-api-design, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100