natureco-cli 5.7.10 → 5.7.11
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natureco-cli",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.11",
|
|
4
4
|
"description": "OpenClaw'dan daha güvenli, daha hızlı, daha ucuz AI agent CLI. Multi-agent, self-evolving skills, audit log, maliyet optimizasyonu ve NatureCo platform-native.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"natureco": "bin/natureco.js"
|
|
@@ -95,20 +95,24 @@ function escapeEmbeddedNewlines(str) {
|
|
|
95
95
|
if (newlineCount === 0) return str;
|
|
96
96
|
|
|
97
97
|
// Paste algılandı — output filter'a sinyal ver ve summary yaz
|
|
98
|
-
|
|
99
|
-
_pasteContext = { lineCount };
|
|
100
|
-
if (process.stdout.isTTY) {
|
|
101
|
-
process.stdout.write(`\r\x1b[2K[Pasted ~${lineCount} lines]\n`);
|
|
102
|
-
}
|
|
98
|
+
onPasteDetected(str);
|
|
103
99
|
|
|
104
100
|
return str.replace(/\r\n|\r|\n/g, NEWLINE_PLACEHOLDER);
|
|
105
101
|
}
|
|
106
102
|
|
|
103
|
+
function onPasteDetected(pasteStr) {
|
|
104
|
+
const newlineCount = (pasteStr.match(/\r\n|\r|\n/g) || []).length;
|
|
105
|
+
const lineCount = newlineCount + 1;
|
|
106
|
+
_pasteContext = { lineCount };
|
|
107
|
+
process.stdout.write(`[Pasted ~${lineCount} lines]\n`);
|
|
108
|
+
}
|
|
109
|
+
|
|
107
110
|
function createPasteSafeInput(source = process.stdin) {
|
|
108
111
|
const proxy = new PassThrough();
|
|
109
112
|
|
|
110
113
|
let inPaste = false;
|
|
111
114
|
let carry = ''; // marker'ın chunk sınırında bölünmesine karşı tampon
|
|
115
|
+
let pasteBuffer = ''; // onPasteDetected için biriken paste içeriği
|
|
112
116
|
|
|
113
117
|
const onData = (chunk) => {
|
|
114
118
|
let str = carry + chunk.toString('utf8');
|
|
@@ -121,14 +125,19 @@ function createPasteSafeInput(source = process.stdin) {
|
|
|
121
125
|
if (endIdx === -1) {
|
|
122
126
|
const keepLen = trailingMarkerPrefixLen(str, PASTE_END);
|
|
123
127
|
const flushLen = str.length - keepLen;
|
|
124
|
-
|
|
128
|
+
const segment = str.slice(0, flushLen);
|
|
129
|
+
pasteBuffer += segment;
|
|
130
|
+
out += segment.replace(/\r\n|\r|\n/g, NEWLINE_PLACEHOLDER);
|
|
125
131
|
carry = str.slice(flushLen);
|
|
126
132
|
str = '';
|
|
127
133
|
break;
|
|
128
134
|
}
|
|
129
135
|
const pasted = str.slice(0, endIdx);
|
|
136
|
+
pasteBuffer += pasted;
|
|
130
137
|
out += pasted.replace(/\r\n|\r|\n/g, NEWLINE_PLACEHOLDER);
|
|
131
138
|
inPaste = false;
|
|
139
|
+
onPasteDetected(pasteBuffer);
|
|
140
|
+
pasteBuffer = '';
|
|
132
141
|
str = str.slice(endIdx + PASTE_END.length);
|
|
133
142
|
continue;
|
|
134
143
|
}
|