feat(server): gate scheduling, search and login by site capabilities (IA-2)

- snapshots only for sites with list; feed polling only for RSS kinds;
  user data / health checks only for sites with login; search site set
  only includes searchable sites; live search / snapshot skip with
  reason unsupported instead of hitting the site
- refresh-login / credentials need login, manual snapshot needs list (400)
- POST /sites accepts kind and rssUrl (site + feed in one transaction,
  key generated from host); RSS belongs to a site: feeds created without
  siteId go to the same-host custom RSS source site, siteId cannot be
  cleared
- fix: secret name clash when a site gets a second default-named feed
- command palette regrouped; agent site.list returns kind and
  capabilities; system prompt notes RSS lives under sites

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-30 00:29:56 +08:00
1 parent 89d2c81de6
commit ec65435328
15 files changed
+486 -80

No files matched your search

+1
View File
@@ -84,6 +84,7 @@ export function buildSystemPrompt({
'检索词要有意义:写作品名、别名或关键词;不要用空串、单个字母或通配符(如 query:"a"、"*")探查全表,想盘点就用对应的列表能力(inventory.query 不带 query、subscription.list、decision.list)。',
'参数按工具 schema 的类型填写:ID 类参数一律是字符串(如 externalId:"693134",不是数字 693134);不要传 schema 里没有的字段。',
"业务任务 ID 用 task.inspect,下载任务 ID 或种子 hash 用 download.inspect,两者不要混用。",
"站点分类型:PT 站、公开 BT 站、自定义 RSS 源;RSS 属于站点(在站点详情的 RSS 里管理),没有单独的 RSS 页。能不能搜索、抓列表、登录看 site.list 返回的获取方式,不支持的不要去试。",
"思考、步骤说明和汇报都用中文;引用文件名、原站标题时保持原文。",
"工具结果里出现【预算提醒】时立刻停止探查,直接用中文写小结;被预算或中止打断时,汇报只写中文小结(已完成什么、证据、还缺什么),不要复述中间过程或下一步打算。",
];
@@ -72,3 +72,12 @@ describe("工作方式(AGUI-3)", () => {
expect(interactionRules({ options: true, proposeFirst: true }).join("\n")).toContain("本会话要求先看方案再执行");
});
});
describe("站点类型(IA-2)", () => {
it("RSS 属于站点,没有单独的 RSS 页;按获取方式判断能不能搜索 / 登录", () => {
const p = userPrompt();
expect(p).toContain("RSS 属于站点");
expect(p).toContain("没有单独的 RSS 页");
expect(p).toContain("自定义 RSS 源");
});
});
+1 -1
View File
@@ -357,7 +357,7 @@ export const CAPABILITY_CATALOG: Record<KnownCapabilityId, CapabilityDescriptor>
"site.list": d(
"site.list",
"列出站点",
"列出已登记站点的健康、登录状态与账号摘要(不含凭证)。排查站点问题或确认站点可用时用",
"列出已登记站点的类型(PT 站 / 公开 BT 站 / 自定义 RSS 源)、可用的获取方式、健康、登录状态与账号摘要(不含凭证)。RSS 属于站点:自定义 RSS 源也是一种站点。排查站点或 RSS 问题、确认站点能不能搜索时用",
"read",
"SiteList",
"read",