mirror of
https://github.com/hanzoai/sdk.git
synced 2026-11-02 10:34:12 +00:00
- Consolidated Python, JavaScript, Rust, and Go SDKs - Standard directory structure (src/py, src/js, src/rs, src/go) - Real implementations from existing SDKs (not stubs) - Comprehensive test framework with CI/CD matrix - Dual distribution support (pip and npm) - Language parity for all core commands - Smart routing based on language strengths
37 lines
834 B
JavaScript
37 lines
834 B
JavaScript
"use strict";
|
|
/**
|
|
* Node management
|
|
*/
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Node = void 0;
|
|
class Node {
|
|
constructor(port = 4000) {
|
|
this.port = port;
|
|
this.running = false;
|
|
this.models = [];
|
|
}
|
|
async start() {
|
|
this.running = true;
|
|
console.log(`Node started on port ${this.port}`);
|
|
}
|
|
async stop() {
|
|
this.running = false;
|
|
console.log('Node stopped');
|
|
}
|
|
getStatus() {
|
|
return {
|
|
running: this.running,
|
|
port: this.port,
|
|
models: this.models
|
|
};
|
|
}
|
|
async loadModel(model) {
|
|
this.models.push(model);
|
|
console.log(`Model ${model} loaded`);
|
|
}
|
|
listModels() {
|
|
return this.models;
|
|
}
|
|
}
|
|
exports.Node = Node;
|
|
//# sourceMappingURL=node.js.map
|