Expand description
Actions 統一管理
Orchestrator 内で使用される Action を Protocol として統一管理する。 Group 機能により、コンテキストに応じた Action セットを取得できる。
§設計
ActionsConfig
├─ actions: HashMap<String, ActionDef>
│ └─ "read_file" → ActionDef { groups: ["file_ops", "exploration"] }
│ └─ "grep" → ActionDef { groups: ["search", "exploration"] }
│ └─ "write" → ActionDef { groups: ["file_ops", "mutation"] }
│
└─ groups: HashMap<String, ActionGroup>
└─ "readonly" → ActionGroup { include: ["exploration"], exclude: ["mutation"] }
└─ "all" → ActionGroup { include: ["*"] }§使用例
ⓘ
// 構築
let cfg = ActionsConfig::new()
.action("read_file", ActionDef::new("ファイル読み込み").groups(["file_ops", "exploration"]))
.action("grep", ActionDef::new("パターン検索").groups(["search", "exploration"]))
.group("readonly", ActionGroup::include(["exploration"]).exclude(["mutation"]));
// Extensions に登録
let orc = OrchestratorBuilder::new()
.extension(cfg)
.build(runtime);
// Manager から使用
let cfg = state.shared.extensions.get::<ActionsConfig>()?;
let candidates = cfg.candidates_for("readonly"); // → ["read_file", "grep"]Structs§
- Action
- Action - Agent が実行する処理
- Action
Def - Action 定義
- Action
Group - Action グループ定義
- Action
Params - Action パラメータ
- Action
Result - Action 実行結果
- Action
Spec - アクション仕様
- Actions
Config - Actions 統一管理
- Environment
Spec - Environment 仕様
- Environment
Spec Registry - 全 Environment 仕様のレジストリ
- Param
Def - パラメータ定義
- Param
Resolver - Action パラメータ解決ヘルパー
- Param
Spec - パラメータ仕様
- Param
Variants - パラメータバリアント定義
Enums§
- Action
Category - Action のカテゴリ(探索空間への影響で分類)
- Action
Output - Action 出力の型付き表現
- Action
Validation Error - Action バリデーションエラー