@vibesdotdev/integrations-context7 0.0.0-stage → 1.0.0-rc.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.
- package/LICENSE +126 -0
- package/README.md +14 -2
- package/dist/client.d.ts +11 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +90 -0
- package/dist/client.js.map +1 -0
- package/dist/config/context7.config.descriptor.d.ts +29 -0
- package/dist/config/context7.config.descriptor.d.ts.map +1 -0
- package/dist/config/context7.config.descriptor.js +24 -0
- package/dist/config/context7.config.descriptor.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations-context7.consumer.plugin.d.ts +8 -0
- package/dist/integrations-context7.consumer.plugin.d.ts.map +1 -0
- package/dist/integrations-context7.consumer.plugin.js +50 -0
- package/dist/integrations-context7.consumer.plugin.js.map +1 -0
- package/dist/integrations-context7.plugin.d.ts +10 -0
- package/dist/integrations-context7.plugin.d.ts.map +1 -0
- package/dist/integrations-context7.plugin.js +28 -0
- package/dist/integrations-context7.plugin.js.map +1 -0
- package/dist/schemas/index.d.ts +102 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +61 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/source/context7.descriptor.d.ts +18 -0
- package/dist/source/context7.descriptor.d.ts.map +1 -0
- package/dist/source/context7.descriptor.js +17 -0
- package/dist/source/context7.descriptor.js.map +1 -0
- package/dist/source/context7.impl.consumer.d.ts +17 -0
- package/dist/source/context7.impl.consumer.d.ts.map +1 -0
- package/dist/source/context7.impl.consumer.js +72 -0
- package/dist/source/context7.impl.consumer.js.map +1 -0
- package/dist/svelte/Context7DocsToolCard.svelte +85 -0
- package/dist/svelte/Context7DocsToolCard.svelte.d.ts +5 -0
- package/dist/svelte/Context7DocsToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/Context7SearchToolCard.svelte +99 -0
- package/dist/svelte/Context7SearchToolCard.svelte.d.ts +8 -0
- package/dist/svelte/Context7SearchToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/index.d.ts +4 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +3 -0
- package/dist/svelte/integrations-context7-svelte.plugin.d.ts +4 -0
- package/dist/svelte/integrations-context7-svelte.plugin.d.ts.map +1 -0
- package/dist/svelte/integrations-context7-svelte.plugin.js +21 -0
- package/dist/tools/context7-docs.descriptor.d.ts +39 -0
- package/dist/tools/context7-docs.descriptor.d.ts.map +1 -0
- package/dist/tools/context7-docs.descriptor.js +27 -0
- package/dist/tools/context7-docs.descriptor.js.map +1 -0
- package/dist/tools/context7-docs.impl.d.ts +13 -0
- package/dist/tools/context7-docs.impl.d.ts.map +1 -0
- package/dist/tools/context7-docs.impl.js +13 -0
- package/dist/tools/context7-docs.impl.js.map +1 -0
- package/dist/tools/context7-search.descriptor.d.ts +46 -0
- package/dist/tools/context7-search.descriptor.d.ts.map +1 -0
- package/dist/tools/context7-search.descriptor.js +27 -0
- package/dist/tools/context7-search.descriptor.js.map +1 -0
- package/dist/tools/context7-search.impl.d.ts +13 -0
- package/dist/tools/context7-search.impl.d.ts.map +1 -0
- package/dist/tools/context7-search.impl.js +13 -0
- package/dist/tools/context7-search.impl.js.map +1 -0
- package/dist/tui/Context7DocsToolWidget.impl.consumer.d.ts +4 -0
- package/dist/tui/Context7DocsToolWidget.impl.consumer.d.ts.map +1 -0
- package/dist/tui/Context7DocsToolWidget.impl.consumer.js +20 -0
- package/dist/tui/Context7DocsToolWidget.impl.consumer.js.map +1 -0
- package/dist/tui/Context7SearchToolWidget.impl.consumer.d.ts +4 -0
- package/dist/tui/Context7SearchToolWidget.impl.consumer.d.ts.map +1 -0
- package/dist/tui/Context7SearchToolWidget.impl.consumer.js +21 -0
- package/dist/tui/Context7SearchToolWidget.impl.consumer.js.map +1 -0
- package/package.json +116 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Parameters
|
|
4
|
+
|
|
5
|
+
Licensor: VIBES DEV LLC
|
|
6
|
+
Licensed Work: @vibesdotdev/integrations-context7
|
|
7
|
+
The Licensed Work is (c) 2026 VIBES DEV LLC.
|
|
8
|
+
Additional Use Grant: In this grant, "Vibes Platform" means the hosted services VIBES DEV LLC
|
|
9
|
+
operates at vibes.dev and its subdomains.
|
|
10
|
+
|
|
11
|
+
You may make production use of the Licensed Work, including commercial
|
|
12
|
+
use, subject to the limits below. Permitted production use includes:
|
|
13
|
+
building, operating and selling your own applications, agents and services
|
|
14
|
+
on or with the Vibes Platform; self-hosting the Licensed Work for use inside
|
|
15
|
+
your own organization; and providing consulting, integration or development
|
|
16
|
+
services to clients who build on the Vibes Platform.
|
|
17
|
+
|
|
18
|
+
The production use permitted above does not include use that:
|
|
19
|
+
|
|
20
|
+
(a) offers third parties a hosted, managed or embedded service that
|
|
21
|
+
substitutes for the Vibes Platform or a material part of it (including
|
|
22
|
+
agent hosting; fleet, sandbox or container provisioning; package
|
|
23
|
+
registry; source hosting and continuous integration; and managed AI,
|
|
24
|
+
storage, secrets or messaging), where the Licensed Work provides a
|
|
25
|
+
material part of that service's value and that service earns more than
|
|
26
|
+
US$1,000,000 in gross revenue in any twelve-month period;
|
|
27
|
+
(b) sells, rents, sublicenses or white-labels the Licensed Work, or access
|
|
28
|
+
to Vibes Platform functionality, as a product in its own right;
|
|
29
|
+
(c) removes, disables or works around entitlement checks, usage metering,
|
|
30
|
+
quotas or plan limits, or reaches Vibes Platform features the user's
|
|
31
|
+
account is not entitled to;
|
|
32
|
+
(d) scrapes, bulk-exports or harvests data or content from the Vibes
|
|
33
|
+
Platform or its users other than through documented interfaces and
|
|
34
|
+
within their terms, or uses outputs or data obtained from the Vibes
|
|
35
|
+
Platform to train or improve a product that competes with it;
|
|
36
|
+
(e) violates applicable law, infringes anyone's rights, commits fraud or
|
|
37
|
+
deception, conducts unlawful surveillance or harassment, distributes
|
|
38
|
+
malware, or accesses systems without authorization; or
|
|
39
|
+
(f) violates applicable antitrust or competition law.
|
|
40
|
+
|
|
41
|
+
A written permission from the Licensor extends this grant.
|
|
42
|
+
Change Date: Four years from the date the Licensed Work is published.
|
|
43
|
+
Change License: MIT
|
|
44
|
+
|
|
45
|
+
For information about alternative licensing arrangements for the Licensed Work,
|
|
46
|
+
contact VIBES DEV LLC through https://vibes.dev.
|
|
47
|
+
|
|
48
|
+
Notice
|
|
49
|
+
|
|
50
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
51
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
52
|
+
under an Open Source License, as stated in this License.
|
|
53
|
+
|
|
54
|
+
-----------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
Business Source License 1.1
|
|
57
|
+
|
|
58
|
+
License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
|
|
59
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
60
|
+
|
|
61
|
+
Terms
|
|
62
|
+
|
|
63
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
64
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
65
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
66
|
+
production use.
|
|
67
|
+
|
|
68
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
69
|
+
available distribution of a specific version of the Licensed Work under this
|
|
70
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
71
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
72
|
+
above terminate.
|
|
73
|
+
|
|
74
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
75
|
+
currently in effect as described in this License, you must purchase a
|
|
76
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
77
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
78
|
+
|
|
79
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
80
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
81
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
82
|
+
for each version of the Licensed Work released by Licensor.
|
|
83
|
+
|
|
84
|
+
You must conspicuously display this License on each original or modified copy
|
|
85
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
86
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
87
|
+
License apply to your use of that work.
|
|
88
|
+
|
|
89
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
90
|
+
terminate your rights under this License for the current and all other
|
|
91
|
+
versions of the Licensed Work.
|
|
92
|
+
|
|
93
|
+
This License does not grant you any right in any trademark or logo of
|
|
94
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
95
|
+
Licensor as expressly required by this License).
|
|
96
|
+
|
|
97
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
98
|
+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
99
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
100
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
101
|
+
TITLE.
|
|
102
|
+
|
|
103
|
+
MariaDB hereby grants you permission to use this License’s text to license
|
|
104
|
+
your works, and to refer to it using the trademark “Business Source License”,
|
|
105
|
+
as long as you comply with the Covenants of Licensor below.
|
|
106
|
+
|
|
107
|
+
Covenants of Licensor
|
|
108
|
+
|
|
109
|
+
In consideration of the right to use this License’s text and the “Business
|
|
110
|
+
Source License” name and trademark, Licensor covenants to MariaDB, and to all
|
|
111
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
112
|
+
|
|
113
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
114
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
115
|
+
where “compatible” means that software provided under the Change License can
|
|
116
|
+
be included in a program with software provided under GPL Version 2.0 or a
|
|
117
|
+
later version. Licensor may specify additional Change Licenses without
|
|
118
|
+
limitation.
|
|
119
|
+
|
|
120
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
121
|
+
impose any additional restriction on the right granted in this License, as
|
|
122
|
+
the Additional Use Grant; or (b) insert the text “None”.
|
|
123
|
+
|
|
124
|
+
3. To specify a Change Date.
|
|
125
|
+
|
|
126
|
+
4. Not to modify this License in any other way.
|
package/README.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Context7 integration
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Context7 library docs for knowledge: `context7-docs`, `context7-search`, the `context7`
|
|
4
|
+
knowledge source and their chat widgets.
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import context7Plugin from '@vibesdotdev/integrations-context7/plugin';
|
|
8
|
+
import context7ConsumerPlugin from '@vibesdotdev/integrations-context7/consumer-plugin';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Compose `./plugin` wherever `@vibesdotdev/knowledge` and `@vibesdotdev/tools` are composed;
|
|
12
|
+
add `./consumer-plugin` on consumer hosts for the source implementation and terminal widgets, and
|
|
13
|
+
`./svelte/plugin` in browser hosts for the cards.
|
|
14
|
+
|
|
15
|
+
Run `bun run check`, `bun run test` and `bun run build` here. See [SPEC.md](./SPEC.md).
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VibesRuntime } from '@vibesdotdev/kernel';
|
|
2
|
+
import { type Context7Config } from './config/context7.config.descriptor.ts';
|
|
3
|
+
import type { Context7DocsInput, Context7DocsOutput, Context7SearchInput, Context7SearchOutput } from './schemas/index.ts';
|
|
4
|
+
export declare function loadContext7Config(runtime: VibesRuntime): Promise<Context7Config>;
|
|
5
|
+
/**
|
|
6
|
+
* Library resolve/search: Context7's own endpoint maps a free-text query to
|
|
7
|
+
* library ids. The knowledge source and the `context7-search` tool both use it.
|
|
8
|
+
*/
|
|
9
|
+
export declare function searchContext7(runtime: VibesRuntime, input: Pick<Context7SearchInput, 'query' | 'apiKey'>): Promise<Context7SearchOutput>;
|
|
10
|
+
export declare function fetchContext7Docs(runtime: VibesRuntime, input: Pick<Context7DocsInput, 'libraryId' | 'topic' | 'page' | 'limit' | 'apiKey'>): Promise<Context7DocsOutput>;
|
|
11
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAwC,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAA+B,KAAK,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAE1G,OAAO,KAAK,EACX,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,MAAM,oBAAoB,CAAC;AAE5B,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAEvF;AAqBD;;;GAGG;AACH,wBAAsB,cAAc,CACnC,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,QAAQ,CAAC,GAClD,OAAO,CAAC,oBAAoB,CAAC,CAgC/B;AAED,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC,GACjF,OAAO,CAAC,kBAAkB,CAAC,CAkC7B"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ConfigManifest } from '@vibesdotdev/config/manifest/config-manifest';
|
|
2
|
+
import { CapabilityError, CaughtFailureSchema } from '@vibesdotdev/kernel';
|
|
3
|
+
import { CONTEXT7_CONFIG_MANIFEST_ID } from "./config/context7.config.descriptor.js";
|
|
4
|
+
import { Context7SearchOutputSchema } from "./schemas/index.js";
|
|
5
|
+
export async function loadContext7Config(runtime) {
|
|
6
|
+
return ConfigManifest.forRuntime(runtime, CONTEXT7_CONFIG_MANIFEST_ID).load();
|
|
7
|
+
}
|
|
8
|
+
async function fetchWithTimeout(runtime, url, init, timeoutMs) {
|
|
9
|
+
return runtime.lifecycle.wait((signal) => fetch(url, { ...init, signal }), {
|
|
10
|
+
timeoutMs,
|
|
11
|
+
reason: `Context7 request to ${new URL(url).pathname}`
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/** A lifecycle deadline or an aborted fetch: both mean the request did not finish in time. */
|
|
15
|
+
function isTimeout(cause) {
|
|
16
|
+
const error = CaughtFailureSchema.parse(cause);
|
|
17
|
+
if (error instanceof CapabilityError)
|
|
18
|
+
return error.reason === 'wait-timeout';
|
|
19
|
+
return error instanceof Error && error.message.includes('abort');
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Library resolve/search: Context7's own endpoint maps a free-text query to
|
|
23
|
+
* library ids. The knowledge source and the `context7-search` tool both use it.
|
|
24
|
+
*/
|
|
25
|
+
export async function searchContext7(runtime, input) {
|
|
26
|
+
const config = await loadContext7Config(runtime);
|
|
27
|
+
const url = new URL('/api/v1/search', config.origin);
|
|
28
|
+
url.searchParams.set('query', input.query);
|
|
29
|
+
const headers = new Headers({
|
|
30
|
+
'User-Agent': config.userAgent,
|
|
31
|
+
Accept: 'application/json'
|
|
32
|
+
});
|
|
33
|
+
if (input.apiKey)
|
|
34
|
+
headers.set('Authorization', `Bearer ${input.apiKey}`);
|
|
35
|
+
try {
|
|
36
|
+
const response = await fetchWithTimeout(runtime, url.toString(), { method: 'GET', headers }, config.timeoutMs);
|
|
37
|
+
if (!response.ok) {
|
|
38
|
+
const errorText = await response.text();
|
|
39
|
+
return {
|
|
40
|
+
cause: new CapabilityError(`Context7 API error: ${response.status}`, 'UNAVAILABLE', { reason: 'context7-api-error', details: { status: response.status } }),
|
|
41
|
+
results: [],
|
|
42
|
+
error: `Context7 API error: ${response.status} - ${errorText}`
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return Context7SearchOutputSchema.parse(await response.json());
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
49
|
+
if (isTimeout(error))
|
|
50
|
+
return { cause: error, results: [], error: 'Request timed out' };
|
|
51
|
+
return { cause: error, results: [], error: message };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export async function fetchContext7Docs(runtime, input) {
|
|
55
|
+
const config = await loadContext7Config(runtime);
|
|
56
|
+
const page = input.page ?? 1;
|
|
57
|
+
const cleanId = input.libraryId.startsWith('/') ? input.libraryId.slice(1) : input.libraryId;
|
|
58
|
+
const url = new URL(`/api/v2/docs/code/${cleanId}`, config.origin);
|
|
59
|
+
url.searchParams.set('type', 'txt');
|
|
60
|
+
url.searchParams.set('page', String(page));
|
|
61
|
+
if (input.limit)
|
|
62
|
+
url.searchParams.set('limit', String(input.limit));
|
|
63
|
+
if (input.topic)
|
|
64
|
+
url.searchParams.set('topic', input.topic);
|
|
65
|
+
const headers = new Headers({
|
|
66
|
+
'User-Agent': config.userAgent,
|
|
67
|
+
Accept: 'text/plain'
|
|
68
|
+
});
|
|
69
|
+
if (input.apiKey)
|
|
70
|
+
headers.set('Authorization', `Bearer ${input.apiKey}`);
|
|
71
|
+
const failed = (error) => ({
|
|
72
|
+
content: '',
|
|
73
|
+
libraryId: input.libraryId,
|
|
74
|
+
topic: input.topic,
|
|
75
|
+
page,
|
|
76
|
+
error
|
|
77
|
+
});
|
|
78
|
+
try {
|
|
79
|
+
const response = await fetchWithTimeout(runtime, url.toString(), { method: 'GET', headers }, config.timeoutMs);
|
|
80
|
+
if (!response.ok) {
|
|
81
|
+
return failed(`Context7 API error: ${response.status} - ${await response.text()}`);
|
|
82
|
+
}
|
|
83
|
+
return { content: await response.text(), libraryId: input.libraryId, topic: input.topic, page };
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
87
|
+
return { ...failed(isTimeout(error) ? 'Request timed out' : message), cause: error };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAqB,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAuB,MAAM,wCAAwC,CAAC;AAC1G,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAQhE,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,OAAqB;IAC7D,OAAO,cAAc,CAAC,UAAU,CAAiB,OAAO,EAAE,2BAA2B,CAAC,CAAC,IAAI,EAAE,CAAC;AAC/F,CAAC;AAED,KAAK,UAAU,gBAAgB,CAC9B,OAAqB,EACrB,GAAW,EACX,IAAiB,EACjB,SAAiB;IAEjB,OAAO,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE;QAC1E,SAAS;QACT,MAAM,EAAE,uBAAuB,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;KACtD,CAAC,CAAC;AACJ,CAAC;AAED,8FAA8F;AAC9F,SAAS,SAAS,CAAC,KAAc;IAChC,MAAM,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/C,IAAI,KAAK,YAAY,eAAe;QAAE,OAAO,KAAK,CAAC,MAAM,KAAK,cAAc,CAAC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,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IACtF,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const Context7ConfigSchema: z.ZodObject<{
|
|
3
|
+
origin: z.ZodDefault<z.ZodURL>;
|
|
4
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
5
|
+
userAgent: z.ZodDefault<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type Context7Config = z.infer<typeof Context7ConfigSchema>;
|
|
8
|
+
export declare const CONTEXT7_CONFIG_MANIFEST_ID = "knowledge.context7";
|
|
9
|
+
declare const descriptor: {
|
|
10
|
+
kind: "config/manifest";
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
namespace: string;
|
|
14
|
+
schema: z.ZodObject<{
|
|
15
|
+
origin: z.ZodDefault<z.ZodURL>;
|
|
16
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
17
|
+
userAgent: z.ZodDefault<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
scope: "global";
|
|
20
|
+
tier: "user";
|
|
21
|
+
storedLayer: "none";
|
|
22
|
+
allowedAdapters: string[];
|
|
23
|
+
fields: {};
|
|
24
|
+
customTables: false;
|
|
25
|
+
version: number;
|
|
26
|
+
internal: false;
|
|
27
|
+
};
|
|
28
|
+
export default descriptor;
|
|
29
|
+
//# sourceMappingURL=context7.config.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context7.config.descriptor.d.ts","sourceRoot":"","sources":["../../src/config/context7.config.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,2BAA2B,uBAAuB,CAAC;AAEhE,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;CAcoB,CAAC;AAErC,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export const Context7ConfigSchema = z.object({
|
|
3
|
+
origin: z.url().default('https://context7.com'),
|
|
4
|
+
timeoutMs: z.number().int().positive().default(30000),
|
|
5
|
+
userAgent: z.string().min(1).default('Vibes/1.0')
|
|
6
|
+
});
|
|
7
|
+
export const CONTEXT7_CONFIG_MANIFEST_ID = 'knowledge.context7';
|
|
8
|
+
const descriptor = {
|
|
9
|
+
kind: 'config/manifest',
|
|
10
|
+
id: CONTEXT7_CONFIG_MANIFEST_ID,
|
|
11
|
+
name: 'Context7',
|
|
12
|
+
namespace: 'knowledge.context7',
|
|
13
|
+
schema: Context7ConfigSchema,
|
|
14
|
+
scope: 'global',
|
|
15
|
+
tier: 'user',
|
|
16
|
+
storedLayer: 'none',
|
|
17
|
+
allowedAdapters: ['storage.json', 'storage.localdb'],
|
|
18
|
+
fields: {},
|
|
19
|
+
customTables: false,
|
|
20
|
+
version: 1,
|
|
21
|
+
internal: false
|
|
22
|
+
};
|
|
23
|
+
export default descriptor;
|
|
24
|
+
//# sourceMappingURL=context7.config.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context7.config.descriptor.js","sourceRoot":"","sources":["../../src/config/context7.config.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,sBAAsB,CAAC;IAC/C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACrD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;CACjD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,2BAA2B,GAAG,oBAAoB,CAAC;AAEhE,MAAM,UAAU,GAAG;IAClB,IAAI,EAAE,iBAAiB;IACvB,EAAE,EAAE,2BAA2B;IAC/B,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,oBAAoB;IAC/B,MAAM,EAAE,oBAAoB;IAC5B,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,CAAC,cAAc,EAAE,iBAAiB,CAAC;IACpD,MAAM,EAAE,EAAE;IACV,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,KAAK;CACoB,CAAC;AAErC,eAAe,UAAU,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibesdotdev/integrations-context7 — Context7 library documentation for knowledge.
|
|
3
|
+
* Surfaces live behind `./consumer-plugin` and `./svelte`.
|
|
4
|
+
*/
|
|
5
|
+
export * from './schemas/index.ts';
|
|
6
|
+
export { default as context7ConfigDescriptor, Context7ConfigSchema, CONTEXT7_CONFIG_MANIFEST_ID, type Context7Config } from './config/context7.config.descriptor.ts';
|
|
7
|
+
export { default as context7DocsDescriptor } from './tools/context7-docs.descriptor.ts';
|
|
8
|
+
export { default as context7SearchDescriptor } from './tools/context7-search.descriptor.ts';
|
|
9
|
+
export { default as context7SourceDescriptor } from './source/context7.descriptor.ts';
|
|
10
|
+
export { integrationsContext7Plugin, integrationsContext7Plugin as default } from './integrations-context7.plugin.ts';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,KAAK,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACrK,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,IAAI,OAAO,EAAE,MAAM,mCAAmC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibesdotdev/integrations-context7 — Context7 library documentation for knowledge.
|
|
3
|
+
* Surfaces live behind `./consumer-plugin` and `./svelte`.
|
|
4
|
+
*/
|
|
5
|
+
export * from "./schemas/index.js";
|
|
6
|
+
export { default as context7ConfigDescriptor, Context7ConfigSchema, CONTEXT7_CONFIG_MANIFEST_ID } from "./config/context7.config.descriptor.js";
|
|
7
|
+
export { default as context7DocsDescriptor } from "./tools/context7-docs.descriptor.js";
|
|
8
|
+
export { default as context7SearchDescriptor } from "./tools/context7-search.descriptor.js";
|
|
9
|
+
export { default as context7SourceDescriptor } from "./source/context7.descriptor.js";
|
|
10
|
+
export { integrationsContext7Plugin, integrationsContext7Plugin as default } from "./integrations-context7.plugin.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,oBAAoB,EAAE,2BAA2B,EAAuB,MAAM,wCAAwC,CAAC;AACrK,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,IAAI,OAAO,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consumer-scoped Context7: tool loaders, the `context7` knowledge source
|
|
3
|
+
* implementation and the terminal tool widgets. Compose after
|
|
4
|
+
* `@vibesdotdev/integrations-context7/plugin`, which owns the descriptors.
|
|
5
|
+
*/
|
|
6
|
+
export declare const integrationsContext7ConsumerPlugin: import("@vibesdotdev/kernel").RuntimePlugin;
|
|
7
|
+
export default integrationsContext7ConsumerPlugin;
|
|
8
|
+
//# sourceMappingURL=integrations-context7.consumer.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations-context7.consumer.plugin.d.ts","sourceRoot":"","sources":["../src/integrations-context7.consumer.plugin.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,6CAsB7C,CAAC;AAEH,eAAe,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createRuntimePlugin, loader } from '@vibesdotdev/kernel';
|
|
2
|
+
import { registerTuiToolWidget } from '@vibesdotdev/tools/tui/tool-widgets';
|
|
3
|
+
const TOOL_CONSUMER = { kind: 'tools/tool', scope: 'consumer' };
|
|
4
|
+
const SOURCE_CONSUMER = { kind: 'knowledge/source', scope: { hardware: ['consumer'] } };
|
|
5
|
+
const TUI_WIDGETS = [
|
|
6
|
+
{
|
|
7
|
+
toolId: 'context7-search',
|
|
8
|
+
name: 'Context7 Search TUI Widget',
|
|
9
|
+
description: 'Renders Context7 library search results in terminal chat transcripts.',
|
|
10
|
+
tags: ['knowledge', 'context7', 'search', 'tui'],
|
|
11
|
+
load: () => import("./tui/Context7SearchToolWidget.impl.consumer.js")
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
toolId: 'context7-docs',
|
|
15
|
+
name: 'Context7 Docs TUI Widget',
|
|
16
|
+
description: 'Renders Context7 documentation in terminal chat transcripts.',
|
|
17
|
+
tags: ['knowledge', 'context7', 'docs', 'tui'],
|
|
18
|
+
load: () => import("./tui/Context7DocsToolWidget.impl.consumer.js")
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
* Consumer-scoped Context7: tool loaders, the `context7` knowledge source
|
|
23
|
+
* implementation and the terminal tool widgets. Compose after
|
|
24
|
+
* `@vibesdotdev/integrations-context7/plugin`, which owns the descriptors.
|
|
25
|
+
*/
|
|
26
|
+
export const integrationsContext7ConsumerPlugin = createRuntimePlugin({
|
|
27
|
+
id: 'integrations-context7.consumer',
|
|
28
|
+
name: 'Integrations Context7 Consumer',
|
|
29
|
+
description: 'Consumer loaders and TUI widgets for Context7',
|
|
30
|
+
dependencies: ['integrations-context7'],
|
|
31
|
+
loaders: [
|
|
32
|
+
loader('context7-docs', TOOL_CONSUMER, () => import("./tools/context7-docs.impl.js")),
|
|
33
|
+
loader('context7-search', TOOL_CONSUMER, () => import("./tools/context7-search.impl.js")),
|
|
34
|
+
loader('context7', SOURCE_CONSUMER, () => import("./source/context7.impl.consumer.js"))
|
|
35
|
+
],
|
|
36
|
+
onActivate(runtime) {
|
|
37
|
+
for (const widget of TUI_WIDGETS) {
|
|
38
|
+
registerTuiToolWidget(runtime, {
|
|
39
|
+
toolId: widget.toolId,
|
|
40
|
+
id: `${widget.toolId}.tui-widget`,
|
|
41
|
+
name: widget.name,
|
|
42
|
+
description: widget.description,
|
|
43
|
+
tags: [...widget.tags],
|
|
44
|
+
load: widget.load
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export default integrationsContext7ConsumerPlugin;
|
|
50
|
+
//# sourceMappingURL=integrations-context7.consumer.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations-context7.consumer.plugin.js","sourceRoot":"","sources":["../src/integrations-context7.consumer.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,aAAa,GAAkB,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAC/E,MAAM,eAAe,GAAkB,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;AAEvG,MAAM,WAAW,GAAG;IACnB;QACC,MAAM,EAAE,iBAAiB;QACzB,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,uEAAuE;QACpF,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,CAAC;QAChD,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,iDAAkD,CAAC;KACtE;IACD;QACC,MAAM,EAAE,eAAe;QACvB,IAAI,EAAE,0BAA0B;QAChC,WAAW,EAAE,8DAA8D;QAC3E,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC;QAC9C,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,+CAAgD,CAAC;KACpE;CACQ,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,mBAAmB,CAAC;IACrE,EAAE,EAAE,gCAAgC;IACpC,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE,+CAA+C;IAC5D,YAAY,EAAE,CAAC,uBAAuB,CAAC;IACvC,OAAO,EAAE;QACR,MAAM,CAAC,eAAe,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;QACrF,MAAM,CAAC,iBAAiB,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,iCAAiC,CAAC,CAAC;QACzF,MAAM,CAAC,UAAU,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,oCAAoC,CAAC,CAAC;KACvF;IACD,UAAU,CAAC,OAAO;QACjB,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;YAClC,qBAAqB,CAAC,OAAO,EAAE;gBAC9B,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,aAAa;gBACjC,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;gBACtB,IAAI,EAAE,MAAM,CAAC,IAAI;aACjB,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;CACD,CAAC,CAAC;AAEH,eAAe,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context7 library documentation for knowledge: the `knowledge.context7`
|
|
3
|
+
* config, the `context7-docs` and `context7-search` tools and the `context7`
|
|
4
|
+
* `knowledge/source`. The tool implementations are fetch-only, so this slice
|
|
5
|
+
* is safe in universal and cloud bundles; the consumer-scoped loaders live in
|
|
6
|
+
* `./consumer-plugin`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const integrationsContext7Plugin: import("@vibesdotdev/kernel").RuntimePlugin;
|
|
9
|
+
export default integrationsContext7Plugin;
|
|
10
|
+
//# sourceMappingURL=integrations-context7.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations-context7.plugin.d.ts","sourceRoot":"","sources":["../src/integrations-context7.plugin.ts"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,6CAWrC,CAAC;AAEH,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createRuntimePlugin, loader } from '@vibesdotdev/kernel/factory';
|
|
2
|
+
import { knowledgeSourceKind } from '@vibesdotdev/knowledge/kinds/source';
|
|
3
|
+
import context7ConfigDescriptor from "./config/context7.config.descriptor.js";
|
|
4
|
+
import context7DocsDescriptor from "./tools/context7-docs.descriptor.js";
|
|
5
|
+
import context7SearchDescriptor from "./tools/context7-search.descriptor.js";
|
|
6
|
+
import context7SourceDescriptor from "./source/context7.descriptor.js";
|
|
7
|
+
const TOOL_CLOUD = { kind: 'tools/tool', scope: 'cloud' };
|
|
8
|
+
/**
|
|
9
|
+
* Context7 library documentation for knowledge: the `knowledge.context7`
|
|
10
|
+
* config, the `context7-docs` and `context7-search` tools and the `context7`
|
|
11
|
+
* `knowledge/source`. The tool implementations are fetch-only, so this slice
|
|
12
|
+
* is safe in universal and cloud bundles; the consumer-scoped loaders live in
|
|
13
|
+
* `./consumer-plugin`.
|
|
14
|
+
*/
|
|
15
|
+
export const integrationsContext7Plugin = createRuntimePlugin({
|
|
16
|
+
id: 'integrations-context7',
|
|
17
|
+
name: 'Integrations Context7',
|
|
18
|
+
description: 'Context7 library documentation tools and knowledge source',
|
|
19
|
+
dependencies: ['config', 'tools'],
|
|
20
|
+
kinds: [knowledgeSourceKind],
|
|
21
|
+
descriptors: [context7ConfigDescriptor, context7DocsDescriptor, context7SearchDescriptor, context7SourceDescriptor],
|
|
22
|
+
loaders: [
|
|
23
|
+
loader(context7DocsDescriptor.id, TOOL_CLOUD, () => import("./tools/context7-docs.impl.js")),
|
|
24
|
+
loader(context7SearchDescriptor.id, TOOL_CLOUD, () => import("./tools/context7-search.impl.js"))
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
export default integrationsContext7Plugin;
|
|
28
|
+
//# sourceMappingURL=integrations-context7.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations-context7.plugin.js","sourceRoot":"","sources":["../src/integrations-context7.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,wBAAwB,MAAM,wCAAwC,CAAC;AAC9E,OAAO,sBAAsB,MAAM,qCAAqC,CAAC;AACzE,OAAO,wBAAwB,MAAM,uCAAuC,CAAC;AAC7E,OAAO,wBAAwB,MAAM,iCAAiC,CAAC;AAEvE,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAW,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;IAC7D,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,2DAA2D;IACxE,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;IACjC,KAAK,EAAE,CAAC,mBAAmB,CAAC;IAC5B,WAAW,EAAE,CAAC,wBAAwB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,wBAAwB,CAAC;IACnH,OAAO,EAAE;QACR,MAAM,CAAC,sBAAsB,CAAC,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;QAC5F,MAAM,CAAC,wBAAwB,CAAC,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,iCAAiC,CAAC,CAAC;KAChG;CACD,CAAC,CAAC;AAEH,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
export declare const Context7SearchInputSchema: z.ZodObject<{
|
|
9
|
+
query: z.ZodString;
|
|
10
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const Context7SearchResultSchema: z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
title: z.ZodString;
|
|
15
|
+
description: z.ZodOptional<z.ZodString>;
|
|
16
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
17
|
+
lastUpdateDate: z.ZodOptional<z.ZodString>;
|
|
18
|
+
state: z.ZodOptional<z.ZodString>;
|
|
19
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
totalSnippets: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
totalPages: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
trustScore: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
benchmarkScore: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
versions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
|
+
}, z.core.$loose>;
|
|
26
|
+
export declare const Context7SearchOutputSchema: z.ZodObject<{
|
|
27
|
+
results: z.ZodArray<z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
title: z.ZodString;
|
|
30
|
+
description: z.ZodOptional<z.ZodString>;
|
|
31
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
32
|
+
lastUpdateDate: z.ZodOptional<z.ZodString>;
|
|
33
|
+
state: z.ZodOptional<z.ZodString>;
|
|
34
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
totalSnippets: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
totalPages: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
trustScore: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
benchmarkScore: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
versions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
}, z.core.$loose>>;
|
|
41
|
+
error: z.ZodOptional<z.ZodString>;
|
|
42
|
+
cause: z.ZodOptional<z.ZodUnknown>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export declare const Context7DocsInputSchema: z.ZodObject<{
|
|
45
|
+
libraryId: z.ZodString;
|
|
46
|
+
topic: z.ZodOptional<z.ZodString>;
|
|
47
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
48
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export declare const Context7DocsOutputSchema: z.ZodObject<{
|
|
52
|
+
content: z.ZodString;
|
|
53
|
+
libraryId: z.ZodString;
|
|
54
|
+
topic: z.ZodOptional<z.ZodString>;
|
|
55
|
+
page: z.ZodNumber;
|
|
56
|
+
error: z.ZodOptional<z.ZodString>;
|
|
57
|
+
cause: z.ZodOptional<z.ZodUnknown>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export type Context7SearchInput = z.infer<typeof Context7SearchInputSchema>;
|
|
60
|
+
export type Context7SearchOutput = z.infer<typeof Context7SearchOutputSchema>;
|
|
61
|
+
export type Context7DocsInput = z.infer<typeof Context7DocsInputSchema>;
|
|
62
|
+
export type Context7DocsOutput = z.infer<typeof Context7DocsOutputSchema>;
|
|
63
|
+
export declare const ContextSearchPresentationInput: z.ZodObject<{
|
|
64
|
+
query: z.ZodOptional<z.ZodString>;
|
|
65
|
+
apiKey: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
export declare const ContextSearchPresentationOutput: z.ZodObject<{
|
|
68
|
+
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
69
|
+
id: z.ZodString;
|
|
70
|
+
title: z.ZodString;
|
|
71
|
+
description: z.ZodOptional<z.ZodString>;
|
|
72
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
73
|
+
lastUpdateDate: z.ZodOptional<z.ZodString>;
|
|
74
|
+
state: z.ZodOptional<z.ZodString>;
|
|
75
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
totalSnippets: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
totalPages: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
trustScore: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
benchmarkScore: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
versions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
81
|
+
}, z.core.$loose>>>;
|
|
82
|
+
error: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
83
|
+
cause: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export declare const ContextDocsPresentationInput: z.ZodObject<{
|
|
86
|
+
libraryId: z.ZodOptional<z.ZodString>;
|
|
87
|
+
topic: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
88
|
+
page: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
89
|
+
limit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
90
|
+
apiKey: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export declare const ContextDocsPresentationOutput: z.ZodObject<{
|
|
93
|
+
content: z.ZodOptional<z.ZodString>;
|
|
94
|
+
libraryId: z.ZodOptional<z.ZodString>;
|
|
95
|
+
topic: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
96
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
error: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
98
|
+
cause: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
/** Parse a possibly partial tool payload; `null` when it does not match the schema. */
|
|
101
|
+
export declare function readPresentation<T>(schema: z.ZodType<T>, value: unknown): T | null;
|
|
102
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAK5B,eAAO,MAAM,yBAAyB;;;iBAGpC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;iBAexB,CAAC;AAEhB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;iBAIrC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;iBAMlC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;iBAOnC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAI1E,eAAO,MAAM,8BAA8B;;;iBAAsC,CAAC;AAClF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;iBAAuC,CAAC;AACpF,eAAO,MAAM,4BAA4B;;;;;;iBAAoC,CAAC;AAC9E,eAAO,MAAM,6BAA6B;;;;;;;iBAAqC,CAAC;AAEhF,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,GAAG,IAAI,CAGlF"}
|