@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
package/defaults/assistant.yaml
CHANGED
|
@@ -855,6 +855,22 @@ steps:
|
|
|
855
855
|
- When a tool returns an error, explain what happened and suggest alternatives
|
|
856
856
|
- **CRITICAL: Always use `attempt_completion` tool to submit your final response** - this enables validation of your actions before the response is finalized
|
|
857
857
|
|
|
858
|
+
## CRITICAL: You are an ORCHESTRATOR — Delegate Code Work to Skill Tools
|
|
859
|
+
You are a high-level orchestrator. You MUST NOT read, search, or modify code yourself.
|
|
860
|
+
Delegate ALL code-related work to the appropriate skill tools:
|
|
861
|
+
|
|
862
|
+
- **Code exploration/search/reading** → use the `code-explorer` / `code-talk` tool
|
|
863
|
+
- **Code modifications, file edits, PRs** → use the `engineer` tool
|
|
864
|
+
- **NEVER use bash for code operations** — no grep, find, cat, sed, awk, git diff, or
|
|
865
|
+
any command that reads, searches, or modifies source code files
|
|
866
|
+
- **NEVER use file read/edit/search tools** on code — that is what skill tools are for
|
|
867
|
+
|
|
868
|
+
Bash IS allowed for non-code tasks: curl, API calls, gh CLI queries, jq, etc.
|
|
869
|
+
The rule is simple: if it touches source code → delegate to a skill tool.
|
|
870
|
+
|
|
871
|
+
If you catch yourself about to use bash or file tools for code operations — STOP and
|
|
872
|
+
delegate to the correct skill tool instead.
|
|
873
|
+
|
|
858
874
|
## CRITICAL: Preserve Tool Output Details
|
|
859
875
|
When tools return detailed data (lists, analytics, search results):
|
|
860
876
|
- **DO NOT summarize or compress** the tool output
|
package/defaults/code-talk.yaml
CHANGED
|
@@ -491,14 +491,13 @@ steps:
|
|
|
491
491
|
- "git:rev-parse:*"
|
|
492
492
|
- "git:ls-files:*"
|
|
493
493
|
- "git:ls-tree:*"
|
|
494
|
-
|
|
494
|
+
- "git:worktree:list:*"
|
|
495
|
+
- "git:worktree:remove:*"
|
|
496
|
+
# File operations — ONLY ls and wc allowed
|
|
497
|
+
# Do NOT use cat/grep/find/head/tail for code exploration —
|
|
498
|
+
# use search() and extract() tools instead, they are faster and more accurate
|
|
495
499
|
- "ls:*"
|
|
496
|
-
- "find:*"
|
|
497
|
-
- "cat:*"
|
|
498
|
-
- "head:*"
|
|
499
|
-
- "tail:*"
|
|
500
500
|
- "wc:*"
|
|
501
|
-
- "grep:*"
|
|
502
501
|
# GitHub CLI read-only operations
|
|
503
502
|
- "gh:run:*"
|
|
504
503
|
- "gh:run:list:*"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/ai-review-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAe,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/ai-review-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAe,MAAM,YAAY,CAAC;AA0NxD;;GAEG;AACH,UAAU,gBAAiB,SAAQ,UAAU;IAC3C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAaD,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,aAAa,CAAC;IAClF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC,CAAC;IAExD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,gBAAgB,EAAE,eAAe,CAAC,CAAC;IAEtE,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,iBAAiB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AAgB,GAAG,IAAI;IAIjE;;OAEG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIvC;;OAEG;YACW,iBAAiB;IAiI/B;;OAEG;YACW,eAAe;IAkV7B;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAwEpC,qEAAqE;IACrE,OAAO,CAAC,cAAc;IAmBtB;;;;OAIG;IACH,OAAO,CAAC,iCAAiC;IAkGzC;;OAEG;IACH,OAAO,CAAC,SAAS;IAIjB;;OAEG;YACW,iCAAiC;IA4X/C;;OAEG;YACW,cAAc;IAqmB5B;;OAEG;YACW,iBAAiB;IAkF/B;;OAEG;IACH,OAAO,CAAC,eAAe;IA+VvB;;OAEG;YACW,oBAAoB;IAgDlC;;OAEG;IACH,OAAO,CAAC,eAAe;CAuBxB"}
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/config.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,WAAW,EAGX,YAAY,EAIZ,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAOzC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,YAAY,
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/config.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,WAAW,EAGX,YAAY,EAIZ,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAOzC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,YAAY,EAc9C,CAAC;AAEX;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,eAAe,CAiBrB;IACF,OAAO,CAAC,kBAAk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M5B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IA0DhC;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAwI7B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA6DzB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IA6EhC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA+B5B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAY9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;CA6B1B"}
|
|
@@ -855,6 +855,22 @@ steps:
|
|
|
855
855
|
- When a tool returns an error, explain what happened and suggest alternatives
|
|
856
856
|
- **CRITICAL: Always use `attempt_completion` tool to submit your final response** - this enables validation of your actions before the response is finalized
|
|
857
857
|
|
|
858
|
+
## CRITICAL: You are an ORCHESTRATOR — Delegate Code Work to Skill Tools
|
|
859
|
+
You are a high-level orchestrator. You MUST NOT read, search, or modify code yourself.
|
|
860
|
+
Delegate ALL code-related work to the appropriate skill tools:
|
|
861
|
+
|
|
862
|
+
- **Code exploration/search/reading** → use the `code-explorer` / `code-talk` tool
|
|
863
|
+
- **Code modifications, file edits, PRs** → use the `engineer` tool
|
|
864
|
+
- **NEVER use bash for code operations** — no grep, find, cat, sed, awk, git diff, or
|
|
865
|
+
any command that reads, searches, or modifies source code files
|
|
866
|
+
- **NEVER use file read/edit/search tools** on code — that is what skill tools are for
|
|
867
|
+
|
|
868
|
+
Bash IS allowed for non-code tasks: curl, API calls, gh CLI queries, jq, etc.
|
|
869
|
+
The rule is simple: if it touches source code → delegate to a skill tool.
|
|
870
|
+
|
|
871
|
+
If you catch yourself about to use bash or file tools for code operations — STOP and
|
|
872
|
+
delegate to the correct skill tool instead.
|
|
873
|
+
|
|
858
874
|
## CRITICAL: Preserve Tool Output Details
|
|
859
875
|
When tools return detailed data (lists, analytics, search results):
|
|
860
876
|
- **DO NOT summarize or compress** the tool output
|
|
@@ -491,14 +491,13 @@ steps:
|
|
|
491
491
|
- "git:rev-parse:*"
|
|
492
492
|
- "git:ls-files:*"
|
|
493
493
|
- "git:ls-tree:*"
|
|
494
|
-
|
|
494
|
+
- "git:worktree:list:*"
|
|
495
|
+
- "git:worktree:remove:*"
|
|
496
|
+
# File operations — ONLY ls and wc allowed
|
|
497
|
+
# Do NOT use cat/grep/find/head/tail for code exploration —
|
|
498
|
+
# use search() and extract() tools instead, they are faster and more accurate
|
|
495
499
|
- "ls:*"
|
|
496
|
-
- "find:*"
|
|
497
|
-
- "cat:*"
|
|
498
|
-
- "head:*"
|
|
499
|
-
- "tail:*"
|
|
500
500
|
- "wc:*"
|
|
501
|
-
- "grep:*"
|
|
502
501
|
# GitHub CLI read-only operations
|
|
503
502
|
- "gh:run:*"
|
|
504
503
|
- "gh:run:list:*"
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
process.env.VISOR_VERSION = '0.1.
|
|
2
|
+
process.env.VISOR_VERSION = '0.1.176';
|
|
3
3
|
process.env.PROBE_VERSION = '0.6.0-rc291';
|
|
4
|
-
process.env.VISOR_COMMIT_SHA = '
|
|
5
|
-
process.env.VISOR_COMMIT_SHORT = '
|
|
4
|
+
process.env.VISOR_COMMIT_SHA = 'e7bb0fe8d7a8a33772178036a26d756882ad454b';
|
|
5
|
+
process.env.VISOR_COMMIT_SHORT = 'e7bb0fe';
|
|
6
6
|
/******/ (() => { // webpackBootstrap
|
|
7
7
|
/******/ var __webpack_modules__ = ({
|
|
8
8
|
|
|
@@ -300287,11 +300287,42 @@ function getCurrentDateXml() {
|
|
|
300287
300287
|
}
|
|
300288
300288
|
function createProbeTracerAdapter(fallbackTracer) {
|
|
300289
300289
|
const fallback = fallbackTracer && typeof fallbackTracer === 'object' ? fallbackTracer : null;
|
|
300290
|
+
// OTel span event attributes only support primitive types (string, number, boolean)
|
|
300291
|
+
// and arrays of primitives. Complex values (objects, arrays of objects) are silently
|
|
300292
|
+
// dropped. Flatten them to JSON strings so they survive serialization.
|
|
300293
|
+
const flattenAttrs = (attrs) => {
|
|
300294
|
+
if (!attrs)
|
|
300295
|
+
return attrs;
|
|
300296
|
+
const out = {};
|
|
300297
|
+
for (const [k, v] of Object.entries(attrs)) {
|
|
300298
|
+
if (v === null || v === undefined)
|
|
300299
|
+
continue;
|
|
300300
|
+
if (typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean') {
|
|
300301
|
+
out[k] = v;
|
|
300302
|
+
}
|
|
300303
|
+
else if (Array.isArray(v)) {
|
|
300304
|
+
// Arrays of primitives are OK; arrays of objects need serialization
|
|
300305
|
+
if (v.length > 0 && typeof v[0] === 'object') {
|
|
300306
|
+
out[k] = JSON.stringify(v);
|
|
300307
|
+
}
|
|
300308
|
+
else {
|
|
300309
|
+
out[k] = v;
|
|
300310
|
+
}
|
|
300311
|
+
}
|
|
300312
|
+
else if (typeof v === 'object') {
|
|
300313
|
+
out[k] = JSON.stringify(v);
|
|
300314
|
+
}
|
|
300315
|
+
else {
|
|
300316
|
+
out[k] = v;
|
|
300317
|
+
}
|
|
300318
|
+
}
|
|
300319
|
+
return out;
|
|
300320
|
+
};
|
|
300290
300321
|
const emitEvent = (name, attrs) => {
|
|
300291
300322
|
try {
|
|
300292
300323
|
const span = lazy_otel_1.trace.getActiveSpan();
|
|
300293
300324
|
if (span && typeof span.addEvent === 'function') {
|
|
300294
|
-
span.addEvent(name, attrs);
|
|
300325
|
+
span.addEvent(name, flattenAttrs(attrs));
|
|
300295
300326
|
}
|
|
300296
300327
|
}
|
|
300297
300328
|
catch { }
|
|
@@ -300345,6 +300376,21 @@ function createProbeTracerAdapter(fallbackTracer) {
|
|
|
300345
300376
|
catch { }
|
|
300346
300377
|
}
|
|
300347
300378
|
},
|
|
300379
|
+
recordToolDecision: (toolName, params, metadata) => {
|
|
300380
|
+
const paramsStr = typeof params === 'string' ? params : JSON.stringify(params || {});
|
|
300381
|
+
emitEvent('tool.decision', {
|
|
300382
|
+
'tool.name': toolName,
|
|
300383
|
+
'tool.params': paramsStr.substring(0, 5000),
|
|
300384
|
+
'tool.params.length': paramsStr.length,
|
|
300385
|
+
...(metadata || {}),
|
|
300386
|
+
});
|
|
300387
|
+
if (fallback && typeof fallback.recordToolDecision === 'function') {
|
|
300388
|
+
try {
|
|
300389
|
+
fallback.recordToolDecision(toolName, params, metadata);
|
|
300390
|
+
}
|
|
300391
|
+
catch { }
|
|
300392
|
+
}
|
|
300393
|
+
},
|
|
300348
300394
|
recordDelegationEvent: (phase, attrs) => {
|
|
300349
300395
|
emitEvent(`delegation.${phase}`, attrs);
|
|
300350
300396
|
if (fallback && typeof fallback.recordDelegationEvent === 'function') {
|
|
@@ -306302,6 +306348,10 @@ exports.VALID_EVENT_TRIGGERS = [
|
|
|
306302
306348
|
'schedule',
|
|
306303
306349
|
'webhook_received',
|
|
306304
306350
|
'slack_message',
|
|
306351
|
+
'telegram_message',
|
|
306352
|
+
'email_message',
|
|
306353
|
+
'whatsapp_message',
|
|
306354
|
+
'teams_message',
|
|
306305
306355
|
];
|
|
306306
306356
|
/**
|
|
306307
306357
|
* Configuration manager for Visor
|
|
@@ -326638,7 +326688,9 @@ class AICheckProvider extends check_provider_interface_1.CheckProvider {
|
|
|
326638
326688
|
if (!first || typeof first !== 'object')
|
|
326639
326689
|
return {};
|
|
326640
326690
|
const ev = first.event;
|
|
326641
|
-
const
|
|
326691
|
+
const slackConv = first.slack_conversation;
|
|
326692
|
+
const telegramConv = first.telegram_conversation;
|
|
326693
|
+
const conv = slackConv || telegramConv;
|
|
326642
326694
|
if (!ev && !conv)
|
|
326643
326695
|
return {};
|
|
326644
326696
|
// Attach conversation to prInfo so downstream helpers (XML context) can use it
|
|
@@ -326650,7 +326702,11 @@ class AICheckProvider extends check_provider_interface_1.CheckProvider {
|
|
|
326650
326702
|
// best-effort only
|
|
326651
326703
|
}
|
|
326652
326704
|
}
|
|
326653
|
-
|
|
326705
|
+
// Build transport-specific context
|
|
326706
|
+
const transportCtx = slackConv
|
|
326707
|
+
? { slack: { event: ev, conversation: slackConv } }
|
|
326708
|
+
: { telegram: { event: ev, conversation: telegramConv } };
|
|
326709
|
+
return { ...transportCtx, conversation: conv };
|
|
326654
326710
|
}
|
|
326655
326711
|
catch {
|
|
326656
326712
|
return {};
|
|
@@ -353285,7 +353341,7 @@ async function executeCheckWithForEachItems(checkId, forEachParent, forEachItems
|
|
|
353285
353341
|
}
|
|
353286
353342
|
}
|
|
353287
353343
|
catch { }
|
|
353288
|
-
// Extract
|
|
353344
|
+
// Extract conversation from webhookContext (for Slack/Telegram socket mode)
|
|
353289
353345
|
// The socket-runner stores conversation data in webhookData under the endpoint key
|
|
353290
353346
|
try {
|
|
353291
353347
|
const webhookCtx = context.executionContext?.webhookContext;
|
|
@@ -353294,25 +353350,27 @@ async function executeCheckWithForEachItems(checkId, forEachParent, forEachItems
|
|
|
353294
353350
|
logger_1.logger.info(`[LevelDispatch] webhookContext: ${webhookCtx ? 'present' : 'absent'}, webhookData size: ${webhookData?.size || 0}`);
|
|
353295
353351
|
}
|
|
353296
353352
|
if (webhookData && webhookData.size > 0) {
|
|
353297
|
-
// Find the payload with slack_conversation
|
|
353353
|
+
// Find the payload with slack_conversation or telegram_conversation
|
|
353298
353354
|
for (const payload of webhookData.values()) {
|
|
353299
353355
|
const slackConv = payload?.slack_conversation;
|
|
353300
|
-
|
|
353301
|
-
|
|
353356
|
+
const telegramConv = payload?.telegram_conversation;
|
|
353357
|
+
const conv = slackConv || telegramConv;
|
|
353358
|
+
if (conv) {
|
|
353302
353359
|
const event = payload?.event;
|
|
353303
|
-
const messageCount = Array.isArray(
|
|
353304
|
-
?
|
|
353360
|
+
const messageCount = Array.isArray(conv?.messages)
|
|
353361
|
+
? conv.messages.length
|
|
353305
353362
|
: 0;
|
|
353306
353363
|
if (context.debug) {
|
|
353307
|
-
logger_1.logger.info(`[LevelDispatch]
|
|
353364
|
+
logger_1.logger.info(`[LevelDispatch] Conversation extracted (${conv?.transport || 'unknown'}): ${messageCount} messages`);
|
|
353308
353365
|
}
|
|
353366
|
+
// Build transport-specific context
|
|
353367
|
+
const transportCtx = slackConv
|
|
353368
|
+
? { slack: { event: event || {}, conversation: slackConv } }
|
|
353369
|
+
: { telegram: { event: event || {}, conversation: telegramConv }, webhook: payload };
|
|
353309
353370
|
providerConfig.eventContext = {
|
|
353310
353371
|
...providerConfig.eventContext,
|
|
353311
|
-
|
|
353312
|
-
|
|
353313
|
-
conversation: slackConv,
|
|
353314
|
-
},
|
|
353315
|
-
conversation: slackConv, // Also expose at top level for convenience
|
|
353372
|
+
...transportCtx,
|
|
353373
|
+
conversation: conv, // Expose at top level for all transports
|
|
353316
353374
|
};
|
|
353317
353375
|
break;
|
|
353318
353376
|
}
|
|
@@ -353321,7 +353379,7 @@ async function executeCheckWithForEachItems(checkId, forEachParent, forEachItems
|
|
|
353321
353379
|
}
|
|
353322
353380
|
catch { }
|
|
353323
353381
|
// Fallback: expose conversation from executionContext (for CLI --message)
|
|
353324
|
-
// Only if no
|
|
353382
|
+
// Only if no conversation was set above
|
|
353325
353383
|
try {
|
|
353326
353384
|
if (!providerConfig.eventContext?.conversation &&
|
|
353327
353385
|
context.executionContext?.conversation) {
|
|
@@ -354517,7 +354575,7 @@ async function executeSingleCheck(checkId, context, state, emitEvent, transition
|
|
|
354517
354575
|
}
|
|
354518
354576
|
}
|
|
354519
354577
|
catch { }
|
|
354520
|
-
// Extract
|
|
354578
|
+
// Extract conversation from webhookContext (for Slack/Telegram socket mode)
|
|
354521
354579
|
// The socket-runner stores conversation data in webhookData under the endpoint key
|
|
354522
354580
|
try {
|
|
354523
354581
|
const webhookCtx = context.executionContext?.webhookContext;
|
|
@@ -354526,23 +354584,25 @@ async function executeSingleCheck(checkId, context, state, emitEvent, transition
|
|
|
354526
354584
|
logger_1.logger.info(`[LevelDispatch] webhookContext: ${webhookCtx ? 'present' : 'absent'}, webhookData size: ${webhookData?.size || 0}`);
|
|
354527
354585
|
}
|
|
354528
354586
|
if (webhookData && webhookData.size > 0) {
|
|
354529
|
-
// Find the payload with slack_conversation
|
|
354587
|
+
// Find the payload with slack_conversation or telegram_conversation
|
|
354530
354588
|
for (const payload of webhookData.values()) {
|
|
354531
354589
|
const slackConv = payload?.slack_conversation;
|
|
354532
|
-
|
|
354533
|
-
|
|
354590
|
+
const telegramConv = payload?.telegram_conversation;
|
|
354591
|
+
const conv = slackConv || telegramConv;
|
|
354592
|
+
if (conv) {
|
|
354534
354593
|
const event = payload?.event;
|
|
354535
|
-
const messageCount = Array.isArray(
|
|
354594
|
+
const messageCount = Array.isArray(conv?.messages) ? conv.messages.length : 0;
|
|
354536
354595
|
if (context.debug) {
|
|
354537
|
-
logger_1.logger.info(`[LevelDispatch]
|
|
354596
|
+
logger_1.logger.info(`[LevelDispatch] Conversation extracted (${conv?.transport || 'unknown'}): ${messageCount} messages`);
|
|
354538
354597
|
}
|
|
354598
|
+
// Build transport-specific context
|
|
354599
|
+
const transportCtx = slackConv
|
|
354600
|
+
? { slack: { event: event || {}, conversation: slackConv } }
|
|
354601
|
+
: { telegram: { event: event || {}, conversation: telegramConv }, webhook: payload };
|
|
354539
354602
|
providerConfig.eventContext = {
|
|
354540
354603
|
...providerConfig.eventContext,
|
|
354541
|
-
|
|
354542
|
-
|
|
354543
|
-
conversation: slackConv,
|
|
354544
|
-
},
|
|
354545
|
-
conversation: slackConv, // Also expose at top level for convenience
|
|
354604
|
+
...transportCtx,
|
|
354605
|
+
conversation: conv, // Expose at top level for all transports
|
|
354546
354606
|
};
|
|
354547
354607
|
break;
|
|
354548
354608
|
}
|
|
@@ -354551,7 +354611,7 @@ async function executeSingleCheck(checkId, context, state, emitEvent, transition
|
|
|
354551
354611
|
}
|
|
354552
354612
|
catch { }
|
|
354553
354613
|
// Fallback: expose conversation from executionContext (for CLI --message)
|
|
354554
|
-
// Only if no
|
|
354614
|
+
// Only if no conversation was set above
|
|
354555
354615
|
try {
|
|
354556
354616
|
if (!providerConfig.eventContext?.conversation &&
|
|
354557
354617
|
context.executionContext?.conversation) {
|
|
@@ -364051,6 +364111,31 @@ class VisorTestRunner {
|
|
|
364051
364111
|
catch {
|
|
364052
364112
|
throw new Error(`Explicit tests file not accessible: ${resolved}`);
|
|
364053
364113
|
}
|
|
364114
|
+
// If the explicit path is a config file (not a .tests.yaml), look for
|
|
364115
|
+
// tests files relative to the config file's directory (#503).
|
|
364116
|
+
if (!/\.tests\.ya?ml$/i.test(resolved)) {
|
|
364117
|
+
const configDir = path_1.default.dirname(resolved);
|
|
364118
|
+
const testsCandidates = [
|
|
364119
|
+
path_1.default.resolve(configDir, 'defaults/visor.tests.yaml'),
|
|
364120
|
+
path_1.default.resolve(configDir, 'defaults/visor.tests.yml'),
|
|
364121
|
+
path_1.default.resolve(configDir, '.visor.tests.yaml'),
|
|
364122
|
+
path_1.default.resolve(configDir, '.visor.tests.yml'),
|
|
364123
|
+
];
|
|
364124
|
+
for (const p of testsCandidates) {
|
|
364125
|
+
const np = path_1.default.normalize(p);
|
|
364126
|
+
if (!np.startsWith(normalizedCwd))
|
|
364127
|
+
continue;
|
|
364128
|
+
try {
|
|
364129
|
+
if (fs_1.default.statSync(p).isFile())
|
|
364130
|
+
return p;
|
|
364131
|
+
}
|
|
364132
|
+
catch {
|
|
364133
|
+
continue;
|
|
364134
|
+
}
|
|
364135
|
+
}
|
|
364136
|
+
// Fall through to return the explicit path as-is (loadSuite will
|
|
364137
|
+
// report a clear error if it's not a valid tests file).
|
|
364138
|
+
}
|
|
364054
364139
|
return resolved;
|
|
364055
364140
|
}
|
|
364056
364141
|
const candidates = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/ai-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA6B5C;;GAEG;AACH,qBAAa,eAAgB,SAAQ,aAAa;IAChD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAA0C;IAC9D,OAAO,CAAC,OAAO,CAAwB;;IAQvC,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIxB,8DAA8D;IAC9D,OAAO,CAAC,QAAQ;IAWhB,uFAAuF;IACvF,OAAO,CAAC,sBAAsB;
|
|
1
|
+
{"version":3,"file":"ai-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/ai-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA6B5C;;GAEG;AACH,qBAAa,eAAgB,SAAQ,aAAa;IAChD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAA0C;IAC9D,OAAO,CAAC,OAAO,CAAwB;;IAQvC,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIxB,8DAA8D;IAC9D,OAAO,CAAC,QAAQ;IAWhB,uFAAuF;IACvF,OAAO,CAAC,sBAAsB;IAsCxB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAkDvD;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAqB1B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAiB7B;;OAEG;YACW,aAAa;IA8B3B;;OAEG;YACW,UAAU;IAsExB;;OAEG;YACW,kBAAkB;IA0ChC;;OAEG;YACW,oBAAoB;IA6QlC;;;OAGG;YACW,YAAY;IA6IpB,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC/C,WAAW,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GACjE,OAAO,CAAC,aAAa,CAAC;YAiBX,iBAAiB;IAkoC/B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IA0B3B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAsE7B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA2G5B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA8F5B;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAmE9B;;;OAGG;IACH,OAAO,CAAC,YAAY;IAuBpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAUvB;;;;;OAKG;IACH,MAAM,CAAC,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAWhG,sBAAsB,IAAI,MAAM,EAAE;IA4C5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAYrC,eAAe,IAAI,MAAM,EAAE;CAQ5B"}
|
package/dist/sdk/{check-provider-registry-K34RCO6G.mjs → check-provider-registry-VE6LQPLY.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CheckProviderRegistry,
|
|
3
3
|
init_check_provider_registry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OK4MLC3R.mjs";
|
|
5
5
|
import "./chunk-YSOIR46P.mjs";
|
|
6
6
|
import "./chunk-PDQTEBOJ.mjs";
|
|
7
7
|
import "./chunk-7VTZDC2X.mjs";
|
|
@@ -9,7 +9,7 @@ import "./chunk-B7BVQM5K.mjs";
|
|
|
9
9
|
import "./chunk-XXAEN5KU.mjs";
|
|
10
10
|
import "./chunk-RHKPFJLG.mjs";
|
|
11
11
|
import "./chunk-UBTZE3FO.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-MM3TGVQ4.mjs";
|
|
13
13
|
import "./chunk-KWTCTEFT.mjs";
|
|
14
14
|
import "./chunk-WJIV7MKY.mjs";
|
|
15
15
|
import "./chunk-EFNNJIMY.mjs";
|
|
@@ -27,4 +27,4 @@ init_check_provider_registry();
|
|
|
27
27
|
export {
|
|
28
28
|
CheckProviderRegistry
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=check-provider-registry-
|
|
30
|
+
//# sourceMappingURL=check-provider-registry-VE6LQPLY.mjs.map
|
package/dist/sdk/{check-provider-registry-O36CQEGD.mjs → check-provider-registry-X7WH3PXQ.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CheckProviderRegistry,
|
|
3
3
|
init_check_provider_registry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KQAT6H3S.mjs";
|
|
5
5
|
import "./chunk-YSOIR46P.mjs";
|
|
6
6
|
import "./chunk-PDQTEBOJ.mjs";
|
|
7
7
|
import "./chunk-7VTZDC2X.mjs";
|
|
@@ -9,7 +9,7 @@ import "./chunk-B7BVQM5K.mjs";
|
|
|
9
9
|
import "./chunk-XXAEN5KU.mjs";
|
|
10
10
|
import "./chunk-RHKPFJLG.mjs";
|
|
11
11
|
import "./chunk-UBTZE3FO.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-MM3TGVQ4.mjs";
|
|
13
13
|
import "./chunk-KWTCTEFT.mjs";
|
|
14
14
|
import "./chunk-WJIV7MKY.mjs";
|
|
15
15
|
import "./chunk-EFNNJIMY.mjs";
|
|
@@ -27,4 +27,4 @@ init_check_provider_registry();
|
|
|
27
27
|
export {
|
|
28
28
|
CheckProviderRegistry
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=check-provider-registry-
|
|
30
|
+
//# sourceMappingURL=check-provider-registry-X7WH3PXQ.mjs.map
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
import {
|
|
44
44
|
config_exports,
|
|
45
45
|
init_config
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-MM3TGVQ4.mjs";
|
|
47
47
|
import {
|
|
48
48
|
ExecutionJournal,
|
|
49
49
|
checkLoopBudget,
|
|
@@ -233,11 +233,32 @@ function getCurrentDateXml() {
|
|
|
233
233
|
}
|
|
234
234
|
function createProbeTracerAdapter(fallbackTracer) {
|
|
235
235
|
const fallback = fallbackTracer && typeof fallbackTracer === "object" ? fallbackTracer : null;
|
|
236
|
+
const flattenAttrs = (attrs) => {
|
|
237
|
+
if (!attrs) return attrs;
|
|
238
|
+
const out = {};
|
|
239
|
+
for (const [k, v] of Object.entries(attrs)) {
|
|
240
|
+
if (v === null || v === void 0) continue;
|
|
241
|
+
if (typeof v === "string" || typeof v === "number" || typeof v === "boolean") {
|
|
242
|
+
out[k] = v;
|
|
243
|
+
} else if (Array.isArray(v)) {
|
|
244
|
+
if (v.length > 0 && typeof v[0] === "object") {
|
|
245
|
+
out[k] = JSON.stringify(v);
|
|
246
|
+
} else {
|
|
247
|
+
out[k] = v;
|
|
248
|
+
}
|
|
249
|
+
} else if (typeof v === "object") {
|
|
250
|
+
out[k] = JSON.stringify(v);
|
|
251
|
+
} else {
|
|
252
|
+
out[k] = v;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return out;
|
|
256
|
+
};
|
|
236
257
|
const emitEvent = (name, attrs) => {
|
|
237
258
|
try {
|
|
238
259
|
const span = trace.getActiveSpan();
|
|
239
260
|
if (span && typeof span.addEvent === "function") {
|
|
240
|
-
span.addEvent(name, attrs);
|
|
261
|
+
span.addEvent(name, flattenAttrs(attrs));
|
|
241
262
|
}
|
|
242
263
|
} catch {
|
|
243
264
|
}
|
|
@@ -289,6 +310,21 @@ function createProbeTracerAdapter(fallbackTracer) {
|
|
|
289
310
|
}
|
|
290
311
|
}
|
|
291
312
|
},
|
|
313
|
+
recordToolDecision: (toolName, params, metadata) => {
|
|
314
|
+
const paramsStr = typeof params === "string" ? params : JSON.stringify(params || {});
|
|
315
|
+
emitEvent("tool.decision", {
|
|
316
|
+
"tool.name": toolName,
|
|
317
|
+
"tool.params": paramsStr.substring(0, 5e3),
|
|
318
|
+
"tool.params.length": paramsStr.length,
|
|
319
|
+
...metadata || {}
|
|
320
|
+
});
|
|
321
|
+
if (fallback && typeof fallback.recordToolDecision === "function") {
|
|
322
|
+
try {
|
|
323
|
+
fallback.recordToolDecision(toolName, params, metadata);
|
|
324
|
+
} catch {
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
292
328
|
recordDelegationEvent: (phase, attrs) => {
|
|
293
329
|
emitEvent(`delegation.${phase}`, attrs);
|
|
294
330
|
if (fallback && typeof fallback.recordDelegationEvent === "function") {
|
|
@@ -4006,7 +4042,7 @@ async function executeWorkflowAsTool(workflowId, args, context2, argsOverrides)
|
|
|
4006
4042
|
...args,
|
|
4007
4043
|
...argsOverrides
|
|
4008
4044
|
};
|
|
4009
|
-
const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-
|
|
4045
|
+
const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-IWZSZQ7N.mjs");
|
|
4010
4046
|
const provider = new WorkflowCheckProvider2();
|
|
4011
4047
|
const checkConfig = {
|
|
4012
4048
|
type: "workflow",
|
|
@@ -8765,22 +8801,22 @@ async function executeCheckWithForEachItems2(checkId, forEachParent, forEachItem
|
|
|
8765
8801
|
if (webhookData && webhookData.size > 0) {
|
|
8766
8802
|
for (const payload of webhookData.values()) {
|
|
8767
8803
|
const slackConv = payload?.slack_conversation;
|
|
8768
|
-
|
|
8804
|
+
const telegramConv = payload?.telegram_conversation;
|
|
8805
|
+
const conv = slackConv || telegramConv;
|
|
8806
|
+
if (conv) {
|
|
8769
8807
|
const event = payload?.event;
|
|
8770
|
-
const messageCount = Array.isArray(
|
|
8808
|
+
const messageCount = Array.isArray(conv?.messages) ? conv.messages.length : 0;
|
|
8771
8809
|
if (context2.debug) {
|
|
8772
8810
|
logger.info(
|
|
8773
|
-
`[LevelDispatch]
|
|
8811
|
+
`[LevelDispatch] Conversation extracted (${conv?.transport || "unknown"}): ${messageCount} messages`
|
|
8774
8812
|
);
|
|
8775
8813
|
}
|
|
8814
|
+
const transportCtx = slackConv ? { slack: { event: event || {}, conversation: slackConv } } : { telegram: { event: event || {}, conversation: telegramConv }, webhook: payload };
|
|
8776
8815
|
providerConfig.eventContext = {
|
|
8777
8816
|
...providerConfig.eventContext,
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
},
|
|
8782
|
-
conversation: slackConv
|
|
8783
|
-
// Also expose at top level for convenience
|
|
8817
|
+
...transportCtx,
|
|
8818
|
+
conversation: conv
|
|
8819
|
+
// Expose at top level for all transports
|
|
8784
8820
|
};
|
|
8785
8821
|
break;
|
|
8786
8822
|
}
|
|
@@ -9893,20 +9929,20 @@ async function executeSingleCheck2(checkId, context2, state, emitEvent, transiti
|
|
|
9893
9929
|
if (webhookData && webhookData.size > 0) {
|
|
9894
9930
|
for (const payload of webhookData.values()) {
|
|
9895
9931
|
const slackConv = payload?.slack_conversation;
|
|
9896
|
-
|
|
9932
|
+
const telegramConv = payload?.telegram_conversation;
|
|
9933
|
+
const conv = slackConv || telegramConv;
|
|
9934
|
+
if (conv) {
|
|
9897
9935
|
const event = payload?.event;
|
|
9898
|
-
const messageCount = Array.isArray(
|
|
9936
|
+
const messageCount = Array.isArray(conv?.messages) ? conv.messages.length : 0;
|
|
9899
9937
|
if (context2.debug) {
|
|
9900
|
-
logger.info(`[LevelDispatch]
|
|
9938
|
+
logger.info(`[LevelDispatch] Conversation extracted (${conv?.transport || "unknown"}): ${messageCount} messages`);
|
|
9901
9939
|
}
|
|
9940
|
+
const transportCtx = slackConv ? { slack: { event: event || {}, conversation: slackConv } } : { telegram: { event: event || {}, conversation: telegramConv }, webhook: payload };
|
|
9902
9941
|
providerConfig.eventContext = {
|
|
9903
9942
|
...providerConfig.eventContext,
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
},
|
|
9908
|
-
conversation: slackConv
|
|
9909
|
-
// Also expose at top level for convenience
|
|
9943
|
+
...transportCtx,
|
|
9944
|
+
conversation: conv
|
|
9945
|
+
// Expose at top level for all transports
|
|
9910
9946
|
};
|
|
9911
9947
|
break;
|
|
9912
9948
|
}
|
|
@@ -13348,7 +13384,7 @@ var init_state_machine_execution_engine = __esm({
|
|
|
13348
13384
|
try {
|
|
13349
13385
|
const map = options?.webhookContext?.webhookData;
|
|
13350
13386
|
if (map) {
|
|
13351
|
-
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-
|
|
13387
|
+
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-X7WH3PXQ.mjs");
|
|
13352
13388
|
const reg = CheckProviderRegistry2.getInstance();
|
|
13353
13389
|
const p = reg.getProvider("http_input");
|
|
13354
13390
|
if (p && typeof p.setWebhookContext === "function") p.setWebhookContext(map);
|
|
@@ -13461,7 +13497,7 @@ var init_state_machine_execution_engine = __esm({
|
|
|
13461
13497
|
logger.info("[StateMachine] Using state machine engine");
|
|
13462
13498
|
}
|
|
13463
13499
|
if (!config) {
|
|
13464
|
-
const { ConfigManager } = await import("./config-
|
|
13500
|
+
const { ConfigManager } = await import("./config-OOUMTCEA.mjs");
|
|
13465
13501
|
const configManager = new ConfigManager();
|
|
13466
13502
|
config = await configManager.getDefaultConfig();
|
|
13467
13503
|
logger.debug("[StateMachine] Using default configuration (no config provided)");
|
|
@@ -13471,7 +13507,7 @@ var init_state_machine_execution_engine = __esm({
|
|
|
13471
13507
|
tag_filter: tagFilter
|
|
13472
13508
|
} : config;
|
|
13473
13509
|
try {
|
|
13474
|
-
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-
|
|
13510
|
+
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-X7WH3PXQ.mjs");
|
|
13475
13511
|
const registry = CheckProviderRegistry2.getInstance();
|
|
13476
13512
|
registry.setCustomTools(configWithTagFilter.tools || {});
|
|
13477
13513
|
} catch (error) {
|
|
@@ -13535,7 +13571,7 @@ var init_state_machine_execution_engine = __esm({
|
|
|
13535
13571
|
try {
|
|
13536
13572
|
const webhookData = this.executionContext?.webhookContext?.webhookData;
|
|
13537
13573
|
if (webhookData instanceof Map) {
|
|
13538
|
-
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-
|
|
13574
|
+
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-4SSRQXFJ.mjs");
|
|
13539
13575
|
const slackCtx = extractSlackContext2(webhookData);
|
|
13540
13576
|
if (slackCtx) {
|
|
13541
13577
|
const payload = Array.from(webhookData.values())[0];
|
|
@@ -17080,7 +17116,9 @@ var init_ai_check_provider = __esm({
|
|
|
17080
17116
|
const first = Array.from(map.values())[0];
|
|
17081
17117
|
if (!first || typeof first !== "object") return {};
|
|
17082
17118
|
const ev = first.event;
|
|
17083
|
-
const
|
|
17119
|
+
const slackConv = first.slack_conversation;
|
|
17120
|
+
const telegramConv = first.telegram_conversation;
|
|
17121
|
+
const conv = slackConv || telegramConv;
|
|
17084
17122
|
if (!ev && !conv) return {};
|
|
17085
17123
|
if (conv && prInfo) {
|
|
17086
17124
|
try {
|
|
@@ -17088,7 +17126,8 @@ var init_ai_check_provider = __esm({
|
|
|
17088
17126
|
} catch {
|
|
17089
17127
|
}
|
|
17090
17128
|
}
|
|
17091
|
-
|
|
17129
|
+
const transportCtx = slackConv ? { slack: { event: ev, conversation: slackConv } } : { telegram: { event: ev, conversation: telegramConv } };
|
|
17130
|
+
return { ...transportCtx, conversation: conv };
|
|
17092
17131
|
} catch {
|
|
17093
17132
|
return {};
|
|
17094
17133
|
}
|
|
@@ -41554,8 +41593,8 @@ function buildBuiltinGlobals(opts) {
|
|
|
41554
41593
|
const asyncFunctionNames = /* @__PURE__ */ new Set();
|
|
41555
41594
|
const scheduleFn = async (args = {}) => {
|
|
41556
41595
|
try {
|
|
41557
|
-
const { handleScheduleAction: handleScheduleAction2, buildScheduleToolContext: buildScheduleToolContext2 } = await import("./schedule-tool-
|
|
41558
|
-
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-
|
|
41596
|
+
const { handleScheduleAction: handleScheduleAction2, buildScheduleToolContext: buildScheduleToolContext2 } = await import("./schedule-tool-INVLVX3G.mjs");
|
|
41597
|
+
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-4SSRQXFJ.mjs");
|
|
41559
41598
|
const parentCtx = opts.sessionInfo?._parentContext;
|
|
41560
41599
|
const webhookData = parentCtx?.prInfo?.eventContext?.webhookData;
|
|
41561
41600
|
const visorCfg = parentCtx?.config;
|
|
@@ -45152,4 +45191,4 @@ undici/lib/fetch/body.js:
|
|
|
45152
45191
|
undici/lib/websocket/frame.js:
|
|
45153
45192
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
45154
45193
|
*/
|
|
45155
|
-
//# sourceMappingURL=chunk-
|
|
45194
|
+
//# sourceMappingURL=chunk-KQAT6H3S.mjs.map
|