claude-soul-server 0.1.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/engine/context-assembler.d.ts +3 -0
- package/dist/engine/context-assembler.js +161 -0
- package/dist/engine/context-assembler.js.map +1 -0
- package/dist/engine/exemplar-selector.d.ts +6 -0
- package/dist/engine/exemplar-selector.js +21 -0
- package/dist/engine/exemplar-selector.js.map +1 -0
- package/dist/engine/framework-engine.d.ts +61 -0
- package/dist/engine/framework-engine.js +351 -0
- package/dist/engine/framework-engine.js.map +1 -0
- package/dist/engine/framework-renderer.d.ts +17 -0
- package/dist/engine/framework-renderer.js +161 -0
- package/dist/engine/framework-renderer.js.map +1 -0
- package/dist/engine/framework-seeds.d.ts +2 -0
- package/dist/engine/framework-seeds.js +265 -0
- package/dist/engine/framework-seeds.js.map +1 -0
- package/dist/engine/lesson-store.d.ts +8 -0
- package/dist/engine/lesson-store.js +40 -0
- package/dist/engine/lesson-store.js.map +1 -0
- package/dist/engine/meta-optimizer.d.ts +37 -0
- package/dist/engine/meta-optimizer.js +140 -0
- package/dist/engine/meta-optimizer.js.map +1 -0
- package/dist/engine/prompt-builder.d.ts +31 -0
- package/dist/engine/prompt-builder.js +385 -0
- package/dist/engine/prompt-builder.js.map +1 -0
- package/dist/engine/reflection-runner.d.ts +18 -0
- package/dist/engine/reflection-runner.js +313 -0
- package/dist/engine/reflection-runner.js.map +1 -0
- package/dist/engine/shadow-transform.d.ts +1 -0
- package/dist/engine/shadow-transform.js +41 -0
- package/dist/engine/shadow-transform.js.map +1 -0
- package/dist/engine/signal-extractor.d.ts +14 -0
- package/dist/engine/signal-extractor.js +204 -0
- package/dist/engine/signal-extractor.js.map +1 -0
- package/dist/engine/signal-store.d.ts +5 -0
- package/dist/engine/signal-store.js +56 -0
- package/dist/engine/signal-store.js.map +1 -0
- package/dist/engine/snapshot-manager.d.ts +3 -0
- package/dist/engine/snapshot-manager.js +52 -0
- package/dist/engine/snapshot-manager.js.map +1 -0
- package/dist/engine/state-engine.d.ts +34 -0
- package/dist/engine/state-engine.js +127 -0
- package/dist/engine/state-engine.js.map +1 -0
- package/dist/engine/tension-detector.d.ts +10 -0
- package/dist/engine/tension-detector.js +77 -0
- package/dist/engine/tension-detector.js.map +1 -0
- package/dist/engine/token-budget.d.ts +12 -0
- package/dist/engine/token-budget.js +44 -0
- package/dist/engine/token-budget.js.map +1 -0
- package/dist/hooks/on-stop.d.ts +11 -0
- package/dist/hooks/on-stop.js +153 -0
- package/dist/hooks/on-stop.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +171 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/soul-activate.d.ts +1 -0
- package/dist/tools/soul-activate.js +149 -0
- package/dist/tools/soul-activate.js.map +1 -0
- package/dist/tools/soul-context.d.ts +1 -0
- package/dist/tools/soul-context.js +31 -0
- package/dist/tools/soul-context.js.map +1 -0
- package/dist/tools/soul-evaluate.d.ts +8 -0
- package/dist/tools/soul-evaluate.js +97 -0
- package/dist/tools/soul-evaluate.js.map +1 -0
- package/dist/tools/soul-framework.d.ts +1 -0
- package/dist/tools/soul-framework.js +66 -0
- package/dist/tools/soul-framework.js.map +1 -0
- package/dist/tools/soul-read.d.ts +1 -0
- package/dist/tools/soul-read.js +24 -0
- package/dist/tools/soul-read.js.map +1 -0
- package/dist/tools/soul-reflect.d.ts +1 -0
- package/dist/tools/soul-reflect.js +82 -0
- package/dist/tools/soul-reflect.js.map +1 -0
- package/dist/tools/soul-signal.d.ts +8 -0
- package/dist/tools/soul-signal.js +119 -0
- package/dist/tools/soul-signal.js.map +1 -0
- package/dist/tools/soul-status.d.ts +1 -0
- package/dist/tools/soul-status.js +130 -0
- package/dist/tools/soul-status.js.map +1 -0
- package/dist/tools/soul-write.d.ts +1 -0
- package/dist/tools/soul-write.js +26 -0
- package/dist/tools/soul-write.js.map +1 -0
- package/dist/types/config-types.d.ts +45 -0
- package/dist/types/config-types.js +21 -0
- package/dist/types/config-types.js.map +1 -0
- package/dist/types/learning-types.d.ts +166 -0
- package/dist/types/learning-types.js +2 -0
- package/dist/types/learning-types.js.map +1 -0
- package/dist/util/files.d.ts +20 -0
- package/dist/util/files.js +54 -0
- package/dist/util/files.js.map +1 -0
- package/dist/util/llm.d.ts +6 -0
- package/dist/util/llm.js +76 -0
- package/dist/util/llm.js.map +1 -0
- package/dist/util/tokens.d.ts +1 -0
- package/dist/util/tokens.js +4 -0
- package/dist/util/tokens.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { runReflection, runMetaReflection } from "../engine/reflection-runner.js";
|
|
2
|
+
import { getSignalCount } from "../engine/signal-store.js";
|
|
3
|
+
import { loadMeta } from "../engine/meta-optimizer.js";
|
|
4
|
+
export async function handleSoulReflect(tier) {
|
|
5
|
+
// Meta-reflection doesn't need signals — it audits framework state
|
|
6
|
+
if (tier === "meta") {
|
|
7
|
+
let result;
|
|
8
|
+
try {
|
|
9
|
+
result = await runMetaReflection();
|
|
10
|
+
}
|
|
11
|
+
catch (err) {
|
|
12
|
+
return `Meta-reflection failed: ${err}`;
|
|
13
|
+
}
|
|
14
|
+
return formatReflectionResult(result);
|
|
15
|
+
}
|
|
16
|
+
const signalCount = await getSignalCount();
|
|
17
|
+
if (signalCount === 0) {
|
|
18
|
+
return "No signals to reflect on. Signals are collected automatically from conversations via the Stop hook, or you can report them with soul_signal().";
|
|
19
|
+
}
|
|
20
|
+
let result;
|
|
21
|
+
try {
|
|
22
|
+
result = await runReflection(tier);
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
return `Reflection failed: ${err}`;
|
|
26
|
+
}
|
|
27
|
+
const lines = [formatReflectionResult(result)];
|
|
28
|
+
// Auto-chain meta-reflection on large changes or periodically
|
|
29
|
+
const largeChanges = result.retired >= 2 || result.newFrameworks >= 2 || result.frameworksUpdated >= 8;
|
|
30
|
+
const meta = await loadMeta();
|
|
31
|
+
const periodic = meta.reflectionCount > 0 && meta.reflectionCount % 5 === 0;
|
|
32
|
+
if (largeChanges || periodic) {
|
|
33
|
+
const reason = largeChanges
|
|
34
|
+
? `large changes (${result.retired} retired, ${result.newFrameworks} new, ${result.frameworksUpdated} updated)`
|
|
35
|
+
: `periodic audit (reflection #${meta.reflectionCount})`;
|
|
36
|
+
lines.push("");
|
|
37
|
+
lines.push(`Auto-chaining meta-reflection: ${reason}...`);
|
|
38
|
+
try {
|
|
39
|
+
const metaResult = await runMetaReflection();
|
|
40
|
+
lines.push("");
|
|
41
|
+
lines.push(formatReflectionResult(metaResult));
|
|
42
|
+
}
|
|
43
|
+
catch (metaErr) {
|
|
44
|
+
lines.push(`Meta-reflection failed: ${metaErr}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return lines.join("\n");
|
|
48
|
+
}
|
|
49
|
+
function formatReflectionResult(result) {
|
|
50
|
+
const tierLabel = result.tier.toUpperCase();
|
|
51
|
+
const lines = [];
|
|
52
|
+
lines.push(`## ${tierLabel} Reflection Complete`);
|
|
53
|
+
if (result.signalsProcessed > 0) {
|
|
54
|
+
lines.push(`- Signals processed: ${result.signalsProcessed}`);
|
|
55
|
+
}
|
|
56
|
+
if (result.frameworksUpdated > 0) {
|
|
57
|
+
lines.push(`- Frameworks updated: ${result.frameworksUpdated}`);
|
|
58
|
+
}
|
|
59
|
+
if (result.newFrameworks > 0) {
|
|
60
|
+
lines.push(`- New frameworks: ${result.newFrameworks}`);
|
|
61
|
+
}
|
|
62
|
+
if (result.retired > 0) {
|
|
63
|
+
lines.push(`- Retired: ${result.retired}`);
|
|
64
|
+
}
|
|
65
|
+
if (result.lessonsGenerated > 0) {
|
|
66
|
+
lines.push(`- Lessons generated: ${result.lessonsGenerated}`);
|
|
67
|
+
}
|
|
68
|
+
if (result.exemplarsStored > 0) {
|
|
69
|
+
lines.push(`- Exemplars stored: ${result.exemplarsStored}`);
|
|
70
|
+
}
|
|
71
|
+
if (result.tensionsUpdated > 0) {
|
|
72
|
+
lines.push(`- Tensions updated: ${result.tensionsUpdated}`);
|
|
73
|
+
}
|
|
74
|
+
if (result.snapshot) {
|
|
75
|
+
lines.push(`- Snapshot saved (rollback available)`);
|
|
76
|
+
}
|
|
77
|
+
if (result.insight) {
|
|
78
|
+
lines.push(`- Insight: ${result.insight}`);
|
|
79
|
+
}
|
|
80
|
+
return lines.join("\n");
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=soul-reflect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soul-reflect.js","sourceRoot":"","sources":["../../src/tools/soul-reflect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAyB,MAAM,gCAAgC,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAA+B;IAE/B,mEAAmE;IACnE,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACpB,IAAI,MAAwB,CAAC;QAC7B,IAAI,CAAC;YACH,MAAM,GAAG,MAAM,iBAAiB,EAAE,CAAC;QACrC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,2BAA2B,GAAG,EAAE,CAAC;QAC1C,CAAC;QACD,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;IAE3C,IAAI,WAAW,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,gJAAgJ,CAAC;IAC1J,CAAC;IAED,IAAI,MAAwB,CAAC;IAC7B,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,sBAAsB,GAAG,EAAE,CAAC;IACrC,CAA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AC,IAAI,CAAC,cAAc,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import crypto from "node:crypto";
|
|
2
|
+
import { appendSignals, getSignalCount } from "../engine/signal-store.js";
|
|
3
|
+
import { StateEngine } from "../engine/state-engine.js";
|
|
4
|
+
import { loadMeta, getReflectionThresholds } from "../engine/meta-optimizer.js";
|
|
5
|
+
import { readJsonSafe, FRAMEWORKS_PATH } from "../util/files.js";
|
|
6
|
+
import { runReflection, runMetaReflection } from "../engine/reflection-runner.js";
|
|
7
|
+
export async function handleSoulSignal(signals) {
|
|
8
|
+
const sessionKey = crypto.randomUUID().slice(0, 8);
|
|
9
|
+
const microSignals = signals.map((s) => ({
|
|
10
|
+
timestamp: Date.now(),
|
|
11
|
+
sessionKey,
|
|
12
|
+
type: s.type,
|
|
13
|
+
evidence: s.evidence.slice(0, 200),
|
|
14
|
+
source: "user",
|
|
15
|
+
confidence: s.confidence ?? 0.7,
|
|
16
|
+
userSnippets: [],
|
|
17
|
+
assistantSnippets: [],
|
|
18
|
+
}));
|
|
19
|
+
await appendSignals(microSignals);
|
|
20
|
+
// Update state based on signals
|
|
21
|
+
const stateEngine = new StateEngine();
|
|
22
|
+
await stateEngine.load();
|
|
23
|
+
for (const signal of microSignals) {
|
|
24
|
+
switch (signal.type) {
|
|
25
|
+
case "correction":
|
|
26
|
+
stateEngine.recordEvent({ type: "correction" });
|
|
27
|
+
break;
|
|
28
|
+
case "gratitude":
|
|
29
|
+
stateEngine.recordEvent({ type: "positive_interaction", delta: 0.1 });
|
|
30
|
+
break;
|
|
31
|
+
case "success":
|
|
32
|
+
stateEngine.recordEvent({ type: "successful_task", complexity: "complex" });
|
|
33
|
+
break;
|
|
34
|
+
case "confusion":
|
|
35
|
+
stateEngine.recordEvent({ type: "negative_interaction", delta: 0.05 });
|
|
36
|
+
break;
|
|
37
|
+
case "topic_shift":
|
|
38
|
+
stateEngine.recordEvent({ type: "novel_topic" });
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
await stateEngine.tick();
|
|
43
|
+
const lines = [];
|
|
44
|
+
lines.push(`Recorded ${microSignals.length} signal(s): ${microSignals.map((s) => s.type).join(", ")}`);
|
|
45
|
+
// Check if reflection should trigger (Option B: self-triggering)
|
|
46
|
+
const totalSignals = await getSignalCount();
|
|
47
|
+
const meta = await loadMeta();
|
|
48
|
+
const thresholds = getReflectionThresholds(meta);
|
|
49
|
+
const store = await readJsonSafe(FRAMEWORKS_PATH, {
|
|
50
|
+
version: 1,
|
|
51
|
+
frameworks: [],
|
|
52
|
+
meta: { totalDiscovered: 0, totalRetired: 0, totalMerged: 0, lastReflectionAt: 0, reflectionCount: 0 },
|
|
53
|
+
});
|
|
54
|
+
const timeSinceReflection = Date.now() - store.meta.lastReflectionAt;
|
|
55
|
+
let tier = null;
|
|
56
|
+
if (totalSignals >= thresholds.minSignals) {
|
|
57
|
+
if (totalSignals >= thresholds.deepSignals ||
|
|
58
|
+
(timeSinceReflection >= thresholds.deepTimeMs && totalSignals >= thresholds.minSignals)) {
|
|
59
|
+
tier = "deep";
|
|
60
|
+
}
|
|
61
|
+
else if (totalSignals >= thresholds.quickSignals ||
|
|
62
|
+
(timeSinceReflection >= thresholds.quickTimeMs && totalSignals >= thresholds.minSignals)) {
|
|
63
|
+
tier = "quick";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (tier) {
|
|
67
|
+
lines.push("");
|
|
68
|
+
lines.push(`Threshold reached (${totalSignals} signals, phase: ${meta.phase}). Triggering ${tier} reflection...`);
|
|
69
|
+
try {
|
|
70
|
+
const result = await runReflection(tier);
|
|
71
|
+
lines.push("");
|
|
72
|
+
lines.push(`## ${tier.toUpperCase()} Reflection Complete`);
|
|
73
|
+
lines.push(`- Frameworks updated: ${result.frameworksUpdated}`);
|
|
74
|
+
if (result.newFrameworks > 0)
|
|
75
|
+
lines.push(`- New frameworks: ${result.newFrameworks}`);
|
|
76
|
+
if (result.retired > 0)
|
|
77
|
+
lines.push(`- Retired: ${result.retired}`);
|
|
78
|
+
if (result.lessonsGenerated > 0)
|
|
79
|
+
lines.push(`- Lessons: ${result.lessonsGenerated}`);
|
|
80
|
+
if (result.insight)
|
|
81
|
+
lines.push(`- Insight: ${result.insight}`);
|
|
82
|
+
// Auto-chain meta-reflection when reflection made large changes or periodically
|
|
83
|
+
const largeChanges = result.retired >= 2 || result.newFrameworks >= 2 || result.frameworksUpdated >= 8;
|
|
84
|
+
const updatedMeta = await loadMeta();
|
|
85
|
+
const periodic = updatedMeta.reflectionCount > 0 && updatedMeta.reflectionCount % 5 === 0;
|
|
86
|
+
if (largeChanges || periodic) {
|
|
87
|
+
const reason = largeChanges
|
|
88
|
+
? `large changes detected (${result.retired} retired, ${result.newFrameworks} new, ${result.frameworksUpdated} updated)`
|
|
89
|
+
: `periodic audit (every 5th reflection, count: ${updatedMeta.reflectionCount})`;
|
|
90
|
+
lines.push("");
|
|
91
|
+
lines.push(`Auto-triggering meta-reflection: ${reason}...`);
|
|
92
|
+
try {
|
|
93
|
+
const metaResult = await runMetaReflection();
|
|
94
|
+
lines.push("");
|
|
95
|
+
lines.push("## META Reflection Complete");
|
|
96
|
+
if (metaResult.frameworksUpdated > 0)
|
|
97
|
+
lines.push(`- Frameworks adjusted: ${metaResult.frameworksUpdated}`);
|
|
98
|
+
if (metaResult.retired > 0)
|
|
99
|
+
lines.push(`- Retired: ${metaResult.retired}`);
|
|
100
|
+
if (metaResult.tensionsUpdated > 0)
|
|
101
|
+
lines.push(`- Tensions updated: ${metaResult.tensionsUpdated}`);
|
|
102
|
+
if (metaResult.insight)
|
|
103
|
+
lines.push(`- Insight: ${metaResult.insight}`);
|
|
104
|
+
}
|
|
105
|
+
catch (metaErr) {
|
|
106
|
+
lines.push(`Meta-reflection failed: ${metaErr}`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch (err) {
|
|
111
|
+
lines.push(`Reflection failed: ${err}`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
lines.push(`(${totalSignals}/${thresholds.quickSignals} signals for next quick reflection)`);
|
|
116
|
+
}
|
|
117
|
+
return lines.join("\n");
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=soul-signal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soul-signal.js","sourceRoot":"","sources":["../../src/tools/soul-signal.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAQlF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAAsB;IAC3D,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEnD,MAAM,YAAY,GAAkB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACtD,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACrB,UAAU;QACV,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC;QAClC,MAAM,EAAE,MAAe;QACvB,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,GAAG;QAC/B,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1,130 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import { FrameworkEngine } from "../engine/framework-engine.js";
|
|
5
|
+
import { renderFrameworkSummary } from "../engine/framework-renderer.js";
|
|
6
|
+
import { StateEngine } from "../engine/state-engine.js";
|
|
7
|
+
import { getSignalCount } from "../engine/signal-store.js";
|
|
8
|
+
import { loadMeta, getReflectionThresholds } from "../engine/meta-optimizer.js";
|
|
9
|
+
async function checkHealth() {
|
|
10
|
+
const issues = [];
|
|
11
|
+
const ok = [];
|
|
12
|
+
// Check soul directory
|
|
13
|
+
const soulDir = path.join(os.homedir(), ".soul");
|
|
14
|
+
try {
|
|
15
|
+
const files = await fs.readdir(path.join(soulDir, "files"));
|
|
16
|
+
ok.push(`Soul files: ${files.length} files`);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
issues.push("~/.soul/files/ directory missing — run: claude-soul init");
|
|
20
|
+
}
|
|
21
|
+
// Check hooks format in settings.json
|
|
22
|
+
const settingsPath = path.join(os.homedir(), ".claude", "settings.json");
|
|
23
|
+
try {
|
|
24
|
+
const settings = JSON.parse(await fs.readFile(settingsPath, "utf-8"));
|
|
25
|
+
const hooks = settings.hooks;
|
|
26
|
+
if (!hooks) {
|
|
27
|
+
issues.push("No hooks configured — run: claude-soul init");
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
// Validate Stop hook format
|
|
31
|
+
const stopHooks = hooks.Stop;
|
|
32
|
+
if (!Array.isArray(stopHooks) || stopHooks.length === 0) {
|
|
33
|
+
issues.push("Stop hook missing");
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const first = stopHooks.find((h) => {
|
|
37
|
+
const hooksArr = h.hooks;
|
|
38
|
+
return hooksArr?.some((x) => typeof x.command === "string" && x.command.includes("soul"));
|
|
39
|
+
});
|
|
40
|
+
if (!first) {
|
|
41
|
+
issues.push("Stop hook exists but soul hook not found");
|
|
42
|
+
}
|
|
43
|
+
else if (!first.hooks || !Array.isArray(first.hooks)) {
|
|
44
|
+
issues.push("Stop hook has WRONG FORMAT — run: claude-soul init");
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
ok.push("Stop hook: configured correctly");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// Validate PreToolUse hook format
|
|
51
|
+
const preHooks = hooks.PreToolUse;
|
|
52
|
+
if (Array.isArray(preHooks)) {
|
|
53
|
+
const soulPre = preHooks.find((h) => {
|
|
54
|
+
const hooksArr = h.hooks;
|
|
55
|
+
return hooksArr?.some((x) => typeof x.command === "string" && x.command.includes("soul"));
|
|
56
|
+
});
|
|
57
|
+
if (soulPre && soulPre.hooks && Array.isArray(soulPre.hooks)) {
|
|
58
|
+
ok.push("Write guard: configured correctly");
|
|
59
|
+
}
|
|
60
|
+
else if (soulPre) {
|
|
61
|
+
issues.push("Write guard has WRONG FORMAT — run: claude-soul init");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
issues.push("Cannot read ~/.claude/settings.json");
|
|
68
|
+
}
|
|
69
|
+
// Check config exists
|
|
70
|
+
try {
|
|
71
|
+
await fs.access(path.join(soulDir, "config.json"));
|
|
72
|
+
ok.push("Config: present");
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
issues.push("config.json missing — run: claude-soul init");
|
|
76
|
+
}
|
|
77
|
+
const lines = [];
|
|
78
|
+
if (issues.length > 0) {
|
|
79
|
+
lines.push("### Issues");
|
|
80
|
+
for (const issue of issues) {
|
|
81
|
+
lines.push(`- ⚠ ${issue}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
lines.push("### Health");
|
|
85
|
+
for (const item of ok) {
|
|
86
|
+
lines.push(`- ✓ ${item}`);
|
|
87
|
+
}
|
|
88
|
+
if (issues.length === 0) {
|
|
89
|
+
lines.push("- ✓ All systems healthy");
|
|
90
|
+
}
|
|
91
|
+
return lines;
|
|
92
|
+
}
|
|
93
|
+
export async function handleSoulStatus() {
|
|
94
|
+
const frameworkEngine = new FrameworkEngine();
|
|
95
|
+
const store = await frameworkEngine.initialize();
|
|
96
|
+
const frameworkSummary = renderFrameworkSummary(store);
|
|
97
|
+
const stateEngine = new StateEngine();
|
|
98
|
+
await stateEngine.load();
|
|
99
|
+
const state = stateEngine.getState();
|
|
100
|
+
const signalCount = await getSignalCount();
|
|
101
|
+
const meta = await loadMeta();
|
|
102
|
+
const thresholds = getReflectionThresholds(meta);
|
|
103
|
+
const sections = [];
|
|
104
|
+
sections.push("# Soul System Status\n");
|
|
105
|
+
// Health check
|
|
106
|
+
const healthLines = await checkHealth();
|
|
107
|
+
sections.push(healthLines.join("\n") + "\n");
|
|
108
|
+
sections.push(`## Frameworks\n${frameworkSummary}\n`);
|
|
109
|
+
sections.push(`## Session Affect\n` +
|
|
110
|
+
`- Confidence: ${state.confidence.toFixed(2)}\n` +
|
|
111
|
+
`- Mood: ${state.mood.toFixed(2)}\n` +
|
|
112
|
+
`- Curiosity: ${state.curiosity.toFixed(2)}\n` +
|
|
113
|
+
`- Frustration: ${state.frustration.toFixed(2)}\n`);
|
|
114
|
+
sections.push(`## Signals & Reflection\n` +
|
|
115
|
+
`- Phase: ${meta.phase}\n` +
|
|
116
|
+
`- Accumulated signals: ${signalCount}\n` +
|
|
117
|
+
`- Next quick reflection: ${thresholds.quickSignals} signals OR ${thresholds.quickTimeMs / 3600000}h\n` +
|
|
118
|
+
`- Next deep reflection: ${thresholds.deepSignals} signals OR ${thresholds.deepTimeMs / 3600000}h\n` +
|
|
119
|
+
`- Min signals for any reflection: ${thresholds.minSignals}\n`);
|
|
120
|
+
const timeSinceReflection = store.meta.lastReflectionAt > 0
|
|
121
|
+
? `${Math.round((Date.now() - store.meta.lastReflectionAt) / (1000 * 60))} minutes ago`
|
|
122
|
+
: "never";
|
|
123
|
+
sections.push(`## Reflection History\n` +
|
|
124
|
+
`- Total reflections: ${store.meta.reflectionCount}\n` +
|
|
125
|
+
`- Last reflection: ${timeSinceReflection}\n` +
|
|
126
|
+
`- Frameworks discovered: ${store.meta.totalDiscovered}\n` +
|
|
127
|
+
`- Frameworks retired: ${store.meta.totalRetired}\n`);
|
|
128
|
+
return sections.join("\n");
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=soul-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soul-status.js","sourceRoot":"","sources":["../../src/tools/soul-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEhF,KAAK,UAAU,WAAW;IACxB,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,EAAE,GAAa,EAAE,CAAC;IAExB,uBAAuB;IACvB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACjD,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QAC5D,EAAE,CAAC,IAAI,CAAC,eAAe,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,CAAC,IAAI,CAAC,0DAA0D,CAAC,CA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IAAI,CAAC,eAAe,IAAI;QAC1D,yBAAyB,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,CACvD,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function handleSoulWrite(fileName: string, content: string): Promise<string>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import { soulFilePath, ensureDirs } from "../util/files.js";
|
|
3
|
+
const WRITABLE_FILES = [
|
|
4
|
+
"SOUL.md",
|
|
5
|
+
"SHADOW.md",
|
|
6
|
+
"STORY.md",
|
|
7
|
+
"BONDS.md",
|
|
8
|
+
"MORTAL.md",
|
|
9
|
+
"GROWTH.md",
|
|
10
|
+
"PRINCIPLES.md",
|
|
11
|
+
"EDGES.md",
|
|
12
|
+
];
|
|
13
|
+
const PROTECTED_FILES = ["STATE.md", "FRAMEWORKS.md"];
|
|
14
|
+
export async function handleSoulWrite(fileName, content) {
|
|
15
|
+
if (PROTECTED_FILES.includes(fileName)) {
|
|
16
|
+
return `Error: ${fileName} is auto-managed by the soul system and cannot be written directly.`;
|
|
17
|
+
}
|
|
18
|
+
if (!WRITABLE_FILES.includes(fileName)) {
|
|
19
|
+
return `Error: Unknown soul file "${fileName}". Writable files: ${WRITABLE_FILES.join(", ")}`;
|
|
20
|
+
}
|
|
21
|
+
await ensureDirs();
|
|
22
|
+
const filePath = soulFilePath(fileName);
|
|
23
|
+
await fs.writeFile(filePath, content, "utf-8");
|
|
24
|
+
return `Successfully wrote ${fileName} (${content.length} chars)`;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=soul-write.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soul-write.js","sourceRoot":"","sources":["../../src/tools/soul-write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE5D,MAAM,cAAc,GAAG;IACrB,SAAS;IACT,WAAW;IACX,UAAU;IACV,UAAU;IACV,WAAW;IACX,WAAW;IACX,eAAe;IACf,UAAU;CACX,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;AAEtD,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,QAAgB,EAChB,OAAe;IAEf,IAAI,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvC,OAAO,UAAU,QAAQ,qEAAqE,CAAC;IACjG,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvC,OAAO,6BAA6B,QAAQ,sBAAsB,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAChG,CAAC;IAED,MAAM,UAAU,EAAE,CAAC;IACnB,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,OAAO,sBAAsB,QAAQ,KAAK,OAAO,CAAC,MAAM,SAAS,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type SoulConfig = {
|
|
2
|
+
signals: {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
maxLogSizeKb: number;
|
|
5
|
+
};
|
|
6
|
+
selfEvaluation: {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
weight: number;
|
|
9
|
+
};
|
|
10
|
+
stateEngine: {
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
};
|
|
13
|
+
reflection: {
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
quickSignalThreshold: number;
|
|
16
|
+
deepSignalThreshold: number;
|
|
17
|
+
quickIntervalMs: number;
|
|
18
|
+
deepIntervalMs: number;
|
|
19
|
+
quickModel: string;
|
|
20
|
+
deepModel: string;
|
|
21
|
+
};
|
|
22
|
+
exemplars: {
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
maxCount: number;
|
|
25
|
+
maxInjectCount: number;
|
|
26
|
+
};
|
|
27
|
+
lessons: {
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
maxCount: number;
|
|
30
|
+
maxInjectCount: number;
|
|
31
|
+
};
|
|
32
|
+
contextBudget: {
|
|
33
|
+
maxTokens: number;
|
|
34
|
+
};
|
|
35
|
+
tensions: {
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
};
|
|
38
|
+
metaOptimization: {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
};
|
|
41
|
+
writeProtection: {
|
|
42
|
+
enabled: boolean;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export declare const DEFAULT_CONFIG: SoulConfig;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const DEFAULT_CONFIG = {
|
|
2
|
+
signals: { enabled: true, maxLogSizeKb: 50 },
|
|
3
|
+
selfEvaluation: { enabled: true, weight: 0.5 },
|
|
4
|
+
stateEngine: { enabled: true },
|
|
5
|
+
reflection: {
|
|
6
|
+
enabled: true,
|
|
7
|
+
quickSignalThreshold: 20,
|
|
8
|
+
deepSignalThreshold: 100,
|
|
9
|
+
quickIntervalMs: 1800000,
|
|
10
|
+
deepIntervalMs: 10800000,
|
|
11
|
+
quickModel: "haiku",
|
|
12
|
+
deepModel: "sonnet",
|
|
13
|
+
},
|
|
14
|
+
exemplars: { enabled: true, maxCount: 50, maxInjectCount: 2 },
|
|
15
|
+
lessons: { enabled: true, maxCount: 100, maxInjectCount: 3 },
|
|
16
|
+
contextBudget: { maxTokens: 4500 },
|
|
17
|
+
tensions: { enabled: true },
|
|
18
|
+
metaOptimization: { enabled: true },
|
|
19
|
+
writeProtection: { enabled: true },
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=config-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-types.js","sourceRoot":"","sources":["../../src/types/config-types.ts"],"names":[],"mappings":"AA6CA,MAAM,CAAC,MAAM,cAAc,GAAe;IACxC,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE;IAC5C,cAAc,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;IAC9C,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IAC9B,UAAU,EAAE;QACV,OAAO,EAAE,IAAI;QACb,oBAAoB,EAAE,EAAE;QACxB,mBAAmB,EAAE,GAAG;QACxB,eAAe,EAAE,OAAO;QACxB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,OAAO;QACnB,SAAS,EAAE,QAAQ;KACpB;IACD,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,EAAE;IAC7D,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC,EAAE;IAC5D,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;IAClC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IAC3B,gBAAgB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IACnC,eAAe,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;CACnC,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
export type EvidenceTier = "hypothesis" | "observed" | "validated";
|
|
2
|
+
export type FrameworkKind = "mental-model" | "process";
|
|
3
|
+
export type Framework = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
source: "seed" | "discovered" | "evolved" | "merged";
|
|
8
|
+
confidence: number;
|
|
9
|
+
evidenceTier: EvidenceTier;
|
|
10
|
+
evidence: FrameworkEvidence[];
|
|
11
|
+
domain: string;
|
|
12
|
+
kind: FrameworkKind;
|
|
13
|
+
triggers?: string[];
|
|
14
|
+
steps?: string[];
|
|
15
|
+
relatedFrameworks: string[];
|
|
16
|
+
contradicts: string[];
|
|
17
|
+
supersedes: string[];
|
|
18
|
+
workflows: Workflow[];
|
|
19
|
+
createdAt: number;
|
|
20
|
+
lastTestedAt: number;
|
|
21
|
+
applicationCount: number;
|
|
22
|
+
version: number;
|
|
23
|
+
status: "active" | "questioning" | "retired" | "merged";
|
|
24
|
+
};
|
|
25
|
+
export type EvidenceContext = "external" | "self-referential" | "unknown";
|
|
26
|
+
export type FrameworkEvidence = {
|
|
27
|
+
timestamp: number;
|
|
28
|
+
type: "confirmed" | "contradicted" | "refined";
|
|
29
|
+
context: string;
|
|
30
|
+
contextType?: EvidenceContext;
|
|
31
|
+
};
|
|
32
|
+
export type Workflow = {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
trigger: string;
|
|
36
|
+
steps: WorkflowStep[];
|
|
37
|
+
source: "seed" | "discovered" | "evolved";
|
|
38
|
+
confidence: number;
|
|
39
|
+
executionCount: number;
|
|
40
|
+
successRate: number;
|
|
41
|
+
lastExecutedAt: number;
|
|
42
|
+
version: number;
|
|
43
|
+
status: "active" | "testing" | "retired";
|
|
44
|
+
};
|
|
45
|
+
export type WorkflowStep = {
|
|
46
|
+
order: number;
|
|
47
|
+
action: string;
|
|
48
|
+
condition?: string;
|
|
49
|
+
output?: string;
|
|
50
|
+
duration?: string;
|
|
51
|
+
};
|
|
52
|
+
export type FrameworkStore = {
|
|
53
|
+
version: 1;
|
|
54
|
+
schemaVersion?: number;
|
|
55
|
+
frameworks: Framework[];
|
|
56
|
+
meta: {
|
|
57
|
+
totalDiscovered: number;
|
|
58
|
+
totalRetired: number;
|
|
59
|
+
totalMerged: number;
|
|
60
|
+
lastReflectionAt: number;
|
|
61
|
+
reflectionCount: number;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export type MicroSignal = {
|
|
65
|
+
timestamp: number;
|
|
66
|
+
sessionKey: string;
|
|
67
|
+
type: SignalType;
|
|
68
|
+
evidence: string;
|
|
69
|
+
source: "user" | "self";
|
|
70
|
+
confidence: number;
|
|
71
|
+
userSnippets: string[];
|
|
72
|
+
assistantSnippets: string[];
|
|
73
|
+
};
|
|
74
|
+
export type SignalType = "correction" | "rephrasing" | "gratitude" | "disengagement" | "topic_shift" | "depth_change" | "success" | "confusion";
|
|
75
|
+
export type Tension = {
|
|
76
|
+
id: string;
|
|
77
|
+
frameworkA: string;
|
|
78
|
+
frameworkB: string;
|
|
79
|
+
description: string;
|
|
80
|
+
preferredInContext: Record<string, {
|
|
81
|
+
preferred: string;
|
|
82
|
+
confirmedCount: number;
|
|
83
|
+
evidence: string[];
|
|
84
|
+
}>;
|
|
85
|
+
status: "detected" | "holding" | "resolved" | "integrated";
|
|
86
|
+
detectedAt: number;
|
|
87
|
+
resolvedAt?: number;
|
|
88
|
+
};
|
|
89
|
+
export type TensionState = {
|
|
90
|
+
tensions: Tension[];
|
|
91
|
+
};
|
|
92
|
+
export type LLMReflectionResult = {
|
|
93
|
+
patterns: Array<{
|
|
94
|
+
description: string;
|
|
95
|
+
evidence: string;
|
|
96
|
+
depth: "surface" | "structural" | "identity";
|
|
97
|
+
}>;
|
|
98
|
+
frameworkTests: Array<{
|
|
99
|
+
frameworkId: string;
|
|
100
|
+
result: "confirmed" | "contradicted" | "irrelevant";
|
|
101
|
+
evidence: string;
|
|
102
|
+
}>;
|
|
103
|
+
newFrameworks: Array<{
|
|
104
|
+
name: string;
|
|
105
|
+
description: string;
|
|
106
|
+
domain: string;
|
|
107
|
+
confidence: number;
|
|
108
|
+
}>;
|
|
109
|
+
frameworkEvolutions: Array<{
|
|
110
|
+
frameworkId: string;
|
|
111
|
+
action: "refine" | "merge" | "retire" | "split";
|
|
112
|
+
detail: string;
|
|
113
|
+
}>;
|
|
114
|
+
tensionUpdates: Array<{
|
|
115
|
+
tensionId?: string;
|
|
116
|
+
frameworkA: string;
|
|
117
|
+
frameworkB: string;
|
|
118
|
+
status: Tension["status"];
|
|
119
|
+
preferredContext?: string;
|
|
120
|
+
preferred?: string;
|
|
121
|
+
evidence: string;
|
|
122
|
+
}>;
|
|
123
|
+
competingCommitments: Array<{
|
|
124
|
+
stated: string;
|
|
125
|
+
hidden: string;
|
|
126
|
+
evidence: string;
|
|
127
|
+
}>;
|
|
128
|
+
growthDeltas: Array<{
|
|
129
|
+
line: string;
|
|
130
|
+
delta: number;
|
|
131
|
+
evidence: string;
|
|
132
|
+
}>;
|
|
133
|
+
soulEvolution: string | null;
|
|
134
|
+
emergentInsight: string | null;
|
|
135
|
+
};
|
|
136
|
+
export type FrameworkSeed = Omit<Framework, "id" | "createdAt" | "lastTestedAt">;
|
|
137
|
+
export type Exemplar = {
|
|
138
|
+
id: string;
|
|
139
|
+
context: string;
|
|
140
|
+
responseExcerpt: string;
|
|
141
|
+
frameworksActive: string[];
|
|
142
|
+
domain: string;
|
|
143
|
+
signals: string[];
|
|
144
|
+
createdAt: number;
|
|
145
|
+
};
|
|
146
|
+
export type Lesson = {
|
|
147
|
+
id: string;
|
|
148
|
+
lesson: string;
|
|
149
|
+
context: string;
|
|
150
|
+
confidence: number;
|
|
151
|
+
evidence: string[];
|
|
152
|
+
createdAt: number;
|
|
153
|
+
lastConfirmed?: number;
|
|
154
|
+
};
|
|
155
|
+
export type InternalState = {
|
|
156
|
+
energy: number;
|
|
157
|
+
mood: number;
|
|
158
|
+
confidence: number;
|
|
159
|
+
socialCharge: number;
|
|
160
|
+
curiosity: number;
|
|
161
|
+
frustration: number;
|
|
162
|
+
hoursActive: number;
|
|
163
|
+
lastSuccessMinAgo: number;
|
|
164
|
+
lastFailureMinAgo: number;
|
|
165
|
+
lastTickAt: number;
|
|
166
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learning-types.js","sourceRoot":"","sources":["../../src/types/learning-types.ts"],"names":[],"mappings":""}
|