aisnitch 0.2.1 → 0.2.2
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/cli/index.cjs +17 -2
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +17 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -41,7 +41,7 @@ var import_commander = require("commander");
|
|
|
41
41
|
|
|
42
42
|
// src/package-info.ts
|
|
43
43
|
var AISNITCH_PACKAGE_NAME = "aisnitch";
|
|
44
|
-
var AISNITCH_VERSION = "0.2.
|
|
44
|
+
var AISNITCH_VERSION = "0.2.2";
|
|
45
45
|
var AISNITCH_DESCRIPTION = "Universal bridge for AI coding tool activity \u2014 capture, normalize, stream.";
|
|
46
46
|
|
|
47
47
|
// src/core/events/schema.ts
|
|
@@ -11977,7 +11977,22 @@ function createCliRuntime(dependencies = {}) {
|
|
|
11977
11977
|
if (!lastLine) {
|
|
11978
11978
|
return null;
|
|
11979
11979
|
}
|
|
11980
|
-
|
|
11980
|
+
if (lastLine.startsWith("AISnitch CLI failed:")) {
|
|
11981
|
+
return lastLine;
|
|
11982
|
+
}
|
|
11983
|
+
const structuredFailure = parseStructuredDaemonFailure(lastLine);
|
|
11984
|
+
return structuredFailure === null ? null : `AISnitch daemon startup failed: ${structuredFailure}`;
|
|
11985
|
+
} catch {
|
|
11986
|
+
return null;
|
|
11987
|
+
}
|
|
11988
|
+
}
|
|
11989
|
+
function parseStructuredDaemonFailure(logLine) {
|
|
11990
|
+
try {
|
|
11991
|
+
const parsedLog = JSON.parse(logLine);
|
|
11992
|
+
if (typeof parsedLog.level !== "number" || parsedLog.level < 50) {
|
|
11993
|
+
return null;
|
|
11994
|
+
}
|
|
11995
|
+
return typeof parsedLog.msg === "string" && parsedLog.msg.length > 0 ? parsedLog.msg : logLine;
|
|
11981
11996
|
} catch {
|
|
11982
11997
|
return null;
|
|
11983
11998
|
}
|