forked from EduCraft/curriculum-project-hub
54837717fd
Register pbank as an ADR-0027 external capability with org-scoped username/password envelopes, readiness via /login, and in-process cph_hub MCP tools (search/get/get_many) that materialize sources under the run workspace. Extend the capability secret payload for docmind vs pbank kinds, admin capabilities UI, role tool umbrella `pbank`, and the pbank-problem-report skill. Credentials never reach the Agent process.
44 lines
1.7 KiB
TypeScript
44 lines
1.7 KiB
TypeScript
export interface ToolOption {
|
||
id: string;
|
||
label: string;
|
||
group: string;
|
||
}
|
||
|
||
export const TOOL_OPTIONS: ToolOption[] = [
|
||
{ id: 'read_file', label: '读取文件', group: '文件' },
|
||
{ id: 'write_file', label: '写入文件', group: '文件' },
|
||
{ id: 'list_files', label: '列目录', group: '文件' },
|
||
{ id: 'search_files', label: '搜索', group: '文件' },
|
||
{ id: 'bash', label: 'Bash 命令', group: 'Shell' },
|
||
{ id: 'web_fetch', label: 'WebFetch', group: '网络' },
|
||
{ id: 'web_search', label: 'WebSearch', group: '网络' },
|
||
{ id: 'cph_check', label: 'cph check', group: 'CPH' },
|
||
{ id: 'cph_build', label: 'cph build', group: 'CPH' },
|
||
{ id: 'send_file', label: '发送文件(飞书)', group: '飞书' },
|
||
{ id: 'feishu_read_context', label: '读飞书上下文', group: '飞书' },
|
||
{ id: 'feishu_download_resource', label: '下载飞书资源', group: '飞书' },
|
||
{ id: 'request_approval', label: '请求审批', group: '飞书' },
|
||
{ id: 'convert_pdf_to_md', label: 'PDF→Markdown', group: '能力' },
|
||
{ id: 'pbank', label: '题库 (PBank)', group: '能力' },
|
||
];
|
||
|
||
/** 组织成员角色(接口枚举保持英文,界面用 orgRoleLabel) */
|
||
export const ORG_ROLES = ['OWNER', 'ADMIN', 'MEMBER'] as const;
|
||
export type OrgRole = (typeof ORG_ROLES)[number];
|
||
|
||
export const ORG_ROLE_LABELS: Record<OrgRole, string> = {
|
||
OWNER: '所有者',
|
||
ADMIN: '管理员',
|
||
MEMBER: '成员',
|
||
};
|
||
|
||
/** 项目团队授权角色(接口枚举保持英文,界面用 permissionRoleLabel) */
|
||
export const PERMISSION_ROLES = ['READ', 'EDIT', 'MANAGE'] as const;
|
||
export type PermissionRole = (typeof PERMISSION_ROLES)[number];
|
||
|
||
export const PERMISSION_ROLE_LABELS: Record<PermissionRole, string> = {
|
||
READ: '只读',
|
||
EDIT: '编辑',
|
||
MANAGE: '管理',
|
||
};
|