Expose a cached agent model and configuration discovery API

オープン
#1,786 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
rust, typescript

調査の方向性

ファイルやテストパスは指定されていません。まず、Rust、TypeScript、および actor ベースの実装全体で、既存の disposable probe と session のライフサイクルを追跡してください。一覧にある受け入れテストを完了の定義として使用し、重複排除、キャッシュ、構造化された失敗、およびクリーンアップの分離を含めてください。

索引モデルが issue の本文から書いたものです。

説明

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/new timeout, adapter exit, and invalid package/configuration.
  • Allow explicit invalidation/refresh while making cached reads cheap.
  • Preserve the full stable ACP configOptions shape, 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/new timeout 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.

主要言語
Rust
スター
4.8k
フォーク
275
平均マージ
13時間 12分
マージ済み PR(30日)
51

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rivet-dev/agentos のほかの issue

rivet-dev/agentos の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。