@probelabs/visor 0.1.175-ee → 0.1.176-ee
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/defaults/assistant.yaml +16 -0
- package/defaults/code-talk.yaml +5 -6
- package/dist/ai-review-service.d.ts.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/defaults/assistant.yaml +16 -0
- package/dist/defaults/code-talk.yaml +5 -6
- package/dist/index.js +116 -31
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/sdk/{check-provider-registry-K34RCO6G.mjs → check-provider-registry-VE6LQPLY.mjs} +3 -3
- package/dist/sdk/{check-provider-registry-O36CQEGD.mjs → check-provider-registry-X7WH3PXQ.mjs} +3 -3
- package/dist/sdk/{chunk-4Z6HTWGJ.mjs → chunk-KQAT6H3S.mjs} +69 -30
- package/dist/sdk/chunk-KQAT6H3S.mjs.map +1 -0
- package/dist/sdk/{chunk-MLXGCLZJ.mjs → chunk-MM3TGVQ4.mjs} +6 -2
- package/dist/sdk/chunk-MM3TGVQ4.mjs.map +1 -0
- package/dist/sdk/{chunk-FZPCP444.mjs → chunk-OK4MLC3R.mjs} +69 -30
- package/dist/sdk/chunk-OK4MLC3R.mjs.map +1 -0
- package/dist/sdk/{config-4JMBJKWS.mjs → config-OOUMTCEA.mjs} +2 -2
- package/dist/sdk/{schedule-tool-XOXKUW5G.mjs → schedule-tool-INVLVX3G.mjs} +3 -3
- package/dist/sdk/{schedule-tool-XVSYLH4Z.mjs → schedule-tool-R7NSHTPJ.mjs} +3 -3
- package/dist/sdk/{schedule-tool-handler-3I6AZ4N7.mjs → schedule-tool-handler-4SSRQXFJ.mjs} +3 -3
- package/dist/sdk/{schedule-tool-handler-CFMFHDUL.mjs → schedule-tool-handler-5GTQ6SFI.mjs} +3 -3
- package/dist/sdk/sdk.js +65 -22
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +2 -2
- package/dist/sdk/{workflow-check-provider-ETM452BO.mjs → workflow-check-provider-EY6VSMNG.mjs} +3 -3
- package/dist/sdk/{workflow-check-provider-EV6VCG7M.mjs → workflow-check-provider-IWZSZQ7N.mjs} +3 -3
- package/dist/test-runner/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/sdk/chunk-4Z6HTWGJ.mjs.map +0 -1
- package/dist/sdk/chunk-FZPCP444.mjs.map +0 -1
- package/dist/sdk/chunk-MLXGCLZJ.mjs.map +0 -1
- /package/dist/sdk/{check-provider-registry-K34RCO6G.mjs.map → check-provider-registry-VE6LQPLY.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-O36CQEGD.mjs.map → check-provider-registry-X7WH3PXQ.mjs.map} +0 -0
- /package/dist/sdk/{config-4JMBJKWS.mjs.map → config-OOUMTCEA.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-XOXKUW5G.mjs.map → schedule-tool-INVLVX3G.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-XVSYLH4Z.mjs.map → schedule-tool-R7NSHTPJ.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-3I6AZ4N7.mjs.map → schedule-tool-handler-4SSRQXFJ.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-CFMFHDUL.mjs.map → schedule-tool-handler-5GTQ6SFI.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-ETM452BO.mjs.map → workflow-check-provider-EY6VSMNG.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-EV6VCG7M.mjs.map → workflow-check-provider-IWZSZQ7N.mjs.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ConfigManager,
|
|
3
3
|
VALID_EVENT_TRIGGERS,
|
|
4
4
|
init_config
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MM3TGVQ4.mjs";
|
|
6
6
|
import "./chunk-KWTCTEFT.mjs";
|
|
7
7
|
import "./chunk-LW3INISN.mjs";
|
|
8
8
|
import "./chunk-FT3I25QV.mjs";
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
ConfigManager,
|
|
14
14
|
VALID_EVENT_TRIGGERS
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=config-
|
|
16
|
+
//# sourceMappingURL=config-OOUMTCEA.mjs.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
handleScheduleAction,
|
|
5
5
|
init_schedule_tool,
|
|
6
6
|
isScheduleTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KQAT6H3S.mjs";
|
|
8
8
|
import "./chunk-YSOIR46P.mjs";
|
|
9
9
|
import "./chunk-PDQTEBOJ.mjs";
|
|
10
10
|
import "./chunk-7VTZDC2X.mjs";
|
|
@@ -12,7 +12,7 @@ import "./chunk-B7BVQM5K.mjs";
|
|
|
12
12
|
import "./chunk-XXAEN5KU.mjs";
|
|
13
13
|
import "./chunk-RHKPFJLG.mjs";
|
|
14
14
|
import "./chunk-UBTZE3FO.mjs";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-MM3TGVQ4.mjs";
|
|
16
16
|
import "./chunk-KWTCTEFT.mjs";
|
|
17
17
|
import "./chunk-WJIV7MKY.mjs";
|
|
18
18
|
import "./chunk-EFNNJIMY.mjs";
|
|
@@ -33,4 +33,4 @@ export {
|
|
|
33
33
|
handleScheduleAction,
|
|
34
34
|
isScheduleTool
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=schedule-tool-
|
|
36
|
+
//# sourceMappingURL=schedule-tool-INVLVX3G.mjs.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
handleScheduleAction,
|
|
5
5
|
init_schedule_tool,
|
|
6
6
|
isScheduleTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OK4MLC3R.mjs";
|
|
8
8
|
import "./chunk-YSOIR46P.mjs";
|
|
9
9
|
import "./chunk-PDQTEBOJ.mjs";
|
|
10
10
|
import "./chunk-7VTZDC2X.mjs";
|
|
@@ -12,7 +12,7 @@ import "./chunk-B7BVQM5K.mjs";
|
|
|
12
12
|
import "./chunk-XXAEN5KU.mjs";
|
|
13
13
|
import "./chunk-RHKPFJLG.mjs";
|
|
14
14
|
import "./chunk-UBTZE3FO.mjs";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-MM3TGVQ4.mjs";
|
|
16
16
|
import "./chunk-KWTCTEFT.mjs";
|
|
17
17
|
import "./chunk-WJIV7MKY.mjs";
|
|
18
18
|
import "./chunk-EFNNJIMY.mjs";
|
|
@@ -33,4 +33,4 @@ export {
|
|
|
33
33
|
handleScheduleAction,
|
|
34
34
|
isScheduleTool
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=schedule-tool-
|
|
36
|
+
//# sourceMappingURL=schedule-tool-R7NSHTPJ.mjs.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
extractSlackContext,
|
|
7
7
|
init_schedule_tool_handler,
|
|
8
8
|
isScheduleToolCall
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KQAT6H3S.mjs";
|
|
10
10
|
import "./chunk-YSOIR46P.mjs";
|
|
11
11
|
import "./chunk-PDQTEBOJ.mjs";
|
|
12
12
|
import "./chunk-7VTZDC2X.mjs";
|
|
@@ -14,7 +14,7 @@ import "./chunk-B7BVQM5K.mjs";
|
|
|
14
14
|
import "./chunk-XXAEN5KU.mjs";
|
|
15
15
|
import "./chunk-RHKPFJLG.mjs";
|
|
16
16
|
import "./chunk-UBTZE3FO.mjs";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-MM3TGVQ4.mjs";
|
|
18
18
|
import "./chunk-KWTCTEFT.mjs";
|
|
19
19
|
import "./chunk-WJIV7MKY.mjs";
|
|
20
20
|
import "./chunk-EFNNJIMY.mjs";
|
|
@@ -37,4 +37,4 @@ export {
|
|
|
37
37
|
extractSlackContext,
|
|
38
38
|
isScheduleToolCall
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=schedule-tool-handler-
|
|
40
|
+
//# sourceMappingURL=schedule-tool-handler-4SSRQXFJ.mjs.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
extractSlackContext,
|
|
7
7
|
init_schedule_tool_handler,
|
|
8
8
|
isScheduleToolCall
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OK4MLC3R.mjs";
|
|
10
10
|
import "./chunk-YSOIR46P.mjs";
|
|
11
11
|
import "./chunk-PDQTEBOJ.mjs";
|
|
12
12
|
import "./chunk-7VTZDC2X.mjs";
|
|
@@ -14,7 +14,7 @@ import "./chunk-B7BVQM5K.mjs";
|
|
|
14
14
|
import "./chunk-XXAEN5KU.mjs";
|
|
15
15
|
import "./chunk-RHKPFJLG.mjs";
|
|
16
16
|
import "./chunk-UBTZE3FO.mjs";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-MM3TGVQ4.mjs";
|
|
18
18
|
import "./chunk-KWTCTEFT.mjs";
|
|
19
19
|
import "./chunk-WJIV7MKY.mjs";
|
|
20
20
|
import "./chunk-EFNNJIMY.mjs";
|
|
@@ -37,4 +37,4 @@ export {
|
|
|
37
37
|
extractSlackContext,
|
|
38
38
|
isScheduleToolCall
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=schedule-tool-handler-
|
|
40
|
+
//# sourceMappingURL=schedule-tool-handler-5GTQ6SFI.mjs.map
|
package/dist/sdk/sdk.js
CHANGED
|
@@ -7339,11 +7339,32 @@ function getCurrentDateXml() {
|
|
|
7339
7339
|
}
|
|
7340
7340
|
function createProbeTracerAdapter(fallbackTracer) {
|
|
7341
7341
|
const fallback = fallbackTracer && typeof fallbackTracer === "object" ? fallbackTracer : null;
|
|
7342
|
+
const flattenAttrs = (attrs) => {
|
|
7343
|
+
if (!attrs) return attrs;
|
|
7344
|
+
const out = {};
|
|
7345
|
+
for (const [k, v] of Object.entries(attrs)) {
|
|
7346
|
+
if (v === null || v === void 0) continue;
|
|
7347
|
+
if (typeof v === "string" || typeof v === "number" || typeof v === "boolean") {
|
|
7348
|
+
out[k] = v;
|
|
7349
|
+
} else if (Array.isArray(v)) {
|
|
7350
|
+
if (v.length > 0 && typeof v[0] === "object") {
|
|
7351
|
+
out[k] = JSON.stringify(v);
|
|
7352
|
+
} else {
|
|
7353
|
+
out[k] = v;
|
|
7354
|
+
}
|
|
7355
|
+
} else if (typeof v === "object") {
|
|
7356
|
+
out[k] = JSON.stringify(v);
|
|
7357
|
+
} else {
|
|
7358
|
+
out[k] = v;
|
|
7359
|
+
}
|
|
7360
|
+
}
|
|
7361
|
+
return out;
|
|
7362
|
+
};
|
|
7342
7363
|
const emitEvent = (name, attrs) => {
|
|
7343
7364
|
try {
|
|
7344
7365
|
const span = trace.getActiveSpan();
|
|
7345
7366
|
if (span && typeof span.addEvent === "function") {
|
|
7346
|
-
span.addEvent(name, attrs);
|
|
7367
|
+
span.addEvent(name, flattenAttrs(attrs));
|
|
7347
7368
|
}
|
|
7348
7369
|
} catch {
|
|
7349
7370
|
}
|
|
@@ -7395,6 +7416,21 @@ function createProbeTracerAdapter(fallbackTracer) {
|
|
|
7395
7416
|
}
|
|
7396
7417
|
}
|
|
7397
7418
|
},
|
|
7419
|
+
recordToolDecision: (toolName, params, metadata) => {
|
|
7420
|
+
const paramsStr = typeof params === "string" ? params : JSON.stringify(params || {});
|
|
7421
|
+
emitEvent("tool.decision", {
|
|
7422
|
+
"tool.name": toolName,
|
|
7423
|
+
"tool.params": paramsStr.substring(0, 5e3),
|
|
7424
|
+
"tool.params.length": paramsStr.length,
|
|
7425
|
+
...metadata || {}
|
|
7426
|
+
});
|
|
7427
|
+
if (fallback && typeof fallback.recordToolDecision === "function") {
|
|
7428
|
+
try {
|
|
7429
|
+
fallback.recordToolDecision(toolName, params, metadata);
|
|
7430
|
+
} catch {
|
|
7431
|
+
}
|
|
7432
|
+
}
|
|
7433
|
+
},
|
|
7398
7434
|
recordDelegationEvent: (phase, attrs) => {
|
|
7399
7435
|
emitEvent(`delegation.${phase}`, attrs);
|
|
7400
7436
|
if (fallback && typeof fallback.recordDelegationEvent === "function") {
|
|
@@ -16136,7 +16172,11 @@ var init_config = __esm({
|
|
|
16136
16172
|
"manual",
|
|
16137
16173
|
"schedule",
|
|
16138
16174
|
"webhook_received",
|
|
16139
|
-
"slack_message"
|
|
16175
|
+
"slack_message",
|
|
16176
|
+
"telegram_message",
|
|
16177
|
+
"email_message",
|
|
16178
|
+
"whatsapp_message",
|
|
16179
|
+
"teams_message"
|
|
16140
16180
|
];
|
|
16141
16181
|
ConfigManager = class {
|
|
16142
16182
|
validCheckTypes = [
|
|
@@ -23077,7 +23117,9 @@ var init_ai_check_provider = __esm({
|
|
|
23077
23117
|
const first = Array.from(map.values())[0];
|
|
23078
23118
|
if (!first || typeof first !== "object") return {};
|
|
23079
23119
|
const ev = first.event;
|
|
23080
|
-
const
|
|
23120
|
+
const slackConv = first.slack_conversation;
|
|
23121
|
+
const telegramConv = first.telegram_conversation;
|
|
23122
|
+
const conv = slackConv || telegramConv;
|
|
23081
23123
|
if (!ev && !conv) return {};
|
|
23082
23124
|
if (conv && prInfo) {
|
|
23083
23125
|
try {
|
|
@@ -23085,7 +23127,8 @@ var init_ai_check_provider = __esm({
|
|
|
23085
23127
|
} catch {
|
|
23086
23128
|
}
|
|
23087
23129
|
}
|
|
23088
|
-
|
|
23130
|
+
const transportCtx = slackConv ? { slack: { event: ev, conversation: slackConv } } : { telegram: { event: ev, conversation: telegramConv } };
|
|
23131
|
+
return { ...transportCtx, conversation: conv };
|
|
23089
23132
|
} catch {
|
|
23090
23133
|
return {};
|
|
23091
23134
|
}
|
|
@@ -52189,22 +52232,22 @@ async function executeCheckWithForEachItems2(checkId, forEachParent, forEachItem
|
|
|
52189
52232
|
if (webhookData && webhookData.size > 0) {
|
|
52190
52233
|
for (const payload of webhookData.values()) {
|
|
52191
52234
|
const slackConv = payload?.slack_conversation;
|
|
52192
|
-
|
|
52235
|
+
const telegramConv = payload?.telegram_conversation;
|
|
52236
|
+
const conv = slackConv || telegramConv;
|
|
52237
|
+
if (conv) {
|
|
52193
52238
|
const event = payload?.event;
|
|
52194
|
-
const messageCount = Array.isArray(
|
|
52239
|
+
const messageCount = Array.isArray(conv?.messages) ? conv.messages.length : 0;
|
|
52195
52240
|
if (context2.debug) {
|
|
52196
52241
|
logger.info(
|
|
52197
|
-
`[LevelDispatch]
|
|
52242
|
+
`[LevelDispatch] Conversation extracted (${conv?.transport || "unknown"}): ${messageCount} messages`
|
|
52198
52243
|
);
|
|
52199
52244
|
}
|
|
52245
|
+
const transportCtx = slackConv ? { slack: { event: event || {}, conversation: slackConv } } : { telegram: { event: event || {}, conversation: telegramConv }, webhook: payload };
|
|
52200
52246
|
providerConfig.eventContext = {
|
|
52201
52247
|
...providerConfig.eventContext,
|
|
52202
|
-
|
|
52203
|
-
|
|
52204
|
-
|
|
52205
|
-
},
|
|
52206
|
-
conversation: slackConv
|
|
52207
|
-
// Also expose at top level for convenience
|
|
52248
|
+
...transportCtx,
|
|
52249
|
+
conversation: conv
|
|
52250
|
+
// Expose at top level for all transports
|
|
52208
52251
|
};
|
|
52209
52252
|
break;
|
|
52210
52253
|
}
|
|
@@ -53317,20 +53360,20 @@ async function executeSingleCheck2(checkId, context2, state, emitEvent, transiti
|
|
|
53317
53360
|
if (webhookData && webhookData.size > 0) {
|
|
53318
53361
|
for (const payload of webhookData.values()) {
|
|
53319
53362
|
const slackConv = payload?.slack_conversation;
|
|
53320
|
-
|
|
53363
|
+
const telegramConv = payload?.telegram_conversation;
|
|
53364
|
+
const conv = slackConv || telegramConv;
|
|
53365
|
+
if (conv) {
|
|
53321
53366
|
const event = payload?.event;
|
|
53322
|
-
const messageCount = Array.isArray(
|
|
53367
|
+
const messageCount = Array.isArray(conv?.messages) ? conv.messages.length : 0;
|
|
53323
53368
|
if (context2.debug) {
|
|
53324
|
-
logger.info(`[LevelDispatch]
|
|
53369
|
+
logger.info(`[LevelDispatch] Conversation extracted (${conv?.transport || "unknown"}): ${messageCount} messages`);
|
|
53325
53370
|
}
|
|
53371
|
+
const transportCtx = slackConv ? { slack: { event: event || {}, conversation: slackConv } } : { telegram: { event: event || {}, conversation: telegramConv }, webhook: payload };
|
|
53326
53372
|
providerConfig.eventContext = {
|
|
53327
53373
|
...providerConfig.eventContext,
|
|
53328
|
-
|
|
53329
|
-
|
|
53330
|
-
|
|
53331
|
-
},
|
|
53332
|
-
conversation: slackConv
|
|
53333
|
-
// Also expose at top level for convenience
|
|
53374
|
+
...transportCtx,
|
|
53375
|
+
conversation: conv
|
|
53376
|
+
// Expose at top level for all transports
|
|
53334
53377
|
};
|
|
53335
53378
|
break;
|
|
53336
53379
|
}
|