Skip to content

(WIP) Feature/signals#48

Draft
mp-orkes wants to merge 6 commits into
mainfrom
feature/signals
Draft

(WIP) Feature/signals#48
mp-orkes wants to merge 6 commits into
mainfrom
feature/signals

Conversation

@mp-orkes

@mp-orkes mp-orkes commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

AgentSpan Agent and others added 6 commits April 1, 2026 10:10
Server:
- AgentService.signal(): per-workflow lock, 100 lifetime / 10 pending limits,
  Conductor updateVariables queue, urgent pause/resume, propagation to sub-workflows
- AgentController: POST /{id}/signal, POST /signal (broadcast), GET /signal/{id}/status
- AgentEventListener: urgent pause detection, signal SSE event emission from dispositions
- AgentCompiler: init 7 signal workflow vars, wire intake/merge/implicit task pairs into loop
- ToolCompiler: signal tool routing in enrichment JS, buildSignalIntakeTasks/MergeTasks/ImplicitAcceptTasks
- AgentChatCompleteTaskMapper: inject _signal_injection messages + ephemeral tools before LLM call
- JavaScriptBuilder: signalIntakeScript, signalDispositionScript, implicitAcceptScript, signalStateMergeScript

Python SDK:
- AgentRuntime: signal(), broadcast(), get_signal_status(), signal_async()
- AgentHandle/AgentStream: signal() convenience methods
- Agent: signal_mode parameter (evaluate | auto_accept | disabled)
- signal_tool(): define tools that trigger signals on running agents
- SSE parsing: signal_received, signal_accepted, signal_rejected event types
- AgentEvent.data field for structured signal payloads
- Example: 09e_signals.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
WorkflowExecutor.updateVariables() does not exist in Conductor 3.3.0.rc4.
Replace both call sites with a REST POST to Conductor's built-in
/workflow/{id}/variables endpoint using java.net.http.HttpClient,
following the same pattern used by ListApiToolsTask.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- AgentEventListener: add @lazy to WorkflowExecutor injection to break
  circular dependency with WorkflowExecutorOps at startup
- AgentChatCompleteTaskMapper: use List<ToolSpec> (not List<Object>) and
  convert signal tool maps to ToolSpec instances
- AgentService: disambiguate searchWorkflows() overload with (String) null cast
- AgentCompilerTest: find loop tasks by type/name instead of fixed index 0,
  since signal intake tasks now precede LLM/callbacks in the loop body
- AgentEventListenerTest: remove verify on workflowExecutor.updateVariables()
  (now done via REST); verify pauseWorkflow() only
- AgentServiceSignalTest: fix constructor arg order and add missing ProviderValidator mock
- JavaScriptBuilderSignalTest: fix assertion to match actual script content

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mp-orkes mp-orkes self-assigned this Apr 1, 2026

@bradyyie bradyyie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA review: This PR has merge conflicts and is marked WIP. The signals feature touches both Python SDK (signal.py, result.py, tool.py) and Java server (AgentCompiler, ToolCompiler, AgentController, JavaScriptBuilder). Recommend: resolve conflicts or close if the feature approach has changed since April 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants