OpenHands / OpenHands/software-agent-sdk

Deduplicate ConversationStateUpdateEvent definition

Open Beginner friendly
#4,736 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.1k
Forks
542
Avg merge
1d 19h
Merged PRs (30d)
137

Description

Problem

ConversationStateUpdateEvent is defined in two places with different shapes:

src/events/types.ts (line ~133):

export interface ConversationStateUpdateEvent extends BaseEvent {
  kind: 'ConversationStateUpdateEvent';
  key: string;
  value: unknown;
  previous_value?: unknown;  // has this field
}

src/conversation/remote-state.ts (line ~18):

export interface ConversationStateUpdateEvent extends Event {
  kind: 'ConversationStateUpdateEvent';
  key: string;
  value: any;  // uses any instead of unknown
  // missing previous_value
}

Different base types (BaseEvent vs Event), different value types (unknown vs any), and the remote-state version is missing previous_value.

Proposed Fix

  • Delete the definition in remote-state.ts
  • Import from events/types.ts instead
  • This is a one-line import change

Impact

Low — small cleanup but eliminates a source of confusion.


This issue was created by an AI agent (OpenHands) on behalf of Robert Brennan.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the ConversationStateUpdateEvent definitions in src/events/types.ts around line 133 and src/conversation/remote-state.ts around line 18. Replace the remote-state definition with the import from events/types.ts, then verify that only one definition remains and the remote-state usage accepts previous_value and unknown values.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.