@loxia-labs/loxia-autopilot-one 1.0.1 → 1.0.4
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 +44 -54
- package/bin/cli.js +1 -115
- package/bin/loxia-terminal-v2.js +3 -0
- package/bin/loxia-terminal.js +3 -0
- package/bin/start-with-terminal.js +3 -0
- package/package.json +15 -15
- package/scripts/install-scanners.js +1 -235
- package/src/analyzers/CSSAnalyzer.js +1 -297
- package/src/analyzers/ConfigValidator.js +1 -690
- package/src/analyzers/ESLintAnalyzer.js +1 -320
- package/src/analyzers/JavaScriptAnalyzer.js +1 -261
- package/src/analyzers/PrettierFormatter.js +1 -247
- package/src/analyzers/PythonAnalyzer.js +1 -266
- package/src/analyzers/SecurityAnalyzer.js +1 -729
- package/src/analyzers/TypeScriptAnalyzer.js +1 -247
- package/src/analyzers/codeCloneDetector/analyzer.js +1 -344
- package/src/analyzers/codeCloneDetector/detector.js +1 -203
- package/src/analyzers/codeCloneDetector/index.js +1 -160
- package/src/analyzers/codeCloneDetector/parser.js +1 -199
- package/src/analyzers/codeCloneDetector/reporter.js +1 -148
- package/src/analyzers/codeCloneDetector/scanner.js +1 -59
- package/src/core/agentPool.js +1 -1474
- package/src/core/agentScheduler.js +1 -2147
- package/src/core/contextManager.js +1 -709
- package/src/core/messageProcessor.js +1 -732
- package/src/core/orchestrator.js +1 -548
- package/src/core/stateManager.js +1 -877
- package/src/index.js +1 -631
- package/src/interfaces/cli.js +1 -549
- package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -0
- package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -0
- package/src/interfaces/terminal/api/apiClient.js +1 -0
- package/src/interfaces/terminal/api/messageRouter.js +1 -0
- package/src/interfaces/terminal/api/session.js +1 -0
- package/src/interfaces/terminal/api/websocket.js +1 -0
- package/src/interfaces/terminal/components/AgentCreator.js +1 -0
- package/src/interfaces/terminal/components/AgentEditor.js +1 -0
- package/src/interfaces/terminal/components/AgentSwitcher.js +1 -0
- package/src/interfaces/terminal/components/ErrorBoundary.js +1 -0
- package/src/interfaces/terminal/components/ErrorPanel.js +1 -0
- package/src/interfaces/terminal/components/Header.js +1 -0
- package/src/interfaces/terminal/components/HelpPanel.js +1 -0
- package/src/interfaces/terminal/components/InputBox.js +1 -0
- package/src/interfaces/terminal/components/Layout.js +1 -0
- package/src/interfaces/terminal/components/LoadingSpinner.js +1 -0
- package/src/interfaces/terminal/components/MessageList.js +1 -0
- package/src/interfaces/terminal/components/MultilineTextInput.js +1 -0
- package/src/interfaces/terminal/components/SearchPanel.js +1 -0
- package/src/interfaces/terminal/components/SettingsPanel.js +1 -0
- package/src/interfaces/terminal/components/StatusBar.js +1 -0
- package/src/interfaces/terminal/components/TextInput.js +1 -0
- package/src/interfaces/terminal/config/agentEditorConstants.js +1 -0
- package/src/interfaces/terminal/config/constants.js +1 -0
- package/src/interfaces/terminal/index.js +1 -0
- package/src/interfaces/terminal/state/useAgentControl.js +1 -0
- package/src/interfaces/terminal/state/useAgents.js +1 -0
- package/src/interfaces/terminal/state/useConnection.js +1 -0
- package/src/interfaces/terminal/state/useMessages.js +1 -0
- package/src/interfaces/terminal/state/useTools.js +1 -0
- package/src/interfaces/terminal/utils/debugLogger.js +1 -0
- package/src/interfaces/terminal/utils/settingsStorage.js +1 -0
- package/src/interfaces/terminal/utils/theme.js +1 -0
- package/src/interfaces/webServer.js +1 -2162
- package/src/modules/fileExplorer/controller.js +1 -280
- package/src/modules/fileExplorer/index.js +1 -37
- package/src/modules/fileExplorer/middleware.js +1 -92
- package/src/modules/fileExplorer/routes.js +1 -125
- package/src/modules/fileExplorer/types.js +1 -44
- package/src/services/aiService.js +1 -1232
- package/src/services/apiKeyManager.js +1 -164
- package/src/services/benchmarkService.js +1 -366
- package/src/services/budgetService.js +1 -539
- package/src/services/contextInjectionService.js +1 -247
- package/src/services/conversationCompactionService.js +1 -637
- package/src/services/errorHandler.js +1 -810
- package/src/services/fileAttachmentService.js +1 -544
- package/src/services/modelRouterService.js +1 -366
- package/src/services/modelsService.js +1 -322
- package/src/services/qualityInspector.js +1 -796
- package/src/services/tokenCountingService.js +1 -536
- package/src/tools/agentCommunicationTool.js +1 -1344
- package/src/tools/agentDelayTool.js +1 -485
- package/src/tools/asyncToolManager.js +1 -604
- package/src/tools/baseTool.js +1 -800
- package/src/tools/browserTool.js +1 -920
- package/src/tools/cloneDetectionTool.js +1 -621
- package/src/tools/dependencyResolverTool.js +1 -1215
- package/src/tools/fileContentReplaceTool.js +1 -875
- package/src/tools/fileSystemTool.js +1 -1107
- package/src/tools/fileTreeTool.js +1 -853
- package/src/tools/imageTool.js +1 -901
- package/src/tools/importAnalyzerTool.js +1 -1060
- package/src/tools/jobDoneTool.js +1 -248
- package/src/tools/seekTool.js +1 -956
- package/src/tools/staticAnalysisTool.js +1 -1778
- package/src/tools/taskManagerTool.js +1 -2873
- package/src/tools/terminalTool.js +1 -2304
- package/src/tools/webTool.js +1 -1430
- package/src/types/agent.js +1 -519
- package/src/types/contextReference.js +1 -972
- package/src/types/conversation.js +1 -730
- package/src/types/toolCommand.js +1 -747
- package/src/utilities/attachmentValidator.js +1 -292
- package/src/utilities/configManager.js +1 -582
- package/src/utilities/constants.js +1 -722
- package/src/utilities/directoryAccessManager.js +1 -535
- package/src/utilities/fileProcessor.js +1 -307
- package/src/utilities/logger.js +1 -436
- package/src/utilities/tagParser.js +1 -1246
- package/src/utilities/toolConstants.js +1 -317
- package/web-ui/build/index.html +2 -2
- package/web-ui/build/static/{index-Dy2bYbOa.css → index-CClD1090.css} +1 -1
- package/web-ui/build/static/{index-CjkkcnFA.js → index-lCBai6dX.js} +66 -67
package/src/tools/jobDoneTool.js
CHANGED
|
@@ -1,248 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Job Done Tool - Signals task completion in autonomous mode
|
|
3
|
-
*
|
|
4
|
-
* Purpose:
|
|
5
|
-
* - Allow agents to explicitly signal when a task is complete
|
|
6
|
-
* - Provide completion summary/reason
|
|
7
|
-
* - Gracefully exit autonomous mode
|
|
8
|
-
* - Return to chat mode (unless in locked mode)
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { BaseTool } from './baseTool.js';
|
|
12
|
-
import TagParser from '../utilities/tagParser.js';
|
|
13
|
-
|
|
14
|
-
class JobDoneTool extends BaseTool {
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
this.id = 'jobdone';
|
|
18
|
-
this.name = 'Job Done';
|
|
19
|
-
this.description = 'Call this tool when you have successfully completed the assigned task, OR if you are stuck/unable to proceed after multiple failed attempts. Provide a summary of what was accomplished or what prevented completion. This will exit autonomous mode and return control to the user.';
|
|
20
|
-
this.version = '1.0.0';
|
|
21
|
-
this.capabilities = ['task-completion', 'mode-control'];
|
|
22
|
-
this.requiresProject = false;
|
|
23
|
-
this.async = false;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Get tool description for LLM consumption
|
|
28
|
-
* @returns {string} Tool description
|
|
29
|
-
*/
|
|
30
|
-
getDescription() {
|
|
31
|
-
return `
|
|
32
|
-
Job Done Tool: Signal task completion in autonomous mode and exit to chat mode.
|
|
33
|
-
|
|
34
|
-
Usage Instructions:
|
|
35
|
-
- Call this tool when you have SUCCESSFULLY completed the assigned task
|
|
36
|
-
- Also call this tool if you are STUCK or UNABLE to proceed after multiple failed attempts
|
|
37
|
-
- Provide a clear summary of what was accomplished OR what prevented completion
|
|
38
|
-
- This will immediately exit autonomous mode and return control to the user
|
|
39
|
-
|
|
40
|
-
Examples:
|
|
41
|
-
- "Created 5 song files successfully with lyrics and melodies"
|
|
42
|
-
- "Unable to proceed: missing API credentials for the service"
|
|
43
|
-
- "Stuck after 3 failed compilation attempts - syntax errors persist"
|
|
44
|
-
- "Task partially complete: implemented 2 of 3 requested features"
|
|
45
|
-
|
|
46
|
-
The tool will format a completion message and gracefully exit autonomous mode.
|
|
47
|
-
`.trim();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Parse parameters from tool command content
|
|
52
|
-
* @param {string} content - Raw tool command content
|
|
53
|
-
* @returns {Object} Parsed parameters object
|
|
54
|
-
*/
|
|
55
|
-
parseParameters(content) {
|
|
56
|
-
try {
|
|
57
|
-
// For JobDoneTool, we expect the content to be structured with tags
|
|
58
|
-
// or we can parse it as a simple completion message
|
|
59
|
-
|
|
60
|
-
// Try to extract structured content first
|
|
61
|
-
const summaryMatches = TagParser.extractContent(content, 'summary');
|
|
62
|
-
const detailsMatches = TagParser.extractContent(content, 'details');
|
|
63
|
-
const successMatches = TagParser.extractContent(content, 'success');
|
|
64
|
-
|
|
65
|
-
let summary = '';
|
|
66
|
-
let details = '';
|
|
67
|
-
let success = true;
|
|
68
|
-
|
|
69
|
-
if (summaryMatches.length > 0) {
|
|
70
|
-
// Structured format with tags
|
|
71
|
-
summary = summaryMatches[0].trim();
|
|
72
|
-
details = detailsMatches.length > 0 ? detailsMatches[0].trim() : '';
|
|
73
|
-
success = successMatches.length > 0 ? (successMatches[0].toLowerCase() !== 'false') : true;
|
|
74
|
-
} else {
|
|
75
|
-
// Fallback: use the entire content as summary
|
|
76
|
-
summary = content.trim() || 'Task completed';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return {
|
|
80
|
-
actions: [{
|
|
81
|
-
action: 'complete',
|
|
82
|
-
summary: summary,
|
|
83
|
-
success: success,
|
|
84
|
-
details: details || undefined
|
|
85
|
-
}]
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
} catch (error) {
|
|
89
|
-
// Fallback to simple parsing
|
|
90
|
-
return {
|
|
91
|
-
actions: [{
|
|
92
|
-
action: 'complete',
|
|
93
|
-
summary: content.trim() || 'Task completed',
|
|
94
|
-
success: true
|
|
95
|
-
}]
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Get tool schema for AI model
|
|
102
|
-
* @returns {Object} Tool schema
|
|
103
|
-
*/
|
|
104
|
-
getSchema() {
|
|
105
|
-
return {
|
|
106
|
-
type: 'object',
|
|
107
|
-
properties: {
|
|
108
|
-
actions: {
|
|
109
|
-
type: 'array',
|
|
110
|
-
items: {
|
|
111
|
-
type: 'object',
|
|
112
|
-
properties: {
|
|
113
|
-
action: {
|
|
114
|
-
type: 'string',
|
|
115
|
-
enum: ['complete'],
|
|
116
|
-
description: 'Mark task as complete - always use "complete"'
|
|
117
|
-
},
|
|
118
|
-
summary: {
|
|
119
|
-
type: 'string',
|
|
120
|
-
description: 'Clear summary of what you accomplished OR what prevented completion (e.g., "Created 5 song files successfully", "Unable to proceed: missing API credentials", "Stuck after 3 failed compilation attempts")'
|
|
121
|
-
},
|
|
122
|
-
success: {
|
|
123
|
-
type: 'boolean',
|
|
124
|
-
default: true,
|
|
125
|
-
description: 'Set to true if task completed successfully, false if stuck/failed or partial completion'
|
|
126
|
-
},
|
|
127
|
-
details: {
|
|
128
|
-
type: 'string',
|
|
129
|
-
description: 'Optional: Additional details about what was done, what failed, any files created, or next steps for the user'
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
required: ['action', 'summary'],
|
|
133
|
-
additionalProperties: false
|
|
134
|
-
},
|
|
135
|
-
minItems: 1,
|
|
136
|
-
maxItems: 1
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
required: ['actions'],
|
|
140
|
-
additionalProperties: false
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Execute job done action
|
|
146
|
-
* @param {Object} parameters - Tool parameters
|
|
147
|
-
* @param {Object} context - Execution context
|
|
148
|
-
* @returns {Promise<Object>} Execution result
|
|
149
|
-
*/
|
|
150
|
-
async execute(parameters, context = {}) {
|
|
151
|
-
try {
|
|
152
|
-
const { actions } = parameters;
|
|
153
|
-
|
|
154
|
-
if (!actions || !Array.isArray(actions) || actions.length === 0) {
|
|
155
|
-
throw new Error('Actions array is required');
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
const action = actions[0];
|
|
159
|
-
|
|
160
|
-
if (action.action !== 'complete') {
|
|
161
|
-
throw new Error('Invalid action. Only "complete" is supported');
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
if (!action.summary) {
|
|
165
|
-
throw new Error('Completion summary is required');
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Get agent information for context
|
|
169
|
-
const agentId = context.agentId;
|
|
170
|
-
let agentInfo = '';
|
|
171
|
-
|
|
172
|
-
if (agentId && context.toolsRegistry) {
|
|
173
|
-
try {
|
|
174
|
-
// Try to get agent info through AgentPool if available
|
|
175
|
-
if (this.agentPool) {
|
|
176
|
-
const agent = await this.agentPool.getAgent(agentId);
|
|
177
|
-
if (agent) {
|
|
178
|
-
agentInfo = ` by agent "${agent.name}"`;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
} catch (error) {
|
|
182
|
-
// Ignore agent info errors
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// Format completion message
|
|
187
|
-
const completionMessage = `✅ Task completed${agentInfo}${action.success !== false ? ' successfully' : ' with issues'}
|
|
188
|
-
|
|
189
|
-
**Summary:** ${action.summary}${action.details ? `
|
|
190
|
-
|
|
191
|
-
**Details:** ${action.details}` : ''}
|
|
192
|
-
|
|
193
|
-
*Autonomous mode will now exit.*`;
|
|
194
|
-
|
|
195
|
-
// Return result indicating task completion
|
|
196
|
-
return {
|
|
197
|
-
success: true,
|
|
198
|
-
output: completionMessage,
|
|
199
|
-
taskComplete: true,
|
|
200
|
-
summary: action.summary,
|
|
201
|
-
details: action.details || null,
|
|
202
|
-
successfulCompletion: action.success !== false,
|
|
203
|
-
metadata: {
|
|
204
|
-
toolId: this.id,
|
|
205
|
-
agentId: agentId || 'unknown',
|
|
206
|
-
completedAt: new Date().toISOString(),
|
|
207
|
-
action: action.action
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
} catch (error) {
|
|
212
|
-
return {
|
|
213
|
-
success: false,
|
|
214
|
-
error: error.message,
|
|
215
|
-
output: `Failed to mark task as complete: ${error.message}`,
|
|
216
|
-
taskComplete: false
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Set AgentPool dependency for agent information
|
|
223
|
-
* @param {AgentPool} agentPool - AgentPool instance
|
|
224
|
-
*/
|
|
225
|
-
setAgentPool(agentPool) {
|
|
226
|
-
this.agentPool = agentPool;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Get tool capabilities
|
|
231
|
-
* @returns {Object} Tool capabilities
|
|
232
|
-
*/
|
|
233
|
-
getCapabilities() {
|
|
234
|
-
return {
|
|
235
|
-
id: this.id,
|
|
236
|
-
name: this.name,
|
|
237
|
-
description: this.description,
|
|
238
|
-
version: this.version,
|
|
239
|
-
capabilities: this.capabilities,
|
|
240
|
-
requiresProject: this.requiresProject,
|
|
241
|
-
async: this.async,
|
|
242
|
-
enabled: true,
|
|
243
|
-
schema: this.getSchema()
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export default JobDoneTool;
|
|
1
|
+
(function(_0x58436e,_0x6365b2){const _0x4e4bc6=a0_0x4e98,_0x10b9fd=_0x58436e();while(!![]){try{const _0x3b8b45=parseInt(_0x4e4bc6(0x81))/0x1+-parseInt(_0x4e4bc6(0x70))/0x2+parseInt(_0x4e4bc6(0x90))/0x3+parseInt(_0x4e4bc6(0x6c))/0x4*(parseInt(_0x4e4bc6(0x87))/0x5)+-parseInt(_0x4e4bc6(0x7f))/0x6+parseInt(_0x4e4bc6(0x86))/0x7*(parseInt(_0x4e4bc6(0x7c))/0x8)+-parseInt(_0x4e4bc6(0x8d))/0x9*(parseInt(_0x4e4bc6(0x75))/0xa);if(_0x3b8b45===_0x6365b2)break;else _0x10b9fd['push'](_0x10b9fd['shift']());}catch(_0x820686){_0x10b9fd['push'](_0x10b9fd['shift']());}}}(a0_0x59a8,0xbd7eb));import{BaseTool}from'./baseTool.js';import a0_0x5e7ba2 from'../utilities/tagParser.js';class JobDoneTool extends BaseTool{constructor(){const _0x49757c=a0_0x4e98;super(),this['id']=_0x49757c(0x7d),this['name']=_0x49757c(0x71),this['description']='Call\x20this\x20tool\x20when\x20you\x20have\x20successfully\x20completed\x20the\x20assigned\x20task,\x20OR\x20if\x20you\x20are\x20stuck/unable\x20to\x20proceed\x20after\x20multiple\x20failed\x20attempts.\x20Provide\x20a\x20summary\x20of\x20what\x20was\x20accomplished\x20or\x20what\x20prevented\x20completion.\x20This\x20will\x20exit\x20autonomous\x20mode\x20and\x20return\x20control\x20to\x20the\x20user.',this['version']='1.0.0',this['capabilities']=['task-completion','mode-control'],this[_0x49757c(0x6b)]=![],this[_0x49757c(0x83)]=![];}['getDescription'](){const _0x4c0d95=a0_0x4e98;return'\x0aJob\x20Done\x20Tool:\x20Signal\x20task\x20completion\x20in\x20autonomous\x20mode\x20and\x20exit\x20to\x20chat\x20mode.\x0a\x0aUsage\x20Instructions:\x0a-\x20Call\x20this\x20tool\x20when\x20you\x20have\x20SUCCESSFULLY\x20completed\x20the\x20assigned\x20task\x0a-\x20Also\x20call\x20this\x20tool\x20if\x20you\x20are\x20STUCK\x20or\x20UNABLE\x20to\x20proceed\x20after\x20multiple\x20failed\x20attempts\x0a-\x20Provide\x20a\x20clear\x20summary\x20of\x20what\x20was\x20accomplished\x20OR\x20what\x20prevented\x20completion\x0a-\x20This\x20will\x20immediately\x20exit\x20autonomous\x20mode\x20and\x20return\x20control\x20to\x20the\x20user\x0a\x0aExamples:\x0a-\x20\x22Created\x205\x20song\x20files\x20successfully\x20with\x20lyrics\x20and\x20melodies\x22\x0a-\x20\x22Unable\x20to\x20proceed:\x20missing\x20API\x20credentials\x20for\x20the\x20service\x22\x0a-\x20\x22Stuck\x20after\x203\x20failed\x20compilation\x20attempts\x20-\x20syntax\x20errors\x20persist\x22\x0a-\x20\x22Task\x20partially\x20complete:\x20implemented\x202\x20of\x203\x20requested\x20features\x22\x0a\x0aThe\x20tool\x20will\x20format\x20a\x20completion\x20message\x20and\x20gracefully\x20exit\x20autonomous\x20mode.\x0a\x20\x20\x20\x20'[_0x4c0d95(0x8e)]();}['parseParameters'](_0x88e15c){const _0x9ea826=a0_0x4e98;try{const _0x1a8b50=a0_0x5e7ba2[_0x9ea826(0x6a)](_0x88e15c,_0x9ea826(0x77)),_0x45075f=a0_0x5e7ba2[_0x9ea826(0x6a)](_0x88e15c,'details'),_0x210d4a=a0_0x5e7ba2['extractContent'](_0x88e15c,'success');let _0x3dc10a='',_0x3321ce='',_0x8b4fe1=!![];return _0x1a8b50[_0x9ea826(0x72)]>0x0?(_0x3dc10a=_0x1a8b50[0x0][_0x9ea826(0x8e)](),_0x3321ce=_0x45075f['length']>0x0?_0x45075f[0x0][_0x9ea826(0x8e)]():'',_0x8b4fe1=_0x210d4a['length']>0x0?_0x210d4a[0x0][_0x9ea826(0x6f)]()!=='false':!![]):_0x3dc10a=_0x88e15c[_0x9ea826(0x8e)]()||_0x9ea826(0x8c),{'actions':[{'action':'complete','summary':_0x3dc10a,'success':_0x8b4fe1,'details':_0x3321ce||undefined}]};}catch(_0x134323){return{'actions':[{'action':'complete','summary':_0x88e15c[_0x9ea826(0x8e)]()||'Task\x20completed','success':!![]}]};}}['getSchema'](){const _0x408ec9=a0_0x4e98;return{'type':'object','properties':{'actions':{'type':'array','items':{'type':_0x408ec9(0x74),'properties':{'action':{'type':_0x408ec9(0x80),'enum':['complete'],'description':'Mark\x20task\x20as\x20complete\x20-\x20always\x20use\x20\x22complete\x22'},'summary':{'type':'string','description':'Clear\x20summary\x20of\x20what\x20you\x20accomplished\x20OR\x20what\x20prevented\x20completion\x20(e.g.,\x20\x22Created\x205\x20song\x20files\x20successfully\x22,\x20\x22Unable\x20to\x20proceed:\x20missing\x20API\x20credentials\x22,\x20\x22Stuck\x20after\x203\x20failed\x20compilation\x20attempts\x22)'},'success':{'type':_0x408ec9(0x6d),'default':!![],'description':'Set\x20to\x20true\x20if\x20task\x20completed\x20successfully,\x20false\x20if\x20stuck/failed\x20or\x20partial\x20completion'},'details':{'type':_0x408ec9(0x80),'description':'Optional:\x20Additional\x20details\x20about\x20what\x20was\x20done,\x20what\x20failed,\x20any\x20files\x20created,\x20or\x20next\x20steps\x20for\x20the\x20user'}},'required':[_0x408ec9(0x7b),_0x408ec9(0x77)],'additionalProperties':![]},'minItems':0x1,'maxItems':0x1}},'required':['actions'],'additionalProperties':![]};}async['execute'](_0x115429,_0x9f6166={}){const _0x420d38=a0_0x4e98;try{const {actions:_0x3d32c6}=_0x115429;if(!_0x3d32c6||!Array['isArray'](_0x3d32c6)||_0x3d32c6['length']===0x0)throw new Error('Actions\x20array\x20is\x20required');const _0x4e1a7b=_0x3d32c6[0x0];if(_0x4e1a7b[_0x420d38(0x7b)]!==_0x420d38(0x8f))throw new Error(_0x420d38(0x8b));if(!_0x4e1a7b[_0x420d38(0x77)])throw new Error('Completion\x20summary\x20is\x20required');const _0x417ba=_0x9f6166['agentId'];let _0x17343c='';if(_0x417ba&&_0x9f6166['toolsRegistry'])try{if(this[_0x420d38(0x88)]){const _0x5d5886=await this['agentPool'][_0x420d38(0x82)](_0x417ba);_0x5d5886&&(_0x17343c='\x20by\x20agent\x20\x22'+_0x5d5886['name']+'\x22');}}catch(_0x28d008){}const _0x19d516=_0x420d38(0x84)+_0x17343c+(_0x4e1a7b['success']!==![]?'\x20successfully':_0x420d38(0x78))+'\x0a\x0a**Summary:**\x20'+_0x4e1a7b[_0x420d38(0x77)]+(_0x4e1a7b['details']?_0x420d38(0x73)+_0x4e1a7b[_0x420d38(0x8a)]:'')+'\x0a\x0a*Autonomous\x20mode\x20will\x20now\x20exit.*';return{'success':!![],'output':_0x19d516,'taskComplete':!![],'summary':_0x4e1a7b[_0x420d38(0x77)],'details':_0x4e1a7b[_0x420d38(0x8a)]||null,'successfulCompletion':_0x4e1a7b[_0x420d38(0x7e)]!==![],'metadata':{'toolId':this['id'],'agentId':_0x417ba||_0x420d38(0x6e),'completedAt':new Date()[_0x420d38(0x89)](),'action':_0x4e1a7b['action']}};}catch(_0x95a790){return{'success':![],'error':_0x95a790[_0x420d38(0x79)],'output':_0x420d38(0x7a)+_0x95a790['message'],'taskComplete':![]};}}['setAgentPool'](_0x87d490){const _0x224509=a0_0x4e98;this[_0x224509(0x88)]=_0x87d490;}['getCapabilities'](){const _0x597bcb=a0_0x4e98;return{'id':this['id'],'name':this[_0x597bcb(0x76)],'description':this['description'],'version':this['version'],'capabilities':this['capabilities'],'requiresProject':this['requiresProject'],'async':this[_0x597bcb(0x83)],'enabled':!![],'schema':this[_0x597bcb(0x85)]()};}}export default JobDoneTool;function a0_0x4e98(_0x23f744,_0x176319){_0x23f744=_0x23f744-0x6a;const _0x59a854=a0_0x59a8();let _0x4e9897=_0x59a854[_0x23f744];if(a0_0x4e98['nZIiBq']===undefined){var _0x24c78e=function(_0x40d431){const _0x3098e7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5e7ba2='',_0x88e15c='';for(let _0x1a8b50=0x0,_0x45075f,_0x210d4a,_0x3dc10a=0x0;_0x210d4a=_0x40d431['charAt'](_0x3dc10a++);~_0x210d4a&&(_0x45075f=_0x1a8b50%0x4?_0x45075f*0x40+_0x210d4a:_0x210d4a,_0x1a8b50++%0x4)?_0x5e7ba2+=String['fromCharCode'](0xff&_0x45075f>>(-0x2*_0x1a8b50&0x6)):0x0){_0x210d4a=_0x3098e7['indexOf'](_0x210d4a);}for(let _0x3321ce=0x0,_0x8b4fe1=_0x5e7ba2['length'];_0x3321ce<_0x8b4fe1;_0x3321ce++){_0x88e15c+='%'+('00'+_0x5e7ba2['charCodeAt'](_0x3321ce)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x88e15c);};a0_0x4e98['buXtvr']=_0x24c78e,a0_0x4e98['xGMpaw']={},a0_0x4e98['nZIiBq']=!![];}const _0x2f571e=_0x59a854[0x0],_0x299b59=_0x23f744+_0x2f571e,_0x50ffca=a0_0x4e98['xGMpaw'][_0x299b59];return!_0x50ffca?(_0x4e9897=a0_0x4e98['buXtvr'](_0x4e9897),a0_0x4e98['xGMpaw'][_0x299b59]=_0x4e9897):_0x4e9897=_0x50ffca,_0x4e9897;}function a0_0x59a8(){const _0x2675e1=['DhjPBq','y29TCgXLDgu','mJeZodmZn3PKD1vbDW','zxH0CMfJDenVBNrLBNq','CMvXDwLYzxnqCM9Qzwn0','mtG0ugjfEwzh','yM9VBgvHBG','Dw5RBM93BG','Dg9mB3DLCKnHC2u','mtC5ndC4mLH4DNDguq','sM9IierVBMu','BgvUz3rO','cGOQkKrLDgfPBhm6kIOG','B2jQzwn0','mZb0z09Ishi','BMfTzq','C3vTBwfYEq','ihDPDgGGAxnZDwvZ','BwvZC2fNzq','rMfPBgvKihrVig1HCMSGDgfZAYbHCYbJB21WBgv0ztOG','ywn0Aw9U','ntCWndHPzLDrDfi','AM9Izg9Uzq','C3vJy2vZCW','ndKZnZuZoevprvbgvW','C3rYAw5N','nJK3ody0sKrNwen1','z2v0qwDLBNq','yxn5BMm','4PYfifrHC2SGy29TCgXLDgvK','z2v0u2nOzw1H','mtm3mLjrEeX1yG','nJq3mhPVBMrQyW','ywDLBNrqB29S','Dg9ju09tDhjPBMC','zgv0ywLSCW','sw52ywXPzcbHy3rPB24Uie9UBhKGiMnVBxbSzxrLiIbPCYbZDxbWB3j0zwq','vgfZAYbJB21WBgv0zwq','mteXnda3ngXlD3jyCG'];a0_0x59a8=function(){return _0x2675e1;};return a0_0x59a8();}
|