Skip to main content

Module actions

Module actions 

Source
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 が実行する処理
ActionDef
Action 定義
ActionGroup
Action グループ定義
ActionParams
Action パラメータ
ActionResult
Action 実行結果
ActionSpec
アクション仕様
ActionsConfig
Actions 統一管理
EnvironmentSpec
Environment 仕様
EnvironmentSpecRegistry
全 Environment 仕様のレジストリ
ParamDef
パラメータ定義
ParamResolver
Action パラメータ解決ヘルパー
ParamSpec
パラメータ仕様
ParamVariants
パラメータバリアント定義

Enums§

ActionCategory
Action のカテゴリ(探索空間への影響で分類)
ActionOutput
Action 出力の型付き表現
ActionValidationError
Action バリデーションエラー