neatlogs 1.1.21 → 1.1.23
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/README.md +12 -9
- package/dist/ai-sdk.cjs +153 -24
- package/dist/ai-sdk.cjs.map +1 -1
- package/dist/ai-sdk.d.ts +30 -6
- package/dist/ai-sdk.mjs +153 -24
- package/dist/ai-sdk.mjs.map +1 -1
- package/dist/cli.cjs +25 -8
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +25 -8
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +181 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +181 -35
- package/dist/index.mjs.map +1 -1
- package/dist/opencode-plugin.cjs +1 -1
- package/dist/opencode-plugin.cjs.map +1 -1
- package/dist/opencode-plugin.mjs +1 -1
- package/dist/opencode-plugin.mjs.map +1 -1
- package/package.json +15 -3
package/dist/cli.cjs
CHANGED
|
@@ -7104,7 +7104,7 @@ var TELEMETRY_CONFLICT_PRECEDENCE = Object.freeze(
|
|
|
7104
7104
|
);
|
|
7105
7105
|
|
|
7106
7106
|
// src/version.ts
|
|
7107
|
-
var __version__ = "1.1.
|
|
7107
|
+
var __version__ = "1.1.23";
|
|
7108
7108
|
|
|
7109
7109
|
// src/init.ts
|
|
7110
7110
|
var path2 = __toESM(require("path"));
|
|
@@ -8585,6 +8585,19 @@ var UnifiedAttributeProcessor = class {
|
|
|
8585
8585
|
attrs["llm.output_messages.0.message.role"] = "assistant";
|
|
8586
8586
|
attrs["llm.output_messages.0.message.content"] = typeof obj === "string" ? obj : JSON.stringify(obj);
|
|
8587
8587
|
}
|
|
8588
|
+
const responseReasoning = attrs["ai.response.reasoning"];
|
|
8589
|
+
if (typeof responseReasoning === "string" && responseReasoning.length > 0 && !("neatlogs.llm.output_messages.0.thinking" in attrs)) {
|
|
8590
|
+
attrs["neatlogs.llm.output_messages.0.thinking"] = responseReasoning;
|
|
8591
|
+
}
|
|
8592
|
+
const thinking = attrs["neatlogs.llm.output_messages.0.thinking"];
|
|
8593
|
+
if (typeof thinking === "string" && thinking.length > 0) {
|
|
8594
|
+
if (!("neatlogs.llm.thinking" in attrs)) {
|
|
8595
|
+
attrs["neatlogs.llm.thinking"] = thinking;
|
|
8596
|
+
}
|
|
8597
|
+
if (!("neatlogs.llm.has_thinking" in attrs)) {
|
|
8598
|
+
attrs["neatlogs.llm.has_thinking"] = "true";
|
|
8599
|
+
}
|
|
8600
|
+
}
|
|
8588
8601
|
if ("ai.response.finishReason" in attrs && !("llm.response.finish_reason" in attrs)) {
|
|
8589
8602
|
attrs["llm.response.finish_reason"] = attrs["ai.response.finishReason"];
|
|
8590
8603
|
}
|
|
@@ -10523,12 +10536,16 @@ var ObservableBatchLogRecordProcessor = class extends import_sdk_logs.BatchLogRe
|
|
|
10523
10536
|
// src/core/log.ts
|
|
10524
10537
|
var import_node_async_hooks5 = require("async_hooks");
|
|
10525
10538
|
var logger13 = getLogger();
|
|
10526
|
-
var
|
|
10527
|
-
var
|
|
10539
|
+
var LOG_RUNTIME_STATE_KEY = /* @__PURE__ */ Symbol.for("neatlogs.log_runtime_state");
|
|
10540
|
+
var neatlogsGlobal3 = globalThis;
|
|
10541
|
+
var logRuntimeState = neatlogsGlobal3[LOG_RUNTIME_STATE_KEY] ?? (neatlogsGlobal3[LOG_RUNTIME_STATE_KEY] = {
|
|
10542
|
+
otelLogger: null,
|
|
10543
|
+
debugMode: false
|
|
10544
|
+
});
|
|
10528
10545
|
var stdoutCaptureContext = new import_node_async_hooks5.AsyncLocalStorage();
|
|
10529
10546
|
function _setOtelLogger(otelLogger, debug) {
|
|
10530
|
-
|
|
10531
|
-
|
|
10547
|
+
logRuntimeState.otelLogger = otelLogger;
|
|
10548
|
+
logRuntimeState.debugMode = debug;
|
|
10532
10549
|
}
|
|
10533
10550
|
|
|
10534
10551
|
// src/prompt/client.ts
|
|
@@ -11357,7 +11374,7 @@ var _logProvider = null;
|
|
|
11357
11374
|
var _spanProcessor = null;
|
|
11358
11375
|
var _transportSpanProcessors = [];
|
|
11359
11376
|
var _completionProcessor = null;
|
|
11360
|
-
var
|
|
11377
|
+
var _debugMode = false;
|
|
11361
11378
|
var _deliveryDiagnostics = new DeliveryDiagnostics();
|
|
11362
11379
|
var _initIdentity = null;
|
|
11363
11380
|
var _effectiveSampleRate = 1;
|
|
@@ -11649,7 +11666,7 @@ async function _performInit(options) {
|
|
|
11649
11666
|
if (options.debug) {
|
|
11650
11667
|
enableDebugLogging();
|
|
11651
11668
|
}
|
|
11652
|
-
|
|
11669
|
+
_debugMode = options.debug ?? false;
|
|
11653
11670
|
const resolvedWorkflowName = _resolveWorkflowName(options.workflowName);
|
|
11654
11671
|
const endpoint = resolveInitEndpoint(options.endpoint);
|
|
11655
11672
|
const baseUrl = resolveIngestBaseUrl(endpoint);
|
|
@@ -11987,7 +12004,7 @@ async function _performShutdown(terminationReason, timeoutMs) {
|
|
|
11987
12004
|
_spanProcessor = null;
|
|
11988
12005
|
_transportSpanProcessors = [];
|
|
11989
12006
|
_completionProcessor = null;
|
|
11990
|
-
|
|
12007
|
+
_debugMode = false;
|
|
11991
12008
|
_effectiveSampleRate = 1;
|
|
11992
12009
|
_exportEnabled = false;
|
|
11993
12010
|
_queueMaxSize = 2048;
|