@hasna/brains 0.0.6 → 0.0.8

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 (43) hide show
  1. package/README.md +190 -0
  2. package/dist/cli/index.js +1172 -809
  3. package/dist/db/index.d.ts.map +1 -1
  4. package/dist/index.js +4294 -142
  5. package/dist/lib/config.d.ts +11 -0
  6. package/dist/lib/config.d.ts.map +1 -0
  7. package/dist/lib/gatherers/assistants.d.ts +3 -0
  8. package/dist/lib/gatherers/assistants.d.ts.map +1 -0
  9. package/dist/lib/gatherers/economy.d.ts +3 -0
  10. package/dist/lib/gatherers/economy.d.ts.map +1 -0
  11. package/dist/lib/gatherers/index.d.ts +3 -0
  12. package/dist/lib/gatherers/index.d.ts.map +1 -1
  13. package/dist/lib/gatherers/protocol.d.ts +29 -0
  14. package/dist/lib/gatherers/protocol.d.ts.map +1 -0
  15. package/dist/lib/gatherers/recordings.d.ts +3 -0
  16. package/dist/lib/gatherers/recordings.d.ts.map +1 -0
  17. package/dist/lib/gatherers/registry.d.ts +7 -0
  18. package/dist/lib/gatherers/registry.d.ts.map +1 -0
  19. package/dist/lib/gatherers/researcher.d.ts +3 -0
  20. package/dist/lib/gatherers/researcher.d.ts.map +1 -0
  21. package/dist/lib/gatherers/styles.d.ts +3 -0
  22. package/dist/lib/gatherers/styles.d.ts.map +1 -0
  23. package/dist/lib/gatherers/tickets.d.ts +3 -0
  24. package/dist/lib/gatherers/tickets.d.ts.map +1 -0
  25. package/dist/lib/index.d.ts +3 -0
  26. package/dist/lib/index.d.ts.map +1 -1
  27. package/dist/lib/providers/openai.d.ts +2 -0
  28. package/dist/lib/providers/openai.d.ts.map +1 -1
  29. package/dist/lib/providers/thinker-labs.d.ts +1 -0
  30. package/dist/lib/providers/thinker-labs.d.ts.map +1 -1
  31. package/dist/lib/retry.d.ts +7 -0
  32. package/dist/lib/retry.d.ts.map +1 -0
  33. package/dist/lib/schemas.d.ts +87 -0
  34. package/dist/lib/schemas.d.ts.map +1 -0
  35. package/dist/mcp/index.d.ts.map +1 -1
  36. package/dist/mcp/index.js +4585 -196
  37. package/dist/server/index.d.ts +1 -1
  38. package/dist/server/index.d.ts.map +1 -1
  39. package/dist/server/index.js +4638 -9
  40. package/drizzle/0000_foamy_daimon_hellstrom.sql +36 -0
  41. package/drizzle/meta/0000_snapshot.json +259 -0
  42. package/drizzle/meta/_journal.json +13 -0
  43. package/package.json +6 -2
@@ -0,0 +1,11 @@
1
+ export declare const CONFIG_KEYS: readonly ["OPENAI_API_KEY", "THINKER_LABS_API_KEY", "THINKER_LABS_BASE_URL"];
2
+ export type ConfigKey = (typeof CONFIG_KEYS)[number];
3
+ export declare function getConfigValue(key: ConfigKey): string | undefined;
4
+ export declare function setConfigValue(key: ConfigKey, value: string): void;
5
+ export declare function listConfig(): Array<{
6
+ key: ConfigKey;
7
+ value: string;
8
+ source: "env" | "file" | "unset";
9
+ }>;
10
+ export declare function deleteConfigValue(key: ConfigKey): void;
11
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW,8EAA+E,CAAC;AACxG,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAkBrD,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAIjE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAIlE;AAED,wBAAgB,UAAU,IAAI,KAAK,CAAC;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC,CAOvG;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAItD"}
@@ -0,0 +1,3 @@
1
+ import type { GatherResult, GathererOptions } from "./types.js";
2
+ export declare function gatherFromAssistants(options?: GathererOptions): Promise<GatherResult>;
3
+ //# sourceMappingURL=assistants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistants.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/assistants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAC;AAIjF,wBAAsB,oBAAoB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CAwC/F"}
@@ -0,0 +1,3 @@
1
+ import type { GatherResult, GathererOptions } from "./types.js";
2
+ export declare function gatherFromEconomy(options?: GathererOptions): Promise<GatherResult>;
3
+ //# sourceMappingURL=economy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"economy.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/economy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAC;AAIjF,wBAAsB,iBAAiB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CAiD5F"}
@@ -4,10 +4,13 @@ import { gatherFromConversations } from "./conversations.js";
4
4
  import { gatherFromSessions } from "./sessions.js";
