@probelabs/visor 0.1.170-ee → 0.1.171-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.
Files changed (94) hide show
  1. package/defaults/code-talk.yaml +39 -238
  2. package/defaults/intent-router.yaml +1 -0
  3. package/dist/agent-protocol/task-store.d.ts +5 -0
  4. package/dist/agent-protocol/task-store.d.ts.map +1 -1
  5. package/dist/agent-protocol/tasks-cli-handler.d.ts.map +1 -1
  6. package/dist/agent-protocol/track-execution.d.ts +34 -0
  7. package/dist/agent-protocol/track-execution.d.ts.map +1 -0
  8. package/dist/cli-main.d.ts.map +1 -1
  9. package/dist/cli.d.ts.map +1 -1
  10. package/dist/defaults/code-talk.yaml +39 -238
  11. package/dist/defaults/intent-router.yaml +1 -0
  12. package/dist/frontends/host.d.ts +2 -0
  13. package/dist/frontends/host.d.ts.map +1 -1
  14. package/dist/generated/config-schema.d.ts +10 -6
  15. package/dist/generated/config-schema.d.ts.map +1 -1
  16. package/dist/generated/config-schema.json +10 -6
  17. package/dist/index.js +696 -95
  18. package/dist/scheduler/scheduler.d.ts +4 -0
  19. package/dist/scheduler/scheduler.d.ts.map +1 -1
  20. package/dist/sdk/{a2a-frontend-YTXQGUDH.mjs → a2a-frontend-GUEGI5SX.mjs} +20 -3
  21. package/dist/sdk/a2a-frontend-GUEGI5SX.mjs.map +1 -0
  22. package/dist/sdk/{check-provider-registry-T5FWS4SW.mjs → check-provider-registry-7P2QIKJR.mjs} +8 -8
  23. package/dist/sdk/{check-provider-registry-Q2OVYSBJ.mjs → check-provider-registry-ZUU7KSKR.mjs} +7 -7
  24. package/dist/sdk/{chunk-FTUGQP5L.mjs → chunk-5SBX4KLG.mjs} +2 -2
  25. package/dist/sdk/{chunk-2CNT2EB3.mjs → chunk-6FXVWL6M.mjs} +3 -3
  26. package/dist/sdk/{chunk-KFKHU6CM.mjs → chunk-6VVXKXTI.mjs} +19 -2
  27. package/dist/sdk/chunk-6VVXKXTI.mjs.map +1 -0
  28. package/dist/sdk/{chunk-SVBF7Y2R.mjs → chunk-A2YVTICA.mjs} +11 -7
  29. package/dist/sdk/chunk-A2YVTICA.mjs.map +1 -0
  30. package/dist/sdk/{chunk-DLO46M5M.mjs → chunk-CXA3WUOB.mjs} +62 -23
  31. package/dist/sdk/chunk-CXA3WUOB.mjs.map +1 -0
  32. package/dist/sdk/{chunk-62PXPI6Q.mjs → chunk-GGNR347O.mjs} +8 -2
  33. package/dist/sdk/chunk-GGNR347O.mjs.map +1 -0
  34. package/dist/sdk/{chunk-46P7AYHG.mjs → chunk-YCPJBOJB.mjs} +68 -29
  35. package/dist/sdk/chunk-YCPJBOJB.mjs.map +1 -0
  36. package/dist/sdk/{config-IHECYTNT.mjs → config-6GWD673K.mjs} +2 -2
  37. package/dist/sdk/{failure-condition-evaluator-NJO6DSL4.mjs → failure-condition-evaluator-5HRNHZCC.mjs} +4 -3
  38. package/dist/sdk/{github-frontend-WPTKI4AY.mjs → github-frontend-ZZRU6P43.mjs} +7 -7
  39. package/dist/sdk/{host-6HV5FMD7.mjs → host-A7UNRBQU.mjs} +3 -3
  40. package/dist/sdk/host-A7UNRBQU.mjs.map +1 -0
  41. package/dist/sdk/{host-RATJKJW5.mjs → host-ECXTIDWG.mjs} +3 -3
  42. package/dist/sdk/host-ECXTIDWG.mjs.map +1 -0
  43. package/dist/sdk/{loader-NJCF7DUS.mjs → loader-QMJFFST6.mjs} +1 -1
  44. package/dist/sdk/{routing-RWZEXSRZ.mjs → routing-AMRQYI7J.mjs} +5 -4
  45. package/dist/sdk/{schedule-tool-VI5IUMEL.mjs → schedule-tool-DGVJDHJM.mjs} +7 -7
  46. package/dist/sdk/{schedule-tool-JCKV47FU.mjs → schedule-tool-I6VG3ZVA.mjs} +8 -8
  47. package/dist/sdk/{schedule-tool-handler-PIXYVVJY.mjs → schedule-tool-handler-DFUC5S55.mjs} +8 -8
  48. package/dist/sdk/{schedule-tool-handler-ZDAD6SWM.mjs → schedule-tool-handler-XLCSBU3E.mjs} +7 -7
  49. package/dist/sdk/sdk.d.mts +4 -0
  50. package/dist/sdk/sdk.d.ts +4 -0
  51. package/dist/sdk/sdk.js +429 -285
  52. package/dist/sdk/sdk.js.map +1 -1
  53. package/dist/sdk/sdk.mjs +7 -7
  54. package/dist/sdk/{trace-helpers-ZYN23GBG.mjs → trace-helpers-4ZBZWH5W.mjs} +3 -2
  55. package/dist/sdk/track-execution-VWLQIGY7.mjs +82 -0
  56. package/dist/sdk/track-execution-VWLQIGY7.mjs.map +1 -0
  57. package/dist/sdk/{workflow-check-provider-OAOD3A5U.mjs → workflow-check-provider-AKXDIL2Y.mjs} +8 -8
  58. package/dist/sdk/{workflow-check-provider-W5FKQU5G.mjs → workflow-check-provider-KQNLEQEY.mjs} +7 -7
  59. package/dist/slack/socket-runner.d.ts +4 -0
  60. package/dist/slack/socket-runner.d.ts.map +1 -1
  61. package/dist/telemetry/trace-helpers.d.ts.map +1 -1
  62. package/dist/tui/chat-runner.d.ts +4 -0
  63. package/dist/tui/chat-runner.d.ts.map +1 -1
  64. package/dist/types/cli.d.ts +2 -0
  65. package/dist/types/cli.d.ts.map +1 -1
  66. package/dist/types/config.d.ts +4 -0
  67. package/dist/types/config.d.ts.map +1 -1
  68. package/dist/utils/instance-id.d.ts +9 -0
  69. package/dist/utils/instance-id.d.ts.map +1 -0
  70. package/package.json +2 -2
  71. package/dist/sdk/a2a-frontend-YTXQGUDH.mjs.map +0 -1
  72. package/dist/sdk/chunk-46P7AYHG.mjs.map +0 -1
  73. package/dist/sdk/chunk-62PXPI6Q.mjs.map +0 -1
  74. package/dist/sdk/chunk-DLO46M5M.mjs.map +0 -1
  75. package/dist/sdk/chunk-KFKHU6CM.mjs.map +0 -1
  76. package/dist/sdk/chunk-SVBF7Y2R.mjs.map +0 -1
  77. package/dist/sdk/host-6HV5FMD7.mjs.map +0 -1
  78. package/dist/sdk/host-RATJKJW5.mjs.map +0 -1
  79. /package/dist/sdk/{check-provider-registry-Q2OVYSBJ.mjs.map → check-provider-registry-7P2QIKJR.mjs.map} +0 -0
  80. /package/dist/sdk/{check-provider-registry-T5FWS4SW.mjs.map → check-provider-registry-ZUU7KSKR.mjs.map} +0 -0
  81. /package/dist/sdk/{chunk-FTUGQP5L.mjs.map → chunk-5SBX4KLG.mjs.map} +0 -0
  82. /package/dist/sdk/{chunk-2CNT2EB3.mjs.map → chunk-6FXVWL6M.mjs.map} +0 -0
  83. /package/dist/sdk/{config-IHECYTNT.mjs.map → config-6GWD673K.mjs.map} +0 -0
  84. /package/dist/sdk/{failure-condition-evaluator-NJO6DSL4.mjs.map → failure-condition-evaluator-5HRNHZCC.mjs.map} +0 -0
  85. /package/dist/sdk/{github-frontend-WPTKI4AY.mjs.map → github-frontend-ZZRU6P43.mjs.map} +0 -0
  86. /package/dist/sdk/{loader-NJCF7DUS.mjs.map → loader-QMJFFST6.mjs.map} +0 -0
  87. /package/dist/sdk/{routing-RWZEXSRZ.mjs.map → routing-AMRQYI7J.mjs.map} +0 -0
  88. /package/dist/sdk/{schedule-tool-JCKV47FU.mjs.map → schedule-tool-DGVJDHJM.mjs.map} +0 -0
  89. /package/dist/sdk/{schedule-tool-VI5IUMEL.mjs.map → schedule-tool-I6VG3ZVA.mjs.map} +0 -0
  90. /package/dist/sdk/{schedule-tool-handler-PIXYVVJY.mjs.map → schedule-tool-handler-DFUC5S55.mjs.map} +0 -0
  91. /package/dist/sdk/{schedule-tool-handler-ZDAD6SWM.mjs.map → schedule-tool-handler-XLCSBU3E.mjs.map} +0 -0
  92. /package/dist/sdk/{trace-helpers-ZYN23GBG.mjs.map → trace-helpers-4ZBZWH5W.mjs.map} +0 -0
  93. /package/dist/sdk/{workflow-check-provider-OAOD3A5U.mjs.map → workflow-check-provider-AKXDIL2Y.mjs.map} +0 -0
  94. /package/dist/sdk/{workflow-check-provider-W5FKQU5G.mjs.map → workflow-check-provider-KQNLEQEY.mjs.map} +0 -0
