Add shared SDK/CLI/MCP byte reads over the existing Kuna data protocol, preserve partial batches and exact u64 ranges, and retain complete source Evidence. Reuse named read lifecycles, bound aggregate hex expansion, and verify stock/native/direct MCP paths plus a shipped-file byte oracle before pinning a table-dispatch model task. Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
40 lines
961 B
JavaScript
40 lines
961 B
JavaScript
// Named native read protocols; both use the owner's source/batch lifecycle.
|
|
import { parseInstructions } from "./instruction-facts.mjs";
|
|
import { parseByteFacts } from "./byte-facts.mjs";
|
|
|
|
export const windowReaders = {
|
|
instructions: {
|
|
key: (request) => `${request.address}:${request.count}`,
|
|
arguments: (path, request) => [
|
|
"disassemble",
|
|
path,
|
|
request.address,
|
|
"--addr",
|
|
"--as",
|
|
"code",
|
|
"--count",
|
|
String(request.count),
|
|
"--json",
|
|
],
|
|
parse: parseInstructions,
|
|
},
|
|
bytes: {
|
|
key: (request) => `${request.address}:${request.length}`,
|
|
arguments: (path, request) => [
|
|
"read",
|
|
path,
|
|
`${request.address}..0x${(BigInt(request.address) + BigInt(request.length)).toString(16)}`,
|
|
"--as",
|
|
"data",
|
|
"--json",
|
|
"--option",
|
|
"listing",
|
|
"off",
|
|
"--option",
|
|
"fast_funcdisc",
|
|
"off",
|
|
],
|
|
parse: parseByteFacts,
|
|
},
|
|
};
|