/** * CityHTTP:在一个 HTTP Server 上暴露 City 持有的全部 Agent。 * * 每个执行作用域固定挂载到 `/agents//workspaces/`。 * `RemoteAgent`,transport 只负责路由,不复制 Agent 或 Session 状态。 */ import { Hono } from "hono"; import type { City } from "../../runtime/City.js"; import { type AgentHttpServerHandle } from "./AgentHTTP.js"; import type { CityHttpRuntimeOptions } from "../types/CityHttpRuntime.js"; import type { AgentHttpBinding, AgentHttpListenOptions } from "../types/AgentHttpBinding.js"; /** 在单一 HTTP 端口暴露 City 的多 Agent transport。 */ export declare class CityHTTP { private readonly city; private readonly runtime_options; private readonly routers_by_workspace; private readonly extension_disposers; /** 每个 Agent 路由装配与释放的独立串行链。 */ private readonly agent_operation_chains; private cached_router; private cached_server; constructor(city: City, runtime_options?: CityHttpRuntimeOptions); /** 返回按 Agent ID 分区的 Hono Router。 */ router(): Hono; /** 返回 City 级 HTTP Server 句柄。 */ server(): AgentHttpServerHandle; /** 监听 City 级 HTTP 端口。 */ listen(options: AgentHttpListenOptions): Promise; /** 返回当前监听绑定;尚未监听时返回 null。 */ binding(): AgentHttpBinding | null; /** 幂等关闭独立启动的 HTTP Server。 */ close(): Promise; /** 立即释放指定 Agent 的宿主扩展并清除路由缓存。 */ detach_agent(agent_id_input: string): Promise; /** 释放一个 WorkspaceEntry 路由对应的宿主扩展。 */ private detach_route; /** 按请求中的 Agent ID 动态选择子路由,保证运行中新增 Agent 立即可见。 */ private dispatch_workspace; /** 串行解析或创建指定 Agent 的唯一 Router。 */ private resolve_workspace_router; /** 按 Agent ID 串行执行路由装配或释放,并在完成后清理空闲链。 */ private enqueue_agent_operation; } //# sourceMappingURL=CityHTTP.d.ts.map