psyclaw 0.31.2 → 0.31.3
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.
- package/dist/src/adapters/pi/extension.js +20 -1
- package/dist/src/adapters/pi/extension.js.map +1 -1
- package/dist/src/analysis/decision-points.d.ts +10 -0
- package/dist/src/analysis/decision-points.js +88 -0
- package/dist/src/analysis/decision-points.js.map +1 -0
- package/dist/src/analysis/method-rules.js +3 -2
- package/dist/src/analysis/method-rules.js.map +1 -1
- package/dist/src/analysis/runtime-tools.js +3 -1
- package/dist/src/analysis/runtime-tools.js.map +1 -1
- package/dist/src/analysis/shell-timeout.d.ts +18 -0
- package/dist/src/analysis/shell-timeout.js +58 -0
- package/dist/src/analysis/shell-timeout.js.map +1 -1
- package/dist/src/observability/config.d.ts +1 -0
- package/dist/src/observability/config.js +3 -1
- package/dist/src/observability/config.js.map +1 -1
- package/dist/src/observability/langfuse.d.ts +15 -4
- package/dist/src/observability/langfuse.js +38 -10
- package/dist/src/observability/langfuse.js.map +1 -1
- package/dist/src/observability/node-sdks.js +16 -4
- package/dist/src/observability/node-sdks.js.map +1 -1
- package/dist/src/observability/public-keys.d.ts +10 -0
- package/dist/src/observability/public-keys.js +10 -0
- package/dist/src/observability/public-keys.js.map +1 -1
- package/dist/src/project/workspace.js +16 -0
- package/dist/src/project/workspace.js.map +1 -1
- package/dist/src/session/modes.js +8 -3
- package/dist/src/session/modes.js.map +1 -1
- package/dist/src/updates/whats-new.d.ts +8 -0
- package/dist/src/updates/whats-new.js +40 -0
- package/dist/src/updates/whats-new.js.map +1 -0
- package/package.json +2 -2
- package/skills/core/analysis-plan/SKILL.md +5 -0
- package/skills/core/method-interactions/SKILL.md +2 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { DefaultPackageManager, getAgentDir, SettingsManager } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { isInstructionResult, isObservationEvidence, maskToolObservationsStable, observationSettledLimit } from "./observation-mask.js";
|
|
3
3
|
import { outputLogFooter, persistToolOutput } from "../../analysis/output-log.js";
|
|
4
|
-
import { applyShellTimeout, isShellTimeout, SHELL_TIMEOUT_HINT } from "../../analysis/shell-timeout.js";
|
|
4
|
+
import { applyShellTimeout, isShellTimeout, SHELL_TIMEOUT_HINT, ShellClock } from "../../analysis/shell-timeout.js";
|
|
5
5
|
import { registerAnalysisRuntimeTools } from "../../analysis/runtime-tools.js";
|
|
6
|
+
import { PSYCLAW_VERSION } from "../../branding.js";
|
|
7
|
+
import { takeWhatsNew } from "../../updates/whats-new.js";
|
|
6
8
|
import { formatDataAccess, loadDataAccess, redactScriptOnlyOutput, scriptOnlyBlock, setDataAccess } from "../../safety/data-access.js";
|
|
7
9
|
import { Type } from "typebox";
|
|
8
10
|
import { appendApproval, approvalInputDigest, assertResearchDecision, bootstrapProject, ensureProjectBinding, hasCanonicalWorkspace, resolveResearchDecision, runInstitutionalFulltext, runLiteratureReview, runExpertReview, runAnalysisDelegation, runWritingReview, runMetaAnalysis, createStageRunner, exportAcademicDocument, recordCitationUse, runParallelPeerReview } from "../../index.js";
|
|
@@ -1344,6 +1346,14 @@ export default function psyclawExtension(pi) {
|
|
|
1344
1346
|
}
|
|
1345
1347
|
catch { /* discovery must not block the session */ }
|
|
1346
1348
|
}
|
|
1349
|
+
if (ctx.hasUI) {
|
|
1350
|
+
try {
|
|
1351
|
+
const notice = await takeWhatsNew(PSYCLAW_VERSION, join(getAgentDir(), "psyclaw-whats-new.json"));
|
|
1352
|
+
if (notice)
|
|
1353
|
+
ctx.ui.notify(notice, "info");
|
|
1354
|
+
}
|
|
1355
|
+
catch { /* the notice must not block the session */ }
|
|
1356
|
+
}
|
|
1347
1357
|
if (isContinuouslyWorkEnabled() && ctx.hasUI) {
|
|
1348
1358
|
ctx.ui.setStatus("cw", "continuously-work");
|
|
1349
1359
|
ctx.ui.notify(continuouslyWorkWarningText(), "error");
|
|
@@ -1590,6 +1600,7 @@ export default function psyclawExtension(pi) {
|
|
|
1590
1600
|
return { messages };
|
|
1591
1601
|
});
|
|
1592
1602
|
let dataAccessWarningShown = false;
|
|
1603
|
+
const shellClock = new ShellClock();
|
|
1593
1604
|
if (!legacyTestApi && typeof pi.on === "function")
|
|
1594
1605
|
pi.on("tool_call", async (event, ctx) => {
|
|
1595
1606
|
// Host-teardown hard block runs even without /init — project approvals do not cover this.
|
|
@@ -1603,6 +1614,7 @@ export default function psyclawExtension(pi) {
|
|
|
1603
1614
|
}
|
|
1604
1615
|
}
|
|
1605
1616
|
applyShellTimeout(event.toolName, event.input);
|
|
1617
|
+
shellClock.start(event.toolName, event.toolCallId, commandText);
|
|
1606
1618
|
try {
|
|
1607
1619
|
const access = await loadDataAccess(ctx.cwd);
|
|
1608
1620
|
if (access.warning && !dataAccessWarningShown) {
|
|
@@ -1670,6 +1682,13 @@ export default function psyclawExtension(pi) {
|
|
|
1670
1682
|
content[timedOutIndex] = { ...timedOut, text: `${timedOut.text}\n${SHELL_TIMEOUT_HINT}` };
|
|
1671
1683
|
changed = true;
|
|
1672
1684
|
}
|
|
1685
|
+
const timing = shellClock.finish(event.toolCallId);
|
|
1686
|
+
const lastText = content.map((part) => part.type).lastIndexOf("text");
|
|
1687
|
+
const last = content[lastText];
|
|
1688
|
+
if (timing && last?.type === "text") {
|
|
1689
|
+
content[lastText] = { ...last, text: `${last.text}\n${timing}` };
|
|
1690
|
+
changed = true;
|
|
1691
|
+
}
|
|
1673
1692
|
if (!isObservationEvidence(event.toolName) && !isInstructionResult(event.toolName)) {
|
|
1674
1693
|
const body = content.filter((part) => part.type === "text").map((part) => part.text).join("\n");
|
|
1675
1694
|
const saved = await persistToolOutput(ctx.cwd, event.toolCallId, body, observationSettledLimit());
|