@edihasaj/recall 0.5.8 → 0.6.0
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/{chunk-K5FZ47NN.js → chunk-7XCLKPJ3.js} +6 -8
- package/dist/{chunk-K5FZ47NN.js.map → chunk-7XCLKPJ3.js.map} +1 -1
- package/dist/{chunk-A5UIRZU6.js → chunk-A6XEULA4.js} +3 -2
- package/dist/chunk-A6XEULA4.js.map +1 -0
- package/dist/{chunk-F56Y3SHS.js → chunk-E4HJDGCW.js} +7 -9
- package/dist/{chunk-F56Y3SHS.js.map → chunk-E4HJDGCW.js.map} +1 -1
- package/dist/{chunk-IILLSHLM.js → chunk-KAGIAOD7.js} +2583 -84
- package/dist/chunk-KAGIAOD7.js.map +1 -0
- package/dist/{chunk-FHKV6ELT.js → chunk-MJ4GGBTL.js} +11 -13
- package/dist/{chunk-FHKV6ELT.js.map → chunk-MJ4GGBTL.js.map} +1 -1
- package/dist/{chunk-LVQW6WHK.js → chunk-XUM7JEJU.js} +2 -2
- package/dist/{cleanup-TVOX2S2S.js → cleanup-MYSQ44EP.js} +4 -4
- package/dist/cli.js +206 -33
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +60 -49
- package/dist/daemon.js.map +1 -1
- package/dist/dispatcher-SUUX5AX6.js +16 -0
- package/dist/mcp.js +5 -5
- package/dist/{quality-Z7LPMMBC.js → quality-YTQKAEY6.js} +3 -3
- package/dist/{tasks-UOLSPXJQ.js → tasks-GSQUHD4F.js} +6 -3
- package/dist/{usage-CY3V72YN.js → usage-DU4TKVJH.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-A5UIRZU6.js.map +0 -1
- package/dist/chunk-GC5XMBG4.js +0 -551
- package/dist/chunk-GC5XMBG4.js.map +0 -1
- package/dist/chunk-IILLSHLM.js.map +0 -1
- package/dist/chunk-VEPXEHRZ.js +0 -1763
- package/dist/chunk-VEPXEHRZ.js.map +0 -1
- package/dist/dispatcher-UGMU6THT.js +0 -15
- /package/dist/{chunk-LVQW6WHK.js.map → chunk-XUM7JEJU.js.map} +0 -0
- /package/dist/{cleanup-TVOX2S2S.js.map → cleanup-MYSQ44EP.js.map} +0 -0
- /package/dist/{dispatcher-UGMU6THT.js.map → dispatcher-SUUX5AX6.js.map} +0 -0
- /package/dist/{quality-Z7LPMMBC.js.map → quality-YTQKAEY6.js.map} +0 -0
- /package/dist/{tasks-UOLSPXJQ.js.map → tasks-GSQUHD4F.js.map} +0 -0
- /package/dist/{usage-CY3V72YN.js.map → usage-DU4TKVJH.js.map} +0 -0
package/dist/daemon.js
CHANGED
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
computeQualityReport,
|
|
3
3
|
listQualitySnapshots,
|
|
4
4
|
recordQualitySnapshot
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XUM7JEJU.js";
|
|
6
6
|
import {
|
|
7
7
|
ensureDailyBackup,
|
|
8
8
|
handlePromptHook,
|
|
9
9
|
handleSessionEndHook,
|
|
10
10
|
handleSessionStartHook,
|
|
11
11
|
handleToolHook
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7XCLKPJ3.js";
|
|
13
13
|
import {
|
|
14
14
|
createRecallMcpServer
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MJ4GGBTL.js";
|
|
16
16
|
import {
|
|
17
17
|
bootstrapHistoryEmbeddings,
|
|
18
18
|
compileContext,
|
|
@@ -53,34 +53,28 @@ import {
|
|
|
53
53
|
updateHistorySnippet,
|
|
54
54
|
verifyHistoryEmbeddings,
|
|
55
55
|
writeRepoContextArtifact
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-E4HJDGCW.js";
|
|
57
57
|
import {
|
|
58
|
+
DEFAULT_ENQUEUE_CONFIG,
|
|
58
59
|
autoResolveContradictions,
|
|
60
|
+
bootstrapEmbeddings,
|
|
59
61
|
computeAllHealthScores,
|
|
60
62
|
computeHealthScore,
|
|
63
|
+
confirmMemory,
|
|
61
64
|
detectContradictions,
|
|
62
65
|
detectCorrections,
|
|
63
|
-
|
|
64
|
-
listContradictions,
|
|
65
|
-
processCorrection,
|
|
66
|
-
processReviewFeedback,
|
|
67
|
-
resolveContradiction,
|
|
68
|
-
runDeterministicCleanup
|
|
69
|
-
} from "./chunk-VEPXEHRZ.js";
|
|
70
|
-
import {
|
|
71
|
-
dispatchPendingTasks
|
|
72
|
-
} from "./chunk-GC5XMBG4.js";
|
|
73
|
-
import {
|
|
74
|
-
DEFAULT_ENQUEUE_CONFIG,
|
|
75
|
-
bootstrapEmbeddings,
|
|
76
|
-
confirmMemory,
|
|
66
|
+
dispatchPendingTasks,
|
|
77
67
|
enqueueMaintenanceTasks,
|
|
78
68
|
ensureEmbeddingProviderReady,
|
|
79
69
|
getAuditTrail,
|
|
80
70
|
getEmbeddingModelInfo,
|
|
81
71
|
getMemory,
|
|
82
72
|
getRecentAudit,
|
|
73
|
+
getRepoQualityProfile,
|
|
74
|
+
listContradictions,
|
|
83
75
|
loadEmbeddingConfigFromEnv,
|
|
76
|
+
processCorrection,
|
|
77
|
+
processReviewFeedback,
|
|
84
78
|
promoteMemory,
|
|
85
79
|
queryMemories,
|
|
86
80
|
queueMemoryEmbeddingSync,
|
|
@@ -88,17 +82,19 @@ import {
|
|
|
88
82
|
recordAuditWithSnapshot,
|
|
89
83
|
recordFeedback,
|
|
90
84
|
rejectMemory,
|
|
85
|
+
resolveContradiction,
|
|
91
86
|
rollbackMemory,
|
|
87
|
+
runDeterministicCleanup,
|
|
92
88
|
statusFromConfidence,
|
|
93
89
|
verifyEmbeddings
|
|
94
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-KAGIAOD7.js";
|
|
95
91
|
import {
|
|
96
92
|
activityEvents,
|
|
97
93
|
feedbackEvents,
|
|
98
94
|
historySnippets,
|
|
99
95
|
implicitSignals,
|
|
100
96
|
memories
|
|
101
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-A6XEULA4.js";
|
|
102
98
|
import {
|
|
103
99
|
hasProviderConfigured,
|
|
104
100
|
init_keychain
|
|
@@ -698,38 +694,49 @@ function scheduleMaintenanceLoop() {
|
|
|
698
694
|
timer.unref?.();
|
|
699
695
|
}
|
|
700
696
|
var dispatcherDormantLogged = false;
|
|
701
|
-
function
|
|
702
|
-
if (
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
console.log("[recall] dispatcher dormant: no LLM provider configured (set one via 'recall maintenance credentials set <provider> <key>'; preview prompts via 'recall maintenance dispatch --preview')");
|
|
709
|
-
dispatcherDormantLogged = true;
|
|
710
|
-
}
|
|
711
|
-
return;
|
|
697
|
+
async function runDispatcherOnce() {
|
|
698
|
+
if (dispatcherRunning) return;
|
|
699
|
+
const hasKey = hasProviderConfigured("anthropic") || hasProviderConfigured("azure-openai") || hasProviderConfigured("openai");
|
|
700
|
+
if (!hasKey) {
|
|
701
|
+
if (!dispatcherDormantLogged) {
|
|
702
|
+
console.log("[recall] dispatcher dormant: no LLM provider configured (set one via 'recall maintenance credentials set <provider> <key>'; preview prompts via 'recall maintenance dispatch --preview')");
|
|
703
|
+
dispatcherDormantLogged = true;
|
|
712
704
|
}
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
const message = error instanceof Error ? error.stack ?? error.message : String(error);
|
|
726
|
-
console.error(`[recall] dispatcher failed: ${message}`);
|
|
727
|
-
} finally {
|
|
728
|
-
dispatcherRunning = false;
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
dispatcherDormantLogged = false;
|
|
708
|
+
dispatcherRunning = true;
|
|
709
|
+
try {
|
|
710
|
+
const report = await dispatchPendingTasks(db, {
|
|
711
|
+
maxTasks: dispatcherConfig.maxTasksPerRun
|
|
712
|
+
});
|
|
713
|
+
if (report.attempted > 0 || report.applied > 0) {
|
|
714
|
+
console.log(
|
|
715
|
+
`[recall] dispatcher ${report.provider}: attempted=${report.attempted} applied=${report.applied} rejected=${report.rejected} released=${report.released}`
|
|
716
|
+
);
|
|
729
717
|
}
|
|
730
|
-
}
|
|
718
|
+
} catch (error) {
|
|
719
|
+
const message = error instanceof Error ? error.stack ?? error.message : String(error);
|
|
720
|
+
console.error(`[recall] dispatcher failed: ${message}`);
|
|
721
|
+
} finally {
|
|
722
|
+
dispatcherRunning = false;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
var dispatchWakeTimer = null;
|
|
726
|
+
var DISPATCH_WAKE_DEBOUNCE_MS = 3e3;
|
|
727
|
+
function wakeDispatcherDebounced() {
|
|
728
|
+
if (!dispatcherConfig.enabled) return;
|
|
729
|
+
if (dispatchWakeTimer) return;
|
|
730
|
+
dispatchWakeTimer = setTimeout(() => {
|
|
731
|
+
dispatchWakeTimer = null;
|
|
732
|
+
void runDispatcherOnce();
|
|
733
|
+
}, DISPATCH_WAKE_DEBOUNCE_MS);
|
|
734
|
+
dispatchWakeTimer.unref?.();
|
|
735
|
+
}
|
|
736
|
+
function scheduleDispatcherLoop() {
|
|
737
|
+
if (!dispatcherConfig.enabled) return;
|
|
731
738
|
const timer = setInterval(() => {
|
|
732
|
-
void
|
|
739
|
+
void runDispatcherOnce();
|
|
733
740
|
}, Math.max(60, dispatcherConfig.intervalSeconds) * 1e3);
|
|
734
741
|
timer.unref?.();
|
|
735
742
|
}
|
|
@@ -936,6 +943,10 @@ var server = createServer(async (req, res) => {
|
|
|
936
943
|
});
|
|
937
944
|
return send(res, 200, result);
|
|
938
945
|
}
|
|
946
|
+
if (path === "/dispatch/wake" && method === "POST") {
|
|
947
|
+
wakeDispatcherDebounced();
|
|
948
|
+
return send(res, 202, { status: "queued", debounce_ms: DISPATCH_WAKE_DEBOUNCE_MS });
|
|
949
|
+
}
|
|
939
950
|
if (path === "/hook/prompt" && method === "POST") {
|
|
940
951
|
const body = await parseBody(req);
|
|
941
952
|
if (!body.text) {
|