@dexto/core 1.2.5 → 1.2.6
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/agent/schemas.cjs +23 -19
- package/dist/agent/schemas.d.ts +111 -107
- package/dist/agent/schemas.d.ts.map +1 -1
- package/dist/agent/schemas.js +7 -3
- package/dist/memory/index.cjs +2 -0
- package/dist/memory/index.d.ts +1 -1
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +3 -1
- package/dist/memory/schemas.cjs +10 -0
- package/dist/memory/schemas.d.ts +33 -4
- package/dist/memory/schemas.d.ts.map +1 -1
- package/dist/memory/schemas.js +9 -0
- package/dist/prompts/index.cjs +6 -8
- package/dist/prompts/index.d.ts +2 -4
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +4 -6
- package/dist/prompts/prompt-manager.cjs +2 -4
- package/dist/prompts/prompt-manager.d.ts.map +1 -1
- package/dist/prompts/prompt-manager.js +2 -4
- package/dist/prompts/providers/config-prompt-provider.cjs +331 -0
- package/dist/prompts/providers/config-prompt-provider.d.ts +34 -0
- package/dist/prompts/providers/config-prompt-provider.d.ts.map +1 -0
- package/dist/prompts/providers/config-prompt-provider.js +308 -0
- package/dist/prompts/schemas.cjs +42 -23
- package/dist/prompts/schemas.d.ts +121 -12
- package/dist/prompts/schemas.d.ts.map +1 -1
- package/dist/prompts/schemas.js +39 -22
- package/dist/prompts/types.d.ts +1 -1
- package/dist/prompts/types.d.ts.map +1 -1
- package/dist/systemPrompt/in-built-prompts.cjs +0 -5
- package/dist/systemPrompt/in-built-prompts.d.ts +1 -2
- package/dist/systemPrompt/in-built-prompts.d.ts.map +1 -1
- package/dist/systemPrompt/in-built-prompts.js +0 -4
- package/dist/systemPrompt/manager.cjs +24 -19
- package/dist/systemPrompt/manager.d.ts +2 -2
- package/dist/systemPrompt/manager.d.ts.map +1 -1
- package/dist/systemPrompt/manager.js +24 -19
- package/dist/systemPrompt/registry.cjs +1 -2
- package/dist/systemPrompt/registry.d.ts +1 -1
- package/dist/systemPrompt/registry.d.ts.map +1 -1
- package/dist/systemPrompt/registry.js +1 -2
- package/dist/systemPrompt/schemas.cjs +3 -17
- package/dist/systemPrompt/schemas.d.ts +13 -189
- package/dist/systemPrompt/schemas.d.ts.map +1 -1
- package/dist/systemPrompt/schemas.js +3 -17
- package/dist/utils/service-initializer.cjs +1 -0
- package/dist/utils/service-initializer.d.ts.map +1 -1
- package/dist/utils/service-initializer.js +1 -0
- package/package.json +1 -1
- package/dist/prompts/providers/file-prompt-provider.cjs +0 -401
- package/dist/prompts/providers/file-prompt-provider.d.ts +0 -49
- package/dist/prompts/providers/file-prompt-provider.d.ts.map +0 -1
- package/dist/prompts/providers/file-prompt-provider.js +0 -378
- package/dist/prompts/providers/starter-prompt-provider.cjs +0 -172
- package/dist/prompts/providers/starter-prompt-provider.d.ts +0 -47
- package/dist/prompts/providers/starter-prompt-provider.d.ts.map +0 -1
- package/dist/prompts/providers/starter-prompt-provider.js +0 -149
|
@@ -19,16 +19,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var in_built_prompts_exports = {};
|
|
20
20
|
__export(in_built_prompts_exports, {
|
|
21
21
|
getCurrentDateTime: () => getCurrentDateTime,
|
|
22
|
-
getMemorySummary: () => getMemorySummary,
|
|
23
22
|
getResourceData: () => getResourceData
|
|
24
23
|
});
|
|
25
24
|
module.exports = __toCommonJS(in_built_prompts_exports);
|
|
26
25
|
async function getCurrentDateTime(_context) {
|
|
27
26
|
return `<dateTime>Current date and time: ${(/* @__PURE__ */ new Date()).toISOString()}</dateTime>`;
|
|
28
27
|
}
|
|
29
|
-
async function getMemorySummary(_context) {
|
|
30
|
-
return "<memorySummary>Memory summary: [not implemented]</memorySummary>";
|
|
31
|
-
}
|
|
32
28
|
async function getResourceData(context) {
|
|
33
29
|
const resources = await context.mcpManager.listAllResources();
|
|
34
30
|
if (!resources || resources.length === 0) {
|
|
@@ -61,6 +57,5 @@ ${parts.join("\n")}
|
|
|
61
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
62
58
|
0 && (module.exports = {
|
|
63
59
|
getCurrentDateTime,
|
|
64
|
-
getMemorySummary,
|
|
65
60
|
getResourceData
|
|
66
61
|
});
|
|
@@ -10,9 +10,8 @@ import { DynamicContributorContext } from './types.js';
|
|
|
10
10
|
* - Place all dynamic prompt-generating functions in this file.
|
|
11
11
|
* - Also update the `registry.ts` file to register the new function.
|
|
12
12
|
* - Use XML tags to indicate the start and end of the dynamic prompt - they are known to improve performance
|
|
13
|
-
* - Each function should be named clearly to reflect its purpose (e.g., getCurrentDateTime,
|
|
13
|
+
* - Each function should be named clearly to reflect its purpose (e.g., getCurrentDateTime, getResourceData).
|
|
14
14
|
*/
|
|
15
15
|
export declare function getCurrentDateTime(_context: DynamicContributorContext): Promise<string>;
|
|
16
|
-
export declare function getMemorySummary(_context: DynamicContributorContext): Promise<string>;
|
|
17
16
|
export declare function getResourceData(context: DynamicContributorContext): Promise<string>;
|
|
18
17
|
//# sourceMappingURL=in-built-prompts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-built-prompts.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/in-built-prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;;;;GAYG;AAEH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAE7F;
|
|
1
|
+
{"version":3,"file":"in-built-prompts.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/in-built-prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;;;;GAYG;AAEH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAE7F;AAGD,wBAAsB,eAAe,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CA4BzF"}
|
|
@@ -2,9 +2,6 @@ import "../chunk-C6A6W6XS.js";
|
|
|
2
2
|
async function getCurrentDateTime(_context) {
|
|
3
3
|
return `<dateTime>Current date and time: ${(/* @__PURE__ */ new Date()).toISOString()}</dateTime>`;
|
|
4
4
|
}
|
|
5
|
-
async function getMemorySummary(_context) {
|
|
6
|
-
return "<memorySummary>Memory summary: [not implemented]</memorySummary>";
|
|
7
|
-
}
|
|
8
5
|
async function getResourceData(context) {
|
|
9
6
|
const resources = await context.mcpManager.listAllResources();
|
|
10
7
|
if (!resources || resources.length === 0) {
|
|
@@ -36,6 +33,5 @@ ${parts.join("\n")}
|
|
|
36
33
|
}
|
|
37
34
|
export {
|
|
38
35
|
getCurrentDateTime,
|
|
39
|
-
getMemorySummary,
|
|
40
36
|
getResourceData
|
|
41
37
|
};
|
|
@@ -32,13 +32,35 @@ class SystemPromptManager {
|
|
|
32
32
|
memoryManager;
|
|
33
33
|
logger;
|
|
34
34
|
// TODO: move config dir logic somewhere else
|
|
35
|
-
constructor(config, configDir, memoryManager, logger) {
|
|
35
|
+
constructor(config, configDir, memoryManager, memoriesConfig, logger) {
|
|
36
36
|
this.configDir = configDir;
|
|
37
37
|
this.memoryManager = memoryManager;
|
|
38
38
|
this.logger = logger.createChild(import_types.DextoLogComponent.SYSTEM_PROMPT);
|
|
39
39
|
this.logger.debug(`[SystemPromptManager] Initializing with configDir: ${configDir}`);
|
|
40
40
|
const enabledContributors = config.contributors.filter((c) => c.enabled !== false);
|
|
41
|
-
|
|
41
|
+
const contributors = enabledContributors.map(
|
|
42
|
+
(config2) => this.createContributor(config2)
|
|
43
|
+
);
|
|
44
|
+
if (memoriesConfig?.enabled) {
|
|
45
|
+
this.logger.debug(
|
|
46
|
+
`[SystemPromptManager] Creating MemoryContributor with options: ${JSON.stringify(memoriesConfig)}`
|
|
47
|
+
);
|
|
48
|
+
contributors.push(
|
|
49
|
+
new import_contributors.MemoryContributor(
|
|
50
|
+
"memories",
|
|
51
|
+
memoriesConfig.priority,
|
|
52
|
+
this.memoryManager,
|
|
53
|
+
{
|
|
54
|
+
includeTimestamps: memoriesConfig.includeTimestamps,
|
|
55
|
+
includeTags: memoriesConfig.includeTags,
|
|
56
|
+
limit: memoriesConfig.limit,
|
|
57
|
+
pinnedOnly: memoriesConfig.pinnedOnly
|
|
58
|
+
},
|
|
59
|
+
this.logger
|
|
60
|
+
)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
this.contributors = contributors.sort((a, b) => a.priority - b.priority);
|
|
42
64
|
}
|
|
43
65
|
createContributor(config) {
|
|
44
66
|
switch (config.type) {
|
|
@@ -63,23 +85,6 @@ class SystemPromptManager {
|
|
|
63
85
|
this.logger
|
|
64
86
|
);
|
|
65
87
|
}
|
|
66
|
-
case "memory": {
|
|
67
|
-
if (!this.memoryManager) {
|
|
68
|
-
throw import_errors.SystemPromptError.unknownContributorSource(
|
|
69
|
-
"memory (MemoryManager not provided)"
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
this.logger.debug(
|
|
73
|
-
`[SystemPromptManager] Creating MemoryContributor "${config.id}" with options: ${JSON.stringify(config.options)}`
|
|
74
|
-
);
|
|
75
|
-
return new import_contributors.MemoryContributor(
|
|
76
|
-
config.id,
|
|
77
|
-
config.priority,
|
|
78
|
-
this.memoryManager,
|
|
79
|
-
config.options,
|
|
80
|
-
this.logger
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
88
|
default: {
|
|
84
89
|
const _exhaustive = config;
|
|
85
90
|
throw import_errors.SystemPromptError.invalidContributorConfig(_exhaustive);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ValidatedSystemPromptConfig } from './schemas.js';
|
|
2
|
-
import type { MemoryManager } from '../memory/index.js';
|
|
2
|
+
import type { MemoryManager, ValidatedMemoriesConfig } from '../memory/index.js';
|
|
3
3
|
import type { SystemPromptContributor, DynamicContributorContext } from './types.js';
|
|
4
4
|
import type { IDextoLogger } from '../logger/v2/types.js';
|
|
5
5
|
/**
|
|
@@ -11,7 +11,7 @@ export declare class SystemPromptManager {
|
|
|
11
11
|
private configDir;
|
|
12
12
|
private memoryManager;
|
|
13
13
|
private logger;
|
|
14
|
-
constructor(config: ValidatedSystemPromptConfig, configDir: string, memoryManager: MemoryManager, logger: IDextoLogger);
|
|
14
|
+
constructor(config: ValidatedSystemPromptConfig, configDir: string, memoryManager: MemoryManager, memoriesConfig: ValidatedMemoriesConfig | undefined, logger: IDextoLogger);
|
|
15
15
|
private createContributor;
|
|
16
16
|
/**
|
|
17
17
|
* Build the full system prompt by invoking each contributor and concatenating.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAA8B,MAAM,cAAc,CAAC;AAG5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAA8B,MAAM,cAAc,CAAC;AAG5F,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAErF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D;;;GAGG;AACH,qBAAa,mBAAmB;IAC5B,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,MAAM,CAAe;gBAIzB,MAAM,EAAE,2BAA2B,EACnC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,uBAAuB,GAAG,SAAS,EACnD,MAAM,EAAE,YAAY;IAsCxB,OAAO,CAAC,iBAAiB;IAkCzB;;OAEG;IACG,KAAK,CAAC,GAAG,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IAa5D;;OAEG;IACH,eAAe,IAAI,uBAAuB,EAAE;CAG/C"}
|
|
@@ -10,13 +10,35 @@ class SystemPromptManager {
|
|
|
10
10
|
memoryManager;
|
|
11
11
|
logger;
|
|
12
12
|
// TODO: move config dir logic somewhere else
|
|
13
|
-
constructor(config, configDir, memoryManager, logger) {
|
|
13
|
+
constructor(config, configDir, memoryManager, memoriesConfig, logger) {
|
|
14
14
|
this.configDir = configDir;
|
|
15
15
|
this.memoryManager = memoryManager;
|
|
16
16
|
this.logger = logger.createChild(DextoLogComponent.SYSTEM_PROMPT);
|
|
17
17
|
this.logger.debug(`[SystemPromptManager] Initializing with configDir: ${configDir}`);
|
|
18
18
|
const enabledContributors = config.contributors.filter((c) => c.enabled !== false);
|
|
19
|
-
|
|
19
|
+
const contributors = enabledContributors.map(
|
|
20
|
+
(config2) => this.createContributor(config2)
|
|
21
|
+
);
|
|
22
|
+
if (memoriesConfig?.enabled) {
|
|
23
|
+
this.logger.debug(
|
|
24
|
+
`[SystemPromptManager] Creating MemoryContributor with options: ${JSON.stringify(memoriesConfig)}`
|
|
25
|
+
);
|
|
26
|
+
contributors.push(
|
|
27
|
+
new MemoryContributor(
|
|
28
|
+
"memories",
|
|
29
|
+
memoriesConfig.priority,
|
|
30
|
+
this.memoryManager,
|
|
31
|
+
{
|
|
32
|
+
includeTimestamps: memoriesConfig.includeTimestamps,
|
|
33
|
+
includeTags: memoriesConfig.includeTags,
|
|
34
|
+
limit: memoriesConfig.limit,
|
|
35
|
+
pinnedOnly: memoriesConfig.pinnedOnly
|
|
36
|
+
},
|
|
37
|
+
this.logger
|
|
38
|
+
)
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
this.contributors = contributors.sort((a, b) => a.priority - b.priority);
|
|
20
42
|
}
|
|
21
43
|
createContributor(config) {
|
|
22
44
|
switch (config.type) {
|
|
@@ -41,23 +63,6 @@ class SystemPromptManager {
|
|
|
41
63
|
this.logger
|
|
42
64
|
);
|
|
43
65
|
}
|
|
44
|
-
case "memory": {
|
|
45
|
-
if (!this.memoryManager) {
|
|
46
|
-
throw SystemPromptError.unknownContributorSource(
|
|
47
|
-
"memory (MemoryManager not provided)"
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
this.logger.debug(
|
|
51
|
-
`[SystemPromptManager] Creating MemoryContributor "${config.id}" with options: ${JSON.stringify(config.options)}`
|
|
52
|
-
);
|
|
53
|
-
return new MemoryContributor(
|
|
54
|
-
config.id,
|
|
55
|
-
config.priority,
|
|
56
|
-
this.memoryManager,
|
|
57
|
-
config.options,
|
|
58
|
-
this.logger
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
66
|
default: {
|
|
62
67
|
const _exhaustive = config;
|
|
63
68
|
throw SystemPromptError.invalidContributorConfig(_exhaustive);
|
|
@@ -34,10 +34,9 @@ __export(registry_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(registry_exports);
|
|
36
36
|
var handlers = __toESM(require("./in-built-prompts.js"), 1);
|
|
37
|
-
const PROMPT_GENERATOR_SOURCES = ["dateTime", "
|
|
37
|
+
const PROMPT_GENERATOR_SOURCES = ["dateTime", "resources"];
|
|
38
38
|
const PROMPT_GENERATOR_REGISTRY = {
|
|
39
39
|
dateTime: handlers.getCurrentDateTime,
|
|
40
|
-
memorySummary: handlers.getMemorySummary,
|
|
41
40
|
resources: handlers.getResourceData
|
|
42
41
|
};
|
|
43
42
|
function getPromptGenerator(source) {
|
|
@@ -3,7 +3,7 @@ import { DynamicContributorContext } from './types.js';
|
|
|
3
3
|
* This file contains the registry of all the functions that can generate dynamic prompt pieces at runtime.
|
|
4
4
|
*/
|
|
5
5
|
export type DynamicPromptGenerator = (context: DynamicContributorContext) => Promise<string>;
|
|
6
|
-
export declare const PROMPT_GENERATOR_SOURCES: readonly ["dateTime", "
|
|
6
|
+
export declare const PROMPT_GENERATOR_SOURCES: readonly ["dateTime", "resources"];
|
|
7
7
|
export type PromptGeneratorSource = (typeof PROMPT_GENERATOR_SOURCES)[number];
|
|
8
8
|
export declare const PROMPT_GENERATOR_REGISTRY: Record<PromptGeneratorSource, DynamicPromptGenerator>;
|
|
9
9
|
export declare function getPromptGenerator(source: PromptGeneratorSource): DynamicPromptGenerator | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAG7F,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAG7F,eAAO,MAAM,wBAAwB,oCAAqC,CAAC;AAE3E,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAG9E,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,qBAAqB,EAAE,sBAAsB,CAG3F,CAAC;AAGF,wBAAgB,kBAAkB,CAC9B,MAAM,EAAE,qBAAqB,GAC9B,sBAAsB,GAAG,SAAS,CAEpC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import "../chunk-C6A6W6XS.js";
|
|
2
2
|
import * as handlers from "./in-built-prompts.js";
|
|
3
|
-
const PROMPT_GENERATOR_SOURCES = ["dateTime", "
|
|
3
|
+
const PROMPT_GENERATOR_SOURCES = ["dateTime", "resources"];
|
|
4
4
|
const PROMPT_GENERATOR_REGISTRY = {
|
|
5
5
|
dateTime: handlers.getCurrentDateTime,
|
|
6
|
-
memorySummary: handlers.getMemorySummary,
|
|
7
6
|
resources: handlers.getResourceData
|
|
8
7
|
};
|
|
9
8
|
function getPromptGenerator(source) {
|
|
@@ -75,37 +75,23 @@ const FileContributorSchema = BaseContributorSchema.extend({
|
|
|
75
75
|
)
|
|
76
76
|
}).strict().optional().default({})
|
|
77
77
|
}).strict();
|
|
78
|
-
const MemoryContributorSchema = BaseContributorSchema.extend({
|
|
79
|
-
type: import_zod.z.literal("memory"),
|
|
80
|
-
options: import_zod.z.object({
|
|
81
|
-
includeTimestamps: import_zod.z.boolean().optional().default(false).describe("Whether to include timestamps in memory display"),
|
|
82
|
-
includeTags: import_zod.z.boolean().optional().default(true).describe("Whether to include tags in memory display"),
|
|
83
|
-
limit: import_zod.z.number().int().positive().optional().describe("Maximum number of memories to include"),
|
|
84
|
-
pinnedOnly: import_zod.z.boolean().optional().default(false).describe("Only include pinned memories (for hybrid approach)")
|
|
85
|
-
}).strict().optional().default({})
|
|
86
|
-
}).strict();
|
|
87
78
|
const ContributorConfigSchema = import_zod.z.discriminatedUnion(
|
|
88
79
|
"type",
|
|
89
80
|
// The field to discriminate on
|
|
90
|
-
[
|
|
91
|
-
StaticContributorSchema,
|
|
92
|
-
DynamicContributorSchema,
|
|
93
|
-
FileContributorSchema,
|
|
94
|
-
MemoryContributorSchema
|
|
95
|
-
],
|
|
81
|
+
[StaticContributorSchema, DynamicContributorSchema, FileContributorSchema],
|
|
96
82
|
{
|
|
97
83
|
// Optional: Custom error message for invalid discriminator
|
|
98
84
|
errorMap: (issue, ctx) => {
|
|
99
85
|
if (issue.code === import_zod.z.ZodIssueCode.invalid_union_discriminator) {
|
|
100
86
|
return {
|
|
101
|
-
message: `Invalid contributor type. Expected 'static', 'dynamic', 'file'
|
|
87
|
+
message: `Invalid contributor type. Expected 'static', 'dynamic', or 'file'. Note: memory contributors are now configured via the top-level 'memories' config.`
|
|
102
88
|
};
|
|
103
89
|
}
|
|
104
90
|
return { message: ctx.defaultError };
|
|
105
91
|
}
|
|
106
92
|
}
|
|
107
93
|
).describe(
|
|
108
|
-
"Configuration for a system prompt contributor. Type 'static' requires 'content', type 'dynamic' requires 'source', type 'file' requires 'files'
|
|
94
|
+
"Configuration for a system prompt contributor. Type 'static' requires 'content', type 'dynamic' requires 'source', type 'file' requires 'files'."
|
|
109
95
|
);
|
|
110
96
|
const SystemPromptContributorsSchema = import_zod.z.object({
|
|
111
97
|
contributors: import_zod.z.array(ContributorConfigSchema).min(1).default([
|
|
@@ -24,18 +24,18 @@ export declare const ContributorConfigSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
|
24
24
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
25
25
|
} & {
|
|
26
26
|
type: z.ZodLiteral<"dynamic">;
|
|
27
|
-
source: z.ZodEnum<["dateTime", "
|
|
27
|
+
source: z.ZodEnum<["dateTime", "resources"]>;
|
|
28
28
|
}, "strict", z.ZodTypeAny, {
|
|
29
29
|
type: "dynamic";
|
|
30
30
|
enabled: boolean;
|
|
31
31
|
id: string;
|
|
32
|
+
source: "resources" | "dateTime";
|
|
32
33
|
priority: number;
|
|
33
|
-
source: "resources" | "dateTime" | "memorySummary";
|
|
34
34
|
}, {
|
|
35
35
|
type: "dynamic";
|
|
36
36
|
id: string;
|
|
37
|
+
source: "resources" | "dateTime";
|
|
37
38
|
priority: number;
|
|
38
|
-
source: "resources" | "dateTime" | "memorySummary";
|
|
39
39
|
enabled?: boolean | undefined;
|
|
40
40
|
}>, z.ZodObject<{
|
|
41
41
|
id: z.ZodString;
|
|
@@ -89,50 +89,6 @@ export declare const ContributorConfigSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
|
89
89
|
includeMetadata?: boolean | undefined;
|
|
90
90
|
} | undefined;
|
|
91
91
|
enabled?: boolean | undefined;
|
|
92
|
-
}>, z.ZodObject<{
|
|
93
|
-
id: z.ZodString;
|
|
94
|
-
priority: z.ZodNumber;
|
|
95
|
-
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
96
|
-
} & {
|
|
97
|
-
type: z.ZodLiteral<"memory">;
|
|
98
|
-
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
99
|
-
includeTimestamps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
100
|
-
includeTags: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
101
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
102
|
-
pinnedOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
103
|
-
}, "strict", z.ZodTypeAny, {
|
|
104
|
-
includeTimestamps: boolean;
|
|
105
|
-
includeTags: boolean;
|
|
106
|
-
pinnedOnly: boolean;
|
|
107
|
-
limit?: number | undefined;
|
|
108
|
-
}, {
|
|
109
|
-
includeTimestamps?: boolean | undefined;
|
|
110
|
-
includeTags?: boolean | undefined;
|
|
111
|
-
limit?: number | undefined;
|
|
112
|
-
pinnedOnly?: boolean | undefined;
|
|
113
|
-
}>>>;
|
|
114
|
-
}, "strict", z.ZodTypeAny, {
|
|
115
|
-
type: "memory";
|
|
116
|
-
options: {
|
|
117
|
-
includeTimestamps: boolean;
|
|
118
|
-
includeTags: boolean;
|
|
119
|
-
pinnedOnly: boolean;
|
|
120
|
-
limit?: number | undefined;
|
|
121
|
-
};
|
|
122
|
-
enabled: boolean;
|
|
123
|
-
id: string;
|
|
124
|
-
priority: number;
|
|
125
|
-
}, {
|
|
126
|
-
type: "memory";
|
|
127
|
-
id: string;
|
|
128
|
-
priority: number;
|
|
129
|
-
options?: {
|
|
130
|
-
includeTimestamps?: boolean | undefined;
|
|
131
|
-
includeTags?: boolean | undefined;
|
|
132
|
-
limit?: number | undefined;
|
|
133
|
-
pinnedOnly?: boolean | undefined;
|
|
134
|
-
} | undefined;
|
|
135
|
-
enabled?: boolean | undefined;
|
|
136
92
|
}>]>;
|
|
137
93
|
export type ContributorConfig = z.input<typeof ContributorConfigSchema>;
|
|
138
94
|
export type ValidatedContributorConfig = z.output<typeof ContributorConfigSchema>;
|
|
@@ -162,18 +118,18 @@ export declare const SystemPromptContributorsSchema: z.ZodObject<{
|
|
|
162
118
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
163
119
|
} & {
|
|
164
120
|
type: z.ZodLiteral<"dynamic">;
|
|
165
|
-
source: z.ZodEnum<["dateTime", "
|
|
121
|
+
source: z.ZodEnum<["dateTime", "resources"]>;
|
|
166
122
|
}, "strict", z.ZodTypeAny, {
|
|
167
123
|
type: "dynamic";
|
|
168
124
|
enabled: boolean;
|
|
169
125
|
id: string;
|
|
126
|
+
source: "resources" | "dateTime";
|
|
170
127
|
priority: number;
|
|
171
|
-
source: "resources" | "dateTime" | "memorySummary";
|
|
172
128
|
}, {
|
|
173
129
|
type: "dynamic";
|
|
174
130
|
id: string;
|
|
131
|
+
source: "resources" | "dateTime";
|
|
175
132
|
priority: number;
|
|
176
|
-
source: "resources" | "dateTime" | "memorySummary";
|
|
177
133
|
enabled?: boolean | undefined;
|
|
178
134
|
}>, z.ZodObject<{
|
|
179
135
|
id: z.ZodString;
|
|
@@ -227,50 +183,6 @@ export declare const SystemPromptContributorsSchema: z.ZodObject<{
|
|
|
227
183
|
includeMetadata?: boolean | undefined;
|
|
228
184
|
} | undefined;
|
|
229
185
|
enabled?: boolean | undefined;
|
|
230
|
-
}>, z.ZodObject<{
|
|
231
|
-
id: z.ZodString;
|
|
232
|
-
priority: z.ZodNumber;
|
|
233
|
-
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
234
|
-
} & {
|
|
235
|
-
type: z.ZodLiteral<"memory">;
|
|
236
|
-
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
237
|
-
includeTimestamps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
238
|
-
includeTags: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
239
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
240
|
-
pinnedOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
241
|
-
}, "strict", z.ZodTypeAny, {
|
|
242
|
-
includeTimestamps: boolean;
|
|
243
|
-
includeTags: boolean;
|
|
244
|
-
pinnedOnly: boolean;
|
|
245
|
-
limit?: number | undefined;
|
|
246
|
-
}, {
|
|
247
|
-
includeTimestamps?: boolean | undefined;
|
|
248
|
-
includeTags?: boolean | undefined;
|
|
249
|
-
limit?: number | undefined;
|
|
250
|
-
pinnedOnly?: boolean | undefined;
|
|
251
|
-
}>>>;
|
|
252
|
-
}, "strict", z.ZodTypeAny, {
|
|
253
|
-
type: "memory";
|
|
254
|
-
options: {
|
|
255
|
-
includeTimestamps: boolean;
|
|
256
|
-
includeTags: boolean;
|
|
257
|
-
pinnedOnly: boolean;
|
|
258
|
-
limit?: number | undefined;
|
|
259
|
-
};
|
|
260
|
-
enabled: boolean;
|
|
261
|
-
id: string;
|
|
262
|
-
priority: number;
|
|
263
|
-
}, {
|
|
264
|
-
type: "memory";
|
|
265
|
-
id: string;
|
|
266
|
-
priority: number;
|
|
267
|
-
options?: {
|
|
268
|
-
includeTimestamps?: boolean | undefined;
|
|
269
|
-
includeTags?: boolean | undefined;
|
|
270
|
-
limit?: number | undefined;
|
|
271
|
-
pinnedOnly?: boolean | undefined;
|
|
272
|
-
} | undefined;
|
|
273
|
-
enabled?: boolean | undefined;
|
|
274
186
|
}>]>, "many">>;
|
|
275
187
|
}, "strict", z.ZodTypeAny, {
|
|
276
188
|
contributors: ({
|
|
@@ -283,8 +195,8 @@ export declare const SystemPromptContributorsSchema: z.ZodObject<{
|
|
|
283
195
|
type: "dynamic";
|
|
284
196
|
enabled: boolean;
|
|
285
197
|
id: string;
|
|
198
|
+
source: "resources" | "dateTime";
|
|
286
199
|
priority: number;
|
|
287
|
-
source: "resources" | "dateTime" | "memorySummary";
|
|
288
200
|
} | {
|
|
289
201
|
type: "file";
|
|
290
202
|
options: {
|
|
@@ -298,17 +210,6 @@ export declare const SystemPromptContributorsSchema: z.ZodObject<{
|
|
|
298
210
|
id: string;
|
|
299
211
|
priority: number;
|
|
300
212
|
files: string[];
|
|
301
|
-
} | {
|
|
302
|
-
type: "memory";
|
|
303
|
-
options: {
|
|
304
|
-
includeTimestamps: boolean;
|
|
305
|
-
includeTags: boolean;
|
|
306
|
-
pinnedOnly: boolean;
|
|
307
|
-
limit?: number | undefined;
|
|
308
|
-
};
|
|
309
|
-
enabled: boolean;
|
|
310
|
-
id: string;
|
|
311
|
-
priority: number;
|
|
312
213
|
})[];
|
|
313
214
|
}, {
|
|
314
215
|
contributors?: ({
|
|
@@ -320,8 +221,8 @@ export declare const SystemPromptContributorsSchema: z.ZodObject<{
|
|
|
320
221
|
} | {
|
|
321
222
|
type: "dynamic";
|
|
322
223
|
id: string;
|
|
224
|
+
source: "resources" | "dateTime";
|
|
323
225
|
priority: number;
|
|
324
|
-
source: "resources" | "dateTime" | "memorySummary";
|
|
325
226
|
enabled?: boolean | undefined;
|
|
326
227
|
} | {
|
|
327
228
|
type: "file";
|
|
@@ -336,17 +237,6 @@ export declare const SystemPromptContributorsSchema: z.ZodObject<{
|
|
|
336
237
|
includeMetadata?: boolean | undefined;
|
|
337
238
|
} | undefined;
|
|
338
239
|
enabled?: boolean | undefined;
|
|
339
|
-
} | {
|
|
340
|
-
type: "memory";
|
|
341
|
-
id: string;
|
|
342
|
-
priority: number;
|
|
343
|
-
options?: {
|
|
344
|
-
includeTimestamps?: boolean | undefined;
|
|
345
|
-
includeTags?: boolean | undefined;
|
|
346
|
-
limit?: number | undefined;
|
|
347
|
-
pinnedOnly?: boolean | undefined;
|
|
348
|
-
} | undefined;
|
|
349
|
-
enabled?: boolean | undefined;
|
|
350
240
|
})[] | undefined;
|
|
351
241
|
}>;
|
|
352
242
|
export declare const SystemPromptConfigSchema: z.ZodBranded<z.ZodUnion<[z.ZodEffects<z.ZodString, {
|
|
@@ -383,18 +273,18 @@ export declare const SystemPromptConfigSchema: z.ZodBranded<z.ZodUnion<[z.ZodEff
|
|
|
383
273
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
384
274
|
} & {
|
|
385
275
|
type: z.ZodLiteral<"dynamic">;
|
|
386
|
-
source: z.ZodEnum<["dateTime", "
|
|
276
|
+
source: z.ZodEnum<["dateTime", "resources"]>;
|
|
387
277
|
}, "strict", z.ZodTypeAny, {
|
|
388
278
|
type: "dynamic";
|
|
389
279
|
enabled: boolean;
|
|
390
280
|
id: string;
|
|
281
|
+
source: "resources" | "dateTime";
|
|
391
282
|
priority: number;
|
|
392
|
-
source: "resources" | "dateTime" | "memorySummary";
|
|
393
283
|
}, {
|
|
394
284
|
type: "dynamic";
|
|
395
285
|
id: string;
|
|
286
|
+
source: "resources" | "dateTime";
|
|
396
287
|
priority: number;
|
|
397
|
-
source: "resources" | "dateTime" | "memorySummary";
|
|
398
288
|
enabled?: boolean | undefined;
|
|
399
289
|
}>, z.ZodObject<{
|
|
400
290
|
id: z.ZodString;
|
|
@@ -448,50 +338,6 @@ export declare const SystemPromptConfigSchema: z.ZodBranded<z.ZodUnion<[z.ZodEff
|
|
|
448
338
|
includeMetadata?: boolean | undefined;
|
|
449
339
|
} | undefined;
|
|
450
340
|
enabled?: boolean | undefined;
|
|
451
|
-
}>, z.ZodObject<{
|
|
452
|
-
id: z.ZodString;
|
|
453
|
-
priority: z.ZodNumber;
|
|
454
|
-
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
455
|
-
} & {
|
|
456
|
-
type: z.ZodLiteral<"memory">;
|
|
457
|
-
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
458
|
-
includeTimestamps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
459
|
-
includeTags: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
460
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
461
|
-
pinnedOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
462
|
-
}, "strict", z.ZodTypeAny, {
|
|
463
|
-
includeTimestamps: boolean;
|
|
464
|
-
includeTags: boolean;
|
|
465
|
-
pinnedOnly: boolean;
|
|
466
|
-
limit?: number | undefined;
|
|
467
|
-
}, {
|
|
468
|
-
includeTimestamps?: boolean | undefined;
|
|
469
|
-
includeTags?: boolean | undefined;
|
|
470
|
-
limit?: number | undefined;
|
|
471
|
-
pinnedOnly?: boolean | undefined;
|
|
472
|
-
}>>>;
|
|
473
|
-
}, "strict", z.ZodTypeAny, {
|
|
474
|
-
type: "memory";
|
|
475
|
-
options: {
|
|
476
|
-
includeTimestamps: boolean;
|
|
477
|
-
includeTags: boolean;
|
|
478
|
-
pinnedOnly: boolean;
|
|
479
|
-
limit?: number | undefined;
|
|
480
|
-
};
|
|
481
|
-
enabled: boolean;
|
|
482
|
-
id: string;
|
|
483
|
-
priority: number;
|
|
484
|
-
}, {
|
|
485
|
-
type: "memory";
|
|
486
|
-
id: string;
|
|
487
|
-
priority: number;
|
|
488
|
-
options?: {
|
|
489
|
-
includeTimestamps?: boolean | undefined;
|
|
490
|
-
includeTags?: boolean | undefined;
|
|
491
|
-
limit?: number | undefined;
|
|
492
|
-
pinnedOnly?: boolean | undefined;
|
|
493
|
-
} | undefined;
|
|
494
|
-
enabled?: boolean | undefined;
|
|
495
341
|
}>]>, "many">>;
|
|
496
342
|
}, "strict", z.ZodTypeAny, {
|
|
497
343
|
contributors: ({
|
|
@@ -504,8 +350,8 @@ export declare const SystemPromptConfigSchema: z.ZodBranded<z.ZodUnion<[z.ZodEff
|
|
|
504
350
|
type: "dynamic";
|
|
505
351
|
enabled: boolean;
|
|
506
352
|
id: string;
|
|
353
|
+
source: "resources" | "dateTime";
|
|
507
354
|
priority: number;
|
|
508
|
-
source: "resources" | "dateTime" | "memorySummary";
|
|
509
355
|
} | {
|
|
510
356
|
type: "file";
|
|
511
357
|
options: {
|
|
@@ -519,17 +365,6 @@ export declare const SystemPromptConfigSchema: z.ZodBranded<z.ZodUnion<[z.ZodEff
|
|
|
519
365
|
id: string;
|
|
520
366
|
priority: number;
|
|
521
367
|
files: string[];
|
|
522
|
-
} | {
|
|
523
|
-
type: "memory";
|
|
524
|
-
options: {
|
|
525
|
-
includeTimestamps: boolean;
|
|
526
|
-
includeTags: boolean;
|
|
527
|
-
pinnedOnly: boolean;
|
|
528
|
-
limit?: number | undefined;
|
|
529
|
-
};
|
|
530
|
-
enabled: boolean;
|
|
531
|
-
id: string;
|
|
532
|
-
priority: number;
|
|
533
368
|
})[];
|
|
534
369
|
}, {
|
|
535
370
|
contributors?: ({
|
|
@@ -541,8 +376,8 @@ export declare const SystemPromptConfigSchema: z.ZodBranded<z.ZodUnion<[z.ZodEff
|
|
|
541
376
|
} | {
|
|
542
377
|
type: "dynamic";
|
|
543
378
|
id: string;
|
|
379
|
+
source: "resources" | "dateTime";
|
|
544
380
|
priority: number;
|
|
545
|
-
source: "resources" | "dateTime" | "memorySummary";
|
|
546
381
|
enabled?: boolean | undefined;
|
|
547
382
|
} | {
|
|
548
383
|
type: "file";
|
|
@@ -557,17 +392,6 @@ export declare const SystemPromptConfigSchema: z.ZodBranded<z.ZodUnion<[z.ZodEff
|
|
|
557
392
|
includeMetadata?: boolean | undefined;
|
|
558
393
|
} | undefined;
|
|
559
394
|
enabled?: boolean | undefined;
|
|
560
|
-
} | {
|
|
561
|
-
type: "memory";
|
|
562
|
-
id: string;
|
|
563
|
-
priority: number;
|
|
564
|
-
options?: {
|
|
565
|
-
includeTimestamps?: boolean | undefined;
|
|
566
|
-
includeTags?: boolean | undefined;
|
|
567
|
-
limit?: number | undefined;
|
|
568
|
-
pinnedOnly?: boolean | undefined;
|
|
569
|
-
} | undefined;
|
|
570
|
-
enabled?: boolean | undefined;
|
|
571
395
|
})[] | undefined;
|
|
572
396
|
}>]>, "ValidatedSystemPromptConfig">;
|
|
573
397
|
export type SystemPromptConfig = z.input<typeof SystemPromptConfigSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0FxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkB/B,CAAC;AAGN,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAElF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuB9B,CAAC;AAGd,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAUM,CAAC;AAG5C,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -41,37 +41,23 @@ const FileContributorSchema = BaseContributorSchema.extend({
|
|
|
41
41
|
)
|
|
42
42
|
}).strict().optional().default({})
|
|
43
43
|
}).strict();
|
|
44
|
-
const MemoryContributorSchema = BaseContributorSchema.extend({
|
|
45
|
-
type: z.literal("memory"),
|
|
46
|
-
options: z.object({
|
|
47
|
-
includeTimestamps: z.boolean().optional().default(false).describe("Whether to include timestamps in memory display"),
|
|
48
|
-
includeTags: z.boolean().optional().default(true).describe("Whether to include tags in memory display"),
|
|
49
|
-
limit: z.number().int().positive().optional().describe("Maximum number of memories to include"),
|
|
50
|
-
pinnedOnly: z.boolean().optional().default(false).describe("Only include pinned memories (for hybrid approach)")
|
|
51
|
-
}).strict().optional().default({})
|
|
52
|
-
}).strict();
|
|
53
44
|
const ContributorConfigSchema = z.discriminatedUnion(
|
|
54
45
|
"type",
|
|
55
46
|
// The field to discriminate on
|
|
56
|
-
[
|
|
57
|
-
StaticContributorSchema,
|
|
58
|
-
DynamicContributorSchema,
|
|
59
|
-
FileContributorSchema,
|
|
60
|
-
MemoryContributorSchema
|
|
61
|
-
],
|
|
47
|
+
[StaticContributorSchema, DynamicContributorSchema, FileContributorSchema],
|
|
62
48
|
{
|
|
63
49
|
// Optional: Custom error message for invalid discriminator
|
|
64
50
|
errorMap: (issue, ctx) => {
|
|
65
51
|
if (issue.code === z.ZodIssueCode.invalid_union_discriminator) {
|
|
66
52
|
return {
|
|
67
|
-
message: `Invalid contributor type. Expected 'static', 'dynamic', 'file'
|
|
53
|
+
message: `Invalid contributor type. Expected 'static', 'dynamic', or 'file'. Note: memory contributors are now configured via the top-level 'memories' config.`
|
|
68
54
|
};
|
|
69
55
|
}
|
|
70
56
|
return { message: ctx.defaultError };
|
|
71
57
|
}
|
|
72
58
|
}
|
|
73
59
|
).describe(
|
|
74
|
-
"Configuration for a system prompt contributor. Type 'static' requires 'content', type 'dynamic' requires 'source', type 'file' requires 'files'
|
|
60
|
+
"Configuration for a system prompt contributor. Type 'static' requires 'content', type 'dynamic' requires 'source', type 'file' requires 'files'."
|
|
75
61
|
);
|
|
76
62
|
const SystemPromptContributorsSchema = z.object({
|
|
77
63
|
contributors: z.array(ContributorConfigSchema).min(1).default([
|