mirror of
https://gh-proxy.org/https://github.com/klinsmaya/multica.git
synced 2026-11-09 09:56:47 +08:00
fix(cli): remove obsolete autopilot priority flag (#7557)
This commit is contained in:
@@ -256,7 +256,7 @@ CLI の設定ファイルには、あなたとして Multica にアクセスで
|
||||
| | `env get/set <agent-id>` | カスタム環境変数の読み書き(owner と admin のみ) | |
|
||||
| | `skills list/set/add <agent-id>` | 紐付けられたスキルを管理 | `--skill-ids`(`set` は全置換、`add` は追加) |
|
||||
| | `mcp list/add/enable/disable/remove <agent-id>` | ワークスペース MCP サーバーをこのエージェントに割り当て | server id は `workspace mcp list` から取得。ライブラリの項目はここで追加するまで機能しません。`disable` は割り当てを残したまま送信を停止します |
|
||||
| `autopilot` | `list/get/create/update/delete` | オートパイロットを管理 | `create`: `--title`、`--agent`、`--mode`(いずれも必須)、`--priority`、`--project`、`--subscriber`(繰り返し可) |
|
||||
| `autopilot` | `list/get/create/update/delete` | オートパイロットを管理 | `create`: `--title`、`--agent`、`--mode`(いずれも必須)、`--project`、`--subscriber`(繰り返し可) |
|
||||
| | `trigger <id>` | 手動で 1 回トリガー | |
|
||||
| | `runs <id>` | 実行履歴を表示 | |
|
||||
| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | スケジュールと webhook のトリガーを管理 | |
|
||||
|
||||
@@ -256,7 +256,7 @@ CLI 설정 파일에는 사용자를 대신해 Multica에 접근할 수 있는 t
|
||||
| | `env get/set <agent-id>` | 사용자 지정 환경 변수 읽기/쓰기(owner와 admin만) | |
|
||||
| | `skills list/set/add <agent-id>` | 연결된 스킬 관리 | `--skill-ids`(`set`은 전체 교체, `add`는 증분 추가) |
|
||||
| | `mcp list/add/enable/disable/remove <agent-id>` | 워크스페이스 MCP 서버를 이 에이전트에 할당 | server id는 `workspace mcp list`에서 확인. 라이브러리 항목은 여기서 추가하기 전까지 동작하지 않으며, `disable`은 할당을 유지한 채 전달만 중단합니다 |
|
||||
| `autopilot` | `list/get/create/update/delete` | 자동화 관리 | `create`: `--title`, `--agent`, `--mode`(모두 필수), `--priority`, `--project`, `--subscriber`(반복 가능) |
|
||||
| `autopilot` | `list/get/create/update/delete` | 자동화 관리 | `create`: `--title`, `--agent`, `--mode`(모두 필수), `--project`, `--subscriber`(반복 가능) |
|
||||
| | `trigger <id>` | 수동으로 한 번 트리거 | |
|
||||
| | `runs <id>` | 실행 기록 확인 | |
|
||||
| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | 일정 및 webhook 트리거 관리 | |
|
||||
|
||||
@@ -264,7 +264,7 @@ The tables below cover every current top-level command, grouped the way the CLI
|
||||
| | `env get/set <agent-id>` | Read and write custom environment variables (owner and admin only) | |
|
||||
| | `skills list/set/add <agent-id>` | Manage attached skills | `--skill-ids` (`set` replaces the full list, `add` appends) |
|
||||
| | `mcp list/add/enable/disable/remove <agent-id>` | Assign workspace MCP servers to this agent | Take the server id from `workspace mcp list`. A library entry does nothing until it is added here; `disable` stops sending it without dropping the assignment |
|
||||
| `autopilot` | `list/get/create/update/delete` | Manage automations | `create`: `--title`, `--agent`, `--mode` (all required), `--priority`, `--project`, `--subscriber` (repeatable) |
|
||||
| `autopilot` | `list/get/create/update/delete` | Manage automations | `create`: `--title`, `--agent`, `--mode` (all required), `--project`, `--subscriber` (repeatable) |
|
||||
| | `trigger <id>` | Trigger a run manually | |
|
||||
| | `runs <id>` | View run history | |
|
||||
| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | Manage schedule and webhook triggers | |
|
||||
|
||||
@@ -256,7 +256,7 @@ CLI 配置文件包含可代表你访问 Multica 的令牌。不要提交到仓
|
||||
| | `env get/set <agent-id>` | 读写自定义环境变量(仅 owner 和 admin) | |
|
||||
| | `skills list/set/add <agent-id>` | 管理绑定的 skill | `--skill-ids`(`set` 全量替换,`add` 增量添加) |
|
||||
| | `mcp list/add/enable/disable/remove <agent-id>` | 给该 agent 分配工作区 MCP 服务 | server id 从 `workspace mcp list` 获取。库里的条目在这里添加之前不会生效;`disable` 只停止下发,保留分配 |
|
||||
| `autopilot` | `list/get/create/update/delete` | 管理自动化 | `create`:`--title`、`--agent`、`--mode`(均必填)、`--priority`、`--project`、`--subscriber`(可重复) |
|
||||
| `autopilot` | `list/get/create/update/delete` | 管理自动化 | `create`:`--title`、`--agent`、`--mode`(均必填)、`--project`、`--subscriber`(可重复) |
|
||||
| | `trigger <id>` | 手动触发一次 | |
|
||||
| | `runs <id>` | 查看运行历史 | |
|
||||
| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | 管理定时和 webhook 触发器 | |
|
||||
|
||||
@@ -130,7 +130,6 @@ func init() {
|
||||
autopilotCreateCmd.Flags().String("description", "", "Autopilot description (used as task prompt)")
|
||||
autopilotCreateCmd.Flags().String("agent", "", "Assignee agent (name or ID) — required")
|
||||
autopilotCreateCmd.Flags().String("mode", "", "Execution mode: create_issue or run_only (required)")
|
||||
autopilotCreateCmd.Flags().String("priority", "none", "Priority for created issues (none, low, medium, high, urgent)")
|
||||
autopilotCreateCmd.Flags().String("project", "", "Project ID (optional)")
|
||||
autopilotCreateCmd.Flags().String("issue-title-template", "", "Template for issue titles (create_issue mode). Only {{date}} (UTC, YYYY-MM-DD) is interpolated; any other {{...}} token is rejected at create-time.")
|
||||
autopilotCreateCmd.Flags().StringArray("subscriber", nil, "Member subscriber to notify for issues this autopilot creates (name or user ID; repeatable)")
|
||||
@@ -141,7 +140,6 @@ func init() {
|
||||
autopilotUpdateCmd.Flags().String("description", "", "New description")
|
||||
autopilotUpdateCmd.Flags().String("agent", "", "New assignee agent (name or ID)")
|
||||
autopilotUpdateCmd.Flags().String("project", "", "New project ID (use empty string to clear)")
|
||||
autopilotUpdateCmd.Flags().String("priority", "", "New priority")
|
||||
autopilotUpdateCmd.Flags().String("status", "", "New status (active, paused)")
|
||||
autopilotUpdateCmd.Flags().String("mode", "", "New execution mode (create_issue or run_only)")
|
||||
autopilotUpdateCmd.Flags().String("issue-title-template", "", "New issue title template. Only {{date}} (UTC, YYYY-MM-DD) is interpolated; any other {{...}} token is rejected.")
|
||||
@@ -418,10 +416,6 @@ func runAutopilotCreate(cmd *cobra.Command, _ []string) error {
|
||||
if v, _ := cmd.Flags().GetString("description"); v != "" {
|
||||
body["description"] = v
|
||||
}
|
||||
if cmd.Flags().Changed("priority") {
|
||||
v, _ := cmd.Flags().GetString("priority")
|
||||
body["priority"] = v
|
||||
}
|
||||
if v, _ := cmd.Flags().GetString("project"); v != "" {
|
||||
projectRef, err := resolveProjectID(ctx, client, v)
|
||||
if err != nil {
|
||||
@@ -497,10 +491,6 @@ func runAutopilotUpdate(cmd *cobra.Command, args []string) error {
|
||||
body["project_id"] = projectRef.ID
|
||||
}
|
||||
}
|
||||
if cmd.Flags().Changed("priority") {
|
||||
v, _ := cmd.Flags().GetString("priority")
|
||||
body["priority"] = v
|
||||
}
|
||||
if cmd.Flags().Changed("status") {
|
||||
v, _ := cmd.Flags().GetString("status")
|
||||
body["status"] = v
|
||||
|
||||
@@ -20,7 +20,6 @@ func newAutopilotCreateTestCmd() *cobra.Command {
|
||||
cmd.Flags().String("description", "", "")
|
||||
cmd.Flags().String("agent", "", "")
|
||||
cmd.Flags().String("mode", "", "")
|
||||
cmd.Flags().String("priority", "none", "")
|
||||
cmd.Flags().String("project", "", "")
|
||||
cmd.Flags().String("issue-title-template", "", "")
|
||||
cmd.Flags().StringArray("subscriber", nil, "")
|
||||
@@ -34,7 +33,6 @@ func newAutopilotUpdateTestCmd() *cobra.Command {
|
||||
cmd.Flags().String("description", "", "")
|
||||
cmd.Flags().String("agent", "", "")
|
||||
cmd.Flags().String("project", "", "")
|
||||
cmd.Flags().String("priority", "", "")
|
||||
cmd.Flags().String("status", "", "")
|
||||
cmd.Flags().String("mode", "", "")
|
||||
cmd.Flags().String("issue-title-template", "", "")
|
||||
@@ -44,6 +42,22 @@ func newAutopilotUpdateTestCmd() *cobra.Command {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func TestAutopilotCommandsRejectRemovedPriorityFlag(t *testing.T) {
|
||||
for name, cmd := range map[string]*cobra.Command{
|
||||
"create": autopilotCreateCmd,
|
||||
"update": autopilotUpdateCmd,
|
||||
} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
if cmd.Flags().Lookup("priority") != nil {
|
||||
t.Fatalf("autopilot %s still exposes the removed --priority flag", name)
|
||||
}
|
||||
if err := cmd.ParseFlags([]string{"--priority", "high"}); err == nil {
|
||||
t.Fatalf("autopilot %s silently accepted the removed --priority flag", name)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func newAutopilotGetTestCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{Use: "get"}
|
||||
cmd.Flags().String("output", "json", "")
|
||||
|
||||
Reference in New Issue
Block a user