onbuzz 3.3.0
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/LICENSE +267 -0
- package/README.md +425 -0
- package/bin/cli.js +556 -0
- package/bin/loxia-terminal-v2.js +162 -0
- package/bin/loxia-terminal.js +90 -0
- package/bin/start-with-terminal.js +200 -0
- package/node_modules/@isaacs/balanced-match/LICENSE.md +23 -0
- package/node_modules/@isaacs/balanced-match/README.md +60 -0
- package/node_modules/@isaacs/balanced-match/dist/commonjs/index.d.ts +9 -0
- package/node_modules/@isaacs/balanced-match/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@isaacs/balanced-match/dist/commonjs/index.js +59 -0
- package/node_modules/@isaacs/balanced-match/dist/commonjs/index.js.map +1 -0
- package/node_modules/@isaacs/balanced-match/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/balanced-match/dist/esm/index.d.ts +9 -0
- package/node_modules/@isaacs/balanced-match/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@isaacs/balanced-match/dist/esm/index.js +54 -0
- package/node_modules/@isaacs/balanced-match/dist/esm/index.js.map +1 -0
- package/node_modules/@isaacs/balanced-match/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/balanced-match/package.json +79 -0
- package/node_modules/@isaacs/brace-expansion/LICENSE +23 -0
- package/node_modules/@isaacs/brace-expansion/README.md +97 -0
- package/node_modules/@isaacs/brace-expansion/dist/commonjs/index.d.ts +6 -0
- package/node_modules/@isaacs/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js +199 -0
- package/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js.map +1 -0
- package/node_modules/@isaacs/brace-expansion/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/brace-expansion/dist/esm/index.d.ts +6 -0
- package/node_modules/@isaacs/brace-expansion/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@isaacs/brace-expansion/dist/esm/index.js +195 -0
- package/node_modules/@isaacs/brace-expansion/dist/esm/index.js.map +1 -0
- package/node_modules/@isaacs/brace-expansion/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/brace-expansion/package.json +60 -0
- package/node_modules/glob/LICENSE.md +63 -0
- package/node_modules/glob/README.md +1177 -0
- package/node_modules/glob/dist/commonjs/glob.d.ts +388 -0
- package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/glob.js +247 -0
- package/node_modules/glob/dist/commonjs/glob.js.map +1 -0
- package/node_modules/glob/dist/commonjs/has-magic.d.ts +14 -0
- package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
- package/node_modules/glob/dist/commonjs/ignore.d.ts +24 -0
- package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
- package/node_modules/glob/dist/commonjs/index.d.ts +97 -0
- package/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/index.js +68 -0
- package/node_modules/glob/dist/commonjs/index.js.map +1 -0
- package/node_modules/glob/dist/commonjs/index.min.js +4 -0
- package/node_modules/glob/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/glob/dist/commonjs/package.json +3 -0
- package/node_modules/glob/dist/commonjs/pattern.d.ts +76 -0
- package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/pattern.js +219 -0
- package/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
- package/node_modules/glob/dist/commonjs/processor.d.ts +59 -0
- package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/node_modules/glob/dist/commonjs/processor.js.map +1 -0
- package/node_modules/glob/dist/commonjs/walker.d.ts +97 -0
- package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/node_modules/glob/dist/commonjs/walker.js.map +1 -0
- package/node_modules/glob/dist/esm/glob.d.ts +388 -0
- package/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/glob.js +243 -0
- package/node_modules/glob/dist/esm/glob.js.map +1 -0
- package/node_modules/glob/dist/esm/has-magic.d.ts +14 -0
- package/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/has-magic.js +23 -0
- package/node_modules/glob/dist/esm/has-magic.js.map +1 -0
- package/node_modules/glob/dist/esm/ignore.d.ts +24 -0
- package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/ignore.js +115 -0
- package/node_modules/glob/dist/esm/ignore.js.map +1 -0
- package/node_modules/glob/dist/esm/index.d.ts +97 -0
- package/node_modules/glob/dist/esm/index.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/index.js +55 -0
- package/node_modules/glob/dist/esm/index.js.map +1 -0
- package/node_modules/glob/dist/esm/index.min.js +4 -0
- package/node_modules/glob/dist/esm/index.min.js.map +7 -0
- package/node_modules/glob/dist/esm/package.json +3 -0
- package/node_modules/glob/dist/esm/pattern.d.ts +76 -0
- package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/pattern.js +215 -0
- package/node_modules/glob/dist/esm/pattern.js.map +1 -0
- package/node_modules/glob/dist/esm/processor.d.ts +59 -0
- package/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/processor.js +294 -0
- package/node_modules/glob/dist/esm/processor.js.map +1 -0
- package/node_modules/glob/dist/esm/walker.d.ts +97 -0
- package/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/walker.js +381 -0
- package/node_modules/glob/dist/esm/walker.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/LICENSE.md +55 -0
- package/node_modules/glob/node_modules/minimatch/README.md +453 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts +20 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.js +591 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts +94 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/index.js +1029 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- package/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/ast.d.ts +20 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/ast.js +587 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/ast.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/escape.js +26 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/escape.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/index.d.ts +94 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/index.js +1016 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/index.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/unescape.js +34 -0
- package/node_modules/glob/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
- package/node_modules/glob/node_modules/minimatch/package.json +67 -0
- package/node_modules/glob/package.json +101 -0
- package/node_modules/minipass/LICENSE +15 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts +549 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/commonjs/index.js +1028 -0
- package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.d.ts +549 -0
- package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/esm/index.js +1018 -0
- package/node_modules/minipass/dist/esm/index.js.map +1 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +82 -0
- package/node_modules/package-json-from-dist/LICENSE.md +63 -0
- package/node_modules/package-json-from-dist/README.md +110 -0
- package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts +89 -0
- package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/package-json-from-dist/dist/commonjs/index.js +134 -0
- package/node_modules/package-json-from-dist/dist/commonjs/index.js.map +1 -0
- package/node_modules/package-json-from-dist/dist/commonjs/package.json +3 -0
- package/node_modules/package-json-from-dist/dist/esm/index.d.ts +89 -0
- package/node_modules/package-json-from-dist/dist/esm/index.d.ts.map +1 -0
- package/node_modules/package-json-from-dist/dist/esm/index.js +129 -0
- package/node_modules/package-json-from-dist/dist/esm/index.js.map +1 -0
- package/node_modules/package-json-from-dist/dist/esm/package.json +3 -0
- package/node_modules/package-json-from-dist/package.json +68 -0
- package/node_modules/path-scurry/LICENSE.md +55 -0
- package/node_modules/path-scurry/README.md +636 -0
- package/node_modules/path-scurry/dist/commonjs/index.d.ts +1115 -0
- package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
- package/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
- package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/dist/esm/index.d.ts +1115 -0
- package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
- package/node_modules/path-scurry/dist/esm/index.js +1983 -0
- package/node_modules/path-scurry/dist/esm/index.js.map +1 -0
- package/node_modules/path-scurry/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/LICENSE.md +55 -0
- package/node_modules/path-scurry/node_modules/lru-cache/README.md +383 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts +1323 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js +1589 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts +1323 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js +1585 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/package.json +101 -0
- package/node_modules/path-scurry/package.json +88 -0
- package/node_modules/rimraf/LICENSE.md +55 -0
- package/node_modules/rimraf/README.md +226 -0
- package/node_modules/rimraf/dist/commonjs/default-tmp.d.ts +3 -0
- package/node_modules/rimraf/dist/commonjs/default-tmp.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/default-tmp.js +58 -0
- package/node_modules/rimraf/dist/commonjs/default-tmp.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/error.d.ts +6 -0
- package/node_modules/rimraf/dist/commonjs/error.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/error.js +10 -0
- package/node_modules/rimraf/dist/commonjs/error.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts +3 -0
- package/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/fix-eperm.js +38 -0
- package/node_modules/rimraf/dist/commonjs/fix-eperm.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/fs.d.ts +15 -0
- package/node_modules/rimraf/dist/commonjs/fs.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/fs.js +33 -0
- package/node_modules/rimraf/dist/commonjs/fs.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts +3 -0
- package/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/ignore-enoent.js +24 -0
- package/node_modules/rimraf/dist/commonjs/ignore-enoent.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/index.d.ts +50 -0
- package/node_modules/rimraf/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/index.js +78 -0
- package/node_modules/rimraf/dist/commonjs/index.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/opt-arg.d.ts +34 -0
- package/node_modules/rimraf/dist/commonjs/opt-arg.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/opt-arg.js +53 -0
- package/node_modules/rimraf/dist/commonjs/opt-arg.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/package.json +3 -0
- package/node_modules/rimraf/dist/commonjs/path-arg.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/path-arg.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/path-arg.js +48 -0
- package/node_modules/rimraf/dist/commonjs/path-arg.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts +3 -0
- package/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/readdir-or-error.js +19 -0
- package/node_modules/rimraf/dist/commonjs/readdir-or-error.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/retry-busy.d.ts +8 -0
- package/node_modules/rimraf/dist/commonjs/retry-busy.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/retry-busy.js +65 -0
- package/node_modules/rimraf/dist/commonjs/retry-busy.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts +3 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-manual.js +8 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-manual.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js +138 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-native.js +24 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-native.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-posix.js +103 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-posix.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-windows.js +159 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-windows.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/use-native.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/use-native.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/use-native.js +18 -0
- package/node_modules/rimraf/dist/commonjs/use-native.js.map +1 -0
- package/node_modules/rimraf/dist/esm/bin.d.mts +3 -0
- package/node_modules/rimraf/dist/esm/bin.d.mts.map +1 -0
- package/node_modules/rimraf/dist/esm/bin.mjs +250 -0
- package/node_modules/rimraf/dist/esm/bin.mjs.map +1 -0
- package/node_modules/rimraf/dist/esm/default-tmp.d.ts +3 -0
- package/node_modules/rimraf/dist/esm/default-tmp.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/default-tmp.js +55 -0
- package/node_modules/rimraf/dist/esm/default-tmp.js.map +1 -0
- package/node_modules/rimraf/dist/esm/error.d.ts +6 -0
- package/node_modules/rimraf/dist/esm/error.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/error.js +5 -0
- package/node_modules/rimraf/dist/esm/error.js.map +1 -0
- package/node_modules/rimraf/dist/esm/fix-eperm.d.ts +3 -0
- package/node_modules/rimraf/dist/esm/fix-eperm.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/fix-eperm.js +33 -0
- package/node_modules/rimraf/dist/esm/fix-eperm.js.map +1 -0
- package/node_modules/rimraf/dist/esm/fs.d.ts +15 -0
- package/node_modules/rimraf/dist/esm/fs.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/fs.js +18 -0
- package/node_modules/rimraf/dist/esm/fs.js.map +1 -0
- package/node_modules/rimraf/dist/esm/ignore-enoent.d.ts +3 -0
- package/node_modules/rimraf/dist/esm/ignore-enoent.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/ignore-enoent.js +19 -0
- package/node_modules/rimraf/dist/esm/ignore-enoent.js.map +1 -0
- package/node_modules/rimraf/dist/esm/index.d.ts +50 -0
- package/node_modules/rimraf/dist/esm/index.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/index.js +70 -0
- package/node_modules/rimraf/dist/esm/index.js.map +1 -0
- package/node_modules/rimraf/dist/esm/opt-arg.d.ts +34 -0
- package/node_modules/rimraf/dist/esm/opt-arg.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/opt-arg.js +46 -0
- package/node_modules/rimraf/dist/esm/opt-arg.js.map +1 -0
- package/node_modules/rimraf/dist/esm/package.json +3 -0
- package/node_modules/rimraf/dist/esm/path-arg.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/path-arg.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/path-arg.js +46 -0
- package/node_modules/rimraf/dist/esm/path-arg.js.map +1 -0
- package/node_modules/rimraf/dist/esm/readdir-or-error.d.ts +3 -0
- package/node_modules/rimraf/dist/esm/readdir-or-error.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/readdir-or-error.js +14 -0
- package/node_modules/rimraf/dist/esm/readdir-or-error.js.map +1 -0
- package/node_modules/rimraf/dist/esm/retry-busy.d.ts +8 -0
- package/node_modules/rimraf/dist/esm/retry-busy.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/retry-busy.js +60 -0
- package/node_modules/rimraf/dist/esm/retry-busy.js.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-manual.d.ts +3 -0
- package/node_modules/rimraf/dist/esm/rimraf-manual.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-manual.js +5 -0
- package/node_modules/rimraf/dist/esm/rimraf-manual.js.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-move-remove.js +133 -0
- package/node_modules/rimraf/dist/esm/rimraf-move-remove.js.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-native.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/rimraf-native.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-native.js +19 -0
- package/node_modules/rimraf/dist/esm/rimraf-native.js.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-posix.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/rimraf-posix.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-posix.js +98 -0
- package/node_modules/rimraf/dist/esm/rimraf-posix.js.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-windows.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/rimraf-windows.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-windows.js +154 -0
- package/node_modules/rimraf/dist/esm/rimraf-windows.js.map +1 -0
- package/node_modules/rimraf/dist/esm/use-native.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/use-native.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/use-native.js +15 -0
- package/node_modules/rimraf/dist/esm/use-native.js.map +1 -0
- package/node_modules/rimraf/package.json +92 -0
- package/package.json +152 -0
- package/scripts/install-scanners.js +258 -0
- package/scripts/watchdog.js +147 -0
- package/src/analyzers/CSSAnalyzer.js +297 -0
- package/src/analyzers/ConfigValidator.js +690 -0
- package/src/analyzers/ESLintAnalyzer.js +320 -0
- package/src/analyzers/JavaScriptAnalyzer.js +261 -0
- package/src/analyzers/PrettierFormatter.js +247 -0
- package/src/analyzers/PythonAnalyzer.js +283 -0
- package/src/analyzers/SecurityAnalyzer.js +729 -0
- package/src/analyzers/SparrowAnalyzer.js +341 -0
- package/src/analyzers/TypeScriptAnalyzer.js +247 -0
- package/src/analyzers/codeCloneDetector/analyzer.js +344 -0
- package/src/analyzers/codeCloneDetector/detector.js +250 -0
- package/src/analyzers/codeCloneDetector/index.js +192 -0
- package/src/analyzers/codeCloneDetector/parser.js +199 -0
- package/src/analyzers/codeCloneDetector/reporter.js +148 -0
- package/src/analyzers/codeCloneDetector/scanner.js +88 -0
- package/src/core/agentPool.js +1957 -0
- package/src/core/agentScheduler.js +3212 -0
- package/src/core/contextManager.js +709 -0
- package/src/core/flowExecutor.js +928 -0
- package/src/core/messageProcessor.js +808 -0
- package/src/core/orchestrator.js +584 -0
- package/src/core/stateManager.js +1500 -0
- package/src/index.js +972 -0
- package/src/interfaces/cli.js +553 -0
- package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +208 -0
- package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +236 -0
- package/src/interfaces/terminal/__tests__/smoke/agents.test.js +138 -0
- package/src/interfaces/terminal/__tests__/smoke/components.test.js +137 -0
- package/src/interfaces/terminal/__tests__/smoke/connection.test.js +350 -0
- package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +156 -0
- package/src/interfaces/terminal/__tests__/smoke/imports.test.js +332 -0
- package/src/interfaces/terminal/__tests__/smoke/messages.test.js +256 -0
- package/src/interfaces/terminal/__tests__/smoke/tools.test.js +388 -0
- package/src/interfaces/terminal/api/apiClient.js +299 -0
- package/src/interfaces/terminal/api/messageRouter.js +262 -0
- package/src/interfaces/terminal/api/session.js +266 -0
- package/src/interfaces/terminal/api/websocket.js +497 -0
- package/src/interfaces/terminal/components/AgentCreator.js +705 -0
- package/src/interfaces/terminal/components/AgentEditor.js +678 -0
- package/src/interfaces/terminal/components/AgentSwitcher.js +330 -0
- package/src/interfaces/terminal/components/ErrorBoundary.js +92 -0
- package/src/interfaces/terminal/components/ErrorPanel.js +264 -0
- package/src/interfaces/terminal/components/Header.js +28 -0
- package/src/interfaces/terminal/components/HelpPanel.js +231 -0
- package/src/interfaces/terminal/components/InputBox.js +118 -0
- package/src/interfaces/terminal/components/Layout.js +603 -0
- package/src/interfaces/terminal/components/LoadingSpinner.js +71 -0
- package/src/interfaces/terminal/components/MessageList.js +281 -0
- package/src/interfaces/terminal/components/MultilineTextInput.js +251 -0
- package/src/interfaces/terminal/components/SearchPanel.js +265 -0
- package/src/interfaces/terminal/components/SettingsPanel.js +415 -0
- package/src/interfaces/terminal/components/StatusBar.js +65 -0
- package/src/interfaces/terminal/components/TextInput.js +127 -0
- package/src/interfaces/terminal/config/agentEditorConstants.js +227 -0
- package/src/interfaces/terminal/config/constants.js +393 -0
- package/src/interfaces/terminal/index.js +168 -0
- package/src/interfaces/terminal/state/useAgentControl.js +496 -0
- package/src/interfaces/terminal/state/useAgents.js +537 -0
- package/src/interfaces/terminal/state/useConnection.js +444 -0
- package/src/interfaces/terminal/state/useMessages.js +630 -0
- package/src/interfaces/terminal/state/useTools.js +554 -0
- package/src/interfaces/terminal/utils/debugLogger.js +44 -0
- package/src/interfaces/terminal/utils/settingsStorage.js +232 -0
- package/src/interfaces/terminal/utils/theme.js +85 -0
- package/src/interfaces/webServer.js +5457 -0
- package/src/modules/fileExplorer/controller.js +413 -0
- package/src/modules/fileExplorer/index.js +37 -0
- package/src/modules/fileExplorer/middleware.js +92 -0
- package/src/modules/fileExplorer/routes.js +158 -0
- package/src/modules/fileExplorer/types.js +44 -0
- package/src/services/agentActivityService.js +399 -0
- package/src/services/aiService.js +2618 -0
- package/src/services/apiKeyManager.js +334 -0
- package/src/services/benchmarkService.js +196 -0
- package/src/services/budgetService.js +565 -0
- package/src/services/contextInjectionService.js +268 -0
- package/src/services/conversationCompactionService.js +1103 -0
- package/src/services/credentialVault.js +685 -0
- package/src/services/errorHandler.js +810 -0
- package/src/services/fileAttachmentService.js +547 -0
- package/src/services/flowContextService.js +189 -0
- package/src/services/memoryService.js +521 -0
- package/src/services/modelRouterService.js +365 -0
- package/src/services/modelsService.js +323 -0
- package/src/services/ollamaService.js +452 -0
- package/src/services/portRegistry.js +336 -0
- package/src/services/portTracker.js +223 -0
- package/src/services/projectDetector.js +404 -0
- package/src/services/promptService.js +372 -0
- package/src/services/qualityInspector.js +796 -0
- package/src/services/scheduleService.js +725 -0
- package/src/services/serviceRegistry.js +386 -0
- package/src/services/skillsService.js +486 -0
- package/src/services/telegramService.js +920 -0
- package/src/services/tokenCountingService.js +316 -0
- package/src/services/visualEditorBridge.js +1033 -0
- package/src/services/visualEditorServer.js +1727 -0
- package/src/services/whatsappService.js +663 -0
- package/src/tools/__tests__/webTool.e2e.test.js +569 -0
- package/src/tools/__tests__/webTool.unit.test.js +195 -0
- package/src/tools/agentCommunicationTool.js +1343 -0
- package/src/tools/agentDelayTool.js +498 -0
- package/src/tools/asyncToolManager.js +604 -0
- package/src/tools/baseTool.js +887 -0
- package/src/tools/browserTool.js +897 -0
- package/src/tools/cloneDetectionTool.js +581 -0
- package/src/tools/codeMapTool.js +857 -0
- package/src/tools/dependencyResolverTool.js +1212 -0
- package/src/tools/docxTool.js +623 -0
- package/src/tools/excelTool.js +636 -0
- package/src/tools/fileContentReplaceTool.js +840 -0
- package/src/tools/fileTreeTool.js +833 -0
- package/src/tools/filesystemTool.js +1217 -0
- package/src/tools/helpTool.js +198 -0
- package/src/tools/imageTool.js +1034 -0
- package/src/tools/importAnalyzerTool.js +1056 -0
- package/src/tools/jobDoneTool.js +388 -0
- package/src/tools/memoryTool.js +554 -0
- package/src/tools/pdfTool.js +627 -0
- package/src/tools/seekTool.js +883 -0
- package/src/tools/skillsTool.js +276 -0
- package/src/tools/staticAnalysisTool.js +2146 -0
- package/src/tools/taskManagerTool.js +2836 -0
- package/src/tools/terminalTool.js +2486 -0
- package/src/tools/userPromptTool.js +474 -0
- package/src/tools/videoTool.js +1139 -0
- package/src/tools/visionTool.js +507 -0
- package/src/tools/visualEditorTool.js +1175 -0
- package/src/tools/webTool.js +3114 -0
- package/src/tools/whatsappTool.js +457 -0
- package/src/types/agent.js +519 -0
- package/src/types/contextReference.js +972 -0
- package/src/types/conversation.js +730 -0
- package/src/types/toolCommand.js +747 -0
- package/src/utilities/attachmentValidator.js +288 -0
- package/src/utilities/browserStealth.js +630 -0
- package/src/utilities/configManager.js +618 -0
- package/src/utilities/constants.js +870 -0
- package/src/utilities/directoryAccessManager.js +566 -0
- package/src/utilities/fileProcessor.js +307 -0
- package/src/utilities/humanBehavior.js +453 -0
- package/src/utilities/jsonRepair.js +242 -0
- package/src/utilities/logger.js +436 -0
- package/src/utilities/platformUtils.js +255 -0
- package/src/utilities/platformUtils.test.js +98 -0
- package/src/utilities/stealthConstants.js +377 -0
- package/src/utilities/structuredFileValidator.js +699 -0
- package/src/utilities/tagParser.js +878 -0
- package/src/utilities/toolConstants.js +415 -0
- package/src/utilities/userDataDir.js +300 -0
- package/web-ui/build/brands/autopilot/favicon.svg +1 -0
- package/web-ui/build/brands/autopilot/logo.webp +0 -0
- package/web-ui/build/brands/onbuzz/favicon.svg +1 -0
- package/web-ui/build/brands/onbuzz/logo-text.webp +0 -0
- package/web-ui/build/brands/onbuzz/logo.webp +0 -0
- package/web-ui/build/index.html +15 -0
- package/web-ui/build/logo.png +0 -0
- package/web-ui/build/logo2.png +0 -0
- package/web-ui/build/static/index-SmQFfvBs.js +746 -0
- package/web-ui/build/static/index-V2ySwjHp.css +1 -0
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestrator - Central coordination hub for Loxia AI Agents System
|
|
3
|
+
*
|
|
4
|
+
* Purpose:
|
|
5
|
+
* - Unified request/response handling for all interfaces (CLI, Web, VSCode)
|
|
6
|
+
* - Agent lifecycle management
|
|
7
|
+
* - Session management
|
|
8
|
+
* - Error handling and response formatting
|
|
9
|
+
* - Interface-agnostic communication protocol
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
INTERFACE_TYPES,
|
|
14
|
+
AGENT_TYPES,
|
|
15
|
+
AGENT_STATUS,
|
|
16
|
+
MESSAGE_MODES,
|
|
17
|
+
ORCHESTRATOR_ACTIONS,
|
|
18
|
+
SYSTEM_DEFAULTS
|
|
19
|
+
} from '../utilities/constants.js';
|
|
20
|
+
|
|
21
|
+
class Orchestrator {
|
|
22
|
+
constructor(config, logger, agentPool, messageProcessor, aiService, stateManager) {
|
|
23
|
+
this.config = config;
|
|
24
|
+
this.logger = logger;
|
|
25
|
+
this.agentPool = agentPool;
|
|
26
|
+
this.messageProcessor = messageProcessor;
|
|
27
|
+
this.aiService = aiService;
|
|
28
|
+
this.stateManager = stateManager;
|
|
29
|
+
|
|
30
|
+
this.activeSessions = new Map();
|
|
31
|
+
this.requestHandlers = new Map();
|
|
32
|
+
|
|
33
|
+
this._initializeRequestHandlers();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Main entry point for all requests from client interfaces
|
|
38
|
+
* @param {Object} request - Request object with interface, sessionId, action, payload, projectDir, user
|
|
39
|
+
* @returns {Promise<Object>} Response object with success, data, error, metadata
|
|
40
|
+
*/
|
|
41
|
+
async processRequest(request) {
|
|
42
|
+
const startTime = Date.now();
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
this._validateRequest(request);
|
|
46
|
+
|
|
47
|
+
const handler = this.requestHandlers.get(request.action);
|
|
48
|
+
if (!handler) {
|
|
49
|
+
this.logger.error(`Unknown action received: ${request.action}`, {
|
|
50
|
+
availableActions: Array.from(this.requestHandlers.keys()),
|
|
51
|
+
requestAction: request.action,
|
|
52
|
+
actionType: typeof request.action
|
|
53
|
+
});
|
|
54
|
+
throw new Error(`Unknown action: ${request.action}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Ensure session exists
|
|
58
|
+
await this._ensureSession(request.sessionId, request.projectDir);
|
|
59
|
+
|
|
60
|
+
// Execute request handler
|
|
61
|
+
const result = await handler.call(this, request);
|
|
62
|
+
|
|
63
|
+
// Generate response metadata
|
|
64
|
+
const metadata = {
|
|
65
|
+
timestamp: new Date().toISOString(),
|
|
66
|
+
executionTime: Date.now() - startTime,
|
|
67
|
+
sessionId: request.sessionId,
|
|
68
|
+
interface: request.interface
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
success: true,
|
|
73
|
+
data: result,
|
|
74
|
+
error: null,
|
|
75
|
+
metadata
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
} catch (error) {
|
|
79
|
+
this.logger.error(`Request processing failed: ${error.message}`, {
|
|
80
|
+
request: this._sanitizeRequestForLogging(request),
|
|
81
|
+
error: error.stack
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
success: false,
|
|
86
|
+
data: null,
|
|
87
|
+
error: error.message,
|
|
88
|
+
metadata: {
|
|
89
|
+
timestamp: new Date().toISOString(),
|
|
90
|
+
executionTime: Date.now() - startTime,
|
|
91
|
+
sessionId: request.sessionId,
|
|
92
|
+
interface: request.interface
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Create a new agent with specified configuration
|
|
100
|
+
* @param {string} systemPrompt - Agent's system prompt
|
|
101
|
+
* @param {string} model - Preferred LLM model
|
|
102
|
+
* @param {Object} options - Additional agent configuration
|
|
103
|
+
* @returns {Promise<Object>} Created agent object
|
|
104
|
+
*/
|
|
105
|
+
async createAgent(systemPrompt, model, options = {}) {
|
|
106
|
+
const agentConfig = {
|
|
107
|
+
name: options.name || `Agent-${Date.now()}`,
|
|
108
|
+
type: options.type || AGENT_TYPES.USER_CREATED,
|
|
109
|
+
systemPrompt,
|
|
110
|
+
preferredModel: model,
|
|
111
|
+
capabilities: options.capabilities || [],
|
|
112
|
+
...options
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const agent = await this.agentPool.createAgent(agentConfig);
|
|
116
|
+
|
|
117
|
+
this.logger.info(`Agent created: ${agent.id}`, {
|
|
118
|
+
agentId: agent.id,
|
|
119
|
+
name: agent.name,
|
|
120
|
+
model: agent.preferredModel
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
return agent;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Route message to specified agent
|
|
128
|
+
* @param {string} agentId - Target agent ID
|
|
129
|
+
* @param {string} message - Message content
|
|
130
|
+
* @param {Object} context - Message context (projectDir, contextReferences, etc.)
|
|
131
|
+
* @returns {Promise<Object>} Agent response
|
|
132
|
+
*/
|
|
133
|
+
async routeToAgent(agentId, message, context = {}) {
|
|
134
|
+
const agent = await this.agentPool.getAgent(agentId);
|
|
135
|
+
if (!agent) {
|
|
136
|
+
throw new Error(`Agent not found: ${agentId}`);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Check if agent is paused
|
|
140
|
+
if (agent.status === AGENT_STATUS.PAUSED && agent.pausedUntil && new Date() < new Date(agent.pausedUntil)) {
|
|
141
|
+
throw new Error(`Agent ${agentId} is paused until ${agent.pausedUntil}`);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Process message through message processor (NEW ARCHITECTURE: just queues message)
|
|
145
|
+
const result = await this.messageProcessor.processMessage(agentId, message, context);
|
|
146
|
+
|
|
147
|
+
// NEW ARCHITECTURE: MessageProcessor just queues messages, actual processing happens in AgentScheduler
|
|
148
|
+
// Return immediate queuing confirmation to UI
|
|
149
|
+
if (result.success) {
|
|
150
|
+
const response = {
|
|
151
|
+
success: true,
|
|
152
|
+
data: {
|
|
153
|
+
message: `Message queued for agent processing`,
|
|
154
|
+
agentId: result.agentId,
|
|
155
|
+
queuedAt: result.queuedAt,
|
|
156
|
+
status: 'queued',
|
|
157
|
+
// Legacy fields for backward compatibility
|
|
158
|
+
toolResults: [],
|
|
159
|
+
agentRedirects: [],
|
|
160
|
+
currentModel: agent.currentModel
|
|
161
|
+
},
|
|
162
|
+
processingId: `queued-${Date.now()}`
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
this.logger.info(`Message queued for agent: ${agentId}`, {
|
|
166
|
+
agentName: agent.name,
|
|
167
|
+
messageLength: message.length,
|
|
168
|
+
sessionId: context.sessionId
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
return response;
|
|
172
|
+
} else {
|
|
173
|
+
return result; // Return error response as-is
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Get current session state
|
|
179
|
+
* @param {string} sessionId - Session identifier
|
|
180
|
+
* @returns {Promise<Object>} Session state object
|
|
181
|
+
*/
|
|
182
|
+
async getSessionState(sessionId) {
|
|
183
|
+
const session = this.activeSessions.get(sessionId);
|
|
184
|
+
if (!session) {
|
|
185
|
+
throw new Error(`Session not found: ${sessionId}`);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const agents = await this.agentPool.listActiveAgents();
|
|
189
|
+
const projectState = await this.stateManager.getProjectState(session.projectDir);
|
|
190
|
+
|
|
191
|
+
return {
|
|
192
|
+
sessionId,
|
|
193
|
+
projectDir: session.projectDir,
|
|
194
|
+
createdAt: session.createdAt,
|
|
195
|
+
lastActivity: session.lastActivity,
|
|
196
|
+
agents: agents, // Return full agent objects since listActiveAgents already filters appropriately
|
|
197
|
+
projectState
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Shutdown orchestrator and cleanup resources
|
|
203
|
+
* @returns {Promise<void>}
|
|
204
|
+
*/
|
|
205
|
+
async shutdown() {
|
|
206
|
+
this.logger.info('Shutting down orchestrator...');
|
|
207
|
+
|
|
208
|
+
// Save all agent states
|
|
209
|
+
const agents = await this.agentPool.listActiveAgents();
|
|
210
|
+
for (const agent of agents) {
|
|
211
|
+
await this.stateManager.persistAgentState(agent.id);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Clear active sessions
|
|
215
|
+
this.activeSessions.clear();
|
|
216
|
+
|
|
217
|
+
this.logger.info('Orchestrator shutdown complete');
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Initialize request handlers for different actions
|
|
222
|
+
* @private
|
|
223
|
+
*/
|
|
224
|
+
_initializeRequestHandlers() {
|
|
225
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.CREATE_AGENT, this._handleCreateAgent.bind(this));
|
|
226
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.UPDATE_AGENT, this._handleUpdateAgent.bind(this));
|
|
227
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.DELETE_AGENT, this._handleDeleteAgent.bind(this));
|
|
228
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.UNLOAD_AGENT, this._handleUnloadAgent.bind(this));
|
|
229
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.SEND_MESSAGE, this._handleSendMessage.bind(this));
|
|
230
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.LIST_AGENTS, this._handleListAgents.bind(this));
|
|
231
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.RESUME_SESSION, this._handleResumeSession.bind(this));
|
|
232
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.GET_SESSION_STATE, this._handleGetSessionState.bind(this));
|
|
233
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.PAUSE_AGENT, this._handlePauseAgent.bind(this));
|
|
234
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.RESUME_AGENT, this._handleResumeAgent.bind(this));
|
|
235
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.SWITCH_MODEL, this._handleSwitchModel.bind(this));
|
|
236
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.GET_AGENT_STATUS, this._handleGetAgentStatus.bind(this));
|
|
237
|
+
this.requestHandlers.set(ORCHESTRATOR_ACTIONS.GET_AGENT_CONVERSATIONS, this._handleGetAgentConversations.bind(this));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Handle create agent requests
|
|
242
|
+
* @private
|
|
243
|
+
*/
|
|
244
|
+
async _handleCreateAgent(request) {
|
|
245
|
+
const { name, systemPrompt, model, capabilities, dynamicModelRouting, platformProvided, directoryAccess } = request.payload;
|
|
246
|
+
|
|
247
|
+
this.logger.info('Creating agent with payload', {
|
|
248
|
+
name,
|
|
249
|
+
model,
|
|
250
|
+
dynamicModelRouting,
|
|
251
|
+
platformProvided,
|
|
252
|
+
capabilities,
|
|
253
|
+
directoryAccess: directoryAccess ? {
|
|
254
|
+
workingDirectory: directoryAccess.workingDirectory,
|
|
255
|
+
readOnlyDirectories: directoryAccess.readOnlyDirectories?.length || 0,
|
|
256
|
+
writeEnabledDirectories: directoryAccess.writeEnabledDirectories?.length || 0,
|
|
257
|
+
restrictToProject: directoryAccess.restrictToProject
|
|
258
|
+
} : null
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
return await this.createAgent(systemPrompt, model, {
|
|
262
|
+
name,
|
|
263
|
+
capabilities,
|
|
264
|
+
dynamicModelRouting,
|
|
265
|
+
platformProvided,
|
|
266
|
+
directoryAccess,
|
|
267
|
+
sessionId: request.sessionId,
|
|
268
|
+
projectDir: request.projectDir
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Handle update agent requests
|
|
274
|
+
* @private
|
|
275
|
+
*/
|
|
276
|
+
async _handleUpdateAgent(request) {
|
|
277
|
+
const { agentId, updates } = request.payload;
|
|
278
|
+
|
|
279
|
+
if (!agentId) {
|
|
280
|
+
throw new Error('Agent ID is required for update');
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (!updates || typeof updates !== 'object') {
|
|
284
|
+
throw new Error('Updates object is required');
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// Get agent before update to ensure it exists
|
|
288
|
+
const agent = await this.agentPool.getAgent(agentId);
|
|
289
|
+
if (!agent) {
|
|
290
|
+
throw new Error(`Agent not found: ${agentId}`);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
this.logger.info('Updating agent with payload', {
|
|
294
|
+
agentId,
|
|
295
|
+
updates,
|
|
296
|
+
agentName: agent.name
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
// Update the agent through the agent pool
|
|
300
|
+
// Include sessionId in updates to maintain API key context
|
|
301
|
+
const updatesWithSession = {
|
|
302
|
+
...updates,
|
|
303
|
+
sessionId: request.sessionId // Ensure current session context is preserved
|
|
304
|
+
};
|
|
305
|
+
const updatedAgent = await this.agentPool.updateAgent(agentId, updatesWithSession);
|
|
306
|
+
|
|
307
|
+
this.logger.info(`Agent updated: ${agentId}`, {
|
|
308
|
+
agentName: updatedAgent.name,
|
|
309
|
+
newMode: updatedAgent.mode,
|
|
310
|
+
sessionId: request.sessionId
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
return updatedAgent;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Handle delete agent requests
|
|
318
|
+
* @private
|
|
319
|
+
*/
|
|
320
|
+
async _handleDeleteAgent(request) {
|
|
321
|
+
const { agentId } = request.payload;
|
|
322
|
+
|
|
323
|
+
if (!agentId) {
|
|
324
|
+
throw new Error('Agent ID is required for deletion');
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// Get agent before deletion to return info
|
|
328
|
+
const agent = await this.agentPool.getAgent(agentId);
|
|
329
|
+
if (!agent) {
|
|
330
|
+
throw new Error(`Agent not found: ${agentId}`);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// Delete the agent
|
|
334
|
+
const result = await this.agentPool.deleteAgent(agentId);
|
|
335
|
+
|
|
336
|
+
this.logger.info(`Agent deleted: ${agentId}`, {
|
|
337
|
+
agentName: agent.name,
|
|
338
|
+
sessionId: request.sessionId
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
return {
|
|
342
|
+
success: true,
|
|
343
|
+
deletedAgent: {
|
|
344
|
+
id: agent.id,
|
|
345
|
+
name: agent.name
|
|
346
|
+
},
|
|
347
|
+
...result
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Handle unload agent requests (remove from memory, keep files)
|
|
353
|
+
* @private
|
|
354
|
+
*/
|
|
355
|
+
async _handleUnloadAgent(request) {
|
|
356
|
+
const { agentId } = request.payload;
|
|
357
|
+
|
|
358
|
+
if (!agentId) {
|
|
359
|
+
throw new Error('Agent ID is required for unloading');
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// Get agent before unloading to return info
|
|
363
|
+
const agent = await this.agentPool.getAgent(agentId);
|
|
364
|
+
if (!agent) {
|
|
365
|
+
throw new Error(`Agent not found: ${agentId}`);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// Unload the agent (preserves files)
|
|
369
|
+
const result = await this.agentPool.unloadAgent(agentId);
|
|
370
|
+
|
|
371
|
+
this.logger.info(`Agent unloaded: ${agentId}`, {
|
|
372
|
+
agentName: agent.name,
|
|
373
|
+
sessionId: request.sessionId
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
return {
|
|
377
|
+
success: true,
|
|
378
|
+
unloadedAgent: {
|
|
379
|
+
id: agent.id,
|
|
380
|
+
name: agent.name
|
|
381
|
+
},
|
|
382
|
+
...result
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Handle send message requests
|
|
388
|
+
* @private
|
|
389
|
+
*/
|
|
390
|
+
async _handleSendMessage(request) {
|
|
391
|
+
const { agentId, message, mode, contextReferences, apiKey, customApiKeys, streamingEnabled } = request.payload;
|
|
392
|
+
|
|
393
|
+
const context = {
|
|
394
|
+
projectDir: request.projectDir,
|
|
395
|
+
sessionId: request.sessionId,
|
|
396
|
+
interface: request.interface,
|
|
397
|
+
mode: mode || MESSAGE_MODES.CHAT,
|
|
398
|
+
contextReferences: contextReferences || [],
|
|
399
|
+
apiKey: apiKey, // Pass Loxia API key through context
|
|
400
|
+
customApiKeys: customApiKeys || {}, // Pass custom API keys through context
|
|
401
|
+
streamingEnabled: streamingEnabled !== false // Default to true if not specified
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
return await this.routeToAgent(agentId, message, context);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Handle list agents requests
|
|
409
|
+
* @private
|
|
410
|
+
*/
|
|
411
|
+
async _handleListAgents(request) {
|
|
412
|
+
return await this.agentPool.listActiveAgents();
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Handle resume session requests
|
|
417
|
+
* @private
|
|
418
|
+
*/
|
|
419
|
+
async _handleResumeSession(request) {
|
|
420
|
+
const { projectDir } = request.payload;
|
|
421
|
+
|
|
422
|
+
const resumedState = await this.stateManager.resumeProject(projectDir);
|
|
423
|
+
|
|
424
|
+
// Restore agents to agent pool
|
|
425
|
+
for (const agent of resumedState.agents) {
|
|
426
|
+
await this.agentPool.restoreAgent(agent);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return resumedState;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Handle get session state requests
|
|
434
|
+
* @private
|
|
435
|
+
*/
|
|
436
|
+
async _handleGetSessionState(request) {
|
|
437
|
+
return await this.getSessionState(request.sessionId);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Handle pause agent requests
|
|
442
|
+
* @private
|
|
443
|
+
*/
|
|
444
|
+
async _handlePauseAgent(request) {
|
|
445
|
+
const { agentId, duration, reason } = request.payload;
|
|
446
|
+
|
|
447
|
+
return await this.agentPool.pauseAgent(agentId, duration, reason);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Handle resume agent requests
|
|
452
|
+
* @private
|
|
453
|
+
*/
|
|
454
|
+
async _handleResumeAgent(request) {
|
|
455
|
+
const { agentId } = request.payload;
|
|
456
|
+
|
|
457
|
+
return await this.agentPool.resumeAgent(agentId);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Handle switch model requests
|
|
462
|
+
* @private
|
|
463
|
+
*/
|
|
464
|
+
async _handleSwitchModel(request) {
|
|
465
|
+
const { agentId, newModel } = request.payload;
|
|
466
|
+
|
|
467
|
+
const agent = await this.agentPool.getAgent(agentId);
|
|
468
|
+
if (!agent) {
|
|
469
|
+
throw new Error(`Agent not found: ${agentId}`);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// Switch model via AI service conversation manager
|
|
473
|
+
return await this.aiService.switchAgentModel(agentId, newModel);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Handle get agent status requests
|
|
478
|
+
* @private
|
|
479
|
+
*/
|
|
480
|
+
async _handleGetAgentStatus(request) {
|
|
481
|
+
const { agentId } = request.payload;
|
|
482
|
+
|
|
483
|
+
const agent = await this.agentPool.getAgent(agentId);
|
|
484
|
+
if (!agent) {
|
|
485
|
+
throw new Error(`Agent not found: ${agentId}`);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
return {
|
|
489
|
+
id: agent.id,
|
|
490
|
+
name: agent.name,
|
|
491
|
+
status: agent.status,
|
|
492
|
+
mode: agent.mode,
|
|
493
|
+
currentModel: agent.currentModel,
|
|
494
|
+
lastActivity: agent.lastActivity,
|
|
495
|
+
isPaused: agent.status === 'paused',
|
|
496
|
+
pausedUntil: agent.pausedUntil
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Handle get agent conversations requests
|
|
502
|
+
* @private
|
|
503
|
+
*/
|
|
504
|
+
async _handleGetAgentConversations(request) {
|
|
505
|
+
const { agentId } = request.payload;
|
|
506
|
+
|
|
507
|
+
const agent = await this.agentPool.getAgent(agentId);
|
|
508
|
+
if (!agent) {
|
|
509
|
+
throw new Error(`Agent not found: ${agentId}`);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
return {
|
|
513
|
+
agentId: agent.id,
|
|
514
|
+
conversations: agent.conversations,
|
|
515
|
+
messageCount: agent.conversations?.full?.messages?.length || 0
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Validate request format
|
|
521
|
+
* @private
|
|
522
|
+
*/
|
|
523
|
+
_validateRequest(request) {
|
|
524
|
+
if (!request || typeof request !== 'object') {
|
|
525
|
+
throw new Error('Invalid request format');
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
const requiredFields = ['interface', 'sessionId', 'action', 'payload'];
|
|
529
|
+
for (const field of requiredFields) {
|
|
530
|
+
if (!(field in request)) {
|
|
531
|
+
throw new Error(`Missing required field: ${field}`);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
const validInterfaces = Object.values(INTERFACE_TYPES);
|
|
536
|
+
if (!validInterfaces.includes(request.interface)) {
|
|
537
|
+
throw new Error(`Invalid interface: ${request.interface}`);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Ensure session exists, create if needed
|
|
543
|
+
* @private
|
|
544
|
+
*/
|
|
545
|
+
async _ensureSession(sessionId, projectDir) {
|
|
546
|
+
if (!this.activeSessions.has(sessionId)) {
|
|
547
|
+
const session = {
|
|
548
|
+
id: sessionId,
|
|
549
|
+
projectDir: projectDir || process.cwd(),
|
|
550
|
+
createdAt: new Date().toISOString(),
|
|
551
|
+
lastActivity: new Date().toISOString()
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
this.activeSessions.set(sessionId, session);
|
|
555
|
+
this.logger.info(`Session created: ${sessionId}`, { projectDir: session.projectDir });
|
|
556
|
+
} else {
|
|
557
|
+
// Update last activity
|
|
558
|
+
const session = this.activeSessions.get(sessionId);
|
|
559
|
+
session.lastActivity = new Date().toISOString();
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Sanitize request for logging (remove sensitive data)
|
|
565
|
+
* @private
|
|
566
|
+
*/
|
|
567
|
+
_sanitizeRequestForLogging(request) {
|
|
568
|
+
const sanitized = { ...request };
|
|
569
|
+
|
|
570
|
+
// Remove potentially sensitive user data
|
|
571
|
+
if (sanitized.user) {
|
|
572
|
+
sanitized.user = { id: sanitized.user.id };
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// Truncate large message content
|
|
576
|
+
if (sanitized.payload && sanitized.payload.message && sanitized.payload.message.length > 500) {
|
|
577
|
+
sanitized.payload.message = sanitized.payload.message.substring(0, 500) + '... [truncated]';
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
return sanitized;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export default Orchestrator;
|