feat(agent): downloader.list 能力与汇报计数规则(FIX-7)
智能体原先只能从 site.list 推断下载器,会把没看到汇报成下载器不在系统内。 新增只读能力 downloader.list(下载器与媒体服务器、连通状态、管理的任务数); 原因码表补能力错误、下载盘判定、站点登录与待处理类型,带分类前缀的码按后半段查; 汇报格式加「数量以工具返回为准」。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
68f53390f6
commit
1b22bb5131
12 files changed
+163
-9
No files matched your search
@@ -320,6 +320,37 @@ export const DownloadInspectOutput = z.object({
|
||||
otherMatches: z.array(Id),
|
||||
});
|
||||
|
||||
/** downloader.list(FIX-7):已配置的下载器与媒体服务器(只读本地记录,不含地址和凭证) */
|
||||
export const DownloaderListInput = z.object({
|
||||
includeDisabled: z.boolean().default(true),
|
||||
});
|
||||
const InstanceHealth = z.enum(["unknown", "healthy", "degraded", "offline"]);
|
||||
export const DownloaderListOutput = z.object({
|
||||
downloaders: z.array(
|
||||
z.object({
|
||||
id: Id,
|
||||
name: z.string(),
|
||||
kind: z.string(),
|
||||
enabled: z.boolean(),
|
||||
healthStatus: InstanceHealth,
|
||||
lastSeenAt: z.string().nullable(),
|
||||
version: z.string().nullable(),
|
||||
/** 本工具管理、未移除的下载任务 */
|
||||
tasks: z.object({ total: NonNegInt, active: NonNegInt, failed: NonNegInt }),
|
||||
}),
|
||||
),
|
||||
mediaServers: z.array(
|
||||
z.object({
|
||||
id: Id,
|
||||
name: z.string(),
|
||||
kind: z.string(),
|
||||
enabled: z.boolean(),
|
||||
healthStatus: InstanceHealth,
|
||||
lastSeenAt: z.string().nullable(),
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
// ── 子代理(W7-B) ──
|
||||
|
||||
/** 子会话预算:缺省按父会话剩余预算的一半划拨;超过剩余预算直接拒绝 */
|
||||
@@ -842,6 +873,7 @@ export const CAPABILITY_IO = {
|
||||
"subscription.list": { input: SubscriptionListInput, output: SubscriptionListOutput },
|
||||
"decision.list": { input: DecisionListInput, output: DecisionListOutput },
|
||||
"download.inspect": { input: DownloadInspectInput, output: DownloadInspectOutput },
|
||||
"downloader.list": { input: DownloaderListInput, output: DownloaderListOutput },
|
||||
"agent.spawn": { input: AgentSpawnInput, output: AgentSpawnOutput },
|
||||
"agent.await": { input: AgentAwaitInput, output: AgentAwaitOutput },
|
||||
"site.list": { input: SiteListInput, output: SiteListOutput },
|
||||
@@ -918,6 +950,8 @@ export type DecisionListInput = z.infer<typeof DecisionListInput>;
|
||||
export type DecisionListOutput = z.infer<typeof DecisionListOutput>;
|
||||
export type DownloadInspectInput = z.infer<typeof DownloadInspectInput>;
|
||||
export type DownloadInspectOutput = z.infer<typeof DownloadInspectOutput>;
|
||||
export type DownloaderListInput = z.infer<typeof DownloaderListInput>;
|
||||
export type DownloaderListOutput = z.infer<typeof DownloaderListOutput>;
|
||||
export type AgentSpawnInput = z.infer<typeof AgentSpawnInput>;
|
||||
export type AgentSpawnOutput = z.infer<typeof AgentSpawnOutput>;
|
||||
export type AgentAwaitInput = z.infer<typeof AgentAwaitInput>;
|
||||
|
||||
Reference in new issue
Block a user