@qmediat.io/gemini-code-context-mcp 1.4.1 → 1.5.1

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 (45) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/README.md +26 -3
  3. package/dist/config.d.ts +23 -0
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/config.js +9 -0
  6. package/dist/config.js.map +1 -1
  7. package/dist/gemini/client.d.ts.map +1 -1
  8. package/dist/gemini/client.js +11 -0
  9. package/dist/gemini/client.js.map +1 -1
  10. package/dist/gemini/retry.d.ts +63 -0
  11. package/dist/gemini/retry.d.ts.map +1 -0
  12. package/dist/gemini/retry.js +103 -0
  13. package/dist/gemini/retry.js.map +1 -0
  14. package/dist/indexer/globs.d.ts +106 -0
  15. package/dist/indexer/globs.d.ts.map +1 -1
  16. package/dist/indexer/globs.js +151 -11
  17. package/dist/indexer/globs.js.map +1 -1
  18. package/dist/tools/agentic/sandbox.d.ts +55 -0
  19. package/dist/tools/agentic/sandbox.d.ts.map +1 -0
  20. package/dist/tools/agentic/sandbox.js +272 -0
  21. package/dist/tools/agentic/sandbox.js.map +1 -0
  22. package/dist/tools/agentic/workspace-tools.d.ts +104 -0
  23. package/dist/tools/agentic/workspace-tools.d.ts.map +1 -0
  24. package/dist/tools/agentic/workspace-tools.js +518 -0
  25. package/dist/tools/agentic/workspace-tools.js.map +1 -0
  26. package/dist/tools/ask-agentic.tool.d.ts +85 -0
  27. package/dist/tools/ask-agentic.tool.d.ts.map +1 -0
  28. package/dist/tools/ask-agentic.tool.js +739 -0
  29. package/dist/tools/ask-agentic.tool.js.map +1 -0
  30. package/dist/tools/ask.tool.d.ts +12 -12
  31. package/dist/tools/ask.tool.d.ts.map +1 -1
  32. package/dist/tools/ask.tool.js +537 -477
  33. package/dist/tools/ask.tool.js.map +1 -1
  34. package/dist/tools/code.tool.d.ts +8 -8
  35. package/dist/tools/code.tool.d.ts.map +1 -1
  36. package/dist/tools/code.tool.js +472 -423
  37. package/dist/tools/code.tool.js.map +1 -1
  38. package/dist/tools/index.d.ts.map +1 -1
  39. package/dist/tools/index.js +2 -0
  40. package/dist/tools/index.js.map +1 -1
  41. package/dist/tools/registry.d.ts +1 -1
  42. package/dist/tools/registry.d.ts.map +1 -1
  43. package/dist/tools/registry.js +8 -2
  44. package/dist/tools/registry.js.map +1 -1
  45. package/package.json +2 -2
