chat-agent-toolkit 1.2.33 → 1.2.34

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 (42) hide show
  1. package/dist/research-agent.cjs.js.map +1 -1
  2. package/dist/research-agent.es.js.map +1 -1
  3. package/package.json +1 -1
  4. package/src/config/config-manager.ts +295 -295
  5. package/src/config/config-types.ts +65 -65
  6. package/src/config/environment-variables.ts +16 -16
  7. package/src/config/index.ts +26 -26
  8. package/src/config/language-models-database.ts +1434 -1434
  9. package/src/config/mcp-server-registry.ts +24 -24
  10. package/src/config/model-registry.ts +271 -271
  11. package/src/config/model-tester.ts +211 -211
  12. package/src/config/model-utils.ts +193 -193
  13. package/src/config/provider-ui-config.ts +196 -196
  14. package/src/connectors/open-connector.json +130 -130
  15. package/src/index.ts +26 -26
  16. package/src/memory/ARCHITECTURE.md +302 -302
  17. package/src/memory/README.md +224 -224
  18. package/src/memory/agent-memory-manager.ts +416 -416
  19. package/src/memory/example.ts +343 -343
  20. package/src/memory/index.ts +47 -47
  21. package/src/memory/mastra-integration.ts +604 -604
  22. package/src/memory/storage/drizzle-storage.ts +236 -236
  23. package/src/memory/storage/in-memory-storage.ts +551 -551
  24. package/src/memory/storage/storage-interface.ts +68 -68
  25. package/src/memory/types.ts +125 -125
  26. package/src/models/types.ts +4 -4
  27. package/src/tools/index.ts +13 -13
  28. package/src/tools/open-connector-mastra.ts +270 -270
  29. package/src/tools/open-connector-mcp.ts +170 -170
  30. package/src/tools/qwksearch-api-tools.ts +326 -326
  31. package/src/tools/search/doc-utils.ts +139 -139
  32. package/src/tools/search/document.ts +47 -47
  33. package/src/tools/search/index.ts +14 -14
  34. package/src/tools/search/link-summarizer.ts +112 -112
  35. package/src/tools/search/meta-search-types.ts +62 -62
  36. package/src/tools/search/metaSearchAgent.ts +465 -465
  37. package/src/tools/search/search-handlers.ts +97 -97
  38. package/src/tools/search/suggestionGeneratorAgent.ts +56 -56
  39. package/src/types.d.ts +137 -137
  40. package/src/utils/index.ts +2 -2
  41. package/src/utils/markdown-to-html.ts +53 -53
  42. package/src/utils/outputParser.ts +73 -73
