Files
devclaw-gitea/lib/roles/types.ts
Lauren ten Hoor 0e24a68882 refactor: migrate role handling from tiers to roles module
- Removed the deprecated tiers.ts file and migrated all related functionality to roles/index.js.
- Updated tests and tools to reflect the new role structure, replacing references to "dev", "qa", and "architect" with "developer", "tester", and "architect".
- Adjusted workflow configurations and state management to accommodate the new role naming conventions.
- Enhanced project registration and health check tools to support dynamic role handling.
- Updated task creation, update, and completion processes to align with the new role definitions.
- Improved documentation and comments to clarify role responsibilities and usage.
2026-02-15 18:32:10 +08:00

37 lines
1.2 KiB
TypeScript

/**
* roles/types.ts — Type definitions for the role registry.
*
* RoleConfig is the single interface describing everything about a role.
* All role-related behavior should be derived from this config.
*/
/** Configuration for a single worker role. */
export type RoleConfig = {
/** Unique role identifier (e.g., "developer", "tester", "architect"). */
id: string;
/** Human-readable display name. */
displayName: string;
/** Valid levels for this role. */
levels: readonly string[];
/** Default level when none specified. */
defaultLevel: string;
/** Default model per level. */
models: Record<string, string>;
/** Emoji per level (used in announcements). */
emoji: Record<string, string>;
/** Fallback emoji when level-specific emoji not found. */
fallbackEmoji: string;
/** Valid completion results for this role. */
completionResults: readonly string[];
/** Regex pattern fragment for session key matching (e.g., "developer|tester|architect"). */
sessionKeyPattern: string;
/** Notification config per event type. */
notifications: {
onStart: boolean;
onComplete: boolean;
};
};
/** A role ID string (typed from registry keys). */
export type RoleId = string;