5
5
  import type { GatherResult, GathererOptions } from "./types.js";
6
6
  export * from "./types.js";
7
+ export * from "./protocol.js";
8
+ export * from "./registry.js";
7
9
  export { gatherFromTodos, gatherFromMementos, gatherFromConversations, gatherFromSessions };
8
10
  export declare function gatherAll(sources: string[], options?: GathererOptions): Promise<GatherResult[]>;
9
11
  export declare function mergeAndWriteJSONL(results: GatherResult[], outputPath?: string): Promise<{
10
12
  path: string;
11
13
  totalExamples: number;
14
+ duplicatesRemoved: number;
12
15
  }>;
13
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
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;AAGjF,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,CAAC;AAE5F,wBAAsB,SAAS,CAC7B,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,YAAY,EAAE,CAAC,CAezB;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,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,CAAC,CA0B7E"}
@@ -0,0 +1,29 @@
1
+ import type { GathererOptions, GatherResult } from "./types.js";
2
+ /**
3
+ * A function that gathers training examples from a data source.
4
+ * Implemented by each open-* repo and exported from their SDK.
5
+ *
6
+ * @example
7
+ * // In open-styles:
8
+ * export const gatherTrainingData: GatherTrainingDataFn = async (options) => { ... }
9
+ *
10
+ * // In open-brains gatherer registry:
11
+ * import { gatherTrainingData } from "@hasnaxyz/styles";
12
+ * registerGatherer("styles", gatherTrainingData);
13
+ */
14
+ export type GatherTrainingDataFn = (options?: GathererOptions) => Promise<GatherResult>;
15
+ /**
16
+ * A named, registered training data provider.
17
+ * Used by the gatherer registry to map source names to gatherer functions.
18
+ */
19
+ export interface TrainingDataProvider {
20
+ /** Source name used in `brains data gather --source <name>` */
21
+ name: string;
22
+ /** The gather function — imported from the repo's SDK */
23
+ gather: GatherTrainingDataFn;
24
+ /** Human-readable description shown in `brains data gather --list` */
25
+ description: string;
26
+ /** Optional: package name of the SDK this gatherer comes from */
27
+ package?: string;
28
+ }
29
+ //# sourceMappingURL=protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/protocol.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEhE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,CAAC,EAAE,eAAe,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;AAExF;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,MAAM,EAAE,oBAAoB,CAAC;IAC7B,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,3 @@
1
+ import type { GatherResult, GathererOptions } from "./types.js";
2
+ export declare function gatherFromRecordings(options?: GathererOptions): Promise<GatherResult>;
3
+ //# sourceMappingURL=recordings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordings.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/recordings.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAC;AAIjF,wBAAsB,oBAAoB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CA8C/F"}
@@ -0,0 +1,7 @@
1
+ import type { GatherTrainingDataFn, TrainingDataProvider } from "./protocol.js";
2
+ export declare function registerGatherer(provider: TrainingDataProvider): void;
3
+ export declare function getRegisteredSources(): string[];
4
+ export declare function getGatherer(name: string): GatherTrainingDataFn | undefined;
5
+ export declare function getProvider(name: string): TrainingDataProvider | undefined;
6
+ export declare function getAllProviders(): TrainingDataProvider[];
7
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/registry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAchF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAErE;AAED,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAE1E;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAE1E;AAED,wBAAgB,eAAe,IAAI,oBAAoB,EAAE,CAExD"}
@@ -0,0 +1,3 @@
1
+ import type { GatherResult, GathererOptions } from "./types.js";
2
+ export declare function gatherFromResearcher(options?: GathererOptions): Promise<GatherResult>;
3
+ //# sourceMappingURL=researcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"researcher.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/researcher.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAC;AAIjF,wBAAsB,oBAAoB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CAgD/F"}
@@ -0,0 +1,3 @@
1
+ import type { GatherResult, GathererOptions } from "./types.js";
2
+ export declare function gatherFromStyles(options?: GathererOptions): Promise<GatherResult>;
3
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/styles.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAC;AAIjF,wBAAsB,gBAAgB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CA2D3F"}
@@ -0,0 +1,3 @@
1
+ import type { GatherResult, GathererOptions } from "./types.js";
2
+ export declare function gatherFromTickets(options?: GathererOptions): Promise<GatherResult>;
3
+ //# sourceMappingURL=tickets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tickets.d.ts","sourceRoot":"","sources":["../../../src/lib/gatherers/tickets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAmB,MAAM,YAAY,CAAC;AAIjF,wBAAsB,iBAAiB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CAkC5F"}
@@ -1,3 +1,6 @@
1
1
  export * from "./providers/index.js";
