@funnycode/myclaude 0.1.104 → 0.1.106
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/myclaude.js +95 -36
- package/dist/myclaude.mjs +95 -36
- package/package.json +1 -1
package/dist/myclaude.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// MACRO - build-time constants (injected by build.ts)
|
|
5
5
|
// MACRO injected by build script
|
|
6
6
|
globalThis.MACRO = {
|
|
7
|
-
VERSION: "0.1.
|
|
8
|
-
BUILD_TIME: "2026-07-
|
|
7
|
+
VERSION: "0.1.106",
|
|
8
|
+
BUILD_TIME: "2026-07-19T19:22:14.042Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117491,7 +117491,7 @@ var package_default;
|
|
|
117491
117491
|
var init_package = __esm(() => {
|
|
117492
117492
|
package_default = {
|
|
117493
117493
|
name: "@funnycode/myclaude",
|
|
117494
|
-
version: "0.1.
|
|
117494
|
+
version: "0.1.106",
|
|
117495
117495
|
private: false,
|
|
117496
117496
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117497
117497
|
license: "MIT",
|
|
@@ -210173,27 +210173,29 @@ function enqueueDumpRequest(agentIdOrSessionId, callback) {
|
|
|
210173
210173
|
async function processQueue(agentIdOrSessionId) {
|
|
210174
210174
|
try {
|
|
210175
210175
|
while (true) {
|
|
210176
|
+
while (true) {
|
|
210177
|
+
const queue2 = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210178
|
+
if (!queue2 || queue2.length === 0) {
|
|
210179
|
+
break;
|
|
210180
|
+
}
|
|
210181
|
+
const callback = queue2.shift();
|
|
210182
|
+
try {
|
|
210183
|
+
await callback();
|
|
210184
|
+
} catch (err2) {
|
|
210185
|
+
logForDebugging(`dumpPrompts.processQueue: callback threw: ${err2}`, { level: "error" });
|
|
210186
|
+
}
|
|
210187
|
+
}
|
|
210176
210188
|
const queue = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210177
210189
|
if (!queue || queue.length === 0) {
|
|
210178
|
-
break;
|
|
210179
|
-
}
|
|
210180
|
-
const callback = queue.shift();
|
|
210181
|
-
await callback();
|
|
210182
|
-
}
|
|
210183
|
-
} finally {
|
|
210184
|
-
const queue = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210185
|
-
if (queue && queue.length > 0) {
|
|
210186
|
-
try {
|
|
210187
|
-
await processQueue(agentIdOrSessionId);
|
|
210188
|
-
} catch (err2) {
|
|
210189
|
-
logError2(`processQueue: recursive call failed for ${agentIdOrSessionId}`, err2);
|
|
210190
210190
|
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210191
210191
|
processingFlags.delete(agentIdOrSessionId);
|
|
210192
|
+
return;
|
|
210192
210193
|
}
|
|
210193
|
-
} else {
|
|
210194
|
-
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210195
|
-
processingFlags.delete(agentIdOrSessionId);
|
|
210196
210194
|
}
|
|
210195
|
+
} catch (err2) {
|
|
210196
|
+
logError2(`processQueue: failed for ${agentIdOrSessionId}`, err2);
|
|
210197
|
+
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210198
|
+
processingFlags.delete(agentIdOrSessionId);
|
|
210197
210199
|
}
|
|
210198
210200
|
}
|
|
210199
210201
|
function clearDumpState(agentIdOrSessionId) {
|
|
@@ -210328,9 +210330,56 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210328
210330
|
bufferChunks.push(decoded);
|
|
210329
210331
|
bufferLength += decoded.length;
|
|
210330
210332
|
if (bufferLength > MAX_BUFFER_SIZE2) {
|
|
210331
|
-
logForDebugging("dumpPrompts: buffer exceeded max size,
|
|
210332
|
-
|
|
210333
|
-
|
|
210333
|
+
logForDebugging("dumpPrompts: buffer exceeded max size, extracting complete events", { level: "warn" });
|
|
210334
|
+
const fullBuffer = bufferChunks.join("");
|
|
210335
|
+
const lastDoubleNewline2 = fullBuffer.lastIndexOf(`
|
|
210336
|
+
|
|
210337
|
+
`);
|
|
210338
|
+
if (lastDoubleNewline2 !== -1) {
|
|
210339
|
+
const completeEvents = fullBuffer.slice(0, lastDoubleNewline2);
|
|
210340
|
+
const incomplete = fullBuffer.slice(lastDoubleNewline2 + 2);
|
|
210341
|
+
for (const event of completeEvents.split(`
|
|
210342
|
+
|
|
210343
|
+
`)) {
|
|
210344
|
+
let dataLines = [];
|
|
210345
|
+
for (const line of event.split(`
|
|
210346
|
+
`)) {
|
|
210347
|
+
if (line.startsWith("data: ") && line !== "data: [DONE]") {
|
|
210348
|
+
dataLines.push(line.slice(6));
|
|
210349
|
+
}
|
|
210350
|
+
}
|
|
210351
|
+
if (dataLines.length > 0) {
|
|
210352
|
+
try {
|
|
210353
|
+
const chunk = jsonParse(dataLines.join(`
|
|
210354
|
+
`));
|
|
210355
|
+
chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
|
|
210356
|
+
if (chunkEntries.length >= 50) {
|
|
210357
|
+
await appendToFile(filePath, chunkEntries);
|
|
210358
|
+
chunkEntries.length = 0;
|
|
210359
|
+
}
|
|
210360
|
+
} catch (err2) {
|
|
210361
|
+
logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
|
|
210362
|
+
}
|
|
210363
|
+
}
|
|
210364
|
+
}
|
|
210365
|
+
bufferChunks.length = 0;
|
|
210366
|
+
bufferChunks.push(incomplete);
|
|
210367
|
+
bufferLength = incomplete.length;
|
|
210368
|
+
if (bufferLength > MAX_BUFFER_SIZE2) {
|
|
210369
|
+
logForDebugging("dumpPrompts: incomplete buffer still exceeds max size, truncating", { level: "warn" });
|
|
210370
|
+
const truncated = incomplete.slice(-MAX_BUFFER_SIZE2);
|
|
210371
|
+
bufferChunks.length = 0;
|
|
210372
|
+
bufferChunks.push(truncated);
|
|
210373
|
+
bufferLength = truncated.length;
|
|
210374
|
+
}
|
|
210375
|
+
} else {
|
|
210376
|
+
logForDebugging("dumpPrompts: no complete events, truncating buffer", { level: "warn" });
|
|
210377
|
+
const fullBuffer2 = bufferChunks.join("");
|
|
210378
|
+
const truncated = fullBuffer2.slice(-MAX_BUFFER_SIZE2);
|
|
210379
|
+
bufferChunks.length = 0;
|
|
210380
|
+
bufferChunks.push(truncated);
|
|
210381
|
+
bufferLength = truncated.length;
|
|
210382
|
+
}
|
|
210334
210383
|
continue;
|
|
210335
210384
|
}
|
|
210336
210385
|
const buffer2 = bufferChunks.join("");
|
|
@@ -210346,19 +210395,24 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210346
210395
|
for (const event of completeEvents.split(`
|
|
210347
210396
|
|
|
210348
210397
|
`)) {
|
|
210398
|
+
let dataLines = [];
|
|
210349
210399
|
for (const line of event.split(`
|
|
210350
210400
|
`)) {
|
|
210351
210401
|
if (line.startsWith("data: ") && line !== "data: [DONE]") {
|
|
210352
|
-
|
|
210353
|
-
|
|
210354
|
-
|
|
210355
|
-
|
|
210356
|
-
|
|
210357
|
-
|
|
210358
|
-
|
|
210359
|
-
|
|
210360
|
-
|
|
210402
|
+
dataLines.push(line.slice(6));
|
|
210403
|
+
}
|
|
210404
|
+
}
|
|
210405
|
+
if (dataLines.length > 0) {
|
|
210406
|
+
try {
|
|
210407
|
+
const chunk = jsonParse(dataLines.join(`
|
|
210408
|
+
`));
|
|
210409
|
+
chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
|
|
210410
|
+
if (chunkEntries.length >= 50) {
|
|
210411
|
+
await appendToFile(filePath, chunkEntries);
|
|
210412
|
+
chunkEntries.length = 0;
|
|
210361
210413
|
}
|
|
210414
|
+
} catch (err2) {
|
|
210415
|
+
logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
|
|
210362
210416
|
}
|
|
210363
210417
|
}
|
|
210364
210418
|
}
|
|
@@ -210372,15 +210426,20 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210372
210426
|
for (const event of buffer.split(`
|
|
210373
210427
|
|
|
210374
210428
|
`)) {
|
|
210429
|
+
let dataLines = [];
|
|
210375
210430
|
for (const line of event.split(`
|
|
210376
210431
|
`)) {
|
|
210377
210432
|
if (line.startsWith("data: ") && line !== "data: [DONE]") {
|
|
210378
|
-
|
|
210379
|
-
|
|
210380
|
-
|
|
210381
|
-
|
|
210382
|
-
|
|
210383
|
-
|
|
210433
|
+
dataLines.push(line.slice(6));
|
|
210434
|
+
}
|
|
210435
|
+
}
|
|
210436
|
+
if (dataLines.length > 0) {
|
|
210437
|
+
try {
|
|
210438
|
+
const chunk = jsonParse(dataLines.join(`
|
|
210439
|
+
`));
|
|
210440
|
+
chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
|
|
210441
|
+
} catch (err2) {
|
|
210442
|
+
logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
|
|
210384
210443
|
}
|
|
210385
210444
|
}
|
|
210386
210445
|
}
|
package/dist/myclaude.mjs
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// MACRO - build-time constants (injected by build.ts)
|
|
5
5
|
// MACRO injected by build script
|
|
6
6
|
globalThis.MACRO = {
|
|
7
|
-
VERSION: "0.1.
|
|
8
|
-
BUILD_TIME: "2026-07-
|
|
7
|
+
VERSION: "0.1.106",
|
|
8
|
+
BUILD_TIME: "2026-07-19T19:22:14.042Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117491,7 +117491,7 @@ var package_default;
|
|
|
117491
117491
|
var init_package = __esm(() => {
|
|
117492
117492
|
package_default = {
|
|
117493
117493
|
name: "@funnycode/myclaude",
|
|
117494
|
-
version: "0.1.
|
|
117494
|
+
version: "0.1.106",
|
|
117495
117495
|
private: false,
|
|
117496
117496
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117497
117497
|
license: "MIT",
|
|
@@ -210173,27 +210173,29 @@ function enqueueDumpRequest(agentIdOrSessionId, callback) {
|
|
|
210173
210173
|
async function processQueue(agentIdOrSessionId) {
|
|
210174
210174
|
try {
|
|
210175
210175
|
while (true) {
|
|
210176
|
+
while (true) {
|
|
210177
|
+
const queue2 = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210178
|
+
if (!queue2 || queue2.length === 0) {
|
|
210179
|
+
break;
|
|
210180
|
+
}
|
|
210181
|
+
const callback = queue2.shift();
|
|
210182
|
+
try {
|
|
210183
|
+
await callback();
|
|
210184
|
+
} catch (err2) {
|
|
210185
|
+
logForDebugging(`dumpPrompts.processQueue: callback threw: ${err2}`, { level: "error" });
|
|
210186
|
+
}
|
|
210187
|
+
}
|
|
210176
210188
|
const queue = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210177
210189
|
if (!queue || queue.length === 0) {
|
|
210178
|
-
break;
|
|
210179
|
-
}
|
|
210180
|
-
const callback = queue.shift();
|
|
210181
|
-
await callback();
|
|
210182
|
-
}
|
|
210183
|
-
} finally {
|
|
210184
|
-
const queue = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210185
|
-
if (queue && queue.length > 0) {
|
|
210186
|
-
try {
|
|
210187
|
-
await processQueue(agentIdOrSessionId);
|
|
210188
|
-
} catch (err2) {
|
|
210189
|
-
logError2(`processQueue: recursive call failed for ${agentIdOrSessionId}`, err2);
|
|
210190
210190
|
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210191
210191
|
processingFlags.delete(agentIdOrSessionId);
|
|
210192
|
+
return;
|
|
210192
210193
|
}
|
|
210193
|
-
} else {
|
|
210194
|
-
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210195
|
-
processingFlags.delete(agentIdOrSessionId);
|
|
210196
210194
|
}
|
|
210195
|
+
} catch (err2) {
|
|
210196
|
+
logError2(`processQueue: failed for ${agentIdOrSessionId}`, err2);
|
|
210197
|
+
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210198
|
+
processingFlags.delete(agentIdOrSessionId);
|
|
210197
210199
|
}
|
|
210198
210200
|
}
|
|
210199
210201
|
function clearDumpState(agentIdOrSessionId) {
|
|
@@ -210328,9 +210330,56 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210328
210330
|
bufferChunks.push(decoded);
|
|
210329
210331
|
bufferLength += decoded.length;
|
|
210330
210332
|
if (bufferLength > MAX_BUFFER_SIZE2) {
|
|
210331
|
-
logForDebugging("dumpPrompts: buffer exceeded max size,
|
|
210332
|
-
|
|
210333
|
-
|
|
210333
|
+
logForDebugging("dumpPrompts: buffer exceeded max size, extracting complete events", { level: "warn" });
|
|
210334
|
+
const fullBuffer = bufferChunks.join("");
|
|
210335
|
+
const lastDoubleNewline2 = fullBuffer.lastIndexOf(`
|
|
210336
|
+
|
|
210337
|
+
`);
|
|
210338
|
+
if (lastDoubleNewline2 !== -1) {
|
|
210339
|
+
const completeEvents = fullBuffer.slice(0, lastDoubleNewline2);
|
|
210340
|
+
const incomplete = fullBuffer.slice(lastDoubleNewline2 + 2);
|
|
210341
|
+
for (const event of completeEvents.split(`
|
|
210342
|
+
|
|
210343
|
+
`)) {
|
|
210344
|
+
let dataLines = [];
|
|
210345
|
+
for (const line of event.split(`
|
|
210346
|
+
`)) {
|
|
210347
|
+
if (line.startsWith("data: ") && line !== "data: [DONE]") {
|
|
210348
|
+
dataLines.push(line.slice(6));
|
|
210349
|
+
}
|
|
210350
|
+
}
|
|
210351
|
+
if (dataLines.length > 0) {
|
|
210352
|
+
try {
|
|
210353
|
+
const chunk = jsonParse(dataLines.join(`
|
|
210354
|
+
`));
|
|
210355
|
+
chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
|
|
210356
|
+
if (chunkEntries.length >= 50) {
|
|
210357
|
+
await appendToFile(filePath, chunkEntries);
|
|
210358
|
+
chunkEntries.length = 0;
|
|
210359
|
+
}
|
|
210360
|
+
} catch (err2) {
|
|
210361
|
+
logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
|
|
210362
|
+
}
|
|
210363
|
+
}
|
|
210364
|
+
}
|
|
210365
|
+
bufferChunks.length = 0;
|
|
210366
|
+
bufferChunks.push(incomplete);
|
|
210367
|
+
bufferLength = incomplete.length;
|
|
210368
|
+
if (bufferLength > MAX_BUFFER_SIZE2) {
|
|
210369
|
+
logForDebugging("dumpPrompts: incomplete buffer still exceeds max size, truncating", { level: "warn" });
|
|
210370
|
+
const truncated = incomplete.slice(-MAX_BUFFER_SIZE2);
|
|
210371
|
+
bufferChunks.length = 0;
|
|
210372
|
+
bufferChunks.push(truncated);
|
|
210373
|
+
bufferLength = truncated.length;
|
|
210374
|
+
}
|
|
210375
|
+
} else {
|
|
210376
|
+
logForDebugging("dumpPrompts: no complete events, truncating buffer", { level: "warn" });
|
|
210377
|
+
const fullBuffer2 = bufferChunks.join("");
|
|
210378
|
+
const truncated = fullBuffer2.slice(-MAX_BUFFER_SIZE2);
|
|
210379
|
+
bufferChunks.length = 0;
|
|
210380
|
+
bufferChunks.push(truncated);
|
|
210381
|
+
bufferLength = truncated.length;
|
|
210382
|
+
}
|
|
210334
210383
|
continue;
|
|
210335
210384
|
}
|
|
210336
210385
|
const buffer2 = bufferChunks.join("");
|
|
@@ -210346,19 +210395,24 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210346
210395
|
for (const event of completeEvents.split(`
|
|
210347
210396
|
|
|
210348
210397
|
`)) {
|
|
210398
|
+
let dataLines = [];
|
|
210349
210399
|
for (const line of event.split(`
|
|
210350
210400
|
`)) {
|
|
210351
210401
|
if (line.startsWith("data: ") && line !== "data: [DONE]") {
|
|
210352
|
-
|
|
210353
|
-
|
|
210354
|
-
|
|
210355
|
-
|
|
210356
|
-
|
|
210357
|
-
|
|
210358
|
-
|
|
210359
|
-
|
|
210360
|
-
|
|
210402
|
+
dataLines.push(line.slice(6));
|
|
210403
|
+
}
|
|
210404
|
+
}
|
|
210405
|
+
if (dataLines.length > 0) {
|
|
210406
|
+
try {
|
|
210407
|
+
const chunk = jsonParse(dataLines.join(`
|
|
210408
|
+
`));
|
|
210409
|
+
chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
|
|
210410
|
+
if (chunkEntries.length >= 50) {
|
|
210411
|
+
await appendToFile(filePath, chunkEntries);
|
|
210412
|
+
chunkEntries.length = 0;
|
|
210361
210413
|
}
|
|
210414
|
+
} catch (err2) {
|
|
210415
|
+
logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
|
|
210362
210416
|
}
|
|
210363
210417
|
}
|
|
210364
210418
|
}
|
|
@@ -210372,15 +210426,20 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210372
210426
|
for (const event of buffer.split(`
|
|
210373
210427
|
|
|
210374
210428
|
`)) {
|
|
210429
|
+
let dataLines = [];
|
|
210375
210430
|
for (const line of event.split(`
|
|
210376
210431
|
`)) {
|
|
210377
210432
|
if (line.startsWith("data: ") && line !== "data: [DONE]") {
|
|
210378
|
-
|
|
210379
|
-
|
|
210380
|
-
|
|
210381
|
-
|
|
210382
|
-
|
|
210383
|
-
|
|
210433
|
+
dataLines.push(line.slice(6));
|
|
210434
|
+
}
|
|
210435
|
+
}
|
|
210436
|
+
if (dataLines.length > 0) {
|
|
210437
|
+
try {
|
|
210438
|
+
const chunk = jsonParse(dataLines.join(`
|
|
210439
|
+
`));
|
|
210440
|
+
chunkEntries.push(jsonStringify({ type: "chunk", timestamp, data: chunk }));
|
|
210441
|
+
} catch (err2) {
|
|
210442
|
+
logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
|
|
210384
210443
|
}
|
|
210385
210444
|
}
|
|
210386
210445
|
}
|