@vibesdotdev/integrations-context7 0.0.0-stage → 1.0.0-rc.0

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 (71) hide show
  1. package/LICENSE +126 -0
  2. package/README.md +14 -2
  3. package/dist/client.d.ts +11 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +90 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/config/context7.config.descriptor.d.ts +29 -0
  8. package/dist/config/context7.config.descriptor.d.ts.map +1 -0
  9. package/dist/config/context7.config.descriptor.js +24 -0
  10. package/dist/config/context7.config.descriptor.js.map +1 -0
  11. package/dist/index.d.ts +11 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +11 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/integrations-context7.consumer.plugin.d.ts +8 -0
  16. package/dist/integrations-context7.consumer.plugin.d.ts.map +1 -0
  17. package/dist/integrations-context7.consumer.plugin.js +50 -0
  18. package/dist/integrations-context7.consumer.plugin.js.map +1 -0
  19. package/dist/integrations-context7.plugin.d.ts +10 -0
  20. package/dist/integrations-context7.plugin.d.ts.map +1 -0
  21. package/dist/integrations-context7.plugin.js +28 -0
  22. package/dist/integrations-context7.plugin.js.map +1 -0
  23. package/dist/schemas/index.d.ts +102 -0
  24. package/dist/schemas/index.d.ts.map +1 -0
  25. package/dist/schemas/index.js +61 -0
  26. package/dist/schemas/index.js.map +1 -0
  27. package/dist/source/context7.descriptor.d.ts +18 -0
  28. package/dist/source/context7.descriptor.d.ts.map +1 -0
  29. package/dist/source/context7.descriptor.js +17 -0
  30. package/dist/source/context7.descriptor.js.map +1 -0
  31. package/dist/source/context7.impl.consumer.d.ts +17 -0
  32. package/dist/source/context7.impl.consumer.d.ts.map +1 -0
  33. package/dist/source/context7.impl.consumer.js +72 -0
  34. package/dist/source/context7.impl.consumer.js.map +1 -0
  35. package/dist/svelte/Context7DocsToolCard.svelte +85 -0
  36. package/dist/svelte/Context7DocsToolCard.svelte.d.ts +5 -0
  37. package/dist/svelte/Context7DocsToolCard.svelte.d.ts.map +1 -0
  38. package/dist/svelte/Context7SearchToolCard.svelte +99 -0
  39. package/dist/svelte/Context7SearchToolCard.svelte.d.ts +8 -0
  40. package/dist/svelte/Context7SearchToolCard.svelte.d.ts.map +1 -0
  41. package/dist/svelte/index.d.ts +4 -0
  42. package/dist/svelte/index.d.ts.map +1 -0
  43. package/dist/svelte/index.js +3 -0
  44. package/dist/svelte/integrations-context7-svelte.plugin.d.ts +4 -0
  45. package/dist/svelte/integrations-context7-svelte.plugin.d.ts.map +1 -0
  46. package/dist/svelte/integrations-context7-svelte.plugin.js +21 -0
  47. package/dist/tools/context7-docs.descriptor.d.ts +39 -0
  48. package/dist/tools/context7-docs.descriptor.d.ts.map +1 -0
  49. package/dist/tools/context7-docs.descriptor.js +27 -0
  50. package/dist/tools/context7-docs.descriptor.js.map +1 -0
  51. package/dist/tools/context7-docs.impl.d.ts +13 -0
  52. package/dist/tools/context7-docs.impl.d.ts.map +1 -0
  53. package/dist/tools/context7-docs.impl.js +13 -0
  54. package/dist/tools/context7-docs.impl.js.map +1 -0
  55. package/dist/tools/context7-search.descriptor.d.ts +46 -0
  56. package/dist/tools/context7-search.descriptor.d.ts.map +1 -0
  57. package/dist/tools/context7-search.descriptor.js +27 -0
  58. package/dist/tools/context7-search.descriptor.js.map +1 -0
  59. package/dist/tools/context7-search.impl.d.ts +13 -0
  60. package/dist/tools/context7-search.impl.d.ts.map +1 -0
  61. package/dist/tools/context7-search.impl.js +13 -0
  62. package/dist/tools/context7-search.impl.js.map +1 -0
  63. package/dist/tui/Context7DocsToolWidget.impl.consumer.d.ts +4 -0
  64. package/dist/tui/Context7DocsToolWidget.impl.consumer.d.ts.map +1 -0
  65. package/dist/tui/Context7DocsToolWidget.impl.consumer.js +20 -0
  66. package/dist/tui/Context7DocsToolWidget.impl.consumer.js.map +1 -0
  67. package/dist/tui/Context7SearchToolWidget.impl.consumer.d.ts +4 -0
  68. package/dist/tui/Context7SearchToolWidget.impl.consumer.d.ts.map +1 -0
  69. package/dist/tui/Context7SearchToolWidget.impl.consumer.js +21 -0
  70. package/dist/tui/Context7SearchToolWidget.impl.consumer.js.map +1 -0
  71. package/package.json +116 -4
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Context7 tool schemas.
3
+ *
4
+ * Input/output schemas for the Context7 HTTP API tools, separate from the
5
+ * implementation so manifests and widgets never pull in the HTTP client.
6
+ */
7
+ import * as z from 'zod/v4';
8
+ /** An operation can degrade its result while retaining the failure for its caller. */
9
+ const FailureContextSchema = z.object({ cause: z.unknown().optional() });
10
+ export const Context7SearchInputSchema = z.object({
11
+ query: z.string().describe('Search query to find libraries'),
12
+ apiKey: z.string().optional().describe('Optional Context7 API key for higher rate limits')
13
+ });
14
+ export const Context7SearchResultSchema = z
15
+ .object({
16
+ id: z.string(),
17
+ title: z.string(),
18
+ description: z.string().optional(),
19
+ branch: z.string().optional(),
20
+ lastUpdateDate: z.string().optional(),
21
+ state: z.string().optional(),
22
+ totalTokens: z.number().optional(),
23
+ totalSnippets: z.number().optional(),
24
+ totalPages: z.number().optional(),
25
+ trustScore: z.number().optional(),
26
+ benchmarkScore: z.number().optional(),
27
+ versions: z.array(z.string()).optional()
28
+ })
29
+ .passthrough();
30
+ export const Context7SearchOutputSchema = z.object({
31
+ ...FailureContextSchema.shape,
32
+ results: z.array(Context7SearchResultSchema),
33
+ error: z.string().optional()
34
+ });
35
+ export const Context7DocsInputSchema = z.object({
36
+ libraryId: z.string().describe('Context7-compatible library ID (e.g., /vercel/next.js)'),
37
+ topic: z.string().optional().describe('Optional topic to filter documentation'),
38
+ page: z.number().optional().default(1).describe('Page number for pagination'),
39
+ limit: z.number().optional().describe('Max items per page'),
40
+ apiKey: z.string().optional().describe('Optional Context7 API key for higher rate limits')
41
+ });
42
+ export const Context7DocsOutputSchema = z.object({
43
+ ...FailureContextSchema.shape,
44
+ content: z.string(),
45
+ libraryId: z.string(),
46
+ topic: z.string().optional(),
47
+ page: z.number(),
48
+ error: z.string().optional()
49
+ });
50
+ // A tool can be rendered while its result is still streaming. Validate the
51
+ // fields that have arrived against their owner, without inventing another wire contract.
52
+ export const ContextSearchPresentationInput = Context7SearchInputSchema.partial();
53
+ export const ContextSearchPresentationOutput = Context7SearchOutputSchema.partial();
54
+ export const ContextDocsPresentationInput = Context7DocsInputSchema.partial();
55
+ export const ContextDocsPresentationOutput = Context7DocsOutputSchema.partial();
56
+ /** Parse a possibly partial tool payload; `null` when it does not match the schema. */
57
+ export function readPresentation(schema, value) {
58
+ const parsed = schema.safeParse(value);
59
+ return parsed.success ? parsed.data : null;
60
+ }
61
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,sFAAsF;AACtF,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC5D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;CAC1F,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACzC,MAAM,CAAC;IACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,CAAC,CAAC,M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AC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAC3D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;CAC1F,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,GAAG,oBAAoB,CAAC,KAAK;IAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAOH,2EAA2E;AAC3E,yFAAyF;AACzF,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,OAAO,EAAE,CAAC;AAClF,MAAM,CAAC,MAAM,+BAA+B,GAAG,0BAA0B,CAAC,OAAO,EAAE,CAAC;AACpF,MAAM,CAAC,MAAM,4BAA4B,GAAG,uBAAuB,CAAC,OAAO,EAAE,CAAC;AAC9E,MAAM,CAAC,MAAM,6BAA6B,GAAG,wBAAwB,CAAC,OAAO,EAAE,CAAC;AAEhF,uFAAuF;AACvF,MAAM,UAAU,gBAAgB,CAAI,MAAoB,EAAE,KAAc;IACvE,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACvC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Context7 Source Descriptor
3
+ *
4
+ * Queries library documentation directly via Context7 HTTP endpoints.
5
+ * Best for dependency/library documentation queries.
6
+ */
7
+ declare const _default: {
8
+ kind: "knowledge/source";
9
+ id: string;
10
+ name: string;
11
+ description: string;
12
+ hardware: string[];
13
+ priority: number;
14
+ queryTypes: "dependencies"[];
15
+ preferredFor: "dependencies";
16
+ };
17
+ export default _default;
18
+ //# sourceMappingURL=context7.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context7.descriptor.d.ts","sourceRoot":"","sources":["../../src/source/context7.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;AAIH,wBASsC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Context7 Source Descriptor
3
+ *
4
+ * Queries library documentation directly via Context7 HTTP endpoints.
5
+ * Best for dependency/library documentation queries.
6
+ */
7
+ export default {
8
+ kind: 'knowledge/source',
9
+ id: 'context7',
10
+ name: 'Context7 Library Docs',
11
+ description: 'Queries library documentation from Context7 endpoints',
12
+ hardware: ['consumer', 'cloud'],
13
+ priority: 10,
14
+ queryTypes: ['dependencies'],
15
+ preferredFor: 'dependencies'
16
+ };
17
+ //# sourceMappingURL=context7.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context7.descriptor.js","sourceRoot":"","sources":["../../src/source/context7.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAe;IACd,IAAI,EAAE,kBAAkB;IACxB,EAAE,EAAE,UAAU;IACd,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,uDAAuD;IACpE,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,CAAC,cAAc,CAAC;IAC5B,YAAY,EAAE,cAAc;CACQ,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Context7 Source Implementation
3
+ *
4
+ * Queries library documentation via Context7 HTTP endpoints.
5
+ * Priority 10 - early in the chain for dependency queries.
6
+ *
7
+ * The library is resolved by Context7's own search endpoint (the same one the
8
+ * `context7-search` tool calls), not by guessing names from the question.
9
+ */
10
+ import type { KnowledgeQueryType } from '@vibesdotdev/knowledge/kinds/source';
11
+ import type { SourceQueryOptions, SourceQueryResult, SourceContext } from '@vibesdotdev/knowledge/tools/query/schemas/sources';
12
+ declare const _default: {
13
+ canHandle(queryType: KnowledgeQueryType): boolean;
14
+ query(options: SourceQueryOptions, context: SourceContext): Promise<SourceQueryResult>;
15
+ };
16
+ export default _default;
17
+ //# sourceMappingURL=context7.impl.consumer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context7.impl.consumer.d.ts","sourceRoot":"","sources":["../../src/source/context7.impl.consumer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAiC,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,oDAAoD,CAAC;;yBAUzG,kBAAkB,GAAG,OAAO;mBAI5B,kBAAkB,WAAW,aAAa,GAAG,OAAO,CAAC,iBAAiB,CAAC;;AAL7F,wBAsE0C"}
@@ -0,0 +1,72 @@
1
+ import { fetchContext7Docs, loadContext7Config, searchContext7 } from "../client.js";
2
+ const NOT_FOUND = { found: false, content: '', confidence: 0, sources: [] };
3
+ const MAX_CONTENT_CHARS = 8000;
4
+ /** Context7 docs API page size ceiling. */
5
+ const MAX_DOCS_LIMIT = 10;
6
+ export default {
7
+ canHandle(queryType) {
8
+ return queryType === 'dependencies';
9
+ },
10
+ async query(options, context) {
11
+ const { question, limit } = options;
12
+ const { toolContext: runtime, logger } = context;
13
+ try {
14
+ const searchResult = await searchContext7(runtime, { query: question });
15
+ if (searchResult.error) {
16
+ logger?.warn('Context7 library resolve error', { error: searchResult.error });
17
+ return NOT_FOUND;
18
+ }
19
+ const bestMatch = searchResult.results[0];
20
+ if (!bestMatch) {
21
+ logger?.debug('Context7 resolved no library for the question');
22
+ return NOT_FOUND;
23
+ }
24
+ const libraryId = bestMatch.id;
25
+ logger?.info('Context7: Resolved library', { libraryId, title: bestMatch.title, snippets: bestMatch.totalSnippets });
26
+ const docsResult = await fetchContext7Docs(runtime, {
27
+ libraryId,
28
+ page: 1,
29
+ topic: question,
30
+ limit: Math.min(limit, MAX_DOCS_LIMIT)
31
+ });
32
+ if (docsResult.error) {
33
+ logger?.warn('Context7 docs fetch error', { error: docsResult.error });
34
+ return NOT_FOUND;
35
+ }
36
+ if (docsResult.content.length === 0) {
37
+ logger?.debug('No documentation content from Context7');
38
+ return NOT_FOUND;
39
+ }
40
+ const content = [
41
+ `## ${bestMatch.title} Documentation`,
42
+ '',
43
+ docsResult.content.slice(0, MAX_CONTENT_CHARS),
44
+ '',
45
+ `_Source: Context7 - ${libraryId}_`
46
+ ].join('\n');
47
+ const hasHighReputation = (bestMatch.trustScore ?? 0) > 7 || (bestMatch.benchmarkScore ?? 0) > 80;
48
+ const confidence = hasHighReputation ? 0.85 : 0.7;
49
+ const { origin } = await loadContext7Config(runtime);
50
+ return {
51
+ found: true,
52
+ content,
53
+ confidence,
54
+ sources: [
55
+ {
56
+ type: 'context7',
57
+ reference: `${bestMatch.title} (${libraryId})`,
58
+ url: new URL(libraryId, origin).toString(),
59
+ confidence
60
+ }
61
+ ],
62
+ rawData: { libraryId, library: bestMatch, contentLength: docsResult.content.length }
63
+ };
64
+ }
65
+ catch (error) {
66
+ const errorMessage = error instanceof Error ? error.message : String(error);
67
+ logger?.warn('Context7 query failed', { error: errorMessage });
68
+ return { ...NOT_FOUND, cause: error, rawData: { debug: `Exception: ${errorMessage}` } };
69
+ }
70
+ }
71
+ };
72
+ //# sourceMappingURL=context7.impl.consumer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context7.impl.consumer.js","sourceRoot":"","sources":["../../src/source/context7.impl.consumer.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAErF,MAAM,SAAS,GAAG,EAAE,KAAK,EAA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BAC1C,UAAU;qBACV;iBACD;gBACD,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE;aACpF,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5E,MAAM,EAAE,IAAI,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;YAC/D,OAAO,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,cAAc,YAAY,EAAE,EAAE,EAAE,CAAC;QACzF,CAAC;IACF,CAAC;CACuC,CAAC"}
@@ -0,0 +1,85 @@
1
+ <script lang="ts">
2
+ /**
3
+ * First-party widget for `context7-docs`: library id + documentation text.
4
+ */
5
+ import { CodeViewer } from '@vibesdotdev/kit/components/code';
6
+ import {
7
+ ToolCard,
8
+ ToolCardBody,
9
+ type ToolWidgetProps
10
+ } from '@vibesdotdev/kit/components/tool-widgets';
11
+ import { Icon } from '@vibesdotdev/kit/components/icon';
12
+ import { Badge } from '@vibesdotdev/kit/components/ui/badge';
13
+ import {
14
+ readPresentation,
15
+ ContextDocsPresentationInput,
16
+ ContextDocsPresentationOutput
17
+ } from '@vibesdotdev/integrations-context7/schemas';
18
+
19
+ let { tool, compact = false }: ToolWidgetProps = $props();
20
+
21
+ const input = $derived(readPresentation(ContextDocsPresentationInput, tool.input));
22
+ const output = $derived(readPresentation(ContextDocsPresentationOutput, tool.output));
23
+ const outputError = $derived(output?.error ?? '');
24
+ const status = $derived(String(tool.status ?? 'completed'));
25
+ const isFailed = $derived(
26
+ status === 'failed' ||
27
+ status === 'error' ||
28
+ status === 'denied' ||
29
+ Boolean(tool.error) ||
30
+ Boolean(outputError)
31
+ );
32
+
33
+ const libraryId = $derived.by(() => {
34
+ const out = output?.libraryId ?? '';
35
+ if (out) return out;
36
+ return input?.libraryId ?? '';
37
+ });
38
+ const topic = $derived.by(() => {
39
+ const out = output?.topic ?? '';
40
+ if (out) return out;
41
+ return input?.topic ?? '';
42
+ });
43
+ const page = $derived(
44
+ output?.page ?? input?.page ?? null
45
+ );
46
+ const content = $derived(output?.content ?? '');
47
+ const summaryTitle = $derived(
48
+ isFailed ? 'Could not load Context7 docs' : libraryId || 'Context7 docs'
49
+ );
50
+ </script>
51
+
52
+ <ToolCard {tool} {compact} title={summaryTitle} icon="lucide:book-text" defaultOpen={isFailed}>
53
+ <ToolCardBody {compact}>
54
+ {#if isFailed}
55
+ <div class="flex items-start gap-2 text-footnote text-destructive">
56
+ <Icon icon="lucide:circle-alert" class="mt-0.5 size-3.5 shrink-0" />
57
+ <p class="whitespace-pre-wrap">
58
+ {tool.error || outputError || 'The context7-docs tool failed.'}
59
+ </p>
60
+ </div>
61
+ {:else}
62
+ <div class="flex flex-wrap items-center gap-1.5">
63
+ {#if topic}
64
+ <Badge variant="secondary" class="max-w-full truncate text-caption">{topic}</Badge>
65
+ {/if}
66
+ {#if page !== null}
67
+ <Badge variant="outline" class="text-caption">page {page}</Badge>
68
+ {/if}
69
+ </div>
70
+ {#if content}
71
+ <CodeViewer
72
+ code={content}
73
+ filename={libraryId || undefined}
74
+ language="auto"
75
+ appearance="system"
76
+ maxHeight="20rem"
77
+ minHeight="0"
78
+ showLineNumbers
79
+ />
80
+ {:else if !tool.error}
81
+ <p class="text-footnote text-muted-foreground italic">No documentation returned.</p>
82
+ {/if}
83
+ {/if}
84
+ </ToolCardBody>
85
+ </ToolCard>
@@ -0,0 +1,5 @@
1
+ import { type ToolWidgetProps } from '@vibesdotdev/kit/components/tool-widgets';
2
+ declare const Context7DocsToolCard: import("svelte").Component<ToolWidgetProps, {}, "">;
3
+ type Context7DocsToolCard = ReturnType<typeof Context7DocsToolCard>;
4
+ export default Context7DocsToolCard;
5
+ //# sourceMappingURL=Context7DocsToolCard.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context7DocsToolCard.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/Context7DocsToolCard.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,eAAe,EACpB,MAAM,0CAA0C,CAAC;AA+EnD,QAAA,MAAM,oBAAoB,qDAAwC,CAAC;AACnE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,99 @@
1
+ <script lang="ts">
2
+ /**
3
+ * First-party widget for `context7-search`: library id results.
4
+ */
5
+ import {
6
+ ToolCard,
7
+ ToolCardBody,
8
+ type ToolWidgetProps
9
+ } from '@vibesdotdev/kit/components/tool-widgets';
10
+ import { Icon } from '@vibesdotdev/kit/components/icon';
11
+ import { Badge } from '@vibesdotdev/kit/components/ui/badge';
12
+ import {
13
+ readPresentation,
14
+ ContextSearchPresentationInput,
15
+ ContextSearchPresentationOutput
16
+ } from '@vibesdotdev/integrations-context7/schemas';
17
+
18
+ let { tool, compact = false }: ToolWidgetProps = $props();
19
+
20
+ const input = $derived(readPresentation(ContextSearchPresentationInput, tool.input));
21
+ const output = $derived(readPresentation(ContextSearchPresentationOutput, tool.output));
22
+ const outputError = $derived(output?.error ?? '');
23
+ const status = $derived(String(tool.status ?? 'completed'));
24
+ const isFailed = $derived(
25
+ status === 'failed' ||
26
+ status === 'error' ||
27
+ status === 'denied' ||
28
+ Boolean(tool.error) ||
29
+ Boolean(outputError)
30
+ );
31
+
32
+ const query = $derived.by(() => {
33
+ return input?.query ?? '';
34
+ });
35
+
36
+ const results = $derived(output?.results ?? []);
37
+
38
+ const summaryTitle = $derived(
39
+ isFailed
40
+ ? 'Context7 search failed'
41
+ : query
42
+ ? `Found ${results.length} Context7 ${results.length === 1 ? 'library' : 'libraries'}`
43
+ : 'Context7 search'
44
+ );
45
+ </script>
46
+
47
+ <ToolCard {tool} {compact} title={summaryTitle} icon="lucide:library" defaultOpen={isFailed}>
48
+ <ToolCardBody {compact}>
49
+ {#if isFailed}
50
+ <div class="flex items-start gap-2 text-footnote text-destructive">
51
+ <Icon icon="lucide:circle-alert" class="mt-0.5 size-3.5 shrink-0" />
52
+ <p class="whitespace-pre-wrap">
53
+ {tool.error || outputError || 'The context7-search tool failed.'}
54
+ </p>
55
+ </div>
56
+ {:else}
57
+ {#if query}
58
+ <Badge variant="secondary" class="max-w-full truncate text-caption">{query}</Badge>
59
+ {/if}
60
+ {#if results.length}
61
+ <ul class="space-y-1.5">
62
+ {#each results as result (result.id)}
63
+ <li class="min-w-0">
64
+ <div class="flex items-start gap-2">
65
+ <span class="min-w-0 flex-1">
66
+ <span class="block truncate text-footnote font-medium text-foreground"
67
+ >{result.title}</span
68
+ >
69
+ {#if result.id !== result.title}
70
+ <span class="block truncate font-mono text-caption text-muted-foreground">
71
+ {result.id}
72
+ </span>
73
+ {/if}
74
+ {#if result.description}
75
+ <span class="block line-clamp-2 text-footnote text-muted-foreground">
76
+ {result.description}
77
+ </span>
78
+ {/if}
79
+ </span>
80
+ {#if result.trustScore !== undefined}
81
+ <Badge variant="outline" class="shrink-0 text-caption">
82
+ trust {result.trustScore}
83
+ </Badge>
84
+ {/if}
85
+ </div>
86
+ {#if result.totalSnippets !== undefined}
87
+ <div class="text-caption text-muted-foreground">
88
+ {result.totalSnippets} snippet{result.totalSnippets === 1 ? '' : 's'}
89
+ </div>
90
+ {/if}
91
+ </li>
92
+ {/each}
93
+ </ul>
94
+ {:else if !tool.error}
95
+ <p class="text-footnote text-muted-foreground italic">No libraries found.</p>
96
+ {/if}
97
+ {/if}
98
+ </ToolCardBody>
99
+ </ToolCard>
@@ -0,0 +1,8 @@
1
+ /**
2
+ * First-party widget for `context7-search`: library id results.
3
+ */
4
+ import { type ToolWidgetProps } from '@vibesdotdev/kit/components/tool-widgets';
5
+ declare const Context7SearchToolCard: import("svelte").Component<ToolWidgetProps, {}, "">;
6
+ type Context7SearchToolCard = ReturnType<typeof Context7SearchToolCard>;
7
+ export default Context7SearchToolCard;
8
+ //# sourceMappingURL=Context7SearchToolCard.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context7SearchToolCard.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/Context7SearchToolCard.svelte.ts"],"names":[],"mappings":"AAGA;;OAEI;AACJ,OAAO,EAGL,KAAK,eAAe,EACpB,MAAM,0CAA0C,CAAC;AAmGnD,QAAA,MAAM,sBAAsB,qDAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as Context7SearchToolCard } from './Context7SearchToolCard.svelte';
2
+ export { default as Context7DocsToolCard } from './Context7DocsToolCard.svelte';
3
+ export { integrationsContext7SveltePlugin, integrationsContext7SveltePlugin as default } from './integrations-context7-svelte.plugin.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/svelte/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,gCAAgC,EAAE,gCAAgC,IAAI,OAAO,EAAE,MAAM,0CAA0C,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as Context7SearchToolCard } from './Context7SearchToolCard.svelte';
2
+ export { default as Context7DocsToolCard } from './Context7DocsToolCard.svelte';
3
+ export { integrationsContext7SveltePlugin, integrationsContext7SveltePlugin as default } from "./integrations-context7-svelte.plugin.js";
@@ -0,0 +1,4 @@
1
+ /** Browser tool cards for `context7-search` and `context7-docs`. */
2
+ export declare const integrationsContext7SveltePlugin: import("@vibesdotdev/kernel").RuntimePlugin;
3
+ export default integrationsContext7SveltePlugin;
4
+ //# sourceMappingURL=integrations-context7-svelte.plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations-context7-svelte.plugin.d.ts","sourceRoot":"","sources":["../../src/svelte/integrations-context7-svelte.plugin.ts"],"names":[],"mappings":"AAeA,oEAAoE;AACpE,eAAO,MAAM,gCAAgC,6CAU3C,CAAC;AAEH,eAAe,gCAAgC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { createRuntimePlugin } from '@vibesdotdev/kernel/factory';
2
+ import { createSvelteToolWidgetDescriptor, createSvelteToolWidgetLoader, registerSvelteToolWidget } from '@vibesdotdev/tools/svelte/tool-widgets';
3
+ const context7SearchWidgetDescriptor = createSvelteToolWidgetDescriptor({ toolId: 'context7-search' });
4
+ const context7DocsWidgetDescriptor = createSvelteToolWidgetDescriptor({ toolId: 'context7-docs' });
5
+ const loadContext7SearchCard = () => import('./Context7SearchToolCard.svelte');
6
+ const loadContext7DocsCard = () => import('./Context7DocsToolCard.svelte');
7
+ await registerSvelteToolWidget(context7SearchWidgetDescriptor, loadContext7SearchCard);
8
+ await registerSvelteToolWidget(context7DocsWidgetDescriptor, loadContext7DocsCard);
9
+ /** Browser tool cards for `context7-search` and `context7-docs`. */
10
+ export const integrationsContext7SveltePlugin = createRuntimePlugin({
11
+ id: 'integrations-context7.svelte',
12
+ name: 'Integrations Context7 Svelte',
13
+ description: 'Svelte tool widgets for the Context7 tools',
14
+ dependencies: ['tools'],
15
+ descriptors: [context7SearchWidgetDescriptor, context7DocsWidgetDescriptor],
16
+ loaders: [
17
+ createSvelteToolWidgetLoader(context7SearchWidgetDescriptor, loadContext7SearchCard),
18
+ createSvelteToolWidgetLoader(context7DocsWidgetDescriptor, loadContext7DocsCard)
19
+ ]
20
+ });
21
+ export default integrationsContext7SveltePlugin;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Context7 Docs Tool Descriptor
3
+ *
4
+ * Metadata for the context7-docs tool. Safe to import anywhere.
5
+ */
6
+ declare const _default: {
7
+ readonly kind: "tools/tool";
8
+ readonly id: "context7-docs";
9
+ readonly name: "Context7 Docs";
10
+ readonly description: "Fetch docs for a Context7 library ID.";
11
+ readonly mcpDescription: "Fetch docs. Ex: {libraryId:\"/sveltejs/svelte\",topic:\"stores\"}.";
12
+ readonly category: "knowledge";
13
+ readonly subcategory: "external";
14
+ readonly hardware: readonly ["consumer", "cloud"];
15
+ readonly purpose: ["direct", "worker", "mcp", "agent"];
16
+ readonly tags: readonly ["docs", "knowledge", "documentation", "context7"];
17
+ readonly safety: "execute";
18
+ readonly requiresApproval: false;
19
+ readonly enabled: true;
20
+ readonly schemas: {
21
+ readonly input: import("zod").ZodObject<{
22
+ libraryId: import("zod").ZodString;
23
+ topic: import("zod").ZodOptional<import("zod").ZodString>;
24
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
25
+ limit: import("zod").ZodOptional<import("zod").ZodNumber>;
26
+ apiKey: import("zod").ZodOptional<import("zod").ZodString>;
27
+ }, import("zod/v4/core").$strip>;
28
+ readonly output: import("zod").ZodObject<{
29
+ content: import("zod").ZodString;
30
+ libraryId: import("zod").ZodString;
31
+ topic: import("zod").ZodOptional<import("zod").ZodString>;
32
+ page: import("zod").ZodNumber;
33
+ error: import("zod").ZodOptional<import("zod").ZodString>;
34
+ cause: import("zod").ZodOptional<import("zod").ZodUnknown>;
35
+ }, import("zod/v4/core").$strip>;
36
+ };
37
+ };
38
+ export default _default;
39
+ //# sourceMappingURL=context7-docs.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context7-docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/tools/context7-docs.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKH,wBAkBG"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Context7 Docs Tool Descriptor
3
+ *
4
+ * Metadata for the context7-docs tool. Safe to import anywhere.
5
+ */
6
+ import { createRuntimeAsset } from '@vibesdotdev/kernel/factory';
7
+ import { Context7DocsInputSchema, Context7DocsOutputSchema } from "../schemas/index.js";
8
+ export default createRuntimeAsset({
9
+ kind: 'tools/tool',
10
+ id: 'context7-docs',
11
+ name: 'Context7 Docs',
12
+ description: 'Fetch docs for a Context7 library ID.',
13
+ mcpDescription: 'Fetch docs. Ex: {libraryId:"/sveltejs/svelte",topic:"stores"}.',
14
+ category: 'knowledge',
15
+ subcategory: 'external',
16
+ hardware: ['consumer', 'cloud'],
17
+ purpose: ['direct', 'worker', 'mcp', 'agent'],
18
+ tags: ['docs', 'knowledge', 'documentation', 'context7'],
19
+ safety: 'execute',
20
+ requiresApproval: false,
21
+ enabled: true,
22
+ schemas: {
23
+ input: Context7DocsInputSchema,
24
+ output: Context7DocsOutputSchema
25
+ }
26
+ });
27
+ //# sourceMappingURL=context7-docs.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context7-docs.descriptor.js","sourceRoot":"","sources":["../../src/tools/context7-docs.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAExF,eAAe,kBAAkB,CAAC;IACjC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,uCAAuC;IACpD,cAAc,EAAE,gEAAgE;IAChF,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,UAAU;IACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC;IAC7C,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,CAAC;IACxD,MAAM,EAAE,SAAS;IACjB,gBAAgB,EAAE,KAAK;IACvB,OAAO,EAAE,IAAI;IACb,OAAO,EAAE;QACR,KAAK,EAAE,uBAAuB;QAC9B,MAAM,EAAE,wBAAwB;KAChC;CACD,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Context7 Docs Tool Implementation
3
+ *
4
+ * Hardware-agnostic — pure HTTP fetch against Context7 endpoints.
5
+ * Works in consumer runtimes and cloud workers.
6
+ */
7
+ import type { VibesRuntime, ToolCallContext } from '@vibesdotdev/kernel';
8
+ import type { Context7DocsInput, Context7DocsOutput } from '../schemas/index.ts';
9
+ declare const _default: {
10
+ execute(input: Context7DocsInput, runtime: VibesRuntime, _ctx: ToolCallContext): Promise<Context7DocsOutput>;
11
+ };
12
+ export default _default;
13
+ //# sourceMappingURL=context7-docs.impl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context7-docs.impl.d.ts","sourceRoot":"","sources":["../../src/tools/context7-docs.impl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;;mBAKxE,iBAAiB,WACf,YAAY,QACf,eAAe,GACnB,OAAO,CAAC,kBAAkB,CAAC;;AAL/B,wBAQE"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Context7 Docs Tool Implementation
3
+ *
4
+ * Hardware-agnostic — pure HTTP fetch against Context7 endpoints.
5
+ * Works in consumer runtimes and cloud workers.
6
+ */
7
+ import { fetchContext7Docs } from "../client.js";
8
+ export default {
9
+ execute(input, runtime, _ctx) {
10
+ return fetchContext7Docs(runtime, input);
11
+ }
12
+ };
13
+ //# sourceMappingURL=context7-docs.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context7-docs.impl.js","sourceRoot":"","sources":["../../src/tools/context7-docs.impl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,eAAe;IACd,OAAO,CACN,KAAwB,EACxB,OAAqB,EACrB,IAAqB;QAErB,OAAO,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;CACD,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Context7 Search Tool Descriptor
3
+ *
4
+ * Metadata for the context7-search tool. Safe to import anywhere.
5
+ */
6
+ declare const _default: {
7
+ readonly kind: "tools/tool";
8
+ readonly id: "context7-search";
9
+ readonly name: "Context7 Search";
10
+ readonly description: "Find Context7 library IDs.";
11
+ readonly mcpDescription: "Find library IDs. Ex: {query:\"svelte\"}; use result with context7-docs.";
12
+ readonly category: "knowledge";
13
+ readonly subcategory: "external";
14
+ readonly hardware: readonly ["consumer", "cloud"];
15
+ readonly purpose: ["direct", "worker", "mcp", "agent"];
16
+ readonly tags: readonly ["search", "knowledge", "documentation", "context7"];
17
+ readonly safety: "execute";
18
+ readonly requiresApproval: false;
19
+ readonly enabled: true;
20
+ readonly schemas: {
21
+ readonly input: import("zod").ZodObject<{
22
+ query: import("zod").ZodString;
23
+ apiKey: import("zod").ZodOptional<import("zod").ZodString>;
24
+ }, import("zod/v4/core").$strip>;
25
+ readonly output: import("zod").ZodObject<{
26
+ results: import("zod").ZodArray<import("zod").ZodObject<{
27
+ id: import("zod").ZodString;
28
+ title: import("zod").ZodString;
29
+ description: import("zod").ZodOptional<import("zod").ZodString>;
30
+ branch: import("zod").ZodOptional<import("zod").ZodString>;
31
+ lastUpdateDate: import("zod").ZodOptional<import("zod").ZodString>;
32
+ state: import("zod").ZodOptional<import("zod").ZodString>;
33
+ totalTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
34
+ totalSnippets: import("zod").ZodOptional<import("zod").ZodNumber>;
35
+ totalPages: import("zod").ZodOptional<import("zod").ZodNumber>;
36
+ trustScore: import("zod").ZodOptional<import("zod").ZodNumber>;
37
+ benchmarkScore: import("zod").ZodOptional<import("zod").ZodNumber>;
38
+ versions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
39
+ }, import("zod/v4/core").$loose>>;
40
+ error: import("zod").ZodOptional<import("zod").ZodString>;
41
+ cause: import("zod").ZodOptional<import("zod").ZodUnknown>;
42
+ }, import("zod/v4/core").$strip>;
43
+ };
44
+ };
45
+ export default _default;
46
+ //# sourceMappingURL=context7-search.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context7-search.descriptor.d.ts","sourceRoot":"","sources":["../../src/tools/context7-search.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKH,wBAkBG"}