mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-25 09:51:28 +00:00
* feat(workspace): search hosts by tag (#3001)
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(cli): bind Skills+CLI chat session via host env
Hide --chat-session from agents so they cannot spoof another chat tenant.
The host injects NETCATTY_CLI_CHAT_SESSION_ID, and Copilot/CodeBuddy
approval gates reject leftover flags and env-prefix overrides.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(ai): isolate Skills+CLI chat env across concurrent SDK turns
Cursor and OpenCode mutate process.env around spawn. Serialize those
writes so overlapping chats cannot inherit or restore the wrong
NETCATTY_CLI_CHAT_SESSION_ID.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Revert "feat(workspace): search hosts by tag (#3001)"
This reverts commit 4b651a3841.
* fix(ai): preserve chat isolation when cancelling Cursor startup
* fix(ai): isolate Cursor turns in cancellable workers
* fix(ai): contain native Cursor cleanup in a utility process
* fix(ai): report Cursor utility process fatal errors
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
25 lines
859 B
JavaScript
25 lines
859 B
JavaScript
"use strict";
|
|
|
|
const { runCursorTurnInProcess } = require("./cursorDriver.cjs");
|
|
|
|
const controller = new AbortController();
|
|
const emitter = {};
|
|
for (const method of [
|
|
"text", "reasoning", "reasoningEnd", "toolCall", "toolResult",
|
|
"sessionId", "emitDone", "emitError",
|
|
]) {
|
|
emitter[method] = (...args) => process.parentPort.postMessage({ type: "event", method, args });
|
|
}
|
|
|
|
let started = false;
|
|
process.parentPort.on("message", ({ data }) => {
|
|
if (data?.type === "abort") controller.abort();
|
|
if (data?.type === "start" && !started) {
|
|
started = true;
|
|
void runCursorTurnInProcess({ ...data.params, emitter, signal: controller.signal }).then(
|
|
(result) => process.parentPort.postMessage({ type: "result", result }),
|
|
(error) => process.parentPort.postMessage({ type: "error", message: error?.message || String(error) }),
|
|
);
|
|
}
|
|
});
|