Commit Graph

3588 Commits

Author SHA1 Message Date
huanghuoguoguo
f86f12c3f2 docs: reconcile agent runner protocol status 2026-06-05 12:34:14 +08:00
huanghuoguoguo
121a736e6a fix(agent-runner): align plugin runner runtime boundaries 2026-06-05 09:35:17 +08:00
huanghuoguoguo
36292102f9 feat(agent-runner): add bounded native tool artifacts 2026-06-04 11:11:40 +08:00
huanghuoguoguo
7053acfb1b feat(agent-runner): expose effective prompt and transcript history 2026-06-04 11:11:40 +08:00
huanghuoguoguo
08c51118c5 refactor(agent-runner): make agent binding and auth snapshot explicit 2026-06-04 11:11:40 +08:00
huanghuoguoguo
a850127893 refactor(agent-runner): simplify event-first entry path 2026-06-04 11:11:40 +08:00
huanghuoguoguo
4d0a2b117a refactor(agent-runner): align config with agent semantics 2026-06-04 11:11:40 +08:00
huanghuoguoguo
8116acf462 refactor(agent-runner): remove host context windowing 2026-06-04 11:11:40 +08:00
huanghuoguoguo
4d4ccfabd5 feat(agent-runner): normalize binding config boundaries 2026-06-04 11:11:39 +08:00
huanghuoguoguo
93cd852061 fix: enforce agent run API permissions 2026-06-04 11:11:39 +08:00
huanghuoguoguo
bbe7666642 fix(agent-runner): authorize external runner tools 2026-06-04 11:11:39 +08:00
huanghuoguoguo
99afe8e999 docs(agent-runner): document external MCP bridge 2026-06-04 11:11:39 +08:00
huanghuoguoguo
93febbb342 docs(agent-runner): align runner protocol boundaries 2026-06-04 11:11:39 +08:00
huanghuoguoguo
6afe8b67f8 docs(agent-runner): record codex runner smoke 2026-06-04 11:11:39 +08:00
huanghuoguoguo
2d83c9928a fix(agent-runner): stabilize event context and streams 2026-06-04 11:11:39 +08:00
huanghuoguoguo
13ff4fd9c1 docs(agent-runner): update pluginization design status 2026-06-04 11:11:39 +08:00
huanghuoguoguo
ab96070036 refactor(agent-runner): tighten protocol v1 runtime boundaries 2026-06-04 11:11:39 +08:00
huanghuoguoguo
cc911cc413 feat(agent-runner): align protocol adapter terminology 2026-06-04 11:11:39 +08:00
huanghuoguoguo
32e42f04ea feat(agent-runner): route pipeline runs through event-first flow
- run_from_query() now delegates to run(event, binding) instead of maintaining
  a separate legacy execution path
- Pipeline Query is converted to AgentEventEnvelope via PipelineCompatAdapter
- Pipeline config is converted to AgentBinding with StatePolicy
- bound_plugins authorization preserved from Pipeline
- Legacy compatibility fields preserved:
  - query_id → context.runtime.query_id → session registry
  - prompt → context.compatibility.extra.prompt (not top-level)
  - params → context.compatibility.extra.params (with proper filtering)
  - max-round → bootstrap.messages and compatibility.legacy_messages
- Pipeline path gains event-first host capabilities:
  - EventLog and Transcript writing
  - ArtifactStore registration
  - PersistentStateStore for state.updated
- Removed legacy handlers:
  - _handle_artifact_created_query() (replaced by _handle_artifact_created)
  - _handle_state_updated() (replaced by _handle_state_updated_event)

This change unifies the execution path while preserving backward compatibility
for Pipeline-based runners. EventGateway is not implemented in this branch;
only the event-first entry point is reserved.
2026-06-04 11:11:39 +08:00
huanghuoguoguo
24993ac700 feat(agent-runner): add persistent state APIs 2026-06-04 11:11:39 +08:00
huanghuoguoguo
cefd99e416 feat(agent-runner): scope event-first state by binding 2026-06-04 11:11:39 +08:00
huanghuoguoguo
8aba467a42 feat(agent-runner): persist created artifacts 2026-06-04 11:11:39 +08:00
huanghuoguoguo
201c805802 feat(agent-runner): add artifact store pull APIs 2026-06-04 11:11:39 +08:00
huanghuoguoguo
0a3bafae4b feat(agent-runner): add event-first context facts and pull APIs
Add EventLog and Transcript persistence entities for storing auditable
event facts and conversation history projection. Implement event-first
AgentRunContext builder that produces Protocol v1 compliant context
payloads with required fields: event, delivery, context (ContextAccess).

Key changes:
- EventLog ORM: auditable event records with indexes
- Transcript ORM: conversation history projection with composite indexes
- AgentRunContextBuilder: Protocol v1 payload with delivery, context, bootstrap
- EventLogStore/TranscriptStore: async stores for fact sources
- Host action handlers: HISTORY_PAGE, HISTORY_SEARCH, EVENT_GET, EVENT_PAGE
- Context validation: build_context output validates via SDK AgentRunContext
- Alembic migration for event_log and transcript tables
- Alembic env.py imports all ORM models for autogenerate discovery

