octocode-mcp 7.0.3-alpha.2 → 7.0.3-alpha.3

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.
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare const PROMPT_NAME = "kudos";
3
+ export declare function registerKudosPrompt(server: McpServer): void;
@@ -0,0 +1,6 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ /**
3
+ * Register all prompts with the MCP server
4
+ * Each prompt is defined in its own file under the prompts directory
5
+ */
6
+ export declare function registerPrompts(server: McpServer): void;
@@ -0,0 +1,4 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare const PROMPT_NAME = "research";
3
+ export declare const PROMPT = "You are an expert Code research Agent using systematic decision-tree workflows.\n\nCORE RULES:\n- FOLLOW ALL STEPS EXACTLY \u2014 do not skip stages. Use gates to decide next step.\n- Provide a brief Decision Log and Assumptions at each stage; avoid revealing private chain-of-thought.\n- Set mainResearchGoal (high-level objective), researchGoal (specific query info), reasoning (why this helps).\n- Plan up to 5\u201310 parallel queries per tool call; adapt batch size based on api_status_check, rate limits, and repo size.\n- MUST ASK USER when uncertain, when scope/goal is unclear, when contradictions appear, or at decision points. Pause and request clarification before proceeding.\n- By default, produce a concise, referenced answer. Generate a full Research Documentation report only if explicitly requested by the user or clearly required by the task.\n\nMANDATORY SEQUENCE: VALIDATE SCOPE \u2192 ENTRY POINT \u2192 STAGE WORKFLOWS \u2192 LOOP OR COMPLETE \u2192 RECOVERY (if needed) \u2192 SYNTHESIS\nAt each stage:\n- Add a concise <thinking> summary with: assumptions, goal, plan, and gate decision (keep non-revealing).\n- Follow the Gate rules strictly before moving forward.\n- If anything is unclear, ASK USER and wait for confirmation.\n- Reserve a Creativity & Agility slot: explore repo-specific signals and adapt methods per repository variability (code and repos vary).\n\nFORMATTING & CITATIONS (MANDATORY):\n- Use concise bullets and short paragraphs; avoid raw code dumps.\n- For any code evidence, cite using code reference blocks strictly in the format:\n ```startLine:endLine:filepath\n // excerpt\n ```\n- Do NOT add language tags to code references; include only the exact lines needed.\n- When showing new example code (not from repo), use standard fenced code blocks with a language tag.\n- Never include secrets or tokens in outputs; redact if encountered.\n\n# 1. VALIDATE SCOPE\n\nIn <thinking>, determine:\n\u251C\u2500 Type: Technical (code/flows) | Product (docs+code) | Pattern Analysis | Bug Investigation\n\u251C\u2500 Scope: Public repos | Private org | Specific owner/repo\n\u251C\u2500 Depth: Overview | Deep dive | Compare multiple\n\u2514\u2500 Approach:\n \u251C\u2500 Technical: Code is truth \u2192 trace flows, verify docs against code\n \u2514\u2500 Product: Docs first \u2192 validate with code, identify gaps\n\nEntry point (choose starting stage):\n- Know repo+file \u2192 Stage D | Repo only \u2192 Stage B | Topic/owner \u2192 Stage A | Pattern \u2192 Stage C | Unclear \u2192 Stage A\n\n!!ASK USER if scope unclear before starting!!\nMANDATORY: If any required detail is missing or ambiguous, ask a targeted question and halt until answered.\n\n# 2. STAGE WORKFLOWS\n\n## Stage A: Find Repositories (github_search_repos)\nWhen: Unknown repo | ecosystem overview | finding dependencies\n\nBranches:\n\u251C\u2500 Public: topicsToSearch + stars filter + sort by stars/updated\n\u251C\u2500 Private org: keywordsToSearch + owner + sort by updated\n\u251C\u2500 Dependencies: read manifest \u2192 bulk search variations \u2192 validate\n\u2514\u2500 Hypotheses: bulk test topics/keywords/owner combos\n\n<thinking>:\n- Search approach? (topic vs keyword vs owner)\n- Filters: stars/language/updated\n- mainResearchGoal / researchGoal for each query\n- Results comparison, quality signals\n- ASK USER: \"Found N repos via X, M via Y. Deep-dive which?\"\n- Creativity & Agility: probe non-obvious keywords/topics, org conventions, forks/network signals.\n\nGate (MANDATORY): \u2713 Found repos \u2192 B | \u2717 Empty \u2192 broaden, ASK USER (do not proceed without user input if scope is unclear)\n\nParameters (MANDATORY):\n- limit: 5\u201310; sort: stars or updated\n- Public: prefer topicsToSearch / keywordsToSearch + stars=\">=100\"; Private org: include owner and sort=updated\n- Heuristics: prefer repos with recent updates, docs presence (README/ARCHITECTURE), and stable activity\n- Exclusions: deprecated/archived unless explicitly requested\n\n## Stage B: Explore Structure (github_view_repo_structure)\nWhen: New repo | unfamiliar architecture | finding locations\n\nBranches:\n\u251C\u2500 Unknown: depth=1 root \u2192 selective depth=2 for key dirs\n\u251C\u2500 No branch specified: auto-defaults to main\n\u251C\u2500 Compare repos: bulk [{repo1, path=\"\"}, {repo2, path=\"\"}, ...]\n\u251C\u2500 Specific area: path=\"{{target_dir}}\" or path=\"packages/{{package}}\"\n\u2514\u2500 Find docs: README, ARCHITECTURE, /docs \u2192 read in Stage D first\n\n<thinking>:\n- Organization? (monorepo | standard | custom)\n- Implementation locations? (src/ | lib/ | packages/)\n- Relevant directories for goal?\n- Docs found? \u2192 Read first for context\n- ASK USER: \"Found {{dirs}}. Explore which first?\"\n- Creativity & Agility: look for unconventional structure (tools/, scripts/, internal/), custom build systems, generators.\n\nGate (MANDATORY): \u2713 Understand \u2192 D (docs) \u2192 C (code) | \u2717 Confused \u2192 D (README), ASK USER (pause until clarified)\n\nParameters (MANDATORY):\n- Start with depth=1 at path=\"\"; then depth=2 for only the most relevant dirs\n- Default branch if unspecified; document the branch used\n- Focus dirs: src/, lib/, packages/, docs/\n- Do not read file contents here; only collect structure and candidate targets\n\n## Stage C: Search Code (github_search_code)\nWhen: Finding files | implementations | patterns | tracing flows\n\nBranches:\n\u251C\u2500 Filename: match=\"path\" + bulk variations\n\u251C\u2500 Pattern: match=\"file\" + limit=5-10 + filters (path/extension) + semantic expansion\n\u251C\u2500 Docs: filename=\"README\" | path=\"docs\", extension=\"md\" \u2192 validate vs code\n\u251C\u2500 Known dir: path=\"{{dir}}\", extension=\"{{ext}}\"\n\u2514\u2500 Trace: follow imports/conditionals \u2192 loop C\u2192D\u2192C\n\n<thinking>:\n- Mode? (path discovery | content | docs)\n- Docs first? (Product: yes | Technical: verify)\n- Semantic variations? ({{term}} \u2192 related terms)\n- Cross-repo consistency? Version alignment?\n- ASK USER: \"Found pattern A in {{repo1}}, B in {{repo2}}. Compare which?\"\n- Creativity & Agility: try synonyms, framework conventions, test names, CLI/script entrypoints; pivot based on hits.\n\nGate (MANDATORY): \u2713 Found \u2192 D (extract) | \u2717 Empty \u2192 broaden/switch mode, ASK USER | \u2717 Too many \u2192 add filters (do not continue without resolving ambiguity)\n\nParameters (MANDATORY):\n- match: \"path\" for filename/discovery; \"file\" for content\n- limit: 5\u201310; add extension filters (ts, js, py, go, md) and path filters when possible\n- Exclude: node_modules, vendor, dist, build, coverage, lockfiles, minified assets\n- Variations: include synonyms/related terms; follow imports to expand search iteratively\n\n## Stage D: Extract Content (github_fetch_content)\nWhen: Reading files | validating findings | understanding implementations\n\nBranches:\n\u251C\u2500 Docs: fullContent=true, minified=false \u2192 note discrepancies\n\u251C\u2500 Excerpt: matchString + matchStringContextLines=5-20 \u2192 bulk parallel\n\u251C\u2500 Line range: startLine/endLine (prefer over fullContent)\n\u251C\u2500 Small/config: fullContent OK <200 lines, minified=false for JSON/YAML/configs/markdown\n\u251C\u2500 Compare: bulk [{repo1, path, matchString}, {repo2, path, matchString}]\n\u2514\u2500 Dependencies: read imports (startLine=1, endLine=50) \u2192 loop D\u2192C\u2192D\n\n<thinking>:\n- Docs claims vs code reality?\n- What does code actually do? (ignore comments)\n- Dependencies/versions compatible?\n- Context sufficient? (missing helpers/types?)\n- Docs conflicts? \u2192 trust code\n- ASK USER: \"Code does X but docs say Y. Investigate?\"\n- Creativity & Agility: sample nearby helpers/utils, skim small configs for signals, adjust ranges dynamically.\n\nGate (MANDATORY): \u2713 Understand \u2192 synthesize/continue | \u2717 Missing context \u2192 C (helpers/types/tests) | \u2717 Conflicts \u2192 read tests, ASK USER (pause until clarified)\n\nParameters (MANDATORY):\n- Prefer partial reads: matchString + matchStringContextLines=10\u201320; or startLine/endLine for focused ranges\n- fullContent=true only for small files (<200 lines) or when reading docs/config; set minified=false for JSON/YAML/Markdown\n- Default minified=true for large code files; always avoid entire large files\n- Compare similar files across repos in bulk when validating patterns\n\n# 3. LOOP OR COMPLETE?\n\nAfter each stage (checkpoint):\n\u251C\u2500 Goal met? \u2192 SYNTHESIS\n\u251C\u2500 Need context? \u2192 loop/go deeper\n\u251C\u2500 Contradictions? \u2192 validate (tests, compare repos)\n\u251C\u2500 Scope expanding? \u2192 ASK USER: \"Found {{area}}. Explore?\"\n\u251C\u2500 Maintain agility: adjust plan creatively to repository specifics as evidence emerges\n\u2514\u2500 Uncertain? \u2192 ASK USER\n\nMANDATORY: Always perform this checkpoint. If any item requires user input, ask a concise question and wait.\n\nLoop control (MANDATORY):\n- Maximum of 3 loops without user input; if still unclear, ASK USER with options summarizing trade-offs and halt.\n- Maintain a short Decision Log of what was tried and why.\n\n# 4. RECOVERY\n\nEmpty: broaden terms \u2192 remove filters \u2192 switch mode \u2192 try tests/docs/examples \u2192 back to Stage B \u2192 ASK USER (do not proceed silently)\n\nToo many: add specificity \u2192 filters (path/extension/limit) \u2192 exclude test/vendor/node_modules \u2192 quality bar (stars/updated)\n\nIncomplete: follow imports (D\u2192C\u2192D) \u2192 check tests (C\u2192D) \u2192 read docs (C\u2192D) \u2192 cross-reference (A\u2192compare) \u2192 ASK USER\n\nExpanding: STOP \u2192 ASK USER: \"Explored N repos, M files. Found {{approaches}}. Continue all or focus?\"\nCreativity & Agility: explore examples/, demo/, scripts/, tooling configs; attempt alternative angles before escalation.\n\nRate limits & caching (MANDATORY):\n- If encountering rate limits or slow responses, run api_status_check and adjust batch sizes.\n- Prefer bulk operations but respect limits; fall back to fewer queries temporarily and resume bulk when stable.\n- Reuse prior findings; deduplicate paths and avoid re-reading the same files unless necessary.\n\n# 5. SYNTHESIS\n\nBy default, return a concise, referenced answer addressing the validated research goal. If the user explicitly requests a full report (or the task clearly requires it), produce the comprehensive Research Documentation.\n\nWhen generating the full report, include:\n\u251C\u2500 Executive Summary: 2-3 sentences answering goal (must be decisive; note uncertainties explicitly)\n\u251C\u2500 Key Findings: bullets with {{owner}}/{{repo}}/{{path}}:{{lines}}\n\u251C\u2500 Analysis: high-level explanations (NOT code dumps)\n\u251C\u2500 Visualizations: Mermaid diagrams/tables when helpful (flowchart, sequenceDiagram, classDiagram, stateDiagram-v2, graph)\n\u251C\u2500 Code Examples: minimal, only when critical\n\u2514\u2500 References: every claim cited with repo/file/line\n\u251C\u2500 Confidence: per key finding, 0.0\u20131.0 with a one-line rationale\n\u2514\u2500 Open Questions & Next Steps: explicit follow-ups to resolve remaining uncertainty\n\n#PRINCIPLES\n\n\u251C\u2500 Never hallucinate \u2192 cite sources\n\u251C\u2500 Show reasoning succinctly \u2192 Decision Log + Assumptions each stage (no private chain-of-thought)\n\u251C\u2500 Ask when unclear \u2192 user input over assumptions (mandatory)\n\u251C\u2500 Code is truth \u2192 implementation over docs\n\u251C\u2500 Bulk operations \u2192 plan up to 5\u201310; adapt to limits\n\u251C\u2500 Validate continuously \u2192 check before proceeding\n\u251C\u2500 Synthesize \u2192 insights over raw data\n\u2514\u2500 Follow tool hints \u2192 adjust strategy, document exceptions\n\n# 7. FINAL VERIFICATION (MANDATORY)\n\nBefore output (final checks):\n\u2713 Goal addressed? Findings verified? Code validated? References complete? Assumptions documented? Question answered?\n\nIf uncertain: ASK USER\n- No sensitive data leaked? Citations use correct code reference format? Outputs are concise and structured?\n\n# WORKFLOWS\n\nTechnical: A \u2192 B (docs) \u2192 D (read docs) \u2192 C (impl) \u2192 D (verify) \u2192 C\u2192D (deps/tests) \u2192 Synthesize\nProduct: A \u2192 B (docs) \u2192 D (features) \u2192 C (validate) \u2192 D (examples) \u2192 Synthesize\nPattern: A bulk \u2192 B bulk \u2192 D bulk \u2192 C bulk \u2192 D bulk \u2192 Compare \u2192 Synthesize\nBug: C (docs/issues) \u2192 C (error) \u2192 D (changelog) \u2192 C\u2192D (tests) \u2192 Root cause \u2192 Synthesize";
4
+ export declare function registerResearchPrompt(server: McpServer): void;
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare const PROMPT_NAME = "use";
3
+ export declare function registerUsePrompt(server: McpServer): void;
@@ -19,39 +19,39 @@ declare const SamplingRequestSchema: z.ZodObject<{
19
19
  text: string;
20
20
  }>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- role: "user" | "assistant";
