@taewooopark/agent-blackbox 0.46.2 → 0.46.3
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/agent-blackbox.plugin.mjs +4 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
|
@@ -1064,7 +1064,10 @@ function createOpenCodeEventFactory(options) {
|
|
|
1064
1064
|
const current = typeof output.output === "string" ? output.output : "";
|
|
1065
1065
|
if (!current)
|
|
1066
1066
|
return;
|
|
1067
|
-
const
|
|
1067
|
+
const args = input.args && typeof input.args === "object" ? input.args : {};
|
|
1068
|
+
const offset = typeof args.offset === "number" ? args.offset : "";
|
|
1069
|
+
const limit = typeof args.limit === "number" ? args.limit : "";
|
|
1070
|
+
const key = `${readString2(input, "sessionID") ?? "s"}::${path}::${offset}:${limit}`;
|
|
1068
1071
|
const hash = hashContent(current);
|
|
1069
1072
|
const decision = decideReadServe(readCache.get(key), { hash, content: current }, compactionGen, path);
|
|
1070
1073
|
readCache.set(key, { hash, content: current, gen: compactionGen });
|
package/dist/cli.js
CHANGED
|
@@ -1858,7 +1858,7 @@ async function handleRequest(request, response, eventsFile, clients, suggestConf
|
|
|
1858
1858
|
sendEmpty(response, 204);
|
|
1859
1859
|
return;
|
|
1860
1860
|
}
|
|
1861
|
-
if (request.method === "POST") {
|
|
1861
|
+
if (request.method === "POST" || url.pathname === "/suggest") {
|
|
1862
1862
|
const origin = request.headers.origin;
|
|
1863
1863
|
if (typeof origin === "string" && !isLoopbackOrigin(origin)) {
|
|
1864
1864
|
sendJson(response, 403, { ok: false, error: { message: "cross-site request blocked" } });
|
package/package.json
CHANGED