@hubblecommerce/overmind-core 0.1.0 → 0.1.2
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/dist/src/config/app.config.d.ts +53 -0
- package/dist/src/config/app.config.d.ts.map +1 -0
- package/dist/src/embeddings/embeddings.interface.d.ts +5 -0
- package/dist/src/embeddings/embeddings.interface.d.ts.map +1 -0
- package/dist/src/embeddings/transformers.provider.d.ts +4 -0
- package/dist/src/embeddings/transformers.provider.d.ts.map +1 -0
- package/dist/src/integrations/confluence/confluence.client.d.ts +75 -0
- package/dist/src/integrations/confluence/confluence.client.d.ts.map +1 -0
- package/dist/src/integrations/confluence/confluence.types.d.ts +88 -0
- package/dist/src/integrations/confluence/confluence.types.d.ts.map +1 -0
- package/dist/src/integrations/gitlab/gitlab.client.d.ts +3 -0
- package/dist/src/integrations/gitlab/gitlab.client.d.ts.map +1 -0
- package/dist/src/integrations/gitlab/gitlab.types.d.ts +54 -0
- package/dist/src/integrations/gitlab/gitlab.types.d.ts.map +1 -0
- package/dist/src/integrations/jira/jira.client.d.ts +67 -0
- package/dist/src/integrations/jira/jira.client.d.ts.map +1 -0
- package/dist/src/llm/anthropic-retry-wrapper.d.ts +27 -0
- package/dist/src/llm/anthropic-retry-wrapper.d.ts.map +1 -0
- package/dist/src/llm/anthropic.provider.d.ts +9 -0
- package/dist/src/llm/anthropic.provider.d.ts.map +1 -0
- package/dist/src/processors/confluence-document.processor.d.ts +49 -0
- package/dist/src/processors/confluence-document.processor.d.ts.map +1 -0
- package/dist/src/processors/confluence-html-parser.d.ts +6 -0
- package/dist/src/processors/confluence-html-parser.d.ts.map +1 -0
- package/dist/src/tools/confluence-search.tool.d.ts +121 -0
- package/dist/src/tools/confluence-search.tool.d.ts.map +1 -0
- package/dist/src/tools/get-current-date.tool.d.ts +3 -0
- package/dist/src/tools/get-current-date.tool.d.ts.map +1 -0
- package/dist/src/vectorstore/postgres.provider.d.ts +19 -0
- package/dist/src/vectorstore/postgres.provider.d.ts.map +1 -0
- package/dist/src/vectorstore/vectorstore.interface.d.ts +13 -0
- package/dist/src/vectorstore/vectorstore.interface.d.ts.map +1 -0
- package/package.json +54 -12
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const config: {
|
|
2
|
+
llm: {
|
|
3
|
+
provider: "anthropic";
|
|
4
|
+
modelName: string;
|
|
5
|
+
temperature: number;
|
|
6
|
+
timeoutMs: number;
|
|
7
|
+
maxRetries: number;
|
|
8
|
+
};
|
|
9
|
+
queue: {
|
|
10
|
+
pollIntervalMs: number;
|
|
11
|
+
maxRetries: number;
|
|
12
|
+
};
|
|
13
|
+
embedding: {
|
|
14
|
+
provider: "transformers";
|
|
15
|
+
modelName: string;
|
|
16
|
+
pooling: "mean";
|
|
17
|
+
normalize: boolean;
|
|
18
|
+
};
|
|
19
|
+
vectorStore: {
|
|
20
|
+
postgres: {
|
|
21
|
+
host: string;
|
|
22
|
+
port: number;
|
|
23
|
+
user: string;
|
|
24
|
+
password: string;
|
|
25
|
+
database: string;
|
|
26
|
+
tableName: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
gitlab: {
|
|
30
|
+
baseUrl: string;
|
|
31
|
+
token: string;
|
|
32
|
+
rateLimit: number;
|
|
33
|
+
chunking: {
|
|
34
|
+
chunkSize: number;
|
|
35
|
+
chunkOverlap: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
confluence: {
|
|
39
|
+
baseUrl: string;
|
|
40
|
+
email: string;
|
|
41
|
+
apiToken: string;
|
|
42
|
+
spaces: string[];
|
|
43
|
+
rateLimit: number;
|
|
44
|
+
};
|
|
45
|
+
jira: {
|
|
46
|
+
baseUrl: string;
|
|
47
|
+
email: string;
|
|
48
|
+
apiToken: string;
|
|
49
|
+
suggestionsSpaceId: string;
|
|
50
|
+
suggestionsParentId: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=app.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.config.d.ts","sourceRoot":"","sources":["../../../src/config/app.config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embeddings.interface.d.ts","sourceRoot":"","sources":["../../../src/embeddings/embeddings.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IAC/B,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACrD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC/C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EmbeddingsProvider } from './embeddings.interface.js';
|
|
2
|
+
export type { EmbeddingsProvider };
|
|
3
|
+
export declare function createTransformersEmbeddings(modelName: string, pooling: 'mean', normalize: boolean): Promise<EmbeddingsProvider>;
|
|
4
|
+
//# sourceMappingURL=transformers.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformers.provider.d.ts","sourceRoot":"","sources":["../../../src/embeddings/transformers.provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC,wBAAsB,4BAA4B,CAC9C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,OAAO,GACnB,OAAO,CAAC,kBAAkB,CAAC,CAkB7B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ConfluencePage, ConfluenceSpace } from './confluence.types.js';
|
|
2
|
+
export interface ConfluenceClientConfig {
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
email: string;
|
|
5
|
+
apiToken: string;
|
|
6
|
+
rateLimit?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class ConfluenceClient {
|
|
9
|
+
private readonly baseUrl;
|
|
10
|
+
private readonly authHeader;
|
|
11
|
+
private readonly rateLimit;
|
|
12
|
+
private lastRequestTime;
|
|
13
|
+
constructor(config: ConfluenceClientConfig);
|
|
14
|
+
/**
|
|
15
|
+
* Rate limiting: Ensure we don't exceed configured requests per second
|
|
16
|
+
*/
|
|
17
|
+
private enforceRateLimit;
|
|
18
|
+
/**
|
|
19
|
+
* Make HTTP request to Confluence API with retries
|
|
20
|
+
*/
|
|
21
|
+
private request;
|
|
22
|
+
/**
|
|
23
|
+
* Get all spaces (with pagination)
|
|
24
|
+
*/
|
|
25
|
+
getSpaces(limit?: number): Promise<ConfluenceSpace[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Get all pages in a space (with pagination)
|
|
28
|
+
* Note: Accepts space key and automatically resolves to space ID for API v2
|
|
29
|
+
*/
|
|
30
|
+
getSpacePages(spaceKey: string, limit?: number): Promise<ConfluencePage[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Get a single page by ID with content
|
|
33
|
+
*/
|
|
34
|
+
getPageById(pageId: string, bodyFormat?: 'storage' | 'atlas_doc_format'): Promise<ConfluencePage>;
|
|
35
|
+
/**
|
|
36
|
+
* Get page content only (HTML in storage format)
|
|
37
|
+
*/
|
|
38
|
+
getPageContent(pageId: string): Promise<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Get space by key
|
|
41
|
+
*/
|
|
42
|
+
getSpaceByKey(spaceKey: string): Promise<ConfluenceSpace>;
|
|
43
|
+
/**
|
|
44
|
+
* Get recent pages across all spaces or specific spaces
|
|
45
|
+
*/
|
|
46
|
+
getRecentPages(spaceKeys?: string[], limit?: number): Promise<ConfluencePage[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Get labels for a page (using v1 API as v2 doesn't support this yet)
|
|
49
|
+
* Returns only label names as strings
|
|
50
|
+
*/
|
|
51
|
+
getPageLabels(pageId: string): Promise<string[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Get numeric space ID from space key
|
|
54
|
+
* Helper method to convert space key to numeric ID required by v2 API
|
|
55
|
+
* @param spaceKey - The space key (e.g., "TEST")
|
|
56
|
+
* @returns The numeric space ID
|
|
57
|
+
*/
|
|
58
|
+
getSpaceIdByKey(spaceKey: string): Promise<string>;
|
|
59
|
+
/**
|
|
60
|
+
* Create a new page in Confluence using REST API v2 with ADF (Atlassian Document Format)
|
|
61
|
+
* This is the modern format for the new Confluence editor
|
|
62
|
+
* @param spaceId - The numeric space ID (not space key) - use getSpaceIdByKey() if you have a space key
|
|
63
|
+
* @param title - The page title
|
|
64
|
+
* @param adfBody - The page content in ADF format (from @atlaskit/editor-markdown-transformer)
|
|
65
|
+
* @param parentId - Optional parent page ID to create as child page
|
|
66
|
+
* @returns The created page
|
|
67
|
+
*/
|
|
68
|
+
createPageWithADF(params: {
|
|
69
|
+
spaceId: string;
|
|
70
|
+
title: string;
|
|
71
|
+
adfBody: unknown;
|
|
72
|
+
parentId?: string;
|
|
73
|
+
}): Promise<ConfluencePage>;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=confluence.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confluence.client.d.ts","sourceRoot":"","sources":["../../../../src/integrations/confluence/confluence.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,cAAc,EAEd,eAAe,EAKlB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,sBAAsB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAuBD,qBAAa,gBAAgB;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,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: string;
|
|
3
|
+
status: 'current' | 'archived' | 'deleted' | 'draft' | 'trashed';
|
|
4
|
+
title: string;
|
|
5
|
+
spaceId: string;
|
|
6
|
+
parentId?: string;
|
|
7
|
+
parentType?: string;
|
|
8
|
+
position?: number;
|
|
9
|
+
authorId: string;
|
|
10
|
+
ownerId?: string;
|
|
11
|
+
lastOwnerId?: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
version: {
|
|
14
|
+
createdAt: string;
|
|
15
|
+
message: string;
|
|
16
|
+
number: number;
|
|
17
|
+
minorEdit: boolean;
|
|
18
|
+
authorId: string;
|
|
19
|
+
};
|
|
20
|
+
body?: {
|
|
21
|
+
storage?: {
|
|
22
|
+
value: string;
|
|
23
|
+
representation: 'storage';
|
|
24
|
+
};
|
|
25
|
+
atlas_doc_format?: {
|
|
26
|
+
value: string;
|
|
27
|
+
representation: 'atlas_doc_format';
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
_links: {
|
|
31
|
+
webui: string;
|
|
32
|
+
editui?: string;
|
|
33
|
+
tinyui?: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface ConfluenceSpace {
|
|
37
|
+
id: string;
|
|
38
|
+
key: string;
|
|
39
|
+
name: string;
|
|
40
|
+
type: 'global' | 'personal';
|
|
41
|
+
status: 'current' | 'archived';
|
|
42
|
+
authorId: string;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
homepageId?: string;
|
|
45
|
+
description?: {
|
|
46
|
+
plain: {
|
|
47
|
+
value: string;
|
|
48
|
+
representation: 'plain';
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
_links: {
|
|
52
|
+
webui: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export interface ConfluencePageResponse {
|
|
56
|
+
results: ConfluencePage[];
|
|
57
|
+
_links: {
|
|
58
|
+
next?: string;
|
|
59
|
+
base?: string;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export interface ConfluenceSpaceResponse {
|
|
63
|
+
results: ConfluenceSpace[];
|
|
64
|
+
_links: {
|
|
65
|
+
next?: string;
|
|
66
|
+
base?: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export interface ConfluenceApiError {
|
|
70
|
+
statusCode: number;
|
|
71
|
+
message: string;
|
|
72
|
+
reason?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface ConfluenceLabel {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
prefix: 'global' | 'my' | 'team';
|
|
78
|
+
}
|
|
79
|
+
export interface ConfluenceLabelResponse {
|
|
80
|
+
results: ConfluenceLabel[];
|
|
81
|
+
start: number;
|
|
82
|
+
limit: number;
|
|
83
|
+
size: number;
|
|
84
|
+
_links: {
|
|
85
|
+
next?: string;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=confluence.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confluence.types.d.ts","sourceRoot":"","sources":["../../../../src/integrations/confluence/confluence.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACL,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,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ACjB,CAAC;CACL;AAED,MAAM,WAAW,kBAAkB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab.client.d.ts","sourceRoot":"","sources":["../../../../src/integrations/gitlab/gitlab.client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKzC,wBAAgB,eAAe,IAAI,YAAY,CAAC,OAAO,MAAM,CAAC,CAa7D"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Camelize } from '@gitbeaker/rest';
|
|
2
|
+
export interface RepositoryMetadata {
|
|
3
|
+
document_id: string;
|
|
4
|
+
document_type: 'repository_metadata';
|
|
5
|
+
repository_id: string;
|
|
6
|
+
repository_name: string | Camelize<unknown>;
|
|
7
|
+
repository_url: string | Camelize<unknown>;
|
|
8
|
+
project_namespace: string | Camelize<unknown>;
|
|
9
|
+
description: string | Camelize<unknown>;
|
|
10
|
+
primary_language: string | Camelize<unknown>;
|
|
11
|
+
languages?: string[];
|
|
12
|
+
contributors: string[];
|
|
13
|
+
contributor_count: number;
|
|
14
|
+
branch_count: number;
|
|
15
|
+
default_branch: string | Camelize<unknown>;
|
|
16
|
+
tag_count: number;
|
|
17
|
+
latest_tag?: string | Camelize<unknown>;
|
|
18
|
+
commit_count: number;
|
|
19
|
+
last_activity: string | Camelize<unknown>;
|
|
20
|
+
last_activity_timestamp: number;
|
|
21
|
+
created_at: string | Camelize<unknown>;
|
|
22
|
+
created_at_timestamp: number;
|
|
23
|
+
is_archived: boolean;
|
|
24
|
+
visibility: string | Camelize<unknown>;
|
|
25
|
+
has_ci: boolean;
|
|
26
|
+
has_docker: boolean;
|
|
27
|
+
dependencies_npm?: string[];
|
|
28
|
+
dependencies_composer?: string[];
|
|
29
|
+
dependency_count_npm?: number;
|
|
30
|
+
dependency_count_composer?: number;
|
|
31
|
+
project_version?: string;
|
|
32
|
+
project_version_major?: number;
|
|
33
|
+
project_version_minor?: number;
|
|
34
|
+
project_version_patch?: number;
|
|
35
|
+
project_version_semver_numeric?: number;
|
|
36
|
+
project_version_source?: 'package.json' | 'composer.json' | 'git_tag';
|
|
37
|
+
}
|
|
38
|
+
export interface FileMetadata {
|
|
39
|
+
document_id: string;
|
|
40
|
+
document_type: 'file';
|
|
41
|
+
repository_id: string;
|
|
42
|
+
repository_name: string | Camelize<unknown>;
|
|
43
|
+
repository_url: string | Camelize<unknown>;
|
|
44
|
+
file_type: string;
|
|
45
|
+
file_path: string;
|
|
46
|
+
file_size: number;
|
|
47
|
+
branch: string;
|
|
48
|
+
last_commit_sha: string | Camelize<unknown>;
|
|
49
|
+
last_updated: string | Camelize<unknown>;
|
|
50
|
+
project_namespace: string | Camelize<unknown>;
|
|
51
|
+
is_archived: boolean;
|
|
52
|
+
visibility: string | Camelize<unknown>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=gitlab.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab.types.d.ts","sourceRoot":"","sources":["../../../../src/integrations/gitlab/gitlab.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,WAAW,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AyB,CAAC,EAAE,MAAM,CAAC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,sBAAsB,CAAC,EAAE,cAAc,GAAG,eAAe,GAAG,SAAS,CAAC;CACzE;AAGD,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC5C,cAAc,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC5C,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IACzC,iBAAiB,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC9C,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC1C"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export interface JiraComment {
|
|
2
|
+
author: string;
|
|
3
|
+
body: string;
|
|
4
|
+
updated: string;
|
|
5
|
+
}
|
|
6
|
+
export interface JiraIssue {
|
|
7
|
+
id: string;
|
|
8
|
+
key: string;
|
|
9
|
+
self: string;
|
|
10
|
+
fields: {
|
|
11
|
+
summary: string;
|
|
12
|
+
description?: string | null;
|
|
13
|
+
status: {
|
|
14
|
+
name: string;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
issuetype: {
|
|
18
|
+
name: string;
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
project: {
|
|
22
|
+
key: string;
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
26
|
+
assignee?: {
|
|
27
|
+
accountId: string;
|
|
28
|
+
displayName: string;
|
|
29
|
+
} | null;
|
|
30
|
+
reporter?: {
|
|
31
|
+
accountId: string;
|
|
32
|
+
displayName: string;
|
|
33
|
+
} | null;
|
|
34
|
+
created: string;
|
|
35
|
+
updated: string;
|
|
36
|
+
resolutiondate?: string | null;
|
|
37
|
+
labels: string[];
|
|
38
|
+
components: Array<{
|
|
39
|
+
name: string;
|
|
40
|
+
id: string;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
comments: JiraComment[];
|
|
44
|
+
}
|
|
45
|
+
export interface JiraClientConfig {
|
|
46
|
+
baseUrl: string;
|
|
47
|
+
email: string;
|
|
48
|
+
apiToken: string;
|
|
49
|
+
}
|
|
50
|
+
export declare class JiraClient {
|
|
51
|
+
private baseUrl;
|
|
52
|
+
private authHeader;
|
|
53
|
+
constructor(config: JiraClientConfig);
|
|
54
|
+
/**
|
|
55
|
+
* Parse Atlassian Document Format (ADF) to plain text
|
|
56
|
+
*/
|
|
57
|
+
private parseADFToText;
|
|
58
|
+
/**
|
|
59
|
+
* Convert ADF comment body to readable text
|
|
60
|
+
*/
|
|
61
|
+
private parseCommentBody;
|
|
62
|
+
/**
|
|
63
|
+
* Fetch a Jira issue by key or ID, including comments
|
|
64
|
+
*/
|
|
65
|
+
getIssue(issueKeyOrId: string): Promise<JiraIssue>;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=jira.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jira.client.d.ts","sourceRoot":"","sources":["../../../../src/integrations/jira/jira.client.ts"],"names":[],"mappings":"AA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AQ,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,UAAU;IACnB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAS;gBAEf,MAAM,EAAE,gBAAgB;IAKpC;;OAEG;IACH,OAAO,CAAC,cAAc;IAgCtB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAexB;;OAEG;IACG,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAuI3D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retry wrapper for Anthropic API calls with 429 rate limit handling
|
|
3
|
+
* Respects retry-after headers and implements exponential backoff
|
|
4
|
+
*/
|
|
5
|
+
interface AgentLike<TInput = unknown, TOutput = unknown> {
|
|
6
|
+
invoke: (input: TInput, options?: unknown) => Promise<TOutput>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Custom error for rate limit responses
|
|
10
|
+
* Includes retry-after information from API headers
|
|
11
|
+
*/
|
|
12
|
+
export declare class RateLimitError extends Error {
|
|
13
|
+
retryAfterSeconds: number | null;
|
|
14
|
+
constructor(message: string, retryAfterSeconds: number | null);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Invoke an agent with automatic retry on 429 errors
|
|
18
|
+
* @param agent LangChain agent instance
|
|
19
|
+
* @param input Agent input (messages, etc.)
|
|
20
|
+
* @param maxRetries Maximum number of retry attempts (default: 3)
|
|
21
|
+
* @returns Agent response
|
|
22
|
+
* @throws RateLimitError if all retries exhausted due to 429
|
|
23
|
+
* @throws Original error if non-429 error occurs
|
|
24
|
+
*/
|
|
25
|
+
export declare function invokeWithRetry<TInput, TOutput>(agent: AgentLike<TInput, TOutput>, input: TInput, maxRetries?: number): Promise<TOutput>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=anthropic-retry-wrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic-retry-wrapper.d.ts","sourceRoot":"","sources":["../../../src/llm/anthropic-retry-wrapper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,SAAS,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO;IACnD,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAClE;AAaD;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACD,iBAAiB,EAAE,MAAM,GAAG,IAAI;gBAAxD,OAAO,EAAE,MAAM,EAAS,iBAAiB,EAAE,MAAM,GAAG,IAAI;CAIvE;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,OAAO,EACjD,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,KAAK,EAAE,MAAM,EACb,UAAU,GAAE,MAAU,GACvB,OAAO,CAAC,OAAO,CAAC,CAsDlB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChatAnthropic } from '@langchain/anthropic';
|
|
2
|
+
export interface AnthropicConfig {
|
|
3
|
+
modelName: string;
|
|
4
|
+
temperature: number;
|
|
5
|
+
timeoutMs?: number;
|
|
6
|
+
maxRetries?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function createAnthropicProvider(config: AnthropicConfig): ChatAnthropic;
|
|
9
|
+
//# sourceMappingURL=anthropic.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic.provider.d.ts","sourceRoot":"","sources":["../../../src/llm/anthropic.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,iBAS9D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Document } from '@langchain/core/documents';
|
|
2
|
+
import type { ConfluencePage } from '../integrations/confluence/confluence.types.js';
|
|
3
|
+
export interface ConfluenceDocumentMetadata {
|
|
4
|
+
source: 'confluence';
|
|
5
|
+
page_id: string;
|
|
6
|
+
page_title: string;
|
|
7
|
+
page_url: string;
|
|
8
|
+
space_key: string;
|
|
9
|
+
section_title?: string;
|
|
10
|
+
section_index: number;
|
|
11
|
+
chunk_type: 'section' | 'full_page';
|
|
12
|
+
labels: string[];
|
|
13
|
+
content_type?: string;
|
|
14
|
+
customer?: string;
|
|
15
|
+
category?: string;
|
|
16
|
+
keywords: string[];
|
|
17
|
+
last_updated: string;
|
|
18
|
+
page_version: number;
|
|
19
|
+
indexed_at: string;
|
|
20
|
+
last_updated_by: string;
|
|
21
|
+
page_creator: string;
|
|
22
|
+
word_count: number;
|
|
23
|
+
has_code_blocks: boolean;
|
|
24
|
+
has_tables: boolean;
|
|
25
|
+
has_links: boolean;
|
|
26
|
+
parent_page_id?: string;
|
|
27
|
+
document_id: string;
|
|
28
|
+
document_type: 'confluence_page';
|
|
29
|
+
}
|
|
30
|
+
export interface SectionChunk {
|
|
31
|
+
sectionTitle?: string;
|
|
32
|
+
content: string;
|
|
33
|
+
sectionIndex: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Split markdown content by H2 headings (## Section)
|
|
37
|
+
* Each H2 section becomes one chunk
|
|
38
|
+
*/
|
|
39
|
+
export declare function splitMarkdownBySections(markdown: string): SectionChunk[];
|
|
40
|
+
/**
|
|
41
|
+
* Process a Confluence page into section-based chunks
|
|
42
|
+
* One chunk per H2 section
|
|
43
|
+
*/
|
|
44
|
+
export declare function processConfluencePage(page: ConfluencePage, spaceKey: string, baseUrl: string, labels?: string[]): Document<ConfluenceDocumentMetadata>[];
|
|
45
|
+
/**
|
|
46
|
+
* Process multiple Confluence pages in batch
|
|
47
|
+
*/
|
|
48
|
+
export declare function processConfluencePages(pages: ConfluencePage[], spaceKey: string, baseUrl: string, labelsMap?: Map<string, string[]>): Document<ConfluenceDocumentMetadata>[];
|
|
49
|
+
//# sourceMappingURL=confluence-document.processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confluence-document.processor.d.ts","sourceRoot":"","sources":["../../../src/processors/confluence-document.processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAGrF,MAAM,WAAW,0BAA0B;IAEvC,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAGlB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,SAAS,GAAG,WAAW,CAAC;IAGpC,MAAM,EAAE,MAAM,EAAE,CAAC;IAGjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IAGnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IAGnB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IAGrB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IAGnB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,iBAAiB,CAAC;CACpC;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,EAAE,CAiCxE;AA0DD;;;GAGG;AACH,wBAAgB,qBAAqB,CACjC,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,MAAM,EAAO,GACtB,QAAQ,CAAC,0BAA0B,CAAC,EAAE,CA0FxC;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAClC,KAAK,EAAE,cAAc,EAAE,EACvB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAa,GAC7C,QAAQ,CAAC,0BAA0B,CAAC,EAAE,CAoBxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confluence-html-parser.d.ts","sourceRoot":"","sources":["../../../src/processors/confluence-html-parser.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqBxD"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { VectorStoreProvider } from '../vectorstore/vectorstore.interface.js';
|
|
3
|
+
/**
|
|
4
|
+
* Create Confluence agent tool for searching the knowledge base
|
|
5
|
+
* Supports semantic search with optional metadata filtering
|
|
6
|
+
*/
|
|
7
|
+
export declare function createConfluenceAgentTool(vectorStore: VectorStoreProvider): import("@langchain/core/tools").DynamicStructuredTool<z.ZodObject<{
|
|
8
|
+
query: z.ZodString;
|
|
9
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
11
|
+
content_type: z.ZodOptional<z.ZodEnum<["project-info", "faq", "guide", "decision", "template"]>>;
|
|
12
|
+
customer: z.ZodOptional<z.ZodString>;
|
|
13
|
+
category: z.ZodOptional<z.ZodEnum<["active", "maintenance", "legacy", "archived"]>>;
|
|
14
|
+
space_key: z.ZodOptional<z.ZodString>;
|
|
15
|
+
chunk_type: z.ZodOptional<z.ZodEnum<["section", "full_page"]>>;
|
|
16
|
+
has_code_blocks: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
has_tables: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
has_links: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
min_word_count: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
last_updated_by: z.ZodOptional<z.ZodString>;
|
|
21
|
+
page_creator: z.ZodOptional<z.ZodString>;
|
|
22
|
+
parent_page_id: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
keywords?: string[] | undefined;
|
|
25
|
+
content_type?: "template" | "project-info" | "faq" | "guide" | "decision" | undefined;
|
|
26
|
+
customer?: string | undefined;
|
|
27
|
+
category?: "archived" | "active" | "maintenance" | "legacy" | undefined;
|
|
28
|
+
space_key?: string | undefined;
|
|
29
|
+
chunk_type?: "section" | "full_page" | undefined;
|
|
30
|
+
has_code_blocks?: boolean | undefined;
|
|
31
|
+
has_tables?: boolean | undefined;
|
|
32
|
+
has_links?: boolean | undefined;
|
|
33
|
+
min_word_count?: number | undefined;
|
|
34
|
+
last_updated_by?: string | undefined;
|
|
35
|
+
page_creator?: string | undefined;
|
|
36
|
+
parent_page_id?: string | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
keywords?: string[] | undefined;
|
|
39
|
+
content_type?: "template" | "project-info" | "faq" | "guide" | "decision" | undefined;
|
|
40
|
+
customer?: string | undefined;
|
|
41
|
+
category?: "archived" | "active" | "maintenance" | "legacy" | undefined;
|
|
42
|
+
space_key?: string | undefined;
|
|
43
|
+
chunk_type?: "section" | "full_page" | undefined;
|
|
44
|
+
has_code_blocks?: boolean | undefined;
|
|
45
|
+
has_tables?: boolean | undefined;
|
|
46
|
+
has_links?: boolean | undefined;
|
|
47
|
+
min_word_count?: number | undefined;
|
|
48
|
+
last_updated_by?: string | undefined;
|
|
49
|
+
page_creator?: string | undefined;
|
|
50
|
+
parent_page_id?: string | undefined;
|
|
51
|
+
}>>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
query: string;
|
|
54
|
+
filters?: {
|
|
55
|
+
keywords?: string[] | undefined;
|
|
56
|
+
content_type?: "template" | "project-info" | "faq" | "guide" | "decision" | undefined;
|
|
57
|
+
customer?: string | undefined;
|
|
58
|
+
category?: "archived" | "active" | "maintenance" | "legacy" | undefined;
|
|
59
|
+
space_key?: string | undefined;
|
|
60
|
+
chunk_type?: "section" | "full_page" | undefined;
|
|
61
|
+
has_code_blocks?: boolean | undefined;
|
|
62
|
+
has_tables?: boolean | undefined;
|
|
63
|
+
has_links?: boolean | undefined;
|
|
64
|
+
min_word_count?: number | undefined;
|
|
65
|
+
last_updated_by?: string | undefined;
|
|
66
|
+
page_creator?: string | undefined;
|
|
67
|
+
parent_page_id?: string | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
query: string;
|
|
71
|
+
filters?: {
|
|
72
|
+
keywords?: string[] | undefined;
|
|
73
|
+
content_type?: "template" | "project-info" | "faq" | "guide" | "decision" | undefined;
|
|
74
|
+
customer?: string | undefined;
|
|
75
|
+
category?: "archived" | "active" | "maintenance" | "legacy" | undefined;
|
|
76
|
+
space_key?: string | undefined;
|
|
77
|
+
chunk_type?: "section" | "full_page" | undefined;
|
|
78
|
+
has_code_blocks?: boolean | undefined;
|
|
79
|
+
has_tables?: boolean | undefined;
|
|
80
|
+
has_links?: boolean | undefined;
|
|
81
|
+
min_word_count?: number | undefined;
|
|
82
|
+
last_updated_by?: string | undefined;
|
|
83
|
+
page_creator?: string | undefined;
|
|
84
|
+
parent_page_id?: string | undefined;
|
|
85
|
+
} | undefined;
|
|
86
|
+
}>, {
|
|
87
|
+
query: string;
|
|
88
|
+
filters?: {
|
|
89
|
+
keywords?: string[] | undefined;
|
|
90
|
+
content_type?: "template" | "project-info" | "faq" | "guide" | "decision" | undefined;
|
|
91
|
+
customer?: string | undefined;
|
|
92
|
+
category?: "archived" | "active" | "maintenance" | "legacy" | undefined;
|
|
93
|
+
space_key?: string | undefined;
|
|
94
|
+
chunk_type?: "section" | "full_page" | undefined;
|
|
95
|
+
has_code_blocks?: boolean | undefined;
|
|
96
|
+
has_tables?: boolean | undefined;
|
|
97
|
+
has_links?: boolean | undefined;
|
|
98
|
+
min_word_count?: number | undefined;
|
|
99
|
+
last_updated_by?: string | undefined;
|
|
100
|
+
page_creator?: string | undefined;
|
|
101
|
+
parent_page_id?: string | undefined;
|
|
102
|
+
} | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
query: string;
|
|
105
|
+
filters?: {
|
|
106
|
+
keywords?: string[] | undefined;
|
|
107
|
+
content_type?: "template" | "project-info" | "faq" | "guide" | "decision" | undefined;
|
|
108
|
+
customer?: string | undefined;
|
|
109
|
+
category?: "archived" | "active" | "maintenance" | "legacy" | undefined;
|
|
110
|
+
space_key?: string | undefined;
|
|
111
|
+
chunk_type?: "section" | "full_page" | undefined;
|
|
112
|
+
has_code_blocks?: boolean | undefined;
|
|
113
|
+
has_tables?: boolean | undefined;
|
|
114
|
+
has_links?: boolean | undefined;
|
|
115
|
+
min_word_count?: number | undefined;
|
|
116
|
+
last_updated_by?: string | undefined;
|
|
117
|
+
page_creator?: string | undefined;
|
|
118
|
+
parent_page_id?: string | undefined;
|
|
119
|
+
} | undefined;
|
|
120
|
+
}, string, unknown, "confluence_agent">;
|
|
121
|
+
//# sourceMappingURL=confluence-search.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confluence-search.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/confluence-search.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAGnF;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAoKzE"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare function createGetCurrentDateTool(): import("@langchain/core/tools").DynamicStructuredTool<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, {}, {}, string, unknown, "get_current_date">;
|
|
3
|
+
//# sourceMappingURL=get-current-date.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-current-date.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/get-current-date.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wBAAgB,wBAAwB,uJAqBvC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Document } from '@langchain/core/documents';
|
|
2
|
+
import type { EmbeddingsProvider } from '../embeddings/embeddings.interface.js';
|
|
3
|
+
import type { VectorStoreProvider } from './vectorstore.interface.js';
|
|
4
|
+
export type { VectorStoreProvider, MetadataFilter, DocumentWithScore } from './vectorstore.interface.js';
|
|
5
|
+
export interface PostgresConfig {
|
|
6
|
+
host: string;
|
|
7
|
+
port: number;
|
|
8
|
+
user: string;
|
|
9
|
+
password: string;
|
|
10
|
+
database: string;
|
|
11
|
+
tableName: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Test PostgreSQL database connection
|
|
15
|
+
* @throws Error if connection fails
|
|
16
|
+
*/
|
|
17
|
+
export declare function testPostgresConnection(config: PostgresConfig): Promise<void>;
|
|
18
|
+
export declare function createPostgresVectorStore(embeddings: EmbeddingsProvider, documents: Document[], config: PostgresConfig): Promise<VectorStoreProvider>;
|
|
19
|
+
//# sourceMappingURL=postgres.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres.provider.d.ts","sourceRoot":"","sources":["../../../src/vectorstore/postgres.provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAqC,MAAM,4BAA4B,CAAC;AACzG,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEzG,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAclF;AAED,wBAAsB,yBAAyB,CAC3C,UAAU,EAAE,kBAAkB,EAC9B,SAAS,EAAE,QAAQ,EAAE,EACrB,MAAM,EAAE,cAAc,GACvB,OAAO,CAAC,mBAAmB,CAAC,CAoF9B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Document } from '@langchain/core/documents';
|
|
2
|
+
export type MetadataFilter = Record<string, unknown> | ((doc: Document) => boolean);
|
|
3
|
+
export interface DocumentWithScore {
|
|
4
|
+
document: Document;
|
|
5
|
+
score: number;
|
|
6
|
+
}
|
|
7
|
+
export interface VectorStoreProvider {
|
|
8
|
+
addDocuments(documents: Document[]): Promise<void>;
|
|
9
|
+
similaritySearch(query: string, k: number, filter?: MetadataFilter): Promise<Document[]>;
|
|
10
|
+
similaritySearchWithScore(query: string, k: number, filter?: MetadataFilter): Promise<DocumentWithScore[]>;
|
|
11
|
+
cleanup?(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=vectorstore.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vectorstore.interface.d.ts","sourceRoot":"","sources":["../../../src/vectorstore/vectorstore.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC,CAAC;AAEpF,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAChC,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzF,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAC3G,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B"}
|
package/package.json
CHANGED
|
@@ -1,21 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubblecommerce/overmind-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared infrastructure package for the Overmind AI agent system",
|
|
6
6
|
"main": "./dist/src/index.js",
|
|
7
|
+
"types": "./dist/src/index.d.ts",
|
|
7
8
|
"exports": {
|
|
8
|
-
"./config":
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"./
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
"./config": {
|
|
10
|
+
"types": "./dist/src/config/app.config.d.ts",
|
|
11
|
+
"default": "./dist/src/config/app.config.js"
|
|
12
|
+
},
|
|
13
|
+
"./integrations/confluence": {
|
|
14
|
+
"types": "./dist/src/integrations/confluence/confluence.client.d.ts",
|
|
15
|
+
"default": "./dist/src/integrations/confluence/confluence.client.js"
|
|
16
|
+
},
|
|
17
|
+
"./integrations/jira": {
|
|
18
|
+
"types": "./dist/src/integrations/jira/jira.client.d.ts",
|
|
19
|
+
"default": "./dist/src/integrations/jira/jira.client.js"
|
|
20
|
+
},
|
|
21
|
+
"./integrations/gitlab": {
|
|
22
|
+
"types": "./dist/src/integrations/gitlab/gitlab.client.d.ts",
|
|
23
|
+
"default": "./dist/src/integrations/gitlab/gitlab.client.js"
|
|
24
|
+
},
|
|
25
|
+
"./vectorstore": {
|
|
26
|
+
"types": "./dist/src/vectorstore/postgres.provider.d.ts",
|
|
27
|
+
"default": "./dist/src/vectorstore/postgres.provider.js"
|
|
28
|
+
},
|
|
29
|
+
"./embeddings": {
|
|
30
|
+
"types": "./dist/src/embeddings/transformers.provider.d.ts",
|
|
31
|
+
"default": "./dist/src/embeddings/transformers.provider.js"
|
|
32
|
+
},
|
|
33
|
+
"./llm": {
|
|
34
|
+
"types": "./dist/src/llm/anthropic.provider.d.ts",
|
|
35
|
+
"default": "./dist/src/llm/anthropic.provider.js"
|
|
36
|
+
},
|
|
37
|
+
"./llm/retry": {
|
|
38
|
+
"types": "./dist/src/llm/anthropic-retry-wrapper.d.ts",
|
|
39
|
+
"default": "./dist/src/llm/anthropic-retry-wrapper.js"
|
|
40
|
+
},
|
|
41
|
+
"./processors": {
|
|
42
|
+
"types": "./dist/src/processors/confluence-document.processor.d.ts",
|
|
43
|
+
"default": "./dist/src/processors/confluence-document.processor.js"
|
|
44
|
+
},
|
|
45
|
+
"./tools/confluence-search": {
|
|
46
|
+
"types": "./dist/src/tools/confluence-search.tool.d.ts",
|
|
47
|
+
"default": "./dist/src/tools/confluence-search.tool.js"
|
|
48
|
+
},
|
|
49
|
+
"./tools/get-current-date": {
|
|
50
|
+
"types": "./dist/src/tools/get-current-date.tool.d.ts",
|
|
51
|
+
"default": "./dist/src/tools/get-current-date.tool.js"
|
|
52
|
+
}
|
|
19
53
|
},
|
|
20
54
|
"files": [
|
|
21
55
|
"dist/src"
|
|
@@ -35,8 +69,11 @@
|
|
|
35
69
|
"scripts": {
|
|
36
70
|
"build": "tsc",
|
|
37
71
|
"prepack": "npm run build",
|
|
72
|
+
"typecheck": "tsc --noEmit",
|
|
38
73
|
"lint": "eslint .",
|
|
39
74
|
"lint:fix": "eslint . --fix",
|
|
75
|
+
"check": "npm run lint && npm run typecheck",
|
|
76
|
+
"prepare": "husky",
|
|
40
77
|
"sync:confluence": "tsx scripts/bulk-sync-confluence.ts",
|
|
41
78
|
"sync:confluence:reset": "rm -f .confluence-sync-state.json && tsx scripts/bulk-sync-confluence.ts"
|
|
42
79
|
},
|
|
@@ -46,8 +83,13 @@
|
|
|
46
83
|
"@types/pg": "^8.15.5",
|
|
47
84
|
"@types/turndown": "^5.0.5",
|
|
48
85
|
"eslint": "^9.36.0",
|
|
86
|
+
"husky": "^9.0.0",
|
|
87
|
+
"lint-staged": "^15.0.0",
|
|
49
88
|
"tsx": "^4.20.6",
|
|
50
89
|
"typescript": "^5.9.3",
|
|
51
90
|
"typescript-eslint": "^8.45.0"
|
|
91
|
+
},
|
|
92
|
+
"lint-staged": {
|
|
93
|
+
"*.ts": "eslint --fix"
|
|
52
94
|
}
|
|
53
95
|
}
|