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:
@@ -126,4 +126,26 @@ export default [
|
||||
},
|
||||
plugins: [dts()],
|
||||
},
|
||||
{
|
||||
input: 'src/opencode.ts',
|
||||
output: {
|
||||
file: 'dist/opencode.js',
|
||||
format: 'es',
|
||||
},
|
||||
plugins: [
|
||||
resolve({
|
||||
browser: true,
|
||||
}),
|
||||
commonjs(),
|
||||
typescript(),
|
||||
],
|
||||
},
|
||||
{
|
||||
input: 'src/opencode.ts',
|
||||
output: {
|
||||
file: 'dist/opencode.d.ts',
|
||||
format: 'es',
|
||||
},
|
||||
plugins: [dts()],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user