@hasna/brains 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/cli/index.d.ts +3 -0
  2. package/dist/cli/index.d.ts.map +1 -0
  3. package/dist/cli/index.js +12531 -0
  4. package/dist/cli/ui.d.ts +7 -0
  5. package/dist/cli/ui.d.ts.map +1 -0
  6. package/dist/db/index.d.ts +7 -0
  7. package/dist/db/index.d.ts.map +1 -0
  8. package/dist/db/schema.d.ts +428 -0
  9. package/dist/db/schema.d.ts.map +1 -0
  10. package/dist/index.d.ts +4 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +10189 -0
  13. package/dist/lib/gatherers/conversations.d.ts +3 -0
  14. package/dist/lib/gatherers/conversations.d.ts.map +1 -0
  15. package/dist/lib/gatherers/index.d.ts +13 -0
  16. package/dist/lib/gatherers/index.d.ts.map +1 -0
  17. package/dist/lib/gatherers/mementos.d.ts +3 -0
  18. package/dist/lib/gatherers/mementos.d.ts.map +1 -0
  19. package/dist/lib/gatherers/sessions.d.ts +3 -0
  20. package/dist/lib/gatherers/sessions.d.ts.map +1 -0
  21. package/dist/lib/gatherers/todos.d.ts +3 -0
  22. package/dist/lib/gatherers/todos.d.ts.map +1 -0
  23. package/dist/lib/gatherers/types.d.ts +17 -0
  24. package/dist/lib/gatherers/types.d.ts.map +1 -0
  25. package/dist/lib/index.d.ts +2 -0
  26. package/dist/lib/index.d.ts.map +1 -0
  27. package/dist/lib/providers/index.d.ts +5 -0
  28. package/dist/lib/providers/index.d.ts.map +1 -0
  29. package/dist/lib/providers/openai.d.ts +43 -0
  30. package/dist/lib/providers/openai.d.ts.map +1 -0
  31. package/dist/lib/providers/thinker-labs.d.ts +49 -0
  32. package/dist/lib/providers/thinker-labs.d.ts.map +1 -0
  33. package/dist/mcp/index.d.ts +2 -0
  34. package/dist/mcp/index.d.ts.map +1 -0
  35. package/dist/mcp/index.js +10595 -0
  36. package/dist/server/index.d.ts +2 -0
  37. package/dist/server/index.d.ts.map +1 -0
  38. package/dist/server/index.js +14 -0
  39. package/dist/types/index.d.ts +5 -0
  40. package/dist/types/index.d.ts.map +1 -0
  41. package/package.json +78 -0
