repoburg 1.3.126 → 1.3.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/backend/.env +3 -1
  2. package/backend/dist/src/core-entities/system-prompt.entity.d.ts +1 -0
  3. package/backend/dist/src/core-entities/system-prompt.entity.js +8 -0
  4. package/backend/dist/src/core-entities/system-prompt.entity.js.map +1 -1
  5. package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.d.ts +3 -13
  6. package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js +65 -187
  7. package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js.map +1 -1
  8. package/backend/dist/src/llm-orchestration/action-handlers/mcp-tool-action.handler.js +2 -0
  9. package/backend/dist/src/llm-orchestration/action-handlers/mcp-tool-action.handler.js.map +1 -1
  10. package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +3 -12
  11. package/backend/dist/src/llm-orchestration/llm-orchestration.module.js.map +1 -1
  12. package/backend/dist/src/llm-orchestration/llm-turn-processor.service.d.ts +1 -3
  13. package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js +2 -33
  14. package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js.map +1 -1
  15. package/backend/dist/src/llm-orchestration/tool-schema.service.js +8 -4
  16. package/backend/dist/src/llm-orchestration/tool-schema.service.js.map +1 -1
  17. package/backend/dist/src/mcp/mcp.service.d.ts +1 -0
  18. package/backend/dist/src/mcp/mcp.service.js +16 -0
  19. package/backend/dist/src/mcp/mcp.service.js.map +1 -1
  20. package/backend/dist/src/seeding/data/sub-agents/browser-use.d.ts +9 -0
  21. package/backend/dist/src/seeding/data/sub-agents/browser-use.js +13 -0
  22. package/backend/dist/src/seeding/data/sub-agents/browser-use.js.map +1 -0
  23. package/backend/dist/src/seeding/data/sub-agents/explore-codebase.d.ts +3 -3
  24. package/backend/dist/src/seeding/data/sub-agents/explore-codebase.js +3 -3
  25. package/backend/dist/src/seeding/data/sub-agents/explore-codebase.js.map +1 -1
  26. package/backend/dist/src/seeding/data/system-prompts/browser-use-agent.d.ts +3 -0
  27. package/backend/dist/src/seeding/data/system-prompts/browser-use-agent.js +39 -0
  28. package/backend/dist/src/seeding/data/system-prompts/browser-use-agent.js.map +1 -0
  29. package/backend/dist/src/seeding/data/system-prompts/default_native_tool_agent.d.ts +1 -1
  30. package/backend/dist/src/seeding/data/system-prompts/default_native_tool_agent.js +5 -5
  31. package/backend/dist/src/seeding/data/system-prompts/master-agent.d.ts +1 -1
  32. package/backend/dist/src/seeding/data/system-prompts/master-agent.js +14 -3
  33. package/backend/dist/src/seeding/data/system-prompts/master-agent.js.map +1 -1
  34. package/backend/dist/src/seeding/sub-agent-seeding.service.js +14 -1
  35. package/backend/dist/src/seeding/sub-agent-seeding.service.js.map +1 -1
  36. package/backend/dist/src/sub-agents/dto/create-sub-agent.dto.d.ts +1 -0
  37. package/backend/dist/src/sub-agents/dto/create-sub-agent.dto.js +8 -0
  38. package/backend/dist/src/sub-agents/dto/create-sub-agent.dto.js.map +1 -1
  39. package/backend/dist/src/sub-agents/dto/update-sub-agent.dto.d.ts +1 -0
  40. package/backend/dist/src/sub-agents/dto/update-sub-agent.dto.js +7 -0
  41. package/backend/dist/src/sub-agents/dto/update-sub-agent.dto.js.map +1 -1
  42. package/backend/dist/src/sub-agents/sub-agent-runner.service.d.ts +47 -0
  43. package/backend/dist/src/sub-agents/sub-agent-runner.service.js +523 -0
  44. package/backend/dist/src/sub-agents/sub-agent-runner.service.js.map +1 -0
  45. package/backend/dist/src/sub-agents/sub-agent-runs.controller.d.ts +4 -3
  46. package/backend/dist/src/sub-agents/sub-agent-runs.controller.js +10 -5
  47. package/backend/dist/src/sub-agents/sub-agent-runs.controller.js.map +1 -1
  48. package/backend/dist/src/sub-agents/sub-agent.entity.d.ts +1 -0
  49. package/backend/dist/src/sub-agents/sub-agent.entity.js +8 -0
  50. package/backend/dist/src/sub-agents/sub-agent.entity.js.map +1 -1
  51. package/backend/dist/src/sub-agents/sub-agents.module.js +16 -5
  52. package/backend/dist/src/sub-agents/sub-agents.module.js.map +1 -1
  53. package/backend/dist/src/sub-agents/sub-agents.service.d.ts +2 -0
  54. package/backend/dist/src/sub-agents/sub-agents.service.js +42 -2
  55. package/backend/dist/src/sub-agents/sub-agents.service.js.map +1 -1
  56. package/backend/dist/src/system-prompts/dto/set-enabled-mcp-tools.dto.d.ts +4 -0
  57. package/backend/dist/src/system-prompts/dto/set-enabled-mcp-tools.dto.js +38 -0
  58. package/backend/dist/src/system-prompts/dto/set-enabled-mcp-tools.dto.js.map +1 -0
  59. package/backend/dist/src/system-prompts/dto/system-prompt.dto.d.ts +2 -0
  60. package/backend/dist/src/system-prompts/dto/system-prompt.dto.js +16 -0
  61. package/backend/dist/src/system-prompts/dto/system-prompt.dto.js.map +1 -1
  62. package/backend/dist/src/system-prompts/dto/toggle-mcp-tool.dto.d.ts +3 -0
  63. package/backend/dist/src/system-prompts/dto/toggle-mcp-tool.dto.js +27 -0
  64. package/backend/dist/src/system-prompts/dto/toggle-mcp-tool.dto.js.map +1 -0
  65. package/backend/dist/src/system-prompts/system-prompts.controller.d.ts +17 -0
  66. package/backend/dist/src/system-prompts/system-prompts.controller.js +83 -0
  67. package/backend/dist/src/system-prompts/system-prompts.controller.js.map +1 -1
  68. package/backend/dist/src/system-prompts/system-prompts.service.d.ts +11 -0
  69. package/backend/dist/src/system-prompts/system-prompts.service.js +115 -1
  70. package/backend/dist/src/system-prompts/system-prompts.service.js.map +1 -1
  71. package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
  72. package/package.json +1 -1
  73. package/backend/dist/src/llm-orchestration/hooks/sub-agent-final-response.hook.d.ts +0 -14
  74. package/backend/dist/src/llm-orchestration/hooks/sub-agent-final-response.hook.js +0 -80
  75. package/backend/dist/src/llm-orchestration/hooks/sub-agent-final-response.hook.js.map +0 -1
  76. package/backend/dist/src/seeding/data/sub-agents/handover-session.d.ts +0 -8
  77. package/backend/dist/src/seeding/data/sub-agents/handover-session.js +0 -18
  78. package/backend/dist/src/seeding/data/sub-agents/handover-session.js.map +0 -1
  79. package/backend/dist/src/seeding/data/system-prompts/handover-agent.d.ts +0 -3
  80. package/backend/dist/src/seeding/data/system-prompts/handover-agent.js +0 -69
  81. package/backend/dist/src/seeding/data/system-prompts/handover-agent.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repoburg",
