Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectedEntry ¶
type ConnectedEntry struct {
ExeID string `json:"exe_id"`
Name string `json:"name"`
Description string `json:"description"`
IsDefault bool `json:"is_default"`
LastSeenAt string `json:"last_seen_at,omitempty"`
}
ConnectedEntry mirrors the JSON shape codex-exec-gateway's /api/exec-gateway/connected returns. Exported so in-process callers (sdk.Server) can supply a Fetcher closure that returns these without the resolver round-tripping through HTTP. Per v0.54.0, exe_id is returned by the API but stripped from anything we send to the LLM.
type Fetcher ¶
type Fetcher func(ctx context.Context) ([]ConnectedEntry, error)
Fetcher returns the current connected-executor set. Used by callers that already have the list in-process (codex-exec-gateway's SDK layer); HTTP-mode callers (codex-app-gateway) still use NewResolver.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver maintains a workspace-scoped name → exe_id map by periodically refreshing from app-gateway's /internal/connected. Tools that take an environment_id (semantically a name) call Resolve to get the underlying exe_id for bridge.Pool.Get.
Cache strategy:
- First Resolve populates the cache.
- Subsequent Resolves use the cache if its age is under cacheTTL.
- A Resolve miss forces an immediate refresh before erroring.
func NewResolver ¶
func NewResolverWithFetcher ¶
NewResolverWithFetcher constructs a Resolver that calls fetch instead of making an HTTP request. Use this from in-process callers that have the connected list directly (codex-exec-gateway SDK layer) to avoid a loopback HTTP hop and the associated workspace cap-token plumbing.