@@ -524,61 +524,20 @@ steps:
524
524
  - "curl:-s:*"
525
525
  - "curl:*"
526
526
  timeout: 60000
527
- _completion_prompt: |
528
- Before finalizing your answer, triple-check everything:
527
+ completion_prompt: |
528
+ Before finalizing, verify:
529
529
 
530
- Challenge assumptions:
531
- 1. Did you INDEPENDENTLY verify the user's claims, or just search for confirmation?
532
- 2. If the user assumed a root cause, did you verify it's actually correct?
533
- 3. Could the real issue be something completely different from what was suggested?
534
-
535
- Investigation completeness:
536
- 4. Did you consider MULTIPLE possible explanations, not just the first one?
537
- 5. If there were alternative theories, did you investigate each one?
538
- 6. Have you ruled out other possibilities with evidence, not assumptions?
539
-
540
- Cross-project verification:
541
- 7. Are there dependencies or interactions between projects you examined?
542
- 8. Did you verify how data/config flows between components?
543
- 9. Did you check both the happy path AND error handling paths?
544
-
545
- Reference accuracy:
546
- 10. Are all code references accurate (file paths, function names, line numbers)?
547
- 11. Do the docs match what the code actually does?
548
-
549
- CRITICAL: When you identify a configuration variable, you MUST then perform
550
- a second search to find the code that consumes that variable. You cannot draw
551
- conclusions from a variable's name alone. You must confirm its purpose by
552
- analyzing how it is used in the application logic.
553
-
554
- If you found any ambiguity, gaps in your investigation, or unexplored
555
- hypotheses - use delegate tool to investigate further before concluding.
530
+ 1. Are all code references accurate (file paths, line numbers)?
531
+ 2. If you identified a config variable, did you search for the code that
532
+ consumes it? Do not conclude from variable names alone.
533
+ 3. Did you verify the user's claims independently, or just confirm their theory?
534
+ 4. If gaps remain, use delegate to investigate before concluding.
556
535
 