3
- "version": "1.3.126",
3
+ "version": "1.3.128",
4
4
  "description": "A local AI-powered software developer assistant that runs on your own machine.",
5
5
  "author": "Celal Ertug",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1,14 +0,0 @@
1
- import { PostExecutionHook } from './post-execution-hook.interface';
2
- import { SessionInput } from '../../core-entities';
3
- import { PlanExecutionContext } from '../llm-orchestration.interfaces';
4
- import { SessionsService } from '../../sessions/sessions.service';
5
- import { SessionInputsService } from '../../session-inputs/session-inputs.service';
6
- import { SubAgentRunsService } from '../../sub-agents/sub-agent-runs.service';
7
- export declare class SubAgentFinalResponseHook implements PostExecutionHook {
8
- private readonly sessionsService;
9
- private readonly sessionInputsService;
10
- private readonly subAgentRunsService;
11
- private readonly logger;
12
- constructor(sessionsService: SessionsService, sessionInputsService: SessionInputsService, subAgentRunsService: SubAgentRunsService);
13
- run(sessionInput: SessionInput, context: PlanExecutionContext): Promise<void>;
14
- }
@@ -1,80 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var SubAgentFinalResponseHook_1;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.SubAgentFinalResponseHook = void 0;
14
- const common_1 = require("@nestjs/common");
15
- const sessions_service_1 = require("../../sessions/sessions.service");
16
- const session_inputs_service_1 = require("../../session-inputs/session-inputs.service");
17
- const sub_agent_runs_service_1 = require("../../sub-agents/sub-agent-runs.service");
18
- let SubAgentFinalResponseHook = SubAgentFinalResponseHook_1 = class SubAgentFinalResponseHook {
19
- constructor(sessionsService, sessionInputsService, subAgentRunsService) {
20
- this.sessionsService = sessionsService;
21
- this.sessionInputsService = sessionInputsService;
22
- this.subAgentRunsService = subAgentRunsService;
23
- this.logger = new common_1.Logger(SubAgentFinalResponseHook_1.name);
24
- }
25
- async run(sessionInput, context) {
26
- const session = await this.sessionsService.findOne(sessionInput.session_id);
27
- if (!session.parent_session_id) {
28
- return;
29
- }
30
- const finalAction = sessionInput.aiActions?.find((action) => action.action_type === 'final');
31
- if (!finalAction) {
32
- return;
33
- }
34
- this.logger.log(`Sub-agent ${session.sub_agent_id} called final() in session ${session.id}. Routing response to master session ${session.parent_session_id}.`);
35
- const run = await this.subAgentRunsService.findByChildSessionId(session.id);
36
- if (run?.status === 'cancelled') {
37
- this.logger.log(`Subagent run was cancelled. Ignoring result.`);
38
- return;
39
- }
40
- const finalResponseText = finalAction.plain || '';
41
- const subAgentName = session.subAgent?.name || 'Unknown Agent';
42
- if (run) {
43
- await this.subAgentRunsService.markCompleted(session.id, finalResponseText);
44
- this.logger.log(`Marked SubAgentRun ${run.id} as completed`);
45
- }
46
- const masterPrompt = `[Sub-Agent Result: ${subAgentName}]\n\n${finalResponseText}\n\n[End Sub-Agent Result]`;
47
- await this.sessionInputsService.create(session.parent_session_id, {
48
- user_prompt: masterPrompt,
49
- execution_strategy: 'auto_apply',
50
- });
51
- await this.sessionsService.setActive(session.parent_session_id);
52
- this.logger.log(`Submitted sub-agent result to master session ${session.parent_session_id}`);
53
- const hasActiveRuns = await this.subAgentRunsService.hasActiveRuns(session.parent_session_id);
54
- if (!hasActiveRuns) {
55
- this.logger.log(`All subagents complete for session ${session.parent_session_id}. Checking for pending tool results...`);
56
- const parentSession = await this.sessionsService.findOne(session.parent_session_id);
57
- const latestBlockedInput = parentSession.sessionInputs
58
- ?.filter((input) => input.tool_calls)
59
- .sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime())[0];
60
- if (latestBlockedInput) {
61
- this.logger.log(`Found pending tool calls in input ${latestBlockedInput.id}. Triggering follow-up.`);
62
- await this.sessionInputsService.create(session.parent_session_id, {
63
- user_prompt: '',
64
- execution_strategy: latestBlockedInput.execution_strategy,
65
- skip_persistence: true,
66
- ad_hoc_context_definition: undefined,
67
- context_template_id: undefined,
68
- });
69
- }
70
- }
71
- }
72
- };
73
- exports.SubAgentFinalResponseHook = SubAgentFinalResponseHook;
74
- exports.SubAgentFinalResponseHook = SubAgentFinalResponseHook = SubAgentFinalResponseHook_1 = __decorate([
75
- (0, common_1.Injectable)(),
76
- __metadata("design:paramtypes", [sessions_service_1.SessionsService,
77
- session_inputs_service_1.SessionInputsService,
78
- sub_agent_runs_service_1.SubAgentRunsService])
79
- ], SubAgentFinalResponseHook);
80
- //# sourceMappingURL=sub-agent-final-response.hook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sub-agent-final-response.hook.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/hooks/sub-agent-final-response.hook.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AAIpD,sEAAkE;AAClE,wFAAmF;AACnF,oFAA8E;AAQvE,IAAM,yBAAyB,iCAA/B,MAAM,yBAAyB;IAGpC,YACmB,eAAgC,EAChC,oBAA0C,EAC1C,mBAAwC;QAFxC,oBAAe,GAAf,eAAe,CAAiB;QAChC,yBAAoB,GAApB,oBAAoB,CAAs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AGF,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAiB,EAAE;oBAChE,WAAW,EAAE,EAAE;oBACf,kBAAkB,EAAE,kBAAkB,CAAC,kBAAkB;oBACzD,gBAAgB,EAAE,IAAI;oBACtB,yBAAyB,EAAE,SAAS;oBACpC,mBAAmB,EAAE,SAAS;iBAC/B,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AA7GY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;qCAKyB,kCAAe;QACV,6CAAoB;QACrB,4CAAmB;GANhD,yBAAyB,CA6GrC"}
@@ -1,8 +0,0 @@
1
- export declare const name = "handover-session";
2
- export declare const description = "Session compression and handover. Exports session, compresses messages, and imports as new session.";
3
- export declare const system_prompt_name = "Handover Agent";
4
- export declare const context_template_name: any;
5
- export declare const followup_context_template_name: any;
6
- export declare const enabled_tools: string[];
7
- export declare const model_id: any;
8
- export declare const is_active = true;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.is_active = exports.model_id = exports.enabled_tools = exports.followup_context_template_name = exports.context_template_name = exports.system_prompt_name = exports.description = exports.name = void 0;
4
- exports.name = 'handover-session';
5
- exports.description = 'Session compression and handover. Exports session, compresses messages, and imports as new session.';
6
- exports.system_prompt_name = 'Handover Agent';
7
- exports.context_template_name = null;
8
- exports.followup_context_template_name = null;
9
- exports.enabled_tools = [
10
- 'run_command',
11
- 'request_context',
12
- 'create_file',
13
- 'overwrite_file',
14
- 'final',
15
- ];
16
- exports.model_id = null;
17
- exports.is_active = true;
18
- //# sourceMappingURL=handover-session.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handover-session.js","sourceRoot":"","sources":["../../../../../src/seeding/data/sub-agents/handover-session.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,kBAAkB,CAAC;AAC1B,QAAA,WAAW,GACtB,qGAAqG,CAAC;AAC3F,QAAA,kBAAkB,GAAG,gBAAgB,CAAC;AACtC,QAAA,qBAAqB,GAAG,IAAI,CAAC;AAC7B,QAAA,8BAA8B,GAAG,IAAI,CAAC;AACtC,QAAA,aAAa,GAAG;IAC3B,aAAa;IACb,iBAAiB;IACjB,aAAa;IACb,gBAAgB;IAChB,OAAO;CACR,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,CAAC;AAChB,QAAA,SAAS,GAAG,IAAI,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "Handover Agent";
2
- export declare const enabled_tools: string[];
3
- export declare const content = "You are a session compression specialist. Your task is to compress a session into a new, shorter session while preserving essential context.\n\n## Your Task\nYou will receive a target session ID in the prompt. Compress that session by exporting, editing, and re-importing it.\n\n### Step 1: Export the Session\nUse run_command to export the session to a unique path using the session ID:\n```\nrepoburg export <SESSION_ID> /tmp/<SESSION_ID>.json -i <INSTANCE_NAME>\n```\n\nNote: If instance name is not provided in the prompt, use \"default\".\n\n### Step 2: Read the Exported JSON\nUse request_context to read the exported file:\n```\ntool: request_context\nargs: { \"files\": \"/tmp/<SESSION_ID>.json\" }\n```\n\n### Step 3: Compress the Messages\nAnalyze the exported JSON and create a compressed version:\n- **Keep intact**: System prompt message (first message with role \"system\")\n- **Keep intact**: Last 4-6 conversation turns (user + assistant pairs + tool results)\n- **Compress older turns**:\n - Remove verbose file contents from request_context tool results\n - Replace large tool outputs with brief summaries\n - Keep tool names, file paths, and decision outcomes\n - Preserve critical context: decisions made, files modified, outstanding tasks\n\n### Step 4: Write Compressed JSON\nUse create_file to write the compressed session to a unique path:\n```\ntool: create_file\nargs: { \"file_path\": \"/tmp/<SESSION_ID>-compressed.json\", \"content\": \"<compressed JSON string>\" }\n```\n\n### Step 5: Import Compressed Session\nUse run_command to import:\n```\nrepoburg import /tmp/<SESSION_ID>-compressed.json -i <INSTANCE_NAME>\n```\n\n### Step 6: Report Result\nUse final to report the new session ID (parsed from import output):\n```\ntool: final\nargs: { \"plain\": \"Session compressed successfully. New session ID: <new_id>\" }\n```\n\n## Compression Guidelines\n- Target: ~50% reduction in total message content\n- Keep all file paths and key decisions\n- Remove duplicate/redundant context\n- Preserve: tool call IDs, reasoning traces, critical outcomes\n- For large request_context outputs: Replace with \"[Previous context: <brief summary>]\"\n";
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.content = exports.enabled_tools = exports.name = void 0;
4
- exports.name = 'Handover Agent';
5
- exports.enabled_tools = [
6
- 'run_command',
7
- 'request_context',
8
- 'create_file',
9
- 'overwrite_file',
10
- 'final',
11
- ];
12
- exports.content = `You are a session compression specialist. Your task is to compress a session into a new, shorter session while preserving essential context.
13
-
14
- ## Your Task
15
- You will receive a target session ID in the prompt. Compress that session by exporting, editing, and re-importing it.
16
-
17
- ### Step 1: Export the Session
18
- Use run_command to export the session to a unique path using the session ID:
19
- \`\`\`
20
- repoburg export <SESSION_ID> /tmp/<SESSION_ID>.json -i <INSTANCE_NAME>
21
- \`\`\`
22
-
23
- Note: If instance name is not provided in the prompt, use "default".
24
-
25
- ### Step 2: Read the Exported JSON
26
- Use request_context to read the exported file:
27
- \`\`\`
28
- tool: request_context
29
- args: { "files": "/tmp/<SESSION_ID>.json" }
30
- \`\`\`
31
-
32
- ### Step 3: Compress the Messages
33
- Analyze the exported JSON and create a compressed version:
34
- - **Keep intact**: System prompt message (first message with role "system")
35
- - **Keep intact**: Last 4-6 conversation turns (user + assistant pairs + tool results)
36
- - **Compress older turns**:
37
- - Remove verbose file contents from request_context tool results
38
- - Replace large tool outputs with brief summaries
39
- - Keep tool names, file paths, and decision outcomes
40
- - Preserve critical context: decisions made, files modified, outstanding tasks
41
-
42
- ### Step 4: Write Compressed JSON
43
- Use create_file to write the compressed session to a unique path:
44
- \`\`\`
45
- tool: create_file
46
- args: { "file_path": "/tmp/<SESSION_ID>-compressed.json", "content": "<compressed JSON string>" }
47
- \`\`\`
48
-
49
- ### Step 5: Import Compressed Session
50
- Use run_command to import:
51
- \`\`\`
52
- repoburg import /tmp/<SESSION_ID>-compressed.json -i <INSTANCE_NAME>
53
- \`\`\`
54
-
55
- ### Step 6: Report Result
56
- Use final to report the new session ID (parsed from import output):
57
- \`\`\`
58
- tool: final
59
- args: { "plain": "Session compressed successfully. New session ID: <new_id>" }
60
- \`\`\`
61
-
62
- ## Compression Guidelines
63
- - Target: ~50% reduction in total message content
64
- - Keep all file paths and key decisions
65
- - Remove duplicate/redundant context
66
- - Preserve: tool call IDs, reasoning traces, critical outcomes
67
- - For large request_context outputs: Replace with "[Previous context: <brief summary>]"
68
- `;
69
- //# sourceMappingURL=handover-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handover-agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/handover-agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,gBAAgB,CAAC;AACxB,QAAA,aAAa,GAAG;IAC3B,aAAa;IACb,iBAAiB;IACjB,aAAa;IACb,gBAAgB;IAChB,OAAO;CACR,CAAC;AACW,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDtB,CAAC"}