feat: update package version to 0.0.42 and add CNB version fetching functionality

- Updated package version in package.json from 0.0.40 to 0.0.42.
- Added getCNBVersion function to fetch CNB version information from the API.
- Enhanced Issue class with methods for managing comments (list, create, get, update).
- Introduced new NPC and comment environment hooks for better context management.
- Implemented Docker image synchronization route for CNB.
- Added tests for version fetching and issue comment functionalities.
This commit is contained in:
xiongxiao
2026-03-10 03:45:02 +08:00
committed by cnb
parent 7b8f6fbf9f
commit 38ee73e48f
14 changed files with 927 additions and 115 deletions

View File

@@ -14,7 +14,7 @@ app.route({
skill: 'list-issues',
title: '查询 Issue 列表',
args: {
repo: tool.schema.string().describe('代码仓库名称, 如 my-user/my-repo'),
repo: tool.schema.string().optional().describe('代码仓库名称, 如 my-user/my-repo'),
state: tool.schema.string().optional().describe('Issue 状态open 或 closed'),
keyword: tool.schema.string().optional().describe('问题搜索关键词'),
labels: tool.schema.string().optional().describe('问题标签,多个用逗号分隔'),
@@ -27,7 +27,7 @@ app.route({
}
}).define(async (ctx) => {
const cnb = await cnbManager.getContext(ctx);
const repo = ctx.query?.repo || useKey('CNB_REPO_SLUG_LOWERCASE');
let repo = ctx.query?.repo || useKey('CNB_REPO_SLUG_LOWERCASE');
const state = ctx.query?.state;
const keyword = ctx.query?.keyword;
const labels = ctx.query?.labels;