Files
rea/experiments/atomic-codemode/string-facts.mjs
T
7a76e0b9ba fix(experiment): align native reads with refreshed main
Retain inspection file owners before a target lease exists and gate replacement on cleanup. Reuse the streaming string inventory owner and the same installation adapter in native profiling.

Validate 80 related tests, real SSH value/source parity in both MCP adapters, injected descriptor/native cleanup retries, zlib SDK immutability and native profiling. Keep historical model costs pinned to their measured runtime.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
2026-10-16 18:01:04 +00:00

27 lines
880 B
JavaScript

import { Readable } from "node:stream";
import { pipeline } from "node:stream/promises";
import { KunaStringInventoryReader } from "../../dist/kuna/KunaStringInventory.js";
import { requireResult } from "./fact-error.mjs";
import { freezeFacts, pageFacts } from "./fact-reads.mjs";
export const parseStringFacts = async (text, input) => {
const reader = new KunaStringInventoryReader();
await pipeline(Readable.from([text]), reader);
return freezeFacts(
requireResult(reader.finish(input), "invalid_provider_output"),
);
};
export const selectStringFacts = (inventory, input) => ({
...pageFacts(
inventory.items.filter((row) => row.value.includes(input.query)),
input,
),
coverage: {
scope: "native string inventory, minimum 5",
scanned: inventory.scanned,
artifact_discovery: "unknown",
reference_attribution: "not-computed",
},
});