harness: auto-skill general + memory spesifik + lossless compaction
Memory balik spesifik per-project (keep paths, THIS repo), general jadi skill auto-create ke ~/.shiro-neko/skills/auto-*.md. Compaction lossless dengan head preserved + droppedSpan normalized + retained note. Learner throttled tiap 3 turn / delta 8, pakai subagentModel (learnerModel) dan ceiling guard, hash dedup, JSON fallback, TTL tiap 6 turn.
This commit is contained in:
@@ -365,6 +365,7 @@ test('lossless compaction appends a retained note when tool content was dropped'
|
||||
const session = new Session({
|
||||
messages: [...messages],
|
||||
compactThreshold: 1500,
|
||||
disableAutoLearn: true,
|
||||
model: new MockLanguageModelV4({
|
||||
doStream: async () => stream(text('ok')),
|
||||
doGenerate: async () => {
|
||||
@@ -386,6 +387,7 @@ test('no retained note when history fits', async () => {
|
||||
const session = new Session({
|
||||
messages: [...bulkyExchange(0)],
|
||||
compactThreshold: 1_000_000,
|
||||
disableAutoLearn: true,
|
||||
model: new MockLanguageModelV4({
|
||||
doStream: async () => stream(text('ok')),
|
||||
doGenerate: async () => {
|
||||
@@ -405,6 +407,7 @@ test('a failing retained-note model does not break the turn', async () => {
|
||||
const session = new Session({
|
||||
messages: [...messages],
|
||||
compactThreshold: 1000,
|
||||
disableAutoLearn: true,
|
||||
model: new MockLanguageModelV4({
|
||||
doStream: async () => stream(text('ok')),
|
||||
doGenerate: async () => { throw new Error('down'); },
|
||||
|
||||
Reference in New Issue
Block a user