@funnycode/myclaude 0.1.102 → 0.1.103
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 +29 -12
- package/dist/myclaude.mjs +29 -12
- 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.103",
|
|
8
|
+
BUILD_TIME: "2026-07-19T11:40:36.817Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117484,7 +117484,7 @@ var package_default;
|
|
|
117484
117484
|
var init_package = __esm(() => {
|
|
117485
117485
|
package_default = {
|
|
117486
117486
|
name: "@funnycode/myclaude",
|
|
117487
|
-
version: "0.1.
|
|
117487
|
+
version: "0.1.103",
|
|
117488
117488
|
private: false,
|
|
117489
117489
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117490
117490
|
license: "MIT",
|
|
@@ -210291,10 +210291,12 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210291
210291
|
dumpState.set(agentIdOrSessionId, state);
|
|
210292
210292
|
let timestamp;
|
|
210293
210293
|
if (init2?.method === "POST" && init2.body) {
|
|
210294
|
-
|
|
210295
|
-
|
|
210296
|
-
|
|
210297
|
-
|
|
210294
|
+
if (process.env.USER_TYPE === "ant") {
|
|
210295
|
+
timestamp = new Date().toISOString();
|
|
210296
|
+
enqueueDumpRequest(agentIdOrSessionId, async () => {
|
|
210297
|
+
await dumpRequest(init2.body, timestamp, state, filePath);
|
|
210298
|
+
});
|
|
210299
|
+
}
|
|
210298
210300
|
}
|
|
210299
210301
|
const response = await globalThis.fetch(input, init2);
|
|
210300
210302
|
if (timestamp && response.ok && true && process.env.USER_TYPE === "ant" && process.env.DUMP_PROMPTS === "1") {
|
|
@@ -210306,20 +210308,34 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210306
210308
|
if (isStreaming && cloned.body) {
|
|
210307
210309
|
const reader = cloned.body.getReader();
|
|
210308
210310
|
const decoder = new TextDecoder;
|
|
210309
|
-
|
|
210311
|
+
const bufferChunks = [];
|
|
210312
|
+
let bufferLength = 0;
|
|
210313
|
+
const MAX_BUFFER_SIZE2 = 10 * 1024 * 1024;
|
|
210310
210314
|
const chunkEntries = [];
|
|
210311
210315
|
try {
|
|
210312
210316
|
while (true) {
|
|
210313
210317
|
const { done, value } = await reader.read();
|
|
210314
210318
|
if (done)
|
|
210315
210319
|
break;
|
|
210316
|
-
|
|
210317
|
-
|
|
210320
|
+
const decoded = decoder.decode(value, { stream: true });
|
|
210321
|
+
bufferChunks.push(decoded);
|
|
210322
|
+
bufferLength += decoded.length;
|
|
210323
|
+
if (bufferLength > MAX_BUFFER_SIZE2) {
|
|
210324
|
+
logForDebugging("dumpPrompts: buffer exceeded max size, skipping event", { level: "warn" });
|
|
210325
|
+
bufferChunks.length = 0;
|
|
210326
|
+
bufferLength = 0;
|
|
210327
|
+
continue;
|
|
210328
|
+
}
|
|
210329
|
+
const buffer2 = bufferChunks.join("");
|
|
210330
|
+
const lastDoubleNewline = buffer2.lastIndexOf(`
|
|
210318
210331
|
|
|
210319
210332
|
`);
|
|
210320
210333
|
if (lastDoubleNewline !== -1) {
|
|
210321
|
-
const completeEvents =
|
|
210322
|
-
|
|
210334
|
+
const completeEvents = buffer2.slice(0, lastDoubleNewline);
|
|
210335
|
+
const incomplete = buffer2.slice(lastDoubleNewline + 2);
|
|
210336
|
+
bufferChunks.length = 0;
|
|
210337
|
+
bufferChunks.push(incomplete);
|
|
210338
|
+
bufferLength = incomplete.length;
|
|
210323
210339
|
for (const event of completeEvents.split(`
|
|
210324
210340
|
|
|
210325
210341
|
`)) {
|
|
@@ -210344,6 +210360,7 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210344
210360
|
} finally {
|
|
210345
210361
|
reader.releaseLock();
|
|
210346
210362
|
}
|
|
210363
|
+
const buffer = bufferChunks.join("");
|
|
210347
210364
|
if (buffer.trim()) {
|
|
210348
210365
|
for (const event of buffer.split(`
|
|
210349
210366
|
|
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.103",
|
|
8
|
+
BUILD_TIME: "2026-07-19T11:40:36.817Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117484,7 +117484,7 @@ var package_default;
|
|
|
117484
117484
|
var init_package = __esm(() => {
|
|
117485
117485
|
package_default = {
|
|
117486
117486
|
name: "@funnycode/myclaude",
|
|
117487
|
-
version: "0.1.
|
|
117487
|
+
version: "0.1.103",
|
|
117488
117488
|
private: false,
|
|
117489
117489
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117490
117490
|
license: "MIT",
|
|
@@ -210291,10 +210291,12 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210291
210291
|
dumpState.set(agentIdOrSessionId, state);
|
|
210292
210292
|
let timestamp;
|
|
210293
210293
|
if (init2?.method === "POST" && init2.body) {
|
|
210294
|
-
|
|
210295
|
-
|
|
210296
|
-
|
|
210297
|
-
|
|
210294
|
+
if (process.env.USER_TYPE === "ant") {
|
|
210295
|
+
timestamp = new Date().toISOString();
|
|
210296
|
+
enqueueDumpRequest(agentIdOrSessionId, async () => {
|
|
210297
|
+
await dumpRequest(init2.body, timestamp, state, filePath);
|
|
210298
|
+
});
|
|
210299
|
+
}
|
|
210298
210300
|
}
|
|
210299
210301
|
const response = await globalThis.fetch(input, init2);
|
|
210300
210302
|
if (timestamp && response.ok && true && process.env.USER_TYPE === "ant" && process.env.DUMP_PROMPTS === "1") {
|
|
@@ -210306,20 +210308,34 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210306
210308
|
if (isStreaming && cloned.body) {
|
|
210307
210309
|
const reader = cloned.body.getReader();
|
|
210308
210310
|
const decoder = new TextDecoder;
|
|
210309
|
-
|
|
210311
|
+
const bufferChunks = [];
|
|
210312
|
+
let bufferLength = 0;
|
|
210313
|
+
const MAX_BUFFER_SIZE2 = 10 * 1024 * 1024;
|
|
210310
210314
|
const chunkEntries = [];
|
|
210311
210315
|
try {
|
|
210312
210316
|
while (true) {
|
|
210313
210317
|
const { done, value } = await reader.read();
|
|
210314
210318
|
if (done)
|
|
210315
210319
|
break;
|
|
210316
|
-
|
|
210317
|
-
|
|
210320
|
+
const decoded = decoder.decode(value, { stream: true });
|
|
210321
|
+
bufferChunks.push(decoded);
|
|
210322
|
+
bufferLength += decoded.length;
|
|
210323
|
+
if (bufferLength > MAX_BUFFER_SIZE2) {
|
|
210324
|
+
logForDebugging("dumpPrompts: buffer exceeded max size, skipping event", { level: "warn" });
|
|
210325
|
+
bufferChunks.length = 0;
|
|
210326
|
+
bufferLength = 0;
|
|
210327
|
+
continue;
|
|
210328
|
+
}
|
|
210329
|
+
const buffer2 = bufferChunks.join("");
|
|
210330
|
+
const lastDoubleNewline = buffer2.lastIndexOf(`
|
|
210318
210331
|
|
|
210319
210332
|
`);
|
|
210320
210333
|
if (lastDoubleNewline !== -1) {
|
|
210321
|
-
const completeEvents =
|
|
210322
|
-
|
|
210334
|
+
const completeEvents = buffer2.slice(0, lastDoubleNewline);
|
|
210335
|
+
const incomplete = buffer2.slice(lastDoubleNewline + 2);
|
|
210336
|
+
bufferChunks.length = 0;
|
|
210337
|
+
bufferChunks.push(incomplete);
|
|
210338
|
+
bufferLength = incomplete.length;
|
|
210323
210339
|
for (const event of completeEvents.split(`
|
|
210324
210340
|
|
|
210325
210341
|
`)) {
|
|
@@ -210344,6 +210360,7 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
|
|
|
210344
210360
|
} finally {
|
|
210345
210361
|
reader.releaseLock();
|
|
210346
210362
|
}
|
|
210363
|
+
const buffer = bufferChunks.join("");
|
|
210347
210364
|
if (buffer.trim()) {
|
|
210348
210365
|
for (const event of buffer.split(`
|
|
210349
210366
|
|