Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: keep hookPayloadDir JSDoc adjacent to its function (#12907)

Adam Eivy46cd4c034578
diff --git a/server/services/agentFinalization.js b/server/services/agentFinalization.js
index 08d4054220..0680b18b25 100644
--- a/server/services/agentFinalization.js
+++ b/server/services/agentFinalization.js
@@ -2050,11 +2050,6 @@ async function publishAppSnapshotFileAfterAudit(appId) {
}
}
-/**
- * Where a hook's `.agent-done` payload may be read from. A live completion falls
- * back to the task's repoPath; a recovery run trusts only the persisted
- * workspace — without it there is nothing safe to read, so no payload.
- */
// A run is a clean baseline only when it succeeded, recorded its assessment and
// that assessment verified no material finding (worstSeverity 0) from a real
// scan; anything else drops the baseline so the next launch runs.
@@ -2076,6 +2071,11 @@ async function recordInputGateBaseline({ task, taskType, agentId, success, audit
});
}
+/**
+ * Where a hook's `.agent-done` payload may be read from. A live completion falls
+ * back to the task's repoPath; a recovery run trusts only the persisted
+ * workspace — without it there is nothing safe to read, so no payload.
+ */
function hookPayloadDir({ task, workspacePath, recovery }) {
return recovery
? (workspacePath || null)