copy: second-round copy review across console, settings, agent and server messages
- Trim descriptions, empty states, confirm buttons and toasts to facts - Unify terms per glossary: 待处理/待识别/整理记录/运行记录/凭证/子会话/Agent 上游 - Subscription-login termsNote states facts only (borrowed client identity, ToS/ban risk) - Shorter, concrete goal templates for built-in Agent checks - Human-readable nouns instead of table names in instance CRUD errors - Audit labels for pi_upstream / schedule / automation_grant actions - Glossary: add 上游、订阅登录、凭证、定时任务、巡检、运行记录、子会话、停止、持续授权 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c67f6a9682
commit
31a54186c7
58 files changed
+200
-188
No files matched your search
@@ -33,8 +33,8 @@ export const BUILTIN_AGENT_CHECKS: {
|
||||
everyMs: 6 * HOUR,
|
||||
config: {
|
||||
goalTemplate:
|
||||
"巡检待处理中心({{now}}):当前有 {{openDecisions}} 条未关闭事项。逐条查看证据,按紧急程度排序," +
|
||||
"给出每条的处理建议与理由;只读,不执行任何变更。",
|
||||
"巡检待处理({{now}}):有 {{openDecisions}} 条未关闭的待处理事项。逐条查看证据,按紧急程度排序," +
|
||||
"给出处理建议和理由。只读,不做任何变更。",
|
||||
capabilityAllowlist: [...INVESTIGATE_CAPABILITIES],
|
||||
budget: { maxToolCalls: 20, maxDurationSec: 300 },
|
||||
triggerCondition: "open_decisions",
|
||||
@@ -47,7 +47,7 @@ export const BUILTIN_AGENT_CHECKS: {
|
||||
everyMs: 2 * HOUR,
|
||||
config: {
|
||||
goalTemplate:
|
||||
"巡检下载({{now}}):有 {{stalledDownloads}} 个下载无进展或失败。用只读能力查明原因(站点、做种、磁盘、任务错误)," +
|
||||
"巡检下载({{now}}):有 {{stalledDownloads}} 个下载任务无进展或失败。用只读能力查明原因(站点、做种、磁盘、任务错误)," +
|
||||
"给出诊断与建议;若本次允许恢复,只在授权内做重试或强制重新校验,每个任务最多一次,不换源、不删除。",
|
||||
capabilityAllowlist: [...INVESTIGATE_CAPABILITIES],
|
||||
budget: { maxToolCalls: 24, maxDurationSec: 420 },
|
||||
@@ -62,8 +62,8 @@ export const BUILTIN_AGENT_CHECKS: {
|
||||
everyMs: 7 * 24 * HOUR,
|
||||
config: {
|
||||
goalTemplate:
|
||||
"生成本周巡检周报({{date}}):追踪中的订阅 {{activeSubscriptions}} 个。列出缺集的订阅与原因推测、" +
|
||||
"健康异常的站点与 Feed,给出本周建议;只读,最后用一段不超过 300 字的中文汇总。",
|
||||
"生成本周巡检周报({{date}}):追踪中的订阅 {{activeSubscriptions}} 个。列出缺集的订阅及可能原因、" +
|
||||
"健康异常的站点与 Feed,给出本周建议。只读。最后用不超过 300 字的中文汇总。",
|
||||
capabilityAllowlist: [...INVESTIGATE_CAPABILITIES],
|
||||
budget: { maxToolCalls: 30, maxDurationSec: 600 },
|
||||
triggerCondition: "subscriptions_active",
|
||||
@@ -124,7 +124,7 @@ export async function runAgentCheck(ctx: ServerContext, c: JobRunContext): Promi
|
||||
if (grants.length > 0) {
|
||||
mode = "execute";
|
||||
allowlist = [...new Set([...(allowlist.length ? allowlist : INVESTIGATE_CAPABILITIES), ...RECOVER_CAPABILITIES])];
|
||||
} else note = "(没有覆盖恢复动作的有效授权,已降级只读)";
|
||||
} else note = "(没有覆盖恢复动作的有效授权,改为只读)";
|
||||
}
|
||||
const goal = renderGoal(cfg.goalTemplate, c.now, f);
|
||||
const dedupeKey = c.trigger === "manual" ? `schedule:${c.jobId}:manual:${c.runId}` : `schedule:${c.jobId}:${c.slot}`;
|
||||
|
||||
@@ -201,7 +201,7 @@ export async function updateJob(
|
||||
});
|
||||
}
|
||||
if (patch.enabled !== undefined) {
|
||||
if (patch.enabled && !row.available) throw new ApiException("conflict", "该任务未配置,不能开启");
|
||||
if (patch.enabled && !row.available) throw new ApiException("conflict", "任务未配置,不能启用");
|
||||
set.enabled = patch.enabled;
|
||||
set.customized = true;
|
||||
if (patch.enabled && !row.enabled && !set.next_run_at) {
|
||||
@@ -228,7 +228,7 @@ export async function updateJob(
|
||||
/** 立即执行:置 run_requested_at(已在排队或运行中则合并,不重复) */
|
||||
export async function requestRun(db: Kysely<DB>, id: string): Promise<{ row: ScheduledJobRow; queued: boolean }> {
|
||||
const row = await getJob(db, id);
|
||||
if (!row.available) throw new ApiException("conflict", "该任务未配置,不能执行");
|
||||
if (!row.available) throw new ApiException("conflict", "任务未配置,不能执行");
|
||||
const upd = await db
|
||||
.updateTable("scheduled_job")
|
||||
.set({ run_requested_at: sql`now()` })
|
||||
|
||||
Reference in new issue
Block a user