feat: add initial implementation of Opencode client and session handling

- Created agent.ts to export necessary components from the plugin source.
- Implemented index.ts to initialize Opencode client and list projects and sessions.
- Added functionality to prompt a session with specific tool instructions.
This commit is contained in:
2026-02-07 03:24:10 +08:00
parent bf88cfab5c
commit 17731be911
5 changed files with 302 additions and 370 deletions

View File

@@ -9,18 +9,19 @@
"keywords": [],
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
"license": "MIT",
"packageManager": "pnpm@10.14.0",
"packageManager": "pnpm@10.28.2",
"type": "module",
"devDependencies": {
"@kevisual/cnb": "^0.0.2",
"@types/bun": "^1.3.5",
"@types/node": "^25.0.6"
"@kevisual/cnb": "^0.0.19",
"@types/bun": "^1.3.8",
"@types/node": "^25.2.1"
},
"dependencies": {
"@kevisual/context": "^0.0.4",
"@kevisual/router": "^0.0.52",
"@kevisual/use-config": "^1.0.24",
"@opencode-ai/plugin": "^1.1.14",
"@kevisual/router": "^0.0.70",
"@kevisual/use-config": "^1.0.30",
"@opencode-ai/plugin": "^1.1.53",
"@opencode-ai/sdk": "^1.1.53",
"nanoid": "^5.1.6"
}
}