core: cleaner error output and more flexible custom tool directories

- Removed debug console.log when dependency installation fails so users see clean warning messages instead of raw error dumps
- Fixed database connection cleanup to prevent resource leaks between sessions
- Added support for loading custom tools from both .opencode/tool (singular) and .opencode/tools (plural) directories, matching common naming conventions
This commit is contained in:
Dax Raad
2026-03-10 12:33:19 -04:00
parent 5f277d1e62
commit 21e72cbf42
3 changed files with 109 additions and 39 deletions
-1
View File
@@ -288,7 +288,6 @@ export namespace Config {
// Install any additional dependencies defined in the package.json
// This allows local plugins and custom tools to use external packages
await Npm.install(dir).catch((err: any) => {
console.log(err)
log.warn("failed to install dependencies", { dir, error: err.message })
})
}
+1
View File
@@ -109,6 +109,7 @@ export namespace Database {
export function close() {
Client().$client.close()
Client.reset()
}
export type TxOrDb = Transaction | Client