feat(FN-2848): add manual memory dream API trigger
- Add POST /api/memory/dream route that runs project and agent dream processing with AI prompt execution - Expose triggerMemoryDreams() in dashboard legacy API client for direct dream invocation - Switch SettingsModal and useMemoryData Dream Now actions from automation lookup to the new endpoint - Update dashboard route, hook, and settings modal tests to cover success and error handling - Add a patch changeset for @runfusion/fusion documenting the new endpoint and client helper
This commit is contained in:
@@ -632,6 +632,25 @@ export function compactMemory(
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger manual memory dream processing.
|
||||
* Synthesizes daily notes into dreams and promotes durable lessons to long-term memory.
|
||||
*
|
||||
* @param projectId - Optional project ID for multi-project support
|
||||
* @returns Promise resolving to dream processing result
|
||||
*/
|
||||
export function triggerMemoryDreams(projectId?: string): Promise<{
|
||||
success: boolean;
|
||||
summary?: string;
|
||||
dreamsWritten?: boolean;
|
||||
longTermUpdatesWritten?: boolean;
|
||||
error?: string;
|
||||
}> {
|
||||
return api(withProjectId("/memory/dream", projectId), {
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
/** Memory audit report type (mirrors @fusion/core MemoryAuditReport) */
|
||||
export interface MemoryAuditReport {
|
||||
generatedAt: string;
|
||||
|
||||
Reference in New Issue
Block a user