ticketlens 0.38.55 → 0.38.56
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
|
@@ -33,6 +33,7 @@ import { buildCaptureExcerpt, privateTmpDir } from './recall-nudge-lib.mjs';
|
|
|
33
33
|
import { autoCapture } from '../scripts/lib/summarizer.mjs';
|
|
34
34
|
import { runNoteAdd } from '../scripts/lib/note-command.mjs';
|
|
35
35
|
import { DEFAULT_CONFIG_DIR } from '../scripts/lib/config.mjs';
|
|
36
|
+
import { apiBase } from '../scripts/lib/api-utils.mjs';
|
|
36
37
|
|
|
37
38
|
/** Buffers stream.write() calls instead of touching a real stream — same shape mcp-server.mjs's own capturingStream() uses, this process has no real stdout/stderr worth writing to. */
|
|
38
39
|
function capturingStream() {
|
|
@@ -40,9 +41,12 @@ function capturingStream() {
|
|
|
40
41
|
return { write(s) { parts.push(s); return true; }, get text() { return parts.join(''); } };
|
|
41
42
|
}
|
|
42
43
|
|
|
44
|
+
// backlog #33: every outcome logs its resolved backend URL — "Unauthorized"/
|
|
45
|
+
// "not logged in" reports had no way to attribute which backend was hit
|
|
46
|
+
// (ngrok tunnel rotation and local-dev fallback both silently swap it).
|
|
43
47
|
function logLine(message) {
|
|
44
48
|
try {
|
|
45
|
-
const line = `${new Date().toISOString()} ${message}\n`;
|
|
49
|
+
const line = `${new Date().toISOString()} ${message} [api=${apiBase()}]\n`;
|
|
46
50
|
appendFileSync(join(privateTmpDir(), 'auto-capture.log'), line);
|
|
47
51
|
} catch { /* best-effort — losing a debug log line is not worth failing over */ }
|
|
48
52
|
}
|
|
@@ -85,7 +89,7 @@ export async function runAutoCapture({
|
|
|
85
89
|
try {
|
|
86
90
|
result = await autoCaptureFn({ excerpt, ticketKey, cliToken });
|
|
87
91
|
} catch (err) {
|
|
88
|
-
logLine(`error: ${err.message}`);
|
|
92
|
+
logLine(`error: ${err.message}${err.status ? ` (status=${err.status})` : ''}`);
|
|
89
93
|
return { outcome: 'error', error: err.message };
|
|
90
94
|
}
|
|
91
95
|
|