@vectorize-io/hindsight-coding-agents 0.6.0 → 0.6.1
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/antigravity-hook.js +3 -13
- package/dist/claude-hook.js +3 -13
- package/dist/cline.js +3 -13
- package/dist/codex-hook.js +3 -13
- package/dist/copilot-hook.js +3 -13
- package/dist/cursor-hook.js +3 -13
- package/dist/dcode-hook.js +3 -13
- package/dist/devin-hook.js +3 -13
- package/dist/droid-hook.js +3 -13
- package/dist/dsh.js +3 -13
- package/dist/grok-hook.js +3 -13
- package/dist/index.js +3 -13
- package/dist/kilo.js +3 -13
- package/dist/opencode2.js +3 -13
- package/dist/pi.js +3 -13
- package/dist/prime-agent.js +3 -13
- package/dist/qwen-hook.js +3 -13
- package/dist/zcode-hook.js +3 -13
- package/package.json +1 -1
- package/plugin.json +1 -1
package/dist/antigravity-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/claude-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/cline.js
CHANGED
|
@@ -17638,9 +17638,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17638
17638
|
try {
|
|
17639
17639
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
17640
17640
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
17641
|
-
if (hits.length)
|
|
17642
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
17643
|
-
}
|
|
17641
|
+
if (hits.length) return formatPageFallback(hits);
|
|
17644
17642
|
} catch (e) {
|
|
17645
17643
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
17646
17644
|
ms: Date.now() - t0,
|
|
@@ -17657,13 +17655,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17657
17655
|
ms: Date.now() - t0,
|
|
17658
17656
|
count: observations.length
|
|
17659
17657
|
});
|
|
17660
|
-
if (observations.length)
|
|
17661
|
-
return {
|
|
17662
|
-
memory: formatObservationFallback(observations),
|
|
17663
|
-
source: "observations",
|
|
17664
|
-
count: observations.length
|
|
17665
|
-
};
|
|
17666
|
-
}
|
|
17658
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
17667
17659
|
} catch (e) {
|
|
17668
17660
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
17669
17661
|
ms: Date.now() - t0,
|
|
@@ -17719,7 +17711,7 @@ async function buildHookOutput(args) {
|
|
|
17719
17711
|
});
|
|
17720
17712
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
17721
17713
|
fallback = await reflectFallback(harness, prompt, client);
|
|
17722
|
-
if (fallback) reflectAnswer = fallback
|
|
17714
|
+
if (fallback) reflectAnswer = fallback;
|
|
17723
17715
|
}
|
|
17724
17716
|
}
|
|
17725
17717
|
}
|
|
@@ -17755,8 +17747,6 @@ async function buildHookOutput(args) {
|
|
|
17755
17747
|
const kept = blocks.filter(Boolean);
|
|
17756
17748
|
let notice;
|
|
17757
17749
|
if (fallback) {
|
|
17758
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
17759
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
17760
17750
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
17761
17751
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
17762
17752
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/codex-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/copilot-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/cursor-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/dcode-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/devin-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/droid-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/dsh.js
CHANGED
|
@@ -17678,9 +17678,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17678
17678
|
try {
|
|
17679
17679
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
17680
17680
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
17681
|
-
if (hits.length)
|
|
17682
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
17683
|
-
}
|
|
17681
|
+
if (hits.length) return formatPageFallback(hits);
|
|
17684
17682
|
} catch (e) {
|
|
17685
17683
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
17686
17684
|
ms: Date.now() - t0,
|
|
@@ -17697,13 +17695,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17697
17695
|
ms: Date.now() - t0,
|
|
17698
17696
|
count: observations.length
|
|
17699
17697
|
});
|
|
17700
|
-
if (observations.length)
|
|
17701
|
-
return {
|
|
17702
|
-
memory: formatObservationFallback(observations),
|
|
17703
|
-
source: "observations",
|
|
17704
|
-
count: observations.length
|
|
17705
|
-
};
|
|
17706
|
-
}
|
|
17698
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
17707
17699
|
} catch (e) {
|
|
17708
17700
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
17709
17701
|
ms: Date.now() - t0,
|
|
@@ -17759,7 +17751,7 @@ async function buildHookOutput(args) {
|
|
|
17759
17751
|
});
|
|
17760
17752
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
17761
17753
|
fallback = await reflectFallback(harness, prompt, client);
|
|
17762
|
-
if (fallback) reflectAnswer = fallback
|
|
17754
|
+
if (fallback) reflectAnswer = fallback;
|
|
17763
17755
|
}
|
|
17764
17756
|
}
|
|
17765
17757
|
}
|
|
@@ -17795,8 +17787,6 @@ async function buildHookOutput(args) {
|
|
|
17795
17787
|
const kept = blocks.filter(Boolean);
|
|
17796
17788
|
let notice;
|
|
17797
17789
|
if (fallback) {
|
|
17798
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
17799
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
17800
17790
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
17801
17791
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
17802
17792
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/grok-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/index.js
CHANGED
|
@@ -17689,9 +17689,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17689
17689
|
try {
|
|
17690
17690
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
17691
17691
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
17692
|
-
if (hits.length)
|
|
17693
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
17694
|
-
}
|
|
17692
|
+
if (hits.length) return formatPageFallback(hits);
|
|
17695
17693
|
} catch (e) {
|
|
17696
17694
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
17697
17695
|
ms: Date.now() - t0,
|
|
@@ -17708,13 +17706,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17708
17706
|
ms: Date.now() - t0,
|
|
17709
17707
|
count: observations.length
|
|
17710
17708
|
});
|
|
17711
|
-
if (observations.length)
|
|
17712
|
-
return {
|
|
17713
|
-
memory: formatObservationFallback(observations),
|
|
17714
|
-
source: "observations",
|
|
17715
|
-
count: observations.length
|
|
17716
|
-
};
|
|
17717
|
-
}
|
|
17709
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
17718
17710
|
} catch (e) {
|
|
17719
17711
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
17720
17712
|
ms: Date.now() - t0,
|
|
@@ -17770,7 +17762,7 @@ async function buildHookOutput(args) {
|
|
|
17770
17762
|
});
|
|
17771
17763
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
17772
17764
|
fallback = await reflectFallback(harness, prompt, client);
|
|
17773
|
-
if (fallback) reflectAnswer = fallback
|
|
17765
|
+
if (fallback) reflectAnswer = fallback;
|
|
17774
17766
|
}
|
|
17775
17767
|
}
|
|
17776
17768
|
}
|
|
@@ -17806,8 +17798,6 @@ async function buildHookOutput(args) {
|
|
|
17806
17798
|
const kept = blocks.filter(Boolean);
|
|
17807
17799
|
let notice;
|
|
17808
17800
|
if (fallback) {
|
|
17809
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
17810
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
17811
17801
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
17812
17802
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
17813
17803
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/kilo.js
CHANGED
|
@@ -17689,9 +17689,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17689
17689
|
try {
|
|
17690
17690
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
17691
17691
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
17692
|
-
if (hits.length)
|
|
17693
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
17694
|
-
}
|
|
17692
|
+
if (hits.length) return formatPageFallback(hits);
|
|
17695
17693
|
} catch (e) {
|
|
17696
17694
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
17697
17695
|
ms: Date.now() - t0,
|
|
@@ -17708,13 +17706,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17708
17706
|
ms: Date.now() - t0,
|
|
17709
17707
|
count: observations.length
|
|
17710
17708
|
});
|
|
17711
|
-
if (observations.length)
|
|
17712
|
-
return {
|
|
17713
|
-
memory: formatObservationFallback(observations),
|
|
17714
|
-
source: "observations",
|
|
17715
|
-
count: observations.length
|
|
17716
|
-
};
|
|
17717
|
-
}
|
|
17709
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
17718
17710
|
} catch (e) {
|
|
17719
17711
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
17720
17712
|
ms: Date.now() - t0,
|
|
@@ -17770,7 +17762,7 @@ async function buildHookOutput(args) {
|
|
|
17770
17762
|
});
|
|
17771
17763
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
17772
17764
|
fallback = await reflectFallback(harness, prompt, client);
|
|
17773
|
-
if (fallback) reflectAnswer = fallback
|
|
17765
|
+
if (fallback) reflectAnswer = fallback;
|
|
17774
17766
|
}
|
|
17775
17767
|
}
|
|
17776
17768
|
}
|
|
@@ -17806,8 +17798,6 @@ async function buildHookOutput(args) {
|
|
|
17806
17798
|
const kept = blocks.filter(Boolean);
|
|
17807
17799
|
let notice;
|
|
17808
17800
|
if (fallback) {
|
|
17809
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
17810
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
17811
17801
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
17812
17802
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
17813
17803
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/opencode2.js
CHANGED
|
@@ -17675,9 +17675,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17675
17675
|
try {
|
|
17676
17676
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
17677
17677
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
17678
|
-
if (hits.length)
|
|
17679
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
17680
|
-
}
|
|
17678
|
+
if (hits.length) return formatPageFallback(hits);
|
|
17681
17679
|
} catch (e) {
|
|
17682
17680
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
17683
17681
|
ms: Date.now() - t0,
|
|
@@ -17694,13 +17692,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17694
17692
|
ms: Date.now() - t0,
|
|
17695
17693
|
count: observations.length
|
|
17696
17694
|
});
|
|
17697
|
-
if (observations.length)
|
|
17698
|
-
return {
|
|
17699
|
-
memory: formatObservationFallback(observations),
|
|
17700
|
-
source: "observations",
|
|
17701
|
-
count: observations.length
|
|
17702
|
-
};
|
|
17703
|
-
}
|
|
17695
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
17704
17696
|
} catch (e) {
|
|
17705
17697
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
17706
17698
|
ms: Date.now() - t0,
|
|
@@ -17756,7 +17748,7 @@ async function buildHookOutput(args) {
|
|
|
17756
17748
|
});
|
|
17757
17749
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
17758
17750
|
fallback = await reflectFallback(harness, prompt, client);
|
|
17759
|
-
if (fallback) reflectAnswer = fallback
|
|
17751
|
+
if (fallback) reflectAnswer = fallback;
|
|
17760
17752
|
}
|
|
17761
17753
|
}
|
|
17762
17754
|
}
|
|
@@ -17792,8 +17784,6 @@ async function buildHookOutput(args) {
|
|
|
17792
17784
|
const kept = blocks.filter(Boolean);
|
|
17793
17785
|
let notice;
|
|
17794
17786
|
if (fallback) {
|
|
17795
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
17796
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
17797
17787
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
17798
17788
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
17799
17789
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/pi.js
CHANGED
|
@@ -17675,9 +17675,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17675
17675
|
try {
|
|
17676
17676
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
17677
17677
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
17678
|
-
if (hits.length)
|
|
17679
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
17680
|
-
}
|
|
17678
|
+
if (hits.length) return formatPageFallback(hits);
|
|
17681
17679
|
} catch (e) {
|
|
17682
17680
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
17683
17681
|
ms: Date.now() - t0,
|
|
@@ -17694,13 +17692,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17694
17692
|
ms: Date.now() - t0,
|
|
17695
17693
|
count: observations.length
|
|
17696
17694
|
});
|
|
17697
|
-
if (observations.length)
|
|
17698
|
-
return {
|
|
17699
|
-
memory: formatObservationFallback(observations),
|
|
17700
|
-
source: "observations",
|
|
17701
|
-
count: observations.length
|
|
17702
|
-
};
|
|
17703
|
-
}
|
|
17695
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
17704
17696
|
} catch (e) {
|
|
17705
17697
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
17706
17698
|
ms: Date.now() - t0,
|
|
@@ -17756,7 +17748,7 @@ async function buildHookOutput(args) {
|
|
|
17756
17748
|
});
|
|
17757
17749
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
17758
17750
|
fallback = await reflectFallback(harness, prompt, client);
|
|
17759
|
-
if (fallback) reflectAnswer = fallback
|
|
17751
|
+
if (fallback) reflectAnswer = fallback;
|
|
17760
17752
|
}
|
|
17761
17753
|
}
|
|
17762
17754
|
}
|
|
@@ -17792,8 +17784,6 @@ async function buildHookOutput(args) {
|
|
|
17792
17784
|
const kept = blocks.filter(Boolean);
|
|
17793
17785
|
let notice;
|
|
17794
17786
|
if (fallback) {
|
|
17795
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
17796
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
17797
17787
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
17798
17788
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
17799
17789
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/prime-agent.js
CHANGED
|
@@ -17675,9 +17675,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17675
17675
|
try {
|
|
17676
17676
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
17677
17677
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
17678
|
-
if (hits.length)
|
|
17679
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
17680
|
-
}
|
|
17678
|
+
if (hits.length) return formatPageFallback(hits);
|
|
17681
17679
|
} catch (e) {
|
|
17682
17680
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
17683
17681
|
ms: Date.now() - t0,
|
|
@@ -17694,13 +17692,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
17694
17692
|
ms: Date.now() - t0,
|
|
17695
17693
|
count: observations.length
|
|
17696
17694
|
});
|
|
17697
|
-
if (observations.length)
|
|
17698
|
-
return {
|
|
17699
|
-
memory: formatObservationFallback(observations),
|
|
17700
|
-
source: "observations",
|
|
17701
|
-
count: observations.length
|
|
17702
|
-
};
|
|
17703
|
-
}
|
|
17695
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
17704
17696
|
} catch (e) {
|
|
17705
17697
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
17706
17698
|
ms: Date.now() - t0,
|
|
@@ -17756,7 +17748,7 @@ async function buildHookOutput(args) {
|
|
|
17756
17748
|
});
|
|
17757
17749
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
17758
17750
|
fallback = await reflectFallback(harness, prompt, client);
|
|
17759
|
-
if (fallback) reflectAnswer = fallback
|
|
17751
|
+
if (fallback) reflectAnswer = fallback;
|
|
17760
17752
|
}
|
|
17761
17753
|
}
|
|
17762
17754
|
}
|
|
@@ -17792,8 +17784,6 @@ async function buildHookOutput(args) {
|
|
|
17792
17784
|
const kept = blocks.filter(Boolean);
|
|
17793
17785
|
let notice;
|
|
17794
17786
|
if (fallback) {
|
|
17795
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
17796
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
17797
17787
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
17798
17788
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
17799
17789
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/qwen-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/dist/zcode-hook.js
CHANGED
|
@@ -1774,9 +1774,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1774
1774
|
try {
|
|
1775
1775
|
const hits = await client.searchKnowledgePages(query, FALLBACK_PAGE_LIMIT, remaining());
|
|
1776
1776
|
diag(harness, "reflect_fallback_pages", { ms: Date.now() - t0, count: hits.length });
|
|
1777
|
-
if (hits.length)
|
|
1778
|
-
return { memory: formatPageFallback(hits), source: "knowledge_pages", count: hits.length };
|
|
1779
|
-
}
|
|
1777
|
+
if (hits.length) return formatPageFallback(hits);
|
|
1780
1778
|
} catch (e) {
|
|
1781
1779
|
diag(harness, "reflect_fallback_pages_failed", {
|
|
1782
1780
|
ms: Date.now() - t0,
|
|
@@ -1793,13 +1791,7 @@ async function reflectFallback(harness, prompt, client) {
|
|
|
1793
1791
|
ms: Date.now() - t0,
|
|
1794
1792
|
count: observations.length
|
|
1795
1793
|
});
|
|
1796
|
-
if (observations.length)
|
|
1797
|
-
return {
|
|
1798
|
-
memory: formatObservationFallback(observations),
|
|
1799
|
-
source: "observations",
|
|
1800
|
-
count: observations.length
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1794
|
+
if (observations.length) return formatObservationFallback(observations);
|
|
1803
1795
|
} catch (e) {
|
|
1804
1796
|
diag(harness, "reflect_fallback_observations_failed", {
|
|
1805
1797
|
ms: Date.now() - t0,
|
|
@@ -1855,7 +1847,7 @@ async function buildHookOutput(args) {
|
|
|
1855
1847
|
});
|
|
1856
1848
|
if (e instanceof ReflectError && e.fallbackEligible) {
|
|
1857
1849
|
fallback = await reflectFallback(harness, prompt, client);
|
|
1858
|
-
if (fallback) reflectAnswer = fallback
|
|
1850
|
+
if (fallback) reflectAnswer = fallback;
|
|
1859
1851
|
}
|
|
1860
1852
|
}
|
|
1861
1853
|
}
|
|
@@ -1891,8 +1883,6 @@ async function buildHookOutput(args) {
|
|
|
1891
1883
|
const kept = blocks.filter(Boolean);
|
|
1892
1884
|
let notice;
|
|
1893
1885
|
if (fallback) {
|
|
1894
|
-
const what = fallback.source === "knowledge_pages" ? "knowledge page" : "observation";
|
|
1895
|
-
notice = `${brandWord()} \xB7 reflect unavailable \u2014 fell back to ${fallback.count} ${what}${fallback.count === 1 ? "" : "s"} (see ${diagFilePath()})`;
|
|
1896
1886
|
} else if (reflectRanThisTurn && reflectAnswer) {
|
|
1897
1887
|
const q = prompt.replace(/\s+/g, " ").trim();
|
|
1898
1888
|
const excerpt = q.length > 48 ? `${q.slice(0, 48)}\u2026` : q;
|
package/package.json
CHANGED