557
536
  Confidence calibration — be HONEST, not optimistic:
558
- - "high" ONLY when you found definitive code evidence that FULLY answers the
559
- question, you verified the complete call chain, AND you ruled out alternative
560
- explanations with evidence (not assumptions)
561
- - "medium" when you found relevant code but could not verify all aspects, when
562
- there are alternative explanations you did not fully rule out, or when you
563
- traced only part of the execution path
564
- - "low" when your answer is based on naming conventions, comments, partial
565
- evidence, or inference without direct code confirmation
566
- - Do NOT default to "high" — inflated confidence causes the caller to skip
567
- needed follow-up investigation, wasting time on redundant re-exploration
568
- - If confidence is not "high", the confidence_reason MUST clearly state what
569
- evidence is missing or which alternative theories remain unverified
570
-
571
- When you finish, ensure your answer includes:
572
- - All relevant details grounded in code
573
- - If multiple theories were considered, explain which one is correct and WHY
574
- (with evidence ruling out alternatives)
575
- - A confidence score ("high", "medium", or "low") calibrated per the rules above
576
- - If confidence is "medium" or "low", include a clear confidence_reason
577
- explaining what evidence is missing or ambiguous
578
- - At the END of your answer.text, append a "## References" section with a
579
- bulleted list of all code/doc references in this format:
580
- - [file.go:42-50](https://github.com/org/repo/blob/main/path/file.go#L42-L50) - brief description
581
- - Also populate the references array with structured data for each reference
537
+ - "high" ONLY with definitive code evidence that fully answers the question
538
+ - "medium" when relevant code found but not all aspects verified
539
+ - "low" when based on naming conventions, comments, or partial evidence
540
+ - Do NOT default to "high" inflated confidence wastes follow-up time
582
541
  schema:
583
542
  type: object
584
543
  additionalProperties: false
@@ -633,154 +592,23 @@ steps:
633
592
  required: [answer, references, confidence, confidence_reason]
634
593
  prompt: |
635
594
  <instructions>
636
- IMPORTANT - Handling ambiguity:
637
- If the question is ambiguous, unclear, or you need more details to provide
638
- a useful answer, DO NOT guess or make assumptions. Instead:
639
- - Clearly state what information is missing or unclear
640
- - Ask specific clarifying questions
641
- - Explain what you could investigate with more context
642
-
643
- Examples of when to ask for clarification:
644
- - "Which version/branch are you asking about?"
645
- - "Are you asking about the gateway or dashboard implementation?"
646
- - "Could you provide the specific error message or log output?"
647
- - "Which repository or component is this related to?"
648
-
649
- It's better to ask for clarification than to provide an incorrect or
650
- irrelevant answer based on assumptions.
651
-
652
- Git bash commands:
653
- You can use git commands for deeper code investigation:
654
- - `git diff` to compare branches or commits
655
- - `git log` to see commit history and understand changes over time
656
- - `git show` to inspect specific commits
657
- - `git blame` to understand who changed what and when
658
- - `git checkout` to switch branches when comparing implementations
659
- - `git branch -a` to list ALL branches (local and remote)
660
- - `git fetch --tags` to fetch all tags from remote
661
- - `git tag -l` to list all available tags
662
-
663
- IMPORTANT - Fetching remote branches:
664
- Repositories are checked out with shallow clone (fetch_depth: 1), so remote
665
- branches are NOT available locally by default. Before checking out a branch:
666
- 1. First fetch the specific branch: `git fetch origin <branch-name>`
667
- 2. Then checkout: `git checkout <branch-name>` or `git checkout origin/<branch-name>`
668
-
669
- Example for checking out release-5.3:
670
- - First: `git fetch origin release-5.3`
671
- - Then: `git checkout release-5.3`
672
-
673
- If the branch doesn't exist, try listing available branches:
674
- - `git branch -r` to see remote branches
675
- - `git ls-remote --heads origin` to list all remote branches
676
-
677
- Use these when you need to understand how code evolved, compare different
678
- versions, or investigate recent changes related to the question.
679
-
680
- GitHub CLI (gh) for PR review and GitHub data:
681
- You have access to the `gh` CLI tool for GitHub operations:
682
- - `gh pr view <number> --repo owner/repo` - View PR details, description, status
683
- - `gh pr diff <number> --repo owner/repo` - Get the full diff of a PR
684
- - `gh pr checks <number> --repo owner/repo` - View CI/CD check status
685
- - `gh pr list --repo owner/repo` - List open PRs
686
- - `gh issue view <number> --repo owner/repo` - View issue details
687
- - `gh api repos/owner/repo/pulls/<number>/files` - Get list of changed files
688
- - `gh api repos/owner/repo/pulls/<number>/comments` - Get PR review comments
689
- - `gh run list --repo owner/repo` - List workflow runs
690
- - `gh run view <run-id> --repo owner/repo --log` - View workflow run logs
691
-
692
- IMPORTANT - Checking out PR branches for review:
693
- When asked to review a PR or investigate PR code, you need to checkout the PR branch:
694
- 1. GitHub maintains special refs for PRs: `refs/pull/<PR_NUMBER>/head`
695
- 2. To fetch and checkout a PR:
696
- - `git fetch origin pull/<PR_NUMBER>/head:pr-<PR_NUMBER>` - fetch PR to local branch
697
- - `git checkout pr-<PR_NUMBER>` - checkout the PR branch
698
- 3. Example for PR #123:
699
- - `git fetch origin pull/123/head:pr-123`
700
- - `git checkout pr-123`
701
- 4. To see what changed vs main/master:
702
- - `git diff main...pr-123` or `git diff origin/main...HEAD`
703
-
704
- IMPORTANT bash tool usage rules:
705
- - NEVER use bash for code exploration (no grep, cat, find, head, tail, awk, sed)
706
- - ALWAYS use search and extract tools instead — they are faster, AST-aware, and return structured code blocks
707
- - Bash is ONLY for: git commands, gh CLI, curl, and system operations
708
- - Do NOT use shell operators like && or || or | (pipes)
709
- - Do NOT use `cd dir && command`
710
- - INSTEAD, use the workingDirectory parameter to specify where to run commands
711
- - Each bash call should be a single simple command with workingDirectory set
712
-
713
- Version-specific queries:
714
- - When asked about a specific version (e.g., "5.8", "v5.8.3"):
715
- 1. First run `git fetch --tags` (with workingDirectory set)
716
- 2. Then run `git tag -l "v5.8*"` to find matching tags
717
- 3. Checkout to the relevant tag: `git checkout v5.8.10`
718
- - Always verify you're on the correct version/branch before investigating code
719
-
720
- Path rules: Always use relative paths (e.g., "gateway/mw_jwt.go"), never absolute
721
- paths with /tmp/ or workspace UUIDs.
722
-
723
- High-level behavior:
724
- - Use documentation to understand intended behavior, configuration, and
725
- cross-component interactions for the feature in question
726
- - For each selected project, read the code and relevant docs to answer
727
- the question as concretely as possible
728
- - When multiple projects are involved, deliberately follow data and control
729
- flow across them and explain the connections
730
- - Always ground your answer in actual code/docs, not speculation
731
- - When you see a dependency - prove it by code
732
-
733
- Critical thinking - DO NOT blindly trust user assumptions:
734
- - Users often report real problems but with INCORRECT root cause analysis
735
- - The symptom may be real, but the explanation in the question may be wrong
736
- - Verify every claim independently - don't just search for what the user expects
737
- - If a bug report says "X causes Y", verify BOTH that Y happens AND that X is the cause
738
- - Look at the bigger picture - the real issue might be elsewhere entirely
739
- - Be unbiased: don't anchor on the user's theory, form your own based on evidence
740
-
741
- Investigation methodology - IMPORTANT:
742
- 1. Before diving deep, form multiple hypotheses about the answer:
743
- - What are the possible explanations or root causes?
744
- - Could the behavior be in component A, B, or both?
745
- - Is this a configuration issue, code bug, or expected behavior?
746
- - Is the user's assumption about the cause actually correct?
747
- 2. Investigate each hypothesis systematically:
748
- - Don't assume your first theory OR the user's theory is correct
749
- - If evidence contradicts a hypothesis, note it and move on
750
- - Look for edge cases and alternative code paths
751
- 3. When investigating complex issues:
752
- - Check error handling paths, not just happy paths
753
- - Look at configuration options that might affect behavior
754
- - Consider version differences if relevant
755
- 4. Cross-reference your findings:
756
- - Do the docs match what the code actually does?
757
- - Are there any TODOs, FIXMEs, or known issues?
758
- - Check git blame/log for recent changes if behavior seems unexpected
759
-
760
- Using delegate tool effectively:
761
- - Use delegate when you need DEEP investigation into a specific component
762
- - Each delegate call should focus on ONE specific question or hypothesis
763
- - Good delegate uses:
764
- - "Investigate how JWT validation handles expired tokens in gateway"
765
- - "Find all places where rate limit counters are incremented"
766
- - "Trace the request flow from API entry to database query"
767
- - Bad delegate uses:
768
- - "Look at the code" (too vague)
769
- - "Find everything about auth" (too broad)
770
- - Run multiple delegates in PARALLEL when investigating different hypotheses
771
- or different components - don't wait for one to finish before starting another
772
- - Always ask delegates to return specific file paths and line numbers
773
-
774
- CRITICAL - Preserve detailed output from tools and delegates:
775
- When tools or delegates return detailed data (customer insights, code analysis, etc.):
776
- - DO NOT summarize or compress the output
777
- - RELAY THE FULL DATA including all names, specifics, and details
778
- - If a tool returns 10 items with details, include ALL 10 in your answer
779
- - Never say "based on the analysis" without presenting the actual data
780
- - Tools already synthesize data - your job is to present it completely
781
-
782
- CRITICAL: Always use `attempt_completion` tool to submit your final answer.
783
- This enables validation of your investigation before the response is finalized.
595
+ Bash tool rules:
596
+ - Use search/extract tools for code exploration, NOT bash (no grep, cat, find)
597
+ - Bash is ONLY for: git, gh CLI, curl, and system commands
598
+ - Use the workingDirectory parameter instead of `cd`; no pipes or chained commands
599
+ - Always use relative paths (e.g., "gateway/mw_jwt.go"), never absolute /tmp/ paths
600
+
601
+ Shallow clone awareness:
602
+ - Repos use fetch_depth: 1. Fetch before checkout: `git fetch origin <branch>`
603
+ - For PRs: `git fetch origin pull/<N>/head:pr-<N> && git checkout pr-<N>`
604
+ - For tags: `git fetch --tags` then `git tag -l "v5.8*"`
605
+
606
+ Delegate usage:
607
+ - Each delegate should answer ONE specific question (not "look at the code")
608
+ - Run multiple delegates in PARALLEL for different hypotheses or components
609
+ - Ask delegates to return specific file paths and line numbers
610
+
611
+ Relay complete data from tools — do not summarize or compress tool output.
784
612
  </instructions>
785
613
 
786
614
  {% if inputs.exploration_prompt %}
@@ -795,10 +623,6 @@ steps:
795
623
  </question>
796
624
 
797
625
  <architecture>
798
- The following architecture document describes the project topology, routing rules,
799
- and important guidelines for working with this codebase. Use it to understand
800
- project relationships, debugging procedures, and special instructions.
801
-
802
626
  {{ inputs.architecture }}
803
627
  </architecture>
804
628
 
@@ -833,40 +657,17 @@ steps:
833
657
  </context>
834
658
 
835
659
  <task>
836
- For each project listed in <projects>:
837
- - Use code-explorer tools to:
838
- - listFiles/searchFiles to understand the structure and find relevant
839
- directories and files
840
- - search/query/extract to locate and read the core implementation
841
- - consult documentation to confirm semantics, configuration options,
842
- and cross-project responsibilities
843
- - When multiple projects are involved, pay attention to:
844
- - how configuration flows between components
845
- - how identity, auth, or data flows between services
846
- - any shared libraries used by more than one project
847
- - Use delegate tools per project when a deeper, focused investigation
848
- is needed
849
-
850
- Finally, synthesize everything into a single answer that explains the
851
- behavior to an engineer:
852
- - Be concrete and code/doc-grounded (mention key components, files, and
853
- configuration options when helpful)
854
- - Keep the explanation focused and coherent
855
- - IMPORTANT: At the END of your answer, include a "## References" section
856
- with clickable GitHub links pointing to specific lines
857
-
858
- Return your answer in the schema format with:
859
- - answer.text: your complete explanation, ending with a "## References" section like:
860
- ```
861
- ## References
862
- - [mw_jwt.go:142-180](https://github.com/TykTechnologies/tyk/blob/master/gateway/mw_jwt.go#L142-L180) - JWT validation middleware
863
- - [jwt.md](https://github.com/TykTechnologies/tyk-docs/blob/main/tyk-docs/content/basic-config-and-security/security/authentication-authorization/jwt.md) - JWT documentation
864
- ```
865
- - answer.summary: one-line summary (optional)
866
- - references: array with structured data for each reference (project, file, url, snippet)
867
- - confidence: "high" | "medium" | "low"
868
- - confidence_reason: required explanation when confidence is "medium" or "low";
869
- use empty string only when confidence is "high"
660
+ For each project in <projects>, use search/extract tools to find the relevant
661
+ implementation, then consult docs to confirm semantics. When multiple projects
662
+ are involved, trace data and config flow across them.
663
+
664
+ Synthesize a single answer:
665
+ - Ground everything in code/docs evidence
666
+ - End with a "## References" section with clickable GitHub links:
667
+ - [file.go:42-50](https://github.com/org/repo/blob/main/path/file.go#L42-L50) - description
668
+
669
+ Return in schema format: answer.text, answer.summary (optional), references array,
670
+ confidence (high/medium/low), confidence_reason (explain what's missing if not high).
870
671
  </task>
871
672
 
872
673
  # =============================================================================
@@ -152,6 +152,7 @@ steps:
152
152
  skip_slack_context: false
153
153
  disableTools: true
154
154
  allowedTools: []
155
+ max_iterations: 1
155
156
  system_prompt: |
156
157
  You are an intent router. Your ONLY job is to:
157
158
  1) pick the best intent, and
@@ -32,6 +32,8 @@ export interface TaskQueueRow {
32
32
  workflow_id: string | null;
33
33
  run_id: string | null;
34
34
  request_message: string;
35
+ source: string;
36
+ metadata: Record<string, unknown>;
35
37
  }
36
38
  export interface ListTasksResult {
37
39
  tasks: AgentTask[];
@@ -44,6 +46,8 @@ export interface TaskStore {
44
46
  getTask(taskId: string): AgentTask | null;
45
47
  listTasks(filter: ListTasksFilter): ListTasksResult;
46
48
  updateTaskState(taskId: string, newState: TaskState, statusMessage?: AgentMessage): void;
49
+ /** Set claimed_by/claimed_at on a task (used by trackExecution to record instance ID). */
50
+ claimTask(taskId: string, workerId: string): void;
47
51
  addArtifact(taskId: string, artifact: AgentArtifact): void;
48
52
  appendHistory(taskId: string, message: AgentMessage): void;
49
53
  setRunId(taskId: string, runId: string): void;
@@ -76,6 +80,7 @@ export declare class SqliteTaskStore implements TaskStore {
76
80
  total: number;
77
81
  };
78
82
  updateTaskState(taskId: string, newState: TaskState, statusMessage?: AgentMessage): void;
83
+ claimTask(taskId: string, workerId: string): void;
79
84
  addArtifact(taskId: string, artifact: AgentArtifact): void;
80
85
  appendHistory(taskId: string, message: AgentMessage): void;
81
86
  setRunId(taskId: string, runId: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"task-store.d.ts","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-handler.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/agent-protocol/tasks-cli-handler.ts"],"names":[],"mappings":"AAoWA,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCtE"}
1
+ {"version":3,"file":"tasks-cli-handler.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/agent-protocol/tasks-cli-handler.ts"],"names":[],"mappings":"AA6aA,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCtE"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Shared execution tracking helper.
3
+ *
4
+ * Wraps any engine execution call with task lifecycle management:
5
+ * creates a task in 'submitted' state, transitions to 'working',
6
+ * runs the executor, then sets terminal state (completed/failed).
7
+ *
8
+ * Used by CLI, Slack, TUI, and Scheduler frontends when task_tracking is enabled.
9
+ */
10
+ import type { TaskStore } from './task-store';
11
+ import type { AgentTask } from './types';
12
+ export type TaskSource = 'cli' | 'slack' | 'a2a' | 'tui' | 'scheduler' | 'webhook';
13
+ export interface TrackExecutionOptions {
14
+ taskStore: TaskStore;
15
+ source: TaskSource;
16
+ workflowId?: string;
17
+ /** Config file path — used to prefix workflowId as "config.yaml#workflow" */
18
+ configPath?: string;
19
+ metadata?: Record<string, unknown>;
20
+ /** Human-readable description of what's being executed */
21
+ messageText: string;
22
+ }
23
+ /**
24
+ * Wrap an engine execution call with task lifecycle tracking.
25
+ *
26
+ * Creates a task, transitions to 'working', runs the executor,
27
+ * then sets terminal state. Returns both the task and the original result.
28
+ * Re-throws any executor error after marking the task as failed.
29
+ */
30
+ export declare function trackExecution<T>(opts: TrackExecutionOptions, executor: () => Promise<T>): Promise<{
31
+ task: AgentTask;
32
+ result: T;
33
+ }>;
34
+ //# sourceMappingURL=track-execution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"track-execution.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/agent-protocol/track-execution.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,WAAW,GAAG,SAAS,CAAC;AAEnF,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,CAAC,EACpC,IAAI,EAAE,qBAAqB,EAC3B,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACzB,OAAO,CAAC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,CAAC,CAAA;CAAE,CAAC,CA0DzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli-main.ts"],"names":[],"mappings":"AA6zBA;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAyhD1C"}
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli-main.ts"],"names":[],"mappings":"AA6zBA;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAulD1C"}
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA2B,MAAM,aAAa,CAAC;AAQlE;;GAEG;AACH,qBAAa,GAAG;IACd,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,YAAY,CAA0D;IAG9E,OAAO,CAAC,WAAW,CAGR;;IAOX;;OAEG;IACH,OAAO,CAAC,YAAY;IAqFpB;;OAEG;IACH,OAAO,CAAC,aAAa,CAEnB;IAEF;;OAEG;IACI,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU;IAqM5C;;OAEG;IACH,OAAO,CAAC,eAAe;IAyCvB;;OAEG;IACI,WAAW,IAAI,MAAM;IAkE5B;;OAEG;IACI,UAAU,IAAI,MAAM;IAoC3B;;OAEG;IACI,eAAe,IAAI,MAAM;IAkBhC;;OAEG;IACI,QAAQ,IAAI,IAAI;IAIvB;;OAEG;IACI,WAAW,IAAI,IAAI;CAG3B"}
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA2B,MAAM,aAAa,CAAC;AAQlE;;GAEG;AACH,qBAAa,GAAG;IACd,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,YAAY,CAA0D;IAG9E,OAAO,CAAC,WAAW,CAGR;;IAOX;;OAEG;IACH,OAAO,CAAC,YAAY;IAyFpB;;OAEG;IACH,OAAO,CAAC,aAAa,CAEnB;IAEF;;OAEG;IACI,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU;IA0M5C;;OAEG;IACH,OAAO,CAAC,eAAe;IAyCvB;;OAEG;IACI,WAAW,IAAI,MAAM;IAkE5B;;OAEG;IACI,UAAU,IAAI,MAAM;IAoC3B;;OAEG;IACI,eAAe,IAAI,MAAM;IAkBhC;;OAEG;IACI,QAAQ,IAAI,IAAI;IAIvB;;OAEG;IACI,WAAW,IAAI,IAAI;CAG3B"}