[PR #20] [MERGED] refactor: Improve type safety and code organization in agent core types #66

Closed
opened 2026-02-16 06:17:04 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/20
Author: @open-swe[bot]
Created: 8/25/2025
Status: Merged
Merged: 8/25/2025
Merged by: @Palashio

Base: palash/add-interrupt-configHead: open-swe/6f37e688-42f4-458b-a26a-9de18f1c5ab8


📝 Commits (10+)

📊 Changes

3 files changed (+39 additions, -45 deletions)

View changed files

📝 src/graph.ts (+2 -2)
📝 src/interrupt.ts (+29 -32)
📝 src/types.ts (+8 -11)

📄 Description

Triggered from pull request: #19

Owner: @bracesproul

Overview

This PR introduces several improvements to the type system and code organization in the core agent implementation:

Key Changes

  • Centralized type definitions in src/types.ts
  • Improved type safety across interrupt and graph modules
  • Removed unused imports and cleaned up code structure
  • Enhanced type definitions for post-model hooks and interrupt handling

Specific Improvements

  • Added PostModelHook type definition
  • Moved interrupt-related types to a central location
  • Replaced any types with more specific type definitions
  • Improved type checking for messages and tool calls
  • Cleaned up formatting and removed unnecessary blank lines

Quality Checks

  • TypeScript compilation passes
  • ESLint linting checks complete
  • Prettier formatting applied
  • Removed unexpected development artifacts

This refactoring enhances type safety, improves code organization, and prepares the codebase for future extensibility.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/20 **Author:** [@open-swe[bot]](https://github.com/apps/open-swe) **Created:** 8/25/2025 **Status:** ✅ Merged **Merged:** 8/25/2025 **Merged by:** [@Palashio](https://github.com/Palashio) **Base:** `palash/add-interrupt-config` ← **Head:** `open-swe/6f37e688-42f4-458b-a26a-9de18f1c5ab8` --- ### 📝 Commits (10+) - [`6b23be3`](https://github.com/langchain-ai/deepagentsjs/commit/6b23be3f234c2ffd2fa4b8d2c592ef60d07b3d4f) Apply patch [skip ci] - [`dc4c5ef`](https://github.com/langchain-ai/deepagentsjs/commit/dc4c5efbfa84922424dbc7677686ac39ab5f46de) Apply patch [skip ci] - [`a20045d`](https://github.com/langchain-ai/deepagentsjs/commit/a20045dbb40480434e00ba832b5a68f13fa762a7) Apply patch [skip ci] - [`dfb8850`](https://github.com/langchain-ai/deepagentsjs/commit/dfb88505ccccd018a30c80af744ed4525f90b7b8) Apply patch [skip ci] - [`0847cfe`](https://github.com/langchain-ai/deepagentsjs/commit/0847cfecc473fdfb06528273e3ddaf542ae8254b) Apply patch [skip ci] - [`244a62a`](https://github.com/langchain-ai/deepagentsjs/commit/244a62a32118aa3c6a277262b36080a6d5ec6958) Apply patch [skip ci] - [`ce93da4`](https://github.com/langchain-ai/deepagentsjs/commit/ce93da492051c3362d36b14e10308a12187878b4) Apply patch [skip ci] - [`569d08d`](https://github.com/langchain-ai/deepagentsjs/commit/569d08d4c36929026b5876a61acf9d30fb59669a) Apply patch [skip ci] - [`54bf325`](https://github.com/langchain-ai/deepagentsjs/commit/54bf3257ce2a888d5f85035a8f13fd23eaf59a60) Apply patch [skip ci] - [`bc32fbd`](https://github.com/langchain-ai/deepagentsjs/commit/bc32fbd8d9a2362a15ebdaeefbdb2be93a4caf4b) Apply patch [skip ci] ### 📊 Changes **3 files changed** (+39 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `src/graph.ts` (+2 -2) 📝 `src/interrupt.ts` (+29 -32) 📝 `src/types.ts` (+8 -11) </details> ### 📄 Description Triggered from pull request: #19 Owner: @bracesproul ## Overview This PR introduces several improvements to the type system and code organization in the core agent implementation: ### Key Changes - Centralized type definitions in `src/types.ts` - Improved type safety across interrupt and graph modules - Removed unused imports and cleaned up code structure - Enhanced type definitions for post-model hooks and interrupt handling ### Specific Improvements - Added `PostModelHook` type definition - Moved interrupt-related types to a central location - Replaced `any` types with more specific type definitions - Improved type checking for messages and tool calls - Cleaned up formatting and removed unnecessary blank lines ### Quality Checks - ✅ TypeScript compilation passes - ✅ ESLint linting checks complete - ✅ Prettier formatting applied - ✅ Removed unexpected development artifacts This refactoring enhances type safety, improves code organization, and prepares the codebase for future extensibility. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 06:17:04 -05:00
yindo closed this issue 2026-02-16 06:17:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#66