2
2
  export * from "./package-metadata.js";
3
+ export * from "./schemas.js";
4
+ export * from "./config.js";
5
+ export * from "./retry.js";
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -9,6 +9,7 @@ export declare function getFineTuneStatus(jobId: string): Promise<{
9
9
  jobId: string;
10
10
  status: string;
11
11
  fineTunedModel?: string;
12
+ baseModel?: string;
12
13
  error?: string;
13
14
  }>;
14
15
  export declare function listFineTunedModels(): Promise<Array<{
@@ -30,6 +31,7 @@ export declare class OpenAIProvider {
30
31
  jobId: string;
31
32
  status: string;
32
33
  fineTunedModel?: string;
34
+ baseModel?: string;
33
35
  error?: string;
34
36
  }>;
35
37
  listFineTunedModels(): Promise<{
@@ -1 +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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?: string;
39
40
  error?: string;
40
41
  }>;
41
42
  listFineTunedModels(): Promise<Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"thinker-labs.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/thinker-labs.ts"],"names":[],"mappings":"AA0CA,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAKzF;AAED,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAO5C;AAED,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAWD;AAED,wBAAsB,UAAU,IAAI,OAAO,CACzC,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAC1F,CAWA;AAED,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5D;AAED,qBAAa,mBAAmB;IAC9B,kBAAkB,4BAAsB;IACxC,aAAa,uBAAiB;IAC9B,SAAS,mBAAa;IACtB,UAAU,oBAAc;IACxB,SAAS,mBAAa;IAGhB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAIjE,iBAAiB,CAAC,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,7 @@