@@ -0,0 +1,3 @@
1
+ import type { GatherResult, GathererOptions } from './types.js';
2
+ export declare function gatherFromConversations(options?: GathererOptions): Promise<GatherResult>;
3
+ //# sourceMappingURL=conversations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/conversations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAA;AA6ChF,wBAAsB,uBAAuB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CAkDlG"}
@@ -0,0 +1,13 @@
1
+ import { gatherFromTodos } from "./todos.js";
2
+ import { gatherFromMementos } from "./mementos.js";
3
+ import { gatherFromConversations } from "./conversations.js";
4
+ import { gatherFromSessions } from "./sessions.js";
5
+ import type { GatherResult, GathererOptions } from "./types.js";
6
+ export * from "./types.js";
7
+ export { gatherFromTodos, gatherFromMementos, gatherFromConversations, gatherFromSessions };
8
+ export declare function gatherAll(sources: string[], options?: GathererOptions): Promise<GatherResult[]>;
9
+ export declare function mergeAndWriteJSONL(results: GatherResult[], outputPath?: string): Promise<{
10
+ path: string;
11
+ totalExamples: number;
12
+ }>;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAC;AAEjF,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,CAAC;AAK5F,wBAAsB,SAAS,CAC7B,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,YAAY,EAAE,CAAC,CAkBzB;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,YAAY,EAAE,EACvB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAalD"}
@@ -0,0 +1,3 @@
1
+ import type { GatherResult, GathererOptions } from './types.js';
2
+ export declare function gatherFromMementos(options?: GathererOptions): Promise<GatherResult>;
3
+ //# sourceMappingURL=mementos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mementos.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/mementos.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAA;AAqEhF,wBAAsB,kBAAkB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CA4C7F"}
@@ -0,0 +1,3 @@
1
+ import type { GatherResult, GathererOptions } from "./types.js";
2
+ export declare function gatherFromSessions(options?: GathererOptions): Promise<GatherResult>;
3
+ //# sourceMappingURL=sessions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/sessions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAC;AAcjF,wBAAsB,kBAAkB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CAwE7F"}
@@ -0,0 +1,3 @@
1
+ import type { GatherResult, GathererOptions } from './types.js';
2
+ export declare function gatherFromTodos(options?: GathererOptions): Promise<GatherResult>;
3
+ //# sourceMappingURL=todos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todos.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/todos.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAA;AAqEhF,wBAAsB,eAAe,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CA+C1F"}
@@ -0,0 +1,17 @@
1
+ export interface TrainingExample {
2
+ messages: Array<{
3
+ role: 'system' | 'user' | 'assistant';
4
+ content: string;
5
+ }>;
6
+ }
7
+ export interface GatherResult {
8
+ source: string;
9
+ examples: TrainingExample[];
10
+ count: number;
11
+ }
12
+ export interface GathererOptions {
13
+ limit?: number;
14
+ since?: Date;
15
+ outputDir?: string;
16
+ }
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;QACrC,OAAO,EAAE,MAAM,CAAA;KAChB,CAAC,CAAA;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,eAAe,EAAE,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
@@ -0,0 +1,2 @@
1
+ export * from "./providers/index.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./openai.js";
2
+ export * from "./thinker-labs.js";
3
+ export { OpenAIProvider } from "./openai.js";
4
+ export { ThinkerLabsProvider } from "./thinker-labs.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,43 @@
1
+ export declare function uploadTrainingFile(filePath: string): Promise<{
2
+ fileId: string;
3
+ }>;
4
+ export declare function createFineTuneJob(fileId: string, baseModel: string, suffix?: string): Promise<{
5
+ jobId: string;
6
+ status: string;
7
+ }>;
8
+ export declare function getFineTuneStatus(jobId: string): Promise<{
9
+ jobId: string;
10
+ status: string;
11
+ fineTunedModel?: string;
12
+ error?: string;
13
+ }>;
14
+ export declare function listFineTunedModels(): Promise<Array<{
15
+ id: string;
16
+ model: string;
17
+ status: string;
18
+ created: number;
19
+ }>>;
20
+ export declare function cancelFineTuneJob(jobId: string): Promise<void>;
21
+ export declare class OpenAIProvider {
22
+ uploadTrainingFile(filePath: string): Promise<{
23
+ fileId: string;
24
+ }>;
25
+ createFineTuneJob(fileId: string, baseModel: string, suffix?: string): Promise<{
26
+ jobId: string;
27
+ status: string;
28
+ }>;
29
+ getFineTuneStatus(jobId: string): Promise<{
30
+ jobId: string;
31
+ status: string;
32
+ fineTunedModel?: string;
33
+ error?: string;
34
+ }>;
35
+ listFineTunedModels(): Promise<{
36
+ id: string;
37
+ model: string;
38
+ status: string;
39
+ created: number;
40
+ }[]>;
41
+ cancelFineTuneJob(jobId: string): Promise<void>;
42
+ }
43
+ //# sourceMappingURL=openai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/openai.ts"],"names":[],"mappings":"AAWA,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAYtF;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAe5C;AAED,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAUD;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAClD,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CACtE,CAUA;AAED,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGpE;AAED,qBAAa,cAAc;IACnB,kBAAkB,CAAC,QAAQ,EAAE,MAAM;gBAxEmC,MAAM;;IA4E5E,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;eA1DxD,MAAM;gBAAU,MAAM;;IA8DlC,iBAAiB,CAAC,KAAK,EAAE,MAAM;eA5C9B,MAAM;gBACL,MAAM;yBACG,MAAM;gBACf,MAAM;;IA6CR,mBAAmB;YA/Bb,MAAM;eAAS,MAAM;gBAAU,MAAM;iBAAW,MAAM;;IAmC5D,iBAAiB,CAAC,KAAK,EAAE,MAAM;CAGtC"}
@@ -0,0 +1,49 @@
1
+ export declare function uploadTrainingData(filePath: string): Promise<{
2
+ datasetId: string;
3
+ }>;
4
+ export declare function startFineTune(datasetId: string, baseModel: string, name?: string): Promise<{
5
+ jobId: string;
6
+ status: string;
7
+ }>;
8
+ export declare function getStatus(jobId: string): Promise<{
9
+ jobId: string;
10
+ status: string;
11
+ modelId?: string;
12
+ error?: string;
13
+ }>;
14
+ export declare function listModels(): Promise<Array<{
15
+ id: string;
16
+ name: string;
17
+ status: string;
18
+ baseModel: string;
19
+ createdAt: number;
20
+ }>>;
21
+ export declare function cancelJob(jobId: string): Promise<void>;
22
+ export declare class ThinkerLabsProvider {
23
+ uploadTrainingData: typeof uploadTrainingData;
24
+ startFineTune: typeof startFineTune;
25
+ getStatus: typeof getStatus;
26
+ listModels: typeof listModels;
27
+ cancelJob: typeof cancelJob;
28
+ uploadTrainingFile(filePath: string): Promise<{
29
+ fileId: string;
30
+ }>;
31
+ createFineTuneJob(fileId: string, baseModel: string, suffix?: string): Promise<{
32
+ jobId: string;
33
+ status: string;
34
+ }>;
35
+ getFineTuneStatus(jobId: string): Promise<{
36
+ jobId: string;
37
+ status: string;
38
+ fineTunedModel?: string;
39
+ error?: string;
40
+ }>;
41
+ listFineTunedModels(): Promise<Array<{
42
+ id: string;
43
+ model: string;
44
+ status: string;
45
+ created: number;
46
+ }>>;
47
+ cancelFineTuneJob(jobId: string): Promise<void>;
48
+ }
49
+ //# sourceMappingURL=thinker-labs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thinker-labs.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/thinker-labs.ts"],"names":[],"mappings":"AA0CA,wBAA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