repoburg 1.3.239 → 1.3.241
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/README.md +9 -0
- package/backend/dist/bin/metadata-migrate.ts +99 -0
- package/backend/dist/bin/metadata-validate.ts +112 -0
- package/backend/dist/src/agents/agents.module.js +0 -3
- package/backend/dist/src/agents/agents.module.js.map +1 -1
- package/backend/dist/src/agents/agents.service.d.ts +7 -5
- package/backend/dist/src/agents/agents.service.js +65 -39
- package/backend/dist/src/agents/agents.service.js.map +1 -1
- package/backend/dist/src/app.module.js +3 -0
- package/backend/dist/src/app.module.js.map +1 -1
- package/backend/dist/src/application-state/application-state.module.js +1 -4
- package/backend/dist/src/application-state/application-state.module.js.map +1 -1
- package/backend/dist/src/application-state/application-state.service.d.ts +3 -2
- package/backend/dist/src/application-state/application-state.service.js +7 -5
- package/backend/dist/src/application-state/application-state.service.js.map +1 -1
- package/backend/dist/src/bin/metadata-migrate.d.ts +2 -0
- package/backend/dist/src/bin/metadata-migrate.js +70 -0
- package/backend/dist/src/bin/metadata-migrate.js.map +1 -0
- package/backend/dist/src/bin/metadata-validate.d.ts +2 -0
- package/backend/dist/src/bin/metadata-validate.js +87 -0
- package/backend/dist/src/bin/metadata-validate.js.map +1 -0
- package/backend/dist/src/context-generation/context-generation.module.js +0 -3
- package/backend/dist/src/context-generation/context-generation.module.js.map +1 -1
- package/backend/dist/src/context-generation/context-generation.service.d.ts +3 -4
- package/backend/dist/src/context-generation/context-generation.service.js +11 -20
- package/backend/dist/src/context-generation/context-generation.service.js.map +1 -1
- package/backend/dist/src/context-snippets/context-snippets.module.js +1 -7
- package/backend/dist/src/context-snippets/context-snippets.module.js.map +1 -1
- package/backend/dist/src/context-snippets/context-snippets.service.d.ts +2 -2
- package/backend/dist/src/context-snippets/context-snippets.service.js +5 -7
- package/backend/dist/src/context-snippets/context-snippets.service.js.map +1 -1
- package/backend/dist/src/context-templates/context-templates.module.js +1 -7
- package/backend/dist/src/context-templates/context-templates.module.js.map +1 -1
- package/backend/dist/src/context-templates/context-templates.service.d.ts +8 -5
- package/backend/dist/src/context-templates/context-templates.service.js +46 -75
- package/backend/dist/src/context-templates/context-templates.service.js.map +1 -1
- package/backend/dist/src/core-entities/agent.entity.js +0 -15
- package/backend/dist/src/core-entities/agent.entity.js.map +1 -1
- package/backend/dist/src/core-entities/context-template.entity.d.ts +0 -5
- package/backend/dist/src/core-entities/context-template.entity.js +0 -26
- package/backend/dist/src/core-entities/context-template.entity.js.map +1 -1
- package/backend/dist/src/core-entities/session-input.entity.js +0 -5
- package/backend/dist/src/core-entities/session-input.entity.js.map +1 -1
- package/backend/dist/src/core-entities/session.entity.js +0 -20
- package/backend/dist/src/core-entities/session.entity.js.map +1 -1
- package/backend/dist/src/core-entities/system-prompt.entity.d.ts +0 -2
- package/backend/dist/src/core-entities/system-prompt.entity.js +0 -9
- package/backend/dist/src/core-entities/system-prompt.entity.js.map +1 -1
- package/backend/dist/src/custom-snippets/custom-snippets.module.js +1 -3
- package/backend/dist/src/custom-snippets/custom-snippets.module.js.map +1 -1
- package/backend/dist/src/custom-snippets/custom-snippets.service.d.ts +2 -2
- package/backend/dist/src/custom-snippets/custom-snippets.service.js +6 -9
- package/backend/dist/src/custom-snippets/custom-snippets.service.js.map +1 -1
- package/backend/dist/src/custom-variables/custom-variables.module.js +1 -3
- package/backend/dist/src/custom-variables/custom-variables.module.js.map +1 -1
- package/backend/dist/src/custom-variables/custom-variables.service.d.ts +2 -2
- package/backend/dist/src/custom-variables/custom-variables.service.js +10 -12
- package/backend/dist/src/custom-variables/custom-variables.service.js.map +1 -1
- package/backend/dist/src/interactive-chat/chat.service.d.ts +4 -1
- package/backend/dist/src/interactive-chat/chat.service.js +11 -7
- package/backend/dist/src/interactive-chat/chat.service.js.map +1 -1
- package/backend/dist/src/llm-orchestration/action-handlers/get-session-history.handler.d.ts +3 -2
- package/backend/dist/src/llm-orchestration/action-handlers/get-session-history.handler.js +16 -9
- package/backend/dist/src/llm-orchestration/action-handlers/get-session-history.handler.js.map +1 -1
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +1 -1
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js.map +1 -1
- package/backend/dist/src/main.js +5 -0
- package/backend/dist/src/main.js.map +1 -1
- package/backend/dist/src/mcp/marketplace/marketplace.module.js +1 -8
- package/backend/dist/src/mcp/marketplace/marketplace.module.js.map +1 -1
- package/backend/dist/src/mcp/marketplace/marketplace.service.d.ts +6 -4
- package/backend/dist/src/mcp/marketplace/marketplace.service.js +53 -21
- package/backend/dist/src/mcp/marketplace/marketplace.service.js.map +1 -1
- package/backend/dist/src/mcp/marketplace/oauth-provider.d.ts +1 -0
- package/backend/dist/src/mcp/marketplace/oauth-provider.js.map +1 -1
- package/backend/dist/src/mcp/mcp.module.js +1 -3
- package/backend/dist/src/mcp/mcp.module.js.map +1 -1
- package/backend/dist/src/mcp/mcp.service.d.ts +6 -5
- package/backend/dist/src/mcp/mcp.service.js +71 -55
- package/backend/dist/src/mcp/mcp.service.js.map +1 -1
- package/backend/dist/src/metadata-store/metadata-migration.d.ts +34 -0
- package/backend/dist/src/metadata-store/metadata-migration.js +151 -0
- package/backend/dist/src/metadata-store/metadata-migration.js.map +1 -0
- package/backend/dist/src/metadata-store/metadata-migration.service.d.ts +7 -0
- package/backend/dist/src/metadata-store/metadata-migration.service.js +46 -0
- package/backend/dist/src/metadata-store/metadata-migration.service.js.map +1 -0
- package/backend/dist/src/metadata-store/metadata-readme.d.ts +2 -0
- package/backend/dist/src/metadata-store/metadata-readme.js +75 -0
- package/backend/dist/src/metadata-store/metadata-readme.js.map +1 -0
- package/backend/dist/src/metadata-store/metadata-store.module.d.ts +2 -0
- package/backend/dist/src/metadata-store/metadata-store.module.js +79 -0
- package/backend/dist/src/metadata-store/metadata-store.module.js.map +1 -0
- package/backend/dist/src/metadata-store/metadata-store.service.d.ts +43 -0
- package/backend/dist/src/metadata-store/metadata-store.service.js +294 -0
- package/backend/dist/src/metadata-store/metadata-store.service.js.map +1 -0
- package/backend/dist/src/metadata-store/metadata-store.tokens.d.ts +1 -0
- package/backend/dist/src/metadata-store/metadata-store.tokens.js +7 -0
- package/backend/dist/src/metadata-store/metadata-store.tokens.js.map +1 -0
- package/backend/dist/src/metadata-store/metadata-store.types.d.ts +21 -0
- package/backend/dist/src/metadata-store/metadata-store.types.js +3 -0
- package/backend/dist/src/metadata-store/metadata-store.types.js.map +1 -0
- package/backend/dist/src/metadata-store/metadata-store.utils.d.ts +8 -0
- package/backend/dist/src/metadata-store/metadata-store.utils.js +37 -0
- package/backend/dist/src/metadata-store/metadata-store.utils.js.map +1 -0
- package/backend/dist/src/metadata-store/schemas/metadata-schemas.d.ts +101 -0
- package/backend/dist/src/metadata-store/schemas/metadata-schemas.js +407 -0
- package/backend/dist/src/metadata-store/schemas/metadata-schemas.js.map +1 -0
- package/backend/dist/src/metadata-store/store-configs.d.ts +13 -0
- package/backend/dist/src/metadata-store/store-configs.js +108 -0
- package/backend/dist/src/metadata-store/store-configs.js.map +1 -0
- package/backend/dist/src/seeding/agent-seeding.service.d.ts +3 -3
- package/backend/dist/src/seeding/agent-seeding.service.js +22 -22
- package/backend/dist/src/seeding/agent-seeding.service.js.map +1 -1
- package/backend/dist/src/seeding/context-template-seeding.service.js +5 -2
- package/backend/dist/src/seeding/context-template-seeding.service.js.map +1 -1
- package/backend/dist/src/seeding/data/system-prompts/default_native_tool_agent.d.ts +1 -1
- package/backend/dist/src/seeding/data/system-prompts/default_native_tool_agent.js +6 -2
- package/backend/dist/src/seeding/data/system-prompts/default_native_tool_agent.js.map +1 -1
- package/backend/dist/src/seeding/mcp-config-seeding.service.d.ts +3 -3
- package/backend/dist/src/seeding/mcp-config-seeding.service.js +9 -11
- package/backend/dist/src/seeding/mcp-config-seeding.service.js.map +1 -1
- package/backend/dist/src/seeding/seeding.module.js +5 -9
- package/backend/dist/src/seeding/seeding.module.js.map +1 -1
- package/backend/dist/src/seeding/sub-agent-seeding.service.d.ts +3 -3
- package/backend/dist/src/seeding/sub-agent-seeding.service.js +23 -23
- package/backend/dist/src/seeding/sub-agent-seeding.service.js.map +1 -1
- package/backend/dist/src/seeding/system-prompt-seeding.service.js +6 -2
- package/backend/dist/src/seeding/system-prompt-seeding.service.js.map +1 -1
- package/backend/dist/src/seeding/tool-hook-seeding.service.d.ts +2 -2
- package/backend/dist/src/seeding/tool-hook-seeding.service.js +4 -5
- package/backend/dist/src/seeding/tool-hook-seeding.service.js.map +1 -1
- package/backend/dist/src/session-followup/session-followup.module.js +2 -2
- package/backend/dist/src/session-followup/session-followup.module.js.map +1 -1
- package/backend/dist/src/session-followup/session-followup.service.d.ts +3 -2
- package/backend/dist/src/session-followup/session-followup.service.js +10 -9
- package/backend/dist/src/session-followup/session-followup.service.js.map +1 -1
- package/backend/dist/src/session-inputs/session-inputs.module.js +1 -7
- package/backend/dist/src/session-inputs/session-inputs.module.js.map +1 -1
- package/backend/dist/src/session-inputs/session-inputs.service.d.ts +4 -2
- package/backend/dist/src/session-inputs/session-inputs.service.js +31 -15
- package/backend/dist/src/session-inputs/session-inputs.service.js.map +1 -1
- package/backend/dist/src/session-transfer/session-transfer.module.js +1 -7
- package/backend/dist/src/session-transfer/session-transfer.module.js.map +1 -1
- package/backend/dist/src/session-transfer/session-transfer.service.d.ts +3 -2
- package/backend/dist/src/session-transfer/session-transfer.service.js +12 -5
- package/backend/dist/src/session-transfer/session-transfer.service.js.map +1 -1
- package/backend/dist/src/sessions/sessions.module.js +0 -2
- package/backend/dist/src/sessions/sessions.module.js.map +1 -1
- package/backend/dist/src/sessions/sessions.service.d.ts +9 -3
- package/backend/dist/src/sessions/sessions.service.js +87 -39
- package/backend/dist/src/sessions/sessions.service.js.map +1 -1
- package/backend/dist/src/sub-agents/sub-agent.entity.js +0 -15
- package/backend/dist/src/sub-agents/sub-agent.entity.js.map +1 -1
- package/backend/dist/src/sub-agents/sub-agents.module.js +1 -8
- package/backend/dist/src/sub-agents/sub-agents.module.js.map +1 -1
- package/backend/dist/src/sub-agents/sub-agents.service.d.ts +7 -3
- package/backend/dist/src/sub-agents/sub-agents.service.js +61 -35
- package/backend/dist/src/sub-agents/sub-agents.service.js.map +1 -1
- package/backend/dist/src/system-prompts/system-prompts.module.js +0 -3
- package/backend/dist/src/system-prompts/system-prompts.module.js.map +1 -1
- package/backend/dist/src/system-prompts/system-prompts.service.d.ts +7 -4
- package/backend/dist/src/system-prompts/system-prompts.service.js +23 -28
- package/backend/dist/src/system-prompts/system-prompts.service.js.map +1 -1
- package/backend/dist/src/tool-hooks/tool-hooks.module.js +1 -3
- package/backend/dist/src/tool-hooks/tool-hooks.module.js.map +1 -1
- package/backend/dist/src/tool-hooks/tool-hooks.service.d.ts +2 -2
- package/backend/dist/src/tool-hooks/tool-hooks.service.js +5 -7
- package/backend/dist/src/tool-hooks/tool-hooks.service.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/backend/package.json +2 -0
- package/package.json +1 -1
|
@@ -15,16 +15,15 @@ var AgentSeedingService_1;
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.AgentSeedingService = void 0;
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
|
-
const typeorm_2 = require("typeorm");
|
|
20
|
-
const core_entities_1 = require("../core-entities");
|
|
21
18
|
const system_prompts_service_1 = require("../system-prompts/system-prompts.service");
|
|
22
19
|
const context_templates_service_1 = require("../context-templates/context-templates.service");
|
|
23
20
|
const path = require("path");
|
|
24
21
|
const glob_1 = require("glob");
|
|
22
|
+
const metadata_store_service_1 = require("../metadata-store/metadata-store.service");
|
|
23
|
+
const metadata_store_tokens_1 = require("../metadata-store/metadata-store.tokens");
|
|
25
24
|
let AgentSeedingService = AgentSeedingService_1 = class AgentSeedingService {
|
|
26
|
-
constructor(
|
|
27
|
-
this.
|
|
25
|
+
constructor(agentsStore, systemPromptsService, contextTemplatesService) {
|
|
26
|
+
this.agentsStore = agentsStore;
|
|
28
27
|
this.systemPromptsService = systemPromptsService;
|
|
29
28
|
this.contextTemplatesService = contextTemplatesService;
|
|
30
29
|
this.logger = new common_1.Logger(AgentSeedingService_1.name);
|
|
@@ -32,11 +31,12 @@ let AgentSeedingService = AgentSeedingService_1 = class AgentSeedingService {
|
|
|
32
31
|
async seed() {
|
|
33
32
|
const deprecatedBuiltinKeys = ['config-manager'];
|
|
34
33
|
for (const deprecatedKey of deprecatedBuiltinKeys) {
|
|
35
|
-
const deprecatedAgent = await this.
|
|
36
|
-
|
|
34
|
+
const deprecatedAgent = await this.agentsStore.findOneBy({
|
|
35
|
+
builtin_key: deprecatedKey,
|
|
36
|
+
is_builtin: true,
|
|
37
37
|
});
|
|
38
38
|
if (deprecatedAgent) {
|
|
39
|
-
await this.
|
|
39
|
+
await this.agentsStore.remove(deprecatedAgent);
|
|
40
40
|
this.logger.log(`Removed deprecated builtin agent "${deprecatedAgent.name}" (builtin_key: ${deprecatedKey}).`);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -58,36 +58,37 @@ let AgentSeedingService = AgentSeedingService_1 = class AgentSeedingService {
|
|
|
58
58
|
this.logger.warn(`Skipping malformed seed file: ${fileName} (missing name)`);
|
|
59
59
|
continue;
|
|
60
60
|
}
|
|
61
|
-
const existingAgent = await this.
|
|
62
|
-
|
|
61
|
+
const existingAgent = await this.agentsStore.findOneBy({
|
|
62
|
+
builtin_key: builtinKey,
|
|
63
63
|
});
|
|
64
64
|
if (existingAgent && existingAgent.is_builtin) {
|
|
65
|
-
let system_prompt_id =
|
|
65
|
+
let system_prompt_id = null;
|
|
66
66
|
if (system_prompt_name) {
|
|
67
67
|
const systemPrompt = await this.systemPromptsService.findByBuiltinKey(system_prompt_name.replace(/_/g, '-'));
|
|
68
68
|
system_prompt_id = systemPrompt?.id || null;
|
|
69
69
|
}
|
|
70
|
-
let context_template_id =
|
|
70
|
+
let context_template_id = null;
|
|
71
71
|
if (context_template_name) {
|
|
72
72
|
const contextTemplate = await this.contextTemplatesService.findByBuiltinKey(context_template_name.replace(/_/g, '-'));
|
|
73
73
|
context_template_id = contextTemplate?.id || null;
|
|
74
74
|
}
|
|
75
|
-
let followup_context_template_id =
|
|
75
|
+
let followup_context_template_id = null;
|
|
76
76
|
if (followup_context_template_name) {
|
|
77
77
|
const followupContextTemplate = await this.contextTemplatesService.findByBuiltinKey(followup_context_template_name.replace(/_/g, '-'));
|
|
78
78
|
followup_context_template_id = followupContextTemplate?.id || null;
|
|
79
79
|
}
|
|
80
|
-
existingAgent.
|
|
80
|
+
existingAgent.name = name;
|
|
81
|
+
existingAgent.description = description ?? existingAgent.description;
|
|
81
82
|
existingAgent.system_prompt_id = system_prompt_id;
|
|
82
83
|
existingAgent.context_template_id = context_template_id;
|
|
83
84
|
existingAgent.followup_context_template_id =
|
|
84
85
|
followup_context_template_id;
|
|
85
|
-
existingAgent.model_id = model_id
|
|
86
|
+
existingAgent.model_id = model_id ?? existingAgent.model_id;
|
|
86
87
|
existingAgent.reasoning_effort =
|
|
87
|
-
reasoning_effort
|
|
88
|
+
reasoning_effort ?? existingAgent.reasoning_effort;
|
|
88
89
|
existingAgent.is_active = is_active !== false;
|
|
89
|
-
await this.
|
|
90
|
-
this.logger.log(`Built-in agent "${name}"
|
|
90
|
+
await this.agentsStore.save(existingAgent);
|
|
91
|
+
this.logger.log(`Built-in agent "${name}" overwritten from seed data.`);
|
|
91
92
|
}
|
|
92
93
|
else if (existingAgent) {
|
|
93
94
|
this.logger.warn(`Agent with builtin_key "${builtinKey}" exists but is not built-in. Skipping.`);
|
|
@@ -123,7 +124,7 @@ let AgentSeedingService = AgentSeedingService_1 = class AgentSeedingService {
|
|
|
123
124
|
followup_context_template_id = followupContextTemplate.id;
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
|
-
|
|
127
|
+
await this.agentsStore.create({
|
|
127
128
|
name,
|
|
128
129
|
description: description || null,
|
|
129
130
|
system_prompt_id,
|
|
@@ -136,7 +137,6 @@ let AgentSeedingService = AgentSeedingService_1 = class AgentSeedingService {
|
|
|
136
137
|
is_builtin: true,
|
|
137
138
|
builtin_key: builtinKey,
|
|
138
139
|
});
|
|
139
|
-
await this.agentRepository.save(newAgent);
|
|
140
140
|
this.logger.log(`Built-in agent "${name}" seeded.`);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
@@ -149,8 +149,8 @@ let AgentSeedingService = AgentSeedingService_1 = class AgentSeedingService {
|
|
|
149
149
|
exports.AgentSeedingService = AgentSeedingService;
|
|
150
150
|
exports.AgentSeedingService = AgentSeedingService = AgentSeedingService_1 = __decorate([
|
|
151
151
|
(0, common_1.Injectable)(),
|
|
152
|
-
__param(0, (0,
|
|
153
|
-
__metadata("design:paramtypes", [
|
|
152
|
+
__param(0, (0, common_1.Inject)((0, metadata_store_tokens_1.getMetadataStoreToken)('agents'))),
|
|
153
|
+
__metadata("design:paramtypes", [metadata_store_service_1.MetadataStore,
|
|
154
154
|
system_prompts_service_1.SystemPromptsService,
|
|
155
155
|
context_templates_service_1.ContextTemplatesService])
|
|
156
156
|
], AgentSeedingService);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/agent-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"agent-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/agent-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA4D;AAE5D,qFAAgF;AAChF,8FAAyF;AACzF,6BAA6B;AAC7B,+BAA4B;AAC5B,qFAAyE;AACzE,mFAAgF;AAGzE,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAG9B,YAEE,WAAkD,EACjC,oBAA0C,EAC1C,uBAAgD;QAFhD,gBAAW,GAAX,WAAW,CAAsB;QACjC,yBAAoB,GAApB,oBAAoB,CAAsB;QAC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EAAE,QAAQ,IAAI,IAAI;wBAC1B,gBAAgB,EAAE,gBAAgB,IAAI,IAAI;wBAC1C,UAAU,EAAE,UAAU,KAAK,eAAe;wBAC1C,SAAS,EAAE,SAAS,KAAK,KAAK;wBAC9B,UAAU,EAAE,IAAI;wBAChB,WAAW,EAAE,UAAU;qBACjB,CAAC,CAAC;oBACV,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,IAAI,WAAW,CAAC,CAAC;gBACtD,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,QAAQ,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AA5LY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,eAAM,EAAC,IAAA,6CAAqB,EAAC,QAAQ,CAAC,CAAC,CAAA;qCACV,sCAAa;QACJ,6CAAoB;QACjB,mDAAuB;GAPxD,mBAAmB,CA4L/B"}
|
|
@@ -56,8 +56,11 @@ let ContextTemplateSeedingService = ContextTemplateSeedingService_1 = class Cont
|
|
|
56
56
|
.replace(/_/g, '-');
|
|
57
57
|
const existingTemplate = await this.contextTemplatesService.findByBuiltinKey(builtinKey);
|
|
58
58
|
if (existingTemplate && existingTemplate.is_builtin) {
|
|
59
|
-
await this.contextTemplatesService.updateBuiltinContent(existingTemplate.id,
|
|
60
|
-
|
|
59
|
+
await this.contextTemplatesService.updateBuiltinContent(existingTemplate.id, {
|
|
60
|
+
template_name: templateName,
|
|
61
|
+
template_content: templateContent,
|
|
62
|
+
});
|
|
63
|
+
this.logger.log(`Built-in template "${templateName}" overwritten from seed data.`);
|
|
61
64
|
}
|
|
62
65
|
else if (existingTemplate) {
|
|
63
66
|
this.logger.warn(`Template with builtin_key "${builtinKey}" exists but is not built-in. Skipping.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-template-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/context-template-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8FAAyF;AACzF,6BAA6B;AAC7B,+BAA4B;AAIrB,IAAM,6BAA6B,qCAAnC,MAAM,6BAA6B;IAGxC,YACmB,uBAAgD;QAAhD,4BAAuB,GAAvB,uBAAuB,CAAyB;QAHlD,WAAM,GAAG,IAAI,eAAM,CAAC,+BAA6B,CAAC,IAAI,CAAC,CAAC;IAItE,CAAC;IAEJ,KAAK,CAAC,IAAI;QAER,MAAM,qBAAqB,GAAG;YAC5B,gCAAgC;YAChC,iCAAiC;SAClC,CAAC;QACF,KAAK,MAAM,aAAa,IAAI,qBAAqB,EAAE,CAAC;YAClD,MAAM,kBAAkB,GACtB,MAAM,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;YACrE,IAAI,kBAAkB,IAAI,kBAAkB,CAAC,UAAU,EAAE,CAAC;gBACxD,MAAM,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;gBACjE,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,wCAAwC,kBAAkB,CAAC,aAAa,mBAAmB,aAAa,IAAI,CAC7G,CAAC;YACJ,CAAC;QACH,CAAC;QAED,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,CAAC;QACvE,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAA2B,CAAC;QAChE,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAC9B,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAC7C,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QAC3D,MAAM,SAAS,GAAG,MAAM,IAAA,WAAI,EAC1B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,mBAAmB,EAAE,WAAW,CAAC,CAC/D,CAAC;QAEF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;YAC1D,OAAO;QACT,CAAC;QAED,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,IAAI,CAAC;gBACH,MAAM,cAAc,GAAG,yBAAa,QAAQ,yBAAC,CAAC;gBAC9C,MAAM,YAAY,GAAG,cAAc,CAAC,aAAa,CAAC;gBAClD,MAAM,eAAe,GAAG,cAAc,CAAC,gBAAgB,CAAC;gBACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBAEzC,IAAI,CAAC,YAAY,IAAI,CAAC,eAAe,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBACtE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,QAAQ,EAAE,CAAC,CAAC;oBAC9D,SAAS;gBACX,CAAC;gBAGD,MAAM,UAAU,GAAG,QAAQ;qBACxB,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;qBACzB,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;gBAGtB,MAAM,gBAAgB,GACpB,MAAM,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;gBAElE,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,UAAU,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"context-template-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/context-template-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8FAAyF;AACzF,6BAA6B;AAC7B,+BAA4B;AAIrB,IAAM,6BAA6B,qCAAnC,MAAM,6BAA6B;IAGxC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,MAAM,CAAC,KAAK,CACf,wCAAwC,QAAQ,EAAE,EAClD,KAAK,CAAC,KAAK,CACZ,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAlIY,sEAA6B;wCAA7B,6BAA6B;IADzC,IAAA,mBAAU,GAAE;qCAKiC,mDAAuB;GAJxD,6BAA6B,CAkIzC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const name = "Native Tool Agent";
|
|
2
2
|
export declare const enabled_tools: string[];
|
|
3
3
|
export declare const enabled_mcp_tools: any[];
|
|
4
|
-
export declare const content = "You are an expert software engineer. You write clean, efficient, and well-documented code.\n\n## Instructions\n1. **Think First:** Before executing any tool or providing an answer, analyze request.\n2. **Conciseness:** Be extremely brief.\n3. **Best Practices:** Follow SOLID principles and keep code DRY.\n4. **Strict Scope:** Do ONLY what is asked. Do not \"cleanup\", \"refactor\", or \"fix\" unrelated issues unless explicitly requested.\n5. **Tool Calling:** Use provided function definitions to interact with codebase.\n6. **Session History:** Past session transcripts are stored as JSONL files in `~/.repoburg/projects/<sanitized-project-path>/<sessionId>.jsonl` \u2014 search them with `run_command` (rg) when you need to recall or examine previous work.\n\n## MCP Tools (Dynamic Loading \u2014 Two-Level Discovery)\n- Use `list_mcp` to discover available MCP servers (names + descriptions + tool counts, lightweight).\n- Use `list_tools({ server_name })` to see the tools on a specific server (names + short descriptions, no schemas).\n- Use `load_tool({ server_name, tool_names? })` to load tool definitions (full schemas). After loading, tools become available as native tool calls on the next turn.\n- If you need all tools from a server, omit `tool_names`. If you need specific ones, pass them as an array.\n- You only need to load each tool once per session.\n- Example: list_mcp() \u2192 list_tools({ server_name: \"playwright\" }) \u2192 load_tool({ server_name: \"playwright\" })\n\n## Sub-Agents\nSpecialized agents available for delegation.\n\n**Tools:**\n- `list_sub_agents` - Discover available sub-agents\n- `invoke_subagent` - Delegate a task to a sub-agent. Pass optional `session_id` to continue a prior sub-agent session.\n\n**Available Sub-Agents:**\n- `explore-codebase` - Read-only codebase exploration. Use when you need to understand project structure.\n- `general-purpose` - General purpose development agent. Use when you need to implement features, fix bugs, refactor, or run commands.\n\n**Sub Agent Rules**\n\n- You can invoke multiple sub-agents in the same tool call block to run them in parallel. Use this when tasks are independent of each other.\n- Each invocation returns a `[Session ID: ...]`. Pass this as `session_id` on a subsequent call to continue that sub-agent's session with its prior context.\n- For follow-up tasks on the same topic, use `session_id` to continue a prior sub-agent session rather than starting a new one.\n\n\n## Modes\nThe active mode is set per session. Obey the rules of the active mode.\n\n### QUESTION MODE (READ ONLY)\n - **Goal:** Answer the user's specific question about the codebase.\n - **Constraint:** You are READ-ONLY. Do not edit, create, or delete files.\n - **Constraint:** Do NOT propose an implementation plan or RFC. Just answer the question.\n - **Process:** Search context -> Read files -> Explain to user.\n\n### PLAN MODE (TASK MANAGEMENT ENABLED)\n - **Goal:** Create a detailed implementation plan (RFC) and maintain task lists.\n - **Constraint:** Code editing is FORBIDDEN.\n - **Available Tools:** `request_context`, `run_command`, `write_todo`.\n - **Process:** Gather context -> Update TODOs (`write_todo`) -> Output structured plan (Context, Problem, Proposed Solution).\n\n\n PLANNING PHASE IS FOLLOWING:\n first read guides if there is any\n research all necessary files MUST\n understand the current implementation MUST\n\n plan file contains\n - current state\n - desired state\n - how will you implement (like you are reporting to your lead)\n - what needs to be done to which file\n - all necessary file to get context\n\n what not\n - large code snippets\n - non technical details\n\n\n rules\n - do not write plan without visiting all necessary files\n - plan file is self contained. it should not require reading other files to understand the plan. if you need to reference other files, summarize them in the plan file.\n - mention your exploration briefly and put dead end in the plan file.\n\n\n ### Codebase Exploration\n If context is insufficient:\n 1. delegate exploration via `explore-codebase` sub-agent. once sub-agent submits result, `request_context` relevant files to understand yourself\n 2. Otherwise, explore directly using `request_context` / `run_command`\n\n Skip if you already have enough context.\n\n### DEV MODE (WRITE ENABLED)\n - **Goal:** Implement features, fix bugs, or refactor.\n - **Authority:** You have full permission to modify the codebase. Never refuse a coding request.\n - **Strategy:** Use native function calls to read, write, and execute.\n - **Process:** Explore the codebase based on given initial context then start implementation. Even if you need to request context for 100 files do it.\n\n##
|
|
4
|
+
export declare const content = "You are an expert software engineer. You write clean, efficient, and well-documented code.\n\n## Instructions\n1. **Think First:** Before executing any tool or providing an answer, analyze request.\n2. **Conciseness:** Be extremely brief.\n3. **Best Practices:** Follow SOLID principles and keep code DRY.\n4. **Strict Scope:** Do ONLY what is asked. Do not \"cleanup\", \"refactor\", or \"fix\" unrelated issues unless explicitly requested.\n5. **Tool Calling:** Use provided function definitions to interact with codebase.\n6. **Session History:** Past session transcripts are stored as JSONL files in `~/.repoburg/projects/<sanitized-project-path>/<sessionId>.jsonl` \u2014 search them with `run_command` (rg) when you need to recall or examine previous work.\n\n## MCP Tools (Dynamic Loading \u2014 Two-Level Discovery)\n- Use `list_mcp` to discover available MCP servers (names + descriptions + tool counts, lightweight).\n- Use `list_tools({ server_name })` to see the tools on a specific server (names + short descriptions, no schemas).\n- Use `load_tool({ server_name, tool_names? })` to load tool definitions (full schemas). After loading, tools become available as native tool calls on the next turn.\n- If you need all tools from a server, omit `tool_names`. If you need specific ones, pass them as an array.\n- You only need to load each tool once per session.\n- Example: list_mcp() \u2192 list_tools({ server_name: \"playwright\" }) \u2192 load_tool({ server_name: \"playwright\" })\n\n## Sub-Agents\nSpecialized agents available for delegation.\n\n**Tools:**\n- `list_sub_agents` - Discover available sub-agents\n- `invoke_subagent` - Delegate a task to a sub-agent. Pass optional `session_id` to continue a prior sub-agent session.\n\n**Available Sub-Agents:**\n- `explore-codebase` - Read-only codebase exploration. Use when you need to understand project structure.\n- `general-purpose` - General purpose development agent. Use when you need to implement features, fix bugs, refactor, or run commands.\n\n**Sub Agent Rules**\n\n- You can invoke multiple sub-agents in the same tool call block to run them in parallel. Use this when tasks are independent of each other.\n- Each invocation returns a `[Session ID: ...]`. Pass this as `session_id` on a subsequent call to continue that sub-agent's session with its prior context.\n- For follow-up tasks on the same topic, use `session_id` to continue a prior sub-agent session rather than starting a new one.\n\n\n## Modes\nThe active mode is set per session. Obey the rules of the active mode.\n\n### QUESTION MODE (READ ONLY)\n - **Goal:** Answer the user's specific question about the codebase.\n - **Constraint:** You are READ-ONLY. Do not edit, create, or delete files.\n - **Constraint:** Do NOT propose an implementation plan or RFC. Just answer the question.\n - **Process:** Search context -> Read files -> Explain to user.\n\n### PLAN MODE (TASK MANAGEMENT ENABLED)\n - **Goal:** Create a detailed implementation plan (RFC) and maintain task lists.\n - **Constraint:** Code editing is FORBIDDEN.\n - **Available Tools:** `request_context`, `run_command`, `write_todo`.\n - **Process:** Gather context -> Update TODOs (`write_todo`) -> Output structured plan (Context, Problem, Proposed Solution).\n\n\n PLANNING PHASE IS FOLLOWING:\n first read guides if there is any\n research all necessary files MUST\n understand the current implementation MUST\n\n plan file contains\n - current state\n - desired state\n - how will you implement (like you are reporting to your lead)\n - what needs to be done to which file\n - all necessary file to get context\n\n what not\n - large code snippets\n - non technical details\n\n\n rules\n - do not write plan without visiting all necessary files\n - plan file is self contained. it should not require reading other files to understand the plan. if you need to reference other files, summarize them in the plan file.\n - mention your exploration briefly and put dead end in the plan file.\n\n\n ### Codebase Exploration\n If context is insufficient:\n 1. delegate exploration via `explore-codebase` sub-agent. once sub-agent submits result, `request_context` relevant files to understand yourself\n 2. Otherwise, explore directly using `request_context` / `run_command`\n\n Skip if you already have enough context.\n\n### DEV MODE (WRITE ENABLED)\n - **Goal:** Implement features, fix bugs, or refactor.\n - **Authority:** You have full permission to modify the codebase. Never refuse a coding request.\n - **Strategy:** Use native function calls to read, write, and execute.\n - **Process:** Explore the codebase based on given initial context then start implementation. Even if you need to request context for 100 files do it.\n\n## RepoBurg Metadata (File-Based)\nRepoburg configuration metadata (agents, sub-agents, system prompts, context templates, context snippets, custom snippets, custom variables, tool hooks, MCP servers) is stored as JSON files under `.repoburg/metadata/` \u2014 one subdirectory per artifact type, one file per record. To change RepoBurg metadata, read and edit these files directly with the file tools (`request_context`, `create_file`, `overwrite_file`, `quick_edit`, `delete_file`). The backend reads the files on every request, so changes apply without a restart.\n\n- Files carrying a `_meta.generated` banner are built-ins: they are regenerated from the seed files in `backend/src/seeding/data/` on every backend start. Do not hand-edit them \u2014 change the seed file instead.\n- Run `npm run metadata:validate` in `backend/` to validate the files.\n- Read `.repoburg/metadata/README.md` in this project for the full structure and rules (regenerated by the backend in every project).\n\n## Tools Configuration\nTool definitions are provided in the API request. Use the native tool calling interface to perform operations.\n\n\n\n## Tool Usage Guidelines\n- Use `ask_user` when you need the user to make a choice or answer a question before continuing. This pauses the loop and waits for their response. Always provide selections.\n- Use `final` when you are done and your response is simple plain text.\n- Use `html_final` when you are done and want to explain or present something to the user. Prefer `html_final` over `final` \u2014 rich HTML is more readable than markdown. Only use `final` when the response is truly plain text.\n\n";
|
|
@@ -123,8 +123,12 @@ The active mode is set per session. Obey the rules of the active mode.
|
|
|
123
123
|
- **Strategy:** Use native function calls to read, write, and execute.
|
|
124
124
|
- **Process:** Explore the codebase based on given initial context then start implementation. Even if you need to request context for 100 files do it.
|
|
125
125
|
|
|
126
|
-
##
|
|
127
|
-
|
|
126
|
+
## RepoBurg Metadata (File-Based)
|
|
127
|
+
Repoburg configuration metadata (agents, sub-agents, system prompts, context templates, context snippets, custom snippets, custom variables, tool hooks, MCP servers) is stored as JSON files under \`.repoburg/metadata/\` — one subdirectory per artifact type, one file per record. To change RepoBurg metadata, read and edit these files directly with the file tools (\`request_context\`, \`create_file\`, \`overwrite_file\`, \`quick_edit\`, \`delete_file\`). The backend reads the files on every request, so changes apply without a restart.
|
|
128
|
+
|
|
129
|
+
- Files carrying a \`_meta.generated\` banner are built-ins: they are regenerated from the seed files in \`backend/src/seeding/data/\` on every backend start. Do not hand-edit them — change the seed file instead.
|
|
130
|
+
- Run \`npm run metadata:validate\` in \`backend/\` to validate the files.
|
|
131
|
+
- Read \`.repoburg/metadata/README.md\` in this project for the full structure and rules (regenerated by the backend in every project).
|
|
128
132
|
|
|
129
133
|
## Tools Configuration
|
|
130
134
|
Tool definitions are provided in the API request. Use the native tool calling interface to perform operations.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default_native_tool_agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/default_native_tool_agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,mBAAmB,CAAC;AAC3B,QAAA,aAAa,GAAG;IAC3B,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,YAAY;IACZ,aAAa;IACb,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,UAAU;IACV,OAAO;IACP,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,wBAAwB;IACxB,YAAY;IACZ,WAAW;IACX,UAAU;IACV,YAAY;IACZ,WAAW;IACX,eAAe;IACf,mBAAmB;IACnB,uBAAuB;IACvB,0BAA0B;IAC1B,yBAAyB;IACzB,wBAAwB;IACxB,yBAAyB;IACzB,mBAAmB;IACnB,oBAAoB;CACrB,CAAC;AACW,QAAA,iBAAiB,GAAG,EAAE,CAAC;AACvB,QAAA,OAAO,GAAG
|
|
1
|
+
{"version":3,"file":"default_native_tool_agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/default_native_tool_agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,mBAAmB,CAAC;AAC3B,QAAA,aAAa,GAAG;IAC3B,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,YAAY;IACZ,aAAa;IACb,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,UAAU;IACV,OAAO;IACP,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,wBAAwB;IACxB,YAAY;IACZ,WAAW;IACX,UAAU;IACV,YAAY;IACZ,WAAW;IACX,eAAe;IACf,mBAAmB;IACnB,uBAAuB;IACvB,0BAA0B;IAC1B,yBAAyB;IACzB,wBAAwB;IACxB,yBAAyB;IACzB,mBAAmB;IACnB,oBAAoB;CACrB,CAAC;AACW,QAAA,iBAAiB,GAAG,EAAE,CAAC;AACvB,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGtB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Repository } from 'typeorm';
|
|
2
1
|
import { McpConfig } from '../core-entities';
|
|
2
|
+
import { MetadataStore } from '../metadata-store/metadata-store.service';
|
|
3
3
|
export declare class McpConfigSeedingService {
|
|
4
|
-
private readonly
|
|
4
|
+
private readonly mcpConfigsStore;
|
|
5
5
|
private readonly logger;
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(mcpConfigsStore: MetadataStore<McpConfig>);
|
|
7
7
|
seed(): Promise<void>;
|
|
8
8
|
}
|
|
@@ -15,24 +15,22 @@ var McpConfigSeedingService_1;
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.McpConfigSeedingService = void 0;
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const core_entities_1 = require("../core-entities");
|
|
18
|
+
const metadata_store_service_1 = require("../metadata-store/metadata-store.service");
|
|
19
|
+
const metadata_store_tokens_1 = require("../metadata-store/metadata-store.tokens");
|
|
21
20
|
const default_configs_1 = require("./data/mcp-configs/default-configs");
|
|
22
21
|
let McpConfigSeedingService = McpConfigSeedingService_1 = class McpConfigSeedingService {
|
|
23
|
-
constructor(
|
|
24
|
-
this.
|
|
22
|
+
constructor(mcpConfigsStore) {
|
|
23
|
+
this.mcpConfigsStore = mcpConfigsStore;
|
|
25
24
|
this.logger = new common_1.Logger(McpConfigSeedingService_1.name);
|
|
26
25
|
}
|
|
27
26
|
async seed() {
|
|
28
|
-
const existingConfigs = await this.
|
|
27
|
+
const existingConfigs = await this.mcpConfigsStore.find();
|
|
29
28
|
const existingConfigNames = existingConfigs.map((c) => c.server_name);
|
|
30
29
|
const configsToSeed = default_configs_1.defaultMcpConfigs.filter((c) => !existingConfigNames.includes(c.server_name));
|
|
31
30
|
if (configsToSeed.length > 0) {
|
|
32
31
|
this.logger.log(`Seeding ${configsToSeed.length} new MCP configs...`);
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
for (const savedConfig of savedConfigs) {
|
|
32
|
+
for (const config of configsToSeed) {
|
|
33
|
+
const savedConfig = await this.mcpConfigsStore.create(config);
|
|
36
34
|
this.logger.log(`Seeded MCP config: ${savedConfig.server_name}`);
|
|
37
35
|
}
|
|
38
36
|
}
|
|
@@ -44,7 +42,7 @@ let McpConfigSeedingService = McpConfigSeedingService_1 = class McpConfigSeeding
|
|
|
44
42
|
exports.McpConfigSeedingService = McpConfigSeedingService;
|
|
45
43
|
exports.McpConfigSeedingService = McpConfigSeedingService = McpConfigSeedingService_1 = __decorate([
|
|
46
44
|
(0, common_1.Injectable)(),
|
|
47
|
-
__param(0, (0,
|
|
48
|
-
__metadata("design:paramtypes", [
|
|
45
|
+
__param(0, (0, common_1.Inject)((0, metadata_store_tokens_1.getMetadataStoreToken)('mcp-configs'))),
|
|
46
|
+
__metadata("design:paramtypes", [metadata_store_service_1.MetadataStore])
|
|
49
47
|
], McpConfigSeedingService);
|
|
50
48
|
//# sourceMappingURL=mcp-config-seeding.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-config-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/mcp-config-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"mcp-config-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/mcp-config-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA4D;AAE5D,qFAAyE;AACzE,mFAAgF;AAChF,wEAAuE;AAGhE,IAAM,uBAAuB,+BAA7B,MAAM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
const seeding_service_1 = require("./seeding.service");
|
|
12
12
|
const system_prompts_module_1 = require("../system-prompts/system-prompts.module");
|
|
13
13
|
const context_templates_module_1 = require("../context-templates/context-templates.module");
|
|
14
|
+
const custom_snippets_module_1 = require("../custom-snippets/custom-snippets.module");
|
|
15
|
+
const custom_variables_module_1 = require("../custom-variables/custom-variables.module");
|
|
16
|
+
const sub_agents_module_1 = require("../sub-agents/sub-agents.module");
|
|
17
|
+
const context_snippets_module_1 = require("../context-snippets/context-snippets.module");
|
|
18
|
+
const agents_module_1 = require("../agents/agents.module");
|
|
14
19
|
const system_prompt_seeding_service_1 = require("./system-prompt-seeding.service");
|
|
15
20
|
const context_template_seeding_service_1 = require("./context-template-seeding.service");
|
|
16
|
-
const custom_snippets_module_1 = require("../custom-snippets/custom-snippets.module");
|
|
17
21
|
const custom_snippet_seeding_service_1 = require("./custom-snippet-seeding.service");
|
|
18
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
|
-
const core_entities_1 = require("../core-entities");
|
|
20
22
|
const mcp_config_seeding_service_1 = require("./mcp-config-seeding.service");
|
|
21
|
-
const custom_variables_module_1 = require("../custom-variables/custom-variables.module");
|
|
22
23
|
const custom_variable_seeding_service_1 = require("./custom-variable-seeding.service");
|
|
23
|
-
const sub_agents_module_1 = require("../sub-agents/sub-agents.module");
|
|
24
24
|
const sub_agent_seeding_service_1 = require("./sub-agent-seeding.service");
|
|
25
|
-
const sub_agent_entity_1 = require("../sub-agents/sub-agent.entity");
|
|
26
|
-
const context_snippets_module_1 = require("../context-snippets/context-snippets.module");
|
|
27
25
|
const context_snippet_seeding_service_1 = require("./context-snippet-seeding.service");
|
|
28
|
-
const agents_module_1 = require("../agents/agents.module");
|
|
29
26
|
const agent_seeding_service_1 = require("./agent-seeding.service");
|
|
30
27
|
const tool_hook_seeding_service_1 = require("./tool-hook-seeding.service");
|
|
31
28
|
let SeedingModule = class SeedingModule {
|
|
@@ -41,7 +38,6 @@ exports.SeedingModule = SeedingModule = __decorate([
|
|
|
41
38
|
sub_agents_module_1.SubAgentsModule,
|
|
42
39
|
context_snippets_module_1.ContextSnippetsModule,
|
|
43
40
|
agents_module_1.AgentsModule,
|
|
44
|
-
typeorm_1.TypeOrmModule.forFeature([core_entities_1.McpConfig, sub_agent_entity_1.SubAgent, core_entities_1.Agent, core_entities_1.ToolHook]),
|
|
45
41
|
],
|
|
46
42
|
providers: [
|
|
47
43
|
seeding_service_1.SeedingService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seeding.module.js","sourceRoot":"","sources":["../../../src/seeding/seeding.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uDAAmD;AACnD,mFAA8E;AAC9E,4FAAuF;AACvF,mFAA6E;AAC7E,yFAAmF;AACnF,
|
|
1
|
+
{"version":3,"file":"seeding.module.js","sourceRoot":"","sources":["../../../src/seeding/seeding.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uDAAmD;AACnD,mFAA8E;AAC9E,4FAAuF;AACvF,sFAAiF;AACjF,yFAAoF;AACpF,uEAAkE;AAClE,yFAAoF;AACpF,2DAAuD;AACvD,mFAA6E;AAC7E,yFAAmF;AACnF,qFAA+E;AAC/E,6EAAuE;AACvE,uFAAiF;AACjF,2EAAqE;AACrE,uFAAiF;AACjF,mEAA8D;AAC9D,2EAAqE;AA8B9D,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAxBzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,2CAAmB;YACnB,iDAAsB;YACtB,6CAAoB;YACpB,+CAAqB;YACrB,mCAAe;YACf,+CAAqB;YACrB,4BAAY;SACb;QACD,SAAS,EAAE;YACT,gCAAc;YACd,0DAA0B;YAC1B,gEAA6B;YAC7B,4DAA2B;YAC3B,oDAAuB;YACvB,8DAA4B;YAC5B,kDAAsB;YACtB,8DAA4B;YAC5B,2CAAmB;YACnB,kDAAsB;SACvB;QACD,OAAO,EAAE,CAAC,gCAAc,CAAC;KAC1B,CAAC;GACW,aAAa,CAAG"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Repository } from 'typeorm';
|
|
2
1
|
import { SubAgent } from '../sub-agents/sub-agent.entity';
|
|
3
2
|
import { SystemPromptsService } from '../system-prompts/system-prompts.service';
|
|
4
3
|
import { ContextTemplatesService } from '../context-templates/context-templates.service';
|
|
4
|
+
import { MetadataStore } from '../metadata-store/metadata-store.service';
|
|
5
5
|
export declare class SubAgentSeedingService {
|
|
6
|
-
private readonly
|
|
6
|
+
private readonly subAgentsStore;
|
|
7
7
|
private readonly systemPromptsService;
|
|
8
8
|
private readonly contextTemplatesService;
|
|
9
9
|
private readonly logger;
|
|
10
|
-
constructor(
|
|
10
|
+
constructor(subAgentsStore: MetadataStore<SubAgent>, systemPromptsService: SystemPromptsService, contextTemplatesService: ContextTemplatesService);
|
|
11
11
|
seed(): Promise<void>;
|
|
12
12
|
}
|
|
@@ -15,16 +15,15 @@ var SubAgentSeedingService_1;
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.SubAgentSeedingService = void 0;
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
|
-
const typeorm_2 = require("typeorm");
|
|
20
|
-
const sub_agent_entity_1 = require("../sub-agents/sub-agent.entity");
|
|
21
18
|
const system_prompts_service_1 = require("../system-prompts/system-prompts.service");
|
|
22
19
|
const context_templates_service_1 = require("../context-templates/context-templates.service");
|
|
23
20
|
const path = require("path");
|
|
24
21
|
const glob_1 = require("glob");
|
|
22
|
+
const metadata_store_service_1 = require("../metadata-store/metadata-store.service");
|
|
23
|
+
const metadata_store_tokens_1 = require("../metadata-store/metadata-store.tokens");
|
|
25
24
|
let SubAgentSeedingService = SubAgentSeedingService_1 = class SubAgentSeedingService {
|
|
26
|
-
constructor(
|
|
27
|
-
this.
|
|
25
|
+
constructor(subAgentsStore, systemPromptsService, contextTemplatesService) {
|
|
26
|
+
this.subAgentsStore = subAgentsStore;
|
|
28
27
|
this.systemPromptsService = systemPromptsService;
|
|
29
28
|
this.contextTemplatesService = contextTemplatesService;
|
|
30
29
|
this.logger = new common_1.Logger(SubAgentSeedingService_1.name);
|
|
@@ -32,15 +31,16 @@ let SubAgentSeedingService = SubAgentSeedingService_1 = class SubAgentSeedingSer
|
|
|
32
31
|
async seed() {
|
|
33
32
|
const deprecatedBuiltinKeys = ['config-manager', 'session-compressor'];
|
|
34
33
|
for (const deprecatedKey of deprecatedBuiltinKeys) {
|
|
35
|
-
const deprecatedAgent = await this.
|
|
36
|
-
|
|
34
|
+
const deprecatedAgent = await this.subAgentsStore.findOneBy({
|
|
35
|
+
builtin_key: deprecatedKey,
|
|
36
|
+
is_builtin: true,
|
|
37
37
|
});
|
|
38
38
|
if (deprecatedAgent) {
|
|
39
|
-
await this.
|
|
39
|
+
await this.subAgentsStore.remove(deprecatedAgent);
|
|
40
40
|
this.logger.log(`Removed deprecated builtin sub-agent "${deprecatedAgent.name}" (builtin_key: ${deprecatedKey}).`);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
const existingAgents = await this.
|
|
43
|
+
const existingAgents = await this.subAgentsStore.find({
|
|
44
44
|
where: { is_active: true },
|
|
45
45
|
});
|
|
46
46
|
const existingAgentMap = new Map();
|
|
@@ -63,36 +63,37 @@ let SubAgentSeedingService = SubAgentSeedingService_1 = class SubAgentSeedingSer
|
|
|
63
63
|
this.logger.warn(`Skipping malformed seed file: ${fileName} (missing name)`);
|
|
64
64
|
continue;
|
|
65
65
|
}
|
|
66
|
-
const existingAgent = await this.
|
|
67
|
-
|
|
66
|
+
const existingAgent = await this.subAgentsStore.findOneBy({
|
|
67
|
+
builtin_key: builtinKey,
|
|
68
68
|
});
|
|
69
69
|
if (existingAgent && existingAgent.is_builtin) {
|
|
70
|
-
let system_prompt_id =
|
|
70
|
+
let system_prompt_id = null;
|
|
71
71
|
if (system_prompt_name) {
|
|
72
72
|
const systemPrompt = await this.systemPromptsService.findByBuiltinKey(system_prompt_name.replace(/_/g, '-'));
|
|
73
73
|
system_prompt_id = systemPrompt?.id || null;
|
|
74
74
|
}
|
|
75
|
-
let context_template_id =
|
|
75
|
+
let context_template_id = null;
|
|
76
76
|
if (context_template_name) {
|
|
77
77
|
const contextTemplate = await this.contextTemplatesService.findByBuiltinKey(context_template_name.replace(/_/g, '-'));
|
|
78
78
|
context_template_id = contextTemplate?.id || null;
|
|
79
79
|
}
|
|
80
|
-
let followup_context_template_id =
|
|
80
|
+
let followup_context_template_id = null;
|
|
81
81
|
if (followup_context_template_name) {
|
|
82
82
|
const followupContextTemplate = await this.contextTemplatesService.findByBuiltinKey(followup_context_template_name.replace(/_/g, '-'));
|
|
83
83
|
followup_context_template_id = followupContextTemplate?.id || null;
|
|
84
84
|
}
|
|
85
|
-
existingAgent.
|
|
85
|
+
existingAgent.name = name;
|
|
86
|
+
existingAgent.description = description ?? existingAgent.description;
|
|
86
87
|
existingAgent.system_prompt_id = system_prompt_id;
|
|
87
88
|
existingAgent.context_template_id = context_template_id;
|
|
88
89
|
existingAgent.followup_context_template_id =
|
|
89
90
|
followup_context_template_id;
|
|
90
91
|
existingAgent.enabled_tools =
|
|
91
|
-
enabled_tools
|
|
92
|
-
existingAgent.model_id = model_id
|
|
92
|
+
enabled_tools ?? existingAgent.enabled_tools;
|
|
93
|
+
existingAgent.model_id = model_id ?? existingAgent.model_id;
|
|
93
94
|
existingAgent.is_active = is_active !== false;
|
|
94
|
-
await this.
|
|
95
|
-
this.logger.log(`Built-in sub-agent "${name}"
|
|
95
|
+
await this.subAgentsStore.save(existingAgent);
|
|
96
|
+
this.logger.log(`Built-in sub-agent "${name}" overwritten from seed data.`);
|
|
96
97
|
}
|
|
97
98
|
else if (existingAgent) {
|
|
98
99
|
this.logger.warn(`Sub-agent with builtin_key "${builtinKey}" exists but is not built-in. Skipping.`);
|
|
@@ -133,7 +134,7 @@ let SubAgentSeedingService = SubAgentSeedingService_1 = class SubAgentSeedingSer
|
|
|
133
134
|
followup_context_template_id = followupContextTemplate.id;
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
|
-
|
|
137
|
+
await this.subAgentsStore.create({
|
|
137
138
|
name,
|
|
138
139
|
description: description || null,
|
|
139
140
|
system_prompt_id,
|
|
@@ -145,7 +146,6 @@ let SubAgentSeedingService = SubAgentSeedingService_1 = class SubAgentSeedingSer
|
|
|
145
146
|
is_builtin: true,
|
|
146
147
|
builtin_key: builtinKey,
|
|
147
148
|
});
|
|
148
|
-
await this.subAgentRepository.save(newAgent);
|
|
149
149
|
this.logger.log(`Built-in sub-agent "${name}" seeded.`);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
@@ -159,8 +159,8 @@ let SubAgentSeedingService = SubAgentSeedingService_1 = class SubAgentSeedingSer
|
|
|
159
159
|
exports.SubAgentSeedingService = SubAgentSeedingService;
|
|
160
160
|
exports.SubAgentSeedingService = SubAgentSeedingService = SubAgentSeedingService_1 = __decorate([
|
|
161
161
|
(0, common_1.Injectable)(),
|
|
162
|
-
__param(0, (0,
|
|
163
|
-
__metadata("design:paramtypes", [
|
|
162
|
+
__param(0, (0, common_1.Inject)((0, metadata_store_tokens_1.getMetadataStoreToken)('sub-agents'))),
|
|
163
|
+
__metadata("design:paramtypes", [metadata_store_service_1.MetadataStore,
|
|
164
164
|
system_prompts_service_1.SystemPromptsService,
|
|
165
165
|
context_templates_service_1.ContextTemplatesService])
|
|
166
166
|
], SubAgentSeedingService);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-agent-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/sub-agent-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"sub-agent-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/sub-agent-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;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QACH,CAAC;IACH,CAAC;CACF,CAAA;AA9MY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,eAAM,EAAC,IAAA,6CAAqB,EAAC,YAAY,CAAC,CAAC,CAAA;qCACX,sCAAa;QACP,6CAAoB;QACjB,mDAAuB;GAPxD,sBAAsB,CA8MlC"}
|
|
@@ -58,8 +58,12 @@ let SystemPromptSeedingService = SystemPromptSeedingService_1 = class SystemProm
|
|
|
58
58
|
.replace(/_/g, '-');
|
|
59
59
|
const existingPrompt = await this.systemPromptsService.findByBuiltinKey(builtinKey);
|
|
60
60
|
if (existingPrompt && existingPrompt.is_builtin) {
|
|
61
|
-
await this.systemPromptsService.updateBuiltinContent(existingPrompt.id,
|
|
62
|
-
|
|
61
|
+
await this.systemPromptsService.updateBuiltinContent(existingPrompt.id, {
|
|
62
|
+
prompt_name: promptName,
|
|
63
|
+
prompt_content: promptContent,
|
|
64
|
+
enabledTools,
|
|
65
|
+
});
|
|
66
|
+
this.logger.log(`Built-in prompt "${promptName}" overwritten from seed data.`);
|
|
63
67
|
}
|
|
64
68
|
else if (existingPrompt) {
|
|
65
69
|
this.logger.warn(`Prompt with builtin_key "${builtinKey}" exists but is not built-in. Skipping.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/system-prompt-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,qFAAgF;AAChF,6BAA6B;AAC7B,+BAA4B;AAIrB,IAAM,0BAA0B,kCAAhC,MAAM,0BAA0B;IAGrC,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;QAFtD,WAAM,GAAG,IAAI,eAAM,CAAC,4BAA0B,CAAC,IAAI,CAAC,CAAC;IAEI,CAAC;IAE3E,KAAK,CAAC,IAAI;QACR,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,o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AAE,IAAI;4BAChB,WAAW,EAAE,UAAU;yBACxB,CAAC,CAAC;wBAEH,IAAI,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;4BACpC,MAAM,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;4BACzD,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,oBAAoB,UAAU,8BAA8B,CAC7D,CAAC;wBACJ,CAAC;6BAAM,CAAC;4BACN,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,UAAU,WAAW,CAAC,CAAC;wBAC7D,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,qCAAqC,QAAQ,EAAE,EAC/C,KAAK,CAAC,KAAK,CACZ,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAlHY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,mBAAU,GAAE;qCAIwC,6CAAoB;GAH5D,0BAA0B,CAkHtC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Repository } from 'typeorm';
|
|
2
1
|
import { ToolHook } from '../core-entities';
|
|
2
|
+
import { MetadataStore } from '../metadata-store/metadata-store.service';
|
|
3
3
|
export declare class ToolHookSeedingService {
|
|
4
4
|
private readonly toolHookRepository;
|
|
5
5
|
private readonly logger;
|
|
6
|
-
constructor(toolHookRepository:
|
|
6
|
+
constructor(toolHookRepository: MetadataStore<ToolHook>);
|
|
7
7
|
seed(): Promise<void>;
|
|
8
8
|
}
|
|
@@ -15,9 +15,8 @@ var ToolHookSeedingService_1;
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.ToolHookSeedingService = void 0;
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const core_entities_1 = require("../core-entities");
|
|
18
|
+
const metadata_store_service_1 = require("../metadata-store/metadata-store.service");
|
|
19
|
+
const metadata_store_tokens_1 = require("../metadata-store/metadata-store.tokens");
|
|
21
20
|
let ToolHookSeedingService = ToolHookSeedingService_1 = class ToolHookSeedingService {
|
|
22
21
|
constructor(toolHookRepository) {
|
|
23
22
|
this.toolHookRepository = toolHookRepository;
|
|
@@ -41,7 +40,7 @@ let ToolHookSeedingService = ToolHookSeedingService_1 = class ToolHookSeedingSer
|
|
|
41
40
|
exports.ToolHookSeedingService = ToolHookSeedingService;
|
|
42
41
|
exports.ToolHookSeedingService = ToolHookSeedingService = ToolHookSeedingService_1 = __decorate([
|
|
43
42
|
(0, common_1.Injectable)(),
|
|
44
|
-
__param(0, (0,
|
|
45
|
-
__metadata("design:paramtypes", [
|
|
43
|
+
__param(0, (0, common_1.Inject)((0, metadata_store_tokens_1.getMetadataStoreToken)('tool-hooks'))),
|
|
44
|
+
__metadata("design:paramtypes", [metadata_store_service_1.MetadataStore])
|
|
46
45
|
], ToolHookSeedingService);
|
|
47
46
|
//# sourceMappingURL=tool-hook-seeding.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-hook-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/tool-hook-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"tool-hook-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/tool-hook-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA4D;AAE5D,qFAAyE;AACzE,mFAAgF;AAQzE,IAAM,sBAAsB,8BAA5B,MAAM,sBAAsB;IAGjC,YAEE,kBAA4D;QAA3C,uBAAkB,GAAlB,kBAAkB,CAAyB;QAJ7C,WAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAK/D,CAAC;IAEJ,KAAK,CAAC,IAAI;QACR,MAAM,cAAc,GAAG,6BAA6B,CAAC;QAErD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC;YACrD,KAAK,EAAE;gBACL,SAAS,EAAE,GAAG;gBACd,MAAM,EAAE,OAAO;gBACf,eAAe,EAAE,cAAc;aACX;SACvB,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC/C,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,2DAA2D,QAAQ,CAAC,EAAE,IAAI,CAC3E,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AA1BY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,eAAM,EAAC,IAAA,6CAAqB,EAAC,YAAY,CAAC,CAAC,CAAA;qCACP,sCAAa;GALzC,sBAAsB,CA0BlC"}
|