Files
yaak-mountain-loop/crates/yaak-actions/bindings/ActionGroupMetadata.ts
Gregory Schier 50b0e23d53 Add yaak-actions crate for centralized action system
Implements a unified action system that serves as a single source of truth
for all operations in Yaak (Tauri app, CLI, plugins, deep links, MCP server).

Key features:
- ActionExecutor: Combined registry and execution engine with async RwLock
- ActionHandler: Trait-based handlers using async closures
- Context system: RequiredContext and CurrentContext for action availability
- Action groups: Organize related actions
- TypeScript bindings: Auto-generated via ts-rs for frontend use

Design highlights:
- Handlers are closures (no dependencies on other yaak crates)
- Registration requires both metadata and handler (prevents orphan actions)
- Flexible return values via serde_json::Value
- All methods are async using tokio

All 33 tests passing. Ready for integration with yaak-core and yaak-app.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 09:00:31 -08:00

33 lines
753 B
TypeScript
Generated

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ActionGroupId } from "./ActionGroupId";
import type { ActionScope } from "./ActionScope";
/**
* Metadata about an action group.
*/
export type ActionGroupMetadata = {
/**
* Unique identifier for this group.
*/
id: ActionGroupId,
/**
* Display name for the group.
*/
name: string,
/**
* Optional description of the group's purpose.
*/
description: string | null,
/**
* Icon to display for the group.
*/
icon: string | null,
/**
* Sort order for displaying groups (lower = earlier).
*/
order: number,
/**
* Optional scope restriction (if set, group only appears in this scope).
*/
scope: ActionScope | null, };