Skip to content

fix: preserve the conversational workspace contract#988

Open
radu-mocanu wants to merge 2 commits into
mainfrom
fix/conversational-workspace-contract
Open

fix: preserve the conversational workspace contract#988
radu-mocanu wants to merge 2 commits into
mainfrom
fix/conversational-workspace-contract

Conversation

@radu-mocanu

Copy link
Copy Markdown
Collaborator

Summary

  • hide only marked workspace content-parts from assistant history while retaining ordinary assistant attachments
  • preserve compatibility with content models that drop metaData by using stable ws- content-part IDs
  • make conversational advanced output state explicit and remove mutable model defaults
  • remove the Runtime-to-Agent dependency direction by moving the shared client-side tool type to a neutral module

Validation

  • 4 workspace contract tests pass against the declared older core dependency
  • 118 integrated mapper and advanced-agent tests pass
  • ruff and focused mypy pass
  • lockfile is current

Copilot AI review requested due to automatic review settings July 14, 2026 12:43
@radu-mocanu radu-mocanu force-pushed the fix/conversational-workspace-contract branch from 71d3890 to 54a15ed Compare July 14, 2026 12:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens the “conversational workspace” contract by ensuring assistant-side workspace files are excluded from LLM-visible history while preserving normal assistant attachments, and by making conversational advanced-agent state handling explicit and safer.

Changes:

  • Update message mapping to skip only assistant workspace file content-parts (via metadata.fileKind == "workspace" or stable ws- content-part IDs), while still producing attachments for ordinary assistant files.
  • Remove mutable Pydantic defaults in advanced-agent graph state/output models and fail fast when conversational exchange state wasn’t captured.
  • Decouple runtime modules from agent modules by moving the shared ClientSideToolInfo type into a neutral module.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
uv.lock Bumps locked package version to 0.14.8.
pyproject.toml Bumps project version to 0.14.8.
tests/runtime/test_chat_message_mapper_workspace.py Expands coverage to ensure only workspace-marked assistant file parts are hidden and ordinary assistant attachments remain.
src/uipath_langchain/runtime/messages.py Implements workspace-file detection (metadata + ws- ID fallback) and skips only assistant workspace file parts.
src/uipath_langchain/runtime/runtime.py Switches to importing ClientSideToolInfo from the new neutral types module.
src/uipath_langchain/agent/tools/client_side_tool.py Removes the local TypedDict definition and imports the shared ClientSideToolInfo.
src/uipath_langchain/agent/advanced/types.py Replaces mutable defaults with Field(default_factory=...) for graph state.
src/uipath_langchain/agent/advanced/agent.py Makes conversational wrapper output/state handling explicit; raises a structured error if state capture is missing.
src/uipath_langchain/_client_side_tool_types.py Adds a shared, neutral ClientSideToolInfo TypedDict.

@radu-mocanu radu-mocanu force-pushed the fix/conversational-workspace-contract branch from 54a15ed to cf67632 Compare July 14, 2026 12:49
@sonarqubecloud

Copy link
Copy Markdown

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