feat: Enhance team messaging system with new operations and data handling

- Added support for new message type 'state_update' in TeamMessageType.
- Updated TeamMessageFeed component to handle both legacy and new reference formats.
- Modified CLI options to clarify usage and added new commands for broadcasting messages and retrieving role states.
- Implemented new command 'get_state' to read role state from meta.json.
- Enhanced team message logging to auto-generate summaries and handle structured data.
- Improved backward compatibility by enriching team metadata from legacy files.
- Refactored message handling functions to streamline operations and improve clarity.
This commit is contained in:
catlog22
2026-03-03 16:11:57 +08:00
parent 628578b2bb
commit a7ed0365f7
7 changed files with 409 additions and 269 deletions

View File

@@ -358,15 +358,15 @@ export function run(argv: string[]): void {
program
.command('team [subcommand] [args...]')
.description('Team message bus for Agent Team communication')
.option('--team <name>', 'Team name')
.option('--team <name>', 'Session ID (e.g., TLS-my-project-2026-02-27)')
.option('--from <role>', 'Sender role name')
.option('--to <role>', 'Recipient role name')
.option('--to <role>', 'Recipient role name (default: coordinator)')
.option('--type <type>', 'Message type')
.option('--summary <text>', 'One-line summary')
.option('--ref <path>', 'File path reference')
.option('--summary <text>', 'One-line summary (auto-generated if omitted)')
.option('--data <json>', 'JSON structured data')
.option('--id <id>', 'Message ID (for read)')
.option('--id <id>', 'Message ID (for read/delete)')
.option('--last <n>', 'Last N messages (for list)')
.option('--role <role>', 'Role name (for get_state)')
.option('--json', 'Output as JSON')
.action((subcommand, args, options) => teamCommand(subcommand, args, options));