文件最后提交记录最后更新时间
fix(agent_teams): leader initial routed input dispatches directly without LLM round Co-authored-by: zhanglongmin<zhanglongmin@huawei.com> # message auto-generated for no-merge-commit merge: !1532 fix(agent_teams): leader initial routed input dispatches directly without LLM round From: @min_gitcode Reviewed-by: @iamcandiceguo, @alan_cheng See merge request: openJiuwen/agent-core!15324 天前
feat(agent_teams): add interactive cli with /team /session /spec slash commands Refs: #751 29 天前
refactor(agent_teams): restructure package layout and tighten internals - extract TeamAgentBlueprint / TeamAgentState / SpawnPayloadBuilder - split AgentConfigurator into TeamInfra and PrivateAgentResources - fold coordination subsystem into a single kernel - slim DispatcherHost protocol; inject context into operators - unify TeamMember construction in member_factory - split prompts/rails into top-level modules; move models to models/ - register team tools via TeamToolRail - hoist TeamRuntimeManager into runtime/; hoist session_id to top - tighten activation kind into enum and dedupe pre_run Refs: #751 29 天前
feat(swarm): render absolute+relative time in agent-facing text Message and task timestamps were stored (ms UTC epoch) but dropped at the rendering layer, so agents could not judge recency, ordering, or delay. Add timefmt.format_time_context to render '<local time> (<relative diff>)' across message/task-board/stale nudges, external/MCP/CLI rendering, and view_task output. Storage is unchanged; TaskSummary gains updated_at so the list view can show relative time. Refs: #751 4 天前
fix(agent_teams): leader initial routed input dispatches directly without LLM round Co-authored-by: zhanglongmin<zhanglongmin@huawei.com> # message auto-generated for no-merge-commit merge: !1532 fix(agent_teams): leader initial routed input dispatches directly without LLM round From: @min_gitcode Reviewed-by: @iamcandiceguo, @alan_cheng See merge request: openJiuwen/agent-core!15324 天前
fix(agent_teams): serialise ByModelNameAllocator counters as list state_dict() used to dump _inner_indexes as a dict keyed by model_name, so configurations with names containing '.' or '[' (e.g. "glm-5.1", "claude-3.5-sonnet") tripped the session persistence layer's nested-path parsing and crashed when sibling keys shared a prefix. Switch to a list of {model_name, index} records so model names are never interpreted as paths. load_state_dict() still accepts the legacy "inner_indexes" dict format so sessions persisted by older versions load without resetting rotation counters. Refs: #751 20 天前
feature(team): team plan mode Refs: #822 Co-authored-by: weichenhao<weichenhao3@huawei.com> # message auto-generated for no-merge-commit merge: !1434 feature(team): team plan mode From: @weichenhao Reviewed-by: @alan_cheng, @chenchunzhou See merge request: openJiuwen/agent-core!14349 天前
refactor(agent_teams): align monitor models and OTel attrs with event schema Rename monitor public model fields to match BaseEventMessage payload keys (team_name / member_name / display_name / leader_member_name / from_member_name / to_member_name / broadcast). MonitorEvent.from_event_message becomes a direct model_validate pass-through. Align observability OTel attribute keys to the same naming: - agentteam.team.id -> agentteam.team.name - agentteam.team.name -> agentteam.team.display_name - agentteam.member.id -> agentteam.member.name Refs: #751 25 天前
feat(swarm): harden external CLI members and add gemini support - mcp: scope team tools by member role; centralize session-context binding - runtime: raise on streaming premature EOF; reinvoke inactivity timeout + prompt abort; surface CLI narration live to the team stream via a queue bridge - prompts: build external CLI members' system prompt from the shared team-rail sections (role/workflow/lifecycle/persona), excluding other DeepAgent rails - adapters: add gemini adapter with cross-turn --session-id/--resume; switch codex to exec --json + developer_instructions; per-CLI system-prompt and MCP-registration (gemini/hermes) injection; structured-output summaries Refs: #751 4 天前
fix(agent_teams): leader initial routed input dispatches directly without LLM round Co-authored-by: zhanglongmin<zhanglongmin@huawei.com> # message auto-generated for no-merge-commit merge: !1532 fix(agent_teams): leader initial routed input dispatches directly without LLM round From: @min_gitcode Reviewed-by: @iamcandiceguo, @alan_cheng See merge request: openJiuwen/agent-core!15324 天前
fix(tools): fix shell tool issues Refs: #871 Co-authored-by: weichenhao<weichenhao3@huawei.com> # message auto-generated for no-merge-commit merge: !1341 fix(bug):Cluster mode, the "read_file" tool reports an error. This is because the "file_path" does not match the actual path where the generated file is located, and thus the generated.md file cannot From: @weichenhao Reviewed-by: @iamcandiceguo, @alan_cheng, @chenchunzhou See merge request: openJiuwen/agent-core!134120 天前
test(swarm): update build_team call sites to use CapabilityOverrides Replace enable_hitt=/enable_bridge= kwargs with overrides=CapabilityOverrides(...) to match the refactored TeamBackend.build_team signature. Refs: #751 4 天前
refactor(agent_teams): restructure package layout and tighten internals - extract TeamAgentBlueprint / TeamAgentState / SpawnPayloadBuilder - split AgentConfigurator into TeamInfra and PrivateAgentResources - fold coordination subsystem into a single kernel - slim DispatcherHost protocol; inject context into operators - unify TeamMember construction in member_factory - split prompts/rails into top-level modules; move models to models/ - register team tools via TeamToolRail - hoist TeamRuntimeManager into runtime/; hoist session_id to top - tighten activation kind into enum and dedupe pre_run Refs: #751 29 天前
test(agent-teams): add comprehensive unit tests for agent teams modules Cover database, member, message_manager, messager, policy, task_manager, team, team_agent, team_tools, and coordination lifecycle/loop tests. Refs: #572 2 个月前
feat(agent_teams): add bridge agent role for external agent integration Cherry-pick of the BRIDGE_AGENT feature onto the HITT branch. The local DeepAgent stays a full teammate and acts as scheduler; the paired remote agent produces the work output, auto-forwarded on the inbound mailbox path and composed into the avatar context. Merge adaptations to coexist with HITT: - spawn_bridge_agent and predefined registration persist role='bridge_agent' so SpawnManager reads it back via the persisted TeamMember.role column (HITT's design) instead of in-memory inference. - Wire TeamAgentSpec.enable_bridge into TeamBackend construction (symmetric to enable_hitt) so the capability is reachable through the TeamAgentSpec.build() path, not only direct backend construction. - _resolve_team_mode excludes BRIDGE_AGENT alongside HUMAN_AGENT while keeping the branch's "hybrid" default for non-avatar predefined rosters. - MessageHandler delivers bridge inbound via _bridge_deliverable_for, teammates/humans keep the role-aware _format_message path. Refs: #751 4 天前
refactor(agent_teams): tighten coordination seams left over from b1d09037 Three follow-up cleanups to the dispatcher-protocol split: drop dead fields, break the bus/dispatcher cyclic mutator, and align session manager with the project's existing bind/unbind convention. 1. Drop self._host from BaseCoordinationHandler / EventDispatcher grep confirmed neither base nor any of the five handlers reach through self._host for attribute access — they all go through the narrow self._round / self._lifecycle / self._poll / self._blueprint / self._infra fields. The lingering _host was a non-API hint that future contributors would still reach for. Remove the field; remove the "do not use this" comment in coordination/CLAUDE.md. 2. Bind EventBus wake_callback at start() instead of via setter EventBus.set_wake_callback was a public mutator introduced only to break the bus ↔ dispatcher construction cycle. Replace it by moving wake_callback off __init__ entirely and onto start(*, wake_callback=None). CoordinationKernel.setup() now wires only the poll-controller direction; kernel.start() supplies wake_callback=dispatcher.dispatch at the same moment the loop spins up. Tests that previously passed wake_callback= to the constructor pass it to start() instead. 3. Split SessionManager into bind / release / unbind state machine The previous API let bind_session(None) double as "fully detach" while release_team_session() did "detach but keep session_id" — two near-named methods with subtly different behavior, undocumented. The two state fields (session_id and team_session) actually describe a 3-state machine (unbound, half-bound after pause/stop, fully bound), so model the API the same way: - bind_session(session) — full attach, session must be non-None - release_session() — drop runtime, keep session_id (pause/stop tear-down; preserves contextvar for log correlation and resume) - unbind_session() — clear both fields (kernel.start path when session=None, so prior identity does not bleed through) Aligns with the existing bind_session / unbind_session convention in core/controller/base.py. kernel.start() now writes the state-transition explicitly: if session: bind else: unbind, instead of letting bind_session branch on None internally. The two pause/stop call sites use release_session(). Tests preserved: tests/unit_tests/agent_teams/ reports 864 passed / 16 skipped, identical to pre-change. Refs: #751 27 天前
fix(swarm): stop periodic poll timers for human-agent bus A human-agent avatar's POLL_MAILBOX / POLL_TASK inner events are muted at the dispatcher, yet EventBus.start spawned the timers for every role, leaving the avatar bus spinning uselessly every 30s (and a MESSAGE-driven resume_polls would undo the STANDBY pause). Derive _periodic_poll_enabled from role and gate timer creation through a shared _start_poll_tasks so start / resume_polls skip the timers for human agents. No functional change (the polls were already muted); the dispatcher POLL_* short-circuit becomes defensive only. Add EventBus poll-timer tests and sync S_03 invariant #10, the coordination CLAUDE.md, and the F_14 follow-up. Refs: #751 10 天前
feat(agent_teams): auto-pause persistent team on completion When a persistent team reaches completion — all tasks terminal, all members settled, no unread direct messages (broadcasts excluded) — the leader's round-end triggers an immediate completion check that emits a team.completed marker chunk and closes the leader stream, letting the Runner finalize into pause. Reuses the existing TeamCompletionHandler evaluation path; the periodic POLL_TASK tick remains as a fallback. Refs: #751 12 天前
feature(team): team plan mode Refs: #822 Co-authored-by: weichenhao<weichenhao3@huawei.com> # message auto-generated for no-merge-commit merge: !1499 feature(team): team plan mode From: @weichenhao Reviewed-by: @alan_cheng, @iamcandiceguo See merge request: openJiuwen/agent-core!14998 天前
fix(agent_teams): leader initial routed input dispatches directly without LLM round Co-authored-by: zhanglongmin<zhanglongmin@huawei.com> # message auto-generated for no-merge-commit merge: !1532 fix(agent_teams): leader initial routed input dispatches directly without LLM round From: @min_gitcode Reviewed-by: @iamcandiceguo, @alan_cheng See merge request: openJiuwen/agent-core!15324 天前
fix(agent_teams): leader initial routed input dispatches directly without LLM round Co-authored-by: zhanglongmin<zhanglongmin@huawei.com> # message auto-generated for no-merge-commit merge: !1532 fix(agent_teams): leader initial routed input dispatches directly without LLM round From: @min_gitcode Reviewed-by: @iamcandiceguo, @alan_cheng See merge request: openJiuwen/agent-core!15324 天前
refactor(team_agent): decompose God class into focused components Split TeamAgent's 1700+ line monolith into 6 single-responsibility components, eagerly initialized in __init__: - AgentConfigurator: spec/context, workspace, tool registration, DeepAgent construction - StreamController: round lifecycle, streaming, input delivery, retry - SpawnManager: process spawning, health monitoring, restart - RecoveryManager: fault tolerance, allocator state persistence - SessionManager: session ID and team session lifecycle - CoordinationManager: coordination loop transitions, transport subscribe/unsubscribe, mailbox wake hook Component fields and setup methods are public — they are the API surface, not implementation detail. TeamAgent retains only thin read-only properties for natural access (agent.spec, agent.deep_agent, ...) and a few delegates that existing tests drive by name. No defensive _ensure_* accessors or "component is None" fallback branches; tests mock at the real owner (agent._configurator.message_manager = mock). configure(spec, ctx) keeps its two-arg shape with arguments-differ disabled; configure_team (a fake-async duplicate) is removed and the two callers (from_spawn_payload, inprocess_spawn) updated. Bugs surfaced and fixed during the split: - Mailbox wake on interrupt resume was silently dropped after the StreamController extraction; re-injected via wake_mailbox_callback. - Inprocess restart would NPE because restart_teammate passed team_agent=None; inject team_agent_getter at construction. - update_model_pool passed SessionManager where a Session was expected; surfaced once sess_mgr became unconditional. - Dedupe _MAX_RETRY_ATTEMPTS / _RETRYABLE_ERROR_CODES / _RETRY_QUERY to a single source of truth in stream_controller. test_team_agent_retry.py rewritten to drive StreamController directly (the retry logic's actual home) instead of bypassing TeamAgent.__init__ via __new__ on the deleted fallback path. team_agent.py: 1746 -> 638 lines (-63%). Refs: #751 1 个月前
fix(agent_teams): tolerate not-yet-registered member row in TeamMember A fresh-build leader holds its TeamMember handle before BuildTeamTool materializes its DB row. update_status / update_execution_status now return False silently in that window instead of logging a DAO ERROR, so leader status transitions are a clean no-op until the row exists. Rewrites the stale member_factory docstring, refreshes S_02, archives F_08, and adds regression tests for member-handle creation across leader / teammate / cold-recovered agents. Refs: #751 21 天前
feat(agent_teams): auto-pause persistent team on completion When a persistent team reaches completion — all tasks terminal, all members settled, no unread direct messages (broadcasts excluded) — the leader's round-end triggers an immediate completion check that emits a team.completed marker chunk and closes the leader stream, letting the Runner finalize into pause. Reuses the existing TeamCompletionHandler evaluation path; the periodic POLL_TASK tick remains as a fallback. Refs: #751 12 天前
test(agent-teams): annotate all 562 unit tests with @pytest.mark.level0/level1 Mark 194 level0 tests (smoke/main path) and 368 level1 tests (branch/exception/lifecycle). Allows selective execution via pytest -m level0/level1 for faster CI gate. Update CLAUDE.md with pytest -m filtering syntax and distribution summary. Refs: #751 1 个月前
feat(agent-teams): add hybrid team mode workflow Introduces a third team operating mode — "hybrid" — that combines predefined member registration with the ability to dynamically spawn additional members during execution. Key changes: - New prompt templates: leader_workflow_hybrid.md (cn + en) - TeamAgentSpec.team_mode field ("default" | "predefined" | "hybrid" | None) - _resolve_team_mode() helper in team_agent.py replaces the ad-hoc bool(spec.predefined_members) derivation at both consumption points - spawn_member exclusion now triggers only for team_mode="predefined"; "hybrid" and "default" leave the tool available - policy.py / team_rail.py: predefined_team: bool → team_mode: str with a _WORKFLOW_TEMPLATES dict dispatch (no if-else chain) Refs: #751 1 个月前
refactor(agent_teams): restructure package layout and tighten internals - extract TeamAgentBlueprint / TeamAgentState / SpawnPayloadBuilder - split AgentConfigurator into TeamInfra and PrivateAgentResources - fold coordination subsystem into a single kernel - slim DispatcherHost protocol; inject context into operators - unify TeamMember construction in member_factory - split prompts/rails into top-level modules; move models to models/ - register team tools via TeamToolRail - hoist TeamRuntimeManager into runtime/; hoist session_id to top - tighten activation kind into enum and dedupe pre_run Refs: #751 29 天前
refactor(agent_teams): restructure package layout and tighten internals - extract TeamAgentBlueprint / TeamAgentState / SpawnPayloadBuilder - split AgentConfigurator into TeamInfra and PrivateAgentResources - fold coordination subsystem into a single kernel - slim DispatcherHost protocol; inject context into operators - unify TeamMember construction in member_factory - split prompts/rails into top-level modules; move models to models/ - register team tools via TeamToolRail - hoist TeamRuntimeManager into runtime/; hoist session_id to top - tighten activation kind into enum and dedupe pre_run Refs: #751 29 天前
feature(team): team plan mode Co-authored-by: weichenhao<weichenhao3@huawei.com> # message auto-generated for no-merge-commit merge: !1497 feature(team): team plan mode From: @weichenhao Reviewed-by: @alan_cheng, @chenchunzhou See merge request: openJiuwen/agent-core!14978 天前
feature(team): team plan mode Refs: #822 Co-authored-by: weichenhao<weichenhao3@huawei.com> # message auto-generated for no-merge-commit merge: !1499 feature(team): team plan mode From: @weichenhao Reviewed-by: @alan_cheng, @iamcandiceguo See merge request: openJiuwen/agent-core!14998 天前
refactor(agent_teams): drop state.session_id, use contextvar as single source Removes the TeamAgentState.session_id cache that double-bookkept the agent_teams session_id contextvar. The contextvar (already consumed by tools/message_manager and tools/team for topic build) is now the only source of truth; all reads go through get_session_id(). destroy_team snapshots the id before coordination teardown resets the contextvar. SessionManager loses its session_id property/setter and the misleading "preserve session_id across release" docstring. release_session and unbind_session collapsed into a single release_session — with no cached string left to differentiate, the two paths were identical. Refs: #751 22 天前
feat(agent_teams): add PostgreSQL storage support Refs: #751 Co-authored-by: yechenzhen<yechenzhen1@huawei.com> # message auto-generated for no-merge-commit merge: !1146 feat(agent_teams): add PostgreSQL storage support From: @yechenzhen Reviewed-by: @alan_cheng, @iamcandiceguo See merge request: openJiuwen/agent-core!11461 个月前
refactor(agent_teams): drop state.session_id, use contextvar as single source Removes the TeamAgentState.session_id cache that double-bookkept the agent_teams session_id contextvar. The contextvar (already consumed by tools/message_manager and tools/team for topic build) is now the only source of truth; all reads go through get_session_id(). destroy_team snapshots the id before coordination teardown resets the contextvar. SessionManager loses its session_id property/setter and the misleading "preserve session_id across release" docstring. release_session and unbind_session collapsed into a single release_session — with no cached string left to differentiate, the two paths were identical. Refs: #751 22 天前
refactor(agent_teams): restructure package layout and tighten internals - extract TeamAgentBlueprint / TeamAgentState / SpawnPayloadBuilder - split AgentConfigurator into TeamInfra and PrivateAgentResources - fold coordination subsystem into a single kernel - slim DispatcherHost protocol; inject context into operators - unify TeamMember construction in member_factory - split prompts/rails into top-level modules; move models to models/ - register team tools via TeamToolRail - hoist TeamRuntimeManager into runtime/; hoist session_id to top - tighten activation kind into enum and dedupe pre_run Refs: #751 29 天前
feat(agent_teams): auto-pause persistent team on completion When a persistent team reaches completion — all tasks terminal, all members settled, no unread direct messages (broadcasts excluded) — the leader's round-end triggers an immediate completion check that emits a team.completed marker chunk and closes the leader stream, letting the Runner finalize into pause. Reuses the existing TeamCompletionHandler evaluation path; the periodic POLL_TASK tick remains as a fallback. Refs: #751 12 天前
feature(team): team plan mode Refs: #822 Co-authored-by: weichenhao<weichenhao3@huawei.com> # message auto-generated for no-merge-commit merge: !1434 feature(team): team plan mode From: @weichenhao Reviewed-by: @alan_cheng, @chenchunzhou See merge request: openJiuwen/agent-core!14349 天前
feature(team): team plan mode Refs: #822 Co-authored-by: weichenhao<weichenhao3@huawei.com> # message auto-generated for no-merge-commit merge: !1434 feature(team): team plan mode From: @weichenhao Reviewed-by: @alan_cheng, @chenchunzhou See merge request: openJiuwen/agent-core!14349 天前
fix(agent_teams): leader initial routed input dispatches directly without LLM round Co-authored-by: zhanglongmin<zhanglongmin@huawei.com> # message auto-generated for no-merge-commit merge: !1532 fix(agent_teams): leader initial routed input dispatches directly without LLM round From: @min_gitcode Reviewed-by: @iamcandiceguo, @alan_cheng See merge request: openJiuwen/agent-core!15324 天前
fix(agent_teams): leader initial routed input dispatches directly without LLM round Co-authored-by: zhanglongmin<zhanglongmin@huawei.com> # message auto-generated for no-merge-commit merge: !1532 fix(agent_teams): leader initial routed input dispatches directly without LLM round From: @min_gitcode Reviewed-by: @iamcandiceguo, @alan_cheng See merge request: openJiuwen/agent-core!15324 天前
refactor(agent_teams): drop state.session_id, use contextvar as single source Removes the TeamAgentState.session_id cache that double-bookkept the agent_teams session_id contextvar. The contextvar (already consumed by tools/message_manager and tools/team for topic build) is now the only source of truth; all reads go through get_session_id(). destroy_team snapshots the id before coordination teardown resets the contextvar. SessionManager loses its session_id property/setter and the misleading "preserve session_id across release" docstring. release_session and unbind_session collapsed into a single release_session — with no cached string left to differentiate, the two paths were identical. Refs: #751 22 天前
refactor(agent_teams)!: drop factory.py, fold lifecycle into runtime factory.py held one real convenience (create_agent_team) and three single-line wrappers around TeamAgent lifecycle methods, all consumed exclusively by runtime/manager. The wrappers forced runtime-only details (e.g. runtime_spec) to be plumbed through factory signatures. Delete the file outright; runtime/manager._apply_action calls TeamAgent.recover_from_session / recover_team / resume_for_new_session / recover_for_existing_session directly. Public package surface narrows to TeamAgentSpec(...).build() plus the Runner facade — no parallel factory entry point. BREAKING CHANGE: openjiuwen.agent_teams.create_agent_team and resume_persistent_team are removed. Construct a leader via TeamAgentSpec(agents=..., ...).build(); cold/warm recovery and session switches all go through Runner.run_agent_team[_streaming]( agent_team=spec, session=...). For operations scripts that need a leader instance directly, the low-level path is TeamAgent.recover_from_session(...) followed by agent.recover_team(). Also cleans up an unused db_config local in test_runner_interact_pause_and_delete_agent_team_route_through_team_runtime_manager (orphaned after a prior refactor). Refs: #751 25 天前
feature(team): team plan mode Co-authored-by: weichenhao<weichenhao3@huawei.com> # message auto-generated for no-merge-commit merge: !1497 feature(team): team plan mode From: @weichenhao Reviewed-by: @alan_cheng, @chenchunzhou See merge request: openJiuwen/agent-core!14978 天前
feature(team): team plan mode Co-authored-by: weichenhao<weichenhao3@huawei.com> # message auto-generated for no-merge-commit merge: !1497 feature(team): team plan mode From: @weichenhao Reviewed-by: @alan_cheng, @chenchunzhou See merge request: openJiuwen/agent-core!14978 天前
feature(team): team plan mode Refs: #822 Co-authored-by: weichenhao<weichenhao3@huawei.com> # message auto-generated for no-merge-commit merge: !1499 feature(team): team plan mode From: @weichenhao Reviewed-by: @alan_cheng, @iamcandiceguo See merge request: openJiuwen/agent-core!14998 天前
fix(agent_teams): leader initial routed input dispatches directly without LLM round Co-authored-by: zhanglongmin<zhanglongmin@huawei.com> # message auto-generated for no-merge-commit merge: !1532 fix(agent_teams): leader initial routed input dispatches directly without LLM round From: @min_gitcode Reviewed-by: @iamcandiceguo, @alan_cheng See merge request: openJiuwen/agent-core!15324 天前
refactor(agent_teams): restructure package layout and tighten internals - extract TeamAgentBlueprint / TeamAgentState / SpawnPayloadBuilder - split AgentConfigurator into TeamInfra and PrivateAgentResources - fold coordination subsystem into a single kernel - slim DispatcherHost protocol; inject context into operators - unify TeamMember construction in member_factory - split prompts/rails into top-level modules; move models to models/ - register team tools via TeamToolRail - hoist TeamRuntimeManager into runtime/; hoist session_id to top - tighten activation kind into enum and dedupe pre_run Refs: #751 29 天前
fix(agent_teams): leader initial routed input dispatches directly without LLM round Co-authored-by: zhanglongmin<zhanglongmin@huawei.com> # message auto-generated for no-merge-commit merge: !1532 fix(agent_teams): leader initial routed input dispatches directly without LLM round From: @min_gitcode Reviewed-by: @iamcandiceguo, @alan_cheng See merge request: openJiuwen/agent-core!15324 天前
feat(swarm): render absolute+relative time in agent-facing text Message and task timestamps were stored (ms UTC epoch) but dropped at the rendering layer, so agents could not judge recency, ordering, or delay. Add timefmt.format_time_context to render '<local time> (<relative diff>)' across message/task-board/stale nudges, external/MCP/CLI rendering, and view_task output. Storage is unchanged; TaskSummary gains updated_at so the list view can show relative time. Refs: #751 4 天前