feat: add opencode plugin with router integration and TypeScript definitions
- Implemented `createRouterAgentPluginFn` in `src/opencode.ts` to create a plugin that interacts with the router and filters routes based on metadata tags. - Added support for executing routes with error handling and response formatting. - Updated `rollup.config.js` to include build configurations for `opencode.js` and `opencode.d.ts`.
This commit is contained in:
14
package.json
14
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@kevisual/router",
|
||||
"version": "0.0.56",
|
||||
"version": "0.0.57",
|
||||
"description": "",
|
||||
"type": "module",
|
||||
"main": "./dist/router.js",
|
||||
@@ -21,11 +21,14 @@
|
||||
"keywords": [],
|
||||
"author": "abearxiong",
|
||||
"license": "MIT",
|
||||
"packageManager": "pnpm@10.28.0",
|
||||
"packageManager": "pnpm@10.28.1",
|
||||
"devDependencies": {
|
||||
"@kevisual/js-filter": "^0.0.4",
|
||||
"@kevisual/context": "^0.0.4",
|
||||
"@kevisual/js-filter": "^0.0.5",
|
||||
"@kevisual/local-proxy": "^0.0.8",
|
||||
"@kevisual/query": "^0.0.35",
|
||||
"@kevisual/use-config": "^1.0.28",
|
||||
"@opencode-ai/plugin": "^1.1.26",
|
||||
"@rollup/plugin-alias": "^6.0.0",
|
||||
"@rollup/plugin-commonjs": "29.0.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||
@@ -35,10 +38,10 @@
|
||||
"@types/send": "^1.2.1",
|
||||
"@types/ws": "^8.18.1",
|
||||
"@types/xml2js": "^0.4.14",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"eventemitter3": "^5.0.4",
|
||||
"nanoid": "^5.1.6",
|
||||
"path-to-regexp": "^8.3.0",
|
||||
"rollup": "^4.55.1",
|
||||
"rollup": "^4.55.2",
|
||||
"rollup-plugin-dts": "^6.3.0",
|
||||
"send": "^1.2.1",
|
||||
"ts-loader": "^9.5.4",
|
||||
@@ -76,6 +79,7 @@
|
||||
"require": "./dist/router-simple.js",
|
||||
"types": "./dist/router-simple.d.ts"
|
||||
},
|
||||
"./opencode": "./dist/opencode.js",
|
||||
"./define": {
|
||||
"import": "./dist/router-define.js",
|
||||
"require": "./dist/router-define.js",
|
||||
|
||||
Reference in New Issue
Block a user