@@ -0,0 +1,85 @@
1
+ /**
2
+ * `ask_agentic` tool — answers workspace questions without eager repo upload.
3
+ *
4
+ * Design — contrast with the eager `ask` tool:
5
+ * - `ask` : uploads workspace → Context Cache → single generateContent.
6
+ * Great for repeat queries on a cached repo; fails when
7
+ * the workspace tokens exceed `inputTokenLimit * guardRatio`.
8
+ * - `ask_agentic` : sends only the user's prompt + function-call tool
9
+ * declarations. Gemini decides which files to read via
10
+ * `list_directory` / `find_files` / `read_file` / `grep`.
11
+ * Loop runs until the model emits a text-only response
12
+ * (no more function calls), or until a guard trips
13
+ * (max iterations, token budget, no-progress loop).
14
+ *
15
+ * This path scales to any repo size — the model reads only what it needs
16
+ * for the specific question. Cost profile is different from `ask`: more
17
+ * API round trips, but total tokens usually much smaller on big repos
18
+ * (because you never upload files the question doesn't need).
19
+ *
20
+ * Codex PR consultation (gpt-5.3-codex, 2026-04-21) fed into the design:
21
+ * - Hard byte limits on tool responses (executors enforce)
22
+ * - `realpath` + root jail (sandbox module)
23
+ * - Prompt-injection defence in `systemInstruction`
24
+ * - No-progress detection (same call signature 3× → partial answer)
25
+ * - Parallel tool execution with concurrency cap
26
+ * - Recoverable-error via `functionResponse.error`; hard-fail for
27
+ * security / budget / timeouts
28
+ * - `notifications/progress` per iteration for UX
29
+ */
30
+ import { z } from 'zod';
31
+ import { type ToolDefinition } from './registry.js';
32
+ export declare const askAgenticInputSchema: z.ZodEffects<z.ZodObject<{
33
+ prompt: z.ZodString;
34
+ workspace: z.ZodOptional<z.ZodString>;
35
+ model: z.ZodOptional<z.ZodString>;
36
+ thinkingBudget: z.ZodOptional<z.ZodNumber>;
37
+ thinkingLevel: z.ZodOptional<z.ZodEnum<["MINIMAL", "LOW", "MEDIUM", "HIGH"]>>;
38
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
39
+ maxIterations: z.ZodOptional<z.ZodNumber>;
40
+ maxTotalInputTokens: z.ZodOptional<z.ZodNumber>;
41
+ maxFilesRead: z.ZodOptional<z.ZodNumber>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ prompt: string;
44
+ model?: string | undefined;
45
+ workspace?: string | undefined;
46
+ thinkingBudget?: number | undefined;
47
+ thinkingLevel?: "MINIMAL" | "LOW" | "MEDIUM" | "HIGH" | undefined;
48
+ maxOutputTokens?: number | undefined;
49
+ maxIterations?: number | undefined;
50
+ maxTotalInputTokens?: number | undefined;
51
+ maxFilesRead?: number | undefined;
52
+ }, {
53
+ prompt: string;
54
+ model?: string | undefined;
55
+ workspace?: string | undefined;
56
+ thinkingBudget?: number | undefined;
57
+ thinkingLevel?: "MINIMAL" | "LOW" | "MEDIUM" | "HIGH" | undefined;
58
+ maxOutputTokens?: number | undefined;
59
+ maxIterations?: number | undefined;
60
+ maxTotalInputTokens?: number | undefined;
61
+ maxFilesRead?: number | undefined;
62
+ }>, {
63
+ prompt: string;
64
+ model?: string | undefined;
65
+ workspace?: string | undefined;
66
+ thinkingBudget?: number | undefined;
67
+ thinkingLevel?: "MINIMAL" | "LOW" | "MEDIUM" | "HIGH" | undefined;
68
+ maxOutputTokens?: number | undefined;
69
+ maxIterations?: number | undefined;
70
+ maxTotalInputTokens?: number | undefined;
71
+ maxFilesRead?: number | undefined;
72
+ }, {
73
+ prompt: string;
74
+ model?: string | undefined;
75
+ workspace?: string | undefined;
76
+ thinkingBudget?: number | undefined;
77
+ thinkingLevel?: "MINIMAL" | "LOW" | "MEDIUM" | "HIGH" | undefined;
78
+ maxOutputTokens?: number | undefined;
79
+ maxIterations?: number | undefined;
80
+ maxTotalInputTokens?: number | undefined;
81
+ maxFilesRead?: number | undefined;
82
+ }>;
83
+ export type AskAgenticInput = z.infer<typeof askAgenticInputSchema>;
84
+ export declare const askAgenticTool: ToolDefinition<AskAgenticInput>;
85
+ //# sourceMappingURL=ask-agentic.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask-agentic.tool.d.ts","sourceRoot":"","sources":["../../src/tools/ask-agentic.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAaH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,OAAO,EAAE,KAAK,cAAc,EAA2B,MAAM,eAAe,CAAC;AAO7E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+C9B,CAAC;AAEL,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAsPpE,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,eAAe,CAa1D,CAAC"}