psyclaw 0.30.15 → 0.30.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2573,6 +2573,7 @@ function groupFiles(files) {
2573
2573
  "核心文档": ordered.filter(path => priority.includes(path)),
2574
2574
  "Export 导出结果": ordered.filter(path => path.startsWith("outputs/")),
2575
2575
  "论文与报告": ordered.filter(path => /^(paper|docs)\//.test(path) && !priority.includes(path)),
2576
+ "分析报告与核查": ordered.filter(path => path.startsWith("analysis/results/")),
2576
2577
  "研究记录": ordered.filter(path => /^(notes|logs)\//.test(path) && !priority.includes(path))
2577
2578
  };
2578
2579
  }
@@ -36,7 +36,7 @@ import { arsRoot } from "../../ars/pi-panel-executor.js";
36
36
  import { ArsModeEditor, isArsModeEditorText } from "../../ars/mode-editor.js";
37
37
  import { MODE_STATUS, detectChatModeMismatch, formatChatModeMismatchNotice, nextSessionMode, parseSessionMode, sessionModePrompt, } from "../../session/modes.js";
38
38
  import { continuouslyWorkWarningText, isContinuouslyWorkEnabled, } from "../../session/continuously-work.js";
39
- import { assertHumanVerifyGate, formatVerifyChecklist, isNaturalPlanConfirm, isPlanRitualConfirm, PLAN_RITUAL_PHRASE, ensureDefaultVerifyChecklist, loadVerifyChecklist } from "../../verify/checklist.js";
39
+ import { assertHumanVerifyGate, formatVerifyChecklist, isNaturalPlanConfirm, isPlanRitualConfirm, PLAN_RITUAL_PHRASE, ensureDefaultVerifyChecklist, loadVerifyChecklist, recordHumanVerification } from "../../verify/checklist.js";
40
40
  import { formatSessionHelp, formatSessionHelpBrief } from "../../session/help.js";
41
41
  import { openResearchWorkbench } from "../../panel/workbench.js";
42
42
  import { captureAgentError, extractPiGeneration, finishAgentSpan, initNodeObservability, lastPiGeneration, readTelemetryPreference, shutdownObservability, startAgentSpan, trackGateWaiting, trackLlmGeneration, trackSkillInstall, withAgentSpan, writeTelemetryPreference, } from "../../observability/index.js";
@@ -1330,6 +1330,25 @@ export default function psyclawExtension(pi) {
1330
1330
  }
1331
1331
  const mode = arsModeEditor?.getMode() ?? sessionMode;
1332
1332
  const trimmed = event.text.trim();
1333
+ // A direct user statement is a valid human-review route when Panel is unavailable.
1334
+ // Do not infer approval from assistant output, quoted text, or a question about verification.
1335
+ if (/^我(?:已核验|已核实|已审阅并确认|核验了)(?:分析报告|论文定稿)?[。!!]?$/u.test(trimmed)) {
1336
+ const scope = trimmed.includes("论文定稿") ? "academic-finalize"
1337
+ : trimmed.includes("分析报告") ? "analysis-complete"
1338
+ : mode === "academic" ? "academic-finalize" : mode === "analysis" ? "analysis-complete" : undefined;
1339
+ if (!scope || !(await readActiveProject(ctx.cwd))) {
1340
+ ctx.ui.notify("请先进入已初始化项目的 analysis 或 academic 模式,或明确说「我已核验分析报告」/「我已核验论文定稿」。", "warning");
1341
+ return { action: "handled" };
1342
+ }
1343
+ try {
1344
+ await recordHumanVerification(ctx.cwd, scope, trimmed);
1345
+ ctx.ui.notify(`已记录用户人审确认(${scope});不会自动将分析标为完成或交接。`, "info");
1346
+ }
1347
+ catch (error) {
1348
+ ctx.ui.notify(`人审记录失败:${error instanceof Error ? error.message : String(error)}`, "error");
1349
+ }
1350
+ return { action: "handled" };
1351
+ }
1333
1352
  // Chat must not soft-takeover; when intent fits analysis/academic, remind only.
1334
1353
  if (mode === "chat") {
1335
1354
  const mismatch = detectChatModeMismatch(trimmed);