1
+ export interface RetryOptions {
2
+ maxAttempts?: number;
3
+ baseDelayMs?: number;
4
+ onRetry?: (attempt: number, delayMs: number, error: Error) => void;
5
+ }
6
+ export declare function withRetry<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<T>;
7
+ //# sourceMappingURL=retry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../src/lib/retry.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACpE;AA0BD,wBAAsB,SAAS,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,CAAC,CAAC,CAuBZ"}
@@ -0,0 +1,87 @@
1
+ import { z } from "zod";
2
+ export declare const ProviderSchema: z.ZodEnum<["openai", "thinker-labs"]>;
3
+ export declare const FinetuneStartSchema: z.ZodObject<{
4
+ provider: z.ZodEnum<["openai", "thinker-labs"]>;
5
+ baseModel: z.ZodString;
6
+ dataset: z.ZodOptional<z.ZodString>;
7
+ name: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ baseModel: string;
10
+ name: string;
11
+ provider: "openai" | "thinker-labs";
12
+ dataset?: string | undefined;
13
+ }, {
14
+ baseModel: string;
15
+ name: string;
16
+ provider: "openai" | "thinker-labs";
17
+ dataset?: string | undefined;
18
+ }>;
19
+ export declare const GatherOptionsSchema: z.ZodObject<{
20
+ source: z.ZodDefault<z.ZodEnum<["todos", "mementos", "conversations", "sessions", "all"]>>;
21
+ output: z.ZodOptional<z.ZodString>;
22
+ limit: z.ZodDefault<z.ZodNumber>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ source: "todos" | "mementos" | "conversations" | "sessions" | "all";
25
+ limit: number;
26
+ output?: string | undefined;
27
+ }, {
28
+ source?: "todos" | "mementos" | "conversations" | "sessions" | "all" | undefined;
29
+ limit?: number | undefined;
30
+ output?: string | undefined;
31
+ }>;
32
+ export declare const ModelUpdateSchema: z.ZodObject<{
33
+ displayName: z.ZodOptional<z.ZodString>;
34
+ description: z.ZodOptional<z.ZodString>;
35
+ collection: z.ZodOptional<z.ZodString>;
36
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ displayName?: string | undefined;
39
+ description?: string | undefined;
40
+ collection?: string | undefined;
41
+ tags?: string[] | undefined;
42
+ }, {
43
+ displayName?: string | undefined;
44
+ description?: string | undefined;
45
+ collection?: string | undefined;
46
+ tags?: string[] | undefined;
47
+ }>;
48
+ export declare const McpGatherSchema: z.ZodObject<{
49
+ sources: z.ZodArray<z.ZodEnum<["todos", "mementos", "conversations", "sessions"]>, "many">;
50
+ limit: z.ZodOptional<z.ZodNumber>;
51
+ output_dir: z.ZodOptional<z.ZodString>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ sources: ("todos" | "mementos" | "conversations" | "sessions")[];
54
+ limit?: number | undefined;
55
+ output_dir?: string | undefined;
56
+ }, {
57
+ sources: ("todos" | "mementos" | "conversations" | "sessions")[];
58
+ limit?: number | undefined;
59
+ output_dir?: string | undefined;
60
+ }>;
61
+ export declare const McpFinetuneStartSchema: z.ZodObject<{
62
+ provider: z.ZodEnum<["openai", "thinker-labs"]>;
63
+ base_model: z.ZodString;
64
+ dataset_path: z.ZodOptional<z.ZodString>;
65
+ name: z.ZodOptional<z.ZodString>;
66
+ }, "strip", z.ZodTypeAny, {
67
+ base_model: string;
68
+ provider: "openai" | "thinker-labs";
69
+ name?: string | undefined;
70
+ dataset_path?: string | undefined;
71
+ }, {
72
+ base_model: string;
73
+ provider: "openai" | "thinker-labs";
74
+ name?: string | undefined;
75
+ dataset_path?: string | undefined;
76
+ }>;
77
+ export declare const McpFinetuneStatusSchema: z.ZodObject<{
78
+ job_id: z.ZodString;
79
+ provider: z.ZodEnum<["openai", "thinker-labs"]>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ provider: "openai" | "thinker-labs";
82
+ job_id: string;
83
+ }, {
84
+ provider: "openai" | "thinker-labs";
85
+ job_id: string;
86
+ }>;
87
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/lib/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc,uCAEzB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAK5B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;EAI1B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;EAGlC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AA8BjF,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX,wBAAgB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4X9B;AAED,wBAAsB,cAAc,CAAC,SAAS,uBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI1E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAkCjF,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX,wBAAgB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6Y9B;AAED,wBAAsB,cAAc,CAAC,SAAS,uBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI1E"}