feat: 更新依赖项,添加 OpenCode 支持,重构代理和路由逻辑,新增 AGENTS 文档

This commit is contained in:
2026-01-20 02:46:29 +08:00
parent 26b4ffa3a2
commit 9f20e149a0
16 changed files with 531 additions and 32 deletions

27
assistant/agent/step.ts Normal file
View File

@@ -0,0 +1,27 @@
import { createSkill } from '@kevisual/router'
import { app } from './index.ts'
import { tool } from '@opencode-ai/plugin/tool'
// "调用 path: test key: step"
app.route({
path: 'test',
key: 'step',
description: '测试步骤调用',
metadata: {
tags: ['opencode'],
...createSkill({
skill: 'test-step',
title: '获取系统信息',
summary: '根据步骤获取系统信息',
args: {
}
})
},
}).define(async (ctx) => {
ctx.body = {
context: `执行步骤
1. 调用 path: client key: system 获取系统信息
2. 调用 path: client key: time 获取当前时间
3. 返回结果`,
};
}).addTo(app)