@@ -1,65 +1,65 @@
1
- /**
2
- * @module research/models/types
3
- * @description Shared types for the config system and model registry.
4
- */
5
-
6
- /** A chat model entry as shown in provider model lists. */
7
- export type Model = {
8
- name: string;
9
- key: string;
10
- };
11
-
12
- /** Provider shape consumed by model-selector UI components. */
13
- export type MinimalProvider = {
14
- id: string;
15
- name: string;
16
- chatModels: Model[];
17
- };
18
-
19
- /** Client-side model selection: which provider and model key to use. */
20
- export type ModelWithProvider = {
21
- key?: string;
22
- providerId?: string;
23
- };
24
-
25
- /** A configured model provider (env-based or user-added). */
26
- export type ConfigModelProvider = {
27
- id: string;
28
- name: string;
29
- /** Provider type key, e.g. "openai", "anthropic", "gemini". */
30
- type: string;
31
- /** User-added chat models (defaults come from LANGUAGE_MODELS). */
32
- chatModels: Model[];
33
- /** Provider connection config, e.g. { apiKey, baseURL }. */
34
- config: Record<string, any>;
35
- /** Hash of the config, used as the provider id. */
36
- hash: string;
37
- /** True when the provider was configured from environment variables. */
38
- isEnvBased?: boolean;
39
- };
40
-
41
- export type MCPServerConfig = {
42
- command?: string;
43
- args?: string[];
44
- env?: Record<string, string>;
45
- [key: string]: any;
46
- };
47
-
48
- export type Config = {
49
- version: number;
50
- setupComplete: boolean;
51
- preferences: Record<string, any>;
52
- personalization: Record<string, any>;
53
- modelProviders: ConfigModelProvider[];
54
- mcpServers: MCPServerConfig[];
55
- search: Record<string, any>;
56
- };
57
-
58
- /** UI field/section definitions consumed by the settings screens. */
59
- export type UIConfigSections = {
60
- preferences: any[];
61
- personalization: any[];
62
- modelProviders: any[];
63
- mcpServers: any[];
64
- search: any[];
65
- };
1
+ /**
2
+ * @module research/models/types
3
+ * @description Shared types for the config system and model registry.
4
+ */
5
+
6
+ /** A chat model entry as shown in provider model lists. */
7
+ export type Model = {
8
+ name: string;
9
+ key: string;
10
+ };
11
+
12
+ /** Provider shape consumed by model-selector UI components. */
13
+ export type MinimalProvider = {
14
+ id: string;
15
+ name: string;
16
+ chatModels: Model[];
17
+ };
18
+
19
+ /** Client-side model selection: which provider and model key to use. */
20
+ export type ModelWithProvider = {
21
+ key?: string;
22
+ providerId?: string;
23
+ };
24
+
25
+ /** A configured model provider (env-based or user-added). */
26
+ export type ConfigModelProvider = {
27
+ id: string;
28
+ name: string;
29
+ /** Provider type key, e.g. "openai", "anthropic", "gemini". */
30
+ type: string;
31
+ /** User-added chat models (defaults come from LANGUAGE_MODELS). */
32
+ chatModels: Model[];
33
+ /** Provider connection config, e.g. { apiKey, baseURL }. */
34
+ config: Record<string, any>;
35
+ /** Hash of the config, used as the provider id. */
36
+ hash: string;
37
+ /** True when the provider was configured from environment variables. */
38
+ isEnvBased?: boolean;
39
+ };
40
+
41
+ export type MCPServerConfig = {
42
+ command?: string;
43
+ args?: string[];
44
+ env?: Record<string, string>;
45
+ [key: string]: any;
46
+ };
47
+
48
+ export type Config = {
49
+ version: number;
50
+ setupComplete: boolean;
51
+ preferences: Record<string, any>;
52
+ personalization: Record<string, any>;
53
+ modelProviders: ConfigModelProvider[];
54
+ mcpServers: MCPServerConfig[];
55
+ search: Record<string, any>;
56
+ };
57
+
58
+ /** UI field/section definitions consumed by the settings screens. */
59
+ export type UIConfigSections = {
60
+ preferences: any[];
61
+ personalization: any[];
62
+ modelProviders: any[];
63
+ mcpServers: any[];
64
+ search: any[];
65
+ };
@@ -1,16 +1,16 @@
1
- /**
2
- * Runtime env-var accessor.
3
- * Supports both local development (process.env) and Cloudflare Workers
4
- * (cloudflare:workers virtual module) via dynamic import.
5
- */
6
- export function getEnv(key: string): string | undefined {
7
- // Try Cloudflare Workers context first (production)
8
- try {
9
- // @ts-ignore - cloudflare:workers is a virtual module provided by @cloudflare/vite-plugin
10
- const cfWorkers = require("cloudflare:workers");
11
- return cfWorkers.env?.[key];
12
- } catch {
13
- // Fallback to process.env for local development
14
- return process.env[key];
15
- }
16
- }
1
+ /**
2
+ * Runtime env-var accessor.
3
+ * Supports both local development (process.env) and Cloudflare Workers
4
+ * (cloudflare:workers virtual module) via dynamic import.
5
+ */
6
+ export function getEnv(key: string): string | undefined {
7
+ // Try Cloudflare Workers context first (production)
8
+ try {
9
+ // @ts-ignore - cloudflare:workers is a virtual module provided by @cloudflare/vite-plugin
10
+ const cfWorkers = require("cloudflare:workers");
11
+ return cfWorkers.env?.[key];
12
+ } catch {
13
+ // Fallback to process.env for local development
14
+ return process.env[key];
15
+ }
16
+ }
@@ -1,26 +1,26 @@
1
- /**
2
- * @fileoverview Configuration Management Module
3
- *
4
- * Manages model providers, environment variables, and UI configuration
5
- * for the AI agent toolkit. Provides in-memory config storage with
6
- * support for multiple LLM providers and MCP servers.
7
- *
8
- * @module config
9
- * @author ai-research-agent contributors
10
- */
11
-
12
- export { default as configManager } from "./config-manager";
13
- export { default as ModelRegistry } from "./model-registry";
14
- export { getEnv } from "./environment-variables";
15
- export { LANGUAGE_MODELS } from "./language-models-database";
16
- export { getModelProvidersUIConfigSection } from "./provider-ui-config";
17
- export * from "./model-tester";
18
- export * from "./model-utils";
19
- export type {
20
- Config,
21
- ConfigModelProvider,
22
- MCPServerConfig,
23
- UIConfigSections,
24
- Model,
25
- ModelWithProvider,
26
- } from "./config-types";
1
+ /**
2
+ * @fileoverview Configuration Management Module
3
+ *
4
+ * Manages model providers, environment variables, and UI configuration
5
+ * for the AI agent toolkit. Provides in-memory config storage with
6
+ * support for multiple LLM providers and MCP servers.
7
+ *
8
+ * @module config
9
+ * @author ai-research-agent contributors
10
+ */
11
+
12
+ export { default as configManager } from "./config-manager";
13
+ export { default as ModelRegistry } from "./model-registry";
14
+ export { getEnv } from "./environment-variables";
15
+ export { LANGUAGE_MODELS } from "./language-models-database";
16
+ export { getModelProvidersUIConfigSection } from "./provider-ui-config";
17
+ export * from "./model-tester";
18
+ export * from "./model-utils";
19
+ export type {
20
+ Config,
21
+ ConfigModelProvider,
22
+ MCPServerConfig,
23
+ UIConfigSections,
24
+ Model,
25
+ ModelWithProvider,
26
+ } from "./config-types";