hoolix 0.0.1-beta.19
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 +21 -0
- package/README.md +337 -0
- package/STABILITY.md +109 -0
- package/bin/hoolix.js +50 -0
- package/bin/mcp-portal.js +12 -0
- package/bin/postinstall.js +61 -0
- package/dist/app/contracts.d.ts +105 -0
- package/dist/app/contracts.d.ts.map +1 -0
- package/dist/app/contracts.js +2 -0
- package/dist/app/contracts.js.map +1 -0
- package/dist/app/events.d.ts +13 -0
- package/dist/app/events.d.ts.map +1 -0
- package/dist/app/events.js +13 -0
- package/dist/app/events.js.map +1 -0
- package/dist/app/services/analytics.d.ts +42 -0
- package/dist/app/services/analytics.d.ts.map +1 -0
- package/dist/app/services/analytics.js +106 -0
- package/dist/app/services/analytics.js.map +1 -0
- package/dist/app/services/catalog.d.ts +14 -0
- package/dist/app/services/catalog.d.ts.map +1 -0
- package/dist/app/services/catalog.js +26 -0
- package/dist/app/services/catalog.js.map +1 -0
- package/dist/app/services/credentials.d.ts +42 -0
- package/dist/app/services/credentials.d.ts.map +1 -0
- package/dist/app/services/credentials.js +143 -0
- package/dist/app/services/credentials.js.map +1 -0
- package/dist/app/services/servers.d.ts +15 -0
- package/dist/app/services/servers.d.ts.map +1 -0
- package/dist/app/services/servers.js +445 -0
- package/dist/app/services/servers.js.map +1 -0
- package/dist/catalog/community.d.ts +19 -0
- package/dist/catalog/community.d.ts.map +1 -0
- package/dist/catalog/community.js +53 -0
- package/dist/catalog/community.js.map +1 -0
- package/dist/catalog/templates.d.ts +436 -0
- package/dist/catalog/templates.d.ts.map +1 -0
- package/dist/catalog/templates.js +489 -0
- package/dist/catalog/templates.js.map +1 -0
- package/dist/commands/audit.d.ts +2 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +122 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/bundle.d.ts +11 -0
- package/dist/commands/bundle.d.ts.map +1 -0
- package/dist/commands/bundle.js +299 -0
- package/dist/commands/bundle.js.map +1 -0
- package/dist/commands/clients.d.ts +6 -0
- package/dist/commands/clients.d.ts.map +1 -0
- package/dist/commands/clients.js +242 -0
- package/dist/commands/clients.js.map +1 -0
- package/dist/commands/completion.d.ts +18 -0
- package/dist/commands/completion.d.ts.map +1 -0
- package/dist/commands/completion.js +495 -0
- package/dist/commands/completion.js.map +1 -0
- package/dist/commands/connect.d.ts +10 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/connect.js +463 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/create.d.ts +2 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +607 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/delete.d.ts +2 -0
- package/dist/commands/delete.d.ts.map +1 -0
- package/dist/commands/delete.js +44 -0
- package/dist/commands/delete.js.map +1 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +259 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/export.d.ts +2 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +93 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/gui.d.ts +2 -0
- package/dist/commands/gui.d.ts.map +1 -0
- package/dist/commands/gui.js +19 -0
- package/dist/commands/gui.js.map +1 -0
- package/dist/commands/import.d.ts +2 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +102 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/info.d.ts +2 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +151 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +90 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/reindex.d.ts +2 -0
- package/dist/commands/reindex.d.ts.map +1 -0
- package/dist/commands/reindex.js +186 -0
- package/dist/commands/reindex.js.map +1 -0
- package/dist/commands/rotate.d.ts +2 -0
- package/dist/commands/rotate.d.ts.map +1 -0
- package/dist/commands/rotate.js +67 -0
- package/dist/commands/rotate.js.map +1 -0
- package/dist/commands/secrets.d.ts +10 -0
- package/dist/commands/secrets.d.ts.map +1 -0
- package/dist/commands/secrets.js +293 -0
- package/dist/commands/secrets.js.map +1 -0
- package/dist/commands/start.d.ts +2 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +234 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/stats.d.ts +2 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +220 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/stop.d.ts +2 -0
- package/dist/commands/stop.d.ts.map +1 -0
- package/dist/commands/stop.js +24 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/commands/templates.d.ts +2 -0
- package/dist/commands/templates.d.ts.map +1 -0
- package/dist/commands/templates.js +168 -0
- package/dist/commands/templates.js.map +1 -0
- package/dist/commands/trial.d.ts +2 -0
- package/dist/commands/trial.d.ts.map +1 -0
- package/dist/commands/trial.js +61 -0
- package/dist/commands/trial.js.map +1 -0
- package/dist/commands/uninstall.d.ts +2 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +114 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +104 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/verify.d.ts +2 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +301 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/core/config.d.ts +25 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +54 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.d.ts +25 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +53 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/logger.d.ts +3 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +12 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/paths.d.ts +15 -0
- package/dist/core/paths.d.ts.map +1 -0
- package/dist/core/paths.js +51 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/registry.d.ts +474 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +186 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/updater.d.ts +16 -0
- package/dist/core/updater.d.ts.map +1 -0
- package/dist/core/updater.js +317 -0
- package/dist/core/updater.js.map +1 -0
- package/dist/core/version.d.ts +2 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +3 -0
- package/dist/core/version.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +270 -0
- package/dist/index.js.map +1 -0
- package/dist/ingestion/chunker.d.ts +13 -0
- package/dist/ingestion/chunker.d.ts.map +1 -0
- package/dist/ingestion/chunker.js +107 -0
- package/dist/ingestion/chunker.js.map +1 -0
- package/dist/ingestion/cleaners.d.ts +10 -0
- package/dist/ingestion/cleaners.d.ts.map +1 -0
- package/dist/ingestion/cleaners.js +61 -0
- package/dist/ingestion/cleaners.js.map +1 -0
- package/dist/ingestion/detectors.d.ts +5 -0
- package/dist/ingestion/detectors.d.ts.map +1 -0
- package/dist/ingestion/detectors.js +25 -0
- package/dist/ingestion/detectors.js.map +1 -0
- package/dist/ingestion/fetchers.d.ts +38 -0
- package/dist/ingestion/fetchers.d.ts.map +1 -0
- package/dist/ingestion/fetchers.js +296 -0
- package/dist/ingestion/fetchers.js.map +1 -0
- package/dist/ingestion/github.d.ts +60 -0
- package/dist/ingestion/github.d.ts.map +1 -0
- package/dist/ingestion/github.js +314 -0
- package/dist/ingestion/github.js.map +1 -0
- package/dist/ingestion/pipeline.d.ts +3 -0
- package/dist/ingestion/pipeline.d.ts.map +1 -0
- package/dist/ingestion/pipeline.js +160 -0
- package/dist/ingestion/pipeline.js.map +1 -0
- package/dist/ingestion/types.d.ts +51 -0
- package/dist/ingestion/types.d.ts.map +1 -0
- package/dist/ingestion/types.js +2 -0
- package/dist/ingestion/types.js.map +1 -0
- package/dist/lib/auth.d.ts +2 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +6 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/embedding.d.ts +10 -0
- package/dist/lib/embedding.d.ts.map +1 -0
- package/dist/lib/embedding.js +21 -0
- package/dist/lib/embedding.js.map +1 -0
- package/dist/mcp/host.d.ts +16 -0
- package/dist/mcp/host.d.ts.map +1 -0
- package/dist/mcp/host.js +307 -0
- package/dist/mcp/host.js.map +1 -0
- package/dist/mcp/proxy-host.d.ts +25 -0
- package/dist/mcp/proxy-host.d.ts.map +1 -0
- package/dist/mcp/proxy-host.js +393 -0
- package/dist/mcp/proxy-host.js.map +1 -0
- package/dist/mcp/stdio-host.d.ts +19 -0
- package/dist/mcp/stdio-host.d.ts.map +1 -0
- package/dist/mcp/stdio-host.js +175 -0
- package/dist/mcp/stdio-host.js.map +1 -0
- package/dist/process/manager.d.ts +74 -0
- package/dist/process/manager.d.ts.map +1 -0
- package/dist/process/manager.js +322 -0
- package/dist/process/manager.js.map +1 -0
- package/dist/rag/models.d.ts +30 -0
- package/dist/rag/models.d.ts.map +1 -0
- package/dist/rag/models.js +30 -0
- package/dist/rag/models.js.map +1 -0
- package/dist/rag/store.d.ts +63 -0
- package/dist/rag/store.d.ts.map +1 -0
- package/dist/rag/store.js +505 -0
- package/dist/rag/store.js.map +1 -0
- package/dist/rag/types.d.ts +56 -0
- package/dist/rag/types.d.ts.map +1 -0
- package/dist/rag/types.js +2 -0
- package/dist/rag/types.js.map +1 -0
- package/dist/sources/plugins.d.ts +25 -0
- package/dist/sources/plugins.d.ts.map +1 -0
- package/dist/sources/plugins.js +55 -0
- package/dist/sources/plugins.js.map +1 -0
- package/dist/sources/registry.d.ts +19 -0
- package/dist/sources/registry.d.ts.map +1 -0
- package/dist/sources/registry.js +183 -0
- package/dist/sources/registry.js.map +1 -0
- package/dist/sources/types.d.ts +361 -0
- package/dist/sources/types.d.ts.map +1 -0
- package/dist/sources/types.js +59 -0
- package/dist/sources/types.js.map +1 -0
- package/dist/tui/index.d.ts +22 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +711 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/ui/format.d.ts +27 -0
- package/dist/ui/format.d.ts.map +1 -0
- package/dist/ui/format.js +80 -0
- package/dist/ui/format.js.map +1 -0
- package/dist/ui/help.d.ts +2 -0
- package/dist/ui/help.d.ts.map +1 -0
- package/dist/ui/help.js +106 -0
- package/dist/ui/help.js.map +1 -0
- package/dist/web/assets.d.ts +2 -0
- package/dist/web/assets.d.ts.map +1 -0
- package/dist/web/assets.js +659 -0
- package/dist/web/assets.js.map +1 -0
- package/dist/web/server.d.ts +9 -0
- package/dist/web/server.d.ts.map +1 -0
- package/dist/web/server.js +349 -0
- package/dist/web/server.js.map +1 -0
- package/package.json +105 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { getPaths } from '../core/paths.js';
|
|
5
|
+
export const SourcePluginSchema = z.object({
|
|
6
|
+
id: z.string().regex(/^[a-z0-9-]{1,64}$/),
|
|
7
|
+
name: z.string().min(1),
|
|
8
|
+
description: z.string().min(1).optional(),
|
|
9
|
+
kind: z.enum(['docs', 'web', 'llms', 'github']).default('docs'),
|
|
10
|
+
urlTemplate: z.string().min(1),
|
|
11
|
+
});
|
|
12
|
+
export async function listSourcePlugins() {
|
|
13
|
+
const dirs = pluginDirs();
|
|
14
|
+
const plugins = [];
|
|
15
|
+
for (const dir of dirs) {
|
|
16
|
+
if (!(await fs.pathExists(dir)))
|
|
17
|
+
continue;
|
|
18
|
+
const files = await fs.readdir(dir).catch(() => []);
|
|
19
|
+
for (const file of files) {
|
|
20
|
+
if (!file.endsWith('.json'))
|
|
21
|
+
continue;
|
|
22
|
+
try {
|
|
23
|
+
const raw = await fs.readJson(path.join(dir, file));
|
|
24
|
+
plugins.push(SourcePluginSchema.parse(raw));
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// Skip invalid plugin manifests; doctor can be extended later to validate them loudly.
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return plugins.sort((a, b) => a.id.localeCompare(b.id));
|
|
32
|
+
}
|
|
33
|
+
export async function resolveCustomSource(provider, value) {
|
|
34
|
+
const plugin = (await listSourcePlugins()).find((candidate) => candidate.id === provider);
|
|
35
|
+
if (!plugin) {
|
|
36
|
+
throw new Error(`Custom source provider "${provider}" not found. Next: add a JSON manifest to ${path.join(getPaths().data, 'source-plugins')} or set HOOLIX_SOURCE_PLUGIN_DIR.`);
|
|
37
|
+
}
|
|
38
|
+
const resolved = plugin.urlTemplate.replace(/\{value\}/g, encodeURIComponent(value)).replace(/\{raw\}/g, value);
|
|
39
|
+
if (plugin.kind === 'github') {
|
|
40
|
+
return { type: 'github', repo: value, label: plugin.name };
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
type: plugin.kind,
|
|
44
|
+
url: resolved,
|
|
45
|
+
label: plugin.name,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function pluginDirs() {
|
|
49
|
+
const dirs = [path.join(getPaths().data, 'source-plugins')];
|
|
50
|
+
const extra = process.env.HOOLIX_SOURCE_PLUGIN_DIR;
|
|
51
|
+
if (extra)
|
|
52
|
+
dirs.push(...extra.split(path.delimiter).filter(Boolean));
|
|
53
|
+
return dirs;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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;QACL,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,MAAM,CAAC,IAAI;KACC,CAAC;AACxB,CAAC;AAED,SAAS,UAAU;IACjB,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC5D,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;IACnD,IAAI,KAAK;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SourceType } from '../ingestion/types.js';
|
|
2
|
+
import { type ServerDefinition, type SourceDefinition, type SourceSummary } from './types.js';
|
|
3
|
+
export declare function createLegacyServerDefinition(sourceUrl: string, sourceType: SourceType): ServerDefinition;
|
|
4
|
+
export declare function sourceFromLegacy(sourceUrl: string, sourceType: SourceType): SourceDefinition;
|
|
5
|
+
export declare function parseCliSource(value: string): SourceDefinition;
|
|
6
|
+
export declare function parseCliSources(args: string[]): SourceDefinition[];
|
|
7
|
+
export declare function parseCliHeaders(args: string[]): Record<string, string>;
|
|
8
|
+
export declare function parseCliCookie(args: string[]): string | undefined;
|
|
9
|
+
export declare function applySourceAuth(sources: SourceDefinition[], auth: {
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
cookie?: string;
|
|
12
|
+
}): SourceDefinition[];
|
|
13
|
+
export declare function sourceToIngestionUrl(source: SourceDefinition): string;
|
|
14
|
+
export declare function sourceHeaders(source: SourceDefinition): Record<string, string>;
|
|
15
|
+
export declare function sourceLabel(source: SourceDefinition): string;
|
|
16
|
+
export declare function summarizeDefinition(definition: ServerDefinition): SourceSummary;
|
|
17
|
+
export declare function sourceListLabel(definition: ServerDefinition, max?: number): string;
|
|
18
|
+
export declare function normalizeGitHubRepo(value: string): string;
|
|
19
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sources/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EACnB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,gBAAgB,CAKxG;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,gBAAgB,CAQ5F;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CA+C9D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAalE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAetE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAGjE;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gBAAgB,EAAE,EAC3B,IAAI,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1D,gBAAgB,EAAE,CAYpB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CASrE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK9E;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAK5D;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,gBAAgB,GAAG,aAAa,CAO/E;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,gBAAgB,EAAE,GAAG,SAAI,GAAG,MAAM,CAI7E;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGzD"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { ServerDefinitionSchema, SourceDefinitionSchema, } from './types.js';
|
|
2
|
+
export function createLegacyServerDefinition(sourceUrl, sourceType) {
|
|
3
|
+
return ServerDefinitionSchema.parse({
|
|
4
|
+
version: 1,
|
|
5
|
+
sources: [sourceFromLegacy(sourceUrl, sourceType)],
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export function sourceFromLegacy(sourceUrl, sourceType) {
|
|
9
|
+
if (sourceType === 'github') {
|
|
10
|
+
const repo = githubRepoFromUrl(sourceUrl);
|
|
11
|
+
if (repo)
|
|
12
|
+
return { type: 'github', repo, label: repo };
|
|
13
|
+
}
|
|
14
|
+
if (sourceType === 'llms.txt')
|
|
15
|
+
return { type: 'llms', url: sourceUrl, label: 'llms.txt' };
|
|
16
|
+
if (sourceType === 'manual')
|
|
17
|
+
return { type: 'manual', url: sourceUrl, label: 'manual' };
|
|
18
|
+
return { type: 'docs', url: sourceUrl, label: 'docs' };
|
|
19
|
+
}
|
|
20
|
+
export function parseCliSource(value) {
|
|
21
|
+
const sep = value.indexOf(':');
|
|
22
|
+
if (sep <= 0) {
|
|
23
|
+
throw new Error(`Invalid --source "${value}". Next: use --source docs:https://example.com/llms.txt or --source github:owner/repo.`);
|
|
24
|
+
}
|
|
25
|
+
const type = value.slice(0, sep).trim().toLowerCase();
|
|
26
|
+
const raw = value.slice(sep + 1).trim();
|
|
27
|
+
if (!raw) {
|
|
28
|
+
throw new Error(`Invalid --source "${value}". Next: provide a non-empty source value.`);
|
|
29
|
+
}
|
|
30
|
+
if (type === 'github' || type === 'gh') {
|
|
31
|
+
return SourceDefinitionSchema.parse({
|
|
32
|
+
type: 'github',
|
|
33
|
+
repo: normalizeGitHubRepo(raw),
|
|
34
|
+
label: normalizeGitHubRepo(raw),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
if (type === 'docs' || type === 'doc') {
|
|
38
|
+
return SourceDefinitionSchema.parse({ type: 'docs', url: raw, label: sourceLabelFromUrl(raw) });
|
|
39
|
+
}
|
|
40
|
+
if (type === 'llms' || type === 'llms.txt') {
|
|
41
|
+
return SourceDefinitionSchema.parse({ type: 'llms', url: raw, label: 'llms.txt' });
|
|
42
|
+
}
|
|
43
|
+
if (type === 'web' || type === 'site') {
|
|
44
|
+
return SourceDefinitionSchema.parse({ type: 'web', url: raw, label: sourceLabelFromUrl(raw) });
|
|
45
|
+
}
|
|
46
|
+
if (type === 'manual') {
|
|
47
|
+
return SourceDefinitionSchema.parse({ type: 'manual', url: raw, label: 'manual' });
|
|
48
|
+
}
|
|
49
|
+
if (type === 'custom') {
|
|
50
|
+
const providerSep = raw.indexOf(':');
|
|
51
|
+
if (providerSep <= 0) {
|
|
52
|
+
throw new Error(`Invalid custom source "${value}". Next: use --source custom:<provider>:<value>.`);
|
|
53
|
+
}
|
|
54
|
+
const provider = raw.slice(0, providerSep).trim();
|
|
55
|
+
const customValue = raw.slice(providerSep + 1).trim();
|
|
56
|
+
return SourceDefinitionSchema.parse({ type: 'custom', provider, value: customValue, label: provider });
|
|
57
|
+
}
|
|
58
|
+
throw new Error(`Unsupported --source type "${type}". Next: use docs, llms, web, github, manual, or custom.`);
|
|
59
|
+
}
|
|
60
|
+
export function parseCliSources(args) {
|
|
61
|
+
const out = [];
|
|
62
|
+
for (let i = 0; i < args.length; i++) {
|
|
63
|
+
if (args[i] === '--source') {
|
|
64
|
+
const value = args[i + 1];
|
|
65
|
+
if (!value) {
|
|
66
|
+
throw new Error('Missing --source value. Next: pass --source docs:https://example.com/llms.txt.');
|
|
67
|
+
}
|
|
68
|
+
out.push(parseCliSource(value));
|
|
69
|
+
i++;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return out;
|
|
73
|
+
}
|
|
74
|
+
export function parseCliHeaders(args) {
|
|
75
|
+
const headers = {};
|
|
76
|
+
for (let i = 0; i < args.length; i++) {
|
|
77
|
+
if (args[i] !== '--header')
|
|
78
|
+
continue;
|
|
79
|
+
const value = args[i + 1];
|
|
80
|
+
if (!value)
|
|
81
|
+
throw new Error('Missing --header value. Next: pass --header "Authorization: Bearer <token>".');
|
|
82
|
+
const sep = value.indexOf(':');
|
|
83
|
+
if (sep <= 0)
|
|
84
|
+
throw new Error(`Invalid --header "${value}". Next: use --header "Name: value".`);
|
|
85
|
+
const name = value.slice(0, sep).trim();
|
|
86
|
+
const headerValue = value.slice(sep + 1).trim();
|
|
87
|
+
if (!name || !headerValue)
|
|
88
|
+
throw new Error(`Invalid --header "${value}". Next: use --header "Name: value".`);
|
|
89
|
+
headers[name] = headerValue;
|
|
90
|
+
i++;
|
|
91
|
+
}
|
|
92
|
+
return headers;
|
|
93
|
+
}
|
|
94
|
+
export function parseCliCookie(args) {
|
|
95
|
+
const idx = args.indexOf('--cookie');
|
|
96
|
+
return idx !== -1 && args[idx + 1] ? args[idx + 1] : undefined;
|
|
97
|
+
}
|
|
98
|
+
export function applySourceAuth(sources, auth) {
|
|
99
|
+
const hasHeaders = auth.headers && Object.keys(auth.headers).length > 0;
|
|
100
|
+
const hasCookie = !!auth.cookie;
|
|
101
|
+
if (!hasHeaders && !hasCookie)
|
|
102
|
+
return sources;
|
|
103
|
+
return sources.map((source) => {
|
|
104
|
+
if (source.type === 'github')
|
|
105
|
+
return source;
|
|
106
|
+
return {
|
|
107
|
+
...source,
|
|
108
|
+
...(hasHeaders ? { headers: { ...source.headers, ...auth.headers } } : {}),
|
|
109
|
+
...(hasCookie ? { cookie: auth.cookie } : {}),
|
|
110
|
+
};
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
export function sourceToIngestionUrl(source) {
|
|
114
|
+
if (source.type === 'custom') {
|
|
115
|
+
throw new Error(`Custom source "${source.provider}" must be resolved before ingestion.`);
|
|
116
|
+
}
|
|
117
|
+
if (source.type === 'github') {
|
|
118
|
+
const base = `https://github.com/${source.repo}`;
|
|
119
|
+
return source.ref ? `${base}/tree/${source.ref}` : base;
|
|
120
|
+
}
|
|
121
|
+
return source.url;
|
|
122
|
+
}
|
|
123
|
+
export function sourceHeaders(source) {
|
|
124
|
+
if (source.type === 'github' || source.type === 'custom')
|
|
125
|
+
return {};
|
|
126
|
+
const headers = { ...(source.headers || {}) };
|
|
127
|
+
if (source.cookie)
|
|
128
|
+
headers.Cookie = source.cookie;
|
|
129
|
+
return headers;
|
|
130
|
+
}
|
|
131
|
+
export function sourceLabel(source) {
|
|
132
|
+
if (source.label)
|
|
133
|
+
return source.label;
|
|
134
|
+
if (source.type === 'github')
|
|
135
|
+
return source.repo;
|
|
136
|
+
if (source.type === 'custom')
|
|
137
|
+
return `${source.provider}:${source.value}`;
|
|
138
|
+
return sourceLabelFromUrl(source.url);
|
|
139
|
+
}
|
|
140
|
+
export function summarizeDefinition(definition) {
|
|
141
|
+
const primary = definition.sources[0];
|
|
142
|
+
return {
|
|
143
|
+
count: definition.sources.length,
|
|
144
|
+
labels: definition.sources.map(sourceLabel),
|
|
145
|
+
primary,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
export function sourceListLabel(definition, max = 2) {
|
|
149
|
+
const labels = definition.sources.map(sourceLabel);
|
|
150
|
+
if (labels.length <= max)
|
|
151
|
+
return labels.join(', ');
|
|
152
|
+
return `${labels.slice(0, max).join(', ')} +${labels.length - max}`;
|
|
153
|
+
}
|
|
154
|
+
export function normalizeGitHubRepo(value) {
|
|
155
|
+
const fromUrl = githubRepoFromUrl(value);
|
|
156
|
+
return fromUrl || value.replace(/^github:/i, '').replace(/^\/+/, '').replace(/\.git$/, '');
|
|
157
|
+
}
|
|
158
|
+
function githubRepoFromUrl(value) {
|
|
159
|
+
try {
|
|
160
|
+
const url = new URL(value);
|
|
161
|
+
if (url.hostname !== 'github.com' && url.hostname !== 'www.github.com')
|
|
162
|
+
return null;
|
|
163
|
+
const parts = url.pathname.split('/').filter(Boolean);
|
|
164
|
+
if (parts.length < 2)
|
|
165
|
+
return null;
|
|
166
|
+
return `${parts[0]}/${parts[1].replace(/\.git$/, '')}`;
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function sourceLabelFromUrl(value) {
|
|
173
|
+
try {
|
|
174
|
+
const url = new URL(value);
|
|
175
|
+
const path = url.pathname.replace(/\/$/, '');
|
|
176
|
+
const leaf = path.split('/').filter(Boolean).pop();
|
|
177
|
+
return leaf ? `${url.hostname}/${leaf}` : url.hostname;
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
return value;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/sources/registry.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GAIvB,MAAM,YAAY,CAAC;AAEpB,MAAM,UAAU,4BAA4B,CAAC,SAAiB,EAAE,UAAsB;IACpF,OAAO,sBAAsB,CAAC,KAAK,CAAC;QAClC,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;KACnD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,SAAiB,EAAE,UAAsB;IACxE,IAAI,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,IAAI,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAC1C,IAAI,IAAI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';
|
|
2
|
+
export declare const SourceDefinitionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"docs">;
|
|
4
|
+
url: z.ZodString;
|
|
5
|
+
label: z.ZodOptional<z.ZodString>;
|
|
6
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
7
|
+
cookie: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
type: "docs";
|
|
10
|
+
url: string;
|
|
11
|
+
label?: string | undefined;
|
|
12
|
+
headers?: Record<string, string> | undefined;
|
|
13
|
+
cookie?: string | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
type: "docs";
|
|
16
|
+
url: string;
|
|
17
|
+
label?: string | undefined;
|
|
18
|
+
headers?: Record<string, string> | undefined;
|
|
19
|
+
cookie?: string | undefined;
|
|
20
|
+
}>, z.ZodObject<{
|
|
21
|
+
type: z.ZodLiteral<"llms">;
|
|
22
|
+
url: z.ZodString;
|
|
23
|
+
label: z.ZodOptional<z.ZodString>;
|
|
24
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
25
|
+
cookie: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
type: "llms";
|
|
28
|
+
url: string;
|
|
29
|
+
label?: string | undefined;
|
|
30
|
+
headers?: Record<string, string> | undefined;
|
|
31
|
+
cookie?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
type: "llms";
|
|
34
|
+
url: string;
|
|
35
|
+
label?: string | undefined;
|
|
36
|
+
headers?: Record<string, string> | undefined;
|
|
37
|
+
cookie?: string | undefined;
|
|
38
|
+
}>, z.ZodObject<{
|
|
39
|
+
type: z.ZodLiteral<"web">;
|
|
40
|
+
url: z.ZodString;
|
|
41
|
+
label: z.ZodOptional<z.ZodString>;
|
|
42
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
43
|
+
cookie: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
type: "web";
|
|
46
|
+
url: string;
|
|
47
|
+
label?: string | undefined;
|
|
48
|
+
headers?: Record<string, string> | undefined;
|
|
49
|
+
cookie?: string | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
type: "web";
|
|
52
|
+
url: string;
|
|
53
|
+
label?: string | undefined;
|
|
54
|
+
headers?: Record<string, string> | undefined;
|
|
55
|
+
cookie?: string | undefined;
|
|
56
|
+
}>, z.ZodObject<{
|
|
57
|
+
type: z.ZodLiteral<"github">;
|
|
58
|
+
repo: z.ZodString;
|
|
59
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
60
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
61
|
+
label: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
type: "github";
|
|
64
|
+
repo: string;
|
|
65
|
+
label?: string | undefined;
|
|
66
|
+
ref?: string | undefined;
|
|
67
|
+
paths?: string[] | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
type: "github";
|
|
70
|
+
repo: string;
|
|
71
|
+
label?: string | undefined;
|
|
72
|
+
ref?: string | undefined;
|
|
73
|
+
paths?: string[] | undefined;
|
|
74
|
+
}>, z.ZodObject<{
|
|
75
|
+
type: z.ZodLiteral<"manual">;
|
|
76
|
+
url: z.ZodString;
|
|
77
|
+
label: z.ZodOptional<z.ZodString>;
|
|
78
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
79
|
+
cookie: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
type: "manual";
|
|
82
|
+
url: string;
|
|
83
|
+
label?: string | undefined;
|
|
84
|
+
headers?: Record<string, string> | undefined;
|
|
85
|
+
cookie?: string | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
type: "manual";
|
|
88
|
+
url: string;
|
|
89
|
+
label?: string | undefined;
|
|
90
|
+
headers?: Record<string, string> | undefined;
|
|
91
|
+
cookie?: string | undefined;
|
|
92
|
+
}>, z.ZodObject<{
|
|
93
|
+
type: z.ZodLiteral<"custom">;
|
|
94
|
+
provider: z.ZodString;
|
|
95
|
+
value: z.ZodString;
|
|
96
|
+
label: z.ZodOptional<z.ZodString>;
|
|
97
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
98
|
+
cookie: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
value: string;
|
|
101
|
+
type: "custom";
|
|
102
|
+
provider: string;
|
|
103
|
+
label?: string | undefined;
|
|
104
|
+
headers?: Record<string, string> | undefined;
|
|
105
|
+
cookie?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
value: string;
|
|
108
|
+
type: "custom";
|
|
109
|
+
provider: string;
|
|
110
|
+
label?: string | undefined;
|
|
111
|
+
headers?: Record<string, string> | undefined;
|
|
112
|
+
cookie?: string | undefined;
|
|
113
|
+
}>]>;
|
|
114
|
+
export type SourceDefinition = z.infer<typeof SourceDefinitionSchema>;
|
|
115
|
+
export declare const TemplateReferenceSchema: z.ZodObject<{
|
|
116
|
+
id: z.ZodString;
|
|
117
|
+
name: z.ZodString;
|
|
118
|
+
version: z.ZodString;
|
|
119
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
version: string;
|
|
122
|
+
name: string;
|
|
123
|
+
id: string;
|
|
124
|
+
inputs?: Record<string, string> | undefined;
|
|
125
|
+
}, {
|
|
126
|
+
version: string;
|
|
127
|
+
name: string;
|
|
128
|
+
id: string;
|
|
129
|
+
inputs?: Record<string, string> | undefined;
|
|
130
|
+
}>;
|
|
131
|
+
export type TemplateReference = z.infer<typeof TemplateReferenceSchema>;
|
|
132
|
+
export declare const ServerDefinitionSchema: z.ZodObject<{
|
|
133
|
+
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
134
|
+
sources: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
135
|
+
type: z.ZodLiteral<"docs">;
|
|
136
|
+
url: z.ZodString;
|
|
137
|
+
label: z.ZodOptional<z.ZodString>;
|
|
138
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
139
|
+
cookie: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
type: "docs";
|
|
142
|
+
url: string;
|
|
143
|
+
label?: string | undefined;
|
|
144
|
+
headers?: Record<string, string> | undefined;
|
|
145
|
+
cookie?: string | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
type: "docs";
|
|
148
|
+
url: string;
|
|
149
|
+
label?: string | undefined;
|
|
150
|
+
headers?: Record<string, string> | undefined;
|
|
151
|
+
cookie?: string | undefined;
|
|
152
|
+
}>, z.ZodObject<{
|
|
153
|
+
type: z.ZodLiteral<"llms">;
|
|
154
|
+
url: z.ZodString;
|
|
155
|
+
label: z.ZodOptional<z.ZodString>;
|
|
156
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
157
|
+
cookie: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
type: "llms";
|
|
160
|
+
url: string;
|
|
161
|
+
label?: string | undefined;
|
|
162
|
+
headers?: Record<string, string> | undefined;
|
|
163
|
+
cookie?: string | undefined;
|
|
164
|
+
}, {
|
|
165
|
+
type: "llms";
|
|
166
|
+
url: string;
|
|
167
|
+
label?: string | undefined;
|
|
168
|
+
headers?: Record<string, string> | undefined;
|
|
169
|
+
cookie?: string | undefined;
|
|
170
|
+
}>, z.ZodObject<{
|
|
171
|
+
type: z.ZodLiteral<"web">;
|
|
172
|
+
url: z.ZodString;
|
|
173
|
+
label: z.ZodOptional<z.ZodString>;
|
|
174
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
175
|
+
cookie: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
type: "web";
|
|
178
|
+
url: string;
|
|
179
|
+
label?: string | undefined;
|
|
180
|
+
headers?: Record<string, string> | undefined;
|
|
181
|
+
cookie?: string | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
type: "web";
|
|
184
|
+
url: string;
|
|
185
|
+
label?: string | undefined;
|
|
186
|
+
headers?: Record<string, string> | undefined;
|
|
187
|
+
cookie?: string | undefined;
|
|
188
|
+
}>, z.ZodObject<{
|
|
189
|
+
type: z.ZodLiteral<"github">;
|
|
190
|
+
repo: z.ZodString;
|
|
191
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
192
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
193
|
+
label: z.ZodOptional<z.ZodString>;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
type: "github";
|
|
196
|
+
repo: string;
|
|
197
|
+
label?: string | undefined;
|
|
198
|
+
ref?: string | undefined;
|
|
199
|
+
paths?: string[] | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
type: "github";
|
|
202
|
+
repo: string;
|
|
203
|
+
label?: string | undefined;
|
|
204
|
+
ref?: string | undefined;
|
|
205
|
+
paths?: string[] | undefined;
|
|
206
|
+
}>, z.ZodObject<{
|
|
207
|
+
type: z.ZodLiteral<"manual">;
|
|
208
|
+
url: z.ZodString;
|
|
209
|
+
label: z.ZodOptional<z.ZodString>;
|
|
210
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
211
|
+
cookie: z.ZodOptional<z.ZodString>;
|
|
212
|
+
}, "strip", z.ZodTypeAny, {
|
|
213
|
+
type: "manual";
|
|
214
|
+
url: string;
|
|
215
|
+
label?: string | undefined;
|
|
216
|
+
headers?: Record<string, string> | undefined;
|
|
217
|
+
cookie?: string | undefined;
|
|
218
|
+
}, {
|
|
219
|
+
type: "manual";
|
|
220
|
+
url: string;
|
|
221
|
+
label?: string | undefined;
|
|
222
|
+
headers?: Record<string, string> | undefined;
|
|
223
|
+
cookie?: string | undefined;
|
|
224
|
+
}>, z.ZodObject<{
|
|
225
|
+
type: z.ZodLiteral<"custom">;
|
|
226
|
+
provider: z.ZodString;
|
|
227
|
+
value: z.ZodString;
|
|
228
|
+
label: z.ZodOptional<z.ZodString>;
|
|
229
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
230
|
+
cookie: z.ZodOptional<z.ZodString>;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
value: string;
|
|
233
|
+
type: "custom";
|
|
234
|
+
provider: string;
|
|
235
|
+
label?: string | undefined;
|
|
236
|
+
headers?: Record<string, string> | undefined;
|
|
237
|
+
cookie?: string | undefined;
|
|
238
|
+
}, {
|
|
239
|
+
value: string;
|
|
240
|
+
type: "custom";
|
|
241
|
+
provider: string;
|
|
242
|
+
label?: string | undefined;
|
|
243
|
+
headers?: Record<string, string> | undefined;
|
|
244
|
+
cookie?: string | undefined;
|
|
245
|
+
}>]>, "many">>;
|
|
246
|
+
template: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
id: z.ZodString;
|
|
248
|
+
name: z.ZodString;
|
|
249
|
+
version: z.ZodString;
|
|
250
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
251
|
+
}, "strip", z.ZodTypeAny, {
|
|
252
|
+
version: string;
|
|
253
|
+
name: string;
|
|
254
|
+
id: string;
|
|
255
|
+
inputs?: Record<string, string> | undefined;
|
|
256
|
+
}, {
|
|
257
|
+
version: string;
|
|
258
|
+
name: string;
|
|
259
|
+
id: string;
|
|
260
|
+
inputs?: Record<string, string> | undefined;
|
|
261
|
+
}>>;
|
|
262
|
+
}, "strip", z.ZodTypeAny, {
|
|
263
|
+
version: 1;
|
|
264
|
+
sources: ({
|
|
265
|
+
type: "docs";
|
|
266
|
+
url: string;
|
|
267
|
+
label?: string | undefined;
|
|
268
|
+
headers?: Record<string, string> | undefined;
|
|
269
|
+
cookie?: string | undefined;
|
|
270
|
+
} | {
|
|
271
|
+
type: "llms";
|
|
272
|
+
url: string;
|
|
273
|
+
label?: string | undefined;
|
|
274
|
+
headers?: Record<string, string> | undefined;
|
|
275
|
+
cookie?: string | undefined;
|
|
276
|
+
} | {
|
|
277
|
+
type: "web";
|
|
278
|
+
url: string;
|
|
279
|
+
label?: string | undefined;
|
|
280
|
+
headers?: Record<string, string> | undefined;
|
|
281
|
+
cookie?: string | undefined;
|
|
282
|
+
} | {
|
|
283
|
+
type: "github";
|
|
284
|
+
repo: string;
|
|
285
|
+
label?: string | undefined;
|
|
286
|
+
ref?: string | undefined;
|
|
287
|
+
paths?: string[] | undefined;
|
|
288
|
+
} | {
|
|
289
|
+
type: "manual";
|
|
290
|
+
url: string;
|
|
291
|
+
label?: string | undefined;
|
|
292
|
+
headers?: Record<string, string> | undefined;
|
|
293
|
+
cookie?: string | undefined;
|
|
294
|
+
} | {
|
|
295
|
+
value: string;
|
|
296
|
+
type: "custom";
|
|
297
|
+
provider: string;
|
|
298
|
+
label?: string | undefined;
|
|
299
|
+
headers?: Record<string, string> | undefined;
|
|
300
|
+
cookie?: string | undefined;
|
|
301
|
+
})[];
|
|
302
|
+
template?: {
|
|
303
|
+
version: string;
|
|
304
|
+
name: string;
|
|
305
|
+
id: string;
|
|
306
|
+
inputs?: Record<string, string> | undefined;
|
|
307
|
+
} | undefined;
|
|
308
|
+
}, {
|
|
309
|
+
version?: 1 | undefined;
|
|
310
|
+
sources?: ({
|
|
311
|
+
type: "docs";
|
|
312
|
+
url: string;
|
|
313
|
+
label?: string | undefined;
|
|
314
|
+
headers?: Record<string, string> | undefined;
|
|
315
|
+
cookie?: string | undefined;
|
|
316
|
+
} | {
|
|
317
|
+
type: "llms";
|
|
318
|
+
url: string;
|
|
319
|
+
label?: string | undefined;
|
|
320
|
+
headers?: Record<string, string> | undefined;
|
|
321
|
+
cookie?: string | undefined;
|
|
322
|
+
} | {
|
|
323
|
+
type: "web";
|
|
324
|
+
url: string;
|
|
325
|
+
label?: string | undefined;
|
|
326
|
+
headers?: Record<string, string> | undefined;
|
|
327
|
+
cookie?: string | undefined;
|
|
328
|
+
} | {
|
|
329
|
+
type: "github";
|
|
330
|
+
repo: string;
|
|
331
|
+
label?: string | undefined;
|
|
332
|
+
ref?: string | undefined;
|
|
333
|
+
paths?: string[] | undefined;
|
|
334
|
+
} | {
|
|
335
|
+
type: "manual";
|
|
336
|
+
url: string;
|
|
337
|
+
label?: string | undefined;
|
|
338
|
+
headers?: Record<string, string> | undefined;
|
|
339
|
+
cookie?: string | undefined;
|
|
340
|
+
} | {
|
|
341
|
+
value: string;
|
|
342
|
+
type: "custom";
|
|
343
|
+
provider: string;
|
|
344
|
+
label?: string | undefined;
|
|
345
|
+
headers?: Record<string, string> | undefined;
|
|
346
|
+
cookie?: string | undefined;
|
|
347
|
+
})[] | undefined;
|
|
348
|
+
template?: {
|
|
349
|
+
version: string;
|
|
350
|
+
name: string;
|
|
351
|
+
id: string;
|
|
352
|
+
inputs?: Record<string, string> | undefined;
|
|
353
|
+
} | undefined;
|
|
354
|
+
}>;
|
|
355
|
+
export type ServerDefinition = z.infer<typeof ServerDefinitionSchema>;
|
|
356
|
+
export interface SourceSummary {
|
|
357
|
+
count: number;
|
|
358
|
+
labels: string[];
|
|
359
|
+
primary: SourceDefinition;
|
|
360
|
+
}
|
|
361
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sources/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4CjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAKlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,gBAAgB,CAAC;CAC3B"}
|