claude-code-best/src/commands/agents-platform/index.ts
claude-code-best 8874fedb41 feat: 添加云端管理命令(memory-stores、vault、schedule、skill-store、agents-platform)
- /memory-stores: 远程记忆存储管理
- /vault: 密钥保险库管理
- /schedule: 云端定时触发器管理(cron)
- /skill-store: 技能商店浏览和安装
- /agents-platform: 远程 agent 调度管理

Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:17 +08:00

30 lines
1.1 KiB
TypeScript

import { getGlobalConfig } from '../../utils/config.js'
import type { Command } from '../../types/command.js'
// Visible when a workspace API key is available from env or saved settings.
// Use a getter so getGlobalConfig() is called lazily (after enableConfigs()
// has run in the entry path) instead of at module-load time, which races
// the config-system bootstrap and throws "Config accessed before allowed".
const agentsPlatform: Command = {
type: 'local-jsx',
name: 'agents-platform',
aliases: ['agents', 'schedule-agent'],
description: 'Manage scheduled remote agents (cron-style triggers)',
// REPL markdown renderer strips `<...>` as HTML tags — use uppercase.
argumentHint: 'list | create CRON PROMPT | delete ID | run ID',
get isHidden(): boolean {
return (
!process.env['ANTHROPIC_API_KEY'] && !getGlobalConfig().workspaceApiKey
)
},
isEnabled: () => true,
bridgeSafe: false,
availability: ['claude-ai'],
load: async () => {
const m = await import('./launchAgentsPlatform.js')
return { call: m.callAgentsPlatform }
},
}
export default agentsPlatform