Legacy compatibility: max-round messages go into bootstrap.messages and
compatibility.legacy_messages, not top-level messages field.
2026-06-04 11:11:39 +08:00
huanghuoguoguo
9086f77cc5 docs(agent-runner): split protocol and context design 2026-06-04 11:11:39 +08:00
huanghuoguoguo
275a6d44d6 fix(agent-runner): package context for plugin execution 2026-06-04 11:11:39 +08:00
huanghuoguoguo
0ae6204fd8 feat: make agent runner config schema driven 2026-06-04 11:11:39 +08:00
huanghuoguoguo
0cb6d2187d chore(pipeline): clarify preferred default runner 2026-06-04 11:11:39 +08:00
huanghuoguoguo
472da29a38 chore(agent): remove v1 wording from runner internals 2026-06-04 11:11:39 +08:00
huanghuoguoguo
363e3312f6 Revert "chore: update uv lock registry urls"
This reverts commit 0cf29930a8.
2026-06-04 11:11:39 +08:00
huanghuoguoguo
9d1f4c7598 chore: update uv lock registry urls 2026-06-04 11:11:39 +08:00
huanghuoguoguo
7c7e517ac6 feat(agent): reserve stable runner event names 2026-06-04 11:11:39 +08:00
huanghuoguoguo
f2ff796800 docs: add phase1 qa report 2026-06-04 11:11:39 +08:00
huanghuoguoguo
b5f08eb1d4 feat(agent-runner): enrich plugin runner host context 2026-06-04 11:11:39 +08:00
huanghuoguoguo
88ed3851e2 fix: log agent runner best-effort failures 2026-06-04 11:11:39 +08:00
huanghuoguoguo
548ea56f72 test: address agent runner review comments 2026-06-04 11:11:39 +08:00
huanghuoguoguo
03cbe8043d fix: stabilize dynamic forms and mcp testing 2026-06-04 11:11:39 +08:00
huanghuoguoguo
cc3e9090b2 refactor(modelmgr): simplify model sync logic and remove timeout configuration 2026-06-04 11:11:39 +08:00
huanghuoguoguo
7661075294 fix(rag): align knowledge engine plugin actions 2026-06-04 11:11:39 +08:00
huanghuoguoguo
c2037f9833 feat: support dynamic agent runner defaults 2026-06-04 11:11:39 +08:00
huanghuoguoguo
b1cde952e4 feat(toolmgr): add get_tool_by_name for unified tool lookup
Add unified tool lookup method that searches both plugin and MCP loaders.
Also add _get_tool method to MCPLoader for consistency with PluginToolLoader.
2026-06-04 11:11:39 +08:00
huanghuoguoguo
ef113bb7a7 docs: update PROGRESS.md - rerank support completed 2026-06-04 11:11:39 +08:00
huanghuoguoguo
e81a1af36c feat(plugin): implement INVOKE_RERANK handler with run-scoped authorization
- Add invoke_rerank action handler in plugin handler
- Validate rerank model access via run session
- Cap documents at 64 for API limit
- Return sorted results by relevance score
2026-06-04 11:11:39 +08:00
huanghuoguoguo
2fd126b0d7 docs(runner): mark legacy runners and add PROGRESS.md
- Add DEPRECATED docstring to all legacy runners in pkg/provider/runners/
- Mark migration target for each runner (local-agent, dify, n8n, coze, dashscope, langflow, tbox)
- Add PROGRESS.md to track agent-runner-pluginization implementation status
- Remove completed PHASE0_INTEGRATION_RECORD.md
2026-06-04 11:11:39 +08:00
huanghuoguoguo
47b1890a4b perf(agent-runner): improve session registry and orchestrator efficiency
- Add pre-computed _authorized_ids (frozenset) at session registration for O(1) lookup
- Refactor is_resource_allowed() from linear search to set membership check
- Add thread-safe locking to get_session_registry() singleton
- Cache _session_registry and _state_store references in orchestrator __init__
- Add asyncio.gather() for parallel resource building in AgentResourceBuilder
- Create shared test fixtures in tests/unit_tests/agent/conftest.py
- Update test files to import from shared conftest.py

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 11:11:39 +08:00
huanghuoguoguo
3812bd97eb feat(agent-runner): integrate AgentRunner Protocol v1 with plugin system
Phase 0 integration complete - verified minimal loop with local-agent stub runner.

Changes:
- Add AgentRunOrchestrator for plugin-based agent execution
- Add AgentResultNormalizer for Protocol v1 result conversion
- Add AgentRunnerDescriptor for runner ID parsing (plugin:author/name/runner)
- Update chat handler to use new orchestrator instead of direct runner lookup
- Add plugin handler methods for list_agent_runners and run_agent
- Add connector methods for AgentRunner protocol forwarding
- Update pipeline API to include runner options in metadata
- Add integration docs and implementation plan

Integration verified:
- Runner: plugin:langbot/local-agent/default
- Input: "你好"
- Output: [stub] Echo: 你好
- Date: 2026-05-10 10:09

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 11:11:39 +08:00
Junyan Qin
98bbdf268f docs: record agent runner design decisions 2026-06-04 11:11:38 +08:00
Junyan Qin
7c1ff5b841 docs: design agent runner pluginization 2026-06-04 11:11:38 +08:00
Junyan Qin
5d3dfccae1 chore: stash code 2026-06-04 11:11:38 +08:00
Junyan Qin
a2817f6524 chore(release): bump version to 4.10.0-beta.2
The 4.10.0-beta.2 release built and tried to publish 4.10.0b1 (the version was
never bumped), which PyPI rejected as a duplicate. Bump pyproject.toml and
__init__.py to 4.10.0-beta.2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
v4.10.0-beta.2
2026-06-03 23:24:37 +08:00