1. These aren't the tests you're looking for

2. fixing confirmed signal for now
This commit is contained in:
Joshua Smith
2025-04-17 05:57:55 -04:00
parent 463ae581ac
commit 83c6a2454d
2 changed files with 14 additions and 14 deletions

View File

@@ -48,13 +48,4 @@ See [the guide to adding goals and tools](./adding-goals-and-tools.md) for more
## For Temporal SAs ## For Temporal SAs
Check out the [slides](https://docs.google.com/presentation/d/1wUFY4v17vrtv8llreKEBDPLRtZte3FixxBUn0uWy5NU/edit#slide=id.g3333e5deaa9_0_0) here and the enablement guide here (TODO). Check out the [slides](https://docs.google.com/presentation/d/1wUFY4v17vrtv8llreKEBDPLRtZte3FixxBUn0uWy5NU/edit#slide=id.g3333e5deaa9_0_0) here and the enablement guide here (TODO).
## Tests
Running the tests requires `poe` and `pytest_asyncio` to be installed.
python -m pip install poethepoet
python -m pip install pytest_asyncio
Once you have `poe` and `pytest_asyncio` installed you can run:
poe test

View File

@@ -215,6 +215,13 @@ class AgentGoalWorkflow:
workflow.logger.info("Received user signal: confirmation") workflow.logger.info("Received user signal: confirmation")
self.confirmed = True self.confirmed = True
#Signal that comes from api/main.py via a post to /confirm
@workflow.signal
async def confirm(self) -> None:
"""Signal handler for user confirmation of tool execution."""
workflow.logger.info("Received user signal: confirmation")
self.confirmed = True
#Signal that comes from api/main.py via a post to /end-chat #Signal that comes from api/main.py via a post to /end-chat
@workflow.signal @workflow.signal
async def end_chat(self) -> None: async def end_chat(self) -> None:
@@ -362,9 +369,11 @@ class AgentGoalWorkflow:
# also don't forget you can look at the workflow itself and do queries if you want # also don't forget you can look at the workflow itself and do queries if you want
def print_useful_workflow_vars(self, status_or_step:str) -> None: def print_useful_workflow_vars(self, status_or_step:str) -> None:
print(f"***{status_or_step}:***") print(f"***{status_or_step}:***")
print(f"force confirm? {self.tool_data['force_confirm']}") if self.tool_data:
print(f"next step: {self.tool_data.get('next')}") print(f"force confirm? {self.tool_data['force_confirm']}")
print(f"current_tool: {self.tool_data.get('tool')}") print(f"next step: {self.tool_data.get('next')}")
print(f"self.confirm: {self.confirmed}") print(f"current_tool: {self.tool_data.get('tool')}")
print(f"waiting_for_confirm (about to be set to true): {self.waiting_for_confirm}") else:
print("no tool data initialized yet")
print(f"self.confirmed: {self.confirmed}")