smooth-operator-agent-tools
Version:
Node.js client library for Smooth Operator Agent Tools - a toolkit for programmers developing Computer Use Agents on Windows systems
40 lines • 1.27 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.CodeApi = void 0;
/**
* API endpoints for code execution operations
*/
class CodeApi {
/**
* Creates a new instance of the CodeApi
* @param client The SmoothOperatorClient instance
*/
constructor(client) {
this.client = client;
}
/**
* Executes C# code on server and returns output
* @param code C# code to run
* @returns CSharpCodeResponse with execution result
*/
async executeCSharp(code) {
return this.client.post('/tools-api/code/csharp', { code });
}
/**
* Generate and execute C# code based on a description
* @param taskDescription Description of what the C# code should do, include error feedback if a previous try wasn't successful
* @returns CSharpCodeResponse with execution result
*/
async generateAndExecuteCSharp(taskDescription) {
return this.client.post('/tools-api/code/csharp/generate-and-execute', { taskDescription });
}
/**
* Returns a string representation of the CodeApi class.
* @returns The string "CodeApi".
*/
toString() {
return 'CodeApi';
}
}
exports.CodeApi = CodeApi;
//# sourceMappingURL=code-api.js.map
;