Academy v0.8.3 完整代码基线:Go 后端(internal/cmd/cli/mcp-server/docreader)、 Vue 前端(frontend)、数据库迁移(migrations)、部署编排(docker/helm/deploy)与文档。 今日开发的培训推送管理改动随后单独提交。
37 lines
1.3 KiB
Go
37 lines
1.3 KiB
Go
// Package agentcmd holds the `academy agent` command tree:
|
|
// list / view / create / update / delete / status / check. The directory is
|
|
// named `agent/` to match the cobra subcommand; the Go package is `agentcmd`
|
|
// to avoid colliding with cobra's *cobra.Command identifier.
|
|
//
|
|
// "agent" in this subtree refers to Academy's user-defined Custom
|
|
// Agents (server resource: GET/POST /agents/...) and handles CRUD
|
|
// operations only. Agent invocation has moved to `academy session ask
|
|
// --agent <id>` (see cli/cmd/session/ask.go).
|
|
package agentcmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
|
|
"academy/cli/internal/cmdutil"
|
|
)
|
|
|
|
// NewCmd builds the `academy agent` parent and registers leaves. Called
|
|
// from cli/cmd/root.go.
|
|
func NewCmd(f *cmdutil.Factory) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "agent",
|
|
Short: "Manage custom agents (CRUD + status/check)",
|
|
Long: `Custom Agents bundle a system prompt, model, tool allow-list, and KB
|
|
scope into an addressable resource. Create, update, list, view, check,
|
|
or delete agents. To invoke an agent, use: academy session ask --agent <id>`,
|
|
}
|
|
cmd.AddCommand(NewCmdList(f))
|
|
cmd.AddCommand(NewCmdView(f))
|
|
cmd.AddCommand(NewCmdCreate(f))
|
|
cmd.AddCommand(NewCmdEdit(f))
|
|
cmd.AddCommand(NewCmdDelete(f))
|
|
cmd.AddCommand(NewCmdStatus(f))
|
|
cmd.AddCommand(NewCmdCheck(f))
|
|
return cmd
|
|
}
|