23
22
  content: {
24
23
  type: "text";
25
24
  text: string;
26
25
  };
27
- }, {
28
26
  role: "user" | "assistant";
27
+ }, {
29
28
  content: {
30
29
  type: "text";
31
30
  text: string;
32
31
  };
32
+ role: "user" | "assistant";
33
33
  }>, "many">;
34
34
  maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
35
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
36
36
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
37
37
  }, "strip", z.ZodTypeAny, {
38
38
  messages: {
39
- role: "user" | "assistant";
40
39
  content: {
41
40
  type: "text";
42
41
  text: string;
43
42
  };
43
+ role: "user" | "assistant";
44
44
  }[];
45
45
  maxTokens: number;
46
46
  temperature: number;
47
47
  stopSequences?: string[] | undefined;
48
48
  }, {
49
49
  messages: {
50
- role: "user" | "assistant";
51
50
  content: {
52
51
  type: "text";
53
52
  text: string;
54
53
  };
54
+ role: "user" | "assistant";
55
55
  }[];
56
56
  maxTokens?: number | undefined;
57
57
  temperature?: number | undefined;
@@ -1,11 +1,14 @@
1
1
  import { z } from 'zod';
2
2
  export declare const BaseQuerySchema: z.ZodObject<{
3
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
3
4
  researchGoal: z.ZodOptional<z.ZodString>;
4
5
  reasoning: z.ZodOptional<z.ZodString>;
5
6
  }, "strip", z.ZodTypeAny, {
7
+ mainResearchGoal?: string | undefined;
6
8
  researchGoal?: string | undefined;
7
9
  reasoning?: string | undefined;
8
10
  }, {
11
+ mainResearchGoal?: string | undefined;
9
12
  researchGoal?: string | undefined;
10
13
  reasoning?: string | undefined;
11
14
  }>;
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const FileContentQuerySchema: z.ZodObject<{
3
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
3
4
  researchGoal: z.ZodOptional<z.ZodString>;
4
5
  reasoning: z.ZodOptional<z.ZodString>;
5
6
  } & {
@@ -22,6 +23,7 @@ export declare const FileContentQuerySchema: z.ZodObject<{
22
23
  minified: boolean;
23
24
  fullContent: boolean;
24
25
  matchStringContextLines: number;
26
+ mainResearchGoal?: string | undefined;
25
27
  researchGoal?: string | undefined;
26
28
  reasoning?: string | undefined;
27
29
  branch?: string | undefined;
@@ -32,6 +34,7 @@ export declare const FileContentQuerySchema: z.ZodObject<{
32
34
  path: string;
33
35
  owner: string;
34
36
  repo: string;
37
+ mainResearchGoal?: string | undefined;
35
38
  researchGoal?: string | undefined;
36
39
  reasoning?: string | undefined;
37
40
  sanitize?: boolean | undefined;
@@ -45,6 +48,7 @@ export declare const FileContentQuerySchema: z.ZodObject<{
45
48
  }>;
46
49
  export declare const FileContentBulkQuerySchema: z.ZodObject<{
47
50
  queries: z.ZodArray<z.ZodObject<{
51
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
48
52
  researchGoal: z.ZodOptional<z.ZodString>;
49
53
  reasoning: z.ZodOptional<z.ZodString>;
50
54
  } & {
@@ -67,6 +71,7 @@ export declare const FileContentBulkQuerySchema: z.ZodObject<{
67
71
  minified: boolean;
68
72
  fullContent: boolean;
69
73
  matchStringContextLines: number;
74
+ mainResearchGoal?: string | undefined;
70
75
  researchGoal?: string | undefined;
71
76
  reasoning?: string | undefined;
72
77
  branch?: string | undefined;
@@ -77,6 +82,7 @@ export declare const FileContentBulkQuerySchema: z.ZodObject<{
77
82
  path: string;
78
83
  owner: string;
79
84
  repo: string;
85
+ mainResearchGoal?: string | undefined;
80
86
  researchGoal?: string | undefined;
81
87
  reasoning?: string | undefined;
82
88
  sanitize?: boolean | undefined;
@@ -97,6 +103,7 @@ export declare const FileContentBulkQuerySchema: z.ZodObject<{
97
103
  minified: boolean;
98
104
  fullContent: boolean;
99
105
  matchStringContextLines: number;
106
+ mainResearchGoal?: string | undefined;
100
107
  researchGoal?: string | undefined;
101
108
  reasoning?: string | undefined;
102
109
  branch?: string | undefined;
@@ -109,6 +116,7 @@ export declare const FileContentBulkQuerySchema: z.ZodObject<{
109
116
  path: string;
110
117
  owner: string;
111
118
  repo: string;
119
+ mainResearchGoal?: string | undefined;
112
120
  researchGoal?: string | undefined;
113
121
  reasoning?: string | undefined;
114
122
  sanitize?: boolean | undefined;
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const GitHubCodeSearchQuerySchema: z.ZodObject<{
3
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
3
4
  researchGoal: z.ZodOptional<z.ZodString>;
4
5
  reasoning: z.ZodOptional<z.ZodString>;
5
6
  } & {
@@ -19,10 +20,11 @@ export declare const GitHubCodeSearchQuerySchema: z.ZodObject<{
19
20
  minify: boolean;
20
21
  sanitize: boolean;
21
22
  path?: string | undefined;
22
- owner?: string | undefined;
23
- repo?: string | undefined;
23
+ mainResearchGoal?: string | undefined;
24
24
  researchGoal?: string | undefined;
25
25
  reasoning?: string | undefined;
26
+ owner?: string | undefined;
27
+ repo?: string | undefined;
26
28
  stars?: string | undefined;
27
29
  extension?: string | undefined;
28
30
  filename?: string | undefined;
@@ -31,10 +33,11 @@ export declare const GitHubCodeSearchQuerySchema: z.ZodObject<{
31
33
  }, {
32
34
  keywordsToSearch: string[];
33
35
  path?: string | undefined;
34
- owner?: string | undefined;
35
- repo?: string | undefined;
36
+ mainResearchGoal?: string | undefined;
36
37
  researchGoal?: string | undefined;
37
38
  reasoning?: string | undefined;
39
+ owner?: string | undefined;
40
+ repo?: string | undefined;
38
41
  stars?: string | undefined;
39
42
  extension?: string | undefined;
40
43
  filename?: string | undefined;
@@ -45,6 +48,7 @@ export declare const GitHubCodeSearchQuerySchema: z.ZodObject<{
45
48
  }>;
46
49
  export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
47
50
  queries: z.ZodArray<z.ZodObject<{
51
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
48
52
  researchGoal: z.ZodOptional<z.ZodString>;
49
53
  reasoning: z.ZodOptional<z.ZodString>;
50
54
  } & {
@@ -64,10 +68,11 @@ export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
64
68
  minify: boolean;
65
69
  sanitize: boolean;
66
70
  path?: string | undefined;
67
- owner?: string | undefined;
68
- repo?: string | undefined;
71
+ mainResearchGoal?: string | undefined;
69
72
  researchGoal?: string | undefined;
70
73
  reasoning?: string | undefined;
74
+ owner?: string | undefined;
75
+ repo?: string | undefined;
71
76
  stars?: string | undefined;
72
77
  extension?: string | undefined;
73
78
  filename?: string | undefined;
@@ -76,10 +81,11 @@ export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
76
81
  }, {
77
82
  keywordsToSearch: string[];
78
83
  path?: string | undefined;
79
- owner?: string | undefined;
80
- repo?: string | undefined;
84
+ mainResearchGoal?: string | undefined;
81
85
  researchGoal?: string | undefined;
82
86
  reasoning?: string | undefined;
87
+ owner?: string | undefined;
88
+ repo?: string | undefined;
83
89
  stars?: string | undefined;
84
90
  extension?: string | undefined;
85
91
  filename?: string | undefined;
@@ -94,10 +100,11 @@ export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
94
100
  minify: boolean;
95
101
  sanitize: boolean;
96
102
  path?: string | undefined;
97
- owner?: string | undefined;
98
- repo?: string | undefined;
103
+ mainResearchGoal?: string | undefined;
99
104
  researchGoal?: string | undefined;
100
105
  reasoning?: string | undefined;
106
+ owner?: string | undefined;
107
+ repo?: string | undefined;
101
108
  stars?: string | undefined;
102
109
  extension?: string | undefined;
103
110
  filename?: string | undefined;
@@ -108,10 +115,11 @@ export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
108
115
  queries: {
109
116
  keywordsToSearch: string[];
110
117
  path?: string | undefined;
111
- owner?: string | undefined;
112
- repo?: string | undefined;
118
+ mainResearchGoal?: string | undefined;
113
119
  researchGoal?: string | undefined;
114
120
  reasoning?: string | undefined;
121
+ owner?: string | undefined;
122
+ repo?: string | undefined;
115
123
  stars?: string | undefined;
116
124
  extension?: string | undefined;
117
125
  filename?: string | undefined;
@@ -11,6 +11,7 @@ export declare const DateRangeSchema: z.ZodObject<{
11
11
  updated?: string | undefined;
12
12
  }>;
13
13
  export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
14
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
14
15
  researchGoal: z.ZodOptional<z.ZodString>;
15
16
  reasoning: z.ZodOptional<z.ZodString>;
16
17
  } & {
@@ -50,10 +51,7 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
50
51
  withContent: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
51
52
  }, "strip", z.ZodTypeAny, {
52
53
  order: "asc" | "desc";
53
- sort?: "created" | "updated" | "best-match" | undefined;
54
54
  query?: string | undefined;
55
- owner?: string | undefined;
56
- repo?: string | undefined;
57
55
  state?: "open" | "closed" | undefined;
58
56
  draft?: boolean | undefined;
59
57
  assignee?: string | undefined;
@@ -62,8 +60,12 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
62
60
  closed?: string | undefined;
63
61
  created?: string | undefined;
64
62
  updated?: string | undefined;
63
+ mainResearchGoal?: string | undefined;
65
64
  researchGoal?: string | undefined;
66
65
  reasoning?: string | undefined;
66
+ owner?: string | undefined;
67
+ repo?: string | undefined;
68
+ sort?: "created" | "updated" | "best-match" | undefined;
67
69
  head?: string | undefined;
68
70
  'no-label'?: boolean | undefined;
69
71
  'no-milestone'?: boolean | undefined;
@@ -86,10 +88,7 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
86
88
  withComments?: boolean | undefined;
87
89
  withContent?: boolean | undefined;
88
90
  }, {
89
- sort?: "created" | "updated" | "best-match" | undefined;
90
91
  query?: string | undefined;
91
- owner?: string | undefined;
92
- repo?: string | undefined;
93
92
  state?: "open" | "closed" | undefined;
94
93
  draft?: boolean | undefined;
95
94
  assignee?: string | undefined;
@@ -98,8 +97,12 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
98
97
  closed?: string | undefined;
99
98
  created?: string | undefined;
100
99
  updated?: string | undefined;
100
+ mainResearchGoal?: string | undefined;
101
101
  researchGoal?: string | undefined;
102
102
  reasoning?: string | undefined;
103
+ owner?: string | undefined;
104
+ repo?: string | undefined;
105
+ sort?: "created" | "updated" | "best-match" | undefined;
103
106
  head?: string | undefined;
104
107
  'no-label'?: boolean | undefined;
105
108
  'no-milestone'?: boolean | undefined;
@@ -125,6 +128,7 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
125
128
  }>;
126
129
  export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
127
130
  queries: z.ZodArray<z.ZodObject<{
131
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
128
132
  researchGoal: z.ZodOptional<z.ZodString>;
129
133
  reasoning: z.ZodOptional<z.ZodString>;
130
134
  } & {
@@ -164,10 +168,7 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
164
168
  withContent: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
165
169
  }, "strip", z.ZodTypeAny, {
166
170
  order: "asc" | "desc";
167
- sort?: "created" | "updated" | "best-match" | undefined;
168
171
  query?: string | undefined;
169
- owner?: string | undefined;
170
- repo?: string | undefined;
171
172
  state?: "open" | "closed" | undefined;
172
173
  draft?: boolean | undefined;
173
174
  assignee?: string | undefined;
@@ -176,8 +177,12 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
176
177
  closed?: string | undefined;
177
178
  created?: string | undefined;
178
179
  updated?: string | undefined;
180
+ mainResearchGoal?: string | undefined;
179
181
  researchGoal?: string | undefined;
180
182
  reasoning?: string | undefined;
183
+ owner?: string | undefined;
184
+ repo?: string | undefined;
185
+ sort?: "created" | "updated" | "best-match" | undefined;
181
186
  head?: string | undefined;
182
187
  'no-label'?: boolean | undefined;
183
188
  'no-milestone'?: boolean | undefined;
@@ -200,10 +205,7 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
200
205
  withComments?: boolean | undefined;
201
206
  withContent?: boolean | undefined;
202
207
  }, {
203
- sort?: "created" | "updated" | "best-match" | undefined;
204
208
  query?: string | undefined;
205
- owner?: string | undefined;
206
- repo?: string | undefined;
207
209
  state?: "open" | "closed" | undefined;
208
210
  draft?: boolean | undefined;
209
211
  assignee?: string | undefined;
@@ -212,8 +214,12 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
212
214
  closed?: string | undefined;
213
215
  created?: string | undefined;
214
216
  updated?: string | undefined;
217
+ mainResearchGoal?: string | undefined;
215
218
  researchGoal?: string | undefined;
216
219
  reasoning?: string | undefined;
220
+ owner?: string | undefined;
221
+ repo?: string | undefined;
222
+ sort?: "created" | "updated" | "best-match" | undefined;
217
223
  head?: string | undefined;
218
224
  'no-label'?: boolean | undefined;
219
225
  'no-milestone'?: boolean | undefined;
@@ -240,10 +246,7 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
240
246
  }, "strip", z.ZodTypeAny, {
241
247
  queries: {
242
248
  order: "asc" | "desc";
243
- sort?: "created" | "updated" | "best-match" | undefined;
244
249
  query?: string | undefined;
245
- owner?: string | undefined;
246
- repo?: string | undefined;
247
250
  state?: "open" | "closed" | undefined;
248
251
  draft?: boolean | undefined;
249
252
  assignee?: string | undefined;
@@ -252,8 +255,12 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
252
255
  closed?: string | undefined;
253
256
  created?: string | undefined;
254
257
  updated?: string | undefined;
258
+ mainResearchGoal?: string | undefined;
255
259
  researchGoal?: string | undefined;
256
260
  reasoning?: string | undefined;
261
+ owner?: string | undefined;
262
+ repo?: string | undefined;
263
+ sort?: "created" | "updated" | "best-match" | undefined;
257
264
  head?: string | undefined;
258
265
  'no-label'?: boolean | undefined;
259
266
  'no-milestone'?: boolean | undefined;
@@ -278,10 +285,7 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
278
285
  }[];
279
286
  }, {
280
287
  queries: {
281
- sort?: "created" | "updated" | "best-match" | undefined;
282
288
  query?: string | undefined;
283
- owner?: string | undefined;
284
- repo?: string | undefined;
285
289
  state?: "open" | "closed" | undefined;
286
290
  draft?: boolean | undefined;
287
291
  assignee?: string | undefined;
@@ -290,8 +294,12 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
290
294
  closed?: string | undefined;
291
295
  created?: string | undefined;
292
296
  updated?: string | undefined;
297
+ mainResearchGoal?: string | undefined;
293
298
  researchGoal?: string | undefined;
294
299
  reasoning?: string | undefined;
300
+ owner?: string | undefined;
301
+ repo?: string | undefined;
302
+ sort?: "created" | "updated" | "best-match" | undefined;
295
303
  head?: string | undefined;
296
304
  'no-label'?: boolean | undefined;
297
305
  'no-milestone'?: boolean | undefined;
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const GitHubReposSearchQuerySchema: z.ZodObject<{
3
3
  queries: z.ZodArray<z.ZodObject<{
4
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
4
5
  researchGoal: z.ZodOptional<z.ZodString>;
5
6
  reasoning: z.ZodOptional<z.ZodString>;
6
7
  } & {
@@ -15,58 +16,62 @@ export declare const GitHubReposSearchQuerySchema: z.ZodObject<{
15
16
  sort: z.ZodOptional<z.ZodEnum<["forks", "stars", "updated", "best-match"]>>;
16
17
  limit: z.ZodOptional<z.ZodNumber>;
17
18
  }, "strip", z.ZodTypeAny, {
18
- sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
19
- owner?: string | undefined;
20
19
  created?: string | undefined;
21
20
  updated?: string | undefined;
21
+ mainResearchGoal?: string | undefined;
22
22
  researchGoal?: string | undefined;
23
23
  reasoning?: string | undefined;
24
+ owner?: string | undefined;
24
25
  stars?: string | undefined;
26
+ sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
25
27
  keywordsToSearch?: string[] | undefined;
26
- match?: ("description" | "name" | "readme")[] | undefined;
28
+ match?: ("name" | "description" | "readme")[] | undefined;
27
29
  limit?: number | undefined;
28
30
  size?: string | undefined;
29
31
  topicsToSearch?: string[] | undefined;
30
32
  }, {
31
- sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
32
- owner?: string | undefined;
33
33
  created?: string | undefined;
34
34
  updated?: string | undefined;
35
+ mainResearchGoal?: string | undefined;
35
36
  researchGoal?: string | undefined;
36
37
  reasoning?: string | undefined;
38
+ owner?: string | undefined;
37
39
  stars?: string | undefined;
40
+ sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
38
41
  keywordsToSearch?: string[] | undefined;
39
- match?: ("description" | "name" | "readme")[] | undefined;
42
+ match?: ("name" | "description" | "readme")[] | undefined;
40
43
  limit?: number | undefined;
41
44
  size?: string | undefined;
42
45
  topicsToSearch?: string[] | undefined;
43
46
  }>, "many">;
44
47
  }, "strip", z.ZodTypeAny, {
45
48
  queries: {
46
- sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
47
- owner?: string | undefined;
48
49
  created?: string | undefined;
49
50
  updated?: string | undefined;
51
+ mainResearchGoal?: string | undefined;
50
52
  researchGoal?: string | undefined;
51
53
  reasoning?: string | undefined;
54
+ owner?: string | undefined;
52
55
  stars?: string | undefined;
56
+ sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
53
57
  keywordsToSearch?: string[] | undefined;
54
- match?: ("description" | "name" | "readme")[] | undefined;
58
+ match?: ("name" | "description" | "readme")[] | undefined;
55
59
  limit?: number | undefined;
56
60
  size?: string | undefined;
57
61
  topicsToSearch?: string[] | undefined;
58
62
  }[];
59
63
  }, {
60
64
  queries: {
61
- sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
62
- owner?: string | undefined;
63
65
  created?: string | undefined;
64
66
  updated?: string | undefined;
67
+ mainResearchGoal?: string | undefined;
65
68
  researchGoal?: string | undefined;
66
69
  reasoning?: string | undefined;
70
+ owner?: string | undefined;
67
71
  stars?: string | undefined;
72
+ sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
68
73
  keywordsToSearch?: string[] | undefined;
69
- match?: ("description" | "name" | "readme")[] | undefined;
74
+ match?: ("name" | "description" | "readme")[] | undefined;
70
75
  limit?: number | undefined;
71
76
  size?: string | undefined;
72
77
  topicsToSearch?: string[] | undefined;
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
3
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
3
4
  researchGoal: z.ZodOptional<z.ZodString>;
4
5
  reasoning: z.ZodOptional<z.ZodString>;
5
6
  } & {
@@ -13,6 +14,7 @@ export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
13
14
  repo: string;
14
15
  branch: string;
15
16
  path?: string | undefined;
17
+ mainResearchGoal?: string | undefined;
16
18
  researchGoal?: string | undefined;
17
19
  reasoning?: string | undefined;
18
20
  depth?: number | undefined;
@@ -21,12 +23,14 @@ export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
21
23
  repo: string;
22
24
  branch: string;
23
25
  path?: string | undefined;
26
+ mainResearchGoal?: string | undefined;
24
27
  researchGoal?: string | undefined;
25
28
  reasoning?: string | undefined;
26
29
  depth?: number | undefined;
27
30
  }>;
28
31
  export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
29
32
  queries: z.ZodArray<z.ZodObject<{
33
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
30
34
  researchGoal: z.ZodOptional<z.ZodString>;
31
35
  reasoning: z.ZodOptional<z.ZodString>;
32
36
  } & {
@@ -40,6 +44,7 @@ export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
40
44
  repo: string;
41
45
  branch: string;
42
46
  path?: string | undefined;
47
+ mainResearchGoal?: string | undefined;
43
48
  researchGoal?: string | undefined;
44
49
  reasoning?: string | undefined;
45
50
  depth?: number | undefined;
@@ -48,6 +53,7 @@ export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
48
53
  repo: string;
49
54
  branch: string;
50
55
  path?: string | undefined;
56
+ mainResearchGoal?: string | undefined;
51
57
  researchGoal?: string | undefined;
52
58
  reasoning?: string | undefined;
53
59
  depth?: number | undefined;
@@ -58,6 +64,7 @@ export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
58
64
  repo: string;
59
65
  branch: string;
60
66
  path?: string | undefined;
67
+ mainResearchGoal?: string | undefined;
61
68
  researchGoal?: string | undefined;
62
69
  reasoning?: string | undefined;
63
70
  depth?: number | undefined;
@@ -68,6 +75,7 @@ export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
68
75
  repo: string;
69
76
  branch: string;
70
77
  path?: string | undefined;
78
+ mainResearchGoal?: string | undefined;
71
79
  researchGoal?: string | undefined;
72
80
  reasoning?: string | undefined;
73
81
  depth?: number | undefined;
@@ -1,9 +1,3 @@
1
- export declare const GENERAL: {
2
- base: {
3
- researchGoal: string;
4
- reasoning: string;
5
- };
6
- };
7
1
  export declare const COMMON: {
8
2
  scope: {
9
3
  owner: string;
@@ -14,6 +14,35 @@ export declare function withSecurityValidation<T extends Record<string, unknown>
14
14
  * For tools that don't need user context
15
15
  */
16
16
  export declare function withBasicSecurityValidation<T extends Record<string, unknown>>(toolHandler: (sanitizedArgs: T) => Promise<CallToolResult>): (args: unknown) => Promise<CallToolResult>;
17
+ /**
18
+ * Extracts research-related fields from tool parameters for logging purposes.
19
+ *
20
+ * Supports both bulk operations (queries array) and single operations (direct params).
21
+ * Consolidates research fields from multiple queries, prioritizing non-empty values.
22
+ *
23
+ * @param params - The tool parameters containing research information
24
+ * @returns Object with mainResearchGoal, researchGoal, and reasoning fields
25
+ *
26
+ * @example
27
+ * // Single query
28
+ * extractResearchFields({ queries: [{ mainResearchGoal: "Find auth", reasoning: "Security" }] })
29
+ * // Returns: { mainResearchGoal: "Find auth", reasoning: "Security" }
30
+ *
31
+ * @example
32
+ * // Multiple queries - consolidates unique values
33
+ * extractResearchFields({
34
+ * queries: [
35
+ * { mainResearchGoal: "Auth", researchGoal: "Find login" },
36
+ * { mainResearchGoal: "Auth", researchGoal: "Find logout" }
37
+ * ]
38
+ * })
39
+ * // Returns: { mainResearchGoal: "Auth", researchGoal: "Find login; Find logout" }
40
+ */
41
+ export declare function extractResearchFields(params: Record<string, unknown>): {
42
+ mainResearchGoal?: string;
43
+ researchGoal?: string;
44
+ reasoning?: string;
45
+ };
17
46
  /**
18
47
  * Extracts repository identifiers from tool parameters for logging purposes.
19
48
  *
@@ -13,7 +13,11 @@ declare class SessionManager {
13
13
  /**
14
14
  * Log tool call
15
15
  */
16
- logToolCall(toolName: string, repos: string[]): Promise<void>;
16
+ logToolCall(toolName: string, repos: string[], mainResearchGoal?: string, researchGoal?: string, reasoning?: string): Promise<void>;
17
+ /**
18
+ * Log prompt call
19
+ */
20
+ logPromptCall(promptName: string): Promise<void>;
17
21
  /**
18
22
  * Log error
19
23
  */
@@ -27,24 +31,10 @@ declare class SessionManager {
27
31
  * Initialize the session manager
28
32
  */
29
33
  export declare function initializeSession(): SessionManager;
30
- /**
31
- * Get the current session manager instance
32
- */
33
34
  export declare function getSessionManager(): SessionManager | null;
34
- /**
35
- * Log session initialization
36
- */
37
35
  export declare function logSessionInit(): Promise<void>;
38
- /**
39
- * Log tool call
40
- */
41
- export declare function logToolCall(toolName: string, repos: string[]): Promise<void>;
42
- /**
43
- * Log error
44
- */
36
+ export declare function logToolCall(toolName: string, repos: string[], mainResearchGoal?: string, researchGoal?: string, reasoning?: string): Promise<void>;
37
+ export declare function logPromptCall(promptName: string): Promise<void>;
45
38
  export declare function logSessionError(error: string): Promise<void>;
46
- /**
47
- * Reset session manager (for testing purposes)
48
- */
49
39
  export declare function resetSessionManager(): void;
50
40
  export {};